@zwave-js/nvmedit 14.0.0-beta.4 → 14.0.0

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.
Files changed (49) hide show
  1. package/build/cjs/lib/nvm3/files/ApplicationCCsFile.js +105 -58
  2. package/build/cjs/lib/nvm3/files/ApplicationCCsFile.js.map +2 -2
  3. package/build/cjs/lib/nvm3/files/ApplicationDataFile.js +69 -22
  4. package/build/cjs/lib/nvm3/files/ApplicationDataFile.js.map +2 -2
  5. package/build/cjs/lib/nvm3/files/ApplicationNameFile.js +71 -24
  6. package/build/cjs/lib/nvm3/files/ApplicationNameFile.js.map +2 -2
  7. package/build/cjs/lib/nvm3/files/ApplicationRFConfigFile.js +140 -93
  8. package/build/cjs/lib/nvm3/files/ApplicationRFConfigFile.js.map +2 -2
  9. package/build/cjs/lib/nvm3/files/ApplicationTypeFile.js +92 -45
  10. package/build/cjs/lib/nvm3/files/ApplicationTypeFile.js.map +2 -2
  11. package/build/cjs/lib/nvm3/files/ControllerInfoFile.js +176 -129
  12. package/build/cjs/lib/nvm3/files/ControllerInfoFile.js.map +2 -2
  13. package/build/cjs/lib/nvm3/files/NVMFile.d.ts +3 -3
  14. package/build/cjs/lib/nvm3/files/NVMFile.js.map +1 -1
  15. package/build/cjs/lib/nvm3/files/NodeInfoFiles.js +186 -111
  16. package/build/cjs/lib/nvm3/files/NodeInfoFiles.js.map +2 -2
  17. package/build/cjs/lib/nvm3/files/ProtocolNodeMaskFiles.js +243 -84
  18. package/build/cjs/lib/nvm3/files/ProtocolNodeMaskFiles.js.map +2 -2
  19. package/build/cjs/lib/nvm3/files/RouteCacheFiles.js +143 -82
  20. package/build/cjs/lib/nvm3/files/RouteCacheFiles.js.map +2 -2
  21. package/build/cjs/lib/nvm3/files/SUCUpdateEntriesFile.js +134 -73
  22. package/build/cjs/lib/nvm3/files/SUCUpdateEntriesFile.js.map +2 -2
  23. package/build/cjs/lib/nvm3/files/VersionFiles.js +98 -23
  24. package/build/cjs/lib/nvm3/files/VersionFiles.js.map +2 -2
  25. package/build/esm/lib/nvm3/files/ApplicationCCsFile.js +106 -66
  26. package/build/esm/lib/nvm3/files/ApplicationCCsFile.js.map +1 -1
  27. package/build/esm/lib/nvm3/files/ApplicationDataFile.js +63 -23
  28. package/build/esm/lib/nvm3/files/ApplicationDataFile.js.map +1 -1
  29. package/build/esm/lib/nvm3/files/ApplicationNameFile.js +66 -26
  30. package/build/esm/lib/nvm3/files/ApplicationNameFile.js.map +1 -1
  31. package/build/esm/lib/nvm3/files/ApplicationRFConfigFile.js +137 -97
  32. package/build/esm/lib/nvm3/files/ApplicationRFConfigFile.js.map +1 -1
  33. package/build/esm/lib/nvm3/files/ApplicationTypeFile.js +87 -47
  34. package/build/esm/lib/nvm3/files/ApplicationTypeFile.js.map +1 -1
  35. package/build/esm/lib/nvm3/files/ControllerInfoFile.js +172 -132
  36. package/build/esm/lib/nvm3/files/ControllerInfoFile.js.map +1 -1
  37. package/build/esm/lib/nvm3/files/NVMFile.d.ts +3 -3
  38. package/build/esm/lib/nvm3/files/NVMFile.d.ts.map +1 -1
  39. package/build/esm/lib/nvm3/files/NodeInfoFiles.js +191 -127
  40. package/build/esm/lib/nvm3/files/NodeInfoFiles.js.map +1 -1
  41. package/build/esm/lib/nvm3/files/ProtocolNodeMaskFiles.js +221 -85
  42. package/build/esm/lib/nvm3/files/ProtocolNodeMaskFiles.js.map +1 -1
  43. package/build/esm/lib/nvm3/files/RouteCacheFiles.js +143 -91
  44. package/build/esm/lib/nvm3/files/RouteCacheFiles.js.map +1 -1
  45. package/build/esm/lib/nvm3/files/SUCUpdateEntriesFile.js +126 -74
  46. package/build/esm/lib/nvm3/files/SUCUpdateEntriesFile.js.map +1 -1
  47. package/build/esm/lib/nvm3/files/VersionFiles.js +87 -23
  48. package/build/esm/lib/nvm3/files/VersionFiles.js.map +1 -1
  49. package/package.json +3 -3
