@camstack/addon-admin-ui 0.1.33 → 0.1.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-DJQnlBBe.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-DYU-qDnu.js} +1 -1
  2. package/dist/assets/{devices-BnLu5dxg.js → devices-D4k34mru.js} +1 -1
  3. package/dist/assets/{hostInit-DQ5UjxJa.js → hostInit-CBKchP1G.js} +1 -1
  4. package/dist/assets/index-BEewR-UX.js +1 -0
  5. package/dist/assets/{index-BmzE49kT.js → index-BGZqVJZt.js} +1 -1
  6. package/dist/assets/{index-DIIqKU3D.js → index-BI3Z7SSi.js} +1 -1
  7. package/dist/assets/index-BhNfKRLZ.js +1156 -0
  8. package/dist/assets/index-BqMPfvQx.js +1 -0
  9. package/dist/assets/{index-dePEzy7t.js → index-Bwcmc2hW.js} +1 -1
  10. package/dist/assets/index-CP1R6E2R.js +88 -0
  11. package/dist/assets/index-CwjnPcOV.js +152 -0
  12. package/dist/assets/{index-CMxz0koW.js → index-D92THlot.js} +1 -1
  13. package/dist/assets/index-Dmon2mdO.js +1 -0
  14. package/dist/assets/index-KlKJOjpC.js +1 -0
  15. package/dist/assets/index-bBEaoekV.css +1 -0
  16. package/dist/assets/method-access-map-BFPyQ2-G.js +1 -0
  17. package/dist/assets/{remoteEntry-D28y34bi.js → remoteEntry-BRybuw2S.js} +1 -1
  18. package/dist/assets/{schemas-DZqswtjx.js → schemas-BEt-CulV.js} +1 -1
  19. package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-BXwMMqlX.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-DUkp33c_.js} +2 -2
  20. package/dist/index.html +7 -7
  21. package/dist/mf-entry-bootstrap-0.js +2 -2
  22. package/dist/server/addon.js +196 -235
  23. package/dist/server/addon.js.map +1 -1
  24. package/dist/sw.js +1 -1
  25. package/package.json +1 -1
  26. package/dist/assets/index-DFRMwfPq.js +0 -1
  27. package/dist/assets/index-DRW7rVhn.js +0 -1133
  28. package/dist/assets/index-DYSrVZ4G.js +0 -1
  29. package/dist/assets/index-DeVjiPqm.js +0 -1
  30. package/dist/assets/index-DuHBxCOe.js +0 -1
  31. package/dist/assets/index-Dv0-1gwL.js +0 -80
  32. package/dist/assets/index-NNW--T4H.js +0 -80
  33. package/dist/assets/index-n9RexO7D.css +0 -1
  34. package/dist/assets/method-access-map-OoQznstl.js +0 -1
