diff --git a/README.md b/README.md index 92702946..0ef243f4 100644 --- a/README.md +++ b/README.md @@ -156,6 +156,16 @@ Wenn ein Element mehrere Definitionen enthält, dann wird immer die erste zutref ![](./docs/media/example_element_definition.png)
*Beispiel für eine Element Definition* +Folgende Schreibweisen sind für Definitionen zulässig. +Im folgenden Beispiel wurde das Panel mit zwei FHEM Devices `temp:thermostat_wohnen` und `valve:heizung_wohnen` verbunden. + +|Definition|Erklärung| +|---|---| +|`state::...`|Wird dem Reading kein Device vorangestellt, so wird immer das erste im Panel definierte Device verwendet.| +|`temp-state::...`|Es wird das Device verwendet, welches dem Reading vorangestellt ist.| +|`::text:mdi-check`|Das Element wird mit keinem Reading verbunden und es werden zwei Parameter für das Element übergeben| +|`true`|Das Element wird mit keinem Reading verbunden und für den erste Parameter der Definition wird der Wert `true` übergeben + ## Ersetzungen Ersetzungen bieten die Möglichkeit, Werte innerhalb von Element-Definitionen zurückzugeben und zu formatieren. Folgende Möglichkeiten für Ersetzungen gibt es. |Ersetzung|gibt den Wert vom Parameter `reading`| diff --git a/public/CHANGELOG.md b/public/CHANGELOG.md index 12062269..c19116a8 100644 --- a/public/CHANGELOG.md +++ b/public/CHANGELOG.md @@ -1,3 +1,9 @@ +# v4.0.28-beta (17.03.2024) +## Panel +- bugfix for hide/show Levels +- bugfix for maximizable button +## Documentation +- Better explanation of the syntax for definitions # v4.0.27-beta (16.03.2024) ## Core - replacer %n option noLocaleNumber deprecated -> removed! diff --git a/src/components/PanelCard.vue b/src/components/PanelCard.vue index 1dd93c8e..4d5e476c 100644 --- a/src/components/PanelCard.vue +++ b/src/components/PanelCard.vue @@ -42,7 +42,7 @@ if(levelOpts.value.activeLevels.join('-') !== activeLevels.join('-')) { levelOpts.value.activeLevels = activeLevels - levelClick() + levelClick(true) } }) @@ -60,9 +60,12 @@ let opts = levelOpts.value, idx - if(init) opts.activeLevels = levelsActive(item.panel.main) - - if(opts.expandable && !init) opts.expanded = !opts.expanded + if(init) { + opts.activeLevels = levelsActive(item.panel.main) + } else { + if(opts.expandable) opts.expanded = !opts.expanded + if(opts.maximizable) fhem.app.panelMaximized = opts.expanded ? item.panel : false + } if(opts.expanded) { opts.levels = opts.activeLevels @@ -75,7 +78,11 @@ } } - opts.icon = opts.activeLevels.length > 1 ? opts.expandable ? opts.expanded ? 'mdi-arrow-collapse' : 'mdi-arrow-expand' : !opts.expanded ? 'mdi-swap-vertical' : '' : '' + if(opts.activeLevels.length > 1 || opts.maximizable) { + opts.icon = !opts.expandable ? !opts.expanded ? 'mdi-swap-vertical' : '' : opts.expanded ? 'mdi-arrow-collapse' : 'mdi-arrow-expand' + } else { + opts.icon = '' + } } function getInfo(pos) { diff --git a/www/fhemapp4/CHANGELOG.md b/www/fhemapp4/CHANGELOG.md index 12062269..c19116a8 100644 --- a/www/fhemapp4/CHANGELOG.md +++ b/www/fhemapp4/CHANGELOG.md @@ -1,3 +1,9 @@ +# v4.0.28-beta (17.03.2024) +## Panel +- bugfix for hide/show Levels +- bugfix for maximizable button +## Documentation +- Better explanation of the syntax for definitions # v4.0.27-beta (16.03.2024) ## Core - replacer %n option noLocaleNumber deprecated -> removed! diff --git a/www/fhemapp4/assets/DevicesView-19ff0647.js b/www/fhemapp4/assets/DevicesView-586829bb.js similarity index 86% rename from www/fhemapp4/assets/DevicesView-19ff0647.js rename to www/fhemapp4/assets/DevicesView-586829bb.js index 799671d8..5cba7eb2 100644 --- a/www/fhemapp4/assets/DevicesView-19ff0647.js +++ b/www/fhemapp4/assets/DevicesView-586829bb.js @@ -1 +1 @@ -import{u as f,c as p,r as c,o as n,a as u,w as i,b as d,d as h,F as v,e as w}from"./index-1b2ccf17.js";import{_ as x}from"./PanelCard-bac08c4a.js";const b={__name:"DevicesView",setup(g){const s=f(),m=p(()=>{let e=[];if(s.app.panelMaximized)e.push(s.app.panelMaximized);else{for(const a of s.app.panelView)s.handleDefs(s.app.panelList[a].panel.show,["show"],[!0]).show&&e.push(s.app.panelList[a]);e.sort((a,t)=>o(a)>o(t)?1:o(t)>o(a)?-1:0)}return e}),l=p(()=>{let e={cols:12,sm:6,lg:4};return s.app.panelMaximized&&(e={cols:12}),e});function o(e){return s.handleDefs(e.panel.sortby,["sortby"],[null]).sortby||"999"}return(e,a)=>{const t=c("v-col"),_=c("v-row");return n(),u(_,{"no-gutters":""},{default:i(()=>[(n(!0),d(v,null,h(m.value,r=>(n(),u(t,{cols:l.value.cols,sm:l.value.sm,lg:l.value.lg,key:r.name,class:"pa-1"},{default:i(()=>[w(x,{panel:r},null,8,["panel"])]),_:2},1032,["cols","sm","lg"]))),128))]),_:1})}}};export{b as default}; +import{u as f,c as p,r as c,o as n,a as u,w as i,b as d,d as h,F as v,e as w}from"./index-6f0816ee.js";import{_ as x}from"./PanelCard-05a2c8b0.js";const b={__name:"DevicesView",setup(g){const s=f(),m=p(()=>{let e=[];if(s.app.panelMaximized)e.push(s.app.panelMaximized);else{for(const a of s.app.panelView)s.handleDefs(s.app.panelList[a].panel.show,["show"],[!0]).show&&e.push(s.app.panelList[a]);e.sort((a,t)=>o(a)>o(t)?1:o(t)>o(a)?-1:0)}return e}),l=p(()=>{let e={cols:12,sm:6,lg:4};return s.app.panelMaximized&&(e={cols:12}),e});function o(e){return s.handleDefs(e.panel.sortby,["sortby"],[null]).sortby||"999"}return(e,a)=>{const t=c("v-col"),_=c("v-row");return n(),u(_,{"no-gutters":""},{default:i(()=>[(n(!0),d(v,null,h(m.value,r=>(n(),u(t,{cols:l.value.cols,sm:l.value.sm,lg:l.value.lg,key:r.name,class:"pa-1"},{default:i(()=>[w(x,{panel:r},null,8,["panel"])]),_:2},1032,["cols","sm","lg"]))),128))]),_:1})}}};export{b as default}; diff --git a/www/fhemapp4/assets/InternalsView-06962020.js b/www/fhemapp4/assets/InternalsView-b85de4d3.js similarity index 90% rename from www/fhemapp4/assets/InternalsView-06962020.js rename to www/fhemapp4/assets/InternalsView-b85de4d3.js index c2833d70..d57630df 100644 --- a/www/fhemapp4/assets/InternalsView-06962020.js +++ b/www/fhemapp4/assets/InternalsView-b85de4d3.js @@ -1 +1 @@ -import{u as x,V as C}from"./index-769e4e34.js";import{f as k,u as B,r as e,o as N,a as S,w as o,e as t,j as p,t as i,q as $,h as r}from"./index-1b2ccf17.js";const O={__name:"InternalsView",setup(I){const n=k(!0),a=B(),{toClipboard:u}=x();function d(){u(JSON.stringify(n.value?a.app.config:a.app,null," "))}return(l,c)=>{const m=e("v-toolbar-title"),v=e("v-toolbar"),f=e("v-switch"),_=e("v-col"),b=e("v-btn"),g=e("v-snackbar"),h=e("v-row"),w=e("v-divider"),V=e("v-card-text"),y=e("v-card");return N(),S(y,null,{default:o(()=>[t(v,null,{default:o(()=>[t(m,null,{default:o(()=>[p(i(l.$t("_app.internals.title")),1)]),_:1})]),_:1}),t(V,null,{default:o(()=>[t(h,{"no-gutters":"",class:"align-center pb-2"},{default:o(()=>[t(_,null,{default:o(()=>[t(f,{label:l.$t("_app.internals.onlyConfig"),modelValue:n.value,"onUpdate:modelValue":c[0]||(c[0]=s=>n.value=s),color:"blue",density:"comfortable","hide-details":""},null,8,["label","modelValue"])]),_:1}),t(_,{cols:"1",class:"text-right"},{default:o(()=>[t(g,{timeout:2e3,rounded:"pill"},{activator:o(({props:s})=>[t(b,$(s,{variant:"text",icon:"mdi-clipboard-multiple-outline",size:"small",onClick:d}),null,16)]),default:o(()=>[p(" "+i(l.$t("_app.messages.clipboard.text")),1)]),_:1})]),_:1})]),_:1}),t(w,{class:"pb-3"}),t(r(C),{data:n.value?r(a).app.config:r(a).app,deep:1,showLine:!1,showIcon:!0,showLength:!0},null,8,["data"])]),_:1})]),_:1})}}};export{O as default}; +import{u as x,V as C}from"./index-ed8cb710.js";import{f as k,u as B,r as e,o as N,a as S,w as o,e as t,j as p,t as i,q as $,h as r}from"./index-6f0816ee.js";const O={__name:"InternalsView",setup(I){const n=k(!0),a=B(),{toClipboard:u}=x();function d(){u(JSON.stringify(n.value?a.app.config:a.app,null," "))}return(l,c)=>{const m=e("v-toolbar-title"),v=e("v-toolbar"),f=e("v-switch"),_=e("v-col"),b=e("v-btn"),g=e("v-snackbar"),h=e("v-row"),w=e("v-divider"),V=e("v-card-text"),y=e("v-card");return N(),S(y,null,{default:o(()=>[t(v,null,{default:o(()=>[t(m,null,{default:o(()=>[p(i(l.$t("_app.internals.title")),1)]),_:1})]),_:1}),t(V,null,{default:o(()=>[t(h,{"no-gutters":"",class:"align-center pb-2"},{default:o(()=>[t(_,null,{default:o(()=>[t(f,{label:l.$t("_app.internals.onlyConfig"),modelValue:n.value,"onUpdate:modelValue":c[0]||(c[0]=s=>n.value=s),color:"blue",density:"comfortable","hide-details":""},null,8,["label","modelValue"])]),_:1}),t(_,{cols:"1",class:"text-right"},{default:o(()=>[t(g,{timeout:2e3,rounded:"pill"},{activator:o(({props:s})=>[t(b,$(s,{variant:"text",icon:"mdi-clipboard-multiple-outline",size:"small",onClick:d}),null,16)]),default:o(()=>[p(" "+i(l.$t("_app.messages.clipboard.text")),1)]),_:1})]),_:1})]),_:1}),t(w,{class:"pb-3"}),t(r(C),{data:n.value?r(a).app.config:r(a).app,deep:1,showLine:!1,showIcon:!0,showLength:!0},null,8,["data"])]),_:1})]),_:1})}}};export{O as default}; diff --git a/www/fhemapp4/assets/PanelCard-bac08c4a.js b/www/fhemapp4/assets/PanelCard-05a2c8b0.js similarity index 51% rename from www/fhemapp4/assets/PanelCard-bac08c4a.js rename to www/fhemapp4/assets/PanelCard-05a2c8b0.js index f8fe0405..41e823a3 100644 --- a/www/fhemapp4/assets/PanelCard-bac08c4a.js +++ b/www/fhemapp4/assets/PanelCard-05a2c8b0.js @@ -1,4 +1,4 @@ -import{u as G,c as S,r as b,o as m,b as V,y as q,t as F,k,a as E,w as z,j as J,z as De,F as Z,e as y,A as we,f as N,q as te,d as ve,l as Re,B as ne,C as ae,D as Me,E as Pe,s as Q,G as ze,x as me,H as Oe,m as ke,I as Te,J as Ve,h as K,K as je,L as Ie,i as Fe,p as Ne,M as Ue,N as He,O as qe,P as Be}from"./index-1b2ccf17.js";const We={__name:"PanelMainInfo",props:{el:Object,iconmap:Array,devices:Object,height:String},setup(e){const t=e,n=G(),o=S(()=>n.handleDefs(t.el.text,["text","format"],["",!t.el.text2&&!t.el.text3&&!t.el.icon?"text-h6":"text-caption"])),u=S(()=>n.handleDefs(t.el.text2,["text","format"],["",t.el.text&&!t.el.text3&&!t.el.icon?"text-h6":"text-caption"])),s=S(()=>n.handleDefs(t.el.text3,["text","format"],["","text-caption"])),i=S(()=>{let a=n.handleDefs(t.el.icon,["icon","color","size"],["","","x-large"]);return a.icon&&(a.icon=n.getIcon(a.icon,t.iconmap)),a}),r=S(()=>{let a=n.handleDefs(t.el.status,["level","color","min","max","reverse","linear"],[0,"success",0,100,!1,!1]);return a.level=Math.round((a.level-a.min)/(a.max-a.min)*100),a.reverse=!!a.reverse,a});return(a,l)=>{const c=b("v-icon"),_=b("v-progress-circular"),C=b("v-progress-linear");return m(),V(Z,null,[e.el.text?(m(),V("div",{key:0,class:q(o.value.format)},F(o.value.text),3)):k("",!0),e.el.icon?(m(),E(c,{key:1,color:i.value.color,size:i.value.size},{default:z(()=>[J(F(i.value.icon),1)]),_:1},8,["color","size"])):k("",!0),e.el.status&&!r.value.linear?(m(),E(_,{key:2,width:"4",modelValue:r.value.level,"onUpdate:modelValue":l[0]||(l[0]=w=>r.value.level=w),color:r.value.color,reverse:r.value.reverse},null,8,["modelValue","color","reverse"])):k("",!0),e.el.status&&r.value.linear?(m(),E(C,{key:3,height:"7",rounded:"",modelValue:r.value.level,"onUpdate:modelValue":l[1]||(l[1]=w=>r.value.level=w),color:r.value.color,reverse:r.value.reverse},null,8,["modelValue","color","reverse"])):k("",!0),De("div",{class:q(e.el.text2?u.value.format:s.value.format)},[e.el.text2?(m(),V("span",{key:0,class:q(u.value.format)},F(u.value.text),3)):k("",!0),e.el.text3?(m(),V("span",{key:1,class:q(s.value.format)},F(s.value.text),3)):k("",!0)],2)],64)}}},Ke={__name:"PanelMainBtn",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=G(),o=S(()=>{let a=n.handleDefs(t.el.btn,["icon","disabled","color","variant"],["",!1,"","text"]);return a.icon&&(a.icon=n.getIcon(a.icon,t.iconmap)),a}),u=S(()=>{let a=n.handleDefs(t.el.status,["level","color","min","max","reverse"],[0,"success",0,100,!1]);return a.level=Math.round((a.level-a.min)/(a.max-a.min)*100),a.reverse=!!a.reverse,a}),s={timer:!1,long:!1};function i(a){let l=[],c=a.cmd;if(a.type==="cmd"){for(const _ of t.devices)l=_.split(":"),RegExp(l[0]).test(c)&&(c=c.replace(l[0],l[1]));n.request("text",c)}a.type==="route"&&we.push({name:"devices",params:{view:a.cmd},query:we.currentRoute.value.query}),a.type==="url"&&window.open(a.cmd,"_self")}function r(a){let l=n.handleDefs(t.el.click,["cmd","type"],["","cmd"],!1,null,!0),c=n.handleDefs(t.el.longClick,["cmd","type"],["","cmd"],!1,null,!0),_=n.handleDefs(t.el.longRelease,["cmd","type"],["","cmd"],!1,null,!0);a==="mouseStart"&&(s.timer=setTimeout(()=>{s.long=!0,c.cmd&&i(c)},1e3)),a==="mouseEnd"&&(s.long?_.cmd&&i(_):l.cmd&&i(l),clearTimeout(s.timer),s.long=!1)}return(a,l)=>{const c=b("v-progress-linear"),_=b("v-icon"),C=b("v-btn");return m(),V(Z,null,[e.el.status?(m(),E(c,{key:0,height:"4",modelValue:u.value.level,"onUpdate:modelValue":l[0]||(l[0]=w=>u.value.level=w),color:u.value.color,reverse:u.value.reverse},null,8,["modelValue","color","reverse"])):k("",!0),y(C,{icon:"",variant:o.value.variant,disabled:o.value.disabled,color:o.value.color,onMousedown:l[1]||(l[1]=w=>r("mouseStart")),onMouseup:l[2]||(l[2]=w=>r("mouseEnd")),class:"my-2"},{default:z(()=>[y(_,{size:"large"},{default:z(()=>[J(F(o.value.icon),1)]),_:1})]),_:1},8,["variant","disabled","color"])],64)}}},Je={__name:"PanelMainSlider",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=G(),o=N();function u(a){o.value=a}const s=S(()=>{let a=n.handleDefs(t.el.slider,["cmd","current","color","min","max","steps","reverse","size","vertical"],["",0,"",0,100,10,!1,4,!1],!1,null,!0);return/%v/.test(a.current)&&(a.current=a.current.replace("%v",o.value)),u(a.current),a});let i=null;function r(a){let l=s.value.cmd,c=/\./.exec(s.value.steps),_=0,C=[];c&&(_=s.value.steps.slice(c.index).length-1),l=l.replace("%v",a.toFixed(_));for(const w of t.devices)C=w.split(":"),RegExp(C[0]).test(l)&&(l=l.replace(C[0],C[1]));clearTimeout(i),i=setTimeout(()=>{n.request("text",l)},500)}return(a,l)=>{const c=b("v-slider");return m(),E(c,{modelValue:o.value,"onUpdate:modelValue":[l[0]||(l[0]=_=>o.value=_),l[1]||(l[1]=_=>r(_))],min:s.value.min,max:s.value.max,step:s.value.steps,reverse:s.value.reverse,direction:s.value.vertical?"vertical":"horizontal","track-size":s.value.size,color:s.value.color,"hide-details":"","thumb-label":""},null,8,["modelValue","min","max","step","reverse","direction","track-size","color"])}}},Ge={__name:"PanelMainImage",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=G(),o=N(!1),u=S(()=>n.handleDefs(t.el.image,["source","height"],["",null]));return(s,i)=>{const r=b("v-skeleton-loader"),a=b("v-img");return m(),V(Z,null,[o.value?k("",!0):(m(),E(r,{key:0,type:"image"})),y(a,{src:u.value.source,height:u.value.height,onLoad:i[0]||(i[0]=l=>o.value=!0)},null,8,["src","height"])],64)}}},Ye={__name:"PanelMainMenu",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=G(),o=S(()=>{let i=n.handleDefs(t.el.btn,["icon","disabled","color","variant"],["mdi-dots-vertical",!1,"","text"]);return i.icon&&(i.icon=n.getIcon(i.icon,t.iconmap)),i}),u=S(()=>{let i=[],r=n.handleDefs(t.el.menu,["name","cmd"],["",""],!0,","),a={};for(const l of r)a={name:/:/.test(l.name)?l.name.split(":")[0]:l.name,cmd:/:/.test(l.cmd)?l.cmd.split(":")[1]:l.cmd},i.push(a);return i});function s(i){let r=[];for(const a of t.devices)r=a.split(":"),RegExp(r[0]).test(i)&&(i=i.replace(r[0],r[1]));n.request("text",i)}return(i,r)=>{const a=b("v-icon"),l=b("v-btn"),c=b("v-list-item-title"),_=b("v-list-item"),C=b("v-list"),w=b("v-menu");return m(),E(w,null,{activator:z(({props:h})=>[y(l,te(h,{icon:"",variant:o.value.variant,disabled:o.value.disabled||u.value.length<1,color:o.value.color,class:"my-2"}),{default:z(()=>[y(a,{size:"large"},{default:z(()=>[J(F(o.value.icon),1)]),_:1})]),_:2},1040,["variant","disabled","color"])]),default:z(()=>[y(C,null,{default:z(()=>[(m(!0),V(Z,null,ve(u.value,(h,f)=>(m(),E(_,{key:f,value:f,onClick:v=>s(h.cmd)},{default:z(()=>[y(c,null,{default:z(()=>[J(F(h.name),1)]),_:2},1024)]),_:2},1032,["value","onClick"]))),128))]),_:1})]),_:1})}}};var ue=null;function Ze(e){return ue||(ue=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){return setTimeout(t,16)}).bind(window)),ue(e)}var ce=null;function Xe(e){ce||(ce=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(t){clearTimeout(t)}).bind(window)),ce(e)}function Qe(e){var t=document.createElement("style");return t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e)),(document.querySelector("head")||document.body).appendChild(t),t}function re(e,t){t===void 0&&(t={});var n=document.createElement(e);return Object.keys(t).forEach(function(o){n[o]=t[o]}),n}function Le(e,t,n){var o=window.getComputedStyle(e,n||null)||{display:"none"};return o[t]}function fe(e){if(!document.documentElement.contains(e))return{detached:!0,rendered:!1};for(var t=e;t!==document;){if(Le(t,"display")==="none")return{detached:!1,rendered:!1};t=t.parentNode}return{detached:!1,rendered:!0}}var $e='.resize-triggers{visibility:hidden;opacity:0;pointer-events:none}.resize-contract-trigger,.resize-contract-trigger:before,.resize-expand-trigger,.resize-triggers{content:"";position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}.resize-contract-trigger,.resize-expand-trigger{background:#eee;overflow:auto}.resize-contract-trigger:before{width:200%;height:200%}',_e=0,le=null;function et(e,t){e.__resize_mutation_handler__||(e.__resize_mutation_handler__=at.bind(e));var n=e.__resize_listeners__;if(!n){if(e.__resize_listeners__=[],window.ResizeObserver){var o=e.offsetWidth,u=e.offsetHeight,s=new ResizeObserver(function(){!e.__resize_observer_triggered__&&(e.__resize_observer_triggered__=!0,e.offsetWidth===o&&e.offsetHeight===u)||ie(e)}),i=fe(e),r=i.detached,a=i.rendered;e.__resize_observer_triggered__=r===!1&&a===!1,e.__resize_observer__=s,s.observe(e)}else if(e.attachEvent&&e.addEventListener)e.__resize_legacy_resize_handler__=function(){ie(e)},e.attachEvent("onresize",e.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);else if(_e||(le=Qe($e)),rt(e),e.__resize_rendered__=fe(e).rendered,window.MutationObserver){var l=new MutationObserver(e.__resize_mutation_handler__);l.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),e.__resize_mutation_observer__=l}}e.__resize_listeners__.push(t),_e++}function tt(e,t){var n=e.__resize_listeners__;if(n){if(t&&n.splice(n.indexOf(t),1),!n.length||!t){if(e.detachEvent&&e.removeEventListener){e.detachEvent("onresize",e.__resize_legacy_resize_handler__),document.removeEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);return}e.__resize_observer__?(e.__resize_observer__.unobserve(e),e.__resize_observer__.disconnect(),e.__resize_observer__=null):(e.__resize_mutation_observer__&&(e.__resize_mutation_observer__.disconnect(),e.__resize_mutation_observer__=null),e.removeEventListener("scroll",he),e.removeChild(e.__resize_triggers__.triggers),e.__resize_triggers__=null),e.__resize_listeners__=null}!--_e&&le&&le.parentNode.removeChild(le)}}function nt(e){var t=e.__resize_last__,n=t.width,o=t.height,u=e.offsetWidth,s=e.offsetHeight;return u!==n||s!==o?{width:u,height:s}:null}function at(){var e=fe(this),t=e.rendered,n=e.detached;t!==this.__resize_rendered__&&(!n&&this.__resize_triggers__&&(pe(this),this.addEventListener("scroll",he,!0)),this.__resize_rendered__=t,ie(this))}function he(){var e=this;pe(this),this.__resize_raf__&&Xe(this.__resize_raf__),this.__resize_raf__=Ze(function(){var t=nt(e);t&&(e.__resize_last__=t,ie(e))})}function ie(e){!e||!e.__resize_listeners__||e.__resize_listeners__.forEach(function(t){t.call(e,e)})}function rt(e){var t=Le(e,"position");(!t||t==="static")&&(e.style.position="relative"),e.__resize_old_position__=t,e.__resize_last__={};var n=re("div",{className:"resize-triggers"}),o=re("div",{className:"resize-expand-trigger"}),u=re("div"),s=re("div",{className:"resize-contract-trigger"});o.appendChild(u),n.appendChild(o),n.appendChild(s),e.appendChild(n),e.__resize_triggers__={triggers:n,expand:o,expandChild:u,contract:s},pe(e),e.addEventListener("scroll",he,!0),e.__resize_last__={width:e.offsetWidth,height:e.offsetHeight}}function pe(e){var t=e.__resize_triggers__,n=t.expand,o=t.expandChild,u=t.contract,s=u.scrollWidth,i=u.scrollHeight,r=n.offsetWidth,a=n.offsetHeight,l=n.scrollWidth,c=n.scrollHeight;u.scrollLeft=s,u.scrollTop=i,o.style.width=r+1+"px",o.style.height=a+1+"px",n.scrollLeft=l,n.scrollTop=c}var W=function(){return W=Object.assign||function(e){for(var t,n=1,o=arguments.length;nn.handleDefs(t.el.text,["text","format"],["",!t.el.text2&&!t.el.text3&&!t.el.icon?"text-h6":"text-caption"])),u=S(()=>n.handleDefs(t.el.text2,["text","format"],["",t.el.text&&!t.el.text3&&!t.el.icon?"text-h6":"text-caption"])),s=S(()=>n.handleDefs(t.el.text3,["text","format"],["","text-caption"])),o=S(()=>{let a=n.handleDefs(t.el.icon,["icon","color","size"],["","","x-large"]);return a.icon&&(a.icon=n.getIcon(a.icon,t.iconmap)),a}),r=S(()=>{let a=n.handleDefs(t.el.status,["level","color","min","max","reverse","linear"],[0,"success",0,100,!1,!1]);return a.level=Math.round((a.level-a.min)/(a.max-a.min)*100),a.reverse=!!a.reverse,a});return(a,l)=>{const c=b("v-icon"),_=b("v-progress-circular"),C=b("v-progress-linear");return m(),V(Z,null,[e.el.text?(m(),V("div",{key:0,class:q(i.value.format)},F(i.value.text),3)):k("",!0),e.el.icon?(m(),E(c,{key:1,color:o.value.color,size:o.value.size},{default:z(()=>[J(F(o.value.icon),1)]),_:1},8,["color","size"])):k("",!0),e.el.status&&!r.value.linear?(m(),E(_,{key:2,width:"4",modelValue:r.value.level,"onUpdate:modelValue":l[0]||(l[0]=w=>r.value.level=w),color:r.value.color,reverse:r.value.reverse},null,8,["modelValue","color","reverse"])):k("",!0),e.el.status&&r.value.linear?(m(),E(C,{key:3,height:"7",rounded:"",modelValue:r.value.level,"onUpdate:modelValue":l[1]||(l[1]=w=>r.value.level=w),color:r.value.color,reverse:r.value.reverse},null,8,["modelValue","color","reverse"])):k("",!0),De("div",{class:q(e.el.text2?u.value.format:s.value.format)},[e.el.text2?(m(),V("span",{key:0,class:q(u.value.format)},F(u.value.text),3)):k("",!0),e.el.text3?(m(),V("span",{key:1,class:q(s.value.format)},F(s.value.text),3)):k("",!0)],2)],64)}}},Ke={__name:"PanelMainBtn",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=G(),i=S(()=>{let a=n.handleDefs(t.el.btn,["icon","disabled","color","variant"],["",!1,"","text"]);return a.icon&&(a.icon=n.getIcon(a.icon,t.iconmap)),a}),u=S(()=>{let a=n.handleDefs(t.el.status,["level","color","min","max","reverse"],[0,"success",0,100,!1]);return a.level=Math.round((a.level-a.min)/(a.max-a.min)*100),a.reverse=!!a.reverse,a}),s={timer:!1,long:!1};function o(a){let l=[],c=a.cmd;if(a.type==="cmd"){for(const _ of t.devices)l=_.split(":"),RegExp(l[0]).test(c)&&(c=c.replace(l[0],l[1]));n.request("text",c)}a.type==="route"&&we.push({name:"devices",params:{view:a.cmd},query:we.currentRoute.value.query}),a.type==="url"&&window.open(a.cmd,"_self")}function r(a){let l=n.handleDefs(t.el.click,["cmd","type"],["","cmd"],!1,null,!0),c=n.handleDefs(t.el.longClick,["cmd","type"],["","cmd"],!1,null,!0),_=n.handleDefs(t.el.longRelease,["cmd","type"],["","cmd"],!1,null,!0);a==="mouseStart"&&(s.timer=setTimeout(()=>{s.long=!0,c.cmd&&o(c)},1e3)),a==="mouseEnd"&&(s.long?_.cmd&&o(_):l.cmd&&o(l),clearTimeout(s.timer),s.long=!1)}return(a,l)=>{const c=b("v-progress-linear"),_=b("v-icon"),C=b("v-btn");return m(),V(Z,null,[e.el.status?(m(),E(c,{key:0,height:"4",modelValue:u.value.level,"onUpdate:modelValue":l[0]||(l[0]=w=>u.value.level=w),color:u.value.color,reverse:u.value.reverse},null,8,["modelValue","color","reverse"])):k("",!0),y(C,{icon:"",variant:i.value.variant,disabled:i.value.disabled,color:i.value.color,onMousedown:l[1]||(l[1]=w=>r("mouseStart")),onMouseup:l[2]||(l[2]=w=>r("mouseEnd")),class:"my-2"},{default:z(()=>[y(_,{size:"large"},{default:z(()=>[J(F(i.value.icon),1)]),_:1})]),_:1},8,["variant","disabled","color"])],64)}}},Je={__name:"PanelMainSlider",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=G(),i=N();function u(a){i.value=a}const s=S(()=>{let a=n.handleDefs(t.el.slider,["cmd","current","color","min","max","steps","reverse","size","vertical"],["",0,"",0,100,10,!1,4,!1],!1,null,!0);return/%v/.test(a.current)&&(a.current=a.current.replace("%v",i.value)),u(a.current),a});let o=null;function r(a){let l=s.value.cmd,c=/\./.exec(s.value.steps),_=0,C=[];c&&(_=s.value.steps.slice(c.index).length-1),l=l.replace("%v",a.toFixed(_));for(const w of t.devices)C=w.split(":"),RegExp(C[0]).test(l)&&(l=l.replace(C[0],C[1]));clearTimeout(o),o=setTimeout(()=>{n.request("text",l)},500)}return(a,l)=>{const c=b("v-slider");return m(),E(c,{modelValue:i.value,"onUpdate:modelValue":[l[0]||(l[0]=_=>i.value=_),l[1]||(l[1]=_=>r(_))],min:s.value.min,max:s.value.max,step:s.value.steps,reverse:s.value.reverse,direction:s.value.vertical?"vertical":"horizontal","track-size":s.value.size,color:s.value.color,"hide-details":"","thumb-label":""},null,8,["modelValue","min","max","step","reverse","direction","track-size","color"])}}},Ge={__name:"PanelMainImage",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=G(),i=N(!1),u=S(()=>n.handleDefs(t.el.image,["source","height"],["",null]));return(s,o)=>{const r=b("v-skeleton-loader"),a=b("v-img");return m(),V(Z,null,[i.value?k("",!0):(m(),E(r,{key:0,type:"image"})),y(a,{src:u.value.source,height:u.value.height,onLoad:o[0]||(o[0]=l=>i.value=!0)},null,8,["src","height"])],64)}}},Ye={__name:"PanelMainMenu",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=G(),i=S(()=>{let o=n.handleDefs(t.el.btn,["icon","disabled","color","variant"],["mdi-dots-vertical",!1,"","text"]);return o.icon&&(o.icon=n.getIcon(o.icon,t.iconmap)),o}),u=S(()=>{let o=[],r=n.handleDefs(t.el.menu,["name","cmd"],["",""],!0,","),a={};for(const l of r)a={name:/:/.test(l.name)?l.name.split(":")[0]:l.name,cmd:/:/.test(l.cmd)?l.cmd.split(":")[1]:l.cmd},o.push(a);return o});function s(o){let r=[];for(const a of t.devices)r=a.split(":"),RegExp(r[0]).test(o)&&(o=o.replace(r[0],r[1]));n.request("text",o)}return(o,r)=>{const a=b("v-icon"),l=b("v-btn"),c=b("v-list-item-title"),_=b("v-list-item"),C=b("v-list"),w=b("v-menu");return m(),E(w,null,{activator:z(({props:p})=>[y(l,te(p,{icon:"",variant:i.value.variant,disabled:i.value.disabled||u.value.length<1,color:i.value.color,class:"my-2"}),{default:z(()=>[y(a,{size:"large"},{default:z(()=>[J(F(i.value.icon),1)]),_:1})]),_:2},1040,["variant","disabled","color"])]),default:z(()=>[y(C,null,{default:z(()=>[(m(!0),V(Z,null,ve(u.value,(p,f)=>(m(),E(_,{key:f,value:f,onClick:v=>s(p.cmd)},{default:z(()=>[y(c,null,{default:z(()=>[J(F(p.name),1)]),_:2},1024)]),_:2},1032,["value","onClick"]))),128))]),_:1})]),_:1})}}};var ue=null;function Ze(e){return ue||(ue=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){return setTimeout(t,16)}).bind(window)),ue(e)}var ce=null;function Xe(e){ce||(ce=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(t){clearTimeout(t)}).bind(window)),ce(e)}function Qe(e){var t=document.createElement("style");return t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e)),(document.querySelector("head")||document.body).appendChild(t),t}function re(e,t){t===void 0&&(t={});var n=document.createElement(e);return Object.keys(t).forEach(function(i){n[i]=t[i]}),n}function Le(e,t,n){var i=window.getComputedStyle(e,n||null)||{display:"none"};return i[t]}function fe(e){if(!document.documentElement.contains(e))return{detached:!0,rendered:!1};for(var t=e;t!==document;){if(Le(t,"display")==="none")return{detached:!1,rendered:!1};t=t.parentNode}return{detached:!1,rendered:!0}}var $e='.resize-triggers{visibility:hidden;opacity:0;pointer-events:none}.resize-contract-trigger,.resize-contract-trigger:before,.resize-expand-trigger,.resize-triggers{content:"";position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}.resize-contract-trigger,.resize-expand-trigger{background:#eee;overflow:auto}.resize-contract-trigger:before{width:200%;height:200%}',_e=0,le=null;function et(e,t){e.__resize_mutation_handler__||(e.__resize_mutation_handler__=at.bind(e));var n=e.__resize_listeners__;if(!n){if(e.__resize_listeners__=[],window.ResizeObserver){var i=e.offsetWidth,u=e.offsetHeight,s=new ResizeObserver(function(){!e.__resize_observer_triggered__&&(e.__resize_observer_triggered__=!0,e.offsetWidth===i&&e.offsetHeight===u)||oe(e)}),o=fe(e),r=o.detached,a=o.rendered;e.__resize_observer_triggered__=r===!1&&a===!1,e.__resize_observer__=s,s.observe(e)}else if(e.attachEvent&&e.addEventListener)e.__resize_legacy_resize_handler__=function(){oe(e)},e.attachEvent("onresize",e.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);else if(_e||(le=Qe($e)),rt(e),e.__resize_rendered__=fe(e).rendered,window.MutationObserver){var l=new MutationObserver(e.__resize_mutation_handler__);l.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),e.__resize_mutation_observer__=l}}e.__resize_listeners__.push(t),_e++}function tt(e,t){var n=e.__resize_listeners__;if(n){if(t&&n.splice(n.indexOf(t),1),!n.length||!t){if(e.detachEvent&&e.removeEventListener){e.detachEvent("onresize",e.__resize_legacy_resize_handler__),document.removeEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);return}e.__resize_observer__?(e.__resize_observer__.unobserve(e),e.__resize_observer__.disconnect(),e.__resize_observer__=null):(e.__resize_mutation_observer__&&(e.__resize_mutation_observer__.disconnect(),e.__resize_mutation_observer__=null),e.removeEventListener("scroll",pe),e.removeChild(e.__resize_triggers__.triggers),e.__resize_triggers__=null),e.__resize_listeners__=null}!--_e&&le&&le.parentNode.removeChild(le)}}function nt(e){var t=e.__resize_last__,n=t.width,i=t.height,u=e.offsetWidth,s=e.offsetHeight;return u!==n||s!==i?{width:u,height:s}:null}function at(){var e=fe(this),t=e.rendered,n=e.detached;t!==this.__resize_rendered__&&(!n&&this.__resize_triggers__&&(he(this),this.addEventListener("scroll",pe,!0)),this.__resize_rendered__=t,oe(this))}function pe(){var e=this;he(this),this.__resize_raf__&&Xe(this.__resize_raf__),this.__resize_raf__=Ze(function(){var t=nt(e);t&&(e.__resize_last__=t,oe(e))})}function oe(e){!e||!e.__resize_listeners__||e.__resize_listeners__.forEach(function(t){t.call(e,e)})}function rt(e){var t=Le(e,"position");(!t||t==="static")&&(e.style.position="relative"),e.__resize_old_position__=t,e.__resize_last__={};var n=re("div",{className:"resize-triggers"}),i=re("div",{className:"resize-expand-trigger"}),u=re("div"),s=re("div",{className:"resize-contract-trigger"});i.appendChild(u),n.appendChild(i),n.appendChild(s),e.appendChild(n),e.__resize_triggers__={triggers:n,expand:i,expandChild:u,contract:s},he(e),e.addEventListener("scroll",pe,!0),e.__resize_last__={width:e.offsetWidth,height:e.offsetHeight}}function he(e){var t=e.__resize_triggers__,n=t.expand,i=t.expandChild,u=t.contract,s=u.scrollWidth,o=u.scrollHeight,r=n.offsetWidth,a=n.offsetHeight,l=n.scrollWidth,c=n.scrollHeight;u.scrollLeft=s,u.scrollTop=o,i.style.width=r+1+"px",i.style.height=a+1+"px",n.scrollLeft=l,n.scrollTop=c}var W=function(){return W=Object.assign||function(e){for(var t,n=1,i=arguments.length;n"u"||typeof customElements>"u")return $=!1;try{new Function("tag",`class EChartsElement extends HTMLElement { __dispose = null; @@ -13,5 +13,5 @@ import{u as G,c as S,r as b,o as m,b as V,y as q,t as F,k,a as E,w as z,j as J,z if (customElements.get(tag) == null) { customElements.define(tag, EChartsElement); } -`)(Ae)}catch{return $=!1}return $=!0}(),ft="ecTheme",_t="ecInitOptions",mt="ecUpdateOptions",ht=Re({name:"echarts",props:W(W({option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean},it),dt),emits:{},inheritAttrs:!1,setup:function(e,t){var n=t.attrs,o=ne(),u=ne(),s=ne(),i=ne(),r=ae(ft,null),a=ae(_t,null),l=ae(mt,null),c=Me(e),_=c.autoresize,C=c.manualUpdate,w=c.loading,h=c.loadingOptions,f=S(function(){return i.value||e.option||null}),v=S(function(){return e.theme||oe(r,{})}),D=S(function(){return e.initOptions||oe(a,{})}),x=S(function(){return e.updateOptions||oe(l,{})}),p=S(function(){return function(L){var O={};for(var j in L)ut(j)||(O[j]=L[j]);return O}(n)}),R=Pe().proxy.$listeners;function g(L){if(u.value){var O=s.value=Te(u.value,v.value,D.value);e.group&&(O.group=e.group);var j=R;j||(j={},Object.keys(n).filter(function(T){return T.indexOf("on")===0&&T.length>2}).forEach(function(T){var A=T.charAt(2).toLowerCase()+T.slice(3);A.substring(A.length-4)==="Once"&&(A="~".concat(A.substring(0,A.length-4))),j[A]=n[T]})),Object.keys(j).forEach(function(T){var A=j[T];if(A){var I=T.toLowerCase();I.charAt(0)==="~"&&(I=I.substring(1),A.__once__=!0);var B=O;if(I.indexOf("zr:")===0&&(B=O.getZr(),I=I.substring(3)),A.__once__){delete A.__once__;var X=A;A=function(){for(var Y=[],U=0;U(w(),"height: "+(n.app.panelMaximized?window.innerHeight-250+"px":t.height)));function c(h){return s.d(h,{dateStyle:u.value?"short":"long"})}function _(h,f){let v;return r.value.from&&f&&(v=r.value.from),r.value.to&&!f&&(v=r.value.to),!v&&!isNaN(h)&&(v=(D=>new Date(D.setDate(D.getDate()+(Number(h)||0))))(new Date)),v||(v=new Date(/.*T.*/.test(h)?h:h+"T00:00:00")),!r.value.from&&f&&(r.value.from=v),!r.value.to&&!f&&(r.value.to=v),v=new Date(v.getTime()-v.getTimezoneOffset()*60*1e3),v.toISOString().split("T")[0]}async function C(){let h=n.handleDefs(t.el.serie,["data","name","digits","suffix","type"],[null,"",0,"","line"],!0),f,v,D=[],x,p,R,g,d,P=[];if(h.length>0)for(const M of h){if(/^get.*/.test(M.data)){d="time",f=M.data.split(" ");for(const L of t.devices)L.split(":")[0]===f[1]&&(f[1]=L.split(":")[1]);if(f[4]=_(f[4],!0),f[5]=_(f[5],!1),v=await n.request("text",f.join(" ")),g=[],D=v.split(` -`),D.length>0)for(const L of D)x=L.split(" "),x.length>1&&(p=new Date(x[0].replace("_","T")),R=parseFloat(x[1]).toFixed(M.digits),g.push([p,R]))}else d="category",v=/,/.test(M.data)?M.data:M.data.replace(/ /g,","),/^\[.*\]$/.test(C)||(v="["+v+"]"),g=n.stringToJson(v);P.push({xAxisType:d,type:M.type,name:M.name,digits:M.digits,suffix:M.suffix,data:g})}return P}async function w(){let h={tooltip:{trigger:"axis"},legend:{data:[],bottom:10},backgroundColor:"rgba(255, 255, 255, 0)",grid:{top:30,bottom:60,left:60,right:60},animationDuration:300,series:[],yAxis:[],xAxis:{}},f,v=JSON.parse(JSON.stringify(n.getEl(t.el,["options"])||{})),D=JSON.parse(JSON.stringify(n.getEl(t.el,["options2"])||{})),x=Object.assign(h,n.app.panelMaximized&&Object.keys(D).length>0?D:v);r.value.fromMenu=!1,r.value.toMenu=!1,r.value.loaded=!1,a=await C();for(const[p,R]of Object.entries(a))f={formatter:g=>g.toLocaleString(s.locale.value,{minimumFractionDigits:R.digits,maximumFractionDigits:R.digits})+R.suffix},x.series[p]||(x.series[p]={}),x.yAxis[p]||(x.yAxis[p]={}),x.legend.data||(x.legend.data=[]),x.xAxis.type||(x.xAxis.type=R.xAxisType),x.series[p].name||(x.series[p].name=R.name),x.series[p].type||(x.series[p].type=R.type),x.series[p].data||(x.series[p].data=R.data),x.yAxis[p].type||(x.yAxis[p].type="value"),x.yAxis[p].axisLabel||(x.yAxis[p].axisLabel=f),x.legend.data[p]||(x.legend.data[p]=R.name);n.log(7,"Chartdata chart.loaded.",x),i.value=Object.assign({},x),r.value.loaded=!0}return(h,f)=>{const v=b("v-btn"),D=b("v-date-picker"),x=b("v-locale-provider"),p=b("v-menu"),R=b("v-skeleton-loader");return m(),V(Z,null,[K(n).app.panelMaximized?(m(),V("div",pt,[y(p,{modelValue:r.value.fromMenu,"onUpdate:modelValue":f[2]||(f[2]=g=>r.value.fromMenu=g),"close-on-content-click":!1},{activator:z(({props:g})=>[y(v,te(g,{variant:"outlined","append-icon":"mdi-calendar",class:"mr-2"}),{default:z(()=>[J(F(c(r.value.from)),1)]),_:2},1040)]),default:z(()=>[y(x,{locale:K(s).locale.value},{default:z(()=>[y(D,{modelValue:r.value.from,"onUpdate:modelValue":[f[0]||(f[0]=g=>r.value.from=g),f[1]||(f[1]=g=>w())],color:"secondary"},null,8,["modelValue"])]),_:1},8,["locale"])]),_:1},8,["modelValue"]),J(" - "),y(p,{modelValue:r.value.toMenu,"onUpdate:modelValue":f[5]||(f[5]=g=>r.value.toMenu=g),"close-on-content-click":!1},{activator:z(({props:g})=>[y(v,te(g,{variant:"outlined","append-icon":"mdi-calendar",class:"ml-2"}),{default:z(()=>[J(F(c(r.value.to)),1)]),_:2},1040)]),default:z(()=>[y(x,{locale:K(s).locale.value},{default:z(()=>[y(D,{modelValue:r.value.to,"onUpdate:modelValue":[f[3]||(f[3]=g=>r.value.to=g),f[4]||(f[4]=g=>w())],color:"secondary"},null,8,["modelValue"])]),_:1},8,["locale"])]),_:1},8,["modelValue"])])):k("",!0),De("div",{style:Ue(l.value)},[r.value.loaded?k("",!0):(m(),E(R,{key:0,type:"text, image, text"})),r.value.loaded?(m(),E(K(ht),{key:1,option:i.value,theme:K(o).global.name.value==="dark"?"dark":"light",autoresize:""},null,8,["option","theme"])):k("",!0)],4)],64)}}},xt=180/Math.PI,Ce=e=>{const t=e%360;return t<0?360+t:t},yt=({x:e,y:t},n)=>{const o=n.left+n.width/2,u=n.top+n.height/2;return Math.atan2(t-u,e-o)*xt},de=()=>{};class bt{constructor(t,n){this.active=!1,this.element=t,this.element.style.willChange="transform",this.initOptions(n),this.updateCSS(),this.bindHandlers(),this.addListeners()}get angle(){return this._angle}set angle(t){this._angle!==t&&(this._angle=Ce(t),this.updateCSS())}initOptions(t){t=t||{},this.onRotate=t.onRotate||de,this.onDragStart=t.onDragStart||de,this.onDragStop=t.onDragStop||de,this._angle=t.angle||0}bindHandlers(){this.onRotationStart=this.onRotationStart.bind(this),this.onRotated=this.onRotated.bind(this),this.onRotationStop=this.onRotationStop.bind(this)}addListeners(){this.element.addEventListener("touchstart",this.onRotationStart,{passive:!0}),document.addEventListener("touchmove",this.onRotated,{passive:!1}),document.addEventListener("touchend",this.onRotationStop,{passive:!0}),document.addEventListener("touchcancel",this.onRotationStop,{passive:!0}),this.element.addEventListener("mousedown",this.onRotationStart,{passive:!0}),document.addEventListener("mousemove",this.onRotated,{passive:!1}),document.addEventListener("mouseup",this.onRotationStop,{passive:!0}),document.addEventListener("mouseleave",this.onRotationStop,{passive:!1})}removeListeners(){this.element.removeEventListener("touchstart",this.onRotationStart),document.removeEventListener("touchmove",this.onRotated),document.removeEventListener("touchend",this.onRotationStop),document.removeEventListener("touchcancel",this.onRotationStop),this.element.removeEventListener("mousedown",this.onRotationStart),document.removeEventListener("mousemove",this.onRotated),document.removeEventListener("mouseup",this.onRotationStop),document.removeEventListener("mouseleave",this.onRotationStop)}destroy(){this.onRotationStop(),this.removeListeners()}onRotationStart(t){(t.type==="touchstart"||t.button===0)&&(this.active=!0,this.onDragStart(t),this.setAngleFromEvent(t))}onRotationStop(){this.active&&(this.active=!1,this.onDragStop()),this.active=!1}onRotated(t){this.active&&(t.preventDefault(),this.setAngleFromEvent(t))}setAngleFromEvent(t){const n=t.targetTouches?t.targetTouches[0]:t,o=yt({x:n.clientX,y:n.clientY},this.element.getBoundingClientRect());this._angle=Ce(o+90),this.updateCSS(),this.onRotate(this._angle)}updateCSS(){this.element.style.transform="rotate("+this._angle+"deg)"}}const wt=["red","yellow","green","cyan","blue","magenta","red"],Ee={ArrowUp:(e,t)=>e+t,ArrowRight:(e,t)=>e+t,ArrowDown:(e,t)=>e-t,ArrowLeft:(e,t)=>e-t,PageUp:(e,t)=>e+t*10,PageDown:(e,t)=>e-t*10,Home:()=>0,End:()=>359},se={name:"ColorPicker",emits:["select","input","change"],props:{hue:{default:0},saturation:{default:100},luminosity:{default:50},alpha:{default:1},step:{default:1},mouseScroll:{default:!1},variant:{default:"collapsible"},disabled:{default:!1},initiallyCollapsed:{default:!1},ariaLabel:{default:"color picker"},ariaRoledescription:{default:"radial slider"},ariaValuetext:{default:""},ariaLabelColorWell:{default:"color well"}},setup(e,{emit:t}){const n=N(null),o=N(null);let u=null;const s=e.hue+"deg",i=N(e.hue),r=N(!e.initiallyCollapsed),a=N(!e.initiallyCollapsed),l=N(!1),c=N(!1),_=N(!1),C=S(()=>`hsla(${i.value}, ${e.saturation}%, ${e.luminosity}%, ${e.alpha})`),w=S(()=>wt[Math.round(i.value/60)]);return Q(()=>e.hue,p=>{i.value=p,u.angle=p}),me(()=>{u=new bt(o.value,{angle:i.value,onRotate(p){i.value=p,t("input",i.value)},onDragStart(){_.value=!0},onDragStop(){_.value=!1,t("change",i.value)}})}),Oe(()=>{u.destroy(),u=null}),{rcp:u,el:n,rotator:o,initialAngle:s,angle:i,isPaletteIn:r,isKnobIn:a,isDragging:_,isRippling:c,isPressed:l,color:C,valuetext:w,onKeyDown:p=>{e.disabled||l.value||!a.value||!(p.key in Ee)||(p.preventDefault(),u.angle=Ee[p.key](u.angle,e.step),i.value=u.angle,t("input",i.value),t("change",i.value))},onScroll:p=>{l.value||!a.value||(p.preventDefault(),p.deltaY>0?u.angle+=e.step:u.angle-=e.step,i.value=u.angle,t("input",i.value),t("change",i.value))},selectColor:()=>{l.value=!0,r.value&&a.value?(t("select",i.value),c.value=!0):r.value=!0},togglePicker:()=>{e.variant!=="persistent"&&(a.value?a.value=!1:(a.value=!0,r.value=!0)),c.value=!1,l.value=!1},hidePalette:()=>{a.value||(r.value=!1)}}}};function zt(e,t,n,o,u,s){return m(),E("div",{ref:"el",role:"slider","aria-roledescription":n.ariaRoledescription,"aria-label":n.ariaLabel,"aria-expanded":o.isPaletteIn,"aria-valuemin":"0","aria-valuemax":"359","aria-valuenow":o.angle,"aria-valuetext":n.ariaValuetext||o.valuetext,"aria-disabled":n.disabled,class:["rcp",{dragging:o.isDragging,disabled:n.disabled}],tabindex:n.disabled?-1:0,style:{"--rcp-initial-angle":o.initialAngle},onKeyup:t[4]||(t[4]=qe((...i)=>o.selectColor&&o.selectColor(...i),["enter"])),onKeydown:t[5]||(t[5]=(...i)=>o.onKeyDown&&o.onKeyDown(...i))},[y("div",{class:["rcp__palette",o.isPaletteIn?"in":"out"]},null,2),y("div",te({class:"rcp__rotator",style:{"pointer-events":n.disabled||o.isPressed||!o.isKnobIn?"none":null}},He(n.mouseScroll?{wheel:o.onScroll}:{}),{ref:"rotator"}),[y("div",{class:["rcp__knob",o.isKnobIn?"in":"out"],onTransitionend:t[1]||(t[1]=(...i)=>o.hidePalette&&o.hidePalette(...i))},null,34)],16),y("div",{class:["rcp__ripple",{rippling:o.isRippling}],style:{borderColor:o.color}},null,6),y("button",{type:"button",class:["rcp__well",{pressed:o.isPressed}],"aria-label":n.ariaLabelColorWell,disabled:n.disabled,tabindex:n.disabled?-1:0,style:{backgroundColor:o.color},onAnimationend:t[2]||(t[2]=(...i)=>o.togglePicker&&o.togglePicker(...i)),onClick:t[3]||(t[3]=(...i)=>o.selectColor&&o.selectColor(...i))},null,46,["aria-label","disabled","tabindex"])],46,["aria-roledescription","aria-label","aria-expanded","aria-valuenow","aria-valuetext","aria-disabled","tabindex"])}se.render=zt;se.install=function(e){e.component("ColorPicker",se)};const kt={class:"mt-4 mb-2"},St={__name:"PanelMainColorpicker",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=G(),o=S(()=>n.handleDefs(t.el.picker,["cmd","current"],["",!1]));function u(r){let a=s(r,50,100),l=o.value.cmd,c=[];l=l.replace("%v",a);for(const _ of t.devices)c=_.split(":"),RegExp(c[0]).test(l)&&(l=l.replace(c[0],c[1]));n.request("text",l)}function s(r,a,l){a/=100;const c=l*Math.min(a,1-a)/100,_=C=>{const w=(C+r/30)%12,h=a-c*Math.max(Math.min(w-3,9-w,1),-1);return Math.round(255*h).toString(16).padStart(2,"0")};return`${_(0)}${_(8)}${_(4)}`}function i(r){r.split(" ").length>1&&(r=r.split(" ").slice(-1)[0]),r=r.replace(/^#/,"");let a=parseInt(r,16),l=a>>16&255,c=a>>8&255,_=a&255;l/=255,c/=255,_/=255;let C=Math.max(l,c,_),w=Math.min(l,c,_),h=C-w,f=(C+w)/2,v=0,D=0;return h!==0&&(C===l?v=((c-_)/h+(c<_?6:0))%6:C===c?v=((_-l)/h+2)%6:v=((l-c)/h+4)%6,v=v*60,D=h/(1-Math.abs(2*f-1))),D=Math.round(D*100),f=Math.round(f*100),{hue:v,saturation:D,luminosity:f}}return(r,a)=>(m(),V("div",kt,[y(K(se),te(i(o.value.current),{variant:"persistent",onChange:a[0]||(a[0]=l=>u(l))}),null,16)]))}},Ct={__name:"PanelMain",props:{main:Object,levels:Array,iconmap:Object,devices:Object},setup(e){const t=G();function n(r,a){return t.handleDefs(r[a].size,["size"],[!1]).size}function o(r){let a="";return["info"].indexOf(r)!==-1&&(a="mx-2"),a}function u(r,a){return r[a]?t.handleDefs(r[a].divider,["show"],[!1]).show:!1}function s(r){return r.level?t.handleDefs(r.level.height,["height"],["64px"]).height:"64px"}function i(r){if(r==="info")return We;if(r==="btn")return Ke;if(r==="slider")return Je;if(r==="image")return Ge;if(r==="menu")return Ye;if(r==="chart")return gt;if(r==="colorpicker")return St}return(r,a)=>{const l=b("v-sheet"),c=b("v-col"),_=b("v-divider"),C=b("v-row"),w=b("v-expand-transition");return m(!0),V(Z,null,ve(e.main,(h,f)=>(m(),V("div",{key:f},[y(w,null,{default:z(()=>[e.levels.indexOf(f)!==-1?(m(),E(C,{key:0,"no-gutters":"",class:"text-center align-center"},{default:z(()=>[y(l,{height:s(h,"level")},null,8,["height"]),(m(),V(Z,null,ve(["left1","left2","mid","right1","right2"],v=>(m(),V(Z,{key:v},[h.level[v]?(m(),E(c,{key:0,cols:n(h,v),class:q(o(h.level[v]))},{default:z(()=>[(m(),E(Be(i(h.level[v])),{el:h[v],iconmap:e.iconmap,devices:e.devices,height:s(h,"level")},null,8,["el","iconmap","devices","height"]))]),_:2},1032,["cols","class"])):k("",!0),u(h,v)?(m(),E(_,{key:1,vertical:""})):k("",!0)],64))),64)),u(h,"level")?(m(),E(_,{key:0})):k("",!0)]),_:2},1024)):k("",!0)]),_:2},1024)]))),128)}}},Dt={__name:"PanelCard",props:{panel:Object},setup(e){const t=e,n=G();let o=n.thread();me(()=>n.thread(o));function u(g){let d=n.handleDefs(t.panel.status[g],["level","color","min","max","reverse"],[0,"success",0,100,!1]);return d.level=Math.round((d.level-d.min)/(d.max-d.min)*100),d}const s=S(()=>u("bar")),i=S(()=>u("bar2")),r=S(()=>n.handleDefs(t.panel.status.imageUrl,["url"],[""])),a=S(()=>n.handleDefs(t.panel.panel.sortby,["sortby"],[null])),l=S(()=>n.handleDefs(t.panel.status.title,["title"],[""])),c=N(n.handleDefs(t.panel.panel.expandable,["expandable","expanded","maximizable"],[!1,!1,!1]));Q(t.panel.main,g=>{let d=_(g);c.value.activeLevels.join("-")!==d.join("-")&&(c.value.activeLevels=d,C())});function _(g){let d=[];for(const[P,M]of Object.entries(g))n.handleDefs(M.level.show,["show"],[!0]).show&&d.push(Number(P));return d}function C(g){let d=c.value,P;g&&(d.activeLevels=_(t.panel.main)),d.expandable&&!g&&(d.expanded=!d.expanded),d.expanded?d.levels=d.activeLevels:d.expandable||g?d.levels=[d.activeLevels[0]]:(P=d.activeLevels.indexOf(d.levels[0]),d.levels=[d.activeLevels[P+1]>=0?d.activeLevels[P+1]:d.activeLevels[0]]),d.icon=d.activeLevels.length>1?d.expandable?d.expanded?"mdi-arrow-collapse":"mdi-arrow-expand":d.expanded?"":"mdi-swap-vertical":""}function w(g){let d=n.handleDefs(t.panel.info[g],["text","icon","color"],["","",""]);return d.icon&&(d.icon=n.getIcon(d.icon,t.panel.panel.iconmap)),d}function h(g){let d=["left1","left2","mid1","mid2","right1","right2"],P=w(g);return w(d[d.indexOf(g)-1]).text&&P.text&&!P.icon?"ml-1 text-truncate":P.text?"text-truncate":""}const f=S(()=>w("left1")),v=S(()=>w("left2")),D=S(()=>w("mid1")),x=S(()=>w("mid2")),p=S(()=>w("right1")),R=S(()=>w("right2"));return C(!0),(g,d)=>{const P=b("v-progress-linear"),M=b("v-col"),L=b("v-row"),O=b("v-spacer"),j=b("v-btn"),H=b("v-card-title"),T=b("v-img"),A=b("v-sheet"),I=b("v-icon"),B=b("v-system-bar"),X=b("v-layout"),Y=b("v-card");return m(),E(Y,{variant:"tonal"},{default:z(()=>[y(L,{"no-gutters":""},{default:z(()=>[e.panel.status.bar?(m(),E(M,{key:0},{default:z(()=>[y(P,{height:"7",modelValue:s.value.level,"onUpdate:modelValue":d[0]||(d[0]=U=>s.value.level=U),color:s.value.color,reverse:s.value.reverse},null,8,["modelValue","color","reverse"])]),_:1})):k("",!0),e.panel.status.bar2?(m(),E(M,{key:1},{default:z(()=>[y(P,{height:"7",modelValue:i.value.level,"onUpdate:modelValue":d[1]||(d[1]=U=>i.value.level=U),color:i.value.color,reverse:i.value.reverse},null,8,["modelValue","color","reverse"])]),_:1})):k("",!0)]),_:1}),y(A,{color:"secondary"},{default:z(()=>[y(T,{src:r.value.url,gradient:r.value.url?K(n).app.header.imageGradient:"",height:"48",cover:""},{default:z(()=>[e.panel.status.title?(m(),E(H,{key:0},{default:z(()=>[y(L,{"no-gutters":""},{default:z(()=>[y(M,null,{default:z(()=>[J(F(l.value.title),1)]),_:1}),y(O),K(n).app.settings.loglevel>6?(m(),E(M,{key:0,class:"text-right"},{default:z(()=>[J(F(a.value.sortby),1)]),_:1})):k("",!0),c.value.icon?(m(),E(M,{key:1,cols:"1",class:"text-right"},{default:z(()=>[y(j,{icon:c.value.icon,size:"small",variant:"plain",density:"compact",onClick:d[2]||(d[2]=U=>C(!1))},null,8,["icon"])]),_:1})):k("",!0)]),_:1})]),_:1})):k("",!0)]),_:1},8,["src","gradient"])]),_:1}),y(Ct,{main:e.panel.main,levels:c.value.levels,iconmap:e.panel.panel.iconmap,devices:e.panel.panel.devices},null,8,["main","levels","iconmap","devices"]),y(X,{style:{height:"24px"}},{default:z(()=>[y(B,{color:"secondary"},{default:z(()=>[f.value.icon?(m(),E(I,{key:0,icon:f.value.icon,color:f.value.color},null,8,["icon","color"])):k("",!0),f.value.text?(m(),V("span",{key:1,class:q(h("left1"))},F(f.value.text),3)):k("",!0),v.value.icon?(m(),E(I,{key:2,icon:v.value.icon,color:v.value.color},null,8,["icon","color"])):k("",!0),v.value.text?(m(),V("span",{key:3,class:q(h("left2"))},F(v.value.text),3)):k("",!0),y(O),D.value.icon?(m(),E(I,{key:4,icon:D.value.icon,color:D.value.color},null,8,["icon","color"])):k("",!0),D.value.text?(m(),V("span",{key:5,class:q(h("mid1"))},F(D.value.text),3)):k("",!0),x.value.icon?(m(),E(I,{key:6,icon:x.value.icon,color:x.value.color},null,8,["icon","color"])):k("",!0),x.value.text?(m(),V("span",{key:7,class:q(h("mid2"))},F(x.value.text),3)):k("",!0),y(O),p.value.icon?(m(),E(I,{key:8,icon:p.value.icon,color:p.value.color},null,8,["icon","color"])):k("",!0),p.value.text?(m(),V("span",{key:9,class:q(h("right1"))},F(p.value.text),3)):k("",!0),R.value.icon?(m(),E(I,{key:10,icon:R.value.icon,color:R.value.color},null,8,["icon","color"])):k("",!0),R.value.text?(m(),V("span",{key:11,class:q(h("right2"))},F(R.value.text),3)):k("",!0)]),_:1})]),_:1})]),_:1})}}};export{Dt as _}; +`)(Ae)}catch{return $=!1}return $=!0}(),ft="ecTheme",_t="ecInitOptions",mt="ecUpdateOptions",pt=Re({name:"echarts",props:W(W({option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean},ot),dt),emits:{},inheritAttrs:!1,setup:function(e,t){var n=t.attrs,i=ne(),u=ne(),s=ne(),o=ne(),r=ae(ft,null),a=ae(_t,null),l=ae(mt,null),c=Me(e),_=c.autoresize,C=c.manualUpdate,w=c.loading,p=c.loadingOptions,f=S(function(){return o.value||e.option||null}),v=S(function(){return e.theme||ie(r,{})}),D=S(function(){return e.initOptions||ie(a,{})}),g=S(function(){return e.updateOptions||ie(l,{})}),h=S(function(){return function(L){var O={};for(var j in L)ut(j)||(O[j]=L[j]);return O}(n)}),R=Pe().proxy.$listeners;function x(L){if(u.value){var O=s.value=Te(u.value,v.value,D.value);e.group&&(O.group=e.group);var j=R;j||(j={},Object.keys(n).filter(function(T){return T.indexOf("on")===0&&T.length>2}).forEach(function(T){var A=T.charAt(2).toLowerCase()+T.slice(3);A.substring(A.length-4)==="Once"&&(A="~".concat(A.substring(0,A.length-4))),j[A]=n[T]})),Object.keys(j).forEach(function(T){var A=j[T];if(A){var I=T.toLowerCase();I.charAt(0)==="~"&&(I=I.substring(1),A.__once__=!0);var B=O;if(I.indexOf("zr:")===0&&(B=O.getZr(),I=I.substring(3)),A.__once__){delete A.__once__;var X=A;A=function(){for(var Y=[],U=0;U(w(),"height: "+(n.app.panelMaximized?window.innerHeight-250+"px":t.height)));function c(p){return s.d(p,{dateStyle:u.value?"short":"long"})}function _(p,f){let v;return r.value.from&&f&&(v=r.value.from),r.value.to&&!f&&(v=r.value.to),!v&&!isNaN(p)&&(v=(D=>new Date(D.setDate(D.getDate()+(Number(p)||0))))(new Date)),v||(v=new Date(/.*T.*/.test(p)?p:p+"T00:00:00")),!r.value.from&&f&&(r.value.from=v),!r.value.to&&!f&&(r.value.to=v),v=new Date(v.getTime()-v.getTimezoneOffset()*60*1e3),v.toISOString().split("T")[0]}async function C(){let p=n.handleDefs(t.el.serie,["data","name","digits","suffix","type"],[null,"",0,"","line"],!0),f,v,D=[],g,h,R,x,d,P=[];if(p.length>0)for(const M of p){if(/^get.*/.test(M.data)){d="time",f=M.data.split(" ");for(const L of t.devices)L.split(":")[0]===f[1]&&(f[1]=L.split(":")[1]);if(f[4]=_(f[4],!0),f[5]=_(f[5],!1),v=await n.request("text",f.join(" ")),x=[],D=v.split(` +`),D.length>0)for(const L of D)g=L.split(" "),g.length>1&&(h=new Date(g[0].replace("_","T")),R=parseFloat(g[1]).toFixed(M.digits),x.push([h,R]))}else d="category",v=/,/.test(M.data)?M.data:M.data.replace(/ /g,","),/^\[.*\]$/.test(C)||(v="["+v+"]"),x=n.stringToJson(v);P.push({xAxisType:d,type:M.type,name:M.name,digits:M.digits,suffix:M.suffix,data:x})}return P}async function w(){let p={tooltip:{trigger:"axis"},legend:{data:[],bottom:10},backgroundColor:"rgba(255, 255, 255, 0)",grid:{top:30,bottom:60,left:60,right:60},animationDuration:300,series:[],yAxis:[],xAxis:{}},f,v=JSON.parse(JSON.stringify(n.getEl(t.el,["options"])||{})),D=JSON.parse(JSON.stringify(n.getEl(t.el,["options2"])||{})),g=Object.assign(p,n.app.panelMaximized&&Object.keys(D).length>0?D:v);r.value.fromMenu=!1,r.value.toMenu=!1,r.value.loaded=!1,a=await C();for(const[h,R]of Object.entries(a))f={formatter:x=>x.toLocaleString(s.locale.value,{minimumFractionDigits:R.digits,maximumFractionDigits:R.digits})+R.suffix},g.series[h]||(g.series[h]={}),g.yAxis[h]||(g.yAxis[h]={}),g.legend.data||(g.legend.data=[]),g.xAxis.type||(g.xAxis.type=R.xAxisType),g.series[h].name||(g.series[h].name=R.name),g.series[h].type||(g.series[h].type=R.type),g.series[h].data||(g.series[h].data=R.data),g.yAxis[h].type||(g.yAxis[h].type="value"),g.yAxis[h].axisLabel||(g.yAxis[h].axisLabel=f),g.legend.data[h]||(g.legend.data[h]=R.name);n.log(7,"Chartdata chart.loaded.",g),o.value=Object.assign({},g),r.value.loaded=!0}return(p,f)=>{const v=b("v-btn"),D=b("v-date-picker"),g=b("v-locale-provider"),h=b("v-menu"),R=b("v-skeleton-loader");return m(),V(Z,null,[K(n).app.panelMaximized?(m(),V("div",ht,[y(h,{modelValue:r.value.fromMenu,"onUpdate:modelValue":f[2]||(f[2]=x=>r.value.fromMenu=x),"close-on-content-click":!1},{activator:z(({props:x})=>[y(v,te(x,{variant:"outlined","append-icon":"mdi-calendar",class:"mr-2"}),{default:z(()=>[J(F(c(r.value.from)),1)]),_:2},1040)]),default:z(()=>[y(g,{locale:K(s).locale.value},{default:z(()=>[y(D,{modelValue:r.value.from,"onUpdate:modelValue":[f[0]||(f[0]=x=>r.value.from=x),f[1]||(f[1]=x=>w())],color:"secondary"},null,8,["modelValue"])]),_:1},8,["locale"])]),_:1},8,["modelValue"]),J(" - "),y(h,{modelValue:r.value.toMenu,"onUpdate:modelValue":f[5]||(f[5]=x=>r.value.toMenu=x),"close-on-content-click":!1},{activator:z(({props:x})=>[y(v,te(x,{variant:"outlined","append-icon":"mdi-calendar",class:"ml-2"}),{default:z(()=>[J(F(c(r.value.to)),1)]),_:2},1040)]),default:z(()=>[y(g,{locale:K(s).locale.value},{default:z(()=>[y(D,{modelValue:r.value.to,"onUpdate:modelValue":[f[3]||(f[3]=x=>r.value.to=x),f[4]||(f[4]=x=>w())],color:"secondary"},null,8,["modelValue"])]),_:1},8,["locale"])]),_:1},8,["modelValue"])])):k("",!0),De("div",{style:Ue(l.value)},[r.value.loaded?k("",!0):(m(),E(R,{key:0,type:"text, image, text"})),r.value.loaded?(m(),E(K(pt),{key:1,option:o.value,theme:K(i).global.name.value==="dark"?"dark":"light",autoresize:""},null,8,["option","theme"])):k("",!0)],4)],64)}}},xt=180/Math.PI,Ce=e=>{const t=e%360;return t<0?360+t:t},yt=({x:e,y:t},n)=>{const i=n.left+n.width/2,u=n.top+n.height/2;return Math.atan2(t-u,e-i)*xt},de=()=>{};class bt{constructor(t,n){this.active=!1,this.element=t,this.element.style.willChange="transform",this.initOptions(n),this.updateCSS(),this.bindHandlers(),this.addListeners()}get angle(){return this._angle}set angle(t){this._angle!==t&&(this._angle=Ce(t),this.updateCSS())}initOptions(t){t=t||{},this.onRotate=t.onRotate||de,this.onDragStart=t.onDragStart||de,this.onDragStop=t.onDragStop||de,this._angle=t.angle||0}bindHandlers(){this.onRotationStart=this.onRotationStart.bind(this),this.onRotated=this.onRotated.bind(this),this.onRotationStop=this.onRotationStop.bind(this)}addListeners(){this.element.addEventListener("touchstart",this.onRotationStart,{passive:!0}),document.addEventListener("touchmove",this.onRotated,{passive:!1}),document.addEventListener("touchend",this.onRotationStop,{passive:!0}),document.addEventListener("touchcancel",this.onRotationStop,{passive:!0}),this.element.addEventListener("mousedown",this.onRotationStart,{passive:!0}),document.addEventListener("mousemove",this.onRotated,{passive:!1}),document.addEventListener("mouseup",this.onRotationStop,{passive:!0}),document.addEventListener("mouseleave",this.onRotationStop,{passive:!1})}removeListeners(){this.element.removeEventListener("touchstart",this.onRotationStart),document.removeEventListener("touchmove",this.onRotated),document.removeEventListener("touchend",this.onRotationStop),document.removeEventListener("touchcancel",this.onRotationStop),this.element.removeEventListener("mousedown",this.onRotationStart),document.removeEventListener("mousemove",this.onRotated),document.removeEventListener("mouseup",this.onRotationStop),document.removeEventListener("mouseleave",this.onRotationStop)}destroy(){this.onRotationStop(),this.removeListeners()}onRotationStart(t){(t.type==="touchstart"||t.button===0)&&(this.active=!0,this.onDragStart(t),this.setAngleFromEvent(t))}onRotationStop(){this.active&&(this.active=!1,this.onDragStop()),this.active=!1}onRotated(t){this.active&&(t.preventDefault(),this.setAngleFromEvent(t))}setAngleFromEvent(t){const n=t.targetTouches?t.targetTouches[0]:t,i=yt({x:n.clientX,y:n.clientY},this.element.getBoundingClientRect());this._angle=Ce(i+90),this.updateCSS(),this.onRotate(this._angle)}updateCSS(){this.element.style.transform="rotate("+this._angle+"deg)"}}const wt=["red","yellow","green","cyan","blue","magenta","red"],Ee={ArrowUp:(e,t)=>e+t,ArrowRight:(e,t)=>e+t,ArrowDown:(e,t)=>e-t,ArrowLeft:(e,t)=>e-t,PageUp:(e,t)=>e+t*10,PageDown:(e,t)=>e-t*10,Home:()=>0,End:()=>359},se={name:"ColorPicker",emits:["select","input","change"],props:{hue:{default:0},saturation:{default:100},luminosity:{default:50},alpha:{default:1},step:{default:1},mouseScroll:{default:!1},variant:{default:"collapsible"},disabled:{default:!1},initiallyCollapsed:{default:!1},ariaLabel:{default:"color picker"},ariaRoledescription:{default:"radial slider"},ariaValuetext:{default:""},ariaLabelColorWell:{default:"color well"}},setup(e,{emit:t}){const n=N(null),i=N(null);let u=null;const s=e.hue+"deg",o=N(e.hue),r=N(!e.initiallyCollapsed),a=N(!e.initiallyCollapsed),l=N(!1),c=N(!1),_=N(!1),C=S(()=>`hsla(${o.value}, ${e.saturation}%, ${e.luminosity}%, ${e.alpha})`),w=S(()=>wt[Math.round(o.value/60)]);return Q(()=>e.hue,h=>{o.value=h,u.angle=h}),me(()=>{u=new bt(i.value,{angle:o.value,onRotate(h){o.value=h,t("input",o.value)},onDragStart(){_.value=!0},onDragStop(){_.value=!1,t("change",o.value)}})}),Oe(()=>{u.destroy(),u=null}),{rcp:u,el:n,rotator:i,initialAngle:s,angle:o,isPaletteIn:r,isKnobIn:a,isDragging:_,isRippling:c,isPressed:l,color:C,valuetext:w,onKeyDown:h=>{e.disabled||l.value||!a.value||!(h.key in Ee)||(h.preventDefault(),u.angle=Ee[h.key](u.angle,e.step),o.value=u.angle,t("input",o.value),t("change",o.value))},onScroll:h=>{l.value||!a.value||(h.preventDefault(),h.deltaY>0?u.angle+=e.step:u.angle-=e.step,o.value=u.angle,t("input",o.value),t("change",o.value))},selectColor:()=>{l.value=!0,r.value&&a.value?(t("select",o.value),c.value=!0):r.value=!0},togglePicker:()=>{e.variant!=="persistent"&&(a.value?a.value=!1:(a.value=!0,r.value=!0)),c.value=!1,l.value=!1},hidePalette:()=>{a.value||(r.value=!1)}}}};function zt(e,t,n,i,u,s){return m(),E("div",{ref:"el",role:"slider","aria-roledescription":n.ariaRoledescription,"aria-label":n.ariaLabel,"aria-expanded":i.isPaletteIn,"aria-valuemin":"0","aria-valuemax":"359","aria-valuenow":i.angle,"aria-valuetext":n.ariaValuetext||i.valuetext,"aria-disabled":n.disabled,class:["rcp",{dragging:i.isDragging,disabled:n.disabled}],tabindex:n.disabled?-1:0,style:{"--rcp-initial-angle":i.initialAngle},onKeyup:t[4]||(t[4]=qe((...o)=>i.selectColor&&i.selectColor(...o),["enter"])),onKeydown:t[5]||(t[5]=(...o)=>i.onKeyDown&&i.onKeyDown(...o))},[y("div",{class:["rcp__palette",i.isPaletteIn?"in":"out"]},null,2),y("div",te({class:"rcp__rotator",style:{"pointer-events":n.disabled||i.isPressed||!i.isKnobIn?"none":null}},He(n.mouseScroll?{wheel:i.onScroll}:{}),{ref:"rotator"}),[y("div",{class:["rcp__knob",i.isKnobIn?"in":"out"],onTransitionend:t[1]||(t[1]=(...o)=>i.hidePalette&&i.hidePalette(...o))},null,34)],16),y("div",{class:["rcp__ripple",{rippling:i.isRippling}],style:{borderColor:i.color}},null,6),y("button",{type:"button",class:["rcp__well",{pressed:i.isPressed}],"aria-label":n.ariaLabelColorWell,disabled:n.disabled,tabindex:n.disabled?-1:0,style:{backgroundColor:i.color},onAnimationend:t[2]||(t[2]=(...o)=>i.togglePicker&&i.togglePicker(...o)),onClick:t[3]||(t[3]=(...o)=>i.selectColor&&i.selectColor(...o))},null,46,["aria-label","disabled","tabindex"])],46,["aria-roledescription","aria-label","aria-expanded","aria-valuenow","aria-valuetext","aria-disabled","tabindex"])}se.render=zt;se.install=function(e){e.component("ColorPicker",se)};const kt={class:"mt-4 mb-2"},St={__name:"PanelMainColorpicker",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=G(),i=S(()=>n.handleDefs(t.el.picker,["cmd","current"],["",!1]));function u(r){let a=s(r,50,100),l=i.value.cmd,c=[];l=l.replace("%v",a);for(const _ of t.devices)c=_.split(":"),RegExp(c[0]).test(l)&&(l=l.replace(c[0],c[1]));n.request("text",l)}function s(r,a,l){a/=100;const c=l*Math.min(a,1-a)/100,_=C=>{const w=(C+r/30)%12,p=a-c*Math.max(Math.min(w-3,9-w,1),-1);return Math.round(255*p).toString(16).padStart(2,"0")};return`${_(0)}${_(8)}${_(4)}`}function o(r){r.split(" ").length>1&&(r=r.split(" ").slice(-1)[0]),r=r.replace(/^#/,"");let a=parseInt(r,16),l=a>>16&255,c=a>>8&255,_=a&255;l/=255,c/=255,_/=255;let C=Math.max(l,c,_),w=Math.min(l,c,_),p=C-w,f=(C+w)/2,v=0,D=0;return p!==0&&(C===l?v=((c-_)/p+(c<_?6:0))%6:C===c?v=((_-l)/p+2)%6:v=((l-c)/p+4)%6,v=v*60,D=p/(1-Math.abs(2*f-1))),D=Math.round(D*100),f=Math.round(f*100),{hue:v,saturation:D,luminosity:f}}return(r,a)=>(m(),V("div",kt,[y(K(se),te(o(i.value.current),{variant:"persistent",onChange:a[0]||(a[0]=l=>u(l))}),null,16)]))}},Ct={__name:"PanelMain",props:{main:Object,levels:Array,iconmap:Object,devices:Object},setup(e){const t=G();function n(r,a){return t.handleDefs(r[a].size,["size"],[!1]).size}function i(r){let a="";return["info"].indexOf(r)!==-1&&(a="mx-2"),a}function u(r,a){return r[a]?t.handleDefs(r[a].divider,["show"],[!1]).show:!1}function s(r){return r.level?t.handleDefs(r.level.height,["height"],["64px"]).height:"64px"}function o(r){if(r==="info")return We;if(r==="btn")return Ke;if(r==="slider")return Je;if(r==="image")return Ge;if(r==="menu")return Ye;if(r==="chart")return gt;if(r==="colorpicker")return St}return(r,a)=>{const l=b("v-sheet"),c=b("v-col"),_=b("v-divider"),C=b("v-row"),w=b("v-expand-transition");return m(!0),V(Z,null,ve(e.main,(p,f)=>(m(),V("div",{key:f},[y(w,null,{default:z(()=>[e.levels.indexOf(f)!==-1?(m(),E(C,{key:0,"no-gutters":"",class:"text-center align-center"},{default:z(()=>[y(l,{height:s(p,"level")},null,8,["height"]),(m(),V(Z,null,ve(["left1","left2","mid","right1","right2"],v=>(m(),V(Z,{key:v},[p.level[v]?(m(),E(c,{key:0,cols:n(p,v),class:q(i(p.level[v]))},{default:z(()=>[(m(),E(Be(o(p.level[v])),{el:p[v],iconmap:e.iconmap,devices:e.devices,height:s(p,"level")},null,8,["el","iconmap","devices","height"]))]),_:2},1032,["cols","class"])):k("",!0),u(p,v)?(m(),E(_,{key:1,vertical:""})):k("",!0)],64))),64)),u(p,"level")?(m(),E(_,{key:0})):k("",!0)]),_:2},1024)):k("",!0)]),_:2},1024)]))),128)}}},Dt={__name:"PanelCard",props:{panel:Object},setup(e){const t=e,n=G();let i=n.thread();me(()=>n.thread(i));function u(x){let d=n.handleDefs(t.panel.status[x],["level","color","min","max","reverse"],[0,"success",0,100,!1]);return d.level=Math.round((d.level-d.min)/(d.max-d.min)*100),d}const s=S(()=>u("bar")),o=S(()=>u("bar2")),r=S(()=>n.handleDefs(t.panel.status.imageUrl,["url"],[""])),a=S(()=>n.handleDefs(t.panel.panel.sortby,["sortby"],[null])),l=S(()=>n.handleDefs(t.panel.status.title,["title"],[""])),c=N(n.handleDefs(t.panel.panel.expandable,["expandable","expanded","maximizable"],[!1,!1,!1]));Q(t.panel.main,x=>{let d=_(x);c.value.activeLevels.join("-")!==d.join("-")&&(c.value.activeLevels=d,C(!0))});function _(x){let d=[];for(const[P,M]of Object.entries(x))n.handleDefs(M.level.show,["show"],[!0]).show&&d.push(Number(P));return d}function C(x){let d=c.value,P;x?d.activeLevels=_(t.panel.main):(d.expandable&&(d.expanded=!d.expanded),d.maximizable&&(n.app.panelMaximized=d.expanded?t.panel:!1)),d.expanded?d.levels=d.activeLevels:d.expandable||x?d.levels=[d.activeLevels[0]]:(P=d.activeLevels.indexOf(d.levels[0]),d.levels=[d.activeLevels[P+1]>=0?d.activeLevels[P+1]:d.activeLevels[0]]),d.activeLevels.length>1||d.maximizable?d.icon=d.expandable?d.expanded?"mdi-arrow-collapse":"mdi-arrow-expand":d.expanded?"":"mdi-swap-vertical":d.icon=""}function w(x){let d=n.handleDefs(t.panel.info[x],["text","icon","color"],["","",""]);return d.icon&&(d.icon=n.getIcon(d.icon,t.panel.panel.iconmap)),d}function p(x){let d=["left1","left2","mid1","mid2","right1","right2"],P=w(x);return w(d[d.indexOf(x)-1]).text&&P.text&&!P.icon?"ml-1 text-truncate":P.text?"text-truncate":""}const f=S(()=>w("left1")),v=S(()=>w("left2")),D=S(()=>w("mid1")),g=S(()=>w("mid2")),h=S(()=>w("right1")),R=S(()=>w("right2"));return C(!0),(x,d)=>{const P=b("v-progress-linear"),M=b("v-col"),L=b("v-row"),O=b("v-spacer"),j=b("v-btn"),H=b("v-card-title"),T=b("v-img"),A=b("v-sheet"),I=b("v-icon"),B=b("v-system-bar"),X=b("v-layout"),Y=b("v-card");return m(),E(Y,{variant:"tonal"},{default:z(()=>[y(L,{"no-gutters":""},{default:z(()=>[e.panel.status.bar?(m(),E(M,{key:0},{default:z(()=>[y(P,{height:"7",modelValue:s.value.level,"onUpdate:modelValue":d[0]||(d[0]=U=>s.value.level=U),color:s.value.color,reverse:s.value.reverse},null,8,["modelValue","color","reverse"])]),_:1})):k("",!0),e.panel.status.bar2?(m(),E(M,{key:1},{default:z(()=>[y(P,{height:"7",modelValue:o.value.level,"onUpdate:modelValue":d[1]||(d[1]=U=>o.value.level=U),color:o.value.color,reverse:o.value.reverse},null,8,["modelValue","color","reverse"])]),_:1})):k("",!0)]),_:1}),y(A,{color:"secondary"},{default:z(()=>[y(T,{src:r.value.url,gradient:r.value.url?K(n).app.header.imageGradient:"",height:"48",cover:""},{default:z(()=>[e.panel.status.title?(m(),E(H,{key:0},{default:z(()=>[y(L,{"no-gutters":""},{default:z(()=>[y(M,null,{default:z(()=>[J(F(l.value.title),1)]),_:1}),y(O),K(n).app.settings.loglevel>6?(m(),E(M,{key:0,class:"text-right"},{default:z(()=>[J(F(a.value.sortby),1)]),_:1})):k("",!0),c.value.icon?(m(),E(M,{key:1,cols:"1",class:"text-right"},{default:z(()=>[y(j,{icon:c.value.icon,size:"small",variant:"plain",density:"compact",onClick:d[2]||(d[2]=U=>C(!1))},null,8,["icon"])]),_:1})):k("",!0)]),_:1})]),_:1})):k("",!0)]),_:1},8,["src","gradient"])]),_:1}),y(Ct,{main:e.panel.main,levels:c.value.levels,iconmap:e.panel.panel.iconmap,devices:e.panel.panel.devices},null,8,["main","levels","iconmap","devices"]),y(X,{style:{height:"24px"}},{default:z(()=>[y(B,{color:"secondary"},{default:z(()=>[f.value.icon?(m(),E(I,{key:0,icon:f.value.icon,color:f.value.color},null,8,["icon","color"])):k("",!0),f.value.text?(m(),V("span",{key:1,class:q(p("left1"))},F(f.value.text),3)):k("",!0),v.value.icon?(m(),E(I,{key:2,icon:v.value.icon,color:v.value.color},null,8,["icon","color"])):k("",!0),v.value.text?(m(),V("span",{key:3,class:q(p("left2"))},F(v.value.text),3)):k("",!0),y(O),D.value.icon?(m(),E(I,{key:4,icon:D.value.icon,color:D.value.color},null,8,["icon","color"])):k("",!0),D.value.text?(m(),V("span",{key:5,class:q(p("mid1"))},F(D.value.text),3)):k("",!0),g.value.icon?(m(),E(I,{key:6,icon:g.value.icon,color:g.value.color},null,8,["icon","color"])):k("",!0),g.value.text?(m(),V("span",{key:7,class:q(p("mid2"))},F(g.value.text),3)):k("",!0),y(O),h.value.icon?(m(),E(I,{key:8,icon:h.value.icon,color:h.value.color},null,8,["icon","color"])):k("",!0),h.value.text?(m(),V("span",{key:9,class:q(p("right1"))},F(h.value.text),3)):k("",!0),R.value.icon?(m(),E(I,{key:10,icon:R.value.icon,color:R.value.color},null,8,["icon","color"])):k("",!0),R.value.text?(m(),V("span",{key:11,class:q(p("right2"))},F(R.value.text),3)):k("",!0)]),_:1})]),_:1})]),_:1})}}};export{Dt as _}; diff --git a/www/fhemapp4/assets/SettingsView-83a39733.js b/www/fhemapp4/assets/SettingsView-4ee281ea.js similarity index 99% rename from www/fhemapp4/assets/SettingsView-83a39733.js rename to www/fhemapp4/assets/SettingsView-4ee281ea.js index 50d945fc..7759f5c2 100644 --- a/www/fhemapp4/assets/SettingsView-83a39733.js +++ b/www/fhemapp4/assets/SettingsView-4ee281ea.js @@ -1,4 +1,4 @@ -import{u as tt,f as Ne,g as ar,r as V,o as G,a as X,w as T,e as E,h as z,b as ze,F as Xe,d as st,i as Nn,j as _e,t as et,k as re,l as Or,m as mt,c as De,n as Cr,v as Tr,p as ir,q as lr,s as wr,x as Pr}from"./index-1b2ccf17.js";import{c as An,g as Dr,r as Ar,a as $r,u as Fr,V as Rr}from"./index-769e4e34.js";import{_ as Vr}from"./PanelCard-bac08c4a.js";const de="_app.settings.header.",jr={__name:"SettingsHeader",setup(s){const t=tt(),n={required:r=>!!r||t.replacer("%t(_app.settings.rules.required)")},i=Ne(),o=ar({name:"",title:"",icon:"",cmd:""});function u(){t.app.config.header.commands||(t.app.config.header.commands=[]),t.app.config.header.commands.push(JSON.parse(JSON.stringify(o))),i.value.reset()}function e(r){t.app.config.header.commands.splice(r,1)}return(r,a)=>{const l=V("v-btn"),d=V("v-list-item"),c=V("v-text-field"),v=V("v-col"),m=V("v-checkbox"),f=V("v-row"),g=V("v-divider"),y=V("v-form"),S=V("v-list");return G(),X(S,null,{default:T(()=>[E(d,{title:r.$t(de+"barTitle")},{append:T(()=>[E(l,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:a[0]||(a[0]=p=>z(t).help("kopfzeile"))})]),_:1},8,["title"]),E(d,null,{default:T(()=>[E(f,{"no-gutters":""},{default:T(()=>[E(v,{cols:"12",lg:"4",class:"pt-3 pr-3"},{default:T(()=>[E(c,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(de+"imageUrlPlaceholder"),label:r.$t(de+"imageUrl"),modelValue:z(t).app.config.header.imageUrl,"onUpdate:modelValue":a[1]||(a[1]=p=>z(t).app.config.header.imageUrl=p)},null,8,["placeholder","label","modelValue"])]),_:1}),E(v,{cols:"12",lg:"4",class:"pt-3 pr-3"},{default:T(()=>[E(c,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(de+"imageGradientPlaceholder"),label:r.$t(de+"imageGradient"),modelValue:z(t).app.config.header.imageGradient,"onUpdate:modelValue":a[2]||(a[2]=p=>z(t).app.config.header.imageGradient=p)},null,8,["placeholder","label","modelValue"])]),_:1}),E(v,{cols:"6",lg:"",class:"pt-1"},{default:T(()=>[E(m,{hint:r.$t(de+"showTimeHint"),label:r.$t(de+"showTime"),modelValue:z(t).app.config.header.showTime,"onUpdate:modelValue":a[3]||(a[3]=p=>z(t).app.config.header.showTime=p)},null,8,["hint","label","modelValue"])]),_:1}),E(v,{cols:"6",lg:"",class:"pt-1"},{default:T(()=>[E(m,{hint:r.$t(de+"showDateHint"),label:r.$t(de+"showDate"),modelValue:z(t).app.config.header.showDate,"onUpdate:modelValue":a[4]||(a[4]=p=>z(t).app.config.header.showDate=p)},null,8,["hint","label","modelValue"])]),_:1}),E(v,{cols:"6",lg:"",class:"pt-1"},{default:T(()=>[E(m,{hint:r.$t(de+"showTitleHint"),label:r.$t(de+"showTitle"),modelValue:z(t).app.config.header.showTitle,"onUpdate:modelValue":a[5]||(a[5]=p=>z(t).app.config.header.showTitle=p)},null,8,["hint","label","modelValue"])]),_:1})]),_:1})]),_:1}),E(g),E(d,{title:r.$t(de+"optionsTitle")},{append:T(()=>[E(l,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:a[6]||(a[6]=p=>z(t).help("optionsmenü"))})]),_:1},8,["title"]),E(d,null,{default:T(()=>[E(f,{"no-gutters":""},{default:T(()=>[E(v,{cols:"6",lg:""},{default:T(()=>[E(m,{label:r.$t(de+"showDarkMode"),modelValue:z(t).app.config.header.showDarkMode,"onUpdate:modelValue":a[7]||(a[7]=p=>z(t).app.config.header.showDarkMode=p)},null,8,["label","modelValue"])]),_:1}),E(v,{cols:"6",lg:""},{default:T(()=>[E(m,{label:r.$t(de+"showReloadPage"),modelValue:z(t).app.config.header.showReloadPage,"onUpdate:modelValue":a[8]||(a[8]=p=>z(t).app.config.header.showReloadPage=p)},null,8,["label","modelValue"])]),_:1}),E(v,{cols:"6",lg:""},{default:T(()=>[E(m,{label:r.$t(de+"showSettings"),modelValue:z(t).app.config.header.showSettings,"onUpdate:modelValue":a[9]||(a[9]=p=>z(t).app.config.header.showSettings=p)},null,8,["label","modelValue"])]),_:1}),E(v,{cols:"6",lg:""},{default:T(()=>[E(m,{label:r.$t(de+"showLanguages"),modelValue:z(t).app.config.header.showLanguages,"onUpdate:modelValue":a[10]||(a[10]=p=>z(t).app.config.header.showLanguages=p)},null,8,["label","modelValue"])]),_:1})]),_:1})]),_:1}),E(g),E(d,{title:r.$t(de+"optionsCommandTitle")},{append:T(()=>[E(l,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:a[11]||(a[11]=p=>z(t).help("optionsmenü-fhem-befehle"))})]),_:1},8,["title"]),(G(!0),ze(Xe,null,st(z(t).app.config.header.commands,(p,h)=>(G(),X(d,{key:h},{default:T(()=>[E(f,{"no-gutters":""},{default:T(()=>[E(v,{cols:"12",lg:"2",class:"pt-3 pr-3"},{default:T(()=>[E(c,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(de+"commandNamePlaceholder"),label:r.$t(de+"commandName"),rules:[n.required],modelValue:p.name,"onUpdate:modelValue":x=>p.name=x},null,8,["placeholder","label","rules","modelValue","onUpdate:modelValue"])]),_:2},1024),E(v,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:T(()=>[E(c,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(de+"commandTitlePlaceholder"),label:r.$t(de+"commandTitle"),rules:[n.required],modelValue:p.title,"onUpdate:modelValue":x=>p.title=x},null,8,["placeholder","label","rules","modelValue","onUpdate:modelValue"])]),_:2},1024),E(v,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:T(()=>[E(c,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(de+"commandIconPlaceholder"),label:r.$t(de+"commandIcon"),"append-inner-icon":p.icon,modelValue:p.icon,"onUpdate:modelValue":x=>p.icon=x},null,8,["placeholder","label","append-inner-icon","modelValue","onUpdate:modelValue"])]),_:2},1024),E(v,{cols:"10",lg:"3",class:"pt-3 pr-3"},{default:T(()=>[E(c,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(de+"commandCmdPlaceholder"),label:r.$t(de+"commandCmd"),rules:[n.required],modelValue:p.cmd,"onUpdate:modelValue":x=>p.cmd=x},null,8,["placeholder","label","rules","modelValue","onUpdate:modelValue"])]),_:2},1024),E(v,{class:"pt-3 text-right"},{default:T(()=>[E(l,{variant:"text",icon:"mdi-delete",onClick:x=>e(h)},null,8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128)),E(d,null,{default:T(()=>[E(y,{ref_key:"form",ref:i},{default:T(()=>[E(f,{"no-gutters":""},{default:T(()=>[E(v,{cols:"12",lg:"2",class:"pt-3 pr-3"},{default:T(()=>[E(c,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(de+"commandNamePlaceholder"),label:r.$t(de+"commandName"),rules:[n.required],modelValue:o.name,"onUpdate:modelValue":a[12]||(a[12]=p=>o.name=p)},null,8,["placeholder","label","rules","modelValue"])]),_:1}),E(v,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:T(()=>[E(c,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(de+"commandTitlePlaceholder"),label:r.$t(de+"commandTitle"),rules:[n.required],modelValue:o.title,"onUpdate:modelValue":a[13]||(a[13]=p=>o.title=p)},null,8,["placeholder","label","rules","modelValue"])]),_:1}),E(v,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:T(()=>[E(c,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(de+"commandIconPlaceholder"),label:r.$t(de+"commandIcon"),"append-inner-icon":o.icon,modelValue:o.icon,"onUpdate:modelValue":a[14]||(a[14]=p=>o.icon=p)},null,8,["placeholder","label","append-inner-icon","modelValue"])]),_:1}),E(v,{cols:"9",lg:"3",class:"pt-3 pr-3"},{default:T(()=>[E(c,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(de+"commandCmdPlaceholder"),label:r.$t(de+"commandCmd"),rules:[n.required],modelValue:o.cmd,"onUpdate:modelValue":a[15]||(a[15]=p=>o.cmd=p)},null,8,["placeholder","label","rules","modelValue"])]),_:1}),E(v,{class:"pt-3 text-right"},{default:T(()=>[E(l,{variant:"text",icon:"mdi-cancel",onClick:a[16]||(a[16]=p=>i.value.reset())}),E(l,{variant:"text",icon:"mdi-plus",disabled:!o.name||!o.title||!o.cmd,onClick:a[17]||(a[17]=p=>u())},null,8,["disabled"])]),_:1})]),_:1})]),_:1},512)]),_:1})]),_:1})}}},be="_app.settings.navigation.",Nr={__name:"SettingsNavigation",setup(s){const{mobile:t}=Nn(),n=tt(),i=ar({path:[],route:["navigation"],items:[],newItem:{name:null,title:null,icon:null,divider:!1,groupAsChips:!1,sort:!1,group:[]}}),o=Ne(),u={required:c=>!!c||n.replacer("%t(_app.settings.rules.required)")};function e(c){typeof c<"u"&&(i.path.push(c,"group"),i.route.push(i.items[c].name)),i.items=n.getEl(n.app.config.navigation,i.path)}function r(){let c=JSON.parse(JSON.stringify(i.newItem));n.getEl(n.app.config.navigation,i.path).push(c),e(),o.value.reset()}function a(c){n.getEl(n.app.config.navigation,i.path).splice(c,1)}function l(c){return(n.getEl(i.items[c],["group"])||[]).length}function d(){i.route.pop(),i.path.splice(-2,2),e()}return e(),(c,v)=>{const m=V("v-btn"),f=V("v-list-item"),g=V("v-text-field"),y=V("v-col"),S=V("v-checkbox"),p=V("v-icon"),h=V("v-badge"),x=V("v-row"),C=V("v-divider"),I=V("v-form"),D=V("v-list");return G(),X(D,null,{default:T(()=>[E(f,{title:c.$t(be+"title")},{append:T(()=>[E(m,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:v[0]||(v[0]=O=>z(n).help("navigation"))})]),_:1},8,["title"]),i.path.length>0?(G(),X(f,{key:0},{default:T(()=>[E(m,{variant:"text",icon:"mdi-arrow-up-left",onClick:v[1]||(v[1]=O=>d())}),_e(" "+et(i.route.join(" > ")),1)]),_:1})):re("",!0),(G(!0),ze(Xe,null,st(i.items,(O,b)=>(G(),X(f,{key:b},{default:T(()=>[E(x,{"no-gutters":""},{default:T(()=>[E(y,{cols:"12",lg:"2",class:"pt-3 pr-3"},{default:T(()=>[E(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:c.$t(be+"namePlaceholder"),label:c.$t(be+"name"),rules:[u.required],modelValue:O.name,"onUpdate:modelValue":$=>O.name=$},null,8,["placeholder","label","rules","modelValue","onUpdate:modelValue"])]),_:2},1024),E(y,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:T(()=>[E(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:c.$t(be+"title1Placeholder"),label:c.$t(be+"title1"),modelValue:O.title,"onUpdate:modelValue":$=>O.title=$},null,8,["placeholder","label","modelValue","onUpdate:modelValue"])]),_:2},1024),E(y,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:T(()=>[E(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:c.$t(be+"iconPlaceholder"),label:c.$t(be+"icon"),"append-inner-icon":O.icon,modelValue:O.icon,"onUpdate:modelValue":$=>O.icon=$},null,8,["placeholder","label","append-inner-icon","modelValue","onUpdate:modelValue"])]),_:2},1024),E(y,{cols:4,lg:"",class:"pt-1"},{default:T(()=>[E(S,{hint:c.$t(be+"groupAsChipsHint"),label:c.$t(be+"groupAsChips"),modelValue:O.groupAsChips,"onUpdate:modelValue":$=>O.groupAsChips=$},null,8,["hint","label","modelValue","onUpdate:modelValue"])]),_:2},1024),E(y,{cols:4,lg:"",class:"pt-1"},{default:T(()=>[E(S,{hint:c.$t(be+"sortHint"),label:c.$t(be+"sort"),modelValue:O.sort,"onUpdate:modelValue":$=>O.sort=$},null,8,["hint","label","modelValue","onUpdate:modelValue"])]),_:2},1024),E(y,{cols:"4",lg:"",class:"pt-1"},{default:T(()=>[E(S,{hint:c.$t(be+"dividerHint"),label:c.$t(be+"divider"),modelValue:O.divider,"onUpdate:modelValue":$=>O.divider=$},null,8,["hint","label","modelValue","onUpdate:modelValue"])]),_:2},1024),E(y,{class:"pt-3 text-right"},{default:T(()=>[E(m,{variant:"text",icon:"",onClick:$=>e(b)},{default:T(()=>[l(b)>0?(G(),X(h,{key:0,color:"success",content:l(b)},{default:T(()=>[E(p,{icon:"mdi-arrow-down-right"})]),_:2},1032,["content"])):re("",!0),l(b)===0?(G(),X(p,{key:1,icon:"mdi-arrow-down-right"})):re("",!0)]),_:2},1032,["onClick"]),E(m,{variant:"text",icon:"mdi-delete",onClick:$=>a(b)},null,8,["onClick"])]),_:2},1024)]),_:2},1024),z(t)?(G(),X(C,{key:0})):re("",!0)]),_:2},1024))),128)),E(f,null,{default:T(()=>[E(I,{ref_key:"form",ref:o},{default:T(()=>[E(x,{"no-gutters":""},{default:T(()=>[E(y,{cols:"12",lg:"2",class:"pt-3 pr-3"},{default:T(()=>[E(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:c.$t(be+"namePlaceholder"),label:c.$t(be+"name"),rules:[u.required],modelValue:i.newItem.name,"onUpdate:modelValue":v[2]||(v[2]=O=>i.newItem.name=O)},null,8,["placeholder","label","rules","modelValue"])]),_:1}),E(y,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:T(()=>[E(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:c.$t(be+"title1Placeholder"),label:c.$t(be+"title1"),modelValue:i.newItem.title,"onUpdate:modelValue":v[3]||(v[3]=O=>i.newItem.title=O)},null,8,["placeholder","label","modelValue"])]),_:1}),E(y,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:T(()=>[E(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:c.$t(be+"iconPlaceholder"),label:c.$t(be+"icon"),"append-inner-icon":i.newItem.icon,modelValue:i.newItem.icon,"onUpdate:modelValue":v[4]||(v[4]=O=>i.newItem.icon=O)},null,8,["placeholder","label","append-inner-icon","modelValue"])]),_:1}),E(y,{cols:"4",lg:"",class:"pt-1"},{default:T(()=>[E(S,{hint:c.$t(be+"groupAsChipsHint"),label:c.$t(be+"groupAsChips"),modelValue:i.newItem.groupAsChips,"onUpdate:modelValue":v[5]||(v[5]=O=>i.newItem.groupAsChips=O)},null,8,["hint","label","modelValue"])]),_:1}),E(y,{cols:"4",lg:"",class:"pt-1"},{default:T(()=>[E(S,{hint:c.$t(be+"sortHint"),label:c.$t(be+"sort"),modelValue:i.newItem.sort,"onUpdate:modelValue":v[6]||(v[6]=O=>i.newItem.sort=O)},null,8,["hint","label","modelValue"])]),_:1}),E(y,{cols:"4",lg:"",class:"pt-1"},{default:T(()=>[E(S,{hint:c.$t(be+"dividerHint"),label:c.$t(be+"divider"),modelValue:i.newItem.divider,"onUpdate:modelValue":v[7]||(v[7]=O=>i.newItem.divider=O)},null,8,["hint","label","modelValue"])]),_:1}),E(y,{class:"pt-3 text-right"},{default:T(()=>[E(m,{variant:"text",icon:"mdi-cancel",onClick:v[8]||(v[8]=O=>o.value.reset())}),E(m,{variant:"text",icon:"mdi-plus",disabled:!i.newItem.name,onClick:v[9]||(v[9]=O=>r())},null,8,["disabled"])]),_:1})]),_:1})]),_:1},512)]),_:1})]),_:1})}}};function Gt(){return Gt=Object.assign||function(s){for(var t=1;t";return t},lineNumbersCount:function(){var t=this.codeData.split(/\r\n|\n/).length;return t}},mounted:function(){this._recordCurrentState(),this.styleLineNumbers()},methods:{setLineNumbersHeight:function(){this.lineNumbersHeight=getComputedStyle(this.$refs.pre).height},styleLineNumbers:function(){if(!(!this.lineNumbers||!this.autoStyleLineNumbers)){var t=this.$refs.pre,n=this.$el.querySelector(".prism-editor__line-numbers"),i=window.getComputedStyle(t);this.$nextTick(function(){var o="border-top-left-radius",u="border-bottom-left-radius";if(n){n.style[o]=i[o],n.style[u]=i[u],t.style[o]="0",t.style[u]="0";var e=["background-color","margin-top","padding-top","font-family","font-size","line-height"];e.forEach(function(r){n.style[r]=i[r]}),n.style["margin-bottom"]="-"+i["padding-top"]}})}},_recordCurrentState:function(){var t=this.$refs.textarea;if(t){var n=t.value,i=t.selectionStart,o=t.selectionEnd;this._recordChange({value:n,selectionStart:i,selectionEnd:o})}},_getLines:function(t,n){return t.substring(0,n).split(` +import{u as tt,f as Ne,g as ar,r as V,o as G,a as X,w as T,e as E,h as z,b as ze,F as Xe,d as st,i as Nn,j as _e,t as et,k as re,l as Or,m as mt,c as De,n as Cr,v as Tr,p as ir,q as lr,s as wr,x as Pr}from"./index-6f0816ee.js";import{c as An,g as Dr,r as Ar,a as $r,u as Fr,V as Rr}from"./index-ed8cb710.js";import{_ as Vr}from"./PanelCard-05a2c8b0.js";const de="_app.settings.header.",jr={__name:"SettingsHeader",setup(s){const t=tt(),n={required:r=>!!r||t.replacer("%t(_app.settings.rules.required)")},i=Ne(),o=ar({name:"",title:"",icon:"",cmd:""});function u(){t.app.config.header.commands||(t.app.config.header.commands=[]),t.app.config.header.commands.push(JSON.parse(JSON.stringify(o))),i.value.reset()}function e(r){t.app.config.header.commands.splice(r,1)}return(r,a)=>{const l=V("v-btn"),d=V("v-list-item"),c=V("v-text-field"),v=V("v-col"),m=V("v-checkbox"),f=V("v-row"),g=V("v-divider"),y=V("v-form"),S=V("v-list");return G(),X(S,null,{default:T(()=>[E(d,{title:r.$t(de+"barTitle")},{append:T(()=>[E(l,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:a[0]||(a[0]=p=>z(t).help("kopfzeile"))})]),_:1},8,["title"]),E(d,null,{default:T(()=>[E(f,{"no-gutters":""},{default:T(()=>[E(v,{cols:"12",lg:"4",class:"pt-3 pr-3"},{default:T(()=>[E(c,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(de+"imageUrlPlaceholder"),label:r.$t(de+"imageUrl"),modelValue:z(t).app.config.header.imageUrl,"onUpdate:modelValue":a[1]||(a[1]=p=>z(t).app.config.header.imageUrl=p)},null,8,["placeholder","label","modelValue"])]),_:1}),E(v,{cols:"12",lg:"4",class:"pt-3 pr-3"},{default:T(()=>[E(c,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(de+"imageGradientPlaceholder"),label:r.$t(de+"imageGradient"),modelValue:z(t).app.config.header.imageGradient,"onUpdate:modelValue":a[2]||(a[2]=p=>z(t).app.config.header.imageGradient=p)},null,8,["placeholder","label","modelValue"])]),_:1}),E(v,{cols:"6",lg:"",class:"pt-1"},{default:T(()=>[E(m,{hint:r.$t(de+"showTimeHint"),label:r.$t(de+"showTime"),modelValue:z(t).app.config.header.showTime,"onUpdate:modelValue":a[3]||(a[3]=p=>z(t).app.config.header.showTime=p)},null,8,["hint","label","modelValue"])]),_:1}),E(v,{cols:"6",lg:"",class:"pt-1"},{default:T(()=>[E(m,{hint:r.$t(de+"showDateHint"),label:r.$t(de+"showDate"),modelValue:z(t).app.config.header.showDate,"onUpdate:modelValue":a[4]||(a[4]=p=>z(t).app.config.header.showDate=p)},null,8,["hint","label","modelValue"])]),_:1}),E(v,{cols:"6",lg:"",class:"pt-1"},{default:T(()=>[E(m,{hint:r.$t(de+"showTitleHint"),label:r.$t(de+"showTitle"),modelValue:z(t).app.config.header.showTitle,"onUpdate:modelValue":a[5]||(a[5]=p=>z(t).app.config.header.showTitle=p)},null,8,["hint","label","modelValue"])]),_:1})]),_:1})]),_:1}),E(g),E(d,{title:r.$t(de+"optionsTitle")},{append:T(()=>[E(l,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:a[6]||(a[6]=p=>z(t).help("optionsmenü"))})]),_:1},8,["title"]),E(d,null,{default:T(()=>[E(f,{"no-gutters":""},{default:T(()=>[E(v,{cols:"6",lg:""},{default:T(()=>[E(m,{label:r.$t(de+"showDarkMode"),modelValue:z(t).app.config.header.showDarkMode,"onUpdate:modelValue":a[7]||(a[7]=p=>z(t).app.config.header.showDarkMode=p)},null,8,["label","modelValue"])]),_:1}),E(v,{cols:"6",lg:""},{default:T(()=>[E(m,{label:r.$t(de+"showReloadPage"),modelValue:z(t).app.config.header.showReloadPage,"onUpdate:modelValue":a[8]||(a[8]=p=>z(t).app.config.header.showReloadPage=p)},null,8,["label","modelValue"])]),_:1}),E(v,{cols:"6",lg:""},{default:T(()=>[E(m,{label:r.$t(de+"showSettings"),modelValue:z(t).app.config.header.showSettings,"onUpdate:modelValue":a[9]||(a[9]=p=>z(t).app.config.header.showSettings=p)},null,8,["label","modelValue"])]),_:1}),E(v,{cols:"6",lg:""},{default:T(()=>[E(m,{label:r.$t(de+"showLanguages"),modelValue:z(t).app.config.header.showLanguages,"onUpdate:modelValue":a[10]||(a[10]=p=>z(t).app.config.header.showLanguages=p)},null,8,["label","modelValue"])]),_:1})]),_:1})]),_:1}),E(g),E(d,{title:r.$t(de+"optionsCommandTitle")},{append:T(()=>[E(l,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:a[11]||(a[11]=p=>z(t).help("optionsmenü-fhem-befehle"))})]),_:1},8,["title"]),(G(!0),ze(Xe,null,st(z(t).app.config.header.commands,(p,h)=>(G(),X(d,{key:h},{default:T(()=>[E(f,{"no-gutters":""},{default:T(()=>[E(v,{cols:"12",lg:"2",class:"pt-3 pr-3"},{default:T(()=>[E(c,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(de+"commandNamePlaceholder"),label:r.$t(de+"commandName"),rules:[n.required],modelValue:p.name,"onUpdate:modelValue":x=>p.name=x},null,8,["placeholder","label","rules","modelValue","onUpdate:modelValue"])]),_:2},1024),E(v,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:T(()=>[E(c,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(de+"commandTitlePlaceholder"),label:r.$t(de+"commandTitle"),rules:[n.required],modelValue:p.title,"onUpdate:modelValue":x=>p.title=x},null,8,["placeholder","label","rules","modelValue","onUpdate:modelValue"])]),_:2},1024),E(v,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:T(()=>[E(c,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(de+"commandIconPlaceholder"),label:r.$t(de+"commandIcon"),"append-inner-icon":p.icon,modelValue:p.icon,"onUpdate:modelValue":x=>p.icon=x},null,8,["placeholder","label","append-inner-icon","modelValue","onUpdate:modelValue"])]),_:2},1024),E(v,{cols:"10",lg:"3",class:"pt-3 pr-3"},{default:T(()=>[E(c,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(de+"commandCmdPlaceholder"),label:r.$t(de+"commandCmd"),rules:[n.required],modelValue:p.cmd,"onUpdate:modelValue":x=>p.cmd=x},null,8,["placeholder","label","rules","modelValue","onUpdate:modelValue"])]),_:2},1024),E(v,{class:"pt-3 text-right"},{default:T(()=>[E(l,{variant:"text",icon:"mdi-delete",onClick:x=>e(h)},null,8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128)),E(d,null,{default:T(()=>[E(y,{ref_key:"form",ref:i},{default:T(()=>[E(f,{"no-gutters":""},{default:T(()=>[E(v,{cols:"12",lg:"2",class:"pt-3 pr-3"},{default:T(()=>[E(c,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(de+"commandNamePlaceholder"),label:r.$t(de+"commandName"),rules:[n.required],modelValue:o.name,"onUpdate:modelValue":a[12]||(a[12]=p=>o.name=p)},null,8,["placeholder","label","rules","modelValue"])]),_:1}),E(v,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:T(()=>[E(c,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(de+"commandTitlePlaceholder"),label:r.$t(de+"commandTitle"),rules:[n.required],modelValue:o.title,"onUpdate:modelValue":a[13]||(a[13]=p=>o.title=p)},null,8,["placeholder","label","rules","modelValue"])]),_:1}),E(v,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:T(()=>[E(c,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(de+"commandIconPlaceholder"),label:r.$t(de+"commandIcon"),"append-inner-icon":o.icon,modelValue:o.icon,"onUpdate:modelValue":a[14]||(a[14]=p=>o.icon=p)},null,8,["placeholder","label","append-inner-icon","modelValue"])]),_:1}),E(v,{cols:"9",lg:"3",class:"pt-3 pr-3"},{default:T(()=>[E(c,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(de+"commandCmdPlaceholder"),label:r.$t(de+"commandCmd"),rules:[n.required],modelValue:o.cmd,"onUpdate:modelValue":a[15]||(a[15]=p=>o.cmd=p)},null,8,["placeholder","label","rules","modelValue"])]),_:1}),E(v,{class:"pt-3 text-right"},{default:T(()=>[E(l,{variant:"text",icon:"mdi-cancel",onClick:a[16]||(a[16]=p=>i.value.reset())}),E(l,{variant:"text",icon:"mdi-plus",disabled:!o.name||!o.title||!o.cmd,onClick:a[17]||(a[17]=p=>u())},null,8,["disabled"])]),_:1})]),_:1})]),_:1},512)]),_:1})]),_:1})}}},be="_app.settings.navigation.",Nr={__name:"SettingsNavigation",setup(s){const{mobile:t}=Nn(),n=tt(),i=ar({path:[],route:["navigation"],items:[],newItem:{name:null,title:null,icon:null,divider:!1,groupAsChips:!1,sort:!1,group:[]}}),o=Ne(),u={required:c=>!!c||n.replacer("%t(_app.settings.rules.required)")};function e(c){typeof c<"u"&&(i.path.push(c,"group"),i.route.push(i.items[c].name)),i.items=n.getEl(n.app.config.navigation,i.path)}function r(){let c=JSON.parse(JSON.stringify(i.newItem));n.getEl(n.app.config.navigation,i.path).push(c),e(),o.value.reset()}function a(c){n.getEl(n.app.config.navigation,i.path).splice(c,1)}function l(c){return(n.getEl(i.items[c],["group"])||[]).length}function d(){i.route.pop(),i.path.splice(-2,2),e()}return e(),(c,v)=>{const m=V("v-btn"),f=V("v-list-item"),g=V("v-text-field"),y=V("v-col"),S=V("v-checkbox"),p=V("v-icon"),h=V("v-badge"),x=V("v-row"),C=V("v-divider"),I=V("v-form"),D=V("v-list");return G(),X(D,null,{default:T(()=>[E(f,{title:c.$t(be+"title")},{append:T(()=>[E(m,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:v[0]||(v[0]=O=>z(n).help("navigation"))})]),_:1},8,["title"]),i.path.length>0?(G(),X(f,{key:0},{default:T(()=>[E(m,{variant:"text",icon:"mdi-arrow-up-left",onClick:v[1]||(v[1]=O=>d())}),_e(" "+et(i.route.join(" > ")),1)]),_:1})):re("",!0),(G(!0),ze(Xe,null,st(i.items,(O,b)=>(G(),X(f,{key:b},{default:T(()=>[E(x,{"no-gutters":""},{default:T(()=>[E(y,{cols:"12",lg:"2",class:"pt-3 pr-3"},{default:T(()=>[E(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:c.$t(be+"namePlaceholder"),label:c.$t(be+"name"),rules:[u.required],modelValue:O.name,"onUpdate:modelValue":$=>O.name=$},null,8,["placeholder","label","rules","modelValue","onUpdate:modelValue"])]),_:2},1024),E(y,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:T(()=>[E(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:c.$t(be+"title1Placeholder"),label:c.$t(be+"title1"),modelValue:O.title,"onUpdate:modelValue":$=>O.title=$},null,8,["placeholder","label","modelValue","onUpdate:modelValue"])]),_:2},1024),E(y,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:T(()=>[E(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:c.$t(be+"iconPlaceholder"),label:c.$t(be+"icon"),"append-inner-icon":O.icon,modelValue:O.icon,"onUpdate:modelValue":$=>O.icon=$},null,8,["placeholder","label","append-inner-icon","modelValue","onUpdate:modelValue"])]),_:2},1024),E(y,{cols:4,lg:"",class:"pt-1"},{default:T(()=>[E(S,{hint:c.$t(be+"groupAsChipsHint"),label:c.$t(be+"groupAsChips"),modelValue:O.groupAsChips,"onUpdate:modelValue":$=>O.groupAsChips=$},null,8,["hint","label","modelValue","onUpdate:modelValue"])]),_:2},1024),E(y,{cols:4,lg:"",class:"pt-1"},{default:T(()=>[E(S,{hint:c.$t(be+"sortHint"),label:c.$t(be+"sort"),modelValue:O.sort,"onUpdate:modelValue":$=>O.sort=$},null,8,["hint","label","modelValue","onUpdate:modelValue"])]),_:2},1024),E(y,{cols:"4",lg:"",class:"pt-1"},{default:T(()=>[E(S,{hint:c.$t(be+"dividerHint"),label:c.$t(be+"divider"),modelValue:O.divider,"onUpdate:modelValue":$=>O.divider=$},null,8,["hint","label","modelValue","onUpdate:modelValue"])]),_:2},1024),E(y,{class:"pt-3 text-right"},{default:T(()=>[E(m,{variant:"text",icon:"",onClick:$=>e(b)},{default:T(()=>[l(b)>0?(G(),X(h,{key:0,color:"success",content:l(b)},{default:T(()=>[E(p,{icon:"mdi-arrow-down-right"})]),_:2},1032,["content"])):re("",!0),l(b)===0?(G(),X(p,{key:1,icon:"mdi-arrow-down-right"})):re("",!0)]),_:2},1032,["onClick"]),E(m,{variant:"text",icon:"mdi-delete",onClick:$=>a(b)},null,8,["onClick"])]),_:2},1024)]),_:2},1024),z(t)?(G(),X(C,{key:0})):re("",!0)]),_:2},1024))),128)),E(f,null,{default:T(()=>[E(I,{ref_key:"form",ref:o},{default:T(()=>[E(x,{"no-gutters":""},{default:T(()=>[E(y,{cols:"12",lg:"2",class:"pt-3 pr-3"},{default:T(()=>[E(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:c.$t(be+"namePlaceholder"),label:c.$t(be+"name"),rules:[u.required],modelValue:i.newItem.name,"onUpdate:modelValue":v[2]||(v[2]=O=>i.newItem.name=O)},null,8,["placeholder","label","rules","modelValue"])]),_:1}),E(y,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:T(()=>[E(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:c.$t(be+"title1Placeholder"),label:c.$t(be+"title1"),modelValue:i.newItem.title,"onUpdate:modelValue":v[3]||(v[3]=O=>i.newItem.title=O)},null,8,["placeholder","label","modelValue"])]),_:1}),E(y,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:T(()=>[E(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:c.$t(be+"iconPlaceholder"),label:c.$t(be+"icon"),"append-inner-icon":i.newItem.icon,modelValue:i.newItem.icon,"onUpdate:modelValue":v[4]||(v[4]=O=>i.newItem.icon=O)},null,8,["placeholder","label","append-inner-icon","modelValue"])]),_:1}),E(y,{cols:"4",lg:"",class:"pt-1"},{default:T(()=>[E(S,{hint:c.$t(be+"groupAsChipsHint"),label:c.$t(be+"groupAsChips"),modelValue:i.newItem.groupAsChips,"onUpdate:modelValue":v[5]||(v[5]=O=>i.newItem.groupAsChips=O)},null,8,["hint","label","modelValue"])]),_:1}),E(y,{cols:"4",lg:"",class:"pt-1"},{default:T(()=>[E(S,{hint:c.$t(be+"sortHint"),label:c.$t(be+"sort"),modelValue:i.newItem.sort,"onUpdate:modelValue":v[6]||(v[6]=O=>i.newItem.sort=O)},null,8,["hint","label","modelValue"])]),_:1}),E(y,{cols:"4",lg:"",class:"pt-1"},{default:T(()=>[E(S,{hint:c.$t(be+"dividerHint"),label:c.$t(be+"divider"),modelValue:i.newItem.divider,"onUpdate:modelValue":v[7]||(v[7]=O=>i.newItem.divider=O)},null,8,["hint","label","modelValue"])]),_:1}),E(y,{class:"pt-3 text-right"},{default:T(()=>[E(m,{variant:"text",icon:"mdi-cancel",onClick:v[8]||(v[8]=O=>o.value.reset())}),E(m,{variant:"text",icon:"mdi-plus",disabled:!i.newItem.name,onClick:v[9]||(v[9]=O=>r())},null,8,["disabled"])]),_:1})]),_:1})]),_:1},512)]),_:1})]),_:1})}}};function Gt(){return Gt=Object.assign||function(s){for(var t=1;t";return t},lineNumbersCount:function(){var t=this.codeData.split(/\r\n|\n/).length;return t}},mounted:function(){this._recordCurrentState(),this.styleLineNumbers()},methods:{setLineNumbersHeight:function(){this.lineNumbersHeight=getComputedStyle(this.$refs.pre).height},styleLineNumbers:function(){if(!(!this.lineNumbers||!this.autoStyleLineNumbers)){var t=this.$refs.pre,n=this.$el.querySelector(".prism-editor__line-numbers"),i=window.getComputedStyle(t);this.$nextTick(function(){var o="border-top-left-radius",u="border-bottom-left-radius";if(n){n.style[o]=i[o],n.style[u]=i[u],t.style[o]="0",t.style[u]="0";var e=["background-color","margin-top","padding-top","font-family","font-size","line-height"];e.forEach(function(r){n.style[r]=i[r]}),n.style["margin-bottom"]="-"+i["padding-top"]}})}},_recordCurrentState:function(){var t=this.$refs.textarea;if(t){var n=t.value,i=t.selectionStart,o=t.selectionEnd;this._recordChange({value:n,selectionStart:i,selectionEnd:o})}},_getLines:function(t,n){return t.substring(0,n).split(` `)},_applyEdits:function(t){var n=this.$refs.textarea,i=this.history.stack[this.history.offset];i&&n&&(this.history.stack[this.history.offset]=Gt({},i,{selectionStart:n.selectionStart,selectionEnd:n.selectionEnd})),this._recordChange(t),this._updateInput(t)},_recordChange:function(t,n){n===void 0&&(n=!1);var i=this.history,o=i.stack,u=i.offset;if(o.length&&u>-1){this.history.stack=o.slice(0,u+1);var e=this.history.stack.length;if(e>Wn){var r=e-Wn;this.history.stack=o.slice(r,e),this.history.offset=Math.max(this.history.offset-r,0)}}var a=Date.now();if(n){var l=this.history.stack[this.history.offset];if(l&&a-l.timestamp=c&&F<=v&&K.startsWith(l)?K.substring(l.length):K}).join(` `);if(e!==m){var f=d[c];this._applyEdits({value:m,selectionStart:f.startsWith(l)?r-l.length:r,selectionEnd:a-(e.length-m.length)})}}else if(r!==a){var g=this._getLines(e,r),y=g.length-1,S=this._getLines(e,a).length-1,p=g[y];this._applyEdits({value:e.split(` diff --git a/www/fhemapp4/assets/index-1b2ccf17.js b/www/fhemapp4/assets/index-6f0816ee.js similarity index 99% rename from www/fhemapp4/assets/index-1b2ccf17.js rename to www/fhemapp4/assets/index-6f0816ee.js index b0053fdd..433284a0 100644 --- a/www/fhemapp4/assets/index-1b2ccf17.js +++ b/www/fhemapp4/assets/index-6f0816ee.js @@ -22,7 +22,7 @@ * vue-router v4.2.5 * (c) 2023 Eduardo San Martin Morote * @license MIT - */const Ku=typeof window<"u";function Z8(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const At=Object.assign;function L0(e,t){const n={};for(const r in t){const a=t[r];n[r]=Ga(a)?a.map(e):e(a)}return n}const md=()=>{},Ga=Array.isArray,j8=/\/$/,K8=e=>e.replace(j8,"");function E0(e,t,n="/"){let r,a={},i="",o="";const s=t.indexOf("#");let l=t.indexOf("?");return s=0&&(l=-1),l>-1&&(r=t.slice(0,l),i=t.slice(l+1,s>-1?s:t.length),a=e(i)),s>-1&&(r=r||t.slice(0,s),o=t.slice(s,t.length)),r=eY(r??t,n),{fullPath:r+(i&&"?")+i+o,path:r,query:a,hash:o}}function q8(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function HI(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function J8(e,t,n){const r=t.matched.length-1,a=n.matched.length-1;return r>-1&&r===a&&xc(t.matched[r],n.matched[a])&&fN(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function xc(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function fN(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Q8(e[n],t[n]))return!1;return!0}function Q8(e,t){return Ga(e)?WI(e,t):Ga(t)?WI(t,e):e===t}function WI(e,t){return Ga(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function eY(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),a=r[r.length-1];(a===".."||a===".")&&r.push("");let i=n.length-1,o,s;for(o=0;o1&&i--;else break;return n.slice(0,i).join("/")+"/"+r.slice(o-(o===r.length?1:0)).join("/")}var Yd;(function(e){e.pop="pop",e.push="push"})(Yd||(Yd={}));var yd;(function(e){e.back="back",e.forward="forward",e.unknown=""})(yd||(yd={}));function tY(e){if(!e)if(Ku){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),K8(e)}const nY=/^[^#]+#/;function rY(e,t){return e.replace(nY,"#")+t}function aY(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const ty=()=>({left:window.pageXOffset,top:window.pageYOffset});function iY(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),a=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!a)return;t=aY(a,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function UI(e,t){return(history.state?history.state.position-t:-1)+e}const zS=new Map;function oY(e,t){zS.set(e,t)}function sY(e){const t=zS.get(e);return zS.delete(e),t}let lY=()=>location.protocol+"//"+location.host;function dN(e,t){const{pathname:n,search:r,hash:a}=t,i=e.indexOf("#");if(i>-1){let s=a.includes(e.slice(i))?e.slice(i).length:1,l=a.slice(s);return l[0]!=="/"&&(l="/"+l),HI(l,"")}return HI(n,e)+r+a}function uY(e,t,n,r){let a=[],i=[],o=null;const s=({state:d})=>{const v=dN(e,location),h=n.value,g=t.value;let p=0;if(d){if(n.value=v,t.value=d,o&&o===h){o=null;return}p=g?d.position-g.position:0}else r(v);a.forEach(m=>{m(n.value,h,{delta:p,type:Yd.pop,direction:p?p>0?yd.forward:yd.back:yd.unknown})})};function l(){o=n.value}function u(d){a.push(d);const v=()=>{const h=a.indexOf(d);h>-1&&a.splice(h,1)};return i.push(v),v}function c(){const{history:d}=window;d.state&&d.replaceState(At({},d.state,{scroll:ty()}),"")}function f(){for(const d of i)d();i=[],window.removeEventListener("popstate",s),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",s),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:l,listen:u,destroy:f}}function YI(e,t,n,r=!1,a=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:a?ty():null}}function cY(e){const{history:t,location:n}=window,r={value:dN(e,n)},a={value:t.state};a.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(l,u,c){const f=e.indexOf("#"),d=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+l:lY()+e+l;try{t[c?"replaceState":"pushState"](u,"",d),a.value=u}catch(v){console.error(v),n[c?"replace":"assign"](d)}}function o(l,u){const c=At({},t.state,YI(a.value.back,l,a.value.forward,!0),u,{position:a.value.position});i(l,c,!0),r.value=l}function s(l,u){const c=At({},a.value,t.state,{forward:l,scroll:ty()});i(c.current,c,!0);const f=At({},YI(r.value,l,null),{position:c.position+1},u);i(l,f,!1),r.value=l}return{location:r,state:a,push:s,replace:o}}function fY(e){e=tY(e);const t=cY(e),n=uY(e,t.state,t.location,t.replace);function r(i,o=!0){o||n.pauseListeners(),history.go(i)}const a=At({location:"",base:e,go:r,createHref:rY.bind(null,e)},t,n);return Object.defineProperty(a,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(a,"state",{enumerable:!0,get:()=>t.state.value}),a}function dY(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),fY(e)}function vY(e){return typeof e=="string"||e&&typeof e=="object"}function vN(e){return typeof e=="string"||typeof e=="symbol"}const _o={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},hN=Symbol("");var XI;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(XI||(XI={}));function wc(e,t){return At(new Error,{type:e,[hN]:!0},t)}function ki(e,t){return e instanceof Error&&hN in e&&(t==null||!!(e.type&t))}const ZI="[^/]+?",hY={sensitive:!1,strict:!1,start:!0,end:!0},gY=/[.+*?^${}()[\]/\\]/g;function pY(e,t){const n=At({},hY,t),r=[];let a=n.start?"^":"";const i=[];for(const u of e){const c=u.length?[]:[90];n.strict&&!u.length&&(a+="/");for(let f=0;ft.length?t.length===1&&t[0]===40+40?1:-1:0}function yY(e,t){let n=0;const r=e.score,a=t.score;for(;n0&&t[t.length-1]<0}const _Y={type:0,value:""},bY=/[a-zA-Z0-9_]/;function SY(e){if(!e)return[[]];if(e==="/")return[[_Y]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(v){throw new Error(`ERR (${n})/"${u}": ${v}`)}let n=0,r=n;const a=[];let i;function o(){i&&a.push(i),i=[]}let s=0,l,u="",c="";function f(){u&&(n===0?i.push({type:0,value:u}):n===1||n===2||n===3?(i.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:u,regexp:c,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),u="")}function d(){u+=l}for(;s{o(y)}:md}function o(c){if(vN(c)){const f=r.get(c);f&&(r.delete(c),n.splice(n.indexOf(f),1),f.children.forEach(o),f.alias.forEach(o))}else{const f=n.indexOf(c);f>-1&&(n.splice(f,1),c.record.name&&r.delete(c.record.name),c.children.forEach(o),c.alias.forEach(o))}}function s(){return n}function l(c){let f=0;for(;f=0&&(c.record.path!==n[f].record.path||!gN(c,n[f]));)f++;n.splice(f,0,c),c.record.name&&!qI(c)&&r.set(c.record.name,c)}function u(c,f){let d,v={},h,g;if("name"in c&&c.name){if(d=r.get(c.name),!d)throw wc(1,{location:c});g=d.record.name,v=At(KI(f.params,d.keys.filter(y=>!y.optional).map(y=>y.name)),c.params&&KI(c.params,d.keys.map(y=>y.name))),h=d.stringify(v)}else if("path"in c)h=c.path,d=n.find(y=>y.re.test(h)),d&&(v=d.parse(h),g=d.record.name);else{if(d=f.name?r.get(f.name):n.find(y=>y.re.test(f.path)),!d)throw wc(1,{location:c,currentLocation:f});g=d.record.name,v=At({},f.params,c.params),h=d.stringify(v)}const p=[];let m=d;for(;m;)p.unshift(m.record),m=m.parent;return{name:g,path:h,params:v,matched:p,meta:AY(p)}}return e.forEach(c=>i(c)),{addRoute:i,resolve:u,removeRoute:o,getRoutes:s,getRecordMatcher:a}}function KI(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function CY(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:TY(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function TY(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function qI(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function AY(e){return e.reduce((t,n)=>At(t,n.meta),{})}function JI(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function gN(e,t){return t.children.some(n=>n===e||gN(e,n))}const pN=/#/g,IY=/&/g,PY=/\//g,DY=/=/g,MY=/\?/g,mN=/\+/g,kY=/%5B/g,LY=/%5D/g,yN=/%5E/g,EY=/%60/g,_N=/%7B/g,RY=/%7C/g,bN=/%7D/g,VY=/%20/g;function $w(e){return encodeURI(""+e).replace(RY,"|").replace(kY,"[").replace(LY,"]")}function OY(e){return $w(e).replace(_N,"{").replace(bN,"}").replace(yN,"^")}function FS(e){return $w(e).replace(mN,"%2B").replace(VY,"+").replace(pN,"%23").replace(IY,"%26").replace(EY,"`").replace(_N,"{").replace(bN,"}").replace(yN,"^")}function NY(e){return FS(e).replace(DY,"%3D")}function BY(e){return $w(e).replace(pN,"%23").replace(MY,"%3F")}function zY(e){return e==null?"":BY(e).replace(PY,"%2F")}function Dp(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function FY(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let a=0;ai&&FS(i)):[r&&FS(r)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+n,i!=null&&(t+="="+i))})}return t}function $Y(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Ga(r)?r.map(a=>a==null?null:""+a):r==null?r:""+r)}return t}const GY=Symbol(""),eP=Symbol(""),Gw=Symbol(""),SN=Symbol(""),$S=Symbol("");function yf(){let e=[];function t(r){return e.push(r),()=>{const a=e.indexOf(r);a>-1&&e.splice(a,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Bo(e,t,n,r,a){const i=r&&(r.enterCallbacks[a]=r.enterCallbacks[a]||[]);return()=>new Promise((o,s)=>{const l=f=>{f===!1?s(wc(4,{from:n,to:t})):f instanceof Error?s(f):vY(f)?s(wc(2,{from:t,to:f})):(i&&r.enterCallbacks[a]===i&&typeof f=="function"&&i.push(f),o())},u=e.call(r&&r.instances[a],t,n,l);let c=Promise.resolve(u);e.length<3&&(c=c.then(l)),c.catch(f=>s(f))})}function R0(e,t,n,r){const a=[];for(const i of e)for(const o in i.components){let s=i.components[o];if(!(t!=="beforeRouteEnter"&&!i.instances[o]))if(HY(s)){const u=(s.__vccOpts||s)[t];u&&a.push(Bo(u,n,r,i,o))}else{let l=s();a.push(()=>l.then(u=>{if(!u)return Promise.reject(new Error(`Couldn't resolve component "${o}" at "${i.path}"`));const c=Z8(u)?u.default:u;i.components[o]=c;const d=(c.__vccOpts||c)[t];return d&&Bo(d,n,r,i,o)()}))}}return a}function HY(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function tP(e){const t=nt(Gw),n=nt(SN),r=E(()=>t.resolve(Ge(e.to))),a=E(()=>{const{matched:l}=r.value,{length:u}=l,c=l[u-1],f=n.matched;if(!c||!f.length)return-1;const d=f.findIndex(xc.bind(null,c));if(d>-1)return d;const v=nP(l[u-2]);return u>1&&nP(c)===v&&f[f.length-1].path!==v?f.findIndex(xc.bind(null,l[u-2])):d}),i=E(()=>a.value>-1&&XY(n.params,r.value.params)),o=E(()=>a.value>-1&&a.value===n.matched.length-1&&fN(n.params,r.value.params));function s(l={}){return YY(l)?t[Ge(e.replace)?"replace":"push"](Ge(e.to)).catch(md):Promise.resolve()}return{route:r,href:E(()=>r.value.href),isActive:i,isExactActive:o,navigate:s}}const WY=ys({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:tP,setup(e,{slots:t}){const n=In(tP(e)),{options:r}=nt(Gw),a=E(()=>({[rP(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[rP(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&t.default(n);return e.custom?i:Sa("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:a.value},i)}}}),UY=WY;function YY(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function XY(e,t){for(const n in t){const r=t[n],a=e[n];if(typeof r=="string"){if(r!==a)return!1}else if(!Ga(a)||a.length!==r.length||r.some((i,o)=>i!==a[o]))return!1}return!0}function nP(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const rP=(e,t,n)=>e??t??n,ZY=ys({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=nt($S),a=E(()=>e.route||r.value),i=nt(eP,0),o=E(()=>{let u=Ge(i);const{matched:c}=a.value;let f;for(;(f=c[u])&&!f.components;)u++;return u}),s=E(()=>a.value.matched[o.value]);Tt(eP,E(()=>o.value+1)),Tt(GY,s),Tt($S,a);const l=pe();return Se(()=>[l.value,s.value,e.name],([u,c,f],[d,v,h])=>{c&&(c.instances[f]=u,v&&v!==c&&u&&u===d&&(c.leaveGuards.size||(c.leaveGuards=v.leaveGuards),c.updateGuards.size||(c.updateGuards=v.updateGuards))),u&&c&&(!v||!xc(c,v)||!d)&&(c.enterCallbacks[f]||[]).forEach(g=>g(u))},{flush:"post"}),()=>{const u=a.value,c=e.name,f=s.value,d=f&&f.components[c];if(!d)return aP(n.default,{Component:d,route:u});const v=f.props[c],h=v?v===!0?u.params:typeof v=="function"?v(u):v:null,p=Sa(d,At({},h,t,{onVnodeUnmounted:m=>{m.component.isUnmounted&&(f.instances[c]=null)},ref:l}));return aP(n.default,{Component:p,route:u})||p}}});function aP(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const jY=ZY;function KY(e){const t=wY(e.routes,e),n=e.parseQuery||FY,r=e.stringifyQuery||QI,a=e.history,i=yf(),o=yf(),s=yf(),l=xe(_o);let u=_o;Ku&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=L0.bind(null,z=>""+z),f=L0.bind(null,zY),d=L0.bind(null,Dp);function v(z,$){let U,Y;return vN(z)?(U=t.getRecordMatcher(z),Y=$):Y=z,t.addRoute(Y,U)}function h(z){const $=t.getRecordMatcher(z);$&&t.removeRoute($)}function g(){return t.getRoutes().map(z=>z.record)}function p(z){return!!t.getRecordMatcher(z)}function m(z,$){if($=At({},$||l.value),typeof z=="string"){const B=E0(n,z,$.path),K=t.resolve({path:B.path},$),re=a.createHref(B.fullPath);return At(B,K,{params:d(K.params),hash:Dp(B.hash),redirectedFrom:void 0,href:re})}let U;if("path"in z)U=At({},z,{path:E0(n,z.path,$.path).path});else{const B=At({},z.params);for(const K in B)B[K]==null&&delete B[K];U=At({},z,{params:f(B)}),$.params=f($.params)}const Y=t.resolve(U,$),j=z.hash||"";Y.params=c(d(Y.params));const te=q8(r,At({},z,{hash:OY(j),path:Y.path})),N=a.createHref(te);return At({fullPath:te,hash:j,query:r===QI?$Y(z.query):z.query||{}},Y,{redirectedFrom:void 0,href:N})}function y(z){return typeof z=="string"?E0(n,z,l.value.path):At({},z)}function _(z,$){if(u!==z)return wc(8,{from:$,to:z})}function b(z){return w(z)}function x(z){return b(At(y(z),{replace:!0}))}function S(z){const $=z.matched[z.matched.length-1];if($&&$.redirect){const{redirect:U}=$;let Y=typeof U=="function"?U(z):U;return typeof Y=="string"&&(Y=Y.includes("?")||Y.includes("#")?Y=y(Y):{path:Y},Y.params={}),At({query:z.query,hash:z.hash,params:"path"in Y?{}:z.params},Y)}}function w(z,$){const U=u=m(z),Y=l.value,j=z.state,te=z.force,N=z.replace===!0,B=S(U);if(B)return w(At(y(B),{state:typeof B=="object"?At({},j,B.state):j,force:te,replace:N}),$||U);const K=U;K.redirectedFrom=$;let re;return!te&&J8(r,Y,U)&&(re=wc(16,{to:K,from:Y}),Z(Y,Y,!0,!1)),(re?Promise.resolve(re):A(K,Y)).catch(ie=>ki(ie)?ki(ie,2)?ie:X(ie):V(ie,K,Y)).then(ie=>{if(ie){if(ki(ie,2))return w(At({replace:N},y(ie.to),{state:typeof ie.to=="object"?At({},j,ie.to.state):j,force:te}),$||K)}else ie=D(K,Y,!0,N,j);return P(K,Y,ie),ie})}function C(z,$){const U=_(z,$);return U?Promise.reject(U):Promise.resolve()}function T(z){const $=ae.values().next().value;return $&&typeof $.runWithContext=="function"?$.runWithContext(z):z()}function A(z,$){let U;const[Y,j,te]=qY(z,$);U=R0(Y.reverse(),"beforeRouteLeave",z,$);for(const B of Y)B.leaveGuards.forEach(K=>{U.push(Bo(K,z,$))});const N=C.bind(null,z,$);return U.push(N),F(U).then(()=>{U=[];for(const B of i.list())U.push(Bo(B,z,$));return U.push(N),F(U)}).then(()=>{U=R0(j,"beforeRouteUpdate",z,$);for(const B of j)B.updateGuards.forEach(K=>{U.push(Bo(K,z,$))});return U.push(N),F(U)}).then(()=>{U=[];for(const B of te)if(B.beforeEnter)if(Ga(B.beforeEnter))for(const K of B.beforeEnter)U.push(Bo(K,z,$));else U.push(Bo(B.beforeEnter,z,$));return U.push(N),F(U)}).then(()=>(z.matched.forEach(B=>B.enterCallbacks={}),U=R0(te,"beforeRouteEnter",z,$),U.push(N),F(U))).then(()=>{U=[];for(const B of o.list())U.push(Bo(B,z,$));return U.push(N),F(U)}).catch(B=>ki(B,8)?B:Promise.reject(B))}function P(z,$,U){s.list().forEach(Y=>T(()=>Y(z,$,U)))}function D(z,$,U,Y,j){const te=_(z,$);if(te)return te;const N=$===_o,B=Ku?history.state:{};U&&(Y||N?a.replace(z.fullPath,At({scroll:N&&B&&B.scroll},j)):a.push(z.fullPath,j)),l.value=z,Z(z,$,U,N),X()}let M;function L(){M||(M=a.listen((z,$,U)=>{if(!W.listening)return;const Y=m(z),j=S(Y);if(j){w(At(j,{replace:!0}),Y).catch(md);return}u=Y;const te=l.value;Ku&&oY(UI(te.fullPath,U.delta),ty()),A(Y,te).catch(N=>ki(N,12)?N:ki(N,2)?(w(N.to,Y).then(B=>{ki(B,20)&&!U.delta&&U.type===Yd.pop&&a.go(-1,!1)}).catch(md),Promise.reject()):(U.delta&&a.go(-U.delta,!1),V(N,Y,te))).then(N=>{N=N||D(Y,te,!1),N&&(U.delta&&!ki(N,8)?a.go(-U.delta,!1):U.type===Yd.pop&&ki(N,20)&&a.go(-1,!1)),P(Y,te,N)}).catch(md)}))}let R=yf(),O=yf(),H;function V(z,$,U){X(z);const Y=O.list();return Y.length?Y.forEach(j=>j(z,$,U)):console.error(z),Promise.reject(z)}function G(){return H&&l.value!==_o?Promise.resolve():new Promise((z,$)=>{R.add([z,$])})}function X(z){return H||(H=!z,L(),R.list().forEach(([$,U])=>z?U(z):$()),R.reset()),z}function Z(z,$,U,Y){const{scrollBehavior:j}=e;if(!Ku||!j)return Promise.resolve();const te=!U&&sY(UI(z.fullPath,0))||(Y||!U)&&history.state&&history.state.scroll||null;return dt().then(()=>j(z,$,te)).then(N=>N&&iY(N)).catch(N=>V(N,z,$))}const q=z=>a.go(z);let Q;const ae=new Set,W={currentRoute:l,listening:!0,addRoute:v,removeRoute:h,hasRoute:p,getRoutes:g,resolve:m,options:e,push:b,replace:x,go:q,back:()=>q(-1),forward:()=>q(1),beforeEach:i.add,beforeResolve:o.add,afterEach:s.add,onError:O.add,isReady:G,install(z){const $=this;z.component("RouterLink",UY),z.component("RouterView",jY),z.config.globalProperties.$router=$,Object.defineProperty(z.config.globalProperties,"$route",{enumerable:!0,get:()=>Ge(l)}),Ku&&!Q&&l.value===_o&&(Q=!0,b(a.location).catch(j=>{}));const U={};for(const j in _o)Object.defineProperty(U,j,{get:()=>l.value[j],enumerable:!0});z.provide(Gw,$),z.provide(SN,tO(U)),z.provide($S,l);const Y=z.unmount;ae.add(z),z.unmount=function(){ae.delete(z),ae.size<1&&(u=_o,M&&M(),M=null,l.value=_o,Q=!1,H=!1),Y()}}};function F(z){return z.reduce(($,U)=>$.then(()=>T(U)),Promise.resolve())}return W}function qY(e,t){const n=[],r=[],a=[],i=Math.max(t.matched.length,e.matched.length);for(let o=0;oxc(u,s))?r.push(s):n.push(s));const l=e.matched[o];l&&(t.matched.find(u=>xc(u,l))||a.push(l))}return[n,r,a]}const Ra=KY({history:dY("./"),routes:[{path:"/:config",name:"home",component:()=>Eh(()=>import("./DevicesView-19ff0647.js"),["./DevicesView-19ff0647.js","./PanelCard-bac08c4a.js","./PanelCard-1a80a520.css"],import.meta.url)},{path:"/:config/devices/:view",name:"devices",component:()=>Eh(()=>import("./DevicesView-19ff0647.js"),["./DevicesView-19ff0647.js","./PanelCard-bac08c4a.js","./PanelCard-1a80a520.css"],import.meta.url)},{path:"/:config/settings",name:"settings",component:()=>Eh(()=>import("./SettingsView-83a39733.js"),["./SettingsView-83a39733.js","./index-769e4e34.js","./index-c6b58a67.css","./PanelCard-bac08c4a.js","./PanelCard-1a80a520.css","./SettingsView-3f514416.css"],import.meta.url)},{path:"/:config/internals",name:"internals",component:()=>Eh(()=>import("./InternalsView-06962020.js"),["./InternalsView-06962020.js","./index-769e4e34.js","./index-c6b58a67.css"],import.meta.url)}]});/*! + */const Ku=typeof window<"u";function Z8(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const At=Object.assign;function L0(e,t){const n={};for(const r in t){const a=t[r];n[r]=Ga(a)?a.map(e):e(a)}return n}const md=()=>{},Ga=Array.isArray,j8=/\/$/,K8=e=>e.replace(j8,"");function E0(e,t,n="/"){let r,a={},i="",o="";const s=t.indexOf("#");let l=t.indexOf("?");return s=0&&(l=-1),l>-1&&(r=t.slice(0,l),i=t.slice(l+1,s>-1?s:t.length),a=e(i)),s>-1&&(r=r||t.slice(0,s),o=t.slice(s,t.length)),r=eY(r??t,n),{fullPath:r+(i&&"?")+i+o,path:r,query:a,hash:o}}function q8(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function HI(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function J8(e,t,n){const r=t.matched.length-1,a=n.matched.length-1;return r>-1&&r===a&&xc(t.matched[r],n.matched[a])&&fN(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function xc(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function fN(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Q8(e[n],t[n]))return!1;return!0}function Q8(e,t){return Ga(e)?WI(e,t):Ga(t)?WI(t,e):e===t}function WI(e,t){return Ga(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function eY(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),a=r[r.length-1];(a===".."||a===".")&&r.push("");let i=n.length-1,o,s;for(o=0;o1&&i--;else break;return n.slice(0,i).join("/")+"/"+r.slice(o-(o===r.length?1:0)).join("/")}var Yd;(function(e){e.pop="pop",e.push="push"})(Yd||(Yd={}));var yd;(function(e){e.back="back",e.forward="forward",e.unknown=""})(yd||(yd={}));function tY(e){if(!e)if(Ku){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),K8(e)}const nY=/^[^#]+#/;function rY(e,t){return e.replace(nY,"#")+t}function aY(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const ty=()=>({left:window.pageXOffset,top:window.pageYOffset});function iY(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),a=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!a)return;t=aY(a,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function UI(e,t){return(history.state?history.state.position-t:-1)+e}const zS=new Map;function oY(e,t){zS.set(e,t)}function sY(e){const t=zS.get(e);return zS.delete(e),t}let lY=()=>location.protocol+"//"+location.host;function dN(e,t){const{pathname:n,search:r,hash:a}=t,i=e.indexOf("#");if(i>-1){let s=a.includes(e.slice(i))?e.slice(i).length:1,l=a.slice(s);return l[0]!=="/"&&(l="/"+l),HI(l,"")}return HI(n,e)+r+a}function uY(e,t,n,r){let a=[],i=[],o=null;const s=({state:d})=>{const v=dN(e,location),h=n.value,g=t.value;let p=0;if(d){if(n.value=v,t.value=d,o&&o===h){o=null;return}p=g?d.position-g.position:0}else r(v);a.forEach(m=>{m(n.value,h,{delta:p,type:Yd.pop,direction:p?p>0?yd.forward:yd.back:yd.unknown})})};function l(){o=n.value}function u(d){a.push(d);const v=()=>{const h=a.indexOf(d);h>-1&&a.splice(h,1)};return i.push(v),v}function c(){const{history:d}=window;d.state&&d.replaceState(At({},d.state,{scroll:ty()}),"")}function f(){for(const d of i)d();i=[],window.removeEventListener("popstate",s),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",s),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:l,listen:u,destroy:f}}function YI(e,t,n,r=!1,a=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:a?ty():null}}function cY(e){const{history:t,location:n}=window,r={value:dN(e,n)},a={value:t.state};a.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(l,u,c){const f=e.indexOf("#"),d=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+l:lY()+e+l;try{t[c?"replaceState":"pushState"](u,"",d),a.value=u}catch(v){console.error(v),n[c?"replace":"assign"](d)}}function o(l,u){const c=At({},t.state,YI(a.value.back,l,a.value.forward,!0),u,{position:a.value.position});i(l,c,!0),r.value=l}function s(l,u){const c=At({},a.value,t.state,{forward:l,scroll:ty()});i(c.current,c,!0);const f=At({},YI(r.value,l,null),{position:c.position+1},u);i(l,f,!1),r.value=l}return{location:r,state:a,push:s,replace:o}}function fY(e){e=tY(e);const t=cY(e),n=uY(e,t.state,t.location,t.replace);function r(i,o=!0){o||n.pauseListeners(),history.go(i)}const a=At({location:"",base:e,go:r,createHref:rY.bind(null,e)},t,n);return Object.defineProperty(a,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(a,"state",{enumerable:!0,get:()=>t.state.value}),a}function dY(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),fY(e)}function vY(e){return typeof e=="string"||e&&typeof e=="object"}function vN(e){return typeof e=="string"||typeof e=="symbol"}const _o={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},hN=Symbol("");var XI;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(XI||(XI={}));function wc(e,t){return At(new Error,{type:e,[hN]:!0},t)}function ki(e,t){return e instanceof Error&&hN in e&&(t==null||!!(e.type&t))}const ZI="[^/]+?",hY={sensitive:!1,strict:!1,start:!0,end:!0},gY=/[.+*?^${}()[\]/\\]/g;function pY(e,t){const n=At({},hY,t),r=[];let a=n.start?"^":"";const i=[];for(const u of e){const c=u.length?[]:[90];n.strict&&!u.length&&(a+="/");for(let f=0;ft.length?t.length===1&&t[0]===40+40?1:-1:0}function yY(e,t){let n=0;const r=e.score,a=t.score;for(;n0&&t[t.length-1]<0}const _Y={type:0,value:""},bY=/[a-zA-Z0-9_]/;function SY(e){if(!e)return[[]];if(e==="/")return[[_Y]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(v){throw new Error(`ERR (${n})/"${u}": ${v}`)}let n=0,r=n;const a=[];let i;function o(){i&&a.push(i),i=[]}let s=0,l,u="",c="";function f(){u&&(n===0?i.push({type:0,value:u}):n===1||n===2||n===3?(i.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:u,regexp:c,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),u="")}function d(){u+=l}for(;s{o(y)}:md}function o(c){if(vN(c)){const f=r.get(c);f&&(r.delete(c),n.splice(n.indexOf(f),1),f.children.forEach(o),f.alias.forEach(o))}else{const f=n.indexOf(c);f>-1&&(n.splice(f,1),c.record.name&&r.delete(c.record.name),c.children.forEach(o),c.alias.forEach(o))}}function s(){return n}function l(c){let f=0;for(;f=0&&(c.record.path!==n[f].record.path||!gN(c,n[f]));)f++;n.splice(f,0,c),c.record.name&&!qI(c)&&r.set(c.record.name,c)}function u(c,f){let d,v={},h,g;if("name"in c&&c.name){if(d=r.get(c.name),!d)throw wc(1,{location:c});g=d.record.name,v=At(KI(f.params,d.keys.filter(y=>!y.optional).map(y=>y.name)),c.params&&KI(c.params,d.keys.map(y=>y.name))),h=d.stringify(v)}else if("path"in c)h=c.path,d=n.find(y=>y.re.test(h)),d&&(v=d.parse(h),g=d.record.name);else{if(d=f.name?r.get(f.name):n.find(y=>y.re.test(f.path)),!d)throw wc(1,{location:c,currentLocation:f});g=d.record.name,v=At({},f.params,c.params),h=d.stringify(v)}const p=[];let m=d;for(;m;)p.unshift(m.record),m=m.parent;return{name:g,path:h,params:v,matched:p,meta:AY(p)}}return e.forEach(c=>i(c)),{addRoute:i,resolve:u,removeRoute:o,getRoutes:s,getRecordMatcher:a}}function KI(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function CY(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:TY(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function TY(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function qI(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function AY(e){return e.reduce((t,n)=>At(t,n.meta),{})}function JI(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function gN(e,t){return t.children.some(n=>n===e||gN(e,n))}const pN=/#/g,IY=/&/g,PY=/\//g,DY=/=/g,MY=/\?/g,mN=/\+/g,kY=/%5B/g,LY=/%5D/g,yN=/%5E/g,EY=/%60/g,_N=/%7B/g,RY=/%7C/g,bN=/%7D/g,VY=/%20/g;function $w(e){return encodeURI(""+e).replace(RY,"|").replace(kY,"[").replace(LY,"]")}function OY(e){return $w(e).replace(_N,"{").replace(bN,"}").replace(yN,"^")}function FS(e){return $w(e).replace(mN,"%2B").replace(VY,"+").replace(pN,"%23").replace(IY,"%26").replace(EY,"`").replace(_N,"{").replace(bN,"}").replace(yN,"^")}function NY(e){return FS(e).replace(DY,"%3D")}function BY(e){return $w(e).replace(pN,"%23").replace(MY,"%3F")}function zY(e){return e==null?"":BY(e).replace(PY,"%2F")}function Dp(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function FY(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let a=0;ai&&FS(i)):[r&&FS(r)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+n,i!=null&&(t+="="+i))})}return t}function $Y(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Ga(r)?r.map(a=>a==null?null:""+a):r==null?r:""+r)}return t}const GY=Symbol(""),eP=Symbol(""),Gw=Symbol(""),SN=Symbol(""),$S=Symbol("");function yf(){let e=[];function t(r){return e.push(r),()=>{const a=e.indexOf(r);a>-1&&e.splice(a,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Bo(e,t,n,r,a){const i=r&&(r.enterCallbacks[a]=r.enterCallbacks[a]||[]);return()=>new Promise((o,s)=>{const l=f=>{f===!1?s(wc(4,{from:n,to:t})):f instanceof Error?s(f):vY(f)?s(wc(2,{from:t,to:f})):(i&&r.enterCallbacks[a]===i&&typeof f=="function"&&i.push(f),o())},u=e.call(r&&r.instances[a],t,n,l);let c=Promise.resolve(u);e.length<3&&(c=c.then(l)),c.catch(f=>s(f))})}function R0(e,t,n,r){const a=[];for(const i of e)for(const o in i.components){let s=i.components[o];if(!(t!=="beforeRouteEnter"&&!i.instances[o]))if(HY(s)){const u=(s.__vccOpts||s)[t];u&&a.push(Bo(u,n,r,i,o))}else{let l=s();a.push(()=>l.then(u=>{if(!u)return Promise.reject(new Error(`Couldn't resolve component "${o}" at "${i.path}"`));const c=Z8(u)?u.default:u;i.components[o]=c;const d=(c.__vccOpts||c)[t];return d&&Bo(d,n,r,i,o)()}))}}return a}function HY(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function tP(e){const t=nt(Gw),n=nt(SN),r=E(()=>t.resolve(Ge(e.to))),a=E(()=>{const{matched:l}=r.value,{length:u}=l,c=l[u-1],f=n.matched;if(!c||!f.length)return-1;const d=f.findIndex(xc.bind(null,c));if(d>-1)return d;const v=nP(l[u-2]);return u>1&&nP(c)===v&&f[f.length-1].path!==v?f.findIndex(xc.bind(null,l[u-2])):d}),i=E(()=>a.value>-1&&XY(n.params,r.value.params)),o=E(()=>a.value>-1&&a.value===n.matched.length-1&&fN(n.params,r.value.params));function s(l={}){return YY(l)?t[Ge(e.replace)?"replace":"push"](Ge(e.to)).catch(md):Promise.resolve()}return{route:r,href:E(()=>r.value.href),isActive:i,isExactActive:o,navigate:s}}const WY=ys({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:tP,setup(e,{slots:t}){const n=In(tP(e)),{options:r}=nt(Gw),a=E(()=>({[rP(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[rP(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&t.default(n);return e.custom?i:Sa("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:a.value},i)}}}),UY=WY;function YY(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function XY(e,t){for(const n in t){const r=t[n],a=e[n];if(typeof r=="string"){if(r!==a)return!1}else if(!Ga(a)||a.length!==r.length||r.some((i,o)=>i!==a[o]))return!1}return!0}function nP(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const rP=(e,t,n)=>e??t??n,ZY=ys({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=nt($S),a=E(()=>e.route||r.value),i=nt(eP,0),o=E(()=>{let u=Ge(i);const{matched:c}=a.value;let f;for(;(f=c[u])&&!f.components;)u++;return u}),s=E(()=>a.value.matched[o.value]);Tt(eP,E(()=>o.value+1)),Tt(GY,s),Tt($S,a);const l=pe();return Se(()=>[l.value,s.value,e.name],([u,c,f],[d,v,h])=>{c&&(c.instances[f]=u,v&&v!==c&&u&&u===d&&(c.leaveGuards.size||(c.leaveGuards=v.leaveGuards),c.updateGuards.size||(c.updateGuards=v.updateGuards))),u&&c&&(!v||!xc(c,v)||!d)&&(c.enterCallbacks[f]||[]).forEach(g=>g(u))},{flush:"post"}),()=>{const u=a.value,c=e.name,f=s.value,d=f&&f.components[c];if(!d)return aP(n.default,{Component:d,route:u});const v=f.props[c],h=v?v===!0?u.params:typeof v=="function"?v(u):v:null,p=Sa(d,At({},h,t,{onVnodeUnmounted:m=>{m.component.isUnmounted&&(f.instances[c]=null)},ref:l}));return aP(n.default,{Component:p,route:u})||p}}});function aP(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const jY=ZY;function KY(e){const t=wY(e.routes,e),n=e.parseQuery||FY,r=e.stringifyQuery||QI,a=e.history,i=yf(),o=yf(),s=yf(),l=xe(_o);let u=_o;Ku&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=L0.bind(null,z=>""+z),f=L0.bind(null,zY),d=L0.bind(null,Dp);function v(z,$){let U,Y;return vN(z)?(U=t.getRecordMatcher(z),Y=$):Y=z,t.addRoute(Y,U)}function h(z){const $=t.getRecordMatcher(z);$&&t.removeRoute($)}function g(){return t.getRoutes().map(z=>z.record)}function p(z){return!!t.getRecordMatcher(z)}function m(z,$){if($=At({},$||l.value),typeof z=="string"){const B=E0(n,z,$.path),K=t.resolve({path:B.path},$),re=a.createHref(B.fullPath);return At(B,K,{params:d(K.params),hash:Dp(B.hash),redirectedFrom:void 0,href:re})}let U;if("path"in z)U=At({},z,{path:E0(n,z.path,$.path).path});else{const B=At({},z.params);for(const K in B)B[K]==null&&delete B[K];U=At({},z,{params:f(B)}),$.params=f($.params)}const Y=t.resolve(U,$),j=z.hash||"";Y.params=c(d(Y.params));const te=q8(r,At({},z,{hash:OY(j),path:Y.path})),N=a.createHref(te);return At({fullPath:te,hash:j,query:r===QI?$Y(z.query):z.query||{}},Y,{redirectedFrom:void 0,href:N})}function y(z){return typeof z=="string"?E0(n,z,l.value.path):At({},z)}function _(z,$){if(u!==z)return wc(8,{from:$,to:z})}function b(z){return w(z)}function x(z){return b(At(y(z),{replace:!0}))}function S(z){const $=z.matched[z.matched.length-1];if($&&$.redirect){const{redirect:U}=$;let Y=typeof U=="function"?U(z):U;return typeof Y=="string"&&(Y=Y.includes("?")||Y.includes("#")?Y=y(Y):{path:Y},Y.params={}),At({query:z.query,hash:z.hash,params:"path"in Y?{}:z.params},Y)}}function w(z,$){const U=u=m(z),Y=l.value,j=z.state,te=z.force,N=z.replace===!0,B=S(U);if(B)return w(At(y(B),{state:typeof B=="object"?At({},j,B.state):j,force:te,replace:N}),$||U);const K=U;K.redirectedFrom=$;let re;return!te&&J8(r,Y,U)&&(re=wc(16,{to:K,from:Y}),Z(Y,Y,!0,!1)),(re?Promise.resolve(re):A(K,Y)).catch(ie=>ki(ie)?ki(ie,2)?ie:X(ie):V(ie,K,Y)).then(ie=>{if(ie){if(ki(ie,2))return w(At({replace:N},y(ie.to),{state:typeof ie.to=="object"?At({},j,ie.to.state):j,force:te}),$||K)}else ie=D(K,Y,!0,N,j);return P(K,Y,ie),ie})}function C(z,$){const U=_(z,$);return U?Promise.reject(U):Promise.resolve()}function T(z){const $=ae.values().next().value;return $&&typeof $.runWithContext=="function"?$.runWithContext(z):z()}function A(z,$){let U;const[Y,j,te]=qY(z,$);U=R0(Y.reverse(),"beforeRouteLeave",z,$);for(const B of Y)B.leaveGuards.forEach(K=>{U.push(Bo(K,z,$))});const N=C.bind(null,z,$);return U.push(N),F(U).then(()=>{U=[];for(const B of i.list())U.push(Bo(B,z,$));return U.push(N),F(U)}).then(()=>{U=R0(j,"beforeRouteUpdate",z,$);for(const B of j)B.updateGuards.forEach(K=>{U.push(Bo(K,z,$))});return U.push(N),F(U)}).then(()=>{U=[];for(const B of te)if(B.beforeEnter)if(Ga(B.beforeEnter))for(const K of B.beforeEnter)U.push(Bo(K,z,$));else U.push(Bo(B.beforeEnter,z,$));return U.push(N),F(U)}).then(()=>(z.matched.forEach(B=>B.enterCallbacks={}),U=R0(te,"beforeRouteEnter",z,$),U.push(N),F(U))).then(()=>{U=[];for(const B of o.list())U.push(Bo(B,z,$));return U.push(N),F(U)}).catch(B=>ki(B,8)?B:Promise.reject(B))}function P(z,$,U){s.list().forEach(Y=>T(()=>Y(z,$,U)))}function D(z,$,U,Y,j){const te=_(z,$);if(te)return te;const N=$===_o,B=Ku?history.state:{};U&&(Y||N?a.replace(z.fullPath,At({scroll:N&&B&&B.scroll},j)):a.push(z.fullPath,j)),l.value=z,Z(z,$,U,N),X()}let M;function L(){M||(M=a.listen((z,$,U)=>{if(!W.listening)return;const Y=m(z),j=S(Y);if(j){w(At(j,{replace:!0}),Y).catch(md);return}u=Y;const te=l.value;Ku&&oY(UI(te.fullPath,U.delta),ty()),A(Y,te).catch(N=>ki(N,12)?N:ki(N,2)?(w(N.to,Y).then(B=>{ki(B,20)&&!U.delta&&U.type===Yd.pop&&a.go(-1,!1)}).catch(md),Promise.reject()):(U.delta&&a.go(-U.delta,!1),V(N,Y,te))).then(N=>{N=N||D(Y,te,!1),N&&(U.delta&&!ki(N,8)?a.go(-U.delta,!1):U.type===Yd.pop&&ki(N,20)&&a.go(-1,!1)),P(Y,te,N)}).catch(md)}))}let R=yf(),O=yf(),H;function V(z,$,U){X(z);const Y=O.list();return Y.length?Y.forEach(j=>j(z,$,U)):console.error(z),Promise.reject(z)}function G(){return H&&l.value!==_o?Promise.resolve():new Promise((z,$)=>{R.add([z,$])})}function X(z){return H||(H=!z,L(),R.list().forEach(([$,U])=>z?U(z):$()),R.reset()),z}function Z(z,$,U,Y){const{scrollBehavior:j}=e;if(!Ku||!j)return Promise.resolve();const te=!U&&sY(UI(z.fullPath,0))||(Y||!U)&&history.state&&history.state.scroll||null;return dt().then(()=>j(z,$,te)).then(N=>N&&iY(N)).catch(N=>V(N,z,$))}const q=z=>a.go(z);let Q;const ae=new Set,W={currentRoute:l,listening:!0,addRoute:v,removeRoute:h,hasRoute:p,getRoutes:g,resolve:m,options:e,push:b,replace:x,go:q,back:()=>q(-1),forward:()=>q(1),beforeEach:i.add,beforeResolve:o.add,afterEach:s.add,onError:O.add,isReady:G,install(z){const $=this;z.component("RouterLink",UY),z.component("RouterView",jY),z.config.globalProperties.$router=$,Object.defineProperty(z.config.globalProperties,"$route",{enumerable:!0,get:()=>Ge(l)}),Ku&&!Q&&l.value===_o&&(Q=!0,b(a.location).catch(j=>{}));const U={};for(const j in _o)Object.defineProperty(U,j,{get:()=>l.value[j],enumerable:!0});z.provide(Gw,$),z.provide(SN,tO(U)),z.provide($S,l);const Y=z.unmount;ae.add(z),z.unmount=function(){ae.delete(z),ae.size<1&&(u=_o,M&&M(),M=null,l.value=_o,Q=!1,H=!1),Y()}}};function F(z){return z.reduce(($,U)=>$.then(()=>T(U)),Promise.resolve())}return W}function qY(e,t){const n=[],r=[],a=[],i=Math.max(t.matched.length,e.matched.length);for(let o=0;oxc(u,s))?r.push(s):n.push(s));const l=e.matched[o];l&&(t.matched.find(u=>xc(u,l))||a.push(l))}return[n,r,a]}const Ra=KY({history:dY("./"),routes:[{path:"/:config",name:"home",component:()=>Eh(()=>import("./DevicesView-586829bb.js"),["./DevicesView-586829bb.js","./PanelCard-05a2c8b0.js","./PanelCard-1a80a520.css"],import.meta.url)},{path:"/:config/devices/:view",name:"devices",component:()=>Eh(()=>import("./DevicesView-586829bb.js"),["./DevicesView-586829bb.js","./PanelCard-05a2c8b0.js","./PanelCard-1a80a520.css"],import.meta.url)},{path:"/:config/settings",name:"settings",component:()=>Eh(()=>import("./SettingsView-4ee281ea.js"),["./SettingsView-4ee281ea.js","./index-ed8cb710.js","./index-c6b58a67.css","./PanelCard-05a2c8b0.js","./PanelCard-1a80a520.css","./SettingsView-3f514416.css"],import.meta.url)},{path:"/:config/internals",name:"internals",component:()=>Eh(()=>import("./InternalsView-b85de4d3.js"),["./InternalsView-b85de4d3.js","./index-ed8cb710.js","./index-c6b58a67.css"],import.meta.url)}]});/*! * shared v9.9.0 * (c) 2024 kazuya kawaguchi * Released under the MIT License. diff --git a/www/fhemapp4/assets/index-769e4e34.js b/www/fhemapp4/assets/index-ed8cb710.js similarity index 99% rename from www/fhemapp4/assets/index-769e4e34.js rename to www/fhemapp4/assets/index-ed8cb710.js index 5232f38e..ef5dc4b3 100644 --- a/www/fhemapp4/assets/index-769e4e34.js +++ b/www/fhemapp4/assets/index-ed8cb710.js @@ -1,4 +1,4 @@ -import{Q as ye,R as he,S as ve,T as ge,U as be,V as me,W as we,F as Ce,X as Se,Y as ke,Z as Ne,_ as Oe,$ as Te,a0 as je,a1 as Ee,a2 as xe,a3 as Pe,a4 as Ve,a5 as Ae,a6 as _e,a7 as Re,a8 as De,a9 as Le,aa as Me,ab as Be,ac as Fe,c as He,ad as Ie,a as Ke,k as ze,b as Ue,z as Ye,ae as $e,af as qe,ag as Je,ah as Qe,ai as We,aj as Ge,j as Xe,e as Ze,ak as et,al as tt,l as nt,am as ot,an as rt,ao as at,ap as it,aq as ct,ar as st,as as lt,at as ut,au as dt,av as ft,aw as pt,E as yt,ax as ht,ay as vt,az as gt,m as bt,aA as mt,aB as wt,aC as Ct,aD as St,aE as kt,C as Nt,aF as Ot,aG as Tt,aH as jt,aI as Et,aJ as xt,aK as Pt,aL as Vt,aM as At,aN as _t,aO as Rt,aP as Dt,q as Lt,J as Mt,y as Bt,aQ as Ft,M as Ht,aR as It,aS as Kt,H as zt,aT as Ut,aU as Yt,aV as $t,x as qt,aW as Jt,aX as Qt,aY as Wt,aZ as Gt,a_ as Xt,a$ as Zt,o as en,b0 as tn,b1 as nn,b2 as on,b3 as rn,b4 as an,g as cn,b5 as sn,f as ln,b6 as un,b7 as dn,d as fn,b8 as pn,r as yn,b9 as hn,P as vn,ba as gn,bb as bn,bc as mn,bd as wn,be as Cn,bf as Sn,bg as kn,B as Nn,bh as On,bi as Tn,bj as jn,t as En,bk as xn,N as Pn,bl as Vn,bm as An,D as _n,bn as Rn,bo as Dn,bp as Ln,h as Mn,bq as Bn,br as Fn,bs as Hn,bt as In,bu as Kn,bv as zn,bw as Un,bx as Yn,by as $n,bz as qn,bA as Jn,bB as Qn,v as Wn,bC as Gn,bD as Xn,s as Zn,G as eo,bE as to,bF as no,bG as oo,w as ro,bH as ao,n as io,O as co,bI as so,bJ as lo,bK as uo}from"./index-1b2ccf17.js";/** +import{Q as ye,R as he,S as ve,T as ge,U as be,V as me,W as we,F as Ce,X as Se,Y as ke,Z as Ne,_ as Oe,$ as Te,a0 as je,a1 as Ee,a2 as xe,a3 as Pe,a4 as Ve,a5 as Ae,a6 as _e,a7 as Re,a8 as De,a9 as Le,aa as Me,ab as Be,ac as Fe,c as He,ad as Ie,a as Ke,k as ze,b as Ue,z as Ye,ae as $e,af as qe,ag as Je,ah as Qe,ai as We,aj as Ge,j as Xe,e as Ze,ak as et,al as tt,l as nt,am as ot,an as rt,ao as at,ap as it,aq as ct,ar as st,as as lt,at as ut,au as dt,av as ft,aw as pt,E as yt,ax as ht,ay as vt,az as gt,m as bt,aA as mt,aB as wt,aC as Ct,aD as St,aE as kt,C as Nt,aF as Ot,aG as Tt,aH as jt,aI as Et,aJ as xt,aK as Pt,aL as Vt,aM as At,aN as _t,aO as Rt,aP as Dt,q as Lt,J as Mt,y as Bt,aQ as Ft,M as Ht,aR as It,aS as Kt,H as zt,aT as Ut,aU as Yt,aV as $t,x as qt,aW as Jt,aX as Qt,aY as Wt,aZ as Gt,a_ as Xt,a$ as Zt,o as en,b0 as tn,b1 as nn,b2 as on,b3 as rn,b4 as an,g as cn,b5 as sn,f as ln,b6 as un,b7 as dn,d as fn,b8 as pn,r as yn,b9 as hn,P as vn,ba as gn,bb as bn,bc as mn,bd as wn,be as Cn,bf as Sn,bg as kn,B as Nn,bh as On,bi as Tn,bj as jn,t as En,bk as xn,N as Pn,bl as Vn,bm as An,D as _n,bn as Rn,bo as Dn,bp as Ln,h as Mn,bq as Bn,br as Fn,bs as Hn,bt as In,bu as Kn,bv as zn,bw as Un,bx as Yn,by as $n,bz as qn,bA as Jn,bB as Qn,v as Wn,bC as Gn,bD as Xn,s as Zn,G as eo,bE as to,bF as no,bG as oo,w as ro,bH as ao,n as io,O as co,bI as so,bJ as lo,bK as uo}from"./index-6f0816ee.js";/** * vue v3.4.8 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT diff --git a/www/fhemapp4/index.html b/www/fhemapp4/index.html index 68281f29..6fd27428 100644 --- a/www/fhemapp4/index.html +++ b/www/fhemapp4/index.html @@ -9,7 +9,7 @@ FHEMApp v4 - +