@kohost/api-client 4.3.0 → 4.3.1
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/amqpClient.cjs.map +1 -1
- package/dist/amqpClient.js +1 -1
- package/dist/chunk-34NDMN52.js +1 -0
- package/dist/{chunk-KUY2TSXE.js.map → chunk-34NDMN52.js.map} +1 -1
- package/dist/{chunk-DVPG2A2G.js → chunk-CGFGSU4J.js} +1 -1
- package/dist/{chunk-DVPG2A2G.js.map → chunk-CGFGSU4J.js.map} +1 -1
- package/dist/{chunk-WCNLOW6W.js → chunk-FHU77TPD.js} +1 -1
- package/dist/{chunk-UQYKUSSV.js → chunk-HTD5D72I.js} +1 -1
- package/dist/{chunk-UQYKUSSV.js.map → chunk-HTD5D72I.js.map} +1 -1
- package/dist/{chunk-6EIKQ3ZL.js → chunk-MTQEL3QV.js} +1 -1
- package/dist/{chunk-6EIKQ3ZL.js.map → chunk-MTQEL3QV.js.map} +1 -1
- package/dist/chunk-PQQOKUF3.js +1 -0
- package/dist/chunk-PQQOKUF3.js.map +1 -0
- package/dist/{chunk-OC45W3N5.js → chunk-QBW2DKGB.js} +1 -1
- package/dist/{chunk-OC45W3N5.js.map → chunk-QBW2DKGB.js.map} +1 -1
- package/dist/{chunk-LOGVBYL2.js → chunk-ZLZL27XJ.js} +1 -1
- package/dist/commands/index.cjs.map +1 -1
- package/dist/commands/index.js +1 -1
- package/dist/errors/index.cjs.map +1 -1
- package/dist/errors/index.js +1 -1
- package/dist/events/index.cjs +1 -1
- package/dist/events/index.cjs.map +1 -1
- package/dist/events/index.d.cts +1 -1
- package/dist/events/index.d.ts +1 -1
- package/dist/events/index.js +1 -1
- package/dist/events/systemSpaceUpdated.cjs +1 -1
- package/dist/events/systemSpaceUpdated.cjs.map +1 -1
- package/dist/events/systemSpaceUpdated.d.cts +2 -2
- package/dist/events/systemSpaceUpdated.d.ts +2 -2
- package/dist/events/systemSpaceUpdated.js +1 -1
- package/dist/{index-1wlt3uo2.d.ts → index-4PRcoudk.d.ts} +3 -3
- package/dist/{index-DrrP0Vfc.d.cts → index-Dwhyy8sC.d.cts} +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/models/index.cjs.map +1 -1
- package/dist/models/index.js +1 -1
- package/dist/useCases/index.cjs.map +1 -1
- package/dist/useCases/index.js +1 -1
- package/dist/{utils-CLXklau8.d.cts → utils-B7hC6BG1.d.cts} +2 -2
- package/dist/{utils-BILs4ivQ.d.ts → utils-xPV0sXIk.d.ts} +2 -2
- package/dist/utils.cjs +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-F4IGADLD.js +0 -1
- package/dist/chunk-F4IGADLD.js.map +0 -1
- package/dist/chunk-KUY2TSXE.js +0 -1
- /package/dist/{chunk-WCNLOW6W.js.map → chunk-FHU77TPD.js.map} +0 -0
- /package/dist/{chunk-LOGVBYL2.js.map → chunk-ZLZL27XJ.js.map} +0 -0
package/dist/utils.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var mod,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__name=(target,value)=>__defProp(target,"name",{value:value,configurable:!0}),__commonJS=(cb,mod)=>function __require(){return mod||(0,cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports},__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},require_fast_deep_equal=__commonJS({"node_modules/fast-deep-equal/index.js"(exports2,module2){"use strict";module2.exports=__name((function equal(a,b){if(a===b)return!0;if(a&&b&&"object"==typeof a&&"object"==typeof b){if(a.constructor!==b.constructor)return!1;var length,i,keys;if(Array.isArray(a)){if((length=a.length)!=b.length)return!1;for(i=length;0!=i--;)if(!equal(a[i],b[i]))return!1;return!0}if(a.constructor===RegExp)return a.source===b.source&&a.flags===b.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===b.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===b.toString();if((length=(keys=Object.keys(a)).length)!==Object.keys(b).length)return!1;for(i=length;0!=i--;)if(!Object.prototype.hasOwnProperty.call(b,keys[i]))return!1;for(i=length;0!=i--;){var key=keys[i];if(!equal(a[key],b[key]))return!1}return!0}return a!=a&&b!=b}),"equal")}}),require_equal=__commonJS({"node_modules/ajv/dist/runtime/equal.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0});var equal=require_fast_deep_equal();equal.code='require("ajv/dist/runtime/equal").default',exports2.default=equal}}),require_ucs2length=__commonJS({"node_modules/ajv/dist/runtime/ucs2length.js"(exports2){"use strict";function ucs2length(str){const len=str.length;let value,length=0,pos=0;for(;pos<len;)length++,value=str.charCodeAt(pos++),value>=55296&&value<=56319&&pos<len&&(value=str.charCodeAt(pos),56320==(64512&value)&&pos++);return length}Object.defineProperty(exports2,"__esModule",{value:!0}),__name(ucs2length,"ucs2length"),exports2.default=ucs2length,ucs2length.code='require("ajv/dist/runtime/ucs2length").default'}}),require_formats=__commonJS({"node_modules/ajv-formats/dist/formats.js"(exports2){"use strict";function fmtDef(validate,compare){return{validate:validate,compare:compare}}function isLeapYear(year){return year%4==0&&(year%100!=0||year%400==0)}Object.defineProperty(exports2,"__esModule",{value:!0}),exports2.formatNames=exports2.fastFormats=exports2.fullFormats=void 0,__name(fmtDef,"fmtDef"),exports2.fullFormats={date:fmtDef(date,compareDate),time:fmtDef(getTime(!0),compareTime),"date-time":fmtDef(getDateTime(!0),compareDateTime),"iso-time":fmtDef(getTime(),compareIsoTime),"iso-date-time":fmtDef(getDateTime(),compareIsoDateTime),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:uri,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:regex,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:byte,int32:{type:"number",validate:validateInt32},int64:{type:"number",validate:validateInt64},float:{type:"number",validate:validateNumber},double:{type:"number",validate:validateNumber},password:!0,binary:!0},exports2.fastFormats={...exports2.fullFormats,date:fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,compareDate),time:fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareTime),"date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareDateTime),"iso-time":fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareIsoTime),"iso-date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareIsoDateTime),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},exports2.formatNames=Object.keys(exports2.fullFormats),__name(isLeapYear,"isLeapYear");var DATE=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,DAYS=[0,31,28,31,30,31,30,31,31,30,31,30,31];function date(str){const matches=DATE.exec(str);if(!matches)return!1;const year=+matches[1],month=+matches[2],day=+matches[3];return month>=1&&month<=12&&day>=1&&day<=(2===month&&isLeapYear(year)?29:DAYS[month])}function compareDate(d1,d2){if(d1&&d2)return d1>d2?1:d1<d2?-1:0}__name(date,"date"),__name(compareDate,"compareDate");var TIME=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function getTime(strictTimeZone){return __name((function time(str){const matches=TIME.exec(str);if(!matches)return!1;const hr=+matches[1],min=+matches[2],sec=+matches[3],tz=matches[4],tzSign="-"===matches[5]?-1:1,tzH=+(matches[6]||0),tzM=+(matches[7]||0);if(tzH>23||tzM>59||strictTimeZone&&!tz)return!1;if(hr<=23&&min<=59&&sec<60)return!0;const utcMin=min-tzM*tzSign,utcHr=hr-tzH*tzSign-(utcMin<0?1:0);return(23===utcHr||-1===utcHr)&&(59===utcMin||-1===utcMin)&&sec<61}),"time")}function compareTime(s1,s2){if(!s1||!s2)return;const t1=new Date("2020-01-01T"+s1).valueOf(),t2=new Date("2020-01-01T"+s2).valueOf();return t1&&t2?t1-t2:void 0}function compareIsoTime(t1,t2){if(!t1||!t2)return;const a1=TIME.exec(t1),a2=TIME.exec(t2);return a1&&a2?(t1=a1[1]+a1[2]+a1[3])>(t2=a2[1]+a2[2]+a2[3])?1:t1<t2?-1:0:void 0}__name(getTime,"getTime"),__name(compareTime,"compareTime"),__name(compareIsoTime,"compareIsoTime");var DATE_TIME_SEPARATOR=/t|\s/i;function getDateTime(strictTimeZone){const time=getTime(strictTimeZone);return __name((function date_time(str){const dateTime=str.split(DATE_TIME_SEPARATOR);return 2===dateTime.length&&date(dateTime[0])&&time(dateTime[1])}),"date_time")}function compareDateTime(dt1,dt2){if(!dt1||!dt2)return;const d1=new Date(dt1).valueOf(),d2=new Date(dt2).valueOf();return d1&&d2?d1-d2:void 0}function compareIsoDateTime(dt1,dt2){if(!dt1||!dt2)return;const[d1,t1]=dt1.split(DATE_TIME_SEPARATOR),[d2,t2]=dt2.split(DATE_TIME_SEPARATOR),res=compareDate(d1,d2);return void 0!==res?res||compareTime(t1,t2):void 0}__name(getDateTime,"getDateTime"),__name(compareDateTime,"compareDateTime"),__name(compareIsoDateTime,"compareIsoDateTime");var NOT_URI_FRAGMENT=/\/|:/,URI=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function uri(str){return NOT_URI_FRAGMENT.test(str)&&URI.test(str)}__name(uri,"uri");var BYTE=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function byte(str){return BYTE.lastIndex=0,BYTE.test(str)}__name(byte,"byte");function validateInt32(value){return Number.isInteger(value)&&value<=2147483647&&value>=-2147483648}function validateInt64(value){return Number.isInteger(value)}function validateNumber(){return!0}__name(validateInt32,"validateInt32"),__name(validateInt64,"validateInt64"),__name(validateNumber,"validateNumber");var Z_ANCHOR=/[^\\]\\Z/;function regex(str){if(Z_ANCHOR.test(str))return!1;try{return new RegExp(str),!0}catch(e){return!1}}__name(regex,"regex")}}),utils_exports={};__export(utils_exports,{entityFactory:()=>entityFactory,errorFactory:()=>errorFactory,eventFactory:()=>eventFactory}),module.exports=(mod=utils_exports,((to,from,except,desc)=>{if(from&&"object"==typeof from||"function"==typeof from)for(let key of __getOwnPropNames(from))__hasOwnProp.call(to,key)||key===except||__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to})(__defProp({},"__esModule",{value:!0}),mod));var AppError=class _AppError extends Error{static{__name(this,"AppError")}constructor(message="Internal Server Error",options){super(message,options),this.type=this.constructor.name,this.statusCode=500,this.name="AppError",Object.setPrototypeOf(this,_AppError.prototype)}},AuthenticationError=class _AuthenticationError extends AppError{static{__name(this,"AuthenticationError")}constructor(message="Authentication Error",options={}){super(message,options),this.statusCode=401,this.name="AuthenticationError",Object.setPrototypeOf(this,_AuthenticationError.prototype)}},AuthorizationError=class _AuthorizationError extends AppError{static{__name(this,"AuthorizationError")}constructor(message="Authorization Error",options={}){super(message,options),this.statusCode=403,this.name="AuthorizationError",Object.setPrototypeOf(this,_AuthorizationError.prototype)}},ConflictError=class _ConflictError extends AppError{static{__name(this,"ConflictError")}constructor(message="Bad Request",options={}){super(message,options),this.statusCode=409,this.name="ConflictError",Object.setPrototypeOf(this,_ConflictError.prototype)}},DeviceCommError=class _DeviceCommError extends AppError{static{__name(this,"DeviceCommError")}constructor(message="Device Communication Error",options={}){super(message,options),this.statusCode=503,this.name="DeviceCommError",Object.setPrototypeOf(this,_DeviceCommError.prototype)}},LoginError=class _LoginError extends AppError{static{__name(this,"LoginError")}constructor(message="Invalid Login information provided",options={}){super(message,options),this.statusCode=401,this.name="LoginError",Object.setPrototypeOf(this,_LoginError.prototype)}},NotFoundError=class _NotFoundError extends AppError{static{__name(this,"NotFoundError")}constructor(message="Resource Not Found",options={}){super(message,options),this.statusCode=404,this.name="NotFoundError",Object.setPrototypeOf(this,_NotFoundError.prototype)}},RequestError=class _RequestError extends AppError{static{__name(this,"RequestError")}constructor(message="Bad Request",options={}){super(message,options),this.statusCode=400,this.name="RequestError",Object.setPrototypeOf(this,_RequestError.prototype)}},SystemCommError=class _SystemCommError extends AppError{static{__name(this,"SystemCommError")}constructor(message="System Communication Error",options={}){super(message,options),this.statusCode=503,this.name="SystemCommError",Object.setPrototypeOf(this,_SystemCommError.prototype)}},TokenExpiredError=class _TokenExpiredError extends AppError{static{__name(this,"TokenExpiredError")}constructor(message="Token Expired",options={}){super(message,options),this.statusCode=401,this.name="TokenExpiredError",Object.setPrototypeOf(this,_TokenExpiredError.prototype)}},UnprocessableRequestError=class _UnprocessableRequestError extends AppError{static{__name(this,"UnprocessableRequestError")}constructor(message="Unprocessable Request Error",options={}){super(message,options),this.statusCode=422,this.name="UnprocessableRequestError",Object.setPrototypeOf(this,_UnprocessableRequestError.prototype)}},ValidationError=class _ValidationError extends AppError{static{__name(this,"ValidationError")}constructor(message="Validation Error",options={}){super(message,options),this.statusCode=400,this.name="ValidationError",Object.setPrototypeOf(this,_ValidationError.prototype)}},events_exports={};__export(events_exports,{ApplicationInUse:()=>ApplicationInUse,ApplicationOutOfUse:()=>ApplicationOutOfUse,EmailEvent:()=>EmailEvent,Event:()=>Event,ReservationCheckedIn:()=>ReservationCheckedIn,ReservationCheckedOut:()=>ReservationCheckedOut,ReservationSpaceChanged:()=>ReservationSpaceChanged,SMSEvent:()=>SMSEvent,SceneSet:()=>SceneSet,ShortLinkCreated:()=>ShortLinkCreated,SystemAlarmUpdated:()=>SystemAlarmUpdated,SystemCameraUpdated:()=>SystemCameraUpdated,SystemCategoryUpdated:()=>SystemCategoryUpdated,SystemCourtesyUpdated:()=>SystemCourtesyUpdated,SystemCredentialUpdated:()=>SystemCredentialUpdated,SystemDimmerUpdated:()=>SystemDimmerUpdated,SystemEntityDeleted:()=>SystemEntityDeleted,SystemGatewayUpdated:()=>SystemGatewayUpdated,SystemLockUpdated:()=>SystemLockUpdated,SystemMediaSourceUpdated:()=>SystemMediaSourceUpdated,SystemMotionSensorUpdated:()=>SystemMotionSensorUpdated,SystemOrganizationUpdated:()=>SystemOrganizationUpdated,SystemProductUpdated:()=>SystemProductUpdated,SystemPropertyUpdated:()=>SystemPropertyUpdated,SystemReservationUpdated:()=>SystemReservationUpdated,SystemSpaceUpdate:()=>SystemSpaceUpdate,SystemSwitchUpdated:()=>SystemSwitchUpdated,SystemThermostatUpdated:()=>SystemThermostatUpdated,SystemUserUpdated:()=>SystemUserUpdated,SystemWindowCoveringUpdated:()=>SystemWindowCoveringUpdated});var amqpExchanges_DriverEvents={name:"kohost.events.drivers",type:"topic",options:{durable:!0}},amqpExchanges_AppEvents={name:"kohost.events.app",type:"topic",options:{durable:!0}},Event=class{static{__name(this,"Event")}constructor(data,context={}){if(this.data=[],this.context=context,!data)throw new Error("Event data is required");if("object"!=typeof data&&!Array.isArray(data))throw new Error("Event data must be an object or array");Array.isArray(data)?this.data=data:this.data=[data]}get organizationId(){return this.context.organizationId||"*"}get propertyId(){return this.context.propertyId||"*"}static get type(){return"Event"}static get exchange(){return amqpExchanges_DriverEvents.name}static get entity(){return""}build(){return{data:{...this.data}}}get routingKey(){return`${this.organizationId}.${this.propertyId}.${this.constructor.entity}.${this.constructor.name}`}},ApplicationInUse=class extends Event{constructor(data={},context){super(data,context)}static get name(){return"ApplicationInUse"}static get entity(){return"app"}static get exchange(){return amqpExchanges_AppEvents.name}},ApplicationOutOfUse=class extends Event{constructor(data={},context={}){super(data,context)}static get name(){return"ApplicationOutOfUse"}static get entity(){return"app"}static get exchange(){return amqpExchanges_AppEvents.name}},EmailEvent=class extends Event{constructor(email,context){super(email,context)}static get name(){return"EmailEvent"}static get entity(){return"emailMessage"}},ReservationCheckedIn=class extends Event{constructor(reservation,context){super(reservation,context)}static get name(){return"ReservationCheckedIn"}static get entity(){return"reservation"}static get exchange(){return amqpExchanges_AppEvents.name}},ReservationCheckedOut=class extends Event{constructor(reservation,context){super(reservation,context)}static get name(){return"ReservationCheckedOut"}static get entity(){return"reservation"}static get exchange(){return amqpExchanges_AppEvents.name}},ReservationSpaceChanged=class extends Event{constructor(reservation,context){super(reservation,context)}static get name(){return"ReservationSpaceChanged"}static get entity(){return"reservation"}static get exchange(){return amqpExchanges_AppEvents.name}},SceneSet=class extends Event{constructor(scene,context){super(scene,context)}static get name(){return"SceneSet"}static get entity(){return"scene"}},ShortLinkCreated=class extends Event{constructor(shortLink,context){super(shortLink,context)}static get name(){return"ShortLinkCreated"}static get entity(){return"shortLink"}},SMSEvent=class extends Event{constructor(sms,context){super(sms,context)}static get name(){return"SMSEvent"}static get entity(){return"smsMessage"}},SystemAlarmUpdated=class extends Event{constructor(alarm,context){super(alarm,context)}static get name(){return"SystemAlarmUpdated"}static get entity(){return"alarm"}},SystemCameraUpdated=class extends Event{constructor(camera,context){super(camera,context)}static get name(){return"SystemCameraUpdated"}static get entity(){return"camera"}},SystemCategoryUpdated=class extends Event{constructor(category,context){super(category,context)}static get name(){return"SystemCategoryUpdated"}static get entity(){return"category"}},SystemCourtesyUpdated=class extends Event{constructor(courtesy,context){super(courtesy,context)}static get name(){return"SystemCourtesyUpdated"}static get entity(){return"courtesy"}},SystemCredentialUpdated=class extends Event{constructor(cred,context){super(cred,context)}static get name(){return"SystemCredentialUpdated"}static get entity(){return"credential"}},SystemDimmerUpdated=class extends Event{constructor(dimmer,context){super(dimmer,context)}static get name(){return"SystemDimmerUpdated"}static get entity(){return"dimmer"}},SystemEntityDeleted=class extends Event{constructor(data,context){super(data,context)}static get name(){return"SystemEntityDeleted"}static get entity(){return"entity"}},SystemGatewayUpdated=class extends Event{constructor(gateway,context){super(gateway,context)}static get name(){return"SystemGatewayUpdated"}static get entity(){return"gateway"}},SystemLockUpdated=class extends Event{constructor(lock,context){super(lock,context)}static get name(){return"SystemLockUpdated"}static get entity(){return"lock"}},SystemMediaSourceUpdated=class extends Event{constructor(mediaSource,context){super(mediaSource,context)}static get name(){return"SystemMediaSourceUpdated"}static get entity(){return"mediaSource"}},SystemMotionSensorUpdated=class extends Event{constructor(motion,context){super(motion,context)}static get name(){return"SystemMotionSensorUpdated"}static get entity(){return"motionSensor"}},SystemOrganizationUpdated=class extends Event{constructor(organization,context){super(organization,context)}static get name(){return"SystemOrganizationUpdated"}static get entity(){return"organization"}},SystemProductUpdated=class extends Event{constructor(product,context){super(product,context)}static get name(){return"SystemProductUpdated"}static get entity(){return"product"}},SystemPropertyUpdated=class extends Event{constructor(property,context){super(property,context)}static get name(){return"SystemPropertyUpdated"}static get entity(){return"property"}},SystemReservationUpdated=class extends Event{constructor(reservation,context){super(reservation,context)}static get name(){return"SystemReservationUpdated"}static get entity(){return"reservation"}},SystemSpaceUpdate=class extends Event{constructor(space,context){super(space,context)}static get name(){return"SystemSpaceUpdated"}static get entity(){return"space"}},SystemSwitchUpdated=class extends Event{constructor(_switch,context){super(_switch,context)}static get name(){return"SystemSwitchUpdated"}static get entity(){return"switch"}},SystemThermostatUpdated=class extends Event{constructor(thermostat,context){super(thermostat,context)}static get name(){return"SystemThermostatUpdated"}static get entity(){return"thermostat"}},SystemUserUpdated=class extends Event{constructor(user,context){super(user,context)}static get name(){return"SystemUserUpdated"}static get entity(){return"user"}},SystemWindowCoveringUpdated=class extends Event{constructor(wc,context){super(wc,context)}static get name(){return"SystemWindowCoveringUpdated"}static get entity(){return"windowCovering"}},Entity=class{static{__name(this,"Entity")}constructor(data){if(!this.schema)throw new Error("Schema is not defined");if(!this.validator)throw new Error("Validator is not defined");this.#validate(data)}get schemaProperties(){return Object.keys(this.validator.schema.properties)}#validate(data){if(!this.validator(data))throw new ValidationError(`Invalid ${this.constructor.name}`,{cause:this.validator.errors})}},validateAlarm=validate10,schema11={$schema:"http://json-schema.org/draft-07/schema",$id:"alarm.json",title:"Alarm",description:"Any smart alarm system",type:"object",required:["id","type","areas","zones","driver"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string",description:"Name of the alarm"},offline:{type:"boolean"},type:{type:"string",enum:["alarm"],default:"alarm"},systemId:{$ref:"definitions.json#/definitions/systemId"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},areas:{type:"array",items:{type:"object",properties:{number:{type:"number"},name:{type:"string"},securityMode:{type:["string","null"],enum:["arming","disarming","armed","disarmed","alarm",null]}},additionalProperties:!1}},zones:{type:"array",items:{type:"object",properties:{number:{type:"number",minimum:0},name:{type:"string"},secure:{type:["boolean","null"]},bypassed:{type:["boolean","null"]}},additionalProperties:!1}},chime:{type:"boolean",description:"Reflects whether console chime is enabled"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"},address:{$ref:"definitions.json#/definitions/address"}}},schema15={type:"array",uniqueItems:!0,items:{enum:["button 1","button 2","button 3","button 4","button 5","idle","powerHasBeedApplied","acMainsDisconnected","acMainsReconnected","replaceBatterySoon","replaceBatteryNow","batteryOk","hardwareFailure","softwareFailure","hardwareFailureWithCode","softwareFailureWithCode","motionDetection","airFilterNeedsCleaned","airFilterNeedsReplaced","smokeDetected","outsideSafeTemperatureRange","outsideSafeHumidityRange","scheduleMaintenance","doorAjar","communicationFailure","communicationOk","burglarAlarm","fireAlarm"]}},schema18={type:"string",description:"Driver used to communicate with the object.",enum:["adlink","aws-kinesis","butler","crestron","dell","dmp","doorbird","dormakaba","dsc","ecobee","epson","geovision-rs","geovision-as-manager","honeywell-vista","igor","inncom","isapi","kohost-k7","kohost","lg","lg-webos","lapi","lirc","mews","mht","paxton","pelican-wireless","power-shades","rachio","rebrandly","relay","rtsp","salto","salto-irn","samsung","se","sendgrid","sonifi","stay-n-touch","storable","twilio","unifi","valcom","vivotek","vizio","wisenet","cloudflare-images","cloudflare-stream","insperia-privacy"]},func2=Object.prototype.hasOwnProperty,func0=require_equal().default,func4=require_ucs2length().default,schema16={type:["object","null"],properties:{name:{type:"string",$ref:"#/definitions/supportedNotifications/items"},timestamp:{type:"number",minimum:1655907956593},description:{type:"string"}}},schema17={enum:["button 1","button 2","button 3","button 4","button 5","idle","powerHasBeedApplied","acMainsDisconnected","acMainsReconnected","replaceBatterySoon","replaceBatteryNow","batteryOk","hardwareFailure","softwareFailure","hardwareFailureWithCode","softwareFailureWithCode","motionDetection","airFilterNeedsCleaned","airFilterNeedsReplaced","smokeDetected","outsideSafeTemperatureRange","outsideSafeHumidityRange","scheduleMaintenance","doorAjar","communicationFailure","communicationOk","burglarAlarm","fireAlarm"]};function validate12(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate12.errors=vErrors,0===errors}function validate10(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="alarm"),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.areas){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"areas"},message:"must have required property 'areas'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.zones){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"zones"},message:"must have required property 'zones'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.driver){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}for(const key0 in data)if(!func2.call(schema11.properties,key0)){const err5={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err7={};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(_errs6===errors){const err8={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err9={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err10={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}let data3=data.type;if("string"!=typeof data3){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("alarm"!==data3){const err12={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema11.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err13={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.supportedNotifications){let data5=data.supportedNotifications;if(Array.isArray(data5)){const len0=data5.length;for(let i0=0;i0<len0;i0++){let data6=data5[i0];if("button 1"!==data6&&"button 2"!==data6&&"button 3"!==data6&&"button 4"!==data6&&"button 5"!==data6&&"idle"!==data6&&"powerHasBeedApplied"!==data6&&"acMainsDisconnected"!==data6&&"acMainsReconnected"!==data6&&"replaceBatterySoon"!==data6&&"replaceBatteryNow"!==data6&&"batteryOk"!==data6&&"hardwareFailure"!==data6&&"softwareFailure"!==data6&&"hardwareFailureWithCode"!==data6&&"softwareFailureWithCode"!==data6&&"motionDetection"!==data6&&"airFilterNeedsCleaned"!==data6&&"airFilterNeedsReplaced"!==data6&&"smokeDetected"!==data6&&"outsideSafeTemperatureRange"!==data6&&"outsideSafeHumidityRange"!==data6&&"scheduleMaintenance"!==data6&&"doorAjar"!==data6&&"communicationFailure"!==data6&&"communicationOk"!==data6&&"burglarAlarm"!==data6&&"fireAlarm"!==data6){const err14={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}let j0,i1=data5.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data5[i1],data5[j0])){const err15={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++;break outer0}}else{const err16={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.notification&&(validate12(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate12.errors:vErrors.concat(validate12.errors),errors=vErrors.length)),void 0!==data.driver){let data8=data.driver;if("string"!=typeof data8){const err17={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if("adlink"!==data8&&"aws-kinesis"!==data8&&"butler"!==data8&&"crestron"!==data8&&"dell"!==data8&&"dmp"!==data8&&"doorbird"!==data8&&"dormakaba"!==data8&&"dsc"!==data8&&"ecobee"!==data8&&"epson"!==data8&&"geovision-rs"!==data8&&"geovision-as-manager"!==data8&&"honeywell-vista"!==data8&&"igor"!==data8&&"inncom"!==data8&&"isapi"!==data8&&"kohost-k7"!==data8&&"kohost"!==data8&&"lg"!==data8&&"lg-webos"!==data8&&"lapi"!==data8&&"lirc"!==data8&&"mews"!==data8&&"mht"!==data8&&"paxton"!==data8&&"pelican-wireless"!==data8&&"power-shades"!==data8&&"rachio"!==data8&&"rebrandly"!==data8&&"relay"!==data8&&"rtsp"!==data8&&"salto"!==data8&&"salto-irn"!==data8&&"samsung"!==data8&&"se"!==data8&&"sendgrid"!==data8&&"sonifi"!==data8&&"stay-n-touch"!==data8&&"storable"!==data8&&"twilio"!==data8&&"unifi"!==data8&&"valcom"!==data8&&"vivotek"!==data8&&"vizio"!==data8&&"wisenet"!==data8&&"cloudflare-images"!==data8&&"cloudflare-stream"!==data8&&"insperia-privacy"!==data8){const err18={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data.areas){let data9=data.areas;if(Array.isArray(data9)){const len1=data9.length;for(let i2=0;i2<len1;i2++){let data10=data9[i2];if(data10&&"object"==typeof data10&&!Array.isArray(data10)){for(const key1 in data10)if("number"!==key1&&"name"!==key1&&"securityMode"!==key1){const err19={instancePath:instancePath+"/areas/"+i2,schemaPath:"#/properties/areas/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data10.number&&"number"!=typeof data10.number){const err20={instancePath:instancePath+"/areas/"+i2+"/number",schemaPath:"#/properties/areas/items/properties/number/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data10.name&&"string"!=typeof data10.name){const err21={instancePath:instancePath+"/areas/"+i2+"/name",schemaPath:"#/properties/areas/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0!==data10.securityMode){let data13=data10.securityMode;if("string"!=typeof data13&&null!==data13){const err22={instancePath:instancePath+"/areas/"+i2+"/securityMode",schemaPath:"#/properties/areas/items/properties/securityMode/type",keyword:"type",params:{type:schema11.properties.areas.items.properties.securityMode.type},message:"must be string,null"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if("arming"!==data13&&"disarming"!==data13&&"armed"!==data13&&"disarmed"!==data13&&"alarm"!==data13&&null!==data13){const err23={instancePath:instancePath+"/areas/"+i2+"/securityMode",schemaPath:"#/properties/areas/items/properties/securityMode/enum",keyword:"enum",params:{allowedValues:schema11.properties.areas.items.properties.securityMode.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}}else{const err24={instancePath:instancePath+"/areas/"+i2,schemaPath:"#/properties/areas/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}}else{const err25={instancePath:instancePath+"/areas",schemaPath:"#/properties/areas/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}if(void 0!==data.zones){let data14=data.zones;if(Array.isArray(data14)){const len2=data14.length;for(let i3=0;i3<len2;i3++){let data15=data14[i3];if(data15&&"object"==typeof data15&&!Array.isArray(data15)){for(const key2 in data15)if("number"!==key2&&"name"!==key2&&"secure"!==key2&&"bypassed"!==key2){const err26={instancePath:instancePath+"/zones/"+i3,schemaPath:"#/properties/zones/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key2},message:"must NOT have additional properties"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data15.number){let data16=data15.number;if("number"==typeof data16){if(data16<0||isNaN(data16)){const err27={instancePath:instancePath+"/zones/"+i3+"/number",schemaPath:"#/properties/zones/items/properties/number/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}else{const err28={instancePath:instancePath+"/zones/"+i3+"/number",schemaPath:"#/properties/zones/items/properties/number/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}if(void 0!==data15.name&&"string"!=typeof data15.name){const err29={instancePath:instancePath+"/zones/"+i3+"/name",schemaPath:"#/properties/zones/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data15.secure){let data18=data15.secure;if("boolean"!=typeof data18&&null!==data18){const err30={instancePath:instancePath+"/zones/"+i3+"/secure",schemaPath:"#/properties/zones/items/properties/secure/type",keyword:"type",params:{type:schema11.properties.zones.items.properties.secure.type},message:"must be boolean,null"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}if(void 0!==data15.bypassed){let data19=data15.bypassed;if("boolean"!=typeof data19&&null!==data19){const err31={instancePath:instancePath+"/zones/"+i3+"/bypassed",schemaPath:"#/properties/zones/items/properties/bypassed/type",keyword:"type",params:{type:schema11.properties.zones.items.properties.bypassed.type},message:"must be boolean,null"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}}else{const err32={instancePath:instancePath+"/zones/"+i3,schemaPath:"#/properties/zones/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}}else{const err33={instancePath:instancePath+"/zones",schemaPath:"#/properties/zones/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}if(void 0!==data.chime&&"boolean"!=typeof data.chime){const err34={instancePath:instancePath+"/chime",schemaPath:"#/properties/chime/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(void 0!==data.watts){let data21=data.watts;if("number"==typeof data21){if(data21<0||isNaN(data21)){const err35={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}}else{const err36={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err37={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err38={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err39={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err40={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if(void 0!==data.address){let data26=data.address;if(data26&&"object"==typeof data26&&!Array.isArray(data26)){if(void 0!==data26.id&&"string"!=typeof data26.id){const err41={instancePath:instancePath+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}if(void 0!==data26.line1&&"string"!=typeof data26.line1){const err42={instancePath:instancePath+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(void 0!==data26.line2&&"string"!=typeof data26.line2){const err43={instancePath:instancePath+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}if(void 0!==data26.line3&&"string"!=typeof data26.line3){const err44={instancePath:instancePath+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}if(void 0!==data26.city&&"string"!=typeof data26.city){const err45={instancePath:instancePath+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}if(void 0!==data26.state&&"string"!=typeof data26.state){const err46={instancePath:instancePath+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}if(void 0!==data26.postalCode&&"string"!=typeof data26.postalCode){const err47={instancePath:instancePath+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}if(void 0!==data26.countryCode){let data34=data26.countryCode;if("string"==typeof data34){if(func4(data34)>2){const err48={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}if(func4(data34)<2){const err49={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}}else{const err50={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}}}else{const err51={instancePath:instancePath+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}}}else{const err52={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}return validate10.errors=vErrors,0===errors}__name(validate12,"validate12"),__name(validate10,"validate10");var validateAnnouncement=validate14,schema21={$schema:"http://json-schema.org/draft-07/schema",$id:"announcement.json",title:"Announcement",description:"Announcement message sent to users",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["announcement"],default:"announcement"},users:{type:"array",items:{type:"string"},minItems:1},group:{type:"string"},body:{type:"string"},media:{$ref:"mediaFile.json"},sentBy:{type:"string"},tags:{type:"array",items:{type:"string"}},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"}},additionalProperties:!1},schema25={type:["string","object"],format:"date-time"},schema23={$schema:"http://json-schema.org/draft-07/schema",$id:"mediaFile.json",title:"Media File",description:"Any media file",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"mediaFile",enum:["mediaFile"]},name:{type:"string"},fileHash:{type:"string"},category:{type:"string",description:"This is the category id"},mimeType:{type:"string",enum:["image/*","image/jpeg","image/png","image/gif","image/webp","image/avif","image/svg+xml","application/pdf"]},data:{type:"string"},url:{type:"string",format:"uri"},width:{type:"integer",minimum:0},height:{type:"integer",minimum:0},size:{type:"integer",minimum:0,description:"Size in bytes"},uploadUrl:{type:"string",format:"uri"},uploadUrlExpires:{$ref:"definitions.json#/definitions/date"},createdBy:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"}},additionalProperties:!1,required:["type"]},formats0=require_formats().fullFormats.uri,formats4=require_formats().fullFormats["date-time"];function validate15(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="mediaFile"),void 0===data.type){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}for(const key0 in data)if(!func2.call(schema23.properties,key0)){const err1={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs6===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if("mediaFile"!==data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema23.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.fileHash&&"string"!=typeof data.fileHash){const err8={instancePath:instancePath+"/fileHash",schemaPath:"#/properties/fileHash/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.category&&"string"!=typeof data.category){const err9={instancePath:instancePath+"/category",schemaPath:"#/properties/category/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.mimeType){let data5=data.mimeType;if("string"!=typeof data5){const err10={instancePath:instancePath+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("image/*"!==data5&&"image/jpeg"!==data5&&"image/png"!==data5&&"image/gif"!==data5&&"image/webp"!==data5&&"image/avif"!==data5&&"image/svg+xml"!==data5&&"application/pdf"!==data5){const err11={instancePath:instancePath+"/mimeType",schemaPath:"#/properties/mimeType/enum",keyword:"enum",params:{allowedValues:schema23.properties.mimeType.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.data&&"string"!=typeof data.data){const err12={instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.url){let data7=data.url;if("string"==typeof data7){if(!formats0(data7)){const err13={instancePath:instancePath+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}else{const err14={instancePath:instancePath+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.width){let data8=data.width;if("number"!=typeof data8||data8%1||isNaN(data8)){const err15={instancePath:instancePath+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if("number"==typeof data8&&(data8<0||isNaN(data8))){const err16={instancePath:instancePath+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.height){let data9=data.height;if("number"!=typeof data9||data9%1||isNaN(data9)){const err17={instancePath:instancePath+"/height",schemaPath:"#/properties/height/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if("number"==typeof data9&&(data9<0||isNaN(data9))){const err18={instancePath:instancePath+"/height",schemaPath:"#/properties/height/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data.size){let data10=data.size;if("number"!=typeof data10||data10%1||isNaN(data10)){const err19={instancePath:instancePath+"/size",schemaPath:"#/properties/size/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if("number"==typeof data10&&(data10<0||isNaN(data10))){const err20={instancePath:instancePath+"/size",schemaPath:"#/properties/size/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}if(void 0!==data.uploadUrl){let data11=data.uploadUrl;if("string"==typeof data11){if(!formats0(data11)){const err21={instancePath:instancePath+"/uploadUrl",schemaPath:"#/properties/uploadUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}else{const err22={instancePath:instancePath+"/uploadUrl",schemaPath:"#/properties/uploadUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.uploadUrlExpires){let data12=data.uploadUrlExpires;if("string"!=typeof data12&&(!data12||"object"!=typeof data12||Array.isArray(data12))){const err23={instancePath:instancePath+"/uploadUrlExpires",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if("string"==typeof data12&&!formats4.validate(data12)){const err24={instancePath:instancePath+"/uploadUrlExpires",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.createdBy&&"string"!=typeof data.createdBy){const err25={instancePath:instancePath+"/createdBy",schemaPath:"#/properties/createdBy/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err26={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}else{const err27={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}return validate15.errors=vErrors,0===errors}function validate14(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){void 0===data.type&&(data.type="announcement");for(const key0 in data)if(!func2.call(schema21.properties,key0)){const err0={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err1={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err2={};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(_errs6===errors){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err4={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if("announcement"!==data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema21.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0!==data.users){let data2=data.users;if(Array.isArray(data2)){if(data2.length<1){const err6={instancePath:instancePath+"/users",schemaPath:"#/properties/users/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}const len0=data2.length;for(let i0=0;i0<len0;i0++)if("string"!=typeof data2[i0]){const err7={instancePath:instancePath+"/users/"+i0,schemaPath:"#/properties/users/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}}else{const err8={instancePath:instancePath+"/users",schemaPath:"#/properties/users/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.group&&"string"!=typeof data.group){const err9={instancePath:instancePath+"/group",schemaPath:"#/properties/group/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.body&&"string"!=typeof data.body){const err10={instancePath:instancePath+"/body",schemaPath:"#/properties/body/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.media&&(validate15(data.media,{instancePath:instancePath+"/media",parentData:data,parentDataProperty:"media",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length)),void 0!==data.sentBy&&"string"!=typeof data.sentBy){const err11={instancePath:instancePath+"/sentBy",schemaPath:"#/properties/sentBy/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.tags){let data8=data.tags;if(Array.isArray(data8)){const len1=data8.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data8[i1]){const err12={instancePath:instancePath+"/tags/"+i1,schemaPath:"#/properties/tags/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}else{const err13={instancePath:instancePath+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.createdAt){let data10=data.createdAt;if("string"!=typeof data10&&(!data10||"object"!=typeof data10||Array.isArray(data10))){const err14={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("string"==typeof data10&&!formats4.validate(data10)){const err15={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.updatedAt){let data11=data.updatedAt;if("string"!=typeof data11&&(!data11||"object"!=typeof data11||Array.isArray(data11))){const err16={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("string"==typeof data11&&!formats4.validate(data11)){const err17={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}}else{const err18={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}return validate14.errors=vErrors,0===errors}__name(validate15,"validate15"),__name(validate14,"validate14");var validateCamera=validate17,schema29={$schema:"http://json-schema.org/draft-07/schema",$id:"camera.json",title:"Camera",description:"Any smart camera",type:"object",required:["id","type","driver"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{type:"string",enum:["camera"],default:"camera"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},liveStreams:{type:"object",additionalProperties:!1,$comment:"This is now deprecated. Use liveStream instead. This will remain here for backwards compatibility.",properties:{iframe:{type:["string","null"]},hls:{type:["string","null"]},webRTC:{type:["string","null"]},rtsp:{type:["string","null"]}}},liveStream:{type:"object",additionalProperties:!1,properties:{id:{type:"string"},driver:{type:"string",enum:["cloudflare-stream","aws-kinesis","digital-watchdog","mediamtx"]},allowedOrigins:{type:"array",items:{type:"string"}},authRequired:{type:"boolean"},iframe:{type:["string","null"]},hls:{type:["string","null"]},webRTC:{type:["string","null"]},rtsp:{type:["string","null"],description:"Local RTSP stream URL",examples:["rtsp://192.168.1.4:544/channels/1","rtsp://10.145.6.129:8554/unicast"]},previewImage:{type:["string","null"],description:"Source to preview the camera stream",examples:["https://example.com/preview.jpg","data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QBYRXhpZgAATU0AKgAAAAgAA1EQAAEAAAABAQAAAFERAAQAAAABAAABAgABAA"]}}},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}}};function validate18(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate18.errors=vErrors,0===errors}function validate17(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="camera"),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.driver){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}for(const key0 in data)if(!func2.call(schema29.properties,key0)){const err3={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs6===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}let data2=data.type;if("string"!=typeof data2){const err8={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("camera"!==data2){const err9={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema29.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err10={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.supportedNotifications){let data4=data.supportedNotifications;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++){let data5=data4[i0];if("button 1"!==data5&&"button 2"!==data5&&"button 3"!==data5&&"button 4"!==data5&&"button 5"!==data5&&"idle"!==data5&&"powerHasBeedApplied"!==data5&&"acMainsDisconnected"!==data5&&"acMainsReconnected"!==data5&&"replaceBatterySoon"!==data5&&"replaceBatteryNow"!==data5&&"batteryOk"!==data5&&"hardwareFailure"!==data5&&"softwareFailure"!==data5&&"hardwareFailureWithCode"!==data5&&"softwareFailureWithCode"!==data5&&"motionDetection"!==data5&&"airFilterNeedsCleaned"!==data5&&"airFilterNeedsReplaced"!==data5&&"smokeDetected"!==data5&&"outsideSafeTemperatureRange"!==data5&&"outsideSafeHumidityRange"!==data5&&"scheduleMaintenance"!==data5&&"doorAjar"!==data5&&"communicationFailure"!==data5&&"communicationOk"!==data5&&"burglarAlarm"!==data5&&"fireAlarm"!==data5){const err11={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}let j0,i1=data4.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data4[i1],data4[j0])){const err12={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++;break outer0}}else{const err13={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.notification&&(validate18(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate18.errors:vErrors.concat(validate18.errors),errors=vErrors.length)),void 0!==data.driver){let data7=data.driver;if("string"!=typeof data7){const err14={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("adlink"!==data7&&"aws-kinesis"!==data7&&"butler"!==data7&&"crestron"!==data7&&"dell"!==data7&&"dmp"!==data7&&"doorbird"!==data7&&"dormakaba"!==data7&&"dsc"!==data7&&"ecobee"!==data7&&"epson"!==data7&&"geovision-rs"!==data7&&"geovision-as-manager"!==data7&&"honeywell-vista"!==data7&&"igor"!==data7&&"inncom"!==data7&&"isapi"!==data7&&"kohost-k7"!==data7&&"kohost"!==data7&&"lg"!==data7&&"lg-webos"!==data7&&"lapi"!==data7&&"lirc"!==data7&&"mews"!==data7&&"mht"!==data7&&"paxton"!==data7&&"pelican-wireless"!==data7&&"power-shades"!==data7&&"rachio"!==data7&&"rebrandly"!==data7&&"relay"!==data7&&"rtsp"!==data7&&"salto"!==data7&&"salto-irn"!==data7&&"samsung"!==data7&&"se"!==data7&&"sendgrid"!==data7&&"sonifi"!==data7&&"stay-n-touch"!==data7&&"storable"!==data7&&"twilio"!==data7&&"unifi"!==data7&&"valcom"!==data7&&"vivotek"!==data7&&"vizio"!==data7&&"wisenet"!==data7&&"cloudflare-images"!==data7&&"cloudflare-stream"!==data7&&"insperia-privacy"!==data7){const err15={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.liveStreams){let data8=data.liveStreams;if(data8&&"object"==typeof data8&&!Array.isArray(data8)){for(const key1 in data8)if("iframe"!==key1&&"hls"!==key1&&"webRTC"!==key1&&"rtsp"!==key1){const err16={instancePath:instancePath+"/liveStreams",schemaPath:"#/properties/liveStreams/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data8.iframe){let data9=data8.iframe;if("string"!=typeof data9&&null!==data9){const err17={instancePath:instancePath+"/liveStreams/iframe",schemaPath:"#/properties/liveStreams/properties/iframe/type",keyword:"type",params:{type:schema29.properties.liveStreams.properties.iframe.type},message:"must be string,null"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}if(void 0!==data8.hls){let data10=data8.hls;if("string"!=typeof data10&&null!==data10){const err18={instancePath:instancePath+"/liveStreams/hls",schemaPath:"#/properties/liveStreams/properties/hls/type",keyword:"type",params:{type:schema29.properties.liveStreams.properties.hls.type},message:"must be string,null"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data8.webRTC){let data11=data8.webRTC;if("string"!=typeof data11&&null!==data11){const err19={instancePath:instancePath+"/liveStreams/webRTC",schemaPath:"#/properties/liveStreams/properties/webRTC/type",keyword:"type",params:{type:schema29.properties.liveStreams.properties.webRTC.type},message:"must be string,null"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data8.rtsp){let data12=data8.rtsp;if("string"!=typeof data12&&null!==data12){const err20={instancePath:instancePath+"/liveStreams/rtsp",schemaPath:"#/properties/liveStreams/properties/rtsp/type",keyword:"type",params:{type:schema29.properties.liveStreams.properties.rtsp.type},message:"must be string,null"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}}else{const err21={instancePath:instancePath+"/liveStreams",schemaPath:"#/properties/liveStreams/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}if(void 0!==data.liveStream){let data13=data.liveStream;if(data13&&"object"==typeof data13&&!Array.isArray(data13)){for(const key2 in data13)if(!func2.call(schema29.properties.liveStream.properties,key2)){const err22={instancePath:instancePath+"/liveStream",schemaPath:"#/properties/liveStream/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key2},message:"must NOT have additional properties"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data13.id&&"string"!=typeof data13.id){const err23={instancePath:instancePath+"/liveStream/id",schemaPath:"#/properties/liveStream/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data13.driver){let data15=data13.driver;if("string"!=typeof data15){const err24={instancePath:instancePath+"/liveStream/driver",schemaPath:"#/properties/liveStream/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if("cloudflare-stream"!==data15&&"aws-kinesis"!==data15&&"digital-watchdog"!==data15&&"mediamtx"!==data15){const err25={instancePath:instancePath+"/liveStream/driver",schemaPath:"#/properties/liveStream/properties/driver/enum",keyword:"enum",params:{allowedValues:schema29.properties.liveStream.properties.driver.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}if(void 0!==data13.allowedOrigins){let data16=data13.allowedOrigins;if(Array.isArray(data16)){const len1=data16.length;for(let i2=0;i2<len1;i2++)if("string"!=typeof data16[i2]){const err26={instancePath:instancePath+"/liveStream/allowedOrigins/"+i2,schemaPath:"#/properties/liveStream/properties/allowedOrigins/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}else{const err27={instancePath:instancePath+"/liveStream/allowedOrigins",schemaPath:"#/properties/liveStream/properties/allowedOrigins/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}if(void 0!==data13.authRequired&&"boolean"!=typeof data13.authRequired){const err28={instancePath:instancePath+"/liveStream/authRequired",schemaPath:"#/properties/liveStream/properties/authRequired/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data13.iframe){let data19=data13.iframe;if("string"!=typeof data19&&null!==data19){const err29={instancePath:instancePath+"/liveStream/iframe",schemaPath:"#/properties/liveStream/properties/iframe/type",keyword:"type",params:{type:schema29.properties.liveStream.properties.iframe.type},message:"must be string,null"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}}if(void 0!==data13.hls){let data20=data13.hls;if("string"!=typeof data20&&null!==data20){const err30={instancePath:instancePath+"/liveStream/hls",schemaPath:"#/properties/liveStream/properties/hls/type",keyword:"type",params:{type:schema29.properties.liveStream.properties.hls.type},message:"must be string,null"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}if(void 0!==data13.webRTC){let data21=data13.webRTC;if("string"!=typeof data21&&null!==data21){const err31={instancePath:instancePath+"/liveStream/webRTC",schemaPath:"#/properties/liveStream/properties/webRTC/type",keyword:"type",params:{type:schema29.properties.liveStream.properties.webRTC.type},message:"must be string,null"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}if(void 0!==data13.rtsp){let data22=data13.rtsp;if("string"!=typeof data22&&null!==data22){const err32={instancePath:instancePath+"/liveStream/rtsp",schemaPath:"#/properties/liveStream/properties/rtsp/type",keyword:"type",params:{type:schema29.properties.liveStream.properties.rtsp.type},message:"must be string,null"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}if(void 0!==data13.previewImage){let data23=data13.previewImage;if("string"!=typeof data23&&null!==data23){const err33={instancePath:instancePath+"/liveStream/previewImage",schemaPath:"#/properties/liveStream/properties/previewImage/type",keyword:"type",params:{type:schema29.properties.liveStream.properties.previewImage.type},message:"must be string,null"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}}else{const err34={instancePath:instancePath+"/liveStream",schemaPath:"#/properties/liveStream/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err35={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(void 0!==data.watts){let data25=data.watts;if("number"==typeof data25){if(data25<0||isNaN(data25)){const err36={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}else{const err37={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err38={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err39={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err40={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err41={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}else{const err42={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}return validate17.errors=vErrors,0===errors}__name(validate18,"validate18"),__name(validate17,"validate17");var validateCategory=validate20,schema37={$schema:"http://json-schema.org/draft-07/schema",$id:"category.json",title:"Category",type:"object",required:["id","type","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["category"],default:"category"},name:{type:"string",minLength:1},driver:{$ref:"definitions.json#/definitions/driver"},description:{type:"string"},image:{$ref:"mediaFile.json"},rating:{type:"number",minimum:0,maximum:10,default:9},discriminator:{type:"string",enum:["space","product","mediaFile"]},systemId:{$ref:"definitions.json#/definitions/systemId"}}};function validate20(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="category"),void 0===data.rating&&(data.rating=9),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.discriminator){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs5===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if("category"!==data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema37.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.name){let data2=data.name;if("string"==typeof data2){if(func4(data2)<1){const err8={instancePath:instancePath+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}else{const err9={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.driver){let data3=data.driver;if("string"!=typeof data3){const err10={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("adlink"!==data3&&"aws-kinesis"!==data3&&"butler"!==data3&&"crestron"!==data3&&"dell"!==data3&&"dmp"!==data3&&"doorbird"!==data3&&"dormakaba"!==data3&&"dsc"!==data3&&"ecobee"!==data3&&"epson"!==data3&&"geovision-rs"!==data3&&"geovision-as-manager"!==data3&&"honeywell-vista"!==data3&&"igor"!==data3&&"inncom"!==data3&&"isapi"!==data3&&"kohost-k7"!==data3&&"kohost"!==data3&&"lg"!==data3&&"lg-webos"!==data3&&"lapi"!==data3&&"lirc"!==data3&&"mews"!==data3&&"mht"!==data3&&"paxton"!==data3&&"pelican-wireless"!==data3&&"power-shades"!==data3&&"rachio"!==data3&&"rebrandly"!==data3&&"relay"!==data3&&"rtsp"!==data3&&"salto"!==data3&&"salto-irn"!==data3&&"samsung"!==data3&&"se"!==data3&&"sendgrid"!==data3&&"sonifi"!==data3&&"stay-n-touch"!==data3&&"storable"!==data3&&"twilio"!==data3&&"unifi"!==data3&&"valcom"!==data3&&"vivotek"!==data3&&"vizio"!==data3&&"wisenet"!==data3&&"cloudflare-images"!==data3&&"cloudflare-stream"!==data3&&"insperia-privacy"!==data3){const err11={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err12={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}void 0!==data.image&&(validate15(data.image,{instancePath:instancePath+"/image",parentData:data,parentDataProperty:"image",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length));let data6=data.rating;if("number"==typeof data6){if(data6>10||isNaN(data6)){const err13={instancePath:instancePath+"/rating",schemaPath:"#/properties/rating/maximum",keyword:"maximum",params:{comparison:"<=",limit:10},message:"must be <= 10"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(data6<0||isNaN(data6)){const err14={instancePath:instancePath+"/rating",schemaPath:"#/properties/rating/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}else{const err15={instancePath:instancePath+"/rating",schemaPath:"#/properties/rating/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data.discriminator){let data7=data.discriminator;if("string"!=typeof data7){const err16={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("space"!==data7&&"product"!==data7&&"mediaFile"!==data7){const err17={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema37.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err18={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}else{const err19={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}return validate20.errors=vErrors,0===errors}__name(validate20,"validate20");var validateCourtesy=validate22,schema41={$schema:"http://json-schema.org/draft-07/schema",$id:"courtesy.json",title:"Courtesy",description:"Any smart courtesy system",type:"object",required:["id","type","driver","supportedStates","state"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},supportedStates:{type:"array",uniqueItems:!0,items:{enum:["privacy","service","none"]}},state:{type:"string",$ref:"#/properties/supportedStates/items"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}}},schema43={type:"string",enum:["alarm","dimmer","switch","motionSensor","windowCovering","camera","mediaSource","thermostat","lock","courtesy","gateway","tv","dvr","appleTv","discPlayer","mediaPlayer","uncontrolledDevice"]},schema48={enum:["privacy","service","none"]};function validate23(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate23.errors=vErrors,0===errors}function validate22(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.driver){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.supportedStates){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"supportedStates"},message:"must have required property 'supportedStates'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.state){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property 'state'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}for(const key0 in data)if(!func2.call(schema41.properties,key0)){const err5={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err7={};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(_errs6===errors){const err8={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err9={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.type){let data2=data.type;if("string"!=typeof data2){const err10={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("alarm"!==data2&&"dimmer"!==data2&&"switch"!==data2&&"motionSensor"!==data2&&"windowCovering"!==data2&&"camera"!==data2&&"mediaSource"!==data2&&"thermostat"!==data2&&"lock"!==data2&&"courtesy"!==data2&&"gateway"!==data2&&"tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"uncontrolledDevice"!==data2){const err11={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema43.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.supportedNotifications){let data3=data.supportedNotifications;if(Array.isArray(data3)){const len0=data3.length;for(let i0=0;i0<len0;i0++){let data4=data3[i0];if("button 1"!==data4&&"button 2"!==data4&&"button 3"!==data4&&"button 4"!==data4&&"button 5"!==data4&&"idle"!==data4&&"powerHasBeedApplied"!==data4&&"acMainsDisconnected"!==data4&&"acMainsReconnected"!==data4&&"replaceBatterySoon"!==data4&&"replaceBatteryNow"!==data4&&"batteryOk"!==data4&&"hardwareFailure"!==data4&&"softwareFailure"!==data4&&"hardwareFailureWithCode"!==data4&&"softwareFailureWithCode"!==data4&&"motionDetection"!==data4&&"airFilterNeedsCleaned"!==data4&&"airFilterNeedsReplaced"!==data4&&"smokeDetected"!==data4&&"outsideSafeTemperatureRange"!==data4&&"outsideSafeHumidityRange"!==data4&&"scheduleMaintenance"!==data4&&"doorAjar"!==data4&&"communicationFailure"!==data4&&"communicationOk"!==data4&&"burglarAlarm"!==data4&&"fireAlarm"!==data4){const err12={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}let j0,i1=data3.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data3[i1],data3[j0])){const err13={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++;break outer0}}else{const err14={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.notification&&(validate23(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate23.errors:vErrors.concat(validate23.errors),errors=vErrors.length)),void 0!==data.driver){let data6=data.driver;if("string"!=typeof data6){const err15={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if("adlink"!==data6&&"aws-kinesis"!==data6&&"butler"!==data6&&"crestron"!==data6&&"dell"!==data6&&"dmp"!==data6&&"doorbird"!==data6&&"dormakaba"!==data6&&"dsc"!==data6&&"ecobee"!==data6&&"epson"!==data6&&"geovision-rs"!==data6&&"geovision-as-manager"!==data6&&"honeywell-vista"!==data6&&"igor"!==data6&&"inncom"!==data6&&"isapi"!==data6&&"kohost-k7"!==data6&&"kohost"!==data6&&"lg"!==data6&&"lg-webos"!==data6&&"lapi"!==data6&&"lirc"!==data6&&"mews"!==data6&&"mht"!==data6&&"paxton"!==data6&&"pelican-wireless"!==data6&&"power-shades"!==data6&&"rachio"!==data6&&"rebrandly"!==data6&&"relay"!==data6&&"rtsp"!==data6&&"salto"!==data6&&"salto-irn"!==data6&&"samsung"!==data6&&"se"!==data6&&"sendgrid"!==data6&&"sonifi"!==data6&&"stay-n-touch"!==data6&&"storable"!==data6&&"twilio"!==data6&&"unifi"!==data6&&"valcom"!==data6&&"vivotek"!==data6&&"vizio"!==data6&&"wisenet"!==data6&&"cloudflare-images"!==data6&&"cloudflare-stream"!==data6&&"insperia-privacy"!==data6){const err16={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err17={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.supportedStates){let data8=data.supportedStates;if(Array.isArray(data8)){const len1=data8.length;for(let i2=0;i2<len1;i2++){let data9=data8[i2];if("privacy"!==data9&&"service"!==data9&&"none"!==data9){const err18={instancePath:instancePath+"/supportedStates/"+i2,schemaPath:"#/properties/supportedStates/items/enum",keyword:"enum",params:{allowedValues:schema41.properties.supportedStates.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}let j1,i3=data8.length;if(i3>1)outer1:for(;i3--;)for(j1=i3;j1--;)if(func0(data8[i3],data8[j1])){const err19={instancePath:instancePath+"/supportedStates",schemaPath:"#/properties/supportedStates/uniqueItems",keyword:"uniqueItems",params:{i:i3,j:j1},message:"must NOT have duplicate items (items ## "+j1+" and "+i3+" are identical)"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++;break outer1}}else{const err20={instancePath:instancePath+"/supportedStates",schemaPath:"#/properties/supportedStates/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}if(void 0!==data.state){let data10=data.state;if("string"!=typeof data10){const err21={instancePath:instancePath+"/state",schemaPath:"#/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if("privacy"!==data10&&"service"!==data10&&"none"!==data10){const err22={instancePath:instancePath+"/state",schemaPath:"#/properties/supportedStates/items/enum",keyword:"enum",params:{allowedValues:schema48.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err23={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data.watts){let data12=data.watts;if("number"==typeof data12){if(data12<0||isNaN(data12)){const err24={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}else{const err25={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err26={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err27={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err28={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err29={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}}else{const err30={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}return validate22.errors=vErrors,0===errors}__name(validate23,"validate23"),__name(validate22,"validate22");var validateCredential=validate25,schema51={$schema:"http://json-schema.org/draft-07/schema",$id:"credential.json",title:"Credential",type:"object",required:["type","credential","expires"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"credential"},driver:{$ref:"definitions.json#/definitions/driver"},discriminator:{type:"string",enum:["verificationCode","token","mobileKey","pin","publicKey","passkeyChallenge"]},credential:{type:"string"},userId:{type:"string"},organizationId:{type:"string"},propertyId:{type:"string"},deviceId:{type:"string"},userAgent:{type:"string"},expires:{type:["string","object","null"]},systemId:{$ref:"definitions.json#/definitions/systemId"}}};function validate25(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="credential"),void 0===data.type){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.credential){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"credential"},message:"must have required property 'credential'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.expires){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expires"},message:"must have required property 'expires'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs5===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if("string"!=typeof data.type){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.driver){let data2=data.driver;if("string"!=typeof data2){const err7={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("adlink"!==data2&&"aws-kinesis"!==data2&&"butler"!==data2&&"crestron"!==data2&&"dell"!==data2&&"dmp"!==data2&&"doorbird"!==data2&&"dormakaba"!==data2&&"dsc"!==data2&&"ecobee"!==data2&&"epson"!==data2&&"geovision-rs"!==data2&&"geovision-as-manager"!==data2&&"honeywell-vista"!==data2&&"igor"!==data2&&"inncom"!==data2&&"isapi"!==data2&&"kohost-k7"!==data2&&"kohost"!==data2&&"lg"!==data2&&"lg-webos"!==data2&&"lapi"!==data2&&"lirc"!==data2&&"mews"!==data2&&"mht"!==data2&&"paxton"!==data2&&"pelican-wireless"!==data2&&"power-shades"!==data2&&"rachio"!==data2&&"rebrandly"!==data2&&"relay"!==data2&&"rtsp"!==data2&&"salto"!==data2&&"salto-irn"!==data2&&"samsung"!==data2&&"se"!==data2&&"sendgrid"!==data2&&"sonifi"!==data2&&"stay-n-touch"!==data2&&"storable"!==data2&&"twilio"!==data2&&"unifi"!==data2&&"valcom"!==data2&&"vivotek"!==data2&&"vizio"!==data2&&"wisenet"!==data2&&"cloudflare-images"!==data2&&"cloudflare-stream"!==data2&&"insperia-privacy"!==data2){const err8={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.discriminator){let data3=data.discriminator;if("string"!=typeof data3){const err9={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("verificationCode"!==data3&&"token"!==data3&&"mobileKey"!==data3&&"pin"!==data3&&"publicKey"!==data3&&"passkeyChallenge"!==data3){const err10={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema51.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.credential&&"string"!=typeof data.credential){const err11={instancePath:instancePath+"/credential",schemaPath:"#/properties/credential/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.userId&&"string"!=typeof data.userId){const err12={instancePath:instancePath+"/userId",schemaPath:"#/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.organizationId&&"string"!=typeof data.organizationId){const err13={instancePath:instancePath+"/organizationId",schemaPath:"#/properties/organizationId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.propertyId&&"string"!=typeof data.propertyId){const err14={instancePath:instancePath+"/propertyId",schemaPath:"#/properties/propertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data.deviceId&&"string"!=typeof data.deviceId){const err15={instancePath:instancePath+"/deviceId",schemaPath:"#/properties/deviceId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data.userAgent&&"string"!=typeof data.userAgent){const err16={instancePath:instancePath+"/userAgent",schemaPath:"#/properties/userAgent/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.expires){let data10=data.expires;if("string"!=typeof data10&&(!data10||"object"!=typeof data10||Array.isArray(data10))&&null!==data10){const err17={instancePath:instancePath+"/expires",schemaPath:"#/properties/expires/type",keyword:"type",params:{type:schema51.properties.expires.type},message:"must be string,object,null"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err18={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}else{const err19={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}return validate25.errors=vErrors,0===errors}__name(validate25,"validate25");var validateDeviceRouter=validate26,schema55={$schema:"http://json-schema.org/draft-07/schema",$id:"deviceRouter.json",title:"Device Router",description:"A device router contains instructions on where to route devices based on their organization and driver.",type:"object",required:["driver","organizationId"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"deviceRouter",enum:["deviceRouter"]},driver:{type:"string"},organizationId:{type:["string","null"],description:"Reference (id) to the organization that owns this router"},devices:{type:"object",additionalProperties:!0}}};function validate26(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="deviceRouter"),void 0===data.driver){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.organizationId){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"organizationId"},message:"must have required property 'organizationId'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}for(const key0 in data)if("id"!==key0&&"type"!==key0&&"driver"!==key0&&"organizationId"!==key0&&"devices"!==key0){const err2={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs6===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if("deviceRouter"!==data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema55.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.driver&&"string"!=typeof data.driver){const err8={instancePath:instancePath+"/driver",schemaPath:"#/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.organizationId){let data3=data.organizationId;if("string"!=typeof data3&&null!==data3){const err9={instancePath:instancePath+"/organizationId",schemaPath:"#/properties/organizationId/type",keyword:"type",params:{type:schema55.properties.organizationId.type},message:"must be string,null"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.devices){let data4=data.devices;if(!data4||"object"!=typeof data4||Array.isArray(data4)){const err10={instancePath:instancePath+"/devices",schemaPath:"#/properties/devices/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}}else{const err11={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}return validate26.errors=vErrors,0===errors}__name(validate26,"validate26");var validateDimmer=validate27,schema57={$schema:"http://json-schema.org/draft-07/schema",$id:"dimmer.json",title:"Dimmer",description:"Any smart dimmer",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},level:{type:["number","null"],minimum:0,maximum:100},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","level","driver"]};function validate28(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate28.errors=vErrors,0===errors}function validate27(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.level){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"level"},message:"must have required property 'level'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.driver){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.type){let data2=data.type;if("string"!=typeof data2){const err8={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("alarm"!==data2&&"dimmer"!==data2&&"switch"!==data2&&"motionSensor"!==data2&&"windowCovering"!==data2&&"camera"!==data2&&"mediaSource"!==data2&&"thermostat"!==data2&&"lock"!==data2&&"courtesy"!==data2&&"gateway"!==data2&&"tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"uncontrolledDevice"!==data2){const err9={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema43.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.supportedNotifications){let data3=data.supportedNotifications;if(Array.isArray(data3)){const len0=data3.length;for(let i0=0;i0<len0;i0++){let data4=data3[i0];if("button 1"!==data4&&"button 2"!==data4&&"button 3"!==data4&&"button 4"!==data4&&"button 5"!==data4&&"idle"!==data4&&"powerHasBeedApplied"!==data4&&"acMainsDisconnected"!==data4&&"acMainsReconnected"!==data4&&"replaceBatterySoon"!==data4&&"replaceBatteryNow"!==data4&&"batteryOk"!==data4&&"hardwareFailure"!==data4&&"softwareFailure"!==data4&&"hardwareFailureWithCode"!==data4&&"softwareFailureWithCode"!==data4&&"motionDetection"!==data4&&"airFilterNeedsCleaned"!==data4&&"airFilterNeedsReplaced"!==data4&&"smokeDetected"!==data4&&"outsideSafeTemperatureRange"!==data4&&"outsideSafeHumidityRange"!==data4&&"scheduleMaintenance"!==data4&&"doorAjar"!==data4&&"communicationFailure"!==data4&&"communicationOk"!==data4&&"burglarAlarm"!==data4&&"fireAlarm"!==data4){const err10={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}let j0,i1=data3.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data3[i1],data3[j0])){const err11={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++;break outer0}}else{const err12={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.notification&&(validate28(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate28.errors:vErrors.concat(validate28.errors),errors=vErrors.length)),void 0!==data.driver){let data6=data.driver;if("string"!=typeof data6){const err13={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if("adlink"!==data6&&"aws-kinesis"!==data6&&"butler"!==data6&&"crestron"!==data6&&"dell"!==data6&&"dmp"!==data6&&"doorbird"!==data6&&"dormakaba"!==data6&&"dsc"!==data6&&"ecobee"!==data6&&"epson"!==data6&&"geovision-rs"!==data6&&"geovision-as-manager"!==data6&&"honeywell-vista"!==data6&&"igor"!==data6&&"inncom"!==data6&&"isapi"!==data6&&"kohost-k7"!==data6&&"kohost"!==data6&&"lg"!==data6&&"lg-webos"!==data6&&"lapi"!==data6&&"lirc"!==data6&&"mews"!==data6&&"mht"!==data6&&"paxton"!==data6&&"pelican-wireless"!==data6&&"power-shades"!==data6&&"rachio"!==data6&&"rebrandly"!==data6&&"relay"!==data6&&"rtsp"!==data6&&"salto"!==data6&&"salto-irn"!==data6&&"samsung"!==data6&&"se"!==data6&&"sendgrid"!==data6&&"sonifi"!==data6&&"stay-n-touch"!==data6&&"storable"!==data6&&"twilio"!==data6&&"unifi"!==data6&&"valcom"!==data6&&"vivotek"!==data6&&"vizio"!==data6&&"wisenet"!==data6&&"cloudflare-images"!==data6&&"cloudflare-stream"!==data6&&"insperia-privacy"!==data6){const err14={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err15={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data.level){let data8=data.level;if("number"!=typeof data8&&null!==data8){const err16={instancePath:instancePath+"/level",schemaPath:"#/properties/level/type",keyword:"type",params:{type:schema57.properties.level.type},message:"must be number,null"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("number"==typeof data8){if(data8>100||isNaN(data8)){const err17={instancePath:instancePath+"/level",schemaPath:"#/properties/level/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(data8<0||isNaN(data8)){const err18={instancePath:instancePath+"/level",schemaPath:"#/properties/level/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err19={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.watts){let data10=data.watts;if("number"==typeof data10){if(data10<0||isNaN(data10)){const err20={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}else{const err21={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err22={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err23={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err24={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err25={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}else{const err26={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}return validate27.errors=vErrors,0===errors}__name(validate28,"validate28"),__name(validate27,"validate27");var validateDiscoveredDevice=validate30,schema66={$schema:"http://json-schema.org/draft-07/schema",$id:"discoveredDevice.json",title:"Discovered Device",description:"A device that has been discovered by Kohost, but not yet added to the Kohost system.",type:"object",required:["name","deviceId","deviceData"],properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},deviceId:{type:"string"},type:{type:"string",enum:["discoveredDevice"],default:"discoveredDevice"},discriminator:{$ref:"definitions.json#/definitions/type"},driver:{type:"string"},deviceData:{type:"object"},ignore:{type:"boolean"},organizationId:{type:["string","null"],description:"Reference (id) to the organization that owns this device"},propertyId:{type:["string","null"],description:"Reference (id) to the property that this device belongs to"}}};function validate30(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="discoveredDevice"),void 0===data.name){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.deviceId){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"deviceId"},message:"must have required property 'deviceId'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.deviceData){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"deviceData"},message:"must have required property 'deviceData'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs5===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err6={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.deviceId&&"string"!=typeof data.deviceId){const err7={instancePath:instancePath+"/deviceId",schemaPath:"#/properties/deviceId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}let data3=data.type;if("string"!=typeof data3){const err8={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("discoveredDevice"!==data3){const err9={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema66.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.discriminator){let data4=data.discriminator;if("string"!=typeof data4){const err10={instancePath:instancePath+"/discriminator",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("alarm"!==data4&&"dimmer"!==data4&&"switch"!==data4&&"motionSensor"!==data4&&"windowCovering"!==data4&&"camera"!==data4&&"mediaSource"!==data4&&"thermostat"!==data4&&"lock"!==data4&&"courtesy"!==data4&&"gateway"!==data4&&"tv"!==data4&&"dvr"!==data4&&"appleTv"!==data4&&"discPlayer"!==data4&&"mediaPlayer"!==data4&&"uncontrolledDevice"!==data4){const err11={instancePath:instancePath+"/discriminator",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema43.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.driver&&"string"!=typeof data.driver){const err12={instancePath:instancePath+"/driver",schemaPath:"#/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.deviceData){let data6=data.deviceData;if(!data6||"object"!=typeof data6||Array.isArray(data6)){const err13={instancePath:instancePath+"/deviceData",schemaPath:"#/properties/deviceData/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.ignore&&"boolean"!=typeof data.ignore){const err14={instancePath:instancePath+"/ignore",schemaPath:"#/properties/ignore/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data.organizationId){let data8=data.organizationId;if("string"!=typeof data8&&null!==data8){const err15={instancePath:instancePath+"/organizationId",schemaPath:"#/properties/organizationId/type",keyword:"type",params:{type:schema66.properties.organizationId.type},message:"must be string,null"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.propertyId){let data9=data.propertyId;if("string"!=typeof data9&&null!==data9){const err16={instancePath:instancePath+"/propertyId",schemaPath:"#/properties/propertyId/type",keyword:"type",params:{type:schema66.properties.propertyId.type},message:"must be string,null"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}}else{const err17={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}return validate30.errors=vErrors,0===errors}__name(validate30,"validate30");var validateEmailMessage=validate31,schema69={$schema:"http://json-schema.org/draft-07/schema",$id:"emailMessage.json",title:"Email Message",type:"object",required:["to","from","status","subject"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"emailMessage",enum:["emailMessage"]},to:{type:"string",pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"},from:{type:"string",pattern:".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*",description:"Must be in the format of 'Sender <email@example.com>"},subject:{type:"string"},status:{type:"string",enum:["queued","sending","sent","deferred","delivered","undelivered","bounced","blocked","receiving","received","opened","clicked","unsubscribed","spamReport"]},statusMessage:{type:"string"},html:{type:"string"},text:{type:"string"},driver:{type:"string"},appData:{type:"object"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},systemId:{$ref:"definitions.json#/definitions/systemId"}}},pattern0=new RegExp("^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$","u"),pattern1=new RegExp(".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*","u");function validate31(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="emailMessage"),void 0===data.to){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"to"},message:"must have required property 'to'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.from){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"from"},message:"must have required property 'from'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.status){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.subject){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"subject"},message:"must have required property 'subject'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("emailMessage"!==data1){const err8={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema69.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.to){let data2=data.to;if("string"==typeof data2){if(!pattern0.test(data2)){const err9={instancePath:instancePath+"/to",schemaPath:"#/properties/to/pattern",keyword:"pattern",params:{pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"},message:'must match pattern "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"'};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}else{const err10={instancePath:instancePath+"/to",schemaPath:"#/properties/to/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.from){let data3=data.from;if("string"==typeof data3){if(!pattern1.test(data3)){const err11={instancePath:instancePath+"/from",schemaPath:"#/properties/from/pattern",keyword:"pattern",params:{pattern:".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*"},message:'must match pattern ".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*"'};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}else{const err12={instancePath:instancePath+"/from",schemaPath:"#/properties/from/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.subject&&"string"!=typeof data.subject){const err13={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.status){let data5=data.status;if("string"!=typeof data5){const err14={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("queued"!==data5&&"sending"!==data5&&"sent"!==data5&&"deferred"!==data5&&"delivered"!==data5&&"undelivered"!==data5&&"bounced"!==data5&&"blocked"!==data5&&"receiving"!==data5&&"received"!==data5&&"opened"!==data5&&"clicked"!==data5&&"unsubscribed"!==data5&&"spamReport"!==data5){const err15={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema69.properties.status.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.statusMessage&&"string"!=typeof data.statusMessage){const err16={instancePath:instancePath+"/statusMessage",schemaPath:"#/properties/statusMessage/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.html&&"string"!=typeof data.html){const err17={instancePath:instancePath+"/html",schemaPath:"#/properties/html/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.text&&"string"!=typeof data.text){const err18={instancePath:instancePath+"/text",schemaPath:"#/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data.driver&&"string"!=typeof data.driver){const err19={instancePath:instancePath+"/driver",schemaPath:"#/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.appData){let data10=data.appData;if(!data10||"object"!=typeof data10||Array.isArray(data10)){const err20={instancePath:instancePath+"/appData",schemaPath:"#/properties/appData/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}if(void 0!==data.createdAt){let data11=data.createdAt;if("string"!=typeof data11&&(!data11||"object"!=typeof data11||Array.isArray(data11))){const err21={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if("string"==typeof data11&&!formats4.validate(data11)){const err22={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.updatedAt){let data12=data.updatedAt;if("string"!=typeof data12&&(!data12||"object"!=typeof data12||Array.isArray(data12))){const err23={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if("string"==typeof data12&&!formats4.validate(data12)){const err24={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err25={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}else{const err26={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}return validate31.errors=vErrors,0===errors}__name(validate31,"validate31");var validateEnergyReport=validate32,schema74={$schema:"http://json-schema.org/draft-07/schema",$id:"energyReport.json",title:"Energy Report",description:"Hourly Report for Energy based on energy report shards",type:"object",required:["id","type","roomId","first","last","consumption","totals","costPerKw"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["energyReport"],default:"energyReport"},reportTime:{type:"string",enum:["hourly","daily","monthly"]},roomId:{$ref:"definitions.json#/definitions/id"},first:{type:["string","object"],format:"date-time"},last:{type:["string","object"],format:"date-time"},consumption:{type:"array",items:{type:"object",required:["id","type","kwh"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},kwh:{type:"number",minimum:0}}}},totals:{type:"array",items:{type:"object",required:["lights","climate","media"],properties:{lights:{type:"number",minimum:0},climate:{type:"number",minimum:0},media:{type:"number",minimum:0}}}},costPerKw:{type:"number",minimum:0}}};function validate32(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="energyReport"),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.roomId){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"roomId"},message:"must have required property 'roomId'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.first){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"first"},message:"must have required property 'first'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.last){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"last"},message:"must have required property 'last'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.consumption){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"consumption"},message:"must have required property 'consumption'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0===data.totals){const err6={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"totals"},message:"must have required property 'totals'"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0===data.costPerKw){const err7={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"costPerKw"},message:"must have required property 'costPerKw'"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err8={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err9={};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(_errs5===errors){const err10={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("energyReport"!==data1){const err12={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema74.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.reportTime){let data2=data.reportTime;if("string"!=typeof data2){const err13={instancePath:instancePath+"/reportTime",schemaPath:"#/properties/reportTime/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if("hourly"!==data2&&"daily"!==data2&&"monthly"!==data2){const err14={instancePath:instancePath+"/reportTime",schemaPath:"#/properties/reportTime/enum",keyword:"enum",params:{allowedValues:schema74.properties.reportTime.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.roomId){let data3=data.roomId;if("string"!=typeof data3){const err15={instancePath:instancePath+"/roomId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}const _errs13=errors,_errs14=errors;if("global"!==data3&&"system"!==data3){const err16={};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(_errs14===errors){const err17={instancePath:instancePath+"/roomId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}else errors=_errs13,null!==vErrors&&(_errs13?vErrors.length=_errs13:vErrors=null)}if(void 0!==data.first){let data4=data.first;if("string"!=typeof data4&&(!data4||"object"!=typeof data4||Array.isArray(data4))){const err18={instancePath:instancePath+"/first",schemaPath:"#/properties/first/type",keyword:"type",params:{type:schema74.properties.first.type},message:"must be string,object"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if("string"==typeof data4&&!formats4.validate(data4)){const err19={instancePath:instancePath+"/first",schemaPath:"#/properties/first/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data.last){let data5=data.last;if("string"!=typeof data5&&(!data5||"object"!=typeof data5||Array.isArray(data5))){const err20={instancePath:instancePath+"/last",schemaPath:"#/properties/last/type",keyword:"type",params:{type:schema74.properties.last.type},message:"must be string,object"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if("string"==typeof data5&&!formats4.validate(data5)){const err21={instancePath:instancePath+"/last",schemaPath:"#/properties/last/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}if(void 0!==data.consumption){let data6=data.consumption;if(Array.isArray(data6)){const len0=data6.length;for(let i0=0;i0<len0;i0++){let data7=data6[i0];if(data7&&"object"==typeof data7&&!Array.isArray(data7)){if(void 0===data7.id){const err22={instancePath:instancePath+"/consumption/"+i0,schemaPath:"#/properties/consumption/items/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0===data7.type){const err23={instancePath:instancePath+"/consumption/"+i0,schemaPath:"#/properties/consumption/items/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0===data7.kwh){const err24={instancePath:instancePath+"/consumption/"+i0,schemaPath:"#/properties/consumption/items/required",keyword:"required",params:{missingProperty:"kwh"},message:"must have required property 'kwh'"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data7.id){let data8=data7.id;if("string"!=typeof data8){const err25={instancePath:instancePath+"/consumption/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}const _errs26=errors,_errs27=errors;if("global"!==data8&&"system"!==data8){const err26={};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(_errs27===errors){const err27={instancePath:instancePath+"/consumption/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}else errors=_errs26,null!==vErrors&&(_errs26?vErrors.length=_errs26:vErrors=null)}if(void 0!==data7.type){let data9=data7.type;if("string"!=typeof data9){const err28={instancePath:instancePath+"/consumption/"+i0+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if("alarm"!==data9&&"dimmer"!==data9&&"switch"!==data9&&"motionSensor"!==data9&&"windowCovering"!==data9&&"camera"!==data9&&"mediaSource"!==data9&&"thermostat"!==data9&&"lock"!==data9&&"courtesy"!==data9&&"gateway"!==data9&&"tv"!==data9&&"dvr"!==data9&&"appleTv"!==data9&&"discPlayer"!==data9&&"mediaPlayer"!==data9&&"uncontrolledDevice"!==data9){const err29={instancePath:instancePath+"/consumption/"+i0+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema43.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}}if(void 0!==data7.kwh){let data10=data7.kwh;if("number"==typeof data10){if(data10<0||isNaN(data10)){const err30={instancePath:instancePath+"/consumption/"+i0+"/kwh",schemaPath:"#/properties/consumption/items/properties/kwh/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}else{const err31={instancePath:instancePath+"/consumption/"+i0+"/kwh",schemaPath:"#/properties/consumption/items/properties/kwh/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}}else{const err32={instancePath:instancePath+"/consumption/"+i0,schemaPath:"#/properties/consumption/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}}else{const err33={instancePath:instancePath+"/consumption",schemaPath:"#/properties/consumption/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}if(void 0!==data.totals){let data11=data.totals;if(Array.isArray(data11)){const len1=data11.length;for(let i1=0;i1<len1;i1++){let data12=data11[i1];if(data12&&"object"==typeof data12&&!Array.isArray(data12)){if(void 0===data12.lights){const err34={instancePath:instancePath+"/totals/"+i1,schemaPath:"#/properties/totals/items/required",keyword:"required",params:{missingProperty:"lights"},message:"must have required property 'lights'"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(void 0===data12.climate){const err35={instancePath:instancePath+"/totals/"+i1,schemaPath:"#/properties/totals/items/required",keyword:"required",params:{missingProperty:"climate"},message:"must have required property 'climate'"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(void 0===data12.media){const err36={instancePath:instancePath+"/totals/"+i1,schemaPath:"#/properties/totals/items/required",keyword:"required",params:{missingProperty:"media"},message:"must have required property 'media'"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if(void 0!==data12.lights){let data13=data12.lights;if("number"==typeof data13){if(data13<0||isNaN(data13)){const err37={instancePath:instancePath+"/totals/"+i1+"/lights",schemaPath:"#/properties/totals/items/properties/lights/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}else{const err38={instancePath:instancePath+"/totals/"+i1+"/lights",schemaPath:"#/properties/totals/items/properties/lights/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}if(void 0!==data12.climate){let data14=data12.climate;if("number"==typeof data14){if(data14<0||isNaN(data14)){const err39={instancePath:instancePath+"/totals/"+i1+"/climate",schemaPath:"#/properties/totals/items/properties/climate/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}else{const err40={instancePath:instancePath+"/totals/"+i1+"/climate",schemaPath:"#/properties/totals/items/properties/climate/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}}if(void 0!==data12.media){let data15=data12.media;if("number"==typeof data15){if(data15<0||isNaN(data15)){const err41={instancePath:instancePath+"/totals/"+i1+"/media",schemaPath:"#/properties/totals/items/properties/media/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}else{const err42={instancePath:instancePath+"/totals/"+i1+"/media",schemaPath:"#/properties/totals/items/properties/media/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}}}else{const err43={instancePath:instancePath+"/totals/"+i1,schemaPath:"#/properties/totals/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}}}else{const err44={instancePath:instancePath+"/totals",schemaPath:"#/properties/totals/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}if(void 0!==data.costPerKw){let data16=data.costPerKw;if("number"==typeof data16){if(data16<0||isNaN(data16)){const err45={instancePath:instancePath+"/costPerKw",schemaPath:"#/properties/costPerKw/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}else{const err46={instancePath:instancePath+"/costPerKw",schemaPath:"#/properties/costPerKw/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}}else{const err47={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}return validate32.errors=vErrors,0===errors}__name(validate32,"validate32");var validateEnergyReportShard=validate33,schema79={$schema:"http://json-schema.org/draft-07/schema",$id:"energyReportShard.json",title:"Energy Report Shard",description:"Shard used for Energy Reports",type:"object",required:["id","type","roomId","first","last","data","ndata","expires"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["energyReportShard"],default:"energyReportShard"},roomId:{$ref:"definitions.json#/definitions/id"},first:{type:["string","object"],format:"date-time"},last:{type:["string","object"],format:"date-time"},data:{type:"array",items:{type:"object",required:["time","watts","id","type","value"],properties:{time:{type:["string","object"],format:"date-time"},watts:{$ref:"definitions.json#/definitions/watts"},id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},value:{type:"number",minimum:0,maximum:1}}}},ndata:{type:"integer",minimum:0,maximum:1e5,default:0},expires:{type:["string","object"],format:"date-time"}}};function validate33(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="energyReportShard"),void 0===data.ndata&&(data.ndata=0),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.roomId){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"roomId"},message:"must have required property 'roomId'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.first){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"first"},message:"must have required property 'first'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.last){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"last"},message:"must have required property 'last'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.data){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0===data.ndata){const err6={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"ndata"},message:"must have required property 'ndata'"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0===data.expires){const err7={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expires"},message:"must have required property 'expires'"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err8={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err9={};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(_errs5===errors){const err10={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("energyReportShard"!==data1){const err12={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema79.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.roomId){let data2=data.roomId;if("string"!=typeof data2){const err13={instancePath:instancePath+"/roomId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}const _errs11=errors,_errs12=errors;if("global"!==data2&&"system"!==data2){const err14={};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(_errs12===errors){const err15={instancePath:instancePath+"/roomId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}else errors=_errs11,null!==vErrors&&(_errs11?vErrors.length=_errs11:vErrors=null)}if(void 0!==data.first){let data3=data.first;if("string"!=typeof data3&&(!data3||"object"!=typeof data3||Array.isArray(data3))){const err16={instancePath:instancePath+"/first",schemaPath:"#/properties/first/type",keyword:"type",params:{type:schema79.properties.first.type},message:"must be string,object"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("string"==typeof data3&&!formats4.validate(data3)){const err17={instancePath:instancePath+"/first",schemaPath:"#/properties/first/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}if(void 0!==data.last){let data4=data.last;if("string"!=typeof data4&&(!data4||"object"!=typeof data4||Array.isArray(data4))){const err18={instancePath:instancePath+"/last",schemaPath:"#/properties/last/type",keyword:"type",params:{type:schema79.properties.last.type},message:"must be string,object"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if("string"==typeof data4&&!formats4.validate(data4)){const err19={instancePath:instancePath+"/last",schemaPath:"#/properties/last/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data.data){let data5=data.data;if(Array.isArray(data5)){const len0=data5.length;for(let i0=0;i0<len0;i0++){let data6=data5[i0];if(data6&&"object"==typeof data6&&!Array.isArray(data6)){if(void 0===data6.time){const err20={instancePath:instancePath+"/data/"+i0,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"time"},message:"must have required property 'time'"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0===data6.watts){const err21={instancePath:instancePath+"/data/"+i0,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"watts"},message:"must have required property 'watts'"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0===data6.id){const err22={instancePath:instancePath+"/data/"+i0,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0===data6.type){const err23={instancePath:instancePath+"/data/"+i0,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0===data6.value){const err24={instancePath:instancePath+"/data/"+i0,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data6.time){let data7=data6.time;if("string"!=typeof data7&&(!data7||"object"!=typeof data7||Array.isArray(data7))){const err25={instancePath:instancePath+"/data/"+i0+"/time",schemaPath:"#/properties/data/items/properties/time/type",keyword:"type",params:{type:schema79.properties.data.items.properties.time.type},message:"must be string,object"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if("string"==typeof data7&&!formats4.validate(data7)){const err26={instancePath:instancePath+"/data/"+i0+"/time",schemaPath:"#/properties/data/items/properties/time/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}if(void 0!==data6.watts){let data8=data6.watts;if("number"==typeof data8){if(data8<0||isNaN(data8)){const err27={instancePath:instancePath+"/data/"+i0+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}else{const err28={instancePath:instancePath+"/data/"+i0+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}if(void 0!==data6.id){let data9=data6.id;if("string"!=typeof data9){const err29={instancePath:instancePath+"/data/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}const _errs29=errors,_errs30=errors;if("global"!==data9&&"system"!==data9){const err30={};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(_errs30===errors){const err31={instancePath:instancePath+"/data/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}else errors=_errs29,null!==vErrors&&(_errs29?vErrors.length=_errs29:vErrors=null)}if(void 0!==data6.type){let data10=data6.type;if("string"!=typeof data10){const err32={instancePath:instancePath+"/data/"+i0+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if("alarm"!==data10&&"dimmer"!==data10&&"switch"!==data10&&"motionSensor"!==data10&&"windowCovering"!==data10&&"camera"!==data10&&"mediaSource"!==data10&&"thermostat"!==data10&&"lock"!==data10&&"courtesy"!==data10&&"gateway"!==data10&&"tv"!==data10&&"dvr"!==data10&&"appleTv"!==data10&&"discPlayer"!==data10&&"mediaPlayer"!==data10&&"uncontrolledDevice"!==data10){const err33={instancePath:instancePath+"/data/"+i0+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema43.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}if(void 0!==data6.value){let data11=data6.value;if("number"==typeof data11){if(data11>1||isNaN(data11)){const err34={instancePath:instancePath+"/data/"+i0+"/value",schemaPath:"#/properties/data/items/properties/value/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(data11<0||isNaN(data11)){const err35={instancePath:instancePath+"/data/"+i0+"/value",schemaPath:"#/properties/data/items/properties/value/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}}else{const err36={instancePath:instancePath+"/data/"+i0+"/value",schemaPath:"#/properties/data/items/properties/value/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}}else{const err37={instancePath:instancePath+"/data/"+i0,schemaPath:"#/properties/data/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}}else{const err38={instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}let data12=data.ndata;if("number"!=typeof data12||data12%1||isNaN(data12)){const err39={instancePath:instancePath+"/ndata",schemaPath:"#/properties/ndata/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}if("number"==typeof data12){if(data12>1e5||isNaN(data12)){const err40={instancePath:instancePath+"/ndata",schemaPath:"#/properties/ndata/maximum",keyword:"maximum",params:{comparison:"<=",limit:1e5},message:"must be <= 100000"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if(data12<0||isNaN(data12)){const err41={instancePath:instancePath+"/ndata",schemaPath:"#/properties/ndata/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}if(void 0!==data.expires){let data13=data.expires;if("string"!=typeof data13&&(!data13||"object"!=typeof data13||Array.isArray(data13))){const err42={instancePath:instancePath+"/expires",schemaPath:"#/properties/expires/type",keyword:"type",params:{type:schema79.properties.expires.type},message:"must be string,object"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if("string"==typeof data13&&!formats4.validate(data13)){const err43={instancePath:instancePath+"/expires",schemaPath:"#/properties/expires/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}}}else{const err44={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}return validate33.errors=vErrors,0===errors}__name(validate33,"validate33");var validateGateway=validate34;function validate35(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate35.errors=vErrors,0===errors}function validate34(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.status){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.driver){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.type){let data1=data.type;if("string"!=typeof data1){const err7={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("alarm"!==data1&&"dimmer"!==data1&&"switch"!==data1&&"motionSensor"!==data1&&"windowCovering"!==data1&&"camera"!==data1&&"mediaSource"!==data1&&"thermostat"!==data1&&"lock"!==data1&&"courtesy"!==data1&&"gateway"!==data1&&"tv"!==data1&&"dvr"!==data1&&"appleTv"!==data1&&"discPlayer"!==data1&&"mediaPlayer"!==data1&&"uncontrolledDevice"!==data1){const err8={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema43.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.supportedNotifications){let data2=data.supportedNotifications;if(Array.isArray(data2)){const len0=data2.length;for(let i0=0;i0<len0;i0++){let data3=data2[i0];if("button 1"!==data3&&"button 2"!==data3&&"button 3"!==data3&&"button 4"!==data3&&"button 5"!==data3&&"idle"!==data3&&"powerHasBeedApplied"!==data3&&"acMainsDisconnected"!==data3&&"acMainsReconnected"!==data3&&"replaceBatterySoon"!==data3&&"replaceBatteryNow"!==data3&&"batteryOk"!==data3&&"hardwareFailure"!==data3&&"softwareFailure"!==data3&&"hardwareFailureWithCode"!==data3&&"softwareFailureWithCode"!==data3&&"motionDetection"!==data3&&"airFilterNeedsCleaned"!==data3&&"airFilterNeedsReplaced"!==data3&&"smokeDetected"!==data3&&"outsideSafeTemperatureRange"!==data3&&"outsideSafeHumidityRange"!==data3&&"scheduleMaintenance"!==data3&&"doorAjar"!==data3&&"communicationFailure"!==data3&&"communicationOk"!==data3&&"burglarAlarm"!==data3&&"fireAlarm"!==data3){const err9={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}let j0,i1=data2.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data2[i1],data2[j0])){const err10={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++;break outer0}}else{const err11={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.notification&&(validate35(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate35.errors:vErrors.concat(validate35.errors),errors=vErrors.length)),void 0!==data.status&&"string"!=typeof data.status){const err12={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err13={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.driver){let data7=data.driver;if("string"!=typeof data7){const err14={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("adlink"!==data7&&"aws-kinesis"!==data7&&"butler"!==data7&&"crestron"!==data7&&"dell"!==data7&&"dmp"!==data7&&"doorbird"!==data7&&"dormakaba"!==data7&&"dsc"!==data7&&"ecobee"!==data7&&"epson"!==data7&&"geovision-rs"!==data7&&"geovision-as-manager"!==data7&&"honeywell-vista"!==data7&&"igor"!==data7&&"inncom"!==data7&&"isapi"!==data7&&"kohost-k7"!==data7&&"kohost"!==data7&&"lg"!==data7&&"lg-webos"!==data7&&"lapi"!==data7&&"lirc"!==data7&&"mews"!==data7&&"mht"!==data7&&"paxton"!==data7&&"pelican-wireless"!==data7&&"power-shades"!==data7&&"rachio"!==data7&&"rebrandly"!==data7&&"relay"!==data7&&"rtsp"!==data7&&"salto"!==data7&&"salto-irn"!==data7&&"samsung"!==data7&&"se"!==data7&&"sendgrid"!==data7&&"sonifi"!==data7&&"stay-n-touch"!==data7&&"storable"!==data7&&"twilio"!==data7&&"unifi"!==data7&&"valcom"!==data7&&"vivotek"!==data7&&"vizio"!==data7&&"wisenet"!==data7&&"cloudflare-images"!==data7&&"cloudflare-stream"!==data7&&"insperia-privacy"!==data7){const err15={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.watts){let data8=data.watts;if("number"==typeof data8){if(data8<0||isNaN(data8)){const err16={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}else{const err17={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err18={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err19={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err20={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err21={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}else{const err22={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}return validate34.errors=vErrors,0===errors}__name(validate35,"validate35"),__name(validate34,"validate34");var validateIdentification=validate37,schema94={$schema:"http://json-schema.org/draft-07/schema",$id:"identification.json",title:"Identification",type:"object",required:["type"],additionalProperties:!1,oneOf:[{required:["number"]},{required:["encryptedNumber"]}],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["driversLicense","passport","identityCard","visa"]},number:{type:"string"},maskedNumber:{type:"string"},encryptedNumber:{type:"string"},issued:{type:["string","object"],format:"date-time"},expires:{type:["string","object","null"],format:"date-time"},verified:{type:"boolean"},matched:{type:"boolean"},firstName:{type:"string"},lastName:{type:"string"},issuingCountry:{type:"string",minLength:2,maxLength:2},systemId:{$ref:"definitions.json#/definitions/systemId"}}};function validate37(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;const _errs1=errors;let valid0=!1,passing0=null;const _errs2=errors;if(data&&"object"==typeof data&&!Array.isArray(data)&&void 0===data.number){const err0={instancePath:instancePath,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"number"},message:"must have required property 'number'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}(_valid0=_errs2===errors)&&(valid0=!0,passing0=0);const _errs3=errors;if(data&&"object"==typeof data&&!Array.isArray(data)&&void 0===data.encryptedNumber){const err1={instancePath:instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"encryptedNumber"},message:"must have required property 'encryptedNumber'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}var _valid0;if((_valid0=_errs3===errors)&&valid0?(valid0=!1,passing0=[passing0,1]):_valid0&&(valid0=!0,passing0=1),valid0)errors=_errs1,null!==vErrors&&(_errs1?vErrors.length=_errs1:vErrors=null);else{const err2={instancePath:instancePath,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:passing0},message:"must match exactly one schema in oneOf"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}for(const key0 in data)if(!func2.call(schema94.properties,key0)){const err4={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}const _errs8=errors,_errs9=errors;if("global"!==data0&&"system"!==data0){const err6={};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(_errs9===errors){const err7={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}else errors=_errs8,null!==vErrors&&(_errs8?vErrors.length=_errs8:vErrors=null)}if(void 0!==data.type){let data1=data.type;if("string"!=typeof data1){const err8={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("driversLicense"!==data1&&"passport"!==data1&&"identityCard"!==data1&&"visa"!==data1){const err9={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema94.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.number&&"string"!=typeof data.number){const err10={instancePath:instancePath+"/number",schemaPath:"#/properties/number/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.maskedNumber&&"string"!=typeof data.maskedNumber){const err11={instancePath:instancePath+"/maskedNumber",schemaPath:"#/properties/maskedNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.encryptedNumber&&"string"!=typeof data.encryptedNumber){const err12={instancePath:instancePath+"/encryptedNumber",schemaPath:"#/properties/encryptedNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.issued){let data5=data.issued;if("string"!=typeof data5&&(!data5||"object"!=typeof data5||Array.isArray(data5))){const err13={instancePath:instancePath+"/issued",schemaPath:"#/properties/issued/type",keyword:"type",params:{type:schema94.properties.issued.type},message:"must be string,object"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if("string"==typeof data5&&!formats4.validate(data5)){const err14={instancePath:instancePath+"/issued",schemaPath:"#/properties/issued/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.expires){let data6=data.expires;if("string"!=typeof data6&&(!data6||"object"!=typeof data6||Array.isArray(data6))&&null!==data6){const err15={instancePath:instancePath+"/expires",schemaPath:"#/properties/expires/type",keyword:"type",params:{type:schema94.properties.expires.type},message:"must be string,object,null"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if("string"==typeof data6&&!formats4.validate(data6)){const err16={instancePath:instancePath+"/expires",schemaPath:"#/properties/expires/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.verified&&"boolean"!=typeof data.verified){const err17={instancePath:instancePath+"/verified",schemaPath:"#/properties/verified/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.matched&&"boolean"!=typeof data.matched){const err18={instancePath:instancePath+"/matched",schemaPath:"#/properties/matched/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data.firstName&&"string"!=typeof data.firstName){const err19={instancePath:instancePath+"/firstName",schemaPath:"#/properties/firstName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.lastName&&"string"!=typeof data.lastName){const err20={instancePath:instancePath+"/lastName",schemaPath:"#/properties/lastName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data.issuingCountry){let data11=data.issuingCountry;if("string"==typeof data11){if(func4(data11)>2){const err21={instancePath:instancePath+"/issuingCountry",schemaPath:"#/properties/issuingCountry/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(func4(data11)<2){const err22={instancePath:instancePath+"/issuingCountry",schemaPath:"#/properties/issuingCountry/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}else{const err23={instancePath:instancePath+"/issuingCountry",schemaPath:"#/properties/issuingCountry/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err24={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}else{const err25={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}return validate37.errors=vErrors,0===errors}__name(validate37,"validate37");var validateIssue=validate38,schema97={$schema:"http://json-schema.org/draft-07/schema",$id:"issue.json",title:"Issue",description:"An issue associated with ticketing and concierge.",type:"object",required:["id","type","name","department"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["issue"],default:"issue"},name:{type:"string"},description:{type:"string"},department:{type:"string"},autoAssign:{type:"object",properties:{userId:{type:"string",description:"The user ID to assign tickets with this issue to."},vendorId:{type:"string",description:"The vendor ID to assign tickets with this issue to."},priority:{$ref:"ticket.json#/properties/priority",description:"The priority to assign tickets with this issue to."},tags:{type:"array",items:{type:"string"}}}},notify:{type:"array",description:"A list of entities to notify when this issue is triggered.",default:[],items:{type:"object",required:["id","discriminator"],properties:{id:{type:"string",description:"The ID of the entity to notify."},discriminator:{type:"string",enum:["user"]}}}},systemKey:{type:"string"},autoCreateTicket:{type:"boolean",default:!0},excludedResources:{type:"array",description:"A list of resources that should not trigger notifications of this issue",items:{type:"string"},default:[]}}},schema108={type:"string",enum:["low","normal","high"],default:"normal"};function validate38(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="issue"),void 0===data.notify&&(data.notify=[]),void 0===data.autoCreateTicket&&(data.autoCreateTicket=!0),void 0===data.excludedResources&&(data.excludedResources=[]),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.name){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.department){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"department"},message:"must have required property 'department'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}for(const key0 in data)if(!func2.call(schema97.properties,key0)){const err4={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err6={};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(_errs6===errors){const err7={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err8={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("issue"!==data1){const err9={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema97.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.name&&"string"!=typeof data.name){const err10={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.description&&"string"!=typeof data.description){const err11={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.department&&"string"!=typeof data.department){const err12={instancePath:instancePath+"/department",schemaPath:"#/properties/department/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.autoAssign){let data5=data.autoAssign;if(data5&&"object"==typeof data5&&!Array.isArray(data5)){if(void 0!==data5.userId&&"string"!=typeof data5.userId){const err13={instancePath:instancePath+"/autoAssign/userId",schemaPath:"#/properties/autoAssign/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data5.vendorId&&"string"!=typeof data5.vendorId){const err14={instancePath:instancePath+"/autoAssign/vendorId",schemaPath:"#/properties/autoAssign/properties/vendorId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data5.priority){let data8=data5.priority;if("string"!=typeof data8){const err15={instancePath:instancePath+"/autoAssign/priority",schemaPath:"ticket.json#/properties/priority/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if("low"!==data8&&"normal"!==data8&&"high"!==data8){const err16={instancePath:instancePath+"/autoAssign/priority",schemaPath:"ticket.json#/properties/priority/enum",keyword:"enum",params:{allowedValues:schema108.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data5.tags){let data9=data5.tags;if(Array.isArray(data9)){const len0=data9.length;for(let i0=0;i0<len0;i0++)if("string"!=typeof data9[i0]){const err17={instancePath:instancePath+"/autoAssign/tags/"+i0,schemaPath:"#/properties/autoAssign/properties/tags/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}else{const err18={instancePath:instancePath+"/autoAssign/tags",schemaPath:"#/properties/autoAssign/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}}else{const err19={instancePath:instancePath+"/autoAssign",schemaPath:"#/properties/autoAssign/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}let data11=data.notify;if(Array.isArray(data11)){const len1=data11.length;for(let i1=0;i1<len1;i1++){let data12=data11[i1];if(data12&&"object"==typeof data12&&!Array.isArray(data12)){if(void 0===data12.id){const err20={instancePath:instancePath+"/notify/"+i1,schemaPath:"#/properties/notify/items/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0===data12.discriminator){const err21={instancePath:instancePath+"/notify/"+i1,schemaPath:"#/properties/notify/items/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0!==data12.id&&"string"!=typeof data12.id){const err22={instancePath:instancePath+"/notify/"+i1+"/id",schemaPath:"#/properties/notify/items/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data12.discriminator){let data14=data12.discriminator;if("string"!=typeof data14){const err23={instancePath:instancePath+"/notify/"+i1+"/discriminator",schemaPath:"#/properties/notify/items/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if("user"!==data14){const err24={instancePath:instancePath+"/notify/"+i1+"/discriminator",schemaPath:"#/properties/notify/items/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema97.properties.notify.items.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}}else{const err25={instancePath:instancePath+"/notify/"+i1,schemaPath:"#/properties/notify/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}}else{const err26={instancePath:instancePath+"/notify",schemaPath:"#/properties/notify/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.systemKey&&"string"!=typeof data.systemKey){const err27={instancePath:instancePath+"/systemKey",schemaPath:"#/properties/systemKey/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if("boolean"!=typeof data.autoCreateTicket){const err28={instancePath:instancePath+"/autoCreateTicket",schemaPath:"#/properties/autoCreateTicket/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}let data17=data.excludedResources;if(Array.isArray(data17)){const len2=data17.length;for(let i2=0;i2<len2;i2++)if("string"!=typeof data17[i2]){const err29={instancePath:instancePath+"/excludedResources/"+i2,schemaPath:"#/properties/excludedResources/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}}else{const err30={instancePath:instancePath+"/excludedResources",schemaPath:"#/properties/excludedResources/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}else{const err31={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}return validate38.errors=vErrors,0===errors}__name(validate38,"validate38");var validateLock=validate45,schema109={$schema:"http://json-schema.org/draft-07/schema",$id:"lock.json",title:"Lock",description:"Any smart lock",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},state:{type:["string","null"],enum:["locked","unlocked",null]},mode:{type:["string","null"],enum:["normal","autoLock","emergencyOpen","emergencyClose","holdOpen","lockdown",null],description:"emergencyOpen and emergencyClose are deprecated and can be removed once Salto, Paxton and Geovision drivers are updated",default:null},supportedModes:{type:"array",uniqueItems:!0,items:{enum:["normal","autoLock","emergencyOpen","emergencyClose","holdOpen","lockdown",null]}},batteryLevel:{$ref:"definitions.json#/definitions/batteryLevel"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","state","driver"]};function validate46(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate46.errors=vErrors,0===errors}function validate45(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.mode&&(data.mode=null),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.state){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property 'state'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.driver){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.type){let data2=data.type;if("string"!=typeof data2){const err8={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("alarm"!==data2&&"dimmer"!==data2&&"switch"!==data2&&"motionSensor"!==data2&&"windowCovering"!==data2&&"camera"!==data2&&"mediaSource"!==data2&&"thermostat"!==data2&&"lock"!==data2&&"courtesy"!==data2&&"gateway"!==data2&&"tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"uncontrolledDevice"!==data2){const err9={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema43.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err10={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.supportedNotifications){let data4=data.supportedNotifications;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++){let data5=data4[i0];if("button 1"!==data5&&"button 2"!==data5&&"button 3"!==data5&&"button 4"!==data5&&"button 5"!==data5&&"idle"!==data5&&"powerHasBeedApplied"!==data5&&"acMainsDisconnected"!==data5&&"acMainsReconnected"!==data5&&"replaceBatterySoon"!==data5&&"replaceBatteryNow"!==data5&&"batteryOk"!==data5&&"hardwareFailure"!==data5&&"softwareFailure"!==data5&&"hardwareFailureWithCode"!==data5&&"softwareFailureWithCode"!==data5&&"motionDetection"!==data5&&"airFilterNeedsCleaned"!==data5&&"airFilterNeedsReplaced"!==data5&&"smokeDetected"!==data5&&"outsideSafeTemperatureRange"!==data5&&"outsideSafeHumidityRange"!==data5&&"scheduleMaintenance"!==data5&&"doorAjar"!==data5&&"communicationFailure"!==data5&&"communicationOk"!==data5&&"burglarAlarm"!==data5&&"fireAlarm"!==data5){const err11={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}let j0,i1=data4.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data4[i1],data4[j0])){const err12={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++;break outer0}}else{const err13={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.notification&&(validate46(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate46.errors:vErrors.concat(validate46.errors),errors=vErrors.length)),void 0!==data.driver){let data7=data.driver;if("string"!=typeof data7){const err14={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("adlink"!==data7&&"aws-kinesis"!==data7&&"butler"!==data7&&"crestron"!==data7&&"dell"!==data7&&"dmp"!==data7&&"doorbird"!==data7&&"dormakaba"!==data7&&"dsc"!==data7&&"ecobee"!==data7&&"epson"!==data7&&"geovision-rs"!==data7&&"geovision-as-manager"!==data7&&"honeywell-vista"!==data7&&"igor"!==data7&&"inncom"!==data7&&"isapi"!==data7&&"kohost-k7"!==data7&&"kohost"!==data7&&"lg"!==data7&&"lg-webos"!==data7&&"lapi"!==data7&&"lirc"!==data7&&"mews"!==data7&&"mht"!==data7&&"paxton"!==data7&&"pelican-wireless"!==data7&&"power-shades"!==data7&&"rachio"!==data7&&"rebrandly"!==data7&&"relay"!==data7&&"rtsp"!==data7&&"salto"!==data7&&"salto-irn"!==data7&&"samsung"!==data7&&"se"!==data7&&"sendgrid"!==data7&&"sonifi"!==data7&&"stay-n-touch"!==data7&&"storable"!==data7&&"twilio"!==data7&&"unifi"!==data7&&"valcom"!==data7&&"vivotek"!==data7&&"vizio"!==data7&&"wisenet"!==data7&&"cloudflare-images"!==data7&&"cloudflare-stream"!==data7&&"insperia-privacy"!==data7){const err15={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.state){let data8=data.state;if("string"!=typeof data8&&null!==data8){const err16={instancePath:instancePath+"/state",schemaPath:"#/properties/state/type",keyword:"type",params:{type:schema109.properties.state.type},message:"must be string,null"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("locked"!==data8&&"unlocked"!==data8&&null!==data8){const err17={instancePath:instancePath+"/state",schemaPath:"#/properties/state/enum",keyword:"enum",params:{allowedValues:schema109.properties.state.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}let data9=data.mode;if("string"!=typeof data9&&null!==data9){const err18={instancePath:instancePath+"/mode",schemaPath:"#/properties/mode/type",keyword:"type",params:{type:schema109.properties.mode.type},message:"must be string,null"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if("normal"!==data9&&"autoLock"!==data9&&"emergencyOpen"!==data9&&"emergencyClose"!==data9&&"holdOpen"!==data9&&"lockdown"!==data9&&null!==data9){const err19={instancePath:instancePath+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues:schema109.properties.mode.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.supportedModes){let data10=data.supportedModes;if(Array.isArray(data10)){const len1=data10.length;for(let i2=0;i2<len1;i2++){let data11=data10[i2];if("normal"!==data11&&"autoLock"!==data11&&"emergencyOpen"!==data11&&"emergencyClose"!==data11&&"holdOpen"!==data11&&"lockdown"!==data11&&null!==data11){const err20={instancePath:instancePath+"/supportedModes/"+i2,schemaPath:"#/properties/supportedModes/items/enum",keyword:"enum",params:{allowedValues:schema109.properties.supportedModes.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}let j1,i3=data10.length;if(i3>1)outer1:for(;i3--;)for(j1=i3;j1--;)if(func0(data10[i3],data10[j1])){const err21={instancePath:instancePath+"/supportedModes",schemaPath:"#/properties/supportedModes/uniqueItems",keyword:"uniqueItems",params:{i:i3,j:j1},message:"must NOT have duplicate items (items ## "+j1+" and "+i3+" are identical)"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++;break outer1}}else{const err22={instancePath:instancePath+"/supportedModes",schemaPath:"#/properties/supportedModes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.batteryLevel){let data12=data.batteryLevel;if("number"==typeof data12){if(data12>100||isNaN(data12)){const err23={instancePath:instancePath+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(data12<0||isNaN(data12)){const err24={instancePath:instancePath+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}else{const err25={instancePath:instancePath+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err26={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.watts){let data14=data.watts;if("number"==typeof data14){if(data14<0||isNaN(data14)){const err27={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}else{const err28={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err29={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err30={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err31={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err32={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}else{const err33={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}return validate45.errors=vErrors,0===errors}__name(validate46,"validate46"),__name(validate45,"validate45");var validateLog=validate48,schema119={$schema:"http://json-schema.org/draft-07/schema",$id:"log.json",title:"Log",type:"object",required:["type","timestamp","id","driver","name"],properties:{type:{type:"string",default:"log",enum:["log"]},timestamp:{type:"number",minimum:1655907956593},id:{$ref:"definitions.json#/definitions/id"},driver:{$ref:"definitions.json#/definitions/driver"},name:{type:"string",description:"Event name"},field1:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field2:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field3:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field4:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field5:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field6:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}}}};function validate48(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="log"),void 0===data.type){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.timestamp){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"timestamp"},message:"must have required property 'timestamp'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.id){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.driver){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.name){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}let data0=data.type;if("string"!=typeof data0){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if("log"!==data0){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema119.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err7={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}}else{const err8={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.id){let data2=data.id;if("string"!=typeof data2){const err9={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}const _errs8=errors,_errs9=errors;if("global"!==data2&&"system"!==data2){const err10={};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(_errs9===errors){const err11={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}else errors=_errs8,null!==vErrors&&(_errs8?vErrors.length=_errs8:vErrors=null)}if(void 0!==data.driver){let data3=data.driver;if("string"!=typeof data3){const err12={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if("adlink"!==data3&&"aws-kinesis"!==data3&&"butler"!==data3&&"crestron"!==data3&&"dell"!==data3&&"dmp"!==data3&&"doorbird"!==data3&&"dormakaba"!==data3&&"dsc"!==data3&&"ecobee"!==data3&&"epson"!==data3&&"geovision-rs"!==data3&&"geovision-as-manager"!==data3&&"honeywell-vista"!==data3&&"igor"!==data3&&"inncom"!==data3&&"isapi"!==data3&&"kohost-k7"!==data3&&"kohost"!==data3&&"lg"!==data3&&"lg-webos"!==data3&&"lapi"!==data3&&"lirc"!==data3&&"mews"!==data3&&"mht"!==data3&&"paxton"!==data3&&"pelican-wireless"!==data3&&"power-shades"!==data3&&"rachio"!==data3&&"rebrandly"!==data3&&"relay"!==data3&&"rtsp"!==data3&&"salto"!==data3&&"salto-irn"!==data3&&"samsung"!==data3&&"se"!==data3&&"sendgrid"!==data3&&"sonifi"!==data3&&"stay-n-touch"!==data3&&"storable"!==data3&&"twilio"!==data3&&"unifi"!==data3&&"valcom"!==data3&&"vivotek"!==data3&&"vizio"!==data3&&"wisenet"!==data3&&"cloudflare-images"!==data3&&"cloudflare-stream"!==data3&&"insperia-privacy"!==data3){const err13={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.name&&"string"!=typeof data.name){const err14={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data.field1){let data5=data.field1;if(data5&&"object"==typeof data5&&!Array.isArray(data5)){if(void 0===data5.name){const err15={instancePath:instancePath+"/field1",schemaPath:"#/properties/field1/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0===data5.value){const err16={instancePath:instancePath+"/field1",schemaPath:"#/properties/field1/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data5.name&&"string"!=typeof data5.name){const err17={instancePath:instancePath+"/field1/name",schemaPath:"#/properties/field1/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data5.value&&"string"!=typeof data5.value){const err18={instancePath:instancePath+"/field1/value",schemaPath:"#/properties/field1/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}else{const err19={instancePath:instancePath+"/field1",schemaPath:"#/properties/field1/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data.field2){let data8=data.field2;if(data8&&"object"==typeof data8&&!Array.isArray(data8)){if(void 0===data8.name){const err20={instancePath:instancePath+"/field2",schemaPath:"#/properties/field2/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0===data8.value){const err21={instancePath:instancePath+"/field2",schemaPath:"#/properties/field2/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0!==data8.name&&"string"!=typeof data8.name){const err22={instancePath:instancePath+"/field2/name",schemaPath:"#/properties/field2/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data8.value&&"string"!=typeof data8.value){const err23={instancePath:instancePath+"/field2/value",schemaPath:"#/properties/field2/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}else{const err24={instancePath:instancePath+"/field2",schemaPath:"#/properties/field2/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.field3){let data11=data.field3;if(data11&&"object"==typeof data11&&!Array.isArray(data11)){if(void 0===data11.name){const err25={instancePath:instancePath+"/field3",schemaPath:"#/properties/field3/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0===data11.value){const err26={instancePath:instancePath+"/field3",schemaPath:"#/properties/field3/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data11.name&&"string"!=typeof data11.name){const err27={instancePath:instancePath+"/field3/name",schemaPath:"#/properties/field3/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data11.value&&"string"!=typeof data11.value){const err28={instancePath:instancePath+"/field3/value",schemaPath:"#/properties/field3/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}else{const err29={instancePath:instancePath+"/field3",schemaPath:"#/properties/field3/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}}if(void 0!==data.field4){let data14=data.field4;if(data14&&"object"==typeof data14&&!Array.isArray(data14)){if(void 0===data14.name){const err30={instancePath:instancePath+"/field4",schemaPath:"#/properties/field4/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(void 0===data14.value){const err31={instancePath:instancePath+"/field4",schemaPath:"#/properties/field4/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(void 0!==data14.name&&"string"!=typeof data14.name){const err32={instancePath:instancePath+"/field4/name",schemaPath:"#/properties/field4/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if(void 0!==data14.value&&"string"!=typeof data14.value){const err33={instancePath:instancePath+"/field4/value",schemaPath:"#/properties/field4/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}else{const err34={instancePath:instancePath+"/field4",schemaPath:"#/properties/field4/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}}if(void 0!==data.field5){let data17=data.field5;if(data17&&"object"==typeof data17&&!Array.isArray(data17)){if(void 0===data17.name){const err35={instancePath:instancePath+"/field5",schemaPath:"#/properties/field5/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(void 0===data17.value){const err36={instancePath:instancePath+"/field5",schemaPath:"#/properties/field5/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if(void 0!==data17.name&&"string"!=typeof data17.name){const err37={instancePath:instancePath+"/field5/name",schemaPath:"#/properties/field5/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}if(void 0!==data17.value&&"string"!=typeof data17.value){const err38={instancePath:instancePath+"/field5/value",schemaPath:"#/properties/field5/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}else{const err39={instancePath:instancePath+"/field5",schemaPath:"#/properties/field5/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}if(void 0!==data.field6){let data20=data.field6;if(data20&&"object"==typeof data20&&!Array.isArray(data20)){if(void 0===data20.name){const err40={instancePath:instancePath+"/field6",schemaPath:"#/properties/field6/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if(void 0===data20.value){const err41={instancePath:instancePath+"/field6",schemaPath:"#/properties/field6/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}if(void 0!==data20.name&&"string"!=typeof data20.name){const err42={instancePath:instancePath+"/field6/name",schemaPath:"#/properties/field6/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(void 0!==data20.value&&"string"!=typeof data20.value){const err43={instancePath:instancePath+"/field6/value",schemaPath:"#/properties/field6/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}}else{const err44={instancePath:instancePath+"/field6",schemaPath:"#/properties/field6/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}}else{const err45={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}return validate48.errors=vErrors,0===errors}__name(validate48,"validate48");var validateMediaFile=validate15,validateMediaSource=validate49,schema122={$schema:"http://json-schema.org/draft-07/schema",$id:"mediaSource.json",title:"Media Source",description:"Any media source",type:"object",required:["id","type","discriminator","audio","video","driver"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"mediaSource",enum:["mediaSource"]},discriminator:{type:"string",enum:["tv","dvr","appleTv","discPlayer","mediaPlayer","paSystem","uncontrolledDevice"]},playlists:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{$ref:"definitions.json#/definitions/name"}}}},remote:{type:"string",enum:["MR22GA","XRT260","XRT270","HOF-16K 1.2","219863500","SONIFI","AKB76039803","BN59-01388A"]},name:{$ref:"definitions.json#/definitions/name"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},audio:{type:"boolean"},video:{type:"boolean"},powerFeedback:{type:"boolean"},volumeFeedback:{type:"boolean"},muted:{type:"boolean"},volume:{type:"number",minimum:0,maximum:100},brightness:{type:"number",minimum:0,maximum:100},contrast:{type:"number",minimum:0,maximum:100},power:{type:"string",enum:["on","off"]},input:{type:"string"},supportedInputs:{type:"array",items:{type:"string"}},supportedOutputs:{type:"array",items:{type:"string"}},command:{type:["string","null"],enum:["mute","volumeUp","volumeDown","brightnessUp","brightnessDown","channelUp","channelDown","number0","number1","number2","number3","number4","number5","number6","number7","number8","number9","lastChannel","display","favoriteChannel","play","playing","stop","stopped","pause","paused","fastForward","fastForwarding","rewind","rewinding","instantReplay","record","ac3","pvrMenu","guide","menu","menuUp","menuDown","menuLeft","menuRight","pageUp","pageDown","select","exit","input","power","enterChannel","enterVolume","enterBrightness","enterContrast","number10","number11","number12","number13","number14","number15","number16","number10Plus","number20Plus","number100","dash","threeChan","threeD","sixChan","a","add","alarm","am","analog","angle","antenna","antennaEast","antennaWest","aspect","audio1","audio2","audio3","audioDumming","audioLevelDown","audioLevelUp","b","back","c","component1","component2","component3","d","home","list","liveTv","discreteInputCable","powerOff","powerOn","setupMenu","skipForward","skipReverse","video1","video2","video3","video4","video5","details","hdmi1","hdmi2","hdmi3","cecDeviceList","mtsSap","red","green","yellow","blue","alert","order"]},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},additionalProperties:!1};function validate50(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate50.errors=vErrors,0===errors}function validate49(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="mediaSource"),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.discriminator){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.audio){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"audio"},message:"must have required property 'audio'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.video){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"video"},message:"must have required property 'video'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.driver){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}for(const key0 in data)if(!func2.call(schema122.properties,key0)){const err6={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err7={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err8={};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(_errs6===errors){const err9={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err10={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("mediaSource"!==data1){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema122.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.discriminator){let data2=data.discriminator;if("string"!=typeof data2){const err12={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if("tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"paSystem"!==data2&&"uncontrolledDevice"!==data2){const err13={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema122.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.playlists){let data3=data.playlists;if(Array.isArray(data3)){const len0=data3.length;for(let i0=0;i0<len0;i0++){let data4=data3[i0];if(data4&&"object"==typeof data4&&!Array.isArray(data4)){if(void 0!==data4.id){let data5=data4.id;if("string"!=typeof data5){const err14={instancePath:instancePath+"/playlists/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}const _errs18=errors,_errs19=errors;if("global"!==data5&&"system"!==data5){const err15={};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(_errs19===errors){const err16={instancePath:instancePath+"/playlists/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}else errors=_errs18,null!==vErrors&&(_errs18?vErrors.length=_errs18:vErrors=null)}if(void 0!==data4.name&&"string"!=typeof data4.name){const err17={instancePath:instancePath+"/playlists/"+i0+"/name",schemaPath:"definitions.json#/definitions/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}else{const err18={instancePath:instancePath+"/playlists/"+i0,schemaPath:"#/properties/playlists/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}}else{const err19={instancePath:instancePath+"/playlists",schemaPath:"#/properties/playlists/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data.remote){let data7=data.remote;if("string"!=typeof data7){const err20={instancePath:instancePath+"/remote",schemaPath:"#/properties/remote/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if("MR22GA"!==data7&&"XRT260"!==data7&&"XRT270"!==data7&&"HOF-16K 1.2"!==data7&&"219863500"!==data7&&"SONIFI"!==data7&&"AKB76039803"!==data7&&"BN59-01388A"!==data7){const err21={instancePath:instancePath+"/remote",schemaPath:"#/properties/remote/enum",keyword:"enum",params:{allowedValues:schema122.properties.remote.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}if(void 0!==data.name&&"string"!=typeof data.name){const err22={instancePath:instancePath+"/name",schemaPath:"definitions.json#/definitions/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data.driver){let data9=data.driver;if("string"!=typeof data9){const err23={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if("adlink"!==data9&&"aws-kinesis"!==data9&&"butler"!==data9&&"crestron"!==data9&&"dell"!==data9&&"dmp"!==data9&&"doorbird"!==data9&&"dormakaba"!==data9&&"dsc"!==data9&&"ecobee"!==data9&&"epson"!==data9&&"geovision-rs"!==data9&&"geovision-as-manager"!==data9&&"honeywell-vista"!==data9&&"igor"!==data9&&"inncom"!==data9&&"isapi"!==data9&&"kohost-k7"!==data9&&"kohost"!==data9&&"lg"!==data9&&"lg-webos"!==data9&&"lapi"!==data9&&"lirc"!==data9&&"mews"!==data9&&"mht"!==data9&&"paxton"!==data9&&"pelican-wireless"!==data9&&"power-shades"!==data9&&"rachio"!==data9&&"rebrandly"!==data9&&"relay"!==data9&&"rtsp"!==data9&&"salto"!==data9&&"salto-irn"!==data9&&"samsung"!==data9&&"se"!==data9&&"sendgrid"!==data9&&"sonifi"!==data9&&"stay-n-touch"!==data9&&"storable"!==data9&&"twilio"!==data9&&"unifi"!==data9&&"valcom"!==data9&&"vivotek"!==data9&&"vizio"!==data9&&"wisenet"!==data9&&"cloudflare-images"!==data9&&"cloudflare-stream"!==data9&&"insperia-privacy"!==data9){const err24={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err25={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data.audio&&"boolean"!=typeof data.audio){const err26={instancePath:instancePath+"/audio",schemaPath:"#/properties/audio/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.video&&"boolean"!=typeof data.video){const err27={instancePath:instancePath+"/video",schemaPath:"#/properties/video/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data.powerFeedback&&"boolean"!=typeof data.powerFeedback){const err28={instancePath:instancePath+"/powerFeedback",schemaPath:"#/properties/powerFeedback/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data.volumeFeedback&&"boolean"!=typeof data.volumeFeedback){const err29={instancePath:instancePath+"/volumeFeedback",schemaPath:"#/properties/volumeFeedback/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data.muted&&"boolean"!=typeof data.muted){const err30={instancePath:instancePath+"/muted",schemaPath:"#/properties/muted/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(void 0!==data.volume){let data16=data.volume;if("number"==typeof data16){if(data16>100||isNaN(data16)){const err31={instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(data16<0||isNaN(data16)){const err32={instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}else{const err33={instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}if(void 0!==data.brightness){let data17=data.brightness;if("number"==typeof data17){if(data17>100||isNaN(data17)){const err34={instancePath:instancePath+"/brightness",schemaPath:"#/properties/brightness/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(data17<0||isNaN(data17)){const err35={instancePath:instancePath+"/brightness",schemaPath:"#/properties/brightness/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}}else{const err36={instancePath:instancePath+"/brightness",schemaPath:"#/properties/brightness/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}if(void 0!==data.contrast){let data18=data.contrast;if("number"==typeof data18){if(data18>100||isNaN(data18)){const err37={instancePath:instancePath+"/contrast",schemaPath:"#/properties/contrast/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}if(data18<0||isNaN(data18)){const err38={instancePath:instancePath+"/contrast",schemaPath:"#/properties/contrast/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}else{const err39={instancePath:instancePath+"/contrast",schemaPath:"#/properties/contrast/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}if(void 0!==data.power){let data19=data.power;if("string"!=typeof data19){const err40={instancePath:instancePath+"/power",schemaPath:"#/properties/power/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if("on"!==data19&&"off"!==data19){const err41={instancePath:instancePath+"/power",schemaPath:"#/properties/power/enum",keyword:"enum",params:{allowedValues:schema122.properties.power.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}if(void 0!==data.input&&"string"!=typeof data.input){const err42={instancePath:instancePath+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(void 0!==data.supportedInputs){let data21=data.supportedInputs;if(Array.isArray(data21)){const len1=data21.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data21[i1]){const err43={instancePath:instancePath+"/supportedInputs/"+i1,schemaPath:"#/properties/supportedInputs/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}}else{const err44={instancePath:instancePath+"/supportedInputs",schemaPath:"#/properties/supportedInputs/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}if(void 0!==data.supportedOutputs){let data23=data.supportedOutputs;if(Array.isArray(data23)){const len2=data23.length;for(let i2=0;i2<len2;i2++)if("string"!=typeof data23[i2]){const err45={instancePath:instancePath+"/supportedOutputs/"+i2,schemaPath:"#/properties/supportedOutputs/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}else{const err46={instancePath:instancePath+"/supportedOutputs",schemaPath:"#/properties/supportedOutputs/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}if(void 0!==data.command){let data25=data.command;if("string"!=typeof data25&&null!==data25){const err47={instancePath:instancePath+"/command",schemaPath:"#/properties/command/type",keyword:"type",params:{type:schema122.properties.command.type},message:"must be string,null"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}if("mute"!==data25&&"volumeUp"!==data25&&"volumeDown"!==data25&&"brightnessUp"!==data25&&"brightnessDown"!==data25&&"channelUp"!==data25&&"channelDown"!==data25&&"number0"!==data25&&"number1"!==data25&&"number2"!==data25&&"number3"!==data25&&"number4"!==data25&&"number5"!==data25&&"number6"!==data25&&"number7"!==data25&&"number8"!==data25&&"number9"!==data25&&"lastChannel"!==data25&&"display"!==data25&&"favoriteChannel"!==data25&&"play"!==data25&&"playing"!==data25&&"stop"!==data25&&"stopped"!==data25&&"pause"!==data25&&"paused"!==data25&&"fastForward"!==data25&&"fastForwarding"!==data25&&"rewind"!==data25&&"rewinding"!==data25&&"instantReplay"!==data25&&"record"!==data25&&"ac3"!==data25&&"pvrMenu"!==data25&&"guide"!==data25&&"menu"!==data25&&"menuUp"!==data25&&"menuDown"!==data25&&"menuLeft"!==data25&&"menuRight"!==data25&&"pageUp"!==data25&&"pageDown"!==data25&&"select"!==data25&&"exit"!==data25&&"input"!==data25&&"power"!==data25&&"enterChannel"!==data25&&"enterVolume"!==data25&&"enterBrightness"!==data25&&"enterContrast"!==data25&&"number10"!==data25&&"number11"!==data25&&"number12"!==data25&&"number13"!==data25&&"number14"!==data25&&"number15"!==data25&&"number16"!==data25&&"number10Plus"!==data25&&"number20Plus"!==data25&&"number100"!==data25&&"dash"!==data25&&"threeChan"!==data25&&"threeD"!==data25&&"sixChan"!==data25&&"a"!==data25&&"add"!==data25&&"alarm"!==data25&&"am"!==data25&&"analog"!==data25&&"angle"!==data25&&"antenna"!==data25&&"antennaEast"!==data25&&"antennaWest"!==data25&&"aspect"!==data25&&"audio1"!==data25&&"audio2"!==data25&&"audio3"!==data25&&"audioDumming"!==data25&&"audioLevelDown"!==data25&&"audioLevelUp"!==data25&&"b"!==data25&&"back"!==data25&&"c"!==data25&&"component1"!==data25&&"component2"!==data25&&"component3"!==data25&&"d"!==data25&&"home"!==data25&&"list"!==data25&&"liveTv"!==data25&&"discreteInputCable"!==data25&&"powerOff"!==data25&&"powerOn"!==data25&&"setupMenu"!==data25&&"skipForward"!==data25&&"skipReverse"!==data25&&"video1"!==data25&&"video2"!==data25&&"video3"!==data25&&"video4"!==data25&&"video5"!==data25&&"details"!==data25&&"hdmi1"!==data25&&"hdmi2"!==data25&&"hdmi3"!==data25&&"cecDeviceList"!==data25&&"mtsSap"!==data25&&"red"!==data25&&"green"!==data25&&"yellow"!==data25&&"blue"!==data25&&"alert"!==data25&&"order"!==data25){const err48={instancePath:instancePath+"/command",schemaPath:"#/properties/command/enum",keyword:"enum",params:{allowedValues:schema122.properties.command.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}}if(void 0!==data.supportedNotifications){let data26=data.supportedNotifications;if(Array.isArray(data26)){const len3=data26.length;for(let i3=0;i3<len3;i3++){let data27=data26[i3];if("button 1"!==data27&&"button 2"!==data27&&"button 3"!==data27&&"button 4"!==data27&&"button 5"!==data27&&"idle"!==data27&&"powerHasBeedApplied"!==data27&&"acMainsDisconnected"!==data27&&"acMainsReconnected"!==data27&&"replaceBatterySoon"!==data27&&"replaceBatteryNow"!==data27&&"batteryOk"!==data27&&"hardwareFailure"!==data27&&"softwareFailure"!==data27&&"hardwareFailureWithCode"!==data27&&"softwareFailureWithCode"!==data27&&"motionDetection"!==data27&&"airFilterNeedsCleaned"!==data27&&"airFilterNeedsReplaced"!==data27&&"smokeDetected"!==data27&&"outsideSafeTemperatureRange"!==data27&&"outsideSafeHumidityRange"!==data27&&"scheduleMaintenance"!==data27&&"doorAjar"!==data27&&"communicationFailure"!==data27&&"communicationOk"!==data27&&"burglarAlarm"!==data27&&"fireAlarm"!==data27){const err49={instancePath:instancePath+"/supportedNotifications/"+i3,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}}let j0,i4=data26.length;if(i4>1)outer0:for(;i4--;)for(j0=i4;j0--;)if(func0(data26[i4],data26[j0])){const err50={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i4,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i4+" are identical)"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++;break outer0}}else{const err51={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}}if(void 0!==data.notification&&(validate50(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate50.errors:vErrors.concat(validate50.errors),errors=vErrors.length)),void 0!==data.systemId&&"string"!=typeof data.systemId){const err52={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}if(void 0!==data.watts){let data30=data.watts;if("number"==typeof data30){if(data30<0||isNaN(data30)){const err53={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}}else{const err54={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err55={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err56={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err57={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err58={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}}else{const err59={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}return validate49.errors=vErrors,0===errors}__name(validate50,"validate50"),__name(validate49,"validate49");var validateMotionSensor=validate52,schema133={$schema:"http://json-schema.org/draft-07/schema",$id:"motionSensor.json",title:"Motion Sensor",description:"Any smart motion sensor",type:"object",required:["id","type","driver"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},driver:{$ref:"definitions.json#/definitions/driver"},systemId:{$ref:"definitions.json#/definitions/systemId"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}}};function validate53(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate53.errors=vErrors,0===errors}function validate52(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.driver){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}for(const key0 in data)if(!func2.call(schema133.properties,key0)){const err3={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs6===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}if(void 0!==data.type){let data1=data.type;if("string"!=typeof data1){const err7={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("alarm"!==data1&&"dimmer"!==data1&&"switch"!==data1&&"motionSensor"!==data1&&"windowCovering"!==data1&&"camera"!==data1&&"mediaSource"!==data1&&"thermostat"!==data1&&"lock"!==data1&&"courtesy"!==data1&&"gateway"!==data1&&"tv"!==data1&&"dvr"!==data1&&"appleTv"!==data1&&"discPlayer"!==data1&&"mediaPlayer"!==data1&&"uncontrolledDevice"!==data1){const err8={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema43.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.driver){let data2=data.driver;if("string"!=typeof data2){const err9={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("adlink"!==data2&&"aws-kinesis"!==data2&&"butler"!==data2&&"crestron"!==data2&&"dell"!==data2&&"dmp"!==data2&&"doorbird"!==data2&&"dormakaba"!==data2&&"dsc"!==data2&&"ecobee"!==data2&&"epson"!==data2&&"geovision-rs"!==data2&&"geovision-as-manager"!==data2&&"honeywell-vista"!==data2&&"igor"!==data2&&"inncom"!==data2&&"isapi"!==data2&&"kohost-k7"!==data2&&"kohost"!==data2&&"lg"!==data2&&"lg-webos"!==data2&&"lapi"!==data2&&"lirc"!==data2&&"mews"!==data2&&"mht"!==data2&&"paxton"!==data2&&"pelican-wireless"!==data2&&"power-shades"!==data2&&"rachio"!==data2&&"rebrandly"!==data2&&"relay"!==data2&&"rtsp"!==data2&&"salto"!==data2&&"salto-irn"!==data2&&"samsung"!==data2&&"se"!==data2&&"sendgrid"!==data2&&"sonifi"!==data2&&"stay-n-touch"!==data2&&"storable"!==data2&&"twilio"!==data2&&"unifi"!==data2&&"valcom"!==data2&&"vivotek"!==data2&&"vizio"!==data2&&"wisenet"!==data2&&"cloudflare-images"!==data2&&"cloudflare-stream"!==data2&&"insperia-privacy"!==data2){const err10={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err11={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.supportedNotifications){let data4=data.supportedNotifications;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++){let data5=data4[i0];if("button 1"!==data5&&"button 2"!==data5&&"button 3"!==data5&&"button 4"!==data5&&"button 5"!==data5&&"idle"!==data5&&"powerHasBeedApplied"!==data5&&"acMainsDisconnected"!==data5&&"acMainsReconnected"!==data5&&"replaceBatterySoon"!==data5&&"replaceBatteryNow"!==data5&&"batteryOk"!==data5&&"hardwareFailure"!==data5&&"softwareFailure"!==data5&&"hardwareFailureWithCode"!==data5&&"softwareFailureWithCode"!==data5&&"motionDetection"!==data5&&"airFilterNeedsCleaned"!==data5&&"airFilterNeedsReplaced"!==data5&&"smokeDetected"!==data5&&"outsideSafeTemperatureRange"!==data5&&"outsideSafeHumidityRange"!==data5&&"scheduleMaintenance"!==data5&&"doorAjar"!==data5&&"communicationFailure"!==data5&&"communicationOk"!==data5&&"burglarAlarm"!==data5&&"fireAlarm"!==data5){const err12={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}let j0,i1=data4.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data4[i1],data4[j0])){const err13={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++;break outer0}}else{const err14={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.notification&&(validate53(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate53.errors:vErrors.concat(validate53.errors),errors=vErrors.length)),void 0!==data.watts){let data7=data.watts;if("number"==typeof data7){if(data7<0||isNaN(data7)){const err15={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}else{const err16={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err17={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err18={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err19={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err20={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}else{const err21={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}return validate52.errors=vErrors,0===errors}__name(validate53,"validate53"),__name(validate52,"validate52");var validateOrder=validate55,schema142={$schema:"http://json-schema.org/draft-07/schema",$id:"order.json",title:"Order",description:"A purchase order for products or services.",type:"object",required:["type","status"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"order",enum:["order"]},orderNumber:{type:"string"},status:{type:"string",enum:["draft","pendingPayment","processing","outForDelivery","completed","paymentFailed","cancelled","refunded"]},userId:{$ref:"definitions.json#/definitions/id",description:"User id of purchaser"},reservationId:{$ref:"definitions.json#/definitions/id",description:"Reservation id if the order is for a reservation"},date:{$ref:"definitions.json#/definitions/date"},items:{type:"array",default:[],items:{type:"object",required:["name","price"],properties:{additionalProperties:!1,name:{type:"string"},sku:{type:"string"},quantity:{type:"number",default:1},price:{type:"number"},taxClass:{type:"string"},deliveryClass:{type:"string"},productId:{type:"string"}}}},taxes:{type:"array",default:[],items:{type:"object",required:["name","rate"],properties:{additionalProperties:!1,name:{type:"string"},class:{type:"string"},rateType:{type:"string",enum:["percentage","flat"],default:"percentage"},rate:{type:"number"},total:{type:"number"}}}},fees:{type:"array",default:[],items:{type:"object",required:["name","price"],properties:{additionalProperties:!1,name:{type:"string"},price:{type:"number"}}}},delivery:{type:"array",default:[],items:{type:"object",required:["name","rate"],properties:{additionalProperties:!1,name:{type:"string"},class:{type:"string"},rateType:{type:"string",enum:["percentage","flat"],default:"percentage"},rate:{type:"number"},total:{type:"number"}}}},payments:{type:"array",default:[],items:{type:"object",properties:{method:{type:"string",enum:["folio","invoice","amex","visa","masterCard","maestro","discover","diners","jcb","applePay","alipay","chinaUnionPay","vpay"]},name:{type:"string"},date:{$ref:"definitions.json#/definitions/date"},amount:{type:"number"},transactionReference:{type:"string"}}}}}};function validate55(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="order"),void 0===data.items&&(data.items=[]),void 0===data.taxes&&(data.taxes=[]),void 0===data.fees&&(data.fees=[]),void 0===data.delivery&&(data.delivery=[]),void 0===data.payments&&(data.payments=[]),void 0===data.type){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.status){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs5===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if("order"!==data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema142.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.orderNumber&&"string"!=typeof data.orderNumber){const err7={instancePath:instancePath+"/orderNumber",schemaPath:"#/properties/orderNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.status){let data3=data.status;if("string"!=typeof data3){const err8={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("draft"!==data3&&"pendingPayment"!==data3&&"processing"!==data3&&"outForDelivery"!==data3&&"completed"!==data3&&"paymentFailed"!==data3&&"cancelled"!==data3&&"refunded"!==data3){const err9={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema142.properties.status.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.userId){let data4=data.userId;if("string"!=typeof data4){const err10={instancePath:instancePath+"/userId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}const _errs15=errors,_errs16=errors;if("global"!==data4&&"system"!==data4){const err11={};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(_errs16===errors){const err12={instancePath:instancePath+"/userId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}else errors=_errs15,null!==vErrors&&(_errs15?vErrors.length=_errs15:vErrors=null)}if(void 0!==data.reservationId){let data5=data.reservationId;if("string"!=typeof data5){const err13={instancePath:instancePath+"/reservationId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}const _errs20=errors,_errs21=errors;if("global"!==data5&&"system"!==data5){const err14={};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(_errs21===errors){const err15={instancePath:instancePath+"/reservationId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}else errors=_errs20,null!==vErrors&&(_errs20?vErrors.length=_errs20:vErrors=null)}if(void 0!==data.date){let data6=data.date;if("string"!=typeof data6&&(!data6||"object"!=typeof data6||Array.isArray(data6))){const err16={instancePath:instancePath+"/date",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("string"==typeof data6&&!formats4.validate(data6)){const err17={instancePath:instancePath+"/date",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}let data7=data.items;if(Array.isArray(data7)){const len0=data7.length;for(let i0=0;i0<len0;i0++){let data8=data7[i0];if(data8&&"object"==typeof data8&&!Array.isArray(data8)){if(void 0===data8.quantity&&(data8.quantity=1),void 0===data8.name){const err18={instancePath:instancePath+"/items/"+i0,schemaPath:"#/properties/items/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0===data8.price){const err19={instancePath:instancePath+"/items/"+i0,schemaPath:"#/properties/items/items/required",keyword:"required",params:{missingProperty:"price"},message:"must have required property 'price'"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data8.additionalProperties){const err20={instancePath:instancePath+"/items/"+i0+"/additionalProperties",schemaPath:"#/properties/items/items/properties/additionalProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data8.name&&"string"!=typeof data8.name){const err21={instancePath:instancePath+"/items/"+i0+"/name",schemaPath:"#/properties/items/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0!==data8.sku&&"string"!=typeof data8.sku){const err22={instancePath:instancePath+"/items/"+i0+"/sku",schemaPath:"#/properties/items/items/properties/sku/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if("number"!=typeof data8.quantity){const err23={instancePath:instancePath+"/items/"+i0+"/quantity",schemaPath:"#/properties/items/items/properties/quantity/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data8.price&&"number"!=typeof data8.price){const err24={instancePath:instancePath+"/items/"+i0+"/price",schemaPath:"#/properties/items/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data8.taxClass&&"string"!=typeof data8.taxClass){const err25={instancePath:instancePath+"/items/"+i0+"/taxClass",schemaPath:"#/properties/items/items/properties/taxClass/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data8.deliveryClass&&"string"!=typeof data8.deliveryClass){const err26={instancePath:instancePath+"/items/"+i0+"/deliveryClass",schemaPath:"#/properties/items/items/properties/deliveryClass/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data8.productId&&"string"!=typeof data8.productId){const err27={instancePath:instancePath+"/items/"+i0+"/productId",schemaPath:"#/properties/items/items/properties/productId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}else{const err28={instancePath:instancePath+"/items/"+i0,schemaPath:"#/properties/items/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}}else{const err29={instancePath:instancePath+"/items",schemaPath:"#/properties/items/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}let data17=data.taxes;if(Array.isArray(data17)){const len1=data17.length;for(let i1=0;i1<len1;i1++){let data18=data17[i1];if(data18&&"object"==typeof data18&&!Array.isArray(data18)){if(void 0===data18.rateType&&(data18.rateType="percentage"),void 0===data18.name){const err30={instancePath:instancePath+"/taxes/"+i1,schemaPath:"#/properties/taxes/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(void 0===data18.rate){const err31={instancePath:instancePath+"/taxes/"+i1,schemaPath:"#/properties/taxes/items/required",keyword:"required",params:{missingProperty:"rate"},message:"must have required property 'rate'"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(void 0!==data18.additionalProperties){const err32={instancePath:instancePath+"/taxes/"+i1+"/additionalProperties",schemaPath:"#/properties/taxes/items/properties/additionalProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if(void 0!==data18.name&&"string"!=typeof data18.name){const err33={instancePath:instancePath+"/taxes/"+i1+"/name",schemaPath:"#/properties/taxes/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(void 0!==data18.class&&"string"!=typeof data18.class){const err34={instancePath:instancePath+"/taxes/"+i1+"/class",schemaPath:"#/properties/taxes/items/properties/class/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}let data22=data18.rateType;if("string"!=typeof data22){const err35={instancePath:instancePath+"/taxes/"+i1+"/rateType",schemaPath:"#/properties/taxes/items/properties/rateType/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if("percentage"!==data22&&"flat"!==data22){const err36={instancePath:instancePath+"/taxes/"+i1+"/rateType",schemaPath:"#/properties/taxes/items/properties/rateType/enum",keyword:"enum",params:{allowedValues:schema142.properties.taxes.items.properties.rateType.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if(void 0!==data18.rate&&"number"!=typeof data18.rate){const err37={instancePath:instancePath+"/taxes/"+i1+"/rate",schemaPath:"#/properties/taxes/items/properties/rate/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}if(void 0!==data18.total&&"number"!=typeof data18.total){const err38={instancePath:instancePath+"/taxes/"+i1+"/total",schemaPath:"#/properties/taxes/items/properties/total/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}else{const err39={instancePath:instancePath+"/taxes/"+i1,schemaPath:"#/properties/taxes/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}}else{const err40={instancePath:instancePath+"/taxes",schemaPath:"#/properties/taxes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}let data25=data.fees;if(Array.isArray(data25)){const len2=data25.length;for(let i2=0;i2<len2;i2++){let data26=data25[i2];if(data26&&"object"==typeof data26&&!Array.isArray(data26)){if(void 0===data26.name){const err41={instancePath:instancePath+"/fees/"+i2,schemaPath:"#/properties/fees/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}if(void 0===data26.price){const err42={instancePath:instancePath+"/fees/"+i2,schemaPath:"#/properties/fees/items/required",keyword:"required",params:{missingProperty:"price"},message:"must have required property 'price'"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(void 0!==data26.additionalProperties){const err43={instancePath:instancePath+"/fees/"+i2+"/additionalProperties",schemaPath:"#/properties/fees/items/properties/additionalProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}if(void 0!==data26.name&&"string"!=typeof data26.name){const err44={instancePath:instancePath+"/fees/"+i2+"/name",schemaPath:"#/properties/fees/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}if(void 0!==data26.price&&"number"!=typeof data26.price){const err45={instancePath:instancePath+"/fees/"+i2+"/price",schemaPath:"#/properties/fees/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}else{const err46={instancePath:instancePath+"/fees/"+i2,schemaPath:"#/properties/fees/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}}else{const err47={instancePath:instancePath+"/fees",schemaPath:"#/properties/fees/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}let data30=data.delivery;if(Array.isArray(data30)){const len3=data30.length;for(let i3=0;i3<len3;i3++){let data31=data30[i3];if(data31&&"object"==typeof data31&&!Array.isArray(data31)){if(void 0===data31.rateType&&(data31.rateType="percentage"),void 0===data31.name){const err48={instancePath:instancePath+"/delivery/"+i3,schemaPath:"#/properties/delivery/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}if(void 0===data31.rate){const err49={instancePath:instancePath+"/delivery/"+i3,schemaPath:"#/properties/delivery/items/required",keyword:"required",params:{missingProperty:"rate"},message:"must have required property 'rate'"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}if(void 0!==data31.additionalProperties){const err50={instancePath:instancePath+"/delivery/"+i3+"/additionalProperties",schemaPath:"#/properties/delivery/items/properties/additionalProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}if(void 0!==data31.name&&"string"!=typeof data31.name){const err51={instancePath:instancePath+"/delivery/"+i3+"/name",schemaPath:"#/properties/delivery/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}if(void 0!==data31.class&&"string"!=typeof data31.class){const err52={instancePath:instancePath+"/delivery/"+i3+"/class",schemaPath:"#/properties/delivery/items/properties/class/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}let data35=data31.rateType;if("string"!=typeof data35){const err53={instancePath:instancePath+"/delivery/"+i3+"/rateType",schemaPath:"#/properties/delivery/items/properties/rateType/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}if("percentage"!==data35&&"flat"!==data35){const err54={instancePath:instancePath+"/delivery/"+i3+"/rateType",schemaPath:"#/properties/delivery/items/properties/rateType/enum",keyword:"enum",params:{allowedValues:schema142.properties.delivery.items.properties.rateType.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}if(void 0!==data31.rate&&"number"!=typeof data31.rate){const err55={instancePath:instancePath+"/delivery/"+i3+"/rate",schemaPath:"#/properties/delivery/items/properties/rate/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}if(void 0!==data31.total&&"number"!=typeof data31.total){const err56={instancePath:instancePath+"/delivery/"+i3+"/total",schemaPath:"#/properties/delivery/items/properties/total/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}}else{const err57={instancePath:instancePath+"/delivery/"+i3,schemaPath:"#/properties/delivery/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}}}else{const err58={instancePath:instancePath+"/delivery",schemaPath:"#/properties/delivery/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}let data38=data.payments;if(Array.isArray(data38)){const len4=data38.length;for(let i4=0;i4<len4;i4++){let data39=data38[i4];if(data39&&"object"==typeof data39&&!Array.isArray(data39)){if(void 0!==data39.method){let data40=data39.method;if("string"!=typeof data40){const err59={instancePath:instancePath+"/payments/"+i4+"/method",schemaPath:"#/properties/payments/items/properties/method/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}if("folio"!==data40&&"invoice"!==data40&&"amex"!==data40&&"visa"!==data40&&"masterCard"!==data40&&"maestro"!==data40&&"discover"!==data40&&"diners"!==data40&&"jcb"!==data40&&"applePay"!==data40&&"alipay"!==data40&&"chinaUnionPay"!==data40&&"vpay"!==data40){const err60={instancePath:instancePath+"/payments/"+i4+"/method",schemaPath:"#/properties/payments/items/properties/method/enum",keyword:"enum",params:{allowedValues:schema142.properties.payments.items.properties.method.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err60]:vErrors.push(err60),errors++}}if(void 0!==data39.name&&"string"!=typeof data39.name){const err61={instancePath:instancePath+"/payments/"+i4+"/name",schemaPath:"#/properties/payments/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err61]:vErrors.push(err61),errors++}if(void 0!==data39.date){let data42=data39.date;if("string"!=typeof data42&&(!data42||"object"!=typeof data42||Array.isArray(data42))){const err62={instancePath:instancePath+"/payments/"+i4+"/date",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err62]:vErrors.push(err62),errors++}if("string"==typeof data42&&!formats4.validate(data42)){const err63={instancePath:instancePath+"/payments/"+i4+"/date",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err63]:vErrors.push(err63),errors++}}if(void 0!==data39.amount&&"number"!=typeof data39.amount){const err64={instancePath:instancePath+"/payments/"+i4+"/amount",schemaPath:"#/properties/payments/items/properties/amount/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err64]:vErrors.push(err64),errors++}if(void 0!==data39.transactionReference&&"string"!=typeof data39.transactionReference){const err65={instancePath:instancePath+"/payments/"+i4+"/transactionReference",schemaPath:"#/properties/payments/items/properties/transactionReference/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err65]:vErrors.push(err65),errors++}}else{const err66={instancePath:instancePath+"/payments/"+i4,schemaPath:"#/properties/payments/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err66]:vErrors.push(err66),errors++}}}else{const err67={instancePath:instancePath+"/payments",schemaPath:"#/properties/payments/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err67]:vErrors.push(err67),errors++}}else{const err68={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err68]:vErrors.push(err68),errors++}return validate55.errors=vErrors,0===errors}__name(validate55,"validate55");var validateOrganization=validate56,schema148={$schema:"http://json-schema.org/draft-07/schema",$id:"organization.json",title:"Organization",type:"object",description:"An organization is a group or entity that subscribes to Kohost software.",required:["accountNumber","name"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"organization",enum:["organization"]},accountNumber:{type:["number","null"],minimum:1e4},name:{type:"string"},properties:{type:"array",items:{type:"string"}},hostname:{type:["string","null"]},appManifest:{type:"object",properties:{name:{type:"string"},short_name:{type:"string"},scope:{type:"string"},start_url:{type:"string"},themeColor:{type:"string"},backgroundColor:{type:"string"},display:{type:"string",enum:["fullscreen","standalone","minimal-ui","browser"],default:"fullscreen"},orientation:{type:"string",enum:["portrait","landscape"],default:"portrait"},splash:{type:"object",properties:{src:{type:"string"},type:{type:"string"},sizes:{type:"string"}}},icons:{type:"array",items:{type:"object",properties:{src:{type:"string"},sizes:{type:"string"},type:{type:"string"}}}},logo:{type:"object",properties:{src:{type:"string"},type:{type:"string"},sizes:{type:"string"}}}},default:{name:"Kohost",short_name:"Kohost",start_url:"/",scope:"/",display:"fullscreen",orientation:"portrait",theme_color:"#1d1f22",background_color:"#1d1f22",icons:[{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/9c85047f-ccba-4b1c-3070-5463fbe93b00/w=512",sizes:"512x512",type:"image/png"}],splash:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/034fb112-5326-4d37-373e-d1cc2a4d0400/w=1500",sizes:"1500x800",type:"image/jpg"},logo:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/1e54c54d-3bac-4745-f46f-c2f98036af00/h=75",sizes:"300x75",type:"image/png"}}},tickets:{type:"object",properties:{nextTicketNumber:{type:["string","integer"],default:1}}},credentials:{type:"object",additionalProperties:!0},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}},schema101={type:["string","object"],format:"date-time"},schema151={type:["string","object"],format:"date-time"};function validate56(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="organization"),void 0===data.appManifest&&(data.appManifest={name:"Kohost",short_name:"Kohost",start_url:"/",scope:"/",display:"fullscreen",orientation:"portrait",theme_color:"#1d1f22",background_color:"#1d1f22",icons:[{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/9c85047f-ccba-4b1c-3070-5463fbe93b00/w=512",sizes:"512x512",type:"image/png"}],splash:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/034fb112-5326-4d37-373e-d1cc2a4d0400/w=1500",sizes:"1500x800",type:"image/jpg"},logo:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/1e54c54d-3bac-4745-f46f-c2f98036af00/h=75",sizes:"300x75",type:"image/png"}}),void 0===data.accountNumber){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"accountNumber"},message:"must have required property 'accountNumber'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.name){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}for(const key0 in data)if(!func2.call(schema148.properties,key0)){const err2={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs6===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if("organization"!==data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema148.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.accountNumber){let data2=data.accountNumber;if("number"!=typeof data2&&null!==data2){const err8={instancePath:instancePath+"/accountNumber",schemaPath:"#/properties/accountNumber/type",keyword:"type",params:{type:schema148.properties.accountNumber.type},message:"must be number,null"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("number"==typeof data2&&(data2<1e4||isNaN(data2))){const err9={instancePath:instancePath+"/accountNumber",schemaPath:"#/properties/accountNumber/minimum",keyword:"minimum",params:{comparison:">=",limit:1e4},message:"must be >= 10000"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.name&&"string"!=typeof data.name){const err10={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.properties){let data4=data.properties;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++)if("string"!=typeof data4[i0]){const err11={instancePath:instancePath+"/properties/"+i0,schemaPath:"#/properties/properties/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}else{const err12={instancePath:instancePath+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.hostname){let data6=data.hostname;if("string"!=typeof data6&&null!==data6){const err13={instancePath:instancePath+"/hostname",schemaPath:"#/properties/hostname/type",keyword:"type",params:{type:schema148.properties.hostname.type},message:"must be string,null"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}let data7=data.appManifest;if(data7&&"object"==typeof data7&&!Array.isArray(data7)){if(void 0===data7.display&&(data7.display="fullscreen"),void 0===data7.orientation&&(data7.orientation="portrait"),void 0!==data7.name&&"string"!=typeof data7.name){const err14={instancePath:instancePath+"/appManifest/name",schemaPath:"#/properties/appManifest/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data7.short_name&&"string"!=typeof data7.short_name){const err15={instancePath:instancePath+"/appManifest/short_name",schemaPath:"#/properties/appManifest/properties/short_name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data7.scope&&"string"!=typeof data7.scope){const err16={instancePath:instancePath+"/appManifest/scope",schemaPath:"#/properties/appManifest/properties/scope/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data7.start_url&&"string"!=typeof data7.start_url){const err17={instancePath:instancePath+"/appManifest/start_url",schemaPath:"#/properties/appManifest/properties/start_url/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data7.themeColor&&"string"!=typeof data7.themeColor){const err18={instancePath:instancePath+"/appManifest/themeColor",schemaPath:"#/properties/appManifest/properties/themeColor/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data7.backgroundColor&&"string"!=typeof data7.backgroundColor){const err19={instancePath:instancePath+"/appManifest/backgroundColor",schemaPath:"#/properties/appManifest/properties/backgroundColor/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}let data14=data7.display;if("string"!=typeof data14){const err20={instancePath:instancePath+"/appManifest/display",schemaPath:"#/properties/appManifest/properties/display/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if("fullscreen"!==data14&&"standalone"!==data14&&"minimal-ui"!==data14&&"browser"!==data14){const err21={instancePath:instancePath+"/appManifest/display",schemaPath:"#/properties/appManifest/properties/display/enum",keyword:"enum",params:{allowedValues:schema148.properties.appManifest.properties.display.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}let data15=data7.orientation;if("string"!=typeof data15){const err22={instancePath:instancePath+"/appManifest/orientation",schemaPath:"#/properties/appManifest/properties/orientation/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if("portrait"!==data15&&"landscape"!==data15){const err23={instancePath:instancePath+"/appManifest/orientation",schemaPath:"#/properties/appManifest/properties/orientation/enum",keyword:"enum",params:{allowedValues:schema148.properties.appManifest.properties.orientation.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data7.splash){let data16=data7.splash;if(data16&&"object"==typeof data16&&!Array.isArray(data16)){if(void 0!==data16.src&&"string"!=typeof data16.src){const err24={instancePath:instancePath+"/appManifest/splash/src",schemaPath:"#/properties/appManifest/properties/splash/properties/src/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data16.type&&"string"!=typeof data16.type){const err25={instancePath:instancePath+"/appManifest/splash/type",schemaPath:"#/properties/appManifest/properties/splash/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data16.sizes&&"string"!=typeof data16.sizes){const err26={instancePath:instancePath+"/appManifest/splash/sizes",schemaPath:"#/properties/appManifest/properties/splash/properties/sizes/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}else{const err27={instancePath:instancePath+"/appManifest/splash",schemaPath:"#/properties/appManifest/properties/splash/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}if(void 0!==data7.icons){let data20=data7.icons;if(Array.isArray(data20)){const len1=data20.length;for(let i1=0;i1<len1;i1++){let data21=data20[i1];if(data21&&"object"==typeof data21&&!Array.isArray(data21)){if(void 0!==data21.src&&"string"!=typeof data21.src){const err28={instancePath:instancePath+"/appManifest/icons/"+i1+"/src",schemaPath:"#/properties/appManifest/properties/icons/items/properties/src/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data21.sizes&&"string"!=typeof data21.sizes){const err29={instancePath:instancePath+"/appManifest/icons/"+i1+"/sizes",schemaPath:"#/properties/appManifest/properties/icons/items/properties/sizes/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data21.type&&"string"!=typeof data21.type){const err30={instancePath:instancePath+"/appManifest/icons/"+i1+"/type",schemaPath:"#/properties/appManifest/properties/icons/items/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}else{const err31={instancePath:instancePath+"/appManifest/icons/"+i1,schemaPath:"#/properties/appManifest/properties/icons/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}}else{const err32={instancePath:instancePath+"/appManifest/icons",schemaPath:"#/properties/appManifest/properties/icons/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}if(void 0!==data7.logo){let data25=data7.logo;if(data25&&"object"==typeof data25&&!Array.isArray(data25)){if(void 0!==data25.src&&"string"!=typeof data25.src){const err33={instancePath:instancePath+"/appManifest/logo/src",schemaPath:"#/properties/appManifest/properties/logo/properties/src/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(void 0!==data25.type&&"string"!=typeof data25.type){const err34={instancePath:instancePath+"/appManifest/logo/type",schemaPath:"#/properties/appManifest/properties/logo/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(void 0!==data25.sizes&&"string"!=typeof data25.sizes){const err35={instancePath:instancePath+"/appManifest/logo/sizes",schemaPath:"#/properties/appManifest/properties/logo/properties/sizes/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}}else{const err36={instancePath:instancePath+"/appManifest/logo",schemaPath:"#/properties/appManifest/properties/logo/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}}else{const err37={instancePath:instancePath+"/appManifest",schemaPath:"#/properties/appManifest/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}if(void 0!==data.tickets){let data29=data.tickets;if(data29&&"object"==typeof data29&&!Array.isArray(data29)){void 0===data29.nextTicketNumber&&(data29.nextTicketNumber=1);let data30=data29.nextTicketNumber;if("string"!=typeof data30&&("number"!=typeof data30||data30%1||isNaN(data30))){const err38={instancePath:instancePath+"/tickets/nextTicketNumber",schemaPath:"#/properties/tickets/properties/nextTicketNumber/type",keyword:"type",params:{type:schema148.properties.tickets.properties.nextTicketNumber.type},message:"must be string,integer"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}else{const err39={instancePath:instancePath+"/tickets",schemaPath:"#/properties/tickets/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}if(void 0!==data.credentials){let data31=data.credentials;if(!data31||"object"!=typeof data31||Array.isArray(data31)){const err40={instancePath:instancePath+"/credentials",schemaPath:"#/properties/credentials/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}}if(void 0!==data.createdAt){let data32=data.createdAt;if("string"!=typeof data32&&(!data32||"object"!=typeof data32||Array.isArray(data32))){const err41={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema101.type},message:"must be string,object"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}if("string"==typeof data32&&!formats4.validate(data32)){const err42={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}}if(void 0!==data.updatedAt){let data33=data.updatedAt;if("string"!=typeof data33&&(!data33||"object"!=typeof data33||Array.isArray(data33))){const err43={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:schema151.type},message:"must be string,object"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}if("string"==typeof data33&&!formats4.validate(data33)){const err44={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}}else{const err45={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}return validate56.errors=vErrors,0===errors}__name(validate56,"validate56");var validatePayment=validate57,schema152={$schema:"http://json-schema.org/draft-07/schema",$id:"payment.json",title:"Payment",type:"object",required:["type","maskedNumber","expires"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["amex","visa","masterCard","maestro","discover","diners","jcb","applePay","alipay","chinaUnionPay","vpay"]},enabled:{type:"boolean",default:!0},storageData:{type:["string","null"]},maskedNumber:{type:"string"},issued:{type:["string","null"]},expires:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"}}};function validate57(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.enabled&&(data.enabled=!0),void 0===data.type){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.maskedNumber){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"maskedNumber"},message:"must have required property 'maskedNumber'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.expires){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expires"},message:"must have required property 'expires'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}for(const key0 in data)if("id"!==key0&&"type"!==key0&&"enabled"!==key0&&"storageData"!==key0&&"maskedNumber"!==key0&&"issued"!==key0&&"expires"!==key0&&"systemId"!==key0){const err3={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs6===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}if(void 0!==data.type){let data1=data.type;if("string"!=typeof data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("amex"!==data1&&"visa"!==data1&&"masterCard"!==data1&&"maestro"!==data1&&"discover"!==data1&&"diners"!==data1&&"jcb"!==data1&&"applePay"!==data1&&"alipay"!==data1&&"chinaUnionPay"!==data1&&"vpay"!==data1){const err8={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema152.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if("boolean"!=typeof data.enabled){const err9={instancePath:instancePath+"/enabled",schemaPath:"#/properties/enabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.storageData){let data3=data.storageData;if("string"!=typeof data3&&null!==data3){const err10={instancePath:instancePath+"/storageData",schemaPath:"#/properties/storageData/type",keyword:"type",params:{type:schema152.properties.storageData.type},message:"must be string,null"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.maskedNumber&&"string"!=typeof data.maskedNumber){const err11={instancePath:instancePath+"/maskedNumber",schemaPath:"#/properties/maskedNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.issued){let data5=data.issued;if("string"!=typeof data5&&null!==data5){const err12={instancePath:instancePath+"/issued",schemaPath:"#/properties/issued/type",keyword:"type",params:{type:schema152.properties.issued.type},message:"must be string,null"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.expires&&"string"!=typeof data.expires){const err13={instancePath:instancePath+"/expires",schemaPath:"#/properties/expires/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err14={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}else{const err15={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}return validate57.errors=vErrors,0===errors}__name(validate57,"validate57");var validatePolicy=validate58,schema155={$schema:"http://json-schema.org/draft-07/schema",$id:"policy.json",title:"Policy",description:"A policy is a set of permissions that can be applied to a user to limit their access to resources.",type:"object",required:["name","type","organizationId","propertyId","permissions","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"policy",enum:["policy"]},discriminator:{type:"string",enum:["user"]},name:{type:"string",minLength:1},description:{type:"string"},organizationId:{type:"string"},propertyId:{type:"string"},permissions:{type:"array",items:{type:"object",required:["entities","effect"],properties:{entities:{type:"array",items:{type:"string",pattern:"^[^:]+(:.+)+$"}},effect:{type:"string",enum:["Allow","Deny"]}}}}}},pattern2=new RegExp("^[^:]+(:.+)+$","u");function validate58(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="policy"),void 0===data.name){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.organizationId){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"organizationId"},message:"must have required property 'organizationId'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.propertyId){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"propertyId"},message:"must have required property 'propertyId'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.permissions){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"permissions"},message:"must have required property 'permissions'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.discriminator){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err7={};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(_errs5===errors){const err8={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err9={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("policy"!==data1){const err10={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema155.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.discriminator){let data2=data.discriminator;if("string"!=typeof data2){const err11={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("user"!==data2){const err12={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema155.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.name){let data3=data.name;if("string"==typeof data3){if(func4(data3)<1){const err13={instancePath:instancePath+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}else{const err14={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err15={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data.organizationId&&"string"!=typeof data.organizationId){const err16={instancePath:instancePath+"/organizationId",schemaPath:"#/properties/organizationId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.propertyId&&"string"!=typeof data.propertyId){const err17={instancePath:instancePath+"/propertyId",schemaPath:"#/properties/propertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.permissions){let data7=data.permissions;if(Array.isArray(data7)){const len0=data7.length;for(let i0=0;i0<len0;i0++){let data8=data7[i0];if(data8&&"object"==typeof data8&&!Array.isArray(data8)){if(void 0===data8.entities){const err18={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"entities"},message:"must have required property 'entities'"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0===data8.effect){const err19={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"effect"},message:"must have required property 'effect'"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data8.entities){let data9=data8.entities;if(Array.isArray(data9)){const len1=data9.length;for(let i1=0;i1<len1;i1++){let data10=data9[i1];if("string"==typeof data10){if(!pattern2.test(data10)){const err20={instancePath:instancePath+"/permissions/"+i0+"/entities/"+i1,schemaPath:"#/properties/permissions/items/properties/entities/items/pattern",keyword:"pattern",params:{pattern:"^[^:]+(:.+)+$"},message:'must match pattern "^[^:]+(:.+)+$"'};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}else{const err21={instancePath:instancePath+"/permissions/"+i0+"/entities/"+i1,schemaPath:"#/properties/permissions/items/properties/entities/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}}else{const err22={instancePath:instancePath+"/permissions/"+i0+"/entities",schemaPath:"#/properties/permissions/items/properties/entities/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data8.effect){let data11=data8.effect;if("string"!=typeof data11){const err23={instancePath:instancePath+"/permissions/"+i0+"/effect",schemaPath:"#/properties/permissions/items/properties/effect/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if("Allow"!==data11&&"Deny"!==data11){const err24={instancePath:instancePath+"/permissions/"+i0+"/effect",schemaPath:"#/properties/permissions/items/properties/effect/enum",keyword:"enum",params:{allowedValues:schema155.properties.permissions.items.properties.effect.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}}else{const err25={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}}else{const err26={instancePath:instancePath+"/permissions",schemaPath:"#/properties/permissions/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}}else{const err27={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}return validate58.errors=vErrors,0===errors}__name(validate58,"validate58");var validateProduct=validate59,schema157={$schema:"http://json-schema.org/draft-07/schema",$id:"product.json",title:"Product",type:"object",required:["name","price","driver"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"product",enum:["product"]},name:{type:"string"},driver:{$ref:"definitions.json#/definitions/driver"},description:{type:"string"},price:{type:"number"},tax:{type:["number","null"]},image:{$ref:"mediaFile.json"},category:{type:"string"},imageUrl:{type:"string",format:"uri",pattern:"^https?://"},systemId:{$ref:"definitions.json#/definitions/systemId"}}},pattern3=new RegExp("^https?://","u");function validate59(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="product"),void 0===data.name){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.price){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"price"},message:"must have required property 'price'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.driver){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs5===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if("product"!==data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema157.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.name&&"string"!=typeof data.name){const err8={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.driver){let data3=data.driver;if("string"!=typeof data3){const err9={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("adlink"!==data3&&"aws-kinesis"!==data3&&"butler"!==data3&&"crestron"!==data3&&"dell"!==data3&&"dmp"!==data3&&"doorbird"!==data3&&"dormakaba"!==data3&&"dsc"!==data3&&"ecobee"!==data3&&"epson"!==data3&&"geovision-rs"!==data3&&"geovision-as-manager"!==data3&&"honeywell-vista"!==data3&&"igor"!==data3&&"inncom"!==data3&&"isapi"!==data3&&"kohost-k7"!==data3&&"kohost"!==data3&&"lg"!==data3&&"lg-webos"!==data3&&"lapi"!==data3&&"lirc"!==data3&&"mews"!==data3&&"mht"!==data3&&"paxton"!==data3&&"pelican-wireless"!==data3&&"power-shades"!==data3&&"rachio"!==data3&&"rebrandly"!==data3&&"relay"!==data3&&"rtsp"!==data3&&"salto"!==data3&&"salto-irn"!==data3&&"samsung"!==data3&&"se"!==data3&&"sendgrid"!==data3&&"sonifi"!==data3&&"stay-n-touch"!==data3&&"storable"!==data3&&"twilio"!==data3&&"unifi"!==data3&&"valcom"!==data3&&"vivotek"!==data3&&"vizio"!==data3&&"wisenet"!==data3&&"cloudflare-images"!==data3&&"cloudflare-stream"!==data3&&"insperia-privacy"!==data3){const err10={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err11={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.price&&"number"!=typeof data.price){const err12={instancePath:instancePath+"/price",schemaPath:"#/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.tax){let data6=data.tax;if("number"!=typeof data6&&null!==data6){const err13={instancePath:instancePath+"/tax",schemaPath:"#/properties/tax/type",keyword:"type",params:{type:schema157.properties.tax.type},message:"must be number,null"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.image&&(validate15(data.image,{instancePath:instancePath+"/image",parentData:data,parentDataProperty:"image",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length)),void 0!==data.category&&"string"!=typeof data.category){const err14={instancePath:instancePath+"/category",schemaPath:"#/properties/category/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data.imageUrl){let data9=data.imageUrl;if("string"==typeof data9){if(!pattern3.test(data9)){const err15={instancePath:instancePath+"/imageUrl",schemaPath:"#/properties/imageUrl/pattern",keyword:"pattern",params:{pattern:"^https?://"},message:'must match pattern "^https?://"'};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(!formats0(data9)){const err16={instancePath:instancePath+"/imageUrl",schemaPath:"#/properties/imageUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}else{const err17={instancePath:instancePath+"/imageUrl",schemaPath:"#/properties/imageUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err18={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}else{const err19={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}return validate59.errors=vErrors,0===errors}__name(validate59,"validate59");var validateProperty=validate61,schema161={$schema:"http://json-schema.org/draft-07/schema",$id:"property.json",title:"Property",type:"object",description:"A property is a physical asset or building",required:["id","name","type","organization","timezone","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{type:"string",default:"property",enum:["property"]},discriminator:{type:"string",enum:["hospitality","education","commercial","storage"]},organization:{type:["string","null"],description:"Reference (id) to the organization that owns this property"},departments:{type:"array",items:{type:"string"}},testModeEnabled:{type:"boolean"},testMode:{type:"object",properties:{notificationEmails:{type:"array",items:{type:"string"},description:"Only users with these email addresses will receive notifications in test mode, including sms, email, or push."},notificationEmailDomains:{type:"array",items:{type:"string"},description:"Only users with email addreses ending in these domains will receive notifications in test mode, including sms, email, or push."}}},timezone:{type:"string",description:"IANA timezone string",pattern:"^([a-zA-Z]+/[a-zA-Z_]+)$",examples:["America/New_York","America/Los_Angeles"]},smsNumber:{type:"string"},checkInTime:{type:"string"},checkOutTime:{type:"string"},address:{$ref:"definitions.json#/definitions/address"},latitude:{type:"number"},longitude:{type:"number"},appFeatures:{type:"object",properties:{RoomControl:{type:"object",properties:{disabledSystems:{type:"array",items:{type:"string",enum:["climate","lights","shades","tv","doors"]}},excludedDeviceIds:{type:"array",items:{type:"string"},default:[]},commonAreas:{type:"object",properties:{spaces:{type:"array",items:{type:"string"}}}},alarmConfig:{type:"object",patternProperties:{"^[a-zA-Z0-9]+$":{type:"object",properties:{zoneLockMap:{type:"object",description:"Maps zone numbers to lock ids",additionalProperties:{type:"string"}}}}},examples:[{wZz7hucY:{zoneLockMap:{1:"wc87hucc",2:"bc86hzxc",3:"zv5ah5jv"}}}]}},additionalProperties:!1},CheckIn:{type:"object",properties:{payment:{},identification:{},earlyCheckIn:{type:"object",required:["dynamic"],properties:{dynamic:{type:"boolean",default:!1},minimumPrice:{type:"number",default:10},maximumPrice:{type:"number",default:50},priceRatioPerHour:{type:"number",default:.1},minimumTime:{type:"string"}}},roomUpgrades:{},pet:{},promos:{}}},CheckOut:{type:"object",properties:{lateCheckOut:{type:"object",required:["dynamic"],properties:{dynamic:{type:"boolean",default:!1},minimumPrice:{type:"number",default:10},maximumPrice:{type:"number",default:50},priceRatioPerHour:{type:"number",default:.1}}}}},Concierge:{type:"object",properties:{timeTracking:{type:"boolean",default:!1},tipping:{type:"boolean",default:!1},feedback:{type:"boolean",default:!0},ratings:{type:"boolean",default:!0},newTicketCCs:{type:"array",items:{type:"string"},default:[]},newMessageChannel:{type:["string","null"],enum:["sms","email"],default:"sms",description:"Determines how users should be notified of new messages in the concierge system"},quickServices:{type:"array",items:{type:"object",properties:{name:{type:"string"},description:{type:"string"},department:{type:"string"},image:{$ref:"mediaFile.json"}},required:["name","description","image"]}},issues:{type:"object",properties:{syncWithPropertyId:{type:"string"}}}}},DigitalKey:{type:"object",properties:{system:{type:"string",enum:["salto","dormakaba"]},systemOnline:{type:"boolean",default:!1},systemConfig:{type:"object",properties:{legicUrl:{type:"string",format:"uri"},legicWalletName:{type:"string"},legicAppId:{type:"number"},legicTechUsername:{type:"string"},legicTechPassword:{type:"string"}},additionalProperties:!1,default:{}},enableApp:{type:"boolean"},branding:{type:"object",properties:{logo:{type:"string",format:"uri"},gradient:{type:"array",items:{type:"string",pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},minItems:2,maxItems:2},highlightedGradient:{type:"array",items:{type:"string",pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},minItems:2,maxItems:3}}}}},SOS:{type:"object",properties:{active:{type:"boolean"},activeEmergencies:{type:"array",items:{type:"string",enum:["medical","fire","suspiciousPerson","other","conflict","shooter"]}}}},Elevator:{type:"object"},Experiences:{type:"object"},Dining:{type:"object",properties:{system:{type:"string",enum:["gotab"]},systemConfig:{type:"object",properties:{landingUrl:{type:"string",format:"uri"},includeUserDetails:{type:"boolean"}},additionalProperties:!1}}},Rentals:{type:"object"},Shop:{type:"object"},Spa:{type:"object"},Valet:{type:"object"}},additionalProperties:!1,default:{RoomControl:{}}},notifications:{type:"object",properties:{email:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1},sms:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1},push:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1,default:{email:{enabled:!1},sms:{enabled:!1},push:{enabled:!1}}},credentials:{type:"object",additionalProperties:!0}}},pattern4=new RegExp("^([a-zA-Z]+/[a-zA-Z_]+)$","u"),pattern5=new RegExp("^[a-zA-Z0-9]+$","u"),pattern6=new RegExp("^(?!#ffffff)(#[0-9a-fA-F]{6})$","u");function validate61(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="property"),void 0===data.appFeatures&&(data.appFeatures={RoomControl:{}}),void 0===data.notifications&&(data.notifications={email:{enabled:!1},sms:{enabled:!1},push:{enabled:!1}}),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.name){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.type){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.organization){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"organization"},message:"must have required property 'organization'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.timezone){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"timezone"},message:"must have required property 'timezone'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.discriminator){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err7={};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(_errs5===errors){const err8={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err9={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}let data2=data.type;if("string"!=typeof data2){const err10={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("property"!==data2){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema161.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.discriminator){let data3=data.discriminator;if("string"!=typeof data3){const err12={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if("hospitality"!==data3&&"education"!==data3&&"commercial"!==data3&&"storage"!==data3){const err13={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema161.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.organization){let data4=data.organization;if("string"!=typeof data4&&null!==data4){const err14={instancePath:instancePath+"/organization",schemaPath:"#/properties/organization/type",keyword:"type",params:{type:schema161.properties.organization.type},message:"must be string,null"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.departments){let data5=data.departments;if(Array.isArray(data5)){const len0=data5.length;for(let i0=0;i0<len0;i0++)if("string"!=typeof data5[i0]){const err15={instancePath:instancePath+"/departments/"+i0,schemaPath:"#/properties/departments/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}else{const err16={instancePath:instancePath+"/departments",schemaPath:"#/properties/departments/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.testModeEnabled&&"boolean"!=typeof data.testModeEnabled){const err17={instancePath:instancePath+"/testModeEnabled",schemaPath:"#/properties/testModeEnabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.testMode){let data8=data.testMode;if(data8&&"object"==typeof data8&&!Array.isArray(data8)){if(void 0!==data8.notificationEmails){let data9=data8.notificationEmails;if(Array.isArray(data9)){const len1=data9.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data9[i1]){const err18={instancePath:instancePath+"/testMode/notificationEmails/"+i1,schemaPath:"#/properties/testMode/properties/notificationEmails/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}else{const err19={instancePath:instancePath+"/testMode/notificationEmails",schemaPath:"#/properties/testMode/properties/notificationEmails/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data8.notificationEmailDomains){let data11=data8.notificationEmailDomains;if(Array.isArray(data11)){const len2=data11.length;for(let i2=0;i2<len2;i2++)if("string"!=typeof data11[i2]){const err20={instancePath:instancePath+"/testMode/notificationEmailDomains/"+i2,schemaPath:"#/properties/testMode/properties/notificationEmailDomains/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}else{const err21={instancePath:instancePath+"/testMode/notificationEmailDomains",schemaPath:"#/properties/testMode/properties/notificationEmailDomains/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}}else{const err22={instancePath:instancePath+"/testMode",schemaPath:"#/properties/testMode/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.timezone){let data13=data.timezone;if("string"==typeof data13){if(!pattern4.test(data13)){const err23={instancePath:instancePath+"/timezone",schemaPath:"#/properties/timezone/pattern",keyword:"pattern",params:{pattern:"^([a-zA-Z]+/[a-zA-Z_]+)$"},message:'must match pattern "^([a-zA-Z]+/[a-zA-Z_]+)$"'};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}else{const err24={instancePath:instancePath+"/timezone",schemaPath:"#/properties/timezone/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.smsNumber&&"string"!=typeof data.smsNumber){const err25={instancePath:instancePath+"/smsNumber",schemaPath:"#/properties/smsNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data.checkInTime&&"string"!=typeof data.checkInTime){const err26={instancePath:instancePath+"/checkInTime",schemaPath:"#/properties/checkInTime/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.checkOutTime&&"string"!=typeof data.checkOutTime){const err27={instancePath:instancePath+"/checkOutTime",schemaPath:"#/properties/checkOutTime/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data.address){let data17=data.address;if(data17&&"object"==typeof data17&&!Array.isArray(data17)){if(void 0!==data17.id&&"string"!=typeof data17.id){const err28={instancePath:instancePath+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data17.line1&&"string"!=typeof data17.line1){const err29={instancePath:instancePath+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data17.line2&&"string"!=typeof data17.line2){const err30={instancePath:instancePath+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(void 0!==data17.line3&&"string"!=typeof data17.line3){const err31={instancePath:instancePath+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(void 0!==data17.city&&"string"!=typeof data17.city){const err32={instancePath:instancePath+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if(void 0!==data17.state&&"string"!=typeof data17.state){const err33={instancePath:instancePath+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(void 0!==data17.postalCode&&"string"!=typeof data17.postalCode){const err34={instancePath:instancePath+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(void 0!==data17.countryCode){let data25=data17.countryCode;if("string"==typeof data25){if(func4(data25)>2){const err35={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(func4(data25)<2){const err36={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}else{const err37={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}}else{const err38={instancePath:instancePath+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}if(void 0!==data.latitude&&"number"!=typeof data.latitude){const err39={instancePath:instancePath+"/latitude",schemaPath:"#/properties/latitude/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}if(void 0!==data.longitude&&"number"!=typeof data.longitude){const err40={instancePath:instancePath+"/longitude",schemaPath:"#/properties/longitude/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}let data28=data.appFeatures;if(data28&&"object"==typeof data28&&!Array.isArray(data28)){for(const key0 in data28)if(!func2.call(schema161.properties.appFeatures.properties,key0)){const err41={instancePath:instancePath+"/appFeatures",schemaPath:"#/properties/appFeatures/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}if(void 0!==data28.RoomControl){let data29=data28.RoomControl;if(data29&&"object"==typeof data29&&!Array.isArray(data29)){void 0===data29.excludedDeviceIds&&(data29.excludedDeviceIds=[]);for(const key1 in data29)if("disabledSystems"!==key1&&"excludedDeviceIds"!==key1&&"commonAreas"!==key1&&"alarmConfig"!==key1){const err42={instancePath:instancePath+"/appFeatures/RoomControl",schemaPath:"#/properties/appFeatures/properties/RoomControl/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(void 0!==data29.disabledSystems){let data30=data29.disabledSystems;if(Array.isArray(data30)){const len3=data30.length;for(let i3=0;i3<len3;i3++){let data31=data30[i3];if("string"!=typeof data31){const err43={instancePath:instancePath+"/appFeatures/RoomControl/disabledSystems/"+i3,schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/disabledSystems/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}if("climate"!==data31&&"lights"!==data31&&"shades"!==data31&&"tv"!==data31&&"doors"!==data31){const err44={instancePath:instancePath+"/appFeatures/RoomControl/disabledSystems/"+i3,schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/disabledSystems/items/enum",keyword:"enum",params:{allowedValues:schema161.properties.appFeatures.properties.RoomControl.properties.disabledSystems.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}}else{const err45={instancePath:instancePath+"/appFeatures/RoomControl/disabledSystems",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/disabledSystems/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}let data32=data29.excludedDeviceIds;if(Array.isArray(data32)){const len4=data32.length;for(let i4=0;i4<len4;i4++)if("string"!=typeof data32[i4]){const err46={instancePath:instancePath+"/appFeatures/RoomControl/excludedDeviceIds/"+i4,schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/excludedDeviceIds/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}else{const err47={instancePath:instancePath+"/appFeatures/RoomControl/excludedDeviceIds",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/excludedDeviceIds/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}if(void 0!==data29.commonAreas){let data34=data29.commonAreas;if(data34&&"object"==typeof data34&&!Array.isArray(data34)){if(void 0!==data34.spaces){let data35=data34.spaces;if(Array.isArray(data35)){const len5=data35.length;for(let i5=0;i5<len5;i5++)if("string"!=typeof data35[i5]){const err48={instancePath:instancePath+"/appFeatures/RoomControl/commonAreas/spaces/"+i5,schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/commonAreas/properties/spaces/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}}else{const err49={instancePath:instancePath+"/appFeatures/RoomControl/commonAreas/spaces",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/commonAreas/properties/spaces/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}}}else{const err50={instancePath:instancePath+"/appFeatures/RoomControl/commonAreas",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/commonAreas/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}}if(void 0!==data29.alarmConfig){let data37=data29.alarmConfig;if(data37&&"object"==typeof data37&&!Array.isArray(data37)){for(const key2 in data37)if(pattern5.test(key2)){let data38=data37[key2];if(data38&&"object"==typeof data38&&!Array.isArray(data38)){if(void 0!==data38.zoneLockMap){let data39=data38.zoneLockMap;if(data39&&"object"==typeof data39&&!Array.isArray(data39)){for(const key3 in data39)if("string"!=typeof data39[key3]){const err51={instancePath:instancePath+"/appFeatures/RoomControl/alarmConfig/"+key2.replace(/~/g,"~0").replace(/\//g,"~1")+"/zoneLockMap/"+key3.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/alarmConfig/patternProperties/%5E%5Ba-zA-Z0-9%5D%2B%24/properties/zoneLockMap/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}}else{const err52={instancePath:instancePath+"/appFeatures/RoomControl/alarmConfig/"+key2.replace(/~/g,"~0").replace(/\//g,"~1")+"/zoneLockMap",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/alarmConfig/patternProperties/%5E%5Ba-zA-Z0-9%5D%2B%24/properties/zoneLockMap/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}}}else{const err53={instancePath:instancePath+"/appFeatures/RoomControl/alarmConfig/"+key2.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/alarmConfig/patternProperties/%5E%5Ba-zA-Z0-9%5D%2B%24/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}}}else{const err54={instancePath:instancePath+"/appFeatures/RoomControl/alarmConfig",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/alarmConfig/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}}}else{const err55={instancePath:instancePath+"/appFeatures/RoomControl",schemaPath:"#/properties/appFeatures/properties/RoomControl/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}}if(void 0!==data28.CheckIn){let data41=data28.CheckIn;if(data41&&"object"==typeof data41&&!Array.isArray(data41)){if(void 0!==data41.earlyCheckIn){let data42=data41.earlyCheckIn;if(data42&&"object"==typeof data42&&!Array.isArray(data42)){if(void 0===data42.dynamic&&(data42.dynamic=!1),void 0===data42.minimumPrice&&(data42.minimumPrice=10),void 0===data42.maximumPrice&&(data42.maximumPrice=50),void 0===data42.priceRatioPerHour&&(data42.priceRatioPerHour=.1),void 0===data42.dynamic){const err56={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/required",keyword:"required",params:{missingProperty:"dynamic"},message:"must have required property 'dynamic'"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}if("boolean"!=typeof data42.dynamic){const err57={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn/dynamic",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/dynamic/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}if("number"!=typeof data42.minimumPrice){const err58={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn/minimumPrice",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/minimumPrice/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}if("number"!=typeof data42.maximumPrice){const err59={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn/maximumPrice",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/maximumPrice/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}if("number"!=typeof data42.priceRatioPerHour){const err60={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn/priceRatioPerHour",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/priceRatioPerHour/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err60]:vErrors.push(err60),errors++}if(void 0!==data42.minimumTime&&"string"!=typeof data42.minimumTime){const err61={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn/minimumTime",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/minimumTime/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err61]:vErrors.push(err61),errors++}}else{const err62={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err62]:vErrors.push(err62),errors++}}}else{const err63={instancePath:instancePath+"/appFeatures/CheckIn",schemaPath:"#/properties/appFeatures/properties/CheckIn/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err63]:vErrors.push(err63),errors++}}if(void 0!==data28.CheckOut){let data48=data28.CheckOut;if(data48&&"object"==typeof data48&&!Array.isArray(data48)){if(void 0!==data48.lateCheckOut){let data49=data48.lateCheckOut;if(data49&&"object"==typeof data49&&!Array.isArray(data49)){if(void 0===data49.dynamic&&(data49.dynamic=!1),void 0===data49.minimumPrice&&(data49.minimumPrice=10),void 0===data49.maximumPrice&&(data49.maximumPrice=50),void 0===data49.priceRatioPerHour&&(data49.priceRatioPerHour=.1),void 0===data49.dynamic){const err64={instancePath:instancePath+"/appFeatures/CheckOut/lateCheckOut",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/required",keyword:"required",params:{missingProperty:"dynamic"},message:"must have required property 'dynamic'"};null===vErrors?vErrors=[err64]:vErrors.push(err64),errors++}if("boolean"!=typeof data49.dynamic){const err65={instancePath:instancePath+"/appFeatures/CheckOut/lateCheckOut/dynamic",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/properties/dynamic/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err65]:vErrors.push(err65),errors++}if("number"!=typeof data49.minimumPrice){const err66={instancePath:instancePath+"/appFeatures/CheckOut/lateCheckOut/minimumPrice",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/properties/minimumPrice/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err66]:vErrors.push(err66),errors++}if("number"!=typeof data49.maximumPrice){const err67={instancePath:instancePath+"/appFeatures/CheckOut/lateCheckOut/maximumPrice",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/properties/maximumPrice/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err67]:vErrors.push(err67),errors++}if("number"!=typeof data49.priceRatioPerHour){const err68={instancePath:instancePath+"/appFeatures/CheckOut/lateCheckOut/priceRatioPerHour",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/properties/priceRatioPerHour/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err68]:vErrors.push(err68),errors++}}else{const err69={instancePath:instancePath+"/appFeatures/CheckOut/lateCheckOut",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err69]:vErrors.push(err69),errors++}}}else{const err70={instancePath:instancePath+"/appFeatures/CheckOut",schemaPath:"#/properties/appFeatures/properties/CheckOut/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err70]:vErrors.push(err70),errors++}}if(void 0!==data28.Concierge){let data54=data28.Concierge;if(data54&&"object"==typeof data54&&!Array.isArray(data54)){if(void 0===data54.timeTracking&&(data54.timeTracking=!1),void 0===data54.tipping&&(data54.tipping=!1),void 0===data54.feedback&&(data54.feedback=!0),void 0===data54.ratings&&(data54.ratings=!0),void 0===data54.newTicketCCs&&(data54.newTicketCCs=[]),void 0===data54.newMessageChannel&&(data54.newMessageChannel="sms"),"boolean"!=typeof data54.timeTracking){const err71={instancePath:instancePath+"/appFeatures/Concierge/timeTracking",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/timeTracking/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err71]:vErrors.push(err71),errors++}if("boolean"!=typeof data54.tipping){const err72={instancePath:instancePath+"/appFeatures/Concierge/tipping",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/tipping/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err72]:vErrors.push(err72),errors++}if("boolean"!=typeof data54.feedback){const err73={instancePath:instancePath+"/appFeatures/Concierge/feedback",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/feedback/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err73]:vErrors.push(err73),errors++}if("boolean"!=typeof data54.ratings){const err74={instancePath:instancePath+"/appFeatures/Concierge/ratings",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/ratings/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err74]:vErrors.push(err74),errors++}let data59=data54.newTicketCCs;if(Array.isArray(data59)){const len6=data59.length;for(let i6=0;i6<len6;i6++)if("string"!=typeof data59[i6]){const err75={instancePath:instancePath+"/appFeatures/Concierge/newTicketCCs/"+i6,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/newTicketCCs/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err75]:vErrors.push(err75),errors++}}else{const err76={instancePath:instancePath+"/appFeatures/Concierge/newTicketCCs",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/newTicketCCs/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err76]:vErrors.push(err76),errors++}let data61=data54.newMessageChannel;if("string"!=typeof data61&&null!==data61){const err77={instancePath:instancePath+"/appFeatures/Concierge/newMessageChannel",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/newMessageChannel/type",keyword:"type",params:{type:schema161.properties.appFeatures.properties.Concierge.properties.newMessageChannel.type},message:"must be string,null"};null===vErrors?vErrors=[err77]:vErrors.push(err77),errors++}if("sms"!==data61&&"email"!==data61){const err78={instancePath:instancePath+"/appFeatures/Concierge/newMessageChannel",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/newMessageChannel/enum",keyword:"enum",params:{allowedValues:schema161.properties.appFeatures.properties.Concierge.properties.newMessageChannel.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err78]:vErrors.push(err78),errors++}if(void 0!==data54.quickServices){let data62=data54.quickServices;if(Array.isArray(data62)){const len7=data62.length;for(let i7=0;i7<len7;i7++){let data63=data62[i7];if(data63&&"object"==typeof data63&&!Array.isArray(data63)){if(void 0===data63.name){const err79={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err79]:vErrors.push(err79),errors++}if(void 0===data63.description){const err80={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/required",keyword:"required",params:{missingProperty:"description"},message:"must have required property 'description'"};null===vErrors?vErrors=[err80]:vErrors.push(err80),errors++}if(void 0===data63.image){const err81={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/required",keyword:"required",params:{missingProperty:"image"},message:"must have required property 'image'"};null===vErrors?vErrors=[err81]:vErrors.push(err81),errors++}if(void 0!==data63.name&&"string"!=typeof data63.name){const err82={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7+"/name",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err82]:vErrors.push(err82),errors++}if(void 0!==data63.description&&"string"!=typeof data63.description){const err83={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7+"/description",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err83]:vErrors.push(err83),errors++}if(void 0!==data63.department&&"string"!=typeof data63.department){const err84={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7+"/department",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/properties/department/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err84]:vErrors.push(err84),errors++}void 0!==data63.image&&(validate15(data63.image,{instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7+"/image",parentData:data63,parentDataProperty:"image",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length))}else{const err85={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err85]:vErrors.push(err85),errors++}}}else{const err86={instancePath:instancePath+"/appFeatures/Concierge/quickServices",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err86]:vErrors.push(err86),errors++}}if(void 0!==data54.issues){let data68=data54.issues;if(data68&&"object"==typeof data68&&!Array.isArray(data68)){if(void 0!==data68.syncWithPropertyId&&"string"!=typeof data68.syncWithPropertyId){const err87={instancePath:instancePath+"/appFeatures/Concierge/issues/syncWithPropertyId",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/issues/properties/syncWithPropertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err87]:vErrors.push(err87),errors++}}else{const err88={instancePath:instancePath+"/appFeatures/Concierge/issues",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/issues/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err88]:vErrors.push(err88),errors++}}}else{const err89={instancePath:instancePath+"/appFeatures/Concierge",schemaPath:"#/properties/appFeatures/properties/Concierge/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err89]:vErrors.push(err89),errors++}}if(void 0!==data28.DigitalKey){let data70=data28.DigitalKey;if(data70&&"object"==typeof data70&&!Array.isArray(data70)){if(void 0===data70.systemOnline&&(data70.systemOnline=!1),void 0===data70.systemConfig&&(data70.systemConfig={}),void 0!==data70.system){let data71=data70.system;if("string"!=typeof data71){const err90={instancePath:instancePath+"/appFeatures/DigitalKey/system",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/system/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err90]:vErrors.push(err90),errors++}if("salto"!==data71&&"dormakaba"!==data71){const err91={instancePath:instancePath+"/appFeatures/DigitalKey/system",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/system/enum",keyword:"enum",params:{allowedValues:schema161.properties.appFeatures.properties.DigitalKey.properties.system.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err91]:vErrors.push(err91),errors++}}if("boolean"!=typeof data70.systemOnline){const err92={instancePath:instancePath+"/appFeatures/DigitalKey/systemOnline",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemOnline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err92]:vErrors.push(err92),errors++}let data73=data70.systemConfig;if(data73&&"object"==typeof data73&&!Array.isArray(data73)){for(const key4 in data73)if("legicUrl"!==key4&&"legicWalletName"!==key4&&"legicAppId"!==key4&&"legicTechUsername"!==key4&&"legicTechPassword"!==key4){const err93={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key4},message:"must NOT have additional properties"};null===vErrors?vErrors=[err93]:vErrors.push(err93),errors++}if(void 0!==data73.legicUrl){let data74=data73.legicUrl;if("string"==typeof data74){if(!formats0(data74)){const err94={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig/legicUrl",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err94]:vErrors.push(err94),errors++}}else{const err95={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig/legicUrl",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err95]:vErrors.push(err95),errors++}}if(void 0!==data73.legicWalletName&&"string"!=typeof data73.legicWalletName){const err96={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig/legicWalletName",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicWalletName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err96]:vErrors.push(err96),errors++}if(void 0!==data73.legicAppId&&"number"!=typeof data73.legicAppId){const err97={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig/legicAppId",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicAppId/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err97]:vErrors.push(err97),errors++}if(void 0!==data73.legicTechUsername&&"string"!=typeof data73.legicTechUsername){const err98={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig/legicTechUsername",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicTechUsername/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err98]:vErrors.push(err98),errors++}if(void 0!==data73.legicTechPassword&&"string"!=typeof data73.legicTechPassword){const err99={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig/legicTechPassword",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicTechPassword/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err99]:vErrors.push(err99),errors++}}else{const err100={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err100]:vErrors.push(err100),errors++}if(void 0!==data70.enableApp&&"boolean"!=typeof data70.enableApp){const err101={instancePath:instancePath+"/appFeatures/DigitalKey/enableApp",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/enableApp/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err101]:vErrors.push(err101),errors++}if(void 0!==data70.branding){let data80=data70.branding;if(data80&&"object"==typeof data80&&!Array.isArray(data80)){if(void 0!==data80.logo){let data81=data80.logo;if("string"==typeof data81){if(!formats0(data81)){const err102={instancePath:instancePath+"/appFeatures/DigitalKey/branding/logo",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/logo/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err102]:vErrors.push(err102),errors++}}else{const err103={instancePath:instancePath+"/appFeatures/DigitalKey/branding/logo",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/logo/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err103]:vErrors.push(err103),errors++}}if(void 0!==data80.gradient){let data82=data80.gradient;if(Array.isArray(data82)){if(data82.length>2){const err104={instancePath:instancePath+"/appFeatures/DigitalKey/branding/gradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/maxItems",keyword:"maxItems",params:{limit:2},message:"must NOT have more than 2 items"};null===vErrors?vErrors=[err104]:vErrors.push(err104),errors++}if(data82.length<2){const err105={instancePath:instancePath+"/appFeatures/DigitalKey/branding/gradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/minItems",keyword:"minItems",params:{limit:2},message:"must NOT have fewer than 2 items"};null===vErrors?vErrors=[err105]:vErrors.push(err105),errors++}const len8=data82.length;for(let i8=0;i8<len8;i8++){let data83=data82[i8];if("string"==typeof data83){if(!pattern6.test(data83)){const err106={instancePath:instancePath+"/appFeatures/DigitalKey/branding/gradient/"+i8,schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/items/pattern",keyword:"pattern",params:{pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},message:'must match pattern "^(?!#ffffff)(#[0-9a-fA-F]{6})$"'};null===vErrors?vErrors=[err106]:vErrors.push(err106),errors++}}else{const err107={instancePath:instancePath+"/appFeatures/DigitalKey/branding/gradient/"+i8,schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err107]:vErrors.push(err107),errors++}}}else{const err108={instancePath:instancePath+"/appFeatures/DigitalKey/branding/gradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err108]:vErrors.push(err108),errors++}}if(void 0!==data80.highlightedGradient){let data84=data80.highlightedGradient;if(Array.isArray(data84)){if(data84.length>3){const err109={instancePath:instancePath+"/appFeatures/DigitalKey/branding/highlightedGradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/maxItems",keyword:"maxItems",params:{limit:3},message:"must NOT have more than 3 items"};null===vErrors?vErrors=[err109]:vErrors.push(err109),errors++}if(data84.length<2){const err110={instancePath:instancePath+"/appFeatures/DigitalKey/branding/highlightedGradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/minItems",keyword:"minItems",params:{limit:2},message:"must NOT have fewer than 2 items"};null===vErrors?vErrors=[err110]:vErrors.push(err110),errors++}const len9=data84.length;for(let i9=0;i9<len9;i9++){let data85=data84[i9];if("string"==typeof data85){if(!pattern6.test(data85)){const err111={instancePath:instancePath+"/appFeatures/DigitalKey/branding/highlightedGradient/"+i9,schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/items/pattern",keyword:"pattern",params:{pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},message:'must match pattern "^(?!#ffffff)(#[0-9a-fA-F]{6})$"'};null===vErrors?vErrors=[err111]:vErrors.push(err111),errors++}}else{const err112={instancePath:instancePath+"/appFeatures/DigitalKey/branding/highlightedGradient/"+i9,schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err112]:vErrors.push(err112),errors++}}}else{const err113={instancePath:instancePath+"/appFeatures/DigitalKey/branding/highlightedGradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err113]:vErrors.push(err113),errors++}}}else{const err114={instancePath:instancePath+"/appFeatures/DigitalKey/branding",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err114]:vErrors.push(err114),errors++}}}else{const err115={instancePath:instancePath+"/appFeatures/DigitalKey",schemaPath:"#/properties/appFeatures/properties/DigitalKey/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err115]:vErrors.push(err115),errors++}}if(void 0!==data28.SOS){let data86=data28.SOS;if(data86&&"object"==typeof data86&&!Array.isArray(data86)){if(void 0!==data86.active&&"boolean"!=typeof data86.active){const err116={instancePath:instancePath+"/appFeatures/SOS/active",schemaPath:"#/properties/appFeatures/properties/SOS/properties/active/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err116]:vErrors.push(err116),errors++}if(void 0!==data86.activeEmergencies){let data88=data86.activeEmergencies;if(Array.isArray(data88)){const len10=data88.length;for(let i10=0;i10<len10;i10++){let data89=data88[i10];if("string"!=typeof data89){const err117={instancePath:instancePath+"/appFeatures/SOS/activeEmergencies/"+i10,schemaPath:"#/properties/appFeatures/properties/SOS/properties/activeEmergencies/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err117]:vErrors.push(err117),errors++}if("medical"!==data89&&"fire"!==data89&&"suspiciousPerson"!==data89&&"other"!==data89&&"conflict"!==data89&&"shooter"!==data89){const err118={instancePath:instancePath+"/appFeatures/SOS/activeEmergencies/"+i10,schemaPath:"#/properties/appFeatures/properties/SOS/properties/activeEmergencies/items/enum",keyword:"enum",params:{allowedValues:schema161.properties.appFeatures.properties.SOS.properties.activeEmergencies.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err118]:vErrors.push(err118),errors++}}}else{const err119={instancePath:instancePath+"/appFeatures/SOS/activeEmergencies",schemaPath:"#/properties/appFeatures/properties/SOS/properties/activeEmergencies/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err119]:vErrors.push(err119),errors++}}}else{const err120={instancePath:instancePath+"/appFeatures/SOS",schemaPath:"#/properties/appFeatures/properties/SOS/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err120]:vErrors.push(err120),errors++}}if(void 0!==data28.Elevator){let data90=data28.Elevator;if(!data90||"object"!=typeof data90||Array.isArray(data90)){const err121={instancePath:instancePath+"/appFeatures/Elevator",schemaPath:"#/properties/appFeatures/properties/Elevator/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err121]:vErrors.push(err121),errors++}}if(void 0!==data28.Experiences){let data91=data28.Experiences;if(!data91||"object"!=typeof data91||Array.isArray(data91)){const err122={instancePath:instancePath+"/appFeatures/Experiences",schemaPath:"#/properties/appFeatures/properties/Experiences/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err122]:vErrors.push(err122),errors++}}if(void 0!==data28.Dining){let data92=data28.Dining;if(data92&&"object"==typeof data92&&!Array.isArray(data92)){if(void 0!==data92.system){let data93=data92.system;if("string"!=typeof data93){const err123={instancePath:instancePath+"/appFeatures/Dining/system",schemaPath:"#/properties/appFeatures/properties/Dining/properties/system/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err123]:vErrors.push(err123),errors++}if("gotab"!==data93){const err124={instancePath:instancePath+"/appFeatures/Dining/system",schemaPath:"#/properties/appFeatures/properties/Dining/properties/system/enum",keyword:"enum",params:{allowedValues:schema161.properties.appFeatures.properties.Dining.properties.system.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err124]:vErrors.push(err124),errors++}}if(void 0!==data92.systemConfig){let data94=data92.systemConfig;if(data94&&"object"==typeof data94&&!Array.isArray(data94)){for(const key5 in data94)if("landingUrl"!==key5&&"includeUserDetails"!==key5){const err125={instancePath:instancePath+"/appFeatures/Dining/systemConfig",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key5},message:"must NOT have additional properties"};null===vErrors?vErrors=[err125]:vErrors.push(err125),errors++}if(void 0!==data94.landingUrl){let data95=data94.landingUrl;if("string"==typeof data95){if(!formats0(data95)){const err126={instancePath:instancePath+"/appFeatures/Dining/systemConfig/landingUrl",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/properties/landingUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err126]:vErrors.push(err126),errors++}}else{const err127={instancePath:instancePath+"/appFeatures/Dining/systemConfig/landingUrl",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/properties/landingUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err127]:vErrors.push(err127),errors++}}if(void 0!==data94.includeUserDetails&&"boolean"!=typeof data94.includeUserDetails){const err128={instancePath:instancePath+"/appFeatures/Dining/systemConfig/includeUserDetails",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/properties/includeUserDetails/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err128]:vErrors.push(err128),errors++}}else{const err129={instancePath:instancePath+"/appFeatures/Dining/systemConfig",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err129]:vErrors.push(err129),errors++}}}else{const err130={instancePath:instancePath+"/appFeatures/Dining",schemaPath:"#/properties/appFeatures/properties/Dining/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err130]:vErrors.push(err130),errors++}}if(void 0!==data28.Rentals){let data97=data28.Rentals;if(!data97||"object"!=typeof data97||Array.isArray(data97)){const err131={instancePath:instancePath+"/appFeatures/Rentals",schemaPath:"#/properties/appFeatures/properties/Rentals/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err131]:vErrors.push(err131),errors++}}if(void 0!==data28.Shop){let data98=data28.Shop;if(!data98||"object"!=typeof data98||Array.isArray(data98)){const err132={instancePath:instancePath+"/appFeatures/Shop",schemaPath:"#/properties/appFeatures/properties/Shop/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err132]:vErrors.push(err132),errors++}}if(void 0!==data28.Spa){let data99=data28.Spa;if(!data99||"object"!=typeof data99||Array.isArray(data99)){const err133={instancePath:instancePath+"/appFeatures/Spa",schemaPath:"#/properties/appFeatures/properties/Spa/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err133]:vErrors.push(err133),errors++}}if(void 0!==data28.Valet){let data100=data28.Valet;if(!data100||"object"!=typeof data100||Array.isArray(data100)){const err134={instancePath:instancePath+"/appFeatures/Valet",schemaPath:"#/properties/appFeatures/properties/Valet/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err134]:vErrors.push(err134),errors++}}}else{const err135={instancePath:instancePath+"/appFeatures",schemaPath:"#/properties/appFeatures/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err135]:vErrors.push(err135),errors++}let data101=data.notifications;if(data101&&"object"==typeof data101&&!Array.isArray(data101)){for(const key6 in data101)if("email"!==key6&&"sms"!==key6&&"push"!==key6){const err136={instancePath:instancePath+"/notifications",schemaPath:"#/properties/notifications/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key6},message:"must NOT have additional properties"};null===vErrors?vErrors=[err136]:vErrors.push(err136),errors++}if(void 0!==data101.email){let data102=data101.email;if(data102&&"object"==typeof data102&&!Array.isArray(data102)){for(const key7 in data102)if("enabled"!==key7){const err137={instancePath:instancePath+"/notifications/email",schemaPath:"#/properties/notifications/properties/email/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key7},message:"must NOT have additional properties"};null===vErrors?vErrors=[err137]:vErrors.push(err137),errors++}if(void 0!==data102.enabled&&"boolean"!=typeof data102.enabled){const err138={instancePath:instancePath+"/notifications/email/enabled",schemaPath:"#/properties/notifications/properties/email/properties/enabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err138]:vErrors.push(err138),errors++}}else{const err139={instancePath:instancePath+"/notifications/email",schemaPath:"#/properties/notifications/properties/email/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err139]:vErrors.push(err139),errors++}}if(void 0!==data101.sms){let data104=data101.sms;if(data104&&"object"==typeof data104&&!Array.isArray(data104)){for(const key8 in data104)if("enabled"!==key8){const err140={instancePath:instancePath+"/notifications/sms",schemaPath:"#/properties/notifications/properties/sms/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key8},message:"must NOT have additional properties"};null===vErrors?vErrors=[err140]:vErrors.push(err140),errors++}if(void 0!==data104.enabled&&"boolean"!=typeof data104.enabled){const err141={instancePath:instancePath+"/notifications/sms/enabled",schemaPath:"#/properties/notifications/properties/sms/properties/enabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err141]:vErrors.push(err141),errors++}}else{const err142={instancePath:instancePath+"/notifications/sms",schemaPath:"#/properties/notifications/properties/sms/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err142]:vErrors.push(err142),errors++}}if(void 0!==data101.push){let data106=data101.push;if(data106&&"object"==typeof data106&&!Array.isArray(data106)){for(const key9 in data106)if("enabled"!==key9){const err143={instancePath:instancePath+"/notifications/push",schemaPath:"#/properties/notifications/properties/push/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key9},message:"must NOT have additional properties"};null===vErrors?vErrors=[err143]:vErrors.push(err143),errors++}if(void 0!==data106.enabled&&"boolean"!=typeof data106.enabled){const err144={instancePath:instancePath+"/notifications/push/enabled",schemaPath:"#/properties/notifications/properties/push/properties/enabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err144]:vErrors.push(err144),errors++}}else{const err145={instancePath:instancePath+"/notifications/push",schemaPath:"#/properties/notifications/properties/push/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err145]:vErrors.push(err145),errors++}}}else{const err146={instancePath:instancePath+"/notifications",schemaPath:"#/properties/notifications/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err146]:vErrors.push(err146),errors++}if(void 0!==data.credentials){let data108=data.credentials;if(!data108||"object"!=typeof data108||Array.isArray(data108)){const err147={instancePath:instancePath+"/credentials",schemaPath:"#/properties/credentials/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err147]:vErrors.push(err147),errors++}}}else{const err148={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err148]:vErrors.push(err148),errors++}return validate61.errors=vErrors,0===errors}__name(validate61,"validate61");var validateReservation=validate63,schema164={$schema:"http://json-schema.org/draft-07/schema",$id:"reservation.json",title:"Reservation",type:"object",required:["type","status","checkInDateTime","checkOutDateTime"],properties:{id:{$ref:"definitions.json#/definitions/id"},driver:{$ref:"definitions.json#/definitions/driver"},primaryGuest:{type:"string"},type:{type:"string",default:"reservation",enum:["reservation"]},sharedGuests:{type:"array",items:{type:"string"}},spaceCategory:{type:"string"},space:{type:["string","null"]},previousSpace:{type:["string","null"],default:null,description:"Used when there was a space assigned and it changes"},status:{type:"string",enum:["reserved","checkedIn","checkedOut","cancelled","noShow","enquired","requested","optional"],description:" reserved - confirmed by both parties, before check-in\n checkedIn - checked in\n checkedOut - checked out\n cancelled - Cancelled\n noShow - No show\n enquired - Confirmed neither by the customer nor enterprise\n requested - Confirmed by the customer but not the enterprise (waitlist)\n optional - Confirmed by the enterprise but not the customer (holding)"},mobileCheckInSpaceCategoryChanged:{type:"boolean",description:"spaceCategory has changed from original."},mobileCheckInSpaceChanged:{type:"boolean"},mobileCheckInStatus:{type:"string",enum:["ready","blocked","preArrivalStepsRequired","spaceNotAssigned","spaceNotReady","checkInTimeNotStarted"]},mobileCheckInStatusMessage:{type:"string"},confirmationNumber:{type:"string"},expectedCheckInDateTime:{type:["string","object"],format:"date-time",description:"Expected arrival time of guest."},checkInDateTime:{type:["string","object"],format:"date-time"},checkOutDateTime:{type:["string","object"],format:"date-time"},adultCount:{type:"number",default:1,minimum:1},childCount:{type:"number",default:0},spaceCategoryAvailabilites:{type:"array",items:{type:"object",properties:{id:{type:"string"},price:{type:"number"},unit:{type:"string",enum:["night","stay","hour"]},isUpgrade:{type:"boolean"}}}},revenue:{$ref:"definitions.json#/definitions/revenue"},rateSuppressed:{type:"boolean"},payment:{type:"string"},company:{type:"string"},travelAgent:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"},metadata:{$ref:"definitions.json#/definitions/metadata"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}},schema167={type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},date:{type:"string",format:"date-time"},price:{type:"number"},tax:{type:["number","null"]}}}};function validate64(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(Array.isArray(data)){const len0=data.length;for(let i0=0;i0<len0;i0++){let data0=data[i0];if(data0&&"object"==typeof data0&&!Array.isArray(data0)){if(void 0!==data0.id){let data1=data0.id;if("string"!=typeof data1){const err0={instancePath:instancePath+"/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}const _errs6=errors,_errs7=errors;if("global"!==data1&&"system"!==data1){const err1={};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(_errs7===errors){const err2={instancePath:instancePath+"/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}else errors=_errs6,null!==vErrors&&(_errs6?vErrors.length=_errs6:vErrors=null)}if(void 0!==data0.name&&"string"!=typeof data0.name){const err3={instancePath:instancePath+"/"+i0+"/name",schemaPath:"#/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data0.date){let data3=data0.date;if("string"==typeof data3){if(!formats4.validate(data3)){const err4={instancePath:instancePath+"/"+i0+"/date",schemaPath:"#/items/properties/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}else{const err5={instancePath:instancePath+"/"+i0+"/date",schemaPath:"#/items/properties/date/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}if(void 0!==data0.price&&"number"!=typeof data0.price){const err6={instancePath:instancePath+"/"+i0+"/price",schemaPath:"#/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data0.tax){let data5=data0.tax;if("number"!=typeof data5&&null!==data5){const err7={instancePath:instancePath+"/"+i0+"/tax",schemaPath:"#/items/properties/tax/type",keyword:"type",params:{type:schema167.items.properties.tax.type},message:"must be number,null"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}}}else{const err8={instancePath:instancePath+"/"+i0,schemaPath:"#/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}}else{const err9={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}return validate64.errors=vErrors,0===errors}function validate63(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="reservation"),void 0===data.previousSpace&&(data.previousSpace=null),void 0===data.adultCount&&(data.adultCount=1),void 0===data.childCount&&(data.childCount=0),void 0===data.type){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.status){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.checkInDateTime){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"checkInDateTime"},message:"must have required property 'checkInDateTime'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.checkOutDateTime){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"checkOutDateTime"},message:"must have required property 'checkOutDateTime'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.driver){let data1=data.driver;if("string"!=typeof data1){const err7={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("adlink"!==data1&&"aws-kinesis"!==data1&&"butler"!==data1&&"crestron"!==data1&&"dell"!==data1&&"dmp"!==data1&&"doorbird"!==data1&&"dormakaba"!==data1&&"dsc"!==data1&&"ecobee"!==data1&&"epson"!==data1&&"geovision-rs"!==data1&&"geovision-as-manager"!==data1&&"honeywell-vista"!==data1&&"igor"!==data1&&"inncom"!==data1&&"isapi"!==data1&&"kohost-k7"!==data1&&"kohost"!==data1&&"lg"!==data1&&"lg-webos"!==data1&&"lapi"!==data1&&"lirc"!==data1&&"mews"!==data1&&"mht"!==data1&&"paxton"!==data1&&"pelican-wireless"!==data1&&"power-shades"!==data1&&"rachio"!==data1&&"rebrandly"!==data1&&"relay"!==data1&&"rtsp"!==data1&&"salto"!==data1&&"salto-irn"!==data1&&"samsung"!==data1&&"se"!==data1&&"sendgrid"!==data1&&"sonifi"!==data1&&"stay-n-touch"!==data1&&"storable"!==data1&&"twilio"!==data1&&"unifi"!==data1&&"valcom"!==data1&&"vivotek"!==data1&&"vizio"!==data1&&"wisenet"!==data1&&"cloudflare-images"!==data1&&"cloudflare-stream"!==data1&&"insperia-privacy"!==data1){const err8={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.primaryGuest&&"string"!=typeof data.primaryGuest){const err9={instancePath:instancePath+"/primaryGuest",schemaPath:"#/properties/primaryGuest/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}let data3=data.type;if("string"!=typeof data3){const err10={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("reservation"!==data3){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema164.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.sharedGuests){let data4=data.sharedGuests;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++)if("string"!=typeof data4[i0]){const err12={instancePath:instancePath+"/sharedGuests/"+i0,schemaPath:"#/properties/sharedGuests/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}else{const err13={instancePath:instancePath+"/sharedGuests",schemaPath:"#/properties/sharedGuests/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.spaceCategory&&"string"!=typeof data.spaceCategory){const err14={instancePath:instancePath+"/spaceCategory",schemaPath:"#/properties/spaceCategory/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data.space){let data7=data.space;if("string"!=typeof data7&&null!==data7){const err15={instancePath:instancePath+"/space",schemaPath:"#/properties/space/type",keyword:"type",params:{type:schema164.properties.space.type},message:"must be string,null"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}let data8=data.previousSpace;if("string"!=typeof data8&&null!==data8){const err16={instancePath:instancePath+"/previousSpace",schemaPath:"#/properties/previousSpace/type",keyword:"type",params:{type:schema164.properties.previousSpace.type},message:"must be string,null"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.status){let data9=data.status;if("string"!=typeof data9){const err17={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if("reserved"!==data9&&"checkedIn"!==data9&&"checkedOut"!==data9&&"cancelled"!==data9&&"noShow"!==data9&&"enquired"!==data9&&"requested"!==data9&&"optional"!==data9){const err18={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema164.properties.status.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data.mobileCheckInSpaceCategoryChanged&&"boolean"!=typeof data.mobileCheckInSpaceCategoryChanged){const err19={instancePath:instancePath+"/mobileCheckInSpaceCategoryChanged",schemaPath:"#/properties/mobileCheckInSpaceCategoryChanged/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.mobileCheckInSpaceChanged&&"boolean"!=typeof data.mobileCheckInSpaceChanged){const err20={instancePath:instancePath+"/mobileCheckInSpaceChanged",schemaPath:"#/properties/mobileCheckInSpaceChanged/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data.mobileCheckInStatus){let data12=data.mobileCheckInStatus;if("string"!=typeof data12){const err21={instancePath:instancePath+"/mobileCheckInStatus",schemaPath:"#/properties/mobileCheckInStatus/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if("ready"!==data12&&"blocked"!==data12&&"preArrivalStepsRequired"!==data12&&"spaceNotAssigned"!==data12&&"spaceNotReady"!==data12&&"checkInTimeNotStarted"!==data12){const err22={instancePath:instancePath+"/mobileCheckInStatus",schemaPath:"#/properties/mobileCheckInStatus/enum",keyword:"enum",params:{allowedValues:schema164.properties.mobileCheckInStatus.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.mobileCheckInStatusMessage&&"string"!=typeof data.mobileCheckInStatusMessage){const err23={instancePath:instancePath+"/mobileCheckInStatusMessage",schemaPath:"#/properties/mobileCheckInStatusMessage/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data.confirmationNumber&&"string"!=typeof data.confirmationNumber){const err24={instancePath:instancePath+"/confirmationNumber",schemaPath:"#/properties/confirmationNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data.expectedCheckInDateTime){let data15=data.expectedCheckInDateTime;if("string"!=typeof data15&&(!data15||"object"!=typeof data15||Array.isArray(data15))){const err25={instancePath:instancePath+"/expectedCheckInDateTime",schemaPath:"#/properties/expectedCheckInDateTime/type",keyword:"type",params:{type:schema164.properties.expectedCheckInDateTime.type},message:"must be string,object"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if("string"==typeof data15&&!formats4.validate(data15)){const err26={instancePath:instancePath+"/expectedCheckInDateTime",schemaPath:"#/properties/expectedCheckInDateTime/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}if(void 0!==data.checkInDateTime){let data16=data.checkInDateTime;if("string"!=typeof data16&&(!data16||"object"!=typeof data16||Array.isArray(data16))){const err27={instancePath:instancePath+"/checkInDateTime",schemaPath:"#/properties/checkInDateTime/type",keyword:"type",params:{type:schema164.properties.checkInDateTime.type},message:"must be string,object"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if("string"==typeof data16&&!formats4.validate(data16)){const err28={instancePath:instancePath+"/checkInDateTime",schemaPath:"#/properties/checkInDateTime/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}if(void 0!==data.checkOutDateTime){let data17=data.checkOutDateTime;if("string"!=typeof data17&&(!data17||"object"!=typeof data17||Array.isArray(data17))){const err29={instancePath:instancePath+"/checkOutDateTime",schemaPath:"#/properties/checkOutDateTime/type",keyword:"type",params:{type:schema164.properties.checkOutDateTime.type},message:"must be string,object"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if("string"==typeof data17&&!formats4.validate(data17)){const err30={instancePath:instancePath+"/checkOutDateTime",schemaPath:"#/properties/checkOutDateTime/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}let data18=data.adultCount;if("number"==typeof data18){if(data18<1||isNaN(data18)){const err31={instancePath:instancePath+"/adultCount",schemaPath:"#/properties/adultCount/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}else{const err32={instancePath:instancePath+"/adultCount",schemaPath:"#/properties/adultCount/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if("number"!=typeof data.childCount){const err33={instancePath:instancePath+"/childCount",schemaPath:"#/properties/childCount/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(void 0!==data.spaceCategoryAvailabilites){let data20=data.spaceCategoryAvailabilites;if(Array.isArray(data20)){const len1=data20.length;for(let i1=0;i1<len1;i1++){let data21=data20[i1];if(data21&&"object"==typeof data21&&!Array.isArray(data21)){if(void 0!==data21.id&&"string"!=typeof data21.id){const err34={instancePath:instancePath+"/spaceCategoryAvailabilites/"+i1+"/id",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(void 0!==data21.price&&"number"!=typeof data21.price){const err35={instancePath:instancePath+"/spaceCategoryAvailabilites/"+i1+"/price",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(void 0!==data21.unit){let data24=data21.unit;if("string"!=typeof data24){const err36={instancePath:instancePath+"/spaceCategoryAvailabilites/"+i1+"/unit",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/unit/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if("night"!==data24&&"stay"!==data24&&"hour"!==data24){const err37={instancePath:instancePath+"/spaceCategoryAvailabilites/"+i1+"/unit",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/unit/enum",keyword:"enum",params:{allowedValues:schema164.properties.spaceCategoryAvailabilites.items.properties.unit.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}if(void 0!==data21.isUpgrade&&"boolean"!=typeof data21.isUpgrade){const err38={instancePath:instancePath+"/spaceCategoryAvailabilites/"+i1+"/isUpgrade",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/isUpgrade/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}else{const err39={instancePath:instancePath+"/spaceCategoryAvailabilites/"+i1,schemaPath:"#/properties/spaceCategoryAvailabilites/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}}else{const err40={instancePath:instancePath+"/spaceCategoryAvailabilites",schemaPath:"#/properties/spaceCategoryAvailabilites/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}}if(void 0!==data.revenue&&(validate64(data.revenue,{instancePath:instancePath+"/revenue",parentData:data,parentDataProperty:"revenue",rootData:rootData})||(vErrors=null===vErrors?validate64.errors:vErrors.concat(validate64.errors),errors=vErrors.length)),void 0!==data.rateSuppressed&&"boolean"!=typeof data.rateSuppressed){const err41={instancePath:instancePath+"/rateSuppressed",schemaPath:"#/properties/rateSuppressed/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}if(void 0!==data.payment&&"string"!=typeof data.payment){const err42={instancePath:instancePath+"/payment",schemaPath:"#/properties/payment/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(void 0!==data.company&&"string"!=typeof data.company){const err43={instancePath:instancePath+"/company",schemaPath:"#/properties/company/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}if(void 0!==data.travelAgent&&"string"!=typeof data.travelAgent){const err44={instancePath:instancePath+"/travelAgent",schemaPath:"#/properties/travelAgent/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err45={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}if(void 0!==data.metadata){let data32=data.metadata;if(!data32||"object"!=typeof data32||Array.isArray(data32)){const err46={instancePath:instancePath+"/metadata",schemaPath:"definitions.json#/definitions/metadata/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}if(void 0!==data.updatedAt){let data33=data.updatedAt;if("string"!=typeof data33&&(!data33||"object"!=typeof data33||Array.isArray(data33))){const err47={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:schema151.type},message:"must be string,object"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}if("string"==typeof data33&&!formats4.validate(data33)){const err48={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}}}else{const err49={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}return validate63.errors=vErrors,0===errors}__name(validate64,"validate64"),__name(validate63,"validate63");var validateRoom=validate66,schema172={$schema:"http://json-schema.org/draft-07/schema",$id:"room.json",title:"Room",description:"A room represents a physical space of controllable IoT devices",type:"object",required:["id","name"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["room"],default:"room"},name:{type:"string"},floor:{type:"string"},dimmers:{type:"array",default:[],items:{$ref:"dimmer.json"}},switches:{type:"array",default:[],items:{$ref:"switch.json"}},thermostats:{type:"array",default:[],items:{$ref:"thermostat.json"}},locks:{type:"array",default:[],items:{$ref:"lock.json"}},windowCoverings:{type:"array",default:[],items:{$ref:"windowCovering.json"}},courtesy:{type:"array",default:[],items:{$ref:"courtesy.json"}},cameras:{type:"array",default:[],items:{$ref:"camera.json"}},mediaSources:{type:"array",default:[],items:{$ref:"mediaSource.json"}},motionSensors:{type:"array",default:[],items:{$ref:"motionSensor.json"}},alarms:{type:"array",default:[],items:{$ref:"alarm.json"}},occupiedAt:{$ref:"definitions.json#/definitions/createdAt"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}},additionalProperties:!1},schema174={$schema:"http://json-schema.org/draft-07/schema",$id:"switch.json",title:"Switch",description:"Any smart switch",type:"object",required:["id","type","state","driver"],properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},discriminator:{type:"string",enum:["light","fan","irrigation"]},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},state:{type:"string",enum:["on","off"]},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}}};function validate69(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate69.errors=vErrors,0===errors}function validate68(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.state){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property 'state'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.driver){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.type){let data2=data.type;if("string"!=typeof data2){const err8={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("alarm"!==data2&&"dimmer"!==data2&&"switch"!==data2&&"motionSensor"!==data2&&"windowCovering"!==data2&&"camera"!==data2&&"mediaSource"!==data2&&"thermostat"!==data2&&"lock"!==data2&&"courtesy"!==data2&&"gateway"!==data2&&"tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"uncontrolledDevice"!==data2){const err9={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema43.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.discriminator){let data3=data.discriminator;if("string"!=typeof data3){const err10={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("light"!==data3&&"fan"!==data3&&"irrigation"!==data3){const err11={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema174.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.supportedNotifications){let data4=data.supportedNotifications;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++){let data5=data4[i0];if("button 1"!==data5&&"button 2"!==data5&&"button 3"!==data5&&"button 4"!==data5&&"button 5"!==data5&&"idle"!==data5&&"powerHasBeedApplied"!==data5&&"acMainsDisconnected"!==data5&&"acMainsReconnected"!==data5&&"replaceBatterySoon"!==data5&&"replaceBatteryNow"!==data5&&"batteryOk"!==data5&&"hardwareFailure"!==data5&&"softwareFailure"!==data5&&"hardwareFailureWithCode"!==data5&&"softwareFailureWithCode"!==data5&&"motionDetection"!==data5&&"airFilterNeedsCleaned"!==data5&&"airFilterNeedsReplaced"!==data5&&"smokeDetected"!==data5&&"outsideSafeTemperatureRange"!==data5&&"outsideSafeHumidityRange"!==data5&&"scheduleMaintenance"!==data5&&"doorAjar"!==data5&&"communicationFailure"!==data5&&"communicationOk"!==data5&&"burglarAlarm"!==data5&&"fireAlarm"!==data5){const err12={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}let j0,i1=data4.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data4[i1],data4[j0])){const err13={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++;break outer0}}else{const err14={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.notification&&(validate69(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate69.errors:vErrors.concat(validate69.errors),errors=vErrors.length)),void 0!==data.driver){let data7=data.driver;if("string"!=typeof data7){const err15={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if("adlink"!==data7&&"aws-kinesis"!==data7&&"butler"!==data7&&"crestron"!==data7&&"dell"!==data7&&"dmp"!==data7&&"doorbird"!==data7&&"dormakaba"!==data7&&"dsc"!==data7&&"ecobee"!==data7&&"epson"!==data7&&"geovision-rs"!==data7&&"geovision-as-manager"!==data7&&"honeywell-vista"!==data7&&"igor"!==data7&&"inncom"!==data7&&"isapi"!==data7&&"kohost-k7"!==data7&&"kohost"!==data7&&"lg"!==data7&&"lg-webos"!==data7&&"lapi"!==data7&&"lirc"!==data7&&"mews"!==data7&&"mht"!==data7&&"paxton"!==data7&&"pelican-wireless"!==data7&&"power-shades"!==data7&&"rachio"!==data7&&"rebrandly"!==data7&&"relay"!==data7&&"rtsp"!==data7&&"salto"!==data7&&"salto-irn"!==data7&&"samsung"!==data7&&"se"!==data7&&"sendgrid"!==data7&&"sonifi"!==data7&&"stay-n-touch"!==data7&&"storable"!==data7&&"twilio"!==data7&&"unifi"!==data7&&"valcom"!==data7&&"vivotek"!==data7&&"vizio"!==data7&&"wisenet"!==data7&&"cloudflare-images"!==data7&&"cloudflare-stream"!==data7&&"insperia-privacy"!==data7){const err16={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err17={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.state){let data9=data.state;if("string"!=typeof data9){const err18={instancePath:instancePath+"/state",schemaPath:"#/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if("on"!==data9&&"off"!==data9){const err19={instancePath:instancePath+"/state",schemaPath:"#/properties/state/enum",keyword:"enum",params:{allowedValues:schema174.properties.state.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err20={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data.watts){let data11=data.watts;if("number"==typeof data11){if(data11<0||isNaN(data11)){const err21={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}else{const err22={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err23={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err24={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err25={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err26={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}else{const err27={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}return validate68.errors=vErrors,0===errors}__name(validate69,"validate69"),__name(validate68,"validate68");var schema183={$schema:"http://json-schema.org/draft-07/schema",$id:"thermostat.json",title:"Thermostat",description:"Any smart thermostat",type:"object",required:["id","type","hvacMode","fanMode","hvacState","fanState","setpoints","temperatureScale","supportedHvacModes","supportedFanModes","driver"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},name:{$ref:"definitions.json#/definitions/name"},type:{$ref:"definitions.json#/definitions/type",default:"thermostat"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},currentTemperature:{type:"number"},currentHumidity:{type:"number",minimum:0},hvacMode:{type:"string",$ref:"#/properties/supportedHvacModes/items"},hvacState:{type:["string","null"],enum:["cooling","heating","off",null]},fanMode:{type:"string",$ref:"#/properties/supportedFanModes/items"},fanState:{type:["string","null"],enum:["off","low","medium","high","on",null]},temperatureScale:{type:"string",enum:["celsius","fahrenheit"],default:"fahrenheit"},humidityScale:{type:["string","null"],enum:["absolute","relative",null]},supportedHvacModes:{type:"array",uniqueItems:!0,minItems:2,items:{enum:["cool","heat","auto","off"]}},supportedFanModes:{type:"array",uniqueItems:!0,items:{enum:["auto","low","medium","high","off","on"]}},setpoints:{type:"object",additionalProperties:!1,properties:{cool:{$ref:"#/$defs/setpoint"},heat:{$ref:"#/$defs/setpoint"},auto:{$ref:"#/$defs/setpoint"}}},minAutoDelta:{type:"number",default:3},cycleRate:{type:"number"},batteryLevel:{$ref:"definitions.json#/definitions/batteryLevel"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},$defs:{setpoint:{type:"object",additionalProperties:!1,properties:{value:{$ref:"#/$defs/setpointValue"},min:{$ref:"#/$defs/setpointMinMax"},max:{$ref:"#/$defs/setpointMinMax"}}},setpointValue:{type:"number",minimum:0,maximum:99},setpointMinMax:{type:["number","null"],minimum:0,maximum:99}}},schema191={enum:["cool","heat","auto","off"]},schema192={enum:["auto","low","medium","high","off","on"]};function validate73(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate73.errors=vErrors,0===errors}__name(validate73,"validate73");var schema195={type:["number","null"],minimum:0,maximum:99};function validate75(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){for(const key0 in data)if("value"!==key0&&"min"!==key0&&"max"!==key0){const err0={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0!==data.value){let data0=data.value;if("number"==typeof data0){if(data0>99||isNaN(data0)){const err1={instancePath:instancePath+"/value",schemaPath:"#/$defs/setpointValue/maximum",keyword:"maximum",params:{comparison:"<=",limit:99},message:"must be <= 99"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(data0<0||isNaN(data0)){const err2={instancePath:instancePath+"/value",schemaPath:"#/$defs/setpointValue/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}else{const err3={instancePath:instancePath+"/value",schemaPath:"#/$defs/setpointValue/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}if(void 0!==data.min){let data1=data.min;if("number"!=typeof data1&&null!==data1){const err4={instancePath:instancePath+"/min",schemaPath:"#/$defs/setpointMinMax/type",keyword:"type",params:{type:schema195.type},message:"must be number,null"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if("number"==typeof data1){if(data1>99||isNaN(data1)){const err5={instancePath:instancePath+"/min",schemaPath:"#/$defs/setpointMinMax/maximum",keyword:"maximum",params:{comparison:"<=",limit:99},message:"must be <= 99"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(data1<0||isNaN(data1)){const err6={instancePath:instancePath+"/min",schemaPath:"#/$defs/setpointMinMax/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}}}if(void 0!==data.max){let data2=data.max;if("number"!=typeof data2&&null!==data2){const err7={instancePath:instancePath+"/max",schemaPath:"#/$defs/setpointMinMax/type",keyword:"type",params:{type:schema195.type},message:"must be number,null"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("number"==typeof data2){if(data2>99||isNaN(data2)){const err8={instancePath:instancePath+"/max",schemaPath:"#/$defs/setpointMinMax/maximum",keyword:"maximum",params:{comparison:"<=",limit:99},message:"must be <= 99"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(data2<0||isNaN(data2)){const err9={instancePath:instancePath+"/max",schemaPath:"#/$defs/setpointMinMax/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}}}else{const err10={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}return validate75.errors=vErrors,0===errors}function validate72(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="thermostat"),void 0===data.temperatureScale&&(data.temperatureScale="fahrenheit"),void 0===data.minAutoDelta&&(data.minAutoDelta=3),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.hvacMode){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"hvacMode"},message:"must have required property 'hvacMode'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.fanMode){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"fanMode"},message:"must have required property 'fanMode'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.hvacState){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"hvacState"},message:"must have required property 'hvacState'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.fanState){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"fanState"},message:"must have required property 'fanState'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0===data.setpoints){const err6={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"setpoints"},message:"must have required property 'setpoints'"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0===data.temperatureScale){const err7={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"temperatureScale"},message:"must have required property 'temperatureScale'"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0===data.supportedHvacModes){const err8={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"supportedHvacModes"},message:"must have required property 'supportedHvacModes'"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0===data.supportedFanModes){const err9={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"supportedFanModes"},message:"must have required property 'supportedFanModes'"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0===data.driver){const err10={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}for(const key0 in data)if(!func2.call(schema183.properties,key0)){const err11={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err12={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err13={};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(_errs6===errors){const err14={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err15={instancePath:instancePath+"/name",schemaPath:"definitions.json#/definitions/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}let data2=data.type;if("string"!=typeof data2){const err16={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("alarm"!==data2&&"dimmer"!==data2&&"switch"!==data2&&"motionSensor"!==data2&&"windowCovering"!==data2&&"camera"!==data2&&"mediaSource"!==data2&&"thermostat"!==data2&&"lock"!==data2&&"courtesy"!==data2&&"gateway"!==data2&&"tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"uncontrolledDevice"!==data2){const err17={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema43.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.driver){let data3=data.driver;if("string"!=typeof data3){const err18={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if("adlink"!==data3&&"aws-kinesis"!==data3&&"butler"!==data3&&"crestron"!==data3&&"dell"!==data3&&"dmp"!==data3&&"doorbird"!==data3&&"dormakaba"!==data3&&"dsc"!==data3&&"ecobee"!==data3&&"epson"!==data3&&"geovision-rs"!==data3&&"geovision-as-manager"!==data3&&"honeywell-vista"!==data3&&"igor"!==data3&&"inncom"!==data3&&"isapi"!==data3&&"kohost-k7"!==data3&&"kohost"!==data3&&"lg"!==data3&&"lg-webos"!==data3&&"lapi"!==data3&&"lirc"!==data3&&"mews"!==data3&&"mht"!==data3&&"paxton"!==data3&&"pelican-wireless"!==data3&&"power-shades"!==data3&&"rachio"!==data3&&"rebrandly"!==data3&&"relay"!==data3&&"rtsp"!==data3&&"salto"!==data3&&"salto-irn"!==data3&&"samsung"!==data3&&"se"!==data3&&"sendgrid"!==data3&&"sonifi"!==data3&&"stay-n-touch"!==data3&&"storable"!==data3&&"twilio"!==data3&&"unifi"!==data3&&"valcom"!==data3&&"vivotek"!==data3&&"vizio"!==data3&&"wisenet"!==data3&&"cloudflare-images"!==data3&&"cloudflare-stream"!==data3&&"insperia-privacy"!==data3){const err19={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err20={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data.supportedNotifications){let data5=data.supportedNotifications;if(Array.isArray(data5)){const len0=data5.length;for(let i0=0;i0<len0;i0++){let data6=data5[i0];if("button 1"!==data6&&"button 2"!==data6&&"button 3"!==data6&&"button 4"!==data6&&"button 5"!==data6&&"idle"!==data6&&"powerHasBeedApplied"!==data6&&"acMainsDisconnected"!==data6&&"acMainsReconnected"!==data6&&"replaceBatterySoon"!==data6&&"replaceBatteryNow"!==data6&&"batteryOk"!==data6&&"hardwareFailure"!==data6&&"softwareFailure"!==data6&&"hardwareFailureWithCode"!==data6&&"softwareFailureWithCode"!==data6&&"motionDetection"!==data6&&"airFilterNeedsCleaned"!==data6&&"airFilterNeedsReplaced"!==data6&&"smokeDetected"!==data6&&"outsideSafeTemperatureRange"!==data6&&"outsideSafeHumidityRange"!==data6&&"scheduleMaintenance"!==data6&&"doorAjar"!==data6&&"communicationFailure"!==data6&&"communicationOk"!==data6&&"burglarAlarm"!==data6&&"fireAlarm"!==data6){const err21={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}let j0,i1=data5.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data5[i1],data5[j0])){const err22={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++;break outer0}}else{const err23={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}if(void 0!==data.notification&&(validate73(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate73.errors:vErrors.concat(validate73.errors),errors=vErrors.length)),void 0!==data.currentTemperature&&"number"!=typeof data.currentTemperature){const err24={instancePath:instancePath+"/currentTemperature",schemaPath:"#/properties/currentTemperature/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data.currentHumidity){let data9=data.currentHumidity;if("number"==typeof data9){if(data9<0||isNaN(data9)){const err25={instancePath:instancePath+"/currentHumidity",schemaPath:"#/properties/currentHumidity/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}else{const err26={instancePath:instancePath+"/currentHumidity",schemaPath:"#/properties/currentHumidity/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}if(void 0!==data.hvacMode){let data10=data.hvacMode;if("string"!=typeof data10){const err27={instancePath:instancePath+"/hvacMode",schemaPath:"#/properties/hvacMode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if("cool"!==data10&&"heat"!==data10&&"auto"!==data10&&"off"!==data10){const err28={instancePath:instancePath+"/hvacMode",schemaPath:"#/properties/supportedHvacModes/items/enum",keyword:"enum",params:{allowedValues:schema191.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}if(void 0!==data.hvacState){let data11=data.hvacState;if("string"!=typeof data11&&null!==data11){const err29={instancePath:instancePath+"/hvacState",schemaPath:"#/properties/hvacState/type",keyword:"type",params:{type:schema183.properties.hvacState.type},message:"must be string,null"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if("cooling"!==data11&&"heating"!==data11&&"off"!==data11&&null!==data11){const err30={instancePath:instancePath+"/hvacState",schemaPath:"#/properties/hvacState/enum",keyword:"enum",params:{allowedValues:schema183.properties.hvacState.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}if(void 0!==data.fanMode){let data12=data.fanMode;if("string"!=typeof data12){const err31={instancePath:instancePath+"/fanMode",schemaPath:"#/properties/fanMode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if("auto"!==data12&&"low"!==data12&&"medium"!==data12&&"high"!==data12&&"off"!==data12&&"on"!==data12){const err32={instancePath:instancePath+"/fanMode",schemaPath:"#/properties/supportedFanModes/items/enum",keyword:"enum",params:{allowedValues:schema192.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}if(void 0!==data.fanState){let data13=data.fanState;if("string"!=typeof data13&&null!==data13){const err33={instancePath:instancePath+"/fanState",schemaPath:"#/properties/fanState/type",keyword:"type",params:{type:schema183.properties.fanState.type},message:"must be string,null"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if("off"!==data13&&"low"!==data13&&"medium"!==data13&&"high"!==data13&&"on"!==data13&&null!==data13){const err34={instancePath:instancePath+"/fanState",schemaPath:"#/properties/fanState/enum",keyword:"enum",params:{allowedValues:schema183.properties.fanState.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}}let data14=data.temperatureScale;if("string"!=typeof data14){const err35={instancePath:instancePath+"/temperatureScale",schemaPath:"#/properties/temperatureScale/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if("celsius"!==data14&&"fahrenheit"!==data14){const err36={instancePath:instancePath+"/temperatureScale",schemaPath:"#/properties/temperatureScale/enum",keyword:"enum",params:{allowedValues:schema183.properties.temperatureScale.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if(void 0!==data.humidityScale){let data15=data.humidityScale;if("string"!=typeof data15&&null!==data15){const err37={instancePath:instancePath+"/humidityScale",schemaPath:"#/properties/humidityScale/type",keyword:"type",params:{type:schema183.properties.humidityScale.type},message:"must be string,null"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}if("absolute"!==data15&&"relative"!==data15&&null!==data15){const err38={instancePath:instancePath+"/humidityScale",schemaPath:"#/properties/humidityScale/enum",keyword:"enum",params:{allowedValues:schema183.properties.humidityScale.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}if(void 0!==data.supportedHvacModes){let data16=data.supportedHvacModes;if(Array.isArray(data16)){if(data16.length<2){const err39={instancePath:instancePath+"/supportedHvacModes",schemaPath:"#/properties/supportedHvacModes/minItems",keyword:"minItems",params:{limit:2},message:"must NOT have fewer than 2 items"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}const len1=data16.length;for(let i2=0;i2<len1;i2++){let data17=data16[i2];if("cool"!==data17&&"heat"!==data17&&"auto"!==data17&&"off"!==data17){const err40={instancePath:instancePath+"/supportedHvacModes/"+i2,schemaPath:"#/properties/supportedHvacModes/items/enum",keyword:"enum",params:{allowedValues:schema183.properties.supportedHvacModes.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}}let j1,i3=data16.length;if(i3>1)outer1:for(;i3--;)for(j1=i3;j1--;)if(func0(data16[i3],data16[j1])){const err41={instancePath:instancePath+"/supportedHvacModes",schemaPath:"#/properties/supportedHvacModes/uniqueItems",keyword:"uniqueItems",params:{i:i3,j:j1},message:"must NOT have duplicate items (items ## "+j1+" and "+i3+" are identical)"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++;break outer1}}else{const err42={instancePath:instancePath+"/supportedHvacModes",schemaPath:"#/properties/supportedHvacModes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}}if(void 0!==data.supportedFanModes){let data18=data.supportedFanModes;if(Array.isArray(data18)){const len2=data18.length;for(let i4=0;i4<len2;i4++){let data19=data18[i4];if("auto"!==data19&&"low"!==data19&&"medium"!==data19&&"high"!==data19&&"off"!==data19&&"on"!==data19){const err43={instancePath:instancePath+"/supportedFanModes/"+i4,schemaPath:"#/properties/supportedFanModes/items/enum",keyword:"enum",params:{allowedValues:schema183.properties.supportedFanModes.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}}let j2,i5=data18.length;if(i5>1)outer2:for(;i5--;)for(j2=i5;j2--;)if(func0(data18[i5],data18[j2])){const err44={instancePath:instancePath+"/supportedFanModes",schemaPath:"#/properties/supportedFanModes/uniqueItems",keyword:"uniqueItems",params:{i:i5,j:j2},message:"must NOT have duplicate items (items ## "+j2+" and "+i5+" are identical)"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++;break outer2}}else{const err45={instancePath:instancePath+"/supportedFanModes",schemaPath:"#/properties/supportedFanModes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}if(void 0!==data.setpoints){let data20=data.setpoints;if(data20&&"object"==typeof data20&&!Array.isArray(data20)){for(const key1 in data20)if("cool"!==key1&&"heat"!==key1&&"auto"!==key1){const err46={instancePath:instancePath+"/setpoints",schemaPath:"#/properties/setpoints/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}void 0!==data20.cool&&(validate75(data20.cool,{instancePath:instancePath+"/setpoints/cool",parentData:data20,parentDataProperty:"cool",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length)),void 0!==data20.heat&&(validate75(data20.heat,{instancePath:instancePath+"/setpoints/heat",parentData:data20,parentDataProperty:"heat",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length)),void 0!==data20.auto&&(validate75(data20.auto,{instancePath:instancePath+"/setpoints/auto",parentData:data20,parentDataProperty:"auto",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length))}else{const err47={instancePath:instancePath+"/setpoints",schemaPath:"#/properties/setpoints/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}}if("number"!=typeof data.minAutoDelta){const err48={instancePath:instancePath+"/minAutoDelta",schemaPath:"#/properties/minAutoDelta/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}if(void 0!==data.cycleRate&&"number"!=typeof data.cycleRate){const err49={instancePath:instancePath+"/cycleRate",schemaPath:"#/properties/cycleRate/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}if(void 0!==data.batteryLevel){let data26=data.batteryLevel;if("number"==typeof data26){if(data26>100||isNaN(data26)){const err50={instancePath:instancePath+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}if(data26<0||isNaN(data26)){const err51={instancePath:instancePath+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}}else{const err52={instancePath:instancePath+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err53={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}if(void 0!==data.watts){let data28=data.watts;if("number"==typeof data28){if(data28<0||isNaN(data28)){const err54={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}}else{const err55={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err56={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err57={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err58={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err59={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}}else{const err60={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err60]:vErrors.push(err60),errors++}return validate72.errors=vErrors,0===errors}__name(validate75,"validate75"),__name(validate72,"validate72");var schema200={$schema:"http://json-schema.org/draft-07/schema",$id:"windowCovering.json",title:"Window Covering",description:"Any smart window covering",required:["id","type","position","driver"],additionalProperties:!1,type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type",default:"windowCovering"},discriminator:{type:"string",enum:["basic","variable"],default:"variable"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},position:{type:["number","null"],minimum:0,maximum:100},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}}};function validate82(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate82.errors=vErrors,0===errors}function validate81(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="windowCovering"),void 0===data.discriminator&&(data.discriminator="variable"),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.position){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"position"},message:"must have required property 'position'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.driver){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}for(const key0 in data)if(!func2.call(schema200.properties,key0)){const err4={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err6={};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(_errs6===errors){const err7={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err8={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}let data2=data.type;if("string"!=typeof data2){const err9={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("alarm"!==data2&&"dimmer"!==data2&&"switch"!==data2&&"motionSensor"!==data2&&"windowCovering"!==data2&&"camera"!==data2&&"mediaSource"!==data2&&"thermostat"!==data2&&"lock"!==data2&&"courtesy"!==data2&&"gateway"!==data2&&"tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"uncontrolledDevice"!==data2){const err10={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema43.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}let data3=data.discriminator;if("string"!=typeof data3){const err11={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("basic"!==data3&&"variable"!==data3){const err12={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema200.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.supportedNotifications){let data4=data.supportedNotifications;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++){let data5=data4[i0];if("button 1"!==data5&&"button 2"!==data5&&"button 3"!==data5&&"button 4"!==data5&&"button 5"!==data5&&"idle"!==data5&&"powerHasBeedApplied"!==data5&&"acMainsDisconnected"!==data5&&"acMainsReconnected"!==data5&&"replaceBatterySoon"!==data5&&"replaceBatteryNow"!==data5&&"batteryOk"!==data5&&"hardwareFailure"!==data5&&"softwareFailure"!==data5&&"hardwareFailureWithCode"!==data5&&"softwareFailureWithCode"!==data5&&"motionDetection"!==data5&&"airFilterNeedsCleaned"!==data5&&"airFilterNeedsReplaced"!==data5&&"smokeDetected"!==data5&&"outsideSafeTemperatureRange"!==data5&&"outsideSafeHumidityRange"!==data5&&"scheduleMaintenance"!==data5&&"doorAjar"!==data5&&"communicationFailure"!==data5&&"communicationOk"!==data5&&"burglarAlarm"!==data5&&"fireAlarm"!==data5){const err13={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}let j0,i1=data4.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data4[i1],data4[j0])){const err14={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++;break outer0}}else{const err15={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.notification&&(validate82(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate82.errors:vErrors.concat(validate82.errors),errors=vErrors.length)),void 0!==data.driver){let data7=data.driver;if("string"!=typeof data7){const err16={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("adlink"!==data7&&"aws-kinesis"!==data7&&"butler"!==data7&&"crestron"!==data7&&"dell"!==data7&&"dmp"!==data7&&"doorbird"!==data7&&"dormakaba"!==data7&&"dsc"!==data7&&"ecobee"!==data7&&"epson"!==data7&&"geovision-rs"!==data7&&"geovision-as-manager"!==data7&&"honeywell-vista"!==data7&&"igor"!==data7&&"inncom"!==data7&&"isapi"!==data7&&"kohost-k7"!==data7&&"kohost"!==data7&&"lg"!==data7&&"lg-webos"!==data7&&"lapi"!==data7&&"lirc"!==data7&&"mews"!==data7&&"mht"!==data7&&"paxton"!==data7&&"pelican-wireless"!==data7&&"power-shades"!==data7&&"rachio"!==data7&&"rebrandly"!==data7&&"relay"!==data7&&"rtsp"!==data7&&"salto"!==data7&&"salto-irn"!==data7&&"samsung"!==data7&&"se"!==data7&&"sendgrid"!==data7&&"sonifi"!==data7&&"stay-n-touch"!==data7&&"storable"!==data7&&"twilio"!==data7&&"unifi"!==data7&&"valcom"!==data7&&"vivotek"!==data7&&"vizio"!==data7&&"wisenet"!==data7&&"cloudflare-images"!==data7&&"cloudflare-stream"!==data7&&"insperia-privacy"!==data7){const err17={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err18={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data.position){let data9=data.position;if("number"!=typeof data9&&null!==data9){const err19={instancePath:instancePath+"/position",schemaPath:"#/properties/position/type",keyword:"type",params:{type:schema200.properties.position.type},message:"must be number,null"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if("number"==typeof data9){if(data9>100||isNaN(data9)){const err20={instancePath:instancePath+"/position",schemaPath:"#/properties/position/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(data9<0||isNaN(data9)){const err21={instancePath:instancePath+"/position",schemaPath:"#/properties/position/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err22={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data.watts){let data11=data.watts;if("number"==typeof data11){if(data11<0||isNaN(data11)){const err23={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}else{const err24={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err25={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err26={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err27={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err28={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}else{const err29={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}return validate81.errors=vErrors,0===errors}function validate66(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="room"),void 0===data.dimmers&&(data.dimmers=[]),void 0===data.switches&&(data.switches=[]),void 0===data.thermostats&&(data.thermostats=[]),void 0===data.locks&&(data.locks=[]),void 0===data.windowCoverings&&(data.windowCoverings=[]),void 0===data.courtesy&&(data.courtesy=[]),void 0===data.cameras&&(data.cameras=[]),void 0===data.mediaSources&&(data.mediaSources=[]),void 0===data.motionSensors&&(data.motionSensors=[]),void 0===data.alarms&&(data.alarms=[]),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.name){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}for(const key0 in data)if(!func2.call(schema172.properties,key0)){const err2={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs6===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if("room"!==data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema172.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.name&&"string"!=typeof data.name){const err8={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.floor&&"string"!=typeof data.floor){const err9={instancePath:instancePath+"/floor",schemaPath:"#/properties/floor/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}let data4=data.dimmers;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++)validate27(data4[i0],{instancePath:instancePath+"/dimmers/"+i0,parentData:data4,parentDataProperty:i0,rootData:rootData})||(vErrors=null===vErrors?validate27.errors:vErrors.concat(validate27.errors),errors=vErrors.length)}else{const err10={instancePath:instancePath+"/dimmers",schemaPath:"#/properties/dimmers/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}let data6=data.switches;if(Array.isArray(data6)){const len1=data6.length;for(let i1=0;i1<len1;i1++)validate68(data6[i1],{instancePath:instancePath+"/switches/"+i1,parentData:data6,parentDataProperty:i1,rootData:rootData})||(vErrors=null===vErrors?validate68.errors:vErrors.concat(validate68.errors),errors=vErrors.length)}else{const err11={instancePath:instancePath+"/switches",schemaPath:"#/properties/switches/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}let data8=data.thermostats;if(Array.isArray(data8)){const len2=data8.length;for(let i2=0;i2<len2;i2++)validate72(data8[i2],{instancePath:instancePath+"/thermostats/"+i2,parentData:data8,parentDataProperty:i2,rootData:rootData})||(vErrors=null===vErrors?validate72.errors:vErrors.concat(validate72.errors),errors=vErrors.length)}else{const err12={instancePath:instancePath+"/thermostats",schemaPath:"#/properties/thermostats/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}let data10=data.locks;if(Array.isArray(data10)){const len3=data10.length;for(let i3=0;i3<len3;i3++)validate45(data10[i3],{instancePath:instancePath+"/locks/"+i3,parentData:data10,parentDataProperty:i3,rootData:rootData})||(vErrors=null===vErrors?validate45.errors:vErrors.concat(validate45.errors),errors=vErrors.length)}else{const err13={instancePath:instancePath+"/locks",schemaPath:"#/properties/locks/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}let data12=data.windowCoverings;if(Array.isArray(data12)){const len4=data12.length;for(let i4=0;i4<len4;i4++)validate81(data12[i4],{instancePath:instancePath+"/windowCoverings/"+i4,parentData:data12,parentDataProperty:i4,rootData:rootData})||(vErrors=null===vErrors?validate81.errors:vErrors.concat(validate81.errors),errors=vErrors.length)}else{const err14={instancePath:instancePath+"/windowCoverings",schemaPath:"#/properties/windowCoverings/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}let data14=data.courtesy;if(Array.isArray(data14)){const len5=data14.length;for(let i5=0;i5<len5;i5++)validate22(data14[i5],{instancePath:instancePath+"/courtesy/"+i5,parentData:data14,parentDataProperty:i5,rootData:rootData})||(vErrors=null===vErrors?validate22.errors:vErrors.concat(validate22.errors),errors=vErrors.length)}else{const err15={instancePath:instancePath+"/courtesy",schemaPath:"#/properties/courtesy/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}let data16=data.cameras;if(Array.isArray(data16)){const len6=data16.length;for(let i6=0;i6<len6;i6++)validate17(data16[i6],{instancePath:instancePath+"/cameras/"+i6,parentData:data16,parentDataProperty:i6,rootData:rootData})||(vErrors=null===vErrors?validate17.errors:vErrors.concat(validate17.errors),errors=vErrors.length)}else{const err16={instancePath:instancePath+"/cameras",schemaPath:"#/properties/cameras/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}let data18=data.mediaSources;if(Array.isArray(data18)){const len7=data18.length;for(let i7=0;i7<len7;i7++)validate49(data18[i7],{instancePath:instancePath+"/mediaSources/"+i7,parentData:data18,parentDataProperty:i7,rootData:rootData})||(vErrors=null===vErrors?validate49.errors:vErrors.concat(validate49.errors),errors=vErrors.length)}else{const err17={instancePath:instancePath+"/mediaSources",schemaPath:"#/properties/mediaSources/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}let data20=data.motionSensors;if(Array.isArray(data20)){const len8=data20.length;for(let i8=0;i8<len8;i8++)validate52(data20[i8],{instancePath:instancePath+"/motionSensors/"+i8,parentData:data20,parentDataProperty:i8,rootData:rootData})||(vErrors=null===vErrors?validate52.errors:vErrors.concat(validate52.errors),errors=vErrors.length)}else{const err18={instancePath:instancePath+"/motionSensors",schemaPath:"#/properties/motionSensors/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}let data22=data.alarms;if(Array.isArray(data22)){const len9=data22.length;for(let i9=0;i9<len9;i9++)validate10(data22[i9],{instancePath:instancePath+"/alarms/"+i9,parentData:data22,parentDataProperty:i9,rootData:rootData})||(vErrors=null===vErrors?validate10.errors:vErrors.concat(validate10.errors),errors=vErrors.length)}else{const err19={instancePath:instancePath+"/alarms",schemaPath:"#/properties/alarms/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.occupiedAt){let data24=data.occupiedAt;if("string"!=typeof data24&&(!data24||"object"!=typeof data24||Array.isArray(data24))){const err20={instancePath:instancePath+"/occupiedAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema101.type},message:"must be string,object"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if("string"==typeof data24&&!formats4.validate(data24)){const err21={instancePath:instancePath+"/occupiedAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}if(void 0!==data.createdAt){let data25=data.createdAt;if("string"!=typeof data25&&(!data25||"object"!=typeof data25||Array.isArray(data25))){const err22={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema101.type},message:"must be string,object"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if("string"==typeof data25&&!formats4.validate(data25)){const err23={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}if(void 0!==data.updatedAt){let data26=data.updatedAt;if("string"!=typeof data26&&(!data26||"object"!=typeof data26||Array.isArray(data26))){const err24={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:schema151.type},message:"must be string,object"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if("string"==typeof data26&&!formats4.validate(data26)){const err25={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}}else{const err26={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}return validate66.errors=vErrors,0===errors}__name(validate82,"validate82"),__name(validate81,"validate81"),__name(validate66,"validate66");var validateScene=validate90,schema212={$schema:"http://json-schema.org/draft-07/schema",$id:"scene.json",title:"Scene",description:"A room represents a physical space of controllable IoT devices",type:"object",required:["id","name","type"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},description:{type:"string"},type:{type:"string",enum:["scene"],default:"scene"},devices:{type:"object",properties:{switches:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},state:{$ref:"switch.json#/properties/state"}},default:[]}},dimmers:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},level:{$ref:"dimmer.json#/properties/level"}}},default:[]},windowCoverings:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},position:{$ref:"windowCovering.json#/properties/position"}}},default:[]},thermostats:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},hvacMode:{$ref:"thermostat.json#/properties/hvacMode"},setpoints:{$ref:"thermostat.json#/properties/setpoints"},fanMode:{$ref:"thermostat.json#/properties/fanMode"},setpointDelta:{type:"number"}}},default:[]},mediaSources:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},volume:{type:"number",minimum:0,maximum:100},commands:{type:"array",items:{type:"string"}}}}},locks:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},state:{$ref:"lock.json#/properties/state"},mode:{$ref:"lock.json#/properties/mode"}}}}},additionalProperties:!1},isDefault:{type:"boolean",default:!1},showOnUi:{type:"boolean",default:!0}}},schema215={type:"string",enum:["on","off"]},schema217={type:["number","null"],minimum:0,maximum:100},schema219={type:["number","null"],minimum:0,maximum:100},schema228={type:["string","null"],enum:["locked","unlocked",null]},schema229={type:["string","null"],enum:["normal","autoLock","emergencyOpen","emergencyClose","holdOpen","lockdown",null],description:"emergencyOpen and emergencyClose are deprecated and can be removed once Salto, Paxton and Geovision drivers are updated",default:null};function validate91(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if("string"!=typeof data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if("cool"!==data&&"heat"!==data&&"auto"!==data&&"off"!==data){const err1={instancePath:instancePath,schemaPath:"#/properties/supportedHvacModes/items/enum",keyword:"enum",params:{allowedValues:schema191.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}return validate91.errors=vErrors,0===errors}function validate93(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){for(const key0 in data)if("cool"!==key0&&"heat"!==key0&&"auto"!==key0){const err0={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}void 0!==data.cool&&(validate75(data.cool,{instancePath:instancePath+"/cool",parentData:data,parentDataProperty:"cool",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length)),void 0!==data.heat&&(validate75(data.heat,{instancePath:instancePath+"/heat",parentData:data,parentDataProperty:"heat",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length)),void 0!==data.auto&&(validate75(data.auto,{instancePath:instancePath+"/auto",parentData:data,parentDataProperty:"auto",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length))}else{const err1={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}return validate93.errors=vErrors,0===errors}function validate98(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if("string"!=typeof data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if("auto"!==data&&"low"!==data&&"medium"!==data&&"high"!==data&&"off"!==data&&"on"!==data){const err1={instancePath:instancePath,schemaPath:"#/properties/supportedFanModes/items/enum",keyword:"enum",params:{allowedValues:schema192.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}return validate98.errors=vErrors,0===errors}function validate90(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="scene"),void 0===data.isDefault&&(data.isDefault=!1),void 0===data.showOnUi&&(data.showOnUi=!0),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.name){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.type){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}for(const key0 in data)if("id"!==key0&&"name"!==key0&&"description"!==key0&&"type"!==key0&&"devices"!==key0&&"isDefault"!==key0&&"showOnUi"!==key0){const err3={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs6===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.description&&"string"!=typeof data.description){const err8={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}let data3=data.type;if("string"!=typeof data3){const err9={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("scene"!==data3){const err10={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema212.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.devices){let data4=data.devices;if(data4&&"object"==typeof data4&&!Array.isArray(data4)){void 0===data4.dimmers&&(data4.dimmers=[]),void 0===data4.windowCoverings&&(data4.windowCoverings=[]),void 0===data4.thermostats&&(data4.thermostats=[]);for(const key1 in data4)if("switches"!==key1&&"dimmers"!==key1&&"windowCoverings"!==key1&&"thermostats"!==key1&&"mediaSources"!==key1&&"locks"!==key1){const err11={instancePath:instancePath+"/devices",schemaPath:"#/properties/devices/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data4.switches){let data5=data4.switches;if(Array.isArray(data5)){const len0=data5.length;for(let i0=0;i0<len0;i0++){let data6=data5[i0];if(data6&&"object"==typeof data6&&!Array.isArray(data6)){if(void 0!==data6.id){let data7=data6.id;if("string"!=typeof data7){const err12={instancePath:instancePath+"/devices/switches/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}const _errs23=errors,_errs24=errors;if("global"!==data7&&"system"!==data7){const err13={};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(_errs24===errors){const err14={instancePath:instancePath+"/devices/switches/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}else errors=_errs23,null!==vErrors&&(_errs23?vErrors.length=_errs23:vErrors=null)}if(void 0!==data6.state){let data8=data6.state;if("string"!=typeof data8){const err15={instancePath:instancePath+"/devices/switches/"+i0+"/state",schemaPath:"switch.json#/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if("on"!==data8&&"off"!==data8){const err16={instancePath:instancePath+"/devices/switches/"+i0+"/state",schemaPath:"switch.json#/properties/state/enum",keyword:"enum",params:{allowedValues:schema215.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}}else{const err17={instancePath:instancePath+"/devices/switches/"+i0,schemaPath:"#/properties/devices/properties/switches/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}}else{const err18={instancePath:instancePath+"/devices/switches",schemaPath:"#/properties/devices/properties/switches/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}let data9=data4.dimmers;if(Array.isArray(data9)){const len1=data9.length;for(let i1=0;i1<len1;i1++){let data10=data9[i1];if(data10&&"object"==typeof data10&&!Array.isArray(data10)){if(void 0!==data10.id){let data11=data10.id;if("string"!=typeof data11){const err19={instancePath:instancePath+"/devices/dimmers/"+i1+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}const _errs35=errors,_errs36=errors;if("global"!==data11&&"system"!==data11){const err20={};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(_errs36===errors){const err21={instancePath:instancePath+"/devices/dimmers/"+i1+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}else errors=_errs35,null!==vErrors&&(_errs35?vErrors.length=_errs35:vErrors=null)}if(void 0!==data10.level){let data12=data10.level;if("number"!=typeof data12&&null!==data12){const err22={instancePath:instancePath+"/devices/dimmers/"+i1+"/level",schemaPath:"dimmer.json#/properties/level/type",keyword:"type",params:{type:schema217.type},message:"must be number,null"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if("number"==typeof data12){if(data12>100||isNaN(data12)){const err23={instancePath:instancePath+"/devices/dimmers/"+i1+"/level",schemaPath:"dimmer.json#/properties/level/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(data12<0||isNaN(data12)){const err24={instancePath:instancePath+"/devices/dimmers/"+i1+"/level",schemaPath:"dimmer.json#/properties/level/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}}}else{const err25={instancePath:instancePath+"/devices/dimmers/"+i1,schemaPath:"#/properties/devices/properties/dimmers/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}}else{const err26={instancePath:instancePath+"/devices/dimmers",schemaPath:"#/properties/devices/properties/dimmers/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}let data13=data4.windowCoverings;if(Array.isArray(data13)){const len2=data13.length;for(let i2=0;i2<len2;i2++){let data14=data13[i2];if(data14&&"object"==typeof data14&&!Array.isArray(data14)){if(void 0!==data14.id){let data15=data14.id;if("string"!=typeof data15){const err27={instancePath:instancePath+"/devices/windowCoverings/"+i2+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}const _errs47=errors,_errs48=errors;if("global"!==data15&&"system"!==data15){const err28={};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(_errs48===errors){const err29={instancePath:instancePath+"/devices/windowCoverings/"+i2+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}else errors=_errs47,null!==vErrors&&(_errs47?vErrors.length=_errs47:vErrors=null)}if(void 0!==data14.position){let data16=data14.position;if("number"!=typeof data16&&null!==data16){const err30={instancePath:instancePath+"/devices/windowCoverings/"+i2+"/position",schemaPath:"windowCovering.json#/properties/position/type",keyword:"type",params:{type:schema219.type},message:"must be number,null"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if("number"==typeof data16){if(data16>100||isNaN(data16)){const err31={instancePath:instancePath+"/devices/windowCoverings/"+i2+"/position",schemaPath:"windowCovering.json#/properties/position/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(data16<0||isNaN(data16)){const err32={instancePath:instancePath+"/devices/windowCoverings/"+i2+"/position",schemaPath:"windowCovering.json#/properties/position/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}}}else{const err33={instancePath:instancePath+"/devices/windowCoverings/"+i2,schemaPath:"#/properties/devices/properties/windowCoverings/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}}else{const err34={instancePath:instancePath+"/devices/windowCoverings",schemaPath:"#/properties/devices/properties/windowCoverings/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}let data17=data4.thermostats;if(Array.isArray(data17)){const len3=data17.length;for(let i3=0;i3<len3;i3++){let data18=data17[i3];if(data18&&"object"==typeof data18&&!Array.isArray(data18)){if(void 0!==data18.id){let data19=data18.id;if("string"!=typeof data19){const err35={instancePath:instancePath+"/devices/thermostats/"+i3+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}const _errs59=errors,_errs60=errors;if("global"!==data19&&"system"!==data19){const err36={};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if(_errs60===errors){const err37={instancePath:instancePath+"/devices/thermostats/"+i3+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}else errors=_errs59,null!==vErrors&&(_errs59?vErrors.length=_errs59:vErrors=null)}if(void 0!==data18.hvacMode&&(validate91(data18.hvacMode,{instancePath:instancePath+"/devices/thermostats/"+i3+"/hvacMode",parentData:data18,parentDataProperty:"hvacMode",rootData:rootData})||(vErrors=null===vErrors?validate91.errors:vErrors.concat(validate91.errors),errors=vErrors.length)),void 0!==data18.setpoints&&(validate93(data18.setpoints,{instancePath:instancePath+"/devices/thermostats/"+i3+"/setpoints",parentData:data18,parentDataProperty:"setpoints",rootData:rootData})||(vErrors=null===vErrors?validate93.errors:vErrors.concat(validate93.errors),errors=vErrors.length)),void 0!==data18.fanMode&&(validate98(data18.fanMode,{instancePath:instancePath+"/devices/thermostats/"+i3+"/fanMode",parentData:data18,parentDataProperty:"fanMode",rootData:rootData})||(vErrors=null===vErrors?validate98.errors:vErrors.concat(validate98.errors),errors=vErrors.length)),void 0!==data18.setpointDelta&&"number"!=typeof data18.setpointDelta){const err38={instancePath:instancePath+"/devices/thermostats/"+i3+"/setpointDelta",schemaPath:"#/properties/devices/properties/thermostats/items/properties/setpointDelta/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}else{const err39={instancePath:instancePath+"/devices/thermostats/"+i3,schemaPath:"#/properties/devices/properties/thermostats/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}}else{const err40={instancePath:instancePath+"/devices/thermostats",schemaPath:"#/properties/devices/properties/thermostats/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if(void 0!==data4.mediaSources){let data24=data4.mediaSources;if(Array.isArray(data24)){const len4=data24.length;for(let i4=0;i4<len4;i4++){let data25=data24[i4];if(data25&&"object"==typeof data25&&!Array.isArray(data25)){if(void 0!==data25.id){let data26=data25.id;if("string"!=typeof data26){const err41={instancePath:instancePath+"/devices/mediaSources/"+i4+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}const _errs73=errors,_errs74=errors;if("global"!==data26&&"system"!==data26){const err42={};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(_errs74===errors){const err43={instancePath:instancePath+"/devices/mediaSources/"+i4+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}else errors=_errs73,null!==vErrors&&(_errs73?vErrors.length=_errs73:vErrors=null)}if(void 0!==data25.volume){let data27=data25.volume;if("number"==typeof data27){if(data27>100||isNaN(data27)){const err44={instancePath:instancePath+"/devices/mediaSources/"+i4+"/volume",schemaPath:"#/properties/devices/properties/mediaSources/items/properties/volume/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}if(data27<0||isNaN(data27)){const err45={instancePath:instancePath+"/devices/mediaSources/"+i4+"/volume",schemaPath:"#/properties/devices/properties/mediaSources/items/properties/volume/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}else{const err46={instancePath:instancePath+"/devices/mediaSources/"+i4+"/volume",schemaPath:"#/properties/devices/properties/mediaSources/items/properties/volume/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}if(void 0!==data25.commands){let data28=data25.commands;if(Array.isArray(data28)){const len5=data28.length;for(let i5=0;i5<len5;i5++)if("string"!=typeof data28[i5]){const err47={instancePath:instancePath+"/devices/mediaSources/"+i4+"/commands/"+i5,schemaPath:"#/properties/devices/properties/mediaSources/items/properties/commands/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}}else{const err48={instancePath:instancePath+"/devices/mediaSources/"+i4+"/commands",schemaPath:"#/properties/devices/properties/mediaSources/items/properties/commands/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}}}else{const err49={instancePath:instancePath+"/devices/mediaSources/"+i4,schemaPath:"#/properties/devices/properties/mediaSources/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}}}else{const err50={instancePath:instancePath+"/devices/mediaSources",schemaPath:"#/properties/devices/properties/mediaSources/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}}if(void 0!==data4.locks){let data30=data4.locks;if(Array.isArray(data30)){const len6=data30.length;for(let i6=0;i6<len6;i6++){let data31=data30[i6];if(data31&&"object"==typeof data31&&!Array.isArray(data31)){if(void 0!==data31.id){let data32=data31.id;if("string"!=typeof data32){const err51={instancePath:instancePath+"/devices/locks/"+i6+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}const _errs88=errors,_errs89=errors;if("global"!==data32&&"system"!==data32){const err52={};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}if(_errs89===errors){const err53={instancePath:instancePath+"/devices/locks/"+i6+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}else errors=_errs88,null!==vErrors&&(_errs88?vErrors.length=_errs88:vErrors=null)}if(void 0!==data31.state){let data33=data31.state;if("string"!=typeof data33&&null!==data33){const err54={instancePath:instancePath+"/devices/locks/"+i6+"/state",schemaPath:"lock.json#/properties/state/type",keyword:"type",params:{type:schema228.type},message:"must be string,null"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}if("locked"!==data33&&"unlocked"!==data33&&null!==data33){const err55={instancePath:instancePath+"/devices/locks/"+i6+"/state",schemaPath:"lock.json#/properties/state/enum",keyword:"enum",params:{allowedValues:schema228.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}}if(void 0!==data31.mode){let data34=data31.mode;if("string"!=typeof data34&&null!==data34){const err56={instancePath:instancePath+"/devices/locks/"+i6+"/mode",schemaPath:"lock.json#/properties/mode/type",keyword:"type",params:{type:schema229.type},message:"must be string,null"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}if("normal"!==data34&&"autoLock"!==data34&&"emergencyOpen"!==data34&&"emergencyClose"!==data34&&"holdOpen"!==data34&&"lockdown"!==data34&&null!==data34){const err57={instancePath:instancePath+"/devices/locks/"+i6+"/mode",schemaPath:"lock.json#/properties/mode/enum",keyword:"enum",params:{allowedValues:schema229.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}}}else{const err58={instancePath:instancePath+"/devices/locks/"+i6,schemaPath:"#/properties/devices/properties/locks/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}}}else{const err59={instancePath:instancePath+"/devices/locks",schemaPath:"#/properties/devices/properties/locks/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}}}else{const err60={instancePath:instancePath+"/devices",schemaPath:"#/properties/devices/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err60]:vErrors.push(err60),errors++}}if("boolean"!=typeof data.isDefault){const err61={instancePath:instancePath+"/isDefault",schemaPath:"#/properties/isDefault/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err61]:vErrors.push(err61),errors++}if("boolean"!=typeof data.showOnUi){const err62={instancePath:instancePath+"/showOnUi",schemaPath:"#/properties/showOnUi/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err62]:vErrors.push(err62),errors++}}else{const err63={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err63]:vErrors.push(err63),errors++}return validate90.errors=vErrors,0===errors}__name(validate91,"validate91"),__name(validate93,"validate93"),__name(validate98,"validate98"),__name(validate90,"validate90");var validateShortLink=validate100,schema230={$schema:"http://json-schema.org/draft-07/schema",$id:"shortLink.json",title:"Short Link",type:"object",required:["destination","url"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"shortLink",enum:["shortLink"]},title:{type:"string"},destination:{type:"string",format:"uri"},url:{type:"string",format:"uri"},systemId:{$ref:"definitions.json#/definitions/systemId"}}};function validate100(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="shortLink"),void 0===data.destination){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"destination"},message:"must have required property 'destination'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.url){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs5===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if("shortLink"!==data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema230.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.title&&"string"!=typeof data.title){const err7={instancePath:instancePath+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.destination){let data3=data.destination;if("string"==typeof data3){if(!formats0(data3)){const err8={instancePath:instancePath+"/destination",schemaPath:"#/properties/destination/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}else{const err9={instancePath:instancePath+"/destination",schemaPath:"#/properties/destination/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.url){let data4=data.url;if("string"==typeof data4){if(!formats0(data4)){const err10={instancePath:instancePath+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}else{const err11={instancePath:instancePath+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err12={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}else{const err13={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}return validate100.errors=vErrors,0===errors}__name(validate100,"validate100");var validateSmsMessage=validate101,schema233={$schema:"http://json-schema.org/draft-07/schema",$id:"smsMessage.json",title:"Sms Message",type:"object",required:["to","from","status"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"smsMessage",enum:["smsMessage","whatsappMessage"]},to:{type:"string"},from:{type:"string"},media:{type:"string",format:"uri"},status:{type:"string",enum:["queued","accepted","sending","sent","failed","delivered","undelivered","receiving","received","read"]},body:{type:"string"},driver:{type:"string"},appData:{type:"object"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},systemId:{$ref:"definitions.json#/definitions/systemId"}}};function validate101(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="smsMessage"),void 0===data.to){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"to"},message:"must have required property 'to'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.from){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"from"},message:"must have required property 'from'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.status){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs5===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if("smsMessage"!==data1&&"whatsappMessage"!==data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema233.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.to&&"string"!=typeof data.to){const err8={instancePath:instancePath+"/to",schemaPath:"#/properties/to/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.from&&"string"!=typeof data.from){const err9={instancePath:instancePath+"/from",schemaPath:"#/properties/from/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.media){let data4=data.media;if("string"==typeof data4){if(!formats0(data4)){const err10={instancePath:instancePath+"/media",schemaPath:"#/properties/media/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}else{const err11={instancePath:instancePath+"/media",schemaPath:"#/properties/media/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.status){let data5=data.status;if("string"!=typeof data5){const err12={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if("queued"!==data5&&"accepted"!==data5&&"sending"!==data5&&"sent"!==data5&&"failed"!==data5&&"delivered"!==data5&&"undelivered"!==data5&&"receiving"!==data5&&"received"!==data5&&"read"!==data5){const err13={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema233.properties.status.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.body&&"string"!=typeof data.body){const err14={instancePath:instancePath+"/body",schemaPath:"#/properties/body/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data.driver&&"string"!=typeof data.driver){const err15={instancePath:instancePath+"/driver",schemaPath:"#/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data.appData){let data8=data.appData;if(!data8||"object"!=typeof data8||Array.isArray(data8)){const err16={instancePath:instancePath+"/appData",schemaPath:"#/properties/appData/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.createdAt){let data9=data.createdAt;if("string"!=typeof data9&&(!data9||"object"!=typeof data9||Array.isArray(data9))){const err17={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if("string"==typeof data9&&!formats4.validate(data9)){const err18={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data.updatedAt){let data10=data.updatedAt;if("string"!=typeof data10&&(!data10||"object"!=typeof data10||Array.isArray(data10))){const err19={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if("string"==typeof data10&&!formats4.validate(data10)){const err20={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err21={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}else{const err22={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}return validate101.errors=vErrors,0===errors}__name(validate101,"validate101");var validateSpace=validate102,schema238={$schema:"http://json-schema.org/draft-07/schema",$id:"space.json",title:"Space",type:"object",required:["id","name","type","discriminator"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string",minLength:1},type:{type:"string",default:"space",enum:["space"]},discriminator:{type:"string",enum:["classRoom","hotelRoom","office","building","commonArea","conferenceRoom","lobby","gym","pool","restaurant","unit"]},driver:{$ref:"definitions.json#/definitions/driver"},category:{type:"string",description:"This is the category id"},rooms:{type:"array",items:{type:"string"}},subGroups:{type:"array",items:{type:"string"}},occupied:{type:"boolean"},inUse:{type:"boolean"},eco:{type:"object",additionalProperties:!1,default:{active:!1,allowed:!1,previousState:null},properties:{active:{type:"boolean",default:!1},activatedAt:{type:["string","object"],format:"date-time"},allowed:{type:"boolean",default:!1},previousState:{type:["object","null"],properties:{thermostats:{type:"object",patternProperties:{".*":{type:"object",properties:{setpoints:{$ref:"thermostat.json#/properties/setpoints"}}}}}},additionalProperties:!1}}},features:{type:"array",items:{type:"string",enum:["pet"]}},maximumOccupancy:{type:"number",minimum:1},housekeepingStatus:{type:"string",enum:["clean","dirty","inspected","pickup"]},serviceStatus:{type:"string",enum:["inService","outOfOrder","outOfService"]},systemId:{$ref:"definitions.json#/definitions/systemId"}}},pattern8=new RegExp(".*","u");function validate103(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){for(const key0 in data)if("cool"!==key0&&"heat"!==key0&&"auto"!==key0){const err0={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}void 0!==data.cool&&(validate75(data.cool,{instancePath:instancePath+"/cool",parentData:data,parentDataProperty:"cool",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length)),void 0!==data.heat&&(validate75(data.heat,{instancePath:instancePath+"/heat",parentData:data,parentDataProperty:"heat",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length)),void 0!==data.auto&&(validate75(data.auto,{instancePath:instancePath+"/auto",parentData:data,parentDataProperty:"auto",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length))}else{const err1={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}return validate103.errors=vErrors,0===errors}function validate102(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="space"),void 0===data.eco&&(data.eco={active:!1,allowed:!1,previousState:null}),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.name){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.type){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.discriminator){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}for(const key0 in data)if(!func2.call(schema238.properties,key0)){const err4={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err6={};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(_errs6===errors){const err7={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}if(void 0!==data.name){let data1=data.name;if("string"==typeof data1){if(func4(data1)<1){const err8={instancePath:instancePath+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}else{const err9={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}let data2=data.type;if("string"!=typeof data2){const err10={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("space"!==data2){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema238.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.discriminator){let data3=data.discriminator;if("string"!=typeof data3){const err12={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if("classRoom"!==data3&&"hotelRoom"!==data3&&"office"!==data3&&"building"!==data3&&"commonArea"!==data3&&"conferenceRoom"!==data3&&"lobby"!==data3&&"gym"!==data3&&"pool"!==data3&&"restaurant"!==data3&&"unit"!==data3){const err13={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema238.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.driver){let data4=data.driver;if("string"!=typeof data4){const err14={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("adlink"!==data4&&"aws-kinesis"!==data4&&"butler"!==data4&&"crestron"!==data4&&"dell"!==data4&&"dmp"!==data4&&"doorbird"!==data4&&"dormakaba"!==data4&&"dsc"!==data4&&"ecobee"!==data4&&"epson"!==data4&&"geovision-rs"!==data4&&"geovision-as-manager"!==data4&&"honeywell-vista"!==data4&&"igor"!==data4&&"inncom"!==data4&&"isapi"!==data4&&"kohost-k7"!==data4&&"kohost"!==data4&&"lg"!==data4&&"lg-webos"!==data4&&"lapi"!==data4&&"lirc"!==data4&&"mews"!==data4&&"mht"!==data4&&"paxton"!==data4&&"pelican-wireless"!==data4&&"power-shades"!==data4&&"rachio"!==data4&&"rebrandly"!==data4&&"relay"!==data4&&"rtsp"!==data4&&"salto"!==data4&&"salto-irn"!==data4&&"samsung"!==data4&&"se"!==data4&&"sendgrid"!==data4&&"sonifi"!==data4&&"stay-n-touch"!==data4&&"storable"!==data4&&"twilio"!==data4&&"unifi"!==data4&&"valcom"!==data4&&"vivotek"!==data4&&"vizio"!==data4&&"wisenet"!==data4&&"cloudflare-images"!==data4&&"cloudflare-stream"!==data4&&"insperia-privacy"!==data4){const err15={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.category&&"string"!=typeof data.category){const err16={instancePath:instancePath+"/category",schemaPath:"#/properties/category/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.rooms){let data6=data.rooms;if(Array.isArray(data6)){const len0=data6.length;for(let i0=0;i0<len0;i0++)if("string"!=typeof data6[i0]){const err17={instancePath:instancePath+"/rooms/"+i0,schemaPath:"#/properties/rooms/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}else{const err18={instancePath:instancePath+"/rooms",schemaPath:"#/properties/rooms/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data.subGroups){let data8=data.subGroups;if(Array.isArray(data8)){const len1=data8.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data8[i1]){const err19={instancePath:instancePath+"/subGroups/"+i1,schemaPath:"#/properties/subGroups/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}else{const err20={instancePath:instancePath+"/subGroups",schemaPath:"#/properties/subGroups/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}if(void 0!==data.occupied&&"boolean"!=typeof data.occupied){const err21={instancePath:instancePath+"/occupied",schemaPath:"#/properties/occupied/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0!==data.inUse&&"boolean"!=typeof data.inUse){const err22={instancePath:instancePath+"/inUse",schemaPath:"#/properties/inUse/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}let data12=data.eco;if(data12&&"object"==typeof data12&&!Array.isArray(data12)){void 0===data12.active&&(data12.active=!1),void 0===data12.allowed&&(data12.allowed=!1);for(const key1 in data12)if("active"!==key1&&"activatedAt"!==key1&&"allowed"!==key1&&"previousState"!==key1){const err23={instancePath:instancePath+"/eco",schemaPath:"#/properties/eco/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if("boolean"!=typeof data12.active){const err24={instancePath:instancePath+"/eco/active",schemaPath:"#/properties/eco/properties/active/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data12.activatedAt){let data14=data12.activatedAt;if("string"!=typeof data14&&(!data14||"object"!=typeof data14||Array.isArray(data14))){const err25={instancePath:instancePath+"/eco/activatedAt",schemaPath:"#/properties/eco/properties/activatedAt/type",keyword:"type",params:{type:schema238.properties.eco.properties.activatedAt.type},message:"must be string,object"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if("string"==typeof data14&&!formats4.validate(data14)){const err26={instancePath:instancePath+"/eco/activatedAt",schemaPath:"#/properties/eco/properties/activatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}if("boolean"!=typeof data12.allowed){const err27={instancePath:instancePath+"/eco/allowed",schemaPath:"#/properties/eco/properties/allowed/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data12.previousState){let data16=data12.previousState;if((!data16||"object"!=typeof data16||Array.isArray(data16))&&null!==data16){const err28={instancePath:instancePath+"/eco/previousState",schemaPath:"#/properties/eco/properties/previousState/type",keyword:"type",params:{type:schema238.properties.eco.properties.previousState.type},message:"must be object,null"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(data16&&"object"==typeof data16&&!Array.isArray(data16)){for(const key2 in data16)if("thermostats"!==key2){const err29={instancePath:instancePath+"/eco/previousState",schemaPath:"#/properties/eco/properties/previousState/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key2},message:"must NOT have additional properties"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data16.thermostats){let data17=data16.thermostats;if(data17&&"object"==typeof data17&&!Array.isArray(data17)){for(const key3 in data17)if(pattern8.test(key3)){let data18=data17[key3];if(data18&&"object"==typeof data18&&!Array.isArray(data18))void 0!==data18.setpoints&&(validate103(data18.setpoints,{instancePath:instancePath+"/eco/previousState/thermostats/"+key3.replace(/~/g,"~0").replace(/\//g,"~1")+"/setpoints",parentData:data18,parentDataProperty:"setpoints",rootData:rootData})||(vErrors=null===vErrors?validate103.errors:vErrors.concat(validate103.errors),errors=vErrors.length));else{const err30={instancePath:instancePath+"/eco/previousState/thermostats/"+key3.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/eco/properties/previousState/properties/thermostats/patternProperties/.*/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}}else{const err31={instancePath:instancePath+"/eco/previousState/thermostats",schemaPath:"#/properties/eco/properties/previousState/properties/thermostats/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}}}}else{const err32={instancePath:instancePath+"/eco",schemaPath:"#/properties/eco/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if(void 0!==data.features){let data20=data.features;if(Array.isArray(data20)){const len2=data20.length;for(let i2=0;i2<len2;i2++){let data21=data20[i2];if("string"!=typeof data21){const err33={instancePath:instancePath+"/features/"+i2,schemaPath:"#/properties/features/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if("pet"!==data21){const err34={instancePath:instancePath+"/features/"+i2,schemaPath:"#/properties/features/items/enum",keyword:"enum",params:{allowedValues:schema238.properties.features.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}}}else{const err35={instancePath:instancePath+"/features",schemaPath:"#/properties/features/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}}if(void 0!==data.maximumOccupancy){let data22=data.maximumOccupancy;if("number"==typeof data22){if(data22<1||isNaN(data22)){const err36={instancePath:instancePath+"/maximumOccupancy",schemaPath:"#/properties/maximumOccupancy/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}else{const err37={instancePath:instancePath+"/maximumOccupancy",schemaPath:"#/properties/maximumOccupancy/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}if(void 0!==data.housekeepingStatus){let data23=data.housekeepingStatus;if("string"!=typeof data23){const err38={instancePath:instancePath+"/housekeepingStatus",schemaPath:"#/properties/housekeepingStatus/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}if("clean"!==data23&&"dirty"!==data23&&"inspected"!==data23&&"pickup"!==data23){const err39={instancePath:instancePath+"/housekeepingStatus",schemaPath:"#/properties/housekeepingStatus/enum",keyword:"enum",params:{allowedValues:schema238.properties.housekeepingStatus.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}if(void 0!==data.serviceStatus){let data24=data.serviceStatus;if("string"!=typeof data24){const err40={instancePath:instancePath+"/serviceStatus",schemaPath:"#/properties/serviceStatus/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if("inService"!==data24&&"outOfOrder"!==data24&&"outOfService"!==data24){const err41={instancePath:instancePath+"/serviceStatus",schemaPath:"#/properties/serviceStatus/enum",keyword:"enum",params:{allowedValues:schema238.properties.serviceStatus.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err42={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}}else{const err43={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}return validate102.errors=vErrors,0===errors}__name(validate103,"validate103"),__name(validate102,"validate102");var validateSwitch=validate68,validateSystemUser=validate108,schema243={$schema:"http://json-schema.org/draft-07/schema",$id:"systemUser.json",title:"System User",description:"A system user is a user that originated from an external 3rd party system.",type:"object",required:["id","firstName","lastName"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"systemUser",enum:["systemUser"]},driver:{$ref:"definitions.json#/definitions/driver"},firstName:{type:"string"},lastName:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},email:{type:["string","null"],format:"email"},address:{$ref:"definitions.json#/definitions/address"},photo:{type:"string"},jobTitle:{type:"string"},dob:{type:"string"},gender:{type:"string",enum:["male","female"]},roles:{type:"array",items:{type:"string",enum:["Guest","User","Manager","Maintenance","Administrator","SuperAdmin"]}},nationality:{type:"string",minLength:2,maxLength:2},notes:{type:"array",items:{type:"string"}},files:{type:"array",items:{$ref:"mediaFile.json#"}},identifications:{type:"array",items:{$ref:"identification.json#"}},payments:{type:"array",items:{$ref:"payment.json#"}},revenue:{$ref:"definitions.json#/definitions/revenue"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"},systemId:{$ref:"definitions.json#/definitions/systemId"}}},pattern9=new RegExp("^\\+[0-9]{1,14}$","u"),formats88=/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i;function validate112(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(Array.isArray(data)){const len0=data.length;for(let i0=0;i0<len0;i0++){let data0=data[i0];if(data0&&"object"==typeof data0&&!Array.isArray(data0)){if(void 0!==data0.id){let data1=data0.id;if("string"!=typeof data1){const err0={instancePath:instancePath+"/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}const _errs6=errors,_errs7=errors;if("global"!==data1&&"system"!==data1){const err1={};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(_errs7===errors){const err2={instancePath:instancePath+"/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}else errors=_errs6,null!==vErrors&&(_errs6?vErrors.length=_errs6:vErrors=null)}if(void 0!==data0.name&&"string"!=typeof data0.name){const err3={instancePath:instancePath+"/"+i0+"/name",schemaPath:"#/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data0.date){let data3=data0.date;if("string"==typeof data3){if(!formats4.validate(data3)){const err4={instancePath:instancePath+"/"+i0+"/date",schemaPath:"#/items/properties/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}else{const err5={instancePath:instancePath+"/"+i0+"/date",schemaPath:"#/items/properties/date/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}if(void 0!==data0.price&&"number"!=typeof data0.price){const err6={instancePath:instancePath+"/"+i0+"/price",schemaPath:"#/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data0.tax){let data5=data0.tax;if("number"!=typeof data5&&null!==data5){const err7={instancePath:instancePath+"/"+i0+"/tax",schemaPath:"#/items/properties/tax/type",keyword:"type",params:{type:schema167.items.properties.tax.type},message:"must be number,null"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}}}else{const err8={instancePath:instancePath+"/"+i0,schemaPath:"#/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}}else{const err9={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}return validate112.errors=vErrors,0===errors}function validate108(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="systemUser"),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.firstName){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"firstName"},message:"must have required property 'firstName'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.lastName){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"lastName"},message:"must have required property 'lastName'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs5===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if("systemUser"!==data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema243.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.driver){let data2=data.driver;if("string"!=typeof data2){const err8={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("adlink"!==data2&&"aws-kinesis"!==data2&&"butler"!==data2&&"crestron"!==data2&&"dell"!==data2&&"dmp"!==data2&&"doorbird"!==data2&&"dormakaba"!==data2&&"dsc"!==data2&&"ecobee"!==data2&&"epson"!==data2&&"geovision-rs"!==data2&&"geovision-as-manager"!==data2&&"honeywell-vista"!==data2&&"igor"!==data2&&"inncom"!==data2&&"isapi"!==data2&&"kohost-k7"!==data2&&"kohost"!==data2&&"lg"!==data2&&"lg-webos"!==data2&&"lapi"!==data2&&"lirc"!==data2&&"mews"!==data2&&"mht"!==data2&&"paxton"!==data2&&"pelican-wireless"!==data2&&"power-shades"!==data2&&"rachio"!==data2&&"rebrandly"!==data2&&"relay"!==data2&&"rtsp"!==data2&&"salto"!==data2&&"salto-irn"!==data2&&"samsung"!==data2&&"se"!==data2&&"sendgrid"!==data2&&"sonifi"!==data2&&"stay-n-touch"!==data2&&"storable"!==data2&&"twilio"!==data2&&"unifi"!==data2&&"valcom"!==data2&&"vivotek"!==data2&&"vizio"!==data2&&"wisenet"!==data2&&"cloudflare-images"!==data2&&"cloudflare-stream"!==data2&&"insperia-privacy"!==data2){const err9={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.firstName&&"string"!=typeof data.firstName){const err10={instancePath:instancePath+"/firstName",schemaPath:"#/properties/firstName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.lastName&&"string"!=typeof data.lastName){const err11={instancePath:instancePath+"/lastName",schemaPath:"#/properties/lastName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.phone){let data5=data.phone;if("string"!=typeof data5&&null!==data5){const err12={instancePath:instancePath+"/phone",schemaPath:"#/properties/phone/type",keyword:"type",params:{type:schema243.properties.phone.type},message:"must be string,null"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if("string"==typeof data5&&!pattern9.test(data5)){const err13={instancePath:instancePath+"/phone",schemaPath:"#/properties/phone/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.email){let data6=data.email;if("string"!=typeof data6&&null!==data6){const err14={instancePath:instancePath+"/email",schemaPath:"#/properties/email/type",keyword:"type",params:{type:schema243.properties.email.type},message:"must be string,null"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("string"==typeof data6&&!formats88.test(data6)){const err15={instancePath:instancePath+"/email",schemaPath:"#/properties/email/format",keyword:"format",params:{format:"email"},message:'must match format "email"'};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.address){let data7=data.address;if(data7&&"object"==typeof data7&&!Array.isArray(data7)){if(void 0!==data7.id&&"string"!=typeof data7.id){const err16={instancePath:instancePath+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data7.line1&&"string"!=typeof data7.line1){const err17={instancePath:instancePath+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data7.line2&&"string"!=typeof data7.line2){const err18={instancePath:instancePath+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data7.line3&&"string"!=typeof data7.line3){const err19={instancePath:instancePath+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data7.city&&"string"!=typeof data7.city){const err20={instancePath:instancePath+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data7.state&&"string"!=typeof data7.state){const err21={instancePath:instancePath+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0!==data7.postalCode&&"string"!=typeof data7.postalCode){const err22={instancePath:instancePath+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data7.countryCode){let data15=data7.countryCode;if("string"==typeof data15){if(func4(data15)>2){const err23={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(func4(data15)<2){const err24={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}else{const err25={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}}else{const err26={instancePath:instancePath+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}if(void 0!==data.photo&&"string"!=typeof data.photo){const err27={instancePath:instancePath+"/photo",schemaPath:"#/properties/photo/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data.jobTitle&&"string"!=typeof data.jobTitle){const err28={instancePath:instancePath+"/jobTitle",schemaPath:"#/properties/jobTitle/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data.dob&&"string"!=typeof data.dob){const err29={instancePath:instancePath+"/dob",schemaPath:"#/properties/dob/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data.gender){let data19=data.gender;if("string"!=typeof data19){const err30={instancePath:instancePath+"/gender",schemaPath:"#/properties/gender/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if("male"!==data19&&"female"!==data19){const err31={instancePath:instancePath+"/gender",schemaPath:"#/properties/gender/enum",keyword:"enum",params:{allowedValues:schema243.properties.gender.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}if(void 0!==data.roles){let data20=data.roles;if(Array.isArray(data20)){const len0=data20.length;for(let i0=0;i0<len0;i0++){let data21=data20[i0];if("string"!=typeof data21){const err32={instancePath:instancePath+"/roles/"+i0,schemaPath:"#/properties/roles/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if("Guest"!==data21&&"User"!==data21&&"Manager"!==data21&&"Maintenance"!==data21&&"Administrator"!==data21&&"SuperAdmin"!==data21){const err33={instancePath:instancePath+"/roles/"+i0,schemaPath:"#/properties/roles/items/enum",keyword:"enum",params:{allowedValues:schema243.properties.roles.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}}else{const err34={instancePath:instancePath+"/roles",schemaPath:"#/properties/roles/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}}if(void 0!==data.nationality){let data22=data.nationality;if("string"==typeof data22){if(func4(data22)>2){const err35={instancePath:instancePath+"/nationality",schemaPath:"#/properties/nationality/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(func4(data22)<2){const err36={instancePath:instancePath+"/nationality",schemaPath:"#/properties/nationality/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}else{const err37={instancePath:instancePath+"/nationality",schemaPath:"#/properties/nationality/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}if(void 0!==data.notes){let data23=data.notes;if(Array.isArray(data23)){const len1=data23.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data23[i1]){const err38={instancePath:instancePath+"/notes/"+i1,schemaPath:"#/properties/notes/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}else{const err39={instancePath:instancePath+"/notes",schemaPath:"#/properties/notes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}if(void 0!==data.files){let data25=data.files;if(Array.isArray(data25)){const len2=data25.length;for(let i2=0;i2<len2;i2++)validate15(data25[i2],{instancePath:instancePath+"/files/"+i2,parentData:data25,parentDataProperty:i2,rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length)}else{const err40={instancePath:instancePath+"/files",schemaPath:"#/properties/files/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}}if(void 0!==data.identifications){let data27=data.identifications;if(Array.isArray(data27)){const len3=data27.length;for(let i3=0;i3<len3;i3++)validate37(data27[i3],{instancePath:instancePath+"/identifications/"+i3,parentData:data27,parentDataProperty:i3,rootData:rootData})||(vErrors=null===vErrors?validate37.errors:vErrors.concat(validate37.errors),errors=vErrors.length)}else{const err41={instancePath:instancePath+"/identifications",schemaPath:"#/properties/identifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}if(void 0!==data.payments){let data29=data.payments;if(Array.isArray(data29)){const len4=data29.length;for(let i4=0;i4<len4;i4++)validate57(data29[i4],{instancePath:instancePath+"/payments/"+i4,parentData:data29,parentDataProperty:i4,rootData:rootData})||(vErrors=null===vErrors?validate57.errors:vErrors.concat(validate57.errors),errors=vErrors.length)}else{const err42={instancePath:instancePath+"/payments",schemaPath:"#/properties/payments/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}}if(void 0!==data.revenue&&(validate112(data.revenue,{instancePath:instancePath+"/revenue",parentData:data,parentDataProperty:"revenue",rootData:rootData})||(vErrors=null===vErrors?validate112.errors:vErrors.concat(validate112.errors),errors=vErrors.length)),void 0!==data.createdAt){let data32=data.createdAt;if("string"!=typeof data32&&(!data32||"object"!=typeof data32||Array.isArray(data32))){const err43={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema101.type},message:"must be string,object"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}if("string"==typeof data32&&!formats4.validate(data32)){const err44={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}if(void 0!==data.updatedAt){let data33=data.updatedAt;if("string"!=typeof data33&&(!data33||"object"!=typeof data33||Array.isArray(data33))){const err45={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:schema151.type},message:"must be string,object"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}if("string"==typeof data33&&!formats4.validate(data33)){const err46={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err47={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}}else{const err48={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}return validate108.errors=vErrors,0===errors}__name(validate112,"validate112"),__name(validate108,"validate108");var validateThermostat=validate72,validateTicket=validate39,schema99={$schema:"http://json-schema.org/draft-07/schema",$id:"ticket.json",title:"Ticket",description:"A ticket is a request from a user.",type:"object",required:["id","conversation","requester","status","tags","createdAt","updatedAt"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["ticket"],default:"ticket"},number:{type:"string"},issueId:{type:"string"},conversation:{type:"array",default:[],items:{type:"object",additionalProperties:!1,required:["id","discriminator","timestamp","body"],properties:{id:{type:"string"},discriminator:{type:"string",enum:["message","opened","assigned","rated","tipped","scheduled","collaboratorAdded","collaboratorRemoved","statusChanged","priorityChanged","scheduleDateChanged","locationChanged"],default:"message"},userId:{type:"string"},userName:{type:"string"},vendorId:{type:"string"},vendorName:{type:"string"},systemId:{type:"string"},systemName:{type:"string"},timestamp:{$ref:"definitions.json#/definitions/createdAt"},body:{type:"string"},parsedBody:{type:"object",additionalProperties:!1,properties:{text:{type:"string"},mentions:{type:"array",default:[],items:{type:"object",additionalProperties:!1,required:["discriminator","id","index","length","originalText"],properties:{id:{type:"string"},discriminator:{type:"string",enum:["user","vendor","system"]},index:{type:"integer"},length:{type:"integer"},originalText:{type:"string"}}}}}},readBy:{type:"array",default:[],items:{type:"string"}},media:{anyOf:[{$ref:"mediaFile.json"},{type:"null"}]}}}},subject:{type:"string"},openedBy:{type:"object",properties:{userId:{type:"string"},userName:{type:"string"},systemId:{type:"string"},systemName:{type:"string"}}},requester:{type:"object",properties:{systemId:{type:"string"},systemName:{type:"string"},systemPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},userId:{type:"string"},userName:{type:"string"},userPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},deviceId:{type:"string"},roomId:{type:"string"},reservationId:{type:"string"},spaceId:{type:"string"},spaceName:{type:"string"}}},assignedTo:{type:"object",properties:{userId:{type:"string"},userName:{type:"string"},userPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},vendorId:{type:"string"},vendorName:{type:"string"},vendorPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]}}},notify:{type:"array",description:"A list of entities to notify when this ticket is created or resolved.",default:[],items:{type:"object",required:["id","discriminator"],additionalProperties:!1,properties:{id:{type:"string",description:"The ID of the entity to notify."},discriminator:{type:"string",enum:["user"]}}}},collaborators:{type:"array",default:[],items:{type:"object",required:["id","name","discriminator"],additionalProperties:!1,properties:{id:{type:"string"},name:{type:"string"},discriminator:{type:"string",enum:["user","vendor"]}}}},location:{type:"object",required:["discriminator","name"],additionalProperties:!1,properties:{id:{type:"string"},discriminator:{type:"string",enum:["space","room","property","customText"]},name:{type:"string"}}},status:{type:"string",enum:["open","pending","solved","closed"],default:"open"},priority:{type:"string",enum:["low","normal","high"],default:"normal"},tags:{type:"array",default:[],items:{type:"string"}},department:{type:"string"},rating:{type:"number",minimum:0,maximum:5},ratingComment:{type:"string"},tipAmount:{type:"string"},autoCloseAt:{$ref:"definitions.json#/definitions/date"},scheduleDate:{$ref:"definitions.json#/definitions/date"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},solvedAt:{$ref:"definitions.json#/definitions/date"},closedAt:{$ref:"definitions.json#/definitions/date"}}};function validate39(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="ticket"),void 0===data.conversation&&(data.conversation=[]),void 0===data.notify&&(data.notify=[]),void 0===data.collaborators&&(data.collaborators=[]),void 0===data.status&&(data.status="open"),void 0===data.priority&&(data.priority="normal"),void 0===data.tags&&(data.tags=[]),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.conversation){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"conversation"},message:"must have required property 'conversation'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.requester){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"requester"},message:"must have required property 'requester'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.status){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.tags){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"tags"},message:"must have required property 'tags'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.createdAt){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"createdAt"},message:"must have required property 'createdAt'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0===data.updatedAt){const err6={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"updatedAt"},message:"must have required property 'updatedAt'"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}for(const key0 in data)if(!func2.call(schema99.properties,key0)){const err7={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err8={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err9={};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(_errs6===errors){const err10={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("ticket"!==data1){const err12={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema99.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.number&&"string"!=typeof data.number){const err13={instancePath:instancePath+"/number",schemaPath:"#/properties/number/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.issueId&&"string"!=typeof data.issueId){const err14={instancePath:instancePath+"/issueId",schemaPath:"#/properties/issueId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}let data4=data.conversation;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++){let data5=data4[i0];if(data5&&"object"==typeof data5&&!Array.isArray(data5)){if(void 0===data5.discriminator&&(data5.discriminator="message"),void 0===data5.readBy&&(data5.readBy=[]),void 0===data5.id){const err15={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0===data5.discriminator){const err16={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0===data5.timestamp){const err17={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/required",keyword:"required",params:{missingProperty:"timestamp"},message:"must have required property 'timestamp'"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0===data5.body){const err18={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/required",keyword:"required",params:{missingProperty:"body"},message:"must have required property 'body'"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}for(const key1 in data5)if(!func2.call(schema99.properties.conversation.items.properties,key1)){const err19={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data5.id&&"string"!=typeof data5.id){const err20={instancePath:instancePath+"/conversation/"+i0+"/id",schemaPath:"#/properties/conversation/items/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}let data7=data5.discriminator;if("string"!=typeof data7){const err21={instancePath:instancePath+"/conversation/"+i0+"/discriminator",schemaPath:"#/properties/conversation/items/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if("message"!==data7&&"opened"!==data7&&"assigned"!==data7&&"rated"!==data7&&"tipped"!==data7&&"scheduled"!==data7&&"collaboratorAdded"!==data7&&"collaboratorRemoved"!==data7&&"statusChanged"!==data7&&"priorityChanged"!==data7&&"scheduleDateChanged"!==data7&&"locationChanged"!==data7){const err22={instancePath:instancePath+"/conversation/"+i0+"/discriminator",schemaPath:"#/properties/conversation/items/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema99.properties.conversation.items.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data5.userId&&"string"!=typeof data5.userId){const err23={instancePath:instancePath+"/conversation/"+i0+"/userId",schemaPath:"#/properties/conversation/items/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data5.userName&&"string"!=typeof data5.userName){const err24={instancePath:instancePath+"/conversation/"+i0+"/userName",schemaPath:"#/properties/conversation/items/properties/userName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data5.vendorId&&"string"!=typeof data5.vendorId){const err25={instancePath:instancePath+"/conversation/"+i0+"/vendorId",schemaPath:"#/properties/conversation/items/properties/vendorId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data5.vendorName&&"string"!=typeof data5.vendorName){const err26={instancePath:instancePath+"/conversation/"+i0+"/vendorName",schemaPath:"#/properties/conversation/items/properties/vendorName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data5.systemId&&"string"!=typeof data5.systemId){const err27={instancePath:instancePath+"/conversation/"+i0+"/systemId",schemaPath:"#/properties/conversation/items/properties/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data5.systemName&&"string"!=typeof data5.systemName){const err28={instancePath:instancePath+"/conversation/"+i0+"/systemName",schemaPath:"#/properties/conversation/items/properties/systemName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data5.timestamp){let data14=data5.timestamp;if("string"!=typeof data14&&(!data14||"object"!=typeof data14||Array.isArray(data14))){const err29={instancePath:instancePath+"/conversation/"+i0+"/timestamp",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema101.type},message:"must be string,object"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if("string"==typeof data14&&!formats4.validate(data14)){const err30={instancePath:instancePath+"/conversation/"+i0+"/timestamp",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}if(void 0!==data5.body&&"string"!=typeof data5.body){const err31={instancePath:instancePath+"/conversation/"+i0+"/body",schemaPath:"#/properties/conversation/items/properties/body/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(void 0!==data5.parsedBody){let data16=data5.parsedBody;if(data16&&"object"==typeof data16&&!Array.isArray(data16)){void 0===data16.mentions&&(data16.mentions=[]);for(const key2 in data16)if("text"!==key2&&"mentions"!==key2){const err32={instancePath:instancePath+"/conversation/"+i0+"/parsedBody",schemaPath:"#/properties/conversation/items/properties/parsedBody/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key2},message:"must NOT have additional properties"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if(void 0!==data16.text&&"string"!=typeof data16.text){const err33={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/text",schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}let data18=data16.mentions;if(Array.isArray(data18)){const len1=data18.length;for(let i1=0;i1<len1;i1++){let data19=data18[i1];if(data19&&"object"==typeof data19&&!Array.isArray(data19)){if(void 0===data19.discriminator){const err34={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions/"+i1,schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/items/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(void 0===data19.id){const err35={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions/"+i1,schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/items/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(void 0===data19.index){const err36={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions/"+i1,schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/items/required",keyword:"required",params:{missingProperty:"index"},message:"must have required property 'index'"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if(void 0===data19.length){const err37={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions/"+i1,schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/items/required",keyword:"required",params:{missingProperty:"length"},message:"must have required property 'length'"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}if(void 0===data19.originalText){const err38={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions/"+i1,schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/items/required",keyword:"required",params:{missingProperty:"originalText"},message:"must have required property 'originalText'"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}for(const key3 in data19)if("id"!==key3&&"discriminator"!==key3&&"index"!==key3&&"length"!==key3&&"originalText"!==key3){const err39={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions/"+i1,schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key3},message:"must NOT have additional properties"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}if(void 0!==data19.id&&"string"!=typeof data19.id){const err40={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions/"+i1+"/id",schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/items/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if(void 0!==data19.discriminator){let data21=data19.discriminator;if("string"!=typeof data21){const err41={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions/"+i1+"/discriminator",schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/items/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}if("user"!==data21&&"vendor"!==data21&&"system"!==data21){const err42={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions/"+i1+"/discriminator",schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/items/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema99.properties.conversation.items.properties.parsedBody.properties.mentions.items.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}}if(void 0!==data19.index){let data22=data19.index;if("number"!=typeof data22||data22%1||isNaN(data22)){const err43={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions/"+i1+"/index",schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/items/properties/index/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}}if(void 0!==data19.length){let data23=data19.length;if("number"!=typeof data23||data23%1||isNaN(data23)){const err44={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions/"+i1+"/length",schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/items/properties/length/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}if(void 0!==data19.originalText&&"string"!=typeof data19.originalText){const err45={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions/"+i1+"/originalText",schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/items/properties/originalText/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}else{const err46={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions/"+i1,schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}}else{const err47={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions",schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}}else{const err48={instancePath:instancePath+"/conversation/"+i0+"/parsedBody",schemaPath:"#/properties/conversation/items/properties/parsedBody/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}}let data25=data5.readBy;if(Array.isArray(data25)){const len2=data25.length;for(let i2=0;i2<len2;i2++)if("string"!=typeof data25[i2]){const err49={instancePath:instancePath+"/conversation/"+i0+"/readBy/"+i2,schemaPath:"#/properties/conversation/items/properties/readBy/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}}else{const err50={instancePath:instancePath+"/conversation/"+i0+"/readBy",schemaPath:"#/properties/conversation/items/properties/readBy/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}if(void 0!==data5.media){let data27=data5.media;const _errs64=errors;let valid13=!1;const _errs65=errors;validate15(data27,{instancePath:instancePath+"/conversation/"+i0+"/media",parentData:data5,parentDataProperty:"media",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length);var _valid0=_errs65===errors;if(valid13=valid13||_valid0,!valid13){const _errs66=errors;if(null!==data27){const err51={instancePath:instancePath+"/conversation/"+i0+"/media",schemaPath:"#/properties/conversation/items/properties/media/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}_valid0=_errs66===errors;valid13=valid13||_valid0}if(valid13)errors=_errs64,null!==vErrors&&(_errs64?vErrors.length=_errs64:vErrors=null);else{const err52={instancePath:instancePath+"/conversation/"+i0+"/media",schemaPath:"#/properties/conversation/items/properties/media/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}}}else{const err53={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}}}else{const err54={instancePath:instancePath+"/conversation",schemaPath:"#/properties/conversation/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}if(void 0!==data.subject&&"string"!=typeof data.subject){const err55={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}if(void 0!==data.openedBy){let data29=data.openedBy;if(data29&&"object"==typeof data29&&!Array.isArray(data29)){if(void 0!==data29.userId&&"string"!=typeof data29.userId){const err56={instancePath:instancePath+"/openedBy/userId",schemaPath:"#/properties/openedBy/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}if(void 0!==data29.userName&&"string"!=typeof data29.userName){const err57={instancePath:instancePath+"/openedBy/userName",schemaPath:"#/properties/openedBy/properties/userName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}if(void 0!==data29.systemId&&"string"!=typeof data29.systemId){const err58={instancePath:instancePath+"/openedBy/systemId",schemaPath:"#/properties/openedBy/properties/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}if(void 0!==data29.systemName&&"string"!=typeof data29.systemName){const err59={instancePath:instancePath+"/openedBy/systemName",schemaPath:"#/properties/openedBy/properties/systemName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}}else{const err60={instancePath:instancePath+"/openedBy",schemaPath:"#/properties/openedBy/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err60]:vErrors.push(err60),errors++}}if(void 0!==data.requester){let data34=data.requester;if(data34&&"object"==typeof data34&&!Array.isArray(data34)){if(void 0!==data34.systemId&&"string"!=typeof data34.systemId){const err61={instancePath:instancePath+"/requester/systemId",schemaPath:"#/properties/requester/properties/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err61]:vErrors.push(err61),errors++}if(void 0!==data34.systemName&&"string"!=typeof data34.systemName){const err62={instancePath:instancePath+"/requester/systemName",schemaPath:"#/properties/requester/properties/systemName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err62]:vErrors.push(err62),errors++}if(void 0!==data34.systemPhoto){let data37=data34.systemPhoto;const _errs87=errors;let valid16=!1;const _errs88=errors;validate15(data37,{instancePath:instancePath+"/requester/systemPhoto",parentData:data34,parentDataProperty:"systemPhoto",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length);var _valid1=_errs88===errors;if(valid16=valid16||_valid1,!valid16){const _errs89=errors;if(null!==data37){const err63={instancePath:instancePath+"/requester/systemPhoto",schemaPath:"#/properties/requester/properties/systemPhoto/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===vErrors?vErrors=[err63]:vErrors.push(err63),errors++}_valid1=_errs89===errors;if(valid16=valid16||_valid1,!valid16){const _errs91=errors;if("string"!=typeof data37){const err64={instancePath:instancePath+"/requester/systemPhoto",schemaPath:"#/properties/requester/properties/systemPhoto/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err64]:vErrors.push(err64),errors++}_valid1=_errs91===errors;valid16=valid16||_valid1}}if(valid16)errors=_errs87,null!==vErrors&&(_errs87?vErrors.length=_errs87:vErrors=null);else{const err65={instancePath:instancePath+"/requester/systemPhoto",schemaPath:"#/properties/requester/properties/systemPhoto/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===vErrors?vErrors=[err65]:vErrors.push(err65),errors++}}if(void 0!==data34.userId&&"string"!=typeof data34.userId){const err66={instancePath:instancePath+"/requester/userId",schemaPath:"#/properties/requester/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err66]:vErrors.push(err66),errors++}if(void 0!==data34.userName&&"string"!=typeof data34.userName){const err67={instancePath:instancePath+"/requester/userName",schemaPath:"#/properties/requester/properties/userName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err67]:vErrors.push(err67),errors++}if(void 0!==data34.userPhoto){let data40=data34.userPhoto;const _errs98=errors;let valid17=!1;const _errs99=errors;validate15(data40,{instancePath:instancePath+"/requester/userPhoto",parentData:data34,parentDataProperty:"userPhoto",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length);var _valid2=_errs99===errors;if(valid17=valid17||_valid2,!valid17){const _errs100=errors;if(null!==data40){const err68={instancePath:instancePath+"/requester/userPhoto",schemaPath:"#/properties/requester/properties/userPhoto/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===vErrors?vErrors=[err68]:vErrors.push(err68),errors++}_valid2=_errs100===errors;if(valid17=valid17||_valid2,!valid17){const _errs102=errors;if("string"!=typeof data40){const err69={instancePath:instancePath+"/requester/userPhoto",schemaPath:"#/properties/requester/properties/userPhoto/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err69]:vErrors.push(err69),errors++}_valid2=_errs102===errors;valid17=valid17||_valid2}}if(valid17)errors=_errs98,null!==vErrors&&(_errs98?vErrors.length=_errs98:vErrors=null);else{const err70={instancePath:instancePath+"/requester/userPhoto",schemaPath:"#/properties/requester/properties/userPhoto/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===vErrors?vErrors=[err70]:vErrors.push(err70),errors++}}if(void 0!==data34.deviceId&&"string"!=typeof data34.deviceId){const err71={instancePath:instancePath+"/requester/deviceId",schemaPath:"#/properties/requester/properties/deviceId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err71]:vErrors.push(err71),errors++}if(void 0!==data34.roomId&&"string"!=typeof data34.roomId){const err72={instancePath:instancePath+"/requester/roomId",schemaPath:"#/properties/requester/properties/roomId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err72]:vErrors.push(err72),errors++}if(void 0!==data34.reservationId&&"string"!=typeof data34.reservationId){const err73={instancePath:instancePath+"/requester/reservationId",schemaPath:"#/properties/requester/properties/reservationId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err73]:vErrors.push(err73),errors++}if(void 0!==data34.spaceId&&"string"!=typeof data34.spaceId){const err74={instancePath:instancePath+"/requester/spaceId",schemaPath:"#/properties/requester/properties/spaceId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err74]:vErrors.push(err74),errors++}if(void 0!==data34.spaceName&&"string"!=typeof data34.spaceName){const err75={instancePath:instancePath+"/requester/spaceName",schemaPath:"#/properties/requester/properties/spaceName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err75]:vErrors.push(err75),errors++}}else{const err76={instancePath:instancePath+"/requester",schemaPath:"#/properties/requester/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err76]:vErrors.push(err76),errors++}}if(void 0!==data.assignedTo){let data46=data.assignedTo;if(data46&&"object"==typeof data46&&!Array.isArray(data46)){if(void 0!==data46.userId&&"string"!=typeof data46.userId){const err77={instancePath:instancePath+"/assignedTo/userId",schemaPath:"#/properties/assignedTo/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err77]:vErrors.push(err77),errors++}if(void 0!==data46.userName&&"string"!=typeof data46.userName){const err78={instancePath:instancePath+"/assignedTo/userName",schemaPath:"#/properties/assignedTo/properties/userName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err78]:vErrors.push(err78),errors++}if(void 0!==data46.userPhoto){let data49=data46.userPhoto;const _errs121=errors;let valid19=!1;const _errs122=errors;validate15(data49,{instancePath:instancePath+"/assignedTo/userPhoto",parentData:data46,parentDataProperty:"userPhoto",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length);var _valid3=_errs122===errors;if(valid19=valid19||_valid3,!valid19){const _errs123=errors;if(null!==data49){const err79={instancePath:instancePath+"/assignedTo/userPhoto",schemaPath:"#/properties/assignedTo/properties/userPhoto/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===vErrors?vErrors=[err79]:vErrors.push(err79),errors++}_valid3=_errs123===errors;if(valid19=valid19||_valid3,!valid19){const _errs125=errors;if("string"!=typeof data49){const err80={instancePath:instancePath+"/assignedTo/userPhoto",schemaPath:"#/properties/assignedTo/properties/userPhoto/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err80]:vErrors.push(err80),errors++}_valid3=_errs125===errors;valid19=valid19||_valid3}}if(valid19)errors=_errs121,null!==vErrors&&(_errs121?vErrors.length=_errs121:vErrors=null);else{const err81={instancePath:instancePath+"/assignedTo/userPhoto",schemaPath:"#/properties/assignedTo/properties/userPhoto/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===vErrors?vErrors=[err81]:vErrors.push(err81),errors++}}if(void 0!==data46.vendorId&&"string"!=typeof data46.vendorId){const err82={instancePath:instancePath+"/assignedTo/vendorId",schemaPath:"#/properties/assignedTo/properties/vendorId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err82]:vErrors.push(err82),errors++}if(void 0!==data46.vendorName&&"string"!=typeof data46.vendorName){const err83={instancePath:instancePath+"/assignedTo/vendorName",schemaPath:"#/properties/assignedTo/properties/vendorName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err83]:vErrors.push(err83),errors++}if(void 0!==data46.vendorPhoto){let data52=data46.vendorPhoto;const _errs132=errors;let valid20=!1;const _errs133=errors;validate15(data52,{instancePath:instancePath+"/assignedTo/vendorPhoto",parentData:data46,parentDataProperty:"vendorPhoto",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length);var _valid4=_errs133===errors;if(valid20=valid20||_valid4,!valid20){const _errs134=errors;if(null!==data52){const err84={instancePath:instancePath+"/assignedTo/vendorPhoto",schemaPath:"#/properties/assignedTo/properties/vendorPhoto/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===vErrors?vErrors=[err84]:vErrors.push(err84),errors++}_valid4=_errs134===errors;if(valid20=valid20||_valid4,!valid20){const _errs136=errors;if("string"!=typeof data52){const err85={instancePath:instancePath+"/assignedTo/vendorPhoto",schemaPath:"#/properties/assignedTo/properties/vendorPhoto/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err85]:vErrors.push(err85),errors++}_valid4=_errs136===errors;valid20=valid20||_valid4}}if(valid20)errors=_errs132,null!==vErrors&&(_errs132?vErrors.length=_errs132:vErrors=null);else{const err86={instancePath:instancePath+"/assignedTo/vendorPhoto",schemaPath:"#/properties/assignedTo/properties/vendorPhoto/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===vErrors?vErrors=[err86]:vErrors.push(err86),errors++}}}else{const err87={instancePath:instancePath+"/assignedTo",schemaPath:"#/properties/assignedTo/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err87]:vErrors.push(err87),errors++}}let data53=data.notify;if(Array.isArray(data53)){const len3=data53.length;for(let i3=0;i3<len3;i3++){let data54=data53[i3];if(data54&&"object"==typeof data54&&!Array.isArray(data54)){if(void 0===data54.id){const err88={instancePath:instancePath+"/notify/"+i3,schemaPath:"#/properties/notify/items/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err88]:vErrors.push(err88),errors++}if(void 0===data54.discriminator){const err89={instancePath:instancePath+"/notify/"+i3,schemaPath:"#/properties/notify/items/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err89]:vErrors.push(err89),errors++}for(const key4 in data54)if("id"!==key4&&"discriminator"!==key4){const err90={instancePath:instancePath+"/notify/"+i3,schemaPath:"#/properties/notify/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key4},message:"must NOT have additional properties"};null===vErrors?vErrors=[err90]:vErrors.push(err90),errors++}if(void 0!==data54.id&&"string"!=typeof data54.id){const err91={instancePath:instancePath+"/notify/"+i3+"/id",schemaPath:"#/properties/notify/items/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err91]:vErrors.push(err91),errors++}if(void 0!==data54.discriminator){let data56=data54.discriminator;if("string"!=typeof data56){const err92={instancePath:instancePath+"/notify/"+i3+"/discriminator",schemaPath:"#/properties/notify/items/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err92]:vErrors.push(err92),errors++}if("user"!==data56){const err93={instancePath:instancePath+"/notify/"+i3+"/discriminator",schemaPath:"#/properties/notify/items/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema99.properties.notify.items.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err93]:vErrors.push(err93),errors++}}}else{const err94={instancePath:instancePath+"/notify/"+i3,schemaPath:"#/properties/notify/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err94]:vErrors.push(err94),errors++}}}else{const err95={instancePath:instancePath+"/notify",schemaPath:"#/properties/notify/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err95]:vErrors.push(err95),errors++}let data57=data.collaborators;if(Array.isArray(data57)){const len4=data57.length;for(let i4=0;i4<len4;i4++){let data58=data57[i4];if(data58&&"object"==typeof data58&&!Array.isArray(data58)){if(void 0===data58.id){const err96={instancePath:instancePath+"/collaborators/"+i4,schemaPath:"#/properties/collaborators/items/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err96]:vErrors.push(err96),errors++}if(void 0===data58.name){const err97={instancePath:instancePath+"/collaborators/"+i4,schemaPath:"#/properties/collaborators/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err97]:vErrors.push(err97),errors++}if(void 0===data58.discriminator){const err98={instancePath:instancePath+"/collaborators/"+i4,schemaPath:"#/properties/collaborators/items/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err98]:vErrors.push(err98),errors++}for(const key5 in data58)if("id"!==key5&&"name"!==key5&&"discriminator"!==key5){const err99={instancePath:instancePath+"/collaborators/"+i4,schemaPath:"#/properties/collaborators/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key5},message:"must NOT have additional properties"};null===vErrors?vErrors=[err99]:vErrors.push(err99),errors++}if(void 0!==data58.id&&"string"!=typeof data58.id){const err100={instancePath:instancePath+"/collaborators/"+i4+"/id",schemaPath:"#/properties/collaborators/items/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err100]:vErrors.push(err100),errors++}if(void 0!==data58.name&&"string"!=typeof data58.name){const err101={instancePath:instancePath+"/collaborators/"+i4+"/name",schemaPath:"#/properties/collaborators/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err101]:vErrors.push(err101),errors++}if(void 0!==data58.discriminator){let data61=data58.discriminator;if("string"!=typeof data61){const err102={instancePath:instancePath+"/collaborators/"+i4+"/discriminator",schemaPath:"#/properties/collaborators/items/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err102]:vErrors.push(err102),errors++}if("user"!==data61&&"vendor"!==data61){const err103={instancePath:instancePath+"/collaborators/"+i4+"/discriminator",schemaPath:"#/properties/collaborators/items/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema99.properties.collaborators.items.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err103]:vErrors.push(err103),errors++}}}else{const err104={instancePath:instancePath+"/collaborators/"+i4,schemaPath:"#/properties/collaborators/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err104]:vErrors.push(err104),errors++}}}else{const err105={instancePath:instancePath+"/collaborators",schemaPath:"#/properties/collaborators/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err105]:vErrors.push(err105),errors++}if(void 0!==data.location){let data62=data.location;if(data62&&"object"==typeof data62&&!Array.isArray(data62)){if(void 0===data62.discriminator){const err106={instancePath:instancePath+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err106]:vErrors.push(err106),errors++}if(void 0===data62.name){const err107={instancePath:instancePath+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err107]:vErrors.push(err107),errors++}for(const key6 in data62)if("id"!==key6&&"discriminator"!==key6&&"name"!==key6){const err108={instancePath:instancePath+"/location",schemaPath:"#/properties/location/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key6},message:"must NOT have additional properties"};null===vErrors?vErrors=[err108]:vErrors.push(err108),errors++}if(void 0!==data62.id&&"string"!=typeof data62.id){const err109={instancePath:instancePath+"/location/id",schemaPath:"#/properties/location/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err109]:vErrors.push(err109),errors++}if(void 0!==data62.discriminator){let data64=data62.discriminator;if("string"!=typeof data64){const err110={instancePath:instancePath+"/location/discriminator",schemaPath:"#/properties/location/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err110]:vErrors.push(err110),errors++}if("space"!==data64&&"room"!==data64&&"property"!==data64&&"customText"!==data64){const err111={instancePath:instancePath+"/location/discriminator",schemaPath:"#/properties/location/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema99.properties.location.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err111]:vErrors.push(err111),errors++}}if(void 0!==data62.name&&"string"!=typeof data62.name){const err112={instancePath:instancePath+"/location/name",schemaPath:"#/properties/location/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err112]:vErrors.push(err112),errors++}}else{const err113={instancePath:instancePath+"/location",schemaPath:"#/properties/location/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err113]:vErrors.push(err113),errors++}}let data66=data.status;if("string"!=typeof data66){const err114={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err114]:vErrors.push(err114),errors++}if("open"!==data66&&"pending"!==data66&&"solved"!==data66&&"closed"!==data66){const err115={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema99.properties.status.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err115]:vErrors.push(err115),errors++}let data67=data.priority;if("string"!=typeof data67){const err116={instancePath:instancePath+"/priority",schemaPath:"#/properties/priority/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err116]:vErrors.push(err116),errors++}if("low"!==data67&&"normal"!==data67&&"high"!==data67){const err117={instancePath:instancePath+"/priority",schemaPath:"#/properties/priority/enum",keyword:"enum",params:{allowedValues:schema99.properties.priority.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err117]:vErrors.push(err117),errors++}let data68=data.tags;if(Array.isArray(data68)){const len5=data68.length;for(let i5=0;i5<len5;i5++)if("string"!=typeof data68[i5]){const err118={instancePath:instancePath+"/tags/"+i5,schemaPath:"#/properties/tags/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err118]:vErrors.push(err118),errors++}}else{const err119={instancePath:instancePath+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err119]:vErrors.push(err119),errors++}if(void 0!==data.department&&"string"!=typeof data.department){const err120={instancePath:instancePath+"/department",schemaPath:"#/properties/department/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err120]:vErrors.push(err120),errors++}if(void 0!==data.rating){let data71=data.rating;if("number"==typeof data71){if(data71>5||isNaN(data71)){const err121={instancePath:instancePath+"/rating",schemaPath:"#/properties/rating/maximum",keyword:"maximum",params:{comparison:"<=",limit:5},message:"must be <= 5"};null===vErrors?vErrors=[err121]:vErrors.push(err121),errors++}if(data71<0||isNaN(data71)){const err122={instancePath:instancePath+"/rating",schemaPath:"#/properties/rating/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err122]:vErrors.push(err122),errors++}}else{const err123={instancePath:instancePath+"/rating",schemaPath:"#/properties/rating/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err123]:vErrors.push(err123),errors++}}if(void 0!==data.ratingComment&&"string"!=typeof data.ratingComment){const err124={instancePath:instancePath+"/ratingComment",schemaPath:"#/properties/ratingComment/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err124]:vErrors.push(err124),errors++}if(void 0!==data.tipAmount&&"string"!=typeof data.tipAmount){const err125={instancePath:instancePath+"/tipAmount",schemaPath:"#/properties/tipAmount/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err125]:vErrors.push(err125),errors++}if(void 0!==data.autoCloseAt){let data74=data.autoCloseAt;if("string"!=typeof data74&&(!data74||"object"!=typeof data74||Array.isArray(data74))){const err126={instancePath:instancePath+"/autoCloseAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err126]:vErrors.push(err126),errors++}if("string"==typeof data74&&!formats4.validate(data74)){const err127={instancePath:instancePath+"/autoCloseAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err127]:vErrors.push(err127),errors++}}if(void 0!==data.scheduleDate){let data75=data.scheduleDate;if("string"!=typeof data75&&(!data75||"object"!=typeof data75||Array.isArray(data75))){const err128={instancePath:instancePath+"/scheduleDate",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err128]:vErrors.push(err128),errors++}if("string"==typeof data75&&!formats4.validate(data75)){const err129={instancePath:instancePath+"/scheduleDate",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err129]:vErrors.push(err129),errors++}}if(void 0!==data.createdAt){let data76=data.createdAt;if("string"!=typeof data76&&(!data76||"object"!=typeof data76||Array.isArray(data76))){const err130={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err130]:vErrors.push(err130),errors++}if("string"==typeof data76&&!formats4.validate(data76)){const err131={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err131]:vErrors.push(err131),errors++}}if(void 0!==data.updatedAt){let data77=data.updatedAt;if("string"!=typeof data77&&(!data77||"object"!=typeof data77||Array.isArray(data77))){const err132={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err132]:vErrors.push(err132),errors++}if("string"==typeof data77&&!formats4.validate(data77)){const err133={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err133]:vErrors.push(err133),errors++}}if(void 0!==data.solvedAt){let data78=data.solvedAt;if("string"!=typeof data78&&(!data78||"object"!=typeof data78||Array.isArray(data78))){const err134={instancePath:instancePath+"/solvedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err134]:vErrors.push(err134),errors++}if("string"==typeof data78&&!formats4.validate(data78)){const err135={instancePath:instancePath+"/solvedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err135]:vErrors.push(err135),errors++}}if(void 0!==data.closedAt){let data79=data.closedAt;if("string"!=typeof data79&&(!data79||"object"!=typeof data79||Array.isArray(data79))){const err136={instancePath:instancePath+"/closedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err136]:vErrors.push(err136),errors++}if("string"==typeof data79&&!formats4.validate(data79)){const err137={instancePath:instancePath+"/closedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err137]:vErrors.push(err137),errors++}}}else{const err138={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err138]:vErrors.push(err138),errors++}return validate39.errors=vErrors,0===errors}__name(validate39,"validate39");var validateTimeSheet=validate114,schema252={$schema:"http://json-schema.org/draft-07/schema",$id:"timeSheet.json",title:"Time Sheet",type:"object",required:["userId","day"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"timeSheet",enum:["timeSheet"]},userId:{$ref:"definitions.json#/definitions/id"},day:{type:["string","object"],format:"date-time"},locked:{type:"boolean",default:!1,description:"If true, the time sheet is locked and cannot be modified"},timeEntries:{type:"array",default:[],items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},discriminator:{type:"string",enum:["working","driving","meeting","break"]},start:{type:["string","object"],format:"date-time"},end:{type:["string","object"],format:"date-time"},comment:{type:"string"},ticketId:{type:"string"}},required:["start","discriminator"],additionalProperties:!1}}}};function validate114(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="timeSheet"),void 0===data.locked&&(data.locked=!1),void 0===data.timeEntries&&(data.timeEntries=[]),void 0===data.userId){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"userId"},message:"must have required property 'userId'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.day){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"day"},message:"must have required property 'day'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs5===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if("timeSheet"!==data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema252.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.userId){let data2=data.userId;if("string"!=typeof data2){const err7={instancePath:instancePath+"/userId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}const _errs11=errors,_errs12=errors;if("global"!==data2&&"system"!==data2){const err8={};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(_errs12===errors){const err9={instancePath:instancePath+"/userId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}else errors=_errs11,null!==vErrors&&(_errs11?vErrors.length=_errs11:vErrors=null)}if(void 0!==data.day){let data3=data.day;if("string"!=typeof data3&&(!data3||"object"!=typeof data3||Array.isArray(data3))){const err10={instancePath:instancePath+"/day",schemaPath:"#/properties/day/type",keyword:"type",params:{type:schema252.properties.day.type},message:"must be string,object"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("string"==typeof data3&&!formats4.validate(data3)){const err11={instancePath:instancePath+"/day",schemaPath:"#/properties/day/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if("boolean"!=typeof data.locked){const err12={instancePath:instancePath+"/locked",schemaPath:"#/properties/locked/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}let data5=data.timeEntries;if(Array.isArray(data5)){const len0=data5.length;for(let i0=0;i0<len0;i0++){let data6=data5[i0];if(data6&&"object"==typeof data6&&!Array.isArray(data6)){if(void 0===data6.start){const err13={instancePath:instancePath+"/timeEntries/"+i0,schemaPath:"#/properties/timeEntries/items/required",keyword:"required",params:{missingProperty:"start"},message:"must have required property 'start'"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0===data6.discriminator){const err14={instancePath:instancePath+"/timeEntries/"+i0,schemaPath:"#/properties/timeEntries/items/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}for(const key0 in data6)if("id"!==key0&&"discriminator"!==key0&&"start"!==key0&&"end"!==key0&&"comment"!==key0&&"ticketId"!==key0){const err15={instancePath:instancePath+"/timeEntries/"+i0,schemaPath:"#/properties/timeEntries/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data6.id){let data7=data6.id;if("string"!=typeof data7){const err16={instancePath:instancePath+"/timeEntries/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}const _errs25=errors,_errs26=errors;if("global"!==data7&&"system"!==data7){const err17={};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(_errs26===errors){const err18={instancePath:instancePath+"/timeEntries/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}else errors=_errs25,null!==vErrors&&(_errs25?vErrors.length=_errs25:vErrors=null)}if(void 0!==data6.discriminator){let data8=data6.discriminator;if("string"!=typeof data8){const err19={instancePath:instancePath+"/timeEntries/"+i0+"/discriminator",schemaPath:"#/properties/timeEntries/items/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if("working"!==data8&&"driving"!==data8&&"meeting"!==data8&&"break"!==data8){const err20={instancePath:instancePath+"/timeEntries/"+i0+"/discriminator",schemaPath:"#/properties/timeEntries/items/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema252.properties.timeEntries.items.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}if(void 0!==data6.start){let data9=data6.start;if("string"!=typeof data9&&(!data9||"object"!=typeof data9||Array.isArray(data9))){const err21={instancePath:instancePath+"/timeEntries/"+i0+"/start",schemaPath:"#/properties/timeEntries/items/properties/start/type",keyword:"type",params:{type:schema252.properties.timeEntries.items.properties.start.type},message:"must be string,object"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if("string"==typeof data9&&!formats4.validate(data9)){const err22={instancePath:instancePath+"/timeEntries/"+i0+"/start",schemaPath:"#/properties/timeEntries/items/properties/start/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data6.end){let data10=data6.end;if("string"!=typeof data10&&(!data10||"object"!=typeof data10||Array.isArray(data10))){const err23={instancePath:instancePath+"/timeEntries/"+i0+"/end",schemaPath:"#/properties/timeEntries/items/properties/end/type",keyword:"type",params:{type:schema252.properties.timeEntries.items.properties.end.type},message:"must be string,object"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if("string"==typeof data10&&!formats4.validate(data10)){const err24={instancePath:instancePath+"/timeEntries/"+i0+"/end",schemaPath:"#/properties/timeEntries/items/properties/end/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data6.comment&&"string"!=typeof data6.comment){const err25={instancePath:instancePath+"/timeEntries/"+i0+"/comment",schemaPath:"#/properties/timeEntries/items/properties/comment/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data6.ticketId&&"string"!=typeof data6.ticketId){const err26={instancePath:instancePath+"/timeEntries/"+i0+"/ticketId",schemaPath:"#/properties/timeEntries/items/properties/ticketId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}else{const err27={instancePath:instancePath+"/timeEntries/"+i0,schemaPath:"#/properties/timeEntries/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}}else{const err28={instancePath:instancePath+"/timeEntries",schemaPath:"#/properties/timeEntries/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}else{const err29={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}return validate114.errors=vErrors,0===errors}__name(validate114,"validate114");var validateUser=validate115,schema256={$schema:"http://json-schema.org/draft-07/schema",$id:"user.json",title:"User",type:"object",required:["id","firstName","lastName"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"user"},firstName:{type:"string"},lastName:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},phoneVerified:{type:"boolean"},email:{type:["string","null"],format:"email"},emailVerified:{type:"boolean"},whatsapp:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},whatsappVerified:{type:"boolean"},address:{$ref:"definitions.json#/definitions/address"},secretKey:{type:"string"},photo:{$ref:"mediaFile.json#"},jobTitle:{type:"string"},dob:{type:"string"},gender:{type:"string",enum:["male","female"]},nationality:{type:"string",minLength:2,maxLength:2},permissions:{type:"array",default:[],items:{type:"object",required:["organizationId","propertyId","role"],properties:{organizationId:{type:"string",description:"The ID of the organization the permission is applies to."},propertyId:{type:"string",description:"The ID of the property the permission is applies to."},role:{type:"string",enum:["Guest","User","Agent","Manager","Maintenance","Administrator","SuperAdmin"]},timeTrackingEnabled:{type:"boolean",description:"Whether time tracking is enabled for this role."},department:{type:"string",description:"The department the user belongs to."},policyIds:{type:"array",items:{type:"string",description:"ID of a policy that is applied to this role."}},policies:{type:"array",items:{description:"A policy object populated from the policyIds array.",$ref:"policy.json"}}},additionalProperties:!1}},preferences:{type:"array",items:{type:"object",additionalProperties:!1,required:["organizationId","propertyId"],properties:{organizationId:{type:"string"},propertyId:{type:"string"},notifications:{type:"array",items:{type:"object",additionalProperties:!1,required:["discriminator","enabled"],properties:{discriminator:{type:"string",enum:["observerTicketCreated","observerTicketResolved"]},enabled:{type:"boolean"}}}}}}},notes:{type:"array",items:{type:"string"}},files:{type:"array",items:{$ref:"mediaFile.json#"}},identifications:{type:"array",items:{$ref:"identification.json#"}},payments:{type:"array",items:{$ref:"payment.json#"}},location:{type:"object",required:["accuracy","latitude","longitude","timestamp"],additionalProperties:!1,properties:{accuracy:{type:["number","null"]},latitude:{type:["number","null"]},longitude:{type:["number","null"]},timestamp:{type:["number","null"]}}},reservations:{type:"array",items:{$ref:"reservation.json"}},spaceName:{type:"string"},revenue:{$ref:"definitions.json#/definitions/revenue"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"},systems:{type:"array",default:[],items:{type:"object",properties:{systemId:{type:"string"},propertyId:{type:"string"},driver:{type:"string"}},required:["systemId","propertyId","driver"],additionalProperties:!1}}}};function validate122(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(Array.isArray(data)){const len0=data.length;for(let i0=0;i0<len0;i0++){let data0=data[i0];if(data0&&"object"==typeof data0&&!Array.isArray(data0)){if(void 0!==data0.id){let data1=data0.id;if("string"!=typeof data1){const err0={instancePath:instancePath+"/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}const _errs6=errors,_errs7=errors;if("global"!==data1&&"system"!==data1){const err1={};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(_errs7===errors){const err2={instancePath:instancePath+"/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}else errors=_errs6,null!==vErrors&&(_errs6?vErrors.length=_errs6:vErrors=null)}if(void 0!==data0.name&&"string"!=typeof data0.name){const err3={instancePath:instancePath+"/"+i0+"/name",schemaPath:"#/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data0.date){let data3=data0.date;if("string"==typeof data3){if(!formats4.validate(data3)){const err4={instancePath:instancePath+"/"+i0+"/date",schemaPath:"#/items/properties/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}else{const err5={instancePath:instancePath+"/"+i0+"/date",schemaPath:"#/items/properties/date/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}if(void 0!==data0.price&&"number"!=typeof data0.price){const err6={instancePath:instancePath+"/"+i0+"/price",schemaPath:"#/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data0.tax){let data5=data0.tax;if("number"!=typeof data5&&null!==data5){const err7={instancePath:instancePath+"/"+i0+"/tax",schemaPath:"#/items/properties/tax/type",keyword:"type",params:{type:schema167.items.properties.tax.type},message:"must be number,null"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}}}else{const err8={instancePath:instancePath+"/"+i0,schemaPath:"#/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}}else{const err9={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}return validate122.errors=vErrors,0===errors}function validate115(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="user"),void 0===data.permissions&&(data.permissions=[]),void 0===data.systems&&(data.systems=[]),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.firstName){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"firstName"},message:"must have required property 'firstName'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.lastName){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"lastName"},message:"must have required property 'lastName'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs5===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if("string"!=typeof data.type){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.firstName&&"string"!=typeof data.firstName){const err7={instancePath:instancePath+"/firstName",schemaPath:"#/properties/firstName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.lastName&&"string"!=typeof data.lastName){const err8={instancePath:instancePath+"/lastName",schemaPath:"#/properties/lastName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.phone){let data4=data.phone;if("string"!=typeof data4&&null!==data4){const err9={instancePath:instancePath+"/phone",schemaPath:"#/properties/phone/type",keyword:"type",params:{type:schema256.properties.phone.type},message:"must be string,null"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("string"==typeof data4&&!pattern9.test(data4)){const err10={instancePath:instancePath+"/phone",schemaPath:"#/properties/phone/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.phoneVerified&&"boolean"!=typeof data.phoneVerified){const err11={instancePath:instancePath+"/phoneVerified",schemaPath:"#/properties/phoneVerified/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.email){let data6=data.email;if("string"!=typeof data6&&null!==data6){const err12={instancePath:instancePath+"/email",schemaPath:"#/properties/email/type",keyword:"type",params:{type:schema256.properties.email.type},message:"must be string,null"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if("string"==typeof data6&&!formats88.test(data6)){const err13={instancePath:instancePath+"/email",schemaPath:"#/properties/email/format",keyword:"format",params:{format:"email"},message:'must match format "email"'};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.emailVerified&&"boolean"!=typeof data.emailVerified){const err14={instancePath:instancePath+"/emailVerified",schemaPath:"#/properties/emailVerified/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data.whatsapp){let data8=data.whatsapp;if("string"!=typeof data8&&null!==data8){const err15={instancePath:instancePath+"/whatsapp",schemaPath:"#/properties/whatsapp/type",keyword:"type",params:{type:schema256.properties.whatsapp.type},message:"must be string,null"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if("string"==typeof data8&&!pattern9.test(data8)){const err16={instancePath:instancePath+"/whatsapp",schemaPath:"#/properties/whatsapp/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.whatsappVerified&&"boolean"!=typeof data.whatsappVerified){const err17={instancePath:instancePath+"/whatsappVerified",schemaPath:"#/properties/whatsappVerified/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.address){let data10=data.address;if(data10&&"object"==typeof data10&&!Array.isArray(data10)){if(void 0!==data10.id&&"string"!=typeof data10.id){const err18={instancePath:instancePath+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data10.line1&&"string"!=typeof data10.line1){const err19={instancePath:instancePath+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data10.line2&&"string"!=typeof data10.line2){const err20={instancePath:instancePath+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data10.line3&&"string"!=typeof data10.line3){const err21={instancePath:instancePath+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0!==data10.city&&"string"!=typeof data10.city){const err22={instancePath:instancePath+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data10.state&&"string"!=typeof data10.state){const err23={instancePath:instancePath+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data10.postalCode&&"string"!=typeof data10.postalCode){const err24={instancePath:instancePath+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data10.countryCode){let data18=data10.countryCode;if("string"==typeof data18){if(func4(data18)>2){const err25={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(func4(data18)<2){const err26={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}else{const err27={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}}else{const err28={instancePath:instancePath+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}if(void 0!==data.secretKey&&"string"!=typeof data.secretKey){const err29={instancePath:instancePath+"/secretKey",schemaPath:"#/properties/secretKey/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data.photo&&(validate15(data.photo,{instancePath:instancePath+"/photo",parentData:data,parentDataProperty:"photo",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length)),void 0!==data.jobTitle&&"string"!=typeof data.jobTitle){const err30={instancePath:instancePath+"/jobTitle",schemaPath:"#/properties/jobTitle/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(void 0!==data.dob&&"string"!=typeof data.dob){const err31={instancePath:instancePath+"/dob",schemaPath:"#/properties/dob/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(void 0!==data.gender){let data23=data.gender;if("string"!=typeof data23){const err32={instancePath:instancePath+"/gender",schemaPath:"#/properties/gender/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if("male"!==data23&&"female"!==data23){const err33={instancePath:instancePath+"/gender",schemaPath:"#/properties/gender/enum",keyword:"enum",params:{allowedValues:schema256.properties.gender.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}if(void 0!==data.nationality){let data24=data.nationality;if("string"==typeof data24){if(func4(data24)>2){const err34={instancePath:instancePath+"/nationality",schemaPath:"#/properties/nationality/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(func4(data24)<2){const err35={instancePath:instancePath+"/nationality",schemaPath:"#/properties/nationality/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}}else{const err36={instancePath:instancePath+"/nationality",schemaPath:"#/properties/nationality/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}let data25=data.permissions;if(Array.isArray(data25)){const len0=data25.length;for(let i0=0;i0<len0;i0++){let data26=data25[i0];if(data26&&"object"==typeof data26&&!Array.isArray(data26)){if(void 0===data26.organizationId){const err37={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"organizationId"},message:"must have required property 'organizationId'"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}if(void 0===data26.propertyId){const err38={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"propertyId"},message:"must have required property 'propertyId'"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}if(void 0===data26.role){const err39={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"role"},message:"must have required property 'role'"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}for(const key0 in data26)if("organizationId"!==key0&&"propertyId"!==key0&&"role"!==key0&&"timeTrackingEnabled"!==key0&&"department"!==key0&&"policyIds"!==key0&&"policies"!==key0){const err40={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if(void 0!==data26.organizationId&&"string"!=typeof data26.organizationId){const err41={instancePath:instancePath+"/permissions/"+i0+"/organizationId",schemaPath:"#/properties/permissions/items/properties/organizationId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}if(void 0!==data26.propertyId&&"string"!=typeof data26.propertyId){const err42={instancePath:instancePath+"/permissions/"+i0+"/propertyId",schemaPath:"#/properties/permissions/items/properties/propertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(void 0!==data26.role){let data29=data26.role;if("string"!=typeof data29){const err43={instancePath:instancePath+"/permissions/"+i0+"/role",schemaPath:"#/properties/permissions/items/properties/role/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}if("Guest"!==data29&&"User"!==data29&&"Agent"!==data29&&"Manager"!==data29&&"Maintenance"!==data29&&"Administrator"!==data29&&"SuperAdmin"!==data29){const err44={instancePath:instancePath+"/permissions/"+i0+"/role",schemaPath:"#/properties/permissions/items/properties/role/enum",keyword:"enum",params:{allowedValues:schema256.properties.permissions.items.properties.role.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}if(void 0!==data26.timeTrackingEnabled&&"boolean"!=typeof data26.timeTrackingEnabled){const err45={instancePath:instancePath+"/permissions/"+i0+"/timeTrackingEnabled",schemaPath:"#/properties/permissions/items/properties/timeTrackingEnabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}if(void 0!==data26.department&&"string"!=typeof data26.department){const err46={instancePath:instancePath+"/permissions/"+i0+"/department",schemaPath:"#/properties/permissions/items/properties/department/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}if(void 0!==data26.policyIds){let data32=data26.policyIds;if(Array.isArray(data32)){const len1=data32.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data32[i1]){const err47={instancePath:instancePath+"/permissions/"+i0+"/policyIds/"+i1,schemaPath:"#/properties/permissions/items/properties/policyIds/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}}else{const err48={instancePath:instancePath+"/permissions/"+i0+"/policyIds",schemaPath:"#/properties/permissions/items/properties/policyIds/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}}if(void 0!==data26.policies){let data34=data26.policies;if(Array.isArray(data34)){const len2=data34.length;for(let i2=0;i2<len2;i2++)validate58(data34[i2],{instancePath:instancePath+"/permissions/"+i0+"/policies/"+i2,parentData:data34,parentDataProperty:i2,rootData:rootData})||(vErrors=null===vErrors?validate58.errors:vErrors.concat(validate58.errors),errors=vErrors.length)}else{const err49={instancePath:instancePath+"/permissions/"+i0+"/policies",schemaPath:"#/properties/permissions/items/properties/policies/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}}}else{const err50={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}}}else{const err51={instancePath:instancePath+"/permissions",schemaPath:"#/properties/permissions/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}if(void 0!==data.preferences){let data36=data.preferences;if(Array.isArray(data36)){const len3=data36.length;for(let i3=0;i3<len3;i3++){let data37=data36[i3];if(data37&&"object"==typeof data37&&!Array.isArray(data37)){if(void 0===data37.organizationId){const err52={instancePath:instancePath+"/preferences/"+i3,schemaPath:"#/properties/preferences/items/required",keyword:"required",params:{missingProperty:"organizationId"},message:"must have required property 'organizationId'"};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}if(void 0===data37.propertyId){const err53={instancePath:instancePath+"/preferences/"+i3,schemaPath:"#/properties/preferences/items/required",keyword:"required",params:{missingProperty:"propertyId"},message:"must have required property 'propertyId'"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}for(const key1 in data37)if("organizationId"!==key1&&"propertyId"!==key1&&"notifications"!==key1){const err54={instancePath:instancePath+"/preferences/"+i3,schemaPath:"#/properties/preferences/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}if(void 0!==data37.organizationId&&"string"!=typeof data37.organizationId){const err55={instancePath:instancePath+"/preferences/"+i3+"/organizationId",schemaPath:"#/properties/preferences/items/properties/organizationId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}if(void 0!==data37.propertyId&&"string"!=typeof data37.propertyId){const err56={instancePath:instancePath+"/preferences/"+i3+"/propertyId",schemaPath:"#/properties/preferences/items/properties/propertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}if(void 0!==data37.notifications){let data40=data37.notifications;if(Array.isArray(data40)){const len4=data40.length;for(let i4=0;i4<len4;i4++){let data41=data40[i4];if(data41&&"object"==typeof data41&&!Array.isArray(data41)){if(void 0===data41.discriminator){const err57={instancePath:instancePath+"/preferences/"+i3+"/notifications/"+i4,schemaPath:"#/properties/preferences/items/properties/notifications/items/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}if(void 0===data41.enabled){const err58={instancePath:instancePath+"/preferences/"+i3+"/notifications/"+i4,schemaPath:"#/properties/preferences/items/properties/notifications/items/required",keyword:"required",params:{missingProperty:"enabled"},message:"must have required property 'enabled'"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}for(const key2 in data41)if("discriminator"!==key2&&"enabled"!==key2){const err59={instancePath:instancePath+"/preferences/"+i3+"/notifications/"+i4,schemaPath:"#/properties/preferences/items/properties/notifications/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key2},message:"must NOT have additional properties"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}if(void 0!==data41.discriminator){let data42=data41.discriminator;if("string"!=typeof data42){const err60={instancePath:instancePath+"/preferences/"+i3+"/notifications/"+i4+"/discriminator",schemaPath:"#/properties/preferences/items/properties/notifications/items/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err60]:vErrors.push(err60),errors++}if("observerTicketCreated"!==data42&&"observerTicketResolved"!==data42){const err61={instancePath:instancePath+"/preferences/"+i3+"/notifications/"+i4+"/discriminator",schemaPath:"#/properties/preferences/items/properties/notifications/items/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema256.properties.preferences.items.properties.notifications.items.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err61]:vErrors.push(err61),errors++}}if(void 0!==data41.enabled&&"boolean"!=typeof data41.enabled){const err62={instancePath:instancePath+"/preferences/"+i3+"/notifications/"+i4+"/enabled",schemaPath:"#/properties/preferences/items/properties/notifications/items/properties/enabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err62]:vErrors.push(err62),errors++}}else{const err63={instancePath:instancePath+"/preferences/"+i3+"/notifications/"+i4,schemaPath:"#/properties/preferences/items/properties/notifications/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err63]:vErrors.push(err63),errors++}}}else{const err64={instancePath:instancePath+"/preferences/"+i3+"/notifications",schemaPath:"#/properties/preferences/items/properties/notifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err64]:vErrors.push(err64),errors++}}}else{const err65={instancePath:instancePath+"/preferences/"+i3,schemaPath:"#/properties/preferences/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err65]:vErrors.push(err65),errors++}}}else{const err66={instancePath:instancePath+"/preferences",schemaPath:"#/properties/preferences/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err66]:vErrors.push(err66),errors++}}if(void 0!==data.notes){let data44=data.notes;if(Array.isArray(data44)){const len5=data44.length;for(let i5=0;i5<len5;i5++)if("string"!=typeof data44[i5]){const err67={instancePath:instancePath+"/notes/"+i5,schemaPath:"#/properties/notes/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err67]:vErrors.push(err67),errors++}}else{const err68={instancePath:instancePath+"/notes",schemaPath:"#/properties/notes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err68]:vErrors.push(err68),errors++}}if(void 0!==data.files){let data46=data.files;if(Array.isArray(data46)){const len6=data46.length;for(let i6=0;i6<len6;i6++)validate15(data46[i6],{instancePath:instancePath+"/files/"+i6,parentData:data46,parentDataProperty:i6,rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length)}else{const err69={instancePath:instancePath+"/files",schemaPath:"#/properties/files/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err69]:vErrors.push(err69),errors++}}if(void 0!==data.identifications){let data48=data.identifications;if(Array.isArray(data48)){const len7=data48.length;for(let i7=0;i7<len7;i7++)validate37(data48[i7],{instancePath:instancePath+"/identifications/"+i7,parentData:data48,parentDataProperty:i7,rootData:rootData})||(vErrors=null===vErrors?validate37.errors:vErrors.concat(validate37.errors),errors=vErrors.length)}else{const err70={instancePath:instancePath+"/identifications",schemaPath:"#/properties/identifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err70]:vErrors.push(err70),errors++}}if(void 0!==data.payments){let data50=data.payments;if(Array.isArray(data50)){const len8=data50.length;for(let i8=0;i8<len8;i8++)validate57(data50[i8],{instancePath:instancePath+"/payments/"+i8,parentData:data50,parentDataProperty:i8,rootData:rootData})||(vErrors=null===vErrors?validate57.errors:vErrors.concat(validate57.errors),errors=vErrors.length)}else{const err71={instancePath:instancePath+"/payments",schemaPath:"#/properties/payments/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err71]:vErrors.push(err71),errors++}}if(void 0!==data.location){let data52=data.location;if(data52&&"object"==typeof data52&&!Array.isArray(data52)){if(void 0===data52.accuracy){const err72={instancePath:instancePath+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"accuracy"},message:"must have required property 'accuracy'"};null===vErrors?vErrors=[err72]:vErrors.push(err72),errors++}if(void 0===data52.latitude){const err73={instancePath:instancePath+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"latitude"},message:"must have required property 'latitude'"};null===vErrors?vErrors=[err73]:vErrors.push(err73),errors++}if(void 0===data52.longitude){const err74={instancePath:instancePath+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"longitude"},message:"must have required property 'longitude'"};null===vErrors?vErrors=[err74]:vErrors.push(err74),errors++}if(void 0===data52.timestamp){const err75={instancePath:instancePath+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"timestamp"},message:"must have required property 'timestamp'"};null===vErrors?vErrors=[err75]:vErrors.push(err75),errors++}for(const key3 in data52)if("accuracy"!==key3&&"latitude"!==key3&&"longitude"!==key3&&"timestamp"!==key3){const err76={instancePath:instancePath+"/location",schemaPath:"#/properties/location/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key3},message:"must NOT have additional properties"};null===vErrors?vErrors=[err76]:vErrors.push(err76),errors++}if(void 0!==data52.accuracy){let data53=data52.accuracy;if("number"!=typeof data53&&null!==data53){const err77={instancePath:instancePath+"/location/accuracy",schemaPath:"#/properties/location/properties/accuracy/type",keyword:"type",params:{type:schema256.properties.location.properties.accuracy.type},message:"must be number,null"};null===vErrors?vErrors=[err77]:vErrors.push(err77),errors++}}if(void 0!==data52.latitude){let data54=data52.latitude;if("number"!=typeof data54&&null!==data54){const err78={instancePath:instancePath+"/location/latitude",schemaPath:"#/properties/location/properties/latitude/type",keyword:"type",params:{type:schema256.properties.location.properties.latitude.type},message:"must be number,null"};null===vErrors?vErrors=[err78]:vErrors.push(err78),errors++}}if(void 0!==data52.longitude){let data55=data52.longitude;if("number"!=typeof data55&&null!==data55){const err79={instancePath:instancePath+"/location/longitude",schemaPath:"#/properties/location/properties/longitude/type",keyword:"type",params:{type:schema256.properties.location.properties.longitude.type},message:"must be number,null"};null===vErrors?vErrors=[err79]:vErrors.push(err79),errors++}}if(void 0!==data52.timestamp){let data56=data52.timestamp;if("number"!=typeof data56&&null!==data56){const err80={instancePath:instancePath+"/location/timestamp",schemaPath:"#/properties/location/properties/timestamp/type",keyword:"type",params:{type:schema256.properties.location.properties.timestamp.type},message:"must be number,null"};null===vErrors?vErrors=[err80]:vErrors.push(err80),errors++}}}else{const err81={instancePath:instancePath+"/location",schemaPath:"#/properties/location/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err81]:vErrors.push(err81),errors++}}if(void 0!==data.reservations){let data57=data.reservations;if(Array.isArray(data57)){const len9=data57.length;for(let i9=0;i9<len9;i9++)validate63(data57[i9],{instancePath:instancePath+"/reservations/"+i9,parentData:data57,parentDataProperty:i9,rootData:rootData})||(vErrors=null===vErrors?validate63.errors:vErrors.concat(validate63.errors),errors=vErrors.length)}else{const err82={instancePath:instancePath+"/reservations",schemaPath:"#/properties/reservations/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err82]:vErrors.push(err82),errors++}}if(void 0!==data.spaceName&&"string"!=typeof data.spaceName){const err83={instancePath:instancePath+"/spaceName",schemaPath:"#/properties/spaceName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err83]:vErrors.push(err83),errors++}if(void 0!==data.revenue&&(validate122(data.revenue,{instancePath:instancePath+"/revenue",parentData:data,parentDataProperty:"revenue",rootData:rootData})||(vErrors=null===vErrors?validate122.errors:vErrors.concat(validate122.errors),errors=vErrors.length)),void 0!==data.createdAt){let data61=data.createdAt;if("string"!=typeof data61&&(!data61||"object"!=typeof data61||Array.isArray(data61))){const err84={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema101.type},message:"must be string,object"};null===vErrors?vErrors=[err84]:vErrors.push(err84),errors++}if("string"==typeof data61&&!formats4.validate(data61)){const err85={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err85]:vErrors.push(err85),errors++}}if(void 0!==data.updatedAt){let data62=data.updatedAt;if("string"!=typeof data62&&(!data62||"object"!=typeof data62||Array.isArray(data62))){const err86={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:schema151.type},message:"must be string,object"};null===vErrors?vErrors=[err86]:vErrors.push(err86),errors++}if("string"==typeof data62&&!formats4.validate(data62)){const err87={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err87]:vErrors.push(err87),errors++}}let data63=data.systems;if(Array.isArray(data63)){const len10=data63.length;for(let i10=0;i10<len10;i10++){let data64=data63[i10];if(data64&&"object"==typeof data64&&!Array.isArray(data64)){if(void 0===data64.systemId){const err88={instancePath:instancePath+"/systems/"+i10,schemaPath:"#/properties/systems/items/required",keyword:"required",params:{missingProperty:"systemId"},message:"must have required property 'systemId'"};null===vErrors?vErrors=[err88]:vErrors.push(err88),errors++}if(void 0===data64.propertyId){const err89={instancePath:instancePath+"/systems/"+i10,schemaPath:"#/properties/systems/items/required",keyword:"required",params:{missingProperty:"propertyId"},message:"must have required property 'propertyId'"};null===vErrors?vErrors=[err89]:vErrors.push(err89),errors++}if(void 0===data64.driver){const err90={instancePath:instancePath+"/systems/"+i10,schemaPath:"#/properties/systems/items/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err90]:vErrors.push(err90),errors++}for(const key4 in data64)if("systemId"!==key4&&"propertyId"!==key4&&"driver"!==key4){const err91={instancePath:instancePath+"/systems/"+i10,schemaPath:"#/properties/systems/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key4},message:"must NOT have additional properties"};null===vErrors?vErrors=[err91]:vErrors.push(err91),errors++}if(void 0!==data64.systemId&&"string"!=typeof data64.systemId){const err92={instancePath:instancePath+"/systems/"+i10+"/systemId",schemaPath:"#/properties/systems/items/properties/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err92]:vErrors.push(err92),errors++}if(void 0!==data64.propertyId&&"string"!=typeof data64.propertyId){const err93={instancePath:instancePath+"/systems/"+i10+"/propertyId",schemaPath:"#/properties/systems/items/properties/propertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err93]:vErrors.push(err93),errors++}if(void 0!==data64.driver&&"string"!=typeof data64.driver){const err94={instancePath:instancePath+"/systems/"+i10+"/driver",schemaPath:"#/properties/systems/items/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err94]:vErrors.push(err94),errors++}}else{const err95={instancePath:instancePath+"/systems/"+i10,schemaPath:"#/properties/systems/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err95]:vErrors.push(err95),errors++}}}else{const err96={instancePath:instancePath+"/systems",schemaPath:"#/properties/systems/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err96]:vErrors.push(err96),errors++}}else{const err97={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err97]:vErrors.push(err97),errors++}return validate115.errors=vErrors,0===errors}__name(validate122,"validate122"),__name(validate115,"validate115");var validateVendor=validate124,schema263={$schema:"http://json-schema.org/draft-07/schema",$id:"vendor.json",title:"Vendor",type:"object",required:["id","name","email"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"vendor",enum:["vendor"]},name:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},email:{type:["string","null"],format:"email"},address:{$ref:"definitions.json#/definitions/address"},photo:{$ref:"mediaFile.json#"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}};function validate124(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="vendor"),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.name){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.email){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"email"},message:"must have required property 'email'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs5===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if("vendor"!==data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema263.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.name&&"string"!=typeof data.name){const err8={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.phone){let data3=data.phone;if("string"!=typeof data3&&null!==data3){const err9={instancePath:instancePath+"/phone",schemaPath:"#/properties/phone/type",keyword:"type",params:{type:schema263.properties.phone.type},message:"must be string,null"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("string"==typeof data3&&!pattern9.test(data3)){const err10={instancePath:instancePath+"/phone",schemaPath:"#/properties/phone/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.email){let data4=data.email;if("string"!=typeof data4&&null!==data4){const err11={instancePath:instancePath+"/email",schemaPath:"#/properties/email/type",keyword:"type",params:{type:schema263.properties.email.type},message:"must be string,null"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("string"==typeof data4&&!formats88.test(data4)){const err12={instancePath:instancePath+"/email",schemaPath:"#/properties/email/format",keyword:"format",params:{format:"email"},message:'must match format "email"'};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.address){let data5=data.address;if(data5&&"object"==typeof data5&&!Array.isArray(data5)){if(void 0!==data5.id&&"string"!=typeof data5.id){const err13={instancePath:instancePath+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data5.line1&&"string"!=typeof data5.line1){const err14={instancePath:instancePath+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data5.line2&&"string"!=typeof data5.line2){const err15={instancePath:instancePath+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data5.line3&&"string"!=typeof data5.line3){const err16={instancePath:instancePath+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data5.city&&"string"!=typeof data5.city){const err17={instancePath:instancePath+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data5.state&&"string"!=typeof data5.state){const err18={instancePath:instancePath+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data5.postalCode&&"string"!=typeof data5.postalCode){const err19={instancePath:instancePath+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data5.countryCode){let data13=data5.countryCode;if("string"==typeof data13){if(func4(data13)>2){const err20={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(func4(data13)<2){const err21={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}else{const err22={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}}else{const err23={instancePath:instancePath+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}if(void 0!==data.photo&&(validate15(data.photo,{instancePath:instancePath+"/photo",parentData:data,parentDataProperty:"photo",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length)),void 0!==data.createdAt){let data15=data.createdAt;if("string"!=typeof data15&&(!data15||"object"!=typeof data15||Array.isArray(data15))){const err24={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema101.type},message:"must be string,object"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if("string"==typeof data15&&!formats4.validate(data15)){const err25={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}if(void 0!==data.updatedAt){let data16=data.updatedAt;if("string"!=typeof data16&&(!data16||"object"!=typeof data16||Array.isArray(data16))){const err26={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:schema151.type},message:"must be string,object"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if("string"==typeof data16&&!formats4.validate(data16)){const err27={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}}else{const err28={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}return validate124.errors=vErrors,0===errors}__name(validate124,"validate124");var validateWindowCovering=validate81,Alarm=class extends Entity{static{__name(this,"Alarm")}constructor(data){super(data),this.id=data.id,void 0!==data.name&&(this.name=data.name),void 0!==data.offline&&(this.offline=data.offline),this.type=data.type,void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),this.driver=data.driver,this.areas=data.areas,this.zones=data.zones,void 0!==data.chime&&(this.chime=data.chime),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion),void 0!==data.address&&(this.address=data.address)}};Object.defineProperty(Alarm.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"alarm.json",title:"Alarm",description:"Any smart alarm system",type:"object",required:["id","type","areas","zones","driver"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string",description:"Name of the alarm"},offline:{type:"boolean"},type:{type:"string",enum:["alarm"],default:"alarm"},systemId:{$ref:"definitions.json#/definitions/systemId"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},areas:{type:"array",items:{type:"object",properties:{number:{type:"number"},name:{type:"string"},securityMode:{type:["string","null"],enum:["arming","disarming","armed","disarmed","alarm",null]}},additionalProperties:!1}},zones:{type:"array",items:{type:"object",properties:{number:{type:"number",minimum:0},name:{type:"string"},secure:{type:["boolean","null"]},bypassed:{type:["boolean","null"]}},additionalProperties:!1}},chime:{type:"boolean",description:"Reflects whether console chime is enabled"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"},address:{$ref:"definitions.json#/definitions/address"}}}}),Object.defineProperty(Alarm.prototype,"validator",{get:__name((function(){return validateAlarm}),"get")});var Announcement=class extends Entity{static{__name(this,"Announcement")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.users&&(this.users=data.users),void 0!==data.group&&(this.group=data.group),void 0!==data.body&&(this.body=data.body),void 0!==data.media&&(this.media=data.media),void 0!==data.sentBy&&(this.sentBy=data.sentBy),void 0!==data.tags&&(this.tags=data.tags),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt)}};Object.defineProperty(Announcement.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"announcement.json",title:"Announcement",description:"Announcement message sent to users",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["announcement"],default:"announcement"},users:{type:"array",items:{type:"string"},minItems:1},group:{type:"string"},body:{type:"string"},media:{$ref:"mediaFile.json"},sentBy:{type:"string"},tags:{type:"array",items:{type:"string"}},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"}},additionalProperties:!1}}),Object.defineProperty(Announcement.prototype,"validator",{get:__name((function(){return validateAnnouncement}),"get")});var Camera=class extends Entity{static{__name(this,"Camera")}constructor(data){super(data),this.id=data.id,void 0!==data.name&&(this.name=data.name),this.type=data.type,void 0!==data.offline&&(this.offline=data.offline),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),this.driver=data.driver,void 0!==data.liveStreams&&(this.liveStreams=data.liveStreams),void 0!==data.liveStream&&(this.liveStream=data.liveStream),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Camera.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"camera.json",title:"Camera",description:"Any smart camera",type:"object",required:["id","type","driver"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{type:"string",enum:["camera"],default:"camera"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},liveStreams:{type:"object",additionalProperties:!1,$comment:"This is now deprecated. Use liveStream instead. This will remain here for backwards compatibility.",properties:{iframe:{type:["string","null"]},hls:{type:["string","null"]},webRTC:{type:["string","null"]},rtsp:{type:["string","null"]}}},liveStream:{type:"object",additionalProperties:!1,properties:{id:{type:"string"},driver:{type:"string",enum:["cloudflare-stream","aws-kinesis","digital-watchdog","mediamtx"]},allowedOrigins:{type:"array",items:{type:"string"}},authRequired:{type:"boolean"},iframe:{type:["string","null"]},hls:{type:["string","null"]},webRTC:{type:["string","null"]},rtsp:{type:["string","null"],description:"Local RTSP stream URL",examples:["rtsp://192.168.1.4:544/channels/1","rtsp://10.145.6.129:8554/unicast"]},previewImage:{type:["string","null"],description:"Source to preview the camera stream",examples:["https://example.com/preview.jpg","data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QBYRXhpZgAATU0AKgAAAAgAA1EQAAEAAAABAQAAAFERAAQAAAABAAABAgABAA"]}}},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}}}}),Object.defineProperty(Camera.prototype,"validator",{get:__name((function(){return validateCamera}),"get")});var Category=class extends Entity{static{__name(this,"Category")}constructor(data){super(data),this.id=data.id,this.type=data.type,void 0!==data.name&&(this.name=data.name),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.description&&(this.description=data.description),void 0!==data.image&&(this.image=data.image),void 0!==data.rating&&(this.rating=data.rating),this.discriminator=data.discriminator,void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(Category.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"category.json",title:"Category",type:"object",required:["id","type","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["category"],default:"category"},name:{type:"string",minLength:1},driver:{$ref:"definitions.json#/definitions/driver"},description:{type:"string"},image:{$ref:"mediaFile.json"},rating:{type:"number",minimum:0,maximum:10,default:9},discriminator:{type:"string",enum:["space","product","mediaFile"]},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Category.prototype,"validator",{get:__name((function(){return validateCategory}),"get")});var Courtesy=class extends Entity{static{__name(this,"Courtesy")}constructor(data){super(data),this.id=data.id,void 0!==data.name&&(this.name=data.name),this.type=data.type,void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),this.driver=data.driver,void 0!==data.offline&&(this.offline=data.offline),this.supportedStates=data.supportedStates,this.state=data.state,void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Courtesy.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"courtesy.json",title:"Courtesy",description:"Any smart courtesy system",type:"object",required:["id","type","driver","supportedStates","state"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},supportedStates:{type:"array",uniqueItems:!0,items:{enum:["privacy","service","none"]}},state:{type:"string",$ref:"#/properties/supportedStates/items"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}}}}),Object.defineProperty(Courtesy.prototype,"validator",{get:__name((function(){return validateCourtesy}),"get")});var Credential=class extends Entity{static{__name(this,"Credential")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),this.type=data.type,void 0!==data.driver&&(this.driver=data.driver),void 0!==data.discriminator&&(this.discriminator=data.discriminator),this.credential=data.credential,void 0!==data.userId&&(this.userId=data.userId),void 0!==data.organizationId&&(this.organizationId=data.organizationId),void 0!==data.propertyId&&(this.propertyId=data.propertyId),void 0!==data.deviceId&&(this.deviceId=data.deviceId),void 0!==data.userAgent&&(this.userAgent=data.userAgent),this.expires=data.expires,void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(Credential.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"credential.json",title:"Credential",type:"object",required:["type","credential","expires"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"credential"},driver:{$ref:"definitions.json#/definitions/driver"},discriminator:{type:"string",enum:["verificationCode","token","mobileKey","pin","publicKey","passkeyChallenge"]},credential:{type:"string"},userId:{type:"string"},organizationId:{type:"string"},propertyId:{type:"string"},deviceId:{type:"string"},userAgent:{type:"string"},expires:{type:["string","object","null"]},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Credential.prototype,"validator",{get:__name((function(){return validateCredential}),"get")});var DeviceRouter=class extends Entity{static{__name(this,"DeviceRouter")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),this.driver=data.driver,this.organizationId=data.organizationId,void 0!==data.devices&&(this.devices=data.devices)}};Object.defineProperty(DeviceRouter.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"deviceRouter.json",title:"Device Router",description:"A device router contains instructions on where to route devices based on their organization and driver.",type:"object",required:["driver","organizationId"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"deviceRouter",enum:["deviceRouter"]},driver:{type:"string"},organizationId:{type:["string","null"],description:"Reference (id) to the organization that owns this router"},devices:{type:"object",additionalProperties:!0}}}}),Object.defineProperty(DeviceRouter.prototype,"validator",{get:__name((function(){return validateDeviceRouter}),"get")});var Dimmer=class extends Entity{static{__name(this,"Dimmer")}constructor(data){super(data),this.id=data.id,void 0!==data.name&&(this.name=data.name),this.type=data.type,void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),this.driver=data.driver,void 0!==data.offline&&(this.offline=data.offline),this.level=data.level,void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Dimmer.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"dimmer.json",title:"Dimmer",description:"Any smart dimmer",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},level:{type:["number","null"],minimum:0,maximum:100},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","level","driver"]}}),Object.defineProperty(Dimmer.prototype,"validator",{get:__name((function(){return validateDimmer}),"get")});var DiscoveredDevice=class extends Entity{static{__name(this,"DiscoveredDevice")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),this.name=data.name,this.deviceId=data.deviceId,void 0!==data.type&&(this.type=data.type),void 0!==data.discriminator&&(this.discriminator=data.discriminator),void 0!==data.driver&&(this.driver=data.driver),this.deviceData=data.deviceData,void 0!==data.ignore&&(this.ignore=data.ignore),void 0!==data.organizationId&&(this.organizationId=data.organizationId),void 0!==data.propertyId&&(this.propertyId=data.propertyId)}};Object.defineProperty(DiscoveredDevice.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"discoveredDevice.json",title:"Discovered Device",description:"A device that has been discovered by Kohost, but not yet added to the Kohost system.",type:"object",required:["name","deviceId","deviceData"],properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},deviceId:{type:"string"},type:{type:"string",enum:["discoveredDevice"],default:"discoveredDevice"},discriminator:{$ref:"definitions.json#/definitions/type"},driver:{type:"string"},deviceData:{type:"object"},ignore:{type:"boolean"},organizationId:{type:["string","null"],description:"Reference (id) to the organization that owns this device"},propertyId:{type:["string","null"],description:"Reference (id) to the property that this device belongs to"}}}}),Object.defineProperty(DiscoveredDevice.prototype,"validator",{get:__name((function(){return validateDiscoveredDevice}),"get")});var EmailMessage=class extends Entity{static{__name(this,"EmailMessage")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),this.to=data.to,this.from=data.from,this.subject=data.subject,this.status=data.status,void 0!==data.statusMessage&&(this.statusMessage=data.statusMessage),void 0!==data.html&&(this.html=data.html),void 0!==data.text&&(this.text=data.text),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.appData&&(this.appData=data.appData),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(EmailMessage.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"emailMessage.json",title:"Email Message",type:"object",required:["to","from","status","subject"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"emailMessage",enum:["emailMessage"]},to:{type:"string",pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"},from:{type:"string",pattern:".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*",description:"Must be in the format of 'Sender <email@example.com>"},subject:{type:"string"},status:{type:"string",enum:["queued","sending","sent","deferred","delivered","undelivered","bounced","blocked","receiving","received","opened","clicked","unsubscribed","spamReport"]},statusMessage:{type:"string"},html:{type:"string"},text:{type:"string"},driver:{type:"string"},appData:{type:"object"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(EmailMessage.prototype,"validator",{get:__name((function(){return validateEmailMessage}),"get")});var EnergyReport=class extends Entity{static{__name(this,"EnergyReport")}constructor(data){super(data),this.id=data.id,this.type=data.type,void 0!==data.reportTime&&(this.reportTime=data.reportTime),this.roomId=data.roomId,this.first=data.first,this.last=data.last,this.consumption=data.consumption,this.totals=data.totals,this.costPerKw=data.costPerKw}};Object.defineProperty(EnergyReport.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"energyReport.json",title:"Energy Report",description:"Hourly Report for Energy based on energy report shards",type:"object",required:["id","type","roomId","first","last","consumption","totals","costPerKw"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["energyReport"],default:"energyReport"},reportTime:{type:"string",enum:["hourly","daily","monthly"]},roomId:{$ref:"definitions.json#/definitions/id"},first:{type:["string","object"],format:"date-time"},last:{type:["string","object"],format:"date-time"},consumption:{type:"array",items:{type:"object",required:["id","type","kwh"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},kwh:{type:"number",minimum:0}}}},totals:{type:"array",items:{type:"object",required:["lights","climate","media"],properties:{lights:{type:"number",minimum:0},climate:{type:"number",minimum:0},media:{type:"number",minimum:0}}}},costPerKw:{type:"number",minimum:0}}}}),Object.defineProperty(EnergyReport.prototype,"validator",{get:__name((function(){return validateEnergyReport}),"get")});var EnergyReportShard=class extends Entity{static{__name(this,"EnergyReportShard")}constructor(data){super(data),this.id=data.id,this.type=data.type,this.roomId=data.roomId,this.first=data.first,this.last=data.last,this.data=data.data,this.ndata=data.ndata,this.expires=data.expires}};Object.defineProperty(EnergyReportShard.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"energyReportShard.json",title:"Energy Report Shard",description:"Shard used for Energy Reports",type:"object",required:["id","type","roomId","first","last","data","ndata","expires"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["energyReportShard"],default:"energyReportShard"},roomId:{$ref:"definitions.json#/definitions/id"},first:{type:["string","object"],format:"date-time"},last:{type:["string","object"],format:"date-time"},data:{type:"array",items:{type:"object",required:["time","watts","id","type","value"],properties:{time:{type:["string","object"],format:"date-time"},watts:{$ref:"definitions.json#/definitions/watts"},id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},value:{type:"number",minimum:0,maximum:1}}}},ndata:{type:"integer",minimum:0,maximum:1e5,default:0},expires:{type:["string","object"],format:"date-time"}}}}),Object.defineProperty(EnergyReportShard.prototype,"validator",{get:__name((function(){return validateEnergyReportShard}),"get")});var Gateway=class extends Entity{static{__name(this,"Gateway")}constructor(data){super(data),this.id=data.id,this.type=data.type,void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),this.status=data.status,void 0!==data.systemId&&(this.systemId=data.systemId),this.driver=data.driver,void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Gateway.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"iotGateway.json",title:"Gateway",description:"Any smart gateway that is an entrypoint for controlling devices",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},status:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"},driver:{$ref:"definitions.json#/definitions/driver"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","status","driver"]}}),Object.defineProperty(Gateway.prototype,"validator",{get:__name((function(){return validateGateway}),"get")});var Identification=class extends Entity{static{__name(this,"Identification")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),this.type=data.type,void 0!==data.number&&(this.number=data.number),void 0!==data.maskedNumber&&(this.maskedNumber=data.maskedNumber),void 0!==data.encryptedNumber&&(this.encryptedNumber=data.encryptedNumber),void 0!==data.issued&&(this.issued=data.issued),void 0!==data.expires&&(this.expires=data.expires),void 0!==data.verified&&(this.verified=data.verified),void 0!==data.matched&&(this.matched=data.matched),void 0!==data.firstName&&(this.firstName=data.firstName),void 0!==data.lastName&&(this.lastName=data.lastName),void 0!==data.issuingCountry&&(this.issuingCountry=data.issuingCountry),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(Identification.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"identification.json",title:"Identification",type:"object",required:["type"],additionalProperties:!1,oneOf:[{required:["number"]},{required:["encryptedNumber"]}],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["driversLicense","passport","identityCard","visa"]},number:{type:"string"},maskedNumber:{type:"string"},encryptedNumber:{type:"string"},issued:{type:["string","object"],format:"date-time"},expires:{type:["string","object","null"],format:"date-time"},verified:{type:"boolean"},matched:{type:"boolean"},firstName:{type:"string"},lastName:{type:"string"},issuingCountry:{type:"string",minLength:2,maxLength:2},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Identification.prototype,"validator",{get:__name((function(){return validateIdentification}),"get")});var Issue=class extends Entity{static{__name(this,"Issue")}constructor(data){super(data),this.id=data.id,this.type=data.type,this.name=data.name,void 0!==data.description&&(this.description=data.description),this.department=data.department,void 0!==data.autoAssign&&(this.autoAssign=data.autoAssign),void 0!==data.notify&&(this.notify=data.notify),void 0!==data.systemKey&&(this.systemKey=data.systemKey),void 0!==data.autoCreateTicket&&(this.autoCreateTicket=data.autoCreateTicket),void 0!==data.excludedResources&&(this.excludedResources=data.excludedResources)}};Object.defineProperty(Issue.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"issue.json",title:"Issue",description:"An issue associated with ticketing and concierge.",type:"object",required:["id","type","name","department"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["issue"],default:"issue"},name:{type:"string"},description:{type:"string"},department:{type:"string"},autoAssign:{type:"object",properties:{userId:{type:"string",description:"The user ID to assign tickets with this issue to."},vendorId:{type:"string",description:"The vendor ID to assign tickets with this issue to."},priority:{$ref:"ticket.json#/properties/priority",description:"The priority to assign tickets with this issue to."},tags:{type:"array",items:{type:"string"}}}},notify:{type:"array",description:"A list of entities to notify when this issue is triggered.",default:[],items:{type:"object",required:["id","discriminator"],properties:{id:{type:"string",description:"The ID of the entity to notify."},discriminator:{type:"string",enum:["user"]}}}},systemKey:{type:"string"},autoCreateTicket:{type:"boolean",default:!0},excludedResources:{type:"array",description:"A list of resources that should not trigger notifications of this issue",items:{type:"string"},default:[]}}}}),Object.defineProperty(Issue.prototype,"validator",{get:__name((function(){return validateIssue}),"get")});var Lock=class extends Entity{static{__name(this,"Lock")}constructor(data){super(data),this.id=data.id,void 0!==data.name&&(this.name=data.name),this.type=data.type,void 0!==data.offline&&(this.offline=data.offline),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),this.driver=data.driver,this.state=data.state,void 0!==data.mode&&(this.mode=data.mode),void 0!==data.supportedModes&&(this.supportedModes=data.supportedModes),void 0!==data.batteryLevel&&(this.batteryLevel=data.batteryLevel),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Lock.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"lock.json",title:"Lock",description:"Any smart lock",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},state:{type:["string","null"],enum:["locked","unlocked",null]},mode:{type:["string","null"],enum:["normal","autoLock","emergencyOpen","emergencyClose","holdOpen","lockdown",null],description:"emergencyOpen and emergencyClose are deprecated and can be removed once Salto, Paxton and Geovision drivers are updated",default:null},supportedModes:{type:"array",uniqueItems:!0,items:{enum:["normal","autoLock","emergencyOpen","emergencyClose","holdOpen","lockdown",null]}},batteryLevel:{$ref:"definitions.json#/definitions/batteryLevel"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","state","driver"]}}),Object.defineProperty(Lock.prototype,"validator",{get:__name((function(){return validateLock}),"get")});var Log=class extends Entity{static{__name(this,"Log")}constructor(data){super(data),this.type=data.type,this.timestamp=data.timestamp,this.id=data.id,this.driver=data.driver,this.name=data.name,void 0!==data.field1&&(this.field1=data.field1),void 0!==data.field2&&(this.field2=data.field2),void 0!==data.field3&&(this.field3=data.field3),void 0!==data.field4&&(this.field4=data.field4),void 0!==data.field5&&(this.field5=data.field5),void 0!==data.field6&&(this.field6=data.field6)}};Object.defineProperty(Log.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"log.json",title:"Log",type:"object",required:["type","timestamp","id","driver","name"],properties:{type:{type:"string",default:"log",enum:["log"]},timestamp:{type:"number",minimum:1655907956593},id:{$ref:"definitions.json#/definitions/id"},driver:{$ref:"definitions.json#/definitions/driver"},name:{type:"string",description:"Event name"},field1:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field2:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field3:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field4:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field5:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field6:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}}}}}),Object.defineProperty(Log.prototype,"validator",{get:__name((function(){return validateLog}),"get")});var MediaFile=class extends Entity{static{__name(this,"MediaFile")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),this.type=data.type,void 0!==data.name&&(this.name=data.name),void 0!==data.fileHash&&(this.fileHash=data.fileHash),void 0!==data.category&&(this.category=data.category),void 0!==data.mimeType&&(this.mimeType=data.mimeType),void 0!==data.data&&(this.data=data.data),void 0!==data.url&&(this.url=data.url),void 0!==data.width&&(this.width=data.width),void 0!==data.height&&(this.height=data.height),void 0!==data.size&&(this.size=data.size),void 0!==data.uploadUrl&&(this.uploadUrl=data.uploadUrl),void 0!==data.uploadUrlExpires&&(this.uploadUrlExpires=data.uploadUrlExpires),void 0!==data.createdBy&&(this.createdBy=data.createdBy),void 0!==data.systemId&&(this.systemId=data.systemId)}createImageVariant(params){if("image/*"!=this.mimeType)throw new Error("Only dynamic images can have variants");if(!this.url)throw new Error("MediaFile has no url");const query=Object.keys(params).map((key=>`${key}=${params[key]}`)).join(",");return this.url.replace(/\/public$/,`/${query}`)}};Object.defineProperty(MediaFile.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"mediaFile.json",title:"Media File",description:"Any media file",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"mediaFile",enum:["mediaFile"]},name:{type:"string"},fileHash:{type:"string"},category:{type:"string",description:"This is the category id"},mimeType:{type:"string",enum:["image/*","image/jpeg","image/png","image/gif","image/webp","image/avif","image/svg+xml","application/pdf"]},data:{type:"string"},url:{type:"string",format:"uri"},width:{type:"integer",minimum:0},height:{type:"integer",minimum:0},size:{type:"integer",minimum:0,description:"Size in bytes"},uploadUrl:{type:"string",format:"uri"},uploadUrlExpires:{$ref:"definitions.json#/definitions/date"},createdBy:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"}},additionalProperties:!1,required:["type"]}}),Object.defineProperty(MediaFile.prototype,"validator",{get:__name((function(){return validateMediaFile}),"get")});var MediaSource=class extends Entity{static{__name(this,"MediaSource")}constructor(data){super(data),this.id=data.id,this.type=data.type,this.discriminator=data.discriminator,void 0!==data.playlists&&(this.playlists=data.playlists),void 0!==data.remote&&(this.remote=data.remote),void 0!==data.name&&(this.name=data.name),this.driver=data.driver,void 0!==data.offline&&(this.offline=data.offline),this.audio=data.audio,this.video=data.video,void 0!==data.powerFeedback&&(this.powerFeedback=data.powerFeedback),void 0!==data.volumeFeedback&&(this.volumeFeedback=data.volumeFeedback),void 0!==data.muted&&(this.muted=data.muted),void 0!==data.volume&&(this.volume=data.volume),void 0!==data.brightness&&(this.brightness=data.brightness),void 0!==data.contrast&&(this.contrast=data.contrast),void 0!==data.power&&(this.power=data.power),void 0!==data.input&&(this.input=data.input),void 0!==data.supportedInputs&&(this.supportedInputs=data.supportedInputs),void 0!==data.supportedOutputs&&(this.supportedOutputs=data.supportedOutputs),void 0!==data.command&&(this.command=data.command),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(MediaSource.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"mediaSource.json",title:"Media Source",description:"Any media source",type:"object",required:["id","type","discriminator","audio","video","driver"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"mediaSource",enum:["mediaSource"]},discriminator:{type:"string",enum:["tv","dvr","appleTv","discPlayer","mediaPlayer","paSystem","uncontrolledDevice"]},playlists:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{$ref:"definitions.json#/definitions/name"}}}},remote:{type:"string",enum:["MR22GA","XRT260","XRT270","HOF-16K 1.2","219863500","SONIFI","AKB76039803","BN59-01388A"]},name:{$ref:"definitions.json#/definitions/name"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},audio:{type:"boolean"},video:{type:"boolean"},powerFeedback:{type:"boolean"},volumeFeedback:{type:"boolean"},muted:{type:"boolean"},volume:{type:"number",minimum:0,maximum:100},brightness:{type:"number",minimum:0,maximum:100},contrast:{type:"number",minimum:0,maximum:100},power:{type:"string",enum:["on","off"]},input:{type:"string"},supportedInputs:{type:"array",items:{type:"string"}},supportedOutputs:{type:"array",items:{type:"string"}},command:{type:["string","null"],enum:["mute","volumeUp","volumeDown","brightnessUp","brightnessDown","channelUp","channelDown","number0","number1","number2","number3","number4","number5","number6","number7","number8","number9","lastChannel","display","favoriteChannel","play","playing","stop","stopped","pause","paused","fastForward","fastForwarding","rewind","rewinding","instantReplay","record","ac3","pvrMenu","guide","menu","menuUp","menuDown","menuLeft","menuRight","pageUp","pageDown","select","exit","input","power","enterChannel","enterVolume","enterBrightness","enterContrast","number10","number11","number12","number13","number14","number15","number16","number10Plus","number20Plus","number100","dash","threeChan","threeD","sixChan","a","add","alarm","am","analog","angle","antenna","antennaEast","antennaWest","aspect","audio1","audio2","audio3","audioDumming","audioLevelDown","audioLevelUp","b","back","c","component1","component2","component3","d","home","list","liveTv","discreteInputCable","powerOff","powerOn","setupMenu","skipForward","skipReverse","video1","video2","video3","video4","video5","details","hdmi1","hdmi2","hdmi3","cecDeviceList","mtsSap","red","green","yellow","blue","alert","order"]},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},additionalProperties:!1}}),Object.defineProperty(MediaSource.prototype,"validator",{get:__name((function(){return validateMediaSource}),"get")});var MotionSensor=class extends Entity{static{__name(this,"MotionSensor")}constructor(data){super(data),this.id=data.id,this.type=data.type,this.driver=data.driver,void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(MotionSensor.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"motionSensor.json",title:"Motion Sensor",description:"Any smart motion sensor",type:"object",required:["id","type","driver"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},driver:{$ref:"definitions.json#/definitions/driver"},systemId:{$ref:"definitions.json#/definitions/systemId"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}}}}),Object.defineProperty(MotionSensor.prototype,"validator",{get:__name((function(){return validateMotionSensor}),"get")});var Order=class extends Entity{static{__name(this,"Order")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),this.type=data.type,void 0!==data.orderNumber&&(this.orderNumber=data.orderNumber),this.status=data.status,void 0!==data.userId&&(this.userId=data.userId),void 0!==data.reservationId&&(this.reservationId=data.reservationId),void 0!==data.date&&(this.date=data.date),void 0!==data.items&&(this.items=data.items),void 0!==data.taxes&&(this.taxes=data.taxes),void 0!==data.fees&&(this.fees=data.fees),void 0!==data.delivery&&(this.delivery=data.delivery),void 0!==data.payments&&(this.payments=data.payments)}getSubTotal(){return this.items.reduce(((acc,item)=>{const qty=item.quantity||1;return acc+item.price*qty}),0)}getTaxTotal(){const taxes=this.taxes;return taxes?this.items.reduce(((acc,item)=>{if(!item.taxClass)return acc;const tax=taxes.find((t=>t.class===item.taxClass));if(!tax)return acc;const{rateType:rateType,rate:rate}=tax;return"percentage"===rateType?acc+item.price*rate:acc+rate}),0):0}getDeliveryTotal(){const delivery=this.delivery;return delivery?this.items.reduce(((acc,item)=>{if(!item.deliveryClass)return acc;const d=delivery.find((d2=>d2.class===item.deliveryClass));if(!d)return acc;const{rateType:rateType,rate:rate}=d;return"percentage"===rateType?acc+item.price*rate:acc+rate}),0):0}getFeesTotal(){return this.fees.reduce(((acc,fee)=>acc+fee.price),0)}getTotal(){return this.getSubTotal()+this.getTaxTotal()+this.getDeliveryTotal()+this.getFeesTotal()}getPaymentsTotal(){return this.payments.reduce(((acc,payment)=>acc+payment.amount),0)}getBalance(){return this.getTotal()-this.getPaymentsTotal()}};Object.defineProperty(Order.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"order.json",title:"Order",description:"A purchase order for products or services.",type:"object",required:["type","status"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"order",enum:["order"]},orderNumber:{type:"string"},status:{type:"string",enum:["draft","pendingPayment","processing","outForDelivery","completed","paymentFailed","cancelled","refunded"]},userId:{$ref:"definitions.json#/definitions/id",description:"User id of purchaser"},reservationId:{$ref:"definitions.json#/definitions/id",description:"Reservation id if the order is for a reservation"},date:{$ref:"definitions.json#/definitions/date"},items:{type:"array",default:[],items:{type:"object",required:["name","price"],properties:{additionalProperties:!1,name:{type:"string"},sku:{type:"string"},quantity:{type:"number",default:1},price:{type:"number"},taxClass:{type:"string"},deliveryClass:{type:"string"},productId:{type:"string"}}}},taxes:{type:"array",default:[],items:{type:"object",required:["name","rate"],properties:{additionalProperties:!1,name:{type:"string"},class:{type:"string"},rateType:{type:"string",enum:["percentage","flat"],default:"percentage"},rate:{type:"number"},total:{type:"number"}}}},fees:{type:"array",default:[],items:{type:"object",required:["name","price"],properties:{additionalProperties:!1,name:{type:"string"},price:{type:"number"}}}},delivery:{type:"array",default:[],items:{type:"object",required:["name","rate"],properties:{additionalProperties:!1,name:{type:"string"},class:{type:"string"},rateType:{type:"string",enum:["percentage","flat"],default:"percentage"},rate:{type:"number"},total:{type:"number"}}}},payments:{type:"array",default:[],items:{type:"object",properties:{method:{type:"string",enum:["folio","invoice","amex","visa","masterCard","maestro","discover","diners","jcb","applePay","alipay","chinaUnionPay","vpay"]},name:{type:"string"},date:{$ref:"definitions.json#/definitions/date"},amount:{type:"number"},transactionReference:{type:"string"}}}}}}}),Object.defineProperty(Order.prototype,"validator",{get:__name((function(){return validateOrder}),"get")});var Organization=class extends Entity{static{__name(this,"Organization")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),this.accountNumber=data.accountNumber,this.name=data.name,void 0!==data.properties&&(this.properties=data.properties),void 0!==data.hostname&&(this.hostname=data.hostname),void 0!==data.appManifest&&(this.appManifest=data.appManifest),void 0!==data.tickets&&(this.tickets=data.tickets),void 0!==data.credentials&&(this.credentials=data.credentials),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt)}};Object.defineProperty(Organization.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"organization.json",title:"Organization",type:"object",description:"An organization is a group or entity that subscribes to Kohost software.",required:["accountNumber","name"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"organization",enum:["organization"]},accountNumber:{type:["number","null"],minimum:1e4},name:{type:"string"},properties:{type:"array",items:{type:"string"}},hostname:{type:["string","null"]},appManifest:{type:"object",properties:{name:{type:"string"},short_name:{type:"string"},scope:{type:"string"},start_url:{type:"string"},themeColor:{type:"string"},backgroundColor:{type:"string"},display:{type:"string",enum:["fullscreen","standalone","minimal-ui","browser"],default:"fullscreen"},orientation:{type:"string",enum:["portrait","landscape"],default:"portrait"},splash:{type:"object",properties:{src:{type:"string"},type:{type:"string"},sizes:{type:"string"}}},icons:{type:"array",items:{type:"object",properties:{src:{type:"string"},sizes:{type:"string"},type:{type:"string"}}}},logo:{type:"object",properties:{src:{type:"string"},type:{type:"string"},sizes:{type:"string"}}}},default:{name:"Kohost",short_name:"Kohost",start_url:"/",scope:"/",display:"fullscreen",orientation:"portrait",theme_color:"#1d1f22",background_color:"#1d1f22",icons:[{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/9c85047f-ccba-4b1c-3070-5463fbe93b00/w=512",sizes:"512x512",type:"image/png"}],splash:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/034fb112-5326-4d37-373e-d1cc2a4d0400/w=1500",sizes:"1500x800",type:"image/jpg"},logo:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/1e54c54d-3bac-4745-f46f-c2f98036af00/h=75",sizes:"300x75",type:"image/png"}}},tickets:{type:"object",properties:{nextTicketNumber:{type:["string","integer"],default:1}}},credentials:{type:"object",additionalProperties:!0},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}}}),Object.defineProperty(Organization.prototype,"validator",{get:__name((function(){return validateOrganization}),"get")});var Payment=class extends Entity{static{__name(this,"Payment")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),this.type=data.type,void 0!==data.enabled&&(this.enabled=data.enabled),void 0!==data.storageData&&(this.storageData=data.storageData),this.maskedNumber=data.maskedNumber,void 0!==data.issued&&(this.issued=data.issued),this.expires=data.expires,void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(Payment.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"payment.json",title:"Payment",type:"object",required:["type","maskedNumber","expires"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["amex","visa","masterCard","maestro","discover","diners","jcb","applePay","alipay","chinaUnionPay","vpay"]},enabled:{type:"boolean",default:!0},storageData:{type:["string","null"]},maskedNumber:{type:"string"},issued:{type:["string","null"]},expires:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Payment.prototype,"validator",{get:__name((function(){return validatePayment}),"get")});var Policy=class extends Entity{static{__name(this,"Policy")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),this.type=data.type,this.discriminator=data.discriminator,this.name=data.name,void 0!==data.description&&(this.description=data.description),this.organizationId=data.organizationId,this.propertyId=data.propertyId,this.permissions=data.permissions}};Object.defineProperty(Policy.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"policy.json",title:"Policy",description:"A policy is a set of permissions that can be applied to a user to limit their access to resources.",type:"object",required:["name","type","organizationId","propertyId","permissions","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"policy",enum:["policy"]},discriminator:{type:"string",enum:["user"]},name:{type:"string",minLength:1},description:{type:"string"},organizationId:{type:"string"},propertyId:{type:"string"},permissions:{type:"array",items:{type:"object",required:["entities","effect"],properties:{entities:{type:"array",items:{type:"string",pattern:"^[^:]+(:.+)+$"}},effect:{type:"string",enum:["Allow","Deny"]}}}}}}}),Object.defineProperty(Policy.prototype,"validator",{get:__name((function(){return validatePolicy}),"get")});var Product=class extends Entity{static{__name(this,"Product")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),this.name=data.name,this.driver=data.driver,void 0!==data.description&&(this.description=data.description),this.price=data.price,void 0!==data.tax&&(this.tax=data.tax),void 0!==data.image&&(this.image=data.image),void 0!==data.category&&(this.category=data.category),void 0!==data.imageUrl&&(this.imageUrl=data.imageUrl),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(Product.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"product.json",title:"Product",type:"object",required:["name","price","driver"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"product",enum:["product"]},name:{type:"string"},driver:{$ref:"definitions.json#/definitions/driver"},description:{type:"string"},price:{type:"number"},tax:{type:["number","null"]},image:{$ref:"mediaFile.json"},category:{type:"string"},imageUrl:{type:"string",format:"uri",pattern:"^https?://"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Product.prototype,"validator",{get:__name((function(){return validateProduct}),"get")});var Property=class extends Entity{static{__name(this,"Property")}constructor(data){super(data),this.id=data.id,this.name=data.name,this.type=data.type,this.discriminator=data.discriminator,this.organization=data.organization,void 0!==data.departments&&(this.departments=data.departments),void 0!==data.testModeEnabled&&(this.testModeEnabled=data.testModeEnabled),void 0!==data.testMode&&(this.testMode=data.testMode),this.timezone=data.timezone,void 0!==data.smsNumber&&(this.smsNumber=data.smsNumber),void 0!==data.checkInTime&&(this.checkInTime=data.checkInTime),void 0!==data.checkOutTime&&(this.checkOutTime=data.checkOutTime),void 0!==data.address&&(this.address=data.address),void 0!==data.latitude&&(this.latitude=data.latitude),void 0!==data.longitude&&(this.longitude=data.longitude),void 0!==data.appFeatures&&(this.appFeatures=data.appFeatures),void 0!==data.notifications&&(this.notifications=data.notifications),void 0!==data.credentials&&(this.credentials=data.credentials)}};Object.defineProperty(Property.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"property.json",title:"Property",type:"object",description:"A property is a physical asset or building",required:["id","name","type","organization","timezone","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{type:"string",default:"property",enum:["property"]},discriminator:{type:"string",enum:["hospitality","education","commercial","storage"]},organization:{type:["string","null"],description:"Reference (id) to the organization that owns this property"},departments:{type:"array",items:{type:"string"}},testModeEnabled:{type:"boolean"},testMode:{type:"object",properties:{notificationEmails:{type:"array",items:{type:"string"},description:"Only users with these email addresses will receive notifications in test mode, including sms, email, or push."},notificationEmailDomains:{type:"array",items:{type:"string"},description:"Only users with email addreses ending in these domains will receive notifications in test mode, including sms, email, or push."}}},timezone:{type:"string",description:"IANA timezone string",pattern:"^([a-zA-Z]+/[a-zA-Z_]+)$",examples:["America/New_York","America/Los_Angeles"]},smsNumber:{type:"string"},checkInTime:{type:"string"},checkOutTime:{type:"string"},address:{$ref:"definitions.json#/definitions/address"},latitude:{type:"number"},longitude:{type:"number"},appFeatures:{type:"object",properties:{RoomControl:{type:"object",properties:{disabledSystems:{type:"array",items:{type:"string",enum:["climate","lights","shades","tv","doors"]}},excludedDeviceIds:{type:"array",items:{type:"string"},default:[]},commonAreas:{type:"object",properties:{spaces:{type:"array",items:{type:"string"}}}},alarmConfig:{type:"object",patternProperties:{"^[a-zA-Z0-9]+$":{type:"object",properties:{zoneLockMap:{type:"object",description:"Maps zone numbers to lock ids",additionalProperties:{type:"string"}}}}},examples:[{wZz7hucY:{zoneLockMap:{1:"wc87hucc",2:"bc86hzxc",3:"zv5ah5jv"}}}]}},additionalProperties:!1},CheckIn:{type:"object",properties:{payment:{},identification:{},earlyCheckIn:{type:"object",required:["dynamic"],properties:{dynamic:{type:"boolean",default:!1},minimumPrice:{type:"number",default:10},maximumPrice:{type:"number",default:50},priceRatioPerHour:{type:"number",default:.1},minimumTime:{type:"string"}}},roomUpgrades:{},pet:{},promos:{}}},CheckOut:{type:"object",properties:{lateCheckOut:{type:"object",required:["dynamic"],properties:{dynamic:{type:"boolean",default:!1},minimumPrice:{type:"number",default:10},maximumPrice:{type:"number",default:50},priceRatioPerHour:{type:"number",default:.1}}}}},Concierge:{type:"object",properties:{timeTracking:{type:"boolean",default:!1},tipping:{type:"boolean",default:!1},feedback:{type:"boolean",default:!0},ratings:{type:"boolean",default:!0},newTicketCCs:{type:"array",items:{type:"string"},default:[]},newMessageChannel:{type:["string","null"],enum:["sms","email"],default:"sms",description:"Determines how users should be notified of new messages in the concierge system"},quickServices:{type:"array",items:{type:"object",properties:{name:{type:"string"},description:{type:"string"},department:{type:"string"},image:{$ref:"mediaFile.json"}},required:["name","description","image"]}},issues:{type:"object",properties:{syncWithPropertyId:{type:"string"}}}}},DigitalKey:{type:"object",properties:{system:{type:"string",enum:["salto","dormakaba"]},systemOnline:{type:"boolean",default:!1},systemConfig:{type:"object",properties:{legicUrl:{type:"string",format:"uri"},legicWalletName:{type:"string"},legicAppId:{type:"number"},legicTechUsername:{type:"string"},legicTechPassword:{type:"string"}},additionalProperties:!1,default:{}},enableApp:{type:"boolean"},branding:{type:"object",properties:{logo:{type:"string",format:"uri"},gradient:{type:"array",items:{type:"string",pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},minItems:2,maxItems:2},highlightedGradient:{type:"array",items:{type:"string",pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},minItems:2,maxItems:3}}}}},SOS:{type:"object",properties:{active:{type:"boolean"},activeEmergencies:{type:"array",items:{type:"string",enum:["medical","fire","suspiciousPerson","other","conflict","shooter"]}}}},Elevator:{type:"object"},Experiences:{type:"object"},Dining:{type:"object",properties:{system:{type:"string",enum:["gotab"]},systemConfig:{type:"object",properties:{landingUrl:{type:"string",format:"uri"},includeUserDetails:{type:"boolean"}},additionalProperties:!1}}},Rentals:{type:"object"},Shop:{type:"object"},Spa:{type:"object"},Valet:{type:"object"}},additionalProperties:!1,default:{RoomControl:{}}},notifications:{type:"object",properties:{email:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1},sms:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1},push:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1,default:{email:{enabled:!1},sms:{enabled:!1},push:{enabled:!1}}},credentials:{type:"object",additionalProperties:!0}}}}),Object.defineProperty(Property.prototype,"validator",{get:__name((function(){return validateProperty}),"get")});var Reservation=class extends Entity{static{__name(this,"Reservation")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.primaryGuest&&(this.primaryGuest=data.primaryGuest),this.type=data.type,void 0!==data.sharedGuests&&(this.sharedGuests=data.sharedGuests),void 0!==data.spaceCategory&&(this.spaceCategory=data.spaceCategory),void 0!==data.space&&(this.space=data.space),void 0!==data.previousSpace&&(this.previousSpace=data.previousSpace),this.status=data.status,void 0!==data.mobileCheckInSpaceCategoryChanged&&(this.mobileCheckInSpaceCategoryChanged=data.mobileCheckInSpaceCategoryChanged),void 0!==data.mobileCheckInSpaceChanged&&(this.mobileCheckInSpaceChanged=data.mobileCheckInSpaceChanged),void 0!==data.mobileCheckInStatus&&(this.mobileCheckInStatus=data.mobileCheckInStatus),void 0!==data.mobileCheckInStatusMessage&&(this.mobileCheckInStatusMessage=data.mobileCheckInStatusMessage),void 0!==data.confirmationNumber&&(this.confirmationNumber=data.confirmationNumber),void 0!==data.expectedCheckInDateTime&&(this.expectedCheckInDateTime=data.expectedCheckInDateTime),this.checkInDateTime=data.checkInDateTime,this.checkOutDateTime=data.checkOutDateTime,void 0!==data.adultCount&&(this.adultCount=data.adultCount),void 0!==data.childCount&&(this.childCount=data.childCount),void 0!==data.spaceCategoryAvailabilites&&(this.spaceCategoryAvailabilites=data.spaceCategoryAvailabilites),void 0!==data.revenue&&(this.revenue=data.revenue),void 0!==data.rateSuppressed&&(this.rateSuppressed=data.rateSuppressed),void 0!==data.payment&&(this.payment=data.payment),void 0!==data.company&&(this.company=data.company),void 0!==data.travelAgent&&(this.travelAgent=data.travelAgent),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.metadata&&(this.metadata=data.metadata),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt)}checkInTime(tz){return new Date(this.checkInDateTime).toLocaleString("default",{hour:"numeric",minute:"numeric",timeZone:tz})}checkOutTime(tz){return new Date(this.checkOutDateTime).toLocaleString("default",{hour:"numeric",minute:"numeric",timeZone:tz})}getNights(){const start=new Date(this.checkInDateTime),end=new Date(this.checkOutDateTime);let nights=Math.round((end-start)/864e5);return nights<=0&&(nights=1),nights}};Object.defineProperty(Reservation.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"reservation.json",title:"Reservation",type:"object",required:["type","status","checkInDateTime","checkOutDateTime"],properties:{id:{$ref:"definitions.json#/definitions/id"},driver:{$ref:"definitions.json#/definitions/driver"},primaryGuest:{type:"string"},type:{type:"string",default:"reservation",enum:["reservation"]},sharedGuests:{type:"array",items:{type:"string"}},spaceCategory:{type:"string"},space:{type:["string","null"]},previousSpace:{type:["string","null"],default:null,description:"Used when there was a space assigned and it changes"},status:{type:"string",enum:["reserved","checkedIn","checkedOut","cancelled","noShow","enquired","requested","optional"],description:" reserved - confirmed by both parties, before check-in\n checkedIn - checked in\n checkedOut - checked out\n cancelled - Cancelled\n noShow - No show\n enquired - Confirmed neither by the customer nor enterprise\n requested - Confirmed by the customer but not the enterprise (waitlist)\n optional - Confirmed by the enterprise but not the customer (holding)"},mobileCheckInSpaceCategoryChanged:{type:"boolean",description:"spaceCategory has changed from original."},mobileCheckInSpaceChanged:{type:"boolean"},mobileCheckInStatus:{type:"string",enum:["ready","blocked","preArrivalStepsRequired","spaceNotAssigned","spaceNotReady","checkInTimeNotStarted"]},mobileCheckInStatusMessage:{type:"string"},confirmationNumber:{type:"string"},expectedCheckInDateTime:{type:["string","object"],format:"date-time",description:"Expected arrival time of guest."},checkInDateTime:{type:["string","object"],format:"date-time"},checkOutDateTime:{type:["string","object"],format:"date-time"},adultCount:{type:"number",default:1,minimum:1},childCount:{type:"number",default:0},spaceCategoryAvailabilites:{type:"array",items:{type:"object",properties:{id:{type:"string"},price:{type:"number"},unit:{type:"string",enum:["night","stay","hour"]},isUpgrade:{type:"boolean"}}}},revenue:{$ref:"definitions.json#/definitions/revenue"},rateSuppressed:{type:"boolean"},payment:{type:"string"},company:{type:"string"},travelAgent:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"},metadata:{$ref:"definitions.json#/definitions/metadata"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}}}),Object.defineProperty(Reservation.prototype,"validator",{get:__name((function(){return validateReservation}),"get")});var Room=class extends Entity{static{__name(this,"Room")}constructor(data){super(data),this.id=data.id,void 0!==data.type&&(this.type=data.type),this.name=data.name,void 0!==data.floor&&(this.floor=data.floor),void 0!==data.dimmers&&(this.dimmers=data.dimmers),void 0!==data.switches&&(this.switches=data.switches),void 0!==data.thermostats&&(this.thermostats=data.thermostats),void 0!==data.locks&&(this.locks=data.locks),void 0!==data.windowCoverings&&(this.windowCoverings=data.windowCoverings),void 0!==data.courtesy&&(this.courtesy=data.courtesy),void 0!==data.cameras&&(this.cameras=data.cameras),void 0!==data.mediaSources&&(this.mediaSources=data.mediaSources),void 0!==data.motionSensors&&(this.motionSensors=data.motionSensors),void 0!==data.alarms&&(this.alarms=data.alarms),void 0!==data.occupiedAt&&(this.occupiedAt=data.occupiedAt),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt)}static getDevicePath(type){switch(type){case"tv":case"dvr":case"appleTv":case"discPlayer":case"mediaPlayer":case"uncontrolledDevice":case"mediaSource":return"mediaSources";case"courtesy":return"courtesy";case"switch":return"switches";case"dimmer":return"dimmers";case"thermostat":return"thermostats";case"lock":return"locks";case"windowCovering":return"windowCoverings";case"camera":return"cameras";case"motionSensor":return"motionSensors";case"alarm":return"alarms";default:throw new Error("Invalid device type:"+type)}}static getDeviceTypeFromPath(path){if(!["dimmers","switches","thermostats","locks","windowCoverings","courtesy","cameras","mediaSources","motionSensors","alarms"].includes(path))throw new Error("Invalid device path:"+path);switch(path){case"courtesy":return path;case"switches":return"switch";default:return path.slice(0,-1)}}get hasDimmer(){return this.dimmers?.length>0}get hasSwitch(){return this.switches?.length>0}get hasWindowCovering(){return this.windowCoverings?.length>0}get hasShade(){return this.hasWindowCovering}get hasThermostat(){return this.thermostats?.length>0}get hasClimate(){return this.hasThermostat}get hasLock(){return this.locks?.length>0}get hasCourtesy(){return this.courtesy?.length>0}get hasCamera(){return this.cameras?.length>0}get hasMedia(){return this.mediaSources?.length>0}get hasLight(){const hasDiscriminatorLight=this.switches?.some((sw=>"light"===sw.discriminator||"fan"===sw.discriminator));return this.hasDimmer||hasDiscriminatorLight}get hasAlarm(){return this.alarms?.length>0}get occupied(){const now=new Date,lastOccupied=new Date(this.occupiedAt);return now.getTime()-lastOccupied.getTime()<36e5}};Object.defineProperty(Room.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"room.json",title:"Room",description:"A room represents a physical space of controllable IoT devices",type:"object",required:["id","name"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["room"],default:"room"},name:{type:"string"},floor:{type:"string"},dimmers:{type:"array",default:[],items:{$ref:"dimmer.json"}},switches:{type:"array",default:[],items:{$ref:"switch.json"}},thermostats:{type:"array",default:[],items:{$ref:"thermostat.json"}},locks:{type:"array",default:[],items:{$ref:"lock.json"}},windowCoverings:{type:"array",default:[],items:{$ref:"windowCovering.json"}},courtesy:{type:"array",default:[],items:{$ref:"courtesy.json"}},cameras:{type:"array",default:[],items:{$ref:"camera.json"}},mediaSources:{type:"array",default:[],items:{$ref:"mediaSource.json"}},motionSensors:{type:"array",default:[],items:{$ref:"motionSensor.json"}},alarms:{type:"array",default:[],items:{$ref:"alarm.json"}},occupiedAt:{$ref:"definitions.json#/definitions/createdAt"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}},additionalProperties:!1}}),Object.defineProperty(Room.prototype,"validator",{get:__name((function(){return validateRoom}),"get")});var Scene=class extends Entity{static{__name(this,"Scene")}constructor(data){super(data),this.id=data.id,this.name=data.name,void 0!==data.description&&(this.description=data.description),this.type=data.type,void 0!==data.devices&&(this.devices=data.devices),void 0!==data.isDefault&&(this.isDefault=data.isDefault),void 0!==data.showOnUi&&(this.showOnUi=data.showOnUi)}};Object.defineProperty(Scene.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"scene.json",title:"Scene",description:"A room represents a physical space of controllable IoT devices",type:"object",required:["id","name","type"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},description:{type:"string"},type:{type:"string",enum:["scene"],default:"scene"},devices:{type:"object",properties:{switches:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},state:{$ref:"switch.json#/properties/state"}},default:[]}},dimmers:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},level:{$ref:"dimmer.json#/properties/level"}}},default:[]},windowCoverings:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},position:{$ref:"windowCovering.json#/properties/position"}}},default:[]},thermostats:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},hvacMode:{$ref:"thermostat.json#/properties/hvacMode"},setpoints:{$ref:"thermostat.json#/properties/setpoints"},fanMode:{$ref:"thermostat.json#/properties/fanMode"},setpointDelta:{type:"number"}}},default:[]},mediaSources:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},volume:{type:"number",minimum:0,maximum:100},commands:{type:"array",items:{type:"string"}}}}},locks:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},state:{$ref:"lock.json#/properties/state"},mode:{$ref:"lock.json#/properties/mode"}}}}},additionalProperties:!1},isDefault:{type:"boolean",default:!1},showOnUi:{type:"boolean",default:!0}}}}),Object.defineProperty(Scene.prototype,"validator",{get:__name((function(){return validateScene}),"get")});var ShortLink=class extends Entity{static{__name(this,"ShortLink")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.title&&(this.title=data.title),this.destination=data.destination,this.url=data.url,void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(ShortLink.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"shortLink.json",title:"Short Link",type:"object",required:["destination","url"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"shortLink",enum:["shortLink"]},title:{type:"string"},destination:{type:"string",format:"uri"},url:{type:"string",format:"uri"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(ShortLink.prototype,"validator",{get:__name((function(){return validateShortLink}),"get")});var SmsMessage=class extends Entity{static{__name(this,"SmsMessage")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),this.to=data.to,this.from=data.from,void 0!==data.media&&(this.media=data.media),this.status=data.status,void 0!==data.body&&(this.body=data.body),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.appData&&(this.appData=data.appData),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(SmsMessage.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"smsMessage.json",title:"Sms Message",type:"object",required:["to","from","status"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"smsMessage",enum:["smsMessage","whatsappMessage"]},to:{type:"string"},from:{type:"string"},media:{type:"string",format:"uri"},status:{type:"string",enum:["queued","accepted","sending","sent","failed","delivered","undelivered","receiving","received","read"]},body:{type:"string"},driver:{type:"string"},appData:{type:"object"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(SmsMessage.prototype,"validator",{get:__name((function(){return validateSmsMessage}),"get")});var Space=class extends Entity{static{__name(this,"Space")}constructor(data){super(data),this.id=data.id,this.name=data.name,this.type=data.type,this.discriminator=data.discriminator,void 0!==data.driver&&(this.driver=data.driver),void 0!==data.category&&(this.category=data.category),void 0!==data.rooms&&(this.rooms=data.rooms),void 0!==data.subGroups&&(this.subGroups=data.subGroups),void 0!==data.occupied&&(this.occupied=data.occupied),void 0!==data.inUse&&(this.inUse=data.inUse),void 0!==data.eco&&(this.eco=data.eco),void 0!==data.features&&(this.features=data.features),void 0!==data.maximumOccupancy&&(this.maximumOccupancy=data.maximumOccupancy),void 0!==data.housekeepingStatus&&(this.housekeepingStatus=data.housekeepingStatus),void 0!==data.serviceStatus&&(this.serviceStatus=data.serviceStatus),void 0!==data.systemId&&(this.systemId=data.systemId)}get floor(){const floors=new Set;return this.rooms.forEach((room=>{room.floor&&floors.add(room.floor)})),1==floors.size?[...floors][0]:void 0}get hasDimmer(){return this.rooms.some((room=>room.hasDimmer))}get hasSwitch(){return this.rooms.some((room=>room.hasSwitch))}get hasWindowCovering(){return this.rooms.some((room=>room.hasWindowCovering))}get hasThermostat(){return this.rooms.some((room=>room.hasThermostat))}get hasLock(){return this.rooms.some((room=>room.hasLock))}get hasCourtesy(){return this.rooms.some((room=>room.hasCourtesy))}get hasCamera(){return this.rooms.some((room=>room.hasCamera))}get hasAlarm(){return this.rooms.some((room=>room.hasAlarm))}get hasMedia(){return this.rooms.some((room=>room.hasMedia))}};Object.defineProperty(Space.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"space.json",title:"Space",type:"object",required:["id","name","type","discriminator"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string",minLength:1},type:{type:"string",default:"space",enum:["space"]},discriminator:{type:"string",enum:["classRoom","hotelRoom","office","building","commonArea","conferenceRoom","lobby","gym","pool","restaurant","unit"]},driver:{$ref:"definitions.json#/definitions/driver"},category:{type:"string",description:"This is the category id"},rooms:{type:"array",items:{type:"string"}},subGroups:{type:"array",items:{type:"string"}},occupied:{type:"boolean"},inUse:{type:"boolean"},eco:{type:"object",additionalProperties:!1,default:{active:!1,allowed:!1,previousState:null},properties:{active:{type:"boolean",default:!1},activatedAt:{type:["string","object"],format:"date-time"},allowed:{type:"boolean",default:!1},previousState:{type:["object","null"],properties:{thermostats:{type:"object",patternProperties:{".*":{type:"object",properties:{setpoints:{$ref:"thermostat.json#/properties/setpoints"}}}}}},additionalProperties:!1}}},features:{type:"array",items:{type:"string",enum:["pet"]}},maximumOccupancy:{type:"number",minimum:1},housekeepingStatus:{type:"string",enum:["clean","dirty","inspected","pickup"]},serviceStatus:{type:"string",enum:["inService","outOfOrder","outOfService"]},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Space.prototype,"validator",{get:__name((function(){return validateSpace}),"get")});var Switch=class extends Entity{static{__name(this,"Switch")}constructor(data){super(data),this.id=data.id,void 0!==data.name&&(this.name=data.name),this.type=data.type,void 0!==data.discriminator&&(this.discriminator=data.discriminator),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),this.driver=data.driver,void 0!==data.offline&&(this.offline=data.offline),this.state=data.state,void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Switch.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"switch.json",title:"Switch",description:"Any smart switch",type:"object",required:["id","type","state","driver"],properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},discriminator:{type:"string",enum:["light","fan","irrigation"]},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},state:{type:"string",enum:["on","off"]},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}}}}),Object.defineProperty(Switch.prototype,"validator",{get:__name((function(){return validateSwitch}),"get")});var SystemUser=class extends Entity{static{__name(this,"SystemUser")}constructor(data){super(data),this.id=data.id,void 0!==data.type&&(this.type=data.type),void 0!==data.driver&&(this.driver=data.driver),this.firstName=data.firstName,this.lastName=data.lastName,void 0!==data.phone&&(this.phone=data.phone),void 0!==data.email&&(this.email=data.email),void 0!==data.address&&(this.address=data.address),void 0!==data.photo&&(this.photo=data.photo),void 0!==data.jobTitle&&(this.jobTitle=data.jobTitle),void 0!==data.dob&&(this.dob=data.dob),void 0!==data.gender&&(this.gender=data.gender),void 0!==data.roles&&(this.roles=data.roles),void 0!==data.nationality&&(this.nationality=data.nationality),void 0!==data.notes&&(this.notes=data.notes),void 0!==data.files&&(this.files=data.files),void 0!==data.identifications&&(this.identifications=data.identifications),void 0!==data.payments&&(this.payments=data.payments),void 0!==data.revenue&&(this.revenue=data.revenue),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(SystemUser.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"systemUser.json",title:"System User",description:"A system user is a user that originated from an external 3rd party system.",type:"object",required:["id","firstName","lastName"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"systemUser",enum:["systemUser"]},driver:{$ref:"definitions.json#/definitions/driver"},firstName:{type:"string"},lastName:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},email:{type:["string","null"],format:"email"},address:{$ref:"definitions.json#/definitions/address"},photo:{type:"string"},jobTitle:{type:"string"},dob:{type:"string"},gender:{type:"string",enum:["male","female"]},roles:{type:"array",items:{type:"string",enum:["Guest","User","Manager","Maintenance","Administrator","SuperAdmin"]}},nationality:{type:"string",minLength:2,maxLength:2},notes:{type:"array",items:{type:"string"}},files:{type:"array",items:{$ref:"mediaFile.json#"}},identifications:{type:"array",items:{$ref:"identification.json#"}},payments:{type:"array",items:{$ref:"payment.json#"}},revenue:{$ref:"definitions.json#/definitions/revenue"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(SystemUser.prototype,"validator",{get:__name((function(){return validateSystemUser}),"get")});var Thermostat=class extends Entity{static{__name(this,"Thermostat")}constructor(data){super(data),this.id=data.id,void 0!==data.name&&(this.name=data.name),this.type=data.type,this.driver=data.driver,void 0!==data.offline&&(this.offline=data.offline),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.currentTemperature&&(this.currentTemperature=data.currentTemperature),void 0!==data.currentHumidity&&(this.currentHumidity=data.currentHumidity),this.hvacMode=data.hvacMode,this.hvacState=data.hvacState,this.fanMode=data.fanMode,this.fanState=data.fanState,this.temperatureScale=data.temperatureScale,void 0!==data.humidityScale&&(this.humidityScale=data.humidityScale),this.supportedHvacModes=data.supportedHvacModes,this.supportedFanModes=data.supportedFanModes,this.setpoints=data.setpoints,void 0!==data.minAutoDelta&&(this.minAutoDelta=data.minAutoDelta),void 0!==data.cycleRate&&(this.cycleRate=data.cycleRate),void 0!==data.batteryLevel&&(this.batteryLevel=data.batteryLevel),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Thermostat.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"thermostat.json",title:"Thermostat",description:"Any smart thermostat",type:"object",required:["id","type","hvacMode","fanMode","hvacState","fanState","setpoints","temperatureScale","supportedHvacModes","supportedFanModes","driver"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},name:{$ref:"definitions.json#/definitions/name"},type:{$ref:"definitions.json#/definitions/type",default:"thermostat"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},currentTemperature:{type:"number"},currentHumidity:{type:"number",minimum:0},hvacMode:{type:"string",$ref:"#/properties/supportedHvacModes/items"},hvacState:{type:["string","null"],enum:["cooling","heating","off",null]},fanMode:{type:"string",$ref:"#/properties/supportedFanModes/items"},fanState:{type:["string","null"],enum:["off","low","medium","high","on",null]},temperatureScale:{type:"string",enum:["celsius","fahrenheit"],default:"fahrenheit"},humidityScale:{type:["string","null"],enum:["absolute","relative",null]},supportedHvacModes:{type:"array",uniqueItems:!0,minItems:2,items:{enum:["cool","heat","auto","off"]}},supportedFanModes:{type:"array",uniqueItems:!0,items:{enum:["auto","low","medium","high","off","on"]}},setpoints:{type:"object",additionalProperties:!1,properties:{cool:{$ref:"#/$defs/setpoint"},heat:{$ref:"#/$defs/setpoint"},auto:{$ref:"#/$defs/setpoint"}}},minAutoDelta:{type:"number",default:3},cycleRate:{type:"number"},batteryLevel:{$ref:"definitions.json#/definitions/batteryLevel"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},$defs:{setpoint:{type:"object",additionalProperties:!1,properties:{value:{$ref:"#/$defs/setpointValue"},min:{$ref:"#/$defs/setpointMinMax"},max:{$ref:"#/$defs/setpointMinMax"}}},setpointValue:{type:"number",minimum:0,maximum:99},setpointMinMax:{type:["number","null"],minimum:0,maximum:99}}}}),Object.defineProperty(Thermostat.prototype,"validator",{get:__name((function(){return validateThermostat}),"get")});var Ticket=class extends Entity{static{__name(this,"Ticket")}constructor(data){super(data),this.id=data.id,void 0!==data.type&&(this.type=data.type),void 0!==data.number&&(this.number=data.number),void 0!==data.issueId&&(this.issueId=data.issueId),this.conversation=data.conversation,void 0!==data.subject&&(this.subject=data.subject),void 0!==data.openedBy&&(this.openedBy=data.openedBy),this.requester=data.requester,void 0!==data.assignedTo&&(this.assignedTo=data.assignedTo),void 0!==data.notify&&(this.notify=data.notify),void 0!==data.collaborators&&(this.collaborators=data.collaborators),void 0!==data.location&&(this.location=data.location),this.status=data.status,void 0!==data.priority&&(this.priority=data.priority),this.tags=data.tags,void 0!==data.department&&(this.department=data.department),void 0!==data.rating&&(this.rating=data.rating),void 0!==data.ratingComment&&(this.ratingComment=data.ratingComment),void 0!==data.tipAmount&&(this.tipAmount=data.tipAmount),void 0!==data.autoCloseAt&&(this.autoCloseAt=data.autoCloseAt),void 0!==data.scheduleDate&&(this.scheduleDate=data.scheduleDate),this.createdAt=data.createdAt,this.updatedAt=data.updatedAt,void 0!==data.solvedAt&&(this.solvedAt=data.solvedAt),void 0!==data.closedAt&&(this.closedAt=data.closedAt)}};Object.defineProperty(Ticket.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"ticket.json",title:"Ticket",description:"A ticket is a request from a user.",type:"object",required:["id","conversation","requester","status","tags","createdAt","updatedAt"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["ticket"],default:"ticket"},number:{type:"string"},issueId:{type:"string"},conversation:{type:"array",default:[],items:{type:"object",additionalProperties:!1,required:["id","discriminator","timestamp","body"],properties:{id:{type:"string"},discriminator:{type:"string",enum:["message","opened","assigned","rated","tipped","scheduled","collaboratorAdded","collaboratorRemoved","statusChanged","priorityChanged","scheduleDateChanged","locationChanged"],default:"message"},userId:{type:"string"},userName:{type:"string"},vendorId:{type:"string"},vendorName:{type:"string"},systemId:{type:"string"},systemName:{type:"string"},timestamp:{$ref:"definitions.json#/definitions/createdAt"},body:{type:"string"},parsedBody:{type:"object",additionalProperties:!1,properties:{text:{type:"string"},mentions:{type:"array",default:[],items:{type:"object",additionalProperties:!1,required:["discriminator","id","index","length","originalText"],properties:{id:{type:"string"},discriminator:{type:"string",enum:["user","vendor","system"]},index:{type:"integer"},length:{type:"integer"},originalText:{type:"string"}}}}}},readBy:{type:"array",default:[],items:{type:"string"}},media:{anyOf:[{$ref:"mediaFile.json"},{type:"null"}]}}}},subject:{type:"string"},openedBy:{type:"object",properties:{userId:{type:"string"},userName:{type:"string"},systemId:{type:"string"},systemName:{type:"string"}}},requester:{type:"object",properties:{systemId:{type:"string"},systemName:{type:"string"},systemPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},userId:{type:"string"},userName:{type:"string"},userPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},deviceId:{type:"string"},roomId:{type:"string"},reservationId:{type:"string"},spaceId:{type:"string"},spaceName:{type:"string"}}},assignedTo:{type:"object",properties:{userId:{type:"string"},userName:{type:"string"},userPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},vendorId:{type:"string"},vendorName:{type:"string"},vendorPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]}}},notify:{type:"array",description:"A list of entities to notify when this ticket is created or resolved.",default:[],items:{type:"object",required:["id","discriminator"],additionalProperties:!1,properties:{id:{type:"string",description:"The ID of the entity to notify."},discriminator:{type:"string",enum:["user"]}}}},collaborators:{type:"array",default:[],items:{type:"object",required:["id","name","discriminator"],additionalProperties:!1,properties:{id:{type:"string"},name:{type:"string"},discriminator:{type:"string",enum:["user","vendor"]}}}},location:{type:"object",required:["discriminator","name"],additionalProperties:!1,properties:{id:{type:"string"},discriminator:{type:"string",enum:["space","room","property","customText"]},name:{type:"string"}}},status:{type:"string",enum:["open","pending","solved","closed"],default:"open"},priority:{type:"string",enum:["low","normal","high"],default:"normal"},tags:{type:"array",default:[],items:{type:"string"}},department:{type:"string"},rating:{type:"number",minimum:0,maximum:5},ratingComment:{type:"string"},tipAmount:{type:"string"},autoCloseAt:{$ref:"definitions.json#/definitions/date"},scheduleDate:{$ref:"definitions.json#/definitions/date"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},solvedAt:{$ref:"definitions.json#/definitions/date"},closedAt:{$ref:"definitions.json#/definitions/date"}}}}),Object.defineProperty(Ticket.prototype,"validator",{get:__name((function(){return validateTicket}),"get")});var TimeSheet=class extends Entity{static{__name(this,"TimeSheet")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),this.userId=data.userId,this.day=data.day,void 0!==data.locked&&(this.locked=data.locked),void 0!==data.timeEntries&&(this.timeEntries=data.timeEntries)}};Object.defineProperty(TimeSheet.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"timeSheet.json",title:"Time Sheet",type:"object",required:["userId","day"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"timeSheet",enum:["timeSheet"]},userId:{$ref:"definitions.json#/definitions/id"},day:{type:["string","object"],format:"date-time"},locked:{type:"boolean",default:!1,description:"If true, the time sheet is locked and cannot be modified"},timeEntries:{type:"array",default:[],items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},discriminator:{type:"string",enum:["working","driving","meeting","break"]},start:{type:["string","object"],format:"date-time"},end:{type:["string","object"],format:"date-time"},comment:{type:"string"},ticketId:{type:"string"}},required:["start","discriminator"],additionalProperties:!1}}}}}),Object.defineProperty(TimeSheet.prototype,"validator",{get:__name((function(){return validateTimeSheet}),"get")});var User=class extends Entity{static{__name(this,"User")}constructor(data){super(data),this.id=data.id,void 0!==data.type&&(this.type=data.type),this.firstName=data.firstName,this.lastName=data.lastName,void 0!==data.phone&&(this.phone=data.phone),void 0!==data.phoneVerified&&(this.phoneVerified=data.phoneVerified),void 0!==data.email&&(this.email=data.email),void 0!==data.emailVerified&&(this.emailVerified=data.emailVerified),void 0!==data.whatsapp&&(this.whatsapp=data.whatsapp),void 0!==data.whatsappVerified&&(this.whatsappVerified=data.whatsappVerified),void 0!==data.address&&(this.address=data.address),void 0!==data.secretKey&&(this.secretKey=data.secretKey),void 0!==data.photo&&(this.photo=data.photo),void 0!==data.jobTitle&&(this.jobTitle=data.jobTitle),void 0!==data.dob&&(this.dob=data.dob),void 0!==data.gender&&(this.gender=data.gender),void 0!==data.nationality&&(this.nationality=data.nationality),void 0!==data.permissions&&(this.permissions=data.permissions),void 0!==data.preferences&&(this.preferences=data.preferences),void 0!==data.notes&&(this.notes=data.notes),void 0!==data.files&&(this.files=data.files),void 0!==data.identifications&&(this.identifications=data.identifications),void 0!==data.payments&&(this.payments=data.payments),void 0!==data.location&&(this.location=data.location),void 0!==data.reservations&&(this.reservations=data.reservations),void 0!==data.spaceName&&(this.spaceName=data.spaceName),void 0!==data.revenue&&(this.revenue=data.revenue),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt),void 0!==data.systems&&(this.systems=data.systems)}get fullName(){return`${this.firstName} ${this.lastName}`}get roles(){const roles=new Set;if(this.permissions)for(const permission of this.permissions)roles.add(permission.role);return Array.from(roles)}get isSuperAdmin(){return this.roles.includes("SuperAdmin")}get isAdmin(){return this.roles.includes("Admin")||this.roles.includes("Administrator")}get isManager(){return this.roles.includes("Manager")}get isUser(){return this.roles.includes("User")}};Object.defineProperty(User.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"user.json",title:"User",type:"object",required:["id","firstName","lastName"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"user"},firstName:{type:"string"},lastName:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},phoneVerified:{type:"boolean"},email:{type:["string","null"],format:"email"},emailVerified:{type:"boolean"},whatsapp:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},whatsappVerified:{type:"boolean"},address:{$ref:"definitions.json#/definitions/address"},secretKey:{type:"string"},photo:{$ref:"mediaFile.json#"},jobTitle:{type:"string"},dob:{type:"string"},gender:{type:"string",enum:["male","female"]},nationality:{type:"string",minLength:2,maxLength:2},permissions:{type:"array",default:[],items:{type:"object",required:["organizationId","propertyId","role"],properties:{organizationId:{type:"string",description:"The ID of the organization the permission is applies to."},propertyId:{type:"string",description:"The ID of the property the permission is applies to."},role:{type:"string",enum:["Guest","User","Agent","Manager","Maintenance","Administrator","SuperAdmin"]},timeTrackingEnabled:{type:"boolean",description:"Whether time tracking is enabled for this role."},department:{type:"string",description:"The department the user belongs to."},policyIds:{type:"array",items:{type:"string",description:"ID of a policy that is applied to this role."}},policies:{type:"array",items:{description:"A policy object populated from the policyIds array.",$ref:"policy.json"}}},additionalProperties:!1}},preferences:{type:"array",items:{type:"object",additionalProperties:!1,required:["organizationId","propertyId"],properties:{organizationId:{type:"string"},propertyId:{type:"string"},notifications:{type:"array",items:{type:"object",additionalProperties:!1,required:["discriminator","enabled"],properties:{discriminator:{type:"string",enum:["observerTicketCreated","observerTicketResolved"]},enabled:{type:"boolean"}}}}}}},notes:{type:"array",items:{type:"string"}},files:{type:"array",items:{$ref:"mediaFile.json#"}},identifications:{type:"array",items:{$ref:"identification.json#"}},payments:{type:"array",items:{$ref:"payment.json#"}},location:{type:"object",required:["accuracy","latitude","longitude","timestamp"],additionalProperties:!1,properties:{accuracy:{type:["number","null"]},latitude:{type:["number","null"]},longitude:{type:["number","null"]},timestamp:{type:["number","null"]}}},reservations:{type:"array",items:{$ref:"reservation.json"}},spaceName:{type:"string"},revenue:{$ref:"definitions.json#/definitions/revenue"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"},systems:{type:"array",default:[],items:{type:"object",properties:{systemId:{type:"string"},propertyId:{type:"string"},driver:{type:"string"}},required:["systemId","propertyId","driver"],additionalProperties:!1}}}}}),Object.defineProperty(User.prototype,"validator",{get:__name((function(){return validateUser}),"get")});var Vendor=class extends Entity{static{__name(this,"Vendor")}constructor(data){super(data),this.id=data.id,void 0!==data.type&&(this.type=data.type),this.name=data.name,void 0!==data.phone&&(this.phone=data.phone),this.email=data.email,void 0!==data.address&&(this.address=data.address),void 0!==data.photo&&(this.photo=data.photo),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt)}};Object.defineProperty(Vendor.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"vendor.json",title:"Vendor",type:"object",required:["id","name","email"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"vendor",enum:["vendor"]},name:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},email:{type:["string","null"],format:"email"},address:{$ref:"definitions.json#/definitions/address"},photo:{$ref:"mediaFile.json#"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}}}),Object.defineProperty(Vendor.prototype,"validator",{get:__name((function(){return validateVendor}),"get")});var WindowCovering=class extends Entity{static{__name(this,"WindowCovering")}constructor(data){super(data),this.id=data.id,void 0!==data.name&&(this.name=data.name),this.type=data.type,void 0!==data.discriminator&&(this.discriminator=data.discriminator),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),this.driver=data.driver,void 0!==data.offline&&(this.offline=data.offline),this.position=data.position,void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};function entityFactory(type){switch(type){case"reservation":return Reservation;case"mediaFile":return MediaFile;case"switch":return Switch;case"alarm":return Alarm;case"dimmer":return Dimmer;case"lock":return Lock;case"thermostat":return Thermostat;case"windowCovering":return WindowCovering;case"identification":return Identification;case"user":return User;case"systemUser":return SystemUser;case"policy":return Policy;case"courtesy":return Courtesy;case"camera":return Camera;case"motionSensor":return MotionSensor;case"mediaSource":return MediaSource;case"room":return Room;case"space":return Space;case"category":return Category;case"ticket":return Ticket;case"scene":return Scene;case"gateway":return Gateway;case"product":return Product;case"order":return Order;case"discoveredDevice":return DiscoveredDevice;case"deviceRouter":return DeviceRouter;case"credential":return Credential;case"shortLink":return ShortLink;case"energyReportShard":return EnergyReportShard;case"energyReport":return EnergyReport;case"smsMessage":return SmsMessage;case"emailMessage":return EmailMessage;case"announcement":return Announcement;case"timeSheet":return TimeSheet;case"property":return Property;case"organization":return Organization;case"issue":return Issue;case"vendor":return Vendor;case"log":return Log;default:throw new Error("Unknown entity type: "+type)}}function errorFactory(errName){switch(errName){case"AppError":return AppError;case"AuthenticationError":return AuthenticationError;case"AuthorizationError":return AuthorizationError;case"ConflictError":return ConflictError;case"DeviceCommError":return DeviceCommError;case"LoginError":return LoginError;case"NotFoundError":return NotFoundError;case"RequestError":return RequestError;case"SystemCommError":return SystemCommError;case"TokenExpiredError":return TokenExpiredError;case"UnprocessableRequestError":return UnprocessableRequestError;case"ValidationError":return ValidationError;default:return new Error("Invalid error name: "+errName)}}function eventFactory(eventName){const Event2=Object.values(events_exports).find((E=>E.prototype.name===eventName));if(!Event2)throw new Error("Invalid event name: "+eventName);return Event2}Object.defineProperty(WindowCovering.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"windowCovering.json",title:"Window Covering",description:"Any smart window covering",required:["id","type","position","driver"],additionalProperties:!1,type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type",default:"windowCovering"},discriminator:{type:"string",enum:["basic","variable"],default:"variable"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},position:{type:["number","null"],minimum:0,maximum:100},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}}}}),Object.defineProperty(WindowCovering.prototype,"validator",{get:__name((function(){return validateWindowCovering}),"get")}),__name(entityFactory,"entityFactory"),__name(errorFactory,"errorFactory"),__name(eventFactory,"eventFactory");//# sourceMappingURL=utils.cjs.map
|
|
1
|
+
var mod,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__name=(target,value)=>__defProp(target,"name",{value:value,configurable:!0}),__commonJS=(cb,mod)=>function __require(){return mod||(0,cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports},__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},require_fast_deep_equal=__commonJS({"node_modules/fast-deep-equal/index.js"(exports2,module2){"use strict";module2.exports=__name((function equal(a,b){if(a===b)return!0;if(a&&b&&"object"==typeof a&&"object"==typeof b){if(a.constructor!==b.constructor)return!1;var length,i,keys;if(Array.isArray(a)){if((length=a.length)!=b.length)return!1;for(i=length;0!=i--;)if(!equal(a[i],b[i]))return!1;return!0}if(a.constructor===RegExp)return a.source===b.source&&a.flags===b.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===b.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===b.toString();if((length=(keys=Object.keys(a)).length)!==Object.keys(b).length)return!1;for(i=length;0!=i--;)if(!Object.prototype.hasOwnProperty.call(b,keys[i]))return!1;for(i=length;0!=i--;){var key=keys[i];if(!equal(a[key],b[key]))return!1}return!0}return a!=a&&b!=b}),"equal")}}),require_equal=__commonJS({"node_modules/ajv/dist/runtime/equal.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0});var equal=require_fast_deep_equal();equal.code='require("ajv/dist/runtime/equal").default',exports2.default=equal}}),require_ucs2length=__commonJS({"node_modules/ajv/dist/runtime/ucs2length.js"(exports2){"use strict";function ucs2length(str){const len=str.length;let value,length=0,pos=0;for(;pos<len;)length++,value=str.charCodeAt(pos++),value>=55296&&value<=56319&&pos<len&&(value=str.charCodeAt(pos),56320==(64512&value)&&pos++);return length}Object.defineProperty(exports2,"__esModule",{value:!0}),__name(ucs2length,"ucs2length"),exports2.default=ucs2length,ucs2length.code='require("ajv/dist/runtime/ucs2length").default'}}),require_formats=__commonJS({"node_modules/ajv-formats/dist/formats.js"(exports2){"use strict";function fmtDef(validate,compare){return{validate:validate,compare:compare}}function isLeapYear(year){return year%4==0&&(year%100!=0||year%400==0)}Object.defineProperty(exports2,"__esModule",{value:!0}),exports2.formatNames=exports2.fastFormats=exports2.fullFormats=void 0,__name(fmtDef,"fmtDef"),exports2.fullFormats={date:fmtDef(date,compareDate),time:fmtDef(getTime(!0),compareTime),"date-time":fmtDef(getDateTime(!0),compareDateTime),"iso-time":fmtDef(getTime(),compareIsoTime),"iso-date-time":fmtDef(getDateTime(),compareIsoDateTime),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:uri,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:regex,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:byte,int32:{type:"number",validate:validateInt32},int64:{type:"number",validate:validateInt64},float:{type:"number",validate:validateNumber},double:{type:"number",validate:validateNumber},password:!0,binary:!0},exports2.fastFormats={...exports2.fullFormats,date:fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,compareDate),time:fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareTime),"date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareDateTime),"iso-time":fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareIsoTime),"iso-date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareIsoDateTime),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},exports2.formatNames=Object.keys(exports2.fullFormats),__name(isLeapYear,"isLeapYear");var DATE=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,DAYS=[0,31,28,31,30,31,30,31,31,30,31,30,31];function date(str){const matches=DATE.exec(str);if(!matches)return!1;const year=+matches[1],month=+matches[2],day=+matches[3];return month>=1&&month<=12&&day>=1&&day<=(2===month&&isLeapYear(year)?29:DAYS[month])}function compareDate(d1,d2){if(d1&&d2)return d1>d2?1:d1<d2?-1:0}__name(date,"date"),__name(compareDate,"compareDate");var TIME=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function getTime(strictTimeZone){return __name((function time(str){const matches=TIME.exec(str);if(!matches)return!1;const hr=+matches[1],min=+matches[2],sec=+matches[3],tz=matches[4],tzSign="-"===matches[5]?-1:1,tzH=+(matches[6]||0),tzM=+(matches[7]||0);if(tzH>23||tzM>59||strictTimeZone&&!tz)return!1;if(hr<=23&&min<=59&&sec<60)return!0;const utcMin=min-tzM*tzSign,utcHr=hr-tzH*tzSign-(utcMin<0?1:0);return(23===utcHr||-1===utcHr)&&(59===utcMin||-1===utcMin)&&sec<61}),"time")}function compareTime(s1,s2){if(!s1||!s2)return;const t1=new Date("2020-01-01T"+s1).valueOf(),t2=new Date("2020-01-01T"+s2).valueOf();return t1&&t2?t1-t2:void 0}function compareIsoTime(t1,t2){if(!t1||!t2)return;const a1=TIME.exec(t1),a2=TIME.exec(t2);return a1&&a2?(t1=a1[1]+a1[2]+a1[3])>(t2=a2[1]+a2[2]+a2[3])?1:t1<t2?-1:0:void 0}__name(getTime,"getTime"),__name(compareTime,"compareTime"),__name(compareIsoTime,"compareIsoTime");var DATE_TIME_SEPARATOR=/t|\s/i;function getDateTime(strictTimeZone){const time=getTime(strictTimeZone);return __name((function date_time(str){const dateTime=str.split(DATE_TIME_SEPARATOR);return 2===dateTime.length&&date(dateTime[0])&&time(dateTime[1])}),"date_time")}function compareDateTime(dt1,dt2){if(!dt1||!dt2)return;const d1=new Date(dt1).valueOf(),d2=new Date(dt2).valueOf();return d1&&d2?d1-d2:void 0}function compareIsoDateTime(dt1,dt2){if(!dt1||!dt2)return;const[d1,t1]=dt1.split(DATE_TIME_SEPARATOR),[d2,t2]=dt2.split(DATE_TIME_SEPARATOR),res=compareDate(d1,d2);return void 0!==res?res||compareTime(t1,t2):void 0}__name(getDateTime,"getDateTime"),__name(compareDateTime,"compareDateTime"),__name(compareIsoDateTime,"compareIsoDateTime");var NOT_URI_FRAGMENT=/\/|:/,URI=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function uri(str){return NOT_URI_FRAGMENT.test(str)&&URI.test(str)}__name(uri,"uri");var BYTE=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function byte(str){return BYTE.lastIndex=0,BYTE.test(str)}__name(byte,"byte");function validateInt32(value){return Number.isInteger(value)&&value<=2147483647&&value>=-2147483648}function validateInt64(value){return Number.isInteger(value)}function validateNumber(){return!0}__name(validateInt32,"validateInt32"),__name(validateInt64,"validateInt64"),__name(validateNumber,"validateNumber");var Z_ANCHOR=/[^\\]\\Z/;function regex(str){if(Z_ANCHOR.test(str))return!1;try{return new RegExp(str),!0}catch(e){return!1}}__name(regex,"regex")}}),utils_exports={};__export(utils_exports,{entityFactory:()=>entityFactory,errorFactory:()=>errorFactory,eventFactory:()=>eventFactory}),module.exports=(mod=utils_exports,((to,from,except,desc)=>{if(from&&"object"==typeof from||"function"==typeof from)for(let key of __getOwnPropNames(from))__hasOwnProp.call(to,key)||key===except||__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to})(__defProp({},"__esModule",{value:!0}),mod));var AppError=class _AppError extends Error{static{__name(this,"AppError")}constructor(message="Internal Server Error",options){super(message,options),this.type=this.constructor.name,this.statusCode=500,this.name="AppError",Object.setPrototypeOf(this,_AppError.prototype)}},AuthenticationError=class _AuthenticationError extends AppError{static{__name(this,"AuthenticationError")}constructor(message="Authentication Error",options={}){super(message,options),this.statusCode=401,this.name="AuthenticationError",Object.setPrototypeOf(this,_AuthenticationError.prototype)}},AuthorizationError=class _AuthorizationError extends AppError{static{__name(this,"AuthorizationError")}constructor(message="Authorization Error",options={}){super(message,options),this.statusCode=403,this.name="AuthorizationError",Object.setPrototypeOf(this,_AuthorizationError.prototype)}},ConflictError=class _ConflictError extends AppError{static{__name(this,"ConflictError")}constructor(message="Bad Request",options={}){super(message,options),this.statusCode=409,this.name="ConflictError",Object.setPrototypeOf(this,_ConflictError.prototype)}},DeviceCommError=class _DeviceCommError extends AppError{static{__name(this,"DeviceCommError")}constructor(message="Device Communication Error",options={}){super(message,options),this.statusCode=503,this.name="DeviceCommError",Object.setPrototypeOf(this,_DeviceCommError.prototype)}},LoginError=class _LoginError extends AppError{static{__name(this,"LoginError")}constructor(message="Invalid Login information provided",options={}){super(message,options),this.statusCode=401,this.name="LoginError",Object.setPrototypeOf(this,_LoginError.prototype)}},NotFoundError=class _NotFoundError extends AppError{static{__name(this,"NotFoundError")}constructor(message="Resource Not Found",options={}){super(message,options),this.statusCode=404,this.name="NotFoundError",Object.setPrototypeOf(this,_NotFoundError.prototype)}},RequestError=class _RequestError extends AppError{static{__name(this,"RequestError")}constructor(message="Bad Request",options={}){super(message,options),this.statusCode=400,this.name="RequestError",Object.setPrototypeOf(this,_RequestError.prototype)}},SystemCommError=class _SystemCommError extends AppError{static{__name(this,"SystemCommError")}constructor(message="System Communication Error",options={}){super(message,options),this.statusCode=503,this.name="SystemCommError",Object.setPrototypeOf(this,_SystemCommError.prototype)}},TokenExpiredError=class _TokenExpiredError extends AppError{static{__name(this,"TokenExpiredError")}constructor(message="Token Expired",options={}){super(message,options),this.statusCode=401,this.name="TokenExpiredError",Object.setPrototypeOf(this,_TokenExpiredError.prototype)}},UnprocessableRequestError=class _UnprocessableRequestError extends AppError{static{__name(this,"UnprocessableRequestError")}constructor(message="Unprocessable Request Error",options={}){super(message,options),this.statusCode=422,this.name="UnprocessableRequestError",Object.setPrototypeOf(this,_UnprocessableRequestError.prototype)}},ValidationError=class _ValidationError extends AppError{static{__name(this,"ValidationError")}constructor(message="Validation Error",options={}){super(message,options),this.statusCode=400,this.name="ValidationError",Object.setPrototypeOf(this,_ValidationError.prototype)}},events_exports={};__export(events_exports,{ApplicationInUse:()=>ApplicationInUse,ApplicationOutOfUse:()=>ApplicationOutOfUse,EmailEvent:()=>EmailEvent,Event:()=>Event,ReservationCheckedIn:()=>ReservationCheckedIn,ReservationCheckedOut:()=>ReservationCheckedOut,ReservationSpaceChanged:()=>ReservationSpaceChanged,SMSEvent:()=>SMSEvent,SceneSet:()=>SceneSet,ShortLinkCreated:()=>ShortLinkCreated,SystemAlarmUpdated:()=>SystemAlarmUpdated,SystemCameraUpdated:()=>SystemCameraUpdated,SystemCategoryUpdated:()=>SystemCategoryUpdated,SystemCourtesyUpdated:()=>SystemCourtesyUpdated,SystemCredentialUpdated:()=>SystemCredentialUpdated,SystemDimmerUpdated:()=>SystemDimmerUpdated,SystemEntityDeleted:()=>SystemEntityDeleted,SystemGatewayUpdated:()=>SystemGatewayUpdated,SystemLockUpdated:()=>SystemLockUpdated,SystemMediaSourceUpdated:()=>SystemMediaSourceUpdated,SystemMotionSensorUpdated:()=>SystemMotionSensorUpdated,SystemOrganizationUpdated:()=>SystemOrganizationUpdated,SystemProductUpdated:()=>SystemProductUpdated,SystemPropertyUpdated:()=>SystemPropertyUpdated,SystemReservationUpdated:()=>SystemReservationUpdated,SystemSpaceUpdated:()=>SystemSpaceUpdated,SystemSwitchUpdated:()=>SystemSwitchUpdated,SystemThermostatUpdated:()=>SystemThermostatUpdated,SystemUserUpdated:()=>SystemUserUpdated,SystemWindowCoveringUpdated:()=>SystemWindowCoveringUpdated});var amqpExchanges_DriverEvents={name:"kohost.events.drivers",type:"topic",options:{durable:!0}},amqpExchanges_AppEvents={name:"kohost.events.app",type:"topic",options:{durable:!0}},Event=class{static{__name(this,"Event")}constructor(data,context={}){if(this.data=[],this.context=context,!data)throw new Error("Event data is required");if("object"!=typeof data&&!Array.isArray(data))throw new Error("Event data must be an object or array");Array.isArray(data)?this.data=data:this.data=[data]}get organizationId(){return this.context.organizationId||"*"}get propertyId(){return this.context.propertyId||"*"}static get type(){return"Event"}static get exchange(){return amqpExchanges_DriverEvents.name}static get entity(){return""}build(){return{data:{...this.data}}}get routingKey(){return`${this.organizationId}.${this.propertyId}.${this.constructor.entity}.${this.constructor.name}`}},ApplicationInUse=class extends Event{constructor(data={},context){super(data,context)}static get name(){return"ApplicationInUse"}static get entity(){return"app"}static get exchange(){return amqpExchanges_AppEvents.name}},ApplicationOutOfUse=class extends Event{constructor(data={},context={}){super(data,context)}static get name(){return"ApplicationOutOfUse"}static get entity(){return"app"}static get exchange(){return amqpExchanges_AppEvents.name}},EmailEvent=class extends Event{constructor(email,context){super(email,context)}static get name(){return"EmailEvent"}static get entity(){return"emailMessage"}},ReservationCheckedIn=class extends Event{constructor(reservation,context){super(reservation,context)}static get name(){return"ReservationCheckedIn"}static get entity(){return"reservation"}static get exchange(){return amqpExchanges_AppEvents.name}},ReservationCheckedOut=class extends Event{constructor(reservation,context){super(reservation,context)}static get name(){return"ReservationCheckedOut"}static get entity(){return"reservation"}static get exchange(){return amqpExchanges_AppEvents.name}},ReservationSpaceChanged=class extends Event{constructor(reservation,context){super(reservation,context)}static get name(){return"ReservationSpaceChanged"}static get entity(){return"reservation"}static get exchange(){return amqpExchanges_AppEvents.name}},SceneSet=class extends Event{constructor(scene,context){super(scene,context)}static get name(){return"SceneSet"}static get entity(){return"scene"}},ShortLinkCreated=class extends Event{constructor(shortLink,context){super(shortLink,context)}static get name(){return"ShortLinkCreated"}static get entity(){return"shortLink"}},SMSEvent=class extends Event{constructor(sms,context){super(sms,context)}static get name(){return"SMSEvent"}static get entity(){return"smsMessage"}},SystemAlarmUpdated=class extends Event{constructor(alarm,context){super(alarm,context)}static get name(){return"SystemAlarmUpdated"}static get entity(){return"alarm"}},SystemCameraUpdated=class extends Event{constructor(camera,context){super(camera,context)}static get name(){return"SystemCameraUpdated"}static get entity(){return"camera"}},SystemCategoryUpdated=class extends Event{constructor(category,context){super(category,context)}static get name(){return"SystemCategoryUpdated"}static get entity(){return"category"}},SystemCourtesyUpdated=class extends Event{constructor(courtesy,context){super(courtesy,context)}static get name(){return"SystemCourtesyUpdated"}static get entity(){return"courtesy"}},SystemCredentialUpdated=class extends Event{constructor(cred,context){super(cred,context)}static get name(){return"SystemCredentialUpdated"}static get entity(){return"credential"}},SystemDimmerUpdated=class extends Event{constructor(dimmer,context){super(dimmer,context)}static get name(){return"SystemDimmerUpdated"}static get entity(){return"dimmer"}},SystemEntityDeleted=class extends Event{constructor(data,context){super(data,context)}static get name(){return"SystemEntityDeleted"}static get entity(){return"entity"}},SystemGatewayUpdated=class extends Event{constructor(gateway,context){super(gateway,context)}static get name(){return"SystemGatewayUpdated"}static get entity(){return"gateway"}},SystemLockUpdated=class extends Event{constructor(lock,context){super(lock,context)}static get name(){return"SystemLockUpdated"}static get entity(){return"lock"}},SystemMediaSourceUpdated=class extends Event{constructor(mediaSource,context){super(mediaSource,context)}static get name(){return"SystemMediaSourceUpdated"}static get entity(){return"mediaSource"}},SystemMotionSensorUpdated=class extends Event{constructor(motion,context){super(motion,context)}static get name(){return"SystemMotionSensorUpdated"}static get entity(){return"motionSensor"}},SystemOrganizationUpdated=class extends Event{constructor(organization,context){super(organization,context)}static get name(){return"SystemOrganizationUpdated"}static get entity(){return"organization"}},SystemProductUpdated=class extends Event{constructor(product,context){super(product,context)}static get name(){return"SystemProductUpdated"}static get entity(){return"product"}},SystemPropertyUpdated=class extends Event{constructor(property,context){super(property,context)}static get name(){return"SystemPropertyUpdated"}static get entity(){return"property"}},SystemReservationUpdated=class extends Event{constructor(reservation,context){super(reservation,context)}static get name(){return"SystemReservationUpdated"}static get entity(){return"reservation"}},SystemSpaceUpdated=class extends Event{constructor(space,context){super(space,context)}static get name(){return"SystemSpaceUpdated"}static get entity(){return"space"}},SystemSwitchUpdated=class extends Event{constructor(_switch,context){super(_switch,context)}static get name(){return"SystemSwitchUpdated"}static get entity(){return"switch"}},SystemThermostatUpdated=class extends Event{constructor(thermostat,context){super(thermostat,context)}static get name(){return"SystemThermostatUpdated"}static get entity(){return"thermostat"}},SystemUserUpdated=class extends Event{constructor(user,context){super(user,context)}static get name(){return"SystemUserUpdated"}static get entity(){return"user"}},SystemWindowCoveringUpdated=class extends Event{constructor(wc,context){super(wc,context)}static get name(){return"SystemWindowCoveringUpdated"}static get entity(){return"windowCovering"}},Entity=class{static{__name(this,"Entity")}constructor(data){if(!this.schema)throw new Error("Schema is not defined");if(!this.validator)throw new Error("Validator is not defined");this.#validate(data)}get schemaProperties(){return Object.keys(this.validator.schema.properties)}#validate(data){if(!this.validator(data))throw new ValidationError(`Invalid ${this.constructor.name}`,{cause:this.validator.errors})}},validateAlarm=validate10,schema11={$schema:"http://json-schema.org/draft-07/schema",$id:"alarm.json",title:"Alarm",description:"Any smart alarm system",type:"object",required:["id","type","areas","zones","driver"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string",description:"Name of the alarm"},offline:{type:"boolean"},type:{type:"string",enum:["alarm"],default:"alarm"},systemId:{$ref:"definitions.json#/definitions/systemId"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},areas:{type:"array",items:{type:"object",properties:{number:{type:"number"},name:{type:"string"},securityMode:{type:["string","null"],enum:["arming","disarming","armed","disarmed","alarm",null]}},additionalProperties:!1}},zones:{type:"array",items:{type:"object",properties:{number:{type:"number",minimum:0},name:{type:"string"},secure:{type:["boolean","null"]},bypassed:{type:["boolean","null"]}},additionalProperties:!1}},chime:{type:"boolean",description:"Reflects whether console chime is enabled"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"},address:{$ref:"definitions.json#/definitions/address"}}},schema15={type:"array",uniqueItems:!0,items:{enum:["button 1","button 2","button 3","button 4","button 5","idle","powerHasBeedApplied","acMainsDisconnected","acMainsReconnected","replaceBatterySoon","replaceBatteryNow","batteryOk","hardwareFailure","softwareFailure","hardwareFailureWithCode","softwareFailureWithCode","motionDetection","airFilterNeedsCleaned","airFilterNeedsReplaced","smokeDetected","outsideSafeTemperatureRange","outsideSafeHumidityRange","scheduleMaintenance","doorAjar","communicationFailure","communicationOk","burglarAlarm","fireAlarm"]}},schema18={type:"string",description:"Driver used to communicate with the object.",enum:["adlink","aws-kinesis","butler","crestron","dell","dmp","doorbird","dormakaba","dsc","ecobee","epson","geovision-rs","geovision-as-manager","honeywell-vista","igor","inncom","isapi","kohost-k7","kohost","lg","lg-webos","lapi","lirc","mews","mht","paxton","pelican-wireless","power-shades","rachio","rebrandly","relay","rtsp","salto","salto-irn","samsung","se","sendgrid","sonifi","stay-n-touch","storable","twilio","unifi","valcom","vivotek","vizio","wisenet","cloudflare-images","cloudflare-stream","insperia-privacy"]},func2=Object.prototype.hasOwnProperty,func0=require_equal().default,func4=require_ucs2length().default,schema16={type:["object","null"],properties:{name:{type:"string",$ref:"#/definitions/supportedNotifications/items"},timestamp:{type:"number",minimum:1655907956593},description:{type:"string"}}},schema17={enum:["button 1","button 2","button 3","button 4","button 5","idle","powerHasBeedApplied","acMainsDisconnected","acMainsReconnected","replaceBatterySoon","replaceBatteryNow","batteryOk","hardwareFailure","softwareFailure","hardwareFailureWithCode","softwareFailureWithCode","motionDetection","airFilterNeedsCleaned","airFilterNeedsReplaced","smokeDetected","outsideSafeTemperatureRange","outsideSafeHumidityRange","scheduleMaintenance","doorAjar","communicationFailure","communicationOk","burglarAlarm","fireAlarm"]};function validate12(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate12.errors=vErrors,0===errors}function validate10(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="alarm"),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.areas){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"areas"},message:"must have required property 'areas'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.zones){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"zones"},message:"must have required property 'zones'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.driver){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}for(const key0 in data)if(!func2.call(schema11.properties,key0)){const err5={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err7={};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(_errs6===errors){const err8={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err9={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err10={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}let data3=data.type;if("string"!=typeof data3){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("alarm"!==data3){const err12={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema11.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err13={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.supportedNotifications){let data5=data.supportedNotifications;if(Array.isArray(data5)){const len0=data5.length;for(let i0=0;i0<len0;i0++){let data6=data5[i0];if("button 1"!==data6&&"button 2"!==data6&&"button 3"!==data6&&"button 4"!==data6&&"button 5"!==data6&&"idle"!==data6&&"powerHasBeedApplied"!==data6&&"acMainsDisconnected"!==data6&&"acMainsReconnected"!==data6&&"replaceBatterySoon"!==data6&&"replaceBatteryNow"!==data6&&"batteryOk"!==data6&&"hardwareFailure"!==data6&&"softwareFailure"!==data6&&"hardwareFailureWithCode"!==data6&&"softwareFailureWithCode"!==data6&&"motionDetection"!==data6&&"airFilterNeedsCleaned"!==data6&&"airFilterNeedsReplaced"!==data6&&"smokeDetected"!==data6&&"outsideSafeTemperatureRange"!==data6&&"outsideSafeHumidityRange"!==data6&&"scheduleMaintenance"!==data6&&"doorAjar"!==data6&&"communicationFailure"!==data6&&"communicationOk"!==data6&&"burglarAlarm"!==data6&&"fireAlarm"!==data6){const err14={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}let j0,i1=data5.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data5[i1],data5[j0])){const err15={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++;break outer0}}else{const err16={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.notification&&(validate12(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate12.errors:vErrors.concat(validate12.errors),errors=vErrors.length)),void 0!==data.driver){let data8=data.driver;if("string"!=typeof data8){const err17={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if("adlink"!==data8&&"aws-kinesis"!==data8&&"butler"!==data8&&"crestron"!==data8&&"dell"!==data8&&"dmp"!==data8&&"doorbird"!==data8&&"dormakaba"!==data8&&"dsc"!==data8&&"ecobee"!==data8&&"epson"!==data8&&"geovision-rs"!==data8&&"geovision-as-manager"!==data8&&"honeywell-vista"!==data8&&"igor"!==data8&&"inncom"!==data8&&"isapi"!==data8&&"kohost-k7"!==data8&&"kohost"!==data8&&"lg"!==data8&&"lg-webos"!==data8&&"lapi"!==data8&&"lirc"!==data8&&"mews"!==data8&&"mht"!==data8&&"paxton"!==data8&&"pelican-wireless"!==data8&&"power-shades"!==data8&&"rachio"!==data8&&"rebrandly"!==data8&&"relay"!==data8&&"rtsp"!==data8&&"salto"!==data8&&"salto-irn"!==data8&&"samsung"!==data8&&"se"!==data8&&"sendgrid"!==data8&&"sonifi"!==data8&&"stay-n-touch"!==data8&&"storable"!==data8&&"twilio"!==data8&&"unifi"!==data8&&"valcom"!==data8&&"vivotek"!==data8&&"vizio"!==data8&&"wisenet"!==data8&&"cloudflare-images"!==data8&&"cloudflare-stream"!==data8&&"insperia-privacy"!==data8){const err18={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data.areas){let data9=data.areas;if(Array.isArray(data9)){const len1=data9.length;for(let i2=0;i2<len1;i2++){let data10=data9[i2];if(data10&&"object"==typeof data10&&!Array.isArray(data10)){for(const key1 in data10)if("number"!==key1&&"name"!==key1&&"securityMode"!==key1){const err19={instancePath:instancePath+"/areas/"+i2,schemaPath:"#/properties/areas/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data10.number&&"number"!=typeof data10.number){const err20={instancePath:instancePath+"/areas/"+i2+"/number",schemaPath:"#/properties/areas/items/properties/number/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data10.name&&"string"!=typeof data10.name){const err21={instancePath:instancePath+"/areas/"+i2+"/name",schemaPath:"#/properties/areas/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0!==data10.securityMode){let data13=data10.securityMode;if("string"!=typeof data13&&null!==data13){const err22={instancePath:instancePath+"/areas/"+i2+"/securityMode",schemaPath:"#/properties/areas/items/properties/securityMode/type",keyword:"type",params:{type:schema11.properties.areas.items.properties.securityMode.type},message:"must be string,null"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if("arming"!==data13&&"disarming"!==data13&&"armed"!==data13&&"disarmed"!==data13&&"alarm"!==data13&&null!==data13){const err23={instancePath:instancePath+"/areas/"+i2+"/securityMode",schemaPath:"#/properties/areas/items/properties/securityMode/enum",keyword:"enum",params:{allowedValues:schema11.properties.areas.items.properties.securityMode.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}}else{const err24={instancePath:instancePath+"/areas/"+i2,schemaPath:"#/properties/areas/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}}else{const err25={instancePath:instancePath+"/areas",schemaPath:"#/properties/areas/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}if(void 0!==data.zones){let data14=data.zones;if(Array.isArray(data14)){const len2=data14.length;for(let i3=0;i3<len2;i3++){let data15=data14[i3];if(data15&&"object"==typeof data15&&!Array.isArray(data15)){for(const key2 in data15)if("number"!==key2&&"name"!==key2&&"secure"!==key2&&"bypassed"!==key2){const err26={instancePath:instancePath+"/zones/"+i3,schemaPath:"#/properties/zones/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key2},message:"must NOT have additional properties"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data15.number){let data16=data15.number;if("number"==typeof data16){if(data16<0||isNaN(data16)){const err27={instancePath:instancePath+"/zones/"+i3+"/number",schemaPath:"#/properties/zones/items/properties/number/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}else{const err28={instancePath:instancePath+"/zones/"+i3+"/number",schemaPath:"#/properties/zones/items/properties/number/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}if(void 0!==data15.name&&"string"!=typeof data15.name){const err29={instancePath:instancePath+"/zones/"+i3+"/name",schemaPath:"#/properties/zones/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data15.secure){let data18=data15.secure;if("boolean"!=typeof data18&&null!==data18){const err30={instancePath:instancePath+"/zones/"+i3+"/secure",schemaPath:"#/properties/zones/items/properties/secure/type",keyword:"type",params:{type:schema11.properties.zones.items.properties.secure.type},message:"must be boolean,null"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}if(void 0!==data15.bypassed){let data19=data15.bypassed;if("boolean"!=typeof data19&&null!==data19){const err31={instancePath:instancePath+"/zones/"+i3+"/bypassed",schemaPath:"#/properties/zones/items/properties/bypassed/type",keyword:"type",params:{type:schema11.properties.zones.items.properties.bypassed.type},message:"must be boolean,null"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}}else{const err32={instancePath:instancePath+"/zones/"+i3,schemaPath:"#/properties/zones/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}}else{const err33={instancePath:instancePath+"/zones",schemaPath:"#/properties/zones/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}if(void 0!==data.chime&&"boolean"!=typeof data.chime){const err34={instancePath:instancePath+"/chime",schemaPath:"#/properties/chime/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(void 0!==data.watts){let data21=data.watts;if("number"==typeof data21){if(data21<0||isNaN(data21)){const err35={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}}else{const err36={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err37={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err38={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err39={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err40={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if(void 0!==data.address){let data26=data.address;if(data26&&"object"==typeof data26&&!Array.isArray(data26)){if(void 0!==data26.id&&"string"!=typeof data26.id){const err41={instancePath:instancePath+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}if(void 0!==data26.line1&&"string"!=typeof data26.line1){const err42={instancePath:instancePath+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(void 0!==data26.line2&&"string"!=typeof data26.line2){const err43={instancePath:instancePath+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}if(void 0!==data26.line3&&"string"!=typeof data26.line3){const err44={instancePath:instancePath+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}if(void 0!==data26.city&&"string"!=typeof data26.city){const err45={instancePath:instancePath+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}if(void 0!==data26.state&&"string"!=typeof data26.state){const err46={instancePath:instancePath+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}if(void 0!==data26.postalCode&&"string"!=typeof data26.postalCode){const err47={instancePath:instancePath+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}if(void 0!==data26.countryCode){let data34=data26.countryCode;if("string"==typeof data34){if(func4(data34)>2){const err48={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}if(func4(data34)<2){const err49={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}}else{const err50={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}}}else{const err51={instancePath:instancePath+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}}}else{const err52={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}return validate10.errors=vErrors,0===errors}__name(validate12,"validate12"),__name(validate10,"validate10");var validateAnnouncement=validate14,schema21={$schema:"http://json-schema.org/draft-07/schema",$id:"announcement.json",title:"Announcement",description:"Announcement message sent to users",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["announcement"],default:"announcement"},users:{type:"array",items:{type:"string"},minItems:1},group:{type:"string"},body:{type:"string"},media:{$ref:"mediaFile.json"},sentBy:{type:"string"},tags:{type:"array",items:{type:"string"}},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"}},additionalProperties:!1},schema25={type:["string","object"],format:"date-time"},schema23={$schema:"http://json-schema.org/draft-07/schema",$id:"mediaFile.json",title:"Media File",description:"Any media file",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"mediaFile",enum:["mediaFile"]},name:{type:"string"},fileHash:{type:"string"},category:{type:"string",description:"This is the category id"},mimeType:{type:"string",enum:["image/*","image/jpeg","image/png","image/gif","image/webp","image/avif","image/svg+xml","application/pdf"]},data:{type:"string"},url:{type:"string",format:"uri"},width:{type:"integer",minimum:0},height:{type:"integer",minimum:0},size:{type:"integer",minimum:0,description:"Size in bytes"},uploadUrl:{type:"string",format:"uri"},uploadUrlExpires:{$ref:"definitions.json#/definitions/date"},createdBy:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"}},additionalProperties:!1,required:["type"]},formats0=require_formats().fullFormats.uri,formats4=require_formats().fullFormats["date-time"];function validate15(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="mediaFile"),void 0===data.type){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}for(const key0 in data)if(!func2.call(schema23.properties,key0)){const err1={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs6===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if("mediaFile"!==data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema23.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.fileHash&&"string"!=typeof data.fileHash){const err8={instancePath:instancePath+"/fileHash",schemaPath:"#/properties/fileHash/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.category&&"string"!=typeof data.category){const err9={instancePath:instancePath+"/category",schemaPath:"#/properties/category/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.mimeType){let data5=data.mimeType;if("string"!=typeof data5){const err10={instancePath:instancePath+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("image/*"!==data5&&"image/jpeg"!==data5&&"image/png"!==data5&&"image/gif"!==data5&&"image/webp"!==data5&&"image/avif"!==data5&&"image/svg+xml"!==data5&&"application/pdf"!==data5){const err11={instancePath:instancePath+"/mimeType",schemaPath:"#/properties/mimeType/enum",keyword:"enum",params:{allowedValues:schema23.properties.mimeType.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.data&&"string"!=typeof data.data){const err12={instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.url){let data7=data.url;if("string"==typeof data7){if(!formats0(data7)){const err13={instancePath:instancePath+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}else{const err14={instancePath:instancePath+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.width){let data8=data.width;if("number"!=typeof data8||data8%1||isNaN(data8)){const err15={instancePath:instancePath+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if("number"==typeof data8&&(data8<0||isNaN(data8))){const err16={instancePath:instancePath+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.height){let data9=data.height;if("number"!=typeof data9||data9%1||isNaN(data9)){const err17={instancePath:instancePath+"/height",schemaPath:"#/properties/height/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if("number"==typeof data9&&(data9<0||isNaN(data9))){const err18={instancePath:instancePath+"/height",schemaPath:"#/properties/height/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data.size){let data10=data.size;if("number"!=typeof data10||data10%1||isNaN(data10)){const err19={instancePath:instancePath+"/size",schemaPath:"#/properties/size/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if("number"==typeof data10&&(data10<0||isNaN(data10))){const err20={instancePath:instancePath+"/size",schemaPath:"#/properties/size/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}if(void 0!==data.uploadUrl){let data11=data.uploadUrl;if("string"==typeof data11){if(!formats0(data11)){const err21={instancePath:instancePath+"/uploadUrl",schemaPath:"#/properties/uploadUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}else{const err22={instancePath:instancePath+"/uploadUrl",schemaPath:"#/properties/uploadUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.uploadUrlExpires){let data12=data.uploadUrlExpires;if("string"!=typeof data12&&(!data12||"object"!=typeof data12||Array.isArray(data12))){const err23={instancePath:instancePath+"/uploadUrlExpires",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if("string"==typeof data12&&!formats4.validate(data12)){const err24={instancePath:instancePath+"/uploadUrlExpires",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.createdBy&&"string"!=typeof data.createdBy){const err25={instancePath:instancePath+"/createdBy",schemaPath:"#/properties/createdBy/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err26={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}else{const err27={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}return validate15.errors=vErrors,0===errors}function validate14(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){void 0===data.type&&(data.type="announcement");for(const key0 in data)if(!func2.call(schema21.properties,key0)){const err0={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err1={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err2={};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(_errs6===errors){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err4={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if("announcement"!==data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema21.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0!==data.users){let data2=data.users;if(Array.isArray(data2)){if(data2.length<1){const err6={instancePath:instancePath+"/users",schemaPath:"#/properties/users/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}const len0=data2.length;for(let i0=0;i0<len0;i0++)if("string"!=typeof data2[i0]){const err7={instancePath:instancePath+"/users/"+i0,schemaPath:"#/properties/users/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}}else{const err8={instancePath:instancePath+"/users",schemaPath:"#/properties/users/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.group&&"string"!=typeof data.group){const err9={instancePath:instancePath+"/group",schemaPath:"#/properties/group/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.body&&"string"!=typeof data.body){const err10={instancePath:instancePath+"/body",schemaPath:"#/properties/body/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.media&&(validate15(data.media,{instancePath:instancePath+"/media",parentData:data,parentDataProperty:"media",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length)),void 0!==data.sentBy&&"string"!=typeof data.sentBy){const err11={instancePath:instancePath+"/sentBy",schemaPath:"#/properties/sentBy/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.tags){let data8=data.tags;if(Array.isArray(data8)){const len1=data8.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data8[i1]){const err12={instancePath:instancePath+"/tags/"+i1,schemaPath:"#/properties/tags/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}else{const err13={instancePath:instancePath+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.createdAt){let data10=data.createdAt;if("string"!=typeof data10&&(!data10||"object"!=typeof data10||Array.isArray(data10))){const err14={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("string"==typeof data10&&!formats4.validate(data10)){const err15={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.updatedAt){let data11=data.updatedAt;if("string"!=typeof data11&&(!data11||"object"!=typeof data11||Array.isArray(data11))){const err16={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("string"==typeof data11&&!formats4.validate(data11)){const err17={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}}else{const err18={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}return validate14.errors=vErrors,0===errors}__name(validate15,"validate15"),__name(validate14,"validate14");var validateCamera=validate17,schema29={$schema:"http://json-schema.org/draft-07/schema",$id:"camera.json",title:"Camera",description:"Any smart camera",type:"object",required:["id","type","driver"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{type:"string",enum:["camera"],default:"camera"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},liveStreams:{type:"object",additionalProperties:!1,$comment:"This is now deprecated. Use liveStream instead. This will remain here for backwards compatibility.",properties:{iframe:{type:["string","null"]},hls:{type:["string","null"]},webRTC:{type:["string","null"]},rtsp:{type:["string","null"]}}},liveStream:{type:"object",additionalProperties:!1,properties:{id:{type:"string"},driver:{type:"string",enum:["cloudflare-stream","aws-kinesis","digital-watchdog","mediamtx"]},allowedOrigins:{type:"array",items:{type:"string"}},authRequired:{type:"boolean"},iframe:{type:["string","null"]},hls:{type:["string","null"]},webRTC:{type:["string","null"]},rtsp:{type:["string","null"],description:"Local RTSP stream URL",examples:["rtsp://192.168.1.4:544/channels/1","rtsp://10.145.6.129:8554/unicast"]},previewImage:{type:["string","null"],description:"Source to preview the camera stream",examples:["https://example.com/preview.jpg","data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QBYRXhpZgAATU0AKgAAAAgAA1EQAAEAAAABAQAAAFERAAQAAAABAAABAgABAA"]}}},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}}};function validate18(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate18.errors=vErrors,0===errors}function validate17(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="camera"),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.driver){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}for(const key0 in data)if(!func2.call(schema29.properties,key0)){const err3={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs6===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}let data2=data.type;if("string"!=typeof data2){const err8={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("camera"!==data2){const err9={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema29.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err10={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.supportedNotifications){let data4=data.supportedNotifications;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++){let data5=data4[i0];if("button 1"!==data5&&"button 2"!==data5&&"button 3"!==data5&&"button 4"!==data5&&"button 5"!==data5&&"idle"!==data5&&"powerHasBeedApplied"!==data5&&"acMainsDisconnected"!==data5&&"acMainsReconnected"!==data5&&"replaceBatterySoon"!==data5&&"replaceBatteryNow"!==data5&&"batteryOk"!==data5&&"hardwareFailure"!==data5&&"softwareFailure"!==data5&&"hardwareFailureWithCode"!==data5&&"softwareFailureWithCode"!==data5&&"motionDetection"!==data5&&"airFilterNeedsCleaned"!==data5&&"airFilterNeedsReplaced"!==data5&&"smokeDetected"!==data5&&"outsideSafeTemperatureRange"!==data5&&"outsideSafeHumidityRange"!==data5&&"scheduleMaintenance"!==data5&&"doorAjar"!==data5&&"communicationFailure"!==data5&&"communicationOk"!==data5&&"burglarAlarm"!==data5&&"fireAlarm"!==data5){const err11={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}let j0,i1=data4.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data4[i1],data4[j0])){const err12={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++;break outer0}}else{const err13={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.notification&&(validate18(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate18.errors:vErrors.concat(validate18.errors),errors=vErrors.length)),void 0!==data.driver){let data7=data.driver;if("string"!=typeof data7){const err14={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("adlink"!==data7&&"aws-kinesis"!==data7&&"butler"!==data7&&"crestron"!==data7&&"dell"!==data7&&"dmp"!==data7&&"doorbird"!==data7&&"dormakaba"!==data7&&"dsc"!==data7&&"ecobee"!==data7&&"epson"!==data7&&"geovision-rs"!==data7&&"geovision-as-manager"!==data7&&"honeywell-vista"!==data7&&"igor"!==data7&&"inncom"!==data7&&"isapi"!==data7&&"kohost-k7"!==data7&&"kohost"!==data7&&"lg"!==data7&&"lg-webos"!==data7&&"lapi"!==data7&&"lirc"!==data7&&"mews"!==data7&&"mht"!==data7&&"paxton"!==data7&&"pelican-wireless"!==data7&&"power-shades"!==data7&&"rachio"!==data7&&"rebrandly"!==data7&&"relay"!==data7&&"rtsp"!==data7&&"salto"!==data7&&"salto-irn"!==data7&&"samsung"!==data7&&"se"!==data7&&"sendgrid"!==data7&&"sonifi"!==data7&&"stay-n-touch"!==data7&&"storable"!==data7&&"twilio"!==data7&&"unifi"!==data7&&"valcom"!==data7&&"vivotek"!==data7&&"vizio"!==data7&&"wisenet"!==data7&&"cloudflare-images"!==data7&&"cloudflare-stream"!==data7&&"insperia-privacy"!==data7){const err15={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.liveStreams){let data8=data.liveStreams;if(data8&&"object"==typeof data8&&!Array.isArray(data8)){for(const key1 in data8)if("iframe"!==key1&&"hls"!==key1&&"webRTC"!==key1&&"rtsp"!==key1){const err16={instancePath:instancePath+"/liveStreams",schemaPath:"#/properties/liveStreams/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data8.iframe){let data9=data8.iframe;if("string"!=typeof data9&&null!==data9){const err17={instancePath:instancePath+"/liveStreams/iframe",schemaPath:"#/properties/liveStreams/properties/iframe/type",keyword:"type",params:{type:schema29.properties.liveStreams.properties.iframe.type},message:"must be string,null"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}if(void 0!==data8.hls){let data10=data8.hls;if("string"!=typeof data10&&null!==data10){const err18={instancePath:instancePath+"/liveStreams/hls",schemaPath:"#/properties/liveStreams/properties/hls/type",keyword:"type",params:{type:schema29.properties.liveStreams.properties.hls.type},message:"must be string,null"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data8.webRTC){let data11=data8.webRTC;if("string"!=typeof data11&&null!==data11){const err19={instancePath:instancePath+"/liveStreams/webRTC",schemaPath:"#/properties/liveStreams/properties/webRTC/type",keyword:"type",params:{type:schema29.properties.liveStreams.properties.webRTC.type},message:"must be string,null"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data8.rtsp){let data12=data8.rtsp;if("string"!=typeof data12&&null!==data12){const err20={instancePath:instancePath+"/liveStreams/rtsp",schemaPath:"#/properties/liveStreams/properties/rtsp/type",keyword:"type",params:{type:schema29.properties.liveStreams.properties.rtsp.type},message:"must be string,null"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}}else{const err21={instancePath:instancePath+"/liveStreams",schemaPath:"#/properties/liveStreams/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}if(void 0!==data.liveStream){let data13=data.liveStream;if(data13&&"object"==typeof data13&&!Array.isArray(data13)){for(const key2 in data13)if(!func2.call(schema29.properties.liveStream.properties,key2)){const err22={instancePath:instancePath+"/liveStream",schemaPath:"#/properties/liveStream/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key2},message:"must NOT have additional properties"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data13.id&&"string"!=typeof data13.id){const err23={instancePath:instancePath+"/liveStream/id",schemaPath:"#/properties/liveStream/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data13.driver){let data15=data13.driver;if("string"!=typeof data15){const err24={instancePath:instancePath+"/liveStream/driver",schemaPath:"#/properties/liveStream/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if("cloudflare-stream"!==data15&&"aws-kinesis"!==data15&&"digital-watchdog"!==data15&&"mediamtx"!==data15){const err25={instancePath:instancePath+"/liveStream/driver",schemaPath:"#/properties/liveStream/properties/driver/enum",keyword:"enum",params:{allowedValues:schema29.properties.liveStream.properties.driver.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}if(void 0!==data13.allowedOrigins){let data16=data13.allowedOrigins;if(Array.isArray(data16)){const len1=data16.length;for(let i2=0;i2<len1;i2++)if("string"!=typeof data16[i2]){const err26={instancePath:instancePath+"/liveStream/allowedOrigins/"+i2,schemaPath:"#/properties/liveStream/properties/allowedOrigins/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}else{const err27={instancePath:instancePath+"/liveStream/allowedOrigins",schemaPath:"#/properties/liveStream/properties/allowedOrigins/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}if(void 0!==data13.authRequired&&"boolean"!=typeof data13.authRequired){const err28={instancePath:instancePath+"/liveStream/authRequired",schemaPath:"#/properties/liveStream/properties/authRequired/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data13.iframe){let data19=data13.iframe;if("string"!=typeof data19&&null!==data19){const err29={instancePath:instancePath+"/liveStream/iframe",schemaPath:"#/properties/liveStream/properties/iframe/type",keyword:"type",params:{type:schema29.properties.liveStream.properties.iframe.type},message:"must be string,null"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}}if(void 0!==data13.hls){let data20=data13.hls;if("string"!=typeof data20&&null!==data20){const err30={instancePath:instancePath+"/liveStream/hls",schemaPath:"#/properties/liveStream/properties/hls/type",keyword:"type",params:{type:schema29.properties.liveStream.properties.hls.type},message:"must be string,null"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}if(void 0!==data13.webRTC){let data21=data13.webRTC;if("string"!=typeof data21&&null!==data21){const err31={instancePath:instancePath+"/liveStream/webRTC",schemaPath:"#/properties/liveStream/properties/webRTC/type",keyword:"type",params:{type:schema29.properties.liveStream.properties.webRTC.type},message:"must be string,null"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}if(void 0!==data13.rtsp){let data22=data13.rtsp;if("string"!=typeof data22&&null!==data22){const err32={instancePath:instancePath+"/liveStream/rtsp",schemaPath:"#/properties/liveStream/properties/rtsp/type",keyword:"type",params:{type:schema29.properties.liveStream.properties.rtsp.type},message:"must be string,null"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}if(void 0!==data13.previewImage){let data23=data13.previewImage;if("string"!=typeof data23&&null!==data23){const err33={instancePath:instancePath+"/liveStream/previewImage",schemaPath:"#/properties/liveStream/properties/previewImage/type",keyword:"type",params:{type:schema29.properties.liveStream.properties.previewImage.type},message:"must be string,null"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}}else{const err34={instancePath:instancePath+"/liveStream",schemaPath:"#/properties/liveStream/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err35={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(void 0!==data.watts){let data25=data.watts;if("number"==typeof data25){if(data25<0||isNaN(data25)){const err36={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}else{const err37={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err38={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err39={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err40={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err41={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}else{const err42={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}return validate17.errors=vErrors,0===errors}__name(validate18,"validate18"),__name(validate17,"validate17");var validateCategory=validate20,schema37={$schema:"http://json-schema.org/draft-07/schema",$id:"category.json",title:"Category",type:"object",required:["id","type","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["category"],default:"category"},name:{type:"string",minLength:1},driver:{$ref:"definitions.json#/definitions/driver"},description:{type:"string"},image:{$ref:"mediaFile.json"},rating:{type:"number",minimum:0,maximum:10,default:9},discriminator:{type:"string",enum:["space","product","mediaFile"]},systemId:{$ref:"definitions.json#/definitions/systemId"}}};function validate20(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="category"),void 0===data.rating&&(data.rating=9),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.discriminator){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs5===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if("category"!==data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema37.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.name){let data2=data.name;if("string"==typeof data2){if(func4(data2)<1){const err8={instancePath:instancePath+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}else{const err9={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.driver){let data3=data.driver;if("string"!=typeof data3){const err10={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("adlink"!==data3&&"aws-kinesis"!==data3&&"butler"!==data3&&"crestron"!==data3&&"dell"!==data3&&"dmp"!==data3&&"doorbird"!==data3&&"dormakaba"!==data3&&"dsc"!==data3&&"ecobee"!==data3&&"epson"!==data3&&"geovision-rs"!==data3&&"geovision-as-manager"!==data3&&"honeywell-vista"!==data3&&"igor"!==data3&&"inncom"!==data3&&"isapi"!==data3&&"kohost-k7"!==data3&&"kohost"!==data3&&"lg"!==data3&&"lg-webos"!==data3&&"lapi"!==data3&&"lirc"!==data3&&"mews"!==data3&&"mht"!==data3&&"paxton"!==data3&&"pelican-wireless"!==data3&&"power-shades"!==data3&&"rachio"!==data3&&"rebrandly"!==data3&&"relay"!==data3&&"rtsp"!==data3&&"salto"!==data3&&"salto-irn"!==data3&&"samsung"!==data3&&"se"!==data3&&"sendgrid"!==data3&&"sonifi"!==data3&&"stay-n-touch"!==data3&&"storable"!==data3&&"twilio"!==data3&&"unifi"!==data3&&"valcom"!==data3&&"vivotek"!==data3&&"vizio"!==data3&&"wisenet"!==data3&&"cloudflare-images"!==data3&&"cloudflare-stream"!==data3&&"insperia-privacy"!==data3){const err11={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err12={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}void 0!==data.image&&(validate15(data.image,{instancePath:instancePath+"/image",parentData:data,parentDataProperty:"image",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length));let data6=data.rating;if("number"==typeof data6){if(data6>10||isNaN(data6)){const err13={instancePath:instancePath+"/rating",schemaPath:"#/properties/rating/maximum",keyword:"maximum",params:{comparison:"<=",limit:10},message:"must be <= 10"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(data6<0||isNaN(data6)){const err14={instancePath:instancePath+"/rating",schemaPath:"#/properties/rating/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}else{const err15={instancePath:instancePath+"/rating",schemaPath:"#/properties/rating/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data.discriminator){let data7=data.discriminator;if("string"!=typeof data7){const err16={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("space"!==data7&&"product"!==data7&&"mediaFile"!==data7){const err17={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema37.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err18={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}else{const err19={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}return validate20.errors=vErrors,0===errors}__name(validate20,"validate20");var validateCourtesy=validate22,schema41={$schema:"http://json-schema.org/draft-07/schema",$id:"courtesy.json",title:"Courtesy",description:"Any smart courtesy system",type:"object",required:["id","type","driver","supportedStates","state"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},supportedStates:{type:"array",uniqueItems:!0,items:{enum:["privacy","service","none"]}},state:{type:"string",$ref:"#/properties/supportedStates/items"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}}},schema43={type:"string",enum:["alarm","dimmer","switch","motionSensor","windowCovering","camera","mediaSource","thermostat","lock","courtesy","gateway","tv","dvr","appleTv","discPlayer","mediaPlayer","uncontrolledDevice"]},schema48={enum:["privacy","service","none"]};function validate23(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate23.errors=vErrors,0===errors}function validate22(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.driver){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.supportedStates){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"supportedStates"},message:"must have required property 'supportedStates'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.state){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property 'state'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}for(const key0 in data)if(!func2.call(schema41.properties,key0)){const err5={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err7={};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(_errs6===errors){const err8={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err9={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.type){let data2=data.type;if("string"!=typeof data2){const err10={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("alarm"!==data2&&"dimmer"!==data2&&"switch"!==data2&&"motionSensor"!==data2&&"windowCovering"!==data2&&"camera"!==data2&&"mediaSource"!==data2&&"thermostat"!==data2&&"lock"!==data2&&"courtesy"!==data2&&"gateway"!==data2&&"tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"uncontrolledDevice"!==data2){const err11={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema43.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.supportedNotifications){let data3=data.supportedNotifications;if(Array.isArray(data3)){const len0=data3.length;for(let i0=0;i0<len0;i0++){let data4=data3[i0];if("button 1"!==data4&&"button 2"!==data4&&"button 3"!==data4&&"button 4"!==data4&&"button 5"!==data4&&"idle"!==data4&&"powerHasBeedApplied"!==data4&&"acMainsDisconnected"!==data4&&"acMainsReconnected"!==data4&&"replaceBatterySoon"!==data4&&"replaceBatteryNow"!==data4&&"batteryOk"!==data4&&"hardwareFailure"!==data4&&"softwareFailure"!==data4&&"hardwareFailureWithCode"!==data4&&"softwareFailureWithCode"!==data4&&"motionDetection"!==data4&&"airFilterNeedsCleaned"!==data4&&"airFilterNeedsReplaced"!==data4&&"smokeDetected"!==data4&&"outsideSafeTemperatureRange"!==data4&&"outsideSafeHumidityRange"!==data4&&"scheduleMaintenance"!==data4&&"doorAjar"!==data4&&"communicationFailure"!==data4&&"communicationOk"!==data4&&"burglarAlarm"!==data4&&"fireAlarm"!==data4){const err12={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}let j0,i1=data3.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data3[i1],data3[j0])){const err13={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++;break outer0}}else{const err14={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.notification&&(validate23(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate23.errors:vErrors.concat(validate23.errors),errors=vErrors.length)),void 0!==data.driver){let data6=data.driver;if("string"!=typeof data6){const err15={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if("adlink"!==data6&&"aws-kinesis"!==data6&&"butler"!==data6&&"crestron"!==data6&&"dell"!==data6&&"dmp"!==data6&&"doorbird"!==data6&&"dormakaba"!==data6&&"dsc"!==data6&&"ecobee"!==data6&&"epson"!==data6&&"geovision-rs"!==data6&&"geovision-as-manager"!==data6&&"honeywell-vista"!==data6&&"igor"!==data6&&"inncom"!==data6&&"isapi"!==data6&&"kohost-k7"!==data6&&"kohost"!==data6&&"lg"!==data6&&"lg-webos"!==data6&&"lapi"!==data6&&"lirc"!==data6&&"mews"!==data6&&"mht"!==data6&&"paxton"!==data6&&"pelican-wireless"!==data6&&"power-shades"!==data6&&"rachio"!==data6&&"rebrandly"!==data6&&"relay"!==data6&&"rtsp"!==data6&&"salto"!==data6&&"salto-irn"!==data6&&"samsung"!==data6&&"se"!==data6&&"sendgrid"!==data6&&"sonifi"!==data6&&"stay-n-touch"!==data6&&"storable"!==data6&&"twilio"!==data6&&"unifi"!==data6&&"valcom"!==data6&&"vivotek"!==data6&&"vizio"!==data6&&"wisenet"!==data6&&"cloudflare-images"!==data6&&"cloudflare-stream"!==data6&&"insperia-privacy"!==data6){const err16={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err17={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.supportedStates){let data8=data.supportedStates;if(Array.isArray(data8)){const len1=data8.length;for(let i2=0;i2<len1;i2++){let data9=data8[i2];if("privacy"!==data9&&"service"!==data9&&"none"!==data9){const err18={instancePath:instancePath+"/supportedStates/"+i2,schemaPath:"#/properties/supportedStates/items/enum",keyword:"enum",params:{allowedValues:schema41.properties.supportedStates.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}let j1,i3=data8.length;if(i3>1)outer1:for(;i3--;)for(j1=i3;j1--;)if(func0(data8[i3],data8[j1])){const err19={instancePath:instancePath+"/supportedStates",schemaPath:"#/properties/supportedStates/uniqueItems",keyword:"uniqueItems",params:{i:i3,j:j1},message:"must NOT have duplicate items (items ## "+j1+" and "+i3+" are identical)"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++;break outer1}}else{const err20={instancePath:instancePath+"/supportedStates",schemaPath:"#/properties/supportedStates/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}if(void 0!==data.state){let data10=data.state;if("string"!=typeof data10){const err21={instancePath:instancePath+"/state",schemaPath:"#/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if("privacy"!==data10&&"service"!==data10&&"none"!==data10){const err22={instancePath:instancePath+"/state",schemaPath:"#/properties/supportedStates/items/enum",keyword:"enum",params:{allowedValues:schema48.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err23={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data.watts){let data12=data.watts;if("number"==typeof data12){if(data12<0||isNaN(data12)){const err24={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}else{const err25={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err26={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err27={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err28={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err29={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}}else{const err30={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}return validate22.errors=vErrors,0===errors}__name(validate23,"validate23"),__name(validate22,"validate22");var validateCredential=validate25,schema51={$schema:"http://json-schema.org/draft-07/schema",$id:"credential.json",title:"Credential",type:"object",required:["type","credential","expires"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"credential"},driver:{$ref:"definitions.json#/definitions/driver"},discriminator:{type:"string",enum:["verificationCode","token","mobileKey","pin","publicKey","passkeyChallenge"]},credential:{type:"string"},userId:{type:"string"},organizationId:{type:"string"},propertyId:{type:"string"},deviceId:{type:"string"},userAgent:{type:"string"},expires:{type:["string","object","null"]},systemId:{$ref:"definitions.json#/definitions/systemId"}}};function validate25(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="credential"),void 0===data.type){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.credential){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"credential"},message:"must have required property 'credential'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.expires){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expires"},message:"must have required property 'expires'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs5===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if("string"!=typeof data.type){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.driver){let data2=data.driver;if("string"!=typeof data2){const err7={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("adlink"!==data2&&"aws-kinesis"!==data2&&"butler"!==data2&&"crestron"!==data2&&"dell"!==data2&&"dmp"!==data2&&"doorbird"!==data2&&"dormakaba"!==data2&&"dsc"!==data2&&"ecobee"!==data2&&"epson"!==data2&&"geovision-rs"!==data2&&"geovision-as-manager"!==data2&&"honeywell-vista"!==data2&&"igor"!==data2&&"inncom"!==data2&&"isapi"!==data2&&"kohost-k7"!==data2&&"kohost"!==data2&&"lg"!==data2&&"lg-webos"!==data2&&"lapi"!==data2&&"lirc"!==data2&&"mews"!==data2&&"mht"!==data2&&"paxton"!==data2&&"pelican-wireless"!==data2&&"power-shades"!==data2&&"rachio"!==data2&&"rebrandly"!==data2&&"relay"!==data2&&"rtsp"!==data2&&"salto"!==data2&&"salto-irn"!==data2&&"samsung"!==data2&&"se"!==data2&&"sendgrid"!==data2&&"sonifi"!==data2&&"stay-n-touch"!==data2&&"storable"!==data2&&"twilio"!==data2&&"unifi"!==data2&&"valcom"!==data2&&"vivotek"!==data2&&"vizio"!==data2&&"wisenet"!==data2&&"cloudflare-images"!==data2&&"cloudflare-stream"!==data2&&"insperia-privacy"!==data2){const err8={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.discriminator){let data3=data.discriminator;if("string"!=typeof data3){const err9={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("verificationCode"!==data3&&"token"!==data3&&"mobileKey"!==data3&&"pin"!==data3&&"publicKey"!==data3&&"passkeyChallenge"!==data3){const err10={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema51.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.credential&&"string"!=typeof data.credential){const err11={instancePath:instancePath+"/credential",schemaPath:"#/properties/credential/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.userId&&"string"!=typeof data.userId){const err12={instancePath:instancePath+"/userId",schemaPath:"#/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.organizationId&&"string"!=typeof data.organizationId){const err13={instancePath:instancePath+"/organizationId",schemaPath:"#/properties/organizationId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.propertyId&&"string"!=typeof data.propertyId){const err14={instancePath:instancePath+"/propertyId",schemaPath:"#/properties/propertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data.deviceId&&"string"!=typeof data.deviceId){const err15={instancePath:instancePath+"/deviceId",schemaPath:"#/properties/deviceId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data.userAgent&&"string"!=typeof data.userAgent){const err16={instancePath:instancePath+"/userAgent",schemaPath:"#/properties/userAgent/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.expires){let data10=data.expires;if("string"!=typeof data10&&(!data10||"object"!=typeof data10||Array.isArray(data10))&&null!==data10){const err17={instancePath:instancePath+"/expires",schemaPath:"#/properties/expires/type",keyword:"type",params:{type:schema51.properties.expires.type},message:"must be string,object,null"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err18={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}else{const err19={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}return validate25.errors=vErrors,0===errors}__name(validate25,"validate25");var validateDeviceRouter=validate26,schema55={$schema:"http://json-schema.org/draft-07/schema",$id:"deviceRouter.json",title:"Device Router",description:"A device router contains instructions on where to route devices based on their organization and driver.",type:"object",required:["driver","organizationId"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"deviceRouter",enum:["deviceRouter"]},driver:{type:"string"},organizationId:{type:["string","null"],description:"Reference (id) to the organization that owns this router"},devices:{type:"object",additionalProperties:!0}}};function validate26(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="deviceRouter"),void 0===data.driver){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.organizationId){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"organizationId"},message:"must have required property 'organizationId'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}for(const key0 in data)if("id"!==key0&&"type"!==key0&&"driver"!==key0&&"organizationId"!==key0&&"devices"!==key0){const err2={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs6===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if("deviceRouter"!==data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema55.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.driver&&"string"!=typeof data.driver){const err8={instancePath:instancePath+"/driver",schemaPath:"#/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.organizationId){let data3=data.organizationId;if("string"!=typeof data3&&null!==data3){const err9={instancePath:instancePath+"/organizationId",schemaPath:"#/properties/organizationId/type",keyword:"type",params:{type:schema55.properties.organizationId.type},message:"must be string,null"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.devices){let data4=data.devices;if(!data4||"object"!=typeof data4||Array.isArray(data4)){const err10={instancePath:instancePath+"/devices",schemaPath:"#/properties/devices/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}}else{const err11={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}return validate26.errors=vErrors,0===errors}__name(validate26,"validate26");var validateDimmer=validate27,schema57={$schema:"http://json-schema.org/draft-07/schema",$id:"dimmer.json",title:"Dimmer",description:"Any smart dimmer",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},level:{type:["number","null"],minimum:0,maximum:100},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","level","driver"]};function validate28(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate28.errors=vErrors,0===errors}function validate27(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.level){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"level"},message:"must have required property 'level'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.driver){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.type){let data2=data.type;if("string"!=typeof data2){const err8={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("alarm"!==data2&&"dimmer"!==data2&&"switch"!==data2&&"motionSensor"!==data2&&"windowCovering"!==data2&&"camera"!==data2&&"mediaSource"!==data2&&"thermostat"!==data2&&"lock"!==data2&&"courtesy"!==data2&&"gateway"!==data2&&"tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"uncontrolledDevice"!==data2){const err9={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema43.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.supportedNotifications){let data3=data.supportedNotifications;if(Array.isArray(data3)){const len0=data3.length;for(let i0=0;i0<len0;i0++){let data4=data3[i0];if("button 1"!==data4&&"button 2"!==data4&&"button 3"!==data4&&"button 4"!==data4&&"button 5"!==data4&&"idle"!==data4&&"powerHasBeedApplied"!==data4&&"acMainsDisconnected"!==data4&&"acMainsReconnected"!==data4&&"replaceBatterySoon"!==data4&&"replaceBatteryNow"!==data4&&"batteryOk"!==data4&&"hardwareFailure"!==data4&&"softwareFailure"!==data4&&"hardwareFailureWithCode"!==data4&&"softwareFailureWithCode"!==data4&&"motionDetection"!==data4&&"airFilterNeedsCleaned"!==data4&&"airFilterNeedsReplaced"!==data4&&"smokeDetected"!==data4&&"outsideSafeTemperatureRange"!==data4&&"outsideSafeHumidityRange"!==data4&&"scheduleMaintenance"!==data4&&"doorAjar"!==data4&&"communicationFailure"!==data4&&"communicationOk"!==data4&&"burglarAlarm"!==data4&&"fireAlarm"!==data4){const err10={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}let j0,i1=data3.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data3[i1],data3[j0])){const err11={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++;break outer0}}else{const err12={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.notification&&(validate28(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate28.errors:vErrors.concat(validate28.errors),errors=vErrors.length)),void 0!==data.driver){let data6=data.driver;if("string"!=typeof data6){const err13={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if("adlink"!==data6&&"aws-kinesis"!==data6&&"butler"!==data6&&"crestron"!==data6&&"dell"!==data6&&"dmp"!==data6&&"doorbird"!==data6&&"dormakaba"!==data6&&"dsc"!==data6&&"ecobee"!==data6&&"epson"!==data6&&"geovision-rs"!==data6&&"geovision-as-manager"!==data6&&"honeywell-vista"!==data6&&"igor"!==data6&&"inncom"!==data6&&"isapi"!==data6&&"kohost-k7"!==data6&&"kohost"!==data6&&"lg"!==data6&&"lg-webos"!==data6&&"lapi"!==data6&&"lirc"!==data6&&"mews"!==data6&&"mht"!==data6&&"paxton"!==data6&&"pelican-wireless"!==data6&&"power-shades"!==data6&&"rachio"!==data6&&"rebrandly"!==data6&&"relay"!==data6&&"rtsp"!==data6&&"salto"!==data6&&"salto-irn"!==data6&&"samsung"!==data6&&"se"!==data6&&"sendgrid"!==data6&&"sonifi"!==data6&&"stay-n-touch"!==data6&&"storable"!==data6&&"twilio"!==data6&&"unifi"!==data6&&"valcom"!==data6&&"vivotek"!==data6&&"vizio"!==data6&&"wisenet"!==data6&&"cloudflare-images"!==data6&&"cloudflare-stream"!==data6&&"insperia-privacy"!==data6){const err14={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err15={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data.level){let data8=data.level;if("number"!=typeof data8&&null!==data8){const err16={instancePath:instancePath+"/level",schemaPath:"#/properties/level/type",keyword:"type",params:{type:schema57.properties.level.type},message:"must be number,null"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("number"==typeof data8){if(data8>100||isNaN(data8)){const err17={instancePath:instancePath+"/level",schemaPath:"#/properties/level/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(data8<0||isNaN(data8)){const err18={instancePath:instancePath+"/level",schemaPath:"#/properties/level/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err19={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.watts){let data10=data.watts;if("number"==typeof data10){if(data10<0||isNaN(data10)){const err20={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}else{const err21={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err22={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err23={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err24={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err25={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}else{const err26={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}return validate27.errors=vErrors,0===errors}__name(validate28,"validate28"),__name(validate27,"validate27");var validateDiscoveredDevice=validate30,schema66={$schema:"http://json-schema.org/draft-07/schema",$id:"discoveredDevice.json",title:"Discovered Device",description:"A device that has been discovered by Kohost, but not yet added to the Kohost system.",type:"object",required:["name","deviceId","deviceData"],properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},deviceId:{type:"string"},type:{type:"string",enum:["discoveredDevice"],default:"discoveredDevice"},discriminator:{$ref:"definitions.json#/definitions/type"},driver:{type:"string"},deviceData:{type:"object"},ignore:{type:"boolean"},organizationId:{type:["string","null"],description:"Reference (id) to the organization that owns this device"},propertyId:{type:["string","null"],description:"Reference (id) to the property that this device belongs to"}}};function validate30(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="discoveredDevice"),void 0===data.name){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.deviceId){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"deviceId"},message:"must have required property 'deviceId'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.deviceData){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"deviceData"},message:"must have required property 'deviceData'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs5===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err6={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.deviceId&&"string"!=typeof data.deviceId){const err7={instancePath:instancePath+"/deviceId",schemaPath:"#/properties/deviceId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}let data3=data.type;if("string"!=typeof data3){const err8={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("discoveredDevice"!==data3){const err9={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema66.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.discriminator){let data4=data.discriminator;if("string"!=typeof data4){const err10={instancePath:instancePath+"/discriminator",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("alarm"!==data4&&"dimmer"!==data4&&"switch"!==data4&&"motionSensor"!==data4&&"windowCovering"!==data4&&"camera"!==data4&&"mediaSource"!==data4&&"thermostat"!==data4&&"lock"!==data4&&"courtesy"!==data4&&"gateway"!==data4&&"tv"!==data4&&"dvr"!==data4&&"appleTv"!==data4&&"discPlayer"!==data4&&"mediaPlayer"!==data4&&"uncontrolledDevice"!==data4){const err11={instancePath:instancePath+"/discriminator",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema43.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.driver&&"string"!=typeof data.driver){const err12={instancePath:instancePath+"/driver",schemaPath:"#/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.deviceData){let data6=data.deviceData;if(!data6||"object"!=typeof data6||Array.isArray(data6)){const err13={instancePath:instancePath+"/deviceData",schemaPath:"#/properties/deviceData/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.ignore&&"boolean"!=typeof data.ignore){const err14={instancePath:instancePath+"/ignore",schemaPath:"#/properties/ignore/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data.organizationId){let data8=data.organizationId;if("string"!=typeof data8&&null!==data8){const err15={instancePath:instancePath+"/organizationId",schemaPath:"#/properties/organizationId/type",keyword:"type",params:{type:schema66.properties.organizationId.type},message:"must be string,null"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.propertyId){let data9=data.propertyId;if("string"!=typeof data9&&null!==data9){const err16={instancePath:instancePath+"/propertyId",schemaPath:"#/properties/propertyId/type",keyword:"type",params:{type:schema66.properties.propertyId.type},message:"must be string,null"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}}else{const err17={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}return validate30.errors=vErrors,0===errors}__name(validate30,"validate30");var validateEmailMessage=validate31,schema69={$schema:"http://json-schema.org/draft-07/schema",$id:"emailMessage.json",title:"Email Message",type:"object",required:["to","from","status","subject"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"emailMessage",enum:["emailMessage"]},to:{type:"string",pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"},from:{type:"string",pattern:".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*",description:"Must be in the format of 'Sender <email@example.com>"},subject:{type:"string"},status:{type:"string",enum:["queued","sending","sent","deferred","delivered","undelivered","bounced","blocked","receiving","received","opened","clicked","unsubscribed","spamReport"]},statusMessage:{type:"string"},html:{type:"string"},text:{type:"string"},driver:{type:"string"},appData:{type:"object"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},systemId:{$ref:"definitions.json#/definitions/systemId"}}},pattern0=new RegExp("^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$","u"),pattern1=new RegExp(".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*","u");function validate31(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="emailMessage"),void 0===data.to){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"to"},message:"must have required property 'to'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.from){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"from"},message:"must have required property 'from'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.status){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.subject){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"subject"},message:"must have required property 'subject'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("emailMessage"!==data1){const err8={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema69.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.to){let data2=data.to;if("string"==typeof data2){if(!pattern0.test(data2)){const err9={instancePath:instancePath+"/to",schemaPath:"#/properties/to/pattern",keyword:"pattern",params:{pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"},message:'must match pattern "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"'};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}else{const err10={instancePath:instancePath+"/to",schemaPath:"#/properties/to/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.from){let data3=data.from;if("string"==typeof data3){if(!pattern1.test(data3)){const err11={instancePath:instancePath+"/from",schemaPath:"#/properties/from/pattern",keyword:"pattern",params:{pattern:".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*"},message:'must match pattern ".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*"'};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}else{const err12={instancePath:instancePath+"/from",schemaPath:"#/properties/from/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.subject&&"string"!=typeof data.subject){const err13={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.status){let data5=data.status;if("string"!=typeof data5){const err14={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("queued"!==data5&&"sending"!==data5&&"sent"!==data5&&"deferred"!==data5&&"delivered"!==data5&&"undelivered"!==data5&&"bounced"!==data5&&"blocked"!==data5&&"receiving"!==data5&&"received"!==data5&&"opened"!==data5&&"clicked"!==data5&&"unsubscribed"!==data5&&"spamReport"!==data5){const err15={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema69.properties.status.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.statusMessage&&"string"!=typeof data.statusMessage){const err16={instancePath:instancePath+"/statusMessage",schemaPath:"#/properties/statusMessage/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.html&&"string"!=typeof data.html){const err17={instancePath:instancePath+"/html",schemaPath:"#/properties/html/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.text&&"string"!=typeof data.text){const err18={instancePath:instancePath+"/text",schemaPath:"#/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data.driver&&"string"!=typeof data.driver){const err19={instancePath:instancePath+"/driver",schemaPath:"#/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.appData){let data10=data.appData;if(!data10||"object"!=typeof data10||Array.isArray(data10)){const err20={instancePath:instancePath+"/appData",schemaPath:"#/properties/appData/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}if(void 0!==data.createdAt){let data11=data.createdAt;if("string"!=typeof data11&&(!data11||"object"!=typeof data11||Array.isArray(data11))){const err21={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if("string"==typeof data11&&!formats4.validate(data11)){const err22={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.updatedAt){let data12=data.updatedAt;if("string"!=typeof data12&&(!data12||"object"!=typeof data12||Array.isArray(data12))){const err23={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if("string"==typeof data12&&!formats4.validate(data12)){const err24={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err25={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}else{const err26={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}return validate31.errors=vErrors,0===errors}__name(validate31,"validate31");var validateEnergyReport=validate32,schema74={$schema:"http://json-schema.org/draft-07/schema",$id:"energyReport.json",title:"Energy Report",description:"Hourly Report for Energy based on energy report shards",type:"object",required:["id","type","roomId","first","last","consumption","totals","costPerKw"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["energyReport"],default:"energyReport"},reportTime:{type:"string",enum:["hourly","daily","monthly"]},roomId:{$ref:"definitions.json#/definitions/id"},first:{type:["string","object"],format:"date-time"},last:{type:["string","object"],format:"date-time"},consumption:{type:"array",items:{type:"object",required:["id","type","kwh"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},kwh:{type:"number",minimum:0}}}},totals:{type:"array",items:{type:"object",required:["lights","climate","media"],properties:{lights:{type:"number",minimum:0},climate:{type:"number",minimum:0},media:{type:"number",minimum:0}}}},costPerKw:{type:"number",minimum:0}}};function validate32(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="energyReport"),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.roomId){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"roomId"},message:"must have required property 'roomId'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.first){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"first"},message:"must have required property 'first'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.last){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"last"},message:"must have required property 'last'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.consumption){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"consumption"},message:"must have required property 'consumption'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0===data.totals){const err6={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"totals"},message:"must have required property 'totals'"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0===data.costPerKw){const err7={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"costPerKw"},message:"must have required property 'costPerKw'"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err8={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err9={};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(_errs5===errors){const err10={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("energyReport"!==data1){const err12={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema74.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.reportTime){let data2=data.reportTime;if("string"!=typeof data2){const err13={instancePath:instancePath+"/reportTime",schemaPath:"#/properties/reportTime/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if("hourly"!==data2&&"daily"!==data2&&"monthly"!==data2){const err14={instancePath:instancePath+"/reportTime",schemaPath:"#/properties/reportTime/enum",keyword:"enum",params:{allowedValues:schema74.properties.reportTime.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.roomId){let data3=data.roomId;if("string"!=typeof data3){const err15={instancePath:instancePath+"/roomId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}const _errs13=errors,_errs14=errors;if("global"!==data3&&"system"!==data3){const err16={};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(_errs14===errors){const err17={instancePath:instancePath+"/roomId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}else errors=_errs13,null!==vErrors&&(_errs13?vErrors.length=_errs13:vErrors=null)}if(void 0!==data.first){let data4=data.first;if("string"!=typeof data4&&(!data4||"object"!=typeof data4||Array.isArray(data4))){const err18={instancePath:instancePath+"/first",schemaPath:"#/properties/first/type",keyword:"type",params:{type:schema74.properties.first.type},message:"must be string,object"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if("string"==typeof data4&&!formats4.validate(data4)){const err19={instancePath:instancePath+"/first",schemaPath:"#/properties/first/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data.last){let data5=data.last;if("string"!=typeof data5&&(!data5||"object"!=typeof data5||Array.isArray(data5))){const err20={instancePath:instancePath+"/last",schemaPath:"#/properties/last/type",keyword:"type",params:{type:schema74.properties.last.type},message:"must be string,object"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if("string"==typeof data5&&!formats4.validate(data5)){const err21={instancePath:instancePath+"/last",schemaPath:"#/properties/last/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}if(void 0!==data.consumption){let data6=data.consumption;if(Array.isArray(data6)){const len0=data6.length;for(let i0=0;i0<len0;i0++){let data7=data6[i0];if(data7&&"object"==typeof data7&&!Array.isArray(data7)){if(void 0===data7.id){const err22={instancePath:instancePath+"/consumption/"+i0,schemaPath:"#/properties/consumption/items/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0===data7.type){const err23={instancePath:instancePath+"/consumption/"+i0,schemaPath:"#/properties/consumption/items/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0===data7.kwh){const err24={instancePath:instancePath+"/consumption/"+i0,schemaPath:"#/properties/consumption/items/required",keyword:"required",params:{missingProperty:"kwh"},message:"must have required property 'kwh'"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data7.id){let data8=data7.id;if("string"!=typeof data8){const err25={instancePath:instancePath+"/consumption/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}const _errs26=errors,_errs27=errors;if("global"!==data8&&"system"!==data8){const err26={};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(_errs27===errors){const err27={instancePath:instancePath+"/consumption/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}else errors=_errs26,null!==vErrors&&(_errs26?vErrors.length=_errs26:vErrors=null)}if(void 0!==data7.type){let data9=data7.type;if("string"!=typeof data9){const err28={instancePath:instancePath+"/consumption/"+i0+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if("alarm"!==data9&&"dimmer"!==data9&&"switch"!==data9&&"motionSensor"!==data9&&"windowCovering"!==data9&&"camera"!==data9&&"mediaSource"!==data9&&"thermostat"!==data9&&"lock"!==data9&&"courtesy"!==data9&&"gateway"!==data9&&"tv"!==data9&&"dvr"!==data9&&"appleTv"!==data9&&"discPlayer"!==data9&&"mediaPlayer"!==data9&&"uncontrolledDevice"!==data9){const err29={instancePath:instancePath+"/consumption/"+i0+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema43.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}}if(void 0!==data7.kwh){let data10=data7.kwh;if("number"==typeof data10){if(data10<0||isNaN(data10)){const err30={instancePath:instancePath+"/consumption/"+i0+"/kwh",schemaPath:"#/properties/consumption/items/properties/kwh/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}else{const err31={instancePath:instancePath+"/consumption/"+i0+"/kwh",schemaPath:"#/properties/consumption/items/properties/kwh/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}}else{const err32={instancePath:instancePath+"/consumption/"+i0,schemaPath:"#/properties/consumption/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}}else{const err33={instancePath:instancePath+"/consumption",schemaPath:"#/properties/consumption/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}if(void 0!==data.totals){let data11=data.totals;if(Array.isArray(data11)){const len1=data11.length;for(let i1=0;i1<len1;i1++){let data12=data11[i1];if(data12&&"object"==typeof data12&&!Array.isArray(data12)){if(void 0===data12.lights){const err34={instancePath:instancePath+"/totals/"+i1,schemaPath:"#/properties/totals/items/required",keyword:"required",params:{missingProperty:"lights"},message:"must have required property 'lights'"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(void 0===data12.climate){const err35={instancePath:instancePath+"/totals/"+i1,schemaPath:"#/properties/totals/items/required",keyword:"required",params:{missingProperty:"climate"},message:"must have required property 'climate'"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(void 0===data12.media){const err36={instancePath:instancePath+"/totals/"+i1,schemaPath:"#/properties/totals/items/required",keyword:"required",params:{missingProperty:"media"},message:"must have required property 'media'"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if(void 0!==data12.lights){let data13=data12.lights;if("number"==typeof data13){if(data13<0||isNaN(data13)){const err37={instancePath:instancePath+"/totals/"+i1+"/lights",schemaPath:"#/properties/totals/items/properties/lights/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}else{const err38={instancePath:instancePath+"/totals/"+i1+"/lights",schemaPath:"#/properties/totals/items/properties/lights/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}if(void 0!==data12.climate){let data14=data12.climate;if("number"==typeof data14){if(data14<0||isNaN(data14)){const err39={instancePath:instancePath+"/totals/"+i1+"/climate",schemaPath:"#/properties/totals/items/properties/climate/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}else{const err40={instancePath:instancePath+"/totals/"+i1+"/climate",schemaPath:"#/properties/totals/items/properties/climate/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}}if(void 0!==data12.media){let data15=data12.media;if("number"==typeof data15){if(data15<0||isNaN(data15)){const err41={instancePath:instancePath+"/totals/"+i1+"/media",schemaPath:"#/properties/totals/items/properties/media/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}else{const err42={instancePath:instancePath+"/totals/"+i1+"/media",schemaPath:"#/properties/totals/items/properties/media/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}}}else{const err43={instancePath:instancePath+"/totals/"+i1,schemaPath:"#/properties/totals/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}}}else{const err44={instancePath:instancePath+"/totals",schemaPath:"#/properties/totals/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}if(void 0!==data.costPerKw){let data16=data.costPerKw;if("number"==typeof data16){if(data16<0||isNaN(data16)){const err45={instancePath:instancePath+"/costPerKw",schemaPath:"#/properties/costPerKw/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}else{const err46={instancePath:instancePath+"/costPerKw",schemaPath:"#/properties/costPerKw/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}}else{const err47={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}return validate32.errors=vErrors,0===errors}__name(validate32,"validate32");var validateEnergyReportShard=validate33,schema79={$schema:"http://json-schema.org/draft-07/schema",$id:"energyReportShard.json",title:"Energy Report Shard",description:"Shard used for Energy Reports",type:"object",required:["id","type","roomId","first","last","data","ndata","expires"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["energyReportShard"],default:"energyReportShard"},roomId:{$ref:"definitions.json#/definitions/id"},first:{type:["string","object"],format:"date-time"},last:{type:["string","object"],format:"date-time"},data:{type:"array",items:{type:"object",required:["time","watts","id","type","value"],properties:{time:{type:["string","object"],format:"date-time"},watts:{$ref:"definitions.json#/definitions/watts"},id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},value:{type:"number",minimum:0,maximum:1}}}},ndata:{type:"integer",minimum:0,maximum:1e5,default:0},expires:{type:["string","object"],format:"date-time"}}};function validate33(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="energyReportShard"),void 0===data.ndata&&(data.ndata=0),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.roomId){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"roomId"},message:"must have required property 'roomId'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.first){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"first"},message:"must have required property 'first'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.last){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"last"},message:"must have required property 'last'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.data){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0===data.ndata){const err6={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"ndata"},message:"must have required property 'ndata'"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0===data.expires){const err7={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expires"},message:"must have required property 'expires'"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err8={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err9={};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(_errs5===errors){const err10={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("energyReportShard"!==data1){const err12={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema79.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.roomId){let data2=data.roomId;if("string"!=typeof data2){const err13={instancePath:instancePath+"/roomId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}const _errs11=errors,_errs12=errors;if("global"!==data2&&"system"!==data2){const err14={};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(_errs12===errors){const err15={instancePath:instancePath+"/roomId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}else errors=_errs11,null!==vErrors&&(_errs11?vErrors.length=_errs11:vErrors=null)}if(void 0!==data.first){let data3=data.first;if("string"!=typeof data3&&(!data3||"object"!=typeof data3||Array.isArray(data3))){const err16={instancePath:instancePath+"/first",schemaPath:"#/properties/first/type",keyword:"type",params:{type:schema79.properties.first.type},message:"must be string,object"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("string"==typeof data3&&!formats4.validate(data3)){const err17={instancePath:instancePath+"/first",schemaPath:"#/properties/first/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}if(void 0!==data.last){let data4=data.last;if("string"!=typeof data4&&(!data4||"object"!=typeof data4||Array.isArray(data4))){const err18={instancePath:instancePath+"/last",schemaPath:"#/properties/last/type",keyword:"type",params:{type:schema79.properties.last.type},message:"must be string,object"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if("string"==typeof data4&&!formats4.validate(data4)){const err19={instancePath:instancePath+"/last",schemaPath:"#/properties/last/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data.data){let data5=data.data;if(Array.isArray(data5)){const len0=data5.length;for(let i0=0;i0<len0;i0++){let data6=data5[i0];if(data6&&"object"==typeof data6&&!Array.isArray(data6)){if(void 0===data6.time){const err20={instancePath:instancePath+"/data/"+i0,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"time"},message:"must have required property 'time'"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0===data6.watts){const err21={instancePath:instancePath+"/data/"+i0,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"watts"},message:"must have required property 'watts'"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0===data6.id){const err22={instancePath:instancePath+"/data/"+i0,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0===data6.type){const err23={instancePath:instancePath+"/data/"+i0,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0===data6.value){const err24={instancePath:instancePath+"/data/"+i0,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data6.time){let data7=data6.time;if("string"!=typeof data7&&(!data7||"object"!=typeof data7||Array.isArray(data7))){const err25={instancePath:instancePath+"/data/"+i0+"/time",schemaPath:"#/properties/data/items/properties/time/type",keyword:"type",params:{type:schema79.properties.data.items.properties.time.type},message:"must be string,object"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if("string"==typeof data7&&!formats4.validate(data7)){const err26={instancePath:instancePath+"/data/"+i0+"/time",schemaPath:"#/properties/data/items/properties/time/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}if(void 0!==data6.watts){let data8=data6.watts;if("number"==typeof data8){if(data8<0||isNaN(data8)){const err27={instancePath:instancePath+"/data/"+i0+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}else{const err28={instancePath:instancePath+"/data/"+i0+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}if(void 0!==data6.id){let data9=data6.id;if("string"!=typeof data9){const err29={instancePath:instancePath+"/data/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}const _errs29=errors,_errs30=errors;if("global"!==data9&&"system"!==data9){const err30={};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(_errs30===errors){const err31={instancePath:instancePath+"/data/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}else errors=_errs29,null!==vErrors&&(_errs29?vErrors.length=_errs29:vErrors=null)}if(void 0!==data6.type){let data10=data6.type;if("string"!=typeof data10){const err32={instancePath:instancePath+"/data/"+i0+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if("alarm"!==data10&&"dimmer"!==data10&&"switch"!==data10&&"motionSensor"!==data10&&"windowCovering"!==data10&&"camera"!==data10&&"mediaSource"!==data10&&"thermostat"!==data10&&"lock"!==data10&&"courtesy"!==data10&&"gateway"!==data10&&"tv"!==data10&&"dvr"!==data10&&"appleTv"!==data10&&"discPlayer"!==data10&&"mediaPlayer"!==data10&&"uncontrolledDevice"!==data10){const err33={instancePath:instancePath+"/data/"+i0+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema43.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}if(void 0!==data6.value){let data11=data6.value;if("number"==typeof data11){if(data11>1||isNaN(data11)){const err34={instancePath:instancePath+"/data/"+i0+"/value",schemaPath:"#/properties/data/items/properties/value/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(data11<0||isNaN(data11)){const err35={instancePath:instancePath+"/data/"+i0+"/value",schemaPath:"#/properties/data/items/properties/value/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}}else{const err36={instancePath:instancePath+"/data/"+i0+"/value",schemaPath:"#/properties/data/items/properties/value/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}}else{const err37={instancePath:instancePath+"/data/"+i0,schemaPath:"#/properties/data/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}}else{const err38={instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}let data12=data.ndata;if("number"!=typeof data12||data12%1||isNaN(data12)){const err39={instancePath:instancePath+"/ndata",schemaPath:"#/properties/ndata/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}if("number"==typeof data12){if(data12>1e5||isNaN(data12)){const err40={instancePath:instancePath+"/ndata",schemaPath:"#/properties/ndata/maximum",keyword:"maximum",params:{comparison:"<=",limit:1e5},message:"must be <= 100000"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if(data12<0||isNaN(data12)){const err41={instancePath:instancePath+"/ndata",schemaPath:"#/properties/ndata/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}if(void 0!==data.expires){let data13=data.expires;if("string"!=typeof data13&&(!data13||"object"!=typeof data13||Array.isArray(data13))){const err42={instancePath:instancePath+"/expires",schemaPath:"#/properties/expires/type",keyword:"type",params:{type:schema79.properties.expires.type},message:"must be string,object"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if("string"==typeof data13&&!formats4.validate(data13)){const err43={instancePath:instancePath+"/expires",schemaPath:"#/properties/expires/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}}}else{const err44={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}return validate33.errors=vErrors,0===errors}__name(validate33,"validate33");var validateGateway=validate34;function validate35(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate35.errors=vErrors,0===errors}function validate34(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.status){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.driver){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.type){let data1=data.type;if("string"!=typeof data1){const err7={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("alarm"!==data1&&"dimmer"!==data1&&"switch"!==data1&&"motionSensor"!==data1&&"windowCovering"!==data1&&"camera"!==data1&&"mediaSource"!==data1&&"thermostat"!==data1&&"lock"!==data1&&"courtesy"!==data1&&"gateway"!==data1&&"tv"!==data1&&"dvr"!==data1&&"appleTv"!==data1&&"discPlayer"!==data1&&"mediaPlayer"!==data1&&"uncontrolledDevice"!==data1){const err8={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema43.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.supportedNotifications){let data2=data.supportedNotifications;if(Array.isArray(data2)){const len0=data2.length;for(let i0=0;i0<len0;i0++){let data3=data2[i0];if("button 1"!==data3&&"button 2"!==data3&&"button 3"!==data3&&"button 4"!==data3&&"button 5"!==data3&&"idle"!==data3&&"powerHasBeedApplied"!==data3&&"acMainsDisconnected"!==data3&&"acMainsReconnected"!==data3&&"replaceBatterySoon"!==data3&&"replaceBatteryNow"!==data3&&"batteryOk"!==data3&&"hardwareFailure"!==data3&&"softwareFailure"!==data3&&"hardwareFailureWithCode"!==data3&&"softwareFailureWithCode"!==data3&&"motionDetection"!==data3&&"airFilterNeedsCleaned"!==data3&&"airFilterNeedsReplaced"!==data3&&"smokeDetected"!==data3&&"outsideSafeTemperatureRange"!==data3&&"outsideSafeHumidityRange"!==data3&&"scheduleMaintenance"!==data3&&"doorAjar"!==data3&&"communicationFailure"!==data3&&"communicationOk"!==data3&&"burglarAlarm"!==data3&&"fireAlarm"!==data3){const err9={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}let j0,i1=data2.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data2[i1],data2[j0])){const err10={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++;break outer0}}else{const err11={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.notification&&(validate35(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate35.errors:vErrors.concat(validate35.errors),errors=vErrors.length)),void 0!==data.status&&"string"!=typeof data.status){const err12={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err13={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.driver){let data7=data.driver;if("string"!=typeof data7){const err14={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("adlink"!==data7&&"aws-kinesis"!==data7&&"butler"!==data7&&"crestron"!==data7&&"dell"!==data7&&"dmp"!==data7&&"doorbird"!==data7&&"dormakaba"!==data7&&"dsc"!==data7&&"ecobee"!==data7&&"epson"!==data7&&"geovision-rs"!==data7&&"geovision-as-manager"!==data7&&"honeywell-vista"!==data7&&"igor"!==data7&&"inncom"!==data7&&"isapi"!==data7&&"kohost-k7"!==data7&&"kohost"!==data7&&"lg"!==data7&&"lg-webos"!==data7&&"lapi"!==data7&&"lirc"!==data7&&"mews"!==data7&&"mht"!==data7&&"paxton"!==data7&&"pelican-wireless"!==data7&&"power-shades"!==data7&&"rachio"!==data7&&"rebrandly"!==data7&&"relay"!==data7&&"rtsp"!==data7&&"salto"!==data7&&"salto-irn"!==data7&&"samsung"!==data7&&"se"!==data7&&"sendgrid"!==data7&&"sonifi"!==data7&&"stay-n-touch"!==data7&&"storable"!==data7&&"twilio"!==data7&&"unifi"!==data7&&"valcom"!==data7&&"vivotek"!==data7&&"vizio"!==data7&&"wisenet"!==data7&&"cloudflare-images"!==data7&&"cloudflare-stream"!==data7&&"insperia-privacy"!==data7){const err15={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.watts){let data8=data.watts;if("number"==typeof data8){if(data8<0||isNaN(data8)){const err16={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}else{const err17={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err18={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err19={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err20={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err21={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}else{const err22={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}return validate34.errors=vErrors,0===errors}__name(validate35,"validate35"),__name(validate34,"validate34");var validateIdentification=validate37,schema94={$schema:"http://json-schema.org/draft-07/schema",$id:"identification.json",title:"Identification",type:"object",required:["type"],additionalProperties:!1,oneOf:[{required:["number"]},{required:["encryptedNumber"]}],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["driversLicense","passport","identityCard","visa"]},number:{type:"string"},maskedNumber:{type:"string"},encryptedNumber:{type:"string"},issued:{type:["string","object"],format:"date-time"},expires:{type:["string","object","null"],format:"date-time"},verified:{type:"boolean"},matched:{type:"boolean"},firstName:{type:"string"},lastName:{type:"string"},issuingCountry:{type:"string",minLength:2,maxLength:2},systemId:{$ref:"definitions.json#/definitions/systemId"}}};function validate37(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;const _errs1=errors;let valid0=!1,passing0=null;const _errs2=errors;if(data&&"object"==typeof data&&!Array.isArray(data)&&void 0===data.number){const err0={instancePath:instancePath,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"number"},message:"must have required property 'number'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}(_valid0=_errs2===errors)&&(valid0=!0,passing0=0);const _errs3=errors;if(data&&"object"==typeof data&&!Array.isArray(data)&&void 0===data.encryptedNumber){const err1={instancePath:instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"encryptedNumber"},message:"must have required property 'encryptedNumber'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}var _valid0;if((_valid0=_errs3===errors)&&valid0?(valid0=!1,passing0=[passing0,1]):_valid0&&(valid0=!0,passing0=1),valid0)errors=_errs1,null!==vErrors&&(_errs1?vErrors.length=_errs1:vErrors=null);else{const err2={instancePath:instancePath,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:passing0},message:"must match exactly one schema in oneOf"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}for(const key0 in data)if(!func2.call(schema94.properties,key0)){const err4={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}const _errs8=errors,_errs9=errors;if("global"!==data0&&"system"!==data0){const err6={};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(_errs9===errors){const err7={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}else errors=_errs8,null!==vErrors&&(_errs8?vErrors.length=_errs8:vErrors=null)}if(void 0!==data.type){let data1=data.type;if("string"!=typeof data1){const err8={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("driversLicense"!==data1&&"passport"!==data1&&"identityCard"!==data1&&"visa"!==data1){const err9={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema94.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.number&&"string"!=typeof data.number){const err10={instancePath:instancePath+"/number",schemaPath:"#/properties/number/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.maskedNumber&&"string"!=typeof data.maskedNumber){const err11={instancePath:instancePath+"/maskedNumber",schemaPath:"#/properties/maskedNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.encryptedNumber&&"string"!=typeof data.encryptedNumber){const err12={instancePath:instancePath+"/encryptedNumber",schemaPath:"#/properties/encryptedNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.issued){let data5=data.issued;if("string"!=typeof data5&&(!data5||"object"!=typeof data5||Array.isArray(data5))){const err13={instancePath:instancePath+"/issued",schemaPath:"#/properties/issued/type",keyword:"type",params:{type:schema94.properties.issued.type},message:"must be string,object"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if("string"==typeof data5&&!formats4.validate(data5)){const err14={instancePath:instancePath+"/issued",schemaPath:"#/properties/issued/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.expires){let data6=data.expires;if("string"!=typeof data6&&(!data6||"object"!=typeof data6||Array.isArray(data6))&&null!==data6){const err15={instancePath:instancePath+"/expires",schemaPath:"#/properties/expires/type",keyword:"type",params:{type:schema94.properties.expires.type},message:"must be string,object,null"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if("string"==typeof data6&&!formats4.validate(data6)){const err16={instancePath:instancePath+"/expires",schemaPath:"#/properties/expires/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.verified&&"boolean"!=typeof data.verified){const err17={instancePath:instancePath+"/verified",schemaPath:"#/properties/verified/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.matched&&"boolean"!=typeof data.matched){const err18={instancePath:instancePath+"/matched",schemaPath:"#/properties/matched/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data.firstName&&"string"!=typeof data.firstName){const err19={instancePath:instancePath+"/firstName",schemaPath:"#/properties/firstName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.lastName&&"string"!=typeof data.lastName){const err20={instancePath:instancePath+"/lastName",schemaPath:"#/properties/lastName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data.issuingCountry){let data11=data.issuingCountry;if("string"==typeof data11){if(func4(data11)>2){const err21={instancePath:instancePath+"/issuingCountry",schemaPath:"#/properties/issuingCountry/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(func4(data11)<2){const err22={instancePath:instancePath+"/issuingCountry",schemaPath:"#/properties/issuingCountry/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}else{const err23={instancePath:instancePath+"/issuingCountry",schemaPath:"#/properties/issuingCountry/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err24={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}else{const err25={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}return validate37.errors=vErrors,0===errors}__name(validate37,"validate37");var validateIssue=validate38,schema97={$schema:"http://json-schema.org/draft-07/schema",$id:"issue.json",title:"Issue",description:"An issue associated with ticketing and concierge.",type:"object",required:["id","type","name","department"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["issue"],default:"issue"},name:{type:"string"},description:{type:"string"},department:{type:"string"},autoAssign:{type:"object",properties:{userId:{type:"string",description:"The user ID to assign tickets with this issue to."},vendorId:{type:"string",description:"The vendor ID to assign tickets with this issue to."},priority:{$ref:"ticket.json#/properties/priority",description:"The priority to assign tickets with this issue to."},tags:{type:"array",items:{type:"string"}}}},notify:{type:"array",description:"A list of entities to notify when this issue is triggered.",default:[],items:{type:"object",required:["id","discriminator"],properties:{id:{type:"string",description:"The ID of the entity to notify."},discriminator:{type:"string",enum:["user"]}}}},systemKey:{type:"string"},autoCreateTicket:{type:"boolean",default:!0},excludedResources:{type:"array",description:"A list of resources that should not trigger notifications of this issue",items:{type:"string"},default:[]}}},schema108={type:"string",enum:["low","normal","high"],default:"normal"};function validate38(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="issue"),void 0===data.notify&&(data.notify=[]),void 0===data.autoCreateTicket&&(data.autoCreateTicket=!0),void 0===data.excludedResources&&(data.excludedResources=[]),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.name){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.department){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"department"},message:"must have required property 'department'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}for(const key0 in data)if(!func2.call(schema97.properties,key0)){const err4={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err6={};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(_errs6===errors){const err7={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err8={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("issue"!==data1){const err9={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema97.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.name&&"string"!=typeof data.name){const err10={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.description&&"string"!=typeof data.description){const err11={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.department&&"string"!=typeof data.department){const err12={instancePath:instancePath+"/department",schemaPath:"#/properties/department/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.autoAssign){let data5=data.autoAssign;if(data5&&"object"==typeof data5&&!Array.isArray(data5)){if(void 0!==data5.userId&&"string"!=typeof data5.userId){const err13={instancePath:instancePath+"/autoAssign/userId",schemaPath:"#/properties/autoAssign/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data5.vendorId&&"string"!=typeof data5.vendorId){const err14={instancePath:instancePath+"/autoAssign/vendorId",schemaPath:"#/properties/autoAssign/properties/vendorId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data5.priority){let data8=data5.priority;if("string"!=typeof data8){const err15={instancePath:instancePath+"/autoAssign/priority",schemaPath:"ticket.json#/properties/priority/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if("low"!==data8&&"normal"!==data8&&"high"!==data8){const err16={instancePath:instancePath+"/autoAssign/priority",schemaPath:"ticket.json#/properties/priority/enum",keyword:"enum",params:{allowedValues:schema108.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data5.tags){let data9=data5.tags;if(Array.isArray(data9)){const len0=data9.length;for(let i0=0;i0<len0;i0++)if("string"!=typeof data9[i0]){const err17={instancePath:instancePath+"/autoAssign/tags/"+i0,schemaPath:"#/properties/autoAssign/properties/tags/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}else{const err18={instancePath:instancePath+"/autoAssign/tags",schemaPath:"#/properties/autoAssign/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}}else{const err19={instancePath:instancePath+"/autoAssign",schemaPath:"#/properties/autoAssign/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}let data11=data.notify;if(Array.isArray(data11)){const len1=data11.length;for(let i1=0;i1<len1;i1++){let data12=data11[i1];if(data12&&"object"==typeof data12&&!Array.isArray(data12)){if(void 0===data12.id){const err20={instancePath:instancePath+"/notify/"+i1,schemaPath:"#/properties/notify/items/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0===data12.discriminator){const err21={instancePath:instancePath+"/notify/"+i1,schemaPath:"#/properties/notify/items/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0!==data12.id&&"string"!=typeof data12.id){const err22={instancePath:instancePath+"/notify/"+i1+"/id",schemaPath:"#/properties/notify/items/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data12.discriminator){let data14=data12.discriminator;if("string"!=typeof data14){const err23={instancePath:instancePath+"/notify/"+i1+"/discriminator",schemaPath:"#/properties/notify/items/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if("user"!==data14){const err24={instancePath:instancePath+"/notify/"+i1+"/discriminator",schemaPath:"#/properties/notify/items/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema97.properties.notify.items.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}}else{const err25={instancePath:instancePath+"/notify/"+i1,schemaPath:"#/properties/notify/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}}else{const err26={instancePath:instancePath+"/notify",schemaPath:"#/properties/notify/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.systemKey&&"string"!=typeof data.systemKey){const err27={instancePath:instancePath+"/systemKey",schemaPath:"#/properties/systemKey/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if("boolean"!=typeof data.autoCreateTicket){const err28={instancePath:instancePath+"/autoCreateTicket",schemaPath:"#/properties/autoCreateTicket/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}let data17=data.excludedResources;if(Array.isArray(data17)){const len2=data17.length;for(let i2=0;i2<len2;i2++)if("string"!=typeof data17[i2]){const err29={instancePath:instancePath+"/excludedResources/"+i2,schemaPath:"#/properties/excludedResources/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}}else{const err30={instancePath:instancePath+"/excludedResources",schemaPath:"#/properties/excludedResources/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}else{const err31={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}return validate38.errors=vErrors,0===errors}__name(validate38,"validate38");var validateLock=validate45,schema109={$schema:"http://json-schema.org/draft-07/schema",$id:"lock.json",title:"Lock",description:"Any smart lock",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},state:{type:["string","null"],enum:["locked","unlocked",null]},mode:{type:["string","null"],enum:["normal","autoLock","emergencyOpen","emergencyClose","holdOpen","lockdown",null],description:"emergencyOpen and emergencyClose are deprecated and can be removed once Salto, Paxton and Geovision drivers are updated",default:null},supportedModes:{type:"array",uniqueItems:!0,items:{enum:["normal","autoLock","emergencyOpen","emergencyClose","holdOpen","lockdown",null]}},batteryLevel:{$ref:"definitions.json#/definitions/batteryLevel"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","state","driver"]};function validate46(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate46.errors=vErrors,0===errors}function validate45(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.mode&&(data.mode=null),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.state){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property 'state'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.driver){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.type){let data2=data.type;if("string"!=typeof data2){const err8={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("alarm"!==data2&&"dimmer"!==data2&&"switch"!==data2&&"motionSensor"!==data2&&"windowCovering"!==data2&&"camera"!==data2&&"mediaSource"!==data2&&"thermostat"!==data2&&"lock"!==data2&&"courtesy"!==data2&&"gateway"!==data2&&"tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"uncontrolledDevice"!==data2){const err9={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema43.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err10={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.supportedNotifications){let data4=data.supportedNotifications;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++){let data5=data4[i0];if("button 1"!==data5&&"button 2"!==data5&&"button 3"!==data5&&"button 4"!==data5&&"button 5"!==data5&&"idle"!==data5&&"powerHasBeedApplied"!==data5&&"acMainsDisconnected"!==data5&&"acMainsReconnected"!==data5&&"replaceBatterySoon"!==data5&&"replaceBatteryNow"!==data5&&"batteryOk"!==data5&&"hardwareFailure"!==data5&&"softwareFailure"!==data5&&"hardwareFailureWithCode"!==data5&&"softwareFailureWithCode"!==data5&&"motionDetection"!==data5&&"airFilterNeedsCleaned"!==data5&&"airFilterNeedsReplaced"!==data5&&"smokeDetected"!==data5&&"outsideSafeTemperatureRange"!==data5&&"outsideSafeHumidityRange"!==data5&&"scheduleMaintenance"!==data5&&"doorAjar"!==data5&&"communicationFailure"!==data5&&"communicationOk"!==data5&&"burglarAlarm"!==data5&&"fireAlarm"!==data5){const err11={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}let j0,i1=data4.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data4[i1],data4[j0])){const err12={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++;break outer0}}else{const err13={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.notification&&(validate46(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate46.errors:vErrors.concat(validate46.errors),errors=vErrors.length)),void 0!==data.driver){let data7=data.driver;if("string"!=typeof data7){const err14={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("adlink"!==data7&&"aws-kinesis"!==data7&&"butler"!==data7&&"crestron"!==data7&&"dell"!==data7&&"dmp"!==data7&&"doorbird"!==data7&&"dormakaba"!==data7&&"dsc"!==data7&&"ecobee"!==data7&&"epson"!==data7&&"geovision-rs"!==data7&&"geovision-as-manager"!==data7&&"honeywell-vista"!==data7&&"igor"!==data7&&"inncom"!==data7&&"isapi"!==data7&&"kohost-k7"!==data7&&"kohost"!==data7&&"lg"!==data7&&"lg-webos"!==data7&&"lapi"!==data7&&"lirc"!==data7&&"mews"!==data7&&"mht"!==data7&&"paxton"!==data7&&"pelican-wireless"!==data7&&"power-shades"!==data7&&"rachio"!==data7&&"rebrandly"!==data7&&"relay"!==data7&&"rtsp"!==data7&&"salto"!==data7&&"salto-irn"!==data7&&"samsung"!==data7&&"se"!==data7&&"sendgrid"!==data7&&"sonifi"!==data7&&"stay-n-touch"!==data7&&"storable"!==data7&&"twilio"!==data7&&"unifi"!==data7&&"valcom"!==data7&&"vivotek"!==data7&&"vizio"!==data7&&"wisenet"!==data7&&"cloudflare-images"!==data7&&"cloudflare-stream"!==data7&&"insperia-privacy"!==data7){const err15={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.state){let data8=data.state;if("string"!=typeof data8&&null!==data8){const err16={instancePath:instancePath+"/state",schemaPath:"#/properties/state/type",keyword:"type",params:{type:schema109.properties.state.type},message:"must be string,null"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("locked"!==data8&&"unlocked"!==data8&&null!==data8){const err17={instancePath:instancePath+"/state",schemaPath:"#/properties/state/enum",keyword:"enum",params:{allowedValues:schema109.properties.state.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}let data9=data.mode;if("string"!=typeof data9&&null!==data9){const err18={instancePath:instancePath+"/mode",schemaPath:"#/properties/mode/type",keyword:"type",params:{type:schema109.properties.mode.type},message:"must be string,null"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if("normal"!==data9&&"autoLock"!==data9&&"emergencyOpen"!==data9&&"emergencyClose"!==data9&&"holdOpen"!==data9&&"lockdown"!==data9&&null!==data9){const err19={instancePath:instancePath+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues:schema109.properties.mode.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.supportedModes){let data10=data.supportedModes;if(Array.isArray(data10)){const len1=data10.length;for(let i2=0;i2<len1;i2++){let data11=data10[i2];if("normal"!==data11&&"autoLock"!==data11&&"emergencyOpen"!==data11&&"emergencyClose"!==data11&&"holdOpen"!==data11&&"lockdown"!==data11&&null!==data11){const err20={instancePath:instancePath+"/supportedModes/"+i2,schemaPath:"#/properties/supportedModes/items/enum",keyword:"enum",params:{allowedValues:schema109.properties.supportedModes.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}let j1,i3=data10.length;if(i3>1)outer1:for(;i3--;)for(j1=i3;j1--;)if(func0(data10[i3],data10[j1])){const err21={instancePath:instancePath+"/supportedModes",schemaPath:"#/properties/supportedModes/uniqueItems",keyword:"uniqueItems",params:{i:i3,j:j1},message:"must NOT have duplicate items (items ## "+j1+" and "+i3+" are identical)"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++;break outer1}}else{const err22={instancePath:instancePath+"/supportedModes",schemaPath:"#/properties/supportedModes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.batteryLevel){let data12=data.batteryLevel;if("number"==typeof data12){if(data12>100||isNaN(data12)){const err23={instancePath:instancePath+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(data12<0||isNaN(data12)){const err24={instancePath:instancePath+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}else{const err25={instancePath:instancePath+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err26={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.watts){let data14=data.watts;if("number"==typeof data14){if(data14<0||isNaN(data14)){const err27={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}else{const err28={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err29={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err30={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err31={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err32={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}else{const err33={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}return validate45.errors=vErrors,0===errors}__name(validate46,"validate46"),__name(validate45,"validate45");var validateLog=validate48,schema119={$schema:"http://json-schema.org/draft-07/schema",$id:"log.json",title:"Log",type:"object",required:["type","timestamp","id","driver","name"],properties:{type:{type:"string",default:"log",enum:["log"]},timestamp:{type:"number",minimum:1655907956593},id:{$ref:"definitions.json#/definitions/id"},driver:{$ref:"definitions.json#/definitions/driver"},name:{type:"string",description:"Event name"},field1:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field2:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field3:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field4:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field5:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field6:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}}}};function validate48(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="log"),void 0===data.type){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.timestamp){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"timestamp"},message:"must have required property 'timestamp'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.id){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.driver){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.name){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}let data0=data.type;if("string"!=typeof data0){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if("log"!==data0){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema119.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err7={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}}else{const err8={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.id){let data2=data.id;if("string"!=typeof data2){const err9={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}const _errs8=errors,_errs9=errors;if("global"!==data2&&"system"!==data2){const err10={};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(_errs9===errors){const err11={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}else errors=_errs8,null!==vErrors&&(_errs8?vErrors.length=_errs8:vErrors=null)}if(void 0!==data.driver){let data3=data.driver;if("string"!=typeof data3){const err12={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if("adlink"!==data3&&"aws-kinesis"!==data3&&"butler"!==data3&&"crestron"!==data3&&"dell"!==data3&&"dmp"!==data3&&"doorbird"!==data3&&"dormakaba"!==data3&&"dsc"!==data3&&"ecobee"!==data3&&"epson"!==data3&&"geovision-rs"!==data3&&"geovision-as-manager"!==data3&&"honeywell-vista"!==data3&&"igor"!==data3&&"inncom"!==data3&&"isapi"!==data3&&"kohost-k7"!==data3&&"kohost"!==data3&&"lg"!==data3&&"lg-webos"!==data3&&"lapi"!==data3&&"lirc"!==data3&&"mews"!==data3&&"mht"!==data3&&"paxton"!==data3&&"pelican-wireless"!==data3&&"power-shades"!==data3&&"rachio"!==data3&&"rebrandly"!==data3&&"relay"!==data3&&"rtsp"!==data3&&"salto"!==data3&&"salto-irn"!==data3&&"samsung"!==data3&&"se"!==data3&&"sendgrid"!==data3&&"sonifi"!==data3&&"stay-n-touch"!==data3&&"storable"!==data3&&"twilio"!==data3&&"unifi"!==data3&&"valcom"!==data3&&"vivotek"!==data3&&"vizio"!==data3&&"wisenet"!==data3&&"cloudflare-images"!==data3&&"cloudflare-stream"!==data3&&"insperia-privacy"!==data3){const err13={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.name&&"string"!=typeof data.name){const err14={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data.field1){let data5=data.field1;if(data5&&"object"==typeof data5&&!Array.isArray(data5)){if(void 0===data5.name){const err15={instancePath:instancePath+"/field1",schemaPath:"#/properties/field1/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0===data5.value){const err16={instancePath:instancePath+"/field1",schemaPath:"#/properties/field1/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data5.name&&"string"!=typeof data5.name){const err17={instancePath:instancePath+"/field1/name",schemaPath:"#/properties/field1/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data5.value&&"string"!=typeof data5.value){const err18={instancePath:instancePath+"/field1/value",schemaPath:"#/properties/field1/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}else{const err19={instancePath:instancePath+"/field1",schemaPath:"#/properties/field1/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data.field2){let data8=data.field2;if(data8&&"object"==typeof data8&&!Array.isArray(data8)){if(void 0===data8.name){const err20={instancePath:instancePath+"/field2",schemaPath:"#/properties/field2/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0===data8.value){const err21={instancePath:instancePath+"/field2",schemaPath:"#/properties/field2/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0!==data8.name&&"string"!=typeof data8.name){const err22={instancePath:instancePath+"/field2/name",schemaPath:"#/properties/field2/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data8.value&&"string"!=typeof data8.value){const err23={instancePath:instancePath+"/field2/value",schemaPath:"#/properties/field2/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}else{const err24={instancePath:instancePath+"/field2",schemaPath:"#/properties/field2/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.field3){let data11=data.field3;if(data11&&"object"==typeof data11&&!Array.isArray(data11)){if(void 0===data11.name){const err25={instancePath:instancePath+"/field3",schemaPath:"#/properties/field3/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0===data11.value){const err26={instancePath:instancePath+"/field3",schemaPath:"#/properties/field3/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data11.name&&"string"!=typeof data11.name){const err27={instancePath:instancePath+"/field3/name",schemaPath:"#/properties/field3/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data11.value&&"string"!=typeof data11.value){const err28={instancePath:instancePath+"/field3/value",schemaPath:"#/properties/field3/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}else{const err29={instancePath:instancePath+"/field3",schemaPath:"#/properties/field3/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}}if(void 0!==data.field4){let data14=data.field4;if(data14&&"object"==typeof data14&&!Array.isArray(data14)){if(void 0===data14.name){const err30={instancePath:instancePath+"/field4",schemaPath:"#/properties/field4/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(void 0===data14.value){const err31={instancePath:instancePath+"/field4",schemaPath:"#/properties/field4/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(void 0!==data14.name&&"string"!=typeof data14.name){const err32={instancePath:instancePath+"/field4/name",schemaPath:"#/properties/field4/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if(void 0!==data14.value&&"string"!=typeof data14.value){const err33={instancePath:instancePath+"/field4/value",schemaPath:"#/properties/field4/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}else{const err34={instancePath:instancePath+"/field4",schemaPath:"#/properties/field4/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}}if(void 0!==data.field5){let data17=data.field5;if(data17&&"object"==typeof data17&&!Array.isArray(data17)){if(void 0===data17.name){const err35={instancePath:instancePath+"/field5",schemaPath:"#/properties/field5/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(void 0===data17.value){const err36={instancePath:instancePath+"/field5",schemaPath:"#/properties/field5/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if(void 0!==data17.name&&"string"!=typeof data17.name){const err37={instancePath:instancePath+"/field5/name",schemaPath:"#/properties/field5/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}if(void 0!==data17.value&&"string"!=typeof data17.value){const err38={instancePath:instancePath+"/field5/value",schemaPath:"#/properties/field5/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}else{const err39={instancePath:instancePath+"/field5",schemaPath:"#/properties/field5/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}if(void 0!==data.field6){let data20=data.field6;if(data20&&"object"==typeof data20&&!Array.isArray(data20)){if(void 0===data20.name){const err40={instancePath:instancePath+"/field6",schemaPath:"#/properties/field6/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if(void 0===data20.value){const err41={instancePath:instancePath+"/field6",schemaPath:"#/properties/field6/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}if(void 0!==data20.name&&"string"!=typeof data20.name){const err42={instancePath:instancePath+"/field6/name",schemaPath:"#/properties/field6/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(void 0!==data20.value&&"string"!=typeof data20.value){const err43={instancePath:instancePath+"/field6/value",schemaPath:"#/properties/field6/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}}else{const err44={instancePath:instancePath+"/field6",schemaPath:"#/properties/field6/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}}else{const err45={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}return validate48.errors=vErrors,0===errors}__name(validate48,"validate48");var validateMediaFile=validate15,validateMediaSource=validate49,schema122={$schema:"http://json-schema.org/draft-07/schema",$id:"mediaSource.json",title:"Media Source",description:"Any media source",type:"object",required:["id","type","discriminator","audio","video","driver"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"mediaSource",enum:["mediaSource"]},discriminator:{type:"string",enum:["tv","dvr","appleTv","discPlayer","mediaPlayer","paSystem","uncontrolledDevice"]},playlists:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{$ref:"definitions.json#/definitions/name"}}}},remote:{type:"string",enum:["MR22GA","XRT260","XRT270","HOF-16K 1.2","219863500","SONIFI","AKB76039803","BN59-01388A"]},name:{$ref:"definitions.json#/definitions/name"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},audio:{type:"boolean"},video:{type:"boolean"},powerFeedback:{type:"boolean"},volumeFeedback:{type:"boolean"},muted:{type:"boolean"},volume:{type:"number",minimum:0,maximum:100},brightness:{type:"number",minimum:0,maximum:100},contrast:{type:"number",minimum:0,maximum:100},power:{type:"string",enum:["on","off"]},input:{type:"string"},supportedInputs:{type:"array",items:{type:"string"}},supportedOutputs:{type:"array",items:{type:"string"}},command:{type:["string","null"],enum:["mute","volumeUp","volumeDown","brightnessUp","brightnessDown","channelUp","channelDown","number0","number1","number2","number3","number4","number5","number6","number7","number8","number9","lastChannel","display","favoriteChannel","play","playing","stop","stopped","pause","paused","fastForward","fastForwarding","rewind","rewinding","instantReplay","record","ac3","pvrMenu","guide","menu","menuUp","menuDown","menuLeft","menuRight","pageUp","pageDown","select","exit","input","power","enterChannel","enterVolume","enterBrightness","enterContrast","number10","number11","number12","number13","number14","number15","number16","number10Plus","number20Plus","number100","dash","threeChan","threeD","sixChan","a","add","alarm","am","analog","angle","antenna","antennaEast","antennaWest","aspect","audio1","audio2","audio3","audioDumming","audioLevelDown","audioLevelUp","b","back","c","component1","component2","component3","d","home","list","liveTv","discreteInputCable","powerOff","powerOn","setupMenu","skipForward","skipReverse","video1","video2","video3","video4","video5","details","hdmi1","hdmi2","hdmi3","cecDeviceList","mtsSap","red","green","yellow","blue","alert","order"]},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},additionalProperties:!1};function validate50(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate50.errors=vErrors,0===errors}function validate49(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="mediaSource"),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.discriminator){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.audio){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"audio"},message:"must have required property 'audio'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.video){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"video"},message:"must have required property 'video'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.driver){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}for(const key0 in data)if(!func2.call(schema122.properties,key0)){const err6={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err7={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err8={};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(_errs6===errors){const err9={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err10={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("mediaSource"!==data1){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema122.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.discriminator){let data2=data.discriminator;if("string"!=typeof data2){const err12={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if("tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"paSystem"!==data2&&"uncontrolledDevice"!==data2){const err13={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema122.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.playlists){let data3=data.playlists;if(Array.isArray(data3)){const len0=data3.length;for(let i0=0;i0<len0;i0++){let data4=data3[i0];if(data4&&"object"==typeof data4&&!Array.isArray(data4)){if(void 0!==data4.id){let data5=data4.id;if("string"!=typeof data5){const err14={instancePath:instancePath+"/playlists/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}const _errs18=errors,_errs19=errors;if("global"!==data5&&"system"!==data5){const err15={};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(_errs19===errors){const err16={instancePath:instancePath+"/playlists/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}else errors=_errs18,null!==vErrors&&(_errs18?vErrors.length=_errs18:vErrors=null)}if(void 0!==data4.name&&"string"!=typeof data4.name){const err17={instancePath:instancePath+"/playlists/"+i0+"/name",schemaPath:"definitions.json#/definitions/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}else{const err18={instancePath:instancePath+"/playlists/"+i0,schemaPath:"#/properties/playlists/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}}else{const err19={instancePath:instancePath+"/playlists",schemaPath:"#/properties/playlists/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data.remote){let data7=data.remote;if("string"!=typeof data7){const err20={instancePath:instancePath+"/remote",schemaPath:"#/properties/remote/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if("MR22GA"!==data7&&"XRT260"!==data7&&"XRT270"!==data7&&"HOF-16K 1.2"!==data7&&"219863500"!==data7&&"SONIFI"!==data7&&"AKB76039803"!==data7&&"BN59-01388A"!==data7){const err21={instancePath:instancePath+"/remote",schemaPath:"#/properties/remote/enum",keyword:"enum",params:{allowedValues:schema122.properties.remote.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}if(void 0!==data.name&&"string"!=typeof data.name){const err22={instancePath:instancePath+"/name",schemaPath:"definitions.json#/definitions/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data.driver){let data9=data.driver;if("string"!=typeof data9){const err23={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if("adlink"!==data9&&"aws-kinesis"!==data9&&"butler"!==data9&&"crestron"!==data9&&"dell"!==data9&&"dmp"!==data9&&"doorbird"!==data9&&"dormakaba"!==data9&&"dsc"!==data9&&"ecobee"!==data9&&"epson"!==data9&&"geovision-rs"!==data9&&"geovision-as-manager"!==data9&&"honeywell-vista"!==data9&&"igor"!==data9&&"inncom"!==data9&&"isapi"!==data9&&"kohost-k7"!==data9&&"kohost"!==data9&&"lg"!==data9&&"lg-webos"!==data9&&"lapi"!==data9&&"lirc"!==data9&&"mews"!==data9&&"mht"!==data9&&"paxton"!==data9&&"pelican-wireless"!==data9&&"power-shades"!==data9&&"rachio"!==data9&&"rebrandly"!==data9&&"relay"!==data9&&"rtsp"!==data9&&"salto"!==data9&&"salto-irn"!==data9&&"samsung"!==data9&&"se"!==data9&&"sendgrid"!==data9&&"sonifi"!==data9&&"stay-n-touch"!==data9&&"storable"!==data9&&"twilio"!==data9&&"unifi"!==data9&&"valcom"!==data9&&"vivotek"!==data9&&"vizio"!==data9&&"wisenet"!==data9&&"cloudflare-images"!==data9&&"cloudflare-stream"!==data9&&"insperia-privacy"!==data9){const err24={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err25={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data.audio&&"boolean"!=typeof data.audio){const err26={instancePath:instancePath+"/audio",schemaPath:"#/properties/audio/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.video&&"boolean"!=typeof data.video){const err27={instancePath:instancePath+"/video",schemaPath:"#/properties/video/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data.powerFeedback&&"boolean"!=typeof data.powerFeedback){const err28={instancePath:instancePath+"/powerFeedback",schemaPath:"#/properties/powerFeedback/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data.volumeFeedback&&"boolean"!=typeof data.volumeFeedback){const err29={instancePath:instancePath+"/volumeFeedback",schemaPath:"#/properties/volumeFeedback/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data.muted&&"boolean"!=typeof data.muted){const err30={instancePath:instancePath+"/muted",schemaPath:"#/properties/muted/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(void 0!==data.volume){let data16=data.volume;if("number"==typeof data16){if(data16>100||isNaN(data16)){const err31={instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(data16<0||isNaN(data16)){const err32={instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}else{const err33={instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}if(void 0!==data.brightness){let data17=data.brightness;if("number"==typeof data17){if(data17>100||isNaN(data17)){const err34={instancePath:instancePath+"/brightness",schemaPath:"#/properties/brightness/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(data17<0||isNaN(data17)){const err35={instancePath:instancePath+"/brightness",schemaPath:"#/properties/brightness/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}}else{const err36={instancePath:instancePath+"/brightness",schemaPath:"#/properties/brightness/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}if(void 0!==data.contrast){let data18=data.contrast;if("number"==typeof data18){if(data18>100||isNaN(data18)){const err37={instancePath:instancePath+"/contrast",schemaPath:"#/properties/contrast/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}if(data18<0||isNaN(data18)){const err38={instancePath:instancePath+"/contrast",schemaPath:"#/properties/contrast/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}else{const err39={instancePath:instancePath+"/contrast",schemaPath:"#/properties/contrast/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}if(void 0!==data.power){let data19=data.power;if("string"!=typeof data19){const err40={instancePath:instancePath+"/power",schemaPath:"#/properties/power/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if("on"!==data19&&"off"!==data19){const err41={instancePath:instancePath+"/power",schemaPath:"#/properties/power/enum",keyword:"enum",params:{allowedValues:schema122.properties.power.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}if(void 0!==data.input&&"string"!=typeof data.input){const err42={instancePath:instancePath+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(void 0!==data.supportedInputs){let data21=data.supportedInputs;if(Array.isArray(data21)){const len1=data21.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data21[i1]){const err43={instancePath:instancePath+"/supportedInputs/"+i1,schemaPath:"#/properties/supportedInputs/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}}else{const err44={instancePath:instancePath+"/supportedInputs",schemaPath:"#/properties/supportedInputs/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}if(void 0!==data.supportedOutputs){let data23=data.supportedOutputs;if(Array.isArray(data23)){const len2=data23.length;for(let i2=0;i2<len2;i2++)if("string"!=typeof data23[i2]){const err45={instancePath:instancePath+"/supportedOutputs/"+i2,schemaPath:"#/properties/supportedOutputs/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}else{const err46={instancePath:instancePath+"/supportedOutputs",schemaPath:"#/properties/supportedOutputs/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}if(void 0!==data.command){let data25=data.command;if("string"!=typeof data25&&null!==data25){const err47={instancePath:instancePath+"/command",schemaPath:"#/properties/command/type",keyword:"type",params:{type:schema122.properties.command.type},message:"must be string,null"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}if("mute"!==data25&&"volumeUp"!==data25&&"volumeDown"!==data25&&"brightnessUp"!==data25&&"brightnessDown"!==data25&&"channelUp"!==data25&&"channelDown"!==data25&&"number0"!==data25&&"number1"!==data25&&"number2"!==data25&&"number3"!==data25&&"number4"!==data25&&"number5"!==data25&&"number6"!==data25&&"number7"!==data25&&"number8"!==data25&&"number9"!==data25&&"lastChannel"!==data25&&"display"!==data25&&"favoriteChannel"!==data25&&"play"!==data25&&"playing"!==data25&&"stop"!==data25&&"stopped"!==data25&&"pause"!==data25&&"paused"!==data25&&"fastForward"!==data25&&"fastForwarding"!==data25&&"rewind"!==data25&&"rewinding"!==data25&&"instantReplay"!==data25&&"record"!==data25&&"ac3"!==data25&&"pvrMenu"!==data25&&"guide"!==data25&&"menu"!==data25&&"menuUp"!==data25&&"menuDown"!==data25&&"menuLeft"!==data25&&"menuRight"!==data25&&"pageUp"!==data25&&"pageDown"!==data25&&"select"!==data25&&"exit"!==data25&&"input"!==data25&&"power"!==data25&&"enterChannel"!==data25&&"enterVolume"!==data25&&"enterBrightness"!==data25&&"enterContrast"!==data25&&"number10"!==data25&&"number11"!==data25&&"number12"!==data25&&"number13"!==data25&&"number14"!==data25&&"number15"!==data25&&"number16"!==data25&&"number10Plus"!==data25&&"number20Plus"!==data25&&"number100"!==data25&&"dash"!==data25&&"threeChan"!==data25&&"threeD"!==data25&&"sixChan"!==data25&&"a"!==data25&&"add"!==data25&&"alarm"!==data25&&"am"!==data25&&"analog"!==data25&&"angle"!==data25&&"antenna"!==data25&&"antennaEast"!==data25&&"antennaWest"!==data25&&"aspect"!==data25&&"audio1"!==data25&&"audio2"!==data25&&"audio3"!==data25&&"audioDumming"!==data25&&"audioLevelDown"!==data25&&"audioLevelUp"!==data25&&"b"!==data25&&"back"!==data25&&"c"!==data25&&"component1"!==data25&&"component2"!==data25&&"component3"!==data25&&"d"!==data25&&"home"!==data25&&"list"!==data25&&"liveTv"!==data25&&"discreteInputCable"!==data25&&"powerOff"!==data25&&"powerOn"!==data25&&"setupMenu"!==data25&&"skipForward"!==data25&&"skipReverse"!==data25&&"video1"!==data25&&"video2"!==data25&&"video3"!==data25&&"video4"!==data25&&"video5"!==data25&&"details"!==data25&&"hdmi1"!==data25&&"hdmi2"!==data25&&"hdmi3"!==data25&&"cecDeviceList"!==data25&&"mtsSap"!==data25&&"red"!==data25&&"green"!==data25&&"yellow"!==data25&&"blue"!==data25&&"alert"!==data25&&"order"!==data25){const err48={instancePath:instancePath+"/command",schemaPath:"#/properties/command/enum",keyword:"enum",params:{allowedValues:schema122.properties.command.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}}if(void 0!==data.supportedNotifications){let data26=data.supportedNotifications;if(Array.isArray(data26)){const len3=data26.length;for(let i3=0;i3<len3;i3++){let data27=data26[i3];if("button 1"!==data27&&"button 2"!==data27&&"button 3"!==data27&&"button 4"!==data27&&"button 5"!==data27&&"idle"!==data27&&"powerHasBeedApplied"!==data27&&"acMainsDisconnected"!==data27&&"acMainsReconnected"!==data27&&"replaceBatterySoon"!==data27&&"replaceBatteryNow"!==data27&&"batteryOk"!==data27&&"hardwareFailure"!==data27&&"softwareFailure"!==data27&&"hardwareFailureWithCode"!==data27&&"softwareFailureWithCode"!==data27&&"motionDetection"!==data27&&"airFilterNeedsCleaned"!==data27&&"airFilterNeedsReplaced"!==data27&&"smokeDetected"!==data27&&"outsideSafeTemperatureRange"!==data27&&"outsideSafeHumidityRange"!==data27&&"scheduleMaintenance"!==data27&&"doorAjar"!==data27&&"communicationFailure"!==data27&&"communicationOk"!==data27&&"burglarAlarm"!==data27&&"fireAlarm"!==data27){const err49={instancePath:instancePath+"/supportedNotifications/"+i3,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}}let j0,i4=data26.length;if(i4>1)outer0:for(;i4--;)for(j0=i4;j0--;)if(func0(data26[i4],data26[j0])){const err50={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i4,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i4+" are identical)"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++;break outer0}}else{const err51={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}}if(void 0!==data.notification&&(validate50(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate50.errors:vErrors.concat(validate50.errors),errors=vErrors.length)),void 0!==data.systemId&&"string"!=typeof data.systemId){const err52={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}if(void 0!==data.watts){let data30=data.watts;if("number"==typeof data30){if(data30<0||isNaN(data30)){const err53={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}}else{const err54={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err55={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err56={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err57={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err58={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}}else{const err59={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}return validate49.errors=vErrors,0===errors}__name(validate50,"validate50"),__name(validate49,"validate49");var validateMotionSensor=validate52,schema133={$schema:"http://json-schema.org/draft-07/schema",$id:"motionSensor.json",title:"Motion Sensor",description:"Any smart motion sensor",type:"object",required:["id","type","driver"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},driver:{$ref:"definitions.json#/definitions/driver"},systemId:{$ref:"definitions.json#/definitions/systemId"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}}};function validate53(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate53.errors=vErrors,0===errors}function validate52(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.driver){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}for(const key0 in data)if(!func2.call(schema133.properties,key0)){const err3={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs6===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}if(void 0!==data.type){let data1=data.type;if("string"!=typeof data1){const err7={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("alarm"!==data1&&"dimmer"!==data1&&"switch"!==data1&&"motionSensor"!==data1&&"windowCovering"!==data1&&"camera"!==data1&&"mediaSource"!==data1&&"thermostat"!==data1&&"lock"!==data1&&"courtesy"!==data1&&"gateway"!==data1&&"tv"!==data1&&"dvr"!==data1&&"appleTv"!==data1&&"discPlayer"!==data1&&"mediaPlayer"!==data1&&"uncontrolledDevice"!==data1){const err8={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema43.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.driver){let data2=data.driver;if("string"!=typeof data2){const err9={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("adlink"!==data2&&"aws-kinesis"!==data2&&"butler"!==data2&&"crestron"!==data2&&"dell"!==data2&&"dmp"!==data2&&"doorbird"!==data2&&"dormakaba"!==data2&&"dsc"!==data2&&"ecobee"!==data2&&"epson"!==data2&&"geovision-rs"!==data2&&"geovision-as-manager"!==data2&&"honeywell-vista"!==data2&&"igor"!==data2&&"inncom"!==data2&&"isapi"!==data2&&"kohost-k7"!==data2&&"kohost"!==data2&&"lg"!==data2&&"lg-webos"!==data2&&"lapi"!==data2&&"lirc"!==data2&&"mews"!==data2&&"mht"!==data2&&"paxton"!==data2&&"pelican-wireless"!==data2&&"power-shades"!==data2&&"rachio"!==data2&&"rebrandly"!==data2&&"relay"!==data2&&"rtsp"!==data2&&"salto"!==data2&&"salto-irn"!==data2&&"samsung"!==data2&&"se"!==data2&&"sendgrid"!==data2&&"sonifi"!==data2&&"stay-n-touch"!==data2&&"storable"!==data2&&"twilio"!==data2&&"unifi"!==data2&&"valcom"!==data2&&"vivotek"!==data2&&"vizio"!==data2&&"wisenet"!==data2&&"cloudflare-images"!==data2&&"cloudflare-stream"!==data2&&"insperia-privacy"!==data2){const err10={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err11={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.supportedNotifications){let data4=data.supportedNotifications;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++){let data5=data4[i0];if("button 1"!==data5&&"button 2"!==data5&&"button 3"!==data5&&"button 4"!==data5&&"button 5"!==data5&&"idle"!==data5&&"powerHasBeedApplied"!==data5&&"acMainsDisconnected"!==data5&&"acMainsReconnected"!==data5&&"replaceBatterySoon"!==data5&&"replaceBatteryNow"!==data5&&"batteryOk"!==data5&&"hardwareFailure"!==data5&&"softwareFailure"!==data5&&"hardwareFailureWithCode"!==data5&&"softwareFailureWithCode"!==data5&&"motionDetection"!==data5&&"airFilterNeedsCleaned"!==data5&&"airFilterNeedsReplaced"!==data5&&"smokeDetected"!==data5&&"outsideSafeTemperatureRange"!==data5&&"outsideSafeHumidityRange"!==data5&&"scheduleMaintenance"!==data5&&"doorAjar"!==data5&&"communicationFailure"!==data5&&"communicationOk"!==data5&&"burglarAlarm"!==data5&&"fireAlarm"!==data5){const err12={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}let j0,i1=data4.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data4[i1],data4[j0])){const err13={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++;break outer0}}else{const err14={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.notification&&(validate53(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate53.errors:vErrors.concat(validate53.errors),errors=vErrors.length)),void 0!==data.watts){let data7=data.watts;if("number"==typeof data7){if(data7<0||isNaN(data7)){const err15={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}else{const err16={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err17={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err18={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err19={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err20={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}else{const err21={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}return validate52.errors=vErrors,0===errors}__name(validate53,"validate53"),__name(validate52,"validate52");var validateOrder=validate55,schema142={$schema:"http://json-schema.org/draft-07/schema",$id:"order.json",title:"Order",description:"A purchase order for products or services.",type:"object",required:["type","status"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"order",enum:["order"]},orderNumber:{type:"string"},status:{type:"string",enum:["draft","pendingPayment","processing","outForDelivery","completed","paymentFailed","cancelled","refunded"]},userId:{$ref:"definitions.json#/definitions/id",description:"User id of purchaser"},reservationId:{$ref:"definitions.json#/definitions/id",description:"Reservation id if the order is for a reservation"},date:{$ref:"definitions.json#/definitions/date"},items:{type:"array",default:[],items:{type:"object",required:["name","price"],properties:{additionalProperties:!1,name:{type:"string"},sku:{type:"string"},quantity:{type:"number",default:1},price:{type:"number"},taxClass:{type:"string"},deliveryClass:{type:"string"},productId:{type:"string"}}}},taxes:{type:"array",default:[],items:{type:"object",required:["name","rate"],properties:{additionalProperties:!1,name:{type:"string"},class:{type:"string"},rateType:{type:"string",enum:["percentage","flat"],default:"percentage"},rate:{type:"number"},total:{type:"number"}}}},fees:{type:"array",default:[],items:{type:"object",required:["name","price"],properties:{additionalProperties:!1,name:{type:"string"},price:{type:"number"}}}},delivery:{type:"array",default:[],items:{type:"object",required:["name","rate"],properties:{additionalProperties:!1,name:{type:"string"},class:{type:"string"},rateType:{type:"string",enum:["percentage","flat"],default:"percentage"},rate:{type:"number"},total:{type:"number"}}}},payments:{type:"array",default:[],items:{type:"object",properties:{method:{type:"string",enum:["folio","invoice","amex","visa","masterCard","maestro","discover","diners","jcb","applePay","alipay","chinaUnionPay","vpay"]},name:{type:"string"},date:{$ref:"definitions.json#/definitions/date"},amount:{type:"number"},transactionReference:{type:"string"}}}}}};function validate55(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="order"),void 0===data.items&&(data.items=[]),void 0===data.taxes&&(data.taxes=[]),void 0===data.fees&&(data.fees=[]),void 0===data.delivery&&(data.delivery=[]),void 0===data.payments&&(data.payments=[]),void 0===data.type){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.status){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs5===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if("order"!==data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema142.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.orderNumber&&"string"!=typeof data.orderNumber){const err7={instancePath:instancePath+"/orderNumber",schemaPath:"#/properties/orderNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.status){let data3=data.status;if("string"!=typeof data3){const err8={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("draft"!==data3&&"pendingPayment"!==data3&&"processing"!==data3&&"outForDelivery"!==data3&&"completed"!==data3&&"paymentFailed"!==data3&&"cancelled"!==data3&&"refunded"!==data3){const err9={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema142.properties.status.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.userId){let data4=data.userId;if("string"!=typeof data4){const err10={instancePath:instancePath+"/userId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}const _errs15=errors,_errs16=errors;if("global"!==data4&&"system"!==data4){const err11={};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(_errs16===errors){const err12={instancePath:instancePath+"/userId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}else errors=_errs15,null!==vErrors&&(_errs15?vErrors.length=_errs15:vErrors=null)}if(void 0!==data.reservationId){let data5=data.reservationId;if("string"!=typeof data5){const err13={instancePath:instancePath+"/reservationId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}const _errs20=errors,_errs21=errors;if("global"!==data5&&"system"!==data5){const err14={};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(_errs21===errors){const err15={instancePath:instancePath+"/reservationId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}else errors=_errs20,null!==vErrors&&(_errs20?vErrors.length=_errs20:vErrors=null)}if(void 0!==data.date){let data6=data.date;if("string"!=typeof data6&&(!data6||"object"!=typeof data6||Array.isArray(data6))){const err16={instancePath:instancePath+"/date",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("string"==typeof data6&&!formats4.validate(data6)){const err17={instancePath:instancePath+"/date",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}let data7=data.items;if(Array.isArray(data7)){const len0=data7.length;for(let i0=0;i0<len0;i0++){let data8=data7[i0];if(data8&&"object"==typeof data8&&!Array.isArray(data8)){if(void 0===data8.quantity&&(data8.quantity=1),void 0===data8.name){const err18={instancePath:instancePath+"/items/"+i0,schemaPath:"#/properties/items/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0===data8.price){const err19={instancePath:instancePath+"/items/"+i0,schemaPath:"#/properties/items/items/required",keyword:"required",params:{missingProperty:"price"},message:"must have required property 'price'"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data8.additionalProperties){const err20={instancePath:instancePath+"/items/"+i0+"/additionalProperties",schemaPath:"#/properties/items/items/properties/additionalProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data8.name&&"string"!=typeof data8.name){const err21={instancePath:instancePath+"/items/"+i0+"/name",schemaPath:"#/properties/items/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0!==data8.sku&&"string"!=typeof data8.sku){const err22={instancePath:instancePath+"/items/"+i0+"/sku",schemaPath:"#/properties/items/items/properties/sku/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if("number"!=typeof data8.quantity){const err23={instancePath:instancePath+"/items/"+i0+"/quantity",schemaPath:"#/properties/items/items/properties/quantity/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data8.price&&"number"!=typeof data8.price){const err24={instancePath:instancePath+"/items/"+i0+"/price",schemaPath:"#/properties/items/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data8.taxClass&&"string"!=typeof data8.taxClass){const err25={instancePath:instancePath+"/items/"+i0+"/taxClass",schemaPath:"#/properties/items/items/properties/taxClass/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data8.deliveryClass&&"string"!=typeof data8.deliveryClass){const err26={instancePath:instancePath+"/items/"+i0+"/deliveryClass",schemaPath:"#/properties/items/items/properties/deliveryClass/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data8.productId&&"string"!=typeof data8.productId){const err27={instancePath:instancePath+"/items/"+i0+"/productId",schemaPath:"#/properties/items/items/properties/productId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}else{const err28={instancePath:instancePath+"/items/"+i0,schemaPath:"#/properties/items/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}}else{const err29={instancePath:instancePath+"/items",schemaPath:"#/properties/items/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}let data17=data.taxes;if(Array.isArray(data17)){const len1=data17.length;for(let i1=0;i1<len1;i1++){let data18=data17[i1];if(data18&&"object"==typeof data18&&!Array.isArray(data18)){if(void 0===data18.rateType&&(data18.rateType="percentage"),void 0===data18.name){const err30={instancePath:instancePath+"/taxes/"+i1,schemaPath:"#/properties/taxes/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(void 0===data18.rate){const err31={instancePath:instancePath+"/taxes/"+i1,schemaPath:"#/properties/taxes/items/required",keyword:"required",params:{missingProperty:"rate"},message:"must have required property 'rate'"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(void 0!==data18.additionalProperties){const err32={instancePath:instancePath+"/taxes/"+i1+"/additionalProperties",schemaPath:"#/properties/taxes/items/properties/additionalProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if(void 0!==data18.name&&"string"!=typeof data18.name){const err33={instancePath:instancePath+"/taxes/"+i1+"/name",schemaPath:"#/properties/taxes/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(void 0!==data18.class&&"string"!=typeof data18.class){const err34={instancePath:instancePath+"/taxes/"+i1+"/class",schemaPath:"#/properties/taxes/items/properties/class/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}let data22=data18.rateType;if("string"!=typeof data22){const err35={instancePath:instancePath+"/taxes/"+i1+"/rateType",schemaPath:"#/properties/taxes/items/properties/rateType/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if("percentage"!==data22&&"flat"!==data22){const err36={instancePath:instancePath+"/taxes/"+i1+"/rateType",schemaPath:"#/properties/taxes/items/properties/rateType/enum",keyword:"enum",params:{allowedValues:schema142.properties.taxes.items.properties.rateType.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if(void 0!==data18.rate&&"number"!=typeof data18.rate){const err37={instancePath:instancePath+"/taxes/"+i1+"/rate",schemaPath:"#/properties/taxes/items/properties/rate/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}if(void 0!==data18.total&&"number"!=typeof data18.total){const err38={instancePath:instancePath+"/taxes/"+i1+"/total",schemaPath:"#/properties/taxes/items/properties/total/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}else{const err39={instancePath:instancePath+"/taxes/"+i1,schemaPath:"#/properties/taxes/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}}else{const err40={instancePath:instancePath+"/taxes",schemaPath:"#/properties/taxes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}let data25=data.fees;if(Array.isArray(data25)){const len2=data25.length;for(let i2=0;i2<len2;i2++){let data26=data25[i2];if(data26&&"object"==typeof data26&&!Array.isArray(data26)){if(void 0===data26.name){const err41={instancePath:instancePath+"/fees/"+i2,schemaPath:"#/properties/fees/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}if(void 0===data26.price){const err42={instancePath:instancePath+"/fees/"+i2,schemaPath:"#/properties/fees/items/required",keyword:"required",params:{missingProperty:"price"},message:"must have required property 'price'"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(void 0!==data26.additionalProperties){const err43={instancePath:instancePath+"/fees/"+i2+"/additionalProperties",schemaPath:"#/properties/fees/items/properties/additionalProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}if(void 0!==data26.name&&"string"!=typeof data26.name){const err44={instancePath:instancePath+"/fees/"+i2+"/name",schemaPath:"#/properties/fees/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}if(void 0!==data26.price&&"number"!=typeof data26.price){const err45={instancePath:instancePath+"/fees/"+i2+"/price",schemaPath:"#/properties/fees/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}else{const err46={instancePath:instancePath+"/fees/"+i2,schemaPath:"#/properties/fees/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}}else{const err47={instancePath:instancePath+"/fees",schemaPath:"#/properties/fees/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}let data30=data.delivery;if(Array.isArray(data30)){const len3=data30.length;for(let i3=0;i3<len3;i3++){let data31=data30[i3];if(data31&&"object"==typeof data31&&!Array.isArray(data31)){if(void 0===data31.rateType&&(data31.rateType="percentage"),void 0===data31.name){const err48={instancePath:instancePath+"/delivery/"+i3,schemaPath:"#/properties/delivery/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}if(void 0===data31.rate){const err49={instancePath:instancePath+"/delivery/"+i3,schemaPath:"#/properties/delivery/items/required",keyword:"required",params:{missingProperty:"rate"},message:"must have required property 'rate'"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}if(void 0!==data31.additionalProperties){const err50={instancePath:instancePath+"/delivery/"+i3+"/additionalProperties",schemaPath:"#/properties/delivery/items/properties/additionalProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}if(void 0!==data31.name&&"string"!=typeof data31.name){const err51={instancePath:instancePath+"/delivery/"+i3+"/name",schemaPath:"#/properties/delivery/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}if(void 0!==data31.class&&"string"!=typeof data31.class){const err52={instancePath:instancePath+"/delivery/"+i3+"/class",schemaPath:"#/properties/delivery/items/properties/class/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}let data35=data31.rateType;if("string"!=typeof data35){const err53={instancePath:instancePath+"/delivery/"+i3+"/rateType",schemaPath:"#/properties/delivery/items/properties/rateType/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}if("percentage"!==data35&&"flat"!==data35){const err54={instancePath:instancePath+"/delivery/"+i3+"/rateType",schemaPath:"#/properties/delivery/items/properties/rateType/enum",keyword:"enum",params:{allowedValues:schema142.properties.delivery.items.properties.rateType.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}if(void 0!==data31.rate&&"number"!=typeof data31.rate){const err55={instancePath:instancePath+"/delivery/"+i3+"/rate",schemaPath:"#/properties/delivery/items/properties/rate/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}if(void 0!==data31.total&&"number"!=typeof data31.total){const err56={instancePath:instancePath+"/delivery/"+i3+"/total",schemaPath:"#/properties/delivery/items/properties/total/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}}else{const err57={instancePath:instancePath+"/delivery/"+i3,schemaPath:"#/properties/delivery/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}}}else{const err58={instancePath:instancePath+"/delivery",schemaPath:"#/properties/delivery/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}let data38=data.payments;if(Array.isArray(data38)){const len4=data38.length;for(let i4=0;i4<len4;i4++){let data39=data38[i4];if(data39&&"object"==typeof data39&&!Array.isArray(data39)){if(void 0!==data39.method){let data40=data39.method;if("string"!=typeof data40){const err59={instancePath:instancePath+"/payments/"+i4+"/method",schemaPath:"#/properties/payments/items/properties/method/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}if("folio"!==data40&&"invoice"!==data40&&"amex"!==data40&&"visa"!==data40&&"masterCard"!==data40&&"maestro"!==data40&&"discover"!==data40&&"diners"!==data40&&"jcb"!==data40&&"applePay"!==data40&&"alipay"!==data40&&"chinaUnionPay"!==data40&&"vpay"!==data40){const err60={instancePath:instancePath+"/payments/"+i4+"/method",schemaPath:"#/properties/payments/items/properties/method/enum",keyword:"enum",params:{allowedValues:schema142.properties.payments.items.properties.method.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err60]:vErrors.push(err60),errors++}}if(void 0!==data39.name&&"string"!=typeof data39.name){const err61={instancePath:instancePath+"/payments/"+i4+"/name",schemaPath:"#/properties/payments/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err61]:vErrors.push(err61),errors++}if(void 0!==data39.date){let data42=data39.date;if("string"!=typeof data42&&(!data42||"object"!=typeof data42||Array.isArray(data42))){const err62={instancePath:instancePath+"/payments/"+i4+"/date",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err62]:vErrors.push(err62),errors++}if("string"==typeof data42&&!formats4.validate(data42)){const err63={instancePath:instancePath+"/payments/"+i4+"/date",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err63]:vErrors.push(err63),errors++}}if(void 0!==data39.amount&&"number"!=typeof data39.amount){const err64={instancePath:instancePath+"/payments/"+i4+"/amount",schemaPath:"#/properties/payments/items/properties/amount/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err64]:vErrors.push(err64),errors++}if(void 0!==data39.transactionReference&&"string"!=typeof data39.transactionReference){const err65={instancePath:instancePath+"/payments/"+i4+"/transactionReference",schemaPath:"#/properties/payments/items/properties/transactionReference/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err65]:vErrors.push(err65),errors++}}else{const err66={instancePath:instancePath+"/payments/"+i4,schemaPath:"#/properties/payments/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err66]:vErrors.push(err66),errors++}}}else{const err67={instancePath:instancePath+"/payments",schemaPath:"#/properties/payments/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err67]:vErrors.push(err67),errors++}}else{const err68={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err68]:vErrors.push(err68),errors++}return validate55.errors=vErrors,0===errors}__name(validate55,"validate55");var validateOrganization=validate56,schema148={$schema:"http://json-schema.org/draft-07/schema",$id:"organization.json",title:"Organization",type:"object",description:"An organization is a group or entity that subscribes to Kohost software.",required:["accountNumber","name"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"organization",enum:["organization"]},accountNumber:{type:["number","null"],minimum:1e4},name:{type:"string"},properties:{type:"array",items:{type:"string"}},hostname:{type:["string","null"]},appManifest:{type:"object",properties:{name:{type:"string"},short_name:{type:"string"},scope:{type:"string"},start_url:{type:"string"},themeColor:{type:"string"},backgroundColor:{type:"string"},display:{type:"string",enum:["fullscreen","standalone","minimal-ui","browser"],default:"fullscreen"},orientation:{type:"string",enum:["portrait","landscape"],default:"portrait"},splash:{type:"object",properties:{src:{type:"string"},type:{type:"string"},sizes:{type:"string"}}},icons:{type:"array",items:{type:"object",properties:{src:{type:"string"},sizes:{type:"string"},type:{type:"string"}}}},logo:{type:"object",properties:{src:{type:"string"},type:{type:"string"},sizes:{type:"string"}}}},default:{name:"Kohost",short_name:"Kohost",start_url:"/",scope:"/",display:"fullscreen",orientation:"portrait",theme_color:"#1d1f22",background_color:"#1d1f22",icons:[{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/9c85047f-ccba-4b1c-3070-5463fbe93b00/w=512",sizes:"512x512",type:"image/png"}],splash:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/034fb112-5326-4d37-373e-d1cc2a4d0400/w=1500",sizes:"1500x800",type:"image/jpg"},logo:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/1e54c54d-3bac-4745-f46f-c2f98036af00/h=75",sizes:"300x75",type:"image/png"}}},tickets:{type:"object",properties:{nextTicketNumber:{type:["string","integer"],default:1}}},credentials:{type:"object",additionalProperties:!0},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}},schema101={type:["string","object"],format:"date-time"},schema151={type:["string","object"],format:"date-time"};function validate56(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="organization"),void 0===data.appManifest&&(data.appManifest={name:"Kohost",short_name:"Kohost",start_url:"/",scope:"/",display:"fullscreen",orientation:"portrait",theme_color:"#1d1f22",background_color:"#1d1f22",icons:[{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/9c85047f-ccba-4b1c-3070-5463fbe93b00/w=512",sizes:"512x512",type:"image/png"}],splash:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/034fb112-5326-4d37-373e-d1cc2a4d0400/w=1500",sizes:"1500x800",type:"image/jpg"},logo:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/1e54c54d-3bac-4745-f46f-c2f98036af00/h=75",sizes:"300x75",type:"image/png"}}),void 0===data.accountNumber){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"accountNumber"},message:"must have required property 'accountNumber'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.name){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}for(const key0 in data)if(!func2.call(schema148.properties,key0)){const err2={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs6===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if("organization"!==data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema148.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.accountNumber){let data2=data.accountNumber;if("number"!=typeof data2&&null!==data2){const err8={instancePath:instancePath+"/accountNumber",schemaPath:"#/properties/accountNumber/type",keyword:"type",params:{type:schema148.properties.accountNumber.type},message:"must be number,null"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("number"==typeof data2&&(data2<1e4||isNaN(data2))){const err9={instancePath:instancePath+"/accountNumber",schemaPath:"#/properties/accountNumber/minimum",keyword:"minimum",params:{comparison:">=",limit:1e4},message:"must be >= 10000"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.name&&"string"!=typeof data.name){const err10={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.properties){let data4=data.properties;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++)if("string"!=typeof data4[i0]){const err11={instancePath:instancePath+"/properties/"+i0,schemaPath:"#/properties/properties/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}else{const err12={instancePath:instancePath+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.hostname){let data6=data.hostname;if("string"!=typeof data6&&null!==data6){const err13={instancePath:instancePath+"/hostname",schemaPath:"#/properties/hostname/type",keyword:"type",params:{type:schema148.properties.hostname.type},message:"must be string,null"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}let data7=data.appManifest;if(data7&&"object"==typeof data7&&!Array.isArray(data7)){if(void 0===data7.display&&(data7.display="fullscreen"),void 0===data7.orientation&&(data7.orientation="portrait"),void 0!==data7.name&&"string"!=typeof data7.name){const err14={instancePath:instancePath+"/appManifest/name",schemaPath:"#/properties/appManifest/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data7.short_name&&"string"!=typeof data7.short_name){const err15={instancePath:instancePath+"/appManifest/short_name",schemaPath:"#/properties/appManifest/properties/short_name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data7.scope&&"string"!=typeof data7.scope){const err16={instancePath:instancePath+"/appManifest/scope",schemaPath:"#/properties/appManifest/properties/scope/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data7.start_url&&"string"!=typeof data7.start_url){const err17={instancePath:instancePath+"/appManifest/start_url",schemaPath:"#/properties/appManifest/properties/start_url/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data7.themeColor&&"string"!=typeof data7.themeColor){const err18={instancePath:instancePath+"/appManifest/themeColor",schemaPath:"#/properties/appManifest/properties/themeColor/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data7.backgroundColor&&"string"!=typeof data7.backgroundColor){const err19={instancePath:instancePath+"/appManifest/backgroundColor",schemaPath:"#/properties/appManifest/properties/backgroundColor/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}let data14=data7.display;if("string"!=typeof data14){const err20={instancePath:instancePath+"/appManifest/display",schemaPath:"#/properties/appManifest/properties/display/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if("fullscreen"!==data14&&"standalone"!==data14&&"minimal-ui"!==data14&&"browser"!==data14){const err21={instancePath:instancePath+"/appManifest/display",schemaPath:"#/properties/appManifest/properties/display/enum",keyword:"enum",params:{allowedValues:schema148.properties.appManifest.properties.display.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}let data15=data7.orientation;if("string"!=typeof data15){const err22={instancePath:instancePath+"/appManifest/orientation",schemaPath:"#/properties/appManifest/properties/orientation/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if("portrait"!==data15&&"landscape"!==data15){const err23={instancePath:instancePath+"/appManifest/orientation",schemaPath:"#/properties/appManifest/properties/orientation/enum",keyword:"enum",params:{allowedValues:schema148.properties.appManifest.properties.orientation.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data7.splash){let data16=data7.splash;if(data16&&"object"==typeof data16&&!Array.isArray(data16)){if(void 0!==data16.src&&"string"!=typeof data16.src){const err24={instancePath:instancePath+"/appManifest/splash/src",schemaPath:"#/properties/appManifest/properties/splash/properties/src/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data16.type&&"string"!=typeof data16.type){const err25={instancePath:instancePath+"/appManifest/splash/type",schemaPath:"#/properties/appManifest/properties/splash/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data16.sizes&&"string"!=typeof data16.sizes){const err26={instancePath:instancePath+"/appManifest/splash/sizes",schemaPath:"#/properties/appManifest/properties/splash/properties/sizes/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}else{const err27={instancePath:instancePath+"/appManifest/splash",schemaPath:"#/properties/appManifest/properties/splash/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}if(void 0!==data7.icons){let data20=data7.icons;if(Array.isArray(data20)){const len1=data20.length;for(let i1=0;i1<len1;i1++){let data21=data20[i1];if(data21&&"object"==typeof data21&&!Array.isArray(data21)){if(void 0!==data21.src&&"string"!=typeof data21.src){const err28={instancePath:instancePath+"/appManifest/icons/"+i1+"/src",schemaPath:"#/properties/appManifest/properties/icons/items/properties/src/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data21.sizes&&"string"!=typeof data21.sizes){const err29={instancePath:instancePath+"/appManifest/icons/"+i1+"/sizes",schemaPath:"#/properties/appManifest/properties/icons/items/properties/sizes/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data21.type&&"string"!=typeof data21.type){const err30={instancePath:instancePath+"/appManifest/icons/"+i1+"/type",schemaPath:"#/properties/appManifest/properties/icons/items/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}else{const err31={instancePath:instancePath+"/appManifest/icons/"+i1,schemaPath:"#/properties/appManifest/properties/icons/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}}else{const err32={instancePath:instancePath+"/appManifest/icons",schemaPath:"#/properties/appManifest/properties/icons/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}if(void 0!==data7.logo){let data25=data7.logo;if(data25&&"object"==typeof data25&&!Array.isArray(data25)){if(void 0!==data25.src&&"string"!=typeof data25.src){const err33={instancePath:instancePath+"/appManifest/logo/src",schemaPath:"#/properties/appManifest/properties/logo/properties/src/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(void 0!==data25.type&&"string"!=typeof data25.type){const err34={instancePath:instancePath+"/appManifest/logo/type",schemaPath:"#/properties/appManifest/properties/logo/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(void 0!==data25.sizes&&"string"!=typeof data25.sizes){const err35={instancePath:instancePath+"/appManifest/logo/sizes",schemaPath:"#/properties/appManifest/properties/logo/properties/sizes/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}}else{const err36={instancePath:instancePath+"/appManifest/logo",schemaPath:"#/properties/appManifest/properties/logo/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}}else{const err37={instancePath:instancePath+"/appManifest",schemaPath:"#/properties/appManifest/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}if(void 0!==data.tickets){let data29=data.tickets;if(data29&&"object"==typeof data29&&!Array.isArray(data29)){void 0===data29.nextTicketNumber&&(data29.nextTicketNumber=1);let data30=data29.nextTicketNumber;if("string"!=typeof data30&&("number"!=typeof data30||data30%1||isNaN(data30))){const err38={instancePath:instancePath+"/tickets/nextTicketNumber",schemaPath:"#/properties/tickets/properties/nextTicketNumber/type",keyword:"type",params:{type:schema148.properties.tickets.properties.nextTicketNumber.type},message:"must be string,integer"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}else{const err39={instancePath:instancePath+"/tickets",schemaPath:"#/properties/tickets/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}if(void 0!==data.credentials){let data31=data.credentials;if(!data31||"object"!=typeof data31||Array.isArray(data31)){const err40={instancePath:instancePath+"/credentials",schemaPath:"#/properties/credentials/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}}if(void 0!==data.createdAt){let data32=data.createdAt;if("string"!=typeof data32&&(!data32||"object"!=typeof data32||Array.isArray(data32))){const err41={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema101.type},message:"must be string,object"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}if("string"==typeof data32&&!formats4.validate(data32)){const err42={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}}if(void 0!==data.updatedAt){let data33=data.updatedAt;if("string"!=typeof data33&&(!data33||"object"!=typeof data33||Array.isArray(data33))){const err43={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:schema151.type},message:"must be string,object"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}if("string"==typeof data33&&!formats4.validate(data33)){const err44={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}}else{const err45={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}return validate56.errors=vErrors,0===errors}__name(validate56,"validate56");var validatePayment=validate57,schema152={$schema:"http://json-schema.org/draft-07/schema",$id:"payment.json",title:"Payment",type:"object",required:["type","maskedNumber","expires"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["amex","visa","masterCard","maestro","discover","diners","jcb","applePay","alipay","chinaUnionPay","vpay"]},enabled:{type:"boolean",default:!0},storageData:{type:["string","null"]},maskedNumber:{type:"string"},issued:{type:["string","null"]},expires:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"}}};function validate57(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.enabled&&(data.enabled=!0),void 0===data.type){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.maskedNumber){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"maskedNumber"},message:"must have required property 'maskedNumber'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.expires){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expires"},message:"must have required property 'expires'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}for(const key0 in data)if("id"!==key0&&"type"!==key0&&"enabled"!==key0&&"storageData"!==key0&&"maskedNumber"!==key0&&"issued"!==key0&&"expires"!==key0&&"systemId"!==key0){const err3={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs6===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}if(void 0!==data.type){let data1=data.type;if("string"!=typeof data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("amex"!==data1&&"visa"!==data1&&"masterCard"!==data1&&"maestro"!==data1&&"discover"!==data1&&"diners"!==data1&&"jcb"!==data1&&"applePay"!==data1&&"alipay"!==data1&&"chinaUnionPay"!==data1&&"vpay"!==data1){const err8={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema152.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if("boolean"!=typeof data.enabled){const err9={instancePath:instancePath+"/enabled",schemaPath:"#/properties/enabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.storageData){let data3=data.storageData;if("string"!=typeof data3&&null!==data3){const err10={instancePath:instancePath+"/storageData",schemaPath:"#/properties/storageData/type",keyword:"type",params:{type:schema152.properties.storageData.type},message:"must be string,null"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.maskedNumber&&"string"!=typeof data.maskedNumber){const err11={instancePath:instancePath+"/maskedNumber",schemaPath:"#/properties/maskedNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.issued){let data5=data.issued;if("string"!=typeof data5&&null!==data5){const err12={instancePath:instancePath+"/issued",schemaPath:"#/properties/issued/type",keyword:"type",params:{type:schema152.properties.issued.type},message:"must be string,null"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.expires&&"string"!=typeof data.expires){const err13={instancePath:instancePath+"/expires",schemaPath:"#/properties/expires/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err14={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}else{const err15={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}return validate57.errors=vErrors,0===errors}__name(validate57,"validate57");var validatePolicy=validate58,schema155={$schema:"http://json-schema.org/draft-07/schema",$id:"policy.json",title:"Policy",description:"A policy is a set of permissions that can be applied to a user to limit their access to resources.",type:"object",required:["name","type","organizationId","propertyId","permissions","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"policy",enum:["policy"]},discriminator:{type:"string",enum:["user"]},name:{type:"string",minLength:1},description:{type:"string"},organizationId:{type:"string"},propertyId:{type:"string"},permissions:{type:"array",items:{type:"object",required:["entities","effect"],properties:{entities:{type:"array",items:{type:"string",pattern:"^[^:]+(:.+)+$"}},effect:{type:"string",enum:["Allow","Deny"]}}}}}},pattern2=new RegExp("^[^:]+(:.+)+$","u");function validate58(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="policy"),void 0===data.name){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.organizationId){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"organizationId"},message:"must have required property 'organizationId'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.propertyId){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"propertyId"},message:"must have required property 'propertyId'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.permissions){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"permissions"},message:"must have required property 'permissions'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.discriminator){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err7={};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(_errs5===errors){const err8={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err9={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("policy"!==data1){const err10={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema155.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.discriminator){let data2=data.discriminator;if("string"!=typeof data2){const err11={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("user"!==data2){const err12={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema155.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.name){let data3=data.name;if("string"==typeof data3){if(func4(data3)<1){const err13={instancePath:instancePath+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}else{const err14={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err15={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data.organizationId&&"string"!=typeof data.organizationId){const err16={instancePath:instancePath+"/organizationId",schemaPath:"#/properties/organizationId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.propertyId&&"string"!=typeof data.propertyId){const err17={instancePath:instancePath+"/propertyId",schemaPath:"#/properties/propertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.permissions){let data7=data.permissions;if(Array.isArray(data7)){const len0=data7.length;for(let i0=0;i0<len0;i0++){let data8=data7[i0];if(data8&&"object"==typeof data8&&!Array.isArray(data8)){if(void 0===data8.entities){const err18={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"entities"},message:"must have required property 'entities'"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0===data8.effect){const err19={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"effect"},message:"must have required property 'effect'"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data8.entities){let data9=data8.entities;if(Array.isArray(data9)){const len1=data9.length;for(let i1=0;i1<len1;i1++){let data10=data9[i1];if("string"==typeof data10){if(!pattern2.test(data10)){const err20={instancePath:instancePath+"/permissions/"+i0+"/entities/"+i1,schemaPath:"#/properties/permissions/items/properties/entities/items/pattern",keyword:"pattern",params:{pattern:"^[^:]+(:.+)+$"},message:'must match pattern "^[^:]+(:.+)+$"'};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}else{const err21={instancePath:instancePath+"/permissions/"+i0+"/entities/"+i1,schemaPath:"#/properties/permissions/items/properties/entities/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}}else{const err22={instancePath:instancePath+"/permissions/"+i0+"/entities",schemaPath:"#/properties/permissions/items/properties/entities/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data8.effect){let data11=data8.effect;if("string"!=typeof data11){const err23={instancePath:instancePath+"/permissions/"+i0+"/effect",schemaPath:"#/properties/permissions/items/properties/effect/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if("Allow"!==data11&&"Deny"!==data11){const err24={instancePath:instancePath+"/permissions/"+i0+"/effect",schemaPath:"#/properties/permissions/items/properties/effect/enum",keyword:"enum",params:{allowedValues:schema155.properties.permissions.items.properties.effect.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}}else{const err25={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}}else{const err26={instancePath:instancePath+"/permissions",schemaPath:"#/properties/permissions/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}}else{const err27={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}return validate58.errors=vErrors,0===errors}__name(validate58,"validate58");var validateProduct=validate59,schema157={$schema:"http://json-schema.org/draft-07/schema",$id:"product.json",title:"Product",type:"object",required:["name","price","driver"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"product",enum:["product"]},name:{type:"string"},driver:{$ref:"definitions.json#/definitions/driver"},description:{type:"string"},price:{type:"number"},tax:{type:["number","null"]},image:{$ref:"mediaFile.json"},category:{type:"string"},imageUrl:{type:"string",format:"uri",pattern:"^https?://"},systemId:{$ref:"definitions.json#/definitions/systemId"}}},pattern3=new RegExp("^https?://","u");function validate59(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="product"),void 0===data.name){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.price){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"price"},message:"must have required property 'price'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.driver){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs5===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if("product"!==data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema157.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.name&&"string"!=typeof data.name){const err8={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.driver){let data3=data.driver;if("string"!=typeof data3){const err9={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("adlink"!==data3&&"aws-kinesis"!==data3&&"butler"!==data3&&"crestron"!==data3&&"dell"!==data3&&"dmp"!==data3&&"doorbird"!==data3&&"dormakaba"!==data3&&"dsc"!==data3&&"ecobee"!==data3&&"epson"!==data3&&"geovision-rs"!==data3&&"geovision-as-manager"!==data3&&"honeywell-vista"!==data3&&"igor"!==data3&&"inncom"!==data3&&"isapi"!==data3&&"kohost-k7"!==data3&&"kohost"!==data3&&"lg"!==data3&&"lg-webos"!==data3&&"lapi"!==data3&&"lirc"!==data3&&"mews"!==data3&&"mht"!==data3&&"paxton"!==data3&&"pelican-wireless"!==data3&&"power-shades"!==data3&&"rachio"!==data3&&"rebrandly"!==data3&&"relay"!==data3&&"rtsp"!==data3&&"salto"!==data3&&"salto-irn"!==data3&&"samsung"!==data3&&"se"!==data3&&"sendgrid"!==data3&&"sonifi"!==data3&&"stay-n-touch"!==data3&&"storable"!==data3&&"twilio"!==data3&&"unifi"!==data3&&"valcom"!==data3&&"vivotek"!==data3&&"vizio"!==data3&&"wisenet"!==data3&&"cloudflare-images"!==data3&&"cloudflare-stream"!==data3&&"insperia-privacy"!==data3){const err10={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err11={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.price&&"number"!=typeof data.price){const err12={instancePath:instancePath+"/price",schemaPath:"#/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.tax){let data6=data.tax;if("number"!=typeof data6&&null!==data6){const err13={instancePath:instancePath+"/tax",schemaPath:"#/properties/tax/type",keyword:"type",params:{type:schema157.properties.tax.type},message:"must be number,null"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.image&&(validate15(data.image,{instancePath:instancePath+"/image",parentData:data,parentDataProperty:"image",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length)),void 0!==data.category&&"string"!=typeof data.category){const err14={instancePath:instancePath+"/category",schemaPath:"#/properties/category/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data.imageUrl){let data9=data.imageUrl;if("string"==typeof data9){if(!pattern3.test(data9)){const err15={instancePath:instancePath+"/imageUrl",schemaPath:"#/properties/imageUrl/pattern",keyword:"pattern",params:{pattern:"^https?://"},message:'must match pattern "^https?://"'};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(!formats0(data9)){const err16={instancePath:instancePath+"/imageUrl",schemaPath:"#/properties/imageUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}else{const err17={instancePath:instancePath+"/imageUrl",schemaPath:"#/properties/imageUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err18={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}else{const err19={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}return validate59.errors=vErrors,0===errors}__name(validate59,"validate59");var validateProperty=validate61,schema161={$schema:"http://json-schema.org/draft-07/schema",$id:"property.json",title:"Property",type:"object",description:"A property is a physical asset or building",required:["id","name","type","organization","timezone","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{type:"string",default:"property",enum:["property"]},discriminator:{type:"string",enum:["hospitality","education","commercial","storage"]},organization:{type:["string","null"],description:"Reference (id) to the organization that owns this property"},departments:{type:"array",items:{type:"string"}},testModeEnabled:{type:"boolean"},testMode:{type:"object",properties:{notificationEmails:{type:"array",items:{type:"string"},description:"Only users with these email addresses will receive notifications in test mode, including sms, email, or push."},notificationEmailDomains:{type:"array",items:{type:"string"},description:"Only users with email addreses ending in these domains will receive notifications in test mode, including sms, email, or push."}}},timezone:{type:"string",description:"IANA timezone string",pattern:"^([a-zA-Z]+/[a-zA-Z_]+)$",examples:["America/New_York","America/Los_Angeles"]},smsNumber:{type:"string"},checkInTime:{type:"string"},checkOutTime:{type:"string"},address:{$ref:"definitions.json#/definitions/address"},latitude:{type:"number"},longitude:{type:"number"},appFeatures:{type:"object",properties:{RoomControl:{type:"object",properties:{disabledSystems:{type:"array",items:{type:"string",enum:["climate","lights","shades","tv","doors"]}},excludedDeviceIds:{type:"array",items:{type:"string"},default:[]},commonAreas:{type:"object",properties:{spaces:{type:"array",items:{type:"string"}}}},alarmConfig:{type:"object",patternProperties:{"^[a-zA-Z0-9]+$":{type:"object",properties:{zoneLockMap:{type:"object",description:"Maps zone numbers to lock ids",additionalProperties:{type:"string"}}}}},examples:[{wZz7hucY:{zoneLockMap:{1:"wc87hucc",2:"bc86hzxc",3:"zv5ah5jv"}}}]}},additionalProperties:!1},CheckIn:{type:"object",properties:{payment:{},identification:{},earlyCheckIn:{type:"object",required:["dynamic"],properties:{dynamic:{type:"boolean",default:!1},minimumPrice:{type:"number",default:10},maximumPrice:{type:"number",default:50},priceRatioPerHour:{type:"number",default:.1},minimumTime:{type:"string"}}},roomUpgrades:{},pet:{},promos:{}}},CheckOut:{type:"object",properties:{lateCheckOut:{type:"object",required:["dynamic"],properties:{dynamic:{type:"boolean",default:!1},minimumPrice:{type:"number",default:10},maximumPrice:{type:"number",default:50},priceRatioPerHour:{type:"number",default:.1}}}}},Concierge:{type:"object",properties:{timeTracking:{type:"boolean",default:!1},tipping:{type:"boolean",default:!1},feedback:{type:"boolean",default:!0},ratings:{type:"boolean",default:!0},newTicketCCs:{type:"array",items:{type:"string"},default:[]},newMessageChannel:{type:["string","null"],enum:["sms","email"],default:"sms",description:"Determines how users should be notified of new messages in the concierge system"},quickServices:{type:"array",items:{type:"object",properties:{name:{type:"string"},description:{type:"string"},department:{type:"string"},image:{$ref:"mediaFile.json"}},required:["name","description","image"]}},issues:{type:"object",properties:{syncWithPropertyId:{type:"string"}}}}},DigitalKey:{type:"object",properties:{system:{type:"string",enum:["salto","dormakaba"]},systemOnline:{type:"boolean",default:!1},systemConfig:{type:"object",properties:{legicUrl:{type:"string",format:"uri"},legicWalletName:{type:"string"},legicAppId:{type:"number"},legicTechUsername:{type:"string"},legicTechPassword:{type:"string"}},additionalProperties:!1,default:{}},enableApp:{type:"boolean"},branding:{type:"object",properties:{logo:{type:"string",format:"uri"},gradient:{type:"array",items:{type:"string",pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},minItems:2,maxItems:2},highlightedGradient:{type:"array",items:{type:"string",pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},minItems:2,maxItems:3}}}}},SOS:{type:"object",properties:{active:{type:"boolean"},activeEmergencies:{type:"array",items:{type:"string",enum:["medical","fire","suspiciousPerson","other","conflict","shooter"]}}}},Elevator:{type:"object"},Experiences:{type:"object"},Dining:{type:"object",properties:{system:{type:"string",enum:["gotab"]},systemConfig:{type:"object",properties:{landingUrl:{type:"string",format:"uri"},includeUserDetails:{type:"boolean"}},additionalProperties:!1}}},Rentals:{type:"object"},Shop:{type:"object"},Spa:{type:"object"},Valet:{type:"object"}},additionalProperties:!1,default:{RoomControl:{}}},notifications:{type:"object",properties:{email:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1},sms:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1},push:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1,default:{email:{enabled:!1},sms:{enabled:!1},push:{enabled:!1}}},credentials:{type:"object",additionalProperties:!0}}},pattern4=new RegExp("^([a-zA-Z]+/[a-zA-Z_]+)$","u"),pattern5=new RegExp("^[a-zA-Z0-9]+$","u"),pattern6=new RegExp("^(?!#ffffff)(#[0-9a-fA-F]{6})$","u");function validate61(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="property"),void 0===data.appFeatures&&(data.appFeatures={RoomControl:{}}),void 0===data.notifications&&(data.notifications={email:{enabled:!1},sms:{enabled:!1},push:{enabled:!1}}),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.name){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.type){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.organization){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"organization"},message:"must have required property 'organization'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.timezone){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"timezone"},message:"must have required property 'timezone'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.discriminator){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err7={};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(_errs5===errors){const err8={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err9={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}let data2=data.type;if("string"!=typeof data2){const err10={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("property"!==data2){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema161.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.discriminator){let data3=data.discriminator;if("string"!=typeof data3){const err12={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if("hospitality"!==data3&&"education"!==data3&&"commercial"!==data3&&"storage"!==data3){const err13={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema161.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.organization){let data4=data.organization;if("string"!=typeof data4&&null!==data4){const err14={instancePath:instancePath+"/organization",schemaPath:"#/properties/organization/type",keyword:"type",params:{type:schema161.properties.organization.type},message:"must be string,null"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.departments){let data5=data.departments;if(Array.isArray(data5)){const len0=data5.length;for(let i0=0;i0<len0;i0++)if("string"!=typeof data5[i0]){const err15={instancePath:instancePath+"/departments/"+i0,schemaPath:"#/properties/departments/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}else{const err16={instancePath:instancePath+"/departments",schemaPath:"#/properties/departments/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.testModeEnabled&&"boolean"!=typeof data.testModeEnabled){const err17={instancePath:instancePath+"/testModeEnabled",schemaPath:"#/properties/testModeEnabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.testMode){let data8=data.testMode;if(data8&&"object"==typeof data8&&!Array.isArray(data8)){if(void 0!==data8.notificationEmails){let data9=data8.notificationEmails;if(Array.isArray(data9)){const len1=data9.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data9[i1]){const err18={instancePath:instancePath+"/testMode/notificationEmails/"+i1,schemaPath:"#/properties/testMode/properties/notificationEmails/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}else{const err19={instancePath:instancePath+"/testMode/notificationEmails",schemaPath:"#/properties/testMode/properties/notificationEmails/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data8.notificationEmailDomains){let data11=data8.notificationEmailDomains;if(Array.isArray(data11)){const len2=data11.length;for(let i2=0;i2<len2;i2++)if("string"!=typeof data11[i2]){const err20={instancePath:instancePath+"/testMode/notificationEmailDomains/"+i2,schemaPath:"#/properties/testMode/properties/notificationEmailDomains/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}else{const err21={instancePath:instancePath+"/testMode/notificationEmailDomains",schemaPath:"#/properties/testMode/properties/notificationEmailDomains/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}}else{const err22={instancePath:instancePath+"/testMode",schemaPath:"#/properties/testMode/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.timezone){let data13=data.timezone;if("string"==typeof data13){if(!pattern4.test(data13)){const err23={instancePath:instancePath+"/timezone",schemaPath:"#/properties/timezone/pattern",keyword:"pattern",params:{pattern:"^([a-zA-Z]+/[a-zA-Z_]+)$"},message:'must match pattern "^([a-zA-Z]+/[a-zA-Z_]+)$"'};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}else{const err24={instancePath:instancePath+"/timezone",schemaPath:"#/properties/timezone/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.smsNumber&&"string"!=typeof data.smsNumber){const err25={instancePath:instancePath+"/smsNumber",schemaPath:"#/properties/smsNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data.checkInTime&&"string"!=typeof data.checkInTime){const err26={instancePath:instancePath+"/checkInTime",schemaPath:"#/properties/checkInTime/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.checkOutTime&&"string"!=typeof data.checkOutTime){const err27={instancePath:instancePath+"/checkOutTime",schemaPath:"#/properties/checkOutTime/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data.address){let data17=data.address;if(data17&&"object"==typeof data17&&!Array.isArray(data17)){if(void 0!==data17.id&&"string"!=typeof data17.id){const err28={instancePath:instancePath+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data17.line1&&"string"!=typeof data17.line1){const err29={instancePath:instancePath+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data17.line2&&"string"!=typeof data17.line2){const err30={instancePath:instancePath+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(void 0!==data17.line3&&"string"!=typeof data17.line3){const err31={instancePath:instancePath+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(void 0!==data17.city&&"string"!=typeof data17.city){const err32={instancePath:instancePath+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if(void 0!==data17.state&&"string"!=typeof data17.state){const err33={instancePath:instancePath+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(void 0!==data17.postalCode&&"string"!=typeof data17.postalCode){const err34={instancePath:instancePath+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(void 0!==data17.countryCode){let data25=data17.countryCode;if("string"==typeof data25){if(func4(data25)>2){const err35={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(func4(data25)<2){const err36={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}else{const err37={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}}else{const err38={instancePath:instancePath+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}if(void 0!==data.latitude&&"number"!=typeof data.latitude){const err39={instancePath:instancePath+"/latitude",schemaPath:"#/properties/latitude/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}if(void 0!==data.longitude&&"number"!=typeof data.longitude){const err40={instancePath:instancePath+"/longitude",schemaPath:"#/properties/longitude/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}let data28=data.appFeatures;if(data28&&"object"==typeof data28&&!Array.isArray(data28)){for(const key0 in data28)if(!func2.call(schema161.properties.appFeatures.properties,key0)){const err41={instancePath:instancePath+"/appFeatures",schemaPath:"#/properties/appFeatures/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}if(void 0!==data28.RoomControl){let data29=data28.RoomControl;if(data29&&"object"==typeof data29&&!Array.isArray(data29)){void 0===data29.excludedDeviceIds&&(data29.excludedDeviceIds=[]);for(const key1 in data29)if("disabledSystems"!==key1&&"excludedDeviceIds"!==key1&&"commonAreas"!==key1&&"alarmConfig"!==key1){const err42={instancePath:instancePath+"/appFeatures/RoomControl",schemaPath:"#/properties/appFeatures/properties/RoomControl/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(void 0!==data29.disabledSystems){let data30=data29.disabledSystems;if(Array.isArray(data30)){const len3=data30.length;for(let i3=0;i3<len3;i3++){let data31=data30[i3];if("string"!=typeof data31){const err43={instancePath:instancePath+"/appFeatures/RoomControl/disabledSystems/"+i3,schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/disabledSystems/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}if("climate"!==data31&&"lights"!==data31&&"shades"!==data31&&"tv"!==data31&&"doors"!==data31){const err44={instancePath:instancePath+"/appFeatures/RoomControl/disabledSystems/"+i3,schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/disabledSystems/items/enum",keyword:"enum",params:{allowedValues:schema161.properties.appFeatures.properties.RoomControl.properties.disabledSystems.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}}else{const err45={instancePath:instancePath+"/appFeatures/RoomControl/disabledSystems",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/disabledSystems/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}let data32=data29.excludedDeviceIds;if(Array.isArray(data32)){const len4=data32.length;for(let i4=0;i4<len4;i4++)if("string"!=typeof data32[i4]){const err46={instancePath:instancePath+"/appFeatures/RoomControl/excludedDeviceIds/"+i4,schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/excludedDeviceIds/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}else{const err47={instancePath:instancePath+"/appFeatures/RoomControl/excludedDeviceIds",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/excludedDeviceIds/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}if(void 0!==data29.commonAreas){let data34=data29.commonAreas;if(data34&&"object"==typeof data34&&!Array.isArray(data34)){if(void 0!==data34.spaces){let data35=data34.spaces;if(Array.isArray(data35)){const len5=data35.length;for(let i5=0;i5<len5;i5++)if("string"!=typeof data35[i5]){const err48={instancePath:instancePath+"/appFeatures/RoomControl/commonAreas/spaces/"+i5,schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/commonAreas/properties/spaces/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}}else{const err49={instancePath:instancePath+"/appFeatures/RoomControl/commonAreas/spaces",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/commonAreas/properties/spaces/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}}}else{const err50={instancePath:instancePath+"/appFeatures/RoomControl/commonAreas",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/commonAreas/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}}if(void 0!==data29.alarmConfig){let data37=data29.alarmConfig;if(data37&&"object"==typeof data37&&!Array.isArray(data37)){for(const key2 in data37)if(pattern5.test(key2)){let data38=data37[key2];if(data38&&"object"==typeof data38&&!Array.isArray(data38)){if(void 0!==data38.zoneLockMap){let data39=data38.zoneLockMap;if(data39&&"object"==typeof data39&&!Array.isArray(data39)){for(const key3 in data39)if("string"!=typeof data39[key3]){const err51={instancePath:instancePath+"/appFeatures/RoomControl/alarmConfig/"+key2.replace(/~/g,"~0").replace(/\//g,"~1")+"/zoneLockMap/"+key3.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/alarmConfig/patternProperties/%5E%5Ba-zA-Z0-9%5D%2B%24/properties/zoneLockMap/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}}else{const err52={instancePath:instancePath+"/appFeatures/RoomControl/alarmConfig/"+key2.replace(/~/g,"~0").replace(/\//g,"~1")+"/zoneLockMap",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/alarmConfig/patternProperties/%5E%5Ba-zA-Z0-9%5D%2B%24/properties/zoneLockMap/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}}}else{const err53={instancePath:instancePath+"/appFeatures/RoomControl/alarmConfig/"+key2.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/alarmConfig/patternProperties/%5E%5Ba-zA-Z0-9%5D%2B%24/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}}}else{const err54={instancePath:instancePath+"/appFeatures/RoomControl/alarmConfig",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/alarmConfig/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}}}else{const err55={instancePath:instancePath+"/appFeatures/RoomControl",schemaPath:"#/properties/appFeatures/properties/RoomControl/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}}if(void 0!==data28.CheckIn){let data41=data28.CheckIn;if(data41&&"object"==typeof data41&&!Array.isArray(data41)){if(void 0!==data41.earlyCheckIn){let data42=data41.earlyCheckIn;if(data42&&"object"==typeof data42&&!Array.isArray(data42)){if(void 0===data42.dynamic&&(data42.dynamic=!1),void 0===data42.minimumPrice&&(data42.minimumPrice=10),void 0===data42.maximumPrice&&(data42.maximumPrice=50),void 0===data42.priceRatioPerHour&&(data42.priceRatioPerHour=.1),void 0===data42.dynamic){const err56={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/required",keyword:"required",params:{missingProperty:"dynamic"},message:"must have required property 'dynamic'"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}if("boolean"!=typeof data42.dynamic){const err57={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn/dynamic",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/dynamic/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}if("number"!=typeof data42.minimumPrice){const err58={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn/minimumPrice",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/minimumPrice/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}if("number"!=typeof data42.maximumPrice){const err59={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn/maximumPrice",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/maximumPrice/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}if("number"!=typeof data42.priceRatioPerHour){const err60={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn/priceRatioPerHour",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/priceRatioPerHour/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err60]:vErrors.push(err60),errors++}if(void 0!==data42.minimumTime&&"string"!=typeof data42.minimumTime){const err61={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn/minimumTime",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/minimumTime/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err61]:vErrors.push(err61),errors++}}else{const err62={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err62]:vErrors.push(err62),errors++}}}else{const err63={instancePath:instancePath+"/appFeatures/CheckIn",schemaPath:"#/properties/appFeatures/properties/CheckIn/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err63]:vErrors.push(err63),errors++}}if(void 0!==data28.CheckOut){let data48=data28.CheckOut;if(data48&&"object"==typeof data48&&!Array.isArray(data48)){if(void 0!==data48.lateCheckOut){let data49=data48.lateCheckOut;if(data49&&"object"==typeof data49&&!Array.isArray(data49)){if(void 0===data49.dynamic&&(data49.dynamic=!1),void 0===data49.minimumPrice&&(data49.minimumPrice=10),void 0===data49.maximumPrice&&(data49.maximumPrice=50),void 0===data49.priceRatioPerHour&&(data49.priceRatioPerHour=.1),void 0===data49.dynamic){const err64={instancePath:instancePath+"/appFeatures/CheckOut/lateCheckOut",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/required",keyword:"required",params:{missingProperty:"dynamic"},message:"must have required property 'dynamic'"};null===vErrors?vErrors=[err64]:vErrors.push(err64),errors++}if("boolean"!=typeof data49.dynamic){const err65={instancePath:instancePath+"/appFeatures/CheckOut/lateCheckOut/dynamic",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/properties/dynamic/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err65]:vErrors.push(err65),errors++}if("number"!=typeof data49.minimumPrice){const err66={instancePath:instancePath+"/appFeatures/CheckOut/lateCheckOut/minimumPrice",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/properties/minimumPrice/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err66]:vErrors.push(err66),errors++}if("number"!=typeof data49.maximumPrice){const err67={instancePath:instancePath+"/appFeatures/CheckOut/lateCheckOut/maximumPrice",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/properties/maximumPrice/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err67]:vErrors.push(err67),errors++}if("number"!=typeof data49.priceRatioPerHour){const err68={instancePath:instancePath+"/appFeatures/CheckOut/lateCheckOut/priceRatioPerHour",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/properties/priceRatioPerHour/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err68]:vErrors.push(err68),errors++}}else{const err69={instancePath:instancePath+"/appFeatures/CheckOut/lateCheckOut",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err69]:vErrors.push(err69),errors++}}}else{const err70={instancePath:instancePath+"/appFeatures/CheckOut",schemaPath:"#/properties/appFeatures/properties/CheckOut/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err70]:vErrors.push(err70),errors++}}if(void 0!==data28.Concierge){let data54=data28.Concierge;if(data54&&"object"==typeof data54&&!Array.isArray(data54)){if(void 0===data54.timeTracking&&(data54.timeTracking=!1),void 0===data54.tipping&&(data54.tipping=!1),void 0===data54.feedback&&(data54.feedback=!0),void 0===data54.ratings&&(data54.ratings=!0),void 0===data54.newTicketCCs&&(data54.newTicketCCs=[]),void 0===data54.newMessageChannel&&(data54.newMessageChannel="sms"),"boolean"!=typeof data54.timeTracking){const err71={instancePath:instancePath+"/appFeatures/Concierge/timeTracking",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/timeTracking/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err71]:vErrors.push(err71),errors++}if("boolean"!=typeof data54.tipping){const err72={instancePath:instancePath+"/appFeatures/Concierge/tipping",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/tipping/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err72]:vErrors.push(err72),errors++}if("boolean"!=typeof data54.feedback){const err73={instancePath:instancePath+"/appFeatures/Concierge/feedback",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/feedback/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err73]:vErrors.push(err73),errors++}if("boolean"!=typeof data54.ratings){const err74={instancePath:instancePath+"/appFeatures/Concierge/ratings",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/ratings/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err74]:vErrors.push(err74),errors++}let data59=data54.newTicketCCs;if(Array.isArray(data59)){const len6=data59.length;for(let i6=0;i6<len6;i6++)if("string"!=typeof data59[i6]){const err75={instancePath:instancePath+"/appFeatures/Concierge/newTicketCCs/"+i6,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/newTicketCCs/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err75]:vErrors.push(err75),errors++}}else{const err76={instancePath:instancePath+"/appFeatures/Concierge/newTicketCCs",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/newTicketCCs/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err76]:vErrors.push(err76),errors++}let data61=data54.newMessageChannel;if("string"!=typeof data61&&null!==data61){const err77={instancePath:instancePath+"/appFeatures/Concierge/newMessageChannel",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/newMessageChannel/type",keyword:"type",params:{type:schema161.properties.appFeatures.properties.Concierge.properties.newMessageChannel.type},message:"must be string,null"};null===vErrors?vErrors=[err77]:vErrors.push(err77),errors++}if("sms"!==data61&&"email"!==data61){const err78={instancePath:instancePath+"/appFeatures/Concierge/newMessageChannel",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/newMessageChannel/enum",keyword:"enum",params:{allowedValues:schema161.properties.appFeatures.properties.Concierge.properties.newMessageChannel.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err78]:vErrors.push(err78),errors++}if(void 0!==data54.quickServices){let data62=data54.quickServices;if(Array.isArray(data62)){const len7=data62.length;for(let i7=0;i7<len7;i7++){let data63=data62[i7];if(data63&&"object"==typeof data63&&!Array.isArray(data63)){if(void 0===data63.name){const err79={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err79]:vErrors.push(err79),errors++}if(void 0===data63.description){const err80={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/required",keyword:"required",params:{missingProperty:"description"},message:"must have required property 'description'"};null===vErrors?vErrors=[err80]:vErrors.push(err80),errors++}if(void 0===data63.image){const err81={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/required",keyword:"required",params:{missingProperty:"image"},message:"must have required property 'image'"};null===vErrors?vErrors=[err81]:vErrors.push(err81),errors++}if(void 0!==data63.name&&"string"!=typeof data63.name){const err82={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7+"/name",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err82]:vErrors.push(err82),errors++}if(void 0!==data63.description&&"string"!=typeof data63.description){const err83={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7+"/description",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err83]:vErrors.push(err83),errors++}if(void 0!==data63.department&&"string"!=typeof data63.department){const err84={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7+"/department",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/properties/department/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err84]:vErrors.push(err84),errors++}void 0!==data63.image&&(validate15(data63.image,{instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7+"/image",parentData:data63,parentDataProperty:"image",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length))}else{const err85={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err85]:vErrors.push(err85),errors++}}}else{const err86={instancePath:instancePath+"/appFeatures/Concierge/quickServices",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err86]:vErrors.push(err86),errors++}}if(void 0!==data54.issues){let data68=data54.issues;if(data68&&"object"==typeof data68&&!Array.isArray(data68)){if(void 0!==data68.syncWithPropertyId&&"string"!=typeof data68.syncWithPropertyId){const err87={instancePath:instancePath+"/appFeatures/Concierge/issues/syncWithPropertyId",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/issues/properties/syncWithPropertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err87]:vErrors.push(err87),errors++}}else{const err88={instancePath:instancePath+"/appFeatures/Concierge/issues",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/issues/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err88]:vErrors.push(err88),errors++}}}else{const err89={instancePath:instancePath+"/appFeatures/Concierge",schemaPath:"#/properties/appFeatures/properties/Concierge/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err89]:vErrors.push(err89),errors++}}if(void 0!==data28.DigitalKey){let data70=data28.DigitalKey;if(data70&&"object"==typeof data70&&!Array.isArray(data70)){if(void 0===data70.systemOnline&&(data70.systemOnline=!1),void 0===data70.systemConfig&&(data70.systemConfig={}),void 0!==data70.system){let data71=data70.system;if("string"!=typeof data71){const err90={instancePath:instancePath+"/appFeatures/DigitalKey/system",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/system/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err90]:vErrors.push(err90),errors++}if("salto"!==data71&&"dormakaba"!==data71){const err91={instancePath:instancePath+"/appFeatures/DigitalKey/system",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/system/enum",keyword:"enum",params:{allowedValues:schema161.properties.appFeatures.properties.DigitalKey.properties.system.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err91]:vErrors.push(err91),errors++}}if("boolean"!=typeof data70.systemOnline){const err92={instancePath:instancePath+"/appFeatures/DigitalKey/systemOnline",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemOnline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err92]:vErrors.push(err92),errors++}let data73=data70.systemConfig;if(data73&&"object"==typeof data73&&!Array.isArray(data73)){for(const key4 in data73)if("legicUrl"!==key4&&"legicWalletName"!==key4&&"legicAppId"!==key4&&"legicTechUsername"!==key4&&"legicTechPassword"!==key4){const err93={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key4},message:"must NOT have additional properties"};null===vErrors?vErrors=[err93]:vErrors.push(err93),errors++}if(void 0!==data73.legicUrl){let data74=data73.legicUrl;if("string"==typeof data74){if(!formats0(data74)){const err94={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig/legicUrl",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err94]:vErrors.push(err94),errors++}}else{const err95={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig/legicUrl",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err95]:vErrors.push(err95),errors++}}if(void 0!==data73.legicWalletName&&"string"!=typeof data73.legicWalletName){const err96={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig/legicWalletName",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicWalletName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err96]:vErrors.push(err96),errors++}if(void 0!==data73.legicAppId&&"number"!=typeof data73.legicAppId){const err97={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig/legicAppId",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicAppId/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err97]:vErrors.push(err97),errors++}if(void 0!==data73.legicTechUsername&&"string"!=typeof data73.legicTechUsername){const err98={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig/legicTechUsername",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicTechUsername/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err98]:vErrors.push(err98),errors++}if(void 0!==data73.legicTechPassword&&"string"!=typeof data73.legicTechPassword){const err99={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig/legicTechPassword",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicTechPassword/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err99]:vErrors.push(err99),errors++}}else{const err100={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err100]:vErrors.push(err100),errors++}if(void 0!==data70.enableApp&&"boolean"!=typeof data70.enableApp){const err101={instancePath:instancePath+"/appFeatures/DigitalKey/enableApp",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/enableApp/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err101]:vErrors.push(err101),errors++}if(void 0!==data70.branding){let data80=data70.branding;if(data80&&"object"==typeof data80&&!Array.isArray(data80)){if(void 0!==data80.logo){let data81=data80.logo;if("string"==typeof data81){if(!formats0(data81)){const err102={instancePath:instancePath+"/appFeatures/DigitalKey/branding/logo",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/logo/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err102]:vErrors.push(err102),errors++}}else{const err103={instancePath:instancePath+"/appFeatures/DigitalKey/branding/logo",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/logo/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err103]:vErrors.push(err103),errors++}}if(void 0!==data80.gradient){let data82=data80.gradient;if(Array.isArray(data82)){if(data82.length>2){const err104={instancePath:instancePath+"/appFeatures/DigitalKey/branding/gradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/maxItems",keyword:"maxItems",params:{limit:2},message:"must NOT have more than 2 items"};null===vErrors?vErrors=[err104]:vErrors.push(err104),errors++}if(data82.length<2){const err105={instancePath:instancePath+"/appFeatures/DigitalKey/branding/gradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/minItems",keyword:"minItems",params:{limit:2},message:"must NOT have fewer than 2 items"};null===vErrors?vErrors=[err105]:vErrors.push(err105),errors++}const len8=data82.length;for(let i8=0;i8<len8;i8++){let data83=data82[i8];if("string"==typeof data83){if(!pattern6.test(data83)){const err106={instancePath:instancePath+"/appFeatures/DigitalKey/branding/gradient/"+i8,schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/items/pattern",keyword:"pattern",params:{pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},message:'must match pattern "^(?!#ffffff)(#[0-9a-fA-F]{6})$"'};null===vErrors?vErrors=[err106]:vErrors.push(err106),errors++}}else{const err107={instancePath:instancePath+"/appFeatures/DigitalKey/branding/gradient/"+i8,schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err107]:vErrors.push(err107),errors++}}}else{const err108={instancePath:instancePath+"/appFeatures/DigitalKey/branding/gradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err108]:vErrors.push(err108),errors++}}if(void 0!==data80.highlightedGradient){let data84=data80.highlightedGradient;if(Array.isArray(data84)){if(data84.length>3){const err109={instancePath:instancePath+"/appFeatures/DigitalKey/branding/highlightedGradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/maxItems",keyword:"maxItems",params:{limit:3},message:"must NOT have more than 3 items"};null===vErrors?vErrors=[err109]:vErrors.push(err109),errors++}if(data84.length<2){const err110={instancePath:instancePath+"/appFeatures/DigitalKey/branding/highlightedGradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/minItems",keyword:"minItems",params:{limit:2},message:"must NOT have fewer than 2 items"};null===vErrors?vErrors=[err110]:vErrors.push(err110),errors++}const len9=data84.length;for(let i9=0;i9<len9;i9++){let data85=data84[i9];if("string"==typeof data85){if(!pattern6.test(data85)){const err111={instancePath:instancePath+"/appFeatures/DigitalKey/branding/highlightedGradient/"+i9,schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/items/pattern",keyword:"pattern",params:{pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},message:'must match pattern "^(?!#ffffff)(#[0-9a-fA-F]{6})$"'};null===vErrors?vErrors=[err111]:vErrors.push(err111),errors++}}else{const err112={instancePath:instancePath+"/appFeatures/DigitalKey/branding/highlightedGradient/"+i9,schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err112]:vErrors.push(err112),errors++}}}else{const err113={instancePath:instancePath+"/appFeatures/DigitalKey/branding/highlightedGradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err113]:vErrors.push(err113),errors++}}}else{const err114={instancePath:instancePath+"/appFeatures/DigitalKey/branding",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err114]:vErrors.push(err114),errors++}}}else{const err115={instancePath:instancePath+"/appFeatures/DigitalKey",schemaPath:"#/properties/appFeatures/properties/DigitalKey/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err115]:vErrors.push(err115),errors++}}if(void 0!==data28.SOS){let data86=data28.SOS;if(data86&&"object"==typeof data86&&!Array.isArray(data86)){if(void 0!==data86.active&&"boolean"!=typeof data86.active){const err116={instancePath:instancePath+"/appFeatures/SOS/active",schemaPath:"#/properties/appFeatures/properties/SOS/properties/active/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err116]:vErrors.push(err116),errors++}if(void 0!==data86.activeEmergencies){let data88=data86.activeEmergencies;if(Array.isArray(data88)){const len10=data88.length;for(let i10=0;i10<len10;i10++){let data89=data88[i10];if("string"!=typeof data89){const err117={instancePath:instancePath+"/appFeatures/SOS/activeEmergencies/"+i10,schemaPath:"#/properties/appFeatures/properties/SOS/properties/activeEmergencies/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err117]:vErrors.push(err117),errors++}if("medical"!==data89&&"fire"!==data89&&"suspiciousPerson"!==data89&&"other"!==data89&&"conflict"!==data89&&"shooter"!==data89){const err118={instancePath:instancePath+"/appFeatures/SOS/activeEmergencies/"+i10,schemaPath:"#/properties/appFeatures/properties/SOS/properties/activeEmergencies/items/enum",keyword:"enum",params:{allowedValues:schema161.properties.appFeatures.properties.SOS.properties.activeEmergencies.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err118]:vErrors.push(err118),errors++}}}else{const err119={instancePath:instancePath+"/appFeatures/SOS/activeEmergencies",schemaPath:"#/properties/appFeatures/properties/SOS/properties/activeEmergencies/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err119]:vErrors.push(err119),errors++}}}else{const err120={instancePath:instancePath+"/appFeatures/SOS",schemaPath:"#/properties/appFeatures/properties/SOS/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err120]:vErrors.push(err120),errors++}}if(void 0!==data28.Elevator){let data90=data28.Elevator;if(!data90||"object"!=typeof data90||Array.isArray(data90)){const err121={instancePath:instancePath+"/appFeatures/Elevator",schemaPath:"#/properties/appFeatures/properties/Elevator/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err121]:vErrors.push(err121),errors++}}if(void 0!==data28.Experiences){let data91=data28.Experiences;if(!data91||"object"!=typeof data91||Array.isArray(data91)){const err122={instancePath:instancePath+"/appFeatures/Experiences",schemaPath:"#/properties/appFeatures/properties/Experiences/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err122]:vErrors.push(err122),errors++}}if(void 0!==data28.Dining){let data92=data28.Dining;if(data92&&"object"==typeof data92&&!Array.isArray(data92)){if(void 0!==data92.system){let data93=data92.system;if("string"!=typeof data93){const err123={instancePath:instancePath+"/appFeatures/Dining/system",schemaPath:"#/properties/appFeatures/properties/Dining/properties/system/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err123]:vErrors.push(err123),errors++}if("gotab"!==data93){const err124={instancePath:instancePath+"/appFeatures/Dining/system",schemaPath:"#/properties/appFeatures/properties/Dining/properties/system/enum",keyword:"enum",params:{allowedValues:schema161.properties.appFeatures.properties.Dining.properties.system.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err124]:vErrors.push(err124),errors++}}if(void 0!==data92.systemConfig){let data94=data92.systemConfig;if(data94&&"object"==typeof data94&&!Array.isArray(data94)){for(const key5 in data94)if("landingUrl"!==key5&&"includeUserDetails"!==key5){const err125={instancePath:instancePath+"/appFeatures/Dining/systemConfig",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key5},message:"must NOT have additional properties"};null===vErrors?vErrors=[err125]:vErrors.push(err125),errors++}if(void 0!==data94.landingUrl){let data95=data94.landingUrl;if("string"==typeof data95){if(!formats0(data95)){const err126={instancePath:instancePath+"/appFeatures/Dining/systemConfig/landingUrl",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/properties/landingUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err126]:vErrors.push(err126),errors++}}else{const err127={instancePath:instancePath+"/appFeatures/Dining/systemConfig/landingUrl",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/properties/landingUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err127]:vErrors.push(err127),errors++}}if(void 0!==data94.includeUserDetails&&"boolean"!=typeof data94.includeUserDetails){const err128={instancePath:instancePath+"/appFeatures/Dining/systemConfig/includeUserDetails",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/properties/includeUserDetails/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err128]:vErrors.push(err128),errors++}}else{const err129={instancePath:instancePath+"/appFeatures/Dining/systemConfig",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err129]:vErrors.push(err129),errors++}}}else{const err130={instancePath:instancePath+"/appFeatures/Dining",schemaPath:"#/properties/appFeatures/properties/Dining/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err130]:vErrors.push(err130),errors++}}if(void 0!==data28.Rentals){let data97=data28.Rentals;if(!data97||"object"!=typeof data97||Array.isArray(data97)){const err131={instancePath:instancePath+"/appFeatures/Rentals",schemaPath:"#/properties/appFeatures/properties/Rentals/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err131]:vErrors.push(err131),errors++}}if(void 0!==data28.Shop){let data98=data28.Shop;if(!data98||"object"!=typeof data98||Array.isArray(data98)){const err132={instancePath:instancePath+"/appFeatures/Shop",schemaPath:"#/properties/appFeatures/properties/Shop/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err132]:vErrors.push(err132),errors++}}if(void 0!==data28.Spa){let data99=data28.Spa;if(!data99||"object"!=typeof data99||Array.isArray(data99)){const err133={instancePath:instancePath+"/appFeatures/Spa",schemaPath:"#/properties/appFeatures/properties/Spa/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err133]:vErrors.push(err133),errors++}}if(void 0!==data28.Valet){let data100=data28.Valet;if(!data100||"object"!=typeof data100||Array.isArray(data100)){const err134={instancePath:instancePath+"/appFeatures/Valet",schemaPath:"#/properties/appFeatures/properties/Valet/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err134]:vErrors.push(err134),errors++}}}else{const err135={instancePath:instancePath+"/appFeatures",schemaPath:"#/properties/appFeatures/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err135]:vErrors.push(err135),errors++}let data101=data.notifications;if(data101&&"object"==typeof data101&&!Array.isArray(data101)){for(const key6 in data101)if("email"!==key6&&"sms"!==key6&&"push"!==key6){const err136={instancePath:instancePath+"/notifications",schemaPath:"#/properties/notifications/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key6},message:"must NOT have additional properties"};null===vErrors?vErrors=[err136]:vErrors.push(err136),errors++}if(void 0!==data101.email){let data102=data101.email;if(data102&&"object"==typeof data102&&!Array.isArray(data102)){for(const key7 in data102)if("enabled"!==key7){const err137={instancePath:instancePath+"/notifications/email",schemaPath:"#/properties/notifications/properties/email/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key7},message:"must NOT have additional properties"};null===vErrors?vErrors=[err137]:vErrors.push(err137),errors++}if(void 0!==data102.enabled&&"boolean"!=typeof data102.enabled){const err138={instancePath:instancePath+"/notifications/email/enabled",schemaPath:"#/properties/notifications/properties/email/properties/enabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err138]:vErrors.push(err138),errors++}}else{const err139={instancePath:instancePath+"/notifications/email",schemaPath:"#/properties/notifications/properties/email/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err139]:vErrors.push(err139),errors++}}if(void 0!==data101.sms){let data104=data101.sms;if(data104&&"object"==typeof data104&&!Array.isArray(data104)){for(const key8 in data104)if("enabled"!==key8){const err140={instancePath:instancePath+"/notifications/sms",schemaPath:"#/properties/notifications/properties/sms/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key8},message:"must NOT have additional properties"};null===vErrors?vErrors=[err140]:vErrors.push(err140),errors++}if(void 0!==data104.enabled&&"boolean"!=typeof data104.enabled){const err141={instancePath:instancePath+"/notifications/sms/enabled",schemaPath:"#/properties/notifications/properties/sms/properties/enabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err141]:vErrors.push(err141),errors++}}else{const err142={instancePath:instancePath+"/notifications/sms",schemaPath:"#/properties/notifications/properties/sms/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err142]:vErrors.push(err142),errors++}}if(void 0!==data101.push){let data106=data101.push;if(data106&&"object"==typeof data106&&!Array.isArray(data106)){for(const key9 in data106)if("enabled"!==key9){const err143={instancePath:instancePath+"/notifications/push",schemaPath:"#/properties/notifications/properties/push/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key9},message:"must NOT have additional properties"};null===vErrors?vErrors=[err143]:vErrors.push(err143),errors++}if(void 0!==data106.enabled&&"boolean"!=typeof data106.enabled){const err144={instancePath:instancePath+"/notifications/push/enabled",schemaPath:"#/properties/notifications/properties/push/properties/enabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err144]:vErrors.push(err144),errors++}}else{const err145={instancePath:instancePath+"/notifications/push",schemaPath:"#/properties/notifications/properties/push/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err145]:vErrors.push(err145),errors++}}}else{const err146={instancePath:instancePath+"/notifications",schemaPath:"#/properties/notifications/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err146]:vErrors.push(err146),errors++}if(void 0!==data.credentials){let data108=data.credentials;if(!data108||"object"!=typeof data108||Array.isArray(data108)){const err147={instancePath:instancePath+"/credentials",schemaPath:"#/properties/credentials/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err147]:vErrors.push(err147),errors++}}}else{const err148={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err148]:vErrors.push(err148),errors++}return validate61.errors=vErrors,0===errors}__name(validate61,"validate61");var validateReservation=validate63,schema164={$schema:"http://json-schema.org/draft-07/schema",$id:"reservation.json",title:"Reservation",type:"object",required:["type","status","checkInDateTime","checkOutDateTime"],properties:{id:{$ref:"definitions.json#/definitions/id"},driver:{$ref:"definitions.json#/definitions/driver"},primaryGuest:{type:"string"},type:{type:"string",default:"reservation",enum:["reservation"]},sharedGuests:{type:"array",items:{type:"string"}},spaceCategory:{type:"string"},space:{type:["string","null"]},previousSpace:{type:["string","null"],default:null,description:"Used when there was a space assigned and it changes"},status:{type:"string",enum:["reserved","checkedIn","checkedOut","cancelled","noShow","enquired","requested","optional"],description:" reserved - confirmed by both parties, before check-in\n checkedIn - checked in\n checkedOut - checked out\n cancelled - Cancelled\n noShow - No show\n enquired - Confirmed neither by the customer nor enterprise\n requested - Confirmed by the customer but not the enterprise (waitlist)\n optional - Confirmed by the enterprise but not the customer (holding)"},mobileCheckInSpaceCategoryChanged:{type:"boolean",description:"spaceCategory has changed from original."},mobileCheckInSpaceChanged:{type:"boolean"},mobileCheckInStatus:{type:"string",enum:["ready","blocked","preArrivalStepsRequired","spaceNotAssigned","spaceNotReady","checkInTimeNotStarted"]},mobileCheckInStatusMessage:{type:"string"},confirmationNumber:{type:"string"},expectedCheckInDateTime:{type:["string","object"],format:"date-time",description:"Expected arrival time of guest."},checkInDateTime:{type:["string","object"],format:"date-time"},checkOutDateTime:{type:["string","object"],format:"date-time"},adultCount:{type:"number",default:1,minimum:1},childCount:{type:"number",default:0},spaceCategoryAvailabilites:{type:"array",items:{type:"object",properties:{id:{type:"string"},price:{type:"number"},unit:{type:"string",enum:["night","stay","hour"]},isUpgrade:{type:"boolean"}}}},revenue:{$ref:"definitions.json#/definitions/revenue"},rateSuppressed:{type:"boolean"},payment:{type:"string"},company:{type:"string"},travelAgent:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"},metadata:{$ref:"definitions.json#/definitions/metadata"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}},schema167={type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},date:{type:"string",format:"date-time"},price:{type:"number"},tax:{type:["number","null"]}}}};function validate64(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(Array.isArray(data)){const len0=data.length;for(let i0=0;i0<len0;i0++){let data0=data[i0];if(data0&&"object"==typeof data0&&!Array.isArray(data0)){if(void 0!==data0.id){let data1=data0.id;if("string"!=typeof data1){const err0={instancePath:instancePath+"/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}const _errs6=errors,_errs7=errors;if("global"!==data1&&"system"!==data1){const err1={};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(_errs7===errors){const err2={instancePath:instancePath+"/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}else errors=_errs6,null!==vErrors&&(_errs6?vErrors.length=_errs6:vErrors=null)}if(void 0!==data0.name&&"string"!=typeof data0.name){const err3={instancePath:instancePath+"/"+i0+"/name",schemaPath:"#/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data0.date){let data3=data0.date;if("string"==typeof data3){if(!formats4.validate(data3)){const err4={instancePath:instancePath+"/"+i0+"/date",schemaPath:"#/items/properties/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}else{const err5={instancePath:instancePath+"/"+i0+"/date",schemaPath:"#/items/properties/date/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}if(void 0!==data0.price&&"number"!=typeof data0.price){const err6={instancePath:instancePath+"/"+i0+"/price",schemaPath:"#/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data0.tax){let data5=data0.tax;if("number"!=typeof data5&&null!==data5){const err7={instancePath:instancePath+"/"+i0+"/tax",schemaPath:"#/items/properties/tax/type",keyword:"type",params:{type:schema167.items.properties.tax.type},message:"must be number,null"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}}}else{const err8={instancePath:instancePath+"/"+i0,schemaPath:"#/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}}else{const err9={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}return validate64.errors=vErrors,0===errors}function validate63(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="reservation"),void 0===data.previousSpace&&(data.previousSpace=null),void 0===data.adultCount&&(data.adultCount=1),void 0===data.childCount&&(data.childCount=0),void 0===data.type){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.status){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.checkInDateTime){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"checkInDateTime"},message:"must have required property 'checkInDateTime'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.checkOutDateTime){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"checkOutDateTime"},message:"must have required property 'checkOutDateTime'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.driver){let data1=data.driver;if("string"!=typeof data1){const err7={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("adlink"!==data1&&"aws-kinesis"!==data1&&"butler"!==data1&&"crestron"!==data1&&"dell"!==data1&&"dmp"!==data1&&"doorbird"!==data1&&"dormakaba"!==data1&&"dsc"!==data1&&"ecobee"!==data1&&"epson"!==data1&&"geovision-rs"!==data1&&"geovision-as-manager"!==data1&&"honeywell-vista"!==data1&&"igor"!==data1&&"inncom"!==data1&&"isapi"!==data1&&"kohost-k7"!==data1&&"kohost"!==data1&&"lg"!==data1&&"lg-webos"!==data1&&"lapi"!==data1&&"lirc"!==data1&&"mews"!==data1&&"mht"!==data1&&"paxton"!==data1&&"pelican-wireless"!==data1&&"power-shades"!==data1&&"rachio"!==data1&&"rebrandly"!==data1&&"relay"!==data1&&"rtsp"!==data1&&"salto"!==data1&&"salto-irn"!==data1&&"samsung"!==data1&&"se"!==data1&&"sendgrid"!==data1&&"sonifi"!==data1&&"stay-n-touch"!==data1&&"storable"!==data1&&"twilio"!==data1&&"unifi"!==data1&&"valcom"!==data1&&"vivotek"!==data1&&"vizio"!==data1&&"wisenet"!==data1&&"cloudflare-images"!==data1&&"cloudflare-stream"!==data1&&"insperia-privacy"!==data1){const err8={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.primaryGuest&&"string"!=typeof data.primaryGuest){const err9={instancePath:instancePath+"/primaryGuest",schemaPath:"#/properties/primaryGuest/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}let data3=data.type;if("string"!=typeof data3){const err10={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("reservation"!==data3){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema164.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.sharedGuests){let data4=data.sharedGuests;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++)if("string"!=typeof data4[i0]){const err12={instancePath:instancePath+"/sharedGuests/"+i0,schemaPath:"#/properties/sharedGuests/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}else{const err13={instancePath:instancePath+"/sharedGuests",schemaPath:"#/properties/sharedGuests/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.spaceCategory&&"string"!=typeof data.spaceCategory){const err14={instancePath:instancePath+"/spaceCategory",schemaPath:"#/properties/spaceCategory/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data.space){let data7=data.space;if("string"!=typeof data7&&null!==data7){const err15={instancePath:instancePath+"/space",schemaPath:"#/properties/space/type",keyword:"type",params:{type:schema164.properties.space.type},message:"must be string,null"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}let data8=data.previousSpace;if("string"!=typeof data8&&null!==data8){const err16={instancePath:instancePath+"/previousSpace",schemaPath:"#/properties/previousSpace/type",keyword:"type",params:{type:schema164.properties.previousSpace.type},message:"must be string,null"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.status){let data9=data.status;if("string"!=typeof data9){const err17={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if("reserved"!==data9&&"checkedIn"!==data9&&"checkedOut"!==data9&&"cancelled"!==data9&&"noShow"!==data9&&"enquired"!==data9&&"requested"!==data9&&"optional"!==data9){const err18={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema164.properties.status.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data.mobileCheckInSpaceCategoryChanged&&"boolean"!=typeof data.mobileCheckInSpaceCategoryChanged){const err19={instancePath:instancePath+"/mobileCheckInSpaceCategoryChanged",schemaPath:"#/properties/mobileCheckInSpaceCategoryChanged/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.mobileCheckInSpaceChanged&&"boolean"!=typeof data.mobileCheckInSpaceChanged){const err20={instancePath:instancePath+"/mobileCheckInSpaceChanged",schemaPath:"#/properties/mobileCheckInSpaceChanged/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data.mobileCheckInStatus){let data12=data.mobileCheckInStatus;if("string"!=typeof data12){const err21={instancePath:instancePath+"/mobileCheckInStatus",schemaPath:"#/properties/mobileCheckInStatus/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if("ready"!==data12&&"blocked"!==data12&&"preArrivalStepsRequired"!==data12&&"spaceNotAssigned"!==data12&&"spaceNotReady"!==data12&&"checkInTimeNotStarted"!==data12){const err22={instancePath:instancePath+"/mobileCheckInStatus",schemaPath:"#/properties/mobileCheckInStatus/enum",keyword:"enum",params:{allowedValues:schema164.properties.mobileCheckInStatus.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.mobileCheckInStatusMessage&&"string"!=typeof data.mobileCheckInStatusMessage){const err23={instancePath:instancePath+"/mobileCheckInStatusMessage",schemaPath:"#/properties/mobileCheckInStatusMessage/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data.confirmationNumber&&"string"!=typeof data.confirmationNumber){const err24={instancePath:instancePath+"/confirmationNumber",schemaPath:"#/properties/confirmationNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data.expectedCheckInDateTime){let data15=data.expectedCheckInDateTime;if("string"!=typeof data15&&(!data15||"object"!=typeof data15||Array.isArray(data15))){const err25={instancePath:instancePath+"/expectedCheckInDateTime",schemaPath:"#/properties/expectedCheckInDateTime/type",keyword:"type",params:{type:schema164.properties.expectedCheckInDateTime.type},message:"must be string,object"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if("string"==typeof data15&&!formats4.validate(data15)){const err26={instancePath:instancePath+"/expectedCheckInDateTime",schemaPath:"#/properties/expectedCheckInDateTime/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}if(void 0!==data.checkInDateTime){let data16=data.checkInDateTime;if("string"!=typeof data16&&(!data16||"object"!=typeof data16||Array.isArray(data16))){const err27={instancePath:instancePath+"/checkInDateTime",schemaPath:"#/properties/checkInDateTime/type",keyword:"type",params:{type:schema164.properties.checkInDateTime.type},message:"must be string,object"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if("string"==typeof data16&&!formats4.validate(data16)){const err28={instancePath:instancePath+"/checkInDateTime",schemaPath:"#/properties/checkInDateTime/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}if(void 0!==data.checkOutDateTime){let data17=data.checkOutDateTime;if("string"!=typeof data17&&(!data17||"object"!=typeof data17||Array.isArray(data17))){const err29={instancePath:instancePath+"/checkOutDateTime",schemaPath:"#/properties/checkOutDateTime/type",keyword:"type",params:{type:schema164.properties.checkOutDateTime.type},message:"must be string,object"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if("string"==typeof data17&&!formats4.validate(data17)){const err30={instancePath:instancePath+"/checkOutDateTime",schemaPath:"#/properties/checkOutDateTime/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}let data18=data.adultCount;if("number"==typeof data18){if(data18<1||isNaN(data18)){const err31={instancePath:instancePath+"/adultCount",schemaPath:"#/properties/adultCount/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}else{const err32={instancePath:instancePath+"/adultCount",schemaPath:"#/properties/adultCount/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if("number"!=typeof data.childCount){const err33={instancePath:instancePath+"/childCount",schemaPath:"#/properties/childCount/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(void 0!==data.spaceCategoryAvailabilites){let data20=data.spaceCategoryAvailabilites;if(Array.isArray(data20)){const len1=data20.length;for(let i1=0;i1<len1;i1++){let data21=data20[i1];if(data21&&"object"==typeof data21&&!Array.isArray(data21)){if(void 0!==data21.id&&"string"!=typeof data21.id){const err34={instancePath:instancePath+"/spaceCategoryAvailabilites/"+i1+"/id",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(void 0!==data21.price&&"number"!=typeof data21.price){const err35={instancePath:instancePath+"/spaceCategoryAvailabilites/"+i1+"/price",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(void 0!==data21.unit){let data24=data21.unit;if("string"!=typeof data24){const err36={instancePath:instancePath+"/spaceCategoryAvailabilites/"+i1+"/unit",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/unit/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if("night"!==data24&&"stay"!==data24&&"hour"!==data24){const err37={instancePath:instancePath+"/spaceCategoryAvailabilites/"+i1+"/unit",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/unit/enum",keyword:"enum",params:{allowedValues:schema164.properties.spaceCategoryAvailabilites.items.properties.unit.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}if(void 0!==data21.isUpgrade&&"boolean"!=typeof data21.isUpgrade){const err38={instancePath:instancePath+"/spaceCategoryAvailabilites/"+i1+"/isUpgrade",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/isUpgrade/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}else{const err39={instancePath:instancePath+"/spaceCategoryAvailabilites/"+i1,schemaPath:"#/properties/spaceCategoryAvailabilites/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}}else{const err40={instancePath:instancePath+"/spaceCategoryAvailabilites",schemaPath:"#/properties/spaceCategoryAvailabilites/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}}if(void 0!==data.revenue&&(validate64(data.revenue,{instancePath:instancePath+"/revenue",parentData:data,parentDataProperty:"revenue",rootData:rootData})||(vErrors=null===vErrors?validate64.errors:vErrors.concat(validate64.errors),errors=vErrors.length)),void 0!==data.rateSuppressed&&"boolean"!=typeof data.rateSuppressed){const err41={instancePath:instancePath+"/rateSuppressed",schemaPath:"#/properties/rateSuppressed/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}if(void 0!==data.payment&&"string"!=typeof data.payment){const err42={instancePath:instancePath+"/payment",schemaPath:"#/properties/payment/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(void 0!==data.company&&"string"!=typeof data.company){const err43={instancePath:instancePath+"/company",schemaPath:"#/properties/company/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}if(void 0!==data.travelAgent&&"string"!=typeof data.travelAgent){const err44={instancePath:instancePath+"/travelAgent",schemaPath:"#/properties/travelAgent/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err45={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}if(void 0!==data.metadata){let data32=data.metadata;if(!data32||"object"!=typeof data32||Array.isArray(data32)){const err46={instancePath:instancePath+"/metadata",schemaPath:"definitions.json#/definitions/metadata/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}if(void 0!==data.updatedAt){let data33=data.updatedAt;if("string"!=typeof data33&&(!data33||"object"!=typeof data33||Array.isArray(data33))){const err47={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:schema151.type},message:"must be string,object"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}if("string"==typeof data33&&!formats4.validate(data33)){const err48={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}}}else{const err49={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}return validate63.errors=vErrors,0===errors}__name(validate64,"validate64"),__name(validate63,"validate63");var validateRoom=validate66,schema172={$schema:"http://json-schema.org/draft-07/schema",$id:"room.json",title:"Room",description:"A room represents a physical space of controllable IoT devices",type:"object",required:["id","name"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["room"],default:"room"},name:{type:"string"},floor:{type:"string"},dimmers:{type:"array",default:[],items:{$ref:"dimmer.json"}},switches:{type:"array",default:[],items:{$ref:"switch.json"}},thermostats:{type:"array",default:[],items:{$ref:"thermostat.json"}},locks:{type:"array",default:[],items:{$ref:"lock.json"}},windowCoverings:{type:"array",default:[],items:{$ref:"windowCovering.json"}},courtesy:{type:"array",default:[],items:{$ref:"courtesy.json"}},cameras:{type:"array",default:[],items:{$ref:"camera.json"}},mediaSources:{type:"array",default:[],items:{$ref:"mediaSource.json"}},motionSensors:{type:"array",default:[],items:{$ref:"motionSensor.json"}},alarms:{type:"array",default:[],items:{$ref:"alarm.json"}},occupiedAt:{$ref:"definitions.json#/definitions/createdAt"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}},additionalProperties:!1},schema174={$schema:"http://json-schema.org/draft-07/schema",$id:"switch.json",title:"Switch",description:"Any smart switch",type:"object",required:["id","type","state","driver"],properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},discriminator:{type:"string",enum:["light","fan","irrigation"]},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},state:{type:"string",enum:["on","off"]},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}}};function validate69(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate69.errors=vErrors,0===errors}function validate68(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.state){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property 'state'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.driver){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.type){let data2=data.type;if("string"!=typeof data2){const err8={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("alarm"!==data2&&"dimmer"!==data2&&"switch"!==data2&&"motionSensor"!==data2&&"windowCovering"!==data2&&"camera"!==data2&&"mediaSource"!==data2&&"thermostat"!==data2&&"lock"!==data2&&"courtesy"!==data2&&"gateway"!==data2&&"tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"uncontrolledDevice"!==data2){const err9={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema43.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.discriminator){let data3=data.discriminator;if("string"!=typeof data3){const err10={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("light"!==data3&&"fan"!==data3&&"irrigation"!==data3){const err11={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema174.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.supportedNotifications){let data4=data.supportedNotifications;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++){let data5=data4[i0];if("button 1"!==data5&&"button 2"!==data5&&"button 3"!==data5&&"button 4"!==data5&&"button 5"!==data5&&"idle"!==data5&&"powerHasBeedApplied"!==data5&&"acMainsDisconnected"!==data5&&"acMainsReconnected"!==data5&&"replaceBatterySoon"!==data5&&"replaceBatteryNow"!==data5&&"batteryOk"!==data5&&"hardwareFailure"!==data5&&"softwareFailure"!==data5&&"hardwareFailureWithCode"!==data5&&"softwareFailureWithCode"!==data5&&"motionDetection"!==data5&&"airFilterNeedsCleaned"!==data5&&"airFilterNeedsReplaced"!==data5&&"smokeDetected"!==data5&&"outsideSafeTemperatureRange"!==data5&&"outsideSafeHumidityRange"!==data5&&"scheduleMaintenance"!==data5&&"doorAjar"!==data5&&"communicationFailure"!==data5&&"communicationOk"!==data5&&"burglarAlarm"!==data5&&"fireAlarm"!==data5){const err12={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}let j0,i1=data4.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data4[i1],data4[j0])){const err13={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++;break outer0}}else{const err14={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.notification&&(validate69(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate69.errors:vErrors.concat(validate69.errors),errors=vErrors.length)),void 0!==data.driver){let data7=data.driver;if("string"!=typeof data7){const err15={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if("adlink"!==data7&&"aws-kinesis"!==data7&&"butler"!==data7&&"crestron"!==data7&&"dell"!==data7&&"dmp"!==data7&&"doorbird"!==data7&&"dormakaba"!==data7&&"dsc"!==data7&&"ecobee"!==data7&&"epson"!==data7&&"geovision-rs"!==data7&&"geovision-as-manager"!==data7&&"honeywell-vista"!==data7&&"igor"!==data7&&"inncom"!==data7&&"isapi"!==data7&&"kohost-k7"!==data7&&"kohost"!==data7&&"lg"!==data7&&"lg-webos"!==data7&&"lapi"!==data7&&"lirc"!==data7&&"mews"!==data7&&"mht"!==data7&&"paxton"!==data7&&"pelican-wireless"!==data7&&"power-shades"!==data7&&"rachio"!==data7&&"rebrandly"!==data7&&"relay"!==data7&&"rtsp"!==data7&&"salto"!==data7&&"salto-irn"!==data7&&"samsung"!==data7&&"se"!==data7&&"sendgrid"!==data7&&"sonifi"!==data7&&"stay-n-touch"!==data7&&"storable"!==data7&&"twilio"!==data7&&"unifi"!==data7&&"valcom"!==data7&&"vivotek"!==data7&&"vizio"!==data7&&"wisenet"!==data7&&"cloudflare-images"!==data7&&"cloudflare-stream"!==data7&&"insperia-privacy"!==data7){const err16={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err17={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.state){let data9=data.state;if("string"!=typeof data9){const err18={instancePath:instancePath+"/state",schemaPath:"#/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if("on"!==data9&&"off"!==data9){const err19={instancePath:instancePath+"/state",schemaPath:"#/properties/state/enum",keyword:"enum",params:{allowedValues:schema174.properties.state.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err20={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data.watts){let data11=data.watts;if("number"==typeof data11){if(data11<0||isNaN(data11)){const err21={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}else{const err22={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err23={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err24={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err25={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err26={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}else{const err27={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}return validate68.errors=vErrors,0===errors}__name(validate69,"validate69"),__name(validate68,"validate68");var schema183={$schema:"http://json-schema.org/draft-07/schema",$id:"thermostat.json",title:"Thermostat",description:"Any smart thermostat",type:"object",required:["id","type","hvacMode","fanMode","hvacState","fanState","setpoints","temperatureScale","supportedHvacModes","supportedFanModes","driver"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},name:{$ref:"definitions.json#/definitions/name"},type:{$ref:"definitions.json#/definitions/type",default:"thermostat"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},currentTemperature:{type:"number"},currentHumidity:{type:"number",minimum:0},hvacMode:{type:"string",$ref:"#/properties/supportedHvacModes/items"},hvacState:{type:["string","null"],enum:["cooling","heating","off",null]},fanMode:{type:"string",$ref:"#/properties/supportedFanModes/items"},fanState:{type:["string","null"],enum:["off","low","medium","high","on",null]},temperatureScale:{type:"string",enum:["celsius","fahrenheit"],default:"fahrenheit"},humidityScale:{type:["string","null"],enum:["absolute","relative",null]},supportedHvacModes:{type:"array",uniqueItems:!0,minItems:2,items:{enum:["cool","heat","auto","off"]}},supportedFanModes:{type:"array",uniqueItems:!0,items:{enum:["auto","low","medium","high","off","on"]}},setpoints:{type:"object",additionalProperties:!1,properties:{cool:{$ref:"#/$defs/setpoint"},heat:{$ref:"#/$defs/setpoint"},auto:{$ref:"#/$defs/setpoint"}}},minAutoDelta:{type:"number",default:3},cycleRate:{type:"number"},batteryLevel:{$ref:"definitions.json#/definitions/batteryLevel"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},$defs:{setpoint:{type:"object",additionalProperties:!1,properties:{value:{$ref:"#/$defs/setpointValue"},min:{$ref:"#/$defs/setpointMinMax"},max:{$ref:"#/$defs/setpointMinMax"}}},setpointValue:{type:"number",minimum:0,maximum:99},setpointMinMax:{type:["number","null"],minimum:0,maximum:99}}},schema191={enum:["cool","heat","auto","off"]},schema192={enum:["auto","low","medium","high","off","on"]};function validate73(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate73.errors=vErrors,0===errors}__name(validate73,"validate73");var schema195={type:["number","null"],minimum:0,maximum:99};function validate75(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){for(const key0 in data)if("value"!==key0&&"min"!==key0&&"max"!==key0){const err0={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0!==data.value){let data0=data.value;if("number"==typeof data0){if(data0>99||isNaN(data0)){const err1={instancePath:instancePath+"/value",schemaPath:"#/$defs/setpointValue/maximum",keyword:"maximum",params:{comparison:"<=",limit:99},message:"must be <= 99"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(data0<0||isNaN(data0)){const err2={instancePath:instancePath+"/value",schemaPath:"#/$defs/setpointValue/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}else{const err3={instancePath:instancePath+"/value",schemaPath:"#/$defs/setpointValue/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}if(void 0!==data.min){let data1=data.min;if("number"!=typeof data1&&null!==data1){const err4={instancePath:instancePath+"/min",schemaPath:"#/$defs/setpointMinMax/type",keyword:"type",params:{type:schema195.type},message:"must be number,null"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if("number"==typeof data1){if(data1>99||isNaN(data1)){const err5={instancePath:instancePath+"/min",schemaPath:"#/$defs/setpointMinMax/maximum",keyword:"maximum",params:{comparison:"<=",limit:99},message:"must be <= 99"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(data1<0||isNaN(data1)){const err6={instancePath:instancePath+"/min",schemaPath:"#/$defs/setpointMinMax/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}}}if(void 0!==data.max){let data2=data.max;if("number"!=typeof data2&&null!==data2){const err7={instancePath:instancePath+"/max",schemaPath:"#/$defs/setpointMinMax/type",keyword:"type",params:{type:schema195.type},message:"must be number,null"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("number"==typeof data2){if(data2>99||isNaN(data2)){const err8={instancePath:instancePath+"/max",schemaPath:"#/$defs/setpointMinMax/maximum",keyword:"maximum",params:{comparison:"<=",limit:99},message:"must be <= 99"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(data2<0||isNaN(data2)){const err9={instancePath:instancePath+"/max",schemaPath:"#/$defs/setpointMinMax/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}}}else{const err10={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}return validate75.errors=vErrors,0===errors}function validate72(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="thermostat"),void 0===data.temperatureScale&&(data.temperatureScale="fahrenheit"),void 0===data.minAutoDelta&&(data.minAutoDelta=3),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.hvacMode){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"hvacMode"},message:"must have required property 'hvacMode'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.fanMode){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"fanMode"},message:"must have required property 'fanMode'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.hvacState){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"hvacState"},message:"must have required property 'hvacState'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.fanState){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"fanState"},message:"must have required property 'fanState'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0===data.setpoints){const err6={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"setpoints"},message:"must have required property 'setpoints'"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0===data.temperatureScale){const err7={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"temperatureScale"},message:"must have required property 'temperatureScale'"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0===data.supportedHvacModes){const err8={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"supportedHvacModes"},message:"must have required property 'supportedHvacModes'"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0===data.supportedFanModes){const err9={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"supportedFanModes"},message:"must have required property 'supportedFanModes'"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0===data.driver){const err10={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}for(const key0 in data)if(!func2.call(schema183.properties,key0)){const err11={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err12={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err13={};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(_errs6===errors){const err14={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err15={instancePath:instancePath+"/name",schemaPath:"definitions.json#/definitions/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}let data2=data.type;if("string"!=typeof data2){const err16={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("alarm"!==data2&&"dimmer"!==data2&&"switch"!==data2&&"motionSensor"!==data2&&"windowCovering"!==data2&&"camera"!==data2&&"mediaSource"!==data2&&"thermostat"!==data2&&"lock"!==data2&&"courtesy"!==data2&&"gateway"!==data2&&"tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"uncontrolledDevice"!==data2){const err17={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema43.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.driver){let data3=data.driver;if("string"!=typeof data3){const err18={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if("adlink"!==data3&&"aws-kinesis"!==data3&&"butler"!==data3&&"crestron"!==data3&&"dell"!==data3&&"dmp"!==data3&&"doorbird"!==data3&&"dormakaba"!==data3&&"dsc"!==data3&&"ecobee"!==data3&&"epson"!==data3&&"geovision-rs"!==data3&&"geovision-as-manager"!==data3&&"honeywell-vista"!==data3&&"igor"!==data3&&"inncom"!==data3&&"isapi"!==data3&&"kohost-k7"!==data3&&"kohost"!==data3&&"lg"!==data3&&"lg-webos"!==data3&&"lapi"!==data3&&"lirc"!==data3&&"mews"!==data3&&"mht"!==data3&&"paxton"!==data3&&"pelican-wireless"!==data3&&"power-shades"!==data3&&"rachio"!==data3&&"rebrandly"!==data3&&"relay"!==data3&&"rtsp"!==data3&&"salto"!==data3&&"salto-irn"!==data3&&"samsung"!==data3&&"se"!==data3&&"sendgrid"!==data3&&"sonifi"!==data3&&"stay-n-touch"!==data3&&"storable"!==data3&&"twilio"!==data3&&"unifi"!==data3&&"valcom"!==data3&&"vivotek"!==data3&&"vizio"!==data3&&"wisenet"!==data3&&"cloudflare-images"!==data3&&"cloudflare-stream"!==data3&&"insperia-privacy"!==data3){const err19={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err20={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data.supportedNotifications){let data5=data.supportedNotifications;if(Array.isArray(data5)){const len0=data5.length;for(let i0=0;i0<len0;i0++){let data6=data5[i0];if("button 1"!==data6&&"button 2"!==data6&&"button 3"!==data6&&"button 4"!==data6&&"button 5"!==data6&&"idle"!==data6&&"powerHasBeedApplied"!==data6&&"acMainsDisconnected"!==data6&&"acMainsReconnected"!==data6&&"replaceBatterySoon"!==data6&&"replaceBatteryNow"!==data6&&"batteryOk"!==data6&&"hardwareFailure"!==data6&&"softwareFailure"!==data6&&"hardwareFailureWithCode"!==data6&&"softwareFailureWithCode"!==data6&&"motionDetection"!==data6&&"airFilterNeedsCleaned"!==data6&&"airFilterNeedsReplaced"!==data6&&"smokeDetected"!==data6&&"outsideSafeTemperatureRange"!==data6&&"outsideSafeHumidityRange"!==data6&&"scheduleMaintenance"!==data6&&"doorAjar"!==data6&&"communicationFailure"!==data6&&"communicationOk"!==data6&&"burglarAlarm"!==data6&&"fireAlarm"!==data6){const err21={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}let j0,i1=data5.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data5[i1],data5[j0])){const err22={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++;break outer0}}else{const err23={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}if(void 0!==data.notification&&(validate73(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate73.errors:vErrors.concat(validate73.errors),errors=vErrors.length)),void 0!==data.currentTemperature&&"number"!=typeof data.currentTemperature){const err24={instancePath:instancePath+"/currentTemperature",schemaPath:"#/properties/currentTemperature/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data.currentHumidity){let data9=data.currentHumidity;if("number"==typeof data9){if(data9<0||isNaN(data9)){const err25={instancePath:instancePath+"/currentHumidity",schemaPath:"#/properties/currentHumidity/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}else{const err26={instancePath:instancePath+"/currentHumidity",schemaPath:"#/properties/currentHumidity/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}if(void 0!==data.hvacMode){let data10=data.hvacMode;if("string"!=typeof data10){const err27={instancePath:instancePath+"/hvacMode",schemaPath:"#/properties/hvacMode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if("cool"!==data10&&"heat"!==data10&&"auto"!==data10&&"off"!==data10){const err28={instancePath:instancePath+"/hvacMode",schemaPath:"#/properties/supportedHvacModes/items/enum",keyword:"enum",params:{allowedValues:schema191.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}if(void 0!==data.hvacState){let data11=data.hvacState;if("string"!=typeof data11&&null!==data11){const err29={instancePath:instancePath+"/hvacState",schemaPath:"#/properties/hvacState/type",keyword:"type",params:{type:schema183.properties.hvacState.type},message:"must be string,null"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if("cooling"!==data11&&"heating"!==data11&&"off"!==data11&&null!==data11){const err30={instancePath:instancePath+"/hvacState",schemaPath:"#/properties/hvacState/enum",keyword:"enum",params:{allowedValues:schema183.properties.hvacState.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}if(void 0!==data.fanMode){let data12=data.fanMode;if("string"!=typeof data12){const err31={instancePath:instancePath+"/fanMode",schemaPath:"#/properties/fanMode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if("auto"!==data12&&"low"!==data12&&"medium"!==data12&&"high"!==data12&&"off"!==data12&&"on"!==data12){const err32={instancePath:instancePath+"/fanMode",schemaPath:"#/properties/supportedFanModes/items/enum",keyword:"enum",params:{allowedValues:schema192.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}if(void 0!==data.fanState){let data13=data.fanState;if("string"!=typeof data13&&null!==data13){const err33={instancePath:instancePath+"/fanState",schemaPath:"#/properties/fanState/type",keyword:"type",params:{type:schema183.properties.fanState.type},message:"must be string,null"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if("off"!==data13&&"low"!==data13&&"medium"!==data13&&"high"!==data13&&"on"!==data13&&null!==data13){const err34={instancePath:instancePath+"/fanState",schemaPath:"#/properties/fanState/enum",keyword:"enum",params:{allowedValues:schema183.properties.fanState.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}}let data14=data.temperatureScale;if("string"!=typeof data14){const err35={instancePath:instancePath+"/temperatureScale",schemaPath:"#/properties/temperatureScale/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if("celsius"!==data14&&"fahrenheit"!==data14){const err36={instancePath:instancePath+"/temperatureScale",schemaPath:"#/properties/temperatureScale/enum",keyword:"enum",params:{allowedValues:schema183.properties.temperatureScale.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if(void 0!==data.humidityScale){let data15=data.humidityScale;if("string"!=typeof data15&&null!==data15){const err37={instancePath:instancePath+"/humidityScale",schemaPath:"#/properties/humidityScale/type",keyword:"type",params:{type:schema183.properties.humidityScale.type},message:"must be string,null"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}if("absolute"!==data15&&"relative"!==data15&&null!==data15){const err38={instancePath:instancePath+"/humidityScale",schemaPath:"#/properties/humidityScale/enum",keyword:"enum",params:{allowedValues:schema183.properties.humidityScale.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}if(void 0!==data.supportedHvacModes){let data16=data.supportedHvacModes;if(Array.isArray(data16)){if(data16.length<2){const err39={instancePath:instancePath+"/supportedHvacModes",schemaPath:"#/properties/supportedHvacModes/minItems",keyword:"minItems",params:{limit:2},message:"must NOT have fewer than 2 items"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}const len1=data16.length;for(let i2=0;i2<len1;i2++){let data17=data16[i2];if("cool"!==data17&&"heat"!==data17&&"auto"!==data17&&"off"!==data17){const err40={instancePath:instancePath+"/supportedHvacModes/"+i2,schemaPath:"#/properties/supportedHvacModes/items/enum",keyword:"enum",params:{allowedValues:schema183.properties.supportedHvacModes.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}}let j1,i3=data16.length;if(i3>1)outer1:for(;i3--;)for(j1=i3;j1--;)if(func0(data16[i3],data16[j1])){const err41={instancePath:instancePath+"/supportedHvacModes",schemaPath:"#/properties/supportedHvacModes/uniqueItems",keyword:"uniqueItems",params:{i:i3,j:j1},message:"must NOT have duplicate items (items ## "+j1+" and "+i3+" are identical)"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++;break outer1}}else{const err42={instancePath:instancePath+"/supportedHvacModes",schemaPath:"#/properties/supportedHvacModes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}}if(void 0!==data.supportedFanModes){let data18=data.supportedFanModes;if(Array.isArray(data18)){const len2=data18.length;for(let i4=0;i4<len2;i4++){let data19=data18[i4];if("auto"!==data19&&"low"!==data19&&"medium"!==data19&&"high"!==data19&&"off"!==data19&&"on"!==data19){const err43={instancePath:instancePath+"/supportedFanModes/"+i4,schemaPath:"#/properties/supportedFanModes/items/enum",keyword:"enum",params:{allowedValues:schema183.properties.supportedFanModes.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}}let j2,i5=data18.length;if(i5>1)outer2:for(;i5--;)for(j2=i5;j2--;)if(func0(data18[i5],data18[j2])){const err44={instancePath:instancePath+"/supportedFanModes",schemaPath:"#/properties/supportedFanModes/uniqueItems",keyword:"uniqueItems",params:{i:i5,j:j2},message:"must NOT have duplicate items (items ## "+j2+" and "+i5+" are identical)"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++;break outer2}}else{const err45={instancePath:instancePath+"/supportedFanModes",schemaPath:"#/properties/supportedFanModes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}if(void 0!==data.setpoints){let data20=data.setpoints;if(data20&&"object"==typeof data20&&!Array.isArray(data20)){for(const key1 in data20)if("cool"!==key1&&"heat"!==key1&&"auto"!==key1){const err46={instancePath:instancePath+"/setpoints",schemaPath:"#/properties/setpoints/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}void 0!==data20.cool&&(validate75(data20.cool,{instancePath:instancePath+"/setpoints/cool",parentData:data20,parentDataProperty:"cool",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length)),void 0!==data20.heat&&(validate75(data20.heat,{instancePath:instancePath+"/setpoints/heat",parentData:data20,parentDataProperty:"heat",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length)),void 0!==data20.auto&&(validate75(data20.auto,{instancePath:instancePath+"/setpoints/auto",parentData:data20,parentDataProperty:"auto",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length))}else{const err47={instancePath:instancePath+"/setpoints",schemaPath:"#/properties/setpoints/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}}if("number"!=typeof data.minAutoDelta){const err48={instancePath:instancePath+"/minAutoDelta",schemaPath:"#/properties/minAutoDelta/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}if(void 0!==data.cycleRate&&"number"!=typeof data.cycleRate){const err49={instancePath:instancePath+"/cycleRate",schemaPath:"#/properties/cycleRate/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}if(void 0!==data.batteryLevel){let data26=data.batteryLevel;if("number"==typeof data26){if(data26>100||isNaN(data26)){const err50={instancePath:instancePath+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}if(data26<0||isNaN(data26)){const err51={instancePath:instancePath+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}}else{const err52={instancePath:instancePath+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err53={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}if(void 0!==data.watts){let data28=data.watts;if("number"==typeof data28){if(data28<0||isNaN(data28)){const err54={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}}else{const err55={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err56={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err57={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err58={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err59={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}}else{const err60={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err60]:vErrors.push(err60),errors++}return validate72.errors=vErrors,0===errors}__name(validate75,"validate75"),__name(validate72,"validate72");var schema200={$schema:"http://json-schema.org/draft-07/schema",$id:"windowCovering.json",title:"Window Covering",description:"Any smart window covering",required:["id","type","position","driver"],additionalProperties:!1,type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type",default:"windowCovering"},discriminator:{type:"string",enum:["basic","variable"],default:"variable"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},position:{type:["number","null"],minimum:0,maximum:100},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}}};function validate82(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate82.errors=vErrors,0===errors}function validate81(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="windowCovering"),void 0===data.discriminator&&(data.discriminator="variable"),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.position){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"position"},message:"must have required property 'position'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.driver){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}for(const key0 in data)if(!func2.call(schema200.properties,key0)){const err4={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err6={};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(_errs6===errors){const err7={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err8={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}let data2=data.type;if("string"!=typeof data2){const err9={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("alarm"!==data2&&"dimmer"!==data2&&"switch"!==data2&&"motionSensor"!==data2&&"windowCovering"!==data2&&"camera"!==data2&&"mediaSource"!==data2&&"thermostat"!==data2&&"lock"!==data2&&"courtesy"!==data2&&"gateway"!==data2&&"tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"uncontrolledDevice"!==data2){const err10={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema43.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}let data3=data.discriminator;if("string"!=typeof data3){const err11={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("basic"!==data3&&"variable"!==data3){const err12={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema200.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.supportedNotifications){let data4=data.supportedNotifications;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++){let data5=data4[i0];if("button 1"!==data5&&"button 2"!==data5&&"button 3"!==data5&&"button 4"!==data5&&"button 5"!==data5&&"idle"!==data5&&"powerHasBeedApplied"!==data5&&"acMainsDisconnected"!==data5&&"acMainsReconnected"!==data5&&"replaceBatterySoon"!==data5&&"replaceBatteryNow"!==data5&&"batteryOk"!==data5&&"hardwareFailure"!==data5&&"softwareFailure"!==data5&&"hardwareFailureWithCode"!==data5&&"softwareFailureWithCode"!==data5&&"motionDetection"!==data5&&"airFilterNeedsCleaned"!==data5&&"airFilterNeedsReplaced"!==data5&&"smokeDetected"!==data5&&"outsideSafeTemperatureRange"!==data5&&"outsideSafeHumidityRange"!==data5&&"scheduleMaintenance"!==data5&&"doorAjar"!==data5&&"communicationFailure"!==data5&&"communicationOk"!==data5&&"burglarAlarm"!==data5&&"fireAlarm"!==data5){const err13={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}let j0,i1=data4.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data4[i1],data4[j0])){const err14={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++;break outer0}}else{const err15={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.notification&&(validate82(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate82.errors:vErrors.concat(validate82.errors),errors=vErrors.length)),void 0!==data.driver){let data7=data.driver;if("string"!=typeof data7){const err16={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("adlink"!==data7&&"aws-kinesis"!==data7&&"butler"!==data7&&"crestron"!==data7&&"dell"!==data7&&"dmp"!==data7&&"doorbird"!==data7&&"dormakaba"!==data7&&"dsc"!==data7&&"ecobee"!==data7&&"epson"!==data7&&"geovision-rs"!==data7&&"geovision-as-manager"!==data7&&"honeywell-vista"!==data7&&"igor"!==data7&&"inncom"!==data7&&"isapi"!==data7&&"kohost-k7"!==data7&&"kohost"!==data7&&"lg"!==data7&&"lg-webos"!==data7&&"lapi"!==data7&&"lirc"!==data7&&"mews"!==data7&&"mht"!==data7&&"paxton"!==data7&&"pelican-wireless"!==data7&&"power-shades"!==data7&&"rachio"!==data7&&"rebrandly"!==data7&&"relay"!==data7&&"rtsp"!==data7&&"salto"!==data7&&"salto-irn"!==data7&&"samsung"!==data7&&"se"!==data7&&"sendgrid"!==data7&&"sonifi"!==data7&&"stay-n-touch"!==data7&&"storable"!==data7&&"twilio"!==data7&&"unifi"!==data7&&"valcom"!==data7&&"vivotek"!==data7&&"vizio"!==data7&&"wisenet"!==data7&&"cloudflare-images"!==data7&&"cloudflare-stream"!==data7&&"insperia-privacy"!==data7){const err17={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err18={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data.position){let data9=data.position;if("number"!=typeof data9&&null!==data9){const err19={instancePath:instancePath+"/position",schemaPath:"#/properties/position/type",keyword:"type",params:{type:schema200.properties.position.type},message:"must be number,null"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if("number"==typeof data9){if(data9>100||isNaN(data9)){const err20={instancePath:instancePath+"/position",schemaPath:"#/properties/position/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(data9<0||isNaN(data9)){const err21={instancePath:instancePath+"/position",schemaPath:"#/properties/position/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err22={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data.watts){let data11=data.watts;if("number"==typeof data11){if(data11<0||isNaN(data11)){const err23={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}else{const err24={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err25={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err26={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err27={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err28={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}else{const err29={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}return validate81.errors=vErrors,0===errors}function validate66(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="room"),void 0===data.dimmers&&(data.dimmers=[]),void 0===data.switches&&(data.switches=[]),void 0===data.thermostats&&(data.thermostats=[]),void 0===data.locks&&(data.locks=[]),void 0===data.windowCoverings&&(data.windowCoverings=[]),void 0===data.courtesy&&(data.courtesy=[]),void 0===data.cameras&&(data.cameras=[]),void 0===data.mediaSources&&(data.mediaSources=[]),void 0===data.motionSensors&&(data.motionSensors=[]),void 0===data.alarms&&(data.alarms=[]),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.name){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}for(const key0 in data)if(!func2.call(schema172.properties,key0)){const err2={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs6===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if("room"!==data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema172.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.name&&"string"!=typeof data.name){const err8={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.floor&&"string"!=typeof data.floor){const err9={instancePath:instancePath+"/floor",schemaPath:"#/properties/floor/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}let data4=data.dimmers;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++)validate27(data4[i0],{instancePath:instancePath+"/dimmers/"+i0,parentData:data4,parentDataProperty:i0,rootData:rootData})||(vErrors=null===vErrors?validate27.errors:vErrors.concat(validate27.errors),errors=vErrors.length)}else{const err10={instancePath:instancePath+"/dimmers",schemaPath:"#/properties/dimmers/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}let data6=data.switches;if(Array.isArray(data6)){const len1=data6.length;for(let i1=0;i1<len1;i1++)validate68(data6[i1],{instancePath:instancePath+"/switches/"+i1,parentData:data6,parentDataProperty:i1,rootData:rootData})||(vErrors=null===vErrors?validate68.errors:vErrors.concat(validate68.errors),errors=vErrors.length)}else{const err11={instancePath:instancePath+"/switches",schemaPath:"#/properties/switches/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}let data8=data.thermostats;if(Array.isArray(data8)){const len2=data8.length;for(let i2=0;i2<len2;i2++)validate72(data8[i2],{instancePath:instancePath+"/thermostats/"+i2,parentData:data8,parentDataProperty:i2,rootData:rootData})||(vErrors=null===vErrors?validate72.errors:vErrors.concat(validate72.errors),errors=vErrors.length)}else{const err12={instancePath:instancePath+"/thermostats",schemaPath:"#/properties/thermostats/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}let data10=data.locks;if(Array.isArray(data10)){const len3=data10.length;for(let i3=0;i3<len3;i3++)validate45(data10[i3],{instancePath:instancePath+"/locks/"+i3,parentData:data10,parentDataProperty:i3,rootData:rootData})||(vErrors=null===vErrors?validate45.errors:vErrors.concat(validate45.errors),errors=vErrors.length)}else{const err13={instancePath:instancePath+"/locks",schemaPath:"#/properties/locks/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}let data12=data.windowCoverings;if(Array.isArray(data12)){const len4=data12.length;for(let i4=0;i4<len4;i4++)validate81(data12[i4],{instancePath:instancePath+"/windowCoverings/"+i4,parentData:data12,parentDataProperty:i4,rootData:rootData})||(vErrors=null===vErrors?validate81.errors:vErrors.concat(validate81.errors),errors=vErrors.length)}else{const err14={instancePath:instancePath+"/windowCoverings",schemaPath:"#/properties/windowCoverings/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}let data14=data.courtesy;if(Array.isArray(data14)){const len5=data14.length;for(let i5=0;i5<len5;i5++)validate22(data14[i5],{instancePath:instancePath+"/courtesy/"+i5,parentData:data14,parentDataProperty:i5,rootData:rootData})||(vErrors=null===vErrors?validate22.errors:vErrors.concat(validate22.errors),errors=vErrors.length)}else{const err15={instancePath:instancePath+"/courtesy",schemaPath:"#/properties/courtesy/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}let data16=data.cameras;if(Array.isArray(data16)){const len6=data16.length;for(let i6=0;i6<len6;i6++)validate17(data16[i6],{instancePath:instancePath+"/cameras/"+i6,parentData:data16,parentDataProperty:i6,rootData:rootData})||(vErrors=null===vErrors?validate17.errors:vErrors.concat(validate17.errors),errors=vErrors.length)}else{const err16={instancePath:instancePath+"/cameras",schemaPath:"#/properties/cameras/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}let data18=data.mediaSources;if(Array.isArray(data18)){const len7=data18.length;for(let i7=0;i7<len7;i7++)validate49(data18[i7],{instancePath:instancePath+"/mediaSources/"+i7,parentData:data18,parentDataProperty:i7,rootData:rootData})||(vErrors=null===vErrors?validate49.errors:vErrors.concat(validate49.errors),errors=vErrors.length)}else{const err17={instancePath:instancePath+"/mediaSources",schemaPath:"#/properties/mediaSources/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}let data20=data.motionSensors;if(Array.isArray(data20)){const len8=data20.length;for(let i8=0;i8<len8;i8++)validate52(data20[i8],{instancePath:instancePath+"/motionSensors/"+i8,parentData:data20,parentDataProperty:i8,rootData:rootData})||(vErrors=null===vErrors?validate52.errors:vErrors.concat(validate52.errors),errors=vErrors.length)}else{const err18={instancePath:instancePath+"/motionSensors",schemaPath:"#/properties/motionSensors/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}let data22=data.alarms;if(Array.isArray(data22)){const len9=data22.length;for(let i9=0;i9<len9;i9++)validate10(data22[i9],{instancePath:instancePath+"/alarms/"+i9,parentData:data22,parentDataProperty:i9,rootData:rootData})||(vErrors=null===vErrors?validate10.errors:vErrors.concat(validate10.errors),errors=vErrors.length)}else{const err19={instancePath:instancePath+"/alarms",schemaPath:"#/properties/alarms/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.occupiedAt){let data24=data.occupiedAt;if("string"!=typeof data24&&(!data24||"object"!=typeof data24||Array.isArray(data24))){const err20={instancePath:instancePath+"/occupiedAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema101.type},message:"must be string,object"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if("string"==typeof data24&&!formats4.validate(data24)){const err21={instancePath:instancePath+"/occupiedAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}if(void 0!==data.createdAt){let data25=data.createdAt;if("string"!=typeof data25&&(!data25||"object"!=typeof data25||Array.isArray(data25))){const err22={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema101.type},message:"must be string,object"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if("string"==typeof data25&&!formats4.validate(data25)){const err23={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}if(void 0!==data.updatedAt){let data26=data.updatedAt;if("string"!=typeof data26&&(!data26||"object"!=typeof data26||Array.isArray(data26))){const err24={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:schema151.type},message:"must be string,object"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if("string"==typeof data26&&!formats4.validate(data26)){const err25={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}}else{const err26={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}return validate66.errors=vErrors,0===errors}__name(validate82,"validate82"),__name(validate81,"validate81"),__name(validate66,"validate66");var validateScene=validate90,schema212={$schema:"http://json-schema.org/draft-07/schema",$id:"scene.json",title:"Scene",description:"A room represents a physical space of controllable IoT devices",type:"object",required:["id","name","type"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},description:{type:"string"},type:{type:"string",enum:["scene"],default:"scene"},devices:{type:"object",properties:{switches:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},state:{$ref:"switch.json#/properties/state"}},default:[]}},dimmers:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},level:{$ref:"dimmer.json#/properties/level"}}},default:[]},windowCoverings:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},position:{$ref:"windowCovering.json#/properties/position"}}},default:[]},thermostats:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},hvacMode:{$ref:"thermostat.json#/properties/hvacMode"},setpoints:{$ref:"thermostat.json#/properties/setpoints"},fanMode:{$ref:"thermostat.json#/properties/fanMode"},setpointDelta:{type:"number"}}},default:[]},mediaSources:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},volume:{type:"number",minimum:0,maximum:100},commands:{type:"array",items:{type:"string"}}}}},locks:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},state:{$ref:"lock.json#/properties/state"},mode:{$ref:"lock.json#/properties/mode"}}}}},additionalProperties:!1},isDefault:{type:"boolean",default:!1},showOnUi:{type:"boolean",default:!0}}},schema215={type:"string",enum:["on","off"]},schema217={type:["number","null"],minimum:0,maximum:100},schema219={type:["number","null"],minimum:0,maximum:100},schema228={type:["string","null"],enum:["locked","unlocked",null]},schema229={type:["string","null"],enum:["normal","autoLock","emergencyOpen","emergencyClose","holdOpen","lockdown",null],description:"emergencyOpen and emergencyClose are deprecated and can be removed once Salto, Paxton and Geovision drivers are updated",default:null};function validate91(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if("string"!=typeof data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if("cool"!==data&&"heat"!==data&&"auto"!==data&&"off"!==data){const err1={instancePath:instancePath,schemaPath:"#/properties/supportedHvacModes/items/enum",keyword:"enum",params:{allowedValues:schema191.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}return validate91.errors=vErrors,0===errors}function validate93(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){for(const key0 in data)if("cool"!==key0&&"heat"!==key0&&"auto"!==key0){const err0={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}void 0!==data.cool&&(validate75(data.cool,{instancePath:instancePath+"/cool",parentData:data,parentDataProperty:"cool",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length)),void 0!==data.heat&&(validate75(data.heat,{instancePath:instancePath+"/heat",parentData:data,parentDataProperty:"heat",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length)),void 0!==data.auto&&(validate75(data.auto,{instancePath:instancePath+"/auto",parentData:data,parentDataProperty:"auto",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length))}else{const err1={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}return validate93.errors=vErrors,0===errors}function validate98(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if("string"!=typeof data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if("auto"!==data&&"low"!==data&&"medium"!==data&&"high"!==data&&"off"!==data&&"on"!==data){const err1={instancePath:instancePath,schemaPath:"#/properties/supportedFanModes/items/enum",keyword:"enum",params:{allowedValues:schema192.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}return validate98.errors=vErrors,0===errors}function validate90(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="scene"),void 0===data.isDefault&&(data.isDefault=!1),void 0===data.showOnUi&&(data.showOnUi=!0),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.name){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.type){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}for(const key0 in data)if("id"!==key0&&"name"!==key0&&"description"!==key0&&"type"!==key0&&"devices"!==key0&&"isDefault"!==key0&&"showOnUi"!==key0){const err3={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs6===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.description&&"string"!=typeof data.description){const err8={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}let data3=data.type;if("string"!=typeof data3){const err9={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("scene"!==data3){const err10={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema212.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.devices){let data4=data.devices;if(data4&&"object"==typeof data4&&!Array.isArray(data4)){void 0===data4.dimmers&&(data4.dimmers=[]),void 0===data4.windowCoverings&&(data4.windowCoverings=[]),void 0===data4.thermostats&&(data4.thermostats=[]);for(const key1 in data4)if("switches"!==key1&&"dimmers"!==key1&&"windowCoverings"!==key1&&"thermostats"!==key1&&"mediaSources"!==key1&&"locks"!==key1){const err11={instancePath:instancePath+"/devices",schemaPath:"#/properties/devices/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data4.switches){let data5=data4.switches;if(Array.isArray(data5)){const len0=data5.length;for(let i0=0;i0<len0;i0++){let data6=data5[i0];if(data6&&"object"==typeof data6&&!Array.isArray(data6)){if(void 0!==data6.id){let data7=data6.id;if("string"!=typeof data7){const err12={instancePath:instancePath+"/devices/switches/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}const _errs23=errors,_errs24=errors;if("global"!==data7&&"system"!==data7){const err13={};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(_errs24===errors){const err14={instancePath:instancePath+"/devices/switches/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}else errors=_errs23,null!==vErrors&&(_errs23?vErrors.length=_errs23:vErrors=null)}if(void 0!==data6.state){let data8=data6.state;if("string"!=typeof data8){const err15={instancePath:instancePath+"/devices/switches/"+i0+"/state",schemaPath:"switch.json#/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if("on"!==data8&&"off"!==data8){const err16={instancePath:instancePath+"/devices/switches/"+i0+"/state",schemaPath:"switch.json#/properties/state/enum",keyword:"enum",params:{allowedValues:schema215.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}}else{const err17={instancePath:instancePath+"/devices/switches/"+i0,schemaPath:"#/properties/devices/properties/switches/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}}else{const err18={instancePath:instancePath+"/devices/switches",schemaPath:"#/properties/devices/properties/switches/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}let data9=data4.dimmers;if(Array.isArray(data9)){const len1=data9.length;for(let i1=0;i1<len1;i1++){let data10=data9[i1];if(data10&&"object"==typeof data10&&!Array.isArray(data10)){if(void 0!==data10.id){let data11=data10.id;if("string"!=typeof data11){const err19={instancePath:instancePath+"/devices/dimmers/"+i1+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}const _errs35=errors,_errs36=errors;if("global"!==data11&&"system"!==data11){const err20={};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(_errs36===errors){const err21={instancePath:instancePath+"/devices/dimmers/"+i1+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}else errors=_errs35,null!==vErrors&&(_errs35?vErrors.length=_errs35:vErrors=null)}if(void 0!==data10.level){let data12=data10.level;if("number"!=typeof data12&&null!==data12){const err22={instancePath:instancePath+"/devices/dimmers/"+i1+"/level",schemaPath:"dimmer.json#/properties/level/type",keyword:"type",params:{type:schema217.type},message:"must be number,null"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if("number"==typeof data12){if(data12>100||isNaN(data12)){const err23={instancePath:instancePath+"/devices/dimmers/"+i1+"/level",schemaPath:"dimmer.json#/properties/level/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(data12<0||isNaN(data12)){const err24={instancePath:instancePath+"/devices/dimmers/"+i1+"/level",schemaPath:"dimmer.json#/properties/level/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}}}else{const err25={instancePath:instancePath+"/devices/dimmers/"+i1,schemaPath:"#/properties/devices/properties/dimmers/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}}else{const err26={instancePath:instancePath+"/devices/dimmers",schemaPath:"#/properties/devices/properties/dimmers/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}let data13=data4.windowCoverings;if(Array.isArray(data13)){const len2=data13.length;for(let i2=0;i2<len2;i2++){let data14=data13[i2];if(data14&&"object"==typeof data14&&!Array.isArray(data14)){if(void 0!==data14.id){let data15=data14.id;if("string"!=typeof data15){const err27={instancePath:instancePath+"/devices/windowCoverings/"+i2+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}const _errs47=errors,_errs48=errors;if("global"!==data15&&"system"!==data15){const err28={};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(_errs48===errors){const err29={instancePath:instancePath+"/devices/windowCoverings/"+i2+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}else errors=_errs47,null!==vErrors&&(_errs47?vErrors.length=_errs47:vErrors=null)}if(void 0!==data14.position){let data16=data14.position;if("number"!=typeof data16&&null!==data16){const err30={instancePath:instancePath+"/devices/windowCoverings/"+i2+"/position",schemaPath:"windowCovering.json#/properties/position/type",keyword:"type",params:{type:schema219.type},message:"must be number,null"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if("number"==typeof data16){if(data16>100||isNaN(data16)){const err31={instancePath:instancePath+"/devices/windowCoverings/"+i2+"/position",schemaPath:"windowCovering.json#/properties/position/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(data16<0||isNaN(data16)){const err32={instancePath:instancePath+"/devices/windowCoverings/"+i2+"/position",schemaPath:"windowCovering.json#/properties/position/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}}}else{const err33={instancePath:instancePath+"/devices/windowCoverings/"+i2,schemaPath:"#/properties/devices/properties/windowCoverings/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}}else{const err34={instancePath:instancePath+"/devices/windowCoverings",schemaPath:"#/properties/devices/properties/windowCoverings/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}let data17=data4.thermostats;if(Array.isArray(data17)){const len3=data17.length;for(let i3=0;i3<len3;i3++){let data18=data17[i3];if(data18&&"object"==typeof data18&&!Array.isArray(data18)){if(void 0!==data18.id){let data19=data18.id;if("string"!=typeof data19){const err35={instancePath:instancePath+"/devices/thermostats/"+i3+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}const _errs59=errors,_errs60=errors;if("global"!==data19&&"system"!==data19){const err36={};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if(_errs60===errors){const err37={instancePath:instancePath+"/devices/thermostats/"+i3+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}else errors=_errs59,null!==vErrors&&(_errs59?vErrors.length=_errs59:vErrors=null)}if(void 0!==data18.hvacMode&&(validate91(data18.hvacMode,{instancePath:instancePath+"/devices/thermostats/"+i3+"/hvacMode",parentData:data18,parentDataProperty:"hvacMode",rootData:rootData})||(vErrors=null===vErrors?validate91.errors:vErrors.concat(validate91.errors),errors=vErrors.length)),void 0!==data18.setpoints&&(validate93(data18.setpoints,{instancePath:instancePath+"/devices/thermostats/"+i3+"/setpoints",parentData:data18,parentDataProperty:"setpoints",rootData:rootData})||(vErrors=null===vErrors?validate93.errors:vErrors.concat(validate93.errors),errors=vErrors.length)),void 0!==data18.fanMode&&(validate98(data18.fanMode,{instancePath:instancePath+"/devices/thermostats/"+i3+"/fanMode",parentData:data18,parentDataProperty:"fanMode",rootData:rootData})||(vErrors=null===vErrors?validate98.errors:vErrors.concat(validate98.errors),errors=vErrors.length)),void 0!==data18.setpointDelta&&"number"!=typeof data18.setpointDelta){const err38={instancePath:instancePath+"/devices/thermostats/"+i3+"/setpointDelta",schemaPath:"#/properties/devices/properties/thermostats/items/properties/setpointDelta/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}else{const err39={instancePath:instancePath+"/devices/thermostats/"+i3,schemaPath:"#/properties/devices/properties/thermostats/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}}else{const err40={instancePath:instancePath+"/devices/thermostats",schemaPath:"#/properties/devices/properties/thermostats/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if(void 0!==data4.mediaSources){let data24=data4.mediaSources;if(Array.isArray(data24)){const len4=data24.length;for(let i4=0;i4<len4;i4++){let data25=data24[i4];if(data25&&"object"==typeof data25&&!Array.isArray(data25)){if(void 0!==data25.id){let data26=data25.id;if("string"!=typeof data26){const err41={instancePath:instancePath+"/devices/mediaSources/"+i4+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}const _errs73=errors,_errs74=errors;if("global"!==data26&&"system"!==data26){const err42={};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(_errs74===errors){const err43={instancePath:instancePath+"/devices/mediaSources/"+i4+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}else errors=_errs73,null!==vErrors&&(_errs73?vErrors.length=_errs73:vErrors=null)}if(void 0!==data25.volume){let data27=data25.volume;if("number"==typeof data27){if(data27>100||isNaN(data27)){const err44={instancePath:instancePath+"/devices/mediaSources/"+i4+"/volume",schemaPath:"#/properties/devices/properties/mediaSources/items/properties/volume/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}if(data27<0||isNaN(data27)){const err45={instancePath:instancePath+"/devices/mediaSources/"+i4+"/volume",schemaPath:"#/properties/devices/properties/mediaSources/items/properties/volume/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}else{const err46={instancePath:instancePath+"/devices/mediaSources/"+i4+"/volume",schemaPath:"#/properties/devices/properties/mediaSources/items/properties/volume/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}if(void 0!==data25.commands){let data28=data25.commands;if(Array.isArray(data28)){const len5=data28.length;for(let i5=0;i5<len5;i5++)if("string"!=typeof data28[i5]){const err47={instancePath:instancePath+"/devices/mediaSources/"+i4+"/commands/"+i5,schemaPath:"#/properties/devices/properties/mediaSources/items/properties/commands/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}}else{const err48={instancePath:instancePath+"/devices/mediaSources/"+i4+"/commands",schemaPath:"#/properties/devices/properties/mediaSources/items/properties/commands/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}}}else{const err49={instancePath:instancePath+"/devices/mediaSources/"+i4,schemaPath:"#/properties/devices/properties/mediaSources/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}}}else{const err50={instancePath:instancePath+"/devices/mediaSources",schemaPath:"#/properties/devices/properties/mediaSources/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}}if(void 0!==data4.locks){let data30=data4.locks;if(Array.isArray(data30)){const len6=data30.length;for(let i6=0;i6<len6;i6++){let data31=data30[i6];if(data31&&"object"==typeof data31&&!Array.isArray(data31)){if(void 0!==data31.id){let data32=data31.id;if("string"!=typeof data32){const err51={instancePath:instancePath+"/devices/locks/"+i6+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}const _errs88=errors,_errs89=errors;if("global"!==data32&&"system"!==data32){const err52={};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}if(_errs89===errors){const err53={instancePath:instancePath+"/devices/locks/"+i6+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}else errors=_errs88,null!==vErrors&&(_errs88?vErrors.length=_errs88:vErrors=null)}if(void 0!==data31.state){let data33=data31.state;if("string"!=typeof data33&&null!==data33){const err54={instancePath:instancePath+"/devices/locks/"+i6+"/state",schemaPath:"lock.json#/properties/state/type",keyword:"type",params:{type:schema228.type},message:"must be string,null"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}if("locked"!==data33&&"unlocked"!==data33&&null!==data33){const err55={instancePath:instancePath+"/devices/locks/"+i6+"/state",schemaPath:"lock.json#/properties/state/enum",keyword:"enum",params:{allowedValues:schema228.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}}if(void 0!==data31.mode){let data34=data31.mode;if("string"!=typeof data34&&null!==data34){const err56={instancePath:instancePath+"/devices/locks/"+i6+"/mode",schemaPath:"lock.json#/properties/mode/type",keyword:"type",params:{type:schema229.type},message:"must be string,null"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}if("normal"!==data34&&"autoLock"!==data34&&"emergencyOpen"!==data34&&"emergencyClose"!==data34&&"holdOpen"!==data34&&"lockdown"!==data34&&null!==data34){const err57={instancePath:instancePath+"/devices/locks/"+i6+"/mode",schemaPath:"lock.json#/properties/mode/enum",keyword:"enum",params:{allowedValues:schema229.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}}}else{const err58={instancePath:instancePath+"/devices/locks/"+i6,schemaPath:"#/properties/devices/properties/locks/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}}}else{const err59={instancePath:instancePath+"/devices/locks",schemaPath:"#/properties/devices/properties/locks/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}}}else{const err60={instancePath:instancePath+"/devices",schemaPath:"#/properties/devices/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err60]:vErrors.push(err60),errors++}}if("boolean"!=typeof data.isDefault){const err61={instancePath:instancePath+"/isDefault",schemaPath:"#/properties/isDefault/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err61]:vErrors.push(err61),errors++}if("boolean"!=typeof data.showOnUi){const err62={instancePath:instancePath+"/showOnUi",schemaPath:"#/properties/showOnUi/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err62]:vErrors.push(err62),errors++}}else{const err63={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err63]:vErrors.push(err63),errors++}return validate90.errors=vErrors,0===errors}__name(validate91,"validate91"),__name(validate93,"validate93"),__name(validate98,"validate98"),__name(validate90,"validate90");var validateShortLink=validate100,schema230={$schema:"http://json-schema.org/draft-07/schema",$id:"shortLink.json",title:"Short Link",type:"object",required:["destination","url"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"shortLink",enum:["shortLink"]},title:{type:"string"},destination:{type:"string",format:"uri"},url:{type:"string",format:"uri"},systemId:{$ref:"definitions.json#/definitions/systemId"}}};function validate100(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="shortLink"),void 0===data.destination){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"destination"},message:"must have required property 'destination'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.url){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs5===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if("shortLink"!==data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema230.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.title&&"string"!=typeof data.title){const err7={instancePath:instancePath+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.destination){let data3=data.destination;if("string"==typeof data3){if(!formats0(data3)){const err8={instancePath:instancePath+"/destination",schemaPath:"#/properties/destination/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}else{const err9={instancePath:instancePath+"/destination",schemaPath:"#/properties/destination/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.url){let data4=data.url;if("string"==typeof data4){if(!formats0(data4)){const err10={instancePath:instancePath+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}else{const err11={instancePath:instancePath+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err12={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}else{const err13={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}return validate100.errors=vErrors,0===errors}__name(validate100,"validate100");var validateSmsMessage=validate101,schema233={$schema:"http://json-schema.org/draft-07/schema",$id:"smsMessage.json",title:"Sms Message",type:"object",required:["to","from","status"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"smsMessage",enum:["smsMessage","whatsappMessage"]},to:{type:"string"},from:{type:"string"},media:{type:"string",format:"uri"},status:{type:"string",enum:["queued","accepted","sending","sent","failed","delivered","undelivered","receiving","received","read"]},body:{type:"string"},driver:{type:"string"},appData:{type:"object"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},systemId:{$ref:"definitions.json#/definitions/systemId"}}};function validate101(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="smsMessage"),void 0===data.to){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"to"},message:"must have required property 'to'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.from){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"from"},message:"must have required property 'from'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.status){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs5===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if("smsMessage"!==data1&&"whatsappMessage"!==data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema233.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.to&&"string"!=typeof data.to){const err8={instancePath:instancePath+"/to",schemaPath:"#/properties/to/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.from&&"string"!=typeof data.from){const err9={instancePath:instancePath+"/from",schemaPath:"#/properties/from/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.media){let data4=data.media;if("string"==typeof data4){if(!formats0(data4)){const err10={instancePath:instancePath+"/media",schemaPath:"#/properties/media/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}else{const err11={instancePath:instancePath+"/media",schemaPath:"#/properties/media/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.status){let data5=data.status;if("string"!=typeof data5){const err12={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if("queued"!==data5&&"accepted"!==data5&&"sending"!==data5&&"sent"!==data5&&"failed"!==data5&&"delivered"!==data5&&"undelivered"!==data5&&"receiving"!==data5&&"received"!==data5&&"read"!==data5){const err13={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema233.properties.status.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.body&&"string"!=typeof data.body){const err14={instancePath:instancePath+"/body",schemaPath:"#/properties/body/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data.driver&&"string"!=typeof data.driver){const err15={instancePath:instancePath+"/driver",schemaPath:"#/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data.appData){let data8=data.appData;if(!data8||"object"!=typeof data8||Array.isArray(data8)){const err16={instancePath:instancePath+"/appData",schemaPath:"#/properties/appData/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.createdAt){let data9=data.createdAt;if("string"!=typeof data9&&(!data9||"object"!=typeof data9||Array.isArray(data9))){const err17={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if("string"==typeof data9&&!formats4.validate(data9)){const err18={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data.updatedAt){let data10=data.updatedAt;if("string"!=typeof data10&&(!data10||"object"!=typeof data10||Array.isArray(data10))){const err19={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if("string"==typeof data10&&!formats4.validate(data10)){const err20={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err21={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}else{const err22={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}return validate101.errors=vErrors,0===errors}__name(validate101,"validate101");var validateSpace=validate102,schema238={$schema:"http://json-schema.org/draft-07/schema",$id:"space.json",title:"Space",type:"object",required:["id","name","type","discriminator"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string",minLength:1},type:{type:"string",default:"space",enum:["space"]},discriminator:{type:"string",enum:["classRoom","hotelRoom","office","building","commonArea","conferenceRoom","lobby","gym","pool","restaurant","unit"]},driver:{$ref:"definitions.json#/definitions/driver"},category:{type:"string",description:"This is the category id"},rooms:{type:"array",items:{type:"string"}},subGroups:{type:"array",items:{type:"string"}},occupied:{type:"boolean"},inUse:{type:"boolean"},eco:{type:"object",additionalProperties:!1,default:{active:!1,allowed:!1,previousState:null},properties:{active:{type:"boolean",default:!1},activatedAt:{type:["string","object"],format:"date-time"},allowed:{type:"boolean",default:!1},previousState:{type:["object","null"],properties:{thermostats:{type:"object",patternProperties:{".*":{type:"object",properties:{setpoints:{$ref:"thermostat.json#/properties/setpoints"}}}}}},additionalProperties:!1}}},features:{type:"array",items:{type:"string",enum:["pet"]}},maximumOccupancy:{type:"number",minimum:1},housekeepingStatus:{type:"string",enum:["clean","dirty","inspected","pickup"]},serviceStatus:{type:"string",enum:["inService","outOfOrder","outOfService"]},systemId:{$ref:"definitions.json#/definitions/systemId"}}},pattern8=new RegExp(".*","u");function validate103(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){for(const key0 in data)if("cool"!==key0&&"heat"!==key0&&"auto"!==key0){const err0={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}void 0!==data.cool&&(validate75(data.cool,{instancePath:instancePath+"/cool",parentData:data,parentDataProperty:"cool",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length)),void 0!==data.heat&&(validate75(data.heat,{instancePath:instancePath+"/heat",parentData:data,parentDataProperty:"heat",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length)),void 0!==data.auto&&(validate75(data.auto,{instancePath:instancePath+"/auto",parentData:data,parentDataProperty:"auto",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length))}else{const err1={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}return validate103.errors=vErrors,0===errors}function validate102(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="space"),void 0===data.eco&&(data.eco={active:!1,allowed:!1,previousState:null}),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.name){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.type){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.discriminator){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}for(const key0 in data)if(!func2.call(schema238.properties,key0)){const err4={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err6={};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(_errs6===errors){const err7={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}if(void 0!==data.name){let data1=data.name;if("string"==typeof data1){if(func4(data1)<1){const err8={instancePath:instancePath+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}else{const err9={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}let data2=data.type;if("string"!=typeof data2){const err10={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("space"!==data2){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema238.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.discriminator){let data3=data.discriminator;if("string"!=typeof data3){const err12={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if("classRoom"!==data3&&"hotelRoom"!==data3&&"office"!==data3&&"building"!==data3&&"commonArea"!==data3&&"conferenceRoom"!==data3&&"lobby"!==data3&&"gym"!==data3&&"pool"!==data3&&"restaurant"!==data3&&"unit"!==data3){const err13={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema238.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.driver){let data4=data.driver;if("string"!=typeof data4){const err14={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("adlink"!==data4&&"aws-kinesis"!==data4&&"butler"!==data4&&"crestron"!==data4&&"dell"!==data4&&"dmp"!==data4&&"doorbird"!==data4&&"dormakaba"!==data4&&"dsc"!==data4&&"ecobee"!==data4&&"epson"!==data4&&"geovision-rs"!==data4&&"geovision-as-manager"!==data4&&"honeywell-vista"!==data4&&"igor"!==data4&&"inncom"!==data4&&"isapi"!==data4&&"kohost-k7"!==data4&&"kohost"!==data4&&"lg"!==data4&&"lg-webos"!==data4&&"lapi"!==data4&&"lirc"!==data4&&"mews"!==data4&&"mht"!==data4&&"paxton"!==data4&&"pelican-wireless"!==data4&&"power-shades"!==data4&&"rachio"!==data4&&"rebrandly"!==data4&&"relay"!==data4&&"rtsp"!==data4&&"salto"!==data4&&"salto-irn"!==data4&&"samsung"!==data4&&"se"!==data4&&"sendgrid"!==data4&&"sonifi"!==data4&&"stay-n-touch"!==data4&&"storable"!==data4&&"twilio"!==data4&&"unifi"!==data4&&"valcom"!==data4&&"vivotek"!==data4&&"vizio"!==data4&&"wisenet"!==data4&&"cloudflare-images"!==data4&&"cloudflare-stream"!==data4&&"insperia-privacy"!==data4){const err15={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.category&&"string"!=typeof data.category){const err16={instancePath:instancePath+"/category",schemaPath:"#/properties/category/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.rooms){let data6=data.rooms;if(Array.isArray(data6)){const len0=data6.length;for(let i0=0;i0<len0;i0++)if("string"!=typeof data6[i0]){const err17={instancePath:instancePath+"/rooms/"+i0,schemaPath:"#/properties/rooms/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}else{const err18={instancePath:instancePath+"/rooms",schemaPath:"#/properties/rooms/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data.subGroups){let data8=data.subGroups;if(Array.isArray(data8)){const len1=data8.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data8[i1]){const err19={instancePath:instancePath+"/subGroups/"+i1,schemaPath:"#/properties/subGroups/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}else{const err20={instancePath:instancePath+"/subGroups",schemaPath:"#/properties/subGroups/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}if(void 0!==data.occupied&&"boolean"!=typeof data.occupied){const err21={instancePath:instancePath+"/occupied",schemaPath:"#/properties/occupied/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0!==data.inUse&&"boolean"!=typeof data.inUse){const err22={instancePath:instancePath+"/inUse",schemaPath:"#/properties/inUse/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}let data12=data.eco;if(data12&&"object"==typeof data12&&!Array.isArray(data12)){void 0===data12.active&&(data12.active=!1),void 0===data12.allowed&&(data12.allowed=!1);for(const key1 in data12)if("active"!==key1&&"activatedAt"!==key1&&"allowed"!==key1&&"previousState"!==key1){const err23={instancePath:instancePath+"/eco",schemaPath:"#/properties/eco/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if("boolean"!=typeof data12.active){const err24={instancePath:instancePath+"/eco/active",schemaPath:"#/properties/eco/properties/active/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data12.activatedAt){let data14=data12.activatedAt;if("string"!=typeof data14&&(!data14||"object"!=typeof data14||Array.isArray(data14))){const err25={instancePath:instancePath+"/eco/activatedAt",schemaPath:"#/properties/eco/properties/activatedAt/type",keyword:"type",params:{type:schema238.properties.eco.properties.activatedAt.type},message:"must be string,object"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if("string"==typeof data14&&!formats4.validate(data14)){const err26={instancePath:instancePath+"/eco/activatedAt",schemaPath:"#/properties/eco/properties/activatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}if("boolean"!=typeof data12.allowed){const err27={instancePath:instancePath+"/eco/allowed",schemaPath:"#/properties/eco/properties/allowed/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data12.previousState){let data16=data12.previousState;if((!data16||"object"!=typeof data16||Array.isArray(data16))&&null!==data16){const err28={instancePath:instancePath+"/eco/previousState",schemaPath:"#/properties/eco/properties/previousState/type",keyword:"type",params:{type:schema238.properties.eco.properties.previousState.type},message:"must be object,null"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(data16&&"object"==typeof data16&&!Array.isArray(data16)){for(const key2 in data16)if("thermostats"!==key2){const err29={instancePath:instancePath+"/eco/previousState",schemaPath:"#/properties/eco/properties/previousState/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key2},message:"must NOT have additional properties"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data16.thermostats){let data17=data16.thermostats;if(data17&&"object"==typeof data17&&!Array.isArray(data17)){for(const key3 in data17)if(pattern8.test(key3)){let data18=data17[key3];if(data18&&"object"==typeof data18&&!Array.isArray(data18))void 0!==data18.setpoints&&(validate103(data18.setpoints,{instancePath:instancePath+"/eco/previousState/thermostats/"+key3.replace(/~/g,"~0").replace(/\//g,"~1")+"/setpoints",parentData:data18,parentDataProperty:"setpoints",rootData:rootData})||(vErrors=null===vErrors?validate103.errors:vErrors.concat(validate103.errors),errors=vErrors.length));else{const err30={instancePath:instancePath+"/eco/previousState/thermostats/"+key3.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/eco/properties/previousState/properties/thermostats/patternProperties/.*/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}}else{const err31={instancePath:instancePath+"/eco/previousState/thermostats",schemaPath:"#/properties/eco/properties/previousState/properties/thermostats/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}}}}else{const err32={instancePath:instancePath+"/eco",schemaPath:"#/properties/eco/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if(void 0!==data.features){let data20=data.features;if(Array.isArray(data20)){const len2=data20.length;for(let i2=0;i2<len2;i2++){let data21=data20[i2];if("string"!=typeof data21){const err33={instancePath:instancePath+"/features/"+i2,schemaPath:"#/properties/features/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if("pet"!==data21){const err34={instancePath:instancePath+"/features/"+i2,schemaPath:"#/properties/features/items/enum",keyword:"enum",params:{allowedValues:schema238.properties.features.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}}}else{const err35={instancePath:instancePath+"/features",schemaPath:"#/properties/features/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}}if(void 0!==data.maximumOccupancy){let data22=data.maximumOccupancy;if("number"==typeof data22){if(data22<1||isNaN(data22)){const err36={instancePath:instancePath+"/maximumOccupancy",schemaPath:"#/properties/maximumOccupancy/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}else{const err37={instancePath:instancePath+"/maximumOccupancy",schemaPath:"#/properties/maximumOccupancy/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}if(void 0!==data.housekeepingStatus){let data23=data.housekeepingStatus;if("string"!=typeof data23){const err38={instancePath:instancePath+"/housekeepingStatus",schemaPath:"#/properties/housekeepingStatus/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}if("clean"!==data23&&"dirty"!==data23&&"inspected"!==data23&&"pickup"!==data23){const err39={instancePath:instancePath+"/housekeepingStatus",schemaPath:"#/properties/housekeepingStatus/enum",keyword:"enum",params:{allowedValues:schema238.properties.housekeepingStatus.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}if(void 0!==data.serviceStatus){let data24=data.serviceStatus;if("string"!=typeof data24){const err40={instancePath:instancePath+"/serviceStatus",schemaPath:"#/properties/serviceStatus/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if("inService"!==data24&&"outOfOrder"!==data24&&"outOfService"!==data24){const err41={instancePath:instancePath+"/serviceStatus",schemaPath:"#/properties/serviceStatus/enum",keyword:"enum",params:{allowedValues:schema238.properties.serviceStatus.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err42={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}}else{const err43={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}return validate102.errors=vErrors,0===errors}__name(validate103,"validate103"),__name(validate102,"validate102");var validateSwitch=validate68,validateSystemUser=validate108,schema243={$schema:"http://json-schema.org/draft-07/schema",$id:"systemUser.json",title:"System User",description:"A system user is a user that originated from an external 3rd party system.",type:"object",required:["id","firstName","lastName"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"systemUser",enum:["systemUser"]},driver:{$ref:"definitions.json#/definitions/driver"},firstName:{type:"string"},lastName:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},email:{type:["string","null"],format:"email"},address:{$ref:"definitions.json#/definitions/address"},photo:{type:"string"},jobTitle:{type:"string"},dob:{type:"string"},gender:{type:"string",enum:["male","female"]},roles:{type:"array",items:{type:"string",enum:["Guest","User","Manager","Maintenance","Administrator","SuperAdmin"]}},nationality:{type:"string",minLength:2,maxLength:2},notes:{type:"array",items:{type:"string"}},files:{type:"array",items:{$ref:"mediaFile.json#"}},identifications:{type:"array",items:{$ref:"identification.json#"}},payments:{type:"array",items:{$ref:"payment.json#"}},revenue:{$ref:"definitions.json#/definitions/revenue"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"},systemId:{$ref:"definitions.json#/definitions/systemId"}}},pattern9=new RegExp("^\\+[0-9]{1,14}$","u"),formats88=/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i;function validate112(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(Array.isArray(data)){const len0=data.length;for(let i0=0;i0<len0;i0++){let data0=data[i0];if(data0&&"object"==typeof data0&&!Array.isArray(data0)){if(void 0!==data0.id){let data1=data0.id;if("string"!=typeof data1){const err0={instancePath:instancePath+"/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}const _errs6=errors,_errs7=errors;if("global"!==data1&&"system"!==data1){const err1={};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(_errs7===errors){const err2={instancePath:instancePath+"/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}else errors=_errs6,null!==vErrors&&(_errs6?vErrors.length=_errs6:vErrors=null)}if(void 0!==data0.name&&"string"!=typeof data0.name){const err3={instancePath:instancePath+"/"+i0+"/name",schemaPath:"#/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data0.date){let data3=data0.date;if("string"==typeof data3){if(!formats4.validate(data3)){const err4={instancePath:instancePath+"/"+i0+"/date",schemaPath:"#/items/properties/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}else{const err5={instancePath:instancePath+"/"+i0+"/date",schemaPath:"#/items/properties/date/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}if(void 0!==data0.price&&"number"!=typeof data0.price){const err6={instancePath:instancePath+"/"+i0+"/price",schemaPath:"#/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data0.tax){let data5=data0.tax;if("number"!=typeof data5&&null!==data5){const err7={instancePath:instancePath+"/"+i0+"/tax",schemaPath:"#/items/properties/tax/type",keyword:"type",params:{type:schema167.items.properties.tax.type},message:"must be number,null"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}}}else{const err8={instancePath:instancePath+"/"+i0,schemaPath:"#/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}}else{const err9={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}return validate112.errors=vErrors,0===errors}function validate108(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="systemUser"),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.firstName){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"firstName"},message:"must have required property 'firstName'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.lastName){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"lastName"},message:"must have required property 'lastName'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs5===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if("systemUser"!==data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema243.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.driver){let data2=data.driver;if("string"!=typeof data2){const err8={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("adlink"!==data2&&"aws-kinesis"!==data2&&"butler"!==data2&&"crestron"!==data2&&"dell"!==data2&&"dmp"!==data2&&"doorbird"!==data2&&"dormakaba"!==data2&&"dsc"!==data2&&"ecobee"!==data2&&"epson"!==data2&&"geovision-rs"!==data2&&"geovision-as-manager"!==data2&&"honeywell-vista"!==data2&&"igor"!==data2&&"inncom"!==data2&&"isapi"!==data2&&"kohost-k7"!==data2&&"kohost"!==data2&&"lg"!==data2&&"lg-webos"!==data2&&"lapi"!==data2&&"lirc"!==data2&&"mews"!==data2&&"mht"!==data2&&"paxton"!==data2&&"pelican-wireless"!==data2&&"power-shades"!==data2&&"rachio"!==data2&&"rebrandly"!==data2&&"relay"!==data2&&"rtsp"!==data2&&"salto"!==data2&&"salto-irn"!==data2&&"samsung"!==data2&&"se"!==data2&&"sendgrid"!==data2&&"sonifi"!==data2&&"stay-n-touch"!==data2&&"storable"!==data2&&"twilio"!==data2&&"unifi"!==data2&&"valcom"!==data2&&"vivotek"!==data2&&"vizio"!==data2&&"wisenet"!==data2&&"cloudflare-images"!==data2&&"cloudflare-stream"!==data2&&"insperia-privacy"!==data2){const err9={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.firstName&&"string"!=typeof data.firstName){const err10={instancePath:instancePath+"/firstName",schemaPath:"#/properties/firstName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.lastName&&"string"!=typeof data.lastName){const err11={instancePath:instancePath+"/lastName",schemaPath:"#/properties/lastName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.phone){let data5=data.phone;if("string"!=typeof data5&&null!==data5){const err12={instancePath:instancePath+"/phone",schemaPath:"#/properties/phone/type",keyword:"type",params:{type:schema243.properties.phone.type},message:"must be string,null"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if("string"==typeof data5&&!pattern9.test(data5)){const err13={instancePath:instancePath+"/phone",schemaPath:"#/properties/phone/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.email){let data6=data.email;if("string"!=typeof data6&&null!==data6){const err14={instancePath:instancePath+"/email",schemaPath:"#/properties/email/type",keyword:"type",params:{type:schema243.properties.email.type},message:"must be string,null"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("string"==typeof data6&&!formats88.test(data6)){const err15={instancePath:instancePath+"/email",schemaPath:"#/properties/email/format",keyword:"format",params:{format:"email"},message:'must match format "email"'};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.address){let data7=data.address;if(data7&&"object"==typeof data7&&!Array.isArray(data7)){if(void 0!==data7.id&&"string"!=typeof data7.id){const err16={instancePath:instancePath+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data7.line1&&"string"!=typeof data7.line1){const err17={instancePath:instancePath+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data7.line2&&"string"!=typeof data7.line2){const err18={instancePath:instancePath+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data7.line3&&"string"!=typeof data7.line3){const err19={instancePath:instancePath+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data7.city&&"string"!=typeof data7.city){const err20={instancePath:instancePath+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data7.state&&"string"!=typeof data7.state){const err21={instancePath:instancePath+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0!==data7.postalCode&&"string"!=typeof data7.postalCode){const err22={instancePath:instancePath+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data7.countryCode){let data15=data7.countryCode;if("string"==typeof data15){if(func4(data15)>2){const err23={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(func4(data15)<2){const err24={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}else{const err25={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}}else{const err26={instancePath:instancePath+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}if(void 0!==data.photo&&"string"!=typeof data.photo){const err27={instancePath:instancePath+"/photo",schemaPath:"#/properties/photo/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data.jobTitle&&"string"!=typeof data.jobTitle){const err28={instancePath:instancePath+"/jobTitle",schemaPath:"#/properties/jobTitle/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data.dob&&"string"!=typeof data.dob){const err29={instancePath:instancePath+"/dob",schemaPath:"#/properties/dob/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data.gender){let data19=data.gender;if("string"!=typeof data19){const err30={instancePath:instancePath+"/gender",schemaPath:"#/properties/gender/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if("male"!==data19&&"female"!==data19){const err31={instancePath:instancePath+"/gender",schemaPath:"#/properties/gender/enum",keyword:"enum",params:{allowedValues:schema243.properties.gender.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}if(void 0!==data.roles){let data20=data.roles;if(Array.isArray(data20)){const len0=data20.length;for(let i0=0;i0<len0;i0++){let data21=data20[i0];if("string"!=typeof data21){const err32={instancePath:instancePath+"/roles/"+i0,schemaPath:"#/properties/roles/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if("Guest"!==data21&&"User"!==data21&&"Manager"!==data21&&"Maintenance"!==data21&&"Administrator"!==data21&&"SuperAdmin"!==data21){const err33={instancePath:instancePath+"/roles/"+i0,schemaPath:"#/properties/roles/items/enum",keyword:"enum",params:{allowedValues:schema243.properties.roles.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}}else{const err34={instancePath:instancePath+"/roles",schemaPath:"#/properties/roles/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}}if(void 0!==data.nationality){let data22=data.nationality;if("string"==typeof data22){if(func4(data22)>2){const err35={instancePath:instancePath+"/nationality",schemaPath:"#/properties/nationality/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(func4(data22)<2){const err36={instancePath:instancePath+"/nationality",schemaPath:"#/properties/nationality/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}else{const err37={instancePath:instancePath+"/nationality",schemaPath:"#/properties/nationality/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}if(void 0!==data.notes){let data23=data.notes;if(Array.isArray(data23)){const len1=data23.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data23[i1]){const err38={instancePath:instancePath+"/notes/"+i1,schemaPath:"#/properties/notes/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}else{const err39={instancePath:instancePath+"/notes",schemaPath:"#/properties/notes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}if(void 0!==data.files){let data25=data.files;if(Array.isArray(data25)){const len2=data25.length;for(let i2=0;i2<len2;i2++)validate15(data25[i2],{instancePath:instancePath+"/files/"+i2,parentData:data25,parentDataProperty:i2,rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length)}else{const err40={instancePath:instancePath+"/files",schemaPath:"#/properties/files/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}}if(void 0!==data.identifications){let data27=data.identifications;if(Array.isArray(data27)){const len3=data27.length;for(let i3=0;i3<len3;i3++)validate37(data27[i3],{instancePath:instancePath+"/identifications/"+i3,parentData:data27,parentDataProperty:i3,rootData:rootData})||(vErrors=null===vErrors?validate37.errors:vErrors.concat(validate37.errors),errors=vErrors.length)}else{const err41={instancePath:instancePath+"/identifications",schemaPath:"#/properties/identifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}if(void 0!==data.payments){let data29=data.payments;if(Array.isArray(data29)){const len4=data29.length;for(let i4=0;i4<len4;i4++)validate57(data29[i4],{instancePath:instancePath+"/payments/"+i4,parentData:data29,parentDataProperty:i4,rootData:rootData})||(vErrors=null===vErrors?validate57.errors:vErrors.concat(validate57.errors),errors=vErrors.length)}else{const err42={instancePath:instancePath+"/payments",schemaPath:"#/properties/payments/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}}if(void 0!==data.revenue&&(validate112(data.revenue,{instancePath:instancePath+"/revenue",parentData:data,parentDataProperty:"revenue",rootData:rootData})||(vErrors=null===vErrors?validate112.errors:vErrors.concat(validate112.errors),errors=vErrors.length)),void 0!==data.createdAt){let data32=data.createdAt;if("string"!=typeof data32&&(!data32||"object"!=typeof data32||Array.isArray(data32))){const err43={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema101.type},message:"must be string,object"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}if("string"==typeof data32&&!formats4.validate(data32)){const err44={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}if(void 0!==data.updatedAt){let data33=data.updatedAt;if("string"!=typeof data33&&(!data33||"object"!=typeof data33||Array.isArray(data33))){const err45={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:schema151.type},message:"must be string,object"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}if("string"==typeof data33&&!formats4.validate(data33)){const err46={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err47={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}}else{const err48={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}return validate108.errors=vErrors,0===errors}__name(validate112,"validate112"),__name(validate108,"validate108");var validateThermostat=validate72,validateTicket=validate39,schema99={$schema:"http://json-schema.org/draft-07/schema",$id:"ticket.json",title:"Ticket",description:"A ticket is a request from a user.",type:"object",required:["id","conversation","requester","status","tags","createdAt","updatedAt"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["ticket"],default:"ticket"},number:{type:"string"},issueId:{type:"string"},conversation:{type:"array",default:[],items:{type:"object",additionalProperties:!1,required:["id","discriminator","timestamp","body"],properties:{id:{type:"string"},discriminator:{type:"string",enum:["message","opened","assigned","rated","tipped","scheduled","collaboratorAdded","collaboratorRemoved","statusChanged","priorityChanged","scheduleDateChanged","locationChanged"],default:"message"},userId:{type:"string"},userName:{type:"string"},vendorId:{type:"string"},vendorName:{type:"string"},systemId:{type:"string"},systemName:{type:"string"},timestamp:{$ref:"definitions.json#/definitions/createdAt"},body:{type:"string"},parsedBody:{type:"object",additionalProperties:!1,properties:{text:{type:"string"},mentions:{type:"array",default:[],items:{type:"object",additionalProperties:!1,required:["discriminator","id","index","length","originalText"],properties:{id:{type:"string"},discriminator:{type:"string",enum:["user","vendor","system"]},index:{type:"integer"},length:{type:"integer"},originalText:{type:"string"}}}}}},readBy:{type:"array",default:[],items:{type:"string"}},media:{anyOf:[{$ref:"mediaFile.json"},{type:"null"}]}}}},subject:{type:"string"},openedBy:{type:"object",properties:{userId:{type:"string"},userName:{type:"string"},systemId:{type:"string"},systemName:{type:"string"}}},requester:{type:"object",properties:{systemId:{type:"string"},systemName:{type:"string"},systemPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},userId:{type:"string"},userName:{type:"string"},userPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},deviceId:{type:"string"},roomId:{type:"string"},reservationId:{type:"string"},spaceId:{type:"string"},spaceName:{type:"string"}}},assignedTo:{type:"object",properties:{userId:{type:"string"},userName:{type:"string"},userPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},vendorId:{type:"string"},vendorName:{type:"string"},vendorPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]}}},notify:{type:"array",description:"A list of entities to notify when this ticket is created or resolved.",default:[],items:{type:"object",required:["id","discriminator"],additionalProperties:!1,properties:{id:{type:"string",description:"The ID of the entity to notify."},discriminator:{type:"string",enum:["user"]}}}},collaborators:{type:"array",default:[],items:{type:"object",required:["id","name","discriminator"],additionalProperties:!1,properties:{id:{type:"string"},name:{type:"string"},discriminator:{type:"string",enum:["user","vendor"]}}}},location:{type:"object",required:["discriminator","name"],additionalProperties:!1,properties:{id:{type:"string"},discriminator:{type:"string",enum:["space","room","property","customText"]},name:{type:"string"}}},status:{type:"string",enum:["open","pending","solved","closed"],default:"open"},priority:{type:"string",enum:["low","normal","high"],default:"normal"},tags:{type:"array",default:[],items:{type:"string"}},department:{type:"string"},rating:{type:"number",minimum:0,maximum:5},ratingComment:{type:"string"},tipAmount:{type:"string"},autoCloseAt:{$ref:"definitions.json#/definitions/date"},scheduleDate:{$ref:"definitions.json#/definitions/date"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},solvedAt:{$ref:"definitions.json#/definitions/date"},closedAt:{$ref:"definitions.json#/definitions/date"}}};function validate39(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="ticket"),void 0===data.conversation&&(data.conversation=[]),void 0===data.notify&&(data.notify=[]),void 0===data.collaborators&&(data.collaborators=[]),void 0===data.status&&(data.status="open"),void 0===data.priority&&(data.priority="normal"),void 0===data.tags&&(data.tags=[]),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.conversation){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"conversation"},message:"must have required property 'conversation'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.requester){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"requester"},message:"must have required property 'requester'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.status){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.tags){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"tags"},message:"must have required property 'tags'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.createdAt){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"createdAt"},message:"must have required property 'createdAt'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0===data.updatedAt){const err6={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"updatedAt"},message:"must have required property 'updatedAt'"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}for(const key0 in data)if(!func2.call(schema99.properties,key0)){const err7={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err8={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err9={};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(_errs6===errors){const err10={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("ticket"!==data1){const err12={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema99.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.number&&"string"!=typeof data.number){const err13={instancePath:instancePath+"/number",schemaPath:"#/properties/number/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.issueId&&"string"!=typeof data.issueId){const err14={instancePath:instancePath+"/issueId",schemaPath:"#/properties/issueId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}let data4=data.conversation;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++){let data5=data4[i0];if(data5&&"object"==typeof data5&&!Array.isArray(data5)){if(void 0===data5.discriminator&&(data5.discriminator="message"),void 0===data5.readBy&&(data5.readBy=[]),void 0===data5.id){const err15={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0===data5.discriminator){const err16={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0===data5.timestamp){const err17={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/required",keyword:"required",params:{missingProperty:"timestamp"},message:"must have required property 'timestamp'"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0===data5.body){const err18={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/required",keyword:"required",params:{missingProperty:"body"},message:"must have required property 'body'"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}for(const key1 in data5)if(!func2.call(schema99.properties.conversation.items.properties,key1)){const err19={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data5.id&&"string"!=typeof data5.id){const err20={instancePath:instancePath+"/conversation/"+i0+"/id",schemaPath:"#/properties/conversation/items/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}let data7=data5.discriminator;if("string"!=typeof data7){const err21={instancePath:instancePath+"/conversation/"+i0+"/discriminator",schemaPath:"#/properties/conversation/items/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if("message"!==data7&&"opened"!==data7&&"assigned"!==data7&&"rated"!==data7&&"tipped"!==data7&&"scheduled"!==data7&&"collaboratorAdded"!==data7&&"collaboratorRemoved"!==data7&&"statusChanged"!==data7&&"priorityChanged"!==data7&&"scheduleDateChanged"!==data7&&"locationChanged"!==data7){const err22={instancePath:instancePath+"/conversation/"+i0+"/discriminator",schemaPath:"#/properties/conversation/items/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema99.properties.conversation.items.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data5.userId&&"string"!=typeof data5.userId){const err23={instancePath:instancePath+"/conversation/"+i0+"/userId",schemaPath:"#/properties/conversation/items/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data5.userName&&"string"!=typeof data5.userName){const err24={instancePath:instancePath+"/conversation/"+i0+"/userName",schemaPath:"#/properties/conversation/items/properties/userName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data5.vendorId&&"string"!=typeof data5.vendorId){const err25={instancePath:instancePath+"/conversation/"+i0+"/vendorId",schemaPath:"#/properties/conversation/items/properties/vendorId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data5.vendorName&&"string"!=typeof data5.vendorName){const err26={instancePath:instancePath+"/conversation/"+i0+"/vendorName",schemaPath:"#/properties/conversation/items/properties/vendorName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data5.systemId&&"string"!=typeof data5.systemId){const err27={instancePath:instancePath+"/conversation/"+i0+"/systemId",schemaPath:"#/properties/conversation/items/properties/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data5.systemName&&"string"!=typeof data5.systemName){const err28={instancePath:instancePath+"/conversation/"+i0+"/systemName",schemaPath:"#/properties/conversation/items/properties/systemName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data5.timestamp){let data14=data5.timestamp;if("string"!=typeof data14&&(!data14||"object"!=typeof data14||Array.isArray(data14))){const err29={instancePath:instancePath+"/conversation/"+i0+"/timestamp",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema101.type},message:"must be string,object"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if("string"==typeof data14&&!formats4.validate(data14)){const err30={instancePath:instancePath+"/conversation/"+i0+"/timestamp",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}if(void 0!==data5.body&&"string"!=typeof data5.body){const err31={instancePath:instancePath+"/conversation/"+i0+"/body",schemaPath:"#/properties/conversation/items/properties/body/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(void 0!==data5.parsedBody){let data16=data5.parsedBody;if(data16&&"object"==typeof data16&&!Array.isArray(data16)){void 0===data16.mentions&&(data16.mentions=[]);for(const key2 in data16)if("text"!==key2&&"mentions"!==key2){const err32={instancePath:instancePath+"/conversation/"+i0+"/parsedBody",schemaPath:"#/properties/conversation/items/properties/parsedBody/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key2},message:"must NOT have additional properties"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if(void 0!==data16.text&&"string"!=typeof data16.text){const err33={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/text",schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}let data18=data16.mentions;if(Array.isArray(data18)){const len1=data18.length;for(let i1=0;i1<len1;i1++){let data19=data18[i1];if(data19&&"object"==typeof data19&&!Array.isArray(data19)){if(void 0===data19.discriminator){const err34={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions/"+i1,schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/items/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(void 0===data19.id){const err35={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions/"+i1,schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/items/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(void 0===data19.index){const err36={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions/"+i1,schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/items/required",keyword:"required",params:{missingProperty:"index"},message:"must have required property 'index'"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if(void 0===data19.length){const err37={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions/"+i1,schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/items/required",keyword:"required",params:{missingProperty:"length"},message:"must have required property 'length'"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}if(void 0===data19.originalText){const err38={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions/"+i1,schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/items/required",keyword:"required",params:{missingProperty:"originalText"},message:"must have required property 'originalText'"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}for(const key3 in data19)if("id"!==key3&&"discriminator"!==key3&&"index"!==key3&&"length"!==key3&&"originalText"!==key3){const err39={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions/"+i1,schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key3},message:"must NOT have additional properties"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}if(void 0!==data19.id&&"string"!=typeof data19.id){const err40={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions/"+i1+"/id",schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/items/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if(void 0!==data19.discriminator){let data21=data19.discriminator;if("string"!=typeof data21){const err41={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions/"+i1+"/discriminator",schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/items/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}if("user"!==data21&&"vendor"!==data21&&"system"!==data21){const err42={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions/"+i1+"/discriminator",schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/items/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema99.properties.conversation.items.properties.parsedBody.properties.mentions.items.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}}if(void 0!==data19.index){let data22=data19.index;if("number"!=typeof data22||data22%1||isNaN(data22)){const err43={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions/"+i1+"/index",schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/items/properties/index/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}}if(void 0!==data19.length){let data23=data19.length;if("number"!=typeof data23||data23%1||isNaN(data23)){const err44={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions/"+i1+"/length",schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/items/properties/length/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}if(void 0!==data19.originalText&&"string"!=typeof data19.originalText){const err45={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions/"+i1+"/originalText",schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/items/properties/originalText/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}else{const err46={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions/"+i1,schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}}else{const err47={instancePath:instancePath+"/conversation/"+i0+"/parsedBody/mentions",schemaPath:"#/properties/conversation/items/properties/parsedBody/properties/mentions/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}}else{const err48={instancePath:instancePath+"/conversation/"+i0+"/parsedBody",schemaPath:"#/properties/conversation/items/properties/parsedBody/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}}let data25=data5.readBy;if(Array.isArray(data25)){const len2=data25.length;for(let i2=0;i2<len2;i2++)if("string"!=typeof data25[i2]){const err49={instancePath:instancePath+"/conversation/"+i0+"/readBy/"+i2,schemaPath:"#/properties/conversation/items/properties/readBy/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}}else{const err50={instancePath:instancePath+"/conversation/"+i0+"/readBy",schemaPath:"#/properties/conversation/items/properties/readBy/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}if(void 0!==data5.media){let data27=data5.media;const _errs64=errors;let valid13=!1;const _errs65=errors;validate15(data27,{instancePath:instancePath+"/conversation/"+i0+"/media",parentData:data5,parentDataProperty:"media",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length);var _valid0=_errs65===errors;if(valid13=valid13||_valid0,!valid13){const _errs66=errors;if(null!==data27){const err51={instancePath:instancePath+"/conversation/"+i0+"/media",schemaPath:"#/properties/conversation/items/properties/media/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}_valid0=_errs66===errors;valid13=valid13||_valid0}if(valid13)errors=_errs64,null!==vErrors&&(_errs64?vErrors.length=_errs64:vErrors=null);else{const err52={instancePath:instancePath+"/conversation/"+i0+"/media",schemaPath:"#/properties/conversation/items/properties/media/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}}}else{const err53={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}}}else{const err54={instancePath:instancePath+"/conversation",schemaPath:"#/properties/conversation/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}if(void 0!==data.subject&&"string"!=typeof data.subject){const err55={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}if(void 0!==data.openedBy){let data29=data.openedBy;if(data29&&"object"==typeof data29&&!Array.isArray(data29)){if(void 0!==data29.userId&&"string"!=typeof data29.userId){const err56={instancePath:instancePath+"/openedBy/userId",schemaPath:"#/properties/openedBy/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}if(void 0!==data29.userName&&"string"!=typeof data29.userName){const err57={instancePath:instancePath+"/openedBy/userName",schemaPath:"#/properties/openedBy/properties/userName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}if(void 0!==data29.systemId&&"string"!=typeof data29.systemId){const err58={instancePath:instancePath+"/openedBy/systemId",schemaPath:"#/properties/openedBy/properties/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}if(void 0!==data29.systemName&&"string"!=typeof data29.systemName){const err59={instancePath:instancePath+"/openedBy/systemName",schemaPath:"#/properties/openedBy/properties/systemName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}}else{const err60={instancePath:instancePath+"/openedBy",schemaPath:"#/properties/openedBy/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err60]:vErrors.push(err60),errors++}}if(void 0!==data.requester){let data34=data.requester;if(data34&&"object"==typeof data34&&!Array.isArray(data34)){if(void 0!==data34.systemId&&"string"!=typeof data34.systemId){const err61={instancePath:instancePath+"/requester/systemId",schemaPath:"#/properties/requester/properties/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err61]:vErrors.push(err61),errors++}if(void 0!==data34.systemName&&"string"!=typeof data34.systemName){const err62={instancePath:instancePath+"/requester/systemName",schemaPath:"#/properties/requester/properties/systemName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err62]:vErrors.push(err62),errors++}if(void 0!==data34.systemPhoto){let data37=data34.systemPhoto;const _errs87=errors;let valid16=!1;const _errs88=errors;validate15(data37,{instancePath:instancePath+"/requester/systemPhoto",parentData:data34,parentDataProperty:"systemPhoto",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length);var _valid1=_errs88===errors;if(valid16=valid16||_valid1,!valid16){const _errs89=errors;if(null!==data37){const err63={instancePath:instancePath+"/requester/systemPhoto",schemaPath:"#/properties/requester/properties/systemPhoto/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===vErrors?vErrors=[err63]:vErrors.push(err63),errors++}_valid1=_errs89===errors;if(valid16=valid16||_valid1,!valid16){const _errs91=errors;if("string"!=typeof data37){const err64={instancePath:instancePath+"/requester/systemPhoto",schemaPath:"#/properties/requester/properties/systemPhoto/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err64]:vErrors.push(err64),errors++}_valid1=_errs91===errors;valid16=valid16||_valid1}}if(valid16)errors=_errs87,null!==vErrors&&(_errs87?vErrors.length=_errs87:vErrors=null);else{const err65={instancePath:instancePath+"/requester/systemPhoto",schemaPath:"#/properties/requester/properties/systemPhoto/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===vErrors?vErrors=[err65]:vErrors.push(err65),errors++}}if(void 0!==data34.userId&&"string"!=typeof data34.userId){const err66={instancePath:instancePath+"/requester/userId",schemaPath:"#/properties/requester/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err66]:vErrors.push(err66),errors++}if(void 0!==data34.userName&&"string"!=typeof data34.userName){const err67={instancePath:instancePath+"/requester/userName",schemaPath:"#/properties/requester/properties/userName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err67]:vErrors.push(err67),errors++}if(void 0!==data34.userPhoto){let data40=data34.userPhoto;const _errs98=errors;let valid17=!1;const _errs99=errors;validate15(data40,{instancePath:instancePath+"/requester/userPhoto",parentData:data34,parentDataProperty:"userPhoto",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length);var _valid2=_errs99===errors;if(valid17=valid17||_valid2,!valid17){const _errs100=errors;if(null!==data40){const err68={instancePath:instancePath+"/requester/userPhoto",schemaPath:"#/properties/requester/properties/userPhoto/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===vErrors?vErrors=[err68]:vErrors.push(err68),errors++}_valid2=_errs100===errors;if(valid17=valid17||_valid2,!valid17){const _errs102=errors;if("string"!=typeof data40){const err69={instancePath:instancePath+"/requester/userPhoto",schemaPath:"#/properties/requester/properties/userPhoto/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err69]:vErrors.push(err69),errors++}_valid2=_errs102===errors;valid17=valid17||_valid2}}if(valid17)errors=_errs98,null!==vErrors&&(_errs98?vErrors.length=_errs98:vErrors=null);else{const err70={instancePath:instancePath+"/requester/userPhoto",schemaPath:"#/properties/requester/properties/userPhoto/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===vErrors?vErrors=[err70]:vErrors.push(err70),errors++}}if(void 0!==data34.deviceId&&"string"!=typeof data34.deviceId){const err71={instancePath:instancePath+"/requester/deviceId",schemaPath:"#/properties/requester/properties/deviceId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err71]:vErrors.push(err71),errors++}if(void 0!==data34.roomId&&"string"!=typeof data34.roomId){const err72={instancePath:instancePath+"/requester/roomId",schemaPath:"#/properties/requester/properties/roomId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err72]:vErrors.push(err72),errors++}if(void 0!==data34.reservationId&&"string"!=typeof data34.reservationId){const err73={instancePath:instancePath+"/requester/reservationId",schemaPath:"#/properties/requester/properties/reservationId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err73]:vErrors.push(err73),errors++}if(void 0!==data34.spaceId&&"string"!=typeof data34.spaceId){const err74={instancePath:instancePath+"/requester/spaceId",schemaPath:"#/properties/requester/properties/spaceId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err74]:vErrors.push(err74),errors++}if(void 0!==data34.spaceName&&"string"!=typeof data34.spaceName){const err75={instancePath:instancePath+"/requester/spaceName",schemaPath:"#/properties/requester/properties/spaceName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err75]:vErrors.push(err75),errors++}}else{const err76={instancePath:instancePath+"/requester",schemaPath:"#/properties/requester/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err76]:vErrors.push(err76),errors++}}if(void 0!==data.assignedTo){let data46=data.assignedTo;if(data46&&"object"==typeof data46&&!Array.isArray(data46)){if(void 0!==data46.userId&&"string"!=typeof data46.userId){const err77={instancePath:instancePath+"/assignedTo/userId",schemaPath:"#/properties/assignedTo/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err77]:vErrors.push(err77),errors++}if(void 0!==data46.userName&&"string"!=typeof data46.userName){const err78={instancePath:instancePath+"/assignedTo/userName",schemaPath:"#/properties/assignedTo/properties/userName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err78]:vErrors.push(err78),errors++}if(void 0!==data46.userPhoto){let data49=data46.userPhoto;const _errs121=errors;let valid19=!1;const _errs122=errors;validate15(data49,{instancePath:instancePath+"/assignedTo/userPhoto",parentData:data46,parentDataProperty:"userPhoto",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length);var _valid3=_errs122===errors;if(valid19=valid19||_valid3,!valid19){const _errs123=errors;if(null!==data49){const err79={instancePath:instancePath+"/assignedTo/userPhoto",schemaPath:"#/properties/assignedTo/properties/userPhoto/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===vErrors?vErrors=[err79]:vErrors.push(err79),errors++}_valid3=_errs123===errors;if(valid19=valid19||_valid3,!valid19){const _errs125=errors;if("string"!=typeof data49){const err80={instancePath:instancePath+"/assignedTo/userPhoto",schemaPath:"#/properties/assignedTo/properties/userPhoto/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err80]:vErrors.push(err80),errors++}_valid3=_errs125===errors;valid19=valid19||_valid3}}if(valid19)errors=_errs121,null!==vErrors&&(_errs121?vErrors.length=_errs121:vErrors=null);else{const err81={instancePath:instancePath+"/assignedTo/userPhoto",schemaPath:"#/properties/assignedTo/properties/userPhoto/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===vErrors?vErrors=[err81]:vErrors.push(err81),errors++}}if(void 0!==data46.vendorId&&"string"!=typeof data46.vendorId){const err82={instancePath:instancePath+"/assignedTo/vendorId",schemaPath:"#/properties/assignedTo/properties/vendorId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err82]:vErrors.push(err82),errors++}if(void 0!==data46.vendorName&&"string"!=typeof data46.vendorName){const err83={instancePath:instancePath+"/assignedTo/vendorName",schemaPath:"#/properties/assignedTo/properties/vendorName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err83]:vErrors.push(err83),errors++}if(void 0!==data46.vendorPhoto){let data52=data46.vendorPhoto;const _errs132=errors;let valid20=!1;const _errs133=errors;validate15(data52,{instancePath:instancePath+"/assignedTo/vendorPhoto",parentData:data46,parentDataProperty:"vendorPhoto",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length);var _valid4=_errs133===errors;if(valid20=valid20||_valid4,!valid20){const _errs134=errors;if(null!==data52){const err84={instancePath:instancePath+"/assignedTo/vendorPhoto",schemaPath:"#/properties/assignedTo/properties/vendorPhoto/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===vErrors?vErrors=[err84]:vErrors.push(err84),errors++}_valid4=_errs134===errors;if(valid20=valid20||_valid4,!valid20){const _errs136=errors;if("string"!=typeof data52){const err85={instancePath:instancePath+"/assignedTo/vendorPhoto",schemaPath:"#/properties/assignedTo/properties/vendorPhoto/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err85]:vErrors.push(err85),errors++}_valid4=_errs136===errors;valid20=valid20||_valid4}}if(valid20)errors=_errs132,null!==vErrors&&(_errs132?vErrors.length=_errs132:vErrors=null);else{const err86={instancePath:instancePath+"/assignedTo/vendorPhoto",schemaPath:"#/properties/assignedTo/properties/vendorPhoto/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===vErrors?vErrors=[err86]:vErrors.push(err86),errors++}}}else{const err87={instancePath:instancePath+"/assignedTo",schemaPath:"#/properties/assignedTo/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err87]:vErrors.push(err87),errors++}}let data53=data.notify;if(Array.isArray(data53)){const len3=data53.length;for(let i3=0;i3<len3;i3++){let data54=data53[i3];if(data54&&"object"==typeof data54&&!Array.isArray(data54)){if(void 0===data54.id){const err88={instancePath:instancePath+"/notify/"+i3,schemaPath:"#/properties/notify/items/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err88]:vErrors.push(err88),errors++}if(void 0===data54.discriminator){const err89={instancePath:instancePath+"/notify/"+i3,schemaPath:"#/properties/notify/items/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err89]:vErrors.push(err89),errors++}for(const key4 in data54)if("id"!==key4&&"discriminator"!==key4){const err90={instancePath:instancePath+"/notify/"+i3,schemaPath:"#/properties/notify/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key4},message:"must NOT have additional properties"};null===vErrors?vErrors=[err90]:vErrors.push(err90),errors++}if(void 0!==data54.id&&"string"!=typeof data54.id){const err91={instancePath:instancePath+"/notify/"+i3+"/id",schemaPath:"#/properties/notify/items/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err91]:vErrors.push(err91),errors++}if(void 0!==data54.discriminator){let data56=data54.discriminator;if("string"!=typeof data56){const err92={instancePath:instancePath+"/notify/"+i3+"/discriminator",schemaPath:"#/properties/notify/items/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err92]:vErrors.push(err92),errors++}if("user"!==data56){const err93={instancePath:instancePath+"/notify/"+i3+"/discriminator",schemaPath:"#/properties/notify/items/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema99.properties.notify.items.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err93]:vErrors.push(err93),errors++}}}else{const err94={instancePath:instancePath+"/notify/"+i3,schemaPath:"#/properties/notify/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err94]:vErrors.push(err94),errors++}}}else{const err95={instancePath:instancePath+"/notify",schemaPath:"#/properties/notify/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err95]:vErrors.push(err95),errors++}let data57=data.collaborators;if(Array.isArray(data57)){const len4=data57.length;for(let i4=0;i4<len4;i4++){let data58=data57[i4];if(data58&&"object"==typeof data58&&!Array.isArray(data58)){if(void 0===data58.id){const err96={instancePath:instancePath+"/collaborators/"+i4,schemaPath:"#/properties/collaborators/items/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err96]:vErrors.push(err96),errors++}if(void 0===data58.name){const err97={instancePath:instancePath+"/collaborators/"+i4,schemaPath:"#/properties/collaborators/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err97]:vErrors.push(err97),errors++}if(void 0===data58.discriminator){const err98={instancePath:instancePath+"/collaborators/"+i4,schemaPath:"#/properties/collaborators/items/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err98]:vErrors.push(err98),errors++}for(const key5 in data58)if("id"!==key5&&"name"!==key5&&"discriminator"!==key5){const err99={instancePath:instancePath+"/collaborators/"+i4,schemaPath:"#/properties/collaborators/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key5},message:"must NOT have additional properties"};null===vErrors?vErrors=[err99]:vErrors.push(err99),errors++}if(void 0!==data58.id&&"string"!=typeof data58.id){const err100={instancePath:instancePath+"/collaborators/"+i4+"/id",schemaPath:"#/properties/collaborators/items/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err100]:vErrors.push(err100),errors++}if(void 0!==data58.name&&"string"!=typeof data58.name){const err101={instancePath:instancePath+"/collaborators/"+i4+"/name",schemaPath:"#/properties/collaborators/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err101]:vErrors.push(err101),errors++}if(void 0!==data58.discriminator){let data61=data58.discriminator;if("string"!=typeof data61){const err102={instancePath:instancePath+"/collaborators/"+i4+"/discriminator",schemaPath:"#/properties/collaborators/items/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err102]:vErrors.push(err102),errors++}if("user"!==data61&&"vendor"!==data61){const err103={instancePath:instancePath+"/collaborators/"+i4+"/discriminator",schemaPath:"#/properties/collaborators/items/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema99.properties.collaborators.items.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err103]:vErrors.push(err103),errors++}}}else{const err104={instancePath:instancePath+"/collaborators/"+i4,schemaPath:"#/properties/collaborators/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err104]:vErrors.push(err104),errors++}}}else{const err105={instancePath:instancePath+"/collaborators",schemaPath:"#/properties/collaborators/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err105]:vErrors.push(err105),errors++}if(void 0!==data.location){let data62=data.location;if(data62&&"object"==typeof data62&&!Array.isArray(data62)){if(void 0===data62.discriminator){const err106={instancePath:instancePath+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err106]:vErrors.push(err106),errors++}if(void 0===data62.name){const err107={instancePath:instancePath+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err107]:vErrors.push(err107),errors++}for(const key6 in data62)if("id"!==key6&&"discriminator"!==key6&&"name"!==key6){const err108={instancePath:instancePath+"/location",schemaPath:"#/properties/location/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key6},message:"must NOT have additional properties"};null===vErrors?vErrors=[err108]:vErrors.push(err108),errors++}if(void 0!==data62.id&&"string"!=typeof data62.id){const err109={instancePath:instancePath+"/location/id",schemaPath:"#/properties/location/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err109]:vErrors.push(err109),errors++}if(void 0!==data62.discriminator){let data64=data62.discriminator;if("string"!=typeof data64){const err110={instancePath:instancePath+"/location/discriminator",schemaPath:"#/properties/location/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err110]:vErrors.push(err110),errors++}if("space"!==data64&&"room"!==data64&&"property"!==data64&&"customText"!==data64){const err111={instancePath:instancePath+"/location/discriminator",schemaPath:"#/properties/location/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema99.properties.location.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err111]:vErrors.push(err111),errors++}}if(void 0!==data62.name&&"string"!=typeof data62.name){const err112={instancePath:instancePath+"/location/name",schemaPath:"#/properties/location/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err112]:vErrors.push(err112),errors++}}else{const err113={instancePath:instancePath+"/location",schemaPath:"#/properties/location/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err113]:vErrors.push(err113),errors++}}let data66=data.status;if("string"!=typeof data66){const err114={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err114]:vErrors.push(err114),errors++}if("open"!==data66&&"pending"!==data66&&"solved"!==data66&&"closed"!==data66){const err115={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema99.properties.status.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err115]:vErrors.push(err115),errors++}let data67=data.priority;if("string"!=typeof data67){const err116={instancePath:instancePath+"/priority",schemaPath:"#/properties/priority/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err116]:vErrors.push(err116),errors++}if("low"!==data67&&"normal"!==data67&&"high"!==data67){const err117={instancePath:instancePath+"/priority",schemaPath:"#/properties/priority/enum",keyword:"enum",params:{allowedValues:schema99.properties.priority.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err117]:vErrors.push(err117),errors++}let data68=data.tags;if(Array.isArray(data68)){const len5=data68.length;for(let i5=0;i5<len5;i5++)if("string"!=typeof data68[i5]){const err118={instancePath:instancePath+"/tags/"+i5,schemaPath:"#/properties/tags/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err118]:vErrors.push(err118),errors++}}else{const err119={instancePath:instancePath+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err119]:vErrors.push(err119),errors++}if(void 0!==data.department&&"string"!=typeof data.department){const err120={instancePath:instancePath+"/department",schemaPath:"#/properties/department/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err120]:vErrors.push(err120),errors++}if(void 0!==data.rating){let data71=data.rating;if("number"==typeof data71){if(data71>5||isNaN(data71)){const err121={instancePath:instancePath+"/rating",schemaPath:"#/properties/rating/maximum",keyword:"maximum",params:{comparison:"<=",limit:5},message:"must be <= 5"};null===vErrors?vErrors=[err121]:vErrors.push(err121),errors++}if(data71<0||isNaN(data71)){const err122={instancePath:instancePath+"/rating",schemaPath:"#/properties/rating/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err122]:vErrors.push(err122),errors++}}else{const err123={instancePath:instancePath+"/rating",schemaPath:"#/properties/rating/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err123]:vErrors.push(err123),errors++}}if(void 0!==data.ratingComment&&"string"!=typeof data.ratingComment){const err124={instancePath:instancePath+"/ratingComment",schemaPath:"#/properties/ratingComment/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err124]:vErrors.push(err124),errors++}if(void 0!==data.tipAmount&&"string"!=typeof data.tipAmount){const err125={instancePath:instancePath+"/tipAmount",schemaPath:"#/properties/tipAmount/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err125]:vErrors.push(err125),errors++}if(void 0!==data.autoCloseAt){let data74=data.autoCloseAt;if("string"!=typeof data74&&(!data74||"object"!=typeof data74||Array.isArray(data74))){const err126={instancePath:instancePath+"/autoCloseAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err126]:vErrors.push(err126),errors++}if("string"==typeof data74&&!formats4.validate(data74)){const err127={instancePath:instancePath+"/autoCloseAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err127]:vErrors.push(err127),errors++}}if(void 0!==data.scheduleDate){let data75=data.scheduleDate;if("string"!=typeof data75&&(!data75||"object"!=typeof data75||Array.isArray(data75))){const err128={instancePath:instancePath+"/scheduleDate",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err128]:vErrors.push(err128),errors++}if("string"==typeof data75&&!formats4.validate(data75)){const err129={instancePath:instancePath+"/scheduleDate",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err129]:vErrors.push(err129),errors++}}if(void 0!==data.createdAt){let data76=data.createdAt;if("string"!=typeof data76&&(!data76||"object"!=typeof data76||Array.isArray(data76))){const err130={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err130]:vErrors.push(err130),errors++}if("string"==typeof data76&&!formats4.validate(data76)){const err131={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err131]:vErrors.push(err131),errors++}}if(void 0!==data.updatedAt){let data77=data.updatedAt;if("string"!=typeof data77&&(!data77||"object"!=typeof data77||Array.isArray(data77))){const err132={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err132]:vErrors.push(err132),errors++}if("string"==typeof data77&&!formats4.validate(data77)){const err133={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err133]:vErrors.push(err133),errors++}}if(void 0!==data.solvedAt){let data78=data.solvedAt;if("string"!=typeof data78&&(!data78||"object"!=typeof data78||Array.isArray(data78))){const err134={instancePath:instancePath+"/solvedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err134]:vErrors.push(err134),errors++}if("string"==typeof data78&&!formats4.validate(data78)){const err135={instancePath:instancePath+"/solvedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err135]:vErrors.push(err135),errors++}}if(void 0!==data.closedAt){let data79=data.closedAt;if("string"!=typeof data79&&(!data79||"object"!=typeof data79||Array.isArray(data79))){const err136={instancePath:instancePath+"/closedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err136]:vErrors.push(err136),errors++}if("string"==typeof data79&&!formats4.validate(data79)){const err137={instancePath:instancePath+"/closedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err137]:vErrors.push(err137),errors++}}}else{const err138={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err138]:vErrors.push(err138),errors++}return validate39.errors=vErrors,0===errors}__name(validate39,"validate39");var validateTimeSheet=validate114,schema252={$schema:"http://json-schema.org/draft-07/schema",$id:"timeSheet.json",title:"Time Sheet",type:"object",required:["userId","day"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"timeSheet",enum:["timeSheet"]},userId:{$ref:"definitions.json#/definitions/id"},day:{type:["string","object"],format:"date-time"},locked:{type:"boolean",default:!1,description:"If true, the time sheet is locked and cannot be modified"},timeEntries:{type:"array",default:[],items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},discriminator:{type:"string",enum:["working","driving","meeting","break"]},start:{type:["string","object"],format:"date-time"},end:{type:["string","object"],format:"date-time"},comment:{type:"string"},ticketId:{type:"string"}},required:["start","discriminator"],additionalProperties:!1}}}};function validate114(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="timeSheet"),void 0===data.locked&&(data.locked=!1),void 0===data.timeEntries&&(data.timeEntries=[]),void 0===data.userId){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"userId"},message:"must have required property 'userId'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.day){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"day"},message:"must have required property 'day'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs5===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if("timeSheet"!==data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema252.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.userId){let data2=data.userId;if("string"!=typeof data2){const err7={instancePath:instancePath+"/userId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}const _errs11=errors,_errs12=errors;if("global"!==data2&&"system"!==data2){const err8={};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(_errs12===errors){const err9={instancePath:instancePath+"/userId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}else errors=_errs11,null!==vErrors&&(_errs11?vErrors.length=_errs11:vErrors=null)}if(void 0!==data.day){let data3=data.day;if("string"!=typeof data3&&(!data3||"object"!=typeof data3||Array.isArray(data3))){const err10={instancePath:instancePath+"/day",schemaPath:"#/properties/day/type",keyword:"type",params:{type:schema252.properties.day.type},message:"must be string,object"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("string"==typeof data3&&!formats4.validate(data3)){const err11={instancePath:instancePath+"/day",schemaPath:"#/properties/day/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if("boolean"!=typeof data.locked){const err12={instancePath:instancePath+"/locked",schemaPath:"#/properties/locked/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}let data5=data.timeEntries;if(Array.isArray(data5)){const len0=data5.length;for(let i0=0;i0<len0;i0++){let data6=data5[i0];if(data6&&"object"==typeof data6&&!Array.isArray(data6)){if(void 0===data6.start){const err13={instancePath:instancePath+"/timeEntries/"+i0,schemaPath:"#/properties/timeEntries/items/required",keyword:"required",params:{missingProperty:"start"},message:"must have required property 'start'"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0===data6.discriminator){const err14={instancePath:instancePath+"/timeEntries/"+i0,schemaPath:"#/properties/timeEntries/items/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}for(const key0 in data6)if("id"!==key0&&"discriminator"!==key0&&"start"!==key0&&"end"!==key0&&"comment"!==key0&&"ticketId"!==key0){const err15={instancePath:instancePath+"/timeEntries/"+i0,schemaPath:"#/properties/timeEntries/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data6.id){let data7=data6.id;if("string"!=typeof data7){const err16={instancePath:instancePath+"/timeEntries/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}const _errs25=errors,_errs26=errors;if("global"!==data7&&"system"!==data7){const err17={};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(_errs26===errors){const err18={instancePath:instancePath+"/timeEntries/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}else errors=_errs25,null!==vErrors&&(_errs25?vErrors.length=_errs25:vErrors=null)}if(void 0!==data6.discriminator){let data8=data6.discriminator;if("string"!=typeof data8){const err19={instancePath:instancePath+"/timeEntries/"+i0+"/discriminator",schemaPath:"#/properties/timeEntries/items/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if("working"!==data8&&"driving"!==data8&&"meeting"!==data8&&"break"!==data8){const err20={instancePath:instancePath+"/timeEntries/"+i0+"/discriminator",schemaPath:"#/properties/timeEntries/items/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema252.properties.timeEntries.items.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}if(void 0!==data6.start){let data9=data6.start;if("string"!=typeof data9&&(!data9||"object"!=typeof data9||Array.isArray(data9))){const err21={instancePath:instancePath+"/timeEntries/"+i0+"/start",schemaPath:"#/properties/timeEntries/items/properties/start/type",keyword:"type",params:{type:schema252.properties.timeEntries.items.properties.start.type},message:"must be string,object"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if("string"==typeof data9&&!formats4.validate(data9)){const err22={instancePath:instancePath+"/timeEntries/"+i0+"/start",schemaPath:"#/properties/timeEntries/items/properties/start/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data6.end){let data10=data6.end;if("string"!=typeof data10&&(!data10||"object"!=typeof data10||Array.isArray(data10))){const err23={instancePath:instancePath+"/timeEntries/"+i0+"/end",schemaPath:"#/properties/timeEntries/items/properties/end/type",keyword:"type",params:{type:schema252.properties.timeEntries.items.properties.end.type},message:"must be string,object"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if("string"==typeof data10&&!formats4.validate(data10)){const err24={instancePath:instancePath+"/timeEntries/"+i0+"/end",schemaPath:"#/properties/timeEntries/items/properties/end/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data6.comment&&"string"!=typeof data6.comment){const err25={instancePath:instancePath+"/timeEntries/"+i0+"/comment",schemaPath:"#/properties/timeEntries/items/properties/comment/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data6.ticketId&&"string"!=typeof data6.ticketId){const err26={instancePath:instancePath+"/timeEntries/"+i0+"/ticketId",schemaPath:"#/properties/timeEntries/items/properties/ticketId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}else{const err27={instancePath:instancePath+"/timeEntries/"+i0,schemaPath:"#/properties/timeEntries/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}}else{const err28={instancePath:instancePath+"/timeEntries",schemaPath:"#/properties/timeEntries/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}else{const err29={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}return validate114.errors=vErrors,0===errors}__name(validate114,"validate114");var validateUser=validate115,schema256={$schema:"http://json-schema.org/draft-07/schema",$id:"user.json",title:"User",type:"object",required:["id","firstName","lastName"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"user"},firstName:{type:"string"},lastName:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},phoneVerified:{type:"boolean"},email:{type:["string","null"],format:"email"},emailVerified:{type:"boolean"},whatsapp:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},whatsappVerified:{type:"boolean"},address:{$ref:"definitions.json#/definitions/address"},secretKey:{type:"string"},photo:{$ref:"mediaFile.json#"},jobTitle:{type:"string"},dob:{type:"string"},gender:{type:"string",enum:["male","female"]},nationality:{type:"string",minLength:2,maxLength:2},permissions:{type:"array",default:[],items:{type:"object",required:["organizationId","propertyId","role"],properties:{organizationId:{type:"string",description:"The ID of the organization the permission is applies to."},propertyId:{type:"string",description:"The ID of the property the permission is applies to."},role:{type:"string",enum:["Guest","User","Agent","Manager","Maintenance","Administrator","SuperAdmin"]},timeTrackingEnabled:{type:"boolean",description:"Whether time tracking is enabled for this role."},department:{type:"string",description:"The department the user belongs to."},policyIds:{type:"array",items:{type:"string",description:"ID of a policy that is applied to this role."}},policies:{type:"array",items:{description:"A policy object populated from the policyIds array.",$ref:"policy.json"}}},additionalProperties:!1}},preferences:{type:"array",items:{type:"object",additionalProperties:!1,required:["organizationId","propertyId"],properties:{organizationId:{type:"string"},propertyId:{type:"string"},notifications:{type:"array",items:{type:"object",additionalProperties:!1,required:["discriminator","enabled"],properties:{discriminator:{type:"string",enum:["observerTicketCreated","observerTicketResolved"]},enabled:{type:"boolean"}}}}}}},notes:{type:"array",items:{type:"string"}},files:{type:"array",items:{$ref:"mediaFile.json#"}},identifications:{type:"array",items:{$ref:"identification.json#"}},payments:{type:"array",items:{$ref:"payment.json#"}},location:{type:"object",required:["accuracy","latitude","longitude","timestamp"],additionalProperties:!1,properties:{accuracy:{type:["number","null"]},latitude:{type:["number","null"]},longitude:{type:["number","null"]},timestamp:{type:["number","null"]}}},reservations:{type:"array",items:{$ref:"reservation.json"}},spaceName:{type:"string"},revenue:{$ref:"definitions.json#/definitions/revenue"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"},systems:{type:"array",default:[],items:{type:"object",properties:{systemId:{type:"string"},propertyId:{type:"string"},driver:{type:"string"}},required:["systemId","propertyId","driver"],additionalProperties:!1}}}};function validate122(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(Array.isArray(data)){const len0=data.length;for(let i0=0;i0<len0;i0++){let data0=data[i0];if(data0&&"object"==typeof data0&&!Array.isArray(data0)){if(void 0!==data0.id){let data1=data0.id;if("string"!=typeof data1){const err0={instancePath:instancePath+"/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}const _errs6=errors,_errs7=errors;if("global"!==data1&&"system"!==data1){const err1={};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(_errs7===errors){const err2={instancePath:instancePath+"/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}else errors=_errs6,null!==vErrors&&(_errs6?vErrors.length=_errs6:vErrors=null)}if(void 0!==data0.name&&"string"!=typeof data0.name){const err3={instancePath:instancePath+"/"+i0+"/name",schemaPath:"#/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data0.date){let data3=data0.date;if("string"==typeof data3){if(!formats4.validate(data3)){const err4={instancePath:instancePath+"/"+i0+"/date",schemaPath:"#/items/properties/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}else{const err5={instancePath:instancePath+"/"+i0+"/date",schemaPath:"#/items/properties/date/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}if(void 0!==data0.price&&"number"!=typeof data0.price){const err6={instancePath:instancePath+"/"+i0+"/price",schemaPath:"#/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data0.tax){let data5=data0.tax;if("number"!=typeof data5&&null!==data5){const err7={instancePath:instancePath+"/"+i0+"/tax",schemaPath:"#/items/properties/tax/type",keyword:"type",params:{type:schema167.items.properties.tax.type},message:"must be number,null"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}}}else{const err8={instancePath:instancePath+"/"+i0,schemaPath:"#/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}}else{const err9={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}return validate122.errors=vErrors,0===errors}function validate115(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="user"),void 0===data.permissions&&(data.permissions=[]),void 0===data.systems&&(data.systems=[]),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.firstName){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"firstName"},message:"must have required property 'firstName'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.lastName){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"lastName"},message:"must have required property 'lastName'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs5===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if("string"!=typeof data.type){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.firstName&&"string"!=typeof data.firstName){const err7={instancePath:instancePath+"/firstName",schemaPath:"#/properties/firstName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.lastName&&"string"!=typeof data.lastName){const err8={instancePath:instancePath+"/lastName",schemaPath:"#/properties/lastName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.phone){let data4=data.phone;if("string"!=typeof data4&&null!==data4){const err9={instancePath:instancePath+"/phone",schemaPath:"#/properties/phone/type",keyword:"type",params:{type:schema256.properties.phone.type},message:"must be string,null"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("string"==typeof data4&&!pattern9.test(data4)){const err10={instancePath:instancePath+"/phone",schemaPath:"#/properties/phone/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.phoneVerified&&"boolean"!=typeof data.phoneVerified){const err11={instancePath:instancePath+"/phoneVerified",schemaPath:"#/properties/phoneVerified/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.email){let data6=data.email;if("string"!=typeof data6&&null!==data6){const err12={instancePath:instancePath+"/email",schemaPath:"#/properties/email/type",keyword:"type",params:{type:schema256.properties.email.type},message:"must be string,null"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if("string"==typeof data6&&!formats88.test(data6)){const err13={instancePath:instancePath+"/email",schemaPath:"#/properties/email/format",keyword:"format",params:{format:"email"},message:'must match format "email"'};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.emailVerified&&"boolean"!=typeof data.emailVerified){const err14={instancePath:instancePath+"/emailVerified",schemaPath:"#/properties/emailVerified/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data.whatsapp){let data8=data.whatsapp;if("string"!=typeof data8&&null!==data8){const err15={instancePath:instancePath+"/whatsapp",schemaPath:"#/properties/whatsapp/type",keyword:"type",params:{type:schema256.properties.whatsapp.type},message:"must be string,null"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if("string"==typeof data8&&!pattern9.test(data8)){const err16={instancePath:instancePath+"/whatsapp",schemaPath:"#/properties/whatsapp/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.whatsappVerified&&"boolean"!=typeof data.whatsappVerified){const err17={instancePath:instancePath+"/whatsappVerified",schemaPath:"#/properties/whatsappVerified/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.address){let data10=data.address;if(data10&&"object"==typeof data10&&!Array.isArray(data10)){if(void 0!==data10.id&&"string"!=typeof data10.id){const err18={instancePath:instancePath+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data10.line1&&"string"!=typeof data10.line1){const err19={instancePath:instancePath+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data10.line2&&"string"!=typeof data10.line2){const err20={instancePath:instancePath+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data10.line3&&"string"!=typeof data10.line3){const err21={instancePath:instancePath+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0!==data10.city&&"string"!=typeof data10.city){const err22={instancePath:instancePath+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data10.state&&"string"!=typeof data10.state){const err23={instancePath:instancePath+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data10.postalCode&&"string"!=typeof data10.postalCode){const err24={instancePath:instancePath+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data10.countryCode){let data18=data10.countryCode;if("string"==typeof data18){if(func4(data18)>2){const err25={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(func4(data18)<2){const err26={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}else{const err27={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}}else{const err28={instancePath:instancePath+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}if(void 0!==data.secretKey&&"string"!=typeof data.secretKey){const err29={instancePath:instancePath+"/secretKey",schemaPath:"#/properties/secretKey/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data.photo&&(validate15(data.photo,{instancePath:instancePath+"/photo",parentData:data,parentDataProperty:"photo",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length)),void 0!==data.jobTitle&&"string"!=typeof data.jobTitle){const err30={instancePath:instancePath+"/jobTitle",schemaPath:"#/properties/jobTitle/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(void 0!==data.dob&&"string"!=typeof data.dob){const err31={instancePath:instancePath+"/dob",schemaPath:"#/properties/dob/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(void 0!==data.gender){let data23=data.gender;if("string"!=typeof data23){const err32={instancePath:instancePath+"/gender",schemaPath:"#/properties/gender/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if("male"!==data23&&"female"!==data23){const err33={instancePath:instancePath+"/gender",schemaPath:"#/properties/gender/enum",keyword:"enum",params:{allowedValues:schema256.properties.gender.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}if(void 0!==data.nationality){let data24=data.nationality;if("string"==typeof data24){if(func4(data24)>2){const err34={instancePath:instancePath+"/nationality",schemaPath:"#/properties/nationality/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(func4(data24)<2){const err35={instancePath:instancePath+"/nationality",schemaPath:"#/properties/nationality/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}}else{const err36={instancePath:instancePath+"/nationality",schemaPath:"#/properties/nationality/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}let data25=data.permissions;if(Array.isArray(data25)){const len0=data25.length;for(let i0=0;i0<len0;i0++){let data26=data25[i0];if(data26&&"object"==typeof data26&&!Array.isArray(data26)){if(void 0===data26.organizationId){const err37={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"organizationId"},message:"must have required property 'organizationId'"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}if(void 0===data26.propertyId){const err38={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"propertyId"},message:"must have required property 'propertyId'"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}if(void 0===data26.role){const err39={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"role"},message:"must have required property 'role'"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}for(const key0 in data26)if("organizationId"!==key0&&"propertyId"!==key0&&"role"!==key0&&"timeTrackingEnabled"!==key0&&"department"!==key0&&"policyIds"!==key0&&"policies"!==key0){const err40={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if(void 0!==data26.organizationId&&"string"!=typeof data26.organizationId){const err41={instancePath:instancePath+"/permissions/"+i0+"/organizationId",schemaPath:"#/properties/permissions/items/properties/organizationId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}if(void 0!==data26.propertyId&&"string"!=typeof data26.propertyId){const err42={instancePath:instancePath+"/permissions/"+i0+"/propertyId",schemaPath:"#/properties/permissions/items/properties/propertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(void 0!==data26.role){let data29=data26.role;if("string"!=typeof data29){const err43={instancePath:instancePath+"/permissions/"+i0+"/role",schemaPath:"#/properties/permissions/items/properties/role/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}if("Guest"!==data29&&"User"!==data29&&"Agent"!==data29&&"Manager"!==data29&&"Maintenance"!==data29&&"Administrator"!==data29&&"SuperAdmin"!==data29){const err44={instancePath:instancePath+"/permissions/"+i0+"/role",schemaPath:"#/properties/permissions/items/properties/role/enum",keyword:"enum",params:{allowedValues:schema256.properties.permissions.items.properties.role.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}if(void 0!==data26.timeTrackingEnabled&&"boolean"!=typeof data26.timeTrackingEnabled){const err45={instancePath:instancePath+"/permissions/"+i0+"/timeTrackingEnabled",schemaPath:"#/properties/permissions/items/properties/timeTrackingEnabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}if(void 0!==data26.department&&"string"!=typeof data26.department){const err46={instancePath:instancePath+"/permissions/"+i0+"/department",schemaPath:"#/properties/permissions/items/properties/department/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}if(void 0!==data26.policyIds){let data32=data26.policyIds;if(Array.isArray(data32)){const len1=data32.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data32[i1]){const err47={instancePath:instancePath+"/permissions/"+i0+"/policyIds/"+i1,schemaPath:"#/properties/permissions/items/properties/policyIds/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}}else{const err48={instancePath:instancePath+"/permissions/"+i0+"/policyIds",schemaPath:"#/properties/permissions/items/properties/policyIds/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}}if(void 0!==data26.policies){let data34=data26.policies;if(Array.isArray(data34)){const len2=data34.length;for(let i2=0;i2<len2;i2++)validate58(data34[i2],{instancePath:instancePath+"/permissions/"+i0+"/policies/"+i2,parentData:data34,parentDataProperty:i2,rootData:rootData})||(vErrors=null===vErrors?validate58.errors:vErrors.concat(validate58.errors),errors=vErrors.length)}else{const err49={instancePath:instancePath+"/permissions/"+i0+"/policies",schemaPath:"#/properties/permissions/items/properties/policies/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}}}else{const err50={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}}}else{const err51={instancePath:instancePath+"/permissions",schemaPath:"#/properties/permissions/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}if(void 0!==data.preferences){let data36=data.preferences;if(Array.isArray(data36)){const len3=data36.length;for(let i3=0;i3<len3;i3++){let data37=data36[i3];if(data37&&"object"==typeof data37&&!Array.isArray(data37)){if(void 0===data37.organizationId){const err52={instancePath:instancePath+"/preferences/"+i3,schemaPath:"#/properties/preferences/items/required",keyword:"required",params:{missingProperty:"organizationId"},message:"must have required property 'organizationId'"};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}if(void 0===data37.propertyId){const err53={instancePath:instancePath+"/preferences/"+i3,schemaPath:"#/properties/preferences/items/required",keyword:"required",params:{missingProperty:"propertyId"},message:"must have required property 'propertyId'"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}for(const key1 in data37)if("organizationId"!==key1&&"propertyId"!==key1&&"notifications"!==key1){const err54={instancePath:instancePath+"/preferences/"+i3,schemaPath:"#/properties/preferences/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}if(void 0!==data37.organizationId&&"string"!=typeof data37.organizationId){const err55={instancePath:instancePath+"/preferences/"+i3+"/organizationId",schemaPath:"#/properties/preferences/items/properties/organizationId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}if(void 0!==data37.propertyId&&"string"!=typeof data37.propertyId){const err56={instancePath:instancePath+"/preferences/"+i3+"/propertyId",schemaPath:"#/properties/preferences/items/properties/propertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}if(void 0!==data37.notifications){let data40=data37.notifications;if(Array.isArray(data40)){const len4=data40.length;for(let i4=0;i4<len4;i4++){let data41=data40[i4];if(data41&&"object"==typeof data41&&!Array.isArray(data41)){if(void 0===data41.discriminator){const err57={instancePath:instancePath+"/preferences/"+i3+"/notifications/"+i4,schemaPath:"#/properties/preferences/items/properties/notifications/items/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}if(void 0===data41.enabled){const err58={instancePath:instancePath+"/preferences/"+i3+"/notifications/"+i4,schemaPath:"#/properties/preferences/items/properties/notifications/items/required",keyword:"required",params:{missingProperty:"enabled"},message:"must have required property 'enabled'"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}for(const key2 in data41)if("discriminator"!==key2&&"enabled"!==key2){const err59={instancePath:instancePath+"/preferences/"+i3+"/notifications/"+i4,schemaPath:"#/properties/preferences/items/properties/notifications/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key2},message:"must NOT have additional properties"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}if(void 0!==data41.discriminator){let data42=data41.discriminator;if("string"!=typeof data42){const err60={instancePath:instancePath+"/preferences/"+i3+"/notifications/"+i4+"/discriminator",schemaPath:"#/properties/preferences/items/properties/notifications/items/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err60]:vErrors.push(err60),errors++}if("observerTicketCreated"!==data42&&"observerTicketResolved"!==data42){const err61={instancePath:instancePath+"/preferences/"+i3+"/notifications/"+i4+"/discriminator",schemaPath:"#/properties/preferences/items/properties/notifications/items/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema256.properties.preferences.items.properties.notifications.items.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err61]:vErrors.push(err61),errors++}}if(void 0!==data41.enabled&&"boolean"!=typeof data41.enabled){const err62={instancePath:instancePath+"/preferences/"+i3+"/notifications/"+i4+"/enabled",schemaPath:"#/properties/preferences/items/properties/notifications/items/properties/enabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err62]:vErrors.push(err62),errors++}}else{const err63={instancePath:instancePath+"/preferences/"+i3+"/notifications/"+i4,schemaPath:"#/properties/preferences/items/properties/notifications/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err63]:vErrors.push(err63),errors++}}}else{const err64={instancePath:instancePath+"/preferences/"+i3+"/notifications",schemaPath:"#/properties/preferences/items/properties/notifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err64]:vErrors.push(err64),errors++}}}else{const err65={instancePath:instancePath+"/preferences/"+i3,schemaPath:"#/properties/preferences/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err65]:vErrors.push(err65),errors++}}}else{const err66={instancePath:instancePath+"/preferences",schemaPath:"#/properties/preferences/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err66]:vErrors.push(err66),errors++}}if(void 0!==data.notes){let data44=data.notes;if(Array.isArray(data44)){const len5=data44.length;for(let i5=0;i5<len5;i5++)if("string"!=typeof data44[i5]){const err67={instancePath:instancePath+"/notes/"+i5,schemaPath:"#/properties/notes/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err67]:vErrors.push(err67),errors++}}else{const err68={instancePath:instancePath+"/notes",schemaPath:"#/properties/notes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err68]:vErrors.push(err68),errors++}}if(void 0!==data.files){let data46=data.files;if(Array.isArray(data46)){const len6=data46.length;for(let i6=0;i6<len6;i6++)validate15(data46[i6],{instancePath:instancePath+"/files/"+i6,parentData:data46,parentDataProperty:i6,rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length)}else{const err69={instancePath:instancePath+"/files",schemaPath:"#/properties/files/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err69]:vErrors.push(err69),errors++}}if(void 0!==data.identifications){let data48=data.identifications;if(Array.isArray(data48)){const len7=data48.length;for(let i7=0;i7<len7;i7++)validate37(data48[i7],{instancePath:instancePath+"/identifications/"+i7,parentData:data48,parentDataProperty:i7,rootData:rootData})||(vErrors=null===vErrors?validate37.errors:vErrors.concat(validate37.errors),errors=vErrors.length)}else{const err70={instancePath:instancePath+"/identifications",schemaPath:"#/properties/identifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err70]:vErrors.push(err70),errors++}}if(void 0!==data.payments){let data50=data.payments;if(Array.isArray(data50)){const len8=data50.length;for(let i8=0;i8<len8;i8++)validate57(data50[i8],{instancePath:instancePath+"/payments/"+i8,parentData:data50,parentDataProperty:i8,rootData:rootData})||(vErrors=null===vErrors?validate57.errors:vErrors.concat(validate57.errors),errors=vErrors.length)}else{const err71={instancePath:instancePath+"/payments",schemaPath:"#/properties/payments/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err71]:vErrors.push(err71),errors++}}if(void 0!==data.location){let data52=data.location;if(data52&&"object"==typeof data52&&!Array.isArray(data52)){if(void 0===data52.accuracy){const err72={instancePath:instancePath+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"accuracy"},message:"must have required property 'accuracy'"};null===vErrors?vErrors=[err72]:vErrors.push(err72),errors++}if(void 0===data52.latitude){const err73={instancePath:instancePath+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"latitude"},message:"must have required property 'latitude'"};null===vErrors?vErrors=[err73]:vErrors.push(err73),errors++}if(void 0===data52.longitude){const err74={instancePath:instancePath+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"longitude"},message:"must have required property 'longitude'"};null===vErrors?vErrors=[err74]:vErrors.push(err74),errors++}if(void 0===data52.timestamp){const err75={instancePath:instancePath+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"timestamp"},message:"must have required property 'timestamp'"};null===vErrors?vErrors=[err75]:vErrors.push(err75),errors++}for(const key3 in data52)if("accuracy"!==key3&&"latitude"!==key3&&"longitude"!==key3&&"timestamp"!==key3){const err76={instancePath:instancePath+"/location",schemaPath:"#/properties/location/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key3},message:"must NOT have additional properties"};null===vErrors?vErrors=[err76]:vErrors.push(err76),errors++}if(void 0!==data52.accuracy){let data53=data52.accuracy;if("number"!=typeof data53&&null!==data53){const err77={instancePath:instancePath+"/location/accuracy",schemaPath:"#/properties/location/properties/accuracy/type",keyword:"type",params:{type:schema256.properties.location.properties.accuracy.type},message:"must be number,null"};null===vErrors?vErrors=[err77]:vErrors.push(err77),errors++}}if(void 0!==data52.latitude){let data54=data52.latitude;if("number"!=typeof data54&&null!==data54){const err78={instancePath:instancePath+"/location/latitude",schemaPath:"#/properties/location/properties/latitude/type",keyword:"type",params:{type:schema256.properties.location.properties.latitude.type},message:"must be number,null"};null===vErrors?vErrors=[err78]:vErrors.push(err78),errors++}}if(void 0!==data52.longitude){let data55=data52.longitude;if("number"!=typeof data55&&null!==data55){const err79={instancePath:instancePath+"/location/longitude",schemaPath:"#/properties/location/properties/longitude/type",keyword:"type",params:{type:schema256.properties.location.properties.longitude.type},message:"must be number,null"};null===vErrors?vErrors=[err79]:vErrors.push(err79),errors++}}if(void 0!==data52.timestamp){let data56=data52.timestamp;if("number"!=typeof data56&&null!==data56){const err80={instancePath:instancePath+"/location/timestamp",schemaPath:"#/properties/location/properties/timestamp/type",keyword:"type",params:{type:schema256.properties.location.properties.timestamp.type},message:"must be number,null"};null===vErrors?vErrors=[err80]:vErrors.push(err80),errors++}}}else{const err81={instancePath:instancePath+"/location",schemaPath:"#/properties/location/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err81]:vErrors.push(err81),errors++}}if(void 0!==data.reservations){let data57=data.reservations;if(Array.isArray(data57)){const len9=data57.length;for(let i9=0;i9<len9;i9++)validate63(data57[i9],{instancePath:instancePath+"/reservations/"+i9,parentData:data57,parentDataProperty:i9,rootData:rootData})||(vErrors=null===vErrors?validate63.errors:vErrors.concat(validate63.errors),errors=vErrors.length)}else{const err82={instancePath:instancePath+"/reservations",schemaPath:"#/properties/reservations/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err82]:vErrors.push(err82),errors++}}if(void 0!==data.spaceName&&"string"!=typeof data.spaceName){const err83={instancePath:instancePath+"/spaceName",schemaPath:"#/properties/spaceName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err83]:vErrors.push(err83),errors++}if(void 0!==data.revenue&&(validate122(data.revenue,{instancePath:instancePath+"/revenue",parentData:data,parentDataProperty:"revenue",rootData:rootData})||(vErrors=null===vErrors?validate122.errors:vErrors.concat(validate122.errors),errors=vErrors.length)),void 0!==data.createdAt){let data61=data.createdAt;if("string"!=typeof data61&&(!data61||"object"!=typeof data61||Array.isArray(data61))){const err84={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema101.type},message:"must be string,object"};null===vErrors?vErrors=[err84]:vErrors.push(err84),errors++}if("string"==typeof data61&&!formats4.validate(data61)){const err85={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err85]:vErrors.push(err85),errors++}}if(void 0!==data.updatedAt){let data62=data.updatedAt;if("string"!=typeof data62&&(!data62||"object"!=typeof data62||Array.isArray(data62))){const err86={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:schema151.type},message:"must be string,object"};null===vErrors?vErrors=[err86]:vErrors.push(err86),errors++}if("string"==typeof data62&&!formats4.validate(data62)){const err87={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err87]:vErrors.push(err87),errors++}}let data63=data.systems;if(Array.isArray(data63)){const len10=data63.length;for(let i10=0;i10<len10;i10++){let data64=data63[i10];if(data64&&"object"==typeof data64&&!Array.isArray(data64)){if(void 0===data64.systemId){const err88={instancePath:instancePath+"/systems/"+i10,schemaPath:"#/properties/systems/items/required",keyword:"required",params:{missingProperty:"systemId"},message:"must have required property 'systemId'"};null===vErrors?vErrors=[err88]:vErrors.push(err88),errors++}if(void 0===data64.propertyId){const err89={instancePath:instancePath+"/systems/"+i10,schemaPath:"#/properties/systems/items/required",keyword:"required",params:{missingProperty:"propertyId"},message:"must have required property 'propertyId'"};null===vErrors?vErrors=[err89]:vErrors.push(err89),errors++}if(void 0===data64.driver){const err90={instancePath:instancePath+"/systems/"+i10,schemaPath:"#/properties/systems/items/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err90]:vErrors.push(err90),errors++}for(const key4 in data64)if("systemId"!==key4&&"propertyId"!==key4&&"driver"!==key4){const err91={instancePath:instancePath+"/systems/"+i10,schemaPath:"#/properties/systems/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key4},message:"must NOT have additional properties"};null===vErrors?vErrors=[err91]:vErrors.push(err91),errors++}if(void 0!==data64.systemId&&"string"!=typeof data64.systemId){const err92={instancePath:instancePath+"/systems/"+i10+"/systemId",schemaPath:"#/properties/systems/items/properties/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err92]:vErrors.push(err92),errors++}if(void 0!==data64.propertyId&&"string"!=typeof data64.propertyId){const err93={instancePath:instancePath+"/systems/"+i10+"/propertyId",schemaPath:"#/properties/systems/items/properties/propertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err93]:vErrors.push(err93),errors++}if(void 0!==data64.driver&&"string"!=typeof data64.driver){const err94={instancePath:instancePath+"/systems/"+i10+"/driver",schemaPath:"#/properties/systems/items/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err94]:vErrors.push(err94),errors++}}else{const err95={instancePath:instancePath+"/systems/"+i10,schemaPath:"#/properties/systems/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err95]:vErrors.push(err95),errors++}}}else{const err96={instancePath:instancePath+"/systems",schemaPath:"#/properties/systems/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err96]:vErrors.push(err96),errors++}}else{const err97={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err97]:vErrors.push(err97),errors++}return validate115.errors=vErrors,0===errors}__name(validate122,"validate122"),__name(validate115,"validate115");var validateVendor=validate124,schema263={$schema:"http://json-schema.org/draft-07/schema",$id:"vendor.json",title:"Vendor",type:"object",required:["id","name","email"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"vendor",enum:["vendor"]},name:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},email:{type:["string","null"],format:"email"},address:{$ref:"definitions.json#/definitions/address"},photo:{$ref:"mediaFile.json#"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}};function validate124(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="vendor"),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.name){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.email){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"email"},message:"must have required property 'email'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs5===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if("vendor"!==data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema263.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.name&&"string"!=typeof data.name){const err8={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.phone){let data3=data.phone;if("string"!=typeof data3&&null!==data3){const err9={instancePath:instancePath+"/phone",schemaPath:"#/properties/phone/type",keyword:"type",params:{type:schema263.properties.phone.type},message:"must be string,null"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("string"==typeof data3&&!pattern9.test(data3)){const err10={instancePath:instancePath+"/phone",schemaPath:"#/properties/phone/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.email){let data4=data.email;if("string"!=typeof data4&&null!==data4){const err11={instancePath:instancePath+"/email",schemaPath:"#/properties/email/type",keyword:"type",params:{type:schema263.properties.email.type},message:"must be string,null"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("string"==typeof data4&&!formats88.test(data4)){const err12={instancePath:instancePath+"/email",schemaPath:"#/properties/email/format",keyword:"format",params:{format:"email"},message:'must match format "email"'};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.address){let data5=data.address;if(data5&&"object"==typeof data5&&!Array.isArray(data5)){if(void 0!==data5.id&&"string"!=typeof data5.id){const err13={instancePath:instancePath+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data5.line1&&"string"!=typeof data5.line1){const err14={instancePath:instancePath+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data5.line2&&"string"!=typeof data5.line2){const err15={instancePath:instancePath+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data5.line3&&"string"!=typeof data5.line3){const err16={instancePath:instancePath+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data5.city&&"string"!=typeof data5.city){const err17={instancePath:instancePath+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data5.state&&"string"!=typeof data5.state){const err18={instancePath:instancePath+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data5.postalCode&&"string"!=typeof data5.postalCode){const err19={instancePath:instancePath+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data5.countryCode){let data13=data5.countryCode;if("string"==typeof data13){if(func4(data13)>2){const err20={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(func4(data13)<2){const err21={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}else{const err22={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}}else{const err23={instancePath:instancePath+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}if(void 0!==data.photo&&(validate15(data.photo,{instancePath:instancePath+"/photo",parentData:data,parentDataProperty:"photo",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length)),void 0!==data.createdAt){let data15=data.createdAt;if("string"!=typeof data15&&(!data15||"object"!=typeof data15||Array.isArray(data15))){const err24={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema101.type},message:"must be string,object"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if("string"==typeof data15&&!formats4.validate(data15)){const err25={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}if(void 0!==data.updatedAt){let data16=data.updatedAt;if("string"!=typeof data16&&(!data16||"object"!=typeof data16||Array.isArray(data16))){const err26={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:schema151.type},message:"must be string,object"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if("string"==typeof data16&&!formats4.validate(data16)){const err27={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}}else{const err28={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}return validate124.errors=vErrors,0===errors}__name(validate124,"validate124");var validateWindowCovering=validate81,Alarm=class extends Entity{static{__name(this,"Alarm")}constructor(data){super(data),this.id=data.id,void 0!==data.name&&(this.name=data.name),void 0!==data.offline&&(this.offline=data.offline),this.type=data.type,void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),this.driver=data.driver,this.areas=data.areas,this.zones=data.zones,void 0!==data.chime&&(this.chime=data.chime),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion),void 0!==data.address&&(this.address=data.address)}};Object.defineProperty(Alarm.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"alarm.json",title:"Alarm",description:"Any smart alarm system",type:"object",required:["id","type","areas","zones","driver"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string",description:"Name of the alarm"},offline:{type:"boolean"},type:{type:"string",enum:["alarm"],default:"alarm"},systemId:{$ref:"definitions.json#/definitions/systemId"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},areas:{type:"array",items:{type:"object",properties:{number:{type:"number"},name:{type:"string"},securityMode:{type:["string","null"],enum:["arming","disarming","armed","disarmed","alarm",null]}},additionalProperties:!1}},zones:{type:"array",items:{type:"object",properties:{number:{type:"number",minimum:0},name:{type:"string"},secure:{type:["boolean","null"]},bypassed:{type:["boolean","null"]}},additionalProperties:!1}},chime:{type:"boolean",description:"Reflects whether console chime is enabled"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"},address:{$ref:"definitions.json#/definitions/address"}}}}),Object.defineProperty(Alarm.prototype,"validator",{get:__name((function(){return validateAlarm}),"get")});var Announcement=class extends Entity{static{__name(this,"Announcement")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.users&&(this.users=data.users),void 0!==data.group&&(this.group=data.group),void 0!==data.body&&(this.body=data.body),void 0!==data.media&&(this.media=data.media),void 0!==data.sentBy&&(this.sentBy=data.sentBy),void 0!==data.tags&&(this.tags=data.tags),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt)}};Object.defineProperty(Announcement.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"announcement.json",title:"Announcement",description:"Announcement message sent to users",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["announcement"],default:"announcement"},users:{type:"array",items:{type:"string"},minItems:1},group:{type:"string"},body:{type:"string"},media:{$ref:"mediaFile.json"},sentBy:{type:"string"},tags:{type:"array",items:{type:"string"}},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"}},additionalProperties:!1}}),Object.defineProperty(Announcement.prototype,"validator",{get:__name((function(){return validateAnnouncement}),"get")});var Camera=class extends Entity{static{__name(this,"Camera")}constructor(data){super(data),this.id=data.id,void 0!==data.name&&(this.name=data.name),this.type=data.type,void 0!==data.offline&&(this.offline=data.offline),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),this.driver=data.driver,void 0!==data.liveStreams&&(this.liveStreams=data.liveStreams),void 0!==data.liveStream&&(this.liveStream=data.liveStream),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Camera.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"camera.json",title:"Camera",description:"Any smart camera",type:"object",required:["id","type","driver"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{type:"string",enum:["camera"],default:"camera"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},liveStreams:{type:"object",additionalProperties:!1,$comment:"This is now deprecated. Use liveStream instead. This will remain here for backwards compatibility.",properties:{iframe:{type:["string","null"]},hls:{type:["string","null"]},webRTC:{type:["string","null"]},rtsp:{type:["string","null"]}}},liveStream:{type:"object",additionalProperties:!1,properties:{id:{type:"string"},driver:{type:"string",enum:["cloudflare-stream","aws-kinesis","digital-watchdog","mediamtx"]},allowedOrigins:{type:"array",items:{type:"string"}},authRequired:{type:"boolean"},iframe:{type:["string","null"]},hls:{type:["string","null"]},webRTC:{type:["string","null"]},rtsp:{type:["string","null"],description:"Local RTSP stream URL",examples:["rtsp://192.168.1.4:544/channels/1","rtsp://10.145.6.129:8554/unicast"]},previewImage:{type:["string","null"],description:"Source to preview the camera stream",examples:["https://example.com/preview.jpg","data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QBYRXhpZgAATU0AKgAAAAgAA1EQAAEAAAABAQAAAFERAAQAAAABAAABAgABAA"]}}},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}}}}),Object.defineProperty(Camera.prototype,"validator",{get:__name((function(){return validateCamera}),"get")});var Category=class extends Entity{static{__name(this,"Category")}constructor(data){super(data),this.id=data.id,this.type=data.type,void 0!==data.name&&(this.name=data.name),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.description&&(this.description=data.description),void 0!==data.image&&(this.image=data.image),void 0!==data.rating&&(this.rating=data.rating),this.discriminator=data.discriminator,void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(Category.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"category.json",title:"Category",type:"object",required:["id","type","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["category"],default:"category"},name:{type:"string",minLength:1},driver:{$ref:"definitions.json#/definitions/driver"},description:{type:"string"},image:{$ref:"mediaFile.json"},rating:{type:"number",minimum:0,maximum:10,default:9},discriminator:{type:"string",enum:["space","product","mediaFile"]},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Category.prototype,"validator",{get:__name((function(){return validateCategory}),"get")});var Courtesy=class extends Entity{static{__name(this,"Courtesy")}constructor(data){super(data),this.id=data.id,void 0!==data.name&&(this.name=data.name),this.type=data.type,void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),this.driver=data.driver,void 0!==data.offline&&(this.offline=data.offline),this.supportedStates=data.supportedStates,this.state=data.state,void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Courtesy.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"courtesy.json",title:"Courtesy",description:"Any smart courtesy system",type:"object",required:["id","type","driver","supportedStates","state"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},supportedStates:{type:"array",uniqueItems:!0,items:{enum:["privacy","service","none"]}},state:{type:"string",$ref:"#/properties/supportedStates/items"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}}}}),Object.defineProperty(Courtesy.prototype,"validator",{get:__name((function(){return validateCourtesy}),"get")});var Credential=class extends Entity{static{__name(this,"Credential")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),this.type=data.type,void 0!==data.driver&&(this.driver=data.driver),void 0!==data.discriminator&&(this.discriminator=data.discriminator),this.credential=data.credential,void 0!==data.userId&&(this.userId=data.userId),void 0!==data.organizationId&&(this.organizationId=data.organizationId),void 0!==data.propertyId&&(this.propertyId=data.propertyId),void 0!==data.deviceId&&(this.deviceId=data.deviceId),void 0!==data.userAgent&&(this.userAgent=data.userAgent),this.expires=data.expires,void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(Credential.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"credential.json",title:"Credential",type:"object",required:["type","credential","expires"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"credential"},driver:{$ref:"definitions.json#/definitions/driver"},discriminator:{type:"string",enum:["verificationCode","token","mobileKey","pin","publicKey","passkeyChallenge"]},credential:{type:"string"},userId:{type:"string"},organizationId:{type:"string"},propertyId:{type:"string"},deviceId:{type:"string"},userAgent:{type:"string"},expires:{type:["string","object","null"]},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Credential.prototype,"validator",{get:__name((function(){return validateCredential}),"get")});var DeviceRouter=class extends Entity{static{__name(this,"DeviceRouter")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),this.driver=data.driver,this.organizationId=data.organizationId,void 0!==data.devices&&(this.devices=data.devices)}};Object.defineProperty(DeviceRouter.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"deviceRouter.json",title:"Device Router",description:"A device router contains instructions on where to route devices based on their organization and driver.",type:"object",required:["driver","organizationId"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"deviceRouter",enum:["deviceRouter"]},driver:{type:"string"},organizationId:{type:["string","null"],description:"Reference (id) to the organization that owns this router"},devices:{type:"object",additionalProperties:!0}}}}),Object.defineProperty(DeviceRouter.prototype,"validator",{get:__name((function(){return validateDeviceRouter}),"get")});var Dimmer=class extends Entity{static{__name(this,"Dimmer")}constructor(data){super(data),this.id=data.id,void 0!==data.name&&(this.name=data.name),this.type=data.type,void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),this.driver=data.driver,void 0!==data.offline&&(this.offline=data.offline),this.level=data.level,void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Dimmer.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"dimmer.json",title:"Dimmer",description:"Any smart dimmer",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},level:{type:["number","null"],minimum:0,maximum:100},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","level","driver"]}}),Object.defineProperty(Dimmer.prototype,"validator",{get:__name((function(){return validateDimmer}),"get")});var DiscoveredDevice=class extends Entity{static{__name(this,"DiscoveredDevice")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),this.name=data.name,this.deviceId=data.deviceId,void 0!==data.type&&(this.type=data.type),void 0!==data.discriminator&&(this.discriminator=data.discriminator),void 0!==data.driver&&(this.driver=data.driver),this.deviceData=data.deviceData,void 0!==data.ignore&&(this.ignore=data.ignore),void 0!==data.organizationId&&(this.organizationId=data.organizationId),void 0!==data.propertyId&&(this.propertyId=data.propertyId)}};Object.defineProperty(DiscoveredDevice.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"discoveredDevice.json",title:"Discovered Device",description:"A device that has been discovered by Kohost, but not yet added to the Kohost system.",type:"object",required:["name","deviceId","deviceData"],properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},deviceId:{type:"string"},type:{type:"string",enum:["discoveredDevice"],default:"discoveredDevice"},discriminator:{$ref:"definitions.json#/definitions/type"},driver:{type:"string"},deviceData:{type:"object"},ignore:{type:"boolean"},organizationId:{type:["string","null"],description:"Reference (id) to the organization that owns this device"},propertyId:{type:["string","null"],description:"Reference (id) to the property that this device belongs to"}}}}),Object.defineProperty(DiscoveredDevice.prototype,"validator",{get:__name((function(){return validateDiscoveredDevice}),"get")});var EmailMessage=class extends Entity{static{__name(this,"EmailMessage")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),this.to=data.to,this.from=data.from,this.subject=data.subject,this.status=data.status,void 0!==data.statusMessage&&(this.statusMessage=data.statusMessage),void 0!==data.html&&(this.html=data.html),void 0!==data.text&&(this.text=data.text),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.appData&&(this.appData=data.appData),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(EmailMessage.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"emailMessage.json",title:"Email Message",type:"object",required:["to","from","status","subject"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"emailMessage",enum:["emailMessage"]},to:{type:"string",pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"},from:{type:"string",pattern:".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*",description:"Must be in the format of 'Sender <email@example.com>"},subject:{type:"string"},status:{type:"string",enum:["queued","sending","sent","deferred","delivered","undelivered","bounced","blocked","receiving","received","opened","clicked","unsubscribed","spamReport"]},statusMessage:{type:"string"},html:{type:"string"},text:{type:"string"},driver:{type:"string"},appData:{type:"object"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(EmailMessage.prototype,"validator",{get:__name((function(){return validateEmailMessage}),"get")});var EnergyReport=class extends Entity{static{__name(this,"EnergyReport")}constructor(data){super(data),this.id=data.id,this.type=data.type,void 0!==data.reportTime&&(this.reportTime=data.reportTime),this.roomId=data.roomId,this.first=data.first,this.last=data.last,this.consumption=data.consumption,this.totals=data.totals,this.costPerKw=data.costPerKw}};Object.defineProperty(EnergyReport.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"energyReport.json",title:"Energy Report",description:"Hourly Report for Energy based on energy report shards",type:"object",required:["id","type","roomId","first","last","consumption","totals","costPerKw"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["energyReport"],default:"energyReport"},reportTime:{type:"string",enum:["hourly","daily","monthly"]},roomId:{$ref:"definitions.json#/definitions/id"},first:{type:["string","object"],format:"date-time"},last:{type:["string","object"],format:"date-time"},consumption:{type:"array",items:{type:"object",required:["id","type","kwh"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},kwh:{type:"number",minimum:0}}}},totals:{type:"array",items:{type:"object",required:["lights","climate","media"],properties:{lights:{type:"number",minimum:0},climate:{type:"number",minimum:0},media:{type:"number",minimum:0}}}},costPerKw:{type:"number",minimum:0}}}}),Object.defineProperty(EnergyReport.prototype,"validator",{get:__name((function(){return validateEnergyReport}),"get")});var EnergyReportShard=class extends Entity{static{__name(this,"EnergyReportShard")}constructor(data){super(data),this.id=data.id,this.type=data.type,this.roomId=data.roomId,this.first=data.first,this.last=data.last,this.data=data.data,this.ndata=data.ndata,this.expires=data.expires}};Object.defineProperty(EnergyReportShard.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"energyReportShard.json",title:"Energy Report Shard",description:"Shard used for Energy Reports",type:"object",required:["id","type","roomId","first","last","data","ndata","expires"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["energyReportShard"],default:"energyReportShard"},roomId:{$ref:"definitions.json#/definitions/id"},first:{type:["string","object"],format:"date-time"},last:{type:["string","object"],format:"date-time"},data:{type:"array",items:{type:"object",required:["time","watts","id","type","value"],properties:{time:{type:["string","object"],format:"date-time"},watts:{$ref:"definitions.json#/definitions/watts"},id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},value:{type:"number",minimum:0,maximum:1}}}},ndata:{type:"integer",minimum:0,maximum:1e5,default:0},expires:{type:["string","object"],format:"date-time"}}}}),Object.defineProperty(EnergyReportShard.prototype,"validator",{get:__name((function(){return validateEnergyReportShard}),"get")});var Gateway=class extends Entity{static{__name(this,"Gateway")}constructor(data){super(data),this.id=data.id,this.type=data.type,void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),this.status=data.status,void 0!==data.systemId&&(this.systemId=data.systemId),this.driver=data.driver,void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Gateway.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"iotGateway.json",title:"Gateway",description:"Any smart gateway that is an entrypoint for controlling devices",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},status:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"},driver:{$ref:"definitions.json#/definitions/driver"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","status","driver"]}}),Object.defineProperty(Gateway.prototype,"validator",{get:__name((function(){return validateGateway}),"get")});var Identification=class extends Entity{static{__name(this,"Identification")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),this.type=data.type,void 0!==data.number&&(this.number=data.number),void 0!==data.maskedNumber&&(this.maskedNumber=data.maskedNumber),void 0!==data.encryptedNumber&&(this.encryptedNumber=data.encryptedNumber),void 0!==data.issued&&(this.issued=data.issued),void 0!==data.expires&&(this.expires=data.expires),void 0!==data.verified&&(this.verified=data.verified),void 0!==data.matched&&(this.matched=data.matched),void 0!==data.firstName&&(this.firstName=data.firstName),void 0!==data.lastName&&(this.lastName=data.lastName),void 0!==data.issuingCountry&&(this.issuingCountry=data.issuingCountry),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(Identification.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"identification.json",title:"Identification",type:"object",required:["type"],additionalProperties:!1,oneOf:[{required:["number"]},{required:["encryptedNumber"]}],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["driversLicense","passport","identityCard","visa"]},number:{type:"string"},maskedNumber:{type:"string"},encryptedNumber:{type:"string"},issued:{type:["string","object"],format:"date-time"},expires:{type:["string","object","null"],format:"date-time"},verified:{type:"boolean"},matched:{type:"boolean"},firstName:{type:"string"},lastName:{type:"string"},issuingCountry:{type:"string",minLength:2,maxLength:2},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Identification.prototype,"validator",{get:__name((function(){return validateIdentification}),"get")});var Issue=class extends Entity{static{__name(this,"Issue")}constructor(data){super(data),this.id=data.id,this.type=data.type,this.name=data.name,void 0!==data.description&&(this.description=data.description),this.department=data.department,void 0!==data.autoAssign&&(this.autoAssign=data.autoAssign),void 0!==data.notify&&(this.notify=data.notify),void 0!==data.systemKey&&(this.systemKey=data.systemKey),void 0!==data.autoCreateTicket&&(this.autoCreateTicket=data.autoCreateTicket),void 0!==data.excludedResources&&(this.excludedResources=data.excludedResources)}};Object.defineProperty(Issue.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"issue.json",title:"Issue",description:"An issue associated with ticketing and concierge.",type:"object",required:["id","type","name","department"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["issue"],default:"issue"},name:{type:"string"},description:{type:"string"},department:{type:"string"},autoAssign:{type:"object",properties:{userId:{type:"string",description:"The user ID to assign tickets with this issue to."},vendorId:{type:"string",description:"The vendor ID to assign tickets with this issue to."},priority:{$ref:"ticket.json#/properties/priority",description:"The priority to assign tickets with this issue to."},tags:{type:"array",items:{type:"string"}}}},notify:{type:"array",description:"A list of entities to notify when this issue is triggered.",default:[],items:{type:"object",required:["id","discriminator"],properties:{id:{type:"string",description:"The ID of the entity to notify."},discriminator:{type:"string",enum:["user"]}}}},systemKey:{type:"string"},autoCreateTicket:{type:"boolean",default:!0},excludedResources:{type:"array",description:"A list of resources that should not trigger notifications of this issue",items:{type:"string"},default:[]}}}}),Object.defineProperty(Issue.prototype,"validator",{get:__name((function(){return validateIssue}),"get")});var Lock=class extends Entity{static{__name(this,"Lock")}constructor(data){super(data),this.id=data.id,void 0!==data.name&&(this.name=data.name),this.type=data.type,void 0!==data.offline&&(this.offline=data.offline),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),this.driver=data.driver,this.state=data.state,void 0!==data.mode&&(this.mode=data.mode),void 0!==data.supportedModes&&(this.supportedModes=data.supportedModes),void 0!==data.batteryLevel&&(this.batteryLevel=data.batteryLevel),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Lock.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"lock.json",title:"Lock",description:"Any smart lock",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},state:{type:["string","null"],enum:["locked","unlocked",null]},mode:{type:["string","null"],enum:["normal","autoLock","emergencyOpen","emergencyClose","holdOpen","lockdown",null],description:"emergencyOpen and emergencyClose are deprecated and can be removed once Salto, Paxton and Geovision drivers are updated",default:null},supportedModes:{type:"array",uniqueItems:!0,items:{enum:["normal","autoLock","emergencyOpen","emergencyClose","holdOpen","lockdown",null]}},batteryLevel:{$ref:"definitions.json#/definitions/batteryLevel"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","state","driver"]}}),Object.defineProperty(Lock.prototype,"validator",{get:__name((function(){return validateLock}),"get")});var Log=class extends Entity{static{__name(this,"Log")}constructor(data){super(data),this.type=data.type,this.timestamp=data.timestamp,this.id=data.id,this.driver=data.driver,this.name=data.name,void 0!==data.field1&&(this.field1=data.field1),void 0!==data.field2&&(this.field2=data.field2),void 0!==data.field3&&(this.field3=data.field3),void 0!==data.field4&&(this.field4=data.field4),void 0!==data.field5&&(this.field5=data.field5),void 0!==data.field6&&(this.field6=data.field6)}};Object.defineProperty(Log.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"log.json",title:"Log",type:"object",required:["type","timestamp","id","driver","name"],properties:{type:{type:"string",default:"log",enum:["log"]},timestamp:{type:"number",minimum:1655907956593},id:{$ref:"definitions.json#/definitions/id"},driver:{$ref:"definitions.json#/definitions/driver"},name:{type:"string",description:"Event name"},field1:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field2:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field3:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field4:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field5:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field6:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}}}}}),Object.defineProperty(Log.prototype,"validator",{get:__name((function(){return validateLog}),"get")});var MediaFile=class extends Entity{static{__name(this,"MediaFile")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),this.type=data.type,void 0!==data.name&&(this.name=data.name),void 0!==data.fileHash&&(this.fileHash=data.fileHash),void 0!==data.category&&(this.category=data.category),void 0!==data.mimeType&&(this.mimeType=data.mimeType),void 0!==data.data&&(this.data=data.data),void 0!==data.url&&(this.url=data.url),void 0!==data.width&&(this.width=data.width),void 0!==data.height&&(this.height=data.height),void 0!==data.size&&(this.size=data.size),void 0!==data.uploadUrl&&(this.uploadUrl=data.uploadUrl),void 0!==data.uploadUrlExpires&&(this.uploadUrlExpires=data.uploadUrlExpires),void 0!==data.createdBy&&(this.createdBy=data.createdBy),void 0!==data.systemId&&(this.systemId=data.systemId)}createImageVariant(params){if("image/*"!=this.mimeType)throw new Error("Only dynamic images can have variants");if(!this.url)throw new Error("MediaFile has no url");const query=Object.keys(params).map((key=>`${key}=${params[key]}`)).join(",");return this.url.replace(/\/public$/,`/${query}`)}};Object.defineProperty(MediaFile.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"mediaFile.json",title:"Media File",description:"Any media file",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"mediaFile",enum:["mediaFile"]},name:{type:"string"},fileHash:{type:"string"},category:{type:"string",description:"This is the category id"},mimeType:{type:"string",enum:["image/*","image/jpeg","image/png","image/gif","image/webp","image/avif","image/svg+xml","application/pdf"]},data:{type:"string"},url:{type:"string",format:"uri"},width:{type:"integer",minimum:0},height:{type:"integer",minimum:0},size:{type:"integer",minimum:0,description:"Size in bytes"},uploadUrl:{type:"string",format:"uri"},uploadUrlExpires:{$ref:"definitions.json#/definitions/date"},createdBy:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"}},additionalProperties:!1,required:["type"]}}),Object.defineProperty(MediaFile.prototype,"validator",{get:__name((function(){return validateMediaFile}),"get")});var MediaSource=class extends Entity{static{__name(this,"MediaSource")}constructor(data){super(data),this.id=data.id,this.type=data.type,this.discriminator=data.discriminator,void 0!==data.playlists&&(this.playlists=data.playlists),void 0!==data.remote&&(this.remote=data.remote),void 0!==data.name&&(this.name=data.name),this.driver=data.driver,void 0!==data.offline&&(this.offline=data.offline),this.audio=data.audio,this.video=data.video,void 0!==data.powerFeedback&&(this.powerFeedback=data.powerFeedback),void 0!==data.volumeFeedback&&(this.volumeFeedback=data.volumeFeedback),void 0!==data.muted&&(this.muted=data.muted),void 0!==data.volume&&(this.volume=data.volume),void 0!==data.brightness&&(this.brightness=data.brightness),void 0!==data.contrast&&(this.contrast=data.contrast),void 0!==data.power&&(this.power=data.power),void 0!==data.input&&(this.input=data.input),void 0!==data.supportedInputs&&(this.supportedInputs=data.supportedInputs),void 0!==data.supportedOutputs&&(this.supportedOutputs=data.supportedOutputs),void 0!==data.command&&(this.command=data.command),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(MediaSource.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"mediaSource.json",title:"Media Source",description:"Any media source",type:"object",required:["id","type","discriminator","audio","video","driver"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"mediaSource",enum:["mediaSource"]},discriminator:{type:"string",enum:["tv","dvr","appleTv","discPlayer","mediaPlayer","paSystem","uncontrolledDevice"]},playlists:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{$ref:"definitions.json#/definitions/name"}}}},remote:{type:"string",enum:["MR22GA","XRT260","XRT270","HOF-16K 1.2","219863500","SONIFI","AKB76039803","BN59-01388A"]},name:{$ref:"definitions.json#/definitions/name"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},audio:{type:"boolean"},video:{type:"boolean"},powerFeedback:{type:"boolean"},volumeFeedback:{type:"boolean"},muted:{type:"boolean"},volume:{type:"number",minimum:0,maximum:100},brightness:{type:"number",minimum:0,maximum:100},contrast:{type:"number",minimum:0,maximum:100},power:{type:"string",enum:["on","off"]},input:{type:"string"},supportedInputs:{type:"array",items:{type:"string"}},supportedOutputs:{type:"array",items:{type:"string"}},command:{type:["string","null"],enum:["mute","volumeUp","volumeDown","brightnessUp","brightnessDown","channelUp","channelDown","number0","number1","number2","number3","number4","number5","number6","number7","number8","number9","lastChannel","display","favoriteChannel","play","playing","stop","stopped","pause","paused","fastForward","fastForwarding","rewind","rewinding","instantReplay","record","ac3","pvrMenu","guide","menu","menuUp","menuDown","menuLeft","menuRight","pageUp","pageDown","select","exit","input","power","enterChannel","enterVolume","enterBrightness","enterContrast","number10","number11","number12","number13","number14","number15","number16","number10Plus","number20Plus","number100","dash","threeChan","threeD","sixChan","a","add","alarm","am","analog","angle","antenna","antennaEast","antennaWest","aspect","audio1","audio2","audio3","audioDumming","audioLevelDown","audioLevelUp","b","back","c","component1","component2","component3","d","home","list","liveTv","discreteInputCable","powerOff","powerOn","setupMenu","skipForward","skipReverse","video1","video2","video3","video4","video5","details","hdmi1","hdmi2","hdmi3","cecDeviceList","mtsSap","red","green","yellow","blue","alert","order"]},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},additionalProperties:!1}}),Object.defineProperty(MediaSource.prototype,"validator",{get:__name((function(){return validateMediaSource}),"get")});var MotionSensor=class extends Entity{static{__name(this,"MotionSensor")}constructor(data){super(data),this.id=data.id,this.type=data.type,this.driver=data.driver,void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(MotionSensor.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"motionSensor.json",title:"Motion Sensor",description:"Any smart motion sensor",type:"object",required:["id","type","driver"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},driver:{$ref:"definitions.json#/definitions/driver"},systemId:{$ref:"definitions.json#/definitions/systemId"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}}}}),Object.defineProperty(MotionSensor.prototype,"validator",{get:__name((function(){return validateMotionSensor}),"get")});var Order=class extends Entity{static{__name(this,"Order")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),this.type=data.type,void 0!==data.orderNumber&&(this.orderNumber=data.orderNumber),this.status=data.status,void 0!==data.userId&&(this.userId=data.userId),void 0!==data.reservationId&&(this.reservationId=data.reservationId),void 0!==data.date&&(this.date=data.date),void 0!==data.items&&(this.items=data.items),void 0!==data.taxes&&(this.taxes=data.taxes),void 0!==data.fees&&(this.fees=data.fees),void 0!==data.delivery&&(this.delivery=data.delivery),void 0!==data.payments&&(this.payments=data.payments)}getSubTotal(){return this.items.reduce(((acc,item)=>{const qty=item.quantity||1;return acc+item.price*qty}),0)}getTaxTotal(){const taxes=this.taxes;return taxes?this.items.reduce(((acc,item)=>{if(!item.taxClass)return acc;const tax=taxes.find((t=>t.class===item.taxClass));if(!tax)return acc;const{rateType:rateType,rate:rate}=tax;return"percentage"===rateType?acc+item.price*rate:acc+rate}),0):0}getDeliveryTotal(){const delivery=this.delivery;return delivery?this.items.reduce(((acc,item)=>{if(!item.deliveryClass)return acc;const d=delivery.find((d2=>d2.class===item.deliveryClass));if(!d)return acc;const{rateType:rateType,rate:rate}=d;return"percentage"===rateType?acc+item.price*rate:acc+rate}),0):0}getFeesTotal(){return this.fees.reduce(((acc,fee)=>acc+fee.price),0)}getTotal(){return this.getSubTotal()+this.getTaxTotal()+this.getDeliveryTotal()+this.getFeesTotal()}getPaymentsTotal(){return this.payments.reduce(((acc,payment)=>acc+payment.amount),0)}getBalance(){return this.getTotal()-this.getPaymentsTotal()}};Object.defineProperty(Order.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"order.json",title:"Order",description:"A purchase order for products or services.",type:"object",required:["type","status"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"order",enum:["order"]},orderNumber:{type:"string"},status:{type:"string",enum:["draft","pendingPayment","processing","outForDelivery","completed","paymentFailed","cancelled","refunded"]},userId:{$ref:"definitions.json#/definitions/id",description:"User id of purchaser"},reservationId:{$ref:"definitions.json#/definitions/id",description:"Reservation id if the order is for a reservation"},date:{$ref:"definitions.json#/definitions/date"},items:{type:"array",default:[],items:{type:"object",required:["name","price"],properties:{additionalProperties:!1,name:{type:"string"},sku:{type:"string"},quantity:{type:"number",default:1},price:{type:"number"},taxClass:{type:"string"},deliveryClass:{type:"string"},productId:{type:"string"}}}},taxes:{type:"array",default:[],items:{type:"object",required:["name","rate"],properties:{additionalProperties:!1,name:{type:"string"},class:{type:"string"},rateType:{type:"string",enum:["percentage","flat"],default:"percentage"},rate:{type:"number"},total:{type:"number"}}}},fees:{type:"array",default:[],items:{type:"object",required:["name","price"],properties:{additionalProperties:!1,name:{type:"string"},price:{type:"number"}}}},delivery:{type:"array",default:[],items:{type:"object",required:["name","rate"],properties:{additionalProperties:!1,name:{type:"string"},class:{type:"string"},rateType:{type:"string",enum:["percentage","flat"],default:"percentage"},rate:{type:"number"},total:{type:"number"}}}},payments:{type:"array",default:[],items:{type:"object",properties:{method:{type:"string",enum:["folio","invoice","amex","visa","masterCard","maestro","discover","diners","jcb","applePay","alipay","chinaUnionPay","vpay"]},name:{type:"string"},date:{$ref:"definitions.json#/definitions/date"},amount:{type:"number"},transactionReference:{type:"string"}}}}}}}),Object.defineProperty(Order.prototype,"validator",{get:__name((function(){return validateOrder}),"get")});var Organization=class extends Entity{static{__name(this,"Organization")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),this.accountNumber=data.accountNumber,this.name=data.name,void 0!==data.properties&&(this.properties=data.properties),void 0!==data.hostname&&(this.hostname=data.hostname),void 0!==data.appManifest&&(this.appManifest=data.appManifest),void 0!==data.tickets&&(this.tickets=data.tickets),void 0!==data.credentials&&(this.credentials=data.credentials),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt)}};Object.defineProperty(Organization.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"organization.json",title:"Organization",type:"object",description:"An organization is a group or entity that subscribes to Kohost software.",required:["accountNumber","name"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"organization",enum:["organization"]},accountNumber:{type:["number","null"],minimum:1e4},name:{type:"string"},properties:{type:"array",items:{type:"string"}},hostname:{type:["string","null"]},appManifest:{type:"object",properties:{name:{type:"string"},short_name:{type:"string"},scope:{type:"string"},start_url:{type:"string"},themeColor:{type:"string"},backgroundColor:{type:"string"},display:{type:"string",enum:["fullscreen","standalone","minimal-ui","browser"],default:"fullscreen"},orientation:{type:"string",enum:["portrait","landscape"],default:"portrait"},splash:{type:"object",properties:{src:{type:"string"},type:{type:"string"},sizes:{type:"string"}}},icons:{type:"array",items:{type:"object",properties:{src:{type:"string"},sizes:{type:"string"},type:{type:"string"}}}},logo:{type:"object",properties:{src:{type:"string"},type:{type:"string"},sizes:{type:"string"}}}},default:{name:"Kohost",short_name:"Kohost",start_url:"/",scope:"/",display:"fullscreen",orientation:"portrait",theme_color:"#1d1f22",background_color:"#1d1f22",icons:[{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/9c85047f-ccba-4b1c-3070-5463fbe93b00/w=512",sizes:"512x512",type:"image/png"}],splash:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/034fb112-5326-4d37-373e-d1cc2a4d0400/w=1500",sizes:"1500x800",type:"image/jpg"},logo:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/1e54c54d-3bac-4745-f46f-c2f98036af00/h=75",sizes:"300x75",type:"image/png"}}},tickets:{type:"object",properties:{nextTicketNumber:{type:["string","integer"],default:1}}},credentials:{type:"object",additionalProperties:!0},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}}}),Object.defineProperty(Organization.prototype,"validator",{get:__name((function(){return validateOrganization}),"get")});var Payment=class extends Entity{static{__name(this,"Payment")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),this.type=data.type,void 0!==data.enabled&&(this.enabled=data.enabled),void 0!==data.storageData&&(this.storageData=data.storageData),this.maskedNumber=data.maskedNumber,void 0!==data.issued&&(this.issued=data.issued),this.expires=data.expires,void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(Payment.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"payment.json",title:"Payment",type:"object",required:["type","maskedNumber","expires"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["amex","visa","masterCard","maestro","discover","diners","jcb","applePay","alipay","chinaUnionPay","vpay"]},enabled:{type:"boolean",default:!0},storageData:{type:["string","null"]},maskedNumber:{type:"string"},issued:{type:["string","null"]},expires:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Payment.prototype,"validator",{get:__name((function(){return validatePayment}),"get")});var Policy=class extends Entity{static{__name(this,"Policy")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),this.type=data.type,this.discriminator=data.discriminator,this.name=data.name,void 0!==data.description&&(this.description=data.description),this.organizationId=data.organizationId,this.propertyId=data.propertyId,this.permissions=data.permissions}};Object.defineProperty(Policy.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"policy.json",title:"Policy",description:"A policy is a set of permissions that can be applied to a user to limit their access to resources.",type:"object",required:["name","type","organizationId","propertyId","permissions","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"policy",enum:["policy"]},discriminator:{type:"string",enum:["user"]},name:{type:"string",minLength:1},description:{type:"string"},organizationId:{type:"string"},propertyId:{type:"string"},permissions:{type:"array",items:{type:"object",required:["entities","effect"],properties:{entities:{type:"array",items:{type:"string",pattern:"^[^:]+(:.+)+$"}},effect:{type:"string",enum:["Allow","Deny"]}}}}}}}),Object.defineProperty(Policy.prototype,"validator",{get:__name((function(){return validatePolicy}),"get")});var Product=class extends Entity{static{__name(this,"Product")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),this.name=data.name,this.driver=data.driver,void 0!==data.description&&(this.description=data.description),this.price=data.price,void 0!==data.tax&&(this.tax=data.tax),void 0!==data.image&&(this.image=data.image),void 0!==data.category&&(this.category=data.category),void 0!==data.imageUrl&&(this.imageUrl=data.imageUrl),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(Product.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"product.json",title:"Product",type:"object",required:["name","price","driver"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"product",enum:["product"]},name:{type:"string"},driver:{$ref:"definitions.json#/definitions/driver"},description:{type:"string"},price:{type:"number"},tax:{type:["number","null"]},image:{$ref:"mediaFile.json"},category:{type:"string"},imageUrl:{type:"string",format:"uri",pattern:"^https?://"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Product.prototype,"validator",{get:__name((function(){return validateProduct}),"get")});var Property=class extends Entity{static{__name(this,"Property")}constructor(data){super(data),this.id=data.id,this.name=data.name,this.type=data.type,this.discriminator=data.discriminator,this.organization=data.organization,void 0!==data.departments&&(this.departments=data.departments),void 0!==data.testModeEnabled&&(this.testModeEnabled=data.testModeEnabled),void 0!==data.testMode&&(this.testMode=data.testMode),this.timezone=data.timezone,void 0!==data.smsNumber&&(this.smsNumber=data.smsNumber),void 0!==data.checkInTime&&(this.checkInTime=data.checkInTime),void 0!==data.checkOutTime&&(this.checkOutTime=data.checkOutTime),void 0!==data.address&&(this.address=data.address),void 0!==data.latitude&&(this.latitude=data.latitude),void 0!==data.longitude&&(this.longitude=data.longitude),void 0!==data.appFeatures&&(this.appFeatures=data.appFeatures),void 0!==data.notifications&&(this.notifications=data.notifications),void 0!==data.credentials&&(this.credentials=data.credentials)}};Object.defineProperty(Property.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"property.json",title:"Property",type:"object",description:"A property is a physical asset or building",required:["id","name","type","organization","timezone","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{type:"string",default:"property",enum:["property"]},discriminator:{type:"string",enum:["hospitality","education","commercial","storage"]},organization:{type:["string","null"],description:"Reference (id) to the organization that owns this property"},departments:{type:"array",items:{type:"string"}},testModeEnabled:{type:"boolean"},testMode:{type:"object",properties:{notificationEmails:{type:"array",items:{type:"string"},description:"Only users with these email addresses will receive notifications in test mode, including sms, email, or push."},notificationEmailDomains:{type:"array",items:{type:"string"},description:"Only users with email addreses ending in these domains will receive notifications in test mode, including sms, email, or push."}}},timezone:{type:"string",description:"IANA timezone string",pattern:"^([a-zA-Z]+/[a-zA-Z_]+)$",examples:["America/New_York","America/Los_Angeles"]},smsNumber:{type:"string"},checkInTime:{type:"string"},checkOutTime:{type:"string"},address:{$ref:"definitions.json#/definitions/address"},latitude:{type:"number"},longitude:{type:"number"},appFeatures:{type:"object",properties:{RoomControl:{type:"object",properties:{disabledSystems:{type:"array",items:{type:"string",enum:["climate","lights","shades","tv","doors"]}},excludedDeviceIds:{type:"array",items:{type:"string"},default:[]},commonAreas:{type:"object",properties:{spaces:{type:"array",items:{type:"string"}}}},alarmConfig:{type:"object",patternProperties:{"^[a-zA-Z0-9]+$":{type:"object",properties:{zoneLockMap:{type:"object",description:"Maps zone numbers to lock ids",additionalProperties:{type:"string"}}}}},examples:[{wZz7hucY:{zoneLockMap:{1:"wc87hucc",2:"bc86hzxc",3:"zv5ah5jv"}}}]}},additionalProperties:!1},CheckIn:{type:"object",properties:{payment:{},identification:{},earlyCheckIn:{type:"object",required:["dynamic"],properties:{dynamic:{type:"boolean",default:!1},minimumPrice:{type:"number",default:10},maximumPrice:{type:"number",default:50},priceRatioPerHour:{type:"number",default:.1},minimumTime:{type:"string"}}},roomUpgrades:{},pet:{},promos:{}}},CheckOut:{type:"object",properties:{lateCheckOut:{type:"object",required:["dynamic"],properties:{dynamic:{type:"boolean",default:!1},minimumPrice:{type:"number",default:10},maximumPrice:{type:"number",default:50},priceRatioPerHour:{type:"number",default:.1}}}}},Concierge:{type:"object",properties:{timeTracking:{type:"boolean",default:!1},tipping:{type:"boolean",default:!1},feedback:{type:"boolean",default:!0},ratings:{type:"boolean",default:!0},newTicketCCs:{type:"array",items:{type:"string"},default:[]},newMessageChannel:{type:["string","null"],enum:["sms","email"],default:"sms",description:"Determines how users should be notified of new messages in the concierge system"},quickServices:{type:"array",items:{type:"object",properties:{name:{type:"string"},description:{type:"string"},department:{type:"string"},image:{$ref:"mediaFile.json"}},required:["name","description","image"]}},issues:{type:"object",properties:{syncWithPropertyId:{type:"string"}}}}},DigitalKey:{type:"object",properties:{system:{type:"string",enum:["salto","dormakaba"]},systemOnline:{type:"boolean",default:!1},systemConfig:{type:"object",properties:{legicUrl:{type:"string",format:"uri"},legicWalletName:{type:"string"},legicAppId:{type:"number"},legicTechUsername:{type:"string"},legicTechPassword:{type:"string"}},additionalProperties:!1,default:{}},enableApp:{type:"boolean"},branding:{type:"object",properties:{logo:{type:"string",format:"uri"},gradient:{type:"array",items:{type:"string",pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},minItems:2,maxItems:2},highlightedGradient:{type:"array",items:{type:"string",pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},minItems:2,maxItems:3}}}}},SOS:{type:"object",properties:{active:{type:"boolean"},activeEmergencies:{type:"array",items:{type:"string",enum:["medical","fire","suspiciousPerson","other","conflict","shooter"]}}}},Elevator:{type:"object"},Experiences:{type:"object"},Dining:{type:"object",properties:{system:{type:"string",enum:["gotab"]},systemConfig:{type:"object",properties:{landingUrl:{type:"string",format:"uri"},includeUserDetails:{type:"boolean"}},additionalProperties:!1}}},Rentals:{type:"object"},Shop:{type:"object"},Spa:{type:"object"},Valet:{type:"object"}},additionalProperties:!1,default:{RoomControl:{}}},notifications:{type:"object",properties:{email:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1},sms:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1},push:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1,default:{email:{enabled:!1},sms:{enabled:!1},push:{enabled:!1}}},credentials:{type:"object",additionalProperties:!0}}}}),Object.defineProperty(Property.prototype,"validator",{get:__name((function(){return validateProperty}),"get")});var Reservation=class extends Entity{static{__name(this,"Reservation")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.primaryGuest&&(this.primaryGuest=data.primaryGuest),this.type=data.type,void 0!==data.sharedGuests&&(this.sharedGuests=data.sharedGuests),void 0!==data.spaceCategory&&(this.spaceCategory=data.spaceCategory),void 0!==data.space&&(this.space=data.space),void 0!==data.previousSpace&&(this.previousSpace=data.previousSpace),this.status=data.status,void 0!==data.mobileCheckInSpaceCategoryChanged&&(this.mobileCheckInSpaceCategoryChanged=data.mobileCheckInSpaceCategoryChanged),void 0!==data.mobileCheckInSpaceChanged&&(this.mobileCheckInSpaceChanged=data.mobileCheckInSpaceChanged),void 0!==data.mobileCheckInStatus&&(this.mobileCheckInStatus=data.mobileCheckInStatus),void 0!==data.mobileCheckInStatusMessage&&(this.mobileCheckInStatusMessage=data.mobileCheckInStatusMessage),void 0!==data.confirmationNumber&&(this.confirmationNumber=data.confirmationNumber),void 0!==data.expectedCheckInDateTime&&(this.expectedCheckInDateTime=data.expectedCheckInDateTime),this.checkInDateTime=data.checkInDateTime,this.checkOutDateTime=data.checkOutDateTime,void 0!==data.adultCount&&(this.adultCount=data.adultCount),void 0!==data.childCount&&(this.childCount=data.childCount),void 0!==data.spaceCategoryAvailabilites&&(this.spaceCategoryAvailabilites=data.spaceCategoryAvailabilites),void 0!==data.revenue&&(this.revenue=data.revenue),void 0!==data.rateSuppressed&&(this.rateSuppressed=data.rateSuppressed),void 0!==data.payment&&(this.payment=data.payment),void 0!==data.company&&(this.company=data.company),void 0!==data.travelAgent&&(this.travelAgent=data.travelAgent),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.metadata&&(this.metadata=data.metadata),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt)}checkInTime(tz){return new Date(this.checkInDateTime).toLocaleString("default",{hour:"numeric",minute:"numeric",timeZone:tz})}checkOutTime(tz){return new Date(this.checkOutDateTime).toLocaleString("default",{hour:"numeric",minute:"numeric",timeZone:tz})}getNights(){const start=new Date(this.checkInDateTime),end=new Date(this.checkOutDateTime);let nights=Math.round((end-start)/864e5);return nights<=0&&(nights=1),nights}};Object.defineProperty(Reservation.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"reservation.json",title:"Reservation",type:"object",required:["type","status","checkInDateTime","checkOutDateTime"],properties:{id:{$ref:"definitions.json#/definitions/id"},driver:{$ref:"definitions.json#/definitions/driver"},primaryGuest:{type:"string"},type:{type:"string",default:"reservation",enum:["reservation"]},sharedGuests:{type:"array",items:{type:"string"}},spaceCategory:{type:"string"},space:{type:["string","null"]},previousSpace:{type:["string","null"],default:null,description:"Used when there was a space assigned and it changes"},status:{type:"string",enum:["reserved","checkedIn","checkedOut","cancelled","noShow","enquired","requested","optional"],description:" reserved - confirmed by both parties, before check-in\n checkedIn - checked in\n checkedOut - checked out\n cancelled - Cancelled\n noShow - No show\n enquired - Confirmed neither by the customer nor enterprise\n requested - Confirmed by the customer but not the enterprise (waitlist)\n optional - Confirmed by the enterprise but not the customer (holding)"},mobileCheckInSpaceCategoryChanged:{type:"boolean",description:"spaceCategory has changed from original."},mobileCheckInSpaceChanged:{type:"boolean"},mobileCheckInStatus:{type:"string",enum:["ready","blocked","preArrivalStepsRequired","spaceNotAssigned","spaceNotReady","checkInTimeNotStarted"]},mobileCheckInStatusMessage:{type:"string"},confirmationNumber:{type:"string"},expectedCheckInDateTime:{type:["string","object"],format:"date-time",description:"Expected arrival time of guest."},checkInDateTime:{type:["string","object"],format:"date-time"},checkOutDateTime:{type:["string","object"],format:"date-time"},adultCount:{type:"number",default:1,minimum:1},childCount:{type:"number",default:0},spaceCategoryAvailabilites:{type:"array",items:{type:"object",properties:{id:{type:"string"},price:{type:"number"},unit:{type:"string",enum:["night","stay","hour"]},isUpgrade:{type:"boolean"}}}},revenue:{$ref:"definitions.json#/definitions/revenue"},rateSuppressed:{type:"boolean"},payment:{type:"string"},company:{type:"string"},travelAgent:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"},metadata:{$ref:"definitions.json#/definitions/metadata"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}}}),Object.defineProperty(Reservation.prototype,"validator",{get:__name((function(){return validateReservation}),"get")});var Room=class extends Entity{static{__name(this,"Room")}constructor(data){super(data),this.id=data.id,void 0!==data.type&&(this.type=data.type),this.name=data.name,void 0!==data.floor&&(this.floor=data.floor),void 0!==data.dimmers&&(this.dimmers=data.dimmers),void 0!==data.switches&&(this.switches=data.switches),void 0!==data.thermostats&&(this.thermostats=data.thermostats),void 0!==data.locks&&(this.locks=data.locks),void 0!==data.windowCoverings&&(this.windowCoverings=data.windowCoverings),void 0!==data.courtesy&&(this.courtesy=data.courtesy),void 0!==data.cameras&&(this.cameras=data.cameras),void 0!==data.mediaSources&&(this.mediaSources=data.mediaSources),void 0!==data.motionSensors&&(this.motionSensors=data.motionSensors),void 0!==data.alarms&&(this.alarms=data.alarms),void 0!==data.occupiedAt&&(this.occupiedAt=data.occupiedAt),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt)}static getDevicePath(type){switch(type){case"tv":case"dvr":case"appleTv":case"discPlayer":case"mediaPlayer":case"uncontrolledDevice":case"mediaSource":return"mediaSources";case"courtesy":return"courtesy";case"switch":return"switches";case"dimmer":return"dimmers";case"thermostat":return"thermostats";case"lock":return"locks";case"windowCovering":return"windowCoverings";case"camera":return"cameras";case"motionSensor":return"motionSensors";case"alarm":return"alarms";default:throw new Error("Invalid device type:"+type)}}static getDeviceTypeFromPath(path){if(!["dimmers","switches","thermostats","locks","windowCoverings","courtesy","cameras","mediaSources","motionSensors","alarms"].includes(path))throw new Error("Invalid device path:"+path);switch(path){case"courtesy":return path;case"switches":return"switch";default:return path.slice(0,-1)}}get hasDimmer(){return this.dimmers?.length>0}get hasSwitch(){return this.switches?.length>0}get hasWindowCovering(){return this.windowCoverings?.length>0}get hasShade(){return this.hasWindowCovering}get hasThermostat(){return this.thermostats?.length>0}get hasClimate(){return this.hasThermostat}get hasLock(){return this.locks?.length>0}get hasCourtesy(){return this.courtesy?.length>0}get hasCamera(){return this.cameras?.length>0}get hasMedia(){return this.mediaSources?.length>0}get hasLight(){const hasDiscriminatorLight=this.switches?.some((sw=>"light"===sw.discriminator||"fan"===sw.discriminator));return this.hasDimmer||hasDiscriminatorLight}get hasAlarm(){return this.alarms?.length>0}get occupied(){const now=new Date,lastOccupied=new Date(this.occupiedAt);return now.getTime()-lastOccupied.getTime()<36e5}};Object.defineProperty(Room.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"room.json",title:"Room",description:"A room represents a physical space of controllable IoT devices",type:"object",required:["id","name"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["room"],default:"room"},name:{type:"string"},floor:{type:"string"},dimmers:{type:"array",default:[],items:{$ref:"dimmer.json"}},switches:{type:"array",default:[],items:{$ref:"switch.json"}},thermostats:{type:"array",default:[],items:{$ref:"thermostat.json"}},locks:{type:"array",default:[],items:{$ref:"lock.json"}},windowCoverings:{type:"array",default:[],items:{$ref:"windowCovering.json"}},courtesy:{type:"array",default:[],items:{$ref:"courtesy.json"}},cameras:{type:"array",default:[],items:{$ref:"camera.json"}},mediaSources:{type:"array",default:[],items:{$ref:"mediaSource.json"}},motionSensors:{type:"array",default:[],items:{$ref:"motionSensor.json"}},alarms:{type:"array",default:[],items:{$ref:"alarm.json"}},occupiedAt:{$ref:"definitions.json#/definitions/createdAt"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}},additionalProperties:!1}}),Object.defineProperty(Room.prototype,"validator",{get:__name((function(){return validateRoom}),"get")});var Scene=class extends Entity{static{__name(this,"Scene")}constructor(data){super(data),this.id=data.id,this.name=data.name,void 0!==data.description&&(this.description=data.description),this.type=data.type,void 0!==data.devices&&(this.devices=data.devices),void 0!==data.isDefault&&(this.isDefault=data.isDefault),void 0!==data.showOnUi&&(this.showOnUi=data.showOnUi)}};Object.defineProperty(Scene.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"scene.json",title:"Scene",description:"A room represents a physical space of controllable IoT devices",type:"object",required:["id","name","type"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},description:{type:"string"},type:{type:"string",enum:["scene"],default:"scene"},devices:{type:"object",properties:{switches:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},state:{$ref:"switch.json#/properties/state"}},default:[]}},dimmers:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},level:{$ref:"dimmer.json#/properties/level"}}},default:[]},windowCoverings:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},position:{$ref:"windowCovering.json#/properties/position"}}},default:[]},thermostats:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},hvacMode:{$ref:"thermostat.json#/properties/hvacMode"},setpoints:{$ref:"thermostat.json#/properties/setpoints"},fanMode:{$ref:"thermostat.json#/properties/fanMode"},setpointDelta:{type:"number"}}},default:[]},mediaSources:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},volume:{type:"number",minimum:0,maximum:100},commands:{type:"array",items:{type:"string"}}}}},locks:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},state:{$ref:"lock.json#/properties/state"},mode:{$ref:"lock.json#/properties/mode"}}}}},additionalProperties:!1},isDefault:{type:"boolean",default:!1},showOnUi:{type:"boolean",default:!0}}}}),Object.defineProperty(Scene.prototype,"validator",{get:__name((function(){return validateScene}),"get")});var ShortLink=class extends Entity{static{__name(this,"ShortLink")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.title&&(this.title=data.title),this.destination=data.destination,this.url=data.url,void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(ShortLink.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"shortLink.json",title:"Short Link",type:"object",required:["destination","url"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"shortLink",enum:["shortLink"]},title:{type:"string"},destination:{type:"string",format:"uri"},url:{type:"string",format:"uri"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(ShortLink.prototype,"validator",{get:__name((function(){return validateShortLink}),"get")});var SmsMessage=class extends Entity{static{__name(this,"SmsMessage")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),this.to=data.to,this.from=data.from,void 0!==data.media&&(this.media=data.media),this.status=data.status,void 0!==data.body&&(this.body=data.body),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.appData&&(this.appData=data.appData),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(SmsMessage.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"smsMessage.json",title:"Sms Message",type:"object",required:["to","from","status"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"smsMessage",enum:["smsMessage","whatsappMessage"]},to:{type:"string"},from:{type:"string"},media:{type:"string",format:"uri"},status:{type:"string",enum:["queued","accepted","sending","sent","failed","delivered","undelivered","receiving","received","read"]},body:{type:"string"},driver:{type:"string"},appData:{type:"object"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(SmsMessage.prototype,"validator",{get:__name((function(){return validateSmsMessage}),"get")});var Space=class extends Entity{static{__name(this,"Space")}constructor(data){super(data),this.id=data.id,this.name=data.name,this.type=data.type,this.discriminator=data.discriminator,void 0!==data.driver&&(this.driver=data.driver),void 0!==data.category&&(this.category=data.category),void 0!==data.rooms&&(this.rooms=data.rooms),void 0!==data.subGroups&&(this.subGroups=data.subGroups),void 0!==data.occupied&&(this.occupied=data.occupied),void 0!==data.inUse&&(this.inUse=data.inUse),void 0!==data.eco&&(this.eco=data.eco),void 0!==data.features&&(this.features=data.features),void 0!==data.maximumOccupancy&&(this.maximumOccupancy=data.maximumOccupancy),void 0!==data.housekeepingStatus&&(this.housekeepingStatus=data.housekeepingStatus),void 0!==data.serviceStatus&&(this.serviceStatus=data.serviceStatus),void 0!==data.systemId&&(this.systemId=data.systemId)}get floor(){const floors=new Set;return this.rooms.forEach((room=>{room.floor&&floors.add(room.floor)})),1==floors.size?[...floors][0]:void 0}get hasDimmer(){return this.rooms.some((room=>room.hasDimmer))}get hasSwitch(){return this.rooms.some((room=>room.hasSwitch))}get hasWindowCovering(){return this.rooms.some((room=>room.hasWindowCovering))}get hasThermostat(){return this.rooms.some((room=>room.hasThermostat))}get hasLock(){return this.rooms.some((room=>room.hasLock))}get hasCourtesy(){return this.rooms.some((room=>room.hasCourtesy))}get hasCamera(){return this.rooms.some((room=>room.hasCamera))}get hasAlarm(){return this.rooms.some((room=>room.hasAlarm))}get hasMedia(){return this.rooms.some((room=>room.hasMedia))}};Object.defineProperty(Space.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"space.json",title:"Space",type:"object",required:["id","name","type","discriminator"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string",minLength:1},type:{type:"string",default:"space",enum:["space"]},discriminator:{type:"string",enum:["classRoom","hotelRoom","office","building","commonArea","conferenceRoom","lobby","gym","pool","restaurant","unit"]},driver:{$ref:"definitions.json#/definitions/driver"},category:{type:"string",description:"This is the category id"},rooms:{type:"array",items:{type:"string"}},subGroups:{type:"array",items:{type:"string"}},occupied:{type:"boolean"},inUse:{type:"boolean"},eco:{type:"object",additionalProperties:!1,default:{active:!1,allowed:!1,previousState:null},properties:{active:{type:"boolean",default:!1},activatedAt:{type:["string","object"],format:"date-time"},allowed:{type:"boolean",default:!1},previousState:{type:["object","null"],properties:{thermostats:{type:"object",patternProperties:{".*":{type:"object",properties:{setpoints:{$ref:"thermostat.json#/properties/setpoints"}}}}}},additionalProperties:!1}}},features:{type:"array",items:{type:"string",enum:["pet"]}},maximumOccupancy:{type:"number",minimum:1},housekeepingStatus:{type:"string",enum:["clean","dirty","inspected","pickup"]},serviceStatus:{type:"string",enum:["inService","outOfOrder","outOfService"]},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Space.prototype,"validator",{get:__name((function(){return validateSpace}),"get")});var Switch=class extends Entity{static{__name(this,"Switch")}constructor(data){super(data),this.id=data.id,void 0!==data.name&&(this.name=data.name),this.type=data.type,void 0!==data.discriminator&&(this.discriminator=data.discriminator),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),this.driver=data.driver,void 0!==data.offline&&(this.offline=data.offline),this.state=data.state,void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Switch.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"switch.json",title:"Switch",description:"Any smart switch",type:"object",required:["id","type","state","driver"],properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},discriminator:{type:"string",enum:["light","fan","irrigation"]},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},state:{type:"string",enum:["on","off"]},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}}}}),Object.defineProperty(Switch.prototype,"validator",{get:__name((function(){return validateSwitch}),"get")});var SystemUser=class extends Entity{static{__name(this,"SystemUser")}constructor(data){super(data),this.id=data.id,void 0!==data.type&&(this.type=data.type),void 0!==data.driver&&(this.driver=data.driver),this.firstName=data.firstName,this.lastName=data.lastName,void 0!==data.phone&&(this.phone=data.phone),void 0!==data.email&&(this.email=data.email),void 0!==data.address&&(this.address=data.address),void 0!==data.photo&&(this.photo=data.photo),void 0!==data.jobTitle&&(this.jobTitle=data.jobTitle),void 0!==data.dob&&(this.dob=data.dob),void 0!==data.gender&&(this.gender=data.gender),void 0!==data.roles&&(this.roles=data.roles),void 0!==data.nationality&&(this.nationality=data.nationality),void 0!==data.notes&&(this.notes=data.notes),void 0!==data.files&&(this.files=data.files),void 0!==data.identifications&&(this.identifications=data.identifications),void 0!==data.payments&&(this.payments=data.payments),void 0!==data.revenue&&(this.revenue=data.revenue),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(SystemUser.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"systemUser.json",title:"System User",description:"A system user is a user that originated from an external 3rd party system.",type:"object",required:["id","firstName","lastName"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"systemUser",enum:["systemUser"]},driver:{$ref:"definitions.json#/definitions/driver"},firstName:{type:"string"},lastName:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},email:{type:["string","null"],format:"email"},address:{$ref:"definitions.json#/definitions/address"},photo:{type:"string"},jobTitle:{type:"string"},dob:{type:"string"},gender:{type:"string",enum:["male","female"]},roles:{type:"array",items:{type:"string",enum:["Guest","User","Manager","Maintenance","Administrator","SuperAdmin"]}},nationality:{type:"string",minLength:2,maxLength:2},notes:{type:"array",items:{type:"string"}},files:{type:"array",items:{$ref:"mediaFile.json#"}},identifications:{type:"array",items:{$ref:"identification.json#"}},payments:{type:"array",items:{$ref:"payment.json#"}},revenue:{$ref:"definitions.json#/definitions/revenue"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(SystemUser.prototype,"validator",{get:__name((function(){return validateSystemUser}),"get")});var Thermostat=class extends Entity{static{__name(this,"Thermostat")}constructor(data){super(data),this.id=data.id,void 0!==data.name&&(this.name=data.name),this.type=data.type,this.driver=data.driver,void 0!==data.offline&&(this.offline=data.offline),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.currentTemperature&&(this.currentTemperature=data.currentTemperature),void 0!==data.currentHumidity&&(this.currentHumidity=data.currentHumidity),this.hvacMode=data.hvacMode,this.hvacState=data.hvacState,this.fanMode=data.fanMode,this.fanState=data.fanState,this.temperatureScale=data.temperatureScale,void 0!==data.humidityScale&&(this.humidityScale=data.humidityScale),this.supportedHvacModes=data.supportedHvacModes,this.supportedFanModes=data.supportedFanModes,this.setpoints=data.setpoints,void 0!==data.minAutoDelta&&(this.minAutoDelta=data.minAutoDelta),void 0!==data.cycleRate&&(this.cycleRate=data.cycleRate),void 0!==data.batteryLevel&&(this.batteryLevel=data.batteryLevel),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Thermostat.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"thermostat.json",title:"Thermostat",description:"Any smart thermostat",type:"object",required:["id","type","hvacMode","fanMode","hvacState","fanState","setpoints","temperatureScale","supportedHvacModes","supportedFanModes","driver"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},name:{$ref:"definitions.json#/definitions/name"},type:{$ref:"definitions.json#/definitions/type",default:"thermostat"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},currentTemperature:{type:"number"},currentHumidity:{type:"number",minimum:0},hvacMode:{type:"string",$ref:"#/properties/supportedHvacModes/items"},hvacState:{type:["string","null"],enum:["cooling","heating","off",null]},fanMode:{type:"string",$ref:"#/properties/supportedFanModes/items"},fanState:{type:["string","null"],enum:["off","low","medium","high","on",null]},temperatureScale:{type:"string",enum:["celsius","fahrenheit"],default:"fahrenheit"},humidityScale:{type:["string","null"],enum:["absolute","relative",null]},supportedHvacModes:{type:"array",uniqueItems:!0,minItems:2,items:{enum:["cool","heat","auto","off"]}},supportedFanModes:{type:"array",uniqueItems:!0,items:{enum:["auto","low","medium","high","off","on"]}},setpoints:{type:"object",additionalProperties:!1,properties:{cool:{$ref:"#/$defs/setpoint"},heat:{$ref:"#/$defs/setpoint"},auto:{$ref:"#/$defs/setpoint"}}},minAutoDelta:{type:"number",default:3},cycleRate:{type:"number"},batteryLevel:{$ref:"definitions.json#/definitions/batteryLevel"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},$defs:{setpoint:{type:"object",additionalProperties:!1,properties:{value:{$ref:"#/$defs/setpointValue"},min:{$ref:"#/$defs/setpointMinMax"},max:{$ref:"#/$defs/setpointMinMax"}}},setpointValue:{type:"number",minimum:0,maximum:99},setpointMinMax:{type:["number","null"],minimum:0,maximum:99}}}}),Object.defineProperty(Thermostat.prototype,"validator",{get:__name((function(){return validateThermostat}),"get")});var Ticket=class extends Entity{static{__name(this,"Ticket")}constructor(data){super(data),this.id=data.id,void 0!==data.type&&(this.type=data.type),void 0!==data.number&&(this.number=data.number),void 0!==data.issueId&&(this.issueId=data.issueId),this.conversation=data.conversation,void 0!==data.subject&&(this.subject=data.subject),void 0!==data.openedBy&&(this.openedBy=data.openedBy),this.requester=data.requester,void 0!==data.assignedTo&&(this.assignedTo=data.assignedTo),void 0!==data.notify&&(this.notify=data.notify),void 0!==data.collaborators&&(this.collaborators=data.collaborators),void 0!==data.location&&(this.location=data.location),this.status=data.status,void 0!==data.priority&&(this.priority=data.priority),this.tags=data.tags,void 0!==data.department&&(this.department=data.department),void 0!==data.rating&&(this.rating=data.rating),void 0!==data.ratingComment&&(this.ratingComment=data.ratingComment),void 0!==data.tipAmount&&(this.tipAmount=data.tipAmount),void 0!==data.autoCloseAt&&(this.autoCloseAt=data.autoCloseAt),void 0!==data.scheduleDate&&(this.scheduleDate=data.scheduleDate),this.createdAt=data.createdAt,this.updatedAt=data.updatedAt,void 0!==data.solvedAt&&(this.solvedAt=data.solvedAt),void 0!==data.closedAt&&(this.closedAt=data.closedAt)}};Object.defineProperty(Ticket.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"ticket.json",title:"Ticket",description:"A ticket is a request from a user.",type:"object",required:["id","conversation","requester","status","tags","createdAt","updatedAt"],additionalProperties:!1,properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["ticket"],default:"ticket"},number:{type:"string"},issueId:{type:"string"},conversation:{type:"array",default:[],items:{type:"object",additionalProperties:!1,required:["id","discriminator","timestamp","body"],properties:{id:{type:"string"},discriminator:{type:"string",enum:["message","opened","assigned","rated","tipped","scheduled","collaboratorAdded","collaboratorRemoved","statusChanged","priorityChanged","scheduleDateChanged","locationChanged"],default:"message"},userId:{type:"string"},userName:{type:"string"},vendorId:{type:"string"},vendorName:{type:"string"},systemId:{type:"string"},systemName:{type:"string"},timestamp:{$ref:"definitions.json#/definitions/createdAt"},body:{type:"string"},parsedBody:{type:"object",additionalProperties:!1,properties:{text:{type:"string"},mentions:{type:"array",default:[],items:{type:"object",additionalProperties:!1,required:["discriminator","id","index","length","originalText"],properties:{id:{type:"string"},discriminator:{type:"string",enum:["user","vendor","system"]},index:{type:"integer"},length:{type:"integer"},originalText:{type:"string"}}}}}},readBy:{type:"array",default:[],items:{type:"string"}},media:{anyOf:[{$ref:"mediaFile.json"},{type:"null"}]}}}},subject:{type:"string"},openedBy:{type:"object",properties:{userId:{type:"string"},userName:{type:"string"},systemId:{type:"string"},systemName:{type:"string"}}},requester:{type:"object",properties:{systemId:{type:"string"},systemName:{type:"string"},systemPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},userId:{type:"string"},userName:{type:"string"},userPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},deviceId:{type:"string"},roomId:{type:"string"},reservationId:{type:"string"},spaceId:{type:"string"},spaceName:{type:"string"}}},assignedTo:{type:"object",properties:{userId:{type:"string"},userName:{type:"string"},userPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},vendorId:{type:"string"},vendorName:{type:"string"},vendorPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]}}},notify:{type:"array",description:"A list of entities to notify when this ticket is created or resolved.",default:[],items:{type:"object",required:["id","discriminator"],additionalProperties:!1,properties:{id:{type:"string",description:"The ID of the entity to notify."},discriminator:{type:"string",enum:["user"]}}}},collaborators:{type:"array",default:[],items:{type:"object",required:["id","name","discriminator"],additionalProperties:!1,properties:{id:{type:"string"},name:{type:"string"},discriminator:{type:"string",enum:["user","vendor"]}}}},location:{type:"object",required:["discriminator","name"],additionalProperties:!1,properties:{id:{type:"string"},discriminator:{type:"string",enum:["space","room","property","customText"]},name:{type:"string"}}},status:{type:"string",enum:["open","pending","solved","closed"],default:"open"},priority:{type:"string",enum:["low","normal","high"],default:"normal"},tags:{type:"array",default:[],items:{type:"string"}},department:{type:"string"},rating:{type:"number",minimum:0,maximum:5},ratingComment:{type:"string"},tipAmount:{type:"string"},autoCloseAt:{$ref:"definitions.json#/definitions/date"},scheduleDate:{$ref:"definitions.json#/definitions/date"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},solvedAt:{$ref:"definitions.json#/definitions/date"},closedAt:{$ref:"definitions.json#/definitions/date"}}}}),Object.defineProperty(Ticket.prototype,"validator",{get:__name((function(){return validateTicket}),"get")});var TimeSheet=class extends Entity{static{__name(this,"TimeSheet")}constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),this.userId=data.userId,this.day=data.day,void 0!==data.locked&&(this.locked=data.locked),void 0!==data.timeEntries&&(this.timeEntries=data.timeEntries)}};Object.defineProperty(TimeSheet.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"timeSheet.json",title:"Time Sheet",type:"object",required:["userId","day"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"timeSheet",enum:["timeSheet"]},userId:{$ref:"definitions.json#/definitions/id"},day:{type:["string","object"],format:"date-time"},locked:{type:"boolean",default:!1,description:"If true, the time sheet is locked and cannot be modified"},timeEntries:{type:"array",default:[],items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},discriminator:{type:"string",enum:["working","driving","meeting","break"]},start:{type:["string","object"],format:"date-time"},end:{type:["string","object"],format:"date-time"},comment:{type:"string"},ticketId:{type:"string"}},required:["start","discriminator"],additionalProperties:!1}}}}}),Object.defineProperty(TimeSheet.prototype,"validator",{get:__name((function(){return validateTimeSheet}),"get")});var User=class extends Entity{static{__name(this,"User")}constructor(data){super(data),this.id=data.id,void 0!==data.type&&(this.type=data.type),this.firstName=data.firstName,this.lastName=data.lastName,void 0!==data.phone&&(this.phone=data.phone),void 0!==data.phoneVerified&&(this.phoneVerified=data.phoneVerified),void 0!==data.email&&(this.email=data.email),void 0!==data.emailVerified&&(this.emailVerified=data.emailVerified),void 0!==data.whatsapp&&(this.whatsapp=data.whatsapp),void 0!==data.whatsappVerified&&(this.whatsappVerified=data.whatsappVerified),void 0!==data.address&&(this.address=data.address),void 0!==data.secretKey&&(this.secretKey=data.secretKey),void 0!==data.photo&&(this.photo=data.photo),void 0!==data.jobTitle&&(this.jobTitle=data.jobTitle),void 0!==data.dob&&(this.dob=data.dob),void 0!==data.gender&&(this.gender=data.gender),void 0!==data.nationality&&(this.nationality=data.nationality),void 0!==data.permissions&&(this.permissions=data.permissions),void 0!==data.preferences&&(this.preferences=data.preferences),void 0!==data.notes&&(this.notes=data.notes),void 0!==data.files&&(this.files=data.files),void 0!==data.identifications&&(this.identifications=data.identifications),void 0!==data.payments&&(this.payments=data.payments),void 0!==data.location&&(this.location=data.location),void 0!==data.reservations&&(this.reservations=data.reservations),void 0!==data.spaceName&&(this.spaceName=data.spaceName),void 0!==data.revenue&&(this.revenue=data.revenue),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt),void 0!==data.systems&&(this.systems=data.systems)}get fullName(){return`${this.firstName} ${this.lastName}`}get roles(){const roles=new Set;if(this.permissions)for(const permission of this.permissions)roles.add(permission.role);return Array.from(roles)}get isSuperAdmin(){return this.roles.includes("SuperAdmin")}get isAdmin(){return this.roles.includes("Admin")||this.roles.includes("Administrator")}get isManager(){return this.roles.includes("Manager")}get isUser(){return this.roles.includes("User")}};Object.defineProperty(User.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"user.json",title:"User",type:"object",required:["id","firstName","lastName"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"user"},firstName:{type:"string"},lastName:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},phoneVerified:{type:"boolean"},email:{type:["string","null"],format:"email"},emailVerified:{type:"boolean"},whatsapp:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},whatsappVerified:{type:"boolean"},address:{$ref:"definitions.json#/definitions/address"},secretKey:{type:"string"},photo:{$ref:"mediaFile.json#"},jobTitle:{type:"string"},dob:{type:"string"},gender:{type:"string",enum:["male","female"]},nationality:{type:"string",minLength:2,maxLength:2},permissions:{type:"array",default:[],items:{type:"object",required:["organizationId","propertyId","role"],properties:{organizationId:{type:"string",description:"The ID of the organization the permission is applies to."},propertyId:{type:"string",description:"The ID of the property the permission is applies to."},role:{type:"string",enum:["Guest","User","Agent","Manager","Maintenance","Administrator","SuperAdmin"]},timeTrackingEnabled:{type:"boolean",description:"Whether time tracking is enabled for this role."},department:{type:"string",description:"The department the user belongs to."},policyIds:{type:"array",items:{type:"string",description:"ID of a policy that is applied to this role."}},policies:{type:"array",items:{description:"A policy object populated from the policyIds array.",$ref:"policy.json"}}},additionalProperties:!1}},preferences:{type:"array",items:{type:"object",additionalProperties:!1,required:["organizationId","propertyId"],properties:{organizationId:{type:"string"},propertyId:{type:"string"},notifications:{type:"array",items:{type:"object",additionalProperties:!1,required:["discriminator","enabled"],properties:{discriminator:{type:"string",enum:["observerTicketCreated","observerTicketResolved"]},enabled:{type:"boolean"}}}}}}},notes:{type:"array",items:{type:"string"}},files:{type:"array",items:{$ref:"mediaFile.json#"}},identifications:{type:"array",items:{$ref:"identification.json#"}},payments:{type:"array",items:{$ref:"payment.json#"}},location:{type:"object",required:["accuracy","latitude","longitude","timestamp"],additionalProperties:!1,properties:{accuracy:{type:["number","null"]},latitude:{type:["number","null"]},longitude:{type:["number","null"]},timestamp:{type:["number","null"]}}},reservations:{type:"array",items:{$ref:"reservation.json"}},spaceName:{type:"string"},revenue:{$ref:"definitions.json#/definitions/revenue"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"},systems:{type:"array",default:[],items:{type:"object",properties:{systemId:{type:"string"},propertyId:{type:"string"},driver:{type:"string"}},required:["systemId","propertyId","driver"],additionalProperties:!1}}}}}),Object.defineProperty(User.prototype,"validator",{get:__name((function(){return validateUser}),"get")});var Vendor=class extends Entity{static{__name(this,"Vendor")}constructor(data){super(data),this.id=data.id,void 0!==data.type&&(this.type=data.type),this.name=data.name,void 0!==data.phone&&(this.phone=data.phone),this.email=data.email,void 0!==data.address&&(this.address=data.address),void 0!==data.photo&&(this.photo=data.photo),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt)}};Object.defineProperty(Vendor.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"vendor.json",title:"Vendor",type:"object",required:["id","name","email"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"vendor",enum:["vendor"]},name:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},email:{type:["string","null"],format:"email"},address:{$ref:"definitions.json#/definitions/address"},photo:{$ref:"mediaFile.json#"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}}}),Object.defineProperty(Vendor.prototype,"validator",{get:__name((function(){return validateVendor}),"get")});var WindowCovering=class extends Entity{static{__name(this,"WindowCovering")}constructor(data){super(data),this.id=data.id,void 0!==data.name&&(this.name=data.name),this.type=data.type,void 0!==data.discriminator&&(this.discriminator=data.discriminator),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),this.driver=data.driver,void 0!==data.offline&&(this.offline=data.offline),this.position=data.position,void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};function entityFactory(type){switch(type){case"reservation":return Reservation;case"mediaFile":return MediaFile;case"switch":return Switch;case"alarm":return Alarm;case"dimmer":return Dimmer;case"lock":return Lock;case"thermostat":return Thermostat;case"windowCovering":return WindowCovering;case"identification":return Identification;case"user":return User;case"systemUser":return SystemUser;case"policy":return Policy;case"courtesy":return Courtesy;case"camera":return Camera;case"motionSensor":return MotionSensor;case"mediaSource":return MediaSource;case"room":return Room;case"space":return Space;case"category":return Category;case"ticket":return Ticket;case"scene":return Scene;case"gateway":return Gateway;case"product":return Product;case"order":return Order;case"discoveredDevice":return DiscoveredDevice;case"deviceRouter":return DeviceRouter;case"credential":return Credential;case"shortLink":return ShortLink;case"energyReportShard":return EnergyReportShard;case"energyReport":return EnergyReport;case"smsMessage":return SmsMessage;case"emailMessage":return EmailMessage;case"announcement":return Announcement;case"timeSheet":return TimeSheet;case"property":return Property;case"organization":return Organization;case"issue":return Issue;case"vendor":return Vendor;case"log":return Log;default:throw new Error("Unknown entity type: "+type)}}function errorFactory(errName){switch(errName){case"AppError":return AppError;case"AuthenticationError":return AuthenticationError;case"AuthorizationError":return AuthorizationError;case"ConflictError":return ConflictError;case"DeviceCommError":return DeviceCommError;case"LoginError":return LoginError;case"NotFoundError":return NotFoundError;case"RequestError":return RequestError;case"SystemCommError":return SystemCommError;case"TokenExpiredError":return TokenExpiredError;case"UnprocessableRequestError":return UnprocessableRequestError;case"ValidationError":return ValidationError;default:return new Error("Invalid error name: "+errName)}}function eventFactory(eventName){const Event2=Object.values(events_exports).find((E=>E.prototype.name===eventName));if(!Event2)throw new Error("Invalid event name: "+eventName);return Event2}Object.defineProperty(WindowCovering.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"windowCovering.json",title:"Window Covering",description:"Any smart window covering",required:["id","type","position","driver"],additionalProperties:!1,type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type",default:"windowCovering"},discriminator:{type:"string",enum:["basic","variable"],default:"variable"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},position:{type:["number","null"],minimum:0,maximum:100},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}}}}),Object.defineProperty(WindowCovering.prototype,"validator",{get:__name((function(){return validateWindowCovering}),"get")}),__name(entityFactory,"entityFactory"),__name(errorFactory,"errorFactory"),__name(eventFactory,"eventFactory");//# sourceMappingURL=utils.cjs.map
|