@camstack/addon-admin-ui 1.2.84 → 1.2.86
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AddLocationWizard-CNcGS2EP.js → AddLocationWizard-CVvsaNYx.js} +1 -1
- package/dist/assets/{AddonCollectionPage-SG0XXnDN.js → AddonCollectionPage-JA8tzL7q.js} +1 -1
- package/dist/assets/Addons-BOYMP0uf.js +1 -0
- package/dist/assets/{AdminTabs-Bml9sY2f.js → AdminTabs-B-UL_iuP.js} +1 -1
- package/dist/assets/{AiProfiles-Bkve7K-d.js → AiProfiles-DI31JvyZ.js} +1 -1
- package/dist/assets/{BrokerForm-CBVRdxmh.js → BrokerForm-CFTyH54D.js} +1 -1
- package/dist/assets/{Build-NxtOO0V2.js → Build-BP0Mx9FT.js} +4 -4
- package/dist/assets/{Capabilities-BROK90Se.js → Capabilities-BvxWbN6u.js} +1 -1
- package/dist/assets/{CapabilityBadges-CUituID7.js → CapabilityBadges-DjOvNnpp.js} +1 -1
- package/dist/assets/{Cluster-BrFa4n0G.js → Cluster-CsEHMgVp.js} +1 -1
- package/dist/assets/{Data-G9jbwfOG.js → Data-Bt2o6J7H.js} +1 -1
- package/dist/assets/DetectionIntelligence-CeunXPtW.js +1 -0
- package/dist/assets/{DeviceAggregateSection-SWBVkQZo.js → DeviceAggregateSection-DLNzCtMs.js} +1 -1
- package/dist/assets/DeviceDetail-DCh8ydpY.js +2 -0
- package/dist/assets/{Devices-LRxw3I54.js → Devices-fMM-N9UK.js} +1 -1
- package/dist/assets/{EmbedPlayerPage-kAcRRhLT.js → EmbedPlayerPage-D8LRITOt.js} +1 -1
- package/dist/assets/{Events-D5RYcT1o.js → Events-Drj6ybP0.js} +1 -1
- package/dist/assets/{FormBuilder-D5TM9i1v.js → FormBuilder-ChyOUw_O.js} +1 -1
- package/dist/assets/{Identity-BRBs5jpM.js → Identity-kjnupMGz.js} +1 -1
- package/dist/assets/{IntegrationDetail-Bi2LK7OU.js → IntegrationDetail-683FxnPV.js} +1 -1
- package/dist/assets/{Integrations-qkldKVTw.js → Integrations-BAa7Hx8I.js} +1 -1
- package/dist/assets/{Integrations-DGLN-Oxt.js → Integrations-Bvz5KiZt.js} +1 -1
- package/dist/assets/{Logs-gPb8NR8H.js → Logs-CPMTc4WW.js} +1 -1
- package/dist/assets/{MotionZonesSettings-DshKL17j.js → MotionZonesSettings-DhO5kuER.js} +1 -1
- package/dist/assets/{MyAccess-X5GKXeQP.js → MyAccess-C5kfikXk.js} +1 -1
- package/dist/assets/{Network-D6gOeprQ.js → Network-DBtVDYGt.js} +1 -1
- package/dist/assets/{NodeAddonsSettingsPanel-DQFTkg1Y.js → NodeAddonsSettingsPanel-BdP5wGIu.js} +1 -1
- package/dist/assets/NodeInferenceDevices-CubcmlvI.js +1 -0
- package/dist/assets/Notifications-DBH3QGle.js +1 -0
- package/dist/assets/Pipeline-DgZbCwcO.js +1 -0
- package/dist/assets/{Plates-ffuMaQFQ.js → Plates-DiVTWUKg.js} +1 -1
- package/dist/assets/{PrivacyMaskSettings-MMzNNe4D.js → PrivacyMaskSettings-zKU6VZ4G.js} +1 -1
- package/dist/assets/{ProviderIcon-DYBwyw9a.js → ProviderIcon-JxmOoO_O.js} +1 -1
- package/dist/assets/Recordings-DTGdM6Ip.js +1 -0
- package/dist/assets/{ScanNetworkModal-loGcDZBw.js → ScanNetworkModal-DkqUu2Xc.js} +1 -1
- package/dist/assets/{SceneMonitorEditor-8DCu2vt2.js → SceneMonitorEditor-DZucoVrl.js} +1 -1
- package/dist/assets/{Scenes-0XwrxsM3.js → Scenes-DMSYbhd1.js} +1 -1
- package/dist/assets/{Settings-ZUSTjvUu.js → Settings-olnTIAze.js} +1 -1
- package/dist/assets/{Showroom-6YL7UJbf.js → Showroom-CdPGD4R4.js} +1 -1
- package/dist/assets/{Terminal-ykCkur7X.js → Terminal-Ck0I64eZ.js} +3 -3
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-CmZvmCxO.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-BpY1fOVD.js} +1 -1
- package/dist/assets/{_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.js-DN3UpM8E.js → _virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.js-DX7sYWrs.js} +1 -1
- package/dist/assets/{bell-ring-B2rpaFtk.js → bell-ring-BgQsFN7F.js} +1 -1
- package/dist/assets/{boxes-DFTZfyUt.js → boxes-BnOBLNz5.js} +1 -1
- package/dist/assets/{build-cluster-graph-CLTUpmuN.js → build-cluster-graph-BwHdP82z.js} +1 -1
- package/dist/assets/circle-check-big-FvfSWrhR.js +1 -0
- package/dist/assets/{circle-x-BBjSRoMP.js → circle-x-DAqnOyA6.js} +1 -1
- package/dist/assets/clock-BpmU9WHJ.js +1 -0
- package/dist/assets/{copy-DWZC1oTP.js → copy-Dl5E5of_.js} +1 -1
- package/dist/assets/{debounced-invalidate-CwLD5Weo.js → debounced-invalidate-BIRVvqvY.js} +1 -1
- package/dist/assets/dist-C2l22cSJ.js +349 -0
- package/dist/assets/{dist-Do647wcg.js → dist-CUfLXJC3.js} +1 -1
- package/dist/assets/{download-CxGsHyPn.js → download-AfoMEWCf.js} +1 -1
- package/dist/assets/{face-bbox-BBED_iSc.js → face-bbox-BFT7iMc1.js} +1 -1
- package/dist/assets/{hard-drive-mR1KIPtt.js → hard-drive-C9zTEogy.js} +1 -1
- package/dist/assets/{hostInit-COJyRwPi.js → hostInit-Cw_l9Xfz.js} +1 -1
- package/dist/assets/{index-BppWvbJe.css → index-DM8saR4E.css} +1 -1
- package/dist/assets/index-vZPXzSPK.js +4 -0
- package/dist/assets/{key-round-Ds9BFc7u.js → key-round-sF-8oSo7.js} +1 -1
- package/dist/assets/{mf-entry-bootstrap-0-a5a42ace.js → mf-entry-bootstrap-0-8f39d7c2.js} +2 -2
- package/dist/assets/{pencil-LYk12AGI.js → pencil-DsWgW1cM.js} +1 -1
- package/dist/assets/play-BkPr3HPj.js +1 -0
- package/dist/assets/{player-overlays-BDAoS5mj.js → player-overlays-BGbLKvcn.js} +1 -1
- package/dist/assets/plus-zSkh3oEn.js +1 -0
- package/dist/assets/power-C4yi0usE.js +1 -0
- package/dist/assets/{radio-DOknapBC.js → radio-CWn4dw9L.js} +1 -1
- package/dist/assets/{refresh-cw-aVMqVAXK.js → refresh-cw-Cly4MRhi.js} +1 -1
- package/dist/assets/remoteEntry-BwhR6qpk.js +1 -0
- package/dist/assets/rotate-ccw-D0bM0VXI.js +1 -0
- package/dist/assets/rotate-cw-CNTEn7nJ.js +1 -0
- package/dist/assets/search-Bq3ZLayo.js +1 -0
- package/dist/assets/{send-CStKcKMW.js → send-yaKZ1tHd.js} +1 -1
- package/dist/assets/{server-DpQquxi2.js → server-CLOtA1S4.js} +1 -1
- package/dist/assets/square-BlSn3fsr.js +1 -0
- package/dist/assets/{square-check-big-D_32NB3x.js → square-check-big-DsiPGDCA.js} +1 -1
- package/dist/assets/src-Buv5KpAz.js +67 -0
- package/dist/assets/src-CQVcBp6b.js +349 -0
- package/dist/assets/{star-CnMUDmNT.js → star-fUCw1hyi.js} +1 -1
- package/dist/assets/{undo-2-Bu9cI3K3.js → undo-2-DXcExZt9.js} +1 -1
- package/dist/assets/{upload-DITj7pmV.js → upload-CLT-rIe6.js} +1 -1
- package/dist/assets/{use-scenes-feed-ClYTNH65.js → use-scenes-feed-CvesyXw2.js} +1 -1
- package/dist/assets/useEventInvalidation-B-Cb5-ry.js +1 -0
- package/dist/assets/{video-D3MA7ngK.js → video-CFtTGKiz.js} +1 -1
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-PnuvqzUU.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-BwIIU_83.js} +2 -2
- package/dist/assets/{wifi-CmMg3Cu0.js → wifi-Glpx3AkR.js} +1 -1
- package/dist/assets/{zap-H6dvIirs.js → zap-aTn3GS-l.js} +1 -1
- package/dist/index.html +6 -6
- package/dist/server/addon.js +174 -11
- package/package.json +1 -1
- package/dist/assets/Addons-i2kGOrOA.js +0 -1
- package/dist/assets/DetectionIntelligence-DiGPeWhN.js +0 -1
- package/dist/assets/DeviceDetail-O6xEze8u.js +0 -2
- package/dist/assets/NodeInferenceDevices-Dp-l4FwP.js +0 -1
- package/dist/assets/Notifications-D1d2Q-ix.js +0 -1
- package/dist/assets/Pipeline-DcVa4THx.js +0 -1
- package/dist/assets/Recordings-C8wX8f22.js +0 -1
- package/dist/assets/circle-check-big-BBxWSiDJ.js +0 -1
- package/dist/assets/clock-6MQBaiID.js +0 -1
- package/dist/assets/dist-DHSKR8rX.js +0 -345
- package/dist/assets/index-D8DOnspM.js +0 -4
- package/dist/assets/play-BSZQjLkZ.js +0 -1
- package/dist/assets/plus-DpCA4f3I.js +0 -1
- package/dist/assets/power-VPCWTEZu.js +0 -1
- package/dist/assets/remoteEntry-DBWzSJRP.js +0 -1
- package/dist/assets/rotate-ccw-D7VfDBtK.js +0 -1
- package/dist/assets/rotate-cw-1XMucssR.js +0 -1
- package/dist/assets/search-CcmIbGXi.js +0 -1
- package/dist/assets/square-BeUYnpBQ.js +0 -1
- package/dist/assets/src-B4-xc1-S.js +0 -345
- package/dist/assets/src-BHAm1a2j.js +0 -67
- package/dist/assets/useEventInvalidation-CYexmqD-.js +0 -1
|
@@ -1,345 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-B6qJ4svC.js","assets/rolldown-runtime-Cyuzqnbw.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{t}from"./vite-preload-helper-zJ_50EbN.js";import{A as n,C as r,D as i,E as a,F as o,M as s,N as c,O as l,P as u,S as d,T as f,_ as p,a as ee,b as te,c as ne,d as re,f as m,g as ie,h,i as ae,j as g,k as oe,l as se,m as ce,n as le,o as ue,p as _,r as de,s as fe,t as pe,u as me,v,w as y,x as b,y as x}from"./__vite-browser-external-B6qJ4svC.js";var he=function(e){return e.SystemBoot=`system.boot`,e.SystemAddonsReady=`system.addons-ready`,e.SystemRestarting=`system.restarting`,e.SystemRestartCompleted=`system.restart-completed`,e.UpdateAvailable=`update.available`,e.SystemReadyState=`system.ready-state`,e.AddonStarted=`addon.started`,e.AddonStopped=`addon.stopped`,e.AddonRestarted=`addon.restarted`,e.AddonUpdated=`addon.updated`,e.AddonInstalled=`addon.installed`,e.AddonUninstalled=`addon.uninstalled`,e.AddonCrashed=`addon.crashed`,e.AddonRunnerFailed=`addon.runner-failed`,e.AddonError=`addon.error`,e.AddonPageReady=`addon.page-ready`,e.AddonWidgetReady=`addon.widget-ready`,e.AddonLoadFailed=`addon.load-failed`,e.AddonLoadRecovered=`addon.load-recovered`,e.AddonRetryScheduled=`addon.retry-scheduled`,e.SystemLivenessFailed=`system.liveness-failed`,e.SystemLivenessRecovered=`system.liveness-recovered`,e.AddonRetryAttempting=`addon.retry-attempting`,e.DeviceRegistered=`device.registered`,e.DeviceUnregistered=`device.unregistered`,e.DeviceEnabled=`device.enabled`,e.DeviceDisabled=`device.disabled`,e.DeviceSettingsUpdated=`device.settings-updated`,e.DeviceBindingsChanged=`device.bindings-changed`,e.DeviceMetaChanged=`device.meta-changed`,e.DeviceSourceInfoChanged=`device.source-info-changed`,e.DeviceStreamsRegistered=`device.streams-registered`,e.DeviceProvisioned=`device.provisioned`,e.DeviceReady=`device.ready`,e.IntegrationEnabled=`integration.enabled`,e.IntegrationDisabled=`integration.disabled`,e.IntegrationDeleted=`integration.deleted`,e.BrokerStatusChanged=`broker.status-changed`,e.BrokerMessage=`broker.message`,e.ProviderStarted=`provider.started`,e.ProviderStopped=`provider.stopped`,e.ProcessCrashed=`process.crashed`,e.ProcessRestartScheduled=`process.restart_scheduled`,e.ProcessRestarted=`process.restarted`,e.RecordingStarted=`recording.started`,e.RecordingStopped=`recording.stopped`,e.RecordingError=`recording.error`,e.RecordingHealthDegraded=`recording.health.degraded`,e.RecordingStorageCritical=`recording.storage.critical`,e.RecordingSegmentWritten=`recording.segment.written`,e.RecordingPolicyFallback=`recording.policy.fallback`,e.RecordingRetentionCompleted=`recording.retention.completed`,e.RecordingExportProgress=`recording.export.progress`,e.RecordingExportCompleted=`recording.export.completed`,e.RecordingExportFailed=`recording.export.failed`,e.DetectionEvent=`detection.event`,e.SessionTrackNew=`session.track.new`,e.SessionTrackExpired=`session.track.expired`,e.BenchmarkProgress=`benchmark.progress`,e.PlatformProbePhase=`platform-probe.phase`,e.PipelineProgress=`pipeline.progress`,e.PipelineTrace=`pipeline.trace`,e.PipelineInferenceResult=`pipeline.inference-result`,e.PipelineCameraAssigned=`pipeline.camera-assigned`,e.PipelineCameraUnassigned=`pipeline.camera-unassigned`,e.PipelineNodeInferenceUnavailable=`pipeline.node-inference-unavailable`,e.PipelineDetectionBlind=`pipeline.detection-blind`,e.PipelineCameraUpdated=`pipeline.camera-updated`,e.PipelineIngestOwnerChanged=`pipeline.ingest-owner-changed`,e.PipelineRunnerLoadSnapshot=`pipeline.runner-load-snapshot`,e.PipelineCameraMetricsSnapshot=`pipeline.camera-metrics-snapshot`,e.StreamBrokerMetricsSnapshot=`stream-broker.metrics-snapshot`,e.StreamBrokerOnCamStreamDemand=`stream-broker.onCamStreamDemand`,e.StreamBrokerOnCamStreamIdle=`stream-broker.onCamStreamIdle`,e.StreamBrokerOnRequestStreamSourceRefresh=`stream-broker.onRequestStreamSourceRefresh`,e.StreamParamsChanged=`stream-params.changed`,e.DeviceStateChanged=`device.state-changed`,e.ZoneAnalyticsOccupancyChanged=`zone-analytics.occupancy-changed`,e.BatteryOnStatusChanged=`battery.onStatusChanged`,e.BatteryOnWakeStarted=`battery.onWakeStarted`,e.DoorbellOnPressed=`doorbell.onPressed`,e.EventEmitted=`event-emitter.event`,e.PipelineEngineMetricsSnapshot=`pipeline.engine-metrics-snapshot`,e.PipelineEngineProvisioning=`pipeline.engine-provisioning`,e.ClusterTopologySnapshot=`cluster.topology-snapshot`,e.MetricsNodeResourcesSnapshot=`metrics.node-resources-snapshot`,e.MetricsNodeProcessesSnapshot=`metrics.node-processes-snapshot`,e.CapabilityBindingChanged=`capability.binding-changed`,e.ModelDownloadProgress=`model.download.progress`,e.AgentRegistered=`agent.registered`,e.AgentUnregistered=`agent.unregistered`,e.AgentOnline=`agent.online`,e.AgentOffline=`agent.offline`,e.WorkerOnline=`worker.online`,e.WorkerOffline=`worker.offline`,e.AgentTaskDispatched=`agent.task.dispatched`,e.AgentTaskAssigned=`agent.task.assigned`,e.AgentTrpcConnected=`agent.trpc.connected`,e.AgentWsConnected=`agent.ws.connected`,e.AgentWsDisconnected=`agent.ws.disconnected`,e.AgentBackupActivated=`agent.backup.activated`,e.OrchestrationSettingsUpdated=`orchestration.settings-updated`,e.PipelineAgentHwaccelChanged=`pipeline.agent-hwaccel-changed`,e.MotionAnalysis=`detection.motion-analysis`,e.MotionZonesRaw=`detection.motion-zones-raw`,e.MotionOnMotionChanged=`motion.on-motion-changed`,e.DetectionResult=`detection.result`,e.DetectionRaw=`detection.raw`,e.DetectionCameraNative=`detection.camera-native`,e.PipelineAudioInferenceResult=`pipeline.audio-inference-result`,e.DetectionPhaseTransition=`detection.phase-transition`,e.ProviderMotion=`provider.motion`,e.ProviderDetection=`provider.detection`,e.EnrichmentEmbeddingStored=`enrichment.embedding.stored`,e.EnrichmentSceneStateChanged=`enrichment.scene.state-changed`,e.EnrichmentActivitySummary=`enrichment.activity.summary`,e.PipelineAnalyticsTrackLifecycle=`pipeline-analytics.track-lifecycle`,e.PipelineAnalyticsTrackStarted=`pipeline-analytics.track-started`,e.PipelineAnalyticsTrackEnded=`pipeline-analytics.track-ended`,e.PipelineAnalyticsDetectionEvent=`pipeline-analytics.detection-event`,e.PipelineAnalyticsFrameTracked=`pipeline-analytics.frame-tracked`,e.PipelineAnalyticsStationaryChanged=`pipeline-analytics.stationary-changed`,e.PipelineAnalyticsPackageDelivered=`pipeline-analytics.package-delivered`,e.PipelineAnalyticsPackagePickedUp=`pipeline-analytics.package-picked-up`,e.PipelineAnalyticsFaceGalleryChanged=`pipeline-analytics.face-gallery-changed`,e.PipelineAnalyticsPlateGalleryChanged=`pipeline-analytics.plate-gallery-changed`,e.FrigateLiveEvent=`frigate.live-event`,e.CameraStreamsProfileSlotsChanged=`camera-streams.onProfileSlotsChanged`,e.StreamOnline=`stream.online`,e.StreamOffline=`stream.offline`,e.NetworkTunnelStarted=`network.tunnel.started`,e.NetworkTunnelStopped=`network.tunnel.stopped`,e.LocalNetworkChanged=`network.local.changed`,e.MeshNetworkChanged=`network.mesh.changed`,e.BackupCompleted=`backup.completed`,e.BackupRestored=`backup.restored`,e.NotificationDispatched=`notification.dispatched`,e.NotificationFailed=`notification.failed`,e.DeviceUpdated=`device.updated`,e.DeviceOnline=`device.online`,e.DeviceOffline=`device.offline`,e.DeviceAwake=`device.awake`,e.DeviceSleeping=`device.sleeping`,e.RetentionCleanup=`retention.cleanup`,e.AddonsBulkUpdateProgress=`addons.bulk-update-progress`,e.AddonsJobProgress=`addons.job-progress`,e.AddonsJobLog=`addons.job-log`,e.AccessoriesChildVisibilityChanged=`accessories.onChildVisibilityChanged`,e.AccessoriesChanged=`accessories.onAccessoriesChanged`,e.ModelConvertProgress=`model-convert.progress`,e}({}),ge=[{id:`overview`,label:`Overview`,icon:`layout-dashboard`,order:-10},{id:`general`,label:`General`,icon:`settings`,order:0},{id:`image`,label:`Image`,icon:`image`,order:5},{id:`light`,label:`Light`,icon:`lightbulb`,order:7},{id:`motion`,label:`Motion`,icon:`activity`,order:10},{id:`audio`,label:`Audio`,icon:`mic`,order:12},{id:`alarms`,label:`Alarms`,icon:`bell-ring`,order:13},{id:`snapshot`,label:`Snapshot`,icon:`camera`,order:15},{id:`osd`,label:`OSD`,icon:`type`,order:18},{id:`stream-broker`,label:`Stream Broker`,icon:`radio`,order:20},{id:`streaming`,label:`Streaming`,icon:`video`,order:35},{id:`ptz`,label:`PTZ`,icon:`move`,order:40},{id:`consumables`,label:`Consumables`,icon:`recycle`,order:44},{id:`pipeline`,label:`Detection Pipeline`,icon:`cpu`,order:39},{id:`detection-pipeline`,label:`Detection pipeline`,icon:`cpu`,order:39},{id:`zones`,label:`Detection`,icon:`shapes`,order:38},{id:`analytics`,label:`Analytics`,icon:`activity`,order:37},{id:`live-stats`,label:`Live Stats`,icon:`activity`,order:39},{id:`recording`,label:`Recording`,icon:`circle-dot`,order:40},{id:`engine`,label:`Inference Engine`,icon:`zap`,order:41},{id:`scheduler`,label:`Scheduler`,icon:`list-checks`,order:42},{id:`decoder`,label:`Decoder`,icon:`film`,order:43},{id:`notifications`,label:`Notifications`,icon:`bell`,order:50},{id:`network`,label:`Network`,icon:`globe`,order:60},{id:`storage`,label:`Storage`,icon:`hard-drive`,order:70},{id:`advanced`,label:`Advanced`,icon:`wrench`,order:100}],_e=Object.fromEntries(ge.map(e=>[e.id,e]));function ve(e){return e.type===`separator`||e.type===`info`||e.type===`qr-code`||e.type===`button`||e.type===`object-array`||e.type===`widget`||e.type===`addon-action-button`||e.type===`device-action-button`}function ye(e){let t=new Map;if(typeof e!=`object`||!e)return t;let n=e.sections;if(!Array.isArray(n))return t;for(let e of n)typeof e==`object`&&e&&be(e.fields,t);return t}function be(e,t){if(Array.isArray(e))for(let n of e){if(typeof n!=`object`||!n)continue;let e=n.type;if(e===`group`){be(n.fields,t);continue}if(e===`sub-tabs`){let e=n.tabs;if(Array.isArray(e))for(let n of e)typeof n==`object`&&n&&be(n.fields,t);continue}let r=n.key;typeof r!=`string`||r.length===0||`value`in n&&t.set(r,{value:n.value,default:n.default})}}function xe(e){let t=new Map;for(let[n,r]of ye(e))t.set(n,r.value??r.default);return t}function Se(e,t){let n=ye(e).get(t);return n===void 0?void 0:n.value??n.default}function Ce(e,t){return{...e.tabs?{tabs:[...e.tabs]}:{},sections:e.sections.map(e=>({...e,fields:e.fields.map(e=>we(e,t))}))}}function we(e,t){if(ve(e))return e;if(e.type===`group`){let n=e.fields.map(e=>we(e,t));return{...e,fields:n}}if(e.type===`sub-tabs`){let n=e.tabs.map(e=>({...e,fields:e.fields.map(e=>we(e,t))}));return{...e,tabs:n}}let n=e.key,r=Object.prototype.hasOwnProperty.call(t,n)?t[n]:void 0,i=e.default;if(e.multiple){let t=Array.isArray(r)?r:r==null?[]:[r],n=e.multiple.itemDefault===void 0?i===void 0?Te(e)===`string`?``:null:i:e.multiple.itemDefault,a=Math.max(e.multiple.min,t.length),o=[];for(let e=0;e<a;e++)o.push(e<t.length?t[e]:n);return{...e,value:o}}let a=r===void 0?i===void 0?null:i:r,o=e.type===`textarea`&&e.isJson&&typeof a==`object`&&a?JSON.stringify(a,null,2):a;return{...e,value:o}}function Te(e){switch(e.type){case`text`:case`textarea`:case`password`:case`color`:case`probe`:case`timezone`:case`datetime`:return`string`;case`number`:case`slider`:return`number`;case`boolean`:return`boolean`;default:return`other`}}function Ee(e,t){return e.category===t}function De(e,t,n){return{id:typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2),timestamp:new Date,source:t,category:e,data:n}}function Oe(e,t){let n=t.ts??Date.now();e.emit(De(`system.ready-state`,{type:`capability`,id:t.capName,nodeId:t.sourceNodeId},{capName:t.capName,scope:t.scope,state:t.state,generation:t.generation,sourceNodeId:t.sourceNodeId,ts:n}))}function ke(e){let t=async()=>{let t=(await e.read())[e.key];if(t===void 0)return e.fallback;let n=e.schema.safeParse(t);return n.success?n.data:(e.onParseError?.(e.key,n.error),e.fallback)},n=async t=>{let n=e.schema.parse(t);await e.write({[e.key]:n})};return{get:t,set:n,update:async e=>{await n(e(await t()))}}}function Ae(e){if(e==null||e===``)return`hub`;let t=e.indexOf(`/`);if(t<0)return e;let n=e.slice(0,t);return n===``?`hub`:n}function je(e,t){return`${e}@${Ae(t)}`}function Me(e,t,n){return e[je(t,n)]}function Ne(e,t,n){let r={};for(let[i,a]of Object.entries(e))r[t.has(i)?je(i,n):i]=a;return r}function Pe(e,t,n){let r={};for(let[n,i]of Object.entries(e))n.includes(`@`)||t.has(n)||(r[n]=i);for(let i of t){let t=Me(e,i,n);t!==void 0&&(r[i]=t)}return r}var Fe=class{_ctx=null;_config;_readinessGeneration=typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2,14);_registeredCapNames=[];defaults;constructor(e){this.defaults=e,this._config={...e}}get autoEmitReadiness(){return!0}get ctx(){if(!this._ctx)throw Error(`${this.constructor.name}: ctx accessed before initialize()`);return this._ctx}get ctxIfReady(){return this._ctx}get config(){return this._config}async initialize(e){this._ctx=e,await this.resolveConfig();let t=await this.onInitialize();this.emitLifecycle(he.AddonStarted);let n=Le(t),r=n&&`providers`in n&&n.providers?n.providers:[];return this._registeredCapNames=r.map(e=>e.capability.name),n}postBrokerStart(){this.autoEmitReadiness&&this._registeredCapNames.length>0&&this.emitReadinessForProviders(`ready`)}async onHubReachable(){}async shutdown(){this.emitLifecycle(he.AddonStopped),this.autoEmitReadiness&&this.emitReadinessForProviders(`down`),await this.onShutdown();for(let e of this._subscriptions)e();this._subscriptions=[],this._ctx=null}async onShutdown(){}async onConfigChanged(){}field(e){return e}schema(e){return e}globalSettingsSchema(e){return null}deviceSettingsSchema(){return null}async getGlobalSettings(e,t,n){let r=this.globalSettingsSchema(t);if(!r)return{sections:[]};let i=await this.resolveGlobalStore(n,t);return Ce(r,e?{...i,...e}:i)}async resolveGlobalStore(e,t){let n=await this._ctx?.settings?.readAddonStore()??{},r=this.perNodeKeys(t),i=Ae(e??this._ctx?.kernel?.localNodeId);return r.size>0?Pe(n,r,i):n}async updateGlobalSettings(e,t){let n=this.perNodeKeys(),r=Ae(this._ctx?.kernel?.localNodeId),i=Ae(t??this._ctx?.kernel?.localNodeId),a=e,o=n.size>0?Ne(a,n,i):a;await this._ctx?.settings?.writeAddonStore(o),i===r&&(await this.resolveConfig(),await this.onConfigChanged(),this.emitLifecycle(he.AddonUpdated,{level:`global`}),this.maybeAutoRestart(e,this.globalSettingsSchema()))}_perNodeKeysCache=new Map;perNodeKeys(e){let t=e??``,n=this._perNodeKeysCache.get(t);if(n)return n;let r=this.globalSettingsSchema(e),i=new Set(r?r.sections.flatMap(e=>Ie(e.fields)):[]);return this._perNodeKeysCache.set(t,i),i}maybeAutoRestart(e,t){if(!t)return;let n=new Set;for(let e of t.sections)for(let t of e.fields)t.type===`separator`||t.type===`info`||t.requiresRestart&&n.add(t.key);if(n.size===0||!Object.keys(e).some(e=>n.has(e)))return;let r=this._ctx;if(!r)return;let i=r.id;setImmediate(()=>{r.api.addons?.restartAddon?.mutate({addonId:i}).then(()=>{r.logger.info(`addon auto-restart triggered by restart-required setting change`,{meta:{changedFields:Object.keys(e).filter(e=>n.has(e))}})}).catch(e=>{r.logger.error(`addon auto-restart failed`,{meta:{error:e instanceof Error?e.message:String(e)}})})})}async getDeviceSettings(e){let t=this.deviceSettingsSchema();return t?Ce(t,await this._ctx?.settings?.readDeviceStore(e)??{}):{sections:[]}}async updateDeviceSettings(e,t){await this._ctx?.settings?.writeDeviceStore(e,t)}_subscriptions=[];watchCapability(e,t){let n=new Set(Array.isArray(e)?e:[e]);this.subscribe({category:`system.ready-state`},e=>{let r=e.data;if(typeof r.capName!=`string`||!n.has(r.capName)||r.scope?.type!==`node`)return;let i=r.scope.nodeId;if(typeof i!=`string`||i.length===0)return;let a=r.capName;r.state===`down`?t.onDown?.(i,a):r.state===`ready`&&t.onReady?.(i,a)})}subscribe(e,t){let n=this.ctx.eventBus.subscribe(e,t);this._subscriptions.push(n)}emitLifecycle(e,t){try{let n=this._ctx;if(!n)return;n.eventBus.emit({id:`${n.id}-${Date.now()}`,timestamp:new Date,source:{type:`addon`,id:n.id,nodeId:n.kernel.localNodeId??`hub`},category:e,data:{addonId:n.id,...t}})}catch{}}emitReadinessForProviders(e){let t=this._ctx;if(!t||this._registeredCapNames.length===0)return;let n=t.kernel?.localNodeId??`hub`,r=n.includes(`/`)?n.split(`/`)[0]:n;for(let n of this._registeredCapNames)try{Oe(t.eventBus,{capName:n,scope:{type:`node`,nodeId:r},state:e,generation:this._readinessGeneration,sourceNodeId:r})}catch{}}async resolveModelsDir(){let{join:n}=await t(async()=>{let{join:t}=await import(`./__vite-browser-external-B6qJ4svC.js`).then(t=>e(t.t(),1));return{join:t}},__vite__mapDeps([0,1])),{promises:r}=await t(async()=>{let{promises:t}=await import(`./__vite-browser-external-B6qJ4svC.js`).then(t=>e(t.t(),1));return{promises:t}},__vite__mapDeps([0,1])),i=n(this.ctx.nodeDataDir,`models`);return await r.mkdir(i,{recursive:!0}),i}get capabilities(){return this.ctx.capabilities??null}async resolveConfig(){let e=await this.readAddonStoreWithRetry(),t=this.perNodeKeys(),n=Ae(this._ctx?.kernel?.localNodeId),r={...this.defaults};for(let i of Object.keys(this.defaults)){let a=t.has(i)?Me(e,i,n):e[i];if(a!=null){let e=typeof this.defaults[i];typeof a===e&&(r[i]=a)}}this._config=r}state(e,t,n){return ke({key:e,schema:t,fallback:n,read:()=>this.readAddonStoreWithRetry(),write:async e=>{await this._ctx?.settings?.writeAddonStore(e)},onParseError:(e,t)=>this._ctx?.logger?.warn?.(`durable-state: stored "${e}" failed validation — using fallback`,{meta:{addonId:this._ctx?.id,key:e,error:String(t)}})})}deviceState(e,t,n,r){return ke({key:t,schema:n,fallback:r,read:async()=>await this._ctx?.settings?.readDeviceStore(e)??{},write:async t=>{await this._ctx?.settings?.writeDeviceStore(e,t)},onParseError:(t,n)=>this._ctx?.logger?.warn?.(`durable-state: stored device ${e} "${t}" failed validation — using fallback`,{meta:{addonId:this._ctx?.id,deviceId:e,key:t,error:String(n)}})})}async readAddonStoreWithRetry(){let e=this._ctx?.settings;if(!e)return{};let t=[150,350,600,900],n;for(let r=0;r<=t.length;r++)try{return await e.readAddonStore()??{}}catch(e){n=e;let i=e instanceof Error?e.message:String(e);if(!(i.includes(`SqliteSettingsBackend not initialized`)||i.includes(`provider not available`)))throw e;if(r===t.length)break;await new Promise(e=>setTimeout(e,t[r]))}return this._ctx?.logger?.warn?.(`readAddonStore: settings-store unavailable after retries — using defaults`,{meta:{error:n instanceof Error?n.message:String(n)}}),{}}};function Ie(e){let t=[];for(let n of e){if(n.type===`group`){t.push(...Ie(n.fields));continue}if(n.type===`sub-tabs`){for(let e of n.tabs)t.push(...Ie(e.fields));continue}`perNode`in n&&n.perNode===!0&&t.push(n.key)}return t}function Le(e){if(e!=null)return Array.isArray(e)?{providers:e}:e}var Re=class{disposers=[];disposed=!1;onError;constructor(e={}){this.onError=e.onError??((e,t)=>{console.error(`[DisposerChain] disposer #${t} threw`,e)})}add(e){if(this.disposed){try{let t=e();t&&typeof t.then==`function`&&t.catch(e=>this.onError(e,-1))}catch(e){this.onError(e,-1)}return()=>void 0}return this.disposers.push(e),()=>{let t=this.disposers.indexOf(e);t>=0&&this.disposers.splice(t,1)}}get isDisposed(){return this.disposed}get size(){return this.disposers.length}async dispose(){if(this.disposed)return;this.disposed=!0;let e=this.disposers.slice().toReversed();this.disposers=[];for(let t=0;t<e.length;t++){let n=e[t];try{let e=n();e&&typeof e.then==`function`&&await e}catch(n){this.onError(n,e.length-1-t)}}}},ze=`x-camstack-dataplane-secret`,S=m([`high`,`mid`,`low`]),Be=[`high`,`mid`,`low`],Ve=m([`pull-rtsp`,`pull-rtmp`,`pull-http`,`pull-flv`,`pull-rfc4571`,`push-annexb`,`derived`]),He=i({width:a().int().positive(),height:a().int().positive()}),Ue=i({camStreamId:g().min(1),deviceId:a().int().nonnegative(),kind:Ve,url:g().optional(),codec:g().optional(),resolution:He.optional(),fps:a().positive().optional(),label:g().optional(),deviceFeatures:p(g()).optional(),autoEligible:v().optional(),metadata:n(g(),u()).optional()}),We=m([`unassigned`,`idle`,`connecting`,`streaming`,`error`]),Ge=i({deviceId:a().int().nonnegative(),profile:S,brokerId:g(),sourceCamStreamId:g().nullable(),status:We,resolution:He.optional(),codec:g().optional(),preBufferSec:a().nonnegative().optional(),errorMessage:g().optional()});function Ke(e,t){return`${e}/${t}`}function qe(e,t){return`${e}/${t}`}function Je(e){let t=e.indexOf(`/`);if(t<=0)return null;let n=e.slice(0,t),r=e.slice(t+1);if(!/^\d+$/.test(n))return null;let i=S.safeParse(r);return i.success?{deviceId:Number(n),profile:i.data}:null}function Ye(e,t){let n=[...e].filter(e=>t===void 0||e.deviceId===t).toSorted((e,t)=>Be.indexOf(e.profile)-Be.indexOf(t.profile)),r=new Set,i=[];for(let e of n){let t=e.sourceCamStreamId;t!==null&&(r.has(t)||(r.add(t),i.push(e)))}return i}var Xe=i({id:g(),label:g(),protocol:m([`rtsp`,`rtmp`,`annexb`,`http-mjpeg`,`webrtc`,`custom`]),url:g().optional(),resolution:i({width:a(),height:a()}).readonly().optional(),fps:a().optional(),bitrate:a().optional(),codec:g().optional(),profileHint:S.optional()}),Ze=i({type:g(),url:g(),videoCodec:g().optional(),audioCodec:g().optional(),metadata:n(g(),u()).readonly().optional()}),Qe=i({type:m([`video`,`audio`]),data:_(Uint8Array),pts:a(),dts:a(),keyframe:v(),codec:g()}),$e=i({data:_(Uint8Array),width:a(),height:a(),format:m([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]),timestamp:a()}),C=i({shmId:g(),slot:a().int().nonnegative(),seq:a().int().nonnegative(),width:a().int().positive(),height:a().int().positive(),format:m([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]),pts:a(),byteLength:a().int().nonnegative(),nodeId:g(),slotCount:a().int().positive()}),et=m([`rgb`,`bgr`,`yuv420`,`gray`]),tt=i({brokerId:g(),format:et,maxFps:a().positive().optional(),tag:g().optional()}),nt=i({subscriptionId:g(),maxFps:a().nonnegative()}),rt=i({data:_(Uint8Array),sampleRate:a().int().positive(),channels:a().int().positive(),timestamp:a()}),it=i({brokerId:g(),tag:g().optional()}),at=i({subscriptionId:g()}),ot=m([`idle`,`connecting`,`streaming`,`error`,`stopped`]),st=i({status:ot,inputFps:a(),decodeFps:a(),encodedSubscribers:a(),decodedSubscribers:a(),uptimeMs:a(),bitrateKbps:a(),idrIntervalMs:a(),codec:g().optional(),totalBytes:a(),packetCount:a(),rtspClients:a(),pipeClients:a(),preBufferSec:a(),preBufferMs:a(),preBufferPackets:a(),decoderNodeId:g().nullable(),audio:i({codec:g(),sampleRate:a(),channels:a(),supported:v()}).nullable().optional(),audioMuted:v().optional(),audioMutedDropped:a().optional()}),ct=i({profile:S,brokerId:g(),url:g(),mutedUrl:g(),enabled:v(),codec:g().optional(),resolution:He.optional()}),lt=class extends Error{capName;scope;waitedMs;constructor(e,t,n){super(`Timed out waiting for ${e} (${w(t)}) to become ready after ${n}ms`),this.name=`ReadinessTimeoutError`,this.capName=e,this.scope=t,this.waitedMs=n}};function ut(e,t){return`${e}|${w(t)}`}function w(e){switch(e.type){case`global`:return`global`;case`node`:return`node:${e.nodeId}`;case`device`:return`device:${e.deviceId}`}}function dt(e){switch(e){case`starting`:return 0;case`ready`:return 1;case`down`:return 2}}function ft(e,t){return e.type===t.type?e.type===`global`||t.type===`global`?!0:e.type===`node`&&t.type===`node`?e.nodeId===t.nodeId:e.type===`device`&&t.type===`device`?e.deviceId===t.deviceId:!1:!1}var pt=class{bus;sourceNodeId;logger;now;generation;verboseDeviceScopeLogs;snapshot=new Map;subscriptions=new Set;unsubscribeBus;unsubscribeAgentOffline;constructor(e){if(this.bus=e.eventBus,this.sourceNodeId=e.sourceNodeId,this.logger=e.logger,this.now=e.now??(()=>Date.now()),this.generation=e.generation??mt(),this.verboseDeviceScopeLogs=e.verboseDeviceScopeLogs??!1,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{let e=this.bus.getRecent({category:`system.ready-state`});for(let t of e)this.ingest(t.data)}catch{}}close(){this.unsubscribeBus(),this.unsubscribeAgentOffline(),this.subscriptions.clear()}get(e,t){return this.snapshot.get(ut(e,t))??null}getSnapshotForTransport(){return Array.from(this.snapshot.values())}hydrate(e){let t=this.now(),n=0;for(let r of e){let e=ut(r.capName,r.scope),i=this.snapshot.get(e)??null,a,o;if(i!==null){if(this.isLocallyAuthoritative(i))continue;let e=i.generation===r.generation;if(e&&dt(r.state)<=dt(i.state))continue;a=!e&&r.state===`ready`?i.epoch+1:i.epoch,o=Math.max(0,t-i.lastChange)}else a=1,o=0;let s={capName:r.capName,scope:r.scope,state:r.state,generation:r.generation,epoch:a,lastChange:t,sourceNodeId:r.sourceNodeId};this.snapshot.set(e,s),n++,this.logPerRecord(r.scope,`readiness: ${r.capName} (${w(r.scope)}) → ${r.state} (hydrated${i===null?``:` update`}, gen=${r.generation.slice(0,6)})`);let c={capName:r.capName,scope:r.scope,state:r.state,epoch:a,generation:r.generation,sourceNodeId:`hydrated`,ts:t,durationInPrevState:o};for(let e of this.subscriptions)if(e.capName===r.capName&&ft(e.scope,r.scope))try{e.handler(c)}catch(e){this.logger?.warn(`readiness hydrate handler threw for ${r.capName}: ${e.message??String(e)}`)}}return n}logPerRecord(e,t){if(this.logger){if(e.type===`device`){if(!this.verboseDeviceScopeLogs)return;this.logger.debug(t,{tags:{deviceId:e.deviceId}});return}this.logger.debug(t)}}isLocallyAuthoritative(e){return e.scope.type===`node`?e.scope.nodeId===this.sourceNodeId:e.sourceNodeId===this.sourceNodeId}getAll(){return new Map(this.snapshot)}emitReady(e,t){this.emitTransition(e,t,`ready`)}emitStarting(e,t){this.emitTransition(e,t,`starting`)}emitDown(e,t){this.emitTransition(e,t,`down`)}awaitReady(e,t,n={}){let r=n.timeoutMs??1/0,i=this.now();return this.get(e,t)?.state===`ready`?Promise.resolve():n.signal?.aborted?Promise.reject(n.signal.reason??Error(`aborted`)):new Promise((a,o)=>{let s=!1,c=this.onReadyState(e,t,e=>{e.state===`ready`&&(s||(s=!0,f(),a()))}),l=Number.isFinite(r)?setTimeout(()=>{s||(s=!0,f(),o(new lt(e,t,this.now()-i)))},r):null,u=setInterval(()=>{s||this.logger?.warn(`readiness: still awaiting ${e} (${w(t)}) after ${this.now()-i}ms`)},3e4);typeof u.unref==`function`&&u.unref();let d=()=>{s||(s=!0,f(),o(n.signal?.reason??Error(`aborted`)))};n.signal?.addEventListener(`abort`,d,{once:!0});function f(){c(),l!==null&&clearTimeout(l),clearInterval(u),n.signal?.removeEventListener(`abort`,d)}})}onReadyState(e,t,n){let r={capName:e,scope:t,handler:n};this.subscriptions.add(r);let i=this.get(e,t);return i!==null&&queueMicrotask(()=>{this.subscriptions.has(r)&&n({capName:e,scope:t,state:i.state,epoch:i.epoch,generation:i.generation,sourceNodeId:this.sourceNodeId,ts:i.lastChange,durationInPrevState:0})}),()=>{this.subscriptions.delete(r)}}emitTransition(e,t,n){let r=this.now();this.bus.emit(De(`system.ready-state`,{type:`capability`,id:e,nodeId:this.sourceNodeId},{capName:e,scope:t,state:n,generation:this.generation,sourceNodeId:this.sourceNodeId,ts:r}))}ingest(e){if(typeof e?.capName!=`string`||e.state!==`ready`&&e.state!==`starting`&&e.state!==`down`||typeof e.generation!=`string`||e.scope?.type!==`global`&&e.scope?.type!==`node`&&e.scope?.type!==`device`)return;let t=ut(e.capName,e.scope),n=this.snapshot.get(t)??null,r=this.now(),i;if(i=n===null?+(e.state===`ready`):n.generation!==e.generation&&e.state===`ready`?n.epoch+1:n.epoch,n!==null&&n.generation===e.generation&&n.state===e.state)return;let a=n===null?0:Math.max(0,r-n.lastChange),o={capName:e.capName,scope:e.scope,state:e.state,generation:e.generation,epoch:i,lastChange:r,sourceNodeId:e.sourceNodeId};this.snapshot.set(t,o);let s={capName:e.capName,scope:e.scope,state:e.state,epoch:i,generation:e.generation,sourceNodeId:e.sourceNodeId,ts:e.ts,durationInPrevState:a};this.logPerRecord(e.scope,`readiness: ${e.capName} (${w(e.scope)}) → ${e.state} epoch=${i} gen=${e.generation.slice(0,6)} (prev ${a}ms)`);for(let t of this.subscriptions)if(t.capName===e.capName&&ft(t.scope,e.scope))try{t.handler(s)}catch(t){this.logger?.warn(`readiness handler threw for ${e.capName}: ${t.message??String(t)}`)}}synthesizeDownForNode(e){let t=this.now();for(let[n,r]of this.snapshot){if(r.state===`down`||!(r.scope.type===`node`&&r.scope.nodeId===e||r.scope.type===`device`&&r.sourceNodeId===e))continue;let i=Math.max(0,t-r.lastChange),a={...r,state:`down`,lastChange:t};this.snapshot.set(n,a);let o={capName:r.capName,scope:r.scope,state:`down`,epoch:r.epoch,generation:r.generation,sourceNodeId:this.sourceNodeId,ts:t,durationInPrevState:i};this.logPerRecord(r.scope,`readiness: ${r.capName} (${w(r.scope)}) → down (synthesized from agent.offline ${e})`);for(let e of this.subscriptions)if(e.capName===r.capName&&ft(e.scope,r.scope))try{e.handler(o)}catch(e){this.logger?.warn(`readiness handler threw during agent.offline demux for ${r.capName}: ${e.message??String(e)}`)}}}};function mt(){return typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2,14)}function ht(e,t){for(let{capName:n,scope:r}of t)e.emitDown(n,r)}var gt=`__camstackNodePin`;function _t(e){return{context:{[gt]:vt(e)}}}function vt(e){let t=e.split(`/`)[0];return t===void 0||t.length===0?e:t}function yt(e){if(typeof e!=`object`||!e)return;let t=Reflect.get(e,gt);return typeof t==`string`?t:void 0}var bt=`session`;function xt(e){return e.mount?e.mount:e.deviceNative===!0?{kind:`device-native`}:e.mode===`collection`?{kind:`collection`}:{kind:`singleton`}}var St=i({id:g(),title:g(),description:g().optional(),style:m([`card`,`accordion`]).optional(),defaultCollapsed:v().optional(),columns:c([y(1),y(2),y(3),y(4)]).optional(),tab:g().optional(),location:m([`settings`,`top-tab`]).optional(),order:a().optional(),fields:p(ie())}),Ct=i({tabs:p(i({id:g(),label:g(),icon:g(),order:a().optional()})).optional(),sections:p(St)}).nullable(),wt={getDeviceSettingsContribution:{input:i({deviceId:a()}),output:Ct,kind:`query`,auth:`protected`},getDeviceLiveContribution:{input:i({deviceId:a()}),output:Ct,kind:`query`,auth:`protected`},applyDeviceSettingsPatch:{input:i({deviceId:a(),patch:n(g(),u())}),output:i({success:y(!0)}),kind:`mutation`,auth:`admin`}},Tt={getStatus:{input:i({deviceId:a()}),output:u().nullable(),kind:`query`,auth:`protected`}};function Et(e){let t=e.methods;return e.exposesDeviceSettings&&(t={...wt,...t}),e.status&&(t={...Tt,...t}),t}function T(e,t,n){return{input:e,output:t,kind:n?.kind??`query`,auth:n?.auth??`protected`,...n?.access===void 0?{}:{access:n.access},...n?.caller===void 0?{}:{caller:n.caller},timeoutMs:n?.timeoutMs}}function Dt(e,t,n){return{...T(e,t,n),systemOnly:!0}}function E(e){return{data:e}}function Ot(e){return e?.deviceConfig!==void 0}var kt=i({staticDir:g()}),At=i({version:g()}),jt={name:`admin-ui`,scope:`system`,mode:`singleton`,internal:!0,methods:{getStaticDir:T(h(),kt),getVersion:T(h(),At)}},D=function(e){return e.Camera=`camera`,e.Hub=`hub`,e.Light=`light`,e.Siren=`siren`,e.Switch=`switch`,e.Sensor=`sensor`,e.Thermostat=`thermostat`,e.Climate=`climate`,e.Button=`button`,e.EventEmitter=`event-emitter`,e.Update=`update`,e.Generic=`generic`,e.Notifier=`notifier`,e.Script=`script`,e.Automation=`automation`,e.Lock=`lock`,e.Cover=`cover`,e.Valve=`valve`,e.Humidifier=`humidifier`,e.WaterHeater=`water-heater`,e.Fan=`fan`,e.MediaPlayer=`media-player`,e.AlarmPanel=`alarm-panel`,e.Control=`control`,e.Presence=`presence`,e.Weather=`weather`,e.Vacuum=`vacuum`,e.LawnMower=`lawn-mower`,e.Container=`container`,e.Image=`image`,e.PetFeeder=`pet-feeder`,e}({}),Mt=function(e){return e.BatteryOperated=`battery-operated`,e.Rebootable=`rebootable`,e.Resyncable=`resyncable`,e.NativeSnapshot=`native-snapshot`,e.DoorbellButton=`doorbell-button`,e.TwoWayAudio=`two-way-audio`,e.PanTiltZoom=`pan-tilt-zoom`,e.PtzAutotrack=`ptz-autotrack`,e.MotionTrigger=`motion-trigger`,e.LightColorRgb=`light-color-rgb`,e.LightColorHsv=`light-color-hsv`,e.LightColorMired=`light-color-mired`,e.ClimateDualSetpoint=`climate-dual-setpoint`,e.ClimateHumidity=`climate-humidity`,e.ClimateFanMode=`climate-fan-mode`,e.ClimatePreset=`climate-preset`,e.ClimateSwingVertical=`climate-swing-vertical`,e.ClimateSwingHorizontal=`climate-swing-horizontal`,e.CoverPositionable=`cover-positionable`,e.CoverTilt=`cover-tilt`,e.ValvePositionable=`valve-positionable`,e.FanSpeed=`fan-speed`,e.FanPreset=`fan-preset`,e.FanDirection=`fan-direction`,e.FanOscillating=`fan-oscillating`,e.LockPinRequired=`lock-pin-required`,e.LockOpen=`lock-open`,e.MediaPlayerSeek=`media-player-seek`,e.MediaPlayerVolume=`media-player-volume`,e.MediaPlayerMute=`media-player-mute`,e.MediaPlayerShuffle=`media-player-shuffle`,e.MediaPlayerRepeat=`media-player-repeat`,e.MediaPlayerSelectSource=`media-player-select-source`,e.MediaPlayerPlayMedia=`media-player-play-media`,e.MediaPlayerNext=`media-player-next`,e.MediaPlayerPrevious=`media-player-previous`,e.MediaPlayerStop=`media-player-stop`,e.AlarmPinRequired=`alarm-pin-required`,e.PresenceGps=`presence-gps`,e.NotifierImage=`notifier-image`,e.NotifierPriority=`notifier-priority`,e.NotifierData=`notifier-data`,e.NotifierActions=`notifier-actions`,e.NotifierRecipients=`notifier-recipients`,e.ScriptVariables=`script-variables`,e.AutomationSkipCondition=`automation-skip-condition`,e.VacuumHasMap=`vacuum-has-map`,e.VacuumHasAi=`vacuum-has-ai`,e.MowerHasMap=`mower-has-map`,e.MowerHasTargetedMowing=`mower-has-targeted-mowing`,e}({}),Nt=function(e){return e.ChargingDC=`charging-dc`,e.ChargingSolar=`charging-solar`,e.NotCharging=`not-charging`,e}({}),O=function(e){return e.Siren=`siren`,e.Floodlight=`floodlight`,e.Spotlight=`spotlight`,e.PirSensor=`pir-sensor`,e.Chime=`chime`,e.Autotrack=`autotrack`,e.Nightvision=`nightvision`,e.PrivacyMask=`privacy-mask`,e.Doorbell=`doorbell`,e.BinaryHelper=`binary-helper`,e.MotionSensor=`motion-sensor`,e.ContactSensor=`contact-sensor`,e.LeakSensor=`leak-sensor`,e.SmokeSensor=`smoke-sensor`,e.COSensor=`co-sensor`,e.GasSensor=`gas-sensor`,e.TamperSensor=`tamper-sensor`,e.VibrationSensor=`vibration-sensor`,e.ConnectivitySensor=`connectivity-sensor`,e.SoundSensor=`sound-sensor`,e.BinarySensor=`binary-sensor`,e.TemperatureSensor=`temperature-sensor`,e.HumiditySensor=`humidity-sensor`,e.AmbientLightSensor=`ambient-light-sensor`,e.PressureSensor=`pressure-sensor`,e.WindSensor=`wind-sensor`,e.RainSensor=`rain-sensor`,e.UvSensor=`uv-sensor`,e.SolarRadiationSensor=`solar-radiation-sensor`,e.SoilMoistureSensor=`soil-moisture-sensor`,e.PowerSensor=`power-sensor`,e.EnergySensor=`energy-sensor`,e.VoltageSensor=`voltage-sensor`,e.CurrentSensor=`current-sensor`,e.AirQualitySensor=`air-quality-sensor`,e.BatterySensor=`battery-sensor`,e.NumericSensor=`numeric-sensor`,e.EnumSensor=`enum-sensor`,e.DateTimeSensor=`datetime-sensor`,e.GenericSensor=`generic-sensor`,e.NumericControl=`numeric-control`,e.SelectControl=`select-control`,e.TextControl=`text-control`,e.DateTimeControl=`datetime-control`,e.MobilePushNotifier=`mobile-push-notifier`,e.MessagingNotifier=`messaging-notifier`,e.EmailNotifier=`email-notifier`,e.GenericNotifier=`generic-notifier`,e}({}),Pt=i({staticDir:g()}),Ft=i({version:g()}),It={name:`viewer-ui`,scope:`system`,mode:`singleton`,internal:!0,methods:{getStaticDir:T(h(),Pt),getVersion:T(h(),Ft)}},Lt=i({id:g(),label:g(),protocol:m([`rtsp`,`rtmp`,`annexb`,`http-mjpeg`,`webrtc`,`custom`]),url:g().optional(),resolution:i({width:a(),height:a()}).optional(),fps:a().optional(),bitrate:a().optional(),codec:g().optional(),profileHint:S.optional(),sdp:g().optional()}),Rt=i({key:g(),value:u()}),zt=i({source:g(),data:n(g(),u())}),Bt={name:`device-ops`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{getStreamSources:T(i({deviceId:a()}),p(Lt)),getConfigEntries:T(i({deviceId:a()}),p(Rt)),setConfig:T(i({deviceId:a(),values:n(g(),u())}),h(),{kind:`mutation`}),runAction:T(i({deviceId:a(),action:g().min(1),input:u()}),u(),{kind:`mutation`}),removeDevice:T(i({deviceId:a()}),h(),{kind:`mutation`}),getSettingsSchema:T(i({deviceId:a()}),u().nullable()),getRawState:T(i({deviceId:a()}),zt.nullable(),{auth:`protected`})}},Vt=`device.state-changed`;function Ht(e){let t=new Map,n=new Map,r=null,i=(e,t)=>`${e}:${t}`,a=()=>{r||e.live?.onEvent&&(r=e.live.onEvent.subscribe({category:Vt},{onData:e=>{let r=e.data;if(!r||typeof r.deviceId!=`number`||typeof r.capName!=`string`)return;let a=i(r.deviceId,r.capName);t.set(a,r.slice);let o=n.get(a);if(o)for(let e of o)try{e(r.slice)}catch{}}}))},o=()=>{r&&(n.size>0||(r.unsubscribe(),r=null))};return{read(e,n){return t.get(i(e,n))},async refresh(r,a){let o=await e.deviceState.getCapSlice.query({deviceId:r,capName:a}),s=i(r,a);t.set(s,o??void 0);let c=n.get(s);if(c)for(let e of c)try{e(o??void 0)}catch{}},watch(e,t,r){let s=i(e,t),c=n.get(s);return c||(c=new Set,n.set(s,c)),c.add(r),a(),()=>{c.delete(r),c.size===0&&n.delete(s),o()}},async write(t,n,r){await e.deviceState.setCapSlice.mutate({deviceId:t,capName:n,slice:r})}}}function Ut(e,t,n){let r=(e,t)=>`${e}:${t}`;return{read(t,n){return e.get(t)?.get(n)},async refresh(){},watch(e,n,i){let a=r(e,n),o=t.get(a);return o||(o=new Set,t.set(a,o)),o.add(i),()=>{o.delete(i),o.size===0&&t.delete(a)}},async write(e,t,r){if(!n)throw Error(`createMirrorSource: write requires an api reference — pass it as the third argument when constructing the source`);await n.deviceState.setCapSlice.mutate({deviceId:e,capName:t,slice:r})}}}function k(e,t,n){let r=Wt(e)?e:Ht(e);return{get value(){return r.read(t,n)},refresh(){return r.refresh(t,n)},subscribe(e){let i=r.watch(t,n,t=>{try{e(t)}catch{}});try{e(r.read(t,n))}catch{}return r.read(t,n)===void 0&&r.refresh(t,n).catch(()=>void 0),i},async set(e){await r.write(t,n,e)},async patch(e){let i={...r.read(t,n),...e};await r.write(t,n,i)}}}function Wt(e){return typeof e.read==`function`&&typeof e.watch==`function`}function Gt(e,t,n){let r=e,i=n?.stateSource??Ht(e);function a(e,n){let r=typeof e==`object`&&e?e:{};return n===void 0?{...r,deviceId:t.deviceId}:{...r,deviceId:t.deviceId,nodeId:n}}function o(e,t,n,i,a){let o=r[e]?.[t];if(!o)throw Error(`DeviceProxy: api has no '${e}.${t}'`);let s=o;return n===`mutation`?s.mutate(i):n===`subscription`?s.subscribe(i,a):s.query(i)}function s(e,n,r,i,s,c){return o(n,r,i,a(s,t.entries.find(t=>t.capName===e)?.providerNodeId),c)}function c(e,t,n,r,i){return o(e,t,n,a(r,void 0),i)}return{deviceId:t.deviceId,binding:t,state:{airQualitySensor:k(i,t.deviceId,`air-quality-sensor`),alarmPanel:k(i,t.deviceId,`alarm-panel`),ambientLightSensor:k(i,t.deviceId,`ambient-light-sensor`),audioMetrics:k(i,t.deviceId,`audio-metrics`),automationControl:k(i,t.deviceId,`automation-control`),battery:k(i,t.deviceId,`battery`),binary:k(i,t.deviceId,`binary`),brightness:k(i,t.deviceId,`brightness`),cameraStreams:k(i,t.deviceId,`camera-streams`),carbonMonoxide:k(i,t.deviceId,`carbon-monoxide`),climateControl:k(i,t.deviceId,`climate-control`),color:k(i,t.deviceId,`color`),connectivity:k(i,t.deviceId,`connectivity`),consumables:k(i,t.deviceId,`consumables`),contact:k(i,t.deviceId,`contact`),control:k(i,t.deviceId,`control`),cover:k(i,t.deviceId,`cover`),dayNight:k(i,t.deviceId,`day-night`),deviceDiscovery:k(i,t.deviceId,`device-discovery`),deviceStatus:k(i,t.deviceId,`device-status`),doorbell:k(i,t.deviceId,`doorbell`),enumSensor:k(i,t.deviceId,`enum-sensor`),eventEmitter:k(i,t.deviceId,`event-emitter`),fanControl:k(i,t.deviceId,`fan-control`),featureProbe:k(i,t.deviceId,`feature-probe`),flood:k(i,t.deviceId,`flood`),gas:k(i,t.deviceId,`gas`),humidifier:k(i,t.deviceId,`humidifier`),humiditySensor:k(i,t.deviceId,`humidity-sensor`),image:k(i,t.deviceId,`image`),imageSettings:k(i,t.deviceId,`image-settings`),intercom:k(i,t.deviceId,`intercom`),lawnMowerControl:k(i,t.deviceId,`lawn-mower-control`),lockControl:k(i,t.deviceId,`lock-control`),mediaPlayer:k(i,t.deviceId,`media-player`),motion:k(i,t.deviceId,`motion`),motionTrigger:k(i,t.deviceId,`motion-trigger`),motionZones:k(i,t.deviceId,`motion-zones`),nativeObjectDetection:k(i,t.deviceId,`native-object-detection`),notifier:k(i,t.deviceId,`notifier`),numericSensor:k(i,t.deviceId,`numeric-sensor`),petFeeder:k(i,t.deviceId,`pet-feeder`),powerMeter:k(i,t.deviceId,`power-meter`),presence:k(i,t.deviceId,`presence`),pressureSensor:k(i,t.deviceId,`pressure-sensor`),privacyMask:k(i,t.deviceId,`privacy-mask`),ptzAutotrack:k(i,t.deviceId,`ptz-autotrack`),sceneMonitor:k(i,t.deviceId,`scene-monitor`),scriptRunner:k(i,t.deviceId,`script-runner`),smoke:k(i,t.deviceId,`smoke`),streamCatalog:k(i,t.deviceId,`stream-catalog`),streamParams:k(i,t.deviceId,`stream-params`),switch:k(i,t.deviceId,`switch`),tamper:k(i,t.deviceId,`tamper`),temperatureSensor:k(i,t.deviceId,`temperature-sensor`),update:k(i,t.deviceId,`update`),vacuumControl:k(i,t.deviceId,`vacuum-control`),valve:k(i,t.deviceId,`valve`),vibration:k(i,t.deviceId,`vibration`),waterHeater:k(i,t.deviceId,`water-heater`),weather:k(i,t.deviceId,`weather`),zoneAnalytics:k(i,t.deviceId,`zone-analytics`),zoneRules:k(i,t.deviceId,`zone-rules`),zones:k(i,t.deviceId,`zones`)},accessories:{setChildHidden:e=>s(`accessories`,`accessories`,`setChildHidden`,`mutation`,e),getStatus:e=>s(`accessories`,`accessories`,`getStatus`,`query`,e)},airQualitySensor:{getStatus:e=>s(`air-quality-sensor`,`airQualitySensor`,`getStatus`,`query`,e)},alarmPanel:{arm:e=>s(`alarm-panel`,`alarmPanel`,`arm`,`mutation`,e),disarm:e=>s(`alarm-panel`,`alarmPanel`,`disarm`,`mutation`,e),trigger:e=>s(`alarm-panel`,`alarmPanel`,`trigger`,`mutation`,e),getStatus:e=>s(`alarm-panel`,`alarmPanel`,`getStatus`,`query`,e)},ambientLightSensor:{getStatus:e=>s(`ambient-light-sensor`,`ambientLightSensor`,`getStatus`,`query`,e)},audioAnalysis:{resolveDeviceSettings:e=>s(`audio-analysis`,`audioAnalysis`,`resolveDeviceSettings`,`query`,e),getDeviceSettingsContribution:e=>s(`audio-analysis`,`audioAnalysis`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`audio-analysis`,`audioAnalysis`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`audio-analysis`,`audioAnalysis`,`applyDeviceSettingsPatch`,`mutation`,e)},audioMetrics:{getCurrentSnapshot:e=>s(`audio-metrics`,`audioMetrics`,`getCurrentSnapshot`,`query`,e),getHistory:e=>s(`audio-metrics`,`audioMetrics`,`getHistory`,`query`,e)},automationControl:{enable:e=>s(`automation-control`,`automationControl`,`enable`,`mutation`,e),disable:e=>s(`automation-control`,`automationControl`,`disable`,`mutation`,e),trigger:e=>s(`automation-control`,`automationControl`,`trigger`,`mutation`,e),getStatus:e=>s(`automation-control`,`automationControl`,`getStatus`,`query`,e)},battery:{wakeForStream:e=>s(`battery`,`battery`,`wakeForStream`,`mutation`,e),getStatus:e=>s(`battery`,`battery`,`getStatus`,`query`,e)},binary:{getStatus:e=>s(`binary`,`binary`,`getStatus`,`query`,e)},brightness:{setBrightness:e=>s(`brightness`,`brightness`,`setBrightness`,`mutation`,e),getStatus:e=>s(`brightness`,`brightness`,`getStatus`,`query`,e)},button:{press:e=>s(`button`,`button`,`press`,`mutation`,e)},cameraCredentials:{getCredentials:e=>s(`camera-credentials`,`cameraCredentials`,`getCredentials`,`query`,e),getStatus:e=>s(`camera-credentials`,`cameraCredentials`,`getStatus`,`query`,e)},cameraStreams:{getCameraStreams:e=>s(`camera-streams`,`cameraStreams`,`getCameraStreams`,`query`,e),getBrokerStreams:e=>s(`camera-streams`,`cameraStreams`,`getBrokerStreams`,`query`,e),getRtspEntries:e=>s(`camera-streams`,`cameraStreams`,`getRtspEntries`,`query`,e),getProfileRtspEntries:e=>s(`camera-streams`,`cameraStreams`,`getProfileRtspEntries`,`query`,e),pickStream:e=>s(`camera-streams`,`cameraStreams`,`pickStream`,`query`,e)},carbonMonoxide:{getStatus:e=>s(`carbon-monoxide`,`carbonMonoxide`,`getStatus`,`query`,e)},climateControl:{setMode:e=>s(`climate-control`,`climateControl`,`setMode`,`mutation`,e),setFanMode:e=>s(`climate-control`,`climateControl`,`setFanMode`,`mutation`,e),setPreset:e=>s(`climate-control`,`climateControl`,`setPreset`,`mutation`,e),setTarget:e=>s(`climate-control`,`climateControl`,`setTarget`,`mutation`,e),setTargetRange:e=>s(`climate-control`,`climateControl`,`setTargetRange`,`mutation`,e),setTargetHumidity:e=>s(`climate-control`,`climateControl`,`setTargetHumidity`,`mutation`,e),setSwingVertical:e=>s(`climate-control`,`climateControl`,`setSwingVertical`,`mutation`,e),setSwingHorizontal:e=>s(`climate-control`,`climateControl`,`setSwingHorizontal`,`mutation`,e),getStatus:e=>s(`climate-control`,`climateControl`,`getStatus`,`query`,e)},color:{setColor:e=>s(`color`,`color`,`setColor`,`mutation`,e),getStatus:e=>s(`color`,`color`,`getStatus`,`query`,e)},connectivity:{getStatus:e=>s(`connectivity`,`connectivity`,`getStatus`,`query`,e)},consumables:{reset:e=>s(`consumables`,`consumables`,`reset`,`mutation`,e),getStatus:e=>s(`consumables`,`consumables`,`getStatus`,`query`,e)},contact:{getStatus:e=>s(`contact`,`contact`,`getStatus`,`query`,e)},control:{setValue:e=>s(`control`,`control`,`setValue`,`mutation`,e),getStatus:e=>s(`control`,`control`,`getStatus`,`query`,e)},cover:{open:e=>s(`cover`,`cover`,`open`,`mutation`,e),close:e=>s(`cover`,`cover`,`close`,`mutation`,e),stop:e=>s(`cover`,`cover`,`stop`,`mutation`,e),setPosition:e=>s(`cover`,`cover`,`setPosition`,`mutation`,e),setTiltPosition:e=>s(`cover`,`cover`,`setTiltPosition`,`mutation`,e),getStatus:e=>s(`cover`,`cover`,`getStatus`,`query`,e)},dayNight:{getOptions:e=>s(`day-night`,`dayNight`,`getOptions`,`query`,e),setSettings:e=>s(`day-night`,`dayNight`,`setSettings`,`mutation`,e),getStatus:e=>s(`day-night`,`dayNight`,`getStatus`,`query`,e)},detectionPipeline:{getDeviceSettingsContribution:e=>s(`detection-pipeline`,`detectionPipeline`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`detection-pipeline`,`detectionPipeline`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`detection-pipeline`,`detectionPipeline`,`applyDeviceSettingsPatch`,`mutation`,e)},deviceDiscovery:{listDiscovered:e=>s(`device-discovery`,`deviceDiscovery`,`listDiscovered`,`query`,e),refreshDiscovery:e=>s(`device-discovery`,`deviceDiscovery`,`refreshDiscovery`,`mutation`,e),adoptDevice:e=>s(`device-discovery`,`deviceDiscovery`,`adoptDevice`,`mutation`,e),releaseDevice:e=>s(`device-discovery`,`deviceDiscovery`,`releaseDevice`,`mutation`,e),getStatus:e=>s(`device-discovery`,`deviceDiscovery`,`getStatus`,`query`,e)},deviceOps:{getStreamSources:e=>s(`device-ops`,`deviceOps`,`getStreamSources`,`query`,e),getConfigEntries:e=>s(`device-ops`,`deviceOps`,`getConfigEntries`,`query`,e),setConfig:e=>s(`device-ops`,`deviceOps`,`setConfig`,`mutation`,e),runAction:e=>s(`device-ops`,`deviceOps`,`runAction`,`mutation`,e),removeDevice:e=>s(`device-ops`,`deviceOps`,`removeDevice`,`mutation`,e),getSettingsSchema:e=>s(`device-ops`,`deviceOps`,`getSettingsSchema`,`query`,e),getRawState:e=>s(`device-ops`,`deviceOps`,`getRawState`,`query`,e)},deviceStatus:{getStatus:e=>s(`device-status`,`deviceStatus`,`getStatus`,`query`,e)},doorbell:{getStatus:e=>s(`doorbell`,`doorbell`,`getStatus`,`query`,e),getDeviceSettingsContribution:e=>s(`doorbell`,`doorbell`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`doorbell`,`doorbell`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`doorbell`,`doorbell`,`applyDeviceSettingsPatch`,`mutation`,e)},enumSensor:{getStatus:e=>s(`enum-sensor`,`enumSensor`,`getStatus`,`query`,e)},eventEmitter:{getStatus:e=>s(`event-emitter`,`eventEmitter`,`getStatus`,`query`,e)},events:{getEvents:e=>s(`events`,`events`,`getEvents`,`query`,e),getEventThumbnail:e=>s(`events`,`events`,`getEventThumbnail`,`query`,e),getEventClipUrl:e=>s(`events`,`events`,`getEventClipUrl`,`query`,e)},fanControl:{setPercentage:e=>s(`fan-control`,`fanControl`,`setPercentage`,`mutation`,e),setPreset:e=>s(`fan-control`,`fanControl`,`setPreset`,`mutation`,e),setDirection:e=>s(`fan-control`,`fanControl`,`setDirection`,`mutation`,e),setOscillating:e=>s(`fan-control`,`fanControl`,`setOscillating`,`mutation`,e),getStatus:e=>s(`fan-control`,`fanControl`,`getStatus`,`query`,e)},featureProbe:{getStatus:e=>s(`feature-probe`,`featureProbe`,`getStatus`,`query`,e)},flood:{getStatus:e=>s(`flood`,`flood`,`getStatus`,`query`,e)},gas:{getStatus:e=>s(`gas`,`gas`,`getStatus`,`query`,e)},humidifier:{setOn:e=>s(`humidifier`,`humidifier`,`setOn`,`mutation`,e),setTargetHumidity:e=>s(`humidifier`,`humidifier`,`setTargetHumidity`,`mutation`,e),setMode:e=>s(`humidifier`,`humidifier`,`setMode`,`mutation`,e),getStatus:e=>s(`humidifier`,`humidifier`,`getStatus`,`query`,e)},humiditySensor:{getStatus:e=>s(`humidity-sensor`,`humiditySensor`,`getStatus`,`query`,e)},image:{getStatus:e=>s(`image`,`image`,`getStatus`,`query`,e)},imageSettings:{getOptions:e=>s(`image-settings`,`imageSettings`,`getOptions`,`query`,e),setSettings:e=>s(`image-settings`,`imageSettings`,`setSettings`,`mutation`,e),getStatus:e=>s(`image-settings`,`imageSettings`,`getStatus`,`query`,e)},intercom:{startSession:e=>s(`intercom`,`intercom`,`startSession`,`mutation`,e),handleAnswer:e=>s(`intercom`,`intercom`,`handleAnswer`,`mutation`,e),stopSession:e=>s(`intercom`,`intercom`,`stopSession`,`mutation`,e),startTalkSession:e=>s(`intercom`,`intercom`,`startTalkSession`,`mutation`,e),pushTalkAudio:e=>s(`intercom`,`intercom`,`pushTalkAudio`,`mutation`,e),endTalkSession:e=>s(`intercom`,`intercom`,`endTalkSession`,`mutation`,e),getStatus:e=>s(`intercom`,`intercom`,`getStatus`,`query`,e)},lawnMowerControl:{startMowing:e=>s(`lawn-mower-control`,`lawnMowerControl`,`startMowing`,`mutation`,e),pause:e=>s(`lawn-mower-control`,`lawnMowerControl`,`pause`,`mutation`,e),dock:e=>s(`lawn-mower-control`,`lawnMowerControl`,`dock`,`mutation`,e),getStatus:e=>s(`lawn-mower-control`,`lawnMowerControl`,`getStatus`,`query`,e)},lockControl:{lock:e=>s(`lock-control`,`lockControl`,`lock`,`mutation`,e),unlock:e=>s(`lock-control`,`lockControl`,`unlock`,`mutation`,e),open:e=>s(`lock-control`,`lockControl`,`open`,`mutation`,e),getStatus:e=>s(`lock-control`,`lockControl`,`getStatus`,`query`,e)},mediaPlayer:{play:e=>s(`media-player`,`mediaPlayer`,`play`,`mutation`,e),pause:e=>s(`media-player`,`mediaPlayer`,`pause`,`mutation`,e),stop:e=>s(`media-player`,`mediaPlayer`,`stop`,`mutation`,e),next:e=>s(`media-player`,`mediaPlayer`,`next`,`mutation`,e),previous:e=>s(`media-player`,`mediaPlayer`,`previous`,`mutation`,e),seek:e=>s(`media-player`,`mediaPlayer`,`seek`,`mutation`,e),setVolume:e=>s(`media-player`,`mediaPlayer`,`setVolume`,`mutation`,e),setMute:e=>s(`media-player`,`mediaPlayer`,`setMute`,`mutation`,e),setShuffle:e=>s(`media-player`,`mediaPlayer`,`setShuffle`,`mutation`,e),setRepeat:e=>s(`media-player`,`mediaPlayer`,`setRepeat`,`mutation`,e),selectSource:e=>s(`media-player`,`mediaPlayer`,`selectSource`,`mutation`,e),playMedia:e=>s(`media-player`,`mediaPlayer`,`playMedia`,`mutation`,e),getStatus:e=>s(`media-player`,`mediaPlayer`,`getStatus`,`query`,e)},motion:{isDetected:e=>s(`motion`,`motion`,`isDetected`,`query`,e),getStatus:e=>s(`motion`,`motion`,`getStatus`,`query`,e)},motionDetection:{analyze:e=>s(`motion-detection`,`motionDetection`,`analyze`,`mutation`,e),removeCamera:e=>s(`motion-detection`,`motionDetection`,`removeCamera`,`mutation`,e),reset:e=>s(`motion-detection`,`motionDetection`,`reset`,`mutation`,e),getDeviceSettingsContribution:e=>s(`motion-detection`,`motionDetection`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`motion-detection`,`motionDetection`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`motion-detection`,`motionDetection`,`applyDeviceSettingsPatch`,`mutation`,e)},motionTrigger:{setMotionTrigger:e=>s(`motion-trigger`,`motionTrigger`,`setMotionTrigger`,`mutation`,e),getStatus:e=>s(`motion-trigger`,`motionTrigger`,`getStatus`,`query`,e)},motionZones:{getOptions:e=>s(`motion-zones`,`motionZones`,`getOptions`,`query`,e),setZone:e=>s(`motion-zones`,`motionZones`,`setZone`,`mutation`,e),getStatus:e=>s(`motion-zones`,`motionZones`,`getStatus`,`query`,e)},nativeObjectDetection:{setEnabled:e=>s(`native-object-detection`,`nativeObjectDetection`,`setEnabled`,`mutation`,e),getStatus:e=>s(`native-object-detection`,`nativeObjectDetection`,`getStatus`,`query`,e)},notificationRules:{listRules:e=>s(`notification-rules`,`notificationRules`,`listRules`,`query`,e),getRule:e=>s(`notification-rules`,`notificationRules`,`getRule`,`query`,e),createRule:e=>s(`notification-rules`,`notificationRules`,`createRule`,`mutation`,e),updateRule:e=>s(`notification-rules`,`notificationRules`,`updateRule`,`mutation`,e),deleteRule:e=>s(`notification-rules`,`notificationRules`,`deleteRule`,`mutation`,e),setRuleEnabled:e=>s(`notification-rules`,`notificationRules`,`setRuleEnabled`,`mutation`,e),listDeviceMutes:e=>s(`notification-rules`,`notificationRules`,`listDeviceMutes`,`query`,e),setDeviceMuted:e=>s(`notification-rules`,`notificationRules`,`setDeviceMuted`,`mutation`,e),testRule:e=>s(`notification-rules`,`notificationRules`,`testRule`,`mutation`,e),getConditionCatalog:e=>s(`notification-rules`,`notificationRules`,`getConditionCatalog`,`query`,e),getHistory:e=>s(`notification-rules`,`notificationRules`,`getHistory`,`query`,e),listSnoozes:e=>s(`notification-rules`,`notificationRules`,`listSnoozes`,`query`,e),createSnooze:e=>s(`notification-rules`,`notificationRules`,`createSnooze`,`mutation`,e),cancelSnooze:e=>s(`notification-rules`,`notificationRules`,`cancelSnooze`,`mutation`,e),getAlarmConfig:e=>s(`notification-rules`,`notificationRules`,`getAlarmConfig`,`query`,e),setAlarmConfig:e=>s(`notification-rules`,`notificationRules`,`setAlarmConfig`,`mutation`,e)},notifier:{send:e=>s(`notifier`,`notifier`,`send`,`mutation`,e),cancel:e=>s(`notifier`,`notifier`,`cancel`,`mutation`,e),getStatus:e=>s(`notifier`,`notifier`,`getStatus`,`query`,e)},numericSensor:{getStatus:e=>s(`numeric-sensor`,`numericSensor`,`getStatus`,`query`,e)},osd:{setOverlay:e=>s(`osd`,`osd`,`setOverlay`,`mutation`,e),getStatus:e=>s(`osd`,`osd`,`getStatus`,`query`,e)},petFeeder:{feed:e=>s(`pet-feeder`,`petFeeder`,`feed`,`mutation`,e),cancelFeed:e=>s(`pet-feeder`,`petFeeder`,`cancelFeed`,`mutation`,e),resetDesiccant:e=>s(`pet-feeder`,`petFeeder`,`resetDesiccant`,`mutation`,e),markFoodReplenished:e=>s(`pet-feeder`,`petFeeder`,`markFoodReplenished`,`mutation`,e),callPet:e=>s(`pet-feeder`,`petFeeder`,`callPet`,`mutation`,e),playSound:e=>s(`pet-feeder`,`petFeeder`,`playSound`,`mutation`,e),setChildLock:e=>s(`pet-feeder`,`petFeeder`,`setChildLock`,`mutation`,e),setIndicatorLight:e=>s(`pet-feeder`,`petFeeder`,`setIndicatorLight`,`mutation`,e),setFeedSound:e=>s(`pet-feeder`,`petFeeder`,`setFeedSound`,`mutation`,e),setVolume:e=>s(`pet-feeder`,`petFeeder`,`setVolume`,`mutation`,e),getStatus:e=>s(`pet-feeder`,`petFeeder`,`getStatus`,`query`,e)},pipelineAnalytics:{getActiveTracks:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getActiveTracks`,`query`,e),getTrack:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getTrack`,`query`,e),listTracks:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listTracks`,`query`,e),listRecentTracks:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listRecentTracks`,`query`,e),clearTracks:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`clearTracks`,`mutation`,e),getMotionEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getMotionEvents`,`query`,e),getObjectEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getObjectEvents`,`query`,e),getAudioEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getAudioEvents`,`query`,e),listEventKinds:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listEventKinds`,`query`,e),listEventKindsBatch:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listEventKindsBatch`,`query`,e),getSensorEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getSensorEvents`,`query`,e),getKeyEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getKeyEvents`,`query`,e),getEventDensity:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getEventDensity`,`query`,e),pruneEventsBefore:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`pruneEventsBefore`,`mutation`,e),pruneTracksBefore:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`pruneTracksBefore`,`mutation`,e),wipeAllAnalytics:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`wipeAllAnalytics`,`mutation`,e),reconcileFromDisk:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`reconcileFromDisk`,`mutation`,e),deleteTracks:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`deleteTracks`,`mutation`,e),setTrackFlags:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`setTrackFlags`,`mutation`,e),getEventStoreFootprint:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getEventStoreFootprint`,`query`,e),pruneEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`pruneEvents`,`mutation`,e),deleteDeviceEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`deleteDeviceEvents`,`mutation`,e),pauseForStorageMigration:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`pauseForStorageMigration`,`mutation`,e),resumeForStorageMigration:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`resumeForStorageMigration`,`mutation`,e),refreshStorageLocationsForMigration:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`refreshStorageLocationsForMigration`,`mutation`,e),startStorageMigrationMove:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`startStorageMigrationMove`,`mutation`,e),getStorageMigrationMoveStatus:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getStorageMigrationMoveStatus`,`query`,e),cancelStorageMigrationMove:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`cancelStorageMigrationMove`,`mutation`,e),listOpsLog:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listOpsLog`,`query`,e),getTrainingExportSummary:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getTrainingExportSummary`,`query`,e),getTrainingExportUrl:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getTrainingExportUrl`,`query`,e),listRetrainStaging:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listRetrainStaging`,`query`,e),listRetrainFrames:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listRetrainFrames`,`query`,e),selectRetrainFrames:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`selectRetrainFrames`,`mutation`,e),deselectRetrainFrame:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`deselectRetrainFrame`,`mutation`,e),getRetrainFrameImage:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getRetrainFrameImage`,`query`,e),proposeRetrainAnnotations:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`proposeRetrainAnnotations`,`mutation`,e),listRetrainAnnotations:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listRetrainAnnotations`,`query`,e),saveRetrainAnnotations:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`saveRetrainAnnotations`,`mutation`,e),completeRetrainTrack:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`completeRetrainTrack`,`mutation`,e),restageRetrainTrack:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`restageRetrainTrack`,`mutation`,e),getRetrainExportUrl:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getRetrainExportUrl`,`query`,e),getEventMedia:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getEventMedia`,`query`,e),getTrackMedia:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getTrackMedia`,`query`,e),listTrackMedia:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listTrackMedia`,`query`,e),searchObjectEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`searchObjectEvents`,`query`,e),wipeObjectEmbeddings:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`wipeObjectEmbeddings`,`mutation`,e),rebuildObjectEmbeddings:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`rebuildObjectEmbeddings`,`mutation`,e),getObjectEmbeddingRebuildStatus:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getObjectEmbeddingRebuildStatus`,`query`,e),getDeviceSettingsContribution:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`applyDeviceSettingsPatch`,`mutation`,e)},powerMeter:{getStatus:e=>s(`power-meter`,`powerMeter`,`getStatus`,`query`,e)},presence:{getStatus:e=>s(`presence`,`presence`,`getStatus`,`query`,e)},pressureSensor:{getStatus:e=>s(`pressure-sensor`,`pressureSensor`,`getStatus`,`query`,e)},privacyMask:{getOptions:e=>s(`privacy-mask`,`privacyMask`,`getOptions`,`query`,e),setMask:e=>s(`privacy-mask`,`privacyMask`,`setMask`,`mutation`,e),setAudioEnabled:e=>s(`privacy-mask`,`privacyMask`,`setAudioEnabled`,`mutation`,e),getStatus:e=>s(`privacy-mask`,`privacyMask`,`getStatus`,`query`,e)},ptz:{move:e=>s(`ptz`,`ptz`,`move`,`mutation`,e),continuousMove:e=>s(`ptz`,`ptz`,`continuousMove`,`mutation`,e),stop:e=>s(`ptz`,`ptz`,`stop`,`mutation`,e),getPresets:e=>s(`ptz`,`ptz`,`getPresets`,`query`,e),goToPreset:e=>s(`ptz`,`ptz`,`goToPreset`,`mutation`,e),savePreset:e=>s(`ptz`,`ptz`,`savePreset`,`mutation`,e),deletePreset:e=>s(`ptz`,`ptz`,`deletePreset`,`mutation`,e),getOptions:e=>s(`ptz`,`ptz`,`getOptions`,`query`,e),goHome:e=>s(`ptz`,`ptz`,`goHome`,`mutation`,e),getPosition:e=>s(`ptz`,`ptz`,`getPosition`,`query`,e),setAutofocus:e=>s(`ptz`,`ptz`,`setAutofocus`,`mutation`,e),getStatus:e=>s(`ptz`,`ptz`,`getStatus`,`query`,e)},ptzAutotrack:{getStatus:e=>s(`ptz-autotrack`,`ptzAutotrack`,`getStatus`,`query`,e),setEnabled:e=>s(`ptz-autotrack`,`ptzAutotrack`,`setEnabled`,`mutation`,e),getSettings:e=>s(`ptz-autotrack`,`ptzAutotrack`,`getSettings`,`query`,e),setSettings:e=>s(`ptz-autotrack`,`ptzAutotrack`,`setSettings`,`mutation`,e)},reboot:{reboot:e=>s(`reboot`,`reboot`,`reboot`,`mutation`,e)},sceneMonitor:{listScenes:e=>s(`scene-monitor`,`sceneMonitor`,`listScenes`,`query`,e),createScene:e=>s(`scene-monitor`,`sceneMonitor`,`createScene`,`mutation`,e),updateScene:e=>s(`scene-monitor`,`sceneMonitor`,`updateScene`,`mutation`,e),deleteScene:e=>s(`scene-monitor`,`sceneMonitor`,`deleteScene`,`mutation`,e),captureReference:e=>s(`scene-monitor`,`sceneMonitor`,`captureReference`,`mutation`,e),deleteReference:e=>s(`scene-monitor`,`sceneMonitor`,`deleteReference`,`mutation`,e),recheckNow:e=>s(`scene-monitor`,`sceneMonitor`,`recheckNow`,`mutation`,e),resetScene:e=>s(`scene-monitor`,`sceneMonitor`,`resetScene`,`mutation`,e),getStatus:e=>s(`scene-monitor`,`sceneMonitor`,`getStatus`,`query`,e)},scriptRunner:{run:e=>s(`script-runner`,`scriptRunner`,`run`,`mutation`,e),stop:e=>s(`script-runner`,`scriptRunner`,`stop`,`mutation`,e),getStatus:e=>s(`script-runner`,`scriptRunner`,`getStatus`,`query`,e)},smoke:{getStatus:e=>s(`smoke`,`smoke`,`getStatus`,`query`,e)},snapshot:{getSnapshot:e=>s(`snapshot`,`snapshot`,`getSnapshot`,`query`,e),invalidateCache:e=>s(`snapshot`,`snapshot`,`invalidateCache`,`mutation`,e),getSnapshotOverview:e=>s(`snapshot`,`snapshot`,`getSnapshotOverview`,`query`,e),getDebugState:e=>s(`snapshot`,`snapshot`,`getDebugState`,`query`,e),getSnapshotLinks:e=>s(`snapshot`,`snapshot`,`getSnapshotLinks`,`query`,e),getStatus:e=>s(`snapshot`,`snapshot`,`getStatus`,`query`,e),getDeviceSettingsContribution:e=>s(`snapshot`,`snapshot`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`snapshot`,`snapshot`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`snapshot`,`snapshot`,`applyDeviceSettingsPatch`,`mutation`,e)},streamCatalog:{getCatalog:e=>s(`stream-catalog`,`streamCatalog`,`getCatalog`,`query`,e)},streamParams:{getOptions:e=>s(`stream-params`,`streamParams`,`getOptions`,`query`,e),setProfile:e=>s(`stream-params`,`streamParams`,`setProfile`,`mutation`,e),getConfigSchema:e=>s(`stream-params`,`streamParams`,`getConfigSchema`,`query`,e),getStatus:e=>s(`stream-params`,`streamParams`,`getStatus`,`query`,e)},switch:{setState:e=>s(`switch`,`switch`,`setState`,`mutation`,e),getStatus:e=>s(`switch`,`switch`,`getStatus`,`query`,e)},tamper:{getStatus:e=>s(`tamper`,`tamper`,`getStatus`,`query`,e)},temperatureSensor:{getStatus:e=>s(`temperature-sensor`,`temperatureSensor`,`getStatus`,`query`,e)},update:{installUpdate:e=>s(`update`,`update`,`installUpdate`,`mutation`,e),getStatus:e=>s(`update`,`update`,`getStatus`,`query`,e)},vacuumControl:{start:e=>s(`vacuum-control`,`vacuumControl`,`start`,`mutation`,e),pause:e=>s(`vacuum-control`,`vacuumControl`,`pause`,`mutation`,e),stop:e=>s(`vacuum-control`,`vacuumControl`,`stop`,`mutation`,e),returnToBase:e=>s(`vacuum-control`,`vacuumControl`,`returnToBase`,`mutation`,e),locate:e=>s(`vacuum-control`,`vacuumControl`,`locate`,`mutation`,e),setFanSpeed:e=>s(`vacuum-control`,`vacuumControl`,`setFanSpeed`,`mutation`,e),getStatus:e=>s(`vacuum-control`,`vacuumControl`,`getStatus`,`query`,e)},valve:{open:e=>s(`valve`,`valve`,`open`,`mutation`,e),close:e=>s(`valve`,`valve`,`close`,`mutation`,e),stop:e=>s(`valve`,`valve`,`stop`,`mutation`,e),setPosition:e=>s(`valve`,`valve`,`setPosition`,`mutation`,e),getStatus:e=>s(`valve`,`valve`,`getStatus`,`query`,e)},vibration:{getStatus:e=>s(`vibration`,`vibration`,`getStatus`,`query`,e)},videoclips:{listClips:e=>s(`videoclips`,`videoclips`,`listClips`,`query`,e),getClipPlayback:e=>s(`videoclips`,`videoclips`,`getClipPlayback`,`query`,e)},waterHeater:{setTargetTemp:e=>s(`water-heater`,`waterHeater`,`setTargetTemp`,`mutation`,e),setOperationMode:e=>s(`water-heater`,`waterHeater`,`setOperationMode`,`mutation`,e),setAway:e=>s(`water-heater`,`waterHeater`,`setAway`,`mutation`,e),getStatus:e=>s(`water-heater`,`waterHeater`,`getStatus`,`query`,e)},weather:{getStatus:e=>s(`weather`,`weather`,`getStatus`,`query`,e)},webrtcSession:{listStreams:e=>s(`webrtc-session`,`webrtcSession`,`listStreams`,`query`,e),createSession:e=>s(`webrtc-session`,`webrtcSession`,`createSession`,`mutation`,e),handleOffer:e=>s(`webrtc-session`,`webrtcSession`,`handleOffer`,`mutation`,e),handleAnswer:e=>s(`webrtc-session`,`webrtcSession`,`handleAnswer`,`mutation`,e),addIceCandidate:e=>s(`webrtc-session`,`webrtcSession`,`addIceCandidate`,`mutation`,e),getIceCandidates:e=>s(`webrtc-session`,`webrtcSession`,`getIceCandidates`,`query`,e),closeSession:e=>s(`webrtc-session`,`webrtcSession`,`closeSession`,`mutation`,e),hasAdaptiveBitrate:e=>s(`webrtc-session`,`webrtcSession`,`hasAdaptiveBitrate`,`query`,e),getSessionState:e=>s(`webrtc-session`,`webrtcSession`,`getSessionState`,`query`,e)},zoneAnalytics:{getCurrentSnapshot:e=>s(`zone-analytics`,`zoneAnalytics`,`getCurrentSnapshot`,`query`,e),getZoneHistory:e=>s(`zone-analytics`,`zoneAnalytics`,`getZoneHistory`,`query`,e),getCameraHistory:e=>s(`zone-analytics`,`zoneAnalytics`,`getCameraHistory`,`query`,e),getUnzonedHistory:e=>s(`zone-analytics`,`zoneAnalytics`,`getUnzonedHistory`,`query`,e)},zoneRules:{listRules:e=>s(`zone-rules`,`zoneRules`,`listRules`,`query`,e),setRules:e=>s(`zone-rules`,`zoneRules`,`setRules`,`mutation`,e)},zones:{listZones:e=>s(`zones`,`zones`,`listZones`,`query`,e),addZone:e=>s(`zones`,`zones`,`addZone`,`mutation`,e),removeZone:e=>s(`zones`,`zones`,`removeZone`,`mutation`,e),updateZone:e=>s(`zones`,`zones`,`updateZone`,`mutation`,e)},addonSettings:{getDeviceSettings:e=>c(`addonSettings`,`getDeviceSettings`,`query`,e),updateDeviceSettings:e=>c(`addonSettings`,`updateDeviceSettings`,`mutation`,e)},cameraPipelineConfig:{getDeviceSettingsContribution:e=>c(`cameraPipelineConfig`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`cameraPipelineConfig`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`cameraPipelineConfig`,`applyDeviceSettingsPatch`,`mutation`,e)},deviceAdoption:{getStatus:e=>c(`deviceAdoption`,`getStatus`,`query`,e)},deviceExport:{getDeviceSettingsContribution:e=>c(`deviceExport`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`deviceExport`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`deviceExport`,`applyDeviceSettingsPatch`,`mutation`,e)},deviceManager:{loadConfig:e=>c(`deviceManager`,`loadConfig`,`query`,e),loadRuntimeState:e=>c(`deviceManager`,`loadRuntimeState`,`query`,e),loadMeta:e=>c(`deviceManager`,`loadMeta`,`query`,e),setName:e=>c(`deviceManager`,`setName`,`mutation`,e),setLocation:e=>c(`deviceManager`,`setLocation`,`mutation`,e),setType:e=>c(`deviceManager`,`setType`,`mutation`,e),setIntegrationId:e=>c(`deviceManager`,`setIntegrationId`,`mutation`,e),setLinkDeviceId:e=>c(`deviceManager`,`setLinkDeviceId`,`mutation`,e),setPrimaryChildEntityId:e=>c(`deviceManager`,`setPrimaryChildEntityId`,`mutation`,e),setChildLayout:e=>c(`deviceManager`,`setChildLayout`,`mutation`,e),setDisplay:e=>c(`deviceManager`,`setDisplay`,`mutation`,e),getWireableFields:e=>c(`deviceManager`,`getWireableFields`,`query`,e),setRole:e=>c(`deviceManager`,`setRole`,`mutation`,e),applyInitialMeta:e=>c(`deviceManager`,`applyInitialMeta`,`mutation`,e),setMetadata:e=>c(`deviceManager`,`setMetadata`,`mutation`,e),setDisabled:e=>c(`deviceManager`,`setDisabled`,`mutation`,e),getDevice:e=>c(`deviceManager`,`getDevice`,`query`,e),getLinkedDevices:e=>c(`deviceManager`,`getLinkedDevices`,`query`,e),getStreamSources:e=>c(`deviceManager`,`getStreamSources`,`query`,e),getConfigSchema:e=>c(`deviceManager`,`getConfigSchema`,`query`,e),getSettingsSchema:e=>c(`deviceManager`,`getSettingsSchema`,`query`,e),updateConfig:e=>c(`deviceManager`,`updateConfig`,`mutation`,e),enable:e=>c(`deviceManager`,`enable`,`mutation`,e),disable:e=>c(`deviceManager`,`disable`,`mutation`,e),remove:e=>c(`deviceManager`,`remove`,`mutation`,e),getStreamProfileMap:e=>c(`deviceManager`,`getStreamProfileMap`,`query`,e),setStreamProfileMap:e=>c(`deviceManager`,`setStreamProfileMap`,`mutation`,e),probeStreams:e=>c(`deviceManager`,`probeStreams`,`mutation`,e),getBindings:e=>c(`deviceManager`,`getBindings`,`query`,e),getAllBindings:e=>c(`deviceManager`,`getAllBindings`,`query`,e),setWrapperActive:e=>c(`deviceManager`,`setWrapperActive`,`mutation`,e),getDeviceSettingsAggregate:e=>c(`deviceManager`,`getDeviceSettingsAggregate`,`query`,e),getDeviceLiveInfoAggregate:e=>c(`deviceManager`,`getDeviceLiveInfoAggregate`,`query`,e),getDeviceAggregate:e=>c(`deviceManager`,`getDeviceAggregate`,`query`,e),runDeviceAction:e=>c(`deviceManager`,`runDeviceAction`,`mutation`,e),updateDeviceField:e=>c(`deviceManager`,`updateDeviceField`,`mutation`,e),updateDeviceFieldsBatch:e=>c(`deviceManager`,`updateDeviceFieldsBatch`,`mutation`,e),testField:e=>c(`deviceManager`,`testField`,`mutation`,e),getDeviceStatusAggregate:e=>c(`deviceManager`,`getDeviceStatusAggregate`,`query`,e),getDeviceSettingsContribution:e=>c(`deviceManager`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`deviceManager`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`deviceManager`,`applyDeviceSettingsPatch`,`mutation`,e)},deviceState:{getSnapshot:e=>c(`deviceState`,`getSnapshot`,`query`,e),getCapSlice:e=>c(`deviceState`,`getCapSlice`,`query`,e),setCapSlice:e=>c(`deviceState`,`setCapSlice`,`mutation`,e)},faceGallery:{listRecentFaces:e=>c(`faceGallery`,`listRecentFaces`,`query`,e),getFaceByTrack:e=>c(`faceGallery`,`getFaceByTrack`,`query`,e)},networkQuality:{getDeviceStats:e=>c(`networkQuality`,`getDeviceStats`,`query`,e),reportClientStats:e=>c(`networkQuality`,`reportClientStats`,`mutation`,e)},osdManager:{getDeviceOsd:e=>c(`osdManager`,`getDeviceOsd`,`query`,e),getSourceCatalog:e=>c(`osdManager`,`getSourceCatalog`,`query`,e),setSlotBinding:e=>c(`osdManager`,`setSlotBinding`,`mutation`,e),clearSlotBinding:e=>c(`osdManager`,`clearSlotBinding`,`mutation`,e),previewSlot:e=>c(`osdManager`,`previewSlot`,`mutation`,e),renderDevice:e=>c(`osdManager`,`renderDevice`,`mutation`,e)},pipelineExecutor:{runPipeline:e=>c(`pipelineExecutor`,`runPipeline`,`mutation`,e),runPipelineBatch:e=>c(`pipelineExecutor`,`runPipelineBatch`,`mutation`,e)},pipelineOrchestrator:{assignPipeline:e=>c(`pipelineOrchestrator`,`assignPipeline`,`mutation`,e),unassignPipeline:e=>c(`pipelineOrchestrator`,`unassignPipeline`,`mutation`,e),setPipelineDevicePin:e=>c(`pipelineOrchestrator`,`setPipelineDevicePin`,`mutation`,e),getPipelineDevicePin:e=>c(`pipelineOrchestrator`,`getPipelineDevicePin`,`query`,e),getPipelineAssignment:e=>c(`pipelineOrchestrator`,`getPipelineAssignment`,`query`,e),getCameraMetrics:e=>c(`pipelineOrchestrator`,`getCameraMetrics`,`query`,e),assignAudio:e=>c(`pipelineOrchestrator`,`assignAudio`,`mutation`,e),unassignAudio:e=>c(`pipelineOrchestrator`,`unassignAudio`,`mutation`,e),getAudioAssignment:e=>c(`pipelineOrchestrator`,`getAudioAssignment`,`query`,e),getAudioAssignments:e=>c(`pipelineOrchestrator`,`getAudioAssignments`,`query`,e),getCameraSettings:e=>c(`pipelineOrchestrator`,`getCameraSettings`,`query`,e),setCameraStepToggle:e=>c(`pipelineOrchestrator`,`setCameraStepToggle`,`mutation`,e),getCameraStepOverrides:e=>c(`pipelineOrchestrator`,`getCameraStepOverrides`,`query`,e),setCameraStepOverride:e=>c(`pipelineOrchestrator`,`setCameraStepOverride`,`mutation`,e),setCameraPipelineForAgent:e=>c(`pipelineOrchestrator`,`setCameraPipelineForAgent`,`mutation`,e),resolvePipeline:e=>c(`pipelineOrchestrator`,`resolvePipeline`,`query`,e),getCameraSwitches:e=>c(`pipelineOrchestrator`,`getCameraSwitches`,`query`,e),setCameraSwitch:e=>c(`pipelineOrchestrator`,`setCameraSwitch`,`mutation`,e),getCameraStatus:e=>c(`pipelineOrchestrator`,`getCameraStatus`,`query`,e),getDeviceSettingsContribution:e=>c(`pipelineOrchestrator`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`pipelineOrchestrator`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`pipelineOrchestrator`,`applyDeviceSettingsPatch`,`mutation`,e)},pipelineRunner:{detachCamera:e=>c(`pipelineRunner`,`detachCamera`,`mutation`,e),getCameraMetrics:e=>c(`pipelineRunner`,`getCameraMetrics`,`query`,e),runDetailSubtree:e=>c(`pipelineRunner`,`runDetailSubtree`,`mutation`,e)},plateGallery:{listPlates:e=>c(`plateGallery`,`listPlates`,`query`,e),getPlateByTrack:e=>c(`plateGallery`,`getPlateByTrack`,`query`,e)},recording:{getAvailability:e=>c(`recording`,`getAvailability`,`query`,e),getDaysWithRecordings:e=>c(`recording`,`getDaysWithRecordings`,`query`,e),getPlaybackManifest:e=>c(`recording`,`getPlaybackManifest`,`query`,e),getDeviceConfig:e=>c(`recording`,`getDeviceConfig`,`query`,e),locateSegment:e=>c(`recording`,`locateSegment`,`query`,e),readSegmentBytes:e=>c(`recording`,`readSegmentBytes`,`query`,e),readGopBytes:e=>c(`recording`,`readGopBytes`,`query`,e),setDeviceConfig:e=>c(`recording`,`setDeviceConfig`,`mutation`,e),rescanStorage:e=>c(`recording`,`rescanStorage`,`mutation`,e),pruneFootage:e=>c(`recording`,`pruneFootage`,`mutation`,e),deleteFootprint:e=>c(`recording`,`deleteFootprint`,`mutation`,e),renderGif:e=>c(`recording`,`renderGif`,`mutation`,e),renderClip:e=>c(`recording`,`renderClip`,`mutation`,e),getStatus:e=>c(`recording`,`getStatus`,`query`,e),getDeviceSettingsContribution:e=>c(`recording`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`recording`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`recording`,`applyDeviceSettingsPatch`,`mutation`,e)},recordingExport:{listExports:e=>c(`recordingExport`,`listExports`,`query`,e)},streamBroker:{publishCameraStream:e=>c(`streamBroker`,`publishCameraStream`,`mutation`,e),retractCameraStream:e=>c(`streamBroker`,`retractCameraStream`,`mutation`,e),assignProfile:e=>c(`streamBroker`,`assignProfile`,`mutation`,e),unassignProfile:e=>c(`streamBroker`,`unassignProfile`,`mutation`,e),renderPreBufferClip:e=>c(`streamBroker`,`renderPreBufferClip`,`mutation`,e),produceEventMedia:e=>c(`streamBroker`,`produceEventMedia`,`mutation`,e),restartProfile:e=>c(`streamBroker`,`restartProfile`,`mutation`,e),getDeviceAudioMute:e=>c(`streamBroker`,`getDeviceAudioMute`,`query`,e),setDeviceAudioMute:e=>c(`streamBroker`,`setDeviceAudioMute`,`mutation`,e),getDeviceSettingsContribution:e=>c(`streamBroker`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`streamBroker`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`streamBroker`,`applyDeviceSettingsPatch`,`mutation`,e)}}}var Kt=new Set(`accessories.air-quality-sensor.alarm-panel.ambient-light-sensor.audio-analysis.audio-metrics.automation-control.battery.binary.brightness.button.camera-credentials.camera-pipeline-config.camera-streams.carbon-monoxide.climate-control.color.connectivity.consumables.contact.control.cover.day-night.detection-pipeline.device-discovery.device-ops.device-status.doorbell.enum-sensor.event-emitter.events.fan-control.feature-probe.flood.gas.humidifier.humidity-sensor.image.image-settings.intercom.lawn-mower-control.lock-control.media-player.motion.motion-detection.motion-trigger.motion-zones.native-object-detection.notifier.numeric-sensor.osd.pet-feeder.pipeline-analytics.power-meter.presence.pressure-sensor.privacy-mask.ptz.ptz-autotrack.reboot.scene-monitor.script-runner.smoke.snapshot.stream-catalog.stream-params.switch.tamper.temperature-sensor.update.vacuum-control.valve.vibration.videoclips.water-heater.weather.webrtc-session.zone-analytics.zone-rules.zones`.split(`.`));function qt(e){return Kt.has(e)}var Jt=[15e3,6e4,5*6e4,15*6e4,30*6e4,60*6e4,90*6e4];function Yt(e){return JSON.parse(e)}function Xt(e){return typeof e!=`object`||!e||Array.isArray(e)?null:{...e}}function Zt(e){return Array.isArray(e)?e:[]}function Qt(e,t=``){return typeof e==`string`?e:t}function $t(e,t=0){return typeof e==`number`?e:t}function en(e,t=!1){return typeof e==`boolean`?e:t}function tn(e){try{return Xt(Yt(e))}catch{return null}}function nn(e){try{let t=Yt(e);return Array.isArray(t)?t:null}catch{return null}}function rn(e){return new Promise(t=>setTimeout(t,Math.max(0,e)))}function an(e,t){return t.aborted?Promise.resolve():new Promise(n=>{let r=setTimeout(()=>{t.removeEventListener(`abort`,i),n()},Math.max(0,e)),i=()=>{clearTimeout(r),t.removeEventListener(`abort`,i),n()};t.addEventListener(`abort`,i,{once:!0})})}var on=pe(),sn={opus:`libopus`,aac:`aac`,pcmu:`pcm_mulaw`,pcma:`pcm_alaw`},cn={aac:{kind:`encode`,codec:`aac`,bitrateKbps:128,sampleRateHz:48e3,channels:1},opus:{kind:`encode`,codec:`opus`,bitrateKbps:64,sampleRateHz:48e3,channels:1},pcmu:{kind:`encode`,codec:`pcmu`,sampleRateHz:8e3,channels:1}};function ln(e){return[`-hide_banner`,`-loglevel`,e]}function un(e){return!e||e===`none`||e===`copy`}function dn(e,t){let n=[];if(un(t)||n.push(`-hwaccel`,String(t)),e.extraArgs?.length&&n.push(...e.extraArgs),e.analyzeDurationUs!==void 0&&n.push(`-analyzeduration`,String(e.analyzeDurationUs)),e.probeSizeBytes!==void 0&&n.push(`-probesize`,String(e.probeSizeBytes)),e.fflags?.length)for(let t of e.fflags)n.push(`-fflags`,t);return e.rtspTransport&&n.push(`-rtsp_transport`,e.rtspTransport),n.push(`-i`,e.url),n}function fn(e,t){return!e||t.some(e=>e===`-vf`)?[]:e.mode===`exact`?[`-vf`,`scale=${e.width}:${e.height}`]:[`-vf`,`scale='min(${e.width},iw)':'min(${e.height},ih)':force_original_aspect_ratio=decrease:force_divisible_by=2`]}function pn(e){let t=e.bitrateKbps;if(t===void 0)return[];let n=e.rateControl??{kind:`cap`,vbvSeconds:2},r=Math.max(1,Math.round(t*n.vbvSeconds));return[...n.kind===`cbr`?[`-b:v`,`${t}k`]:[],`-maxrate`,`${t}k`,`-bufsize`,`${r}k`]}function mn(e,t){if(e.kind===`copy`)return[`-c:v`,`copy`,...e.bitstreamFilter?[`-bsf:v`,e.bitstreamFilter]:[]];let n=[...fn(e.scale,t),`-c:v`,e.encoder];return e.preset!==void 0&&n.push(`-preset`,e.preset),e.tune!==void 0&&n.push(`-tune`,e.tune),e.profile!==void 0&&n.push(`-profile:v`,e.profile),e.level!==void 0&&n.push(`-level`,e.level),e.pixelFormat!==void 0&&n.push(`-pix_fmt`,e.pixelFormat),e.fps!==void 0&&n.push(`-r`,String(e.fps)),e.gopFrames!==void 0&&n.push(`-g`,String(e.gopFrames)),e.forceKeyFramesSeconds!==void 0&&n.push(`-force_key_frames`,`expr:gte(t,n_forced*${e.forceKeyFramesSeconds})`),e.bf!==void 0&&n.push(`-bf`,String(e.bf)),n.push(...pn(e)),e.bitstreamFilter!==void 0&&n.push(`-bsf:v`,e.bitstreamFilter),n}function hn(e){if(e.kind===`none`)return[`-an`];if(e.kind===`copy`)return[`-c:a`,`copy`];let t=[];return e.filter!==void 0&&t.push(`-af`,e.filter),t.push(`-c:a`,sn[e.codec]),e.application!==void 0&&t.push(`-application`,e.application),e.frameDurationMs!==void 0&&t.push(`-frame_duration`,String(e.frameDurationMs)),e.globalHeader===!0&&t.push(`-flags`,`+global_header`),e.sampleRateHz!==void 0&&t.push(`-ar`,String(e.sampleRateHz)),e.bitrateKbps!==void 0&&t.push(`-b:a`,`${e.bitrateKbps}k`),e.vbvBufferKbits!==void 0&&t.push(`-bufsize`,`${e.vbvBufferKbits}k`),e.channels!==void 0&&t.push(`-ac`,String(e.channels)),t}function gn(e){let t=[];return e.payloadType!==void 0&&t.push(`-payload_type`,String(e.payloadType)),e.ssrc!==void 0&&t.push(`-ssrc`,String(e.ssrc)),e.sdpFile!==void 0&&t.push(`-sdp_file`,e.sdpFile),t.push(`-f`,`rtp`,e.url),t}function _n(e){return e.kind===`stdout`&&(e.container===`h264`||e.container===`hevc`)}var vn=`+frag_keyframe+empty_moov+default_base_moof`;function yn(e){return e.kind===`rtsp-listen`?[`-f`,`rtsp`,`-rtsp_transport`,`tcp`,`-rtsp_flags`,`listen`,e.url]:e.kind===`rtp-outputs`?[]:e.container===`mp4`?xn(e):[`-f`,e.container,`pipe:1`]}var bn=.9;function xn(e){return[`-movflags`,vn,`-min_frag_duration`,String(Math.max(0,Math.round(e.fragmentMs*bn*1e3))),`-f`,`mp4`,`pipe:1`]}function Sn(e){return[`-map`,`0:a:0?`,...hn(e.codec===`pcma`?{kind:`encode`,codec:`pcma`,sampleRateHz:8e3,channels:1}:cn[e.codec]),...gn({url:e.rtpUrl,sdpFile:e.sdpFile})]}function Cn(e){let t=[...ln(e.logLevel),...dn(e.input,e.decodeHwAccel)],n=e.threadCount>0?[`-threads`,String(e.threadCount)]:[];if(e.sink.kind===`rtp-outputs`){let r=e.sink.video?[`-an`,`-map`,`0:v:0`,...mn(e.video,e.outputArgs),...n,...e.outputArgs,...gn(e.sink.video)]:[],i=e.sink.audio?[`-vn`,`-map`,`0:a:0?`,...hn(e.audio),...gn(e.sink.audio)]:[];return[...t,...r,...i]}let r=_n(e.sink)?[`-an`]:hn(e.audio),i=yn(e.sink);return[...t,...mn(e.video,e.outputArgs),...n,...r,...e.outputArgs,...i,...e.audioSidecar?Sn(e.audioSidecar):[]]}var wn={videotoolbox:{h264:`h264_videotoolbox`,h265:`hevc_videotoolbox`},vaapi:{h264:`h264_vaapi`,h265:`hevc_vaapi`},qsv:{h264:`h264_qsv`,h265:`hevc_qsv`},cuda:{h264:`h264_nvenc`,h265:`hevc_nvenc`},nvdec:{h264:`h264_nvenc`,h265:`hevc_nvenc`},amf:{h264:`h264_amf`,h265:`hevc_amf`}};function Tn(e,t,n){let r=e===`h264`?`libx264`:`libx265`;if(!n||t===null||un(t)||t===`auto`)return r;let i=wn[t.toLowerCase()];return i?e===`h264`?i.h264:i.h265:r}function En(e){return e===`passthrough`?{kind:`none`}:e.codec===`copy`?{kind:`copy`}:{kind:`encode`,codec:e.codec,...e.bitrateKbps===void 0?{}:{bitrateKbps:e.bitrateKbps},...e.sampleRateHz===void 0?{}:{sampleRateHz:e.sampleRateHz},...e.channels===void 0?{}:{channels:e.channels}}}function Dn(e){let t=e.profile.video,n=t.codec===`copy`||e.forceReencode!==!0&&t.codec===e.sourceCodec,r=t.width!==void 0&&t.height!==void 0?{mode:`fit`,width:t.width,height:t.height}:null,i=t.codec===`h265`?`h265`:`h264`,a=n?{kind:`copy`,...e.bitstreamFilter===void 0?{}:{bitstreamFilter:e.bitstreamFilter}}:{kind:`encode`,encoder:Tn(i,e.decodeHwAccel,e.hardwareEncoders===!0),scale:r,...t.preset===void 0?{}:{preset:t.preset},...t.tune===void 0?{}:{tune:t.tune},...t.profile===void 0?{}:{profile:t.profile},...t.level===void 0?{}:{level:t.level},...e.pixelFormat===void 0?{}:{pixelFormat:e.pixelFormat},...t.fps===void 0?{}:{fps:t.fps},...t.gopFrames===void 0?{}:{gopFrames:t.gopFrames},...e.forceKeyFramesSeconds===void 0?{}:{forceKeyFramesSeconds:e.forceKeyFramesSeconds},...t.bf===void 0?{}:{bf:t.bf},...t.bitrateKbps===void 0?{}:{bitrateKbps:t.bitrateKbps},...e.rateControl===void 0?{}:{rateControl:e.rateControl},...e.bitstreamFilter===void 0?{}:{bitstreamFilter:e.bitstreamFilter}};return{logLevel:e.logLevel??`error`,decodeHwAccel:e.decodeHwAccel,input:{url:e.sourceUrl,rtspTransport:`tcp`,fflags:[`+discardcorrupt`],...e.profile.inputArgs?.length?{extraArgs:e.profile.inputArgs}:{}},video:a,audio:En(e.profile.audio),threadCount:e.threadCount??0,outputArgs:e.profile.outputArgs??[],sink:e.sink,...e.audioSidecar===void 0?{}:{audioSidecar:e.audioSidecar}}}var On=16*1024*1024,kn=8,An=16,jn=class{maxUnitBytes;buffer=new Uint8Array;unitStart=0;cursor=0;state=`init`;nextSequence=0;faultReason=null;interstitial=new Set;constructor(e={}){this.maxUnitBytes=e.maxUnitBytes??On}get fault(){return this.faultReason}get pendingBytes(){return this.buffer.length-this.unitStart}get discardedInterstitialTypes(){return[...this.interstitial]}push(e){return this.faultReason!==null||e.length===0?[]:(this.append(e),this.pendingBytes>this.maxUnitBytes?this.fail(`a single fMP4 unit exceeded ${this.maxUnitBytes} bytes — this stream is not fragmented`):this.drainBoxes())}append(e){if(this.buffer.length===0){this.buffer=e.slice();return}let t=new Uint8Array(this.buffer.length+e.length);t.set(this.buffer,0),t.set(e,this.buffer.length),this.buffer=t}drainBoxes(){let e=[];for(;;){let t=this.readHeader();if(this.faultReason!==null)return e;if(t===null||this.cursor+t.totalBytes>this.buffer.length)break;let n=this.cursor,r=n+t.totalBytes;this.cursor=r;let i=this.consumeBox(t.type,n,r);if(this.faultReason!==null)return e;i!==null&&e.push(i)}return this.compact(),e}consumeBox(e,t,n){if(this.state===`init`){if(e!==`moof`)return null;if(t===this.unitStart)return this.fail(`a moof arrived before any initialisation box — there is no ftyp/moov to send`),null;let n=this.emit(`init`,this.unitStart,t);return this.unitStart=t,this.state=`fragment`,n}if(this.state===`idle`)return e===`moof`?(this.unitStart=t,this.state=`fragment`,null):(this.interstitial.add(e),this.unitStart=n,null);if(e!==`mdat`)return null;let r=this.emit(`fragment`,this.unitStart,n);return this.unitStart=n,this.state=`idle`,r}readHeader(){let e=this.buffer.length-this.cursor;if(e<kn)return null;let t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=t.getUint32(this.cursor),r=String.fromCharCode(this.buffer[this.cursor+4]??0,this.buffer[this.cursor+5]??0,this.buffer[this.cursor+6]??0,this.buffer[this.cursor+7]??0);if(n===0)return this.fail(`box "${r}" declares size 0 (to EOF) — an unbounded box cannot be fragmented`),null;if(n===1){if(e<An)return null;let n=t.getBigUint64(this.cursor+kn);return n>BigInt(this.maxUnitBytes)?(this.fail(`box "${r}" declares ${n} bytes, over the ${this.maxUnitBytes} byte bound`),null):{type:r,totalBytes:Number(n)}}return n<kn?(this.fail(`box "${r}" declares an impossible size of ${n} bytes`),null):{type:r,totalBytes:n}}emit(e,t,n){let r=this.nextSequence;return this.nextSequence+=1,{kind:e,data:this.buffer.slice(t,n),sequence:r}}compact(){this.unitStart!==0&&(this.buffer=this.buffer.slice(this.unitStart),this.cursor-=this.unitStart,this.unitStart=0)}fail(e){return this.faultReason=e,this.buffer=new Uint8Array,this.unitStart=0,this.cursor=0,[]}};function Mn(e){let t=JSON.stringify(e,Nn);return(0,on.createHash)(`sha256`).update(t??``).digest(`hex`)}function Nn(e,t){if(t&&typeof t==`object`&&!Array.isArray(t)){let e=t,n={};for(let t of Object.keys(e).toSorted())n[t]=e[t];return n}return t}var Pn=function(e){return e.Addon=`addon`,e.Core=`core`,e.Device=`device`,e.Provider=`provider`,e.System=`system`,e}({});function Fn(e){return e instanceof Error?e.message:typeof e==`string`?e:String(e)}function In(e,t){return{id:e,getRoutes:()=>t,invoke:async e=>{let n=Ln(t,e.method,e.path);if(!n)return{status:404,headers:{},redirectUrl:null,body:{error:`No route matches ${e.method} ${e.path}`}};let r={status:200,headers:{},redirectUrl:null},i=zn(r),a={params:{...e.params,...n.params},query:e.query,body:e.body,headers:e.headers,...e.user?{user:e.user}:{},...e.scopedToken===void 0?{}:{scopedToken:e.scopedToken}};return await n.route.handler(a,i),r}}}function Ln(e,t,n){let r=t.toUpperCase();for(let t of e){if(t.method!==r)continue;let e=Rn(t.path,n);if(e!==null)return{route:t,params:e}}return null}function Rn(e,t){let n=e.split(`/`).filter(Boolean),r=t.split(`/`).filter(Boolean);if(n.length!==r.length)return null;let i={};for(let e=0;e<n.length;e++){let t=n[e],a=r[e];if(t.startsWith(`:`))i[t.slice(1)]=a;else if(t!==a)return null}return i}function zn(e){let t={status(n){return e.status=n,t},code(n){return e.status=n,t},send(t){e.body=t},redirect(t){e.redirectUrl=t,e.status===200&&(e.status=302)},header(n,r){return e.headers[n.toLowerCase()]=r,t},type(n){return e.contentType=n,t}};return t}var Bn=i({codec:m([`h264`,`h265`,`copy`]),profile:m([`baseline`,`main`,`high`]).optional(),level:g().optional(),width:a().int().positive().optional(),height:a().int().positive().optional(),fps:a().positive().optional(),bitrateKbps:a().int().positive().optional(),gopFrames:a().int().positive().optional(),bf:a().int().min(0).optional(),preset:m([`ultrafast`,`superfast`,`veryfast`,`faster`,`fast`,`medium`]).optional(),tune:m([`zerolatency`,`film`,`animation`]).optional()}),Vn=c([y(`passthrough`),i({codec:m([`opus`,`aac`,`pcmu`,`pcma`,`copy`]),bitrateKbps:a().int().positive().optional(),sampleRateHz:a().int().positive().optional(),channels:c([y(1),y(2)]).optional()})]),Hn=i({video:Bn,audio:Vn,inputArgs:p(g()).optional(),outputArgs:p(g()).optional()});function Un(e){let t=e.codec?.toLowerCase().replace(/[.\s-]/g,``),n={codec:t===`h265`||t===`hevc`?`h265`:`h264`,...e.resolution?.width===void 0?{}:{width:e.resolution.width},...e.resolution?.height===void 0?{}:{height:e.resolution.height},...e.fps===void 0?{}:{fps:e.fps}};if(!(n.width===void 0&&n.height===void 0&&n.fps===void 0))return{video:n,audio:`passthrough`}}var Wn={video:{codec:`h264`,profile:`baseline`,level:`3.1`,width:1280,height:720,fps:25,bitrateKbps:2500,gopFrames:25,bf:0,preset:`veryfast`,tune:`zerolatency`},audio:`passthrough`},Gn={...Wn,video:{...Wn.video,bitrateKbps:3e3,gopFrames:30,preset:`ultrafast`},audio:`passthrough`},Kn={...Wn,audio:{codec:`opus`}},qn={kind:`cbr`,vbvSeconds:1},Jn={kind:`cap`,vbvSeconds:2},Yn=360,Xn=400,Zn=24,Qn={kind:`encode`,codec:`opus`,bitrateKbps:24,channels:1,application:`lowdelay`,globalHeader:!0,filter:`aresample=async=1000:first_pts=0`},$n=96,er=4;function tr(e){let t=e.now??(()=>Date.now()),n=null,r=-1/0;return{read(){return t()-r<e.ttlMs?n:void 0},write(e){n=e,r=t()}}}function nr(e){return!e||e===`none`||e===`copy`}async function rr(e){let t=e.override;if(t!=null&&t!==``)return nr(t)?null:t;let n=e.cache?.read();if(n!==void 0)return n;let r;try{r=await e.readDecoderBackend()}catch(t){let n=await e.readKernelPreferred().catch(()=>[]);return e.onFallback({reason:`decoder-unreadable`,kernelPreferred:n,error:t instanceof Error?t.message:String(t)}),e.cache?.write(null),null}if(r===``){let t=await e.readKernelPreferred().catch(()=>[]);return e.onFallback({reason:`decoder-unprobed`,kernelPreferred:t}),e.cache?.write(null),null}let i=nr(r)?null:r;return e.cache?.write(i),i}function ir(e){return{transport:e.publishLocally===!0?`push`:`dial`}}var ar=`\0unset`;function or(e){return{codec:e.codec,profile:e.profile??ar,level:e.level??ar,width:e.width??-1,height:e.height??-1,fps:e.fps??-1,bitrateKbps:e.bitrateKbps??-1,gopFrames:e.gopFrames??-1,bf:e.bf??-1,preset:e.preset??ar,tune:e.tune??ar}}function sr(e){return e===`passthrough`?{codec:`passthrough`}:{codec:e.codec,bitrateKbps:e.bitrateKbps??-1,sampleRateHz:e.sampleRateHz??-1,channels:e.channels??-1}}function cr(e,t=ir(e)){return{deviceId:e.deviceId,source:e.source.kind===`profile`?`profile:${e.source.profile}`:`cam-stream:${e.source.camStreamId}`,transport:t.transport,fragmentMs:t.fragmentMs??-1,video:or(e.encode.video),audio:sr(e.encode.audio),rateControl:e.rateControl??`relaxed`,bitstreamFilter:e.bitstreamFilter??ar,pixelFormat:e.pixelFormat??ar,decodeHwAccel:e.decodeHwAccel??ar}}function lr(e,t=ir(e)){return`egress:${Mn(cr(e,t))}`}var ur=m([`singleton`,`device`,`widget`]),dr=i({capName:g(),kind:ur,deviceId:a().optional(),reachable:v(),latencyMs:a(),error:g().optional()}),fr=i({addonId:g(),caps:p(dr).readonly(),widgets:p(dr).readonly()}),pr=i({nodeId:g(),addons:p(fr).readonly()}),mr=i({ok:v(),degraded:v(),checkedAt:g(),nodes:p(pr).readonly(),summary:i({total:a(),reachable:a(),unreachable:a()})}),hr=`hub-only`;function gr(e){return{placement:e.execution?.placement??`hub-only`,group:e.execution?.group}}function _r(e){let t=gr(e).placement;return t===`any-node`||t===`agent-only`}function vr(e){return gr(e).placement===`agent-only`}function yr(e){return gr(e).group}function br(e,t){return e.execution?.group??t}function xr(e){return gr(e).placement}function Sr(e){return e.execution?.isolate===!0}var Cr=m([`running`,`done`,`failed`,`cancelled`]),wr=m([`adopted`,`already-adopted`,`failed`,`cancelled`]),Tr=i({childNativeId:g(),outcome:wr,parentDeviceId:a().int().nonnegative().nullable(),accessoryCount:a().int().nonnegative(),error:g().nullable()}),Er=i({jobId:g(),addonId:g(),integrationId:g(),state:Cr,total:a().int().nonnegative(),processed:a().int().nonnegative(),adopted:a().int().nonnegative(),alreadyAdopted:a().int().nonnegative(),failed:a().int().nonnegative(),accessoriesCreated:a().int().nonnegative(),currentChildNativeId:g().nullable(),results:p(Tr).readonly(),startedAt:a(),finishedAt:a().nullable(),error:g().nullable()}),Dr={cleanupIntervalMs:3600*1e3,detectionEventsDays:30,audioLevelsDays:7,snapshotsDays:14},Or=m([`stream-broker`,`object-detection`,`privacy-mask`,`device-audio`,`broker-audio`,`audio-analysis`,`recording`,`notifications`]),kr=[`stream-broker`,`object-detection`,`privacy-mask`,`device-audio`,`broker-audio`,`audio-analysis`,`recording`,`notifications`],Ar=b(`kind`,[i({kind:y(`device-disabled`)}),i({kind:y(`wrapper-binding`),capName:g()}),i({kind:y(`recording-config`)}),i({kind:y(`notification-mute`)}),i({kind:y(`camera-audio`),capName:g()}),i({kind:y(`camera-mask`),capName:g()}),i({kind:y(`broker-audio-mute`)})]),jr=m([`no-provider`,`source-unreachable`,`not-configured`]),Mr=i({id:Or,label:g(),costWhenOff:g(),available:v(),unavailableReason:jr.optional(),enabled:v(),authority:Ar}),Nr=i({deviceId:a().int(),switches:p(Mr).readonly(),fetchedAt:a()}),Pr=`detection-pipeline`,Fr=`audio-analysis`,Ir=`privacy-mask`,Lr={"stream-broker":{id:`stream-broker`,label:`Camera`,costWhenOff:`Off: the whole camera stops. No live view, no recording, no detection and no notifications — its streams are released and nothing dials it again until you turn it back on.`,authority:{kind:`device-disabled`},countsAsSwitchedOff:!0},"object-detection":{id:`object-detection`,label:`Object detection & tracking`,costWhenOff:`Off: nothing is detected or tracked on this camera, so it produces no events — and with no events there are no object notifications and no event-triggered recording. Live view and continuous recording are unaffected.`,authority:{kind:`wrapper-binding`,capName:Pr},countsAsSwitchedOff:!0},"privacy-mask":{id:`privacy-mask`,label:`Privacy mask`,costWhenOff:`On: the zones you drew on this camera are blacked out by the camera itself — live view, playback, exports and detection all see the black boxes, and nothing behind them was ever recorded. Off: the camera captures the whole frame, and your zones are kept for when you turn it back on.`,authority:{kind:`camera-mask`,capName:Ir},countsAsSwitchedOff:!1},"device-audio":{id:`device-audio`,label:`Camera microphone`,costWhenOff:`Off: the camera captures no sound at all. Live view and recordings become silent video, and audio detection and classification have nothing left to analyse — turning them back on will not recover it. The picture, motion and object detection are unaffected, and two-way talk still works. Applies at the camera, so every consumer sees the same silence.`,authority:{kind:`camera-audio`,capName:Ir},countsAsSwitchedOff:!0},"broker-audio":{id:`broker-audio`,label:`Audio distribution`,costWhenOff:`Off: this server distributes no sound for this camera — live view is silent and everything recorded while it is off is silent FOREVER, even after you turn it back on. Audio detection and classification also have nothing to analyse. The camera keeps capturing sound, so nothing about the camera changes and turning this back on is instant, with no interruption to the picture.`,authority:{kind:`broker-audio-mute`},countsAsSwitchedOff:!0},"audio-analysis":{id:`audio-analysis`,label:`Audio detection & classification`,costWhenOff:`Off: no audio is decoded or classified for this camera. Tracks carry no audio labels and no audio-triggered rule can fire. Audio recorded alongside video is unaffected.`,authority:{kind:`wrapper-binding`,capName:Fr},countsAsSwitchedOff:!0},recording:{id:`recording`,label:`Recording`,costWhenOff:`Off: nothing new is written to disk. Footage already recorded stays, but retention keeps deleting it — so this camera’s history shrinks and is not replaced. Your recording schedule is kept and resumes when you turn it back on.`,authority:{kind:`recording-config`},countsAsSwitchedOff:!0},notifications:{id:`notifications`,label:`Notifications`,costWhenOff:`Off: this camera never notifies anyone, on any rule, with no expiry. Detection, events and recording carry on exactly as before — you simply stop being told about them.`,authority:{kind:`notification-mute`},countsAsSwitchedOff:!0}};function Rr(e,t){switch(e.authority.kind){case`device-disabled`:return{available:!0,enabled:!t.deviceDisabled};case`wrapper-binding`:{let n=e.authority.capName;return t.bindableCapNames===null||t.activeWrapperCapNames===null?{available:!1,enabled:!0,unavailableReason:`source-unreachable`}:t.bindableCapNames.includes(n)?{available:!0,enabled:t.activeWrapperCapNames.includes(n)}:{available:!1,enabled:!0,unavailableReason:`no-provider`}}case`recording-config`:return t.recordingEnabled===null?{available:!1,enabled:!0,unavailableReason:`source-unreachable`}:{available:!0,enabled:t.recordingEnabled};case`notification-mute`:return t.notificationsMuted===null?{available:!1,enabled:!0,unavailableReason:`source-unreachable`}:{available:!0,enabled:!t.notificationsMuted};case`camera-audio`:{let e=t.deviceAudio;return e===null?{available:!1,enabled:!0,unavailableReason:`source-unreachable`}:e.supported?e.enabled===null?{available:!1,enabled:!0,unavailableReason:`source-unreachable`}:{available:!0,enabled:e.enabled}:{available:!1,enabled:!0,unavailableReason:`no-provider`}}case`camera-mask`:{let e=t.privacyMask;return e===null?{available:!1,enabled:!1,unavailableReason:`source-unreachable`}:e.supported?e.configuredRegions===null||e.enabled===null?{available:!1,enabled:!1,unavailableReason:`source-unreachable`}:e.configuredRegions===0?{available:!1,enabled:!1,unavailableReason:`not-configured`}:{available:!0,enabled:e.enabled}:{available:!1,enabled:!1,unavailableReason:`no-provider`}}case`broker-audio-mute`:{let e=t.brokerAudio;return e===null?{available:!1,enabled:!0,unavailableReason:`source-unreachable`}:{available:!0,enabled:!e.muted}}}}function zr(e){return kr.map(t=>{let n=Lr[t],r=Rr(n,e);return{id:n.id,label:n.label,costWhenOff:n.costWhenOff,available:r.available,...r.unavailableReason===void 0?{}:{unavailableReason:r.unavailableReason},enabled:r.enabled,authority:n.authority}})}function Br(e){return e.filter(e=>Lr[e.id].countsAsSwitchedOff&&e.available&&!e.enabled).map(e=>e.id)}function Vr(e){let t=[],n=[];for(let r of kr){let i=Lr[r];if(!i.countsAsSwitchedOff)continue;let a=Rr(i,e);a.unavailableReason===`source-unreachable`?n.push(r):a.available&&!a.enabled&&t.push(r)}return{switchedOff:t,unreadable:n}}var Hr={high:`High`,mid:`Mid`,low:`Low`};function Ur(e){return Hr[e]??e.charAt(0).toUpperCase()+e.slice(1)}function Wr(e){return(e.width??0)*(e.height??0)}function Gr(e){if(e.length===0)return[];let t=e.map((e,t)=>({s:e,i:t,px:Wr(e.metadata??{})})).toSorted((e,t)=>t.px-e.px),n=Array.from({length:e.length});for(let e=0;e<t.length;e++){let{s:r,i}=t[e],a;a=e===0?`high`:e===t.length-1?`low`:`mid`,n[i]={...r,quality:a}}return n}function Kr(e){let t=e.height??0,n=e.width??0;return t>=1080||n>=1920?`high`:t>=480||n>=640?`mid`:`low`}function qr(e){let t=e.protocols.find(e=>e.type===`rtsp`&&e.url)??e.protocols.find(e=>e.url),n=t?.type,r=n===`rtsp`?`rtsp`:n===`http`||n===`flv`?`http-mjpeg`:`custom`;return{id:e.id,label:e.label??e.id,protocol:r,url:t?.url,profileHint:e.quality}}function A(e){return typeof e==`string`}function Jr(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Yr(e){return A(e)&&e.trim()?{url:e}:Jr(e)&&A(e.url)&&e.url.trim()?{url:e.url,label:A(e.label)?e.label:void 0}:null}function Xr(e){let t=A(e.snapshot_url)?e.snapshot_url:void 0;if(Array.isArray(e.streams)){let n=[];for(let t of e.streams){let e=Yr(t);e&&n.push(e)}return{streams:n,snapshot_url:t}}let n=[],r=A(e.main_stream_url)?e.main_stream_url:void 0;r&&n.push({url:r,label:A(e.main_stream_name)?e.main_stream_name:void 0});let i=A(e.sub_stream_url)?e.sub_stream_url:void 0;i&&n.push({url:i,label:A(e.sub_stream_name)?e.sub_stream_name:void 0});let a=A(e.third_stream_url)?e.third_stream_url:void 0;return a&&n.push({url:a,label:A(e.third_stream_name)?e.third_stream_name:void 0}),{streams:n,snapshot_url:t}}function Zr(e){if(e.length===0)return{};let t=Gr(e),n={},r=t.find(e=>e.quality===`high`),i=t.find(e=>e.quality===`mid`),a=t.find(e=>e.quality===`low`);r&&(n.high=r.id),i&&(n.mid=i.id),a&&(n.low=a.id);let o=r??i??a??t[0];return o&&(n.high||=o.id,n.mid||=o.id,n.low||=o.id),n}var Qr={streaming:!0,notifications:!0,objectDetection:!1,remoteAccess:!0,agentCluster:!1,smartHome:!0,recordings:!0,backup:!0,repl:!0},$r={debug:0,info:1,warn:2,error:3};function ei(e,t){return $r[e]<=$r[t]}var ti=m([`recording`,`events`]),ni=m([`prune`,`manual-delete`,`rescan`,`retention-run`,`relocate`,`orphan-audit`]),ri=m([`retention`,`quota`,`manual`,`operator`,`maintenance`]),ii=i({id:g(),at:a(),domain:ti,op:ni,reason:ri,deviceId:a().nullable(),nodeId:g(),itemsAffected:a(),bytesReclaimed:a(),detail:g().nullable(),actor:g()}),ai=i({deviceId:a().optional(),limit:a().int().min(1).max(1e3).optional()}),oi=500,si=200,ci={preMs:5e3,postMs:1e4},li=a().int().min(0).max(6),ui=/^([01]\d|2[0-3]):[0-5]\d$/,di=m([`off`,`events`,`continuous`]),fi=i({motion:v().optional(),audioThresholdDbfs:a().optional()}),pi=m([`continuous`,`events`]),mi=fi,hi=i({days:p(li),start:g().regex(ui),end:g().regex(ui),mode:pi,triggers:mi.optional(),preBufferSec:a().min(0).optional(),postBufferSec:a().min(0).optional()}),gi={preBufferSec:10,postBufferSec:30},_i=gi.postBufferSec*1e3,vi=i({maxAgeDays:a().min(0).optional(),maxSizeGb:a().min(0).optional()}),yi=m([`minimal`,`low`,`standard`,`high`,`max`]),bi=`standard`,xi={minimal:{tileWidth:240,tileHeight:135,quality:55},low:{tileWidth:320,tileHeight:180,quality:60},standard:{tileWidth:480,tileHeight:270,quality:72},high:{tileWidth:640,tileHeight:360,quality:80},max:{tileWidth:960,tileHeight:540,quality:85}},Si={minimal:`Minimal (240p)`,low:`Low (320p)`,standard:`Standard (480p)`,high:`High (640p)`,max:`Max (960p)`},Ci=[`minimal`,`low`,`standard`,`high`,`max`];function wi(e){return xi[e??`standard`]}var Ti=i({enabled:v(),mode:di.optional(),profiles:p(S).optional(),segmentSeconds:a().int().positive().optional(),bands:p(hi).default([]),retention:vi.optional(),scrubThumbnails:yi.optional()}).strict();function Ei(e){return!e.enabled||e.bands.length===0?`off`:e.bands.some(e=>e.mode===`continuous`)?`continuous`:`events`}var Di=[`high`,`low`];function Oi(e,t){if(t!==void 0&&t.length>0){let n=e.filter(e=>t.includes(e));return n.length>0?n:[...e]}let n=e.filter(e=>Di.includes(e));return n.length>0?n:[...e]}var ki=m([`queued`,`running`,`done`,`failed`,`cancelled`]),Ai=i({jobId:g(),state:ki,fromLocationId:g(),toLocationId:g(),deviceId:a().nullable(),entities:p(g()),filesMoved:a().int(),bytesMoved:a().int(),filesTotal:a().int().nullable(),startedAt:a(),finishedAt:a().nullable(),error:g().nullable()}),ji=m([`recordings`,`recordingsLow`]),Mi=i({fromLocationId:g(),toLocationId:g(),entities:p(m([`segments`])).optional(),footageClass:ji.optional(),deviceId:a().int().optional(),profiles:p(g()).optional(),throttleMbps:a().min(1).max(1e3).optional(),sinceMs:a().int().optional()}),j=i({leaseId:g().min(1)}),Ni=Mi.extend({leaseId:g().min(1)}),Pi=i({toLocationId:g(),throttleMbps:a().min(1).max(1e3).optional()}),Fi=Pi.extend({leaseId:g().min(1)}),Ii=m([`recordings`,`recordingsLow`,`eventMedia`]),Li=i({recordings:g().min(1).optional(),recordingsLow:g().min(1).optional(),eventMedia:g().min(1).optional()}).refine(e=>Object.keys(e).length>0,{message:`select at least one storage class`}),Ri=i({destinations:Li,throttleMbps:a().min(1).max(1e3).optional()}),zi=m([`planning`,`pausing`,`moving`,`verifying`,`repointing`,`refreshing`,`resuming`,`done`,`failed`,`cancelled`]),Bi=m([`pipeline`,`recorder`,`analytics`]),Vi=i({storageClass:Ii,fromLocationId:g(),toLocationId:g(),moverJobId:g().nullable(),state:ki.nullable(),error:g().nullable()}),Hi=i({jobId:g(),phase:zi,destinations:Li,throttleMbps:a(),moves:p(Vi),pauseLeaseId:g().nullable(),pausedParticipants:p(Bi),repointed:v(),cancelRequested:v(),startedAt:a(),updatedAt:a(),finishedAt:a().nullable(),error:g().nullable()}),Ui=i({destinations:Li,moves:p(i({storageClass:Ii,fromLocationId:g(),toLocationId:g()}))}),Wi=[`face`,`plate`],Gi=[`face`,`plate`,`clip`,`custom`],Ki=g().regex(/^[a-z][a-zA-Z0-9-]*$/),M=i({id:g().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/),type:g(),displayName:g().min(1),providerId:g().min(1),config:n(g(),u()),nodeId:g().optional(),isDefault:v().default(!1),isSystem:v().default(!1),enabled:v().optional(),capacity:i({totalBytes:a(),availableBytes:a()}).nullable().optional(),createdAt:a(),updatedAt:a()}),N=c([Ki,g().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/)]),qi=i({id:g().regex(/^[a-z][a-zA-Z0-9-]*$/,{message:`id must start with a lowercase letter and contain only letters, digits, or hyphens`}),displayName:g().min(1,{message:`displayName must not be empty`}),description:g().optional(),cardinality:m([`single`,`multi`]),defaultsTo:g().optional(),defaultRoot:m([`data`,`media`,`backup`]).optional()}),Ji=i({inputFps:a(),outputFps:a(),avgDecodeTimeMs:a(),droppedFrames:a(),lagMs:a().optional(),effectiveFps:a().optional(),adaptiveFps:a().optional()}),Yi=i({codec:g(),maxFps:a().default(0),outputFormat:m([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]).default(`jpeg`),scale:a().default(1),width:a().optional(),height:a().optional(),deviceId:a().int().nonnegative().optional(),tag:g().optional(),frameSink:m([`callback`,`shm`]).default(`callback`),debug:v().optional()}),Xi={offsetHours:1,startMonth:3,startWeekIndex:5,startWeekday:`Sunday`,startHour:2,endMonth:10,endWeekIndex:5,endWeekday:`Sunday`,endHour:3},Zi={offsetHours:1,startMonth:3,startWeekIndex:2,startWeekday:`Sunday`,startHour:2,endMonth:11,endWeekIndex:1,endWeekday:`Sunday`,endHour:2},Qi=[{id:`UTC`,label:`UTC (UTC+0)`,region:`Universal`,stdOffsetMinutes:0,dst:null},{id:`Europe/London`,label:`Europe/London (UTC+0 / BST)`,region:`Europe`,stdOffsetMinutes:0,dst:Xi},{id:`Europe/Rome`,label:`Europe/Rome (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:Xi},{id:`Europe/Paris`,label:`Europe/Paris (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:Xi},{id:`Europe/Berlin`,label:`Europe/Berlin (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:Xi},{id:`Europe/Madrid`,label:`Europe/Madrid (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:Xi},{id:`Europe/Amsterdam`,label:`Europe/Amsterdam (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:Xi},{id:`Europe/Istanbul`,label:`Europe/Istanbul (UTC+3)`,region:`Europe`,stdOffsetMinutes:180,dst:null},{id:`America/New_York`,label:`America/New York (UTC−5 / EDT)`,region:`Americas`,stdOffsetMinutes:-300,dst:Zi},{id:`America/Chicago`,label:`America/Chicago (UTC−6 / CDT)`,region:`Americas`,stdOffsetMinutes:-360,dst:Zi},{id:`America/Denver`,label:`America/Denver (UTC−7 / MDT)`,region:`Americas`,stdOffsetMinutes:-420,dst:Zi},{id:`America/Los_Angeles`,label:`America/Los Angeles (UTC−8 / PDT)`,region:`Americas`,stdOffsetMinutes:-480,dst:Zi},{id:`America/Sao_Paulo`,label:`America/Sao Paulo (UTC−3)`,region:`Americas`,stdOffsetMinutes:-180,dst:null},{id:`Asia/Dubai`,label:`Asia/Dubai (UTC+4)`,region:`Asia`,stdOffsetMinutes:240,dst:null},{id:`Asia/Kolkata`,label:`Asia/Kolkata (UTC+5:30)`,region:`Asia`,stdOffsetMinutes:330,dst:null},{id:`Asia/Singapore`,label:`Asia/Singapore (UTC+8)`,region:`Asia`,stdOffsetMinutes:480,dst:null},{id:`Asia/Shanghai`,label:`Asia/Shanghai (UTC+8)`,region:`Asia`,stdOffsetMinutes:480,dst:null},{id:`Asia/Tokyo`,label:`Asia/Tokyo (UTC+9)`,region:`Asia`,stdOffsetMinutes:540,dst:null},{id:`Australia/Sydney`,label:`Australia/Sydney (UTC+10 / AEDT)`,region:`Oceania`,stdOffsetMinutes:600,dst:{offsetHours:1,startMonth:10,startWeekIndex:1,startWeekday:`Sunday`,startHour:2,endMonth:4,endWeekIndex:1,endWeekday:`Sunday`,endHour:3}}];function $i(e){return Qi.find(t=>t.id===e)}function ea(e,t,n,r={}){if(e.length===0)return null;let i=`${n}/`,a=e=>({brokerId:e.brokerId,profileId:e.brokerId.startsWith(i)?e.brokerId.slice(i.length):e.brokerId,url:e.url,mutedUrl:e.mutedUrl,enabled:e.enabled,...e.codec===void 0?{}:{codec:e.codec},...e.resolution===void 0?{}:{resolution:e.resolution}});if(t!==`auto`){let n=e.find(e=>e.enabled&&e.url.length>0&&(e.profile===t||e.brokerId===`${i}${t}`));if(n)return a(n)}let o=e.filter(e=>e.enabled&&e.url.length>0);if(o.length===0)return null;let s=r.targetResolution;if(s){let e=o.filter(e=>e.resolution!==void 0);if(e.length>0){let t=ta(e,s);if(t)return a(t)}}return a(o[0])}function ta(e,t){let n=t.width*t.height,r,i;for(let t of e){if(t.resolution===void 0)continue;let e=t.resolution.width*t.resolution.height;e>=n?(!r||e<r.pixels)&&(r={entry:t,pixels:e}):(!i||e>i.pixels)&&(i={entry:t,pixels:e})}return r?.entry??i?.entry}var na=i({id:g(),name:g(),category:g().optional(),description:g().optional(),icon:g().optional()}),ra=[`onnx`,`coreml`,`openvino`,`tflite`,`pt`],ia={yolo26:`YOLO26`,yolov9:`YOLOv9`};function aa(e){return ia[e]??e.toUpperCase()}var oa=/\s*@\s*\d+\s*(?:[x×]\s*\d+)?/gi;function sa(e,t){let n=aa(e),r=t.replace(RegExp(`^${n}\\s+`,`i`),``).replace(oa,``).trim();return r.length>0?r:t}function ca(e,t){let n=[];return t===`fast`&&n.push(`Fast`),n.push(e===`int8`?`Int8`:`Standard`),n.join(` · `)}function la(e){return ra.filter(t=>e.formats[t]!==void 0)}function ua(e){let t=ra.map(t=>e.formats[t]?.sizeMB).filter(e=>typeof e==`number`);return t.length>0?Math.min(...t):0}var da=[`t`,`n`,`s`,`m`,`c`,`l`,`x`],fa=[`fp32`,`int8`];function pa(e){let t=new Map;for(let n of e){if(n.legacy===!0||n.group===void 0)continue;let{family:e,tier:r}=n.group,i=t.get(e)??new Map,a=i.get(r)??[];a.push(n),i.set(r,a),t.set(e,i)}let n=[];for(let[e,r]of t){let t=[];for(let[n,i]of r){let r=i.map(e=>{let t=e.group?.precision??`fp32`,n=e.group?.optimization??`standard`;return{modelId:e.id,precision:t,optimization:n,resolution:e.group?.resolution,label:ca(t,n),formats:la(e),sizeMB:ua(e)}}).toSorted((e,t)=>e.resolution===t.resolution?e.optimization===t.optimization?fa.indexOf(e.precision)-fa.indexOf(t.precision):e.optimization===`fast`?1:-1:(t.resolution??1/0)-(e.resolution??1/0)),a=r.find(e=>e.precision===`fp32`&&e.optimization===`standard`)??r[0];if(a===void 0)continue;let o=i.find(e=>e.id===a.modelId);t.push({tier:n,label:o?sa(e,o.name):n.toUpperCase(),baseModelId:a.modelId,options:r})}t.sort((e,t)=>{let n=da.indexOf(e.tier),r=da.indexOf(t.tier);return n!==-1&&r!==-1?n-r:n===-1?r===-1?e.tier.localeCompare(t.tier):1:-1}),n.push({family:e,label:aa(e),tiers:t})}return n.sort((e,t)=>e.family.localeCompare(t.family)),n}function ma(e,t){let n=t.precision??`fp32`,r=t.optimization??`standard`,i=e.filter(e=>e.group!==void 0&&e.group.family===t.family&&e.group.tier===t.tier&&(e.group.precision??`fp32`)===n&&(e.group.optimization??`standard`)===r);return t.resolution===void 0?i.toSorted((e,t)=>(t.group?.resolution??1/0)-(e.group?.resolution??1/0))[0]?.id??null:i.find(e=>e.group?.resolution===t.resolution)?.id??null}function ha(e,t){let n=e.find(e=>e.id===t);return n?.group===void 0?null:{family:n.group.family,tier:n.group.tier,precision:n.group.precision??`fp32`,optimization:n.group.optimization??`standard`,resolution:n.group.resolution}}var ga=[`onnx`,`coreml`,`openvino`,`tflite`,`pt`,`gguf`],P=i({url:g(),sizeMB:a(),isDirectory:v().optional(),files:p(g()).readonly().optional(),runtimes:p(m([`node`,`python`])).readonly().optional()}),_a=i({url:g(),filename:g(),sizeMB:a()}),va=i({onnx:P.optional(),coreml:P.optional(),openvino:P.optional(),tflite:P.optional(),pt:P.optional(),gguf:P.optional()}),ya=i({family:g(),tier:g(),precision:m([`fp32`,`int8`]).optional(),optimization:m([`standard`,`fast`]).optional(),resolution:a().int().positive().optional()}),ba=i({id:g(),name:g(),description:g(),formats:va,inputSize:i({width:a(),height:a()}),inputChannels:a().int().positive().optional(),labels:p(na).readonly(),inputLayout:m([`nchw`,`nhwc`]).optional(),inputNormalization:m([`zero-one`,`imagenet`,`none`]).optional(),outputProbabilities:v().optional(),preprocessMode:m([`letterbox`,`resize`]).optional(),postprocessor:x().optional(),faceAlignment:v().optional(),extraFiles:p(_a).readonly().optional(),legacy:v().optional(),metrics:i({map50:a().optional(),p95LatencyMs:n(g(),a()).optional()}).optional(),license:g().optional(),group:ya.optional()}),xa=b(`format`,[i({format:y(`openvino`),precisions:p(m([`fp16`,`int8`])).min(1).readonly()}),i({format:y(`coreml`)})]),Sa=i({id:g().regex(/^[a-zA-Z0-9._-]+$/),name:g(),labels:p(na).readonly(),inputSize:i({width:a(),height:a()}),inputLayout:m([`nchw`,`nhwc`]).optional(),inputNormalization:m([`zero-one`,`imagenet`,`none`]).optional(),preprocessMode:m([`letterbox`,`resize`]).optional(),outputFormat:m([`yolo`,`ssd`,`embedding`,`classification`,`ocr`,`segmentation`]),faceAlignment:v().optional()}),Ca=i({format:m(ga),precision:m([`fp16`,`int8`]).optional(),sizeMB:a(),validated:v(),files:p(g()).readonly()}),wa=i({entry:ba,artifacts:p(Ca).readonly()});function Ta(e){switch(e.toUpperCase()){case`GET`:case`HEAD`:case`OPTIONS`:return`view`;case`POST`:case`PUT`:case`PATCH`:return`create`;default:return`delete`}}function Ea(e,t){return e.some(e=>e.type===`category`&&e.target===`device`&&e.access.includes(t))}function Da(e,t,n){return e.some(e=>e.type===`addon`&&e.target===t&&e.access.includes(n))}function Oa(e){let t=e.kind;if(t===void 0)return{kind:`session`};if(t!==`sso-bridge`)return{kind:`not-a-credential`,reason:`bridge token kind=${String(t)}`};let n=e.provider;return n===`oauth-access`?{kind:`integration`,provider:`oauth-access`}:{kind:`not-a-credential`,reason:`bridge token provider=${String(n)}`}}function ka(e){let{principal:t}=e;if(t.kind===`not-a-credential`)return{allowed:!1,reason:t.reason};if(t.kind===`session`)return{allowed:!0};let n=Ta(e.method);return Da(e.scopes,e.addonId,n)?{allowed:!0}:{allowed:!1,reason:`integration token holds no addon:${e.addonId}[${n}] grant`}}var F=class extends Error{position;constructor(e,t){super(e),this.name=`ExpressionParseError`,this.position=t}},I=class extends Error{constructor(e){super(e),this.name=`ExpressionEvalError`}};function L(e,t,n){if(typeof e!=`number`||!Number.isFinite(e))throw new I(`${t}: argument ${n+1} must be a finite number`);return e}function Aa(e,t,n){if(typeof e!=`string`)throw new I(`${t}: argument ${n+1} must be a string`);return e}function R(e,t){if(!Number.isFinite(e))throw new I(`${t}: produced a non-finite result`);return e}function ja(e,t){return e.map((e,n)=>L(e,t,n))}var Ma=1/0,Na={min:{minArgs:1,maxArgs:Ma,apply:e=>R(Math.min(...ja(e,`min`)),`min`)},max:{minArgs:1,maxArgs:Ma,apply:e=>R(Math.max(...ja(e,`max`)),`max`)},abs:{minArgs:1,maxArgs:1,apply:e=>R(Math.abs(L(e[0],`abs`,0)),`abs`)},floor:{minArgs:1,maxArgs:1,apply:e=>R(Math.floor(L(e[0],`floor`,0)),`floor`)},ceil:{minArgs:1,maxArgs:1,apply:e=>R(Math.ceil(L(e[0],`ceil`,0)),`ceil`)},sqrt:{minArgs:1,maxArgs:1,apply:e=>R(Math.sqrt(L(e[0],`sqrt`,0)),`sqrt`)},round:{minArgs:1,maxArgs:2,apply:e=>{let t=L(e[0],`round`,0),n=e.length>1?Math.trunc(L(e[1],`round`,1)):0;if(n<0||n>100)throw new I(`round: digits must be between 0 and 100`);let r=10**n;return R(Math.round(t*r)/r,`round`)}},pow:{minArgs:2,maxArgs:2,apply:e=>R(L(e[0],`pow`,0)**L(e[1],`pow`,1),`pow`)},clamp:{minArgs:3,maxArgs:3,apply:e=>{let t=L(e[0],`clamp`,0),n=L(e[1],`clamp`,1),r=L(e[2],`clamp`,2);if(n>r)throw new I(`clamp: lower bound is greater than upper bound`);return R(Math.min(r,Math.max(n,t)),`clamp`)}},avg:{minArgs:1,maxArgs:Ma,apply:e=>{let t=ja(e,`avg`);return R(t.reduce((e,t)=>e+t,0)/t.length,`avg`)}},sum:{minArgs:1,maxArgs:Ma,apply:e=>R(ja(e,`sum`).reduce((e,t)=>e+t,0),`sum`)},coalesce:{minArgs:1,maxArgs:Ma,apply:e=>{for(let t of e)if(t!==null)return t;return null}},age:{minArgs:2,maxArgs:2,apply:e=>R(L(e[0],`age`,0)-L(e[1],`age`,1),`age`)},convert:{minArgs:3,maxArgs:3,apply:(e,t)=>{let n=L(e[0],`convert`,0),r=Aa(e[1],`convert`,1).trim(),i=Aa(e[2],`convert`,2).trim();if(t.convert){let e=t.convert(n,r,i);if(e===null)throw new I(`convert: cannot convert '${r}' to '${i}'`);return R(e,`convert`)}if(r===i)return n;throw new I(`convert: unit conversion table not installed`)}}},Pa=Object.freeze(Object.assign(Object.create(null),Na)),Fa=new Set(Object.keys(Na)),Ia=2048,La=256,Ra=4096,za=32,Ba=16,Va=256,Ha=/^[A-Za-z_][A-Za-z0-9_]*$/,Ua=new Set([`now`,`true`,`false`,`null`]),Wa=new Set([`true`,`false`,`null`]);function Ga(e){return e>=`0`&&e<=`9`}function Ka(e){return e>=`A`&&e<=`Z`||e>=`a`&&e<=`z`||e===`_`}function qa(e){return Ka(e)||Ga(e)}function Ja(e){return e===` `||e===` `||e===`
|
|
3
|
-
`||e===`\r`||e===`\f`||e===`\v`}function Ya(e){if(e.length>2048)throw new F(`expression too long (${e.length} > ${Ia} chars)`,0);let t=[],n=0,r=e.length;for(;n<r;){let i=e[n];if(Ja(i)){n+=1;continue}if(Ga(i)){let i=n;for(;n<r&&Ga(e[n]);)n+=1;if(n<r&&e[n]===`.`){if(n+1>=r||!Ga(e[n+1]))throw new F(`malformed number: decimal point needs a digit`,n);for(n+=1;n<r&&Ga(e[n]);)n+=1}let a=e.slice(i,n),o=Number(a);if(!Number.isFinite(o))throw new F(`malformed number: '${a}'`,i);t.push({type:`number`,value:o,pos:i});continue}if(i===`'`||i===`"`){let a=i,o=n;n+=1;let s=``,c=!1;for(;n<r;){let t=e[n];if(t===`\\`){let t=n+1<r?e[n+1]:``;if(t===`\\`||t===`'`||t===`"`){s+=t,n+=2;continue}throw new F(`invalid string escape: '\\${t}'`,n)}if(t===a){c=!0,n+=1;break}s+=t,n+=1}if(!c)throw new F(`unterminated string literal`,o);t.push({type:`string`,value:s,pos:o});continue}if(Ka(i)){let i=n;for(;n<r&&qa(e[n]);)n+=1;let a=e.slice(i,n);Wa.has(a)?t.push({type:`keyword`,keyword:Xa(a),pos:i}):t.push({type:`identifier`,name:a,pos:i});continue}let a=n+1<r?e.slice(n,n+2):``;if(a===`<=`||a===`>=`||a===`==`||a===`!=`||a===`&&`||a===`||`){t.push({type:`punct`,punct:a,pos:n}),n+=2;continue}if(Za(i)){t.push({type:`punct`,punct:i,pos:n}),n+=1;continue}throw new F(`unexpected character '${i}'`,n)}return t.push({type:`eof`,pos:r}),t}function Xa(e){return e===`true`?`true`:e===`false`?`false`:`null`}function Za(e){return e===`(`||e===`)`||e===`,`||e===`?`||e===`:`||e===`+`||e===`-`||e===`*`||e===`/`||e===`%`||e===`!`||e===`<`||e===`>`}var Qa={"||":1,"&&":2,"==":3,"!=":3,"<":4,"<=":4,">":4,">=":4,"+":5,"-":5,"*":6,"/":6,"%":6};function $a(e){return e===`&&`||e===`||`}function eo(e){return e===`+`||e===`-`||e===`*`||e===`/`||e===`%`||e===`==`||e===`!=`||e===`<`||e===`<=`||e===`>`||e===`>=`}var to=class{tokens;pos=0;nodeCount=0;identifiers=new Set;callees=new Set;constructor(e){this.tokens=e}parse(){let e=this.parseTernary(),t=this.peek();if(t.type!==`eof`)throw new F(`unexpected trailing input`,t.pos);return{ast:e,identifiers:this.identifiers,callees:this.callees,nodeCount:this.nodeCount}}peek(){return this.tokens[this.pos]}next(){return this.tokens[this.pos++]}expectPunct(e){let t=this.peek();if(t.type!==`punct`||t.punct!==e)throw new F(`expected '${e}'`,t.pos);this.pos+=1}matchPunct(e){let t=this.peek();return t.type===`punct`&&t.punct===e?(this.pos+=1,!0):!1}countNode(){if(this.nodeCount+=1,this.nodeCount>256)throw new F(`expression too complex`,this.peek().pos)}parseTernary(){let e=this.parseBinary(1);if(this.matchPunct(`?`)){let t=this.parseTernary();this.expectPunct(`:`);let n=this.parseTernary();return this.countNode(),{kind:`conditional`,test:e,consequent:t,alternate:n}}return e}parseBinary(e){let t=this.parseUnary();for(;;){let n=this.peek();if(n.type!==`punct`)break;let r=Qa[n.punct];if(r===void 0||r<e)break;let i=n.punct;this.pos+=1;let a=this.parseBinary(r+1);if(this.countNode(),$a(i))t={kind:`logical`,op:i,left:t,right:a};else if(eo(i))t={kind:`binary`,op:i,left:t,right:a};else throw new F(`unexpected operator '${i}'`,n.pos)}return t}parseUnary(){let e=this.peek();if(e.type===`punct`&&(e.punct===`!`||e.punct===`-`)){let t=e.punct;this.pos+=1;let n=this.parseUnary();return this.countNode(),{kind:`unary`,op:t,operand:n}}return this.parsePrimary()}parsePrimary(){let e=this.next();switch(e.type){case`number`:return this.countNode(),{kind:`literal`,value:e.value};case`string`:return this.countNode(),{kind:`literal`,value:e.value};case`keyword`:return this.countNode(),{kind:`literal`,value:e.keyword===`null`?null:e.keyword===`true`};case`identifier`:{let t=this.peek();return t.type===`punct`&&t.punct===`(`?this.parseCall(e.name,e.pos):(this.identifiers.add(e.name),this.countNode(),{kind:`identifier`,name:e.name})}case`punct`:if(e.punct===`(`){let e=this.parseTernary();return this.expectPunct(`)`),e}throw new F(`unexpected token '${e.punct}'`,e.pos);case`eof`:throw new F(`unexpected end of expression`,e.pos)}}parseCall(e,t){if(!Fa.has(e))throw new F(`unknown function '${e}'`,t);this.expectPunct(`(`);let n=[];if(!this.matchPunct(`)`))for(;;){if(n.push(this.parseTernary()),n.length>16)throw new F(`too many arguments to '${e}'`,t);if(!this.matchPunct(`,`)){this.expectPunct(`)`);break}}return this.callees.add(e),this.countNode(),{kind:`call`,callee:e,args:n}}};function no(e){return new to(Ya(e)).parse()}var ro=new Map;function io(e){let t=ro.get(e);if(t!==void 0)return ro.delete(e),ro.set(e,t),t;let n;try{n={ok:!0,parsed:no(e)}}catch(e){n={ok:!1,error:e instanceof F?e.message:String(e)}}if(ro.set(e,n),ro.size>256){let e=ro.keys().next().value;e!==void 0&&ro.delete(e)}return n}function ao(e){let t=io(e);if(t.ok)return t.parsed;throw new F(t.error)}function oo(e){return io(e)}var so=Object.freeze({});function co(e){let t=Object.create(null);for(let n of Object.keys(e))Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function lo(e){return typeof e==`number`&&Number.isFinite(e)}function uo(e){return!!e}function fo(e,t){if(!Number.isFinite(e))throw new I(`${t} produced a non-finite result`);return e}function po(e){if(e.steps+=1,e.steps>e.maxSteps)throw new I(`expression evaluation step budget exceeded`)}function z(e,t){switch(po(t),e.kind){case`literal`:return e.value;case`identifier`:if(!(e.name in t.scope))throw new I(`unknown identifier: ${e.name}`);return t.scope[e.name];case`unary`:return mo(e.op,z(e.operand,t));case`binary`:return ho(e.op,z(e.left,t),z(e.right,t));case`logical`:{let n=z(e.left,t);return e.op===`&&`?uo(n)?z(e.right,t):n:uo(n)?n:z(e.right,t)}case`conditional`:return uo(z(e.test,t))?z(e.consequent,t):z(e.alternate,t);case`call`:return go(e.callee,e.args.map(e=>z(e,t)),t.hooks)}}function mo(e,t){if(e===`!`)return!uo(t);if(!lo(t))throw new I(`unary "-" requires a finite number`);return fo(-t,`unary "-"`)}function ho(e,t,n){switch(e){case`==`:return t===n;case`!=`:return t!==n;case`+`:if(typeof t==`string`&&typeof n==`string`)return t+n;if(lo(t)&&lo(n))return fo(t+n,`"+"`);throw new I(`"+" requires two numbers or two strings`);case`-`:case`*`:case`/`:case`%`:if(!lo(t)||!lo(n))throw new I(`"${e}" requires two finite numbers`);return fo(e===`-`?t-n:e===`*`?t*n:e===`/`?t/n:t%n,`"${e}"`);case`<`:case`<=`:case`>`:case`>=`:if(lo(t)&&lo(n)||typeof t==`string`&&typeof n==`string`)return e===`<`?t<n:e===`<=`?t<=n:e===`>`?t>n:t>=n;throw new I(`"${e}" requires two numbers or two strings`)}}function go(e,t,n){if(!Object.prototype.hasOwnProperty.call(Pa,e))throw new I(`unknown function: ${e}`);let r=Pa[e];if(t.length<r.minArgs||t.length>r.maxArgs)throw new I(`${e}: wrong number of arguments (${t.length})`);return r.apply(t,n)}function _o(e,t,n){return z(e,{scope:t,hooks:n?.hooks??so,maxSteps:n?.maxSteps??4096,steps:0})}var vo=`now`;function yo(e){if(e===null)return null;if(typeof e==`string`||typeof e==`boolean`)return e;if(typeof e==`number`)return Number.isFinite(e)?e:void 0}function bo(e){let t=Object.keys(e.bindings);if(t.length>32)return`too many bindings (${t.length} > 32)`;for(let e of t){if(!Ha.test(e))return`invalid binding name '${e}'`;if(Ua.has(e))return`binding name '${e}' is reserved`;if(Fa.has(e))return`binding name '${e}' shadows a builtin function`}let n=oo(e.expr);if(!n.ok)return n.error;let r=new Set(t);for(let e of n.parsed.identifiers)if(e!==`now`&&!r.has(e))return`expression references unbound identifier '${e}'`;return null}function xo(e,t,n,r){let i=oo(e);if(!i.ok)return{ok:!1,error:i.error};let a=co({...t,now:n});try{return{ok:!0,value:_o(i.parsed.ast,a,r)}}catch(e){return{ok:!1,error:e instanceof I?e.message:String(e)}}}var So=i({kind:y(`field`).optional(),sourceKey:g(),cap:g(),fieldPath:g()}),Co=i({kind:y(`literal`),value:c([g(),a(),v(),ce()])}),wo=i({kind:y(`global`),sourceStableId:g(),cap:g(),fieldPath:g()}),To=c([So,Co,wo]),Eo=i({expr:g().min(1).max(Ia),bindings:n(g().regex(Ha),To)}).superRefine((e,t)=>{let n=bo(e);n!==null&&t.addIssue({code:`custom`,message:n,path:[`expr`]})}),Do=3,Oo=32,ko=m([`eq`,`ne`,`gt`,`gte`,`lt`,`lte`,`contains`,`in`]),Ao=i({kind:y(`condition`),deviceId:a().int().nonnegative(),cap:g().min(1),fieldPath:g().min(1),operator:ko,value:c([g(),a(),v(),p(c([g(),a()]))])}),jo=i({kind:y(`expression`),expr:g().min(1).max(Ia),bindings:n(g().regex(Ha),To)}).superRefine((e,t)=>{let n=bo(e);n!==null&&t.addIssue({code:`custom`,message:n,path:[`expr`]})}),Mo=r(()=>b(`kind`,[i({kind:y(`all`),children:p(Mo)}),i({kind:y(`any`),children:p(Mo)}),i({kind:y(`not`),child:Mo}),Ao,jo])),No=b(`kind`,[i({kind:y(`device-state`),deviceId:a().int().nonnegative(),cap:g().min(1),fieldPath:g().min(1),becomes:c([g(),a(),v()]).optional(),edge:v().optional(),forMs:a().int().min(0).max(864e5).optional(),debounceMs:a().int().min(0).max(6e5).optional()}),i({kind:y(`device-event`),category:g().min(1),deviceId:a().int().nonnegative().optional()}),i({kind:y(`schedule`),cron:g().min(1).max(120)}),i({kind:y(`manual`)})]),Po=b(`kind`,[i({kind:y(`wait`),seconds:a().min(0).max(300)}),i({kind:y(`cap`),deviceId:c([a().int(),i({$var:g().min(1)})]),cap:g().min(1),method:g().min(1),args:n(g(),u()).optional()}),i({kind:y(`code`),code:g().min(1).max(2e4)})]),Fo=i({triggers:p(No),conditions:Mo.optional(),actions:p(Po)});function Io(e){if(e.kind===`condition`||e.kind===`expression`)return 1;if(e.kind===`not`)return 1+Io(e.child);let t=e.children;if(t.length===0)return 1;let n=0;for(let e of t){let t=Io(e);t>n&&(n=t)}return 1+n}function Lo(e){if(e.kind===`condition`||e.kind===`expression`)return 1;if(e.kind===`not`)return Lo(e.child);let t=0;for(let n of e.children)t+=Lo(n);return t}function Ro(e){return e.kind===`condition`||e.kind===`expression`?!1:e.kind===`not`?Ro(e.child):e.children.length===0?!0:e.children.some(Ro)}function zo(e){if(e.triggers.length===0)return`an automation needs at least one trigger — without one nothing can start a run`;if(e.actions.length===0)return`an automation needs at least one action — a rule that does nothing is not a rule`;let t=e.conditions;if(t!==void 0){if(Ro(t))return`a condition group is empty — group existing rows instead of leaving a container to fill`;let e=Io(t);if(e>3)return`conditions nest ${e} levels deep — the limit is 3. "not (any of …)" is the same as "all of (not …)", which is one level shallower`;let n=Lo(t);if(n>32)return`conditions use ${n} leaves — the limit is 32`}return null}var Bo=15e3;function B(e){return JSON.stringify(e)}function Vo(e,t){switch(e.kind){case`all`:return`allOf([\n${e.children.map(e=>`${t} () => ${Vo(e,`${t} `)}`).join(`,
|
|
4
|
-
`)}\n${t}])`;case`any`:return`anyOf([\n${e.children.map(e=>`${t} () => ${Vo(e,`${t} `)}`).join(`,
|
|
5
|
-
`)}\n${t}])`;case`not`:return`notOf(() => ${Vo(e.child,t)})`;case`condition`:return`leaf(${B(e.deviceId)}, ${B(e.cap)}, ${B(e.fieldPath)}, ${B(e.operator)}, ${B(e.value)})`;case`expression`:return`exprLeaf(${B(e.expr)}, ${B(e.bindings)})`}}function Ho(e,t){switch(e.kind){case`schedule`:return` // trigger ${t}: schedule — armed to the next minute boundary and
|
|
6
|
-
// RE-ARMED from the wall clock every tick, so it cannot drift the way a
|
|
7
|
-
// setInterval(24h) does. No cron library: a block cannot resolve one.
|
|
8
|
-
{
|
|
9
|
-
let timer: ReturnType<typeof setTimeout> | undefined
|
|
10
|
-
const arm = (): void => {
|
|
11
|
-
timer = setTimeout(() => {
|
|
12
|
-
if (cronMatches(${B(e.cron)}, new Date())) {
|
|
13
|
-
void run({ kind: 'schedule', at: Date.now() })
|
|
14
|
-
}
|
|
15
|
-
arm()
|
|
16
|
-
}, nextMinuteBoundary())
|
|
17
|
-
}
|
|
18
|
-
arm()
|
|
19
|
-
disposers.push(() => { if (timer !== undefined) clearTimeout(timer) })
|
|
20
|
-
}`;case`device-event`:return` // trigger ${t}: device event
|
|
21
|
-
disposers.push(
|
|
22
|
-
ctx.eventBus.subscribe(
|
|
23
|
-
{ category: ${B(e.category)}${e.deviceId===void 0?``:`, deviceId: ${B(e.deviceId)}`} },
|
|
24
|
-
(event) => {
|
|
25
|
-
void run({
|
|
26
|
-
kind: 'device-event',
|
|
27
|
-
at: Date.now(),
|
|
28
|
-
deviceId: event.deviceId,
|
|
29
|
-
category: ${B(e.category)},
|
|
30
|
-
})
|
|
31
|
-
},
|
|
32
|
-
),
|
|
33
|
-
)`;case`device-state`:{let n=e.becomes===void 0?`undefined`:B(e.becomes);return` // trigger ${t}: device state — the mirror is the authority, the
|
|
34
|
-
// event only WAKES the evaluation, so a dropped event delays and never loses.
|
|
35
|
-
{
|
|
36
|
-
let previous: unknown = undefined
|
|
37
|
-
let debounce: ReturnType<typeof setTimeout> | undefined
|
|
38
|
-
let heldSince: number | undefined
|
|
39
|
-
const check = async (): Promise<void> => {
|
|
40
|
-
const value = await readField(${B(e.deviceId)}, ${B(e.cap)}, ${B(e.fieldPath)})
|
|
41
|
-
const want = ${n}
|
|
42
|
-
const matches = want === undefined ? value !== previous : value === want
|
|
43
|
-
const changed = value !== previous
|
|
44
|
-
previous = value
|
|
45
|
-
if (!matches) { heldSince = undefined; return }
|
|
46
|
-
if (${e.edge===!0?`true`:`false`} && !changed) return
|
|
47
|
-
const forMs = ${B(e.forMs??0)}
|
|
48
|
-
if (forMs > 0) {
|
|
49
|
-
if (heldSince === undefined) { heldSince = Date.now(); return }
|
|
50
|
-
if (Date.now() - heldSince < forMs) return
|
|
51
|
-
}
|
|
52
|
-
heldSince = undefined
|
|
53
|
-
void run({
|
|
54
|
-
kind: 'device-state',
|
|
55
|
-
at: Date.now(),
|
|
56
|
-
deviceId: ${B(e.deviceId)},
|
|
57
|
-
cap: ${B(e.cap)},
|
|
58
|
-
field: ${B(e.fieldPath)},
|
|
59
|
-
to: value,
|
|
60
|
-
})
|
|
61
|
-
}
|
|
62
|
-
const wake = (): void => {
|
|
63
|
-
if (debounce !== undefined) clearTimeout(debounce)
|
|
64
|
-
debounce = setTimeout(() => { void check() }, ${B(e.debounceMs??0)})
|
|
65
|
-
}
|
|
66
|
-
disposers.push(
|
|
67
|
-
ctx.eventBus.subscribe({ category: 'device.state-changed', deviceId: ${B(e.deviceId)} }, wake),
|
|
68
|
-
)
|
|
69
|
-
const reconcile = setInterval(() => { void check() }, RECONCILE_MS)
|
|
70
|
-
disposers.push(() => clearInterval(reconcile))
|
|
71
|
-
}`}case`manual`:return` // trigger ${t}: manual — fired by automation-control.trigger
|
|
72
|
-
// ("Run actions"), which runs the THEN half with an EMPTY vars bag.`}}function Uo(e,t){switch(e.kind){case`wait`:return` case ${t}: await sleep(${B(e.seconds*1e3)}); break`;case`cap`:return` case ${t}: {
|
|
73
|
-
const deviceId = ${typeof e.deviceId==`number`?B(e.deviceId):`resolveTarget(vars, ${B(e.deviceId.$var)})`}
|
|
74
|
-
await actuate(deviceId, ${B(e.cap)}, ${B(e.method)}, ${B(e.args??{})}, vars)
|
|
75
|
-
break
|
|
76
|
-
}`;case`code`:return` case ${t}: {
|
|
77
|
-
// inline code action — a fragment of THIS block, bundled by esbuild
|
|
78
|
-
await (async () => {
|
|
79
|
-
${e.code.split(`
|
|
80
|
-
`).map(e=>` ${e}`).join(`
|
|
81
|
-
`)}
|
|
82
|
-
})()
|
|
83
|
-
break
|
|
84
|
-
}`}}function Wo(e){let t=zo(e.recipe);if(t!==null)throw Error(`cannot generate an automation from an invalid recipe: ${t}`);let{name:n,recipe:r}=e,i=r.conditions===void 0?`true`:`await ${Vo(r.conditions,` `)}`;return`import type { AddonContext } from '@camstack/types'
|
|
85
|
-
import { evaluateExpressionSource, toExpressionValue } from '@camstack/types'
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* ${n}
|
|
89
|
-
*
|
|
90
|
-
* GENERATED FROM A RECIPE — do not edit by hand. Editing this file makes it a
|
|
91
|
-
* script: the visual editor reads AUTOMATION_RECIPE below, and hand edits are
|
|
92
|
-
* lost the next time the recipe is saved. Use "Eject to code" to take ownership
|
|
93
|
-
* of it permanently (one way).
|
|
94
|
-
*/
|
|
95
|
-
|
|
96
|
-
const AUTOMATION_RECIPE = ${JSON.stringify(r,null,2)} as const
|
|
97
|
-
|
|
98
|
-
const RECONCILE_MS = ${Bo}
|
|
99
|
-
|
|
100
|
-
/** A cap is named \`alarm-panel\`; \`ctx.api\` is keyed by the ROUTER name,
|
|
101
|
-
* \`alarmPanel\`. Indexing ctx.api with the cap name yields undefined and every
|
|
102
|
-
* action throws, so the conversion is not cosmetic. */
|
|
103
|
-
function capToRouterKey(cap: string): string {
|
|
104
|
-
return cap.replace(/-([a-z0-9])/g, (_m, c: string) => c.toUpperCase())
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/** Ms until the top of the next minute. Recomputed every tick so a long-lived
|
|
108
|
-
* schedule cannot accumulate drift. */
|
|
109
|
-
function nextMinuteBoundary(): number {
|
|
110
|
-
const now = Date.now()
|
|
111
|
-
return 60_000 - (now % 60_000)
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/** Does \`when\` satisfy a 5-field cron expression (min hour dom mon dow)?
|
|
115
|
-
* Supports wildcards, step syntax, ranges, comma lists and plain numbers —
|
|
116
|
-
* the subset an operator can author, and nothing that needs a library. */
|
|
117
|
-
function cronMatches(expr: string, when: Date): boolean {
|
|
118
|
-
const fields = expr.trim().split(/\\s+/)
|
|
119
|
-
if (fields.length !== 5) return false
|
|
120
|
-
const actual = [
|
|
121
|
-
when.getMinutes(),
|
|
122
|
-
when.getHours(),
|
|
123
|
-
when.getDate(),
|
|
124
|
-
when.getMonth() + 1,
|
|
125
|
-
when.getDay(),
|
|
126
|
-
]
|
|
127
|
-
return fields.every((field, i) => matchField(field, actual[i]!))
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function matchField(field: string, value: number): boolean {
|
|
131
|
-
for (const part of field.split(',')) {
|
|
132
|
-
const [range, stepRaw] = part.split('/')
|
|
133
|
-
const step = stepRaw === undefined ? 1 : Number.parseInt(stepRaw, 10)
|
|
134
|
-
if (!Number.isFinite(step) || step < 1) continue
|
|
135
|
-
if (range === '*') {
|
|
136
|
-
if (value % step === 0) return true
|
|
137
|
-
continue
|
|
138
|
-
}
|
|
139
|
-
const bounds = range!.split('-')
|
|
140
|
-
const lo = Number.parseInt(bounds[0]!, 10)
|
|
141
|
-
const hi = bounds[1] === undefined ? lo : Number.parseInt(bounds[1], 10)
|
|
142
|
-
if (!Number.isFinite(lo) || !Number.isFinite(hi)) continue
|
|
143
|
-
if (value >= lo && value <= hi && (value - lo) % step === 0) return true
|
|
144
|
-
}
|
|
145
|
-
return false
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export default function block(ctx: AddonContext) {
|
|
149
|
-
const disposers: Array<() => void> = []
|
|
150
|
-
const sleep = (ms: number): Promise<void> => new Promise((r) => setTimeout(r, ms))
|
|
151
|
-
|
|
152
|
-
/** Read one cap field off the state mirror. Returns undefined when the device,
|
|
153
|
-
* the cap or the field cannot be resolved — the caller decides what that
|
|
154
|
-
* means, and it always logs. */
|
|
155
|
-
async function readField(
|
|
156
|
-
deviceId: number,
|
|
157
|
-
cap: string,
|
|
158
|
-
fieldPath: string,
|
|
159
|
-
): Promise<unknown> {
|
|
160
|
-
try {
|
|
161
|
-
const slice = await ctx.api.deviceState.getCapSlice.query({ deviceId, capName: cap })
|
|
162
|
-
let cursor: unknown = slice
|
|
163
|
-
for (const part of fieldPath.split('.')) {
|
|
164
|
-
if (cursor === null || typeof cursor !== 'object') return undefined
|
|
165
|
-
cursor = (cursor as Record<string, unknown>)[part]
|
|
166
|
-
}
|
|
167
|
-
return cursor
|
|
168
|
-
} catch {
|
|
169
|
-
return undefined
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
function compare(actual: unknown, operator: string, expected: unknown): boolean {
|
|
174
|
-
switch (operator) {
|
|
175
|
-
case 'eq': return actual === expected
|
|
176
|
-
case 'ne': return actual !== expected
|
|
177
|
-
case 'gt': return typeof actual === 'number' && typeof expected === 'number' && actual > expected
|
|
178
|
-
case 'gte': return typeof actual === 'number' && typeof expected === 'number' && actual >= expected
|
|
179
|
-
case 'lt': return typeof actual === 'number' && typeof expected === 'number' && actual < expected
|
|
180
|
-
case 'lte': return typeof actual === 'number' && typeof expected === 'number' && actual <= expected
|
|
181
|
-
case 'contains': return typeof actual === 'string' && typeof expected === 'string' && actual.includes(expected)
|
|
182
|
-
case 'in': return Array.isArray(expected) && expected.some((v) => v === actual)
|
|
183
|
-
default: return false
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
/** A leaf whose device or cap is currently unresolvable is FALSE and logs.
|
|
188
|
-
* It never throws the pass away, and it never counts as true. */
|
|
189
|
-
async function leaf(
|
|
190
|
-
deviceId: number,
|
|
191
|
-
cap: string,
|
|
192
|
-
fieldPath: string,
|
|
193
|
-
operator: string,
|
|
194
|
-
expected: unknown,
|
|
195
|
-
): Promise<boolean> {
|
|
196
|
-
const actual = await readField(deviceId, cap, fieldPath)
|
|
197
|
-
if (actual === undefined) {
|
|
198
|
-
ctx.logger.warn('condition leaf unresolvable — treated as false', {
|
|
199
|
-
tags: { deviceId },
|
|
200
|
-
cap,
|
|
201
|
-
fieldPath,
|
|
202
|
-
})
|
|
203
|
-
return false
|
|
204
|
-
}
|
|
205
|
-
return compare(actual, operator, expected)
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/** The expression leaf goes through the bounded engine — parsed AST, no
|
|
209
|
-
* member access, no loops, hard step/node limits. Never inline JS. */
|
|
210
|
-
async function exprLeaf(
|
|
211
|
-
expr: string,
|
|
212
|
-
bindings: Record<string, { kind?: string; cap?: string; fieldPath?: string; value?: unknown; sourceStableId?: string }>,
|
|
213
|
-
): Promise<boolean> {
|
|
214
|
-
const values: Record<string, string | number | boolean | null> = {}
|
|
215
|
-
for (const [alias, binding] of Object.entries(bindings)) {
|
|
216
|
-
if (binding.kind === 'literal') {
|
|
217
|
-
values[alias] = toExpressionValue(binding.value) ?? null
|
|
218
|
-
continue
|
|
219
|
-
}
|
|
220
|
-
const deviceId = await stableIdToDeviceId(binding.sourceStableId)
|
|
221
|
-
if (deviceId === undefined) {
|
|
222
|
-
ctx.logger.warn('condition leaf unresolvable — treated as false', {
|
|
223
|
-
tags: { deviceId: -1 },
|
|
224
|
-
binding: alias,
|
|
225
|
-
})
|
|
226
|
-
return false
|
|
227
|
-
}
|
|
228
|
-
const raw = await readField(deviceId, binding.cap ?? '', binding.fieldPath ?? '')
|
|
229
|
-
values[alias] = toExpressionValue(raw) ?? null
|
|
230
|
-
}
|
|
231
|
-
const result = evaluateExpressionSource(expr, values, Date.now())
|
|
232
|
-
if (!result.ok) {
|
|
233
|
-
ctx.logger.warn('expression leaf failed — treated as false', { expr, error: result.error })
|
|
234
|
-
return false
|
|
235
|
-
}
|
|
236
|
-
return result.value === true
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
async function stableIdToDeviceId(stableId: string | undefined): Promise<number | undefined> {
|
|
240
|
-
if (stableId === undefined) return undefined
|
|
241
|
-
try {
|
|
242
|
-
const all = await ctx.api.deviceManager.listAll.query({})
|
|
243
|
-
const hit = all.devices.find((d: { stableId?: string; id: number }) => d.stableId === stableId)
|
|
244
|
-
return hit?.id
|
|
245
|
-
} catch {
|
|
246
|
-
return undefined
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
async function allOf(children: Array<() => Promise<boolean>>): Promise<boolean> {
|
|
251
|
-
for (const c of children) { if (!(await c())) return false }
|
|
252
|
-
return true
|
|
253
|
-
}
|
|
254
|
-
async function anyOf(children: Array<() => Promise<boolean>>): Promise<boolean> {
|
|
255
|
-
for (const c of children) { if (await c()) return true }
|
|
256
|
-
return false
|
|
257
|
-
}
|
|
258
|
-
async function notOf(child: () => Promise<boolean>): Promise<boolean> {
|
|
259
|
-
return !(await child())
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
/** A {$var} action target, resolved from the run's bag BEFORE dispatch — the
|
|
263
|
-
* action runner only ever sees a number. */
|
|
264
|
-
function resolveTarget(vars: Record<string, unknown>, name: string): number {
|
|
265
|
-
const raw = vars[name]
|
|
266
|
-
if (typeof raw === 'number') return raw
|
|
267
|
-
throw new Error('action target var "' + name + '" is not a device id')
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/** Substitute {{vars.x}} slots. Substitution only — never evaluation. */
|
|
271
|
-
function substitute(value: unknown, vars: Record<string, unknown>): unknown {
|
|
272
|
-
if (typeof value !== 'string') return value
|
|
273
|
-
return value.replace(/\\{\\{\\s*vars\\.([A-Za-z_][A-Za-z0-9_]*)\\s*\\}\\}/g, (_m, key: string) => {
|
|
274
|
-
const v = vars[key]
|
|
275
|
-
if (v === undefined) {
|
|
276
|
-
ctx.logger.warn('template referenced a var that was never set', { var: key })
|
|
277
|
-
return ''
|
|
278
|
-
}
|
|
279
|
-
return String(v)
|
|
280
|
-
})
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
async function actuate(
|
|
284
|
-
deviceId: number,
|
|
285
|
-
cap: string,
|
|
286
|
-
method: string,
|
|
287
|
-
args: Record<string, unknown>,
|
|
288
|
-
vars: Record<string, unknown>,
|
|
289
|
-
): Promise<void> {
|
|
290
|
-
const resolved: Record<string, unknown> = {}
|
|
291
|
-
for (const [k, v] of Object.entries(args)) resolved[k] = substitute(v, vars)
|
|
292
|
-
const client = (ctx.api as unknown as Record<string, Record<string, { mutate: (i: unknown) => Promise<unknown> }>>)[capToRouterKey(cap)]
|
|
293
|
-
if (client === undefined || client[method] === undefined) {
|
|
294
|
-
throw new Error('no such device method: ' + cap + '.' + method)
|
|
295
|
-
}
|
|
296
|
-
await client[method]!.mutate({ ...resolved, deviceId })
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
async function evaluateConditions(): Promise<boolean> {
|
|
300
|
-
return ${i}
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
/** The THEN half. Stops at the first failure — continuing past a failed step
|
|
304
|
-
* executes an intent the operator never expressed. */
|
|
305
|
-
async function runActions(vars: Record<string, unknown>): Promise<void> {
|
|
306
|
-
for (let step = 0; step < ${r.actions.length}; step += 1) {
|
|
307
|
-
try {
|
|
308
|
-
switch (step) {
|
|
309
|
-
${r.actions.map((e,t)=>Uo(e,t)).join(`
|
|
310
|
-
`)}
|
|
311
|
-
}
|
|
312
|
-
} catch (err: unknown) {
|
|
313
|
-
ctx.logger.warn('action failed — stopping the sequence', {
|
|
314
|
-
step,
|
|
315
|
-
error: err instanceof Error ? err.message : String(err),
|
|
316
|
-
})
|
|
317
|
-
return
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
async function run(trigger: Record<string, unknown>): Promise<void> {
|
|
323
|
-
const vars: Record<string, unknown> = { ...trigger }
|
|
324
|
-
const passed = await evaluateConditions()
|
|
325
|
-
if (!passed) {
|
|
326
|
-
ctx.logger.debug('automation did not run — conditions were false', { trigger })
|
|
327
|
-
return
|
|
328
|
-
}
|
|
329
|
-
ctx.logger.info('automation running', { trigger })
|
|
330
|
-
await runActions(vars)
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
${r.triggers.map((e,t)=>Ho(e,t)).join(`
|
|
334
|
-
|
|
335
|
-
`)}
|
|
336
|
-
|
|
337
|
-
return () => {
|
|
338
|
-
for (const dispose of disposers) dispose()
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
`}var Go=i({id:g(),label:g(),icon:g(),path:g(),remoteName:g(),bundle:g(),section:g().optional(),sectionLabel:g().optional()}),Ko=i({addonId:g(),page:Go,bundleUrl:g()}),qo={name:`addon-pages`,scope:`system`,mode:`singleton`,methods:{listPages:T(h(),p(Ko).readonly())}},Jo=i({id:g(),label:g(),icon:g(),path:g(),remoteName:g(),bundle:g(),section:g().optional(),sectionLabel:g().optional()}),Yo={name:`addon-pages-source`,scope:`system`,mode:`collection`,internal:!0,methods:{listPages:T(h(),p(Jo).readonly())}},Xo=i({method:m([`GET`,`POST`,`PUT`,`DELETE`,`PATCH`]),path:g(),access:m([`public`,`authenticated`,`admin`]).optional(),description:g().optional()}),Zo=i({method:g(),path:g(),params:n(g(),g()),query:n(g(),g()),body:u(),headers:n(g(),g()),user:i({id:g(),username:g(),isAdmin:v()}).optional(),scopedToken:u().optional()}),Qo=i({status:a().int(),headers:n(g(),g()),redirectUrl:g().nullable(),body:u().optional(),contentType:g().optional()}),$o={name:`addon-routes`,scope:`system`,mode:`collection`,internal:!0,methods:{getRoutes:T(h(),p(Xo)),invoke:T(Zo,Qo,{kind:`mutation`})},mount:{kind:`skip`}},es=i({id:g(),label:g(),icon:g(),order:a().optional()}),ts=i({id:g(),title:g(),description:g().optional(),style:m([`card`,`accordion`]).optional(),defaultCollapsed:v().optional(),columns:c([y(1),y(2),y(3),y(4)]).optional(),tab:g().optional(),location:m([`settings`,`top-tab`]).optional(),order:a().optional(),fields:p(ie())}),V=i({tabs:p(es).optional(),sections:p(ts)}),ns=n(g(),u()),rs=i({success:y(!0)}),is={name:`addon-settings`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{getGlobalSettings:T(i({addonId:g(),nodeId:g().optional(),overlay:n(g(),u()).optional(),cap:g().optional()}),V.nullable()),updateGlobalSettings:T(i({addonId:g(),nodeId:g().optional(),patch:ns}),rs,{kind:`mutation`,auth:`admin`}),getDeviceSettings:T(i({addonId:g(),deviceId:a(),nodeId:g().optional()}),V.nullable()),updateDeviceSettings:T(i({addonId:g(),deviceId:a(),nodeId:g().optional(),patch:ns}),rs,{kind:`mutation`,auth:`admin`})}},as=m([`device-tab`,`dashboard`,`integration-detail`]),os=m([`xs`,`sm`,`md`,`lg`,`xl`]),ss=i({remoteName:g(),exposedModule:g(),componentKey:g().optional()}),cs=i({tab:g(),subTab:g().optional(),label:g(),order:a().optional(),kind:y(`remote`),remote:ss,stableId:g(),description:g().optional(),icon:g().optional(),bundle:g(),hosts:p(as).readonly(),requires:i({deviceContext:v().default(!1),integrationContext:v().default(!1)}),preAuth:v().optional().default(!1),defaultSize:os.default(`md`),allowedSizes:p(os).readonly().default([`sm`,`md`,`lg`]),defaultColumns:a().int().min(1).max(12).default(6),defaultRows:a().int().min(1).max(12).default(1)}),ls={name:`addon-widgets-source`,scope:`system`,mode:`collection`,internal:!0,methods:{listWidgets:T(h(),p(cs).readonly())}},us=cs.extend({addonId:g(),bundleUrl:g()}),ds={name:`addon-widgets`,scope:`system`,mode:`singleton`,methods:{listWidgets:T(h(),p(us).readonly())}},fs=m([`info`,`success`,`warning`,`error`]),ps=m([`active`,`in-progress`,`completed`,`failed`,`dismissed`]),ms=i({type:g(),id:g()}),hs=i({id:g(),category:g(),severity:fs,title:g(),message:g(),status:ps,progress:a().optional(),read:v(),createdAt:a(),updatedAt:a(),source:ms.optional(),metadata:n(g(),u()).optional()}),gs={name:`alerts`,scope:`system`,mode:`singleton`,methods:{emit:T(hs,h(),{kind:`mutation`}),update:T(i({alertId:g(),patch:hs.partial()}),h(),{kind:`mutation`}),list:T(i({unreadOnly:v().optional(),limit:a().optional()}).optional(),p(hs).readonly()),getUnreadCount:T(h(),a()),markRead:T(i({alertId:g()}),h(),{kind:`mutation`}),markAllRead:T(h(),h(),{kind:`mutation`}),dismiss:T(i({alertId:g()}),h(),{kind:`mutation`})}},_s={name:`audio-analysis`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],exposesDeviceSettings:!0,methods:{resolveDeviceSettings:T(i({deviceId:a()}),x())},events:{onAudioLevel:E(i({deviceId:a(),rms:a(),dbfs:a()}))}},vs=m([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]),ys=i({data:x(),format:vs,width:a(),height:a(),timestamp:a()}),H=i({x:a(),y:a(),w:a(),h:a()}),bs=i({class:g(),originalClass:g(),score:a(),bbox:H}),xs=i({data:_(Uint8Array),sampleRate:a(),channels:a(),timestamp:a(),deviceId:a().optional()}),Ss=i({rms:a(),dbfs:a()}),Cs=i({className:g(),originalClass:g().optional(),score:a()}),ws=i({level:Ss,classification:i({labels:p(Cs).readonly(),inferenceMs:a()}).optional(),timestamp:a()}),Ts=i({minConfidence:a().min(0).max(1).default(.3),allowedClasses:p(g()).default([])}),Es=i({labels:p(Cs).readonly(),rawLabels:p(Cs).readonly().optional(),inferenceMs:a()}),Ds=[{value:`auto`,label:`Auto (platform default)`},{value:`apple-soundanalysis`,label:`Apple SoundAnalysis (macOS 12+)`},{value:`yamnet-onnx`,label:`YAMNet ONNX (cross-platform)`}],Os={audioBackend:`auto`,probedBestAudioBackend:``,selectedAudioModel:``},ks={name:`audio-analyzer`,scope:`system`,mode:`singleton`,methods:{analyseChunk:T(i({chunk:xs,settings:Ts}),ws.nullable(),{kind:`mutation`}),classify:T(xs,Es,{timeoutMs:3e4}),isReady:T(h(),v()),dispose:T(h(),h(),{kind:`mutation`}),reprobeAudioEngine:T(h(),i({backend:g()}),{kind:`mutation`,auth:`admin`})}},As=m([`f32le`,`s16le`]),js=i({codec:g(),canDecode:v(),canEncode:v(),label:g().optional()}),Ms=i({codec:g(),sourceSampleRate:a().int().positive(),sourceChannels:a().int().positive(),extraData:_(Uint8Array).optional(),targetSampleRate:a().int().positive(),targetChannels:a().int().positive(),targetFormat:As.optional(),idleMs:a().int().positive().optional(),tag:g().optional()}),Ns=i({codec:g(),sourceSampleRate:a().int().positive(),sourceChannels:a().int().positive(),sourceFormat:As.optional(),targetSampleRate:a().int().positive(),targetChannels:a().int().positive(),bitrateKbps:a().int().positive().optional(),idleMs:a().int().positive().optional(),tag:g().optional()}),Ps=i({data:_(Uint8Array),sampleRate:a().int().positive(),channels:a().int().positive(),format:As,pts:a()}),Fs=i({data:_(Uint8Array),codec:g(),pts:a(),frameComplete:v()}),Is=i({sessionId:g(),kind:m([`decode`,`encode`]),codec:g(),sourceSampleRate:a(),sourceChannels:a(),targetSampleRate:a(),targetChannels:a(),format:As,tag:g().optional(),createdAtMs:a(),lastActivityMs:a(),framesIn:a(),framesOut:a()}),Ls={name:`audio-codec`,scope:`system`,mode:`singleton`,preferredProvider:`decoder-nodeav`,methods:{listSupportedCodecs:T(h(),p(js).readonly()),canHandle:T(i({codec:g(),kind:m([`decode`,`encode`])}),v()),createDecodeSession:T(Ms,i({sessionId:g(),nodeId:g()}),{kind:`mutation`}),createEncodeSession:T(Ns,i({sessionId:g(),nodeId:g()}),{kind:`mutation`}),closeSession:T(i({sessionId:g(),nodeId:g().optional()}),h(),{kind:`mutation`}),pushEncodedFrame:T(i({sessionId:g(),nodeId:g().optional(),data:_(Uint8Array),pts:a().optional()}),h(),{kind:`mutation`}),pullPcm:T(i({sessionId:g(),nodeId:g().optional(),maxCount:a().int().positive().default(8)}),p(Ps)),pushPcm:T(i({sessionId:g(),nodeId:g().optional(),data:_(Uint8Array),pts:a().optional()}),h(),{kind:`mutation`}),pullEncoded:T(i({sessionId:g(),nodeId:g().optional(),maxCount:a().int().positive().default(8)}),p(Fs)),flushEncode:T(i({sessionId:g(),nodeId:g().optional()}),p(Fs),{kind:`mutation`}),listActiveSessions:T(h(),p(Is).readonly())}},Rs=i({userId:g(),username:g(),email:g().optional(),displayName:g().optional(),isAdmin:v().default(!1)}),zs={name:`auth-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{validateCredentials:T(i({username:g(),password:g()}),Rs.nullable(),{kind:`mutation`}),getLoginUrl:T(i({state:g()}),g()),handleCallback:T(n(g(),g()),Rs,{kind:`mutation`}),validateToken:T(i({token:g()}),Rs.nullable())},mount:{kind:`skip`}},Bs=i({subId:g(),displayName:g(),description:g().optional(),kind:g(),triggerSupported:v(),restoreSupported:v()}).extend({id:g(),addonId:g(),enabled:v(),retentionCount:a(),label:g().optional(),lastSuccessAt:a().optional(),lastSuccessSizeBytes:a().optional(),cron:g().optional(),nextRunAt:a().optional(),lastRunAt:a().optional()}),Vs=i({id:g(),filename:g(),createdAt:a(),sizeBytes:a(),label:g().optional(),locations:p(g()).readonly()}),Hs=i({id:g(),destinationId:g().optional(),label:g().optional(),createdAt:a(),sizeBytes:a(),locations:p(g()).optional()}),Us=i({path:g(),kind:m([`file`,`dir`,`symlink`]),sizeBytes:a(),mtime:a()}),Ws=i({archiveVersion:y(1),createdAt:a(),dataDir:g(),locations:p(g()),entries:p(Us),totalBytes:a(),totalFiles:a()}),Gs=i({name:g(),sizeBytes:a(),fileCount:a(),present:v()}),Ks=i({id:g(),label:g(),cron:g(),enabled:v(),locationIds:p(g()).readonly(),retentionCount:a().int().min(1).max(1e3),dataSources:p(g()).readonly().optional(),lastRunAt:a().optional(),nextRunAt:a().optional()}),qs={name:`backup`,scope:`system`,mode:`singleton`,methods:{listDestinations:T(h(),p(Bs).readonly(),{auth:`admin`}),trigger:T(i({destinations:p(g()).optional(),locations:p(g()).optional(),label:g().optional(),retentionCount:a().int().min(1).max(1e3).optional()}).optional(),p(Hs).readonly(),{kind:`mutation`,auth:`admin`}),list:T(h(),p(Hs).readonly(),{auth:`admin`}),listLocations:T(h(),p(Gs).readonly(),{auth:`admin`}),getEntries:T(i({destinationId:g(),backupId:g()}),Ws.nullable(),{auth:`admin`}),restore:T(i({destinationId:g(),backupId:g(),locations:p(g()).optional()}),h(),{kind:`mutation`,auth:`admin`}),delete:T(i({destinationId:g(),backupId:g()}),h(),{kind:`mutation`,auth:`admin`}),listArchives:T(i({destinationId:g()}),p(Vs).readonly(),{auth:`admin`}),upsertDestinationPolicy:T(i({locationId:g(),enabled:v(),retentionCount:a().int().min(1).max(1e3),label:g().optional(),cron:g().optional()}),h(),{kind:`mutation`,auth:`admin`}),previewSchedule:T(i({cron:g(),count:a().int().min(1).max(20).optional()}),i({ok:v(),error:g().optional(),nextRuns:p(a()).readonly()})),listSchedules:T(h(),p(Ks).readonly(),{auth:`admin`}),upsertSchedule:T(i({id:g().optional(),label:g(),cron:g(),enabled:v(),locationIds:p(g()).readonly(),retentionCount:a().int().min(1).max(1e3),dataSources:p(g()).readonly().optional()}),Ks,{kind:`mutation`,auth:`admin`}),deleteSchedule:T(i({id:g()}),h(),{kind:`mutation`,auth:`admin`})}},Js=m([`connected`,`disconnected`,`connecting`,`auth-failed`,`unreachable`,`error`]),Ys=i({id:g(),addonId:g(),name:g(),kind:g(),status:Js,info:n(g(),u()),lastCheckedAt:a().nullable(),error:g().nullable()}),Xs=i({brokerCount:a().int().nonnegative(),connectedCount:a().int().nonnegative()}),Zs=i({addonId:g(),kinds:p(i({kind:g(),label:g()}))}),Qs=i({kind:g().optional()}),$s=i({id:g()}),ec=i({kind:g().min(1),name:g().min(1),id:g().min(1).optional(),settings:n(g(),u())}),tc=i({id:g()}),nc=i({id:g()}),rc=b(`ok`,[i({ok:y(!0),latencyMs:a().nonnegative()}),i({ok:y(!1),error:g()})]),ic=n(g(),u()),ac=i({kind:g()}),oc=i({kind:g(),settings:ic}),sc=b(`ok`,[i({ok:y(!0),latencyMs:a().nonnegative().optional()}).strict(),i({ok:y(!1),error:g()})]),cc=u().nullable(),lc=i({brokerId:g(),target:n(g(),u()),payload:u().optional()}),uc=i({brokerId:g(),filter:n(g(),u())}),dc=i({subscriptionId:g()}),fc=i({brokerId:g(),subscriptionId:g()}),pc=i({brokerId:g(),key:g()}),mc={name:`broker`,scope:`system`,mode:`collection`,providerKind:`broker`,status:{schema:Xs,kind:`poll`},methods:{list:T(Qs,p(Ys)),get:T($s,Ys.nullable()),listProviders:T(h(),p(Zs),{auth:`admin`}),add:T(ec,tc,{kind:`mutation`,auth:`admin`}),remove:T(nc,h(),{kind:`mutation`,auth:`admin`}),testConnection:T($s,rc,{kind:`mutation`,auth:`admin`}),getSettings:T($s,ic.nullable(),{auth:`admin`}),setSettings:T(i({id:g(),settings:ic}),h(),{kind:`mutation`,auth:`admin`}),getBrokerConfig:T($s,ic.nullable(),{auth:`admin`}),getSettingsSchema:T(ac,cc,{auth:`admin`}),testSettings:T(oc,sc,{kind:`mutation`,auth:`admin`}),publish:T(lc,u(),{kind:`mutation`,auth:`admin`}),subscribe:T(uc,dc,{kind:`mutation`,auth:`admin`}),unsubscribe:T(fc,h(),{kind:`mutation`,auth:`admin`}),getState:T(pc,u().nullable()),getStatus:T(h(),Xs)}},hc={name:`camera-pipeline-config`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],exposesDeviceSettings:!0,methods:{}},gc=m([`webrtc`,`hls`,`mjpeg`,`rtsp`]),_c=m([`mp4`,`gif`]),vc=i({kind:_c,handle:g(),nodeId:g(),mime:g(),bytes:a().int(),width:a().int(),height:a().int()}),yc=i({fromTs:a(),toTs:a(),packets:a().int()}),bc=i({media:p(vc).readonly(),coverage:yc,profile:S,video:m([`copy`,`encode`])}),xc=i({brokerId:g(),url:g(),mutedUrl:g(),enabled:v(),codec:g().optional(),resolution:i({width:a().int().positive(),height:a().int().positive()}).optional()}),Sc=i({sessionId:g(),remoteAddr:g(),userAgent:g().nullish(),playing:v(),muted:v(),connectedAt:a(),lastRtpAt:a(),bytesSent:a()}),Cc=i({tag:g(),subscribedAt:a(),maxFps:a(),framesDelivered:a(),framesDropped:a()}),wc=i({tag:g(),subscribedAt:a(),chunksDelivered:a()}),Tc=m([`alexa`,`homekit`,`webrtc-browser`,`webrtc-mobile`,`webrtc-whep`,`rtsp-listen`,`derived-broker`,`recording`,`pipeline`,`snapshot`,`warmup`,`unknown`]),Ec=i({kind:Tc,label:g().optional(),media:m([`audio`,`video`,`both`]).optional(),targetCodec:g().optional(),transport:m([`passthrough`,`repacketize`,`transcode`]).optional(),remoteAddr:g().optional(),userAgent:g().optional(),userId:g().optional(),sessionId:g().optional(),extra:n(g(),g()).optional()}).readonly(),Dc=i({id:g(),channel:m([`annexb`,`rtp`]),attribution:Ec,subscribedAt:a(),packetsDelivered:a()}),Oc=i({rtsp:p(Sc).readonly(),decoded:p(Cc).readonly(),audio:p(wc).readonly(),encoded:p(Dc).readonly(),pipeClients:a(),encodedSubscribers:a()}),kc=m([`reconnecting`,`sleeping`,`offline`,`disabled`,`waking`]),Ac=m([`h264`,`h265`,`copy`]),jc=m([`aac`,`opus`,`pcmu`,`copy`,`none`]),Mc=i({deviceId:a().int().nonnegative(),video:Ac,audio:jc.optional(),profile:S.optional(),targetResolution:i({width:a().int().positive(),height:a().int().positive()}).optional(),outputArgs:p(g()).optional(),audioEgress:v().optional(),hostname:g().optional(),tag:g().optional()}),Nc=i({url:g(),videoCodec:m([`H264`,`H265`]),audioCodec:g(),resolution:i({width:a().int().positive(),height:a().int().positive()}),transcoded:v(),encoder:g(),pipelineKey:g()}),Pc=Hn.omit({inputArgs:!0,outputArgs:!0}),Fc=m([`tight`,`relaxed`]),Ic=i({deviceId:a().int().nonnegative(),source:b(`kind`,[i({kind:y(`profile`),profile:S}),i({kind:y(`cam-stream`),camStreamId:g().min(1)})]),encode:Pc,rateControl:Fc.optional(),bitstreamFilter:m([`dump_extra`,`h264_mp4toannexb`,`hevc_mp4toannexb`]).optional(),publishLocally:v().optional(),pixelFormat:m([`yuv420p`,`nv12`]).optional(),decodeHwAccel:m([`auto`,`none`,`videotoolbox`,`vaapi`,`qsv`,`cuda`]).optional(),hostname:g().optional(),tag:g().optional()}),Lc=i({url:g(),pipelineKey:g(),videoCodec:m([`H264`,`H265`]),resolution:i({width:a().int().positive(),height:a().int().positive()}),transcoded:v(),encoder:g(),decodeHwAccel:g().nullable(),camStreamId:g().nullable()}),Rc={name:`stream-broker`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,methods:{publishCameraStream:T(i({deviceId:a().int().nonnegative(),camStreamId:g().min(1),kind:Ve,url:g().optional(),codec:g().optional(),resolution:He.optional(),fps:a().positive().optional(),label:g().optional(),deviceFeatures:p(g()).optional(),autoEligible:v().optional(),metadata:n(g(),u()).optional(),sourceCamStreamId:g().min(1).optional(),encodeProfile:Hn.optional()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),retractCameraStream:T(i({deviceId:a().int().nonnegative(),camStreamId:g().min(1)}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),assignProfile:T(i({deviceId:a().int().nonnegative(),profile:S,camStreamId:g().min(1)}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),unassignProfile:T(i({deviceId:a().int().nonnegative(),profile:S}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),renderPreBufferClip:T(i({deviceId:a(),profile:S.optional(),aroundMs:a(),preRollSec:a().min(0).max(20).default(3),postRollSec:a().min(0).max(20).default(5),format:m([`gif`,`mp4`]).default(`gif`),maxWidth:a().int().min(120).max(1920).default(480),fps:a().int().min(1).max(15).default(5),speed:a().min(1).max(8).default(2)}),i({base64:g(),mime:g(),bytes:a().int(),profile:S,durationMs:a()}),{kind:`mutation`,auth:`admin`}),produceEventMedia:T(i({deviceId:a(),profile:S.optional(),aroundMs:a(),preSeconds:a().min(0).max(20).default(4),postSeconds:a().min(0).max(20).default(6),kinds:p(_c).min(1).default([`mp4`]),gifMaxWidth:a().int().min(120).max(1280).default(640),gifFps:a().int().min(1).max(15).default(12),gifSpeed:a().min(1).max(8).default(4),speed:a().min(1).max(8).default(4)}),bc,{kind:`mutation`,auth:`admin`}),fetchEventMedia:T(i({handle:g()}),i({base64:g(),mime:g(),bytes:a().int()}).nullable(),{kind:`mutation`,auth:`admin`}),listAllCameraStreams:T(h(),p(Ue).readonly()),listAllProfileSlots:T(h(),p(Ge).readonly()),getBrokerStats:T(i({brokerId:g()}),st),probeStream:T(i({brokerId:g()}),i({probed:v(),summary:g()}),{kind:`mutation`,auth:`admin`}),listClients:T(i({brokerId:g()}),Oc),killClient:T(i({brokerId:g(),channel:m([`rtsp`,`decoded`,`audio`]),handle:g()}),i({killed:v()}),{kind:`mutation`,auth:`admin`}),restartProfile:T(i({deviceId:a().int().nonnegative(),profile:S}),i({success:v()}),{kind:`mutation`,auth:`admin`}),getStreamUrl:T(i({streamId:g(),format:gc}),i({url:g()})),getStreamWithCodec:T(Mc,Nc,{kind:`mutation`,auth:`admin`}),releaseStreamWithCodec:T(i({pipelineKey:g()}),i({released:v(),refcount:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),acquireEgressTranscode:T(Ic,Lc,{kind:`mutation`,auth:`admin`}),releaseEgressTranscode:T(i({pipelineKey:g()}),i({released:v(),refcount:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),subscribeAudioChunks:T(it,at,{kind:`mutation`}),pullAudioChunks:T(i({subscriptionId:g(),maxCount:a().int().positive().default(8)}),p(rt).readonly()),unsubscribeAudioChunks:T(i({subscriptionId:g()}),i({released:v()}),{kind:`mutation`}),subscribeFrames:T(tt,nt,{kind:`mutation`}),pullFrameHandles:T(i({subscriptionId:g(),maxCount:a().int().positive().default(4)}),p(C).readonly()),unsubscribeFrames:T(i({subscriptionId:g()}),i({released:v()}),{kind:`mutation`}),setPreBufferDuration:T(i({brokerId:g(),seconds:a().min(0).max(30)}),h(),{kind:`mutation`,auth:`admin`}),getPreBufferInfo:T(i({brokerId:g()}),i({configuredSec:a(),bufferedMs:a(),packetCount:a()})),getRtspPort:T(h(),a()),getAllRtspEntries:T(i({hostname:g().optional()}),p(xc).readonly()),getRtspEntry:T(i({brokerId:g(),hostname:g().optional()}),xc.nullable()),regenerateRtspToken:T(i({brokerId:g()}),g().nullable(),{kind:`mutation`,auth:`admin`}),setRtspEnabled:T(i({brokerId:g(),enabled:v()}),h(),{kind:`mutation`,auth:`admin`}),isRtspEnabled:T(i({brokerId:g()}),v()),getDeviceAudioMute:T(i({deviceId:a().int()}),i({muted:v(),appliedBrokers:a().int().nonnegative()})),setDeviceAudioMute:T(i({deviceId:a().int(),muted:v()}),i({muted:v(),appliedBrokers:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`})},events:{onCamStreamDemand:E(i({deviceId:a().int().nonnegative(),camStreamId:g(),profile:S})),onCamStreamIdle:E(i({deviceId:a().int().nonnegative(),camStreamId:g()})),onRequestStreamSourceRefresh:E(i({deviceId:a().int().nonnegative(),camStreamId:g(),brokerId:g()}))}},zc=m([`h264`,`h265`,`hevc`,`av1`,`mjpeg`,`vp8`,`vp9`]),Bc=i({acceptCodecs:p(zc).readonly().optional(),minHeight:a().int().positive().optional(),minWidth:a().int().positive().optional(),excludeDerived:v().optional(),requireSiblingCodec:p(zc).readonly().optional()}).readonly(),Vc=i({preferredProviders:p(g()).readonly().optional(),resolutionPreference:m([`highest`,`lowest`]).optional()}).readonly(),Hc=i({camStreamId:g(),codec:g().optional(),resolution:He.optional(),reason:g()}),Uc={name:`camera-streams`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],methods:{getCameraStreams:T(i({deviceId:a().int().nonnegative()}),p(Ue).readonly()),getBrokerStreams:T(i({deviceId:a().int().nonnegative()}),p(Ge).readonly()),getRtspEntries:T(i({deviceId:a().int().nonnegative(),hostname:g().optional()}),p(xc).readonly()),getProfileRtspEntries:T(i({deviceId:a().int().nonnegative(),hostname:g().optional()}),p(ct).readonly()),pickStream:T(i({deviceId:a().int().nonnegative(),requirements:Bc,preferences:Vc.optional()}),Hc.nullable())},events:{onCamStreamsChanged:E(i({deviceId:a().int().nonnegative(),camStreams:p(Ue).readonly()})),onProfileSlotsChanged:E(i({deviceId:a().int().nonnegative(),profileSlots:p(Ge).readonly()}))},runtimeState:i({online:v(),slotStatuses:i({high:We.optional(),mid:We.optional(),low:We.optional()}),slotErrors:i({high:g().optional(),mid:g().optional(),low:g().optional()}),lastChangedAt:a()}),durability:`session`};function Wc(e){let t=e._def;return e.constructor?.name===`ZodVoid`||t?.type===`void`||t?.typeName===`ZodVoid`}function Gc(e){let t=e._def;return e.constructor?.name===`ZodObject`||t?.type===`object`||t?.typeName===`ZodObject`}function Kc(e){let t=e;for(let e=0;e<8&&t!=null;e+=1){let e=t._def,n=t.constructor?.name;if(n===`ZodArray`||e?.type===`array`)return!0;if(!(n===`ZodReadonly`||e?.type===`readonly`||n===`ZodOptional`||e?.type===`optional`||n===`ZodNullable`||e?.type===`nullable`||n===`ZodDefault`||e?.type==="default")||e?.innerType==null)return!1;t=e.innerType}return!1}function qc(e,t){if(e===void 0||e.mode!==`collection`)return!1;let n=Et(e)[t];return n!==void 0&&n.kind!==`subscription`&&Kc(n.output)}function Jc(e){let t=e.loose;return typeof t==`function`?t.call(e):e}function Yc(e){if(!(typeof e!=`object`||!e)){for(let t of Object.values(e))if(typeof t==`object`&&t){let e=t.addonId;if(typeof e==`string`)return e}}}function Xc(e){if(e===null||typeof e!=`object`&&typeof e!=`function`)return!1;let t=e.shape??Zc(e._def?.shape);return typeof t==`object`&&!!t&&Object.prototype.hasOwnProperty.call(t,`addonId`)}function Zc(e){return typeof e==`function`?e():e}function Qc(e){return e===`public`?`public`:e===`admin`||e===`superAdmin`?`admin`:`protected`}function $c(e){return e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}var el=`core-block-`,tl=`core-blocks`;function nl(e){return`${el}${e}`}function rl(e){if(!e.startsWith(`core-block-`))return null;let t=e.slice(11);return t.length>0?t:null}var il=c([y(`hub`),g().min(1)]),al=m([`stopped`,`starting`,`running`,`failed`]),ol=i({name:g().min(1).max(120),code:g().max(2e5),enabled:v(),placement:il,integrationId:g().optional()}),U=ol.extend({id:g(),createdAt:a(),updatedAt:a(),createdBy:g(),status:al,lastError:g().optional(),lastChangedAt:a()}),sl=i({ok:v(),error:g().optional(),line:a().optional(),column:a().optional()}),cl={name:`core-blocks`,scope:`system`,mode:`singleton`,methods:{list:T(i({}),i({blocks:p(U)}),{auth:`admin`}),get:T(i({blockId:g()}),i({block:U.nullable()}),{auth:`admin`}),create:T(i({block:ol}),i({block:U}),{kind:`mutation`,auth:`admin`,caller:`required`}),update:T(i({blockId:g(),block:ol.partial()}),i({block:U}),{kind:`mutation`,auth:`admin`,caller:`required`}),delete:T(i({blockId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setEnabled:T(i({blockId:g(),enabled:v()}),i({block:U}),{kind:`mutation`,auth:`admin`}),restart:T(i({blockId:g()}),i({block:U}),{kind:`mutation`,auth:`admin`}),compile:T(i({code:g()}),sl,{kind:`mutation`,auth:`admin`}),getTypeDefs:T(i({}),i({libs:p(i({filePath:g(),content:g()}))}),{auth:`admin`})}};function ll(e){return e}function ul(e,t,n){return{input:e,output:t,kind:n?.kind??`query`,auth:n?.auth??`protected`,scope:n?.scope??{kind:`system`},...n?.caller?{caller:`required`}:{}}}function dl(e,t,n){return{input:e,output:t,kind:n?.kind??`query`,auth:n?.auth??`protected`,scope:{kind:`device`,...n?.deviceTypes?{deviceTypes:n.deviceTypes}:{}}}}var fl=i({stepId:g(),entry:ba}),pl={name:`custom-model-registry`,scope:`system`,mode:`collection`,internal:!0,methods:{listModels:T(h(),p(fl).readonly())}},W=i({where:n(g(),u()).optional(),whereIn:n(g(),p(u())).optional(),whereBetween:n(g(),s([u(),u()])).optional(),whereNot:n(g(),u()).optional(),orderBy:i({field:g(),direction:m([`asc`,`desc`])}).optional(),limit:a().optional(),offset:a().optional()}),ml=i({where:n(g(),u()).optional(),whereIn:n(g(),p(u())).optional(),whereBetween:n(g(),s([u(),u()])).optional(),whereNot:n(g(),u()).optional()}),hl=i({id:g(),data:n(g(),u())}),gl=i({name:g(),type:m([`TEXT`,`INTEGER`,`REAL`,`JSON`,`BOOLEAN`]),primaryKey:v().optional(),notNull:v().optional(),unique:v().optional(),defaultValue:c([g(),a(),v()]).optional()}),_l=i({name:g(),columns:p(g()).readonly(),unique:v().optional()}),vl={name:`settings-store`,scope:`system`,mode:`singleton`,methods:{get:T(i({namespace:g().optional(),collection:g(),key:g()}),u()),set:T(i({namespace:g().optional(),collection:g(),key:g(),value:u()}),h(),{kind:`mutation`}),query:T(i({namespace:g().optional(),collection:g(),filter:W.optional()}),p(hl).readonly()),insert:T(i({namespace:g().optional(),collection:g(),record:hl}),h(),{kind:`mutation`}),update:T(i({namespace:g().optional(),collection:g(),id:g(),data:n(g(),u())}),h(),{kind:`mutation`}),delete:T(i({namespace:g().optional(),collection:g(),key:g()}),h(),{kind:`mutation`}),deleteWhere:T(i({namespace:g().optional(),collection:g(),filter:ml}),i({deleted:a().int()}),{kind:`mutation`}),updateWhere:T(i({namespace:g().optional(),collection:g(),filter:ml,data:n(g(),u())}),i({updated:a().int()}),{kind:`mutation`}),count:T(i({namespace:g().optional(),collection:g(),filter:W.optional()}),a()),histogram:T(i({namespace:g().optional(),collection:g(),field:g(),bucketSize:a().int().positive(),origin:a().int(),filter:W.optional()}),p(i({bucket:a().int(),count:a().int()})).readonly()),isEmpty:T(i({namespace:g().optional(),collection:g()}),v()),declareCollection:T(i({namespace:g().optional(),collection:g(),columns:p(gl).readonly(),indexes:p(_l).readonly().optional()}),h(),{kind:`mutation`})}},yl=i({engineId:g(),kind:m([`relational`,`vector`]),displayName:g()}),bl={name:`data-store-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{getEngineInfo:T(h(),yl),get:T(i({namespace:g().optional(),collection:g(),key:g()}),u()),set:T(i({namespace:g().optional(),collection:g(),key:g(),value:u()}),h(),{kind:`mutation`}),query:T(i({namespace:g().optional(),collection:g(),filter:W.optional()}),p(hl).readonly()),insert:T(i({namespace:g().optional(),collection:g(),record:hl}),h(),{kind:`mutation`}),update:T(i({namespace:g().optional(),collection:g(),id:g(),data:n(g(),u())}),h(),{kind:`mutation`}),delete:T(i({namespace:g().optional(),collection:g(),key:g()}),h(),{kind:`mutation`}),deleteWhere:T(i({namespace:g().optional(),collection:g(),filter:ml}),i({deleted:a().int()}),{kind:`mutation`}),updateWhere:T(i({namespace:g().optional(),collection:g(),filter:ml,data:n(g(),u())}),i({updated:a().int()}),{kind:`mutation`}),count:T(i({namespace:g().optional(),collection:g(),filter:W.optional()}),a()),histogram:T(i({namespace:g().optional(),collection:g(),field:g(),bucketSize:a().int().positive(),origin:a().int(),filter:W.optional()}),p(i({bucket:a().int(),count:a().int()})).readonly()),isEmpty:T(i({namespace:g().optional(),collection:g()}),v()),declareCollection:T(i({namespace:g().optional(),collection:g(),columns:p(gl).readonly(),indexes:p(_l).readonly().optional()}),h(),{kind:`mutation`})}},xl=[{value:`auto`,label:`Auto (defer to probed best)`},{value:`none`,label:`Off (software)`},{value:`videotoolbox`,label:`VideoToolbox (macOS)`},{value:`cuda`,label:`CUDA (NVIDIA)`},{value:`nvdec`,label:`NVDEC (NVIDIA legacy)`},{value:`vaapi`,label:`VAAPI (Linux Intel/AMD)`},{value:`qsv`,label:`QuickSync (Intel)`},{value:`d3d11va`,label:`D3D11VA (Windows)`},{value:`dxva2`,label:`DXVA2 (Windows legacy)`},{value:`amf`,label:`AMF (AMD)`},{value:`vdpau`,label:`VDPAU (Linux NVIDIA legacy)`},{value:`drm`,label:`DRM (Linux generic)`}],Sl={hwaccel:`auto`,probedBestHwaccel:``},Cl=i({sessionId:g(),slotCount:a().int(),slotByteLength:a().int(),segmentBytes:a().int(),budgetMb:a().int(),framesWritten:a().int(),getFrameHits:a().int(),getFrameMisses:a().int()}),wl={name:`decoder`,scope:`system`,mode:`singleton`,preferredProvider:`decoder-nodeav`,methods:{supportsCodec:T(i({codec:g()}),v()),getInfo:T(h(),i({id:g(),name:g(),isPullMode:v().optional(),priority:a().optional(),hwaccel:g().optional(),probedBestHwaccel:g().optional()})),createSession:T(Yi,i({sessionId:g(),nodeId:g()})),destroySession:T(i({sessionId:g()}),h()),pushPacket:T(i({sessionId:g(),packet:Qe}),h()),openStream:T(i({sessionId:g(),url:g()}),h()),pullFrames:T(i({sessionId:g(),maxCount:a().default(1),waitMs:a().optional()}),p($e)),pullHandles:T(i({sessionId:g(),maxCount:a().default(1),waitMs:a().optional()}),p(C)),getFrame:T(i({handle:C}),$e.nullable()),getShmStats:T(i({sessionId:g()}),Cl.nullable()),updateConfig:T(i({sessionId:g(),config:Yi.partial()}),h()),getStats:T(i({sessionId:g()}),Ji),listActiveSessions:T(h(),p(i({sessionId:g(),codec:g(),outputFormat:g(),createdAtMs:a()})).readonly()),reprobeHwaccel:T(h(),i({backend:g()}),{kind:`mutation`,auth:`admin`})}},Tl={name:`detection-pipeline`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],exposesDeviceSettings:!0,methods:{}},El=i({id:g(),system:g(),uniqueId:g().optional(),raw:n(g(),u()).optional()});function Dl(e){return{id:e.stableId,system:e.addonId}}function Ol(e,t){let n={...e};for(let[r,i]of Object.entries(t))if(i!==void 0){if(r===`raw`&&typeof i==`object`&&i){n.raw={...e.raw,...i};continue}n[r]=i}return n}function kl(e){if(e==null)return;let t=e.trim();if(t===``)return;let n=t.toLowerCase();return n===`°c`||n===`c`||n===`celsius`?`°C`:n===`°f`||n===`f`||n===`fahrenheit`?`°F`:n===`k`||n===`kelvin`?`K`:n===`%`||n===`percent`||n===`percentage`?`%`:n===`lx`||n===`lux`?`lx`:n===`hpa`||n===`hectopascal`?`hPa`:n===`kpa`?`kPa`:n===`pa`?`Pa`:n===`mbar`||n===`millibar`?`mbar`:n===`w`||n===`watt`?`W`:n===`kw`||n===`kilowatt`?`kW`:n===`wh`||n===`watt-hour`?`Wh`:n===`kwh`||n===`kilowatt-hour`?`kWh`:n===`v`||n===`volt`?`V`:n===`a`||n===`amp`||n===`ampere`?`A`:n===`ma`||n===`milliampere`?`mA`:n===`va`?`VA`:n===`ppm`?`ppm`:n===`ppb`?`ppb`:n===`µg/m³`||n===`ug/m3`||n===`µg/m3`?`µg/m³`:n===`km/h`||n===`kph`?`km/h`:n===`mph`?`mph`:n===`m/s`?`m/s`:n===`m`?`m`:n===`km`?`km`:n===`kg`?`kg`:n===`g`?`g`:t}var Al=`sourceInfo`;function jl(e){if(!e)return null;let t=e[Al];if(!t)return null;let n=El.safeParse(t);return n.success?n.data:null}var Ml=m([`online`,`sleeping`,`offline`,`unknown`]),Nl=r(()=>i({childNativeId:g(),name:g(),type:m(D),status:Ml,metadata:i({model:g().optional(),serialNumber:g().optional(),uid:g().optional(),rtspChannel:a().int().nonnegative().optional(),isBattery:v().optional(),isDoorbell:v().optional(),isMultifocal:v().optional(),externalLocation:g().optional(),manufacturer:g().optional(),integration:g().optional()}).default({}),alreadyAdopted:v(),adoptedDeviceId:a().int().nonnegative().nullable(),capabilities:p(g()).readonly().optional(),features:p(g()).readonly().optional(),sourceInfo:El.optional(),children:p(Nl).readonly().optional()})),Pl=i({discovered:p(Nl),lastDiscoveryAt:a().int().nonnegative().nullable(),lastError:g().nullable()}),Fl={name:`device-discovery`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Hub],status:{schema:Pl,kind:`poll`},runtimeState:Pl.extend({lastFetchedAt:a().int().nonnegative()}),durability:`session`,methods:{listDiscovered:T(i({deviceId:a().int().nonnegative()}),p(Nl).readonly()),refreshDiscovery:T(i({deviceId:a().int().nonnegative()}),p(Nl).readonly(),{kind:`mutation`,auth:`admin`}),adoptDevice:T(i({deviceId:a().int().nonnegative(),childNativeId:g(),name:g().optional()}),i({deviceId:a().int().nonnegative(),stableId:g()}),{kind:`mutation`,auth:`admin`}),releaseDevice:T(i({deviceId:a().int().nonnegative(),childDeviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})}},Il=i({id:g(),label:g(),isDefault:v().optional()}),Ll=i({search:g().optional(),area:g().optional(),manufacturer:g().optional(),adoptedOnly:v().optional(),unadoptedOnly:v().optional()}),Rl=i({integrationId:g(),page:a().int().positive().default(1),pageSize:a().int().positive().max(2e4).default(50),filter:g().optional(),filterText:Ll.optional()}),zl=i({candidates:p(Nl).readonly(),totalCount:a().int().nonnegative(),page:a().int().positive(),pageSize:a().int().positive()}),Bl=i({integrationId:g(),childNativeId:g()}),Vl=i({lastDiscoveryAt:a().int().nonnegative().nullable(),candidateCount:a().int().nonnegative(),adoptedCount:a().int().nonnegative(),lastError:g().nullable()}),Hl=i({name:g().min(1).optional(),hiddenChildIds:p(g()).optional()}),Ul=i({integrationId:g(),childNativeIds:p(g()).min(1),filter:g().optional(),importLocations:v().optional(),perCandidate:n(g(),Hl).optional()}),Wl=i({adopted:p(i({childNativeId:g(),parentDeviceId:a().int().nonnegative(),accessoryDeviceIds:p(a().int().nonnegative()).readonly()})).readonly()}),Gl=i({integrationId:g(),camDeviceId:a().int().nonnegative()}),Kl=i({camDeviceId:a().int().nonnegative(),resetToSource:v().optional()}),ql=i({changed:v(),rebuiltChildren:a().int().nonnegative(),removedChildren:a().int().nonnegative().optional()}),Jl={name:`device-adoption`,scope:`system`,mode:`singleton`,status:{schema:Vl,kind:`poll`},methods:{listCandidateFilters:T(i({integrationId:g()}),i({filters:p(Il)}),{auth:`admin`}),listCandidates:T(Rl,zl,{auth:`admin`}),getCandidate:T(Bl,Nl.nullable(),{auth:`admin`}),refresh:T(i({integrationId:g()}),Vl,{kind:`mutation`,auth:`admin`}),adopt:T(Ul,Wl,{kind:`mutation`,auth:`admin`}),release:T(Gl,h(),{kind:`mutation`,auth:`admin`}),resync:T(Kl,ql,{kind:`mutation`,auth:`admin`})}},Yl=m([`unlinked`,`linked`,`error`]),Xl=i({label:g(),value:g(),secret:v().optional()}),Zl=i({qr:g().optional(),fields:p(Xl).readonly().optional(),note:g().optional()}),Ql=i({linkState:Yl,exposedDeviceCount:a(),error:g().optional(),setup:Zl.optional()}),$l=g(),eu=i({deviceId:g(),exposedAs:g().optional(),capabilities:p(g()).optional()}),tu=i({deviceId:g(),capabilities:p(g()).optional()}),nu=i({deviceId:g()}),ru={name:`device-export`,scope:`system`,mode:`collection`,providerKind:`device-export`,status:{schema:Ql,kind:`poll`},exposesDeviceSettings:!0,methods:{getStatus:T(h(),Ql),listSupportedDeviceKinds:T(h(),p($l)),listExposedDevices:T(h(),p(eu)),exposeDevice:T(tu,h(),{kind:`mutation`}),unexposeDevice:T(nu,h(),{kind:`mutation`})}},iu=i({connected:v(),deviceCount:a(),error:g().optional()}),au=i({externalId:g(),name:g(),type:g(),metadata:n(g(),u()).optional()}),ou=i({stableId:g(),type:m(D),suggestedName:g(),prefilledConfig:n(g(),u()),sourceInfo:El.optional()}),su=i({id:a(),stableId:g(),addonId:g(),type:g(),name:g(),parentDeviceId:a().nullable(),online:v(),features:p(g()),config:n(g(),u()),sourceInfo:El.optional()}),cu=i({status:m([`ok`,`error`]),labels:p(g()).optional(),error:g().optional()}),lu=u(),uu={name:`device-provider`,scope:`system`,mode:`collection`,methods:{start:T(h(),h(),{kind:`mutation`}),stop:T(h(),h(),{kind:`mutation`}),getStatus:T(h(),iu),getDevices:T(h(),p(i({id:g(),name:g(),type:g()}))),supportsDiscovery:T(i({}),v()),discoverDevices:T(i({params:n(g(),u()).optional()}),p(ou),{kind:`mutation`,auth:`admin`}),getDiscoveryParamsSchema:T(i({}),lu),getManualCreationType:T(i({}),i({deviceType:m(D).nullable()})),adoptDiscoveredDevice:T(i({candidate:ou}),su,{kind:`mutation`,auth:`admin`}),supportsManualCreation:T(i({}),v()),getChildCreationSchema:T(i({type:m(D)}),lu),createDevice:T(i({type:m(D),config:n(g(),u())}),su,{kind:`mutation`,auth:`admin`}),testCreationField:T(i({type:m(D),key:g(),value:u(),formValues:n(g(),u()).optional()}),cu,{kind:`mutation`,auth:`admin`})}},du=i({childKey:g(),section:g(),order:a().optional(),collapsed:v().optional()}),fu=i({unit:g().min(1).optional(),precision:a().int().min(0).max(10).optional()}),pu=i({icon:g().min(1).optional(),label:g().min(1).optional(),unit:g().min(1).optional(),precision:a().int().min(0).max(10).optional(),hidden:v().optional(),perCap:n(g(),fu).optional()}),mu=i({unit:g().min(1).optional(),precision:a().int().min(0).max(10).optional(),icon:g().min(1).optional()}),hu=i({id:a(),stableId:g(),addonId:g(),type:m(D),name:g(),location:g().nullable(),disabled:v(),parentDeviceId:a().nullable(),role:g().nullable().optional(),online:v(),probed:v().optional(),features:p(g()),isCamera:v(),config:n(g(),u()),metadata:n(g(),u()).nullable().optional(),sourceInfo:El.optional(),integrationId:g().optional(),linkDeviceId:a().nullable().optional(),primaryChildEntityId:g().nullable().optional(),childLayout:p(du).readonly().optional(),display:pu.optional()}),gu=i({key:g(),value:u(),description:g().optional()}),_u=m([`auto`,`manual`]),vu=i({deviceId:a(),name:g(),location:g().nullable(),features:p(g()),producesTrackedEvents:v().optional()}),yu=i({id:a(),stableId:g(),type:g(),name:g(),location:g().nullable(),disabled:v(),parentDeviceId:a().nullable(),role:g().nullable().optional()}),bu=i({id:a(),stableId:g(),addonId:g(),type:g(),name:g(),userNamed:v().optional(),location:g().nullable(),disabled:v(),parentDeviceId:a().nullable(),metadata:n(g(),u()).nullable().optional(),sourceInfo:El.optional(),integrationId:g().optional(),linkDeviceId:a().nullable().optional(),primaryChildEntityId:g().nullable().optional(),childLayout:p(du).readonly().optional(),role:g().nullable().optional(),display:pu.optional()}),xu=u().nullable(),Su=i({streamId:g(),width:a().optional(),height:a().optional(),codec:g().optional(),fps:a().optional(),bitrateKbps:a().optional()}),Cu=i({addonId:g(),stableId:g(),id:a(),type:g(),name:g(),location:g().nullable().optional(),disabled:v().optional(),parentDeviceId:a().nullable(),role:g().nullable().optional(),features:p(g()).optional(),config:n(g(),u())}),wu=i({deviceId:a()}),Tu=i({deviceId:a(),data:n(g(),u())}),Eu={name:`device-manager`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,methods:{allocateDeviceId:T(i({addonId:g(),stableId:g()}),i({id:a()}),{kind:`mutation`}),registerDevice:T(Cu,h(),{kind:`mutation`}),removeDevice:T(wu,h(),{kind:`mutation`}),persistConfig:T(Tu,h(),{kind:`mutation`}),loadConfig:T(i({deviceId:a()}),n(g(),u())),loadRuntimeState:T(i({deviceId:a()}),n(g(),u())),loadMeta:T(i({deviceId:a()}),bu.nullable()),setName:T(i({deviceId:a(),name:g()}),h(),{kind:`mutation`,auth:`admin`}),setLocation:T(i({deviceId:a(),location:g().nullable()}),h(),{kind:`mutation`,auth:`admin`}),setType:T(i({deviceId:a(),type:m(D)}),h(),{kind:`mutation`,auth:`admin`}),setIntegrationId:T(i({deviceId:a(),integrationId:g()}),h(),{kind:`mutation`,auth:`admin`}),setLinkDeviceId:T(i({deviceId:a(),linkDeviceId:a().nullable()}),h(),{kind:`mutation`,auth:`admin`}),setPrimaryChildEntityId:T(i({deviceId:a(),primaryChildEntityId:g().nullable()}),h(),{kind:`mutation`,auth:`admin`}),setChildLayout:T(i({deviceId:a(),childLayout:p(du).readonly()}),h(),{kind:`mutation`,auth:`admin`}),setDisplay:T(i({deviceId:a(),display:pu.nullable()}),h(),{kind:`mutation`,auth:`admin`}),getRoleDisplayDefaults:T(i({}),i({defaults:n(g(),mu)}),{kind:`query`}),setRoleDisplayDefaults:T(i({defaults:n(g(),mu)}),h(),{kind:`mutation`,auth:`admin`}),getWireableFields:T(i({deviceId:a(),includeSynthesizable:v().optional()}),i({caps:p(i({cap:g(),fields:p(i({path:g(),kind:m([`string`,`number`,`boolean`,`enum`]),enumValues:p(g()).optional(),item:v().optional()})).readonly(),itemArray:i({path:g(),keyField:g()}).optional()})).readonly()}),{kind:`query`}),setRole:T(i({deviceId:a(),role:g().nullable()}),h(),{kind:`mutation`,auth:`admin`}),applyInitialMeta:T(i({deviceId:a(),name:g().optional(),location:g().nullable().optional(),type:m(D).optional(),integrationId:g().optional(),linkDeviceId:a().nullable().optional(),role:g().nullable().optional()}),h(),{kind:`mutation`,auth:`admin`}),setMetadata:T(i({deviceId:a(),patch:n(g(),u())}),h(),{kind:`mutation`,auth:`admin`}),listLocations:T(h(),p(g())),addLocation:T(i({name:g()}),h(),{kind:`mutation`,auth:`admin`}),removeLocation:T(i({name:g(),cascade:v().optional()}),h(),{kind:`mutation`,auth:`admin`}),setDisabled:T(i({deviceId:a(),disabled:v()}),h(),{kind:`mutation`,auth:`admin`}),listPersistedByAddon:T(i({addonId:g()}),p(yu)),listAll:T(i({addonId:g().optional(),projection:m([`full`,`slim`]).optional(),isCamera:v().optional()}),p(hu)),getDevice:T(i({deviceId:a()}),hu.nullable()),getChildren:T(i({parentDeviceId:a()}),p(hu)),getLinkedDevices:T(i({deviceId:a()}),i({mode:_u,devices:p(vu)})),getStreamSources:T(i({deviceId:a()}),p(Xe)),getConfigSchema:T(i({deviceId:a()}),p(gu)),getSettingsSchema:T(i({deviceId:a()}),xu),updateConfig:T(i({deviceId:a(),values:n(g(),u())}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),enable:T(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),disable:T(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),remove:T(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),removeByIntegration:T(i({integrationId:g()}),i({removed:a()}),{kind:`mutation`,auth:`admin`}),getStreamProfileMap:T(i({deviceId:a()}),n(g(),g().nullable())),setStreamProfileMap:T(i({deviceId:a(),profileMap:n(g(),g().nullable())}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),probeStreams:T(i({deviceId:a()}),p(Su),{kind:`mutation`,auth:`admin`}),getBindings:T(i({deviceId:a()}),i({deviceId:a(),entries:p(i({capName:g(),kind:m([`native`,`wrapped`]),providerAddonId:g(),providerNodeId:g(),nativeAddonId:g()}))})),getAllBindings:T(i({}),p(i({deviceId:a(),entries:p(i({capName:g(),kind:m([`native`,`wrapped`]),providerAddonId:g(),providerNodeId:g(),nativeAddonId:g()}))}))),setWrapperActive:T(i({deviceId:a(),capName:g(),wrapperAddonId:g(),active:v()}),h(),{kind:`mutation`,auth:`admin`}),listWrappersForCap:T(i({capName:g()}),p(g())),listBindableCapsForDeviceType:T(i({deviceType:g()}),p(i({capName:g(),wrappers:p(g())}))),getDeviceSettingsAggregate:T(i({deviceId:a()}),V.nullable()),getDeviceLiveInfoAggregate:T(i({deviceId:a()}),V.nullable()),getDeviceAggregate:T(i({deviceId:a()}),i({settings:V.nullable(),live:V.nullable()})),runDeviceAction:T(i({deviceId:a().int().nonnegative(),action:g().min(1),input:u()}),u(),{kind:`mutation`}),updateDeviceField:T(i({deviceId:a(),writerCapName:g(),writerAddonId:g(),key:g(),value:u()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),updateDeviceFieldsBatch:T(i({deviceId:a(),changes:p(i({writerCapName:g(),writerAddonId:g(),key:g(),value:u()}))}),i({success:y(!0),failures:p(i({writerCapName:g(),writerAddonId:g(),error:g()}))}),{kind:`mutation`,auth:`admin`}),discoverDevices:T(i({addonId:g()}),p(ou),{kind:`mutation`,auth:`admin`}),adoptDevice:T(i({addonId:g(),candidate:ou,integrationId:g().optional()}),su,{kind:`mutation`,auth:`admin`}),getCreationSchema:T(i({addonId:g(),type:m(D)}),u().nullable()),createDevice:T(i({addonId:g(),type:m(D),config:n(g(),u()),integrationId:g().optional()}),su,{kind:`mutation`,auth:`admin`}),testCreationField:T(i({addonId:g(),type:m(D),key:g(),value:u(),formValues:n(g(),u()).optional()}),cu,{kind:`mutation`,auth:`admin`}),adoptionListCandidateFilters:T(i({addonId:g(),integrationId:g()}),i({filters:p(Il)}),{auth:`admin`}),adoptionListCandidates:T(Rl.extend({addonId:g()}),zl,{auth:`admin`}),adoptionRefresh:T(i({addonId:g(),integrationId:g()}),Vl,{kind:`mutation`,auth:`admin`}),adoptionAdopt:T(Ul.extend({addonId:g()}),Wl,{kind:`mutation`,auth:`admin`}),adoptionRelease:T(Gl.extend({addonId:g()}),h(),{kind:`mutation`,auth:`admin`}),adoptionStartJob:T(Ul.extend({addonId:g()}),i({jobId:g()}),{kind:`mutation`,auth:`admin`}),adoptionListJobs:T(i({addonId:g(),integrationId:g().optional()}),p(Er).readonly(),{auth:`admin`}),adoptionCancelJob:T(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),adoptionResync:T(Kl,ql,{kind:`mutation`,auth:`admin`}),discoveryProviders:T(i({}),i({providers:p(i({addonId:g(),label:g()})).readonly()}),{auth:`admin`}),discoverAllProviders:T(i({}),i({groups:p(i({addonId:g(),label:g(),candidates:p(ou).readonly(),error:g().nullable()})).readonly()}),{kind:`mutation`,auth:`admin`}),discoverProvider:T(i({addonId:g(),params:n(g(),u()).optional()}),i({candidates:p(ou).readonly()}),{kind:`mutation`,auth:`admin`}),providerCreationType:T(i({addonId:g()}),i({deviceType:m(D).nullable()}),{auth:`admin`}),providerDiscoveryParamsSchema:T(i({addonId:g()}),u(),{auth:`admin`}),testField:T(i({deviceId:a(),key:g(),value:u()}),cu,{kind:`mutation`,auth:`admin`}),getDeviceStatusAggregate:T(i({deviceId:a(),caps:p(g()).readonly().optional()}),n(g(),u().nullable())),getDeviceStatusAggregateBatch:T(i({deviceIds:p(a()).readonly(),caps:p(g()).readonly().optional()}),n(g(),n(g(),u().nullable())))}},Du={name:`device-state`,scope:`system`,mode:`singleton`,methods:{getSnapshot:T(i({deviceId:a()}),n(g(),n(g(),u()))),getCapSlice:T(i({deviceId:a(),capName:g()}),n(g(),u()).nullable()),getAllSnapshots:T(i({}),n(g(),n(g(),n(g(),u())))),setCapSlice:T(i({deviceId:a(),capName:g(),slice:n(g(),u())}),h(),{kind:`mutation`})},events:{onChanged:E(i({deviceId:a(),capName:g(),slice:n(g(),u())}))}},Ou=i({embedding:p(a()),inferenceMs:a()}),ku=i({modelId:g(),embeddingDim:a(),ready:v()}),Au={name:`embedding-encoder`,scope:`system`,mode:`collection`,internal:!0,methods:{encode:T(i({crop:_(Uint8Array),width:a(),height:a()}),Ou),encodeText:T(i({text:g()}),Ou),getInfo:T(h(),ku)}},ju=i({name:g(),path:g()}),Mu=i({path:g(),entries:p(ju).readonly(),freeBytes:a(),totalBytes:a()}),Nu={name:`filesystem-browse`,scope:`system`,mode:`singleton`,internal:!0,methods:{listAllowedRoots:T(h(),p(g()).readonly(),{auth:`admin`}),browse:T(i({path:g()}),Mu,{auth:`admin`}),createDir:T(i({path:g()}),i({path:g()}),{kind:`mutation`,auth:`admin`})}},Pu=i({inputTokens:a(),outputTokens:a()}),Fu=m([`timeout`,`rate-limited`,`auth`,`refusal`,`bad-request`,`unavailable`,`no-profile`,`budget-exceeded`,`adapter-error`]),Iu=i({ok:y(!0),text:g(),model:g(),usage:Pu,truncated:v(),latencyMs:a()}),Lu=i({ok:y(!1),code:Fu,message:g(),retryAfterMs:a().optional()}),Ru=b(`ok`,[Iu,Lu]),zu=i({bytes:_(Uint8Array),mimeType:g()}),Bu=i({enabled:v().default(!1),maxAttempts:a().int().min(1).max(5).default(1)}),Vu={totalMs:6e4,connectMs:1e4,firstTokenMs:12e4,idleMs:6e4},Hu=i({addonId:g().optional(),profileId:g().optional(),consumer:g(),system:g().optional(),prompt:g(),jsonSchema:n(g(),u()).optional(),maxTokens:a().int().positive().optional(),temperature:a().optional(),topP:a().min(0).max(1).optional(),topK:a().int().positive().optional(),timeoutMs:a().int().positive().optional(),retry:Bu.optional(),requestId:g().optional()}),Uu=i({url:g(),filename:g(),sizeBytes:a(),sha256:g().optional()}),Wu=b(`kind`,[i({kind:y(`catalog`),catalogId:g()}),i({kind:y(`url`),url:g(),sha256:g().optional(),label:g().optional(),sizeBytes:a().optional(),extraFiles:p(Uu).optional()}),i({kind:y(`path`),path:g()})]),Gu=i({nodeId:g(),engine:m([`llama-cpp`]),model:Wu,contextSize:a().int().default(4096),gpuLayers:a().int().default(0),threads:a().int().optional(),parallel:a().int().default(1),batchSize:a().int().positive().optional(),ubatchSize:a().int().positive().optional(),flashAttention:v().default(!1),mlock:v().default(!1),noMmap:v().default(!1),cacheTypeK:m([`f32`,`f16`,`q8_0`,`q5_1`,`q5_0`,`q4_1`,`q4_0`]).optional(),cacheTypeV:m([`f32`,`f16`,`q8_0`,`q5_1`,`q5_0`,`q4_1`,`q4_0`]).optional(),extraArgs:p(g()).default([]),autoStart:v().default(!1),idleStopMinutes:a().int().default(30)}),Ku=i({phase:m([`downloading`,`verifying`]),file:g(),fileIndex:a().int(),fileCount:a().int(),downloadedBytes:a(),totalBytes:a().optional()}),qu=i({nodeId:g(),state:m([`stopped`,`downloading`,`starting`,`ready`,`crashed`,`failed`]),pid:a().optional(),port:a().optional(),modelPath:g().optional(),modelId:g().optional(),downloadProgress:a().min(0).max(1).optional(),download:Ku.optional(),lastError:g().optional(),crashesInWindow:a(),memoryBytes:a().optional(),vramBytes:a().optional()}),Ju=i({file:g(),sizeBytes:a(),catalogId:g().optional(),installedAt:a().optional(),path:g().optional()}),Yu=i({nodeId:g(),modelsBytes:a(),freeBytes:a().optional()}),Xu=Hu.extend({images:p(zu).optional(),runtime:Gu,timeoutMs:a().int().positive().optional()}),Zu={name:`llm-runtime`,scope:`system`,mode:`singleton`,internal:!0,methods:{complete:T(Xu,Ru,{kind:`mutation`}),ensureStarted:T(i({runtime:Gu}),qu,{kind:`mutation`,auth:`admin`}),stop:T(i({}),h(),{kind:`mutation`,auth:`admin`}),status:T(i({}),qu),installModel:T(i({model:Wu}),h(),{kind:`mutation`,auth:`admin`}),deleteModel:T(i({file:g()}),h(),{kind:`mutation`,auth:`admin`}),listLocalModels:T(i({}),p(Ju)),getDiskUsage:T(i({}),Yu)}},Qu=m([`openai-compatible`,`openai`,`anthropic`,`google`,`managed-local`]),$u=i({id:g(),name:g(),kind:Qu,addonId:g(),enabled:v(),model:g(),baseUrl:g().optional(),apiKey:g().optional(),supportsVision:v(),temperature:a().min(0).max(2).optional(),topP:a().min(0).max(1).optional(),topK:a().int().positive().optional(),maxTokens:a().int().positive().optional(),contextLength:a().int().positive().optional(),systemPrompt:g().optional(),timeoutMs:a().int().positive().default(6e4),connectTimeoutMs:a().int().positive().default(1e4),firstTokenTimeoutMs:a().int().positive().default(12e4),idleTimeoutMs:a().int().positive().default(6e4),retry:Bu.default({enabled:!1,maxAttempts:1}),toolsEnabled:v().default(!1),extraHeaders:n(g(),g()).optional(),runtime:Gu.optional()}),ed=u(),td=i({kind:Qu,label:g(),icon:g(),addonId:g(),configSchema:ed}),nd=c([i({consumer:g()}),i({purpose:m([`text`,`vision`])})]),rd=i({selector:nd,profileId:g()}),id=i({day:g(),consumer:g(),profileId:g(),calls:a(),okCalls:a(),errorCalls:a(),inputTokens:a(),outputTokens:a(),avgLatencyMs:a()}),ad=i({id:g(),label:g(),family:g(),purpose:m([`text`,`vision`]),url:g(),sha256:g(),sizeBytes:a(),quantization:g(),minRamBytes:a(),contextSizeDefault:a().int(),mmprojUrl:g().optional()}),od=b(`ok`,[i({ok:y(!0),model:Wu,label:g(),repo:g(),quantization:g(),purpose:m([`text`,`vision`]),totalBytes:a(),extraFilenames:p(g())}),i({ok:y(!1),code:g(),message:g(),candidates:p(g()).optional(),requiredBytes:a().optional()})]),sd=i({nodeId:g(),reachable:v(),status:qu.optional(),disk:Yu.optional(),error:g().optional()}),cd=Hu.extend({images:p(zu).min(1)}),ld=i({addonId:g(),profileId:g()}),ud={name:`llm`,scope:`system`,mode:`collection`,internal:!1,providerKind:`ai`,nodeIdMode:`data`,methods:{generate:T(Hu,Ru,{kind:`mutation`}),generateVision:T(cd,Ru,{kind:`mutation`}),cancel:T(i({addonId:g().optional(),requestId:g()}),h(),{kind:`mutation`}),listProfileKinds:T(i({}),p(td)),listProfiles:T(i({}),p($u)),upsertProfile:T(i({profile:$u}),$u,{kind:`mutation`,auth:`admin`}),deleteProfile:T(ld,h(),{kind:`mutation`,auth:`admin`}),testProfile:T(ld,Ru,{kind:`mutation`,auth:`admin`}),listModels:T(ld,p(g())),getDefaults:T(i({}),p(rd)),setDefault:T(i({selector:nd,profileId:g().nullable()}),h(),{kind:`mutation`,auth:`admin`}),getUsage:T(i({since:a().optional(),until:a().optional(),consumer:g().optional(),profileId:g().optional()}),p(id)),listModelCatalog:T(i({}),p(ad)),listRuntimeNodes:T(i({}),p(sd)),listNodeModels:T(i({nodeId:g()}),p(Ju)),resolveModelRef:T(i({ref:g(),maxBytes:a().positive().optional()}),od,{kind:`mutation`,auth:`admin`}),installModel:T(i({nodeId:g(),model:Wu}),h(),{kind:`mutation`,auth:`admin`}),deleteModel:T(i({nodeId:g(),file:g()}),h(),{kind:`mutation`,auth:`admin`}),getRuntimeStatus:T(ld,qu),startRuntime:T(ld,qu,{kind:`mutation`,auth:`admin`}),stopRuntime:T(ld,h(),{kind:`mutation`,auth:`admin`})}},dd=m([`debug`,`info`,`warn`,`error`]),fd=i({timestamp:te(),level:dd,scope:p(g()),message:g(),meta:n(g(),u()).optional(),tags:n(g(),g()).optional()}),pd={name:`log-destination`,scope:`system`,mode:`collection`,internal:!0,methods:{write:T(fd,h(),{kind:`mutation`}),query:T(i({scope:p(g()).optional(),level:dd.optional(),since:te().optional(),until:te().optional(),limit:a().optional(),tags:n(g(),g()).optional()}),p(fd).readonly())},mount:{kind:`skip`}},md=m([`primary`,`second-factor`]),hd=i({kind:y(`redirect`),id:g(),label:g(),icon:g().optional(),startUrl:g(),stage:md}),gd=i({kind:y(`widget`),id:g(),addonId:g(),bundle:g(),remote:ss,stage:md}),_d=i({kind:y(`passkey`),id:g(),label:g(),stage:md,rpId:g(),origin:g().nullable()}),vd=b(`kind`,[hd,gd,_d]),yd={name:`login-method`,scope:`system`,mode:`collection`,internal:!0,methods:{getLoginMethods:T(h(),p(vd).readonly())},mount:{kind:`skip`}},bd=i({total:a(),user:a(),system:a(),irq:a(),nice:a(),loadAvg:s([a(),a(),a()]),cores:a()}),xd=i({percent:a(),totalBytes:a(),usedBytes:a(),availableBytes:a(),swapUsedBytes:a(),swapTotalBytes:a()}),Sd=i({readBytes:a(),writeBytes:a(),readOps:a(),writeOps:a(),timestampMs:a()}),Cd=i({rxBytes:a(),txBytes:a(),rxPackets:a(),txPackets:a(),rxErrors:a(),txErrors:a(),timestampMs:a()}),wd=i({utilization:a(),model:g(),memoryUsedBytes:a(),memoryTotalBytes:a(),temperature:a().nullable()}),Td=i({openFds:a(),threadCount:a(),activeHandles:a(),activeRequests:a()}),Ed=i({avg10:a(),avg60:a(),avg300:a()}),Dd=i({some:Ed,full:Ed.nullable()}),Od=i({cpu:bd,memory:xd,gpu:wd.nullable(),network:Cd,disk:Sd,pressure:i({cpu:Dd.nullable(),memory:Dd.nullable(),io:Dd.nullable()}),process:Td,cpuTemperature:a().nullable(),timestampMs:a()}),kd=i({path:g(),totalBytes:a(),usedBytes:a(),availableBytes:a(),percent:a()}),Ad=i({pid:a(),cpu:a(),memory:a(),privateBytes:a().optional(),sharedBytes:a().optional()}),jd=i({addonId:g(),nodeId:g(),role:m([`hub`,`worker`]),pid:a(),state:m([`starting`,`running`,`stopping`,`stopped`,`crashed`]),uptimeSec:a()}),Md=i({pid:a(),ppid:a(),pgid:a(),classification:m([`root`,`managed`,`system`,`ghost`]),addonId:g().nullable(),nodeId:g().nullable(),command:g(),cpuPercent:a(),memoryRssBytes:a(),uptimeSec:a(),orphaned:v()}),Nd=i({pid:a(),force:v().optional()}),Pd=i({success:v(),reason:g().optional(),signal:m([`SIGTERM`,`SIGKILL`]).optional()}),Fd=i({addonId:g()}),Id=i({success:v(),path:g().optional(),pid:a().optional(),reason:g().optional()}),Ld=i({cpuPercent:a(),memoryPercent:a(),memoryUsedMB:a(),memoryTotalMB:a(),diskPercent:a().optional(),temperature:a().optional(),gpuPercent:a().optional(),gpuMemoryPercent:a().optional()}),Rd={name:`metrics-provider`,scope:`system`,mode:`singleton`,methods:{collectSnapshot:T(h(),Od),getCached:T(h(),Od.nullable()),getCurrent:T(h(),Ld),getDiskSpace:T(i({dirPath:g()}),kd),getGpuInfo:T(h(),wd.nullable()),getCpuTemperature:T(h(),a().nullable()),getProcessStats:T(i({pids:p(a())}),p(Ad)),listAddonInstances:T(h(),p(jd).readonly()),getAddonStats:T(i({addonId:g()}),Ad.nullable()),listNodeProcesses:T(h(),p(Md).readonly()),killProcess:T(Nd,Pd,{kind:`mutation`,auth:`admin`}),dumpHeapSnapshot:T(Fd,Id,{kind:`mutation`,auth:`admin`})}},zd=i({sourceUrl:g(),metadata:Sa,targets:p(xa).min(1).readonly(),calibrationRef:g().optional(),sessionId:g().optional()}),Bd={name:`model-convert`,scope:`system`,mode:`singleton`,internal:!0,methods:{convert:T(zd,wa,{kind:`mutation`,auth:`admin`,timeoutMs:6e5})}},Vd=i({nodeId:g(),modelId:g(),format:m(ga),entry:ba}),Hd=i({ok:v(),sha256:g(),bytes:a(),path:g()}),Ud={name:`model-distributor`,scope:`system`,mode:`singleton`,internal:!0,methods:{distributeModel:T(Vd,Hd,{kind:`mutation`,auth:`admin`})}},Wd=i({bbox:H,pixelCount:a(),intensity:a()}),Gd=i({detected:v(),regionCount:a(),regions:p(Wd).readonly(),rawRegions:p(Wd).readonly(),frameWidth:a(),frameHeight:a(),analysisMs:a()}),Kd={name:`motion-detection`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],exposesDeviceSettings:!0,methods:{analyze:T(i({deviceId:a(),frame:ys.optional(),frameHandle:C.optional()}),Gd,{kind:`mutation`}),removeCamera:T(i({deviceId:a()}),h(),{kind:`mutation`}),reset:T(h(),h(),{kind:`mutation`})},events:{onMotion:{data:i({deviceId:a(),detected:v(),regionCount:a()})}}},qd=m([`external`,`embedded`]),Jd=m([`connected`,`disconnected`,`auth-failed`,`unreachable`,`tls-error`]),Yd=i({id:g(),name:g(),url:g(),kind:qd,status:Jd,latencyMs:a().nullable(),error:g().optional(),connectedClients:a().int().nonnegative().optional(),lastCheckedAt:a().optional()}),Xd=i({url:g(),username:g().optional(),password:g().optional(),clientIdPrefix:g().optional()}),Zd=i({name:g().min(1),url:g().regex(/^(mqtt|mqtts|ws|wss):\/\//,`URL must start with mqtt(s):// or ws(s)://`),username:g().optional(),password:g().optional(),clientIdPrefix:g().optional()}),Qd=i({id:g()}),$d=i({id:g()}),ef=b(`ok`,[i({ok:y(!0),latencyMs:a()}),i({ok:y(!1),error:g()})]),tf=i({port:a().int().min(1).max(65535).default(1883),allowAnonymous:v().default(!1),username:g().optional(),password:g().optional()}),nf=i({id:g(),url:g()}),rf=i({brokerCount:a(),embeddedRunning:v()}),af={name:`mqtt-broker`,scope:`system`,mode:`collection`,providerKind:`broker`,status:{schema:rf,kind:`poll`},methods:{listBrokers:T(h(),p(Yd)),getBrokerConfig:T($d,Xd),addBroker:T(Zd,Qd,{kind:`mutation`}),removeBroker:T($d,h(),{kind:`mutation`}),testConnection:T($d,ef,{kind:`mutation`}),startEmbeddedBroker:T(tf,nf,{kind:`mutation`}),stopEmbeddedBroker:T($d,h(),{kind:`mutation`}),getStatus:T(h(),rf)}},of=i({url:g(),hostname:g(),port:a(),protocol:m([`http`,`https`])}),sf=i({connected:v(),endpoint:of.nullable(),error:g().optional()}),cf=of.extend({id:g(),label:g(),mode:g().optional(),sourcePort:a().optional()}),lf={name:`network-access`,scope:`system`,mode:`collection`,providerKind:`ingress`,methods:{start:T(h(),of,{kind:`mutation`}),stop:T(h(),h(),{kind:`mutation`}),getEndpoint:T(h(),of.nullable()),getStatus:T(h(),sf),listEndpoints:T(h(),p(cf).readonly())}},uf=m([`image`,`video`,`gif`,`audio`,`icon`]),df=i({mediaType:uf,url:g().optional(),bytes:_(Uint8Array).optional(),mime:g().optional(),name:g().optional()}).refine(e=>e.url!==void 0||e.bytes!==void 0,{message:"Attachment requires either `url` or `bytes`"}),ff=m([`text`,`markdown`,`html`]),pf=m([`acknowledge`,`dismiss`,`silence`,`snooze`,`view`,`play`,`open`,`close`,`lock`,`unlock`,`arm`,`arm-home`,`arm-away`,`arm-night`,`disarm`,`light`,`alert`,`camera`]),mf=i({id:g(),label:g(),url:g().optional(),icon:pf.optional(),destructive:v().optional(),mode:m([`navigate`,`background`]).optional()}),hf=i({body:g(),title:g().optional(),format:ff.default(`text`),priority:a().int().min(1).max(5).default(3),level:g().optional(),attachments:p(df).optional(),clickUrl:g().optional(),actions:p(mf).optional(),sound:g().optional(),ttl:a().optional(),tag:g().optional(),deviceId:a().optional(),eventId:g().optional(),metadata:n(g(),u()).optional()}),gf=i({id:g(),label:g(),ordinal:a().int().min(1).max(5).nullable(),flags:i({critical:v().optional(),silent:v().optional(),noPush:v().optional()}).optional(),requires:p(g()).optional(),description:g().optional()}),_f=i({attachments:i({mediaTypes:p(uf),mode:m([`url`,`bytes`,`both`]),max:a().int().nonnegative(),maxBytes:a().int().positive().optional()}),actions:a().int().nonnegative(),actionIcons:v().optional(),levels:p(gf),format:p(ff),clickUrl:v(),sound:v(),ttl:v(),bodyMaxLen:a().int().positive()}),vf=u(),yf=i({kind:g(),label:g(),icon:g(),addonId:g(),iconUrl:g().optional(),iconMediaType:g().optional(),configSchema:vf,supportsDiscovery:v(),caps:_f}),bf=i({id:g(),name:g(),kind:g(),addonId:g(),enabled:v(),config:n(g(),u())}),xf=i({kind:g(),suggestedName:g(),config:n(g(),u())}),Sf=i({level:g(),format:ff,attachmentsSent:a().int().nonnegative(),actionsSent:a().int().nonnegative(),truncated:v(),dropped:p(g())}),Cf=i({success:v(),error:g().optional(),renderedAs:Sf.optional()}),wf=Cf,Tf={name:`notification-output`,scope:`system`,mode:`collection`,methods:{listTargetKinds:T(i({}),p(yf)),listTargets:T(i({}),p(bf)),discoverTargets:T(i({kind:g(),config:n(g(),u()).optional()}),p(xf)),send:T(i({targetId:g(),notification:hf}),Cf,{kind:`mutation`}),testTarget:T(i({targetId:g(),sample:hf.optional()}),wf,{kind:`mutation`}),upsertTarget:T(i({target:bf}),bf,{kind:`mutation`}),deleteTarget:T(i({targetId:g()}),h(),{kind:`mutation`}),setTargetEnabled:T(i({targetId:g(),enabled:v()}),h(),{kind:`mutation`})}},Ef=[{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`}],Df=[{id:`person`,name:`Person`},{id:`vehicle`,name:`Vehicle`},{id:`animal`,name:`Animal`},{id:`package`,name:`Package`}],Of=new Set(Df.map(e=>e.id));function kf(e){return Of.has(e.trim().toLowerCase())}var Af={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`,suitcase:`package`,backpack:`package`,handbag:`package`},preserveOriginal:!1},jf=[{id:`speech`,name:`Speech`},{id:`scream`,name:`Scream / Shout`},{id:`crying`,name:`Crying / Baby`},{id:`laughter`,name:`Laughter`},{id:`music`,name:`Music`},{id:`dog`,name:`Dog`},{id:`cat`,name:`Cat`},{id:`bird`,name:`Bird`},{id:`animal`,name:`Animal (other)`},{id:`alarm`,name:`Alarm / Siren`},{id:`doorbell`,name:`Doorbell / Knock`},{id:`glass_breaking`,name:`Glass Breaking`},{id:`gunshot`,name:`Gunshot / Explosion`},{id:`vehicle`,name:`Vehicle`},{id:`siren`,name:`Emergency Siren`},{id:`fire`,name:`Fire / Smoke`},{id:`water`,name:`Water`},{id:`wind`,name:`Wind / Weather`},{id:`door`,name:`Door`},{id:`footsteps`,name:`Footsteps`},{id:`crowd`,name:`Crowd / Chatter`},{id:`telephone`,name:`Telephone`},{id:`engine`,name:`Engine / Motor`},{id:`tools`,name:`Tools / Construction`},{id:`silence`,name:`Silence`}],Mf={mapping:{Speech:`speech`,"Child speech, kid speaking":`speech`,Conversation:`speech`,"Narration, monologue":`speech`,Babbling:`speech`,Whispering:`speech`,"Speech synthesizer":`speech`,Humming:`speech`,Rapping:`speech`,Singing:`speech`,Choir:`speech`,"Child singing":`speech`,Shout:`scream`,Bellow:`scream`,Yell:`scream`,Screaming:`scream`,"Children shouting":`scream`,Whoop:`scream`,"Crying, sobbing":`crying`,"Baby cry, infant cry":`crying`,Whimper:`crying`,"Wail, moan":`crying`,Groan:`crying`,Laughter:`laughter`,"Baby laughter":`laughter`,Giggle:`laughter`,Snicker:`laughter`,"Belly laugh":`laughter`,"Chuckle, chortle":`laughter`,Music:`music`,"Musical instrument":`music`,Guitar:`music`,Piano:`music`,Drum:`music`,"Drum kit":`music`,"Violin, fiddle":`music`,Flute:`music`,Saxophone:`music`,Trumpet:`music`,Synthesizer:`music`,"Pop music":`music`,"Rock music":`music`,"Hip hop music":`music`,"Classical music":`music`,Jazz:`music`,"Electronic music":`music`,"Background music":`music`,Dog:`dog`,Bark:`dog`,Yip:`dog`,Howl:`dog`,"Bow-wow":`dog`,Growling:`dog`,"Whimper (dog)":`dog`,Cat:`cat`,Purr:`cat`,Meow:`cat`,Hiss:`cat`,Caterwaul:`cat`,Bird:`bird`,"Bird vocalization, bird call, bird song":`bird`,"Chirp, tweet":`bird`,Squawk:`bird`,Crow:`bird`,Owl:`bird`,"Pigeon, dove":`bird`,Animal:`animal`,"Domestic animals, pets":`animal`,"Livestock, farm animals, working animals":`animal`,Horse:`animal`,"Cattle, bovinae":`animal`,Pig:`animal`,Sheep:`animal`,Goat:`animal`,Frog:`animal`,Insect:`animal`,Cricket:`animal`,Alarm:`alarm`,"Alarm clock":`alarm`,"Smoke detector, smoke alarm":`alarm`,"Fire alarm":`alarm`,Buzzer:`alarm`,"Civil defense siren":`alarm`,"Car alarm":`alarm`,Siren:`siren`,"Police car (siren)":`siren`,"Ambulance (siren)":`siren`,"Fire engine, fire truck (siren)":`siren`,"Emergency vehicle":`siren`,Foghorn:`siren`,Doorbell:`doorbell`,"Ding-dong":`doorbell`,Knock:`doorbell`,Tap:`doorbell`,Glass:`glass_breaking`,Shatter:`glass_breaking`,"Chink, clink":`glass_breaking`,"Gunshot, gunfire":`gunshot`,"Machine gun":`gunshot`,Explosion:`gunshot`,Fireworks:`gunshot`,Firecracker:`gunshot`,"Artillery fire":`gunshot`,"Cap gun":`gunshot`,Boom:`gunshot`,Vehicle:`vehicle`,Car:`vehicle`,Truck:`vehicle`,Bus:`vehicle`,Motorcycle:`vehicle`,"Car passing by":`vehicle`,"Vehicle horn, car horn, honking":`vehicle`,"Traffic noise, roadway noise":`vehicle`,Train:`vehicle`,Aircraft:`vehicle`,Helicopter:`vehicle`,Bicycle:`vehicle`,Skateboard:`vehicle`,Fire:`fire`,Crackle:`fire`,Water:`water`,Rain:`water`,Raindrop:`water`,"Rain on surface":`water`,Stream:`water`,Waterfall:`water`,Ocean:`water`,"Waves, surf":`water`,"Splash, splatter":`water`,Wind:`wind`,Thunderstorm:`wind`,Thunder:`wind`,"Wind noise (microphone)":`wind`,"Rustling leaves":`wind`,Door:`door`,"Sliding door":`door`,Slam:`door`,"Cupboard open or close":`door`,"Walk, footsteps":`footsteps`,Run:`footsteps`,Shuffle:`footsteps`,Crowd:`crowd`,Chatter:`crowd`,Cheering:`crowd`,Applause:`crowd`,"Children playing":`crowd`,"Hubbub, speech noise, speech babble":`crowd`,Telephone:`telephone`,"Telephone bell ringing":`telephone`,Ringtone:`telephone`,"Telephone dialing, DTMF":`telephone`,"Busy signal":`telephone`,Engine:`engine`,"Engine starting":`engine`,Idling:`engine`,"Accelerating, revving, vroom":`engine`,"Light engine (high frequency)":`engine`,"Medium engine (mid frequency)":`engine`,"Heavy engine (low frequency)":`engine`,"Lawn mower":`engine`,Chainsaw:`engine`,Hammer:`tools`,Jackhammer:`tools`,Sawing:`tools`,"Power tool":`tools`,Drill:`tools`,Sanding:`tools`,Silence:`silence`},preserveOriginal:!1},Nf={mapping:{speech:`speech`,child_speech:`speech`,conversation:`speech`,whispering:`speech`,singing:`speech`,humming:`speech`,shout:`scream`,yell:`scream`,screaming:`scream`,crying:`crying`,baby_crying:`crying`,sobbing:`crying`,laughter:`laughter`,baby_laughter:`laughter`,giggling:`laughter`,music:`music`,guitar:`music`,piano:`music`,drums:`music`,dog_bark:`dog`,dog_bow_wow:`dog`,dog_growling:`dog`,dog_howl:`dog`,cat_meow:`cat`,cat_purr:`cat`,cat_hiss:`cat`,bird:`bird`,bird_chirp:`bird`,bird_squawk:`bird`,animal:`animal`,horse:`animal`,cow_moo:`animal`,insect:`animal`,alarm:`alarm`,smoke_alarm:`alarm`,fire_alarm:`alarm`,car_alarm:`alarm`,siren:`siren`,police_siren:`siren`,ambulance_siren:`siren`,doorbell:`doorbell`,door_knock:`doorbell`,knocking:`doorbell`,glass_breaking:`glass_breaking`,glass_shatter:`glass_breaking`,gunshot:`gunshot`,explosion:`gunshot`,fireworks:`gunshot`,car:`vehicle`,truck:`vehicle`,motorcycle:`vehicle`,car_horn:`vehicle`,vehicle_horn:`vehicle`,traffic:`vehicle`,fire:`fire`,fire_crackle:`fire`,water:`water`,rain:`water`,ocean:`water`,splash:`water`,wind:`wind`,thunder:`wind`,thunderstorm:`wind`,door:`door`,door_slam:`door`,sliding_door:`door`,footsteps:`footsteps`,walking:`footsteps`,running:`footsteps`,crowd:`crowd`,chatter:`crowd`,cheering:`crowd`,applause:`crowd`,telephone_ring:`telephone`,ringtone:`telephone`,engine:`engine`,engine_starting:`engine`,lawn_mower:`engine`,chainsaw:`engine`,hammer:`tools`,jackhammer:`tools`,drill:`tools`,power_tool:`tools`,silence:`silence`},preserveOriginal:!1},Pf=new Map;for(let[e,t]of Object.entries(Mf.mapping))Pf.set(e.toLowerCase(),t);for(let[e,t]of Object.entries(Nf.mapping))Pf.set(e.toLowerCase(),t);function Ff(e){return Pf.get(e.toLowerCase())??null}function If(){return jf.map(e=>e.id)}var G={motion:`#f59e0b`,audio:`#06b6d4`,person:`#22c55e`,vehicle:`#3b82f6`,animal:`#f97316`,package:`#a855f7`,sensor:`#8b5cf6`,control:`#10b981`,genericDetection:`#64748b`},Lf=`#22ff55`,Rf={car:`#f59e0b`,truck:`#d97706`,bus:`#b45309`,motorcycle:`#eab308`,bicycle:`#ca8a04`,airplane:`#60a5fa`,boat:`#2563eb`,train:`#1d4ed8`,bird:`#14b8a6`,dog:`#84cc16`,cat:`#f97316`,horse:`#a16207`,sheep:`#a3a3a3`,cow:`#78716c`,elephant:`#6b7280`,bear:`#7c2d12`,zebra:`#404040`,giraffe:`#d4a373`};function zf(e){return e.split(/[-_ ]/).filter(e=>e.length>0).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}var Bf=new Map;function K(e,t,n,r,i){Bf.set(e,{kind:e,parentKind:null,level:`macro`,category:t,color:n,iconId:r,labelKey:`eventKind.${e}`,label:i})}function q(e,t,n,r,i,a){Bf.set(e,{kind:e,parentKind:t,level:`sub`,category:n,color:r,iconId:i,labelKey:`eventKind.${e}`,label:a})}K(`motion`,`motion`,G.motion,`motion`,`Motion`),K(`audio`,`audio`,G.audio,`audio`,`Audio`),K(`person`,`detection`,G.person,`person`,`Person`),K(`vehicle`,`detection`,G.vehicle,`vehicle`,`Vehicle`),K(`animal`,`detection`,G.animal,`animal`,`Animal`),K(`package`,`package`,G.package,`package`,`Package`),K(`sensor`,`sensor`,G.sensor,`sensor`,`Sensor`),K(`control`,`control`,G.control,`control`,`Control`);for(let[e,t]of Object.entries(Af.mapping))t!==`vehicle`&&t!==`animal`||Bf.has(e)||q(e,t,`detection`,Rf[e]??G.genericDetection,e,zf(e));q(`package-delivered`,`package`,`package`,G.package,`package`,`Package delivered`),q(`package-picked-up`,`package`,`package`,G.package,`package`,`Package picked up`),q(`contact`,`sensor`,`sensor`,`#f59e0b`,`door`,`Contact`),q(`motion-sensor`,`sensor`,`sensor`,G.sensor,`pir`,`Motion sensor`),q(`smoke`,`sensor`,`sensor`,`#ef4444`,`smoke`,`Smoke`),q(`flood`,`sensor`,`sensor`,`#3b82f6`,`water`,`Water leak`),q(`gas`,`sensor`,`sensor`,`#ef4444`,`gas`,`Gas`),q(`carbon-monoxide`,`sensor`,`sensor`,`#dc2626`,`smoke`,`Carbon monoxide`),q(`vibration`,`sensor`,`sensor`,`#eab308`,`vibration`,`Vibration`),q(`tamper`,`sensor`,`sensor`,`#f97316`,`tamper`,`Tamper`),q(`presence`,`sensor`,`sensor`,`#22c55e`,`presence`,`Presence`),q(`enum-sensor`,`sensor`,`sensor`,G.sensor,`generic`,`Sensor state`),q(`device-event`,`sensor`,`sensor`,`#10b981`,`button`,`Device event`),q(`lock`,`control`,`control`,`#0ea5e9`,`lock`,`Lock`),q(`switch`,`control`,`control`,G.control,`switch`,`Switch`),q(`siren`,`control`,`control`,`#dc2626`,`siren`,`Siren`),q(`button`,`control`,`control`,`#10b981`,`button`,`Button`),q(`doorbell`,`control`,`control`,`#a855f7`,`doorbell`,`Doorbell`);for(let e of jf){let t=`audio-${e.id}`;Bf.has(t)||q(t,`audio`,`audio`,G.audio,t,e.name)}var Vf=Object.freeze(Object.fromEntries(Bf));function Hf(e){return Vf[e]}function Uf(e){return Vf[e]?.color??`#22ff55`}function Wf(e){let t=[];for(let n of Object.values(Vf))n.parentKind===e&&t.push(n);return t}var Gf=i({kind:g(),label:g(),parentKind:g().nullable()}),Kf=i({videoClasses:p(Gf),audioKinds:p(Gf),labels:p(Gf)});function qf(e,t,n){return{kind:e,label:t,parentKind:n}}function Jf(){let e=Object.values(Vf);return{videoClasses:e.filter(e=>e.category===`detection`).map(e=>qf(e.kind,e.label,e.parentKind)),audioKinds:e.filter(e=>e.category===`audio`&&e.level===`sub`).map(e=>qf(e.kind,e.label,e.parentKind)),labels:e.filter(e=>e.category===`sensor`||e.category===`control`).map(e=>qf(e.kind,e.label,e.parentKind))}}var Yf=Object.freeze(Jf()),Xf=m([`disarmed`,`armed_home`,`armed_away`,`armed_night`,`armed_vacation`,`armed_custom_bypass`,`arming`,`disarming`,`pending`,`triggered`]),Zf=m([`home`,`away`,`night`,`vacation`,`custom_bypass`]),Qf=i({state:Xf,availableModes:p(Zf),requiresCode:v(),lastChangedAt:a()}),$f={name:`alarm-panel`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.AlarmPanel],methods:{arm:T(i({deviceId:a().int().nonnegative(),mode:Zf,code:g().min(1).optional()}),h(),{kind:`mutation`,auth:`admin`}),disarm:T(i({deviceId:a().int().nonnegative(),code:g().min(1).optional()}),h(),{kind:`mutation`,auth:`admin`}),trigger:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:Qf,kind:`push`},runtimeState:Qf,durability:`restored`,volatileStateFields:[`lastChangedAt`]},ep=i({x:a(),y:a()}),tp=i({kind:y(`rect`),x:a(),y:a(),width:a(),height:a()}),np=i({kind:y(`polygon`),points:p(ep)}),rp=i({kind:y(`grid`),gridWidth:a(),gridHeight:a(),cells:p(v())}),ip=i({kind:y(`line`),points:p(ep)}),ap=b(`kind`,[tp,np,rp,ip]),op=m([`rect`,`polygon`,`grid`,`line`]),sp=i({min:a(),max:a()}),cp=i({width:a(),height:a()}),lp=m([`immediate`,`track-end`,`device-event`,`package-event`,`system-event`]),up=m([`device-online`,`device-offline`,`device-disabled`,`device-enabled`,`stream-online`,`stream-offline`,`node-online`,`node-offline`,`node-inference-unavailable`,`detection-blind`,`addon-crash-loop`,`addon-update-available`,`server-update-available`,`alarm-triggered`,`alarm-armed`,`alarm-disarmed`,`alarm-arming`,`alarm-arm-refused`,`addon-updated`,`server-updated`,`export-completed`,`camera-online`,`camera-offline`,`camera-disabled`,`camera-enabled`]),dp=new Set([`camera-online`,`camera-offline`,`camera-disabled`,`camera-enabled`]),fp=up.options.filter(e=>!dp.has(e)),pp=[`alarm-arm-refused`,`alarm-arming`,`alarm-armed`,`alarm-triggered`,`alarm-disarmed`],mp=i({kinds:p(up).min(1),deviceIds:p(a().int()).min(1).optional(),deviceTypes:p(g().min(1)).min(1).optional(),nodeIds:p(g().min(1)).min(1).optional(),packageNames:p(g().min(1)).min(1).optional()}),hp=1,gp=1440,_p=[10,30,60],vp=i({days:p(a().int().min(0).max(6)).min(1),startMinute:a().int().min(0).max(1439),endMinute:a().int().min(0).max(1439)}),yp=i({windows:p(vp).min(1),timezone:g().optional(),invert:v().optional()}),bp=i({values:p(g().min(1)),maxDistance:a().int().min(0).max(3).default(1)}),xp=i({zoneId:g().optional(),className:g().optional(),op:m([`became-occupied`,`became-free`,`>=`,`<=`]).default(`became-occupied`),count:a().int().min(0).default(1),sustainSeconds:a().int().min(0).max(3600).default(15)}),Sp=-96,Cp=i({labels:p(g().min(1)).min(1).optional(),dbThreshold:a().min(-96).max(0).optional(),hitPercent:a().int().min(1).max(100).default(60),samplingSeconds:a().int().min(1).max(300).default(10)}),wp=m([`enter`,`exit`,`any`]),Tp=i({ids:p(g().min(1)).min(1),match:m([`any`,`all`]).default(`any`)}),Ep=b(`kind`,[i({kind:y(`wait`),seconds:a().min(0).max(300)}),i({kind:y(`cap`),deviceId:a().int(),cap:g().min(1),method:g().min(1),args:n(g(),u()).optional()})]),Dp=i({name:g().min(1).max(120),enabled:v(),minDelaySec:a().int().min(0).max(86400).optional(),actions:p(Ep).min(1)}),Op=i({id:g().min(1).max(64),label:g().min(1).max(40),sequence:g().min(1).max(120),icon:pf.optional(),destructive:v().optional()}),kp=i({onTrigger:p(Dp).optional(),buttons:p(Op).max(8).optional()}),Ap=i({deviceId:a().int(),states:p(g().min(1)).min(1)}),jp=i({sceneId:g().min(1),deviceId:a().int().optional(),requiredState:m([`matched`,`diverged`]),latched:v().optional()}),Mp=i({deviceState:Ap.optional(),scene:jp.optional(),devices:p(a()).optional(),classes:p(g().min(1)).optional(),classesExclude:p(g().min(1)).optional(),minConfidence:a().min(0).max(1).optional(),zones:Tp.optional(),zonesExclude:p(g().min(1)).optional(),crossing:wp.optional(),labelEquals:p(g().min(1)).optional(),identities:p(g().min(1)).optional(),plates:bp.optional(),identitiesExclude:p(g().min(1)).optional(),minImportance:a().min(0).max(1).optional(),minDwellSeconds:a().min(0).optional(),source:m([`pipeline`,`onboard`,`sensor`,`audio`,`any`]).optional(),minLabelConfidence:a().min(0).max(1).optional(),eventTypeTokens:p(g().min(1)).optional(),sensorKinds:p(g().min(1)).optional(),packagePhase:m([`delivered`,`picked-up`,`both`]).optional(),systemEvent:mp.optional(),customZones:p(np).optional(),occupancy:xp.optional(),audio:Cp.optional()}),Np=i({targetId:g().min(1),params:n(g(),u()).optional()}),Pp=m([`cropped`,`full`,`boxed`]),Fp=i({attach:m([`best`,`best-matching`,`keyFrame`,`none`]).default(`best`),frame:Pp.optional(),zoneCrop:v().optional(),gif:v().optional(),clip:v().optional(),clipPreRollSec:a().int().min(0).max(30).optional(),clipPostRollSec:a().int().min(0).max(30).optional(),clipSpeed:a().min(1).max(8).optional(),profile:S.optional()}),Ip=m([`shared`,`per-class`]),Lp=i({cooldownSec:a().int().min(0).max(86400).default(60),scope:m([`rule`,`rule-device`]).default(`rule-device`),granularity:Ip.optional()}),Rp=1e3,zp=2e4,Bp=8e3,Vp=448,Hp=i({op:m([`>=`,`>`,`<=`,`<`,`==`]),count:a().int().min(0).max(1e3)}),Up=i({enabled:v().default(!1),profileId:g().optional(),prompt:g().max(1e3).optional(),expect:Hp.optional(),timeoutMs:a().int().min(Rp).max(zp).default(Bp),onTimeout:m([`fire`,`suppress`]).default(`fire`),maxImagePx:a().int().min(64).max(2048).default(448)}),Wp=i({name:g().min(1).max(200),enabled:v().default(!0),delivery:lp,conditions:Mp.default({}),schedule:yp.optional(),targets:p(Np),targetUsers:p(g()).optional(),media:Fp.default({attach:`best`}),throttle:Lp.default({cooldownSec:60,scope:`rule-device`}),template:i({title:g().max(500).optional(),body:g().max(2e3).optional()}).optional(),priority:a().int().min(1).max(5).default(3),ownerUserId:g().optional(),snoozeAllowGlobal:v().optional(),snoozeOptions:p(a().int().min(1).max(gp)).max(4).optional(),actions:kp.optional(),confirm:Up.optional(),waitForEnhancement:v().optional(),groupIdleSec:a().int().min(0).max(600).optional()}),Gp=Wp.partial().extend({disabledTargetIds:p(g()).optional(),enabled:v().optional(),conditions:Mp.optional(),media:Fp.optional(),throttle:Lp.optional(),priority:a().int().min(1).max(5).optional()}),Kp=Wp.extend({id:g(),createdBy:g(),createdAt:a(),updatedAt:a(),disabledTargetIds:p(g()).default([])}),qp=i({recordId:g(),recordKind:m([`object-event`,`track`,`device-event`,`package-event`,`system-event`]),deviceId:a(),timestamp:a(),wouldFire:v(),failedCondition:g().optional(),className:g().optional(),label:g().optional()}),Jp=i({id:g(),group:m([`scope`,`class`,`zones`,`quality`,`label`,`schedule`,`device`,`package`,`occupancy`,`audio`,`system`]),label:g(),valueType:m([`deviceIdList`,`stringList`,`number01`,`number`,`sourceSelect`,`zoneSelection`,`zoneIdList`,`schedule`,`plateMatcher`,`packagePhase`,`crossingSelect`,`polygonDraw`,`occupancy`,`audio`,`deviceState`,`scene`,`systemEvent`]),operator:m([`in`,`notIn`,`anyOf`,`allOf`,`gte`,`fuzzyIn`,`withinSchedule`]),appliesTo:p(lp),phase:g(),description:g().optional(),options:p(i({value:g(),label:g(),hint:g().optional()})).readonly().optional()}),Yp=[{id:`systemEvent`,group:`system`,label:`System event`,valueType:`systemEvent`,options:[{value:`device-online`,label:`Device online`},{value:`device-offline`,label:`Device offline`},{value:`device-disabled`,label:`Device switched off`},{value:`device-enabled`,label:`Device switched on`},{value:`stream-online`,label:`Stream online`},{value:`stream-offline`,label:`Stream offline`},{value:`node-online`,label:`Node online`},{value:`node-offline`,label:`Node offline`},{value:`node-inference-unavailable`,label:`Node has no usable inference device`},{value:`detection-blind`,label:`Camera detecting nothing`},{value:`addon-crash-loop`,label:`Addon stopped after repeated crashes`},{value:`addon-update-available`,label:`Addon update available`},{value:`server-update-available`,label:`Server update available`},{value:`addon-updated`,label:`Addons updated`},{value:`server-updated`,label:`Server updated`},{value:`export-completed`,label:`Export completed`},{value:`alarm-arming`,label:`Alarm arming (exit delay)`},{value:`alarm-armed`,label:`Alarm armed`},{value:`alarm-triggered`,label:`Alarm triggered`},{value:`alarm-disarmed`,label:`Alarm disarmed`}],operator:`in`,appliesTo:[`system-event`],phase:`P1`,description:`Infrastructure and update events. Device liveness covers EVERY device type — narrow it by device type (cameras only, say) and/or by device, node events by node id, and addon updates by package name.`},{id:`devices`,group:`scope`,label:`Devices`,valueType:`deviceIdList`,operator:`in`,appliesTo:[`immediate`,`track-end`,`device-event`,`package-event`],phase:`P1`,description:`Restrict the rule to these devices; absent = all devices. A sensor event matches either the SENSOR that fired or the camera it is attributed to, so a rule may name either one.`},{id:`classes`,group:`class`,label:`Object classes`,valueType:`stringList`,operator:`in`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`,description:`Any overlap with the detection class set passes.`},{id:`classesExclude`,group:`class`,label:`Excluded classes`,valueType:`stringList`,operator:`notIn`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`},{id:`minConfidence`,group:`quality`,label:`Minimum confidence`,valueType:`number01`,operator:`gte`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`},{id:`zones`,group:`zones`,label:`Zones`,valueType:`zoneSelection`,operator:`anyOf`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`,description:`Admin zone ids; quantifier any/all over the visited set.`},{id:`zonesExclude`,group:`zones`,label:`Excluded zones`,valueType:`zoneIdList`,operator:`notIn`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`},{id:`crossing`,group:`zones`,label:`Zone crossing`,valueType:`crossingSelect`,options:[{value:``,label:`Not set — entering`,hint:`Entries, and every detection that is not a crossing at all. Exits are excluded. This is what a rule without a crossing condition already does, and choosing it writes nothing to the rule.`},{value:`enter`,label:`Entered a zone`,hint:`The same matches as "not set", stated explicitly: entries and non-crossing detections pass, exits do not.`},{value:`exit`,label:`Left a zone`,hint:`ONLY an exit crossing. A detection that is not a crossing fails, so this rule cannot fire on ordinary movement — pair it with the zones the subject must have left. Also matches a tripwire crossed against its drawn direction.`},{value:`any`,label:`Entered or left`,hint:`No direction filter: entries, exits and non-crossing detections alike. This is the only choice that adds exits to what the rule already matched.`}],operator:`in`,appliesTo:[`immediate`],phase:`P1`,description:`Direction of the zone crossing: enter (the default, and what every rule authored before this did) / exit / any. An exit rule matches only crossings.`},{id:`labelEquals`,group:`label`,label:`Label equals`,valueType:`stringList`,operator:`in`,appliesTo:[`immediate`,`track-end`],phase:`P1`,description:`Exact match on the collapsed label (identity / plate / subclass).`},{id:`identities`,group:`label`,label:`Known faces`,valueType:`stringList`,operator:`in`,appliesTo:[`immediate`,`track-end`],phase:`P1`,description:`Only recognised people. Selecting NOBODY means every identity in the face gallery; selecting some narrows to those. Matched on the gallery id, so renaming a person does not break the rule. On immediate delivery the name is not known yet when the notification is enqueued — see the rule’s "wait for recognition" switch.`},{id:`plates`,group:`label`,label:`Known plates`,valueType:`plateMatcher`,operator:`fuzzyIn`,appliesTo:[`immediate`,`track-end`],phase:`P1`,description:`Only vehicles whose plate was read. Selecting NO plate means any readable plate; listed plates are matched Levenshtein-tolerantly, because OCR noise makes an exact match useless.`},{id:`identitiesExclude`,group:`label`,label:`Excluded faces`,valueType:`stringList`,operator:`notIn`,appliesTo:[`immediate`,`track-end`],phase:`P1`,description:`Veto by identity (mirror of Known faces, same gallery ids). A subject nobody recognised passes — there is nothing to exclude.`},{id:`minLabelConfidence`,group:`label`,label:`Minimum label confidence`,valueType:`number01`,operator:`gte`,appliesTo:[`track-end`],phase:`P1`,description:`Best identity/plate recognition match confidence [0,1] for the label the track carries at close (peak assigned-identity cosine / peak plate OCR score; the higher of the two when both were read). Distinct from detection confidence. Fails closed for a track that ended un-recognized.`},{id:`minImportance`,group:`quality`,label:`Minimum importance`,valueType:`number01`,operator:`gte`,appliesTo:[`track-end`],phase:`P1`,description:`Server-computed key-event importance [0,1]; track-end rules only (importance is scored at close). Fails when the record has none.`},{id:`minDwellSeconds`,group:`quality`,label:`Minimum dwell (seconds)`,valueType:`number`,operator:`gte`,appliesTo:[`track-end`],phase:`P1`,description:`Track lifespan in seconds (lastSeen − firstSeen); track-end rules only.`},{id:`source`,group:`scope`,label:`Detection source`,valueType:`sourceSelect`,options:[{value:`any`,label:`Any source`},{value:`pipeline`,label:`Pipeline`},{value:`onboard`,label:`Onboard (camera)`},{value:`sensor`,label:`Sensor`},{value:`audio`,label:`Audio marker`}],operator:`in`,appliesTo:[`immediate`,`track-end`,`device-event`,`package-event`],phase:`P1`,description:`pipeline / onboard / sensor / audio; a record with no stamped source counts as pipeline.`},{id:`deviceState`,group:`scope`,label:`Device state`,valueType:`deviceState`,operator:`in`,appliesTo:[`immediate`,`track-end`,`device-event`,`package-event`],phase:`P2`,description:`Only fire while another device is in one of the chosen states — the alarm armed, a switch on, a contact closed. A state that cannot be read does NOT fire.`},{id:`scene`,group:`scope`,label:`Scene state`,valueType:`scene`,operator:`in`,appliesTo:[`immediate`,`track-end`,`device-event`,`package-event`],phase:`P3`,description:`Only fire while a scene is matched (the baseline is what we see) or diverged (it demonstrably is not) — “tell me about a person at the door, but only while the bin is still out”. A scene that cannot judge, or one this hub has not read yet, does NOT fire.`},{id:`sensorKinds`,group:`device`,label:`Sensor kinds`,valueType:`stringList`,operator:`in`,appliesTo:[`device-event`],phase:`P1`,description:`Sensor/control taxonomy kinds (doorbell / contact / button / …) matched against the persisted device event.`},{id:`eventTypeTokens`,group:`device`,label:`Event-type tokens`,valueType:`stringList`,operator:`in`,appliesTo:[`device-event`],phase:`P1`,description:`Raw device event-type tokens (e.g. doorbell press / press_long) from the event-emitter slice; absent on doorbell-pulse / passive sensors.`},{id:`packagePhase`,group:`package`,label:`Package phase`,valueType:`packagePhase`,options:[{value:`delivered`,label:`Delivered`},{value:`picked-up`,label:`Picked up`},{value:`both`,label:`Both`}],operator:`in`,appliesTo:[`package-event`],phase:`P1`,description:`Delivered / picked-up / both.`},{id:`occupancy`,group:`occupancy`,label:`Occupancy`,valueType:`occupancy`,operator:`anyOf`,appliesTo:[`device-event`],phase:`P1`,description:`ZoneAnalytics occupancy edge (optionally zone/class-scoped): count crosses the threshold and holds for sustainSeconds. Fail-closed on a missing snapshot.`},{id:`audio`,group:`audio`,label:`Sound`,valueType:`audio`,operator:`anyOf`,appliesTo:[`immediate`],phase:`P2`,description:`Fires when at least hitPercent% of the samples in a samplingSeconds window are hits — a hit clears the dBFS floor AND carries one of the chosen sounds. Both filters are optional and independent, but naming NEITHER never matches: every sample would be a hit, so the engine refuses rather than notifying on silence. dBFS is negative-going (0 = full scale, -96 = silence).`},{id:`customZones`,group:`zones`,label:`Custom zones`,valueType:`polygonDraw`,operator:`anyOf`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`,description:`User-drawn polygons; a detection whose bbox overlaps any polygon matches.`},{id:`schedule`,group:`schedule`,label:`Schedule`,valueType:`schedule`,operator:`withinSchedule`,appliesTo:[`immediate`,`track-end`,`device-event`,`package-event`,`system-event`],phase:`P1`,description:`Weekly activation windows (invertible); absent = always active.`}],Xp=m([`pending`,`sent`,`dead`]),Zp=m([`object-event`,`track-end`,`device-event`,`package-event`,`system-event`]),Qp=i({className:g(),label:g().optional(),confidence:a().optional(),zones:p(g()),timestamp:a(),systemEvent:i({kind:up,subject:g(),title:g(),body:g(),data:n(g(),u())}).optional()}),$p=i({id:g(),ruleId:g(),ruleName:g(),delivery:lp,targetId:g(),deviceId:a(),recordKind:Zp,recordId:g(),trackId:g().optional(),status:Xp,attempts:a().int(),createdAt:a(),updatedAt:a(),error:g().optional(),subject:Qp}),em=100,tm=500,nm=i({ruleId:g().optional(),deviceId:a().optional(),status:Xp.optional(),since:a().optional(),until:a().optional(),limit:a().int().min(1).max(500).default(100)}),rm=m([`rule`,`device`,`all`]),im=i({scope:rm,ruleId:g().optional(),deviceId:a().int().optional(),classes:p(g().min(1)).min(1).optional(),durationMinutes:a().int().min(1).max(gp),global:v().optional(),summary:v().optional()}),am=i({id:g(),userId:g(),scope:rm,ruleId:g().optional(),deviceId:a().int().optional(),classes:p(g().min(1)).min(1).optional(),startedAt:a(),expiresAt:a(),global:v(),summary:v(),digestSentAt:a().optional()}),om=i({snoozeId:g(),targetId:g(),ruleId:g(),ruleName:g(),deviceId:a().int(),count:a().int(),firstAt:a(),lastAt:a()}),sm=i({exitDelaySec:a().int().min(0).max(600),entryDelaySec:a().int().min(0).max(600),triggeredDurationSec:a().int().min(0).max(3600),announceArm:v(),announceTargets:p(g().min(1)).max(16)}),cm=sm.partial(),lm=m([`muted`,`detection-off`,`offline`]),um=i({deviceId:a().int(),reason:lm}),dm=i({mode:Zf,ruleCount:a().int().min(0),allDevices:v(),deviceIds:p(a().int()),skippedDevices:p(um).default([])}),fm=i({deviceId:a().int().nullable(),settings:sm,coverage:p(dm)}),pm={name:`notification-rules`,scope:`system`,mode:`singleton`,methods:{listRules:T(i({}),i({rules:p(Kp)}),{auth:`admin`}),getRule:T(i({ruleId:g()}),i({rule:Kp.nullable()}),{auth:`admin`}),createRule:T(i({rule:Wp}),i({rule:Kp}),{kind:`mutation`,auth:`admin`,caller:`required`}),updateRule:T(i({ruleId:g(),patch:Gp}),i({rule:Kp}),{kind:`mutation`,auth:`admin`,caller:`required`}),deleteRule:T(i({ruleId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setRuleEnabled:T(i({ruleId:g(),enabled:v()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),listDeviceMutes:T(i({}),i({mutedDeviceIds:p(a().int()).readonly()}),{auth:`admin`}),setDeviceMuted:T(i({deviceId:a().int(),muted:v()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),testRule:T(i({rule:Wp,lookbackMinutes:a().int().min(1).max(1440).default(60)}),i({results:p(qp)}),{kind:`mutation`,auth:`admin`}),getConditionCatalog:T(i({}),i({catalog:p(Jp),taxonomy:Kf.optional()})),getHistory:T(i({filter:nm.default({limit:100})}),i({entries:p($p)}),{auth:`admin`}),listSnoozes:T(i({}),i({snoozes:p(am)}),{caller:`required`}),createSnooze:T(i({snooze:im}),i({snooze:am}),{kind:`mutation`,caller:`required`}),cancelSnooze:T(i({snoozeId:g()}),i({success:y(!0)}),{kind:`mutation`,caller:`required`}),getAlarmConfig:T(i({}),fm,{auth:`admin`}),setAlarmConfig:T(i({patch:cm}),fm,{kind:`mutation`,auth:`admin`})}},mm=m([`view`,`create`,`delete`]),hm=c([y(`*`),p(g())]),gm=n(g(),c([y(`*`),p(g())])),_m=m([`device`,`system`]),vm=b(`kind`,[i({kind:y(`all`)}),i({kind:y(`ids`),ids:p(a().int()).min(1)}),i({kind:y(`types`),types:p(m(D)).min(1)}),i({kind:y(`locations`),locations:p(g().min(1)).min(1)})]),ym=i({type:y(`device`),selector:vm,access:p(mm).min(1),includeLinked:v().optional()});function bm(e){if(typeof e!=`object`||!e||Array.isArray(e)||Reflect.get(e,`type`)!==`device`||Reflect.get(e,`selector`)!==void 0)return e;let t=Reflect.get(e,`targets`);return Array.isArray(t)?{type:`device`,selector:{kind:`ids`,ids:t.map(e=>typeof e==`string`?Number(e):e).filter(e=>typeof e==`number`&&Number.isInteger(e))},access:Reflect.get(e,`access`)}:e}var J=oe(bm,b(`type`,[i({type:y(`category`),target:_m,access:p(mm).min(1)}),i({type:y(`capability`),target:g(),access:p(mm).min(1)}),i({type:y(`addon`),target:g(),access:p(mm).min(1)}),ym])),xm=i({id:g(),username:g(),passwordHash:g(),isAdmin:v().default(!1),allowedProviders:hm,allowedDevices:gm,scopes:p(J).default([]),createdAt:a(),updatedAt:a()}),Sm=i({id:g(),label:g(),isAdmin:v().default(!1),allowedProviders:hm,allowedDevices:gm,tokenHash:g(),tokenPrefix:g(),createdAt:a(),lastUsedAt:a().optional()}),Cm=i({id:g(),userId:g(),name:g(),tokenHash:g(),tokenPrefix:g(),scopes:p(J),expiresAt:a().nullish(),lastUsedAt:a().nullish(),createdAt:a()}),wm=i({integrationId:g(),displayName:g(),requestedScopes:p(J),allowedRedirectPrefixes:p(g()).min(1),allowedPrivateHostPaths:p(g()).optional(),requiresPkce:v().optional(),hubUrl:g().optional(),refreshTokenTtlSec:c([a().int().positive(),y(`never`)]).optional()}),Tm={name:`oauth-integration`,scope:`system`,mode:`collection`,internal:!0,methods:{getDescriptor:T(h(),wm)}},Em=m([`new`,`entered`,`left`,`moving`,`idle`]),Dm=m([`motion`,`object`,`audio`]),Om=b(`kind`,[tp,np]),km=m([`motion`,`audio`,`person`,`vehicle`,`animal`,`door`,`pir`,`smoke`,`water`,`button`,`package`,`generic`]),Am=m([`motion`,`audio`,`detection`,`sensor`,`control`,`custom`,`package`]),jm=m([`macro`,`sub`]),Mm=i({kind:g(),labelKey:g(),label:g(),color:g(),iconId:g(),icon:km,category:Am,parentKind:g().nullable(),level:jm,source:i({capName:g(),deviceId:a()})}),Nm=i({deviceId:a(),kinds:p(Mm).readonly()}),Pm=i({id:g(),deviceId:a(),sourceDeviceId:a(),kind:g(),value:n(g(),u()).nullable(),timestamp:a()}),Fm=i({x:a(),y:a(),timestamp:a(),bbox:H}),Im=i({timestamp:a(),position:Fm,mediaKey:g()}),Lm=i({minX:a(),minY:a(),maxX:a(),maxY:a()}),Rm=m([`full`,`slim`]),zm=i({label:g(),peakScore:a(),count:a(),firstAt:a(),lastAt:a()}),Bm=m([`pipeline`,`sensor`,`audio`]),Vm=m([`none`,`staging`,`trained`]),Hm={markForTrain:v().optional(),debug:v().optional(),favourited:v().optional()},Um={retrainStatus:Vm.optional()},Wm=i(Hm),Gm=i({trackId:g(),markForTrain:v(),debug:v(),favourited:v(),retrainStatus:Vm}),Km=c([y(1),y(2)]),qm=i({stepId:g(),modelId:g().optional(),decidedAt:a(),identityId:g().optional()}),Jm={label:g().optional(),labelScore:a().optional(),labelMeta:qm.optional(),subLabel:g().optional(),subLabelScore:a().optional(),subLabelMeta:qm.optional()},Ym=i({deviceId:a(),tracks:a().int(),files:a().int(),bytes:a().int()}),Xm=i({generatedAt:a(),trackCount:a().int(),fileCount:a().int(),byteCount:a().int(),truncated:v(),devices:p(Ym).readonly()}),Zm=i({trackId:g(),deviceId:a(),className:g(),...Jm,producingDeviceName:g().optional(),source:Bm.optional(),firstSeen:a(),lastSeen:a(),positions:p(Fm).readonly(),snapshots:p(Im).readonly(),zonesVisited:p(g()).readonly(),zoneNames:p(g()).readonly().optional(),classes:p(g()).readonly().optional(),totalDistance:a(),state:Em,active:v(),importance:a().optional(),bestEventId:g().optional(),importanceReason:g().optional(),audioLabels:p(zm).readonly().optional(),envelope:Lm.optional(),hasFace:v().optional(),hasRider:v().optional(),...Hm,...Um}),Qm={id:g(),deviceId:a(),timestamp:a()},$m=i({...Qm,kind:y(`motion`),regionCount:a(),regions:p(i({bbox:H,pixelCount:a(),intensity:a()})).readonly().optional(),frameWidth:a().optional(),frameHeight:a().optional(),mediaUrl:g().optional()}),eh=m([`pipeline`,`onboard`]),th=m([`enter`,`exit`]),nh=i({direction:th,zoneId:g(),zoneName:g().optional()}),rh=i({...Qm,kind:y(`object`),source:eh.optional(),frameId:g().optional(),trackId:g().optional(),className:g(),...Jm,confidence:a().optional(),bbox:H.optional(),zones:p(g()).readonly().optional(),state:Em.optional(),zoneCrossing:nh.optional(),frameWidth:a().optional(),frameHeight:a().optional(),mediaKey:g().optional(),keyFrameMediaKey:g().optional(),mediaUrl:g().optional(),importance:a().optional()}),ih=i({...Qm,kind:y(`audio`),rms:a(),dbfs:a(),classification:i({className:g(),originalClass:g().optional(),score:a()}).optional(),mediaUrl:g().optional()}),ah=m([`crop`,`thumbnail`,`snapshot`,`firstFrame`,`lastFrame`,`fullFrame`,`fullFrameBoxed`,`faceCrop`,`plateCrop`,`keyFrame`,`keyFrameSmall`,`thumbnailSmall`]),oh=i({key:g(),kind:ah,base64:g(),sizeBytes:a(),timestamp:a()}),sh=oh.omit({base64:!0}),ch=m([`person`,`vehicle`,`animal`,`package`,`face`,`plate`]),lh=m([`subject`,`model_error`]),uh=m([`operator`,`assist`]),dh=i({x:a(),y:a(),w:a(),h:a()}),fh=i({id:g(),trackId:g(),deviceId:a(),mediaKey:g(),bbox:dh,macroClass:ch,label:g().optional(),subLabel:g().optional(),kind:lh,source:uh,assistModelId:g().optional(),assistScore:a().optional(),exportedInBatch:g().optional(),createdAt:a()}),ph=fh.omit({id:!0,trackId:!0,deviceId:!0,mediaKey:!0,createdAt:!0,exportedInBatch:!0}),mh=i({trackId:g(),deviceId:a(),className:g(),label:g().optional(),firstSeen:a(),lastSeen:a(),frameCount:a().int(),annotationCount:a().int()}),hh=i({mediaKey:g(),kind:ah,timestamp:a(),sizeBytes:a().int(),copied:v()}),gh=i({frameId:g(),deviceId:a(),trackId:g(),sourceMediaKey:g(),sourceKind:ah,sizeBytes:a().int(),width:a().int(),height:a().int(),copiedAt:a()}),_h=m([`source-missing`,`unreadable-image`,`write-failed`]),vh=i({copied:p(gh).readonly(),refused:p(i({sourceMediaKey:g(),reason:_h})).readonly()}),yh=i({candidates:p(hh).readonly(),copies:p(gh).readonly(),autoPickMediaKey:g().optional()}),bh=b(`kind`,[i({kind:y(`package`),zone:dh.optional()}),i({kind:y(`objects`),modelId:g(),minScore:a().optional()})]),xh=b(`kind`,[i({kind:y(`proposed`),modelId:g(),stepId:g(),minScore:a(),proposals:p(ph).readonly(),belowThreshold:a().int()}),i({kind:y(`refused`),reason:g(),detail:g().optional()})]),Sh=i({trackId:g(),retrainStatus:Vm,changed:v(),reason:m([`unknown-track`,`no-frames-copied`,`not-staging`,`not-trained`,`unchanged`]).optional()}),Ch=1e3,wh=5e3,Th=i({deviceId:a(),since:a().optional(),until:a().optional(),limit:a().int().min(1).max(wh).default(Ch),projection:m([`full`,`slim`]).optional()}),Eh=Th.extend({classFilter:g().optional()}),Dh=i({deviceIds:p(a()),since:a().optional(),until:a().optional(),limit:a().int().min(1).max(1e3).default(200),cursor:g().optional(),projection:Rm.optional(),includeStationary:v().optional()}),Oh=i({tracks:p(Zm).readonly(),nextCursor:g().nullable()}),kh=i({deviceId:a(),since:a(),until:a(),limit:a().int().min(1).max(200).default(50),minImportance:a().min(0).max(1).optional(),classFilter:g().optional()}),Ah=i({id:g(),trackId:g(),timestamp:a(),className:g(),...Jm,importance:a(),bestEventId:g(),windowMs:a().optional(),...Hm,...Um}),jh=i({trackId:g(),className:g(),confidence:a(),bbox:H,zones:p(g()).readonly(),state:Em}),Mh=f({id:g(),kind:m([`first-level`,`detail`]),macroClass:g(),score:a(),bbox:i({x:a(),y:a(),width:a(),height:a()}),labels:p(f({label:g(),score:a()})).readonly(),parentId:g().optional()}),Nh=rh.extend({score:a()}),Ph=i({text:g(),deviceId:a().optional(),since:a().optional(),until:a().optional(),classFilter:g().optional(),limit:a().default(50),minScore:a().min(0).max(1).default(.2)}),Fh=i({tracks:a().int(),events:a().int(),media:a().int(),faces:a().int(),plates:a().int(),embeddings:a().int()}),Ih=i({mediaDropped:a().int(),tracks:a().int(),events:a().int()}),Lh=i({deviceId:a(),rows:a().int(),bytes:a().int()}),Rh=i({totalRows:a().int(),totalBytes:a().int(),devices:p(Lh).readonly()}),zh=i({motion:a().int(),object:a().int(),audio:a().int()}),Bh=i({deviceId:a().optional(),since:a().optional(),until:a().optional(),maxTracks:a().int().positive().optional(),executeOnNodeId:g().optional(),pacingMs:a().int().nonnegative().optional()}),Vh=i({deleted:a()}),Hh=i({started:v(),alreadyRunning:v()}),Uh=i({running:v(),scanned:a(),rebuilt:a(),missingKeyFrame:a(),missingBbox:a(),notRunnable:a(),noCapableNode:a(),failed:a(),complete:v().nullable(),startedAtMs:a().nullable(),finishedAtMs:a().nullable(),error:g().nullable()}),Wh={name:`pipeline-analytics`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],exposesDeviceSettings:!0,methods:{getActiveTracks:T(i({deviceId:a()}),p(Zm).readonly()),getTrack:T(i({deviceId:a(),trackId:g()}),Zm.nullable()),listTracks:T(i({deviceId:a(),since:a().optional(),until:a().optional(),limit:a().optional(),zone:Om.optional(),projection:Rm.optional(),includeStationary:v().optional()}),p(Zm).readonly()),listRecentTracks:T(Dh,Oh),clearTracks:T(i({deviceId:a()}),h(),{kind:`mutation`,auth:`admin`}),getMotionEvents:T(Th,p($m).readonly()),getObjectEvents:T(Eh,p(rh).readonly()),getAudioEvents:T(Th,p(ih).readonly()),listEventKinds:T(i({deviceId:a()}),p(Mm).readonly()),listEventKindsBatch:T(i({deviceIds:p(a()).min(1).max(200)}),p(Nm).readonly()),getSensorEvents:T(i({deviceId:a(),since:a().optional(),until:a().optional(),kinds:p(g()).optional(),limit:a().int().min(1).max(wh).default(Ch)}),p(Pm).readonly()),getKeyEvents:T(kh,p(Ah).readonly()),getEventDensity:T(i({deviceId:a(),since:a(),until:a(),bucketMs:a().int().positive()}),p(i({bucketStart:a(),motion:a().int(),object:a().int(),audio:a().int()})).readonly()),pruneEventsBefore:T(i({deviceId:a(),cutoffMs:a()}),i({motion:a().int(),object:a().int(),audio:a().int()}),{kind:`mutation`,auth:`admin`}),pruneTracksBefore:T(i({deviceId:a(),cutoffMs:a()}),Fh,{kind:`mutation`,auth:`admin`}),wipeAllAnalytics:T(i({deviceId:a()}),Fh,{kind:`mutation`,auth:`admin`}),reconcileFromDisk:T(i({deviceId:a()}),Ih,{kind:`mutation`,auth:`admin`}),deleteTracks:T(i({deviceId:a(),trackIds:p(g()).min(1)}),i({deleted:a().int(),failed:p(g()).readonly()}),{kind:`mutation`,auth:`admin`}),setTrackFlags:T(i({deviceId:a(),trackId:g(),flags:Wm}),Gm,{kind:`mutation`}),getEventStoreFootprint:T(i({}),Rh,{kind:`query`,auth:`admin`}),pruneEvents:T(i({olderThanMs:a(),reason:ri.optional()}),zh,{kind:`mutation`,auth:`admin`}),deleteDeviceEvents:T(i({deviceId:a()}),zh,{kind:`mutation`,auth:`admin`}),pauseForStorageMigration:T(j,i({paused:y(!0)}),{kind:`mutation`,auth:`admin`}),resumeForStorageMigration:T(j,i({resumed:y(!0)}),{kind:`mutation`,auth:`admin`}),refreshStorageLocationsForMigration:T(j,i({refreshed:y(!0)}),{kind:`mutation`,auth:`admin`}),startStorageMigrationMove:T(Fi,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),getStorageMigrationMoveStatus:T(i({jobId:g()}),Ai.nullable(),{auth:`admin`}),cancelStorageMigrationMove:T(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),listOpsLog:T(ai,p(ii).readonly(),{kind:`query`,auth:`admin`}),getTrainingExportSummary:T(i({deviceIds:p(a()).optional()}),Xm,{kind:`query`,auth:`admin`}),getTrainingExportUrl:T(i({deviceIds:p(a()).optional()}),i({url:g()}),{kind:`query`,auth:`admin`}),listRetrainStaging:T(i({deviceIds:p(a()).optional(),limit:a().int().min(1).max(500).optional()}),p(mh).readonly(),{kind:`query`,auth:`admin`}),listRetrainFrames:T(i({trackId:g()}),yh,{kind:`query`,auth:`admin`}),selectRetrainFrames:T(i({deviceId:a(),trackId:g(),mediaKeys:p(g()).min(1)}),vh,{kind:`mutation`,auth:`admin`}),deselectRetrainFrame:T(i({deviceId:a(),trackId:g(),frameId:g()}),i({removed:v(),removedAnnotations:a().int()}),{kind:`mutation`,auth:`admin`}),getRetrainFrameImage:T(i({frameId:g()}),i({base64:g(),width:a().int(),height:a().int()}),{kind:`query`,auth:`admin`}),proposeRetrainAnnotations:T(i({deviceId:a(),trackId:g(),frameId:g(),subject:bh,nodeId:g().optional()}),xh,{kind:`mutation`,auth:`admin`}),listRetrainAnnotations:T(i({trackId:g()}),p(fh).readonly(),{kind:`query`,auth:`admin`}),saveRetrainAnnotations:T(i({deviceId:a(),trackId:g(),frameId:g(),annotations:p(ph)}),p(fh).readonly(),{kind:`mutation`,auth:`admin`}),completeRetrainTrack:T(i({deviceId:a(),trackId:g()}),Sh,{kind:`mutation`,auth:`admin`}),restageRetrainTrack:T(i({deviceId:a(),trackId:g()}),Sh,{kind:`mutation`,auth:`admin`}),getRetrainExportUrl:T(i({deviceIds:p(a()).optional()}),i({url:g()}),{kind:`query`,auth:`admin`}),getEventMedia:T(i({eventId:g(),kind:ah.optional(),deviceId:a()}),p(oh).readonly()),getTrackMedia:T(i({trackId:g(),kinds:p(ah).optional(),deviceId:a()}),p(oh).readonly()),listTrackMedia:T(i({trackId:g(),deviceId:a()}),p(sh).readonly()),searchObjectEvents:T(Ph,p(Nh).readonly()),wipeObjectEmbeddings:T(i({}),Vh,{kind:`mutation`,auth:`admin`}),rebuildObjectEmbeddings:T(Bh,Hh,{kind:`mutation`,auth:`admin`}),getObjectEmbeddingRebuildStatus:T(i({}),Uh)},events:{onFrameTracked:{data:i({deviceId:a(),timestamp:a(),frameWidth:a(),frameHeight:a(),detections:p(Mh).readonly()})},onTrackStarted:{data:i({deviceId:a(),trackId:g(),className:g()})},onTrackEnded:{data:i({deviceId:a(),trackId:g(),className:g(),durationMs:a()})},onDetectionEvent:{data:i({deviceId:a(),kind:Dm,eventId:g(),timestamp:a()})}}},Gh=i({handle:C,cropFrameSpace:i({x:a(),y:a(),w:a(),h:a()})}),Kh=m([`onnx`,`coreml`,`openvino`,`tflite`,`pt`,`gguf`]),qh=m([`detector`,`cropper`,`classifier`,`refiner`,`audio-classifier`]),Y=i({runtime:m([`node`,`python`]),backend:g(),format:Kh,device:g().optional()}),Jh=i({engine:Y,devices:p(i({id:g(),label:g(),description:g().optional()})).readonly(),defaultDevice:g()}),Yh=r(()=>i({addonId:g(),addonName:g(),slot:qh,inputClasses:p(g()).readonly(),outputClasses:p(g()).readonly(),enabled:v(),modelId:g(),children:p(Yh).readonly(),group:g().optional(),settings:n(g(),u()).optional()})),Xh=r(()=>i({addonId:g(),enabled:v(),modelId:g(),children:p(Xh).readonly(),settings:n(g(),u()).optional()})),Zh=i({id:g(),name:g(),createdAt:g(),updatedAt:g(),engine:Y,steps:p(Xh).readonly()}),Qh=i({id:g(),name:g(),formats:n(g(),i({downloaded:v(),sizeMB:a()})),group:ya.optional(),legacy:v().optional()}),$h=x(),eg=i({id:g(),name:g(),slot:qh,inputClasses:p(g()).readonly(),outputClasses:p(g()).readonly(),childSlots:p(qh).readonly(),models:p(Qh).readonly(),defaultModelId:g(),defaultModelIdByFormat:n(g(),g()).optional(),enabledByDefault:v().optional(),backfillIntoExistingOverrides:v().optional(),defaultConfidence:a(),group:g().optional(),configSchema:p($h).readonly().optional()}),tg=i({id:qh,label:g(),priority:a(),parentSlot:qh.nullable(),addons:p(eg).readonly()}),ng=i({availableEngines:p(Jh).readonly(),selectedEngine:Y,slots:p(tg).readonly()}),rg=i({runtimeId:m([`onnx`,`openvino`,`coreml`,`edgetpu`]).nullable(),device:g().nullable(),state:m([`idle`,`installing`,`verifying`,`ready`,`failed`]),progress:a().optional(),error:g().optional(),nextRetryAt:a().optional(),configIssues:p(g()).optional()}),X=r(()=>i({addonId:g(),modelId:g().optional(),enabled:v().default(!0),children:p(X).optional(),settings:n(g(),u()).optional(),jumpDeviceKey:g().optional()})),ig=i({addonId:g(),chosen:g(),running:g(),format:g()}),ag=i({addonId:g(),kind:m([`unknown-addon`,`no-format-build`]),detail:g()}),og=i({ok:v(),issues:p(ag).readonly(),substitutions:p(ig).readonly(),format:g()}),sg=i({filename:g(),stepIds:p(g()).readonly().optional()}),cg=i({base64:g(),filename:g()}),lg=i({filename:g(),sizeKb:a()}),ug=i({base64:g()}),dg=i({id:g(),name:g(),description:g(),available:v(),rawLabels:p(g()).readonly().optional()}),fg=i({activeBackend:g(),availableBackends:p(dg).readonly(),sampleRate:a(),chunkDurationMs:a()}),pg=i({filePath:g(),sizeMB:a(),durationMs:a()}),mg=i({success:v(),error:g().optional(),frame:x().optional()}),hg=x(),gg=x(),_g=x(),vg=x(),yg=x(),bg=x(),xg={name:`pipeline-executor`,scope:`system`,mode:`singleton`,methods:{getAvailableEngines:T(h(),p(Y)),getSelectedEngine:T(h(),Y),getDefaultSteps:T(Y,p(Yh)),getEngineProvisioning:T(i({nodeId:g()}),rg),getVideoPipelineSteps:T(h(),n(g(),i({modelId:g(),settings:n(g(),u()).readonly()}))),setVideoPipelineSteps:T(i({steps:n(g(),i({modelId:g(),settings:n(g(),u()).readonly()}))}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),clearDeviceOverrides:T(i({nodeId:g()}),i({success:y(!0),clearedDevices:a()}),{kind:`mutation`,auth:`admin`}),getSchema:T(h(),ng),getGlobalSteps:T(h(),p(Yh).readonly().nullable()),getGlobalPipelineConfig:T(h(),hg),getOrchestratorConfigSchema:T(h(),gg),validatePipeline:T(i({steps:p(X)}),og),listTemplates:T(h(),p(Zh).readonly()),saveTemplate:T(i({name:g(),steps:p(Xh).readonly(),engine:Y}),Zh,{kind:`mutation`}),updateTemplate:T(i({id:g(),name:g().optional(),steps:p(Xh).readonly().optional()}),Zh,{kind:`mutation`}),deleteTemplate:T(i({id:g()}),h(),{kind:`mutation`}),getCapabilities:T(h(),vg),getAddonModels:T(i({addonId:g()}),yg),downloadModel:T(i({addonId:g(),modelId:g(),format:Kh}),pg,{kind:`mutation`}),deleteModel:T(i({addonId:g(),modelId:g(),format:Kh}),i({success:y(!0)}),{kind:`mutation`}),runPipeline:T(i({engine:Y.optional(),steps:p(X).min(1),frame:ys.optional(),frameHandle:C.optional(),imageBase64:g().optional(),image:_(Uint8Array).optional(),referenceImage:g().optional(),deviceId:a().optional(),sessionId:g().optional(),plane:m([`full`,`frame`]).optional(),deviceKey:g().optional(),nativeCropRef:Gh.optional()}),bg,{kind:`mutation`}),runPipelineBatch:T(i({engine:Y.optional(),steps:p(X).min(1),frames:p(ys).min(1).max(255),deviceId:a().optional(),sessionId:g().optional(),frameId:a().int().nonnegative().optional(),deviceKey:g().optional()}),i({results:p(bg).readonly()}),{kind:`mutation`}),cacheFrameInPool:T(i({data:_(Uint8Array),width:a().int().positive(),height:a().int().positive(),format:m([`rgb`,`bgr`,`gray`])}),i({frameId:a(),width:a(),height:a()}),{kind:`mutation`}),inferCached:T(i({stepId:g(),frameId:a().int()}),n(g(),u()),{kind:`mutation`}),uncacheFrame:T(i({frameId:a().int()}),h(),{kind:`mutation`}),getEffectiveTuning:T(h(),i({batchMode:g(),windowMs:a(),maxBatchSize:a(),concurrency:a()})),listLoadedEngines:T(h(),p(i({engineKey:g(),engine:Y,modelsLoaded:p(g()).readonly(),inUseByCameras:p(a()).readonly(),kind:m([`runtime`,`warm-override`,`device-pool`]),poolPid:a().nullable(),idleMs:a().nullable(),idleTtlMs:a().nullable()})).readonly()),spinEngine:T(i({engine:Y}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),killEngine:T(i({engine:Y,force:v().optional()}),i({success:v(),reason:g().optional()}),{kind:`mutation`,auth:`admin`}),listReferenceImages:T(h(),p(sg).readonly()),getReferenceImage:T(i({filename:g()}),cg.nullable()),getReferenceAudioFiles:T(h(),p(lg).readonly()),getReferenceAudio:T(i({filename:g()}),ug.nullable()),getAudioCapabilities:T(h(),fg),runAudioTest:T(i({addonId:g(),modelId:g(),filename:g().optional(),settings:n(g(),u()).optional()}),mg,{kind:`mutation`}),getDetectionConfigSchema:T(h(),_g)}},Sg=i({activeCameras:a(),throttledCameras:a(),avgInferenceTimeMs:a(),queueDepth:a()}),Cg=i({detectionMode:m([`disabled`,`always-on`,`on-motion`]),configuredFps:a(),actualFps:a(),queueDepth:a(),avgInferenceTimeMs:a(),droppedFrames:a(),phase:m([`idle`,`watching`,`active`])}),wg=Cg.extend({deviceId:a()}),Tg=m([`polygon`,`tripwire`]),Eg=i({x:a(),y:a()}),Dg=i({id:g(),name:g(),kind:Tg.default(`polygon`),polygon:p(Eg).readonly(),color:g().default(`#3b82f6`)}),Og={name:`zones`,scope:`device`,mode:`singleton`,deviceTypes:[D.Camera],methods:{listZones:T(i({deviceId:a()}),p(Dg).readonly()),addZone:T(i({deviceId:a(),zone:Dg}),h(),{kind:`mutation`,auth:`admin`}),removeZone:T(i({deviceId:a(),zoneId:g()}),h(),{kind:`mutation`,auth:`admin`}),updateZone:T(i({deviceId:a(),zone:Dg}),h(),{kind:`mutation`,auth:`admin`})},runtimeState:i({zones:p(Dg).readonly()}),durability:`restored`},kg=i({x:a(),y:a(),w:a(),h:a()}),Ag=i({bytes:_(Uint8Array).optional(),jpeg:g().optional(),width:a().int().positive(),height:a().int().positive(),tier:m([`native`,`ram-fullframe`]).optional()}),jg=i({bbox:kg,className:g()}),Mg=i({stepId:g(),className:g(),score:a(),bbox:kg.optional(),embedding:g().optional(),embeddingMagnitude:a().optional(),label:g().optional(),labelTier:c([y(1),y(2)]).optional(),labelModelId:g().optional(),alignedCropJpeg:g().optional(),nativeFaceShortSidePx:a().optional()}),Ng=m([`unknown-step`,`model-not-servable`,`unreadable-frame`,`execution-failed`]),Pg=b(`kind`,[i({kind:y(`ran`),nodeId:g(),modelId:g(),details:p(Mg)}),i({kind:y(`refused`),nodeId:g(),reason:Ng,detail:g()})]),Fg={min:0,max:6e4,default:3e4,step:500},Ig={min:0,max:6e5,default:12e4,step:5e3},Lg={min:5e3,max:6e5,default:9e4,step:5e3},Rg={min:1,max:30,default:4,step:1},zg={min:1,max:30,default:10,step:1},Bg={min:0,max:300,default:300,step:5},Vg={min:1,max:10,default:4,step:1},Hg=m([`onboard`,`analyzer`]),Ug=p(Hg),Wg=i({deviceId:a(),detected:v(),source:Hg.default(`analyzer`),regions:p(Wd).readonly().optional()}),Gg=b(`kind`,[i({kind:y(`local-broker`)}),i({kind:y(`remote-restream`),ownerNodeId:g(),ownerReachableHost:g().optional(),hubHostnameOverride:g().optional()})]).describe(`Per-camera frame-source mode for the runner (P2c)`),Kg=i({deviceKey:g(),weight:a().positive().default(1),maxSessions:a().int().positive().nullable().default(null)}),qg=i({deviceId:a(),detectionMode:m([`disabled`,`always-on`,`on-motion`]).default(`on-motion`),audioMode:m([`disabled`,`always-on`,`on-motion`]).default(`always-on`),motionCooldownMs:a().min(Fg.min).default(Fg.default),maxSessionHoldMs:a().min(Ig.min).max(Ig.max).optional(),audioMotionWindowMs:a().min(Lg.min).max(Lg.max).optional(),motionFps:a().min(Rg.min).max(Rg.max).default(Rg.default),detectionFps:a().min(zg.min).max(zg.max).default(zg.default),motionStreamId:g(),detectionStreamId:g(),motionSources:Ug.default([`analyzer`]),pipelineEnabled:v().default(!0),steps:p(X).readonly().optional(),audio:i({modelId:g().optional(),enabled:v()}).nullable().optional(),zones:p(Dg).readonly().default([]),onboardMotionDrivesAnalyzer:v().default(!0),occupancyRecheckEnabled:v().default(!0),occupancyRecheckSec:a().min(Bg.min).max(Bg.max).default(Bg.default),occupancyRecheckFrames:a().min(Vg.min).max(Vg.max).default(Vg.default),frameSource:Gg.default({kind:`local-broker`}),deviceKey:g().optional(),inferenceDevices:p(Kg).readonly().optional()}),Jg=[{key:`motionSources`,type:`multiselect`,label:`Motion Sources`,default:[`analyzer`],options:[{value:`analyzer`,label:`Frame-diff Analyzer (motion addon)`},{value:`onboard`,label:`Camera Onboard Sensor`}]},{key:`motionFps`,type:`slider`,label:`Motion FPS (analyzer)`,min:Rg.min,max:Rg.max,step:Rg.step,default:Rg.default,showValue:!0,unit:`fps`,nullable:!0,nullLabel:`Default`,showWhen:{field:`motionSources`,includes:`analyzer`}},{key:`detectionFps`,type:`slider`,label:`Detection FPS`,min:zg.min,max:zg.max,step:zg.step,default:zg.default,showValue:!0,unit:`fps`,nullable:!0,nullLabel:`Default`},{key:`motionCooldownMs`,type:`slider`,label:`Motion Cooldown`,description:`Time without a fresh motion event before the active phase ends. Applies to all motion sources — every motion event re-arms the timer.`,min:Fg.min,max:Fg.max,step:Fg.step,default:Fg.default,showValue:!0,unit:`s`,displayScale:1e3,nullable:!0,nullLabel:`Default`},{key:`maxSessionHoldMs`,type:`slider`,label:`Max session hold`,description:`Upper bound on how long detection keeps running past the motion cooldown while a subject is still moving in-frame but no longer triggering motion. Prevents the detection box from stopping on a slow-moving subject. Set to 0 to disable.`,min:Ig.min,max:Ig.max,step:Ig.step,default:Ig.default,showValue:!0,unit:`s`,displayScale:1e3,nullable:!0,nullLabel:`Default`},{key:`audioMotionWindowMs`,type:`slider`,label:`Audio window after motion`,description:`How long audio keeps being analysed after the last motion event. Each new motion event extends the window without restarting the audio stream.`,min:Lg.min,max:Lg.max,step:Lg.step,default:Lg.default,showValue:!0,unit:`s`,displayScale:1e3,nullable:!0,nullLabel:`Default`,showWhen:{field:`audioMode`,equals:`on-motion`}},{key:`onboardMotionDrivesAnalyzer`,type:`boolean`,label:`Run motion analyzer on onboard motion`,description:`When onboard motion is detected, temporarily start the frame-diff analyzer to emit zone results. Stops after the motion cooldown window.`,default:!0,showWhen:{field:`motionSources`,includes:`onboard`}},{key:`occupancyRecheckEnabled`,type:`boolean`,style:`checkbox`,label:`Occupancy re-check`,description:`Periodically re-sample a few frames during the watching phase, so objects that are simply parked are still counted (motion gating alone loses them after a restart). On by default at a wide interval; turn it off on cameras where the extra decoder re-dial is expensive.`,default:!0},{key:`occupancyRecheckSec`,type:`slider`,label:`Occupancy re-check interval`,description:`How often (in seconds) the runner re-samples a few frames to confirm the scene is truly empty during the watching phase.`,min:Bg.min,max:Bg.max,step:Bg.step,default:Bg.default,showValue:!0,unit:`s`,showWhen:{field:`occupancyRecheckEnabled`,equals:!0}},{key:`occupancyRecheckFrames`,type:`slider`,label:`Occupancy re-check frames`,description:`Number of frames sampled per occupancy re-check burst.`,min:Vg.min,max:Vg.max,step:Vg.step,default:Vg.default,showValue:!0,showWhen:{field:`occupancyRecheckEnabled`,equals:!0}}],Yg=i({nodeId:g(),attachedCameras:a(),activeCameras:a(),avgInferenceFps:a(),avgInferenceTimeMs:a(),queueDepthTotal:a(),devices:p(i({deviceKey:g(),backend:g(),attachedCameras:a(),queueDepthTotal:a()})).default([]),hardware:i({hasGpu:v(),inferenceBackend:g().optional(),cpuCores:a().optional()})}),Xg=i({nodeId:g(),activeCameras:a(),throttledCameras:a(),avgInferenceTimeMs:a(),queueDepth:a()}),Zg={name:`pipeline-runner`,scope:`system`,mode:`singleton`,methods:{attachCamera:T(qg,i({success:y(!0)}),{kind:`mutation`}),detachCamera:T(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`}),reportMotion:T(Wg,i({success:y(!0)}),{kind:`mutation`}),getLocalLoad:T(h(),Yg),getLocalMetrics:T(h(),Xg),getCameraMetrics:T(i({deviceId:a()}),Cg.nullable()),getAllCameraMetrics:T(h(),p(wg).readonly()),getLocalCameras:T(h(),p(a()).readonly()),getNativeCrop:T(i({handle:C,bbox:kg,maxWidth:a().int().positive().optional(),encodeJpeg:v().optional()}),Ag.nullable()),runDetailSubtree:T(i({deviceId:a(),frameHandle:C.optional(),frameJpeg:g().optional(),cropJpeg:g().optional(),parent:jg,steps:p(g()).optional()}),i({details:p(Mg)}).nullable(),{kind:`mutation`}),runStatelessStep:T(i({stepId:g(),modelId:g(),frameJpeg:g(),bbox:kg,className:g(),sourceDeviceId:a()}),Pg,{kind:`mutation`})}},Qg=i({engine:Y.optional(),steps:p(X).readonly(),audio:i({engine:Y.optional(),modelId:g().optional(),enabled:v(),settings:n(g(),u()).readonly().optional()}).nullable().optional()}),$g=i({id:g(),name:g(),description:g().optional(),config:Qg,createdAt:g(),updatedAt:g()}),e_=i({modelId:g().optional(),settings:n(g(),u()).optional(),jumpDeviceKey:g().optional()}),t_=i({maxCameras:a().int().nonnegative().nullable().default(null),detectWeight:a().positive().optional(),detect:v().optional(),decode:v().optional(),audio:v().optional(),ingest:v().optional(),reachableHost:g().optional(),inferenceDevices:n(g(),i({enabled:v(),weight:a().positive().optional(),maxSessions:a().int().positive().optional(),steps:n(g(),e_).optional()})).optional()}),n_=i({steps:p(X).readonly(),audio:i({modelId:g(),enabled:v()}).nullable()}),r_=i({modelId:g().optional(),settings:n(g(),u()).readonly().optional()}),i_=i({pinnedAgentNodeId:g().optional(),stepToggles:n(g(),v()).optional(),stepOverridesByDevice:n(g(),n(g(),n(g(),r_))).optional(),pipelineByAgent:n(g(),n_).optional()}),a_=i({deviceId:a(),agentNodeId:g(),pinned:v(),reason:m([`manual`,`capacity`,`hardware-affinity`,`failover`,`rebalance`]),assignedAt:a()}),o_=i({nodeId:g(),online:v(),load:Yg,score:a(),decodeHwaccel:g().nullable()}),s_=i({totalAgents:a(),onlineAgents:a(),totalCameras:a(),attachedCameras:a(),activeCameras:a(),avgInferenceTimeMs:a(),queueDepth:a()}),c_=n(g(),g()),l_=i({ownerNodeId:g(),reachableHost:g().optional(),configIssue:g().optional()}),u_=i({camStreamId:g(),codec:g(),width:a(),height:a(),fps:a(),kind:g()}),d_=i({streams:p(u_).readonly()}),f_=i({detectionNodeId:g().nullable(),decoderNodeId:g().nullable(),audioNodeId:g().nullable(),sourceNodeId:g().nullable(),pinned:i({detection:v(),decoder:v(),audio:v()}),reasons:i({detection:g().optional(),decoder:g().optional(),audio:g().optional()})}),p_=i({profile:g(),status:g(),codec:g(),width:a(),height:a(),subscribers:a(),inFps:a(),outFps:a()}),m_=i({profiles:p(p_).readonly(),webrtcSessions:a(),rtspRestream:v()}),h_=i({framesWritten:a(),getFrameHits:a(),getFrameMisses:a(),budgetMb:a()}),g_=i({nodeId:g(),formats:p(g()).readonly(),sessionCount:a(),shm:h_}),__=i({enabled:v(),fps:a()}),v_=m([`idle`,`installing`,`verifying`,`ready`,`failed`]),y_=i({state:v_,error:g().optional()}),b_=m([`idle`,`watching`,`active`]),x_=i({nodeId:g(),engine:i({backend:g(),device:g()}),phase:b_,configuredFps:a(),actualFps:a(),queueDepth:a(),avgInferenceMs:a(),provisioning:y_}),S_=i({nodeId:g(),enabled:v()}),C_=m([`off`,`continuous`,`events`]),w_=i({mode:C_,active:v(),storageBytes:a()}),T_=m([`source`,`broker`,`detection`,`recording`,`switches`]),E_=m([`timeout`,`error`,`partial`]),D_=i({stage:T_,reason:E_,elapsedMs:a()}),O_=i({state:m([`idle`,`running`,`done`,`error`]),total:a().int().nonnegative(),completed:a().int().nonnegative(),currentDeviceId:a().int().nullable(),failed:p(a().int()).readonly(),mediaDropped:a().int().nonnegative(),tracks:a().int().nonnegative(),events:a().int().nonnegative(),startedAtMs:a().int().nullable(),finishedAtMs:a().int().nullable(),error:g().nullable()}),k_=i({deviceId:a(),assignment:f_,source:d_,broker:m_.nullable(),decoder:g_.nullable(),motion:__.nullable(),detection:x_.nullable(),audio:S_.nullable(),recording:w_.nullable(),switchedOff:p(Or).readonly(),degraded:p(D_).readonly(),fetchedAt:a()}),A_=i({key:g(),backend:g(),device:g(),format:m(ga),available:v(),enabled:v(),weight:a(),maxSessions:a().nullable(),defaultModelId:g(),steps:n(g(),e_).optional()}),j_=i({nodeId:g(),reachable:v(),devices:p(A_).readonly()}),M_={name:`pipeline-orchestrator`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,exposesDeviceSettings:!0,methods:{pauseForStorageMigration:T(j,i({paused:y(!0)}),{kind:`mutation`,auth:`admin`}),resumeForStorageMigration:T(j,i({resumed:y(!0)}),{kind:`mutation`,auth:`admin`}),assignPipeline:T(i({deviceId:a(),agentNodeId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),unassignPipeline:T(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setPipelineDevicePin:T(i({deviceId:a(),deviceKey:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getPipelineDevicePin:T(i({deviceId:a()}),i({deviceKey:g().nullable()})),rebalance:T(h(),i({migrated:a()}),{kind:`mutation`,auth:`admin`}),getPipelineAssignments:T(h(),p(a_).readonly()),getPipelineAssignment:T(i({deviceId:a()}),a_.nullable()),getAgentLoad:T(h(),p(o_).readonly()),getGlobalMetrics:T(h(),s_),getCameraMetrics:T(i({deviceId:a()}),Cg.nullable()),getCapabilityBindings:T(i({nodeId:g()}),c_),setCapabilityBinding:T(i({nodeId:g(),capName:g(),addonId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getIngestOwner:T(h(),l_),assignAudio:T(i({deviceId:a(),nodeId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),unassignAudio:T(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getAudioAssignment:T(i({deviceId:a()}),i({nodeId:g(),pinned:v(),assignedAt:a()}).nullable()),getAudioNodeLoad:T(h(),p(i({nodeId:g(),deviceCount:a()}))),getAudioAssignments:T(h(),p(i({deviceId:a(),nodeId:g(),pinned:v(),assignedAt:a()}))),getAgentSettings:T(i({agentNodeId:g()}),t_.nullable()),listAgentSettings:T(h(),p(i({nodeId:g(),settings:t_})).readonly()),removeAgentSettings:T(i({agentNodeId:g()}),i({success:v(),removed:v()}),{kind:`mutation`,auth:`admin`}),setAgentMaxCameras:T(i({agentNodeId:g(),maxCameras:a().int().nonnegative().nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setAgentDetectWeight:T(i({agentNodeId:g(),detectWeight:a().positive().nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setAgentCapabilities:T(i({agentNodeId:g(),detect:v().nullable().optional(),audio:v().nullable().optional(),ingest:v().nullable().optional()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setAgentReachableHost:T(i({agentNodeId:g(),reachableHost:g().nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setAgentInferenceDevices:T(i({agentNodeId:g(),inferenceDevices:n(g(),i({enabled:v(),weight:a().positive().optional(),maxSessions:a().int().positive().optional(),steps:n(g(),e_).optional()}))}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getNodeInferenceDevices:T(i({nodeId:g()}),j_),resetNodePipelineDefaults:T(i({agentNodeId:g()}),i({success:y(!0),effectiveModelId:g().nullable(),clearedCameraOverrides:a()}),{kind:`mutation`,auth:`admin`}),getCameraSettings:T(i({deviceId:a()}),i_.nullable()),setCameraStepToggle:T(i({deviceId:a(),addonId:g(),enabled:v().nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getCameraStepOverrides:T(i({deviceId:a()}),n(g(),n(g(),n(g(),r_))).nullable()),setCameraStepOverride:T(i({deviceId:a(),agentNodeId:g(),deviceKey:g(),addonId:g(),patch:r_.nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setCameraPipelineForAgent:T(i({deviceId:a(),agentNodeId:g(),pipeline:n_.nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),resolvePipeline:T(i({deviceId:a(),agentNodeId:g().optional()}),Qg),getCameraSwitches:T(i({deviceId:a()}),Nr),setCameraSwitch:T(i({deviceId:a(),switchId:Or,enabled:v()}),Nr,{kind:`mutation`,auth:`admin`}),getCameraStatus:T(i({deviceId:a()}),k_),getCameraStatuses:T(i({deviceIds:p(a()).optional()}),p(k_).readonly()),reconcileFromDisk:T(h(),O_,{kind:`mutation`,auth:`admin`}),getReconcileFromDiskStatus:T(h(),O_,{auth:`admin`}),listTemplates:T(h(),p($g).readonly()),saveTemplate:T(i({name:g(),description:g().optional(),config:Qg}),$g,{kind:`mutation`,auth:`admin`}),updateTemplate:T(i({id:g(),name:g().optional(),description:g().optional(),config:Qg.optional()}),$g,{kind:`mutation`,auth:`admin`}),deleteTemplate:T(i({id:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`})}},N_={motion:`motion`,audio:`audio`,person:`person`,vehicle:`vehicle`,animal:`animal`,package:`package`,door:`door`,pir:`pir`,smoke:`smoke`,water:`water`,button:`button`,generic:`generic`,gas:`smoke`,vibration:`generic`,tamper:`generic`,presence:`person`,lock:`generic`,siren:`generic`,switch:`generic`,doorbell:`button`};function P_(e){return N_[e]??`generic`}var F_={contact:`contact`,motion:`motion-sensor`,smoke:`smoke`,flood:`flood`,gas:`gas`,"carbon-monoxide":`carbon-monoxide`,vibration:`vibration`,tamper:`tamper`,presence:`presence`,"enum-sensor":`enum-sensor`,"event-emitter":`device-event`,"lock-control":`lock`,switch:`switch`,button:`button`,doorbell:`doorbell`};function I_(e,t){let n=Vf[t];if(n===void 0)throw Error(`EVENT_KIND_BY_CAP: cap '${e}' maps to unknown taxonomy kind '${t}'`);return{...n,icon:P_(n.iconId)}}var L_=Object.freeze(Object.fromEntries(Object.entries(F_).map(([e,t])=>[e,I_(e,t)]))),R_=Object.keys(F_);function z_(e,t){let n=Vf[e];return n===void 0?null:{kind:n.kind,labelKey:n.labelKey,label:n.label,color:n.color,iconId:n.iconId,icon:P_(n.iconId),category:n.category,parentKind:n.parentKind,level:n.level,source:{capName:t.capName,deviceId:t.deviceId}}}var B_=m([`workspace`,`baked`,`data-root`]),V_=m([`idle`,`checking`,`staging`,`pending-restart`,`awaiting-confirmation`]),H_=m([`in-sync`,`behind-patch`,`behind-series`,`ahead`,`unknown`]),U_=i({state:H_,seedVersion:g().nullable(),contractVersion:g().nullable(),contractSource:m([`registry`,`running`]).nullable(),message:g()}),W_=i({fromVersion:g(),toVersion:g().nullable(),atMs:a(),reason:g()}),G_=i({packageName:g(),runningVersion:g().nullable(),nodeRuntimeVersion:g().nullable(),activeVersion:g().nullable(),previousVersion:g().nullable(),seedVersion:g().nullable(),latestVersion:g().nullable(),updateAvailable:v(),bootMode:B_,updateState:V_,pendingVersion:g().nullable(),rolledBack:W_.nullable(),stateFileCorrupt:v(),lastCheckedAtMs:a().nullable(),imageContract:U_.optional()}),K_=i({packageName:g(),runningVersion:g().nullable(),latestVersion:g().nullable(),updateAvailable:v(),checkedAtMs:a(),error:g().nullable()}),q_=i({accepted:v(),targetVersion:g().nullable(),restarting:v(),message:g()}),J_={name:`server-management`,scope:`system`,mode:`singleton`,methods:{getServerPackageStatus:T(h(),G_,{auth:`admin`}),checkServerUpdate:T(h(),K_,{kind:`mutation`,auth:`admin`}),applyServerUpdate:T(i({version:g().optional()}),q_,{kind:`mutation`,auth:`admin`,timeoutMs:16*6e4}),rollbackServerUpdate:T(h(),q_,{kind:`mutation`,auth:`admin`}),restartServer:T(h(),q_,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},Y_=d(),X_=i({to:c([Y_,p(Y_).min(1)]),cc:p(Y_).optional(),bcc:p(Y_).optional(),from:g().optional(),replyTo:g().optional(),subject:g(),text:g(),html:g().optional()}),Z_=i({messageId:g(),accepted:p(Y_).default([]),rejected:p(Y_).default([])}),Q_=i({ready:v(),host:g(),error:g().optional(),lastVerifiedAt:a().optional()}),$_={name:`smtp-provider`,scope:`system`,mode:`collection`,internal:!0,providerKind:`email`,methods:{sendEmail:T(X_,Z_,{kind:`mutation`,auth:`admin`,access:`create`}),verify:T(h(),Q_,{kind:`mutation`,auth:`admin`,access:`view`}),getStatus:T(h(),Q_,{auth:`admin`})}},ev=i({base64:g(),contentType:g()}),tv=i({lastCapturedAt:a().nullable(),cacheAgeMs:a().nullable(),lastBytes:a().nullable(),lastStreamId:g().nullable()}),nv={name:`snapshot`,scope:`device`,deviceNative:!0,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],exposesDeviceSettings:!0,methods:{getSnapshot:T(i({deviceId:a(),streamId:g().optional(),force:v().optional()}),ev.nullable()),invalidateCache:T(i({deviceId:a()}),h(),{kind:`mutation`,auth:`admin`}),getSnapshotOverview:Dt(i({deviceIds:p(a()).min(1).max(200)}),p(i({deviceId:a(),lastCapturedAt:a().nullable(),cacheAgeMs:a().nullable(),etag:g().nullable()}))),getDebugState:Dt(i({deviceId:a()}),i({battery:i({sleeping:v(),lastUpdated:a(),lastContactAt:a().optional()}).nullable(),state:i({isBattery:v(),reason:m([`disabled`,`sleeping`,`unreachable`,`waking`]).nullable()}),frame:i({capturedAt:a().nullable(),ageMs:a().nullable()}),waking:v()})),getSnapshotLinks:Dt(i({targets:p(i({deviceId:a(),width:a().int().positive().optional()})).min(1).max(200)}),p(i({deviceId:a(),url:g().nullable(),capturedAt:a().nullable(),ageMs:a().nullable(),expiresAt:a().nullable(),width:a().nullable(),neverCaptured:v(),sleeping:v(),stateReason:m([`disabled`,`sleeping`,`unreachable`,`waking`]).nullable(),battery:v()})))},status:{schema:tv,kind:`poll`}},rv=i({userId:g(),username:g(),isAdmin:v(),provider:g(),email:g().optional(),displayName:g().optional(),hubUrl:g().optional(),scopes:p(J).optional(),redirectUri:g().optional(),integrationId:g().optional(),jti:g().optional(),codeChallenge:g().optional(),sessionId:g().optional(),refreshTtl:c([a().int().positive(),y(`never`)]).optional()}),iv={name:`sso-bridge`,scope:`system`,mode:`singleton`,internal:!0,methods:{signBridgeToken:T(i({claims:rv,ttlSec:c([a().int().positive(),y(`never`)]).optional()}),i({token:g()})),verifyBridgeToken:T(i({token:g()}),rv.nullable())}},av=b(`shouldSaveDiskSpace`,[i({providerId:g().min(1),displayName:g().min(1),configSchema:u(),nodeLocal:v(),shouldSaveDiskSpace:y(!0),minFreePercent:a().min(0).max(100)}),i({providerId:g().min(1),displayName:g().min(1),configSchema:u(),nodeLocal:v(),shouldSaveDiskSpace:y(!1),minFreePercent:y(null)})]),ov={name:`storage`,scope:`system`,mode:`singleton`,methods:{resolve:T(i({location:N,relativePath:g()}),g()),write:T(i({location:N,relativePath:g(),data:_(Uint8Array)}),h(),{kind:`mutation`}),read:T(i({location:N,relativePath:g()}),_(Uint8Array)),exists:T(i({location:N,relativePath:g()}),v()),list:T(i({location:N,prefix:g().optional()}),p(g()).readonly()),delete:T(i({location:N,relativePath:g()}),h(),{kind:`mutation`}),getAvailableSpace:T(i({location:N}),a().nullable()),beginUpload:T(i({location:N,relativePath:g(),sizeBytes:a().optional()}),i({uploadId:g()}),{kind:`mutation`}),writeChunk:T(i({uploadId:g(),offset:a(),data:_(Uint8Array)}),h(),{kind:`mutation`}),finalizeUpload:T(i({uploadId:g()}),h(),{kind:`mutation`}),abortUpload:T(i({uploadId:g()}),h(),{kind:`mutation`}),beginDownload:T(i({location:N,relativePath:g()}),i({downloadId:g(),sizeBytes:a()}),{kind:`mutation`}),readChunk:T(i({downloadId:g(),offset:a(),length:a()}),_(Uint8Array)),endDownload:T(i({downloadId:g()}),h(),{kind:`mutation`}),listLocations:T(i({type:Ki.optional()}),p(M).readonly()),getDefaultLocation:T(i({type:Ki}),M.nullable()),listLocationDeclarations:T(h(),p(qi).readonly()),upsertLocation:T(M.omit({createdAt:!0,updatedAt:!0}),M,{kind:`mutation`,auth:`admin`}),deleteLocation:T(i({id:g()}),h(),{kind:`mutation`,auth:`admin`}),testLocation:T(i({id:g()}),i({ok:v(),error:g().optional()}),{auth:`admin`}),listProviders:T(h(),p(av).readonly()),testConfig:T(i({providerId:g(),config:n(g(),u())}),i({ok:v(),error:g().optional()}),{auth:`admin`})}},sv=i({bytes:a().int().nonnegative()}),cv=i({reclaimedBytes:a().int().nonnegative(),exhausted:v()}),lv={name:`storage-evictable`,scope:`system`,mode:`collection`,internal:!0,methods:{getEvictableUsage:T(i({locationId:g()}),sv),evict:T(i({locationId:g(),targetBytes:a().int().positive()}),cv,{kind:`mutation`})}},uv={name:`storage-migration`,scope:`system`,mode:`singleton`,methods:{plan:T(Ri,Ui,{auth:`admin`}),start:T(Ri,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),status:T(i({jobId:g().optional()}),Hi.nullable(),{auth:`admin`}),cancel:T(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`})}},dv=b(`shouldSaveDiskSpace`,[i({providerId:g().min(1),displayName:g().min(1),configSchema:u(),nodeLocal:v(),shouldSaveDiskSpace:y(!0),minFreePercent:a().min(0).max(100)}),i({providerId:g().min(1),displayName:g().min(1),configSchema:u(),nodeLocal:v(),shouldSaveDiskSpace:y(!1),minFreePercent:y(null)})]),fv=i({ok:v(),error:g().optional()}),pv=i({location:M,relativePath:g(),sizeBytes:a().optional()}),mv=i({uploadId:g()}),hv=i({uploadId:g(),offset:a(),data:_(Uint8Array)}),gv=i({uploadId:g()}),_v=i({uploadId:g()}),vv=i({location:M,relativePath:g()}),yv=i({downloadId:g(),sizeBytes:a()}),bv=i({downloadId:g(),offset:a(),length:a()}),xv=i({downloadId:g()}),Sv={name:`storage-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{getProviderInfo:T(h(),dv),testLocation:T(i({config:n(g(),u())}),fv,{auth:`admin`}),resolve:T(i({location:M,relativePath:g()}),g()),write:T(i({location:M,relativePath:g(),data:_(Uint8Array)}),h(),{kind:`mutation`}),read:T(i({location:M,relativePath:g()}),_(Uint8Array)),exists:T(i({location:M,relativePath:g()}),v()),list:T(i({location:M,prefix:g().optional()}),p(g()).readonly()),delete:T(i({location:M,relativePath:g()}),h(),{kind:`mutation`}),getAvailableSpace:T(i({location:M}),a().nullable()),beginUpload:T(pv,mv,{kind:`mutation`}),writeChunk:T(hv,h(),{kind:`mutation`}),finalizeUpload:T(gv,h(),{kind:`mutation`}),abortUpload:T(_v,h(),{kind:`mutation`}),beginDownload:T(vv,yv,{kind:`mutation`}),readChunk:T(bv,_(Uint8Array)),endDownload:T(xv,h(),{kind:`mutation`})}},Cv=i({sessionId:g(),profileId:g(),label:g(),cols:a().int().positive(),rows:a().int().positive(),startedAt:a()}),wv=i({profileId:g(),label:g(),description:g().optional()}),Tv=i({instanceId:g(),cameraStableId:g(),nodeId:g(),profileId:g(),profileLabel:g(),name:g(),enabled:v()}),Ev=i({stableId:g(),nodeId:g(),profileId:g(),profileLabel:g(),name:g(),adoptable:v()}),Dv=b(`kind`,[i({seq:a().int().positive(),kind:y(`data`),data:g()}),i({seq:a().int().positive(),kind:y(`exit`),exitCode:a().int(),signal:a().int().optional()})]),Ov=i({cursor:a().int().nonnegative(),reset:v(),snapshot:g().optional(),events:p(Dv).readonly()}),kv={name:`terminal-session`,scope:`system`,mode:`singleton`,methods:{listProfiles:T(h(),p(wv).readonly(),{auth:`admin`}),listInstances:T(h(),p(Tv).readonly(),{auth:`admin`}),createInstance:T(i({targetNodeId:g().min(1),profileId:g().min(1),name:g().trim().min(1).max(160).optional()}),Tv,{kind:`mutation`,auth:`admin`}),deleteInstance:T(i({instanceId:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),setInstanceEnabled:T(i({instanceId:g().min(1),enabled:v()}),Tv,{kind:`mutation`,auth:`admin`}),listLegacyCameras:T(h(),p(Ev).readonly(),{auth:`admin`}),adoptLegacyMonitor:T(i({stableId:g().min(1),name:g().trim().min(1).max(160).optional()}),Tv,{kind:`mutation`,auth:`admin`}),listSessions:T(h(),p(Cv).readonly(),{auth:`admin`}),openSession:T(i({profileId:g(),cols:a().int().positive(),rows:a().int().positive()}),Cv,{kind:`mutation`,auth:`admin`}),resize:T(i({sessionId:g(),cols:a().int().positive(),rows:a().int().positive()}),h(),{kind:`mutation`,auth:`admin`}),pullOutput:T(i({sessionId:g(),afterSeq:a().int().nonnegative(),waitMs:a().int().min(0).max(2e3).default(0),waitForOutput:v().optional()}),Ov,{kind:`mutation`,auth:`admin`,timeoutMs:15e3}),writeInput:T(i({sessionId:g(),data:g().max(64*1024)}),h(),{kind:`mutation`,auth:`admin`}),close:T(i({sessionId:g()}),h(),{kind:`mutation`,auth:`admin`})}},Av=i({urls:c([g(),p(g())]),username:g().optional(),credential:g().optional()}),jv={name:`turn-provider`,scope:`system`,mode:`collection`,methods:{getTurnServers:T(h(),p(Av).readonly())}},Mv=i({credentialId:g(),label:g(),createdAt:a(),lastUsedAt:a().nullable(),transports:p(g()).default([])}),Nv={name:`user-passkeys`,scope:`system`,mode:`collection`,internal:!0,methods:{beginRegistration:T(i({userId:g(),username:g()}),i({optionsJSON:n(g(),u())}),{kind:`mutation`,auth:`admin`,access:`create`}),finishRegistration:T(i({userId:g(),response:n(g(),u()),label:g()}),i({success:y(!0),credentialId:g()}),{kind:`mutation`,auth:`admin`,access:`create`}),beginAuthentication:T(i({userId:g().optional()}),i({optionsJSON:n(g(),u())}),{kind:`mutation`,access:`view`}),finishAuthentication:T(i({userId:g(),response:n(g(),u())}),i({verified:v()}),{kind:`mutation`,access:`view`}),beginDiscoverableAuthentication:T(i({}),i({optionsJSON:n(g(),u())}),{kind:`mutation`,access:`view`}),finishDiscoverableAuthentication:T(i({response:n(g(),u())}),i({verified:v(),userId:g().nullable()}),{kind:`mutation`,access:`view`}),listPasskeys:T(i({userId:g()}),p(Mv),{auth:`admin`}),removePasskey:T(i({userId:g(),credentialId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),getSecondFactorPreference:T(i({userId:g()}),i({enabled:v()}),{auth:`admin`}),setSecondFactorPreference:T(i({userId:g(),enabled:v()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`create`})}},Pv=m([`cosine`,`dot`,`euclidean`]),Fv=n(g(),c([g(),a(),v()])),Iv=i({equals:n(g(),c([g(),a(),v()])).optional(),between:n(g(),s([a(),a()])).optional()}),Lv=i({id:g(),vector:g(),metadata:Fv}),Rv=i({id:g(),score:a(),metadata:Fv}),zv=i({index:g(),dim:a().int().positive(),metric:Pv.default(`cosine`)}),Bv=i({index:g(),items:p(Lv)}),Vv=i({upserted:a(),rejected:a()}),Hv=i({index:g(),vector:g(),topK:a().int().positive(),minScore:a().optional(),filter:Iv.optional()}),Uv=i({matches:p(Rv),scanned:a(),truncated:v()}),Wv=i({index:g(),ids:p(g())}),Gv=i({index:g(),filter:Iv}),Kv=i({deleted:a()}),qv=i({index:g(),ids:p(g())}),Jv=i({items:p(i({id:g(),metadata:Fv}))}),Yv=i({index:g()}),Xv=i({backend:g(),count:a(),dim:a(),metric:Pv,bytes:a().optional(),exact:v()}),Zv={name:`vector-store`,scope:`system`,mode:`singleton`,internal:!0,methods:{declareIndex:T(zv,h(),{kind:`mutation`}),upsert:T(Bv,Vv,{kind:`mutation`}),query:T(Hv,Uv),getByIds:T(qv,Jv),deleteByIds:T(Wv,Kv,{kind:`mutation`}),deleteByFilter:T(Gv,Kv,{kind:`mutation`}),stats:T(Yv,Xv)}},Qv=24,$v=3,ey=i({id:g(),source:g(),kind:m([`motion`,`object`,`audio`,`native`]),timeRange:i({startMs:a(),endMs:a()}),labels:p(g()).max(3).optional(),thumbnail:g().optional(),stillAtMs:a().optional(),eventIds:p(g()).optional(),eventCount:a().int().nonnegative().optional(),holes:p(i({startMs:a(),endMs:a()})).optional()}),ty=i({playbackUrl:g(),playbackEndpoints:p(g()).optional(),token:g().optional()}),ny={name:`videoclips`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],methods:{listClips:T(i({deviceId:a(),since:a(),until:a(),limit:a().int().positive().optional()}),p(ey).readonly(),{kind:`query`,auth:`admin`}),getClipPlayback:T(i({deviceId:a(),clipId:g()}),ty,{kind:`query`,auth:`admin`})}},ry=i({viewportWidth:a().int().positive().optional(),viewportHeight:a().int().positive().optional(),devicePixelRatio:a().positive().optional(),downlinkMbps:a().nonnegative().optional(),prefersTier:g().optional()}).partial(),iy=b(`kind`,[i({kind:y(`adaptive`)}),i({kind:y(`profile`),profile:S}),i({kind:y(`cam-stream`),camStreamId:g().min(1)})]),ay=i({id:g(),label:g(),target:iy,codec:g().nullable(),resolution:i({width:a(),height:a()}).nullable(),status:m([`idle`,`connecting`,`streaming`,`error`,`stopped`]).nullable(),inputFps:a().nullable(),decodeFps:a().nullable(),bitrateKbps:a().nullable()}),oy={name:`webrtc-session`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,preferredProvider:`stream-broker`,deviceTypes:[D.Camera],methods:{listStreams:T(i({deviceId:a().int().nonnegative()}),p(ay)),createSession:T(i({deviceId:a().int().nonnegative(),target:iy,hints:ry.optional(),relayOnly:v().optional(),consumerAttribution:Ec.optional()}),i({sessionId:g(),sdpOffer:g()}),{kind:`mutation`}),handleOffer:T(i({deviceId:a().int().nonnegative(),target:iy.optional(),sdpOffer:g(),sessionId:g().optional(),relayOnly:v().optional(),nonTrickle:v().optional(),disableTurn:v().optional(),disableIpv6:v().optional(),consumerAttribution:Ec.optional(),hints:ry.optional()}),i({sessionId:g(),sdpAnswer:g()}),{kind:`mutation`}),handleAnswer:T(i({deviceId:a().int().nonnegative(),sessionId:g(),sdpAnswer:g()}),h(),{kind:`mutation`}),addIceCandidate:T(i({deviceId:a().int().nonnegative(),sessionId:g(),candidate:g(),sdpMid:g().nullable().optional(),sdpMLineIndex:a().int().nullable().optional()}),h(),{kind:`mutation`}),getIceCandidates:T(i({deviceId:a().int().nonnegative(),sessionId:g()}),i({candidates:p(i({candidate:g(),sdpMid:g().nullable(),sdpMLineIndex:a().int().nullable()})),done:v()}),{kind:`query`}),closeSession:T(i({deviceId:a().int().nonnegative(),sessionId:g()}),h(),{kind:`mutation`}),hasAdaptiveBitrate:T(i({deviceId:a().int().nonnegative(),profile:S}),v()),getSessionState:T(i({deviceId:a().int().nonnegative(),sessionId:g()}),i({pendingRenegotiation:i({target:iy,epoch:a()}).nullable()}))},mount:{kind:`server-provided`}},sy=i({childDeviceIds:p(a()).readonly(),hiddenChildIds:p(a()).readonly()}),cy={name:`accessories`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera,D.Hub,D.Switch,D.Light,D.Sensor,D.Thermostat,D.Cover,D.Lock,D.Fan,D.MediaPlayer,D.AlarmPanel,D.Generic],methods:{setChildHidden:T(i({deviceId:a().int().nonnegative(),childDeviceId:a().int().nonnegative(),hidden:v()}),h(),{kind:`mutation`,auth:`admin`})},events:{onAccessoriesChanged:{data:i({deviceId:a(),childDeviceIds:p(a()).readonly(),hiddenChildIds:p(a()).readonly()})},onChildVisibilityChanged:{data:i({deviceId:a(),childDeviceId:a(),hidden:v()})}},status:{schema:sy,kind:`command-driven`}},ly=m([`install`,`update`,`uninstall`,`restart`]),uy=m([`queued`,`fetching`,`staged`,`validating`,`applying`,`restarting`,`applied`,`done`,`failed`,`skipped`]),dy=m([`framework`,`addon`]),fy=i({tsMs:a(),nodeId:g(),packageName:g(),phase:uy,message:g()}),py=i({taskId:g(),nodeId:g(),packageName:g(),fromVersion:g().nullable(),toVersion:g(),target:dy,phase:uy,stagedPath:g().nullable(),attempts:a(),steps:p(fy),error:g().nullable(),startedAtMs:a().nullable(),finishedAtMs:a().nullable()}),my=m([`running`,`completed`,`failed`,`partially-failed`,`cancelled`]),hy=m([`single`,`bulk`,`cluster`]),gy=i({jobId:g(),kind:ly,createdAtMs:a(),createdBy:g(),scope:hy,tasks:p(py),state:my,schemaVersion:y(1)}),_y=m([`debug`,`info`,`warn`,`error`]),vy=m([`off`,`latest`,`beta`]),yy=m([`off`,`latest`,`beta`,`inherit`]),by=i({id:g(),name:g().optional(),version:g().optional(),description:g().optional(),icon:g().optional(),color:g().optional(),capabilities:p(u()).readonly().optional(),packageName:g(),packageVersion:g(),packageDisplayName:g().optional(),bundle:i({displayName:g(),description:g().optional(),icon:g().optional()}).optional(),protected:v().optional(),removable:v().optional()}),xy=i({pid:a().optional(),mode:g(),state:g()}),Sy=i({phase:m([`pending`,`healthy`,`failed`]),retryCount:a(),firstFailureAt:a().nullable(),lastAttemptAt:a().nullable(),lastError:i({message:g(),stack:g().optional()}).nullable(),nextRetryAt:a().nullable(),alertEmitted:v(),retrying:v(),inGracePeriod:v()}),Cy=i({manifest:by,declaration:u().optional(),source:g(),installSource:g().optional(),process:xy.optional(),hasBackup:v().optional(),health:Sy.nullable().optional()}),wy=i({name:g(),version:g(),dir:g(),installSource:g().optional()}),Ty=i({name:g(),currentVersion:g(),latestVersion:g(),category:m([`addon`,`core`]),requiresRestart:v(),isSystem:v()}),Ey=i({version:g(),publishedAt:g(),deprecated:g().optional(),distTags:p(g()).readonly()}),Dy=i({name:g(),version:g(),description:g(),keywords:p(g()).readonly(),publishedAt:g(),author:g(),installed:v(),installedVersion:g().optional()}),Oy=i({channel:vy,intervalSeconds:a(),updateCheckIntervalSeconds:a()}),ky=yy,Ay=u(),jy=u(),My=u(),Ny=m([`queued`,`updating`,`done`,`done-pending-restart`,`failed`]),Py=i({name:g(),isSystem:v(),fromVersion:g(),toVersion:g(),status:Ny,error:g().optional(),startedAtMs:a().optional(),completedAtMs:a().optional()}),Fy=m([`regular`,`system`,`restarting`,`finalizing`]);i({id:g(),nodeId:g(),startedAtMs:a(),completedAtMs:a().optional(),total:a(),completed:a(),failed:a(),current:g().nullable(),phase:Fy,cancelled:v(),items:p(Py).readonly()});var Iy=i({packageName:g(),currentVersion:g(),latestVersion:g().nullable(),hasUpdate:v(),description:g().optional(),buildId:g().nullable()}),Ly=i({timestamp:g(),level:g(),message:g(),scope:g().optional()}),Ry=u(),zy=i({addonId:g().min(1),action:g().min(1),input:u()}),By={name:`addons`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{list:T(h(),p(Cy).readonly()),getLogs:T(i({addonId:g(),limit:a().min(1).max(500).default(100),level:_y.optional()}),p(Ry)),listPackages:T(h(),p(wy).readonly()),installPackage:T(i({packageName:g(),version:g().optional()}),jy,{kind:`mutation`,auth:`admin`}),installFromWorkspace:T(i({packageName:g()}),jy,{kind:`mutation`,auth:`admin`}),isWorkspaceAvailable:T(h(),v()),listWorkspacePackages:T(h(),p(u()).readonly()),uninstallPackage:T(i({packageName:g()}),u(),{kind:`mutation`,auth:`admin`}),reloadPackages:T(h(),My,{kind:`mutation`,auth:`admin`}),searchAvailable:T(i({query:g().optional()}),p(Dy)),listUpdates:T(i({nodeId:g().optional()}),p(Ty).readonly(),{auth:`admin`}),updatePackage:T(i({name:g().min(1),version:g().optional(),nodeId:g().optional()}),u(),{kind:`mutation`,auth:`admin`}),rollbackPackage:T(i({name:g().min(1)}),i({rolledBackTo:g().nullable()}),{kind:`mutation`,auth:`admin`}),forceRefresh:T(i({nodeId:g().optional()}),u(),{kind:`mutation`,auth:`admin`}),restartServer:T(i({confirm:y(!0)}),u(),{kind:`mutation`,auth:`admin`}),getLastRestart:T(h(),i({kind:m([`framework-update`,`manual`,`system`,`framework-bulk-update`]),packageName:g().optional(),fromVersion:g().optional(),toVersion:g().optional(),requestedBy:g().optional(),requestedAt:a()}).nullable(),{auth:`admin`}),listFrameworkPackages:T(h(),p(Iy).readonly(),{auth:`admin`}),listCapabilityProviders:T(i({capName:g().min(1)}),p(i({addonId:g(),mode:m([`singleton`,`collection`]),isActive:v()})).readonly()),setCapabilityProviderEnabled:T(i({capName:g().min(1),addonId:g().min(1),enabled:v()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getVersions:T(i({name:g()}),p(Ey).readonly()),restartAddon:T(i({addonId:g()}),Ay,{kind:`mutation`,auth:`admin`}),retryLoad:T(i({packageName:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getAutoUpdateSettings:T(h(),Oy,{auth:`admin`}),setAutoUpdateSettings:T(i({channel:vy,intervalSeconds:a().min(300).max(86400).optional(),updateCheckIntervalSeconds:a().min(900).max(604800).optional()}),u(),{kind:`mutation`,auth:`admin`}),getAddonAutoUpdate:T(i({addonId:g()}),ky,{auth:`admin`}),setAddonAutoUpdate:T(i({addonId:g(),channel:yy}),u(),{kind:`mutation`,auth:`admin`}),applyAutoUpdateToAll:T(i({channel:vy}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),custom:T(zy,u(),{kind:`mutation`}),startJob:T(i({kind:m([`install`,`update`,`uninstall`,`restart`]),targets:p(i({name:g().min(1),version:g().min(1)})).min(1),nodeIds:p(g()).optional()}),i({jobId:g()}),{kind:`mutation`,auth:`admin`}),getJob:T(i({jobId:g()}),gy.nullable(),{auth:`admin`}),listJobs:T(i({activeOnly:v().optional()}),p(gy),{auth:`admin`}),cancelJob:T(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),onAddonLogs:T(i({addonId:g(),level:_y.optional()}),Ly,{kind:`subscription`})},mount:{kind:`server-provided`}},Vy=i({co2Ppm:a().min(0).optional(),vocPpb:a().min(0).optional(),pm25:a().min(0).optional(),pm10:a().min(0).optional(),aqi:a().optional(),lastFetchedAt:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional()}),Hy={name:`air-quality-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:Vy,kind:`push`},runtimeState:Vy,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},Uy=i({lux:a().min(0),lastFetchedAt:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional()}),Wy={name:`ambient-light-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:Uy,kind:`push`},runtimeState:Uy,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},Gy=i({className:g(),hits:a().int().nonnegative(),avgScore:a().min(0).max(1),peakScore:a().min(0).max(1)}),Ky=i({ts:a().int(),windowSec:a().int().positive(),level:i({rms:a(),dbfs:a()}),peakDbfs:a(),avgDbfs:a(),current:i({className:g(),score:a().min(0).max(1),timestamp:a().int()}).nullable(),byClass:p(Gy).readonly()}),qy=i({ts:a().int(),dbfs:a().nullable(),peakDbfs:a(),avgDbfs:a(),topClass:g().nullable(),topScore:a().min(0).max(1).nullable()}),Jy=i({points:p(qy).readonly(),effectiveSampleEveryMs:a().int().positive(),windowMsActual:a().int().nonnegative()}),Yy={name:`audio-metrics`,scope:`device`,mode:`singleton`,deviceTypes:[D.Camera],methods:{getCurrentSnapshot:T(i({deviceId:a()}),Ky.nullable()),getHistory:T(i({deviceId:a(),windowSec:a().int().positive().optional(),sampleEveryMs:a().int().positive().optional()}),Jy)},runtimeState:Ky,durability:`session`},Xy=i({enabled:v(),isRunning:v(),lastTriggeredAt:a(),lastError:g().nullable(),lastChangedAt:a()}),Zy={name:`automation-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Automation],methods:{enable:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),disable:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),trigger:T(i({deviceId:a().int().nonnegative(),skipCondition:v().optional()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:Xy,kind:`push`},runtimeState:Xy,durability:`session`},Qy=i({percentage:a().min(0).max(100),charging:m([`dc`,`solar`,`none`]),sleeping:v(),lastUpdated:a(),lastContactAt:a().optional(),binary:v().optional()}),$y={name:`battery`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera,D.Sensor,D.Button,D.Switch],methods:{wakeForStream:T(i({deviceId:a(),timeoutMs:a().int().min(500).max(3e4).default(8e3)}),i({awoke:v(),durationMs:a()}),{kind:`mutation`})},events:{onStatusChanged:{data:i({deviceId:a(),status:Qy})}},status:{schema:Qy,kind:`push`,empty:{percentage:0,charging:`none`,sleeping:!1,lastUpdated:0}},runtimeState:Qy,durability:`restored`,volatileStateFields:[`lastUpdated`]},eb=i({on:v(),lastChangedAt:a()}),tb={name:`binary`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:eb,kind:`push`},runtimeState:eb,durability:`restored`,volatileStateFields:[`lastChangedAt`]},nb=i({percentage:a().min(0).max(100),lastChangedAt:a()}),rb={name:`brightness`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Light],methods:{setBrightness:T(i({deviceId:a().int().nonnegative(),percentage:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`})},events:{onBrightnessChanged:{data:i({deviceId:a(),percentage:a().min(0).max(100),lastChangedAt:a()})}},status:{schema:nb,kind:`command-driven`},runtimeState:nb,durability:`session`},ib={name:`button`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Button],methods:{press:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})}},ab=i({host:g(),port:a().int().positive().optional(),onvifPort:a().int().positive().optional(),rtspPort:a().int().positive().optional(),https:v().optional(),username:g().optional(),password:g().optional(),onvifProfile:g().optional()}),ob=i({host:g(),port:a().int().positive().nullable(),onvifPort:a().int().positive().nullable(),rtspPort:a().int().positive().nullable(),https:v().nullable(),hasUsername:v(),hasPassword:v(),onvifProfile:g().nullable()}),sb={name:`camera-credentials`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],methods:{getCredentials:T(i({deviceId:a()}),ab.nullable(),{kind:`query`,auth:`admin`})},status:{schema:ob,kind:`command-driven`}},cb=i({detected:v(),lastChangedAt:a()}),lb={name:`carbon-monoxide`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:cb,kind:`push`},runtimeState:cb,durability:`restored`,volatileStateFields:[`lastChangedAt`]},ub=m([`off`,`heat`,`cool`,`auto`,`heat_cool`,`fan_only`,`dry`]),db=i({mode:ub,availableModes:p(ub),fanMode:g(),availableFanModes:p(g()),preset:g(),availablePresets:p(g()),target:a().nullable(),targetHigh:a().nullable(),targetLow:a().nullable(),targetHumidity:a().min(0).max(100).nullable(),currentTemp:a().nullable(),currentHumidity:a().min(0).max(100).nullable(),swingVertical:v().nullable(),swingHorizontal:v().nullable(),lastFetchedAt:a()}),fb={name:`climate-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Thermostat,D.Climate],methods:{setMode:T(i({deviceId:a().int().nonnegative(),mode:ub}),h(),{kind:`mutation`,auth:`admin`}),setFanMode:T(i({deviceId:a().int().nonnegative(),fanMode:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),setPreset:T(i({deviceId:a().int().nonnegative(),preset:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),setTarget:T(i({deviceId:a().int().nonnegative(),target:a()}),h(),{kind:`mutation`,auth:`admin`}),setTargetRange:T(i({deviceId:a().int().nonnegative(),targetLow:a(),targetHigh:a()}),h(),{kind:`mutation`,auth:`admin`}),setTargetHumidity:T(i({deviceId:a().int().nonnegative(),targetHumidity:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`}),setSwingVertical:T(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`}),setSwingHorizontal:T(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:db,kind:`push`},runtimeState:db,durability:`session`},pb=i({r:a().int().min(0).max(255),g:a().int().min(0).max(255),b:a().int().min(0).max(255)}),mb=i({h:a().min(0).max(360),s:a().min(0).max(100),v:a().min(0).max(100)}),hb=b(`mode`,[i({mode:y(`rgb`),rgb:pb}),i({mode:y(`hsv`),hsv:mb}),i({mode:y(`mired`),mireds:a().int().min(50).max(1e3)})]),gb=i({mode:m([`rgb`,`hsv`,`mired`]),rgb:pb.optional(),hsv:mb.optional(),mireds:a().int().optional(),lastChangedAt:a()}),_b={name:`color`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Light],methods:{setColor:T(i({deviceId:a().int().nonnegative(),color:hb}),h(),{kind:`mutation`,auth:`admin`})},events:{onColorChanged:{data:i({deviceId:a(),mode:m([`rgb`,`hsv`,`mired`]),rgb:pb.optional(),hsv:mb.optional(),mireds:a().int().optional(),lastChangedAt:a()})}},status:{schema:gb,kind:`command-driven`},runtimeState:gb,durability:`session`},vb=2e4,yb=b(`outcome`,[i({outcome:y(`validated`),latencyMs:a().nonnegative().optional(),detail:g().optional()}).strict(),i({outcome:y(`rejected`),error:g()}).strict(),i({outcome:y(`inconclusive`),error:g()}).strict()]),bb=i({settings:n(g(),u())}),xb=i({label:g()}),Sb={name:`connection-test`,scope:`system`,mode:`collection`,methods:{testSettings:T(bb,yb,{kind:`mutation`,auth:`admin`}),describeTest:T(h(),xb,{auth:`admin`})}},Cb=i({connected:v(),lastChangedAt:a()}),wb={name:`connectivity`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:Cb,kind:`push`},runtimeState:Cb,durability:`restored`,volatileStateFields:[`lastChangedAt`]},Tb=i({key:g().min(1),label:g().min(1),level:a().min(0).max(100).nullable(),status:m([`ok`,`replace`]).nullable(),lastResetAt:a().nullable(),resettable:v()}),Eb=i({items:p(Tb),lastChangedAt:a()}),Db={name:`consumables`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:Object.values(D),deviceConfig:{ui:{kind:`widget`,widgetId:`host/consumables-panel`,tab:`consumables`,topTab:!0,label:`Consumables`,order:5}},methods:{reset:T(i({deviceId:a().int().nonnegative(),key:g().min(1)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:Eb,kind:`push`,empty:{items:[],lastChangedAt:0},itemArray:{path:`items`,keyField:`key`,labelField:`label`,itemSchema:Tb,emptyItem:{key:``,label:``,level:null,status:null,lastResetAt:null,resettable:!1}}},runtimeState:Eb.extend({lastFetchedAt:a()}),durability:`session`},Ob=i({entryOpen:v(),lastChangedAt:a()}),kb={name:`contact`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:Ob,kind:`push`},runtimeState:Ob,durability:`restored`,volatileStateFields:[`lastChangedAt`]},Ab=m([`numeric`,`select`,`text`,`datetime`]),jb=i({kind:Ab,value:c([a(),g()]),options:p(g()),lastChangedAt:a(),unit:g().optional(),min:a().optional(),max:a().optional(),step:a().optional(),precision:a().int().min(0).max(10).optional(),format:m([`date`,`time`,`datetime`]).optional()}),Mb=b(`kind`,[i({kind:y(`numeric`),value:a()}),i({kind:y(`select`),value:g().min(1)}),i({kind:y(`text`),value:g()}),i({kind:y(`datetime`),value:g().min(1)})]),Nb={name:`control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Control],methods:{setValue:T(i({deviceId:a().int().nonnegative(),control:Mb}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:jb,kind:`push`},runtimeState:jb,durability:`session`},Pb=m([`open`,`opening`,`closing`,`closed`,`stopped`]),Fb=i({state:Pb,position:a().min(0).max(100).nullable(),tiltPosition:a().min(0).max(100).nullable(),lastChangedAt:a()}),Ib={name:`cover`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Cover],methods:{open:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),close:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),stop:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),setPosition:T(i({deviceId:a().int().nonnegative(),position:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`}),setTiltPosition:T(i({deviceId:a().int().nonnegative(),tiltPosition:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:Fb,kind:`push`},runtimeState:Fb,durability:`restored`,volatileStateFields:[`lastChangedAt`]},Lb=m([`auto`,`day`,`night`,`schedule`]),Rb=i({min:a(),max:a(),step:a()}),zb=i({mode:Lb,sensitivity:a().optional(),switchDelaySec:a().optional(),lastFetchedAt:a()}),Bb=i({modes:p(Lb),supportsSensitivity:v(),sensitivity:Rb.optional(),supportsSwitchDelay:v(),switchDelaySec:Rb.optional()}),Vb=i({mode:Lb.optional(),sensitivity:a().optional(),switchDelaySec:a().optional()}),Hb={name:`day-night`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`day-night`,tab:`image`}},methods:{getOptions:T(i({deviceId:a()}),Bb),setSettings:T(i({deviceId:a(),settings:Vb}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:zb,kind:`poll`},runtimeState:zb,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},Ub=i({online:v(),lastChangedAt:a()}),Wb={name:`device-status`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{},events:{onStatusChanged:{data:i({deviceId:a(),status:Ub})}},status:{schema:Ub,kind:`push`},runtimeState:Ub,durability:`restored`,volatileStateFields:[`lastChangedAt`]},Gb=i({lastPressedAt:a().nullable(),pressCountSinceStart:a()}),Kb=i({deviceId:a(),timestamp:a()}),qb={name:`doorbell`,scope:`device`,deviceNative:!0,mode:`singleton`,kind:`wrapper`,defaultActive:!1,deviceTypes:[D.Button,D.Camera],exposesDeviceSettings:!0,methods:{},events:{onPressed:{data:Kb}},status:{schema:Gb,kind:`push`},runtimeState:Gb,durability:`restored`},Jb=m([`date`,`time`,`datetime`]),Yb=i({value:g(),format:Jb.optional(),lastFetchedAt:a()}),Xb={name:`enum-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:Yb,kind:`push`},runtimeState:Yb,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},Zb=i({deviceId:a(),eventType:g(),data:n(g(),u()).nullable(),timestamp:a(),seq:a()}),Qb=i({eventTypes:p(g()),lastEvent:Zb.nullable(),eventCountSinceStart:a()}),$b={name:`event-emitter`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.EventEmitter],methods:{},events:{onEvent:{data:Zb}},status:{schema:Qb,kind:`push`},runtimeState:Qb,durability:`session`},ex=i({id:g(),type:g(),timestamp:a(),label:g().optional(),thumbnailUrl:g().optional(),clipUrl:g().optional(),metadata:n(g(),u()).optional()}),tx={name:`events`,scope:`device`,mode:`singleton`,deviceTypes:[D.Camera],methods:{getEvents:T(i({deviceId:a(),from:a().optional(),to:a().optional(),limit:a().optional()}),p(ex)),getEventThumbnail:T(i({deviceId:a(),eventId:g()}),i({base64:g(),contentType:g()}).nullable()),getEventClipUrl:T(i({deviceId:a(),eventId:g()}),g().nullable())}},nx=i({id:g(),name:g(),sampleCount:a().int().nonnegative(),coverMediaKey:g().optional(),coverBase64:g().optional()}),rx=i({id:g(),source:m([`detected`,`photo`]),addedAt:a().int(),deviceId:a().int().optional(),base64:g().optional()}),ix=i({faceId:g(),deviceId:a().int(),trackId:g(),timestamp:a().int(),recognizedIdentityId:g().optional(),identityName:g().optional(),assigned:v(),base64:g().optional(),cropUrl:g().optional(),faceBbox:H.optional(),keyFrameMediaKey:g().optional(),bestMatchScore:a().optional(),nativeFaceShortSidePx:a().optional(),suggestedIdentityId:g().optional(),suggestedMatchScore:a().optional()}),ax=m([`unassigned`,`recognized`,`identified`,`all`]),ox=i({key:g(),kind:g(),base64:g(),sizeBytes:a(),timestamp:a()}),sx={name:`face-gallery`,scope:`system`,mode:`singleton`,methods:{listIdentities:T(h(),p(nx).readonly()),createIdentity:T(i({name:g().min(1)}),nx,{kind:`mutation`,auth:`admin`}),renameIdentity:T(i({id:g(),name:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),deleteIdentity:T(i({id:g()}),h(),{kind:`mutation`,auth:`admin`}),listIdentitySamples:T(i({identityId:g()}),p(rx).readonly()),removeSample:T(i({identityId:g(),sampleId:g()}),h(),{kind:`mutation`,auth:`admin`}),listRecentFaces:T(i({deviceId:a().int().optional(),limit:a().int().positive().optional(),filter:ax.optional(),includeCrops:v().optional()}).optional(),p(ix).readonly()),getFaceByTrack:T(i({deviceId:a().int(),trackId:g()}),ix.nullable()),getFaceMedia:T(i({faceId:g()}),p(ox).readonly()),assignFace:T(i({faceId:g(),identityId:g()}),h(),{kind:`mutation`,auth:`admin`}),unassignFace:T(i({faceId:g()}),h(),{kind:`mutation`,auth:`admin`}),deleteFace:T(i({faceId:g()}),h(),{kind:`mutation`,auth:`admin`}),assignFaces:T(i({faceIds:p(g()).min(1),identityId:g()}),i({assigned:a().int(),failed:p(g()).readonly()}),{kind:`mutation`,auth:`admin`}),unassignFaces:T(i({faceIds:p(g()).min(1)}),i({unassigned:a().int(),failed:p(g()).readonly()}),{kind:`mutation`,auth:`admin`}),suggestFaceClusters:T(i({threshold:a().min(0).max(1).optional(),minClusterSize:a().int().min(2).optional(),limit:a().int().positive().optional()}).optional(),p(i({faceIds:p(g()).readonly(),representativeFaceId:g(),size:a().int(),cohesion:a()})).readonly())}},cx=m([`forward`,`reverse`]),lx=i({percentage:a().min(0).max(100).nullable(),percentageStep:a().positive().optional(),preset:g(),availablePresets:p(g()),direction:cx.nullable(),oscillating:v().nullable(),lastChangedAt:a()}),ux={name:`fan-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Fan],methods:{setPercentage:T(i({deviceId:a().int().nonnegative(),percentage:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`}),setPreset:T(i({deviceId:a().int().nonnegative(),preset:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),setDirection:T(i({deviceId:a().int().nonnegative(),direction:cx}),h(),{kind:`mutation`,auth:`admin`}),setOscillating:T(i({deviceId:a().int().nonnegative(),oscillating:v()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:lx,kind:`push`},runtimeState:lx,durability:`session`},dx=i({flags:n(g(),u()),deviceType:g().nullable(),model:g().nullable(),channelCount:a().nullable(),lastProbedAt:a(),lastFetchedAt:a()}),fx={name:`feature-probe`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{},events:{onProbeChanged:{data:i({deviceId:a(),status:dx})}},status:{schema:dx,kind:`push`},runtimeState:dx,durability:`session`},px=i({flooded:v(),lastChangedAt:a()}),mx={name:`flood`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:px,kind:`push`},runtimeState:px,durability:`restored`,volatileStateFields:[`lastChangedAt`]},hx=i({detected:v(),lastChangedAt:a()}),gx={name:`gas`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:hx,kind:`push`},runtimeState:hx,durability:`restored`,volatileStateFields:[`lastChangedAt`]},_x=i({on:v(),currentHumidity:a().min(0).max(100).nullable(),targetHumidity:a().min(0).max(100).nullable(),mode:g().nullable(),availableModes:p(g()),action:g().nullable(),minHumidity:a().nullable(),maxHumidity:a().nullable(),lastChangedAt:a()}),vx={name:`humidifier`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Humidifier],methods:{setOn:T(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`}),setTargetHumidity:T(i({deviceId:a().int().nonnegative(),humidity:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`}),setMode:T(i({deviceId:a().int().nonnegative(),mode:g().min(1)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:_x,kind:`push`},runtimeState:_x,durability:`session`},yx=i({percent:a().min(0).max(100),lastFetchedAt:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional()}),bx={name:`humidity-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor,D.Thermostat],methods:{},status:{schema:yx,kind:`push`},runtimeState:yx,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},xx=i({url:g().nullable(),lastUpdated:a().nullable()}),Sx={name:`image`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Image],methods:{},status:{schema:xx,kind:`push`},runtimeState:xx,durability:`session`},Cx=m([`0`,`90`,`180`,`270`]),wx=m([`auto`,`manual`]),Tx=m([`auto`,`manual`]),Ex=m([`off`,`blc`,`wdr`,`hlc`]),Dx=i({min:a(),max:a(),step:a()}),Ox=i({brightness:a().optional(),contrast:a().optional(),saturation:a().optional(),sharpness:a().optional(),mirror:v().optional(),flip:v().optional(),rotate:Cx.optional(),whiteBalance:wx.optional(),warmth:a().optional(),exposureMode:Tx.optional(),backlightMode:Ex.optional(),lastFetchedAt:a()}),kx=i({supportsBrightness:v(),brightness:Dx.optional(),supportsContrast:v(),contrast:Dx.optional(),supportsSaturation:v(),saturation:Dx.optional(),supportsSharpness:v(),sharpness:Dx.optional(),supportsMirror:v(),supportsFlip:v(),rotateOptions:p(Cx),whiteBalanceModes:p(wx),supportsWarmth:v(),warmth:Dx.optional(),exposureModes:p(Tx),backlightModes:p(Ex)}),Ax=i({brightness:a().optional(),contrast:a().optional(),saturation:a().optional(),sharpness:a().optional(),mirror:v().optional(),flip:v().optional(),rotate:Cx.optional(),whiteBalance:wx.optional(),warmth:a().optional(),exposureMode:Tx.optional(),backlightMode:Ex.optional()}),jx={name:`image-settings`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`image-settings`,tab:`image`}},methods:{getOptions:T(i({deviceId:a()}),kx),setSettings:T(i({deviceId:a(),settings:Ax}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:Ox,kind:`poll`},runtimeState:Ox,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},Mx=i({id:g(),addonId:g(),name:g(),enabled:v(),info:n(g(),u()).readonly(),createdAt:a(),updatedAt:a(),processState:g()}),Nx=i({id:g(),addonId:g(),name:g(),enabled:v(),info:n(g(),u()).readonly(),createdAt:a(),updatedAt:a()}),Px=i({addonId:g(),name:g(),description:g(),iconUrl:g().nullable(),color:g(),instanceMode:g(),mode:m([`standalone`,`account`,`broker`]),discoveryMode:g(),kind:m([`device-adoption`,`device-provider`]),brokerKind:g().nullable(),supportsLocationImport:v(),canTest:v(),existingInstances:p(i({id:g(),name:g()})),canAdd:v()}),Fx=m([`validated`,`rejected`,`inconclusive`,`unsupported`]),Ix=i({success:v(),error:g().optional(),status:Fx.optional(),testedBy:g().nullable().optional(),latencyMs:a().nonnegative().optional(),detail:g().optional()}),Lx=i({addonId:g(),name:g(),enabled:v().optional(),info:n(g(),u()).optional(),settings:n(g(),u()).optional(),skipRestart:v().optional()}),Rx=i({id:g(),name:g().optional(),enabled:v().optional(),info:n(g(),u()).optional()}),zx=i({success:v(),deletedId:g()}),Bx={name:`integrations`,scope:`system`,mode:`singleton`,methods:{list:T(h(),p(Mx)),get:T(i({id:g()}),Mx),getByAddonId:T(i({addonId:g()}),Nx.nullable()),create:T(Lx,Nx,{kind:`mutation`,auth:`admin`}),update:T(Rx,Nx,{kind:`mutation`,auth:`admin`}),delete:T(i({id:g()}),zx,{kind:`mutation`,auth:`admin`}),getSettings:T(i({id:g()}),n(g(),u()),{auth:`admin`}),setSettings:T(i({id:g(),settings:n(g(),u())}),i({success:v()}),{kind:`mutation`,auth:`admin`}),getAvailableTypes:T(h(),p(Px),{auth:`admin`}),testConnection:T(i({addonId:g(),settings:n(g(),u())}),Ix,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},Vx=i({codecs:p(g()),sampleRate:a(),duplex:m([`half`,`full`]),maxBacklogMs:a()}),Hx=i({talking:v(),lastSessionAt:a().nullable(),ability:Vx.nullable()}),Ux=m([`opus`,`s16le`,`g711ulaw`,`g711alaw`]),Wx={name:`intercom`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],methods:{startSession:T(i({deviceId:a()}),i({sessionId:g(),sdpOffer:g()}),{kind:`mutation`,auth:`admin`}),handleAnswer:T(i({deviceId:a(),sessionId:g(),sdpAnswer:g()}),h(),{kind:`mutation`,auth:`admin`}),stopSession:T(i({deviceId:a(),sessionId:g()}),h(),{kind:`mutation`,auth:`admin`}),startTalkSession:T(i({deviceId:a()}),i({sessionId:g()}),{kind:`mutation`,auth:`admin`}),pushTalkAudio:T(i({deviceId:a(),audioBase64:g(),codec:Ux.optional(),sampleRate:a().int().positive().optional(),channels:a().int().positive().optional(),sequenceNumber:a().int()}),i({accepted:v()}),{kind:`mutation`,auth:`admin`}),endTalkSession:T(i({deviceId:a()}),h(),{kind:`mutation`,auth:`admin`})},events:{onStatusChanged:{data:i({deviceId:a(),status:Hx})}},status:{schema:Hx,kind:`command-driven`},runtimeState:Hx,durability:`session`},Gx=m([`idle`,`mowing`,`paused`,`docked`,`error`]),Kx=m([`info`,`warning`,`error`]),qx=i({activity:Gx,batteryLevel:a().min(0).max(100).nullable(),progressPercent:a().min(0).max(100).nullable(),currentCode:a().nullable(),currentCodeLabel:g().nullable(),severity:Kx,lastChangedAt:a()}),Jx={name:`lawn-mower-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.LawnMower],methods:{startMowing:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),pause:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),dock:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:qx,kind:`push`},runtimeState:qx,durability:`session`},Yx=m([`lan`,`wifi`,`docker`,`vpn`,`loopback`,`other`]),Xx=i({name:g(),family:m([`IPv4`,`IPv6`]),address:g(),cidr:g(),netmask:g(),internal:v(),mac:g(),kind:Yx,preferred:v(),plausible:v(),plausibleReason:g()}),Zx=i({interfaces:p(Xx).readonly(),probedAt:a()}),Qx=Xx.nullable(),$x=i({endpoints:p(i({label:g(),baseUrl:g(),kind:m([`lan-ipv4`,`lan-ipv6`,`public`,`loopback`]),interfaceKind:m([`lan`,`wifi`,`docker`,`vpn`,`other`,`loopback`,`public`]),plausible:v(),plausibleReason:g(),priority:a()})).readonly()}),eS=i({baseUrl:g().nullable(),resolved:g().nullable()}),tS=i({addresses:p(g()).readonly()}),nS={name:`local-network`,scope:`system`,mode:`singleton`,methods:{list:T(h(),Zx),getPreferred:T(h(),Qx),getConnectionEndpoints:T(i({port:a().int().min(1).max(65535),includeLoopback:v().optional(),ipv4Only:v().optional(),scheme:m([`http`,`https`]).optional()}),$x),getNotificationEndpoint:T(h(),eS),setNotificationEndpoint:T(i({baseUrl:g().nullable()}),eS,{kind:`mutation`}),getAllowedAddresses:T(h(),tS),setAllowedAddresses:T(tS,i({success:y(!0)}),{kind:`mutation`}),resetAllowlistToBestMatch:T(h(),tS,{kind:`mutation`})},mount:{kind:`hub-only`}},rS=m([`locked`,`unlocked`,`locking`,`unlocking`,`jammed`]),iS=i({state:rS,lastChangedAt:a()}),aS={name:`lock-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Lock],methods:{lock:T(i({deviceId:a().int().nonnegative(),code:g().min(1).optional()}),h(),{kind:`mutation`,auth:`admin`}),unlock:T(i({deviceId:a().int().nonnegative(),code:g().min(1).optional()}),h(),{kind:`mutation`,auth:`admin`}),open:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:iS,kind:`push`},runtimeState:iS,durability:`restored`,volatileStateFields:[`lastChangedAt`]},oS=m([`off`,`on`,`idle`,`playing`,`paused`,`buffering`,`standby`]),sS=m([`off`,`all`,`one`]),cS=i({type:g(),title:g(),artist:g().optional(),album:g().optional(),imageUrl:g().optional()}),lS=i({state:oS,volumeLevel:a().min(0).max(100).nullable(),isMuted:v().nullable(),source:g(),availableSources:p(g()),currentMedia:cS.nullable(),positionMs:a().int().nonnegative().nullable(),durationMs:a().int().nonnegative().nullable(),shuffle:v().nullable(),repeat:sS.nullable(),lastChangedAt:a()}),uS={name:`media-player`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.MediaPlayer],methods:{play:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),pause:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),stop:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),next:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),previous:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),seek:T(i({deviceId:a().int().nonnegative(),positionMs:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),setVolume:T(i({deviceId:a().int().nonnegative(),volumeLevel:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`}),setMute:T(i({deviceId:a().int().nonnegative(),muted:v()}),h(),{kind:`mutation`,auth:`admin`}),setShuffle:T(i({deviceId:a().int().nonnegative(),shuffle:v()}),h(),{kind:`mutation`,auth:`admin`}),setRepeat:T(i({deviceId:a().int().nonnegative(),repeat:sS}),h(),{kind:`mutation`,auth:`admin`}),selectSource:T(i({deviceId:a().int().nonnegative(),source:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),playMedia:T(i({deviceId:a().int().nonnegative(),mediaId:g().min(1),mediaType:g().min(1)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:lS,kind:`push`},runtimeState:lS,durability:`session`},dS=i({id:g(),label:g(),scope:m([`mesh`,`public`]),url:g(),hostname:g(),port:a(),protocol:m([`http`,`https`])}),fS=i({id:g(),hostname:g(),magicDns:g(),addresses:p(g()).readonly(),os:g().optional(),online:v(),lastSeenMs:a(),isSelf:v(),connection:m([`direct`,`relay`,`idle`]),relay:g().nullable(),lastHandshakeMs:a(),rxBytes:a(),txBytes:a(),tags:p(g()).readonly(),exitNodeOption:v(),advertisedRoutes:p(g()).readonly(),userLogin:g().nullable(),keyExpiry:a().nullable()}),pS=i({joined:v(),meshIp:g(),magicDnsHostname:g(),peerCount:a(),endpoints:p(dS).readonly(),error:g().optional(),tenantName:g(),magicDnsSuffix:g(),userLogin:g().nullable(),controlPlaneUrl:g(),keyExpiry:a().nullable(),daemonSocket:g().optional(),daemonCliPath:g().optional()}),mS={name:`mesh-network`,scope:`system`,mode:`collection`,providerKind:`mesh`,methods:{getStatus:T(h(),pS),join:T(i({authKey:g().min(8),hostname:g().optional()}),i({joined:y(!0)}),{kind:`mutation`}),startLogin:T(i({hostname:g().optional()}),i({loginUrl:g()}),{kind:`mutation`}),leave:T(h(),i({left:y(!0)}),{kind:`mutation`}),logout:T(h(),i({loggedOut:y(!0)}),{kind:`mutation`}),listPeers:T(h(),i({peers:p(fS).readonly()})),testConnection:T(i({authKey:g().optional()}),i({ok:v(),tenant:g().optional(),daemonVersion:g().optional(),error:g().optional()}),{kind:`mutation`})}},hS=i({detected:v(),lastDetectedAt:a().nullable(),autoClearAfterMs:a().nullable()}),gS=i({deviceId:a(),detected:v(),timestamp:a(),source:Hg,regions:p(Wd).readonly().optional()}),_S={name:`motion`,scope:`device`,mode:`singleton`,deviceNative:!0,deviceTypes:[D.Camera,D.Sensor],methods:{isDetected:T(i({deviceId:a()}),v())},events:{onMotionChanged:{data:gS}},status:{schema:hS,kind:`push`},runtimeState:hS,durability:`session`},vS=i({enabled:v(),lastChangedAt:a()}),yS=vS.extend({lastFetchedAt:a()}),bS={name:`motion-trigger`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Light,D.Siren,D.Switch],methods:{setMotionTrigger:T(i({deviceId:a().int().nonnegative(),enabled:v()}),h(),{kind:`mutation`,auth:`admin`})},events:{onMotionTriggerChanged:{data:i({deviceId:a(),enabled:v(),lastChangedAt:a()})}},status:{schema:vS,kind:`command-driven`},runtimeState:yS,durability:`session`},xS=i({id:a(),enabled:v(),shape:rp}),SS=i({enabled:v(),sensitivity:a(),regions:p(xS),lastFetchedAt:a()}),CS=i({maxRegions:a(),supportedShapes:p(op),grid:cp,sensitivity:i({min:a(),max:a(),step:a()})}),wS=i({enabled:v().optional(),sensitivity:a().optional(),regions:p(xS).optional()}),TS={name:`motion-zones`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/motion-zones-grid`,tab:`motion`,label:`Motion Zones`}},methods:{getOptions:T(i({deviceId:a()}),CS),setZone:T(i({deviceId:a(),patch:wS}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:SS,kind:`poll`},runtimeState:SS,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},ES=m([`person`,`vehicle`,`animal`,`face`,`package`,`other`]),DS=i({class:ES,timestamp:a(),confidence:a().min(0).max(1).optional()}),OS=i({lastByClass:l(ES,DS.nullable()),supportedClasses:p(ES).readonly(),enabled:v()}),kS=OS.extend({lastFetchedAt:a()}),AS={name:`native-object-detection`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],methods:{setEnabled:T(i({deviceId:a(),enabled:v()}),h(),{kind:`mutation`,auth:`admin`})},events:{onDetected:{data:i({deviceId:a(),detection:DS})}},status:{schema:OS,kind:`push`},runtimeState:kS,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},jS=i({nominalBitrateKbps:a(),observedBitrateKbps:a(),peakBitrateKbps:a(),packetLossPercent:a(),lastUpdated:a()}),MS=i({rttMs:a(),jitterMs:a(),estimatedBandwidthKbps:a(),packetLossPercent:a().min(0).max(100),lastUpdated:a()}),NS=i({deviceId:a(),streams:n(g(),jS),client:MS.optional()}),PS={name:`network-quality`,scope:`system`,mode:`singleton`,methods:{getDeviceStats:T(i({deviceId:a()}),NS.nullable()),getAllStats:T(h(),p(NS).readonly()),reportClientStats:T(i({deviceId:a(),rttMs:a().min(0).max(6e4),jitterMs:a().min(0).max(1e4),estimatedBandwidthKbps:a().min(0).max(1e6),packetLossPercent:a().min(0).max(100)}),h(),{kind:`mutation`})},mount:{kind:`server-provided`}},FS=i({addonId:g(),capabilities:p(g()).readonly(),status:g()}),IS=i({pid:a(),name:g(),state:g(),cpuPercent:a(),memoryRss:a(),uptimeSeconds:a(),services:p(FS).readonly(),groupId:g().optional()}),LS=i({id:g(),status:g(),cpuPercent:a(),memoryRss:a()}),RS=i({category:g(),total:a(),healthy:a(),addons:p(LS).readonly()}),zS=i({name:g(),version:g()}),BS=i({id:g(),name:g(),hostname:g(),platform:g(),arch:g(),cpuModel:g().nullable(),cpuCores:a(),memoryMB:a(),engines:p(g()).readonly(),isHub:v(),isOnline:v(),cpuPercent:a(),memoryPercent:a(),uptime:a(),lastSeen:g(),localIps:p(g()).readonly(),addons:p(i({id:g(),capabilities:p(g()).readonly(),status:g()})).readonly(),processes:p(IS).readonly(),categories:p(RS).readonly(),rootPackage:zS.nullable()}),VS=i({callerAddonId:g(),providerAddonId:g(),capName:g(),callsPerMin:a(),lastCallAtMs:a()}),HS=i({nodeId:g(),name:g(),version:g(),status:g(),synced:v()}),US=i({hubVersion:g(),nodes:p(HS)}),WS=i({nodeId:g(),addonId:g()}),GS=i({id:g(),status:g(),version:g().optional(),packageName:g().optional()}),KS=i({success:v()}),qS=i({success:v(),reason:g().optional()}),JS=i({restarted:p(g()).readonly(),failed:p(g()).readonly()}),YS=i({nodeId:g(),name:g()}),XS={name:`nodes`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{topology:T(h(),p(BS).readonly(),{auth:`admin`}),deployAddon:T(WS,KS,{kind:`mutation`,auth:`admin`}),undeployAddon:T(WS,KS,{kind:`mutation`,auth:`admin`}),restartAddon:T(WS,KS,{kind:`mutation`,auth:`admin`}),restartProcess:T(i({nodeId:g(),processName:g()}),qS,{kind:`mutation`,auth:`admin`}),restartNode:T(i({nodeId:g()}),JS,{kind:`mutation`,auth:`admin`}),shutdownNode:T(i({nodeId:g()}),KS,{kind:`mutation`,auth:`admin`}),renameNode:T(i({nodeId:g(),name:g().min(1).max(64)}),YS,{kind:`mutation`,auth:`admin`}),clusterAddonStatus:T(h(),n(g(),US),{auth:`admin`}),getCapUsageGraph:T(i({windowSeconds:a().int().positive().max(300).default(60)}),p(VS).readonly(),{auth:`admin`}),getNodeAddons:T(i({nodeId:g()}),p(GS).readonly(),{auth:`admin`}),setProcessLogLevel:T(i({nodeId:g(),level:g()}),KS,{kind:`mutation`,auth:`admin`}),executeQuery:T(i({nodeId:g(),addonId:g(),queryName:g(),params:n(g(),u()).optional()}),u(),{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},ZS=m([`min`,`low`,`normal`,`high`]),QS=i({id:g().min(1),title:g().min(1),uri:o().optional(),destructive:v().optional()}),$S=i({image:v(),priority:v(),data:v(),actions:v(),recipients:v()}),eC=i({lastSentAt:a(),lastError:g().nullable(),queueDepth:a().int().nonnegative(),supports:$S}),tC=i({deviceId:a().int().nonnegative(),title:g().optional(),body:g().min(1),image:g().optional(),priority:ZS.optional(),channel:g().optional(),recipients:p(g()).optional(),actions:p(QS).optional(),data:n(g(),u()).optional()}),nC=i({notificationId:g(),acceptedAt:a()}),rC={name:`notifier`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Notifier],methods:{send:T(tC,nC,{kind:`mutation`,auth:`admin`}),cancel:T(i({deviceId:a().int().nonnegative(),notificationId:g().min(1)}),h(),{kind:`mutation`,auth:`admin`})},events:{onSent:{data:i({deviceId:a(),notificationId:g(),success:v(),error:g().nullable(),acceptedAt:a()})}},status:{schema:eC,kind:`command-driven`},runtimeState:eC,durability:`session`},iC=i({value:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional(),lastFetchedAt:a()}),aC={name:`numeric-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:iC,kind:`push`},runtimeState:iC,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},oC=m([`text`,`timestamp`,`watermark`]),sC=m([`top-left`,`top-center`,`top-right`,`bottom-left`,`bottom-center`,`bottom-right`,`custom`]),cC=i({id:g(),kind:oC,enabled:v(),text:g().optional(),position:sC.optional(),availablePositions:p(sC).readonly(),readOnly:v().optional()}),lC=i({overlays:p(cC).readonly()}),uC=i({enabled:v().optional(),text:g().optional(),position:sC.optional()}).partial(),dC={name:`osd`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],methods:{setOverlay:T(i({deviceId:a(),overlayId:g(),patch:uC}),h(),{kind:`mutation`,auth:`admin`})},events:{onStatusChanged:{data:i({deviceId:a(),status:lC})}},status:{schema:lC,kind:`command-driven`},settings:{bindings:[{kind:`array`,statusPath:`overlays`,idField:`id`,method:`setOverlay`,idArg:`overlayId`,patchArg:`patch`,sectionId:`osd`,sectionTitle:`Video overlays`,itemFields:{enabled:{label:e=>`${String(e.id)} enabled`,kind:`boolean`},text:{label:e=>`${String(e.id)} text`,kind:`text`,when:e=>e.kind!==`timestamp`&&!e.readOnly},position:{label:e=>`${String(e.id)} position`,kind:`select`,options:e=>e.availablePositions??[],when:e=>Array.isArray(e.availablePositions)&&e.availablePositions.length>0}}}]}},fC=b(`kind`,[i({kind:y(`static`),text:g().max(64)}),i({kind:y(`clock`),pattern:g().min(1).max(32).default(`HH:mm`),timezone:g().min(1).max(64).optional()}),i({kind:y(`device-state`),deviceId:a().int().optional(),capName:g().min(1).max(64),valuePath:g().min(1).max(64)}),i({kind:y(`latest-recognition`),recognition:m([`person`,`plate`])})]),pC=i({enabled:v().default(!0),source:fC,template:g().max(96).default("${value}"),maxCharacters:a().int().min(4).max(64).optional(),maxDecimals:a().int().min(0).max(4).default(1),unitLabel:g().max(8).optional(),valueMap:n(g(),g()).optional(),schedule:yp.optional(),conditions:Mp.optional(),fallbackText:g().max(64).default(``)}),mC=i({slotId:g(),kind:oC,readOnly:v(),cameraEnabled:v(),cameraText:g().optional(),binding:pC.nullable()}),hC=m([`written`,`unchanged`,`gated`,`unreadable`,`disabled`,`unbound`,`failed`]),gC=i({slotId:g(),outcome:hC,text:g(),reason:g().optional()}),_C=m([`number`,`boolean`,`string`,`enum`]),vC=i({deviceId:a().int(),deviceName:g(),capName:g(),valuePath:g(),label:g(),valueType:_C,enumValues:p(g()).readonly().optional()}),yC={name:`osd-manager`,scope:`system`,mode:`singleton`,methods:{getDeviceOsd:T(i({deviceId:a().int()}),i({supported:v(),slots:p(mC)}),{auth:`admin`}),getSourceCatalog:T(i({deviceId:a().int()}),i({sources:p(vC)}),{auth:`admin`}),getConditionSupport:T(i({}),i({supported:p(g()),catalog:p(Jp)}),{auth:`admin`}),setSlotBinding:T(i({deviceId:a().int(),slotId:g().min(1),binding:pC}),i({slot:mC,render:gC}),{kind:`mutation`,auth:`admin`}),clearSlotBinding:T(i({deviceId:a().int(),slotId:g().min(1)}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),copyDeviceConfiguration:T(i({sourceDeviceId:a().int(),targetDeviceId:a().int()}),i({copied:a().int().nonnegative(),skipped:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),previewSlot:T(i({deviceId:a().int(),slotId:g().min(1),binding:pC.optional()}),gC,{kind:`mutation`,auth:`admin`}),renderDevice:T(i({deviceId:a().int()}),i({results:p(gC)}),{kind:`mutation`,auth:`admin`})}},bC=4,xC=200,SC=m([`normal`,`offline`,`on_batteries`]),CC=a().int().min(4).max(200),wC=i({foodLevel:a().nullable(),food1:a().nullable(),food2:a().nullable(),lowFood:v(),batteryPower:a().min(0).max(100).nullable(),desiccantLeftDays:a().nullable(),feeding:v(),status:SC.nullable(),error:g().nullable(),errorCode:a().nullable(),isDualHopper:v(),childLock:v(),indicatorLight:v(),feedSound:v(),volume:a(),lastFetchedAt:a()}),TC={name:`pet-feeder`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.PetFeeder],methods:{feed:T(i({deviceId:a().int().nonnegative(),grams:CC.optional(),hopper1:CC.optional(),hopper2:CC.optional()}),h(),{kind:`mutation`,auth:`admin`}),cancelFeed:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),resetDesiccant:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),markFoodReplenished:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),callPet:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),playSound:T(i({deviceId:a().int().nonnegative(),soundId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),setChildLock:T(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`}),setIndicatorLight:T(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`}),setFeedSound:T(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`}),setVolume:T(i({deviceId:a().int().nonnegative(),level:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:wC,kind:`poll`},runtimeState:wC,durability:`session`},EC=i({id:g(),name:g(),sampleCount:a().int().nonnegative(),coverMediaKey:g().optional(),coverBase64:g().optional()}),DC=i({id:g(),text:g(),score:a(),addedAt:a().int(),deviceId:a().int().optional(),base64:g().optional()}),OC=i({plateId:g(),deviceId:a().int(),trackId:g(),timestamp:a().int(),text:g(),score:a(),corrected:v(),recognizedVehicleId:g().optional(),vehicleName:g().optional(),assigned:v(),plateBbox:H.optional(),keyFrameMediaKey:g().optional(),base64:g().optional()}),kC=i({key:g(),kind:g(),base64:g(),sizeBytes:a(),timestamp:a()}),AC=i({plateIds:p(g()).readonly(),representativePlateId:g(),representativeText:g(),size:a().int(),cohesion:a()}),jC={name:`plate-gallery`,scope:`system`,mode:`singleton`,methods:{listPlates:T(i({deviceId:a().int().optional(),limit:a().int().positive().optional()}).optional(),p(OC).readonly()),getPlateByTrack:T(i({deviceId:a().int(),trackId:g()}),OC.nullable()),getPlateMedia:T(i({plateId:g()}),p(kC).readonly()),searchPlates:T(i({text:g().min(1),maxDistance:a().int().min(0).optional(),limit:a().int().positive().optional()}),p(OC).readonly()),suggestPlateClusters:T(i({maxDistance:a().int().min(0).optional(),minClusterSize:a().int().min(2).optional(),limit:a().int().positive().optional()}).optional(),p(AC).readonly()),correctPlateText:T(i({plateId:g(),text:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),deletePlate:T(i({plateId:g()}),h(),{kind:`mutation`,auth:`admin`}),listVehicles:T(h(),p(EC).readonly()),createVehicle:T(i({name:g().min(1)}),EC,{kind:`mutation`,auth:`admin`}),renameVehicle:T(i({id:g(),name:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),deleteVehicle:T(i({id:g()}),h(),{kind:`mutation`,auth:`admin`}),listVehicleSamples:T(i({vehicleId:g()}),p(DC).readonly()),removeVehicleSample:T(i({vehicleId:g(),sampleId:g()}),h(),{kind:`mutation`,auth:`admin`}),assignPlate:T(i({plateId:g(),vehicleId:g()}),h(),{kind:`mutation`,auth:`admin`}),unassignPlate:T(i({plateId:g()}),h(),{kind:`mutation`,auth:`admin`}),assignPlates:T(i({plateIds:p(g()).min(1),vehicleId:g()}),i({assigned:a().int(),failed:p(g()).readonly()}),{kind:`mutation`,auth:`admin`}),unassignPlates:T(i({plateIds:p(g()).min(1)}),i({unassigned:a().int(),failed:p(g()).readonly()}),{kind:`mutation`,auth:`admin`})}},MC=m(ga),NC=m([`videotoolbox`,`cuda`,`nvdec`,`vaapi`,`qsv`,`d3d11va`,`dxva2`,`amf`,`vdpau`,`drm`,`coreml`,`tensorrt`,`openvino`,`directml`,`webgpu`,`none`]).nullable().optional(),PC=i({preferred:p(g()).readonly(),rationale:g()}),FC=m([`h264_videotoolbox`,`hevc_videotoolbox`,`h264_vaapi`,`hevc_vaapi`,`h264_nvenc`,`hevc_nvenc`,`h264_qsv`,`hevc_qsv`,`h264_amf`,`hevc_amf`,`libx264`,`libx265`]);i({encoders:p(i({encoder:FC,codec:m([`H264`,`H265`]),family:m([`videotoolbox`,`vaapi`,`nvenc`,`qsv`,`amf`,`software`]),available:v(),reason:g().optional()})).readonly(),defaultH264:FC,defaultH265:FC,probedAt:a()}),i({methods:p(g()).readonly(),probedAt:a()});var IC=m([`darwin`,`linux`,`win32`]),LC=m([`arm64`,`x64`]),RC=i({type:m([`nvidia`,`amd`,`intel`,`apple`]),name:g(),memoryMB:a().optional()}),zC=i({type:m([`apple-ane`,`intel-npu`])}),BC=i({type:y(`coral-edgetpu`),bus:g().optional()}),VC=i({platform:IC,arch:LC,cpuModel:g(),cpuCores:a(),totalRAM_MB:a(),availableRAM_MB:a(),gpu:RC.nullable(),npu:zC.nullable(),coral:BC.nullable().optional()}),HC=i({runtime:m([`node`,`python`]),backend:g(),format:m([`onnx`,`coreml`,`openvino`,`tflite`]),score:a(),reason:g(),available:v()}),UC=i({key:g(),backend:g(),device:g(),format:MC,runtime:y(`python`),score:a(),available:v()}),WC=i({hardware:VC,scores:p(HC).readonly(),bestScore:HC,pythonPath:g().nullable(),devices:p(UC).readonly()}),GC=i({modelId:g(),name:g(),minRAM_MB:a(),accuracyScore:a(),formats:p(g()).readonly()}),KC=i({modelId:g(),runtime:m([`node`,`python`]),backend:g(),format:MC,reason:g()}),qC={name:`platform-probe`,scope:`system`,mode:`singleton`,methods:{getCapabilities:T(h(),WC),getHardware:T(h(),VC),resolveInferenceConfig:T(i({requirements:p(GC).readonly()}),KC),resolveHwAccel:T(i({prefer:NC}),PC)}},JC=i({watts:a().optional(),kwhTotal:a().optional(),volts:a().optional(),amps:a().optional(),va:a().optional(),powerFactor:a().min(0).max(1).optional(),lastFetchedAt:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional()}),YC={name:`power-meter`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:JC,kind:`push`},runtimeState:JC,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},XC=i({latitude:a().min(-90).max(90),longitude:a().min(-180).max(180),accuracyMeters:a().nonnegative()}),ZC=i({state:g(),location:g().nullable(),gps:XC.nullable(),batteryPercent:a().min(0).max(100).nullable(),lastChangedAt:a()}),QC={name:`presence`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Presence],methods:{},status:{schema:ZC,kind:`push`},runtimeState:ZC,durability:`restored`,volatileStateFields:[`lastChangedAt`]},$C=i({hpa:a(),lastFetchedAt:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional()}),ew={name:`pressure-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:$C,kind:`push`},runtimeState:$C,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},tw=b(`kind`,[tp,np]),nw=i({id:a(),enabled:v(),shape:tw}),rw=i({enabled:v(),regions:p(nw),audioEnabled:v().nullable(),lastFetchedAt:a()}),iw=i({maxRegions:a(),supportedShapes:p(op),polygonVertices:sp.optional(),supportsAudioMute:v()}),aw=i({enabled:v().optional(),regions:p(nw).optional()}),ow={name:`privacy-mask`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/privacy-mask-grid`,tab:`image`,label:`Privacy Mask`}},methods:{getOptions:T(i({deviceId:a()}),iw),setMask:T(i({deviceId:a(),patch:aw}),h(),{kind:`mutation`,auth:`admin`}),setAudioEnabled:T(i({deviceId:a(),enabled:v()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:rw,kind:`poll`},runtimeState:rw,durability:`restored`,volatileStateFields:[`lastFetchedAt`]};function sw(e){return e.length===0?null:e.some(e=>e.audioEnabled)}var cw=i({id:g(),name:g()}),lw=i({pan:a(),tilt:a(),zoom:a()}),uw=i({pan:a().optional(),tilt:a().optional(),zoom:a().optional(),speed:a().optional()}),dw=lw.extend({autofocus:v()}),fw=i({hasPan:v(),hasTilt:v(),hasZoom:v(),supportsPresets:v(),maxPresets:a().optional(),hasAutofocus:v()}),pw={name:`ptz`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/ptz-panel`,tab:`ptz`,topTab:!0,label:`PTZ`,order:0}},methods:{move:T(uw.extend({deviceId:a()}),h(),{kind:`mutation`}),continuousMove:T(uw.extend({deviceId:a()}),h(),{kind:`mutation`}),stop:T(i({deviceId:a()}),h(),{kind:`mutation`}),getPresets:T(i({deviceId:a()}),p(cw)),goToPreset:T(i({deviceId:a(),presetId:g()}),h(),{kind:`mutation`}),savePreset:T(i({deviceId:a(),presetId:g(),name:g()}),h(),{kind:`mutation`,auth:`admin`}),deletePreset:T(i({deviceId:a(),presetId:g()}),h(),{kind:`mutation`,auth:`admin`}),getOptions:T(i({deviceId:a()}),fw),goHome:T(i({deviceId:a()}),h(),{kind:`mutation`}),getPosition:T(i({deviceId:a()}),lw),setAutofocus:T(i({deviceId:a(),enabled:v()}),h(),{kind:`mutation`})},status:{schema:dw,kind:`command-driven`}},mw=i({targetType:g().describe(`Vendor target string (people/vehicle/pet); empty = camera default`),stopDelaySeconds:a().int().min(0).max(300),disappearDelaySeconds:a().int().min(0).max(300)}),hw=i({value:g(),label:g()}),gw=i({enabled:v(),lastChangedAt:a(),currentSettings:mw.nullable(),supportedTargetTypes:p(hw)}),_w=gw.extend({lastFetchedAt:a()}),vw={name:`ptz-autotrack`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/ptz-autotrack`,tab:`ptz`,topTab:!0,label:`Auto-Tracking`,order:5}},methods:{getStatus:T(i({deviceId:a()}),gw),setEnabled:T(i({deviceId:a(),enabled:v()}),h(),{kind:`mutation`}),getSettings:T(i({deviceId:a()}),mw.nullable()),setSettings:T(i({deviceId:a(),settings:mw.partial()}),h(),{kind:`mutation`})},events:{onStatusChanged:{data:i({deviceId:a(),status:gw})}},status:{schema:gw,kind:`command-driven`},runtimeState:_w,durability:`session`},yw={name:`reboot`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera,D.Sensor,D.Switch],methods:{reboot:T(i({deviceId:a().int().nonnegative()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`})}},bw=i({deviceId:a(),enabled:v(),activeMode:m([`off`,`continuous`,`events`]),nodeId:g(),storageBytes:a()}),xw=i({profile:g(),startMs:a(),endMs:a()}),Sw=i({deviceId:a(),ranges:p(xw)}),Cw=i({deviceId:a(),days:p(a())}),ww=i({deviceId:a(),localMasterPath:g().nullable(),playbackUrl:g().nullable(),playbackEndpoints:p(g())}),Tw=i({deviceId:a(),usedBytes:a(),oldestMs:a().nullable().optional()}),Ew=i({locationId:g().nullable(),locationIds:p(g()).optional(),root:g().optional(),usedBytes:a(),availableBytes:a().nullable(),totalBytes:a().nullable()}),Dw=i({nodeId:g(),totalUsedBytes:a(),devices:p(Tw),locations:p(Ew).optional()}),Ow=i({deviceId:a(),profile:g(),fromLocationId:g(),toLocationId:g(),bytes:a(),files:a().int()}),kw=m([`unassigned`,`target-not-writable`,`below-threshold`,`no-headroom`]),Aw=i({deviceId:a(),profile:g(),fromLocationId:g(),toLocationId:g().nullable(),bytes:a(),reason:kw}),jw=i({moves:p(Ow),skipped:p(Aw),bytesToMove:a(),jobIds:p(g())}),Mw=i({throttleMbps:a().min(1).max(1e3).optional(),minMoveGb:a().min(0).optional()}),Nw=b(`kind`,[i({kind:y(`segment`),startMs:a(),durMs:a(),bytes:a()}),i({kind:y(`gap`),nearestEdgeMs:a().nullable(),prevEndMs:a().nullable().optional()})]),Pw=i({data:_(Uint8Array)}),Fw=i({data:_(Uint8Array),gopStartMs:a(),gopDurMs:a()}),Iw={name:`recording`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,status:{schema:bw,kind:`command-driven`},methods:{getAvailability:T(i({deviceId:a(),fromMs:a(),toMs:a()}),Sw,{kind:`query`,auth:`protected`}),getDaysWithRecordings:T(i({deviceId:a(),fromMs:a(),toMs:a(),tzOffsetMinutes:a()}),Cw,{kind:`query`,auth:`protected`}),getPlaybackManifest:T(i({deviceId:a(),fromMs:a(),toMs:a()}),ww,{kind:`query`,auth:`protected`}),getStorageUsage:T(i({}),Dw,{kind:`query`,auth:`admin`}),getDeviceConfig:T(i({deviceId:a()}),Ti,{kind:`query`,auth:`admin`}),locateSegment:T(i({deviceId:a(),profile:g(),epochMs:a()}),Nw,{kind:`query`,auth:`admin`}),readSegmentBytes:T(i({deviceId:a(),profile:g(),startMs:a()}),Pw,{kind:`query`,auth:`admin`}),readGopBytes:T(i({deviceId:a(),profile:g(),startMs:a(),epochMs:a()}),Fw,{kind:`query`,auth:`admin`}),setDeviceConfig:T(i({deviceId:a(),config:Ti}),Ti,{kind:`mutation`,auth:`admin`}),rescanStorage:T(i({deviceId:a()}),bw,{kind:`mutation`,auth:`admin`}),pruneFootage:T(i({deviceId:a(),reason:ri.optional()}),i({floorMs:a().nullable(),deletedBuckets:a().int(),reclaimedBytes:a().int()}),{kind:`mutation`,auth:`admin`}),deleteFootprint:T(i({deviceId:a(),fromMs:a().optional(),toMs:a().optional()}),i({deletedBuckets:a().int(),reclaimedBytes:a().int()}),{kind:`mutation`,auth:`admin`}),listOpsLog:T(ai,p(ii).readonly(),{kind:`query`,auth:`admin`}),renderGif:T(i({deviceId:a(),aroundMs:a(),preRollSec:a().min(0).max(30).default(2),postRollSec:a().min(0).max(30).default(5),maxWidth:a().int().min(120).max(1280).default(480),fps:a().int().min(1).max(15).default(5)}),i({gifBase64:g(),fromMs:a(),toMs:a()}),{kind:`mutation`,auth:`admin`}),renderClip:T(i({deviceId:a(),aroundMs:a(),preRollSec:a().min(0).max(30).default(3),postRollSec:a().min(0).max(30).default(7),maxWidth:a().int().min(160).max(1920).default(640)}),i({clipBase64:g(),mime:g(),fromMs:a(),toMs:a(),bytes:a().int()}),{kind:`mutation`,auth:`admin`}),pauseForStorageMigration:T(j,i({paused:y(!0)}),{kind:`mutation`,auth:`admin`}),resumeForStorageMigration:T(j,i({resumed:y(!0)}),{kind:`mutation`,auth:`admin`}),refreshStorageLocationsForMigration:T(j,i({refreshed:y(!0)}),{kind:`mutation`,auth:`admin`}),startStorageMigrationMove:T(Ni,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),getStorageMigrationMoveStatus:T(i({jobId:g()}),Ai.nullable(),{auth:`admin`}),cancelStorageMigrationMove:T(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),relocateFootage:T(Mi,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),listRelocateJobs:T(i({}),p(Ai).readonly(),{kind:`query`,auth:`admin`}),cancelRelocateJob:T(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),planStorageRebalance:T(Mw,jw,{kind:`query`,auth:`admin`}),startStorageRebalance:T(Mw,jw,{kind:`mutation`,auth:`admin`})}},Lw=a().min(.25).max(32),Rw=i({fromSec:a().nonnegative(),toSec:a().nonnegative()}).refine(e=>e.toSec>e.fromSec,{message:`dense range must have toSec > fromSec`}),zw=200,Bw=i({everyMs:a().int().positive(),ranges:p(Rw).min(1).max(200)}),Vw=i({everyMs:a().int().positive(),outputFps:a().int().min(1).max(60).optional(),dense:Bw.optional()}).superRefine((e,t)=>{e.dense!==void 0&&e.dense.everyMs>=e.everyMs&&t.addIssue({code:le.custom,message:`dense.everyMs must be strictly smaller than the base everyMs`,path:[`dense`,`everyMs`]})}),Hw=i({speed:Lw.optional(),timelapse:Vw.optional(),includeAudio:v(),maxLifeMs:a().int().positive(),deleteAfterDownload:v(),title:g().max(200).optional(),notifyTargetIds:p(g().min(1)).max(20).optional()}).superRefine((e,t)=>{e.speed!==void 0&&e.timelapse!==void 0&&t.addIssue({code:le.custom,message:`speed and timelapse are mutually exclusive`,path:[`timelapse`]})}),Uw=m([`queued`,`rendering`,`ready`,`failed`,`expired`,`deleted`]),Ww=i({id:g(),deviceId:a(),profile:g(),fromMs:a(),toMs:a(),options:Hw,state:Uw,progressPct:a().nullable(),fileBytes:a().nullable(),expiresAt:a(),deleteAfterDownload:v(),downloadedAt:a().nullable(),createdAt:a(),createdBy:g(),error:g().nullable()}),Gw=i({url:g(),endpoints:p(g())}),Kw=50*1024*1024,qw=i({base64:g(),contentType:g(),name:g(),bytes:a().int().nonnegative()}),Jw={name:`recording-export`,scope:`system`,mode:`singleton`,methods:{createExport:T(i({deviceId:a(),profile:g().optional(),profiles:p(g()).min(1).optional(),fromMs:a(),toMs:a(),options:Hw}).superRefine((e,t)=>{(e.profiles!==void 0&&e.profiles.length>0?e.profiles:e.profile===void 0?[]:[e.profile]).length<1&&t.addIssue({code:le.custom,message:`pass profiles[] (min 1) or legacy profile`,path:[`profiles`]})}),Ww,{kind:`mutation`,auth:`protected`}),listExports:T(i({deviceId:a().optional()}),p(Ww),{kind:`query`,auth:`protected`}),getExport:T(i({exportId:g()}),Ww,{kind:`query`,auth:`protected`}),cancelExport:T(i({exportId:g()}),Ww,{kind:`mutation`,auth:`protected`}),deleteExport:T(i({exportId:g()}),Ww,{kind:`mutation`,auth:`protected`}),getDownloadUrl:T(i({exportId:g()}),Gw,{kind:`query`,auth:`protected`}),readExportBytes:T(i({exportId:g()}),qw,{kind:`query`,auth:`protected`})}},Yw=g(),Xw=[`day`,`ir`,`night`,`dawn`,`dusk`],Zw=m([`skip`,`judge-anyway`]),Qw=`__diverged__`,$w=m([`matched`,`diverged`,`unknown`]),eT=m([`no-reference-for-condition`,`view-shifted`,`no-vision-profile`,`encoder-model-changed`,`no-snapshot`]),tT=i({embedding:p(a()),modelId:g(),condition:Yw,capturedAt:a(),thumbnailMediaId:g().optional(),anchorEmbedding:p(a()).optional()}),nT=i({id:g(),label:g(),references:p(tT),textPrompts:p(g()).optional(),referenceCount:a(),currentlyMatched:v()}),rT=b(`mode`,[i({mode:y(`similarity`),threshold:a().min(0).max(1),hysteresisCount:a().int().positive()}),i({mode:y(`llm`),prompt:g(),profileId:g().optional(),hysteresisCount:a().int().positive()})]),iT=60,aT=120,oT=60,sT=.85,cT=`skip`,lT=8e3,uT=448,dT=!0,fT=i({enabled:v().default(!1),prompt:g().min(1).max(1e3),profileId:g().optional(),timeoutMs:a().int().min(1e3).max(2e4).default(lT),maxImagePx:a().int().min(64).max(2048).default(448),onTimeout:m([`flip`,`hold`]).default(`hold`)}),pT=i({id:g(),label:g(),roi:tp,enabled:v(),triggerMode:m([`periodic`,`on-motion`,`both`]),checkIntervalSec:a().optional(),check:rT,states:p(nT),currentStateId:g().nullable(),lastCheckedAt:a().nullable(),lastConfidence:a().nullable(),currentCondition:Yw.nullable(),availability:m([`ok`,`unavailable`]),unavailableReason:g().nullable(),baselineStateId:g().nullable(),emit:m([`latched`,`live`]).default(`latched`),verdict:$w,latched:v(),armedAt:a(),divergedAt:a().nullable(),restoredAt:a().nullable(),quietSeconds:a().int().min(0).max(3600).default(60),minObservationSpacingSec:a().int().min(0).max(3600).default(120),confirm:fT.optional(),anchorThreshold:a().min(0).max(1).default(sT),autoRestore:v().default(!1),onUncoveredCondition:Zw.default(cT),suspendedCondition:Yw.nullable().default(null),unavailable:eT.nullable(),coveredConditions:p(Yw)}),mT=i({monitors:p(pT),lastFetchedAt:a()}),hT={name:`scene-monitor`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],methods:{listScenes:T(i({deviceId:a()}),mT),createScene:T(i({deviceId:a(),label:g(),roi:tp,check:rT,triggerMode:m([`periodic`,`on-motion`,`both`]).optional(),checkIntervalSec:a().optional()}),pT,{kind:`mutation`,auth:`admin`}),updateScene:T(i({deviceId:a(),monitorId:g(),patch:i({label:g().optional(),roi:tp.optional(),enabled:v().optional(),triggerMode:m([`periodic`,`on-motion`,`both`]).optional(),checkIntervalSec:a().optional(),check:rT.optional(),emit:m([`latched`,`live`]).optional(),quietSeconds:a().int().min(0).max(3600).optional(),minObservationSpacingSec:a().int().min(0).max(3600).optional(),anchorThreshold:a().min(0).max(1).optional(),autoRestore:v().optional(),onUncoveredCondition:Zw.optional(),confirm:fT.nullable().optional()})}),h(),{kind:`mutation`,auth:`admin`}),deleteScene:T(i({deviceId:a(),monitorId:g()}),h(),{kind:`mutation`,auth:`admin`}),captureReference:T(i({deviceId:a(),monitorId:g(),stateId:g().optional(),label:g().optional(),condition:Yw.optional()}),i({stateId:g(),referenceCount:a()}),{kind:`mutation`,auth:`admin`}),deleteReference:T(i({deviceId:a(),monitorId:g(),stateId:g(),index:a()}),h(),{kind:`mutation`,auth:`admin`}),recheckNow:T(i({deviceId:a(),monitorId:g()}),h(),{kind:`mutation`,auth:`admin`}),resetScene:T(i({deviceId:a(),monitorId:g(),recapture:v().optional()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:mT,kind:`push`},runtimeState:mT,durability:`session`},gT=m([`include`,`exclude`]),_T=i({id:g(),name:g().optional(),zoneIds:p(g()).min(1).readonly(),mode:gT,classFilter:p(g()).readonly().optional(),overlapThreshold:a().min(0).max(1).optional(),bboxInclusionPct:a().min(0).max(100).optional(),preferMask:v().optional(),enabled:v().default(!0)}),vT=p(_T).readonly(),yT=i({isRunning:v(),lastRunAt:a(),lastRunSuccess:v().nullable(),lastError:g().nullable(),lastChangedAt:a()}),bT={name:`script-runner`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Script],methods:{run:T(i({deviceId:a().int().nonnegative(),variables:n(g(),u()).optional()}),h(),{kind:`mutation`,auth:`admin`}),stop:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:yT,kind:`push`},runtimeState:yT,durability:`session`},xT=i({detected:v(),lastChangedAt:a()}),ST={name:`smoke`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:xT,kind:`push`},runtimeState:xT,durability:`restored`,volatileStateFields:[`lastChangedAt`]},CT=i({camStreamId:g().min(1),kind:Ve,url:g().optional(),codec:g().optional(),resolution:He.optional(),fps:a().positive().optional(),label:g().optional(),deviceFeatures:p(g()).optional(),autoEligible:v().optional(),metadata:n(g(),u()).optional()}),wT=i({descriptors:p(CT),lastFetchedAt:a()}),TT={name:`stream-catalog`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],methods:{getCatalog:T(i({deviceId:a().int().nonnegative()}),p(CT).readonly())},runtimeState:wT,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},ET=m([`main`,`sub`,`ext`]),DT=i({width:a(),height:a(),codec:m([`h264`,`h265`]),framerate:a(),bitrate:a(),bitrateMode:m([`vbr`,`cbr`]).optional(),encoderProfile:m([`high`,`main`,`baseline`]).optional(),gop:a().optional(),audio:v().optional()}),OT=i({main:DT.optional(),sub:DT.optional(),ext:DT.optional(),lastFetchedAt:a()}),kT=i({resolutions:p(i({width:a(),height:a()})),codecs:p(m([`h264`,`h265`])),framerates:p(a()),bitrates:p(a()),bitrateRange:s([a(),a()]).optional(),supportsBitrateMode:v(),supportsEncoderProfile:v(),supportsGop:v(),gop:i({min:a(),max:a(),step:a()}).optional()}),AT=i({main:kT.optional(),sub:kT.optional(),ext:kT.optional()}),jT=i({width:a().optional(),height:a().optional(),codec:m([`h264`,`h265`]).optional(),framerate:a().optional(),bitrate:a().optional(),bitrateMode:m([`vbr`,`cbr`]).optional(),encoderProfile:m([`high`,`main`,`baseline`]).optional(),gop:a().optional()}),MT={name:`stream-params`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`stream-params`,tab:`streaming`}},methods:{getOptions:T(i({deviceId:a()}),AT),setProfile:T(i({deviceId:a(),profile:ET,patch:jT}),h(),{kind:`mutation`,auth:`admin`}),getConfigSchema:T(i({deviceId:a()}),u().nullable())},status:{schema:OT,kind:`poll`},runtimeState:OT,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},NT=[{profile:`main`,prefix:`streamMain`,label:`Main stream`},{profile:`sub`,prefix:`streamSub`,label:`Sub stream`},{profile:`ext`,prefix:`streamExt`,label:`Third stream`}];function PT(e,t,n){let r=[];if(t.resolutions.length>0){let i=t.resolutions.map(e=>({value:`${String(e.width)}x${String(e.height)}`,label:`${String(e.width)}×${String(e.height)}`})),a=n?`${String(n.width)}x${String(n.height)}`:void 0;a&&!i.some(e=>e.value===a)&&i.unshift({value:a,label:`${a.replace(`x`,`×`)} (current)`}),r.push({type:`select`,key:`${e.prefix}_resolution`,label:`Resolution`,options:i,default:a??i[0]?.value??``})}if(t.codecs.length>0&&r.push({type:`select`,key:`${e.prefix}_codec`,label:`Codec`,options:t.codecs.map(e=>({value:e,label:e===`h264`?`H.264`:`H.265`})),default:n?.codec??t.codecs[0]}),t.framerates.length>0){let i=t.framerates.map(e=>({value:String(e),label:`${String(e)} fps`})),a=n?.framerate;a!==void 0&&!t.framerates.includes(a)&&i.unshift({value:String(a),label:`${String(a)} fps (current)`}),r.push({type:`select`,key:`${e.prefix}_framerate`,label:`Frame rate`,options:i,default:a===void 0?i[0]?.value??``:String(a)})}if(t.bitrates.length>0){let i=t.bitrates.map(e=>({value:String(e),label:`${String(e)} kbps`})),a=n?.bitrate;a!==void 0&&!t.bitrates.includes(a)&&i.unshift({value:String(a),label:`${String(a)} kbps (current)`}),r.push({type:`select`,key:`${e.prefix}_bitrate`,label:`Bitrate`,options:i,default:a===void 0?i[0]?.value??``:String(a)})}else{let i=t.bitrateRange;r.push({type:`number`,key:`${e.prefix}_bitrate`,label:`Bitrate`,unit:`kbps`,...i?{min:i[0],max:i[1]}:{},default:n?.bitrate??i?.[0]??0})}if(t.supportsBitrateMode&&r.push({type:`select`,key:`${e.prefix}_bitrateMode`,label:`Bitrate mode`,options:[{value:`vbr`,label:`VBR (variable)`},{value:`cbr`,label:`CBR (constant)`}],default:n?.bitrateMode??`vbr`}),t.supportsEncoderProfile&&r.push({type:`select`,key:`${e.prefix}_encoderProfile`,label:`Encoder profile`,options:[{value:`baseline`,label:`Baseline`},{value:`main`,label:`Main`},{value:`high`,label:`High`}],default:n?.encoderProfile??`main`}),t.supportsGop){let i=t.gop;if(i){let t=[];for(let e=i.min;e<=i.max;e+=i.step)t.push({value:String(e),label:`${String(e)} s`});let a=n?.gop;a!==void 0&&!t.some(e=>e.value===String(a))&&t.unshift({value:String(a),label:`${String(a)} s (current)`}),r.push({type:`select`,key:`${e.prefix}_gop`,label:`I-frame interval (GOP)`,options:t,default:a===void 0?t[0]?.value??``:String(a)})}else r.push({type:`number`,key:`${e.prefix}_gop`,label:`I-frame interval (GOP)`,unit:`s`,min:1,default:n?.gop??1})}return r.length===0?null:{id:`stream-${e.profile}`,tab:`streaming`,title:e.label,description:`Encoder parameters pushed to the camera. Option lists are read live from the camera — fields the firmware doesn't expose are hidden.`,columns:2,fields:r}}function FT(e,t){let n=[];for(let r of NT){let i=e[r.profile];if(!i)continue;let a=PT(r,i,t?.[r.profile]);a&&n.push(a)}return n.length===0?null:{sections:n}}function IT(e,t){let n={},r=!1,i=`${t}_resolution`;if(i in e&&typeof e[i]==`string`){let[t,a]=e[i].split(`x`).map(Number);Number.isFinite(t)&&Number.isFinite(a)&&(n.width=t,n.height=a,r=!0)}let a=`${t}_codec`;a in e&&(e[a]===`h264`||e[a]===`h265`)&&(n.codec=e[a],r=!0);let o=`${t}_framerate`;if(o in e){let t=Number(e[o]);Number.isFinite(t)&&(n.framerate=t,r=!0)}let s=`${t}_bitrate`;if(s in e){let t=Number(e[s]);Number.isFinite(t)&&(n.bitrate=t,r=!0)}let c=`${t}_bitrateMode`;c in e&&(e[c]===`vbr`||e[c]===`cbr`)&&(n.bitrateMode=e[c],r=!0);let l=`${t}_encoderProfile`;l in e&&(e[l]===`high`||e[l]===`main`||e[l]===`baseline`)&&(n.encoderProfile=e[l],r=!0);let u=`${t}_gop`;if(u in e){let t=Number(e[u]);Number.isFinite(t)&&(n.gop=t,r=!0)}return r?n:null}var LT=i({on:v(),lastChangedAt:a()}),RT={name:`switch`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Switch,D.Siren,D.Light],methods:{setState:T(i({deviceId:a(),on:v()}),h(),{kind:`mutation`,auth:`admin`})},events:{onStateChanged:{data:i({deviceId:a(),on:v(),lastChangedAt:a()})}},status:{schema:LT,kind:`command-driven`},runtimeState:LT,durability:`restored`,volatileStateFields:[`lastChangedAt`],settings:{bindings:[{kind:`scalar`,statusPath:`on`,method:`setState`,valueArg:`on`,field:{label:`On`,kind:`boolean`}}]}},zT=i({streaming:v(),notifications:v(),objectDetection:v(),remoteAccess:v(),agentCluster:v(),smartHome:v(),recordings:v(),backup:v(),repl:v()}),BT=i({status:y(`ok`),uptime:a()}),VT=i({name:g(),address:g(),family:g(),internal:v()}),HT=m([`operator-set`,`derived-from-ip`]),UT=i({latitude:a().min(-90).max(90),longitude:a().min(-180).max(180),source:HT,updatedAt:a(),label:g().optional()}),WT=i({location:UT.nullable(),derivationAttemptedAt:a().nullable(),derivationError:g().nullable()}),GT=i({latitude:a().min(-90).max(90),longitude:a().min(-180).max(180)}).nullable(),KT={name:`system`,scope:`system`,mode:`singleton`,methods:{info:T(h(),zT),health:T(h(),BT),featureFlags:T(h(),zT),networkAddresses:T(h(),p(VT).readonly()),getRetentionConfig:T(h(),u().nullable(),{auth:`admin`}),setRetentionConfig:T(n(g(),u()),ce(),{kind:`mutation`,auth:`admin`}),forceRetentionCleanup:T(h(),h(),{kind:`mutation`,auth:`admin`}),getSiteLocation:T(h(),WT),setSiteLocation:T(GT,WT,{kind:`mutation`,auth:`admin`}),detectSiteLocation:T(h(),WT,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},qT=i({tampered:v(),lastChangedAt:a()}),JT={name:`tamper`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:qT,kind:`push`},runtimeState:qT,durability:`restored`,volatileStateFields:[`lastChangedAt`]},YT=i({celsius:a(),lastFetchedAt:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional()}),XT={name:`temperature-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor,D.Thermostat],methods:{},status:{schema:YT,kind:`push`},runtimeState:YT,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},ZT=i({title:g(),message:g(),severity:m([`info`,`warning`,`critical`]),duration:a().optional(),action:i({label:g(),url:g()}).optional()}),QT={name:`toast`,scope:`system`,mode:`singleton`,methods:{onToast:T(h(),ZT,{kind:`subscription`})},mount:{kind:`server-provided`}},$T=i({currentVersion:g().nullable(),availableVersion:g().nullable(),updatable:v(),state:g().nullable(),inProgress:v()}),eE={name:`update`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Update],methods:{installUpdate:T(h(),h(),{kind:`mutation`,auth:`admin`})},status:{schema:$T,kind:`poll`},runtimeState:$T,durability:`session`},tE=i({id:g(),username:g(),isAdmin:v().default(!1),allowedProviders:c([p(g()),y(`*`)]),allowedDevices:n(g(),c([p(g()),y(`*`)])),scopes:p(J).default([]),totpEnabled:v().default(!1),createdAt:a(),updatedAt:a()}),nE=i({username:g(),password:g().min(6),isAdmin:v().default(!1),allowedProviders:c([p(g()),y(`*`)]).optional(),allowedDevices:n(g(),c([p(g()),y(`*`)])).optional(),scopes:p(J).optional()}),rE=i({id:g(),isAdmin:v().optional(),allowedProviders:c([p(g()),y(`*`)]).optional(),allowedDevices:n(g(),c([p(g()),y(`*`)])).optional(),scopes:p(J).optional()}),iE=i({id:g(),label:g(),isAdmin:v().default(!1),allowedProviders:c([p(g()),y(`*`)]).optional(),allowedDevices:n(g(),c([p(g()),y(`*`)])).optional(),tokenPrefix:g(),createdAt:a(),lastUsedAt:a().optional()}),aE=i({label:g(),isAdmin:v().default(!1),allowedProviders:c([p(g()),y(`*`)]).optional(),allowedDevices:n(g(),c([p(g()),y(`*`)])).optional()}),oE=i({token:g(),record:iE}),sE=i({id:g(),userId:g(),name:g(),tokenPrefix:g(),scopes:p(J),expiresAt:a().nullish(),lastUsedAt:a().nullish(),createdAt:a()}),cE=i({userId:g(),name:g(),scopes:p(J),expiresAt:a().optional()}),lE=i({token:g(),record:sE}),uE=i({id:g(),userId:g(),username:g(),integrationId:g(),scopes:p(J),createdAt:a(),lastUsedAt:a(),revokedAt:a().nullable()}),dE=i({secret:g(),otpauthUrl:g()}),fE=i({enabled:v(),confirmedAt:a().nullable()}),pE={name:`user-management`,scope:`system`,mode:`singleton`,methods:{listUsers:T(h(),p(tE),{auth:`admin`}),createUser:T(nE,tE,{kind:`mutation`,auth:`admin`,access:`create`}),updateUser:T(rE,i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),deleteUser:T(i({id:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),resetPassword:T(i({id:g(),newPassword:g().min(6)}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),setUserScopes:T(i({userId:g(),scopes:p(J)}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),validateCredentials:T(i({username:g(),password:g()}),tE.extend({passwordHash:g()}).nullable(),{kind:`mutation`,access:`view`}),listApiKeys:T(h(),p(iE),{auth:`admin`}),createApiKey:T(aE,oE,{kind:`mutation`,auth:`admin`,access:`create`}),revokeApiKey:T(i({id:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),validateApiKey:T(i({token:g()}),iE.nullable(),{kind:`mutation`,access:`view`}),createScopedToken:T(cE,lE,{kind:`mutation`,auth:`admin`,access:`create`}),revokeScopedToken:T(i({id:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),validateScopedToken:T(i({token:g()}),sE.nullable(),{access:`view`}),listScopedTokens:T(i({userId:g()}),p(sE),{auth:`admin`}),setupTotp:T(i({userId:g()}),dE,{kind:`mutation`,auth:`admin`,access:`create`}),confirmTotp:T(i({userId:g(),code:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),disableTotp:T(i({userId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),getTotpStatus:T(i({userId:g()}),fE,{auth:`admin`}),verifyTotp:T(i({userId:g(),code:g()}),i({valid:v()}),{kind:`mutation`,access:`view`}),oauthIssueCode:T(i({integrationId:g(),userId:g(),username:g(),scopes:p(J),redirectUri:g(),hubUrl:g(),codeChallenge:g().optional(),refreshTtlSec:c([a().int().positive(),y(`never`)]).optional()}),i({code:g()}),{kind:`mutation`,access:`create`}),oauthExchangeCode:T(i({code:g(),redirectUri:g(),codeVerifier:g().optional()}),i({accessToken:g(),refreshToken:g(),expiresIn:a()}).nullable(),{kind:`mutation`,access:`view`}),oauthRefresh:T(i({refreshToken:g()}),i({accessToken:g(),refreshToken:g(),expiresIn:a()}).nullable(),{kind:`mutation`,access:`view`}),oauthVerifyAccessToken:T(i({token:g()}),i({userId:g(),username:g(),scopes:p(J)}).nullable(),{access:`view`}),listOauthSessions:T(h(),p(uE),{auth:`admin`}),revokeOauthSession:T(i({id:g()}),i({success:v()}),{kind:`mutation`,auth:`admin`,access:`delete`})}},mE=m([`idle`,`cleaning`,`paused`,`returning`,`docked`,`drying`,`error`]),hE=i({level:a().min(0).max(100).nullable(),status:m([`ok`,`low`,`full`]).nullable()}),gE=i({state:mE,batteryLevel:a().min(0).max(100).nullable(),fanSpeed:g().nullable(),availableFanSpeeds:p(g()),cleanWater:hE.nullable(),dirtyWater:hE.nullable(),detergent:hE.nullable(),dustBin:hE.nullable(),progressPercent:a().min(0).max(100).nullable(),errorCode:a().nullable(),errorLabel:g().nullable(),lastChangedAt:a()}),_E={name:`vacuum-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Vacuum],methods:{start:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),pause:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),stop:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),returnToBase:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),locate:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),setFanSpeed:T(i({deviceId:a().int().nonnegative(),speed:g().min(1)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:gE,kind:`push`},runtimeState:gE,durability:`session`},vE=m([`open`,`opening`,`closing`,`closed`,`stopped`]),yE=i({state:vE,position:a().min(0).max(100).nullable(),lastChangedAt:a()}),bE={name:`valve`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Valve],methods:{open:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),close:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),stop:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),setPosition:T(i({deviceId:a().int().nonnegative(),position:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:yE,kind:`push`},runtimeState:yE,durability:`session`},xE=i({detected:v(),lastChangedAt:a()}),SE={name:`vibration`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:xE,kind:`push`},runtimeState:xE,durability:`restored`,volatileStateFields:[`lastChangedAt`]},CE=i({currentTemp:a().nullable(),targetTemp:a().nullable(),operationMode:g().nullable(),availableModes:p(g()),away:v().nullable(),minTemp:a().nullable(),maxTemp:a().nullable(),lastChangedAt:a()}),wE={name:`water-heater`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.WaterHeater],methods:{setTargetTemp:T(i({deviceId:a().int().nonnegative(),temp:a().finite()}),h(),{kind:`mutation`,auth:`admin`}),setOperationMode:T(i({deviceId:a().int().nonnegative(),mode:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),setAway:T(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:CE,kind:`push`},runtimeState:CE,durability:`session`},TE=i({condition:g().nullable(),temperature:a().nullable(),temperatureUnit:g().nullable(),humidity:a().min(0).max(100).nullable(),pressure:a().nullable(),pressureUnit:g().nullable(),windSpeed:a().nullable(),windSpeedUnit:g().nullable(),windBearing:a().nullable(),lastFetchedAt:a()}),EE={name:`weather`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Weather],methods:{},status:{schema:TE,kind:`push`},runtimeState:TE,durability:`session`},DE=i({totalObjects:a().int().nonnegative(),byClass:n(g(),a().int().nonnegative())}),OE=DE.extend({zoneId:g(),zoneName:g(),trackIds:p(g()).readonly()}),kE=i({id:g(),className:g(),bbox:i({x:a(),y:a(),w:a(),h:a()}),frameWidth:a().int().nonnegative(),frameHeight:a().int().nonnegative(),firstSeenAt:a().int(),becameStationaryAt:a().int(),lastConfirmedAt:a().int(),label:g().optional(),keyFrameMediaKey:g().optional()}),AE=i({ts:a().int(),frameWidth:a().int().nonnegative(),frameHeight:a().int().nonnegative(),zones:p(OE).readonly(),frame:DE,unzoned:DE,stationaryObjects:p(kE).readonly().optional()}),jE=m([`minute`,`5min`,`hour`]),ME=i({from:a().int(),to:a().int(),resolution:jE}),NE=i({ts:a().int(),count:a().int().nonnegative()}),PE={name:`zone-analytics`,scope:`device`,mode:`singleton`,deviceTypes:[D.Camera],methods:{getCurrentSnapshot:T(i({deviceId:a()}),AE.nullable()),getZoneHistory:T(i({deviceId:a(),zoneId:g(),className:g().optional()}).extend(ME.shape),p(NE).readonly()),getCameraHistory:T(i({deviceId:a(),className:g().optional()}).extend(ME.shape),p(NE).readonly()),getUnzonedHistory:T(i({deviceId:a(),className:g().optional()}).extend(ME.shape),p(NE).readonly())},runtimeState:AE,durability:`session`},FE=m([`motion`,`detection`,`package`]),IE={name:`zone-rules`,scope:`device`,mode:`singleton`,deviceTypes:[D.Camera],methods:{listRules:T(i({deviceId:a(),stage:FE}),p(_T).readonly()),setRules:T(i({deviceId:a(),stage:FE,rules:p(_T).readonly()}),h(),{kind:`mutation`,auth:`admin`})},runtimeState:i({motion:p(_T).readonly(),detection:p(_T).readonly(),package:p(_T).readonly()}),durability:`restored`},LE=[`decoder`,`motion-detection`,`pipeline-executor`,`audio-analyzer`,`pipeline-analytics`,`notification-output`],RE=[...LE,`pipeline-orchestrator`,`pipeline-runner`],zE=[{cap:`alarm-panel`,field:`state`},{cap:`cover`,field:`state`},{cap:`presence`,field:`state`},{cap:`lock`,field:`locked`,booleanWords:[`locked`,`unlocked`]},{cap:`contact`,field:`entryOpen`,booleanWords:[`open`,`closed`]},{cap:`switch`,field:`on`,booleanWords:[`on`,`off`]},{cap:`binary`,field:`on`,booleanWords:[`on`,`off`]}];function BE(e){for(let t of zE){let n=e[t.cap];if(typeof n!=`object`||!n)continue;let r=n[t.field];if(typeof r==`string`&&r.length>0)return r;if(typeof r==`boolean`&&t.booleanWords!==void 0)return r?t.booleanWords[0]:t.booleanWords[1]}}function VE(e,t=[]){for(let n of zE){let r=e[n.cap];if(typeof r!=`object`||!r)continue;if(n.booleanWords!==void 0)return[...n.booleanWords];if(n.cap===`alarm-panel`)return[...t];let i=r[n.field];return typeof i==`string`?[i]:[]}return[]}var HE=`camstack/camstack-models`,UE=`https://huggingface.co/${HE}/resolve/main`,WE={"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:[],"ffmpeg.binaryPath":`ffmpeg`,"ffmpeg.hwAccel":`auto`,"ffmpeg.threadCount":0,"auth.tokenExpiry":`7d`},Z={Siren:O.Siren,Floodlight:O.Floodlight,Spotlight:O.Spotlight,PirSensor:O.PirSensor,Chime:O.Chime,Autotrack:O.Autotrack,Nightvision:O.Nightvision,PrivacyMask:O.PrivacyMask},GE={[Z.Siren]:`Siren`,[Z.Floodlight]:`Floodlight`,[Z.Spotlight]:`Spotlight`,[Z.PirSensor]:`PIR`,[Z.Chime]:`Chime`,[Z.Autotrack]:`Autotracking`,[Z.Nightvision]:`Night Vision`,[Z.PrivacyMask]:`Privacy Mask`};function KE(e,t,n){let r=`${e}:${t}`;return typeof n==`number`?`${r}:${n}`:r}var qE=class e{schema;data;persistFn;constructor(e,t,n){this.schema=e,this.data=t,this.persistFn=n}static fromSchema(t,n,r={},i){let a=t.safeParse(r);if(a.success)return new e(t,a.data,n);let o=new Set;for(let e of a.error.issues){let t=e.path[0];typeof t==`string`&&o.add(t)}let s={...r};for(let e of o)delete s[e];let c=t.safeParse(s);return i?.({droppedKeys:[...o],issues:a.error.issues}),c.success?(n(c.data).catch(()=>{}),new e(t,c.data,n)):new e(t,t.parse({}),n)}get values(){return this.data}get(e){return this.data[e]}async set(e,t){let n=this.schema.parse({...this.data,[e]:t});this.data=n,await this.persistFn(this.data)}async setAll(e){let t=this.schema.parse({...this.data,...e});this.data=t,await this.persistFn(this.data)}async deleteKey(e){let{[e]:t,...n}=this.data,r=this.schema.parse(n);this.data=r,await this.persistFn(this.data)}entries(){let e=this.schema.shape;return Object.entries(e).map(([e,t])=>({key:e,schema:t,value:this.data[e],description:t.description}))}},JE=class e{writer;pendingWrites=new Set;slices;schemas=new Map;listeners=new Set;capListeners=new Map;constructor(e,t){this.writer=t,this.slices=new Map;for(let[t,n]of Object.entries(e))n&&typeof n==`object`&&!Array.isArray(n)&&this.slices.set(t,{...n})}static fromInitial(t,n){return new e(t,n)}installCapSchema(e,t){let n=this.schemas.get(e);if(n){if(n!==t)throw Error(`[DeviceRuntimeState] capability "${e}" registered a different runtime-state schema; each cap must declare ONE shape across every provider`);return}this.schemas.set(e,t);let r=this.slices.get(e);if(r){let n=t.safeParse(r);n.success?this.slices.set(e,n.data):this.slices.delete(e)}}getCapState(e){let t=this.slices.get(e);if(t)return Object.freeze({...t})}getCapField(e,t){return this.slices.get(e)?.[t]}setCapState(e,t){this.applyCapWrite(e,t,!1)}patchCapState(e,t){this.applyCapWrite(e,t,!0)}applyCapWrite(e,t,n){let r=this.schemas.get(e);if(!r)throw Error(`[DeviceRuntimeState] no schema registered for cap "${e}" — did the device register it via ctx.registerNativeCap before writing?`);let i=this.slices.get(e)??{},a=n?{...i,...t}:{...t},o=r.parse(a);if(YE(i,o))return;this.slices.set(e,o),this.fireListeners([e]);let s=this.writer(e,{...o}).catch(()=>{});this.pendingWrites.add(s),s.finally(()=>{this.pendingWrites.delete(s)})}fireListeners(e){let t=this.snapshot();for(let n of this.listeners)try{n(e,t)}catch{}for(let t of e){let e=this.capListeners.get(t);if(!e)continue;let n=this.getCapState(t);for(let t of e)try{t(n)}catch{}}}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}subscribeCap(e,t){let n=this.capListeners.get(e);n||(n=new Set,this.capListeners.set(e,n));let r=e=>{t(e)};return n.add(r),()=>{let t=this.capListeners.get(e);t&&(t.delete(r),t.size===0&&this.capListeners.delete(e))}}snapshot(){let e={};for(let[t,n]of this.slices)e[t]=Object.freeze({...n});return Object.freeze(e)}async flush(){if(this.pendingWrites.size===0)return;let e=[...this.pendingWrites];await Promise.allSettled(e)}};function YE(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0}var XE={airQualitySensor:Hy,alarmPanel:$f,ambientLightSensor:Wy,audioMetrics:Yy,automationControl:Zy,battery:$y,binary:tb,brightness:rb,cameraStreams:Uc,carbonMonoxide:lb,climateControl:fb,color:_b,connectivity:wb,consumables:Db,contact:kb,control:Nb,cover:Ib,dayNight:Hb,deviceDiscovery:Fl,deviceStatus:Wb,doorbell:qb,enumSensor:Xb,eventEmitter:$b,fanControl:ux,featureProbe:fx,flood:mx,gas:gx,humidifier:vx,humiditySensor:bx,image:Sx,imageSettings:jx,intercom:Wx,lawnMowerControl:Jx,lockControl:aS,mediaPlayer:uS,motion:_S,motionTrigger:bS,motionZones:TS,nativeObjectDetection:AS,notifier:rC,numericSensor:aC,petFeeder:TC,powerMeter:YC,presence:QC,pressureSensor:ew,privacyMask:ow,ptzAutotrack:vw,sceneMonitor:hT,scriptRunner:bT,smoke:ST,streamCatalog:TT,streamParams:MT,switch:RT,tamper:JT,temperatureSensor:XT,update:eE,vacuumControl:_E,valve:bE,vibration:SE,waterHeater:wE,weather:EE,zoneAnalytics:PE,zoneRules:IE,zones:Og},ZE=class{id;stableId;type;name;parentDeviceId;role;get online(){return this.runtimeState.getCapState(`device-status`)?.online??!1}set online(e){this.markOnline(e)}get state(){if(!this._stateProxyCache){let e={},t={get:(t,n)=>{let r=n;if(r in e)return e[r];let i=XE[r];if(!i)return;let a=this.sliceProxy(i);return e[r]=a,a}};this._stateProxyCache=new Proxy(e,t)}return this._stateProxyCache}_stateProxyCache;config;runtimeState;ctx;location;disabled;_sourceInfoCache=null;constructor(e,t,n){if(this.ctx=e,this.id=e.id,this.stableId=e.stableId,this.type=n.type,!e.deviceMeta)throw Error(`BaseDevice constructor: ctx.deviceMeta is required (id=${e.id} stableId=${e.stableId})`);this.name=e.deviceMeta.name,this.location=e.deviceMeta.location,this.disabled=e.deviceMeta.disabled,this.role=n.role,this.parentDeviceId=e.parentDeviceId;let r=e.persistedConfig??{};this.config=qE.fromSchema(t,t=>e.persistConfig(t),r,({droppedKeys:t,issues:n})=>{e.logger.warn(`Device config recovery: dropping invalid persisted fields`,{tags:{deviceId:e.id,stableId:e.stableId},meta:{droppedKeys:[...t],firstIssue:n[0]?.message??null}})});let i=null,a=async(t,n)=>{i||=e.fetchDevice(e.id),await(await i).deviceState.setCapSlice({capName:t,slice:n})},o=e.initialRuntimeState??{};this.runtimeState=JE.fromInitial(o,a),e.bindRuntimeState?.(this.runtimeState),e.registerNativeCap?.(Wb,{});let s={online:!0,lastChangedAt:Date.now()};this.runtimeState.setCapState(`device-status`,s),e.registerNativeCap?.(fx,{}),this.runtimeState.setCapState(`feature-probe`,{flags:{},deviceType:null,model:null,channelCount:null,lastProbedAt:0,lastFetchedAt:0})}deviceActions=new Map;registerDeviceAction(e,t,n){this.deviceActions.set(e,{spec:t,handler:n})}async runDeviceAction(e,t){let n=this.deviceActions.get(e);if(!n)throw Error(`unknown device action "${e}" on device ${this.id}`);let r=n.spec.input.parse(t);return n.handler(r)}async removeDevice(){}markOnline(e){if(this.online===e)return;let t={online:e,lastChangedAt:Date.now()};this.runtimeState.setCapState(`device-status`,t)}get sourceInfo(){if(this._sourceInfoCache)return this._sourceInfoCache;let e=jl(this.ctx.deviceMeta.metadata)??Dl({stableId:this.stableId,addonId:this.ctx.deviceMeta.addonId});return this._sourceInfoCache=Object.freeze({...e}),this._sourceInfoCache}get sourceId(){return this.sourceInfo.id}async updateSourceInfo(e){let t=Ol(this.sourceInfo,e);this._sourceInfoCache=Object.freeze({...t});let n=this.ctx.api?.deviceManager?.setMetadata;if(n)try{await n.mutate({deviceId:this.id,patch:{[Al]:t}})}catch{}this.ctx.eventBus.emit(De(`device.source-info-changed`,{type:`device`,id:this.stableId},{deviceId:this.id,sourceInfo:t}))}async refreshFeatures(){let 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(e){return this.runtimeState.getCapState(e.name)??null}setCapSlice(e,t){this.runtimeState.setCapState(e.name,t)}sliceProxy(e){return new Proxy({},{get:(t,n)=>this.runtimeState.getCapState(e.name)?.[n],set:(t,n,r)=>(this.runtimeState.patchCapState(e.name,{[n]:r}),!0),has:(t,n)=>{let r=this.runtimeState.getCapState(e.name);return r?n in r:!1},ownKeys:()=>{let t=this.runtimeState.getCapState(e.name);return t?Object.keys(t):[]},getOwnPropertyDescriptor:(t,n)=>{let r=this.runtimeState.getCapState(e.name);if(!(!r||!(n in r)))return{configurable:!0,enumerable:!0,value:r[n]}}})}getSettingsUISchema(){return{sections:[]}}async applySettingsPatch(e){await this.config.setAll(e)}async onProbe(){let e=this.runtimeState.getCapState(`feature-probe`)??{flags:{},deviceType:null,model:null,channelCount:null,lastProbedAt:0,lastFetchedAt:0};this.runtimeState.setCapState(`feature-probe`,{...e,lastProbedAt:Date.now()})}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 QE(e,t){let n={};for(let t of e.config.entries())n[t.key]=t.value;return{id:e.id,stableId:e.stableId,addonId:t,type:String(e.type),name:e.name,parentDeviceId:e.parentDeviceId,online:e.online,features:[...e.features],config:n,sourceInfo:e.sourceInfo}}var $E=class extends Fe{async onInitialize(){return this.ctx.logger.info(`${this.providerName} Provider initialized`),[{capability:uu,provider:this}]}async onShutdown(){let e=await this.ctx.kernel.devices?.getAll()??[];for(let t of e)try{await this.ctx.kernel.devices?.decommission(t.id)}catch(e){this.ctx.logger.warn(`${this.providerName}: decommission failed`,{tags:{deviceId:t.id,stableId:t.stableId},meta:{error:e instanceof Error?e.message:String(e)}})}this.ctx.logger.info(`${this.providerName} Provider shut down`,{meta:{decommissionedCount:e.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(e){return[]}async getDiscoveryParamsSchema(){return null}async getManualCreationType(){return await this.supportsManualCreation()?{deviceType:Object.values(D).find(e=>this.deviceClasses[e]!==void 0)??null}:{deviceType:null}}async adoptDiscoveredDevice(e){throw Error(`${this.providerName} provider does not support discovery-based adoption`)}async supportsManualCreation(){return!0}async getChildCreationSchema(e){return this.onGetCreationSchema(e.type)}async createDevice(e){let t=await this.onCreateDevice(e.type,e.config),n=this.deviceClasses[t.meta.type];if(!n)throw Error(`${this.providerName} provider: no device class registered for type "${t.meta.type}" — add it to the deviceClasses map`);let r=this.generateStableId(t.meta.type,t.config),i=await this.ctx.kernel.devices.create(r,n,t.config,null,t.meta);if(t.onAfterCreate)try{await t.onAfterCreate(i)}catch(e){this.ctx.logger.warn(`createDevice: onAfterCreate hook threw — device is already registered`,{tags:{deviceId:i.id,stableId:r},meta:{error:e instanceof Error?e.message:String(e)}})}return this.toSummary(i)}generateStableId(e,t){return`${this.addonId}-${Date.now()}`}async testCreationField(e){return{status:`ok`,labels:[`probe not implemented`]}}async restoreDevices(e){await this.onRestoreDevices(e),e.length>0&&this.ctx.logger.info(`Restored ${e.length} ${this.providerName} device(s)`)}async onRestoreDevices(e){let t=new Set,n=e.filter(e=>e.parentDeviceId===null),r=async e=>{let n=this.deviceClasses[e.type];if(!n){this.ctx.logger.warn(`No device class registered for restored type — skipping`,{tags:{stableId:e.stableId},meta:{type:e.type}});return}try{await this.ctx.kernel.devices.create(e.stableId,n,{}),t.add(e.id)}catch(t){this.ctx.logger.warn(`Failed to restore device`,{tags:{stableId:e.stableId},meta:{type:e.type,error:t instanceof Error?t.message:String(t)}})}};await Promise.all(n.map(e=>r(e)));let i=e.filter(e=>e.parentDeviceId!==null);for(let e of i){let n=this.deviceClasses[e.type];if(n&&e.parentDeviceId!==null&&t.has(e.parentDeviceId))try{await this.ctx.kernel.devices.create(e.stableId,n,{},e.parentDeviceId),t.add(e.id)}catch(t){this.ctx.logger.warn(`Failed to restore hub-adopted child`,{tags:{stableId:e.stableId,parentDeviceId:e.parentDeviceId},meta:{type:e.type,error:t instanceof Error?t.message:String(t)}})}}}toSummary(e){return QE(e,this.addonId)}},eD=`fixed`;function tD(e){let t=e??`hub`;return t.includes(`/`)?t.split(`/`)[0]??`hub`:t}var nD=32,rD=class{ports;constructor(e){let t=e.addonId;if(typeof t!=`string`||t.length===0)throw Error(`DeclaredDevices: addonId must be the declaring addon's id, got ${JSON.stringify(t)}. On an addon context it is \`ctx.id\` — there is no \`ctx.addonId\`.`);this.ports=e}async reconcile(e){if((e.placement??`hub`)===`hub`){let e=tD(this.ports.localNodeId);if(e!==`hub`)return this.ports.logger.info(`declared devices are hub-owned — skipping on this node`,{meta:{nodeId:e,rawNodeId:this.ports.localNodeId??null}}),{integrationId:null,devices:[],removed:[],owned:!1}}let t=e.integrationId??await this.ensureIntegration(e.integrationName),n=await this.readIndex(),r=await this.readLiveByStableId(),i=[];for(let a of e.devices){let e=await this.applyDeclaration(a,t,n,r);e!==null&&i.push(e)}return{integrationId:t,devices:i,removed:await this.sweepWithdrawn(e.devices,t,n),owned:!0}}async ensureIntegration(e){let t=await this.ports.getIntegration(this.ports.addonId);if(t===null){let t=await this.ports.createIntegration({addonId:this.ports.addonId,name:e,info:{[eD]:!0}});return this.ports.logger.info(`declared a fixed integration`,{meta:{integrationId:t.id,name:e}}),t.id}return t.info?.fixed!==!0&&(await this.ports.updateIntegration({id:t.id,info:{[eD]:!0}}),this.ports.logger.info("re-asserted `fixed` on a declared integration",{meta:{integrationId:t.id}})),t.id}async readIndex(){let e=await this.ports.listOwnDevices();return new Map(e.map(e=>[e.stableId,e]))}async readLiveByStableId(){try{let e=await this.ports.devices.getAll();return new Map(e.map(e=>[e.stableId,e]))}catch(e){return this.ports.logger.warn(`could not read live devices — falling back to adopt-by-row`,{meta:{error:e instanceof Error?e.message:String(e)}}),new Map}}async applyDeclaration(e,t,n,r){try{let i=r.get(e.stableId);if(i!==void 0)return{stableId:e.stableId,deviceId:i.id,device:i,created:!1};let a=n.get(e.stableId);if(a===void 0&&(a=(await this.readIndex()).get(e.stableId),a!==void 0&&this.ports.logger.warn(`device index disagreed with itself — adopting instead of re-creating`,{tags:{deviceId:a.id},meta:{stableId:e.stableId,addonId:this.ports.addonId}})),a!==void 0){let n=await this.ports.devices.create(e.stableId,e.DeviceClass,{},null,void 0);return this.ports.logger.info(`declared device adopted`,{tags:{deviceId:n.id},meta:{stableId:e.stableId,integrationId:t}}),{stableId:e.stableId,deviceId:n.id,device:n,created:!1}}let o=await this.ports.devices.create(e.stableId,e.DeviceClass,e.config??{},null,{type:e.type,name:e.name,integrationId:t,...e.role===void 0?{}:{role:e.role}});return this.ports.logger.info(`declared device created`,{tags:{deviceId:o.id},meta:{stableId:e.stableId,integrationId:t}}),{stableId:e.stableId,deviceId:o.id,device:o,created:!0}}catch(t){return this.ports.logger.warn(`a declared device could not be brought up`,{meta:{stableId:e.stableId,error:t instanceof Error?t.message:String(t)}}),null}}async sweepWithdrawn(e,t,n){let r=new Set(e.map(e=>e.stableId)),i=[...n.values()].filter(e=>e.integrationId===t&&!r.has(e.stableId));if(i.length===0)return[];if(i.length>32)return this.ports.logger.warn(`withdrawal sweep exceeded its bound — removing nothing`,{meta:{integrationId:t,candidates:i.length,bound:32}}),[];let a=[];for(let e of i)try{await this.ports.devices.remove(e.id),a.push(e.id),this.ports.logger.info(`declared device removed — its declaration was withdrawn`,{tags:{deviceId:e.id},meta:{stableId:e.stableId,integrationId:t}})}catch(t){this.ports.logger.warn(`a withdrawn declared device could not be removed`,{tags:{deviceId:e.id},meta:{stableId:e.stableId,error:t instanceof Error?t.message:String(t)}})}return a}},iD={[D.Cover]:`cover`,[D.Valve]:`valve`,[D.Humidifier]:`humidifier`,[D.WaterHeater]:`water-heater`,[D.Camera]:`dummy`,[D.Hub]:`dummy`,[D.Switch]:`switch`,[D.Siren]:`switch`,[D.Light]:`light`,[D.Fan]:`fan`,[D.Sensor]:`sensor`,[D.Thermostat]:`thermostat`,[D.Climate]:`climate`,[D.Button]:`button`,[D.EventEmitter]:`dummy`,[D.Update]:`update`,[D.Generic]:`dummy`,[D.Notifier]:`dummy`,[D.Script]:`script`,[D.Automation]:`automation`,[D.Lock]:`lock`,[D.MediaPlayer]:`media-player`,[D.AlarmPanel]:`alarm`,[D.Control]:`control`,[D.Presence]:`sensor`,[D.Weather]:`weather`,[D.Vacuum]:`vacuum`,[D.LawnMower]:`lawn-mower`,[D.Container]:`dummy`,[D.Image]:`image`,[D.PetFeeder]:`pet-feeder`},aD=new Set(Object.values(D));function oD(e){return aD.has(e)?iD[e]:null}var sD=`motion-trigger`;function cD(e){return e.includes(sD)}var lD=[`temperature-sensor`,`humidity-sensor`,`ambient-light-sensor`,`numeric-sensor`,`enum-sensor`];function uD(e){let t=new Set(e.features);switch(e.type){case D.Cover:return{kind:`cover`};case D.Valve:return{kind:`valve`};case D.Lock:return{kind:`lock`};case D.AlarmPanel:return{kind:`alarm`};case D.Light:return t.has(`brightness`)?{kind:`brightness`}:{kind:`switch`};case D.Switch:case D.Siren:return{kind:`switch`};case D.Sensor:case D.Presence:{let e=lD.find(e=>t.has(e));return e?{kind:`sensor`,sensorFeature:e}:{kind:`none`}}default:return{kind:`none`}}}var dD={"temperature-sensor":{capKey:`temperatureSensor`,field:`celsius`,fallbackUnit:`°C`},"humidity-sensor":{capKey:`humiditySensor`,field:`percent`,fallbackUnit:`%`},"ambient-light-sensor":{capKey:`ambientLightSensor`,field:`lux`,fallbackUnit:`lx`},"numeric-sensor":{capKey:`numericSensor`,field:`value`}};function fD(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function pD(e,t){if(!fD(e))return null;let n=e[t];if(!fD(n))return null;let r=n.mutate;return typeof r==`function`?r:null}function mD(e,t){return!e||e.length===0?!1:e.includes(t.when.hasFeature)}var hD={id:`battery`,label:`Battery-operated camera`,when:{hasFeature:Mt.BatteryOperated},defaults:{audioMode:`disabled`,detectionMode:`on-motion`},settings:{}},gD=[hD];function _D(e){for(let t of gD)if(mD(e,t))return t;return null}var vD=360*6e4;function yD(e){let t=e.status;if(!t)return`sleeping`;if(t.sleeping!==!0)return`awake`;let n=t.lastContactAt;if(typeof n!=`number`||n<=0)return`sleeping`;let r=e.unreachableAfterMs??216e5;return e.nowMs-n>r?`unreachable`:`sleeping`}function bD(e){return e===`unreachable`}function xD(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function SD(e,t){let n=t.split(`.`),r=e;for(let e of n){if(!xD(r))return;r=r[e]}return r}function CD(e,t,n){let r=t.indexOf(`.`);if(r===-1)return{...e,[t]:n};let i=t.slice(0,r),a=t.slice(r+1),o=e[i],s=xD(o)?o:{};return{...e,[i]:CD(s,a,n)}}var wD=3e4,TD=3,ED=1e4;async function DD(e,t,n){let r,i=new Promise((e,i)=>{r=setTimeout(()=>i(Error(`${n} timed out after ${String(t)}ms`)),t)});try{return await Promise.race([e,i])}finally{r!==void 0&&clearTimeout(r)}}function OD(e){let t=e.intervalMs??3e4,n=e.failuresToOffline??3,r=e.probeTimeoutMs??1e4,i=e.runImmediately??!0,a=!1,o=!1,s=0,c,l=async()=>{if(!a&&!o&&!(e.isEnabled&&!e.isEnabled())){o=!0;try{let t=await DD(Promise.resolve().then(e.probe),r,`reachability probe`);if(a)return;t?(s=0,e.setOnline(!0)):u(`probe resolved unreachable`)}catch(e){if(a)return;u(e instanceof Error?e.message:`probe threw`)}finally{o=!1}}},u=t=>{s+=1,e.logger?.debug(`reachability probe failed`,{reason:t,consecutiveFailures:s,failuresToOffline:n}),s>=n&&e.setOnline(!1)};return c=setInterval(()=>{l()},t),typeof c==`object`&&c&&`unref`in c&&c.unref(),i&&l(),{stop:()=>{a||(a=!0,c!==void 0&&clearInterval(c),c=void 0)}}}var kD=`lastFetchedAt`;function AD(e){let{runtimeState:t,cap:n,ownDeviceId:r,refresh:i,staleMs:a,empty:o,logger:s}=e,c=e.refreshMissCooldownMs??6e4,l=0,u=()=>{let e=t.getCapState(n.name)?.[kD];return typeof e==`number`?e:0},d=e=>{l=Date.now()+c,s?.warn(`${n.name}: refresh did not land — serving the last slice and not re-reading the camera for ${String(c)}ms`,{tags:{deviceId:r},meta:{cooldownMs:c,error:e===void 0?null:e instanceof Error?e.message:String(e)}})},f=async()=>{let e=t.getCapState(n.name),o=u();if(e&&Date.now()-o<=a){l=0;return}if(!(Date.now()<l)){try{await i()}catch(e){throw d(e),e}if(u()>o){l!==0&&(l=0,s?.info(`${n.name}: refresh landed again — resuming normal polling`,{tags:{deviceId:r}}));return}d(void 0)}},p=()=>{let e=t.getCapState(n.name);if(!e)return o();let{[kD]:r,...i}=e;return i};return{ensureFresh:f,getStatus:async({deviceId:e})=>{if(e!==r)throw Error(`${n.name}: deviceId mismatch, expected ${r}, got ${e}`);return await f(),p()}}}function jD(e){let t=e;for(;t instanceof fe||t instanceof me||t instanceof ee;)t=t.unwrap();return t}function MD(e){let t=jD(e);return t instanceof ue?{kind:`enum`,enumValues:t.options}:t instanceof ne?{kind:`number`}:t instanceof re?{kind:`string`}:t instanceof ae?{kind:`boolean`}:null}function ND(e,t=``){let n=jD(e);if(!(n instanceof se))return[];let r=[],i=n.shape;for(let[e,n]of Object.entries(i)){let i=t?`${t}.${e}`:e,a=jD(n);if(a instanceof se){r.push(...ND(a,i));continue}let o=MD(n);o&&r.push({path:i,kind:o.kind,...o.enumValues?{enumValues:o.enumValues}:{}})}return r}function PD(e){return ND(e.itemSchema).filter(t=>t.path!==e.keyField).map(e=>({...e,item:!0}))}var FD=`device.state-changed`,ID=`capability.binding-changed`,LD=`device.registered`,RD=`device.unregistered`,zD=`device.updated`,BD=class{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;constructor(e){this.api=e,this.stateSource=Ut(this.stateMirror,this.handleListeners,this.api)}async init(e=15e3){if(!this.initialized){if(this.initPromise)return this.initPromise;this.initPromise=(async()=>{let t=(t,n)=>Number.isFinite(e)?new Promise((r,i)=>{let a=setTimeout(()=>i(Error(`SystemMirror.init: '${n}' timed out after ${e}ms`)),e);t.then(e=>{clearTimeout(a),r(e)},e=>{clearTimeout(a),i(e)})}):t,[n,r,i]=await Promise.all([t(this.api.deviceManager.getAllBindings.query({}),`deviceManager.getAllBindings`),t(this.api.deviceState.getAllSnapshots.query({}),`deviceState.getAllSnapshots`),t(this.api.deviceManager.listAll.query({}),`deviceManager.listAll`)]);for(let e of n)this.bindings.set(e.deviceId,e);for(let[e,t]of Object.entries(r)){let n=Number(e);if(!Number.isFinite(n))continue;let r=new Map;for(let[e,n]of Object.entries(t))r.set(e,n);this.stateMirror.set(n,r)}for(let e of i)this.devices.set(e.id,e);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(let e of this.bridges)try{e.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(e){let t=this.bindings.get(e);return t?Gt(this.api,t,{stateSource:this.stateSource}):null}getDeviceByName(e){for(let t of this.devices.values())if(t.name===e)return this.getDeviceById(t.id);return null}getDeviceByStableId(e){for(let t of this.devices.values())if(t.stableId===e)return this.getDeviceById(t.id);return null}getDevicesByAddon(e){return this.query({addonId:e})}getDevicesByType(e){return this.query({type:e})}getDeviceInfo(e){return this.devices.get(e)??null}getAllDevices(){let e=[];for(let t of this.bindings.keys()){let n=this.getDeviceById(t);n&&e.push(n)}return e}filterByCap(e){return this.query({caps:e})}query(e={}){let t=[];for(let[n,r]of this.bindings){let i=this.devices.get(n);if(e.id!==void 0&&!VD(n,e.id)||e.stableId!==void 0&&(!i||!VD(i.stableId,e.stableId))||e.addonId!==void 0&&(!i||!VD(i.addonId,e.addonId))||e.type!==void 0&&(!i||!VD(i.type,e.type)))continue;if(e.caps!==void 0){let t=HD(e.caps),n=new Set(r.entries.map(e=>e.capName));if(!t.every(e=>n.has(e)))continue}if(e.anyCap!==void 0){let t=HD(e.anyCap),n=new Set(r.entries.map(e=>e.capName));if(!t.some(e=>n.has(e)))continue}if(e.name!==void 0&&(!i||!UD(i.name,e.name))||e.online!==void 0&&(!i||i.online!==e.online))continue;if(e.parentDeviceId!==void 0){if(!i)continue;let t=e.parentDeviceId;if((i.parentDeviceId??null)!==t)continue}if(e.feature!==void 0&&(!i||!HD(e.feature).every(e=>i.features.includes(e)))||e.isCamera!==void 0&&(!i||i.isCamera!==e.isCamera))continue;let a=this.getDeviceById(n);if(a){if(e.where&&i){if(!e.where(i,a))continue}else if(e.where&&!i)continue;t.push(a)}}return t}whereState(e,t){let n=[];for(let[r,i]of this.stateMirror){let a=i.get(e);if(!a||!t(a,r))continue;let o=this.getDeviceById(r);o&&n.push(o)}return n}mapState(e,t){let n=[];for(let[r,i]of this.stateMirror){let a=i.get(e);a&&n.push(t(a,r))}return n}findState(e,t){for(let[n,r]of this.stateMirror){let i=r.get(e);if(i&&t(i,n))return this.getDeviceById(n)}return null}countByCap(e){let t=0;for(let n of this.bindings.values())n.entries.some(t=>t.capName===e)&&t++;return t}countByState(e,t){let n=0;for(let[r,i]of this.stateMirror){let a=i.get(e);a&&t(a,r)&&n++}return n}listen(e){return this.globalStateListeners.add(e),()=>{this.globalStateListeners.delete(e)}}listenCap(e,t){let n=this.capListeners.get(e);return n||(n=new Set,this.capListeners.set(e,n)),n.add(t),()=>{n.delete(t),n.size===0&&this.capListeners.delete(e)}}listenDevice(e,t){let n=this.deviceListeners.get(e);return n||(n=new Set,this.deviceListeners.set(e,n)),n.add(t),()=>{n.delete(t),n.size===0&&this.deviceListeners.delete(e)}}onDeviceAdded(e){return this.addedListeners.add(e),()=>{this.addedListeners.delete(e)}}onDeviceRemoved(e){return this.removedListeners.add(e),()=>{this.removedListeners.delete(e)}}waitForState(e,t,n,r=3e4){return new Promise((i,a)=>{let o=(()=>{let r=this.stateMirror.get(e)?.get(t);return r&&n(r)?r:null})();if(o){i(o);return}let s=null,c=this.listenDevice(e,(e,r,a)=>{r===t&&a&&n(a)&&(s&&clearTimeout(s),c(),i(a))});Number.isFinite(r)&&(s=setTimeout(()=>{c(),a(Error(`waitForState timed out after ${r}ms (deviceId=${e}, capName=${t})`))},r))})}waitForDevice(e,t=3e4){return new Promise((n,r)=>{let i=this.getDeviceById(e);if(i){n(i);return}let a=null,o=this.onDeviceAdded(t=>{if(t!==e)return;let r=this.getDeviceById(t);r&&(a&&clearTimeout(a),o(),n(r))});Number.isFinite(t)&&(a=setTimeout(()=>{o(),r(Error(`waitForDevice timed out after ${t}ms (deviceId=${e})`))},t))})}async forEachCap(e,t){for(let n of this.filterByCap(e))await t(n)}async invokeCap(e,t,n,r={}){let i=this.filterByCap(e),a=Math.max(1,r.parallelism??i.length),o=[];for(let r=0;r<i.length;r+=a){let s=i.slice(r,r+a),c=await Promise.allSettled(s.map(async r=>{let i=r[e];if(!i||typeof i[t]!=`function`)throw Error(`device '${r.deviceId}' does not expose '${e}.${t}'`);return await i[t](n)}));for(let e=0;e<c.length;e++){let t=s[e],n=c[e];n.status===`fulfilled`?o.push({deviceId:t.deviceId,ok:!0,result:n.value}):o.push({deviceId:t.deviceId,ok:!1,error:n.reason})}}return o}summary(){let e={},t={},n={},r=0,i=0;for(let t of this.bindings.values())for(let n of t.entries)e[n.capName]=(e[n.capName]??0)+1;for(let e of this.devices.values())t[e.addonId]=(t[e.addonId]??0)+1,n[e.type]=(n[e.type]??0)+1,e.online?r++:i++;return{totalDevices:this.bindings.size,online:r,offline:i,byCap:e,byAddon:t,byType:n,statedDevices:this.stateMirror.size}}dump(e){let t=e=>{let t=this.devices.get(e)??null,n=this.bindings.get(e)??null,r={},i=this.stateMirror.get(e);if(i)for(let[e,t]of i)r[e]={...t};return{deviceId:e,info:t,binding:n?{...n,entries:n.entries.map(e=>({...e}))}:null,state:r}};if(e!==void 0)return t(e);let n=[];for(let e of this.bindings.keys())n.push(t(e));return n}getRawMirror(){return this.stateMirror}getSystemState(){let e=new Map;for(let[t,n]of this.stateMirror){let r=new Map;for(let[e,t]of n)r.set(e,{...t});e.set(t,r)}return e}subscribeBus(){if(!this.api.live?.onEvent)return;let e=this.api.live.onEvent;this.bridges.push(e.subscribe({category:FD},{onData:e=>{let t=e.data;!t||typeof t.deviceId!=`number`||typeof t.capName!=`string`||this.applyStateUpdate(t.deviceId,t.capName,t.slice)}})),this.bridges.push(e.subscribe({category:ID},{onData:e=>{let t=e.data,n=typeof t?.deviceId==`number`?t.deviceId:t?.source?.type===`device`&&typeof t.source.id==`number`?t.source.id:null;n!==null&&this.refreshBinding(n)}})),this.bridges.push(e.subscribe({category:LD},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.refreshDeviceMetadata(t.deviceId,`added`)}})),this.bridges.push(e.subscribe({category:RD},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.applyDeviceRemoval(t.deviceId)}})),this.bridges.push(e.subscribe({category:zD},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.refreshDeviceMetadata(t.deviceId,`updated`)}}))}applyStateUpdate(e,t,n){let r=this.stateMirror.get(e);r||(r=new Map,this.stateMirror.set(e,r)),n===void 0?r.delete(t):r.set(t,n);let i=`${e}:${t}`,a=this.handleListeners.get(i);if(a)for(let e of a)try{e(n)}catch{}for(let r of this.globalStateListeners)try{r(e,t,n)}catch{}let o=this.capListeners.get(t);if(o)for(let t of o)try{t(e,n)}catch{}let s=this.deviceListeners.get(e);if(s)for(let r of s)try{r(e,t,n)}catch{}}applyDeviceRemoval(e){let t=this.devices.get(e)??null;this.bindings.delete(e),this.devices.delete(e),this.stateMirror.delete(e);for(let n of this.removedListeners)try{n(e,t)}catch{}}async refreshBinding(e){try{let t=await this.api.deviceManager.getBindings.query({deviceId:e});if(t.entries.length>0){this.bindings.set(e,t);return}if(await this.api.deviceManager.getDevice.query({deviceId:e})===null){this.applyDeviceRemoval(e);return}this.bindings.set(e,t)}catch{}}async refreshDeviceMetadata(e,t){try{let n=await this.api.deviceManager.getDevice.query({deviceId:e});if(!n)return;let r=!this.devices.has(e);if(this.devices.set(e,n),t===`added`&&r){await this.refreshBinding(e);for(let t of this.addedListeners)try{t(e,n)}catch{}}}catch{}}};function VD(e,t){return Array.isArray(t)?t.includes(e):e===t}function HD(e){return Array.isArray(e)?e:[e]}function UD(e,t){return typeof t==`string`?e===t:t instanceof RegExp?t.test(e):`exact`in t?e===t.exact:`contains`in t?e.toLowerCase().includes(t.contains.toLowerCase()):!1}function WD(e){return e.def}function GD(e){return e}function KD(e,t=`Configuration`,n=`main`){return{sections:[{id:n,title:t,fields:e.map(e=>qD(e.key,e.schema,e.description))}]}}function qD(e,t,n){let r=QD(t),i=$D(t),a={key:e,label:n??eO(e),description:n,default:i};return r instanceof re?JD(e,a):r instanceof ne?YD(r,a):r instanceof ae?{...a,type:`boolean`}:r instanceof ue?ZD(r,a):r instanceof de||r instanceof se?{...a,type:`textarea`,rows:6,isJson:!0}:{...a,type:`text`}}function JD(e,t){let n=e.toLowerCase();return n.includes(`password`)||n.includes(`secret`)||n.includes(`token`)||n.includes(`apikey`)||n.includes(`api_key`)?{...t,type:`password`,showToggle:!0}:{...t,type:`text`}}function YD(e,t){let n=GD(e),r=n.minValue,i=n.maxValue,a=r!=null&&isFinite(r)?r:void 0,o=i!=null&&isFinite(i)?i:void 0,s=XD(e);return{...t,type:`number`,...a===void 0?{}:{min:a},...o===void 0?{}:{max:o},...s===void 0?{}:{step:s}}}function XD(e){let t=WD(e).checks??[];for(let e of t)if(e._zod?.def?.check===`multiple_of`&&e._zod.def.value!==void 0)return e._zod.def.value}function ZD(e,t){let n=e.options.map(e=>String(e));return{...t,type:`select`,options:n.map(e=>({label:eO(e),value:e}))}}function QD(e){return e instanceof ee||e instanceof me||e instanceof fe?QD(WD(e).innerType):e}function $D(e){if(e instanceof ee)return WD(e).defaultValue}function eO(e){return e.replace(/([A-Z])/g,` $1`).replace(/[_-]/g,` `).replace(/^\w/,e=>e.toUpperCase()).trim()}var tO=`accessories.air-quality-sensor.alarm-panel.ambient-light-sensor.automation-control.battery.binary.brightness.broker.camera-credentials.carbon-monoxide.climate-control.color.connectivity.consumables.contact.control.cover.day-night.device-adoption.device-discovery.device-export.device-status.doorbell.enum-sensor.event-emitter.fan-control.feature-probe.flood.gas.humidifier.humidity-sensor.image.image-settings.intercom.lawn-mower-control.lock-control.media-player.motion.motion-trigger.motion-zones.mqtt-broker.native-object-detection.notifier.numeric-sensor.osd.pet-feeder.power-meter.presence.pressure-sensor.privacy-mask.ptz.ptz-autotrack.recording.scene-monitor.script-runner.smoke.snapshot.stream-params.switch.tamper.temperature-sensor.update.vacuum-control.valve.vibration.water-heater.weather`.split(`.`),nO={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`,airQualitySensor:`air-quality-sensor`,alarmPanel:`alarm-panel`,alerts:`alerts`,ambientLightSensor:`ambient-light-sensor`,audioAnalysis:`audio-analysis`,audioAnalyzer:`audio-analyzer`,audioCodec:`audio-codec`,audioMetrics:`audio-metrics`,authProvider:`auth-provider`,automationControl:`automation-control`,backup:`backup`,battery:`battery`,binary:`binary`,brightness:`brightness`,broker:`broker`,button:`button`,cameraCredentials:`camera-credentials`,cameraPipelineConfig:`camera-pipeline-config`,cameraStreams:`camera-streams`,carbonMonoxide:`carbon-monoxide`,climateControl:`climate-control`,color:`color`,connectionTest:`connection-test`,connectivity:`connectivity`,consumables:`consumables`,contact:`contact`,control:`control`,coreBlocks:`core-blocks`,cover:`cover`,customModelRegistry:`custom-model-registry`,dataStoreProvider:`data-store-provider`,dayNight:`day-night`,decoder:`decoder`,detectionPipeline:`detection-pipeline`,deviceAdoption:`device-adoption`,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`,enumSensor:`enum-sensor`,eventEmitter:`event-emitter`,events:`events`,faceGallery:`face-gallery`,fanControl:`fan-control`,featureProbe:`feature-probe`,filesystemBrowse:`filesystem-browse`,flood:`flood`,gas:`gas`,humidifier:`humidifier`,humiditySensor:`humidity-sensor`,image:`image`,imageSettings:`image-settings`,integrations:`integrations`,intercom:`intercom`,lawnMowerControl:`lawn-mower-control`,llm:`llm`,llmRuntime:`llm-runtime`,localNetwork:`local-network`,lockControl:`lock-control`,logDestination:`log-destination`,loginMethod:`login-method`,mediaPlayer:`media-player`,meshNetwork:`mesh-network`,metricsProvider:`metrics-provider`,modelConvert:`model-convert`,modelDistributor:`model-distributor`,motion:`motion`,motionDetection:`motion-detection`,motionTrigger:`motion-trigger`,motionZones:`motion-zones`,mqttBroker:`mqtt-broker`,nativeObjectDetection:`native-object-detection`,networkAccess:`network-access`,networkQuality:`network-quality`,nodes:`nodes`,notificationOutput:`notification-output`,notificationRules:`notification-rules`,notifier:`notifier`,numericSensor:`numeric-sensor`,oauthIntegration:`oauth-integration`,osd:`osd`,osdManager:`osd-manager`,petFeeder:`pet-feeder`,pipelineAnalytics:`pipeline-analytics`,pipelineExecutor:`pipeline-executor`,pipelineOrchestrator:`pipeline-orchestrator`,pipelineRunner:`pipeline-runner`,plateGallery:`plate-gallery`,platformProbe:`platform-probe`,powerMeter:`power-meter`,presence:`presence`,pressureSensor:`pressure-sensor`,privacyMask:`privacy-mask`,ptz:`ptz`,ptzAutotrack:`ptz-autotrack`,reboot:`reboot`,recording:`recording`,recordingExport:`recording-export`,sceneMonitor:`scene-monitor`,scriptRunner:`script-runner`,serverManagement:`server-management`,settingsStore:`settings-store`,smoke:`smoke`,smtpProvider:`smtp-provider`,snapshot:`snapshot`,ssoBridge:`sso-bridge`,storage:`storage`,storageEvictable:`storage-evictable`,storageMigration:`storage-migration`,storageProvider:`storage-provider`,streamBroker:`stream-broker`,streamCatalog:`stream-catalog`,streamParams:`stream-params`,switch:`switch`,system:`system`,tamper:`tamper`,temperatureSensor:`temperature-sensor`,terminalSession:`terminal-session`,toast:`toast`,turnProvider:`turn-provider`,update:`update`,userManagement:`user-management`,userPasskeys:`user-passkeys`,vacuumControl:`vacuum-control`,valve:`valve`,vectorStore:`vector-store`,vibration:`vibration`,videoclips:`videoclips`,viewerUi:`viewer-ui`,waterHeater:`water-heater`,weather:`weather`,webrtcSession:`webrtc-session`,zoneAnalytics:`zone-analytics`,zoneRules:`zone-rules`,zones:`zones`},rO=[{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:`airQualitySensor`,name:`air-quality-sensor`},{key:`alarmPanel`,name:`alarm-panel`},{key:`alerts`,name:`alerts`},{key:`ambientLightSensor`,name:`ambient-light-sensor`},{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:`automationControl`,name:`automation-control`},{key:`backup`,name:`backup`},{key:`battery`,name:`battery`},{key:`binary`,name:`binary`},{key:`brightness`,name:`brightness`},{key:`broker`,name:`broker`},{key:`button`,name:`button`},{key:`cameraCredentials`,name:`camera-credentials`},{key:`cameraPipelineConfig`,name:`camera-pipeline-config`},{key:`cameraStreams`,name:`camera-streams`},{key:`carbonMonoxide`,name:`carbon-monoxide`},{key:`climateControl`,name:`climate-control`},{key:`color`,name:`color`},{key:`connectionTest`,name:`connection-test`},{key:`connectivity`,name:`connectivity`},{key:`consumables`,name:`consumables`},{key:`contact`,name:`contact`},{key:`control`,name:`control`},{key:`coreBlocks`,name:`core-blocks`},{key:`cover`,name:`cover`},{key:`customModelRegistry`,name:`custom-model-registry`},{key:`dataStoreProvider`,name:`data-store-provider`},{key:`dayNight`,name:`day-night`},{key:`decoder`,name:`decoder`},{key:`detectionPipeline`,name:`detection-pipeline`},{key:`deviceAdoption`,name:`device-adoption`},{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:`enumSensor`,name:`enum-sensor`},{key:`eventEmitter`,name:`event-emitter`},{key:`events`,name:`events`},{key:`faceGallery`,name:`face-gallery`},{key:`fanControl`,name:`fan-control`},{key:`featureProbe`,name:`feature-probe`},{key:`filesystemBrowse`,name:`filesystem-browse`},{key:`flood`,name:`flood`},{key:`gas`,name:`gas`},{key:`humidifier`,name:`humidifier`},{key:`humiditySensor`,name:`humidity-sensor`},{key:`image`,name:`image`},{key:`imageSettings`,name:`image-settings`},{key:`integrations`,name:`integrations`},{key:`intercom`,name:`intercom`},{key:`lawnMowerControl`,name:`lawn-mower-control`},{key:`llm`,name:`llm`},{key:`llmRuntime`,name:`llm-runtime`},{key:`localNetwork`,name:`local-network`},{key:`lockControl`,name:`lock-control`},{key:`logDestination`,name:`log-destination`},{key:`loginMethod`,name:`login-method`},{key:`mediaPlayer`,name:`media-player`},{key:`meshNetwork`,name:`mesh-network`},{key:`metricsProvider`,name:`metrics-provider`},{key:`modelConvert`,name:`model-convert`},{key:`modelDistributor`,name:`model-distributor`},{key:`motion`,name:`motion`},{key:`motionDetection`,name:`motion-detection`},{key:`motionTrigger`,name:`motion-trigger`},{key:`motionZones`,name:`motion-zones`},{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:`notificationRules`,name:`notification-rules`},{key:`notifier`,name:`notifier`},{key:`numericSensor`,name:`numeric-sensor`},{key:`oauthIntegration`,name:`oauth-integration`},{key:`osd`,name:`osd`},{key:`osdManager`,name:`osd-manager`},{key:`petFeeder`,name:`pet-feeder`},{key:`pipelineAnalytics`,name:`pipeline-analytics`},{key:`pipelineExecutor`,name:`pipeline-executor`},{key:`pipelineOrchestrator`,name:`pipeline-orchestrator`},{key:`pipelineRunner`,name:`pipeline-runner`},{key:`plateGallery`,name:`plate-gallery`},{key:`platformProbe`,name:`platform-probe`},{key:`powerMeter`,name:`power-meter`},{key:`presence`,name:`presence`},{key:`pressureSensor`,name:`pressure-sensor`},{key:`privacyMask`,name:`privacy-mask`},{key:`ptz`,name:`ptz`},{key:`ptzAutotrack`,name:`ptz-autotrack`},{key:`reboot`,name:`reboot`},{key:`recording`,name:`recording`},{key:`recordingExport`,name:`recording-export`},{key:`sceneMonitor`,name:`scene-monitor`},{key:`scriptRunner`,name:`script-runner`},{key:`serverManagement`,name:`server-management`},{key:`settingsStore`,name:`settings-store`},{key:`smoke`,name:`smoke`},{key:`smtpProvider`,name:`smtp-provider`},{key:`snapshot`,name:`snapshot`},{key:`ssoBridge`,name:`sso-bridge`},{key:`storage`,name:`storage`},{key:`storageEvictable`,name:`storage-evictable`},{key:`storageMigration`,name:`storage-migration`},{key:`storageProvider`,name:`storage-provider`},{key:`streamBroker`,name:`stream-broker`},{key:`streamCatalog`,name:`stream-catalog`},{key:`streamParams`,name:`stream-params`},{key:`switch`,name:`switch`},{key:`system`,name:`system`},{key:`tamper`,name:`tamper`},{key:`temperatureSensor`,name:`temperature-sensor`},{key:`terminalSession`,name:`terminal-session`},{key:`toast`,name:`toast`},{key:`turnProvider`,name:`turn-provider`},{key:`update`,name:`update`},{key:`userManagement`,name:`user-management`},{key:`userPasskeys`,name:`user-passkeys`},{key:`vacuumControl`,name:`vacuum-control`},{key:`valve`,name:`valve`},{key:`vectorStore`,name:`vector-store`},{key:`vibration`,name:`vibration`},{key:`videoclips`,name:`videoclips`},{key:`viewerUi`,name:`viewer-ui`},{key:`waterHeater`,name:`water-heater`},{key:`weather`,name:`weather`},{key:`webrtcSession`,name:`webrtc-session`},{key:`zoneAnalytics`,name:`zone-analytics`},{key:`zoneRules`,name:`zone-rules`},{key:`zones`,name:`zones`}],iO=[cy,qo,Yo,$o,is,ds,ls,By,jt,Hy,$f,gs,Wy,_s,ks,Ls,Yy,zs,Zy,qs,$y,tb,rb,mc,ib,sb,hc,Uc,lb,fb,_b,Sb,wb,Db,kb,Nb,cl,Ib,pl,bl,Hb,wl,Tl,Jl,Fl,ru,Eu,Bt,uu,Du,Wb,qb,Au,Xb,$b,tx,sx,ux,fx,Nu,mx,gx,vx,bx,Sx,jx,Bx,Wx,Jx,ud,Zu,nS,aS,pd,yd,uS,mS,Rd,Bd,Ud,_S,Kd,bS,TS,af,AS,lf,PS,XS,Tf,pm,rC,aC,Tm,dC,yC,TC,Wh,xg,M_,Zg,jC,qC,YC,QC,ew,ow,pw,vw,yw,Iw,Jw,hT,bT,J_,vl,ST,$_,nv,iv,ov,lv,uv,Sv,Rc,TT,MT,RT,KT,JT,XT,kv,QT,jv,eE,pE,Nv,_E,bE,Zv,SE,ny,It,wE,EE,oy,PE,IE,Og],aO=Object.freeze({"accessories.setChildHidden":{capName:`accessories`,capScope:`device`,addonId:null,access:`create`},"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.cancelJob":{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.getJob":{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.listJobs":{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.startJob":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.uninstallPackage":{capName:`addons`,capScope:`system`,addonId:null,access:`delete`},"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`},"alarmPanel.arm":{capName:`alarm-panel`,capScope:`device`,addonId:null,access:`create`},"alarmPanel.disarm":{capName:`alarm-panel`,capScope:`device`,addonId:null,access:`create`},"alarmPanel.trigger":{capName:`alarm-panel`,capScope:`device`,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`},"automationControl.disable":{capName:`automation-control`,capScope:`device`,addonId:null,access:`create`},"automationControl.enable":{capName:`automation-control`,capScope:`device`,addonId:null,access:`create`},"automationControl.trigger":{capName:`automation-control`,capScope:`device`,addonId:null,access:`create`},"backup.delete":{capName:`backup`,capScope:`system`,addonId:null,access:`delete`},"backup.deleteSchedule":{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.listSchedules":{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`},"backup.upsertSchedule":{capName:`backup`,capScope:`system`,addonId:null,access:`create`},"battery.wakeForStream":{capName:`battery`,capScope:`device`,addonId:null,access:`create`},"brightness.setBrightness":{capName:`brightness`,capScope:`device`,addonId:null,access:`create`},"broker.add":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.get":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.getBrokerConfig":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.getSettings":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.getSettingsSchema":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.getState":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.getStatus":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.list":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.listProviders":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.publish":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.remove":{capName:`broker`,capScope:`system`,addonId:null,access:`delete`},"broker.setSettings":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.subscribe":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.testConnection":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.testSettings":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.unsubscribe":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"button.press":{capName:`button`,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.getProfileRtspEntries":{capName:`camera-streams`,capScope:`device`,addonId:null,access:`view`},"cameraStreams.getRtspEntries":{capName:`camera-streams`,capScope:`device`,addonId:null,access:`view`},"cameraStreams.pickStream":{capName:`camera-streams`,capScope:`device`,addonId:null,access:`view`},"climateControl.setFanMode":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setMode":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setPreset":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setSwingHorizontal":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setSwingVertical":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setTarget":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setTargetHumidity":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setTargetRange":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"color.setColor":{capName:`color`,capScope:`device`,addonId:null,access:`create`},"connectionTest.describeTest":{capName:`connection-test`,capScope:`system`,addonId:null,access:`view`},"connectionTest.testSettings":{capName:`connection-test`,capScope:`system`,addonId:null,access:`create`},"consumables.reset":{capName:`consumables`,capScope:`device`,addonId:null,access:`delete`},"control.setValue":{capName:`control`,capScope:`device`,addonId:null,access:`create`},"coreBlocks.compile":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"coreBlocks.create":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"coreBlocks.delete":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`delete`},"coreBlocks.get":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`},"coreBlocks.getTypeDefs":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`},"coreBlocks.list":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`},"coreBlocks.restart":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"coreBlocks.setEnabled":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"coreBlocks.update":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"cover.close":{capName:`cover`,capScope:`device`,addonId:null,access:`create`},"cover.open":{capName:`cover`,capScope:`device`,addonId:null,access:`create`},"cover.setPosition":{capName:`cover`,capScope:`device`,addonId:null,access:`create`},"cover.setTiltPosition":{capName:`cover`,capScope:`device`,addonId:null,access:`create`},"cover.stop":{capName:`cover`,capScope:`device`,addonId:null,access:`create`},"customModelRegistry.listModels":{capName:`custom-model-registry`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.count":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.declareCollection":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dataStoreProvider.delete":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`delete`},"dataStoreProvider.deleteWhere":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`delete`},"dataStoreProvider.get":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.getEngineInfo":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.histogram":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.insert":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dataStoreProvider.isEmpty":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.query":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.set":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dataStoreProvider.update":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dataStoreProvider.updateWhere":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dayNight.getOptions":{capName:`day-night`,capScope:`device`,addonId:null,access:`view`},"dayNight.setSettings":{capName:`day-night`,capScope:`device`,addonId:null,access:`create`},"decoder.createSession":{capName:`decoder`,capScope:`system`,addonId:null,access:`view`},"decoder.destroySession":{capName:`decoder`,capScope:`system`,addonId:null,access:`delete`},"decoder.getFrame":{capName:`decoder`,capScope:`system`,addonId:null,access:`view`},"decoder.getInfo":{capName:`decoder`,capScope:`system`,addonId:null,access:`view`},"decoder.getShmStats":{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.pullHandles":{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`},"deviceAdoption.adopt":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`create`},"deviceAdoption.getCandidate":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`view`},"deviceAdoption.listCandidateFilters":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`view`},"deviceAdoption.listCandidates":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`view`},"deviceAdoption.refresh":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`create`},"deviceAdoption.release":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`create`},"deviceAdoption.resync":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`create`},"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.adoptionAdopt":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionCancelJob":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionListCandidateFilters":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.adoptionListCandidates":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.adoptionListJobs":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.adoptionRefresh":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionRelease":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionResync":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionStartJob":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.allocateDeviceId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.applyInitialMeta":{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.discoverAllProviders":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoverDevices":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoverProvider":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoveryProviders":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"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.getDeviceStatusAggregateBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getLinkedDevices":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getRoleDisplayDefaults":{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.getWireableFields":{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.providerCreationType":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.providerDiscoveryParamsSchema":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.registerDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.remove":{capName:`device-manager`,capScope:`system`,addonId:null,access:`delete`},"deviceManager.removeByIntegration":{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.runDeviceAction":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setChildLayout":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setDisabled":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setDisplay":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setIntegrationId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setLinkDeviceId":{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.setPrimaryChildEntityId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setRole":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setRoleDisplayDefaults":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setStreamProfileMap":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setType":{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.getRawState":{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.runAction":{capName:`device-ops`,capScope:`device`,addonId:null,access:`create`},"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.getDiscoveryParamsSchema":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.getManualCreationType":{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`},"faceGallery.assignFace":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.assignFaces":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.createIdentity":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.deleteFace":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`delete`},"faceGallery.deleteIdentity":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`delete`},"faceGallery.getFaceByTrack":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.getFaceMedia":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.listIdentities":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.listIdentitySamples":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.listRecentFaces":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.removeSample":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`delete`},"faceGallery.renameIdentity":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.suggestFaceClusters":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.unassignFace":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.unassignFaces":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"fanControl.setDirection":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"fanControl.setOscillating":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"fanControl.setPercentage":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"fanControl.setPreset":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"filesystemBrowse.browse":{capName:`filesystem-browse`,capScope:`system`,addonId:null,access:`view`},"filesystemBrowse.createDir":{capName:`filesystem-browse`,capScope:`system`,addonId:null,access:`create`},"filesystemBrowse.listAllowedRoots":{capName:`filesystem-browse`,capScope:`system`,addonId:null,access:`view`},"humidifier.setMode":{capName:`humidifier`,capScope:`device`,addonId:null,access:`create`},"humidifier.setOn":{capName:`humidifier`,capScope:`device`,addonId:null,access:`create`},"humidifier.setTargetHumidity":{capName:`humidifier`,capScope:`device`,addonId:null,access:`create`},"imageSettings.getOptions":{capName:`image-settings`,capScope:`device`,addonId:null,access:`view`},"imageSettings.setSettings":{capName:`image-settings`,capScope:`device`,addonId:null,access:`create`},"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.pushTalkAudio":{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`},"lawnMowerControl.dock":{capName:`lawn-mower-control`,capScope:`device`,addonId:null,access:`create`},"lawnMowerControl.pause":{capName:`lawn-mower-control`,capScope:`device`,addonId:null,access:`create`},"lawnMowerControl.startMowing":{capName:`lawn-mower-control`,capScope:`device`,addonId:null,access:`create`},"llm.cancel":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.deleteModel":{capName:`llm`,capScope:`system`,addonId:null,access:`delete`},"llm.deleteProfile":{capName:`llm`,capScope:`system`,addonId:null,access:`delete`},"llm.generate":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.generateVision":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.getDefaults":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.getRuntimeStatus":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.getUsage":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.installModel":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.listModelCatalog":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.listModels":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.listNodeModels":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.listProfileKinds":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.listProfiles":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.listRuntimeNodes":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.resolveModelRef":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.setDefault":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.startRuntime":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.stopRuntime":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.testProfile":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.upsertProfile":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llmRuntime.complete":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`},"llmRuntime.deleteModel":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`delete`},"llmRuntime.ensureStarted":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`},"llmRuntime.getDiskUsage":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`view`},"llmRuntime.installModel":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`},"llmRuntime.listLocalModels":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`view`},"llmRuntime.status":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`view`},"llmRuntime.stop":{capName:`llm-runtime`,capScope:`system`,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.getNotificationEndpoint":{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`},"localNetwork.setNotificationEndpoint":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"lockControl.lock":{capName:`lock-control`,capScope:`device`,addonId:null,access:`create`},"lockControl.open":{capName:`lock-control`,capScope:`device`,addonId:null,access:`create`},"lockControl.unlock":{capName:`lock-control`,capScope:`device`,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`},"loginMethod.getLoginMethods":{capName:`login-method`,capScope:`system`,addonId:null,access:`view`},"mediaPlayer.next":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.pause":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.play":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.playMedia":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.previous":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.seek":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.selectSource":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setMute":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setRepeat":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setShuffle":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setVolume":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.stop":{capName:`media-player`,capScope:`device`,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.dumpHeapSnapshot":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`create`},"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`},"modelConvert.convert":{capName:`model-convert`,capScope:`system`,addonId:null,access:`create`},"modelDistributor.distributeModel":{capName:`model-distributor`,capScope:`system`,addonId:null,access:`create`},"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`},"motionZones.getOptions":{capName:`motion-zones`,capScope:`device`,addonId:null,access:`view`},"motionZones.setZone":{capName:`motion-zones`,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`},"nativeObjectDetection.setEnabled":{capName:`native-object-detection`,capScope:`device`,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.getCapUsageGraph":{capName:`nodes`,capScope:`system`,addonId:null,access:`view`},"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.deleteTarget":{capName:`notification-output`,capScope:`system`,addonId:null,access:`delete`},"notificationOutput.discoverTargets":{capName:`notification-output`,capScope:`system`,addonId:null,access:`view`},"notificationOutput.listTargetKinds":{capName:`notification-output`,capScope:`system`,addonId:null,access:`view`},"notificationOutput.listTargets":{capName:`notification-output`,capScope:`system`,addonId:null,access:`view`},"notificationOutput.send":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.setTargetEnabled":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.testTarget":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.upsertTarget":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationRules.cancelSnooze":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.createRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.createSnooze":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.deleteRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`delete`},"notificationRules.getAlarmConfig":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.getConditionCatalog":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.getHistory":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.getRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.listDeviceMutes":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.listRules":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.listSnoozes":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.setAlarmConfig":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.setDeviceMuted":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.setRuleEnabled":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.testRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.updateRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notifier.cancel":{capName:`notifier`,capScope:`device`,addonId:null,access:`create`},"notifier.send":{capName:`notifier`,capScope:`device`,addonId:null,access:`create`},"oauthIntegration.getDescriptor":{capName:`oauth-integration`,capScope:`system`,addonId:null,access:`view`},"osd.setOverlay":{capName:`osd`,capScope:`device`,addonId:null,access:`create`},"osdManager.clearSlotBinding":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`delete`},"osdManager.copyDeviceConfiguration":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`},"osdManager.getConditionSupport":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`view`},"osdManager.getDeviceOsd":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`view`},"osdManager.getSourceCatalog":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`view`},"osdManager.previewSlot":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`},"osdManager.renderDevice":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`},"osdManager.setSlotBinding":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`},"petFeeder.callPet":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.cancelFeed":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.feed":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.markFoodReplenished":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.playSound":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.resetDesiccant":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`delete`},"petFeeder.setChildLock":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.setFeedSound":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.setIndicatorLight":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.setVolume":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.cancelStorageMigrationMove":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.clearTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.completeRetrainTrack":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.deleteDeviceEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.deleteTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.deselectRetrainFrame":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.getActiveTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getAudioEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getEventDensity":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getEventMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getEventStoreFootprint":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getKeyEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getMotionEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getObjectEmbeddingRebuildStatus":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getObjectEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getRetrainExportUrl":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getRetrainFrameImage":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getSensorEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getStorageMigrationMoveStatus":{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.getTrainingExportSummary":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getTrainingExportUrl":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listEventKinds":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listEventKindsBatch":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listOpsLog":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRecentTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRetrainAnnotations":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRetrainFrames":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRetrainStaging":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listTrackMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.pauseForStorageMigration":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.proposeRetrainAnnotations":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.pruneEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.pruneEventsBefore":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.pruneTracksBefore":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.rebuildObjectEmbeddings":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.reconcileFromDisk":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.refreshStorageLocationsForMigration":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.restageRetrainTrack":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.resumeForStorageMigration":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.saveRetrainAnnotations":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.searchObjectEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.selectRetrainFrames":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.setTrackFlags":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.startStorageMigrationMove":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.wipeAllAnalytics":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.wipeObjectEmbeddings":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineExecutor.cacheFrameInPool":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.clearDeviceOverrides":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`delete`},"pipelineExecutor.deleteModel":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`delete`},"pipelineExecutor.deleteTemplate":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`delete`},"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.getEngineProvisioning":{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.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`},"pipelineExecutor.validatePipeline":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.assignAudio":{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.getCameraStatus":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getCameraStatuses":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getCameraStepOverrides":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getCameraSwitches":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getCapabilityBindings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getGlobalMetrics":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getIngestOwner":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getNodeInferenceDevices":{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.getPipelineDevicePin":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getReconcileFromDiskStatus":{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.pauseForStorageMigration":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.rebalance":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.reconcileFromDisk":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.removeAgentSettings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`delete`},"pipelineOrchestrator.resetNodePipelineDefaults":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`delete`},"pipelineOrchestrator.resolvePipeline":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.resumeForStorageMigration":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.saveTemplate":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentCapabilities":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentDetectWeight":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentInferenceDevices":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentMaxCameras":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentReachableHost":{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.setCameraSwitch":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setCapabilityBinding":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setPipelineDevicePin":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.unassignAudio":{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.getNativeCrop":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`view`},"pipelineRunner.reportMotion":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"pipelineRunner.runDetailSubtree":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"pipelineRunner.runStatelessStep":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"plateGallery.assignPlate":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.assignPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.correctPlateText":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.createVehicle":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.deletePlate":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`delete`},"plateGallery.deleteVehicle":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`delete`},"plateGallery.getPlateByTrack":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.getPlateMedia":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.listPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.listVehicles":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.listVehicleSamples":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.removeVehicleSample":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`delete`},"plateGallery.renameVehicle":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.searchPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.suggestPlateClusters":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.unassignPlate":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.unassignPlates":{capName:`plate-gallery`,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.resolveHwAccel":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`},"platformProbe.resolveInferenceConfig":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`},"privacyMask.getOptions":{capName:`privacy-mask`,capScope:`device`,addonId:null,access:`view`},"privacyMask.setAudioEnabled":{capName:`privacy-mask`,capScope:`device`,addonId:null,access:`create`},"privacyMask.setMask":{capName:`privacy-mask`,capScope:`device`,addonId:null,access:`create`},"ptz.continuousMove":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`},"ptz.deletePreset":{capName:`ptz`,capScope:`device`,addonId:null,access:`delete`},"ptz.getOptions":{capName:`ptz`,capScope:`device`,addonId:null,access:`view`},"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.savePreset":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`},"ptz.setAutofocus":{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.cancelRelocateJob":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.cancelStorageMigrationMove":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.deleteFootprint":{capName:`recording`,capScope:`system`,addonId:null,access:`delete`},"recording.getAvailability":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getDaysWithRecordings":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getDeviceConfig":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getPlaybackManifest":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getStorageMigrationMoveStatus":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getStorageUsage":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.listOpsLog":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.listRelocateJobs":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.locateSegment":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.pauseForStorageMigration":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.planStorageRebalance":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.pruneFootage":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.readGopBytes":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.readSegmentBytes":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.refreshStorageLocationsForMigration":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.relocateFootage":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.renderClip":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.renderGif":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.rescanStorage":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.resumeForStorageMigration":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.setDeviceConfig":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.startStorageMigrationMove":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.startStorageRebalance":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recordingExport.cancelExport":{capName:`recording-export`,capScope:`system`,addonId:null,access:`create`},"recordingExport.createExport":{capName:`recording-export`,capScope:`system`,addonId:null,access:`create`},"recordingExport.deleteExport":{capName:`recording-export`,capScope:`system`,addonId:null,access:`delete`},"recordingExport.getDownloadUrl":{capName:`recording-export`,capScope:`system`,addonId:null,access:`view`},"recordingExport.getExport":{capName:`recording-export`,capScope:`system`,addonId:null,access:`view`},"recordingExport.listExports":{capName:`recording-export`,capScope:`system`,addonId:null,access:`view`},"recordingExport.readExportBytes":{capName:`recording-export`,capScope:`system`,addonId:null,access:`view`},"sceneMonitor.captureReference":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`create`},"sceneMonitor.createScene":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`create`},"sceneMonitor.deleteReference":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`delete`},"sceneMonitor.deleteScene":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`delete`},"sceneMonitor.listScenes":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`view`},"sceneMonitor.recheckNow":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`create`},"sceneMonitor.resetScene":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`delete`},"sceneMonitor.updateScene":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`create`},"scriptRunner.run":{capName:`script-runner`,capScope:`device`,addonId:null,access:`create`},"scriptRunner.stop":{capName:`script-runner`,capScope:`device`,addonId:null,access:`create`},"serverManagement.applyServerUpdate":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"serverManagement.checkServerUpdate":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"serverManagement.getServerPackageStatus":{capName:`server-management`,capScope:`system`,addonId:null,access:`view`},"serverManagement.restartServer":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"serverManagement.rollbackServerUpdate":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"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.deleteWhere":{capName:`settings-store`,capScope:`system`,addonId:null,access:`delete`},"settingsStore.get":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.histogram":{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`},"settingsStore.updateWhere":{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.getDebugState":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.getSnapshot":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.getSnapshotLinks":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.getSnapshotOverview":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.invalidateCache":{capName:`snapshot`,capScope:`device`,addonId:null,access:`create`},"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.listLocationDeclarations":{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`},"storageEvictable.evict":{capName:`storage-evictable`,capScope:`system`,addonId:null,access:`create`},"storageEvictable.getEvictableUsage":{capName:`storage-evictable`,capScope:`system`,addonId:null,access:`view`},"storageMigration.cancel":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`create`},"storageMigration.plan":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`},"storageMigration.start":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`create`},"storageMigration.status":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`},"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.acquireEgressTranscode":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.assignProfile":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.fetchEventMedia":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.getAllRtspEntries":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getBrokerStats":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getDeviceAudioMute":{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.probeStream":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.produceEventMedia":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.publishCameraStream":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.pullAudioChunks":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.pullFrameHandles":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.regenerateRtspToken":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.releaseEgressTranscode":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.releaseStreamWithCodec":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.renderPreBufferClip":{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.setDeviceAudioMute":{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.subscribeAudioChunks":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.subscribeFrames":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.unassignProfile":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.unsubscribeAudioChunks":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.unsubscribeFrames":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamCatalog.getCatalog":{capName:`stream-catalog`,capScope:`device`,addonId:null,access:`view`},"streamParams.getConfigSchema":{capName:`stream-params`,capScope:`device`,addonId:null,access:`view`},"streamParams.getOptions":{capName:`stream-params`,capScope:`device`,addonId:null,access:`view`},"streamParams.setProfile":{capName:`stream-params`,capScope:`device`,addonId:null,access:`create`},"switch.setState":{capName:`switch`,capScope:`device`,addonId:null,access:`create`},"system.detectSiteLocation":{capName:`system`,capScope:`system`,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.getSiteLocation":{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`},"system.setSiteLocation":{capName:`system`,capScope:`system`,addonId:null,access:`create`},"terminalSession.adoptLegacyMonitor":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.close":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.createInstance":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.deleteInstance":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`delete`},"terminalSession.listInstances":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`view`},"terminalSession.listLegacyCameras":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`view`},"terminalSession.listProfiles":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`view`},"terminalSession.listSessions":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`view`},"terminalSession.openSession":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.pullOutput":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.resize":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.setInstanceEnabled":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.writeInput":{capName:`terminal-session`,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`},"update.installUpdate":{capName:`update`,capScope:`device`,addonId:null,access:`create`},"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.listOauthSessions":{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.oauthExchangeCode":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userManagement.oauthIssueCode":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.oauthRefresh":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userManagement.oauthVerifyAccessToken":{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.revokeOauthSession":{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.beginDiscoverableAuthentication":{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.finishDiscoverableAuthentication":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.finishRegistration":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`create`},"userPasskeys.getSecondFactorPreference":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.listPasskeys":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.removePasskey":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`delete`},"userPasskeys.setSecondFactorPreference":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`create`},"vacuumControl.locate":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"vacuumControl.pause":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"vacuumControl.returnToBase":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"vacuumControl.setFanSpeed":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"vacuumControl.start":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"vacuumControl.stop":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"valve.close":{capName:`valve`,capScope:`device`,addonId:null,access:`create`},"valve.open":{capName:`valve`,capScope:`device`,addonId:null,access:`create`},"valve.setPosition":{capName:`valve`,capScope:`device`,addonId:null,access:`create`},"valve.stop":{capName:`valve`,capScope:`device`,addonId:null,access:`create`},"vectorStore.declareIndex":{capName:`vector-store`,capScope:`system`,addonId:null,access:`create`},"vectorStore.deleteByFilter":{capName:`vector-store`,capScope:`system`,addonId:null,access:`delete`},"vectorStore.deleteByIds":{capName:`vector-store`,capScope:`system`,addonId:null,access:`delete`},"vectorStore.getByIds":{capName:`vector-store`,capScope:`system`,addonId:null,access:`view`},"vectorStore.query":{capName:`vector-store`,capScope:`system`,addonId:null,access:`view`},"vectorStore.stats":{capName:`vector-store`,capScope:`system`,addonId:null,access:`view`},"vectorStore.upsert":{capName:`vector-store`,capScope:`system`,addonId:null,access:`create`},"videoclips.getClipPlayback":{capName:`videoclips`,capScope:`device`,addonId:null,access:`view`},"videoclips.listClips":{capName:`videoclips`,capScope:`device`,addonId:null,access:`view`},"viewerUi.getStaticDir":{capName:`viewer-ui`,capScope:`system`,addonId:null,access:`view`},"viewerUi.getVersion":{capName:`viewer-ui`,capScope:`system`,addonId:null,access:`view`},"waterHeater.setAway":{capName:`water-heater`,capScope:`device`,addonId:null,access:`create`},"waterHeater.setOperationMode":{capName:`water-heater`,capScope:`device`,addonId:null,access:`create`},"waterHeater.setTargetTemp":{capName:`water-heater`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.addIceCandidate":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.closeSession":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.createSession":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.getIceCandidates":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`view`},"webrtcSession.getSessionState":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`view`},"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`}}),oO=`accessories.addon-pages.addon-pages-source.addon-routes.addon-settings.addon-widgets.addon-widgets-source.addons.admin-ui.alarm-panel.alerts.audio-analysis.audio-analyzer.audio-codec.audio-metrics.auth-provider.automation-control.backup.battery.brightness.broker.button.camera-credentials.camera-streams.climate-control.color.connection-test.consumables.control.core-blocks.cover.custom-model-registry.data-store-provider.day-night.decoder.device-adoption.device-discovery.device-export.device-manager.device-ops.device-provider.device-state.embedding-encoder.events.face-gallery.fan-control.filesystem-browse.humidifier.image-settings.integrations.intercom.lawn-mower-control.llm.llm-runtime.local-network.lock-control.log-destination.login-method.media-player.mesh-network.metrics-provider.model-convert.model-distributor.motion.motion-detection.motion-trigger.motion-zones.mqtt-broker.native-object-detection.network-access.network-quality.nodes.notification-output.notification-rules.notifier.oauth-integration.osd.osd-manager.pet-feeder.pipeline-analytics.pipeline-executor.pipeline-orchestrator.pipeline-runner.plate-gallery.platform-probe.privacy-mask.ptz.ptz-autotrack.reboot.recording.recording-export.scene-monitor.script-runner.server-management.settings-store.smtp-provider.snapshot.sso-bridge.storage.storage-evictable.storage-migration.storage-provider.stream-broker.stream-catalog.stream-params.switch.system.terminal-session.toast.turn-provider.update.user-management.user-passkeys.vacuum-control.valve.vector-store.videoclips.viewer-ui.water-heater.webrtc-session.zone-analytics.zone-rules.zones`.split(`.`),sO=`accessories.alarm-panel.audio-analysis.audio-metrics.automation-control.battery.brightness.button.camera-credentials.camera-streams.climate-control.color.consumables.control.cover.day-night.device-discovery.device-ops.events.fan-control.humidifier.image-settings.intercom.lawn-mower-control.lock-control.media-player.motion.motion-detection.motion-trigger.motion-zones.native-object-detection.notifier.osd.pet-feeder.pipeline-analytics.privacy-mask.ptz.ptz-autotrack.reboot.scene-monitor.script-runner.snapshot.stream-catalog.stream-params.switch.update.vacuum-control.valve.videoclips.water-heater.webrtc-session.zone-analytics.zone-rules.zones`.split(`.`),cO=`addon-pages.addon-pages-source.addon-routes.addon-settings.addon-widgets.addon-widgets-source.addons.admin-ui.alerts.audio-analyzer.audio-codec.auth-provider.backup.broker.connection-test.core-blocks.custom-model-registry.data-store-provider.decoder.device-adoption.device-export.device-manager.device-provider.device-state.embedding-encoder.face-gallery.filesystem-browse.integrations.llm.llm-runtime.local-network.log-destination.login-method.mesh-network.metrics-provider.model-convert.model-distributor.mqtt-broker.network-access.network-quality.nodes.notification-output.notification-rules.oauth-integration.osd-manager.pipeline-executor.pipeline-orchestrator.pipeline-runner.plate-gallery.platform-probe.recording.recording-export.server-management.settings-store.smtp-provider.sso-bridge.storage.storage-evictable.storage-migration.storage-provider.stream-broker.system.terminal-session.toast.turn-provider.user-management.user-passkeys.vector-store.viewer-ui`.split(`.`),lO=Object.freeze({"accessories.setChildHidden":[{name:`childDeviceId`,form:`single`,optional:!1},{name:`deviceId`,form:`single`,optional:!1}],"addonSettings.getDeviceSettings":[{name:`deviceId`,form:`single`,optional:!1}],"addonSettings.updateDeviceSettings":[{name:`deviceId`,form:`single`,optional:!1}],"alarmPanel.arm":[{name:`deviceId`,form:`single`,optional:!1}],"alarmPanel.disarm":[{name:`deviceId`,form:`single`,optional:!1}],"alarmPanel.trigger":[{name:`deviceId`,form:`single`,optional:!1}],"audioAnalysis.resolveDeviceSettings":[{name:`deviceId`,form:`single`,optional:!1}],"audioAnalyzer.classify":[{name:`deviceId`,form:`single`,optional:!0}],"audioMetrics.getCurrentSnapshot":[{name:`deviceId`,form:`single`,optional:!1}],"audioMetrics.getHistory":[{name:`deviceId`,form:`single`,optional:!1}],"automationControl.disable":[{name:`deviceId`,form:`single`,optional:!1}],"automationControl.enable":[{name:`deviceId`,form:`single`,optional:!1}],"automationControl.trigger":[{name:`deviceId`,form:`single`,optional:!1}],"battery.wakeForStream":[{name:`deviceId`,form:`single`,optional:!1}],"brightness.setBrightness":[{name:`deviceId`,form:`single`,optional:!1}],"button.press":[{name:`deviceId`,form:`single`,optional:!1}],"cameraCredentials.getCredentials":[{name:`deviceId`,form:`single`,optional:!1}],"cameraStreams.getBrokerStreams":[{name:`deviceId`,form:`single`,optional:!1}],"cameraStreams.getCameraStreams":[{name:`deviceId`,form:`single`,optional:!1}],"cameraStreams.getProfileRtspEntries":[{name:`deviceId`,form:`single`,optional:!1}],"cameraStreams.getRtspEntries":[{name:`deviceId`,form:`single`,optional:!1}],"cameraStreams.pickStream":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setFanMode":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setMode":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setPreset":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setSwingHorizontal":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setSwingVertical":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setTarget":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setTargetHumidity":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setTargetRange":[{name:`deviceId`,form:`single`,optional:!1}],"color.setColor":[{name:`deviceId`,form:`single`,optional:!1}],"consumables.reset":[{name:`deviceId`,form:`single`,optional:!1}],"control.setValue":[{name:`deviceId`,form:`single`,optional:!1}],"cover.close":[{name:`deviceId`,form:`single`,optional:!1}],"cover.open":[{name:`deviceId`,form:`single`,optional:!1}],"cover.setPosition":[{name:`deviceId`,form:`single`,optional:!1}],"cover.setTiltPosition":[{name:`deviceId`,form:`single`,optional:!1}],"cover.stop":[{name:`deviceId`,form:`single`,optional:!1}],"dayNight.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"dayNight.setSettings":[{name:`deviceId`,form:`single`,optional:!1}],"decoder.createSession":[{name:`deviceId`,form:`single`,optional:!0}],"deviceAdoption.release":[{name:`camDeviceId`,form:`single`,optional:!1}],"deviceAdoption.resync":[{name:`camDeviceId`,form:`single`,optional:!1}],"deviceDiscovery.adoptDevice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceDiscovery.listDiscovered":[{name:`deviceId`,form:`single`,optional:!1}],"deviceDiscovery.refreshDiscovery":[{name:`deviceId`,form:`single`,optional:!1}],"deviceDiscovery.releaseDevice":[{name:`childDeviceId`,form:`single`,optional:!1},{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.adoptionRelease":[{name:`camDeviceId`,form:`single`,optional:!1}],"deviceManager.adoptionResync":[{name:`camDeviceId`,form:`single`,optional:!1}],"deviceManager.applyInitialMeta":[{name:`deviceId`,form:`single`,optional:!1},{name:`linkDeviceId`,form:`single`,optional:!0}],"deviceManager.disable":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.enable":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getBindings":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getChildren":[{name:`parentDeviceId`,form:`single`,optional:!1}],"deviceManager.getConfigSchema":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDevice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDeviceAggregate":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDeviceLiveInfoAggregate":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDeviceSettingsAggregate":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDeviceStatusAggregate":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDeviceStatusAggregateBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"deviceManager.getLinkedDevices":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getSettingsSchema":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getStreamProfileMap":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getStreamSources":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getWireableFields":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.loadConfig":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.loadMeta":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.loadRuntimeState":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.persistConfig":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.probeStreams":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.registerDevice":[{name:`parentDeviceId`,form:`single`,optional:!0}],"deviceManager.remove":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.removeDevice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.runDeviceAction":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setChildLayout":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setDisabled":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setDisplay":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setIntegrationId":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setLinkDeviceId":[{name:`deviceId`,form:`single`,optional:!1},{name:`linkDeviceId`,form:`single`,optional:!0}],"deviceManager.setLocation":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setMetadata":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setName":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setPrimaryChildEntityId":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setRole":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setStreamProfileMap":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setType":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setWrapperActive":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.testField":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.updateConfig":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.updateDeviceField":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.updateDeviceFieldsBatch":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.getConfigEntries":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.getRawState":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.getSettingsSchema":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.getStreamSources":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.removeDevice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.runAction":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.setConfig":[{name:`deviceId`,form:`single`,optional:!1}],"deviceState.getCapSlice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceState.getSnapshot":[{name:`deviceId`,form:`single`,optional:!1}],"deviceState.setCapSlice":[{name:`deviceId`,form:`single`,optional:!1}],"events.getEventClipUrl":[{name:`deviceId`,form:`single`,optional:!1}],"events.getEvents":[{name:`deviceId`,form:`single`,optional:!1}],"events.getEventThumbnail":[{name:`deviceId`,form:`single`,optional:!1}],"faceGallery.getFaceByTrack":[{name:`deviceId`,form:`single`,optional:!1}],"faceGallery.listRecentFaces":[{name:`deviceId`,form:`single`,optional:!0}],"fanControl.setDirection":[{name:`deviceId`,form:`single`,optional:!1}],"fanControl.setOscillating":[{name:`deviceId`,form:`single`,optional:!1}],"fanControl.setPercentage":[{name:`deviceId`,form:`single`,optional:!1}],"fanControl.setPreset":[{name:`deviceId`,form:`single`,optional:!1}],"humidifier.setMode":[{name:`deviceId`,form:`single`,optional:!1}],"humidifier.setOn":[{name:`deviceId`,form:`single`,optional:!1}],"humidifier.setTargetHumidity":[{name:`deviceId`,form:`single`,optional:!1}],"imageSettings.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"imageSettings.setSettings":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.endTalkSession":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.handleAnswer":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.pushTalkAudio":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.startSession":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.startTalkSession":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.stopSession":[{name:`deviceId`,form:`single`,optional:!1}],"lawnMowerControl.dock":[{name:`deviceId`,form:`single`,optional:!1}],"lawnMowerControl.pause":[{name:`deviceId`,form:`single`,optional:!1}],"lawnMowerControl.startMowing":[{name:`deviceId`,form:`single`,optional:!1}],"lockControl.lock":[{name:`deviceId`,form:`single`,optional:!1}],"lockControl.open":[{name:`deviceId`,form:`single`,optional:!1}],"lockControl.unlock":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.next":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.pause":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.play":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.playMedia":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.previous":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.seek":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.selectSource":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.setMute":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.setRepeat":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.setShuffle":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.setVolume":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.stop":[{name:`deviceId`,form:`single`,optional:!1}],"motion.isDetected":[{name:`deviceId`,form:`single`,optional:!1}],"motionDetection.analyze":[{name:`deviceId`,form:`single`,optional:!1}],"motionDetection.removeCamera":[{name:`deviceId`,form:`single`,optional:!1}],"motionTrigger.setMotionTrigger":[{name:`deviceId`,form:`single`,optional:!1}],"motionZones.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"motionZones.setZone":[{name:`deviceId`,form:`single`,optional:!1}],"nativeObjectDetection.setEnabled":[{name:`deviceId`,form:`single`,optional:!1}],"networkQuality.getDeviceStats":[{name:`deviceId`,form:`single`,optional:!1}],"networkQuality.reportClientStats":[{name:`deviceId`,form:`single`,optional:!1}],"notificationRules.setDeviceMuted":[{name:`deviceId`,form:`single`,optional:!1}],"notifier.cancel":[{name:`deviceId`,form:`single`,optional:!1}],"notifier.send":[{name:`deviceId`,form:`single`,optional:!1}],"osd.setOverlay":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.clearSlotBinding":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.copyDeviceConfiguration":[{name:`sourceDeviceId`,form:`single`,optional:!1},{name:`targetDeviceId`,form:`single`,optional:!1}],"osdManager.getDeviceOsd":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.getSourceCatalog":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.previewSlot":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.renderDevice":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.setSlotBinding":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.callPet":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.cancelFeed":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.feed":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.markFoodReplenished":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.playSound":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.resetDesiccant":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.setChildLock":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.setFeedSound":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.setIndicatorLight":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.setVolume":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.clearTracks":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.completeRetrainTrack":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.deleteDeviceEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.deleteTracks":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.deselectRetrainFrame":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getActiveTracks":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getAudioEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getEventDensity":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getEventMedia":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getKeyEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getMotionEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getObjectEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getRetrainExportUrl":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineAnalytics.getSensorEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getTrack":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getTrackMedia":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getTrainingExportSummary":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineAnalytics.getTrainingExportUrl":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineAnalytics.listEventKinds":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.listEventKindsBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"pipelineAnalytics.listOpsLog":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineAnalytics.listRecentTracks":[{name:`deviceIds`,form:`array`,optional:!1}],"pipelineAnalytics.listRetrainStaging":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineAnalytics.listTrackMedia":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.listTracks":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.proposeRetrainAnnotations":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.pruneEventsBefore":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.pruneTracksBefore":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.rebuildObjectEmbeddings":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineAnalytics.reconcileFromDisk":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.restageRetrainTrack":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.saveRetrainAnnotations":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.searchObjectEvents":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineAnalytics.selectRetrainFrames":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.setTrackFlags":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.wipeAllAnalytics":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineExecutor.runPipeline":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineExecutor.runPipelineBatch":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineOrchestrator.assignAudio":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.assignPipeline":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getAudioAssignment":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getCameraMetrics":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getCameraSettings":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getCameraStatus":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getCameraStatuses":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineOrchestrator.getCameraStepOverrides":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getCameraSwitches":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getPipelineAssignment":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getPipelineDevicePin":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.resolvePipeline":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setCameraPipelineForAgent":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setCameraStepOverride":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setCameraStepToggle":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setCameraSwitch":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setPipelineDevicePin":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.unassignAudio":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.unassignPipeline":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.attachCamera":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.detachCamera":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.getCameraMetrics":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.reportMotion":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.runDetailSubtree":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.runStatelessStep":[{name:`sourceDeviceId`,form:`single`,optional:!1}],"plateGallery.getPlateByTrack":[{name:`deviceId`,form:`single`,optional:!1}],"plateGallery.listPlates":[{name:`deviceId`,form:`single`,optional:!0}],"privacyMask.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"privacyMask.setAudioEnabled":[{name:`deviceId`,form:`single`,optional:!1}],"privacyMask.setMask":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.continuousMove":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.deletePreset":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.getPosition":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.getPresets":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.goHome":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.goToPreset":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.move":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.savePreset":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.setAutofocus":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.stop":[{name:`deviceId`,form:`single`,optional:!1}],"ptzAutotrack.getSettings":[{name:`deviceId`,form:`single`,optional:!1}],"ptzAutotrack.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"ptzAutotrack.setEnabled":[{name:`deviceId`,form:`single`,optional:!1}],"ptzAutotrack.setSettings":[{name:`deviceId`,form:`single`,optional:!1}],"reboot.reboot":[{name:`deviceId`,form:`single`,optional:!1}],"recording.deleteFootprint":[{name:`deviceId`,form:`single`,optional:!1}],"recording.getAvailability":[{name:`deviceId`,form:`single`,optional:!1}],"recording.getDaysWithRecordings":[{name:`deviceId`,form:`single`,optional:!1}],"recording.getDeviceConfig":[{name:`deviceId`,form:`single`,optional:!1}],"recording.getPlaybackManifest":[{name:`deviceId`,form:`single`,optional:!1}],"recording.listOpsLog":[{name:`deviceId`,form:`single`,optional:!0}],"recording.locateSegment":[{name:`deviceId`,form:`single`,optional:!1}],"recording.pruneFootage":[{name:`deviceId`,form:`single`,optional:!1}],"recording.readGopBytes":[{name:`deviceId`,form:`single`,optional:!1}],"recording.readSegmentBytes":[{name:`deviceId`,form:`single`,optional:!1}],"recording.relocateFootage":[{name:`deviceId`,form:`single`,optional:!0}],"recording.renderClip":[{name:`deviceId`,form:`single`,optional:!1}],"recording.renderGif":[{name:`deviceId`,form:`single`,optional:!1}],"recording.rescanStorage":[{name:`deviceId`,form:`single`,optional:!1}],"recording.setDeviceConfig":[{name:`deviceId`,form:`single`,optional:!1}],"recording.startStorageMigrationMove":[{name:`deviceId`,form:`single`,optional:!0}],"recordingExport.createExport":[{name:`deviceId`,form:`single`,optional:!1}],"recordingExport.listExports":[{name:`deviceId`,form:`single`,optional:!0}],"sceneMonitor.captureReference":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.createScene":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.deleteReference":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.deleteScene":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.listScenes":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.recheckNow":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.resetScene":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.updateScene":[{name:`deviceId`,form:`single`,optional:!1}],"scriptRunner.run":[{name:`deviceId`,form:`single`,optional:!1}],"scriptRunner.stop":[{name:`deviceId`,form:`single`,optional:!1}],"snapshot.getDebugState":[{name:`deviceId`,form:`single`,optional:!1}],"snapshot.getSnapshot":[{name:`deviceId`,form:`single`,optional:!1}],"snapshot.getSnapshotLinks":[{name:`targets`,form:`object-array`,optional:!1,itemField:`deviceId`}],"snapshot.getSnapshotOverview":[{name:`deviceIds`,form:`array`,optional:!1}],"snapshot.invalidateCache":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.acquireEgressTranscode":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.assignProfile":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.getDeviceAudioMute":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.getStreamWithCodec":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.produceEventMedia":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.publishCameraStream":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.renderPreBufferClip":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.restartProfile":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.retractCameraStream":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.setDeviceAudioMute":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.unassignProfile":[{name:`deviceId`,form:`single`,optional:!1}],"streamCatalog.getCatalog":[{name:`deviceId`,form:`single`,optional:!1}],"streamParams.getConfigSchema":[{name:`deviceId`,form:`single`,optional:!1}],"streamParams.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"streamParams.setProfile":[{name:`deviceId`,form:`single`,optional:!1}],"switch.setState":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.locate":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.pause":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.returnToBase":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.setFanSpeed":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.start":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.stop":[{name:`deviceId`,form:`single`,optional:!1}],"valve.close":[{name:`deviceId`,form:`single`,optional:!1}],"valve.open":[{name:`deviceId`,form:`single`,optional:!1}],"valve.setPosition":[{name:`deviceId`,form:`single`,optional:!1}],"valve.stop":[{name:`deviceId`,form:`single`,optional:!1}],"videoclips.getClipPlayback":[{name:`deviceId`,form:`single`,optional:!1}],"videoclips.listClips":[{name:`deviceId`,form:`single`,optional:!1}],"waterHeater.setAway":[{name:`deviceId`,form:`single`,optional:!1}],"waterHeater.setOperationMode":[{name:`deviceId`,form:`single`,optional:!1}],"waterHeater.setTargetTemp":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.addIceCandidate":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.closeSession":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.createSession":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.getIceCandidates":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.getSessionState":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.handleAnswer":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.handleOffer":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.hasAdaptiveBitrate":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.listStreams":[{name:`deviceId`,form:`single`,optional:!1}],"zoneAnalytics.getCameraHistory":[{name:`deviceId`,form:`single`,optional:!1}],"zoneAnalytics.getCurrentSnapshot":[{name:`deviceId`,form:`single`,optional:!1}],"zoneAnalytics.getUnzonedHistory":[{name:`deviceId`,form:`single`,optional:!1}],"zoneAnalytics.getZoneHistory":[{name:`deviceId`,form:`single`,optional:!1}],"zoneRules.listRules":[{name:`deviceId`,form:`single`,optional:!1}],"zoneRules.setRules":[{name:`deviceId`,form:`single`,optional:!1}],"zones.addZone":[{name:`deviceId`,form:`single`,optional:!1}],"zones.listZones":[{name:`deviceId`,form:`single`,optional:!1}],"zones.removeZone":[{name:`deviceId`,form:`single`,optional:!1}],"zones.updateZone":[{name:`deviceId`,form:`single`,optional:!1}]}),uO=`addonSettings.getDeviceSettings,addonSettings.updateDeviceSettings,audioAnalyzer.classify,decoder.createSession,deviceAdoption.release,deviceAdoption.resync,deviceManager.adoptionRelease,deviceManager.adoptionResync,deviceManager.applyInitialMeta,deviceManager.disable,deviceManager.enable,deviceManager.getBindings,deviceManager.getChildren,deviceManager.getConfigSchema,deviceManager.getDevice,deviceManager.getDeviceAggregate,deviceManager.getDeviceLiveInfoAggregate,deviceManager.getDeviceSettingsAggregate,deviceManager.getDeviceStatusAggregate,deviceManager.getDeviceStatusAggregateBatch,deviceManager.getLinkedDevices,deviceManager.getSettingsSchema,deviceManager.getStreamProfileMap,deviceManager.getStreamSources,deviceManager.getWireableFields,deviceManager.loadConfig,deviceManager.loadMeta,deviceManager.loadRuntimeState,deviceManager.persistConfig,deviceManager.probeStreams,deviceManager.registerDevice,deviceManager.remove,deviceManager.removeDevice,deviceManager.runDeviceAction,deviceManager.setChildLayout,deviceManager.setDisabled,deviceManager.setDisplay,deviceManager.setIntegrationId,deviceManager.setLinkDeviceId,deviceManager.setLocation,deviceManager.setMetadata,deviceManager.setName,deviceManager.setPrimaryChildEntityId,deviceManager.setRole,deviceManager.setStreamProfileMap,deviceManager.setType,deviceManager.setWrapperActive,deviceManager.testField,deviceManager.updateConfig,deviceManager.updateDeviceField,deviceManager.updateDeviceFieldsBatch,deviceState.getCapSlice,deviceState.getSnapshot,deviceState.setCapSlice,faceGallery.getFaceByTrack,faceGallery.listRecentFaces,networkQuality.getDeviceStats,networkQuality.reportClientStats,notificationRules.setDeviceMuted,osdManager.clearSlotBinding,osdManager.copyDeviceConfiguration,osdManager.getDeviceOsd,osdManager.getSourceCatalog,osdManager.previewSlot,osdManager.renderDevice,osdManager.setSlotBinding,pipelineExecutor.runPipeline,pipelineExecutor.runPipelineBatch,pipelineOrchestrator.assignAudio,pipelineOrchestrator.assignPipeline,pipelineOrchestrator.getAudioAssignment,pipelineOrchestrator.getCameraMetrics,pipelineOrchestrator.getCameraSettings,pipelineOrchestrator.getCameraStatus,pipelineOrchestrator.getCameraStatuses,pipelineOrchestrator.getCameraStepOverrides,pipelineOrchestrator.getCameraSwitches,pipelineOrchestrator.getPipelineAssignment,pipelineOrchestrator.getPipelineDevicePin,pipelineOrchestrator.resolvePipeline,pipelineOrchestrator.setCameraPipelineForAgent,pipelineOrchestrator.setCameraStepOverride,pipelineOrchestrator.setCameraStepToggle,pipelineOrchestrator.setCameraSwitch,pipelineOrchestrator.setPipelineDevicePin,pipelineOrchestrator.unassignAudio,pipelineOrchestrator.unassignPipeline,pipelineRunner.attachCamera,pipelineRunner.detachCamera,pipelineRunner.getCameraMetrics,pipelineRunner.reportMotion,pipelineRunner.runDetailSubtree,pipelineRunner.runStatelessStep,plateGallery.getPlateByTrack,plateGallery.listPlates,recording.deleteFootprint,recording.getAvailability,recording.getDaysWithRecordings,recording.getDeviceConfig,recording.getPlaybackManifest,recording.listOpsLog,recording.locateSegment,recording.pruneFootage,recording.readGopBytes,recording.readSegmentBytes,recording.relocateFootage,recording.renderClip,recording.renderGif,recording.rescanStorage,recording.setDeviceConfig,recording.startStorageMigrationMove,recordingExport.createExport,recordingExport.listExports,streamBroker.acquireEgressTranscode,streamBroker.assignProfile,streamBroker.getDeviceAudioMute,streamBroker.getStreamWithCodec,streamBroker.produceEventMedia,streamBroker.publishCameraStream,streamBroker.renderPreBufferClip,streamBroker.restartProfile,streamBroker.retractCameraStream,streamBroker.setDeviceAudioMute,streamBroker.unassignProfile`.split(`,`),dO=Object.freeze({broker:`broker`,"device-export":`device-export`,llm:`ai`,"mesh-network":`mesh`,"mqtt-broker":`broker`,"network-access":`ingress`,"smtp-provider":`email`}),fO=[`broker`,`device-export`,`llm`,`mesh-network`,`mqtt-broker`,`network-access`,`smtp-provider`];function pO(e){let t=[];for(let[n,r]of Object.entries(dO))r===e&&t.push(n);return t}var mO={"air-quality-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"alarm-panel":{durability:`restored`,volatileFields:[`lastChangedAt`]},"ambient-light-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"audio-metrics":{durability:`session`,volatileFields:[]},"automation-control":{durability:`session`,volatileFields:[]},battery:{durability:`restored`,volatileFields:[`lastUpdated`]},binary:{durability:`restored`,volatileFields:[`lastChangedAt`]},brightness:{durability:`session`,volatileFields:[]},"camera-streams":{durability:`session`,volatileFields:[]},"carbon-monoxide":{durability:`restored`,volatileFields:[`lastChangedAt`]},"climate-control":{durability:`session`,volatileFields:[]},color:{durability:`session`,volatileFields:[]},connectivity:{durability:`restored`,volatileFields:[`lastChangedAt`]},consumables:{durability:`session`,volatileFields:[]},contact:{durability:`restored`,volatileFields:[`lastChangedAt`]},control:{durability:`session`,volatileFields:[]},cover:{durability:`restored`,volatileFields:[`lastChangedAt`]},"day-night":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"device-discovery":{durability:`session`,volatileFields:[]},"device-status":{durability:`restored`,volatileFields:[`lastChangedAt`]},doorbell:{durability:`restored`,volatileFields:[]},"enum-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"event-emitter":{durability:`session`,volatileFields:[]},"fan-control":{durability:`session`,volatileFields:[]},"feature-probe":{durability:`session`,volatileFields:[]},flood:{durability:`restored`,volatileFields:[`lastChangedAt`]},gas:{durability:`restored`,volatileFields:[`lastChangedAt`]},humidifier:{durability:`session`,volatileFields:[]},"humidity-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},image:{durability:`session`,volatileFields:[]},"image-settings":{durability:`restored`,volatileFields:[`lastFetchedAt`]},intercom:{durability:`session`,volatileFields:[]},"lawn-mower-control":{durability:`session`,volatileFields:[]},"lock-control":{durability:`restored`,volatileFields:[`lastChangedAt`]},"media-player":{durability:`session`,volatileFields:[]},motion:{durability:`session`,volatileFields:[]},"motion-trigger":{durability:`session`,volatileFields:[]},"motion-zones":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"native-object-detection":{durability:`restored`,volatileFields:[`lastFetchedAt`]},notifier:{durability:`session`,volatileFields:[]},"numeric-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"pet-feeder":{durability:`session`,volatileFields:[]},"power-meter":{durability:`restored`,volatileFields:[`lastFetchedAt`]},presence:{durability:`restored`,volatileFields:[`lastChangedAt`]},"pressure-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"privacy-mask":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"ptz-autotrack":{durability:`session`,volatileFields:[]},"scene-monitor":{durability:`session`,volatileFields:[]},"script-runner":{durability:`session`,volatileFields:[]},smoke:{durability:`restored`,volatileFields:[`lastChangedAt`]},"stream-catalog":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"stream-params":{durability:`restored`,volatileFields:[`lastFetchedAt`]},switch:{durability:`restored`,volatileFields:[`lastChangedAt`]},tamper:{durability:`restored`,volatileFields:[`lastChangedAt`]},"temperature-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},update:{durability:`session`,volatileFields:[]},"vacuum-control":{durability:`session`,volatileFields:[]},valve:{durability:`session`,volatileFields:[]},vibration:{durability:`restored`,volatileFields:[`lastChangedAt`]},"water-heater":{durability:`session`,volatileFields:[]},weather:{durability:`session`,volatileFields:[]},"zone-analytics":{durability:`session`,volatileFields:[]},"zone-rules":{durability:`restored`,volatileFields:[]},zones:{durability:`restored`,volatileFields:[]}};function hO(e){return mO[e]??gO}var gO={durability:`session`,volatileFields:[]};function _O(e){return hO(e).durability===`restored`}var vO=`air-quality-sensor.alarm-panel.ambient-light-sensor.battery.binary.carbon-monoxide.connectivity.contact.cover.day-night.device-status.doorbell.enum-sensor.flood.gas.humidity-sensor.image-settings.lock-control.motion-zones.native-object-detection.numeric-sensor.power-meter.presence.pressure-sensor.privacy-mask.smoke.stream-catalog.stream-params.switch.tamper.temperature-sensor.vibration.zone-rules.zones`.split(`.`),yO=[{id:`camera-viewer`,label:`Camera viewer`,description:"Read-only over every device — live streams, recordings, motion events, battery state. Pair with a `device` grant (an `ids` / `types` / `locations` selector) 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:`full-management`,label:`Full management`,description:`Complete device + system control short of admin: view/create/delete on every device and every system capability. Use for a trusted operator who manages the whole deployment but should not hold the admin bypass.`,rows:[{type:`category`,target:`device`,access:[`view`,`create`,`delete`]},{type:`category`,target:`system`,access:[`view`,`create`,`delete`]}]},{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`]}]}];function bO(e){let t=e;function n(e,n,r,i,a){let o=t[e]?.[n];if(!o)throw Error(`SystemProxy: api has no '${e}.${n}'`);let s=o;return r===`mutation`?s.mutate(i):r===`subscription`?s.subscribe(i,a):s.query(i)}return{addonPages:{listPages:e=>n(`addonPages`,`listPages`,`query`,e)},addons:{list:e=>n(`addons`,`list`,`query`,e),getLogs:e=>n(`addons`,`getLogs`,`query`,e),listPackages:e=>n(`addons`,`listPackages`,`query`,e),installPackage:e=>n(`addons`,`installPackage`,`mutation`,e),installFromWorkspace:e=>n(`addons`,`installFromWorkspace`,`mutation`,e),isWorkspaceAvailable:e=>n(`addons`,`isWorkspaceAvailable`,`query`,e),listWorkspacePackages:e=>n(`addons`,`listWorkspacePackages`,`query`,e),uninstallPackage:e=>n(`addons`,`uninstallPackage`,`mutation`,e),reloadPackages:e=>n(`addons`,`reloadPackages`,`mutation`,e),searchAvailable:e=>n(`addons`,`searchAvailable`,`query`,e),listUpdates:e=>n(`addons`,`listUpdates`,`query`,e),updatePackage:e=>n(`addons`,`updatePackage`,`mutation`,e),rollbackPackage:e=>n(`addons`,`rollbackPackage`,`mutation`,e),forceRefresh:e=>n(`addons`,`forceRefresh`,`mutation`,e),restartServer:e=>n(`addons`,`restartServer`,`mutation`,e),getLastRestart:e=>n(`addons`,`getLastRestart`,`query`,e),listFrameworkPackages:e=>n(`addons`,`listFrameworkPackages`,`query`,e),listCapabilityProviders:e=>n(`addons`,`listCapabilityProviders`,`query`,e),setCapabilityProviderEnabled:e=>n(`addons`,`setCapabilityProviderEnabled`,`mutation`,e),getVersions:e=>n(`addons`,`getVersions`,`query`,e),restartAddon:e=>n(`addons`,`restartAddon`,`mutation`,e),retryLoad:e=>n(`addons`,`retryLoad`,`mutation`,e),getAutoUpdateSettings:e=>n(`addons`,`getAutoUpdateSettings`,`query`,e),setAutoUpdateSettings:e=>n(`addons`,`setAutoUpdateSettings`,`mutation`,e),getAddonAutoUpdate:e=>n(`addons`,`getAddonAutoUpdate`,`query`,e),setAddonAutoUpdate:e=>n(`addons`,`setAddonAutoUpdate`,`mutation`,e),applyAutoUpdateToAll:e=>n(`addons`,`applyAutoUpdateToAll`,`mutation`,e),custom:e=>n(`addons`,`custom`,`mutation`,e),startJob:e=>n(`addons`,`startJob`,`mutation`,e),getJob:e=>n(`addons`,`getJob`,`query`,e),listJobs:e=>n(`addons`,`listJobs`,`query`,e),cancelJob:e=>n(`addons`,`cancelJob`,`mutation`,e),onAddonLogs:(e,t)=>n(`addons`,`onAddonLogs`,`subscription`,e,t)},addonSettings:{getGlobalSettings:e=>n(`addonSettings`,`getGlobalSettings`,`query`,e),updateGlobalSettings:e=>n(`addonSettings`,`updateGlobalSettings`,`mutation`,e)},addonWidgets:{listWidgets:e=>n(`addonWidgets`,`listWidgets`,`query`,e)},alerts:{emit:e=>n(`alerts`,`emit`,`mutation`,e),update:e=>n(`alerts`,`update`,`mutation`,e),list:e=>n(`alerts`,`list`,`query`,e),getUnreadCount:e=>n(`alerts`,`getUnreadCount`,`query`,e),markRead:e=>n(`alerts`,`markRead`,`mutation`,e),markAllRead:e=>n(`alerts`,`markAllRead`,`mutation`,e),dismiss:e=>n(`alerts`,`dismiss`,`mutation`,e)},audioAnalyzer:{analyseChunk:e=>n(`audioAnalyzer`,`analyseChunk`,`mutation`,e),classify:e=>n(`audioAnalyzer`,`classify`,`query`,e),isReady:e=>n(`audioAnalyzer`,`isReady`,`query`,e),dispose:e=>n(`audioAnalyzer`,`dispose`,`mutation`,e),reprobeAudioEngine:e=>n(`audioAnalyzer`,`reprobeAudioEngine`,`mutation`,e)},audioCodec:{listSupportedCodecs:e=>n(`audioCodec`,`listSupportedCodecs`,`query`,e),canHandle:e=>n(`audioCodec`,`canHandle`,`query`,e),createDecodeSession:e=>n(`audioCodec`,`createDecodeSession`,`mutation`,e),createEncodeSession:e=>n(`audioCodec`,`createEncodeSession`,`mutation`,e),closeSession:e=>n(`audioCodec`,`closeSession`,`mutation`,e),pushEncodedFrame:e=>n(`audioCodec`,`pushEncodedFrame`,`mutation`,e),pullPcm:e=>n(`audioCodec`,`pullPcm`,`query`,e),pushPcm:e=>n(`audioCodec`,`pushPcm`,`mutation`,e),pullEncoded:e=>n(`audioCodec`,`pullEncoded`,`query`,e),flushEncode:e=>n(`audioCodec`,`flushEncode`,`mutation`,e),listActiveSessions:e=>n(`audioCodec`,`listActiveSessions`,`query`,e)},backup:{listDestinations:e=>n(`backup`,`listDestinations`,`query`,e),trigger:e=>n(`backup`,`trigger`,`mutation`,e),list:e=>n(`backup`,`list`,`query`,e),listLocations:e=>n(`backup`,`listLocations`,`query`,e),getEntries:e=>n(`backup`,`getEntries`,`query`,e),restore:e=>n(`backup`,`restore`,`mutation`,e),delete:e=>n(`backup`,`delete`,`mutation`,e),listArchives:e=>n(`backup`,`listArchives`,`query`,e),upsertDestinationPolicy:e=>n(`backup`,`upsertDestinationPolicy`,`mutation`,e),previewSchedule:e=>n(`backup`,`previewSchedule`,`query`,e),listSchedules:e=>n(`backup`,`listSchedules`,`query`,e),upsertSchedule:e=>n(`backup`,`upsertSchedule`,`mutation`,e),deleteSchedule:e=>n(`backup`,`deleteSchedule`,`mutation`,e)},broker:{list:e=>n(`broker`,`list`,`query`,e),get:e=>n(`broker`,`get`,`query`,e),listProviders:e=>n(`broker`,`listProviders`,`query`,e),add:e=>n(`broker`,`add`,`mutation`,e),remove:e=>n(`broker`,`remove`,`mutation`,e),testConnection:e=>n(`broker`,`testConnection`,`mutation`,e),getSettings:e=>n(`broker`,`getSettings`,`query`,e),setSettings:e=>n(`broker`,`setSettings`,`mutation`,e),getBrokerConfig:e=>n(`broker`,`getBrokerConfig`,`query`,e),getSettingsSchema:e=>n(`broker`,`getSettingsSchema`,`query`,e),testSettings:e=>n(`broker`,`testSettings`,`mutation`,e),publish:e=>n(`broker`,`publish`,`mutation`,e),subscribe:e=>n(`broker`,`subscribe`,`mutation`,e),unsubscribe:e=>n(`broker`,`unsubscribe`,`mutation`,e),getState:e=>n(`broker`,`getState`,`query`,e),getStatus:e=>n(`broker`,`getStatus`,`query`,e)},connectionTest:{testSettings:e=>n(`connectionTest`,`testSettings`,`mutation`,e),describeTest:e=>n(`connectionTest`,`describeTest`,`query`,e)},coreBlocks:{list:e=>n(`coreBlocks`,`list`,`query`,e),get:e=>n(`coreBlocks`,`get`,`query`,e),create:e=>n(`coreBlocks`,`create`,`mutation`,e),update:e=>n(`coreBlocks`,`update`,`mutation`,e),delete:e=>n(`coreBlocks`,`delete`,`mutation`,e),setEnabled:e=>n(`coreBlocks`,`setEnabled`,`mutation`,e),restart:e=>n(`coreBlocks`,`restart`,`mutation`,e),compile:e=>n(`coreBlocks`,`compile`,`mutation`,e),getTypeDefs:e=>n(`coreBlocks`,`getTypeDefs`,`query`,e)},decoder:{supportsCodec:e=>n(`decoder`,`supportsCodec`,`query`,e),getInfo:e=>n(`decoder`,`getInfo`,`query`,e),createSession:e=>n(`decoder`,`createSession`,`query`,e),destroySession:e=>n(`decoder`,`destroySession`,`query`,e),pushPacket:e=>n(`decoder`,`pushPacket`,`query`,e),openStream:e=>n(`decoder`,`openStream`,`query`,e),pullFrames:e=>n(`decoder`,`pullFrames`,`query`,e),pullHandles:e=>n(`decoder`,`pullHandles`,`query`,e),getFrame:e=>n(`decoder`,`getFrame`,`query`,e),getShmStats:e=>n(`decoder`,`getShmStats`,`query`,e),updateConfig:e=>n(`decoder`,`updateConfig`,`query`,e),getStats:e=>n(`decoder`,`getStats`,`query`,e),listActiveSessions:e=>n(`decoder`,`listActiveSessions`,`query`,e),reprobeHwaccel:e=>n(`decoder`,`reprobeHwaccel`,`mutation`,e)},deviceAdoption:{listCandidateFilters:e=>n(`deviceAdoption`,`listCandidateFilters`,`query`,e),listCandidates:e=>n(`deviceAdoption`,`listCandidates`,`query`,e),getCandidate:e=>n(`deviceAdoption`,`getCandidate`,`query`,e),refresh:e=>n(`deviceAdoption`,`refresh`,`mutation`,e),adopt:e=>n(`deviceAdoption`,`adopt`,`mutation`,e),release:e=>n(`deviceAdoption`,`release`,`mutation`,e),resync:e=>n(`deviceAdoption`,`resync`,`mutation`,e)},deviceExport:{getStatus:e=>n(`deviceExport`,`getStatus`,`query`,e),listSupportedDeviceKinds:e=>n(`deviceExport`,`listSupportedDeviceKinds`,`query`,e),listExposedDevices:e=>n(`deviceExport`,`listExposedDevices`,`query`,e),exposeDevice:e=>n(`deviceExport`,`exposeDevice`,`mutation`,e),unexposeDevice:e=>n(`deviceExport`,`unexposeDevice`,`mutation`,e)},deviceManager:{allocateDeviceId:e=>n(`deviceManager`,`allocateDeviceId`,`mutation`,e),registerDevice:e=>n(`deviceManager`,`registerDevice`,`mutation`,e),removeDevice:e=>n(`deviceManager`,`removeDevice`,`mutation`,e),persistConfig:e=>n(`deviceManager`,`persistConfig`,`mutation`,e),getRoleDisplayDefaults:e=>n(`deviceManager`,`getRoleDisplayDefaults`,`query`,e),setRoleDisplayDefaults:e=>n(`deviceManager`,`setRoleDisplayDefaults`,`mutation`,e),listLocations:e=>n(`deviceManager`,`listLocations`,`query`,e),addLocation:e=>n(`deviceManager`,`addLocation`,`mutation`,e),removeLocation:e=>n(`deviceManager`,`removeLocation`,`mutation`,e),listPersistedByAddon:e=>n(`deviceManager`,`listPersistedByAddon`,`query`,e),listAll:e=>n(`deviceManager`,`listAll`,`query`,e),getChildren:e=>n(`deviceManager`,`getChildren`,`query`,e),removeByIntegration:e=>n(`deviceManager`,`removeByIntegration`,`mutation`,e),listWrappersForCap:e=>n(`deviceManager`,`listWrappersForCap`,`query`,e),listBindableCapsForDeviceType:e=>n(`deviceManager`,`listBindableCapsForDeviceType`,`query`,e),discoverDevices:e=>n(`deviceManager`,`discoverDevices`,`mutation`,e),adoptDevice:e=>n(`deviceManager`,`adoptDevice`,`mutation`,e),getCreationSchema:e=>n(`deviceManager`,`getCreationSchema`,`query`,e),createDevice:e=>n(`deviceManager`,`createDevice`,`mutation`,e),testCreationField:e=>n(`deviceManager`,`testCreationField`,`mutation`,e),adoptionListCandidateFilters:e=>n(`deviceManager`,`adoptionListCandidateFilters`,`query`,e),adoptionListCandidates:e=>n(`deviceManager`,`adoptionListCandidates`,`query`,e),adoptionRefresh:e=>n(`deviceManager`,`adoptionRefresh`,`mutation`,e),adoptionAdopt:e=>n(`deviceManager`,`adoptionAdopt`,`mutation`,e),adoptionRelease:e=>n(`deviceManager`,`adoptionRelease`,`mutation`,e),adoptionStartJob:e=>n(`deviceManager`,`adoptionStartJob`,`mutation`,e),adoptionListJobs:e=>n(`deviceManager`,`adoptionListJobs`,`query`,e),adoptionCancelJob:e=>n(`deviceManager`,`adoptionCancelJob`,`mutation`,e),adoptionResync:e=>n(`deviceManager`,`adoptionResync`,`mutation`,e),discoveryProviders:e=>n(`deviceManager`,`discoveryProviders`,`query`,e),discoverAllProviders:e=>n(`deviceManager`,`discoverAllProviders`,`mutation`,e),discoverProvider:e=>n(`deviceManager`,`discoverProvider`,`mutation`,e),providerCreationType:e=>n(`deviceManager`,`providerCreationType`,`query`,e),providerDiscoveryParamsSchema:e=>n(`deviceManager`,`providerDiscoveryParamsSchema`,`query`,e),getDeviceStatusAggregateBatch:e=>n(`deviceManager`,`getDeviceStatusAggregateBatch`,`query`,e)},deviceProvider:{start:e=>n(`deviceProvider`,`start`,`mutation`,e),stop:e=>n(`deviceProvider`,`stop`,`mutation`,e),getStatus:e=>n(`deviceProvider`,`getStatus`,`query`,e),getDevices:e=>n(`deviceProvider`,`getDevices`,`query`,e),supportsDiscovery:e=>n(`deviceProvider`,`supportsDiscovery`,`query`,e),discoverDevices:e=>n(`deviceProvider`,`discoverDevices`,`mutation`,e),getDiscoveryParamsSchema:e=>n(`deviceProvider`,`getDiscoveryParamsSchema`,`query`,e),getManualCreationType:e=>n(`deviceProvider`,`getManualCreationType`,`query`,e),adoptDiscoveredDevice:e=>n(`deviceProvider`,`adoptDiscoveredDevice`,`mutation`,e),supportsManualCreation:e=>n(`deviceProvider`,`supportsManualCreation`,`query`,e),getChildCreationSchema:e=>n(`deviceProvider`,`getChildCreationSchema`,`query`,e),createDevice:e=>n(`deviceProvider`,`createDevice`,`mutation`,e),testCreationField:e=>n(`deviceProvider`,`testCreationField`,`mutation`,e)},deviceState:{getAllSnapshots:e=>n(`deviceState`,`getAllSnapshots`,`query`,e)},faceGallery:{listIdentities:e=>n(`faceGallery`,`listIdentities`,`query`,e),createIdentity:e=>n(`faceGallery`,`createIdentity`,`mutation`,e),renameIdentity:e=>n(`faceGallery`,`renameIdentity`,`mutation`,e),deleteIdentity:e=>n(`faceGallery`,`deleteIdentity`,`mutation`,e),listIdentitySamples:e=>n(`faceGallery`,`listIdentitySamples`,`query`,e),removeSample:e=>n(`faceGallery`,`removeSample`,`mutation`,e),getFaceMedia:e=>n(`faceGallery`,`getFaceMedia`,`query`,e),assignFace:e=>n(`faceGallery`,`assignFace`,`mutation`,e),unassignFace:e=>n(`faceGallery`,`unassignFace`,`mutation`,e),deleteFace:e=>n(`faceGallery`,`deleteFace`,`mutation`,e),assignFaces:e=>n(`faceGallery`,`assignFaces`,`mutation`,e),unassignFaces:e=>n(`faceGallery`,`unassignFaces`,`mutation`,e),suggestFaceClusters:e=>n(`faceGallery`,`suggestFaceClusters`,`query`,e)},integrations:{list:e=>n(`integrations`,`list`,`query`,e),get:e=>n(`integrations`,`get`,`query`,e),getByAddonId:e=>n(`integrations`,`getByAddonId`,`query`,e),create:e=>n(`integrations`,`create`,`mutation`,e),update:e=>n(`integrations`,`update`,`mutation`,e),delete:e=>n(`integrations`,`delete`,`mutation`,e),getSettings:e=>n(`integrations`,`getSettings`,`query`,e),setSettings:e=>n(`integrations`,`setSettings`,`mutation`,e),getAvailableTypes:e=>n(`integrations`,`getAvailableTypes`,`query`,e),testConnection:e=>n(`integrations`,`testConnection`,`mutation`,e)},llm:{generate:e=>n(`llm`,`generate`,`mutation`,e),generateVision:e=>n(`llm`,`generateVision`,`mutation`,e),cancel:e=>n(`llm`,`cancel`,`mutation`,e),listProfileKinds:e=>n(`llm`,`listProfileKinds`,`query`,e),listProfiles:e=>n(`llm`,`listProfiles`,`query`,e),upsertProfile:e=>n(`llm`,`upsertProfile`,`mutation`,e),deleteProfile:e=>n(`llm`,`deleteProfile`,`mutation`,e),testProfile:e=>n(`llm`,`testProfile`,`mutation`,e),listModels:e=>n(`llm`,`listModels`,`query`,e),getDefaults:e=>n(`llm`,`getDefaults`,`query`,e),setDefault:e=>n(`llm`,`setDefault`,`mutation`,e),getUsage:e=>n(`llm`,`getUsage`,`query`,e),listModelCatalog:e=>n(`llm`,`listModelCatalog`,`query`,e),listRuntimeNodes:e=>n(`llm`,`listRuntimeNodes`,`query`,e),listNodeModels:e=>n(`llm`,`listNodeModels`,`query`,e),resolveModelRef:e=>n(`llm`,`resolveModelRef`,`mutation`,e),installModel:e=>n(`llm`,`installModel`,`mutation`,e),deleteModel:e=>n(`llm`,`deleteModel`,`mutation`,e),getRuntimeStatus:e=>n(`llm`,`getRuntimeStatus`,`query`,e),startRuntime:e=>n(`llm`,`startRuntime`,`mutation`,e),stopRuntime:e=>n(`llm`,`stopRuntime`,`mutation`,e)},localNetwork:{list:e=>n(`localNetwork`,`list`,`query`,e),getPreferred:e=>n(`localNetwork`,`getPreferred`,`query`,e),getConnectionEndpoints:e=>n(`localNetwork`,`getConnectionEndpoints`,`query`,e),getNotificationEndpoint:e=>n(`localNetwork`,`getNotificationEndpoint`,`query`,e),setNotificationEndpoint:e=>n(`localNetwork`,`setNotificationEndpoint`,`mutation`,e),getAllowedAddresses:e=>n(`localNetwork`,`getAllowedAddresses`,`query`,e),setAllowedAddresses:e=>n(`localNetwork`,`setAllowedAddresses`,`mutation`,e),resetAllowlistToBestMatch:e=>n(`localNetwork`,`resetAllowlistToBestMatch`,`mutation`,e)},meshNetwork:{getStatus:e=>n(`meshNetwork`,`getStatus`,`query`,e),join:e=>n(`meshNetwork`,`join`,`mutation`,e),startLogin:e=>n(`meshNetwork`,`startLogin`,`mutation`,e),leave:e=>n(`meshNetwork`,`leave`,`mutation`,e),logout:e=>n(`meshNetwork`,`logout`,`mutation`,e),listPeers:e=>n(`meshNetwork`,`listPeers`,`query`,e),testConnection:e=>n(`meshNetwork`,`testConnection`,`mutation`,e)},metricsProvider:{collectSnapshot:e=>n(`metricsProvider`,`collectSnapshot`,`query`,e),getCached:e=>n(`metricsProvider`,`getCached`,`query`,e),getCurrent:e=>n(`metricsProvider`,`getCurrent`,`query`,e),getDiskSpace:e=>n(`metricsProvider`,`getDiskSpace`,`query`,e),getGpuInfo:e=>n(`metricsProvider`,`getGpuInfo`,`query`,e),getCpuTemperature:e=>n(`metricsProvider`,`getCpuTemperature`,`query`,e),getProcessStats:e=>n(`metricsProvider`,`getProcessStats`,`query`,e),listAddonInstances:e=>n(`metricsProvider`,`listAddonInstances`,`query`,e),getAddonStats:e=>n(`metricsProvider`,`getAddonStats`,`query`,e),listNodeProcesses:e=>n(`metricsProvider`,`listNodeProcesses`,`query`,e),killProcess:e=>n(`metricsProvider`,`killProcess`,`mutation`,e),dumpHeapSnapshot:e=>n(`metricsProvider`,`dumpHeapSnapshot`,`mutation`,e)},mqttBroker:{listBrokers:e=>n(`mqttBroker`,`listBrokers`,`query`,e),getBrokerConfig:e=>n(`mqttBroker`,`getBrokerConfig`,`query`,e),addBroker:e=>n(`mqttBroker`,`addBroker`,`mutation`,e),removeBroker:e=>n(`mqttBroker`,`removeBroker`,`mutation`,e),testConnection:e=>n(`mqttBroker`,`testConnection`,`mutation`,e),startEmbeddedBroker:e=>n(`mqttBroker`,`startEmbeddedBroker`,`mutation`,e),stopEmbeddedBroker:e=>n(`mqttBroker`,`stopEmbeddedBroker`,`mutation`,e),getStatus:e=>n(`mqttBroker`,`getStatus`,`query`,e)},networkAccess:{start:e=>n(`networkAccess`,`start`,`mutation`,e),stop:e=>n(`networkAccess`,`stop`,`mutation`,e),getEndpoint:e=>n(`networkAccess`,`getEndpoint`,`query`,e),getStatus:e=>n(`networkAccess`,`getStatus`,`query`,e),listEndpoints:e=>n(`networkAccess`,`listEndpoints`,`query`,e)},networkQuality:{getAllStats:e=>n(`networkQuality`,`getAllStats`,`query`,e)},nodes:{topology:e=>n(`nodes`,`topology`,`query`,e),deployAddon:e=>n(`nodes`,`deployAddon`,`mutation`,e),undeployAddon:e=>n(`nodes`,`undeployAddon`,`mutation`,e),restartAddon:e=>n(`nodes`,`restartAddon`,`mutation`,e),restartProcess:e=>n(`nodes`,`restartProcess`,`mutation`,e),restartNode:e=>n(`nodes`,`restartNode`,`mutation`,e),shutdownNode:e=>n(`nodes`,`shutdownNode`,`mutation`,e),renameNode:e=>n(`nodes`,`renameNode`,`mutation`,e),clusterAddonStatus:e=>n(`nodes`,`clusterAddonStatus`,`query`,e),getCapUsageGraph:e=>n(`nodes`,`getCapUsageGraph`,`query`,e),getNodeAddons:e=>n(`nodes`,`getNodeAddons`,`query`,e),setProcessLogLevel:e=>n(`nodes`,`setProcessLogLevel`,`mutation`,e),executeQuery:e=>n(`nodes`,`executeQuery`,`mutation`,e)},notificationOutput:{listTargetKinds:e=>n(`notificationOutput`,`listTargetKinds`,`query`,e),listTargets:e=>n(`notificationOutput`,`listTargets`,`query`,e),discoverTargets:e=>n(`notificationOutput`,`discoverTargets`,`query`,e),send:e=>n(`notificationOutput`,`send`,`mutation`,e),testTarget:e=>n(`notificationOutput`,`testTarget`,`mutation`,e),upsertTarget:e=>n(`notificationOutput`,`upsertTarget`,`mutation`,e),deleteTarget:e=>n(`notificationOutput`,`deleteTarget`,`mutation`,e),setTargetEnabled:e=>n(`notificationOutput`,`setTargetEnabled`,`mutation`,e)},osdManager:{getConditionSupport:e=>n(`osdManager`,`getConditionSupport`,`query`,e),copyDeviceConfiguration:e=>n(`osdManager`,`copyDeviceConfiguration`,`mutation`,e)},pipelineExecutor:{getAvailableEngines:e=>n(`pipelineExecutor`,`getAvailableEngines`,`query`,e),getSelectedEngine:e=>n(`pipelineExecutor`,`getSelectedEngine`,`query`,e),getDefaultSteps:e=>n(`pipelineExecutor`,`getDefaultSteps`,`query`,e),getEngineProvisioning:e=>n(`pipelineExecutor`,`getEngineProvisioning`,`query`,e),getVideoPipelineSteps:e=>n(`pipelineExecutor`,`getVideoPipelineSteps`,`query`,e),setVideoPipelineSteps:e=>n(`pipelineExecutor`,`setVideoPipelineSteps`,`mutation`,e),clearDeviceOverrides:e=>n(`pipelineExecutor`,`clearDeviceOverrides`,`mutation`,e),getSchema:e=>n(`pipelineExecutor`,`getSchema`,`query`,e),getGlobalSteps:e=>n(`pipelineExecutor`,`getGlobalSteps`,`query`,e),getGlobalPipelineConfig:e=>n(`pipelineExecutor`,`getGlobalPipelineConfig`,`query`,e),getOrchestratorConfigSchema:e=>n(`pipelineExecutor`,`getOrchestratorConfigSchema`,`query`,e),validatePipeline:e=>n(`pipelineExecutor`,`validatePipeline`,`query`,e),listTemplates:e=>n(`pipelineExecutor`,`listTemplates`,`query`,e),saveTemplate:e=>n(`pipelineExecutor`,`saveTemplate`,`mutation`,e),updateTemplate:e=>n(`pipelineExecutor`,`updateTemplate`,`mutation`,e),deleteTemplate:e=>n(`pipelineExecutor`,`deleteTemplate`,`mutation`,e),getCapabilities:e=>n(`pipelineExecutor`,`getCapabilities`,`query`,e),getAddonModels:e=>n(`pipelineExecutor`,`getAddonModels`,`query`,e),downloadModel:e=>n(`pipelineExecutor`,`downloadModel`,`mutation`,e),deleteModel:e=>n(`pipelineExecutor`,`deleteModel`,`mutation`,e),cacheFrameInPool:e=>n(`pipelineExecutor`,`cacheFrameInPool`,`mutation`,e),inferCached:e=>n(`pipelineExecutor`,`inferCached`,`mutation`,e),uncacheFrame:e=>n(`pipelineExecutor`,`uncacheFrame`,`mutation`,e),getEffectiveTuning:e=>n(`pipelineExecutor`,`getEffectiveTuning`,`query`,e),listLoadedEngines:e=>n(`pipelineExecutor`,`listLoadedEngines`,`query`,e),spinEngine:e=>n(`pipelineExecutor`,`spinEngine`,`mutation`,e),killEngine:e=>n(`pipelineExecutor`,`killEngine`,`mutation`,e),listReferenceImages:e=>n(`pipelineExecutor`,`listReferenceImages`,`query`,e),getReferenceImage:e=>n(`pipelineExecutor`,`getReferenceImage`,`query`,e),getReferenceAudioFiles:e=>n(`pipelineExecutor`,`getReferenceAudioFiles`,`query`,e),getReferenceAudio:e=>n(`pipelineExecutor`,`getReferenceAudio`,`query`,e),getAudioCapabilities:e=>n(`pipelineExecutor`,`getAudioCapabilities`,`query`,e),runAudioTest:e=>n(`pipelineExecutor`,`runAudioTest`,`mutation`,e),getDetectionConfigSchema:e=>n(`pipelineExecutor`,`getDetectionConfigSchema`,`query`,e)},pipelineOrchestrator:{pauseForStorageMigration:e=>n(`pipelineOrchestrator`,`pauseForStorageMigration`,`mutation`,e),resumeForStorageMigration:e=>n(`pipelineOrchestrator`,`resumeForStorageMigration`,`mutation`,e),rebalance:e=>n(`pipelineOrchestrator`,`rebalance`,`mutation`,e),getPipelineAssignments:e=>n(`pipelineOrchestrator`,`getPipelineAssignments`,`query`,e),getAgentLoad:e=>n(`pipelineOrchestrator`,`getAgentLoad`,`query`,e),getGlobalMetrics:e=>n(`pipelineOrchestrator`,`getGlobalMetrics`,`query`,e),getCapabilityBindings:e=>n(`pipelineOrchestrator`,`getCapabilityBindings`,`query`,e),setCapabilityBinding:e=>n(`pipelineOrchestrator`,`setCapabilityBinding`,`mutation`,e),getIngestOwner:e=>n(`pipelineOrchestrator`,`getIngestOwner`,`query`,e),getAudioNodeLoad:e=>n(`pipelineOrchestrator`,`getAudioNodeLoad`,`query`,e),getAgentSettings:e=>n(`pipelineOrchestrator`,`getAgentSettings`,`query`,e),listAgentSettings:e=>n(`pipelineOrchestrator`,`listAgentSettings`,`query`,e),removeAgentSettings:e=>n(`pipelineOrchestrator`,`removeAgentSettings`,`mutation`,e),setAgentMaxCameras:e=>n(`pipelineOrchestrator`,`setAgentMaxCameras`,`mutation`,e),setAgentDetectWeight:e=>n(`pipelineOrchestrator`,`setAgentDetectWeight`,`mutation`,e),setAgentCapabilities:e=>n(`pipelineOrchestrator`,`setAgentCapabilities`,`mutation`,e),setAgentReachableHost:e=>n(`pipelineOrchestrator`,`setAgentReachableHost`,`mutation`,e),setAgentInferenceDevices:e=>n(`pipelineOrchestrator`,`setAgentInferenceDevices`,`mutation`,e),getNodeInferenceDevices:e=>n(`pipelineOrchestrator`,`getNodeInferenceDevices`,`query`,e),resetNodePipelineDefaults:e=>n(`pipelineOrchestrator`,`resetNodePipelineDefaults`,`mutation`,e),getCameraStatuses:e=>n(`pipelineOrchestrator`,`getCameraStatuses`,`query`,e),reconcileFromDisk:e=>n(`pipelineOrchestrator`,`reconcileFromDisk`,`mutation`,e),getReconcileFromDiskStatus:e=>n(`pipelineOrchestrator`,`getReconcileFromDiskStatus`,`query`,e),listTemplates:e=>n(`pipelineOrchestrator`,`listTemplates`,`query`,e),saveTemplate:e=>n(`pipelineOrchestrator`,`saveTemplate`,`mutation`,e),updateTemplate:e=>n(`pipelineOrchestrator`,`updateTemplate`,`mutation`,e),deleteTemplate:e=>n(`pipelineOrchestrator`,`deleteTemplate`,`mutation`,e)},pipelineRunner:{attachCamera:e=>n(`pipelineRunner`,`attachCamera`,`mutation`,e),reportMotion:e=>n(`pipelineRunner`,`reportMotion`,`mutation`,e),getLocalLoad:e=>n(`pipelineRunner`,`getLocalLoad`,`query`,e),getLocalMetrics:e=>n(`pipelineRunner`,`getLocalMetrics`,`query`,e),getAllCameraMetrics:e=>n(`pipelineRunner`,`getAllCameraMetrics`,`query`,e),getLocalCameras:e=>n(`pipelineRunner`,`getLocalCameras`,`query`,e),getNativeCrop:e=>n(`pipelineRunner`,`getNativeCrop`,`query`,e),runStatelessStep:e=>n(`pipelineRunner`,`runStatelessStep`,`mutation`,e)},plateGallery:{getPlateMedia:e=>n(`plateGallery`,`getPlateMedia`,`query`,e),searchPlates:e=>n(`plateGallery`,`searchPlates`,`query`,e),suggestPlateClusters:e=>n(`plateGallery`,`suggestPlateClusters`,`query`,e),correctPlateText:e=>n(`plateGallery`,`correctPlateText`,`mutation`,e),deletePlate:e=>n(`plateGallery`,`deletePlate`,`mutation`,e),listVehicles:e=>n(`plateGallery`,`listVehicles`,`query`,e),createVehicle:e=>n(`plateGallery`,`createVehicle`,`mutation`,e),renameVehicle:e=>n(`plateGallery`,`renameVehicle`,`mutation`,e),deleteVehicle:e=>n(`plateGallery`,`deleteVehicle`,`mutation`,e),listVehicleSamples:e=>n(`plateGallery`,`listVehicleSamples`,`query`,e),removeVehicleSample:e=>n(`plateGallery`,`removeVehicleSample`,`mutation`,e),assignPlate:e=>n(`plateGallery`,`assignPlate`,`mutation`,e),unassignPlate:e=>n(`plateGallery`,`unassignPlate`,`mutation`,e),assignPlates:e=>n(`plateGallery`,`assignPlates`,`mutation`,e),unassignPlates:e=>n(`plateGallery`,`unassignPlates`,`mutation`,e)},recording:{getStorageUsage:e=>n(`recording`,`getStorageUsage`,`query`,e),listOpsLog:e=>n(`recording`,`listOpsLog`,`query`,e),pauseForStorageMigration:e=>n(`recording`,`pauseForStorageMigration`,`mutation`,e),resumeForStorageMigration:e=>n(`recording`,`resumeForStorageMigration`,`mutation`,e),refreshStorageLocationsForMigration:e=>n(`recording`,`refreshStorageLocationsForMigration`,`mutation`,e),startStorageMigrationMove:e=>n(`recording`,`startStorageMigrationMove`,`mutation`,e),getStorageMigrationMoveStatus:e=>n(`recording`,`getStorageMigrationMoveStatus`,`query`,e),cancelStorageMigrationMove:e=>n(`recording`,`cancelStorageMigrationMove`,`mutation`,e),relocateFootage:e=>n(`recording`,`relocateFootage`,`mutation`,e),listRelocateJobs:e=>n(`recording`,`listRelocateJobs`,`query`,e),cancelRelocateJob:e=>n(`recording`,`cancelRelocateJob`,`mutation`,e),planStorageRebalance:e=>n(`recording`,`planStorageRebalance`,`query`,e),startStorageRebalance:e=>n(`recording`,`startStorageRebalance`,`mutation`,e)},recordingExport:{createExport:e=>n(`recordingExport`,`createExport`,`mutation`,e),getExport:e=>n(`recordingExport`,`getExport`,`query`,e),cancelExport:e=>n(`recordingExport`,`cancelExport`,`mutation`,e),deleteExport:e=>n(`recordingExport`,`deleteExport`,`mutation`,e),getDownloadUrl:e=>n(`recordingExport`,`getDownloadUrl`,`query`,e),readExportBytes:e=>n(`recordingExport`,`readExportBytes`,`query`,e)},serverManagement:{getServerPackageStatus:e=>n(`serverManagement`,`getServerPackageStatus`,`query`,e),checkServerUpdate:e=>n(`serverManagement`,`checkServerUpdate`,`mutation`,e),applyServerUpdate:e=>n(`serverManagement`,`applyServerUpdate`,`mutation`,e),rollbackServerUpdate:e=>n(`serverManagement`,`rollbackServerUpdate`,`mutation`,e),restartServer:e=>n(`serverManagement`,`restartServer`,`mutation`,e)},settingsStore:{get:e=>n(`settingsStore`,`get`,`query`,e),set:e=>n(`settingsStore`,`set`,`mutation`,e),query:e=>n(`settingsStore`,`query`,`query`,e),insert:e=>n(`settingsStore`,`insert`,`mutation`,e),update:e=>n(`settingsStore`,`update`,`mutation`,e),delete:e=>n(`settingsStore`,`delete`,`mutation`,e),deleteWhere:e=>n(`settingsStore`,`deleteWhere`,`mutation`,e),updateWhere:e=>n(`settingsStore`,`updateWhere`,`mutation`,e),count:e=>n(`settingsStore`,`count`,`query`,e),histogram:e=>n(`settingsStore`,`histogram`,`query`,e),isEmpty:e=>n(`settingsStore`,`isEmpty`,`query`,e),declareCollection:e=>n(`settingsStore`,`declareCollection`,`mutation`,e)},storage:{resolve:e=>n(`storage`,`resolve`,`query`,e),write:e=>n(`storage`,`write`,`mutation`,e),read:e=>n(`storage`,`read`,`query`,e),exists:e=>n(`storage`,`exists`,`query`,e),list:e=>n(`storage`,`list`,`query`,e),delete:e=>n(`storage`,`delete`,`mutation`,e),getAvailableSpace:e=>n(`storage`,`getAvailableSpace`,`query`,e),beginUpload:e=>n(`storage`,`beginUpload`,`mutation`,e),writeChunk:e=>n(`storage`,`writeChunk`,`mutation`,e),finalizeUpload:e=>n(`storage`,`finalizeUpload`,`mutation`,e),abortUpload:e=>n(`storage`,`abortUpload`,`mutation`,e),beginDownload:e=>n(`storage`,`beginDownload`,`mutation`,e),readChunk:e=>n(`storage`,`readChunk`,`query`,e),endDownload:e=>n(`storage`,`endDownload`,`mutation`,e),listLocations:e=>n(`storage`,`listLocations`,`query`,e),getDefaultLocation:e=>n(`storage`,`getDefaultLocation`,`query`,e),listLocationDeclarations:e=>n(`storage`,`listLocationDeclarations`,`query`,e),upsertLocation:e=>n(`storage`,`upsertLocation`,`mutation`,e),deleteLocation:e=>n(`storage`,`deleteLocation`,`mutation`,e),testLocation:e=>n(`storage`,`testLocation`,`query`,e),listProviders:e=>n(`storage`,`listProviders`,`query`,e),testConfig:e=>n(`storage`,`testConfig`,`query`,e)},storageMigration:{plan:e=>n(`storageMigration`,`plan`,`query`,e),start:e=>n(`storageMigration`,`start`,`mutation`,e),status:e=>n(`storageMigration`,`status`,`query`,e),cancel:e=>n(`storageMigration`,`cancel`,`mutation`,e)},streamBroker:{fetchEventMedia:e=>n(`streamBroker`,`fetchEventMedia`,`mutation`,e),listAllCameraStreams:e=>n(`streamBroker`,`listAllCameraStreams`,`query`,e),listAllProfileSlots:e=>n(`streamBroker`,`listAllProfileSlots`,`query`,e),getBrokerStats:e=>n(`streamBroker`,`getBrokerStats`,`query`,e),probeStream:e=>n(`streamBroker`,`probeStream`,`mutation`,e),listClients:e=>n(`streamBroker`,`listClients`,`query`,e),killClient:e=>n(`streamBroker`,`killClient`,`mutation`,e),getStreamUrl:e=>n(`streamBroker`,`getStreamUrl`,`query`,e),getStreamWithCodec:e=>n(`streamBroker`,`getStreamWithCodec`,`mutation`,e),releaseStreamWithCodec:e=>n(`streamBroker`,`releaseStreamWithCodec`,`mutation`,e),acquireEgressTranscode:e=>n(`streamBroker`,`acquireEgressTranscode`,`mutation`,e),releaseEgressTranscode:e=>n(`streamBroker`,`releaseEgressTranscode`,`mutation`,e),subscribeAudioChunks:e=>n(`streamBroker`,`subscribeAudioChunks`,`mutation`,e),pullAudioChunks:e=>n(`streamBroker`,`pullAudioChunks`,`query`,e),unsubscribeAudioChunks:e=>n(`streamBroker`,`unsubscribeAudioChunks`,`mutation`,e),subscribeFrames:e=>n(`streamBroker`,`subscribeFrames`,`mutation`,e),pullFrameHandles:e=>n(`streamBroker`,`pullFrameHandles`,`query`,e),unsubscribeFrames:e=>n(`streamBroker`,`unsubscribeFrames`,`mutation`,e),setPreBufferDuration:e=>n(`streamBroker`,`setPreBufferDuration`,`mutation`,e),getPreBufferInfo:e=>n(`streamBroker`,`getPreBufferInfo`,`query`,e),getRtspPort:e=>n(`streamBroker`,`getRtspPort`,`query`,e),getAllRtspEntries:e=>n(`streamBroker`,`getAllRtspEntries`,`query`,e),getRtspEntry:e=>n(`streamBroker`,`getRtspEntry`,`query`,e),regenerateRtspToken:e=>n(`streamBroker`,`regenerateRtspToken`,`mutation`,e),setRtspEnabled:e=>n(`streamBroker`,`setRtspEnabled`,`mutation`,e),isRtspEnabled:e=>n(`streamBroker`,`isRtspEnabled`,`query`,e)},system:{info:e=>n(`system`,`info`,`query`,e),health:e=>n(`system`,`health`,`query`,e),featureFlags:e=>n(`system`,`featureFlags`,`query`,e),networkAddresses:e=>n(`system`,`networkAddresses`,`query`,e),getRetentionConfig:e=>n(`system`,`getRetentionConfig`,`query`,e),setRetentionConfig:e=>n(`system`,`setRetentionConfig`,`mutation`,e),forceRetentionCleanup:e=>n(`system`,`forceRetentionCleanup`,`mutation`,e),getSiteLocation:e=>n(`system`,`getSiteLocation`,`query`,e),setSiteLocation:e=>n(`system`,`setSiteLocation`,`mutation`,e),detectSiteLocation:e=>n(`system`,`detectSiteLocation`,`mutation`,e)},terminalSession:{listProfiles:e=>n(`terminalSession`,`listProfiles`,`query`,e),listInstances:e=>n(`terminalSession`,`listInstances`,`query`,e),createInstance:e=>n(`terminalSession`,`createInstance`,`mutation`,e),deleteInstance:e=>n(`terminalSession`,`deleteInstance`,`mutation`,e),setInstanceEnabled:e=>n(`terminalSession`,`setInstanceEnabled`,`mutation`,e),listLegacyCameras:e=>n(`terminalSession`,`listLegacyCameras`,`query`,e),adoptLegacyMonitor:e=>n(`terminalSession`,`adoptLegacyMonitor`,`mutation`,e),listSessions:e=>n(`terminalSession`,`listSessions`,`query`,e),openSession:e=>n(`terminalSession`,`openSession`,`mutation`,e),resize:e=>n(`terminalSession`,`resize`,`mutation`,e),pullOutput:e=>n(`terminalSession`,`pullOutput`,`mutation`,e),writeInput:e=>n(`terminalSession`,`writeInput`,`mutation`,e),close:e=>n(`terminalSession`,`close`,`mutation`,e)},toast:{onToast:(e,t)=>n(`toast`,`onToast`,`subscription`,e,t)},turnProvider:{getTurnServers:e=>n(`turnProvider`,`getTurnServers`,`query`,e)},userManagement:{listUsers:e=>n(`userManagement`,`listUsers`,`query`,e),createUser:e=>n(`userManagement`,`createUser`,`mutation`,e),updateUser:e=>n(`userManagement`,`updateUser`,`mutation`,e),deleteUser:e=>n(`userManagement`,`deleteUser`,`mutation`,e),resetPassword:e=>n(`userManagement`,`resetPassword`,`mutation`,e),setUserScopes:e=>n(`userManagement`,`setUserScopes`,`mutation`,e),validateCredentials:e=>n(`userManagement`,`validateCredentials`,`mutation`,e),listApiKeys:e=>n(`userManagement`,`listApiKeys`,`query`,e),createApiKey:e=>n(`userManagement`,`createApiKey`,`mutation`,e),revokeApiKey:e=>n(`userManagement`,`revokeApiKey`,`mutation`,e),validateApiKey:e=>n(`userManagement`,`validateApiKey`,`mutation`,e),createScopedToken:e=>n(`userManagement`,`createScopedToken`,`mutation`,e),revokeScopedToken:e=>n(`userManagement`,`revokeScopedToken`,`mutation`,e),validateScopedToken:e=>n(`userManagement`,`validateScopedToken`,`query`,e),listScopedTokens:e=>n(`userManagement`,`listScopedTokens`,`query`,e),setupTotp:e=>n(`userManagement`,`setupTotp`,`mutation`,e),confirmTotp:e=>n(`userManagement`,`confirmTotp`,`mutation`,e),disableTotp:e=>n(`userManagement`,`disableTotp`,`mutation`,e),getTotpStatus:e=>n(`userManagement`,`getTotpStatus`,`query`,e),verifyTotp:e=>n(`userManagement`,`verifyTotp`,`mutation`,e),oauthIssueCode:e=>n(`userManagement`,`oauthIssueCode`,`mutation`,e),oauthExchangeCode:e=>n(`userManagement`,`oauthExchangeCode`,`mutation`,e),oauthRefresh:e=>n(`userManagement`,`oauthRefresh`,`mutation`,e),oauthVerifyAccessToken:e=>n(`userManagement`,`oauthVerifyAccessToken`,`query`,e),listOauthSessions:e=>n(`userManagement`,`listOauthSessions`,`query`,e),revokeOauthSession:e=>n(`userManagement`,`revokeOauthSession`,`mutation`,e)}}}var xO=`audio-`;function SO(e){return e.startsWith(xO)?e.slice(6):e}function CO(e){return e.startsWith(xO)?e:`${xO}${e}`}var wO=-96,TO=0,EO=3,DO=-55,OO=1,kO=100,AO=1,jO=300,MO={hitPercent:60,samplingSeconds:10};function NO(e){return e??MO}function PO(e){return e===void 0?null:e.labels!==void 0&&e.labels.length>0?`label`:e.dbThreshold===void 0?null:`level`}function FO(e){return e===void 0?!1:e.dbThreshold===void 0&&(e.labels===void 0||e.labels.length===0)}function IO(e,t,n){return Number.isFinite(e)?Math.min(n,Math.max(t,Math.round(e))):t}function LO(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function RO(e,t){let n=NO(e),r=LO(t,`labels`)?t.labels:n.labels,i=LO(t,`dbThreshold`)?t.dbThreshold:n.dbThreshold,a=r!==void 0&&r.length>0,o=t.mode??(LO(t,`labels`)&&a?`label`:LO(t,`dbThreshold`)&&i!==void 0?`level`:a?`label`:i===void 0?null:`level`),s=o===`label`&&a?r:void 0,c=o===`level`?i??(t.mode===`level`?-55:void 0):void 0;return{...s===void 0?{}:{labels:[...s]},...c===void 0?{}:{dbThreshold:IO(c,-96,0)},hitPercent:IO(t.hitPercent??n.hitPercent,1,100),samplingSeconds:IO(t.samplingSeconds??n.samplingSeconds,1,300)}}function zO(e,t){let n=e?.audioKinds??[],r=n.length>0?n.map(e=>{let t=SO(e.kind);return{value:t,label:e.label,iconId:CO(t),unknown:!1}}):jf.map(e=>({value:e.id,label:e.name,iconId:CO(e.id),unknown:!1})),i=new Set(r.map(e=>e.value)),a=[];for(let e of t??[]){let t=SO(e);i.has(t)||a.includes(t)||(a.push(t),r.push({value:t,label:t,iconId:CO(t),unknown:!0}))}return{choices:r,unknownLabels:a}}function BO(e,t){let n=SO(t);return(e??[]).some(e=>SO(e)===n)}function VO(e,t){let n=SO(t),r=e??[];if(BO(r,n)){let e=r.filter(e=>SO(e)!==n);return e.length>0?e:void 0}return[...r,n]}var HO=new Set([`classes`,`classesExclude`]),UO=new Set([`sensorKinds`]),WO=new Set([`occupancy`]);function GO(e){return{value:e.kind,label:e.label}}function KO(e){let t=[],n=new Map,r=(e,r)=>{let i=n.get(e);if(i!==void 0)return i;let a={fallbackLabel:r,options:[]};return n.set(e,a),t.push(e),a};for(let t of e){let e=t.parentKind??t.kind,n=r(e,t.parentKind===null?t.label:e);n.options.push(GO(t)),t.parentKind===null&&(n.fallbackLabel=t.label)}return t.flatMap(e=>{let t=n.get(e);return t===void 0?[]:[{key:e,fallbackLabel:t.fallbackLabel,options:t.options}]})}function qO(e){let t=[],n=new Map;for(let r of e){let e=r.parentKind??`other`,i=n.get(e);i===void 0?(n.set(e,[GO(r)]),t.push(e)):i.push(GO(r))}return t.flatMap(e=>{let t=n.get(e);return t===void 0?[]:[{key:e,fallbackLabel:e,options:t}]})}function JO(e,t){if(!t)return null;if(HO.has(e)){let e=KO(t.videoClasses);return t.audioKinds.length>0&&e.push({key:`audio`,fallbackLabel:`Audio`,options:t.audioKinds.map(GO)}),e.length>0?{groups:e}:null}if(WO.has(e)){let e=t.videoClasses.filter(e=>e.parentKind===null).map(GO);return e.length>0?{groups:[{key:`macro`,fallbackLabel:`Classes`,options:e}]}:null}if(UO.has(e)){let e=qO(t.labels);return e.length>0?{groups:e}:null}return null}function YO(e){let t=new Set;for(let n of e.groups)for(let e of n.options)t.add(e.value);return t}var XO=[`devices`,`classes`],ZO=new Set(XO);function QO(e){return ZO.has(e)}function $O(e){return e.replace(/!\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/(\*\*|__)(.*?)\1/g,`$2`).replace(/(\*|_)(.*?)\1/g,`$2`).replace(/`([^`]*)`/g,`$1`).replace(/^\s{0,3}#{1,6}\s*/gm,``).replace(/^\s{0,3}>\s?/gm,``).replace(/^\s{0,3}[-*+]\s+/gm,``).replace(/^\s{0,3}\d+\.\s+/gm,``).trim()}var ek=[[/ /g,` `],[/&/g,`&`],[/</g,`<`],[/>/g,`>`],[/"/g,`"`],[/'/g,`'`]];function tk(e){let t=e.replace(/<\s*br\s*\/?\s*>/gi,`
|
|
342
|
-
`).replace(/<\s*\/\s*(p|div|li|h[1-6])\s*>/gi,`
|
|
343
|
-
`).replace(/<[^>]+>/g,``);for(let[e,n]of ek)t=t.replace(e,n);return t.replace(/\n{3,}/g,`
|
|
344
|
-
|
|
345
|
-
`).trim()}var nk=[[/&/g,`&`],[/</g,`<`],[/>/g,`>`],[/"/g,`"`],[/'/g,`'`]];function rk(e){let t=e;for(let[e,n]of nk)t=t.replace(e,n);return t}function ik(e){return rk(e).replace(/\n/g,`<br>`)}function ak(e){return rk(e).replace(/(\*\*|__)(.*?)\1/g,`<b>$2</b>`).replace(/(\*|_)(.*?)\1/g,`<i>$2</i>`).replace(/`([^`]*)`/g,`<code>$1</code>`).replace(/\[([^\]]*)\]\(([^)]*)\)/g,`<a href="$2">$1</a>`).replace(/\n/g,`<br>`)}var ok={text:[`text`,`markdown`,`html`],markdown:[`markdown`,`html`,`text`],html:[`html`,`text`,`markdown`]};function sk(e,t){for(let n of ok[e]??ok.text)if(t.includes(n))return n;return t[0]??`text`}function ck(e,t,n){if(t===n)return e;if(n===`text`){if(t===`markdown`)return $O(e);if(t===`html`)return tk(e)}if(n===`html`){if(t===`text`)return ik(e);if(t===`markdown`)return ak(e)}if(n===`markdown`){if(t===`text`)return e;if(t===`html`)return tk(e)}return e}function lk(e){return{id:e.id,ordinal:e.ordinal,...e.flags?{flags:e.flags}:{},...e.requires?{requires:e.requires}:{}}}function uk(e,t){if(e.length===0)return null;if(t.level!==void 0){let n=e.find(e=>e.id===t.level);if(n)return lk(n)}let n=e.filter(e=>e.ordinal!==null);if(n.length===0)return lk(e[0]);let r=t.priority;return lk([...n].sort((e,t)=>{let n=Math.abs((e.ordinal??0)-r),i=Math.abs((t.ordinal??0)-r);return n===i?(t.ordinal??0)-(e.ordinal??0):n-i})[0])}function dk(e,t){if(!Number.isFinite(t)||t<=0||e.length<=t)return[e];let n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n}function fk(e,t){let n=[],r=t.format,i=sk(r,e.format);i!==r&&n.push(`format`);let a=ck(t.body,r,i),o=uk(e.levels,t),s=t.attachments??[],c=[];for(let t of s){if(!e.attachments.mediaTypes.includes(t.mediaType)){n.push(`attachment:${t.mediaType}`);continue}if(e.attachments.mode===`url`&&t.url===void 0){n.push(`attachment:noUrl`);continue}if(t.bytes!==void 0&&e.attachments.maxBytes!==void 0&&t.bytes.length>e.attachments.maxBytes){n.push(`attachment:maxBytes`);continue}if(c.length>=e.attachments.max){n.push(`attachment:max`);continue}let r=e.attachments.mode===`bytes`&&t.bytes===void 0&&t.url!==void 0;c.push({mediaType:t.mediaType,...t.url===void 0?{}:{url:t.url},...t.bytes===void 0?{}:{bytes:t.bytes},...t.mime===void 0?{}:{mime:t.mime},...t.name===void 0?{}:{name:t.name},needsFetch:r})}let l=t.actions??[],u=l.slice(0,Math.max(0,e.actions));l.length>u.length&&n.push(`actions`);let d=e.actionIcons===!0;!d&&u.some(e=>e.icon!==void 0)&&n.push(`actionIcons`);let f=d?u:u.map(({icon:e,...t})=>t),p=null;t.clickUrl!==void 0&&(e.clickUrl?p=t.clickUrl:n.push(`clickUrl`));let ee=null;t.sound!==void 0&&(e.sound?ee=t.sound:n.push(`sound`));let te=null;t.ttl!==void 0&&(e.ttl?te=t.ttl:n.push(`ttl`));let ne=t.tag??null,re=dk(a,e.bodyMaxLen),m=re.length>1,ie={level:o?.id??``,format:i,attachmentsSent:c.length,actionsSent:f.length,truncated:m,dropped:n};return{body:re[0]??``,...t.title===void 0?{}:{title:t.title},format:i,level:o,attachments:c,actions:f,clickUrl:p,sound:ee,ttl:te,tag:ne,bodyParts:re,renderedAs:ie}}var pk=`An occupancy edge is not a sensor event: it carries no sensor kind, so this condition can never match one.`,mk=`An occupancy edge carries no device event-type token — that comes from an event-emitter slice, which a count crossing has none of.`,hk=`An occupancy edge is always produced by the pipeline, so any other source can never match and “pipeline” narrows nothing.`,gk=`A confirmed sound window is always stamped as an audio subject, so any other source can never match.`,_k=`A sound rule fires on what the camera HEARD. Its subject carries no detection, so this condition can never match one — name the sounds in the Sound condition instead.`,vk=`A sound window’s evidence is a percentage of samples, not a detector score, so a confidence threshold can never be satisfied.`,yk=`A sound has no position in the frame, so a zone or a drawn polygon can never match it.`,bk=[{kind:`detection`,label:`Conditions`,excluded:{},carriesMedia:!0,carriesSubjectCrop:!0},{kind:`sensor`,label:`Conditions`,excluded:{},carriesMedia:!0,carriesSubjectCrop:!0,blurb:`A doorbell press or a linked sensor changing state. The picture comes from the camera the sensor is attributed to.`},{kind:`occupancy`,label:`Occupancy`,discriminator:`occupancy`,excluded:{sensorKinds:pk,eventTypeTokens:mk,source:hk},carriesMedia:!0,carriesSubjectCrop:!0,blurb:`Fires when the count in a camera frame or a zone crosses your threshold and holds. Pick the camera first — the zone list is that camera’s.`},{kind:`sound`,label:`Sound`,discriminator:`audio`,excluded:{classes:_k,classesExclude:_k,minConfidence:vk,zones:yk,zonesExclude:yk,customZones:yk,crossing:yk,labelEquals:_k,identities:_k,identitiesExclude:_k,plates:_k,source:gk},carriesMedia:!0,carriesSubjectCrop:!1,blurb:`Fires on a confirmed sampling window of audio, never on a picture. Name the sounds and/or keep a level threshold — with neither it can never match.`,mediaBlurb:`A sound owns no frame, so the picture is a photograph of the camera taken at the moment of the match — the whole scene, never a crop. The GIF and the clip are cut around the same instant, from the camera.`},{kind:`system`,label:`Events`,discriminator:`systemEvent`,excluded:{},carriesMedia:!1,carriesSubjectCrop:!1,blurb:`The installation itself: a camera or stream dropping, a node leaving, an update landing. There is no detection behind it and no frame to attach.`}];function xk(e){return bk.find(t=>t.kind===e)??bk[0]}var Sk=`system-event`;function Ck(e){return e===Sk}function wk(e){return Ck(e.delivery)?`system`:e.conditions.occupancy!==void 0&&e.delivery===`device-event`?`occupancy`:e.conditions.audio!==void 0&&e.delivery===`immediate`?`sound`:e.delivery===`device-event`?`sensor`:`detection`}function Tk(e,t,n){let r=xk(n);return e.id===r.discriminator?!0:e.appliesTo.includes(t)?r.excluded[e.id]===void 0:!1}function Ek(e,t){let n=xk(t);return e===n.discriminator?null:n.excluded[e]??null}function Dk(e,t){let n=xk(t),r=[];for(let[t,i]of Object.entries(e)){if(i===void 0||Array.isArray(i)&&i.length===0)continue;let e=n.excluded[t];e!==void 0&&r.push({conditionId:t,reason:e})}return r}var Ok=[{key:`all`,label:`All rules`,blurb:`Every notification rule, whatever its trigger. Each rule picks a trigger, matches conditions and fans out to one or more delivery targets.`,newRuleLabel:`New rule`,emptyHint:`No notification rules yet. Create one to be told what your cameras see.`},{key:`detection`,label:`Detections & devices`,blurb:`Rules driven by what the cameras and sensors SEE — detections, tracks, doorbell presses and package events.`,newRuleLabel:`New detection rule`,emptyHint:`No detection rules yet. Create one to be told what your cameras see.`},{key:`audio`,label:`Sound`,blurb:`Rules on what the cameras HEAR: a sustained window of sound loud enough, or classified as one of the sounds you name. A sound rule fires only on a confirmed sampling window, never on a picture.`,newRuleLabel:`New sound rule`,emptyHint:`No sound rules yet. A new sound rule opens on the sound condition already filled in with a level threshold, so you only have to name the sounds and the targets.`},{key:`occupancy`,label:`Occupancy`,blurb:`Rules on how many objects are in a camera frame or a zone, and for how long: "the driveway became occupied", "the garden emptied".`,newRuleLabel:`New occupancy rule`,emptyHint:`No occupancy rules yet. A new occupancy rule opens on the occupancy condition; pick the camera first, then the zone and the count.`},{key:`system`,label:`System events`,blurb:`Rules about the installation itself: a camera or stream dropping, a node leaving the cluster, an addon or server update becoming available. These carry no image and are not tied to a detection.`,newRuleLabel:`New system rule`,emptyHint:`No system-event rules yet. These tell you when a camera drops, a node leaves or an update lands.`}];function kk(e){return Ok.find(t=>t.key===e)??Ok[0]}function Ak(e){return Ok.find(t=>t.key===e)?.key}function jk(e){return e.conditions.audio!==void 0}function Mk(e){return e.conditions.occupancy!==void 0}function Nk(e,t){return t===`all`?!0:t===`system`?Ck(e.delivery):t===`audio`?jk(e):t===`occupancy`?Mk(e):!Ck(e.delivery)&&!jk(e)&&!Mk(e)}function Pk(e){return Nk(e,`system`)?`system`:Nk(e,`audio`)?`audio`:Nk(e,`occupancy`)?`occupancy`:`detection`}var Fk={op:`became-occupied`,count:1,sustainSeconds:15},Ik={hitPercent:MO.hitPercent,samplingSeconds:MO.samplingSeconds,dbThreshold:-55};function Lk(e){switch(e){case`system`:return{delivery:Sk,conditions:{}};case`audio`:return{delivery:`immediate`,conditions:{audio:Ik}};case`occupancy`:return{delivery:`device-event`,conditions:{occupancy:Fk}};default:return{delivery:`immediate`,conditions:{}}}}function Rk(e){return Lk(e).delivery}var zk=[`rule`,`devices`,`conditions`,`notification`,`actions`,`advanced`],Bk={rule:`Rule`,devices:`Cameras`,conditions:`Conditions`,notification:`Notification`,actions:`Actions`,advanced:`Advanced`};function Vk(e){let t=xk(e),n=[];for(let r of zk)r===`devices`&&e===`system`||n.push({key:r,label:r===`conditions`?t.label:Bk[r]});return n}var Hk={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6};function Uk(e,t){let n=new Date(e);if(t!==void 0)try{let e=new Intl.DateTimeFormat(`en-US`,{timeZone:t,weekday:`short`,hour:`numeric`,minute:`numeric`,hourCycle:`h23`}).formatToParts(n),r,i,a;for(let t of e)t.type===`weekday`?r=t.value:t.type===`hour`?i=Number(t.value):t.type===`minute`&&(a=Number(t.value));let o=r===void 0?void 0:Hk[r];if(o!==void 0&&i!==void 0&&a!==void 0)return{day:o,minute:i*60+a}}catch{}return{day:n.getDay(),minute:n.getHours()*60+n.getMinutes()}}function Wk(e,t){if(e===void 0)return!0;let{day:n,minute:r}=Uk(t,e.timezone),i=(n+6)%7,a=!1;for(let t of e.windows)if(t.startMinute<=t.endMinute){if(t.days.includes(n)&&r>=t.startMinute&&r<t.endMinute){a=!0;break}}else if(t.days.includes(n)&&r>=t.startMinute||t.days.includes(i)&&r<t.endMinute){a=!0;break}return e.invert===!0?!a:a}var Gk=[`deviceIds`,`deviceTypes`,`nodeIds`,`packageNames`];function Kk(e,t){switch(t){case`deviceIds`:return e.startsWith(`device-`)||e.startsWith(`stream-`)||e===`detection-blind`||e===`alarm-triggered`||e===`export-completed`;case`deviceTypes`:return e.startsWith(`device-`)||e===`detection-blind`;case`nodeIds`:return e.startsWith(`node-`)||e===`addon-crash-loop`||e===`addon-update-available`||e===`addon-updated`||e===`server-update-available`||e===`server-updated`;case`packageNames`:return e.endsWith(`update-available`)||e===`addon-updated`||e===`server-updated`}}function qk(e,t){return e.some(e=>Kk(e,t))}var Jk=i({title:g().max(500).optional(),body:g().max(2e3).optional()}),Yk=g().min(1).max(200),Xk=p(a()).min(1),Zk=a().int().min(2).max(3600),Qk=a().int().min(1).max(60),$k=p(Np).min(1),eA=a().int().min(1).max(5),tA=.1,nA=a().min(tA).max(3600),rA=a().min(0).max(60),iA=g().max(200),aA=m([`image`,`gif`]),oA=p(g().min(1).max(40)).max(20),sA=i({name:Yk,enabled:v().default(!0),deviceIds:Xk,schedule:yp,cadenceSec:Zk.default(15),framerate:Qk.default(10),denseCadenceSec:nA.optional(),minDwellSec:rA.optional(),targets:$k,template:Jk.optional(),previewText:iA.optional(),previewMode:aA.default(`image`),reportClasses:oA.optional(),priority:eA.default(3)}),cA=`Timelapse {{camera}}`,lA=i({name:Yk.optional(),enabled:v().optional(),deviceIds:Xk.optional(),schedule:yp.optional(),cadenceSec:Zk.optional(),framerate:Qk.optional(),denseCadenceSec:nA.optional(),minDwellSec:rA.optional(),targets:$k.optional(),template:Jk.nullable().optional(),previewText:iA.optional(),previewMode:aA.optional(),reportClasses:oA.optional(),priority:eA.optional()}),uA=sA.extend({id:g(),ownerUserId:g().optional(),lastGeneratedAt:a().optional(),generatedByDevice:n(g(),a()).optional(),createdBy:g(),createdAt:a(),updatedAt:a()});function dA(e){let t=e.denseCadenceSec;if(t!==void 0&&t>=e.cadenceSec)throw Error(`denseCadenceSec (${t}s) must be strictly smaller than cadenceSec (${e.cadenceSec}s) — a dense cadence that is not denser renders a uniform timelapse`)}function fA(e,t){let n=e.generatedByDevice;return n===void 0?e.lastGeneratedAt??0:n[String(t)]??0}var pA=`detail-crop`,mA=`detailCropPaddingRatio`,hA=`detailCropSquare`,gA=i({paddingRatio:a().min(0).max(4),square:v()}),_A={paddingRatio:.15,square:!1};function vA(e){let t=gA.shape.paddingRatio.safeParse(e[mA]),n=gA.shape.square.safeParse(e[hA]);return{paddingRatio:t.success?t.data:_A.paddingRatio,square:n.success?n.data:_A.square}}function yA(e){return typeof e==`object`&&!!e&&`key`in e}function bA(e){if(e===null)return _A;let t={};for(let n of e.sections)for(let e of n.fields)!yA(e)||typeof e.key!=`string`||(e.key===`detailCropPaddingRatio`||e.key===`detailCropSquare`)&&(t[e.key]=e.value);return vA(t)}var xA={min:0,max:1,step:.05,default:_A.paddingRatio};function SA(e,t,n,r){let i=r.paddingRatio*e.w,a=r.paddingRatio*e.h,o={x:e.x-i,y:e.y-a,w:e.w+2*i,h:e.h+2*a};return r.square?TA(CA(o,t,n),t,n):wA(o,t,n)}function CA(e,t,n){let r=Math.min(Math.max(e.w,e.h),Math.min(t,n)),i=e.x+e.w/2,a=e.y+e.h/2;return{x:i-r/2,y:a-r/2,w:r,h:r}}function wA(e,t,n){let r=Math.max(0,e.x),i=Math.max(0,e.y),a=Math.min(t,e.x+e.w),o=Math.min(n,e.y+e.h);return{x:r,y:i,w:Math.max(0,a-r),h:Math.max(0,o-i)}}function TA(e,t,n){let r=Math.max(0,Math.min(e.w,t)),i=Math.max(0,Math.min(e.h,n));return{x:Math.min(Math.max(0,e.x),Math.max(0,t-r)),y:Math.min(Math.max(0,e.y),Math.max(0,n-i)),w:r,h:i}}var EA=`native-lease`,DA=`nativeLeaseHoldFrames`,OA=`nativeLeaseBudgetMb`,kA=`nativeLeaseActivityMs`,AA=`nativeLeaseAdmission`,jA=`nativeTileBudgetMb`,MA=m([`all`,`inferred`]),NA=i({holdFrames:a().int().min(1).max(64),budgetMb:a().int().min(0).max(4096),activityMs:a().int().min(0).max(12e4),admission:MA,tileBudgetMb:a().int().min(0).max(1024)}),Q={holdFrames:8,budgetMb:1024,activityMs:15e3,tileBudgetMb:64,admission:`inferred`},PA={min:1,max:64,step:1,default:Q.holdFrames},FA={min:0,max:4096,step:64,default:Q.budgetMb},IA={min:0,max:12e4,step:1e3,default:Q.activityMs},LA={min:0,max:1024,step:16,default:Q.tileBudgetMb},RA={options:[{value:`all`,label:`Every delivered frame`},{value:`inferred`,label:`Only frames sent to inference`}],default:Q.admission};function zA(e,t){let n=NA.shape[e].safeParse(t);return n.success?n.data===Q[e]?null:n.data:null}function BA(e){let t=MA.safeParse(e);return t.success?t.data===Q.admission?null:t.data:null}function VA(e){let t=zA(`holdFrames`,e[DA]),n=zA(`budgetMb`,e[OA]),r=zA(`activityMs`,e[kA]),i=BA(e[AA]),a=zA(`tileBudgetMb`,e[jA]);return{...t===null?{}:{holdFrames:t},...n===null?{}:{budgetMb:n},...r===null?{}:{activityMs:r},...i===null?{}:{admission:i},...a===null?{}:{tileBudgetMb:a}}}function HA(e){return typeof e==`object`&&!!e&&`key`in e}var UA=[DA,OA,kA,AA,jA];function WA(e){if(e===null)return{};let t={};for(let n of e.sections)for(let e of n.fields)!HA(e)||typeof e.key!=`string`||UA.includes(e.key)&&(t[e.key]=e.value);return VA(t)}var GA=[{id:`viewer`,label:`View`,description:`Watch live and recorded video, browse events and read device state. Cannot change anything.`,deviceAccess:[`view`],systemAccess:[`view`]},{id:`operator`,label:`Operate`,description:`Everything View does, plus acting on a device: PTZ, lights, sirens, locks, and snoozing notifications. Cannot delete.`,deviceAccess:[`view`,`create`],systemAccess:[`view`,`create`]},{id:`manager`,label:`Full management`,description:`Everything Operate does, plus deleting devices, recordings and events. Short of admin — no user or cluster administration.`,deviceAccess:[`view`,`create`,`delete`],systemAccess:[`view`,`create`,`delete`]}];function KA(e){let t=GA.find(t=>t.id===e);if(!t)throw Error(`Unknown access role '${e}'`);return t}function qA(e){let t=KA(e.roleId);return[{type:`device`,selector:e.selector,access:[...t.deviceAccess],includeLinked:e.includeLinked},{type:`category`,target:`system`,access:[...t.systemAccess]}]}function JA(e,t){if(e.length!==t.length)return!1;let n=new Set(e);return t.every(e=>n.has(e))}function YA(e){if(e.length!==2)return null;let t=e.filter(e=>e.type===`device`),n=e.filter(e=>e.type===`category`&&e.target===`system`);if(t.length!==1||n.length!==1)return null;let[r]=t,[i]=n;if(r===void 0||i===void 0||r.type!==`device`||r.includeLinked===void 0)return null;let a=GA.find(e=>JA(e.deviceAccess,r.access)&&JA(e.systemAccess,i.access));return a?{roleId:a.id,selector:r.selector,includeLinked:r.includeLinked}:null}var XA=8;function ZA(e,t){switch(e.kind){case`all`:return!0;case`ids`:return e.ids.includes(t.id);case`types`:return e.types.some(e=>String(e)===t.type);case`locations`:return t.location!==null&&e.locations.includes(t.location)}}function QA(e,t){return e.some(e=>e.type===`category`&&e.target===`device`&&e.access.includes(t))}function $A(e,t){return e.filter(e=>e.type===`device`&&e.access.includes(t))}function ej(e,t){return e.includeLinked??t===`view`}function tj(e,t){let n=[],r=e;for(let e=0;e<XA;e++){let e=r===null?null:t.get(r)?.parentDeviceId??null;if(e===null||e===r)break;n.push(e),r=e}return n}function nj(e,t,n){if(QA(e,n))return new Set(t.map(e=>e.id));let r=new Map;for(let e of t)r.set(e.id,e);let i=$A(e,n),a=new Set;for(let e of t)for(let t of i){if(ZA(t.selector,e)){a.add(e.id);break}if(ej(t,n)&&tj(e.id,r).some(e=>{let n=r.get(e);return n!==void 0&&ZA(t.selector,n)})){a.add(e.id);break}}return a}function rj(e){if(!Array.isArray(e))return[];let t=[];for(let n of e){let e=J.safeParse(n);e.success&&t.push(e.data)}return t}var ij=[`view`,`create`,`delete`];function aj(e,t,n,r){return r?{all:!0,deviceCount:t.length}:{all:QA(e,n)||$A(e,n).some(e=>e.selector.kind===`all`),deviceCount:nj(e,t,n).size}}function oj(e){let t=[];for(let n of e)n.type===`capability`&&t.push({name:n.target,access:n.access});return t}function sj(e){let t=[];for(let n of e)n.type===`addon`&&t.push({name:n.target,access:n.access});return t}function cj(e,t,n){let r={view:aj(e,t,`view`,n),create:aj(e,t,`create`,n),delete:aj(e,t,`delete`,n)},i=n?ij:ij.filter(t=>e.some(e=>e.type===`category`&&e.target===`system`&&e.access.includes(t)));return{isAdmin:n,allDevicesViewable:r.view.all,viewableDeviceCount:r.view.deviceCount,device:r,system:i,capabilities:oj(e),addons:sj(e)}}var lj={camera:{type:`camera`,label:`Camera`,icon:`camera`}},uj={"°C":{dimension:`temperature`,factor:1,offset:0},"°F":{dimension:`temperature`,factor:5/9,offset:-160/9},K:{dimension:`temperature`,factor:1,offset:-273.15},hPa:{dimension:`pressure`,factor:1,offset:0},kPa:{dimension:`pressure`,factor:10,offset:0},Pa:{dimension:`pressure`,factor:.01,offset:0},mbar:{dimension:`pressure`,factor:1,offset:0},bar:{dimension:`pressure`,factor:1e3,offset:0},inHg:{dimension:`pressure`,factor:33.8639,offset:0},mmHg:{dimension:`pressure`,factor:1.33322,offset:0},psi:{dimension:`pressure`,factor:68.9476,offset:0},"m/s":{dimension:`speed`,factor:1,offset:0},"km/h":{dimension:`speed`,factor:1/3.6,offset:0},mph:{dimension:`speed`,factor:.44704,offset:0},kn:{dimension:`speed`,factor:.514444,offset:0},"mm/h":{dimension:`precipitation-rate`,factor:1,offset:0},"in/h":{dimension:`precipitation-rate`,factor:25.4,offset:0},m:{dimension:`length`,factor:1,offset:0},mm:{dimension:`length`,factor:.001,offset:0},cm:{dimension:`length`,factor:.01,offset:0},km:{dimension:`length`,factor:1e3,offset:0},in:{dimension:`length`,factor:.0254,offset:0},ft:{dimension:`length`,factor:.3048,offset:0},mi:{dimension:`length`,factor:1609.344,offset:0},lx:{dimension:`illuminance`,factor:1,offset:0},"W/m²":{dimension:`irradiance`,factor:1,offset:0},W:{dimension:`power`,factor:1,offset:0},kW:{dimension:`power`,factor:1e3,offset:0},VA:{dimension:`apparent-power`,factor:1,offset:0},Wh:{dimension:`energy`,factor:1,offset:0},kWh:{dimension:`energy`,factor:1e3,offset:0},MWh:{dimension:`energy`,factor:1e6,offset:0},V:{dimension:`voltage`,factor:1,offset:0},mV:{dimension:`voltage`,factor:.001,offset:0},A:{dimension:`current`,factor:1,offset:0},mA:{dimension:`current`,factor:.001,offset:0},ppm:{dimension:`concentration-volume`,factor:1,offset:0},ppb:{dimension:`concentration-volume`,factor:.001,offset:0},"µg/m³":{dimension:`concentration-mass`,factor:1,offset:0},"mg/m³":{dimension:`concentration-mass`,factor:1e3,offset:0},kg:{dimension:`mass`,factor:1,offset:0},g:{dimension:`mass`,factor:.001,offset:0},lb:{dimension:`mass`,factor:.453592,offset:0},oz:{dimension:`mass`,factor:.0283495,offset:0},"%":{dimension:`percentage`,factor:1,offset:0}},dj=class extends Error{from;to;reason;constructor(e,t,n){super(`[units] cannot convert '${e}' → '${t}': ${n}`),this.name=`UnitConversionError`,this.from=e,this.to=t,this.reason=n}};function fj(e){return Object.hasOwn(uj,e)?uj[e]:void 0}function pj(e){return fj(e)?.dimension}function mj(e,t){return e*t.factor+t.offset}function hj(e,t){return(e-t.offset)/t.factor}function gj(e,t,n){if(t===n)return e;let r=fj(t);if(!r)throw new dj(t,n,`unknown-from`);let i=fj(n);if(!i)throw new dj(t,n,`unknown-to`);if(r.dimension!==i.dimension)throw new dj(t,n,`cross-dimension`);return hj(mj(e,r),i)}function _j(e,t,n){if(t===n)return e;let r=fj(t);if(!r)return;let i=fj(n);if(i&&r.dimension===i.dimension)return hj(mj(e,r),i)}function vj(e,t){if(e===t)return!0;let n=pj(e);return n===void 0?!1:n===pj(t)}function yj(e){let t=[];for(let[n,r]of Object.entries(uj))r.dimension===e&&t.push(n);return t}function bj(e,t){let n=e.length,r=t.length;if(n===0)return r;if(r===0)return n;let i=Array.from({length:r+1},(e,t)=>t),a=Array.from({length:r+1},()=>0);for(let o=1;o<=n;o++){a[0]=o;let n=i[0]??0;for(let s=1;s<=r;s++){let r=i[s]??0,c=a[s-1]??0,l=e.charCodeAt(o-1)===t.charCodeAt(s-1)?0:1;a[s]=Math.min(r+1,c+1,n+l),n=r}for(let e=0;e<=r;e++)i[e]=a[e]??0}return i[r]??0}function xj(e,t){let n=e.trim().toLowerCase(),r=t.trim().toLowerCase();return n===r?1:n.length===0||r.length===0?0:1-bj(n,r)/Math.max(n.length,r.length)}function Sj(e,t,n=.8){let r=null,i=0;for(let a of t){let t=xj(e,a);t>=n&&t>i&&(r=a,i=t)}return r}var Cj=`addon:`;function wj(e){return e.startsWith(Cj)?e.slice(6):e}function Tj(e,t){return wj(e)===wj(t)}function Ej(e,t){if(e.length!==t.length)return 0;let n=0,r=0,i=0;for(let a=0;a<e.length;a++)n+=e[a]*t[a],r+=e[a]*e[a],i+=t[a]*t[a];let a=Math.sqrt(r)*Math.sqrt(i);return a===0?0:n/a}var Dj=class{elementId;cache={};listeners=new Set;loaded=!1;getBackend;constructor(e,t){this.elementId=e,this.getBackend=typeof t==`function`?t:()=>t}async ensureLoaded(){if(this.loaded)return;let e=this.getBackend();if(!e)throw Error(`ElementConfigStore(${this.elementId}): settings backend not available`);let t=await e.query({collection:`config`,filter:{where:{id:this.elementId},limit:1}});t.length>0&&(this.cache=t[0].data??{}),this.loaded=!0}getAll(){return{...this.cache}}get(e){let t=e.split(`.`),n=this.cache;for(let e of t){if(typeof n!=`object`||!n||Array.isArray(n))return;n=Reflect.get(n,e)}return n}async set(e,t){await this.ensureLoaded(),Oj(this.cache,e,t),await this.persist(),this.notifyListeners()}async setAll(e){await this.ensureLoaded(),this.cache={...e},await this.persist(),this.notifyListeners()}onChange(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}async load(){await this.ensureLoaded()}async loadDefaults(e){await this.ensureLoaded(),Object.keys(this.cache).length===0&&(this.cache={...e},await this.persist())}async persist(){let e=this.getBackend();if(!e)throw Error(`ElementConfigStore(${this.elementId}): settings backend not available — cannot persist config`);await e.set({collection:`config`,key:this.elementId,value:this.cache})}notifyListeners(){let e=this.getAll();for(let t of this.listeners)try{t(e)}catch{}}};function Oj(e,t,n){let r=t.split(`.`),i=e;for(let e=0;e<r.length-1;e++){let t=r[e],n=i[t];if(typeof n!=`object`||!n||Array.isArray(n)){let e={};i[t]=e,i=e}else i=n}i[r[r.length-1]]=n}function kj(e,t){return`https://huggingface.co/${e}/resolve/main/${t}`}var Aj=[/^user$/i,/^usr$/i,/^username$/i,/^password$/i,/^pwd$/i,/^pass$/i,/^passwd$/i,/^secret$/i,/^token$/i,/^auth$/i,/^auth[_-]?token$/i,/^bearer$/i,/^api[_-]?key$/i,/^access[_-]?token$/i,/^refresh[_-]?token$/i];function jj(e){return Aj.some(t=>t.test(e))}function Mj(e){try{let t=new URL(e),n=!1;(t.username||t.password)&&(t.username=``,t.password=``,n=!0);for(let e of Array.from(t.searchParams.keys()))jj(e)&&(t.searchParams.set(e,`***`),n=!0);return n?t.toString():e}catch{return e}}var $=1024*1024,Nj={sampleIntervalMs:6e4,baselineSettleSamples:5,baselineSampleCount:3,restartMultiple:4,floorBytes:1024*$,ceilingBytes:3072*$,cooldownMs:30*6e4,maxRestartsPerWindow:6,restartWindowMs:1440*6e4};function Pj(e){let t=(t,n,r)=>{let i=e[t];if(i===void 0)return n;let a=Number(i);return Number.isFinite(a)&&a>=r?a:n},n=Nj;return{sampleIntervalMs:t(`CAMSTACK_POOL_MEM_INTERVAL_MS`,n.sampleIntervalMs,5e3),baselineSettleSamples:n.baselineSettleSamples,baselineSampleCount:n.baselineSampleCount,restartMultiple:t(`CAMSTACK_POOL_MEM_MULTIPLE`,n.restartMultiple,1.5),floorBytes:t(`CAMSTACK_POOL_MEM_FLOOR_MB`,n.floorBytes/$,128)*$,ceilingBytes:t(`CAMSTACK_POOL_MEM_CEILING_MB`,n.ceilingBytes/$,256)*$,cooldownMs:t(`CAMSTACK_POOL_MEM_COOLDOWN_MS`,n.cooldownMs,6e4),maxRestartsPerWindow:t(`CAMSTACK_POOL_MEM_MAX_RESTARTS`,n.maxRestartsPerWindow,1),restartWindowMs:t(`CAMSTACK_POOL_MEM_RESTART_WINDOW_MS`,n.restartWindowMs,6e4)}}function Fj(e){let t=t=>{let n=e.match(RegExp(`^${t}:\\s+(\\d+)\\s*kB`,`m`));return n?Number(n[1])*1024:null},n=t(`VmRSS`);if(n===null)return null;let r=e.match(/^Threads:\s+(\d+)/m);return{rssBytes:n,vmBytes:t(`VmSize`)??0,hwmBytes:t(`VmHWM`)??0,swapBytes:t(`VmSwap`)??0,threads:r?Number(r[1]):0}}function Ij(){return{settleSeen:0,baselineWindow:[],baselineBytes:null,restartsAt:[],lastRestartAt:null}}function Lj(e){let t=[...e].sort((e,t)=>e-t);return t[Math.floor(t.length/2)]}function Rj(e,t,n){if(e.baselineBytes!==null)return e;if(e.settleSeen<n.baselineSettleSamples)return{...e,settleSeen:e.settleSeen+1};let r=[...e.baselineWindow,t];return r.length<n.baselineSampleCount?{...e,baselineWindow:r}:{...e,baselineWindow:r,baselineBytes:Lj(r)}}function zj(e,t){return e===null?t.ceilingBytes:Math.min(t.ceilingBytes,Math.max(t.floorBytes,t.restartMultiple*e))}function Bj(e,t,n){return e.filter(e=>t-e<n.restartWindowMs)}function Vj(e,t,n,r){let i=Rj(e,t,r),a=zj(i.baselineBytes,r);if(t<=a)return{state:i,action:i.baselineBytes===null?`baseline-pending`:`ok`,baselineBytes:i.baselineBytes,thresholdBytes:a};let o=Bj(i.restartsAt,n,r),s={...i,restartsAt:o};return o.length>=r.maxRestartsPerWindow?{state:s,action:`exhausted`,baselineBytes:i.baselineBytes,thresholdBytes:a}:s.lastRestartAt!==null&&n-s.lastRestartAt<r.cooldownMs?{state:s,action:`cooldown`,baselineBytes:i.baselineBytes,thresholdBytes:a}:{state:s,action:`restart`,baselineBytes:i.baselineBytes,thresholdBytes:a}}function Hj(e,t){return{...Ij(),restartsAt:[...e.restartsAt,t],lastRestartAt:t}}function Uj(e){return{...Ij(),restartsAt:e.restartsAt,lastRestartAt:e.lastRestartAt}}function Wj(e){if(e.length===0)return null;let t=e[0];for(let n of e)n.rssBytes/n.thresholdBytes>t.rssBytes/t.thresholdBytes&&(t=n);return t.key}var Gj=class{pools=new Map;timer=null;sweeping=!1;stopped=!1;opts;now;setTimer;clearTimer;constructor(e){this.opts=e,this.now=e.now??(()=>Date.now()),this.setTimer=e.setTimer??((e,t)=>setTimeout(e,t)),this.clearTimer=e.clearTimer??(e=>clearTimeout(e))}start(){this.timer||this.stopped||this.arm()}stop(){this.stopped=!0,this.timer&&=(this.clearTimer(this.timer),null)}arm(){let e=this.setTimer(()=>{this.sweep().finally(()=>{this.stopped||this.arm()})},this.opts.policy.sampleIntervalMs);typeof e.unref==`function`&&e.unref(),this.timer=e}async sweep(){if(!this.sweeping){this.sweeping=!0;try{await this.doSweep()}catch(e){this.opts.log.warn(`pool memory sweep failed`,{meta:{error:e instanceof Error?e.message:String(e)}})}finally{this.sweeping=!1}}}async doSweep(){let e=this.now(),t=await this.opts.sample(),n=[],r=new Map;for(let i of t){let t=this.pools.get(i.key),a=t?.state??Ij();t&&t.pids.length>0&&!Kj(t.pids,i.pids)&&(this.opts.log.warn(`pool process changed outside the watchdog — re-baselining`,{meta:{poolKey:i.key,previousPids:t.pids,pids:i.pids}}),a=Uj(a));let o=Vj(a,i.rssBytes,e,this.opts.policy);this.pools.set(i.key,{state:o.state,pids:i.pids}),r.set(i.key,o),this.opts.log.info(`pool memory`,{meta:{poolKey:i.key,pids:i.pids,rssMb:Math.round(i.rssBytes/$),baselineMb:o.baselineBytes===null?null:Math.round(o.baselineBytes/$),thresholdMb:Math.round(o.thresholdBytes/$),action:o.action,...i.meta}}),o.action===`restart`?n.push({key:i.key,rssBytes:i.rssBytes,thresholdBytes:o.thresholdBytes}):o.action===`cooldown`?this.opts.log.warn(`pool over memory threshold but inside restart cooldown`,{meta:{poolKey:i.key,rssMb:Math.round(i.rssBytes/$),thresholdMb:Math.round(o.thresholdBytes/$),cooldownMs:this.opts.policy.cooldownMs}}):o.action===`exhausted`&&this.opts.log.error(`pool memory watchdog gave up — restart budget exhausted, pool leaks faster than restarts can pay for; needs a heap profile (py-spy / tracemalloc)`,{meta:{poolKey:i.key,rssMb:Math.round(i.rssBytes/$),thresholdMb:Math.round(o.thresholdBytes/$),maxRestartsPerWindow:this.opts.policy.maxRestartsPerWindow,restartWindowMs:this.opts.policy.restartWindowMs}})}for(let e of[...this.pools.keys()])t.some(t=>t.key===e)||this.pools.delete(e);let i=Wj(n);if(i===null)return;let a=n.find(e=>e.key===i),o=r.get(i),s=this.pools.get(i),c=s.state.restartsAt.length+1;this.opts.log.warn(`pool memory watchdog restarting pool — RSS over threshold`,{meta:{poolKey:i,pids:s.pids,rssMb:Math.round(a.rssBytes/$),thresholdMb:Math.round(a.thresholdBytes/$),baselineMb:o.baselineBytes===null?null:Math.round(o.baselineBytes/$),restartsInWindow:c,deferredCandidates:n.filter(e=>e.key!==i).map(e=>e.key)}});try{await this.opts.restart(i),this.pools.set(i,{state:Hj(s.state,this.now()),pids:[]})}catch(e){this.opts.log.error(`pool memory watchdog restart failed`,{meta:{poolKey:i,error:e instanceof Error?e.message:String(e)}})}}};function Kj(e,t){if(e.length!==t.length)return!1;let n=[...e].sort((e,t)=>e-t),r=[...t].sort((e,t)=>e-t);return n.every((e,t)=>e===r[t])}function qj(e,t,n){let r=t*n;if(r<=0||e.length===0)return Array.from({length:Math.max(0,r)}).fill(!1);let i=Array.from({length:r}).fill(!1);for(let r=0;r<n;r++)for(let a=0;a<t;a++){let o=(a+.5)/t,s=(r+.5)/n;for(let n of e)if(o>=n.x&&o<=n.x+n.w&&s>=n.y&&s<=n.y+n.h){i[r*t+a]=!0;break}}return i}function Jj(e,t,n,r){if(t<=0||n<=0||r<=0)return[];let i=t*n,a=Array.from({length:i}).fill(!1),o=Math.min(e.length,i);for(let t=0;t<o;t++)a[t]=e[t]===!0;let s=[],c=[];for(let e=0;e<=n;e++){let r=[];if(e<n){let n=-1;for(let i=0;i<=t;i++){let o=i<t&&a[e*t+i]===!0;o&&n===-1?n=i:!o&&n!==-1&&(r.push({colStart:n,colEnd:i-1}),n=-1)}}let i=new Set,o=[];for(let t of c){let n=r.findIndex(e=>e.colStart===t.colStart&&e.colEnd===t.colEnd);n>=0?(o.push(t),i.add(n)):s.push({...t,rowEnd:e-1})}for(let t=0;t<r.length;t++)if(!i.has(t)){let n=r[t];o.push({colStart:n.colStart,colEnd:n.colEnd,rowStart:e})}c.length=0;for(let e of o)c.push(e)}if(s.length===0)return[];let l=s.slice().toSorted((e,t)=>{let n=(e.colEnd-e.colStart+1)*(e.rowEnd-e.rowStart+1);return(t.colEnd-t.colStart+1)*(t.rowEnd-t.rowStart+1)-n});return(r>0?l.slice(0,r):l).map(e=>({x:e.colStart/t,y:e.rowStart/n,w:(e.colEnd-e.colStart+1)/t,h:(e.rowEnd-e.rowStart+1)/n}))}var Yj=class{capacity;items;head=0;tail=0;count=0;constructor(e){this.capacity=e,this.items=Array.from({length:e})}get size(){return this.count}push(e){this.items[this.tail]=e,this.tail=(this.tail+1)%this.capacity,this.count<this.capacity?this.count++:this.head=(this.head+1)%this.capacity}drain(e){let t=[],n=Math.min(e,this.count);for(let e=0;e<n;e++)t.push(this.items[this.head]),this.items[this.head]=void 0,this.head=(this.head+1)%this.capacity;return this.count-=n,t}};async function Xj(e,t){let n=performance.now();try{return{output:t===void 0?await e():await Qj(e(),t),durationMs:Zj(performance.now()-n),ok:!0}}catch(e){return{output:void 0,durationMs:Zj(performance.now()-n),ok:!1,error:Fn(e)}}}function Zj(e){return Math.round(e*100)/100}function Qj(e,t){return new Promise((n,r)=>{let i=setTimeout(()=>r(Error(`Inference timeout after ${t}ms`)),t);e.then(e=>{clearTimeout(i),n(e)}).catch(e=>{clearTimeout(i),r(e)})})}var $j={cpu:`onnx`,coreml:`onnx`,cuda:`onnx`,tensorrt:`onnx`,"onnx-py":`onnx`,pytorch:`pt`,openvino:`openvino`},eM={openvino:`openvino`,edgetpu:`tflite`,coreml:`coreml`,onnx:`onnx`,cpu:`onnx`,cuda:`onnx`};function tM(e){return eM[e]??`onnx`}var nM={onnx:`onnx`,coreml:`coreml`,openvino:`openvino`,tflite:`tflite`,pytorch:`pt`},rM={coreml:`coreml_inference.py`,pytorch:`pytorch_inference.py`,openvino:`openvino_inference.py`};function iM(e,t){return e===`node`?`onnx`:{coreml:`coreml`,openvino:`openvino`,pytorch:`pytorch`,"onnx-py":`onnx`,cpu:`onnx`}[t]??t}function aM(e,t){return e===`node`?$j[t]??`onnx`:{coreml:`coreml`,openvino:`openvino`,pytorch:`pt`,"onnx-py":`onnx`,cpu:`onnx`}[t]??`onnx`}function oM(e,t){return!e||e===`auto`?`auto`:iM(e,t??`cpu`)}function sM(e){return $j[e]??`onnx`}function cM(e){return nM[e]}function lM(e){return rM[e]}function uM(e){return e===`coreml`||e===`pytorch`||e===`openvino`}function dM(e){let t=e instanceof Float32Array?e:Float32Array.from(e),n=new Uint8Array(t.length*4),r=new DataView(n.buffer);for(let e=0;e<t.length;e+=1)r.setFloat32(e*4,t[e]??0,!0);return Buffer.from(n).toString(`base64`)}function fM(e){let t=Buffer.from(e,`base64`);if(t.byteLength%4!=0)throw Error(`decodeVectorBase64: ${t.byteLength} bytes is not a whole number of Float32 values`);let n=new Float32Array(t.byteLength/4);for(let e=0;e<n.length;e+=1)n[e]=t.readFloatLE(e*4);return n}function pM(e){return Math.floor(Buffer.from(e,`base64`).byteLength/4)}function mM(e,t,n,r,i){if(n.length===0||t.length===0)return{passed:e,excluded:[]};let a=n.filter(e=>e.enabled!==!1),o=a.filter(e=>e.mode===`include`),s=a.filter(e=>e.mode===`exclude`),c=o.length>0,l=new Map(t.map(e=>[e.id,e])),u=[],d=[];for(let t of e){let e=r(t),n=i?.(t),a=o.some(t=>hM(t,e,n,l)),f=s.some(t=>hM(t,e,n,l));c?a&&!f?u.push(t):d.push(t):f?d.push(t):u.push(t)}return{passed:u,excluded:d}}function hM(e,t,n,r){if(e.classFilter&&e.classFilter.length>0&&n!==void 0&&!e.classFilter.includes(n))return!1;for(let n of e.zoneIds){let e=r.get(n);if(e&&gM(t,e.polygon))return!0}return!1}function gM(e,t){if(t.length<3)return!1;let n=!1,{x:r,y:i}=e;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a];o.y>i!=s.y>i&&r<(s.x-o.x)*(i-o.y)/(s.y-o.y||2**-52)+o.x&&(n=!n)}return n}function _M(e,t,n){let r={};for(let i of Object.keys(n))r[i]=n=>e.addons.custom.mutate({addonId:t,action:i,input:n});return r}var vM={value:`auto`,label:`Auto`},yM={value:`cpu`,label:`CPU`},bM={value:`usb`,label:`Coral USB`},xM=[{id:`onnx`,supports:()=>!0,devices:e=>{if(!e)return[yM];let t=[yM];return e.gpu?.type===`nvidia`&&t.push({value:`cuda`,label:`CUDA`}),e.npu?.type===`apple-ane`&&t.push({value:`coreml`,label:`CoreML EP`}),t},defaultDevice:`cpu`},{id:`openvino`,supports:e=>e?.arch===`x64`&&e.platform!==`darwin`&&e.gpu?.type===`intel`,devices:e=>{if(!e)return[vM];let t=[vM,yM];return e.gpu?.type===`intel`&&t.push({value:`gpu`,label:`GPU`}),e.npu?.type===`intel-npu`&&t.push({value:`npu`,label:`NPU`}),t},defaultDevice:`auto`},{id:`coreml`,supports:e=>e?.platform===`darwin`,devices:e=>{let t={value:`all`,label:`All (ANE + GPU + CPU)`};if(!e)return[t];let n=[t];return e.npu?.type===`apple-ane`&&n.push({value:`ane`,label:`Apple Neural Engine`}),n.push({value:`gpu`,label:`GPU`},yM),n},defaultDevice:`all`},{id:`edgetpu`,supports:e=>e?.coral!=null,devices:()=>[bM],defaultDevice:`usb`}];function SM(e){let t=xM.find(t=>t.id===e);if(!t)throw Error(`Unknown runtime: ${e}`);return t}function CM(e){return xM.filter(t=>t.supports(e)).map(e=>e.id)}function wM(e,t){return SM(e).devices(t)}function TM(e){return SM(e).defaultDevice}function EM(e){return e===`edgetpu`?`tflite`:cM(e)}function DM(e){let t=[];if(e.platform===`darwin`&&e.arch===`arm64`&&t.push({runtime:`python`,backend:`coreml`,format:`coreml`,score:95,reason:`Apple Neural Engine (Python CoreML)`,available:!0}),e.gpu?.type===`nvidia`&&t.push({runtime:`python`,backend:`cuda`,format:`onnx`,score:85,reason:`NVIDIA CUDA (Python ONNX Runtime)`,available:!0}),e.gpu?.type===`intel`){let n=e.npu?.type===`intel-npu`?90:80;t.push({runtime:`python`,backend:`openvino`,format:`openvino`,score:n,reason:`Intel OpenVINO`,available:!0})}e.coral!=null&&t.push({runtime:`python`,backend:`edgetpu`,format:`tflite`,score:70,reason:`Coral Edge TPU (Python LiteRT)`,available:!0}),t.push({runtime:`python`,backend:`cpu`,format:`onnx`,score:50,reason:`CPU (Python ONNX Runtime)`,available:!0});let n=t.toSorted((e,t)=>t.score-e.score);return{scores:n,best:n.find(e=>e.available)??n[n.length-1]}}var OM={cuda:`gpu`,edgetpu:`usb`,coreml:`all`,cpu:`cpu`};function kM(e,t,n,r){return{key:e===`cpu`?`cpu`:`${e}:${t}`,backend:e,device:t,format:n,runtime:`python`,score:r,available:!0}}function AM(e){let{scores:t}=DM(e),n=[];for(let r of t){if(r.backend===`openvino`){e.npu?.type===`intel-npu`&&n.push(kM(`openvino`,`npu`,r.format,r.score+2)),e.gpu?.type===`intel`&&n.push(kM(`openvino`,`gpu`,r.format,r.score));continue}if(r.backend===`edgetpu`){let t=Math.max(1,e.coral?.count??1);for(let e=0;e<t;e++){let t=e===0?`usb`:`usb:${e}`;n.push(kM(`edgetpu`,t,r.format,r.score))}continue}let t=OM[r.backend]??r.backend;n.push(kM(r.backend,t,r.format,r.score))}return n}export{GE as ACCESSORY_LABEL,GA as ACCESS_ROLES,Kn as ALEXA_EGRESS_PROFILE,iO as ALL_CAPABILITY_DEFINITIONS,Nf as APPLE_SA_TO_MACRO,Fr as AUDIO_ANALYSIS_CAP_NAME,Ds as AUDIO_BACKEND_CHOICES,jf as AUDIO_MACRO_LABELS,cn as AUDIO_PRESETS,sy as AccessoriesStatusSchema,Z as AccessoryKind,Zd as AddBrokerInputSchema,ky as AddonAutoUpdateSchema,Cy as AddonListItemSchema,Jo as AddonPageDeclarationSchema,Ko as AddonPageInfoSchema,Ul as AdoptionAdoptInputSchema,Wl as AdoptionAdoptResultSchema,Tr as AdoptionCandidateResultSchema,Il as AdoptionFilterSchema,Bl as AdoptionGetCandidateInputSchema,Er as AdoptionJobSchema,Cr as AdoptionJobStateSchema,Rl as AdoptionListCandidatesInputSchema,zl as AdoptionListCandidatesOutputSchema,wr as AdoptionOutcomeSchema,Gl as AdoptionReleaseInputSchema,Vl as AdoptionStatusSchema,o_ as AgentLoadSummarySchema,Vy as AirQualitySensorStatusSchema,Zf as AlarmArmModeSchema,Qf as AlarmPanelStatusSchema,Xf as AlarmStateSchema,hs as AlertSchema,fs as AlertSeveritySchema,ms as AlertSourceSchema,ps as AlertStatusSchema,Uy as AmbientLightSensorStatusSchema,Sm as ApiKeyRecordSchema,iE as ApiKeySummarySchema,Us as ArchiveEntrySchema,Ws as ArchiveManifestSchema,uf as AttachmentMediaTypeSchema,df as AttachmentSchema,ws as AudioAnalysisResultSchema,Ts as AudioAnalysisSettingsSchema,xs as AudioChunkInputSchema,Gy as AudioClassSummarySchema,Cs as AudioClassificationLabelSchema,Es as AudioClassificationResultSchema,js as AudioCodecInfoSchema,Ms as AudioDecodeSessionConfigSchema,Vn as AudioEncodeSchema,Ns as AudioEncodeSessionConfigSchema,Fs as AudioEncodedChunkSchema,ih as AudioEventSchema,Ss as AudioLevelSchema,qy as AudioMetricsHistoryPointSchema,Jy as AudioMetricsHistorySchema,Ky as AudioMetricsSnapshotSchema,Ps as AudioPcmChunkSchema,Rs as AuthResultSchema,Oy as AutoUpdateSettingsSchema,Po as AutomationActionSchema,ko as AutomationConditionOperatorSchema,Mo as AutomationConditionSchema,Xy as AutomationControlStatusSchema,Fo as AutomationRecipeSchema,No as AutomationTriggerSchema,Px as AvailableIntegrationTypeSchema,$j as BACKEND_TO_FORMAT,Wn as BASE_LIVE_EGRESS_PROFILE,hD as BATTERY_DEVICE_PROFILE,vD as BATTERY_UNREACHABLE_AFTER_MS,Jt as BOOT_RECOVERY_BACKOFF_MS,Ex as BacklightModeSchema,Bs as BackupDestinationInfoSchema,Hs as BackupEntrySchema,Fe as BaseAddon,ZE as BaseDevice,$E as BaseDeviceProvider,Qy as BatteryStatusSchema,eb as BinaryStatusSchema,H as BoundingBoxSchema,nb as BrightnessStatusSchema,ec as BrokerAddInputSchema,wc as BrokerAudioClientSchema,Oc as BrokerClientsSchema,Xd as BrokerConnectionDetailsSchema,Ec as BrokerConsumerAttributionSchema,Tc as BrokerConsumerKindSchema,Cc as BrokerDecodedClientSchema,Dc as BrokerEncodedClientSchema,pc as BrokerGetStateInputSchema,Yd as BrokerInfoSchema,Zs as BrokerProviderInfoSchema,lc as BrokerPublishInputSchema,Xs as BrokerRegistryStatusSchema,Sc as BrokerRtspClientSchema,st as BrokerStatsSchema,Js as BrokerStatusEnum,ot as BrokerStatusSchema,uc as BrokerSubscribeInputSchema,dc as BrokerSubscribeResultSchema,rc as BrokerTestConnectionResultSchema,fc as BrokerUnsubscribeInputSchema,Lr as CAMERA_SWITCH_CATALOG,kr as CAMERA_SWITCH_ORDER,Be as CAM_PROFILE_ORDER,nO as CAPABILITY_NAMES,rO as CAPABILITY_ROUTER_KEYS,tO as CAP_NAMES_WITH_STATUS,gt as CAP_NODE_PIN_CONTEXT_KEY,dO as CAP_PROVIDER_KIND_MAP,Ef as COCO_80_LABELS,Af as COCO_TO_MACRO,vb as CONNECTION_TEST_TIMEOUT_MS,tl as CORE_BLOCKS_ADDON_ID,el as CORE_BLOCK_ADDON_PREFIX,S as CamProfileSchema,CT as CamStreamDescriptorSchema,Ve as CamStreamKindSchema,He as CamStreamResolutionSchema,f_ as CameraAssignmentStatusSchema,S_ as CameraAudioStatusSchema,p_ as CameraBrokerProfileSchema,m_ as CameraBrokerStatusSchema,ab as CameraCredentialsSchema,ob as CameraCredentialsStatusSchema,h_ as CameraDecoderShmSchema,g_ as CameraDecoderStatusSchema,b_ as CameraDetectionPhaseSchema,y_ as CameraDetectionProvisioningSchema,v_ as CameraDetectionProvisioningStateSchema,x_ as CameraDetectionStatusSchema,Cg as CameraMetricsSchema,wg as CameraMetricsWithDeviceIdSchema,__ as CameraMotionStatusSchema,C_ as CameraRecordingModeSchema,w_ as CameraRecordingStatusSchema,d_ as CameraSourceStatusSchema,u_ as CameraSourceStreamSchema,E_ as CameraStatusDegradationReasonSchema,D_ as CameraStatusDegradationSchema,k_ as CameraStatusSchema,T_ as CameraStatusStageSchema,Ue as CameraStreamSchema,Ar as CameraSwitchAuthoritySchema,Nr as CameraSwitchGroupSchema,Or as CameraSwitchIdSchema,Mr as CameraSwitchSchema,jr as CameraSwitchUnavailableReasonSchema,Ll as CandidateQueryFilterSchema,_m as CapScopeSchema,c_ as CapabilityBindingsSchema,cb as CarbonMonoxideStatusSchema,Nt as ChargingStatus,MS as ClientNetworkStatsSchema,db as ClimateControlStatusSchema,ty as ClipPlaybackSchema,ey as ClipSchema,HS as ClusterAddonNodeDeploymentSchema,US as ClusterAddonStatusEntrySchema,gl as CollectionColumnSchema,_l as CollectionIndexSchema,gb as ColorStatusSchema,gu as ConfigEntrySchema,ts as ConfigSectionWithValuesSchema,es as ConfigTabDeclarationSchema,xb as ConnectionTestDescriptorSchema,bb as ConnectionTestInputSchema,yb as ConnectionTestOutcomeSchema,Cb as ConnectivityStatusSchema,Tb as ConsumableItemSchema,Eb as ConsumablesStatusSchema,Ob as ContactStatusSchema,Ab as ControlKindSchema,jb as ControlStatusSchema,Ca as ConvertArtifactSchema,wa as ConvertResultSchema,xa as ConvertTargetSchema,sl as CoreBlockCompileResultSchema,ol as CoreBlockInputSchema,il as CoreBlockPlacementSchema,U as CoreBlockSchema,al as CoreBlockStatusSchema,Pb as CoverStateSchema,Fb as CoverStatusSchema,aE as CreateApiKeyInputSchema,oE as CreateApiKeyResultSchema,Lx as CreateIntegrationInputSchema,cE as CreateScopedTokenInputSchema,lE as CreateScopedTokenResultSchema,nE as CreateUserInputSchema,zy as CustomActionInputSchema,fl as CustomModelDescriptorSchema,ze as DATAPLANE_SECRET_HEADER,nD as DECLARED_DEVICE_SWEEP_LIMIT,eD as DECLARED_INTEGRATION_FIXED_KEY,hr as DEFAULT_ADDON_PLACEMENT,Os as DEFAULT_AUDIO_ANALYZER_CONFIG,Sl as DEFAULT_DECODER_HWACCEL_CONFIG,_A as DEFAULT_DETAIL_CROP_CONVENTION,gi as DEFAULT_EVENTS_BAND_BUFFER_SEC,Lf as DEFAULT_EVENT_COLOR,Qr as DEFAULT_FEATURES,Q as DEFAULT_NATIVE_LEASE_SETTINGS,Nj as DEFAULT_POOL_MEMORY_POLICY,Di as DEFAULT_RECORDING_PROFILES,Dr as DEFAULT_RETENTION,bt as DEFAULT_RUNTIME_STATE_DURABILITY,bi as DEFAULT_SCRUB_THUMBNAIL_PRESET,cA as DEFAULT_TIMELAPSE_PREVIEW_TEXT,xA as DETAIL_CROP_PADDING_FIELD,mA as DETAIL_CROP_PADDING_KEY,pA as DETAIL_CROP_SECTION_ID,hA as DETAIL_CROP_SQUARE_KEY,Of as DETECTION_MACRO_CLASSES,Pr as DETECTION_PIPELINE_CAP_NAME,eM as DEVICE_BACKEND_TO_FORMAT,sO as DEVICE_CAP_NAMES,gD as DEVICE_PROFILES,Kt as DEVICE_SCOPED_CAPS,wt as DEVICE_SETTINGS_CONTRIBUTION_METHODS,zE as DEVICE_STATE_READERS,Tt as DEVICE_STATUS_METHOD,iD as DEVICE_TYPE_CONTROL_KIND,lj as DEVICE_TYPE_INFO,yl as DataStoreEngineInfoSchema,Lb as DayNightModeSchema,Bb as DayNightOptionsSchema,Vb as DayNightSettingsPatchSchema,zb as DayNightStatusSchema,rD as DeclaredDevices,rt as DecodedAudioChunkSchema,$e as DecodedFrameSchema,Yi as DecoderSessionConfigSchema,Ji as DecoderStatsSchema,zx as DeleteIntegrationResultSchema,gA as DetailCropConventionSchema,eh as DetectionSourceSchema,Kx as DeviceCodeSeveritySchema,qE as DeviceConfig,Pl as DeviceDiscoveryStatusSchema,tu as DeviceExportExposeInputSchema,Ql as DeviceExportStatusSchema,nu as DeviceExportUnexposeInputSchema,Mt as DeviceFeature,hu as DeviceInfoSchema,NS as DeviceNetworkStatsSchema,O as DeviceRole,JE as DeviceRuntimeState,vm as DeviceSelectorSchema,Ub as DeviceStatusSchema,D as DeviceType,Nl as DiscoveredChildDeviceSchema,Ml as DiscoveredChildStatusSchema,au as DiscoveredDeviceSchema,xf as DiscoveredTargetSchema,O_ as DiskReconcileJobSchema,Re as DisposerChain,Kb as DoorbellPressEventSchema,Gb as DoorbellStatusSchema,R_ as EVENTFUL_CAP_NAMES,L_ as EVENT_KIND_BY_CAP,ci as EVENT_PAD_MS,Vf as EVENT_TAXONOMY,zw as EXPORT_DENSE_MAX_RANGES,Pa as EXPRESSION_BUILTINS,Fa as EXPRESSION_BUILTIN_NAMES,Va as EXPRESSION_COMPILE_CACHE_CAPACITY,Ha as EXPRESSION_IDENTIFIER_RE,vo as EXPRESSION_INJECTED_NOW,Pc as EgressEncodeSchema,Fc as EgressRateControlSchema,Ic as EgressTranscodeRequestSchema,Lc as EgressTranscodeSchema,Dj as ElementConfigStore,ku as EmbeddingInfoSchema,Ou as EmbeddingResultSchema,Hn as EncodeProfileSchema,Qe as EncodedPacketSchema,us as EnrichedWidgetMetadataSchema,Jb as EnumSensorDateTimeFormatSchema,Yb as EnumSensorStatusSchema,he as EventCategory,Qb as EventEmitterStatusSchema,Zb as EventFireSchema,ex as EventItemSchema,Am as EventKindCategorySchema,Mm as EventKindDescriptorSchema,km as EventKindIconSchema,Dm as EventKindSchema,Nm as EventKindsForDeviceSchema,vc as EventMediaArtifactSchema,yc as EventMediaCoverageSchema,_c as EventMediaKindSchema,bc as EventMediaProductionSchema,Pn as EventSourceType,qw as ExportBytesSchema,Rw as ExportDenseRangeSchema,Bw as ExportDenseSchema,Gw as ExportDownloadSchema,Hw as ExportOptionsSchema,Ww as ExportRecordSchema,Xl as ExportSetupFieldSchema,Zl as ExportSetupSchema,Lw as ExportSpeedSchema,Uw as ExportStateSchema,Vw as ExportTimelapseSchema,eu as ExposedDeviceSchema,Tx as ExposureModeSchema,To as ExpressionBindingSourceSchema,I as ExpressionEvalError,So as ExpressionFieldBindingSchema,wo as ExpressionGlobalBindingSchema,Co as ExpressionLiteralBindingSchema,F as ExpressionParseError,Eo as ExpressionSourceSchema,lx as FanControlStatusSchema,cx as FanDirectionSchema,zT as FeatureManifestSchema,dx as FeatureProbeStatusSchema,px as FloodStatusSchema,jn as Fmp4BoxSplitter,et as FrameHandleFormatSchema,C as FrameHandleSchema,ys as FrameInputSchema,hx as GasStatusSchema,Mc as GetStreamWithCodecInputSchema,s_ as GlobalMetricsSchema,Qn as HAP_AUDIO_BASE,Zn as HAP_AUDIO_BITRATE_KBPS,$n as HAP_AUDIO_VBV_KBITS,er as HAP_KEYFRAME_INTERVAL_SEC,UE as HF_BASE_URL,HE as HF_REPO,xl as HWACCEL_OPTIONS,BT as HealthStatusSchema,od as HfModelResolutionSchema,NE as HistoryPointSchema,jE as HistoryResolutionEnum,_x as HumidifierStatusSchema,yx as HumiditySensorStatusSchema,ub as HvacModeSchema,U_ as ImageContractSchema,H_ as ImageContractStateSchema,Cx as ImageRotateSchema,kx as ImageSettingsOptionsSchema,Ax as ImageSettingsPatchSchema,Ox as ImageSettingsStatusSchema,xx as ImageStatusSchema,l_ as IngestOwnerSchema,wy as InstalledPackageSchema,Nx as IntegrationLiteSchema,Mx as IntegrationWithStateSchema,Vx as IntercomAbilitySchema,Hx as IntercomStatusSchema,oO as KNOWN_CAP_NAMES,Ah as KeyEventSchema,$r as LOG_LEVEL_RANK,qm as LabelAttributionSchema,na as LabelDefinitionSchema,Km as LabelTierSchema,Gx as LawnMowerActivitySchema,qx as LawnMowerControlStatusSchema,vu as LinkedDeviceSchema,_u as LinkedDevicesModeSchema,rd as LlmDefaultSchema,nd as LlmDefaultSelectorSchema,Ku as LlmDownloadProgressSchema,Fu as LlmErrorCodeSchema,Hu as LlmGenerateBaseInputSchema,Lu as LlmGenerateErrSchema,Iu as LlmGenerateOkSchema,Ru as LlmGenerateResultSchema,zu as LlmImageSchema,Ju as LlmNodeModelSchema,td as LlmProfileKindDescriptorSchema,Qu as LlmProfileKindSchema,$u as LlmProfileSchema,Bu as LlmRetryPolicySchema,Xu as LlmRuntimeCompleteInputSchema,Yu as LlmRuntimeDiskUsageSchema,sd as LlmRuntimeNodeSchema,qu as LlmRuntimeStatusSchema,Vu as LlmTimeoutDefaults,id as LlmUsageRollupSchema,Pu as LlmUsageSchema,Nw as LocateSegmentResultSchema,Gs as LocationStatSchema,iS as LockControlStatusSchema,rS as LockStateSchema,fd as LogEntrySchema,dd as LogLevelSchema,Ly as LogStreamEntrySchema,vd as LoginMethodContributionSchema,md as LoginStageEnum,Df as MACRO_LABELS,Qv as MAX_CLIP_EVENT_IDS,$v as MAX_CLIP_LABELS,Do as MAX_CONDITION_DEPTH,Oo as MAX_CONDITION_LEAVES,La as MAX_EXPRESSION_AST_NODES,za as MAX_EXPRESSION_BINDINGS,Ba as MAX_EXPRESSION_CALL_ARGS,Ra as MAX_EXPRESSION_EVAL_STEPS,Ia as MAX_EXPRESSION_SOURCE_LENGTH,aO as METHOD_ACCESS_MAP,lO as METHOD_DEVICE_SELECTORS,ga as MODEL_FORMATS,sD as MOTION_TRIGGER_FEATURE,ad as ManagedModelCatalogEntrySchema,Uu as ManagedModelExtraFileSchema,Wu as ManagedModelRefSchema,Gu as ManagedRuntimeConfigSchema,cp as MaskGridDimsSchema,rp as MaskGridShapeSchema,ip as MaskLineShapeSchema,ep as MaskPointSchema,np as MaskPolygonShapeSchema,sp as MaskPolygonVerticesSchema,tp as MaskRectShapeSchema,op as MaskShapeKindSchema,ap as MaskShapeSchema,sh as MediaFileInfoSchema,oh as MediaFileSchema,sS as MediaPlayerRepeatSchema,oS as MediaPlayerStateSchema,lS as MediaPlayerStatusSchema,fS as MeshPeerSchema,pS as MeshStatusSchema,mm as MethodAccessSchema,ba as ModelCatalogEntrySchema,zd as ModelConvertInputSchema,Sa as ModelConvertMetadataSchema,Vd as ModelDistributeInputSchema,Hd as ModelDistributeResultSchema,_a as ModelExtraFileSchema,P as ModelFormatEntrySchema,va as ModelFormatsSchema,ig as ModelSubstitutionSchema,ya as ModelVariantGroupSchema,Gd as MotionAnalysisResultSchema,$m as MotionEventSchema,gS as MotionOnMotionChangedDataSchema,Wd as MotionRegionSchema,Hg as MotionSourceEnum,Ug as MotionSourcesSchema,hS as MotionStatusSchema,yS as MotionTriggerRuntimeStateSchema,vS as MotionTriggerStatusSchema,CS as MotionZoneOptionsSchema,wS as MotionZonePatchSchema,xS as MotionZoneRegionSchema,SS as MotionZoneStatusSchema,rf as MqttBrokerStatusSchema,ml as MutationFilterSchema,IA as NATIVE_LEASE_ACTIVITY_FIELD,kA as NATIVE_LEASE_ACTIVITY_KEY,RA as NATIVE_LEASE_ADMISSION_FIELD,AA as NATIVE_LEASE_ADMISSION_KEY,FA as NATIVE_LEASE_BUDGET_FIELD,OA as NATIVE_LEASE_BUDGET_KEY,PA as NATIVE_LEASE_HOLD_FIELD,DA as NATIVE_LEASE_HOLD_KEY,EA as NATIVE_LEASE_SECTION_ID,LA as NATIVE_LEASE_TILE_BUDGET_FIELD,jA as NATIVE_LEASE_TILE_BUDGET_KEY,pp as NC_ALARM_SYSTEM_EVENT_KINDS,Sp as NC_AUDIO_DBFS_FLOOR,TO as NC_AUDIO_DB_MAX,wO as NC_AUDIO_DB_MIN,DO as NC_AUDIO_DB_OFFERED,EO as NC_AUDIO_DB_STEP,MO as NC_AUDIO_DEFAULTS,kO as NC_AUDIO_HIT_PERCENT_MAX,OO as NC_AUDIO_HIT_PERCENT_MIN,jO as NC_AUDIO_SAMPLING_MAX_SEC,AO as NC_AUDIO_SAMPLING_MIN_SEC,Ik as NC_AUDIO_SEED,fp as NC_AUTHORABLE_SYSTEM_EVENT_KINDS,XO as NC_BASE_CONDITION_KEYS,Yp as NC_CONDITION_CATALOG,Vp as NC_CONFIRM_DEFAULT_MAX_IMAGE_PX,Bp as NC_CONFIRM_DEFAULT_TIMEOUT_MS,zp as NC_CONFIRM_MAX_TIMEOUT_MS,Rp as NC_CONFIRM_MIN_TIMEOUT_MS,_p as NC_DEFAULT_SNOOZE_MINUTES,em as NC_HISTORY_LIMIT_DEFAULT,tm as NC_HISTORY_LIMIT_MAX,hp as NC_MAX_PER_TRACK_IMMEDIATE,Fk as NC_OCCUPANCY_DEFAULTS,zk as NC_RULE_EDITOR_SECTION_ORDER,bk as NC_RULE_KIND_SPECS,Ok as NC_RULE_SECTIONS,gp as NC_SNOOZE_MAX_MINUTES,Sk as NC_SYSTEM_DELIVERY,Gk as NC_SYSTEM_EVENT_FILTER_KEYS,Yf as NC_TAXONOMY,kg as NativeCropBboxSchema,Gh as NativeCropRefSchema,Ag as NativeCropResultSchema,DS as NativeDetectionSchema,MA as NativeLeaseAdmissionSchema,NA as NativeLeaseSettingsSchema,ES as NativeObjectClassEnum,kS as NativeObjectDetectionRuntimeStateSchema,OS as NativeObjectDetectionStatusSchema,fm as NcAlarmConfigSchema,dm as NcAlarmModeCoverageSchema,cm as NcAlarmSettingsPatchSchema,sm as NcAlarmSettingsSchema,lm as NcAlarmSkipReasonSchema,um as NcAlarmSkippedDeviceSchema,Cp as NcAudioConditionSchema,Jp as NcConditionDescriptorSchema,Mp as NcConditionsSchema,Hp as NcConfirmExpectSchema,Up as NcConfirmSchema,wp as NcCrossingSchema,lp as NcDeliverySchema,Ap as NcDeviceStateConditionSchema,$p as NcHistoryEntrySchema,nm as NcHistoryFilterSchema,Zp as NcHistoryRecordKindSchema,Xp as NcHistoryStatusSchema,Qp as NcHistorySubjectSchema,Pp as NcMediaFrameSchema,Fp as NcMediaPolicySchema,xp as NcOccupancyConditionSchema,bp as NcPlateMatcherSchema,Ep as NcRuleActionSchema,Dp as NcRuleActionSequenceSchema,kp as NcRuleActionsSchema,Wp as NcRuleInputSchema,Op as NcRuleNotificationButtonSchema,Gp as NcRulePatchSchema,Kp as NcRuleSchema,Np as NcRuleTargetSchema,jp as NcSceneConditionSchema,yp as NcScheduleSchema,vp as NcScheduleWindowSchema,im as NcSnoozeInputSchema,am as NcSnoozeSchema,rm as NcSnoozeScopeSchema,om as NcSnoozeSuppressedSchema,mp as NcSystemEventConditionSchema,up as NcSystemEventKindSchema,Gf as NcTaxonomyEntrySchema,Kf as NcTaxonomySchema,qp as NcTestResultSchema,Ip as NcThrottleGranularitySchema,Lp as NcThrottleSchema,Tp as NcZoneConditionSchema,sf as NetworkAccessStatusSchema,VT as NetworkAddressSchema,of as NetworkEndpointSchema,pf as NotificationActionIconSchema,mf as NotificationActionSchema,ff as NotificationFormatSchema,hf as NotificationSchema,eC as NotifierStatusSchema,iC as NumericSensorStatusSchema,si as OPS_LOG_DEFAULT_LIMIT,oi as OPS_LOG_RING_DEFAULT_MAX,wm as OauthIntegrationDescriptorSchema,rh as ObjectEventSchema,ti as OpsLogDomainSchema,ii as OpsLogEntrySchema,ni as OpsLogOpSchema,ai as OpsLogQueryInputSchema,ri as OpsLogReasonSchema,Sg as OrchestratorMetricsSchema,oC as OsdOverlayKindEnum,uC as OsdOverlayPatchSchema,cC as OsdOverlaySchema,sC as OsdPositionEnum,hC as OsdRenderOutcomeEnum,gC as OsdRenderResultSchema,pC as OsdSlotBindingSchema,mC as OsdSlotViewSchema,vC as OsdSourceOptionSchema,fC as OsdSourceSchema,_C as OsdSourceValueTypeEnum,lC as OsdStatusSchema,xC as PET_FEEDER_MANUAL_FEED_MAX,bC as PET_FEEDER_MANUAL_FEED_MIN,LE as PIPELINE_FLOW_CAPABILITY_NAMES,RE as PIPELINE_OWNER_CAPABILITY_NAMES,Ir as PRIVACY_MASK_CAP_NAME,fO as PROVIDER_KIND_CAP_NAMES,rM as PYTHON_SCRIPT,Ty as PackageUpdateSchema,Ey as PackageVersionInfoSchema,_d as PasskeyLoginMethodSchema,Mv as PasskeySummarySchema,As as PcmSampleFormatSchema,DE as PerScopeBreakdownSchema,wC as PetFeederStatusSchema,Vc as PickStreamPreferencesSchema,Bc as PickStreamRequirementsSchema,Hc as PickedCamStreamSchema,a_ as PipelineAssignmentSchema,Yh as PipelineDefaultStepSchema,Y as PipelineEngineChoiceSchema,bg as PipelineRunResultBridge,X as PipelineStepInputSchema,ag as PipelineValidationIssueSchema,og as PipelineValidationResultSchema,kc as PlaceholderReasonSchema,Eg as PolygonPointSchema,Gj as PoolMemoryWatchdog,JC as PowerMeterStatusSchema,ZC as PresenceStatusSchema,$C as PressureSensorStatusSchema,iw as PrivacyMaskOptionsSchema,aw as PrivacyMaskPatchSchema,nw as PrivacyMaskRegionSchema,tw as PrivacyMaskShapeSchema,rw as PrivacyMaskStatusSchema,ct as ProfileRtspEntrySchema,Ge as ProfileSlotSchema,We as ProfileSlotStatusSchema,iu as ProviderStatusSchema,_w as PtzAutotrackRuntimeStateSchema,mw as PtzAutotrackSettingsSchema,gw as PtzAutotrackStatusSchema,hw as PtzAutotrackTargetOptionSchema,uw as PtzMoveCommandSchema,fw as PtzOptionsSchema,lw as PtzPositionSchema,cw as PtzPresetSchema,dw as PtzStatusSchema,W as QueryFilterSchema,Jn as RATE_CONTROL_RELAXED,qn as RATE_CONTROL_TIGHT,TD as REACHABILITY_FAILURES_TO_OFFLINE,wD as REACHABILITY_POLL_INTERVAL_MS,ED as REACHABILITY_PROBE_TIMEOUT_MS,Gi as RECOGNITION_TYPES,Kw as RECORDING_EXPORT_MAX_READ_BYTES,Ua as RESERVED_BINDING_NAMES,vO as RESTORED_CAP_NAMES,WE as RUNTIME_DEFAULTS,mO as RUNTIME_STATE_POLICY,nM as RUNTIME_TO_FORMAT,zt as RawStateResultSchema,Fw as ReadGopBytesResultSchema,Pw as ReadSegmentBytesResultSchema,pt as ReadinessRegistry,lt as ReadinessTimeoutError,Oh as RecentTracksPageSchema,Dh as RecentTracksQueryInput,Sw as RecordingAvailabilitySchema,pi as RecordingBandModeSchema,hi as RecordingBandSchema,mi as RecordingBandTriggersSchema,Ti as RecordingConfigSchema,Cw as RecordingDaysSchema,Tw as RecordingDeviceUsageSchema,Ew as RecordingLocationUsageSchema,ww as RecordingManifestSchema,xw as RecordingRangeSchema,Mw as RecordingRebalanceInputSchema,Ow as RecordingRebalanceMoveSchema,jw as RecordingRebalancePlanSchema,kw as RecordingRebalanceSkipReasonSchema,Aw as RecordingRebalanceSkipSchema,vi as RecordingRetentionSchema,bw as RecordingStatusSchema,di as RecordingStorageModeSchema,Dw as RecordingStorageUsageSchema,fi as RecordingTriggersSchema,li as RecordingWeekdaySchema,hd as RedirectLoginMethodSchema,ji as RelocateFootageClassSchema,Mi as RelocateFootageInputSchema,Ai as RelocateJobSchema,ki as RelocateJobStateSchema,Pi as RelocateMediaInputSchema,Sf as RenderedAsSchema,Wg as ReportMotionInputSchema,ph as RetrainAnnotationDraftSchema,lh as RetrainAnnotationKindSchema,fh as RetrainAnnotationSchema,uh as RetrainAnnotationSourceSchema,xh as RetrainAssistResultSchema,bh as RetrainAssistSubjectSchema,_h as RetrainCopyRefusalSchema,hh as RetrainFrameCandidateSchema,yh as RetrainFrameListSchema,gh as RetrainFrameSchema,vh as RetrainFrameSelectionSchema,ch as RetrainMacroClassSchema,Vm as RetrainStatusSchema,mh as RetrainTrackSchema,Sh as RetrainTransitionResultSchema,Yj as RingBuffer,Nc as RtpSourceSchema,xc as RtspRestreamEntrySchema,qg as RunnerCameraConfigSchema,Jg as RunnerCameraDeviceUIFields,Gg as RunnerFrameSourceSchema,Kg as RunnerInferenceDeviceSchema,Yg as RunnerLocalLoadSchema,Xg as RunnerLocalMetricsSchema,Xw as SCENE_CONDITIONS,uT as SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX,lT as SCENE_CONFIRM_DEFAULT_TIMEOUT_MS,sT as SCENE_DEFAULT_ANCHOR_THRESHOLD,oT as SCENE_DEFAULT_CHECK_INTERVAL_SEC,aT as SCENE_DEFAULT_OBSERVATION_SPACING_SEC,iT as SCENE_DEFAULT_QUIET_SECONDS,cT as SCENE_DEFAULT_UNCOVERED_POLICY,Qw as SCENE_DIVERGED,dT as SCENE_RESET_RECAPTURES,yO as SCOPE_PRESETS,xi as SCRUB_THUMBNAIL_PRESETS,Si as SCRUB_THUMBNAIL_PRESET_LABELS,Ci as SCRUB_THUMBNAIL_PRESET_ORDER,lD as SENSOR_FEATURES,dD as SENSOR_MAP,Al as SOURCE_INFO_METADATA_KEY,NT as STREAM_PROFILE_META,Hr as STREAM_QUALITY_LABELS,Wi as SUB_DETECTION_TYPES,cO as SYSTEM_CAP_NAMES,uO as SYSTEM_SCOPE_DEVICE_METHODS,rT as SceneCheckSchema,Yw as SceneConditionSchema,fT as SceneConfirmSchema,pT as SceneMonitorSchema,nT as SceneMonitorStateSchema,mT as SceneMonitorStatusSchema,tT as SceneReferenceSchema,eT as SceneUnavailableSchema,Zw as SceneUncoveredPolicySchema,$w as SceneVerdictSchema,Cm as ScopedTokenSchema,sE as ScopedTokenSummarySchema,Nh as ScoredObjectEventSchema,yT as ScriptRunnerStatusSchema,yi as ScrubThumbnailPresetSchema,Dy as SearchResultSchema,X_ as SendEmailInputSchema,Z_ as SendEmailResultSchema,Cf as SendResultSchema,Pm as SensorEventSchema,B_ as ServerBootModeSchema,G_ as ServerPackageStatusSchema,W_ as ServerRollbackInfoSchema,q_ as ServerUpdateActionResultSchema,K_ as ServerUpdateCheckResultSchema,V_ as ServerUpdateStateSchema,GT as SetSiteLocationInputSchema,ns as SettingsPatchSchema,hl as SettingsRecordSchema,V as SettingsSchemaWithValuesSchema,rs as SettingsUpdateResultSchema,Cl as ShmRingStatsSchema,UT as SiteLocationSchema,HT as SiteLocationSourceSchema,WT as SiteLocationStatusSchema,xT as SmokeStatusSchema,Q_ as SmtpStatusSchema,ev as SnapshotImageSchema,El as SourceInfoSchema,bs as SpatialDetectionSchema,rv as SsoBridgeClaimsSchema,tf as StartEmbeddedInputSchema,kE as StationaryObjectSchema,_v as StorageAbortUploadInputSchema,vv as StorageBeginDownloadInputSchema,yv as StorageBeginDownloadResultSchema,pv as StorageBeginUploadInputSchema,mv as StorageBeginUploadResultSchema,xv as StorageEndDownloadInputSchema,gv as StorageFinalizeUploadInputSchema,qi as StorageLocationDeclarationSchema,N as StorageLocationRefSchema,M as StorageLocationSchema,Ki as StorageLocationTypeSchema,Ii as StorageMigrationClassSchema,Li as StorageMigrationDestinationsSchema,Ni as StorageMigrationFootageMoveInputSchema,Ri as StorageMigrationInputSchema,Hi as StorageMigrationJobSchema,j as StorageMigrationLeaseInputSchema,Fi as StorageMigrationMediaMoveInputSchema,Vi as StorageMigrationMoveSchema,Bi as StorageMigrationParticipantSchema,zi as StorageMigrationPhaseSchema,Ui as StorageMigrationPlanSchema,dv as StorageProviderInfoSchema,bv as StorageReadChunkInputSchema,fv as StorageTestLocationResultSchema,hv as StorageWriteChunkInputSchema,zc as StreamCodecSchema,gc as StreamFormatSchema,jS as StreamNetworkStatsSchema,AT as StreamParamsOptionsSchema,OT as StreamParamsStatusSchema,DT as StreamProfileConfigSchema,kT as StreamProfileOptionsSchema,jT as StreamProfilePatchSchema,ET as StreamProfileSchema,Xe as StreamSourceEntrySchema,Ze as StreamSourceSchema,it as SubscribeAudioChunksInputSchema,at as SubscribeAudioChunksResultSchema,tt as SubscribeFramesInputSchema,nt as SubscribeFramesResultSchema,LT as SwitchStatusSchema,Ld as SystemMetricsSchema,BD as SystemMirror,G as TAXONOMY_COLORS,tA as TIMELAPSE_DENSE_FLOOR_SEC,Qi as TIMEZONES,Xn as TRANSCODE_DOWN_MAX_BITRATE_KBPS,Yn as TRANSCODE_DOWN_MAX_HEIGHT,qT as TamperStatusSchema,hE as TankStatusSchema,_f as TargetKindCapsSchema,gf as TargetKindLevelSchema,yf as TargetKindSchema,bf as TargetSchema,YT as TemperatureSensorStatusSchema,Tv as TerminalInstanceInfoSchema,Ev as TerminalLegacyCameraSchema,Ov as TerminalOutputBatchSchema,Dv as TerminalOutputEventSchema,wv as TerminalProfileInfoSchema,Cv as TerminalSessionInfoSchema,Ix as TestConnectionResultSchema,Fx as TestConnectionStatusEnum,wf as TestResultSchema,sA as TimelapseRuleInputSchema,lA as TimelapseRulePatchSchema,uA as TimelapseRuleSchema,Jk as TimelapseTemplateSchema,ZT as ToastSchema,J as TokenScopeSchema,BS as TopologyNodeSchema,IS as TopologyProcessSchema,FS as TopologyServiceSchema,Fh as TrackCascadeCountsSchema,Lm as TrackEnvelopeSchema,Wm as TrackFlagsPatchSchema,Gm as TrackFlagsSchema,Rm as TrackProjectionSchema,Zm as TrackSchema,Bm as TrackSourceSchema,Em as TrackStateSchema,Om as TrackZoneFilterSchema,jh as TrackedDetectionSchema,Ym as TrainingExportDeviceTotalsSchema,Xm as TrainingExportSummarySchema,Av as TurnServerSchema,uj as UNIT_TABLE,Ys as UnifiedBrokerInfoSchema,dj as UnitConversionError,Rx as UpdateIntegrationInputSchema,$T as UpdateStatusSchema,rE as UpdateUserInputSchema,xm as UserRecordSchema,tE as UserSummarySchema,_i as VISIT_MERGE_GAP_MS,gE as VacuumControlStatusSchema,mE as VacuumStateSchema,vE as ValveStateSchema,yE as ValveStatusSchema,zv as VectorDeclareIndexInputSchema,Gv as VectorDeleteByFilterInputSchema,Wv as VectorDeleteInputSchema,Kv as VectorDeleteResultSchema,Iv as VectorFilterSchema,qv as VectorGetInputSchema,Jv as VectorGetResultSchema,Lv as VectorItemSchema,Rv as VectorMatchSchema,Fv as VectorMetadataSchema,Pv as VectorMetricSchema,Hv as VectorQueryInputSchema,Uv as VectorQueryResultSchema,Yv as VectorStatsInputSchema,Xv as VectorStatsResultSchema,Bv as VectorUpsertInputSchema,Vv as VectorUpsertResultSchema,xE as VibrationStatusSchema,Bn as VideoEncodeSchema,Gn as WEBRTC_EGRESS_PROFILE,ge as WELL_KNOWN_TABS,_e as WELL_KNOWN_TAB_MAP,CE as WaterHeaterStatusSchema,TE as WeatherStatusSchema,ay as WebrtcStreamChoiceSchema,iy as WebrtcStreamTargetSchema,wx as WhiteBalanceModeSchema,as as WidgetHostEnum,gd as WidgetLoginMethodSchema,cs as WidgetMetadataSchema,ss as WidgetRemoteSchema,os as WidgetSizeEnum,Mf as YAMNET_TO_MACRO,th as ZoneCrossingDirectionSchema,nh as ZoneCrossingSchema,Tg as ZoneKindEnum,gT as ZoneRuleModeEnum,_T as ZoneRuleSchema,FE as ZoneRuleStageEnum,vT as ZoneRulesArraySchema,Dg as ZoneSchema,OE as ZoneScopeBreakdownSchema,cy as accessoriesCapability,KE as accessoryStableId,qo as addonPagesCapability,Yo as addonPagesSourceCapability,$o as addonRoutesCapability,is as addonSettingsCapability,ds as addonWidgetsCapability,ls as addonWidgetsSourceCapability,By as addonsCapability,jt as adminUiCapability,Hy as airQualitySensorCapability,$f as alarmPanelCapability,gs as alertsCapability,Wy as ambientLightSensorCapability,en as asBoolean,Zt as asJsonArray,Xt as asJsonObject,$t as asNumber,Qt as asString,dA as assertTimelapseCadences,_s as audioAnalysisCapability,ks as audioAnalyzerCapability,Ls as audioCodecCapability,FO as audioIsFailClosed,CO as audioKindId,zO as audioLabelChoices,Yy as audioMetricsCapability,PO as audioModeOf,NO as audioOrDefaults,En as audioPlanFromEncodeProfile,zs as authProviderCapability,Zr as autoAssignProfiles,Zy as automationControlCapability,qs as backupCapability,wj as bareAddonId,$y as batteryCapability,Sj as bestLocationMatch,tb as binaryCapability,_M as bindAddonActions,rb as brightnessCapability,mc as brokerCapability,In as buildAddonRouteProvider,hn as buildAudioArgs,z_ as buildEventKindDescriptor,Cn as buildFfmpegArgs,dn as buildInputArgs,pa as buildModelVariantGroups,Jf as buildNcTaxonomy,qA as buildRoleScopes,FT as buildStreamParamsConfigSchema,mn as buildVideoArgs,ib as buttonCapability,sb as cameraCredentialsCapability,hc as cameraPipelineConfigCapability,Uc as cameraStreamsCapability,vj as canConvertUnit,cr as canonicalEgressPlan,lb as carbonMonoxideCapability,Jj as cellsToRects,Oa as classifyBearerPrincipal,Kr as classifyStream,Gr as classifyStreams,fb as climateControlCapability,ye as collectHydratedFieldEntries,xe as collectHydratedFieldValues,_b as colorCapability,Uf as colorForKind,Hj as commitWatchdogRestart,ao as compileExpression,oo as compileExpressionSafe,Vr as composeSwitchedOff,Io as conditionDepth,Ek as conditionExclusionReason,Tk as conditionVisibleForKind,Sb as connectionTestCapability,wb as connectivityCapability,Db as consumablesCapability,kb as contactCapability,Nb as controlCapability,gj as convertUnit,nl as coreBlockAddonId,rl as coreBlockIdFromAddonId,cl as coreBlocksCapability,Ej as cosineSimilarity,Lo as countConditionLeaves,Ib as coverCapability,Gt as createDeviceProxy,ke as createDurableState,De as createEvent,co as createExpressionScope,tr as createHwAccelCache,Ht as createLazyTrpcSource,Ut as createMirrorSource,AD as createRuntimeStateBridge,k as createSliceHandle,bO as createSystemProxy,ul as customAction,pl as customModelRegistryCapability,bl as dataStoreProviderCapability,Hb as dayNightCapability,tD as declarationOwnerNodeId,fM as decodeVectorBase64,wl as decoderCapability,Rk as defaultDeliveryForSection,TM as defaultDeviceFor,ll as defineCustomActions,yD as deriveBatteryPresence,zr as deriveCameraSwitches,SA as deriveDetailCropRect,Ei as deriveRecordingMode,ha as describeModelVariant,YA as detectAccessRole,Tl as detectionPipelineCapability,Jl as deviceAdoptionCapability,tM as deviceBackendToFormat,dl as deviceCustomAction,Fl as deviceDiscoveryCapability,ru as deviceExportCapability,Eu as deviceManagerCapability,mD as deviceMatchesProfile,Bt as deviceOpsCapability,uu as deviceProviderCapability,ZA as deviceSelectorMatches,Du as deviceStateCapability,Wb as deviceStatusCapability,qb as doorbellCapability,Dk as droppedConditionsForKind,lr as egressTranscodeSharingKey,ir as egressTransportFromRequest,Au as embeddingEncoderCapability,ht as emitDownForOwnedCaps,Oe as emitReadiness,Un as encodeProfileFromStreamShape,dM as encodeVectorBase64,Xb as enumSensorCapability,AM as enumerateInferenceDevices,PD as enumerateItemArrayFields,ND as enumerateSchemaFields,Fn as errMsg,_o as evaluateAst,xo as evaluateExpressionSource,Vj as evaluatePoolMemory,mM as evaluateZoneRules,E as event,$b as eventEmitterCapability,tx as eventsCapability,Et as expandCapMethods,Yc as extractNestedAddonId,jl as extractSourceInfoFromMetadata,sx as faceGalleryCapability,ux as fanControlCapability,fx as featureProbeCapability,Nu as filesystemBrowseCapability,$i as findTimezone,mx as floodCapability,sM as formatForBackend,cM as formatForRuntime,gx as gasCapability,Wo as generateAutomationBlock,If as getAudioMacroClassIds,SD as getByPath,pO as getCapsByProviderKind,Hf as getTaxonomyEntry,cD as hasMotionTrigger,kj as hfModelUrl,tk as htmlToText,vx as humidifierCapability,bx as humiditySensorCapability,Ce as hydrateSchema,Sx as imageCapability,jx as imageSettingsCapability,Ij as initialPoolMemoryState,Bx as integrationsCapability,Wx as intercomCapability,Dn as invocationFromEncodeProfile,vr as isAgentOnlyPlacement,Kc as isArrayOutputSchema,BO as isAudioLabelSelected,jk as isAudioRule,QO as isBaseConditionKey,bD as isBatteryPresenceFault,qc as isCollectionArrayMethod,_r as isDeployableToAgent,kf as isDetectionMacroClass,Ot as isDeviceConfigCap,qt as isDeviceScopedCap,Ee as isEvent,Sr as isIsolatedBuiltin,fD as isNode,Gc as isObjectInput,Mk as isOccupancyRule,_O as isRestoredCap,Tj as isSameAddonId,Wk as isScheduleActive,un as isSoftwareDecode,Ck as isSystemDelivery,Wc as isVoidInput,ly as jobKindSchema,$c as kebabToCamel,YO as knownValues,Jx as lawnMowerControlCapability,gy as lifecycleJobSchema,hy as lifecycleJobScopeSchema,my as lifecycleJobStateSchema,py as lifecycleTaskSchema,ud as llmCapability,Zu as llmRuntimeCapability,nS as localNetworkCapability,xj as locationSimilarity,aS as lockControlCapability,ln as logBannerArgs,pd as logDestinationCapability,ei as logLevelAtMost,yd as loginMethodCapability,Jc as looseSchema,Ke as makeProfileBrokerId,qe as makeSourceBrokerId,Ff as mapAudioLabelToMacro,ak as markdownToHtmlLite,$O as markdownToText,Mj as maskUrlCredentials,uS as mediaPlayerCapability,Ol as mergeSourceInfo,mS as meshNetworkCapability,T as method,Ta as methodAccessForHttpMethod,Rd as metricsProviderCapability,Bd as modelConvertCapability,Ud as modelDistributorCapability,EM as modelFormatForRuntime,_S as motionCapability,Kd as motionDetectionCapability,bS as motionTriggerCapability,TS as motionZonesCapability,af as mqttBrokerCapability,AS as nativeObjectDetectionCapability,lf as networkAccessCapability,PS as networkQualityCapability,_t as nodePin,XS as nodesCapability,Le as normalizeAddonInitResult,SO as normalizeAudioLabel,rj as normalizeTokenScopes,kl as normalizeUnit,Tf as notificationOutputCapability,pm as notificationRulesCapability,rC as notifierCapability,aC as numericSensorCapability,Tm as oauthIntegrationCapability,Xc as objectInputDeclaresAddonId,dC as osdCapability,yC as osdManagerCapability,Xr as parseCameraStreamConfig,no as parseExpression,nn as parseJsonArray,tn as parseJsonObject,Yt as parseJsonUnknown,Fj as parseProcStatus,Je as parseProfileBrokerId,Ak as parseRuleSection,IT as parseStreamParamsFormPatch,RO as patchAudio,TC as petFeederCapability,uD as pickAccessoryControl,bA as pickDetailCropConvention,WA as pickNativeLeaseOverride,ea as pickPreferredRtspEntry,Wj as pickRestartCandidate,Tn as pickVideoEncoder,JO as pickerForCondition,Wh as pipelineAnalyticsCapability,xg as pipelineExecutorCapability,M_ as pipelineOrchestratorCapability,Zg as pipelineRunnerCapability,jC as plateGalleryCapability,qC as platformProbeCapability,zj as poolMemoryThreshold,YC as powerMeterCapability,fk as prepareNotification,QC as presenceCapability,ew as pressureSensorCapability,ka as principalMayReachAddon,ow as privacyMaskCapability,Qc as procedureAuthKey,vw as ptzAutotrackCapability,pw as ptzCapability,lM as pythonScriptForBackend,vA as readDetailCropConvention,BE as readDeviceStateFrom,VA as readNativeLeaseOverride,yt as readNodePin,fA as readTimelapseGeneratedAt,ut as readinessKey,yw as rebootCapability,Iw as recordingCapability,Jw as recordingExportCapability,qj as rectsToCells,uM as requiresPython,Uj as resetPoolBaseline,gr as resolveAddonExecution,yr as resolveAddonGroup,xr as resolveAddonPlacement,oM as resolveAddonRuntime,xt as resolveCapMount,iM as resolveDetectionRuntime,oD as resolveDeviceControlKind,_D as resolveDeviceProfile,rr as resolveEgressDecodeHwAccel,sk as resolveFormat,Se as resolveHydratedFieldValue,aM as resolveModelFormat,pD as resolveMutate,Pj as resolvePoolMemoryPolicy,Oi as resolveRecordingProfiles,br as resolveRunnerId,wi as resolveScrubThumbnailGeometry,ma as resolveVariantModelId,nj as resolveViewableDeviceIds,KA as roleSpec,Vk as ruleEditorSectionsForKind,wk as ruleKindOf,xk as ruleKindSpec,Nk as ruleMatchesSection,kk as ruleSection,Pk as ruleSectionOf,Lk as ruleSeedForSection,Xj as runInferenceStep,wM as runtimeDevices,hO as runtimeStatePolicyFor,hT as sceneMonitorCapability,ej as scopeInherits,w as scopeKey,Da as scopesAllowAddon,Ea as scopesAllowDeviceCap,DM as scoreRuntimes,bT as scriptRunnerCapability,Ye as selectAssignedProfileSlots,J_ as serverManagementCapability,CD as setByPath,vl as settingsStoreCapability,rn as sleep,an as sleepCancellable,ST as smokeCapability,$_ as smtpProviderCapability,nv as snapshotCapability,iv as ssoBridgeCapability,OD as startReachabilityPoll,VE as stateVocabularyFor,ov as storageCapability,lv as storageEvictableCapability,uv as storageMigrationCapability,Sv as storageProviderCapability,Rc as streamBrokerCapability,TT as streamCatalogCapability,MT as streamParamsCapability,Wr as streamPixels,Ur as streamQualityLabel,Wf as subKindsOf,sw as summarisePrivacyAudio,cj as summarizeEffectiveScope,CM as supportedRuntimes,RT as switchCapability,Br as switchedOffIds,Dl as synthesizeSourceInfo,KT as systemCapability,Kk as systemEventFilterApplies,qk as systemEventFilterAppliesToAnyKind,JT as tamperCapability,fy as taskLogEntrySchema,uy as taskPhaseSchema,dy as taskTargetSchema,XT as temperatureSensorCapability,kv as terminalSessionCapability,ik as textToHtml,QE as toDeviceSummary,yo as toExpressionValue,vt as toNodeId,qr as toStreamSourceEntry,QT as toastCapability,VO as toggleAudioLabel,Ya as tokenize,ck as transcodeBody,_j as tryConvertUnit,jv as turnProviderCapability,pj as unitDimension,yj as unitsForDimension,eE as updateCapability,pE as userManagementCapability,Nv as userPasskeysCapability,_E as vacuumControlCapability,bo as validateExpressionSource,zo as validateRecipeBounds,bE as valveCapability,pM as vectorDimFromBase64,Zv as vectorStoreCapability,SE as vibrationCapability,ny as videoclipsCapability,It as viewerUiCapability,wE as waterHeaterCapability,EE as weatherCapability,ry as webrtcClientHintsSchema,oy as webrtcSessionCapability,fr as wiringAddonHealthSchema,mr as wiringHealthSnapshotSchema,pr as wiringNodeHealthSchema,ur as wiringProbeKindSchema,dr as wiringProbeResultSchema,KD as zodEntriesToConfigUI,PE as zoneAnalyticsCapability,IE as zoneRulesCapability,Og as zonesCapability};
|