@camstack/ui-library 0.1.50 → 0.1.52

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 CHANGED
@@ -13,8 +13,9 @@ import * as __mfHostTrpcClient from "@trpc/client";
13
13
  import { createTRPCClient, createWSClient, httpLink, splitLink, wsLink } from "@trpc/client";
14
14
  import * as __mfHostTrpcReactQuery from "@trpc/react-query";
15
15
  import { createTRPCReact } from "@trpc/react-query";
16
- import { ALL_CAPABILITY_DEFINITIONS, EventCategory, KNOWN_CAP_NAMES, createDeviceProxy } from "@camstack/types";
16
+ import { ALL_CAPABILITY_DEFINITIONS, DeviceExportStatusSchema, EventCategory, ExposedDeviceSchema, KNOWN_CAP_NAMES, createDeviceProxy } from "@camstack/types";
17
17
  import { createSystem } from "@camstack/sdk";
18
+ import { z } from "zod";
18
19
  //#region ../../node_modules/clsx/dist/clsx.mjs
19
20
  function r(e) {
20
21
  var t, f, n = "";
@@ -7968,6 +7969,68 @@ var PowerOff = createLucideIcon("power-off", [
7968
7969
  key: "1ooewy"
7969
7970
  }]
7970
7971
  ]);
7972
+ var QrCode$1 = createLucideIcon("qr-code", [
7973
+ ["rect", {
7974
+ width: "5",
7975
+ height: "5",
7976
+ x: "3",
7977
+ y: "3",
7978
+ rx: "1",
7979
+ key: "1tu5fj"
7980
+ }],
7981
+ ["rect", {
7982
+ width: "5",
7983
+ height: "5",
7984
+ x: "16",
7985
+ y: "3",
7986
+ rx: "1",
7987
+ key: "1v8r4q"
7988
+ }],
7989
+ ["rect", {
7990
+ width: "5",
7991
+ height: "5",
7992
+ x: "3",
7993
+ y: "16",
7994
+ rx: "1",
7995
+ key: "1x03jg"
7996
+ }],
7997
+ ["path", {
7998
+ d: "M21 16h-3a2 2 0 0 0-2 2v3",
7999
+ key: "177gqh"
8000
+ }],
8001
+ ["path", {
8002
+ d: "M21 21v.01",
8003
+ key: "ents32"
8004
+ }],
8005
+ ["path", {
8006
+ d: "M12 7v3a2 2 0 0 1-2 2H7",
8007
+ key: "8crl2c"
8008
+ }],
8009
+ ["path", {
8010
+ d: "M3 12h.01",
8011
+ key: "nlz23k"
8012
+ }],
8013
+ ["path", {
8014
+ d: "M12 3h.01",
8015
+ key: "n36tog"
8016
+ }],
8017
+ ["path", {
8018
+ d: "M12 16v.01",
8019
+ key: "133mhm"
8020
+ }],
8021
+ ["path", {
8022
+ d: "M16 12h1",
8023
+ key: "1slzba"
8024
+ }],
8025
+ ["path", {
8026
+ d: "M21 12v.01",
8027
+ key: "1lwtk9"
8028
+ }],
8029
+ ["path", {
8030
+ d: "M12 21v-1",
8031
+ key: "1880an"
8032
+ }]
8033
+ ]);
7971
8034
  var Radar = createLucideIcon("radar", [
7972
8035
  ["path", {
7973
8036
  d: "M19.07 4.93A10 10 0 0 0 6.99 3.34",
@@ -8153,6 +8216,40 @@ var Server = createLucideIcon("server", [
8153
8216
  key: "nzw8ys"
8154
8217
  }]
8155
8218
  ]);
8219
+ var Share2 = createLucideIcon("share-2", [
8220
+ ["circle", {
8221
+ cx: "18",
8222
+ cy: "5",
8223
+ r: "3",
8224
+ key: "gq8acd"
8225
+ }],
8226
+ ["circle", {
8227
+ cx: "6",
8228
+ cy: "12",
8229
+ r: "3",
8230
+ key: "w7nqdw"
8231
+ }],
8232
+ ["circle", {
8233
+ cx: "18",
8234
+ cy: "19",
8235
+ r: "3",
8236
+ key: "1xt0gg"
8237
+ }],
8238
+ ["line", {
8239
+ x1: "8.59",
8240
+ x2: "15.42",
8241
+ y1: "13.51",
8242
+ y2: "17.49",
8243
+ key: "47mynk"
8244
+ }],
8245
+ ["line", {
8246
+ x1: "15.41",
8247
+ x2: "8.59",
8248
+ y1: "6.51",
8249
+ y2: "10.49",
8250
+ key: "1n3mei"
8251
+ }]
8252
+ ]);
8156
8253
  var Shield = createLucideIcon("shield", [["path", {
8157
8254
  d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
8158
8255
  key: "oel41y"
@@ -8360,6 +8457,10 @@ var TriangleAlert = createLucideIcon("triangle-alert", [
8360
8457
  key: "p32p05"
8361
8458
  }]
8362
8459
  ]);
8460
+ var Unlink2 = createLucideIcon("unlink-2", [["path", {
8461
+ d: "M15 7h2a5 5 0 0 1 0 10h-2m-6 0H7A5 5 0 0 1 7 7h2",
8462
+ key: "1re2ne"
8463
+ }]]);
8363
8464
  var Upload = createLucideIcon("upload", [
8364
8465
  ["path", {
8365
8466
  d: "M12 3v12",
@@ -10780,7 +10881,7 @@ function ProviderBadge({ provider, showLabel = true, className }) {
10780
10881
  }
10781
10882
  //#endregion
10782
10883
  //#region src/composites/version-badge.tsx
10783
- var VARIANT_STYLES = {
10884
+ var VARIANT_STYLES$1 = {
10784
10885
  success: "bg-emerald-400 text-emerald-950",
10785
10886
  warning: "bg-amber-400 text-amber-950",
10786
10887
  danger: "bg-red-400 text-red-950",
@@ -10793,7 +10894,7 @@ var VARIANT_STYLES = {
10793
10894
  */
10794
10895
  function SemanticBadge({ children, variant = "neutral", mono, className }) {
10795
10896
  return /* @__PURE__ */ jsx("span", {
10796
- className: cn("inline-flex items-center rounded-md px-2 py-0.5 text-[11px] font-bold leading-tight", mono && "font-mono", VARIANT_STYLES[variant], className),
10897
+ className: cn("inline-flex items-center rounded-md px-2 py-0.5 text-[11px] font-bold leading-tight", mono && "font-mono", VARIANT_STYLES$1[variant], className),
10797
10898
  children
10798
10899
  });
10799
10900
  }
@@ -10882,6 +10983,55 @@ function EmptyState({ icon: Icon, title, description, action, className }) {
10882
10983
  });
10883
10984
  }
10884
10985
  //#endregion
10986
+ //#region src/composites/error-box.tsx
10987
+ var VARIANT_STYLES = {
10988
+ danger: {
10989
+ box: "border-danger/40 bg-danger/10",
10990
+ icon: "text-danger",
10991
+ title: "text-danger",
10992
+ message: "text-danger"
10993
+ },
10994
+ warning: {
10995
+ box: "border-amber-500/40 bg-amber-500/10",
10996
+ icon: "text-amber-600 dark:text-amber-400",
10997
+ title: "text-amber-700 dark:text-amber-300",
10998
+ message: "text-amber-700 dark:text-amber-300"
10999
+ }
11000
+ };
11001
+ function ErrorBox({ message, title, onRetry, action, variant = "danger", className }) {
11002
+ const styles = VARIANT_STYLES[variant];
11003
+ const Icon = variant === "warning" ? TriangleAlert : CircleAlert;
11004
+ return /* @__PURE__ */ jsxs("div", {
11005
+ role: "alert",
11006
+ className: cn("flex items-start gap-2.5 rounded border px-3 py-2.5", styles.box, className),
11007
+ children: [
11008
+ /* @__PURE__ */ jsx(Icon, {
11009
+ className: cn("h-4 w-4 mt-0.5 shrink-0", styles.icon),
11010
+ "aria-hidden": "true"
11011
+ }),
11012
+ /* @__PURE__ */ jsxs("div", {
11013
+ className: "flex-1 min-w-0",
11014
+ children: [title && /* @__PURE__ */ jsx("p", {
11015
+ className: cn("text-xs font-semibold", styles.title),
11016
+ children: title
11017
+ }), /* @__PURE__ */ jsx("div", {
11018
+ className: cn("text-xs break-words", styles.message, title ? "mt-0.5" : ""),
11019
+ children: message
11020
+ })]
11021
+ }),
11022
+ action ?? (onRetry && /* @__PURE__ */ jsxs("button", {
11023
+ type: "button",
11024
+ onClick: onRetry,
11025
+ className: cn("shrink-0 inline-flex items-center gap-1 rounded px-2 py-1 text-[11px] font-medium", "border border-current/30 hover:bg-current/10 transition-colors", styles.message),
11026
+ children: [/* @__PURE__ */ jsx(RefreshCw, {
11027
+ className: "h-3 w-3",
11028
+ "aria-hidden": "true"
11029
+ }), "Retry"]
11030
+ }))
11031
+ ]
11032
+ });
11033
+ }
11034
+ //#endregion
10885
11035
  //#region src/composites/confirm-dialog.tsx
10886
11036
  var ConfirmContext = createSharedContext("camstack:confirm-dialog", null);
10887
11037
  function useConfirm() {
@@ -15626,6 +15776,16 @@ var useAddonsRollbackPackage = trpc.addons.rollbackPackage.useMutation;
15626
15776
  var useAddonsForceRefresh = trpc.addons.forceRefresh.useMutation;
15627
15777
  /** Generated alias around `trpc.addons.restartServer.useMutation`. */
15628
15778
  var useAddonsRestartServer = trpc.addons.restartServer.useMutation;
15779
+ /** Generated alias around `trpc.addons.getLastRestart.useQuery`. */
15780
+ var useAddonsGetLastRestart = trpc.addons.getLastRestart.useQuery;
15781
+ /** Generated alias around `trpc.addons.listFrameworkPackages.useQuery`. */
15782
+ var useAddonsListFrameworkPackages = trpc.addons.listFrameworkPackages.useQuery;
15783
+ /** Generated alias around `trpc.addons.listCapabilityProviders.useQuery`. */
15784
+ var useAddonsListCapabilityProviders = trpc.addons.listCapabilityProviders.useQuery;
15785
+ /** Generated alias around `trpc.addons.setCapabilityProviderEnabled.useMutation`. */
15786
+ var useAddonsSetCapabilityProviderEnabled = trpc.addons.setCapabilityProviderEnabled.useMutation;
15787
+ /** Generated alias around `trpc.addons.updateFrameworkPackage.useMutation`. */
15788
+ var useAddonsUpdateFrameworkPackage = trpc.addons.updateFrameworkPackage.useMutation;
15629
15789
  /** Generated alias around `trpc.addons.getVersions.useQuery`. */
15630
15790
  var useAddonsGetVersions = trpc.addons.getVersions.useQuery;
15631
15791
  /** Generated alias around `trpc.addons.restartAddon.useMutation`. */
@@ -15714,10 +15874,6 @@ var useAudioCodecListActiveSessions = trpc.audioCodec.listActiveSessions.useQuer
15714
15874
  var useAudioMetricsGetCurrentSnapshot = trpc.audioMetrics.getCurrentSnapshot.useQuery;
15715
15875
  /** Generated alias around `trpc.audioMetrics.getHistory.useQuery`. */
15716
15876
  var useAudioMetricsGetHistory = trpc.audioMetrics.getHistory.useQuery;
15717
- /** Generated alias around `trpc.authentication.listProviders.useQuery`. */
15718
- var useAuthenticationListProviders = trpc.authentication.listProviders.useQuery;
15719
- /** Generated alias around `trpc.authentication.setProviderEnabled.useMutation`. */
15720
- var useAuthenticationSetProviderEnabled = trpc.authentication.setProviderEnabled.useMutation;
15721
15877
  /** Generated alias around `trpc.backup.listDestinations.useQuery`. */
15722
15878
  var useBackupListDestinations = trpc.backup.listDestinations.useQuery;
15723
15879
  /** Generated alias around `trpc.backup.trigger.useMutation`. */
@@ -16010,18 +16166,6 @@ var useMeshNetworkLogout = trpc.meshNetwork.logout.useMutation;
16010
16166
  var useMeshNetworkListPeers = trpc.meshNetwork.listPeers.useQuery;
16011
16167
  /** Generated alias around `trpc.meshNetwork.testConnection.useMutation`. */
16012
16168
  var useMeshNetworkTestConnection = trpc.meshNetwork.testConnection.useMutation;
16013
- /** Generated alias around `trpc.meshOrchestrator.listProviders.useQuery`. */
16014
- var useMeshOrchestratorListProviders = trpc.meshOrchestrator.listProviders.useQuery;
16015
- /** Generated alias around `trpc.meshOrchestrator.joinProvider.useMutation`. */
16016
- var useMeshOrchestratorJoinProvider = trpc.meshOrchestrator.joinProvider.useMutation;
16017
- /** Generated alias around `trpc.meshOrchestrator.leaveProvider.useMutation`. */
16018
- var useMeshOrchestratorLeaveProvider = trpc.meshOrchestrator.leaveProvider.useMutation;
16019
- /** Generated alias around `trpc.meshOrchestrator.startLoginProvider.useMutation`. */
16020
- var useMeshOrchestratorStartLoginProvider = trpc.meshOrchestrator.startLoginProvider.useMutation;
16021
- /** Generated alias around `trpc.meshOrchestrator.logoutProvider.useMutation`. */
16022
- var useMeshOrchestratorLogoutProvider = trpc.meshOrchestrator.logoutProvider.useMutation;
16023
- /** Generated alias around `trpc.meshOrchestrator.listProviderPeers.useQuery`. */
16024
- var useMeshOrchestratorListProviderPeers = trpc.meshOrchestrator.listProviderPeers.useQuery;
16025
16169
  /** Generated alias around `trpc.metricsProvider.collectSnapshot.useQuery`. */
16026
16170
  var useMetricsProviderCollectSnapshot = trpc.metricsProvider.collectSnapshot.useQuery;
16027
16171
  /** Generated alias around `trpc.metricsProvider.getCached.useQuery`. */
@@ -16082,6 +16226,16 @@ var useMqttBrokerStopEmbeddedBroker = trpc.mqttBroker.stopEmbeddedBroker.useMuta
16082
16226
  var useMqttBrokerGetStatus = trpc.mqttBroker.getStatus.useQuery;
16083
16227
  /** Generated alias around `trpc.nativeObjectDetection.getStatus.useQuery`. */
16084
16228
  var useNativeObjectDetectionGetStatus = trpc.nativeObjectDetection.getStatus.useQuery;
16229
+ /** Generated alias around `trpc.networkAccess.start.useMutation`. */
16230
+ var useNetworkAccessStart = trpc.networkAccess.start.useMutation;
16231
+ /** Generated alias around `trpc.networkAccess.stop.useMutation`. */
16232
+ var useNetworkAccessStop = trpc.networkAccess.stop.useMutation;
16233
+ /** Generated alias around `trpc.networkAccess.getEndpoint.useQuery`. */
16234
+ var useNetworkAccessGetEndpoint = trpc.networkAccess.getEndpoint.useQuery;
16235
+ /** Generated alias around `trpc.networkAccess.getStatus.useQuery`. */
16236
+ var useNetworkAccessGetStatus = trpc.networkAccess.getStatus.useQuery;
16237
+ /** Generated alias around `trpc.networkAccess.listEndpoints.useQuery`. */
16238
+ var useNetworkAccessListEndpoints = trpc.networkAccess.listEndpoints.useQuery;
16085
16239
  /** Generated alias around `trpc.networkQuality.getDeviceStats.useQuery`. */
16086
16240
  var useNetworkQualityGetDeviceStats = trpc.networkQuality.getDeviceStats.useQuery;
16087
16241
  /** Generated alias around `trpc.networkQuality.getAllStats.useQuery`. */
@@ -16382,12 +16536,6 @@ var useRecordingEngineGetRetentionConfig = trpc.recordingEngine.getRetentionConf
16382
16536
  var useRecordingEngineUpdateRetentionConfig = trpc.recordingEngine.updateRetentionConfig.useMutation;
16383
16537
  /** Generated alias around `trpc.recordingEngine.getMotionStats.useQuery`. */
16384
16538
  var useRecordingEngineGetMotionStats = trpc.recordingEngine.getMotionStats.useQuery;
16385
- /** Generated alias around `trpc.remoteAccess.listProviders.useQuery`. */
16386
- var useRemoteAccessListProviders = trpc.remoteAccess.listProviders.useQuery;
16387
- /** Generated alias around `trpc.remoteAccess.startProvider.useMutation`. */
16388
- var useRemoteAccessStartProvider = trpc.remoteAccess.startProvider.useMutation;
16389
- /** Generated alias around `trpc.remoteAccess.stopProvider.useMutation`. */
16390
- var useRemoteAccessStopProvider = trpc.remoteAccess.stopProvider.useMutation;
16391
16539
  /** Generated alias around `trpc.settingsStore.get.useQuery`. */
16392
16540
  var useSettingsStoreGet = trpc.settingsStore.get.useQuery;
16393
16541
  /** Generated alias around `trpc.settingsStore.set.useMutation`. */
@@ -16534,12 +16682,6 @@ var useSystemSetRetentionConfig = trpc.system.setRetentionConfig.useMutation;
16534
16682
  var useSystemForceRetentionCleanup = trpc.system.forceRetentionCleanup.useMutation;
16535
16683
  /** Generated alias around `trpc.toast.onToast.useSubscription`. */
16536
16684
  var useToastOnToast = trpc.toast.onToast.useSubscription;
16537
- /** Generated alias around `trpc.turnOrchestrator.listProviders.useQuery`. */
16538
- var useTurnOrchestratorListProviders = trpc.turnOrchestrator.listProviders.useQuery;
16539
- /** Generated alias around `trpc.turnOrchestrator.getAllServers.useQuery`. */
16540
- var useTurnOrchestratorGetAllServers = trpc.turnOrchestrator.getAllServers.useQuery;
16541
- /** Generated alias around `trpc.turnOrchestrator.setProviderEnabled.useMutation`. */
16542
- var useTurnOrchestratorSetProviderEnabled = trpc.turnOrchestrator.setProviderEnabled.useMutation;
16543
16685
  /** Generated alias around `trpc.turnProvider.getTurnServers.useQuery`. */
16544
16686
  var useTurnProviderGetTurnServers = trpc.turnProvider.getTurnServers.useQuery;
16545
16687
  /** Generated alias around `trpc.userManagement.listUsers.useQuery`. */
@@ -20077,6 +20219,1489 @@ function StreamBrokerSelector({ deviceId, value, onChange, disabled, label, clas
20077
20219
  });
20078
20220
  }
20079
20221
  //#endregion
20222
+ //#region ../../node_modules/qrcode.react/lib/esm/index.js
20223
+ var __defProp = Object.defineProperty;
20224
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
20225
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
20226
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
20227
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
20228
+ enumerable: true,
20229
+ configurable: true,
20230
+ writable: true,
20231
+ value
20232
+ }) : obj[key] = value;
20233
+ var __spreadValues = (a, b) => {
20234
+ for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]);
20235
+ if (__getOwnPropSymbols) {
20236
+ for (var prop of __getOwnPropSymbols(b)) if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]);
20237
+ }
20238
+ return a;
20239
+ };
20240
+ var __objRest = (source, exclude) => {
20241
+ var target = {};
20242
+ for (var prop in source) if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
20243
+ if (source != null && __getOwnPropSymbols) {
20244
+ for (var prop of __getOwnPropSymbols(source)) if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) target[prop] = source[prop];
20245
+ }
20246
+ return target;
20247
+ };
20248
+ /**
20249
+ * @license QR Code generator library (TypeScript)
20250
+ * Copyright (c) Project Nayuki.
20251
+ * SPDX-License-Identifier: MIT
20252
+ */
20253
+ var qrcodegen;
20254
+ ((qrcodegen2) => {
20255
+ const _QrCode = class _QrCode {
20256
+ constructor(version, errorCorrectionLevel, dataCodewords, msk) {
20257
+ this.version = version;
20258
+ this.errorCorrectionLevel = errorCorrectionLevel;
20259
+ this.modules = [];
20260
+ this.isFunction = [];
20261
+ if (version < _QrCode.MIN_VERSION || version > _QrCode.MAX_VERSION) throw new RangeError("Version value out of range");
20262
+ if (msk < -1 || msk > 7) throw new RangeError("Mask value out of range");
20263
+ this.size = version * 4 + 17;
20264
+ let row = [];
20265
+ for (let i = 0; i < this.size; i++) row.push(false);
20266
+ for (let i = 0; i < this.size; i++) {
20267
+ this.modules.push(row.slice());
20268
+ this.isFunction.push(row.slice());
20269
+ }
20270
+ this.drawFunctionPatterns();
20271
+ const allCodewords = this.addEccAndInterleave(dataCodewords);
20272
+ this.drawCodewords(allCodewords);
20273
+ if (msk == -1) {
20274
+ let minPenalty = 1e9;
20275
+ for (let i = 0; i < 8; i++) {
20276
+ this.applyMask(i);
20277
+ this.drawFormatBits(i);
20278
+ const penalty = this.getPenaltyScore();
20279
+ if (penalty < minPenalty) {
20280
+ msk = i;
20281
+ minPenalty = penalty;
20282
+ }
20283
+ this.applyMask(i);
20284
+ }
20285
+ }
20286
+ assert(0 <= msk && msk <= 7);
20287
+ this.mask = msk;
20288
+ this.applyMask(msk);
20289
+ this.drawFormatBits(msk);
20290
+ this.isFunction = [];
20291
+ }
20292
+ static encodeText(text, ecl) {
20293
+ const segs = qrcodegen2.QrSegment.makeSegments(text);
20294
+ return _QrCode.encodeSegments(segs, ecl);
20295
+ }
20296
+ static encodeBinary(data, ecl) {
20297
+ const seg = qrcodegen2.QrSegment.makeBytes(data);
20298
+ return _QrCode.encodeSegments([seg], ecl);
20299
+ }
20300
+ static encodeSegments(segs, ecl, minVersion = 1, maxVersion = 40, mask = -1, boostEcl = true) {
20301
+ if (!(_QrCode.MIN_VERSION <= minVersion && minVersion <= maxVersion && maxVersion <= _QrCode.MAX_VERSION) || mask < -1 || mask > 7) throw new RangeError("Invalid value");
20302
+ let version;
20303
+ let dataUsedBits;
20304
+ for (version = minVersion;; version++) {
20305
+ const dataCapacityBits2 = _QrCode.getNumDataCodewords(version, ecl) * 8;
20306
+ const usedBits = QrSegment.getTotalBits(segs, version);
20307
+ if (usedBits <= dataCapacityBits2) {
20308
+ dataUsedBits = usedBits;
20309
+ break;
20310
+ }
20311
+ if (version >= maxVersion) throw new RangeError("Data too long");
20312
+ }
20313
+ for (const newEcl of [
20314
+ _QrCode.Ecc.MEDIUM,
20315
+ _QrCode.Ecc.QUARTILE,
20316
+ _QrCode.Ecc.HIGH
20317
+ ]) if (boostEcl && dataUsedBits <= _QrCode.getNumDataCodewords(version, newEcl) * 8) ecl = newEcl;
20318
+ let bb = [];
20319
+ for (const seg of segs) {
20320
+ appendBits(seg.mode.modeBits, 4, bb);
20321
+ appendBits(seg.numChars, seg.mode.numCharCountBits(version), bb);
20322
+ for (const b of seg.getData()) bb.push(b);
20323
+ }
20324
+ assert(bb.length == dataUsedBits);
20325
+ const dataCapacityBits = _QrCode.getNumDataCodewords(version, ecl) * 8;
20326
+ assert(bb.length <= dataCapacityBits);
20327
+ appendBits(0, Math.min(4, dataCapacityBits - bb.length), bb);
20328
+ appendBits(0, (8 - bb.length % 8) % 8, bb);
20329
+ assert(bb.length % 8 == 0);
20330
+ for (let padByte = 236; bb.length < dataCapacityBits; padByte ^= 253) appendBits(padByte, 8, bb);
20331
+ let dataCodewords = [];
20332
+ while (dataCodewords.length * 8 < bb.length) dataCodewords.push(0);
20333
+ bb.forEach((b, i) => dataCodewords[i >>> 3] |= b << 7 - (i & 7));
20334
+ return new _QrCode(version, ecl, dataCodewords, mask);
20335
+ }
20336
+ getModule(x, y) {
20337
+ return 0 <= x && x < this.size && 0 <= y && y < this.size && this.modules[y][x];
20338
+ }
20339
+ getModules() {
20340
+ return this.modules;
20341
+ }
20342
+ drawFunctionPatterns() {
20343
+ for (let i = 0; i < this.size; i++) {
20344
+ this.setFunctionModule(6, i, i % 2 == 0);
20345
+ this.setFunctionModule(i, 6, i % 2 == 0);
20346
+ }
20347
+ this.drawFinderPattern(3, 3);
20348
+ this.drawFinderPattern(this.size - 4, 3);
20349
+ this.drawFinderPattern(3, this.size - 4);
20350
+ const alignPatPos = this.getAlignmentPatternPositions();
20351
+ const numAlign = alignPatPos.length;
20352
+ for (let i = 0; i < numAlign; i++) for (let j = 0; j < numAlign; j++) if (!(i == 0 && j == 0 || i == 0 && j == numAlign - 1 || i == numAlign - 1 && j == 0)) this.drawAlignmentPattern(alignPatPos[i], alignPatPos[j]);
20353
+ this.drawFormatBits(0);
20354
+ this.drawVersion();
20355
+ }
20356
+ drawFormatBits(mask) {
20357
+ const data = this.errorCorrectionLevel.formatBits << 3 | mask;
20358
+ let rem = data;
20359
+ for (let i = 0; i < 10; i++) rem = rem << 1 ^ (rem >>> 9) * 1335;
20360
+ const bits = (data << 10 | rem) ^ 21522;
20361
+ assert(bits >>> 15 == 0);
20362
+ for (let i = 0; i <= 5; i++) this.setFunctionModule(8, i, getBit(bits, i));
20363
+ this.setFunctionModule(8, 7, getBit(bits, 6));
20364
+ this.setFunctionModule(8, 8, getBit(bits, 7));
20365
+ this.setFunctionModule(7, 8, getBit(bits, 8));
20366
+ for (let i = 9; i < 15; i++) this.setFunctionModule(14 - i, 8, getBit(bits, i));
20367
+ for (let i = 0; i < 8; i++) this.setFunctionModule(this.size - 1 - i, 8, getBit(bits, i));
20368
+ for (let i = 8; i < 15; i++) this.setFunctionModule(8, this.size - 15 + i, getBit(bits, i));
20369
+ this.setFunctionModule(8, this.size - 8, true);
20370
+ }
20371
+ drawVersion() {
20372
+ if (this.version < 7) return;
20373
+ let rem = this.version;
20374
+ for (let i = 0; i < 12; i++) rem = rem << 1 ^ (rem >>> 11) * 7973;
20375
+ const bits = this.version << 12 | rem;
20376
+ assert(bits >>> 18 == 0);
20377
+ for (let i = 0; i < 18; i++) {
20378
+ const color = getBit(bits, i);
20379
+ const a = this.size - 11 + i % 3;
20380
+ const b = Math.floor(i / 3);
20381
+ this.setFunctionModule(a, b, color);
20382
+ this.setFunctionModule(b, a, color);
20383
+ }
20384
+ }
20385
+ drawFinderPattern(x, y) {
20386
+ for (let dy = -4; dy <= 4; dy++) for (let dx = -4; dx <= 4; dx++) {
20387
+ const dist = Math.max(Math.abs(dx), Math.abs(dy));
20388
+ const xx = x + dx;
20389
+ const yy = y + dy;
20390
+ if (0 <= xx && xx < this.size && 0 <= yy && yy < this.size) this.setFunctionModule(xx, yy, dist != 2 && dist != 4);
20391
+ }
20392
+ }
20393
+ drawAlignmentPattern(x, y) {
20394
+ for (let dy = -2; dy <= 2; dy++) for (let dx = -2; dx <= 2; dx++) this.setFunctionModule(x + dx, y + dy, Math.max(Math.abs(dx), Math.abs(dy)) != 1);
20395
+ }
20396
+ setFunctionModule(x, y, isDark) {
20397
+ this.modules[y][x] = isDark;
20398
+ this.isFunction[y][x] = true;
20399
+ }
20400
+ addEccAndInterleave(data) {
20401
+ const ver = this.version;
20402
+ const ecl = this.errorCorrectionLevel;
20403
+ if (data.length != _QrCode.getNumDataCodewords(ver, ecl)) throw new RangeError("Invalid argument");
20404
+ const numBlocks = _QrCode.NUM_ERROR_CORRECTION_BLOCKS[ecl.ordinal][ver];
20405
+ const blockEccLen = _QrCode.ECC_CODEWORDS_PER_BLOCK[ecl.ordinal][ver];
20406
+ const rawCodewords = Math.floor(_QrCode.getNumRawDataModules(ver) / 8);
20407
+ const numShortBlocks = numBlocks - rawCodewords % numBlocks;
20408
+ const shortBlockLen = Math.floor(rawCodewords / numBlocks);
20409
+ let blocks = [];
20410
+ const rsDiv = _QrCode.reedSolomonComputeDivisor(blockEccLen);
20411
+ for (let i = 0, k = 0; i < numBlocks; i++) {
20412
+ let dat = data.slice(k, k + shortBlockLen - blockEccLen + (i < numShortBlocks ? 0 : 1));
20413
+ k += dat.length;
20414
+ const ecc = _QrCode.reedSolomonComputeRemainder(dat, rsDiv);
20415
+ if (i < numShortBlocks) dat.push(0);
20416
+ blocks.push(dat.concat(ecc));
20417
+ }
20418
+ let result = [];
20419
+ for (let i = 0; i < blocks[0].length; i++) blocks.forEach((block, j) => {
20420
+ if (i != shortBlockLen - blockEccLen || j >= numShortBlocks) result.push(block[i]);
20421
+ });
20422
+ assert(result.length == rawCodewords);
20423
+ return result;
20424
+ }
20425
+ drawCodewords(data) {
20426
+ if (data.length != Math.floor(_QrCode.getNumRawDataModules(this.version) / 8)) throw new RangeError("Invalid argument");
20427
+ let i = 0;
20428
+ for (let right = this.size - 1; right >= 1; right -= 2) {
20429
+ if (right == 6) right = 5;
20430
+ for (let vert = 0; vert < this.size; vert++) for (let j = 0; j < 2; j++) {
20431
+ const x = right - j;
20432
+ const y = (right + 1 & 2) == 0 ? this.size - 1 - vert : vert;
20433
+ if (!this.isFunction[y][x] && i < data.length * 8) {
20434
+ this.modules[y][x] = getBit(data[i >>> 3], 7 - (i & 7));
20435
+ i++;
20436
+ }
20437
+ }
20438
+ }
20439
+ assert(i == data.length * 8);
20440
+ }
20441
+ applyMask(mask) {
20442
+ if (mask < 0 || mask > 7) throw new RangeError("Mask value out of range");
20443
+ for (let y = 0; y < this.size; y++) for (let x = 0; x < this.size; x++) {
20444
+ let invert;
20445
+ switch (mask) {
20446
+ case 0:
20447
+ invert = (x + y) % 2 == 0;
20448
+ break;
20449
+ case 1:
20450
+ invert = y % 2 == 0;
20451
+ break;
20452
+ case 2:
20453
+ invert = x % 3 == 0;
20454
+ break;
20455
+ case 3:
20456
+ invert = (x + y) % 3 == 0;
20457
+ break;
20458
+ case 4:
20459
+ invert = (Math.floor(x / 3) + Math.floor(y / 2)) % 2 == 0;
20460
+ break;
20461
+ case 5:
20462
+ invert = x * y % 2 + x * y % 3 == 0;
20463
+ break;
20464
+ case 6:
20465
+ invert = (x * y % 2 + x * y % 3) % 2 == 0;
20466
+ break;
20467
+ case 7:
20468
+ invert = ((x + y) % 2 + x * y % 3) % 2 == 0;
20469
+ break;
20470
+ default: throw new Error("Unreachable");
20471
+ }
20472
+ if (!this.isFunction[y][x] && invert) this.modules[y][x] = !this.modules[y][x];
20473
+ }
20474
+ }
20475
+ getPenaltyScore() {
20476
+ let result = 0;
20477
+ for (let y = 0; y < this.size; y++) {
20478
+ let runColor = false;
20479
+ let runX = 0;
20480
+ let runHistory = [
20481
+ 0,
20482
+ 0,
20483
+ 0,
20484
+ 0,
20485
+ 0,
20486
+ 0,
20487
+ 0
20488
+ ];
20489
+ for (let x = 0; x < this.size; x++) if (this.modules[y][x] == runColor) {
20490
+ runX++;
20491
+ if (runX == 5) result += _QrCode.PENALTY_N1;
20492
+ else if (runX > 5) result++;
20493
+ } else {
20494
+ this.finderPenaltyAddHistory(runX, runHistory);
20495
+ if (!runColor) result += this.finderPenaltyCountPatterns(runHistory) * _QrCode.PENALTY_N3;
20496
+ runColor = this.modules[y][x];
20497
+ runX = 1;
20498
+ }
20499
+ result += this.finderPenaltyTerminateAndCount(runColor, runX, runHistory) * _QrCode.PENALTY_N3;
20500
+ }
20501
+ for (let x = 0; x < this.size; x++) {
20502
+ let runColor = false;
20503
+ let runY = 0;
20504
+ let runHistory = [
20505
+ 0,
20506
+ 0,
20507
+ 0,
20508
+ 0,
20509
+ 0,
20510
+ 0,
20511
+ 0
20512
+ ];
20513
+ for (let y = 0; y < this.size; y++) if (this.modules[y][x] == runColor) {
20514
+ runY++;
20515
+ if (runY == 5) result += _QrCode.PENALTY_N1;
20516
+ else if (runY > 5) result++;
20517
+ } else {
20518
+ this.finderPenaltyAddHistory(runY, runHistory);
20519
+ if (!runColor) result += this.finderPenaltyCountPatterns(runHistory) * _QrCode.PENALTY_N3;
20520
+ runColor = this.modules[y][x];
20521
+ runY = 1;
20522
+ }
20523
+ result += this.finderPenaltyTerminateAndCount(runColor, runY, runHistory) * _QrCode.PENALTY_N3;
20524
+ }
20525
+ for (let y = 0; y < this.size - 1; y++) for (let x = 0; x < this.size - 1; x++) {
20526
+ const color = this.modules[y][x];
20527
+ if (color == this.modules[y][x + 1] && color == this.modules[y + 1][x] && color == this.modules[y + 1][x + 1]) result += _QrCode.PENALTY_N2;
20528
+ }
20529
+ let dark = 0;
20530
+ for (const row of this.modules) dark = row.reduce((sum, color) => sum + (color ? 1 : 0), dark);
20531
+ const total = this.size * this.size;
20532
+ const k = Math.ceil(Math.abs(dark * 20 - total * 10) / total) - 1;
20533
+ assert(0 <= k && k <= 9);
20534
+ result += k * _QrCode.PENALTY_N4;
20535
+ assert(0 <= result && result <= 2568888);
20536
+ return result;
20537
+ }
20538
+ getAlignmentPatternPositions() {
20539
+ if (this.version == 1) return [];
20540
+ else {
20541
+ const numAlign = Math.floor(this.version / 7) + 2;
20542
+ const step = this.version == 32 ? 26 : Math.ceil((this.version * 4 + 4) / (numAlign * 2 - 2)) * 2;
20543
+ let result = [6];
20544
+ for (let pos = this.size - 7; result.length < numAlign; pos -= step) result.splice(1, 0, pos);
20545
+ return result;
20546
+ }
20547
+ }
20548
+ static getNumRawDataModules(ver) {
20549
+ if (ver < _QrCode.MIN_VERSION || ver > _QrCode.MAX_VERSION) throw new RangeError("Version number out of range");
20550
+ let result = (16 * ver + 128) * ver + 64;
20551
+ if (ver >= 2) {
20552
+ const numAlign = Math.floor(ver / 7) + 2;
20553
+ result -= (25 * numAlign - 10) * numAlign - 55;
20554
+ if (ver >= 7) result -= 36;
20555
+ }
20556
+ assert(208 <= result && result <= 29648);
20557
+ return result;
20558
+ }
20559
+ static getNumDataCodewords(ver, ecl) {
20560
+ return Math.floor(_QrCode.getNumRawDataModules(ver) / 8) - _QrCode.ECC_CODEWORDS_PER_BLOCK[ecl.ordinal][ver] * _QrCode.NUM_ERROR_CORRECTION_BLOCKS[ecl.ordinal][ver];
20561
+ }
20562
+ static reedSolomonComputeDivisor(degree) {
20563
+ if (degree < 1 || degree > 255) throw new RangeError("Degree out of range");
20564
+ let result = [];
20565
+ for (let i = 0; i < degree - 1; i++) result.push(0);
20566
+ result.push(1);
20567
+ let root = 1;
20568
+ for (let i = 0; i < degree; i++) {
20569
+ for (let j = 0; j < result.length; j++) {
20570
+ result[j] = _QrCode.reedSolomonMultiply(result[j], root);
20571
+ if (j + 1 < result.length) result[j] ^= result[j + 1];
20572
+ }
20573
+ root = _QrCode.reedSolomonMultiply(root, 2);
20574
+ }
20575
+ return result;
20576
+ }
20577
+ static reedSolomonComputeRemainder(data, divisor) {
20578
+ let result = divisor.map((_) => 0);
20579
+ for (const b of data) {
20580
+ const factor = b ^ result.shift();
20581
+ result.push(0);
20582
+ divisor.forEach((coef, i) => result[i] ^= _QrCode.reedSolomonMultiply(coef, factor));
20583
+ }
20584
+ return result;
20585
+ }
20586
+ static reedSolomonMultiply(x, y) {
20587
+ if (x >>> 8 != 0 || y >>> 8 != 0) throw new RangeError("Byte out of range");
20588
+ let z = 0;
20589
+ for (let i = 7; i >= 0; i--) {
20590
+ z = z << 1 ^ (z >>> 7) * 285;
20591
+ z ^= (y >>> i & 1) * x;
20592
+ }
20593
+ assert(z >>> 8 == 0);
20594
+ return z;
20595
+ }
20596
+ finderPenaltyCountPatterns(runHistory) {
20597
+ const n = runHistory[1];
20598
+ assert(n <= this.size * 3);
20599
+ const core = n > 0 && runHistory[2] == n && runHistory[3] == n * 3 && runHistory[4] == n && runHistory[5] == n;
20600
+ return (core && runHistory[0] >= n * 4 && runHistory[6] >= n ? 1 : 0) + (core && runHistory[6] >= n * 4 && runHistory[0] >= n ? 1 : 0);
20601
+ }
20602
+ finderPenaltyTerminateAndCount(currentRunColor, currentRunLength, runHistory) {
20603
+ if (currentRunColor) {
20604
+ this.finderPenaltyAddHistory(currentRunLength, runHistory);
20605
+ currentRunLength = 0;
20606
+ }
20607
+ currentRunLength += this.size;
20608
+ this.finderPenaltyAddHistory(currentRunLength, runHistory);
20609
+ return this.finderPenaltyCountPatterns(runHistory);
20610
+ }
20611
+ finderPenaltyAddHistory(currentRunLength, runHistory) {
20612
+ if (runHistory[0] == 0) currentRunLength += this.size;
20613
+ runHistory.pop();
20614
+ runHistory.unshift(currentRunLength);
20615
+ }
20616
+ };
20617
+ _QrCode.MIN_VERSION = 1;
20618
+ _QrCode.MAX_VERSION = 40;
20619
+ _QrCode.PENALTY_N1 = 3;
20620
+ _QrCode.PENALTY_N2 = 3;
20621
+ _QrCode.PENALTY_N3 = 40;
20622
+ _QrCode.PENALTY_N4 = 10;
20623
+ _QrCode.ECC_CODEWORDS_PER_BLOCK = [
20624
+ [
20625
+ -1,
20626
+ 7,
20627
+ 10,
20628
+ 15,
20629
+ 20,
20630
+ 26,
20631
+ 18,
20632
+ 20,
20633
+ 24,
20634
+ 30,
20635
+ 18,
20636
+ 20,
20637
+ 24,
20638
+ 26,
20639
+ 30,
20640
+ 22,
20641
+ 24,
20642
+ 28,
20643
+ 30,
20644
+ 28,
20645
+ 28,
20646
+ 28,
20647
+ 28,
20648
+ 30,
20649
+ 30,
20650
+ 26,
20651
+ 28,
20652
+ 30,
20653
+ 30,
20654
+ 30,
20655
+ 30,
20656
+ 30,
20657
+ 30,
20658
+ 30,
20659
+ 30,
20660
+ 30,
20661
+ 30,
20662
+ 30,
20663
+ 30,
20664
+ 30,
20665
+ 30
20666
+ ],
20667
+ [
20668
+ -1,
20669
+ 10,
20670
+ 16,
20671
+ 26,
20672
+ 18,
20673
+ 24,
20674
+ 16,
20675
+ 18,
20676
+ 22,
20677
+ 22,
20678
+ 26,
20679
+ 30,
20680
+ 22,
20681
+ 22,
20682
+ 24,
20683
+ 24,
20684
+ 28,
20685
+ 28,
20686
+ 26,
20687
+ 26,
20688
+ 26,
20689
+ 26,
20690
+ 28,
20691
+ 28,
20692
+ 28,
20693
+ 28,
20694
+ 28,
20695
+ 28,
20696
+ 28,
20697
+ 28,
20698
+ 28,
20699
+ 28,
20700
+ 28,
20701
+ 28,
20702
+ 28,
20703
+ 28,
20704
+ 28,
20705
+ 28,
20706
+ 28,
20707
+ 28,
20708
+ 28
20709
+ ],
20710
+ [
20711
+ -1,
20712
+ 13,
20713
+ 22,
20714
+ 18,
20715
+ 26,
20716
+ 18,
20717
+ 24,
20718
+ 18,
20719
+ 22,
20720
+ 20,
20721
+ 24,
20722
+ 28,
20723
+ 26,
20724
+ 24,
20725
+ 20,
20726
+ 30,
20727
+ 24,
20728
+ 28,
20729
+ 28,
20730
+ 26,
20731
+ 30,
20732
+ 28,
20733
+ 30,
20734
+ 30,
20735
+ 30,
20736
+ 30,
20737
+ 28,
20738
+ 30,
20739
+ 30,
20740
+ 30,
20741
+ 30,
20742
+ 30,
20743
+ 30,
20744
+ 30,
20745
+ 30,
20746
+ 30,
20747
+ 30,
20748
+ 30,
20749
+ 30,
20750
+ 30,
20751
+ 30
20752
+ ],
20753
+ [
20754
+ -1,
20755
+ 17,
20756
+ 28,
20757
+ 22,
20758
+ 16,
20759
+ 22,
20760
+ 28,
20761
+ 26,
20762
+ 26,
20763
+ 24,
20764
+ 28,
20765
+ 24,
20766
+ 28,
20767
+ 22,
20768
+ 24,
20769
+ 24,
20770
+ 30,
20771
+ 28,
20772
+ 28,
20773
+ 26,
20774
+ 28,
20775
+ 30,
20776
+ 24,
20777
+ 30,
20778
+ 30,
20779
+ 30,
20780
+ 30,
20781
+ 30,
20782
+ 30,
20783
+ 30,
20784
+ 30,
20785
+ 30,
20786
+ 30,
20787
+ 30,
20788
+ 30,
20789
+ 30,
20790
+ 30,
20791
+ 30,
20792
+ 30,
20793
+ 30,
20794
+ 30
20795
+ ]
20796
+ ];
20797
+ _QrCode.NUM_ERROR_CORRECTION_BLOCKS = [
20798
+ [
20799
+ -1,
20800
+ 1,
20801
+ 1,
20802
+ 1,
20803
+ 1,
20804
+ 1,
20805
+ 2,
20806
+ 2,
20807
+ 2,
20808
+ 2,
20809
+ 4,
20810
+ 4,
20811
+ 4,
20812
+ 4,
20813
+ 4,
20814
+ 6,
20815
+ 6,
20816
+ 6,
20817
+ 6,
20818
+ 7,
20819
+ 8,
20820
+ 8,
20821
+ 9,
20822
+ 9,
20823
+ 10,
20824
+ 12,
20825
+ 12,
20826
+ 12,
20827
+ 13,
20828
+ 14,
20829
+ 15,
20830
+ 16,
20831
+ 17,
20832
+ 18,
20833
+ 19,
20834
+ 19,
20835
+ 20,
20836
+ 21,
20837
+ 22,
20838
+ 24,
20839
+ 25
20840
+ ],
20841
+ [
20842
+ -1,
20843
+ 1,
20844
+ 1,
20845
+ 1,
20846
+ 2,
20847
+ 2,
20848
+ 4,
20849
+ 4,
20850
+ 4,
20851
+ 5,
20852
+ 5,
20853
+ 5,
20854
+ 8,
20855
+ 9,
20856
+ 9,
20857
+ 10,
20858
+ 10,
20859
+ 11,
20860
+ 13,
20861
+ 14,
20862
+ 16,
20863
+ 17,
20864
+ 17,
20865
+ 18,
20866
+ 20,
20867
+ 21,
20868
+ 23,
20869
+ 25,
20870
+ 26,
20871
+ 28,
20872
+ 29,
20873
+ 31,
20874
+ 33,
20875
+ 35,
20876
+ 37,
20877
+ 38,
20878
+ 40,
20879
+ 43,
20880
+ 45,
20881
+ 47,
20882
+ 49
20883
+ ],
20884
+ [
20885
+ -1,
20886
+ 1,
20887
+ 1,
20888
+ 2,
20889
+ 2,
20890
+ 4,
20891
+ 4,
20892
+ 6,
20893
+ 6,
20894
+ 8,
20895
+ 8,
20896
+ 8,
20897
+ 10,
20898
+ 12,
20899
+ 16,
20900
+ 12,
20901
+ 17,
20902
+ 16,
20903
+ 18,
20904
+ 21,
20905
+ 20,
20906
+ 23,
20907
+ 23,
20908
+ 25,
20909
+ 27,
20910
+ 29,
20911
+ 34,
20912
+ 34,
20913
+ 35,
20914
+ 38,
20915
+ 40,
20916
+ 43,
20917
+ 45,
20918
+ 48,
20919
+ 51,
20920
+ 53,
20921
+ 56,
20922
+ 59,
20923
+ 62,
20924
+ 65,
20925
+ 68
20926
+ ],
20927
+ [
20928
+ -1,
20929
+ 1,
20930
+ 1,
20931
+ 2,
20932
+ 4,
20933
+ 4,
20934
+ 4,
20935
+ 5,
20936
+ 6,
20937
+ 8,
20938
+ 8,
20939
+ 11,
20940
+ 11,
20941
+ 16,
20942
+ 16,
20943
+ 18,
20944
+ 16,
20945
+ 19,
20946
+ 21,
20947
+ 25,
20948
+ 25,
20949
+ 25,
20950
+ 34,
20951
+ 30,
20952
+ 32,
20953
+ 35,
20954
+ 37,
20955
+ 40,
20956
+ 42,
20957
+ 45,
20958
+ 48,
20959
+ 51,
20960
+ 54,
20961
+ 57,
20962
+ 60,
20963
+ 63,
20964
+ 66,
20965
+ 70,
20966
+ 74,
20967
+ 77,
20968
+ 81
20969
+ ]
20970
+ ];
20971
+ qrcodegen2.QrCode = _QrCode;
20972
+ function appendBits(val, len, bb) {
20973
+ if (len < 0 || len > 31 || val >>> len != 0) throw new RangeError("Value out of range");
20974
+ for (let i = len - 1; i >= 0; i--) bb.push(val >>> i & 1);
20975
+ }
20976
+ function getBit(x, i) {
20977
+ return (x >>> i & 1) != 0;
20978
+ }
20979
+ function assert(cond) {
20980
+ if (!cond) throw new Error("Assertion error");
20981
+ }
20982
+ const _QrSegment = class _QrSegment {
20983
+ constructor(mode, numChars, bitData) {
20984
+ this.mode = mode;
20985
+ this.numChars = numChars;
20986
+ this.bitData = bitData;
20987
+ if (numChars < 0) throw new RangeError("Invalid argument");
20988
+ this.bitData = bitData.slice();
20989
+ }
20990
+ static makeBytes(data) {
20991
+ let bb = [];
20992
+ for (const b of data) appendBits(b, 8, bb);
20993
+ return new _QrSegment(_QrSegment.Mode.BYTE, data.length, bb);
20994
+ }
20995
+ static makeNumeric(digits) {
20996
+ if (!_QrSegment.isNumeric(digits)) throw new RangeError("String contains non-numeric characters");
20997
+ let bb = [];
20998
+ for (let i = 0; i < digits.length;) {
20999
+ const n = Math.min(digits.length - i, 3);
21000
+ appendBits(parseInt(digits.substring(i, i + n), 10), n * 3 + 1, bb);
21001
+ i += n;
21002
+ }
21003
+ return new _QrSegment(_QrSegment.Mode.NUMERIC, digits.length, bb);
21004
+ }
21005
+ static makeAlphanumeric(text) {
21006
+ if (!_QrSegment.isAlphanumeric(text)) throw new RangeError("String contains unencodable characters in alphanumeric mode");
21007
+ let bb = [];
21008
+ let i;
21009
+ for (i = 0; i + 2 <= text.length; i += 2) {
21010
+ let temp = _QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i)) * 45;
21011
+ temp += _QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i + 1));
21012
+ appendBits(temp, 11, bb);
21013
+ }
21014
+ if (i < text.length) appendBits(_QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i)), 6, bb);
21015
+ return new _QrSegment(_QrSegment.Mode.ALPHANUMERIC, text.length, bb);
21016
+ }
21017
+ static makeSegments(text) {
21018
+ if (text == "") return [];
21019
+ else if (_QrSegment.isNumeric(text)) return [_QrSegment.makeNumeric(text)];
21020
+ else if (_QrSegment.isAlphanumeric(text)) return [_QrSegment.makeAlphanumeric(text)];
21021
+ else return [_QrSegment.makeBytes(_QrSegment.toUtf8ByteArray(text))];
21022
+ }
21023
+ static makeEci(assignVal) {
21024
+ let bb = [];
21025
+ if (assignVal < 0) throw new RangeError("ECI assignment value out of range");
21026
+ else if (assignVal < 128) appendBits(assignVal, 8, bb);
21027
+ else if (assignVal < 16384) {
21028
+ appendBits(2, 2, bb);
21029
+ appendBits(assignVal, 14, bb);
21030
+ } else if (assignVal < 1e6) {
21031
+ appendBits(6, 3, bb);
21032
+ appendBits(assignVal, 21, bb);
21033
+ } else throw new RangeError("ECI assignment value out of range");
21034
+ return new _QrSegment(_QrSegment.Mode.ECI, 0, bb);
21035
+ }
21036
+ static isNumeric(text) {
21037
+ return _QrSegment.NUMERIC_REGEX.test(text);
21038
+ }
21039
+ static isAlphanumeric(text) {
21040
+ return _QrSegment.ALPHANUMERIC_REGEX.test(text);
21041
+ }
21042
+ getData() {
21043
+ return this.bitData.slice();
21044
+ }
21045
+ static getTotalBits(segs, version) {
21046
+ let result = 0;
21047
+ for (const seg of segs) {
21048
+ const ccbits = seg.mode.numCharCountBits(version);
21049
+ if (seg.numChars >= 1 << ccbits) return Infinity;
21050
+ result += 4 + ccbits + seg.bitData.length;
21051
+ }
21052
+ return result;
21053
+ }
21054
+ static toUtf8ByteArray(str) {
21055
+ str = encodeURI(str);
21056
+ let result = [];
21057
+ for (let i = 0; i < str.length; i++) if (str.charAt(i) != "%") result.push(str.charCodeAt(i));
21058
+ else {
21059
+ result.push(parseInt(str.substring(i + 1, i + 3), 16));
21060
+ i += 2;
21061
+ }
21062
+ return result;
21063
+ }
21064
+ };
21065
+ _QrSegment.NUMERIC_REGEX = /^[0-9]*$/;
21066
+ _QrSegment.ALPHANUMERIC_REGEX = /^[A-Z0-9 $%*+.\/:-]*$/;
21067
+ _QrSegment.ALPHANUMERIC_CHARSET = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";
21068
+ let QrSegment = _QrSegment;
21069
+ qrcodegen2.QrSegment = _QrSegment;
21070
+ })(qrcodegen || (qrcodegen = {}));
21071
+ ((qrcodegen2) => {
21072
+ ((QrCode2) => {
21073
+ const _Ecc = class _Ecc {
21074
+ constructor(ordinal, formatBits) {
21075
+ this.ordinal = ordinal;
21076
+ this.formatBits = formatBits;
21077
+ }
21078
+ };
21079
+ _Ecc.LOW = new _Ecc(0, 1);
21080
+ _Ecc.MEDIUM = new _Ecc(1, 0);
21081
+ _Ecc.QUARTILE = new _Ecc(2, 3);
21082
+ _Ecc.HIGH = new _Ecc(3, 2);
21083
+ QrCode2.Ecc = _Ecc;
21084
+ })(qrcodegen2.QrCode || (qrcodegen2.QrCode = {}));
21085
+ })(qrcodegen || (qrcodegen = {}));
21086
+ ((qrcodegen2) => {
21087
+ ((QrSegment2) => {
21088
+ const _Mode = class _Mode {
21089
+ constructor(modeBits, numBitsCharCount) {
21090
+ this.modeBits = modeBits;
21091
+ this.numBitsCharCount = numBitsCharCount;
21092
+ }
21093
+ numCharCountBits(ver) {
21094
+ return this.numBitsCharCount[Math.floor((ver + 7) / 17)];
21095
+ }
21096
+ };
21097
+ _Mode.NUMERIC = new _Mode(1, [
21098
+ 10,
21099
+ 12,
21100
+ 14
21101
+ ]);
21102
+ _Mode.ALPHANUMERIC = new _Mode(2, [
21103
+ 9,
21104
+ 11,
21105
+ 13
21106
+ ]);
21107
+ _Mode.BYTE = new _Mode(4, [
21108
+ 8,
21109
+ 16,
21110
+ 16
21111
+ ]);
21112
+ _Mode.KANJI = new _Mode(8, [
21113
+ 8,
21114
+ 10,
21115
+ 12
21116
+ ]);
21117
+ _Mode.ECI = new _Mode(7, [
21118
+ 0,
21119
+ 0,
21120
+ 0
21121
+ ]);
21122
+ QrSegment2.Mode = _Mode;
21123
+ })(qrcodegen2.QrSegment || (qrcodegen2.QrSegment = {}));
21124
+ })(qrcodegen || (qrcodegen = {}));
21125
+ var qrcodegen_default = qrcodegen;
21126
+ /**
21127
+ * @license qrcode.react
21128
+ * Copyright (c) Paul O'Shannessy
21129
+ * SPDX-License-Identifier: ISC
21130
+ */
21131
+ var ERROR_LEVEL_MAP = {
21132
+ L: qrcodegen_default.QrCode.Ecc.LOW,
21133
+ M: qrcodegen_default.QrCode.Ecc.MEDIUM,
21134
+ Q: qrcodegen_default.QrCode.Ecc.QUARTILE,
21135
+ H: qrcodegen_default.QrCode.Ecc.HIGH
21136
+ };
21137
+ var DEFAULT_SIZE$1 = 128;
21138
+ var DEFAULT_LEVEL = "L";
21139
+ var DEFAULT_BGCOLOR = "#FFFFFF";
21140
+ var DEFAULT_FGCOLOR = "#000000";
21141
+ var DEFAULT_INCLUDEMARGIN = false;
21142
+ var DEFAULT_MINVERSION = 1;
21143
+ var SPEC_MARGIN_SIZE = 4;
21144
+ var DEFAULT_MARGIN_SIZE = 0;
21145
+ var DEFAULT_IMG_SCALE = .1;
21146
+ function generatePath(modules, margin = 0) {
21147
+ const ops = [];
21148
+ modules.forEach(function(row, y) {
21149
+ let start = null;
21150
+ row.forEach(function(cell, x) {
21151
+ if (!cell && start !== null) {
21152
+ ops.push(`M${start + margin} ${y + margin}h${x - start}v1H${start + margin}z`);
21153
+ start = null;
21154
+ return;
21155
+ }
21156
+ if (x === row.length - 1) {
21157
+ if (!cell) return;
21158
+ if (start === null) ops.push(`M${x + margin},${y + margin} h1v1H${x + margin}z`);
21159
+ else ops.push(`M${start + margin},${y + margin} h${x + 1 - start}v1H${start + margin}z`);
21160
+ return;
21161
+ }
21162
+ if (cell && start === null) start = x;
21163
+ });
21164
+ });
21165
+ return ops.join("");
21166
+ }
21167
+ function excavateModules(modules, excavation) {
21168
+ return modules.slice().map((row, y) => {
21169
+ if (y < excavation.y || y >= excavation.y + excavation.h) return row;
21170
+ return row.map((cell, x) => {
21171
+ if (x < excavation.x || x >= excavation.x + excavation.w) return cell;
21172
+ return false;
21173
+ });
21174
+ });
21175
+ }
21176
+ function getImageSettings(cells, size, margin, imageSettings) {
21177
+ if (imageSettings == null) return null;
21178
+ const numCells = cells.length + margin * 2;
21179
+ const defaultSize = Math.floor(size * DEFAULT_IMG_SCALE);
21180
+ const scale = numCells / size;
21181
+ const w = (imageSettings.width || defaultSize) * scale;
21182
+ const h = (imageSettings.height || defaultSize) * scale;
21183
+ const x = imageSettings.x == null ? cells.length / 2 - w / 2 : imageSettings.x * scale;
21184
+ const y = imageSettings.y == null ? cells.length / 2 - h / 2 : imageSettings.y * scale;
21185
+ const opacity = imageSettings.opacity == null ? 1 : imageSettings.opacity;
21186
+ let excavation = null;
21187
+ if (imageSettings.excavate) {
21188
+ let floorX = Math.floor(x);
21189
+ let floorY = Math.floor(y);
21190
+ excavation = {
21191
+ x: floorX,
21192
+ y: floorY,
21193
+ w: Math.ceil(w + x - floorX),
21194
+ h: Math.ceil(h + y - floorY)
21195
+ };
21196
+ }
21197
+ const crossOrigin = imageSettings.crossOrigin;
21198
+ return {
21199
+ x,
21200
+ y,
21201
+ h,
21202
+ w,
21203
+ excavation,
21204
+ opacity,
21205
+ crossOrigin
21206
+ };
21207
+ }
21208
+ function getMarginSize(includeMargin, marginSize) {
21209
+ if (marginSize != null) return Math.max(Math.floor(marginSize), 0);
21210
+ return includeMargin ? SPEC_MARGIN_SIZE : DEFAULT_MARGIN_SIZE;
21211
+ }
21212
+ function useQRCode({ value, level, minVersion, includeMargin, marginSize, imageSettings, size, boostLevel }) {
21213
+ let qrcode = React.useMemo(() => {
21214
+ const segments = (Array.isArray(value) ? value : [value]).reduce((accum, v) => {
21215
+ accum.push(...qrcodegen_default.QrSegment.makeSegments(v));
21216
+ return accum;
21217
+ }, []);
21218
+ return qrcodegen_default.QrCode.encodeSegments(segments, ERROR_LEVEL_MAP[level], minVersion, void 0, void 0, boostLevel);
21219
+ }, [
21220
+ value,
21221
+ level,
21222
+ minVersion,
21223
+ boostLevel
21224
+ ]);
21225
+ const { cells, margin, numCells, calculatedImageSettings } = React.useMemo(() => {
21226
+ let cells2 = qrcode.getModules();
21227
+ const margin2 = getMarginSize(includeMargin, marginSize);
21228
+ return {
21229
+ cells: cells2,
21230
+ margin: margin2,
21231
+ numCells: cells2.length + margin2 * 2,
21232
+ calculatedImageSettings: getImageSettings(cells2, size, margin2, imageSettings)
21233
+ };
21234
+ }, [
21235
+ qrcode,
21236
+ size,
21237
+ imageSettings,
21238
+ includeMargin,
21239
+ marginSize
21240
+ ]);
21241
+ return {
21242
+ qrcode,
21243
+ margin,
21244
+ cells,
21245
+ numCells,
21246
+ calculatedImageSettings
21247
+ };
21248
+ }
21249
+ var SUPPORTS_PATH2D = function() {
21250
+ try {
21251
+ new Path2D().addPath(new Path2D());
21252
+ } catch (e) {
21253
+ return false;
21254
+ }
21255
+ return true;
21256
+ }();
21257
+ var QRCodeCanvas = React.forwardRef(function QRCodeCanvas2(props, forwardedRef) {
21258
+ const _a = props, { value, size = DEFAULT_SIZE$1, level = DEFAULT_LEVEL, bgColor = DEFAULT_BGCOLOR, fgColor = DEFAULT_FGCOLOR, includeMargin = DEFAULT_INCLUDEMARGIN, minVersion = DEFAULT_MINVERSION, boostLevel, marginSize, imageSettings } = _a;
21259
+ const _b = __objRest(_a, [
21260
+ "value",
21261
+ "size",
21262
+ "level",
21263
+ "bgColor",
21264
+ "fgColor",
21265
+ "includeMargin",
21266
+ "minVersion",
21267
+ "boostLevel",
21268
+ "marginSize",
21269
+ "imageSettings"
21270
+ ]), { style } = _b, otherProps = __objRest(_b, ["style"]);
21271
+ const imgSrc = imageSettings == null ? void 0 : imageSettings.src;
21272
+ const _canvas = React.useRef(null);
21273
+ const _image = React.useRef(null);
21274
+ const setCanvasRef = React.useCallback((node) => {
21275
+ _canvas.current = node;
21276
+ if (typeof forwardedRef === "function") forwardedRef(node);
21277
+ else if (forwardedRef) forwardedRef.current = node;
21278
+ }, [forwardedRef]);
21279
+ const [isImgLoaded, setIsImageLoaded] = React.useState(false);
21280
+ const { margin, cells, numCells, calculatedImageSettings } = useQRCode({
21281
+ value,
21282
+ level,
21283
+ minVersion,
21284
+ boostLevel,
21285
+ includeMargin,
21286
+ marginSize,
21287
+ imageSettings,
21288
+ size
21289
+ });
21290
+ React.useEffect(() => {
21291
+ if (_canvas.current != null) {
21292
+ const canvas = _canvas.current;
21293
+ const ctx = canvas.getContext("2d");
21294
+ if (!ctx) return;
21295
+ let cellsToDraw = cells;
21296
+ const image = _image.current;
21297
+ const haveImageToRender = calculatedImageSettings != null && image !== null && image.complete && image.naturalHeight !== 0 && image.naturalWidth !== 0;
21298
+ if (haveImageToRender) {
21299
+ if (calculatedImageSettings.excavation != null) cellsToDraw = excavateModules(cells, calculatedImageSettings.excavation);
21300
+ }
21301
+ const pixelRatio = window.devicePixelRatio || 1;
21302
+ canvas.height = canvas.width = size * pixelRatio;
21303
+ const scale = size / numCells * pixelRatio;
21304
+ ctx.scale(scale, scale);
21305
+ ctx.fillStyle = bgColor;
21306
+ ctx.fillRect(0, 0, numCells, numCells);
21307
+ ctx.fillStyle = fgColor;
21308
+ if (SUPPORTS_PATH2D) ctx.fill(new Path2D(generatePath(cellsToDraw, margin)));
21309
+ else cells.forEach(function(row, rdx) {
21310
+ row.forEach(function(cell, cdx) {
21311
+ if (cell) ctx.fillRect(cdx + margin, rdx + margin, 1, 1);
21312
+ });
21313
+ });
21314
+ if (calculatedImageSettings) ctx.globalAlpha = calculatedImageSettings.opacity;
21315
+ if (haveImageToRender) ctx.drawImage(image, calculatedImageSettings.x + margin, calculatedImageSettings.y + margin, calculatedImageSettings.w, calculatedImageSettings.h);
21316
+ }
21317
+ });
21318
+ React.useEffect(() => {
21319
+ setIsImageLoaded(false);
21320
+ }, [imgSrc]);
21321
+ const canvasStyle = __spreadValues({
21322
+ height: size,
21323
+ width: size
21324
+ }, style);
21325
+ let img = null;
21326
+ if (imgSrc != null) img = /* @__PURE__ */ React.createElement("img", {
21327
+ src: imgSrc,
21328
+ key: imgSrc,
21329
+ style: { display: "none" },
21330
+ onLoad: () => {
21331
+ setIsImageLoaded(true);
21332
+ },
21333
+ ref: _image,
21334
+ crossOrigin: calculatedImageSettings == null ? void 0 : calculatedImageSettings.crossOrigin
21335
+ });
21336
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("canvas", __spreadValues({
21337
+ style: canvasStyle,
21338
+ height: size,
21339
+ width: size,
21340
+ ref: setCanvasRef,
21341
+ role: "img"
21342
+ }, otherProps)), img);
21343
+ });
21344
+ QRCodeCanvas.displayName = "QRCodeCanvas";
21345
+ var QRCodeSVG = React.forwardRef(function QRCodeSVG2(props, forwardedRef) {
21346
+ const _a = props, { value, size = DEFAULT_SIZE$1, level = DEFAULT_LEVEL, bgColor = DEFAULT_BGCOLOR, fgColor = DEFAULT_FGCOLOR, includeMargin = DEFAULT_INCLUDEMARGIN, minVersion = DEFAULT_MINVERSION, boostLevel, title, marginSize, imageSettings } = _a, otherProps = __objRest(_a, [
21347
+ "value",
21348
+ "size",
21349
+ "level",
21350
+ "bgColor",
21351
+ "fgColor",
21352
+ "includeMargin",
21353
+ "minVersion",
21354
+ "boostLevel",
21355
+ "title",
21356
+ "marginSize",
21357
+ "imageSettings"
21358
+ ]);
21359
+ const { margin, cells, numCells, calculatedImageSettings } = useQRCode({
21360
+ value,
21361
+ level,
21362
+ minVersion,
21363
+ boostLevel,
21364
+ includeMargin,
21365
+ marginSize,
21366
+ imageSettings,
21367
+ size
21368
+ });
21369
+ let cellsToDraw = cells;
21370
+ let image = null;
21371
+ if (imageSettings != null && calculatedImageSettings != null) {
21372
+ if (calculatedImageSettings.excavation != null) cellsToDraw = excavateModules(cells, calculatedImageSettings.excavation);
21373
+ image = /* @__PURE__ */ React.createElement("image", {
21374
+ href: imageSettings.src,
21375
+ height: calculatedImageSettings.h,
21376
+ width: calculatedImageSettings.w,
21377
+ x: calculatedImageSettings.x + margin,
21378
+ y: calculatedImageSettings.y + margin,
21379
+ preserveAspectRatio: "none",
21380
+ opacity: calculatedImageSettings.opacity,
21381
+ crossOrigin: calculatedImageSettings.crossOrigin
21382
+ });
21383
+ }
21384
+ const fgPath = generatePath(cellsToDraw, margin);
21385
+ return /* @__PURE__ */ React.createElement("svg", __spreadValues({
21386
+ height: size,
21387
+ width: size,
21388
+ viewBox: `0 0 ${numCells} ${numCells}`,
21389
+ ref: forwardedRef,
21390
+ role: "img"
21391
+ }, otherProps), !!title && /* @__PURE__ */ React.createElement("title", null, title), /* @__PURE__ */ React.createElement("path", {
21392
+ fill: bgColor,
21393
+ d: `M0,0 h${numCells}v${numCells}H0z`,
21394
+ shapeRendering: "crispEdges"
21395
+ }), /* @__PURE__ */ React.createElement("path", {
21396
+ fill: fgColor,
21397
+ d: fgPath,
21398
+ shapeRendering: "crispEdges"
21399
+ }), image);
21400
+ });
21401
+ QRCodeSVG.displayName = "QRCodeSVG";
21402
+ //#endregion
21403
+ //#region src/composites/qr-code.tsx
21404
+ var DEFAULT_SIZE = 192;
21405
+ function QrCode({ value, size = DEFAULT_SIZE, className, alt }) {
21406
+ const trimmed = value.trim();
21407
+ if (trimmed.length === 0) return null;
21408
+ return /* @__PURE__ */ jsx("div", {
21409
+ className: cn("inline-flex rounded-md bg-white p-2", className),
21410
+ children: /* @__PURE__ */ jsx(QRCodeSVG, {
21411
+ value: trimmed,
21412
+ size,
21413
+ marginSize: 1,
21414
+ title: alt ?? "QR code"
21415
+ })
21416
+ });
21417
+ }
21418
+ //#endregion
21419
+ //#region src/composites/copy-button.tsx
21420
+ /**
21421
+ * `CopyButton` — a compact button that copies a string `value` to the
21422
+ * clipboard via `navigator.clipboard.writeText`, showing a brief
21423
+ * "copied" check state. Addon-agnostic; used wherever a secret / URL
21424
+ * needs a one-click copy affordance (export setup panels, etc.).
21425
+ */
21426
+ var COPIED_RESET_MS = 2e3;
21427
+ function CopyButton({ value, label, className, disabled }) {
21428
+ const [copied, setCopied] = useState(false);
21429
+ const handleCopy = useCallback(() => {
21430
+ if (!value) return;
21431
+ navigator.clipboard.writeText(value).then(() => {
21432
+ setCopied(true);
21433
+ setTimeout(() => setCopied(false), COPIED_RESET_MS);
21434
+ });
21435
+ }, [value]);
21436
+ return /* @__PURE__ */ jsxs(Button, {
21437
+ size: "sm",
21438
+ variant: "ghost",
21439
+ type: "button",
21440
+ disabled: disabled || value.length === 0,
21441
+ onClick: handleCopy,
21442
+ className: cn(className),
21443
+ "aria-label": copied ? "Copied" : `Copy ${label ?? "value"}`,
21444
+ children: [copied ? /* @__PURE__ */ jsx(Check, { className: "h-3.5 w-3.5 text-success" }) : /* @__PURE__ */ jsx(Copy, { className: "h-3.5 w-3.5" }), label ? /* @__PURE__ */ jsx("span", {
21445
+ className: "ml-1",
21446
+ children: copied ? "Copied" : label
21447
+ }) : null]
21448
+ });
21449
+ }
21450
+ //#endregion
21451
+ //#region src/composites/device-export-panel.tsx
21452
+ /**
21453
+ * DeviceExportPanel — generic, addon-agnostic surface for the
21454
+ * `device-export` capability.
21455
+ *
21456
+ * Renders the COMMON device-export surface for a single export addon
21457
+ * (HomeAssistant via MQTT, HomeKit/HAP, Alexa Smart Home, …):
21458
+ *
21459
+ * - a link-state status badge + exposed-device count from `getStatus`,
21460
+ * - the exposed-devices table from `listExposedDevices` (device name,
21461
+ * status, stream preference) with a per-row unexpose action
21462
+ * (`unexposeDevice`),
21463
+ * - an empty state directing the operator to the device-details page.
21464
+ *
21465
+ * This composite is the reusable replacement for the per-addon
21466
+ * Module-Federation overview tables that each export addon used to
21467
+ * ship. It is driven entirely by the `device-export` cap — there are no
21468
+ * Alexa / HAP / MQTT specifics here. Mount it next to an export addon's
21469
+ * standard settings form (e.g. in the addon-settings modal).
21470
+ *
21471
+ * Routing note: `device-export` is a collection cap. Export addons are
21472
+ * all `hub-only`, so the panel queries `nodeId: 'hub'`. It also passes
21473
+ * `addonId` so the codegen'd cap-router resolves THIS addon's provider
21474
+ * within the local collection — when multiple device-export addons are
21475
+ * co-installed each panel shows its own provider, not provider[0].
21476
+ */
21477
+ var ExposedDeviceArraySchema = z.array(ExposedDeviceSchema);
21478
+ var STATUS_POLL_INTERVAL_MS = 1e4;
21479
+ function statusVariant(state) {
21480
+ if (state === "linked") return "success";
21481
+ if (state === "error") return "danger";
21482
+ return "warning";
21483
+ }
21484
+ function capitaliseLinkState(state) {
21485
+ if (state === "linked") return "Linked";
21486
+ if (state === "unlinked") return "Unlinked";
21487
+ if (state === "error") return "Error";
21488
+ return state;
21489
+ }
21490
+ /**
21491
+ * A single label/value row in the Setup section. `secret` rows mask the
21492
+ * value behind a reveal toggle; every row gets a copy button.
21493
+ */
21494
+ function SetupFieldRow({ field }) {
21495
+ const [revealed, setRevealed] = useState(false);
21496
+ const isSecret = field.secret === true;
21497
+ const displayValue = isSecret && !revealed ? "•".repeat(Math.min(field.value.length, 24)) : field.value;
21498
+ return /* @__PURE__ */ jsxs("div", {
21499
+ className: "flex items-center gap-2 py-1.5",
21500
+ children: [
21501
+ /* @__PURE__ */ jsx("span", {
21502
+ className: "text-[11px] text-foreground-subtle w-32 shrink-0",
21503
+ children: field.label
21504
+ }),
21505
+ /* @__PURE__ */ jsx("span", {
21506
+ className: "flex-1 min-w-0 truncate font-mono text-xs text-foreground",
21507
+ children: displayValue || "—"
21508
+ }),
21509
+ isSecret && /* @__PURE__ */ jsx(Button, {
21510
+ size: "sm",
21511
+ variant: "ghost",
21512
+ type: "button",
21513
+ "aria-label": revealed ? "Hide value" : "Reveal value",
21514
+ onClick: () => setRevealed((v) => !v),
21515
+ children: revealed ? /* @__PURE__ */ jsx(EyeOff, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx(Eye, { className: "h-3.5 w-3.5" })
21516
+ }),
21517
+ /* @__PURE__ */ jsx(CopyButton, {
21518
+ value: field.value,
21519
+ label: field.label
21520
+ })
21521
+ ]
21522
+ });
21523
+ }
21524
+ /**
21525
+ * Generic "Setup" section — pairing QR + copyable label/value rows +
21526
+ * operator note. Driven entirely by the cap's `setup` block; renders
21527
+ * nothing addon-specific.
21528
+ */
21529
+ function SetupSection({ setup }) {
21530
+ const fields = setup.fields ?? [];
21531
+ return /* @__PURE__ */ jsxs("div", {
21532
+ className: "border-b border-border bg-surface-hover/10",
21533
+ children: [/* @__PURE__ */ jsxs("div", {
21534
+ className: "flex items-center gap-2 px-4 py-2 border-b border-border",
21535
+ children: [/* @__PURE__ */ jsx(QrCode$1, { className: "h-3.5 w-3.5 text-foreground-subtle shrink-0" }), /* @__PURE__ */ jsx("span", {
21536
+ className: "text-[11px] font-semibold text-foreground-subtle uppercase tracking-wide",
21537
+ children: "Setup"
21538
+ })]
21539
+ }), /* @__PURE__ */ jsxs("div", {
21540
+ className: "flex flex-col gap-3 p-4 sm:flex-row sm:items-start",
21541
+ children: [setup.qr && /* @__PURE__ */ jsx("div", {
21542
+ className: "shrink-0",
21543
+ children: /* @__PURE__ */ jsx(QrCode, {
21544
+ value: setup.qr,
21545
+ alt: "Pairing QR code"
21546
+ })
21547
+ }), /* @__PURE__ */ jsxs("div", {
21548
+ className: "flex-1 min-w-0",
21549
+ children: [setup.note && /* @__PURE__ */ jsx("p", {
21550
+ className: "text-xs text-foreground-muted whitespace-pre-line mb-2",
21551
+ children: setup.note
21552
+ }), fields.length > 0 && /* @__PURE__ */ jsx("div", {
21553
+ className: "divide-y divide-border-subtle",
21554
+ children: fields.map((field) => /* @__PURE__ */ jsx(SetupFieldRow, { field }, field.label))
21555
+ })]
21556
+ })]
21557
+ })]
21558
+ });
21559
+ }
21560
+ /**
21561
+ * Generic device-export panel. Addon-agnostic — only the `device-export`
21562
+ * cap drives it.
21563
+ */
21564
+ function DeviceExportPanel({ addonId, onOpenDevice }) {
21565
+ const queryClient = useQueryClient();
21566
+ const statusQuery = useDeviceExportGetStatus({
21567
+ nodeId: "hub",
21568
+ addonId
21569
+ }, {
21570
+ refetchInterval: STATUS_POLL_INTERVAL_MS,
21571
+ retry: false
21572
+ });
21573
+ const exposedQuery = useDeviceExportListExposedDevices({
21574
+ nodeId: "hub",
21575
+ addonId
21576
+ }, {
21577
+ refetchInterval: STATUS_POLL_INTERVAL_MS,
21578
+ retry: false
21579
+ });
21580
+ const unexposeMutation = useDeviceExportUnexposeDevice({ onSuccess: () => {
21581
+ queryClient.invalidateQueries({ queryKey: [["deviceExport"]] });
21582
+ } });
21583
+ const status = useMemo(() => {
21584
+ const parsed = DeviceExportStatusSchema.safeParse(statusQuery.data);
21585
+ return parsed.success ? parsed.data : null;
21586
+ }, [statusQuery.data]);
21587
+ const exposed = useMemo(() => {
21588
+ const parsed = ExposedDeviceArraySchema.safeParse(exposedQuery.data);
21589
+ return parsed.success ? parsed.data : [];
21590
+ }, [exposedQuery.data]);
21591
+ const linkState = status?.linkState ?? "unlinked";
21592
+ const rows = useMemo(() => exposed.map((entry) => ({
21593
+ deviceId: entry.deviceId,
21594
+ displayName: entry.exposedAs ?? `Device ${entry.deviceId}`,
21595
+ streamPreference: "auto",
21596
+ linkState
21597
+ })), [exposed, linkState]);
21598
+ const loading = statusQuery.isLoading || exposedQuery.isLoading;
21599
+ const exposedCount = status?.exposedDeviceCount ?? rows.length;
21600
+ const columns = useMemo(() => [
21601
+ {
21602
+ key: "device",
21603
+ header: "Device",
21604
+ render: (row) => /* @__PURE__ */ jsxs("div", {
21605
+ className: "flex flex-col",
21606
+ children: [/* @__PURE__ */ jsx("span", {
21607
+ className: "text-foreground font-medium",
21608
+ children: row.displayName
21609
+ }), /* @__PURE__ */ jsxs("span", {
21610
+ className: "text-foreground-subtle text-xs font-mono",
21611
+ children: ["#", row.deviceId]
21612
+ })]
21613
+ })
21614
+ },
21615
+ {
21616
+ key: "status",
21617
+ header: "Status",
21618
+ render: (row) => /* @__PURE__ */ jsx(Badge, {
21619
+ variant: statusVariant(row.linkState),
21620
+ children: capitaliseLinkState(row.linkState)
21621
+ })
21622
+ },
21623
+ {
21624
+ key: "stream",
21625
+ header: "Stream",
21626
+ render: (row) => /* @__PURE__ */ jsx("span", {
21627
+ className: "text-xs text-foreground-subtle font-mono",
21628
+ children: row.streamPreference === "auto" ? "Auto" : row.streamPreference
21629
+ })
21630
+ },
21631
+ {
21632
+ key: "actions",
21633
+ header: "",
21634
+ align: "right",
21635
+ render: (row) => /* @__PURE__ */ jsxs("div", {
21636
+ className: "flex items-center justify-end gap-2",
21637
+ children: [onOpenDevice && /* @__PURE__ */ jsxs(Button, {
21638
+ size: "sm",
21639
+ variant: "ghost",
21640
+ onClick: () => onOpenDevice(row.deviceId),
21641
+ children: [/* @__PURE__ */ jsx(ExternalLink, { className: "h-3.5 w-3.5 mr-1" }), "Open"]
21642
+ }), /* @__PURE__ */ jsxs(Button, {
21643
+ size: "sm",
21644
+ variant: "ghost",
21645
+ disabled: unexposeMutation.isPending,
21646
+ onClick: () => unexposeMutation.mutate({
21647
+ deviceId: row.deviceId,
21648
+ nodeId: "hub",
21649
+ addonId
21650
+ }),
21651
+ children: [/* @__PURE__ */ jsx(Unlink2, { className: "h-3.5 w-3.5 mr-1" }), "Unexpose"]
21652
+ })]
21653
+ })
21654
+ }
21655
+ ], [
21656
+ onOpenDevice,
21657
+ unexposeMutation,
21658
+ addonId
21659
+ ]);
21660
+ return /* @__PURE__ */ jsxs("div", {
21661
+ className: "rounded-lg border border-border bg-surface overflow-hidden",
21662
+ children: [
21663
+ /* @__PURE__ */ jsxs("div", {
21664
+ className: "flex items-center justify-between gap-3 px-4 py-2.5 border-b border-border bg-surface-hover/20",
21665
+ children: [/* @__PURE__ */ jsxs("div", {
21666
+ className: "flex items-center gap-2 min-w-0",
21667
+ children: [
21668
+ /* @__PURE__ */ jsx(Share2, { className: "h-3.5 w-3.5 text-foreground-subtle shrink-0" }),
21669
+ /* @__PURE__ */ jsx("span", {
21670
+ className: "text-[11px] font-semibold text-foreground-subtle uppercase tracking-wide",
21671
+ children: "Exported devices"
21672
+ }),
21673
+ /* @__PURE__ */ jsx(Badge, {
21674
+ variant: statusVariant(linkState),
21675
+ children: capitaliseLinkState(linkState)
21676
+ }),
21677
+ /* @__PURE__ */ jsxs("span", {
21678
+ className: "text-[11px] text-foreground-subtle",
21679
+ children: [exposedCount, " exposed"]
21680
+ })
21681
+ ]
21682
+ }), loading && /* @__PURE__ */ jsx(LoaderCircle, { className: "h-3.5 w-3.5 animate-spin text-foreground-subtle" })]
21683
+ }),
21684
+ status?.error && /* @__PURE__ */ jsx("div", {
21685
+ className: "px-4 py-3 border-b border-border",
21686
+ children: /* @__PURE__ */ jsx(ErrorBox, { message: status.error })
21687
+ }),
21688
+ status?.setup && /* @__PURE__ */ jsx(SetupSection, { setup: status.setup }),
21689
+ rows.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {
21690
+ icon: Share2,
21691
+ title: "No devices exposed",
21692
+ description: `Expose a camera to "${addonId}" from its device-details page to surface it in the connected ecosystem.`
21693
+ }) : /* @__PURE__ */ jsx("div", {
21694
+ className: "p-3",
21695
+ children: /* @__PURE__ */ jsx(DataTable, {
21696
+ columns,
21697
+ rows,
21698
+ rowKey: (row) => row.deviceId
21699
+ })
21700
+ })
21701
+ ]
21702
+ });
21703
+ }
21704
+ //#endregion
20080
21705
  //#region src/composites/audio-waveform.tsx