@@ -1,77 +1,117 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
2
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
3
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
4
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
5
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
6
+ var _, done = false;
7
+ for (var i = decorators.length - 1; i >= 0; i--) {
8
+ var context = {};
9
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
10
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
11
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
12
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
13
+ if (kind === "accessor") {
14
+ if (result === void 0) continue;
15
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
16
+ if (_ = accept(result.get)) descriptor.get = _;
17
+ if (_ = accept(result.set)) descriptor.set = _;
18
+ if (_ = accept(result.init)) initializers.unshift(_);
19
+ }
20
+ else if (_ = accept(result)) {
21
+ if (kind === "field") initializers.unshift(_);
22
+ else descriptor[key] = _;
23
+ }
24
+ }
25
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
26
+ done = true;
27
+ };
28
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
29
+ var useValue = arguments.length > 2;
30
+ for (var i = 0; i < initializers.length; i++) {
31
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
32
+ }
33
+ return useValue ? value : void 0;
6
34
  };
7
35
  import { CommandClasses } from "@zwave-js/core/safe";
8
36
  import { Bytes } from "@zwave-js/shared/safe";
9
37
  import { NVMFile, gotDeserializationOptions, nvmFileID, nvmSection, } from "./NVMFile.js";
10
38
  const MAX_CCs = 35;
11
39
  export const ApplicationCCsFileID = 103;
