@camstack/server 1.2.928 → 1.2.929
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/CHANGELOG.md +6 -0
- package/package.json +10 -8
- package/system/dist/addon-id-CVg1_r5E.mjs +39 -0
- package/system/dist/addon-id-Di0lNJ89.js +50 -0
- package/system/dist/addon-pages.cap-Df9FQwN1.js +49 -0
- package/system/dist/addon-pages.cap-DksUlE8j.mjs +44 -0
- package/system/dist/addon-settings.cap-3-TIIMq_.mjs +592 -0
- package/system/dist/addon-settings.cap-DAiE0Nb0.js +651 -0
- package/system/dist/addon-utils.mjs +1 -1
- package/system/dist/addon-widgets.cap-C4jxflbF.js +200 -0
- package/system/dist/addon-widgets.cap-D9m48X78.mjs +183 -0
- package/system/dist/base-addon-DD5dIfcZ.js +4624 -0
- package/system/dist/base-addon-Md14i7pe.mjs +4505 -0
- package/system/dist/base-device-2sL1DMm1.js +1103 -0
- package/system/dist/base-device-IuM1AwXZ.mjs +1098 -0
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +8 -6
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +6 -4
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +8 -6
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +7 -5
- package/system/dist/builtins/alerts/alerts.addon.js +113 -56
- package/system/dist/builtins/alerts/alerts.addon.mjs +60 -3
- package/system/dist/builtins/autotrack/index.js +21 -17
- package/system/dist/builtins/autotrack/index.mjs +5 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +14 -11
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +8 -5
- package/system/dist/builtins/calendars/calendars.addon.js +8 -6
- package/system/dist/builtins/calendars/calendars.addon.mjs +3 -1
- package/system/dist/builtins/camera-grid/index.js +615 -58
- package/system/dist/builtins/camera-grid/index.mjs +558 -1
- package/system/dist/builtins/composer/composer.addon.js +788 -209
- package/system/dist/builtins/composer/composer.addon.mjs +583 -4
- package/system/dist/builtins/console-logging/index.js +4 -3
- package/system/dist/builtins/console-logging/index.mjs +2 -1
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +7887 -381
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +7511 -5
- package/system/dist/builtins/core-notifier/core-notifier.addon.js +731 -21
- package/system/dist/builtins/core-notifier/core-notifier.addon.mjs +711 -1
- package/system/dist/builtins/device-history/device-history.addon.js +110 -31
- package/system/dist/builtins/device-history/device-history.addon.mjs +81 -2
- package/system/dist/builtins/device-manager/device-manager.addon.js +12806 -227
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +12583 -5
- package/system/dist/builtins/hub-forwarder/index.js +4 -3
- package/system/dist/builtins/hub-forwarder/index.mjs +2 -1
- package/system/dist/builtins/keychain/index.js +31 -28
- package/system/dist/builtins/keychain/index.mjs +7 -4
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +15 -12
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +4 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +140 -39
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +106 -6
- package/system/dist/builtins/local-network/local-network.addon.js +43 -39
- package/system/dist/builtins/local-network/local-network.addon.mjs +7 -3
- package/system/dist/builtins/loki-logging/index.js +23 -17
- package/system/dist/builtins/loki-logging/index.mjs +7 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +156 -15
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +151 -10
- package/system/dist/builtins/platform-probe/index.js +25 -23
- package/system/dist/builtins/platform-probe/index.mjs +12 -10
- package/system/dist/builtins/record-entries/index.js +9 -7
- package/system/dist/builtins/record-entries/index.mjs +3 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +4 -4
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +97 -44
- package/system/dist/builtins/snapshot/index.mjs +54 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +5 -4
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +21 -20
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +87 -61
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +29 -3
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +81 -72
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +10 -1
- package/system/dist/builtins/system-config/system-config.addon.js +17 -14
- package/system/dist/builtins/system-config/system-config.addon.mjs +118 -115
- package/system/dist/builtins/winston-logging/index.js +7 -5
- package/system/dist/builtins/winston-logging/index.mjs +3 -1
- package/system/dist/calendars.cap-CaFlShS9.js +155 -0
- package/system/dist/calendars.cap-_C4eD4fi.mjs +138 -0
- package/system/dist/camstack-error-DJ-TUAi1.js +23 -0
- package/system/dist/camstack-error-viZYfcj9.mjs +18 -0
- package/system/dist/cap-call-context-Bd76CbOW.js +95 -0
- package/system/dist/cap-call-context-DNwdgGSQ.mjs +78 -0
- package/system/dist/capability-definition-C2rJdVeX.mjs +177 -0
- package/system/dist/capability-definition-HCmTem8c.js +242 -0
- package/system/dist/{capture-engine-BcuwOSXv.js → capture-engine-DZ0LIUqA.js} +5 -4
- package/system/dist/{capture-engine-Bz7eXFjT.mjs → capture-engine-DiwbjoWp.mjs} +2 -1
- package/system/dist/command-origin-claim-Cief660O.js +35 -0
- package/system/dist/command-origin-claim-D1Wy7Qld.mjs +24 -0
- package/system/dist/composition-sources-Caqv7O7z.mjs +391 -0
- package/system/dist/composition-sources-CgnHjm8Q.js +408 -0
- package/system/dist/{constants-D2etJ02O.js → constants-Ba3FTIHl.js} +1 -1
- package/system/dist/constants-C860Y6U4.js +26 -0
- package/system/dist/{constants-BcUTQd1M.mjs → constants-DB4piTD5.mjs} +1 -1
- package/system/dist/constants-DCLpoF4L.mjs +21 -0
- package/system/dist/coral-accelerators-7o8hqvcN.js +564 -0
- package/system/dist/coral-accelerators-BKcXP59c.mjs +521 -0
- package/system/dist/core-blocks.cap-C6iKAZ-x.mjs +17986 -0
- package/system/dist/core-blocks.cap-LEMqVwxO.js +18705 -0
- package/system/dist/{custom-action-registry-N7flBDwT.mjs → custom-action-registry-B9zFBNVa.mjs} +37 -37
- package/system/dist/custom-actions-BFUSalC9.mjs +25 -0
- package/system/dist/custom-actions-D92NRi2c.js +36 -0
- package/system/dist/database-snapshot.cap-DF38e-0P.js +162 -0
- package/system/dist/database-snapshot.cap-dhrc9xnY.mjs +133 -0
- package/system/dist/declared-device-BWphj9WE.js +303 -0
- package/system/dist/declared-device-CKERA1Hi.mjs +286 -0
- package/system/dist/{device-ca-ExMN3xW3.mjs → device-ca-BLM6fccc.mjs} +2 -1
- package/system/dist/{device-ca-CU8zh9Pi.js → device-ca-C5kJE6mL.js} +7 -6
- package/system/dist/device-certificate-Cddm4Idn.mjs +91 -0
- package/system/dist/device-certificate-CguVACQO.js +162 -0
- package/system/dist/device-identifiers-BQg9EQi1.js +600 -0
- package/system/dist/device-identifiers-iSuQCKmK.mjs +529 -0
- package/system/dist/device-kind-BJ2pfsjw.mjs +78 -0
- package/system/dist/device-kind-CsSiv_YF.js +101 -0
- package/system/dist/device-manager.cap-2abwVLCM.js +2874 -0
- package/system/dist/device-manager.cap-CFZSPfUh.mjs +2749 -0
- package/system/dist/device-provider.cap-3Uvk6f5-.mjs +331 -0
- package/system/dist/device-provider.cap-D7TV2kVH.js +366 -0
- package/system/dist/{device-row-store-CeW_GWh9.mjs → device-row-store-YF3jtmkk.mjs} +4 -1
- package/system/dist/{device-row-store-BMIR-n3m.js → device-row-store-doTfMOqn.js} +12 -9
- package/system/dist/device-transitions.cap-B5w5PYU_.js +860 -0
- package/system/dist/device-transitions.cap-DojcwEuX.mjs +819 -0
- package/system/dist/device-type-CbQsnFdC.js +477 -0
- package/system/dist/device-type-DgEvK3ch.mjs +454 -0
- package/system/dist/entry-kind-D9MuVJCK.mjs +44 -0
- package/system/dist/entry-kind-cq90c--V.js +55 -0
- package/system/dist/error.cap-CSM_SRfR.mjs +3423 -0
- package/system/dist/error.cap-DBhgPeWK.js +3848 -0
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/history-catalog-BKRarIL_.js +831 -0
- package/system/dist/history-catalog-BwTeQ4Mr.mjs +802 -0
- package/system/dist/{hub-identity-Csxx2Q8k.js → hub-identity-BMdR3Mw9.js} +2 -2
- package/system/dist/{hub-identity-CYC1820R.mjs → hub-identity-DjMN9Ac2.mjs} +10 -10
- package/system/dist/{hub-mdns-ciao-By5577HM.js → hub-mdns-ciao--0v1TKME.js} +5 -5
- package/system/dist/{hub-mdns-ciao-CCDxM5qz.mjs → hub-mdns-ciao-DBrtHOcc.mjs} +2 -2
- package/system/dist/index.js +763 -151
- package/system/dist/index.mjs +832 -220
- package/system/dist/integration-instances.cap-Cl9O-k4h.mjs +538 -0
- package/system/dist/integration-instances.cap-dJIxg2_s.js +549 -0
- package/system/dist/keychain-admin.cap-Db_oFX4H.js +425 -0
- package/system/dist/keychain-admin.cap-GtM7gVGG.mjs +396 -0
- package/system/dist/l10n-Bu6aUvSY.mjs +10 -0
- package/system/dist/l10n-CGMvp7NF.js +15 -0
- package/system/dist/labels-DX5S8deC.js +81 -0
- package/system/dist/labels-DsBcU7md.mjs +64 -0
- package/system/dist/{legacy-integration-rows-door-CVwOo5aq.js → legacy-integration-rows-door-B1nzxxr5.js} +2 -2
- package/system/dist/{legacy-integration-rows-door-D9tQOUzh.mjs → legacy-integration-rows-door-nTvo_6jQ.mjs} +1 -1
- package/system/dist/log-destination.cap-CxZzAVaR.mjs +143 -0
- package/system/dist/log-destination.cap-DELPJkZ0.js +148 -0
- package/system/dist/low-power-sleep.cap-7lfVU41N.js +103 -0
- package/system/dist/low-power-sleep.cap-tGPmaZ_V.mjs +92 -0
- package/system/dist/mask-shape-Ci8Co9w0.mjs +57 -0
- package/system/dist/mask-shape-CmPA2fst.js +92 -0
- package/system/dist/metrics-provider.cap-BNmcHDkQ.mjs +405 -0
- package/system/dist/metrics-provider.cap-BcmQUt6l.js +410 -0
- package/system/dist/migration-BMjgkyG2.js +380 -0
- package/system/dist/migration-DRJAtdy7.mjs +321 -0
- package/system/dist/network-access.cap-B5TWLDCC.js +1099 -0
- package/system/dist/network-access.cap-BJnGbE6n.mjs +1004 -0
- package/system/dist/notification-rules.cap-B__YBgnG.js +3422 -0
- package/system/dist/notification-rules.cap-D9ArZlwx.mjs +3357 -0
- package/system/dist/ops-log-CB4pIdqi.mjs +64 -0
- package/system/dist/ops-log-pxt9176Z.js +81 -0
- package/system/dist/pinned-binary-BOhOSNff.js +28 -0
- package/system/dist/pinned-binary-CrIRAi4G.mjs +23 -0
- package/system/dist/platform-probe.cap-1WrMhWHx.js +250 -0
- package/system/dist/platform-probe.cap-BFeqFLtQ.mjs +233 -0
- package/system/dist/prefix-walk-B4b2-9aK.mjs +790 -0
- package/system/dist/prefix-walk-DC0ljmbB.js +843 -0
- package/system/dist/ptz-autotrack.cap-BW7w0zHD.js +229 -0
- package/system/dist/ptz-autotrack.cap-DT2GypXw.mjs +224 -0
- package/system/dist/quantity-D3g5SxsZ.mjs +114 -0
- package/system/dist/quantity-lY1KiTSZ.js +143 -0
- package/system/dist/raw-secret-migration-DxuBFtvi.js +50 -0
- package/system/dist/raw-secret-migration-iv88mLoc.mjs +39 -0
- package/system/dist/record-entries.cap-sMUhTvTU.mjs +75 -0
- package/system/dist/record-entries.cap-ti1C046R.js +80 -0
- package/system/dist/record-kind-DoBfYHCs.js +203 -0
- package/system/dist/record-kind-ub6NXqfh.mjs +162 -0
- package/system/dist/recording-archive.cap-7OrIn9e5.mjs +1299 -0
- package/system/dist/recording-archive.cap-D7bo-QSM.js +1328 -0
- package/system/dist/records.cap-ClcWV64i.js +329 -0
- package/system/dist/records.cap-CwLT2ByG.mjs +294 -0
- package/system/dist/relocate-CdVQAk-w.js +804 -0
- package/system/dist/relocate-CoZZTui1.mjs +661 -0
- package/system/dist/rename-composition-block-7WIICIDq.mjs +33525 -0
- package/system/dist/rename-composition-block-CcWLwVhG.js +34692 -0
- package/system/dist/{restore-archive-BJfyu0sG.mjs → restore-archive-CjAyKpgX.mjs} +96 -94
- package/system/dist/{restore-archive-CIFvqOze.js → restore-archive-CkTkv3Ss.js} +6 -4
- package/system/dist/scoped-settings-CylSSq_8.js +955 -0
- package/system/dist/scoped-settings-DVWUIP7Z.mjs +650 -0
- package/system/dist/server-name-BIhLuHvX.mjs +35 -0
- package/system/dist/server-name-OALNvpqC.js +52 -0
- package/system/dist/settings-store.cap-Ci4F2zul.mjs +569 -0
- package/system/dist/settings-store.cap-wlJhCspr.js +640 -0
- package/system/dist/snapshot.cap-3suPdBHV.js +250 -0
- package/system/dist/snapshot.cap-Bs8Oyaqh.mjs +245 -0
- package/system/dist/source-info-DGB7SdB_.mjs +190 -0
- package/system/dist/source-info-DtWf4k2j.js +225 -0
- package/system/dist/storage-admin.cap-BSv1NjKJ.mjs +883 -0
- package/system/dist/storage-admin.cap-he0OqvVM.js +906 -0
- package/system/dist/storage-location-CBT8GCD6.mjs +163 -0
- package/system/dist/storage-location-CTweDMZf.js +198 -0
- package/system/dist/storage-location-mode-B21UVRRX.mjs +167 -0
- package/system/dist/storage-location-mode-CS4sMzo-.js +232 -0
- package/system/dist/storage-migration.cap-CyyATY_p.js +330 -0
- package/system/dist/storage-migration.cap-D7QqGobp.mjs +313 -0
- package/system/dist/storage-occupancy.cap-2rmnS58Z.js +622 -0
- package/system/dist/storage-occupancy.cap-CqBztTl9.mjs +611 -0
- package/system/dist/storage-provider.cap-Bw0CfxVc.js +213 -0
- package/system/dist/storage-provider.cap-CMeck2w4.mjs +202 -0
- package/system/dist/stream-catalog.cap-Bp7SkgIf.mjs +6560 -0
- package/system/dist/stream-catalog.cap-D3uwePiA.js +6763 -0
- package/system/dist/streaming-shared-B8cXatuU.mjs +431 -0
- package/system/dist/streaming-shared-DQwFZOSi.js +526 -0
- package/system/dist/system-reasons-Be_k1W8g.js +25 -0
- package/system/dist/system-reasons-CYj4qwyS.mjs +20 -0
- package/system/dist/tag-BxLazvVb.js +2138 -0
- package/system/dist/tag-uZBAq6ox.mjs +2073 -0
- package/system/dist/user-management.cap-B9QDu8NE.js +825 -0
- package/system/dist/user-management.cap-DBIi77sB.mjs +766 -0
- package/system/dist/vector-store.cap-DnyfrYDn.js +330 -0
- package/system/dist/vector-store.cap-h2GHWQ1t.mjs +319 -0
- package/system/dist/{wal-maintenance-CTrCPzds.mjs → wal-maintenance-BG01rOn9.mjs} +0 -0
- package/system/dist/{wal-maintenance-dq7T3quB.js → wal-maintenance-DyrebYKF.js} +0 -0
- package/system/dist/zod-secret-DS7mj1bk.js +78 -0
- package/system/dist/zod-secret-zY4nM61M.mjs +73 -0
- package/system/package.json +1 -1
- package/system/dist/composition-sources-BI614LJx.mjs +0 -141
- package/system/dist/composition-sources-v_kkb8A9.js +0 -152
- package/system/dist/coral-accelerators-BSVsBVzt.js +0 -250
- package/system/dist/coral-accelerators-BW3OcrLD.mjs +0 -231
- package/system/dist/dist-BCHMSqzc.mjs +0 -143467
- package/system/dist/dist-BZfvhfS1.js +0 -146970
- package/system/dist/prefix-walk-DAOBSyH1.mjs +0 -88
- package/system/dist/prefix-walk-Dv6MLZlM.js +0 -99
- package/system/dist/rename-composition-block-C9HuBrKS.js +0 -112
- package/system/dist/rename-composition-block-DtaYmYAR.mjs +0 -101
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
const require_capability_definition = require("./capability-definition-HCmTem8c.js");
|
|
2
|
+
const require_quantity = require("./quantity-lY1KiTSZ.js");
|
|
3
|
+
const require_device_type = require("./device-type-CbQsnFdC.js");
|
|
4
|
+
const require_l10n = require("./l10n-CGMvp7NF.js");
|
|
5
|
+
let zod = require("zod");
|
|
6
|
+
//#region ../types/dist/esm/capabilities/ptz-autotrack.cap.mjs
|
|
7
|
+
/**
|
|
8
|
+
* `ptz-autotrack` — sibling cap of `ptz` that exposes the on-camera
|
|
9
|
+
* smart-tracking subsystem (subject-following). Modeled separately
|
|
10
|
+
* from `ptz` because:
|
|
11
|
+
* - Not every PTZ-capable camera has autotrack (Reolink: yes;
|
|
12
|
+
* Hikvision: model-dependent), so a single combined cap would
|
|
13
|
+
* force every PTZ provider to surface `Unsupported` stubs on
|
|
14
|
+
* half the methods.
|
|
15
|
+
* - The cap's lifecycle is "registered when probed-true" — the
|
|
16
|
+
* binding system can show / hide the UI affordance cleanly via
|
|
17
|
+
* the standard `provider-registered` signal.
|
|
18
|
+
* - Autotrack on/off is a device-state toggle (status), distinct
|
|
19
|
+
* from PTZ's continuous control surface — a status-driven cap
|
|
20
|
+
* fits the existing `setStatus` / `onStatusChanged` pattern
|
|
21
|
+
* better than `ptz`'s discrete-action surface.
|
|
22
|
+
*
|
|
23
|
+
* Settings (cross-vendor consolidation, sourced from Reolink's
|
|
24
|
+
* `setAutotrackingSettings` shape; expandable as Hikvision /
|
|
25
|
+
* Dahua / others land):
|
|
26
|
+
* - `targetType` — vendor target string (people /
|
|
27
|
+
* vehicle / pet / `''` = camera default)
|
|
28
|
+
* - `stopDelaySeconds` — how long to keep tracking a
|
|
29
|
+
* stationary target before stopping
|
|
30
|
+
* (0..300, default 30)
|
|
31
|
+
* - `disappearDelaySeconds` — how long to wait before releasing a
|
|
32
|
+
* target that has left the frame
|
|
33
|
+
* (0..300, default 15)
|
|
34
|
+
*
|
|
35
|
+
* The driver is the source of truth for which settings keys it
|
|
36
|
+
* actually honours; unsupported keys silently fall back to the
|
|
37
|
+
* camera's defaults. Adding a new vendor's setting (e.g. Hikvision's
|
|
38
|
+
* `trackingDuration`) extends the schema below and the
|
|
39
|
+
* `setSettings` payload.
|
|
40
|
+
*/
|
|
41
|
+
var AutotrackTargetTypeSchema = /* @__PURE__ */ zod.z.string().describe("Vendor target string (people/vehicle/pet); empty = camera default");
|
|
42
|
+
var PtzAutotrackSettingsSchema = /* @__PURE__ */ zod.z.object({
|
|
43
|
+
targetType: AutotrackTargetTypeSchema,
|
|
44
|
+
stopDelaySeconds: /* @__PURE__ */ zod.z.number().int().min(0).max(300).meta(/* @__PURE__ */ require_quantity.readingMeta("duration")),
|
|
45
|
+
disappearDelaySeconds: /* @__PURE__ */ zod.z.number().int().min(0).max(300).meta(/* @__PURE__ */ require_quantity.readingMeta("duration"))
|
|
46
|
+
});
|
|
47
|
+
/**
|
|
48
|
+
* One option the camera advertises as a valid `targetType`. Drivers
|
|
49
|
+
* harvest this from their probe data; the UI renders these as the
|
|
50
|
+
* `targetType` select options. Empty array = the camera doesn't
|
|
51
|
+
* expose a target-type selector (auto-only).
|
|
52
|
+
*
|
|
53
|
+
* The `value` is the canonical wire string the cap accepts in
|
|
54
|
+
* `setSettings({targetType})` — drivers use it verbatim when pushing
|
|
55
|
+
* to firmware. The `label` is operator-facing English (translated
|
|
56
|
+
* client-side if the UI supports i18n).
|
|
57
|
+
*/
|
|
58
|
+
var PtzAutotrackTargetOptionSchema = /* @__PURE__ */ zod.z.object({
|
|
59
|
+
value: /* @__PURE__ */ zod.z.string(),
|
|
60
|
+
label: /* @__PURE__ */ zod.z.string()
|
|
61
|
+
});
|
|
62
|
+
var PtzAutotrackStatusSchema = /* @__PURE__ */ zod.z.object({
|
|
63
|
+
/** True when autotrack is currently armed on the camera. */
|
|
64
|
+
enabled: /* @__PURE__ */ zod.z.boolean(),
|
|
65
|
+
/** Ms epoch of the last on/off transition (0 if never observed). */
|
|
66
|
+
lastChangedAt: /* @__PURE__ */ zod.z.number(),
|
|
67
|
+
/** Currently-applied settings the camera reports. Drivers fill
|
|
68
|
+
* this from the firmware GET so the UI can echo what's *really*
|
|
69
|
+
* active vs the operator-typed values in the settings form. */
|
|
70
|
+
currentSettings: /* @__PURE__ */ PtzAutotrackSettingsSchema.nullable(),
|
|
71
|
+
/**
|
|
72
|
+
* Target types the camera advertises. Driver-supplied — Reolink
|
|
73
|
+
* exposes `people` / `vehicle` / `pet`, Hikvision exposes
|
|
74
|
+
* `auto` / `human` / `vehicle` when the `<smartTrackingType>` knob
|
|
75
|
+
* is supported. Empty array = vendor doesn't expose a selector
|
|
76
|
+
* (treat as auto-only). The UI renders these as the `targetType`
|
|
77
|
+
* field options without hardcoding a vendor-specific list.
|
|
78
|
+
*/
|
|
79
|
+
supportedTargetTypes: /* @__PURE__ */ zod.z.array(PtzAutotrackTargetOptionSchema)
|
|
80
|
+
});
|
|
81
|
+
/**
|
|
82
|
+
* Runtime-state slice owned by this cap. Persists the last-known
|
|
83
|
+
* camera-derived snapshot across restarts, so cold-start callers
|
|
84
|
+
* have a meaningful baseline even before the first refresh round-trip.
|
|
85
|
+
*
|
|
86
|
+
* Adds `lastFetchedAt` on top of the status shape so the framework
|
|
87
|
+
* (or the provider) can stale-check before deciding whether to
|
|
88
|
+
* round-trip the camera again.
|
|
89
|
+
*/
|
|
90
|
+
var PtzAutotrackRuntimeStateSchema = /* @__PURE__ */ PtzAutotrackStatusSchema.extend({
|
|
91
|
+
/** Ms epoch of the last successful camera fetch (0 = never). */
|
|
92
|
+
lastFetchedAt: /* @__PURE__ */ zod.z.number() });
|
|
93
|
+
var ptzAutotrackCapability = {
|
|
94
|
+
name: "ptz-autotrack",
|
|
95
|
+
scope: "device",
|
|
96
|
+
deviceNative: true,
|
|
97
|
+
mode: "singleton",
|
|
98
|
+
/**
|
|
99
|
+
* Two kinds of provider behind one name, the same shape `snapshot` uses:
|
|
100
|
+
*
|
|
101
|
+
* - **Native**: the camera's own firmware autotrack, registered per device by
|
|
102
|
+
* the driver when the probe says it exists (Reolink: yes; Hikvision:
|
|
103
|
+
* model-dependent).
|
|
104
|
+
* - **Wrapper**: the emulated implementation (`@camstack/server/system`'s `autotrack` builtin),
|
|
105
|
+
* which follows a subject with `ptz.move` pulses driven by the detection
|
|
106
|
+
* pipeline. `defaultActive: false` — the operator binds it per camera in
|
|
107
|
+
* the bindings UI.
|
|
108
|
+
*
|
|
109
|
+
* The binding chooses WHICH implementation answers; `setEnabled` stays the
|
|
110
|
+
* one switch for the function either way. A camera never has both driving its
|
|
111
|
+
* head, which is the whole reason this is not a second cap with a second
|
|
112
|
+
* toggle (D62, D520).
|
|
113
|
+
*/
|
|
114
|
+
kind: "wrapper",
|
|
115
|
+
defaultActive: false,
|
|
116
|
+
deviceTypes: [require_device_type.DeviceType.Camera],
|
|
117
|
+
deviceConfig: { ui: {
|
|
118
|
+
kind: "widget",
|
|
119
|
+
widgetId: "host/ptz-autotrack",
|
|
120
|
+
tab: "ptz",
|
|
121
|
+
topTab: true,
|
|
122
|
+
label: "Auto-Tracking",
|
|
123
|
+
order: 5
|
|
124
|
+
} },
|
|
125
|
+
methods: {
|
|
126
|
+
/**
|
|
127
|
+
* Read the current on/off state + last-applied settings.
|
|
128
|
+
* Drivers may serve from a cache + refresh on a schedule —
|
|
129
|
+
* callers should NOT poll faster than ~5s.
|
|
130
|
+
*/
|
|
131
|
+
getStatus: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({ deviceId: /* @__PURE__ */ zod.z.number() }), PtzAutotrackStatusSchema),
|
|
132
|
+
/**
|
|
133
|
+
* Arm or disarm autotrack. Resolves once the camera has
|
|
134
|
+
* acknowledged the transition; the `onStatusChanged` event
|
|
135
|
+
* fires shortly after with the live state.
|
|
136
|
+
*/
|
|
137
|
+
setEnabled: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({
|
|
138
|
+
deviceId: /* @__PURE__ */ zod.z.number(),
|
|
139
|
+
enabled: /* @__PURE__ */ zod.z.boolean()
|
|
140
|
+
}), /* @__PURE__ */ zod.z.void(), {
|
|
141
|
+
kind: "mutation",
|
|
142
|
+
actions: [{
|
|
143
|
+
id: "ptz.autotrackOn",
|
|
144
|
+
label: /* @__PURE__ */ require_l10n.t("Autotrack on", "Inseguimento attivo"),
|
|
145
|
+
phrase: /* @__PURE__ */ require_l10n.t("Start autotracking on {device}", "Attiva l’inseguimento automatico su {device}"),
|
|
146
|
+
icon: "crosshair",
|
|
147
|
+
args: { enabled: true }
|
|
148
|
+
}, {
|
|
149
|
+
id: "ptz.autotrackOff",
|
|
150
|
+
label: /* @__PURE__ */ require_l10n.t("Autotrack off", "Inseguimento spento"),
|
|
151
|
+
phrase: /* @__PURE__ */ require_l10n.t("Stop autotracking on {device}", "Disattiva l’inseguimento automatico su {device}"),
|
|
152
|
+
icon: "crosshair",
|
|
153
|
+
args: { enabled: false }
|
|
154
|
+
}]
|
|
155
|
+
}),
|
|
156
|
+
/**
|
|
157
|
+
* Read settings (target type + delays). Mirrors the
|
|
158
|
+
* `getStatus().currentSettings` payload but exposes it as a
|
|
159
|
+
* standalone read for callers that want settings without the
|
|
160
|
+
* status surface around them. `null` until the driver has
|
|
161
|
+
* harvested the firmware state at least once.
|
|
162
|
+
*/
|
|
163
|
+
getSettings: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({ deviceId: /* @__PURE__ */ zod.z.number() }), /* @__PURE__ */ PtzAutotrackSettingsSchema.nullable()),
|
|
164
|
+
/**
|
|
165
|
+
* Update one or more settings. Partial — keys that aren't
|
|
166
|
+
* supplied keep their last persisted value. The driver is
|
|
167
|
+
* responsible for clamping vendor-specific ranges if narrower
|
|
168
|
+
* than the cross-vendor max declared on the schema.
|
|
169
|
+
*/
|
|
170
|
+
setSettings: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({
|
|
171
|
+
deviceId: /* @__PURE__ */ zod.z.number(),
|
|
172
|
+
settings: /* @__PURE__ */ PtzAutotrackSettingsSchema.partial()
|
|
173
|
+
}), /* @__PURE__ */ zod.z.void(), {
|
|
174
|
+
role: "admin",
|
|
175
|
+
kind: "mutation",
|
|
176
|
+
notOperatorFacing: "tracking tuning (target type, delays) — set once on the camera’s PTZ page"
|
|
177
|
+
})
|
|
178
|
+
},
|
|
179
|
+
events: { onStatusChanged: {
|
|
180
|
+
data: /* @__PURE__ */ zod.z.object({
|
|
181
|
+
deviceId: /* @__PURE__ */ zod.z.number(),
|
|
182
|
+
status: PtzAutotrackStatusSchema
|
|
183
|
+
}),
|
|
184
|
+
notOperatorFacing: "the `enabled` state trigger phrases both edges of this change"
|
|
185
|
+
} },
|
|
186
|
+
status: {
|
|
187
|
+
schema: PtzAutotrackStatusSchema,
|
|
188
|
+
kind: "command-driven"
|
|
189
|
+
},
|
|
190
|
+
/**
|
|
191
|
+
* Persistent slice mirrored across restarts. The provider writes
|
|
192
|
+
* here on every successful firmware fetch / settings push;
|
|
193
|
+
* `getStatus` and `getSettings` then read this snapshot synchronously
|
|
194
|
+
* with a stale-driven async refresh in the background. Keeps the
|
|
195
|
+
* fetch / cache / fallback logic out of the four cap methods —
|
|
196
|
+
* they become trampolines over `runtimeState`.
|
|
197
|
+
*/
|
|
198
|
+
runtimeState: PtzAutotrackRuntimeStateSchema,
|
|
199
|
+
/**
|
|
200
|
+
* Runtime-state durability: **session** — mirrors the camera's own autotrack config, re-read on connect.
|
|
201
|
+
*
|
|
202
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
203
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
204
|
+
*/
|
|
205
|
+
durability: "session",
|
|
206
|
+
/**
|
|
207
|
+
* History (D850): none — configuration and capability.
|
|
208
|
+
*/
|
|
209
|
+
history: "none",
|
|
210
|
+
vocabulary: {
|
|
211
|
+
noun: /* @__PURE__ */ require_l10n.t("Autotracking", "Inseguimento automatico"),
|
|
212
|
+
order: 3230,
|
|
213
|
+
state: [{
|
|
214
|
+
kind: "boolean",
|
|
215
|
+
field: "enabled",
|
|
216
|
+
label: /* @__PURE__ */ require_l10n.t("Autotracking", "Inseguimento automatico"),
|
|
217
|
+
whenTrue: /* @__PURE__ */ require_l10n.t("When autotracking is turned on for {device}", "Quando si attiva l’inseguimento automatico di {device}"),
|
|
218
|
+
whenFalse: /* @__PURE__ */ require_l10n.t("When autotracking is turned off for {device}", "Quando si disattiva l’inseguimento automatico di {device}"),
|
|
219
|
+
icon: "crosshair"
|
|
220
|
+
}]
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
//#endregion
|
|
224
|
+
Object.defineProperty(exports, "ptzAutotrackCapability", {
|
|
225
|
+
enumerable: true,
|
|
226
|
+
get: function() {
|
|
227
|
+
return ptzAutotrackCapability;
|
|
228
|
+
}
|
|
229
|
+
});
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { c as method } from "./capability-definition-C2rJdVeX.mjs";
|
|
2
|
+
import { a as readingMeta } from "./quantity-D3g5SxsZ.mjs";
|
|
3
|
+
import { r as DeviceType } from "./device-type-DgEvK3ch.mjs";
|
|
4
|
+
import { t } from "./l10n-Bu6aUvSY.mjs";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
//#region ../types/dist/esm/capabilities/ptz-autotrack.cap.mjs
|
|
7
|
+
/**
|
|
8
|
+
* `ptz-autotrack` — sibling cap of `ptz` that exposes the on-camera
|
|
9
|
+
* smart-tracking subsystem (subject-following). Modeled separately
|
|
10
|
+
* from `ptz` because:
|
|
11
|
+
* - Not every PTZ-capable camera has autotrack (Reolink: yes;
|
|
12
|
+
* Hikvision: model-dependent), so a single combined cap would
|
|
13
|
+
* force every PTZ provider to surface `Unsupported` stubs on
|
|
14
|
+
* half the methods.
|
|
15
|
+
* - The cap's lifecycle is "registered when probed-true" — the
|
|
16
|
+
* binding system can show / hide the UI affordance cleanly via
|
|
17
|
+
* the standard `provider-registered` signal.
|
|
18
|
+
* - Autotrack on/off is a device-state toggle (status), distinct
|
|
19
|
+
* from PTZ's continuous control surface — a status-driven cap
|
|
20
|
+
* fits the existing `setStatus` / `onStatusChanged` pattern
|
|
21
|
+
* better than `ptz`'s discrete-action surface.
|
|
22
|
+
*
|
|
23
|
+
* Settings (cross-vendor consolidation, sourced from Reolink's
|
|
24
|
+
* `setAutotrackingSettings` shape; expandable as Hikvision /
|
|
25
|
+
* Dahua / others land):
|
|
26
|
+
* - `targetType` — vendor target string (people /
|
|
27
|
+
* vehicle / pet / `''` = camera default)
|
|
28
|
+
* - `stopDelaySeconds` — how long to keep tracking a
|
|
29
|
+
* stationary target before stopping
|
|
30
|
+
* (0..300, default 30)
|
|
31
|
+
* - `disappearDelaySeconds` — how long to wait before releasing a
|
|
32
|
+
* target that has left the frame
|
|
33
|
+
* (0..300, default 15)
|
|
34
|
+
*
|
|
35
|
+
* The driver is the source of truth for which settings keys it
|
|
36
|
+
* actually honours; unsupported keys silently fall back to the
|
|
37
|
+
* camera's defaults. Adding a new vendor's setting (e.g. Hikvision's
|
|
38
|
+
* `trackingDuration`) extends the schema below and the
|
|
39
|
+
* `setSettings` payload.
|
|
40
|
+
*/
|
|
41
|
+
var AutotrackTargetTypeSchema = /* @__PURE__ */ z.string().describe("Vendor target string (people/vehicle/pet); empty = camera default");
|
|
42
|
+
var PtzAutotrackSettingsSchema = /* @__PURE__ */ z.object({
|
|
43
|
+
targetType: AutotrackTargetTypeSchema,
|
|
44
|
+
stopDelaySeconds: /* @__PURE__ */ z.number().int().min(0).max(300).meta(/* @__PURE__ */ readingMeta("duration")),
|
|
45
|
+
disappearDelaySeconds: /* @__PURE__ */ z.number().int().min(0).max(300).meta(/* @__PURE__ */ readingMeta("duration"))
|
|
46
|
+
});
|
|
47
|
+
/**
|
|
48
|
+
* One option the camera advertises as a valid `targetType`. Drivers
|
|
49
|
+
* harvest this from their probe data; the UI renders these as the
|
|
50
|
+
* `targetType` select options. Empty array = the camera doesn't
|
|
51
|
+
* expose a target-type selector (auto-only).
|
|
52
|
+
*
|
|
53
|
+
* The `value` is the canonical wire string the cap accepts in
|
|
54
|
+
* `setSettings({targetType})` — drivers use it verbatim when pushing
|
|
55
|
+
* to firmware. The `label` is operator-facing English (translated
|
|
56
|
+
* client-side if the UI supports i18n).
|
|
57
|
+
*/
|
|
58
|
+
var PtzAutotrackTargetOptionSchema = /* @__PURE__ */ z.object({
|
|
59
|
+
value: /* @__PURE__ */ z.string(),
|
|
60
|
+
label: /* @__PURE__ */ z.string()
|
|
61
|
+
});
|
|
62
|
+
var PtzAutotrackStatusSchema = /* @__PURE__ */ z.object({
|
|
63
|
+
/** True when autotrack is currently armed on the camera. */
|
|
64
|
+
enabled: /* @__PURE__ */ z.boolean(),
|
|
65
|
+
/** Ms epoch of the last on/off transition (0 if never observed). */
|
|
66
|
+
lastChangedAt: /* @__PURE__ */ z.number(),
|
|
67
|
+
/** Currently-applied settings the camera reports. Drivers fill
|
|
68
|
+
* this from the firmware GET so the UI can echo what's *really*
|
|
69
|
+
* active vs the operator-typed values in the settings form. */
|
|
70
|
+
currentSettings: /* @__PURE__ */ PtzAutotrackSettingsSchema.nullable(),
|
|
71
|
+
/**
|
|
72
|
+
* Target types the camera advertises. Driver-supplied — Reolink
|
|
73
|
+
* exposes `people` / `vehicle` / `pet`, Hikvision exposes
|
|
74
|
+
* `auto` / `human` / `vehicle` when the `<smartTrackingType>` knob
|
|
75
|
+
* is supported. Empty array = vendor doesn't expose a selector
|
|
76
|
+
* (treat as auto-only). The UI renders these as the `targetType`
|
|
77
|
+
* field options without hardcoding a vendor-specific list.
|
|
78
|
+
*/
|
|
79
|
+
supportedTargetTypes: /* @__PURE__ */ z.array(PtzAutotrackTargetOptionSchema)
|
|
80
|
+
});
|
|
81
|
+
/**
|
|
82
|
+
* Runtime-state slice owned by this cap. Persists the last-known
|
|
83
|
+
* camera-derived snapshot across restarts, so cold-start callers
|
|
84
|
+
* have a meaningful baseline even before the first refresh round-trip.
|
|
85
|
+
*
|
|
86
|
+
* Adds `lastFetchedAt` on top of the status shape so the framework
|
|
87
|
+
* (or the provider) can stale-check before deciding whether to
|
|
88
|
+
* round-trip the camera again.
|
|
89
|
+
*/
|
|
90
|
+
var PtzAutotrackRuntimeStateSchema = /* @__PURE__ */ PtzAutotrackStatusSchema.extend({
|
|
91
|
+
/** Ms epoch of the last successful camera fetch (0 = never). */
|
|
92
|
+
lastFetchedAt: /* @__PURE__ */ z.number() });
|
|
93
|
+
var ptzAutotrackCapability = {
|
|
94
|
+
name: "ptz-autotrack",
|
|
95
|
+
scope: "device",
|
|
96
|
+
deviceNative: true,
|
|
97
|
+
mode: "singleton",
|
|
98
|
+
/**
|
|
99
|
+
* Two kinds of provider behind one name, the same shape `snapshot` uses:
|
|
100
|
+
*
|
|
101
|
+
* - **Native**: the camera's own firmware autotrack, registered per device by
|
|
102
|
+
* the driver when the probe says it exists (Reolink: yes; Hikvision:
|
|
103
|
+
* model-dependent).
|
|
104
|
+
* - **Wrapper**: the emulated implementation (`@camstack/server/system`'s `autotrack` builtin),
|
|
105
|
+
* which follows a subject with `ptz.move` pulses driven by the detection
|
|
106
|
+
* pipeline. `defaultActive: false` — the operator binds it per camera in
|
|
107
|
+
* the bindings UI.
|
|
108
|
+
*
|
|
109
|
+
* The binding chooses WHICH implementation answers; `setEnabled` stays the
|
|
110
|
+
* one switch for the function either way. A camera never has both driving its
|
|
111
|
+
* head, which is the whole reason this is not a second cap with a second
|
|
112
|
+
* toggle (D62, D520).
|
|
113
|
+
*/
|
|
114
|
+
kind: "wrapper",
|
|
115
|
+
defaultActive: false,
|
|
116
|
+
deviceTypes: [DeviceType.Camera],
|
|
117
|
+
deviceConfig: { ui: {
|
|
118
|
+
kind: "widget",
|
|
119
|
+
widgetId: "host/ptz-autotrack",
|
|
120
|
+
tab: "ptz",
|
|
121
|
+
topTab: true,
|
|
122
|
+
label: "Auto-Tracking",
|
|
123
|
+
order: 5
|
|
124
|
+
} },
|
|
125
|
+
methods: {
|
|
126
|
+
/**
|
|
127
|
+
* Read the current on/off state + last-applied settings.
|
|
128
|
+
* Drivers may serve from a cache + refresh on a schedule —
|
|
129
|
+
* callers should NOT poll faster than ~5s.
|
|
130
|
+
*/
|
|
131
|
+
getStatus: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ deviceId: /* @__PURE__ */ z.number() }), PtzAutotrackStatusSchema),
|
|
132
|
+
/**
|
|
133
|
+
* Arm or disarm autotrack. Resolves once the camera has
|
|
134
|
+
* acknowledged the transition; the `onStatusChanged` event
|
|
135
|
+
* fires shortly after with the live state.
|
|
136
|
+
*/
|
|
137
|
+
setEnabled: /* @__PURE__ */ method(/* @__PURE__ */ z.object({
|
|
138
|
+
deviceId: /* @__PURE__ */ z.number(),
|
|
139
|
+
enabled: /* @__PURE__ */ z.boolean()
|
|
140
|
+
}), /* @__PURE__ */ z.void(), {
|
|
141
|
+
kind: "mutation",
|
|
142
|
+
actions: [{
|
|
143
|
+
id: "ptz.autotrackOn",
|
|
144
|
+
label: /* @__PURE__ */ t("Autotrack on", "Inseguimento attivo"),
|
|
145
|
+
phrase: /* @__PURE__ */ t("Start autotracking on {device}", "Attiva l’inseguimento automatico su {device}"),
|
|
146
|
+
icon: "crosshair",
|
|
147
|
+
args: { enabled: true }
|
|
148
|
+
}, {
|
|
149
|
+
id: "ptz.autotrackOff",
|
|
150
|
+
label: /* @__PURE__ */ t("Autotrack off", "Inseguimento spento"),
|
|
151
|
+
phrase: /* @__PURE__ */ t("Stop autotracking on {device}", "Disattiva l’inseguimento automatico su {device}"),
|
|
152
|
+
icon: "crosshair",
|
|
153
|
+
args: { enabled: false }
|
|
154
|
+
}]
|
|
155
|
+
}),
|
|
156
|
+
/**
|
|
157
|
+
* Read settings (target type + delays). Mirrors the
|
|
158
|
+
* `getStatus().currentSettings` payload but exposes it as a
|
|
159
|
+
* standalone read for callers that want settings without the
|
|
160
|
+
* status surface around them. `null` until the driver has
|
|
161
|
+
* harvested the firmware state at least once.
|
|
162
|
+
*/
|
|
163
|
+
getSettings: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ deviceId: /* @__PURE__ */ z.number() }), /* @__PURE__ */ PtzAutotrackSettingsSchema.nullable()),
|
|
164
|
+
/**
|
|
165
|
+
* Update one or more settings. Partial — keys that aren't
|
|
166
|
+
* supplied keep their last persisted value. The driver is
|
|
167
|
+
* responsible for clamping vendor-specific ranges if narrower
|
|
168
|
+
* than the cross-vendor max declared on the schema.
|
|
169
|
+
*/
|
|
170
|
+
setSettings: /* @__PURE__ */ method(/* @__PURE__ */ z.object({
|
|
171
|
+
deviceId: /* @__PURE__ */ z.number(),
|
|
172
|
+
settings: /* @__PURE__ */ PtzAutotrackSettingsSchema.partial()
|
|
173
|
+
}), /* @__PURE__ */ z.void(), {
|
|
174
|
+
role: "admin",
|
|
175
|
+
kind: "mutation",
|
|
176
|
+
notOperatorFacing: "tracking tuning (target type, delays) — set once on the camera’s PTZ page"
|
|
177
|
+
})
|
|
178
|
+
},
|
|
179
|
+
events: { onStatusChanged: {
|
|
180
|
+
data: /* @__PURE__ */ z.object({
|
|
181
|
+
deviceId: /* @__PURE__ */ z.number(),
|
|
182
|
+
status: PtzAutotrackStatusSchema
|
|
183
|
+
}),
|
|
184
|
+
notOperatorFacing: "the `enabled` state trigger phrases both edges of this change"
|
|
185
|
+
} },
|
|
186
|
+
status: {
|
|
187
|
+
schema: PtzAutotrackStatusSchema,
|
|
188
|
+
kind: "command-driven"
|
|
189
|
+
},
|
|
190
|
+
/**
|
|
191
|
+
* Persistent slice mirrored across restarts. The provider writes
|
|
192
|
+
* here on every successful firmware fetch / settings push;
|
|
193
|
+
* `getStatus` and `getSettings` then read this snapshot synchronously
|
|
194
|
+
* with a stale-driven async refresh in the background. Keeps the
|
|
195
|
+
* fetch / cache / fallback logic out of the four cap methods —
|
|
196
|
+
* they become trampolines over `runtimeState`.
|
|
197
|
+
*/
|
|
198
|
+
runtimeState: PtzAutotrackRuntimeStateSchema,
|
|
199
|
+
/**
|
|
200
|
+
* Runtime-state durability: **session** — mirrors the camera's own autotrack config, re-read on connect.
|
|
201
|
+
*
|
|
202
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
203
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
204
|
+
*/
|
|
205
|
+
durability: "session",
|
|
206
|
+
/**
|
|
207
|
+
* History (D850): none — configuration and capability.
|
|
208
|
+
*/
|
|
209
|
+
history: "none",
|
|
210
|
+
vocabulary: {
|
|
211
|
+
noun: /* @__PURE__ */ t("Autotracking", "Inseguimento automatico"),
|
|
212
|
+
order: 3230,
|
|
213
|
+
state: [{
|
|
214
|
+
kind: "boolean",
|
|
215
|
+
field: "enabled",
|
|
216
|
+
label: /* @__PURE__ */ t("Autotracking", "Inseguimento automatico"),
|
|
217
|
+
whenTrue: /* @__PURE__ */ t("When autotracking is turned on for {device}", "Quando si attiva l’inseguimento automatico di {device}"),
|
|
218
|
+
whenFalse: /* @__PURE__ */ t("When autotracking is turned off for {device}", "Quando si disattiva l’inseguimento automatico di {device}"),
|
|
219
|
+
icon: "crosshair"
|
|
220
|
+
}]
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
//#endregion
|
|
224
|
+
export { ptzAutotrackCapability as t };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region ../types/dist/esm/units/quantity.mjs
|
|
3
|
+
var READING_QUANTITIES = [
|
|
4
|
+
"temperature",
|
|
5
|
+
"pressure",
|
|
6
|
+
"speed",
|
|
7
|
+
"precipitation",
|
|
8
|
+
"precipitation-rate",
|
|
9
|
+
"length",
|
|
10
|
+
"area",
|
|
11
|
+
"illuminance",
|
|
12
|
+
"irradiance",
|
|
13
|
+
"power",
|
|
14
|
+
"energy",
|
|
15
|
+
"voltage",
|
|
16
|
+
"current",
|
|
17
|
+
"apparent-power",
|
|
18
|
+
"humidity",
|
|
19
|
+
"percentage",
|
|
20
|
+
"concentration-volume",
|
|
21
|
+
"concentration-mass",
|
|
22
|
+
"concentration-ppb",
|
|
23
|
+
"volume",
|
|
24
|
+
"duration",
|
|
25
|
+
"duration-ms",
|
|
26
|
+
"information",
|
|
27
|
+
"sound-level",
|
|
28
|
+
"signal-level",
|
|
29
|
+
"signal-ratio",
|
|
30
|
+
"frequency",
|
|
31
|
+
"colour-temperature",
|
|
32
|
+
"angle",
|
|
33
|
+
"bitrate",
|
|
34
|
+
"rate",
|
|
35
|
+
"mass",
|
|
36
|
+
"index",
|
|
37
|
+
"ratio",
|
|
38
|
+
"count",
|
|
39
|
+
"none",
|
|
40
|
+
"device"
|
|
41
|
+
];
|
|
42
|
+
var ReadingQuantitySchema = /* @__PURE__ */ z.enum(READING_QUANTITIES);
|
|
43
|
+
var QUANTITY_SET = /* @__PURE__ */ new Set(READING_QUANTITIES);
|
|
44
|
+
function isReadingQuantity(value) {
|
|
45
|
+
return typeof value === "string" && QUANTITY_SET.has(value);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Stored unit symbol for a quantity. `none` means the number is dimensionless
|
|
49
|
+
* (or an index / ratio / count). `device` means the cap has no single unit.
|
|
50
|
+
*/
|
|
51
|
+
var QUANTITY_BASE = {
|
|
52
|
+
temperature: "°C",
|
|
53
|
+
pressure: "hPa",
|
|
54
|
+
speed: "m/s",
|
|
55
|
+
precipitation: "mm",
|
|
56
|
+
"precipitation-rate": "mm/h",
|
|
57
|
+
length: "m",
|
|
58
|
+
area: "m²",
|
|
59
|
+
illuminance: "lx",
|
|
60
|
+
irradiance: "W/m²",
|
|
61
|
+
power: "W",
|
|
62
|
+
energy: "kWh",
|
|
63
|
+
voltage: "V",
|
|
64
|
+
current: "A",
|
|
65
|
+
"apparent-power": "VA",
|
|
66
|
+
humidity: "%",
|
|
67
|
+
percentage: "%",
|
|
68
|
+
"concentration-volume": "ppm",
|
|
69
|
+
"concentration-mass": "µg/m³",
|
|
70
|
+
"concentration-ppb": "ppb",
|
|
71
|
+
volume: "L",
|
|
72
|
+
duration: "s",
|
|
73
|
+
"duration-ms": "ms",
|
|
74
|
+
information: "B",
|
|
75
|
+
"sound-level": "dBFS",
|
|
76
|
+
"signal-level": "dBm",
|
|
77
|
+
"signal-ratio": "dB",
|
|
78
|
+
frequency: "Hz",
|
|
79
|
+
"colour-temperature": "mired",
|
|
80
|
+
angle: "°",
|
|
81
|
+
bitrate: "kbps",
|
|
82
|
+
rate: "fps",
|
|
83
|
+
mass: "kg",
|
|
84
|
+
index: "none",
|
|
85
|
+
ratio: "none",
|
|
86
|
+
count: "none",
|
|
87
|
+
none: "none",
|
|
88
|
+
device: "device"
|
|
89
|
+
};
|
|
90
|
+
/** The stored unit, or `undefined` when the quantity has no unit symbol. */
|
|
91
|
+
function baseUnitOf(quantity) {
|
|
92
|
+
const symbol = QUANTITY_BASE[quantity];
|
|
93
|
+
if (symbol === "none" || symbol === "device") return void 0;
|
|
94
|
+
return symbol;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* History catalog label for a quantity. Index and ratio keep the labels the
|
|
98
|
+
* series already used (`count`, `ratio`). A polymorphic reading has no
|
|
99
|
+
* single label.
|
|
100
|
+
*/
|
|
101
|
+
function historyUnitFor(quantity) {
|
|
102
|
+
if (quantity === "index" || quantity === "count") return "count";
|
|
103
|
+
if (quantity === "ratio") return "ratio";
|
|
104
|
+
return baseUnitOf(quantity);
|
|
105
|
+
}
|
|
106
|
+
function readingMeta(quantity, extras) {
|
|
107
|
+
return {
|
|
108
|
+
quantity,
|
|
109
|
+
...extras?.precision !== void 0 ? { precision: extras.precision } : {},
|
|
110
|
+
...extras?.label !== void 0 ? { label: extras.label } : {}
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
//#endregion
|
|
114
|
+
export { readingMeta as a, isReadingQuantity as i, baseUnitOf as n, historyUnitFor as r, ReadingQuantitySchema as t };
|