diff --git a/public/CHANGELOG.md b/public/CHANGELOG.md index 6e4ec82..2d7c3b6 100644 --- a/public/CHANGELOG.md +++ b/public/CHANGELOG.md @@ -1,3 +1,7 @@ +# v4.0.41-beta (27.04.2024) +## Panel Status +- bug fix level switch on right side +- add button for template editor on loglevel 7 # v4.0.40-beta (25.04.2024) ## Core - loading of standard templates optimised diff --git a/src/components/PanelCard.vue b/src/components/PanelCard.vue index 250c988..ea66743 100644 --- a/src/components/PanelCard.vue +++ b/src/components/PanelCard.vue @@ -94,8 +94,23 @@ } } - function editItem(val) { - router.push({ name: 'settings', params: { tab: 'panels', item: val }, query: router.currentRoute.value.query }) + function getTemplate(val) { + let idx = fhem.app.config.panels.map((e) => e.name).indexOf(val), + templateIdx, + res + + if(idx !== -1) { + res = fhem.app.config.panels[idx].template + templateIdx = fhem.app.config.templates.map((e) => e.name).indexOf(res) + + if(templateIdx !== -1 && !fhem.app.config.templates[templateIdx].dist) { + return res + } + } + } + + function editItem(val, tab) { + router.push({ name: 'settings', params: { tab: tab, item: val }, query: router.currentRoute.value.query }) } function getInfo(pos) { @@ -146,21 +161,21 @@ /> - + - - - - {{ title.title }} - - - {{ sortby.sortby }} - - + + {{ title.title }} + + + diff --git a/www/fhemapp4/CHANGELOG.md b/www/fhemapp4/CHANGELOG.md index 6e4ec82..2d7c3b6 100644 --- a/www/fhemapp4/CHANGELOG.md +++ b/www/fhemapp4/CHANGELOG.md @@ -1,3 +1,7 @@ +# v4.0.41-beta (27.04.2024) +## Panel Status +- bug fix level switch on right side +- add button for template editor on loglevel 7 # v4.0.40-beta (25.04.2024) ## Core - loading of standard templates optimised diff --git a/www/fhemapp4/assets/DevicesView-1c41c764.js b/www/fhemapp4/assets/DevicesView-28b194ae.js similarity index 86% rename from www/fhemapp4/assets/DevicesView-1c41c764.js rename to www/fhemapp4/assets/DevicesView-28b194ae.js index fed8759..00451f1 100644 --- a/www/fhemapp4/assets/DevicesView-1c41c764.js +++ b/www/fhemapp4/assets/DevicesView-28b194ae.js @@ -1 +1 @@ -import{u as f,c,r as p,o as n,a as u,w as i,b as d,d as h,F as v,e as w}from"./index-e6e38008.js";import{_ as x}from"./PanelCard-ca7331d5.js";const V={__name:"DevicesView",setup(g){const s=f(),m=c(()=>{let e=[];if(s.app.panelMaximized)e.push(s.app.panelMaximized);else{for(const t of s.app.panelView)s.handleDefs(s.app.panelList[t].panel.show,["show"],[!0]).show&&e.push(s.app.panelList[t]);e.sort((t,o)=>a(t)>a(o)?1:a(o)>a(t)?-1:0)}return e}),l=c(()=>{let e={cols:12,sm:6,lg:4};return/=maximized$/.test(s.app.currentView)&&(e={cols:12}),e});function a(e){return s.handleDefs(e.panel.sortby,["sortby"],[null]).sortby||"999"}return(e,t)=>{const o=p("v-col"),_=p("v-row");return n(),u(_,{"no-gutters":""},{default:i(()=>[(n(!0),d(v,null,h(m.value,r=>(n(),u(o,{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{V as default}; +import{u as f,c,r as p,o as n,a as u,w as i,b as d,d as h,F as v,e as w}from"./index-42e67982.js";import{_ as x}from"./PanelCard-01886c92.js";const V={__name:"DevicesView",setup(g){const s=f(),m=c(()=>{let e=[];if(s.app.panelMaximized)e.push(s.app.panelMaximized);else{for(const t of s.app.panelView)s.handleDefs(s.app.panelList[t].panel.show,["show"],[!0]).show&&e.push(s.app.panelList[t]);e.sort((t,o)=>a(t)>a(o)?1:a(o)>a(t)?-1:0)}return e}),l=c(()=>{let e={cols:12,sm:6,lg:4};return/=maximized$/.test(s.app.currentView)&&(e={cols:12}),e});function a(e){return s.handleDefs(e.panel.sortby,["sortby"],[null]).sortby||"999"}return(e,t)=>{const o=p("v-col"),_=p("v-row");return n(),u(_,{"no-gutters":""},{default:i(()=>[(n(!0),d(v,null,h(m.value,r=>(n(),u(o,{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{V as default}; diff --git a/www/fhemapp4/assets/InternalsView-9e589dca.js b/www/fhemapp4/assets/InternalsView-19bcf3a5.js similarity index 90% rename from www/fhemapp4/assets/InternalsView-9e589dca.js rename to www/fhemapp4/assets/InternalsView-19bcf3a5.js index b4beb2e..970f09e 100644 --- a/www/fhemapp4/assets/InternalsView-9e589dca.js +++ b/www/fhemapp4/assets/InternalsView-19bcf3a5.js @@ -1 +1 @@ -import{u as y,V as C}from"./index-2d4633de.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,x as $,h as r}from"./index-e6e38008.js";const O={__name:"InternalsView",setup(I){const n=k(!0),a=B(),{toClipboard:u}=y();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"),x=e("v-card");return N(),S(x,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 y,V as C}from"./index-40878854.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,x as $,h as r}from"./index-42e67982.js";const O={__name:"InternalsView",setup(I){const n=k(!0),a=B(),{toClipboard:u}=y();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"),x=e("v-card");return N(),S(x,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-01886c92.js b/www/fhemapp4/assets/PanelCard-01886c92.js new file mode 100644 index 0000000..f4a9319 --- /dev/null +++ b/www/fhemapp4/assets/PanelCard-01886c92.js @@ -0,0 +1,18 @@ +import{u as Z,c as C,r as y,o as h,b as P,y as q,t as j,k as z,a as O,w as k,j as J,z as ye,F as Y,e as w,s as X,f as I,q as Q,x as ae,d as he,l as Ae,A as le,B as se,C as Me,D as Ve,E as ke,G as be,H as Oe,m as Se,I as Te,J as Pe,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-42e67982.js";const We={__name:"PanelMainInfo",props:{el:Object,iconmap:Array,devices:Object,height:String},setup(e){const t=e,n=Z(),r=C(()=>n.handleDefs(t.el.text,["text","format"],["",!t.el.text2&&!t.el.text3&&!t.el.icon?"text-h6":"text-caption"])),u=C(()=>n.handleDefs(t.el.text2,["text","format"],["",t.el.text&&!t.el.text3&&!t.el.icon?"text-h6":"text-caption"])),l=C(()=>n.handleDefs(t.el.text3,["text","format"],["","text-caption"])),c=C(()=>{let a=n.handleDefs(t.el.icon,["icon","color","size"],["","","x-large"]);return a.icon&&(a.icon=n.getIcon(a.icon,t.iconmap)),a}),i=C(()=>{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,o)=>{const d=y("v-icon"),v=y("v-progress-circular"),g=y("v-progress-linear");return h(),P(Y,null,[e.el.text?(h(),P("div",{key:0,class:q(r.value.format)},j(r.value.text),3)):z("",!0),e.el.icon?(h(),O(d,{key:1,color:c.value.color,size:c.value.size},{default:k(()=>[J(j(c.value.icon),1)]),_:1},8,["color","size"])):z("",!0),e.el.status&&!i.value.linear?(h(),O(v,{key:2,width:"4",modelValue:i.value.level,"onUpdate:modelValue":o[0]||(o[0]=E=>i.value.level=E),color:i.value.color,reverse:i.value.reverse},null,8,["modelValue","color","reverse"])):z("",!0),e.el.status&&i.value.linear?(h(),O(g,{key:3,height:"7",rounded:"",modelValue:i.value.level,"onUpdate:modelValue":o[1]||(o[1]=E=>i.value.level=E),color:i.value.color,reverse:i.value.reverse},null,8,["modelValue","color","reverse"])):z("",!0),ye("div",{class:q(e.el.text2?u.value.format:l.value.format)},[e.el.text2?(h(),P("span",{key:0,class:q(u.value.format)},j(u.value.text),3)):z("",!0),e.el.text3?(h(),P("span",{key:1,class:q(l.value.format)},j(l.value.text),3)):z("",!0)],2)],64)}}},Ke={__name:"PanelMainBtn",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=Z(),r=C(()=>{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=C(()=>{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}),l={timer:!1,long:!1};function c(a){let o=[],d=a.cmd,v;if(a.type==="cmd"){for(const g of t.devices)o=g.split(":"),v=RegExp(o[0],"g"),v.test(d)&&(d=d.replace(v,o[1]));n.request("text",d)}a.type==="route"&&X.push({name:"devices",params:{view:a.cmd},query:X.currentRoute.value.query}),a.type==="url"&&window.open(a.cmd,"_self")}function i(a){let o=n.handleDefs(t.el.click,["cmd","type"],["","cmd"],!1,null,!0),d=n.handleDefs(t.el.longClick,["cmd","type"],["","cmd"],!1,null,!0),v=n.handleDefs(t.el.longRelease,["cmd","type"],["","cmd"],!1,null,!0);a==="mouseStart"&&(l.timer=setTimeout(()=>{l.long=!0,d.cmd&&c(d)},1e3)),a==="mouseEnd"&&(l.long?v.cmd&&c(v):o.cmd&&c(o),clearTimeout(l.timer),l.long=!1)}return(a,o)=>{const d=y("v-progress-linear"),v=y("v-icon"),g=y("v-btn");return h(),P(Y,null,[e.el.status?(h(),O(d,{key:0,height:"4",modelValue:u.value.level,"onUpdate:modelValue":o[0]||(o[0]=E=>u.value.level=E),color:u.value.color,reverse:u.value.reverse},null,8,["modelValue","color","reverse"])):z("",!0),w(g,{icon:"",variant:r.value.variant,disabled:r.value.disabled,color:r.value.color,onMousedown:o[1]||(o[1]=E=>i("mouseStart")),onMouseup:o[2]||(o[2]=E=>i("mouseEnd")),class:"my-2"},{default:k(()=>[w(v,{size:"large"},{default:k(()=>[J(j(r.value.icon),1)]),_:1})]),_:1},8,["variant","disabled","color"])],64)}}},Je={class:"text-white"},$e={__name:"PanelMainSlider",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=Z(),r=I();function u(a){r.value=a}const l=C(()=>{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",r.value)),u(a.current),a});let c=null;function i(a){let o=l.value.cmd,d=/\./.exec(l.value.steps),v=0,g=[];d&&(v=l.value.steps.slice(d.index).length-1),o=o.replace("%v",a.toFixed(v));for(const E of t.devices)g=E.split(":"),RegExp(g[0]).test(o)&&(o=o.replace(g[0],g[1]));clearTimeout(c),c=setTimeout(()=>{n.request("text",o)},500)}return(a,o)=>{const d=y("v-slider");return h(),O(d,{modelValue:r.value,"onUpdate:modelValue":[o[0]||(o[0]=v=>r.value=v),o[1]||(o[1]=v=>i(v))],min:l.value.min,max:l.value.max,step:l.value.steps,reverse:l.value.reverse,direction:l.value.vertical?"vertical":"horizontal","track-size":l.value.size,color:l.value.color,"hide-details":"","thumb-label":""},{"thumb-label":k(({modelValue:v})=>[ye("div",Je,j(v),1)]),_:1},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=Z(),r=I(!1),u=C(()=>n.handleDefs(t.el.image,["source","height"],["",null]));return(l,c)=>{const i=y("v-skeleton-loader"),a=y("v-img");return h(),P(Y,null,[r.value?z("",!0):(h(),O(i,{key:0,type:"image"})),w(a,{src:u.value.source,height:u.value.height,onLoad:c[0]||(c[0]=o=>r.value=!0)},null,8,["src","height"])],64)}}},Ze={__name:"PanelMainMenu",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=Z(),r=I([]);Q(t.el,i=>{l()});const u=C(()=>{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});async function l(){let i=n.handleDefs(t.el.menu,["name","cmd","convert"],["","",null],!0,","),a,o,d;for(const v of i){a=/^get/.test(v.name)?await c(v.name):v.name;for(const g of[",","|",` +`])RegExp(g).test(a)&&(o=g);for(const g of a.split(o))g&&(d=g,/%v/.test(v.cmd)&&v.convert==="regExp"&&(d=RegExp(g.replace(/[^a-z,^A-Z]/g,"."))),r.value.push({name:g,cmd:v.cmd.replace(/%v/g,d)}))}}async function c(i){let a=[];for(const o of t.devices)a=o.split(":"),RegExp(a[0]).test(i)&&(i=i.replace(a[0],a[1]));return n.request("text",i)}return l(),(i,a)=>{const o=y("v-icon"),d=y("v-btn"),v=y("v-list-item-title"),g=y("v-list-item"),E=y("v-list"),x=y("v-menu");return h(),O(x,null,{activator:k(({props:m})=>[w(d,ae(m,{icon:"",variant:u.value.variant,disabled:u.value.disabled||r.value.length<1,color:u.value.color,class:"my-2"}),{default:k(()=>[w(o,{size:"large"},{default:k(()=>[J(j(u.value.icon),1)]),_:1})]),_:2},1040,["variant","disabled","color"])]),default:k(()=>[w(E,null,{default:k(()=>[(h(!0),P(Y,null,he(r.value,(m,_)=>(h(),O(g,{key:_,value:_,onClick:f=>c(m.cmd)},{default:k(()=>[w(v,null,{default:k(()=>[J(j(m.name),1)]),_:2},1024)]),_:2},1032,["value","onClick"]))),128))]),_:1})]),_:1})}}};var me=null;function Ye(e){return me||(me=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){return setTimeout(t,16)}).bind(window)),me(e)}var pe=null;function Xe(e){pe||(pe=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(t){clearTimeout(t)}).bind(window)),pe(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 ue(e,t){t===void 0&&(t={});var n=document.createElement(e);return Object.keys(t).forEach(function(r){n[r]=t[r]}),n}function Le(e,t,n){var r=window.getComputedStyle(e,n||null)||{display:"none"};return r[t]}function ge(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 et='.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%}',xe=0,de=null;function tt(e,t){e.__resize_mutation_handler__||(e.__resize_mutation_handler__=it.bind(e));var n=e.__resize_listeners__;if(!n){if(e.__resize_listeners__=[],window.ResizeObserver){var r=e.offsetWidth,u=e.offsetHeight,l=new ResizeObserver(function(){!e.__resize_observer_triggered__&&(e.__resize_observer_triggered__=!0,e.offsetWidth===r&&e.offsetHeight===u)||ve(e)}),c=ge(e),i=c.detached,a=c.rendered;e.__resize_observer_triggered__=i===!1&&a===!1,e.__resize_observer__=l,l.observe(e)}else if(e.attachEvent&&e.addEventListener)e.__resize_legacy_resize_handler__=function(){ve(e)},e.attachEvent("onresize",e.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);else if(xe||(de=Qe(et)),rt(e),e.__resize_rendered__=ge(e).rendered,window.MutationObserver){var o=new MutationObserver(e.__resize_mutation_handler__);o.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),e.__resize_mutation_observer__=o}}e.__resize_listeners__.push(t),xe++}function nt(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",we),e.removeChild(e.__resize_triggers__.triggers),e.__resize_triggers__=null),e.__resize_listeners__=null}!--xe&&de&&de.parentNode.removeChild(de)}}function at(e){var t=e.__resize_last__,n=t.width,r=t.height,u=e.offsetWidth,l=e.offsetHeight;return u!==n||l!==r?{width:u,height:l}:null}function it(){var e=ge(this),t=e.rendered,n=e.detached;t!==this.__resize_rendered__&&(!n&&this.__resize_triggers__&&(ze(this),this.addEventListener("scroll",we,!0)),this.__resize_rendered__=t,ve(this))}function we(){var e=this;ze(this),this.__resize_raf__&&Xe(this.__resize_raf__),this.__resize_raf__=Ye(function(){var t=at(e);t&&(e.__resize_last__=t,ve(e))})}function ve(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=ue("div",{className:"resize-triggers"}),r=ue("div",{className:"resize-expand-trigger"}),u=ue("div"),l=ue("div",{className:"resize-contract-trigger"});r.appendChild(u),n.appendChild(r),n.appendChild(l),e.appendChild(n),e.__resize_triggers__={triggers:n,expand:r,expandChild:u,contract:l},ze(e),e.addEventListener("scroll",we,!0),e.__resize_last__={width:e.offsetWidth,height:e.offsetHeight}}function ze(e){var t=e.__resize_triggers__,n=t.expand,r=t.expandChild,u=t.contract,l=u.scrollWidth,c=u.scrollHeight,i=n.offsetWidth,a=n.offsetHeight,o=n.scrollWidth,d=n.scrollHeight;u.scrollLeft=l,u.scrollTop=c,r.style.width=i+1+"px",r.style.height=a+1+"px",n.scrollLeft=o,n.scrollTop=d}var G=function(){return G=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"||typeof customElements>"u")return te=!1;try{new Function("tag",`class EChartsElement extends HTMLElement { + __dispose = null; + + disconnectedCallback() { + if (this.__dispose) { + this.__dispose(); + this.__dispose = null; + } + } +} + +if (customElements.get(tag) == null) { + customElements.define(tag, EChartsElement); +} +`)(Re)}catch{return te=!1}return te=!0}(),mt="ecTheme",pt="ecInitOptions",_t="ecUpdateOptions",ht=Ae({name:"echarts",props:G(G({option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean},st),vt),emits:{},inheritAttrs:!1,setup:function(e,t){var n=t.attrs,r=le(),u=le(),l=le(),c=le(),i=se(mt,null),a=se(pt,null),o=se(_t,null),d=Me(e),v=d.autoresize,g=d.manualUpdate,E=d.loading,x=d.loadingOptions,m=C(function(){return c.value||e.option||null}),_=C(function(){return e.theme||ce(i,{})}),f=C(function(){return e.initOptions||ce(a,{})}),R=C(function(){return e.updateOptions||ce(o,{})}),p=C(function(){return function(b){var D={};for(var A in b)ct(A)||(D[A]=b[A]);return D}(n)}),T=Ve().proxy.$listeners;function S(b){if(u.value){var D=l.value=Te(u.value,_.value,f.value);e.group&&(D.group=e.group);var A=T;A||(A={},Object.keys(n).filter(function(M){return M.indexOf("on")===0&&M.length>2}).forEach(function(M){var V=M.charAt(2).toLowerCase()+M.slice(3);V.substring(V.length-4)==="Once"&&(V="~".concat(V.substring(0,V.length-4))),A[V]=n[M]})),Object.keys(A).forEach(function(M){var V=A[M];if(V){var U=M.toLowerCase();U.charAt(0)==="~"&&(U=U.substring(1),V.__once__=!0);var B=D;if(U.indexOf("zr:")===0&&(B=D.getZr(),U=U.substring(3)),V.__once__){delete V.__once__;var ee=V;V=function(){for(var F=[],W=0;W(E(),"height: "+(/=maximized$/.test(n.app.currentView)?window.innerHeight-250+"px":t.height)));function d(x){return l.d(x,{dateStyle:u.value?"short":"long"})}function v(x,m){let _;return i.value.from&&m&&(_=i.value.from),i.value.to&&!m&&(_=i.value.to),!_&&!isNaN(x)&&(_=(f=>new Date(f.setDate(f.getDate()+(Number(x)||0))))(new Date)),_||(_=new Date(/.*T.*/.test(x)?x:x+"T00:00:00")),!i.value.from&&m&&(i.value.from=_),!i.value.to&&!m&&(i.value.to=_),_=new Date(_.getTime()-_.getTimezoneOffset()*60*1e3),_.toISOString().split("T")[0]}async function g(){let x=n.handleDefs(t.el.serie,["data","name","digits","suffix","type"],[null,"",0,"","line"],!0),m,_,f=[],R,p,T,S,N,L=[];if(x.length>0)for(const s of x){if(/^get.*/.test(s.data)){N="time",m=s.data.split(" ");for(const b of t.devices)b.split(":")[0]===m[1]&&(m[1]=b.split(":")[1]);if(m[4]=v(m[4],!0),m[5]=v(m[5],!1),_=await n.request("text",m.join(" ")),S=[],f=_.split(` +`),f.length>0)for(const b of f)R=b.split(" "),R.length>1&&(p=new Date(R[0].replace("_","T")),T=parseFloat(R[1]).toFixed(s.digits),S.push([p,T]))}else/^\[.*\]/.test(s.data)?S=n.stringToJson(s.data):S=[n.replacer("%n("+s.digits+")",s.data,!0)];L.push({xAxisType:N,type:s.type,name:s.name,digits:s.digits,suffix:s.suffix,data:S})}return L}async function E(){let x={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:{}},m=JSON.parse(JSON.stringify(n.getEl(t.el,["options"])||{})),_=JSON.parse(JSON.stringify(n.getEl(t.el,["options2"])||{})),f=Object.assign(x,/=maximized$/.test(n.app.currentView)&&Object.keys(_).length>0?_:m),R;i.value.fromMenu=!1,i.value.toMenu=!1,i.value.loaded=!1,a=await g();for(const[p,T]of Object.entries(a))R={formatter:S=>S.toLocaleString(l.locale.value,{minimumFractionDigits:T.digits,maximumFractionDigits:T.digits})+T.suffix},f.series[p]||(f.series[p]={}),f.yAxis[p]||(f.yAxis[p]={}),f.legend.data||(f.legend.data=[]),f.xAxis.type||(f.xAxis.type=T.xAxisType),f.yAxis[p].type||(f.yAxis[p].type="value"),f.yAxis[p].axisLabel||(f.yAxis[p].axisLabel={}),f.yAxis[p].axisLabel.formatter||(f.yAxis[p].axisLabel.formatter=R.formatter),f.legend.data[p]||(f.legend.data[p]=T.name),f.series[p].name||(f.series[p].name=T.name),f.series[p].type||(f.series[p].type=T.type),f.series[p].data||(f.series[p].data=T.data),f.series[p].detail||(f.series[p].detail={}),f.series[p].detail.formatter||(f.series[p].detail.formatter=R.formatter),f.series[p].tooltip||(f.series[p].tooltip={}),f.series[p].tooltip.valueFormatter||(f.series[p].tooltip.valueFormatter=R.formatter);n.log(7,"Chartdata chart.loaded.",f),c.value=Object.assign({},f),i.value.loaded=!0}return(x,m)=>{const _=y("v-btn"),f=y("v-date-picker"),R=y("v-locale-provider"),p=y("v-menu"),T=y("v-skeleton-loader");return h(),P(Y,null,[/=maximized$/.test(K(n).app.currentView)?(h(),P("div",gt,[w(p,{modelValue:i.value.fromMenu,"onUpdate:modelValue":m[2]||(m[2]=S=>i.value.fromMenu=S),"close-on-content-click":!1},{activator:k(({props:S})=>[w(_,ae(S,{variant:"outlined","append-icon":"mdi-calendar",class:"mr-2"}),{default:k(()=>[J(j(d(i.value.from)),1)]),_:2},1040)]),default:k(()=>[w(R,{locale:K(l).locale.value},{default:k(()=>[w(f,{modelValue:i.value.from,"onUpdate:modelValue":[m[0]||(m[0]=S=>i.value.from=S),m[1]||(m[1]=S=>E())],color:"secondary"},null,8,["modelValue"])]),_:1},8,["locale"])]),_:1},8,["modelValue"]),J(" - "),w(p,{modelValue:i.value.toMenu,"onUpdate:modelValue":m[5]||(m[5]=S=>i.value.toMenu=S),"close-on-content-click":!1},{activator:k(({props:S})=>[w(_,ae(S,{variant:"outlined","append-icon":"mdi-calendar",class:"ml-2"}),{default:k(()=>[J(j(d(i.value.to)),1)]),_:2},1040)]),default:k(()=>[w(R,{locale:K(l).locale.value},{default:k(()=>[w(f,{modelValue:i.value.to,"onUpdate:modelValue":[m[3]||(m[3]=S=>i.value.to=S),m[4]||(m[4]=S=>E())],color:"secondary"},null,8,["modelValue"])]),_:1},8,["locale"])]),_:1},8,["modelValue"])])):z("",!0),ye("div",{style:Ue(o.value)},[i.value.loaded?z("",!0):(h(),O(T,{key:0,type:"text, image, text"})),i.value.loaded?(h(),O(K(ht),{key:1,option:c.value,theme:K(r).global.name.value==="dark"?"dark":"light",autoresize:""},null,8,["option","theme"])):z("",!0)],4)],64)}}},yt=180/Math.PI,Ee=e=>{const t=e%360;return t<0?360+t:t},bt=({x:e,y:t},n)=>{const r=n.left+n.width/2,u=n.top+n.height/2;return Math.atan2(t-u,e-r)*yt},_e=()=>{};class wt{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=Ee(t),this.updateCSS())}initOptions(t){t=t||{},this.onRotate=t.onRotate||_e,this.onDragStart=t.onDragStart||_e,this.onDragStop=t.onDragStop||_e,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,r=bt({x:n.clientX,y:n.clientY},this.element.getBoundingClientRect());this._angle=Ee(r+90),this.updateCSS(),this.onRotate(this._angle)}updateCSS(){this.element.style.transform="rotate("+this._angle+"deg)"}}const zt=["red","yellow","green","cyan","blue","magenta","red"],De={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},fe={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=I(null),r=I(null);let u=null;const l=e.hue+"deg",c=I(e.hue),i=I(!e.initiallyCollapsed),a=I(!e.initiallyCollapsed),o=I(!1),d=I(!1),v=I(!1),g=C(()=>`hsla(${c.value}, ${e.saturation}%, ${e.luminosity}%, ${e.alpha})`),E=C(()=>zt[Math.round(c.value/60)]);return Q(()=>e.hue,p=>{c.value=p,u.angle=p}),be(()=>{u=new wt(r.value,{angle:c.value,onRotate(p){c.value=p,t("input",c.value)},onDragStart(){v.value=!0},onDragStop(){v.value=!1,t("change",c.value)}})}),Oe(()=>{u.destroy(),u=null}),{rcp:u,el:n,rotator:r,initialAngle:l,angle:c,isPaletteIn:i,isKnobIn:a,isDragging:v,isRippling:d,isPressed:o,color:g,valuetext:E,onKeyDown:p=>{e.disabled||o.value||!a.value||!(p.key in De)||(p.preventDefault(),u.angle=De[p.key](u.angle,e.step),c.value=u.angle,t("input",c.value),t("change",c.value))},onScroll:p=>{o.value||!a.value||(p.preventDefault(),p.deltaY>0?u.angle+=e.step:u.angle-=e.step,c.value=u.angle,t("input",c.value),t("change",c.value))},selectColor:()=>{o.value=!0,i.value&&a.value?(t("select",c.value),d.value=!0):i.value=!0},togglePicker:()=>{e.variant!=="persistent"&&(a.value?a.value=!1:(a.value=!0,i.value=!0)),d.value=!1,o.value=!1},hidePalette:()=>{a.value||(i.value=!1)}}}};function kt(e,t,n,r,u,l){return h(),O("div",{ref:"el",role:"slider","aria-roledescription":n.ariaRoledescription,"aria-label":n.ariaLabel,"aria-expanded":r.isPaletteIn,"aria-valuemin":"0","aria-valuemax":"359","aria-valuenow":r.angle,"aria-valuetext":n.ariaValuetext||r.valuetext,"aria-disabled":n.disabled,class:["rcp",{dragging:r.isDragging,disabled:n.disabled}],tabindex:n.disabled?-1:0,style:{"--rcp-initial-angle":r.initialAngle},onKeyup:t[4]||(t[4]=qe((...c)=>r.selectColor&&r.selectColor(...c),["enter"])),onKeydown:t[5]||(t[5]=(...c)=>r.onKeyDown&&r.onKeyDown(...c))},[w("div",{class:["rcp__palette",r.isPaletteIn?"in":"out"]},null,2),w("div",ae({class:"rcp__rotator",style:{"pointer-events":n.disabled||r.isPressed||!r.isKnobIn?"none":null}},He(n.mouseScroll?{wheel:r.onScroll}:{}),{ref:"rotator"}),[w("div",{class:["rcp__knob",r.isKnobIn?"in":"out"],onTransitionend:t[1]||(t[1]=(...c)=>r.hidePalette&&r.hidePalette(...c))},null,34)],16),w("div",{class:["rcp__ripple",{rippling:r.isRippling}],style:{borderColor:r.color}},null,6),w("button",{type:"button",class:["rcp__well",{pressed:r.isPressed}],"aria-label":n.ariaLabelColorWell,disabled:n.disabled,tabindex:n.disabled?-1:0,style:{backgroundColor:r.color},onAnimationend:t[2]||(t[2]=(...c)=>r.togglePicker&&r.togglePicker(...c)),onClick:t[3]||(t[3]=(...c)=>r.selectColor&&r.selectColor(...c))},null,46,["aria-label","disabled","tabindex"])],46,["aria-roledescription","aria-label","aria-expanded","aria-valuenow","aria-valuetext","aria-disabled","tabindex"])}fe.render=kt;fe.install=function(e){e.component("ColorPicker",fe)};const St={class:"mt-4 mb-2"},Ct={__name:"PanelMainColorpicker",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=Z(),r=C(()=>n.handleDefs(t.el.picker,["cmd","current"],["",!1]));function u(i){let a=l(i,50,100),o=r.value.cmd,d=[];o=o.replace("%v",a);for(const v of t.devices)d=v.split(":"),RegExp(d[0]).test(o)&&(o=o.replace(d[0],d[1]));n.request("text",o)}function l(i,a,o){a/=100;const d=o*Math.min(a,1-a)/100,v=g=>{const E=(g+i/30)%12,x=a-d*Math.max(Math.min(E-3,9-E,1),-1);return Math.round(255*x).toString(16).padStart(2,"0")};return`${v(0)}${v(8)}${v(4)}`}function c(i){i.split(" ").length>1&&(i=i.split(" ").slice(-1)[0]),i=i.replace(/^#/,"");let a=parseInt(i,16),o=a>>16&255,d=a>>8&255,v=a&255;o/=255,d/=255,v/=255;let g=Math.max(o,d,v),E=Math.min(o,d,v),x=g-E,m=(g+E)/2,_=0,f=0;return x!==0&&(g===o?_=((d-v)/x+(d(h(),P("div",St,[w(K(fe),ae(c(r.value.current),{variant:"persistent",onChange:a[0]||(a[0]=o=>u(o))}),null,16)]))}},Et={__name:"PanelMain",props:{main:Object,levels:Array,iconmap:Object,devices:Object},setup(e){const t=Z();function n(i,a){return t.handleDefs(i[a].size,["size"],[!1]).size}function r(i){let a="";return["info"].indexOf(i)!==-1&&(a="mx-2"),a}function u(i,a){return i[a]?t.handleDefs(i[a].divider,["show"],[!1]).show:!1}function l(i){return i.level?t.handleDefs(i.level.height,["height"],["64px"]).height:"64px"}function c(i){if(i==="info")return We;if(i==="btn")return Ke;if(i==="slider")return $e;if(i==="image")return Ge;if(i==="menu")return Ze;if(i==="chart")return xt;if(i==="colorpicker")return Ct}return(i,a)=>{const o=y("v-sheet"),d=y("v-col"),v=y("v-divider"),g=y("v-row"),E=y("v-expand-transition");return h(!0),P(Y,null,he(e.main,(x,m)=>(h(),P("div",{key:m},[w(E,null,{default:k(()=>[e.levels.indexOf(m)!==-1?(h(),O(g,{key:0,"no-gutters":"",class:"text-center align-center"},{default:k(()=>[w(o,{height:l(x,"level")},null,8,["height"]),(h(),P(Y,null,he(["left1","left2","mid","right1","right2"],_=>(h(),P(Y,{key:_},[x.level[_]?(h(),O(d,{key:0,cols:n(x,_),class:q(r(x.level[_]))},{default:k(()=>[(h(),O(Be(c(x.level[_])),{el:x[_],iconmap:e.iconmap,devices:e.devices,height:l(x,"level")},null,8,["el","iconmap","devices","height"]))]),_:2},1032,["cols","class"])):z("",!0),u(x,_)?(h(),O(v,{key:1,vertical:""})):z("",!0)],64))),64)),u(x,"level")?(h(),O(v,{key:0})):z("",!0)]),_:2},1024)):z("",!0)]),_:2},1024)]))),128)}}},Dt={key:0},Lt={__name:"PanelCard",props:{panel:Object},setup(e){const t=e,n=Z();let r=n.thread();be(()=>n.thread(r));function u(L){let s=n.handleDefs(t.panel.status[L],["level","color","min","max","reverse"],[0,"success",0,100,!1]);return s.level=Math.round((s.level-s.min)/(s.max-s.min)*100),s}const l=C(()=>u("bar")),c=C(()=>u("bar2")),i=C(()=>n.handleDefs(t.panel.status.imageUrl,["url"],[""])),a=C(()=>n.handleDefs(t.panel.panel.sortby,["sortby"],[null])),o=C(()=>n.handleDefs(t.panel.status.title,["title"],[""])),d=I(n.handleDefs(t.panel.panel.expandable,["expandable","expanded","maximizable"],[!1,!1,!1]));Q(t.panel.main,L=>{let s=v(L);d.value.activeLevels.join("-")!==s.join("-")&&(d.value.activeLevels=s,g(!0))});function v(L){let s=[];for(const[b,D]of Object.entries(L))n.handleDefs(D.level.show,["show"],[!0]).show&&s.push(Number(b));return s}function g(L){let s=d.value,b;L?(s.activeLevels=v(t.panel.main),/=maximized$/.test(n.app.currentView)&&(s.expanded=!0)):(s.expandable&&(s.expanded=!s.expanded),s.maximizable&&(s.expanded?X.push({name:"devices",params:{view:"panel="+t.panel.name+"=maximized"},query:X.currentRoute.value.query}):(n.app.currentView=n.app.currentView.replace(/=maximized$/,""),X.back()))),s.expanded?s.levels=s.activeLevels:s.expandable||L?s.levels=[s.activeLevels[0]]:(b=s.activeLevels.indexOf(s.levels[0]),s.levels=[s.activeLevels[b+1]>=0?s.activeLevels[b+1]:s.activeLevels[0]]),s.activeLevels.length>1||s.maximizable?s.icon=s.expandable?s.expanded?"mdi-arrow-collapse":"mdi-arrow-expand":s.expanded?"":"mdi-swap-vertical":s.icon=""}function E(L){let s=n.app.config.panels.map(A=>A.name).indexOf(L),b,D;if(s!==-1&&(D=n.app.config.panels[s].template,b=n.app.config.templates.map(A=>A.name).indexOf(D),b!==-1&&!n.app.config.templates[b].dist))return D}function x(L,s){X.push({name:"settings",params:{tab:s,item:L},query:X.currentRoute.value.query})}function m(L){let s=n.handleDefs(t.panel.info[L],["text","icon","color"],["","",""]);return s.icon&&(s.icon=n.getIcon(s.icon,t.panel.panel.iconmap)),s}function _(L){let s=["left1","left2","mid1","mid2","right1","right2"],b=m(L);return m(s[s.indexOf(L)-1]).text&&b.text&&!b.icon?"ml-1 text-truncate":b.text?"text-truncate":""}const f=C(()=>m("left1")),R=C(()=>m("left2")),p=C(()=>m("mid1")),T=C(()=>m("mid2")),S=C(()=>m("right1")),N=C(()=>m("right2"));return g(!0),(L,s)=>{const b=y("v-progress-linear"),D=y("v-col"),A=y("v-row"),H=y("v-toolbar-title"),M=y("v-btn"),V=y("v-toolbar"),U=y("v-img"),B=y("v-sheet"),ee=y("v-card-text"),F=y("v-icon"),W=y("v-spacer"),ie=y("v-system-bar"),re=y("v-layout"),oe=y("v-card");return K(n).app.isReady?(h(),O(oe,{key:0,variant:"tonal"},{default:k(()=>[w(A,{"no-gutters":""},{default:k(()=>[e.panel.status.bar?(h(),O(D,{key:0},{default:k(()=>[w(b,{height:"7",modelValue:l.value.level,"onUpdate:modelValue":s[0]||(s[0]=$=>l.value.level=$),color:l.value.color,reverse:l.value.reverse},null,8,["modelValue","color","reverse"])]),_:1})):z("",!0),e.panel.status.bar2?(h(),O(D,{key:1},{default:k(()=>[w(b,{height:"7",modelValue:c.value.level,"onUpdate:modelValue":s[1]||(s[1]=$=>c.value.level=$),color:c.value.color,reverse:c.value.reverse},null,8,["modelValue","color","reverse"])]),_:1})):z("",!0)]),_:1}),w(B,{color:"primary"},{default:k(()=>[w(U,{src:i.value.url,gradient:i.value.url?K(n).app.header.imageGradient:"",height:"48",cover:""},{default:k(()=>[w(V,{color:"transparent",density:"compact",class:"pr-1"},{append:k(()=>[K(n).app.settings.loglevel>6?(h(),P("div",Dt,[J(j(a.value.sortby)+" ",1),E(e.panel.name)?(h(),O(M,{key:0,icon:"mdi-application-edit-outline",size:"small",variant:"plain",onClick:s[2]||(s[2]=$=>x(E(e.panel.name),"templates"))})):z("",!0),w(M,{icon:"mdi-pencil",size:"small",variant:"plain",onClick:s[3]||(s[3]=$=>x(e.panel.name,"panels"))})])):z("",!0),d.value.icon?(h(),O(M,{key:1,icon:d.value.icon,size:"small",variant:"plain",density:"compact",onClick:s[4]||(s[4]=$=>g())},null,8,["icon"])):z("",!0)]),default:k(()=>[w(H,{class:"text-truncate"},{default:k(()=>[J(j(o.value.title),1)]),_:1})]),_:1})]),_:1},8,["src","gradient"])]),_:1}),w(Et,{main:e.panel.main,levels:d.value.levels,iconmap:e.panel.panel.iconmap,devices:e.panel.panel.devices},null,8,["main","levels","iconmap","devices"]),t.panel.internals?(h(),O(ee,{key:0},{default:k(()=>[J(j(t.panel.internals),1)]),_:1})):z("",!0),w(re,{style:{height:"24px"}},{default:k(()=>[w(ie,{color:"secondary"},{default:k(()=>[f.value.icon?(h(),O(F,{key:0,icon:f.value.icon,color:f.value.color},null,8,["icon","color"])):z("",!0),f.value.text?(h(),P("span",{key:1,class:q(_("left1"))},j(f.value.text),3)):z("",!0),R.value.icon?(h(),O(F,{key:2,icon:R.value.icon,color:R.value.color},null,8,["icon","color"])):z("",!0),R.value.text?(h(),P("span",{key:3,class:q(_("left2"))},j(R.value.text),3)):z("",!0),w(W),p.value.icon?(h(),O(F,{key:4,icon:p.value.icon,color:p.value.color},null,8,["icon","color"])):z("",!0),p.value.text?(h(),P("span",{key:5,class:q(_("mid1"))},j(p.value.text),3)):z("",!0),T.value.icon?(h(),O(F,{key:6,icon:T.value.icon,color:T.value.color},null,8,["icon","color"])):z("",!0),T.value.text?(h(),P("span",{key:7,class:q(_("mid2"))},j(T.value.text),3)):z("",!0),w(W),S.value.icon?(h(),O(F,{key:8,icon:S.value.icon,color:S.value.color},null,8,["icon","color"])):z("",!0),S.value.text?(h(),P("span",{key:9,class:q(_("right1"))},j(S.value.text),3)):z("",!0),N.value.icon?(h(),O(F,{key:10,icon:N.value.icon,color:N.value.color},null,8,["icon","color"])):z("",!0),N.value.text?(h(),P("span",{key:11,class:q(_("right2"))},j(N.value.text),3)):z("",!0)]),_:1})]),_:1})]),_:1})):z("",!0)}}};export{Lt as _}; diff --git a/www/fhemapp4/assets/PanelCard-ca7331d5.js b/www/fhemapp4/assets/PanelCard-ca7331d5.js deleted file mode 100644 index 2417724..0000000 --- a/www/fhemapp4/assets/PanelCard-ca7331d5.js +++ /dev/null @@ -1,18 +0,0 @@ -import{u as $,c as S,r as y,o as p,b as P,y as q,t as I,k as b,a as E,w as z,j as J,z as ge,F as Y,e as w,s as Q,f as N,q as ee,x as ae,d as _e,l as Ae,A as ie,B as le,C as Me,D as Ve,E as ke,G as xe,H as Le,m as Se,I as Pe,J as Te,h as B,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-e6e38008.js";const We={__name:"PanelMainInfo",props:{el:Object,iconmap:Array,devices:Object,height:String},setup(e){const t=e,n=$(),i=S(()=>n.handleDefs(t.el.text,["text","format"],["",!t.el.text2&&!t.el.text3&&!t.el.icon?"text-h6":"text-caption"])),s=S(()=>n.handleDefs(t.el.text2,["text","format"],["",t.el.text&&!t.el.text3&&!t.el.icon?"text-h6":"text-caption"])),o=S(()=>n.handleDefs(t.el.text3,["text","format"],["","text-caption"])),u=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=y("v-icon"),v=y("v-progress-circular"),x=y("v-progress-linear");return p(),P(Y,null,[e.el.text?(p(),P("div",{key:0,class:q(i.value.format)},I(i.value.text),3)):b("",!0),e.el.icon?(p(),E(c,{key:1,color:u.value.color,size:u.value.size},{default:z(()=>[J(I(u.value.icon),1)]),_:1},8,["color","size"])):b("",!0),e.el.status&&!r.value.linear?(p(),E(v,{key:2,width:"4",modelValue:r.value.level,"onUpdate:modelValue":l[0]||(l[0]=C=>r.value.level=C),color:r.value.color,reverse:r.value.reverse},null,8,["modelValue","color","reverse"])):b("",!0),e.el.status&&r.value.linear?(p(),E(x,{key:3,height:"7",rounded:"",modelValue:r.value.level,"onUpdate:modelValue":l[1]||(l[1]=C=>r.value.level=C),color:r.value.color,reverse:r.value.reverse},null,8,["modelValue","color","reverse"])):b("",!0),ge("div",{class:q(e.el.text2?s.value.format:o.value.format)},[e.el.text2?(p(),P("span",{key:0,class:q(s.value.format)},I(s.value.text),3)):b("",!0),e.el.text3?(p(),P("span",{key:1,class:q(o.value.format)},I(o.value.text),3)):b("",!0)],2)],64)}}},Ke={__name:"PanelMainBtn",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=$(),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}),s=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}),o={timer:!1,long:!1};function u(a){let l=[],c=a.cmd,v;if(a.type==="cmd"){for(const x of t.devices)l=x.split(":"),v=RegExp(l[0],"g"),v.test(c)&&(c=c.replace(v,l[1]));n.request("text",c)}a.type==="route"&&Q.push({name:"devices",params:{view:a.cmd},query:Q.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),v=n.handleDefs(t.el.longRelease,["cmd","type"],["","cmd"],!1,null,!0);a==="mouseStart"&&(o.timer=setTimeout(()=>{o.long=!0,c.cmd&&u(c)},1e3)),a==="mouseEnd"&&(o.long?v.cmd&&u(v):l.cmd&&u(l),clearTimeout(o.timer),o.long=!1)}return(a,l)=>{const c=y("v-progress-linear"),v=y("v-icon"),x=y("v-btn");return p(),P(Y,null,[e.el.status?(p(),E(c,{key:0,height:"4",modelValue:s.value.level,"onUpdate:modelValue":l[0]||(l[0]=C=>s.value.level=C),color:s.value.color,reverse:s.value.reverse},null,8,["modelValue","color","reverse"])):b("",!0),w(x,{icon:"",variant:i.value.variant,disabled:i.value.disabled,color:i.value.color,onMousedown:l[1]||(l[1]=C=>r("mouseStart")),onMouseup:l[2]||(l[2]=C=>r("mouseEnd")),class:"my-2"},{default:z(()=>[w(v,{size:"large"},{default:z(()=>[J(I(i.value.icon),1)]),_:1})]),_:1},8,["variant","disabled","color"])],64)}}},Je={class:"text-white"},$e={__name:"PanelMainSlider",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=$(),i=N();function s(a){i.value=a}const o=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)),s(a.current),a});let u=null;function r(a){let l=o.value.cmd,c=/\./.exec(o.value.steps),v=0,x=[];c&&(v=o.value.steps.slice(c.index).length-1),l=l.replace("%v",a.toFixed(v));for(const C of t.devices)x=C.split(":"),RegExp(x[0]).test(l)&&(l=l.replace(x[0],x[1]));clearTimeout(u),u=setTimeout(()=>{n.request("text",l)},500)}return(a,l)=>{const c=y("v-slider");return p(),E(c,{modelValue:i.value,"onUpdate:modelValue":[l[0]||(l[0]=v=>i.value=v),l[1]||(l[1]=v=>r(v))],min:o.value.min,max:o.value.max,step:o.value.steps,reverse:o.value.reverse,direction:o.value.vertical?"vertical":"horizontal","track-size":o.value.size,color:o.value.color,"hide-details":"","thumb-label":""},{"thumb-label":z(({modelValue:v})=>[ge("div",Je,I(v),1)]),_:1},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=$(),i=N(!1),s=S(()=>n.handleDefs(t.el.image,["source","height"],["",null]));return(o,u)=>{const r=y("v-skeleton-loader"),a=y("v-img");return p(),P(Y,null,[i.value?b("",!0):(p(),E(r,{key:0,type:"image"})),w(a,{src:s.value.source,height:s.value.height,onLoad:u[0]||(u[0]=l=>i.value=!0)},null,8,["src","height"])],64)}}},Ze={__name:"PanelMainMenu",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=$(),i=N([]);ee(t.el,r=>{o()});const s=S(()=>{let r=n.handleDefs(t.el.btn,["icon","disabled","color","variant"],["mdi-dots-vertical",!1,"","text"]);return r.icon&&(r.icon=n.getIcon(r.icon,t.iconmap)),r});async function o(){let r=n.handleDefs(t.el.menu,["name","cmd","convert"],["","",null],!0,","),a,l,c;for(const v of r){a=/^get/.test(v.name)?await u(v.name):v.name;for(const x of[",","|",` -`])RegExp(x).test(a)&&(l=x);for(const x of a.split(l))x&&(c=x,/%v/.test(v.cmd)&&v.convert==="regExp"&&(c=RegExp(x.replace(/[^a-z,^A-Z]/g,"."))),i.value.push({name:x,cmd:v.cmd.replace(/%v/g,c)}))}}async function u(r){let a=[];for(const l of t.devices)a=l.split(":"),RegExp(a[0]).test(r)&&(r=r.replace(a[0],a[1]));return n.request("text",r)}return o(),(r,a)=>{const l=y("v-icon"),c=y("v-btn"),v=y("v-list-item-title"),x=y("v-list-item"),C=y("v-list"),g=y("v-menu");return p(),E(g,null,{activator:z(({props:_})=>[w(c,ae(_,{icon:"",variant:s.value.variant,disabled:s.value.disabled||i.value.length<1,color:s.value.color,class:"my-2"}),{default:z(()=>[w(l,{size:"large"},{default:z(()=>[J(I(s.value.icon),1)]),_:1})]),_:2},1040,["variant","disabled","color"])]),default:z(()=>[w(C,null,{default:z(()=>[(p(!0),P(Y,null,_e(i.value,(_,h)=>(p(),E(x,{key:h,value:h,onClick:f=>u(_.cmd)},{default:z(()=>[w(v,null,{default:z(()=>[J(I(_.name),1)]),_:2},1024)]),_:2},1032,["value","onClick"]))),128))]),_:1})]),_:1})}}};var ve=null;function Ye(e){return ve||(ve=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){return setTimeout(t,16)}).bind(window)),ve(e)}var fe=null;function Xe(e){fe||(fe=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(t){clearTimeout(t)}).bind(window)),fe(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 oe(e,t){t===void 0&&(t={});var n=document.createElement(e);return Object.keys(t).forEach(function(i){n[i]=t[i]}),n}function Oe(e,t,n){var i=window.getComputedStyle(e,n||null)||{display:"none"};return i[t]}function pe(e){if(!document.documentElement.contains(e))return{detached:!0,rendered:!1};for(var t=e;t!==document;){if(Oe(t,"display")==="none")return{detached:!1,rendered:!1};t=t.parentNode}return{detached:!1,rendered:!0}}var et='.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%}',he=0,ue=null;function tt(e,t){e.__resize_mutation_handler__||(e.__resize_mutation_handler__=rt.bind(e));var n=e.__resize_listeners__;if(!n){if(e.__resize_listeners__=[],window.ResizeObserver){var i=e.offsetWidth,s=e.offsetHeight,o=new ResizeObserver(function(){!e.__resize_observer_triggered__&&(e.__resize_observer_triggered__=!0,e.offsetWidth===i&&e.offsetHeight===s)||ce(e)}),u=pe(e),r=u.detached,a=u.rendered;e.__resize_observer_triggered__=r===!1&&a===!1,e.__resize_observer__=o,o.observe(e)}else if(e.attachEvent&&e.addEventListener)e.__resize_legacy_resize_handler__=function(){ce(e)},e.attachEvent("onresize",e.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);else if(he||(ue=Qe(et)),it(e),e.__resize_rendered__=pe(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),he++}function nt(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",ye),e.removeChild(e.__resize_triggers__.triggers),e.__resize_triggers__=null),e.__resize_listeners__=null}!--he&&ue&&ue.parentNode.removeChild(ue)}}function at(e){var t=e.__resize_last__,n=t.width,i=t.height,s=e.offsetWidth,o=e.offsetHeight;return s!==n||o!==i?{width:s,height:o}:null}function rt(){var e=pe(this),t=e.rendered,n=e.detached;t!==this.__resize_rendered__&&(!n&&this.__resize_triggers__&&(be(this),this.addEventListener("scroll",ye,!0)),this.__resize_rendered__=t,ce(this))}function ye(){var e=this;be(this),this.__resize_raf__&&Xe(this.__resize_raf__),this.__resize_raf__=Ye(function(){var t=at(e);t&&(e.__resize_last__=t,ce(e))})}function ce(e){!e||!e.__resize_listeners__||e.__resize_listeners__.forEach(function(t){t.call(e,e)})}function it(e){var t=Oe(e,"position");(!t||t==="static")&&(e.style.position="relative"),e.__resize_old_position__=t,e.__resize_last__={};var n=oe("div",{className:"resize-triggers"}),i=oe("div",{className:"resize-expand-trigger"}),s=oe("div"),o=oe("div",{className:"resize-contract-trigger"});i.appendChild(s),n.appendChild(i),n.appendChild(o),e.appendChild(n),e.__resize_triggers__={triggers:n,expand:i,expandChild:s,contract:o},be(e),e.addEventListener("scroll",ye,!0),e.__resize_last__={width:e.offsetWidth,height:e.offsetHeight}}function be(e){var t=e.__resize_triggers__,n=t.expand,i=t.expandChild,s=t.contract,o=s.scrollWidth,u=s.scrollHeight,r=n.offsetWidth,a=n.offsetHeight,l=n.scrollWidth,c=n.scrollHeight;s.scrollLeft=o,s.scrollTop=u,i.style.width=r+1+"px",i.style.height=a+1+"px",n.scrollLeft=l,n.scrollTop=c}var K=function(){return K=Object.assign||function(e){for(var t,n=1,i=arguments.length;n"u"||typeof customElements>"u")return te=!1;try{new Function("tag",`class EChartsElement extends HTMLElement { - __dispose = null; - - disconnectedCallback() { - if (this.__dispose) { - this.__dispose(); - this.__dispose = null; - } - } -} - -if (customElements.get(tag) == null) { - customElements.define(tag, EChartsElement); -} -`)(Re)}catch{return te=!1}return te=!0}(),mt="ecTheme",_t="ecInitOptions",pt="ecUpdateOptions",ht=Ae({name:"echarts",props:K(K({option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean},st),vt),emits:{},inheritAttrs:!1,setup:function(e,t){var n=t.attrs,i=ie(),s=ie(),o=ie(),u=ie(),r=le(mt,null),a=le(_t,null),l=le(pt,null),c=Me(e),v=c.autoresize,x=c.manualUpdate,C=c.loading,g=c.loadingOptions,_=S(function(){return u.value||e.option||null}),h=S(function(){return e.theme||se(r,{})}),f=S(function(){return e.initOptions||se(a,{})}),A=S(function(){return e.updateOptions||se(l,{})}),m=S(function(){return function(L){var R={};for(var j in L)ct(j)||(R[j]=L[j]);return R}(n)}),V=Ve().proxy.$listeners;function k(L){if(s.value){var R=o.value=Pe(s.value,h.value,f.value);e.group&&(R.group=e.group);var j=V;j||(j={},Object.keys(n).filter(function(T){return T.indexOf("on")===0&&T.length>2}).forEach(function(T){var M=T.charAt(2).toLowerCase()+T.slice(3);M.substring(M.length-4)==="Once"&&(M="~".concat(M.substring(0,M.length-4))),j[M]=n[T]})),Object.keys(j).forEach(function(T){var M=j[T];if(M){var U=T.toLowerCase();U.charAt(0)==="~"&&(U=U.substring(1),M.__once__=!0);var F=R;if(U.indexOf("zr:")===0&&(F=R.getZr(),U=U.substring(3)),M.__once__){delete M.__once__;var X=M;M=function(){for(var G=[],W=0;W(C(),"height: "+(/=maximized$/.test(n.app.currentView)?window.innerHeight-250+"px":t.height)));function c(g){return o.d(g,{dateStyle:s.value?"short":"long"})}function v(g,_){let h;return r.value.from&&_&&(h=r.value.from),r.value.to&&!_&&(h=r.value.to),!h&&!isNaN(g)&&(h=(f=>new Date(f.setDate(f.getDate()+(Number(g)||0))))(new Date)),h||(h=new Date(/.*T.*/.test(g)?g:g+"T00:00:00")),!r.value.from&&_&&(r.value.from=h),!r.value.to&&!_&&(r.value.to=h),h=new Date(h.getTime()-h.getTimezoneOffset()*60*1e3),h.toISOString().split("T")[0]}async function x(){let g=n.handleDefs(t.el.serie,["data","name","digits","suffix","type"],[null,"",0,"","line"],!0),_,h,f=[],A,m,V,k,O,d=[];if(g.length>0)for(const D of g){if(/^get.*/.test(D.data)){O="time",_=D.data.split(" ");for(const L of t.devices)L.split(":")[0]===_[1]&&(_[1]=L.split(":")[1]);if(_[4]=v(_[4],!0),_[5]=v(_[5],!1),h=await n.request("text",_.join(" ")),k=[],f=h.split(` -`),f.length>0)for(const L of f)A=L.split(" "),A.length>1&&(m=new Date(A[0].replace("_","T")),V=parseFloat(A[1]).toFixed(D.digits),k.push([m,V]))}else/^\[.*\]/.test(D.data)?k=n.stringToJson(D.data):k=[n.replacer("%n("+D.digits+")",D.data,!0)];d.push({xAxisType:O,type:D.type,name:D.name,digits:D.digits,suffix:D.suffix,data:k})}return d}async function C(){let g={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:{}},_=JSON.parse(JSON.stringify(n.getEl(t.el,["options"])||{})),h=JSON.parse(JSON.stringify(n.getEl(t.el,["options2"])||{})),f=Object.assign(g,/=maximized$/.test(n.app.currentView)&&Object.keys(h).length>0?h:_),A;r.value.fromMenu=!1,r.value.toMenu=!1,r.value.loaded=!1,a=await x();for(const[m,V]of Object.entries(a))A={formatter:k=>k.toLocaleString(o.locale.value,{minimumFractionDigits:V.digits,maximumFractionDigits:V.digits})+V.suffix},f.series[m]||(f.series[m]={}),f.yAxis[m]||(f.yAxis[m]={}),f.legend.data||(f.legend.data=[]),f.xAxis.type||(f.xAxis.type=V.xAxisType),f.yAxis[m].type||(f.yAxis[m].type="value"),f.yAxis[m].axisLabel||(f.yAxis[m].axisLabel={}),f.yAxis[m].axisLabel.formatter||(f.yAxis[m].axisLabel.formatter=A.formatter),f.legend.data[m]||(f.legend.data[m]=V.name),f.series[m].name||(f.series[m].name=V.name),f.series[m].type||(f.series[m].type=V.type),f.series[m].data||(f.series[m].data=V.data),f.series[m].detail||(f.series[m].detail={}),f.series[m].detail.formatter||(f.series[m].detail.formatter=A.formatter),f.series[m].tooltip||(f.series[m].tooltip={}),f.series[m].tooltip.valueFormatter||(f.series[m].tooltip.valueFormatter=A.formatter);n.log(7,"Chartdata chart.loaded.",f),u.value=Object.assign({},f),r.value.loaded=!0}return(g,_)=>{const h=y("v-btn"),f=y("v-date-picker"),A=y("v-locale-provider"),m=y("v-menu"),V=y("v-skeleton-loader");return p(),P(Y,null,[/=maximized$/.test(B(n).app.currentView)?(p(),P("div",gt,[w(m,{modelValue:r.value.fromMenu,"onUpdate:modelValue":_[2]||(_[2]=k=>r.value.fromMenu=k),"close-on-content-click":!1},{activator:z(({props:k})=>[w(h,ae(k,{variant:"outlined","append-icon":"mdi-calendar",class:"mr-2"}),{default:z(()=>[J(I(c(r.value.from)),1)]),_:2},1040)]),default:z(()=>[w(A,{locale:B(o).locale.value},{default:z(()=>[w(f,{modelValue:r.value.from,"onUpdate:modelValue":[_[0]||(_[0]=k=>r.value.from=k),_[1]||(_[1]=k=>C())],color:"secondary"},null,8,["modelValue"])]),_:1},8,["locale"])]),_:1},8,["modelValue"]),J(" - "),w(m,{modelValue:r.value.toMenu,"onUpdate:modelValue":_[5]||(_[5]=k=>r.value.toMenu=k),"close-on-content-click":!1},{activator:z(({props:k})=>[w(h,ae(k,{variant:"outlined","append-icon":"mdi-calendar",class:"ml-2"}),{default:z(()=>[J(I(c(r.value.to)),1)]),_:2},1040)]),default:z(()=>[w(A,{locale:B(o).locale.value},{default:z(()=>[w(f,{modelValue:r.value.to,"onUpdate:modelValue":[_[3]||(_[3]=k=>r.value.to=k),_[4]||(_[4]=k=>C())],color:"secondary"},null,8,["modelValue"])]),_:1},8,["locale"])]),_:1},8,["modelValue"])])):b("",!0),ge("div",{style:Ue(l.value)},[r.value.loaded?b("",!0):(p(),E(V,{key:0,type:"text, image, text"})),r.value.loaded?(p(),E(B(ht),{key:1,option:u.value,theme:B(i).global.name.value==="dark"?"dark":"light",autoresize:""},null,8,["option","theme"])):b("",!0)],4)],64)}}},yt=180/Math.PI,Ee=e=>{const t=e%360;return t<0?360+t:t},bt=({x:e,y:t},n)=>{const i=n.left+n.width/2,s=n.top+n.height/2;return Math.atan2(t-s,e-i)*yt},me=()=>{};class wt{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=Ee(t),this.updateCSS())}initOptions(t){t=t||{},this.onRotate=t.onRotate||me,this.onDragStart=t.onDragStart||me,this.onDragStop=t.onDragStop||me,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=bt({x:n.clientX,y:n.clientY},this.element.getBoundingClientRect());this._angle=Ee(i+90),this.updateCSS(),this.onRotate(this._angle)}updateCSS(){this.element.style.transform="rotate("+this._angle+"deg)"}}const zt=["red","yellow","green","cyan","blue","magenta","red"],De={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},de={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 s=null;const o=e.hue+"deg",u=N(e.hue),r=N(!e.initiallyCollapsed),a=N(!e.initiallyCollapsed),l=N(!1),c=N(!1),v=N(!1),x=S(()=>`hsla(${u.value}, ${e.saturation}%, ${e.luminosity}%, ${e.alpha})`),C=S(()=>zt[Math.round(u.value/60)]);return ee(()=>e.hue,m=>{u.value=m,s.angle=m}),xe(()=>{s=new wt(i.value,{angle:u.value,onRotate(m){u.value=m,t("input",u.value)},onDragStart(){v.value=!0},onDragStop(){v.value=!1,t("change",u.value)}})}),Le(()=>{s.destroy(),s=null}),{rcp:s,el:n,rotator:i,initialAngle:o,angle:u,isPaletteIn:r,isKnobIn:a,isDragging:v,isRippling:c,isPressed:l,color:x,valuetext:C,onKeyDown:m=>{e.disabled||l.value||!a.value||!(m.key in De)||(m.preventDefault(),s.angle=De[m.key](s.angle,e.step),u.value=s.angle,t("input",u.value),t("change",u.value))},onScroll:m=>{l.value||!a.value||(m.preventDefault(),m.deltaY>0?s.angle+=e.step:s.angle-=e.step,u.value=s.angle,t("input",u.value),t("change",u.value))},selectColor:()=>{l.value=!0,r.value&&a.value?(t("select",u.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 kt(e,t,n,i,s,o){return p(),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((...u)=>i.selectColor&&i.selectColor(...u),["enter"])),onKeydown:t[5]||(t[5]=(...u)=>i.onKeyDown&&i.onKeyDown(...u))},[w("div",{class:["rcp__palette",i.isPaletteIn?"in":"out"]},null,2),w("div",ae({class:"rcp__rotator",style:{"pointer-events":n.disabled||i.isPressed||!i.isKnobIn?"none":null}},He(n.mouseScroll?{wheel:i.onScroll}:{}),{ref:"rotator"}),[w("div",{class:["rcp__knob",i.isKnobIn?"in":"out"],onTransitionend:t[1]||(t[1]=(...u)=>i.hidePalette&&i.hidePalette(...u))},null,34)],16),w("div",{class:["rcp__ripple",{rippling:i.isRippling}],style:{borderColor:i.color}},null,6),w("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]=(...u)=>i.togglePicker&&i.togglePicker(...u)),onClick:t[3]||(t[3]=(...u)=>i.selectColor&&i.selectColor(...u))},null,46,["aria-label","disabled","tabindex"])],46,["aria-roledescription","aria-label","aria-expanded","aria-valuenow","aria-valuetext","aria-disabled","tabindex"])}de.render=kt;de.install=function(e){e.component("ColorPicker",de)};const St={class:"mt-4 mb-2"},Ct={__name:"PanelMainColorpicker",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=$(),i=S(()=>n.handleDefs(t.el.picker,["cmd","current"],["",!1]));function s(r){let a=o(r,50,100),l=i.value.cmd,c=[];l=l.replace("%v",a);for(const v of t.devices)c=v.split(":"),RegExp(c[0]).test(l)&&(l=l.replace(c[0],c[1]));n.request("text",l)}function o(r,a,l){a/=100;const c=l*Math.min(a,1-a)/100,v=x=>{const C=(x+r/30)%12,g=a-c*Math.max(Math.min(C-3,9-C,1),-1);return Math.round(255*g).toString(16).padStart(2,"0")};return`${v(0)}${v(8)}${v(4)}`}function u(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,v=a&255;l/=255,c/=255,v/=255;let x=Math.max(l,c,v),C=Math.min(l,c,v),g=x-C,_=(x+C)/2,h=0,f=0;return g!==0&&(x===l?h=((c-v)/g+(c(p(),P("div",St,[w(B(de),ae(u(i.value.current),{variant:"persistent",onChange:a[0]||(a[0]=l=>s(l))}),null,16)]))}},Et={__name:"PanelMain",props:{main:Object,levels:Array,iconmap:Object,devices:Object},setup(e){const t=$();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 s(r,a){return r[a]?t.handleDefs(r[a].divider,["show"],[!1]).show:!1}function o(r){return r.level?t.handleDefs(r.level.height,["height"],["64px"]).height:"64px"}function u(r){if(r==="info")return We;if(r==="btn")return Ke;if(r==="slider")return $e;if(r==="image")return Ge;if(r==="menu")return Ze;if(r==="chart")return xt;if(r==="colorpicker")return Ct}return(r,a)=>{const l=y("v-sheet"),c=y("v-col"),v=y("v-divider"),x=y("v-row"),C=y("v-expand-transition");return p(!0),P(Y,null,_e(e.main,(g,_)=>(p(),P("div",{key:_},[w(C,null,{default:z(()=>[e.levels.indexOf(_)!==-1?(p(),E(x,{key:0,"no-gutters":"",class:"text-center align-center"},{default:z(()=>[w(l,{height:o(g,"level")},null,8,["height"]),(p(),P(Y,null,_e(["left1","left2","mid","right1","right2"],h=>(p(),P(Y,{key:h},[g.level[h]?(p(),E(c,{key:0,cols:n(g,h),class:q(i(g.level[h]))},{default:z(()=>[(p(),E(Be(u(g.level[h])),{el:g[h],iconmap:e.iconmap,devices:e.devices,height:o(g,"level")},null,8,["el","iconmap","devices","height"]))]),_:2},1032,["cols","class"])):b("",!0),s(g,h)?(p(),E(v,{key:1,vertical:""})):b("",!0)],64))),64)),s(g,"level")?(p(),E(v,{key:0})):b("",!0)]),_:2},1024)):b("",!0)]),_:2},1024)]))),128)}}},Dt={key:1,class:"mx-2"},Ot={__name:"PanelCard",props:{panel:Object},setup(e){const t=e,n=$();let i=n.thread();xe(()=>n.thread(i));function s(O){let d=n.handleDefs(t.panel.status[O],["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 o=S(()=>s("bar")),u=S(()=>s("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]));ee(t.panel.main,O=>{let d=v(O);c.value.activeLevels.join("-")!==d.join("-")&&(c.value.activeLevels=d,x(!0))});function v(O){let d=[];for(const[D,L]of Object.entries(O))n.handleDefs(L.level.show,["show"],[!0]).show&&d.push(Number(D));return d}function x(O){let d=c.value,D;O?(d.activeLevels=v(t.panel.main),/=maximized$/.test(n.app.currentView)&&(d.expanded=!0)):(d.expandable&&(d.expanded=!d.expanded),d.maximizable&&(d.expanded?Q.push({name:"devices",params:{view:"panel="+t.panel.name+"=maximized"},query:Q.currentRoute.value.query}):(n.app.currentView=n.app.currentView.replace(/=maximized$/,""),Q.back()))),d.expanded?d.levels=d.activeLevels:d.expandable||O?d.levels=[d.activeLevels[0]]:(D=d.activeLevels.indexOf(d.levels[0]),d.levels=[d.activeLevels[D+1]>=0?d.activeLevels[D+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 C(O){Q.push({name:"settings",params:{tab:"panels",item:O},query:Q.currentRoute.value.query})}function g(O){let d=n.handleDefs(t.panel.info[O],["text","icon","color"],["","",""]);return d.icon&&(d.icon=n.getIcon(d.icon,t.panel.panel.iconmap)),d}function _(O){let d=["left1","left2","mid1","mid2","right1","right2"],D=g(O);return g(d[d.indexOf(O)-1]).text&&D.text&&!D.icon?"ml-1 text-truncate":D.text?"text-truncate":""}const h=S(()=>g("left1")),f=S(()=>g("left2")),A=S(()=>g("mid1")),m=S(()=>g("mid2")),V=S(()=>g("right1")),k=S(()=>g("right2"));return x(!0),(O,d)=>{const D=y("v-progress-linear"),L=y("v-col"),R=y("v-row"),j=y("v-btn"),H=y("v-card-title"),T=y("v-img"),M=y("v-sheet"),U=y("v-card-text"),F=y("v-icon"),X=y("v-spacer"),G=y("v-system-bar"),W=y("v-layout"),re=y("v-card");return B(n).app.isReady?(p(),E(re,{key:0,variant:"tonal"},{default:z(()=>[w(R,{"no-gutters":""},{default:z(()=>[e.panel.status.bar?(p(),E(L,{key:0},{default:z(()=>[w(D,{height:"7",modelValue:o.value.level,"onUpdate:modelValue":d[0]||(d[0]=Z=>o.value.level=Z),color:o.value.color,reverse:o.value.reverse},null,8,["modelValue","color","reverse"])]),_:1})):b("",!0),e.panel.status.bar2?(p(),E(L,{key:1},{default:z(()=>[w(D,{height:"7",modelValue:u.value.level,"onUpdate:modelValue":d[1]||(d[1]=Z=>u.value.level=Z),color:u.value.color,reverse:u.value.reverse},null,8,["modelValue","color","reverse"])]),_:1})):b("",!0)]),_:1}),w(M,{color:"primary"},{default:z(()=>[w(T,{src:r.value.url,gradient:r.value.url?B(n).app.header.imageGradient:"",height:"48",cover:""},{default:z(()=>[w(H,null,{default:z(()=>[w(R,{"no-gutters":"",class:"align-center"},{default:z(()=>[e.panel.status.title?(p(),E(L,{key:0,class:"text-truncate"},{default:z(()=>[J(I(l.value.title),1)]),_:1})):b("",!0),B(n).app.settings.loglevel>6?(p(),P("span",Dt,I(a.value.sortby),1)):b("",!0),B(n).app.settings.loglevel>6?(p(),E(j,{key:2,icon:"mdi-pencil",size:"small",variant:"plain",density:"compact",onClick:d[2]||(d[2]=Z=>C(e.panel.name))})):b("",!0),c.value.icon?(p(),E(j,{key:3,icon:c.value.icon,size:"small",variant:"plain",density:"compact",onClick:d[3]||(d[3]=Z=>x())},null,8,["icon"])):b("",!0)]),_:1})]),_:1})]),_:1},8,["src","gradient"])]),_:1}),w(Et,{main:e.panel.main,levels:c.value.levels,iconmap:e.panel.panel.iconmap,devices:e.panel.panel.devices},null,8,["main","levels","iconmap","devices"]),t.panel.internals?(p(),E(U,{key:0},{default:z(()=>[J(I(t.panel.internals),1)]),_:1})):b("",!0),w(W,{style:{height:"24px"}},{default:z(()=>[w(G,{color:"secondary"},{default:z(()=>[h.value.icon?(p(),E(F,{key:0,icon:h.value.icon,color:h.value.color},null,8,["icon","color"])):b("",!0),h.value.text?(p(),P("span",{key:1,class:q(_("left1"))},I(h.value.text),3)):b("",!0),f.value.icon?(p(),E(F,{key:2,icon:f.value.icon,color:f.value.color},null,8,["icon","color"])):b("",!0),f.value.text?(p(),P("span",{key:3,class:q(_("left2"))},I(f.value.text),3)):b("",!0),w(X),A.value.icon?(p(),E(F,{key:4,icon:A.value.icon,color:A.value.color},null,8,["icon","color"])):b("",!0),A.value.text?(p(),P("span",{key:5,class:q(_("mid1"))},I(A.value.text),3)):b("",!0),m.value.icon?(p(),E(F,{key:6,icon:m.value.icon,color:m.value.color},null,8,["icon","color"])):b("",!0),m.value.text?(p(),P("span",{key:7,class:q(_("mid2"))},I(m.value.text),3)):b("",!0),w(X),V.value.icon?(p(),E(F,{key:8,icon:V.value.icon,color:V.value.color},null,8,["icon","color"])):b("",!0),V.value.text?(p(),P("span",{key:9,class:q(_("right1"))},I(V.value.text),3)):b("",!0),k.value.icon?(p(),E(F,{key:10,icon:k.value.icon,color:k.value.color},null,8,["icon","color"])):b("",!0),k.value.text?(p(),P("span",{key:11,class:q(_("right2"))},I(k.value.text),3)):b("",!0)]),_:1})]),_:1})]),_:1})):b("",!0)}}};export{Ot as _}; diff --git a/www/fhemapp4/assets/SettingsView-a6a3e3d5.js b/www/fhemapp4/assets/SettingsView-142edc18.js similarity index 99% rename from www/fhemapp4/assets/SettingsView-a6a3e3d5.js rename to www/fhemapp4/assets/SettingsView-142edc18.js index 7d388fa..c6c2c2c 100644 --- a/www/fhemapp4/assets/SettingsView-a6a3e3d5.js +++ b/www/fhemapp4/assets/SettingsView-142edc18.js @@ -1,4 +1,4 @@ -import{u as qe,f as Ve,g as lr,r as R,o as H,a as W,w as E,e as h,h as k,b as Me,F as Ke,d as Ze,i as Mn,j as Ae,t as $e,k as ee,l as wr,m as mt,c as we,n as Dr,v as Tr,p as ir,q as sr,s as Gt,x as ur}from"./index-e6e38008.js";import{c as $n,g as Pr,r as Ar,a as $r,u as Vr,V as Fr}from"./index-2d4633de.js";import{_ as Rr}from"./PanelCard-ca7331d5.js";const ue="_app.settings.header.",jr={__name:"SettingsHeader",setup(u){const e=qe(),n={required:r=>!!r||e.replacer("%t(_app.settings.rules.required)")},l=Ve(),a=lr({name:"",title:"",icon:"",cmd:""});function i(){e.app.config.header.commands||(e.app.config.header.commands=[]),e.app.config.header.commands.push(JSON.parse(JSON.stringify(a))),l.value.reset()}function t(r){e.app.config.header.commands.splice(r,1)}return(r,o)=>{const s=R("v-btn"),c=R("v-list-item"),p=R("v-text-field"),m=R("v-col"),f=R("v-checkbox"),d=R("v-row"),g=R("v-divider"),y=R("v-form"),S=R("v-list");return H(),W(S,null,{default:E(()=>[h(c,{title:r.$t(ue+"barTitle")},{append:E(()=>[h(s,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:o[0]||(o[0]=v=>k(e).help("kopfzeile"))})]),_:1},8,["title"]),h(c,null,{default:E(()=>[h(d,{"no-gutters":""},{default:E(()=>[h(m,{cols:"12",lg:"4",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"imageUrlPlaceholder"),label:r.$t(ue+"imageUrl"),modelValue:k(e).app.config.header.imageUrl,"onUpdate:modelValue":o[1]||(o[1]=v=>k(e).app.config.header.imageUrl=v)},null,8,["placeholder","label","modelValue"])]),_:1}),h(m,{cols:"12",lg:"4",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"imageGradientPlaceholder"),label:r.$t(ue+"imageGradient"),modelValue:k(e).app.config.header.imageGradient,"onUpdate:modelValue":o[2]||(o[2]=v=>k(e).app.config.header.imageGradient=v)},null,8,["placeholder","label","modelValue"])]),_:1}),h(m,{cols:"6",lg:"",class:"pt-1"},{default:E(()=>[h(f,{hint:r.$t(ue+"showTimeHint"),label:r.$t(ue+"showTime"),modelValue:k(e).app.config.header.showTime,"onUpdate:modelValue":o[3]||(o[3]=v=>k(e).app.config.header.showTime=v)},null,8,["hint","label","modelValue"])]),_:1}),h(m,{cols:"6",lg:"",class:"pt-1"},{default:E(()=>[h(f,{hint:r.$t(ue+"showDateHint"),label:r.$t(ue+"showDate"),modelValue:k(e).app.config.header.showDate,"onUpdate:modelValue":o[4]||(o[4]=v=>k(e).app.config.header.showDate=v)},null,8,["hint","label","modelValue"])]),_:1}),h(m,{cols:"6",lg:"",class:"pt-1"},{default:E(()=>[h(f,{hint:r.$t(ue+"showTitleHint"),label:r.$t(ue+"showTitle"),modelValue:k(e).app.config.header.showTitle,"onUpdate:modelValue":o[5]||(o[5]=v=>k(e).app.config.header.showTitle=v)},null,8,["hint","label","modelValue"])]),_:1})]),_:1})]),_:1}),h(g),h(c,{title:r.$t(ue+"darkModeOverFhem")},{append:E(()=>[h(s,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:o[6]||(o[6]=v=>k(e).help("farbschema"))})]),_:1},8,["title"]),h(c,null,{default:E(()=>[h(d,{"no-gutters":""},{default:E(()=>[h(m,{cols:"12",md:"4",class:"pt-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:"device-reading:value",label:"Definition",modelValue:k(e).app.config.header.darkModeOverFhem,"onUpdate:modelValue":o[7]||(o[7]=v=>k(e).app.config.header.darkModeOverFhem=v)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(g),h(c,{title:r.$t(ue+"optionsTitle")},{append:E(()=>[h(s,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:o[8]||(o[8]=v=>k(e).help("optionsmenü"))})]),_:1},8,["title"]),h(c,null,{default:E(()=>[h(d,{"no-gutters":""},{default:E(()=>[h(m,{cols:"6",lg:""},{default:E(()=>[h(f,{label:r.$t(ue+"showDarkMode"),modelValue:k(e).app.config.header.showDarkMode,"onUpdate:modelValue":o[9]||(o[9]=v=>k(e).app.config.header.showDarkMode=v)},null,8,["label","modelValue"])]),_:1}),h(m,{cols:"6",lg:""},{default:E(()=>[h(f,{label:r.$t(ue+"showReloadPage"),modelValue:k(e).app.config.header.showReloadPage,"onUpdate:modelValue":o[10]||(o[10]=v=>k(e).app.config.header.showReloadPage=v)},null,8,["label","modelValue"])]),_:1}),h(m,{cols:"6",lg:""},{default:E(()=>[h(f,{label:r.$t(ue+"showSettings"),modelValue:k(e).app.config.header.showSettings,"onUpdate:modelValue":o[11]||(o[11]=v=>k(e).app.config.header.showSettings=v)},null,8,["label","modelValue"])]),_:1}),h(m,{cols:"6",lg:""},{default:E(()=>[h(f,{label:r.$t(ue+"showUpdate"),modelValue:k(e).app.config.header.showUpdate,"onUpdate:modelValue":o[12]||(o[12]=v=>k(e).app.config.header.showUpdate=v)},null,8,["label","modelValue"])]),_:1}),h(m,{cols:"6",lg:""},{default:E(()=>[h(f,{label:r.$t(ue+"showLanguages"),modelValue:k(e).app.config.header.showLanguages,"onUpdate:modelValue":o[13]||(o[13]=v=>k(e).app.config.header.showLanguages=v)},null,8,["label","modelValue"])]),_:1})]),_:1})]),_:1}),h(g),h(c,{title:r.$t(ue+"optionsCommandTitle")},{append:E(()=>[h(s,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:o[14]||(o[14]=v=>k(e).help("optionsmenü-fhem-befehle"))})]),_:1},8,["title"]),(H(!0),Me(Ke,null,Ze(k(e).app.config.header.commands,(v,b)=>(H(),W(c,{key:b},{default:E(()=>[h(d,{"no-gutters":""},{default:E(()=>[h(m,{cols:"12",lg:"2",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandNamePlaceholder"),label:r.$t(ue+"commandName"),rules:[n.required],modelValue:v.name,"onUpdate:modelValue":x=>v.name=x},null,8,["placeholder","label","rules","modelValue","onUpdate:modelValue"])]),_:2},1024),h(m,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandTitlePlaceholder"),label:r.$t(ue+"commandTitle"),rules:[n.required],modelValue:v.title,"onUpdate:modelValue":x=>v.title=x},null,8,["placeholder","label","rules","modelValue","onUpdate:modelValue"])]),_:2},1024),h(m,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandIconPlaceholder"),label:r.$t(ue+"commandIcon"),"append-inner-icon":v.icon,modelValue:v.icon,"onUpdate:modelValue":x=>v.icon=x},null,8,["placeholder","label","append-inner-icon","modelValue","onUpdate:modelValue"])]),_:2},1024),h(m,{cols:"10",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandCmdPlaceholder"),label:r.$t(ue+"commandCmd"),rules:[n.required],modelValue:v.cmd,"onUpdate:modelValue":x=>v.cmd=x},null,8,["placeholder","label","rules","modelValue","onUpdate:modelValue"])]),_:2},1024),h(m,{class:"pt-3 text-right"},{default:E(()=>[h(s,{variant:"text",icon:"mdi-delete",onClick:x=>t(b)},null,8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128)),h(c,null,{default:E(()=>[h(y,{ref_key:"form",ref:l},{default:E(()=>[h(d,{"no-gutters":""},{default:E(()=>[h(m,{cols:"12",lg:"2",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandNamePlaceholder"),label:r.$t(ue+"commandName"),rules:[n.required],modelValue:a.name,"onUpdate:modelValue":o[15]||(o[15]=v=>a.name=v)},null,8,["placeholder","label","rules","modelValue"])]),_:1}),h(m,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandTitlePlaceholder"),label:r.$t(ue+"commandTitle"),rules:[n.required],modelValue:a.title,"onUpdate:modelValue":o[16]||(o[16]=v=>a.title=v)},null,8,["placeholder","label","rules","modelValue"])]),_:1}),h(m,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandIconPlaceholder"),label:r.$t(ue+"commandIcon"),"append-inner-icon":a.icon,modelValue:a.icon,"onUpdate:modelValue":o[17]||(o[17]=v=>a.icon=v)},null,8,["placeholder","label","append-inner-icon","modelValue"])]),_:1}),h(m,{cols:"9",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandCmdPlaceholder"),label:r.$t(ue+"commandCmd"),rules:[n.required],modelValue:a.cmd,"onUpdate:modelValue":o[18]||(o[18]=v=>a.cmd=v)},null,8,["placeholder","label","rules","modelValue"])]),_:1}),h(m,{class:"pt-3 text-right"},{default:E(()=>[h(s,{variant:"text",icon:"mdi-cancel",onClick:o[19]||(o[19]=v=>l.value.reset())}),h(s,{variant:"text",icon:"mdi-plus",disabled:!a.name||!a.title||!a.cmd,onClick:o[20]||(o[20]=v=>i())},null,8,["disabled"])]),_:1})]),_:1})]),_:1},512)]),_:1})]),_:1})}}},ye="_app.settings.navigation.",Nr={__name:"SettingsNavigation",setup(u){const{mobile:e}=Mn(),n=qe(),l=lr({path:[],route:["navigation"],items:[],newItem:{name:null,title:null,icon:null,divider:!1,groupAsChips:!1,sort:!1,group:[]}}),a=Ve(),i={required:p=>!!p||n.replacer("%t(_app.settings.rules.required)")};function t(p){typeof p<"u"&&(l.path.push(p,"group"),l.route.push(l.items[p].name)),l.items=n.getEl(n.app.config.navigation,l.path)}function r(){let p=JSON.parse(JSON.stringify(l.newItem));n.getEl(n.app.config.navigation,l.path).push(p),t(),a.value.reset()}function o(p){n.getEl(n.app.config.navigation,l.path).splice(p,1)}function s(p){return(n.getEl(l.items[p],["group"])||[]).length}function c(){l.route.pop(),l.path.splice(-2,2),t()}return t(),(p,m)=>{const f=R("v-btn"),d=R("v-list-item"),g=R("v-text-field"),y=R("v-col"),S=R("v-checkbox"),v=R("v-icon"),b=R("v-badge"),x=R("v-row"),O=R("v-divider"),I=R("v-form"),V=R("v-list");return H(),W(V,null,{default:E(()=>[h(d,{title:p.$t(ye+"title")},{append:E(()=>[h(f,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:m[0]||(m[0]=T=>k(n).help("navigation"))})]),_:1},8,["title"]),l.path.length>0?(H(),W(d,{key:0},{default:E(()=>[h(f,{variant:"text",icon:"mdi-arrow-up-left",onClick:m[1]||(m[1]=T=>c())}),Ae(" "+$e(l.route.join(" > ")),1)]),_:1})):ee("",!0),(H(!0),Me(Ke,null,Ze(l.items,(T,C)=>(H(),W(d,{key:C},{default:E(()=>[h(x,{"no-gutters":""},{default:E(()=>[h(y,{cols:"12",lg:"2",class:"pt-3 pr-3"},{default:E(()=>[h(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:p.$t(ye+"namePlaceholder"),label:p.$t(ye+"name"),rules:[i.required],modelValue:T.name,"onUpdate:modelValue":w=>T.name=w},null,8,["placeholder","label","rules","modelValue","onUpdate:modelValue"])]),_:2},1024),h(y,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:p.$t(ye+"title1Placeholder"),label:p.$t(ye+"title1"),modelValue:T.title,"onUpdate:modelValue":w=>T.title=w},null,8,["placeholder","label","modelValue","onUpdate:modelValue"])]),_:2},1024),h(y,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:p.$t(ye+"iconPlaceholder"),label:p.$t(ye+"icon"),"append-inner-icon":T.icon,modelValue:T.icon,"onUpdate:modelValue":w=>T.icon=w},null,8,["placeholder","label","append-inner-icon","modelValue","onUpdate:modelValue"])]),_:2},1024),h(y,{cols:4,lg:"",class:"pt-1"},{default:E(()=>[h(S,{hint:p.$t(ye+"groupAsChipsHint"),label:p.$t(ye+"groupAsChips"),modelValue:T.groupAsChips,"onUpdate:modelValue":w=>T.groupAsChips=w},null,8,["hint","label","modelValue","onUpdate:modelValue"])]),_:2},1024),h(y,{cols:4,lg:"",class:"pt-1"},{default:E(()=>[h(S,{hint:p.$t(ye+"sortHint"),label:p.$t(ye+"sort"),modelValue:T.sort,"onUpdate:modelValue":w=>T.sort=w},null,8,["hint","label","modelValue","onUpdate:modelValue"])]),_:2},1024),h(y,{cols:"4",lg:"",class:"pt-1"},{default:E(()=>[h(S,{hint:p.$t(ye+"dividerHint"),label:p.$t(ye+"divider"),modelValue:T.divider,"onUpdate:modelValue":w=>T.divider=w},null,8,["hint","label","modelValue","onUpdate:modelValue"])]),_:2},1024),h(y,{class:"pt-3 text-right"},{default:E(()=>[h(f,{variant:"text",icon:"",onClick:w=>t(C)},{default:E(()=>[s(C)>0?(H(),W(b,{key:0,color:"success",content:s(C)},{default:E(()=>[h(v,{icon:"mdi-arrow-down-right"})]),_:2},1032,["content"])):ee("",!0),s(C)===0?(H(),W(v,{key:1,icon:"mdi-arrow-down-right"})):ee("",!0)]),_:2},1032,["onClick"]),h(f,{variant:"text",icon:"mdi-delete",onClick:w=>o(C)},null,8,["onClick"])]),_:2},1024)]),_:2},1024),k(e)?(H(),W(O,{key:0})):ee("",!0)]),_:2},1024))),128)),h(d,null,{default:E(()=>[h(I,{ref_key:"form",ref:a},{default:E(()=>[h(x,{"no-gutters":""},{default:E(()=>[h(y,{cols:"12",lg:"2",class:"pt-3 pr-3"},{default:E(()=>[h(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:p.$t(ye+"namePlaceholder"),label:p.$t(ye+"name"),rules:[i.required],modelValue:l.newItem.name,"onUpdate:modelValue":m[2]||(m[2]=T=>l.newItem.name=T)},null,8,["placeholder","label","rules","modelValue"])]),_:1}),h(y,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:p.$t(ye+"title1Placeholder"),label:p.$t(ye+"title1"),modelValue:l.newItem.title,"onUpdate:modelValue":m[3]||(m[3]=T=>l.newItem.title=T)},null,8,["placeholder","label","modelValue"])]),_:1}),h(y,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:p.$t(ye+"iconPlaceholder"),label:p.$t(ye+"icon"),"append-inner-icon":l.newItem.icon,modelValue:l.newItem.icon,"onUpdate:modelValue":m[4]||(m[4]=T=>l.newItem.icon=T)},null,8,["placeholder","label","append-inner-icon","modelValue"])]),_:1}),h(y,{cols:"4",lg:"",class:"pt-1"},{default:E(()=>[h(S,{hint:p.$t(ye+"groupAsChipsHint"),label:p.$t(ye+"groupAsChips"),modelValue:l.newItem.groupAsChips,"onUpdate:modelValue":m[5]||(m[5]=T=>l.newItem.groupAsChips=T)},null,8,["hint","label","modelValue"])]),_:1}),h(y,{cols:"4",lg:"",class:"pt-1"},{default:E(()=>[h(S,{hint:p.$t(ye+"sortHint"),label:p.$t(ye+"sort"),modelValue:l.newItem.sort,"onUpdate:modelValue":m[6]||(m[6]=T=>l.newItem.sort=T)},null,8,["hint","label","modelValue"])]),_:1}),h(y,{cols:"4",lg:"",class:"pt-1"},{default:E(()=>[h(S,{hint:p.$t(ye+"dividerHint"),label:p.$t(ye+"divider"),modelValue:l.newItem.divider,"onUpdate:modelValue":m[7]||(m[7]=T=>l.newItem.divider=T)},null,8,["hint","label","modelValue"])]),_:1}),h(y,{class:"pt-3 text-right"},{default:E(()=>[h(f,{variant:"text",icon:"mdi-cancel",onClick:m[8]||(m[8]=T=>a.value.reset())}),h(f,{variant:"text",icon:"mdi-plus",disabled:!l.newItem.name,onClick:m[9]||(m[9]=T=>r())},null,8,["disabled"])]),_:1})]),_:1})]),_:1},512)]),_:1})]),_:1})}}};function Ht(){return Ht=Object.assign||function(u){for(var e=1;e";return e},lineNumbersCount:function(){var e=this.codeData.split(/\r\n|\n/).length;return e}},mounted:function(){this._recordCurrentState(),this.styleLineNumbers()},methods:{setLineNumbersHeight:function(){this.lineNumbersHeight=getComputedStyle(this.$refs.pre).height},styleLineNumbers:function(){if(!(!this.lineNumbers||!this.autoStyleLineNumbers)){var e=this.$refs.pre,n=this.$el.querySelector(".prism-editor__line-numbers"),l=window.getComputedStyle(e);this.$nextTick(function(){var a="border-top-left-radius",i="border-bottom-left-radius";if(n){n.style[a]=l[a],n.style[i]=l[i],e.style[a]="0",e.style[i]="0";var t=["background-color","margin-top","padding-top","font-family","font-size","line-height"];t.forEach(function(r){n.style[r]=l[r]}),n.style["margin-bottom"]="-"+l["padding-top"]}})}},_recordCurrentState:function(){var e=this.$refs.textarea;if(e){var n=e.value,l=e.selectionStart,a=e.selectionEnd;this._recordChange({value:n,selectionStart:l,selectionEnd:a})}},_getLines:function(e,n){return e.substring(0,n).split(` +import{u as qe,f as Ve,g as lr,r as R,o as H,a as W,w as E,e as h,h as k,b as Me,F as Ke,d as Ze,i as Mn,j as Ae,t as $e,k as ee,l as wr,m as mt,c as we,n as Dr,v as Tr,p as ir,q as sr,s as Gt,x as ur}from"./index-42e67982.js";import{c as $n,g as Pr,r as Ar,a as $r,u as Vr,V as Fr}from"./index-40878854.js";import{_ as Rr}from"./PanelCard-01886c92.js";const ue="_app.settings.header.",jr={__name:"SettingsHeader",setup(u){const e=qe(),n={required:r=>!!r||e.replacer("%t(_app.settings.rules.required)")},l=Ve(),a=lr({name:"",title:"",icon:"",cmd:""});function i(){e.app.config.header.commands||(e.app.config.header.commands=[]),e.app.config.header.commands.push(JSON.parse(JSON.stringify(a))),l.value.reset()}function t(r){e.app.config.header.commands.splice(r,1)}return(r,o)=>{const s=R("v-btn"),c=R("v-list-item"),p=R("v-text-field"),m=R("v-col"),f=R("v-checkbox"),d=R("v-row"),g=R("v-divider"),y=R("v-form"),S=R("v-list");return H(),W(S,null,{default:E(()=>[h(c,{title:r.$t(ue+"barTitle")},{append:E(()=>[h(s,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:o[0]||(o[0]=v=>k(e).help("kopfzeile"))})]),_:1},8,["title"]),h(c,null,{default:E(()=>[h(d,{"no-gutters":""},{default:E(()=>[h(m,{cols:"12",lg:"4",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"imageUrlPlaceholder"),label:r.$t(ue+"imageUrl"),modelValue:k(e).app.config.header.imageUrl,"onUpdate:modelValue":o[1]||(o[1]=v=>k(e).app.config.header.imageUrl=v)},null,8,["placeholder","label","modelValue"])]),_:1}),h(m,{cols:"12",lg:"4",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"imageGradientPlaceholder"),label:r.$t(ue+"imageGradient"),modelValue:k(e).app.config.header.imageGradient,"onUpdate:modelValue":o[2]||(o[2]=v=>k(e).app.config.header.imageGradient=v)},null,8,["placeholder","label","modelValue"])]),_:1}),h(m,{cols:"6",lg:"",class:"pt-1"},{default:E(()=>[h(f,{hint:r.$t(ue+"showTimeHint"),label:r.$t(ue+"showTime"),modelValue:k(e).app.config.header.showTime,"onUpdate:modelValue":o[3]||(o[3]=v=>k(e).app.config.header.showTime=v)},null,8,["hint","label","modelValue"])]),_:1}),h(m,{cols:"6",lg:"",class:"pt-1"},{default:E(()=>[h(f,{hint:r.$t(ue+"showDateHint"),label:r.$t(ue+"showDate"),modelValue:k(e).app.config.header.showDate,"onUpdate:modelValue":o[4]||(o[4]=v=>k(e).app.config.header.showDate=v)},null,8,["hint","label","modelValue"])]),_:1}),h(m,{cols:"6",lg:"",class:"pt-1"},{default:E(()=>[h(f,{hint:r.$t(ue+"showTitleHint"),label:r.$t(ue+"showTitle"),modelValue:k(e).app.config.header.showTitle,"onUpdate:modelValue":o[5]||(o[5]=v=>k(e).app.config.header.showTitle=v)},null,8,["hint","label","modelValue"])]),_:1})]),_:1})]),_:1}),h(g),h(c,{title:r.$t(ue+"darkModeOverFhem")},{append:E(()=>[h(s,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:o[6]||(o[6]=v=>k(e).help("farbschema"))})]),_:1},8,["title"]),h(c,null,{default:E(()=>[h(d,{"no-gutters":""},{default:E(()=>[h(m,{cols:"12",md:"4",class:"pt-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:"device-reading:value",label:"Definition",modelValue:k(e).app.config.header.darkModeOverFhem,"onUpdate:modelValue":o[7]||(o[7]=v=>k(e).app.config.header.darkModeOverFhem=v)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(g),h(c,{title:r.$t(ue+"optionsTitle")},{append:E(()=>[h(s,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:o[8]||(o[8]=v=>k(e).help("optionsmenü"))})]),_:1},8,["title"]),h(c,null,{default:E(()=>[h(d,{"no-gutters":""},{default:E(()=>[h(m,{cols:"6",lg:""},{default:E(()=>[h(f,{label:r.$t(ue+"showDarkMode"),modelValue:k(e).app.config.header.showDarkMode,"onUpdate:modelValue":o[9]||(o[9]=v=>k(e).app.config.header.showDarkMode=v)},null,8,["label","modelValue"])]),_:1}),h(m,{cols:"6",lg:""},{default:E(()=>[h(f,{label:r.$t(ue+"showReloadPage"),modelValue:k(e).app.config.header.showReloadPage,"onUpdate:modelValue":o[10]||(o[10]=v=>k(e).app.config.header.showReloadPage=v)},null,8,["label","modelValue"])]),_:1}),h(m,{cols:"6",lg:""},{default:E(()=>[h(f,{label:r.$t(ue+"showSettings"),modelValue:k(e).app.config.header.showSettings,"onUpdate:modelValue":o[11]||(o[11]=v=>k(e).app.config.header.showSettings=v)},null,8,["label","modelValue"])]),_:1}),h(m,{cols:"6",lg:""},{default:E(()=>[h(f,{label:r.$t(ue+"showUpdate"),modelValue:k(e).app.config.header.showUpdate,"onUpdate:modelValue":o[12]||(o[12]=v=>k(e).app.config.header.showUpdate=v)},null,8,["label","modelValue"])]),_:1}),h(m,{cols:"6",lg:""},{default:E(()=>[h(f,{label:r.$t(ue+"showLanguages"),modelValue:k(e).app.config.header.showLanguages,"onUpdate:modelValue":o[13]||(o[13]=v=>k(e).app.config.header.showLanguages=v)},null,8,["label","modelValue"])]),_:1})]),_:1})]),_:1}),h(g),h(c,{title:r.$t(ue+"optionsCommandTitle")},{append:E(()=>[h(s,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:o[14]||(o[14]=v=>k(e).help("optionsmenü-fhem-befehle"))})]),_:1},8,["title"]),(H(!0),Me(Ke,null,Ze(k(e).app.config.header.commands,(v,b)=>(H(),W(c,{key:b},{default:E(()=>[h(d,{"no-gutters":""},{default:E(()=>[h(m,{cols:"12",lg:"2",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandNamePlaceholder"),label:r.$t(ue+"commandName"),rules:[n.required],modelValue:v.name,"onUpdate:modelValue":x=>v.name=x},null,8,["placeholder","label","rules","modelValue","onUpdate:modelValue"])]),_:2},1024),h(m,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandTitlePlaceholder"),label:r.$t(ue+"commandTitle"),rules:[n.required],modelValue:v.title,"onUpdate:modelValue":x=>v.title=x},null,8,["placeholder","label","rules","modelValue","onUpdate:modelValue"])]),_:2},1024),h(m,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandIconPlaceholder"),label:r.$t(ue+"commandIcon"),"append-inner-icon":v.icon,modelValue:v.icon,"onUpdate:modelValue":x=>v.icon=x},null,8,["placeholder","label","append-inner-icon","modelValue","onUpdate:modelValue"])]),_:2},1024),h(m,{cols:"10",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandCmdPlaceholder"),label:r.$t(ue+"commandCmd"),rules:[n.required],modelValue:v.cmd,"onUpdate:modelValue":x=>v.cmd=x},null,8,["placeholder","label","rules","modelValue","onUpdate:modelValue"])]),_:2},1024),h(m,{class:"pt-3 text-right"},{default:E(()=>[h(s,{variant:"text",icon:"mdi-delete",onClick:x=>t(b)},null,8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128)),h(c,null,{default:E(()=>[h(y,{ref_key:"form",ref:l},{default:E(()=>[h(d,{"no-gutters":""},{default:E(()=>[h(m,{cols:"12",lg:"2",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandNamePlaceholder"),label:r.$t(ue+"commandName"),rules:[n.required],modelValue:a.name,"onUpdate:modelValue":o[15]||(o[15]=v=>a.name=v)},null,8,["placeholder","label","rules","modelValue"])]),_:1}),h(m,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandTitlePlaceholder"),label:r.$t(ue+"commandTitle"),rules:[n.required],modelValue:a.title,"onUpdate:modelValue":o[16]||(o[16]=v=>a.title=v)},null,8,["placeholder","label","rules","modelValue"])]),_:1}),h(m,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandIconPlaceholder"),label:r.$t(ue+"commandIcon"),"append-inner-icon":a.icon,modelValue:a.icon,"onUpdate:modelValue":o[17]||(o[17]=v=>a.icon=v)},null,8,["placeholder","label","append-inner-icon","modelValue"])]),_:1}),h(m,{cols:"9",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandCmdPlaceholder"),label:r.$t(ue+"commandCmd"),rules:[n.required],modelValue:a.cmd,"onUpdate:modelValue":o[18]||(o[18]=v=>a.cmd=v)},null,8,["placeholder","label","rules","modelValue"])]),_:1}),h(m,{class:"pt-3 text-right"},{default:E(()=>[h(s,{variant:"text",icon:"mdi-cancel",onClick:o[19]||(o[19]=v=>l.value.reset())}),h(s,{variant:"text",icon:"mdi-plus",disabled:!a.name||!a.title||!a.cmd,onClick:o[20]||(o[20]=v=>i())},null,8,["disabled"])]),_:1})]),_:1})]),_:1},512)]),_:1})]),_:1})}}},ye="_app.settings.navigation.",Nr={__name:"SettingsNavigation",setup(u){const{mobile:e}=Mn(),n=qe(),l=lr({path:[],route:["navigation"],items:[],newItem:{name:null,title:null,icon:null,divider:!1,groupAsChips:!1,sort:!1,group:[]}}),a=Ve(),i={required:p=>!!p||n.replacer("%t(_app.settings.rules.required)")};function t(p){typeof p<"u"&&(l.path.push(p,"group"),l.route.push(l.items[p].name)),l.items=n.getEl(n.app.config.navigation,l.path)}function r(){let p=JSON.parse(JSON.stringify(l.newItem));n.getEl(n.app.config.navigation,l.path).push(p),t(),a.value.reset()}function o(p){n.getEl(n.app.config.navigation,l.path).splice(p,1)}function s(p){return(n.getEl(l.items[p],["group"])||[]).length}function c(){l.route.pop(),l.path.splice(-2,2),t()}return t(),(p,m)=>{const f=R("v-btn"),d=R("v-list-item"),g=R("v-text-field"),y=R("v-col"),S=R("v-checkbox"),v=R("v-icon"),b=R("v-badge"),x=R("v-row"),O=R("v-divider"),I=R("v-form"),V=R("v-list");return H(),W(V,null,{default:E(()=>[h(d,{title:p.$t(ye+"title")},{append:E(()=>[h(f,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:m[0]||(m[0]=T=>k(n).help("navigation"))})]),_:1},8,["title"]),l.path.length>0?(H(),W(d,{key:0},{default:E(()=>[h(f,{variant:"text",icon:"mdi-arrow-up-left",onClick:m[1]||(m[1]=T=>c())}),Ae(" "+$e(l.route.join(" > ")),1)]),_:1})):ee("",!0),(H(!0),Me(Ke,null,Ze(l.items,(T,C)=>(H(),W(d,{key:C},{default:E(()=>[h(x,{"no-gutters":""},{default:E(()=>[h(y,{cols:"12",lg:"2",class:"pt-3 pr-3"},{default:E(()=>[h(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:p.$t(ye+"namePlaceholder"),label:p.$t(ye+"name"),rules:[i.required],modelValue:T.name,"onUpdate:modelValue":w=>T.name=w},null,8,["placeholder","label","rules","modelValue","onUpdate:modelValue"])]),_:2},1024),h(y,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:p.$t(ye+"title1Placeholder"),label:p.$t(ye+"title1"),modelValue:T.title,"onUpdate:modelValue":w=>T.title=w},null,8,["placeholder","label","modelValue","onUpdate:modelValue"])]),_:2},1024),h(y,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:p.$t(ye+"iconPlaceholder"),label:p.$t(ye+"icon"),"append-inner-icon":T.icon,modelValue:T.icon,"onUpdate:modelValue":w=>T.icon=w},null,8,["placeholder","label","append-inner-icon","modelValue","onUpdate:modelValue"])]),_:2},1024),h(y,{cols:4,lg:"",class:"pt-1"},{default:E(()=>[h(S,{hint:p.$t(ye+"groupAsChipsHint"),label:p.$t(ye+"groupAsChips"),modelValue:T.groupAsChips,"onUpdate:modelValue":w=>T.groupAsChips=w},null,8,["hint","label","modelValue","onUpdate:modelValue"])]),_:2},1024),h(y,{cols:4,lg:"",class:"pt-1"},{default:E(()=>[h(S,{hint:p.$t(ye+"sortHint"),label:p.$t(ye+"sort"),modelValue:T.sort,"onUpdate:modelValue":w=>T.sort=w},null,8,["hint","label","modelValue","onUpdate:modelValue"])]),_:2},1024),h(y,{cols:"4",lg:"",class:"pt-1"},{default:E(()=>[h(S,{hint:p.$t(ye+"dividerHint"),label:p.$t(ye+"divider"),modelValue:T.divider,"onUpdate:modelValue":w=>T.divider=w},null,8,["hint","label","modelValue","onUpdate:modelValue"])]),_:2},1024),h(y,{class:"pt-3 text-right"},{default:E(()=>[h(f,{variant:"text",icon:"",onClick:w=>t(C)},{default:E(()=>[s(C)>0?(H(),W(b,{key:0,color:"success",content:s(C)},{default:E(()=>[h(v,{icon:"mdi-arrow-down-right"})]),_:2},1032,["content"])):ee("",!0),s(C)===0?(H(),W(v,{key:1,icon:"mdi-arrow-down-right"})):ee("",!0)]),_:2},1032,["onClick"]),h(f,{variant:"text",icon:"mdi-delete",onClick:w=>o(C)},null,8,["onClick"])]),_:2},1024)]),_:2},1024),k(e)?(H(),W(O,{key:0})):ee("",!0)]),_:2},1024))),128)),h(d,null,{default:E(()=>[h(I,{ref_key:"form",ref:a},{default:E(()=>[h(x,{"no-gutters":""},{default:E(()=>[h(y,{cols:"12",lg:"2",class:"pt-3 pr-3"},{default:E(()=>[h(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:p.$t(ye+"namePlaceholder"),label:p.$t(ye+"name"),rules:[i.required],modelValue:l.newItem.name,"onUpdate:modelValue":m[2]||(m[2]=T=>l.newItem.name=T)},null,8,["placeholder","label","rules","modelValue"])]),_:1}),h(y,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:p.$t(ye+"title1Placeholder"),label:p.$t(ye+"title1"),modelValue:l.newItem.title,"onUpdate:modelValue":m[3]||(m[3]=T=>l.newItem.title=T)},null,8,["placeholder","label","modelValue"])]),_:1}),h(y,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:p.$t(ye+"iconPlaceholder"),label:p.$t(ye+"icon"),"append-inner-icon":l.newItem.icon,modelValue:l.newItem.icon,"onUpdate:modelValue":m[4]||(m[4]=T=>l.newItem.icon=T)},null,8,["placeholder","label","append-inner-icon","modelValue"])]),_:1}),h(y,{cols:"4",lg:"",class:"pt-1"},{default:E(()=>[h(S,{hint:p.$t(ye+"groupAsChipsHint"),label:p.$t(ye+"groupAsChips"),modelValue:l.newItem.groupAsChips,"onUpdate:modelValue":m[5]||(m[5]=T=>l.newItem.groupAsChips=T)},null,8,["hint","label","modelValue"])]),_:1}),h(y,{cols:"4",lg:"",class:"pt-1"},{default:E(()=>[h(S,{hint:p.$t(ye+"sortHint"),label:p.$t(ye+"sort"),modelValue:l.newItem.sort,"onUpdate:modelValue":m[6]||(m[6]=T=>l.newItem.sort=T)},null,8,["hint","label","modelValue"])]),_:1}),h(y,{cols:"4",lg:"",class:"pt-1"},{default:E(()=>[h(S,{hint:p.$t(ye+"dividerHint"),label:p.$t(ye+"divider"),modelValue:l.newItem.divider,"onUpdate:modelValue":m[7]||(m[7]=T=>l.newItem.divider=T)},null,8,["hint","label","modelValue"])]),_:1}),h(y,{class:"pt-3 text-right"},{default:E(()=>[h(f,{variant:"text",icon:"mdi-cancel",onClick:m[8]||(m[8]=T=>a.value.reset())}),h(f,{variant:"text",icon:"mdi-plus",disabled:!l.newItem.name,onClick:m[9]||(m[9]=T=>r())},null,8,["disabled"])]),_:1})]),_:1})]),_:1},512)]),_:1})]),_:1})}}};function Ht(){return Ht=Object.assign||function(u){for(var e=1;e";return e},lineNumbersCount:function(){var e=this.codeData.split(/\r\n|\n/).length;return e}},mounted:function(){this._recordCurrentState(),this.styleLineNumbers()},methods:{setLineNumbersHeight:function(){this.lineNumbersHeight=getComputedStyle(this.$refs.pre).height},styleLineNumbers:function(){if(!(!this.lineNumbers||!this.autoStyleLineNumbers)){var e=this.$refs.pre,n=this.$el.querySelector(".prism-editor__line-numbers"),l=window.getComputedStyle(e);this.$nextTick(function(){var a="border-top-left-radius",i="border-bottom-left-radius";if(n){n.style[a]=l[a],n.style[i]=l[i],e.style[a]="0",e.style[i]="0";var t=["background-color","margin-top","padding-top","font-family","font-size","line-height"];t.forEach(function(r){n.style[r]=l[r]}),n.style["margin-bottom"]="-"+l["padding-top"]}})}},_recordCurrentState:function(){var e=this.$refs.textarea;if(e){var n=e.value,l=e.selectionStart,a=e.selectionEnd;this._recordChange({value:n,selectionStart:l,selectionEnd:a})}},_getLines:function(e,n){return e.substring(0,n).split(` `)},_applyEdits:function(e){var n=this.$refs.textarea,l=this.history.stack[this.history.offset];l&&n&&(this.history.stack[this.history.offset]=Ht({},l,{selectionStart:n.selectionStart,selectionEnd:n.selectionEnd})),this._recordChange(e),this._updateInput(e)},_recordChange:function(e,n){n===void 0&&(n=!1);var l=this.history,a=l.stack,i=l.offset;if(a.length&&i>-1){this.history.stack=a.slice(0,i+1);var t=this.history.stack.length;if(t>Wn){var r=t-Wn;this.history.stack=a.slice(r,t),this.history.offset=Math.max(this.history.offset-r,0)}}var o=Date.now();if(n){var s=this.history.stack[this.history.offset];if(s&&o-s.timestamp=p&&j<=m&&L.startsWith(s)?L.substring(s.length):L}).join(` `);if(t!==f){var d=c[p];this._applyEdits({value:f,selectionStart:d.startsWith(s)?r-s.length:r,selectionEnd:o-(t.length-f.length)})}}else if(r!==o){var g=this._getLines(t,r),y=g.length-1,S=this._getLines(t,o).length-1,v=g[y];this._applyEdits({value:t.split(` diff --git a/www/fhemapp4/assets/index-2d4633de.js b/www/fhemapp4/assets/index-40878854.js similarity index 99% rename from www/fhemapp4/assets/index-2d4633de.js rename to www/fhemapp4/assets/index-40878854.js index 68a29ec..372c25f 100644 --- a/www/fhemapp4/assets/index-2d4633de.js +++ b/www/fhemapp4/assets/index-40878854.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,D 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,B 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,x 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,G 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,A 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,C 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,q as Zn,E 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-e6e38008.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,D 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,B 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,x 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,G 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,A 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,C 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,q as Zn,E 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-42e67982.js";/** * vue v3.4.8 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT diff --git a/www/fhemapp4/assets/index-e6e38008.js b/www/fhemapp4/assets/index-42e67982.js similarity index 99% rename from www/fhemapp4/assets/index-e6e38008.js rename to www/fhemapp4/assets/index-42e67982.js index f8c7dcd..5d9f950 100644 --- a/www/fhemapp4/assets/index-e6e38008.js +++ b/www/fhemapp4/assets/index-42e67982.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 It=Object.assign;function L0(e,t){const n={};for(const r in t){const a=t[r];n[r]=Ha(a)?a.map(e):e(a)}return n}const md=()=>{},Ha=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 Ha(e)?WI(e,t):Ha(t)?WI(t,e):e===t}function WI(e,t){return Ha(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(It({},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=It({},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=It({},a.value,t.state,{forward:l,scroll:ty()});i(c.current,c,!0);const f=It({},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=It({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 It(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=It({},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=It(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=It({},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)=>It(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]=Ha(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(Fe(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[Fe(e.replace)?"replace":"push"](Fe(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(!Ha(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=Fe(i);const{matched:c}=a.value;let f;for(;(f=c[u])&&!f.components;)u++;return u}),s=E(()=>a.value.matched[o.value]);At(eP,E(()=>o.value+1)),At(GY,s),At($S,a);const l=ge();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,It({},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,N=>""+N),f=L0.bind(null,zY),d=L0.bind(null,Dp);function v(N,B){let G,$;return vN(N)?(G=t.getRecordMatcher(N),$=B):$=N,t.addRoute($,G)}function h(N){const B=t.getRecordMatcher(N);B&&t.removeRoute(B)}function g(){return t.getRoutes().map(N=>N.record)}function p(N){return!!t.getRecordMatcher(N)}function m(N,B){if(B=It({},B||l.value),typeof N=="string"){const z=E0(n,N,B.path),Y=t.resolve({path:z.path},B),te=a.createHref(z.fullPath);return It(z,Y,{params:d(Y.params),hash:Dp(z.hash),redirectedFrom:void 0,href:te})}let G;if("path"in N)G=It({},N,{path:E0(n,N.path,B.path).path});else{const z=It({},N.params);for(const Y in z)z[Y]==null&&delete z[Y];G=It({},N,{params:f(z)}),B.params=f(B.params)}const $=t.resolve(G,B),X=N.hash||"";$.params=c(d($.params));const K=q8(r,It({},N,{hash:OY(X),path:$.path})),F=a.createHref(K);return It({fullPath:K,hash:X,query:r===QI?$Y(N.query):N.query||{}},$,{redirectedFrom:void 0,href:F})}function y(N){return typeof N=="string"?E0(n,N,l.value.path):It({},N)}function _(N,B){if(u!==N)return wc(8,{from:B,to:N})}function b(N){return w(N)}function x(N){return b(It(y(N),{replace:!0}))}function S(N){const B=N.matched[N.matched.length-1];if(B&&B.redirect){const{redirect:G}=B;let $=typeof G=="function"?G(N):G;return typeof $=="string"&&($=$.includes("?")||$.includes("#")?$=y($):{path:$},$.params={}),It({query:N.query,hash:N.hash,params:"path"in $?{}:N.params},$)}}function w(N,B){const G=u=m(N),$=l.value,X=N.state,K=N.force,F=N.replace===!0,z=S(G);if(z)return w(It(y(z),{state:typeof z=="object"?It({},X,z.state):X,force:K,replace:F}),B||G);const Y=G;Y.redirectedFrom=B;let te;return!K&&J8(r,$,G)&&(te=wc(16,{to:Y,from:$}),Z($,$,!0,!1)),(te?Promise.resolve(te):A(Y,$)).catch(re=>ki(re)?ki(re,2)?re:U(re):O(re,Y,$)).then(re=>{if(re){if(ki(re,2))return w(It({replace:F},y(re.to),{state:typeof re.to=="object"?It({},X,re.to.state):X,force:K}),B||Y)}else re=D(Y,$,!0,F,X);return P(Y,$,re),re})}function C(N,B){const G=_(N,B);return G?Promise.reject(G):Promise.resolve()}function T(N){const B=ae.values().next().value;return B&&typeof B.runWithContext=="function"?B.runWithContext(N):N()}function A(N,B){let G;const[$,X,K]=qY(N,B);G=R0($.reverse(),"beforeRouteLeave",N,B);for(const z of $)z.leaveGuards.forEach(Y=>{G.push(Bo(Y,N,B))});const F=C.bind(null,N,B);return G.push(F),ne(G).then(()=>{G=[];for(const z of i.list())G.push(Bo(z,N,B));return G.push(F),ne(G)}).then(()=>{G=R0(X,"beforeRouteUpdate",N,B);for(const z of X)z.updateGuards.forEach(Y=>{G.push(Bo(Y,N,B))});return G.push(F),ne(G)}).then(()=>{G=[];for(const z of K)if(z.beforeEnter)if(Ha(z.beforeEnter))for(const Y of z.beforeEnter)G.push(Bo(Y,N,B));else G.push(Bo(z.beforeEnter,N,B));return G.push(F),ne(G)}).then(()=>(N.matched.forEach(z=>z.enterCallbacks={}),G=R0(K,"beforeRouteEnter",N,B),G.push(F),ne(G))).then(()=>{G=[];for(const z of o.list())G.push(Bo(z,N,B));return G.push(F),ne(G)}).catch(z=>ki(z,8)?z:Promise.reject(z))}function P(N,B,G){s.list().forEach($=>T(()=>$(N,B,G)))}function D(N,B,G,$,X){const K=_(N,B);if(K)return K;const F=B===_o,z=Ku?history.state:{};G&&($||F?a.replace(N.fullPath,It({scroll:F&&z&&z.scroll},X)):a.push(N.fullPath,X)),l.value=N,Z(N,B,G,F),U()}let M;function L(){M||(M=a.listen((N,B,G)=>{if(!fe.listening)return;const $=m(N),X=S($);if(X){w(It(X,{replace:!0}),$).catch(md);return}u=$;const K=l.value;Ku&&oY(UI(K.fullPath,G.delta),ty()),A($,K).catch(F=>ki(F,12)?F:ki(F,2)?(w(F.to,$).then(z=>{ki(z,20)&&!G.delta&&G.type===Yd.pop&&a.go(-1,!1)}).catch(md),Promise.reject()):(G.delta&&a.go(-G.delta,!1),O(F,$,K))).then(F=>{F=F||D($,K,!1),F&&(G.delta&&!ki(F,8)?a.go(-G.delta,!1):G.type===Yd.pop&&ki(F,20)&&a.go(-1,!1)),P($,K,F)}).catch(md)}))}let R=yf(),V=yf(),W;function O(N,B,G){U(N);const $=V.list();return $.length?$.forEach(X=>X(N,B,G)):console.error(N),Promise.reject(N)}function H(){return W&&l.value!==_o?Promise.resolve():new Promise((N,B)=>{R.add([N,B])})}function U(N){return W||(W=!N,L(),R.list().forEach(([B,G])=>N?G(N):B()),R.reset()),N}function Z(N,B,G,$){const{scrollBehavior:X}=e;if(!Ku||!X)return Promise.resolve();const K=!G&&sY(UI(N.fullPath,0))||($||!G)&&history.state&&history.state.scroll||null;return dt().then(()=>X(N,B,K)).then(F=>F&&iY(F)).catch(F=>O(F,N,B))}const j=N=>a.go(N);let Q;const ae=new Set,fe={currentRoute:l,listening:!0,addRoute:v,removeRoute:h,hasRoute:p,getRoutes:g,resolve:m,options:e,push:b,replace:x,go:j,back:()=>j(-1),forward:()=>j(1),beforeEach:i.add,beforeResolve:o.add,afterEach:s.add,onError:V.add,isReady:H,install(N){const B=this;N.component("RouterLink",UY),N.component("RouterView",jY),N.config.globalProperties.$router=B,Object.defineProperty(N.config.globalProperties,"$route",{enumerable:!0,get:()=>Fe(l)}),Ku&&!Q&&l.value===_o&&(Q=!0,b(a.location).catch(X=>{}));const G={};for(const X in _o)Object.defineProperty(G,X,{get:()=>l.value[X],enumerable:!0});N.provide(Gw,B),N.provide(SN,tO(G)),N.provide($S,l);const $=N.unmount;ae.add(N),N.unmount=function(){ae.delete(N),ae.size<1&&(u=_o,M&&M(),M=null,l.value=_o,Q=!1,W=!1),$()}}};function ne(N){return N.reduce((B,G)=>B.then(()=>T(G)),Promise.resolve())}return fe}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 Va=KY({history:dY("./"),routes:[{path:"/:config",name:"home",component:()=>Eh(()=>import("./DevicesView-1c41c764.js"),["./DevicesView-1c41c764.js","./PanelCard-ca7331d5.js","./PanelCard-1a80a520.css"],import.meta.url)},{path:"/:config/devices/:view?",name:"devices",component:()=>Eh(()=>import("./DevicesView-1c41c764.js"),["./DevicesView-1c41c764.js","./PanelCard-ca7331d5.js","./PanelCard-1a80a520.css"],import.meta.url)},{path:"/:config/settings/:tab?/:item?",name:"settings",component:()=>Eh(()=>import("./SettingsView-a6a3e3d5.js"),["./SettingsView-a6a3e3d5.js","./index-2d4633de.js","./index-c6b58a67.css","./PanelCard-ca7331d5.js","./PanelCard-1a80a520.css","./SettingsView-3f514416.css"],import.meta.url)},{path:"/:config/internals",name:"internals",component:()=>Eh(()=>import("./InternalsView-9e589dca.js"),["./InternalsView-9e589dca.js","./index-2d4633de.js","./index-c6b58a67.css"],import.meta.url)}]});/*! + */const Ku=typeof window<"u";function Z8(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const It=Object.assign;function L0(e,t){const n={};for(const r in t){const a=t[r];n[r]=Ha(a)?a.map(e):e(a)}return n}const md=()=>{},Ha=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 Ha(e)?WI(e,t):Ha(t)?WI(t,e):e===t}function WI(e,t){return Ha(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(It({},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=It({},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=It({},a.value,t.state,{forward:l,scroll:ty()});i(c.current,c,!0);const f=It({},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=It({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 It(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=It({},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=It(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=It({},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)=>It(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]=Ha(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(Fe(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[Fe(e.replace)?"replace":"push"](Fe(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(!Ha(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=Fe(i);const{matched:c}=a.value;let f;for(;(f=c[u])&&!f.components;)u++;return u}),s=E(()=>a.value.matched[o.value]);At(eP,E(()=>o.value+1)),At(GY,s),At($S,a);const l=ge();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,It({},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,N=>""+N),f=L0.bind(null,zY),d=L0.bind(null,Dp);function v(N,B){let G,$;return vN(N)?(G=t.getRecordMatcher(N),$=B):$=N,t.addRoute($,G)}function h(N){const B=t.getRecordMatcher(N);B&&t.removeRoute(B)}function g(){return t.getRoutes().map(N=>N.record)}function p(N){return!!t.getRecordMatcher(N)}function m(N,B){if(B=It({},B||l.value),typeof N=="string"){const z=E0(n,N,B.path),Y=t.resolve({path:z.path},B),te=a.createHref(z.fullPath);return It(z,Y,{params:d(Y.params),hash:Dp(z.hash),redirectedFrom:void 0,href:te})}let G;if("path"in N)G=It({},N,{path:E0(n,N.path,B.path).path});else{const z=It({},N.params);for(const Y in z)z[Y]==null&&delete z[Y];G=It({},N,{params:f(z)}),B.params=f(B.params)}const $=t.resolve(G,B),X=N.hash||"";$.params=c(d($.params));const K=q8(r,It({},N,{hash:OY(X),path:$.path})),F=a.createHref(K);return It({fullPath:K,hash:X,query:r===QI?$Y(N.query):N.query||{}},$,{redirectedFrom:void 0,href:F})}function y(N){return typeof N=="string"?E0(n,N,l.value.path):It({},N)}function _(N,B){if(u!==N)return wc(8,{from:B,to:N})}function b(N){return w(N)}function x(N){return b(It(y(N),{replace:!0}))}function S(N){const B=N.matched[N.matched.length-1];if(B&&B.redirect){const{redirect:G}=B;let $=typeof G=="function"?G(N):G;return typeof $=="string"&&($=$.includes("?")||$.includes("#")?$=y($):{path:$},$.params={}),It({query:N.query,hash:N.hash,params:"path"in $?{}:N.params},$)}}function w(N,B){const G=u=m(N),$=l.value,X=N.state,K=N.force,F=N.replace===!0,z=S(G);if(z)return w(It(y(z),{state:typeof z=="object"?It({},X,z.state):X,force:K,replace:F}),B||G);const Y=G;Y.redirectedFrom=B;let te;return!K&&J8(r,$,G)&&(te=wc(16,{to:Y,from:$}),Z($,$,!0,!1)),(te?Promise.resolve(te):A(Y,$)).catch(re=>ki(re)?ki(re,2)?re:U(re):O(re,Y,$)).then(re=>{if(re){if(ki(re,2))return w(It({replace:F},y(re.to),{state:typeof re.to=="object"?It({},X,re.to.state):X,force:K}),B||Y)}else re=D(Y,$,!0,F,X);return P(Y,$,re),re})}function C(N,B){const G=_(N,B);return G?Promise.reject(G):Promise.resolve()}function T(N){const B=ae.values().next().value;return B&&typeof B.runWithContext=="function"?B.runWithContext(N):N()}function A(N,B){let G;const[$,X,K]=qY(N,B);G=R0($.reverse(),"beforeRouteLeave",N,B);for(const z of $)z.leaveGuards.forEach(Y=>{G.push(Bo(Y,N,B))});const F=C.bind(null,N,B);return G.push(F),ne(G).then(()=>{G=[];for(const z of i.list())G.push(Bo(z,N,B));return G.push(F),ne(G)}).then(()=>{G=R0(X,"beforeRouteUpdate",N,B);for(const z of X)z.updateGuards.forEach(Y=>{G.push(Bo(Y,N,B))});return G.push(F),ne(G)}).then(()=>{G=[];for(const z of K)if(z.beforeEnter)if(Ha(z.beforeEnter))for(const Y of z.beforeEnter)G.push(Bo(Y,N,B));else G.push(Bo(z.beforeEnter,N,B));return G.push(F),ne(G)}).then(()=>(N.matched.forEach(z=>z.enterCallbacks={}),G=R0(K,"beforeRouteEnter",N,B),G.push(F),ne(G))).then(()=>{G=[];for(const z of o.list())G.push(Bo(z,N,B));return G.push(F),ne(G)}).catch(z=>ki(z,8)?z:Promise.reject(z))}function P(N,B,G){s.list().forEach($=>T(()=>$(N,B,G)))}function D(N,B,G,$,X){const K=_(N,B);if(K)return K;const F=B===_o,z=Ku?history.state:{};G&&($||F?a.replace(N.fullPath,It({scroll:F&&z&&z.scroll},X)):a.push(N.fullPath,X)),l.value=N,Z(N,B,G,F),U()}let M;function L(){M||(M=a.listen((N,B,G)=>{if(!fe.listening)return;const $=m(N),X=S($);if(X){w(It(X,{replace:!0}),$).catch(md);return}u=$;const K=l.value;Ku&&oY(UI(K.fullPath,G.delta),ty()),A($,K).catch(F=>ki(F,12)?F:ki(F,2)?(w(F.to,$).then(z=>{ki(z,20)&&!G.delta&&G.type===Yd.pop&&a.go(-1,!1)}).catch(md),Promise.reject()):(G.delta&&a.go(-G.delta,!1),O(F,$,K))).then(F=>{F=F||D($,K,!1),F&&(G.delta&&!ki(F,8)?a.go(-G.delta,!1):G.type===Yd.pop&&ki(F,20)&&a.go(-1,!1)),P($,K,F)}).catch(md)}))}let R=yf(),V=yf(),W;function O(N,B,G){U(N);const $=V.list();return $.length?$.forEach(X=>X(N,B,G)):console.error(N),Promise.reject(N)}function H(){return W&&l.value!==_o?Promise.resolve():new Promise((N,B)=>{R.add([N,B])})}function U(N){return W||(W=!N,L(),R.list().forEach(([B,G])=>N?G(N):B()),R.reset()),N}function Z(N,B,G,$){const{scrollBehavior:X}=e;if(!Ku||!X)return Promise.resolve();const K=!G&&sY(UI(N.fullPath,0))||($||!G)&&history.state&&history.state.scroll||null;return dt().then(()=>X(N,B,K)).then(F=>F&&iY(F)).catch(F=>O(F,N,B))}const j=N=>a.go(N);let Q;const ae=new Set,fe={currentRoute:l,listening:!0,addRoute:v,removeRoute:h,hasRoute:p,getRoutes:g,resolve:m,options:e,push:b,replace:x,go:j,back:()=>j(-1),forward:()=>j(1),beforeEach:i.add,beforeResolve:o.add,afterEach:s.add,onError:V.add,isReady:H,install(N){const B=this;N.component("RouterLink",UY),N.component("RouterView",jY),N.config.globalProperties.$router=B,Object.defineProperty(N.config.globalProperties,"$route",{enumerable:!0,get:()=>Fe(l)}),Ku&&!Q&&l.value===_o&&(Q=!0,b(a.location).catch(X=>{}));const G={};for(const X in _o)Object.defineProperty(G,X,{get:()=>l.value[X],enumerable:!0});N.provide(Gw,B),N.provide(SN,tO(G)),N.provide($S,l);const $=N.unmount;ae.add(N),N.unmount=function(){ae.delete(N),ae.size<1&&(u=_o,M&&M(),M=null,l.value=_o,Q=!1,W=!1),$()}}};function ne(N){return N.reduce((B,G)=>B.then(()=>T(G)),Promise.resolve())}return fe}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 Va=KY({history:dY("./"),routes:[{path:"/:config",name:"home",component:()=>Eh(()=>import("./DevicesView-28b194ae.js"),["./DevicesView-28b194ae.js","./PanelCard-01886c92.js","./PanelCard-1a80a520.css"],import.meta.url)},{path:"/:config/devices/:view?",name:"devices",component:()=>Eh(()=>import("./DevicesView-28b194ae.js"),["./DevicesView-28b194ae.js","./PanelCard-01886c92.js","./PanelCard-1a80a520.css"],import.meta.url)},{path:"/:config/settings/:tab?/:item?",name:"settings",component:()=>Eh(()=>import("./SettingsView-142edc18.js"),["./SettingsView-142edc18.js","./index-40878854.js","./index-c6b58a67.css","./PanelCard-01886c92.js","./PanelCard-1a80a520.css","./SettingsView-3f514416.css"],import.meta.url)},{path:"/:config/internals",name:"internals",component:()=>Eh(()=>import("./InternalsView-19bcf3a5.js"),["./InternalsView-19bcf3a5.js","./index-40878854.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/index.html b/www/fhemapp4/index.html index bb6b826..ff74181 100644 --- a/www/fhemapp4/index.html +++ b/www/fhemapp4/index.html @@ -9,7 +9,7 @@ FHEMApp v4 - +