@rise-maritime/keelson-js 0.5.3 → 0.6.0-alpha.221.dev.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.
Files changed (111) hide show
  1. package/dist/index.d.ts +524 -1
  2. package/dist/index.js +114 -5
  3. package/dist/index.test.js +57 -0
  4. package/dist/interfaces/AlarmAck.d.ts +62 -0
  5. package/dist/interfaces/AlarmAck.js +218 -0
  6. package/dist/interfaces/Configurable.d.ts +24 -18
  7. package/dist/interfaces/Configurable.js +24 -22
  8. package/dist/interfaces/Coordinate.d.ts +38 -0
  9. package/dist/interfaces/Coordinate.js +82 -0
  10. package/dist/interfaces/ErrorResponse.d.ts +1 -1
  11. package/dist/interfaces/ErrorResponse.js +1 -1
  12. package/dist/interfaces/MavlinkCommand.d.ts +24 -18
  13. package/dist/interfaces/MavlinkCommand.js +24 -22
  14. package/dist/interfaces/Mission.d.ts +128 -0
  15. package/dist/interfaces/Mission.js +800 -0
  16. package/dist/interfaces/NetworkPingPong.d.ts +16 -16
  17. package/dist/interfaces/NetworkPingPong.js +16 -16
  18. package/dist/interfaces/ReplayControl.d.ts +72 -30
  19. package/dist/interfaces/ReplayControl.js +72 -58
  20. package/dist/interfaces/Route.d.ts +627 -0
  21. package/dist/interfaces/Route.js +4148 -0
  22. package/dist/interfaces/RoutePlanner.d.ts +152 -0
  23. package/dist/interfaces/RoutePlanner.js +268 -0
  24. package/dist/interfaces/ScenarioCheckpoint.d.ts +154 -0
  25. package/dist/interfaces/ScenarioCheckpoint.js +694 -0
  26. package/dist/interfaces/ScenarioControl.d.ts +144 -0
  27. package/dist/interfaces/ScenarioControl.js +552 -0
  28. package/dist/interfaces/Severity.d.ts +22 -0
  29. package/dist/interfaces/Severity.js +72 -0
  30. package/dist/interfaces/SimulationControl.d.ts +69 -0
  31. package/dist/interfaces/SimulationControl.js +153 -0
  32. package/dist/interfaces/Subscriber.d.ts +24 -18
  33. package/dist/interfaces/Subscriber.js +24 -22
  34. package/dist/interfaces/VehicleCommon.d.ts +1 -32
  35. package/dist/interfaces/VehicleCommon.js +2 -74
  36. package/dist/interfaces/VehicleControl.d.ts +34 -28
  37. package/dist/interfaces/VehicleControl.js +34 -22
  38. package/dist/interfaces/VehicleGeofence.d.ts +26 -19
  39. package/dist/interfaces/VehicleGeofence.js +40 -37
  40. package/dist/interfaces/VehicleLifecycle.d.ts +32 -20
  41. package/dist/interfaces/VehicleLifecycle.js +32 -28
  42. package/dist/interfaces/VehicleMission.d.ts +42 -97
  43. package/dist/interfaces/VehicleMission.js +41 -696
  44. package/dist/interfaces/VehicleNavigation.d.ts +30 -24
  45. package/dist/interfaces/VehicleNavigation.js +30 -22
  46. package/dist/interfaces/VehicleParam.d.ts +48 -24
  47. package/dist/interfaces/VehicleParam.js +48 -40
  48. package/dist/interfaces/VehicleSimulatorControl.d.ts +57 -0
  49. package/dist/interfaces/VehicleSimulatorControl.js +155 -0
  50. package/dist/interfaces/WHEPProxy.d.ts +16 -16
  51. package/dist/interfaces/WHEPProxy.js +16 -16
  52. package/dist/interfaces/foxglove/GeoJSON.d.ts +27 -0
  53. package/dist/interfaces/foxglove/GeoJSON.js +65 -0
  54. package/dist/interfaces/foxglove/LocationFix.d.ts +49 -0
  55. package/dist/interfaces/foxglove/LocationFix.js +246 -0
  56. package/dist/interfaces/google/protobuf/any.d.ts +144 -0
  57. package/dist/interfaces/google/protobuf/any.js +107 -0
  58. package/dist/interfaces/google/protobuf/duration.d.ts +99 -0
  59. package/dist/interfaces/google/protobuf/duration.js +92 -0
  60. package/dist/interfaces/serviceRegistry.d.ts +520 -0
  61. package/dist/interfaces/serviceRegistry.js +40 -0
  62. package/dist/interfaces.json +19 -0
  63. package/dist/payloads/Alarm.d.ts +7 -12
  64. package/dist/payloads/Alarm.js +4 -54
  65. package/dist/payloads/CommandAuthority.d.ts +82 -0
  66. package/dist/payloads/CommandAuthority.js +364 -0
  67. package/dist/payloads/Coordinate.d.ts +39 -0
  68. package/dist/payloads/Coordinate.js +85 -0
  69. package/dist/payloads/EntityHealth.d.ts +9 -0
  70. package/dist/payloads/EntityHealth.js +14 -0
  71. package/dist/payloads/Mission.d.ts +137 -0
  72. package/dist/payloads/Mission.js +826 -0
  73. package/dist/payloads/OperationalAuthority.d.ts +172 -5
  74. package/dist/payloads/OperationalAuthority.js +525 -6
  75. package/dist/payloads/Route.d.ts +649 -0
  76. package/dist/payloads/Route.js +4257 -0
  77. package/dist/payloads/RouteChangeEvent.d.ts +42 -0
  78. package/dist/payloads/RouteChangeEvent.js +223 -0
  79. package/dist/payloads/RouteEditAuthority.d.ts +87 -0
  80. package/dist/payloads/RouteEditAuthority.js +380 -0
  81. package/dist/payloads/RouteExecution.d.ts +64 -0
  82. package/dist/payloads/RouteExecution.js +310 -0
  83. package/dist/payloads/ScenarioStatus.d.ts +160 -0
  84. package/dist/payloads/ScenarioStatus.js +654 -0
  85. package/dist/payloads/Severity.d.ts +13 -6
  86. package/dist/payloads/Severity.js +30 -18
  87. package/dist/payloads/SimulationStatus.d.ts +3 -4
  88. package/dist/payloads/SimulationStatus.js +12 -18
  89. package/dist/payloads/TestObjectStatus.d.ts +154 -0
  90. package/dist/payloads/TestObjectStatus.js +580 -0
  91. package/dist/payloads/VesselType.d.ts +2 -1
  92. package/dist/payloads/VesselType.js +1 -1
  93. package/dist/payloads/Voyage.d.ts +154 -0
  94. package/dist/payloads/Voyage.js +866 -0
  95. package/dist/payloads/WarrantRecord.d.ts +168 -0
  96. package/dist/payloads/WarrantRecord.js +781 -0
  97. package/dist/payloads/foxglove/CompressedPointCloud.d.ts +37 -0
  98. package/dist/payloads/foxglove/CompressedPointCloud.js +185 -0
  99. package/dist/payloads/google/protobuf/any.d.ts +145 -0
  100. package/dist/payloads/google/protobuf/any.js +110 -0
  101. package/dist/payloads/google/protobuf/empty.d.ts +34 -0
  102. package/dist/payloads/google/protobuf/empty.js +50 -0
  103. package/dist/payloads/index.foxglove.d.ts +1 -0
  104. package/dist/payloads/index.foxglove.js +1 -0
  105. package/dist/payloads/index.google.protobuf.d.ts +2 -0
  106. package/dist/payloads/index.google.protobuf.js +2 -0
  107. package/dist/payloads/index.keelson.d.ts +12 -1
  108. package/dist/payloads/index.keelson.js +12 -1
  109. package/dist/qos.json +89 -0
  110. package/dist/subjects.json +30 -1
  111. package/package.json +2 -1