12
- let ApplicationCCsFile = class ApplicationCCsFile extends NVMFile {
13
- constructor(options) {
14
- super(options);
15
- if (gotDeserializationOptions(options)) {
16
- let offset = 0;
17
- let numCCs = this.payload[offset];
18
- this.includedInsecurely = [
19
- ...this.payload.subarray(offset + 1, offset + 1 + numCCs),
20
- ];
21
- offset += MAX_CCs;
22
- numCCs = this.payload[offset];
23
- this.includedSecurelyInsecureCCs = [
24
- ...this.payload.subarray(offset + 1, offset + 1 + numCCs),
25
- ];
26
- offset += MAX_CCs;
27
- numCCs = this.payload[offset];
28
- this.includedSecurelySecureCCs = [
29
- ...this.payload.subarray(offset + 1, offset + 1 + numCCs),
30
- ];
40
+ let ApplicationCCsFile = (() => {
41
+ let _classDecorators = [nvmFileID(ApplicationCCsFileID), nvmSection("application")];
42
+ let _classDescriptor;
43
+ let _classExtraInitializers = [];
44
+ let _classThis;
45
+ let _classSuper = NVMFile;
46
+ var ApplicationCCsFile = class extends _classSuper {
47
+ static { _classThis = this; }
48
+ static {
49
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
50
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
51
+ ApplicationCCsFile = _classThis = _classDescriptor.value;
52
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
53
+ __runInitializers(_classThis, _classExtraInitializers);
31
54
  }
32
- else {
33
- this.includedInsecurely = options.includedInsecurely;
34
- this.includedSecurelyInsecureCCs =
35
- options.includedSecurelyInsecureCCs;
36
- this.includedSecurelySecureCCs = options.includedSecurelySecureCCs;
55
+ constructor(options) {
56
+ super(options);
57
+ if (gotDeserializationOptions(options)) {
58
+ let offset = 0;
59
+ let numCCs = this.payload[offset];
60
+ this.includedInsecurely = [
61
+ ...this.payload.subarray(offset + 1, offset + 1 + numCCs),
62
+ ];
63
+ offset += MAX_CCs;
64
+ numCCs = this.payload[offset];
65
+ this.includedSecurelyInsecureCCs = [
66
+ ...this.payload.subarray(offset + 1, offset + 1 + numCCs),
67
+ ];
68
+ offset += MAX_CCs;
69
+ numCCs = this.payload[offset];
70
+ this.includedSecurelySecureCCs = [
71
+ ...this.payload.subarray(offset + 1, offset + 1 + numCCs),
72
+ ];
73
+ }
74
+ else {
75
+ this.includedInsecurely = options.includedInsecurely;
76
+ this.includedSecurelyInsecureCCs =
77
+ options.includedSecurelyInsecureCCs;
78
+ this.includedSecurelySecureCCs = options.includedSecurelySecureCCs;
79
+ }
37
80
  }
38
- }
39
- includedInsecurely;
40
- includedSecurelyInsecureCCs;
41
- includedSecurelySecureCCs;
42
- serialize() {
43
- this.payload = new Bytes((1 + MAX_CCs) * 3);
44
- let offset = 0;
45
- for (const array of [
46
- this.includedInsecurely,
47
- this.includedSecurelyInsecureCCs,
48
- this.includedSecurelySecureCCs,
49
- ]) {
50
- this.payload[offset] = array.length;
51
- this.payload.set(array, offset + 1);
52
- offset += 1 + MAX_CCs;
81
+ includedInsecurely;
82
+ includedSecurelyInsecureCCs;
83
+ includedSecurelySecureCCs;
84
+ serialize() {
85
+ this.payload = new Bytes((1 + MAX_CCs) * 3);
86
+ let offset = 0;
87
+ for (const array of [
88
+ this.includedInsecurely,
89
+ this.includedSecurelyInsecureCCs,
90
+ this.includedSecurelySecureCCs,
91
+ ]) {
92
+ this.payload[offset] = array.length;
93
+ this.payload.set(array, offset + 1);
94
+ offset += 1 + MAX_CCs;
95
+ }
96
+ return super.serialize();
53
97
  }
54
- return super.serialize();
55
- }
56
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
57
- toJSON() {
58
- return {
59
- ...super.toJSON(),
60
- "included insecurely": this.includedInsecurely
61
- .map((cc) => CommandClasses[cc])
62
- .join(", "),
63
- "included securely (insecure)": this.includedSecurelyInsecureCCs
64
- .map((cc) => CommandClasses[cc])
65
- .join(", "),
66
- "included securely (secure)": this.includedSecurelySecureCCs
67
- .map((cc) => CommandClasses[cc])
68
- .join(", "),
69
- };
70
- }
71
- };
72
- ApplicationCCsFile = __decorate([
73
- nvmFileID(ApplicationCCsFileID),
74
- nvmSection("application")
75
- ], ApplicationCCsFile);
98
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
99
+ toJSON() {
100
+ return {
101
+ ...super.toJSON(),
102
+ "included insecurely": this.includedInsecurely
103
+ .map((cc) => CommandClasses[cc])
104
+ .join(", "),
105
+ "included securely (insecure)": this.includedSecurelyInsecureCCs
106
+ .map((cc) => CommandClasses[cc])
107
+ .join(", "),
108
+ "included securely (secure)": this.includedSecurelySecureCCs
109
+ .map((cc) => CommandClasses[cc])
110
+ .join(", "),
111
+ };
112
+ }
113
+ };
114
+ return ApplicationCCsFile = _classThis;
115
+ })();
76
116
  export { ApplicationCCsFile };
77
117
  //# sourceMappingURL=ApplicationCCsFile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ApplicationCCsFile.js","sourceRoot":"","sources":["../../../../../src/lib/nvm3/files/ApplicationCCsFile.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAE9C,OAAO,EACN,OAAO,EAGP,yBAAyB,EACzB,SAAS,EACT,UAAU,GACV,MAAM,cAAc,CAAC;AAQtB,MAAM,OAAO,GAA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AC,EAAE,CAAC,CAAC;qBAC/B,IAAI,CAAC,IAAI,CAAC;gBACZ,8BAA8B,EAAE,IAAI,CAAC,2BAA2B;qBAC9D,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;qBAC/B,IAAI,CAAC,IAAI,CAAC;gBACZ,4BAA4B,EAAE,IAAI,CAAC,yBAAyB;qBAC1D,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;qBAC/B,IAAI,CAAC,IAAI,CAAC;aACZ,CAAC;QACH,CAAC;;;;SAjEW,kBAAkB"}
@@ -1,29 +1,69 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { NVMFile, gotDeserializationOptions, nvmFileID, nvmSection, } from "./NVMFile.js";
8
- export const ApplicationDataFileID = 200;
9
- let ApplicationDataFile = class ApplicationDataFile extends NVMFile {
10
- constructor(options) {
11
- super(options);
12
- if (!gotDeserializationOptions(options)) {
13
- this.payload = options.applicationData;
1
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
2
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
3
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
4
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
5
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
6
+ var _, done = false;
7
+ for (var i = decorators.length - 1; i >= 0; i--) {
8
+ var context = {};
9
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
10
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
11
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
12
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
13
+ if (kind === "accessor") {
14
+ if (result === void 0) continue;
15
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
16
+ if (_ = accept(result.get)) descriptor.get = _;
17
+ if (_ = accept(result.set)) descriptor.set = _;
18
+ if (_ = accept(result.init)) initializers.unshift(_);
19
+ }
20
+ else if (_ = accept(result)) {
21
+ if (kind === "field") initializers.unshift(_);
22
+ else descriptor[key] = _;
14
23
  }
15
24
  }
16
- // Just binary data
17
- get applicationData() {
18
- return this.payload;
19
- }
20
- set applicationData(value) {
21
- this.payload = value;
25
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
26
+ done = true;
27
+ };
28
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
29
+ var useValue = arguments.length > 2;
30
+ for (var i = 0; i < initializers.length; i++) {
31
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
22
32
  }
33
+ return useValue ? value : void 0;
23
34
  };
24
- ApplicationDataFile = __decorate([
25
- nvmFileID(ApplicationDataFileID),
26
- nvmSection("application")
27
- ], ApplicationDataFile);
35
+ import { NVMFile, gotDeserializationOptions, nvmFileID, nvmSection, } from "./NVMFile.js";
36
+ export const ApplicationDataFileID = 200;
37
+ let ApplicationDataFile = (() => {
38
+ let _classDecorators = [nvmFileID(ApplicationDataFileID), nvmSection("application")];
39
+ let _classDescriptor;
40
+ let _classExtraInitializers = [];
41
+ let _classThis;
42
+ let _classSuper = NVMFile;
43
+ var ApplicationDataFile = class extends _classSuper {
44
+ static { _classThis = this; }
45
+ static {
46
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
47
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
48
+ ApplicationDataFile = _classThis = _classDescriptor.value;
49
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
50
+ __runInitializers(_classThis, _classExtraInitializers);
51
+ }
52
+ constructor(options) {
53
+ super(options);
54
+ if (!gotDeserializationOptions(options)) {
55
+ this.payload = options.applicationData;
56
+ }
57
+ }
58
+ // Just binary data
59
+ get applicationData() {
60
+ return this.payload;
61
+ }
62
+ set applicationData(value) {
63
+ this.payload = value;
64
+ }
65
+ };
66
+ return ApplicationDataFile = _classThis;
67
+ })();
28
68
  export { ApplicationDataFile };
29
69
  //# sourceMappingURL=ApplicationDataFile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ApplicationDataFile.js","sourceRoot":"","sources":["../../../../../src/lib/nvm3/files/ApplicationDataFile.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EACN,OAAO,EAGP,yBAAyB,EACzB,SAAS,EACT,UAAU,GACV,MAAM,cAAc,CAAC;AAMtB,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAIlC,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,OAAO;IAC/C,YACC,OAAmE;QAEnE,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,yBAAyB,CAAC,OAAO,CAAC,EAAE,CAAC;YACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC;QACxC,CAAC;IACF,CAAC;IAED,mBAAmB;IACnB,IAAW,eAAe;QACzB,OAAO,IAAI,CAAC,OAAO,CAAC;IACrB,CAAC;IACD,IAAW,eAAe,CAAC,KAAY;QACtC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACtB,CAAC;CACD,CAAA;AAjBY,mBAAmB;IAF/B,SAAS,CAAC,qBAAqB,CAAC;IAChC,UAAU,CAAC,aAAa,CAAC;GACb,mBAAmB,CAiB/B"}
1
+ {"version":3,"file":"ApplicationDataFile.js","sourceRoot":"","sources":["../../../../../src/lib/nvm3/files/ApplicationDataFile.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EACN,OAAO,EAGP,yBAAyB,EACzB,SAAS,EACT,UAAU,GACV,MAAM,cAAc,CAAC;AAMtB,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;IAI5B,mBAAmB;4BAF/B,SAAS,CAAC,qBAAqB,CAAC,EAChC,UAAU,CAAC,aAAa,CAAC;;;;sBACe,OAAO;mCAAf,SAAQ,WAAO;;;;YAAhD,6KAiBC;;;YAjBY,uDAAmB;;QAC/B,YACC,OAAmE;YAEnE,KAAK,CAAC,OAAO,CAAC,CAAC;YACf,IAAI,CAAC,yBAAyB,CAAC,OAAO,CAAC,EAAE,CAAC;gBACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC;YACxC,CAAC;QACF,CAAC;QAED,mBAAmB;QACnB,IAAW,eAAe;YACzB,OAAO,IAAI,CAAC,OAAO,CAAC;QACrB,CAAC;QACD,IAAW,eAAe,CAAC,KAAY;YACtC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACtB,CAAC;;;;SAhBW,mBAAmB"}
@@ -1,34 +1,74 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
2
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
3
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
4
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
5
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
6
+ var _, done = false;
7
+ for (var i = decorators.length - 1; i >= 0; i--) {
8
+ var context = {};
9
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
10
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
11
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
12
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
13
+ if (kind === "accessor") {
14
+ if (result === void 0) continue;
15
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
16
+ if (_ = accept(result.get)) descriptor.get = _;
17
+ if (_ = accept(result.set)) descriptor.set = _;
18
+ if (_ = accept(result.init)) initializers.unshift(_);
19
+ }
20
+ else if (_ = accept(result)) {
21
+ if (kind === "field") initializers.unshift(_);
22
+ else descriptor[key] = _;
23
+ }
24
+ }
25
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
26
+ done = true;
27
+ };
28
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
29
+ var useValue = arguments.length > 2;
30
+ for (var i = 0; i < initializers.length; i++) {
31
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
32
+ }
33
+ return useValue ? value : void 0;
6
34
  };
7
35
  import { Bytes, cpp2js } from "@zwave-js/shared";
8
36
  import { NVMFile, gotDeserializationOptions, nvmFileID, nvmSection, } from "./NVMFile.js";
9
37
  export const ApplicationNameFileID = 0x4100c;
10
- let ApplicationNameFile = class ApplicationNameFile extends NVMFile {
11
- constructor(options) {
12
- super(options);
13
- if (gotDeserializationOptions(options)) {
14
- this.name = cpp2js(this.payload.toString("utf8"));
38
+ let ApplicationNameFile = (() => {
39
+ let _classDecorators = [nvmFileID(ApplicationNameFileID), nvmSection("application")];
40
+ let _classDescriptor;
41
+ let _classExtraInitializers = [];
42
+ let _classThis;
43
+ let _classSuper = NVMFile;
44
+ var ApplicationNameFile = class extends _classSuper {
45
+ static { _classThis = this; }
46
+ static {
47
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
48
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
49
+ ApplicationNameFile = _classThis = _classDescriptor.value;
50
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
51
+ __runInitializers(_classThis, _classExtraInitializers);
15
52
  }
16
- else {
17
- this.name = options.name;
53
+ constructor(options) {
54
+ super(options);
55
+ if (gotDeserializationOptions(options)) {
56
+ this.name = cpp2js(this.payload.toString("utf8"));
57
+ }
58
+ else {
59
+ this.name = options.name;
60
+ }
18
61
  }
19
- }
20
- name;
21
- serialize() {
22
- // Return a zero-terminated string with a fixed length of 30 bytes
23
- const nameAsString = Bytes.from(this.name, "utf8");
24
- this.payload = new Bytes(30).fill(0);
25
- this.payload.set(nameAsString.subarray(0, this.payload.length), 0);
26
- return super.serialize();
27
- }
28
- };
29
- ApplicationNameFile = __decorate([
30
- nvmFileID(ApplicationNameFileID),
31
- nvmSection("application")
32
- ], ApplicationNameFile);
62
+ name;
63
+ serialize() {
64
+ // Return a zero-terminated string with a fixed length of 30 bytes
65
+ const nameAsString = Bytes.from(this.name, "utf8");
66
+ this.payload = new Bytes(30).fill(0);
67
+ this.payload.set(nameAsString.subarray(0, this.payload.length), 0);
68
+ return super.serialize();
69
+ }
70
+ };
71
+ return ApplicationNameFile = _classThis;
72
+ })();
33
73
  export { ApplicationNameFile };
34
74
  //# sourceMappingURL=ApplicationNameFile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ApplicationNameFile.js","sourceRoot":"","sources":["../../../../../src/lib/nvm3/files/ApplicationNameFile.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EACN,OAAO,EAGP,yBAAyB,EACzB,SAAS,EACT,UAAU,GACV,MAAM,cAAc,CAAC;AAMtB,MAAM,CAAC,MAAM,qBAAqB,GAAG,OAAO,CAAC;AAItC,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,OAAO;IAC/C,YACC,OAAmE;QAEnE,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,yBAAyB,CAAC,OAAO,CAAC,EAAE,CAAC;YACxC,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;QACnD,CAAC;aAAM,CAAC;YACP,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QAC1B,CAAC;IACF,CAAC;IAEM,IAAI,CAAS;IAEb,SAAS;QACf,kEAAkE;QAClE,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,IAAI,CAAC,OAAO,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACrC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;QACnE,OAAO,KAA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