import{a as e,t}from"./chunk-BNv3lrIs.js";import{t as n}from"./vue.runtime.esm-BkFIT5TI.js";import{a as r,i,l as a,n as o,r as s,s as c,t as l,u}from"./_plugin-vue2_normalizer-agX0mVFg.js";import{i as d}from"./socketActions-DG9KytWP.js";import{$ as f,D as p,E as m,J as h,K as g,M as _,N as v,P as y,St as b,T as x,_ as S,et as C,g as w,h as T,j as E,l as D,m as O,pt as k,t as A,v as j,y as M}from"./lib-DPUqMlxa.js";import{t as ee}from"./v4-VYSxcfRa.js";import{t as N}from"./AppBtn-Cax1vPEQ.js";import{t as P}from"./browser-CVJ1AcOT.js";import{t as F}from"./state-BLEGlaTc.js";import{D as I,M as L,P as te,S as R,f as ne,g as z,x as B}from"./index-CcijY9_7.js";import{t as V}from"./AppColorPicker-CS2KQdqh.js";import{t as H}from"./AppNamedSlider-B7wmLwx1.js";import{t as U}from"./AppChart-wIIfqGcr.js";import{t as W}from"./AppBtnCollapseGroup-0aOvJyC0.js";A();var G=class extends u(P){config;get chartData(){return this.$typedState.charts.diagnostics||[]}get chartDimensions(){return[`date`,...this.config.axes.flatMap(e=>e.metrics.map(e=>e.collector))]}get options(){let e=this.$typedState.config.uiSettings.theme.isDark,t=e?`rgba(255,255,255,0.65)`:`rgba(0,0,0,0.45)`,n=this.isMobileViewport?13:14,r={color:e?`#ffffff`:`#000000`,opacity:.05},i={backgroundColor:e?`rgba(15,15,15,0.75)`:`rgba(255,255,255,0.75)`,borderColor:e?`rgba(0,0,0,0.85)`:`rgba(255,255,255,0.85)`,textStyle:{color:t,fontSize:n}},a=this.$vuetify.theme.currentTheme,o=[a.primary?.toString()??``,a.secondary?.toString()??``],s=this.series;return{grid:{top:32,left:16,right:16,bottom:16,containLabel:!0},color:o,textStyle:{fontFamily:`Roboto`},legend:{show:!1},tooltip:{...i,trigger:`axis`,confine:!1,axisPointer:{type:`line`,lineStyle:r,label:{color:t,fontSize:n,backgroundColor:i.backgroundColor}},formatter:e=>{if(!Array.isArray(e))return``;let r=``;return e.forEach(e=>{if(e==null||e.data==null||e.seriesIndex==null)return;let i=s[e.seriesIndex];if(!i.displayLegend||i.encode?.y==null)return;let a=e.data[i.encode.y];typeof a==`number`?a=Math.round(a*1e3)/1e3:a||=`-`,r+=`
                <div>
                  ${e.marker}
                  <span style="font-size:${n}px;color:${t};font-weight:400;margin-left:2px">
                    ${this.sanitize(e.seriesName)}:
                  </span>
                  <span style="float:right;margin-left:20px;font-size:${n}px;color:${t};font-weight:900">
                    ${this.sanitize(a)} ${this.sanitize(i.unit)}
                  </span>
                  <div style="clear: both"></div>
                </div>
                <div style="clear: both"></div>`}),r}},xAxis:{type:`time`,max:`dataMax`,min:e=>{let t=this.$typedGetters[`charts/getChartRetention`];return e.max-t*1e3},axisTick:{show:!1},splitLine:{show:!0,lineStyle:r},axisLabel:{margin:14,color:i.textStyle.color,fontSize:n,formatter:`{H}:{mm}`,rotate:this.isMobileViewport?45:0},axisPointer:{label:{show:!0,margin:9,formatter:e=>this.$filters.formatTimeWithSeconds(e.value)}}},yAxis:this.config.axes.map((e,i)=>({name:e.enabled&&e.showLegend?e.unit:void 0,nameTextStyle:{fontSize:n,color:t,align:i===0?`left`:`right`},nameGap:8,show:!0,type:`value`,position:i===0?`left`:`right`,splitLine:{show:!0,lineStyle:r},min:[void 0,``].includes(e.min)?void 0:e.min,max:[void 0,``].includes(e.max)?void 0:e.max,axisLabel:e.showLegend?{color:t,fontSize:n,formatter:`{value}`}:void 0})),dataZoom:[{type:`inside`,zoomOnMouseWheel:`shift`}],series:s}}sanitize(e){return e.toString().replace(/[^a-z0-9]/gi,e=>`&#${e.charCodeAt(0)};`)}get series(){let e=[];for(let[t,n]of Object.entries(this.config.axes))if(n.enabled)for(let r of n.metrics)e.push({name:r.name,unit:n.unit,displayLegend:r.style.displayLegend,type:`line`,yAxisIndex:+t,showSymbol:!1,animation:!1,color:r.style.lineColor,emphasis:{lineStyle:{width:1.5}},lineStyle:{color:r.style.lineColor,type:r.style.lineStyle,width:1.5,opacity:1},areaStyle:{opacity:r.style.fillOpacity/100,color:r.style.fillColor??r.style.lineColor},encode:{x:`date`,y:r.collector}});return e}};o([c({type:Object,required:!0})],G.prototype,`config`,void 0),G=o([a({})],G);var re=l(G,function(){var e=this,t=e._self._c;return e._self._setupProxy,t(R,{attrs:{title:e.config.title,icon:`$${e.config.icon}`,draggable:``,"layout-path":`diagnostics.${e.config.id}`},scopedSlots:e._u([{key:`menu`,fn:function(){return[t(W,[t(N,{attrs:{small:``},on:{click:function(t){return e.$emit(`edit`,e.config)}}},[t(b,{attrs:{small:``,left:``}},[e._v(` $edit `)]),e._v(` `+e._s(e.$t(`app.general.title.edit_chart`))+` `)],1)],1)]},proxy:!0}])},[t(U,{staticClass:`mt-2`,attrs:{data:e.chartData,dimensions:e.chartDimensions,height:`${e.config.height}px`,options:e.options}})],1)},[],!1,null,null,null,null).exports,K=class extends n{config;get icons(){return Object.keys(d).sort().map(e=>({text:e,value:e}))}};o([c({type:Object,required:!0})],K.prototype,`config`,void 0),K=o([a({})],K);var ie=K;A();var ae=l(ie,function(){var e=this,t=e._self._c;return e._self._setupProxy,t(`div`,[t(B,{attrs:{title:e.$t(`app.setting.label.title`)}},[t(C,{attrs:{filled:``,dense:``,"single-line":``,"hide-details":`auto`,rules:[e.$rules.required]},model:{value:e.config.title,callback:function(t){e.$set(e.config,`title`,t)},expression:`config.title`}})],1),t(k),t(B,{attrs:{title:e.$t(`app.setting.label.icon`)}},[t(f,{attrs:{filled:``,dense:``,"single-line":``,"hide-details":`auto`,items:e.icons},scopedSlots:e._u([{key:`item`,fn:function({item:n}){return[t(b,{attrs:{dense:``,color:`primary`}},[e._v(` $`+e._s(n.text)+` `)]),t(`span`,{staticClass:`ml-2`},[e._v(e._s(n.text))])]}},{key:`selection`,fn:function({item:n}){return[t(b,{attrs:{color:`primary`}},[e._v(` $`+e._s(n.text)+` `)]),t(`span`,{staticClass:`ml-2`},[e._v(e._s(n.text))])]}}]),model:{value:e.config.icon,callback:function(t){e.$set(e.config,`icon`,t)},expression:`config.icon`}})],1),t(k),t(B,{attrs:{title:e.$t(`app.setting.label.height`)}},[t(C,{attrs:{filled:``,dense:``,"single-line":``,"hide-details":`auto`,suffix:`px`,rules:[e.$rules.required,e.$rules.numberGreaterThanOrEqual(1)]},model:{value:e.config.height,callback:function(t){e.$set(e.config,`height`,t)},expression:`config.height`}})],1)],1)},[],!1,null,null,null,null).exports,q=class extends n{config;currentStep=1;steps=[this.$t(`app.setting.label.left_y`),this.$t(`app.setting.label.right_y`)]};o([c({type:Object,required:!0})],q.prototype,`config`,void 0),q=o([a({})],q);var oe=q;A();var se=l(oe,function(){var e=this,t=e._self._c;return e._self._setupProxy,t(M,{attrs:{"non-linear":``,flat:``},model:{value:e.currentStep,callback:function(t){e.currentStep=t},expression:`currentStep`}},[t(T,[e._l(e.steps,function(n,r){return[t(j,{key:`step-${r}`,attrs:{step:r+1,editable:``}},[e._v(` `+e._s(n)+` `)]),r<e.steps.length-1?t(k,{key:r}):e._e()]})],2),e._l(e.steps,function(n,r){return t(S,{key:`${r}-content`,staticClass:`pt-4`,attrs:{step:r+1}},[e.currentStep===r+1?[t(B,{attrs:{title:e.$t(`app.setting.label.enable`)}},[t(O,{attrs:{"hide-details":``},model:{value:e.config.axes[r].enabled,callback:function(t){e.$set(e.config.axes[r],`enabled`,t)},expression:`config.axes[i].enabled`}})],1),t(k),t(B,{attrs:{title:e.$t(`app.setting.label.show_legend`)}},[t(O,{attrs:{"hide-details":``},model:{value:e.config.axes[r].showLegend,callback:function(t){e.$set(e.config.axes[r],`showLegend`,t)},expression:`config.axes[i].showLegend`}})],1),t(k),t(B,{attrs:{title:e.$t(`app.setting.label.unit`)}},[t(C,{attrs:{filled:``,dense:``,"single-line":``,"hide-details":`auto`,rules:[e.$rules.required]},model:{value:e.config.axes[r].unit,callback:function(t){e.$set(e.config.axes[r],`unit`,t)},expression:`config.axes[i].unit`}})],1),t(k),t(B,{attrs:{title:e.$t(`app.setting.label.min`)}},[t(C,{attrs:{filled:``,dense:``,"single-line":``,"hide-details":`auto`,hint:e.$t(`app.setting.label.optional`),rules:[e.$rules.numberValid],suffix:e.config.axes[r].unit},model:{value:e.config.axes[r].min,callback:function(t){e.$set(e.config.axes[r],`min`,t)},expression:`config.axes[i].min`}})],1),t(k),t(B,{attrs:{title:e.$t(`app.setting.label.max`)}},[t(C,{attrs:{filled:``,dense:``,"single-line":``,"hide-details":`auto`,hint:e.$t(`app.setting.label.optional`),rules:[e.$rules.numberValid],suffix:e.config.axes[r].unit},model:{value:e.config.axes[r].max,callback:function(t){e.$set(e.config.axes[r],`max`,t)},expression:`config.axes[i].max`}})],1)]:e._e()],2)})],2)},[],!1,null,`5358e569`,null,null).exports,J=t(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.ClipboardJS=r():n.ClipboardJS=r()})(e,function(){return(function(){var e={686:(function(e,t,n){n.d(t,{default:function(){return O}});var r=n(279),i=n.n(r),a=n(370),o=n.n(a),s=n(817),c=n.n(s);function l(e){try{return document.execCommand(e)}catch{return!1}}var u=function(e){var t=c()(e);return l(`cut`),t};function d(e){var t=document.documentElement.getAttribute(`dir`)===`rtl`,n=document.createElement(`textarea`);n.style.fontSize=`12pt`,n.style.border=`0`,n.style.padding=`0`,n.style.margin=`0`,n.style.position=`absolute`,n.style[t?`right`:`left`]=`-9999px`;var r=window.pageYOffset||document.documentElement.scrollTop;return n.style.top=`${r}px`,n.setAttribute(`readonly`,``),n.value=e,n}var f=function(e,t){var n=d(e);t.container.appendChild(n);var r=c()(n);return l(`copy`),n.remove(),r},p=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},n=``;return typeof e==`string`?n=f(e,t):e instanceof HTMLInputElement&&![`text`,`search`,`url`,`tel`,`password`].includes(e?.type)?n=f(e.value,t):(n=c()(e),l(`copy`)),n};function m(e){"@babel/helpers - typeof";return m=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},m(e)}var h=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.action,n=t===void 0?`copy`:t,r=e.container,i=e.target,a=e.text;if(n!==`copy`&&n!==`cut`)throw Error(`Invalid "action" value, use either "copy" or "cut"`);if(i!==void 0)if(i&&m(i)===`object`&&i.nodeType===1){if(n===`copy`&&i.hasAttribute(`disabled`))throw Error(`Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute`);if(n===`cut`&&(i.hasAttribute(`readonly`)||i.hasAttribute(`disabled`)))throw Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw Error(`Invalid "target" value, use a valid Element`);if(a)return p(a,{container:r});if(i)return n===`cut`?u(i):p(i,{container:r})};function g(e){"@babel/helpers - typeof";return g=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},g(e)}function _(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t,n){return t&&v(e.prototype,t),n&&v(e,n),e}function b(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&x(e,t)}function x(e,t){return x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},x(e,t)}function S(e){var t=T();return function(){var n=E(e),r;if(t){var i=E(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return C(this,r)}}function C(e,t){return t&&(g(t)===`object`||typeof t==`function`)?t:w(e)}function w(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function T(){if(typeof Reflect>`u`||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function D(e,t){var n=`data-clipboard-${e}`;if(t.hasAttribute(n))return t.getAttribute(n)}var O=function(e){b(n,e);var t=S(n);function n(e,r){var i;return _(this,n),i=t.call(this),i.resolveOptions(r),i.listenClick(e),i}return y(n,[{key:`resolveOptions`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof e.action==`function`?e.action:this.defaultAction,this.target=typeof e.target==`function`?e.target:this.defaultTarget,this.text=typeof e.text==`function`?e.text:this.defaultText,this.container=g(e.container)===`object`?e.container:document.body}},{key:`listenClick`,value:function(e){var t=this;this.listener=o()(e,`click`,function(e){return t.onClick(e)})}},{key:`onClick`,value:function(e){var t=e.delegateTarget||e.currentTarget,n=this.action(t)||`copy`,r=h({action:n,container:this.container,target:this.target(t),text:this.text(t)});this.emit(r?`success`:`error`,{action:n,text:r,trigger:t,clearSelection:function(){t&&t.focus(),window.getSelection().removeAllRanges()}})}},{key:`defaultAction`,value:function(e){return D(`action`,e)}},{key:`defaultTarget`,value:function(e){var t=D(`target`,e);if(t)return document.querySelector(t)}},{key:`defaultText`,value:function(e){return D(`text`,e)}},{key:`destroy`,value:function(){this.listener.destroy()}}],[{key:`copy`,value:function(e){return p(e,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body})}},{key:`cut`,value:function(e){return u(e)}},{key:`isSupported`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[`copy`,`cut`],t=typeof e==`string`?[e]:e,n=!!document.queryCommandSupported;return t.forEach(function(e){n&&=!!document.queryCommandSupported(e)}),n}}]),n}(i())}),828:(function(e){var t=9;if(typeof Element<`u`&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}function r(e,n){for(;e&&e.nodeType!==t;){if(typeof e.matches==`function`&&e.matches(n))return e;e=e.parentNode}}e.exports=r}),438:(function(e,t,n){var r=n(828);function i(e,t,n,r,i){var a=o.apply(this,arguments);return e.addEventListener(n,a,i),{destroy:function(){e.removeEventListener(n,a,i)}}}function a(e,t,n,r,a){return typeof e.addEventListener==`function`?i.apply(null,arguments):typeof n==`function`?i.bind(null,document).apply(null,arguments):(typeof e==`string`&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,function(e){return i(e,t,n,r,a)}))}function o(e,t,n,i){return function(n){n.delegateTarget=r(n.target,t),n.delegateTarget&&i.call(e,n)}}e.exports=a}),879:(function(e,t){t.node=function(e){return e!==void 0&&e instanceof HTMLElement&&e.nodeType===1},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return e!==void 0&&(n===`[object NodeList]`||n===`[object HTMLCollection]`)&&`length`in e&&(e.length===0||t.node(e[0]))},t.string=function(e){return typeof e==`string`||e instanceof String},t.fn=function(e){return Object.prototype.toString.call(e)===`[object Function]`}}),370:(function(e,t,n){var r=n(879),i=n(438);function a(e,t,n){if(!e&&!t&&!n)throw Error(`Missing required arguments`);if(!r.string(t))throw TypeError(`Second argument must be a String`);if(!r.fn(n))throw TypeError(`Third argument must be a Function`);if(r.node(e))return o(e,t,n);if(r.nodeList(e))return s(e,t,n);if(r.string(e))return c(e,t,n);throw TypeError(`First argument must be a String, HTMLElement, HTMLCollection, or NodeList`)}function o(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}function s(e,t,n){return Array.prototype.forEach.call(e,function(e){e.addEventListener(t,n)}),{destroy:function(){Array.prototype.forEach.call(e,function(e){e.removeEventListener(t,n)})}}}function c(e,t,n){return i(document.body,e,t,n)}e.exports=a}),817:(function(e){function t(e){var t;if(e.nodeName===`SELECT`)e.focus(),t=e.value;else if(e.nodeName===`INPUT`||e.nodeName===`TEXTAREA`){var n=e.hasAttribute(`readonly`);n||e.setAttribute(`readonly`,``),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute(`readonly`),t=e.value}else{e.hasAttribute(`contenteditable`)&&e.focus();var r=window.getSelection(),i=document.createRange();i.selectNodeContents(e),r.removeAllRanges(),r.addRange(i),t=r.toString()}return t}e.exports=t}),279:(function(e){function t(){}t.prototype={on:function(e,t,n){var r=this.e||={};return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function i(){r.off(e,i),t.apply(n,arguments)}return i._=t,this.on(e,i,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||={})[e]||[]).slice(),r=0,i=n.length;r<i;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||={},r=n[e],i=[];if(r&&t)for(var a=0,o=r.length;a<o;a++)r[a].fn!==t&&r[a].fn._!==t&&i.push(r[a]);return i.length?n[e]=i:delete n[e],this}},e.exports=t,e.exports.TinyEmitter=t})},t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}return(function(){n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t}})(),(function(){n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(function(){n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}})(),n(686)})().default})})),ce=e(t(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(z(),J()):typeof define==`function`&&define.amd?define([`vue`,`clipboard`],r):typeof e==`object`?e.JsonView=r(z(),J()):n.JsonView=r(n.vue,n.clipboard)})(e,function(e,t){return i={},n.m=r=[function(e,t,n){function r(e,t,n,r,i,a,o,s){var c,l,u=typeof e==`function`?e.options:e;return t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),a&&(u._scopeId=`data-v-`+a),o?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||typeof __VUE_SSR_CONTEXT__>`u`||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=c):i&&(c=s?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),c&&(u.functional?(u._injectStyles=c,l=u.render,u.render=function(e,t){return c.call(t),l(e,t)}):(s=u.beforeCreate,u.beforeCreate=s?[].concat(s,c):[c])),{exports:e,options:u}}n.d(t,`a`,function(){return r})},function(e,t,n){n.r(t);var r,i=n(2),a=n.n(i);for(r in i)r!==`default`&&function(e){n.d(t,e,function(){return i[e]})}(r);t.default=a.a},function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),o(n(29));var r=o(n(21)),i=o(n(41)),a=n(42);function o(e){return e&&e.__esModule?e:{default:e}}t.default={name:`JsonViewer`,components:{JsonBox:r.default},props:{value:{type:[Object,Array,String,Number,Boolean,Function],required:!0},expanded:{type:Boolean,default:!1},expandDepth:{type:Number,default:1},copyable:{type:[Boolean,Object],default:!1},sort:{type:Boolean,default:!1},boxed:{type:Boolean,default:!1},theme:{type:String,default:`jv-light`},timeformat:{type:Function,default:function(e){return e.toLocaleString()}},previewMode:{type:Boolean,default:!1},showArrayIndex:{type:Boolean,default:!0},showDoubleQuotes:{type:Boolean,default:!1}},provide:function(){return{expandDepth:this.expandDepth,timeformat:this.timeformat,onKeyclick:this.onKeyclick}},data:function(){return{copied:!1,expandableCode:!1,expandCode:this.expanded}},computed:{jvClass:function(){return`jv-container `+this.theme+(this.boxed?` boxed`:``)},copyText:function(){var e=this.copyable;return{copyText:e.copyText||`copy`,copiedText:e.copiedText||`copied!`,timeout:e.timeout||2e3,align:e.align}}},watch:{value:function(){this.onResized()}},mounted:function(){var e=this;this.debounceResized=(0,a.debounce)(this.debResized.bind(this),200),this.boxed&&this.$refs.jsonBox&&(this.onResized(),this.$refs.jsonBox.$el.addEventListener(`resized`,this.onResized,!0)),this.copyable&&new i.default(this.$refs.clip,{container:this.$refs.viewer,text:function(){return JSON.stringify(e.value,null,2)}}).on(`success`,function(t){e.onCopied(t)})},methods:{onResized:function(){this.debounceResized()},debResized:function(){var e=this;this.$nextTick(function(){e.$refs.jsonBox&&(250<=e.$refs.jsonBox.$el.clientHeight?e.expandableCode=!0:e.expandableCode=!1)})},onCopied:function(e){var t=this;this.copied||(this.copied=!0,setTimeout(function(){t.copied=!1},this.copyText.timeout),this.$emit(`copied`,e))},toggleExpandCode:function(){this.expandCode=!this.expandCode},onKeyclick:function(e){this.$emit(`keyclick`,e)}}}},function(e,t,n){n.r(t);var r,i=n(4),a=n.n(i);for(r in i)r!==`default`&&function(e){n.d(t,e,function(){return i[e]})}(r);t.default=a.a},function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},i=f(n(30)),a=f(n(31)),o=f(n(32)),s=f(n(33)),c=f(n(34)),l=f(n(35)),u=f(n(36)),d=f(n(37));function f(e){return e&&e.__esModule?e:{default:e}}t.default={name:`JsonBox`,inject:[`expandDepth`,`onKeyclick`],props:{value:{type:[Object,Array,String,Number,Boolean,Function,Date],default:null},keyName:{type:String,default:``},sort:Boolean,depth:{type:Number,default:0},previewMode:Boolean,forceExpand:Boolean,showArrayIndex:Boolean,showDoubleQuotes:Boolean,path:{type:String,default:`$`}},data:function(){return{expand:!0,forceExpandMe:this.forceExpand}},mounted:function(){this.expand=this.previewMode||!(this.depth>=this.expandDepth)||this.forceExpandMe},methods:{toggle:function(){this.expand=!this.expand,this.dispatchEvent()},toggleAll:function(){this.expand=!this.expand,this.forceExpandMe=this.expand,this.dispatchEvent()},dispatchEvent:function(){try{this.$el.dispatchEvent(new Event(`resized`))}catch{var e=document.createEvent(`Event`);e.initEvent(`resized`,!0,!1),this.$el.dispatchEvent(e)}},getPath:function(){for(var e=[this.keyName],t=this.$parent;t.depth;)t.$el.classList.contains(`jv-node`)&&e.push(t.keyName),t=t.$parent;return e.reverse()}},render:function(e){var t=this,n=[],f=void 0;this.value===null||this.value===void 0?f=a.default:Array.isArray(this.value)?f=l.default:Object.prototype.toString.call(this.value)===`[object Date]`?f=d.default:r(this.value)===`object`?f=c.default:typeof this.value==`number`?f=o.default:typeof this.value==`string`?f=i.default:typeof this.value==`boolean`?f=s.default:typeof this.value==`function`&&(f=u.default);var p=this.keyName&&this.value&&(Array.isArray(this.value)||r(this.value)===`object`&&Object.prototype.toString.call(this.value)!==`[object Date]`);return!this.previewMode&&p&&n.push(e(`span`,{class:{"jv-toggle":!0,open:!!this.expand},on:{click:function(e){e.altKey?t.toggleAll():t.toggle()}}})),this.keyName&&n.push(e(`span`,{class:{"jv-key":!0},domProps:{innerText:this.showDoubleQuotes?`"`+this.keyName+`":`:this.keyName+`:`},on:{click:function(){t.onKeyclick(t.path)}}})),n.push(e(f,{class:{"jv-push":!0},props:{jsonValue:this.value,keyName:this.keyName,sort:this.sort,depth:this.depth,expand:this.expand,previewMode:this.previewMode,forceExpand:this.forceExpandMe,showArrayIndex:this.showArrayIndex,showDoubleQuotes:this.showDoubleQuotes,path:this.path},on:{"update:expand":function(e){t.expand=e},"update:expandAll":function(e){t.expand=e,t.forceExpandMe=t.expand}}})),e(`div`,{class:{"jv-node":!0,"jv-key-node":!!this.keyName&&!p,toggle:!this.previewMode&&p}},n)}}},function(e,t,n){n.r(t);var r,i=n(6),a=n.n(i);for(r in i)r!==`default`&&function(e){n.d(t,e,function(){return i[e]})}(r);t.default=a.a},function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=/^\w+:\/\//;t.default={name:`JsonString`,props:{jsonValue:{type:String,required:!0}},data:function(){return{expand:!0,canExtend:!1}},mounted:function(){this.$refs.itemRef.offsetHeight>this.$refs.holderRef.offsetHeight&&(this.canExtend=!0)},methods:{toggle:function(){this.expand=!this.expand}},render:function(e){var t=this.jsonValue,n=r.test(t),i=void 0;return this.expand?(i={class:{"jv-item":!0,"jv-string":!0},ref:`itemRef`}).domProps=n?{innerHTML:`"`+(t=`<a href="`+t+`" target="_blank" class="jv-link">`+t+`</a>`).toString()+`"`}:{innerText:`"`+t.toString()+`"`}:i={class:{"jv-ellipsis":!0},on:{click:this.toggle},domProps:{innerText:`...`}},e(`span`,{},[this.canExtend&&e(`span`,{class:{"jv-toggle":!0,open:this.expand},on:{click:this.toggle}}),e(`span`,{class:{"jv-holder-node":!0},ref:`holderRef`}),e(`span`,i)])}}},function(e,t,n){n.r(t);var r,i=n(8),a=n.n(i);for(r in i)r!==`default`&&function(e){n.d(t,e,function(){return i[e]})}(r);t.default=a.a},function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.default={name:`JsonUndefined`,functional:!0,props:{jsonValue:{type:Object,default:null}},render:function(e,t){return e(`span`,{class:{"jv-item":!0,"jv-undefined":!0},domProps:{innerText:t.props.jsonValue===null?`null`:`undefined`}})}}},function(e,t,n){n.r(t);var r,i=n(10),a=n.n(i);for(r in i)r!==`default`&&function(e){n.d(t,e,function(){return i[e]})}(r);t.default=a.a},function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.default={name:`JsonNumber`,functional:!0,props:{jsonValue:{type:Number,required:!0}},render:function(e,t){var n=t.props,t=Number.isInteger(n.jsonValue);return e(`span`,{class:{"jv-item":!0,"jv-number":!0,"jv-number-integer":t,"jv-number-float":!t},domProps:{innerText:n.jsonValue.toString()}})}}},function(e,t,n){n.r(t);var r,i=n(12),a=n.n(i);for(r in i)r!==`default`&&function(e){n.d(t,e,function(){return i[e]})}(r);t.default=a.a},function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.default={name:`JsonBoolean`,functional:!0,props:{jsonValue:Boolean},render:function(e,t){return e(`span`,{class:{"jv-item":!0,"jv-boolean":!0},domProps:{innerText:t.props.jsonValue.toString()}})}}},function(e,t,n){n.r(t);var r,i=n(14),a=n.n(i);for(r in i)r!==`default`&&function(e){n.d(t,e,function(){return i[e]})}(r);t.default=a.a},function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var n=n(21),r=(n=n)&&n.__esModule?n:{default:n};t.default={name:`JsonObject`,props:{jsonValue:{type:Object,required:!0},keyName:{type:String,default:``},depth:{type:Number,default:0},expand:Boolean,forceExpand:Boolean,sort:Boolean,previewMode:Boolean,showArrayIndex:Boolean,showDoubleQuotes:Boolean,path:String},data:function(){return{value:{}}},computed:{ordered:function(){var e=this;if(!this.sort)return this.value;var t={};return Object.keys(this.value).sort().forEach(function(n){t[n]=e.value[n]}),t}},watch:{jsonValue:function(e){this.setValue(e)}},mounted:function(){this.setValue(this.jsonValue)},methods:{setValue:function(e){var t=this;setTimeout(function(){t.value=e},0)},toggle:function(){this.$emit(`update:expand`,!this.expand),this.dispatchEvent()},toggleAll:function(){this.$emit(`update:expandAll`,!this.expand),this.dispatchEvent()},dispatchEvent:function(){try{this.$el.dispatchEvent(new Event(`resized`))}catch{var e=document.createEvent(`Event`);e.initEvent(`resized`,!0,!1),this.$el.dispatchEvent(e)}}},render:function(e){var t,n=this,i=[];if(this.previewMode||this.keyName||i.push(e(`span`,{class:{"jv-toggle":!0,open:!!this.expand},on:{click:function(e){e.altKey?n.toggleAll():n.toggle()}}})),i.push(e(`span`,{class:{"jv-item":!0,"jv-object":!0},domProps:{innerText:`{`}})),this.expand)for(var a in this.ordered)this.ordered.hasOwnProperty(a)&&(t=this.ordered[a],i.push(e(r.default,{key:a,props:{sort:this.sort,keyName:a,depth:this.depth+1,value:t,previewMode:this.previewMode,forceExpand:this.forceExpand,showArrayIndex:this.showArrayIndex,showDoubleQuotes:this.showDoubleQuotes,path:this.path+`.`+a}})));return!this.expand&&Object.keys(this.value).length&&i.push(e(`span`,{class:{"jv-ellipsis":!0},on:{click:function(e){e.altKey?n.toggleAll():n.toggle()}},attrs:{title:`click to reveal object content (keys: `+Object.keys(this.ordered).join(`, `)+`)`},domProps:{innerText:`...`}})),i.push(e(`span`,{class:{"jv-item":!0,"jv-object":!0},domProps:{innerText:`}`}})),e(`span`,i)}}},function(e,t,n){n.r(t);var r,i=n(16),a=n.n(i);for(r in i)r!==`default`&&function(e){n.d(t,e,function(){return i[e]})}(r);t.default=a.a},function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var n=n(21),r=(n=n)&&n.__esModule?n:{default:n};t.default={name:`JsonArray`,props:{jsonValue:{type:Array,required:!0},keyName:{type:String,default:``},depth:{type:Number,default:0},sort:Boolean,expand:Boolean,forceExpand:Boolean,previewMode:Boolean,showArrayIndex:Boolean,showDoubleQuotes:Boolean,path:String},data:function(){return{value:[]}},watch:{jsonValue:function(e){this.setValue(e)}},mounted:function(){this.setValue(this.jsonValue)},methods:{setValue:function(e){var t=this,n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:0;n===0&&(this.value=[]),setTimeout(function(){e.length>n&&(t.value.push(e[n]),t.setValue(e,n+1))},0)},toggle:function(){this.$emit(`update:expand`,!this.expand),this.dispatchEvent()},toggleAll:function(){this.$emit(`update:expandAll`,!this.expand),this.dispatchEvent()},dispatchEvent:function(){try{this.$el.dispatchEvent(new Event(`resized`))}catch{var e=document.createEvent(`Event`);e.initEvent(`resized`,!0,!1),this.$el.dispatchEvent(e)}}},render:function(e){var t=this,n=[];return this.previewMode||this.keyName||n.push(e(`span`,{class:{"jv-toggle":!0,open:!!this.expand},on:{click:function(e){e.altKey?t.toggleAll():t.toggle()}}})),n.push(e(`span`,{class:{"jv-item":!0,"jv-array":!0},domProps:{innerText:`[`}})),this.expand&&this.value.forEach(function(i,a){n.push(e(r.default,{key:a,props:{sort:t.sort,keyName:t.showArrayIndex?``+a:``,depth:t.depth+1,value:i,previewMode:t.previewMode,forceExpand:t.forceExpand,showArrayIndex:t.showArrayIndex,showDoubleQuotes:t.showDoubleQuotes,path:t.path+`.`+a}}))}),!this.expand&&this.value.length&&n.push(e(`span`,{class:{"jv-ellipsis":!0},on:{click:function(e){e.altKey?t.toggleAll():t.toggle()}},attrs:{title:`click to reveal `+this.value.length+` hidden items`},domProps:{innerText:`...`}})),n.push(e(`span`,{class:{"jv-item":!0,"jv-array":!0},domProps:{innerText:`]`}})),e(`span`,n)}}},function(e,t,n){n.r(t);var r,i=n(18),a=n.n(i);for(r in i)r!==`default`&&function(e){n.d(t,e,function(){return i[e]})}(r);t.default=a.a},function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.default={name:`JsonFunction`,functional:!0,props:{jsonValue:{type:Function,required:!0}},render:function(e,t){return e(`span`,{class:{"jv-item":!0,"jv-function":!0},attrs:{title:t.props.jsonValue.toString()},domProps:{innerHTML:`&lt;function&gt;`}})}}},function(e,t,n){n.r(t);var r,i=n(20),a=n.n(i);for(r in i)r!==`default`&&function(e){n.d(t,e,function(){return i[e]})}(r);t.default=a.a},function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.default={name:`JsonDate`,inject:[`timeformat`],functional:!0,props:{jsonValue:{type:Date,required:!0}},render:function(e,t){var n=t.props,t=t.injections,n=n.jsonValue;return e(`span`,{class:{"jv-item":!0,"jv-string":!0},domProps:{innerText:`"`+(0,t.timeformat)(n)+`"`}})}}},function(e,t,n){n.r(t);var r,i=n(3);for(r in i)r!==`default`&&function(e){n.d(t,e,function(){return i[e]})}(r);n(38);var a=n(0),a=(0,a.a)(i.default,void 0,void 0,!1,null,null,null);a.options.__file=`lib/json-box.vue`,t.default=a.exports},function(e,t,n){function r(){var e=this,t=e.$createElement;return(t=e._self._c||t)(`div`,{ref:`viewer`,class:e.jvClass},[e.copyable?t(`div`,{class:`jv-tooltip `+(e.copyText.align||`right`)},[t(`span`,{ref:`clip`,staticClass:`jv-button`,class:{copied:e.copied}},[e._t(`copy`,function(){return[e._v(`
        `+e._s(e.copied?e.copyText.copiedText:e.copyText.copyText)+`
      `)]},{copied:e.copied})],2)]):e._e(),e._v(` `),t(`div`,{staticClass:`jv-code`,class:{open:e.expandCode,boxed:e.boxed}},[t(`json-box`,{ref:`jsonBox`,attrs:{value:e.value,sort:e.sort,"preview-mode":e.previewMode,"show-array-index":e.showArrayIndex,"show-double-quotes":e.showDoubleQuotes},on:{keyclick:e.onKeyclick}})],1),e._v(` `),e.expandableCode&&e.boxed?t(`div`,{staticClass:`jv-more`,on:{click:e.toggleExpandCode}},[t(`span`,{staticClass:`jv-toggle`,class:{open:!!e.expandCode}})]):e._e()])}var i=[];r._withStripped=!0,n.d(t,`a`,function(){return r}),n.d(t,`b`,function(){return i})},function(e,t,n){var r=n(39);typeof r==`string`&&(r=[[e.i,r,``]]),n(25)(r,{hmr:!0,transform:void 0}),r.locals&&(e.exports=r.locals)},function(e,t,n){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||``,r=e[3];return r?t&&typeof btoa==`function`?(e=function(e){return e=btoa(unescape(encodeURIComponent(JSON.stringify(e)))),e=`sourceMappingURL=data:application/json;charset=utf-8;base64,${e}`,`/*# ${e} */`}(r),t=r.sources.map(function(e){return`/*# sourceURL=${r.sourceRoot||``}${e} */`}),[n].concat(t,[e]).join(`
