zwave-js-ui
Version:
Z-Wave Control Panel and MQTT Gateway
91 lines • 88.3 kB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DialogGatewayValue-B6zBwOOO.js","./index-CtTdmJsx.js","./index-2j-kvxFz.css","./DialogGatewayValue-EYROGA4d.css","./file-input-Czg7Jsdi.js","./InvertedCheckbox-B_e1cZB_.js"])))=>i.map(i=>d[i]);
import{g as V,L as J,I as Y,_ as R,d as C,m as z,u as $,r as Q,z as ee,b as te,a as ne,c as M,C as I,w as ae,n as re,i as W}from"./index-CtTdmJsx.js";var D={};function se(a,e){return Object.prototype.hasOwnProperty.call(a,e)}var oe=function(a,e,t,n){e=e||"&",t=t||"=";var f={};if(typeof a!="string"||a.length===0)return f;var k=/\+/g;a=a.split(e);var m=1e3;n&&typeof n.maxKeys=="number"&&(m=n.maxKeys);var p=a.length;m>0&&p>m&&(p=m);for(var y=0;y<p;++y){var o=a[y].replace(k,"%20"),d=o.indexOf(t),w,s,r,i;d>=0?(w=o.substr(0,d),s=o.substr(d+1)):(w=o,s=""),r=decodeURIComponent(w),i=decodeURIComponent(s),se(f,r)?Array.isArray(f[r])?f[r].push(i):f[r]=[f[r],i]:f[r]=i}return f},K=function(a){switch(typeof a){case"string":return a;case"boolean":return a?"true":"false";case"number":return isFinite(a)?a:"";default:return""}},ie=function(a,e,t,n){return e=e||"&",t=t||"=",a===null&&(a=void 0),typeof a=="object"?Object.keys(a).map(function(f){var k=encodeURIComponent(K(f))+t;return Array.isArray(a[f])?a[f].map(function(m){return k+encodeURIComponent(K(m))}).join(e):k+encodeURIComponent(K(a[f]))}).filter(Boolean).join(e):n?encodeURIComponent(K(n))+t+encodeURIComponent(K(a)):""};D.decode=D.parse=oe;D.encode=D.stringify=ie;var le=/https?|ftp|gopher|file/;function B(a){typeof a=="string"&&(a=E(a));var e=function(t,n,f){var k=t.auth,m=t.hostname,p=t.protocol||"",y=t.pathname||"",o=t.hash||"",d=t.query||"",w=!1;k=k?encodeURIComponent(k).replace(/%3A/i,":")+"@":"",t.host?w=k+t.host:m&&(w=k+(~m.indexOf(":")?"["+m+"]":m),t.port&&(w+=":"+t.port)),d&&typeof d=="object"&&(d=n.encode(d));var s=t.search||d&&"?"+d||"";return p&&p.substr(-1)!==":"&&(p+=":"),t.slashes||(!p||f.test(p))&&w!==!1?(w="//"+(w||""),y&&y[0]!=="/"&&(y="/"+y)):w||(w=""),o&&o[0]!=="#"&&(o="#"+o),s&&s[0]!=="?"&&(s="?"+s),{protocol:p,host:w,pathname:y=y.replace(/[?#]/g,encodeURIComponent),search:s=s.replace("#","%23"),hash:o}}(a,D,le);return""+e.protocol+e.host+e.pathname+e.search+e.hash}var X="http://",P="w.w",U=X+P,ce=/^([a-z0-9.+-]*:\/\/\/)([a-z0-9.+-]:\/*)?/i,ue=/https?|ftp|gopher|file/;function F(a,e){var t=typeof a=="string"?E(a):a;a=typeof a=="object"?B(a):a;var n=E(e),f="";t.protocol&&!t.slashes&&(f=t.protocol,a=a.replace(t.protocol,""),f+=e[0]==="/"||a[0]==="/"?"/":""),f&&n.protocol&&(f="",n.slashes||(f=n.protocol,e=e.replace(n.protocol,"")));var k=a.match(ce);k&&!n.protocol&&(a=a.substr((f=k[1]+(k[2]||"")).length),/^\/\/[^/]/.test(e)&&(f=f.slice(0,-1)));var m=new URL(a,U+"/"),p=new URL(e,m).toString().replace(U,""),y=n.protocol||t.protocol;return y+=t.slashes||n.slashes?"//":"",!f&&y?p=p.replace(X,y):f&&(p=p.replace(X,"")),ue.test(p)||~e.indexOf(".")||a.slice(-1)==="/"||e.slice(-1)==="/"||p.slice(-1)!=="/"||(p=p.slice(0,-1)),f&&(p=f+(p[0]==="/"?p.substr(1):p)),p}function O(){}O.prototype.parse=E,O.prototype.format=B,O.prototype.resolve=F,O.prototype.resolveObject=F;var G=/^https?|ftp|gopher|file/,de=/^(.*?)([#?].*)/,ve=/^([a-z0-9.+-]*:)(\/{0,3})(.*)/i,pe=/^([a-z0-9.+-]*:)?\/\/\/*/i,fe=/^([a-z0-9.+-]*:)(\/{0,2})\[(.*)\]$/i;function E(a,e,t){if(e===void 0&&(e=!1),t===void 0&&(t=!1),a&&typeof a=="object"&&a instanceof O)return a;var n=(a=a.trim()).match(de);a=n?n[1].replace(/\\/g,"/")+n[2]:a.replace(/\\/g,"/"),fe.test(a)&&a.slice(-1)!=="/"&&(a+="/");var f=!/(^javascript)/.test(a)&&a.match(ve),k=pe.test(a),m="";f&&(G.test(f[1])||(m=f[1].toLowerCase(),a=""+f[2]+f[3]),f[2]||(k=!1,G.test(f[1])?(m=f[1],a=""+f[3]):a="//"+f[3]),f[2].length!==3&&f[2].length!==1||(m=f[1],a="/"+f[3]));var p,y=(n?n[1]:a).match(/^https?:\/\/[^/]+(:[0-9]+)(?=\/|$)/),o=y&&y[1],d=new O,w="",s="";try{p=new URL(a)}catch(l){w=l,m||t||!/^\/\//.test(a)||/^\/\/.+[@.]/.test(a)||(s="/",a=a.substr(1));try{p=new URL(a,U)}catch{return d.protocol=m,d.href=m,d}}d.slashes=k&&!s,d.host=p.host===P?"":p.host,d.hostname=p.hostname===P?"":p.hostname.replace(/(\[|\])/g,""),d.protocol=w?m||null:p.protocol,d.search=p.search.replace(/\\/g,"%5C"),d.hash=p.hash.replace(/\\/g,"%5C");var r=a.split("#");!d.search&&~r[0].indexOf("?")&&(d.search="?"),d.hash||r[1]!==""||(d.hash="#"),d.query=e?D.decode(p.search.substr(1)):d.search.substr(1),d.pathname=s+(f?function(l){return l.replace(/['^|`]/g,function(c){return"%"+c.charCodeAt().toString(16).toUpperCase()}).replace(/((?:%[0-9A-F]{2})+)/g,function(c,v){try{return decodeURIComponent(v).split("").map(function(u){var h=u.charCodeAt();return h>256||/^[a-z0-9]$/i.test(u)?u:"%"+h.toString(16).toUpperCase()}).join("")}catch{return v}})}(p.pathname):p.pathname),d.protocol==="about:"&&d.pathname==="blank"&&(d.protocol="",d.pathname=""),w&&a[0]!=="/"&&(d.pathname=d.pathname.substr(1)),m&&!G.test(m)&&a.slice(-1)!=="/"&&d.pathname==="/"&&(d.pathname=""),d.path=d.pathname+d.search,d.auth=[p.username,p.password].map(decodeURIComponent).filter(Boolean).join(":"),d.port=p.port,o&&!d.host.endsWith(o)&&(d.host+=o,d.port=o.slice(1)),d.href=s?""+d.pathname+d.search+d.hash:B(d);var i=/^(file)/.test(d.href)?["host","hostname"]:[];return Object.keys(d).forEach(function(l){~i.indexOf(l)||(d[l]=d[l]||null)}),d}var j={exports:{}};(function(a,e){(function(n,f){a.exports=f()})(globalThis,()=>(()=>{var t={794:(m,p,y)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.CronParser=void 0;var o=y(586),d=function(){function w(s,r,i){r===void 0&&(r=!0),i===void 0&&(i=!1),this.expression=s,this.dayOfWeekStartIndexZero=r,this.monthStartIndexZero=i}return w.prototype.parse=function(){var s,r,i=(s=this.expression)!==null&&s!==void 0?s:"";if(i.startsWith("@")){var l=this.parseSpecial(this.expression);r=this.extractParts(l)}else r=this.extractParts(this.expression);return this.normalize(r),this.validate(r),r},w.prototype.parseSpecial=function(s){var r={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *"},i=r[s];if(!i)throw new Error("Unknown special expression.");return i},w.prototype.extractParts=function(s){if(!this.expression)throw new Error("cron expression is empty");for(var r=s.trim().split(/[ ]+/),i=0;i<r.length;i++)if(r[i].includes(",")){var l=r[i].split(",").map(function(v){return v.trim()}).filter(function(v){return v!==""}).map(function(v){return isNaN(Number(v))?v:Number(v)}).filter(function(v){return v!==null&&v!==""});l.length===0&&l.push("*"),l.sort(function(v,u){return v!==null&&u!==null?v-u:0}),r[i]=l.map(function(v){return v!==null?v.toString():""}).join(",")}if(r.length<5)throw new Error("Expression has only ".concat(r.length," part").concat(r.length==1?"":"s",". At least 5 parts are required."));if(r.length==5)r.unshift(""),r.push("");else if(r.length==6){var c=/\d{4}$/.test(r[5])||r[4]=="?"||r[2]=="?";c?r.unshift(""):r.push("")}else if(r.length>7)throw new Error("Expression has ".concat(r.length," parts; too many!"));return r},w.prototype.normalize=function(s){var r=this;if(s[3]=s[3].replace("?","*"),s[5]=s[5].replace("?","*"),s[2]=s[2].replace("?","*"),s[0].indexOf("0/")==0&&(s[0]=s[0].replace("0/","*/")),s[1].indexOf("0/")==0&&(s[1]=s[1].replace("0/","*/")),s[2].indexOf("0/")==0&&(s[2]=s[2].replace("0/","*/")),s[3].indexOf("1/")==0&&(s[3]=s[3].replace("1/","*/")),s[4].indexOf("1/")==0&&(s[4]=s[4].replace("1/","*/")),s[6].indexOf("1/")==0&&(s[6]=s[6].replace("1/","*/")),s[5]=s[5].replace(/(^\d)|([^#/\s]\d)/g,function(b){var _=b.replace(/\D/,""),g=_;return r.dayOfWeekStartIndexZero?_=="7"&&(g="0"):g=(parseInt(_)-1).toString(),b.replace(_,g)}),s[5]=="L"&&(s[5]="6"),s[3]=="?"&&(s[3]="*"),s[3].indexOf("W")>-1&&(s[3].indexOf(",")>-1||s[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var i={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var l in i)s[5]=s[5].replace(new RegExp(l,"gi"),i[l].toString());s[4]=s[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(b){var _=b.replace(/\D/,""),g=_;return r.monthStartIndexZero&&(g=(parseInt(_)+1).toString()),b.replace(_,g)});var c={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var v in c)s[4]=s[4].replace(new RegExp(v,"gi"),c[v].toString());s[0]=="0"&&(s[0]=""),!/\*|\-|\,|\//.test(s[2])&&(/\*|\//.test(s[1])||/\*|\//.test(s[0]))&&(s[2]+="-".concat(s[2]));for(var u=0;u<s.length;u++)if(s[u].indexOf(",")!=-1&&(s[u]=s[u].split(",").filter(function(b){return b!==""}).join(",")||"*"),s[u]=="*/1"&&(s[u]="*"),s[u].indexOf("/")>-1&&!/^\*|\-|\,/.test(s[u])){var h=null;switch(u){case 4:h="12";break;case 5:h="6";break;case 6:h="9999";break;default:h=null;break}if(h!==null){var x=s[u].split("/");s[u]="".concat(x[0],"-").concat(h,"/").concat(x[1])}}},w.prototype.validate=function(s){this.assertNoInvalidCharacters("DOW",s[5]),this.assertNoInvalidCharacters("DOM",s[3]),this.validateRange(s)},w.prototype.validateRange=function(s){o.default.secondRange(s[0]),o.default.minuteRange(s[1]),o.default.hourRange(s[2]),o.default.dayOfMonthRange(s[3]),o.default.monthRange(s[4],this.monthStartIndexZero),o.default.dayOfWeekRange(s[5],this.dayOfWeekStartIndexZero)},w.prototype.assertNoInvalidCharacters=function(s,r){var i=r.match(/[A-KM-VX-Z]+/gi);if(i&&i.length)throw new Error("".concat(s," part contains invalid values: '").concat(i.toString(),"'"))},w}();p.CronParser=d},728:(m,p,y)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.ExpressionDescriptor=void 0;var o=y(910),d=y(794),w=function(){function s(r,i){if(this.expression=r,this.options=i,this.expressionParts=new Array(5),!this.options.locale&&s.defaultLocale&&(this.options.locale=s.defaultLocale),!s.locales[this.options.locale]){var l=Object.keys(s.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(l,"'.")),this.options.locale=l}this.i18n=s.locales[this.options.locale],i.use24HourTimeFormat===void 0&&(i.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return s.toString=function(r,i){var l=i===void 0?{}:i,c=l.throwExceptionOnParseError,v=c===void 0?!0:c,u=l.verbose,h=u===void 0?!1:u,x=l.dayOfWeekStartIndexZero,b=x===void 0?!0:x,_=l.monthStartIndexZero,g=_===void 0?!1:_,Z=l.use24HourTimeFormat,S=l.locale,q=S===void 0?null:S,T=l.tzOffset,A=T===void 0?0:T,L={throwExceptionOnParseError:v,verbose:h,dayOfWeekStartIndexZero:b,monthStartIndexZero:g,use24HourTimeFormat:Z,locale:q,tzOffset:A},H=new s(r,L);return H.getFullDescription()},s.initialize=function(r,i){i===void 0&&(i="en"),s.specialCharacters=["/","-",",","*"],s.defaultLocale=i,r.load(s.locales)},s.prototype.getFullDescription=function(){var r="";try{var i=new d.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);this.expressionParts=i.parse();var l=this.getTimeOfDayDescription(),c=this.getDayOfMonthDescription(),v=this.getMonthDescription(),u=this.getDayOfWeekDescription(),h=this.getYearDescription();r+=l+c+u+v+h,r=this.transformVerbosity(r,!!this.options.verbose),r=r.charAt(0).toLocaleUpperCase()+r.substr(1)}catch(x){if(!this.options.throwExceptionOnParseError)r=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(x)}return r},s.prototype.getTimeOfDayDescription=function(){var r=this.expressionParts[0],i=this.expressionParts[1],l=this.expressionParts[2],c="";if(!o.StringUtilities.containsAny(i,s.specialCharacters)&&!o.StringUtilities.containsAny(l,s.specialCharacters)&&!o.StringUtilities.containsAny(r,s.specialCharacters))c+=this.i18n.atSpace()+this.formatTime(l,i,r);else if(!r&&i.indexOf("-")>-1&&!(i.indexOf(",")>-1)&&!(i.indexOf("/")>-1)&&!o.StringUtilities.containsAny(l,s.specialCharacters)){var v=i.split("-");c+=o.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(l,v[0],""),this.formatTime(l,v[1],""))}else if(!r&&l.indexOf(",")>-1&&l.indexOf("-")==-1&&l.indexOf("/")==-1&&!o.StringUtilities.containsAny(i,s.specialCharacters)){var u=l.split(",");c+=this.i18n.at();for(var h=0;h<u.length;h++)c+=" ",c+=this.formatTime(u[h],i,""),h<u.length-2&&(c+=","),h==u.length-2&&(c+=this.i18n.spaceAnd())}else{var x=this.getSecondsDescription(),b=this.getMinutesDescription(),_=this.getHoursDescription();if(c+=x,c&&b&&(c+=", "),c+=b,b===_)return c;c&&_&&(c+=", "),c+=_}return c},s.prototype.getSecondsDescription=function(){var r=this,i=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(l){return l},function(l){return o.StringUtilities.format(r.i18n.everyX0Seconds(l),l)},function(l){return r.i18n.secondsX0ThroughX1PastTheMinute()},function(l){return l=="0"?"":parseInt(l)<20?r.i18n.atX0SecondsPastTheMinute(l):r.i18n.atX0SecondsPastTheMinuteGt20()||r.i18n.atX0SecondsPastTheMinute(l)});return i},s.prototype.getMinutesDescription=function(){var r=this,i=this.expressionParts[0],l=this.expressionParts[2],c=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(v){return v},function(v){return o.StringUtilities.format(r.i18n.everyX0Minutes(v),v)},function(v){return r.i18n.minutesX0ThroughX1PastTheHour()},function(v){try{return v=="0"&&l.indexOf("/")==-1&&i==""?r.i18n.everyHour():parseInt(v)<20?r.i18n.atX0MinutesPastTheHour(v):r.i18n.atX0MinutesPastTheHourGt20()||r.i18n.atX0MinutesPastTheHour(v)}catch{return r.i18n.atX0MinutesPastTheHour(v)}});return c},s.prototype.getHoursDescription=function(){var r=this,i=this.expressionParts[2],l=this.getSegmentDescription(i,this.i18n.everyHour(),function(u){return r.formatTime(u,"0","")},function(u){return o.StringUtilities.format(r.i18n.everyX0Hours(u),u)},function(u){return r.i18n.betweenX0AndX1()},function(u){return r.i18n.atX0()});if(l&&i.includes("-")&&this.expressionParts[1]!="0"){var c=Array.from(l.matchAll(/:00/g));if(c.length>1){var v=c[c.length-1].index;l=l.substring(0,v)+":59"+l.substring(v+3)}}return l},s.prototype.getDayOfWeekDescription=function(){var r=this,i=this.i18n.daysOfTheWeek(),l=null;return this.expressionParts[5]=="*"?l="":l=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(c,v){var u=c;c.indexOf("#")>-1?u=c.substring(0,c.indexOf("#")):c.indexOf("L")>-1&&(u=u.replace("L",""));var h=parseInt(u);if(r.options.tzOffset){var x=r.expressionParts[2],b=parseInt(x)+(r.options.tzOffset?r.options.tzOffset:0);b>=24?h++:b<0&&h--,h>6?h=0:h<0&&(h=6)}var _=r.i18n.daysOfTheWeekInCase?r.i18n.daysOfTheWeekInCase(v)[h]:i[h];if(c.indexOf("#")>-1){var g=null,Z=c.substring(c.indexOf("#")+1),S=c.substring(0,c.indexOf("#"));switch(Z){case"1":g=r.i18n.first(S);break;case"2":g=r.i18n.second(S);break;case"3":g=r.i18n.third(S);break;case"4":g=r.i18n.fourth(S);break;case"5":g=r.i18n.fifth(S);break}_=g+" "+_}return _},function(c){return parseInt(c)==1?"":o.StringUtilities.format(r.i18n.commaEveryX0DaysOfTheWeek(c),c)},function(c){var v=c.substring(0,c.indexOf("-")),u=r.expressionParts[3]!="*";return u?r.i18n.commaAndX0ThroughX1(v):r.i18n.commaX0ThroughX1(v)},function(c){var v=null;if(c.indexOf("#")>-1){var u=c.substring(c.indexOf("#")+1);v=r.i18n.commaOnThe(u).trim()+r.i18n.spaceX0OfTheMonth()}else if(c.indexOf("L")>-1)v=r.i18n.commaOnTheLastX0OfTheMonth(c.replace("L",""));else{var h=r.expressionParts[3]!="*";v=h?r.i18n.commaAndOnX0():r.i18n.commaOnlyOnX0(c)}return v}),l},s.prototype.getMonthDescription=function(){var r=this,i=this.i18n.monthsOfTheYear(),l=this.getSegmentDescription(this.expressionParts[4],"",function(c,v){return v&&r.i18n.monthsOfTheYearInCase?r.i18n.monthsOfTheYearInCase(v)[parseInt(c)-1]:i[parseInt(c)-1]},function(c){return parseInt(c)==1?"":o.StringUtilities.format(r.i18n.commaEveryX0Months(c),c)},function(c){return r.i18n.commaMonthX0ThroughMonthX1()||r.i18n.commaX0ThroughX1()},function(c){return r.i18n.commaOnlyInMonthX0?r.i18n.commaOnlyInMonthX0():r.i18n.commaOnlyInX0()});return l},s.prototype.getDayOfMonthDescription=function(){var r=this,i=null,l=this.expressionParts[3];switch(l){case"L":i=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":i=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var c=l.match(/(\d{1,2}W)|(W\d{1,2})/);if(c){var v=parseInt(c[0].replace("W","")),u=v==1?this.i18n.firstWeekday():o.StringUtilities.format(this.i18n.weekdayNearestDayX0(),v.toString());i=o.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),u);break}else{var h=l.match(/L-(\d{1,2})/);if(h){var x=h[1];i=o.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(x),x);break}else{if(l=="*"&&this.expressionParts[5]!="*")return"";i=this.getSegmentDescription(l,this.i18n.commaEveryDay(),function(b){return b=="L"?r.i18n.lastDay():r.i18n.dayX0?o.StringUtilities.format(r.i18n.dayX0(),b):b},function(b){return b=="1"?r.i18n.commaEveryDay():r.i18n.commaEveryX0Days(b)},function(b){return r.i18n.commaBetweenDayX0AndX1OfTheMonth(b)},function(b){return r.i18n.commaOnDayX0OfTheMonth(b)})}break}}return i},s.prototype.getYearDescription=function(){var r=this,i=this.getSegmentDescription(this.expressionParts[6],"",function(l){return/^\d+$/.test(l)?new Date(parseInt(l),1).getFullYear().toString():l},function(l){return o.StringUtilities.format(r.i18n.commaEveryX0Years(l),l)},function(l){return r.i18n.commaYearX0ThroughYearX1()||r.i18n.commaX0ThroughX1()},function(l){return r.i18n.commaOnlyInYearX0?r.i18n.commaOnlyInYearX0():r.i18n.commaOnlyInX0()});return i},s.prototype.getSegmentDescription=function(r,i,l,c,v,u){var h=null,x=r.indexOf("/")>-1,b=r.indexOf("-")>-1,_=r.indexOf(",")>-1;if(!r)h="";else if(r==="*")h=i;else if(!x&&!b&&!_)h=o.StringUtilities.format(u(r),l(r));else if(_){for(var g=r.split(","),Z="",S=0;S<g.length;S++)if(S>0&&g.length>2&&(Z+=",",S<g.length-1&&(Z+=" ")),S>0&&g.length>1&&(S==g.length-1||g.length==2)&&(Z+="".concat(this.i18n.spaceAnd()," ")),g[S].indexOf("/")>-1||g[S].indexOf("-")>-1){var q=g[S].indexOf("-")>-1&&g[S].indexOf("/")==-1,T=this.getSegmentDescription(g[S],i,l,c,q?this.i18n.commaX0ThroughX1:v,u);q&&(T=T.replace(", ","")),Z+=T}else x?Z+=this.getSegmentDescription(g[S],i,l,c,v,u):Z+=l(g[S]);x?h=Z:h=o.StringUtilities.format(u(r),Z)}else if(x){var g=r.split("/");if(h=o.StringUtilities.format(c(g[1]),g[1]),g[0].indexOf("-")>-1){var A=this.generateRangeSegmentDescription(g[0],v,l);A.indexOf(", ")!=0&&(h+=", "),h+=A}else if(g[0].indexOf("*")==-1){var L=o.StringUtilities.format(u(g[0]),l(g[0]));L=L.replace(", ",""),h+=o.StringUtilities.format(this.i18n.commaStartingX0(),L)}}else b&&(h=this.generateRangeSegmentDescription(r,v,l));return h},s.prototype.generateRangeSegmentDescription=function(r,i,l){var c="",v=r.split("-"),u=l(v[0],1),h=l(v[1],2),x=i(r);return c+=o.StringUtilities.format(x,u,h),c},s.prototype.formatTime=function(r,i,l){var c=0,v=0;this.options.tzOffset&&(c=this.options.tzOffset>0?Math.floor(this.options.tzOffset):Math.ceil(this.options.tzOffset),v=parseFloat((this.options.tzOffset%1).toFixed(2)),v!=0&&(v*=60));var u=parseInt(r)+c,h=parseInt(i)+v;h>=60?(h-=60,u+=1):h<0&&(h+=60,u-=1),u>=24?u=u-24:u<0&&(u=24+u);var x="",b=!1;this.options.use24HourTimeFormat||(b=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),x=b?"".concat(this.getPeriod(u)," "):" ".concat(this.getPeriod(u)),u>12&&(u-=12),u===0&&(u=12));var _="";return l&&(_=":".concat(("00"+l).substring(l.length))),"".concat(b?x:"").concat(("00"+u.toString()).substring(u.toString().length),":").concat(("00"+h.toString()).substring(h.toString().length)).concat(_).concat(b?"":x)},s.prototype.transformVerbosity=function(r,i){return i||(r=r.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),r=r.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),r=r.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),r=r.replace(/\, ?$/,"")),r},s.prototype.getPeriod=function(r){return r>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},s.locales={},s}();p.ExpressionDescriptor=w},336:(m,p,y)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.enLocaleLoader=void 0;var o=y(751),d=function(){function w(){}return w.prototype.load=function(s){s.en=new o.en},w}();p.enLocaleLoader=d},751:(m,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.en=void 0;var y=function(){function o(){}return o.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},o.prototype.atX0MinutesPastTheHourGt20=function(){return null},o.prototype.commaMonthX0ThroughMonthX1=function(){return null},o.prototype.commaYearX0ThroughYearX1=function(){return null},o.prototype.use24HourTimeFormatByDefault=function(){return!1},o.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occured when generating the expression description. Check the cron expression syntax."},o.prototype.everyMinute=function(){return"every minute"},o.prototype.everyHour=function(){return"every hour"},o.prototype.atSpace=function(){return"At "},o.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},o.prototype.at=function(){return"At"},o.prototype.spaceAnd=function(){return" and"},o.prototype.everySecond=function(){return"every second"},o.prototype.everyX0Seconds=function(){return"every %s seconds"},o.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},o.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},o.prototype.everyX0Minutes=function(){return"every %s minutes"},o.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},o.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},o.prototype.everyX0Hours=function(){return"every %s hours"},o.prototype.betweenX0AndX1=function(){return"between %s and %s"},o.prototype.atX0=function(){return"at %s"},o.prototype.commaEveryDay=function(){return", every day"},o.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},o.prototype.commaX0ThroughX1=function(){return", %s through %s"},o.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},o.prototype.first=function(){return"first"},o.prototype.second=function(){return"second"},o.prototype.third=function(){return"third"},o.prototype.fourth=function(){return"fourth"},o.prototype.fifth=function(){return"fifth"},o.prototype.commaOnThe=function(){return", on the "},o.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},o.prototype.lastDay=function(){return"the last day"},o.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},o.prototype.commaOnlyOnX0=function(){return", only on %s"},o.prototype.commaAndOnX0=function(){return", and on %s"},o.prototype.commaEveryX0Months=function(){return", every %s months"},o.prototype.commaOnlyInX0=function(){return", only in %s"},o.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},o.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},o.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},o.prototype.firstWeekday=function(){return"first weekday"},o.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},o.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},o.prototype.commaEveryX0Days=function(){return", every %s days"},o.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},o.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},o.prototype.commaEveryHour=function(){return", every hour"},o.prototype.commaEveryX0Years=function(){return", every %s years"},o.prototype.commaStartingX0=function(){return", starting %s"},o.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},o.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},o}();p.en=y},586:(m,p)=>{Object.defineProperty(p,"__esModule",{value:!0});function y(d,w){if(!d)throw new Error(w)}var o=function(){function d(){}return d.secondRange=function(w){for(var s=w.split(","),r=0;r<s.length;r++)if(!isNaN(parseInt(s[r],10))){var i=parseInt(s[r],10);y(i>=0&&i<=59,"seconds part must be >= 0 and <= 59")}},d.minuteRange=function(w){for(var s=w.split(","),r=0;r<s.length;r++)if(!isNaN(parseInt(s[r],10))){var i=parseInt(s[r],10);y(i>=0&&i<=59,"minutes part must be >= 0 and <= 59")}},d.hourRange=function(w){for(var s=w.split(","),r=0;r<s.length;r++)if(!isNaN(parseInt(s[r],10))){var i=parseInt(s[r],10);y(i>=0&&i<=23,"hours part must be >= 0 and <= 23")}},d.dayOfMonthRange=function(w){for(var s=w.split(","),r=0;r<s.length;r++)if(!isNaN(parseInt(s[r],10))){var i=parseInt(s[r],10);y(i>=1&&i<=31,"DOM part must be >= 1 and <= 31")}},d.monthRange=function(w,s){for(var r=w.split(","),i=0;i<r.length;i++)if(!isNaN(parseInt(r[i],10))){var l=parseInt(r[i],10);y(l>=1&&l<=12,s?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},d.dayOfWeekRange=function(w,s){for(var r=w.split(","),i=0;i<r.length;i++)if(!isNaN(parseInt(r[i],10))){var l=parseInt(r[i],10);y(l>=0&&l<=6,s?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},d}();p.default=o},910:(m,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.StringUtilities=void 0;var y=function(){function o(){}return o.format=function(d){for(var w=[],s=1;s<arguments.length;s++)w[s-1]=arguments[s];return d.replace(/%s/g,function(r){return w.shift()})},o.containsAny=function(d,w){return w.some(function(s){return d.indexOf(s)>-1})},o}();p.StringUtilities=y}},n={};function f(m){var p=n[m];if(p!==void 0)return p.exports;var y=n[m]={exports:{}};return t[m](y,y.exports,f),y.exports}var k={};return(()=>{var m=k;Object.defineProperty(m,"__esModule",{value:!0}),m.toString=void 0;var p=f(728),y=f(336);p.ExpressionDescriptor.initialize(new y.enLocaleLoader),m.default=p.ExpressionDescriptor;var o=p.ExpressionDescriptor.toString;m.toString=o})(),k})())})(j);var he=j.exports;const we=V(he),N=J.get("Settings"),me={name:"Settings",mixins:[Y],components:{DialogGatewayValue:()=>R(()=>import("./DialogGatewayValue-B6zBwOOO.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),fileInput:()=>R(()=>import("./file-input-Czg7Jsdi.js"),__vite__mapDeps([4,1,2]),import.meta.url),invertedCheckbox:()=>R(()=>import("./InvertedCheckbox-B_e1cZB_.js"),__vite__mapDeps([5,1,2]),import.meta.url)},props:{socket:{type:Object,required:!0}},computed:{internalDarkMode:{get(){return this.darkMode},set(a){this.setDarkMode(a)}},internalNavTabs:{get(){return this.navTabs},set(a){this.setNavTabs(a)}},internalStreamerMode:{get(){return this.streamerMode},set(a){this.setStreamerMode(a)}},settingsChanged(){return!C(this.newMqtt,this.mqtt)||!C(this.newGateway,this.gateway)||!C(this.newZwave,this.zwave)||!C(this.newBackup,this.backup)||!C(this.newZniffer,this.zniffer)||!C(this.ui,this.prevUi)},filteredScales(){return this.newZwave.scales&&this.newZwave.scales.length>0?this.scales.filter(a=>!this.newZwave.scales.find(e=>e.key===a.key&&a.label!==e.label)):this.scales},visibleHeaders(){if(this.newMqtt.disabled){const a=[...this.headers];return a.splice(2,1),a}else return this.headers},secure(){if(!this.newMqtt.host)return!1;const a=E(this.newMqtt.host),e=["mqtts:","tls:"].indexOf(a.protocol)>=0;return e||(this.newMqtt.key=this.newMqtt._key=this.newMqtt.cert=this.newMqtt._cert=this.newMqtt.ca=this.newMqtt._ca=""),e},dialogTitle(){return this.editedIndex===-1?"New Item":"Edit Item"},requiredUser(){return this.newMqtt.auth&&!!this.newMqtt.username||"This field is required."},differentPorts(){return!this.newZwave.enabled||!this.newZniffer.enabled||this.newZwave.port!==this.newZniffer.port||"Zniffer and Z-Wave ports must be different."},validPayload(){return!this.newGateway.hassDiscovery||this.newGateway.payloadType!==2||"Hass discovery doesn't work with this payload type"},requiredPassword(){return this.newMqtt.auth&&!!this.newMqtt.password||"This field is required."},...z($,["zwave","zniffer","mqtt","gateway","backup","devices","serial_ports","scales","ui"]),...z($,{darkMode:a=>a.ui.darkMode,navTabs:a=>a.ui.navTabs,streamerMode:a=>a.ui.streamerMode})},watch:{dialogValue(a){a||this.closeDialog()}},data(){return{rfRegions:Q,znifferRegions:ee,maxLRPowerLevels:te,valid_zwave:!0,dialogValue:!1,sslDisabled:!1,saving:!1,prevUi:null,newGateway:{},newMqtt:{},newZwave:{rf:{txPower:{}}},newZniffer:{},newBackup:{},editedValue:{},editedIndex:-1,defaultValue:{},logLevels:[{text:"Error",value:"error"},{text:"Warn",value:"warn"},{text:"Info",value:"info"},{text:"Verbose",value:"verbose"},{text:"Debug",value:"debug"},{text:"Silly",value:"silly"}],headers:[{text:"Device",value:"device"},{text:"Value",value:"value",sortable:!1},{text:"Topic",value:"topic"},{text:"Post Operation",value:"postOperation"},{text:"Poll",value:"enablePoll"},{text:"Actions",value:"actions",sortable:!1}],headersJobs:[{text:"Name",value:"name"},{text:"Enabled",value:"enabled"},{text:"On Init",value:"runOnInit"},{text:"Code",value:"code"},{text:"Cron",value:"cron"},{text:"Actions",value:"actions",sortable:!1}],e1:!0,gw_types:[{text:"ValueID topics",value:0},{text:"Named topics",value:1},{text:"Configured Manually",value:2}],py_types:[{text:"JSON Time-Value",value:0},{text:"Entire Z-Wave value Object",value:1},{text:"Just value",value:2}],rules:{required:a=>{let e=!1;return a instanceof Array?e=a.length>0:e=!!a||a===0,e||"This field is required."},positive:a=>a>0||"Value must be positive.",uniqueSensorType(a){return!a||a.length<2?!0:!a.some((e,t)=>a.findIndex((n,f)=>f>t&&e.key===n.key)>=0)||"Duplicated sensor type scale"},validNodeLog:a=>!a||a.every(e=>e>0&&e<4e3)||"Nodes must be between 1-4000",validName:a=>!/[!@#$%^&*)(+=:,;"'\\|?{}£°§<>[\]/.\s]/g.test(a)||'Name is not valid, only "a-z" "A-Z" "0-9" chars and "_" are allowed',validPrefix:a=>!/[!@#$%^&*)(+=:,;"'\\|?{}£°§<>[\].\s]/g.test(a)||'Prefix is not valid, only "a-z" "A-Z" "0-9", "_", "/" chars are allowed',validLength:a=>!a||a.length===32||"Key must be 32 characters length",validKey:a=>!a||!/[^A-F0-9]+/gi.test(a)||"Key not valid. Must contain only hex chars",validCron:a=>!a||!!this.parseCron(a)||"Not a valid cron string"}}},methods:{...ne($,["setDarkMode","setNavTabs","setStreamerMode","initSettings","init","showSnackbar"]),copyKeysZniffer(){this.newZniffer.securityKeys=M(this.newZwave.securityKeys),this.newZniffer.securityKeysLongRange=M(this.newZwave.securityKeysLongRange)},validTxPower(){var f;const{powerlevel:a,measured0dBm:e}=((f=this.newZwave.rf)==null?void 0:f.txPower)??{},t=!W(a),n=!W(e);return t&&(a<-10||a>20)?"Power level must be between -10 and 20":n&&(e<-10||e>10)?"Measured 0dBm must be between -10 and 10":t&&n||!t&&!n||"Both powerlevel and measured 0 dBm must be set when using custom TX power"},parseCron(a){let e;try{e=we.toString(a,{use24HourTimeFormat:!0})}catch{}return e},differentKeys(a){return()=>{const e=Object.values(a);return e.length===new Set(e).size||"Keys must be different"}},fixKey(a,e,t){var f;let n=(f=a.clipboardData)==null?void 0:f.getData("Text");n&&(n=n.replace(/0x|,|\s/gi,""),this.$set(t,e,n),a.preventDefault())},openDocs(a){this.openUrl(`https://zwave-js.github.io/zwave-js-ui/#/usage/setup?id=${a}`)},openUrl(a){window.open(a,"_blank")},scaleName(a){return typeof a=="object"&&a?`${a.sensor}: ${a.label?" "+a.label+" ":""}${a.unit&&a.unit!==a.label?`(${a.unit})`:""}`:a},randomKey(a,e){let t="";for(;t.length<32;){const n=Math.round(Math.random()*255).toString(16).toUpperCase();t+=n.length===2?n:"0"+n}this.$set(e,a,t)},readFile(a,e){const t=new FileReader;t.onload=n=>e(n.target.result),t.readAsText(a)},onFileSelect(a){const e=a.files[0];e?this.readFile(e,t=>this.newMqtt[a.key]=t):this.newMqtt[a.key]=""},async importSettings(){try{const{data:a}=await this.app.importFile("json");a.zwave&&a.mqtt&&a.gateway?(this.initSettings(a),this.showSnackbar("Configuration imported successfully","success")):this.showSnackbar("Imported settings not valid","error")}catch{}},exportSettings(){const a=this.getSettingsJSON();this.app.exportConfiguration(a,"settings")},getSettingsJSON(){return{mqtt:this.newMqtt,gateway:this.newGateway,zwave:this.newZwave,backup:this.newBackup,zniffer:this.newZniffer,ui:this.ui}},async editJob(a){const{data:e}=await I.getSnippets(),t=await this.app.confirm(a?"Edit job":"New Job","","info",{width:900,inputs:[{type:"text",key:"name",label:"Name",default:a?a.name:"",rules:[this.rules.required]},{type:"boolean",key:"enabled",label:"Enabled",default:a?a.enabled:!0},{type:"boolean",key:"runOnInit",label:"Run on init",hint:"Run the job on gateway init",default:a?a.runOnInit:!1},{type:"text",key:"cron",label:"Cron string",default:a?a.cron:"0 0 * * *",hint:"Cron string. Default is '0 0 * * *' that means every day at midnight.",rules:[this.rules.validCron]},{type:"list",key:"snippet",label:"Snippets",default:"",items:e,itemText:"name",itemValue:"name",hint:"Select a snippet from library",onChange(n,f){var m;const k=f?(m=e.find(p=>p.name===f))==null?void 0:m.content:"";f&&(n.code=k)}},{type:"code",key:"code",label:"Code",default:a?a.code:"// Example:\n// const { logger, zwaveClient, require } = this\n// const node = driver.controller.nodes.get(35);\n// await node.refreshInfo();\n// logger.info(`Node ${node.id} is ready: ${node.ready}`);",rules:[this.rules.required],hint:`Write the function here. The only arg is:
<code>driver</code>. The function is <code>async</code>.`}],confirmText:a?"Edit":"Add"});t.code&&(delete t.snippet,a?Object.assign(a,t):this.newGateway.jobs.push(t))},async deleteJob(a){const e=this.newGateway.jobs.indexOf(a);e>=0&&await this.app.confirm("Attention","Are you sure you want to delete this item?","alert")&&this.newGateway.jobs.splice(e,1)},editItem(a){this.editedIndex=this.newGateway.values.indexOf(a),this.editedValue=Object.assign({},a),this.dialogValue=!0},async deleteItem(a){const e=this.newGateway.values.indexOf(a);await this.app.confirm("Attention","Are you sure you want to delete this item?","alert")&&this.newGateway.values.splice(e,1)},closeDialog(){this.dialogValue=!1,setTimeout(()=>{this.editedValue=Object.assign({},this.defaultValue),this.editedIndex=-1},300)},deviceName(a){const e=this.devices.find(t=>t.value===a);return e?e.name:a},saveValue(){this.editedIndex>-1?this.newGateway.values.splice(this.editedIndex,1,this.editedValue):this.newGateway.values.push(this.editedValue),this.closeDialog()},async update(){if(await ae(200),this.$refs.form_settings.validate())try{this.saving=!0,$().resetNodes();const a=await I.updateConfig(this.getSettingsJSON());this.saving=!1,this.showSnackbar(a.message,a.success?"success":"error"),this.initSettings(a.data)}catch(a){N.error(a)}else this.showSnackbar("Your configuration contains errors, fix it","error")},resetConfig(){this.newGateway=M(this.gateway),this.newZwave=M(this.zwave),this.newZniffer=M(this.zniffer),this.newMqtt=M(this.mqtt),this.newBackup=M(this.backup),this.prevUi?(this.internalDarkMode=this.prevUi.darkMode,this.internalNavTabs=this.prevUi.navTabs,this.internalStreamerMode=this.prevUi.streamerMode):this.prevUi=M(this.ui)},async getConfig(){try{const a=await I.getConfig();a.success?(this.init(a),this.sslDisabled=a.sslDisabled,this.resetConfig()):(this.showSnackbar("Error while retrieving configuration, check console","error"),N.error(a))}catch(a){this.showSnackbar(a.message,"error"),N.error(a)}}},beforeRouteLeave(a,e,t){this.settingsChanged?this.app.confirm("Attention","You have unsaved changes. Do you really want to leave?","alert").then(n=>{n&&t()}):t()},mounted(){this.$emit("updateStatus"),this.resetConfig(),this.getConfig()}};var ye=function(){var e=this,t=e._self._c;return t("v-container",{staticClass:"pt-8 px-0",attrs:{fluid:"","grid-list-md":""}},[t("v-form",{ref:"form_settings",staticClass:"pb-6 mx-2",attrs:{id:"form_settings"},on:{submit:function(n){return n.preventDefault(),e.update.apply(null,arguments)}},model:{value:e.valid_zwave,callback:function(n){e.valid_zwave=n},expression:"valid_zwave"}},[t("v-expansion-panels",{staticClass:"expansion-panels-outlined",attrs:{accordion:"",multiple:"",flat:""}},[t("v-expansion-panel",{key:"UI"},[t("v-expansion-panel-header",[t("v-row",{attrs:{"no-gutters":""}},[t("v-col",{attrs:{"align-self":"center"}},[e._v(" UI ")]),t("v-col",{staticClass:"text-right pr-5"},[t("v-btn",{attrs:{color:"primary",outlined:"","x-small":""},on:{click:function(n){return n.stopPropagation(),e.openDocs("general")}}},[e._v(" Docs "),t("v-icon",{attrs:{"x-small":"",right:""}},[e._v("launch")])],1)],1)],1)],1),t("v-expansion-panel-content",[t("v-row",{staticClass:"mb-5"},[t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-switch",{attrs:{hint:"Enable dark mode","persistent-hint":"",label:"Dark mode"},model:{value:e.internalDarkMode,callback:function(n){e.internalDarkMode=n},expression:"internalDarkMode"}})],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-switch",{attrs:{hint:"Enable this to use Tabs in the top bar instead of a left menu for navigation (useful when integrated in Home Assistant)","persistent-hint":"",label:"Use tabs for navigation"},model:{value:e.internalNavTabs,callback:function(n){e.internalNavTabs=n},expression:"internalNavTabs"}})],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-switch",{attrs:{hint:"Enable this to hide sensitive informations from the UI","persistent-hint":"",label:"Streamer mode"},model:{value:e.internalStreamerMode,callback:function(n){e.internalStreamerMode=n},expression:"internalStreamerMode"}})],1)],1)],1),t("v-divider")],1),t("v-expansion-panel",{key:"General"},[t("v-expansion-panel-header",[t("v-row",{attrs:{"no-gutters":""}},[t("v-col",{attrs:{"align-self":"center"}},[e._v(" General ")]),t("v-col",{staticClass:"text-right pr-5"},[t("v-btn",{attrs:{color:"primary",outlined:"","x-small":""},on:{click:function(n){return n.stopPropagation(),e.openDocs("general")}}},[e._v(" Docs "),t("v-icon",{attrs:{"x-small":"",right:""}},[e._v("launch")])],1)],1)],1)],1),t("v-expansion-panel-content",[t("v-card",{attrs:{flat:""}},[t("v-card-text",[t("v-row",{staticClass:"mb-5"},[t("v-col",{attrs:{cols:"12",sm:"6",md:"4"}},[t("v-switch",{attrs:{hint:"Enable this to password protect your application. Default username is `admin`, password is `zwave`","persistent-hint":"",label:"Auth"},model:{value:e.newGateway.authEnabled,callback:function(n){e.$set(e.newGateway,"authEnabled",n)},expression:"newGateway.authEnabled"}})],1),e.sslDisabled?e._e():t("v-col",{attrs:{cols:"12",sm:"6",md:"4"}},[t("v-switch",{attrs:{hint:"Enable this to serve page using HTTPS. REQUIRES APP RELOAD","persistent-hint":"",label:"HTTPS"},model:{value:e.newGateway.https,callback:function(n){e.$set(e.newGateway,"https",n)},expression:"newGateway.https"}})],1),t("v-col",{attrs:{cols:"12",sm:"6",md:"4"}},[t("v-combobox",{attrs:{hint:"You can select a plugin from the list or write the path to your custom plugin and press enter","persistent-hint":"",label:"Plugins",items:["@varet/zj2m-prom-exporter","@kvaster/zwavejs-prom"],multiple:"",chips:"","deletable-chips":""},model:{value:e.newGateway.plugins,callback:function(n){e.$set(e.newGateway,"plugins",n)},expression:"newGateway.plugins"}})],1),t("v-col",{attrs:{cols:"12",sm:"6",md:"4"}},[t("v-switch",{attrs:{hint:"Enable logging","persistent-hint":"",label:"Log enabled"},model:{value:e.newGateway.logEnabled,callback:function(n){e.$set(e.newGateway,"logEnabled",n)},expression:"newGateway.logEnabled"}})],1),e.newGateway.logEnabled?t("v-col",{attrs:{cols:"12",sm:"6",md:"4"}},[t("v-select",{attrs:{items:e.logLevels,label:"Log Level"},model:{value:e.newGateway.logLevel,callback:function(n){e.$set(e.newGateway,"logLevel",n)},expression:"newGateway.logLevel"}})],1):e._e(),e.newGateway.logEnabled?t("v-col",{attrs:{cols:"12",sm:"6",md:"4"}},[t("v-switch",{attrs:{hint:"Store logs in a file. Default: store/zwave-js-ui_%DATE%.log","persistent-hint":"",label:"Log to file"},model:{value:e.newGateway.logToFile,callback:function(n){e.$set(e.newGateway,"logToFile",n)},expression:"newGateway.logToFile"}})],1):e._e(),t("v-col",{attrs:{cols:"12",sm:"6",md:"4"}},[t("v-checkbox",{attrs:{"persistent-hint":"",label:"Disable changelogs",hint:"Check this to disable changelogs dialogs on new versions"},model:{value:e.newGateway.disableChangelog,callback:function(n){e.$set(e.newGateway,"disableChangelog",n)},expression:`
newGateway.disableChangelog
`}})],1),t("v-col",{attrs:{cols:"12",sm:"6",md:"4"}},[t("v-checkbox",{attrs:{"persistent-hint":"",label:"Notify new versions",hint:"Check this to show a notification when a new version is available"},model:{value:e.newGateway.notifyNewVersions,callback:function(n){e.$set(e.newGateway,"notifyNewVersions",n)},expression:`
newGateway.notifyNewVersions
`}})],1)],1),t("v-subheader",{staticClass:"font-weight-bold"},[e._v(" Devices values configuration ")]),t("div",{staticClass:"mb-5 caption"},[e._v(" Add here valueIds specific configurations for each device. This means that if you create an entry here this configuration will be applied to each valueId of each device of the same type in your Network. ")]),t("v-data-table",{staticClass:"elevation-1",attrs:{headers:e.visibleHeaders,items:e.newGateway.values,"items-per-page-options":[10,20,{text:"All",value:-1}]},scopedSlots:e._u([{key:"top",fn:function(){return[t("v-btn",{attrs:{color:"blue darken-1",text:""},on:{click:function(n){e.dialogValue=!0}}},[t("v-icon",[e._v("add")]),e._v(" New Value ")],1)]},proxy:!0},{key:"item.device",fn:function({item:n}){return[e._v(" "+e._s(e.deviceName(n.device))+" ")]}},{key:"item.value",fn:function({item:n}){return[e._v(" "+e._s(n.value.label+" ("+n.value.id+")")+" ")]}},{key:"item.topic",fn:function({item:n}){return[e._v(" "+e._s(n.topic)+" ")]}},{key:"item.postOperation",fn:function({item:n}){return[e._v(" "+e._s(n.postOperation||"No operation")+" ")]}},{key:"item.enablePoll",fn:function({item:n}){return[e._v(" "+e._s(n.enablePoll?"Interval: "+n.pollInterval+"s":"No")+" ")]}},{key:"item.actions",fn:function({item:n}){return[t("v-icon",{staticClass:"mr-2",attrs:{small:"",color:"green"},on:{click:function(f){return e.editItem(n)}}},[e._v(" edit ")]),t("v-icon",{attrs:{small:"",color:"red"},on:{click:function(f){return e.deleteItem(n)}}},[e._v(" delete ")])]}}],null,!0)}),t("v-subheader",{staticClass:"font-weight-bold"},[e._v(" Scheduled Jobs ")]),t("div",{staticClass:"mb-5 caption"},[e._v(" Add here a list of scheduled jobs that will run specified driver function based on a cron expression. ")]),t("v-data-table",{staticClass:"elevation-1",attrs:{headers:e.headersJobs,items:e.newGateway.jobs,"items-per-page-options":[10,20,{text:"All",value:-1}]},scopedSlots:e._u([{key:"top",fn:function(){return[t("v-btn",{attrs:{color:"blue darken-1",text:""},on:{click:function(n){return e.editJob()}}},[t("v-icon",[e._v("add")]),e._v(" New Value ")],1)]},proxy:!0},{key:"item.code",fn:function({item:n}){return[t("code",[e._v(e._s(n.code.substring(0,30)))])]}},{key:"item.enabled",fn:function({item:n}){return[t("v-icon",{attrs:{color:n.enabled?"green":"red"}},[e._v(" "+e._s(n.enabled?"check_circle":"cancel")+" ")])]}},{key:"item.runOnInit",fn:function({item:n}){return[t("v-icon",{attrs:{color:n.runOnInit?"green":"red"}},[e._v(" "+e._s(n.runOnInit?"check_circle":"cancel")+" ")])]}},{key:"item.actions",fn:function({item:n}){return[t("v-icon",{staticClass:"mr-2",attrs:{small:"",color:"green"},on:{click:function(f){return e.editJob(n)}}},[e._v(" edit ")]),t("v-icon",{attrs:{small:"",color:"red"},on:{click:function(f){return e.deleteJob(n)}}},[e._v(" delete ")])]}}],null,!0)})],1)],1)],1),t("v-divider")],1),t("v-expansion-panel",{key:"Backup"},[t("v-expansion-panel-header",[t("v-row",{attrs:{"no-gutters":""}},[t("v-col",{attrs:{"align-self":"center"}},[e._v(" Backup ")]),t("v-col",{staticClass:"text-right pr-5"},[t("v-btn",{attrs:{color:"primary",outlined:"","x-small":""},on:{click:function(n){return n.stopPropagation(),e.openDocs("backup")}}},[e._v(" Docs "),t("v-icon",{attrs:{"x-small":"",right:""}},[e._v("launch")])],1)],1)],1)],1),t("v-expansion-panel-content",[t("v-subheader",[t("strong",[e._v("STORE")])]),t("v-row",{staticClass:"mb-5"},[t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-switch",{attrs:{hint:"Enable/Disable backup","persistent-hint":"",label:"Backup"},model:{value:e.newBackup.storeBackup,callback:function(n){e.$set(e.newBackup,"storeBackup",n)},expression:"newBackup.storeBackup"}})],1),e.newBackup.storeBackup?t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{hint:"Cron string. Default is '0 0 * * *' that means every day at midnight. Press on help button for cron helper editor","persistent-hint":"","append-icon":"help",label:"Cron",rules:[e.rules.required,e.rules.validCron]},on:{"click:append":function(n){e.openUrl("https://crontab.guru/#"+e.newBackup.storeCron.split(" ").join("_"))}},model:{value:e.newBackup.storeCron,callback:function(n){e.$set(e.newBackup,"storeCron",n)},expression:"newBackup.storeCron"}}),t("strong",[e._v(e._s(e.parseCron(e.newBackup.storeCron)||""))])],1):e._e(),e.newBackup.storeBackup?t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{hint:"How many backups to keep","persistent-hint":"",rules:[e.rules.required,e.rules.positive],label:"Max backup files"},model:{value:e.newBackup.storeKeep,callback:function(n){e.$set(e.newBackup,"storeKeep",e._n(n))},expression:"newBackup.storeKeep"}})],1):e._e()],1),t("v-divider"),t("v-subheader",[t("strong",[e._v("Controller (NVM) Backup")])]),t("v-alert",{attrs:{dense:"",text:"",type:"warning"}},[e._v(" Some 700 series controllers may stop functioning properly after an NVM backup. Z-Wave JS will try to restart (soft reset) the controller afterwards to restore normal operation. If that does not work, the controller will have to be re-plugged manually. ")]),t("v-row",{staticClass:"mb-5"},[t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-switch",{attrs:{hint:"Enable/Disable backup before node add/remove/replace operations.","persistent-hint":"",label:"Backup on event"},model:{value:e.newBackup.nvmBackupOnEvent,callback:function(n){e.$set(e.newBackup,"nvmBackupOnEvent",n)},expression:"newBackup.nvmBackupOnEvent"}})],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-switch",{attrs:{hint:"Enable/Disable backup","persistent-hint":"",label:"Backup"},model:{value:e.newBackup.nvmBackup,callback:function(n){e.$set(e.newBackup,"nvmBackup",n)},expression:"newBackup.nvmBackup"}})],1),e.newBackup.nvmBackup?t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{hint:"Cron string. Default is '0 0 * * *' that means every day at midnight. Press on help button for cron helper editor","persistent-hint":"","append-icon":"help",label:"Cron",rules:[e.rules.required,e.rules.validCron]},on:{"click:append":function(n){e.openUrl("https://crontab.guru/#"+e.newBackup.nvmCron.split(" ").join("_"))}},model:{value:e.newBackup.nvmCron,callback:function(n){e.$set(e.newBackup,"nvmCron",n)},expression:"newBackup.nvmCron"}}),t("strong",[e._v(e._s(e.parseCron(e.newBackup.nvmCron)||""))])],1):e._e(),e.newBackup.nvmBackup?t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{hint:"How many backups to keep","persistent-hint":"",rules:[e.rules.required,e.rules.positive],label:"Max backup files"},model:{value:e.newBackup.nvmKeep,callback:function(n){e.$set(e.newBackup,"nvmKeep",e._n(n))},expression:"newBackup.nvmKeep"}})],1):e._e()],1)],1),t("v-divider")],1),t("v-expansion-panel",{key:"Zwave"},[t("v-expansion-panel-header",[t("v-row",{attrs:{"no-gutters":""}},[t("v-col",{attrs:{"align-self":"center"}},[t("v-row",{attrs:{"align-self":"center"}},[t("span",{staticClass:"my-auto ml-3"},[e._v(" Z-Wave ")]),t("v-checkbox",{staticClass:"mt-0 ml-2",attrs:{"hide-details":"",label:"Enabled"},on:{click:function(n){n.stopPropagation()}},model:{value:e.newZwave.enabled,callback:function(n){e.$set(e.newZwave,"enabled",n)},expression:"newZwave.enabled"}})],1)],1),t("v-col",{staticClass:"text-right pr-5"},[t("v-btn",{attrs:{color:"primary",outlined:"","x-small":""},on:{click:function(n){return n.stopPropagation(),e.openDocs("zwave")}}},[e._v(" Docs "),t("v-icon",{attrs:{"x-small":"",right:""}},[e._v("launch")])],1)],1)],1)],1),e.newZwave.enabled?t("v-expansion-panel-content",[t("v-card",{attrs:{flat:""}},[t("v-card-text",[t("v-row",[t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-combobox",{attrs:{label:"Serial Port",hint:"Ex /dev/ttyUSB0. If your port is not listed here just write the port path here","persistent-hint":"",rules:[e.rules.required,e.differentPorts],required:"",items:e.serial_ports},model:{value:e.newZwave.port,callback:function(n){e.$set(e.newZwave,"port",n)},expression:"newZwave.port"}})],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{label:"Config priority directory",hint:"Directory from where device configuration files can be loaded with higher priority than the included ones. This directory does not get indexed and should be used sparingly, e.g. when custom files are absolutely necessary or for testing",required:""},model:{value:e.newZwave.deviceConfigPriorityDir,callback:function(n){e.$set(e.newZwave,"deviceConfigPriorityDir",typeof n=="string"?n.trim():n)},expression:`
newZwave.deviceConfigPriorityDir
`}})],1),e.newZwave.securityKeys?t("v-row",{staticClass:"mt-0"},[t("v-col",{attrs:{cols:"12"}},[t("v-subheader",{staticClass:"font-weight-bold primary--text"},[e._v(" Security Keys ")])],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{label:"S2 Unauthenticated","prepend-icon":"vpn_key",rules:[e.rules.validKey,e.rules.validLength,e.differentKeys(e.newZwave.securityKeys)],"persistent-hint":"","append-outer-icon":"wifi_protected_setup",type:e.streamerMode?"password":"text"},on:{paste:function(n){return e.fixKey(n,"S2_Unauthenticated",e.newZwave.securityKeys)},"click:append-outer":function(n){return e.randomKey("S2_Unauthenticated",e.newZwave.securityKeys)}},model:{value:e.newZwave.securityKeys.S2_Unauthenticated,callback:function(n){e.$set(e.newZwave.securityKeys,"S2_Unauthenticated",n)},expression:`
newZwave.securityKeys
.S2_Unauthenticated
`}})],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{"prepend-icon":"vpn_key",label:"S2 Authenticated","persistent-hint":"",rules:[e.rules.validKey,e.rules.validLength,e.differentKeys(e.newZwave.securityKeys)],"append-outer-icon":"wifi_protected_setup",type:e.streamerMode?"password":"text"},on:{paste:function(n){return e.fixKey(n,"S2_Authenticated",e.newZwave.securityKeys)},"click:append-outer":function(n){return e.randomKey("S2_Authenticated",e.newZwave.securityKeys)}},model:{value:e.newZwave.securityKeys.S2_Authenticated,callback:function(n){e.$set(e.newZwave.securityKeys,"S2_Authenticated",n)},expression:`
newZwave.securityKeys
.S2_Authenticated
`}})],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{"prepend-icon":"vpn_key",label:"S2 Access Control",rules:[e.rules.validKey,e.rules.validLength,e.differentKeys(e.newZwave.securityKeys)],"append-outer-icon":"wifi_protected_setup",type:e.streamerMode?"password":"text"},on:{paste:function(n){return e.fixKey(n,"S2_AccessControl",e.newZwave.securityKeys)},"click:append-outer":function(n){return e.randomKey("S2_AccessControl",e.newZwave.securityKeys)}},model:{value:e.newZwave.securityKeys.S2_AccessControl,callback:function(n){e.$set(e.newZwave.securityKeys,"S2_AccessControl",n)},expression:`
newZwave.securityKeys
.S2_AccessControl
`}})],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{"prepend-icon":"vpn_key",label:"S0 Legacy",rules:[e.rules.validKey,e.rules.validLength,e.differentKeys(e.newZwave.securityKeys)],"append-outer-icon":"wifi_protected_setup",type:e.streamerMode?"password":"text"},on:{paste:function(n){return e.fixKey(n,"S0_Legacy")},"click:append-outer":function(n){return e.randomKey("S0_Legacy",e.newZwave.securityKeys)}},model:{value:e.newZwave.securityKeys.S0_Legacy,callback:function(n){e.$set(e.newZwave.securityKeys,"S0_Legacy",n)},expression:`
newZwave.securityKeys
.S0_Legacy
`}})],1)],1):e._e(),e.newZwave.securityKeysLongRange?t("v-row",{staticClass:"mt-0"},[t("v-col",{attrs:{cols:"12"}},[t("v-subheader",{staticClass:"font-weight-bold primary--text"},[e._v(" Security Keys (Long Range) ")])],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{"prepend-icon":"vpn_key",label:"S2 Authenticated","persistent-hint":"",rules:[e.rules.validKey,e.rules.validLength,e.differentKeys(e.newZwave.securityKeysLongRange)],"append-outer-icon":"wifi_protected_setup",type:e.streamerMode?"password":"text"},on:{paste:function(n){return e.fixKey(n,"S2_Authenticated",e.newZwave.securityKeysLongRange)},"click:append-outer":function(n){return e.randomKey("S2_Authenticated",e.newZwave.securityKeysLongRange)}},model:{value:e.newZwave.securityKeysLongRange.S2_Authenticated,callback:function(n){e.$set(e.newZwave.securityKeysLongRange,"S2_Authenticated",n)},expression:`
newZwave
.securityKeysLongRange
.S2_Authenticated
`}})],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{"prepend-icon":"vpn_key",label:"S2 Access Control",rules:[e.rules.validKey,e.rules.validLength,e.differentKeys(e.newZwave.securityKeysLongRange)],"append-outer-icon":"wifi_protected_setup",type:e.streamerMode?"password":"text"},on:{paste:function(n){return e.fixKey(n,"S2_AccessControl",e.newZwave.securityKeysLongRange)},"click:append-outer":function(n){return e.randomKey("S2_AccessControl",e.newZwave.securityKeysLongRange)}},model:{value:e.newZwave.securityKeysLongRange.S2_AccessControl,callback:function(n){e.$set(e.newZwave.securityKeysLongRange,"S2_AccessControl",n)},expression:`
newZwave
.securityKeysLongRange
.S2_AccessControl
`}})],1)],1):e._e(),t("v-row",{staticClass:"mt-0"},[t("v-col",{staticClass:"mb-n8",attrs:{cols:"12"}},[t("v-subheader",{staticClass:"font-weight-bold primary--text mb-0"},[e._v(" Default Radio configuration ")])],1),t("v-col",{attrs:{cols:"6"}},[t("v-select",{attrs:{label:"RF Region","persistent-hint":"",hint:"Will be applied on every startup if the current region of your Z-Wave controller differs. Leave this empty to use the default region of your stick. Not all controllers support changing the region.",items:e.rfRegions,clearable:""},model:{value:e.newZwave.rf.region,callback:function(n){e.$set(e.newZwave.rf,"region",n)},expression:"newZwave.rf.region"}})],1),t("v-col",{attrs:{cols:"6"}},[t("v-select",{attrs:{label:"Maximum LR Power Level","persistent-hint":"",hint:"The maximum power level to be used by the dynamic power algorithm of Z-Wave LR. Will be applied on every startup if the current setting of your Z-Wave controller differs. Only LR-capable controllers support this setting.",items:e.maxLRPowerLevels,clearable:""},model:{value:e.newZwave.rf.maxLongRangePowerlevel,callback:function(n){e.$set(e.newZwave.rf,"maxLongRangePowerlevel",n)},expression:`
newZwave.rf
.maxLongRangePowerlevel
`}})],1)],1),t("v-row",{staticClass:"mt-0"},[t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{label:"Normal Power Level","persistent-hint":"",min:-10,max:20,step:.1,hint:"Power level in dBm. Min -10, Max +14 or +20, depending on the Z-Wave chip. Will be applied on every startup if the current setting of your Z-Wave controller differs. Not all controllers support changing the powerlevel.",suffix:"dBm",type:"number",rules:[e.validTxPower]},model:{value:e.newZwave.rf.txPower.powerlevel,callback:function(n){e.$set(e.newZwave.rf.txPower,"powerlevel",e._n(n))},expression:`
newZwave.rf.txPower
.powerlevel
`}})],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{label:"Measured output power at 0 dBm","persistent-hint":"",min:-10,max:10,step:.1,hint:"Measured output power at 0 dBm in dBm. Min -10, Max +10. Will be applied on every startup if the current setting of your Z-Wave controller differs. Not all controllers support changing the powerlevel.",suffix:"dBm",type:"number",rules:[e.validTxPower]},model:{value:e.newZwave.rf.txPower.measured0dBm,callback:function(n){e.$set(e.newZwave.rf.txPower,"measured0dBm",e._n(n))},expression:`
newZwave.rf.txPower
.measured0dBm
`}})],1)],1),t("v-row",{staticClass:"mt-0"},[t("v-col",{staticClass:"mb-n8",attrs:{cols:"12"}},[t("v-subheader",{staticClass:"font-weight-bold primary--text mb-0"},[e._v(" Driver logs ")])],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-switch",{attrs:{hint:"Required for debugging issue reports","persistent-hint":"",label:"Enable driver logs"},model:{value:e.newZwave.logEnabled,callback:function(n){e.$set(e.newZwave,"logEnabled",n)},expression:"newZwave.logEnabled"}})],1),e.newZwave.logEnabled?t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-select",{attrs:{items:e.logLevels,label:"Log Level"},model:{value:e.newZwave.logLevel,callback:function(n){e.$set(e.newZwave,"logLevel",n)},expression:"newZwave.logLevel"}})],1):e._e(),e.newZwave.logEnabled?t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-switch",{attrs:{hint:"Store zwave logs in a file (stored in store folder)","persistent-hint":"",label:"Log to file"},model:{value:e.newZwave.logToFile,callback:function(n){e.$set(e.newZwave,"logToFile",n)},expression:"newZwave.logToFile"}})],1):e._e(),e.newZwave.logEnabled?t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{label:"Max files",rules:[e.rules.required],required:"","persistent-hint":"",hint:"Maximum number of log files to keep",type:"number"},model:{value:e.newZwave.maxFiles,callback:function(n){e.$set(e.newZwave,"maxFiles",e._n(n))},expression:`
newZwave.maxFiles
`}})],1):e._e(),e.newZwave.logEnabled?t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-combobox",{attrs:{hint:"Choose which nodes to log. Leave this empty to log all nodes","persistent-hint":"",label:"Log nodes",items:e.newZwave.nodeFilter||[],multiple:"",rules:[e.rules.validNodeLog],chips:"","deletable-chips":""},model:{value:e.newZwave.nodeFilter,callback:function(n){e.$set(e.newZwave,"nodeFilter",n)},expression:"newZwave.nodeFilter"}})],1):e._e()],1),t("v-row",{staticClass:"mt-0"},[t("v-col",{staticClass:"mb-n8",attrs:{cols:"12"}},[t("v-subheader",{staticClass:"font-weight-bold primary--text mb-0"},[e._v(" Startup and recovery behavior ")])],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-switch",{attrs:{label:"Soft Reset",hint:"Soft Reset is required after some commands like changing the RF region or restoring an NVM backup. Because it may cause problems in Docker containers with certain Z-Wave sticks, this functionality may be disabled. NB: Disabling this functionality only affects 500 series and older controllers","persistent-hint":""},model:{value:e.newZwave.enableSoftReset,callback:function(n){e.$set(e.newZwave,"enableSoftReset",n)},expression:`
newZwave.enableSoftReset
`}})],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-switch",{attrs:{hint:"Enable this to start driver in bootloader only mode, useful to recover sticks when an FW upgrade fails. When this is enabled stick will NOT be able to communicate with the network.","persistent-hint":"",label:"Bootloader only"},model:{value:e.newZwave.allowBootloaderOnly,callback:function(n){e.$set(e.newZwave,"allowBootloaderOnly",n)},expression:`
newZwave.allowBootloaderOnly
`}})],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("inverted-checkbox",{attrs:{hint:"When disabled, commands will simply fail when the controller is unresponsive and nodes may get randomly marked as dead until the controller recovers on its own.","persistent-hint":"",label:"Controller recovery"},model:{value:e.newZwave.disableControllerRecovery,callback:function(n){e.$set(e.newZwave,"disableControllerRecovery",n)},expression:`
newZwave.disableControllerRecovery
`}})],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("inverted-checkbox",{attrs:{"persistent-hint":"",label:"Watchdog",hint:"Controllers of the 700 series and newer have a hardware watchdog that can be enabled to automatically reset the chip in case it becomes unresponsive. This option controls whether the watchdog should be enabled"},model:{value:e.newZwave.disableWatchdog,callback:function(n){e.$set(e.newZwave,"disableWatchdog",n)},expression:`
newZwave.disableWatchdog
`}})],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{label:"Response timeout",required:"","persistent-hint":"",suffix:"ms",hint:"How long to wait for a controller response. Leave blank to use default (10000ms)",type:"number"},model:{value:e.newZwave.responseTimeout,callback:function(n){e.$set(e.newZwave,"responseTimeout",e._n(n))},expression:`
newZwave.responseTimeout
`}})],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-checkbox",{attrs:{hint:"This can help with the inclusion or interview of some devices, but can also slow down communication a lot.","persistent-hint":"",label:"Increase node report timeout"},model:{value:e.newZwave.higherReportsTimeout,callback:function(n){e.$set(e.newZwave,"higherReportsTimeout",n)},expression:`
newZwave.higherReportsTimeout
`}})],1)],1),t("v-row",{staticClass:"mt-0"},[t("v-col",{staticClass:"mb-n8",attrs:{cols:"12"}},[t("v-subheader",{staticClass:"font-weight-bold primary--text mb-0"},[e._v(" Misc settings ")])],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-switch",{attrs:{hint:"Usage statistics allows us to gain insight how `zwave-js` is used, which manufacturers and devices are most prevalent and where to best focus our efforts in order to improve `zwave-js` the most. We do not store any personal information. Details can be found under https://zwave-js.github.io/node-zwave-js/#/data-collection/data-collection?id=usage-statistics","persistent-hint":"",label:"Enable statistics"},model:{value:e.newZwave.enableStatistics,callback:function(n){e.$set(e.newZwave,"enableStatistics",n)},expression:`
newZwave.enableStatistics
`}})],1),t("input",{attrs:{type:"hidden"},domProps:{value:e.newZwave.disclaimerVersion}}),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-autocomplete",{attrs:{hint:"Select preferred sensors scales. You can select a scale For more info check https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json","persistent-hint":"",label:"Preferred scales",items:e.filteredScales,multiple:"","item-text":e.scaleName,rules:[e.rules.uniqueSensorType],chips:"","return-object":"","deletable-chips":""},scopedSlots:e._u([{key:"item",fn:function({item:n,attrs:f,on:k}){return[t("v-list-item",e._g(e._b({attrs:{"two-line":""}},"v-list-item",f,!1),k),[t("v-list-item-content",[t("v-list-item-title",[e._v(e._s(e.scaleName(n)))]),t("v-list-item-subtitle",[e._v(e._s(n.description||""))])],1)],1)]}}],null,!1,514099446),model:{value:e.newZwave.scales,callback:function(n){e.$set(e.newZwave,"scales",n)},expression:"newZwave.scales"}})],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{label:"Inclusion/Exclusion timeout",rules:[e.rules.required],required:"",suffix:"seconds",hint:"Seconds to wait before to stop inclusion/exclusion mode",type:"number"},model:{value:e.newZwave.commandsTimeout,callback:function(n){e.$set(e.newZwave,"commandsTimeout",e._n(n))},expression:`
newZwave.commandsTimeout
`}})],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{label:"Send to sleep timeout",required:"","persistent-hint":"",suffix:"ms",hint:"How long to wait without pending commands before sending a node back to sleep. Leave blank to use default (250ms)",type:"number"},model:{value:e.newZwave.sendToSleepTimeout,callback:function(n){e.$set(e.newZwave,"sendToSleepTimeout",e._n(n))},expression:`
newZwave.sendToSleepTimeout
`}})],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{label:"Node events queue size",rules:[e.rules.required],required:"",hint:"Each node stores a queue of events. This is the maximum size of the queue",type:"number"},model:{value:e.newZwave.maxNodeEventsQueueSize,callback:function(n){e.$set(e.newZwave,"maxNodeEventsQueueSize",e._n(n))},expression:`
newZwave.maxNodeEventsQueueSize
`}})],1)],1),t("input",{attrs:{type:"hidden"},domProps:{value:e.newZwave.options}})],1)],1)],1)],1):e._e(),t("v-divider")],1),t("v-expansion-panel",{key:"Zniffer"},[t("v-expansion-panel-header",[t("v-row",{attrs:{"no-gutters":""}},[t("v-col",{attrs:{"align-self":"center"}},[t("v-row",{attrs:{"align-self":"center"}},[t("span",{staticClass:"my-auto ml-3"},[e._v(" Zniffer ")]),t("v-checkbox",{staticClass:"mt-0 ml-2",attrs:{"hide-details":"",label:"Enabled"},on:{click:function(n){n.stopPropagation()}},model:{value:e.newZniffer.enabled,callback:function(n){e.$set(e.newZniffer,"enabled",n)},expression:"newZniffer.enabled"}})],1)],1),t("v-col",{staticClass:"text-right pr-5"},[t("v-btn",{attrs:{color:"primary",outlined:"","x-small":""},on:{click:function(n){return n.stopPropagation(),e.openDocs("zniffer")}}},[e._v(" Docs "),t("v-icon",{attrs:{"x-small":"",right:""}},[e._v("launch")])],1)],1)],1)],1),e.newZniffer.enabled?t("v-expansion-panel-content",[t("v-card",{attrs:{flat:""}},[t("v-card-text",[t("v-row",[t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-combobox",{attrs:{label:"Serial Port",hint:"Ex /dev/ttyUSB0. If your port is not listed here just write the port path here","persistent-hint":"",rules:[e.rules.required,e.differentPorts],required:"",items:e.serial_ports},model:{value:e.newZniffer.port,callback:function(n){e.$set(e.newZniffer,"port",n)},expression:"newZniffer.port"}})],1),e.newZniffer.securityKeys?t("v-row",{staticClass:"mt-0"},[t("v-col",{attrs:{cols:"12"}},[t("v-subheader",{staticClass:"font-weight-bold primary--text"},[e._v(" Security Keys "),t("v-btn",{staticClass:"ml-2",attrs:{small:"",outlined:"",color:"warning"},on:{click:function(n){return e.copyKeysZniffer()}}},[e._v(" Copy from Driver ")])],1)],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{label:"S2 Unauthenticated","prepend-icon":"vpn_key",rules:[e.rules.validKey,e.rules.validLength,e.differentKeys(e.newZniffer.securityKeys)],"persistent-hint":"","append-outer-icon":"wifi_protected_setup",type:e.streamerMode?"password":"text"},on:{paste:function(n){return e.fixKey(n,"S2_Unauthenticated",e.newZniffer.securityKeys)},"click:append-outer":function(n){return e.randomKey("S2_Unauthenticated",e.newZniffer.securityKeys)}},model:{value:e.newZniffer.securityKeys.S2_Unauthenticated,callback:function(n){e.$set(e.newZniffer.securityKeys,"S2_Unauthenticated",n)},expression:`
newZniffer.securityKeys
.S2_Unauthenticated
`}})],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{"prepend-icon":"vpn_key",label:"S2 Authenticated","persistent-hint":"",rules:[e.rules.validKey,e.rules.validLength,e.differentKeys(e.newZniffer.securityKeys)],"append-outer-icon":"wifi_protected_setup",type:e.streamerMode?"password":"text"},on:{paste:function(n){return e.fixKey(n,"S2_Authenticated",e.newZniffer.securityKeys)},"click:append-outer":function(n){return e.randomKey("S2_Authenticated",e.newZniffer.securityKeys)}},model:{value:e.newZniffer.securityKeys.S2_Authenticated,callback:function(n){e.$set(e.newZniffer.securityKeys,"S2_Authenticated",n)},expression:`
newZniffer.securityKeys
.S2_Authenticated
`}})],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{"prepend-icon":"vpn_key",label:"S2 Access Control",rules:[e.rules.validKey,e.rules.validLength,e.differentKeys(e.newZniffer.securityKeys)],"append-outer-icon":"wifi_protected_setup",type:e.streamerMode?"password":"text"},on:{paste:function(n){return e.fixKey(n,"S2_AccessControl",e.newZniffer.securityKeys)},"click:append-outer":function(n){return e.randomKey("S2_AccessControl",e.newZniffer.securityKeys)}},model:{value:e.newZniffer.securityKeys.S2_AccessControl,callback:function(n){e.$set(e.newZniffer.securityKeys,"S2_AccessControl",n)},expression:`
newZniffer.securityKeys
.S2_AccessControl
`}})],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{"prepend-icon":"vpn_key",label:"S0 Legacy",rules:[e.rules.validKey,e.rules.validLength,e.differentKeys(e.newZniffer.securityKeys)],"append-outer-icon":"wifi_protected_setup",type:e.streamerMode?"password":"text"},on:{paste:function(n){return e.fixKey(n,"S0_Legacy")},"click:append-outer":function(n){return e.randomKey("S0_Legacy",e.newZniffer.securityKeys)}},model:{value:e.newZniffer.securityKeys.S0_Legacy,callback:function(n){e.$set(e.newZniffer.securityKeys,"S0_Legacy",n)},expression:`
newZniffer.securityKeys
.S0_Legacy
`}})],1)],1):e._e(),e.newZniffer.securityKeysLongRange?t("v-row",{staticClass:"mt-0"},[t("v-col",{attrs:{cols:"12"}},[t("v-subheader",{staticClass:"font-weight-bold primary--text"},[e._v(" Security Keys (Long Range) ")])],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{"prepend-icon":"vpn_key",label:"S2 Authenticated","persistent-hint":"",rules:[e.rules.validKey,e.rules.validLength,e.differentKeys(e.newZniffer.securityKeysLongRange)],"append-outer-icon":"wifi_protected_setup",type:e.streamerMode?"password":"text"},on:{paste:function(n){return e.fixKey(n,"S2_Authenticated",e.newZniffer.securityKeysLongRange)},"click:append-outer":function(n){return e.randomKey("S2_Authenticated",e.newZniffer.securityKeysLongRange)}},model:{value:e.newZniffer.securityKeysLongRange.S2_Authenticated,callback:function(n){e.$set(e.newZniffer.securityKeysLongRange,"S2_Authenticated",n)},expression:`
newZniffer
.securityKeysLongRange
.S2_Authenticated
`}})],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{"prepend-icon":"vpn_key",label:"S2 Access Control",rules:[e.rules.validKey,e.rules.validLength,e.differentKeys(e.newZniffer.securityKeysLongRange)],"append-outer-icon":"wifi_protected_setup",type:e.streamerMode?"password":"text"},on:{paste:function(n){return e.fixKey(n,"S2_AccessControl",e.newZniffer.securityKeysLongRange)},"click:append-outer":function(n){return e.randomKey("S2_AccessControl",e.newZniffer.securityKeysLongRange)}},model:{value:e.newZniffer.securityKeysLongRange.S2_AccessControl,callback:function(n){e.$set(e.newZniffer.securityKeysLongRange,"S2_AccessControl",n)},expression:`
newZniffer
.securityKeysLongRange
.S2_AccessControl
`}})],1)],1):e._e(),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-switch",{attrs:{hint:"The RSSI values reported by the Zniffer are not actual RSSI values. They can be converted to dBm, but the conversion is chip dependent and not documented for 700/800 series Zniffers. Set this option to `true` enable the conversion. Otherwise the raw values from the Zniffer will be used.","persistent-hint":"",label:"Convert RSSI"},model:{value:e.newZniffer.convertRSSI,callback:function(n){e.$set(e.newZniffer,"convertRSSI",n)},expression:"newZniffer.convertRSSI"}})],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-select",{attrs:{label:"Default frequency","persistent-hint":"",hint:"The frequency to initialize the Zniffer with. If not specified, the current setting will be kept.",items:e.znifferRegions,clearable:""},model:{value:e.newZniffer.defaultFrequency,callback:function(n){e.$set(e.newZniffer,"defaultFrequency",n)},expression:`
newZniffer.defaultFrequency
`}})],1),t("v-col",{attrs:{cols:"12"}}),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-switch",{attrs:{hint:"Enable zniffer logging","persistent-hint":"",label:"Log Enabled"},model:{value:e.newZniffer.logEnabled,callback:function(n){e.$set(e.newZniffer,"logEnabled",n)},expression:"newZniffer.logEnabled"}})],1),e.newZniffer.logEnabled?t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-select",{attrs:{items:e.logLevels,label:"Log Level"},model:{value:e.newZniffer.logLevel,callback:function(n){e.$set(e.newZniffer,"logLevel",n)},expression:"newZniffer.logLevel"}})],1):e._e(),e.newZniffer.logEnabled?t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-switch",{attrs:{hint:"Store zniffer logs in a file (stored in store folder)","persistent-hint":"",label:"Log to file"},model:{value:e.newZniffer.logToFile,callback:function(n){e.$set(e.newZniffer,"logToFile",n)},expression:"newZniffer.logToFile"}})],1):e._e(),e.newZniffer.logEnabled?t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{label:"Max files",rules:[e.rules.required],required:"","persistent-hint":"",hint:"Maximum number of log files to keep",type:"number"},model:{value:e.newZniffer.maxFiles,callback:function(n){e.$set(e.newZniffer,"maxFiles",e._n(n))},expression:"newZniffer.maxFiles"}})],1):e._e(),e.newZniffer.logEnabled?t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-combobox",{attrs:{hint:"Choose which nodes to log. Leave this empty to log all nodes","persistent-hint":"",label:"Log nodes",items:e.newZniffer.nodeFilter||[],multiple:"",rules:[e.rules.validNodeLog],chips:"","deletable-chips":""},model:{value:e.newZniffer.nodeFilter,callback:function(n){e.$set(e.newZniffer,"nodeFilter",n)},expression:"newZniffer.nodeFilter"}})],1):e._e()],1)],1)],1)],1):e._e()],1)],1),t("v-col",{staticClass:"ml-1",attrs:{cols:"12",sm:"6"}},[t("inverted-checkbox",{attrs:{"persistent-hint":"",label:"MQTT Gateway",hint:"Enable MQTT gateway"},model:{value:e.newMqtt.disabled,callback:function(n){e.$set(e.newMqtt,"disabled",n)},expression:"newMqtt.disabled"}})],1),t("v-expansion-panels",{staticClass:"expansion-panels-outlined",attrs:{accordion:"",multiple:"",flat:""}},[e.newMqtt.disabled?e._e():t("v-expansion-panel",{key:"mqtt"},[t("v-expansion-panel-header",[t("v-row",{attrs:{"no-gutters":""}},[t("v-col",{attrs:{"align-self":"center"}},[e._v(" MQTT ")]),t("v-col",{staticClass:"text-right pr-5"},[t("v-btn",{attrs:{color:"primary",outlined:"","x-small":""},on:{click:function(n){return n.stopPropagation(),e.openDocs("mqtt")}}},[e._v(" Docs "),t("v-icon",{attrs:{"x-small":"",right:""}},[e._v("launch")])],1)],1)],1)],1),t("v-expansion-panel-content",[t("v-card",{attrs:{flat:""}},[t("v-card-text",[t("v-row",[t("v-col",{attrs:{cols:"12",sm:"6",md:"4"}},[t("v-text-field",{attrs:{label:"Name",rules:[e.rules.required,e.rules.validName],hint:"Unique name that identify this gateway",required:""},model:{value:e.newMqtt.name,callback:function(n){e.$set(e.newMqtt,"name",typeof n=="string"?n.trim():n)},expression:"newMqtt.name"}})],1),t("v-col",{attrs:{cols:"12",sm:"6",md:"4"}},[t("v-text-field",{attrs:{label:"Host url",rules:[e.rules.required],hint:"The host url",required:""},model:{value:e.newMqtt.host,callback:function(n){e.$set(e.newMqtt,"host",typeof n=="string"?n.trim():n)},expression:"newMqtt.host"}})],1),t("v-col",{attrs:{cols:"12",sm:"6",md:"4"}},[t("v-text-field",{attrs:{label:"Port",rules:[e.rules.required],hint:"Host Port",required:"",type:"number"},model:{value:e.newMqtt.port,callback:function(n){e.$set(e.newMqtt,"port",e._n(n))},expression:"newMqtt.port"}})],1),t("v-col",{attrs:{cols:"12",sm:"6",md:"4"}},[t("v-text-field",{attrs:{label:"Reconnect period (ms)",hint:"Reconnection period",rules:[e.rules.required],required:"",type:"number"},model:{value:e.newMqtt.reconnectPeriod,callback:function(n){e.$set(e.newMqtt,"reconnectPeriod",e._n(n))},expression:`
newMqtt.reconnectPeriod
`}})],1),t("v-col",{attrs:{cols:"12",sm:"6",md:"4"}},[t("v-text-field",{attrs:{label:"Prefix",rules:[e.rules.required,e.rules.validPrefix],hint:"The prefix to add to each topic",required:""},model:{value:e.newMqtt.prefix,callback:function(n){e.$set(e.newMqtt,"prefix",typeof n=="string"?n.trim():n)},expression:"newMqtt.prefix"}})],1),t("v-col",{attrs:{cols:"12",sm:"6",md:"4"}},[t("v-select",{attrs:{label:"QoS",rules:[e.rules.required],required:"",items:[0,1,2]},model:{value:e.newMqtt.qos,callback:function(n){e.$set(e.newMqtt,"qos",n)},expression:"newMqtt.qos"}})],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-switch",{attrs:{hint:"Set retain flag to true for outgoing messages","persistent-hint":"",label:"Retain"},model:{value:e.newMqtt.retain,callback:function(n){e.$set(e.newMqtt,"retain",n)},expression:"newMqtt.retain"}})],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-switch",{attrs:{hint:"If true the client does not have a persistent session and all information are lost when the client disconnects for any reason","persistent-hint":"",label:"Clean"},model:{value:e.newMqtt.clean,callback:function(n){e.$set(e.newMqtt,"clean",n)},expression:"newMqtt.clean"}})],1),t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-switch",{attrs:{hint:"Enable persistent storage of packets (QoS > 0) while client is offline. If disabled the in memory store will be used.","persistent-hint":"",label:"Store"},model:{value:e.newMqtt.store,callback:function(n){e.$set(e.newMqtt,"store",n)},expression:"newMqtt.store"}})],1),e.secure?t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-switch",{attrs:{hint:"Enable this when using self signed certificates","persistent-hint":"",label:"Allow self signed certs"},model:{value:e.newMqtt.allowSelfsigned,callback:function(n){e.$set(e.newMqtt,"allowSelfsigned",n)},expression:"newMqtt.allowSelfsigned"}})],1):e._e(),e.secure?t("v-col",{attrs:{cols:"12",sm:"6",md:"4"}},[t("file-input",{attrs:{label:"Key.pem",keyProp:"_key"},on:{onFileSelect:e.onFileSelect},model:{value:e.newMqtt.key,callback:function(n){e.$set(e.newMqtt,"key",n)},expression:"newMqtt.key"}})],1):e._e(),e.secure?t("v-col",{attrs:{cols:"12",sm:"6",md:"4"}},[t("file-input",{attrs:{label:"Cert.pem",keyProp:"_cert"},on:{onFileSelect:e.onFileSelect},model:{value:e.newMqtt.cert,callback:function(n){e.$set(e.newMqtt,"cert",n)},expression:"newMqtt.cert"}})],1):e._e(),e.secure?t("v-col",{attrs:{cols:"12",sm:"6",md:"4"}},[t("file-input",{attrs:{label:"Ca.pem",keyProp:"_ca"},on:{onFileSelect:e.onFileSelect},model:{value:e.newMqtt.ca,callback:function(n){e.$set(e.newMqtt,"ca",n)},expression:"newMqtt.ca"}})],1):e._e(),t("v-col",{attrs:{cols:"12",sm:"4"}},[t("v-switch",{attrs:{hint:"Does this client require auth?","persistent-hint":"",label:"Auth"},model:{value:e.newMqtt.auth,callback:function(n){e.$set(e.newMqtt,"auth",n)},expression:"newMqtt.auth"}})],1),e.newMqtt.auth?t("v-col",{attrs:{cols:"12",sm:"4"}},[t("v-text-field",{attrs:{label:"Username",rules:[e.requiredUser],required:""},model:{value:e.newMqtt.username,callback:function(n){e.$set(e.newMqtt,"username",n)},expression:"newMqtt.username"}})],1):e._e(),e.newMqtt.auth?t("v-col",{attrs:{cols:"12",sm:"4"}},[t("v-text-field",{attrs:{label:"Password",rules:[e.requiredPassword],required:"","append-icon":e.e1?"visibility":"visibility_off",type:e.e1?"password":"text"},on:{"click:append":()=>e.e1=!e.e1},model:{value:e.newMqtt.password,callback:function(n){e.$set(e.newMqtt,"password",n)},expression:"newMqtt.password"}})],1):e._e()],1)],1)],1)],1),t("v-divider")],1),e.newMqtt.disabled?e._e():t("v-expansion-panel",{key:"gateway"},[t("v-expansion-panel-header",[t("v-row",{attrs:{"no-gutters":""}},[t("v-col",{attrs:{"align-self":"center"}},[e._v(" Gateway ")]),t("v-col",{staticClass:"text-right pr-5"},[t("v-btn",{attrs:{color:"primary",outlined:"","x-small":""},on:{click:function(n){return n.stopPropagation(),e.openDocs("gateway")}}},[e._v(" Docs "),t("v-icon",{attrs:{"x-small":"",right:""}},[e._v("launch")])],1)],1)],1)],1),t("v-expansion-panel-content",[t("v-card",{attrs:{flat:""}},[t("v-card-text",[t("v-row",[t("v-col",{attrs:{cols:"12"}},[t("v-select",{attrs:{label:"Topic type",rules:[e.rules.required],required:"",items:e.gw_types},model:{value:e.newGateway.type,callback:function(n){e.$set(e.newGateway,"type",n)},expression:"newGateway.type"}})],1),t("v-col",{attrs:{cols:"12"}},[t("v-select",{attrs:{label:"Payload type",required:"",rules:[e.validPayload],items:e.py_types},model:{value:e.newGateway.payloadType,callback:function(n){e.$set(e.newGateway,"payloadType",n)},expression:"newGateway.payloadType"}})],1),e.newGateway.type===0?t("v-col",{attrs:{cols:"6"}},[t("v-switch",{attrs:{label:"Use nodes name instead of numeric nodeIDs"},model:{value:e.newGateway.nodeNames,callback:function(n){e.$set(e.newGateway,"nodeNames",n)},expression:"newGateway.nodeNames"}})],1):e._e(),t("v-col",{attrs:{cols:"6"}},[t("v-switch",{attrs:{label:"Ignore location",hint:"Don't add nodes location to values topic","persistent-hint":""},model:{value:e.newGateway.ignoreLoc,callback:function(n){e.$set(e.newGateway,"ignoreLoc",n)},expression:"newGateway.ignoreLoc"}})],1),t("v-col",{attrs:{cols:"6"}},[t("v-switch",{attrs:{label:"Send Z-Wave events",hint:"Enable this to get all zwave events in MQTT on _EVENTS topic","persistent-hint":""},model:{value:e.newGateway.sendEvents,callback:function(n){e.$set(e.newGateway,"sendEvents",n)},expression:"newGateway.sendEvents"}})],1),t("v-col",{attrs:{cols:"6"}},[t("v-switch",{attrs:{label:"Ignore status updates",hint:"Prevent gateway to send updates when a node changes its status (dead/sleep, alive)","persistent-hint":""},model:{value:e.newGateway.ignoreStatus,callback:function(n){e.$set(e.newGateway,"ignoreStatus",n)},expression:"newGateway.ignoreStatus"}})],1),e.newGateway.payloadType!==2?t("v-col",{attrs:{cols:"6"}},[t("v-switch",{attrs:{label:"Include Node info",hint:"Include Node's Name and Location on Payload","persistent-hint":""},model:{value:e.newGateway.includeNodeInfo,callback:function(n){e.$set(e.newGateway,"includeNodeInfo",n)},expression:"newGateway.includeNodeInfo"}})],1):e._e(),t("v-col",{attrs:{cols:"6"}},[t("v-switch",{attrs:{label:"Publish node details",hint:"Details published under a topic, can help automations receive device info","persistent-hint":""},model:{value:e.newGateway.publishNodeDetails,callback:function(n){e.$set(e.newGateway,"publishNodeDetails",n)},expression:`
newGateway.publishNodeDetails
`}})],1)],1)],1)],1)],1),t("v-divider")],1),t("v-expansion-panel",{key:"Hass"},[t("v-expansion-panel-header",[t("v-row",{attrs:{"no-gutters":""}},[t("v-col",{attrs:{"align-self":"center"}},[e._v(" Home Assistant ")]),t("v-col",{staticClass:"text-right pr-5"},[t("v-btn",{attrs:{color:"primary",outlined:"","x-small":""},on:{click:function(n){return n.stopPropagation(),e.openDocs("home-assistant")}}},[e._v(" Docs "),t("v-icon",{attrs:{"x-small":"",right:""}},[e._v("launch")])],1)],1)],1)],1),t("v-expansion-panel-content",[t("v-card",{attrs:{flat:""}},[t("v-card-text",[t("v-row",[t("v-col",{attrs:{cols:"12",sm:"6"}},[t("v-switch",{attrs:{hint:"Enable Z-Wave JS websocket server. This can be used with Home Assistant Z-Wave JS integration to discover entities","persistent-hint":"",label:"WS Server"},model:{value:e.newZwave.serverEnabled,callback:function(n){e.$set(e.newZwave,"serverEnabled",n)},expression:"newZwave.serverEnabled"}})],1),e.newZwave.serverEnabled?t("v-col",{attrs:{cols:"6"}},[t("v-text-field",{attrs:{label:"Server Port",rules:[e.rules.required],required:"",hint:"The port to bind the Z-Wave Server. Default: 3000",type:"number"},model:{value:e.newZwave.serverPort,callback:function(n){e.$set(e.newZwave,"serverPort",e._n(n))},expression:"newZwave.serverPort"}}),t("input",{attrs:{type:"hidden"},domProps:{value:e.newZwave.serverServiceDiscoveryDisabled}})],1):e._e(),e.newZwave.serverEnabled?t("v-col",{attrs:{cols:"6"}},[t("v-text-field",{attrs:{label:"Server Host",hint:"(Optional) The host to bind the Z-Wave Server"},model:{value:e.newZwave.serverHost,callback:function(n){e.$set(e.newZwave,"serverHost",n)},expression:"newZwave.serverHost"}})],1):e._e(),e.newZwave.serverEnabled?t("v-col",{attrs:{cols:"6"}},[t("inverted-checkbox",{attrs:{hint:"Allows applications like Home Assistant to automatically detect and connect to your Z-Wave JS UI instance","persistent-hint":"",label:"DNS Discovery"},model:{value:e.newZwave.serverServiceDiscoveryDisabled,callback:function(n){e.$set(e.newZwave,"serverServiceDiscoveryDisabled",n)},expression:`
newZwave.serverServiceDiscoveryDisabled
`}})],1):e._e()],1),e.newMqtt.disabled?e._e():t("v-row",[t("v-col",{attrs:{cols:"6"}},[t("v-switch",{attrs:{label:"MQTT Discovery",hint:"Create devices in Home Assistant using MQTT discovery. This is an alternative to Home Assistant Z-Wave JS integration","persistent-hint":""},model:{value:e.newGateway.hassDiscovery,callback:function(n){e.$set(e.newGateway,"hassDiscovery",n)},expression:"newGateway.hassDiscovery"}})],1),e.newGateway.hassDiscovery?t("v-col",{attrs:{cols:"6"}},[t("v-text-field",{attrs:{label:"Discovery prefix",hint:"The prefix to use for Hass MQTT discovery. Leave empty to use the mqtt prefix"},model:{value:e.newGateway.discoveryPrefix,callback:function(n){e.$set(e.newGateway,"discoveryPrefix",n)},expression:"newGateway.discoveryPrefix"}})],1):e._e(),e.newGateway.hassDiscovery?t("v-col",{attrs:{cols:"6"}},[t("v-switch",{attrs:{label:"Retained discovery",hint:"Set retain flag to true in discovery messages","persistent-hint":""},model:{value:e.newGateway.retainedDiscovery,callback:function(n){e.$set(e.newGateway,"retainedDiscovery",n)},expression:`
newGateway.retainedDiscovery
`}})],1):e._e(),e.newGateway.hassDiscovery?t("v-col",{attrs:{cols:"6"}},[t("v-switch",{attrs:{label:"Manual discovery",hint:"Don't automatically send the discovery payloads when a device is discovered","persistent-hint":""},model:{value:e.newGateway.manualDiscovery,callback:function(n){e.$set(e.newGateway,"manualDiscovery",n)},expression:"newGateway.manualDiscovery"}})],1):e._e(),e.newGateway.hassDiscovery?t("v-col",{attrs:{cols:"6"}},[t("v-text-field",{attrs:{label:"Entity name template","persistent-hint":"",hint:"Template which generates entity names"},model:{value:e.newGateway.entityTemplate,callback:function(n){e.$set(e.newGateway,"entityTemplate",n)},expression:"newGateway.entityTemplate"}})],1):e._e(),e.newGateway.hassDiscovery?t("v-col",{attrs:{cols:"6"}},[t("div",[e._v(" Default: "),t("code",[e._v("%ln_%o")]),t("br"),e._v(" -"),t("code",[e._v("%ln")]),e._v(": Node location with name ("),t("code",[e._v("<location-?><name>")]),e._v(")"),t("br"),e._v("- "),t("code",[e._v("%nid")]),e._v(": Node ID "),t("br"),e._v("- "),t("code",[e._v("%n")]),e._v(": Node Name "),t("br"),e._v("- "),t("code",[e._v("%loc")]),e._v(": Node Location "),t("br"),e._v("- "),t("code",[e._v("%p")]),e._v(": valueId property (fallback to device type) "),t("br"),e._v("- "),t("code",[e._v("%pk")]),e._v(": valueId property key (fallback to device type) "),t("br"),e._v("- "),t("code",[e._v("%pn")]),e._v(": valueId property name (fallback to device type) "),t("br"),e._v("- "),t("code",[e._v("%o")]),e._v(": HASS object_id "),t("br"),e._v("- "),t("code",[e._v("%l")]),e._v(": valueId label (fallback to object_id) ")])]):e._e()],1)],1)],1)],1)],1)],1),t("DialogGatewayValue",{attrs:{gw_type:e.newGateway.type,title:e.dialogTitle,editedValue:e.editedValue,devices:e.devices},on:{save:e.saveValue,close:e.closeDialog},model:{value:e.dialogValue,callback:function(n){e.dialogValue=n},expression:"dialogValue"}})],1),t("v-row",{staticClass:"sticky-buttons py-3 px-4",style:{backgroundColor:e.internalDarkMode?"#272727":"#f5f5f5"},attrs:{justify:e.$vuetify.breakpoint.xsOnly?"center":"end","space-be":""}},[t("v-btn",{staticClass:"mr-2",attrs:{small:"",color:"red darken-1"},on:{click:e.resetConfig}},[e._v(" Reset "),t("v-icon",{attrs:{right:"",dark:""}},[e._v("clear")])],1),t("v-btn",{staticClass:"mr-2",attrs:{small:"",color:"purple darken-1"},on:{click:e.importSettings}},[e._v(" Import "),t("v-icon",{attrs:{right:"",dark:""}},[e._v("file_upload")])],1),t("v-btn",{staticClass:"mr-2",attrs:{small:"",color:"green darken-1"},on:{click:e.exportSettings}},[e._v(" Export "),t("v-icon",{attrs:{right:"",dark:""}},[e._v("file_download")])],1),t("v-btn",{staticClass:"mr-5",attrs:{small:"",color:"blue darken-1",type:"submit",loading:e.saving,disabled:e.saving||!e.settingsChanged,form:"form_settings"}},[e._v(" Save "),t("v-icon",{attrs:{right:"",dark:""}},[e._v("save")])],1)],1)],1)},ge=[],be=re(me,ye,ge,!1,null,"adec5bc8");const _e=be.exports;export{_e as default};