@@ -0,0 +1,866 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.6.1
5
+ // protoc v6.30.2
6
+ // source: Voyage.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.Voyage = exports.DynamicReroutingPolicy = exports.VoyageAuditEntry = exports.voyageAuditActionToJSON = exports.voyageAuditActionFromJSON = exports.VoyageAuditAction = exports.voyageStatusToJSON = exports.voyageStatusFromJSON = exports.VoyageStatus = void 0;
9
+ /* eslint-disable */
10
+ const wire_1 = require("@bufbuild/protobuf/wire");
11
+ const Route_1 = require("./Route");
12
+ const VesselType_1 = require("./VesselType");
13
+ const duration_1 = require("./google/protobuf/duration");
14
+ const timestamp_1 = require("./google/protobuf/timestamp");
15
+ const typeRegistry_1 = require("./typeRegistry");
16
+ /**
17
+ * Voyage lifecycle status. Prefixed to avoid collision with RouteStatus
18
+ * values that share the keelson package.
19
+ */
20
+ var VoyageStatus;
21
+ (function (VoyageStatus) {
22
+ VoyageStatus[VoyageStatus["VOYAGE_STATUS_UNSPECIFIED"] = 0] = "VOYAGE_STATUS_UNSPECIFIED";
23
+ VoyageStatus[VoyageStatus["VOYAGE_STATUS_PLANNED"] = 1] = "VOYAGE_STATUS_PLANNED";
24
+ VoyageStatus[VoyageStatus["VOYAGE_STATUS_ACTIVE"] = 2] = "VOYAGE_STATUS_ACTIVE";
25
+ VoyageStatus[VoyageStatus["VOYAGE_STATUS_PAUSED"] = 3] = "VOYAGE_STATUS_PAUSED";
26
+ VoyageStatus[VoyageStatus["VOYAGE_STATUS_COMPLETED"] = 4] = "VOYAGE_STATUS_COMPLETED";
27
+ VoyageStatus[VoyageStatus["VOYAGE_STATUS_ABORTED"] = 5] = "VOYAGE_STATUS_ABORTED";
28
+ VoyageStatus[VoyageStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
29
+ })(VoyageStatus || (exports.VoyageStatus = VoyageStatus = {}));
30
+ function voyageStatusFromJSON(object) {
31
+ switch (object) {
32
+ case 0:
33
+ case "VOYAGE_STATUS_UNSPECIFIED":
34
+ return VoyageStatus.VOYAGE_STATUS_UNSPECIFIED;
35
+ case 1:
36
+ case "VOYAGE_STATUS_PLANNED":
37
+ return VoyageStatus.VOYAGE_STATUS_PLANNED;
38
+ case 2:
39
+ case "VOYAGE_STATUS_ACTIVE":
40
+ return VoyageStatus.VOYAGE_STATUS_ACTIVE;
41
+ case 3:
42
+ case "VOYAGE_STATUS_PAUSED":
43
+ return VoyageStatus.VOYAGE_STATUS_PAUSED;
44
+ case 4:
45
+ case "VOYAGE_STATUS_COMPLETED":
46
+ return VoyageStatus.VOYAGE_STATUS_COMPLETED;
47
+ case 5:
48
+ case "VOYAGE_STATUS_ABORTED":
49
+ return VoyageStatus.VOYAGE_STATUS_ABORTED;
50
+ case -1:
51
+ case "UNRECOGNIZED":
52
+ default:
53
+ return VoyageStatus.UNRECOGNIZED;
54
+ }
55
+ }
56
+ exports.voyageStatusFromJSON = voyageStatusFromJSON;
57
+ function voyageStatusToJSON(object) {
58
+ switch (object) {
59
+ case VoyageStatus.VOYAGE_STATUS_UNSPECIFIED:
60
+ return "VOYAGE_STATUS_UNSPECIFIED";
61
+ case VoyageStatus.VOYAGE_STATUS_PLANNED:
62
+ return "VOYAGE_STATUS_PLANNED";
63
+ case VoyageStatus.VOYAGE_STATUS_ACTIVE:
64
+ return "VOYAGE_STATUS_ACTIVE";
65
+ case VoyageStatus.VOYAGE_STATUS_PAUSED:
66
+ return "VOYAGE_STATUS_PAUSED";
67
+ case VoyageStatus.VOYAGE_STATUS_COMPLETED:
68
+ return "VOYAGE_STATUS_COMPLETED";
69
+ case VoyageStatus.VOYAGE_STATUS_ABORTED:
70
+ return "VOYAGE_STATUS_ABORTED";
71
+ case VoyageStatus.UNRECOGNIZED:
72
+ default:
73
+ return "UNRECOGNIZED";
74
+ }
75
+ }
76
+ exports.voyageStatusToJSON = voyageStatusToJSON;
77
+ /**
78
+ * Defined voyage audit actions. VOYAGE_AUDIT_ACTION_OTHER is the escape hatch
79
+ * when a publisher needs an action that isn't yet covered by this enum; the
80
+ * free-text `detail` field carries the specifics in that case.
81
+ */
82
+ var VoyageAuditAction;
83
+ (function (VoyageAuditAction) {
84
+ VoyageAuditAction[VoyageAuditAction["VOYAGE_AUDIT_ACTION_UNSPECIFIED"] = 0] = "VOYAGE_AUDIT_ACTION_UNSPECIFIED";
85
+ VoyageAuditAction[VoyageAuditAction["VOYAGE_AUDIT_ACTION_ACTIVATED"] = 1] = "VOYAGE_AUDIT_ACTION_ACTIVATED";
86
+ VoyageAuditAction[VoyageAuditAction["VOYAGE_AUDIT_ACTION_PAUSED"] = 2] = "VOYAGE_AUDIT_ACTION_PAUSED";
87
+ VoyageAuditAction[VoyageAuditAction["VOYAGE_AUDIT_ACTION_RESUMED"] = 3] = "VOYAGE_AUDIT_ACTION_RESUMED";
88
+ VoyageAuditAction[VoyageAuditAction["VOYAGE_AUDIT_ACTION_EDITION_BUMP"] = 4] = "VOYAGE_AUDIT_ACTION_EDITION_BUMP";
89
+ VoyageAuditAction[VoyageAuditAction["VOYAGE_AUDIT_ACTION_DEVIATION"] = 5] = "VOYAGE_AUDIT_ACTION_DEVIATION";
90
+ VoyageAuditAction[VoyageAuditAction["VOYAGE_AUDIT_ACTION_REROUTE_ACCEPTED"] = 6] = "VOYAGE_AUDIT_ACTION_REROUTE_ACCEPTED";
91
+ VoyageAuditAction[VoyageAuditAction["VOYAGE_AUDIT_ACTION_COMPLETED"] = 7] = "VOYAGE_AUDIT_ACTION_COMPLETED";
92
+ VoyageAuditAction[VoyageAuditAction["VOYAGE_AUDIT_ACTION_ABORTED"] = 8] = "VOYAGE_AUDIT_ACTION_ABORTED";
93
+ VoyageAuditAction[VoyageAuditAction["VOYAGE_AUDIT_ACTION_OTHER"] = 99] = "VOYAGE_AUDIT_ACTION_OTHER";
94
+ VoyageAuditAction[VoyageAuditAction["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
95
+ })(VoyageAuditAction || (exports.VoyageAuditAction = VoyageAuditAction = {}));
96
+ function voyageAuditActionFromJSON(object) {
97
+ switch (object) {
98
+ case 0:
99
+ case "VOYAGE_AUDIT_ACTION_UNSPECIFIED":
100
+ return VoyageAuditAction.VOYAGE_AUDIT_ACTION_UNSPECIFIED;
101
+ case 1:
102
+ case "VOYAGE_AUDIT_ACTION_ACTIVATED":
103
+ return VoyageAuditAction.VOYAGE_AUDIT_ACTION_ACTIVATED;
104
+ case 2:
105
+ case "VOYAGE_AUDIT_ACTION_PAUSED":
106
+ return VoyageAuditAction.VOYAGE_AUDIT_ACTION_PAUSED;
107
+ case 3:
108
+ case "VOYAGE_AUDIT_ACTION_RESUMED":
109
+ return VoyageAuditAction.VOYAGE_AUDIT_ACTION_RESUMED;
110
+ case 4:
111
+ case "VOYAGE_AUDIT_ACTION_EDITION_BUMP":
112
+ return VoyageAuditAction.VOYAGE_AUDIT_ACTION_EDITION_BUMP;
113
+ case 5:
114
+ case "VOYAGE_AUDIT_ACTION_DEVIATION":
115
+ return VoyageAuditAction.VOYAGE_AUDIT_ACTION_DEVIATION;
116
+ case 6:
117
+ case "VOYAGE_AUDIT_ACTION_REROUTE_ACCEPTED":
118
+ return VoyageAuditAction.VOYAGE_AUDIT_ACTION_REROUTE_ACCEPTED;
119
+ case 7:
120
+ case "VOYAGE_AUDIT_ACTION_COMPLETED":
121
+ return VoyageAuditAction.VOYAGE_AUDIT_ACTION_COMPLETED;
122
+ case 8:
123
+ case "VOYAGE_AUDIT_ACTION_ABORTED":
124
+ return VoyageAuditAction.VOYAGE_AUDIT_ACTION_ABORTED;
125
+ case 99:
126
+ case "VOYAGE_AUDIT_ACTION_OTHER":
127
+ return VoyageAuditAction.VOYAGE_AUDIT_ACTION_OTHER;
128
+ case -1:
129
+ case "UNRECOGNIZED":
130
+ default:
131
+ return VoyageAuditAction.UNRECOGNIZED;
132
+ }
133
+ }
134
+ exports.voyageAuditActionFromJSON = voyageAuditActionFromJSON;
135
+ function voyageAuditActionToJSON(object) {
136
+ switch (object) {
137
+ case VoyageAuditAction.VOYAGE_AUDIT_ACTION_UNSPECIFIED:
138
+ return "VOYAGE_AUDIT_ACTION_UNSPECIFIED";
139
+ case VoyageAuditAction.VOYAGE_AUDIT_ACTION_ACTIVATED:
140
+ return "VOYAGE_AUDIT_ACTION_ACTIVATED";
141
+ case VoyageAuditAction.VOYAGE_AUDIT_ACTION_PAUSED:
142
+ return "VOYAGE_AUDIT_ACTION_PAUSED";
143
+ case VoyageAuditAction.VOYAGE_AUDIT_ACTION_RESUMED:
144
+ return "VOYAGE_AUDIT_ACTION_RESUMED";
145
+ case VoyageAuditAction.VOYAGE_AUDIT_ACTION_EDITION_BUMP:
146
+ return "VOYAGE_AUDIT_ACTION_EDITION_BUMP";
147
+ case VoyageAuditAction.VOYAGE_AUDIT_ACTION_DEVIATION:
148
+ return "VOYAGE_AUDIT_ACTION_DEVIATION";
149
+ case VoyageAuditAction.VOYAGE_AUDIT_ACTION_REROUTE_ACCEPTED:
150
+ return "VOYAGE_AUDIT_ACTION_REROUTE_ACCEPTED";
151
+ case VoyageAuditAction.VOYAGE_AUDIT_ACTION_COMPLETED:
152
+ return "VOYAGE_AUDIT_ACTION_COMPLETED";
153
+ case VoyageAuditAction.VOYAGE_AUDIT_ACTION_ABORTED:
154
+ return "VOYAGE_AUDIT_ACTION_ABORTED";
155
+ case VoyageAuditAction.VOYAGE_AUDIT_ACTION_OTHER:
156
+ return "VOYAGE_AUDIT_ACTION_OTHER";
157
+ case VoyageAuditAction.UNRECOGNIZED:
158
+ default:
159
+ return "UNRECOGNIZED";
160
+ }
161
+ }
162
+ exports.voyageAuditActionToJSON = voyageAuditActionToJSON;
163
+ function createBaseVoyageAuditEntry() {
164
+ return { $type: "keelson.VoyageAuditEntry", at: undefined, actorId: "", actorSite: "", action: 0, detail: "" };
165
+ }
166
+ exports.VoyageAuditEntry = {
167
+ $type: "keelson.VoyageAuditEntry",
168
+ encode(message, writer = new wire_1.BinaryWriter()) {
169
+ if (message.at !== undefined) {
170
+ timestamp_1.Timestamp.encode(toTimestamp(message.at), writer.uint32(10).fork()).join();
171
+ }
172
+ if (message.actorId !== "") {
173
+ writer.uint32(18).string(message.actorId);
174
+ }
175
+ if (message.actorSite !== "") {
176
+ writer.uint32(26).string(message.actorSite);
177
+ }
178
+ if (message.action !== 0) {
179
+ writer.uint32(32).int32(message.action);
180
+ }
181
+ if (message.detail !== "") {
182
+ writer.uint32(42).string(message.detail);
183
+ }
184
+ return writer;
185
+ },
186
+ decode(input, length) {
187
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
188
+ let end = length === undefined ? reader.len : reader.pos + length;
189
+ const message = createBaseVoyageAuditEntry();
190
+ while (reader.pos < end) {
191
+ const tag = reader.uint32();
192
+ switch (tag >>> 3) {
193
+ case 1: {
194
+ if (tag !== 10) {
195
+ break;
196
+ }
197
+ message.at = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
198
+ continue;
199
+ }
200
+ case 2: {
201
+ if (tag !== 18) {
202
+ break;
203
+ }
204
+ message.actorId = reader.string();
205
+ continue;
206
+ }
207
+ case 3: {
208
+ if (tag !== 26) {
209
+ break;
210
+ }
211
+ message.actorSite = reader.string();
212
+ continue;
213
+ }
214
+ case 4: {
215
+ if (tag !== 32) {
216
+ break;
217
+ }
218
+ message.action = reader.int32();
219
+ continue;
220
+ }
221
+ case 5: {
222
+ if (tag !== 42) {
223
+ break;
224
+ }
225
+ message.detail = reader.string();
226
+ continue;
227
+ }
228
+ }
229
+ if ((tag & 7) === 4 || tag === 0) {
230
+ break;
231
+ }
232
+ reader.skip(tag & 7);
233
+ }
234
+ return message;
235
+ },
236
+ fromJSON(object) {
237
+ return {
238
+ $type: exports.VoyageAuditEntry.$type,
239
+ at: isSet(object.at) ? fromJsonTimestamp(object.at) : undefined,
240
+ actorId: isSet(object.actorId) ? globalThis.String(object.actorId) : "",
241
+ actorSite: isSet(object.actorSite) ? globalThis.String(object.actorSite) : "",
242
+ action: isSet(object.action) ? voyageAuditActionFromJSON(object.action) : 0,
243
+ detail: isSet(object.detail) ? globalThis.String(object.detail) : "",
244
+ };
245
+ },
246
+ toJSON(message) {
247
+ const obj = {};
248
+ if (message.at !== undefined) {
249
+ obj.at = message.at.toISOString();
250
+ }
251
+ if (message.actorId !== "") {
252
+ obj.actorId = message.actorId;
253
+ }
254
+ if (message.actorSite !== "") {
255
+ obj.actorSite = message.actorSite;
256
+ }
257
+ if (message.action !== 0) {
258
+ obj.action = voyageAuditActionToJSON(message.action);
259
+ }
260
+ if (message.detail !== "") {
261
+ obj.detail = message.detail;
262
+ }
263
+ return obj;
264
+ },
265
+ create(base) {
266
+ return exports.VoyageAuditEntry.fromPartial(base ?? {});
267
+ },
268
+ fromPartial(object) {
269
+ const message = createBaseVoyageAuditEntry();
270
+ message.at = object.at ?? undefined;
271
+ message.actorId = object.actorId ?? "";
272
+ message.actorSite = object.actorSite ?? "";
273
+ message.action = object.action ?? 0;
274
+ message.detail = object.detail ?? "";
275
+ return message;
276
+ },
277
+ };
278
+ typeRegistry_1.messageTypeRegistry.set(exports.VoyageAuditEntry.$type, exports.VoyageAuditEntry);
279
+ function createBaseDynamicReroutingPolicy() {
280
+ return {
281
+ $type: "keelson.DynamicReroutingPolicy",
282
+ autoRerouteAllowed: false,
283
+ maxCrossTrackDeviationM: undefined,
284
+ maxArrivalDelay: undefined,
285
+ speedProfileChangeAllowed: false,
286
+ maxSogDeviationKnots: undefined,
287
+ };
288
+ }
289
+ exports.DynamicReroutingPolicy = {
290
+ $type: "keelson.DynamicReroutingPolicy",
291
+ encode(message, writer = new wire_1.BinaryWriter()) {
292
+ if (message.autoRerouteAllowed !== false) {
293
+ writer.uint32(8).bool(message.autoRerouteAllowed);
294
+ }
295
+ if (message.maxCrossTrackDeviationM !== undefined) {
296
+ writer.uint32(21).float(message.maxCrossTrackDeviationM);
297
+ }
298
+ if (message.maxArrivalDelay !== undefined) {
299
+ duration_1.Duration.encode(message.maxArrivalDelay, writer.uint32(26).fork()).join();
300
+ }
301
+ if (message.speedProfileChangeAllowed !== false) {
302
+ writer.uint32(32).bool(message.speedProfileChangeAllowed);
303
+ }
304
+ if (message.maxSogDeviationKnots !== undefined) {
305
+ writer.uint32(45).float(message.maxSogDeviationKnots);
306
+ }
307
+ return writer;
308
+ },
309
+ decode(input, length) {
310
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
311
+ let end = length === undefined ? reader.len : reader.pos + length;
312
+ const message = createBaseDynamicReroutingPolicy();
313
+ while (reader.pos < end) {
314
+ const tag = reader.uint32();
315
+ switch (tag >>> 3) {
316
+ case 1: {
317
+ if (tag !== 8) {
318
+ break;
319
+ }
320
+ message.autoRerouteAllowed = reader.bool();
321
+ continue;
322
+ }
323
+ case 2: {
324
+ if (tag !== 21) {
325
+ break;
326
+ }
327
+ message.maxCrossTrackDeviationM = reader.float();
328
+ continue;
329
+ }
330
+ case 3: {
331
+ if (tag !== 26) {
332
+ break;
333
+ }
334
+ message.maxArrivalDelay = duration_1.Duration.decode(reader, reader.uint32());
335
+ continue;
336
+ }
337
+ case 4: {
338
+ if (tag !== 32) {
339
+ break;
340
+ }
341
+ message.speedProfileChangeAllowed = reader.bool();
342
+ continue;
343
+ }
344
+ case 5: {
345
+ if (tag !== 45) {
346
+ break;
347
+ }
348
+ message.maxSogDeviationKnots = reader.float();
349
+ continue;
350
+ }
351
+ }
352
+ if ((tag & 7) === 4 || tag === 0) {
353
+ break;
354
+ }
355
+ reader.skip(tag & 7);
356
+ }
357
+ return message;
358
+ },
359
+ fromJSON(object) {
360
+ return {
361
+ $type: exports.DynamicReroutingPolicy.$type,
362
+ autoRerouteAllowed: isSet(object.autoRerouteAllowed) ? globalThis.Boolean(object.autoRerouteAllowed) : false,
363
+ maxCrossTrackDeviationM: isSet(object.maxCrossTrackDeviationM)
364
+ ? globalThis.Number(object.maxCrossTrackDeviationM)
365
+ : undefined,
366
+ maxArrivalDelay: isSet(object.maxArrivalDelay) ? duration_1.Duration.fromJSON(object.maxArrivalDelay) : undefined,
367
+ speedProfileChangeAllowed: isSet(object.speedProfileChangeAllowed)
368
+ ? globalThis.Boolean(object.speedProfileChangeAllowed)
369
+ : false,
370
+ maxSogDeviationKnots: isSet(object.maxSogDeviationKnots)
371
+ ? globalThis.Number(object.maxSogDeviationKnots)
372
+ : undefined,
373
+ };
374
+ },
375
+ toJSON(message) {
376
+ const obj = {};
377
+ if (message.autoRerouteAllowed !== false) {
378
+ obj.autoRerouteAllowed = message.autoRerouteAllowed;
379
+ }
380
+ if (message.maxCrossTrackDeviationM !== undefined) {
381
+ obj.maxCrossTrackDeviationM = message.maxCrossTrackDeviationM;
382
+ }
383
+ if (message.maxArrivalDelay !== undefined) {
384
+ obj.maxArrivalDelay = duration_1.Duration.toJSON(message.maxArrivalDelay);
385
+ }
386
+ if (message.speedProfileChangeAllowed !== false) {
387
+ obj.speedProfileChangeAllowed = message.speedProfileChangeAllowed;
388
+ }
389
+ if (message.maxSogDeviationKnots !== undefined) {
390
+ obj.maxSogDeviationKnots = message.maxSogDeviationKnots;
391
+ }
392
+ return obj;
393
+ },
394
+ create(base) {
395
+ return exports.DynamicReroutingPolicy.fromPartial(base ?? {});
396
+ },
397
+ fromPartial(object) {
398
+ const message = createBaseDynamicReroutingPolicy();
399
+ message.autoRerouteAllowed = object.autoRerouteAllowed ?? false;
400
+ message.maxCrossTrackDeviationM = object.maxCrossTrackDeviationM ?? undefined;
401
+ message.maxArrivalDelay = (object.maxArrivalDelay !== undefined && object.maxArrivalDelay !== null)
402
+ ? duration_1.Duration.fromPartial(object.maxArrivalDelay)
403
+ : undefined;
404
+ message.speedProfileChangeAllowed = object.speedProfileChangeAllowed ?? false;
405
+ message.maxSogDeviationKnots = object.maxSogDeviationKnots ?? undefined;
406
+ return message;
407
+ },
408
+ };
409
+ typeRegistry_1.messageTypeRegistry.set(exports.DynamicReroutingPolicy.$type, exports.DynamicReroutingPolicy);
410
+ function createBaseVoyage() {
411
+ return {
412
+ $type: "keelson.Voyage",
413
+ version: "",
414
+ voyageId: "",
415
+ routeRef: undefined,
416
+ vesselMmsi: 0,
417
+ vesselName: "",
418
+ vesselCallSign: "",
419
+ vesselImo: 0,
420
+ vesselType: undefined,
421
+ status: 0,
422
+ plannedDeparture: undefined,
423
+ plannedArrival: undefined,
424
+ startedAt: undefined,
425
+ completedAt: undefined,
426
+ departurePortLocode: "",
427
+ arrivalPortLocode: "",
428
+ departurePortName: "",
429
+ arrivalPortName: "",
430
+ actualTrackKeyExpr: "",
431
+ deviationCount: 0,
432
+ maxXtdObservedM: 0,
433
+ linkedProcedureIds: [],
434
+ auditTrail: [],
435
+ reroutingPolicy: undefined,
436
+ };
437
+ }
438
+ exports.Voyage = {
439
+ $type: "keelson.Voyage",
440
+ encode(message, writer = new wire_1.BinaryWriter()) {
441
+ if (message.version !== "") {
442
+ writer.uint32(10).string(message.version);
443
+ }
444
+ if (message.voyageId !== "") {
445
+ writer.uint32(18).string(message.voyageId);
446
+ }
447
+ if (message.routeRef !== undefined) {
448
+ Route_1.RouteRef.encode(message.routeRef, writer.uint32(42).fork()).join();
449
+ }
450
+ if (message.vesselMmsi !== 0) {
451
+ writer.uint32(80).uint64(message.vesselMmsi);
452
+ }
453
+ if (message.vesselName !== "") {
454
+ writer.uint32(90).string(message.vesselName);
455
+ }
456
+ if (message.vesselCallSign !== "") {
457
+ writer.uint32(98).string(message.vesselCallSign);
458
+ }
459
+ if (message.vesselImo !== 0) {
460
+ writer.uint32(104).uint64(message.vesselImo);
461
+ }
462
+ if (message.vesselType !== undefined) {
463
+ VesselType_1.VesselType.encode(message.vesselType, writer.uint32(114).fork()).join();
464
+ }
465
+ if (message.status !== 0) {
466
+ writer.uint32(160).int32(message.status);
467
+ }
468
+ if (message.plannedDeparture !== undefined) {
469
+ timestamp_1.Timestamp.encode(toTimestamp(message.plannedDeparture), writer.uint32(170).fork()).join();
470
+ }
471
+ if (message.plannedArrival !== undefined) {
472
+ timestamp_1.Timestamp.encode(toTimestamp(message.plannedArrival), writer.uint32(178).fork()).join();
473
+ }
474
+ if (message.startedAt !== undefined) {
475
+ timestamp_1.Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(186).fork()).join();
476
+ }
477
+ if (message.completedAt !== undefined) {
478
+ timestamp_1.Timestamp.encode(toTimestamp(message.completedAt), writer.uint32(194).fork()).join();
479
+ }
480
+ if (message.departurePortLocode !== "") {
481
+ writer.uint32(322).string(message.departurePortLocode);
482
+ }
483
+ if (message.arrivalPortLocode !== "") {
484
+ writer.uint32(330).string(message.arrivalPortLocode);
485
+ }
486
+ if (message.departurePortName !== "") {
487
+ writer.uint32(338).string(message.departurePortName);
488
+ }
489
+ if (message.arrivalPortName !== "") {
490
+ writer.uint32(346).string(message.arrivalPortName);
491
+ }
492
+ if (message.actualTrackKeyExpr !== "") {
493
+ writer.uint32(402).string(message.actualTrackKeyExpr);
494
+ }
495
+ if (message.deviationCount !== 0) {
496
+ writer.uint32(480).uint32(message.deviationCount);
497
+ }
498
+ if (message.maxXtdObservedM !== 0) {
499
+ writer.uint32(489).double(message.maxXtdObservedM);
500
+ }
501
+ for (const v of message.linkedProcedureIds) {
502
+ writer.uint32(562).string(v);
503
+ }
504
+ for (const v of message.auditTrail) {
505
+ exports.VoyageAuditEntry.encode(v, writer.uint32(642).fork()).join();
506
+ }
507
+ if (message.reroutingPolicy !== undefined) {
508
+ exports.DynamicReroutingPolicy.encode(message.reroutingPolicy, writer.uint32(722).fork()).join();
509
+ }
510
+ return writer;
511
+ },
512
+ decode(input, length) {
513
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
514
+ let end = length === undefined ? reader.len : reader.pos + length;
515
+ const message = createBaseVoyage();
516
+ while (reader.pos < end) {
517
+ const tag = reader.uint32();
518
+ switch (tag >>> 3) {
519
+ case 1: {
520
+ if (tag !== 10) {
521
+ break;
522
+ }
523
+ message.version = reader.string();
524
+ continue;
525
+ }
526
+ case 2: {
527
+ if (tag !== 18) {
528
+ break;
529
+ }
530
+ message.voyageId = reader.string();
531
+ continue;
532
+ }
533
+ case 5: {
534
+ if (tag !== 42) {
535
+ break;
536
+ }
537
+ message.routeRef = Route_1.RouteRef.decode(reader, reader.uint32());
538
+ continue;
539
+ }
540
+ case 10: {
541
+ if (tag !== 80) {
542
+ break;
543
+ }
544
+ message.vesselMmsi = longToNumber(reader.uint64());
545
+ continue;
546
+ }
547
+ case 11: {
548
+ if (tag !== 90) {
549
+ break;
550
+ }
551
+ message.vesselName = reader.string();
552
+ continue;
553
+ }
554
+ case 12: {
555
+ if (tag !== 98) {
556
+ break;
557
+ }
558
+ message.vesselCallSign = reader.string();
559
+ continue;
560
+ }
561
+ case 13: {
562
+ if (tag !== 104) {
563
+ break;
564
+ }
565
+ message.vesselImo = longToNumber(reader.uint64());
566
+ continue;
567
+ }
568
+ case 14: {
569
+ if (tag !== 114) {
570
+ break;
571
+ }
572
+ message.vesselType = VesselType_1.VesselType.decode(reader, reader.uint32());
573
+ continue;
574
+ }
575
+ case 20: {
576
+ if (tag !== 160) {
577
+ break;
578
+ }
579
+ message.status = reader.int32();
580
+ continue;
581
+ }
582
+ case 21: {
583
+ if (tag !== 170) {
584
+ break;
585
+ }
586
+ message.plannedDeparture = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
587
+ continue;
588
+ }
589
+ case 22: {
590
+ if (tag !== 178) {
591
+ break;
592
+ }
593
+ message.plannedArrival = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
594
+ continue;
595
+ }
596
+ case 23: {
597
+ if (tag !== 186) {
598
+ break;
599
+ }
600
+ message.startedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
601
+ continue;
602
+ }
603
+ case 24: {
604
+ if (tag !== 194) {
605
+ break;
606
+ }
607
+ message.completedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
608
+ continue;
609
+ }
610
+ case 40: {
611
+ if (tag !== 322) {
612
+ break;
613
+ }
614
+ message.departurePortLocode = reader.string();
615
+ continue;
616
+ }
617
+ case 41: {
618
+ if (tag !== 330) {
619
+ break;
620
+ }
621
+ message.arrivalPortLocode = reader.string();
622
+ continue;
623
+ }
624
+ case 42: {
625
+ if (tag !== 338) {
626
+ break;
627
+ }
628
+ message.departurePortName = reader.string();
629
+ continue;
630
+ }
631
+ case 43: {
632
+ if (tag !== 346) {
633
+ break;
634
+ }
635
+ message.arrivalPortName = reader.string();
636
+ continue;
637
+ }
638
+ case 50: {
639
+ if (tag !== 402) {
640
+ break;
641
+ }
642
+ message.actualTrackKeyExpr = reader.string();
643
+ continue;
644
+ }
645
+ case 60: {
646
+ if (tag !== 480) {
647
+ break;
648
+ }
649
+ message.deviationCount = reader.uint32();
650
+ continue;
651
+ }
652
+ case 61: {
653
+ if (tag !== 489) {
654
+ break;
655
+ }
656
+ message.maxXtdObservedM = reader.double();
657
+ continue;
658
+ }
659
+ case 70: {
660
+ if (tag !== 562) {
661
+ break;
662
+ }
663
+ message.linkedProcedureIds.push(reader.string());
664
+ continue;
665
+ }
666
+ case 80: {
667
+ if (tag !== 642) {
668
+ break;
669
+ }
670
+ message.auditTrail.push(exports.VoyageAuditEntry.decode(reader, reader.uint32()));
671
+ continue;
672
+ }
673
+ case 90: {
674
+ if (tag !== 722) {
675
+ break;
676
+ }
677
+ message.reroutingPolicy = exports.DynamicReroutingPolicy.decode(reader, reader.uint32());
678
+ continue;
679
+ }
680
+ }
681
+ if ((tag & 7) === 4 || tag === 0) {
682
+ break;
683
+ }
684
+ reader.skip(tag & 7);
685
+ }
686
+ return message;
687
+ },
688
+ fromJSON(object) {
689
+ return {
690
+ $type: exports.Voyage.$type,
691
+ version: isSet(object.version) ? globalThis.String(object.version) : "",
692
+ voyageId: isSet(object.voyageId) ? globalThis.String(object.voyageId) : "",
693
+ routeRef: isSet(object.routeRef) ? Route_1.RouteRef.fromJSON(object.routeRef) : undefined,
694
+ vesselMmsi: isSet(object.vesselMmsi) ? globalThis.Number(object.vesselMmsi) : 0,
695
+ vesselName: isSet(object.vesselName) ? globalThis.String(object.vesselName) : "",
696
+ vesselCallSign: isSet(object.vesselCallSign) ? globalThis.String(object.vesselCallSign) : "",
697
+ vesselImo: isSet(object.vesselImo) ? globalThis.Number(object.vesselImo) : 0,
698
+ vesselType: isSet(object.vesselType) ? VesselType_1.VesselType.fromJSON(object.vesselType) : undefined,
699
+ status: isSet(object.status) ? voyageStatusFromJSON(object.status) : 0,
700
+ plannedDeparture: isSet(object.plannedDeparture) ? fromJsonTimestamp(object.plannedDeparture) : undefined,
701
+ plannedArrival: isSet(object.plannedArrival) ? fromJsonTimestamp(object.plannedArrival) : undefined,
702
+ startedAt: isSet(object.startedAt) ? fromJsonTimestamp(object.startedAt) : undefined,
703
+ completedAt: isSet(object.completedAt) ? fromJsonTimestamp(object.completedAt) : undefined,
704
+ departurePortLocode: isSet(object.departurePortLocode) ? globalThis.String(object.departurePortLocode) : "",
705
+ arrivalPortLocode: isSet(object.arrivalPortLocode) ? globalThis.String(object.arrivalPortLocode) : "",
706
+ departurePortName: isSet(object.departurePortName) ? globalThis.String(object.departurePortName) : "",
707
+ arrivalPortName: isSet(object.arrivalPortName) ? globalThis.String(object.arrivalPortName) : "",
708
+ actualTrackKeyExpr: isSet(object.actualTrackKeyExpr) ? globalThis.String(object.actualTrackKeyExpr) : "",
709
+ deviationCount: isSet(object.deviationCount) ? globalThis.Number(object.deviationCount) : 0,
710
+ maxXtdObservedM: isSet(object.maxXtdObservedM) ? globalThis.Number(object.maxXtdObservedM) : 0,
711
+ linkedProcedureIds: globalThis.Array.isArray(object?.linkedProcedureIds)
712
+ ? object.linkedProcedureIds.map((e) => globalThis.String(e))
713
+ : [],
714
+ auditTrail: globalThis.Array.isArray(object?.auditTrail)
715
+ ? object.auditTrail.map((e) => exports.VoyageAuditEntry.fromJSON(e))
716
+ : [],
717
+ reroutingPolicy: isSet(object.reroutingPolicy)
718
+ ? exports.DynamicReroutingPolicy.fromJSON(object.reroutingPolicy)
719
+ : undefined,
720
+ };
721
+ },
722
+ toJSON(message) {
723
+ const obj = {};
724
+ if (message.version !== "") {
725
+ obj.version = message.version;
726
+ }
727
+ if (message.voyageId !== "") {
728
+ obj.voyageId = message.voyageId;
729
+ }
730
+ if (message.routeRef !== undefined) {
731
+ obj.routeRef = Route_1.RouteRef.toJSON(message.routeRef);
732
+ }
733
+ if (message.vesselMmsi !== 0) {
734
+ obj.vesselMmsi = Math.round(message.vesselMmsi);
735
+ }
736
+ if (message.vesselName !== "") {
737
+ obj.vesselName = message.vesselName;
738
+ }
739
+ if (message.vesselCallSign !== "") {
740
+ obj.vesselCallSign = message.vesselCallSign;
741
+ }
742
+ if (message.vesselImo !== 0) {
743
+ obj.vesselImo = Math.round(message.vesselImo);
744
+ }
745
+ if (message.vesselType !== undefined) {
746
+ obj.vesselType = VesselType_1.VesselType.toJSON(message.vesselType);
747
+ }
748
+ if (message.status !== 0) {
749
+ obj.status = voyageStatusToJSON(message.status);
750
+ }
751
+ if (message.plannedDeparture !== undefined) {
752
+ obj.plannedDeparture = message.plannedDeparture.toISOString();
753
+ }
754
+ if (message.plannedArrival !== undefined) {
755
+ obj.plannedArrival = message.plannedArrival.toISOString();
756
+ }
757
+ if (message.startedAt !== undefined) {
758
+ obj.startedAt = message.startedAt.toISOString();
759
+ }
760
+ if (message.completedAt !== undefined) {
761
+ obj.completedAt = message.completedAt.toISOString();
762
+ }
763
+ if (message.departurePortLocode !== "") {
764
+ obj.departurePortLocode = message.departurePortLocode;
765
+ }
766
+ if (message.arrivalPortLocode !== "") {
767
+ obj.arrivalPortLocode = message.arrivalPortLocode;
768
+ }
769
+ if (message.departurePortName !== "") {
770
+ obj.departurePortName = message.departurePortName;
771
+ }
772
+ if (message.arrivalPortName !== "") {
773
+ obj.arrivalPortName = message.arrivalPortName;
774
+ }
775
+ if (message.actualTrackKeyExpr !== "") {
776
+ obj.actualTrackKeyExpr = message.actualTrackKeyExpr;
777
+ }
778
+ if (message.deviationCount !== 0) {
779
+ obj.deviationCount = Math.round(message.deviationCount);
780
+ }
781
+ if (message.maxXtdObservedM !== 0) {
782
+ obj.maxXtdObservedM = message.maxXtdObservedM;
783
+ }
784
+ if (message.linkedProcedureIds?.length) {
785
+ obj.linkedProcedureIds = message.linkedProcedureIds;
786
+ }
787
+ if (message.auditTrail?.length) {
788
+ obj.auditTrail = message.auditTrail.map((e) => exports.VoyageAuditEntry.toJSON(e));
789
+ }
790
+ if (message.reroutingPolicy !== undefined) {
791
+ obj.reroutingPolicy = exports.DynamicReroutingPolicy.toJSON(message.reroutingPolicy);
792
+ }
793
+ return obj;
794
+ },
795
+ create(base) {
796
+ return exports.Voyage.fromPartial(base ?? {});
797
+ },
798
+ fromPartial(object) {
799
+ const message = createBaseVoyage();
800
+ message.version = object.version ?? "";
801
+ message.voyageId = object.voyageId ?? "";
802
+ message.routeRef = (object.routeRef !== undefined && object.routeRef !== null)
803
+ ? Route_1.RouteRef.fromPartial(object.routeRef)
804
+ : undefined;
805
+ message.vesselMmsi = object.vesselMmsi ?? 0;
806
+ message.vesselName = object.vesselName ?? "";
807
+ message.vesselCallSign = object.vesselCallSign ?? "";
808
+ message.vesselImo = object.vesselImo ?? 0;
809
+ message.vesselType = (object.vesselType !== undefined && object.vesselType !== null)
810
+ ? VesselType_1.VesselType.fromPartial(object.vesselType)
811
+ : undefined;
812
+ message.status = object.status ?? 0;
813
+ message.plannedDeparture = object.plannedDeparture ?? undefined;
814
+ message.plannedArrival = object.plannedArrival ?? undefined;
815
+ message.startedAt = object.startedAt ?? undefined;
816
+ message.completedAt = object.completedAt ?? undefined;
817
+ message.departurePortLocode = object.departurePortLocode ?? "";
818
+ message.arrivalPortLocode = object.arrivalPortLocode ?? "";
819
+ message.departurePortName = object.departurePortName ?? "";
820
+ message.arrivalPortName = object.arrivalPortName ?? "";
821
+ message.actualTrackKeyExpr = object.actualTrackKeyExpr ?? "";
822
+ message.deviationCount = object.deviationCount ?? 0;
823
+ message.maxXtdObservedM = object.maxXtdObservedM ?? 0;
824
+ message.linkedProcedureIds = object.linkedProcedureIds?.map((e) => e) || [];
825
+ message.auditTrail = object.auditTrail?.map((e) => exports.VoyageAuditEntry.fromPartial(e)) || [];
826
+ message.reroutingPolicy = (object.reroutingPolicy !== undefined && object.reroutingPolicy !== null)
827
+ ? exports.DynamicReroutingPolicy.fromPartial(object.reroutingPolicy)
828
+ : undefined;
829
+ return message;
830
+ },
831
+ };
832
+ typeRegistry_1.messageTypeRegistry.set(exports.Voyage.$type, exports.Voyage);
833
+ function toTimestamp(date) {
834
+ const seconds = Math.trunc(date.getTime() / 1000);
835
+ const nanos = (date.getTime() % 1000) * 1000000;
836
+ return { $type: "google.protobuf.Timestamp", seconds, nanos };
837
+ }
838
+ function fromTimestamp(t) {
839
+ let millis = (t.seconds || 0) * 1000;
840
+ millis += (t.nanos || 0) / 1000000;
841
+ return new globalThis.Date(millis);
842
+ }
843
+ function fromJsonTimestamp(o) {
844
+ if (o instanceof globalThis.Date) {
845
+ return o;
846
+ }
847
+ else if (typeof o === "string") {
848
+ return new globalThis.Date(o);
849
+ }
850
+ else {
851
+ return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
852
+ }
853
+ }
854
+ function longToNumber(int64) {
855
+ const num = globalThis.Number(int64.toString());
856
+ if (num > globalThis.Number.MAX_SAFE_INTEGER) {
857
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
858
+ }
859
+ if (num < globalThis.Number.MIN_SAFE_INTEGER) {
860
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
861
+ }
862
+ return num;
863
+ }
864
+ function isSet(value) {
865
+ return value !== null && value !== undefined;
866
+ }