@camstack/types 0.1.3 → 0.1.4
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/index.js +744 -550
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +777 -529
- package/dist/index.mjs.map +1 -1
- package/dist/interfaces/api-shared.d.ts +1 -0
- package/dist/interfaces/api-shared.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,577 +1,825 @@
|
|
|
1
|
-
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"cache": "/tmp/camstack-cache",
|
|
10
|
-
"logs": "logs"
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
11
9
|
};
|
|
10
|
+
var __export = (target, all) => {
|
|
11
|
+
for (var name in all)
|
|
12
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from))
|
|
17
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
24
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
25
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
26
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
27
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
28
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
29
|
+
mod
|
|
30
|
+
));
|
|
12
31
|
|
|
13
|
-
// src/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (locale !== "en") {
|
|
19
|
-
const fallback = provider.getTranslations("en");
|
|
20
|
-
if (fallback && key in fallback) return fallback[key];
|
|
21
|
-
}
|
|
32
|
+
// src/types/io.js
|
|
33
|
+
var require_io = __commonJS({
|
|
34
|
+
"src/types/io.js"(exports) {
|
|
35
|
+
"use strict";
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
37
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// src/types/labels.js
|
|
41
|
+
var require_labels = __commonJS({
|
|
42
|
+
"src/types/labels.js"(exports) {
|
|
43
|
+
"use strict";
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
45
|
}
|
|
32
|
-
|
|
33
|
-
}
|
|
46
|
+
});
|
|
34
47
|
|
|
35
|
-
// src/
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
smartHome: true,
|
|
43
|
-
recordings: true,
|
|
44
|
-
backup: true,
|
|
45
|
-
repl: true
|
|
46
|
-
};
|
|
48
|
+
// src/types/detection.js
|
|
49
|
+
var require_detection = __commonJS({
|
|
50
|
+
"src/types/detection.js"(exports) {
|
|
51
|
+
"use strict";
|
|
52
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
|
+
}
|
|
54
|
+
});
|
|
47
55
|
|
|
48
|
-
// src/
|
|
49
|
-
var
|
|
50
|
-
|
|
56
|
+
// src/types/tracked.js
|
|
57
|
+
var require_tracked = __commonJS({
|
|
58
|
+
"src/types/tracked.js"(exports) {
|
|
59
|
+
"use strict";
|
|
60
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61
|
+
}
|
|
62
|
+
});
|
|
51
63
|
|
|
52
|
-
// src/
|
|
53
|
-
var
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
frame,
|
|
60
|
-
timestamp: frame.timestamp,
|
|
61
|
-
rawDetections,
|
|
62
|
-
trackedDetections: [],
|
|
63
|
-
events: [],
|
|
64
|
-
metadata: {}
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
function enrichContext(ctx, updates) {
|
|
68
|
-
return {
|
|
69
|
-
...ctx,
|
|
70
|
-
trackedDetections: updates.trackedDetections ?? ctx.trackedDetections,
|
|
71
|
-
events: updates.events ?? ctx.events,
|
|
72
|
-
metadata: updates.metadata ? { ...ctx.metadata, ...updates.metadata } : ctx.metadata
|
|
73
|
-
};
|
|
74
|
-
}
|
|
64
|
+
// src/types/events.js
|
|
65
|
+
var require_events = __commonJS({
|
|
66
|
+
"src/types/events.js"(exports) {
|
|
67
|
+
"use strict";
|
|
68
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69
|
+
}
|
|
70
|
+
});
|
|
75
71
|
|
|
76
|
-
// src/
|
|
77
|
-
var
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
};
|
|
72
|
+
// src/types/config.js
|
|
73
|
+
var require_config = __commonJS({
|
|
74
|
+
"src/types/config.js"(exports) {
|
|
75
|
+
"use strict";
|
|
76
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
77
|
+
}
|
|
78
|
+
});
|
|
83
79
|
|
|
84
|
-
// src/
|
|
85
|
-
var
|
|
86
|
-
"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
80
|
+
// src/types/entities.js
|
|
81
|
+
var require_entities = __commonJS({
|
|
82
|
+
"src/types/entities.js"(exports) {
|
|
83
|
+
"use strict";
|
|
84
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
// src/types/zones.js
|
|
89
|
+
var require_zones = __commonJS({
|
|
90
|
+
"src/types/zones.js"(exports) {
|
|
91
|
+
"use strict";
|
|
92
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
// src/types/models.js
|
|
97
|
+
var require_models = __commonJS({
|
|
98
|
+
"src/types/models.js"(exports) {
|
|
99
|
+
"use strict";
|
|
100
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
// src/types/pipeline.js
|
|
105
|
+
var require_pipeline = __commonJS({
|
|
106
|
+
"src/types/pipeline.js"(exports) {
|
|
107
|
+
"use strict";
|
|
108
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
// src/types/live-state.js
|
|
113
|
+
var require_live_state = __commonJS({
|
|
114
|
+
"src/types/live-state.js"(exports) {
|
|
115
|
+
"use strict";
|
|
116
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
// src/types/analytics.js
|
|
121
|
+
var require_analytics = __commonJS({
|
|
122
|
+
"src/types/analytics.js"(exports) {
|
|
123
|
+
"use strict";
|
|
124
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
// src/interfaces/storage-backend.js
|
|
129
|
+
var require_storage_backend = __commonJS({
|
|
130
|
+
"src/interfaces/storage-backend.js"(exports) {
|
|
131
|
+
"use strict";
|
|
132
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
133
|
+
exports.DEFAULT_LOCATION_SUBPATHS = void 0;
|
|
134
|
+
exports.DEFAULT_LOCATION_SUBPATHS = {
|
|
135
|
+
"recordings-high": "recordings-high",
|
|
136
|
+
"recordings-low": "recordings-low",
|
|
137
|
+
"recordings-clips": "recordings-clips",
|
|
138
|
+
"event-images": "event-images",
|
|
139
|
+
"models": "models",
|
|
140
|
+
"addons-data": "addons-data",
|
|
141
|
+
"cache": "/tmp/camstack-cache",
|
|
142
|
+
"logs": "logs"
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
// src/interfaces/addon-i18n.js
|
|
148
|
+
var require_addon_i18n = __commonJS({
|
|
149
|
+
"src/interfaces/addon-i18n.js"(exports) {
|
|
150
|
+
"use strict";
|
|
151
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
152
|
+
exports.resolveTranslation = resolveTranslation2;
|
|
153
|
+
function resolveTranslation2(provider, locale, key) {
|
|
154
|
+
if (provider.getTranslations) {
|
|
155
|
+
const map = provider.getTranslations(locale);
|
|
156
|
+
if (map && key in map)
|
|
157
|
+
return map[key];
|
|
158
|
+
if (locale !== "en") {
|
|
159
|
+
const fallback = provider.getTranslations("en");
|
|
160
|
+
if (fallback && key in fallback)
|
|
161
|
+
return fallback[key];
|
|
133
162
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
id: "logging-settings",
|
|
145
|
-
title: "Logging",
|
|
146
|
-
description: "Global log verbosity. Retention is managed per log-destination addon.",
|
|
147
|
-
columns: 1,
|
|
148
|
-
fields: [
|
|
149
|
-
{
|
|
150
|
-
type: "select",
|
|
151
|
-
key: "level",
|
|
152
|
-
label: "Log Level",
|
|
153
|
-
options: [
|
|
154
|
-
{ value: "debug", label: "Debug" },
|
|
155
|
-
{ value: "info", label: "Info" },
|
|
156
|
-
{ value: "warn", label: "Warn" },
|
|
157
|
-
{ value: "error", label: "Error" }
|
|
158
|
-
]
|
|
163
|
+
}
|
|
164
|
+
if (provider.getTranslationBundle) {
|
|
165
|
+
const bundle = provider.getTranslationBundle();
|
|
166
|
+
const map = bundle[locale];
|
|
167
|
+
if (map && key in map)
|
|
168
|
+
return map[key];
|
|
169
|
+
if (locale !== "en") {
|
|
170
|
+
const fallback = bundle["en"];
|
|
171
|
+
if (fallback && key in fallback)
|
|
172
|
+
return fallback[key];
|
|
159
173
|
}
|
|
160
|
-
|
|
174
|
+
}
|
|
175
|
+
return key;
|
|
161
176
|
}
|
|
162
|
-
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
// src/interfaces/feature-flags.js
|
|
181
|
+
var require_feature_flags = __commonJS({
|
|
182
|
+
"src/interfaces/feature-flags.js"(exports) {
|
|
183
|
+
"use strict";
|
|
184
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
185
|
+
exports.DEFAULT_FEATURES = void 0;
|
|
186
|
+
exports.DEFAULT_FEATURES = {
|
|
187
|
+
streaming: true,
|
|
188
|
+
notifications: true,
|
|
189
|
+
objectDetection: false,
|
|
190
|
+
remoteAccess: true,
|
|
191
|
+
agentCluster: false,
|
|
192
|
+
smartHome: true,
|
|
193
|
+
recordings: true,
|
|
194
|
+
backup: true,
|
|
195
|
+
repl: true
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
// src/interfaces/agent-protocol.js
|
|
201
|
+
var require_agent_protocol = __commonJS({
|
|
202
|
+
"src/interfaces/agent-protocol.js"(exports) {
|
|
203
|
+
"use strict";
|
|
204
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
205
|
+
exports.BINARY_FRAME_TYPE = exports.BINARY_FRAME_HEADER_SIZE = void 0;
|
|
206
|
+
exports.BINARY_FRAME_HEADER_SIZE = 29;
|
|
207
|
+
exports.BINARY_FRAME_TYPE = 1;
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
// src/interfaces/server-analysis.js
|
|
212
|
+
var require_server_analysis = __commonJS({
|
|
213
|
+
"src/interfaces/server-analysis.js"(exports) {
|
|
214
|
+
"use strict";
|
|
215
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
216
|
+
exports.RECOGNITION_TYPES = exports.SUB_DETECTION_TYPES = exports.DETECTION_TYPES = void 0;
|
|
217
|
+
exports.createAnalysisContext = createAnalysisContext;
|
|
218
|
+
exports.enrichContext = enrichContext;
|
|
219
|
+
exports.DETECTION_TYPES = ["person", "vehicle", "animal", "package"];
|
|
220
|
+
exports.SUB_DETECTION_TYPES = ["face", "plate"];
|
|
221
|
+
exports.RECOGNITION_TYPES = ["face", "plate", "clip", "custom"];
|
|
222
|
+
function createAnalysisContext(deviceId, frame, rawDetections) {
|
|
223
|
+
return {
|
|
224
|
+
deviceId,
|
|
225
|
+
frame,
|
|
226
|
+
timestamp: frame.timestamp,
|
|
227
|
+
rawDetections,
|
|
228
|
+
trackedDetections: [],
|
|
229
|
+
events: [],
|
|
230
|
+
metadata: {}
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
function enrichContext(ctx, updates) {
|
|
234
|
+
return {
|
|
235
|
+
...ctx,
|
|
236
|
+
trackedDetections: updates.trackedDetections ?? ctx.trackedDetections,
|
|
237
|
+
events: updates.events ?? ctx.events,
|
|
238
|
+
metadata: updates.metadata ? { ...ctx.metadata, ...updates.metadata } : ctx.metadata
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
|
|
244
|
+
// src/interfaces/analysis-persistence.js
|
|
245
|
+
var require_analysis_persistence = __commonJS({
|
|
246
|
+
"src/interfaces/analysis-persistence.js"(exports) {
|
|
247
|
+
"use strict";
|
|
248
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
249
|
+
exports.DEFAULT_RETENTION = void 0;
|
|
250
|
+
exports.DEFAULT_RETENTION = {
|
|
251
|
+
cleanupIntervalMs: 60 * 60 * 1e3,
|
|
252
|
+
detectionEventsDays: 30,
|
|
253
|
+
audioLevelsDays: 7,
|
|
254
|
+
snapshotsDays: 14
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
// src/schemas/system-settings-schemas.js
|
|
260
|
+
var require_system_settings_schemas = __commonJS({
|
|
261
|
+
"src/schemas/system-settings-schemas.js"(exports) {
|
|
262
|
+
"use strict";
|
|
263
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
264
|
+
exports.SYSTEM_SETTINGS_SCHEMAS = exports.SETTINGS_TABS = exports.READ_ONLY_SECTIONS = void 0;
|
|
265
|
+
exports.getSystemSettingsSchema = getSystemSettingsSchema;
|
|
266
|
+
exports.READ_ONLY_SECTIONS = /* @__PURE__ */ new Set([
|
|
267
|
+
"server"
|
|
268
|
+
]);
|
|
269
|
+
exports.SETTINGS_TABS = [
|
|
270
|
+
{ id: "server", label: "Server" },
|
|
271
|
+
{ id: "logging", label: "Logs" },
|
|
272
|
+
{ id: "recording", label: "Recording" },
|
|
273
|
+
{ id: "ffmpeg", label: "FFmpeg" },
|
|
274
|
+
{ id: "detection", label: "Detection" },
|
|
275
|
+
{ id: "auth", label: "Auth" },
|
|
276
|
+
{ id: "retention", label: "Retention" }
|
|
277
|
+
];
|
|
278
|
+
var SERVER_SCHEMA = {
|
|
279
|
+
sections: [
|
|
182
280
|
{
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
281
|
+
id: "server-info",
|
|
282
|
+
title: "Server",
|
|
283
|
+
description: "Core server connection settings (read-only)",
|
|
284
|
+
columns: 2,
|
|
285
|
+
fields: [
|
|
286
|
+
{
|
|
287
|
+
type: "info",
|
|
288
|
+
key: "server-restart-note",
|
|
289
|
+
label: "Restart required",
|
|
290
|
+
content: "Server settings are read-only. Change them in config.yaml and restart.",
|
|
291
|
+
variant: "warning"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
type: "text",
|
|
295
|
+
key: "port",
|
|
296
|
+
label: "Port",
|
|
297
|
+
disabled: true,
|
|
298
|
+
description: "Listening port"
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
type: "text",
|
|
302
|
+
key: "host",
|
|
303
|
+
label: "Host",
|
|
304
|
+
disabled: true,
|
|
305
|
+
description: "Bind address"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
type: "text",
|
|
309
|
+
key: "dataPath",
|
|
310
|
+
label: "Data Path",
|
|
311
|
+
disabled: true,
|
|
312
|
+
description: "Root data directory",
|
|
313
|
+
span: 2
|
|
314
|
+
}
|
|
315
|
+
]
|
|
191
316
|
}
|
|
192
317
|
]
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
id: "ffmpeg-settings",
|
|
200
|
-
title: "FFmpeg",
|
|
201
|
-
description: "FFmpeg binary and hardware acceleration settings",
|
|
202
|
-
columns: 2,
|
|
203
|
-
fields: [
|
|
318
|
+
};
|
|
319
|
+
var STORAGE_SCHEMA = {
|
|
320
|
+
sections: []
|
|
321
|
+
};
|
|
322
|
+
var LOGGING_SCHEMA = {
|
|
323
|
+
sections: [
|
|
204
324
|
{
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
{ value: "vaapi", label: "VA-API (Linux Intel/AMD)" },
|
|
222
|
-
{ value: "qsv", label: "QSV (Intel Quick Sync)" },
|
|
223
|
-
{ value: "cuda", label: "CUDA (NVIDIA)" }
|
|
325
|
+
id: "logging-settings",
|
|
326
|
+
title: "Logging",
|
|
327
|
+
description: "Global log verbosity. Retention is managed per log-destination addon.",
|
|
328
|
+
columns: 1,
|
|
329
|
+
fields: [
|
|
330
|
+
{
|
|
331
|
+
type: "select",
|
|
332
|
+
key: "level",
|
|
333
|
+
label: "Log Level",
|
|
334
|
+
options: [
|
|
335
|
+
{ value: "debug", label: "Debug" },
|
|
336
|
+
{ value: "info", label: "Info" },
|
|
337
|
+
{ value: "warn", label: "Warn" },
|
|
338
|
+
{ value: "error", label: "Error" }
|
|
339
|
+
]
|
|
340
|
+
}
|
|
224
341
|
]
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
type: "number",
|
|
228
|
-
key: "threadCount",
|
|
229
|
-
label: "Thread Count",
|
|
230
|
-
description: "0 = auto (let FFmpeg decide)",
|
|
231
|
-
min: 0,
|
|
232
|
-
max: 16,
|
|
233
|
-
step: 1
|
|
234
342
|
}
|
|
235
343
|
]
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
var DETECTION_SCHEMA = {
|
|
240
|
-
sections: [
|
|
241
|
-
{
|
|
242
|
-
id: "detection-fps",
|
|
243
|
-
title: "Frame Rates",
|
|
244
|
-
description: "Default analysis frame rates for new cameras",
|
|
245
|
-
columns: 2,
|
|
246
|
-
fields: [
|
|
344
|
+
};
|
|
345
|
+
var RECORDING_SCHEMA = {
|
|
346
|
+
sections: [
|
|
247
347
|
{
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
348
|
+
id: "recording-settings",
|
|
349
|
+
title: "Recording",
|
|
350
|
+
description: "Video recording segment and retention defaults",
|
|
351
|
+
columns: 2,
|
|
352
|
+
fields: [
|
|
353
|
+
{
|
|
354
|
+
type: "number",
|
|
355
|
+
key: "segmentDurationSeconds",
|
|
356
|
+
label: "Segment Duration",
|
|
357
|
+
description: "Length of each recording segment",
|
|
358
|
+
min: 1,
|
|
359
|
+
max: 60,
|
|
360
|
+
step: 1,
|
|
361
|
+
unit: "seconds"
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
type: "number",
|
|
365
|
+
key: "defaultRetentionDays",
|
|
366
|
+
label: "Default Retention",
|
|
367
|
+
description: "Days to keep recordings before auto-delete",
|
|
368
|
+
min: 1,
|
|
369
|
+
max: 365,
|
|
370
|
+
step: 1,
|
|
371
|
+
unit: "days"
|
|
372
|
+
}
|
|
373
|
+
]
|
|
266
374
|
}
|
|
267
375
|
]
|
|
268
|
-
}
|
|
269
|
-
{
|
|
270
|
-
|
|
271
|
-
title: "Thresholds",
|
|
272
|
-
description: "Default confidence and cooldown for detections",
|
|
273
|
-
columns: 2,
|
|
274
|
-
fields: [
|
|
376
|
+
};
|
|
377
|
+
var FFMPEG_SCHEMA = {
|
|
378
|
+
sections: [
|
|
275
379
|
{
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
380
|
+
id: "ffmpeg-settings",
|
|
381
|
+
title: "FFmpeg",
|
|
382
|
+
description: "FFmpeg binary and hardware acceleration settings",
|
|
383
|
+
columns: 2,
|
|
384
|
+
fields: [
|
|
385
|
+
{
|
|
386
|
+
type: "text",
|
|
387
|
+
key: "binaryPath",
|
|
388
|
+
label: "Binary Path",
|
|
389
|
+
description: "Path to ffmpeg executable",
|
|
390
|
+
placeholder: "ffmpeg",
|
|
391
|
+
span: 2
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
type: "select",
|
|
395
|
+
key: "hwAccel",
|
|
396
|
+
label: "Hardware Acceleration",
|
|
397
|
+
description: "GPU decoding/encoding backend",
|
|
398
|
+
options: [
|
|
399
|
+
{ value: "auto", label: "Auto-detect" },
|
|
400
|
+
{ value: "none", label: "None (CPU only)" },
|
|
401
|
+
{ value: "videotoolbox", label: "VideoToolbox (macOS)" },
|
|
402
|
+
{ value: "vaapi", label: "VA-API (Linux Intel/AMD)" },
|
|
403
|
+
{ value: "qsv", label: "QSV (Intel Quick Sync)" },
|
|
404
|
+
{ value: "cuda", label: "CUDA (NVIDIA)" }
|
|
405
|
+
]
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
type: "number",
|
|
409
|
+
key: "threadCount",
|
|
410
|
+
label: "Thread Count",
|
|
411
|
+
description: "0 = auto (let FFmpeg decide)",
|
|
412
|
+
min: 0,
|
|
413
|
+
max: 16,
|
|
414
|
+
step: 1
|
|
415
|
+
}
|
|
416
|
+
]
|
|
294
417
|
}
|
|
295
418
|
]
|
|
296
|
-
}
|
|
297
|
-
{
|
|
298
|
-
|
|
299
|
-
title: "Tracker",
|
|
300
|
-
description: "SORT/IoU tracker parameters",
|
|
301
|
-
columns: 3,
|
|
302
|
-
fields: [
|
|
419
|
+
};
|
|
420
|
+
var DETECTION_SCHEMA = {
|
|
421
|
+
sections: [
|
|
303
422
|
{
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
423
|
+
id: "detection-fps",
|
|
424
|
+
title: "Frame Rates",
|
|
425
|
+
description: "Default analysis frame rates for new cameras",
|
|
426
|
+
columns: 2,
|
|
427
|
+
fields: [
|
|
428
|
+
{
|
|
429
|
+
type: "number",
|
|
430
|
+
key: "defaultMotionFps",
|
|
431
|
+
label: "Motion FPS",
|
|
432
|
+
description: "Frames per second for motion detection",
|
|
433
|
+
min: 1,
|
|
434
|
+
max: 30,
|
|
435
|
+
step: 1,
|
|
436
|
+
unit: "fps"
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
type: "number",
|
|
440
|
+
key: "defaultDetectionFps",
|
|
441
|
+
label: "Detection FPS",
|
|
442
|
+
description: "Frames per second for object detection",
|
|
443
|
+
min: 1,
|
|
444
|
+
max: 30,
|
|
445
|
+
step: 1,
|
|
446
|
+
unit: "fps"
|
|
447
|
+
}
|
|
448
|
+
]
|
|
312
449
|
},
|
|
313
450
|
{
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
451
|
+
id: "detection-thresholds",
|
|
452
|
+
title: "Thresholds",
|
|
453
|
+
description: "Default confidence and cooldown for detections",
|
|
454
|
+
columns: 2,
|
|
455
|
+
fields: [
|
|
456
|
+
{
|
|
457
|
+
type: "slider",
|
|
458
|
+
key: "defaultConfidenceThreshold",
|
|
459
|
+
label: "Confidence Threshold",
|
|
460
|
+
description: "Minimum confidence to trigger a detection event",
|
|
461
|
+
min: 0.1,
|
|
462
|
+
max: 1,
|
|
463
|
+
step: 0.05,
|
|
464
|
+
showValue: true
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
type: "number",
|
|
468
|
+
key: "defaultCooldownSeconds",
|
|
469
|
+
label: "Cooldown",
|
|
470
|
+
description: "Seconds between duplicate events",
|
|
471
|
+
min: 0,
|
|
472
|
+
max: 300,
|
|
473
|
+
step: 1,
|
|
474
|
+
unit: "seconds"
|
|
475
|
+
}
|
|
476
|
+
]
|
|
321
477
|
},
|
|
322
478
|
{
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
479
|
+
id: "detection-tracker",
|
|
480
|
+
title: "Tracker",
|
|
481
|
+
description: "SORT/IoU tracker parameters",
|
|
482
|
+
columns: 3,
|
|
483
|
+
fields: [
|
|
484
|
+
{
|
|
485
|
+
type: "number",
|
|
486
|
+
key: "trackerMaxAgeFrames",
|
|
487
|
+
label: "Max Age",
|
|
488
|
+
description: "Frames before a lost track is removed",
|
|
489
|
+
min: 1,
|
|
490
|
+
max: 120,
|
|
491
|
+
step: 1,
|
|
492
|
+
unit: "frames"
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
type: "number",
|
|
496
|
+
key: "trackerMinHits",
|
|
497
|
+
label: "Min Hits",
|
|
498
|
+
description: "Consecutive detections to confirm a track",
|
|
499
|
+
min: 1,
|
|
500
|
+
max: 20,
|
|
501
|
+
step: 1
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
type: "slider",
|
|
505
|
+
key: "trackerIouThreshold",
|
|
506
|
+
label: "IoU Threshold",
|
|
507
|
+
description: "Minimum IoU to associate detection with track",
|
|
508
|
+
min: 0.1,
|
|
509
|
+
max: 0.9,
|
|
510
|
+
step: 0.05,
|
|
511
|
+
showValue: true
|
|
512
|
+
}
|
|
513
|
+
]
|
|
331
514
|
}
|
|
332
515
|
]
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
var AUTH_SCHEMA = {
|
|
337
|
-
sections: [
|
|
338
|
-
{
|
|
339
|
-
id: "auth-settings",
|
|
340
|
-
title: "Authentication",
|
|
341
|
-
description: "Token and session settings",
|
|
342
|
-
columns: 1,
|
|
343
|
-
fields: [
|
|
516
|
+
};
|
|
517
|
+
var AUTH_SCHEMA = {
|
|
518
|
+
sections: [
|
|
344
519
|
{
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
520
|
+
id: "auth-settings",
|
|
521
|
+
title: "Authentication",
|
|
522
|
+
description: "Token and session settings",
|
|
523
|
+
columns: 1,
|
|
524
|
+
fields: [
|
|
525
|
+
{
|
|
526
|
+
type: "text",
|
|
527
|
+
key: "tokenExpiry",
|
|
528
|
+
label: "Token Expiry",
|
|
529
|
+
description: "JWT token lifetime (e.g. 24h, 7d, 1h)",
|
|
530
|
+
placeholder: "24h"
|
|
531
|
+
}
|
|
532
|
+
]
|
|
350
533
|
}
|
|
351
534
|
]
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
var RETENTION_SCHEMA = {
|
|
356
|
-
sections: [
|
|
357
|
-
{
|
|
358
|
-
id: "retention-settings",
|
|
359
|
-
title: "Retention",
|
|
360
|
-
description: "Data retention periods for analytics data",
|
|
361
|
-
columns: 1,
|
|
362
|
-
fields: [
|
|
363
|
-
{
|
|
364
|
-
type: "slider",
|
|
365
|
-
key: "detectionEventsDays",
|
|
366
|
-
label: "Detection Events Retention",
|
|
367
|
-
min: 1,
|
|
368
|
-
max: 365,
|
|
369
|
-
unit: "days",
|
|
370
|
-
showValue: true,
|
|
371
|
-
span: 1
|
|
372
|
-
},
|
|
535
|
+
};
|
|
536
|
+
var RETENTION_SCHEMA = {
|
|
537
|
+
sections: [
|
|
373
538
|
{
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
539
|
+
id: "retention-settings",
|
|
540
|
+
title: "Retention",
|
|
541
|
+
description: "Data retention periods for analytics data",
|
|
542
|
+
columns: 1,
|
|
543
|
+
fields: [
|
|
544
|
+
{
|
|
545
|
+
type: "slider",
|
|
546
|
+
key: "detectionEventsDays",
|
|
547
|
+
label: "Detection Events Retention",
|
|
548
|
+
min: 1,
|
|
549
|
+
max: 365,
|
|
550
|
+
unit: "days",
|
|
551
|
+
showValue: true,
|
|
552
|
+
span: 1
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
type: "slider",
|
|
556
|
+
key: "audioLevelsDays",
|
|
557
|
+
label: "Audio Levels Retention",
|
|
558
|
+
min: 1,
|
|
559
|
+
max: 90,
|
|
560
|
+
unit: "days",
|
|
561
|
+
showValue: true,
|
|
562
|
+
span: 1
|
|
563
|
+
}
|
|
564
|
+
]
|
|
382
565
|
}
|
|
383
566
|
]
|
|
567
|
+
};
|
|
568
|
+
exports.SYSTEM_SETTINGS_SCHEMAS = {
|
|
569
|
+
server: SERVER_SCHEMA,
|
|
570
|
+
storage: STORAGE_SCHEMA,
|
|
571
|
+
logging: LOGGING_SCHEMA,
|
|
572
|
+
recording: RECORDING_SCHEMA,
|
|
573
|
+
ffmpeg: FFMPEG_SCHEMA,
|
|
574
|
+
detection: DETECTION_SCHEMA,
|
|
575
|
+
auth: AUTH_SCHEMA,
|
|
576
|
+
retention: RETENTION_SCHEMA,
|
|
577
|
+
// These sections have no UI form — managed programmatically or addon-specific
|
|
578
|
+
streaming: { sections: [] },
|
|
579
|
+
backup: { sections: [] },
|
|
580
|
+
features: { sections: [] },
|
|
581
|
+
addons: { sections: [] }
|
|
582
|
+
};
|
|
583
|
+
function getSystemSettingsSchema(section) {
|
|
584
|
+
return exports.SYSTEM_SETTINGS_SCHEMAS[section];
|
|
384
585
|
}
|
|
385
|
-
|
|
386
|
-
};
|
|
387
|
-
var SYSTEM_SETTINGS_SCHEMAS = {
|
|
388
|
-
server: SERVER_SCHEMA,
|
|
389
|
-
storage: STORAGE_SCHEMA,
|
|
390
|
-
logging: LOGGING_SCHEMA,
|
|
391
|
-
recording: RECORDING_SCHEMA,
|
|
392
|
-
ffmpeg: FFMPEG_SCHEMA,
|
|
393
|
-
detection: DETECTION_SCHEMA,
|
|
394
|
-
auth: AUTH_SCHEMA,
|
|
395
|
-
retention: RETENTION_SCHEMA,
|
|
396
|
-
// These sections have no UI form — managed programmatically or addon-specific
|
|
397
|
-
streaming: { sections: [] },
|
|
398
|
-
backup: { sections: [] },
|
|
399
|
-
features: { sections: [] },
|
|
400
|
-
addons: { sections: [] }
|
|
401
|
-
};
|
|
402
|
-
function getSystemSettingsSchema(section) {
|
|
403
|
-
return SYSTEM_SETTINGS_SCHEMAS[section];
|
|
404
|
-
}
|
|
586
|
+
}
|
|
587
|
+
});
|
|
405
588
|
|
|
406
|
-
// src/constants.
|
|
407
|
-
var
|
|
408
|
-
|
|
589
|
+
// src/constants.js
|
|
590
|
+
var require_constants = __commonJS({
|
|
591
|
+
"src/constants.js"(exports) {
|
|
592
|
+
"use strict";
|
|
593
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
594
|
+
exports.HF_BASE_URL = exports.HF_REPO = void 0;
|
|
595
|
+
exports.HF_REPO = "camstack/camstack-models";
|
|
596
|
+
exports.HF_BASE_URL = `https://huggingface.co/${exports.HF_REPO}/resolve/main`;
|
|
597
|
+
}
|
|
598
|
+
});
|
|
409
599
|
|
|
410
|
-
// src/utils/hf-url.
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
600
|
+
// src/utils/hf-url.js
|
|
601
|
+
var require_hf_url = __commonJS({
|
|
602
|
+
"src/utils/hf-url.js"(exports) {
|
|
603
|
+
"use strict";
|
|
604
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
605
|
+
exports.hfModelUrl = hfModelUrl2;
|
|
606
|
+
function hfModelUrl2(repo, path) {
|
|
607
|
+
return `https://huggingface.co/${repo}/resolve/main/${path}`;
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
});
|
|
414
611
|
|
|
415
|
-
// src/utils/cosine-similarity.
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
612
|
+
// src/utils/cosine-similarity.js
|
|
613
|
+
var require_cosine_similarity = __commonJS({
|
|
614
|
+
"src/utils/cosine-similarity.js"(exports) {
|
|
615
|
+
"use strict";
|
|
616
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
617
|
+
exports.cosineSimilarity = cosineSimilarity2;
|
|
618
|
+
function cosineSimilarity2(a, b) {
|
|
619
|
+
if (a.length !== b.length)
|
|
620
|
+
return 0;
|
|
621
|
+
let dotProduct = 0;
|
|
622
|
+
let normA = 0;
|
|
623
|
+
let normB = 0;
|
|
624
|
+
for (let i = 0; i < a.length; i++) {
|
|
625
|
+
dotProduct += a[i] * b[i];
|
|
626
|
+
normA += a[i] * a[i];
|
|
627
|
+
normB += b[i] * b[i];
|
|
628
|
+
}
|
|
629
|
+
const denom = Math.sqrt(normA) * Math.sqrt(normB);
|
|
630
|
+
return denom === 0 ? 0 : dotProduct / denom;
|
|
631
|
+
}
|
|
425
632
|
}
|
|
426
|
-
|
|
427
|
-
return denom === 0 ? 0 : dotProduct / denom;
|
|
428
|
-
}
|
|
633
|
+
});
|
|
429
634
|
|
|
430
|
-
// src/catalogs/coco-classmap.
|
|
431
|
-
var
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
];
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
635
|
+
// src/catalogs/coco-classmap.js
|
|
636
|
+
var require_coco_classmap = __commonJS({
|
|
637
|
+
"src/catalogs/coco-classmap.js"(exports) {
|
|
638
|
+
"use strict";
|
|
639
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
640
|
+
exports.COCO_TO_MACRO = exports.MACRO_LABELS = exports.COCO_80_LABELS = void 0;
|
|
641
|
+
exports.COCO_80_LABELS = [
|
|
642
|
+
{ id: "person", name: "Person" },
|
|
643
|
+
{ id: "bicycle", name: "Bicycle" },
|
|
644
|
+
{ id: "car", name: "Car" },
|
|
645
|
+
{ id: "motorcycle", name: "Motorcycle" },
|
|
646
|
+
{ id: "airplane", name: "Airplane" },
|
|
647
|
+
{ id: "bus", name: "Bus" },
|
|
648
|
+
{ id: "train", name: "Train" },
|
|
649
|
+
{ id: "truck", name: "Truck" },
|
|
650
|
+
{ id: "boat", name: "Boat" },
|
|
651
|
+
{ id: "traffic light", name: "Traffic Light" },
|
|
652
|
+
{ id: "fire hydrant", name: "Fire Hydrant" },
|
|
653
|
+
{ id: "stop sign", name: "Stop Sign" },
|
|
654
|
+
{ id: "parking meter", name: "Parking Meter" },
|
|
655
|
+
{ id: "bench", name: "Bench" },
|
|
656
|
+
{ id: "bird", name: "Bird" },
|
|
657
|
+
{ id: "cat", name: "Cat" },
|
|
658
|
+
{ id: "dog", name: "Dog" },
|
|
659
|
+
{ id: "horse", name: "Horse" },
|
|
660
|
+
{ id: "sheep", name: "Sheep" },
|
|
661
|
+
{ id: "cow", name: "Cow" },
|
|
662
|
+
{ id: "elephant", name: "Elephant" },
|
|
663
|
+
{ id: "bear", name: "Bear" },
|
|
664
|
+
{ id: "zebra", name: "Zebra" },
|
|
665
|
+
{ id: "giraffe", name: "Giraffe" },
|
|
666
|
+
{ id: "backpack", name: "Backpack" },
|
|
667
|
+
{ id: "umbrella", name: "Umbrella" },
|
|
668
|
+
{ id: "handbag", name: "Handbag" },
|
|
669
|
+
{ id: "tie", name: "Tie" },
|
|
670
|
+
{ id: "suitcase", name: "Suitcase" },
|
|
671
|
+
{ id: "frisbee", name: "Frisbee" },
|
|
672
|
+
{ id: "skis", name: "Skis" },
|
|
673
|
+
{ id: "snowboard", name: "Snowboard" },
|
|
674
|
+
{ id: "sports ball", name: "Sports Ball" },
|
|
675
|
+
{ id: "kite", name: "Kite" },
|
|
676
|
+
{ id: "baseball bat", name: "Baseball Bat" },
|
|
677
|
+
{ id: "baseball glove", name: "Baseball Glove" },
|
|
678
|
+
{ id: "skateboard", name: "Skateboard" },
|
|
679
|
+
{ id: "surfboard", name: "Surfboard" },
|
|
680
|
+
{ id: "tennis racket", name: "Tennis Racket" },
|
|
681
|
+
{ id: "bottle", name: "Bottle" },
|
|
682
|
+
{ id: "wine glass", name: "Wine Glass" },
|
|
683
|
+
{ id: "cup", name: "Cup" },
|
|
684
|
+
{ id: "fork", name: "Fork" },
|
|
685
|
+
{ id: "knife", name: "Knife" },
|
|
686
|
+
{ id: "spoon", name: "Spoon" },
|
|
687
|
+
{ id: "bowl", name: "Bowl" },
|
|
688
|
+
{ id: "banana", name: "Banana" },
|
|
689
|
+
{ id: "apple", name: "Apple" },
|
|
690
|
+
{ id: "sandwich", name: "Sandwich" },
|
|
691
|
+
{ id: "orange", name: "Orange" },
|
|
692
|
+
{ id: "broccoli", name: "Broccoli" },
|
|
693
|
+
{ id: "carrot", name: "Carrot" },
|
|
694
|
+
{ id: "hot dog", name: "Hot Dog" },
|
|
695
|
+
{ id: "pizza", name: "Pizza" },
|
|
696
|
+
{ id: "donut", name: "Donut" },
|
|
697
|
+
{ id: "cake", name: "Cake" },
|
|
698
|
+
{ id: "chair", name: "Chair" },
|
|
699
|
+
{ id: "couch", name: "Couch" },
|
|
700
|
+
{ id: "potted plant", name: "Potted Plant" },
|
|
701
|
+
{ id: "bed", name: "Bed" },
|
|
702
|
+
{ id: "dining table", name: "Dining Table" },
|
|
703
|
+
{ id: "toilet", name: "Toilet" },
|
|
704
|
+
{ id: "tv", name: "TV" },
|
|
705
|
+
{ id: "laptop", name: "Laptop" },
|
|
706
|
+
{ id: "mouse", name: "Mouse" },
|
|
707
|
+
{ id: "remote", name: "Remote" },
|
|
708
|
+
{ id: "keyboard", name: "Keyboard" },
|
|
709
|
+
{ id: "cell phone", name: "Cell Phone" },
|
|
710
|
+
{ id: "microwave", name: "Microwave" },
|
|
711
|
+
{ id: "oven", name: "Oven" },
|
|
712
|
+
{ id: "toaster", name: "Toaster" },
|
|
713
|
+
{ id: "sink", name: "Sink" },
|
|
714
|
+
{ id: "refrigerator", name: "Refrigerator" },
|
|
715
|
+
{ id: "book", name: "Book" },
|
|
716
|
+
{ id: "clock", name: "Clock" },
|
|
717
|
+
{ id: "vase", name: "Vase" },
|
|
718
|
+
{ id: "scissors", name: "Scissors" },
|
|
719
|
+
{ id: "teddy bear", name: "Teddy Bear" },
|
|
720
|
+
{ id: "hair drier", name: "Hair Drier" },
|
|
721
|
+
{ id: "toothbrush", name: "Toothbrush" }
|
|
722
|
+
];
|
|
723
|
+
exports.MACRO_LABELS = [
|
|
724
|
+
{ id: "person", name: "Person" },
|
|
725
|
+
{ id: "vehicle", name: "Vehicle" },
|
|
726
|
+
{ id: "animal", name: "Animal" }
|
|
727
|
+
];
|
|
728
|
+
exports.COCO_TO_MACRO = {
|
|
729
|
+
mapping: {
|
|
730
|
+
person: "person",
|
|
731
|
+
bicycle: "vehicle",
|
|
732
|
+
car: "vehicle",
|
|
733
|
+
motorcycle: "vehicle",
|
|
734
|
+
airplane: "vehicle",
|
|
735
|
+
bus: "vehicle",
|
|
736
|
+
train: "vehicle",
|
|
737
|
+
truck: "vehicle",
|
|
738
|
+
boat: "vehicle",
|
|
739
|
+
bird: "animal",
|
|
740
|
+
cat: "animal",
|
|
741
|
+
dog: "animal",
|
|
742
|
+
horse: "animal",
|
|
743
|
+
sheep: "animal",
|
|
744
|
+
cow: "animal",
|
|
745
|
+
elephant: "animal",
|
|
746
|
+
bear: "animal",
|
|
747
|
+
zebra: "animal",
|
|
748
|
+
giraffe: "animal"
|
|
749
|
+
},
|
|
750
|
+
preserveOriginal: true
|
|
751
|
+
};
|
|
752
|
+
}
|
|
753
|
+
});
|
|
542
754
|
|
|
543
|
-
// src/types/device-type.
|
|
544
|
-
var
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
755
|
+
// src/types/device-type.js
|
|
756
|
+
var require_device_type = __commonJS({
|
|
757
|
+
"src/types/device-type.js"(exports) {
|
|
758
|
+
"use strict";
|
|
759
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
760
|
+
exports.DEVICE_TYPE_INFO = exports.DeviceType = void 0;
|
|
761
|
+
var DeviceType2;
|
|
762
|
+
(function(DeviceType3) {
|
|
763
|
+
DeviceType3["Camera"] = "camera";
|
|
764
|
+
})(DeviceType2 || (exports.DeviceType = DeviceType2 = {}));
|
|
765
|
+
exports.DEVICE_TYPE_INFO = {
|
|
766
|
+
[DeviceType2.Camera]: { type: DeviceType2.Camera, label: "Camera", icon: "camera" }
|
|
767
|
+
};
|
|
768
|
+
}
|
|
769
|
+
});
|
|
770
|
+
|
|
771
|
+
// src/index.ts
|
|
772
|
+
var src_exports = {};
|
|
773
|
+
__export(src_exports, {
|
|
774
|
+
COCO_80_LABELS: () => import_coco_classmap.COCO_80_LABELS,
|
|
775
|
+
COCO_TO_MACRO: () => import_coco_classmap.COCO_TO_MACRO,
|
|
776
|
+
DEVICE_TYPE_INFO: () => import_device_type.DEVICE_TYPE_INFO,
|
|
777
|
+
DeviceType: () => import_device_type.DeviceType,
|
|
778
|
+
MACRO_LABELS: () => import_coco_classmap.MACRO_LABELS,
|
|
779
|
+
cosineSimilarity: () => import_cosine_similarity.cosineSimilarity,
|
|
780
|
+
hfModelUrl: () => import_hf_url.hfModelUrl,
|
|
781
|
+
resolveTranslation: () => import_addon_i18n.resolveTranslation
|
|
782
|
+
});
|
|
783
|
+
__reExport(src_exports, __toESM(require_io()));
|
|
784
|
+
__reExport(src_exports, __toESM(require_labels()));
|
|
785
|
+
__reExport(src_exports, __toESM(require_detection()));
|
|
786
|
+
__reExport(src_exports, __toESM(require_tracked()));
|
|
787
|
+
__reExport(src_exports, __toESM(require_events()));
|
|
788
|
+
__reExport(src_exports, __toESM(require_config()));
|
|
789
|
+
__reExport(src_exports, __toESM(require_entities()));
|
|
790
|
+
__reExport(src_exports, __toESM(require_zones()));
|
|
791
|
+
__reExport(src_exports, __toESM(require_models()));
|
|
792
|
+
__reExport(src_exports, __toESM(require_pipeline()));
|
|
793
|
+
__reExport(src_exports, __toESM(require_live_state()));
|
|
794
|
+
__reExport(src_exports, __toESM(require_analytics()));
|
|
795
|
+
__reExport(src_exports, __toESM(require_storage_backend()));
|
|
796
|
+
var import_addon_i18n = __toESM(require_addon_i18n());
|
|
797
|
+
__reExport(src_exports, __toESM(require_feature_flags()));
|
|
798
|
+
__reExport(src_exports, __toESM(require_agent_protocol()));
|
|
799
|
+
__reExport(src_exports, __toESM(require_server_analysis()));
|
|
800
|
+
__reExport(src_exports, __toESM(require_analysis_persistence()));
|
|
801
|
+
__reExport(src_exports, __toESM(require_system_settings_schemas()));
|
|
802
|
+
__reExport(src_exports, __toESM(require_constants()));
|
|
803
|
+
var import_hf_url = __toESM(require_hf_url());
|
|
804
|
+
var import_cosine_similarity = __toESM(require_cosine_similarity());
|
|
805
|
+
var import_coco_classmap = __toESM(require_coco_classmap());
|
|
806
|
+
var import_device_type = __toESM(require_device_type());
|
|
807
|
+
var export_COCO_80_LABELS = import_coco_classmap.COCO_80_LABELS;
|
|
808
|
+
var export_COCO_TO_MACRO = import_coco_classmap.COCO_TO_MACRO;
|
|
809
|
+
var export_DEVICE_TYPE_INFO = import_device_type.DEVICE_TYPE_INFO;
|
|
810
|
+
var export_DeviceType = import_device_type.DeviceType;
|
|
811
|
+
var export_MACRO_LABELS = import_coco_classmap.MACRO_LABELS;
|
|
812
|
+
var export_cosineSimilarity = import_cosine_similarity.cosineSimilarity;
|
|
813
|
+
var export_hfModelUrl = import_hf_url.hfModelUrl;
|
|
814
|
+
var export_resolveTranslation = import_addon_i18n.resolveTranslation;
|
|
551
815
|
export {
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
DEVICE_TYPE_INFO,
|
|
561
|
-
DeviceType,
|
|
562
|
-
HF_BASE_URL,
|
|
563
|
-
HF_REPO,
|
|
564
|
-
MACRO_LABELS,
|
|
565
|
-
READ_ONLY_SECTIONS,
|
|
566
|
-
RECOGNITION_TYPES,
|
|
567
|
-
SETTINGS_TABS,
|
|
568
|
-
SUB_DETECTION_TYPES,
|
|
569
|
-
SYSTEM_SETTINGS_SCHEMAS,
|
|
570
|
-
cosineSimilarity,
|
|
571
|
-
createAnalysisContext,
|
|
572
|
-
enrichContext,
|
|
573
|
-
getSystemSettingsSchema,
|
|
574
|
-
hfModelUrl,
|
|
575
|
-
resolveTranslation
|
|
816
|
+
export_COCO_80_LABELS as COCO_80_LABELS,
|
|
817
|
+
export_COCO_TO_MACRO as COCO_TO_MACRO,
|
|
818
|
+
export_DEVICE_TYPE_INFO as DEVICE_TYPE_INFO,
|
|
819
|
+
export_DeviceType as DeviceType,
|
|
820
|
+
export_MACRO_LABELS as MACRO_LABELS,
|
|
821
|
+
export_cosineSimilarity as cosineSimilarity,
|
|
822
|
+
export_hfModelUrl as hfModelUrl,
|
|
823
|
+
export_resolveTranslation as resolveTranslation
|
|
576
824
|
};
|
|
577
825
|
//# sourceMappingURL=index.mjs.map
|