`)):[n].join(`
`):n}(t,e);return t[2]?`@media ${t[2]} {${n}}`:n}).join(``)},t.i=function(e,n,r){typeof e==`string`&&(e=[[null,e,``]]);var i={};if(r)for(var a=0;a<this.length;a++){var o=this[a][0];o!=null&&(i[o]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);r&&i[c[0]]||(n&&(c[2]?c[2]=`${n} and ${c[2]}`:c[2]=n),t.push(c))}},t}},function(e,t,n){var r,i,a,o={},s=(r=function(){return window&&document&&document.all&&!window.atob},function(){return i=i===void 0?r.apply(this,arguments):i}),c=(a={},function(e){if(a[e]===void 0){var t=function(e){return document.querySelector(e)}.call(this,e);if(t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch{t=null}a[e]=t}return a[e]}),l=null,u=0,d=[],f=n(40);function p(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=o[r.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](r.parts[a]);for(;a<r.parts.length;a++)i.parts.push(y(r.parts[a],t))}else{for(var s=[],a=0;a<r.parts.length;a++)s.push(y(r.parts[a],t));o[r.id]={id:r.id,refs:1,parts:s}}}}function m(e,t){for(var n=[],r={},i=0;i<e.length;i++){var a=e[i],o=t.base?a[0]+t.base:a[0],a={css:a[1],media:a[2],sourceMap:a[3]};r[o]?r[o].parts.push(a):n.push(r[o]={id:o,parts:[a]})}return n}function h(e,t){var n=c(e.insertInto);if(!n)throw Error(`Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.`);var r=d[d.length-1];if(e.insertAt===`top`)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),d.push(t);else if(e.insertAt===`bottom`)n.appendChild(t);else{if(typeof e.insertAt!=`object`||!e.insertAt.before)throw Error(`[Style Loader]

 Invalid value for parameter 'insertAt' ('options.insertAt') found.
 Must be 'top', 'bottom', or Object.
 (https://github.com/webpack-contrib/style-loader#insertat)
`);e=c(e.insertInto+` `+e.insertAt.before),n.insertBefore(t,e)}}function g(e){e.parentNode!==null&&(e.parentNode.removeChild(e),0<=(e=d.indexOf(e))&&d.splice(e,1))}function _(e){var t=document.createElement(`style`);return e.attrs.type=`text/css`,v(t,e.attrs),h(e,t),t}function v(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function y(e,t){var n,r,i,a,o;if(t.transform&&e.css){if(!(a=t.transform(e.css)))return function(){};e.css=a}return i=t.singleton?(o=u++,n=l||=_(t),r=S.bind(null,n,o,!1),S.bind(null,n,o,!0)):e.sourceMap&&typeof URL==`function`&&typeof URL.createObjectURL==`function`&&typeof URL.revokeObjectURL==`function`&&typeof Blob==`function`&&typeof btoa==`function`?(a=t,o=document.createElement(`link`),a.attrs.type=`text/css`,a.attrs.rel=`stylesheet`,v(o,a.attrs),h(a,o),n=o,r=function(e,t,n){var r=n.css,i=n.sourceMap,n=t.convertToAbsoluteUrls===void 0&&i;(t.convertToAbsoluteUrls||n)&&(r=f(r)),i&&(r+=`
/*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+` */`),i=new Blob([r],{type:`text/css`}),r=e.href,e.href=URL.createObjectURL(i),r&&URL.revokeObjectURL(r)}.bind(null,n,t),function(){g(n),n.href&&URL.revokeObjectURL(n.href)}):(n=_(t),r=function(e,t){var n=t.css,t=t.media;if(t&&e.setAttribute(`media`,t),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),function(){g(n)}),r(e),function(t){t?t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap||r(e=t):i()}}e.exports=function(e,t){if(typeof DEBUG<`u`&&DEBUG&&typeof document!=`object`)throw Error(`The style-loader cannot be used in a non-browser environment`);(t||={}).attrs=typeof t.attrs==`object`?t.attrs:{},t.singleton||typeof t.singleton==`boolean`||(t.singleton=s()),t.insertInto||=`head`,t.insertAt||=`bottom`;var n=m(e,t);return p(n,t),function(e){for(var r=[],i=0;i<n.length;i++){var a=n[i];(s=o[a.id]).refs--,r.push(s)}e&&p(m(e,t),t);for(var s,i=0;i<r.length;i++)if((s=r[i]).refs===0){for(var c=0;c<s.parts.length;c++)s.parts[c]();delete o[s.id]}}};var b,x=(b=[],function(e,t){return b[e]=t,b.filter(Boolean).join(`
`)});function S(e,t,n,r){var n=n?``:r.css;e.styleSheet?e.styleSheet.cssText=x(t,n):(r=document.createTextNode(n),(n=e.childNodes)[t]&&e.removeChild(n[t]),n.length?e.insertBefore(r,n[t]):e.appendChild(r))}},function(e,t,n){var r=n(44);typeof r==`string`&&(r=[[e.i,r,``]]),n(25)(r,{hmr:!0,transform:void 0}),r.locals&&(e.exports=r.locals)},function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var n=n(28),r=(n=n)&&n.__esModule?n:{default:n};t.default=Object.assign(r.default,{install:function(e){e.component(`JsonViewer`,r.default)}})},function(e,t,n){n.r(t);var r,i=n(22),a=n(1);for(r in a)r!==`default`&&function(e){n.d(t,e,function(){return a[e]})}(r);n(43);var i=(0,n(0).a)(a.default,i.a,i.b,!1,null,null,null);i.options.__file=`lib/json-viewer.vue`,t.default=i.exports},function(t,n){t.exports=e},function(e,t,n){n.r(t);var r,i=n(5);for(r in i)r!==`default`&&function(e){n.d(t,e,function(){return i[e]})}(r);var a=n(0),a=(0,a.a)(i.default,void 0,void 0,!1,null,null,null);a.options.__file=`lib/types/json-string.vue`,t.default=a.exports},function(e,t,n){n.r(t);var r,i=n(7);for(r in i)r!==`default`&&function(e){n.d(t,e,function(){return i[e]})}(r);var a=n(0),a=(0,a.a)(i.default,void 0,void 0,!1,null,null,null);a.options.__file=`lib/types/json-undefined.vue`,t.default=a.exports},function(e,t,n){n.r(t);var r,i=n(9);for(r in i)r!==`default`&&function(e){n.d(t,e,function(){return i[e]})}(r);var a=n(0),a=(0,a.a)(i.default,void 0,void 0,!1,null,null,null);a.options.__file=`lib/types/json-number.vue`,t.default=a.exports},function(e,t,n){n.r(t);var r,i=n(11);for(r in i)r!==`default`&&function(e){n.d(t,e,function(){return i[e]})}(r);var a=n(0),a=(0,a.a)(i.default,void 0,void 0,!1,null,null,null);a.options.__file=`lib/types/json-boolean.vue`,t.default=a.exports},function(e,t,n){n.r(t);var r,i=n(13);for(r in i)r!==`default`&&function(e){n.d(t,e,function(){return i[e]})}(r);var a=n(0),a=(0,a.a)(i.default,void 0,void 0,!1,null,null,null);a.options.__file=`lib/types/json-object.vue`,t.default=a.exports},function(e,t,n){n.r(t);var r,i=n(15);for(r in i)r!==`default`&&function(e){n.d(t,e,function(){return i[e]})}(r);var a=n(0),a=(0,a.a)(i.default,void 0,void 0,!1,null,null,null);a.options.__file=`lib/types/json-array.vue`,t.default=a.exports},function(e,t,n){n.r(t);var r,i=n(17);for(r in i)r!==`default`&&function(e){n.d(t,e,function(){return i[e]})}(r);var a=n(0),a=(0,a.a)(i.default,void 0,void 0,!1,null,null,null);a.options.__file=`lib/types/json-function.vue`,t.default=a.exports},function(e,t,n){n.r(t);var r,i=n(19);for(r in i)r!==`default`&&function(e){n.d(t,e,function(){return i[e]})}(r);var a=n(0),a=(0,a.a)(i.default,void 0,void 0,!1,null,null,null);a.options.__file=`lib/types/json-date.vue`,t.default=a.exports},function(e,t,n){n(23)},function(e,t,n){(t=n(24)(!1)).push([e.i,`.jv-node{position:relative}.jv-node:after{content:','}.jv-node:last-of-type:after{content:''}.jv-node.toggle{margin-left:13px !important}.jv-node .jv-node{margin-left:25px}
`,``]),e.exports=t},function(e,t){e.exports=function(e){var t=typeof window<`u`&&window.location;if(!t)throw Error(`fixUrls requires window.location`);if(!e||typeof e!=`string`)return e;var n=t.protocol+`//`+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,`/`);return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var t=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(t)?e:(t=t.indexOf(`//`)===0?t:t.indexOf(`/`)===0?n+t:r+t.replace(/^\.\//,``),`url(`+JSON.stringify(t)+`)`)})}},function(e,n){e.exports=t},function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.debounce=function(e,t){var n=Date.now(),r=void 0;return function(){var i=[...arguments];Date.now()-n<t&&r&&clearTimeout(r),r=setTimeout(function(){e.apply(void 0,i)},t),n=Date.now()}}},function(e,t,n){n(26)},function(e,t,n){var r=n(24),i=n(45),n=n(46);t=r(!1),n=i(n),t.push([e.i,`.jv-container{box-sizing:border-box;position:relative}.jv-container.boxed{border:1px solid #eee;border-radius:6px}.jv-container.boxed:hover{box-shadow:0 2px 7px rgba(0,0,0,0.15);border-color:transparent;position:relative}.jv-container.jv-light{background:#fff;white-space:nowrap;color:#525252;font-size:14px;font-family:Consolas, Menlo, Courier, monospace}.jv-container.jv-light .jv-ellipsis{color:#999;background-color:#eee;display:inline-block;line-height:0.9;font-size:0.9em;padding:0px 4px 2px 4px;margin:0 4px;border-radius:3px;vertical-align:2px;cursor:pointer;-webkit-user-select:none;user-select:none}.jv-container.jv-light .jv-button{color:#49b3ff}.jv-container.jv-light .jv-key{color:#111111;margin-right:4px}.jv-container.jv-light .jv-item.jv-array{color:#111111}.jv-container.jv-light .jv-item.jv-boolean{color:#fc1e70}.jv-container.jv-light .jv-item.jv-function{color:#067bca}.jv-container.jv-light .jv-item.jv-number{color:#fc1e70}.jv-container.jv-light .jv-item.jv-object{color:#111111}.jv-container.jv-light .jv-item.jv-undefined{color:#e08331}.jv-container.jv-light .jv-item.jv-string{color:#42b983;word-break:break-word;white-space:normal}.jv-container.jv-light .jv-item.jv-string .jv-link{color:#0366d6}.jv-container.jv-light .jv-code .jv-toggle:before{padding:0px 2px;border-radius:2px}.jv-container.jv-light .jv-code .jv-toggle:hover:before{background:#eee}.jv-container .jv-code{overflow:hidden;padding:30px 20px}.jv-container .jv-code.boxed{max-height:300px}.jv-container .jv-code.open{max-height:initial !important;overflow:visible;overflow-x:auto;padding-bottom:45px}.jv-container .jv-toggle{background-image:url(`+n+`);background-repeat:no-repeat;background-size:contain;background-position:center center;cursor:pointer;width:10px;height:10px;margin-right:2px;display:inline-block;-webkit-transition:-webkit-transform 0.1s;transition:-webkit-transform 0.1s;transition:transform 0.1s;transition:transform 0.1s, -webkit-transform 0.1s}.jv-container .jv-toggle.open{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.jv-container .jv-more{position:absolute;z-index:1;bottom:0;left:0;right:0;height:40px;width:100%;text-align:center;cursor:pointer}.jv-container .jv-more .jv-toggle{position:relative;top:40%;z-index:2;color:#888;-webkit-transition:all 0.1s;transition:all 0.1s;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.jv-container .jv-more .jv-toggle.open{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.jv-container .jv-more:after{content:"";width:100%;height:100%;position:absolute;bottom:0;left:0;z-index:1;background:-webkit-linear-gradient(top, rgba(0,0,0,0) 20%, rgba(230,230,230,0.3) 100%);background:linear-gradient(to bottom, rgba(0,0,0,0) 20%, rgba(230,230,230,0.3) 100%);-webkit-transition:all 0.1s;transition:all 0.1s}.jv-container .jv-more:hover .jv-toggle{top:50%;color:#111}.jv-container .jv-more:hover:after{background:-webkit-linear-gradient(top, rgba(0,0,0,0) 20%, rgba(230,230,230,0.3) 100%);background:linear-gradient(to bottom, rgba(0,0,0,0) 20%, rgba(230,230,230,0.3) 100%)}.jv-container .jv-button{position:relative;cursor:pointer;display:inline-block;padding:5px;z-index:5}.jv-container .jv-button.copied{opacity:0.4;cursor:default}.jv-container .jv-tooltip{position:absolute}.jv-container .jv-tooltip.right{right:15px}.jv-container .jv-tooltip.left{left:15px}.jv-container .j-icon{font-size:12px}
`,``]),e.exports=t},function(e,t,n){e.exports=function(e,t){return t||={},typeof(e=e&&e.__esModule?e.default:e)==`string`?(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]/.test(e)||t.needQuotes?`"${e.replace(/"/g,`\\"`).replace(/\n/g,`\\n`)}"`:e):e}},function(e,t){e.exports=`data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE2IiB3aWR0aD0iOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KIAo8cG9seWdvbiBwb2ludHM9IjAsMCA4LDggMCwxNiIKc3R5bGU9ImZpbGw6IzY2NjtzdHJva2U6cHVycGxlO3N0cm9rZS13aWR0aDowIiAvPgo8L3N2Zz4=`}],n.c=i,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,`__esModule`,{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t||4&t&&typeof e==`object`&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,`default`,{enumerable:!0,value:e}),2&t&&typeof e!=`string`)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=27);function n(e){if(i[e])return i[e].exports;var t=i[e]={i:e,l:!1,exports:{}};return r[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}var r,i})}))(),1),Y=class extends u(F){get state(){return{printer:this.$typedState.printer.printer}}handleClick(e){let t=e.replace(`$.`,``).replace(/\.(\w*\s+\w*)/g,(e,t)=>isNaN(t)?`['${t}']`:`[${t}]`);this.$emit(`input`,t)}};Y=o([a({components:{JsonViewer:ce.default}})],Y);var le=l(Y,function(){var e=this,t=e._self._c;return e._self._setupProxy,t(`json-viewer`,{class:e.$vuetify.theme.dark?`jv-dark`:``,attrs:{value:e.state,"expand-depth":2,sort:``},on:{keyclick:e.handleClick}})},[],!1,null,null,null,null).exports,X=class extends n{metric;unit;textArea;result=`-`;browserOpen=!1;async runCollector(){try{let e=await te(`
        const printer = ${JSON.stringify(this.$typedState.printer.printer)}
        return eval(${JSON.stringify(this.metric.collector)})
      `);this.result=String(typeof e==`number`?Math.round(e*1e3)/1e3:e)}catch(e){this.result=String(e||`Unknown Error`)}}handleExplorerClick(e){this.browserOpen=!1;let t=this.textArea.$refs.input;if(t){let n=t.selectionStart,r=t.selectionEnd;this.metric.collector=this.metric.collector.substring(0,n)+e+this.metric.collector.substring(r)}}};o([c({type:Object,required:!0})],X.prototype,`metric`,void 0),o([c({type:String,required:!0})],X.prototype,`unit`,void 0),o([r(`textarea`)],X.prototype,`textArea`,void 0),X=o([a({components:{StateExplorer:le}})],X);var ue=X;A();var de=l(ue,function(){var e=this,t=e._self._c;return e._self._setupProxy,t(h,{attrs:{outlined:``}},[t(D,{ref:`textarea`,staticClass:`px-4`,attrs:{label:e.$t(`app.setting.label.collector`),spellcheck:`false`,"auto-grow":``,"hide-details":`auto`},scopedSlots:e._u([{key:`append`,fn:function(){return[t(N,{attrs:{icon:``,small:``,color:`secondary`,title:e.$t(`app.general.tooltip.browse_metrics`)},on:{click:function(t){e.browserOpen=!0}}},[t(b,[e._v(` $magnify `)])],1),t(N,{attrs:{icon:``,small:``,color:`primary`,title:e.$t(`app.general.tooltip.run_collector`)},on:{click:e.runCollector}},[t(b,[e._v(` $play `)])],1)]},proxy:!0}]),model:{value:e.metric.collector,callback:function(t){e.$set(e.metric,`collector`,t)},expression:`metric.collector`}}),t(B,{attrs:{title:e.$t(`app.setting.label.last_result`)}},[t(C,{ref:`result`,attrs:{filled:``,dense:``,"single-line":``,"hide-details":`auto`,disabled:``,suffix:e.unit,value:e.result}})],1),e.browserOpen?t(I,{attrs:{title:e.$t(`app.general.title.metrics_explorer`),"max-width":`1200`,"no-actions":``},model:{value:e.browserOpen,callback:function(t){e.browserOpen=t},expression:`browserOpen`}},[t(g,[t(`state-explorer`,{on:{input:e.handleExplorerClick}})],1)],1):e._e()],1)},[],!1,null,null,null,null).exports,Z=class extends n{config;currentStep=1;steps=[this.$t(`app.setting.label.left_y`),this.$t(`app.setting.label.right_y`)];lineStyles=[{text:this.$t(`app.setting.label.solid`),value:`solid`},{text:this.$t(`app.setting.label.dotted`),value:`dotted`},{text:this.$t(`app.setting.label.dashed`),value:`dashed`}];addMetric(e){let t=L().layouts.diagnostics.container1[0].axes[0].metrics[0];this.config.axes[e].metrics.push(t)}removeMetric(e,t){this.config.axes[e].metrics.splice(t,1)}};o([c({type:Object,required:!0})],Z.prototype,`config`,void 0),Z=o([a({components:{MetricsCollectorConfig:de}})],Z);var fe=Z;A();var pe=l(fe,function(){var e=this,t=e._self._c;return e._self._setupProxy,t(M,{attrs:{"non-linear":``,flat:``},model:{value:e.currentStep,callback:function(t){e.currentStep=t},expression:`currentStep`}},[t(T,[e._l(e.steps,function(n,r){return[t(j,{key:`step-${r}`,attrs:{step:r+1,editable:``}},[e._v(` `+e._s(n)+` `),t(`small`,[e._v(e._s(e.config.axes[r].unit))])]),r<e.steps.length-1?t(k,{key:r}):e._e()]})],2),e._l(e.steps,function(n,r){return t(S,{key:`${r}-content`,staticClass:`pt-4`,attrs:{step:r+1}},[e.currentStep===r+1?[t(y,{attrs:{accordion:``,flat:``}},e._l(e.config.axes[r].metrics,function(n,i){return t(v,{key:`${i}-metric-${r}-axis`},[t(E,[e._v(` `+e._s(n.name)+` `),t(k,{staticClass:`ml-4`}),t(p,{staticClass:`d-flex justify-center`,attrs:{cols:`1`}},[t(N,{attrs:{icon:``,small:``},on:{click:function(t){return t.stopPropagation(),e.removeMetric(r,i)}}},[t(b,{attrs:{dense:``}},[e._v(` $delete `)])],1)],1)],1),t(_,[t(B,{attrs:{title:e.$t(`app.setting.label.name`)}},[t(C,{attrs:{filled:``,dense:``,"single-line":``,"hide-details":`auto`,rules:[e.$rules.required]},model:{value:n.name,callback:function(t){e.$set(n,`name`,t)},expression:`metric.name`}})],1),t(k),t(B,{attrs:{title:e.$t(`app.setting.label.line_color`)}},[t(V,{attrs:{value:n.style.lineColor,title:n.name,dot:``},on:{input:function(e){n.style.lineColor=e}}})],1),t(k),t(B,{attrs:{title:e.$t(`app.setting.label.line_style`)}},[t(f,{attrs:{filled:``,dense:``,"single-line":``,"hide-details":`auto`,items:e.lineStyles},model:{value:n.style.lineStyle,callback:function(t){e.$set(n.style,`lineStyle`,t)},expression:`metric.style.lineStyle`}})],1),t(k),t(B,{attrs:{title:e.$t(`app.setting.label.fill_color`)}},[t(V,{attrs:{value:n.style.fillColor??n.style.lineColor,title:n.name,dot:``},on:{input:function(e){n.style.fillColor=e}}})],1),t(k),t(H,{staticClass:`px-4 py-3`,attrs:{label:e.$t(`app.setting.label.fill_opacity`),min:0,max:100,suffix:`%`},model:{value:n.style.fillOpacity,callback:function(t){e.$set(n.style,`fillOpacity`,t)},expression:`metric.style.fillOpacity`}}),t(k),t(B,{attrs:{title:e.$t(`app.setting.label.show_legend`)}},[t(O,{attrs:{"hide-details":``},model:{value:n.style.displayLegend,callback:function(t){e.$set(n.style,`displayLegend`,t)},expression:`metric.style.displayLegend`}})],1),t(k),t(`metrics-collector-config`,{staticClass:`mt-3`,attrs:{metric:n,unit:e.config.axes[r].unit}})],1)],1)}),1),t(k,{staticClass:`mt-4`}),t(m,{staticClass:`pa-2 mt-2`},[t(x),t(N,{attrs:{small:``},on:{click:function(t){return e.addMetric(r)}}},[t(b,{attrs:{small:``}},[e._v(` $plus `)]),e._v(` `+e._s(e.$t(`app.setting.btn.add_metric`))+` `)],1)],1)]:e._e()],2)})],2)},[],!1,null,`7b2dfb70`,null,null).exports,Q=class extends u(P){open;config;currentStep=1;steps=[{name:this.$t(`app.setting.label.card`),component:ae},{name:this.$t(`app.setting.label.axes`),component:se},{name:this.$t(`app.setting.label.metrics`),component:pe}];handleSave(){this.$emit(`save`,this.config),this.open=!1}handleDelete(){this.$emit(`delete`,this.config.id),this.open=!1}};o([i({type:Boolean})],Q.prototype,`open`,void 0),o([c({type:Object,required:!0})],Q.prototype,`config`,void 0),Q=o([a({})],Q);var me=Q;A();var he=l(me,function(){var e=this,t=e._self._c;return e._self._setupProxy,t(I,{attrs:{title:e.config.id===``?e.$t(`app.general.title.add_chart`):e.$t(`app.general.title.edit_chart`),"max-width":`800`},scopedSlots:e._u([{key:`actions`,fn:function(){return[e.isMobileViewport?t(x):e._e(),e.config.id===``?e._e():t(N,{attrs:{color:`error`,text:``},on:{click:e.handleDelete}},[e._v(` `+e._s(e.$t(`app.general.btn.remove`))+` `)]),e.isMobileViewport?e._e():t(x),t(N,{attrs:{color:`warning`,text:``},on:{click:function(t){e.open=!1}}},[e._v(` `+e._s(e.$t(`app.general.btn.cancel`))+` `)]),t(N,{attrs:{color:`primary`},on:{click:e.handleSave}},[e._v(` `+e._s(e.config.id===``?e.$t(`app.general.btn.add`):e.$t(`app.general.btn.save`))+` `)])]},proxy:!0}]),model:{value:e.open,callback:function(t){e.open=t},expression:`open`}},[t(g,[t(M,{attrs:{"non-linear":``,flat:``},model:{value:e.currentStep,callback:function(t){e.currentStep=t},expression:`currentStep`}},[t(T,[e._l(e.steps,function(n,r){return[t(j,{key:`step-${r}`,attrs:{step:r+1,editable:``}},[e._v(` `+e._s(n.name)+` `)]),r<e.steps.length-1?t(k,{key:r}):e._e()]})],2),t(w,e._l(e.steps,function(n,r){return t(S,{key:`${r}-content`,staticClass:`pa-0`,attrs:{step:r+1}},[e.currentStep===r+1?t(n.component,{tag:`component`,attrs:{config:e.config}}):e._e()],1)}),1)],1)],1)],1)},[],!1,null,`bcb2e639`,null,null).exports,$=class extends u(F){dialogState={active:!1,card:null};containers=[];mounted(){this.onLayoutChange()}handleAddCard(){let e=JSON.parse(JSON.stringify(L().layouts.diagnostics.container1[0]));e.id=``,this.dialogState.card=e,this.dialogState.active=!0}handleEditCard(e){this.dialogState.card=JSON.parse(JSON.stringify(e)),this.dialogState.active=!0}handleDeleteCard(e){for(let t of Object.values(this.layout)){let n=t.findIndex(t=>t.id===e);if(n>-1){t.splice(n,1);break}}this.updateLayout()}handleSaveCard(e){if(e.id===``)e.id=ee(),this.layout.container1.push(e);else for(let t of Object.values(this.layout)){let n=t.findIndex(t=>t.id===e.id);if(n>-1){t[n]=e;break}}this.updateLayout()}get columnCount(){return this.inLayout?4:this.containers.reduce((e,t)=>+this.hasCards(t)+e,0)}get columnSpan(){return 12/this.columnCount}get inLayout(){return this.$typedState.config.layoutMode}get layout(){return this.$typedGetters[`layout/getLayout`](`diagnostics`)}onLayoutChange(){let e=Object.values(this.layout);for(;e.length<4;)e.push([]);this.containers=e.slice(0,4)}updateLayout(){this.$typedDispatch(`layout/onLayoutChange`,{name:`diagnostics`,value:{container1:this.containers[0],container2:this.containers[1],container3:this.containers[2],container4:this.containers[3]}})}hasCards(e){return e.some(e=>e.enabled)}};o([s(`layout`,{deep:!0})],$.prototype,`onLayoutChange`,null),$=o([a({components:{DiagnosticsCard:re,DiagnosticsCardConfigDialog:he}})],$);var ge=$;A();var _e=l(ge,function(){var e=this,t=e._self._c;return e._self._setupProxy,t(`div`,[t(m,[t(p,{attrs:{cols:`12`}},[t(R,{attrs:{title:e.$t(`app.general.title.diagnostics`),icon:`$chart`},scopedSlots:e._u([{key:`menu`,fn:function(){return[t(W,[t(N,{attrs:{small:``},on:{click:e.handleAddCard}},[t(b,{attrs:{small:``,left:``}},[e._v(` $plus `)]),e._v(` `+e._s(e.$t(`app.general.title.add_chart`))+` `)],1)],1)]},proxy:!0}])})],1)],1),t(m,{attrs:{dense:e.$vuetify.breakpoint.smAndDown}},[e._l(e.containers,function(n,r){return[e.inLayout||e.hasCards(n)?t(p,{key:`container${r}`,class:{drag:e.inLayout},attrs:{cols:`12`,md:`6`,lg:e.columnSpan}},[t(ne,{staticClass:`list-group`,attrs:{options:{group:`diagnostics`,disabled:!e.inLayout}},on:{end:function(t){return t.stopPropagation(),e.updateLayout.apply(null,arguments)}},model:{value:e.containers[r],callback:function(t){e.$set(e.containers,r,t)},expression:`containers[containerIndex]`}},[e._l(n,function(n){return[n.enabled||e.inLayout?t(`diagnostics-card`,{key:n.id,staticClass:`mb-2 mb-md-4`,attrs:{config:n},on:{edit:e.handleEditCard}}):e._e()]})],2)],1):e._e()]})],2),e.dialogState.active?t(`diagnostics-card-config-dialog`,{attrs:{config:e.dialogState.card},on:{save:e.handleSaveCard,delete:e.handleDeleteCard},model:{value:e.dialogState.active,callback:function(t){e.$set(e.dialogState,`active`,t)},expression:`dialogState.active`}}):e._e()],1)},[],!1,null,`98337f14`,null,null).exports;export{_e as default};