@@ -0,0 +1 @@
1
+ var Ze=(n,a)=>()=>(a||n((a={exports:{}}).exports,a),a.exports);var Ra=Ze(i=>{Object.defineProperty(i,Symbol.toStringTag,{value:"Module"});const s=require("./index-BkSgJYP7.js"),b=require("zod");class Ve{disposers=[];disposed=!1;onError;constructor(a={}){this.onError=a.onError??((e,o)=>{console.error(`[DisposerChain] disposer #${o} threw`,e)})}add(a){if(this.disposed){try{const e=a();e&&typeof e.then=="function"&&e.catch(o=>this.onError(o,-1))}catch(e){this.onError(e,-1)}return()=>{}}return this.disposers.push(a),()=>{const e=this.disposers.indexOf(a);e>=0&&this.disposers.splice(e,1)}}get isDisposed(){return this.disposed}get size(){return this.disposers.length}async dispose(){if(this.disposed)return;this.disposed=!0;const a=this.disposers.slice().reverse();this.disposers=[];for(let e=0;e<a.length;e++){const o=a[e];try{const r=o();r&&typeof r.then=="function"&&await r}catch(r){this.onError(r,a.length-1-e)}}}}const be="main-group",Ie="hub-only";function L(n){return{placement:n.execution?.placement??Ie,group:n.execution?.group??be}}function Ye(n){const a=L(n).placement;return a==="any-node"||a==="agent-only"}function Qe(n){return L(n).placement==="agent-only"}function Je(n){return L(n).group}function Xe(n){return L(n).placement}var B=(n=>(n.SystemBoot="system.boot",n.SystemAddonsReady="system.addons-ready",n.SystemRestarting="system.restarting",n.SystemRestartCompleted="system.restart-completed",n.SystemReadyState="system.ready-state",n.AddonStarted="addon.started",n.AddonStopped="addon.stopped",n.AddonRestarted="addon.restarted",n.AddonUpdated="addon.updated",n.AddonInstalled="addon.installed",n.AddonUninstalled="addon.uninstalled",n.AddonCrashed="addon.crashed",n.AddonError="addon.error",n.AddonPageReady="addon.page-ready",n.AddonWidgetReady="addon.widget-ready",n.AddonLoadFailed="addon.load-failed",n.AddonLoadRecovered="addon.load-recovered",n.AddonRetryScheduled="addon.retry-scheduled",n.AddonRetryAttempting="addon.retry-attempting",n.DeviceRegistered="device.registered",n.DeviceUnregistered="device.unregistered",n.DeviceEnabled="device.enabled",n.DeviceDisabled="device.disabled",n.DeviceSettingsUpdated="device.settings-updated",n.DeviceBindingsChanged="device.bindings-changed",n.DeviceMetaChanged="device.meta-changed",n.DeviceStreamsRegistered="device.streams-registered",n.IntegrationEnabled="integration.enabled",n.IntegrationDisabled="integration.disabled",n.IntegrationDeleted="integration.deleted",n.ProviderStarted="provider.started",n.ProviderStopped="provider.stopped",n.ProcessCrashed="process.crashed",n.ProcessRestartScheduled="process.restart_scheduled",n.ProcessRestarted="process.restarted",n.RecordingStarted="recording.started",n.RecordingStopped="recording.stopped",n.RecordingError="recording.error",n.RecordingHealthDegraded="recording.health.degraded",n.RecordingStorageCritical="recording.storage.critical",n.RecordingSegmentWritten="recording.segment.written",n.RecordingPolicyFallback="recording.policy.fallback",n.RecordingRetentionCompleted="recording.retention.completed",n.DetectionEvent="detection.event",n.SessionTrackNew="session.track.new",n.SessionTrackExpired="session.track.expired",n.BenchmarkProgress="benchmark.progress",n.PlatformProbePhase="platform-probe.phase",n.PipelineProgress="pipeline.progress",n.PipelineTrace="pipeline.trace",n.PipelineInferenceResult="pipeline.inference-result",n.PipelineCameraAssigned="pipeline.camera-assigned",n.PipelineCameraUnassigned="pipeline.camera-unassigned",n.PipelineCameraUpdated="pipeline.camera-updated",n.PipelineRunnerLoadSnapshot="pipeline.runner-load-snapshot",n.PipelineCameraMetricsSnapshot="pipeline.camera-metrics-snapshot",n.StreamBrokerMetricsSnapshot="stream-broker.metrics-snapshot",n.StreamBrokerOnCamStreamDemand="stream-broker.onCamStreamDemand",n.StreamBrokerOnCamStreamIdle="stream-broker.onCamStreamIdle",n.StreamBrokerOnRequestStreamSourceRefresh="stream-broker.onRequestStreamSourceRefresh",n.DeviceStateChanged="device.state-changed",n.BatteryOnStatusChanged="battery.onStatusChanged",n.DoorbellOnPressed="doorbell.onPressed",n.PipelineEngineMetricsSnapshot="pipeline.engine-metrics-snapshot",n.ClusterTopologySnapshot="cluster.topology-snapshot",n.MetricsNodeResourcesSnapshot="metrics.node-resources-snapshot",n.MetricsNodeProcessesSnapshot="metrics.node-processes-snapshot",n.CapabilityBindingChanged="capability.binding-changed",n.ModelDownloadProgress="model.download.progress",n.AgentRegistered="agent.registered",n.AgentUnregistered="agent.unregistered",n.AgentOnline="agent.online",n.AgentOffline="agent.offline",n.WorkerOnline="worker.online",n.WorkerOffline="worker.offline",n.AgentTaskDispatched="agent.task.dispatched",n.AgentTaskAssigned="agent.task.assigned",n.AgentTrpcConnected="agent.trpc.connected",n.AgentWsConnected="agent.ws.connected",n.AgentWsDisconnected="agent.ws.disconnected",n.AgentBackupActivated="agent.backup.activated",n.OrchestrationSettingsUpdated="orchestration.settings-updated",n.PipelineAgentHwaccelChanged="pipeline.agent-hwaccel-changed",n.MotionAnalysis="detection.motion-analysis",n.MotionZonesRaw="detection.motion-zones-raw",n.MotionOnMotionChanged="motion.on-motion-changed",n.DetectionResult="detection.result",n.DetectionRaw="detection.raw",n.DetectionCameraNative="detection.camera-native",n.PipelineAudioInferenceResult="pipeline.audio-inference-result",n.DetectionPhaseTransition="detection.phase-transition",n.ProviderMotion="provider.motion",n.ProviderDetection="provider.detection",n.EnrichmentEmbeddingStored="enrichment.embedding.stored",n.EnrichmentSceneStateChanged="enrichment.scene.state-changed",n.EnrichmentActivitySummary="enrichment.activity.summary",n.PipelineAnalyticsTrackStarted="pipeline-analytics.track-started",n.PipelineAnalyticsTrackEnded="pipeline-analytics.track-ended",n.PipelineAnalyticsDetectionEvent="pipeline-analytics.detection-event",n.PipelineAnalyticsFrameTracked="pipeline-analytics.frame-tracked",n.FrigateLiveEvent="frigate.live-event",n.CameraStreamsProfileSlotsChanged="camera-streams.onProfileSlotsChanged",n.StreamOnline="stream.online",n.StreamOffline="stream.offline",n.NetworkTunnelStarted="network.tunnel.started",n.NetworkTunnelStopped="network.tunnel.stopped",n.LocalNetworkChanged="network.local.changed",n.BackupCompleted="backup.completed",n.BackupRestored="backup.restored",n.NotificationDispatched="notification.dispatched",n.NotificationFailed="notification.failed",n.DeviceUpdated="device.updated",n.DeviceOnline="device.online",n.DeviceOffline="device.offline",n.DeviceAwake="device.awake",n.DeviceSleeping="device.sleeping",n.RetentionCleanup="retention.cleanup",n))(B||{});function et(n,a){return n.category===a}function V(n,a,e){return{id:typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2),timestamp:new Date,source:a,category:n,data:e}}function we(n,a){const e=a.ts??Date.now();n.emit(V("system.ready-state",{type:"capability",id:a.capName,nodeId:a.sourceNodeId},{capName:a.capName,scope:a.scope,state:a.state,generation:a.generation,sourceNodeId:a.sourceNodeId,ts:e}))}class Ce{_ctx=null;_config;_readinessGeneration=typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2,14);_registeredCapNames=[];defaults;constructor(a){this.defaults=a,this._config={...a}}get autoEmitReadiness(){return!0}get ctx(){if(!this._ctx)throw new Error(`${this.constructor.name}: ctx accessed before initialize()`);return this._ctx}get ctxIfReady(){return this._ctx}get config(){return this._config}async initialize(a){this._ctx=a,await this.resolveConfig();const e=await this.onInitialize();this.emitLifecycle(B.AddonStarted);const o=ke(e),r=o&&"providers"in o&&o.providers?o.providers:[];return this._registeredCapNames=r.map(p=>p.capability.name),o}postBrokerStart(){this.autoEmitReadiness&&this._registeredCapNames.length>0&&this.emitReadinessForProviders("ready")}async onHubReachable(){}async shutdown(){this.emitLifecycle(B.AddonStopped),this.autoEmitReadiness&&this.emitReadinessForProviders("down"),await this.onShutdown();for(const a of this._subscriptions)a();this._subscriptions=[],this._ctx=null}async onShutdown(){}async onConfigChanged(){}field(a){return a}schema(a){return a}globalSettingsSchema(){return null}deviceSettingsSchema(){return null}async getGlobalSettings(a){const e=this.globalSettingsSchema();if(!e)return{sections:[]};const o=await this._ctx?.settings?.readAddonStore()??{};return s.hydrateSchema(e,a?{...o,...a}:o)}async updateGlobalSettings(a){await this._ctx?.settings?.writeAddonStore(a),await this.resolveConfig(),await this.onConfigChanged(),this.emitLifecycle(B.AddonUpdated,{level:"global"}),this.maybeAutoRestart(a,this.globalSettingsSchema())}maybeAutoRestart(a,e){if(!e)return;const o=new Set;for(const d of e.sections)for(const l of d.fields)l.type==="separator"||l.type==="info"||l.requiresRestart&&o.add(l.key);if(o.size===0||!Object.keys(a).some(d=>o.has(d)))return;const p=this._ctx;if(!p)return;const m=p.id;setImmediate(()=>{p.api.addons?.restartAddon?.mutate({addonId:m}).then(()=>{p.logger.info("addon auto-restart triggered by restart-required setting change",{meta:{changedFields:Object.keys(a).filter(l=>o.has(l))}})}).catch(l=>{p.logger.error("addon auto-restart failed",{meta:{error:l instanceof Error?l.message:String(l)}})})})}async getDeviceSettings(a){const e=this.deviceSettingsSchema();if(!e)return{sections:[]};const o=await this._ctx?.settings?.readDeviceStore(a)??{};return s.hydrateSchema(e,o)}async updateDeviceSettings(a,e){await this._ctx?.settings?.writeDeviceStore(a,e)}_subscriptions=[];watchCapability(a,e){const o=Array.isArray(a)?a:[a],r=new Set(o);this.subscribe({category:"system.ready-state"},p=>{const m=p.data;if(typeof m.capName!="string"||!r.has(m.capName)||m.scope?.type!=="node")return;const d=m.scope.nodeId;if(typeof d!="string"||d.length===0)return;const l=m.capName;m.state==="down"?e.onDown?.(d,l):m.state==="ready"&&e.onReady?.(d,l)})}subscribe(a,e){const o=this.ctx.eventBus.subscribe(a,e);this._subscriptions.push(o)}emitLifecycle(a,e){try{this._ctx?.eventBus.emit({id:`${this._ctx.id}-${Date.now()}`,timestamp:new Date,source:{type:"addon",id:this._ctx.id,nodeId:this._ctx.kernel.localNodeId??"hub"},category:a,data:e??{}})}catch{}}emitReadinessForProviders(a){const e=this._ctx;if(!e||this._registeredCapNames.length===0)return;const o=e.kernel?.localNodeId??"hub",r=o.includes("/")?o.split("/")[0]:o;for(const p of this._registeredCapNames)try{we(e.eventBus,{capName:p,scope:{type:"node",nodeId:r},state:a,generation:this._readinessGeneration,sourceNodeId:r})}catch{}}async resolveModelsDir(){return this.ctx.api.storage.resolve.query({location:"models",relativePath:""}).catch(()=>"camstack-data/models")}get capabilities(){return this.ctx.capabilities??null}async resolveConfig(){const a=await this.readAddonStoreWithRetry(),e={...this.defaults};for(const o of Object.keys(this.defaults)){const r=a[o];if(r!=null){const p=typeof this.defaults[o];typeof r===p&&(e[o]=r)}}this._config=e}async readAddonStoreWithRetry(){const a=this._ctx?.settings;if(!a)return{};const e=[150,350,600,900];let o;for(let r=0;r<=e.length;r++)try{return await a.readAddonStore()??{}}catch(p){o=p;const m=p instanceof Error?p.message:String(p);if(!(m.includes("SqliteSettingsBackend not initialized")||m.includes("provider not available")))throw p;if(r===e.length)break;await new Promise(l=>setTimeout(l,e[r]))}return this._ctx?.logger?.warn?.("readAddonStore: settings-store unavailable after retries — using defaults",{meta:{error:o instanceof Error?o.message:String(o)}}),{}}}function ke(n){if(n!=null)return Array.isArray(n)?{providers:n}:n}function tt(n,a){return{id:n,getRoutes:()=>a,invoke:async e=>{const o=at(a,e.method,e.path);if(!o)return{status:404,headers:{},redirectUrl:null,body:{error:`No route matches ${e.method} ${e.path}`}};const r={status:200,headers:{},redirectUrl:null},p=it(r),m={params:{...e.params,...o.params},query:e.query,body:e.body,headers:e.headers,...e.user?{user:e.user}:{},...e.scopedToken!==void 0?{scopedToken:e.scopedToken}:{}};return await o.route.handler(m,p),r}}}function at(n,a,e){const o=a.toUpperCase();for(const r of n){if(r.method!==o)continue;const p=st(r.path,e);if(p!==null)return{route:r,params:p}}return null}function st(n,a){const e=n.split("/").filter(Boolean),o=a.split("/").filter(Boolean);if(e.length!==o.length)return null;const r={};for(let p=0;p<e.length;p++){const m=e[p],d=o[p];if(m.startsWith(":"))r[m.slice(1)]=d;else if(m!==d)return null}return r}function it(n){const a={status(e){return n.status=e,a},code(e){return n.status=e,a},send(e){n.body=e},redirect(e){n.redirectUrl=e,n.status===200&&(n.status=302)},header(e,o){return n.headers[e.toLowerCase()]=o,a},type(e){return n.contentType=e,a}};return a}class Ae extends Error{capName;scope;waitedMs;constructor(a,e,o){super(`Timed out waiting for ${a} (${D(e)}) to become ready after ${o}ms`),this.name="ReadinessTimeoutError",this.capName=a,this.scope=e,this.waitedMs=o}}function W(n,a){return`${n}|${D(a)}`}function D(n){switch(n.type){case"global":return"global";case"node":return`node:${n.nodeId}`;case"device":return`device:${n.deviceId}`}}function G(n,a){return n.type!==a.type?!1:n.type==="global"||a.type==="global"?!0:n.type==="node"&&a.type==="node"?n.nodeId===a.nodeId:n.type==="device"&&a.type==="device"?n.deviceId===a.deviceId:!1}class nt{bus;sourceNodeId;logger;now;generation;snapshot=new Map;subscriptions=new Set;unsubscribeBus;unsubscribeAgentOffline;constructor(a){if(this.bus=a.eventBus,this.sourceNodeId=a.sourceNodeId,this.logger=a.logger,this.now=a.now??(()=>Date.now()),this.generation=a.generation??ct(),this.unsubscribeBus=this.bus.subscribe({category:"system.ready-state"},e=>this.ingest(e.data)),this.unsubscribeAgentOffline=this.bus.subscribe({category:"agent.offline"},e=>this.synthesizeDownForNode(e.data.agentId)),typeof this.bus.getRecent=="function")try{const e=this.bus.getRecent({category:"system.ready-state"});for(const o of e)this.ingest(o.data)}catch{}}close(){this.unsubscribeBus(),this.unsubscribeAgentOffline(),this.subscriptions.clear()}get(a,e){return this.snapshot.get(W(a,e))??null}getSnapshotForTransport(){return Array.from(this.snapshot.values())}hydrate(a){const e=this.now();for(const o of a){const r=W(o.capName,o.scope);if(this.snapshot.has(r))continue;const p={capName:o.capName,scope:o.scope,state:o.state,generation:o.generation,epoch:1,lastChange:e,sourceNodeId:o.sourceNodeId};this.snapshot.set(r,p),this.logger&&this.logger.debug(`readiness: ${o.capName} (${D(o.scope)}) → ${o.state} (hydrated, gen=${o.generation.slice(0,6)})`);const m={capName:o.capName,scope:o.scope,state:o.state,epoch:1,generation:o.generation,sourceNodeId:"hydrated",ts:e,durationInPrevState:0};for(const d of this.subscriptions)if(d.capName===o.capName&&G(d.scope,o.scope))try{d.handler(m)}catch(l){this.logger?.warn(`readiness hydrate handler threw for ${o.capName}: ${l.message??String(l)}`)}}}getAll(){return new Map(this.snapshot)}emitReady(a,e){this.emitTransition(a,e,"ready")}emitStarting(a,e){this.emitTransition(a,e,"starting")}emitDown(a,e){this.emitTransition(a,e,"down")}awaitReady(a,e,o={}){const r=o.timeoutMs??Number.POSITIVE_INFINITY,p=this.now();return this.get(a,e)?.state==="ready"?Promise.resolve():o.signal?.aborted?Promise.reject(o.signal.reason??new Error("aborted")):new Promise((d,l)=>{let u=!1;const g=this.onReadyState(a,e,N=>{N.state==="ready"&&(u||(u=!0,I(),d()))}),y=!Number.isFinite(r)?null:setTimeout(()=>{u||(u=!0,I(),l(new Ae(a,e,this.now()-p)))},r),h=()=>{u||(u=!0,I(),l(o.signal?.reason??new Error("aborted")))};o.signal?.addEventListener("abort",h,{once:!0});function I(){g(),y!==null&&clearTimeout(y),o.signal?.removeEventListener("abort",h)}})}onReadyState(a,e,o){const r={capName:a,scope:e,handler:o};this.subscriptions.add(r);const p=this.get(a,e);return p!==null&&queueMicrotask(()=>{this.subscriptions.has(r)&&o({capName:a,scope:e,state:p.state,epoch:p.epoch,generation:p.generation,sourceNodeId:this.sourceNodeId,ts:p.lastChange,durationInPrevState:0})}),()=>{this.subscriptions.delete(r)}}emitTransition(a,e,o){const r=this.now();this.bus.emit(V("system.ready-state",{type:"capability",id:a,nodeId:this.sourceNodeId},{capName:a,scope:e,state:o,generation:this.generation,sourceNodeId:this.sourceNodeId,ts:r}))}ingest(a){if(typeof a?.capName!="string"||a.state!=="ready"&&a.state!=="starting"&&a.state!=="down"||typeof a.generation!="string"||a.scope?.type!=="global"&&a.scope?.type!=="node"&&a.scope?.type!=="device")return;const e=W(a.capName,a.scope),o=this.snapshot.get(e)??null,r=this.now();let p;if(o===null?p=a.state==="ready"?1:0:o.generation!==a.generation&&a.state==="ready"?p=o.epoch+1:p=o.epoch,o!==null&&o.generation===a.generation&&o.state===a.state)return;const m=o===null?0:Math.max(0,r-o.lastChange),d={capName:a.capName,scope:a.scope,state:a.state,generation:a.generation,epoch:p,lastChange:r,sourceNodeId:a.sourceNodeId};this.snapshot.set(e,d);const l={capName:a.capName,scope:a.scope,state:a.state,epoch:p,generation:a.generation,sourceNodeId:a.sourceNodeId,ts:a.ts,durationInPrevState:m};this.logger&&this.logger.debug(`readiness: ${a.capName} (${D(a.scope)}) → ${a.state} epoch=${p} gen=${a.generation.slice(0,6)} (prev ${m}ms)`);for(const u of this.subscriptions)if(u.capName===a.capName&&G(u.scope,a.scope))try{u.handler(l)}catch(g){this.logger?.warn(`readiness handler threw for ${a.capName}: ${g.message??String(g)}`)}}synthesizeDownForNode(a){const e=this.now();for(const[o,r]of this.snapshot){if(r.state==="down"||!(r.scope.type==="node"&&r.scope.nodeId===a||r.scope.type==="device"&&r.sourceNodeId===a))continue;const m=Math.max(0,e-r.lastChange),d={...r,state:"down",lastChange:e};this.snapshot.set(o,d);const l={capName:r.capName,scope:r.scope,state:"down",epoch:r.epoch,generation:r.generation,sourceNodeId:this.sourceNodeId,ts:e,durationInPrevState:m};this.logger&&this.logger.debug(`readiness: ${r.capName} (${D(r.scope)}) → down (synthesized from agent.offline ${a})`);for(const u of this.subscriptions)if(u.capName===r.capName&&G(u.scope,r.scope))try{u.handler(l)}catch(g){this.logger?.warn(`readiness handler threw during agent.offline demux for ${r.capName}: ${g.message??String(g)}`)}}}}function ct(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2,14)}function ot(n,a){for(const{capName:e,scope:o}of a)n.emitDown(e,o)}const rt=["data","media","recordings","recordings-high","recordings-low","recordings-clips","event-images","models","addons-data","cache","logs","backups"],dt={data:"db",media:"media",recordings:"recordings","recordings-high":"recordings-high","recordings-low":"recordings-low","recordings-clips":"recordings-clips","event-images":"event-images",models:"models","addons-data":"addons-data",cache:"/tmp/camstack-cache",logs:"logs",backups:"backups"},Ne={high:"High",mid:"Mid",low:"Low"};function pt(n){return Ne[n]??n.charAt(0).toUpperCase()+n.slice(1)}function Pe(n){return(n.width??0)*(n.height??0)}function De(n){if(n.length===0)return[];const a=n.map((o,r)=>({s:o,i:r,px:Pe(o.metadata??{})})).sort((o,r)=>r.px-o.px),e=Array.from({length:n.length});for(let o=0;o<a.length;o++){const{s:r,i:p}=a[o];let m;o===0?m="high":o===a.length-1?m="low":m="mid",e[p]={...r,quality:m}}return e}function lt(n){const a=n.height??0,e=n.width??0;return a>=1080||e>=1920?"high":a>=480||e>=640?"mid":"low"}function mt(n){const a=n.protocols.find(r=>r.type==="rtsp"&&r.url)??n.protocols.find(r=>r.url),e=a?.type,o=e==="rtsp"?"rtsp":e==="http"||e==="flv"?"http-mjpeg":"custom";return{id:n.id,label:n.label??n.id,protocol:o,url:a?.url,profileHint:n.quality}}function f(n){return typeof n=="string"}function ut(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function gt(n){return f(n)&&n.trim()?{url:n}:ut(n)&&f(n.url)&&n.url.trim()?{url:n.url,label:f(n.label)?n.label:void 0}:null}function St(n){const a=f(n.snapshot_url)?n.snapshot_url:void 0;if(Array.isArray(n.streams)){const m=[];for(const d of n.streams){const l=gt(d);l&&m.push(l)}return{streams:m,snapshot_url:a}}const e=[],o=f(n.main_stream_url)?n.main_stream_url:void 0;o&&e.push({url:o,label:f(n.main_stream_name)?n.main_stream_name:void 0});const r=f(n.sub_stream_url)?n.sub_stream_url:void 0;r&&e.push({url:r,label:f(n.sub_stream_name)?n.sub_stream_name:void 0});const p=f(n.third_stream_url)?n.third_stream_url:void 0;return p&&e.push({url:p,label:f(n.third_stream_name)?n.third_stream_name:void 0}),{streams:e,snapshot_url:a}}function yt(n){if(n.length===0)return{};const a=De(n),e={},o=a.find(d=>d.quality==="high"),r=a.find(d=>d.quality==="mid"),p=a.find(d=>d.quality==="low");o&&(e.high=o.id),r&&(e.mid=r.id),p&&(e.low=p.id);const m=o??r??p??a[0];return m&&(e.high||(e.high=m.id),e.mid||(e.mid=m.id),e.low||(e.low=m.id)),e}const ht={streaming:!0,notifications:!0,objectDetection:!1,remoteAccess:!0,agentCluster:!1,smartHome:!0,recordings:!0,backup:!0,repl:!0},vt=["face","plate"],ft=["face","plate","clip","custom"],bt={cleanupIntervalMs:3600*1e3,detectionEventsDays:30,audioLevelsDays:7,snapshotsDays:14};var Ee=(n=>(n.Addon="addon",n.Core="core",n.Device="device",n.Provider="provider",n.System="system",n))(Ee||{});const Me="camstack/camstack-models",It=`https://huggingface.co/${Me}/resolve/main`,wt={"features.streaming":!0,"features.notifications":!0,"features.objectDetection":!1,"features.remoteAccess":!0,"features.agentCluster":!1,"features.smartHome":!0,"features.recordings":!0,"features.backup":!0,"features.repl":!0,"retention.detectionEventsDays":30,"retention.audioLevelsDays":7,"logging.level":"info","logging.retentionDays":30,"eventBus.ringBufferSize":1e4,"storage.provider":"sqlite-storage","storage.locations":{data:"camstack-data/data",media:"camstack-data/media",recordings:"camstack-data/recordings",cache:"/tmp/camstack-cache",logs:"camstack-data/logs",models:"camstack-data/models"},providers:[],"recording.segmentDurationSeconds":4,"recording.defaultRetentionDays":30,"ffmpeg.binaryPath":"ffmpeg","ffmpeg.hwAccel":"auto","ffmpeg.threadCount":0,"auth.tokenExpiry":"24h"};function Y(n){return JSON.parse(n)}function Re(n){return n===null||typeof n!="object"||Array.isArray(n)?null:{...n}}function Ct(n){return Array.isArray(n)?n:[]}function kt(n,a=""){return typeof n=="string"?n:a}function At(n,a=0){return typeof n=="number"?n:a}function Nt(n,a=!1){return typeof n=="boolean"?n:a}function Pt(n){try{return Re(Y(n))}catch{return null}}function Dt(n){try{const a=Y(n);return Array.isArray(a)?a:null}catch{return null}}function Et(n,a){return`https://huggingface.co/${n}/resolve/main/${a}`}function Mt(n,a){if(n.length!==a.length)return 0;let e=0,o=0,r=0;for(let m=0;m<n.length;m++)e+=n[m]*a[m],o+=n[m]*n[m],r+=a[m]*a[m];const p=Math.sqrt(o)*Math.sqrt(r);return p===0?0:e/p}class Rt{constructor(a,e){this.elementId=a,this.getBackend=typeof e=="function"?e:()=>e}cache={};listeners=new Set;loaded=!1;getBackend;async ensureLoaded(){if(this.loaded)return;const a=this.getBackend();if(!a)throw new Error(`ElementConfigStore(${this.elementId}): settings backend not available`);const e=await a.query({collection:"config",filter:{where:{id:this.elementId},limit:1}});e.length>0&&(this.cache=e[0].data??{}),this.loaded=!0}getAll(){return{...this.cache}}get(a){const e=a.split(".");let o=this.cache;for(const r of e){if(o===null||typeof o!="object"||Array.isArray(o))return;o=Reflect.get(o,r)}return o}async set(a,e){await this.ensureLoaded(),Tt(this.cache,a,e),await this.persist(),this.notifyListeners()}async setAll(a){await this.ensureLoaded(),this.cache={...a},await this.persist(),this.notifyListeners()}onChange(a){return this.listeners.add(a),()=>{this.listeners.delete(a)}}async load(){await this.ensureLoaded()}async loadDefaults(a){await this.ensureLoaded(),Object.keys(this.cache).length===0&&(this.cache={...a},await this.persist())}async persist(){const a=this.getBackend();if(!a)throw new Error(`ElementConfigStore(${this.elementId}): settings backend not available — cannot persist config`);await a.set({collection:"config",key:this.elementId,value:this.cache})}notifyListeners(){const a=this.getAll();for(const e of this.listeners)try{e(a)}catch{}}}function Tt(n,a,e){const o=a.split(".");let r=n;for(let p=0;p<o.length-1;p++){const m=o[p],d=r[m];if(d===null||typeof d!="object"||Array.isArray(d)){const l={};r[m]=l,r=l}else r=d}r[o[o.length-1]]=e}const Q={cpu:"onnx",coreml:"onnx",cuda:"onnx",tensorrt:"onnx","onnx-py":"onnx",pytorch:"pt",openvino:"openvino"},Te={onnx:"onnx",coreml:"coreml",openvino:"openvino",tflite:"tflite",pytorch:"pt"},qe={coreml:"coreml_inference.py",pytorch:"pytorch_inference.py",openvino:"openvino_inference.py"};function Oe(n,a){return n==="node"?"onnx":{coreml:"coreml",openvino:"openvino",pytorch:"pytorch","onnx-py":"onnx",cpu:"onnx"}[a]??a}function qt(n,a){return n==="node"?Q[a]??"onnx":{coreml:"coreml",openvino:"openvino",pytorch:"pt","onnx-py":"onnx",cpu:"onnx"}[a]??"onnx"}function Ot(n,a){return!n||n==="auto"?"auto":Oe(n,a??"cpu")}function Bt(n){return Q[n]??"onnx"}function xt(n){return Te[n]}function Lt(n){return qe[n]}function _t(n){return n==="coreml"||n==="pytorch"||n==="openvino"}async function zt(n,a){const e=performance.now();try{return{output:a!==void 0?await Ut(n(),a):await n(),durationMs:ve(performance.now()-e),ok:!0}}catch(o){return{output:void 0,durationMs:ve(performance.now()-e),ok:!1,error:s.errMsg(o)}}}function ve(n){return Math.round(n*100)/100}function Ut(n,a){return new Promise((e,o)=>{const r=setTimeout(()=>o(new Error(`Inference timeout after ${a}ms`)),a);n.then(p=>{clearTimeout(r),e(p)}).catch(p=>{clearTimeout(r),o(p)})})}const Ft=[{id:"person",name:"Person"},{id:"bicycle",name:"Bicycle"},{id:"car",name:"Car"},{id:"motorcycle",name:"Motorcycle"},{id:"airplane",name:"Airplane"},{id:"bus",name:"Bus"},{id:"train",name:"Train"},{id:"truck",name:"Truck"},{id:"boat",name:"Boat"},{id:"traffic light",name:"Traffic Light"},{id:"fire hydrant",name:"Fire Hydrant"},{id:"stop sign",name:"Stop Sign"},{id:"parking meter",name:"Parking Meter"},{id:"bench",name:"Bench"},{id:"bird",name:"Bird"},{id:"cat",name:"Cat"},{id:"dog",name:"Dog"},{id:"horse",name:"Horse"},{id:"sheep",name:"Sheep"},{id:"cow",name:"Cow"},{id:"elephant",name:"Elephant"},{id:"bear",name:"Bear"},{id:"zebra",name:"Zebra"},{id:"giraffe",name:"Giraffe"},{id:"backpack",name:"Backpack"},{id:"umbrella",name:"Umbrella"},{id:"handbag",name:"Handbag"},{id:"tie",name:"Tie"},{id:"suitcase",name:"Suitcase"},{id:"frisbee",name:"Frisbee"},{id:"skis",name:"Skis"},{id:"snowboard",name:"Snowboard"},{id:"sports ball",name:"Sports Ball"},{id:"kite",name:"Kite"},{id:"baseball bat",name:"Baseball Bat"},{id:"baseball glove",name:"Baseball Glove"},{id:"skateboard",name:"Skateboard"},{id:"surfboard",name:"Surfboard"},{id:"tennis racket",name:"Tennis Racket"},{id:"bottle",name:"Bottle"},{id:"wine glass",name:"Wine Glass"},{id:"cup",name:"Cup"},{id:"fork",name:"Fork"},{id:"knife",name:"Knife"},{id:"spoon",name:"Spoon"},{id:"bowl",name:"Bowl"},{id:"banana",name:"Banana"},{id:"apple",name:"Apple"},{id:"sandwich",name:"Sandwich"},{id:"orange",name:"Orange"},{id:"broccoli",name:"Broccoli"},{id:"carrot",name:"Carrot"},{id:"hot dog",name:"Hot Dog"},{id:"pizza",name:"Pizza"},{id:"donut",name:"Donut"},{id:"cake",name:"Cake"},{id:"chair",name:"Chair"},{id:"couch",name:"Couch"},{id:"potted plant",name:"Potted Plant"},{id:"bed",name:"Bed"},{id:"dining table",name:"Dining Table"},{id:"toilet",name:"Toilet"},{id:"tv",name:"TV"},{id:"laptop",name:"Laptop"},{id:"mouse",name:"Mouse"},{id:"remote",name:"Remote"},{id:"keyboard",name:"Keyboard"},{id:"cell phone",name:"Cell Phone"},{id:"microwave",name:"Microwave"},{id:"oven",name:"Oven"},{id:"toaster",name:"Toaster"},{id:"sink",name:"Sink"},{id:"refrigerator",name:"Refrigerator"},{id:"book",name:"Book"},{id:"clock",name:"Clock"},{id:"vase",name:"Vase"},{id:"scissors",name:"Scissors"},{id:"teddy bear",name:"Teddy Bear"},{id:"hair drier",name:"Hair Drier"},{id:"toothbrush",name:"Toothbrush"}],Wt=[{id:"person",name:"Person"},{id:"vehicle",name:"Vehicle"},{id:"animal",name:"Animal"}],Ht={mapping:{person:"person",bicycle:"vehicle",car:"vehicle",motorcycle:"vehicle",airplane:"vehicle",bus:"vehicle",train:"vehicle",truck:"vehicle",boat:"vehicle",bird:"animal",cat:"animal",dog:"animal",horse:"animal",sheep:"animal",cow:"animal",elephant:"animal",bear:"animal",zebra:"animal",giraffe:"animal"},preserveOriginal:!1},$t={camera:{type:"camera",label:"Camera",icon:"camera"}};class E{schema;data;persistFn;constructor(a,e,o){this.schema=a,this.data=e,this.persistFn=o}static fromSchema(a,e,o={},r){const p=a.safeParse(o);if(p.success)return new E(a,p.data,e);const m=new Set;for(const g of p.error.issues){const S=g.path[0];typeof S=="string"&&m.add(S)}const d={...o};for(const g of m)delete d[g];const l=a.safeParse(d);if(r?.({droppedKeys:[...m],issues:p.error.issues}),l.success)return e(l.data).catch(()=>{}),new E(a,l.data,e);const u=a.parse({});return new E(a,u,e)}get values(){return this.data}get(a){return this.data[a]}async set(a,e){const o=this.schema.parse({...this.data,[a]:e});this.data=o,await this.persistFn(this.data)}async setAll(a){const e=this.schema.parse({...this.data,...a});this.data=e,await this.persistFn(this.data)}async deleteKey(a){const{[a]:e,...o}=this.data,r=this.schema.parse(o);this.data=r,await this.persistFn(this.data)}entries(){const a=this.schema.shape;return Object.entries(a).map(([e,o])=>({key:e,schema:o,value:this.data[e],description:o.description}))}}class ${writer;pendingWrites=new Set;slices;schemas=new Map;listeners=new Set;capListeners=new Map;constructor(a,e){this.writer=e,this.slices=new Map;for(const[o,r]of Object.entries(a))r&&typeof r=="object"&&!Array.isArray(r)&&this.slices.set(o,{...r})}static fromInitial(a,e){return new $(a,e)}installCapSchema(a,e){const o=this.schemas.get(a);if(o){if(o!==e)throw new Error(`[DeviceRuntimeState] capability "${a}" registered a different runtime-state schema; each cap must declare ONE shape across every provider`);return}this.schemas.set(a,e);const r=this.slices.get(a);if(r){const p=e.safeParse(r);p.success?this.slices.set(a,p.data):this.slices.delete(a)}}getCapState(a){const e=this.slices.get(a);if(e)return Object.freeze({...e})}getCapField(a,e){return this.slices.get(a)?.[e]}setCapState(a,e){this.applyCapWrite(a,e,!1)}patchCapState(a,e){this.applyCapWrite(a,e,!0)}applyCapWrite(a,e,o){const r=this.schemas.get(a);if(!r)throw new Error(`[DeviceRuntimeState] no schema registered for cap "${a}" — did the device register it via ctx.registerNativeCap before writing?`);const p=this.slices.get(a)??{},m=o?{...p,...e}:{...e},d=r.parse(m);if(Kt(p,d))return;this.slices.set(a,d),this.fireListeners([a]);const l=this.writer(a,{...d}).catch(()=>{});this.pendingWrites.add(l),l.finally(()=>{this.pendingWrites.delete(l)})}fireListeners(a){const e=this.snapshot();for(const o of this.listeners)try{o(a,e)}catch{}for(const o of a){const r=this.capListeners.get(o);if(!r)continue;const p=this.getCapState(o);for(const m of r)try{m(p)}catch{}}}subscribe(a){return this.listeners.add(a),()=>{this.listeners.delete(a)}}subscribeCap(a,e){let o=this.capListeners.get(a);o||(o=new Set,this.capListeners.set(a,o));const r=p=>{e(p)};return o.add(r),()=>{const p=this.capListeners.get(a);p&&(p.delete(r),p.size===0&&this.capListeners.delete(a))}}snapshot(){const a={};for(const[e,o]of this.slices)a[e]=Object.freeze({...o});return Object.freeze(a)}async flush(){if(this.pendingWrites.size===0)return;const a=[...this.pendingWrites];await Promise.allSettled(a)}}function Kt(n,a){const e=Object.keys(n),o=Object.keys(a);if(e.length!==o.length)return!1;for(const r of e)if(n[r]!==a[r])return!1;return!0}const j="lastFetchedAt";function Gt(n){const{runtimeState:a,cap:e,ownDeviceId:o,refresh:r,staleMs:p,empty:m}=n,d=async()=>{const g=a.getCapState(e.name),S=typeof g?.[j]=="number"?g[j]:0;(!g||Date.now()-S>p)&&await r()},l=()=>{const g=a.getCapState(e.name);if(!g)return m();const{[j]:S,...y}=g;return y};return{ensureFresh:d,getStatus:async({deviceId:g})=>{if(g!==o)throw new Error(`${e.name}: deviceId mismatch, expected ${o}, got ${g}`);return await d(),l()}}}const jt={audioMetrics:s.audioMetricsCapability,battery:s.batteryCapability,brightness:s.brightnessCapability,cameraStreams:s.cameraStreamsCapability,deviceDiscovery:s.deviceDiscoveryCapability,deviceStatus:s.deviceStatusCapability,doorbell:s.doorbellCapability,featureProbe:s.featureProbeCapability,motion:s.motionCapability,motionTrigger:s.motionTriggerCapability,ptzAutotrack:s.ptzAutotrackCapability,switch:s.switchCapability,zoneAnalytics:s.zoneAnalyticsCapability,zoneRules:s.zoneRulesCapability,zones:s.zonesCapability};class Zt{id;stableId;type;name;parentDeviceId;role;get online(){return this.runtimeState.getCapState("device-status")?.online??!1}set online(a){this.markOnline(a)}get state(){if(!this._stateProxyCache){const a={},e={get:(o,r)=>{const p=r;if(p in a)return a[p];const m=jt[p];if(!m)return;const d=this.sliceProxy(m);return a[p]=d,d}};this._stateProxyCache=new Proxy(a,e)}return this._stateProxyCache}_stateProxyCache;config;runtimeState;ctx;location;disabled;constructor(a,e,o){if(this.ctx=a,this.id=a.id,this.stableId=a.stableId,this.type=o.type,!a.deviceMeta)throw new Error(`BaseDevice constructor: ctx.deviceMeta is required (id=${a.id} stableId=${a.stableId})`);this.name=a.deviceMeta.name,this.location=a.deviceMeta.location,this.disabled=a.deviceMeta.disabled,this.role=o.role,this.parentDeviceId=a.parentDeviceId;const r=a.persistedConfig??{};this.config=E.fromSchema(e,g=>a.persistConfig(g),r,({droppedKeys:g,issues:S})=>{a.logger.warn("Device config recovery: dropping invalid persisted fields",{tags:{deviceId:a.id,stableId:a.stableId},meta:{droppedKeys:[...g],firstIssue:S[0]?.message??null}})});let p=null;const m=async(g,S)=>{p||(p=a.fetchDevice(a.id)),await(await p).deviceState.setCapSlice({capName:g,slice:S})},d=a.initialRuntimeState??{};this.runtimeState=$.fromInitial(d,m),a.bindRuntimeState?.(this.runtimeState),a.registerNativeCap?.(s.deviceStatusCapability,{});const l={online:!1,lastChangedAt:Date.now()};this.runtimeState.setCapState("device-status",l),a.registerNativeCap?.(s.featureProbeCapability,{});const u={flags:{},deviceType:null,model:null,channelCount:null,lastProbedAt:0,lastFetchedAt:0};this.runtimeState.setCapState("feature-probe",u)}async removeDevice(){}markOnline(a){if(this.online===a)return;const e={online:a,lastChangedAt:Date.now()};this.runtimeState.setCapState("device-status",e)}async refreshFeatures(){const e=this.ctx.api?.deviceManager?.registerDevice;if(e)try{await e.mutate({addonId:this.ctx.deviceMeta.addonId,stableId:this.stableId,id:this.id,type:this.type,name:this.name,parentDeviceId:this.parentDeviceId,features:[...this.features],config:{}})}catch{}}getCapSlice(a){return this.runtimeState.getCapState(a.name)??null}setCapSlice(a,e){this.runtimeState.setCapState(a.name,e)}sliceProxy(a){const e={},o={get:(r,p)=>this.runtimeState.getCapState(a.name)?.[p],set:(r,p,m)=>(this.runtimeState.patchCapState(a.name,{[p]:m}),!0),has:(r,p)=>{const m=this.runtimeState.getCapState(a.name);return m?p in m:!1},ownKeys:()=>{const r=this.runtimeState.getCapState(a.name);return r?Object.keys(r):[]},getOwnPropertyDescriptor:(r,p)=>{const m=this.runtimeState.getCapState(a.name);if(!(!m||!(p in m)))return{configurable:!0,enumerable:!0,value:m[p]}}};return new Proxy(e,o)}getSettingsUISchema(){return{sections:[]}}async applySettingsPatch(a){await this.config.setAll(a)}async onProbe(){}async onActivate(){}async reprobe(){this._kernelReprobe?await this._kernelReprobe():await this.onProbe()}_kernelReprobe;getAccessoryChildren(){return[]}getProbeFlags(){return this.runtimeState.getCapState("feature-probe")?.flags??{}}hasProbed(){return(this.runtimeState.getCapState("feature-probe")?.lastProbedAt??0)>0}}function Be(n,a){const e={};for(const o of n.config.entries())e[o.key]=o.value;return{id:n.id,stableId:n.stableId,addonId:a,type:String(n.type),name:n.name,parentDeviceId:n.parentDeviceId,online:n.online,features:[...n.features],config:e}}class Vt extends Ce{async onInitialize(){return this.ctx.logger.info(`${this.providerName} Provider initialized`),[{capability:s.deviceProviderCapability,provider:this}]}async onShutdown(){const a=await this.ctx.kernel.devices?.getAll()??[];for(const e of a)try{await this.ctx.kernel.devices?.decommission(e.id)}catch(o){this.ctx.logger.warn(`${this.providerName}: decommission failed`,{tags:{deviceId:e.id,stableId:e.stableId},meta:{error:o instanceof Error?o.message:String(o)}})}this.ctx.logger.info(`${this.providerName} Provider shut down`,{meta:{decommissionedCount:a.length}})}async start(){}async stop(){}async getStatus(){return{connected:!0,deviceCount:(await this.ctx.kernel.devices?.getAll()??[]).length}}async getDevices(){return(await this.ctx.kernel.devices?.getAll()??[]).map(e=>({id:e.stableId,name:e.name,type:String(e.type)}))}async supportsDiscovery(){return!1}async discoverDevices(){return[]}async adoptDiscoveredDevice(a){throw new Error(`${this.providerName} provider does not support discovery-based adoption`)}async supportsManualCreation(){return!0}async getChildCreationSchema(a){return this.onGetCreationSchema(a.type)}async createDevice(a){const e=await this.onCreateDevice(a.type,a.config),o=this.deviceClasses[e.meta.type];if(!o)throw new Error(`${this.providerName} provider: no device class registered for type "${e.meta.type}" — add it to the deviceClasses map`);const r=this.generateStableId(e.meta.type,e.config),p=await this.ctx.kernel.devices.create(r,o,e.config,null,e.meta);if(e.onAfterCreate)try{await e.onAfterCreate(p)}catch(m){this.ctx.logger.warn("createDevice: onAfterCreate hook threw — device is already registered",{tags:{deviceId:p.id,stableId:r},meta:{error:m instanceof Error?m.message:String(m)}})}return this.toSummary(p)}generateStableId(a,e){return`${this.addonId}-${Date.now()}`}async testCreationField(a){return{status:"ok",labels:["probe not implemented"]}}async restoreDevices(a){await this.onRestoreDevices(a),a.length>0&&this.ctx.logger.info(`Restored ${a.length} ${this.providerName} device(s)`)}async onRestoreDevices(a){const e=new Set;for(const r of a){if(r.parentDeviceId!==null)continue;const p=this.deviceClasses[r.type];if(!p){this.ctx.logger.warn("No device class registered for restored type — skipping",{tags:{stableId:r.stableId},meta:{type:r.type}});continue}try{await this.ctx.kernel.devices.create(r.stableId,p,{}),e.add(r.id)}catch(m){this.ctx.logger.warn("Failed to restore device",{tags:{stableId:r.stableId},meta:{type:r.type,error:m instanceof Error?m.message:String(m)}})}}const o=a.filter(r=>r.parentDeviceId!==null);for(const r of o){const p=this.deviceClasses[r.type];if(p&&r.parentDeviceId!==null&&e.has(r.parentDeviceId))try{await this.ctx.kernel.devices.create(r.stableId,p,{},r.parentDeviceId),e.add(r.id)}catch(m){this.ctx.logger.warn("Failed to restore hub-adopted child",{tags:{stableId:r.stableId,parentDeviceId:r.parentDeviceId},meta:{type:r.type,error:m instanceof Error?m.message:String(m)}})}}}toSummary(a){return Be(a,this.addonId)}}function x(n){return n.def}function Yt(n,a="Configuration",e="main"){const o=n.map(r=>Qt(r.key,r.schema,r.description));return{sections:[{id:e,title:a,fields:o}]}}function Qt(n,a,e){const o=H(a),r=aa(a),p=e??xe(n),m={key:n,label:p,description:e,default:r};return o instanceof b.z.ZodString?Jt(n,m):o instanceof b.z.ZodNumber?Xt(o,m):o instanceof b.z.ZodBoolean?{...m,type:"boolean"}:o instanceof b.z.ZodEnum?ta(o,m):o instanceof b.z.ZodArray||o instanceof b.z.ZodObject?{...m,type:"textarea",rows:6,isJson:!0}:{...m,type:"text"}}function Jt(n,a){const e=n.toLowerCase();return e.includes("password")||e.includes("secret")||e.includes("token")||e.includes("apikey")||e.includes("api_key")?{...a,type:"password",showToggle:!0}:{...a,type:"text"}}function Xt(n,a){const e=n,o=e.minValue,r=e.maxValue,p=o!=null&&isFinite(o)?o:void 0,m=r!=null&&isFinite(r)?r:void 0,d=ea(n);return{...a,type:"number",...p!==void 0?{min:p}:{},...m!==void 0?{max:m}:{},...d!==void 0?{step:d}:{}}}function ea(n){const e=x(n).checks??[];for(const o of e)if(o._zod?.def?.check==="multiple_of"&&o._zod.def.value!==void 0)return o._zod.def.value}function ta(n,a){const e=n.options.map(r=>String(r));return{...a,type:"select",options:e.map(r=>({label:xe(r),value:r}))}}function H(n){return n instanceof b.z.ZodDefault||n instanceof b.z.ZodOptional||n instanceof b.z.ZodNullable?H(x(n).innerType):n}function aa(n){if(n instanceof b.z.ZodDefault)return x(n).defaultValue}function xe(n){return n.replace(/([A-Z])/g," $1").replace(/[_-]/g," ").replace(/^\w/,a=>a.toUpperCase()).trim()}const sa="device.state-changed";function J(n){const a=new Map,e=new Map;let o=null;const r=(d,l)=>`${d}:${l}`,p=()=>{o||n.live?.onEvent&&(o=n.live.onEvent.subscribe({category:sa},{onData:d=>{const l=d.data;if(!l||typeof l.deviceId!="number"||typeof l.capName!="string")return;const u=r(l.deviceId,l.capName);a.set(u,l.slice);const g=e.get(u);if(g)for(const S of g)try{S(l.slice)}catch{}}}))},m=()=>{o&&(e.size>0||(o.unsubscribe(),o=null))};return{read(d,l){return a.get(r(d,l))},async refresh(d,l){const u=await n.deviceState.getCapSlice.query({deviceId:d,capName:l}),g=r(d,l);a.set(g,u??void 0);const S=e.get(g);if(S)for(const y of S)try{y(u??void 0)}catch{}},watch(d,l,u){const g=r(d,l);let S=e.get(g);return S||(S=new Set,e.set(g,S)),S.add(u),p(),()=>{S.delete(u),S.size===0&&e.delete(g),m()}},async write(d,l,u){await n.deviceState.setCapSlice.mutate({deviceId:d,capName:l,slice:u})}}}function Le(n,a,e){const o=(r,p)=>`${r}:${p}`;return{read(r,p){return n.get(r)?.get(p)},async refresh(){},watch(r,p,m){const d=o(r,p);let l=a.get(d);return l||(l=new Set,a.set(d,l)),l.add(m),()=>{l.delete(m),l.size===0&&a.delete(d)}},async write(r,p,m){if(!e)throw new Error("createMirrorSource: write requires an api reference — pass it as the third argument when constructing the source");await e.deviceState.setCapSlice.mutate({deviceId:r,capName:p,slice:m})}}}function v(n,a,e){const o=ia(n)?n:J(n);return{get value(){return o.read(a,e)},refresh(){return o.refresh(a,e)},subscribe(r){const p=o.watch(a,e,m=>{try{r(m)}catch{}});try{r(o.read(a,e))}catch{}return o.read(a,e)===void 0&&o.refresh(a,e).catch(()=>{}),p},async set(r){await o.write(a,e,r)},async patch(r){const m={...o.read(a,e)??{},...r};await o.write(a,e,m)}}}function ia(n){return typeof n.read=="function"&&typeof n.watch=="function"}function _e(n,a,e){const o=n,r=e?.stateSource??J(n);function p(c,w){const C=typeof c=="object"&&c!==null?c:{};return w!==void 0?{...C,deviceId:a.deviceId,nodeId:w}:{...C,deviceId:a.deviceId}}function m(c,w,C,A,q){const U=o[c]?.[w];if(!U)throw new Error(`DeviceProxy: api has no '${c}.${w}'`);const O=U;return C==="mutation"?O.mutate(A):C==="subscription"?O.subscribe(A,q):O.query(A)}function d(c,w,C,A,q,U){const O=a.entries.find(je=>je.capName===c);return m(w,C,A,p(q,O?.providerNodeId),U)}function l(c,w,C,A,q){return m(c,w,C,p(A,void 0),q)}const u={getStatus:c=>d("accessories","accessories","getStatus","query",c)},g={resolveDeviceSettings:c=>d("audio-analysis","audioAnalysis","resolveDeviceSettings","query",c),getDeviceSettingsContribution:c=>d("audio-analysis","audioAnalysis","getDeviceSettingsContribution","query",c),getDeviceLiveContribution:c=>d("audio-analysis","audioAnalysis","getDeviceLiveContribution","query",c),applyDeviceSettingsPatch:c=>d("audio-analysis","audioAnalysis","applyDeviceSettingsPatch","mutation",c)},S={getCurrentSnapshot:c=>d("audio-metrics","audioMetrics","getCurrentSnapshot","query",c),getHistory:c=>d("audio-metrics","audioMetrics","getHistory","query",c)},y={getStatus:c=>d("battery","battery","getStatus","query",c)},h={setBrightness:c=>d("brightness","brightness","setBrightness","mutation",c),getStatus:c=>d("brightness","brightness","getStatus","query",c)},I={getCredentials:c=>d("camera-credentials","cameraCredentials","getCredentials","query",c),getStatus:c=>d("camera-credentials","cameraCredentials","getStatus","query",c)},N={getCameraStreams:c=>d("camera-streams","cameraStreams","getCameraStreams","query",c),getBrokerStreams:c=>d("camera-streams","cameraStreams","getBrokerStreams","query",c),getRtspEntries:c=>d("camera-streams","cameraStreams","getRtspEntries","query",c)},M={getDeviceSettingsContribution:c=>d("detection-pipeline","detectionPipeline","getDeviceSettingsContribution","query",c),getDeviceLiveContribution:c=>d("detection-pipeline","detectionPipeline","getDeviceLiveContribution","query",c),applyDeviceSettingsPatch:c=>d("detection-pipeline","detectionPipeline","applyDeviceSettingsPatch","mutation",c)},P={listDiscovered:c=>d("device-discovery","deviceDiscovery","listDiscovered","query",c),refreshDiscovery:c=>d("device-discovery","deviceDiscovery","refreshDiscovery","mutation",c),adoptDevice:c=>d("device-discovery","deviceDiscovery","adoptDevice","mutation",c),releaseDevice:c=>d("device-discovery","deviceDiscovery","releaseDevice","mutation",c),getStatus:c=>d("device-discovery","deviceDiscovery","getStatus","query",c)},X={getStreamSources:c=>d("device-ops","deviceOps","getStreamSources","query",c),getConfigEntries:c=>d("device-ops","deviceOps","getConfigEntries","query",c),setConfig:c=>d("device-ops","deviceOps","setConfig","mutation",c),removeDevice:c=>d("device-ops","deviceOps","removeDevice","mutation",c),getSettingsSchema:c=>d("device-ops","deviceOps","getSettingsSchema","query",c)},ee={getStatus:c=>d("device-status","deviceStatus","getStatus","query",c)},te={getStatus:c=>d("doorbell","doorbell","getStatus","query",c)},ae={getEvents:c=>d("events","events","getEvents","query",c),getEventThumbnail:c=>d("events","events","getEventThumbnail","query",c),getEventClipUrl:c=>d("events","events","getEventClipUrl","query",c)},se={getStatus:c=>d("feature-probe","featureProbe","getStatus","query",c)},ie={startSession:c=>d("intercom","intercom","startSession","mutation",c),handleAnswer:c=>d("intercom","intercom","handleAnswer","mutation",c),stopSession:c=>d("intercom","intercom","stopSession","mutation",c),startTalkSession:c=>d("intercom","intercom","startTalkSession","mutation",c),pushTalkPcm:c=>d("intercom","intercom","pushTalkPcm","mutation",c),endTalkSession:c=>d("intercom","intercom","endTalkSession","mutation",c),getStatus:c=>d("intercom","intercom","getStatus","query",c)},ne={isDetected:c=>d("motion","motion","isDetected","query",c),getStatus:c=>d("motion","motion","getStatus","query",c)},ce={analyze:c=>d("motion-detection","motionDetection","analyze","mutation",c),removeCamera:c=>d("motion-detection","motionDetection","removeCamera","mutation",c),reset:c=>d("motion-detection","motionDetection","reset","mutation",c),getDeviceSettingsContribution:c=>d("motion-detection","motionDetection","getDeviceSettingsContribution","query",c),getDeviceLiveContribution:c=>d("motion-detection","motionDetection","getDeviceLiveContribution","query",c),applyDeviceSettingsPatch:c=>d("motion-detection","motionDetection","applyDeviceSettingsPatch","mutation",c)},oe={setMotionTrigger:c=>d("motion-trigger","motionTrigger","setMotionTrigger","mutation",c),getStatus:c=>d("motion-trigger","motionTrigger","getStatus","query",c)},re={getStatus:c=>d("native-object-detection","nativeObjectDetection","getStatus","query",c)},de={setOverlay:c=>d("osd","osd","setOverlay","mutation",c),getStatus:c=>d("osd","osd","getStatus","query",c)},pe={getActiveTracks:c=>d("pipeline-analytics","pipelineAnalytics","getActiveTracks","query",c),getTrack:c=>d("pipeline-analytics","pipelineAnalytics","getTrack","query",c),listTracks:c=>d("pipeline-analytics","pipelineAnalytics","listTracks","query",c),clearTracks:c=>d("pipeline-analytics","pipelineAnalytics","clearTracks","mutation",c),getMotionEvents:c=>d("pipeline-analytics","pipelineAnalytics","getMotionEvents","query",c),getObjectEvents:c=>d("pipeline-analytics","pipelineAnalytics","getObjectEvents","query",c),getAudioEvents:c=>d("pipeline-analytics","pipelineAnalytics","getAudioEvents","query",c),getEventMedia:c=>d("pipeline-analytics","pipelineAnalytics","getEventMedia","query",c),getTrackMedia:c=>d("pipeline-analytics","pipelineAnalytics","getTrackMedia","query",c),getDeviceSettingsContribution:c=>d("pipeline-analytics","pipelineAnalytics","getDeviceSettingsContribution","query",c),getDeviceLiveContribution:c=>d("pipeline-analytics","pipelineAnalytics","getDeviceLiveContribution","query",c),applyDeviceSettingsPatch:c=>d("pipeline-analytics","pipelineAnalytics","applyDeviceSettingsPatch","mutation",c)},le={move:c=>d("ptz","ptz","move","mutation",c),continuousMove:c=>d("ptz","ptz","continuousMove","mutation",c),stop:c=>d("ptz","ptz","stop","mutation",c),getPresets:c=>d("ptz","ptz","getPresets","query",c),goToPreset:c=>d("ptz","ptz","goToPreset","mutation",c),goHome:c=>d("ptz","ptz","goHome","mutation",c),getPosition:c=>d("ptz","ptz","getPosition","query",c),getStatus:c=>d("ptz","ptz","getStatus","query",c)},me={getStatus:c=>d("ptz-autotrack","ptzAutotrack","getStatus","query",c),setEnabled:c=>d("ptz-autotrack","ptzAutotrack","setEnabled","mutation",c),getSettings:c=>d("ptz-autotrack","ptzAutotrack","getSettings","query",c),setSettings:c=>d("ptz-autotrack","ptzAutotrack","setSettings","mutation",c)},ue={reboot:c=>d("reboot","reboot","reboot","mutation",c)},ge={getSegments:c=>d("recording","recording","getSegments","query",c),getPlaybackUrl:c=>d("recording","recording","getPlaybackUrl","query",c),getThumbnailAt:c=>d("recording","recording","getThumbnailAt","query",c)},Se={getSnapshot:c=>d("snapshot","snapshot","getSnapshot","query",c),invalidateCache:c=>d("snapshot","snapshot","invalidateCache","mutation",c),getStatus:c=>d("snapshot","snapshot","getStatus","query",c),getDeviceSettingsContribution:c=>d("snapshot","snapshot","getDeviceSettingsContribution","query",c),getDeviceLiveContribution:c=>d("snapshot","snapshot","getDeviceLiveContribution","query",c),applyDeviceSettingsPatch:c=>d("snapshot","snapshot","applyDeviceSettingsPatch","mutation",c)},ye={setState:c=>d("switch","switch","setState","mutation",c),getStatus:c=>d("switch","switch","getStatus","query",c)},he={listStreams:c=>d("webrtc-session","webrtcSession","listStreams","query",c),createSession:c=>d("webrtc-session","webrtcSession","createSession","mutation",c),handleOffer:c=>d("webrtc-session","webrtcSession","handleOffer","mutation",c),handleAnswer:c=>d("webrtc-session","webrtcSession","handleAnswer","mutation",c),closeSession:c=>d("webrtc-session","webrtcSession","closeSession","mutation",c),hasAdaptiveBitrate:c=>d("webrtc-session","webrtcSession","hasAdaptiveBitrate","query",c)},t={getCurrentSnapshot:c=>d("zone-analytics","zoneAnalytics","getCurrentSnapshot","query",c),getZoneHistory:c=>d("zone-analytics","zoneAnalytics","getZoneHistory","query",c),getCameraHistory:c=>d("zone-analytics","zoneAnalytics","getCameraHistory","query",c),getUnzonedHistory:c=>d("zone-analytics","zoneAnalytics","getUnzonedHistory","query",c)},k={listRules:c=>d("zone-rules","zoneRules","listRules","query",c),setRules:c=>d("zone-rules","zoneRules","setRules","mutation",c)},_={listZones:c=>d("zones","zones","listZones","query",c),addZone:c=>d("zones","zones","addZone","mutation",c),removeZone:c=>d("zones","zones","removeZone","mutation",c),updateZone:c=>d("zones","zones","updateZone","mutation",c)},R={getDeviceSettings:c=>l("addonSettings","getDeviceSettings","query",c),updateDeviceSettings:c=>l("addonSettings","updateDeviceSettings","mutation",c)},K={getDeviceSettingsContribution:c=>l("deviceExport","getDeviceSettingsContribution","query",c),getDeviceLiveContribution:c=>l("deviceExport","getDeviceLiveContribution","query",c),applyDeviceSettingsPatch:c=>l("deviceExport","applyDeviceSettingsPatch","mutation",c)},z={loadConfig:c=>l("deviceManager","loadConfig","query",c),loadRuntimeState:c=>l("deviceManager","loadRuntimeState","query",c),loadMeta:c=>l("deviceManager","loadMeta","query",c),setName:c=>l("deviceManager","setName","mutation",c),setLocation:c=>l("deviceManager","setLocation","mutation",c),setMetadata:c=>l("deviceManager","setMetadata","mutation",c),setDisabled:c=>l("deviceManager","setDisabled","mutation",c),getDevice:c=>l("deviceManager","getDevice","query",c),getStreamSources:c=>l("deviceManager","getStreamSources","query",c),getConfigSchema:c=>l("deviceManager","getConfigSchema","query",c),getSettingsSchema:c=>l("deviceManager","getSettingsSchema","query",c),updateConfig:c=>l("deviceManager","updateConfig","mutation",c),enable:c=>l("deviceManager","enable","mutation",c),disable:c=>l("deviceManager","disable","mutation",c),remove:c=>l("deviceManager","remove","mutation",c),getStreamProfileMap:c=>l("deviceManager","getStreamProfileMap","query",c),setStreamProfileMap:c=>l("deviceManager","setStreamProfileMap","mutation",c),probeStreams:c=>l("deviceManager","probeStreams","mutation",c),getBindings:c=>l("deviceManager","getBindings","query",c),getAllBindings:c=>l("deviceManager","getAllBindings","query",c),setWrapperActive:c=>l("deviceManager","setWrapperActive","mutation",c),getDeviceSettingsAggregate:c=>l("deviceManager","getDeviceSettingsAggregate","query",c),getDeviceLiveInfoAggregate:c=>l("deviceManager","getDeviceLiveInfoAggregate","query",c),getDeviceAggregate:c=>l("deviceManager","getDeviceAggregate","query",c),updateDeviceField:c=>l("deviceManager","updateDeviceField","mutation",c),updateDeviceFieldsBatch:c=>l("deviceManager","updateDeviceFieldsBatch","mutation",c),testField:c=>l("deviceManager","testField","mutation",c),getDeviceStatusAggregate:c=>l("deviceManager","getDeviceStatusAggregate","query",c)},T={getSnapshot:c=>l("deviceState","getSnapshot","query",c),getCapSlice:c=>l("deviceState","getCapSlice","query",c),setCapSlice:c=>l("deviceState","setCapSlice","mutation",c)},Ue={getDeviceStats:c=>l("networkQuality","getDeviceStats","query",c),reportClientStats:c=>l("networkQuality","reportClientStats","mutation",c)},Fe={runPipeline:c=>l("pipelineExecutor","runPipeline","mutation",c),runPipelineBatch:c=>l("pipelineExecutor","runPipelineBatch","mutation",c)},We={assignPipeline:c=>l("pipelineOrchestrator","assignPipeline","mutation",c),unassignPipeline:c=>l("pipelineOrchestrator","unassignPipeline","mutation",c),getPipelineAssignment:c=>l("pipelineOrchestrator","getPipelineAssignment","query",c),getCameraMetrics:c=>l("pipelineOrchestrator","getCameraMetrics","query",c),assignDecoder:c=>l("pipelineOrchestrator","assignDecoder","mutation",c),unassignDecoder:c=>l("pipelineOrchestrator","unassignDecoder","mutation",c),assignAudio:c=>l("pipelineOrchestrator","assignAudio","mutation",c),unassignAudio:c=>l("pipelineOrchestrator","unassignAudio","mutation",c),getAudioAssignment:c=>l("pipelineOrchestrator","getAudioAssignment","query",c),getAudioAssignments:c=>l("pipelineOrchestrator","getAudioAssignments","query",c),getDecoderAssignment:c=>l("pipelineOrchestrator","getDecoderAssignment","query",c),getCameraSettings:c=>l("pipelineOrchestrator","getCameraSettings","query",c),setCameraStepToggle:c=>l("pipelineOrchestrator","setCameraStepToggle","mutation",c),getCameraStepOverrides:c=>l("pipelineOrchestrator","getCameraStepOverrides","query",c),setCameraStepOverride:c=>l("pipelineOrchestrator","setCameraStepOverride","mutation",c),setCameraPipelineForAgent:c=>l("pipelineOrchestrator","setCameraPipelineForAgent","mutation",c),resolvePipeline:c=>l("pipelineOrchestrator","resolvePipeline","query",c),getDeviceSettingsContribution:c=>l("pipelineOrchestrator","getDeviceSettingsContribution","query",c),getDeviceLiveContribution:c=>l("pipelineOrchestrator","getDeviceLiveContribution","query",c),applyDeviceSettingsPatch:c=>l("pipelineOrchestrator","applyDeviceSettingsPatch","mutation",c)},He={detachCamera:c=>l("pipelineRunner","detachCamera","mutation",c),getCameraMetrics:c=>l("pipelineRunner","getCameraMetrics","query",c)},$e={getPolicyStatus:c=>l("recordingEngine","getPolicyStatus","query",c)},Ke={supportsDevice:c=>l("snapshotProvider","supportsDevice","query",c),getSnapshot:c=>l("snapshotProvider","getSnapshot","query",c)},Ge={publishCameraStream:c=>l("streamBroker","publishCameraStream","mutation",c),retractCameraStream:c=>l("streamBroker","retractCameraStream","mutation",c),assignProfile:c=>l("streamBroker","assignProfile","mutation",c),unassignProfile:c=>l("streamBroker","unassignProfile","mutation",c),restartProfile:c=>l("streamBroker","restartProfile","mutation",c),getDeviceSettingsContribution:c=>l("streamBroker","getDeviceSettingsContribution","query",c),getDeviceLiveContribution:c=>l("streamBroker","getDeviceLiveContribution","query",c),applyDeviceSettingsPatch:c=>l("streamBroker","applyDeviceSettingsPatch","mutation",c)};return{deviceId:a.deviceId,binding:a,state:{audioMetrics:v(r,a.deviceId,"audio-metrics"),battery:v(r,a.deviceId,"battery"),brightness:v(r,a.deviceId,"brightness"),cameraStreams:v(r,a.deviceId,"camera-streams"),deviceDiscovery:v(r,a.deviceId,"device-discovery"),deviceStatus:v(r,a.deviceId,"device-status"),doorbell:v(r,a.deviceId,"doorbell"),featureProbe:v(r,a.deviceId,"feature-probe"),motion:v(r,a.deviceId,"motion"),motionTrigger:v(r,a.deviceId,"motion-trigger"),ptzAutotrack:v(r,a.deviceId,"ptz-autotrack"),switch:v(r,a.deviceId,"switch"),zoneAnalytics:v(r,a.deviceId,"zone-analytics"),zoneRules:v(r,a.deviceId,"zone-rules"),zones:v(r,a.deviceId,"zones")},accessories:u,audioAnalysis:g,audioMetrics:S,battery:y,brightness:h,cameraCredentials:I,cameraStreams:N,detectionPipeline:M,deviceDiscovery:P,deviceOps:X,deviceStatus:ee,doorbell:te,events:ae,featureProbe:se,intercom:ie,motion:ne,motionDetection:ce,motionTrigger:oe,nativeObjectDetection:re,osd:de,pipelineAnalytics:pe,ptz:le,ptzAutotrack:me,reboot:ue,recording:ge,snapshot:Se,switch:ye,webrtcSession:he,zoneAnalytics:t,zoneRules:k,zones:_,addonSettings:R,deviceExport:K,deviceManager:z,deviceState:T,networkQuality:Ue,pipelineExecutor:Fe,pipelineOrchestrator:We,pipelineRunner:He,recordingEngine:$e,snapshotProvider:Ke,streamBroker:Ge}}function na(n,a,e,o,r){if(e.length===0||a.length===0)return{passed:n,excluded:[]};const p=e.filter(y=>y.enabled!==!1),m=p.filter(y=>y.mode==="include"),d=p.filter(y=>y.mode==="exclude"),l=m.length>0,u=new Map(a.map(y=>[y.id,y])),g=[],S=[];for(const y of n){const h=o(y),I=r?.(y),N=m.some(P=>fe(P,h,I,u)),M=d.some(P=>fe(P,h,I,u));l?N&&!M?g.push(y):S.push(y):M?S.push(y):g.push(y)}return{passed:g,excluded:S}}function fe(n,a,e,o){if(n.classFilter&&n.classFilter.length>0&&e!==void 0&&!n.classFilter.includes(e))return!1;for(const r of n.zoneIds){const p=o.get(r);if(p&&ca(a,p.polygon))return!0}return!1}function ca(n,a){if(a.length<3)return!1;let e=!1;const{x:o,y:r}=n;for(let p=0,m=a.length-1;p<a.length;m=p++){const d=a[p],l=a[m];d.y>r!=l.y>r&&o<(l.x-d.x)*(r-d.y)/(l.y-d.y||Number.EPSILON)+d.x&&(e=!e)}return e}function oa(n){const a=n;function e(t,k,_,R,K){const z=a[t]?.[k];if(!z)throw new Error(`SystemProxy: api has no '${t}.${k}'`);const T=z;return _==="mutation"?T.mutate(R):_==="subscription"?T.subscribe(R,K):T.query(R)}return{addonPages:{listPages:t=>e("addonPages","listPages","query",t)},addons:{list:t=>e("addons","list","query",t),getLogs:t=>e("addons","getLogs","query",t),listPackages:t=>e("addons","listPackages","query",t),installPackage:t=>e("addons","installPackage","mutation",t),installFromWorkspace:t=>e("addons","installFromWorkspace","mutation",t),isWorkspaceAvailable:t=>e("addons","isWorkspaceAvailable","query",t),listWorkspacePackages:t=>e("addons","listWorkspacePackages","query",t),uninstallPackage:t=>e("addons","uninstallPackage","mutation",t),reloadPackages:t=>e("addons","reloadPackages","mutation",t),searchAvailable:t=>e("addons","searchAvailable","query",t),listUpdates:t=>e("addons","listUpdates","query",t),updatePackage:t=>e("addons","updatePackage","mutation",t),rollbackPackage:t=>e("addons","rollbackPackage","mutation",t),forceRefresh:t=>e("addons","forceRefresh","mutation",t),restartServer:t=>e("addons","restartServer","mutation",t),getLastRestart:t=>e("addons","getLastRestart","query",t),listFrameworkPackages:t=>e("addons","listFrameworkPackages","query",t),listCapabilityProviders:t=>e("addons","listCapabilityProviders","query",t),setCapabilityProviderEnabled:t=>e("addons","setCapabilityProviderEnabled","mutation",t),updateFrameworkPackage:t=>e("addons","updateFrameworkPackage","mutation",t),getVersions:t=>e("addons","getVersions","query",t),restartAddon:t=>e("addons","restartAddon","mutation",t),retryLoad:t=>e("addons","retryLoad","mutation",t),getAutoUpdateSettings:t=>e("addons","getAutoUpdateSettings","query",t),setAutoUpdateSettings:t=>e("addons","setAutoUpdateSettings","mutation",t),getAddonAutoUpdate:t=>e("addons","getAddonAutoUpdate","query",t),setAddonAutoUpdate:t=>e("addons","setAddonAutoUpdate","mutation",t),applyAutoUpdateToAll:t=>e("addons","applyAutoUpdateToAll","mutation",t),custom:t=>e("addons","custom","mutation",t),onAddonLogs:(t,k)=>e("addons","onAddonLogs","subscription",t,k)},addonSettings:{getGlobalSettings:t=>e("addonSettings","getGlobalSettings","query",t),updateGlobalSettings:t=>e("addonSettings","updateGlobalSettings","mutation",t)},addonWidgets:{listWidgets:t=>e("addonWidgets","listWidgets","query",t)},alerts:{emit:t=>e("alerts","emit","mutation",t),update:t=>e("alerts","update","mutation",t),list:t=>e("alerts","list","query",t),getUnreadCount:t=>e("alerts","getUnreadCount","query",t),markRead:t=>e("alerts","markRead","mutation",t),markAllRead:t=>e("alerts","markAllRead","mutation",t),dismiss:t=>e("alerts","dismiss","mutation",t)},audioAnalyzer:{analyseChunk:t=>e("audioAnalyzer","analyseChunk","mutation",t),classify:t=>e("audioAnalyzer","classify","query",t),isReady:t=>e("audioAnalyzer","isReady","query",t),dispose:t=>e("audioAnalyzer","dispose","mutation",t),reprobeAudioEngine:t=>e("audioAnalyzer","reprobeAudioEngine","mutation",t)},audioCodec:{listSupportedCodecs:t=>e("audioCodec","listSupportedCodecs","query",t),canHandle:t=>e("audioCodec","canHandle","query",t),createDecodeSession:t=>e("audioCodec","createDecodeSession","mutation",t),createEncodeSession:t=>e("audioCodec","createEncodeSession","mutation",t),closeSession:t=>e("audioCodec","closeSession","mutation",t),pushEncodedFrame:t=>e("audioCodec","pushEncodedFrame","mutation",t),pullPcm:t=>e("audioCodec","pullPcm","query",t),pushPcm:t=>e("audioCodec","pushPcm","mutation",t),pullEncoded:t=>e("audioCodec","pullEncoded","query",t),flushEncode:t=>e("audioCodec","flushEncode","mutation",t),listActiveSessions:t=>e("audioCodec","listActiveSessions","query",t)},backup:{listDestinations:t=>e("backup","listDestinations","query",t),trigger:t=>e("backup","trigger","mutation",t),list:t=>e("backup","list","query",t),listLocations:t=>e("backup","listLocations","query",t),getEntries:t=>e("backup","getEntries","query",t),restore:t=>e("backup","restore","mutation",t),delete:t=>e("backup","delete","mutation",t),listArchives:t=>e("backup","listArchives","query",t),upsertDestinationPolicy:t=>e("backup","upsertDestinationPolicy","mutation",t),previewSchedule:t=>e("backup","previewSchedule","query",t)},decoder:{supportsCodec:t=>e("decoder","supportsCodec","query",t),getInfo:t=>e("decoder","getInfo","query",t),createSession:t=>e("decoder","createSession","query",t),destroySession:t=>e("decoder","destroySession","query",t),pushPacket:t=>e("decoder","pushPacket","query",t),openStream:t=>e("decoder","openStream","query",t),pullFrames:t=>e("decoder","pullFrames","query",t),updateConfig:t=>e("decoder","updateConfig","query",t),getStats:t=>e("decoder","getStats","query",t),listActiveSessions:t=>e("decoder","listActiveSessions","query",t),reprobeHwaccel:t=>e("decoder","reprobeHwaccel","mutation",t)},deviceExport:{getStatus:t=>e("deviceExport","getStatus","query",t),listSupportedDeviceKinds:t=>e("deviceExport","listSupportedDeviceKinds","query",t),listExposedDevices:t=>e("deviceExport","listExposedDevices","query",t),exposeDevice:t=>e("deviceExport","exposeDevice","mutation",t),unexposeDevice:t=>e("deviceExport","unexposeDevice","mutation",t)},deviceManager:{allocateDeviceId:t=>e("deviceManager","allocateDeviceId","mutation",t),registerDevice:t=>e("deviceManager","registerDevice","mutation",t),removeDevice:t=>e("deviceManager","removeDevice","mutation",t),persistConfig:t=>e("deviceManager","persistConfig","mutation",t),listLocations:t=>e("deviceManager","listLocations","query",t),addLocation:t=>e("deviceManager","addLocation","mutation",t),removeLocation:t=>e("deviceManager","removeLocation","mutation",t),listPersistedByAddon:t=>e("deviceManager","listPersistedByAddon","query",t),listAll:t=>e("deviceManager","listAll","query",t),getChildren:t=>e("deviceManager","getChildren","query",t),listWrappersForCap:t=>e("deviceManager","listWrappersForCap","query",t),listBindableCapsForDeviceType:t=>e("deviceManager","listBindableCapsForDeviceType","query",t),discoverDevices:t=>e("deviceManager","discoverDevices","mutation",t),adoptDevice:t=>e("deviceManager","adoptDevice","mutation",t),getCreationSchema:t=>e("deviceManager","getCreationSchema","query",t),createDevice:t=>e("deviceManager","createDevice","mutation",t),testCreationField:t=>e("deviceManager","testCreationField","mutation",t)},deviceProvider:{start:t=>e("deviceProvider","start","mutation",t),stop:t=>e("deviceProvider","stop","mutation",t),getStatus:t=>e("deviceProvider","getStatus","query",t),getDevices:t=>e("deviceProvider","getDevices","query",t),supportsDiscovery:t=>e("deviceProvider","supportsDiscovery","query",t),discoverDevices:t=>e("deviceProvider","discoverDevices","mutation",t),adoptDiscoveredDevice:t=>e("deviceProvider","adoptDiscoveredDevice","mutation",t),supportsManualCreation:t=>e("deviceProvider","supportsManualCreation","query",t),getChildCreationSchema:t=>e("deviceProvider","getChildCreationSchema","query",t),createDevice:t=>e("deviceProvider","createDevice","mutation",t),testCreationField:t=>e("deviceProvider","testCreationField","mutation",t)},deviceState:{getAllSnapshots:t=>e("deviceState","getAllSnapshots","query",t)},integrations:{list:t=>e("integrations","list","query",t),get:t=>e("integrations","get","query",t),getByAddonId:t=>e("integrations","getByAddonId","query",t),create:t=>e("integrations","create","mutation",t),update:t=>e("integrations","update","mutation",t),delete:t=>e("integrations","delete","mutation",t),getSettings:t=>e("integrations","getSettings","query",t),setSettings:t=>e("integrations","setSettings","mutation",t),getAvailableTypes:t=>e("integrations","getAvailableTypes","query",t),testConnection:t=>e("integrations","testConnection","mutation",t)},localNetwork:{list:t=>e("localNetwork","list","query",t),getPreferred:t=>e("localNetwork","getPreferred","query",t),getConnectionEndpoints:t=>e("localNetwork","getConnectionEndpoints","query",t),getAllowedAddresses:t=>e("localNetwork","getAllowedAddresses","query",t),setAllowedAddresses:t=>e("localNetwork","setAllowedAddresses","mutation",t),resetAllowlistToBestMatch:t=>e("localNetwork","resetAllowlistToBestMatch","mutation",t)},meshNetwork:{getStatus:t=>e("meshNetwork","getStatus","query",t),join:t=>e("meshNetwork","join","mutation",t),startLogin:t=>e("meshNetwork","startLogin","mutation",t),leave:t=>e("meshNetwork","leave","mutation",t),logout:t=>e("meshNetwork","logout","mutation",t),listPeers:t=>e("meshNetwork","listPeers","query",t),testConnection:t=>e("meshNetwork","testConnection","mutation",t)},metricsProvider:{collectSnapshot:t=>e("metricsProvider","collectSnapshot","query",t),getCached:t=>e("metricsProvider","getCached","query",t),getCurrent:t=>e("metricsProvider","getCurrent","query",t),getDiskSpace:t=>e("metricsProvider","getDiskSpace","query",t),getGpuInfo:t=>e("metricsProvider","getGpuInfo","query",t),getCpuTemperature:t=>e("metricsProvider","getCpuTemperature","query",t),getProcessStats:t=>e("metricsProvider","getProcessStats","query",t),listAddonInstances:t=>e("metricsProvider","listAddonInstances","query",t),getAddonStats:t=>e("metricsProvider","getAddonStats","query",t),listNodeProcesses:t=>e("metricsProvider","listNodeProcesses","query",t),killProcess:t=>e("metricsProvider","killProcess","mutation",t)},mqttBroker:{listBrokers:t=>e("mqttBroker","listBrokers","query",t),getBrokerConfig:t=>e("mqttBroker","getBrokerConfig","query",t),addBroker:t=>e("mqttBroker","addBroker","mutation",t),removeBroker:t=>e("mqttBroker","removeBroker","mutation",t),testConnection:t=>e("mqttBroker","testConnection","mutation",t),startEmbeddedBroker:t=>e("mqttBroker","startEmbeddedBroker","mutation",t),stopEmbeddedBroker:t=>e("mqttBroker","stopEmbeddedBroker","mutation",t),getStatus:t=>e("mqttBroker","getStatus","query",t)},networkAccess:{start:t=>e("networkAccess","start","mutation",t),stop:t=>e("networkAccess","stop","mutation",t),getEndpoint:t=>e("networkAccess","getEndpoint","query",t),getStatus:t=>e("networkAccess","getStatus","query",t),listEndpoints:t=>e("networkAccess","listEndpoints","query",t)},networkQuality:{getAllStats:t=>e("networkQuality","getAllStats","query",t)},nodes:{topology:t=>e("nodes","topology","query",t),deployAddon:t=>e("nodes","deployAddon","mutation",t),undeployAddon:t=>e("nodes","undeployAddon","mutation",t),restartAddon:t=>e("nodes","restartAddon","mutation",t),restartProcess:t=>e("nodes","restartProcess","mutation",t),restartNode:t=>e("nodes","restartNode","mutation",t),shutdownNode:t=>e("nodes","shutdownNode","mutation",t),renameNode:t=>e("nodes","renameNode","mutation",t),clusterAddonStatus:t=>e("nodes","clusterAddonStatus","query",t),getNodeAddons:t=>e("nodes","getNodeAddons","query",t),setProcessLogLevel:t=>e("nodes","setProcessLogLevel","mutation",t),executeQuery:t=>e("nodes","executeQuery","mutation",t)},notificationOutput:{send:t=>e("notificationOutput","send","mutation",t),sendTest:t=>e("notificationOutput","sendTest","mutation",t)},pipelineExecutor:{getAvailableEngines:t=>e("pipelineExecutor","getAvailableEngines","query",t),getSelectedEngine:t=>e("pipelineExecutor","getSelectedEngine","query",t),getDefaultSteps:t=>e("pipelineExecutor","getDefaultSteps","query",t),reprobeEngine:t=>e("pipelineExecutor","reprobeEngine","mutation",t),getVideoPipelineSteps:t=>e("pipelineExecutor","getVideoPipelineSteps","query",t),setVideoPipelineSteps:t=>e("pipelineExecutor","setVideoPipelineSteps","mutation",t),getSchema:t=>e("pipelineExecutor","getSchema","query",t),getGlobalSteps:t=>e("pipelineExecutor","getGlobalSteps","query",t),getGlobalPipelineConfig:t=>e("pipelineExecutor","getGlobalPipelineConfig","query",t),getOrchestratorConfigSchema:t=>e("pipelineExecutor","getOrchestratorConfigSchema","query",t),listTemplates:t=>e("pipelineExecutor","listTemplates","query",t),saveTemplate:t=>e("pipelineExecutor","saveTemplate","mutation",t),updateTemplate:t=>e("pipelineExecutor","updateTemplate","mutation",t),deleteTemplate:t=>e("pipelineExecutor","deleteTemplate","mutation",t),getCapabilities:t=>e("pipelineExecutor","getCapabilities","query",t),getAddonModels:t=>e("pipelineExecutor","getAddonModels","query",t),downloadModel:t=>e("pipelineExecutor","downloadModel","mutation",t),deleteModel:t=>e("pipelineExecutor","deleteModel","mutation",t),detect:t=>e("pipelineExecutor","detect","query",t),cacheFrameInPool:t=>e("pipelineExecutor","cacheFrameInPool","mutation",t),inferCached:t=>e("pipelineExecutor","inferCached","mutation",t),uncacheFrame:t=>e("pipelineExecutor","uncacheFrame","mutation",t),getEffectiveTuning:t=>e("pipelineExecutor","getEffectiveTuning","query",t),listLoadedEngines:t=>e("pipelineExecutor","listLoadedEngines","query",t),spinEngine:t=>e("pipelineExecutor","spinEngine","mutation",t),killEngine:t=>e("pipelineExecutor","killEngine","mutation",t),listReferenceImages:t=>e("pipelineExecutor","listReferenceImages","query",t),getReferenceImage:t=>e("pipelineExecutor","getReferenceImage","query",t),getReferenceAudioFiles:t=>e("pipelineExecutor","getReferenceAudioFiles","query",t),getReferenceAudio:t=>e("pipelineExecutor","getReferenceAudio","query",t),getAudioCapabilities:t=>e("pipelineExecutor","getAudioCapabilities","query",t),runAudioTest:t=>e("pipelineExecutor","runAudioTest","mutation",t),getDetectionConfigSchema:t=>e("pipelineExecutor","getDetectionConfigSchema","query",t)},pipelineOrchestrator:{rebalance:t=>e("pipelineOrchestrator","rebalance","mutation",t),getPipelineAssignments:t=>e("pipelineOrchestrator","getPipelineAssignments","query",t),getAgentLoad:t=>e("pipelineOrchestrator","getAgentLoad","query",t),getGlobalMetrics:t=>e("pipelineOrchestrator","getGlobalMetrics","query",t),getCapabilityBindings:t=>e("pipelineOrchestrator","getCapabilityBindings","query",t),setCapabilityBinding:t=>e("pipelineOrchestrator","setCapabilityBinding","mutation",t),getDecoderAssignments:t=>e("pipelineOrchestrator","getDecoderAssignments","query",t),getAudioNodeLoad:t=>e("pipelineOrchestrator","getAudioNodeLoad","query",t),getAgentSettings:t=>e("pipelineOrchestrator","getAgentSettings","query",t),listAgentSettings:t=>e("pipelineOrchestrator","listAgentSettings","query",t),setAgentAddonDefaults:t=>e("pipelineOrchestrator","setAgentAddonDefaults","mutation",t),removeAgentSettings:t=>e("pipelineOrchestrator","removeAgentSettings","mutation",t),listTemplates:t=>e("pipelineOrchestrator","listTemplates","query",t),saveTemplate:t=>e("pipelineOrchestrator","saveTemplate","mutation",t),updateTemplate:t=>e("pipelineOrchestrator","updateTemplate","mutation",t),deleteTemplate:t=>e("pipelineOrchestrator","deleteTemplate","mutation",t)},pipelineRunner:{attachCamera:t=>e("pipelineRunner","attachCamera","mutation",t),reportMotion:t=>e("pipelineRunner","reportMotion","mutation",t),getLocalLoad:t=>e("pipelineRunner","getLocalLoad","query",t),getLocalMetrics:t=>e("pipelineRunner","getLocalMetrics","query",t),getAllCameraMetrics:t=>e("pipelineRunner","getAllCameraMetrics","query",t),getLocalCameras:t=>e("pipelineRunner","getLocalCameras","query",t)},platformProbe:{getCapabilities:t=>e("platformProbe","getCapabilities","query",t),getHardware:t=>e("platformProbe","getHardware","query",t),resolveInferenceConfig:t=>e("platformProbe","resolveInferenceConfig","query",t),resolveHwAccel:t=>e("platformProbe","resolveHwAccel","query",t),getHardwareEncoders:t=>e("platformProbe","getHardwareEncoders","query",t),refreshHardwareEncoders:t=>e("platformProbe","refreshHardwareEncoders","mutation",t)},recordingEngine:{getStatus:t=>e("recordingEngine","getStatus","query",t),enable:t=>e("recordingEngine","enable","mutation",t),disable:t=>e("recordingEngine","disable","mutation",t),getConfig:t=>e("recordingEngine","getConfig","query",t),updateConfig:t=>e("recordingEngine","updateConfig","mutation",t),getPlaylist:t=>e("recordingEngine","getPlaylist","query",t),getThumbnail:t=>e("recordingEngine","getThumbnail","query",t),getSegments:t=>e("recordingEngine","getSegments","query",t),getAvailability:t=>e("recordingEngine","getAvailability","query",t),estimateStorage:t=>e("recordingEngine","estimateStorage","query",t),estimateGlobalStorage:t=>e("recordingEngine","estimateGlobalStorage","query",t),getStorageUsage:t=>e("recordingEngine","getStorageUsage","query",t),setPolicy:t=>e("recordingEngine","setPolicy","mutation",t),getPolicy:t=>e("recordingEngine","getPolicy","query",t),getRetentionConfig:t=>e("recordingEngine","getRetentionConfig","query",t),updateRetentionConfig:t=>e("recordingEngine","updateRetentionConfig","mutation",t),getMotionStats:t=>e("recordingEngine","getMotionStats","query",t)},settingsStore:{get:t=>e("settingsStore","get","query",t),set:t=>e("settingsStore","set","mutation",t),query:t=>e("settingsStore","query","query",t),insert:t=>e("settingsStore","insert","mutation",t),update:t=>e("settingsStore","update","mutation",t),delete:t=>e("settingsStore","delete","mutation",t),count:t=>e("settingsStore","count","query",t),isEmpty:t=>e("settingsStore","isEmpty","query",t),declareCollection:t=>e("settingsStore","declareCollection","mutation",t)},storage:{resolve:t=>e("storage","resolve","query",t),write:t=>e("storage","write","mutation",t),read:t=>e("storage","read","query",t),exists:t=>e("storage","exists","query",t),list:t=>e("storage","list","query",t),delete:t=>e("storage","delete","mutation",t),getAvailableSpace:t=>e("storage","getAvailableSpace","query",t),beginUpload:t=>e("storage","beginUpload","mutation",t),writeChunk:t=>e("storage","writeChunk","mutation",t),finalizeUpload:t=>e("storage","finalizeUpload","mutation",t),abortUpload:t=>e("storage","abortUpload","mutation",t),beginDownload:t=>e("storage","beginDownload","mutation",t),readChunk:t=>e("storage","readChunk","query",t),endDownload:t=>e("storage","endDownload","mutation",t),listLocations:t=>e("storage","listLocations","query",t),getDefaultLocation:t=>e("storage","getDefaultLocation","query",t),upsertLocation:t=>e("storage","upsertLocation","mutation",t),deleteLocation:t=>e("storage","deleteLocation","mutation",t),testLocation:t=>e("storage","testLocation","query",t),listProviders:t=>e("storage","listProviders","query",t),testConfig:t=>e("storage","testConfig","query",t)},streamBroker:{listAllCameraStreams:t=>e("streamBroker","listAllCameraStreams","query",t),listAllProfileSlots:t=>e("streamBroker","listAllProfileSlots","query",t),getBrokerStats:t=>e("streamBroker","getBrokerStats","query",t),listClients:t=>e("streamBroker","listClients","query",t),killClient:t=>e("streamBroker","killClient","mutation",t),getStreamUrl:t=>e("streamBroker","getStreamUrl","query",t),getStreamWithCodec:t=>e("streamBroker","getStreamWithCodec","mutation",t),releaseStreamWithCodec:t=>e("streamBroker","releaseStreamWithCodec","mutation",t),getBroker:t=>e("streamBroker","getBroker","query",t),setPreBufferDuration:t=>e("streamBroker","setPreBufferDuration","mutation",t),getPreBufferInfo:t=>e("streamBroker","getPreBufferInfo","query",t),getRtspPort:t=>e("streamBroker","getRtspPort","query",t),getAllRtspEntries:t=>e("streamBroker","getAllRtspEntries","query",t),getRtspEntry:t=>e("streamBroker","getRtspEntry","query",t),regenerateRtspToken:t=>e("streamBroker","regenerateRtspToken","mutation",t),setRtspEnabled:t=>e("streamBroker","setRtspEnabled","mutation",t),isRtspEnabled:t=>e("streamBroker","isRtspEnabled","query",t)},system:{info:t=>e("system","info","query",t),health:t=>e("system","health","query",t),featureFlags:t=>e("system","featureFlags","query",t),networkAddresses:t=>e("system","networkAddresses","query",t),getRetentionConfig:t=>e("system","getRetentionConfig","query",t),setRetentionConfig:t=>e("system","setRetentionConfig","mutation",t),forceRetentionCleanup:t=>e("system","forceRetentionCleanup","mutation",t)},toast:{onToast:(t,k)=>e("toast","onToast","subscription",t,k)},turnProvider:{getTurnServers:t=>e("turnProvider","getTurnServers","query",t)},userManagement:{listUsers:t=>e("userManagement","listUsers","query",t),createUser:t=>e("userManagement","createUser","mutation",t),updateUser:t=>e("userManagement","updateUser","mutation",t),deleteUser:t=>e("userManagement","deleteUser","mutation",t),resetPassword:t=>e("userManagement","resetPassword","mutation",t),setUserScopes:t=>e("userManagement","setUserScopes","mutation",t),validateCredentials:t=>e("userManagement","validateCredentials","mutation",t),listApiKeys:t=>e("userManagement","listApiKeys","query",t),createApiKey:t=>e("userManagement","createApiKey","mutation",t),revokeApiKey:t=>e("userManagement","revokeApiKey","mutation",t),validateApiKey:t=>e("userManagement","validateApiKey","mutation",t),createScopedToken:t=>e("userManagement","createScopedToken","mutation",t),revokeScopedToken:t=>e("userManagement","revokeScopedToken","mutation",t),validateScopedToken:t=>e("userManagement","validateScopedToken","query",t),listScopedTokens:t=>e("userManagement","listScopedTokens","query",t),setupTotp:t=>e("userManagement","setupTotp","mutation",t),confirmTotp:t=>e("userManagement","confirmTotp","mutation",t),disableTotp:t=>e("userManagement","disableTotp","mutation",t),getTotpStatus:t=>e("userManagement","getTotpStatus","query",t),verifyTotp:t=>e("userManagement","verifyTotp","mutation",t)}}}const ra="device.state-changed",da="capability.binding-changed",pa="device.registered",la="device.unregistered",ma="device.updated";class ua{constructor(a){this.api=a,this.stateSource=Le(this.stateMirror,this.handleListeners,this.api)}stateMirror=new Map;bindings=new Map;devices=new Map;handleListeners=new Map;globalStateListeners=new Set;capListeners=new Map;deviceListeners=new Map;addedListeners=new Set;removedListeners=new Set;pendingWaits=new Set;stateSource;bridges=[];initialized=!1;initPromise=null;async init(a=15e3){if(!this.initialized){if(this.initPromise)return this.initPromise;this.initPromise=(async()=>{const e=(m,d)=>Number.isFinite(a)?new Promise((l,u)=>{const g=setTimeout(()=>u(new Error(`SystemMirror.init: '${d}' timed out after ${a}ms`)),a);m.then(S=>{clearTimeout(g),l(S)},S=>{clearTimeout(g),u(S)})}):m,[o,r,p]=await Promise.all([e(this.api.deviceManager.getAllBindings.query({}),"deviceManager.getAllBindings"),e(this.api.deviceState.getAllSnapshots.query({}),"deviceState.getAllSnapshots"),e(this.api.deviceManager.listAll.query({}),"deviceManager.listAll")]);for(const m of o)this.bindings.set(m.deviceId,m);for(const[m,d]of Object.entries(r)){const l=Number(m);if(!Number.isFinite(l))continue;const u=new Map;for(const[g,S]of Object.entries(d))u.set(g,S);this.stateMirror.set(l,u)}for(const m of p)this.devices.set(m.id,m);try{this.subscribeBus()}catch{}this.initialized=!0})();try{await this.initPromise}finally{this.initPromise=null}}}isReady(){return this.initialized}async awaitReady(){if(!this.initialized)return this.initPromise?this.initPromise:this.init()}dispose(){for(const a of this.bridges)try{a.unsubscribe()}catch{}this.bridges=[],this.handleListeners.clear(),this.globalStateListeners.clear(),this.capListeners.clear(),this.deviceListeners.clear(),this.addedListeners.clear(),this.removedListeners.clear(),this.pendingWaits.clear(),this.initialized=!1}getDeviceById(a){const e=this.bindings.get(a);return e?_e(this.api,e,{stateSource:this.stateSource}):null}getDeviceByName(a){for(const e of this.devices.values())if(e.name===a)return this.getDeviceById(e.id);return null}getDeviceByStableId(a){for(const e of this.devices.values())if(e.stableId===a)return this.getDeviceById(e.id);return null}getDevicesByAddon(a){return this.query({addonId:a})}getDevicesByType(a){return this.query({type:a})}getDeviceInfo(a){return this.devices.get(a)??null}getAllDevices(){const a=[];for(const e of this.bindings.keys()){const o=this.getDeviceById(e);o&&a.push(o)}return a}filterByCap(a){return this.query({caps:a})}query(a={}){const e=[];for(const[o,r]of this.bindings){const p=this.devices.get(o);if(a.id!==void 0&&!F(o,a.id)||a.stableId!==void 0&&(!p||!F(p.stableId,a.stableId))||a.addonId!==void 0&&(!p||!F(p.addonId,a.addonId))||a.type!==void 0&&(!p||!F(p.type,a.type)))continue;if(a.caps!==void 0){const d=Z(a.caps),l=new Set(r.entries.map(u=>u.capName));if(!d.every(u=>l.has(u)))continue}if(a.anyCap!==void 0){const d=Z(a.anyCap),l=new Set(r.entries.map(u=>u.capName));if(!d.some(u=>l.has(u)))continue}if(a.name!==void 0&&(!p||!ga(p.name,a.name))||a.online!==void 0&&(!p||p.online!==a.online))continue;if(a.parentDeviceId!==void 0){if(!p)continue;const d=a.parentDeviceId;if((p.parentDeviceId??null)!==d)continue}if(a.feature!==void 0&&(!p||!Z(a.feature).every(l=>p.features.includes(l)))||a.isCamera!==void 0&&(!p||p.isCamera!==a.isCamera))continue;const m=this.getDeviceById(o);if(m){if(a.where&&p){if(!a.where(p,m))continue}else if(a.where&&!p)continue;e.push(m)}}return e}whereState(a,e){const o=[];for(const[r,p]of this.stateMirror){const m=p.get(a);if(!m||!e(m,r))continue;const d=this.getDeviceById(r);d&&o.push(d)}return o}mapState(a,e){const o=[];for(const[r,p]of this.stateMirror){const m=p.get(a);m&&o.push(e(m,r))}return o}findState(a,e){for(const[o,r]of this.stateMirror){const p=r.get(a);if(p&&e(p,o))return this.getDeviceById(o)}return null}countByCap(a){let e=0;for(const o of this.bindings.values())o.entries.some(r=>r.capName===a)&&e++;return e}countByState(a,e){let o=0;for(const[r,p]of this.stateMirror){const m=p.get(a);m&&e(m,r)&&o++}return o}listen(a){return this.globalStateListeners.add(a),()=>{this.globalStateListeners.delete(a)}}listenCap(a,e){let o=this.capListeners.get(a);return o||(o=new Set,this.capListeners.set(a,o)),o.add(e),()=>{o.delete(e),o.size===0&&this.capListeners.delete(a)}}listenDevice(a,e){let o=this.deviceListeners.get(a);return o||(o=new Set,this.deviceListeners.set(a,o)),o.add(e),()=>{o.delete(e),o.size===0&&this.deviceListeners.delete(a)}}onDeviceAdded(a){return this.addedListeners.add(a),()=>{this.addedListeners.delete(a)}}onDeviceRemoved(a){return this.removedListeners.add(a),()=>{this.removedListeners.delete(a)}}waitForState(a,e,o,r=3e4){return new Promise((p,m)=>{const l=(()=>{const S=this.stateMirror.get(a)?.get(e);return S&&o(S)?S:null})();if(l){p(l);return}let u=null;const g=this.listenDevice(a,(S,y,h)=>{y===e&&h&&o(h)&&(u&&clearTimeout(u),g(),p(h))});Number.isFinite(r)&&(u=setTimeout(()=>{g(),m(new Error(`waitForState timed out after ${r}ms (deviceId=${a}, capName=${e})`))},r))})}waitForDevice(a,e=3e4){return new Promise((o,r)=>{const p=this.getDeviceById(a);if(p){o(p);return}let m=null;const d=this.onDeviceAdded(l=>{if(l!==a)return;const u=this.getDeviceById(l);u&&(m&&clearTimeout(m),d(),o(u))});Number.isFinite(e)&&(m=setTimeout(()=>{d(),r(new Error(`waitForDevice timed out after ${e}ms (deviceId=${a})`))},e))})}async forEachCap(a,e){for(const o of this.filterByCap(a))await e(o)}async invokeCap(a,e,o,r={}){const p=this.filterByCap(a),m=Math.max(1,r.parallelism??p.length),d=[];for(let l=0;l<p.length;l+=m){const u=p.slice(l,l+m),g=await Promise.allSettled(u.map(async S=>{const y=S[a];if(!y||typeof y[e]!="function")throw new Error(`device '${S.deviceId}' does not expose '${a}.${e}'`);return await y[e](o)}));for(let S=0;S<g.length;S++){const y=u[S],h=g[S];h.status==="fulfilled"?d.push({deviceId:y.deviceId,ok:!0,result:h.value}):d.push({deviceId:y.deviceId,ok:!1,error:h.reason})}}return d}summary(){const a={},e={},o={};let r=0,p=0;for(const m of this.bindings.values())for(const d of m.entries)a[d.capName]=(a[d.capName]??0)+1;for(const m of this.devices.values())e[m.addonId]=(e[m.addonId]??0)+1,o[m.type]=(o[m.type]??0)+1,m.online?r++:p++;return{totalDevices:this.bindings.size,online:r,offline:p,byCap:a,byAddon:e,byType:o,statedDevices:this.stateMirror.size}}dump(a){const e=r=>{const p=this.devices.get(r)??null,m=this.bindings.get(r)??null,d={},l=this.stateMirror.get(r);if(l)for(const[u,g]of l)d[u]={...g};return{deviceId:r,info:p,binding:m?{...m,entries:m.entries.map(u=>({...u}))}:null,state:d}};if(a!==void 0)return e(a);const o=[];for(const r of this.bindings.keys())o.push(e(r));return o}getRawMirror(){return this.stateMirror}getSystemState(){const a=new Map;for(const[e,o]of this.stateMirror){const r=new Map;for(const[p,m]of o)r.set(p,{...m});a.set(e,r)}return a}subscribeBus(){if(!this.api.live?.onEvent)return;const a=this.api.live.onEvent;this.bridges.push(a.subscribe({category:ra},{onData:e=>{const o=e.data;!o||typeof o.deviceId!="number"||typeof o.capName!="string"||this.applyStateUpdate(o.deviceId,o.capName,o.slice)}})),this.bridges.push(a.subscribe({category:da},{onData:e=>{const o=e.data,r=typeof o?.deviceId=="number"?o.deviceId:o?.source?.type==="device"&&typeof o.source.id=="number"?o.source.id:null;r!==null&&this.refreshBinding(r)}})),this.bridges.push(a.subscribe({category:pa},{onData:e=>{const o=e.data;typeof o?.deviceId=="number"&&this.refreshDeviceMetadata(o.deviceId,"added")}})),this.bridges.push(a.subscribe({category:la},{onData:e=>{const o=e.data;typeof o?.deviceId=="number"&&this.applyDeviceRemoval(o.deviceId)}})),this.bridges.push(a.subscribe({category:ma},{onData:e=>{const o=e.data;typeof o?.deviceId=="number"&&this.refreshDeviceMetadata(o.deviceId,"updated")}}))}applyStateUpdate(a,e,o){let r=this.stateMirror.get(a);r||(r=new Map,this.stateMirror.set(a,r)),o===void 0?r.delete(e):r.set(e,o);const p=`${a}:${e}`,m=this.handleListeners.get(p);if(m)for(const u of m)try{u(o)}catch{}for(const u of this.globalStateListeners)try{u(a,e,o)}catch{}const d=this.capListeners.get(e);if(d)for(const u of d)try{u(a,o)}catch{}const l=this.deviceListeners.get(a);if(l)for(const u of l)try{u(a,e,o)}catch{}}applyDeviceRemoval(a){const e=this.devices.get(a)??null;this.bindings.delete(a),this.devices.delete(a),this.stateMirror.delete(a);for(const o of this.removedListeners)try{o(a,e)}catch{}}async refreshBinding(a){try{const o=(await this.api.deviceManager.getAllBindings.query({})).find(r=>r.deviceId===a);o?this.bindings.set(a,o):this.applyDeviceRemoval(a)}catch{}}async refreshDeviceMetadata(a,e){try{const r=(await this.api.deviceManager.listAll.query({})).find(m=>m.id===a);if(!r)return;const p=!this.devices.has(a);if(this.devices.set(a,r),e==="added"&&p){await this.refreshBinding(a);for(const m of this.addedListeners)try{m(a,r)}catch{}}}catch{}}}function F(n,a){return Array.isArray(a)?a.includes(n):n===a}function Z(n){return Array.isArray(n)?n:[n]}function ga(n,a){return typeof a=="string"?n===a:a instanceof RegExp?a.test(n):"exact"in a?n===a.exact:"contains"in a?n.toLowerCase().includes(a.contains.toLowerCase()):!1}function Sa(n){return n}function ya(n,a,e){return{input:n,output:a,kind:e?.kind??"query",auth:e?.auth??"protected",scope:e?.scope??{kind:"system"}}}const ha={accessories:"accessories",addonPages:"addon-pages",addonPagesSource:"addon-pages-source",addonRoutes:"addon-routes",addonSettings:"addon-settings",addonWidgets:"addon-widgets",addonWidgetsSource:"addon-widgets-source",addons:"addons",adminUi:"admin-ui",advancedNotifier:"advanced-notifier",alerts:"alerts",audioAnalysis:"audio-analysis",audioAnalyzer:"audio-analyzer",audioCodec:"audio-codec",audioMetrics:"audio-metrics",authProvider:"auth-provider",backup:"backup",battery:"battery",brightness:"brightness",cameraCredentials:"camera-credentials",cameraStreams:"camera-streams",decoder:"decoder",detectionPipeline:"detection-pipeline",deviceDiscovery:"device-discovery",deviceExport:"device-export",deviceManager:"device-manager",deviceOps:"device-ops",deviceProvider:"device-provider",deviceState:"device-state",deviceStatus:"device-status",doorbell:"doorbell",embeddingEncoder:"embedding-encoder",events:"events",featureProbe:"feature-probe",integrations:"integrations",intercom:"intercom",localNetwork:"local-network",logDestination:"log-destination",meshNetwork:"mesh-network",metricsProvider:"metrics-provider",motion:"motion",motionDetection:"motion-detection",motionTrigger:"motion-trigger",mqttBroker:"mqtt-broker",nativeObjectDetection:"native-object-detection",networkAccess:"network-access",networkQuality:"network-quality",nodes:"nodes",notificationOutput:"notification-output",osd:"osd",pipelineAnalytics:"pipeline-analytics",pipelineExecutor:"pipeline-executor",pipelineOrchestrator:"pipeline-orchestrator",pipelineRunner:"pipeline-runner",platformProbe:"platform-probe",ptz:"ptz",ptzAutotrack:"ptz-autotrack",reboot:"reboot",recording:"recording",recordingEngine:"recording-engine",restreamer:"restreamer",settingsStore:"settings-store",smtpProvider:"smtp-provider",snapshot:"snapshot",snapshotProvider:"snapshot-provider",ssoBridge:"sso-bridge",storage:"storage",storageProvider:"storage-provider",streamBroker:"stream-broker",streamingEngine:"streaming-engine",switch:"switch",system:"system",toast:"toast",turnProvider:"turn-provider",userManagement:"user-management",userPasskeys:"user-passkeys",webrtc:"webrtc",webrtcSession:"webrtc-session",zoneAnalytics:"zone-analytics",zoneRules:"zone-rules",zones:"zones"},va=[{key:"accessories",name:"accessories"},{key:"addonPages",name:"addon-pages"},{key:"addonPagesSource",name:"addon-pages-source"},{key:"addonRoutes",name:"addon-routes"},{key:"addonSettings",name:"addon-settings"},{key:"addonWidgets",name:"addon-widgets"},{key:"addonWidgetsSource",name:"addon-widgets-source"},{key:"addons",name:"addons"},{key:"adminUi",name:"admin-ui"},{key:"advancedNotifier",name:"advanced-notifier"},{key:"alerts",name:"alerts"},{key:"audioAnalysis",name:"audio-analysis"},{key:"audioAnalyzer",name:"audio-analyzer"},{key:"audioCodec",name:"audio-codec"},{key:"audioMetrics",name:"audio-metrics"},{key:"authProvider",name:"auth-provider"},{key:"backup",name:"backup"},{key:"battery",name:"battery"},{key:"brightness",name:"brightness"},{key:"cameraCredentials",name:"camera-credentials"},{key:"cameraStreams",name:"camera-streams"},{key:"decoder",name:"decoder"},{key:"detectionPipeline",name:"detection-pipeline"},{key:"deviceDiscovery",name:"device-discovery"},{key:"deviceExport",name:"device-export"},{key:"deviceManager",name:"device-manager"},{key:"deviceOps",name:"device-ops"},{key:"deviceProvider",name:"device-provider"},{key:"deviceState",name:"device-state"},{key:"deviceStatus",name:"device-status"},{key:"doorbell",name:"doorbell"},{key:"embeddingEncoder",name:"embedding-encoder"},{key:"events",name:"events"},{key:"featureProbe",name:"feature-probe"},{key:"integrations",name:"integrations"},{key:"intercom",name:"intercom"},{key:"localNetwork",name:"local-network"},{key:"logDestination",name:"log-destination"},{key:"meshNetwork",name:"mesh-network"},{key:"metricsProvider",name:"metrics-provider"},{key:"motion",name:"motion"},{key:"motionDetection",name:"motion-detection"},{key:"motionTrigger",name:"motion-trigger"},{key:"mqttBroker",name:"mqtt-broker"},{key:"nativeObjectDetection",name:"native-object-detection"},{key:"networkAccess",name:"network-access"},{key:"networkQuality",name:"network-quality"},{key:"nodes",name:"nodes"},{key:"notificationOutput",name:"notification-output"},{key:"osd",name:"osd"},{key:"pipelineAnalytics",name:"pipeline-analytics"},{key:"pipelineExecutor",name:"pipeline-executor"},{key:"pipelineOrchestrator",name:"pipeline-orchestrator"},{key:"pipelineRunner",name:"pipeline-runner"},{key:"platformProbe",name:"platform-probe"},{key:"ptz",name:"ptz"},{key:"ptzAutotrack",name:"ptz-autotrack"},{key:"reboot",name:"reboot"},{key:"recording",name:"recording"},{key:"recordingEngine",name:"recording-engine"},{key:"restreamer",name:"restreamer"},{key:"settingsStore",name:"settings-store"},{key:"smtpProvider",name:"smtp-provider"},{key:"snapshot",name:"snapshot"},{key:"snapshotProvider",name:"snapshot-provider"},{key:"ssoBridge",name:"sso-bridge"},{key:"storage",name:"storage"},{key:"storageProvider",name:"storage-provider"},{key:"streamBroker",name:"stream-broker"},{key:"streamingEngine",name:"streaming-engine"},{key:"switch",name:"switch"},{key:"system",name:"system"},{key:"toast",name:"toast"},{key:"turnProvider",name:"turn-provider"},{key:"userManagement",name:"user-management"},{key:"userPasskeys",name:"user-passkeys"},{key:"webrtc",name:"webrtc"},{key:"webrtcSession",name:"webrtc-session"},{key:"zoneAnalytics",name:"zone-analytics"},{key:"zoneRules",name:"zone-rules"},{key:"zones",name:"zones"}],fa=[s.accessoriesCapability,s.addonPagesCapability,s.addonPagesSourceCapability,s.addonRoutesCapability,s.addonSettingsCapability,s.addonWidgetsCapability,s.addonWidgetsSourceCapability,s.addonsCapability,s.adminUiCapability,s.advancedNotifierCapability,s.alertsCapability,s.audioAnalysisCapability,s.audioAnalyzerCapability,s.audioCodecCapability,s.audioMetricsCapability,s.authProviderCapability,s.backupCapability,s.batteryCapability,s.brightnessCapability,s.cameraCredentialsCapability,s.cameraStreamsCapability,s.decoderCapability,s.detectionPipelineCapability,s.deviceDiscoveryCapability,s.deviceExportCapability,s.deviceManagerCapability,s.deviceOpsCapability,s.deviceProviderCapability,s.deviceStateCapability,s.deviceStatusCapability,s.doorbellCapability,s.embeddingEncoderCapability,s.eventsCapability,s.featureProbeCapability,s.integrationsCapability,s.intercomCapability,s.localNetworkCapability,s.logDestinationCapability,s.meshNetworkCapability,s.metricsProviderCapability,s.motionCapability,s.motionDetectionCapability,s.motionTriggerCapability,s.mqttBrokerCapability,s.nativeObjectDetectionCapability,s.networkAccessCapability,s.networkQualityCapability,s.nodesCapability,s.notificationOutputCapability,s.osdCapability,s.pipelineAnalyticsCapability,s.pipelineExecutorCapability,s.pipelineOrchestratorCapability,s.pipelineRunnerCapability,s.platformProbeCapability,s.ptzCapability,s.ptzAutotrackCapability,s.rebootCapability,s.recordingCapability,s.recordingEngineCapability,s.restreamerCapability,s.settingsStoreCapability,s.smtpProviderCapability,s.snapshotCapability,s.snapshotProviderCapability,s.ssoBridgeCapability,s.storageCapability,s.storageProviderCapability,s.streamBrokerCapability,s.streamingEngineCapability,s.switchCapability,s.systemCapability,s.toastCapability,s.turnProviderCapability,s.userManagementCapability,s.userPasskeysCapability,s.webrtcCapability,s.webrtcSessionCapability,s.zoneAnalyticsCapability,s.zoneRulesCapability,s.zonesCapability],ba=["accessories","battery","brightness","camera-credentials","device-discovery","device-export","device-status","doorbell","feature-probe","intercom","motion","motion-trigger","mqtt-broker","native-object-detection","osd","ptz","ptz-autotrack","snapshot","switch"],Ia=Object.freeze({"addonPages.listPages":{capName:"addon-pages",capScope:"system",addonId:null,access:"view"},"addonPagesSource.listPages":{capName:"addon-pages-source",capScope:"system",addonId:null,access:"view"},"addonRoutes.getRoutes":{capName:"addon-routes",capScope:"system",addonId:null,access:"view"},"addonRoutes.invoke":{capName:"addon-routes",capScope:"system",addonId:null,access:"create"},"addons.applyAutoUpdateToAll":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.custom":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.forceRefresh":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.getAddonAutoUpdate":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.getAutoUpdateSettings":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.getLastRestart":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.getLogs":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.getVersions":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.installFromWorkspace":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.installPackage":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.isWorkspaceAvailable":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.list":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.listCapabilityProviders":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.listFrameworkPackages":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.listPackages":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.listUpdates":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.listWorkspacePackages":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.onAddonLogs":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.reloadPackages":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.restartAddon":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.restartServer":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.retryLoad":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.rollbackPackage":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.searchAvailable":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.setAddonAutoUpdate":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.setAutoUpdateSettings":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.setCapabilityProviderEnabled":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.uninstallPackage":{capName:"addons",capScope:"system",addonId:null,access:"delete"},"addons.updateFrameworkPackage":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.updatePackage":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addonSettings.getDeviceSettings":{capName:"addon-settings",capScope:"system",addonId:null,access:"view"},"addonSettings.getGlobalSettings":{capName:"addon-settings",capScope:"system",addonId:null,access:"view"},"addonSettings.updateDeviceSettings":{capName:"addon-settings",capScope:"system",addonId:null,access:"create"},"addonSettings.updateGlobalSettings":{capName:"addon-settings",capScope:"system",addonId:null,access:"create"},"addonWidgets.listWidgets":{capName:"addon-widgets",capScope:"system",addonId:null,access:"view"},"addonWidgetsSource.listWidgets":{capName:"addon-widgets-source",capScope:"system",addonId:null,access:"view"},"adminUi.getStaticDir":{capName:"admin-ui",capScope:"system",addonId:null,access:"view"},"adminUi.getVersion":{capName:"admin-ui",capScope:"system",addonId:null,access:"view"},"advancedNotifier.deleteRule":{capName:"advanced-notifier",capScope:"system",addonId:null,access:"delete"},"advancedNotifier.getHistory":{capName:"advanced-notifier",capScope:"system",addonId:null,access:"view"},"advancedNotifier.getRules":{capName:"advanced-notifier",capScope:"system",addonId:null,access:"view"},"advancedNotifier.testRule":{capName:"advanced-notifier",capScope:"system",addonId:null,access:"create"},"advancedNotifier.upsertRule":{capName:"advanced-notifier",capScope:"system",addonId:null,access:"create"},"alerts.dismiss":{capName:"alerts",capScope:"system",addonId:null,access:"create"},"alerts.emit":{capName:"alerts",capScope:"system",addonId:null,access:"create"},"alerts.getUnreadCount":{capName:"alerts",capScope:"system",addonId:null,access:"view"},"alerts.list":{capName:"alerts",capScope:"system",addonId:null,access:"view"},"alerts.markAllRead":{capName:"alerts",capScope:"system",addonId:null,access:"create"},"alerts.markRead":{capName:"alerts",capScope:"system",addonId:null,access:"create"},"alerts.update":{capName:"alerts",capScope:"system",addonId:null,access:"create"},"audioAnalysis.resolveDeviceSettings":{capName:"audio-analysis",capScope:"device",addonId:null,access:"view"},"audioAnalyzer.analyseChunk":{capName:"audio-analyzer",capScope:"system",addonId:null,access:"create"},"audioAnalyzer.classify":{capName:"audio-analyzer",capScope:"system",addonId:null,access:"view"},"audioAnalyzer.dispose":{capName:"audio-analyzer",capScope:"system",addonId:null,access:"create"},"audioAnalyzer.isReady":{capName:"audio-analyzer",capScope:"system",addonId:null,access:"view"},"audioAnalyzer.reprobeAudioEngine":{capName:"audio-analyzer",capScope:"system",addonId:null,access:"create"},"audioCodec.canHandle":{capName:"audio-codec",capScope:"system",addonId:null,access:"view"},"audioCodec.closeSession":{capName:"audio-codec",capScope:"system",addonId:null,access:"create"},"audioCodec.createDecodeSession":{capName:"audio-codec",capScope:"system",addonId:null,access:"create"},"audioCodec.createEncodeSession":{capName:"audio-codec",capScope:"system",addonId:null,access:"create"},"audioCodec.flushEncode":{capName:"audio-codec",capScope:"system",addonId:null,access:"create"},"audioCodec.listActiveSessions":{capName:"audio-codec",capScope:"system",addonId:null,access:"view"},"audioCodec.listSupportedCodecs":{capName:"audio-codec",capScope:"system",addonId:null,access:"view"},"audioCodec.pullEncoded":{capName:"audio-codec",capScope:"system",addonId:null,access:"view"},"audioCodec.pullPcm":{capName:"audio-codec",capScope:"system",addonId:null,access:"view"},"audioCodec.pushEncodedFrame":{capName:"audio-codec",capScope:"system",addonId:null,access:"create"},"audioCodec.pushPcm":{capName:"audio-codec",capScope:"system",addonId:null,access:"create"},"audioMetrics.getCurrentSnapshot":{capName:"audio-metrics",capScope:"device",addonId:null,access:"view"},"audioMetrics.getHistory":{capName:"audio-metrics",capScope:"device",addonId:null,access:"view"},"authProvider.getLoginUrl":{capName:"auth-provider",capScope:"system",addonId:null,access:"view"},"authProvider.handleCallback":{capName:"auth-provider",capScope:"system",addonId:null,access:"create"},"authProvider.validateCredentials":{capName:"auth-provider",capScope:"system",addonId:null,access:"create"},"authProvider.validateToken":{capName:"auth-provider",capScope:"system",addonId:null,access:"view"},"backup.delete":{capName:"backup",capScope:"system",addonId:null,access:"delete"},"backup.getEntries":{capName:"backup",capScope:"system",addonId:null,access:"view"},"backup.list":{capName:"backup",capScope:"system",addonId:null,access:"view"},"backup.listArchives":{capName:"backup",capScope:"system",addonId:null,access:"view"},"backup.listDestinations":{capName:"backup",capScope:"system",addonId:null,access:"view"},"backup.listLocations":{capName:"backup",capScope:"system",addonId:null,access:"view"},"backup.previewSchedule":{capName:"backup",capScope:"system",addonId:null,access:"view"},"backup.restore":{capName:"backup",capScope:"system",addonId:null,access:"create"},"backup.trigger":{capName:"backup",capScope:"system",addonId:null,access:"create"},"backup.upsertDestinationPolicy":{capName:"backup",capScope:"system",addonId:null,access:"create"},"brightness.setBrightness":{capName:"brightness",capScope:"device",addonId:null,access:"create"},"cameraCredentials.getCredentials":{capName:"camera-credentials",capScope:"device",addonId:null,access:"view"},"cameraStreams.getBrokerStreams":{capName:"camera-streams",capScope:"device",addonId:null,access:"view"},"cameraStreams.getCameraStreams":{capName:"camera-streams",capScope:"device",addonId:null,access:"view"},"cameraStreams.getRtspEntries":{capName:"camera-streams",capScope:"device",addonId:null,access:"view"},"decoder.createSession":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.destroySession":{capName:"decoder",capScope:"system",addonId:null,access:"delete"},"decoder.getInfo":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.getStats":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.listActiveSessions":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.openStream":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.pullFrames":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.pushPacket":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.reprobeHwaccel":{capName:"decoder",capScope:"system",addonId:null,access:"create"},"decoder.supportsCodec":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.updateConfig":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"deviceDiscovery.adoptDevice":{capName:"device-discovery",capScope:"device",addonId:null,access:"create"},"deviceDiscovery.listDiscovered":{capName:"device-discovery",capScope:"device",addonId:null,access:"view"},"deviceDiscovery.refreshDiscovery":{capName:"device-discovery",capScope:"device",addonId:null,access:"create"},"deviceDiscovery.releaseDevice":{capName:"device-discovery",capScope:"device",addonId:null,access:"create"},"deviceExport.exposeDevice":{capName:"device-export",capScope:"system",addonId:null,access:"create"},"deviceExport.getStatus":{capName:"device-export",capScope:"system",addonId:null,access:"view"},"deviceExport.listExposedDevices":{capName:"device-export",capScope:"system",addonId:null,access:"view"},"deviceExport.listSupportedDeviceKinds":{capName:"device-export",capScope:"system",addonId:null,access:"view"},"deviceExport.unexposeDevice":{capName:"device-export",capScope:"system",addonId:null,access:"create"},"deviceManager.addLocation":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.adoptDevice":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.allocateDeviceId":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.createDevice":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.disable":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.discoverDevices":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.enable":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.getAllBindings":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getBindings":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getChildren":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getConfigSchema":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getCreationSchema":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getDevice":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getDeviceAggregate":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getDeviceLiveInfoAggregate":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getDeviceSettingsAggregate":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getDeviceStatusAggregate":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getSettingsSchema":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getStreamProfileMap":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getStreamSources":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.listAll":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.listBindableCapsForDeviceType":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.listLocations":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.listPersistedByAddon":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.listWrappersForCap":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.loadConfig":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.loadMeta":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.loadRuntimeState":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.persistConfig":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.probeStreams":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.registerDevice":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.remove":{capName:"device-manager",capScope:"system",addonId:null,access:"delete"},"deviceManager.removeDevice":{capName:"device-manager",capScope:"system",addonId:null,access:"delete"},"deviceManager.removeLocation":{capName:"device-manager",capScope:"system",addonId:null,access:"delete"},"deviceManager.setDisabled":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.setLocation":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.setMetadata":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.setName":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.setStreamProfileMap":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.setWrapperActive":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.testCreationField":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.testField":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.updateConfig":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.updateDeviceField":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.updateDeviceFieldsBatch":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceOps.getConfigEntries":{capName:"device-ops",capScope:"device",addonId:null,access:"view"},"deviceOps.getSettingsSchema":{capName:"device-ops",capScope:"device",addonId:null,access:"view"},"deviceOps.getStreamSources":{capName:"device-ops",capScope:"device",addonId:null,access:"view"},"deviceOps.removeDevice":{capName:"device-ops",capScope:"device",addonId:null,access:"delete"},"deviceOps.setConfig":{capName:"device-ops",capScope:"device",addonId:null,access:"create"},"deviceProvider.adoptDiscoveredDevice":{capName:"device-provider",capScope:"system",addonId:null,access:"create"},"deviceProvider.createDevice":{capName:"device-provider",capScope:"system",addonId:null,access:"create"},"deviceProvider.discoverDevices":{capName:"device-provider",capScope:"system",addonId:null,access:"create"},"deviceProvider.getChildCreationSchema":{capName:"device-provider",capScope:"system",addonId:null,access:"view"},"deviceProvider.getDevices":{capName:"device-provider",capScope:"system",addonId:null,access:"view"},"deviceProvider.getStatus":{capName:"device-provider",capScope:"system",addonId:null,access:"view"},"deviceProvider.start":{capName:"device-provider",capScope:"system",addonId:null,access:"create"},"deviceProvider.stop":{capName:"device-provider",capScope:"system",addonId:null,access:"create"},"deviceProvider.supportsDiscovery":{capName:"device-provider",capScope:"system",addonId:null,access:"view"},"deviceProvider.supportsManualCreation":{capName:"device-provider",capScope:"system",addonId:null,access:"view"},"deviceProvider.testCreationField":{capName:"device-provider",capScope:"system",addonId:null,access:"create"},"deviceState.getAllSnapshots":{capName:"device-state",capScope:"system",addonId:null,access:"view"},"deviceState.getCapSlice":{capName:"device-state",capScope:"system",addonId:null,access:"view"},"deviceState.getSnapshot":{capName:"device-state",capScope:"system",addonId:null,access:"view"},"deviceState.setCapSlice":{capName:"device-state",capScope:"system",addonId:null,access:"create"},"embeddingEncoder.encode":{capName:"embedding-encoder",capScope:"system",addonId:null,access:"view"},"embeddingEncoder.encodeText":{capName:"embedding-encoder",capScope:"system",addonId:null,access:"view"},"embeddingEncoder.getInfo":{capName:"embedding-encoder",capScope:"system",addonId:null,access:"view"},"events.getEventClipUrl":{capName:"events",capScope:"device",addonId:null,access:"view"},"events.getEvents":{capName:"events",capScope:"device",addonId:null,access:"view"},"events.getEventThumbnail":{capName:"events",capScope:"device",addonId:null,access:"view"},"integrations.create":{capName:"integrations",capScope:"system",addonId:null,access:"create"},"integrations.delete":{capName:"integrations",capScope:"system",addonId:null,access:"delete"},"integrations.get":{capName:"integrations",capScope:"system",addonId:null,access:"view"},"integrations.getAvailableTypes":{capName:"integrations",capScope:"system",addonId:null,access:"view"},"integrations.getByAddonId":{capName:"integrations",capScope:"system",addonId:null,access:"view"},"integrations.getSettings":{capName:"integrations",capScope:"system",addonId:null,access:"view"},"integrations.list":{capName:"integrations",capScope:"system",addonId:null,access:"view"},"integrations.setSettings":{capName:"integrations",capScope:"system",addonId:null,access:"create"},"integrations.testConnection":{capName:"integrations",capScope:"system",addonId:null,access:"create"},"integrations.update":{capName:"integrations",capScope:"system",addonId:null,access:"create"},"intercom.endTalkSession":{capName:"intercom",capScope:"device",addonId:null,access:"create"},"intercom.handleAnswer":{capName:"intercom",capScope:"device",addonId:null,access:"create"},"intercom.pushTalkPcm":{capName:"intercom",capScope:"device",addonId:null,access:"create"},"intercom.startSession":{capName:"intercom",capScope:"device",addonId:null,access:"create"},"intercom.startTalkSession":{capName:"intercom",capScope:"device",addonId:null,access:"create"},"intercom.stopSession":{capName:"intercom",capScope:"device",addonId:null,access:"create"},"localNetwork.getAllowedAddresses":{capName:"local-network",capScope:"system",addonId:null,access:"view"},"localNetwork.getConnectionEndpoints":{capName:"local-network",capScope:"system",addonId:null,access:"view"},"localNetwork.getPreferred":{capName:"local-network",capScope:"system",addonId:null,access:"view"},"localNetwork.list":{capName:"local-network",capScope:"system",addonId:null,access:"view"},"localNetwork.resetAllowlistToBestMatch":{capName:"local-network",capScope:"system",addonId:null,access:"delete"},"localNetwork.setAllowedAddresses":{capName:"local-network",capScope:"system",addonId:null,access:"create"},"logDestination.query":{capName:"log-destination",capScope:"system",addonId:null,access:"view"},"logDestination.write":{capName:"log-destination",capScope:"system",addonId:null,access:"create"},"meshNetwork.getStatus":{capName:"mesh-network",capScope:"system",addonId:null,access:"view"},"meshNetwork.join":{capName:"mesh-network",capScope:"system",addonId:null,access:"create"},"meshNetwork.leave":{capName:"mesh-network",capScope:"system",addonId:null,access:"create"},"meshNetwork.listPeers":{capName:"mesh-network",capScope:"system",addonId:null,access:"view"},"meshNetwork.logout":{capName:"mesh-network",capScope:"system",addonId:null,access:"create"},"meshNetwork.startLogin":{capName:"mesh-network",capScope:"system",addonId:null,access:"create"},"meshNetwork.testConnection":{capName:"mesh-network",capScope:"system",addonId:null,access:"create"},"metricsProvider.collectSnapshot":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getAddonStats":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getCached":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getCpuTemperature":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getCurrent":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getDiskSpace":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getGpuInfo":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getProcessStats":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.killProcess":{capName:"metrics-provider",capScope:"system",addonId:null,access:"create"},"metricsProvider.listAddonInstances":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.listNodeProcesses":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"motion.isDetected":{capName:"motion",capScope:"device",addonId:null,access:"view"},"motionDetection.analyze":{capName:"motion-detection",capScope:"device",addonId:null,access:"create"},"motionDetection.removeCamera":{capName:"motion-detection",capScope:"device",addonId:null,access:"delete"},"motionDetection.reset":{capName:"motion-detection",capScope:"device",addonId:null,access:"delete"},"motionTrigger.setMotionTrigger":{capName:"motion-trigger",capScope:"device",addonId:null,access:"create"},"mqttBroker.addBroker":{capName:"mqtt-broker",capScope:"system",addonId:null,access:"create"},"mqttBroker.getBrokerConfig":{capName:"mqtt-broker",capScope:"system",addonId:null,access:"view"},"mqttBroker.getStatus":{capName:"mqtt-broker",capScope:"system",addonId:null,access:"view"},"mqttBroker.listBrokers":{capName:"mqtt-broker",capScope:"system",addonId:null,access:"view"},"mqttBroker.removeBroker":{capName:"mqtt-broker",capScope:"system",addonId:null,access:"delete"},"mqttBroker.startEmbeddedBroker":{capName:"mqtt-broker",capScope:"system",addonId:null,access:"create"},"mqttBroker.stopEmbeddedBroker":{capName:"mqtt-broker",capScope:"system",addonId:null,access:"create"},"mqttBroker.testConnection":{capName:"mqtt-broker",capScope:"system",addonId:null,access:"create"},"networkAccess.getEndpoint":{capName:"network-access",capScope:"system",addonId:null,access:"view"},"networkAccess.getStatus":{capName:"network-access",capScope:"system",addonId:null,access:"view"},"networkAccess.listEndpoints":{capName:"network-access",capScope:"system",addonId:null,access:"view"},"networkAccess.start":{capName:"network-access",capScope:"system",addonId:null,access:"create"},"networkAccess.stop":{capName:"network-access",capScope:"system",addonId:null,access:"create"},"networkQuality.getAllStats":{capName:"network-quality",capScope:"system",addonId:null,access:"view"},"networkQuality.getDeviceStats":{capName:"network-quality",capScope:"system",addonId:null,access:"view"},"networkQuality.reportClientStats":{capName:"network-quality",capScope:"system",addonId:null,access:"create"},"nodes.clusterAddonStatus":{capName:"nodes",capScope:"system",addonId:null,access:"view"},"nodes.deployAddon":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"nodes.executeQuery":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"nodes.getNodeAddons":{capName:"nodes",capScope:"system",addonId:null,access:"view"},"nodes.renameNode":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"nodes.restartAddon":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"nodes.restartNode":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"nodes.restartProcess":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"nodes.setProcessLogLevel":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"nodes.shutdownNode":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"nodes.topology":{capName:"nodes",capScope:"system",addonId:null,access:"view"},"nodes.undeployAddon":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"notificationOutput.send":{capName:"notification-output",capScope:"system",addonId:null,access:"create"},"notificationOutput.sendTest":{capName:"notification-output",capScope:"system",addonId:null,access:"create"},"osd.setOverlay":{capName:"osd",capScope:"device",addonId:null,access:"create"},"pipelineAnalytics.clearTracks":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"delete"},"pipelineAnalytics.getActiveTracks":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.getAudioEvents":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.getEventMedia":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.getMotionEvents":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.getObjectEvents":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.getTrack":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.getTrackMedia":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.listTracks":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineExecutor.cacheFrameInPool":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.deleteModel":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"delete"},"pipelineExecutor.deleteTemplate":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"delete"},"pipelineExecutor.detect":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.downloadModel":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.getAddonModels":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getAudioCapabilities":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getAvailableEngines":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getCapabilities":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getDefaultSteps":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getDetectionConfigSchema":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getEffectiveTuning":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getGlobalPipelineConfig":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getGlobalSteps":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getOrchestratorConfigSchema":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getReferenceAudio":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getReferenceAudioFiles":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getReferenceImage":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getSchema":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getSelectedEngine":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getVideoPipelineSteps":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.inferCached":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.killEngine":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.listLoadedEngines":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.listReferenceImages":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.listTemplates":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.reprobeEngine":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.runAudioTest":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.runPipeline":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.runPipelineBatch":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.saveTemplate":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.setVideoPipelineSteps":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.spinEngine":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.uncacheFrame":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.updateTemplate":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.assignAudio":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.assignDecoder":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.assignPipeline":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.deleteTemplate":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"delete"},"pipelineOrchestrator.getAgentLoad":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getAgentSettings":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getAudioAssignment":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getAudioAssignments":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getAudioNodeLoad":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getCameraMetrics":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getCameraSettings":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getCameraStepOverrides":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getCapabilityBindings":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getDecoderAssignment":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getDecoderAssignments":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getGlobalMetrics":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getPipelineAssignment":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getPipelineAssignments":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.listAgentSettings":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.listTemplates":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.rebalance":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.removeAgentSettings":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"delete"},"pipelineOrchestrator.resolvePipeline":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.saveTemplate":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.setAgentAddonDefaults":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.setCameraPipelineForAgent":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.setCameraStepOverride":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.setCameraStepToggle":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.setCapabilityBinding":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.unassignAudio":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.unassignDecoder":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.unassignPipeline":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.updateTemplate":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineRunner.attachCamera":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"create"},"pipelineRunner.detachCamera":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"create"},"pipelineRunner.getAllCameraMetrics":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"view"},"pipelineRunner.getCameraMetrics":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"view"},"pipelineRunner.getLocalCameras":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"view"},"pipelineRunner.getLocalLoad":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"view"},"pipelineRunner.getLocalMetrics":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"view"},"pipelineRunner.reportMotion":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"create"},"platformProbe.getCapabilities":{capName:"platform-probe",capScope:"system",addonId:null,access:"view"},"platformProbe.getHardware":{capName:"platform-probe",capScope:"system",addonId:null,access:"view"},"platformProbe.getHardwareEncoders":{capName:"platform-probe",capScope:"system",addonId:null,access:"view"},"platformProbe.refreshHardwareEncoders":{capName:"platform-probe",capScope:"system",addonId:null,access:"create"},"platformProbe.resolveHwAccel":{capName:"platform-probe",capScope:"system",addonId:null,access:"view"},"platformProbe.resolveInferenceConfig":{capName:"platform-probe",capScope:"system",addonId:null,access:"view"},"ptz.continuousMove":{capName:"ptz",capScope:"device",addonId:null,access:"create"},"ptz.getPosition":{capName:"ptz",capScope:"device",addonId:null,access:"view"},"ptz.getPresets":{capName:"ptz",capScope:"device",addonId:null,access:"view"},"ptz.goHome":{capName:"ptz",capScope:"device",addonId:null,access:"create"},"ptz.goToPreset":{capName:"ptz",capScope:"device",addonId:null,access:"create"},"ptz.move":{capName:"ptz",capScope:"device",addonId:null,access:"create"},"ptz.stop":{capName:"ptz",capScope:"device",addonId:null,access:"create"},"ptzAutotrack.getSettings":{capName:"ptz-autotrack",capScope:"device",addonId:null,access:"view"},"ptzAutotrack.getStatus":{capName:"ptz-autotrack",capScope:"device",addonId:null,access:"view"},"ptzAutotrack.setEnabled":{capName:"ptz-autotrack",capScope:"device",addonId:null,access:"create"},"ptzAutotrack.setSettings":{capName:"ptz-autotrack",capScope:"device",addonId:null,access:"create"},"reboot.reboot":{capName:"reboot",capScope:"device",addonId:null,access:"create"},"recording.getPlaybackUrl":{capName:"recording",capScope:"device",addonId:null,access:"view"},"recording.getSegments":{capName:"recording",capScope:"device",addonId:null,access:"view"},"recording.getThumbnailAt":{capName:"recording",capScope:"device",addonId:null,access:"view"},"recordingEngine.disable":{capName:"recording-engine",capScope:"system",addonId:null,access:"create"},"recordingEngine.enable":{capName:"recording-engine",capScope:"system",addonId:null,access:"create"},"recordingEngine.estimateGlobalStorage":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.estimateStorage":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getAvailability":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getConfig":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getMotionStats":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getPlaylist":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getPolicy":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getPolicyStatus":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getRetentionConfig":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getSegments":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getStatus":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getStorageUsage":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getThumbnail":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.setPolicy":{capName:"recording-engine",capScope:"system",addonId:null,access:"create"},"recordingEngine.updateConfig":{capName:"recording-engine",capScope:"system",addonId:null,access:"create"},"recordingEngine.updateRetentionConfig":{capName:"recording-engine",capScope:"system",addonId:null,access:"create"},"restreamer.getExposedResources":{capName:"restreamer",capScope:"system",addonId:null,access:"view"},"restreamer.registerDevice":{capName:"restreamer",capScope:"system",addonId:null,access:"create"},"restreamer.unregisterDevice":{capName:"restreamer",capScope:"system",addonId:null,access:"delete"},"settingsStore.count":{capName:"settings-store",capScope:"system",addonId:null,access:"view"},"settingsStore.declareCollection":{capName:"settings-store",capScope:"system",addonId:null,access:"create"},"settingsStore.delete":{capName:"settings-store",capScope:"system",addonId:null,access:"delete"},"settingsStore.get":{capName:"settings-store",capScope:"system",addonId:null,access:"view"},"settingsStore.insert":{capName:"settings-store",capScope:"system",addonId:null,access:"create"},"settingsStore.isEmpty":{capName:"settings-store",capScope:"system",addonId:null,access:"view"},"settingsStore.query":{capName:"settings-store",capScope:"system",addonId:null,access:"view"},"settingsStore.set":{capName:"settings-store",capScope:"system",addonId:null,access:"create"},"settingsStore.update":{capName:"settings-store",capScope:"system",addonId:null,access:"create"},"smtpProvider.getStatus":{capName:"smtp-provider",capScope:"system",addonId:null,access:"view"},"smtpProvider.sendEmail":{capName:"smtp-provider",capScope:"system",addonId:null,access:"create"},"smtpProvider.verify":{capName:"smtp-provider",capScope:"system",addonId:null,access:"view"},"snapshot.getSnapshot":{capName:"snapshot",capScope:"device",addonId:null,access:"view"},"snapshot.invalidateCache":{capName:"snapshot",capScope:"device",addonId:null,access:"create"},"snapshotProvider.getSnapshot":{capName:"snapshot-provider",capScope:"system",addonId:null,access:"view"},"snapshotProvider.supportsDevice":{capName:"snapshot-provider",capScope:"system",addonId:null,access:"view"},"ssoBridge.signBridgeToken":{capName:"sso-bridge",capScope:"system",addonId:null,access:"view"},"ssoBridge.verifyBridgeToken":{capName:"sso-bridge",capScope:"system",addonId:null,access:"view"},"storage.abortUpload":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.beginDownload":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.beginUpload":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.delete":{capName:"storage",capScope:"system",addonId:null,access:"delete"},"storage.deleteLocation":{capName:"storage",capScope:"system",addonId:null,access:"delete"},"storage.endDownload":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.exists":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.finalizeUpload":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.getAvailableSpace":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.getDefaultLocation":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.list":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.listLocations":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.listProviders":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.read":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.readChunk":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.resolve":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.testConfig":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.testLocation":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.upsertLocation":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.write":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.writeChunk":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storageProvider.abortUpload":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"storageProvider.beginDownload":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"storageProvider.beginUpload":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"storageProvider.delete":{capName:"storage-provider",capScope:"system",addonId:null,access:"delete"},"storageProvider.endDownload":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"storageProvider.exists":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.finalizeUpload":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"storageProvider.getAvailableSpace":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.getProviderInfo":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.list":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.read":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.readChunk":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.resolve":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.testLocation":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.write":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"storageProvider.writeChunk":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"streamBroker.assignProfile":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.getAllRtspEntries":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.getBroker":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.getBrokerStats":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.getPreBufferInfo":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.getRtspEntry":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.getRtspPort":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.getStreamUrl":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.getStreamWithCodec":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.isRtspEnabled":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.killClient":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.listAllCameraStreams":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.listAllProfileSlots":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.listClients":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.publishCameraStream":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.regenerateRtspToken":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.releaseStreamWithCodec":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.restartProfile":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.retractCameraStream":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.setPreBufferDuration":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.setRtspEnabled":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.unassignProfile":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamingEngine.getStreamUrl":{capName:"streaming-engine",capScope:"system",addonId:null,access:"view"},"streamingEngine.listStreams":{capName:"streaming-engine",capScope:"system",addonId:null,access:"view"},"streamingEngine.registerStream":{capName:"streaming-engine",capScope:"system",addonId:null,access:"create"},"streamingEngine.unregisterStream":{capName:"streaming-engine",capScope:"system",addonId:null,access:"delete"},"switch.setState":{capName:"switch",capScope:"device",addonId:null,access:"create"},"system.featureFlags":{capName:"system",capScope:"system",addonId:null,access:"view"},"system.forceRetentionCleanup":{capName:"system",capScope:"system",addonId:null,access:"create"},"system.getRetentionConfig":{capName:"system",capScope:"system",addonId:null,access:"view"},"system.health":{capName:"system",capScope:"system",addonId:null,access:"view"},"system.info":{capName:"system",capScope:"system",addonId:null,access:"view"},"system.networkAddresses":{capName:"system",capScope:"system",addonId:null,access:"view"},"system.setRetentionConfig":{capName:"system",capScope:"system",addonId:null,access:"create"},"toast.onToast":{capName:"toast",capScope:"system",addonId:null,access:"view"},"turnProvider.getTurnServers":{capName:"turn-provider",capScope:"system",addonId:null,access:"view"},"userManagement.confirmTotp":{capName:"user-management",capScope:"system",addonId:null,access:"create"},"userManagement.createApiKey":{capName:"user-management",capScope:"system",addonId:null,access:"create"},"userManagement.createScopedToken":{capName:"user-management",capScope:"system",addonId:null,access:"create"},"userManagement.createUser":{capName:"user-management",capScope:"system",addonId:null,access:"create"},"userManagement.deleteUser":{capName:"user-management",capScope:"system",addonId:null,access:"delete"},"userManagement.disableTotp":{capName:"user-management",capScope:"system",addonId:null,access:"delete"},"userManagement.getTotpStatus":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userManagement.listApiKeys":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userManagement.listScopedTokens":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userManagement.listUsers":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userManagement.resetPassword":{capName:"user-management",capScope:"system",addonId:null,access:"create"},"userManagement.revokeApiKey":{capName:"user-management",capScope:"system",addonId:null,access:"delete"},"userManagement.revokeScopedToken":{capName:"user-management",capScope:"system",addonId:null,access:"delete"},"userManagement.setupTotp":{capName:"user-management",capScope:"system",addonId:null,access:"create"},"userManagement.setUserScopes":{capName:"user-management",capScope:"system",addonId:null,access:"create"},"userManagement.updateUser":{capName:"user-management",capScope:"system",addonId:null,access:"create"},"userManagement.validateApiKey":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userManagement.validateCredentials":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userManagement.validateScopedToken":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userManagement.verifyTotp":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userPasskeys.beginAuthentication":{capName:"user-passkeys",capScope:"system",addonId:null,access:"view"},"userPasskeys.beginRegistration":{capName:"user-passkeys",capScope:"system",addonId:null,access:"create"},"userPasskeys.finishAuthentication":{capName:"user-passkeys",capScope:"system",addonId:null,access:"view"},"userPasskeys.finishRegistration":{capName:"user-passkeys",capScope:"system",addonId:null,access:"create"},"userPasskeys.listPasskeys":{capName:"user-passkeys",capScope:"system",addonId:null,access:"view"},"userPasskeys.removePasskey":{capName:"user-passkeys",capScope:"system",addonId:null,access:"delete"},"webrtc.closeSession":{capName:"webrtc",capScope:"system",addonId:null,access:"create"},"webrtc.createSession":{capName:"webrtc",capScope:"system",addonId:null,access:"create"},"webrtc.handleAnswer":{capName:"webrtc",capScope:"system",addonId:null,access:"create"},"webrtc.handleOffer":{capName:"webrtc",capScope:"system",addonId:null,access:"create"},"webrtc.hasAdaptiveBitrate":{capName:"webrtc",capScope:"system",addonId:null,access:"view"},"webrtc.registerStream":{capName:"webrtc",capScope:"system",addonId:null,access:"create"},"webrtc.supportsStream":{capName:"webrtc",capScope:"system",addonId:null,access:"view"},"webrtc.unregisterStream":{capName:"webrtc",capScope:"system",addonId:null,access:"delete"},"webrtcSession.closeSession":{capName:"webrtc-session",capScope:"device",addonId:null,access:"create"},"webrtcSession.createSession":{capName:"webrtc-session",capScope:"device",addonId:null,access:"create"},"webrtcSession.handleAnswer":{capName:"webrtc-session",capScope:"device",addonId:null,access:"create"},"webrtcSession.handleOffer":{capName:"webrtc-session",capScope:"device",addonId:null,access:"create"},"webrtcSession.hasAdaptiveBitrate":{capName:"webrtc-session",capScope:"device",addonId:null,access:"view"},"webrtcSession.listStreams":{capName:"webrtc-session",capScope:"device",addonId:null,access:"view"},"zoneAnalytics.getCameraHistory":{capName:"zone-analytics",capScope:"device",addonId:null,access:"view"},"zoneAnalytics.getCurrentSnapshot":{capName:"zone-analytics",capScope:"device",addonId:null,access:"view"},"zoneAnalytics.getUnzonedHistory":{capName:"zone-analytics",capScope:"device",addonId:null,access:"view"},"zoneAnalytics.getZoneHistory":{capName:"zone-analytics",capScope:"device",addonId:null,access:"view"},"zoneRules.listRules":{capName:"zone-rules",capScope:"device",addonId:null,access:"view"},"zoneRules.setRules":{capName:"zone-rules",capScope:"device",addonId:null,access:"create"},"zones.addZone":{capName:"zones",capScope:"device",addonId:null,access:"create"},"zones.listZones":{capName:"zones",capScope:"device",addonId:null,access:"view"},"zones.removeZone":{capName:"zones",capScope:"device",addonId:null,access:"delete"},"zones.updateZone":{capName:"zones",capScope:"device",addonId:null,access:"create"}}),wa=["addon-pages","addon-pages-source","addon-routes","addon-settings","addon-widgets","addon-widgets-source","addons","admin-ui","advanced-notifier","alerts","audio-analysis","audio-analyzer","audio-codec","audio-metrics","auth-provider","backup","brightness","camera-credentials","camera-streams","decoder","device-discovery","device-export","device-manager","device-ops","device-provider","device-state","embedding-encoder","events","integrations","intercom","local-network","log-destination","mesh-network","metrics-provider","motion","motion-detection","motion-trigger","mqtt-broker","network-access","network-quality","nodes","notification-output","osd","pipeline-analytics","pipeline-executor","pipeline-orchestrator","pipeline-runner","platform-probe","ptz","ptz-autotrack","reboot","recording","recording-engine","restreamer","settings-store","smtp-provider","snapshot","snapshot-provider","sso-bridge","storage","storage-provider","stream-broker","streaming-engine","switch","system","toast","turn-provider","user-management","user-passkeys","webrtc","webrtc-session","zone-analytics","zone-rules","zones"],Ca=["audio-analysis","audio-metrics","brightness","camera-credentials","camera-streams","device-discovery","device-ops","events","intercom","motion","motion-detection","motion-trigger","osd","pipeline-analytics","ptz","ptz-autotrack","reboot","recording","snapshot","switch","webrtc-session","zone-analytics","zone-rules","zones"],ka=["addon-pages","addon-pages-source","addon-routes","addon-settings","addon-widgets","addon-widgets-source","addons","admin-ui","advanced-notifier","alerts","audio-analyzer","audio-codec","auth-provider","backup","decoder","device-export","device-manager","device-provider","device-state","embedding-encoder","integrations","local-network","log-destination","mesh-network","metrics-provider","mqtt-broker","network-access","network-quality","nodes","notification-output","pipeline-executor","pipeline-orchestrator","pipeline-runner","platform-probe","recording-engine","restreamer","settings-store","smtp-provider","snapshot-provider","sso-bridge","storage","storage-provider","stream-broker","streaming-engine","system","toast","turn-provider","user-management","user-passkeys","webrtc"],Aa=[{id:"camera-viewer",label:"Camera viewer",description:"Read-only over every device — live streams, recordings, motion events, battery state. Combine with `allowedDevices` to restrict to specific cameras.",rows:[{type:"category",target:"device",access:["view"]}]},{id:"camera-operator",label:"Camera operator",description:"Everything `camera-viewer` does plus PTZ control, intercom, snapshots and recording start/stop. Cannot delete devices or recordings.",rows:[{type:"category",target:"device",access:["view","create"]}]},{id:"cli-deployer",label:"CLI deployer",description:"Push addons to the hub and tail their logs. Used by the `camstack` CLI on dev machines. No delete access — a stolen token cannot uninstall.",rows:[{type:"capability",target:"addons",access:["view","create"]}]},{id:"event-listener",label:"Event listener",description:"Subscribe to motion / audio events. Used by webhook bridges and Home Assistant integrations.",rows:[{type:"capability",target:"events",access:["view"]},{type:"capability",target:"motion-detection",access:["view"]},{type:"capability",target:"audio-analysis",access:["view"]}]}],ze=Object.freeze({"device-export":"device-export","mesh-network":"mesh","mqtt-broker":"broker","network-access":"ingress","smtp-provider":"email"}),Na=["device-export","mesh-network","mqtt-broker","network-access","smtp-provider"];function Pa(n){const a=[];for(const[e,o]of Object.entries(ze))o===n&&a.push(e);return a}function Da(n){try{const a=new URL(n);return!a.username&&!a.password?n:(a.username="",a.password="",a.toString())}catch{return n}}class Ea{constructor(a){this.capacity=a,this.items=Array.from({length:a})}items;head=0;tail=0;count=0;get size(){return this.count}push(a){this.items[this.tail]=a,this.tail=(this.tail+1)%this.capacity,this.count<this.capacity?this.count++:this.head=(this.head+1)%this.capacity}drain(a){const e=[],o=Math.min(a,this.count);for(let r=0;r<o;r++)e.push(this.items[this.head]),this.items[this.head]=void 0,this.head=(this.head+1)%this.capacity;return this.count-=o,e}}function Ma(n,a,e){const o={};for(const r of Object.keys(e))o[r]=p=>n.addons.custom.mutate({addonId:a,action:r,input:p});return o}i.ACCESSORY_LABEL=s.ACCESSORY_LABEL;i.APPLE_SA_TO_MACRO=s.APPLE_SA_TO_MACRO;i.AUDIO_BACKEND_CHOICES=s.AUDIO_BACKEND_CHOICES;i.AUDIO_MACRO_LABELS=s.AUDIO_MACRO_LABELS;i.AccessoriesStatusSchema=s.AccessoriesStatusSchema;i.AccessoryKind=s.AccessoryKind;i.AddBrokerInputSchema=s.AddBrokerInputSchema;i.AddonAutoUpdateSchema=s.AddonAutoUpdateSchema;i.AddonListItemSchema=s.AddonListItemSchema;i.AddonPageDeclarationSchema=s.AddonPageDeclarationSchema;i.AddonPageInfoSchema=s.AddonPageInfoSchema;i.AgentLoadSummarySchema=s.AgentLoadSummarySchema;i.AlertSchema=s.AlertSchema;i.AlertSeveritySchema=s.AlertSeveritySchema;i.AlertSourceSchema=s.AlertSourceSchema;i.AlertStatusSchema=s.AlertStatusSchema;i.ApiKeyRecordSchema=s.ApiKeyRecordSchema;i.ApiKeySummarySchema=s.ApiKeySummarySchema;i.ArchiveEntrySchema=s.ArchiveEntrySchema;i.ArchiveManifestSchema=s.ArchiveManifestSchema;i.AudioAnalysisResultSchema=s.AudioAnalysisResultSchema;i.AudioAnalysisSettingsSchema=s.AudioAnalysisSettingsSchema;i.AudioChunkInputSchema=s.AudioChunkInputSchema;i.AudioClassSummarySchema=s.AudioClassSummarySchema;i.AudioClassificationLabelSchema=s.AudioClassificationLabelSchema;i.AudioClassificationResultSchema=s.AudioClassificationResultSchema;i.AudioCodecInfoSchema=s.AudioCodecInfoSchema;i.AudioDecodeSessionConfigSchema=s.AudioDecodeSessionConfigSchema;i.AudioEncodeSessionConfigSchema=s.AudioEncodeSessionConfigSchema;i.AudioEncodedChunkSchema=s.AudioEncodedChunkSchema;i.AudioEventSchema=s.AudioEventSchema;i.AudioLevelSchema=s.AudioLevelSchema;i.AudioMetricsHistoryPointSchema=s.AudioMetricsHistoryPointSchema;i.AudioMetricsHistorySchema=s.AudioMetricsHistorySchema;i.AudioMetricsSnapshotSchema=s.AudioMetricsSnapshotSchema;i.AudioPcmChunkSchema=s.AudioPcmChunkSchema;i.AuthResultSchema=s.AuthResultSchema;i.AutoUpdateSettingsSchema=s.AutoUpdateSettingsSchema;i.AvailableIntegrationTypeSchema=s.AvailableIntegrationTypeSchema;i.BATTERY_DEVICE_PROFILE=s.BATTERY_DEVICE_PROFILE;i.BackupDestinationInfoSchema=s.BackupDestinationInfoSchema;i.BackupEntrySchema=s.BackupEntrySchema;i.BatteryStatusSchema=s.BatteryStatusSchema;i.BoundingBoxSchema=s.BoundingBoxSchema;i.BrightnessStatusSchema=s.BrightnessStatusSchema;i.BrokerAudioClientSchema=s.BrokerAudioClientSchema;i.BrokerClientsSchema=s.BrokerClientsSchema;i.BrokerConnectionDetailsSchema=s.BrokerConnectionDetailsSchema;i.BrokerDecodedClientSchema=s.BrokerDecodedClientSchema;i.BrokerInfoSchema=s.BrokerInfoSchema;i.BrokerRtspClientSchema=s.BrokerRtspClientSchema;i.BrokerStatsSchema=s.BrokerStatsSchema;i.BrokerStatusSchema=s.BrokerStatusSchema;i.CAM_PROFILE_ORDER=s.CAM_PROFILE_ORDER;i.CamProfileSchema=s.CamProfileSchema;i.CamStreamKindSchema=s.CamStreamKindSchema;i.CamStreamResolutionSchema=s.CamStreamResolutionSchema;i.CameraCredentialsSchema=s.CameraCredentialsSchema;i.CameraCredentialsStatusSchema=s.CameraCredentialsStatusSchema;i.CameraMetricsSchema=s.CameraMetricsSchema;i.CameraMetricsWithDeviceIdSchema=s.CameraMetricsWithDeviceIdSchema;i.CameraStreamSchema=s.CameraStreamSchema;i.CapScopeSchema=s.CapScopeSchema;i.CapabilityBindingsSchema=s.CapabilityBindingsSchema;i.ChargingStatus=s.ChargingStatus;i.ClientNetworkStatsSchema=s.ClientNetworkStatsSchema;i.ClusterAddonNodeDeploymentSchema=s.ClusterAddonNodeDeploymentSchema;i.ClusterAddonStatusEntrySchema=s.ClusterAddonStatusEntrySchema;i.CollectionColumnSchema=s.CollectionColumnSchema;i.CollectionIndexSchema=s.CollectionIndexSchema;i.ConfigEntrySchema=s.ConfigEntrySchema;i.ConfigSectionWithValuesSchema=s.ConfigSectionWithValuesSchema;i.ConfigTabDeclarationSchema=s.ConfigTabDeclarationSchema;i.CreateApiKeyInputSchema=s.CreateApiKeyInputSchema;i.CreateApiKeyResultSchema=s.CreateApiKeyResultSchema;i.CreateIntegrationInputSchema=s.CreateIntegrationInputSchema;i.CreateScopedTokenInputSchema=s.CreateScopedTokenInputSchema;i.CreateScopedTokenResultSchema=s.CreateScopedTokenResultSchema;i.CreateUserInputSchema=s.CreateUserInputSchema;i.CustomActionInputSchema=s.CustomActionInputSchema;i.DEFAULT_AUDIO_ANALYZER_CONFIG=s.DEFAULT_AUDIO_ANALYZER_CONFIG;i.DEFAULT_DECODER_HWACCEL_CONFIG=s.DEFAULT_DECODER_HWACCEL_CONFIG;i.DEVICE_PROFILES=s.DEVICE_PROFILES;i.DEVICE_SETTINGS_CONTRIBUTION_METHODS=s.DEVICE_SETTINGS_CONTRIBUTION_METHODS;i.DEVICE_STATUS_METHOD=s.DEVICE_STATUS_METHOD;i.DecodedFrameSchema=s.DecodedFrameSchema;i.DecoderAssignmentSchema=s.DecoderAssignmentSchema;i.DecoderSessionConfigSchema=s.DecoderSessionConfigSchema;i.DecoderStatsSchema=s.DecoderStatsSchema;i.DeleteIntegrationResultSchema=s.DeleteIntegrationResultSchema;i.DetectorOutputSchema=s.DetectorOutputSchema;i.DeviceDiscoveryStatusSchema=s.DeviceDiscoveryStatusSchema;i.DeviceExportExposeInputSchema=s.ExposeInputSchema;i.DeviceExportStatusSchema=s.DeviceExportStatusSchema;i.DeviceExportUnexposeInputSchema=s.UnexposeInputSchema;i.DeviceFeature=s.DeviceFeature;i.DeviceInfoSchema=s.DeviceInfoSchema;i.DeviceNetworkStatsSchema=s.DeviceNetworkStatsSchema;i.DeviceRole=s.DeviceRole;i.DeviceStatusSchema=s.DeviceStatusSchema;i.DeviceType=s.DeviceType;i.DiscoveredChildDeviceSchema=s.DiscoveredChildDeviceSchema;i.DiscoveredChildStatusSchema=s.DiscoveredChildStatusSchema;i.DiscoveredDeviceSchema=s.DiscoveredDeviceSchema;i.DoorbellPressEventSchema=s.DoorbellPressEventSchema;i.DoorbellStatusSchema=s.DoorbellStatusSchema;i.EmbeddingInfoSchema=s.EmbeddingInfoSchema;i.EmbeddingResultSchema=s.EmbeddingResultSchema;i.EncodedPacketSchema=s.EncodedPacketSchema;i.EnrichedWidgetMetadataSchema=s.EnrichedWidgetMetadataSchema;i.EventItemSchema=s.EventItemSchema;i.EventKindSchema=s.EventKindSchema;i.ExportSetupFieldSchema=s.ExportSetupFieldSchema;i.ExportSetupSchema=s.ExportSetupSchema;i.ExposedDeviceSchema=s.ExposedDeviceSchema;i.ExposedResourceSchema=s.ExposedResourceSchema;i.FeatureManifestSchema=s.FeatureManifestSchema;i.FeatureProbeStatusSchema=s.FeatureProbeStatusSchema;i.FrameInputSchema=s.FrameInputSchema;i.GetStreamWithCodecInputSchema=s.GetStreamWithCodecInputSchema;i.GlobalMetricsSchema=s.GlobalMetricsSchema;i.HWACCEL_OPTIONS=s.HWACCEL_OPTIONS;i.HealthStatusSchema=s.HealthStatusSchema;i.HistoryPointSchema=s.HistoryPointSchema;i.HistoryResolutionEnum=s.HistoryResolutionEnum;i.InstalledPackageSchema=s.InstalledPackageSchema;i.IntegrationLiteSchema=s.IntegrationLiteSchema;i.IntegrationWithStateSchema=s.IntegrationWithStateSchema;i.IntercomAbilitySchema=s.IntercomAbilitySchema;i.IntercomStatusSchema=s.IntercomStatusSchema;i.LocationStatSchema=s.LocationStatSchema;i.LogEntrySchema=s.LogEntrySchema;i.LogLevelSchema=s.LogLevelSchema;i.LogStreamEntrySchema=s.LogStreamEntrySchema;i.MODEL_FORMATS=s.MODEL_FORMATS;i.MediaFileSchema=s.MediaFileSchema;i.MeshPeerSchema=s.MeshPeerSchema;i.MeshStatusSchema=s.MeshStatusSchema;i.MethodAccessSchema=s.MethodAccessSchema;i.MotionAnalysisResultSchema=s.MotionAnalysisResultSchema;i.MotionEventSchema=s.MotionEventSchema;i.MotionOnMotionChangedDataSchema=s.MotionOnMotionChangedDataSchema;i.MotionRegionSchema=s.MotionRegionSchema;i.MotionSourceEnum=s.MotionSourceEnum;i.MotionSourcesSchema=s.MotionSourcesSchema;i.MotionStatusSchema=s.MotionStatusSchema;i.MotionTriggerRuntimeStateSchema=s.MotionTriggerRuntimeStateSchema;i.MotionTriggerStatusSchema=s.MotionTriggerStatusSchema;i.MqttBrokerStatusSchema=s.StatusSchema;i.NativeDetectionSchema=s.NativeDetectionSchema;i.NativeObjectClassEnum=s.NativeObjectClassEnum;i.NativeObjectDetectionStatusSchema=s.NativeObjectDetectionStatusSchema;i.NetworkAccessStatusSchema=s.NetworkAccessStatusSchema;i.NetworkAddressSchema=s.NetworkAddressSchema;i.NetworkEndpointSchema=s.NetworkEndpointSchema;i.NotificationHistoryEntrySchema=s.NotificationHistoryEntrySchema;i.NotificationRuleSchema=s.NotificationRuleSchema;i.NotificationSchema=s.NotificationSchema;i.ObjectEventSchema=s.ObjectEventSchema;i.OrchestratorMetricsSchema=s.OrchestratorMetricsSchema;i.OsdOverlayKindEnum=s.OsdOverlayKindEnum;i.OsdOverlayPatchSchema=s.OsdOverlayPatchSchema;i.OsdOverlaySchema=s.OsdOverlaySchema;i.OsdPositionEnum=s.OsdPositionEnum;i.OsdStatusSchema=s.OsdStatusSchema;i.PIPELINE_FLOW_CAPABILITY_NAMES=s.PIPELINE_FLOW_CAPABILITY_NAMES;i.PIPELINE_OWNER_CAPABILITY_NAMES=s.PIPELINE_OWNER_CAPABILITY_NAMES;i.PackageUpdateSchema=s.PackageUpdateSchema;i.PackageVersionInfoSchema=s.PackageVersionInfoSchema;i.PasskeySummarySchema=s.PasskeySummarySchema;i.PcmSampleFormatSchema=s.PcmSampleFormatSchema;i.PerScopeBreakdownSchema=s.PerScopeBreakdownSchema;i.PipelineAssignmentSchema=s.PipelineAssignmentSchema;i.PipelineDefaultStepSchema=s.PipelineDefaultStepSchema;i.PipelineEngineChoiceSchema=s.PipelineEngineChoiceSchema;i.PipelineRunResultBridge=s.PipelineRunResultBridge;i.PipelineStepInputSchema=s.PipelineStepInputSchema;i.PlaceholderReasonSchema=s.PlaceholderReasonSchema;i.PolygonPointSchema=s.PolygonPointSchema;i.ProfileSlotSchema=s.ProfileSlotSchema;i.ProfileSlotStatusSchema=s.ProfileSlotStatusSchema;i.ProviderStatusSchema=s.ProviderStatusSchema;i.PtzAutotrackRuntimeStateSchema=s.PtzAutotrackRuntimeStateSchema;i.PtzAutotrackSettingsSchema=s.PtzAutotrackSettingsSchema;i.PtzAutotrackStatusSchema=s.PtzAutotrackStatusSchema;i.PtzAutotrackTargetOptionSchema=s.PtzAutotrackTargetOptionSchema;i.PtzMoveCommandSchema=s.PtzMoveCommandSchema;i.PtzPositionSchema=s.PtzPositionSchema;i.PtzPresetSchema=s.PtzPresetSchema;i.QueryFilterSchema=s.QueryFilterSchema;i.RegisteredStreamSchema=s.RegisteredStreamSchema;i.ReportMotionInputSchema=s.ReportMotionInputSchema;i.RtpSourceSchema=s.RtpSourceSchema;i.RtspRestreamEntrySchema=s.RtspRestreamEntrySchema;i.RunnerCameraConfigSchema=s.RunnerCameraConfigSchema;i.RunnerCameraDeviceUIFields=s.RunnerCameraDeviceUIFields;i.RunnerLocalLoadSchema=s.RunnerLocalLoadSchema;i.RunnerLocalMetricsSchema=s.RunnerLocalMetricsSchema;i.STORAGE_LOCATION_CARDINALITY=s.STORAGE_LOCATION_CARDINALITY;i.ScopedTokenSchema=s.ScopedTokenSchema;i.ScopedTokenSummarySchema=s.ScopedTokenSummarySchema;i.SearchResultSchema=s.SearchResultSchema;i.SegmentSchema=s.SegmentSchema;i.SendEmailInputSchema=s.SendEmailInputSchema;i.SendEmailResultSchema=s.SendEmailResultSchema;i.SettingsPatchSchema=s.SettingsPatchSchema;i.SettingsRecordSchema=s.SettingsRecordSchema;i.SettingsSchemaWithValuesSchema=s.SettingsSchemaWithValuesSchema;i.SettingsUpdateResultSchema=s.SettingsUpdateResultSchema;i.SmtpStatusSchema=s.SmtpStatusSchema;i.SnapshotImageSchema=s.SnapshotImageSchema;i.SpatialDetectionSchema=s.SpatialDetectionSchema;i.SsoBridgeClaimsSchema=s.SsoBridgeClaimsSchema;i.StartEmbeddedInputSchema=s.StartEmbeddedInputSchema;i.StorageAbortUploadInputSchema=s.AbortUploadInputSchema;i.StorageBeginDownloadInputSchema=s.BeginDownloadInputSchema;i.StorageBeginDownloadResultSchema=s.BeginDownloadResultSchema;i.StorageBeginUploadInputSchema=s.BeginUploadInputSchema;i.StorageBeginUploadResultSchema=s.BeginUploadResultSchema;i.StorageEndDownloadInputSchema=s.EndDownloadInputSchema;i.StorageFinalizeUploadInputSchema=s.FinalizeUploadInputSchema;i.StorageLocationRefSchema=s.StorageLocationRefSchema;i.StorageLocationSchema=s.StorageLocationSchema;i.StorageLocationTypeSchema=s.StorageLocationTypeSchema;i.StorageProviderInfoSchema=s.ProviderInfoSchema;i.StorageReadChunkInputSchema=s.ReadChunkInputSchema;i.StorageTestLocationResultSchema=s.TestLocationResultSchema;i.StorageWriteChunkInputSchema=s.WriteChunkInputSchema;i.StreamFormatSchema=s.StreamFormatSchema;i.StreamInfoSchema=s.StreamInfoSchema;i.StreamNetworkStatsSchema=s.StreamNetworkStatsSchema;i.StreamSourceEntrySchema=s.StreamSourceEntrySchema;i.StreamSourceSchema=s.StreamSourceSchema;i.SwitchStatusSchema=s.SwitchStatusSchema;i.SystemMetricsSchema=s.SystemMetricsSchema;i.TestConnectionResultSchema=s.TestConnectionResultSchema;i.ToastSchema=s.ToastSchema;i.TokenScopeSchema=s.TokenScopeSchema;i.TopologyNodeSchema=s.TopologyNodeSchema;i.TopologyProcessSchema=s.TopologyProcessSchema;i.TopologyServiceSchema=s.TopologyServiceSchema;i.TrackSchema=s.TrackSchema;i.TrackStateSchema=s.TrackStateSchema;i.TrackedDetectionSchema=s.TrackedDetectionSchema;i.TurnServerSchema=s.TurnServerSchema;i.UpdateIntegrationInputSchema=s.UpdateIntegrationInputSchema;i.UpdateUserInputSchema=s.UpdateUserInputSchema;i.UserRecordSchema=s.UserRecordSchema;i.UserSummarySchema=s.UserSummarySchema;i.WELL_KNOWN_TABS=s.WELL_KNOWN_TABS;i.WELL_KNOWN_TAB_MAP=s.WELL_KNOWN_TAB_MAP;i.WebrtcStreamChoiceSchema=s.WebrtcStreamChoiceSchema;i.WebrtcStreamTargetSchema=s.WebrtcStreamTargetSchema;i.WidgetHostEnum=s.WidgetHostEnum;i.WidgetMetadataSchema=s.WidgetMetadataSchema;i.WidgetSizeEnum=s.WidgetSizeEnum;i.YAMNET_TO_MACRO=s.YAMNET_TO_MACRO;i.ZoneKindEnum=s.ZoneKindEnum;i.ZoneRuleModeEnum=s.ZoneRuleModeEnum;i.ZoneRuleSchema=s.ZoneRuleSchema;i.ZoneRuleStageEnum=s.ZoneRuleStageEnum;i.ZoneRulesArraySchema=s.ZoneRulesArraySchema;i.ZoneSchema=s.ZoneSchema;i.ZoneScopeBreakdownSchema=s.ZoneScopeBreakdownSchema;i.accessoriesCapability=s.accessoriesCapability;i.accessoryStableId=s.accessoryStableId;i.addonPagesCapability=s.addonPagesCapability;i.addonPagesSourceCapability=s.addonPagesSourceCapability;i.addonRoutesCapability=s.addonRoutesCapability;i.addonSettingsCapability=s.addonSettingsCapability;i.addonWidgetsCapability=s.addonWidgetsCapability;i.addonWidgetsSourceCapability=s.addonWidgetsSourceCapability;i.addonsCapability=s.addonsCapability;i.adminUiCapability=s.adminUiCapability;i.advancedNotifierCapability=s.advancedNotifierCapability;i.alertsCapability=s.alertsCapability;i.audioAnalysisCapability=s.audioAnalysisCapability;i.audioAnalyzerCapability=s.audioAnalyzerCapability;i.audioCodecCapability=s.audioCodecCapability;i.audioMetricsCapability=s.audioMetricsCapability;i.authProviderCapability=s.authProviderCapability;i.backupCapability=s.backupCapability;i.batteryCapability=s.batteryCapability;i.brightnessCapability=s.brightnessCapability;i.cameraCredentialsCapability=s.cameraCredentialsCapability;i.cameraStreamsCapability=s.cameraStreamsCapability;i.decoderCapability=s.decoderCapability;i.detectionPipelineCapability=s.detectionPipelineCapability;i.deviceDiscoveryCapability=s.deviceDiscoveryCapability;i.deviceExportCapability=s.deviceExportCapability;i.deviceManagerCapability=s.deviceManagerCapability;i.deviceMatchesProfile=s.deviceMatchesProfile;i.deviceOpsCapability=s.deviceOpsCapability;i.deviceProviderCapability=s.deviceProviderCapability;i.deviceStateCapability=s.deviceStateCapability;i.deviceStatusCapability=s.deviceStatusCapability;i.doorbellCapability=s.doorbellCapability;i.embeddingEncoderCapability=s.embeddingEncoderCapability;i.errMsg=s.errMsg;i.event=s.event;i.eventsCapability=s.eventsCapability;i.expandCapMethods=s.expandCapMethods;i.featureProbeCapability=s.featureProbeCapability;i.getAudioMacroClassIds=s.getAudioMacroClassIds;i.hydrateSchema=s.hydrateSchema;i.integrationsCapability=s.integrationsCapability;i.intercomCapability=s.intercomCapability;i.localNetworkCapability=s.localNetworkCapability;i.logDestinationCapability=s.logDestinationCapability;i.mapAudioLabelToMacro=s.mapAudioLabelToMacro;i.meshNetworkCapability=s.meshNetworkCapability;i.method=s.method;i.metricsProviderCapability=s.metricsProviderCapability;i.motionCapability=s.motionCapability;i.motionDetectionCapability=s.motionDetectionCapability;i.motionTriggerCapability=s.motionTriggerCapability;i.mqttBrokerCapability=s.mqttBrokerCapability;i.nativeObjectDetectionCapability=s.nativeObjectDetectionCapability;i.networkAccessCapability=s.networkAccessCapability;i.networkQualityCapability=s.networkQualityCapability;i.nodesCapability=s.nodesCapability;i.notificationOutputCapability=s.notificationOutputCapability;i.osdCapability=s.osdCapability;i.pipelineAnalyticsCapability=s.pipelineAnalyticsCapability;i.pipelineExecutorCapability=s.pipelineExecutorCapability;i.pipelineOrchestratorCapability=s.pipelineOrchestratorCapability;i.pipelineRunnerCapability=s.pipelineRunnerCapability;i.platformProbeCapability=s.platformProbeCapability;i.ptzAutotrackCapability=s.ptzAutotrackCapability;i.ptzCapability=s.ptzCapability;i.rebootCapability=s.rebootCapability;i.recordingCapability=s.recordingCapability;i.recordingEngineCapability=s.recordingEngineCapability;i.resolveDeviceProfile=s.resolveDeviceProfile;i.restreamerCapability=s.restreamerCapability;i.settingsStoreCapability=s.settingsStoreCapability;i.smtpProviderCapability=s.smtpProviderCapability;i.snapshotCapability=s.snapshotCapability;i.snapshotProviderCapability=s.snapshotProviderCapability;i.ssoBridgeCapability=s.ssoBridgeCapability;i.storageCapability=s.storageCapability;i.storageProviderCapability=s.storageProviderCapability;i.streamBrokerCapability=s.streamBrokerCapability;i.streamingEngineCapability=s.streamingEngineCapability;i.switchCapability=s.switchCapability;i.systemCapability=s.systemCapability;i.toastCapability=s.toastCapability;i.turnProviderCapability=s.turnProviderCapability;i.userManagementCapability=s.userManagementCapability;i.userPasskeysCapability=s.userPasskeysCapability;i.webrtcCapability=s.webrtcCapability;i.webrtcClientHintsSchema=s.webrtcClientHintsSchema;i.webrtcSessionCapability=s.webrtcSessionCapability;i.zoneAnalyticsCapability=s.zoneAnalyticsCapability;i.zoneRulesCapability=s.zoneRulesCapability;i.zonesCapability=s.zonesCapability;i.ALL_CAPABILITY_DEFINITIONS=fa;i.BACKEND_TO_FORMAT=Q;i.BaseAddon=Ce;i.BaseDevice=Zt;i.BaseDeviceProvider=Vt;i.CAPABILITY_NAMES=ha;i.CAPABILITY_ROUTER_KEYS=va;i.CAP_NAMES_WITH_STATUS=ba;i.CAP_PROVIDER_KIND_MAP=ze;i.COCO_80_LABELS=Ft;i.COCO_TO_MACRO=Ht;i.DEFAULT_ADDON_GROUP=be;i.DEFAULT_ADDON_PLACEMENT=Ie;i.DEFAULT_FEATURES=ht;i.DEFAULT_LOCATION_SUBDIRS=dt;i.DEFAULT_RETENTION=bt;i.DEVICE_CAP_NAMES=Ca;i.DEVICE_TYPE_INFO=$t;i.DeviceConfig=E;i.DeviceRuntimeState=$;i.DisposerChain=Ve;i.ElementConfigStore=Rt;i.EventCategory=B;i.EventSourceType=Ee;i.HF_BASE_URL=It;i.HF_REPO=Me;i.KNOWN_CAP_NAMES=wa;i.MACRO_LABELS=Wt;i.METHOD_ACCESS_MAP=Ia;i.PROVIDER_KIND_CAP_NAMES=Na;i.PYTHON_SCRIPT=qe;i.RECOGNITION_TYPES=ft;i.RUNTIME_DEFAULTS=wt;i.RUNTIME_TO_FORMAT=Te;i.ReadinessRegistry=nt;i.ReadinessTimeoutError=Ae;i.RingBuffer=Ea;i.SCOPE_PRESETS=Aa;i.STORAGE_LOCATION_TYPES=rt;i.STREAM_QUALITY_LABELS=Ne;i.SUB_DETECTION_TYPES=vt;i.SYSTEM_CAP_NAMES=ka;i.SystemMirror=ua;i.asBoolean=Nt;i.asJsonArray=Ct;i.asJsonObject=Re;i.asNumber=At;i.asString=kt;i.autoAssignProfiles=yt;i.bindAddonActions=Ma;i.buildAddonRouteProvider=tt;i.classifyStream=lt;i.classifyStreams=De;i.cosineSimilarity=Mt;i.createDeviceProxy=_e;i.createEvent=V;i.createLazyTrpcSource=J;i.createMirrorSource=Le;i.createRuntimeStateBridge=Gt;i.createSliceHandle=v;i.createSystemProxy=oa;i.customAction=ya;i.defineCustomActions=Sa;i.emitDownForOwnedCaps=ot;i.emitReadiness=we;i.evaluateZoneRules=na;i.formatForBackend=Bt;i.formatForRuntime=xt;i.getCapsByProviderKind=Pa;i.hfModelUrl=Et;i.isAgentOnlyPlacement=Qe;i.isDeployableToAgent=Ye;i.isEvent=et;i.maskUrlCredentials=Da;i.normalizeAddonInitResult=ke;i.parseCameraStreamConfig=St;i.parseJsonArray=Dt;i.parseJsonObject=Pt;i.parseJsonUnknown=Y;i.pythonScriptForBackend=Lt;i.readinessKey=W;i.requiresPython=_t;i.resolveAddonExecution=L;i.resolveAddonGroup=Je;i.resolveAddonPlacement=Xe;i.resolveAddonRuntime=Ot;i.resolveDetectionRuntime=Oe;i.resolveModelFormat=qt;i.runInferenceStep=zt;i.scopeKey=D;i.streamPixels=Pe;i.streamQualityLabel=pt;i.toDeviceSummary=Be;i.toStreamSourceEntry=mt;i.zodEntriesToConfigUI=Yt});export default Ra();