zwave-js-ui 9.16.2 → 9.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AssociationGroups-D5FbR9BE.js → AssociationGroups-CjBvLmRi.js} +2 -2
- package/dist/assets/{BgRssiChart-zMedRSGM.js → BgRssiChart-yh8_DgvK.js} +1 -1
- package/dist/assets/{BlinkIcon-CEhRfZ2u.js → BlinkIcon-CiGteQeS.js} +1 -1
- package/dist/assets/{CCTreeView-BsJwZkMy.js → CCTreeView-Dg1QKyZ3.js} +1 -1
- package/dist/assets/{ColumnFilter-CEK1XzRk.js → ColumnFilter-DQmdWk2N.js} +2 -2
- package/dist/assets/{ColumnFilterBoolean-BdmDqxSG.js → ColumnFilterBoolean-C1kDQpZd.js} +1 -1
- package/dist/assets/{ColumnFilterDate-JF0inKmj.js → ColumnFilterDate-CUsL4XUH.js} +1 -1
- package/dist/assets/{ColumnFilterNumber-CZ0QAmih.js → ColumnFilterNumber-D96egfUA.js} +1 -1
- package/dist/assets/{ColumnFilterString-CgrtNKkN.js → ColumnFilterString-DsH5-LlM.js} +1 -1
- package/dist/assets/{ControlPanel-DHwIJZ_M.js → ControlPanel-DTJ5nueO.js} +2 -2
- package/dist/assets/ControllerChart-wh1OdOs6.js +2 -0
- package/dist/assets/{Debug-CmqozSOI.js → Debug-DLRtOXG4.js} +1 -1
- package/dist/assets/{DialogAdvanced-BYEJ7Tll.js → DialogAdvanced-DJtWPDIx.js} +1 -1
- package/dist/assets/{DialogAssociation-B1e6m5Qf.js → DialogAssociation-x-1laATB.js} +1 -1
- package/dist/assets/{DialogGatewayValue-Bvni1nT7.js → DialogGatewayValue-D-xF737g.js} +2 -2
- package/dist/assets/{DialogHealthCheck-M1q6X4YS.js → DialogHealthCheck-As-IFpHx.js} +1 -1
- package/dist/assets/{DialogLinkReliability-btkYAW8p.js → DialogLinkReliability-D5gyhIlL.js} +1 -1
- package/dist/assets/{DialogSceneValue-DQc0FVYp.js → DialogSceneValue-Cqhw88lk.js} +2 -2
- package/dist/assets/{ErrorPage-BtPqrWRr.js → ErrorPage-DGdHJEjj.js} +1 -1
- package/dist/assets/{ExpandedNode-CduLaBRv.js → ExpandedNode-BdEIywQn.js} +2 -2
- package/dist/assets/{FrameDetails-DmO15gqJ.js → FrameDetails-D6Aosmv4.js} +2 -2
- package/dist/assets/{HomeAssistant-DIp8w7B0.js → HomeAssistant-D1FqHh3i.js} +1 -1
- package/dist/assets/{InvertedCheckbox-_eiyYFuI.js → InvertedCheckbox-4IZ4inbK.js} +1 -1
- package/dist/assets/{ListInput-BM4nHFyJ.js → ListInput-tu1SoS9X.js} +1 -1
- package/dist/assets/{Login-CnIDqENN.js → Login-CTHjpsq9.js} +1 -1
- package/dist/assets/{Mesh-IppQUkmT.js → Mesh-BVXHdJTp.js} +2 -2
- package/dist/assets/{MissingKeysAlert-C4uomQjz.js → MissingKeysAlert-DX12uJfF.js} +1 -1
- package/dist/assets/{Multipane-CG_NC-4D.js → Multipane-C_71sOXo.js} +1 -1
- package/dist/assets/{MultipaneResizer-DhyUlxfm.js → MultipaneResizer-bxFD_nM0.js} +1 -1
- package/dist/assets/{NodeDetails-D54DuJTb.js → NodeDetails-BMgooUnn.js} +2 -2
- package/dist/assets/{NodePanel-DhfvrToB.js → NodePanel-BGf30Y9n.js} +2 -2
- package/dist/assets/{NodeScheduler-B6nrHk_m.js → NodeScheduler-CljwvW3R.js} +1 -1
- package/dist/assets/{OTAUpdates-BJ3T707-.js → OTAUpdates-DsymkO0_.js} +1 -1
- package/dist/assets/{QrReader-CLT1L6qp.js → QrReader-DTxT0KsF.js} +1 -1
- package/dist/assets/{ReinterviewBadge-PnDZe9iI.js → ReinterviewBadge-C4x1t641.js} +1 -1
- package/dist/assets/{RichValue-BPD7qDxT.js → RichValue-50zU5Y1L.js} +1 -1
- package/dist/assets/{Scenes-3fDVpNc3.js → Scenes-BeWyWR12.js} +2 -2
- package/dist/assets/{Settings-C92bNqzl.js → Settings-Cf1ldPVK.js} +2 -2
- package/dist/assets/SmartStart-BpbtqQuQ.js +3 -0
- package/dist/assets/{SmartView-Cqg3D_NK.js → SmartView-DJPtDAho.js} +2 -2
- package/dist/assets/{StatisticsArrows-BWY99HRf.js → StatisticsArrows-DVt4uiV0.js} +2 -2
- package/dist/assets/{StatisticsCard-wXJCzlPN.js → StatisticsCard-mYTSFlwm.js} +1 -1
- package/dist/assets/{Store-D4_L9TnF.js → Store-C2ZgiOXO.js} +2 -2
- package/dist/assets/{UserCodeTable-BqUZSm1m.js → UserCodeTable-CwhLSV0h.js} +2 -2
- package/dist/assets/{ValueId-gCIdy8P9.js → ValueId-0GCHoOSg.js} +1 -1
- package/dist/assets/{Zniffer-BBS8399t.js → Zniffer-BXwak04o.js} +2 -2
- package/dist/assets/{ZwaveGraph-C1UjZOiJ.js → ZwaveGraph-xvUkm8R1.js} +26 -26
- package/dist/assets/{file-input-w59LXHA4.js → file-input-B1dSQ9_C.js} +1 -1
- package/dist/assets/{index-D_o4wuKe.js → index-CuXgVWNp.js} +6 -6
- package/dist/assets/{index-CVQ5gjxg.js → index-DSDj_ZX9.js} +2 -2
- package/dist/assets/{prismeditor.esm-CB7UZCGn.js → prismeditor.esm-BC28IwtN.js} +1 -1
- package/dist/assets/{vuedraggable.umd-D9aih0-1.js → vuedraggable.umd-AqP60Ge_.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/sw.js +1 -1
- package/package.json +1 -1
- package/dist/assets/ControllerChart-DW_DPDm5.js +0 -2
- package/dist/assets/SmartStart-5P0CzoTZ.js +0 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__fileDeps=["./DialogAssociation-
|
|
2
|
-
import{_ as c,I as l,m as u,u as r,a as p,ag as f,ac as d,y as g,n as h}from"./index-
|
|
1
|
+
const __vite__fileDeps=["./DialogAssociation-x-1laATB.js","./index-CuXgVWNp.js","./index-Dg6I0yvX.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
|
2
|
+
import{_ as c,I as l,m as u,u as r,a as p,ag as f,ac as d,y as g,n as h}from"./index-CuXgVWNp.js";const A={components:{DialogAssociation:()=>c(()=>import("./DialogAssociation-x-1laATB.js"),__vite__mapDeps([0,1,2]),import.meta.url)},mixins:[l],props:{node:Object},data(){return{associations:[],dialogAssociation:!1,headers:[{text:"Endpoint",value:"endpoint"},{text:"Group",value:"groupId"},{text:"Node",value:"nodeId"},{text:"Target Endpoint",value:"targetEndpoint"},{text:"Actions",value:"actions",sortable:!1}]}},computed:{...u(r,["nodes","nodesMap"])},mounted(){this.getAssociations()},methods:{...p(r,["showSnackbar"]),getAssociationAddress:f,getNodeName(e){const s=this.nodes[this.nodesMap.get(e)];return s?s._name:"NodeID_"+e},getEndpointLabel(e,s){const o=this.nodes[this.nodesMap.get(e)];if(o&&s>=0){const t=o.endpoints.find(n=>n.index===s);if(t)return t.label}return s>=0?"Endpoint "+s:"No Endpoint"},async getAssociations(e=!1){let s=!1;e&&this.node.status!=="Dead"&&(s=await this.app.confirm("Info",`Do you want to force query associations?${this.node.status==="Alive"?"":" This node is Asleep, so you should wake it up first."}`,"info"));const o=await this.app.apiRequest("getAssociations",[this.node.id,s]);o.success&&(this.associations=o.result,this.showSnackbar("Associations updated","success"))},async addAssociation(e){const s=isNaN(e.target)?e.target.id:parseInt(e.target),o=e.group,t={nodeId:s};o.multiChannel&&e.targetEndpoint>=0&&(t.endpoint=e.targetEndpoint);const n=[this.getAssociationAddress({nodeId:this.node.id,endpoint:e.endpoint}),o.value,[t]],i=await this.app.apiRequest("addAssociations",n);if(i.success){const a=i.result[0];a===d.AssociationCheckResult.OK?(this.showSnackbar("Association added","success"),this.getAssociations()):this.showSnackbar(`Error while adding association: ${g.getEnumMemberName(d.AssociationCheckResult,a)}`,"error")}this.dialogAssociation=!1},async removeAssociation(e){const s=[this.getAssociationAddress({nodeId:this.node.id,endpoint:e.endpoint}),e.groupId,[{nodeId:e.nodeId,endpoint:e.targetEndpoint}]];(await this.app.apiRequest("removeAssociations",s)).success&&(this.showSnackbar("Association removed","success"),this.getAssociations())},async removeAllAssociations(){const e=[this.node.id];if(!await this.app.confirm("Attention","Are you sure you want to remove all associations from this node? This will also remove lifeline association if it exists.","alert"))return;(await this.app.apiRequest("removeAllAssociations",e)).success&&(this.showSnackbar("Association removed","success"),this.getAssociations())}}};var m=function(){var s=this,o=s._self._c;return o("v-container",{attrs:{"grid-list-md":""}},[o("v-row",{staticClass:"pa-5",attrs:{justify:"center"}},[o("v-data-table",{staticClass:"elevation-1",attrs:{headers:s.headers,items:s.associations,"item-key":"id"},scopedSlots:s._u([{key:"top",fn:function(){return[o("v-btn",{staticClass:"mb-2",attrs:{text:"",color:"green"},on:{click:function(t){s.dialogAssociation=!0}}},[s._v("Add")]),o("v-btn",{staticClass:"mb-2",attrs:{text:"",color:"red"},on:{click:s.removeAllAssociations}},[s._v("Remove All")]),o("v-btn",{staticClass:"mb-2",attrs:{text:"",color:"primary"},on:{click:function(t){return s.getAssociations(!0)}}},[s._v("Refresh")])]},proxy:!0},{key:"item.groupId",fn:function({item:t}){return[s._v(" "+s._s(s.node.groups.find(n=>n.value===t.groupId&&n.endpoint===t.endpoint).text)+" ")]}},{key:"item.nodeId",fn:function({item:t}){return[s._v(" "+s._s(s.getNodeName(t.nodeId))+" ")]}},{key:"item.endpoint",fn:function({item:t}){return[s._v(" "+s._s(t.endpoint>=0?s.getEndpointLabel(s.node.id,t.endpoint):"None")+" ")]}},{key:"item.targetEndpoint",fn:function({item:t}){return[s._v(" "+s._s(t.targetEndpoint>=0?s.getEndpointLabel(t.nodeId,t.targetEndpoint):"None")+" ")]}},{key:"item.actions",fn:function({item:t}){return[o("v-icon",{attrs:{small:"",color:"red"},on:{click:function(n){return s.removeAssociation(t)}}},[s._v("delete")])]}}],null,!0)})],1),o("DialogAssociation",{attrs:{node:s.node,associations:s.associations},on:{add:s.addAssociation,close:function(t){s.dialogAssociation=!1}},model:{value:s.dialogAssociation,callback:function(t){s.dialogAssociation=t},expression:"dialogAssociation"}})],1)},v=[],_=h(A,m,v,!1,null,null);const b=_.exports;export{b as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{n as Wo,y as Go}from"./index-
|
|
1
|
+
import{n as Wo,y as Go}from"./index-CuXgVWNp.js";const Io=!0,De="u-",Bo="uplot",Yo=De+"hz",Uo=De+"vt",Ko=De+"title",jo=De+"wrap",qo=De+"under",$o=De+"over",Jo=De+"axis",Gt=De+"off",Zo=De+"select",Qo=De+"cursor-x",Xo=De+"cursor-y",er=De+"cursor-pt",tr=De+"legend",lr=De+"live",nr=De+"inline",ir=De+"series",sr=De+"marker",Bi=De+"label",or=De+"value",Hl="width",Nl="height",Vl="top",Yi="bottom",ol="left",Vn="right",Zn="#000",Ui=Zn+"0",Ki="mousemove",ji="mousedown",Fn="mouseup",qi="mouseenter",$i="mouseleave",Ji="dblclick",rr="resize",fr="scroll",Zi="change",sn="dppxchange",Qn="--",wl=typeof window<"u",Gn=wl?document:null,fl=wl?window:null,ur=wl?navigator:null;let oe,en;function In(){let e=devicePixelRatio;oe!=e&&(oe=e,en&&Yn(Zi,en,In),en=matchMedia(`(min-resolution: ${oe-.001}dppx) and (max-resolution: ${oe+.001}dppx)`),It(Zi,en,In),fl.dispatchEvent(new CustomEvent(sn)))}function Je(e,l){if(l!=null){let s=e.classList;!s.contains(l)&&s.add(l)}}function Bn(e,l){let s=e.classList;s.contains(l)&&s.remove(l)}function ge(e,l,s){e.style[l]=s+"px"}function ut(e,l,s,n){let o=Gn.createElement(e);return l!=null&&Je(o,l),s!=null&&s.insertBefore(o,n),o}function lt(e,l){return ut("div",e,l)}const Qi=new WeakMap;function St(e,l,s,n,o){let c="translate("+l+"px,"+s+"px)",u=Qi.get(e);c!=u&&(e.style.transform=c,Qi.set(e,c),l<0||s<0||l>n||s>o?Je(e,Gt):Bn(e,Gt))}const Xi=new WeakMap;function cr(e,l,s){let n=l+s,o=Xi.get(e);n!=o&&(Xi.set(e,n),e.style.background=l,e.style.borderColor=s)}const es=new WeakMap;function ar(e,l,s,n){let o=l+""+s,c=es.get(e);o!=c&&(es.set(e,o),e.style.height=s+"px",e.style.width=l+"px",e.style.marginLeft=n?-l/2+"px":0,e.style.marginTop=n?-s/2+"px":0)}const Xn={passive:!0},hr={...Xn,capture:!0};function It(e,l,s,n){l.addEventListener(e,s,n?hr:Xn)}function Yn(e,l,s,n){l.removeEventListener(e,s,Xn)}wl&&In();function Pt(e,l,s,n){let o;s=s||0,n=n||l.length-1;let c=n<=2147483647;for(;n-s>1;)o=c?s+n>>1:Ze((s+n)/2),l[o]<e?s=o:n=o;return e-l[s]<=l[n]-e?s:n}function ul(e,l,s,n){for(let o=n==1?l:s;o>=l&&o<=s;o+=n)if(e[o]!=null)return o;return-1}function pr(e,l,s,n){let o=te,c=-te;if(n==1)o=e[l],c=e[s];else if(n==-1)o=e[s],c=e[l];else for(let u=l;u<=s;u++){let m=e[u];m!=null&&(m<o&&(o=m),m>c&&(c=m))}return[o,c]}function mr(e,l,s){let n=te,o=-te;for(let c=l;c<=s;c++){let u=e[c];u!=null&&u>0&&(u<n&&(n=u),u>o&&(o=u))}return[n,o]}function fn(e,l,s,n){let o=ns(e),c=ns(l);e==l&&(o==-1?(e*=s,l/=s):(e/=s,l*=s));let u=s==10?yt:Ts,m=o==1?Ze:cl,d=c==1?cl:Ze,g=m(u(Te(e))),y=d(u(Te(l))),_=al(s,g),h=al(s,y);return s==10&&(g<0&&(_=ce(_,-g)),y<0&&(h=ce(h,-y))),n||s==2?(e=_*o,l=h*c):(e=Ps(e,_),l=Rt(l,h)),[e,l]}function ei(e,l,s,n){let o=fn(e,l,s,n);return e==0&&(o[0]=0),l==0&&(o[1]=0),o}const ti=.1,ts={mode:3,pad:ti},Wl={pad:0,soft:null,mode:0},dr={min:Wl,max:Wl};function on(e,l,s,n){return un(s)?ls(e,l,s):(Wl.pad=s,Wl.soft=n?0:null,Wl.mode=n?3:0,ls(e,l,dr))}function se(e,l){return e??l}function gr(e,l,s){for(l=se(l,0),s=se(s,e.length-1);l<=s;){if(e[l]!=null)return!0;l++}return!1}function ls(e,l,s){let n=s.min,o=s.max,c=se(n.pad,0),u=se(o.pad,0),m=se(n.hard,-te),d=se(o.hard,te),g=se(n.soft,te),y=se(o.soft,-te),_=se(n.mode,0),h=se(o.mode,0),A=l-e,R=yt(A),D=We(Te(e),Te(l)),F=yt(D),P=Te(F-R);(A<1e-9||P>10)&&(A=0,(e==0||l==0)&&(A=1e-9,_==2&&g!=te&&(c=0),h==2&&y!=-te&&(u=0)));let H=A||D||1e3,b=yt(H),C=al(10,Ze(b)),E=H*(A==0?e==0?.1:1:c),W=ce(Ps(e-E,C/10),9),L=e>=g&&(_==1||_==3&&W<=g||_==2&&W>=g)?g:te,G=We(m,W<L&&e>=L?L:nt(L,W)),B=H*(A==0?l==0?.1:1:u),z=ce(Rt(l+B,C/10),9),x=l<=y&&(h==1||h==3&&z>=y||h==2&&z<=y)?y:-te,N=nt(d,z>x&&l<=x?x:We(x,z));return G==N&&G==0&&(N=100),[G,N]}const wr=new Intl.NumberFormat(wl?ur.language:"en-US"),li=e=>wr.format(e),Qe=Math,nn=Qe.PI,Te=Qe.abs,Ze=Qe.floor,Ae=Qe.round,cl=Qe.ceil,nt=Qe.min,We=Qe.max,al=Qe.pow,ns=Qe.sign,yt=Qe.log10,Ts=Qe.log2,Sr=(e,l=1)=>Qe.sinh(e)*l,Hn=(e,l=1)=>Qe.asinh(e/l),te=1/0;function is(e){return(yt((e^e>>31)-(e>>31))|0)+1}function Un(e,l,s){return nt(We(e,l),s)}function ee(e){return typeof e=="function"?e:()=>e}const yr=()=>{},Ds=e=>e,Ls=(e,l)=>l,_r=e=>null,ss=e=>!0,os=(e,l)=>e==l,hl=e=>ce(e,14);function Wt(e,l){return hl(ce(hl(e/l))*l)}function Rt(e,l){return hl(cl(hl(e/l))*l)}function Ps(e,l){return hl(Ze(hl(e/l))*l)}function ce(e,l=0){if(vr(e))return e;let s=10**l,n=e*s*(1+Number.EPSILON);return Ae(n)/s}const pl=new Map;function Cs(e){return((""+e).split(".")[1]||"").length}function Il(e,l,s,n){let o=[],c=n.map(Cs);for(let u=l;u<s;u++){let m=Te(u),d=ce(al(e,u),m);for(let g=0;g<n.length;g++){let y=n[g]*d,_=(y>=0&&u>=0?0:m)+(u>=c[g]?0:c[g]),h=ce(y,_);o.push(h),pl.set(h,_)}}return o}const Gl={},ni=[],ml=[null,null],Ct=Array.isArray,vr=Number.isInteger,xr=e=>e===void 0;function rs(e){return typeof e=="string"}function un(e){let l=!1;if(e!=null){let s=e.constructor;l=s==null||s==Object}return l}function kr(e){return e!=null&&typeof e=="object"}const br=Object.getPrototypeOf(Uint8Array);function dl(e,l=un){let s;if(Ct(e)){let n=e.find(o=>o!=null);if(Ct(n)||l(n)){s=Array(e.length);for(let o=0;o<e.length;o++)s[o]=dl(e[o],l)}else s=e.slice()}else if(e instanceof br)s=e.slice();else if(l(e)){s={};for(let n in e)s[n]=dl(e[n],l)}else s=e;return s}function be(e){let l=arguments;for(let s=1;s<l.length;s++){let n=l[s];for(let o in n)un(e[o])?be(e[o],dl(n[o])):e[o]=dl(n[o])}return e}const Mr=0,Er=1,Ar=2;function Tr(e,l,s){for(let n=0,o,c=-1;n<l.length;n++){let u=l[n];if(u>c){for(o=u-1;o>=0&&e[o]==null;)e[o--]=null;for(o=u+1;o<s&&e[o]==null;)e[c=o++]=null}}}function Dr(e,l){if(Cr(e)){let u=e[0].slice();for(let m=1;m<e.length;m++)u.push(...e[m].slice(1));return Rr(u[0])||(u=Pr(u)),u}let s=new Set;for(let u=0;u<e.length;u++){let d=e[u][0],g=d.length;for(let y=0;y<g;y++)s.add(d[y])}let n=[Array.from(s).sort((u,m)=>u-m)],o=n[0].length,c=new Map;for(let u=0;u<o;u++)c.set(n[0][u],u);for(let u=0;u<e.length;u++){let m=e[u],d=m[0];for(let g=1;g<m.length;g++){let y=m[g],_=Array(o).fill(void 0),h=l?l[u][g]:Er,A=[];for(let R=0;R<y.length;R++){let D=y[R],F=c.get(d[R]);D===null?h!=Mr&&(_[F]=D,h==Ar&&A.push(F)):_[F]=D}Tr(_,A,o),n.push(_)}}return n}const Lr=typeof queueMicrotask>"u"?e=>Promise.resolve().then(e):queueMicrotask;function Pr(e){let l=e[0],s=l.length,n=Array(s);for(let c=0;c<n.length;c++)n[c]=c;n.sort((c,u)=>l[c]-l[u]);let o=[];for(let c=0;c<e.length;c++){let u=e[c],m=Array(s);for(let d=0;d<s;d++)m[d]=u[n[d]];o.push(m)}return o}function Cr(e){let l=e[0][0],s=l.length;for(let n=1;n<e.length;n++){let o=e[n][0];if(o.length!=s)return!1;if(o!=l){for(let c=0;c<s;c++)if(o[c]!=l[c])return!1}}return!0}function Rr(e,l=100){const s=e.length;if(s<=1)return!0;let n=0,o=s-1;for(;n<=o&&e[n]==null;)n++;for(;o>=n&&e[o]==null;)o--;if(o<=n)return!0;const c=We(1,Ze((o-n+1)/l));for(let u=e[n],m=n+c;m<=o;m+=c){const d=e[m];if(d!=null){if(d<=u)return!1;u=d}}return!0}const Rs=["January","February","March","April","May","June","July","August","September","October","November","December"],zs=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Vs(e){return e.slice(0,3)}const zr=zs.map(Vs),Vr=Rs.map(Vs),Fr={MMMM:Rs,MMM:Vr,WWWW:zs,WWW:zr};function Fl(e){return(e<10?"0":"")+e}function Hr(e){return(e<10?"00":e<100?"0":"")+e}const Nr={YYYY:e=>e.getFullYear(),YY:e=>(e.getFullYear()+"").slice(2),MMMM:(e,l)=>l.MMMM[e.getMonth()],MMM:(e,l)=>l.MMM[e.getMonth()],MM:e=>Fl(e.getMonth()+1),M:e=>e.getMonth()+1,DD:e=>Fl(e.getDate()),D:e=>e.getDate(),WWWW:(e,l)=>l.WWWW[e.getDay()],WWW:(e,l)=>l.WWW[e.getDay()],HH:e=>Fl(e.getHours()),H:e=>e.getHours(),h:e=>{let l=e.getHours();return l==0?12:l>12?l-12:l},AA:e=>e.getHours()>=12?"PM":"AM",aa:e=>e.getHours()>=12?"pm":"am",a:e=>e.getHours()>=12?"p":"a",mm:e=>Fl(e.getMinutes()),m:e=>e.getMinutes(),ss:e=>Fl(e.getSeconds()),s:e=>e.getSeconds(),fff:e=>Hr(e.getMilliseconds())};function ii(e,l){l=l||Fr;let s=[],n=/\{([a-z]+)\}|[^{]+/gi,o;for(;o=n.exec(e);)s.push(o[0][0]=="{"?Nr[o[1]]:o[0]);return c=>{let u="";for(let m=0;m<s.length;m++)u+=typeof s[m]=="string"?s[m]:s[m](c,l);return u}}const Or=new Intl.DateTimeFormat().resolvedOptions().timeZone;function Wr(e,l){let s;return l=="UTC"||l=="Etc/UTC"?s=new Date(+e+e.getTimezoneOffset()*6e4):l==Or?s=e:(s=new Date(e.toLocaleString("en-US",{timeZone:l})),s.setMilliseconds(e.getMilliseconds())),s}const Fs=e=>e%1==0,rn=[1,2,2.5,5],Gr=Il(10,-16,0,rn),Hs=Il(10,0,16,rn),Ir=Hs.filter(Fs),Br=Gr.concat(Hs),si=`
|
|
2
2
|
`,Ns="{YYYY}",fs=si+Ns,Os="{M}/{D}",Ol=si+Os,tn=Ol+"/{YY}",Ws="{aa}",Yr="{h}:{mm}",rl=Yr+Ws,us=si+rl,cs=":{ss}",re=null;function Gs(e){let l=e*1e3,s=l*60,n=s*60,o=n*24,c=o*30,u=o*365,d=(e==1?Il(10,0,3,rn).filter(Fs):Il(10,-3,0,rn)).concat([l,l*5,l*10,l*15,l*30,s,s*5,s*10,s*15,s*30,n,n*2,n*3,n*4,n*6,n*8,n*12,o,o*2,o*3,o*4,o*5,o*6,o*7,o*8,o*9,o*10,o*15,c,c*2,c*3,c*4,c*6,u,u*2,u*5,u*10,u*25,u*50,u*100]);const g=[[u,Ns,re,re,re,re,re,re,1],[o*28,"{MMM}",fs,re,re,re,re,re,1],[o,Os,fs,re,re,re,re,re,1],[n,"{h}"+Ws,tn,re,Ol,re,re,re,1],[s,rl,tn,re,Ol,re,re,re,1],[l,cs,tn+" "+rl,re,Ol+" "+rl,re,us,re,1],[e,cs+".{fff}",tn+" "+rl,re,Ol+" "+rl,re,us,re,1]];function y(_){return(h,A,R,D,F,P)=>{let H=[],b=F>=u,C=F>=c&&F<u,E=_(R),W=ce(E*e,3),L=Nn(E.getFullYear(),b?0:E.getMonth(),C||b?1:E.getDate()),G=ce(L*e,3);if(C||b){let B=C?F/c:0,z=b?F/u:0,x=W==G?W:ce(Nn(L.getFullYear()+z,L.getMonth()+B,1)*e,3),N=new Date(Ae(x/e)),q=N.getFullYear(),le=N.getMonth();for(let Y=0;x<=D;Y++){let ue=Nn(q+z*Y,le+B*Y,1),Z=ue-_(ce(ue*e,3));x=ce((+ue+Z)*e,3),x<=D&&H.push(x)}}else{let B=F>=o?o:F,z=Ze(R)-Ze(W),x=G+z+Rt(W-G,B);H.push(x);let N=_(x),q=N.getHours()+N.getMinutes()/s+N.getSeconds()/n,le=F/n,Y=h.axes[A]._space,ue=P/Y;for(;x=ce(x+F,e==1?0:3),!(x>D);)if(le>1){let Z=Ze(ce(q+le,6))%24,ne=_(x).getHours()-Z;ne>1&&(ne=-1),x-=ne*n,q=(q+le)%24;let fe=H[H.length-1];ce((x-fe)/F,3)*ue>=.7&&H.push(x)}else H.push(x)}return H}}return[d,g,y]}const[Ur,Kr,jr]=Gs(1),[qr,$r,Jr]=Gs(.001);Il(2,-53,53,[1]);function as(e,l){return e.map(s=>s.map((n,o)=>o==0||o==8||n==null?n:l(o==1||s[8]==0?n:s[1]+n)))}function hs(e,l){return(s,n,o,c,u)=>{let m=l.find(R=>u>=R[0])||l[l.length-1],d,g,y,_,h,A;return n.map(R=>{let D=e(R),F=D.getFullYear(),P=D.getMonth(),H=D.getDate(),b=D.getHours(),C=D.getMinutes(),E=D.getSeconds(),W=F!=d&&m[2]||P!=g&&m[3]||H!=y&&m[4]||b!=_&&m[5]||C!=h&&m[6]||E!=A&&m[7]||m[1];return d=F,g=P,y=H,_=b,h=C,A=E,W(D)})}}function Zr(e,l){let s=ii(l);return(n,o,c,u,m)=>o.map(d=>s(e(d)))}function Nn(e,l,s){return new Date(e,l,s)}function ps(e,l){return l(e)}const Qr="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function ms(e,l){return(s,n,o,c)=>c==null?Qn:l(e(n))}function Xr(e,l){let s=e.series[l];return s.width?s.stroke(e,l):s.points.width?s.points.stroke(e,l):null}function ef(e,l){return e.series[l].fill(e,l)}const tf={show:!0,live:!0,isolate:!1,mount:yr,markers:{show:!0,width:2,stroke:Xr,fill:ef,dash:"solid"},idx:null,idxs:null,values:[]};function lf(e,l){let s=e.cursor.points,n=lt(),o=s.size(e,l);ge(n,Hl,o),ge(n,Nl,o);let c=o/-2;ge(n,"marginLeft",c),ge(n,"marginTop",c);let u=s.width(e,l,o);return u&&ge(n,"borderWidth",u),n}function nf(e,l){let s=e.series[l].points;return s._fill||s._stroke}function sf(e,l){let s=e.series[l].points;return s._stroke||s._fill}function of(e,l){return e.series[l].points.size}const On=[0,0];function rf(e,l,s){return On[0]=l,On[1]=s,On}function ln(e,l,s,n=!0){return o=>{o.button==0&&(!n||o.target==l)&&s(o)}}function Wn(e,l,s,n=!0){return o=>{(!n||o.target==l)&&s(o)}}const ff={show:!0,x:!0,y:!0,lock:!1,move:rf,points:{show:lf,size:of,width:0,stroke:sf,fill:nf},bind:{mousedown:ln,mouseup:ln,click:ln,dblclick:ln,mousemove:Wn,mouseleave:Wn,mouseenter:Wn},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(e,l)=>{l.stopPropagation(),l.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(e,l,s,n,o)=>n-o,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},Is={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},oi=be({},Is,{filter:Ls}),Bs=be({},oi,{size:10}),Ys=be({},Is,{show:!1}),ri='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Us="bold "+ri,Ks=1.5,ds={show:!0,scale:"x",stroke:Zn,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Us,side:2,grid:oi,ticks:Bs,border:Ys,font:ri,lineGap:Ks,rotate:0},uf="Value",cf="Time",gs={show:!0,scale:"x",auto:!1,sorted:1,min:te,max:-te,idxs:[]};function af(e,l,s,n,o){return l.map(c=>c==null?"":li(c))}function hf(e,l,s,n,o,c,u){let m=[],d=pl.get(o)||0;s=u?s:ce(Rt(s,o),d);for(let g=s;g<=n;g=ce(g+o,d))m.push(Object.is(g,-0)?0:g);return m}function Kn(e,l,s,n,o,c,u){const m=[],d=e.scales[e.axes[l].scale].log,g=d==10?yt:Ts,y=Ze(g(s));o=al(d,y),d==10&&y<0&&(o=ce(o,-y));let _=s;do m.push(_),_=_+o,d==10&&(_=ce(_,pl.get(o))),_>=o*d&&(o=_);while(_<=n);return m}function pf(e,l,s,n,o,c,u){let d=e.scales[e.axes[l].scale].asinh,g=n>d?Kn(e,l,We(d,s),n,o):[d],y=n>=0&&s<=0?[0]:[];return(s<-d?Kn(e,l,We(d,-n),-s,o):[d]).reverse().map(h=>-h).concat(y,g)}const js=/./,mf=/[12357]/,df=/[125]/,ws=/1/,jn=(e,l,s,n)=>e.map((o,c)=>l==4&&o==0||c%n==0&&s.test(o.toExponential()[o<0?1:0])?o:null);function gf(e,l,s,n,o){let c=e.axes[s],u=c.scale,m=e.scales[u],d=e.valToPos,g=c._space,y=d(10,u),_=d(9,u)-y>=g?js:d(7,u)-y>=g?mf:d(5,u)-y>=g?df:ws;if(_==ws){let h=Te(d(1,u)-y);if(h<g)return jn(l.slice().reverse(),m.distr,_,cl(g/h)).reverse()}return jn(l,m.distr,_,1)}function wf(e,l,s,n,o){let c=e.axes[s],u=c.scale,m=c._space,d=e.valToPos,g=Te(d(1,u)-d(2,u));return g<m?jn(l.slice().reverse(),3,js,cl(m/g)).reverse():l}function Sf(e,l,s,n){return n==null?Qn:l==null?"":li(l)}const Ss={show:!0,scale:"y",stroke:Zn,space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Us,side:3,grid:oi,ticks:Bs,border:Ys,font:ri,lineGap:Ks,rotate:0};function yf(e,l){let s=3+(e||1)*2;return ce(s*l,3)}function _f(e,l){let{scale:s,idxs:n}=e.series[0],o=e._data[0],c=e.valToPos(o[n[0]],s,!0),u=e.valToPos(o[n[1]],s,!0),m=Te(u-c),d=e.series[l],g=m/(d.points.space*oe);return n[1]-n[0]<=g}const ys={scale:null,auto:!0,sorted:0,min:te,max:-te},qs=(e,l,s,n,o)=>o,_s={show:!0,auto:!0,sorted:0,gaps:qs,alpha:1,facets:[be({},ys,{scale:"x"}),be({},ys,{scale:"y"})]},vs={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:qs,alpha:1,points:{show:_f,filter:null},values:null,min:te,max:-te,idxs:[],path:null,clip:null};function vf(e,l,s,n,o){return s/10}const $s={time:Io,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},xf=be({},$s,{time:!1,ori:1}),xs={};function Js(e,l){let s=xs[e];return s||(s={key:e,plots:[],sub(n){s.plots.push(n)},unsub(n){s.plots=s.plots.filter(o=>o!=n)},pub(n,o,c,u,m,d,g){for(let y=0;y<s.plots.length;y++)s.plots[y]!=o&&s.plots[y].pub(n,o,c,u,m,d,g)}},e!=null&&(xs[e]=s)),s}const gl=1,qn=2;function Bt(e,l,s){const n=e.mode,o=e.series[l],c=n==2?e._data[l]:e._data,u=e.scales,m=e.bbox;let d=c[0],g=n==2?c[1]:c[l],y=n==2?u[o.facets[0].scale]:u[e.series[0].scale],_=n==2?u[o.facets[1].scale]:u[o.scale],h=m.left,A=m.top,R=m.width,D=m.height,F=e.valToPosH,P=e.valToPosV;return y.ori==0?s(o,d,g,y,_,F,P,h,A,R,D,an,Sl,pn,Qs,eo):s(o,d,g,y,_,P,F,A,h,D,R,hn,yl,ci,Xs,to)}function fi(e,l){let s=0,n=0,o=se(e.bands,ni);for(let c=0;c<o.length;c++){let u=o[c];u.series[0]==l?s=u.dir:u.series[1]==l&&(u.dir==1?n|=1:n|=2)}return[s,n==1?-1:n==2?1:n==3?2:0]}function kf(e,l,s,n,o){let c=e.mode,u=e.series[l],m=c==2?u.facets[1].scale:u.scale,d=e.scales[m];return o==-1?d.min:o==1?d.max:d.distr==3?d.dir==1?d.min:d.max:0}function _t(e,l,s,n,o,c){return Bt(e,l,(u,m,d,g,y,_,h,A,R,D,F)=>{let P=u.pxRound;const H=g.dir*(g.ori==0?1:-1),b=g.ori==0?Sl:yl;let C,E;H==1?(C=s,E=n):(C=n,E=s);let W=P(_(m[C],g,D,A)),L=P(h(d[C],y,F,R)),G=P(_(m[E],g,D,A)),B=P(h(c==1?y.max:y.min,y,F,R)),z=new Path2D(o);return b(z,G,B),b(z,W,B),b(z,W,L),z})}function cn(e,l,s,n,o,c){let u=null;if(e.length>0){u=new Path2D;const m=l==0?pn:ci;let d=s;for(let _=0;_<e.length;_++){let h=e[_];if(h[1]>h[0]){let A=h[0]-d;A>0&&m(u,d,n,A,n+c),d=h[1]}}let g=s+o-d,y=10;g>0&&m(u,d,n-y/2,g,n+c+y)}return u}function bf(e,l,s){let n=e[e.length-1];n&&n[0]==l?n[1]=s:e.push([l,s])}function ui(e,l,s,n,o,c,u){let m=[],d=e.length;for(let g=o==1?s:n;g>=s&&g<=n;g+=o)if(l[g]===null){let _=g,h=g;if(o==1)for(;++g<=n&&l[g]===null;)h=g;else for(;--g>=s&&l[g]===null;)h=g;let A=c(e[_]),R=h==_?A:c(e[h]),D=_-o;A=u<=0&&D>=0&&D<d?c(e[D]):A;let P=h+o;R=u>=0&&P>=0&&P<d?c(e[P]):R,R>=A&&m.push([A,R])}return m}function ks(e){return e==0?Ds:e==1?Ae:l=>Wt(l,e)}function Zs(e){let l=e==0?an:hn,s=e==0?(o,c,u,m,d,g)=>{o.arcTo(c,u,m,d,g)}:(o,c,u,m,d,g)=>{o.arcTo(u,c,d,m,g)},n=e==0?(o,c,u,m,d)=>{o.rect(c,u,m,d)}:(o,c,u,m,d)=>{o.rect(u,c,d,m)};return(o,c,u,m,d,g=0,y=0)=>{g==0&&y==0?n(o,c,u,m,d):(g=nt(g,m/2,d/2),y=nt(y,m/2,d/2),l(o,c+g,u),s(o,c+m,u,c+m,u+d,g),s(o,c+m,u+d,c,u+d,y),s(o,c,u+d,c,u,y),s(o,c,u,c+m,u,g),o.closePath())}}const an=(e,l,s)=>{e.moveTo(l,s)},hn=(e,l,s)=>{e.moveTo(s,l)},Sl=(e,l,s)=>{e.lineTo(l,s)},yl=(e,l,s)=>{e.lineTo(s,l)},pn=Zs(0),ci=Zs(1),Qs=(e,l,s,n,o,c)=>{e.arc(l,s,n,o,c)},Xs=(e,l,s,n,o,c)=>{e.arc(s,l,n,o,c)},eo=(e,l,s,n,o,c,u)=>{e.bezierCurveTo(l,s,n,o,c,u)},to=(e,l,s,n,o,c,u)=>{e.bezierCurveTo(s,l,o,n,u,c)};function lo(e){return(l,s,n,o,c)=>Bt(l,s,(u,m,d,g,y,_,h,A,R,D,F)=>{let{pxRound:P,points:H}=u,b,C;g.ori==0?(b=an,C=Qs):(b=hn,C=Xs);const E=ce(H.width*oe,3);let W=(H.size-H.width)/2*oe,L=ce(W*2,3),G=new Path2D,B=new Path2D,{left:z,top:x,width:N,height:q}=l.bbox;pn(B,z-L,x-L,N+L*2,q+L*2);const le=Y=>{if(d[Y]!=null){let ue=P(_(m[Y],g,D,A)),Z=P(h(d[Y],y,F,R));b(G,ue+W,Z),C(G,ue,Z,W,0,nn*2)}};if(c)c.forEach(le);else for(let Y=n;Y<=o;Y++)le(Y);return{stroke:E>0?G:null,fill:G,clip:B,flags:gl|qn}})}function no(e){return(l,s,n,o,c,u)=>{n!=o&&(c!=n&&u!=n&&e(l,s,n),c!=o&&u!=o&&e(l,s,o),e(l,s,u))}}const Mf=no(Sl),Ef=no(yl);function io(e){const l=se(e==null?void 0:e.alignGaps,0);return(s,n,o,c)=>Bt(s,n,(u,m,d,g,y,_,h,A,R,D,F)=>{let P=u.pxRound,H=O=>P(_(O,g,D,A)),b=O=>P(h(O,y,F,R)),C,E;g.ori==0?(C=Sl,E=Mf):(C=yl,E=Ef);const W=g.dir*(g.ori==0?1:-1),L={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:gl},G=L.stroke;let B=te,z=-te,x,N,q,le=H(m[W==1?o:c]),Y=ul(d,o,c,1*W),ue=ul(d,o,c,-1*W),Z=H(m[Y]),Ye=H(m[ue]),xe=!1;for(let O=W==1?o:c;O>=o&&O<=c;O+=W){let Se=H(m[O]),ie=d[O];Se==le?ie!=null?(N=b(ie),B==te&&(C(G,Se,N),x=N),B=nt(N,B),z=We(N,z)):ie===null&&(xe=!0):(B!=te&&(E(G,le,B,z,x,N),q=le),ie!=null?(N=b(ie),C(G,Se,N),B=z=x=N):(B=te,z=-te,ie===null&&(xe=!0)),le=Se)}B!=te&&B!=z&&q!=le&&E(G,le,B,z,x,N);let[ne,fe]=fi(s,n);if(u.fill!=null||ne!=0){let O=L.fill=new Path2D(G),Se=u.fillTo(s,n,u.min,u.max,ne),ie=b(Se);C(O,Ye,ie),C(O,Z,ie)}if(!u.spanGaps){let O=[];xe&&O.push(...ui(m,d,o,c,W,H,l)),L.gaps=O=u.gaps(s,n,o,c,O),L.clip=cn(O,g.ori,A,R,D,F)}return fe!=0&&(L.band=fe==2?[_t(s,n,o,c,G,-1),_t(s,n,o,c,G,1)]:_t(s,n,o,c,G,fe)),L})}function Af(e){const l=se(e.align,1),s=se(e.ascDesc,!1),n=se(e.alignGaps,0),o=se(e.extend,!1);return(c,u,m,d)=>Bt(c,u,(g,y,_,h,A,R,D,F,P,H,b)=>{let C=g.pxRound,{left:E,width:W}=c.bbox,L=ne=>C(R(ne,h,H,F)),G=ne=>C(D(ne,A,b,P)),B=h.ori==0?Sl:yl;const z={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:gl},x=z.stroke,N=h.dir*(h.ori==0?1:-1);m=ul(_,m,d,1),d=ul(_,m,d,-1);let q=G(_[N==1?m:d]),le=L(y[N==1?m:d]),Y=le,ue=le;o&&l==-1&&(ue=E,B(x,ue,q)),B(x,le,q);for(let ne=N==1?m:d;ne>=m&&ne<=d;ne+=N){let fe=_[ne];if(fe==null)continue;let O=L(y[ne]),Se=G(fe);l==1?B(x,O,q):B(x,Y,Se),B(x,O,Se),q=Se,Y=O}let Z=Y;o&&l==1&&(Z=E+W,B(x,Z,q));let[Ye,xe]=fi(c,u);if(g.fill!=null||Ye!=0){let ne=z.fill=new Path2D(x),fe=g.fillTo(c,u,g.min,g.max,Ye),O=G(fe);B(ne,Z,O),B(ne,ue,O)}if(!g.spanGaps){let ne=[];ne.push(...ui(y,_,m,d,N,L,n));let fe=g.width*oe/2,O=s||l==1?fe:-fe,Se=s||l==-1?-fe:fe;ne.forEach(ie=>{ie[0]+=O,ie[1]+=Se}),z.gaps=ne=g.gaps(c,u,m,d,ne),z.clip=cn(ne,h.ori,F,P,H,b)}return xe!=0&&(z.band=xe==2?[_t(c,u,m,d,x,-1),_t(c,u,m,d,x,1)]:_t(c,u,m,d,x,xe)),z})}function bs(e,l,s,n,o,c,u=te){if(e.length>1){let m=null;for(let d=0,g=1/0;d<e.length;d++)if(l[d]!==void 0){if(m!=null){let y=Te(e[d]-e[m]);y<g&&(g=y,u=Te(s(e[d],n,o,c)-s(e[m],n,o,c)))}m=d}}return u}function Tf(e){e=e||Gl;const l=se(e.size,[.6,te,1]),s=e.align||0,n=e.gap||0;let o=e.radius;o=o==null?[0,0]:typeof o=="number"?[o,0]:o;const c=ee(o),u=1-l[0],m=se(l[1],te),d=se(l[2],1),g=se(e.disp,Gl),y=se(e.each,A=>{}),{fill:_,stroke:h}=g;return(A,R,D,F)=>Bt(A,R,(P,H,b,C,E,W,L,G,B,z,x)=>{let N=P.pxRound,q=s,le=n*oe,Y=m*oe,ue=d*oe,Z,Ye;C.ori==0?[Z,Ye]=c(A,R):[Ye,Z]=c(A,R);const xe=C.dir*(C.ori==0?1:-1);let ne=C.ori==0?pn:ci,fe=C.ori==0?y:(K,Ie,kt,Vt,bt,qe,it)=>{y(K,Ie,kt,bt,Vt,it,qe)},O=se(A.bands,ni).find(K=>K.series[0]==R),Se=O!=null?O.dir:0,ie=P.fillTo(A,R,P.min,P.max,Se),Ue=N(L(ie,E,x,B)),_l,Me,Ke,Xe=z,ve=N(P.width*oe),je=!1,vt=null,Yt=null,zt=null,Ut=null;_!=null&&(ve==0||h!=null)&&(je=!0,vt=_.values(A,R,D,F),Yt=new Map,new Set(vt).forEach(K=>{K!=null&&Yt.set(K,new Path2D)}),ve>0&&(zt=h.values(A,R,D,F),Ut=new Map,new Set(zt).forEach(K=>{K!=null&&Ut.set(K,new Path2D)})));let{x0:vl,size:dt}=g;if(vl!=null&&dt!=null){q=1,H=vl.values(A,R,D,F),vl.unit==2&&(H=H.map(kt=>A.posToVal(G+kt*z,C.key,!0)));let K=dt.values(A,R,D,F);dt.unit==2?Me=K[0]*z:Me=W(K[0],C,z,G)-W(0,C,z,G),Xe=bs(H,b,W,C,z,G,Xe),Ke=Xe-Me+le}else Xe=bs(H,b,W,C,z,G,Xe),Ke=Xe*u+le,Me=Xe-Ke;Ke<1&&(Ke=0),ve>=Me/2&&(ve=0),Ke<5&&(N=Ds);let et=Ke>0,Bl=Xe-Ke-(et?ve:0);Me=N(Un(Bl,ue,Y)),_l=(q==0?Me/2:q==xe?0:Me)-q*xe*((q==0?le/2:0)+(et?ve/2:0));const ct={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},xt=je?null:new Path2D;let $=null;if(O!=null)$=A.data[O.series[1]];else{let{y0:K,y1:Ie}=g;K!=null&&Ie!=null&&(b=Ie.values(A,R,D,F),$=K.values(A,R,D,F))}let Q=Z*Me,He=Ye*Me;for(let K=xe==1?D:F;K>=D&&K<=F;K+=xe){let Ie=b[K];if(Ie==null)continue;if($!=null){let at=$[K]??0;if(Ie-at==0)continue;Ue=L(at,E,x,B)}let kt=C.distr!=2||g!=null?H[K]:K,Vt=W(kt,C,z,G),bt=L(se(Ie,ie),E,x,B),qe=N(Vt-_l),it=N(We(bt,Ue)),$e=N(nt(bt,Ue)),tt=it-$e;if(Ie!=null){let at=Ie<0?He:Q,Mt=Ie<0?Q:He;je?(ve>0&&zt[K]!=null&&ne(Ut.get(zt[K]),qe,$e+Ze(ve/2),Me,We(0,tt-ve),at,Mt),vt[K]!=null&&ne(Yt.get(vt[K]),qe,$e+Ze(ve/2),Me,We(0,tt-ve),at,Mt)):ne(xt,qe,$e+Ze(ve/2),Me,We(0,tt-ve),at,Mt),fe(A,R,K,qe-ve/2,$e,Me+ve,tt)}}return ve>0?ct.stroke=je?Ut:xt:je||(ct._fill=P.width==0?P._fill:P._stroke??P._fill,ct.width=0),ct.fill=je?Yt:xt,ct})}function Df(e,l){const s=se(l==null?void 0:l.alignGaps,0);return(n,o,c,u)=>Bt(n,o,(m,d,g,y,_,h,A,R,D,F,P)=>{let H=m.pxRound,b=Z=>H(h(Z,y,F,R)),C=Z=>H(A(Z,_,P,D)),E,W,L;y.ori==0?(E=an,L=Sl,W=eo):(E=hn,L=yl,W=to);const G=y.dir*(y.ori==0?1:-1);c=ul(g,c,u,1),u=ul(g,c,u,-1);let B=b(d[G==1?c:u]),z=B,x=[],N=[];for(let Z=G==1?c:u;Z>=c&&Z<=u;Z+=G)if(g[Z]!=null){let xe=d[Z],ne=b(xe);x.push(z=ne),N.push(C(g[Z]))}const q={stroke:e(x,N,E,L,W,H),fill:null,clip:null,band:null,gaps:null,flags:gl},le=q.stroke;let[Y,ue]=fi(n,o);if(m.fill!=null||Y!=0){let Z=q.fill=new Path2D(le),Ye=m.fillTo(n,o,m.min,m.max,Y),xe=C(Ye);L(Z,z,xe),L(Z,B,xe)}if(!m.spanGaps){let Z=[];Z.push(...ui(d,g,c,u,G,b,s)),q.gaps=Z=m.gaps(n,o,c,u,Z),q.clip=cn(Z,y.ori,R,D,F,P)}return ue!=0&&(q.band=ue==2?[_t(n,o,c,u,le,-1),_t(n,o,c,u,le,1)]:_t(n,o,c,u,le,ue)),q})}function Lf(e){return Df(Pf,e)}function Pf(e,l,s,n,o,c){const u=e.length;if(u<2)return null;const m=new Path2D;if(s(m,e[0],l[0]),u==2)n(m,e[1],l[1]);else{let d=Array(u),g=Array(u-1),y=Array(u-1),_=Array(u-1);for(let h=0;h<u-1;h++)y[h]=l[h+1]-l[h],_[h]=e[h+1]-e[h],g[h]=y[h]/_[h];d[0]=g[0];for(let h=1;h<u-1;h++)g[h]===0||g[h-1]===0||g[h-1]>0!=g[h]>0?d[h]=0:(d[h]=3*(_[h-1]+_[h])/((2*_[h]+_[h-1])/g[h-1]+(_[h]+2*_[h-1])/g[h]),isFinite(d[h])||(d[h]=0));d[u-1]=g[u-2];for(let h=0;h<u-1;h++)o(m,e[h]+_[h]/3,l[h]+d[h]*_[h]/3,e[h+1]-_[h]/3,l[h+1]-d[h+1]*_[h]/3,e[h+1],l[h+1])}return m}const $n=new Set;function Ms(){for(let e of $n)e.syncRect(!0)}wl&&(It(rr,fl,Ms),It(fr,fl,Ms,!0),It(sn,fl,()=>{Ge.pxRatio=oe}));const Cf=io(),Rf=lo();function Es(e,l,s,n){return(n?[e[0],e[1]].concat(e.slice(2)):[e[0]].concat(e.slice(1))).map((c,u)=>Jn(c,u,l,s))}function zf(e,l){return e.map((s,n)=>n==0?null:be({},l,s))}function Jn(e,l,s,n){return be({},l==0?s:n,e)}function so(e,l,s){return l==null?ml:[l,s]}const Vf=so;function Ff(e,l,s){return l==null?ml:on(l,s,ti,!0)}function oo(e,l,s,n){return l==null?ml:fn(l,s,e.scales[n].log,!1)}const Hf=oo;function ro(e,l,s,n){return l==null?ml:ei(l,s,e.scales[n].log,!1)}const Nf=ro;function Of(e,l,s,n,o){let c=We(is(e),is(l)),u=l-e,m=Pt(o/n*u,s);do{let d=s[m],g=n*d/u;if(g>=o&&c+(d<5?pl.get(d):0)<=17)return[d,g]}while(++m<s.length);return[0,0]}function As(e){let l,s;return e=e.replace(/(\d+)px/,(n,o)=>(l=Ae((s=+o)*oe))+"px"),[e,l,s]}function Wf(e){e.show&&[e.font,e.labelFont].forEach(l=>{let s=ce(l[2]*oe,1);l[0]=l[0].replace(/[0-9.]+px/,s+"px"),l[1]=s})}function Ge(e,l,s){const n={mode:se(e.mode,1)},o=n.mode;function c(t,i){return((i.distr==3?yt(t>0?t:i.clamp(n,t,i.min,i.max,i.key)):i.distr==4?Hn(t,i.asinh):t)-i._min)/(i._max-i._min)}function u(t,i,r,f){let a=c(t,i);return f+r*(i.dir==-1?1-a:a)}function m(t,i,r,f){let a=c(t,i);return f+r*(i.dir==-1?a:1-a)}function d(t,i,r,f){return i.ori==0?u(t,i,r,f):m(t,i,r,f)}n.valToPosH=u,n.valToPosV=m;let g=!1;n.status=0;const y=n.root=lt(Bo);if(e.id!=null&&(y.id=e.id),Je(y,e.class),e.title){let t=lt(Ko,y);t.textContent=e.title}const _=ut("canvas"),h=n.ctx=_.getContext("2d"),A=lt(jo,y);It("click",A,t=>{t.target===D&&(pe!=Xt||we!=el)&&Fe.click(n,t)},!0);const R=n.under=lt(qo,A);A.appendChild(_);const D=n.over=lt($o,A);e=dl(e);const F=+se(e.pxAlign,1),P=ks(F);(e.plugins||[]).forEach(t=>{t.opts&&(e=t.opts(n,e)||e)});const H=e.ms||.001,b=n.series=o==1?Es(e.series||[],gs,vs,!1):zf(e.series||[null],_s),C=n.axes=Es(e.axes||[],ds,Ss,!0),E=n.scales={},W=n.bands=e.bands||[];W.forEach(t=>{t.fill=ee(t.fill||null),t.dir=se(t.dir,-1)});const L=o==2?b[1].facets[0].scale:b[0].scale,G={axes:Mo,series:_o},B=(e.drawOrder||["axes","series"]).map(t=>G[t]);function z(t){let i=E[t];if(i==null){let r=(e.scales||Gl)[t]||Gl;if(r.from!=null)z(r.from),E[t]=be({},E[r.from],r,{key:t});else{i=E[t]=be({},t==L?$s:xf,r),i.key=t;let f=i.time,a=i.range,p=Ct(a);if((t!=L||o==2&&!f)&&(p&&(a[0]==null||a[1]==null)&&(a={min:a[0]==null?ts:{mode:1,hard:a[0],soft:a[0]},max:a[1]==null?ts:{mode:1,hard:a[1],soft:a[1]}},p=!1),!p&&un(a))){let w=a;a=(S,k,M)=>k==null?ml:on(k,M,w)}i.range=ee(a||(f?Vf:t==L?i.distr==3?Hf:i.distr==4?Nf:so:i.distr==3?oo:i.distr==4?ro:Ff)),i.auto=ee(p?!1:i.auto),i.clamp=ee(i.clamp||vf),i._min=i._max=null}}}z("x"),z("y"),o==1&&b.forEach(t=>{z(t.scale)}),C.forEach(t=>{z(t.scale)});for(let t in e.scales)z(t);const x=E[L],N=x.distr;let q,le;x.ori==0?(Je(y,Yo),q=u,le=m):(Je(y,Uo),q=m,le=u);const Y={};for(let t in E){let i=E[t];(i.min!=null||i.max!=null)&&(Y[t]={min:i.min,max:i.max},i.min=i.max=null)}const ue=e.tzDate||(t=>new Date(Ae(t/H))),Z=e.fmtDate||ii,Ye=H==1?jr(ue):Jr(ue),xe=hs(ue,as(H==1?Kr:$r,Z)),ne=ms(ue,ps(Qr,Z)),fe=[],O=n.legend=be({},tf,e.legend),Se=O.show,ie=O.markers;O.idxs=fe,ie.width=ee(ie.width),ie.dash=ee(ie.dash),ie.stroke=ee(ie.stroke),ie.fill=ee(ie.fill);let Ue,_l,Me,Ke=[],Xe=[],ve,je=!1,vt={};if(O.live){const t=b[1]?b[1].values:null;je=t!=null,ve=je?t(n,1,0):{_:0};for(let i in ve)vt[i]=Qn}if(Se)if(Ue=ut("table",tr,y),Me=ut("tbody",null,Ue),O.mount(n,Ue),je){_l=ut("thead",null,Ue,Me);let t=ut("tr",null,_l);ut("th",null,t);for(var Yt in ve)ut("th",Bi,t).textContent=Yt}else Je(Ue,nr),O.live&&Je(Ue,lr);const zt={show:!0},Ut={show:!1};function vl(t,i){if(i==0&&(je||!O.live||o==2))return ml;let r=[],f=ut("tr",ir,Me,Me.childNodes[i]);Je(f,t.class),t.show||Je(f,Gt);let a=ut("th",null,f);if(ie.show){let S=lt(sr,a);if(i>0){let k=ie.width(n,i);k&&(S.style.border=k+"px "+ie.dash(n,i)+" "+ie.stroke(n,i)),S.style.background=ie.fill(n,i)}}let p=lt(Bi,a);p.textContent=t.label,i>0&&(ie.show||(p.style.color=t.width>0?ie.stroke(n,i):ie.fill(n,i)),et("click",a,S=>{if(V._lock)return;Ht(S);let k=b.indexOf(t);if((S.ctrlKey||S.metaKey)!=O.isolate){let M=b.some((v,T)=>T>0&&T!=k&&v.show);b.forEach((v,T)=>{T>0&&pt(T,M?T==k?zt:Ut:zt,!0,ke.setSeries)})}else pt(k,{show:!t.show},!0,ke.setSeries)},!1),xl&&et(qi,a,S=>{V._lock||(Ht(S),pt(b.indexOf(t),nl,!0,ke.setSeries))},!1));for(var w in ve){let S=ut("td",or,f);S.textContent="--",r.push(S)}return[f,r]}const dt=new Map;function et(t,i,r,f=!0){const a=dt.get(i)||{},p=V.bind[t](n,i,r,f);p&&(It(t,i,a[t]=p),dt.set(i,a))}function Bl(t,i,r){const f=dt.get(i)||{};for(let a in f)(t==null||a==t)&&(Yn(a,i,f[a]),delete f[a]);t==null&&dt.delete(i)}let ct=0,xt=0,$=0,Q=0,He=0,K=0,Ie=He,kt=K,Vt=$,bt=Q,qe=0,it=0,$e=0,tt=0;n.bbox={};let at=!1,Mt=!1,Kt=!1,Ft=!1,Yl=!1,st=!1;function mn(t,i,r){(r||t!=n.width||i!=n.height)&&ai(t,i),$t(!1),Kt=!0,Mt=!0,Jt()}function ai(t,i){n.width=ct=$=t,n.height=xt=Q=i,He=K=0,ao(),ho();let r=n.bbox;qe=r.left=Wt(He*oe,.5),it=r.top=Wt(K*oe,.5),$e=r.width=Wt($*oe,.5),tt=r.height=Wt(Q*oe,.5)}const fo=3;function uo(){let t=!1,i=0;for(;!t;){i++;let r=ko(i),f=bo(i);t=i==fo||r&&f,t||(ai(n.width,n.height),Mt=!0)}}function co({width:t,height:i}){mn(t,i)}n.setSize=co;function ao(){let t=!1,i=!1,r=!1,f=!1;C.forEach((a,p)=>{if(a.show&&a._show){let{side:w,_size:S}=a,k=w%2,M=a.label!=null?a.labelSize:0,v=S+M;v>0&&(k?($-=v,w==3?(He+=v,f=!0):r=!0):(Q-=v,w==0?(K+=v,t=!0):i=!0))}}),Nt[0]=t,Nt[1]=r,Nt[2]=i,Nt[3]=f,$-=Et[1]+Et[3],He+=Et[3],Q-=Et[2]+Et[0],K+=Et[0]}function ho(){let t=He+$,i=K+Q,r=He,f=K;function a(p,w){switch(p){case 1:return t+=w,t-w;case 2:return i+=w,i-w;case 3:return r-=w,r+w;case 0:return f-=w,f+w}}C.forEach((p,w)=>{if(p.show&&p._show){let S=p.side;p._pos=a(S,p._size),p.label!=null&&(p._lpos=a(S,p.labelSize))}})}const V=n.cursor=be({},ff,{drag:{y:o==2}},e.cursor);if(V.dataIdx==null){let t=V.hover,i=t.skip=new Set(t.skip??[]);i.add(void 0);let r=t.prox=ee(t.prox),f=t.bias??(t.bias=0);V.dataIdx=(a,p,w,S)=>{if(p==0)return w;let k=w,M=r(a,p,w,S)??te,v=M>=0&&M<te,T=x.ori==0?$:Q,I=V.left,he=l[0],J=l[p];if(i.has(J[w])){k=null;let U=null,j=null,X;if(f==0||f==-1)for(X=w;U==null&&X-- >0;)i.has(J[X])||(U=X);if(f==0||f==1)for(X=w;j==null&&X++<J.length;)i.has(J[X])||(j=X);if(U!=null||j!=null)if(v){let de=U==null?-1/0:q(he[U],x,T,0),Oe=j==null?1/0:q(he[j],x,T,0),ae=I-de,ye=Oe-I;ae<=ye?ae<=M&&(k=U):ye<=M&&(k=j)}else k=j==null?U:U==null?j:w-U<=j-w?U:j}else v&&Te(I-q(he[w],x,T,0))>M&&(k=null);return k}}const Ht=t=>{V.event=t};V.idxs=fe,V._lock=!1;let ht=V.points;ht.show=ee(ht.show),ht.size=ee(ht.size),ht.stroke=ee(ht.stroke),ht.width=ee(ht.width),ht.fill=ee(ht.fill);const jt=n.focus=be({},e.focus||{alpha:.3},V.focus),xl=jt.prox>=0;let Ne=[null],kl=[null],bl=[null];function po(t,i){if(i>0){let r=V.points.show(n,i);if(r)return Je(r,er),Je(r,t.class),St(r,-10,-10,$,Q),D.insertBefore(r,Ne[i]),r}}function hi(t,i){if(o==1||i>0){let r=o==1&&E[t.scale].time,f=t.value;t.value=r?rs(f)?ms(ue,ps(f,Z)):f||ne:f||Sf,t.label=t.label||(r?cf:uf)}if(i>0){t.width=t.width==null?1:t.width,t.paths=t.paths||Cf||_r,t.fillTo=ee(t.fillTo||kf),t.pxAlign=+se(t.pxAlign,F),t.pxRound=ks(t.pxAlign),t.stroke=ee(t.stroke||null),t.fill=ee(t.fill||null),t._stroke=t._fill=t._paths=t._focus=null;let r=yf(We(1,t.width),1),f=t.points=be({},{size:r,width:We(1,r*.2),stroke:t.stroke,space:r*2,paths:Rf,_stroke:null,_fill:null},t.points);f.show=ee(f.show),f.filter=ee(f.filter),f.fill=ee(f.fill),f.stroke=ee(f.stroke),f.paths=ee(f.paths),f.pxAlign=t.pxAlign}if(Se){let r=vl(t,i);Ke.splice(i,0,r[0]),Xe.splice(i,0,r[1]),O.values.push(null)}if(V.show){fe.splice(i,0,null);let r=po(t,i);r!=null&&(Ne.splice(i,0,r),kl.splice(i,0,0),bl.splice(i,0,0))}ze("addSeries",i)}function mo(t,i){i=i??b.length,t=o==1?Jn(t,i,gs,vs):Jn(t,i,null,_s),b.splice(i,0,t),hi(b[i],i)}n.addSeries=mo;function go(t){if(b.splice(t,1),Se){O.values.splice(t,1),Xe.splice(t,1);let i=Ke.splice(t,1)[0];Bl(null,i.firstChild),i.remove()}V.show&&(fe.splice(t,1),Ne.length>1&&(Ne.splice(t,1)[0].remove(),kl.splice(t,1),bl.splice(t,1))),ze("delSeries",t)}n.delSeries=go;const Nt=[!1,!1,!1,!1];function wo(t,i){if(t._show=t.show,t.show){let r=t.side%2,f=E[t.scale];f==null&&(t.scale=r?b[1].scale:L,f=E[t.scale]);let a=f.time;t.size=ee(t.size),t.space=ee(t.space),t.rotate=ee(t.rotate),Ct(t.incrs)&&t.incrs.forEach(w=>{!pl.has(w)&&pl.set(w,Cs(w))}),t.incrs=ee(t.incrs||(f.distr==2?Ir:a?H==1?Ur:qr:Br)),t.splits=ee(t.splits||(a&&f.distr==1?Ye:f.distr==3?Kn:f.distr==4?pf:hf)),t.stroke=ee(t.stroke),t.grid.stroke=ee(t.grid.stroke),t.ticks.stroke=ee(t.ticks.stroke),t.border.stroke=ee(t.border.stroke);let p=t.values;t.values=Ct(p)&&!Ct(p[0])?ee(p):a?Ct(p)?hs(ue,as(p,Z)):rs(p)?Zr(ue,p):p||xe:p||af,t.filter=ee(t.filter||(f.distr>=3&&f.log==10?gf:f.distr==3&&f.log==2?wf:Ls)),t.font=As(t.font),t.labelFont=As(t.labelFont),t._size=t.size(n,null,i,0),t._space=t._rotate=t._incrs=t._found=t._splits=t._values=null,t._size>0&&(Nt[i]=!0,t._el=lt(Jo,A))}}function Ml(t,i,r,f){let[a,p,w,S]=r,k=i%2,M=0;return k==0&&(S||p)&&(M=i==0&&!a||i==2&&!w?Ae(ds.size/3):0),k==1&&(a||w)&&(M=i==1&&!p||i==3&&!S?Ae(Ss.size/2):0),M}const pi=n.padding=(e.padding||[Ml,Ml,Ml,Ml]).map(t=>ee(se(t,Ml))),Et=n._padding=pi.map((t,i)=>t(n,i,Nt,0));let Ve,Le=null,Pe=null;const Ul=o==1?b[0].idxs:null;let ot=null,El=!1;function mi(t,i){if(l=t??[],n.data=n._data=l,o==2){Ve=0;for(let r=1;r<b.length;r++)Ve+=l[r][0].length}else{l.length==0&&(n.data=n._data=l=[[]]),ot=l[0],Ve=ot.length;let r=l;if(N==2){r=l.slice();let f=r[0]=Array(Ve);for(let a=0;a<Ve;a++)f[a]=a}n._data=l=r}if($t(!0),ze("setData"),N==2&&(Kt=!0),i!==!1){let r=x;r.auto(n,El)?dn():Tt(L,r.min,r.max),Ft=Ft||V.left>=0,st=!0,Jt()}}n.setData=mi;function dn(){El=!0;let t,i;o==1&&(Ve>0?(Le=Ul[0]=0,Pe=Ul[1]=Ve-1,t=l[0][Le],i=l[0][Pe],N==2?(t=Le,i=Pe):t==i&&(N==3?[t,i]=fn(t,t,x.log,!1):N==4?[t,i]=ei(t,t,x.log,!1):x.time?i=t+Ae(86400/H):[t,i]=on(t,i,ti,!0))):(Le=Ul[0]=t=null,Pe=Ul[1]=i=null)),Tt(L,t,i)}let Kl,qt,gn,wn,Sn,yn,_n,vn,xn,gt;function di(t,i,r,f,a,p){t??(t=Ui),r??(r=ni),f??(f="butt"),a??(a=Ui),p??(p="round"),t!=Kl&&(h.strokeStyle=Kl=t),a!=qt&&(h.fillStyle=qt=a),i!=gn&&(h.lineWidth=gn=i),p!=Sn&&(h.lineJoin=Sn=p),f!=yn&&(h.lineCap=yn=f),r!=wn&&h.setLineDash(wn=r)}function gi(t,i,r,f){i!=qt&&(h.fillStyle=qt=i),t!=_n&&(h.font=_n=t),r!=vn&&(h.textAlign=vn=r),f!=xn&&(h.textBaseline=xn=f)}function kn(t,i,r,f,a=0){if(f.length>0&&t.auto(n,El)&&(i==null||i.min==null)){let p=se(Le,0),w=se(Pe,f.length-1),S=r.min==null?t.distr==3?mr(f,p,w):pr(f,p,w,a):[r.min,r.max];t.min=nt(t.min,r.min=S[0]),t.max=We(t.max,r.max=S[1])}}const wi={min:null,max:null};function So(){for(let f in E){let a=E[f];Y[f]==null&&(a.min==null||Y[L]!=null&&a.auto(n,El))&&(Y[f]=wi)}for(let f in E){let a=E[f];Y[f]==null&&a.from!=null&&Y[a.from]!=null&&(Y[f]=wi)}Y[L]!=null&&$t(!0);let t={};for(let f in Y){let a=Y[f];if(a!=null){let p=t[f]=dl(E[f],kr);if(a.min!=null)be(p,a);else if(f!=L||o==2)if(Ve==0&&p.from==null){let w=p.range(n,null,null,f);p.min=w[0],p.max=w[1]}else p.min=te,p.max=-te}}if(Ve>0){b.forEach((f,a)=>{if(o==1){let p=f.scale,w=Y[p];if(w==null)return;let S=t[p];if(a==0){let k=S.range(n,S.min,S.max,p);S.min=k[0],S.max=k[1],Le=Pt(S.min,l[0]),Pe=Pt(S.max,l[0]),Pe-Le>1&&(l[0][Le]<S.min&&Le++,l[0][Pe]>S.max&&Pe--),f.min=ot[Le],f.max=ot[Pe]}else f.show&&f.auto&&kn(S,w,f,l[a],f.sorted);f.idxs[0]=Le,f.idxs[1]=Pe}else if(a>0&&f.show&&f.auto){let[p,w]=f.facets,S=p.scale,k=w.scale,[M,v]=l[a],T=t[S],I=t[k];T!=null&&kn(T,Y[S],p,M,p.sorted),I!=null&&kn(I,Y[k],w,v,w.sorted),f.min=w.min,f.max=w.max}});for(let f in t){let a=t[f],p=Y[f];if(a.from==null&&(p==null||p.min==null)){let w=a.range(n,a.min==te?null:a.min,a.max==-te?null:a.max,f);a.min=w[0],a.max=w[1]}}}for(let f in t){let a=t[f];if(a.from!=null){let p=t[a.from];if(p.min==null)a.min=a.max=null;else{let w=a.range(n,p.min,p.max,f);a.min=w[0],a.max=w[1]}}}let i={},r=!1;for(let f in t){let a=t[f],p=E[f];if(p.min!=a.min||p.max!=a.max){p.min=a.min,p.max=a.max;let w=p.distr;p._min=w==3?yt(p.min):w==4?Hn(p.min,p.asinh):p.min,p._max=w==3?yt(p.max):w==4?Hn(p.max,p.asinh):p.max,i[f]=r=!0}}if(r){b.forEach((f,a)=>{o==2?a>0&&i.y&&(f._paths=null):i[f.scale]&&(f._paths=null)});for(let f in i)Kt=!0,ze("setScale",f);V.show&&V.left>=0&&(Ft=st=!0)}for(let f in Y)Y[f]=null}function yo(t){let i=Un(Le-1,0,Ve-1),r=Un(Pe+1,0,Ve-1);for(;t[i]==null&&i>0;)i--;for(;t[r]==null&&r<Ve-1;)r++;return[i,r]}function _o(){Ve>0&&(b.forEach((t,i)=>{if(i>0&&t.show&&(Si(i,!1),Si(i,!0),t._paths==null)){gt!=t.alpha&&(h.globalAlpha=gt=t.alpha);let r=o==2?[0,l[i][0].length-1]:yo(l[i]);t._paths=t.paths(n,i,r[0],r[1]),gt!=1&&(h.globalAlpha=gt=1)}}),b.forEach((t,i)=>{if(i>0&&t.show){gt!=t.alpha&&(h.globalAlpha=gt=t.alpha),t._paths!=null&&yi(i,!1);{let r=t._paths!=null?t._paths.gaps:null,f=t.points.show(n,i,Le,Pe,r),a=t.points.filter(n,i,f,r);(f||a)&&(t.points._paths=t.points.paths(n,i,Le,Pe,a),yi(i,!0))}gt!=1&&(h.globalAlpha=gt=1),ze("drawSeries",i)}}))}function Si(t,i){let r=i?b[t].points:b[t];r._stroke=r.stroke(n,t),r._fill=r.fill(n,t)}function yi(t,i){let r=i?b[t].points:b[t],{stroke:f,fill:a,clip:p,flags:w,_stroke:S=r._stroke,_fill:k=r._fill,_width:M=r.width}=r._paths;M=ce(M*oe,3);let v=null,T=M%2/2;i&&k==null&&(k=M>0?"#fff":S);let I=r.pxAlign==1&&T>0;if(I&&h.translate(T,T),!i){let he=qe-M/2,J=it-M/2,U=$e+M,j=tt+M;v=new Path2D,v.rect(he,J,U,j)}i?bn(S,M,r.dash,r.cap,k,f,a,w,p):vo(t,S,M,r.dash,r.cap,k,f,a,w,v,p),I&&h.translate(-T,-T)}function vo(t,i,r,f,a,p,w,S,k,M,v){let T=!1;k!=0&&W.forEach((I,he)=>{if(I.series[0]==t){let J=b[I.series[1]],U=l[I.series[1]],j=(J._paths||Gl).band;Ct(j)&&(j=I.dir==1?j[0]:j[1]);let X,de=null;J.show&&j&&gr(U,Le,Pe)?(de=I.fill(n,he)||p,X=J._paths.clip):j=null,bn(i,r,f,a,de,w,S,k,M,v,X,j),T=!0}}),T||bn(i,r,f,a,p,w,S,k,M,v)}const _i=gl|qn;function bn(t,i,r,f,a,p,w,S,k,M,v,T){di(t,i,r,f,a),(k||M||T)&&(h.save(),k&&h.clip(k),M&&h.clip(M)),T?(S&_i)==_i?(h.clip(T),v&&h.clip(v),ql(a,w),jl(t,p,i)):S&qn?(ql(a,w),h.clip(T),jl(t,p,i)):S&gl&&(h.save(),h.clip(T),v&&h.clip(v),ql(a,w),h.restore(),jl(t,p,i)):(ql(a,w),jl(t,p,i)),(k||M||T)&&h.restore()}function jl(t,i,r){r>0&&(i instanceof Map?i.forEach((f,a)=>{h.strokeStyle=Kl=a,h.stroke(f)}):i!=null&&t&&h.stroke(i))}function ql(t,i){i instanceof Map?i.forEach((r,f)=>{h.fillStyle=qt=f,h.fill(r)}):i!=null&&t&&h.fill(i)}function xo(t,i,r,f){let a=C[t],p;if(f<=0)p=[0,0];else{let w=a._space=a.space(n,t,i,r,f),S=a._incrs=a.incrs(n,t,i,r,f,w);p=Of(i,r,S,f,w)}return a._found=p}function Mn(t,i,r,f,a,p,w,S,k,M){let v=w%2/2;F==1&&h.translate(v,v),di(S,w,k,M,S),h.beginPath();let T,I,he,J,U=a+(f==0||f==3?-p:p);r==0?(I=a,J=U):(T=a,he=U);for(let j=0;j<t.length;j++)i[j]!=null&&(r==0?T=he=t[j]:I=J=t[j],h.moveTo(T,I),h.lineTo(he,J));h.stroke(),F==1&&h.translate(-v,-v)}function ko(t){let i=!0;return C.forEach((r,f)=>{if(!r.show)return;let a=E[r.scale];if(a.min==null){r._show&&(i=!1,r._show=!1,$t(!1));return}else r._show||(i=!1,r._show=!0,$t(!1));let p=r.side,w=p%2,{min:S,max:k}=a,[M,v]=xo(f,S,k,w==0?$:Q);if(v==0)return;let T=a.distr==2,I=r._splits=r.splits(n,f,S,k,M,v,T),he=a.distr==2?I.map(X=>ot[X]):I,J=a.distr==2?ot[I[1]]-ot[I[0]]:M,U=r._values=r.values(n,r.filter(n,he,f,v,J),f,v,J);r._rotate=p==2?r.rotate(n,U,f,v):0;let j=r._size;r._size=cl(r.size(n,U,f,t)),j!=null&&r._size!=j&&(i=!1)}),i}function bo(t){let i=!0;return pi.forEach((r,f)=>{let a=r(n,f,Nt,t);a!=Et[f]&&(i=!1),Et[f]=a}),i}function Mo(){for(let t=0;t<C.length;t++){let i=C[t];if(!i.show||!i._show)continue;let r=i.side,f=r%2,a,p,w=i.stroke(n,t),S=r==0||r==3?-1:1;if(i.label){let ft=i.labelGap*S,wt=Ae((i._lpos+ft)*oe);gi(i.labelFont[0],w,"center",r==2?Vl:Yi),h.save(),f==1?(a=p=0,h.translate(wt,Ae(it+tt/2)),h.rotate((r==3?-nn:nn)/2)):(a=Ae(qe+$e/2),p=wt),h.fillText(i.label,a,p),h.restore()}let[k,M]=i._found;if(M==0)continue;let v=E[i.scale],T=f==0?$e:tt,I=f==0?qe:it,he=Ae(i.gap*oe),J=i._splits,U=v.distr==2?J.map(ft=>ot[ft]):J,j=v.distr==2?ot[J[1]]-ot[J[0]]:k,X=i.ticks,de=i.border,Oe=X.show?Ae(X.size*oe):0,ae=i._rotate*-nn/180,ye=P(i._pos*oe),Ee=(Oe+he)*S,_e=ye+Ee;p=f==0?_e:0,a=f==1?_e:0;let Be=i.font[0],rt=i.align==1?ol:i.align==2?Vn:ae>0?ol:ae<0?Vn:f==0?"center":r==3?Vn:ol,Lt=ae||f==1?"middle":r==2?Vl:Yi;gi(Be,w,rt,Lt);let Oi=i.font[1]*i.lineGap,Xl=J.map(ft=>P(d(ft,v,T,I))),Wi=i._values;for(let ft=0;ft<Wi.length;ft++){let wt=Wi[ft];if(wt!=null){f==0?a=Xl[ft]:p=Xl[ft],wt=""+wt;let Gi=wt.indexOf(`
|
|
3
3
|
`)==-1?[wt]:wt.split(/\n/gm);for(let zl=0;zl<Gi.length;zl++){let Ii=Gi[zl];ae?(h.save(),h.translate(a,p+zl*Oi),h.rotate(ae),h.fillText(Ii,0,0),h.restore()):h.fillText(Ii,a,p+zl*Oi)}}}X.show&&Mn(Xl,X.filter(n,U,t,M,j),f,r,ye,Oe,ce(X.width*oe,3),X.stroke(n,t),X.dash,X.cap);let sl=i.grid;sl.show&&Mn(Xl,sl.filter(n,U,t,M,j),f,f==0?2:1,f==0?it:qe,f==0?tt:$e,ce(sl.width*oe,3),sl.stroke(n,t),sl.dash,sl.cap),de.show&&Mn([ye],[1],f==0?1:0,f==0?1:2,f==1?it:qe,f==1?tt:$e,ce(de.width*oe,3),de.stroke(n,t),de.dash,de.cap)}ze("drawAxes")}function $t(t){b.forEach((i,r)=>{r>0&&(i._paths=null,t&&(o==1?(i.min=null,i.max=null):i.facets.forEach(f=>{f.min=null,f.max=null})))})}let $l=!1,En=!1,Al=[];function Eo(){En=!1;for(let t=0;t<Al.length;t++)ze(...Al[t]);Al.length=0}function Jt(){$l||(Lr(vi),$l=!0)}function Ao(t,i=!1){$l=!0,En=i,t(n),vi(),i&&Al.length>0&&queueMicrotask(Eo)}n.batch=Ao;function vi(){if(at&&(So(),at=!1),Kt&&(uo(),Kt=!1),Mt){if(ge(R,ol,He),ge(R,Vl,K),ge(R,Hl,$),ge(R,Nl,Q),ge(D,ol,He),ge(D,Vl,K),ge(D,Hl,$),ge(D,Nl,Q),ge(A,Hl,ct),ge(A,Nl,xt),_.width=Ae(ct*oe),_.height=Ae(xt*oe),C.forEach(({_el:t,_show:i,_size:r,_pos:f,side:a})=>{if(t!=null)if(i){let p=a===3||a===0?r:0,w=a%2==1;ge(t,w?"left":"top",f-p),ge(t,w?"width":"height",r),ge(t,w?"top":"left",w?K:He),ge(t,w?"height":"width",w?Q:$),Bn(t,Gt)}else Je(t,Gt)}),Kl=qt=gn=Sn=yn=_n=vn=xn=wn=null,gt=1,Cl(!0),He!=Ie||K!=kt||$!=Vt||Q!=bt){$t(!1);let t=$/Vt,i=Q/bt;if(V.show&&!Ft&&V.left>=0){V.left*=t,V.top*=i,Zt&&St(Zt,Ae(V.left),0,$,Q),Qt&&St(Qt,0,Ae(V.top),$,Q);for(let r=1;r<Ne.length;r++)kl[r]*=t,bl[r]*=i,St(Ne[r],Rt(kl[r],1),Rt(bl[r],1),$,Q)}if(me.show&&!Yl&&me.left>=0&&me.width>0){me.left*=t,me.width*=t,me.top*=i,me.height*=i;for(let r in Cn)ge(tl,r,me[r])}Ie=He,kt=K,Vt=$,bt=Q}ze("setSize"),Mt=!1}ct>0&&xt>0&&(h.clearRect(0,0,_.width,_.height),ze("drawClear"),B.forEach(t=>t()),ze("draw")),me.show&&Yl&&(Jl(me),Yl=!1),V.show&&Ft&&(Ot(null,!0,!1),Ft=!1),O.show&&O.live&&st&&(Ln(),st=!1),g||(g=!0,n.status=1,ze("ready")),El=!1,$l=!1}n.redraw=(t,i)=>{Kt=i||!1,t!==!1?Tt(L,x.min,x.max):Jt()};function An(t,i){let r=E[t];if(r.from==null){if(Ve==0){let f=r.range(n,i.min,i.max,t);i.min=f[0],i.max=f[1]}if(i.min>i.max){let f=i.min;i.min=i.max,i.max=f}if(Ve>1&&i.min!=null&&i.max!=null&&i.max-i.min<1e-16)return;t==L&&r.distr==2&&Ve>0&&(i.min=Pt(i.min,l[0]),i.max=Pt(i.max,l[0]),i.min==i.max&&i.max++),Y[t]=i,at=!0,Jt()}}n.setScale=An;let Tn,Dn,Zt,Qt,xi,ki,Xt,el,bi,Mi,pe,we,At=!1;const Fe=V.drag;let Ce=Fe.x,Re=Fe.y;V.show&&(V.x&&(Tn=lt(Qo,D)),V.y&&(Dn=lt(Xo,D)),x.ori==0?(Zt=Tn,Qt=Dn):(Zt=Dn,Qt=Tn),pe=V.left,we=V.top);const me=n.select=be({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),tl=me.show?lt(Zo,me.over?D:R):null;function Jl(t,i){if(me.show){for(let r in t)me[r]=t[r],r in Cn&&ge(tl,r,t[r]);i!==!1&&ze("setSelect")}}n.setSelect=Jl;function To(t,i){let r=b[t],f=Se?Ke[t]:null;r.show?f&&Bn(f,Gt):(f&&Je(f,Gt),Ne.length>1&&St(Ne[t],-10,-10,$,Q))}function Tt(t,i,r){An(t,{min:i,max:r})}function pt(t,i,r,f){i.focus!=null&&Ro(t),i.show!=null&&b.forEach((a,p)=>{p>0&&(t==p||t==null)&&(a.show=i.show,To(p,i.show),o==2?(Tt(a.facets[0].scale,null,null),Tt(a.facets[1].scale,null,null)):Tt(a.scale,null,null),Jt())}),r!==!1&&ze("setSeries",t,i),f&&Rl("setSeries",n,t,i)}n.setSeries=pt;function Do(t,i){be(W[t],i)}function Lo(t,i){t.fill=ee(t.fill||null),t.dir=se(t.dir,-1),i=i??W.length,W.splice(i,0,t)}function Po(t){t==null?W.length=0:W.splice(t,1)}n.addBand=Lo,n.setBand=Do,n.delBand=Po;function Co(t,i){b[t].alpha=i,V.show&&Ne[t]&&(Ne[t].style.opacity=i),Se&&Ke[t]&&(Ke[t].style.opacity=i)}let ll,Tl,Dl;const nl={focus:!0};function Ro(t){if(t!=Dl){let i=t==null,r=jt.alpha!=1;b.forEach((f,a)=>{if(o==1||a>0){let p=i||a==0||a==t;f._focus=i?null:p,r&&Co(a,p?1:jt.alpha)}}),Dl=t,r&&Jt()}}Se&&xl&&et($i,Ue,t=>{V._lock||(Ht(t),Dl!=null&&pt(null,nl,!0,ke.setSeries))});function mt(t,i,r){let f=E[i];r&&(t=t/oe-(f.ori==1?K:He));let a=$;f.ori==1&&(a=Q,t=a-t),f.dir==-1&&(t=a-t);let p=f._min,w=f._max,S=t/a,k=p+(w-p)*S,M=f.distr;return M==3?al(10,k):M==4?Sr(k,f.asinh):k}function zo(t,i){let r=mt(t,L,i);return Pt(r,l[0],Le,Pe)}n.valToIdx=t=>Pt(t,l[0]),n.posToIdx=zo,n.posToVal=mt,n.valToPos=(t,i,r)=>E[i].ori==0?u(t,E[i],r?$e:$,r?qe:0):m(t,E[i],r?tt:Q,r?it:0),n.setCursor=(t,i,r)=>{pe=t.left,we=t.top,Ot(null,i,r)};function Ei(t,i){ge(tl,ol,me.left=t),ge(tl,Hl,me.width=i)}function Ai(t,i){ge(tl,Vl,me.top=t),ge(tl,Nl,me.height=i)}let Ll=x.ori==0?Ei:Ai,Pl=x.ori==1?Ei:Ai;function Vo(){if(Se&&O.live)for(let t=o==2?1:0;t<b.length;t++){if(t==0&&je)continue;let i=O.values[t],r=0;for(let f in i)Xe[t][r++].firstChild.nodeValue=i[f]}}function Ln(t,i){t!=null&&(t.idxs?t.idxs.forEach((r,f)=>{fe[f]=r}):xr(t.idx)||fe.fill(t.idx),O.idx=fe[0]);for(let r=0;r<b.length;r++)(r>0||o==1&&!je)&&Fo(r,fe[r]);Se&&O.live&&Vo(),st=!1,i!==!1&&ze("setLegend")}n.setLegend=Ln;function Fo(t,i){let r=b[t],f=t==0&&N==2?ot:l[t],a;je?a=r.values(n,t,i)??vt:(a=r.value(n,i==null?null:f[i],t,i),a=a==null?vt:{_:a}),O.values[t]=a}function Ot(t,i,r){bi=pe,Mi=we,[pe,we]=V.move(n,pe,we),V.left=pe,V.top=we,V.show&&(Zt&&St(Zt,Ae(pe),0,$,Q),Qt&&St(Qt,0,Ae(we),$,Q));let f,a=Le>Pe;ll=te;let p=x.ori==0?$:Q,w=x.ori==1?$:Q;if(pe<0||Ve==0||a){f=V.idx=null;for(let S=0;S<b.length;S++)S>0&&Ne.length>1&&St(Ne[S],-10,-10,$,Q);xl&&pt(null,nl,!0,t==null&&ke.setSeries),O.live&&(fe.fill(f),st=!0)}else{let S,k,M;o==1&&(S=x.ori==0?pe:we,k=mt(S,L),f=V.idx=Pt(k,l[0],Le,Pe),M=q(l[0][f],x,p,0));for(let v=o==2?1:0;v<b.length;v++){let T=b[v],I=fe[v],he=I==null?null:o==1?l[v][I]:l[v][1][I],J=V.dataIdx(n,v,f,k),U=J==null?null:o==1?l[v][J]:l[v][1][J];st=st||U!=he||J!=I,fe[v]=J;let j=J==f?M:q(o==1?l[0][J]:l[v][0][J],x,p,0);if(v>0&&T.show){let X=U==null?-10:le(U,o==1?E[T.scale]:E[T.facets[1].scale],w,0);if(xl&&U!=null){let ae=x.ori==1?pe:we,ye=Te(jt.dist(n,v,J,X,ae));if(ye<ll){let Ee=jt.bias;if(Ee!=0){let _e=mt(ae,T.scale),Be=U>=0?1:-1,rt=_e>=0?1:-1;rt==Be&&(rt==1?Ee==1?U>=_e:U<=_e:Ee==1?U<=_e:U>=_e)&&(ll=ye,Tl=v)}else ll=ye,Tl=v}}let de,Oe;if(x.ori==0?(de=j,Oe=X):(de=X,Oe=j),st&&Ne.length>1){cr(Ne[v],V.points.fill(n,v),V.points.stroke(n,v));let ae,ye,Ee,_e,Be=!0,rt=V.points.bbox;if(rt!=null){Be=!1;let Lt=rt(n,v);Ee=Lt.left,_e=Lt.top,ae=Lt.width,ye=Lt.height}else Ee=de,_e=Oe,ae=ye=V.points.size(n,v);ar(Ne[v],ae,ye,Be),kl[v]=Ee,bl[v]=_e,St(Ne[v],Rt(Ee,1),Rt(_e,1),$,Q)}}}}if(me.show&&At)if(t!=null){let[S,k]=ke.scales,[M,v]=ke.match,[T,I]=t.cursor.sync.scales,he=t.cursor.drag;if(Ce=he._x,Re=he._y,Ce||Re){let{left:J,top:U,width:j,height:X}=t.select,de=t.scales[S].ori,Oe=t.posToVal,ae,ye,Ee,_e,Be,rt=S!=null&&M(S,T),Lt=k!=null&&v(k,I);rt&&Ce?(de==0?(ae=J,ye=j):(ae=U,ye=X),Ee=E[S],_e=q(Oe(ae,T),Ee,p,0),Be=q(Oe(ae+ye,T),Ee,p,0),Ll(nt(_e,Be),Te(Be-_e))):Ll(0,p),Lt&&Re?(de==1?(ae=J,ye=j):(ae=U,ye=X),Ee=E[k],_e=le(Oe(ae,I),Ee,w,0),Be=le(Oe(ae+ye,I),Ee,w,0),Pl(nt(_e,Be),Te(Be-_e))):Pl(0,w)}else Zl()}else{let S=Te(bi-xi),k=Te(Mi-ki);if(x.ori==1){let I=S;S=k,k=I}Ce=Fe.x&&S>=Fe.dist,Re=Fe.y&&k>=Fe.dist;let M=Fe.uni;M!=null?Ce&&Re&&(Ce=S>=M,Re=k>=M,!Ce&&!Re&&(k>S?Re=!0:Ce=!0)):Fe.x&&Fe.y&&(Ce||Re)&&(Ce=Re=!0);let v,T;Ce&&(x.ori==0?(v=Xt,T=pe):(v=el,T=we),Ll(nt(v,T),Te(T-v)),Re||Pl(0,w)),Re&&(x.ori==1?(v=Xt,T=pe):(v=el,T=we),Pl(nt(v,T),Te(T-v)),Ce||Ll(0,p)),!Ce&&!Re&&(Ll(0,0),Pl(0,0))}if(Fe._x=Ce,Fe._y=Re,t==null){if(r){if(Ni!=null){let[S,k]=ke.scales;ke.values[0]=S!=null?mt(x.ori==0?pe:we,S):null,ke.values[1]=k!=null?mt(x.ori==1?pe:we,k):null}Rl(Ki,n,pe,we,$,Q,f)}if(xl){let S=r&&ke.setSeries,k=jt.prox;Dl==null?ll<=k&&pt(Tl,nl,!0,S):ll>k?pt(null,nl,!0,S):Tl!=Dl&&pt(Tl,nl,!0,S)}}st&&(O.idx=f,Ln()),i!==!1&&ze("setCursor")}let Dt=null;Object.defineProperty(n,"rect",{get(){return Dt==null&&Cl(!1),Dt}});function Cl(t=!1){t?Dt=null:(Dt=D.getBoundingClientRect(),ze("syncRect",Dt))}function Ti(t,i,r,f,a,p,w){V._lock||At&&t!=null&&t.movementX==0&&t.movementY==0||(Pn(t,i,r,f,a,p,w,!1,t!=null),t!=null?Ot(null,!0,!0):Ot(i,!0,!1))}function Pn(t,i,r,f,a,p,w,S,k){if(Dt==null&&Cl(!1),Ht(t),t!=null)r=t.clientX-Dt.left,f=t.clientY-Dt.top;else{if(r<0||f<0){pe=-10,we=-10;return}let[M,v]=ke.scales,T=i.cursor.sync,[I,he]=T.values,[J,U]=T.scales,[j,X]=ke.match,de=i.axes[0].side%2==1,Oe=x.ori==0?$:Q,ae=x.ori==1?$:Q,ye=de?p:a,Ee=de?a:p,_e=de?f:r,Be=de?r:f;if(J!=null?r=j(M,J)?d(I,E[M],Oe,0):-10:r=Oe*(_e/ye),U!=null?f=X(v,U)?d(he,E[v],ae,0):-10:f=ae*(Be/Ee),x.ori==1){let rt=r;r=f,f=rt}}k&&((r<=1||r>=$-1)&&(r=Wt(r,$)),(f<=1||f>=Q-1)&&(f=Wt(f,Q))),S?(xi=r,ki=f,[Xt,el]=V.move(n,r,f)):(pe=r,we=f)}const Cn={width:0,height:0,left:0,top:0};function Zl(){Jl(Cn,!1)}let Di,Li,Pi,Ci;function Ri(t,i,r,f,a,p,w){At=!0,Ce=Re=Fe._x=Fe._y=!1,Pn(t,i,r,f,a,p,w,!0,!1),t!=null&&(et(Fn,Gn,zi,!1),Rl(ji,n,Xt,el,$,Q,null));let{left:S,top:k,width:M,height:v}=me;Di=S,Li=k,Pi=M,Ci=v,Zl()}function zi(t,i,r,f,a,p,w){At=Fe._x=Fe._y=!1,Pn(t,i,r,f,a,p,w,!1,!0);let{left:S,top:k,width:M,height:v}=me,T=M>0||v>0,I=Di!=S||Li!=k||Pi!=M||Ci!=v;if(T&&I&&Jl(me),Fe.setScale&&T&&I){let he=S,J=M,U=k,j=v;if(x.ori==1&&(he=k,J=v,U=S,j=M),Ce&&Tt(L,mt(he,L),mt(he+J,L)),Re)for(let X in E){let de=E[X];X!=L&&de.from==null&&de.min!=te&&Tt(X,mt(U+j,X),mt(U,X))}Zl()}else V.lock&&(V._lock=!V._lock,V._lock||Ot(null,!0,!1));t!=null&&(Bl(Fn,Gn),Rl(Fn,n,pe,we,$,Q,null))}function Ho(t,i,r,f,a,p,w){if(V._lock)return;Ht(t);let S=At;if(At){let k=!0,M=!0,v=10,T,I;x.ori==0?(T=Ce,I=Re):(T=Re,I=Ce),T&&I&&(k=pe<=v||pe>=$-v,M=we<=v||we>=Q-v),T&&k&&(pe=pe<Xt?0:$),I&&M&&(we=we<el?0:Q),Ot(null,!0,!0),At=!1}pe=-10,we=-10,Ot(null,!0,!0),S&&(At=S)}function Vi(t,i,r,f,a,p,w){V._lock||(Ht(t),dn(),Zl(),t!=null&&Rl(Ji,n,pe,we,$,Q,null))}function Fi(){C.forEach(Wf),mn(n.width,n.height,!0)}It(sn,fl,Fi);const il={};il.mousedown=Ri,il.mousemove=Ti,il.mouseup=zi,il.dblclick=Vi,il.setSeries=(t,i,r,f)=>{let a=ke.match[2];r=a(n,i,r),r!=-1&&pt(r,f,!0,!1)},V.show&&(et(ji,D,Ri),et(Ki,D,Ti),et(qi,D,t=>{Ht(t),Cl(!1)}),et($i,D,Ho),et(Ji,D,Vi),$n.add(n),n.syncRect=Cl);const Ql=n.hooks=e.hooks||{};function ze(t,i,r){En?Al.push([t,i,r]):t in Ql&&Ql[t].forEach(f=>{f.call(null,n,i,r)})}(e.plugins||[]).forEach(t=>{for(let i in t.hooks)Ql[i]=(Ql[i]||[]).concat(t.hooks[i])});const Hi=(t,i,r)=>r,ke=be({key:null,setSeries:!1,filters:{pub:ss,sub:ss},scales:[L,b[1]?b[1].scale:null],match:[os,os,Hi],values:[null,null]},V.sync);ke.match.length==2&&ke.match.push(Hi),V.sync=ke;const Ni=ke.key,Rn=Js(Ni);function Rl(t,i,r,f,a,p,w){ke.filters.pub(t,i,r,f,a,p,w)&&Rn.pub(t,i,r,f,a,p,w)}Rn.sub(n);function No(t,i,r,f,a,p,w){ke.filters.sub(t,i,r,f,a,p,w)&&il[t](null,i,r,f,a,p,w)}n.pub=No;function Oo(){Rn.unsub(n),$n.delete(n),dt.clear(),Yn(sn,fl,Fi),y.remove(),Ue==null||Ue.remove(),ze("destroy")}n.destroy=Oo;function zn(){ze("init",e,l),mi(l||e.data,!1),Y[L]?An(L,Y[L]):dn(),Yl=me.show&&(me.width>0||me.height>0),Ft=st=!0,mn(e.width,e.height)}return b.forEach(hi),C.forEach(wo),s?s instanceof HTMLElement?(s.appendChild(y),zn()):s(n,zn):zn(),n}Ge.assign=be;Ge.fmtNum=li;Ge.rangeNum=on;Ge.rangeLog=fn;Ge.rangeAsinh=ei;Ge.orient=Bt;Ge.pxRatio=oe;Ge.join=Dr;Ge.fmtDate=ii,Ge.tzDate=Wr;Ge.sync=Js;{Ge.addGap=bf,Ge.clipGaps=cn;let e=Ge.paths={points:lo};e.linear=io,e.stepped=Af,e.bars=Tf,e.spline=Lf}function Gf(e){function l(s,n,o){let c=s.over,u,m,d,g,y,_={x:0,y:0,dx:0,dy:0},h={x:0,y:0,dx:0,dy:0};function A(P,H){let b=H.touches,C=b[0],E=C.clientX-u.left,W=C.clientY-u.top;if(b.length==1)P.x=E,P.y=W,P.d=P.dx=P.dy=1;else{let L=H.touches[1],G=L.clientX-u.left,B=L.clientY-u.top,z=Math.min(E,G),x=Math.min(W,B),N=Math.max(E,G),q=Math.max(W,B);P.y=(x+q)/2,P.x=(z+N)/2,P.dx=N-z,P.dy=q-x,P.d=Math.sqrt(P.dx*P.dx+P.dy*P.dy)}}let R=!1;function D(){R=!1;let P=h.x,H=h.y,b=_.d/h.d,C=_.d/h.d,E=P/u.width,W=1-H/u.height,L=m*b,G=g-E*L,B=G+L,z=d*C,x=y-W*z,N=x+z;s.batch(()=>{s.setScale("x",{min:G,max:B}),s.setScale("y",{min:x,max:N})})}function F(P){A(h,P),R||(R=!0,requestAnimationFrame(D))}c.addEventListener("touchstart",function(P){u=c.getBoundingClientRect(),A(_,P),m=s.scales.x.max-s.scales.x.min,d=s.scales.y.max-s.scales.y.min;let H=_.x,b=_.y;g=s.posToVal(H,"x"),y=s.posToVal(b,"y"),document.addEventListener("touchmove",F,{passive:!0})}),c.addEventListener("touchend",function(){document.removeEventListener("touchmove",F,{passive:!0})})}return{hooks:{init:l}}}const If={props:{node:{type:Object,required:!0},fillSize:{type:Boolean,default:!1},container:{type:Element,default:null},zoom:{type:Boolean,default:!0}},data(){return{chart:null,ro:null,resizeTimeout:null,isLoading:!1}},computed:{data(){const e=[],l=[[],[]],s=[[],[]],n=[[],[]],o=[[],[]];return this.node.bgRSSIPoints&&this.node.bgRSSIPoints.length>0&&this.node.bgRSSIPoints.forEach(c=>{e.push(c.timestamp/1e3),l[0].push(this.checkRssiError(c.channel0.current)),l[1].push(c.channel0.average),s[0].push(this.checkRssiError(c.channel1.current)),s[1].push(c.channel1.average),c.channel2&&(n[0].push(this.checkRssiError(c.channel2.current)),n[1].push(c.channel2.average)),c.channel3&&(o[0].push(this.checkRssiError(c.channel3.current)),o[1].push(c.channel3.average))}),[e,...l,...s,...n,...o]}},watch:{data(e,l){this.chart?this.isChanged(e,l)&&this.chart.setData(e):this.create()}},mounted(){this.create()},beforeUnmount(){this.destroy()},beforeDestroy(){this.destroy()},methods:{checkRssiError(e){return Go.isRssiError(e)?null:e},isChanged(e,l){return e=e==null?void 0:e[0],l=l==null?void 0:l[0],!e||!l?!0:e[e.length-1]!==l[l.length-1]},destroy(){this.chart&&(this.chart.destroy(),this.chart=null),this.ro&&(this.ro.disconnect(),this.ro=null),this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=null)},createSerie(e,l=1){const s=[3,5,7],n={show:!0,spanGaps:!1,label:"",value:(c,u)=>u?u.toFixed(2)+" dBm":"---",stroke:"red",width:1,fill:"rgba(255, 0, 0, 0.3)",dash:[s[l-1],s[l-1]],...e},o={...n,label:n.label+" (avg)",width:4,fill:void 0};return[n,o]},setSize(){this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=null),this.isLoading=!0,this.resizeTimeout=setTimeout(()=>{const e=this.container||this.$parent.$el,l=window.innerHeight-200,s=e.offsetWidth-100;let n=e.offsetHeight-100;n>l&&(n=l),this.chart.setSize({width:s,height:n}),this.isLoading=!1},150)},create(){if(this.destroy(),this.fillSize){const s=this.container||this.$parent.$el;this.ro=new ResizeObserver(this.setSize.bind(this)),this.ro.observe(s)}const l={title:"Background RSSI",width:this.$parent.$el.offsetWidth,height:500,plugins:[Gf()],axes:[{stroke:this.$vuetify.theme.dark?"#fff":"#000"},{stroke:this.$vuetify.theme.dark?"#fff":"#000"}],series:[{},...this.createSerie({label:"Channel 0",stroke:"#7a5195",fill:"rgba(122, 81, 149, 0.35)"},3),...this.createSerie({label:"Channel 1",stroke:"#bc5090",fill:"rgba(188, 80, 144, 0.35)"},2),...this.createSerie({label:"Channel 2",stroke:"#ffa600",fill:"rgba(255, 166, 0, 0.35)"},1),...this.createSerie({label:"Channel 3",stroke:"#003f5c",fill:"rgba(0, 63, 92, 0.35)"},1)]};this.zoom||(l.cursor={drag:{setScale:!1}},l.select={show:!1}),this.chart=new Ge(l,this.data,this.$refs.chart)}}};var Bf=function(){var l=this,s=l._self._c;return s("div",{ref:"chart",style:{visibility:l.isLoading?"hidden":"visible"}})},Yf=[],Uf=Wo(If,Bf,Yf,!1,null,null);const jf=Uf.exports;export{jf as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as r}from"./index-
|
|
1
|
+
import{n as r}from"./index-CuXgVWNp.js";const i={props:{active:{type:Boolean,default:!1},duration:{type:Number,default:1e3},size:{type:Number,default:20},icon:{type:String,default:"mdi-alert"},activeColor:{type:String,default:"success"},inactiveColor:{type:String,default:"grey"}},data:()=>({color:null,blinkInterval:null}),watch:{active(e){e?(this.color=this.activeColor,this.blinkInterval=setInterval(()=>{this.color=this.color===this.activeColor?this.inactiveColor:this.activeColor},this.duration)):(clearInterval(this.blinkInterval),this.color=this.inactiveColor)}},mounted(){this.color=this.inactiveColor},beforeDestroy(){clearInterval(this.blinkInterval)}};var l=function(){var t=this,o=t._self._c;return o("v-icon",{attrs:{size:t.size,color:t.color}},[t._v(t._s(t.icon))])},n=[],a=r(i,l,n,!1,null,null);const c=a.exports;export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as l}from"./index-
|
|
1
|
+
import{n as l}from"./index-CuXgVWNp.js";const c={name:"CCTreeView",props:{value:{type:[Object,Array],default:()=>({})},level:{type:Number,default:0}},data:()=>({items:[]}),watch:{value:{immediate:!0,handler(){Array.isArray(this.value)?this.items=this.value:(this.items=[],this.$nextTick(()=>{this.items=this.parseEntry(this.value)}))}}},methods:{parseEntry(a,e="root"){const n=[],s=[];this.openIds=[];for(const r in a)if(r==="tags")n.push({id:e,name:a.tags.join(" - "),children:s});else if(r==="message")for(const t in a.message){const i=a.message[t];s.push({id:`${e}.${t}`,name:`${t}`,value:typeof i=="string"?i.trimStart():i})}else if(r==="encapsulated")for(let t=0;t<a.encapsulated.length;t++){const i=a.encapsulated[t];s.push(...this.parseEntry(i,`${e}.encapsulated[${t}]`))}return n}}};var o=function(){var e=this,n=e._self._c;return e.items.length>0?n("v-treeview",{ref:"treeview",attrs:{"open-all":"",dense:"",items:e.items},scopedSlots:e._u([{key:"label",fn:function({item:s}){return[n("v-row",{staticClass:"ma-0 pa-0",attrs:{dense:""}},[n("strong",{staticClass:"tree-item-name",staticStyle:{"white-space":"pre-wrap"}},[e._v(e._s(s.name))]),s.value!==void 0?n("div",{staticClass:"tree-item-value",class:s.name==="payload"?"mono":"",staticStyle:{"white-space":"pre-wrap"}},[e._v(" "+e._s(s.value)+" ")]):e._e()])]}}],null,!1,184165539)}):e._e()},p=[],u=l(c,o,p,!1,null,"c9a56bc2");const d=u.exports;export{d as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__fileDeps=["./ColumnFilterBoolean-
|
|
2
|
-
import{n,_ as r}from"./index-
|
|
1
|
+
const __vite__fileDeps=["./ColumnFilterBoolean-C1kDQpZd.js","./index-DSDj_ZX9.js","./index-CuXgVWNp.js","./index-Dg6I0yvX.css","./vuedraggable.umd-AqP60Ge_.js","./index-D5uuzJlz.css","./ColumnFilterDate-CUsL4XUH.js","./ColumnFilterNumber-D96egfUA.js","./ColumnFilterString-DsH5-LlM.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
|
2
|
+
import{n,_ as r}from"./index-CuXgVWNp.js";import{C as i}from"./index-DSDj_ZX9.js";import"./vuedraggable.umd-AqP60Ge_.js";const s={components:{ColumnFilterBoolean:()=>r(()=>import("./ColumnFilterBoolean-C1kDQpZd.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),ColumnFilterDate:()=>r(()=>import("./ColumnFilterDate-CUsL4XUH.js"),__vite__mapDeps([6,1,2,3,4,5]),import.meta.url),ColumnFilterNumber:()=>r(()=>import("./ColumnFilterNumber-D96egfUA.js"),__vite__mapDeps([7,1,2,3,4,5]),import.meta.url),ColumnFilterString:()=>r(()=>import("./ColumnFilterString-DsH5-LlM.js"),__vite__mapDeps([8,1,2,3,4,5]),import.meta.url)},props:{value:{type:Object,default:()=>{},required:!0},column:{type:Object,default:()=>{},required:!0},items:{type:Array,default:()=>[],required:!0},groupBy:{type:Boolean,default:()=>!1,required:!1}},data(){return{valid:!0,show:!1}},computed:{hasFilter(){return this.hasDeepValue(this.value)}},methods:{hasDeepValue(t){return t!=null&&Object.keys(t).some(e=>!!t[e]&&!!Object.keys(t[e]).length||typeof t[e]=="boolean")},showOptions(){this.show=!0},hideOptions(){this.show=!1},change(t,e){this.valid=e,e===!0&&this.$emit("change",i.filterSpec(this.column.type,t))},confirm(){this.hideOptions()},resetToDefaults(){const t=i.defaultFilter(this.column.type);Object.assign(this.value,t);for(const e in this.value)Object.hasOwnProperty.call(this.value,e)&&Object.keys(this.value).forEach(()=>{Object.keys(t).includes(e)||delete this.value.key})},clearFilter(){this.resetToDefaults(),this.change(this.value,!0)}}};var u=function(){var e=this,l=e._self._c;return l("v-menu",{attrs:{value:e.show,"close-on-content-click":!1,"offset-y":!0},scopedSlots:e._u([{key:"activator",fn:function({on:a,attrs:o}){return[l("v-icon",e._g(e._b({staticStyle:{"padding-right":"2px","padding-bottom":"3px"},attrs:{small:"",title:"Filter options..."},on:{click:e.showOptions}},"v-icon",o,!1),a),[e._v(" "+e._s(e.hasFilter?"filter_list_alt":"filter_list")+" ")])]}}])},[l("v-card",[l("v-icon",{attrs:{small:"",right:""},on:{click:e.hideOptions}},[e._v("close")]),e.column.type=="boolean"?l("column-filter-boolean",{attrs:{value:e.value},on:{change:e.change}}):e._e(),e.column.type=="date"?l("column-filter-date",{attrs:{value:e.value},on:{change:e.change}}):e._e(),e.column.type=="number"?l("column-filter-number",{attrs:{value:e.value,items:e.items},on:{change:e.change}}):e._e(),e.column.type=="string"?l("column-filter-string",{attrs:{value:e.value,items:e.items},on:{change:e.change}}):e._e(),e.column.groupable!=!1?l("v-checkbox",{staticClass:"ml-4",attrs:{label:"Group values",value:e.groupBy},on:{change:function(a){return e.$emit("update:group-by",a?[e.column.value]:[])}}}):e._e(),l("v-card-actions",[l("v-btn",{on:{click:e.clearFilter}},[e._v("Clear")]),l("v-btn",{attrs:{color:"primary",disabled:!e.valid},on:{click:e.confirm}},[e._v("Ok")])],1)],1)],1)},c=[],m=n(s,u,c,!1,null,null);const v=m.exports;export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as a}from"./index-
|
|
1
|
+
import{C as a}from"./index-DSDj_ZX9.js";import{n as t}from"./index-CuXgVWNp.js";import"./vuedraggable.umd-AqP60Ge_.js";const r={props:{value:{type:Object,default:()=>a.defaultFilter("string"),required:!0}},methods:{change(){this.$emit("change",this.value,!0)}}};var n=function(){var e=this,l=e._self._c;return l("v-card-text",[l("v-form",[l("v-row",[l("v-col",[l("v-checkbox",{attrs:{indeterminate:e.value.boolValue==null,label:"Boolean value"},on:{change:e.change},model:{value:e.value.boolValue,callback:function(o){e.$set(e.value,"boolValue",o)},expression:"value.boolValue"}})],1)],1)],1)],1)},u=[],s=t(r,n,u,!1,null,null);const _=s.exports;export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as o}from"./index-
|
|
1
|
+
import{C as o}from"./index-DSDj_ZX9.js";import{n as r}from"./index-CuXgVWNp.js";import"./vuedraggable.umd-AqP60Ge_.js";const s={props:{value:{type:Object,default:()=>o.defaultFilter("string"),required:!0}},data(){return{valid:!1,rules:{from:[t=>!t||!this.value.to||t<=this.value.to||"From date should not be after to date"],to:[t=>!t||!this.value.from||t>=this.value.from||"To date should not be before from date"]}}},methods:{change(){this.$emit("change",this.value,this.valid)}}};var n=function(){var e=this,a=e._self._c;return a("v-card-text",[a("v-form",{model:{value:e.valid,callback:function(l){e.valid=l},expression:"valid"}},[a("v-row",[a("v-col",[a("v-text-field",{attrs:{type:"datetime-local",label:"From",rules:e.rules.from,clearable:""},on:{change:e.change},model:{value:e.value.from,callback:function(l){e.$set(e.value,"from",l)},expression:"value.from"}}),a("v-text-field",{attrs:{type:"datetime-local",label:"To",rules:e.rules.to,clearable:""},on:{change:e.change},model:{value:e.value.to,callback:function(l){e.$set(e.value,"to",l)},expression:"value.to"}})],1)],1)],1)],1)},u=[],i=r(s,n,u,!1,null,null);const d=i.exports;export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as n}from"./index-
|
|
1
|
+
import{C as n}from"./index-DSDj_ZX9.js";import{n as i}from"./index-CuXgVWNp.js";import"./vuedraggable.umd-AqP60Ge_.js";const s={props:{value:{type:Object,default:()=>n.defaultFilter("string"),required:!0},items:{type:Array,default:()=>[],required:!0}},computed:{values:{get(){var e;const a=this.items.find(l=>typeof l=="string");return a?((e=this.value.values)==null?void 0:e.map(l=>l===void 0?a:l))??[]:this.value.values??[]},set(a){this.value.values=a}}},data(){return{valid:!1,rules:{min:[a=>!a||a>=0||"Minimum should not be negative",a=>!a||!this.value.max||a<=this.value.max||"Minimum should not be above maximum"],max:[a=>!a||a>=0||"Maximum should not be negative",a=>!a||!this.value.min||a>=this.value.min||"Maximum should not be below minimum"]}}},methods:{change(){this.$emit("change",this.value,this.valid)}}};var u=function(){var e=this,l=e._self._c;return l("v-card-text",[l("v-form",{model:{value:e.valid,callback:function(t){e.valid=t},expression:"valid"}},[l("v-row",[l("v-col",[l("v-text-field",{attrs:{type:"number",label:"Min",rules:e.rules.min,clearable:""},on:{change:e.change},model:{value:e.value.min,callback:function(t){e.$set(e.value,"min",t)},expression:"value.min"}})],1),l("v-col",[l("v-text-field",{attrs:{type:"number",label:"Max",rules:e.rules.max,clearable:""},on:{change:e.change},model:{value:e.value.max,callback:function(t){e.$set(e.value,"max",t)},expression:"value.max"}})],1)],1),l("v-row",[l("v-col",[l("v-select",{attrs:{items:e.items,label:"Values",clearable:"",chips:"",deletableChips:"",dense:"",multiple:""},on:{change:e.change},model:{value:e.values,callback:function(t){e.values=t},expression:"values"}})],1)],1)],1)],1)},r=[],m=i(s,u,r,!1,null,null);const d=m.exports;export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as r}from"./index-
|
|
1
|
+
import{C as r}from"./index-DSDj_ZX9.js";import{n as s}from"./index-CuXgVWNp.js";import"./vuedraggable.umd-AqP60Ge_.js";const n={props:{value:{type:Object,default:()=>r.defaultFilter("string"),required:!0},items:{type:Array,default:()=>[],required:!0}},data(){return{valid:!1,rules:{match:[t=>this.validateRegex(t)]}}},methods:{change(){this.$emit("change",this.value,this.valid)},validateRegex(t){let e;try{e=!!new RegExp(t)}catch(a){e=a.message}return e}}};var i=function(){var e=this,a=e._self._c;return a("v-card-text",[a("v-form",{model:{value:e.valid,callback:function(l){e.valid=l},expression:"valid"}},[a("v-row",[a("v-col",[a("v-text-field",{attrs:{label:"Search",hint:"Supports regular expressions",rules:e.rules.match,clearable:""},on:{change:e.change},model:{value:e.value.match,callback:function(l){e.$set(e.value,"match",l)},expression:"value.match"}})],1)],1),a("v-row",[a("v-col",[a("v-select",{attrs:{items:e.items,label:"Values",clearable:"",chips:"",deletableChips:"",dense:"",multiple:""},on:{change:e.change},model:{value:e.value.values,callback:function(l){e.$set(e.value,"values",l)},expression:"value.values"}})],1)],1)],1)],1)},c=[],u=s(n,i,c,!1,null,null);const d=u.exports;export{d as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__fileDeps=["./index-
|
|
2
|
-
import{L as d,I as u,_ as s,m as p,u as a,S as m,a as h,j as f,C as r,n as g}from"./index-
|
|
1
|
+
const __vite__fileDeps=["./index-DSDj_ZX9.js","./index-CuXgVWNp.js","./index-Dg6I0yvX.css","./vuedraggable.umd-AqP60Ge_.js","./index-D5uuzJlz.css","./DialogAdvanced-DJtWPDIx.js","./DialogAdvanced-B3IdLJdP.css","./StatisticsCard-mYTSFlwm.js","./SmartView-DJPtDAho.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
|
2
|
+
import{L as d,I as u,_ as s,m as p,u as a,S as m,a as h,j as f,C as r,n as g}from"./index-CuXgVWNp.js";const c=d.get("ControlPanel"),v={name:"ControlPanel",props:{socket:Object},mixins:[u],components:{NodesTable:()=>s(()=>import("./index-DSDj_ZX9.js").then(o=>o.i),__vite__mapDeps([0,1,2,3,4]),import.meta.url),DialogAdvanced:()=>s(()=>import("./DialogAdvanced-DJtWPDIx.js"),__vite__mapDeps([5,1,2,6]),import.meta.url),StatisticsCard:()=>s(()=>import("./StatisticsCard-mYTSFlwm.js"),__vite__mapDeps([7,1,2]),import.meta.url),SmartView:()=>s(()=>import("./SmartView-DJPtDAho.js"),__vite__mapDeps([8,1,2]),import.meta.url)},computed:{...p(a,["nodes","zwave","controllerNode"]),timeoutMs(){return this.zwave.commandsTimeout*1e3+800},statisticsOpeningIndicator(){return this.showControllerStatistics?"arrow_drop_up":"arrow_drop_down"},compact(){return this.$vuetify.breakpoint.smAndDown||this.compactMode},compactMode:{get(){return a().ui.compactMode},set(o){a().setCompactMode(o)}},actions(){return this.selected.length===0?this.generalActions:this.selectedActions},advancedDialogTitle(){return this.selected.length===0?"General actions":`Actions for ${this.selected.length} selected node${this.selected.length>1?"s":""}`}},watch:{},data(){return{fab:!1,selected:[],settings:new m(localStorage),advancedShowDialog:!1,generalActions:[{text:"Backup",options:[{name:"Import",action:"import"},{name:"Export",action:"export"}],icon:"save",desc:"Save or load `nodes.json` file with names and locations"},{text:"Dump",options:[{name:"Export",action:"exportDump"}],icon:"bug_report",desc:"Export all nodes in a json file. Useful for debugging purposes"},{text:"Rebuild Routes",options:[{name:"Begin",action:"beginRebuildingRoutes"},{name:"Stop",action:"stopRebuildingRoutes"}],icon:"healing",color:"warning",desc:"Force nodes to establish new connections to the controller"},{text:"Re-interview Nodes",options:[{name:"Start",action:"refreshInfo",args:{broadcast:!0}}],icon:"history",color:"warning",desc:"Clear all info about all nodes and make a new full interview. Use when nodes has wrong or missing capabilities"},{text:"Hard Reset",options:[{name:"Factory Reset",action:"hardReset"}],icon:"warning",color:"red",desc:"Reset controller to factory defaults (all paired devices will be removed)"},{text:"Soft Reset",options:[{name:"Soft Reset",action:"softReset",args:{confirm:`<p>Are you sure you want to soft-reset your controller?</p>
|
|
3
3
|
<p>USB modules will reconnect, meaning that they might get a new address. Make sure to configure your device address in a way that prevents it from changing, e.g. by using <code>/dev/serial/by-id/...</code> on Linux.</p>
|
|
4
4
|
<p><strong>This method may cause problems in Docker containers with certain Z-Wave stick.</strong> If that happens, you may need to restart your host OS and docker container.</p>`}}],icon:"refresh",color:"warning",desc:"Instruct the controller to soft-reset (restart)"},{text:"Failed Nodes",options:[{name:"Remove all",action:"removeFailedNode",args:{broadcast:!0,confirm:"This action will remove all failed nodes. ATTENTION: this will skip sleeping nodes to prevent unwanted behaviours"}}],icon:"dangerous",color:"error",desc:"Manage nodes that are dead and/or marked as failed with the controller"},{text:"Driver function",options:[{name:"Write",action:"driverFunction"}],icon:"code",desc:"Write a custom JS function using the ZwaveJS Driver"},{text:"Rebuild Routes",options:[{name:"Rebuild",action:"rebuildNodeRoutes",args:{confirm:"Rebuilding routes causes a lot of traffic, can take minutes up to hours and you can expect degraded performance while it is going on"}}],icon:"healing",color:"warning",desc:"Discover and assign new routes from nodes to the controller and other nodes."},{text:"NVM Management",options:[{name:"Backup",action:"backupNVMRaw"},{name:"Restore",action:"restoreNVM"}],icon:"update",color:"warning",desc:"Backup/Restore controller's NVM (Non Volatile Memory)"},{text:"Firmware update OTW",options:[{name:"Update",action:"firmwareUpdateOTW"}],icon:"update",color:"red",desc:"Perform a firmware update OTW (Over The Wire)"},{text:"Shutdown Zwave API",options:[{name:"Shutdown",action:"shutdownZwaveAPI",args:{confirm:"Are you sure you want to shutdown the Zwave API? You will have to unplug and replug the Zwave stick manually to restart it.",confirmLevel:"warning"}}],icon:"power_off",color:"warning",desc:"Allows to shutdown the Zwave API to safely unplug the Zwave stick."}],rules:{required:o=>{let e=!1;return o instanceof Array?e=o.length>0:e=!isNaN(o)||!!o,e||"This field is required."}},selectedActions:[{text:"Re-interview Node",options:[{name:"Interview",action:"refreshInfo"}],icon:"history",desc:"Clear all info about this node and make a new full interview. Use when the node has wrong or missing capabilities"},{text:"Refresh Values",options:[{name:"Refresh",action:"refreshValues",args:{confirm:"Are you sure you want to refresh values of this node? This action increases network traffic"}}],icon:"cached",desc:"Update all CC values and metadata. Use only when many values seems stale"},{text:"Ping",options:[{name:"Ping",action:"pingNode"}],icon:"swap_horiz",desc:"Ping node to check if it is alive"}],showControllerStatistics:!1}},methods:{...h(a,["setRebuildRoutesProgress","showSnackbar"]),jsonToList:f,showNodesManager(){this.app.showNodesManager()},async onAction(o,e={}){o==="import"?this.importConfiguration():o==="export"?this.exportConfiguration():o==="exportDump"?this.exportDump():this.sendAction(o,{...e,nodes:this.selected})},async importConfiguration(){if(await this.app.confirm("Attention","This will override all existing nodes names and locations","alert"))try{const{data:o}=await this.app.importFile("json"),e=await r.importConfig({data:o});this.showSnackbar(e.message,e.success?"success":"error")}catch(o){c.error(o)}},async exportConfiguration(){try{const o=await r.exportConfig();this.showSnackbar(o.message,o.success?"success":"error"),o.success&&this.app.exportConfiguration(o.data,"nodes","json")}catch(o){c.error(o)}},exportDump(){this.app.exportConfiguration(this.nodes,"nodes_dump","json")},toggleControllerStatistics(){this.showControllerStatistics=!this.showControllerStatistics}},mounted(){this.bindEvent("rebuildRoutesProgress",this.setRebuildRoutesProgress.bind(this))},beforeDestroy(){this.socket&&this.unbindEvents()}};var w=function(){var e=this,t=e._self._c;return t("div",[t("v-container",{staticClass:"pa-4",attrs:{fluid:""}},[t("v-row",{staticClass:"py-4 align-center",attrs:{"no-gutters":""}},[t("v-col",{class:e.compact?"text-center":"text-end"},[t("v-item-group",{staticClass:"v-btn-toggle"},[t("v-btn",{attrs:{color:"primary",outlined:""},on:{click:e.toggleControllerStatistics}},[t("v-icon",{attrs:{left:""}},[e._v(" "+e._s(e.statisticsOpeningIndicator)+" ")]),e._v(" Controller statistics "),t("v-icon",{attrs:{color:"primary",right:""}},[e._v(" multiline_chart ")])],1),e.$vuetify.breakpoint.mdAndUp?t("v-btn",{attrs:{color:"primary",outlined:!e.compactMode},on:{click:function(n){n.stopPropagation(),e.compactMode=!e.compactMode}}},[e._v(" Compact ")]):e._e()],1)],1)],1),t("v-expand-transition",[t("v-row",{directives:[{name:"show",rawName:"v-show",value:e.showControllerStatistics,expression:"showControllerStatistics"}]},[t("v-col",{staticClass:"mb-8"},[t("v-sheet",{attrs:{outlined:"",rounded:""}},[e.controllerNode?t("StatisticsCard",{attrs:{title:"Controller Statistics",node:this.controllerNode}}):e._e()],1)],1)],1)],1),e.compact?t("smart-view",{attrs:{socket:e.socket},on:{selected:function(n){e.selected=n},action:e.sendAction}}):t("nodes-table",{staticClass:"pb-8",attrs:{socket:e.socket},on:{action:e.sendAction,selected:function(n){e.selected=n}}})],1),t("DialogAdvanced",{attrs:{actions:e.actions,title:e.advancedDialogTitle},on:{close:function(n){e.advancedShowDialog=!1},action:e.onAction},model:{value:e.advancedShowDialog,callback:function(n){e.advancedShowDialog=n},expression:"advancedShowDialog"}}),t("v-speed-dial",{attrs:{bottom:"",fab:"",right:"",fixed:""},scopedSlots:e._u([{key:"activator",fn:function(){return[t("v-btn",{attrs:{color:e.selected.length===0?"blue darken-2":"success",dark:"",fab:"",hover:""},model:{value:e.fab,callback:function(n){e.fab=n},expression:"fab"}},[e.fab?t("v-icon",[e._v("close")]):t("v-icon",[e._v("menu")])],1)]},proxy:!0}]),model:{value:e.fab,callback:function(n){e.fab=n},expression:"fab"}},[t("v-tooltip",{attrs:{left:""},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:i}){return[e.selected.length===0?t("v-btn",e._g(e._b({attrs:{fab:"",dark:"",small:"",color:"green"},on:{click:function(l){return e.showNodesManager()}}},"v-btn",i,!1),n),[t("v-icon",[e._v("all_inclusive")])],1):e._e()]}}])},[t("span",[e._v("Manage nodes")])]),t("v-tooltip",{attrs:{left:""},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:i}){return[t("v-btn",e._g(e._b({attrs:{fab:"",dark:"",small:"",color:"purple"},on:{click:function(l){e.advancedShowDialog=!0}}},"v-btn",i,!1),n),[t("v-icon",[e._v("auto_fix_high")])],1)]}}])},[t("span",[e._v("Advanced actions")])])],1)],1)},_=[],b=g(v,w,_,!1,null,null);const y=b.exports;export{y as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__fileDeps=["./BgRssiChart-yh8_DgvK.js","./index-CuXgVWNp.js","./index-Dg6I0yvX.css","./BgRssiChart-DbNj0r-M.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
|
2
|
+
import{_ as o,m as t,u as n,n as s}from"./index-CuXgVWNp.js";const a={components:{BgRssiChart:()=>o(()=>import("./BgRssiChart-yh8_DgvK.js"),__vite__mapDeps([0,1,2,3]),import.meta.url)},computed:{...t(n,["controllerNode"])}};var _=function(){var e=this,r=e._self._c;return r("v-container",[e.controllerNode?r("bg-rssi-chart",{attrs:{node:e.controllerNode,"fill-size":""}}):e._e()],1)},l=[],c=s(a,_,l,!1,null,null);const d=c.exports;export{d as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m as x,u as _,b as S,a as w,o as y,s as g,n as v}from"./index-
|
|
1
|
+
import{m as x,u as _,b as S,a as w,o as y,s as g,n as v}from"./index-CuXgVWNp.js";var u=function(l,e){return Object.defineProperty?Object.defineProperty(l,"raw",{value:e}):l.raw=e,l},n;(function(l){l[l.EOS=0]="EOS",l[l.Text=1]="Text",l[l.Incomplete=2]="Incomplete",l[l.ESC=3]="ESC",l[l.Unknown=4]="Unknown",l[l.SGR=5]="SGR",l[l.OSCURL=6]="OSCURL"})(n||(n={}));class E{constructor(){this.VERSION="6.0.2",this.setup_palettes(),this._use_classes=!1,this.bold=!1,this.faint=!1,this.italic=!1,this.underline=!1,this.fg=this.bg=null,this._buffer="",this._url_allowlist={http:1,https:1},this._escape_html=!0,this.boldStyle="font-weight:bold",this.faintStyle="opacity:0.7",this.italicStyle="font-style:italic",this.underlineStyle="text-decoration:underline"}set use_classes(e){this._use_classes=e}get use_classes(){return this._use_classes}set url_allowlist(e){this._url_allowlist=e}get url_allowlist(){return this._url_allowlist}set escape_html(e){this._escape_html=e}get escape_html(){return this._escape_html}set boldStyle(e){this._boldStyle=e}get boldStyle(){return this._boldStyle}set faintStyle(e){this._faintStyle=e}get faintStyle(){return this._faintStyle}set italicStyle(e){this._italicStyle=e}get italicStyle(){return this._italicStyle}set underlineStyle(e){this._underlineStyle=e}get underlineStyle(){return this._underlineStyle}setup_palettes(){this.ansi_colors=[[{rgb:[0,0,0],class_name:"ansi-black"},{rgb:[187,0,0],class_name:"ansi-red"},{rgb:[0,187,0],class_name:"ansi-green"},{rgb:[187,187,0],class_name:"ansi-yellow"},{rgb:[0,0,187],class_name:"ansi-blue"},{rgb:[187,0,187],class_name:"ansi-magenta"},{rgb:[0,187,187],class_name:"ansi-cyan"},{rgb:[255,255,255],class_name:"ansi-white"}],[{rgb:[85,85,85],class_name:"ansi-bright-black"},{rgb:[255,85,85],class_name:"ansi-bright-red"},{rgb:[0,255,0],class_name:"ansi-bright-green"},{rgb:[255,255,85],class_name:"ansi-bright-yellow"},{rgb:[85,85,255],class_name:"ansi-bright-blue"},{rgb:[255,85,255],class_name:"ansi-bright-magenta"},{rgb:[85,255,255],class_name:"ansi-bright-cyan"},{rgb:[255,255,255],class_name:"ansi-bright-white"}]],this.palette_256=[],this.ansi_colors.forEach(s=>{s.forEach(i=>{this.palette_256.push(i)})});let e=[0,95,135,175,215,255];for(let s=0;s<6;++s)for(let i=0;i<6;++i)for(let a=0;a<6;++a){let r={rgb:[e[s],e[i],e[a]],class_name:"truecolor"};this.palette_256.push(r)}let t=8;for(let s=0;s<24;++s,t+=10){let i={rgb:[t,t,t],class_name:"truecolor"};this.palette_256.push(i)}}escape_txt_for_html(e){return this._escape_html?e.replace(/[&<>"']/gm,t=>{if(t==="&")return"&";if(t==="<")return"<";if(t===">")return">";if(t==='"')return""";if(t==="'")return"'"}):e}append_buffer(e){var t=this._buffer+e;this._buffer=t}get_next_packet(){var e={kind:n.EOS,text:"",url:""},t=this._buffer.length;if(t==0)return e;var s=this._buffer.indexOf("\x1B");if(s==-1)return e.kind=n.Text,e.text=this._buffer,this._buffer="",e;if(s>0)return e.kind=n.Text,e.text=this._buffer.slice(0,s),this._buffer=this._buffer.slice(s),e;if(s==0){if(t<3)return e.kind=n.Incomplete,e;var i=this._buffer.charAt(1);if(i!="["&&i!="]"&&i!="(")return e.kind=n.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;if(i=="["){this._csi_regex||(this._csi_regex=b(d||(d=u([`
|
|
2
2
|
^ # beginning of line
|
|
3
3
|
#
|
|
4
4
|
# First attempt
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as a}from"./index-
|
|
1
|
+
import{n as a}from"./index-CuXgVWNp.js";const i={props:{value:Boolean,actions:Array,title:{type:String,default:"Advanced"}},data(){return{}},computed:{},methods:{}};var s=function(){var t=this,e=t._self._c;return e("v-dialog",{attrs:{persistent:"","max-width":"800"},on:{keydown:function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"esc",27,n.key,["Esc","Escape"])?null:t.$emit("close")}},model:{value:t.value,callback:function(n){t.value=n},expression:"value"}},[e("v-card",[e("v-card-title",[e("span",{staticClass:"headline"},[t._v(t._s(t.title))]),e("v-spacer"),e("v-btn",{attrs:{icon:""},on:{click:function(n){return t.$emit("close")}}},[e("v-icon",[t._v("close")])],1)],1),e("v-card-text",[e("div",{class:["action-grid",t.$vuetify.breakpoint.name]},t._l(t.actions,function(n,c){return e("div",{key:c},[e("v-icon",{attrs:{color:n.color||"primary","x-large":""}},[t._v(t._s(n.icon))]),e("div",{staticStyle:{"font-size":"1.1rem"}},[t._v(t._s(n.text))]),e("div",{staticClass:"action-desc"},[t._v(t._s(n.desc))]),t._l(n.options,function(r,o){return e("v-btn",{key:o,attrs:{text:"",color:n.color||"primary"},on:{click:function(_){return t.$emit("action",r.action,r.args)}}},[t._v(t._s(r.name))])})],2)}),0)])],1)],1)},l=[],v=a(i,s,l,!1,null,"8c9eb6de");const f=v.exports;export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as c,m as u,u as p,e as d,ag as g,ac as i,y as h,n as v}from"./index-
|
|
1
|
+
import{I as c,m as u,u as p,e as d,ag as g,ac as i,y as h,n as v}from"./index-CuXgVWNp.js";const f={mixins:[c],props:{value:Boolean,associations:Array,node:Object},watch:{value(){this.$refs.form&&this.$refs.form.resetValidation(),this.resetGroup(),this.associationError=""},group:{deep:!0,handler(){var o;(o=this.$refs.form)!=null&&o.validate()&&this.allowedAssociation()}}},computed:{...u(p,["controllerNode","nodes"]),filteredNodes(){return this.node.protocol===d.Protocols.ZWaveLongRange?[this.controllerNode]:this.nodes.filter(o=>o.id!==this.node.id&&o.protocol!==d.Protocols.ZWaveLongRange)},endpoints(){return this.getEndpointItems(this.node)},targetEndpoints(){return this.getEndpointItems(this.group.target,!0)},maxNodes(){return this.group.group?this.group.group.maxNodes:-1},nodesInGroup(){return this.group.group?this.associations.filter(o=>o.groupId===this.group.group.value&&o.endpoint===this.group.endpoint).length:0},endpointGroups(){let o=[];try{o=this.node.groups;const t=this.group.endpoint;o=o.filter(e=>e.endpoint===t||t===null&&e.endpoint===0&&!e.multiChannel)}catch{}return o}},data(){return{valid:!0,group:{},associationError:"",defaultGroup:{endpoint:null},required:o=>!!o||"This field is required"}},methods:{getAssociationAddress:g,async allowedAssociation(){var l;const o=this.group,t=isNaN(o.target)?(l=o.target)==null?void 0:l.id:parseInt(o.target);if(isNaN(t)){this.associationError="";return}const e=o.group;if(!e){this.associationError="";return}const s={nodeId:t};e.multiChannel&&o.targetEndpoint>=0&&(s.endpoint=o.targetEndpoint);const a=[this.getAssociationAddress({nodeId:this.node.id,endpoint:o.endpoint}),e.value,s],r=await this.app.apiRequest("checkAssociation",a,{showInfo:!1});if(r.success){const n=r.result;n===i.AssociationCheckResult.OK?this.associationError="":n===i.AssociationCheckResult.Forbidden_SecurityClassMismatch?this.associationError=`Association not allowed: Node ${this.node.id} does not have the same security class as Node ${t}!`:n===i.AssociationCheckResult.Forbidden_DestinationSecurityClassNotGranted?this.associationError=`Association not allowed: Node ${this.node.id} was not granted the highest security class of Node ${t}!`:n===i.AssociationCheckResult.Forbidden_NoSupportedCCs?this.associationError=`Association not allowed: Node ${this.node.id} sends no commands in this group that Node ${t} supports!`:this.associationError=`Association not allowed: ${h.getEnumMemberName(i.AssociationCheckResult,n)}`}},resetGroup(){this.group=Object.assign({},this.defaultGroup)},getEndpointLabel(o,t){if(o&&o.endpoints){const e=o.endpoints.find(s=>s.index===t);if(e)return e.label}return"Endpoint "+t},getEndpointItems(o,t=!1){const e=[];if(t&&e.unshift({text:"No Endpoint",value:null}),o&&o.endpoints)for(const s of o.endpoints)e.push({text:s.label,value:s.index});return e}}};var m=function(){var t=this,e=t._self._c;return e("v-dialog",{attrs:{"max-width":"500px",persistent:""},model:{value:t.value,callback:function(s){t.value=s},expression:"value"}},[e("v-card",[e("v-card-title",[e("span",{staticClass:"headline"},[t._v("New Association")])]),e("v-card-text",[e("v-container",{attrs:{"grid-list-md":""}},[e("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(s){t.valid=s},expression:"valid"}},[e("v-row",[e("v-col",{attrs:{cols:"12"}},[e("v-select",{attrs:{label:"Node Endpoint",hint:"Used to filter available groups","persistent-hint":"",items:t.endpoints},model:{value:t.group.endpoint,callback:function(s){t.$set(t.group,"endpoint",s)},expression:"group.endpoint"}})],1),e("v-col",{attrs:{cols:"12"}},[e("v-select",{attrs:{label:"Group",hint:"Node/Endpoint Group association to Add/Remove","persistent-hint":"",items:t.endpointGroups,rules:[t.required],"return-object":""},scopedSlots:t._u([{key:"selection",fn:function({item:s}){return[t._v(" "+t._s(s.text)+" ")]}},{key:"item",fn:function({item:s,attrs:a,on:r}){return[e("v-list-item",t._g(t._b({attrs:{"two-line":""}},"v-list-item",a,!1),r),[e("v-list-item-content",[e("v-list-item-title",[t._v(t._s(`[${s.value}] ${s.text}`))]),e("v-list-item-subtitle",[t._v(t._s(s.endpoint>=0?t.getEndpointLabel(t.node,s.endpoint):"No Endpoint"))])],1)],1)]}}]),model:{value:t.group.group,callback:function(s){t.$set(t.group,"group",s)},expression:"group.group"}})],1),t.group.group?e("v-col",{attrs:{cols:"12"}},[e("p",{staticClass:"text-subtitle-1 pa-0 ma-0"},[t._v(" Max associations: "),e("strong",[t._v(t._s(t.maxNodes))])]),e("p",{staticClass:"text-subtitle-1 pa-0 ma-0"},[t._v(" Actual associations: "),e("strong",[t._v(t._s(t.nodesInGroup))])])]):t._e(),t.nodesInGroup<t.maxNodes?e("v-col",{staticClass:"pa-0"},[e("v-col",{attrs:{cols:"12"}},[e("v-combobox",{attrs:{label:"Target Node",items:t.filteredNodes,"return-object":"",rules:[t.required],hint:"Node to add to the association group","persistent-hint":"","item-text":"_name"},model:{value:t.group.target,callback:function(s){t.$set(t.group,"target",s)},expression:"group.target"}})],1),t.group.group&&t.group.group.multiChannel?e("v-col",{attrs:{cols:"12"}},[e("v-select",{attrs:{"persistent-hint":"",label:"Target Endpoint",hint:"Target node endpoint",items:t.targetEndpoints},model:{value:t.group.targetEndpoint,callback:function(s){t.$set(t.group,"targetEndpoint",t._n(s))},expression:"group.targetEndpoint"}})],1):t._e(),t.associationError?e("v-col",{attrs:{cols:"12"}},[e("v-alert",{attrs:{text:"",dense:"",type:"error"}},[t._v(" "+t._s(t.associationError)+" ")])],1):t._e()],1):t._e()],1)],1)],1)],1),e("v-card-actions",[e("v-spacer"),e("v-btn",{attrs:{color:"blue darken-1",text:""},on:{click:function(s){return t.$emit("close")}}},[t._v("Cancel")]),e("v-btn",{attrs:{color:"blue darken-1",text:"",disabled:t.nodesInGroup>=t.maxNodes||!!t.associationError},on:{click:function(s){t.$refs.form.validate()&&t.$emit("add",t.group)}}},[t._v("ADD")])],1)],1)],1)},_=[],x=v(f,m,_,!1,null,null);const E=x.exports;export{E as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__fileDeps=["./prismeditor.esm-
|
|
2
|
-
import{_ as s,m as n,u as r,p as l,n as d}from"./index-
|
|
1
|
+
const __vite__fileDeps=["./prismeditor.esm-BC28IwtN.js","./index-CuXgVWNp.js","./index-Dg6I0yvX.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
|
2
|
+
import{_ as s,m as n,u as r,p as l,n as d}from"./index-CuXgVWNp.js";const o={components:{PrismEditor:()=>s(()=>import("./prismeditor.esm-BC28IwtN.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(a=>a.PrismEditor)},props:{value:Boolean,gw_type:Number,title:String,editedValue:Object,devices:Array},watch:{value(a){this.$refs.form&&this.$refs.form.resetValidation(),a&&(this.isNew=!this.editedValue.device)}},computed:{...n(r,["gateway","mqtt"]),deviceValues(){const a=this.devices.find(e=>e.value==this.editedValue.device);return a?a.values:[]},deviceClasses(){const a=this.editedValue.value;return a?a.commandClass===48?["battery","cold","connectivity","door","garage_door","gas","heat","light","lock","moisture","motion","moving","occupancy","opening","plug","power","presence","problem","safety","smoke","sound","vibration","window"]:this.isSensor(a)?["battery","humidity","illuminance","signal_strength","temperature","power","power_factor","pressure","timestamp","current","energy","voltage"]:a.commandClass===38?["awning","blind","curtain","damper","door","garage","gate","shade","shutter","window"]:[]:[]},requiredIntensity(){return!this.editedValue.enablePoll||this.editedValue.enablePoll&&this.editedValue.pollInterval>=10||"Minimun interval is 10 seconds"},requiredTopic(){return this.gw_type!==2||!!this.editedValue.topic||"Topic required"}},data(){return{isNew:null,valid:!0,required:a=>!!a||"This field is required"}},methods:{highlighter(a){return l.highlight(a,l.languages.js)},isSensor(a){return a&&(a.commandClass===49||a.commandClass===50)}}};var c=function(){var e=this,t=e._self._c;return t("v-dialog",{attrs:{"max-width":"500px",persistent:""},model:{value:e.value,callback:function(i){e.value=i},expression:"value"}},[t("v-card",[t("v-card-title",[t("span",{staticClass:"headline"},[e._v(e._s(e.title))])]),t("v-card-text",[t("v-container",{attrs:{"grid-list-md":""}},[t("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:e.valid,callback:function(i){e.valid=i},expression:"valid"}},[t("v-row",[t("v-col",{attrs:{cols:"12"}},[t("v-select",{attrs:{label:"Device",required:"",rules:[e.required],"item-text":"name",items:e.devices},model:{value:e.editedValue.device,callback:function(i){e.$set(e.editedValue,"device",i)},expression:"editedValue.device"}})],1),t("v-col",{attrs:{cols:"12"}},[t("v-select",{attrs:{label:"Value",hint:e.editedValue.value?e.editedValue.value.description:"",required:"","return-object":"",rules:[e.required],"item-text":"label","item-value":"id",items:e.deviceValues},scopedSlots:e._u([{key:"selection",fn:function({item:i}){return[e._v(" "+e._s((i.label||i.id)+(i.endpoint>1?" - Endpoint "+i.endpoint:""))+" ")]}},{key:"item",fn:function({item:i}){return[t("v-list-item-content",[t("v-list-item-title",[e._v(e._s((i.label||i.id)+(i.endpoint>0?" - Endpoint "+i.endpoint:"")))]),t("v-list-item-subtitle",{staticClass:"text-truncate text-no-wrap",staticStyle:{"max-width":"500px"}},[e._v(e._s(i.description))])],1)]}}]),model:{value:e.editedValue.value,callback:function(i){e.$set(e.editedValue,"value",i)},expression:"editedValue.value"}})],1),!this.mqtt.disabled&&this.gateway.hassDiscovery?t("v-col",{attrs:{cols:"12"}},[t("v-select",{attrs:{label:"Device Class",hint:"Specify a device class for Home assistant","item-text":"name",items:e.deviceClasses},model:{value:e.editedValue.device_class,callback:function(i){e.$set(e.editedValue,"device_class",i)},expression:"editedValue.device_class"}})],1):e._e(),e.isSensor(e.editedValue.value)?t("v-col",{attrs:{cols:"12"}},[t("v-text-field",{attrs:{hint:"Specify a device icon for Home assistant, format is <prefix>:<icons-alias> (Eg: 'mdi:water'). Check http://materialdesignicons.com/",label:"Device Icon"},model:{value:e.editedValue.icon,callback:function(i){e.$set(e.editedValue,"icon",e._n(i))},expression:"editedValue.icon"}})],1):e._e(),this.mqtt.disabled?e._e():t("v-col",{attrs:{cols:"12"}},[t("v-text-field",{attrs:{label:"Topic",rules:[e.requiredTopic],required:""},model:{value:e.editedValue.topic,callback:function(i){e.$set(e.editedValue,"topic",typeof i=="string"?i.trim():i)},expression:"editedValue.topic"}})],1),this.mqtt.disabled?e._e():t("v-col",{attrs:{cols:"6"}},[t("v-select",{attrs:{label:"QoS",hint:"If specified, overrides the default QoS in MQTT settings",items:[{text:"",value:void 0},{text:"0: At most once",value:0},{text:"1: At least once",value:1},{text:"2: Exactly once",value:2}],"persistent-hint":"",required:"",type:"number"},model:{value:e.editedValue.qos,callback:function(i){e.$set(e.editedValue,"qos",i)},expression:"editedValue.qos"}})],1),this.mqtt.disabled?e._e():t("v-col",{attrs:{cols:"6"}},[t("v-select",{attrs:{label:"Retain","persistent-hint":"",hint:"If specified, overrides the default retain in MQTT settings",items:[{text:"",value:void 0},{text:"True",value:!0},{text:"False",value:!1}],required:"",type:"number"},model:{value:e.editedValue.retain,callback:function(i){e.$set(e.editedValue,"retain",i)},expression:"editedValue.retain"}})],1),t("v-col",{attrs:{cols:"12"}},[t("v-text-field",{attrs:{label:"Post operation",hint:"Example: '/10' '*100' '+20'",required:""},model:{value:e.editedValue.postOperation,callback:function(i){e.$set(e.editedValue,"postOperation",i)},expression:"editedValue.postOperation"}})],1),t("v-col",{attrs:{cols:"6"}},[t("v-switch",{attrs:{label:"Poll",hint:"Enable poll of this value. ATTENTION: This could create lot traffic in your network and kill the life of battery powered devices. Use at your own risk","persistent-hint":""},model:{value:e.editedValue.enablePoll,callback:function(i){e.$set(e.editedValue,"enablePoll",i)},expression:"editedValue.enablePoll"}})],1),e.editedValue.enablePoll?t("v-col",{attrs:{cols:"6"}},[t("v-text-field",{attrs:{label:"Poll interval",hint:"Seconds between to wait between poll requests. The timer starts when the request ends",rules:[e.requiredIntensity],suffix:"seconds",required:"",type:"number"},model:{value:e.editedValue.pollInterval,callback:function(i){e.$set(e.editedValue,"pollInterval",e._n(i))},expression:"editedValue.pollInterval"}})],1):e._e(),t("v-col",{attrs:{cols:"6"}},[t("v-switch",{attrs:{label:"Parse send",hint:"Create a function that parse the value sent via MQTT","persistent-hint":""},model:{value:e.editedValue.parseSend,callback:function(i){e.$set(e.editedValue,"parseSend",i)},expression:"editedValue.parseSend"}})],1),e.editedValue.parseSend?t("v-container",[t("p",[e._v(" Write the function here. Args are: "),t("code",[e._v("value")]),e._v(", "),t("code",[e._v("valueId")]),e._v(", "),t("code",[e._v("node")]),e._v(", "),t("code",[e._v("logger")]),e._v(". The function is sync and must return the parsed "),t("code",[e._v("value")]),e._v(". ")]),t("prism-editor",{attrs:{lineNumbers:"",language:"js",highlight:e.highlighter},model:{value:e.editedValue.sendFunction,callback:function(i){e.$set(e.editedValue,"sendFunction",i)},expression:"editedValue.sendFunction"}})],1):e._e(),t("v-col",{attrs:{cols:"6"}},[t("v-switch",{attrs:{label:"Parse receive",hint:"Create a function that parse the received value from MQTT","persistent-hint":""},model:{value:e.editedValue.parseReceive,callback:function(i){e.$set(e.editedValue,"parseReceive",i)},expression:"editedValue.parseReceive"}})],1),e.editedValue.parseReceive?t("v-container",[t("p",[e._v(" Write the function here. Args are: "),t("code",[e._v("value")]),e._v(", "),t("code",[e._v("valueId")]),e._v(", "),t("code",[e._v("node")]),e._v(", "),t("code",[e._v("logger")]),e._v(". The function is sync and must return the parsed "),t("code",[e._v("value")]),e._v(". ")]),t("prism-editor",{attrs:{lineNumbers:"",language:"js",highlight:e.highlighter},model:{value:e.editedValue.receiveFunction,callback:function(i){e.$set(e.editedValue,"receiveFunction",i)},expression:"editedValue.receiveFunction"}})],1):e._e()],1)],1)],1)],1),t("v-card-actions",[t("v-spacer"),t("v-btn",{attrs:{color:"blue darken-1",text:""},on:{click:function(i){return e.$emit("close")}}},[e._v("Cancel")]),t("v-btn",{attrs:{color:"blue darken-1",text:""},on:{click:function(i){e.$refs.form.validate()&&e.$emit("save")}}},[e._v(e._s(e.isNew?"Add":"Update"))])],1)],1)],1)},u=[],v=d(o,c,u,!1,null,"78f6f0b5");const m=v.exports;export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as o,m as l,u as r,e as d,a as c,y as u,ac as g,c as v,n as h}from"./index-D_o4wuKe.js";const f={components:{},props:{value:Boolean,node:Object,socket:Object},mixins:[o],watch:{value(i){this.init(i)}},computed:{...l(r,["nodes"]),isLR(){var i;return((i=this.activeNode)==null?void 0:i.protocol)===d.Protocols.ZWaveLongRange},filteredNodes(){return this.isLR?this.nodes.filter(i=>i.isControllerNode):this.activeNode?this.nodes.filter(i=>i.id!==this.activeNode.id):this.nodes},headers(){return this.mode==="Lifeline"?[{text:"Max latency",value:"latency"},{text:"Failed pings",value:"failedPingsNode"},{text:"Route Changes",value:"routeChanges"},{text:"SNR margin",value:"snrMargin"},{text:"Min power level w/o errors",value:"minPowerlevel"},{text:"Rating",value:"rating"}]:[{text:"Failed pings",value:"failedPingsToSource"},{text:"Min Power Level w/o errors",value:"minPowerlevelSource"},{text:"Rating",value:"rating"}]}},data(){return{loading:!1,results:[],rounds:5,targetNode:null,activeNode:null,resultsTargetNode:null,averages:null,mode:"Lifeline",hintHeaders:[{text:"Rating",value:"rating",sortable:!1},{text:"Failed pings",value:"failedPings",sortable:!1},{text:"Max latency (*)",value:"latency",sortable:!1},{text:"No. of Neighbors",value:"neighbors",sortable:!1},{text:"SNR margin (*)",value:"snrMargin",sortable:!1},{text:"Min power level w/o errors",value:"minPowerlevel",sortable:!1}],hintValues:[{rating:10,failedPings:0,latency:"≤ 50 ms",neighbors:"> 2",snrMargin:"≥ 17dBm",minPowerlevel:"≤ -6dBm"},{rating:9,failedPings:0,latency:"≤ 100 ms",neighbors:"> 2",snrMargin:"≥ 17dBm",minPowerlevel:"≤ -6dBm"},{rating:8,failedPings:0,latency:"≤ 100 ms",neighbors:"≤ 2",snrMargin:"≥ 17dBm",minPowerlevel:"≤ -6dBm"},{rating:7,failedPings:0,latency:"≤ 100ms",neighbors:"> 2"},{rating:6,failedPings:0,latency:"≤ 100ms",neighbors:"≤ 2"},{rating:5,failedPings:0,latency:"≤ 250ms"},{rating:4,failedPings:0,latency:"≤ 500 ms"},{rating:3,failedPings:1,latency:"≤ 1000ms"},{rating:2,failedPings:"≤ 2",latency:"> 1000ms"},{rating:1,failedPings:"≤ 9"},{rating:0,failedPings:10}]}},methods:{...c(r,["showSnackbar"]),exportResults(){this.app.exportConfiguration(this.results,`healthCheck_${this.activeNode.id}-${this.resultsTargetNode}`,"json")},getNeighborsColor(i){return i>2?"success--text":i===0?"error--text":"warning--text"},getLatencyColor(i){return i<=100?"success--text":i<=500?"warning--text":"error--text"},getSnrMarginColor(i){return i>=17?"success--text":"error--text"},getFailedPingsColor(i){return i===0?"success--text":i===1?"warning--text":"error--text"},getRatingColor(i){return i===void 0?"primary":i>=6?"success":i>=4?"warning":"error"},getPowerLevel(i){return u.getEnumMemberName(g.Powerlevel,i)},getPowerLevelColor(i){return i===void 0?"":i>=6?"success--text":i>=3?"warning--text":"error--text"},init(i){i?(this.rounds=5,this.activeNode=v(this.node),this.targetNode=this.filteredNodes.find(e=>e.isControllerNode),this.selectedNode=this.filteredNodes[0]?this.filteredNodes[0].id:null,this.bindEvent("healthCheckProgress",this.onHealthCheckProgress.bind(this))):i===!1&&(this.unbindEvents(),this.results=[],this.loading=!1,this.targetNode=null,this.averages=null)},onHealthCheckProgress(i){const{request:e,round:t,totalRounds:s,lastResult:n}=i;if(e.nodeId===this.activeNode.id){const a=this.results[this.results.length-1];n&&Object.assign(a,n),t<s&&this.results.push({round:t,rating:void 0})}},async stopHealth(){(await this.app.apiRequest("abortHealthCheck",[this.activeNode.id])).success&&this.showSnackbar("Health check aborted","success")},async checkHealth(){this.loading=!0,this.results=[];const i=[this.activeNode.id],e=typeof this.targetNode=="object"?this.targetNode:this.nodes.find(s=>s.id==this.targetNode);if(!e)return;e.isControllerNode?this.mode="Lifeline":(this.mode="Route",i.push(e.id)),i.push(this.rounds||1),this.results.push({round:1,rating:void 0});const t=await this.app.apiRequest(`check${this.mode}Health`,i,{infoSnack:!0,errorSnack:!1});if(this.loading=!1,t.success){const s=t.result;this.results=s.results,delete s.results,this.averages=s,this.averages.numNeighbors=Math.max(...this.results.map(n=>n.numNeighbors)),this.resultsTargetNode=s.targetNodeId}else this.results.pop(),this.showSnackbar(t.message||"Health check failed","error")}},beforeDestroy(){this.init(!1)}};var m=function(){var e=this,t=e._self._c;return t("v-dialog",{attrs:{"max-width":"800px",persistent:""},model:{value:e.value,callback:function(s){e.value=s},expression:"value"}},[t("v-card",{attrs:{loading:e.loading}},[t("v-card-title",[t("span",{staticClass:"headline"},[e._v("Node "+e._s(e.activeNode?e.activeNode.id:"")+" - Health check")])]),t("v-card-text",[t("v-container",[t("v-row",{staticClass:"ma-3",attrs:{justify:"start"}},[t("v-col",[t("v-combobox",{staticStyle:{"max-width":"300px"},attrs:{label:"Target Node",items:e.filteredNodes,"return-object":"",hint:"Target node to run the route health check on","persistent-hint":"","item-text":"_name","item-value":"id"},model:{value:e.targetNode,callback:function(s){e.targetNode=s},expression:"targetNode"}})],1),t("v-col",[t("v-text-field",{attrs:{hint:"Number of rounds to run the health check",label:"Rounds",min:"1",max:"10",type:"number","persistent-hint":""},model:{value:e.rounds,callback:function(s){e.rounds=e._n(s)},expression:"rounds"}})],1)],1),t("v-row",{staticClass:"mb-2",attrs:{justify:"space-around"}},[t("v-btn",{attrs:{color:e.loading?"error":"success",disabled:!e.targetNode},on:{click:function(s){e.loading?e.stopHealth():e.checkHealth()}}},[e._v(e._s(e.loading?"Stop":"Check"))]),t("v-menu",{attrs:{"close-on-content-click":!1,"offset-y":"",bottom:"","open-on-click":"","content-class":"help-menu"},scopedSlots:e._u([{key:"activator",fn:function({on:s,attrs:n}){return[t("v-btn",e._g(e._b({attrs:{color:"primary"}},"v-btn",n,!1),s),[t("v-icon",[e._v("help")])],1)]}}])},[t("v-list",{attrs:{dense:""}},[t("v-list-item",[t("v-list-item-content",{staticClass:"ma-0"},[t("v-list-item-title",[e._v("Route changes")]),t("v-list-item-subtitle",[e._v("How many times at least one new route was needed. Lower = better, ideally 0. Only available if the controller supports TX reports")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("Latency")]),t("v-list-item-subtitle",[e._v("The maximum time it took to send a ping to the node. Lower = better, ideally 10 ms. Will use the time in TX reports if available, otherwise fall back to measuring the round trip time.")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("No. Neighbors")]),t("v-list-item-subtitle",[e._v("How many routing neighbors this node has. Higher = better, ideally > 2")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("Failed Pings node")]),t("v-list-item-subtitle",[e._v("How many pings were not ACKed by the node. Lower = better, ideally 0.")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("Min Power Level")]),t("v-list-item-subtitle",[e._v("The minimum powerlevel where all pings from the (source) node were ACKed by the target node / controller. Lower = better, ideally -6dBm or less. Only available if the (source) node supports Powerlevel CC")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("Failed pings Controller")]),t("v-list-item-subtitle",[e._v("If no powerlevel was found where the controller ACKed all pings from the node, this contains the number of pings that weren't ACKed. Lower = better, ideally 0.")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("SNR Margin")]),t("v-list-item-subtitle",[e._v("An estimation of the Signal-to-Noise Ratio Margin in dBm. Only available if the controller supports TX reports.")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("Rating")])],1)],1)],1),t("v-data-table",{staticClass:"elevation-1",attrs:{headers:e.hintHeaders,items:e.hintValues,"mobile-breakpoint":0,"hide-default-footer":"","disable-pagination":""},scopedSlots:e._u([{key:"footer",fn:function(){return[t("p",{staticClass:"mb-0 text-caption"},[t("code",[e._v("*")]),e._v(" Due to missing insight into re-routing attempts between two nodes, some of the values for the for the route check rating don't exist here and are only present in lifeline checks (when target node is the controller). Furthermore, it is not guaranteed that a route between two nodes and lifeline with the same health rating have the same quality. ")])]},proxy:!0}])})],1)],1),e.averages&&!e.loading?t("v-row",{staticClass:"mb-2",attrs:{justify:"space-around"}},[e.averages.numNeighbors&&!e.isLR?t("v-col",{staticClass:"text-center"},[t("p",{staticClass:"mb-1 subtitle-1 font-weight-bold"},[e._v(" No. Neighbors ")]),t("span",{staticClass:"text-h3",class:e.getNeighborsColor(e.averages.numNeighbors)},[e._v(e._s(e.averages.numNeighbors))])]):e._e(),e.averages.rating?t("v-col",{staticClass:"text-center"},[t("p",{staticClass:"mb-1 subtitle-1 font-weight-bold"},[e._v(" Rating ")]),t("span",{staticClass:"text-h3",class:e.getRatingColor(e.averages.rating)+"--text"},[e._v(e._s(e.averages.rating)+"/10")])]):e._e()],1):e._e(),e.results.length>0?t("v-data-table",{staticClass:"elevation-1",attrs:{headers:e.headers,items:e.results,"item-key":"id","hide-default-footer":"","items-per-page":-1},scopedSlots:e._u([{key:"top",fn:function(){return[!e.loading&&e.resultsTargetNode>=0?t("v-btn",{staticClass:"mb-2",attrs:{text:"",color:"primary"},on:{click:e.exportResults}},[e._v("Export")]):e._e()]},proxy:!0},{key:"item.rating",fn:function({item:s}){return[t("v-progress-linear",{staticStyle:{"min-width":"80px"},attrs:{rounded:"",height:"25",value:s.rating*10,color:e.getRatingColor(s.rating),indeterminate:s.rating===void 0}},[s.rating!==void 0?t("strong",[e._v(e._s(s.rating)+"/10")]):e._e()])]}},{key:"item.latency",fn:function({item:s}){return[s.latency!==void 0?t("strong",{class:e.getLatencyColor(s.latency)},[e._v(e._s(s.latency)+" ms")]):e._e()]}},{key:"item.snrMargin",fn:function({item:s}){return[s.snrMargin!==void 0?t("strong",{class:e.getSnrMarginColor(s.snrMargin)},[e._v(e._s(s.snrMargin)+" dBm")]):e._e()]}},{key:"item.routeChanges",fn:function({item:s}){return[s.routeChanges!==void 0?t("strong",[e._v(e._s(s.routeChanges))]):e._e()]}},{key:"item.minPowerlevel",fn:function({item:s}){return[s.minPowerlevel!==void 0?t("strong",{class:e.getPowerLevelColor(s.minPowerlevel)},[e._v(e._s(e.getPowerLevel(s.minPowerlevel)))]):e._e()]}},{key:"item.failedPingsNode",fn:function({item:s}){return[s.failedPingsNode!==void 0?t("p",{staticClass:"mb-0"},[e._v(" "+e._s(e.resultsTargetNode)+" → "+e._s(e.activeNode.id)+": "),t("strong",{class:e.getFailedPingsColor(s.failedPingsNode)},[e._v(e._s(s.failedPingsNode)+"/10")])]):e._e(),s.failedPingsController!==void 0?t("p",{staticClass:"mb-0"},[e._v(" "+e._s(e.resultsTargetNode)+" ← "+e._s(e.activeNode.id)+": "),t("strong",{class:e.getFailedPingsColor(s.failedPingsController)},[e._v(e._s(s.failedPingsController)+"/10")])]):e._e()]}},{key:"item.failedPingsToSource",fn:function({item:s}){return[s.failedPingsToSource!==void 0?t("p",{staticClass:"mb-0"},[e._v(" "+e._s(e.resultsTargetNode)+" → "+e._s(e.activeNode.id)+": "),t("strong",{class:e.getFailedPingsColor(s.failedPingsToSource)},[e._v(e._s(s.failedPingsToSource)+"/10")])]):e._e(),s.failedPingsToTarget!==void 0?t("p",{staticClass:"mb-0"},[e._v(" "+e._s(e.resultsTargetNode)+" ← "+e._s(e.activeNode.id)+": "),t("strong",{class:e.getFailedPingsColor(s.failedPingsToTarget)},[e._v(e._s(s.failedPingsToTarget)+"/10")])]):e._e()]}},{key:"item.minPowerlevelSource",fn:function({item:s}){return[s.minPowerlevelSource!==void 0?t("p",{staticClass:"mb-0"},[e._v(" Node "+e._s(e.activeNode.id)+": "),t("strong",{class:e.getPowerLevelColor(s.minPowerlevelSource)},[e._v(e._s(e.getPowerLevel(s.minPowerlevelSource)))])]):e._e(),s.minPowerlevelTarget!==void 0?t("p",{staticClass:"mb-0"},[e._v(" Node "+e._s(e.resultsTargetNode)+": "),t("strong",{class:e.getPowerLevelColor(s.minPowerlevelTarget)},[e._v(e._s(e.getPowerLevel(s.minPowerlevelTarget)))])]):e._e()]}}],null,!0)}):e._e()],1)],1),t("v-card-actions",[t("v-spacer"),t("v-btn",{attrs:{color:"blue darken-1",text:""},on:{click:function(s){return e.$emit("close")}}},[e._v("Close")])],1)],1)],1)},_=[],p=h(f,m,_,!1,null,null);const w=p.exports;export{w as default};
|
|
1
|
+
import{I as o,m as l,u as r,e as d,a as c,y as u,ac as g,c as v,n as h}from"./index-CuXgVWNp.js";const f={components:{},props:{value:Boolean,node:Object,socket:Object},mixins:[o],watch:{value(i){this.init(i)}},computed:{...l(r,["nodes"]),isLR(){var i;return((i=this.activeNode)==null?void 0:i.protocol)===d.Protocols.ZWaveLongRange},filteredNodes(){return this.isLR?this.nodes.filter(i=>i.isControllerNode):this.activeNode?this.nodes.filter(i=>i.id!==this.activeNode.id):this.nodes},headers(){return this.mode==="Lifeline"?[{text:"Max latency",value:"latency"},{text:"Failed pings",value:"failedPingsNode"},{text:"Route Changes",value:"routeChanges"},{text:"SNR margin",value:"snrMargin"},{text:"Min power level w/o errors",value:"minPowerlevel"},{text:"Rating",value:"rating"}]:[{text:"Failed pings",value:"failedPingsToSource"},{text:"Min Power Level w/o errors",value:"minPowerlevelSource"},{text:"Rating",value:"rating"}]}},data(){return{loading:!1,results:[],rounds:5,targetNode:null,activeNode:null,resultsTargetNode:null,averages:null,mode:"Lifeline",hintHeaders:[{text:"Rating",value:"rating",sortable:!1},{text:"Failed pings",value:"failedPings",sortable:!1},{text:"Max latency (*)",value:"latency",sortable:!1},{text:"No. of Neighbors",value:"neighbors",sortable:!1},{text:"SNR margin (*)",value:"snrMargin",sortable:!1},{text:"Min power level w/o errors",value:"minPowerlevel",sortable:!1}],hintValues:[{rating:10,failedPings:0,latency:"≤ 50 ms",neighbors:"> 2",snrMargin:"≥ 17dBm",minPowerlevel:"≤ -6dBm"},{rating:9,failedPings:0,latency:"≤ 100 ms",neighbors:"> 2",snrMargin:"≥ 17dBm",minPowerlevel:"≤ -6dBm"},{rating:8,failedPings:0,latency:"≤ 100 ms",neighbors:"≤ 2",snrMargin:"≥ 17dBm",minPowerlevel:"≤ -6dBm"},{rating:7,failedPings:0,latency:"≤ 100ms",neighbors:"> 2"},{rating:6,failedPings:0,latency:"≤ 100ms",neighbors:"≤ 2"},{rating:5,failedPings:0,latency:"≤ 250ms"},{rating:4,failedPings:0,latency:"≤ 500 ms"},{rating:3,failedPings:1,latency:"≤ 1000ms"},{rating:2,failedPings:"≤ 2",latency:"> 1000ms"},{rating:1,failedPings:"≤ 9"},{rating:0,failedPings:10}]}},methods:{...c(r,["showSnackbar"]),exportResults(){this.app.exportConfiguration(this.results,`healthCheck_${this.activeNode.id}-${this.resultsTargetNode}`,"json")},getNeighborsColor(i){return i>2?"success--text":i===0?"error--text":"warning--text"},getLatencyColor(i){return i<=100?"success--text":i<=500?"warning--text":"error--text"},getSnrMarginColor(i){return i>=17?"success--text":"error--text"},getFailedPingsColor(i){return i===0?"success--text":i===1?"warning--text":"error--text"},getRatingColor(i){return i===void 0?"primary":i>=6?"success":i>=4?"warning":"error"},getPowerLevel(i){return u.getEnumMemberName(g.Powerlevel,i)},getPowerLevelColor(i){return i===void 0?"":i>=6?"success--text":i>=3?"warning--text":"error--text"},init(i){i?(this.rounds=5,this.activeNode=v(this.node),this.targetNode=this.filteredNodes.find(e=>e.isControllerNode),this.selectedNode=this.filteredNodes[0]?this.filteredNodes[0].id:null,this.bindEvent("healthCheckProgress",this.onHealthCheckProgress.bind(this))):i===!1&&(this.unbindEvents(),this.results=[],this.loading=!1,this.targetNode=null,this.averages=null)},onHealthCheckProgress(i){const{request:e,round:t,totalRounds:s,lastResult:n}=i;if(e.nodeId===this.activeNode.id){const a=this.results[this.results.length-1];n&&Object.assign(a,n),t<s&&this.results.push({round:t,rating:void 0})}},async stopHealth(){(await this.app.apiRequest("abortHealthCheck",[this.activeNode.id])).success&&this.showSnackbar("Health check aborted","success")},async checkHealth(){this.loading=!0,this.results=[];const i=[this.activeNode.id],e=typeof this.targetNode=="object"?this.targetNode:this.nodes.find(s=>s.id==this.targetNode);if(!e)return;e.isControllerNode?this.mode="Lifeline":(this.mode="Route",i.push(e.id)),i.push(this.rounds||1),this.results.push({round:1,rating:void 0});const t=await this.app.apiRequest(`check${this.mode}Health`,i,{infoSnack:!0,errorSnack:!1});if(this.loading=!1,t.success){const s=t.result;this.results=s.results,delete s.results,this.averages=s,this.averages.numNeighbors=Math.max(...this.results.map(n=>n.numNeighbors)),this.resultsTargetNode=s.targetNodeId}else this.results.pop(),this.showSnackbar(t.message||"Health check failed","error")}},beforeDestroy(){this.init(!1)}};var m=function(){var e=this,t=e._self._c;return t("v-dialog",{attrs:{"max-width":"800px",persistent:""},model:{value:e.value,callback:function(s){e.value=s},expression:"value"}},[t("v-card",{attrs:{loading:e.loading}},[t("v-card-title",[t("span",{staticClass:"headline"},[e._v("Node "+e._s(e.activeNode?e.activeNode.id:"")+" - Health check")])]),t("v-card-text",[t("v-container",[t("v-row",{staticClass:"ma-3",attrs:{justify:"start"}},[t("v-col",[t("v-combobox",{staticStyle:{"max-width":"300px"},attrs:{label:"Target Node",items:e.filteredNodes,"return-object":"",hint:"Target node to run the route health check on","persistent-hint":"","item-text":"_name","item-value":"id"},model:{value:e.targetNode,callback:function(s){e.targetNode=s},expression:"targetNode"}})],1),t("v-col",[t("v-text-field",{attrs:{hint:"Number of rounds to run the health check",label:"Rounds",min:"1",max:"10",type:"number","persistent-hint":""},model:{value:e.rounds,callback:function(s){e.rounds=e._n(s)},expression:"rounds"}})],1)],1),t("v-row",{staticClass:"mb-2",attrs:{justify:"space-around"}},[t("v-btn",{attrs:{color:e.loading?"error":"success",disabled:!e.targetNode},on:{click:function(s){e.loading?e.stopHealth():e.checkHealth()}}},[e._v(e._s(e.loading?"Stop":"Check"))]),t("v-menu",{attrs:{"close-on-content-click":!1,"offset-y":"",bottom:"","open-on-click":"","content-class":"help-menu"},scopedSlots:e._u([{key:"activator",fn:function({on:s,attrs:n}){return[t("v-btn",e._g(e._b({attrs:{color:"primary"}},"v-btn",n,!1),s),[t("v-icon",[e._v("help")])],1)]}}])},[t("v-list",{attrs:{dense:""}},[t("v-list-item",[t("v-list-item-content",{staticClass:"ma-0"},[t("v-list-item-title",[e._v("Route changes")]),t("v-list-item-subtitle",[e._v("How many times at least one new route was needed. Lower = better, ideally 0. Only available if the controller supports TX reports")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("Latency")]),t("v-list-item-subtitle",[e._v("The maximum time it took to send a ping to the node. Lower = better, ideally 10 ms. Will use the time in TX reports if available, otherwise fall back to measuring the round trip time.")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("No. Neighbors")]),t("v-list-item-subtitle",[e._v("How many routing neighbors this node has. Higher = better, ideally > 2")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("Failed Pings node")]),t("v-list-item-subtitle",[e._v("How many pings were not ACKed by the node. Lower = better, ideally 0.")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("Min Power Level")]),t("v-list-item-subtitle",[e._v("The minimum powerlevel where all pings from the (source) node were ACKed by the target node / controller. Lower = better, ideally -6dBm or less. Only available if the (source) node supports Powerlevel CC")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("Failed pings Controller")]),t("v-list-item-subtitle",[e._v("If no powerlevel was found where the controller ACKed all pings from the node, this contains the number of pings that weren't ACKed. Lower = better, ideally 0.")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("SNR Margin")]),t("v-list-item-subtitle",[e._v("An estimation of the Signal-to-Noise Ratio Margin in dBm. Only available if the controller supports TX reports.")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("Rating")])],1)],1)],1),t("v-data-table",{staticClass:"elevation-1",attrs:{headers:e.hintHeaders,items:e.hintValues,"mobile-breakpoint":0,"hide-default-footer":"","disable-pagination":""},scopedSlots:e._u([{key:"footer",fn:function(){return[t("p",{staticClass:"mb-0 text-caption"},[t("code",[e._v("*")]),e._v(" Due to missing insight into re-routing attempts between two nodes, some of the values for the for the route check rating don't exist here and are only present in lifeline checks (when target node is the controller). Furthermore, it is not guaranteed that a route between two nodes and lifeline with the same health rating have the same quality. ")])]},proxy:!0}])})],1)],1),e.averages&&!e.loading?t("v-row",{staticClass:"mb-2",attrs:{justify:"space-around"}},[e.averages.numNeighbors&&!e.isLR?t("v-col",{staticClass:"text-center"},[t("p",{staticClass:"mb-1 subtitle-1 font-weight-bold"},[e._v(" No. Neighbors ")]),t("span",{staticClass:"text-h3",class:e.getNeighborsColor(e.averages.numNeighbors)},[e._v(e._s(e.averages.numNeighbors))])]):e._e(),e.averages.rating?t("v-col",{staticClass:"text-center"},[t("p",{staticClass:"mb-1 subtitle-1 font-weight-bold"},[e._v(" Rating ")]),t("span",{staticClass:"text-h3",class:e.getRatingColor(e.averages.rating)+"--text"},[e._v(e._s(e.averages.rating)+"/10")])]):e._e()],1):e._e(),e.results.length>0?t("v-data-table",{staticClass:"elevation-1",attrs:{headers:e.headers,items:e.results,"item-key":"id","hide-default-footer":"","items-per-page":-1},scopedSlots:e._u([{key:"top",fn:function(){return[!e.loading&&e.resultsTargetNode>=0?t("v-btn",{staticClass:"mb-2",attrs:{text:"",color:"primary"},on:{click:e.exportResults}},[e._v("Export")]):e._e()]},proxy:!0},{key:"item.rating",fn:function({item:s}){return[t("v-progress-linear",{staticStyle:{"min-width":"80px"},attrs:{rounded:"",height:"25",value:s.rating*10,color:e.getRatingColor(s.rating),indeterminate:s.rating===void 0}},[s.rating!==void 0?t("strong",[e._v(e._s(s.rating)+"/10")]):e._e()])]}},{key:"item.latency",fn:function({item:s}){return[s.latency!==void 0?t("strong",{class:e.getLatencyColor(s.latency)},[e._v(e._s(s.latency)+" ms")]):e._e()]}},{key:"item.snrMargin",fn:function({item:s}){return[s.snrMargin!==void 0?t("strong",{class:e.getSnrMarginColor(s.snrMargin)},[e._v(e._s(s.snrMargin)+" dBm")]):e._e()]}},{key:"item.routeChanges",fn:function({item:s}){return[s.routeChanges!==void 0?t("strong",[e._v(e._s(s.routeChanges))]):e._e()]}},{key:"item.minPowerlevel",fn:function({item:s}){return[s.minPowerlevel!==void 0?t("strong",{class:e.getPowerLevelColor(s.minPowerlevel)},[e._v(e._s(e.getPowerLevel(s.minPowerlevel)))]):e._e()]}},{key:"item.failedPingsNode",fn:function({item:s}){return[s.failedPingsNode!==void 0?t("p",{staticClass:"mb-0"},[e._v(" "+e._s(e.resultsTargetNode)+" → "+e._s(e.activeNode.id)+": "),t("strong",{class:e.getFailedPingsColor(s.failedPingsNode)},[e._v(e._s(s.failedPingsNode)+"/10")])]):e._e(),s.failedPingsController!==void 0?t("p",{staticClass:"mb-0"},[e._v(" "+e._s(e.resultsTargetNode)+" ← "+e._s(e.activeNode.id)+": "),t("strong",{class:e.getFailedPingsColor(s.failedPingsController)},[e._v(e._s(s.failedPingsController)+"/10")])]):e._e()]}},{key:"item.failedPingsToSource",fn:function({item:s}){return[s.failedPingsToSource!==void 0?t("p",{staticClass:"mb-0"},[e._v(" "+e._s(e.resultsTargetNode)+" → "+e._s(e.activeNode.id)+": "),t("strong",{class:e.getFailedPingsColor(s.failedPingsToSource)},[e._v(e._s(s.failedPingsToSource)+"/10")])]):e._e(),s.failedPingsToTarget!==void 0?t("p",{staticClass:"mb-0"},[e._v(" "+e._s(e.resultsTargetNode)+" ← "+e._s(e.activeNode.id)+": "),t("strong",{class:e.getFailedPingsColor(s.failedPingsToTarget)},[e._v(e._s(s.failedPingsToTarget)+"/10")])]):e._e()]}},{key:"item.minPowerlevelSource",fn:function({item:s}){return[s.minPowerlevelSource!==void 0?t("p",{staticClass:"mb-0"},[e._v(" Node "+e._s(e.activeNode.id)+": "),t("strong",{class:e.getPowerLevelColor(s.minPowerlevelSource)},[e._v(e._s(e.getPowerLevel(s.minPowerlevelSource)))])]):e._e(),s.minPowerlevelTarget!==void 0?t("p",{staticClass:"mb-0"},[e._v(" Node "+e._s(e.resultsTargetNode)+": "),t("strong",{class:e.getPowerLevelColor(s.minPowerlevelTarget)},[e._v(e._s(e.getPowerLevel(s.minPowerlevelTarget)))])]):e._e()]}}],null,!0)}):e._e()],1)],1),t("v-card-actions",[t("v-spacer"),t("v-btn",{attrs:{color:"blue darken-1",text:""},on:{click:function(s){return e.$emit("close")}}},[e._v("Close")])],1)],1)],1)},_=[],p=h(f,m,_,!1,null,null);const w=p.exports;export{w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as n,a as r,u as l,c as o,n as c}from"./index-
|
|
1
|
+
import{I as n,a as r,u as l,c as o,n as c}from"./index-CuXgVWNp.js";const d={components:{},props:{value:Boolean,node:Object,socket:Object},mixins:[n],watch:{value(i){this.init(i)}},computed:{},data(){return{running:!1,activeNode:null,isRunning:!1,mode:"Lifeline",modes:[{text:"Basic Set On/Off",value:0}],infinite:!1,interval:250,iterations:25,statistics:null,progress:0}},methods:{...r(l,["showSnackbar"]),exportResults(){this.app.exportConfiguration(this.results,`linkReliability_${this.activeNode.id}-${this.statistics}`,"json")},init(i){this.mode=0,this.statistics=null,this.infinite=!1,this.running=!1,this.interval=250,this.iterations=25,this.progress=0,i?(this.activeNode=o(this.node),this.bindEvent("linkReliability",this.onProgress.bind(this))):i===!1&&(this.unbindEvents(),this.running&&this.abortLinkReliabilityCheck())},onProgress(i){this.statistics=i.args[0],this.progress=Math.round(this.statistics.rounds/this.iterations*100)},async abortLinkReliabilityCheck(){const i=await this.app.apiRequest("abortLinkReliabilityCheck",[this.activeNode.id]);this.running=!1,i.success&&this.showSnackbar("Link statistics aborted","success")},async checkLinkReliability(){this.running=!0;const i=await this.app.apiRequest("checkLinkReliability",[this.activeNode.id,{mode:this.mode,interval:this.interval,rounds:this.infinite?void 0:this.iterations}],{infoSnack:!0,errorSnack:!1});this.running=!1,this.progress=0,i.success?this.statistics=i.result:this.showSnackbar(i.message||"Health check failed","error")}},beforeDestroy(){this.init(!1)}};var v=function(){var a;var t=this,s=t._self._c;return s("v-dialog",{attrs:{"max-width":"800px",persistent:""},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},[s("v-card",[s("v-card-title",[s("span",{staticClass:"headline"},[t._v("Node "+t._s(t.activeNode?t.activeNode.id:"")+" - Link Statistics")])]),s("v-card-text",[s("v-container",[s("v-row",{staticClass:"ma-3",attrs:{justify:"start"}},[s("v-col",{attrs:{cols:"12"}},[s("v-select",{staticStyle:{"max-width":"325px"},attrs:{label:"Mode",items:t.modes,"persistent-hint":""},model:{value:t.mode,callback:function(e){t.mode=e},expression:"mode"}})],1),s("v-col",{attrs:{cols:"6"}},[s("v-radio-group",{staticClass:"justify-center",model:{value:t.infinite,callback:function(e){t.infinite=e},expression:"infinite"}},[s("v-radio",{attrs:{label:"Infinite",value:!0}}),s("v-radio",{attrs:{label:"XX",value:!1},scopedSlots:t._u([{key:"label",fn:function(){return[s("v-text-field",{attrs:{disabled:t.infinite,label:"Iterations",type:"number",min:1,max:1e4,"persistent-hint":""},model:{value:t.iterations,callback:function(e){t.iterations=t._n(e)},expression:"iterations"}})]},proxy:!0}])})],1)],1),s("v-col",{staticClass:"justify-center",attrs:{cols:"6"}},[s("v-text-field",{attrs:{label:"Interval",suffix:"ms",type:"number",min:1,max:1e4,"persistent-hint":""},model:{value:t.interval,callback:function(e){t.interval=t._n(e)},expression:"interval"}})],1)],1),s("v-row",{staticClass:"mb-4",attrs:{justify:"space-around"}},[s("v-btn",{attrs:{color:"success",disabled:t.running,loading:t.running},on:{click:t.checkLinkReliability}},[t._v("Run")]),s("v-btn",{attrs:{color:"error",disabled:!t.running},on:{click:t.abortLinkReliabilityCheck}},[t._v("Stop")])],1),s("v-divider"),t.statistics?s("v-row",{staticClass:"ma-3",attrs:{justify:"center"}},[t.running?s("v-progress-linear",{attrs:{indeterminate:this.infinite,value:this.infinite?null:this.progress,color:"green darken-1"}}):t._e(),s("v-list",{attrs:{dense:""}},[s("v-list-item",[s("v-list-item-content",[s("v-list-item-title",{staticClass:"info--text"},[t._v("Commands Sent")]),s("v-list-item-subtitle",[t._v(t._s(t.statistics.commandsSent))])],1)],1),s("v-list-item",[s("v-list-item-content",[s("v-list-item-title",{staticClass:"error--text"},[t._v("Failed Commands")]),s("v-list-item-subtitle",[t._v(t._s(t.statistics.commandErrors)+" ("+t._s((t.statistics.commandErrors/t.statistics.rounds*100).toFixed(1))+" %)")])],1)],1),((a=t.statistics)==null?void 0:a.missingResponses)!=null?s("v-list-item",[s("v-list-item-content",[s("v-list-item-title",{staticClass:"error--text"},[t._v("Missing Responses")]),s("v-list-item-subtitle",[t._v(t._s(t.statistics.missingResponses)+" ("+t._s((t.statistics.missingResponses/t.statistics.commandsSent*100).toFixed(1))+" %)")])],1)],1):t._e()],1),s("v-simple-table",{scopedSlots:t._u([{key:"default",fn:function(){var e;return[s("thead",[s("tr",[s("th",{staticClass:"text-left"}),s("th",{staticClass:"text-left"},[t._v("Min")]),s("th",{staticClass:"text-left"},[t._v("Max")]),s("th",{staticClass:"text-left"},[t._v("Avg")])])]),t.statistics.latency?s("tbody",[s("tr",[s("td",[t._v("Latency [ms]")]),s("td",[t._v(t._s(t.statistics.latency.min))]),s("td",[t._v(t._s(t.statistics.latency.max))]),s("td",[t._v(" "+t._s(Math.round(t.statistics.latency.average))+" ")])]),s("tr",[s("td",[t._v("Round-Trip Time [ms]")]),s("td",[t._v(t._s(t.statistics.rtt.min))]),s("td",[t._v(t._s(t.statistics.rtt.max))]),s("td",[t._v(" "+t._s(Math.round(t.statistics.rtt.average))+" ")])]),s("tr",[s("td",[t._v("ACK RSSI [dBm]")]),s("td",[t._v(t._s(t.statistics.ackRSSI.min))]),s("td",[t._v(t._s(t.statistics.ackRSSI.max))]),s("td",[t._v(" "+t._s(Math.round(t.statistics.ackRSSI.average))+" ")])]),Number.isFinite((e=t.statistics.responseRSSI)==null?void 0:e.average)?s("tr",[s("td",[t._v("Response RSSI [dBm]")]),s("td",[t._v(" "+t._s(t.statistics.responseRSSI.min)+" ")]),s("td",[t._v(" "+t._s(t.statistics.responseRSSI.max)+" ")]),s("td",[t._v(" "+t._s(Math.round(t.statistics.responseRSSI.average))+" ")])]):t._e()]):t._e()]},proxy:!0}],null,!1,3268320747)})],1):t._e()],1)],1),s("v-card-actions",[s("v-spacer"),s("v-btn",{attrs:{color:"blue darken-1",text:""},on:{click:function(e){return t.$emit("close")}}},[t._v("Close")])],1)],1)],1)},u=[],m=c(d,v,u,!1,null,null);const _=m.exports;export{_ as default};
|