20081
21706
  /**
20082
21707
  * Canvas-based audio waveform visualization.
@@ -24224,6 +25849,6 @@ function useEventInvalidation(queryKey, categories) {
24224
25849
  ]);
24225
25850
  }
24226
25851
  //#endregion
24227
- export { AddonGlobalSettingsForm, AgentStepEditor, AppShell, AudioClassificationList, AudioLevelWaveform, AudioWaveform, BTN_COMPACT, BTN_COMPACT_DANGER, BTN_COMPACT_PRIMARY, BTN_COMPACT_WARNING, Badge, BatteryBadge, BottomSheet, Breadcrumb, Button, CHIP_ACTIVE, CHIP_BASE, CHIP_INACTIVE, CLASS_COLORS, CameraStreamPlayer, Card, Checkbox, CodeBlock, CollapsibleCard, ConfigFormBuilder, FormField as ConfigFormField, ConfigSchemaField, ConfirmActionButton, ConfirmDialogProvider, CustomFieldRenderersProvider, DEFAULT_COLOR, DataTable, DetectionCanvas, DetectionOverlay, DetectionResultTree, DevShell, DeviceActivityPanel, DeviceCard, DeviceContextProvider, DeviceGrid, DeviceItem, DeviceList, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DiscoveryPanel, DoorbellRecentPanel, Dropdown, DropdownContent, DropdownItem, DropdownTrigger, EmptyState, EventStream, FilterBar, FloatingEventStream, FloatingLogStream, FloatingPanel, FormField$1 as FormField, GRID_GAP, GRID_PAIRED, GRID_QUICK_STATS, INPUT_COMPACT, IconButton, ImageSelector, InferenceConfigSelector, Input, KebabMenu, KeyValueList, LIST_ROW, Label, LogStream, LoginForm, MobileDrawer, NodeMultiSelectField, NodePicker, NodeSelectField, PHASE_CONFIG, PTZOverlay, PageHeader, PhaseIcon, PipelineBuilder, PipelineRuntimeSelector, PipelineStep, PipelineTreeMatrix, PlayerOverlaysProvider, Popover, PopoverContent, PopoverTrigger, ProviderBadge, ResponseLog, SECTION_BODY, SECTION_CARD, SECTION_HEADER, SPLIT_PANEL_OUTER, SPLIT_PANEL_SIDE, STACK_GAP, ScopePicker, ScrollArea, Select, SemanticBadge, Separator, Sidebar, SidebarItem, Skeleton, SlideOverPanel, SnapshotButton, StatCard, StateValuesStream, StatusBadge, StepTimings, StepTreeMaster, StreamBrokerSelector, StreamPanel, Switch, SystemProvider, TEXT_FIELD_LABEL, TEXT_HINT, TEXT_METRIC, TEXT_SECTION_LABEL, TEXT_VALUE, Tabs, TabsContent, TabsList, TabsTrigger, ThemeProvider, Tooltip, TooltipContent, TooltipTrigger, VersionBadge, WidgetRegistryProvider, WidgetSlot, ZoneEditingProvider, buildStepTreeFromSchema, cn, createSharedContext, createTheme, darkColors, defaultTheme, deriveDeviceKind, ensureMfHostInit, getClassColor, getPhaseVisual, isFieldVisible, lightColors, mirror, mountAddonPage, providerIcons, statusIcons, themeToCss, trpc, useAccessoriesGetStatus, useAddonPagesListPages, useAddonSettingsGetDeviceSettings, useAddonSettingsGetGlobalSettings, useAddonSettingsUpdateDeviceSettings, useAddonSettingsUpdateGlobalSettings, useAddonWidgetsListWidgets, useAddonsApplyAutoUpdateToAll, useAddonsCustom, useAddonsForceRefresh, useAddonsGetAddonAutoUpdate, useAddonsGetAutoUpdateSettings, useAddonsGetLogs, useAddonsGetVersions, useAddonsInstallFromWorkspace, useAddonsInstallPackage, useAddonsIsWorkspaceAvailable, useAddonsList, useAddonsListPackages, useAddonsListUpdates, useAddonsListWorkspacePackages, useAddonsOnAddonLogs, useAddonsReloadPackages, useAddonsRestartAddon, useAddonsRestartServer, useAddonsRetryLoad, useAddonsRollbackPackage, useAddonsSearchAvailable, useAddonsSetAddonAutoUpdate, useAddonsSetAutoUpdateSettings, useAddonsUninstallPackage, useAddonsUpdatePackage, useAlertsDismiss, useAlertsEmit, useAlertsGetUnreadCount, useAlertsList, useAlertsMarkAllRead, useAlertsMarkRead, useAlertsUpdate, useAllWidgets, useAudioAnalysisApplyDeviceSettingsPatch, useAudioAnalysisGetDeviceLiveContribution, useAudioAnalysisGetDeviceSettingsContribution, useAudioAnalysisResolveDeviceSettings, useAudioAnalyzerAnalyseChunk, useAudioAnalyzerClassify, useAudioAnalyzerDispose, useAudioAnalyzerIsReady, useAudioAnalyzerReprobeAudioEngine, useAudioCodecCanHandle, useAudioCodecCloseSession, useAudioCodecCreateDecodeSession, useAudioCodecCreateEncodeSession, useAudioCodecFlushEncode, useAudioCodecListActiveSessions, useAudioCodecListSupportedCodecs, useAudioCodecPullEncoded, useAudioCodecPullPcm, useAudioCodecPushEncodedFrame, useAudioCodecPushPcm, useAudioMetricsGetCurrentSnapshot, useAudioMetricsGetHistory, useAuthenticationListProviders, useAuthenticationSetProviderEnabled, useBackupDelete, useBackupGetEntries, useBackupList, useBackupListArchives, useBackupListDestinations, useBackupListLocations, useBackupPreviewSchedule, useBackupRestore, useBackupTrigger, useBackupUpsertDestinationPolicy, useBatteryGetStatus, useBrightnessGetStatus, useBrightnessSetBrightness, useCameraCredentialsGetCredentials, useCameraCredentialsGetStatus, useCameraStreamsGetBrokerStreams, useCameraStreamsGetCameraStreams, useCameraStreamsGetRtspEntries, useClusterNodes, useConfirm, useCustomFieldRenderer, useDebouncedString, useDecoderCreateSession, useDecoderDestroySession, useDecoderGetInfo, useDecoderGetStats, useDecoderListActiveSessions, useDecoderOpenStream, useDecoderPullFrames, useDecoderPushPacket, useDecoderReprobeHwaccel, useDecoderSupportsCodec, useDecoderUpdateConfig, useDetectionPipelineApplyDeviceSettingsPatch, useDetectionPipelineGetDeviceLiveContribution, useDetectionPipelineGetDeviceSettingsContribution, useDevShell, useDevice, useDeviceBattery, useDeviceCapability, useDeviceDetections, useDeviceDiscoveryAdoptDevice, useDeviceDiscoveryGetStatus, useDeviceDiscoveryListDiscovered, useDeviceDiscoveryRefreshDiscovery, useDeviceDiscoveryReleaseDevice, useDeviceExportApplyDeviceSettingsPatch, useDeviceExportExposeDevice, useDeviceExportGetDeviceLiveContribution, useDeviceExportGetDeviceSettingsContribution, useDeviceExportGetStatus, useDeviceExportListExposedDevices, useDeviceExportListSupportedDeviceKinds, useDeviceExportUnexposeDevice, useDeviceId, useDeviceManagerAddLocation, useDeviceManagerAdoptDevice, useDeviceManagerAllocateDeviceId, useDeviceManagerCreateDevice, useDeviceManagerDisable, useDeviceManagerDiscoverDevices, useDeviceManagerEnable, useDeviceManagerGetAllBindings, useDeviceManagerGetBindings, useDeviceManagerGetChildren, useDeviceManagerGetConfigSchema, useDeviceManagerGetCreationSchema, useDeviceManagerGetDevice, useDeviceManagerGetDeviceAggregate, useDeviceManagerGetDeviceLiveInfoAggregate, useDeviceManagerGetDeviceSettingsAggregate, useDeviceManagerGetDeviceStatusAggregate, useDeviceManagerGetSettingsSchema, useDeviceManagerGetStreamProfileMap, useDeviceManagerGetStreamSources, useDeviceManagerListAll, useDeviceManagerListBindableCapsForDeviceType, useDeviceManagerListLocations, useDeviceManagerListPersistedByAddon, useDeviceManagerListWrappersForCap, useDeviceManagerLoadConfig, useDeviceManagerLoadMeta, useDeviceManagerLoadRuntimeState, useDeviceManagerPersistConfig, useDeviceManagerProbeStreams, useDeviceManagerRegisterDevice, useDeviceManagerRemove, useDeviceManagerRemoveDevice, useDeviceManagerRemoveLocation, useDeviceManagerSetDisabled, useDeviceManagerSetLocation, useDeviceManagerSetMetadata, useDeviceManagerSetName, useDeviceManagerSetStreamProfileMap, useDeviceManagerSetWrapperActive, useDeviceManagerTestCreationField, useDeviceManagerTestField, useDeviceManagerUpdateConfig, useDeviceManagerUpdateDeviceField, useDeviceManagerUpdateDeviceFieldsBatch, useDeviceOpsGetConfigEntries, useDeviceOpsGetSettingsSchema, useDeviceOpsGetStreamSources, useDeviceOpsRemoveDevice, useDeviceOpsSetConfig, useDeviceProviderAdoptDiscoveredDevice, useDeviceProviderCreateDevice, useDeviceProviderDiscoverDevices, useDeviceProviderGetChildCreationSchema, useDeviceProviderGetDevices, useDeviceProviderGetStatus, useDeviceProviderStart, useDeviceProviderStop, useDeviceProviderSupportsDiscovery, useDeviceProviderSupportsManualCreation, useDeviceProviderTestCreationField, useDeviceProxy, useDeviceSnapshot, useDeviceSnapshotImage, useDeviceState, useDeviceStateGetAllSnapshots, useDeviceStateGetCapSlice, useDeviceStateGetSnapshot, useDeviceStateSetCapSlice, useDeviceStateSlice, useDeviceStatusGetStatus, useDeviceWebrtc, useDevices, useDoorbellEvents, useDoorbellGetStatus, useEventInvalidation, useEventStreamLatest, useEventStreamMap, useEventsGetEventClipUrl, useEventsGetEventThumbnail, useEventsGetEvents, useFeatureProbeGetStatus, useIntegrationsCreate, useIntegrationsDelete, useIntegrationsGet, useIntegrationsGetAvailableTypes, useIntegrationsGetByAddonId, useIntegrationsGetSettings, useIntegrationsList, useIntegrationsSetSettings, useIntegrationsTestConnection, useIntegrationsUpdate, useIntercomEndTalkSession, useIntercomGetStatus, useIntercomHandleAnswer, useIntercomPushTalkPcm, useIntercomStartSession, useIntercomStartTalkSession, useIntercomStopSession, useIsMidWidth, useIsMobile, useLiveBuffer, useLiveEvent, useLocalNetworkGetAllowedAddresses, useLocalNetworkGetConnectionEndpoints, useLocalNetworkGetPreferred, useLocalNetworkList, useLocalNetworkResetAllowlistToBestMatch, useLocalNetworkSetAllowedAddresses, useMeshNetworkGetStatus, useMeshNetworkJoin, useMeshNetworkLeave, useMeshNetworkListPeers, useMeshNetworkLogout, useMeshNetworkStartLogin, useMeshNetworkTestConnection, useMeshOrchestratorJoinProvider, useMeshOrchestratorLeaveProvider, useMeshOrchestratorListProviderPeers, useMeshOrchestratorListProviders, useMeshOrchestratorLogoutProvider, useMeshOrchestratorStartLoginProvider, useMetricsProviderCollectSnapshot, useMetricsProviderGetAddonStats, useMetricsProviderGetCached, useMetricsProviderGetCpuTemperature, useMetricsProviderGetCurrent, useMetricsProviderGetDiskSpace, useMetricsProviderGetGpuInfo, useMetricsProviderGetProcessStats, useMetricsProviderKillProcess, useMetricsProviderListAddonInstances, useMetricsProviderListNodeProcesses, useMotionDetectionAnalyze, useMotionDetectionApplyDeviceSettingsPatch, useMotionDetectionGetDeviceLiveContribution, useMotionDetectionGetDeviceSettingsContribution, useMotionDetectionRemoveCamera, useMotionDetectionReset, useMotionGetStatus, useMotionIsDetected, useMotionTriggerGetStatus, useMotionTriggerSetMotionTrigger, useMqttBrokerAddBroker, useMqttBrokerGetBrokerConfig, useMqttBrokerGetStatus, useMqttBrokerListBrokers, useMqttBrokerRemoveBroker, useMqttBrokerStartEmbeddedBroker, useMqttBrokerStopEmbeddedBroker, useMqttBrokerTestConnection, useNativeObjectDetectionGetStatus, useNetworkQualityGetAllStats, useNetworkQualityGetDeviceStats, useNetworkQualityReportClientStats, useNodesClusterAddonStatus, useNodesDeployAddon, useNodesExecuteQuery, useNodesGetNodeAddons, useNodesRenameNode, useNodesRestartAddon, useNodesRestartNode, useNodesRestartProcess, useNodesSetProcessLogLevel, useNodesShutdownNode, useNodesTopology, useNodesUndeployAddon, useNotificationOutputSend, useNotificationOutputSendTest, useOptionalSystem, useOptionalWidgetRegistry, useOsdGetStatus, useOsdSetOverlay, usePTZ, usePipelineAnalyticsApplyDeviceSettingsPatch, usePipelineAnalyticsClearTracks, usePipelineAnalyticsGetActiveTracks, usePipelineAnalyticsGetAudioEvents, usePipelineAnalyticsGetDeviceLiveContribution, usePipelineAnalyticsGetDeviceSettingsContribution, usePipelineAnalyticsGetEventMedia, usePipelineAnalyticsGetMotionEvents, usePipelineAnalyticsGetObjectEvents, usePipelineAnalyticsGetTrack, usePipelineAnalyticsGetTrackMedia, usePipelineAnalyticsListTracks, usePipelineExecutorCacheFrameInPool, usePipelineExecutorDeleteModel, usePipelineExecutorDeleteTemplate, usePipelineExecutorDetect, usePipelineExecutorDownloadModel, usePipelineExecutorGetAddonModels, usePipelineExecutorGetAudioCapabilities, usePipelineExecutorGetAvailableEngines, usePipelineExecutorGetCapabilities, usePipelineExecutorGetDefaultSteps, usePipelineExecutorGetDetectionConfigSchema, usePipelineExecutorGetEffectiveTuning, usePipelineExecutorGetGlobalPipelineConfig, usePipelineExecutorGetGlobalSteps, usePipelineExecutorGetOrchestratorConfigSchema, usePipelineExecutorGetReferenceAudio, usePipelineExecutorGetReferenceAudioFiles, usePipelineExecutorGetReferenceImage, usePipelineExecutorGetSchema, usePipelineExecutorGetSelectedEngine, usePipelineExecutorGetVideoPipelineSteps, usePipelineExecutorInferCached, usePipelineExecutorKillEngine, usePipelineExecutorListLoadedEngines, usePipelineExecutorListReferenceImages, usePipelineExecutorListTemplates, usePipelineExecutorReprobeEngine, usePipelineExecutorRunAudioTest, usePipelineExecutorRunPipeline, usePipelineExecutorRunPipelineBatch, usePipelineExecutorSaveTemplate, usePipelineExecutorSetVideoPipelineSteps, usePipelineExecutorSpinEngine, usePipelineExecutorUncacheFrame, usePipelineExecutorUpdateTemplate, usePipelineOrchestratorApplyDeviceSettingsPatch, usePipelineOrchestratorAssignAudio, usePipelineOrchestratorAssignDecoder, usePipelineOrchestratorAssignPipeline, usePipelineOrchestratorDeleteTemplate, usePipelineOrchestratorGetAgentLoad, usePipelineOrchestratorGetAgentSettings, usePipelineOrchestratorGetAudioAssignment, usePipelineOrchestratorGetAudioAssignments, usePipelineOrchestratorGetAudioNodeLoad, usePipelineOrchestratorGetCameraMetrics, usePipelineOrchestratorGetCameraSettings, usePipelineOrchestratorGetCameraStepOverrides, usePipelineOrchestratorGetCapabilityBindings, usePipelineOrchestratorGetDecoderAssignment, usePipelineOrchestratorGetDecoderAssignments, usePipelineOrchestratorGetDeviceLiveContribution, usePipelineOrchestratorGetDeviceSettingsContribution, usePipelineOrchestratorGetGlobalMetrics, usePipelineOrchestratorGetPipelineAssignment, usePipelineOrchestratorGetPipelineAssignments, usePipelineOrchestratorListAgentSettings, usePipelineOrchestratorListTemplates, usePipelineOrchestratorRebalance, usePipelineOrchestratorRemoveAgentSettings, usePipelineOrchestratorResolvePipeline, usePipelineOrchestratorSaveTemplate, usePipelineOrchestratorSetAgentAddonDefaults, usePipelineOrchestratorSetCameraPipelineForAgent, usePipelineOrchestratorSetCameraStepOverride, usePipelineOrchestratorSetCameraStepToggle, usePipelineOrchestratorSetCapabilityBinding, usePipelineOrchestratorUnassignAudio, usePipelineOrchestratorUnassignDecoder, usePipelineOrchestratorUnassignPipeline, usePipelineOrchestratorUpdateTemplate, usePipelineRunnerAttachCamera, usePipelineRunnerDetachCamera, usePipelineRunnerGetAllCameraMetrics, usePipelineRunnerGetCameraMetrics, usePipelineRunnerGetLocalCameras, usePipelineRunnerGetLocalLoad, usePipelineRunnerGetLocalMetrics, usePipelineRunnerReportMotion, usePlatformProbeGetCapabilities, usePlatformProbeGetHardware, usePlatformProbeGetHardwareEncoders, usePlatformProbeRefreshHardwareEncoders, usePlatformProbeResolveHwAccel, usePlatformProbeResolveInferenceConfig, usePlayerOverlayLayer, usePlayerOverlayLayers, usePlayerToolbarButton, usePlayerToolbarButtons, usePtzAutotrackGetSettings, usePtzAutotrackGetStatus, usePtzAutotrackSetEnabled, usePtzAutotrackSetSettings, usePtzContinuousMove, usePtzGetPosition, usePtzGetPresets, usePtzGetStatus, usePtzGoHome, usePtzGoToPreset, usePtzMove, usePtzStop, useRebootReboot, useRecordingEngineDisable, useRecordingEngineEnable, useRecordingEngineEstimateGlobalStorage, useRecordingEngineEstimateStorage, useRecordingEngineGetAvailability, useRecordingEngineGetConfig, useRecordingEngineGetMotionStats, useRecordingEngineGetPlaylist, useRecordingEngineGetPolicy, useRecordingEngineGetPolicyStatus, useRecordingEngineGetRetentionConfig, useRecordingEngineGetSegments, useRecordingEngineGetStatus, useRecordingEngineGetStorageUsage, useRecordingEngineGetThumbnail, useRecordingEngineSetPolicy, useRecordingEngineUpdateConfig, useRecordingEngineUpdateRetentionConfig, useRecordingGetPlaybackUrl, useRecordingGetSegments, useRecordingGetThumbnailAt, useRemoteAccessListProviders, useRemoteAccessStartProvider, useRemoteAccessStopProvider, useSettingsStoreCount, useSettingsStoreDeclareCollection, useSettingsStoreDelete, useSettingsStoreGet, useSettingsStoreInsert, useSettingsStoreIsEmpty, useSettingsStoreQuery, useSettingsStoreSet, useSettingsStoreUpdate, useSnapshotApplyDeviceSettingsPatch, useSnapshotGetDeviceLiveContribution, useSnapshotGetDeviceSettingsContribution, useSnapshotGetSnapshot, useSnapshotGetStatus, useSnapshotInvalidateCache, useSnapshotProviderGetSnapshot, useSnapshotProviderSupportsDevice, useStorageAbortUpload, useStorageBeginDownload, useStorageBeginUpload, useStorageDelete, useStorageDeleteLocation, useStorageEndDownload, useStorageExists, useStorageFinalizeUpload, useStorageGetAvailableSpace, useStorageGetDefaultLocation, useStorageList, useStorageListLocations, useStorageListProviders, useStorageRead, useStorageReadChunk, useStorageResolve, useStorageTestConfig, useStorageTestLocation, useStorageUpsertLocation, useStorageWrite, useStorageWriteChunk, useStreamBrokerApplyDeviceSettingsPatch, useStreamBrokerAssignProfile, useStreamBrokerGetAllRtspEntries, useStreamBrokerGetBroker, useStreamBrokerGetBrokerStats, useStreamBrokerGetDeviceLiveContribution, useStreamBrokerGetDeviceSettingsContribution, useStreamBrokerGetPreBufferInfo, useStreamBrokerGetRtspEntry, useStreamBrokerGetRtspPort, useStreamBrokerGetStreamUrl, useStreamBrokerGetStreamWithCodec, useStreamBrokerIsRtspEnabled, useStreamBrokerKillClient, useStreamBrokerListAllCameraStreams, useStreamBrokerListAllProfileSlots, useStreamBrokerListClients, useStreamBrokerPublishCameraStream, useStreamBrokerRegenerateRtspToken, useStreamBrokerReleaseStreamWithCodec, useStreamBrokerRestartProfile, useStreamBrokerRetractCameraStream, useStreamBrokerSetPreBufferDuration, useStreamBrokerSetRtspEnabled, useStreamBrokerUnassignProfile, useSwitchGetStatus, useSwitchSetState, useSystem, useSystemFeatureFlags, useSystemForceRetentionCleanup, useSystemGetRetentionConfig, useSystemHealth, useSystemInfo, useSystemMutation, useSystemNetworkAddresses, useSystemQuery, useSystemSetRetentionConfig, useThemeMode, useToastOnToast, useTurnOrchestratorGetAllServers, useTurnOrchestratorListProviders, useTurnOrchestratorSetProviderEnabled, useTurnProviderGetTurnServers, useUserManagementConfirmTotp, useUserManagementCreateApiKey, useUserManagementCreateScopedToken, useUserManagementCreateUser, useUserManagementDeleteUser, useUserManagementDisableTotp, useUserManagementGetTotpStatus, useUserManagementListApiKeys, useUserManagementListScopedTokens, useUserManagementListUsers, useUserManagementResetPassword, useUserManagementRevokeApiKey, useUserManagementRevokeScopedToken, useUserManagementSetUserScopes, useUserManagementSetupTotp, useUserManagementUpdateUser, useUserManagementValidateApiKey, useUserManagementValidateCredentials, useUserManagementValidateScopedToken, useUserManagementVerifyTotp, useWebrtcSessionCloseSession, useWebrtcSessionCreateSession, useWebrtcSessionHandleAnswer, useWebrtcSessionHandleOffer, useWebrtcSessionHasAdaptiveBitrate, useWebrtcSessionListStreams, useWidget, useWidgetMetadata, useWidgetRegistry, useZoneAnalyticsGetCameraHistory, useZoneAnalyticsGetCurrentSnapshot, useZoneAnalyticsGetUnzonedHistory, useZoneAnalyticsGetZoneHistory, useZoneEditing, useZoneRulesListRules, useZoneRulesSetRules, useZonesAddZone, useZonesListZones, useZonesRemoveZone, useZonesUpdateZone, validateScopes };
25852
+ export { AddonGlobalSettingsForm, AgentStepEditor, AppShell, AudioClassificationList, AudioLevelWaveform, AudioWaveform, BTN_COMPACT, BTN_COMPACT_DANGER, BTN_COMPACT_PRIMARY, BTN_COMPACT_WARNING, Badge, BatteryBadge, BottomSheet, Breadcrumb, Button, CHIP_ACTIVE, CHIP_BASE, CHIP_INACTIVE, CLASS_COLORS, CameraStreamPlayer, Card, Checkbox, CodeBlock, CollapsibleCard, ConfigFormBuilder, FormField as ConfigFormField, ConfigSchemaField, ConfirmActionButton, ConfirmDialogProvider, CopyButton, CustomFieldRenderersProvider, DEFAULT_COLOR, DataTable, DetectionCanvas, DetectionOverlay, DetectionResultTree, DevShell, DeviceActivityPanel, DeviceCard, DeviceContextProvider, DeviceExportPanel, DeviceGrid, DeviceItem, DeviceList, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DiscoveryPanel, DoorbellRecentPanel, Dropdown, DropdownContent, DropdownItem, DropdownTrigger, EmptyState, ErrorBox, EventStream, FilterBar, FloatingEventStream, FloatingLogStream, FloatingPanel, FormField$1 as FormField, GRID_GAP, GRID_PAIRED, GRID_QUICK_STATS, INPUT_COMPACT, IconButton, ImageSelector, InferenceConfigSelector, Input, KebabMenu, KeyValueList, LIST_ROW, Label, LogStream, LoginForm, MobileDrawer, NodeMultiSelectField, NodePicker, NodeSelectField, PHASE_CONFIG, PTZOverlay, PageHeader, PhaseIcon, PipelineBuilder, PipelineRuntimeSelector, PipelineStep, PipelineTreeMatrix, PlayerOverlaysProvider, Popover, PopoverContent, PopoverTrigger, ProviderBadge, QrCode, ResponseLog, SECTION_BODY, SECTION_CARD, SECTION_HEADER, SPLIT_PANEL_OUTER, SPLIT_PANEL_SIDE, STACK_GAP, ScopePicker, ScrollArea, Select, SemanticBadge, Separator, Sidebar, SidebarItem, Skeleton, SlideOverPanel, SnapshotButton, StatCard, StateValuesStream, StatusBadge, StepTimings, StepTreeMaster, StreamBrokerSelector, StreamPanel, Switch, SystemProvider, TEXT_FIELD_LABEL, TEXT_HINT, TEXT_METRIC, TEXT_SECTION_LABEL, TEXT_VALUE, Tabs, TabsContent, TabsList, TabsTrigger, ThemeProvider, Tooltip, TooltipContent, TooltipTrigger, VersionBadge, WidgetRegistryProvider, WidgetSlot, ZoneEditingProvider, buildStepTreeFromSchema, cn, createSharedContext, createTheme, darkColors, defaultTheme, deriveDeviceKind, ensureMfHostInit, getClassColor, getPhaseVisual, isFieldVisible, lightColors, mirror, mountAddonPage, providerIcons, statusIcons, themeToCss, trpc, useAccessoriesGetStatus, useAddonPagesListPages, useAddonSettingsGetDeviceSettings, useAddonSettingsGetGlobalSettings, useAddonSettingsUpdateDeviceSettings, useAddonSettingsUpdateGlobalSettings, useAddonWidgetsListWidgets, useAddonsApplyAutoUpdateToAll, useAddonsCustom, useAddonsForceRefresh, useAddonsGetAddonAutoUpdate, useAddonsGetAutoUpdateSettings, useAddonsGetLastRestart, useAddonsGetLogs, useAddonsGetVersions, useAddonsInstallFromWorkspace, useAddonsInstallPackage, useAddonsIsWorkspaceAvailable, useAddonsList, useAddonsListCapabilityProviders, useAddonsListFrameworkPackages, useAddonsListPackages, useAddonsListUpdates, useAddonsListWorkspacePackages, useAddonsOnAddonLogs, useAddonsReloadPackages, useAddonsRestartAddon, useAddonsRestartServer, useAddonsRetryLoad, useAddonsRollbackPackage, useAddonsSearchAvailable, useAddonsSetAddonAutoUpdate, useAddonsSetAutoUpdateSettings, useAddonsSetCapabilityProviderEnabled, useAddonsUninstallPackage, useAddonsUpdateFrameworkPackage, useAddonsUpdatePackage, useAlertsDismiss, useAlertsEmit, useAlertsGetUnreadCount, useAlertsList, useAlertsMarkAllRead, useAlertsMarkRead, useAlertsUpdate, useAllWidgets, useAudioAnalysisApplyDeviceSettingsPatch, useAudioAnalysisGetDeviceLiveContribution, useAudioAnalysisGetDeviceSettingsContribution, useAudioAnalysisResolveDeviceSettings, useAudioAnalyzerAnalyseChunk, useAudioAnalyzerClassify, useAudioAnalyzerDispose, useAudioAnalyzerIsReady, useAudioAnalyzerReprobeAudioEngine, useAudioCodecCanHandle, useAudioCodecCloseSession, useAudioCodecCreateDecodeSession, useAudioCodecCreateEncodeSession, useAudioCodecFlushEncode, useAudioCodecListActiveSessions, useAudioCodecListSupportedCodecs, useAudioCodecPullEncoded, useAudioCodecPullPcm, useAudioCodecPushEncodedFrame, useAudioCodecPushPcm, useAudioMetricsGetCurrentSnapshot, useAudioMetricsGetHistory, useBackupDelete, useBackupGetEntries, useBackupList, useBackupListArchives, useBackupListDestinations, useBackupListLocations, useBackupPreviewSchedule, useBackupRestore, useBackupTrigger, useBackupUpsertDestinationPolicy, useBatteryGetStatus, useBrightnessGetStatus, useBrightnessSetBrightness, useCameraCredentialsGetCredentials, useCameraCredentialsGetStatus, useCameraStreamsGetBrokerStreams, useCameraStreamsGetCameraStreams, useCameraStreamsGetRtspEntries, useClusterNodes, useConfirm, useCustomFieldRenderer, useDebouncedString, useDecoderCreateSession, useDecoderDestroySession, useDecoderGetInfo, useDecoderGetStats, useDecoderListActiveSessions, useDecoderOpenStream, useDecoderPullFrames, useDecoderPushPacket, useDecoderReprobeHwaccel, useDecoderSupportsCodec, useDecoderUpdateConfig, useDetectionPipelineApplyDeviceSettingsPatch, useDetectionPipelineGetDeviceLiveContribution, useDetectionPipelineGetDeviceSettingsContribution, useDevShell, useDevice, useDeviceBattery, useDeviceCapability, useDeviceDetections, useDeviceDiscoveryAdoptDevice, useDeviceDiscoveryGetStatus, useDeviceDiscoveryListDiscovered, useDeviceDiscoveryRefreshDiscovery, useDeviceDiscoveryReleaseDevice, useDeviceExportApplyDeviceSettingsPatch, useDeviceExportExposeDevice, useDeviceExportGetDeviceLiveContribution, useDeviceExportGetDeviceSettingsContribution, useDeviceExportGetStatus, useDeviceExportListExposedDevices, useDeviceExportListSupportedDeviceKinds, useDeviceExportUnexposeDevice, useDeviceId, useDeviceManagerAddLocation, useDeviceManagerAdoptDevice, useDeviceManagerAllocateDeviceId, useDeviceManagerCreateDevice, useDeviceManagerDisable, useDeviceManagerDiscoverDevices, useDeviceManagerEnable, useDeviceManagerGetAllBindings, useDeviceManagerGetBindings, useDeviceManagerGetChildren, useDeviceManagerGetConfigSchema, useDeviceManagerGetCreationSchema, useDeviceManagerGetDevice, useDeviceManagerGetDeviceAggregate, useDeviceManagerGetDeviceLiveInfoAggregate, useDeviceManagerGetDeviceSettingsAggregate, useDeviceManagerGetDeviceStatusAggregate, useDeviceManagerGetSettingsSchema, useDeviceManagerGetStreamProfileMap, useDeviceManagerGetStreamSources, useDeviceManagerListAll, useDeviceManagerListBindableCapsForDeviceType, useDeviceManagerListLocations, useDeviceManagerListPersistedByAddon, useDeviceManagerListWrappersForCap, useDeviceManagerLoadConfig, useDeviceManagerLoadMeta, useDeviceManagerLoadRuntimeState, useDeviceManagerPersistConfig, useDeviceManagerProbeStreams, useDeviceManagerRegisterDevice, useDeviceManagerRemove, useDeviceManagerRemoveDevice, useDeviceManagerRemoveLocation, useDeviceManagerSetDisabled, useDeviceManagerSetLocation, useDeviceManagerSetMetadata, useDeviceManagerSetName, useDeviceManagerSetStreamProfileMap, useDeviceManagerSetWrapperActive, useDeviceManagerTestCreationField, useDeviceManagerTestField, useDeviceManagerUpdateConfig, useDeviceManagerUpdateDeviceField, useDeviceManagerUpdateDeviceFieldsBatch, useDeviceOpsGetConfigEntries, useDeviceOpsGetSettingsSchema, useDeviceOpsGetStreamSources, useDeviceOpsRemoveDevice, useDeviceOpsSetConfig, useDeviceProviderAdoptDiscoveredDevice, useDeviceProviderCreateDevice, useDeviceProviderDiscoverDevices, useDeviceProviderGetChildCreationSchema, useDeviceProviderGetDevices, useDeviceProviderGetStatus, useDeviceProviderStart, useDeviceProviderStop, useDeviceProviderSupportsDiscovery, useDeviceProviderSupportsManualCreation, useDeviceProviderTestCreationField, useDeviceProxy, useDeviceSnapshot, useDeviceSnapshotImage, useDeviceState, useDeviceStateGetAllSnapshots, useDeviceStateGetCapSlice, useDeviceStateGetSnapshot, useDeviceStateSetCapSlice, useDeviceStateSlice, useDeviceStatusGetStatus, useDeviceWebrtc, useDevices, useDoorbellEvents, useDoorbellGetStatus, useEventInvalidation, useEventStreamLatest, useEventStreamMap, useEventsGetEventClipUrl, useEventsGetEventThumbnail, useEventsGetEvents, useFeatureProbeGetStatus, useIntegrationsCreate, useIntegrationsDelete, useIntegrationsGet, useIntegrationsGetAvailableTypes, useIntegrationsGetByAddonId, useIntegrationsGetSettings, useIntegrationsList, useIntegrationsSetSettings, useIntegrationsTestConnection, useIntegrationsUpdate, useIntercomEndTalkSession, useIntercomGetStatus, useIntercomHandleAnswer, useIntercomPushTalkPcm, useIntercomStartSession, useIntercomStartTalkSession, useIntercomStopSession, useIsMidWidth, useIsMobile, useLiveBuffer, useLiveEvent, useLocalNetworkGetAllowedAddresses, useLocalNetworkGetConnectionEndpoints, useLocalNetworkGetPreferred, useLocalNetworkList, useLocalNetworkResetAllowlistToBestMatch, useLocalNetworkSetAllowedAddresses, useMeshNetworkGetStatus, useMeshNetworkJoin, useMeshNetworkLeave, useMeshNetworkListPeers, useMeshNetworkLogout, useMeshNetworkStartLogin, useMeshNetworkTestConnection, useMetricsProviderCollectSnapshot, useMetricsProviderGetAddonStats, useMetricsProviderGetCached, useMetricsProviderGetCpuTemperature, useMetricsProviderGetCurrent, useMetricsProviderGetDiskSpace, useMetricsProviderGetGpuInfo, useMetricsProviderGetProcessStats, useMetricsProviderKillProcess, useMetricsProviderListAddonInstances, useMetricsProviderListNodeProcesses, useMotionDetectionAnalyze, useMotionDetectionApplyDeviceSettingsPatch, useMotionDetectionGetDeviceLiveContribution, useMotionDetectionGetDeviceSettingsContribution, useMotionDetectionRemoveCamera, useMotionDetectionReset, useMotionGetStatus, useMotionIsDetected, useMotionTriggerGetStatus, useMotionTriggerSetMotionTrigger, useMqttBrokerAddBroker, useMqttBrokerGetBrokerConfig, useMqttBrokerGetStatus, useMqttBrokerListBrokers, useMqttBrokerRemoveBroker, useMqttBrokerStartEmbeddedBroker, useMqttBrokerStopEmbeddedBroker, useMqttBrokerTestConnection, useNativeObjectDetectionGetStatus, useNetworkAccessGetEndpoint, useNetworkAccessGetStatus, useNetworkAccessListEndpoints, useNetworkAccessStart, useNetworkAccessStop, useNetworkQualityGetAllStats, useNetworkQualityGetDeviceStats, useNetworkQualityReportClientStats, useNodesClusterAddonStatus, useNodesDeployAddon, useNodesExecuteQuery, useNodesGetNodeAddons, useNodesRenameNode, useNodesRestartAddon, useNodesRestartNode, useNodesRestartProcess, useNodesSetProcessLogLevel, useNodesShutdownNode, useNodesTopology, useNodesUndeployAddon, useNotificationOutputSend, useNotificationOutputSendTest, useOptionalSystem, useOptionalWidgetRegistry, useOsdGetStatus, useOsdSetOverlay, usePTZ, usePipelineAnalyticsApplyDeviceSettingsPatch, usePipelineAnalyticsClearTracks, usePipelineAnalyticsGetActiveTracks, usePipelineAnalyticsGetAudioEvents, usePipelineAnalyticsGetDeviceLiveContribution, usePipelineAnalyticsGetDeviceSettingsContribution, usePipelineAnalyticsGetEventMedia, usePipelineAnalyticsGetMotionEvents, usePipelineAnalyticsGetObjectEvents, usePipelineAnalyticsGetTrack, usePipelineAnalyticsGetTrackMedia, usePipelineAnalyticsListTracks, usePipelineExecutorCacheFrameInPool, usePipelineExecutorDeleteModel, usePipelineExecutorDeleteTemplate, usePipelineExecutorDetect, usePipelineExecutorDownloadModel, usePipelineExecutorGetAddonModels, usePipelineExecutorGetAudioCapabilities, usePipelineExecutorGetAvailableEngines, usePipelineExecutorGetCapabilities, usePipelineExecutorGetDefaultSteps, usePipelineExecutorGetDetectionConfigSchema, usePipelineExecutorGetEffectiveTuning, usePipelineExecutorGetGlobalPipelineConfig, usePipelineExecutorGetGlobalSteps, usePipelineExecutorGetOrchestratorConfigSchema, usePipelineExecutorGetReferenceAudio, usePipelineExecutorGetReferenceAudioFiles, usePipelineExecutorGetReferenceImage, usePipelineExecutorGetSchema, usePipelineExecutorGetSelectedEngine, usePipelineExecutorGetVideoPipelineSteps, usePipelineExecutorInferCached, usePipelineExecutorKillEngine, usePipelineExecutorListLoadedEngines, usePipelineExecutorListReferenceImages, usePipelineExecutorListTemplates, usePipelineExecutorReprobeEngine, usePipelineExecutorRunAudioTest, usePipelineExecutorRunPipeline, usePipelineExecutorRunPipelineBatch, usePipelineExecutorSaveTemplate, usePipelineExecutorSetVideoPipelineSteps, usePipelineExecutorSpinEngine, usePipelineExecutorUncacheFrame, usePipelineExecutorUpdateTemplate, usePipelineOrchestratorApplyDeviceSettingsPatch, usePipelineOrchestratorAssignAudio, usePipelineOrchestratorAssignDecoder, usePipelineOrchestratorAssignPipeline, usePipelineOrchestratorDeleteTemplate, usePipelineOrchestratorGetAgentLoad, usePipelineOrchestratorGetAgentSettings, usePipelineOrchestratorGetAudioAssignment, usePipelineOrchestratorGetAudioAssignments, usePipelineOrchestratorGetAudioNodeLoad, usePipelineOrchestratorGetCameraMetrics, usePipelineOrchestratorGetCameraSettings, usePipelineOrchestratorGetCameraStepOverrides, usePipelineOrchestratorGetCapabilityBindings, usePipelineOrchestratorGetDecoderAssignment, usePipelineOrchestratorGetDecoderAssignments, usePipelineOrchestratorGetDeviceLiveContribution, usePipelineOrchestratorGetDeviceSettingsContribution, usePipelineOrchestratorGetGlobalMetrics, usePipelineOrchestratorGetPipelineAssignment, usePipelineOrchestratorGetPipelineAssignments, usePipelineOrchestratorListAgentSettings, usePipelineOrchestratorListTemplates, usePipelineOrchestratorRebalance, usePipelineOrchestratorRemoveAgentSettings, usePipelineOrchestratorResolvePipeline, usePipelineOrchestratorSaveTemplate, usePipelineOrchestratorSetAgentAddonDefaults, usePipelineOrchestratorSetCameraPipelineForAgent, usePipelineOrchestratorSetCameraStepOverride, usePipelineOrchestratorSetCameraStepToggle, usePipelineOrchestratorSetCapabilityBinding, usePipelineOrchestratorUnassignAudio, usePipelineOrchestratorUnassignDecoder, usePipelineOrchestratorUnassignPipeline, usePipelineOrchestratorUpdateTemplate, usePipelineRunnerAttachCamera, usePipelineRunnerDetachCamera, usePipelineRunnerGetAllCameraMetrics, usePipelineRunnerGetCameraMetrics, usePipelineRunnerGetLocalCameras, usePipelineRunnerGetLocalLoad, usePipelineRunnerGetLocalMetrics, usePipelineRunnerReportMotion, usePlatformProbeGetCapabilities, usePlatformProbeGetHardware, usePlatformProbeGetHardwareEncoders, usePlatformProbeRefreshHardwareEncoders, usePlatformProbeResolveHwAccel, usePlatformProbeResolveInferenceConfig, usePlayerOverlayLayer, usePlayerOverlayLayers, usePlayerToolbarButton, usePlayerToolbarButtons, usePtzAutotrackGetSettings, usePtzAutotrackGetStatus, usePtzAutotrackSetEnabled, usePtzAutotrackSetSettings, usePtzContinuousMove, usePtzGetPosition, usePtzGetPresets, usePtzGetStatus, usePtzGoHome, usePtzGoToPreset, usePtzMove, usePtzStop, useRebootReboot, useRecordingEngineDisable, useRecordingEngineEnable, useRecordingEngineEstimateGlobalStorage, useRecordingEngineEstimateStorage, useRecordingEngineGetAvailability, useRecordingEngineGetConfig, useRecordingEngineGetMotionStats, useRecordingEngineGetPlaylist, useRecordingEngineGetPolicy, useRecordingEngineGetPolicyStatus, useRecordingEngineGetRetentionConfig, useRecordingEngineGetSegments, useRecordingEngineGetStatus, useRecordingEngineGetStorageUsage, useRecordingEngineGetThumbnail, useRecordingEngineSetPolicy, useRecordingEngineUpdateConfig, useRecordingEngineUpdateRetentionConfig, useRecordingGetPlaybackUrl, useRecordingGetSegments, useRecordingGetThumbnailAt, useSettingsStoreCount, useSettingsStoreDeclareCollection, useSettingsStoreDelete, useSettingsStoreGet, useSettingsStoreInsert, useSettingsStoreIsEmpty, useSettingsStoreQuery, useSettingsStoreSet, useSettingsStoreUpdate, useSnapshotApplyDeviceSettingsPatch, useSnapshotGetDeviceLiveContribution, useSnapshotGetDeviceSettingsContribution, useSnapshotGetSnapshot, useSnapshotGetStatus, useSnapshotInvalidateCache, useSnapshotProviderGetSnapshot, useSnapshotProviderSupportsDevice, useStorageAbortUpload, useStorageBeginDownload, useStorageBeginUpload, useStorageDelete, useStorageDeleteLocation, useStorageEndDownload, useStorageExists, useStorageFinalizeUpload, useStorageGetAvailableSpace, useStorageGetDefaultLocation, useStorageList, useStorageListLocations, useStorageListProviders, useStorageRead, useStorageReadChunk, useStorageResolve, useStorageTestConfig, useStorageTestLocation, useStorageUpsertLocation, useStorageWrite, useStorageWriteChunk, useStreamBrokerApplyDeviceSettingsPatch, useStreamBrokerAssignProfile, useStreamBrokerGetAllRtspEntries, useStreamBrokerGetBroker, useStreamBrokerGetBrokerStats, useStreamBrokerGetDeviceLiveContribution, useStreamBrokerGetDeviceSettingsContribution, useStreamBrokerGetPreBufferInfo, useStreamBrokerGetRtspEntry, useStreamBrokerGetRtspPort, useStreamBrokerGetStreamUrl, useStreamBrokerGetStreamWithCodec, useStreamBrokerIsRtspEnabled, useStreamBrokerKillClient, useStreamBrokerListAllCameraStreams, useStreamBrokerListAllProfileSlots, useStreamBrokerListClients, useStreamBrokerPublishCameraStream, useStreamBrokerRegenerateRtspToken, useStreamBrokerReleaseStreamWithCodec, useStreamBrokerRestartProfile, useStreamBrokerRetractCameraStream, useStreamBrokerSetPreBufferDuration, useStreamBrokerSetRtspEnabled, useStreamBrokerUnassignProfile, useSwitchGetStatus, useSwitchSetState, useSystem, useSystemFeatureFlags, useSystemForceRetentionCleanup, useSystemGetRetentionConfig, useSystemHealth, useSystemInfo, useSystemMutation, useSystemNetworkAddresses, useSystemQuery, useSystemSetRetentionConfig, useThemeMode, useToastOnToast, useTurnProviderGetTurnServers, useUserManagementConfirmTotp, useUserManagementCreateApiKey, useUserManagementCreateScopedToken, useUserManagementCreateUser, useUserManagementDeleteUser, useUserManagementDisableTotp, useUserManagementGetTotpStatus, useUserManagementListApiKeys, useUserManagementListScopedTokens, useUserManagementListUsers, useUserManagementResetPassword, useUserManagementRevokeApiKey, useUserManagementRevokeScopedToken, useUserManagementSetUserScopes, useUserManagementSetupTotp, useUserManagementUpdateUser, useUserManagementValidateApiKey, useUserManagementValidateCredentials, useUserManagementValidateScopedToken, useUserManagementVerifyTotp, useWebrtcSessionCloseSession, useWebrtcSessionCreateSession, useWebrtcSessionHandleAnswer, useWebrtcSessionHandleOffer, useWebrtcSessionHasAdaptiveBitrate, useWebrtcSessionListStreams, useWidget, useWidgetMetadata, useWidgetRegistry, useZoneAnalyticsGetCameraHistory, useZoneAnalyticsGetCurrentSnapshot, useZoneAnalyticsGetUnzonedHistory, useZoneAnalyticsGetZoneHistory, useZoneEditing, useZoneRulesListRules, useZoneRulesSetRules, useZonesAddZone, useZonesListZones, useZonesRemoveZone, useZonesUpdateZone, validateScopes };
24228
25853
 
24229
25854
  //# sourceMappingURL=index.js.map