@camstack/addon-admin-ui 1.2.113 → 1.2.114

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/dist/assets/{AddLocationWizard-CqbB-rwE.js → AddLocationWizard-CLEzgi3l.js} +1 -1
  2. package/dist/assets/{AddonCollectionPage-DEZaloJi.js → AddonCollectionPage-OF4NjZlv.js} +1 -1
  3. package/dist/assets/{Addons-BZsUobsZ.js → Addons-BSLvVtBh.js} +1 -1
  4. package/dist/assets/{AdminTabs-CyjmxyDN.js → AdminTabs-BeziKJ1a.js} +1 -1
  5. package/dist/assets/{AiProfiles-C0_0XDlF.js → AiProfiles-DWqdEEFT.js} +1 -1
  6. package/dist/assets/{BrokerForm-YLFxJpIo.js → BrokerForm-FeLKeIbG.js} +1 -1
  7. package/dist/assets/{Build-CWnvgWXx.js → Build-CLl2lkHL.js} +1 -1
  8. package/dist/assets/{Capabilities-DToMqW8B.js → Capabilities-RFtp6PdX.js} +1 -1
  9. package/dist/assets/{CapabilityBadges-Sf7Am10m.js → CapabilityBadges-Cwy0xRxA.js} +1 -1
  10. package/dist/assets/{Cluster-P1ZSjPXr.js → Cluster-BvpnwAD3.js} +1 -1
  11. package/dist/assets/{Data-BKJ_jvjo.js → Data-BaMNNJrD.js} +1 -1
  12. package/dist/assets/{DetectionIntelligence-BEjLE7_3.js → DetectionIntelligence-CWUQ3uGY.js} +1 -1
  13. package/dist/assets/{DeviceAggregateSection-DFj1880a.js → DeviceAggregateSection-BwOtBLRt.js} +1 -1
  14. package/dist/assets/{DeviceDetail-CUPKRIe-.js → DeviceDetail-cMn7hEIF.js} +1 -1
  15. package/dist/assets/{Devices-xOT2mVcG.js → Devices-C8ai26zO.js} +1 -1
  16. package/dist/assets/{EmbedPlayerPage-DuFIzNMq.js → EmbedPlayerPage-GtDaGVsR.js} +1 -1
  17. package/dist/assets/{Events-BA-sdXXw.js → Events-D3nW6go3.js} +1 -1
  18. package/dist/assets/{FormBuilder-osctJDVF.js → FormBuilder-zxwVa7JY.js} +1 -1
  19. package/dist/assets/{Identity-Ds0-b1zo.js → Identity-zbCRfiNF.js} +1 -1
  20. package/dist/assets/{IntegrationDetail-_9IVew6o.js → IntegrationDetail-DCobOfAh.js} +1 -1
  21. package/dist/assets/{Integrations-yy0lyr6D.js → Integrations-Ck7eESXp.js} +1 -1
  22. package/dist/assets/{Integrations-ngf6xlgJ.js → Integrations-kH0JLtNh.js} +1 -1
  23. package/dist/assets/{Logs-B1l6Ludj.js → Logs-zMy08xFK.js} +1 -1
  24. package/dist/assets/{MotionZonesSettings-ChjW_fMs.js → MotionZonesSettings-C05ExQff.js} +1 -1
  25. package/dist/assets/{MyAccess-CK_4ACsy.js → MyAccess-Cc08fwMh.js} +1 -1
  26. package/dist/assets/{Network-CJ1m614E.js → Network-KBymfAaD.js} +1 -1
  27. package/dist/assets/{NodeAddonsSettingsPanel-2hSyM7WQ.js → NodeAddonsSettingsPanel-B2J7nqRT.js} +1 -1
  28. package/dist/assets/{NodeInferenceDevices-BIvtsupd.js → NodeInferenceDevices-HkYGItBF.js} +1 -1
  29. package/dist/assets/{Notifications-BQzonvWh.js → Notifications-KDIWKsV3.js} +1 -1
  30. package/dist/assets/{Pipeline-BCOI0LUv.js → Pipeline-WHTwvGXg.js} +1 -1
  31. package/dist/assets/{Plates-BqkAYlBX.js → Plates-qEe_Mv2J.js} +1 -1
  32. package/dist/assets/{PrivacyMaskSettings-CKZgswYX.js → PrivacyMaskSettings-D-g-QaJb.js} +1 -1
  33. package/dist/assets/{ProviderIcon-BXqB7l0I.js → ProviderIcon-BWszI_oc.js} +1 -1
  34. package/dist/assets/{Recordings-zCz8150H.js → Recordings-DLxT8YmO.js} +1 -1
  35. package/dist/assets/{ScanNetworkModal-B1CnVDmq.js → ScanNetworkModal-Bma1D7QR.js} +1 -1
  36. package/dist/assets/{SceneMonitorEditor-CdsBRzaU.js → SceneMonitorEditor-Dfur0iW8.js} +1 -1
  37. package/dist/assets/{Scenes-B7LlMxIM.js → Scenes-CKblcP19.js} +1 -1
  38. package/dist/assets/{Settings-DYI84R_3.js → Settings-CTZm6yG1.js} +1 -1
  39. package/dist/assets/{Showroom-aKAj4KuT.js → Showroom-CDw9FMvO.js} +1 -1
  40. package/dist/assets/{Terminal-BWDl9iTB.js → Terminal-DyRD1wmv.js} +1 -1
  41. package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-BijWScLn.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-C5GDGlzj.js} +1 -1
  42. package/dist/assets/{bell-ring-D94i5Myj.js → bell-ring-Dq81DIcx.js} +1 -1
  43. package/dist/assets/{boxes-CXXUCLcv.js → boxes-B1LvR_EC.js} +1 -1
  44. package/dist/assets/circle-check-big-BlFY96nJ.js +1 -0
  45. package/dist/assets/{circle-x-CRUSIt4G.js → circle-x-Bvjbrjwc.js} +1 -1
  46. package/dist/assets/clock-BVH-Z5HY.js +1 -0
  47. package/dist/assets/{copy-qaS5fZlT.js → copy-DXEey34g.js} +1 -1
  48. package/dist/assets/{debounced-invalidate-UxnQu3CI.js → debounced-invalidate-C8FjdM4j.js} +1 -1
  49. package/dist/assets/{dist-MCFJ-7Ub.js → dist-DlvXnCGJ.js} +1 -1
  50. package/dist/assets/{dist-D4DdRFMI.js → dist-PqtOFQle.js} +1 -1
  51. package/dist/assets/{download-D9gIretO.js → download-D5kL_Go0.js} +1 -1
  52. package/dist/assets/{face-bbox-QzjqMdby.js → face-bbox-LHvxscZZ.js} +1 -1
  53. package/dist/assets/{hostInit-Cd42ZWGA.js → hostInit-CAcT8QY6.js} +1 -1
  54. package/dist/assets/{index-CYytvJdn.js → index-BIfDsZsD.js} +3 -3
  55. package/dist/assets/{key-round-CEekm4p1.js → key-round-DM-bc9EL.js} +1 -1
  56. package/dist/assets/{layers-D0EbbLuv.js → layers-Bpr1190F.js} +1 -1
  57. package/dist/assets/{mf-entry-bootstrap-0-4be22681.js → mf-entry-bootstrap-0-bb6403be.js} +2 -2
  58. package/dist/assets/{pencil-CsnyPOUJ.js → pencil-DwVxBtRq.js} +1 -1
  59. package/dist/assets/play-BjgANexL.js +1 -0
  60. package/dist/assets/{player-overlays-BIPOmydD.js → player-overlays-BCQdGsro.js} +1 -1
  61. package/dist/assets/plus-M-gqh1gB.js +1 -0
  62. package/dist/assets/power-Dx5nuIxU.js +1 -0
  63. package/dist/assets/{radio-B51cTAoX.js → radio-lPQ2yM4-.js} +1 -1
  64. package/dist/assets/{refresh-cw-DMXtHXou.js → refresh-cw-B71pScMn.js} +1 -1
  65. package/dist/assets/remoteEntry-CKAtt3xy.js +1 -0
  66. package/dist/assets/rotate-ccw-7C_SQNwr.js +1 -0
  67. package/dist/assets/rotate-cw-OeCPV-3E.js +1 -0
  68. package/dist/assets/{send-Ddxe4N6s.js → send-McKGaUOv.js} +1 -1
  69. package/dist/assets/{server-8OuURyDK.js → server-BgQAF0aD.js} +1 -1
  70. package/dist/assets/{shield-BgWhLKJB.js → shield-DXMW1GPu.js} +1 -1
  71. package/dist/assets/square-CEBPzPgT.js +1 -0
  72. package/dist/assets/{square-check-big-DBRYlPlh.js → square-check-big-DScyC9MB.js} +1 -1
  73. package/dist/assets/{src-CBTLUPXC.js → src-C8hTTV3c.js} +3 -3
  74. package/dist/assets/{src-B2BYuwLe.js → src-D_m3ma12.js} +1 -1
  75. package/dist/assets/{star-CVNX3qEF.js → star-BiT5sdqS.js} +1 -1
  76. package/dist/assets/{undo-2-B8xAd7ew.js → undo-2-DfbcPL7P.js} +1 -1
  77. package/dist/assets/{use-scenes-feed-B1JUlorj.js → use-scenes-feed-Bgj1reXk.js} +1 -1
  78. package/dist/assets/useEventInvalidation-DE7flGNJ.js +1 -0
  79. package/dist/assets/{video-DtcQ2exo.js → video-BYECCQZN.js} +1 -1
  80. package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-B0fgZ1v3.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-uqvcPwW_.js} +2 -2
  81. package/dist/assets/{wifi-B2zHPrpM.js → wifi-DibERz0x.js} +1 -1
  82. package/dist/assets/{zap-BmpnPEbF.js → zap-OPtC9jyC.js} +1 -1
  83. package/dist/index.html +5 -5
  84. package/dist/server/addon.js +7 -7
  85. package/package.json +1 -1
  86. package/dist/assets/circle-check-big-Cu348x-L.js +0 -1
  87. package/dist/assets/clock-B2x5pphm.js +0 -1
  88. package/dist/assets/play-CxY_FDdC.js +0 -1
  89. package/dist/assets/plus-9OdTKOVf.js +0 -1
  90. package/dist/assets/power-D6etxZku.js +0 -1
  91. package/dist/assets/remoteEntry-BhKY-WiC.js +0 -1
  92. package/dist/assets/rotate-ccw-D2ViCaID.js +0 -1
  93. package/dist/assets/rotate-cw-B1p5pfYG.js +0 -1
  94. package/dist/assets/square-B5kePtEj.js +0 -1
  95. package/dist/assets/useEventInvalidation-BmWbP6Ct.js +0 -1
@@ -342,7 +342,7 @@ ${r.triggers.map((e,t)=>Ss(e,t)).join(`
342
342
  for (const dispose of disposers) dispose()
343
343
  }
344
344
  }
345
- `}var Ts=i({id:g(),label:g(),icon:g(),path:g(),remoteName:g(),bundle:g(),section:g().optional(),sectionLabel:g().optional()}),Es=i({addonId:g(),page:Ts,bundleUrl:g()}),Ds={name:`addon-pages`,scope:`system`,mode:`singleton`,methods:{listPages:w(h(),p(Es).readonly())}},Os=i({id:g(),label:g(),icon:g(),path:g(),remoteName:g(),bundle:g(),section:g().optional(),sectionLabel:g().optional()}),ks={name:`addon-pages-source`,scope:`system`,mode:`collection`,internal:!0,methods:{listPages:w(h(),p(Os).readonly(),{auth:`admin`})}},As=i({method:m([`GET`,`POST`,`PUT`,`DELETE`,`PATCH`]),path:g(),access:m([`public`,`authenticated`,`admin`]).optional(),description:g().optional()}),js=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()}),Ms=i({status:a().int(),headers:n(g(),g()),redirectUrl:g().nullable(),body:u().optional(),contentType:g().optional()}),Ns={name:`addon-routes`,scope:`system`,mode:`collection`,internal:!0,methods:{getRoutes:w(h(),p(As)),invoke:w(js,Ms,{kind:`mutation`})},mount:{kind:`skip`}},Ps=i({id:g(),label:g(),icon:g(),order:a().optional()}),Fs=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())}),B=i({tabs:p(Ps).optional(),sections:p(Fs)}),Is=n(g(),u()),Ls=i({success:y(!0)}),Rs={name:`addon-settings`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{getGlobalSettings:w(i({addonId:g(),nodeId:g().optional(),overlay:n(g(),u()).optional(),cap:g().optional()}),B.nullable()),updateGlobalSettings:w(i({addonId:g(),nodeId:g().optional(),patch:Is}),Ls,{kind:`mutation`,auth:`admin`}),getIntegrationSettings:w(i({addonId:g(),nodeId:g().optional()}),B.nullable()),getDeviceSettings:w(i({addonId:g(),deviceId:a(),nodeId:g().optional()}),B.nullable()),updateDeviceSettings:w(i({addonId:g(),deviceId:a(),nodeId:g().optional(),patch:Is}),Ls,{kind:`mutation`,auth:`admin`})}},zs=m([`device-tab`,`dashboard`,`integration-detail`]),Bs=m([`xs`,`sm`,`md`,`lg`,`xl`]),Vs=i({remoteName:g(),exposedModule:g(),componentKey:g().optional()}),Hs=i({tab:g(),subTab:g().optional(),label:g(),order:a().optional(),kind:y(`remote`),remote:Vs,stableId:g(),description:g().optional(),icon:g().optional(),bundle:g(),hosts:p(zs).readonly(),requires:i({deviceContext:v().default(!1),integrationContext:v().default(!1)}),preAuth:v().optional().default(!1),defaultSize:Bs.default(`md`),allowedSizes:p(Bs).readonly().default([`sm`,`md`,`lg`]),defaultColumns:a().int().min(1).max(12).default(6),defaultRows:a().int().min(1).max(12).default(1)}),Us={name:`addon-widgets-source`,scope:`system`,mode:`collection`,internal:!0,methods:{listWidgets:w(h(),p(Hs).readonly(),{auth:`admin`})}},Ws=Hs.extend({addonId:g(),bundleUrl:g()}),Gs={name:`addon-widgets`,scope:`system`,mode:`singleton`,methods:{listWidgets:w(h(),p(Ws).readonly())}},Ks=m([`info`,`success`,`warning`,`error`]),qs=m([`active`,`in-progress`,`completed`,`failed`,`dismissed`]),Js=i({type:g(),id:g()}),Ys=i({id:g(),category:g(),severity:Ks,title:g(),message:g(),status:qs,progress:a().optional(),read:v(),createdAt:a(),updatedAt:a(),source:Js.optional(),metadata:n(g(),u()).optional()}),Xs={name:`alerts`,scope:`system`,mode:`singleton`,methods:{emit:w(Ys,h(),{kind:`mutation`}),update:w(i({alertId:g(),patch:Ys.partial()}),h(),{kind:`mutation`}),list:w(i({unreadOnly:v().optional(),limit:a().optional()}).optional(),p(Ys).readonly()),getUnreadCount:w(h(),a()),markRead:w(i({alertId:g()}),h(),{kind:`mutation`}),markAllRead:w(h(),h(),{kind:`mutation`}),dismiss:w(i({alertId:g()}),h(),{kind:`mutation`})}},Zs={name:`audio-analysis`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[E.Camera],exposesDeviceSettings:!0,methods:{resolveDeviceSettings:w(i({deviceId:a()}),x())},events:{onAudioLevel:T(i({deviceId:a(),rms:a(),dbfs:a()}))}},Qs=m([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]),$s=i({data:x(),format:Qs,width:a(),height:a(),timestamp:a()}),V=i({x:a(),y:a(),w:a(),h:a()}),ec=i({class:g(),originalClass:g(),score:a(),bbox:V}),tc=i({data:_(Uint8Array),sampleRate:a(),channels:a(),timestamp:a(),deviceId:a().optional()}),nc=i({rms:a(),dbfs:a()}),rc=i({className:g(),originalClass:g().optional(),score:a()}),ic=i({level:nc,classification:i({labels:p(rc).readonly(),inferenceMs:a()}).optional(),timestamp:a()}),ac=i({minConfidence:a().min(0).max(1).default(.3),allowedClasses:p(g()).default([])}),oc=i({labels:p(rc).readonly(),rawLabels:p(rc).readonly().optional(),inferenceMs:a()}),sc=[{value:`auto`,label:`Auto (platform default)`},{value:`apple-soundanalysis`,label:`Apple SoundAnalysis (macOS 12+)`},{value:`yamnet-onnx`,label:`YAMNet ONNX (cross-platform)`}],cc={audioBackend:`auto`,probedBestAudioBackend:``},lc={name:`audio-analyzer`,scope:`system`,mode:`singleton`,methods:{analyseChunk:w(i({chunk:tc,settings:ac}),ic.nullable(),{kind:`mutation`}),classify:w(tc,oc,{timeoutMs:3e4}),isReady:w(h(),v()),dispose:w(h(),h(),{kind:`mutation`}),reprobeAudioEngine:w(h(),i({backend:g()}),{kind:`mutation`,auth:`admin`})}},uc=m([`f32le`,`s16le`]),dc=i({codec:g(),canDecode:v(),canEncode:v(),label:g().optional()}),fc=i({codec:g(),sourceSampleRate:a().int().positive(),sourceChannels:a().int().positive(),extraData:_(Uint8Array).optional(),targetSampleRate:a().int().positive(),targetChannels:a().int().positive(),targetFormat:uc.optional(),idleMs:a().int().positive().optional(),tag:g().optional()}),pc=i({codec:g(),sourceSampleRate:a().int().positive(),sourceChannels:a().int().positive(),sourceFormat:uc.optional(),targetSampleRate:a().int().positive(),targetChannels:a().int().positive(),bitrateKbps:a().int().positive().optional(),idleMs:a().int().positive().optional(),tag:g().optional()}),mc=i({data:_(Uint8Array),sampleRate:a().int().positive(),channels:a().int().positive(),format:uc,pts:a()}),hc=i({data:_(Uint8Array),codec:g(),pts:a(),frameComplete:v()}),gc=i({sessionId:g(),kind:m([`decode`,`encode`]),codec:g(),sourceSampleRate:a(),sourceChannels:a(),targetSampleRate:a(),targetChannels:a(),format:uc,tag:g().optional(),createdAtMs:a(),lastActivityMs:a(),framesIn:a(),framesOut:a()}),_c={name:`audio-codec`,scope:`system`,mode:`singleton`,preferredProvider:`decoder-nodeav`,methods:{listSupportedCodecs:w(h(),p(dc).readonly()),canHandle:w(i({codec:g(),kind:m([`decode`,`encode`])}),v()),createDecodeSession:w(fc,i({sessionId:g(),nodeId:g()}),{kind:`mutation`}),createEncodeSession:w(pc,i({sessionId:g(),nodeId:g()}),{kind:`mutation`}),closeSession:w(i({sessionId:g(),nodeId:g().optional()}),h(),{kind:`mutation`}),pushEncodedFrame:w(i({sessionId:g(),nodeId:g().optional(),data:_(Uint8Array),pts:a().optional()}),h(),{kind:`mutation`}),pullPcm:w(i({sessionId:g(),nodeId:g().optional(),maxCount:a().int().positive().default(8)}),p(mc)),pushPcm:w(i({sessionId:g(),nodeId:g().optional(),data:_(Uint8Array),pts:a().optional()}),h(),{kind:`mutation`}),pullEncoded:w(i({sessionId:g(),nodeId:g().optional(),maxCount:a().int().positive().default(8)}),p(hc)),flushEncode:w(i({sessionId:g(),nodeId:g().optional()}),p(hc),{kind:`mutation`}),listActiveSessions:w(h(),p(gc).readonly())}},vc=i({userId:g(),username:g(),email:g().optional(),displayName:g().optional(),isAdmin:v().default(!1)}),yc={name:`auth-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{validateCredentials:w(i({username:g(),password:g()}),vc.nullable(),{kind:`mutation`}),getLoginUrl:w(i({state:g()}),g()),handleCallback:w(n(g(),g()),vc,{kind:`mutation`}),validateToken:w(i({token:g()}),vc.nullable())},mount:{kind:`skip`}},bc=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()}),xc=i({id:g(),filename:g(),createdAt:a(),sizeBytes:a(),label:g().optional(),locations:p(g()).readonly()}),Sc=i({id:g(),destinationId:g().optional(),label:g().optional(),createdAt:a(),sizeBytes:a(),locations:p(g()).optional()}),Cc=i({path:g(),kind:m([`file`,`dir`,`symlink`]),sizeBytes:a(),mtime:a()}),wc=i({archiveVersion:y(1),createdAt:a(),dataDir:g(),locations:p(g()),entries:p(Cc),totalBytes:a(),totalFiles:a()}),Tc=i({name:g(),sizeBytes:a(),fileCount:a(),present:v()}),Ec=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()}),Dc={name:`backup`,scope:`system`,mode:`singleton`,methods:{listDestinations:w(h(),p(bc).readonly(),{auth:`admin`}),trigger:w(i({destinations:p(g()).optional(),locations:p(g()).optional(),label:g().optional(),retentionCount:a().int().min(1).max(1e3).optional()}).optional(),p(Sc).readonly(),{kind:`mutation`,auth:`admin`}),list:w(h(),p(Sc).readonly(),{auth:`admin`}),listLocations:w(h(),p(Tc).readonly(),{auth:`admin`}),getEntries:w(i({destinationId:g(),backupId:g()}),wc.nullable(),{auth:`admin`}),restore:w(i({destinationId:g(),backupId:g(),locations:p(g()).optional()}),h(),{kind:`mutation`,auth:`admin`}),delete:w(i({destinationId:g(),backupId:g()}),h(),{kind:`mutation`,auth:`admin`}),listArchives:w(i({destinationId:g()}),p(xc).readonly(),{auth:`admin`}),upsertDestinationPolicy:w(i({locationId:g(),enabled:v(),retentionCount:a().int().min(1).max(1e3),label:g().optional(),cron:g().optional()}),h(),{kind:`mutation`,auth:`admin`}),previewSchedule:w(i({cron:g(),count:a().int().min(1).max(20).optional()}),i({ok:v(),error:g().optional(),nextRuns:p(a()).readonly()})),listSchedules:w(h(),p(Ec).readonly(),{auth:`admin`}),upsertSchedule:w(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()}),Ec,{kind:`mutation`,auth:`admin`}),deleteSchedule:w(i({id:g()}),h(),{kind:`mutation`,auth:`admin`})}},Oc=m([`connected`,`disconnected`,`connecting`,`auth-failed`,`unreachable`,`error`]),kc=i({id:g(),addonId:g(),name:g(),kind:g(),status:Oc,info:n(g(),u()),lastCheckedAt:a().nullable(),error:g().nullable()}),Ac=i({brokerCount:a().int().nonnegative(),connectedCount:a().int().nonnegative()}),jc=i({addonId:g(),kinds:p(i({kind:g(),label:g()}))}),Mc=i({kind:g().optional()}),Nc=i({id:g()}),Pc=i({kind:g().min(1),name:g().min(1),id:g().min(1).optional(),settings:n(g(),u())}),Fc=i({id:g()}),Ic=i({id:g()}),Lc=b(`ok`,[i({ok:y(!0),latencyMs:a().nonnegative()}),i({ok:y(!1),error:g()})]),Rc=n(g(),u()),zc=i({kind:g()}),Bc=i({kind:g(),settings:Rc}),Vc=b(`ok`,[i({ok:y(!0),latencyMs:a().nonnegative().optional()}).strict(),i({ok:y(!1),error:g()})]),Hc=u().nullable(),Uc=i({brokerId:g(),target:n(g(),u()),payload:u().optional()}),Wc=i({brokerId:g(),filter:n(g(),u())}),Gc=i({subscriptionId:g()}),Kc=i({brokerId:g(),subscriptionId:g()}),qc=i({brokerId:g(),key:g()}),Jc={name:`broker`,scope:`system`,mode:`collection`,providerKind:`broker`,status:{schema:Ac,kind:`poll`},methods:{list:w(Mc,p(kc)),get:w(Nc,kc.nullable()),listProviders:w(h(),p(jc),{auth:`admin`}),add:w(Pc,Fc,{kind:`mutation`,auth:`admin`}),remove:w(Ic,h(),{kind:`mutation`,auth:`admin`}),testConnection:w(Nc,Lc,{kind:`mutation`,auth:`admin`}),getSettings:w(Nc,Rc.nullable(),{auth:`admin`}),setSettings:w(i({id:g(),settings:Rc}),h(),{kind:`mutation`,auth:`admin`}),getBrokerConfig:w(Nc,Rc.nullable(),{auth:`admin`}),getSettingsSchema:w(zc,Hc,{auth:`admin`}),testSettings:w(Bc,Vc,{kind:`mutation`,auth:`admin`}),publish:w(Uc,u(),{kind:`mutation`,auth:`admin`}),subscribe:w(Wc,Gc,{kind:`mutation`,auth:`admin`}),unsubscribe:w(Kc,h(),{kind:`mutation`,auth:`admin`}),getState:w(qc,u().nullable()),getStatus:w(h(),Ac)}},Yc={name:`camera-pipeline-config`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[E.Camera],exposesDeviceSettings:!0,methods:{}},Xc=m([`webrtc`,`hls`,`mjpeg`,`rtsp`]),Zc=m([`mp4`,`gif`]),Qc=i({kind:Zc,handle:g(),nodeId:g(),mime:g(),bytes:a().int(),width:a().int(),height:a().int()}),$c=i({fromTs:a(),toTs:a(),packets:a().int()}),el=i({media:p(Qc).readonly(),coverage:$c,profile:S,video:m([`copy`,`encode`])}),tl=i({brokerId:g(),url:g(),mutedUrl:g(),enabled:v(),codec:g().optional(),resolution:i({width:a().int().positive(),height:a().int().positive()}).optional()}),nl=i({sessionId:g(),remoteAddr:g(),userAgent:g().nullish(),playing:v(),muted:v(),connectedAt:a(),lastRtpAt:a(),bytesSent:a()}),rl=i({tag:g(),subscribedAt:a(),maxFps:a(),framesDelivered:a(),framesDropped:a()}),il=i({tag:g(),subscribedAt:a(),chunksDelivered:a()}),al=m([`alexa`,`homekit`,`webrtc-browser`,`webrtc-mobile`,`webrtc-whep`,`rtsp-listen`,`derived-broker`,`recording`,`pipeline`,`snapshot`,`warmup`,`unknown`]),ol=i({kind:al,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(),sl=i({id:g(),channel:m([`annexb`,`rtp`]),attribution:ol,subscribedAt:a(),packetsDelivered:a()}),cl=i({rtsp:p(nl).readonly(),decoded:p(rl).readonly(),audio:p(il).readonly(),encoded:p(sl).readonly(),pipeClients:a(),encodedSubscribers:a()}),ll=m([`reconnecting`,`sleeping`,`offline`,`disabled`,`waking`]),ul=m([`h264`,`h265`,`copy`]),dl=m([`aac`,`opus`,`pcmu`,`copy`,`none`]),fl=i({deviceId:a().int().nonnegative(),video:ul,audio:dl.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()}),pl=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()}),ml=Gn.omit({inputArgs:!0,outputArgs:!0}),hl=m([`tight`,`relaxed`]),gl=i({deviceId:a().int().nonnegative(),source:b(`kind`,[i({kind:y(`profile`),profile:S}),i({kind:y(`cam-stream`),camStreamId:g().min(1)})]),encode:ml,rateControl:hl.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()}),_l=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()}),vl={name:`stream-broker`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,methods:{publishCameraStream:w(i({deviceId:a().int().nonnegative(),camStreamId:g().min(1),kind:He,url:g().optional(),codec:g().optional(),resolution:Ue.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:Gn.optional()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),retractCameraStream:w(i({deviceId:a().int().nonnegative(),camStreamId:g().min(1)}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),assignProfile:w(i({deviceId:a().int().nonnegative(),profile:S,camStreamId:g().min(1)}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),unassignProfile:w(i({deviceId:a().int().nonnegative(),profile:S}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),renderPreBufferClip:w(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:w(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(Zc).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)}),el,{kind:`mutation`,auth:`admin`}),fetchEventMedia:w(i({handle:g()}),i({base64:g(),mime:g(),bytes:a().int()}).nullable(),{kind:`mutation`,auth:`admin`}),listAllCameraStreams:w(h(),p(We).readonly()),listAllProfileSlots:w(h(),p(Ke).readonly()),getBrokerStats:w(i({brokerId:g()}),ct),probeStream:w(i({brokerId:g()}),i({probed:v(),summary:g()}),{kind:`mutation`,auth:`admin`}),listClients:w(i({brokerId:g()}),cl),killClient:w(i({brokerId:g(),channel:m([`rtsp`,`decoded`,`audio`]),handle:g()}),i({killed:v()}),{kind:`mutation`,auth:`admin`}),restartProfile:w(i({deviceId:a().int().nonnegative(),profile:S}),i({success:v()}),{kind:`mutation`,auth:`admin`}),getStreamUrl:w(i({streamId:g(),format:Xc}),i({url:g()})),getStreamWithCodec:w(fl,pl,{kind:`mutation`,auth:`admin`}),releaseStreamWithCodec:w(i({pipelineKey:g()}),i({released:v(),refcount:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),acquireEgressTranscode:w(gl,_l,{kind:`mutation`,auth:`admin`}),releaseEgressTranscode:w(i({pipelineKey:g()}),i({released:v(),refcount:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),subscribeAudioChunks:w(at,ot,{kind:`mutation`}),pullAudioChunks:w(i({subscriptionId:g(),maxCount:a().int().positive().default(8)}),p(it).readonly()),unsubscribeAudioChunks:w(i({subscriptionId:g()}),i({released:v()}),{kind:`mutation`}),subscribeFrames:w(nt,rt,{kind:`mutation`}),pullFrameHandles:w(i({subscriptionId:g(),maxCount:a().int().positive().default(4)}),p(C).readonly()),unsubscribeFrames:w(i({subscriptionId:g()}),i({released:v()}),{kind:`mutation`}),setPreBufferDuration:w(i({brokerId:g(),seconds:a().min(0).max(30)}),h(),{kind:`mutation`,auth:`admin`}),getPreBufferInfo:w(i({brokerId:g()}),i({configuredSec:a(),bufferedMs:a(),packetCount:a()})),getRtspPort:w(h(),a()),getAllRtspEntries:w(i({hostname:g().optional()}),p(tl).readonly()),getRtspEntry:w(i({brokerId:g(),hostname:g().optional()}),tl.nullable()),regenerateRtspToken:w(i({brokerId:g()}),g().nullable(),{kind:`mutation`,auth:`admin`}),setRtspEnabled:w(i({brokerId:g(),enabled:v()}),h(),{kind:`mutation`,auth:`admin`}),isRtspEnabled:w(i({brokerId:g()}),v()),getDeviceAudioMute:w(i({deviceId:a().int()}),i({muted:v(),appliedBrokers:a().int().nonnegative()})),setDeviceAudioMute:w(i({deviceId:a().int(),muted:v()}),i({muted:v(),appliedBrokers:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`})},events:{onCamStreamDemand:T(i({deviceId:a().int().nonnegative(),camStreamId:g(),profile:S})),onCamStreamIdle:T(i({deviceId:a().int().nonnegative(),camStreamId:g()})),onRequestStreamSourceRefresh:T(i({deviceId:a().int().nonnegative(),camStreamId:g(),brokerId:g()}))}},yl=m([`h264`,`h265`,`hevc`,`av1`,`mjpeg`,`vp8`,`vp9`]),bl=i({acceptCodecs:p(yl).readonly().optional(),minHeight:a().int().positive().optional(),minWidth:a().int().positive().optional(),excludeDerived:v().optional(),requireSiblingCodec:p(yl).readonly().optional()}).readonly(),xl=i({preferredProviders:p(g()).readonly().optional(),resolutionPreference:m([`highest`,`lowest`]).optional()}).readonly(),Sl=i({camStreamId:g(),codec:g().optional(),resolution:Ue.optional(),reason:g()}),Cl={name:`camera-streams`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[E.Camera],methods:{getCameraStreams:w(i({deviceId:a().int().nonnegative()}),p(We).readonly()),getBrokerStreams:w(i({deviceId:a().int().nonnegative()}),p(Ke).readonly()),getRtspEntries:w(i({deviceId:a().int().nonnegative(),hostname:g().optional()}),p(tl).readonly()),getProfileRtspEntries:w(i({deviceId:a().int().nonnegative(),hostname:g().optional()}),p(lt).readonly()),pickStream:w(i({deviceId:a().int().nonnegative(),requirements:bl,preferences:xl.optional()}),Sl.nullable())},events:{onCamStreamsChanged:T(i({deviceId:a().int().nonnegative(),camStreams:p(We).readonly()})),onProfileSlotsChanged:T(i({deviceId:a().int().nonnegative(),profileSlots:p(Ke).readonly()}))},runtimeState:i({online:v(),slotStatuses:i({high:Ge.optional(),mid:Ge.optional(),low:Ge.optional()}),slotErrors:i({high:g().optional(),mid:g().optional(),low:g().optional()}),lastChangedAt:a()}),durability:`session`};function wl(e){let t=e._def;return e.constructor?.name===`ZodVoid`||t?.type===`void`||t?.typeName===`ZodVoid`}function Tl(e){let t=e._def;return e.constructor?.name===`ZodObject`||t?.type===`object`||t?.typeName===`ZodObject`}function El(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 Dl(e,t){if(e===void 0||e.mode!==`collection`)return!1;let n=Ot(e)[t];return n!==void 0&&n.kind!==`subscription`&&El(n.output)}function Ol(e){let t=e.loose;return typeof t==`function`?t.call(e):e}function kl(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 Al(e){if(e===null||typeof e!=`object`&&typeof e!=`function`)return!1;let t=e.shape??jl(e._def?.shape);return typeof t==`object`&&!!t&&Object.prototype.hasOwnProperty.call(t,`addonId`)}function jl(e){return typeof e==`function`?e():e}function Ml(e,t){return t.auth===void 0?e.internal===!0?`admin`:`protected`:t.auth}function Nl(e){return e===`public`?`public`:e===`admin`||e===`superAdmin`?`admin`:`protected`}function Pl(e){return e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}var Fl=`core-block-`,Il=`core-blocks`;function Ll(e){return`${Fl}${e}`}function Rl(e){if(!e.startsWith(`core-block-`))return null;let t=e.slice(11);return t.length>0?t:null}var zl=c([y(`hub`),g().min(1)]),Bl=m([`stopped`,`starting`,`running`,`failed`]),Vl=i({name:g().min(1).max(120),code:g().max(2e5),enabled:v(),placement:zl,integrationId:g().optional()}),H=Vl.extend({id:g(),createdAt:a(),updatedAt:a(),createdBy:g(),status:Bl,lastError:g().optional(),lastChangedAt:a()}),Hl=i({ok:v(),error:g().optional(),line:a().optional(),column:a().optional()}),Ul={name:`core-blocks`,scope:`system`,mode:`singleton`,methods:{list:w(i({}),i({blocks:p(H)}),{auth:`admin`}),get:w(i({blockId:g()}),i({block:H.nullable()}),{auth:`admin`}),create:w(i({block:Vl}),i({block:H}),{kind:`mutation`,auth:`admin`,caller:`required`}),update:w(i({blockId:g(),block:Vl.partial()}),i({block:H}),{kind:`mutation`,auth:`admin`,caller:`required`}),delete:w(i({blockId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setEnabled:w(i({blockId:g(),enabled:v()}),i({block:H}),{kind:`mutation`,auth:`admin`}),restart:w(i({blockId:g()}),i({block:H}),{kind:`mutation`,auth:`admin`}),compile:w(i({code:g()}),Hl,{kind:`mutation`,auth:`admin`}),getTypeDefs:w(i({}),i({libs:p(i({filePath:g(),content:g()}))}),{auth:`admin`})}};function Wl(e){return e}function Gl(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 Kl(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 ql=i({stepId:g(),entry:eo}),Jl={name:`custom-model-registry`,scope:`system`,mode:`collection`,internal:!0,methods:{listModels:w(h(),p(ql).readonly(),{auth:`admin`})}},U=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()}),Yl=i({where:n(g(),u()).optional(),whereIn:n(g(),p(u())).optional(),whereBetween:n(g(),s([u(),u()])).optional(),whereNot:n(g(),u()).optional()}),Xl=i({as:g().min(1),field:g().min(1),op:m([`sum`,`min`,`max`])}),Zl=i({count:a().int(),values:n(g(),a().nullable())}),Ql=i({id:g(),data:n(g(),u())}),$l=i({id:g().optional(),data:n(g(),u())}),eu=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()}),tu=i({name:g(),columns:p(g()).readonly(),unique:v().optional()}),nu={name:`settings-store`,scope:`system`,mode:`singleton`,methods:{get:w(i({namespace:g().optional(),collection:g(),key:g()}),u()),set:w(i({namespace:g().optional(),collection:g(),key:g(),value:u()}),h(),{kind:`mutation`}),query:w(i({namespace:g().optional(),collection:g(),filter:U.optional(),columns:p(g()).readonly().optional()}),p(Ql).readonly()),insert:w(i({namespace:g().optional(),collection:g(),record:Ql}),h(),{kind:`mutation`}),insertMany:w(i({namespace:g().optional(),collection:g(),records:p($l).readonly()}),i({inserted:a().int()}),{kind:`mutation`}),update:w(i({namespace:g().optional(),collection:g(),id:g(),data:n(g(),u())}),h(),{kind:`mutation`}),delete:w(i({namespace:g().optional(),collection:g(),key:g()}),h(),{kind:`mutation`}),deleteWhere:w(i({namespace:g().optional(),collection:g(),filter:Yl}),i({deleted:a().int()}),{kind:`mutation`}),updateWhere:w(i({namespace:g().optional(),collection:g(),filter:Yl,data:n(g(),u())}),i({updated:a().int()}),{kind:`mutation`}),count:w(i({namespace:g().optional(),collection:g(),filter:U.optional()}),a()),aggregate:w(i({namespace:g().optional(),collection:g(),fields:p(Xl).readonly(),filter:U.optional()}),Zl),histogram:w(i({namespace:g().optional(),collection:g(),field:g(),bucketSize:a().int().positive(),origin:a().int(),filter:U.optional()}),p(i({bucket:a().int(),count:a().int()})).readonly()),isEmpty:w(i({namespace:g().optional(),collection:g()}),v()),declareCollection:w(i({namespace:g().optional(),collection:g(),columns:p(eu).readonly(),indexes:p(tu).readonly().optional()}),h(),{kind:`mutation`})}},ru=i({engineId:g(),kind:m([`relational`,`vector`]),displayName:g()}),iu={name:`data-store-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{getEngineInfo:w(h(),ru,{auth:`admin`}),get:w(i({namespace:g().optional(),collection:g(),key:g()}),u(),{auth:`admin`}),set:w(i({namespace:g().optional(),collection:g(),key:g(),value:u()}),h(),{kind:`mutation`,auth:`admin`}),query:w(i({namespace:g().optional(),collection:g(),filter:U.optional(),columns:p(g()).readonly().optional()}),p(Ql).readonly(),{auth:`admin`}),insert:w(i({namespace:g().optional(),collection:g(),record:Ql}),h(),{kind:`mutation`,auth:`admin`}),insertMany:w(i({namespace:g().optional(),collection:g(),records:p($l).readonly()}),i({inserted:a().int()}),{kind:`mutation`,auth:`admin`}),update:w(i({namespace:g().optional(),collection:g(),id:g(),data:n(g(),u())}),h(),{kind:`mutation`,auth:`admin`}),delete:w(i({namespace:g().optional(),collection:g(),key:g()}),h(),{kind:`mutation`,auth:`admin`}),deleteWhere:w(i({namespace:g().optional(),collection:g(),filter:Yl}),i({deleted:a().int()}),{kind:`mutation`,auth:`admin`}),updateWhere:w(i({namespace:g().optional(),collection:g(),filter:Yl,data:n(g(),u())}),i({updated:a().int()}),{kind:`mutation`,auth:`admin`}),count:w(i({namespace:g().optional(),collection:g(),filter:U.optional()}),a(),{auth:`admin`}),aggregate:w(i({namespace:g().optional(),collection:g(),fields:p(Xl).readonly(),filter:U.optional()}),Zl,{auth:`admin`}),histogram:w(i({namespace:g().optional(),collection:g(),field:g(),bucketSize:a().int().positive(),origin:a().int(),filter:U.optional()}),p(i({bucket:a().int(),count:a().int()})).readonly(),{auth:`admin`}),isEmpty:w(i({namespace:g().optional(),collection:g()}),v(),{auth:`admin`}),declareCollection:w(i({namespace:g().optional(),collection:g(),columns:p(eu).readonly(),indexes:p(tu).readonly().optional()}),h(),{kind:`mutation`,auth:`admin`})}},au=[{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)`}],ou={hwaccel:`auto`,probedBestHwaccel:``},su=i({sessionId:g(),slotCount:a().int(),slotByteLength:a().int(),segmentBytes:a().int(),budgetMb:a().int(),framesWritten:a().int(),getFrameHits:a().int(),getFrameMisses:a().int()}),cu={name:`decoder`,scope:`system`,mode:`singleton`,preferredProvider:`decoder-nodeav`,methods:{supportsCodec:w(i({codec:g()}),v()),getInfo:w(h(),i({id:g(),name:g(),isPullMode:v().optional(),priority:a().optional(),hwaccel:g().optional(),probedBestHwaccel:g().optional()})),createSession:w(da,i({sessionId:g(),nodeId:g()})),destroySession:w(i({sessionId:g()}),h()),pushPacket:w(i({sessionId:g(),packet:$e}),h()),openStream:w(i({sessionId:g(),url:g()}),h()),pullFrames:w(i({sessionId:g(),maxCount:a().default(1),waitMs:a().optional()}),p(et)),pullHandles:w(i({sessionId:g(),maxCount:a().default(1),waitMs:a().optional()}),p(C)),getFrame:w(i({handle:C}),et.nullable()),getShmStats:w(i({sessionId:g()}),su.nullable()),updateConfig:w(i({sessionId:g(),config:da.partial()}),h()),getStats:w(i({sessionId:g()}),ua),listActiveSessions:w(h(),p(i({sessionId:g(),codec:g(),outputFormat:g(),createdAtMs:a()})).readonly()),reprobeHwaccel:w(h(),i({backend:g()}),{kind:`mutation`,auth:`admin`})}},lu={name:`detection-pipeline`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[E.Camera],exposesDeviceSettings:!0,methods:{}},uu=i({id:g(),system:g(),uniqueId:g().optional(),raw:n(g(),u()).optional()});function du(e){return{id:e.stableId,system:e.addonId}}function fu(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 pu(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 mu=`sourceInfo`;function hu(e){if(!e)return null;let t=e[mu];if(!t)return null;let n=uu.safeParse(t);return n.success?n.data:null}var gu=m([`online`,`sleeping`,`offline`,`unknown`]),_u=r(()=>i({childNativeId:g(),name:g(),type:m(E),status:gu,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:uu.optional(),children:p(_u).readonly().optional()})),vu=i({discovered:p(_u),lastDiscoveryAt:a().int().nonnegative().nullable(),lastError:g().nullable()}),yu={name:`device-discovery`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Hub],status:{schema:vu,kind:`poll`},runtimeState:vu.extend({lastFetchedAt:a().int().nonnegative()}),durability:`session`,methods:{listDiscovered:w(i({deviceId:a().int().nonnegative()}),p(_u).readonly()),refreshDiscovery:w(i({deviceId:a().int().nonnegative()}),p(_u).readonly(),{kind:`mutation`,auth:`admin`}),adoptDevice:w(i({deviceId:a().int().nonnegative(),childNativeId:g(),name:g().optional()}),i({deviceId:a().int().nonnegative(),stableId:g()}),{kind:`mutation`,auth:`admin`}),releaseDevice:w(i({deviceId:a().int().nonnegative(),childDeviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})}},bu=i({id:g(),label:g(),isDefault:v().optional()}),xu=i({search:g().optional(),area:g().optional(),manufacturer:g().optional(),adoptedOnly:v().optional(),unadoptedOnly:v().optional()}),Su=i({integrationId:g(),page:a().int().positive().default(1),pageSize:a().int().positive().max(2e4).default(50),filter:g().optional(),filterText:xu.optional()}),Cu=i({candidates:p(_u).readonly(),totalCount:a().int().nonnegative(),page:a().int().positive(),pageSize:a().int().positive()}),wu=i({integrationId:g(),childNativeId:g()}),Tu=i({lastDiscoveryAt:a().int().nonnegative().nullable(),candidateCount:a().int().nonnegative(),adoptedCount:a().int().nonnegative(),lastError:g().nullable()}),Eu=i({name:g().min(1).optional(),hiddenChildIds:p(g()).optional()}),Du=i({integrationId:g(),childNativeIds:p(g()).min(1),filter:g().optional(),importLocations:v().optional(),perCandidate:n(g(),Eu).optional()}),Ou=i({adopted:p(i({childNativeId:g(),parentDeviceId:a().int().nonnegative(),accessoryDeviceIds:p(a().int().nonnegative()).readonly()})).readonly()}),ku=i({integrationId:g(),camDeviceId:a().int().nonnegative()}),Au=i({camDeviceId:a().int().nonnegative(),resetToSource:v().optional()}),ju=i({changed:v(),rebuiltChildren:a().int().nonnegative(),removedChildren:a().int().nonnegative().optional()}),Mu={name:`device-adoption`,scope:`system`,mode:`singleton`,status:{schema:Tu,kind:`poll`},methods:{listCandidateFilters:w(i({integrationId:g()}),i({filters:p(bu)}),{auth:`admin`}),listCandidates:w(Su,Cu,{auth:`admin`}),getCandidate:w(wu,_u.nullable(),{auth:`admin`}),refresh:w(i({integrationId:g()}),Tu,{kind:`mutation`,auth:`admin`}),adopt:w(Du,Ou,{kind:`mutation`,auth:`admin`}),release:w(ku,h(),{kind:`mutation`,auth:`admin`}),resync:w(Au,ju,{kind:`mutation`,auth:`admin`})}},Nu=m([`unlinked`,`linked`,`error`]),Pu=i({label:g(),value:g(),secret:v().optional()}),Fu=i({qr:g().optional(),fields:p(Pu).readonly().optional(),note:g().optional()}),Iu=i({linkState:Nu,exposedDeviceCount:a(),error:g().optional(),setup:Fu.optional()}),Lu=g(),Ru=i({deviceId:g(),exposedAs:g().optional(),capabilities:p(g()).optional()}),zu=i({deviceId:g(),capabilities:p(g()).optional()}),Bu=i({deviceId:g()}),Vu={name:`device-export`,scope:`system`,mode:`collection`,providerKind:`device-export`,status:{schema:Iu,kind:`poll`},exposesDeviceSettings:!0,methods:{getStatus:w(h(),Iu),listSupportedDeviceKinds:w(h(),p(Lu)),listExposedDevices:w(h(),p(Ru)),exposeDevice:w(zu,h(),{kind:`mutation`}),unexposeDevice:w(Bu,h(),{kind:`mutation`})}},Hu=i({connected:v(),deviceCount:a(),error:g().optional()}),Uu=i({externalId:g(),name:g(),type:g(),metadata:n(g(),u()).optional()}),Wu=i({stableId:g(),type:m(E),suggestedName:g(),prefilledConfig:n(g(),u()),sourceInfo:uu.optional()}),Gu=i({id:a(),stableId:g(),addonId:g(),type:g(),name:g(),parentDeviceId:a().nullable(),online:v(),features:p(g()),config:n(g(),u()),sourceInfo:uu.optional()}),Ku=i({status:m([`ok`,`error`]),labels:p(g()).optional(),error:g().optional()}),qu=u(),Ju={name:`device-provider`,scope:`system`,mode:`collection`,methods:{start:w(h(),h(),{kind:`mutation`}),stop:w(h(),h(),{kind:`mutation`}),getStatus:w(h(),Hu),getDevices:w(h(),p(i({id:g(),name:g(),type:g()}))),supportsDiscovery:w(i({}),v()),discoverDevices:w(i({params:n(g(),u()).optional()}),p(Wu),{kind:`mutation`,auth:`admin`}),getDiscoveryParamsSchema:w(i({}),qu),getManualCreationType:w(i({}),i({deviceType:m(E).nullable()})),adoptDiscoveredDevice:w(i({candidate:Wu}),Gu,{kind:`mutation`,auth:`admin`}),supportsManualCreation:w(i({}),v()),getChildCreationSchema:w(i({type:m(E)}),qu),createDevice:w(i({type:m(E),config:n(g(),u())}),Gu,{kind:`mutation`,auth:`admin`}),testCreationField:w(i({type:m(E),key:g(),value:u(),formValues:n(g(),u()).optional()}),Ku,{kind:`mutation`,auth:`admin`})}},Yu=256,Xu=i({childKey:g(),section:g(),order:a().optional(),collapsed:v().optional()}),Zu=i({unit:g().min(1).optional(),precision:a().int().min(0).max(10).optional()}),Qu=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(),Zu).optional()}),$u=i({unit:g().min(1).optional(),precision:a().int().min(0).max(10).optional(),icon:g().min(1).optional()}),ed=i({id:a(),stableId:g(),addonId:g(),type:m(E),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:uu.optional(),integrationId:g().optional(),linkDeviceId:a().nullable().optional(),primaryChildEntityId:g().nullable().optional(),childLayout:p(Xu).readonly().optional(),display:Qu.optional()}),td=i({key:g(),value:u(),description:g().optional()}),nd=m([`auto`,`manual`]),rd=i({deviceId:a(),name:g(),location:g().nullable(),features:p(g()),producesTrackedEvents:v().optional()}),id=i({deviceId:a(),mode:nd,devices:p(rd)}),ad=i({deviceId:a(),entries:p(i({capName:g(),kind:m([`native`,`wrapped`]),providerAddonId:g(),providerNodeId:g(),nativeAddonId:g()}))}),od=i({id:a(),stableId:g(),type:g(),name:g(),location:g().nullable(),disabled:v(),parentDeviceId:a().nullable(),role:g().nullable().optional()}),sd=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:uu.optional(),integrationId:g().optional(),linkDeviceId:a().nullable().optional(),primaryChildEntityId:g().nullable().optional(),childLayout:p(Xu).readonly().optional(),role:g().nullable().optional(),display:Qu.optional()}),cd=u().nullable(),ld=i({streamId:g(),width:a().optional(),height:a().optional(),codec:g().optional(),fps:a().optional(),bitrateKbps:a().optional()}),ud=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())}),dd=i({deviceId:a()}),fd=i({deviceId:a(),data:n(g(),u())}),pd={name:`device-manager`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,methods:{allocateDeviceId:w(i({addonId:g(),stableId:g()}),i({id:a()}),{kind:`mutation`}),registerDevice:w(ud,h(),{kind:`mutation`}),removeDevice:w(dd,h(),{kind:`mutation`}),persistConfig:w(fd,h(),{kind:`mutation`}),loadConfig:w(i({deviceId:a()}),n(g(),u())),loadRuntimeState:w(i({deviceId:a()}),n(g(),u())),loadMeta:w(i({deviceId:a()}),sd.nullable()),setName:w(i({deviceId:a(),name:g()}),h(),{kind:`mutation`,auth:`admin`}),setLocation:w(i({deviceId:a(),location:g().nullable()}),h(),{kind:`mutation`,auth:`admin`}),setType:w(i({deviceId:a(),type:m(E)}),h(),{kind:`mutation`,auth:`admin`}),setIntegrationId:w(i({deviceId:a(),integrationId:g()}),h(),{kind:`mutation`,auth:`admin`}),setLinkDeviceId:w(i({deviceId:a(),linkDeviceId:a().nullable()}),h(),{kind:`mutation`,auth:`admin`}),setPrimaryChildEntityId:w(i({deviceId:a(),primaryChildEntityId:g().nullable()}),h(),{kind:`mutation`,auth:`admin`}),setChildLayout:w(i({deviceId:a(),childLayout:p(Xu).readonly()}),h(),{kind:`mutation`,auth:`admin`}),setDisplay:w(i({deviceId:a(),display:Qu.nullable()}),h(),{kind:`mutation`,auth:`admin`}),getRoleDisplayDefaults:w(i({}),i({defaults:n(g(),$u)}),{kind:`query`}),setRoleDisplayDefaults:w(i({defaults:n(g(),$u)}),h(),{kind:`mutation`,auth:`admin`}),getWireableFields:w(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:w(i({deviceId:a(),role:g().nullable()}),h(),{kind:`mutation`,auth:`admin`}),applyInitialMeta:w(i({deviceId:a(),name:g().optional(),location:g().nullable().optional(),type:m(E).optional(),integrationId:g().optional(),linkDeviceId:a().nullable().optional(),role:g().nullable().optional()}),h(),{kind:`mutation`,auth:`admin`}),setMetadata:w(i({deviceId:a(),patch:n(g(),u())}),h(),{kind:`mutation`,auth:`admin`}),listLocations:w(h(),p(g())),addLocation:w(i({name:g()}),h(),{kind:`mutation`,auth:`admin`}),removeLocation:w(i({name:g(),cascade:v().optional()}),h(),{kind:`mutation`,auth:`admin`}),setDisabled:w(i({deviceId:a(),disabled:v()}),h(),{kind:`mutation`,auth:`admin`}),listPersistedByAddon:w(i({addonId:g()}),p(od)),listAll:w(i({addonId:g().optional(),projection:m([`full`,`slim`]).optional(),isCamera:v().optional(),deviceIds:p(a()).optional()}),p(ed)),getDevice:w(i({deviceId:a()}),ed.nullable()),getChildren:w(i({parentDeviceId:a()}),p(ed)),getChildrenBatch:w(i({parentDeviceIds:p(a()).max(256)}),n(g(),p(ed))),getLinkedDevices:w(i({deviceId:a()}),i({mode:nd,devices:p(rd)})),getLinkedDevicesBatch:w(i({deviceIds:p(a())}),p(id)),getStreamSources:w(i({deviceId:a()}),p(Ze)),getConfigSchema:w(i({deviceId:a()}),p(td)),getSettingsSchema:w(i({deviceId:a()}),cd),updateConfig:w(i({deviceId:a(),values:n(g(),u())}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),enable:w(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),disable:w(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),remove:w(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),removeByIntegration:w(i({integrationId:g()}),i({removed:a()}),{kind:`mutation`,auth:`admin`}),getStreamProfileMap:w(i({deviceId:a()}),n(g(),g().nullable())),setStreamProfileMap:w(i({deviceId:a(),profileMap:n(g(),g().nullable())}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),probeStreams:w(i({deviceId:a()}),p(ld),{kind:`mutation`,auth:`admin`}),getBindings:w(i({deviceId:a()}),ad),getBindingsBatch:w(i({deviceIds:p(a())}),p(ad)),getAllBindings:w(i({}),p(ad)),setWrapperActive:w(i({deviceId:a(),capName:g(),wrapperAddonId:g(),active:v()}),h(),{kind:`mutation`,auth:`admin`}),listWrappersForCap:w(i({capName:g()}),p(g())),listBindableCapsForDeviceType:w(i({deviceType:g()}),p(i({capName:g(),wrappers:p(g())}))),getDeviceSettingsAggregate:w(i({deviceId:a()}),B.nullable()),getDeviceLiveInfoAggregate:w(i({deviceId:a()}),B.nullable()),getDeviceAggregate:w(i({deviceId:a()}),i({settings:B.nullable(),live:B.nullable()})),runDeviceAction:w(i({deviceId:a().int().nonnegative(),action:g().min(1),input:u()}),u(),{kind:`mutation`}),updateDeviceField:w(i({deviceId:a(),writerCapName:g(),writerAddonId:g(),key:g(),value:u()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),updateDeviceFieldsBatch:w(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:w(i({addonId:g()}),p(Wu),{kind:`mutation`,auth:`admin`}),adoptDevice:w(i({addonId:g(),candidate:Wu,integrationId:g().optional()}),Gu,{kind:`mutation`,auth:`admin`}),getCreationSchema:w(i({addonId:g(),type:m(E)}),u().nullable()),createDevice:w(i({addonId:g(),type:m(E),config:n(g(),u()),integrationId:g().optional()}),Gu,{kind:`mutation`,auth:`admin`}),testCreationField:w(i({addonId:g(),type:m(E),key:g(),value:u(),formValues:n(g(),u()).optional()}),Ku,{kind:`mutation`,auth:`admin`}),adoptionListCandidateFilters:w(i({addonId:g(),integrationId:g()}),i({filters:p(bu)}),{auth:`admin`}),adoptionListCandidates:w(Su.extend({addonId:g()}),Cu,{auth:`admin`}),adoptionRefresh:w(i({addonId:g(),integrationId:g()}),Tu,{kind:`mutation`,auth:`admin`}),adoptionAdopt:w(Du.extend({addonId:g()}),Ou,{kind:`mutation`,auth:`admin`}),adoptionRelease:w(ku.extend({addonId:g()}),h(),{kind:`mutation`,auth:`admin`}),adoptionStartJob:w(Du.extend({addonId:g()}),i({jobId:g()}),{kind:`mutation`,auth:`admin`}),adoptionListJobs:w(i({addonId:g(),integrationId:g().optional()}),p(kr).readonly(),{auth:`admin`}),adoptionCancelJob:w(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),adoptionResync:w(Au,ju,{kind:`mutation`,auth:`admin`}),discoveryProviders:w(i({}),i({providers:p(i({addonId:g(),label:g()})).readonly()}),{auth:`admin`}),discoverAllProviders:w(i({}),i({groups:p(i({addonId:g(),label:g(),candidates:p(Wu).readonly(),error:g().nullable()})).readonly()}),{kind:`mutation`,auth:`admin`}),discoverProvider:w(i({addonId:g(),params:n(g(),u()).optional()}),i({candidates:p(Wu).readonly()}),{kind:`mutation`,auth:`admin`}),providerCreationType:w(i({addonId:g()}),i({deviceType:m(E).nullable()}),{auth:`admin`}),providerDiscoveryParamsSchema:w(i({addonId:g()}),u(),{auth:`admin`}),testField:w(i({deviceId:a(),key:g(),value:u()}),Ku,{kind:`mutation`,auth:`admin`}),getDeviceStatusAggregate:w(i({deviceId:a(),caps:p(g()).readonly().optional()}),n(g(),u().nullable())),getDeviceStatusAggregateBatch:w(i({deviceIds:p(a()).readonly(),caps:p(g()).readonly().optional()}),n(g(),n(g(),u().nullable())))}},md={name:`device-state`,scope:`system`,mode:`singleton`,methods:{getSnapshot:w(i({deviceId:a()}),n(g(),n(g(),u()))),getCapSlice:w(i({deviceId:a(),capName:g()}),n(g(),u()).nullable()),getAllSnapshots:w(i({}),n(g(),n(g(),n(g(),u())))),setCapSlice:w(i({deviceId:a(),capName:g(),slice:n(g(),u())}),h(),{kind:`mutation`})},events:{onChanged:T(i({deviceId:a(),capName:g(),slice:n(g(),u())}))}},hd=i({embedding:p(a()),inferenceMs:a()}),gd=i({modelId:g(),embeddingDim:a(),ready:v()}),_d={name:`embedding-encoder`,scope:`system`,mode:`collection`,internal:!0,methods:{encode:w(i({crop:_(Uint8Array),width:a(),height:a()}),hd,{auth:`admin`}),encodeText:w(i({text:g()}),hd,{auth:`admin`}),getInfo:w(h(),gd,{auth:`admin`})}},vd=i({name:g(),path:g()}),yd=i({path:g(),entries:p(vd).readonly(),freeBytes:a(),totalBytes:a()}),bd={name:`filesystem-browse`,scope:`system`,mode:`singleton`,internal:!0,methods:{listAllowedRoots:w(h(),p(g()).readonly(),{auth:`admin`}),browse:w(i({path:g()}),yd,{auth:`admin`}),createDir:w(i({path:g()}),i({path:g()}),{kind:`mutation`,auth:`admin`})}},xd=i({inputTokens:a(),outputTokens:a()}),Sd=m([`timeout`,`rate-limited`,`auth`,`refusal`,`bad-request`,`unavailable`,`no-profile`,`budget-exceeded`,`adapter-error`]),Cd=i({ok:y(!0),text:g(),model:g(),usage:xd,truncated:v(),latencyMs:a()}),wd=i({ok:y(!1),code:Sd,message:g(),retryAfterMs:a().optional()}),Td=b(`ok`,[Cd,wd]),Ed=i({bytes:_(Uint8Array),mimeType:g()}),Dd=i({enabled:v().default(!1),maxAttempts:a().int().min(1).max(5).default(1)}),Od={totalMs:6e4,connectMs:1e4,firstTokenMs:12e4,idleMs:6e4},kd=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:Dd.optional(),requestId:g().optional()}),Ad=i({url:g(),filename:g(),sizeBytes:a(),sha256:g().optional()}),jd=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(Ad).optional()}),i({kind:y(`path`),path:g()})]),Md=i({nodeId:g(),engine:m([`llama-cpp`]),model:jd,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)}),Nd=i({phase:m([`downloading`,`verifying`]),file:g(),fileIndex:a().int(),fileCount:a().int(),downloadedBytes:a(),totalBytes:a().optional()}),Pd=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:Nd.optional(),lastError:g().optional(),crashesInWindow:a(),memoryBytes:a().optional(),vramBytes:a().optional()}),Fd=i({file:g(),sizeBytes:a(),catalogId:g().optional(),installedAt:a().optional(),path:g().optional()}),Id=i({nodeId:g(),modelsBytes:a(),freeBytes:a().optional()}),Ld=kd.extend({images:p(Ed).optional(),runtime:Md,timeoutMs:a().int().positive().optional()}),Rd={name:`llm-runtime`,scope:`system`,mode:`singleton`,internal:!0,methods:{complete:w(Ld,Td,{kind:`mutation`,auth:`admin`}),ensureStarted:w(i({runtime:Md}),Pd,{kind:`mutation`,auth:`admin`}),stop:w(i({}),h(),{kind:`mutation`,auth:`admin`}),status:w(i({}),Pd,{auth:`admin`}),installModel:w(i({model:jd}),h(),{kind:`mutation`,auth:`admin`}),deleteModel:w(i({file:g()}),h(),{kind:`mutation`,auth:`admin`}),listLocalModels:w(i({}),p(Fd),{auth:`admin`}),getDiskUsage:w(i({}),Id,{auth:`admin`})}},zd=m([`openai-compatible`,`openai`,`anthropic`,`google`,`managed-local`]),Bd=i({id:g(),name:g(),kind:zd,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:Dd.default({enabled:!1,maxAttempts:1}),toolsEnabled:v().default(!1),extraHeaders:n(g(),g()).optional(),runtime:Md.optional()}),Vd=u(),Hd=i({kind:zd,label:g(),icon:g(),addonId:g(),configSchema:Vd}),Ud=c([i({consumer:g()}),i({purpose:m([`text`,`vision`])})]),Wd=i({selector:Ud,profileId:g()}),Gd=i({day:g(),consumer:g(),profileId:g(),calls:a(),okCalls:a(),errorCalls:a(),inputTokens:a(),outputTokens:a(),avgLatencyMs:a()}),Kd=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()}),qd=b(`ok`,[i({ok:y(!0),model:jd,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()})]),Jd=i({nodeId:g(),reachable:v(),status:Pd.optional(),disk:Id.optional(),error:g().optional()}),Yd=kd.extend({images:p(Ed).min(1)}),Xd=i({addonId:g(),profileId:g()}),Zd={name:`llm`,scope:`system`,mode:`collection`,internal:!1,providerKind:`ai`,nodeIdMode:`data`,methods:{generate:w(kd,Td,{kind:`mutation`}),generateVision:w(Yd,Td,{kind:`mutation`}),cancel:w(i({addonId:g().optional(),requestId:g()}),h(),{kind:`mutation`}),listProfileKinds:w(i({}),p(Hd)),listProfiles:w(i({}),p(Bd)),upsertProfile:w(i({profile:Bd}),Bd,{kind:`mutation`,auth:`admin`}),deleteProfile:w(Xd,h(),{kind:`mutation`,auth:`admin`}),testProfile:w(Xd,Td,{kind:`mutation`,auth:`admin`}),listModels:w(Xd,p(g())),getDefaults:w(i({}),p(Wd)),setDefault:w(i({selector:Ud,profileId:g().nullable()}),h(),{kind:`mutation`,auth:`admin`}),getUsage:w(i({since:a().optional(),until:a().optional(),consumer:g().optional(),profileId:g().optional()}),p(Gd)),listModelCatalog:w(i({}),p(Kd)),listRuntimeNodes:w(i({}),p(Jd)),listNodeModels:w(i({nodeId:g()}),p(Fd)),resolveModelRef:w(i({ref:g(),maxBytes:a().positive().optional()}),qd,{kind:`mutation`,auth:`admin`}),installModel:w(i({nodeId:g(),model:jd}),h(),{kind:`mutation`,auth:`admin`}),deleteModel:w(i({nodeId:g(),file:g()}),h(),{kind:`mutation`,auth:`admin`}),getRuntimeStatus:w(Xd,Pd),startRuntime:w(Xd,Pd,{kind:`mutation`,auth:`admin`}),stopRuntime:w(Xd,h(),{kind:`mutation`,auth:`admin`})}},Qd=i({armed:a().int().min(0),unknown:p(g()).readonly()}),$d={name:`log-channels`,scope:`system`,mode:`collection`,internal:!0,methods:{list:w(h(),p(ai).readonly()),apply:w(i({windows:p(oi).readonly()}),Qd,{kind:`mutation`})},mount:{kind:`skip`}},ef=m([`debug`,`info`,`warn`,`error`]),tf=i({timestamp:te(),level:ef,scope:p(g()),message:g(),meta:n(g(),u()).optional(),tags:n(g(),g()).optional()}),nf={name:`log-destination`,scope:`system`,mode:`collection`,internal:!0,methods:{write:w(tf,h(),{kind:`mutation`}),query:w(i({scope:p(g()).optional(),level:ef.optional(),since:te().optional(),until:te().optional(),limit:a().optional(),tags:n(g(),g()).optional()}),p(tf).readonly())},mount:{kind:`skip`}},rf=i({reason:g(),count:a().int().nonnegative()}),af=i({family:g(),deviceId:a().int().positive(),variant:g().optional(),sinceMs:a(),atMs:a(),attempts:a().int().nonnegative(),succeeded:a().int().nonnegative(),reasons:p(rf).readonly()}),of={name:`failure-contribution`,scope:`system`,mode:`collection`,internal:!0,methods:{list:w(h(),p(af).readonly())},mount:{kind:`skip`}},sf=[`decode`,`transcode`,`recording`,`streaming`,`detection`],cf=[`measured`,`accounted`,`unattributable`],lf=i({role:m(sf),deviceId:a().int().positive().nullable(),attribution:m(cf),unit:g(),pid:a().int().positive().optional(),startedAtMs:a().optional(),cpuSeconds:a().optional(),rssBytes:a().optional()}),uf={name:`load-contribution`,scope:`system`,mode:`collection`,internal:!0,methods:{list:w(h(),p(lf).readonly())},mount:{kind:`skip`}},df=m([`primary`,`second-factor`]),ff=i({kind:y(`redirect`),id:g(),label:g(),icon:g().optional(),startUrl:g(),stage:df}),pf=i({kind:y(`widget`),id:g(),addonId:g(),bundle:g(),remote:Vs,stage:df}),mf=i({kind:y(`passkey`),id:g(),label:g(),stage:df,rpId:g(),origin:g().nullable()}),hf=b(`kind`,[ff,pf,mf]),gf={name:`login-method`,scope:`system`,mode:`collection`,internal:!0,methods:{getLoginMethods:w(h(),p(hf).readonly())},mount:{kind:`skip`}},_f=i({total:a(),user:a(),system:a(),irq:a(),nice:a(),loadAvg:s([a(),a(),a()]),cores:a()}),vf=i({percent:a(),totalBytes:a(),usedBytes:a(),availableBytes:a(),swapUsedBytes:a(),swapTotalBytes:a()}),yf=i({readBytes:a(),writeBytes:a(),readOps:a(),writeOps:a(),timestampMs:a()}),bf=i({rxBytes:a(),txBytes:a(),rxPackets:a(),txPackets:a(),rxErrors:a(),txErrors:a(),timestampMs:a()}),xf=i({utilization:a(),model:g(),memoryUsedBytes:a(),memoryTotalBytes:a(),temperature:a().nullable()}),Sf=i({openFds:a(),threadCount:a(),activeHandles:a(),activeRequests:a()}),Cf=i({avg10:a(),avg60:a(),avg300:a()}),wf=i({some:Cf,full:Cf.nullable()}),Tf=i({cpu:_f,memory:vf,gpu:xf.nullable(),network:bf,disk:yf,pressure:i({cpu:wf.nullable(),memory:wf.nullable(),io:wf.nullable()}),process:Sf,cpuTemperature:a().nullable(),timestampMs:a()}),Ef=i({path:g(),totalBytes:a(),usedBytes:a(),availableBytes:a(),percent:a()}),Df=i({pid:a(),cpu:a(),memory:a(),privateBytes:a().optional(),sharedBytes:a().optional()}),Of=i({addonId:g(),nodeId:g(),role:m([`hub`,`worker`]),pid:a(),state:m([`starting`,`running`,`stopping`,`stopped`,`crashed`]),uptimeSec:a()}),kf=i({pid:a(),ppid:a(),pgid:a(),classification:m([`root`,`managed`,`system`]),addonId:g().nullable(),nodeId:g().nullable(),command:g(),cpuPercent:a(),memoryRssBytes:a(),cpuMainPercent:a().nullable(),cpuGcPercent:a().nullable(),threadCount:a().nullable(),uptimeSec:a()}),Af=i({source:m([`cgroup-v2`,`cgroup-v1`]),currentBytes:a(),limitBytes:a().nullable(),anonBytes:a().nullable(),fileBytes:a().nullable(),shmemBytes:a().nullable(),slabBytes:a().nullable(),gpuShmemBytes:a().nullable()}).extend({atMs:a()}),jf=i({addonId:g()}),Mf=i({success:v(),path:g().optional(),pid:a().optional(),reason:g().optional()}),Nf=i({atMs:a(),samples:a().int(),cpuMainPercent:a().nullable(),cpuMainPercentMin:a().nullable(),cpuGcPercent:a().nullable(),cpuGcPercentMin:a().nullable(),cpuLifetimePercent:a(),cpuLifetimePercentMin:a(),memoryRssBytes:a(),memoryRssBytesMin:a(),processCount:a().int(),processCountMin:a().int()}),Pf=i({key:g(),kind:m([`addon`,`root`,`unattributed`]),points:p(Nf).readonly()}),Ff=i({nodeId:g(),series:p(Pf).readonly(),containerMemory:p(Af).readonly(),bucketMs:a(),retainedSamples:a(),oldestAtMs:a().nullable(),cadenceMs:a(),durable:v()}),If=i({forNodeId:g(),sinceMs:a().optional(),maxPoints:a().int().positive().optional()}),Lf=i({cpuPercent:a(),memoryPercent:a(),memoryUsedMB:a(),memoryTotalMB:a(),diskPercent:a().optional(),temperature:a().optional(),gpuPercent:a().optional(),gpuMemoryPercent:a().optional()}),Rf={name:`metrics-provider`,scope:`system`,mode:`singleton`,methods:{collectSnapshot:w(h(),Tf),getCached:w(h(),Tf.nullable()),getCurrent:w(h(),Lf),getDiskSpace:w(i({dirPath:g()}),Ef),getGpuInfo:w(h(),xf.nullable()),getCpuTemperature:w(h(),a().nullable()),getProcessStats:w(i({pids:p(a())}),p(Df)),listAddonInstances:w(h(),p(Of).readonly()),getAddonStats:w(i({addonId:g()}),Df.nullable()),listNodeProcesses:w(h(),p(kf).readonly()),getLoadSeries:w(If,Ff),dumpHeapSnapshot:w(jf,Mf,{kind:`mutation`,auth:`admin`})}},zf=i({sourceUrl:g(),metadata:no,targets:p(to).min(1).readonly(),calibrationRef:g().optional(),sessionId:g().optional()}),Bf={name:`model-convert`,scope:`system`,mode:`singleton`,internal:!0,methods:{convert:w(zf,io,{kind:`mutation`,auth:`admin`,timeoutMs:6e5})}},Vf=i({nodeId:g(),modelId:g(),format:m(qa),entry:eo}),Hf=i({ok:v(),sha256:g(),bytes:a(),path:g()}),Uf={name:`model-distributor`,scope:`system`,mode:`singleton`,internal:!0,methods:{distributeModel:w(Vf,Hf,{kind:`mutation`,auth:`admin`})}},Wf=i({bbox:V,pixelCount:a(),intensity:a()}),Gf=i({detected:v(),regionCount:a(),regions:p(Wf).readonly(),rawRegions:p(Wf).readonly(),frameWidth:a(),frameHeight:a(),analysisMs:a()}),Kf={name:`motion-detection`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[E.Camera],exposesDeviceSettings:!0,methods:{analyze:w(i({deviceId:a(),frame:$s.optional(),frameHandle:C.optional()}),Gf,{kind:`mutation`}),removeCamera:w(i({deviceId:a()}),h(),{kind:`mutation`}),reset:w(h(),h(),{kind:`mutation`})},events:{onMotion:{data:i({deviceId:a(),detected:v(),regionCount:a()})}}},qf=m([`external`,`embedded`]),Jf=m([`connected`,`disconnected`,`auth-failed`,`unreachable`,`tls-error`]),Yf=i({id:g(),name:g(),url:g(),kind:qf,status:Jf,latencyMs:a().nullable(),error:g().optional(),connectedClients:a().int().nonnegative().optional(),lastCheckedAt:a().optional()}),Xf=i({url:g(),username:g().optional(),password:g().optional(),clientIdPrefix:g().optional()}),Zf=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()}),Qf=i({id:g()}),$f=i({id:g()}),ep=b(`ok`,[i({ok:y(!0),latencyMs:a()}),i({ok:y(!1),error:g()})]),tp=i({port:a().int().min(1).max(65535).default(1883),allowAnonymous:v().default(!1),username:g().optional(),password:g().optional()}),np=i({id:g(),url:g()}),rp=i({brokerCount:a(),embeddedRunning:v()}),ip={name:`mqtt-broker`,scope:`system`,mode:`collection`,providerKind:`broker`,status:{schema:rp,kind:`poll`},methods:{listBrokers:w(h(),p(Yf)),getBrokerConfig:w($f,Xf),addBroker:w(Zf,Qf,{kind:`mutation`}),removeBroker:w($f,h(),{kind:`mutation`}),testConnection:w($f,ep,{kind:`mutation`}),startEmbeddedBroker:w(tp,np,{kind:`mutation`}),stopEmbeddedBroker:w($f,h(),{kind:`mutation`}),getStatus:w(h(),rp)}},ap=i({url:g(),hostname:g(),port:a(),protocol:m([`http`,`https`])}),op=i({connected:v(),endpoint:ap.nullable(),error:g().optional()}),sp=ap.extend({id:g(),label:g(),mode:g().optional(),sourcePort:a().optional()}),cp={name:`network-access`,scope:`system`,mode:`collection`,providerKind:`ingress`,methods:{start:w(h(),ap,{kind:`mutation`}),stop:w(h(),h(),{kind:`mutation`}),getEndpoint:w(h(),ap.nullable()),getStatus:w(h(),op),listEndpoints:w(h(),p(sp).readonly())}},lp=m([`image`,`video`,`gif`,`audio`,`icon`]),up=i({mediaType:lp,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`"}),dp=m([`text`,`markdown`,`html`]),fp=m([`acknowledge`,`dismiss`,`silence`,`snooze`,`view`,`play`,`open`,`close`,`lock`,`unlock`,`arm`,`arm-home`,`arm-away`,`arm-night`,`disarm`,`light`,`alert`,`camera`]),pp=i({id:g(),label:g(),url:g().optional(),icon:fp.optional(),destructive:v().optional(),mode:m([`navigate`,`background`]).optional()}),mp=i({body:g(),title:g().optional(),format:dp.default(`text`),priority:a().int().min(1).max(5).default(3),level:g().optional(),attachments:p(up).optional(),clickUrl:g().optional(),actions:p(pp).optional(),sound:g().optional(),ttl:a().optional(),tag:g().optional(),deviceId:a().optional(),eventId:g().optional(),metadata:n(g(),u()).optional()}),hp=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()}),gp=i({attachments:i({mediaTypes:p(lp),mode:m([`url`,`bytes`,`both`]),max:a().int().nonnegative(),maxBytes:a().int().positive().optional()}),actions:a().int().nonnegative(),actionIcons:v().optional(),levels:p(hp),format:p(dp),clickUrl:v(),sound:v(),ttl:v(),bodyMaxLen:a().int().positive()}),_p=u(),vp=i({kind:g(),label:g(),icon:g(),addonId:g(),iconUrl:g().optional(),iconMediaType:g().optional(),configSchema:_p,supportsDiscovery:v(),caps:gp}),yp=i({id:g(),name:g(),kind:g(),addonId:g(),enabled:v(),config:n(g(),u())}),bp=i({kind:g(),suggestedName:g(),config:n(g(),u())}),xp=i({level:g(),format:dp,attachmentsSent:a().int().nonnegative(),actionsSent:a().int().nonnegative(),truncated:v(),dropped:p(g())}),Sp=i({success:v(),error:g().optional(),renderedAs:xp.optional()}),Cp=Sp,wp={name:`notification-output`,scope:`system`,mode:`collection`,methods:{listTargetKinds:w(i({}),p(vp)),listTargets:w(i({}),p(yp)),discoverTargets:w(i({kind:g(),config:n(g(),u()).optional()}),p(bp)),send:w(i({targetId:g(),notification:mp}),Sp,{kind:`mutation`}),testTarget:w(i({targetId:g(),sample:mp.optional()}),Cp,{kind:`mutation`}),upsertTarget:w(i({target:yp}),yp,{kind:`mutation`}),deleteTarget:w(i({targetId:g()}),h(),{kind:`mutation`}),setTargetEnabled:w(i({targetId:g(),enabled:v()}),h(),{kind:`mutation`})}},Tp=[{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`}],Ep=[{id:`person`,name:`Person`},{id:`vehicle`,name:`Vehicle`},{id:`animal`,name:`Animal`},{id:`package`,name:`Package`}],Dp=new Set(Ep.map(e=>e.id));function Op(e){return Dp.has(e.trim().toLowerCase())}var kp={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},Ap=[{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`}],jp={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},Mp={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},Np=new Map;for(let[e,t]of Object.entries(jp.mapping))Np.set(e.toLowerCase(),t);for(let[e,t]of Object.entries(Mp.mapping))Np.set(e.toLowerCase(),t);function Pp(e){return Np.get(e.toLowerCase())??null}function Fp(){return Ap.map(e=>e.id)}var W={motion:`#f59e0b`,audio:`#06b6d4`,person:`#22c55e`,vehicle:`#3b82f6`,animal:`#f97316`,package:`#a855f7`,sensor:`#8b5cf6`,control:`#10b981`,genericDetection:`#64748b`},Ip=`#22ff55`,Lp={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 Rp(e){return e.split(/[-_ ]/).filter(e=>e.length>0).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}var zp=new Map;function G(e,t,n,r,i){zp.set(e,{kind:e,parentKind:null,level:`macro`,category:t,color:n,iconId:r,labelKey:`eventKind.${e}`,label:i})}function K(e,t,n,r,i,a){zp.set(e,{kind:e,parentKind:t,level:`sub`,category:n,color:r,iconId:i,labelKey:`eventKind.${e}`,label:a})}G(`motion`,`motion`,W.motion,`motion`,`Motion`),G(`audio`,`audio`,W.audio,`audio`,`Audio`),G(`person`,`detection`,W.person,`person`,`Person`),G(`vehicle`,`detection`,W.vehicle,`vehicle`,`Vehicle`),G(`animal`,`detection`,W.animal,`animal`,`Animal`),G(`package`,`package`,W.package,`package`,`Package`),G(`sensor`,`sensor`,W.sensor,`sensor`,`Sensor`),G(`control`,`control`,W.control,`control`,`Control`);for(let[e,t]of Object.entries(kp.mapping))t!==`vehicle`&&t!==`animal`||zp.has(e)||K(e,t,`detection`,Lp[e]??W.genericDetection,e,Rp(e));K(`package-delivered`,`package`,`package`,W.package,`package`,`Package delivered`),K(`package-picked-up`,`package`,`package`,W.package,`package`,`Package picked up`),K(`contact`,`sensor`,`sensor`,`#f59e0b`,`door`,`Contact`),K(`motion-sensor`,`sensor`,`sensor`,W.sensor,`pir`,`Motion sensor`),K(`smoke`,`sensor`,`sensor`,`#ef4444`,`smoke`,`Smoke`),K(`flood`,`sensor`,`sensor`,`#3b82f6`,`water`,`Water leak`),K(`gas`,`sensor`,`sensor`,`#ef4444`,`gas`,`Gas`),K(`carbon-monoxide`,`sensor`,`sensor`,`#dc2626`,`smoke`,`Carbon monoxide`),K(`vibration`,`sensor`,`sensor`,`#eab308`,`vibration`,`Vibration`),K(`tamper`,`sensor`,`sensor`,`#f97316`,`tamper`,`Tamper`),K(`presence`,`sensor`,`sensor`,`#22c55e`,`presence`,`Presence`),K(`enum-sensor`,`sensor`,`sensor`,W.sensor,`generic`,`Sensor state`),K(`device-event`,`sensor`,`sensor`,`#10b981`,`button`,`Device event`),K(`lock`,`control`,`control`,`#0ea5e9`,`lock`,`Lock`),K(`switch`,`control`,`control`,W.control,`switch`,`Switch`),K(`siren`,`control`,`control`,`#dc2626`,`siren`,`Siren`),K(`button`,`control`,`control`,`#10b981`,`button`,`Button`),K(`doorbell`,`control`,`control`,`#a855f7`,`doorbell`,`Doorbell`);for(let e of Ap){let t=`audio-${e.id}`;zp.has(t)||K(t,`audio`,`audio`,W.audio,t,e.name)}var Bp=Object.freeze(Object.fromEntries(zp));function Vp(e){return Bp[e]}function Hp(e){return Bp[e]?.color??`#22ff55`}function Up(e){let t=[];for(let n of Object.values(Bp))n.parentKind===e&&t.push(n);return t}var Wp=i({kind:g(),label:g(),parentKind:g().nullable()}),Gp=i({videoClasses:p(Wp),audioKinds:p(Wp),labels:p(Wp)});function Kp(e,t,n){return{kind:e,label:t,parentKind:n}}function qp(){let e=Object.values(Bp);return{videoClasses:e.filter(e=>e.category===`detection`).map(e=>Kp(e.kind,e.label,e.parentKind)),audioKinds:e.filter(e=>e.category===`audio`&&e.level===`sub`).map(e=>Kp(e.kind,e.label,e.parentKind)),labels:e.filter(e=>e.category===`sensor`||e.category===`control`).map(e=>Kp(e.kind,e.label,e.parentKind))}}var Jp=Object.freeze(qp()),Yp=m([`disarmed`,`armed_home`,`armed_away`,`armed_night`,`armed_vacation`,`armed_custom_bypass`,`arming`,`disarming`,`pending`,`triggered`]),Xp=m([`home`,`away`,`night`,`vacation`,`custom_bypass`]),Zp=i({state:Yp,availableModes:p(Xp),requiresCode:v(),lastChangedAt:a()}),Qp={name:`alarm-panel`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.AlarmPanel],methods:{arm:w(i({deviceId:a().int().nonnegative(),mode:Xp,code:g().min(1).optional()}),h(),{kind:`mutation`,auth:`admin`}),disarm:w(i({deviceId:a().int().nonnegative(),code:g().min(1).optional()}),h(),{kind:`mutation`,auth:`admin`}),trigger:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:Zp,kind:`push`},runtimeState:Zp,durability:`restored`,volatileStateFields:[`lastChangedAt`]},$p=i({x:a(),y:a()}),em=i({kind:y(`rect`),x:a(),y:a(),width:a(),height:a()}),tm=i({kind:y(`polygon`),points:p($p)}),nm=i({kind:y(`grid`),gridWidth:a(),gridHeight:a(),cells:p(v())}),rm=i({kind:y(`line`),points:p($p)}),im=b(`kind`,[em,tm,nm,rm]),am=m([`rect`,`polygon`,`grid`,`line`]),om=i({min:a(),max:a()}),sm=i({width:a(),height:a()}),cm=m([`immediate`,`track-end`,`device-event`,`package-event`,`system-event`]),lm=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`]),um=new Set([`camera-online`,`camera-offline`,`camera-disabled`,`camera-enabled`]),dm=lm.options.filter(e=>!um.has(e)),fm=[`alarm-arm-refused`,`alarm-arming`,`alarm-armed`,`alarm-triggered`,`alarm-disarmed`],pm=i({kinds:p(lm).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()}),mm=1,hm=1440,gm=[10,30,60],_m=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)}),vm=i({windows:p(_m).min(1),timezone:g().optional(),invert:v().optional()}),ym=i({values:p(g().min(1)),maxDistance:a().int().min(0).max(3).default(1)}),bm=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)}),xm=-96,Sm=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),confirmHits:a().int().min(1).max(20).optional(),confirmWindowSec:a().int().min(1).max(60).optional()}),Cm=m([`enter`,`exit`,`any`]),wm=i({ids:p(g().min(1)).min(1),match:m([`any`,`all`]).default(`any`)}),Tm=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()})]),Em=i({name:g().min(1).max(120),enabled:v(),minDelaySec:a().int().min(0).max(86400).optional(),actions:p(Tm).min(1)}),Dm=i({id:g().min(1).max(64),label:g().min(1).max(40),sequence:g().min(1).max(120),icon:fp.optional(),destructive:v().optional()}),Om=i({onTrigger:p(Em).optional(),buttons:p(Dm).max(8).optional()}),km=i({deviceId:a().int(),states:p(g().min(1)).min(1)}),Am=i({sceneId:g().min(1),deviceId:a().int().optional(),requiredState:m([`matched`,`diverged`]),latched:v().optional()}),jm=i({deviceState:km.optional(),scene:Am.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:wm.optional(),zonesExclude:p(g().min(1)).optional(),crossing:Cm.optional(),labelEquals:p(g().min(1)).optional(),identities:p(g().min(1)).optional(),plates:ym.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:pm.optional(),customZones:p(tm).optional(),occupancy:bm.optional(),audio:Sm.optional()}),Mm=i({targetId:g().min(1),params:n(g(),u()).optional()}),Nm=m([`cropped`,`full`,`boxed`]),Pm=i({attach:m([`best`,`best-matching`,`keyFrame`,`none`]).default(`best`),frame:Nm.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()}),Fm=m([`shared`,`per-class`]),Im=i({cooldownSec:a().int().min(0).max(86400).default(60),scope:m([`rule`,`rule-device`]).default(`rule-device`),granularity:Fm.optional()}),Lm=1e3,Rm=2e4,zm=8e3,Bm=448,Vm=i({op:m([`>=`,`>`,`<=`,`<`,`==`]),count:a().int().min(0).max(1e3)}),Hm=i({enabled:v().default(!1),profileId:g().optional(),prompt:g().max(1e3).optional(),expect:Vm.optional(),timeoutMs:a().int().min(Lm).max(Rm).default(zm),onTimeout:m([`fire`,`suppress`]).default(`fire`),maxImagePx:a().int().min(64).max(2048).default(448)}),Um=i({name:g().min(1).max(200),enabled:v().default(!0),delivery:cm,conditions:jm.default({}),schedule:vm.optional(),targets:p(Mm),targetUsers:p(g()).optional(),media:Pm.default({attach:`best`}),throttle:Im.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(hm)).max(4).optional(),actions:Om.optional(),confirm:Hm.optional(),waitForEnhancement:v().optional(),groupIdleSec:a().int().min(0).max(600).optional()}),Wm=Um.partial().extend({disabledTargetIds:p(g()).optional(),enabled:v().optional(),conditions:jm.optional(),media:Pm.optional(),throttle:Im.optional(),priority:a().int().min(1).max(5).optional()}),Gm=Um.extend({id:g(),createdBy:g(),createdAt:a(),updatedAt:a(),disabledTargetIds:p(g()).default([])}),Km=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()}),qm=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(cm),phase:g(),description:g().optional(),options:p(i({value:g(),label:g(),hint:g().optional()})).readonly().optional()}),Jm=[{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.`}],Ym=m([`pending`,`sent`,`dead`]),Xm=m([`object-event`,`track-end`,`device-event`,`package-event`,`system-event`]),Zm=i({className:g(),label:g().optional(),confidence:a().optional(),zones:p(g()),timestamp:a(),systemEvent:i({kind:lm,subject:g(),title:g(),body:g(),data:n(g(),u())}).optional()}),Qm=i({id:g(),ruleId:g(),ruleName:g(),delivery:cm,targetId:g(),deviceId:a(),recordKind:Xm,recordId:g(),trackId:g().optional(),status:Ym,attempts:a().int(),createdAt:a(),updatedAt:a(),error:g().optional(),subject:Zm,artifactIds:p(g().min(1)).optional()}),$m=100,eh=500,th=i({ruleId:g().optional(),deviceId:a().optional(),status:Ym.optional(),since:a().optional(),until:a().optional(),limit:a().int().min(1).max(500).default(100)}),nh=m([`rule`,`device`,`all`]),rh=i({scope:nh,ruleId:g().optional(),deviceId:a().int().optional(),classes:p(g().min(1)).min(1).optional(),durationMinutes:a().int().min(1).max(hm),global:v().optional(),summary:v().optional()}),ih=i({id:g(),userId:g(),scope:nh,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()}),ah=i({snoozeId:g(),targetId:g(),ruleId:g(),ruleName:g(),deviceId:a().int(),count:a().int(),firstAt:a(),lastAt:a()}),oh=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)}),sh=oh.partial(),ch=m([`muted`,`detection-off`,`offline`]),lh=i({deviceId:a().int(),reason:ch}),uh=i({mode:Xp,ruleCount:a().int().min(0),allDevices:v(),deviceIds:p(a().int()),skippedDevices:p(lh).default([])}),dh=i({deviceId:a().int().nullable(),settings:oh,coverage:p(uh)}),fh={name:`notification-rules`,scope:`system`,mode:`singleton`,methods:{listRules:w(i({}),i({rules:p(Gm)}),{auth:`admin`}),getRule:w(i({ruleId:g()}),i({rule:Gm.nullable()}),{auth:`admin`}),createRule:w(i({rule:Um}),i({rule:Gm}),{kind:`mutation`,auth:`admin`,caller:`required`}),updateRule:w(i({ruleId:g(),patch:Wm}),i({rule:Gm}),{kind:`mutation`,auth:`admin`,caller:`required`}),deleteRule:w(i({ruleId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setRuleEnabled:w(i({ruleId:g(),enabled:v()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),listDeviceMutes:w(i({}),i({mutedDeviceIds:p(a().int()).readonly()}),{auth:`admin`}),setDeviceMuted:w(i({deviceId:a().int(),muted:v()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),testRule:w(i({rule:Um,lookbackMinutes:a().int().min(1).max(1440).default(60)}),i({results:p(Km)}),{kind:`mutation`,auth:`admin`}),getConditionCatalog:w(i({}),i({catalog:p(qm),taxonomy:Gp.optional()})),getHistory:w(i({filter:th.default({limit:100})}),i({entries:p(Qm)}),{auth:`admin`}),resolveArtifactUrl:w(i({artifactId:g().min(1)}),i({url:g().nullable()}),{auth:`admin`}),listSnoozes:w(i({}),i({snoozes:p(ih)}),{caller:`required`}),createSnooze:w(i({snooze:rh}),i({snooze:ih}),{kind:`mutation`,caller:`required`}),cancelSnooze:w(i({snoozeId:g()}),i({success:y(!0)}),{kind:`mutation`,caller:`required`}),getAlarmConfig:w(i({}),dh,{auth:`admin`}),setAlarmConfig:w(i({patch:sh}),dh,{kind:`mutation`,auth:`admin`})}},ph=m([`view`,`create`,`delete`]),mh=c([y(`*`),p(g())]),hh=n(g(),c([y(`*`),p(g())])),gh=m([`device`,`system`]),_h=b(`kind`,[i({kind:y(`all`)}),i({kind:y(`ids`),ids:p(a().int()).min(1)}),i({kind:y(`types`),types:p(m(E)).min(1)}),i({kind:y(`locations`),locations:p(g().min(1)).min(1)})]),vh=i({type:y(`device`),selector:_h,access:p(ph).min(1),includeLinked:v().optional()});function yh(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 q=oe(yh,b(`type`,[i({type:y(`category`),target:gh,access:p(ph).min(1)}),i({type:y(`capability`),target:g(),access:p(ph).min(1)}),i({type:y(`addon`),target:g(),access:p(ph).min(1)}),vh])),bh=i({id:g(),username:g(),passwordHash:g(),isAdmin:v().default(!1),allowedProviders:mh,allowedDevices:hh,scopes:p(q).default([]),createdAt:a(),updatedAt:a()}),xh=i({id:g(),label:g(),isAdmin:v().default(!1),allowedProviders:mh,allowedDevices:hh,tokenHash:g(),tokenPrefix:g(),createdAt:a(),lastUsedAt:a().optional()}),Sh=i({id:g(),userId:g(),name:g(),tokenHash:g(),tokenPrefix:g(),scopes:p(q),expiresAt:a().nullish(),lastUsedAt:a().nullish(),createdAt:a()}),Ch=i({integrationId:g(),displayName:g(),requestedScopes:p(q),allowedRedirectPrefixes:p(g()).min(1),allowedPrivateHostPaths:p(g()).optional(),requiresPkce:v().optional(),hubUrl:g().optional(),refreshTokenTtlSec:c([a().int().positive(),y(`never`)]).optional()}),wh={name:`oauth-integration`,scope:`system`,mode:`collection`,internal:!0,methods:{getDescriptor:w(h(),Ch,{auth:`admin`})}},Th=i({handle:C,cropFrameSpace:i({x:a(),y:a(),w:a(),h:a()})});i({crop:i({left:a(),top:a(),width:a().positive(),height:a().positive()}).optional(),content:i({width:a().int().positive(),height:a().int().positive()}),fit:m([`stretch`,`contain`]),format:m([`rgb`,`gray`,`jpeg`])});var Eh=i({registryId:g().min(1),id:g().min(1),width:a().int().positive(),height:a().int().positive(),format:m([`rgb`,`gray`]),timestamp:a(),capturedAt:a().optional()}),Dh=m([`onnx`,`coreml`,`openvino`,`tflite`,`pt`,`gguf`]),Oh=m([`detector`,`cropper`,`classifier`,`refiner`,`audio-classifier`]),J=i({runtime:m([`node`,`python`]),backend:g(),format:Dh,device:g().optional()}),kh=i({engine:J,devices:p(i({id:g(),label:g(),description:g().optional()})).readonly(),defaultDevice:g()}),Ah=r(()=>i({addonId:g(),addonName:g(),slot:Oh,inputClasses:p(g()).readonly(),outputClasses:p(g()).readonly(),enabled:v(),modelId:g(),children:p(Ah).readonly(),group:g().optional(),settings:n(g(),u()).optional()})),jh=r(()=>i({addonId:g(),enabled:v(),modelId:g(),children:p(jh).readonly(),settings:n(g(),u()).optional()})),Mh=i({id:g(),name:g(),createdAt:g(),updatedAt:g(),engine:J,steps:p(jh).readonly()}),Nh=i({id:g(),name:g(),formats:n(g(),i({downloaded:v(),sizeMB:a()})),group:Xa.optional(),legacy:v().optional(),provider:Qa.optional()}),Ph=x(),Fh=i({id:g(),name:g(),slot:Oh,inputClasses:p(g()).readonly(),outputClasses:p(g()).readonly(),childSlots:p(Oh).readonly(),models:p(Nh).readonly(),defaultModelId:g(),defaultModelIdByFormat:n(g(),g()).optional(),enabledByDefault:v().optional(),backfillIntoExistingOverrides:v().optional(),defaultConfidence:a(),group:g().optional(),configSchema:p(Ph).readonly().optional()}),Ih=i({id:Oh,label:g(),priority:a(),parentSlot:Oh.nullable(),addons:p(Fh).readonly()}),Lh=i({availableEngines:p(kh).readonly(),selectedEngine:J,slots:p(Ih).readonly()}),Rh=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()}),Y=r(()=>i({addonId:g(),modelId:g().optional(),enabled:v().default(!0),children:p(Y).optional(),settings:n(g(),u()).optional(),jumpDeviceKey:g().optional()})),zh=i({addonId:g(),chosen:g(),running:g(),format:g()}),Bh=i({addonId:g(),kind:m([`unknown-addon`,`no-format-build`]),detail:g()}),Vh=i({ok:v(),issues:p(Bh).readonly(),substitutions:p(zh).readonly(),format:g()}),Hh=i({filename:g(),stepIds:p(g()).readonly().optional()}),Uh=i({base64:g(),filename:g()}),Wh=i({filename:g(),sizeKb:a()}),Gh=i({base64:g()}),Kh=i({id:g(),name:g(),description:g(),available:v(),rawLabels:p(g()).readonly().optional()}),qh=i({activeBackend:g(),availableBackends:p(Kh).readonly(),sampleRate:a(),chunkDurationMs:a()}),Jh=i({filePath:g(),sizeMB:a(),durationMs:a()}),Yh=i({success:v(),error:g().optional(),frame:x().optional()}),Xh=x(),Zh=x(),Qh=x(),$h=x(),eg=x(),tg=x(),ng={name:`pipeline-executor`,scope:`system`,mode:`singleton`,methods:{getAvailableEngines:w(h(),p(J)),getSelectedEngine:w(h(),J),getDefaultSteps:w(J,p(Ah)),getEngineProvisioning:w(i({nodeId:g()}),Rh),getVideoPipelineSteps:w(h(),n(g(),i({modelId:g(),settings:n(g(),u()).readonly()}))),setVideoPipelineSteps:w(i({steps:n(g(),i({modelId:g(),settings:n(g(),u()).readonly()}))}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),clearDeviceOverrides:w(i({nodeId:g()}),i({success:y(!0),clearedDevices:a()}),{kind:`mutation`,auth:`admin`}),getInferenceDeviceHealth:w(i({nodeId:g()}),i({unhealthy:p(i({deviceKey:g(),state:m([`failed`,`backoff`]),since:a(),deaths:a(),lastError:g()})).readonly()})),rearmInferenceDevice:w(i({nodeId:g(),deviceKey:g()}),i({rearmed:v()}),{kind:`mutation`,auth:`admin`}),getSchema:w(h(),Lh),getGlobalSteps:w(h(),p(Ah).readonly().nullable()),getGlobalPipelineConfig:w(h(),Xh),getOrchestratorConfigSchema:w(h(),Zh),validatePipeline:w(i({steps:p(Y)}),Vh),listTemplates:w(h(),p(Mh).readonly()),saveTemplate:w(i({name:g(),steps:p(jh).readonly(),engine:J}),Mh,{kind:`mutation`}),updateTemplate:w(i({id:g(),name:g().optional(),steps:p(jh).readonly().optional()}),Mh,{kind:`mutation`}),deleteTemplate:w(i({id:g()}),h(),{kind:`mutation`}),getCapabilities:w(h(),$h),getAddonModels:w(i({addonId:g()}),eg),downloadModel:w(i({addonId:g(),modelId:g(),format:Dh}),Jh,{kind:`mutation`}),deleteModel:w(i({addonId:g(),modelId:g(),format:Dh}),i({success:y(!0)}),{kind:`mutation`}),runPipeline:w(i({engine:J.optional(),steps:p(Y).min(1),frame:$s.optional(),frameRef:Eh.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:Th.optional()}),tg,{kind:`mutation`}),runPipelineBatch:w(i({engine:J.optional(),steps:p(Y).min(1),frames:p($s).min(1).max(255),deviceId:a().optional(),sessionId:g().optional(),frameId:a().int().nonnegative().optional(),deviceKey:g().optional()}),i({results:p(tg).readonly()}),{kind:`mutation`}),cacheFrameInPool:w(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:w(i({stepId:g(),frameId:a().int()}),n(g(),u()),{kind:`mutation`}),uncacheFrame:w(i({frameId:a().int()}),h(),{kind:`mutation`}),getEffectiveTuning:w(h(),i({batchMode:g(),windowMs:a(),maxBatchSize:a(),concurrency:a()})),listLoadedEngines:w(h(),p(i({engineKey:g(),engine:J,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:w(i({engine:J}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),killEngine:w(i({engine:J,force:v().optional()}),i({success:v(),reason:g().optional()}),{kind:`mutation`,auth:`admin`}),listReferenceImages:w(h(),p(Hh).readonly()),getReferenceImage:w(i({filename:g()}),Uh.nullable()),getReferenceAudioFiles:w(h(),p(Wh).readonly()),getReferenceAudio:w(i({filename:g()}),Gh.nullable()),getAudioCapabilities:w(h(),qh),runAudioTest:w(i({addonId:g(),modelId:g(),filename:g().optional(),settings:n(g(),u()).optional()}),Yh,{kind:`mutation`}),getDetectionConfigSchema:w(h(),Qh)}},rg=m([`include`,`exclude`]),X=i({id:g(),name:g().optional(),zoneIds:p(g()).min(1).readonly(),mode:rg,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)}),ig=p(X).readonly(),ag=m([`polygon`,`tripwire`]),og=i({x:a(),y:a()}),sg=i({id:g(),name:g(),kind:ag.default(`polygon`),polygon:p(og).readonly(),color:g().default(`#3b82f6`)}),cg={name:`zones`,scope:`device`,mode:`singleton`,deviceTypes:[E.Camera],methods:{listZones:w(i({deviceId:a()}),p(sg).readonly()),addZone:w(i({deviceId:a(),zone:sg}),h(),{kind:`mutation`,auth:`admin`}),removeZone:w(i({deviceId:a(),zoneId:g()}),h(),{kind:`mutation`,auth:`admin`}),updateZone:w(i({deviceId:a(),zone:sg}),h(),{kind:`mutation`,auth:`admin`})},runtimeState:i({zones:p(sg).readonly()}),durability:`restored`},lg=m([`new`,`entered`,`left`,`moving`,`idle`]),ug=m([`motion`,`object`,`audio`]),dg=b(`kind`,[em,tm]),fg=m([`motion`,`audio`,`person`,`vehicle`,`animal`,`door`,`pir`,`smoke`,`water`,`button`,`package`,`generic`]),pg=m([`motion`,`audio`,`detection`,`sensor`,`control`,`custom`,`package`]),mg=m([`macro`,`sub`]),hg=i({kind:g(),labelKey:g(),label:g(),color:g(),iconId:g(),icon:fg,category:pg,parentKind:g().nullable(),level:mg,source:i({capName:g(),deviceId:a()})}),gg=i({deviceId:a(),kinds:p(hg).readonly()}),_g=i({id:g(),deviceId:a(),sourceDeviceId:a(),kind:g(),value:n(g(),u()).nullable(),timestamp:a()}),vg=i({x:a(),y:a(),timestamp:a(),bbox:V}),yg=i({timestamp:a(),position:vg,mediaKey:g()}),bg=i({minX:a(),minY:a(),maxX:a(),maxY:a()}),xg=m([`full`,`slim`]),Sg=i({label:g(),peakScore:a(),count:a(),firstAt:a(),lastAt:a()}),Cg=m([`pipeline`,`sensor`,`audio`]),wg=m([`none`,`staging`,`trained`]),Tg={markForTrain:v().optional(),debug:v().optional(),favourited:v().optional()},Eg={retrainStatus:wg.optional()},Dg=i(Tg),Og=i({trackId:g(),markForTrain:v(),debug:v(),favourited:v(),retrainStatus:wg}),kg=c([y(1),y(2)]),Ag=i({stepId:g(),modelId:g().optional(),decidedAt:a(),identityId:g().optional()}),jg={label:g().optional(),labelScore:a().optional(),labelMeta:Ag.optional(),subLabel:g().optional(),subLabelScore:a().optional(),subLabelMeta:Ag.optional()},Mg=i({deviceId:a(),tracks:a().int(),files:a().int(),bytes:a().int()}),Ng=i({generatedAt:a(),trackCount:a().int(),fileCount:a().int(),byteCount:a().int(),truncated:v(),devices:p(Mg).readonly()}),Pg=i({trackId:g(),deviceId:a(),className:g(),...jg,producingDeviceName:g().optional(),source:Cg.optional(),firstSeen:a(),lastSeen:a(),positions:p(vg).readonly(),snapshots:p(yg).readonly(),zonesVisited:p(g()).readonly(),zoneNames:p(g()).readonly().optional(),classes:p(g()).readonly().optional(),totalDistance:a(),state:lg,active:v(),importance:a().optional(),bestEventId:g().optional(),importanceReason:g().optional(),audioLabels:p(Sg).readonly().optional(),envelope:bg.optional(),hasFace:v().optional(),hasEmbeddedFace:v().optional(),hasRider:v().optional(),previewMissReason:g().optional(),...Tg,...Eg}),Fg={id:g(),deviceId:a(),timestamp:a()},Ig=i({...Fg,kind:y(`motion`),regionCount:a(),regions:p(i({bbox:V,pixelCount:a(),intensity:a()})).readonly().optional(),frameWidth:a().optional(),frameHeight:a().optional(),mediaUrl:g().optional()}),Lg=m([`pipeline`,`onboard`]),Rg=m([`enter`,`exit`]),zg=i({direction:Rg,zoneId:g(),zoneName:g().optional()}),Bg=i({...Fg,kind:y(`object`),source:Lg.optional(),frameId:g().optional(),trackId:g().optional(),className:g(),...jg,confidence:a().optional(),bbox:V.optional(),zones:p(g()).readonly().optional(),state:lg.optional(),zoneCrossing:zg.optional(),frameWidth:a().optional(),frameHeight:a().optional(),mediaKey:g().optional(),keyFrameMediaKey:g().optional(),mediaUrl:g().optional(),importance:a().optional()}),Vg=i({...Fg,kind:y(`audio`),rms:a(),dbfs:a(),classification:i({className:g(),originalClass:g().optional(),score:a()}).optional(),mediaUrl:g().optional()}),Hg=m([`crop`,`thumbnail`,`snapshot`,`firstFrame`,`lastFrame`,`fullFrame`,`fullFrameBoxed`,`faceCrop`,`plateCrop`,`keyFrame`,`keyFrameSmall`,`thumbnailSmall`]),Ug=i({key:g(),kind:Hg,base64:g(),sizeBytes:a(),timestamp:a()}),Wg=Ug.omit({base64:!0}),Gg=m([`person`,`vehicle`,`animal`,`package`,`face`,`plate`]),Kg=m([`subject`,`model_error`]),qg=m([`operator`,`assist`]),Jg=i({x:a(),y:a(),w:a(),h:a()}),Yg=i({id:g(),trackId:g(),deviceId:a(),mediaKey:g(),bbox:Jg,macroClass:Gg,label:g().optional(),subLabel:g().optional(),kind:Kg,source:qg,assistModelId:g().optional(),assistScore:a().optional(),exportedInBatch:g().optional(),createdAt:a()}),Xg=Yg.omit({id:!0,trackId:!0,deviceId:!0,mediaKey:!0,createdAt:!0,exportedInBatch:!0}),Zg=i({trackId:g(),deviceId:a(),className:g(),label:g().optional(),firstSeen:a(),lastSeen:a(),frameCount:a().int(),annotationCount:a().int()}),Qg=i({mediaKey:g(),kind:Hg,timestamp:a(),sizeBytes:a().int(),copied:v()}),$g=i({frameId:g(),deviceId:a(),trackId:g(),sourceMediaKey:g(),sourceKind:Hg,sizeBytes:a().int(),width:a().int(),height:a().int(),copiedAt:a()}),e_=m([`source-missing`,`unreadable-image`,`write-failed`]),t_=i({copied:p($g).readonly(),refused:p(i({sourceMediaKey:g(),reason:e_})).readonly()}),n_=i({candidates:p(Qg).readonly(),copies:p($g).readonly(),autoPickMediaKey:g().optional()}),r_=b(`kind`,[i({kind:y(`package`),zone:Jg.optional()}),i({kind:y(`objects`),modelId:g(),minScore:a().optional()})]),i_=b(`kind`,[i({kind:y(`proposed`),modelId:g(),stepId:g(),minScore:a(),proposals:p(Xg).readonly(),belowThreshold:a().int()}),i({kind:y(`refused`),reason:g(),detail:g().optional()})]),a_=i({trackId:g(),retrainStatus:wg,changed:v(),reason:m([`unknown-track`,`no-frames-copied`,`not-staging`,`not-trained`,`unchanged`]).optional()}),o_=1e3,s_=5e3,c_=i({deviceId:a(),since:a().optional(),until:a().optional(),limit:a().int().min(1).max(s_).default(o_),projection:m([`full`,`slim`]).optional()}),l_=c_.extend({classFilter:g().optional()}),u_=i({deviceIds:p(a()),since:a().optional(),until:a().optional(),limit:a().int().min(1).max(1e3).default(200),cursor:g().optional(),projection:xg.optional(),includeStationary:v().optional()}),d_=i({tracks:p(Pg).readonly(),nextCursor:g().nullable()}),f_=40,p_=100,m_=i({id:g(),deviceId:a().int(),openedAt:a().int(),closedAt:a().int(),timestamp:a().int(),memberCount:a().int(),memberTrackIds:p(g()).readonly(),className:g(),classes:p(g()).readonly(),mediaUrl:g().nullable(),singleton:v()}),h_=i({trackId:g(),deviceId:a().int(),className:g(),firstSeen:a().int(),lastSeen:a().int(),mediaUrl:g().nullable()}),g_=m_.extend({members:p(h_).readonly()}),__=i({deviceIds:p(a()),since:a().optional(),until:a().optional(),limit:a().int().min(1).max(p_).default(f_),cursor:g().optional()}),v_=i({groups:p(m_).readonly(),nextCursor:g().nullable()}),y_=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()}),b_=i({id:g(),trackId:g(),timestamp:a(),className:g(),...jg,importance:a(),bestEventId:g(),windowMs:a().optional(),...Tg,...Eg}),x_=i({trackId:g(),className:g(),confidence:a(),bbox:V,zones:p(g()).readonly(),state:lg}),S_=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()}),C_=Bg.extend({score:a()}),w_=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)}),T_=i({tracks:a().int(),events:a().int(),media:a().int(),faces:a().int(),plates:a().int(),embeddings:a().int(),groups:a().int()}),E_=i({mediaDropped:a().int(),tracks:a().int(),events:a().int()}),D_=i({deviceId:a(),rows:a().int(),bytes:a().int()}),O_=i({totalRows:a().int(),totalBytes:a().int(),devices:p(D_).readonly()}),k_=i({motion:a().int(),object:a().int(),audio:a().int()}),A_=i({deviceId:a().optional(),since:a().optional(),until:a().optional(),maxTracks:a().int().positive().optional(),executeOnNodeId:g().optional(),pacingMs:a().int().nonnegative().optional()}),j_=i({deleted:a()}),M_=i({started:v(),alreadyRunning:v()}),N_=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()}),P_=i({timestamp:a(),frame:tg}),F_=i({tracks:p(i({className:g(),firstSeenMs:a(),lastSeenMs:a(),bbox:V,framesMatched:a().int()})).readonly()}),I_={name:`pipeline-analytics`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[E.Camera],exposesDeviceSettings:!0,methods:{getActiveTracks:w(i({deviceId:a()}),p(Pg).readonly()),getTrack:w(i({deviceId:a(),trackId:g()}),Pg.nullable()),listTracks:w(i({deviceId:a(),since:a().optional(),until:a().optional(),limit:a().optional(),zone:dg.optional(),projection:xg.optional(),includeStationary:v().optional()}),p(Pg).readonly()),listRecentTracks:w(u_,d_),listGroups:w(__,v_),getGroup:w(i({deviceId:a(),groupId:g().min(1)}),g_.nullable()),clearTracks:w(i({deviceId:a()}),h(),{kind:`mutation`,auth:`admin`}),getMotionEvents:w(c_,p(Ig).readonly()),getObjectEvents:w(l_,p(Bg).readonly()),getAudioEvents:w(c_,p(Vg).readonly()),listEventKinds:w(i({deviceId:a()}),p(hg).readonly()),listEventKindsBatch:w(i({deviceIds:p(a()).min(1).max(200)}),p(gg).readonly()),getSensorEvents:w(i({deviceId:a(),since:a().optional(),until:a().optional(),kinds:p(g()).optional(),limit:a().int().min(1).max(s_).default(o_)}),p(_g).readonly()),getKeyEvents:w(y_,p(b_).readonly()),getEventDensity:w(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:w(i({deviceId:a(),cutoffMs:a()}),i({motion:a().int(),object:a().int(),audio:a().int()}),{kind:`mutation`,auth:`admin`}),pruneTracksBefore:w(i({deviceId:a(),cutoffMs:a()}),T_,{kind:`mutation`,auth:`admin`}),wipeAllAnalytics:w(i({deviceId:a()}),T_,{kind:`mutation`,auth:`admin`}),reconcileFromDisk:w(i({deviceId:a()}),E_,{kind:`mutation`,auth:`admin`}),deleteTracks:w(i({deviceId:a(),trackIds:p(g()).min(1)}),i({deleted:a().int(),failed:p(g()).readonly()}),{kind:`mutation`,auth:`admin`}),setTrackFlags:w(i({deviceId:a(),trackId:g(),flags:Dg}),Og,{kind:`mutation`}),getEventStoreFootprint:w(i({}),O_,{kind:`query`,auth:`admin`}),pruneEvents:w(i({olderThanMs:a(),reason:_i.optional()}),k_,{kind:`mutation`,auth:`admin`}),deleteDeviceEvents:w(i({deviceId:a()}),k_,{kind:`mutation`,auth:`admin`}),pauseForStorageMigration:w(A,i({paused:y(!0)}),{kind:`mutation`,auth:`admin`}),resumeForStorageMigration:w(A,i({resumed:y(!0)}),{kind:`mutation`,auth:`admin`}),refreshStorageLocationsForMigration:w(A,i({refreshed:y(!0)}),{kind:`mutation`,auth:`admin`}),startStorageMigrationMove:w(Zi,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),getStorageMigrationMoveStatus:w(i({jobId:g()}),Ki.nullable(),{auth:`admin`}),cancelStorageMigrationMove:w(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),relocateMedia:w(Xi,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),listRelocateMediaJobs:w(i({}),p(Ki).readonly(),{kind:`query`,auth:`admin`}),cancelRelocateMedia:w(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),listOpsLog:w(yi,p(vi).readonly(),{kind:`query`,auth:`admin`}),getTrainingExportSummary:w(i({deviceIds:p(a()).optional()}),Ng,{kind:`query`,auth:`admin`}),getTrainingExportUrl:w(i({deviceIds:p(a()).optional()}),i({url:g()}),{kind:`query`,auth:`admin`}),listRetrainStaging:w(i({deviceIds:p(a()).optional(),limit:a().int().min(1).max(500).optional()}),p(Zg).readonly(),{kind:`query`,auth:`admin`}),listRetrainFrames:w(i({trackId:g()}),n_,{kind:`query`,auth:`admin`}),selectRetrainFrames:w(i({deviceId:a(),trackId:g(),mediaKeys:p(g()).min(1)}),t_,{kind:`mutation`,auth:`admin`}),deselectRetrainFrame:w(i({deviceId:a(),trackId:g(),frameId:g()}),i({removed:v(),removedAnnotations:a().int()}),{kind:`mutation`,auth:`admin`}),getRetrainFrameImage:w(i({frameId:g()}),i({base64:g(),width:a().int(),height:a().int()}),{kind:`query`,auth:`admin`}),proposeRetrainAnnotations:w(i({deviceId:a(),trackId:g(),frameId:g(),subject:r_,nodeId:g().optional()}),i_,{kind:`mutation`,auth:`admin`}),runReplayFrameProcessor:w(i({deviceId:a(),source:Lg,zones:p(sg).readonly().optional(),detectionRules:p(X).readonly().optional(),zoneMembershipMinOverlap:a().min(0).max(1).optional(),frames:p(P_).min(1)}),F_,{kind:`mutation`,auth:`admin`}),listRetrainAnnotations:w(i({trackId:g()}),p(Yg).readonly(),{kind:`query`,auth:`admin`}),saveRetrainAnnotations:w(i({deviceId:a(),trackId:g(),frameId:g(),annotations:p(Xg)}),p(Yg).readonly(),{kind:`mutation`,auth:`admin`}),completeRetrainTrack:w(i({deviceId:a(),trackId:g()}),a_,{kind:`mutation`,auth:`admin`}),restageRetrainTrack:w(i({deviceId:a(),trackId:g()}),a_,{kind:`mutation`,auth:`admin`}),getRetrainExportUrl:w(i({deviceIds:p(a()).optional()}),i({url:g()}),{kind:`query`,auth:`admin`}),getEventMedia:w(i({eventId:g(),kind:Hg.optional(),deviceId:a()}),p(Ug).readonly()),getTrackMedia:w(i({trackId:g(),kinds:p(Hg).optional(),deviceId:a()}),p(Ug).readonly()),listTrackMedia:w(i({trackId:g(),deviceId:a()}),p(Wg).readonly()),searchObjectEvents:w(w_,p(C_).readonly()),wipeObjectEmbeddings:w(i({}),j_,{kind:`mutation`,auth:`admin`}),rebuildObjectEmbeddings:w(A_,M_,{kind:`mutation`,auth:`admin`}),getObjectEmbeddingRebuildStatus:w(i({}),N_)},events:{onFrameTracked:{data:i({deviceId:a(),timestamp:a(),frameWidth:a(),frameHeight:a(),detections:p(S_).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:ug,eventId:g(),timestamp:a()})}}},L_=i({activeCameras:a(),throttledCameras:a(),avgInferenceTimeMs:a(),queueDepth:a()}),R_=i({detectionMode:m([`disabled`,`always-on`,`on-motion`]),configuredFps:a(),actualFps:a(),queueDepth:a(),avgInferenceTimeMs:a(),droppedFrames:a(),phase:m([`idle`,`watching`,`active`])}),z_=R_.extend({deviceId:a()}),B_=i({x:a(),y:a(),w:a(),h:a()}),V_=i({bytes:_(Uint8Array).optional(),jpeg:g().optional(),width:a().int().positive(),height:a().int().positive(),tier:m([`native`,`ram-fullframe`]).optional()}),H_=i({bbox:B_,className:g()}),U_=i({stepId:g(),className:g(),score:a(),bbox:B_.optional(),embedding:g().optional(),embeddingMagnitude:a().optional(),embeddingModelId:g().optional(),label:g().optional(),labelTier:c([y(1),y(2)]).optional(),labelModelId:g().optional(),alignedCropJpeg:g().optional(),nativeFaceShortSidePx:a().optional()}),W_=m([`unknown-step`,`model-not-servable`,`unreadable-frame`,`execution-failed`]),G_=b(`kind`,[i({kind:y(`ran`),nodeId:g(),modelId:g(),details:p(U_)}),i({kind:y(`refused`),nodeId:g(),reason:W_,detail:g()})]),K_={min:0,max:6e4,default:3e4,step:500},q_={min:0,max:6e5,default:12e4,step:5e3},J_={min:5e3,max:6e5,default:9e4,step:5e3},Y_={min:1,max:30,default:4,step:1},X_={min:1,max:30,default:10,step:1},Z_={min:0,max:300,default:300,step:5},Q_={min:1,max:10,default:4,step:1},$_=m([`onboard`,`analyzer`]),ev=p($_),tv=i({deviceId:a(),detected:v(),source:$_.default(`analyzer`),regions:p(Wf).readonly().optional()}),nv=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)`),rv=i({deviceKey:g(),weight:a().positive().default(1),maxSessions:a().int().positive().nullable().default(null)}),iv=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(K_.min).default(K_.default),maxSessionHoldMs:a().min(q_.min).max(q_.max).optional(),audioMotionWindowMs:a().min(J_.min).max(J_.max).optional(),motionFps:a().min(Y_.min).max(Y_.max).default(Y_.default),detectionFps:a().min(X_.min).max(X_.max).default(X_.default),motionStreamId:g(),detectionStreamId:g(),motionSources:ev.default([`analyzer`]),pipelineEnabled:v().default(!0),steps:p(Y).readonly().optional(),audio:i({modelId:g().optional(),enabled:v()}).nullable().optional(),zones:p(sg).readonly().default([]),onboardMotionDrivesAnalyzer:v().default(!0),occupancyRecheckEnabled:v().default(!0),occupancyRecheckSec:a().min(Z_.min).max(Z_.max).default(Z_.default),occupancyRecheckFrames:a().min(Q_.min).max(Q_.max).default(Q_.default),frameSource:nv.default({kind:`local-broker`}),deviceKey:g().optional(),inferenceDevices:p(rv).readonly().optional()}),av=[{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:Y_.min,max:Y_.max,step:Y_.step,default:Y_.default,showValue:!0,unit:`fps`,nullable:!0,nullLabel:`Default`,showWhen:{field:`motionSources`,includes:`analyzer`}},{key:`detectionFps`,type:`slider`,label:`Detection FPS`,min:X_.min,max:X_.max,step:X_.step,default:X_.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:K_.min,max:K_.max,step:K_.step,default:K_.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:q_.min,max:q_.max,step:q_.step,default:q_.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:J_.min,max:J_.max,step:J_.step,default:J_.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:Z_.min,max:Z_.max,step:Z_.step,default:Z_.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:Q_.min,max:Q_.max,step:Q_.step,default:Q_.default,showValue:!0,showWhen:{field:`occupancyRecheckEnabled`,equals:!0}}],ov=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()})}),sv=i({framesDecoded:a(),framesAdmitted:a(),framesDroppedPixelFree:a(),viewsMaterialized:a(),viewsSkipped:a(),workerToRunnerBytes:a(),runnerToPoolRawBytes:a(),runnerToPoolJpegBytes:a(),onDemandFullFrameRequests:a(),onDemandCropRequests:a(),nativeHits:a(),nativeMisses:a(),tileHits:a(),tileMisses:a(),fallbackHits:a(),fallbackMisses:a(),retainedWritesAvoided:a(),residentRefs:a(),residentBytes:a(),releases:a(),evictions:a(),staleMisses:a()}),cv=i({node:sv,cameras:p(sv.extend({deviceId:a()}))}),lv=i({nodeId:g(),activeCameras:a(),throttledCameras:a(),avgInferenceTimeMs:a(),queueDepth:a(),frameLazy:cv.optional()}),uv={name:`pipeline-runner`,scope:`system`,mode:`singleton`,methods:{attachCamera:w(iv,i({success:y(!0)}),{kind:`mutation`}),detachCamera:w(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`}),reportMotion:w(tv,i({success:y(!0)}),{kind:`mutation`}),getLocalLoad:w(h(),ov),getLocalMetrics:w(h(),lv),getCameraMetrics:w(i({deviceId:a()}),R_.nullable()),getAllCameraMetrics:w(h(),p(z_).readonly()),getLocalCameras:w(h(),p(a()).readonly()),getNativeCrop:w(i({handle:C,bbox:B_,maxWidth:a().int().positive().optional(),encodeJpeg:v().optional()}),V_.nullable()),runDetailSubtree:w(i({deviceId:a(),frameHandle:C.optional(),frameJpeg:g().optional(),cropJpeg:g().optional(),parent:H_,steps:p(g()).optional()}),i({details:p(U_)}).nullable(),{kind:`mutation`}),runStatelessStep:w(i({stepId:g(),modelId:g(),frameJpeg:g(),bbox:B_,className:g(),sourceDeviceId:a()}),G_,{kind:`mutation`})}},dv=i({engine:J.optional(),steps:p(Y).readonly(),audio:i({engine:J.optional(),modelId:g().optional(),enabled:v(),settings:n(g(),u()).readonly().optional()}).nullable().optional()}),fv=i({id:g(),name:g(),description:g().optional(),config:dv,createdAt:g(),updatedAt:g()}),pv=i({modelId:g().optional(),settings:n(g(),u()).optional(),jumpDeviceKey:g().optional()}),mv=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(),pv).optional()})).optional()}),hv=i({steps:p(Y).readonly(),audio:i({modelId:g(),enabled:v()}).nullable()}),gv=i({modelId:g().optional(),settings:n(g(),u()).readonly().optional()}),_v=i({pinnedAgentNodeId:g().optional(),stepToggles:n(g(),v()).optional(),stepOverridesByDevice:n(g(),n(g(),n(g(),gv))).optional(),pipelineByAgent:n(g(),hv).optional()}),vv=i({deviceId:a(),agentNodeId:g(),pinned:v(),reason:m([`manual`,`capacity`,`hardware-affinity`,`failover`,`rebalance`]),assignedAt:a()}),yv=i({nodeId:g(),online:v(),load:ov,score:a(),decodeHwaccel:g().nullable()}),bv=i({totalAgents:a(),onlineAgents:a(),totalCameras:a(),attachedCameras:a(),activeCameras:a(),avgInferenceTimeMs:a(),queueDepth:a()}),xv=n(g(),g()),Sv=i({ownerNodeId:g(),reachableHost:g().optional(),configIssue:g().optional()}),Cv=i({camStreamId:g(),codec:g(),width:a(),height:a(),fps:a(),kind:g()}),wv=i({streams:p(Cv).readonly()}),Tv=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()})}),Ev=i({profile:g(),status:g(),codec:g(),width:a(),height:a(),subscribers:a(),inFps:a(),outFps:a()}),Dv=i({profiles:p(Ev).readonly(),webrtcSessions:a(),rtspRestream:v()}),Ov=i({framesWritten:a(),getFrameHits:a(),getFrameMisses:a(),budgetMb:a()}),kv=i({nodeId:g(),formats:p(g()).readonly(),sessionCount:a(),shm:Ov}),Av=i({enabled:v(),fps:a()}),jv=m([`idle`,`installing`,`verifying`,`ready`,`failed`]),Mv=i({state:jv,error:g().optional()}),Nv=m([`idle`,`watching`,`active`]),Pv=i({nodeId:g(),engine:i({backend:g(),device:g()}),phase:Nv,configuredFps:a(),actualFps:a(),queueDepth:a(),avgInferenceMs:a(),provisioning:Mv}),Fv=i({nodeId:g(),enabled:v()}),Iv=m([`off`,`continuous`,`events`]),Lv=i({mode:Iv,active:v(),storageBytes:a()}),Rv=m([`source`,`broker`,`detection`,`recording`,`switches`]),zv=m([`timeout`,`error`,`partial`]),Bv=i({stage:Rv,reason:zv,elapsedMs:a()}),Vv=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()}),Hv=i({deviceId:a(),assignment:Tv,source:wv,broker:Dv.nullable(),decoder:kv.nullable(),motion:Av.nullable(),detection:Pv.nullable(),audio:Fv.nullable(),recording:Lv.nullable(),switchedOff:p(jr).readonly(),degraded:p(Bv).readonly(),fetchedAt:a()}),Uv=[`disabled`,`unavailable`,`cannot-host-camera-root`,`accelerator-preferred`],Wv=m(Uv),Gv=i({key:g(),backend:g(),device:g(),format:m(qa),available:v(),enabled:v(),weight:a(),maxSessions:a().nullable(),defaultModelId:g(),steps:n(g(),pv).optional(),exclusion:Wv.nullable()}),Kv=i({nodeId:g(),reachable:v(),devices:p(Gv).readonly()}),qv={name:`pipeline-orchestrator`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,exposesDeviceSettings:!0,methods:{pauseForStorageMigration:w(A,i({paused:y(!0)}),{kind:`mutation`,auth:`admin`}),resumeForStorageMigration:w(A,i({resumed:y(!0)}),{kind:`mutation`,auth:`admin`}),assignPipeline:w(i({deviceId:a(),agentNodeId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),unassignPipeline:w(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setPipelineDevicePin:w(i({deviceId:a(),deviceKey:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getPipelineDevicePin:w(i({deviceId:a()}),i({deviceKey:g().nullable()})),rebalance:w(h(),i({migrated:a()}),{kind:`mutation`,auth:`admin`}),getPipelineAssignments:w(h(),p(vv).readonly()),getPipelineAssignment:w(i({deviceId:a()}),vv.nullable()),getAgentLoad:w(h(),p(yv).readonly()),getGlobalMetrics:w(h(),bv),getCameraMetrics:w(i({deviceId:a()}),R_.nullable()),getCapabilityBindings:w(i({nodeId:g()}),xv),setCapabilityBinding:w(i({nodeId:g(),capName:g(),addonId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getIngestOwner:w(h(),Sv),assignAudio:w(i({deviceId:a(),nodeId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),unassignAudio:w(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getAudioAssignment:w(i({deviceId:a()}),i({nodeId:g(),pinned:v(),assignedAt:a()}).nullable()),getAudioNodeLoad:w(h(),p(i({nodeId:g(),deviceCount:a()}))),getAudioAssignments:w(h(),p(i({deviceId:a(),nodeId:g(),pinned:v(),assignedAt:a()}))),getAgentSettings:w(i({agentNodeId:g()}),mv.nullable()),listAgentSettings:w(h(),p(i({nodeId:g(),settings:mv})).readonly()),removeAgentSettings:w(i({agentNodeId:g()}),i({success:v(),removed:v()}),{kind:`mutation`,auth:`admin`}),setAgentMaxCameras:w(i({agentNodeId:g(),maxCameras:a().int().nonnegative().nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setAgentDetectWeight:w(i({agentNodeId:g(),detectWeight:a().positive().nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setAgentCapabilities:w(i({agentNodeId:g(),detect:v().nullable().optional(),audio:v().nullable().optional(),ingest:v().nullable().optional()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setAgentReachableHost:w(i({agentNodeId:g(),reachableHost:g().nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setAgentInferenceDevices:w(i({agentNodeId:g(),inferenceDevices:n(g(),i({enabled:v(),weight:a().positive().optional(),maxSessions:a().int().positive().optional(),steps:n(g(),pv).optional()}))}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getNodeInferenceDevices:w(i({nodeId:g()}),Kv),resetNodePipelineDefaults:w(i({agentNodeId:g()}),i({success:y(!0),effectiveModelId:g().nullable(),clearedCameraOverrides:a()}),{kind:`mutation`,auth:`admin`}),getCameraSettings:w(i({deviceId:a()}),_v.nullable()),setCameraStepToggle:w(i({deviceId:a(),addonId:g(),enabled:v().nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getCameraStepOverrides:w(i({deviceId:a()}),n(g(),n(g(),n(g(),gv))).nullable()),setCameraStepOverride:w(i({deviceId:a(),agentNodeId:g(),deviceKey:g(),addonId:g(),patch:gv.nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setCameraPipelineForAgent:w(i({deviceId:a(),agentNodeId:g(),pipeline:hv.nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),resolvePipeline:w(i({deviceId:a(),agentNodeId:g().optional()}),dv),getCameraSwitches:w(i({deviceId:a()}),Ir),setCameraSwitch:w(i({deviceId:a(),switchId:jr,enabled:v()}),Ir,{kind:`mutation`,auth:`admin`}),getCameraStatus:w(i({deviceId:a()}),Hv),getCameraStatuses:w(i({deviceIds:p(a()).optional()}),p(Hv).readonly()),reconcileFromDisk:w(h(),Vv,{kind:`mutation`,auth:`admin`}),getReconcileFromDiskStatus:w(h(),Vv,{auth:`admin`}),listTemplates:w(h(),p(fv).readonly()),saveTemplate:w(i({name:g(),description:g().optional(),config:dv}),fv,{kind:`mutation`,auth:`admin`}),updateTemplate:w(i({id:g(),name:g().optional(),description:g().optional(),config:dv.optional()}),fv,{kind:`mutation`,auth:`admin`}),deleteTemplate:w(i({id:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`})}},Jv={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 Yv(e){return Jv[e]??`generic`}var Xv={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 Zv(e,t){let n=Bp[t];if(n===void 0)throw Error(`EVENT_KIND_BY_CAP: cap '${e}' maps to unknown taxonomy kind '${t}'`);return{...n,icon:Yv(n.iconId)}}var Qv=Object.freeze(Object.fromEntries(Object.entries(Xv).map(([e,t])=>[e,Zv(e,t)]))),$v=Object.keys(Xv);function ey(e,t){let n=Bp[e];return n===void 0?null:{kind:n.kind,labelKey:n.labelKey,label:n.label,color:n.color,iconId:n.iconId,icon:Yv(n.iconId),category:n.category,parentKind:n.parentKind,level:n.level,source:{capName:t.capName,deviceId:t.deviceId}}}var ty=m([`workspace`,`baked`,`data-root`]),ny=m([`idle`,`checking`,`staging`,`pending-restart`,`awaiting-confirmation`]),ry=m([`in-sync`,`behind-patch`,`behind-series`,`ahead`,`unknown`]),iy=i({state:ry,seedVersion:g().nullable(),contractVersion:g().nullable(),contractSource:m([`registry`,`running`]).nullable(),message:g()}),ay=i({fromVersion:g(),toVersion:g().nullable(),atMs:a(),reason:g()}),oy=i({packageName:g(),runningVersion:g().nullable(),nodeRuntimeVersion:g().nullable(),activeVersion:g().nullable(),previousVersion:g().nullable(),seedVersion:g().nullable(),latestVersion:g().nullable(),updateAvailable:v(),bootMode:ty,updateState:ny,pendingVersion:g().nullable(),rolledBack:ay.nullable(),stateFileCorrupt:v(),lastCheckedAtMs:a().nullable(),imageContract:iy.optional()}),sy=i({packageName:g(),runningVersion:g().nullable(),latestVersion:g().nullable(),updateAvailable:v(),checkedAtMs:a(),error:g().nullable()}),cy=i({accepted:v(),targetVersion:g().nullable(),restarting:v(),message:g()}),ly={name:`server-management`,scope:`system`,mode:`singleton`,methods:{getServerPackageStatus:w(h(),oy,{auth:`admin`}),checkServerUpdate:w(h(),sy,{kind:`mutation`,auth:`admin`}),applyServerUpdate:w(i({version:g().optional()}),cy,{kind:`mutation`,auth:`admin`,timeoutMs:16*6e4}),rollbackServerUpdate:w(h(),cy,{kind:`mutation`,auth:`admin`}),restartServer:w(h(),cy,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},uy=d(),dy=i({to:c([uy,p(uy).min(1)]),cc:p(uy).optional(),bcc:p(uy).optional(),from:g().optional(),replyTo:g().optional(),subject:g(),text:g(),html:g().optional()}),fy=i({messageId:g(),accepted:p(uy).default([]),rejected:p(uy).default([])}),py=i({ready:v(),host:g(),error:g().optional(),lastVerifiedAt:a().optional()}),my={name:`smtp-provider`,scope:`system`,mode:`collection`,internal:!0,providerKind:`email`,methods:{sendEmail:w(dy,fy,{kind:`mutation`,auth:`admin`,access:`create`}),verify:w(h(),py,{kind:`mutation`,auth:`admin`,access:`view`}),getStatus:w(h(),py,{auth:`admin`})}},hy=i({base64:g(),contentType:g()}),gy=i({lastCapturedAt:a().nullable(),cacheAgeMs:a().nullable(),lastBytes:a().nullable(),lastStreamId:g().nullable()}),_y={name:`snapshot`,scope:`device`,deviceNative:!0,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[E.Camera],exposesDeviceSettings:!0,methods:{getSnapshot:w(i({deviceId:a(),streamId:g().optional(),force:v().optional()}),hy.nullable()),invalidateCache:w(i({deviceId:a()}),h(),{kind:`mutation`,auth:`admin`}),getSnapshotOverview:kt(i({deviceIds:p(a()).min(1).max(200)}),p(i({deviceId:a(),lastCapturedAt:a().nullable(),cacheAgeMs:a().nullable(),etag:g().nullable()}))),getDebugState:kt(i({deviceId:a()}),i({battery:i({sleeping:v(),lastUpdated:a(),lastContactAt:a().optional()}).nullable(),state:i({isBattery:v(),reason:m([`disabled`,`offline`,`sleeping`,`unreachable`,`waking`]).nullable()}),frame:i({capturedAt:a().nullable(),ageMs:a().nullable()}),waking:v()})),getSnapshotLinks:kt(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`,`offline`,`sleeping`,`unreachable`,`waking`]).nullable(),battery:v()})))},status:{schema:gy,kind:`poll`}},vy=i({userId:g(),username:g(),isAdmin:v(),provider:g(),email:g().optional(),displayName:g().optional(),hubUrl:g().optional(),scopes:p(q).optional(),redirectUri:g().optional(),integrationId:g().optional(),jti:g().optional(),codeChallenge:g().optional(),sessionId:g().optional(),refreshTtl:c([a().int().positive(),y(`never`)]).optional()}),yy={name:`sso-bridge`,scope:`system`,mode:`singleton`,internal:!0,methods:{signBridgeToken:w(i({claims:vy,ttlSec:c([a().int().positive(),y(`never`)]).optional()}),i({token:g()}),{auth:`admin`}),verifyBridgeToken:w(i({token:g()}),vy.nullable(),{auth:`admin`})}},by=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)})]),xy={name:`storage`,scope:`system`,mode:`singleton`,methods:{resolve:w(i({location:M,relativePath:g()}),g()),write:w(i({location:M,relativePath:g(),data:_(Uint8Array)}),h(),{kind:`mutation`}),read:w(i({location:M,relativePath:g()}),_(Uint8Array)),exists:w(i({location:M,relativePath:g()}),v()),list:w(i({location:M,prefix:g().optional()}),p(g()).readonly()),delete:w(i({location:M,relativePath:g()}),h(),{kind:`mutation`}),getAvailableSpace:w(i({location:M}),a().nullable()),beginUpload:w(i({location:M,relativePath:g(),sizeBytes:a().optional()}),i({uploadId:g()}),{kind:`mutation`}),writeChunk:w(i({uploadId:g(),offset:a(),data:_(Uint8Array)}),h(),{kind:`mutation`}),finalizeUpload:w(i({uploadId:g()}),h(),{kind:`mutation`}),abortUpload:w(i({uploadId:g()}),h(),{kind:`mutation`}),beginDownload:w(i({location:M,relativePath:g()}),i({downloadId:g(),sizeBytes:a()}),{kind:`mutation`}),readChunk:w(i({downloadId:g(),offset:a(),length:a()}),_(Uint8Array)),endDownload:w(i({downloadId:g()}),h(),{kind:`mutation`}),listLocations:w(i({type:ca.optional()}),p(j).readonly()),getDefaultLocation:w(i({type:ca}),j.nullable()),listLocationDeclarations:w(h(),p(la).readonly()),upsertLocation:w(j.omit({createdAt:!0,updatedAt:!0}),j,{kind:`mutation`,auth:`admin`}),deleteLocation:w(i({id:g()}),h(),{kind:`mutation`,auth:`admin`}),testLocation:w(i({id:g()}),i({ok:v(),error:g().optional()}),{auth:`admin`}),listProviders:w(h(),p(by).readonly()),testConfig:w(i({providerId:g(),config:n(g(),u())}),i({ok:v(),error:g().optional()}),{auth:`admin`})}},Sy=i({bytes:a().int().nonnegative()}),Cy=i({reclaimedBytes:a().int().nonnegative(),exhausted:v()}),wy={name:`storage-evictable`,scope:`system`,mode:`collection`,internal:!0,methods:{getEvictableUsage:w(i({locationId:g()}),Sy,{auth:`admin`}),evict:w(i({locationId:g(),targetBytes:a().int().positive()}),Cy,{kind:`mutation`,auth:`admin`})}},Ty={name:`storage-migration`,scope:`system`,mode:`singleton`,methods:{plan:w(ea,aa,{auth:`admin`}),start:w(ea,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),status:w(i({jobId:g().optional()}),ia.nullable(),{auth:`admin`}),cancel:w(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`})}},Ey=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)})]),Dy=i({ok:v(),error:g().optional()}),Oy=i({location:j,relativePath:g(),sizeBytes:a().optional()}),ky=i({uploadId:g()}),Ay=i({uploadId:g(),offset:a(),data:_(Uint8Array)}),jy=i({uploadId:g()}),My=i({uploadId:g()}),Ny=i({location:j,relativePath:g()}),Py=i({downloadId:g(),sizeBytes:a()}),Fy=i({downloadId:g(),offset:a(),length:a()}),Iy=i({downloadId:g()}),Ly={name:`storage-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{getProviderInfo:w(h(),Ey,{auth:`admin`}),testLocation:w(i({config:n(g(),u())}),Dy,{auth:`admin`}),resolve:w(i({location:j,relativePath:g()}),g(),{auth:`admin`}),write:w(i({location:j,relativePath:g(),data:_(Uint8Array)}),h(),{kind:`mutation`,auth:`admin`}),read:w(i({location:j,relativePath:g()}),_(Uint8Array),{auth:`admin`}),exists:w(i({location:j,relativePath:g()}),v(),{auth:`admin`}),list:w(i({location:j,prefix:g().optional()}),p(g()).readonly(),{auth:`admin`}),delete:w(i({location:j,relativePath:g()}),h(),{kind:`mutation`,auth:`admin`}),getAvailableSpace:w(i({location:j}),a().nullable(),{auth:`admin`}),beginUpload:w(Oy,ky,{kind:`mutation`,auth:`admin`}),writeChunk:w(Ay,h(),{kind:`mutation`,auth:`admin`}),finalizeUpload:w(jy,h(),{kind:`mutation`,auth:`admin`}),abortUpload:w(My,h(),{kind:`mutation`,auth:`admin`}),beginDownload:w(Ny,Py,{kind:`mutation`,auth:`admin`}),readChunk:w(Fy,_(Uint8Array),{auth:`admin`}),endDownload:w(Iy,h(),{kind:`mutation`,auth:`admin`})}},Ry=u().nullable(),zy=n(g(),u()),By=i({sessionId:g(),profileId:g(),label:g(),cols:a().int().positive(),rows:a().int().positive(),startedAt:a()}),Vy=i({profileId:g(),label:g(),description:g().optional(),executable:g().optional(),args:p(g()).readonly().optional(),cwd:g().optional(),environment:p(g()).readonly().optional(),settingsSchema:Ry.optional()}),Hy=i({instanceId:g(),cameraStableId:g(),nodeId:g(),profileId:g(),profileLabel:g(),name:g(),enabled:v(),executable:g(),args:p(g()).readonly(),cwd:g(),environment:p(g()).readonly(),profileSettings:zy}),Uy=i({stableId:g(),nodeId:g(),profileId:g(),profileLabel:g(),name:g(),adoptable:v()}),Wy=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()})]),Gy=i({cursor:a().int().nonnegative(),reset:v(),snapshot:g().optional(),events:p(Wy).readonly()}),Ky={name:`terminal-session`,scope:`system`,mode:`singleton`,methods:{listProfiles:w(h(),p(Vy).readonly(),{auth:`admin`}),listInstances:w(h(),p(Hy).readonly(),{auth:`admin`}),createInstance:w(i({targetNodeId:g().min(1),profileId:g().min(1),name:g().trim().min(1).max(160).optional(),executable:g().max(1024).optional(),args:p(g().max(2048)).max(64).optional(),cwd:g().max(1024).optional(),environment:p(g().max(4096)).max(64).optional(),profileSettings:zy.optional()}),Hy,{kind:`mutation`,auth:`admin`}),updateInstance:w(i({instanceId:g().min(1),name:g().trim().min(1).max(160).optional(),executable:g().max(1024).optional(),args:p(g().max(2048)).max(64).optional(),cwd:g().max(1024).optional(),environment:p(g().max(4096)).max(64).optional(),profileSettings:zy.optional()}),Hy,{kind:`mutation`,auth:`admin`}),deleteInstance:w(i({instanceId:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),setInstanceEnabled:w(i({instanceId:g().min(1),enabled:v()}),Hy,{kind:`mutation`,auth:`admin`}),listLegacyCameras:w(h(),p(Uy).readonly(),{auth:`admin`}),adoptLegacyMonitor:w(i({stableId:g().min(1),name:g().trim().min(1).max(160).optional()}),Hy,{kind:`mutation`,auth:`admin`}),listSessions:w(h(),p(By).readonly(),{auth:`admin`}),openSession:w(i({profileId:g(),cols:a().int().positive(),rows:a().int().positive(),executable:g().max(1024).optional(),args:p(g().max(2048)).max(64).optional(),cwd:g().max(1024).optional(),environment:p(g().max(4096)).max(64).optional()}),By,{kind:`mutation`,auth:`admin`}),resize:w(i({sessionId:g(),cols:a().int().positive(),rows:a().int().positive()}),h(),{kind:`mutation`,auth:`admin`}),pullOutput:w(i({sessionId:g(),afterSeq:a().int().nonnegative(),waitMs:a().int().min(0).max(2e3).default(0),waitForOutput:v().optional()}),Gy,{kind:`mutation`,auth:`admin`,timeoutMs:15e3}),writeInput:w(i({sessionId:g(),data:g().max(64*1024)}),h(),{kind:`mutation`,auth:`admin`}),close:w(i({sessionId:g()}),h(),{kind:`mutation`,auth:`admin`})}},qy=i({urls:c([g(),p(g())]),username:g().optional(),credential:g().optional()}),Jy={name:`turn-provider`,scope:`system`,mode:`collection`,methods:{getTurnServers:w(h(),p(qy).readonly())}},Yy=i({credentialId:g(),label:g(),createdAt:a(),lastUsedAt:a().nullable(),transports:p(g()).default([])}),Xy={name:`user-passkeys`,scope:`system`,mode:`collection`,internal:!0,methods:{beginRegistration:w(i({userId:g(),username:g()}),i({optionsJSON:n(g(),u())}),{kind:`mutation`,auth:`admin`,access:`create`}),finishRegistration:w(i({userId:g(),response:n(g(),u()),label:g()}),i({success:y(!0),credentialId:g()}),{kind:`mutation`,auth:`admin`,access:`create`}),beginAuthentication:w(i({userId:g().optional()}),i({optionsJSON:n(g(),u())}),{kind:`mutation`,access:`view`,auth:`admin`}),finishAuthentication:w(i({userId:g(),response:n(g(),u())}),i({verified:v()}),{kind:`mutation`,access:`view`,auth:`admin`}),beginDiscoverableAuthentication:w(i({}),i({optionsJSON:n(g(),u())}),{kind:`mutation`,access:`view`,auth:`admin`}),finishDiscoverableAuthentication:w(i({response:n(g(),u())}),i({verified:v(),userId:g().nullable()}),{kind:`mutation`,access:`view`,auth:`admin`}),listPasskeys:w(i({userId:g()}),p(Yy),{auth:`admin`}),removePasskey:w(i({userId:g(),credentialId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),getSecondFactorPreference:w(i({userId:g()}),i({enabled:v()}),{auth:`admin`}),setSecondFactorPreference:w(i({userId:g(),enabled:v()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`create`})}},Zy=m([`cosine`,`dot`,`euclidean`]),Qy=n(g(),c([g(),a(),v()])),$y=i({equals:n(g(),c([g(),a(),v()])).optional(),between:n(g(),s([a(),a()])).optional()}),eb=i({id:g(),vector:g(),metadata:Qy}),tb=i({id:g(),score:a(),metadata:Qy}),nb=i({index:g(),dim:a().int().positive(),metric:Zy.default(`cosine`)}),rb=i({index:g(),items:p(eb)}),ib=i({upserted:a(),rejected:a()}),ab=i({index:g(),vector:g(),topK:a().int().positive(),minScore:a().optional(),filter:$y.optional()}),ob=i({matches:p(tb),scanned:a(),truncated:v()}),sb=i({index:g(),ids:p(g())}),cb=i({index:g(),filter:$y}),lb=i({deleted:a()}),ub=i({index:g(),ids:p(g())}),db=i({items:p(i({id:g(),metadata:Qy}))}),fb=i({index:g()}),pb=i({backend:g(),count:a(),dim:a(),metric:Zy,bytes:a().optional(),exact:v()}),mb={name:`vector-store`,scope:`system`,mode:`singleton`,internal:!0,methods:{declareIndex:w(nb,h(),{kind:`mutation`,auth:`admin`}),upsert:w(rb,ib,{kind:`mutation`,auth:`admin`}),query:w(ab,ob,{auth:`admin`}),getByIds:w(ub,db,{auth:`admin`}),deleteByIds:w(sb,lb,{kind:`mutation`,auth:`admin`}),deleteByFilter:w(cb,lb,{kind:`mutation`,auth:`admin`}),stats:w(fb,pb,{auth:`admin`})}},hb=24,gb=3,_b=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()}),vb=i({playbackUrl:g(),playbackEndpoints:p(g()).optional(),token:g().optional()}),yb={name:`videoclips`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[E.Camera],methods:{listClips:w(i({deviceId:a(),since:a(),until:a(),limit:a().int().positive().optional()}),p(_b).readonly(),{kind:`query`,auth:`admin`}),getClipPlayback:w(i({deviceId:a(),clipId:g()}),vb,{kind:`query`,auth:`admin`})}},bb=i({viewportWidth:a().int().positive().optional(),viewportHeight:a().int().positive().optional(),devicePixelRatio:a().positive().optional(),downlinkMbps:a().nonnegative().optional(),prefersTier:g().optional()}).partial(),xb=b(`kind`,[i({kind:y(`adaptive`)}),i({kind:y(`profile`),profile:S}),i({kind:y(`cam-stream`),camStreamId:g().min(1)})]),Sb=i({id:g(),label:g(),target:xb,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()}),Cb={name:`webrtc-session`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,preferredProvider:`stream-broker`,deviceTypes:[E.Camera],methods:{listStreams:w(i({deviceId:a().int().nonnegative()}),p(Sb)),createSession:w(i({deviceId:a().int().nonnegative(),target:xb,hints:bb.optional(),relayOnly:v().optional(),consumerAttribution:ol.optional()}),i({sessionId:g(),sdpOffer:g()}),{kind:`mutation`}),handleOffer:w(i({deviceId:a().int().nonnegative(),target:xb.optional(),sdpOffer:g(),sessionId:g().optional(),relayOnly:v().optional(),nonTrickle:v().optional(),disableTurn:v().optional(),disableIpv6:v().optional(),consumerAttribution:ol.optional(),hints:bb.optional()}),i({sessionId:g(),sdpAnswer:g()}),{kind:`mutation`}),handleAnswer:w(i({deviceId:a().int().nonnegative(),sessionId:g(),sdpAnswer:g()}),h(),{kind:`mutation`}),addIceCandidate:w(i({deviceId:a().int().nonnegative(),sessionId:g(),candidate:g(),sdpMid:g().nullable().optional(),sdpMLineIndex:a().int().nullable().optional()}),h(),{kind:`mutation`}),getIceCandidates:w(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:w(i({deviceId:a().int().nonnegative(),sessionId:g()}),h(),{kind:`mutation`}),hasAdaptiveBitrate:w(i({deviceId:a().int().nonnegative(),profile:S}),v()),getSessionState:w(i({deviceId:a().int().nonnegative(),sessionId:g()}),i({pendingRenegotiation:i({target:xb,epoch:a()}).nullable()}))},mount:{kind:`server-provided`}},wb=i({childDeviceIds:p(a()).readonly(),hiddenChildIds:p(a()).readonly()}),Tb={name:`accessories`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera,E.Hub,E.Switch,E.Light,E.Sensor,E.Thermostat,E.Cover,E.Lock,E.Fan,E.MediaPlayer,E.AlarmPanel,E.Generic],methods:{setChildHidden:w(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:wb,kind:`command-driven`}},Eb=m([`install`,`update`,`uninstall`,`restart`]),Db=m([`queued`,`fetching`,`staged`,`validating`,`applying`,`restarting`,`applied`,`done`,`failed`,`skipped`]),Ob=m([`framework`,`addon`]),kb=i({tsMs:a(),nodeId:g(),packageName:g(),phase:Db,message:g()}),Ab=i({taskId:g(),nodeId:g(),packageName:g(),fromVersion:g().nullable(),toVersion:g(),target:Ob,phase:Db,stagedPath:g().nullable(),attempts:a(),steps:p(kb),error:g().nullable(),startedAtMs:a().nullable(),finishedAtMs:a().nullable()}),jb=m([`running`,`completed`,`failed`,`partially-failed`,`cancelled`]),Mb=m([`single`,`bulk`,`cluster`]),Nb=i({jobId:g(),kind:Eb,createdAtMs:a(),createdBy:g(),scope:Mb,tasks:p(Ab),state:jb,schemaVersion:y(1)}),Pb=m([`debug`,`info`,`warn`,`error`]),Fb=m([`off`,`latest`,`beta`]),Ib=m([`off`,`latest`,`beta`,`inherit`]),Lb=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()}),Rb=i({pid:a().optional(),mode:g(),state:g()}),zb=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()}),Bb=i({manifest:Lb,declaration:u().optional(),source:g(),installSource:g().optional(),process:Rb.optional(),hasBackup:v().optional(),health:zb.nullable().optional()}),Vb=i({name:g(),version:g(),dir:g(),installSource:g().optional()}),Hb=i({name:g(),currentVersion:g(),latestVersion:g(),category:m([`addon`,`core`]),requiresRestart:v(),isSystem:v()}),Ub=i({version:g(),publishedAt:g(),deprecated:g().optional(),distTags:p(g()).readonly()}),Wb=i({name:g(),version:g(),description:g(),keywords:p(g()).readonly(),publishedAt:g(),author:g(),installed:v(),installedVersion:g().optional()}),Gb=i({channel:Fb,intervalSeconds:a(),updateCheckIntervalSeconds:a()}),Kb=Ib,qb=u(),Jb=u(),Yb=u(),Xb=m([`queued`,`updating`,`done`,`done-pending-restart`,`failed`]),Zb=i({name:g(),isSystem:v(),fromVersion:g(),toVersion:g(),status:Xb,error:g().optional(),startedAtMs:a().optional(),completedAtMs:a().optional()}),Qb=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:Qb,cancelled:v(),items:p(Zb).readonly()});var $b=i({packageName:g(),currentVersion:g(),latestVersion:g().nullable(),hasUpdate:v(),description:g().optional(),buildId:g().nullable()}),ex=i({timestamp:g(),level:g(),message:g(),scope:g().optional()}),tx=u(),nx=i({addonId:g().min(1),action:g().min(1),input:u()}),rx={name:`addons`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{list:w(h(),p(Bb).readonly()),getLogs:w(i({addonId:g(),limit:a().min(1).max(500).default(100),level:Pb.optional()}),p(tx)),listPackages:w(h(),p(Vb).readonly()),installPackage:w(i({packageName:g(),version:g().optional()}),Jb,{kind:`mutation`,auth:`admin`}),installFromWorkspace:w(i({packageName:g()}),Jb,{kind:`mutation`,auth:`admin`}),isWorkspaceAvailable:w(h(),v()),listWorkspacePackages:w(h(),p(u()).readonly()),uninstallPackage:w(i({packageName:g()}),u(),{kind:`mutation`,auth:`admin`}),reloadPackages:w(h(),Yb,{kind:`mutation`,auth:`admin`}),searchAvailable:w(i({query:g().optional()}),p(Wb)),listUpdates:w(i({nodeId:g().optional()}),p(Hb).readonly(),{auth:`admin`}),updatePackage:w(i({name:g().min(1),version:g().optional(),nodeId:g().optional()}),u(),{kind:`mutation`,auth:`admin`}),rollbackPackage:w(i({name:g().min(1)}),i({rolledBackTo:g().nullable()}),{kind:`mutation`,auth:`admin`}),forceRefresh:w(i({nodeId:g().optional()}),u(),{kind:`mutation`,auth:`admin`}),restartServer:w(i({confirm:y(!0)}),u(),{kind:`mutation`,auth:`admin`}),getLastRestart:w(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:w(h(),p($b).readonly(),{auth:`admin`}),listCapabilityProviders:w(i({capName:g().min(1)}),p(i({addonId:g(),mode:m([`singleton`,`collection`]),isActive:v()})).readonly()),setCapabilityProviderEnabled:w(i({capName:g().min(1),addonId:g().min(1),enabled:v()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getVersions:w(i({name:g()}),p(Ub).readonly()),restartAddon:w(i({addonId:g()}),qb,{kind:`mutation`,auth:`admin`}),retryLoad:w(i({packageName:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getAutoUpdateSettings:w(h(),Gb,{auth:`admin`}),setAutoUpdateSettings:w(i({channel:Fb,intervalSeconds:a().min(300).max(86400).optional(),updateCheckIntervalSeconds:a().min(900).max(604800).optional()}),u(),{kind:`mutation`,auth:`admin`}),getAddonAutoUpdate:w(i({addonId:g()}),Kb,{auth:`admin`}),setAddonAutoUpdate:w(i({addonId:g(),channel:Ib}),u(),{kind:`mutation`,auth:`admin`}),applyAutoUpdateToAll:w(i({channel:Fb}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),custom:w(nx,u(),{kind:`mutation`}),startJob:w(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:w(i({jobId:g()}),Nb.nullable(),{auth:`admin`}),listJobs:w(i({activeOnly:v().optional()}),p(Nb),{auth:`admin`}),cancelJob:w(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),onAddonLogs:w(i({addonId:g(),level:Pb.optional()}),ex,{kind:`subscription`})},mount:{kind:`server-provided`}},ix=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()}),ax={name:`air-quality-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:ix,kind:`push`},runtimeState:ix,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},ox=i({lux:a().min(0),lastFetchedAt:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional()}),sx={name:`ambient-light-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:ox,kind:`push`},runtimeState:ox,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},cx=i({className:g(),hits:a().int().nonnegative(),avgScore:a().min(0).max(1),peakScore:a().min(0).max(1)}),lx=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(cx).readonly()}),ux=i({ts:a().int(),dbfs:a().nullable(),peakDbfs:a(),avgDbfs:a(),topClass:g().nullable(),topScore:a().min(0).max(1).nullable()}),dx=i({points:p(ux).readonly(),effectiveSampleEveryMs:a().int().positive(),windowMsActual:a().int().nonnegative()}),fx={name:`audio-metrics`,scope:`device`,mode:`singleton`,deviceTypes:[E.Camera],methods:{getCurrentSnapshot:w(i({deviceId:a()}),lx.nullable()),getHistory:w(i({deviceId:a(),windowSec:a().int().positive().optional(),sampleEveryMs:a().int().positive().optional()}),dx)},runtimeState:lx,durability:`session`},px=i({enabled:v(),isRunning:v(),lastTriggeredAt:a(),lastError:g().nullable(),lastChangedAt:a()}),mx={name:`automation-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Automation],methods:{enable:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),disable:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),trigger:w(i({deviceId:a().int().nonnegative(),skipCondition:v().optional()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:px,kind:`push`},runtimeState:px,durability:`session`},hx=i({percentage:a().min(0).max(100),charging:m([`dc`,`solar`,`none`]),sleeping:v(),lastUpdated:a(),lastContactAt:a().optional(),binary:v().optional()}),gx={name:`battery`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera,E.Sensor,E.Button,E.Switch],methods:{wakeForStream:w(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:hx})}},status:{schema:hx,kind:`push`,empty:{percentage:0,charging:`none`,sleeping:!1,lastUpdated:0}},runtimeState:hx,durability:`restored`,volatileStateFields:[`lastUpdated`]},_x=i({on:v(),lastChangedAt:a()}),vx={name:`binary`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:_x,kind:`push`},runtimeState:_x,durability:`restored`,volatileStateFields:[`lastChangedAt`]},yx=i({percentage:a().min(0).max(100),lastChangedAt:a()}),bx={name:`brightness`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Light],methods:{setBrightness:w(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:yx,kind:`command-driven`},runtimeState:yx,durability:`session`},xx={name:`button`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Button],methods:{press:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})}},Sx=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()}),Cx=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()}),wx={name:`camera-credentials`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera],methods:{getCredentials:w(i({deviceId:a()}),Sx.nullable(),{kind:`query`,auth:`admin`})},status:{schema:Cx,kind:`command-driven`}},Tx=i({detected:v(),lastChangedAt:a()}),Ex={name:`carbon-monoxide`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:Tx,kind:`push`},runtimeState:Tx,durability:`restored`,volatileStateFields:[`lastChangedAt`]},Dx=m([`off`,`heat`,`cool`,`auto`,`heat_cool`,`fan_only`,`dry`]),Ox=i({mode:Dx,availableModes:p(Dx),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()}),kx={name:`climate-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Thermostat,E.Climate],methods:{setMode:w(i({deviceId:a().int().nonnegative(),mode:Dx}),h(),{kind:`mutation`,auth:`admin`}),setFanMode:w(i({deviceId:a().int().nonnegative(),fanMode:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),setPreset:w(i({deviceId:a().int().nonnegative(),preset:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),setTarget:w(i({deviceId:a().int().nonnegative(),target:a()}),h(),{kind:`mutation`,auth:`admin`}),setTargetRange:w(i({deviceId:a().int().nonnegative(),targetLow:a(),targetHigh:a()}),h(),{kind:`mutation`,auth:`admin`}),setTargetHumidity:w(i({deviceId:a().int().nonnegative(),targetHumidity:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`}),setSwingVertical:w(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`}),setSwingHorizontal:w(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:Ox,kind:`push`},runtimeState:Ox,durability:`session`},Ax=i({r:a().int().min(0).max(255),g:a().int().min(0).max(255),b:a().int().min(0).max(255)}),jx=i({h:a().min(0).max(360),s:a().min(0).max(100),v:a().min(0).max(100)}),Mx=b(`mode`,[i({mode:y(`rgb`),rgb:Ax}),i({mode:y(`hsv`),hsv:jx}),i({mode:y(`mired`),mireds:a().int().min(50).max(1e3)})]),Nx=i({mode:m([`rgb`,`hsv`,`mired`]),rgb:Ax.optional(),hsv:jx.optional(),mireds:a().int().optional(),lastChangedAt:a()}),Px={name:`color`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Light],methods:{setColor:w(i({deviceId:a().int().nonnegative(),color:Mx}),h(),{kind:`mutation`,auth:`admin`})},events:{onColorChanged:{data:i({deviceId:a(),mode:m([`rgb`,`hsv`,`mired`]),rgb:Ax.optional(),hsv:jx.optional(),mireds:a().int().optional(),lastChangedAt:a()})}},status:{schema:Nx,kind:`command-driven`},runtimeState:Nx,durability:`session`},Fx=2e4,Ix=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()]),Lx=i({settings:n(g(),u())}),Rx=i({label:g()}),zx={name:`connection-test`,scope:`system`,mode:`collection`,methods:{testSettings:w(Lx,Ix,{kind:`mutation`,auth:`admin`}),describeTest:w(h(),Rx,{auth:`admin`})}},Bx=i({connected:v(),lastChangedAt:a()}),Vx={name:`connectivity`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:Bx,kind:`push`},runtimeState:Bx,durability:`restored`,volatileStateFields:[`lastChangedAt`]},Hx=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()}),Ux=i({items:p(Hx),lastChangedAt:a()}),Wx={name:`consumables`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:Object.values(E),deviceConfig:{ui:{kind:`widget`,widgetId:`host/consumables-panel`,tab:`consumables`,topTab:!0,label:`Consumables`,order:5}},methods:{reset:w(i({deviceId:a().int().nonnegative(),key:g().min(1)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:Ux,kind:`push`,empty:{items:[],lastChangedAt:0},itemArray:{path:`items`,keyField:`key`,labelField:`label`,itemSchema:Hx,emptyItem:{key:``,label:``,level:null,status:null,lastResetAt:null,resettable:!1}}},runtimeState:Ux.extend({lastFetchedAt:a()}),durability:`session`},Gx=i({entryOpen:v(),lastChangedAt:a()}),Kx={name:`contact`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:Gx,kind:`push`},runtimeState:Gx,durability:`restored`,volatileStateFields:[`lastChangedAt`]},qx=m([`numeric`,`select`,`text`,`datetime`]),Jx=i({kind:qx,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()}),Yx=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)})]),Xx={name:`control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Control],methods:{setValue:w(i({deviceId:a().int().nonnegative(),control:Yx}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:Jx,kind:`push`},runtimeState:Jx,durability:`session`},Zx=m([`open`,`opening`,`closing`,`closed`,`stopped`]),Qx=i({state:Zx,position:a().min(0).max(100).nullable(),tiltPosition:a().min(0).max(100).nullable(),lastChangedAt:a()}),$x={name:`cover`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Cover],methods:{open:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),close:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),stop:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),setPosition:w(i({deviceId:a().int().nonnegative(),position:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`}),setTiltPosition:w(i({deviceId:a().int().nonnegative(),tiltPosition:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:Qx,kind:`push`},runtimeState:Qx,durability:`restored`,volatileStateFields:[`lastChangedAt`]},eS=m([`auto`,`day`,`night`,`schedule`]),tS=i({min:a(),max:a(),step:a()}),nS=i({mode:eS,sensitivity:a().optional(),switchDelaySec:a().optional(),lastFetchedAt:a()}),rS=i({modes:p(eS),supportsSensitivity:v(),sensitivity:tS.optional(),supportsSwitchDelay:v(),switchDelaySec:tS.optional()}),iS=i({mode:eS.optional(),sensitivity:a().optional(),switchDelaySec:a().optional()}),aS={name:`day-night`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`day-night`,tab:`image`}},methods:{getOptions:w(i({deviceId:a()}),rS),setSettings:w(i({deviceId:a(),settings:iS}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:nS,kind:`poll`},runtimeState:nS,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},oS=i({online:v(),lastChangedAt:a()}),sS={name:`device-status`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{},events:{onStatusChanged:{data:i({deviceId:a(),status:oS})}},status:{schema:oS,kind:`push`},runtimeState:oS,durability:`restored`,volatileStateFields:[`lastChangedAt`]},cS=i({lastPressedAt:a().nullable(),pressCountSinceStart:a()}),lS=i({deviceId:a(),timestamp:a()}),uS={name:`doorbell`,scope:`device`,deviceNative:!0,mode:`singleton`,kind:`wrapper`,defaultActive:!1,deviceTypes:[E.Button,E.Camera],exposesDeviceSettings:!0,methods:{},events:{onPressed:{data:lS}},status:{schema:cS,kind:`push`},runtimeState:cS,durability:`restored`},dS=m([`date`,`time`,`datetime`]),fS=i({value:g(),format:dS.optional(),lastFetchedAt:a()}),pS={name:`enum-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:fS,kind:`push`},runtimeState:fS,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},mS=i({deviceId:a(),eventType:g(),data:n(g(),u()).nullable(),timestamp:a(),seq:a()}),hS=i({eventTypes:p(g()),lastEvent:mS.nullable(),eventCountSinceStart:a()}),gS={name:`event-emitter`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.EventEmitter],methods:{},events:{onEvent:{data:mS}},status:{schema:hS,kind:`push`},runtimeState:hS,durability:`session`},_S=i({id:g(),type:g(),timestamp:a(),label:g().optional(),thumbnailUrl:g().optional(),clipUrl:g().optional(),metadata:n(g(),u()).optional()}),vS={name:`events`,scope:`device`,mode:`singleton`,deviceTypes:[E.Camera],methods:{getEvents:w(i({deviceId:a(),from:a().optional(),to:a().optional(),limit:a().optional()}),p(_S)),getEventThumbnail:w(i({deviceId:a(),eventId:g()}),i({base64:g(),contentType:g()}).nullable()),getEventClipUrl:w(i({deviceId:a(),eventId:g()}),g().nullable())}},yS=i({id:g(),name:g(),sampleCount:a().int().nonnegative(),coverMediaKey:g().optional(),coverBase64:g().optional()}),bS=i({id:g(),source:m([`detected`,`photo`]),addedAt:a().int(),deviceId:a().int().optional(),base64:g().optional()}),xS=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:V.optional(),keyFrameMediaKey:g().optional(),bestMatchScore:a().optional(),nativeFaceShortSidePx:a().optional(),suggestedIdentityId:g().optional(),suggestedMatchScore:a().optional()}),SS=m([`unassigned`,`recognized`,`identified`,`all`]),CS=m([`timestamp`,`suggestionConfidence`]),wS=m([`asc`,`desc`]),TS=i({faceIds:p(g()).readonly(),representativeFaceId:g(),size:a().int(),cohesion:a()}),ES=i({key:g(),kind:g(),base64:g(),sizeBytes:a(),timestamp:a()}),DS={name:`face-gallery`,scope:`system`,mode:`singleton`,methods:{listIdentities:w(i({includeCrops:v().optional()}).optional(),p(yS).readonly()),createIdentity:w(i({name:g().min(1)}),yS,{kind:`mutation`,auth:`admin`}),renameIdentity:w(i({id:g(),name:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),deleteIdentity:w(i({id:g()}),h(),{kind:`mutation`,auth:`admin`}),listIdentitySamples:w(i({identityId:g()}),p(bS).readonly()),removeSample:w(i({identityId:g(),sampleId:g()}),h(),{kind:`mutation`,auth:`admin`}),listRecentFaces:w(i({deviceId:a().int().optional(),deviceIds:p(a().int()).optional(),limit:a().int().positive().optional(),filter:SS.optional(),since:a().int().optional(),until:a().int().optional(),sortBy:CS.optional(),sortDirection:wS.optional(),includeCrops:v().optional()}).optional(),p(xS).readonly()),getFaceByTrack:w(i({deviceId:a().int(),trackId:g()}),xS.nullable()),getFaceMedia:w(i({faceId:g()}),p(ES).readonly()),assignFace:w(i({faceId:g(),identityId:g()}),h(),{kind:`mutation`,auth:`admin`}),unassignFace:w(i({faceId:g()}),h(),{kind:`mutation`,auth:`admin`}),deleteFace:w(i({faceId:g()}),h(),{kind:`mutation`,auth:`admin`}),assignFaces:w(i({faceIds:p(g()).min(1),identityId:g()}),i({assigned:a().int(),failed:p(g()).readonly()}),{kind:`mutation`,auth:`admin`}),unassignFaces:w(i({faceIds:p(g()).min(1)}),i({unassigned:a().int(),failed:p(g()).readonly()}),{kind:`mutation`,auth:`admin`}),suggestFaceClusters:w(i({threshold:a().min(0).max(1).optional(),minClusterSize:a().int().min(2).optional(),maxClusters:a().int().positive().optional(),limit:a().int().positive().optional(),maxFacesScanned:a().int().positive().optional()}).optional(),p(TS).readonly())}},OS=m([`forward`,`reverse`]),kS=i({percentage:a().min(0).max(100).nullable(),percentageStep:a().positive().optional(),preset:g(),availablePresets:p(g()),direction:OS.nullable(),oscillating:v().nullable(),lastChangedAt:a()}),AS={name:`fan-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Fan],methods:{setPercentage:w(i({deviceId:a().int().nonnegative(),percentage:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`}),setPreset:w(i({deviceId:a().int().nonnegative(),preset:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),setDirection:w(i({deviceId:a().int().nonnegative(),direction:OS}),h(),{kind:`mutation`,auth:`admin`}),setOscillating:w(i({deviceId:a().int().nonnegative(),oscillating:v()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:kS,kind:`push`},runtimeState:kS,durability:`session`},jS=i({flags:n(g(),u()),deviceType:g().nullable(),model:g().nullable(),channelCount:a().nullable(),lastProbedAt:a(),lastFetchedAt:a()}),MS={name:`feature-probe`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{},events:{onProbeChanged:{data:i({deviceId:a(),status:jS})}},status:{schema:jS,kind:`push`},runtimeState:jS,durability:`session`},NS=i({flooded:v(),lastChangedAt:a()}),PS={name:`flood`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:NS,kind:`push`},runtimeState:NS,durability:`restored`,volatileStateFields:[`lastChangedAt`]},FS=i({detected:v(),lastChangedAt:a()}),IS={name:`gas`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:FS,kind:`push`},runtimeState:FS,durability:`restored`,volatileStateFields:[`lastChangedAt`]},LS=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()}),RS={name:`humidifier`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Humidifier],methods:{setOn:w(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`}),setTargetHumidity:w(i({deviceId:a().int().nonnegative(),humidity:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`}),setMode:w(i({deviceId:a().int().nonnegative(),mode:g().min(1)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:LS,kind:`push`},runtimeState:LS,durability:`session`},zS=i({percent:a().min(0).max(100),lastFetchedAt:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional()}),BS={name:`humidity-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor,E.Thermostat],methods:{},status:{schema:zS,kind:`push`},runtimeState:zS,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},VS=i({url:g().nullable(),lastUpdated:a().nullable()}),HS={name:`image`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Image],methods:{},status:{schema:VS,kind:`push`},runtimeState:VS,durability:`session`},US=m([`0`,`90`,`180`,`270`]),WS=m([`auto`,`manual`]),GS=m([`auto`,`manual`]),KS=m([`off`,`blc`,`wdr`,`hlc`]),qS=i({min:a(),max:a(),step:a()}),JS=i({brightness:a().optional(),contrast:a().optional(),saturation:a().optional(),sharpness:a().optional(),mirror:v().optional(),flip:v().optional(),rotate:US.optional(),whiteBalance:WS.optional(),warmth:a().optional(),exposureMode:GS.optional(),backlightMode:KS.optional(),lastFetchedAt:a()}),YS=i({supportsBrightness:v(),brightness:qS.optional(),supportsContrast:v(),contrast:qS.optional(),supportsSaturation:v(),saturation:qS.optional(),supportsSharpness:v(),sharpness:qS.optional(),supportsMirror:v(),supportsFlip:v(),rotateOptions:p(US),whiteBalanceModes:p(WS),supportsWarmth:v(),warmth:qS.optional(),exposureModes:p(GS),backlightModes:p(KS)}),XS=i({brightness:a().optional(),contrast:a().optional(),saturation:a().optional(),sharpness:a().optional(),mirror:v().optional(),flip:v().optional(),rotate:US.optional(),whiteBalance:WS.optional(),warmth:a().optional(),exposureMode:GS.optional(),backlightMode:KS.optional()}),ZS={name:`image-settings`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`image-settings`,tab:`image`}},methods:{getOptions:w(i({deviceId:a()}),YS),setSettings:w(i({deviceId:a(),settings:XS}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:JS,kind:`poll`},runtimeState:JS,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},QS=i({id:g(),addonId:g(),name:g(),enabled:v(),info:n(g(),u()).readonly(),createdAt:a(),updatedAt:a(),processState:g()}),$S=i({id:g(),addonId:g(),name:g(),enabled:v(),info:n(g(),u()).readonly(),createdAt:a(),updatedAt:a()}),eC=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()}),tC=m([`validated`,`rejected`,`inconclusive`,`unsupported`]),nC=i({success:v(),error:g().optional(),status:tC.optional(),testedBy:g().nullable().optional(),latencyMs:a().nonnegative().optional(),detail:g().optional()}),rC=i({addonId:g(),name:g(),enabled:v().optional(),info:n(g(),u()).optional(),settings:n(g(),u()).optional(),skipRestart:v().optional()}),iC=i({id:g(),name:g().optional(),enabled:v().optional(),info:n(g(),u()).optional()}),aC=i({success:v(),deletedId:g()}),oC={name:`integrations`,scope:`system`,mode:`singleton`,methods:{list:w(h(),p(QS)),get:w(i({id:g()}),QS),getByAddonId:w(i({addonId:g()}),$S.nullable()),create:w(rC,$S,{kind:`mutation`,auth:`admin`}),update:w(iC,$S,{kind:`mutation`,auth:`admin`}),delete:w(i({id:g()}),aC,{kind:`mutation`,auth:`admin`}),getSettings:w(i({id:g()}),n(g(),u()),{auth:`admin`}),setSettings:w(i({id:g(),settings:n(g(),u())}),i({success:v()}),{kind:`mutation`,auth:`admin`}),getAvailableTypes:w(h(),p(eC),{auth:`admin`}),testConnection:w(i({addonId:g(),settings:n(g(),u())}),nC,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},sC=i({codecs:p(g()),sampleRate:a(),duplex:m([`half`,`full`]),maxBacklogMs:a()}),cC=i({talking:v(),lastSessionAt:a().nullable(),ability:sC.nullable()}),lC=m([`opus`,`s16le`,`g711ulaw`,`g711alaw`]),uC={name:`intercom`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera],methods:{startSession:w(i({deviceId:a()}),i({sessionId:g(),sdpOffer:g()}),{kind:`mutation`,auth:`admin`}),handleAnswer:w(i({deviceId:a(),sessionId:g(),sdpAnswer:g()}),h(),{kind:`mutation`,auth:`admin`}),stopSession:w(i({deviceId:a(),sessionId:g()}),h(),{kind:`mutation`,auth:`admin`}),startTalkSession:w(i({deviceId:a()}),i({sessionId:g()}),{kind:`mutation`,auth:`admin`}),pushTalkAudio:w(i({deviceId:a(),audioBase64:g(),codec:lC.optional(),sampleRate:a().int().positive().optional(),channels:a().int().positive().optional(),sequenceNumber:a().int()}),i({accepted:v()}),{kind:`mutation`,auth:`admin`}),endTalkSession:w(i({deviceId:a()}),h(),{kind:`mutation`,auth:`admin`})},events:{onStatusChanged:{data:i({deviceId:a(),status:cC})}},status:{schema:cC,kind:`command-driven`},runtimeState:cC,durability:`session`},dC=m([`idle`,`mowing`,`paused`,`docked`,`error`]),fC=m([`info`,`warning`,`error`]),pC=i({activity:dC,batteryLevel:a().min(0).max(100).nullable(),progressPercent:a().min(0).max(100).nullable(),currentCode:a().nullable(),currentCodeLabel:g().nullable(),severity:fC,lastChangedAt:a()}),mC={name:`lawn-mower-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.LawnMower],methods:{startMowing:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),pause:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),dock:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:pC,kind:`push`},runtimeState:pC,durability:`session`},hC=m([`lan`,`wifi`,`docker`,`vpn`,`loopback`,`other`]),gC=i({name:g(),family:m([`IPv4`,`IPv6`]),address:g(),cidr:g(),netmask:g(),internal:v(),mac:g(),kind:hC,preferred:v(),plausible:v(),plausibleReason:g()}),_C=i({interfaces:p(gC).readonly(),probedAt:a()}),vC=gC.nullable(),yC=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()}),bC=m([`server-config`,`server-env`,`caller-hint`,`default`]),xC=i({port:a().int().min(1).max(65535),source:bC}),SC=i({endpoints:p(yC).readonly(),localPort:xC}),CC=i({baseUrl:g().nullable(),resolved:g().nullable()}),wC=i({baseUrls:p(g()).readonly(),resolved:p(g()).readonly()}),TC=i({addresses:p(g()).readonly()}),EC=i({mode:m([`generated`,`uploaded`,`disabled`]),leafFingerprintSha256:g().nullable(),caFingerprintSha256:g().nullable(),validTo:g().nullable(),sans:p(g()),caCertPem:g().nullable(),reissueError:g().nullable(),restartRequired:v()}),DC={name:`local-network`,scope:`system`,mode:`singleton`,methods:{list:w(h(),_C),getPreferred:w(h(),vC),getConnectionEndpoints:w(i({port:a().int().min(1).max(65535).optional(),includeLoopback:v().optional(),ipv4Only:v().optional(),scheme:m([`http`,`https`]).optional()}),SC),getNotificationEndpoint:w(h(),CC),setNotificationEndpoint:w(i({baseUrl:g().nullable()}),CC,{kind:`mutation`}),getViewerEndpoints:w(h(),wC),setViewerEndpoints:w(i({baseUrls:p(g()).readonly()}),wC,{kind:`mutation`}),getAllowedAddresses:w(h(),TC),setAllowedAddresses:w(TC,i({success:y(!0)}),{kind:`mutation`}),resetAllowlistToBestMatch:w(h(),TC,{kind:`mutation`}),getTlsStatus:w(h(),EC),regenerateCertificate:w(i({reason:g().optional()}),EC,{kind:`mutation`,auth:`admin`}),uploadCertificate:w(i({certPem:g().min(1),keyPem:g().min(1),caPem:g().optional()}),EC,{kind:`mutation`,auth:`admin`}),downloadCa:w(h(),i({pem:g()})),revertToGeneratedCertificate:w(h(),EC,{kind:`mutation`,auth:`admin`})},mount:{kind:`hub-only`}},OC=m([`locked`,`unlocked`,`locking`,`unlocking`,`jammed`]),kC=i({state:OC,lastChangedAt:a()}),AC={name:`lock-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Lock],methods:{lock:w(i({deviceId:a().int().nonnegative(),code:g().min(1).optional()}),h(),{kind:`mutation`,auth:`admin`}),unlock:w(i({deviceId:a().int().nonnegative(),code:g().min(1).optional()}),h(),{kind:`mutation`,auth:`admin`}),open:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:kC,kind:`push`},runtimeState:kC,durability:`restored`,volatileStateFields:[`lastChangedAt`]},jC=m([`off`,`on`,`idle`,`playing`,`paused`,`buffering`,`standby`]),MC=m([`off`,`all`,`one`]),NC=i({type:g(),title:g(),artist:g().optional(),album:g().optional(),imageUrl:g().optional()}),PC=i({state:jC,volumeLevel:a().min(0).max(100).nullable(),isMuted:v().nullable(),source:g(),availableSources:p(g()),currentMedia:NC.nullable(),positionMs:a().int().nonnegative().nullable(),durationMs:a().int().nonnegative().nullable(),shuffle:v().nullable(),repeat:MC.nullable(),lastChangedAt:a()}),FC={name:`media-player`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.MediaPlayer],methods:{play:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),pause:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),stop:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),next:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),previous:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),seek:w(i({deviceId:a().int().nonnegative(),positionMs:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),setVolume:w(i({deviceId:a().int().nonnegative(),volumeLevel:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`}),setMute:w(i({deviceId:a().int().nonnegative(),muted:v()}),h(),{kind:`mutation`,auth:`admin`}),setShuffle:w(i({deviceId:a().int().nonnegative(),shuffle:v()}),h(),{kind:`mutation`,auth:`admin`}),setRepeat:w(i({deviceId:a().int().nonnegative(),repeat:MC}),h(),{kind:`mutation`,auth:`admin`}),selectSource:w(i({deviceId:a().int().nonnegative(),source:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),playMedia:w(i({deviceId:a().int().nonnegative(),mediaId:g().min(1),mediaType:g().min(1)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:PC,kind:`push`},runtimeState:PC,durability:`session`},IC=i({id:g(),label:g(),scope:m([`mesh`,`public`]),url:g(),hostname:g(),port:a(),protocol:m([`http`,`https`])}),LC=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()}),RC=i({joined:v(),meshIp:g(),magicDnsHostname:g(),peerCount:a(),endpoints:p(IC).readonly(),error:g().optional(),tenantName:g(),magicDnsSuffix:g(),userLogin:g().nullable(),controlPlaneUrl:g(),keyExpiry:a().nullable(),daemonSocket:g().optional(),daemonCliPath:g().optional()}),zC={name:`mesh-network`,scope:`system`,mode:`collection`,providerKind:`mesh`,methods:{getStatus:w(h(),RC),join:w(i({authKey:g().min(8),hostname:g().optional()}),i({joined:y(!0)}),{kind:`mutation`}),startLogin:w(i({hostname:g().optional()}),i({loginUrl:g()}),{kind:`mutation`}),leave:w(h(),i({left:y(!0)}),{kind:`mutation`}),logout:w(h(),i({loggedOut:y(!0)}),{kind:`mutation`}),listPeers:w(h(),i({peers:p(LC).readonly()})),testConnection:w(i({authKey:g().optional()}),i({ok:v(),tenant:g().optional(),daemonVersion:g().optional(),error:g().optional()}),{kind:`mutation`})}},BC=i({detected:v(),lastDetectedAt:a().nullable(),autoClearAfterMs:a().nullable()}),VC=i({deviceId:a(),detected:v(),timestamp:a(),source:$_,regions:p(Wf).readonly().optional()}),HC={name:`motion`,scope:`device`,mode:`singleton`,deviceNative:!0,deviceTypes:[E.Camera,E.Sensor],methods:{isDetected:w(i({deviceId:a()}),v())},events:{onMotionChanged:{data:VC}},status:{schema:BC,kind:`push`},runtimeState:BC,durability:`session`},UC=i({enabled:v(),lastChangedAt:a()}),WC=UC.extend({lastFetchedAt:a()}),GC={name:`motion-trigger`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Light,E.Siren,E.Switch],methods:{setMotionTrigger:w(i({deviceId:a().int().nonnegative(),enabled:v()}),h(),{kind:`mutation`,auth:`admin`})},events:{onMotionTriggerChanged:{data:i({deviceId:a(),enabled:v(),lastChangedAt:a()})}},status:{schema:UC,kind:`command-driven`},runtimeState:WC,durability:`session`},KC=i({id:a(),enabled:v(),shape:nm}),qC=i({enabled:v(),sensitivity:a(),regions:p(KC),lastFetchedAt:a()}),JC=i({maxRegions:a(),supportedShapes:p(am),grid:sm,sensitivity:i({min:a(),max:a(),step:a()})}),YC=i({enabled:v().optional(),sensitivity:a().optional(),regions:p(KC).optional()}),XC={name:`motion-zones`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/motion-zones-grid`,tab:`motion`,label:`Motion Zones`}},methods:{getOptions:w(i({deviceId:a()}),JC),setZone:w(i({deviceId:a(),patch:YC}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:qC,kind:`poll`},runtimeState:qC,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},ZC=m([`person`,`vehicle`,`animal`,`face`,`package`,`other`]),QC=i({class:ZC,timestamp:a(),confidence:a().min(0).max(1).optional()}),$C=i({lastByClass:l(ZC,QC.nullable()),supportedClasses:p(ZC).readonly(),enabled:v()}),ew=$C.extend({lastFetchedAt:a()}),tw={name:`native-object-detection`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera],methods:{setEnabled:w(i({deviceId:a(),enabled:v()}),h(),{kind:`mutation`,auth:`admin`})},events:{onDetected:{data:i({deviceId:a(),detection:QC})}},status:{schema:$C,kind:`push`},runtimeState:ew,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},nw=i({nominalBitrateKbps:a(),observedBitrateKbps:a(),peakBitrateKbps:a(),packetLossPercent:a(),lastUpdated:a()}),rw=i({rttMs:a(),jitterMs:a(),estimatedBandwidthKbps:a(),packetLossPercent:a().min(0).max(100),lastUpdated:a()}),iw=i({deviceId:a(),streams:n(g(),nw),client:rw.optional()}),aw={name:`network-quality`,scope:`system`,mode:`singleton`,methods:{getDeviceStats:w(i({deviceId:a()}),iw.nullable()),getAllStats:w(h(),p(iw).readonly()),reportClientStats:w(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`}},ow=i({addonId:g(),capabilities:p(g()).readonly(),status:g()}),sw=i({pid:a(),name:g(),state:g(),cpuPercent:a(),memoryRss:a(),uptimeSeconds:a(),services:p(ow).readonly(),groupId:g().optional()}),cw=i({id:g(),status:g(),cpuPercent:a(),memoryRss:a()}),lw=i({category:g(),total:a(),healthy:a(),addons:p(cw).readonly()}),uw=i({name:g(),version:g()}),dw=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(sw).readonly(),categories:p(lw).readonly(),rootPackage:uw.nullable()}),fw=i({callerAddonId:g(),providerAddonId:g(),capName:g(),callsPerMin:a(),lastCallAtMs:a()}),pw=i({nodeId:g(),name:g(),version:g(),status:g(),synced:v()}),mw=i({hubVersion:g(),nodes:p(pw)}),hw=i({nodeId:g(),addonId:g()}),gw=i({id:g(),status:g(),version:g().optional(),packageName:g().optional()}),_w=i({success:v()}),vw=i({success:v(),reason:g().optional()}),yw=i({restarted:p(g()).readonly(),failed:p(g()).readonly()}),bw=i({nodeId:g(),name:g()}),xw={name:`nodes`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{topology:w(h(),p(dw).readonly(),{auth:`admin`}),deployAddon:w(hw,_w,{kind:`mutation`,auth:`admin`}),undeployAddon:w(hw,_w,{kind:`mutation`,auth:`admin`}),restartAddon:w(hw,_w,{kind:`mutation`,auth:`admin`}),restartProcess:w(i({nodeId:g(),processName:g()}),vw,{kind:`mutation`,auth:`admin`}),restartNode:w(i({nodeId:g()}),yw,{kind:`mutation`,auth:`admin`}),shutdownNode:w(i({nodeId:g()}),_w,{kind:`mutation`,auth:`admin`}),renameNode:w(i({nodeId:g(),name:g().min(1).max(64)}),bw,{kind:`mutation`,auth:`admin`}),clusterAddonStatus:w(h(),n(g(),mw),{auth:`admin`}),getCapUsageGraph:w(i({windowSeconds:a().int().positive().max(300).default(60)}),p(fw).readonly(),{auth:`admin`}),getNodeAddons:w(i({nodeId:g()}),p(gw).readonly(),{auth:`admin`}),setProcessLogLevel:w(i({nodeId:g(),level:g()}),_w,{kind:`mutation`,auth:`admin`}),executeQuery:w(i({nodeId:g(),addonId:g(),queryName:g(),params:n(g(),u()).optional()}),u(),{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},Sw=m([`min`,`low`,`normal`,`high`]),Cw=i({id:g().min(1),title:g().min(1),uri:o().optional(),destructive:v().optional()}),ww=i({image:v(),priority:v(),data:v(),actions:v(),recipients:v()}),Tw=i({lastSentAt:a(),lastError:g().nullable(),queueDepth:a().int().nonnegative(),supports:ww}),Ew=i({deviceId:a().int().nonnegative(),title:g().optional(),body:g().min(1),image:g().optional(),priority:Sw.optional(),channel:g().optional(),recipients:p(g()).optional(),actions:p(Cw).optional(),data:n(g(),u()).optional()}),Dw=i({notificationId:g(),acceptedAt:a()}),Ow={name:`notifier`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Notifier],methods:{send:w(Ew,Dw,{kind:`mutation`,auth:`admin`}),cancel:w(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:Tw,kind:`command-driven`},runtimeState:Tw,durability:`session`},kw=i({value:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional(),lastFetchedAt:a()}),Aw={name:`numeric-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:kw,kind:`push`},runtimeState:kw,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},jw=m([`text`,`timestamp`,`watermark`]),Mw=m([`top-left`,`top-center`,`top-right`,`bottom-left`,`bottom-center`,`bottom-right`,`custom`]),Nw=i({id:g(),kind:jw,enabled:v(),text:g().optional(),position:Mw.optional(),availablePositions:p(Mw).readonly(),readOnly:v().optional()}),Pw=i({overlays:p(Nw).readonly()}),Fw=i({enabled:v().optional(),text:g().optional(),position:Mw.optional()}).partial(),Iw={name:`osd`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera],methods:{setOverlay:w(i({deviceId:a(),overlayId:g(),patch:Fw}),h(),{kind:`mutation`,auth:`admin`})},events:{onStatusChanged:{data:i({deviceId:a(),status:Pw})}},status:{schema:Pw,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}}}]}},Lw=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`])})]),Rw=i({enabled:v().default(!0),source:Lw,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:vm.optional(),conditions:jm.optional(),fallbackText:g().max(64).default(``)}),zw=i({slotId:g(),kind:jw,readOnly:v(),cameraEnabled:v(),cameraText:g().optional(),binding:Rw.nullable()}),Bw=m([`written`,`unchanged`,`gated`,`unreadable`,`disabled`,`unbound`,`failed`]),Vw=i({slotId:g(),outcome:Bw,text:g(),reason:g().optional()}),Hw=m([`number`,`boolean`,`string`,`enum`]),Uw=i({deviceId:a().int(),deviceName:g(),capName:g(),valuePath:g(),label:g(),valueType:Hw,enumValues:p(g()).readonly().optional()}),Ww={name:`osd-manager`,scope:`system`,mode:`singleton`,methods:{getDeviceOsd:w(i({deviceId:a().int()}),i({supported:v(),slots:p(zw)}),{auth:`admin`}),getSourceCatalog:w(i({deviceId:a().int()}),i({sources:p(Uw)}),{auth:`admin`}),getConditionSupport:w(i({}),i({supported:p(g()),catalog:p(qm)}),{auth:`admin`}),setSlotBinding:w(i({deviceId:a().int(),slotId:g().min(1),binding:Rw}),i({slot:zw,render:Vw}),{kind:`mutation`,auth:`admin`}),clearSlotBinding:w(i({deviceId:a().int(),slotId:g().min(1)}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),copyDeviceConfiguration:w(i({sourceDeviceId:a().int(),targetDeviceId:a().int()}),i({copied:a().int().nonnegative(),skipped:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),previewSlot:w(i({deviceId:a().int(),slotId:g().min(1),binding:Rw.optional()}),Vw,{kind:`mutation`,auth:`admin`}),renderDevice:w(i({deviceId:a().int()}),i({results:p(Vw)}),{kind:`mutation`,auth:`admin`})}},Gw=4,Kw=200,qw=m([`normal`,`offline`,`on_batteries`]),Jw=a().int().min(4).max(200),Yw=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:qw.nullable(),error:g().nullable(),errorCode:a().nullable(),isDualHopper:v(),childLock:v(),indicatorLight:v(),feedSound:v(),volume:a(),lastFetchedAt:a()}),Xw={name:`pet-feeder`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.PetFeeder],methods:{feed:w(i({deviceId:a().int().nonnegative(),grams:Jw.optional(),hopper1:Jw.optional(),hopper2:Jw.optional()}),h(),{kind:`mutation`,auth:`admin`}),cancelFeed:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),resetDesiccant:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),markFoodReplenished:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),callPet:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),playSound:w(i({deviceId:a().int().nonnegative(),soundId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),setChildLock:w(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`}),setIndicatorLight:w(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`}),setFeedSound:w(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`}),setVolume:w(i({deviceId:a().int().nonnegative(),level:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:Yw,kind:`poll`},runtimeState:Yw,durability:`session`},Zw=i({id:g(),name:g(),sampleCount:a().int().nonnegative(),coverMediaKey:g().optional(),coverBase64:g().optional()}),Qw=i({id:g(),text:g(),score:a(),addedAt:a().int(),deviceId:a().int().optional(),base64:g().optional()}),$w=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:V.optional(),keyFrameMediaKey:g().optional(),base64:g().optional(),cropUrl:g().optional()}),eT=i({key:g(),kind:g(),base64:g(),sizeBytes:a(),timestamp:a()}),tT=i({plateIds:p(g()).readonly(),representativePlateId:g(),representativeText:g(),size:a().int(),cohesion:a()}),nT={name:`plate-gallery`,scope:`system`,mode:`singleton`,methods:{listPlates:w(i({deviceId:a().int().optional(),limit:a().int().positive().optional(),includeCrops:v().optional()}).optional(),p($w).readonly()),getPlateByTrack:w(i({deviceId:a().int(),trackId:g()}),$w.nullable()),getPlateMedia:w(i({plateId:g()}),p(eT).readonly()),searchPlates:w(i({text:g().min(1),maxDistance:a().int().min(0).optional(),limit:a().int().positive().optional(),includeCrops:v().optional()}),p($w).readonly()),suggestPlateClusters:w(i({maxDistance:a().int().min(0).optional(),minClusterSize:a().int().min(2).optional(),limit:a().int().positive().optional()}).optional(),p(tT).readonly()),correctPlateText:w(i({plateId:g(),text:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),deletePlate:w(i({plateId:g()}),h(),{kind:`mutation`,auth:`admin`}),listVehicles:w(i({includeCrops:v().optional()}).optional(),p(Zw).readonly()),createVehicle:w(i({name:g().min(1)}),Zw,{kind:`mutation`,auth:`admin`}),renameVehicle:w(i({id:g(),name:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),deleteVehicle:w(i({id:g()}),h(),{kind:`mutation`,auth:`admin`}),listVehicleSamples:w(i({vehicleId:g()}),p(Qw).readonly()),removeVehicleSample:w(i({vehicleId:g(),sampleId:g()}),h(),{kind:`mutation`,auth:`admin`}),assignPlate:w(i({plateId:g(),vehicleId:g()}),h(),{kind:`mutation`,auth:`admin`}),unassignPlate:w(i({plateId:g()}),h(),{kind:`mutation`,auth:`admin`}),assignPlates:w(i({plateIds:p(g()).min(1),vehicleId:g()}),i({assigned:a().int(),failed:p(g()).readonly()}),{kind:`mutation`,auth:`admin`}),unassignPlates:w(i({plateIds:p(g()).min(1)}),i({unassigned:a().int(),failed:p(g()).readonly()}),{kind:`mutation`,auth:`admin`})}},rT=m(qa),iT=m([`videotoolbox`,`cuda`,`nvdec`,`vaapi`,`qsv`,`d3d11va`,`dxva2`,`amf`,`vdpau`,`drm`,`coreml`,`tensorrt`,`openvino`,`directml`,`webgpu`,`none`]).nullable().optional(),aT=i({preferred:p(g()).readonly(),rationale:g()}),oT=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:oT,codec:m([`H264`,`H265`]),family:m([`videotoolbox`,`vaapi`,`nvenc`,`qsv`,`amf`,`software`]),available:v(),reason:g().optional()})).readonly(),defaultH264:oT,defaultH265:oT,probedAt:a()}),i({methods:p(g()).readonly(),probedAt:a()});var sT=m([`darwin`,`linux`,`win32`]),cT=m([`arm64`,`x64`]),lT=i({type:m([`nvidia`,`amd`,`intel`,`apple`]),name:g(),memoryMB:a().optional()}),uT=i({type:m([`apple-ane`,`intel-npu`])}),dT=i({type:y(`coral-edgetpu`),bus:g().optional()}),fT=i({platform:sT,arch:cT,cpuModel:g(),cpuCores:a(),totalRAM_MB:a(),availableRAM_MB:a(),gpu:lT.nullable(),npu:uT.nullable(),coral:dT.nullable().optional()}),pT=i({runtime:m([`node`,`python`]),backend:g(),format:m([`onnx`,`coreml`,`openvino`,`tflite`]),score:a(),reason:g(),available:v()}),mT=i({key:g(),backend:g(),device:g(),format:rT,runtime:y(`python`),score:a(),available:v()}),hT=i({hardware:fT,scores:p(pT).readonly(),bestScore:pT,pythonPath:g().nullable(),devices:p(mT).readonly()}),gT=i({modelId:g(),name:g(),minRAM_MB:a(),accuracyScore:a(),formats:p(g()).readonly()}),_T=i({modelId:g(),runtime:m([`node`,`python`]),backend:g(),format:rT,reason:g()}),vT={name:`platform-probe`,scope:`system`,mode:`singleton`,methods:{getCapabilities:w(h(),hT),getHardware:w(h(),fT),resolveInferenceConfig:w(i({requirements:p(gT).readonly()}),_T),resolveHwAccel:w(i({prefer:iT}),aT)}},yT=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()}),bT={name:`power-meter`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:yT,kind:`push`},runtimeState:yT,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},xT=i({latitude:a().min(-90).max(90),longitude:a().min(-180).max(180),accuracyMeters:a().nonnegative()}),ST=i({state:g(),location:g().nullable(),gps:xT.nullable(),batteryPercent:a().min(0).max(100).nullable(),lastChangedAt:a()}),CT={name:`presence`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Presence],methods:{},status:{schema:ST,kind:`push`},runtimeState:ST,durability:`restored`,volatileStateFields:[`lastChangedAt`]},wT=i({hpa:a(),lastFetchedAt:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional()}),TT={name:`pressure-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:wT,kind:`push`},runtimeState:wT,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},ET=b(`kind`,[em,tm]),DT=i({id:a(),enabled:v(),shape:ET}),OT=i({enabled:v(),regions:p(DT),audioEnabled:v().nullable(),lastFetchedAt:a()}),kT=i({maxRegions:a(),supportedShapes:p(am),polygonVertices:om.optional(),supportsAudioMute:v()}),AT=i({enabled:v().optional(),regions:p(DT).optional()}),jT={name:`privacy-mask`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/privacy-mask-grid`,tab:`image`,label:`Privacy Mask`}},methods:{getOptions:w(i({deviceId:a()}),kT),setMask:w(i({deviceId:a(),patch:AT}),h(),{kind:`mutation`,auth:`admin`}),setAudioEnabled:w(i({deviceId:a(),enabled:v()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:OT,kind:`poll`},runtimeState:OT,durability:`restored`,volatileStateFields:[`lastFetchedAt`]};function MT(e){return e.length===0?null:e.some(e=>e.audioEnabled)}var NT=i({id:g(),name:g()}),PT=i({pan:a(),tilt:a(),zoom:a()}),FT=i({pan:a().optional(),tilt:a().optional(),zoom:a().optional(),speed:a().optional()}),IT=PT.extend({autofocus:v()}),LT=i({hasPan:v(),hasTilt:v(),hasZoom:v(),supportsPresets:v(),maxPresets:a().optional(),hasAutofocus:v()}),RT={name:`ptz`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/ptz-panel`,tab:`ptz`,topTab:!0,label:`PTZ`,order:0}},methods:{move:w(FT.extend({deviceId:a()}),h(),{kind:`mutation`}),continuousMove:w(FT.extend({deviceId:a()}),h(),{kind:`mutation`}),stop:w(i({deviceId:a()}),h(),{kind:`mutation`}),getPresets:w(i({deviceId:a()}),p(NT)),goToPreset:w(i({deviceId:a(),presetId:g()}),h(),{kind:`mutation`}),savePreset:w(i({deviceId:a(),presetId:g(),name:g()}),h(),{kind:`mutation`,auth:`admin`}),deletePreset:w(i({deviceId:a(),presetId:g()}),h(),{kind:`mutation`,auth:`admin`}),getOptions:w(i({deviceId:a()}),LT),goHome:w(i({deviceId:a()}),h(),{kind:`mutation`}),getPosition:w(i({deviceId:a()}),PT),setAutofocus:w(i({deviceId:a(),enabled:v()}),h(),{kind:`mutation`})},status:{schema:IT,kind:`command-driven`}},zT=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)}),BT=i({value:g(),label:g()}),VT=i({enabled:v(),lastChangedAt:a(),currentSettings:zT.nullable(),supportedTargetTypes:p(BT)}),HT=VT.extend({lastFetchedAt:a()}),UT={name:`ptz-autotrack`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/ptz-autotrack`,tab:`ptz`,topTab:!0,label:`Auto-Tracking`,order:5}},methods:{getStatus:w(i({deviceId:a()}),VT),setEnabled:w(i({deviceId:a(),enabled:v()}),h(),{kind:`mutation`}),getSettings:w(i({deviceId:a()}),zT.nullable()),setSettings:w(i({deviceId:a(),settings:zT.partial()}),h(),{kind:`mutation`})},events:{onStatusChanged:{data:i({deviceId:a(),status:VT})}},status:{schema:VT,kind:`command-driven`},runtimeState:HT,durability:`session`},WT={name:`reboot`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera,E.Sensor,E.Switch],methods:{reboot:w(i({deviceId:a().int().nonnegative()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`})}},GT=i({deviceId:a(),enabled:v(),activeMode:m([`off`,`continuous`,`events`]),nodeId:g(),storageBytes:a()}),KT=i({profile:g(),startMs:a(),endMs:a()}),qT=i({deviceId:a(),ranges:p(KT)}),JT=i({deviceId:a(),days:p(a())}),YT=i({deviceId:a(),localMasterPath:g().nullable(),playbackUrl:g().nullable(),playbackEndpoints:p(g())}),XT=i({deviceId:a(),usedBytes:a(),oldestMs:a().nullable().optional()}),ZT=i({locationId:g().nullable(),locationIds:p(g()).optional(),root:g().optional(),usedBytes:a(),availableBytes:a().nullable(),totalBytes:a().nullable()}),QT=i({nodeId:g(),totalUsedBytes:a(),devices:p(XT),locations:p(ZT).optional()}),$T=i({deviceId:a(),profile:g(),fromLocationId:g(),toLocationId:g(),bytes:a(),files:a().int()}),eE=m([`unassigned`,`target-not-writable`,`below-threshold`,`no-headroom`]),tE=i({deviceId:a(),profile:g(),fromLocationId:g(),toLocationId:g().nullable(),bytes:a(),reason:eE}),nE=i({moves:p($T),skipped:p(tE),bytesToMove:a(),jobIds:p(g())}),rE=i({throttleMbps:a().min(1).max(1e3).optional(),minMoveGb:a().min(0).optional()}),iE=b(`kind`,[i({kind:y(`segment`),startMs:a(),durMs:a(),bytes:a()}),i({kind:y(`gap`),nearestEdgeMs:a().nullable(),prevEndMs:a().nullable().optional()})]),aE=i({data:_(Uint8Array)}),oE=i({data:_(Uint8Array),gopStartMs:a(),gopDurMs:a()}),sE=b(`kind`,[i({kind:y(`ok`),data:_(Uint8Array),gopStartMs:a(),gopDurMs:a(),reachesRequestedEnd:v()}),i({kind:y(`spans-multiple-segments`),segmentEndMs:a()})]),cE={name:`recording`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,status:{schema:GT,kind:`command-driven`},methods:{getAvailability:w(i({deviceId:a(),fromMs:a(),toMs:a()}),qT,{kind:`query`,auth:`protected`}),getDaysWithRecordings:w(i({deviceId:a(),fromMs:a(),toMs:a(),tzOffsetMinutes:a()}),JT,{kind:`query`,auth:`protected`}),getPlaybackManifest:w(i({deviceId:a(),fromMs:a(),toMs:a()}),YT,{kind:`query`,auth:`protected`}),getStorageUsage:w(i({}),QT,{kind:`query`,auth:`admin`}),getDeviceConfig:w(i({deviceId:a()}),Vi,{kind:`query`,auth:`admin`}),locateSegment:w(i({deviceId:a(),profile:g(),epochMs:a()}),iE,{kind:`query`,auth:`admin`}),readSegmentBytes:w(i({deviceId:a(),profile:g(),startMs:a()}),aE,{kind:`query`,auth:`admin`}),readGopBytes:w(i({deviceId:a(),profile:g(),startMs:a(),epochMs:a()}),oE,{kind:`query`,auth:`admin`}),readWindowBytes:w(i({deviceId:a(),profile:g(),startMs:a(),fromMs:a(),toMs:a()}),sE,{kind:`query`,auth:`admin`}),setDeviceConfig:w(i({deviceId:a(),config:Vi}),Vi,{kind:`mutation`,auth:`admin`}),rescanStorage:w(i({deviceId:a()}),GT,{kind:`mutation`,auth:`admin`}),pruneFootage:w(i({deviceId:a(),reason:_i.optional()}),i({floorMs:a().nullable(),deletedBuckets:a().int(),reclaimedBytes:a().int()}),{kind:`mutation`,auth:`admin`}),deleteFootprint:w(i({deviceId:a(),fromMs:a().optional(),toMs:a().optional()}),i({deletedBuckets:a().int(),reclaimedBytes:a().int()}),{kind:`mutation`,auth:`admin`}),listOpsLog:w(yi,p(vi).readonly(),{kind:`query`,auth:`admin`}),renderGif:w(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:w(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:w(A,i({paused:y(!0)}),{kind:`mutation`,auth:`admin`}),resumeForStorageMigration:w(A,i({resumed:y(!0)}),{kind:`mutation`,auth:`admin`}),refreshStorageLocationsForMigration:w(A,i({refreshed:y(!0)}),{kind:`mutation`,auth:`admin`}),startStorageMigrationMove:w(Yi,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),getStorageMigrationMoveStatus:w(i({jobId:g()}),Ki.nullable(),{auth:`admin`}),cancelStorageMigrationMove:w(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),relocateFootage:w(Ji,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),listRelocateJobs:w(i({}),p(Ki).readonly(),{kind:`query`,auth:`admin`}),cancelRelocateJob:w(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),planStorageRebalance:w(rE,nE,{kind:`query`,auth:`admin`}),startStorageRebalance:w(rE,nE,{kind:`mutation`,auth:`admin`})}},lE=a().min(.25).max(32),uE=i({fromSec:a().nonnegative(),toSec:a().nonnegative()}).refine(e=>e.toSec>e.fromSec,{message:`dense range must have toSec > fromSec`}),dE=200,fE=i({everyMs:a().int().positive(),ranges:p(uE).min(1).max(200)}),pE=i({everyMs:a().int().positive(),outputFps:a().int().min(1).max(60).optional(),dense:fE.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`]})}),mE=i({speed:lE.optional(),timelapse:pE.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`]})}),hE=m([`queued`,`rendering`,`ready`,`failed`,`expired`,`deleted`]),gE=i({id:g(),deviceId:a(),profile:g(),fromMs:a(),toMs:a(),options:mE,state:hE,progressPct:a().nullable(),fileBytes:a().nullable(),expiresAt:a(),deleteAfterDownload:v(),downloadedAt:a().nullable(),createdAt:a(),createdBy:g(),error:g().nullable()}),_E=i({url:g(),endpoints:p(g())}),vE=50*1024*1024,yE=i({base64:g(),contentType:g(),name:g(),bytes:a().int().nonnegative()}),bE={name:`recording-export`,scope:`system`,mode:`singleton`,methods:{createExport:w(i({deviceId:a(),profile:g().optional(),profiles:p(g()).min(1).optional(),fromMs:a(),toMs:a(),options:mE}).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`]})}),gE,{kind:`mutation`,auth:`protected`}),listExports:w(i({deviceId:a().optional()}),p(gE),{kind:`query`,auth:`protected`}),getExport:w(i({exportId:g()}),gE,{kind:`query`,auth:`protected`}),cancelExport:w(i({exportId:g()}),gE,{kind:`mutation`,auth:`protected`}),deleteExport:w(i({exportId:g()}),gE,{kind:`mutation`,auth:`protected`}),getDownloadUrl:w(i({exportId:g()}),_E,{kind:`query`,auth:`protected`}),readExportBytes:w(i({exportId:g()}),yE,{kind:`query`,auth:`protected`})}},xE=g(),SE=[`day`,`ir`,`night`,`dawn`,`dusk`],CE=m([`skip`,`judge-anyway`]),wE=`__diverged__`,TE=m([`matched`,`diverged`,`unknown`]),EE=m([`no-reference-for-condition`,`view-shifted`,`no-vision-profile`,`encoder-model-changed`,`no-snapshot`]),DE=i({embedding:p(a()),modelId:g(),condition:xE,capturedAt:a(),thumbnailMediaId:g().optional(),anchorEmbedding:p(a()).optional()}),OE=i({id:g(),label:g(),references:p(DE),textPrompts:p(g()).optional(),referenceCount:a(),currentlyMatched:v()}),kE=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()})]),AE=60,jE=120,ME=60,NE=.85,PE=`skip`,FE=8e3,IE=448,LE=!0,RE=i({enabled:v().default(!1),prompt:g().min(1).max(1e3),profileId:g().optional(),timeoutMs:a().int().min(1e3).max(2e4).default(FE),maxImagePx:a().int().min(64).max(2048).default(448),onTimeout:m([`flip`,`hold`]).default(`hold`)}),zE=i({id:g(),label:g(),roi:em,enabled:v(),triggerMode:m([`periodic`,`on-motion`,`both`]),checkIntervalSec:a().optional(),check:kE,states:p(OE),currentStateId:g().nullable(),lastCheckedAt:a().nullable(),lastConfidence:a().nullable(),currentCondition:xE.nullable(),availability:m([`ok`,`unavailable`]),unavailableReason:g().nullable(),baselineStateId:g().nullable(),emit:m([`latched`,`live`]).default(`latched`),verdict:TE,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:RE.optional(),anchorThreshold:a().min(0).max(1).default(NE),autoRestore:v().default(!1),onUncoveredCondition:CE.default(PE),suspendedCondition:xE.nullable().default(null),unavailable:EE.nullable(),coveredConditions:p(xE)}),BE=i({monitors:p(zE),lastFetchedAt:a()}),VE={name:`scene-monitor`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[E.Camera],methods:{listScenes:w(i({deviceId:a()}),BE),createScene:w(i({deviceId:a(),label:g(),roi:em,check:kE,triggerMode:m([`periodic`,`on-motion`,`both`]).optional(),checkIntervalSec:a().optional()}),zE,{kind:`mutation`,auth:`admin`}),updateScene:w(i({deviceId:a(),monitorId:g(),patch:i({label:g().optional(),roi:em.optional(),enabled:v().optional(),triggerMode:m([`periodic`,`on-motion`,`both`]).optional(),checkIntervalSec:a().optional(),check:kE.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:CE.optional(),confirm:RE.nullable().optional()})}),h(),{kind:`mutation`,auth:`admin`}),deleteScene:w(i({deviceId:a(),monitorId:g()}),h(),{kind:`mutation`,auth:`admin`}),captureReference:w(i({deviceId:a(),monitorId:g(),stateId:g().optional(),label:g().optional(),condition:xE.optional()}),i({stateId:g(),referenceCount:a()}),{kind:`mutation`,auth:`admin`}),deleteReference:w(i({deviceId:a(),monitorId:g(),stateId:g(),index:a()}),h(),{kind:`mutation`,auth:`admin`}),recheckNow:w(i({deviceId:a(),monitorId:g()}),h(),{kind:`mutation`,auth:`admin`}),resetScene:w(i({deviceId:a(),monitorId:g(),recapture:v().optional()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:BE,kind:`push`},runtimeState:BE,durability:`session`},HE=i({isRunning:v(),lastRunAt:a(),lastRunSuccess:v().nullable(),lastError:g().nullable(),lastChangedAt:a()}),UE={name:`script-runner`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Script],methods:{run:w(i({deviceId:a().int().nonnegative(),variables:n(g(),u()).optional()}),h(),{kind:`mutation`,auth:`admin`}),stop:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:HE,kind:`push`},runtimeState:HE,durability:`session`},WE=i({detected:v(),lastChangedAt:a()}),GE={name:`smoke`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:WE,kind:`push`},runtimeState:WE,durability:`restored`,volatileStateFields:[`lastChangedAt`]},KE=i({camStreamId:g().min(1),kind:He,url:g().optional(),codec:g().optional(),resolution:Ue.optional(),fps:a().positive().optional(),label:g().optional(),deviceFeatures:p(g()).optional(),autoEligible:v().optional(),metadata:n(g(),u()).optional()}),qE=i({descriptors:p(KE),lastFetchedAt:a()}),JE={name:`stream-catalog`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera],methods:{getCatalog:w(i({deviceId:a().int().nonnegative()}),p(KE).readonly())},runtimeState:qE,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},YE=m([`main`,`sub`,`ext`]),XE=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()}),ZE=i({main:XE.optional(),sub:XE.optional(),ext:XE.optional(),lastFetchedAt:a()}),QE=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()}),$E=i({main:QE.optional(),sub:QE.optional(),ext:QE.optional()}),eD=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()}),tD={name:`stream-params`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`stream-params`,tab:`streaming`}},methods:{getOptions:w(i({deviceId:a()}),$E),setProfile:w(i({deviceId:a(),profile:YE,patch:eD}),h(),{kind:`mutation`,auth:`admin`}),getConfigSchema:w(i({deviceId:a()}),u().nullable())},status:{schema:ZE,kind:`poll`},runtimeState:ZE,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},nD=[{profile:`main`,prefix:`streamMain`,label:`Main stream`},{profile:`sub`,prefix:`streamSub`,label:`Sub stream`},{profile:`ext`,prefix:`streamExt`,label:`Third stream`}];function rD(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 iD(e,t){let n=[];for(let r of nD){let i=e[r.profile];if(!i)continue;let a=rD(r,i,t?.[r.profile]);a&&n.push(a)}return n.length===0?null:{sections:n}}function aD(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 oD=i({on:v(),lastChangedAt:a()}),sD={name:`switch`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Switch,E.Siren,E.Light],methods:{setState:w(i({deviceId:a(),on:v()}),h(),{kind:`mutation`,auth:`admin`})},events:{onStateChanged:{data:i({deviceId:a(),on:v(),lastChangedAt:a()})}},status:{schema:oD,kind:`command-driven`},runtimeState:oD,durability:`restored`,volatileStateFields:[`lastChangedAt`],settings:{bindings:[{kind:`scalar`,statusPath:`on`,method:`setState`,valueArg:`on`,field:{label:`On`,kind:`boolean`}}]}},cD=i({streaming:v(),notifications:v(),objectDetection:v(),remoteAccess:v(),agentCluster:v(),smartHome:v(),recordings:v(),backup:v(),repl:v()}),lD=i({status:y(`ok`),uptime:a()}),uD=i({name:g(),address:g(),family:g(),internal:v()}),dD=m([`operator-set`,`derived-from-ip`]),fD=i({latitude:a().min(-90).max(90),longitude:a().min(-180).max(180),source:dD,updatedAt:a(),label:g().optional()}),pD=i({location:fD.nullable(),derivationAttemptedAt:a().nullable(),derivationError:g().nullable()}),mD=i({latitude:a().min(-90).max(90),longitude:a().min(-180).max(180)}).nullable(),hD=m([`http`,`ws`,`mesh`,`unknown`]),gD=i({http:a(),ws:a(),mesh:a(),unknown:a()}),_D=i({plane:hD,procedure:g(),userAgent:g(),ip:g(),principal:g(),calls:a(),subscriptions:a(),perMin:a()}),vD=i({procedure:g(),calls:a(),planes:gD,subscriptions:a(),perMin:a()}),yD=i({armed:v(),elapsedMs:a(),windowMs:a(),armedUntilMs:a(),httpRequests:a(),batchedRequests:a(),procedureCalls:a(),planes:gD,planesExplainTotal:v(),wsConnections:a(),wsMessages:a(),subscriptions:a(),subscriptionStops:a(),distinctGroups:a(),unattributedCalls:a(),procedures:p(vD).readonly(),groups:p(_D).readonly()}),bD=yD.extend({persisted:v()}),xD=m([`debug`,`info`,`warn`,`error`]),SD=m([`request-census`]),CD=m([`cluster`,`node`,`component`]),wD=m([`default`,`cluster`,`node`,`component`]),TD=i({scope:CD,nodeId:g().nullable(),component:g().nullable(),level:xD.nullable()}),ED=i({level:xD,levelSource:wD}),DD=i({layers:p(TD).readonly()}),OD=i({id:SD,armed:v(),armedUntilMs:a(),remainingMs:a(),persisted:v()}),kD=i({id:SD,armMs:a().int().min(0),reportEveryMs:a().int().positive().optional()}),AD=i({channel:g(),armed:v(),armedUntilMs:a(),remainingMs:a(),deviceIds:p(a().int()).readonly().nullable()}),jD=i({channel:g().min(1),armMs:a().int().min(0),deviceIds:p(a().int()).readonly().nullable().optional()}),MD=i({level:xD.nullable().optional(),diagnostics:p(kD).readonly().optional(),channels:p(jD).readonly().optional()}),ND=lf.extend({addonId:g()}),PD=af.extend({addonId:g()}),FD=i({scopeNodeId:g().optional(),scopeComponent:g().optional()}),ID=i({scopeNodeId:g().optional(),scopeComponent:g().optional(),patch:MD}),LD=i({scopeNodeId:g().nullable(),scopeComponent:g().nullable(),effective:ED,explicit:DD,activeWindows:p(OD).readonly(),channels:p(ai).readonly(),activeChannels:p(AD).readonly(),persisted:v()}),RD={name:`system`,scope:`system`,mode:`singleton`,methods:{info:w(h(),cD),health:w(h(),lD),featureFlags:w(h(),cD),networkAddresses:w(h(),p(uD).readonly()),getRetentionConfig:w(h(),u().nullable(),{auth:`admin`}),setRetentionConfig:w(n(g(),u()),ce(),{kind:`mutation`,auth:`admin`}),forceRetentionCleanup:w(h(),h(),{kind:`mutation`,auth:`admin`}),getSiteLocation:w(h(),pD),setSiteLocation:w(mD,pD,{kind:`mutation`,auth:`admin`}),detectSiteLocation:w(h(),pD,{kind:`mutation`,auth:`admin`}),getRequestCensus:w(h(),bD,{auth:`admin`}),getLoadContributions:w(h(),p(ND).readonly(),{auth:`admin`}),getFailureContributions:w(h(),p(PD).readonly(),{auth:`admin`}),getLoggingSettings:w(FD,LD,{auth:`admin`}),setLoggingSettings:w(ID,LD,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},zD=i({tampered:v(),lastChangedAt:a()}),BD={name:`tamper`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:zD,kind:`push`},runtimeState:zD,durability:`restored`,volatileStateFields:[`lastChangedAt`]},VD=i({celsius:a(),lastFetchedAt:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional()}),HD={name:`temperature-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor,E.Thermostat],methods:{},status:{schema:VD,kind:`push`},runtimeState:VD,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},UD=i({title:g(),message:g(),severity:m([`info`,`warning`,`critical`]),duration:a().optional(),action:i({label:g(),url:g()}).optional()}),WD={name:`toast`,scope:`system`,mode:`singleton`,methods:{onToast:w(h(),UD,{kind:`subscription`})},mount:{kind:`server-provided`}},GD=i({currentVersion:g().nullable(),availableVersion:g().nullable(),updatable:v(),state:g().nullable(),inProgress:v()}),KD={name:`update`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Update],methods:{installUpdate:w(h(),h(),{kind:`mutation`,auth:`admin`})},status:{schema:GD,kind:`poll`},runtimeState:GD,durability:`session`},qD=i({id:g(),username:g(),isAdmin:v().default(!1),allowedProviders:c([p(g()),y(`*`)]),allowedDevices:n(g(),c([p(g()),y(`*`)])),scopes:p(q).default([]),totpEnabled:v().default(!1),createdAt:a(),updatedAt:a()}),JD=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(q).optional()}),YD=i({id:g(),isAdmin:v().optional(),allowedProviders:c([p(g()),y(`*`)]).optional(),allowedDevices:n(g(),c([p(g()),y(`*`)])).optional(),scopes:p(q).optional()}),XD=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()}),ZD=i({label:g(),isAdmin:v().default(!1),allowedProviders:c([p(g()),y(`*`)]).optional(),allowedDevices:n(g(),c([p(g()),y(`*`)])).optional()}),QD=i({token:g(),record:XD}),$D=i({id:g(),userId:g(),name:g(),tokenPrefix:g(),scopes:p(q),expiresAt:a().nullish(),lastUsedAt:a().nullish(),createdAt:a()}),eO=i({userId:g(),name:g(),scopes:p(q),expiresAt:a().optional()}),tO=i({token:g(),record:$D}),nO=i({id:g(),userId:g(),username:g(),integrationId:g(),scopes:p(q),createdAt:a(),lastUsedAt:a(),revokedAt:a().nullable()}),rO=i({secret:g(),otpauthUrl:g()}),iO=i({enabled:v(),confirmedAt:a().nullable()}),aO={name:`user-management`,scope:`system`,mode:`singleton`,methods:{listUsers:w(h(),p(qD),{auth:`admin`}),createUser:w(JD,qD,{kind:`mutation`,auth:`admin`,access:`create`}),updateUser:w(YD,i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),deleteUser:w(i({id:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),resetPassword:w(i({id:g(),newPassword:g().min(6)}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),setUserScopes:w(i({userId:g(),scopes:p(q)}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),validateCredentials:w(i({username:g(),password:g()}),qD.extend({passwordHash:g()}).nullable(),{kind:`mutation`,access:`view`}),listApiKeys:w(h(),p(XD),{auth:`admin`}),createApiKey:w(ZD,QD,{kind:`mutation`,auth:`admin`,access:`create`}),revokeApiKey:w(i({id:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),validateApiKey:w(i({token:g()}),XD.nullable(),{kind:`mutation`,access:`view`}),createScopedToken:w(eO,tO,{kind:`mutation`,auth:`admin`,access:`create`}),revokeScopedToken:w(i({id:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),validateScopedToken:w(i({token:g()}),$D.nullable(),{access:`view`}),listScopedTokens:w(i({userId:g()}),p($D),{auth:`admin`}),setupTotp:w(i({userId:g()}),rO,{kind:`mutation`,auth:`admin`,access:`create`}),confirmTotp:w(i({userId:g(),code:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),disableTotp:w(i({userId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),getTotpStatus:w(i({userId:g()}),iO,{auth:`admin`}),verifyTotp:w(i({userId:g(),code:g()}),i({valid:v()}),{kind:`mutation`,access:`view`}),oauthIssueCode:w(i({integrationId:g(),userId:g(),username:g(),scopes:p(q),redirectUri:g(),hubUrl:g(),codeChallenge:g().optional(),refreshTtlSec:c([a().int().positive(),y(`never`)]).optional()}),i({code:g()}),{kind:`mutation`,access:`create`}),oauthExchangeCode:w(i({code:g(),redirectUri:g(),codeVerifier:g().optional()}),i({accessToken:g(),refreshToken:g(),expiresIn:a()}).nullable(),{kind:`mutation`,access:`view`}),oauthRefresh:w(i({refreshToken:g()}),i({accessToken:g(),refreshToken:g(),expiresIn:a()}).nullable(),{kind:`mutation`,access:`view`}),oauthVerifyAccessToken:w(i({token:g()}),i({userId:g(),username:g(),scopes:p(q)}).nullable(),{access:`view`}),listOauthSessions:w(h(),p(nO),{auth:`admin`}),revokeOauthSession:w(i({id:g()}),i({success:v()}),{kind:`mutation`,auth:`admin`,access:`delete`})}},oO=m([`idle`,`cleaning`,`paused`,`returning`,`docked`,`drying`,`error`]),sO=i({level:a().min(0).max(100).nullable(),status:m([`ok`,`low`,`full`]).nullable()}),cO=i({state:oO,batteryLevel:a().min(0).max(100).nullable(),fanSpeed:g().nullable(),availableFanSpeeds:p(g()),cleanWater:sO.nullable(),dirtyWater:sO.nullable(),detergent:sO.nullable(),dustBin:sO.nullable(),progressPercent:a().min(0).max(100).nullable(),errorCode:a().nullable(),errorLabel:g().nullable(),lastChangedAt:a()}),lO={name:`vacuum-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Vacuum],methods:{start:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),pause:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),stop:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),returnToBase:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),locate:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),setFanSpeed:w(i({deviceId:a().int().nonnegative(),speed:g().min(1)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:cO,kind:`push`},runtimeState:cO,durability:`session`},uO=m([`open`,`opening`,`closing`,`closed`,`stopped`]),dO=i({state:uO,position:a().min(0).max(100).nullable(),lastChangedAt:a()}),fO={name:`valve`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Valve],methods:{open:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),close:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),stop:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),setPosition:w(i({deviceId:a().int().nonnegative(),position:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:dO,kind:`push`},runtimeState:dO,durability:`session`},pO=i({detected:v(),lastChangedAt:a()}),mO={name:`vibration`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:pO,kind:`push`},runtimeState:pO,durability:`restored`,volatileStateFields:[`lastChangedAt`]},hO=i({currentTemp:a().nullable(),targetTemp:a().nullable(),operationMode:g().nullable(),availableModes:p(g()),away:v().nullable(),minTemp:a().nullable(),maxTemp:a().nullable(),lastChangedAt:a()}),gO={name:`water-heater`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.WaterHeater],methods:{setTargetTemp:w(i({deviceId:a().int().nonnegative(),temp:a().finite()}),h(),{kind:`mutation`,auth:`admin`}),setOperationMode:w(i({deviceId:a().int().nonnegative(),mode:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),setAway:w(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:hO,kind:`push`},runtimeState:hO,durability:`session`},_O=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()}),vO={name:`weather`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Weather],methods:{},status:{schema:_O,kind:`push`},runtimeState:_O,durability:`session`},yO=i({totalObjects:a().int().nonnegative(),byClass:n(g(),a().int().nonnegative())}),bO=yO.extend({zoneId:g(),zoneName:g(),trackIds:p(g()).readonly()}),xO=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()}),SO=i({ts:a().int(),frameWidth:a().int().nonnegative(),frameHeight:a().int().nonnegative(),zones:p(bO).readonly(),frame:yO,unzoned:yO,stationaryObjects:p(xO).readonly().optional()}),CO=m([`minute`,`5min`,`hour`]),wO=i({from:a().int(),to:a().int(),resolution:CO}),TO=i({ts:a().int(),count:a().int().nonnegative()}),EO={name:`zone-analytics`,scope:`device`,mode:`singleton`,deviceTypes:[E.Camera],methods:{getCurrentSnapshot:w(i({deviceId:a()}),SO.nullable()),getZoneHistory:w(i({deviceId:a(),zoneId:g(),className:g().optional()}).extend(wO.shape),p(TO).readonly()),getCameraHistory:w(i({deviceId:a(),className:g().optional()}).extend(wO.shape),p(TO).readonly()),getUnzonedHistory:w(i({deviceId:a(),className:g().optional()}).extend(wO.shape),p(TO).readonly())},runtimeState:SO,durability:`session`},DO=m([`motion`,`detection`,`package`]),OO={name:`zone-rules`,scope:`device`,mode:`singleton`,deviceTypes:[E.Camera],methods:{listRules:w(i({deviceId:a(),stage:DO}),p(X).readonly()),setRules:w(i({deviceId:a(),stage:DO,rules:p(X).readonly()}),h(),{kind:`mutation`,auth:`admin`})},runtimeState:i({motion:p(X).readonly(),detection:p(X).readonly(),package:p(X).readonly()}),durability:`restored`},kO=[`decoder`,`motion-detection`,`pipeline-executor`,`audio-analyzer`,`pipeline-analytics`,`notification-output`],AO=[...kO,`pipeline-orchestrator`,`pipeline-runner`],jO=[{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 MO(e){for(let t of jO){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 NO(e,t=[]){for(let n of jO){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 PO={contact:`entryOpen`,binary:`on`,switch:`on`,motion:`detected`,flood:`flooded`,gas:`detected`,smoke:`detected`,"carbon-monoxide":`detected`,vibration:`detected`,tamper:`tampered`},FO={contact:`lastChangedAt`,binary:`lastChangedAt`,switch:`lastChangedAt`,motion:`lastDetectedAt`,flood:`lastChangedAt`,gas:`lastChangedAt`,smoke:`lastChangedAt`,"carbon-monoxide":`lastChangedAt`,vibration:`lastChangedAt`,tamper:`lastChangedAt`},IO=Object.keys(PO),LO=[`sensor`,`switch`,`control`];function RO(e){return Object.prototype.hasOwnProperty.call(PO,e)}function zO(e,t){let n=PO[e];if(n===void 0)return null;let r=t[n];return typeof r==`boolean`?r:null}function BO(e,t){let n=FO[e];if(n===void 0)return null;let r=t[n];return typeof r!=`number`||!Number.isFinite(r)||r<=0?null:r}var VO=3e4;function HO(e){let t=zO(e.capName,e.slice);if(t===null)return{edge:`none`,value:null,reason:RO(e.capName)?`non-boolean-value`:`unknown-cap`};if(e.prior===void 0){if(!t)return{edge:`none`,value:t,reason:`baseline-seeded-inactive`};let n=BO(e.capName,e.slice),r=Math.max(e.startedAtMs,e.nowMs-e.firstSightingFreshnessMs);return n===null||n<r?{edge:`none`,value:t,reason:`baseline-seeded-stale-active`}:{edge:`rising`,value:!0}}return e.prior===t?{edge:`none`,value:t,reason:`no-change`}:t?{edge:`rising`,value:!0}:{edge:`none`,value:t,reason:`falling-edge`}}var UO=`camstack/camstack-models`,WO=`https://huggingface.co/${UO}/resolve/main`,GO=`30d`,KO={"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":`30d`},Z={Siren:D.Siren,Floodlight:D.Floodlight,Spotlight:D.Spotlight,PirSensor:D.PirSensor,Chime:D.Chime,Autotrack:D.Autotrack,Nightvision:D.Nightvision,PrivacyMask:D.PrivacyMask},qO={[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 JO(e,t,n){let r=`${e}:${t}`;return typeof n==`number`?`${r}:${n}`:r}var YO=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}))}},XO=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(ZO(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 ZO(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 QO={airQualitySensor:ax,alarmPanel:Qp,ambientLightSensor:sx,audioMetrics:fx,automationControl:mx,battery:gx,binary:vx,brightness:bx,cameraStreams:Cl,carbonMonoxide:Ex,climateControl:kx,color:Px,connectivity:Vx,consumables:Wx,contact:Kx,control:Xx,cover:$x,dayNight:aS,deviceDiscovery:yu,deviceStatus:sS,doorbell:uS,enumSensor:pS,eventEmitter:gS,fanControl:AS,featureProbe:MS,flood:PS,gas:IS,humidifier:RS,humiditySensor:BS,image:HS,imageSettings:ZS,intercom:uC,lawnMowerControl:mC,lockControl:AC,mediaPlayer:FC,motion:HC,motionTrigger:GC,motionZones:XC,nativeObjectDetection:tw,notifier:Ow,numericSensor:Aw,petFeeder:Xw,powerMeter:bT,presence:CT,pressureSensor:TT,privacyMask:jT,ptzAutotrack:UT,sceneMonitor:VE,scriptRunner:UE,smoke:GE,streamCatalog:JE,streamParams:tD,switch:sD,tamper:BD,temperatureSensor:HD,update:KD,vacuumControl:lO,valve:fO,vibration:mO,waterHeater:gO,weather:vO,zoneAnalytics:EO,zoneRules:OO,zones:cg},$O=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=QO[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=YO.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=XO.fromInitial(o,a),e.bindRuntimeState?.(this.runtimeState),e.registerNativeCap?.(sS,{});let s={online:!0,lastChangedAt:Date.now()};this.runtimeState.setCapState(`device-status`,s),e.registerNativeCap?.(MS,{}),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=hu(this.ctx.deviceMeta.metadata)??du({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=fu(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:{[mu]: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 ek(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 tk=class extends Fe{async onInitialize(){return this.ctx.logger.info(`${this.providerName} Provider initialized`),[{capability:Ju,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(E).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 ek(e,this.addonId)}},nk=360*6e4;function rk(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 ik(e){return e===`unreachable`}var ak=`fixed`;function ok(e){let t=e??`hub`;return t.includes(`/`)?t.split(`/`)[0]??`hub`:t}var sk=32,ck=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=ok(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:{[ak]:!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:{[ak]:!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}},lk={[E.Cover]:`cover`,[E.Valve]:`valve`,[E.Humidifier]:`humidifier`,[E.WaterHeater]:`water-heater`,[E.Camera]:`dummy`,[E.Hub]:`dummy`,[E.Switch]:`switch`,[E.Siren]:`switch`,[E.Light]:`light`,[E.Fan]:`fan`,[E.Sensor]:`sensor`,[E.Thermostat]:`thermostat`,[E.Climate]:`climate`,[E.Button]:`button`,[E.EventEmitter]:`dummy`,[E.Update]:`update`,[E.Generic]:`dummy`,[E.Notifier]:`dummy`,[E.Script]:`script`,[E.Automation]:`automation`,[E.Lock]:`lock`,[E.MediaPlayer]:`media-player`,[E.AlarmPanel]:`alarm`,[E.Control]:`control`,[E.Presence]:`sensor`,[E.Weather]:`weather`,[E.Vacuum]:`vacuum`,[E.LawnMower]:`lawn-mower`,[E.Container]:`dummy`,[E.Image]:`image`,[E.PetFeeder]:`pet-feeder`},uk=new Set(Object.values(E));function dk(e){return uk.has(e)?lk[e]:null}var fk=`motion-trigger`;function pk(e){return e.includes(fk)}var mk=[`temperature-sensor`,`humidity-sensor`,`ambient-light-sensor`,`numeric-sensor`,`enum-sensor`];function hk(e){let t=new Set(e.features);switch(e.type){case E.Cover:return{kind:`cover`};case E.Valve:return{kind:`valve`};case E.Lock:return{kind:`lock`};case E.AlarmPanel:return{kind:`alarm`};case E.Light:return t.has(`brightness`)?{kind:`brightness`}:{kind:`switch`};case E.Switch:case E.Siren:return{kind:`switch`};case E.Sensor:case E.Presence:{let e=mk.find(e=>t.has(e));return e?{kind:`sensor`,sensorFeature:e}:{kind:`none`}}default:return{kind:`none`}}}var gk={"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 _k(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function vk(e,t){if(!_k(e))return null;let n=e[t];if(!_k(n))return null;let r=n.mutate;return typeof r==`function`?r:null}function yk(e,t){return!e||e.length===0?!1:e.includes(t.when.hasFeature)}var bk={id:`battery`,label:`Battery-operated camera`,when:{hasFeature:Pt.BatteryOperated},defaults:{audioMode:`disabled`,detectionMode:`on-motion`},settings:{}},xk=[bk];function Sk(e){for(let t of xk)if(yk(e,t))return t;return null}function Ck(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function wk(e,t){let n=t.split(`.`),r=e;for(let e of n){if(!Ck(r))return;r=r[e]}return r}function Tk(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=Ck(o)?o:{};return{...e,[i]:Tk(s,a,n)}}var Ek=3e4,Dk=3,Ok=1e4;async function kk(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 Ak(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 kk(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 jk=`lastFetchedAt`,Mk=6e4,Nk=10*6e4;function Pk(e){let{runtimeState:t,cap:n,ownDeviceId:r,refresh:i,staleMs:a,empty:o,logger:s}=e,c=e.refreshMissCooldownMs??6e4,l=e.staleRead??`await-refresh`,u=0,d=null,f=()=>{let e=t.getCapState(n.name)?.[jk];return typeof e==`number`?e:0},p=e=>{u=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)}})},ee=async e=>{try{await i()}catch(e){throw p(e),e}if(f()>e){u!==0&&(u=0,s?.info(`${n.name}: refresh landed again — resuming normal polling`,{tags:{deviceId:r}}));return}p(void 0)},te=e=>{let t=d;if(t!==null)return t;let n=ee(e).catch(()=>void 0).finally(()=>{d=null});return d=n,n},ne=async()=>{let e=t.getCapState(n.name),r=f();if(e&&Date.now()-r<=a){u=0;return}if(!(Date.now()<u)){if(l===`serve-and-revalidate`){if(d!==null)return;if(e&&r>0){te(r);return}await te(r);return}await ee(r)}},re=()=>{let e=t.getCapState(n.name);if(!e)return o();let{[jk]:r,...i}=e;return i};return{ensureFresh:ne,getStatus:async({deviceId:e})=>{if(e!==r)throw Error(`${n.name}: deviceId mismatch, expected ${r}, got ${e}`);return await ne(),re()}}}function Fk(e){let t=e;for(;t instanceof fe||t instanceof me||t instanceof ee;)t=t.unwrap();return t}function Ik(e){let t=Fk(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 Lk(e,t=``){let n=Fk(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=Fk(n);if(a instanceof se){r.push(...Lk(a,i));continue}let o=Ik(n);o&&r.push({path:i,kind:o.kind,...o.enumValues?{enumValues:o.enumValues}:{}})}return r}function Rk(e){return Lk(e.itemSchema).filter(t=>t.path!==e.keyField).map(e=>({...e,item:!0}))}var zk=`device.state-changed`,Bk=`capability.binding-changed`,Vk=`device.registered`,Hk=`device.unregistered`,Uk=`device.updated`,Wk=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=Kt(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?Jt(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&&!Gk(n,e.id)||e.stableId!==void 0&&(!i||!Gk(i.stableId,e.stableId))||e.addonId!==void 0&&(!i||!Gk(i.addonId,e.addonId))||e.type!==void 0&&(!i||!Gk(i.type,e.type)))continue;if(e.caps!==void 0){let t=Kk(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=Kk(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||!qk(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||!Kk(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:zk},{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:Bk},{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:Vk},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.refreshDeviceMetadata(t.deviceId,`added`)}})),this.bridges.push(e.subscribe({category:Hk},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.applyDeviceRemoval(t.deviceId)}})),this.bridges.push(e.subscribe({category:Uk},{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 Gk(e,t){return Array.isArray(t)?t.includes(e):e===t}function Kk(e){return Array.isArray(e)?e:[e]}function qk(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 Jk(e){return e.def}function Yk(e){return e}function Xk(e,t=`Configuration`,n=`main`){return{sections:[{id:n,title:t,fields:e.map(e=>Zk(e.key,e.schema,e.description))}]}}function Zk(e,t,n){let r=nA(t),i=rA(t),a={key:e,label:n??iA(e),description:n,default:i};return r instanceof re?Qk(e,a):r instanceof ne?$k(r,a):r instanceof ae?{...a,type:`boolean`}:r instanceof ue?tA(r,a):r instanceof de||r instanceof se?{...a,type:`textarea`,rows:6,isJson:!0}:{...a,type:`text`}}function Qk(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 $k(e,t){let n=Yk(e),r=n.minValue,i=n.maxValue,a=r!=null&&isFinite(r)?r:void 0,o=i!=null&&isFinite(i)?i:void 0,s=eA(e);return{...t,type:`number`,...a===void 0?{}:{min:a},...o===void 0?{}:{max:o},...s===void 0?{}:{step:s}}}function eA(e){let t=Jk(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 tA(e,t){let n=e.options.map(e=>String(e));return{...t,type:`select`,options:n.map(e=>({label:iA(e),value:e}))}}function nA(e){return e instanceof ee||e instanceof me||e instanceof fe?nA(Jk(e).innerType):e}function rA(e){if(e instanceof ee)return Jk(e).defaultValue}function iA(e){return e.replace(/([A-Z])/g,` $1`).replace(/[_-]/g,` `).replace(/^\w/,e=>e.toUpperCase()).trim()}var aA=`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(`.`),oA={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`,failureContribution:`failure-contribution`,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`,loadContribution:`load-contribution`,localNetwork:`local-network`,lockControl:`lock-control`,logChannels:`log-channels`,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`},sA=[{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:`failureContribution`,name:`failure-contribution`},{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:`loadContribution`,name:`load-contribution`},{key:`localNetwork`,name:`local-network`},{key:`lockControl`,name:`lock-control`},{key:`logChannels`,name:`log-channels`},{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`}],cA=[Tb,Ds,ks,Ns,Rs,Gs,Us,rx,Nt,ax,Qp,Xs,sx,Zs,lc,_c,fx,yc,mx,Dc,gx,vx,bx,Jc,xx,wx,Yc,Cl,Ex,kx,Px,zx,Vx,Wx,Kx,Xx,Ul,$x,Jl,iu,aS,cu,lu,Mu,yu,Vu,pd,Ht,Ju,md,sS,uS,_d,pS,gS,vS,DS,of,AS,MS,bd,PS,IS,RS,BS,HS,ZS,oC,uC,mC,Zd,Rd,uf,DC,AC,$d,nf,gf,FC,zC,Rf,Bf,Uf,HC,Kf,GC,XC,ip,tw,cp,aw,xw,wp,fh,Ow,Aw,wh,Iw,Ww,Xw,I_,ng,qv,uv,nT,vT,bT,CT,TT,jT,RT,UT,WT,cE,bE,VE,UE,ly,nu,GE,my,_y,yy,xy,wy,Ty,Ly,vl,JE,tD,sD,RD,BD,HD,Ky,WD,Jy,KD,aO,Xy,lO,fO,mb,mO,yb,Rt,gO,vO,Cb,EO,OO,cg],lA=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.getIntegrationSettings":{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.aggregate":{capName:`data-store-provider`,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.insertMany":{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.getBindingsBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getChildren":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getChildrenBatch":{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.getLinkedDevicesBatch":{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`},"failureContribution.list":{capName:`failure-contribution`,capScope:`system`,addonId:null,access:`view`},"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`},"loadContribution.list":{capName:`load-contribution`,capScope:`system`,addonId:null,access:`view`},"localNetwork.downloadCa":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"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.getTlsStatus":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getViewerEndpoints":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.list":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.regenerateCertificate":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.resetAllowlistToBestMatch":{capName:`local-network`,capScope:`system`,addonId:null,access:`delete`},"localNetwork.revertToGeneratedCertificate":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.setAllowedAddresses":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.setNotificationEndpoint":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.setViewerEndpoints":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.uploadCertificate":{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`},"logChannels.apply":{capName:`log-channels`,capScope:`system`,addonId:null,access:`create`},"logChannels.list":{capName:`log-channels`,capScope:`system`,addonId:null,access:`view`},"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.getLoadSeries":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getProcessStats":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"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.resolveArtifactUrl":{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.cancelRelocateMedia":{capName:`pipeline-analytics`,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.getGroup":{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.listGroups":{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.listRelocateMediaJobs":{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.relocateMedia":{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.runReplayFrameProcessor":{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.getInferenceDeviceHealth":{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.rearmInferenceDevice":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.runAudioTest":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.runPipeline":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.runPipelineBatch":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.saveTemplate":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.setVideoPipelineSteps":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.spinEngine":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.uncacheFrame":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.updateTemplate":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"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.readWindowBytes":{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.aggregate":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"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.insertMany":{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.getFailureContributions":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.getLoadContributions":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.getLoggingSettings":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.getRequestCensus":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"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.setLoggingSettings":{capName:`system`,capScope:`system`,addonId:null,access:`create`},"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.updateInstance":{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`}}),uA=`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.failure-contribution.fan-control.filesystem-browse.humidifier.image-settings.integrations.intercom.lawn-mower-control.llm.llm-runtime.load-contribution.local-network.lock-control.log-channels.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(`.`),dA=`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(`.`),fA=`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.failure-contribution.filesystem-browse.integrations.llm.llm-runtime.load-contribution.local-network.log-channels.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(`.`),pA=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.getBindingsBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"deviceManager.getChildren":[{name:`parentDeviceId`,form:`single`,optional:!1}],"deviceManager.getChildrenBatch":[{name:`parentDeviceIds`,form:`array`,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.getLinkedDevicesBatch":[{name:`deviceIds`,form:`array`,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.listAll":[{name:`deviceIds`,form:`array`,optional:!0}],"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},{name:`deviceIds`,form:`array`,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.getGroup":[{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.listGroups":[{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.runReplayFrameProcessor":[{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.readWindowBytes":[{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}]}),mA=`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.getBindingsBatch,deviceManager.getChildren,deviceManager.getChildrenBatch,deviceManager.getConfigSchema,deviceManager.getDevice,deviceManager.getDeviceAggregate,deviceManager.getDeviceLiveInfoAggregate,deviceManager.getDeviceSettingsAggregate,deviceManager.getDeviceStatusAggregate,deviceManager.getDeviceStatusAggregateBatch,deviceManager.getLinkedDevices,deviceManager.getLinkedDevicesBatch,deviceManager.getSettingsSchema,deviceManager.getStreamProfileMap,deviceManager.getStreamSources,deviceManager.getWireableFields,deviceManager.listAll,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.readWindowBytes,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(`,`),hA=Object.freeze({broker:`broker`,"device-export":`device-export`,llm:`ai`,"mesh-network":`mesh`,"mqtt-broker":`broker`,"network-access":`ingress`,"smtp-provider":`email`}),gA=[`broker`,`device-export`,`llm`,`mesh-network`,`mqtt-broker`,`network-access`,`smtp-provider`];function _A(e){let t=[];for(let[n,r]of Object.entries(hA))r===e&&t.push(n);return t}var vA={"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 yA(e){return vA[e]??bA}var bA={durability:`session`,volatileFields:[]};function xA(e){return yA(e).durability===`restored`}var SA=`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(`.`),CA=[{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 wA(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),getIntegrationSettings:e=>n(`addonSettings`,`getIntegrationSettings`,`query`,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),getChildrenBatch:e=>n(`deviceManager`,`getChildrenBatch`,`query`,e),getLinkedDevicesBatch:e=>n(`deviceManager`,`getLinkedDevicesBatch`,`query`,e),removeByIntegration:e=>n(`deviceManager`,`removeByIntegration`,`mutation`,e),getBindingsBatch:e=>n(`deviceManager`,`getBindingsBatch`,`query`,e),getAllBindings:e=>n(`deviceManager`,`getAllBindings`,`query`,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),getViewerEndpoints:e=>n(`localNetwork`,`getViewerEndpoints`,`query`,e),setViewerEndpoints:e=>n(`localNetwork`,`setViewerEndpoints`,`mutation`,e),getAllowedAddresses:e=>n(`localNetwork`,`getAllowedAddresses`,`query`,e),setAllowedAddresses:e=>n(`localNetwork`,`setAllowedAddresses`,`mutation`,e),resetAllowlistToBestMatch:e=>n(`localNetwork`,`resetAllowlistToBestMatch`,`mutation`,e),getTlsStatus:e=>n(`localNetwork`,`getTlsStatus`,`query`,e),regenerateCertificate:e=>n(`localNetwork`,`regenerateCertificate`,`mutation`,e),uploadCertificate:e=>n(`localNetwork`,`uploadCertificate`,`mutation`,e),downloadCa:e=>n(`localNetwork`,`downloadCa`,`query`,e),revertToGeneratedCertificate:e=>n(`localNetwork`,`revertToGeneratedCertificate`,`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),getLoadSeries:e=>n(`metricsProvider`,`getLoadSeries`,`query`,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),getInferenceDeviceHealth:e=>n(`pipelineExecutor`,`getInferenceDeviceHealth`,`query`,e),rearmInferenceDevice:e=>n(`pipelineExecutor`,`rearmInferenceDevice`,`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),insertMany:e=>n(`settingsStore`,`insertMany`,`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),aggregate:e=>n(`settingsStore`,`aggregate`,`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),getRequestCensus:e=>n(`system`,`getRequestCensus`,`query`,e),getLoadContributions:e=>n(`system`,`getLoadContributions`,`query`,e),getFailureContributions:e=>n(`system`,`getFailureContributions`,`query`,e),getLoggingSettings:e=>n(`system`,`getLoggingSettings`,`query`,e),setLoggingSettings:e=>n(`system`,`setLoggingSettings`,`mutation`,e)},terminalSession:{listProfiles:e=>n(`terminalSession`,`listProfiles`,`query`,e),listInstances:e=>n(`terminalSession`,`listInstances`,`query`,e),createInstance:e=>n(`terminalSession`,`createInstance`,`mutation`,e),updateInstance:e=>n(`terminalSession`,`updateInstance`,`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 TA=`audio-`;function EA(e){return e.startsWith(TA)?e.slice(6):e}function DA(e){return e.startsWith(TA)?e:`${TA}${e}`}var OA=-96,kA=0,AA=3,jA=-55,MA=1,NA=100,PA=1,FA=300,IA=2,LA=5,RA=1,zA=20,BA=1,VA=60,HA={hitPercent:60,samplingSeconds:10};function UA(e){return e??HA}function WA(e){return e===void 0?null:e.labels!==void 0&&e.labels.length>0?`label`:e.dbThreshold===void 0?null:`level`}function GA(e){return e===void 0?!1:e.dbThreshold===void 0&&(e.labels===void 0||e.labels.length===0)}function KA(e,t,n){return Number.isFinite(e)?Math.min(n,Math.max(t,Math.round(e))):t}function qA(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function JA(e,t){let n=UA(e),r=qA(t,`labels`)?t.labels:n.labels,i=qA(t,`dbThreshold`)?t.dbThreshold:n.dbThreshold,a=r!==void 0&&r.length>0,o=t.mode??(qA(t,`labels`)&&a?`label`:qA(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:KA(c,-96,0)},hitPercent:KA(t.hitPercent??n.hitPercent,1,100),samplingSeconds:KA(t.samplingSeconds??n.samplingSeconds,1,300),...(()=>{let e=qA(t,`confirmHits`)?t.confirmHits:n.confirmHits,r=qA(t,`confirmWindowSec`)?t.confirmWindowSec:n.confirmWindowSec;return{...e===void 0?{}:{confirmHits:KA(e,1,20)},...r===void 0?{}:{confirmWindowSec:KA(r,1,60)}}})()}}function YA(e,t){let n=e?.audioKinds??[],r=n.length>0?n.map(e=>{let t=EA(e.kind);return{value:t,label:e.label,iconId:DA(t),unknown:!1}}):Ap.map(e=>({value:e.id,label:e.name,iconId:DA(e.id),unknown:!1})),i=new Set(r.map(e=>e.value)),a=[];for(let e of t??[]){let t=EA(e);i.has(t)||a.includes(t)||(a.push(t),r.push({value:t,label:t,iconId:DA(t),unknown:!0}))}return{choices:r,unknownLabels:a}}function XA(e,t){let n=EA(t);return(e??[]).some(e=>EA(e)===n)}function ZA(e,t){let n=EA(t),r=e??[];if(XA(r,n)){let e=r.filter(e=>EA(e)!==n);return e.length>0?e:void 0}return[...r,n]}var QA=new Set([`classes`,`classesExclude`]),$A=new Set([`sensorKinds`]),ej=new Set([`occupancy`]);function tj(e){return{value:e.kind,label:e.label}}function nj(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(tj(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 rj(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,[tj(r)]),t.push(e)):i.push(tj(r))}return t.flatMap(e=>{let t=n.get(e);return t===void 0?[]:[{key:e,fallbackLabel:e,options:t}]})}function ij(e,t){if(!t)return null;if(QA.has(e)){let e=nj(t.videoClasses);return t.audioKinds.length>0&&e.push({key:`audio`,fallbackLabel:`Audio`,options:t.audioKinds.map(tj)}),e.length>0?{groups:e}:null}if(ej.has(e)){let e=t.videoClasses.filter(e=>e.parentKind===null).map(tj);return e.length>0?{groups:[{key:`macro`,fallbackLabel:`Classes`,options:e}]}:null}if($A.has(e)){let e=rj(t.labels);return e.length>0?{groups:e}:null}return null}function aj(e){let t=new Set;for(let n of e.groups)for(let e of n.options)t.add(e.value);return t}var oj=[`devices`,`classes`],sj=new Set(oj);function cj(e){return sj.has(e)}function lj(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 uj=[[/&nbsp;/g,` `],[/&amp;/g,`&`],[/&lt;/g,`<`],[/&gt;/g,`>`],[/&quot;/g,`"`],[/&#39;/g,`'`]];function dj(e){let t=e.replace(/<\s*br\s*\/?\s*>/gi,`
345
+ `}var Ts=i({id:g(),label:g(),icon:g(),path:g(),remoteName:g(),bundle:g(),section:g().optional(),sectionLabel:g().optional()}),Es=i({addonId:g(),page:Ts,bundleUrl:g()}),Ds={name:`addon-pages`,scope:`system`,mode:`singleton`,methods:{listPages:w(h(),p(Es).readonly())}},Os=i({id:g(),label:g(),icon:g(),path:g(),remoteName:g(),bundle:g(),section:g().optional(),sectionLabel:g().optional()}),ks={name:`addon-pages-source`,scope:`system`,mode:`collection`,internal:!0,methods:{listPages:w(h(),p(Os).readonly(),{auth:`admin`})}},As=i({method:m([`GET`,`POST`,`PUT`,`DELETE`,`PATCH`]),path:g(),access:m([`public`,`authenticated`,`admin`]).optional(),description:g().optional()}),js=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()}),Ms=i({status:a().int(),headers:n(g(),g()),redirectUrl:g().nullable(),body:u().optional(),contentType:g().optional()}),Ns={name:`addon-routes`,scope:`system`,mode:`collection`,internal:!0,methods:{getRoutes:w(h(),p(As)),invoke:w(js,Ms,{kind:`mutation`})},mount:{kind:`skip`}},Ps=i({id:g(),label:g(),icon:g(),order:a().optional()}),Fs=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())}),B=i({tabs:p(Ps).optional(),sections:p(Fs)}),Is=n(g(),u()),Ls=i({success:y(!0)}),Rs={name:`addon-settings`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{getGlobalSettings:w(i({addonId:g(),nodeId:g().optional(),overlay:n(g(),u()).optional(),cap:g().optional()}),B.nullable()),updateGlobalSettings:w(i({addonId:g(),nodeId:g().optional(),patch:Is}),Ls,{kind:`mutation`,auth:`admin`}),getIntegrationSettings:w(i({addonId:g(),nodeId:g().optional()}),B.nullable()),getDeviceSettings:w(i({addonId:g(),deviceId:a(),nodeId:g().optional()}),B.nullable()),updateDeviceSettings:w(i({addonId:g(),deviceId:a(),nodeId:g().optional(),patch:Is}),Ls,{kind:`mutation`,auth:`admin`})}},zs=m([`device-tab`,`dashboard`,`integration-detail`]),Bs=m([`xs`,`sm`,`md`,`lg`,`xl`]),Vs=i({remoteName:g(),exposedModule:g(),componentKey:g().optional()}),Hs=i({tab:g(),subTab:g().optional(),label:g(),order:a().optional(),kind:y(`remote`),remote:Vs,stableId:g(),description:g().optional(),icon:g().optional(),bundle:g(),hosts:p(zs).readonly(),requires:i({deviceContext:v().default(!1),integrationContext:v().default(!1)}),preAuth:v().optional().default(!1),defaultSize:Bs.default(`md`),allowedSizes:p(Bs).readonly().default([`sm`,`md`,`lg`]),defaultColumns:a().int().min(1).max(12).default(6),defaultRows:a().int().min(1).max(12).default(1)}),Us={name:`addon-widgets-source`,scope:`system`,mode:`collection`,internal:!0,methods:{listWidgets:w(h(),p(Hs).readonly(),{auth:`admin`})}},Ws=Hs.extend({addonId:g(),bundleUrl:g()}),Gs={name:`addon-widgets`,scope:`system`,mode:`singleton`,methods:{listWidgets:w(h(),p(Ws).readonly())}},Ks=m([`info`,`success`,`warning`,`error`]),qs=m([`active`,`in-progress`,`completed`,`failed`,`dismissed`]),Js=i({type:g(),id:g()}),Ys=i({id:g(),category:g(),severity:Ks,title:g(),message:g(),status:qs,progress:a().optional(),read:v(),createdAt:a(),updatedAt:a(),source:Js.optional(),metadata:n(g(),u()).optional()}),Xs={name:`alerts`,scope:`system`,mode:`singleton`,methods:{emit:w(Ys,h(),{kind:`mutation`}),update:w(i({alertId:g(),patch:Ys.partial()}),h(),{kind:`mutation`}),list:w(i({unreadOnly:v().optional(),limit:a().optional()}).optional(),p(Ys).readonly()),getUnreadCount:w(h(),a()),markRead:w(i({alertId:g()}),h(),{kind:`mutation`}),markAllRead:w(h(),h(),{kind:`mutation`}),dismiss:w(i({alertId:g()}),h(),{kind:`mutation`})}},Zs={name:`audio-analysis`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[E.Camera],exposesDeviceSettings:!0,methods:{resolveDeviceSettings:w(i({deviceId:a()}),x())},events:{onAudioLevel:T(i({deviceId:a(),rms:a(),dbfs:a()}))}},Qs=m([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]),$s=i({data:x(),format:Qs,width:a(),height:a(),timestamp:a()}),V=i({x:a(),y:a(),w:a(),h:a()}),ec=i({class:g(),originalClass:g(),score:a(),bbox:V}),tc=i({data:_(Uint8Array),sampleRate:a(),channels:a(),timestamp:a(),deviceId:a().optional()}),nc=i({rms:a(),dbfs:a()}),rc=i({className:g(),originalClass:g().optional(),score:a()}),ic=i({level:nc,classification:i({labels:p(rc).readonly(),inferenceMs:a()}).optional(),timestamp:a()}),ac=i({minConfidence:a().min(0).max(1).default(.3),allowedClasses:p(g()).default([])}),oc=i({labels:p(rc).readonly(),rawLabels:p(rc).readonly().optional(),inferenceMs:a()}),sc=[{value:`auto`,label:`Auto (platform default)`},{value:`apple-soundanalysis`,label:`Apple SoundAnalysis (macOS 12+)`},{value:`yamnet-onnx`,label:`YAMNet ONNX (cross-platform)`}],cc={audioBackend:`auto`,probedBestAudioBackend:``},lc={name:`audio-analyzer`,scope:`system`,mode:`singleton`,methods:{analyseChunk:w(i({chunk:tc,settings:ac}),ic.nullable(),{kind:`mutation`}),classify:w(tc,oc,{timeoutMs:3e4}),isReady:w(h(),v()),dispose:w(h(),h(),{kind:`mutation`}),reprobeAudioEngine:w(h(),i({backend:g()}),{kind:`mutation`,auth:`admin`})}},uc=m([`f32le`,`s16le`]),dc=i({codec:g(),canDecode:v(),canEncode:v(),label:g().optional()}),fc=i({codec:g(),sourceSampleRate:a().int().positive(),sourceChannels:a().int().positive(),extraData:_(Uint8Array).optional(),targetSampleRate:a().int().positive(),targetChannels:a().int().positive(),targetFormat:uc.optional(),idleMs:a().int().positive().optional(),tag:g().optional()}),pc=i({codec:g(),sourceSampleRate:a().int().positive(),sourceChannels:a().int().positive(),sourceFormat:uc.optional(),targetSampleRate:a().int().positive(),targetChannels:a().int().positive(),bitrateKbps:a().int().positive().optional(),idleMs:a().int().positive().optional(),tag:g().optional()}),mc=i({data:_(Uint8Array),sampleRate:a().int().positive(),channels:a().int().positive(),format:uc,pts:a()}),hc=i({data:_(Uint8Array),codec:g(),pts:a(),frameComplete:v()}),gc=i({sessionId:g(),kind:m([`decode`,`encode`]),codec:g(),sourceSampleRate:a(),sourceChannels:a(),targetSampleRate:a(),targetChannels:a(),format:uc,tag:g().optional(),createdAtMs:a(),lastActivityMs:a(),framesIn:a(),framesOut:a()}),_c={name:`audio-codec`,scope:`system`,mode:`singleton`,preferredProvider:`decoder-nodeav`,methods:{listSupportedCodecs:w(h(),p(dc).readonly()),canHandle:w(i({codec:g(),kind:m([`decode`,`encode`])}),v()),createDecodeSession:w(fc,i({sessionId:g(),nodeId:g()}),{kind:`mutation`}),createEncodeSession:w(pc,i({sessionId:g(),nodeId:g()}),{kind:`mutation`}),closeSession:w(i({sessionId:g(),nodeId:g().optional()}),h(),{kind:`mutation`}),pushEncodedFrame:w(i({sessionId:g(),nodeId:g().optional(),data:_(Uint8Array),pts:a().optional()}),h(),{kind:`mutation`}),pullPcm:w(i({sessionId:g(),nodeId:g().optional(),maxCount:a().int().positive().default(8)}),p(mc)),pushPcm:w(i({sessionId:g(),nodeId:g().optional(),data:_(Uint8Array),pts:a().optional()}),h(),{kind:`mutation`}),pullEncoded:w(i({sessionId:g(),nodeId:g().optional(),maxCount:a().int().positive().default(8)}),p(hc)),flushEncode:w(i({sessionId:g(),nodeId:g().optional()}),p(hc),{kind:`mutation`}),listActiveSessions:w(h(),p(gc).readonly())}},vc=i({userId:g(),username:g(),email:g().optional(),displayName:g().optional(),isAdmin:v().default(!1)}),yc={name:`auth-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{validateCredentials:w(i({username:g(),password:g()}),vc.nullable(),{kind:`mutation`}),getLoginUrl:w(i({state:g()}),g()),handleCallback:w(n(g(),g()),vc,{kind:`mutation`}),validateToken:w(i({token:g()}),vc.nullable())},mount:{kind:`skip`}},bc=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()}),xc=i({id:g(),filename:g(),createdAt:a(),sizeBytes:a(),label:g().optional(),locations:p(g()).readonly()}),Sc=i({id:g(),destinationId:g().optional(),label:g().optional(),createdAt:a(),sizeBytes:a(),locations:p(g()).optional()}),Cc=i({path:g(),kind:m([`file`,`dir`,`symlink`]),sizeBytes:a(),mtime:a()}),wc=i({archiveVersion:y(1),createdAt:a(),dataDir:g(),locations:p(g()),entries:p(Cc),totalBytes:a(),totalFiles:a()}),Tc=i({name:g(),sizeBytes:a(),fileCount:a(),present:v()}),Ec=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()}),Dc={name:`backup`,scope:`system`,mode:`singleton`,methods:{listDestinations:w(h(),p(bc).readonly(),{auth:`admin`}),trigger:w(i({destinations:p(g()).optional(),locations:p(g()).optional(),label:g().optional(),retentionCount:a().int().min(1).max(1e3).optional()}).optional(),p(Sc).readonly(),{kind:`mutation`,auth:`admin`}),list:w(h(),p(Sc).readonly(),{auth:`admin`}),listLocations:w(h(),p(Tc).readonly(),{auth:`admin`}),getEntries:w(i({destinationId:g(),backupId:g()}),wc.nullable(),{auth:`admin`}),restore:w(i({destinationId:g(),backupId:g(),locations:p(g()).optional()}),h(),{kind:`mutation`,auth:`admin`}),delete:w(i({destinationId:g(),backupId:g()}),h(),{kind:`mutation`,auth:`admin`}),listArchives:w(i({destinationId:g()}),p(xc).readonly(),{auth:`admin`}),upsertDestinationPolicy:w(i({locationId:g(),enabled:v(),retentionCount:a().int().min(1).max(1e3),label:g().optional(),cron:g().optional()}),h(),{kind:`mutation`,auth:`admin`}),previewSchedule:w(i({cron:g(),count:a().int().min(1).max(20).optional()}),i({ok:v(),error:g().optional(),nextRuns:p(a()).readonly()})),listSchedules:w(h(),p(Ec).readonly(),{auth:`admin`}),upsertSchedule:w(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()}),Ec,{kind:`mutation`,auth:`admin`}),deleteSchedule:w(i({id:g()}),h(),{kind:`mutation`,auth:`admin`})}},Oc=m([`connected`,`disconnected`,`connecting`,`auth-failed`,`unreachable`,`error`]),kc=i({id:g(),addonId:g(),name:g(),kind:g(),status:Oc,info:n(g(),u()),lastCheckedAt:a().nullable(),error:g().nullable()}),Ac=i({brokerCount:a().int().nonnegative(),connectedCount:a().int().nonnegative()}),jc=i({addonId:g(),kinds:p(i({kind:g(),label:g()}))}),Mc=i({kind:g().optional()}),Nc=i({id:g()}),Pc=i({kind:g().min(1),name:g().min(1),id:g().min(1).optional(),settings:n(g(),u())}),Fc=i({id:g()}),Ic=i({id:g()}),Lc=b(`ok`,[i({ok:y(!0),latencyMs:a().nonnegative()}),i({ok:y(!1),error:g()})]),Rc=n(g(),u()),zc=i({kind:g()}),Bc=i({kind:g(),settings:Rc}),Vc=b(`ok`,[i({ok:y(!0),latencyMs:a().nonnegative().optional()}).strict(),i({ok:y(!1),error:g()})]),Hc=u().nullable(),Uc=i({brokerId:g(),target:n(g(),u()),payload:u().optional()}),Wc=i({brokerId:g(),filter:n(g(),u())}),Gc=i({subscriptionId:g()}),Kc=i({brokerId:g(),subscriptionId:g()}),qc=i({brokerId:g(),key:g()}),Jc={name:`broker`,scope:`system`,mode:`collection`,providerKind:`broker`,status:{schema:Ac,kind:`poll`},methods:{list:w(Mc,p(kc)),get:w(Nc,kc.nullable()),listProviders:w(h(),p(jc),{auth:`admin`}),add:w(Pc,Fc,{kind:`mutation`,auth:`admin`}),remove:w(Ic,h(),{kind:`mutation`,auth:`admin`}),testConnection:w(Nc,Lc,{kind:`mutation`,auth:`admin`}),getSettings:w(Nc,Rc.nullable(),{auth:`admin`}),setSettings:w(i({id:g(),settings:Rc}),h(),{kind:`mutation`,auth:`admin`}),getBrokerConfig:w(Nc,Rc.nullable(),{auth:`admin`}),getSettingsSchema:w(zc,Hc,{auth:`admin`}),testSettings:w(Bc,Vc,{kind:`mutation`,auth:`admin`}),publish:w(Uc,u(),{kind:`mutation`,auth:`admin`}),subscribe:w(Wc,Gc,{kind:`mutation`,auth:`admin`}),unsubscribe:w(Kc,h(),{kind:`mutation`,auth:`admin`}),getState:w(qc,u().nullable()),getStatus:w(h(),Ac)}},Yc={name:`camera-pipeline-config`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[E.Camera],exposesDeviceSettings:!0,methods:{}},Xc=m([`webrtc`,`hls`,`mjpeg`,`rtsp`]),Zc=m([`mp4`,`gif`]),Qc=i({kind:Zc,handle:g(),nodeId:g(),mime:g(),bytes:a().int(),width:a().int(),height:a().int()}),$c=i({fromTs:a(),toTs:a(),packets:a().int()}),el=i({media:p(Qc).readonly(),coverage:$c,profile:S,video:m([`copy`,`encode`])}),tl=i({brokerId:g(),url:g(),mutedUrl:g(),enabled:v(),codec:g().optional(),resolution:i({width:a().int().positive(),height:a().int().positive()}).optional()}),nl=i({sessionId:g(),remoteAddr:g(),userAgent:g().nullish(),playing:v(),muted:v(),connectedAt:a(),lastRtpAt:a(),bytesSent:a()}),rl=i({tag:g(),subscribedAt:a(),maxFps:a(),framesDelivered:a(),framesDropped:a()}),il=i({tag:g(),subscribedAt:a(),chunksDelivered:a()}),al=m([`alexa`,`homekit`,`webrtc-browser`,`webrtc-mobile`,`webrtc-whep`,`rtsp-listen`,`derived-broker`,`recording`,`pipeline`,`snapshot`,`warmup`,`unknown`]),ol=i({kind:al,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(),sl=i({id:g(),channel:m([`annexb`,`rtp`]),attribution:ol,subscribedAt:a(),packetsDelivered:a()}),cl=i({rtsp:p(nl).readonly(),decoded:p(rl).readonly(),audio:p(il).readonly(),encoded:p(sl).readonly(),pipeClients:a(),encodedSubscribers:a()}),ll=m([`reconnecting`,`sleeping`,`offline`,`disabled`,`waking`]),ul=m([`h264`,`h265`,`copy`]),dl=m([`aac`,`opus`,`pcmu`,`copy`,`none`]),fl=i({deviceId:a().int().nonnegative(),video:ul,audio:dl.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()}),pl=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()}),ml=Gn.omit({inputArgs:!0,outputArgs:!0}),hl=m([`tight`,`relaxed`]),gl=i({deviceId:a().int().nonnegative(),source:b(`kind`,[i({kind:y(`profile`),profile:S}),i({kind:y(`cam-stream`),camStreamId:g().min(1)})]),encode:ml,rateControl:hl.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()}),_l=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()}),vl={name:`stream-broker`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,methods:{publishCameraStream:w(i({deviceId:a().int().nonnegative(),camStreamId:g().min(1),kind:He,url:g().optional(),codec:g().optional(),resolution:Ue.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:Gn.optional()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),retractCameraStream:w(i({deviceId:a().int().nonnegative(),camStreamId:g().min(1)}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),assignProfile:w(i({deviceId:a().int().nonnegative(),profile:S,camStreamId:g().min(1)}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),unassignProfile:w(i({deviceId:a().int().nonnegative(),profile:S}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),renderPreBufferClip:w(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:w(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(Zc).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)}),el,{kind:`mutation`,auth:`admin`}),fetchEventMedia:w(i({handle:g()}),i({base64:g(),mime:g(),bytes:a().int()}).nullable(),{kind:`mutation`,auth:`admin`}),listAllCameraStreams:w(h(),p(We).readonly()),listAllProfileSlots:w(h(),p(Ke).readonly()),getBrokerStats:w(i({brokerId:g()}),ct),probeStream:w(i({brokerId:g()}),i({probed:v(),summary:g()}),{kind:`mutation`,auth:`admin`}),listClients:w(i({brokerId:g()}),cl),killClient:w(i({brokerId:g(),channel:m([`rtsp`,`decoded`,`audio`]),handle:g()}),i({killed:v()}),{kind:`mutation`,auth:`admin`}),restartProfile:w(i({deviceId:a().int().nonnegative(),profile:S}),i({success:v()}),{kind:`mutation`,auth:`admin`}),getStreamUrl:w(i({streamId:g(),format:Xc}),i({url:g()})),getStreamWithCodec:w(fl,pl,{kind:`mutation`,auth:`admin`}),releaseStreamWithCodec:w(i({pipelineKey:g()}),i({released:v(),refcount:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),acquireEgressTranscode:w(gl,_l,{kind:`mutation`,auth:`admin`}),releaseEgressTranscode:w(i({pipelineKey:g()}),i({released:v(),refcount:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),subscribeAudioChunks:w(at,ot,{kind:`mutation`}),pullAudioChunks:w(i({subscriptionId:g(),maxCount:a().int().positive().default(8)}),p(it).readonly()),unsubscribeAudioChunks:w(i({subscriptionId:g()}),i({released:v()}),{kind:`mutation`}),subscribeFrames:w(nt,rt,{kind:`mutation`}),pullFrameHandles:w(i({subscriptionId:g(),maxCount:a().int().positive().default(4)}),p(C).readonly()),unsubscribeFrames:w(i({subscriptionId:g()}),i({released:v()}),{kind:`mutation`}),setPreBufferDuration:w(i({brokerId:g(),seconds:a().min(0).max(30)}),h(),{kind:`mutation`,auth:`admin`}),getPreBufferInfo:w(i({brokerId:g()}),i({configuredSec:a(),bufferedMs:a(),packetCount:a()})),getRtspPort:w(h(),a()),getAllRtspEntries:w(i({hostname:g().optional()}),p(tl).readonly()),getRtspEntry:w(i({brokerId:g(),hostname:g().optional()}),tl.nullable()),regenerateRtspToken:w(i({brokerId:g()}),g().nullable(),{kind:`mutation`,auth:`admin`}),setRtspEnabled:w(i({brokerId:g(),enabled:v()}),h(),{kind:`mutation`,auth:`admin`}),isRtspEnabled:w(i({brokerId:g()}),v()),getDeviceAudioMute:w(i({deviceId:a().int()}),i({muted:v(),appliedBrokers:a().int().nonnegative()})),setDeviceAudioMute:w(i({deviceId:a().int(),muted:v()}),i({muted:v(),appliedBrokers:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`})},events:{onCamStreamDemand:T(i({deviceId:a().int().nonnegative(),camStreamId:g(),profile:S})),onCamStreamIdle:T(i({deviceId:a().int().nonnegative(),camStreamId:g()})),onRequestStreamSourceRefresh:T(i({deviceId:a().int().nonnegative(),camStreamId:g(),brokerId:g()}))}},yl=m([`h264`,`h265`,`hevc`,`av1`,`mjpeg`,`vp8`,`vp9`]),bl=i({acceptCodecs:p(yl).readonly().optional(),minHeight:a().int().positive().optional(),minWidth:a().int().positive().optional(),excludeDerived:v().optional(),requireSiblingCodec:p(yl).readonly().optional()}).readonly(),xl=i({preferredProviders:p(g()).readonly().optional(),resolutionPreference:m([`highest`,`lowest`]).optional()}).readonly(),Sl=i({camStreamId:g(),codec:g().optional(),resolution:Ue.optional(),reason:g()}),Cl={name:`camera-streams`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[E.Camera],methods:{getCameraStreams:w(i({deviceId:a().int().nonnegative()}),p(We).readonly()),getBrokerStreams:w(i({deviceId:a().int().nonnegative()}),p(Ke).readonly()),getRtspEntries:w(i({deviceId:a().int().nonnegative(),hostname:g().optional()}),p(tl).readonly()),getProfileRtspEntries:w(i({deviceId:a().int().nonnegative(),hostname:g().optional()}),p(lt).readonly()),pickStream:w(i({deviceId:a().int().nonnegative(),requirements:bl,preferences:xl.optional()}),Sl.nullable())},events:{onCamStreamsChanged:T(i({deviceId:a().int().nonnegative(),camStreams:p(We).readonly()})),onProfileSlotsChanged:T(i({deviceId:a().int().nonnegative(),profileSlots:p(Ke).readonly()}))},runtimeState:i({online:v(),slotStatuses:i({high:Ge.optional(),mid:Ge.optional(),low:Ge.optional()}),slotErrors:i({high:g().optional(),mid:g().optional(),low:g().optional()}),lastChangedAt:a()}),durability:`session`};function wl(e){let t=e._def;return e.constructor?.name===`ZodVoid`||t?.type===`void`||t?.typeName===`ZodVoid`}function Tl(e){let t=e._def;return e.constructor?.name===`ZodObject`||t?.type===`object`||t?.typeName===`ZodObject`}function El(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 Dl(e,t){if(e===void 0||e.mode!==`collection`)return!1;let n=Ot(e)[t];return n!==void 0&&n.kind!==`subscription`&&El(n.output)}function Ol(e){let t=e.loose;return typeof t==`function`?t.call(e):e}function kl(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 Al(e){if(e===null||typeof e!=`object`&&typeof e!=`function`)return!1;let t=e.shape??jl(e._def?.shape);return typeof t==`object`&&!!t&&Object.prototype.hasOwnProperty.call(t,`addonId`)}function jl(e){return typeof e==`function`?e():e}function Ml(e,t){return t.auth===void 0?e.internal===!0?`admin`:`protected`:t.auth}function Nl(e){return e===`public`?`public`:e===`admin`||e===`superAdmin`?`admin`:`protected`}function Pl(e){return e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}var Fl=`core-block-`,Il=`core-blocks`;function Ll(e){return`${Fl}${e}`}function Rl(e){if(!e.startsWith(`core-block-`))return null;let t=e.slice(11);return t.length>0?t:null}var zl=c([y(`hub`),g().min(1)]),Bl=m([`stopped`,`starting`,`running`,`failed`]),Vl=i({name:g().min(1).max(120),code:g().max(2e5),enabled:v(),placement:zl,integrationId:g().optional()}),H=Vl.extend({id:g(),createdAt:a(),updatedAt:a(),createdBy:g(),status:Bl,lastError:g().optional(),lastChangedAt:a()}),Hl=i({ok:v(),error:g().optional(),line:a().optional(),column:a().optional()}),Ul={name:`core-blocks`,scope:`system`,mode:`singleton`,methods:{list:w(i({}),i({blocks:p(H)}),{auth:`admin`}),get:w(i({blockId:g()}),i({block:H.nullable()}),{auth:`admin`}),create:w(i({block:Vl}),i({block:H}),{kind:`mutation`,auth:`admin`,caller:`required`}),update:w(i({blockId:g(),block:Vl.partial()}),i({block:H}),{kind:`mutation`,auth:`admin`,caller:`required`}),delete:w(i({blockId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setEnabled:w(i({blockId:g(),enabled:v()}),i({block:H}),{kind:`mutation`,auth:`admin`}),restart:w(i({blockId:g()}),i({block:H}),{kind:`mutation`,auth:`admin`}),compile:w(i({code:g()}),Hl,{kind:`mutation`,auth:`admin`}),getTypeDefs:w(i({}),i({libs:p(i({filePath:g(),content:g()}))}),{auth:`admin`})}};function Wl(e){return e}function Gl(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 Kl(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 ql=i({stepId:g(),entry:eo}),Jl={name:`custom-model-registry`,scope:`system`,mode:`collection`,internal:!0,methods:{listModels:w(h(),p(ql).readonly(),{auth:`admin`})}},U=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()}),Yl=i({where:n(g(),u()).optional(),whereIn:n(g(),p(u())).optional(),whereBetween:n(g(),s([u(),u()])).optional(),whereNot:n(g(),u()).optional()}),Xl=i({as:g().min(1),field:g().min(1),op:m([`sum`,`min`,`max`])}),Zl=i({count:a().int(),values:n(g(),a().nullable())}),Ql=i({id:g(),data:n(g(),u())}),$l=i({id:g().optional(),data:n(g(),u())}),eu=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()}),tu=i({name:g(),columns:p(g()).readonly(),unique:v().optional()}),nu={name:`settings-store`,scope:`system`,mode:`singleton`,methods:{get:w(i({namespace:g().optional(),collection:g(),key:g()}),u()),set:w(i({namespace:g().optional(),collection:g(),key:g(),value:u()}),h(),{kind:`mutation`}),query:w(i({namespace:g().optional(),collection:g(),filter:U.optional(),columns:p(g()).readonly().optional()}),p(Ql).readonly()),insert:w(i({namespace:g().optional(),collection:g(),record:Ql}),h(),{kind:`mutation`}),insertMany:w(i({namespace:g().optional(),collection:g(),records:p($l).readonly()}),i({inserted:a().int()}),{kind:`mutation`}),update:w(i({namespace:g().optional(),collection:g(),id:g(),data:n(g(),u())}),h(),{kind:`mutation`}),delete:w(i({namespace:g().optional(),collection:g(),key:g()}),h(),{kind:`mutation`}),deleteWhere:w(i({namespace:g().optional(),collection:g(),filter:Yl}),i({deleted:a().int()}),{kind:`mutation`}),updateWhere:w(i({namespace:g().optional(),collection:g(),filter:Yl,data:n(g(),u())}),i({updated:a().int()}),{kind:`mutation`}),count:w(i({namespace:g().optional(),collection:g(),filter:U.optional()}),a()),aggregate:w(i({namespace:g().optional(),collection:g(),fields:p(Xl).readonly(),filter:U.optional()}),Zl),histogram:w(i({namespace:g().optional(),collection:g(),field:g(),bucketSize:a().int().positive(),origin:a().int(),filter:U.optional()}),p(i({bucket:a().int(),count:a().int()})).readonly()),isEmpty:w(i({namespace:g().optional(),collection:g()}),v()),declareCollection:w(i({namespace:g().optional(),collection:g(),columns:p(eu).readonly(),indexes:p(tu).readonly().optional()}),h(),{kind:`mutation`})}},ru=i({engineId:g(),kind:m([`relational`,`vector`]),displayName:g()}),iu={name:`data-store-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{getEngineInfo:w(h(),ru,{auth:`admin`}),get:w(i({namespace:g().optional(),collection:g(),key:g()}),u(),{auth:`admin`}),set:w(i({namespace:g().optional(),collection:g(),key:g(),value:u()}),h(),{kind:`mutation`,auth:`admin`}),query:w(i({namespace:g().optional(),collection:g(),filter:U.optional(),columns:p(g()).readonly().optional()}),p(Ql).readonly(),{auth:`admin`}),insert:w(i({namespace:g().optional(),collection:g(),record:Ql}),h(),{kind:`mutation`,auth:`admin`}),insertMany:w(i({namespace:g().optional(),collection:g(),records:p($l).readonly()}),i({inserted:a().int()}),{kind:`mutation`,auth:`admin`}),update:w(i({namespace:g().optional(),collection:g(),id:g(),data:n(g(),u())}),h(),{kind:`mutation`,auth:`admin`}),delete:w(i({namespace:g().optional(),collection:g(),key:g()}),h(),{kind:`mutation`,auth:`admin`}),deleteWhere:w(i({namespace:g().optional(),collection:g(),filter:Yl}),i({deleted:a().int()}),{kind:`mutation`,auth:`admin`}),updateWhere:w(i({namespace:g().optional(),collection:g(),filter:Yl,data:n(g(),u())}),i({updated:a().int()}),{kind:`mutation`,auth:`admin`}),count:w(i({namespace:g().optional(),collection:g(),filter:U.optional()}),a(),{auth:`admin`}),aggregate:w(i({namespace:g().optional(),collection:g(),fields:p(Xl).readonly(),filter:U.optional()}),Zl,{auth:`admin`}),histogram:w(i({namespace:g().optional(),collection:g(),field:g(),bucketSize:a().int().positive(),origin:a().int(),filter:U.optional()}),p(i({bucket:a().int(),count:a().int()})).readonly(),{auth:`admin`}),isEmpty:w(i({namespace:g().optional(),collection:g()}),v(),{auth:`admin`}),declareCollection:w(i({namespace:g().optional(),collection:g(),columns:p(eu).readonly(),indexes:p(tu).readonly().optional()}),h(),{kind:`mutation`,auth:`admin`})}},au=[{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)`}],ou={hwaccel:`auto`,probedBestHwaccel:``},su=i({sessionId:g(),slotCount:a().int(),slotByteLength:a().int(),segmentBytes:a().int(),budgetMb:a().int(),framesWritten:a().int(),getFrameHits:a().int(),getFrameMisses:a().int()}),cu={name:`decoder`,scope:`system`,mode:`singleton`,preferredProvider:`decoder-nodeav`,methods:{supportsCodec:w(i({codec:g()}),v()),getInfo:w(h(),i({id:g(),name:g(),isPullMode:v().optional(),priority:a().optional(),hwaccel:g().optional(),probedBestHwaccel:g().optional()})),createSession:w(da,i({sessionId:g(),nodeId:g()})),destroySession:w(i({sessionId:g()}),h()),pushPacket:w(i({sessionId:g(),packet:$e}),h()),openStream:w(i({sessionId:g(),url:g()}),h()),pullFrames:w(i({sessionId:g(),maxCount:a().default(1),waitMs:a().optional()}),p(et)),pullHandles:w(i({sessionId:g(),maxCount:a().default(1),waitMs:a().optional()}),p(C)),getFrame:w(i({handle:C}),et.nullable()),getShmStats:w(i({sessionId:g()}),su.nullable()),updateConfig:w(i({sessionId:g(),config:da.partial()}),h()),getStats:w(i({sessionId:g()}),ua),listActiveSessions:w(h(),p(i({sessionId:g(),codec:g(),outputFormat:g(),createdAtMs:a()})).readonly()),reprobeHwaccel:w(h(),i({backend:g()}),{kind:`mutation`,auth:`admin`})}},lu={name:`detection-pipeline`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[E.Camera],exposesDeviceSettings:!0,methods:{}},uu=i({id:g(),system:g(),uniqueId:g().optional(),raw:n(g(),u()).optional()});function du(e){return{id:e.stableId,system:e.addonId}}function fu(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 pu(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 mu=`sourceInfo`;function hu(e){if(!e)return null;let t=e[mu];if(!t)return null;let n=uu.safeParse(t);return n.success?n.data:null}var gu=m([`online`,`sleeping`,`offline`,`unknown`]),_u=r(()=>i({childNativeId:g(),name:g(),type:m(E),status:gu,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:uu.optional(),children:p(_u).readonly().optional()})),vu=i({discovered:p(_u),lastDiscoveryAt:a().int().nonnegative().nullable(),lastError:g().nullable()}),yu={name:`device-discovery`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Hub],status:{schema:vu,kind:`poll`},runtimeState:vu.extend({lastFetchedAt:a().int().nonnegative()}),durability:`session`,methods:{listDiscovered:w(i({deviceId:a().int().nonnegative()}),p(_u).readonly()),refreshDiscovery:w(i({deviceId:a().int().nonnegative()}),p(_u).readonly(),{kind:`mutation`,auth:`admin`}),adoptDevice:w(i({deviceId:a().int().nonnegative(),childNativeId:g(),name:g().optional()}),i({deviceId:a().int().nonnegative(),stableId:g()}),{kind:`mutation`,auth:`admin`}),releaseDevice:w(i({deviceId:a().int().nonnegative(),childDeviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})}},bu=i({id:g(),label:g(),isDefault:v().optional()}),xu=i({search:g().optional(),area:g().optional(),manufacturer:g().optional(),adoptedOnly:v().optional(),unadoptedOnly:v().optional()}),Su=i({integrationId:g(),page:a().int().positive().default(1),pageSize:a().int().positive().max(2e4).default(50),filter:g().optional(),filterText:xu.optional()}),Cu=i({candidates:p(_u).readonly(),totalCount:a().int().nonnegative(),page:a().int().positive(),pageSize:a().int().positive()}),wu=i({integrationId:g(),childNativeId:g()}),Tu=i({lastDiscoveryAt:a().int().nonnegative().nullable(),candidateCount:a().int().nonnegative(),adoptedCount:a().int().nonnegative(),lastError:g().nullable()}),Eu=i({name:g().min(1).optional(),hiddenChildIds:p(g()).optional()}),Du=i({integrationId:g(),childNativeIds:p(g()).min(1),filter:g().optional(),importLocations:v().optional(),perCandidate:n(g(),Eu).optional()}),Ou=i({adopted:p(i({childNativeId:g(),parentDeviceId:a().int().nonnegative(),accessoryDeviceIds:p(a().int().nonnegative()).readonly()})).readonly()}),ku=i({integrationId:g(),camDeviceId:a().int().nonnegative()}),Au=i({camDeviceId:a().int().nonnegative(),resetToSource:v().optional()}),ju=i({changed:v(),rebuiltChildren:a().int().nonnegative(),removedChildren:a().int().nonnegative().optional()}),Mu={name:`device-adoption`,scope:`system`,mode:`singleton`,status:{schema:Tu,kind:`poll`},methods:{listCandidateFilters:w(i({integrationId:g()}),i({filters:p(bu)}),{auth:`admin`}),listCandidates:w(Su,Cu,{auth:`admin`}),getCandidate:w(wu,_u.nullable(),{auth:`admin`}),refresh:w(i({integrationId:g()}),Tu,{kind:`mutation`,auth:`admin`}),adopt:w(Du,Ou,{kind:`mutation`,auth:`admin`}),release:w(ku,h(),{kind:`mutation`,auth:`admin`}),resync:w(Au,ju,{kind:`mutation`,auth:`admin`})}},Nu=m([`unlinked`,`linked`,`error`]),Pu=i({label:g(),value:g(),secret:v().optional()}),Fu=i({qr:g().optional(),fields:p(Pu).readonly().optional(),note:g().optional()}),Iu=i({linkState:Nu,exposedDeviceCount:a(),error:g().optional(),setup:Fu.optional()}),Lu=g(),Ru=i({deviceId:g(),exposedAs:g().optional(),capabilities:p(g()).optional()}),zu=i({deviceId:g(),capabilities:p(g()).optional()}),Bu=i({deviceId:g()}),Vu={name:`device-export`,scope:`system`,mode:`collection`,providerKind:`device-export`,status:{schema:Iu,kind:`poll`},exposesDeviceSettings:!0,methods:{getStatus:w(h(),Iu),listSupportedDeviceKinds:w(h(),p(Lu)),listExposedDevices:w(h(),p(Ru)),exposeDevice:w(zu,h(),{kind:`mutation`}),unexposeDevice:w(Bu,h(),{kind:`mutation`})}},Hu=i({connected:v(),deviceCount:a(),error:g().optional()}),Uu=i({externalId:g(),name:g(),type:g(),metadata:n(g(),u()).optional()}),Wu=i({stableId:g(),type:m(E),suggestedName:g(),prefilledConfig:n(g(),u()),sourceInfo:uu.optional()}),Gu=i({id:a(),stableId:g(),addonId:g(),type:g(),name:g(),parentDeviceId:a().nullable(),online:v(),features:p(g()),config:n(g(),u()),sourceInfo:uu.optional()}),Ku=i({status:m([`ok`,`error`]),labels:p(g()).optional(),error:g().optional()}),qu=u(),Ju={name:`device-provider`,scope:`system`,mode:`collection`,methods:{start:w(h(),h(),{kind:`mutation`}),stop:w(h(),h(),{kind:`mutation`}),getStatus:w(h(),Hu),getDevices:w(h(),p(i({id:g(),name:g(),type:g()}))),supportsDiscovery:w(i({}),v()),discoverDevices:w(i({params:n(g(),u()).optional()}),p(Wu),{kind:`mutation`,auth:`admin`}),getDiscoveryParamsSchema:w(i({}),qu),getManualCreationType:w(i({}),i({deviceType:m(E).nullable()})),adoptDiscoveredDevice:w(i({candidate:Wu}),Gu,{kind:`mutation`,auth:`admin`}),supportsManualCreation:w(i({}),v()),getChildCreationSchema:w(i({type:m(E)}),qu),createDevice:w(i({type:m(E),config:n(g(),u())}),Gu,{kind:`mutation`,auth:`admin`}),testCreationField:w(i({type:m(E),key:g(),value:u(),formValues:n(g(),u()).optional()}),Ku,{kind:`mutation`,auth:`admin`})}},Yu=256,Xu=i({childKey:g(),section:g(),order:a().optional(),collapsed:v().optional()}),Zu=i({unit:g().min(1).optional(),precision:a().int().min(0).max(10).optional()}),Qu=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(),Zu).optional()}),$u=i({unit:g().min(1).optional(),precision:a().int().min(0).max(10).optional(),icon:g().min(1).optional()}),ed=i({id:a(),stableId:g(),addonId:g(),type:m(E),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:uu.optional(),integrationId:g().optional(),linkDeviceId:a().nullable().optional(),primaryChildEntityId:g().nullable().optional(),childLayout:p(Xu).readonly().optional(),display:Qu.optional()}),td=i({key:g(),value:u(),description:g().optional()}),nd=m([`auto`,`manual`]),rd=i({deviceId:a(),name:g(),location:g().nullable(),features:p(g()),producesTrackedEvents:v().optional()}),id=i({deviceId:a(),mode:nd,devices:p(rd)}),ad=i({deviceId:a(),entries:p(i({capName:g(),kind:m([`native`,`wrapped`]),providerAddonId:g(),providerNodeId:g(),nativeAddonId:g()}))}),od=i({id:a(),stableId:g(),type:g(),name:g(),location:g().nullable(),disabled:v(),parentDeviceId:a().nullable(),role:g().nullable().optional()}),sd=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:uu.optional(),integrationId:g().optional(),linkDeviceId:a().nullable().optional(),primaryChildEntityId:g().nullable().optional(),childLayout:p(Xu).readonly().optional(),role:g().nullable().optional(),display:Qu.optional()}),cd=u().nullable(),ld=i({streamId:g(),width:a().optional(),height:a().optional(),codec:g().optional(),fps:a().optional(),bitrateKbps:a().optional()}),ud=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())}),dd=i({deviceId:a()}),fd=i({deviceId:a(),data:n(g(),u())}),pd={name:`device-manager`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,methods:{allocateDeviceId:w(i({addonId:g(),stableId:g()}),i({id:a()}),{kind:`mutation`}),registerDevice:w(ud,h(),{kind:`mutation`}),removeDevice:w(dd,h(),{kind:`mutation`}),persistConfig:w(fd,h(),{kind:`mutation`}),loadConfig:w(i({deviceId:a()}),n(g(),u())),loadRuntimeState:w(i({deviceId:a()}),n(g(),u())),loadMeta:w(i({deviceId:a()}),sd.nullable()),setName:w(i({deviceId:a(),name:g()}),h(),{kind:`mutation`,auth:`admin`}),setLocation:w(i({deviceId:a(),location:g().nullable()}),h(),{kind:`mutation`,auth:`admin`}),setType:w(i({deviceId:a(),type:m(E)}),h(),{kind:`mutation`,auth:`admin`}),setIntegrationId:w(i({deviceId:a(),integrationId:g()}),h(),{kind:`mutation`,auth:`admin`}),setLinkDeviceId:w(i({deviceId:a(),linkDeviceId:a().nullable()}),h(),{kind:`mutation`,auth:`admin`}),setPrimaryChildEntityId:w(i({deviceId:a(),primaryChildEntityId:g().nullable()}),h(),{kind:`mutation`,auth:`admin`}),setChildLayout:w(i({deviceId:a(),childLayout:p(Xu).readonly()}),h(),{kind:`mutation`,auth:`admin`}),setDisplay:w(i({deviceId:a(),display:Qu.nullable()}),h(),{kind:`mutation`,auth:`admin`}),getRoleDisplayDefaults:w(i({}),i({defaults:n(g(),$u)}),{kind:`query`}),setRoleDisplayDefaults:w(i({defaults:n(g(),$u)}),h(),{kind:`mutation`,auth:`admin`}),getWireableFields:w(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:w(i({deviceId:a(),role:g().nullable()}),h(),{kind:`mutation`,auth:`admin`}),applyInitialMeta:w(i({deviceId:a(),name:g().optional(),location:g().nullable().optional(),type:m(E).optional(),integrationId:g().optional(),linkDeviceId:a().nullable().optional(),role:g().nullable().optional()}),h(),{kind:`mutation`,auth:`admin`}),setMetadata:w(i({deviceId:a(),patch:n(g(),u())}),h(),{kind:`mutation`,auth:`admin`}),listLocations:w(h(),p(g())),addLocation:w(i({name:g()}),h(),{kind:`mutation`,auth:`admin`}),removeLocation:w(i({name:g(),cascade:v().optional()}),h(),{kind:`mutation`,auth:`admin`}),setDisabled:w(i({deviceId:a(),disabled:v()}),h(),{kind:`mutation`,auth:`admin`}),listPersistedByAddon:w(i({addonId:g()}),p(od)),listAll:w(i({addonId:g().optional(),projection:m([`full`,`slim`]).optional(),isCamera:v().optional(),deviceIds:p(a()).optional()}),p(ed)),getDevice:w(i({deviceId:a()}),ed.nullable()),getChildren:w(i({parentDeviceId:a()}),p(ed)),getChildrenBatch:w(i({parentDeviceIds:p(a()).max(256)}),n(g(),p(ed))),getLinkedDevices:w(i({deviceId:a()}),i({mode:nd,devices:p(rd)})),getLinkedDevicesBatch:w(i({deviceIds:p(a())}),p(id)),getStreamSources:w(i({deviceId:a()}),p(Ze)),getConfigSchema:w(i({deviceId:a()}),p(td)),getSettingsSchema:w(i({deviceId:a()}),cd),updateConfig:w(i({deviceId:a(),values:n(g(),u())}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),enable:w(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),disable:w(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),remove:w(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),removeByIntegration:w(i({integrationId:g()}),i({removed:a()}),{kind:`mutation`,auth:`admin`}),getStreamProfileMap:w(i({deviceId:a()}),n(g(),g().nullable())),setStreamProfileMap:w(i({deviceId:a(),profileMap:n(g(),g().nullable())}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),probeStreams:w(i({deviceId:a()}),p(ld),{kind:`mutation`,auth:`admin`}),getBindings:w(i({deviceId:a()}),ad),getBindingsBatch:w(i({deviceIds:p(a())}),p(ad)),getAllBindings:w(i({}),p(ad)),setWrapperActive:w(i({deviceId:a(),capName:g(),wrapperAddonId:g(),active:v()}),h(),{kind:`mutation`,auth:`admin`}),listWrappersForCap:w(i({capName:g()}),p(g())),listBindableCapsForDeviceType:w(i({deviceType:g()}),p(i({capName:g(),wrappers:p(g())}))),getDeviceSettingsAggregate:w(i({deviceId:a()}),B.nullable()),getDeviceLiveInfoAggregate:w(i({deviceId:a()}),B.nullable()),getDeviceAggregate:w(i({deviceId:a()}),i({settings:B.nullable(),live:B.nullable()})),runDeviceAction:w(i({deviceId:a().int().nonnegative(),action:g().min(1),input:u()}),u(),{kind:`mutation`}),updateDeviceField:w(i({deviceId:a(),writerCapName:g(),writerAddonId:g(),key:g(),value:u()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),updateDeviceFieldsBatch:w(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:w(i({addonId:g()}),p(Wu),{kind:`mutation`,auth:`admin`}),adoptDevice:w(i({addonId:g(),candidate:Wu,integrationId:g().optional()}),Gu,{kind:`mutation`,auth:`admin`}),getCreationSchema:w(i({addonId:g(),type:m(E)}),u().nullable()),createDevice:w(i({addonId:g(),type:m(E),config:n(g(),u()),integrationId:g().optional()}),Gu,{kind:`mutation`,auth:`admin`}),testCreationField:w(i({addonId:g(),type:m(E),key:g(),value:u(),formValues:n(g(),u()).optional()}),Ku,{kind:`mutation`,auth:`admin`}),adoptionListCandidateFilters:w(i({addonId:g(),integrationId:g()}),i({filters:p(bu)}),{auth:`admin`}),adoptionListCandidates:w(Su.extend({addonId:g()}),Cu,{auth:`admin`}),adoptionRefresh:w(i({addonId:g(),integrationId:g()}),Tu,{kind:`mutation`,auth:`admin`}),adoptionAdopt:w(Du.extend({addonId:g()}),Ou,{kind:`mutation`,auth:`admin`}),adoptionRelease:w(ku.extend({addonId:g()}),h(),{kind:`mutation`,auth:`admin`}),adoptionStartJob:w(Du.extend({addonId:g()}),i({jobId:g()}),{kind:`mutation`,auth:`admin`}),adoptionListJobs:w(i({addonId:g(),integrationId:g().optional()}),p(kr).readonly(),{auth:`admin`}),adoptionCancelJob:w(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),adoptionResync:w(Au,ju,{kind:`mutation`,auth:`admin`}),discoveryProviders:w(i({}),i({providers:p(i({addonId:g(),label:g()})).readonly()}),{auth:`admin`}),discoverAllProviders:w(i({}),i({groups:p(i({addonId:g(),label:g(),candidates:p(Wu).readonly(),error:g().nullable()})).readonly()}),{kind:`mutation`,auth:`admin`}),discoverProvider:w(i({addonId:g(),params:n(g(),u()).optional()}),i({candidates:p(Wu).readonly()}),{kind:`mutation`,auth:`admin`}),providerCreationType:w(i({addonId:g()}),i({deviceType:m(E).nullable()}),{auth:`admin`}),providerDiscoveryParamsSchema:w(i({addonId:g()}),u(),{auth:`admin`}),testField:w(i({deviceId:a(),key:g(),value:u()}),Ku,{kind:`mutation`,auth:`admin`}),getDeviceStatusAggregate:w(i({deviceId:a(),caps:p(g()).readonly().optional()}),n(g(),u().nullable())),getDeviceStatusAggregateBatch:w(i({deviceIds:p(a()).readonly(),caps:p(g()).readonly().optional()}),n(g(),n(g(),u().nullable())))}},md={name:`device-state`,scope:`system`,mode:`singleton`,methods:{getSnapshot:w(i({deviceId:a()}),n(g(),n(g(),u()))),getCapSlice:w(i({deviceId:a(),capName:g()}),n(g(),u()).nullable()),getAllSnapshots:w(i({}),n(g(),n(g(),n(g(),u())))),setCapSlice:w(i({deviceId:a(),capName:g(),slice:n(g(),u())}),h(),{kind:`mutation`})},events:{onChanged:T(i({deviceId:a(),capName:g(),slice:n(g(),u())}))}},hd=i({embedding:p(a()),inferenceMs:a()}),gd=i({modelId:g(),embeddingDim:a(),ready:v()}),_d={name:`embedding-encoder`,scope:`system`,mode:`collection`,internal:!0,methods:{encode:w(i({crop:_(Uint8Array),width:a(),height:a()}),hd,{auth:`admin`}),encodeText:w(i({text:g()}),hd,{auth:`admin`}),getInfo:w(h(),gd,{auth:`admin`})}},vd=i({name:g(),path:g()}),yd=i({path:g(),entries:p(vd).readonly(),freeBytes:a(),totalBytes:a()}),bd={name:`filesystem-browse`,scope:`system`,mode:`singleton`,internal:!0,methods:{listAllowedRoots:w(h(),p(g()).readonly(),{auth:`admin`}),browse:w(i({path:g()}),yd,{auth:`admin`}),createDir:w(i({path:g()}),i({path:g()}),{kind:`mutation`,auth:`admin`})}},xd=i({inputTokens:a(),outputTokens:a()}),Sd=m([`timeout`,`rate-limited`,`auth`,`refusal`,`bad-request`,`unavailable`,`no-profile`,`budget-exceeded`,`adapter-error`]),Cd=i({ok:y(!0),text:g(),model:g(),usage:xd,truncated:v(),latencyMs:a()}),wd=i({ok:y(!1),code:Sd,message:g(),retryAfterMs:a().optional()}),Td=b(`ok`,[Cd,wd]),Ed=i({bytes:_(Uint8Array),mimeType:g()}),Dd=i({enabled:v().default(!1),maxAttempts:a().int().min(1).max(5).default(1)}),Od={totalMs:6e4,connectMs:1e4,firstTokenMs:12e4,idleMs:6e4},kd=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:Dd.optional(),requestId:g().optional()}),Ad=i({url:g(),filename:g(),sizeBytes:a(),sha256:g().optional()}),jd=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(Ad).optional()}),i({kind:y(`path`),path:g()})]),Md=i({nodeId:g(),engine:m([`llama-cpp`]),model:jd,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)}),Nd=i({phase:m([`downloading`,`verifying`]),file:g(),fileIndex:a().int(),fileCount:a().int(),downloadedBytes:a(),totalBytes:a().optional()}),Pd=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:Nd.optional(),lastError:g().optional(),crashesInWindow:a(),memoryBytes:a().optional(),vramBytes:a().optional()}),Fd=i({file:g(),sizeBytes:a(),catalogId:g().optional(),installedAt:a().optional(),path:g().optional()}),Id=i({nodeId:g(),modelsBytes:a(),freeBytes:a().optional()}),Ld=kd.extend({images:p(Ed).optional(),runtime:Md,timeoutMs:a().int().positive().optional()}),Rd={name:`llm-runtime`,scope:`system`,mode:`singleton`,internal:!0,methods:{complete:w(Ld,Td,{kind:`mutation`,auth:`admin`}),ensureStarted:w(i({runtime:Md}),Pd,{kind:`mutation`,auth:`admin`}),stop:w(i({}),h(),{kind:`mutation`,auth:`admin`}),status:w(i({}),Pd,{auth:`admin`}),installModel:w(i({model:jd}),h(),{kind:`mutation`,auth:`admin`}),deleteModel:w(i({file:g()}),h(),{kind:`mutation`,auth:`admin`}),listLocalModels:w(i({}),p(Fd),{auth:`admin`}),getDiskUsage:w(i({}),Id,{auth:`admin`})}},zd=m([`openai-compatible`,`openai`,`anthropic`,`google`,`managed-local`]),Bd=i({id:g(),name:g(),kind:zd,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:Dd.default({enabled:!1,maxAttempts:1}),toolsEnabled:v().default(!1),extraHeaders:n(g(),g()).optional(),runtime:Md.optional()}),Vd=u(),Hd=i({kind:zd,label:g(),icon:g(),addonId:g(),configSchema:Vd}),Ud=c([i({consumer:g()}),i({purpose:m([`text`,`vision`])})]),Wd=i({selector:Ud,profileId:g()}),Gd=i({day:g(),consumer:g(),profileId:g(),calls:a(),okCalls:a(),errorCalls:a(),inputTokens:a(),outputTokens:a(),avgLatencyMs:a()}),Kd=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()}),qd=b(`ok`,[i({ok:y(!0),model:jd,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()})]),Jd=i({nodeId:g(),reachable:v(),status:Pd.optional(),disk:Id.optional(),error:g().optional()}),Yd=kd.extend({images:p(Ed).min(1)}),Xd=i({addonId:g(),profileId:g()}),Zd={name:`llm`,scope:`system`,mode:`collection`,internal:!1,providerKind:`ai`,nodeIdMode:`data`,methods:{generate:w(kd,Td,{kind:`mutation`}),generateVision:w(Yd,Td,{kind:`mutation`}),cancel:w(i({addonId:g().optional(),requestId:g()}),h(),{kind:`mutation`}),listProfileKinds:w(i({}),p(Hd)),listProfiles:w(i({}),p(Bd)),upsertProfile:w(i({profile:Bd}),Bd,{kind:`mutation`,auth:`admin`}),deleteProfile:w(Xd,h(),{kind:`mutation`,auth:`admin`}),testProfile:w(Xd,Td,{kind:`mutation`,auth:`admin`}),listModels:w(Xd,p(g())),getDefaults:w(i({}),p(Wd)),setDefault:w(i({selector:Ud,profileId:g().nullable()}),h(),{kind:`mutation`,auth:`admin`}),getUsage:w(i({since:a().optional(),until:a().optional(),consumer:g().optional(),profileId:g().optional()}),p(Gd)),listModelCatalog:w(i({}),p(Kd)),listRuntimeNodes:w(i({}),p(Jd)),listNodeModels:w(i({nodeId:g()}),p(Fd)),resolveModelRef:w(i({ref:g(),maxBytes:a().positive().optional()}),qd,{kind:`mutation`,auth:`admin`}),installModel:w(i({nodeId:g(),model:jd}),h(),{kind:`mutation`,auth:`admin`}),deleteModel:w(i({nodeId:g(),file:g()}),h(),{kind:`mutation`,auth:`admin`}),getRuntimeStatus:w(Xd,Pd),startRuntime:w(Xd,Pd,{kind:`mutation`,auth:`admin`}),stopRuntime:w(Xd,h(),{kind:`mutation`,auth:`admin`})}},Qd=i({armed:a().int().min(0),unknown:p(g()).readonly()}),$d={name:`log-channels`,scope:`system`,mode:`collection`,internal:!0,methods:{list:w(h(),p(ai).readonly()),apply:w(i({windows:p(oi).readonly()}),Qd,{kind:`mutation`})},mount:{kind:`skip`}},ef=m([`debug`,`info`,`warn`,`error`]),tf=i({timestamp:te(),level:ef,scope:p(g()),message:g(),meta:n(g(),u()).optional(),tags:n(g(),g()).optional()}),nf={name:`log-destination`,scope:`system`,mode:`collection`,internal:!0,methods:{write:w(tf,h(),{kind:`mutation`}),query:w(i({scope:p(g()).optional(),level:ef.optional(),since:te().optional(),until:te().optional(),limit:a().optional(),tags:n(g(),g()).optional()}),p(tf).readonly())},mount:{kind:`skip`}},rf=i({reason:g(),count:a().int().nonnegative()}),af=i({family:g(),deviceId:a().int().positive(),variant:g().optional(),sinceMs:a(),atMs:a(),attempts:a().int().nonnegative(),succeeded:a().int().nonnegative(),reasons:p(rf).readonly()}),of={name:`failure-contribution`,scope:`system`,mode:`collection`,internal:!0,methods:{list:w(h(),p(af).readonly())},mount:{kind:`skip`}},sf=[`decode`,`transcode`,`recording`,`streaming`,`detection`],cf=[`measured`,`accounted`,`unattributable`],lf=i({role:m(sf),deviceId:a().int().positive().nullable(),attribution:m(cf),unit:g(),pid:a().int().positive().optional(),startedAtMs:a().optional(),cpuSeconds:a().optional(),rssBytes:a().optional()}),uf={name:`load-contribution`,scope:`system`,mode:`collection`,internal:!0,methods:{list:w(h(),p(lf).readonly())},mount:{kind:`skip`}},df=m([`primary`,`second-factor`]),ff=i({kind:y(`redirect`),id:g(),label:g(),icon:g().optional(),startUrl:g(),stage:df}),pf=i({kind:y(`widget`),id:g(),addonId:g(),bundle:g(),remote:Vs,stage:df}),mf=i({kind:y(`passkey`),id:g(),label:g(),stage:df,rpId:g(),origin:g().nullable()}),hf=b(`kind`,[ff,pf,mf]),gf={name:`login-method`,scope:`system`,mode:`collection`,internal:!0,methods:{getLoginMethods:w(h(),p(hf).readonly())},mount:{kind:`skip`}},_f=i({total:a(),user:a(),system:a(),irq:a(),nice:a(),loadAvg:s([a(),a(),a()]),cores:a()}),vf=i({percent:a(),totalBytes:a(),usedBytes:a(),availableBytes:a(),swapUsedBytes:a(),swapTotalBytes:a()}),yf=i({readBytes:a(),writeBytes:a(),readOps:a(),writeOps:a(),timestampMs:a()}),bf=i({rxBytes:a(),txBytes:a(),rxPackets:a(),txPackets:a(),rxErrors:a(),txErrors:a(),timestampMs:a()}),xf=i({utilization:a(),model:g(),memoryUsedBytes:a(),memoryTotalBytes:a(),temperature:a().nullable()}),Sf=i({openFds:a(),threadCount:a(),activeHandles:a(),activeRequests:a()}),Cf=i({avg10:a(),avg60:a(),avg300:a()}),wf=i({some:Cf,full:Cf.nullable()}),Tf=i({cpu:_f,memory:vf,gpu:xf.nullable(),network:bf,disk:yf,pressure:i({cpu:wf.nullable(),memory:wf.nullable(),io:wf.nullable()}),process:Sf,cpuTemperature:a().nullable(),timestampMs:a()}),Ef=i({path:g(),totalBytes:a(),usedBytes:a(),availableBytes:a(),percent:a()}),Df=i({pid:a(),cpu:a(),memory:a(),privateBytes:a().optional(),sharedBytes:a().optional()}),Of=i({addonId:g(),nodeId:g(),role:m([`hub`,`worker`]),pid:a(),state:m([`starting`,`running`,`stopping`,`stopped`,`crashed`]),uptimeSec:a()}),kf=i({pid:a(),ppid:a(),pgid:a(),classification:m([`root`,`managed`,`system`]),addonId:g().nullable(),nodeId:g().nullable(),command:g(),cpuPercent:a(),memoryRssBytes:a(),cpuMainPercent:a().nullable(),cpuGcPercent:a().nullable(),threadCount:a().nullable(),uptimeSec:a()}),Af=i({source:m([`cgroup-v2`,`cgroup-v1`]),currentBytes:a(),limitBytes:a().nullable(),anonBytes:a().nullable(),fileBytes:a().nullable(),shmemBytes:a().nullable(),slabBytes:a().nullable(),gpuShmemBytes:a().nullable()}).extend({atMs:a()}),jf=i({addonId:g()}),Mf=i({success:v(),path:g().optional(),pid:a().optional(),reason:g().optional()}),Nf=i({atMs:a(),samples:a().int(),cpuMainPercent:a().nullable(),cpuMainPercentMin:a().nullable(),cpuGcPercent:a().nullable(),cpuGcPercentMin:a().nullable(),cpuLifetimePercent:a(),cpuLifetimePercentMin:a(),memoryRssBytes:a(),memoryRssBytesMin:a(),processCount:a().int(),processCountMin:a().int()}),Pf=i({key:g(),kind:m([`addon`,`root`,`unattributed`]),points:p(Nf).readonly()}),Ff=i({nodeId:g(),series:p(Pf).readonly(),containerMemory:p(Af).readonly(),bucketMs:a(),retainedSamples:a(),oldestAtMs:a().nullable(),cadenceMs:a(),durable:v()}),If=i({forNodeId:g(),sinceMs:a().optional(),maxPoints:a().int().positive().optional()}),Lf=i({cpuPercent:a(),memoryPercent:a(),memoryUsedMB:a(),memoryTotalMB:a(),diskPercent:a().optional(),temperature:a().optional(),gpuPercent:a().optional(),gpuMemoryPercent:a().optional()}),Rf={name:`metrics-provider`,scope:`system`,mode:`singleton`,methods:{collectSnapshot:w(h(),Tf),getCached:w(h(),Tf.nullable()),getCurrent:w(h(),Lf),getDiskSpace:w(i({dirPath:g()}),Ef),getGpuInfo:w(h(),xf.nullable()),getCpuTemperature:w(h(),a().nullable()),getProcessStats:w(i({pids:p(a())}),p(Df)),listAddonInstances:w(h(),p(Of).readonly()),getAddonStats:w(i({addonId:g()}),Df.nullable()),listNodeProcesses:w(h(),p(kf).readonly()),getLoadSeries:w(If,Ff),dumpHeapSnapshot:w(jf,Mf,{kind:`mutation`,auth:`admin`})}},zf=i({sourceUrl:g(),metadata:no,targets:p(to).min(1).readonly(),calibrationRef:g().optional(),sessionId:g().optional()}),Bf={name:`model-convert`,scope:`system`,mode:`singleton`,internal:!0,methods:{convert:w(zf,io,{kind:`mutation`,auth:`admin`,timeoutMs:6e5})}},Vf=i({nodeId:g(),modelId:g(),format:m(qa),entry:eo}),Hf=i({ok:v(),sha256:g(),bytes:a(),path:g()}),Uf={name:`model-distributor`,scope:`system`,mode:`singleton`,internal:!0,methods:{distributeModel:w(Vf,Hf,{kind:`mutation`,auth:`admin`})}},Wf=i({bbox:V,pixelCount:a(),intensity:a()}),Gf=i({detected:v(),regionCount:a(),regions:p(Wf).readonly(),rawRegions:p(Wf).readonly(),frameWidth:a(),frameHeight:a(),analysisMs:a()}),Kf={name:`motion-detection`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[E.Camera],exposesDeviceSettings:!0,methods:{analyze:w(i({deviceId:a(),frame:$s.optional(),frameHandle:C.optional()}),Gf,{kind:`mutation`}),removeCamera:w(i({deviceId:a()}),h(),{kind:`mutation`}),reset:w(h(),h(),{kind:`mutation`})},events:{onMotion:{data:i({deviceId:a(),detected:v(),regionCount:a()})}}},qf=m([`external`,`embedded`]),Jf=m([`connected`,`disconnected`,`auth-failed`,`unreachable`,`tls-error`]),Yf=i({id:g(),name:g(),url:g(),kind:qf,status:Jf,latencyMs:a().nullable(),error:g().optional(),connectedClients:a().int().nonnegative().optional(),lastCheckedAt:a().optional()}),Xf=i({url:g(),username:g().optional(),password:g().optional(),clientIdPrefix:g().optional()}),Zf=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()}),Qf=i({id:g()}),$f=i({id:g()}),ep=b(`ok`,[i({ok:y(!0),latencyMs:a()}),i({ok:y(!1),error:g()})]),tp=i({port:a().int().min(1).max(65535).default(1883),allowAnonymous:v().default(!1),username:g().optional(),password:g().optional()}),np=i({id:g(),url:g()}),rp=i({brokerCount:a(),embeddedRunning:v()}),ip={name:`mqtt-broker`,scope:`system`,mode:`collection`,providerKind:`broker`,status:{schema:rp,kind:`poll`},methods:{listBrokers:w(h(),p(Yf)),getBrokerConfig:w($f,Xf),addBroker:w(Zf,Qf,{kind:`mutation`}),removeBroker:w($f,h(),{kind:`mutation`}),testConnection:w($f,ep,{kind:`mutation`}),startEmbeddedBroker:w(tp,np,{kind:`mutation`}),stopEmbeddedBroker:w($f,h(),{kind:`mutation`}),getStatus:w(h(),rp)}},ap=i({url:g(),hostname:g(),port:a(),protocol:m([`http`,`https`])}),op=i({connected:v(),endpoint:ap.nullable(),error:g().optional()}),sp=ap.extend({id:g(),label:g(),mode:g().optional(),sourcePort:a().optional()}),cp={name:`network-access`,scope:`system`,mode:`collection`,providerKind:`ingress`,methods:{start:w(h(),ap,{kind:`mutation`}),stop:w(h(),h(),{kind:`mutation`}),getEndpoint:w(h(),ap.nullable()),getStatus:w(h(),op),listEndpoints:w(h(),p(sp).readonly())}},lp=m([`image`,`video`,`gif`,`audio`,`icon`]),up=i({mediaType:lp,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`"}),dp=m([`text`,`markdown`,`html`]),fp=m([`acknowledge`,`dismiss`,`silence`,`snooze`,`view`,`play`,`open`,`close`,`lock`,`unlock`,`arm`,`arm-home`,`arm-away`,`arm-night`,`disarm`,`light`,`alert`,`camera`]),pp=i({id:g(),label:g(),url:g().optional(),icon:fp.optional(),destructive:v().optional(),mode:m([`navigate`,`background`]).optional()}),mp=i({body:g(),title:g().optional(),format:dp.default(`text`),priority:a().int().min(1).max(5).default(3),level:g().optional(),attachments:p(up).optional(),clickUrl:g().optional(),actions:p(pp).optional(),sound:g().optional(),ttl:a().optional(),tag:g().optional(),deviceId:a().optional(),eventId:g().optional(),metadata:n(g(),u()).optional()}),hp=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()}),gp=i({attachments:i({mediaTypes:p(lp),mode:m([`url`,`bytes`,`both`]),max:a().int().nonnegative(),maxBytes:a().int().positive().optional()}),actions:a().int().nonnegative(),actionIcons:v().optional(),levels:p(hp),format:p(dp),clickUrl:v(),sound:v(),ttl:v(),bodyMaxLen:a().int().positive()}),_p=u(),vp=i({kind:g(),label:g(),icon:g(),addonId:g(),iconUrl:g().optional(),iconMediaType:g().optional(),configSchema:_p,supportsDiscovery:v(),caps:gp}),yp=i({id:g(),name:g(),kind:g(),addonId:g(),enabled:v(),config:n(g(),u())}),bp=i({kind:g(),suggestedName:g(),config:n(g(),u())}),xp=i({level:g(),format:dp,attachmentsSent:a().int().nonnegative(),actionsSent:a().int().nonnegative(),truncated:v(),dropped:p(g())}),Sp=i({success:v(),error:g().optional(),renderedAs:xp.optional()}),Cp=Sp,wp={name:`notification-output`,scope:`system`,mode:`collection`,methods:{listTargetKinds:w(i({}),p(vp)),listTargets:w(i({}),p(yp)),discoverTargets:w(i({kind:g(),config:n(g(),u()).optional()}),p(bp)),send:w(i({targetId:g(),notification:mp}),Sp,{kind:`mutation`}),testTarget:w(i({targetId:g(),sample:mp.optional()}),Cp,{kind:`mutation`}),upsertTarget:w(i({target:yp}),yp,{kind:`mutation`}),deleteTarget:w(i({targetId:g()}),h(),{kind:`mutation`}),setTargetEnabled:w(i({targetId:g(),enabled:v()}),h(),{kind:`mutation`})}},Tp=[{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`}],Ep=[{id:`person`,name:`Person`},{id:`vehicle`,name:`Vehicle`},{id:`animal`,name:`Animal`},{id:`package`,name:`Package`}],Dp=new Set(Ep.map(e=>e.id));function Op(e){return Dp.has(e.trim().toLowerCase())}var kp={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},Ap=[{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`}],jp={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},Mp={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},Np=new Map;for(let[e,t]of Object.entries(jp.mapping))Np.set(e.toLowerCase(),t);for(let[e,t]of Object.entries(Mp.mapping))Np.set(e.toLowerCase(),t);function Pp(e){return Np.get(e.toLowerCase())??null}function Fp(){return Ap.map(e=>e.id)}var W={motion:`#f59e0b`,audio:`#06b6d4`,person:`#22c55e`,vehicle:`#3b82f6`,animal:`#f97316`,package:`#a855f7`,sensor:`#8b5cf6`,control:`#10b981`,genericDetection:`#64748b`},Ip=`#22ff55`,Lp={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 Rp(e){return e.split(/[-_ ]/).filter(e=>e.length>0).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}var zp=new Map;function G(e,t,n,r,i){zp.set(e,{kind:e,parentKind:null,level:`macro`,category:t,color:n,iconId:r,labelKey:`eventKind.${e}`,label:i})}function K(e,t,n,r,i,a){zp.set(e,{kind:e,parentKind:t,level:`sub`,category:n,color:r,iconId:i,labelKey:`eventKind.${e}`,label:a})}G(`motion`,`motion`,W.motion,`motion`,`Motion`),G(`audio`,`audio`,W.audio,`audio`,`Audio`),G(`person`,`detection`,W.person,`person`,`Person`),G(`vehicle`,`detection`,W.vehicle,`vehicle`,`Vehicle`),G(`animal`,`detection`,W.animal,`animal`,`Animal`),G(`package`,`package`,W.package,`package`,`Package`),G(`sensor`,`sensor`,W.sensor,`sensor`,`Sensor`),G(`control`,`control`,W.control,`control`,`Control`);for(let[e,t]of Object.entries(kp.mapping))t!==`vehicle`&&t!==`animal`||zp.has(e)||K(e,t,`detection`,Lp[e]??W.genericDetection,e,Rp(e));K(`package-delivered`,`package`,`package`,W.package,`package`,`Package delivered`),K(`package-picked-up`,`package`,`package`,W.package,`package`,`Package picked up`),K(`contact`,`sensor`,`sensor`,`#f59e0b`,`door`,`Contact`),K(`motion-sensor`,`sensor`,`sensor`,W.sensor,`pir`,`Motion sensor`),K(`smoke`,`sensor`,`sensor`,`#ef4444`,`smoke`,`Smoke`),K(`flood`,`sensor`,`sensor`,`#3b82f6`,`water`,`Water leak`),K(`gas`,`sensor`,`sensor`,`#ef4444`,`gas`,`Gas`),K(`carbon-monoxide`,`sensor`,`sensor`,`#dc2626`,`smoke`,`Carbon monoxide`),K(`vibration`,`sensor`,`sensor`,`#eab308`,`vibration`,`Vibration`),K(`tamper`,`sensor`,`sensor`,`#f97316`,`tamper`,`Tamper`),K(`presence`,`sensor`,`sensor`,`#22c55e`,`presence`,`Presence`),K(`enum-sensor`,`sensor`,`sensor`,W.sensor,`generic`,`Sensor state`),K(`device-event`,`sensor`,`sensor`,`#10b981`,`button`,`Device event`),K(`lock`,`control`,`control`,`#0ea5e9`,`lock`,`Lock`),K(`switch`,`control`,`control`,W.control,`switch`,`Switch`),K(`siren`,`control`,`control`,`#dc2626`,`siren`,`Siren`),K(`button`,`control`,`control`,`#10b981`,`button`,`Button`),K(`doorbell`,`control`,`control`,`#a855f7`,`doorbell`,`Doorbell`);for(let e of Ap){let t=`audio-${e.id}`;zp.has(t)||K(t,`audio`,`audio`,W.audio,t,e.name)}var Bp=Object.freeze(Object.fromEntries(zp));function Vp(e){return Bp[e]}function Hp(e){return Bp[e]?.color??`#22ff55`}function Up(e){let t=[];for(let n of Object.values(Bp))n.parentKind===e&&t.push(n);return t}var Wp=i({kind:g(),label:g(),parentKind:g().nullable()}),Gp=i({videoClasses:p(Wp),audioKinds:p(Wp),labels:p(Wp)});function Kp(e,t,n){return{kind:e,label:t,parentKind:n}}function qp(){let e=Object.values(Bp);return{videoClasses:e.filter(e=>e.category===`detection`).map(e=>Kp(e.kind,e.label,e.parentKind)),audioKinds:e.filter(e=>e.category===`audio`&&e.level===`sub`).map(e=>Kp(e.kind,e.label,e.parentKind)),labels:e.filter(e=>e.category===`sensor`||e.category===`control`).map(e=>Kp(e.kind,e.label,e.parentKind))}}var Jp=Object.freeze(qp()),Yp=m([`disarmed`,`armed_home`,`armed_away`,`armed_night`,`armed_vacation`,`armed_custom_bypass`,`arming`,`disarming`,`pending`,`triggered`]),Xp=m([`home`,`away`,`night`,`vacation`,`custom_bypass`]),Zp=i({state:Yp,availableModes:p(Xp),requiresCode:v(),lastChangedAt:a()}),Qp={name:`alarm-panel`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.AlarmPanel],methods:{arm:w(i({deviceId:a().int().nonnegative(),mode:Xp,code:g().min(1).optional()}),h(),{kind:`mutation`,auth:`admin`}),disarm:w(i({deviceId:a().int().nonnegative(),code:g().min(1).optional()}),h(),{kind:`mutation`,auth:`admin`}),trigger:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:Zp,kind:`push`},runtimeState:Zp,durability:`restored`,volatileStateFields:[`lastChangedAt`]},$p=i({x:a(),y:a()}),em=i({kind:y(`rect`),x:a(),y:a(),width:a(),height:a()}),tm=i({kind:y(`polygon`),points:p($p)}),nm=i({kind:y(`grid`),gridWidth:a(),gridHeight:a(),cells:p(v())}),rm=i({kind:y(`line`),points:p($p)}),im=b(`kind`,[em,tm,nm,rm]),am=m([`rect`,`polygon`,`grid`,`line`]),om=i({min:a(),max:a()}),sm=i({width:a(),height:a()}),cm=m([`immediate`,`track-end`,`device-event`,`package-event`,`system-event`]),lm=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`]),um=new Set([`camera-online`,`camera-offline`,`camera-disabled`,`camera-enabled`]),dm=lm.options.filter(e=>!um.has(e)),fm=[`alarm-arm-refused`,`alarm-arming`,`alarm-armed`,`alarm-triggered`,`alarm-disarmed`],pm=i({kinds:p(lm).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()}),mm=1,hm=1440,gm=[10,30,60],_m=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)}),vm=i({windows:p(_m).min(1),timezone:g().optional(),invert:v().optional()}),ym=i({values:p(g().min(1)),maxDistance:a().int().min(0).max(3).default(1)}),bm=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)}),xm=-96,Sm=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),confirmHits:a().int().min(1).max(20).optional(),confirmWindowSec:a().int().min(1).max(60).optional()}),Cm=m([`enter`,`exit`,`any`]),wm=i({ids:p(g().min(1)).min(1),match:m([`any`,`all`]).default(`any`)}),Tm=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()})]),Em=i({name:g().min(1).max(120),enabled:v(),minDelaySec:a().int().min(0).max(86400).optional(),actions:p(Tm).min(1)}),Dm=i({id:g().min(1).max(64),label:g().min(1).max(40),sequence:g().min(1).max(120),icon:fp.optional(),destructive:v().optional()}),Om=i({onTrigger:p(Em).optional(),buttons:p(Dm).max(8).optional()}),km=i({deviceId:a().int(),states:p(g().min(1)).min(1)}),Am=i({sceneId:g().min(1),deviceId:a().int().optional(),requiredState:m([`matched`,`diverged`]),latched:v().optional()}),jm=i({deviceState:km.optional(),scene:Am.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:wm.optional(),zonesExclude:p(g().min(1)).optional(),crossing:Cm.optional(),labelEquals:p(g().min(1)).optional(),identities:p(g().min(1)).optional(),plates:ym.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:pm.optional(),customZones:p(tm).optional(),occupancy:bm.optional(),audio:Sm.optional()}),Mm=i({targetId:g().min(1),params:n(g(),u()).optional()}),Nm=m([`cropped`,`full`,`boxed`]),Pm=i({attach:m([`best`,`best-matching`,`keyFrame`,`none`]).default(`best`),frame:Nm.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()}),Fm=m([`shared`,`per-class`]),Im=i({cooldownSec:a().int().min(0).max(86400).default(60),scope:m([`rule`,`rule-device`]).default(`rule-device`),granularity:Fm.optional()}),Lm=1e3,Rm=2e4,zm=8e3,Bm=448,Vm=i({op:m([`>=`,`>`,`<=`,`<`,`==`]),count:a().int().min(0).max(1e3)}),Hm=i({enabled:v().default(!1),profileId:g().optional(),prompt:g().max(1e3).optional(),expect:Vm.optional(),timeoutMs:a().int().min(Lm).max(Rm).default(zm),onTimeout:m([`fire`,`suppress`]).default(`fire`),maxImagePx:a().int().min(64).max(2048).default(448)}),Um=i({name:g().min(1).max(200),enabled:v().default(!0),delivery:cm,conditions:jm.default({}),schedule:vm.optional(),targets:p(Mm),targetUsers:p(g()).optional(),media:Pm.default({attach:`best`}),throttle:Im.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(hm)).max(4).optional(),actions:Om.optional(),confirm:Hm.optional(),waitForEnhancement:v().optional(),groupIdleSec:a().int().min(0).max(600).optional()}),Wm=Um.partial().extend({disabledTargetIds:p(g()).optional(),enabled:v().optional(),conditions:jm.optional(),media:Pm.optional(),throttle:Im.optional(),priority:a().int().min(1).max(5).optional()}),Gm=Um.extend({id:g(),createdBy:g(),createdAt:a(),updatedAt:a(),disabledTargetIds:p(g()).default([])}),Km=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()}),qm=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(cm),phase:g(),description:g().optional(),options:p(i({value:g(),label:g(),hint:g().optional()})).readonly().optional()}),Jm=[{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.`}],Ym=m([`pending`,`sent`,`dead`]),Xm=m([`object-event`,`track-end`,`device-event`,`package-event`,`system-event`]),Zm=i({className:g(),label:g().optional(),confidence:a().optional(),zones:p(g()),timestamp:a(),systemEvent:i({kind:lm,subject:g(),title:g(),body:g(),data:n(g(),u())}).optional()}),Qm=i({id:g(),ruleId:g(),ruleName:g(),delivery:cm,targetId:g(),deviceId:a(),recordKind:Xm,recordId:g(),trackId:g().optional(),status:Ym,attempts:a().int(),createdAt:a(),updatedAt:a(),error:g().optional(),subject:Zm,artifactIds:p(g().min(1)).optional()}),$m=100,eh=500,th=i({ruleId:g().optional(),deviceId:a().optional(),status:Ym.optional(),since:a().optional(),until:a().optional(),limit:a().int().min(1).max(500).default(100)}),nh=m([`rule`,`device`,`all`]),rh=i({scope:nh,ruleId:g().optional(),deviceId:a().int().optional(),classes:p(g().min(1)).min(1).optional(),durationMinutes:a().int().min(1).max(hm),global:v().optional(),summary:v().optional()}),ih=i({id:g(),userId:g(),scope:nh,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()}),ah=i({snoozeId:g(),targetId:g(),ruleId:g(),ruleName:g(),deviceId:a().int(),count:a().int(),firstAt:a(),lastAt:a()}),oh=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)}),sh=oh.partial(),ch=m([`muted`,`detection-off`,`offline`]),lh=i({deviceId:a().int(),reason:ch}),uh=i({mode:Xp,ruleCount:a().int().min(0),allDevices:v(),deviceIds:p(a().int()),skippedDevices:p(lh).default([])}),dh=i({deviceId:a().int().nullable(),settings:oh,coverage:p(uh)}),fh={name:`notification-rules`,scope:`system`,mode:`singleton`,methods:{listRules:w(i({}),i({rules:p(Gm)}),{auth:`admin`}),getRule:w(i({ruleId:g()}),i({rule:Gm.nullable()}),{auth:`admin`}),createRule:w(i({rule:Um}),i({rule:Gm}),{kind:`mutation`,auth:`admin`,caller:`required`}),updateRule:w(i({ruleId:g(),patch:Wm}),i({rule:Gm}),{kind:`mutation`,auth:`admin`,caller:`required`}),deleteRule:w(i({ruleId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setRuleEnabled:w(i({ruleId:g(),enabled:v()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),listDeviceMutes:w(i({}),i({mutedDeviceIds:p(a().int()).readonly()}),{auth:`admin`}),setDeviceMuted:w(i({deviceId:a().int(),muted:v()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),testRule:w(i({rule:Um,lookbackMinutes:a().int().min(1).max(1440).default(60)}),i({results:p(Km)}),{kind:`mutation`,auth:`admin`}),getConditionCatalog:w(i({}),i({catalog:p(qm),taxonomy:Gp.optional()})),getHistory:w(i({filter:th.default({limit:100})}),i({entries:p(Qm)}),{auth:`admin`}),resolveArtifactUrl:w(i({artifactId:g().min(1)}),i({url:g().nullable()}),{auth:`admin`}),listSnoozes:w(i({}),i({snoozes:p(ih)}),{caller:`required`}),createSnooze:w(i({snooze:rh}),i({snooze:ih}),{kind:`mutation`,caller:`required`}),cancelSnooze:w(i({snoozeId:g()}),i({success:y(!0)}),{kind:`mutation`,caller:`required`}),getAlarmConfig:w(i({}),dh,{auth:`admin`}),setAlarmConfig:w(i({patch:sh}),dh,{kind:`mutation`,auth:`admin`})}},ph=m([`view`,`create`,`delete`]),mh=c([y(`*`),p(g())]),hh=n(g(),c([y(`*`),p(g())])),gh=m([`device`,`system`]),_h=b(`kind`,[i({kind:y(`all`)}),i({kind:y(`ids`),ids:p(a().int()).min(1)}),i({kind:y(`types`),types:p(m(E)).min(1)}),i({kind:y(`locations`),locations:p(g().min(1)).min(1)})]),vh=i({type:y(`device`),selector:_h,access:p(ph).min(1),includeLinked:v().optional()});function yh(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 q=oe(yh,b(`type`,[i({type:y(`category`),target:gh,access:p(ph).min(1)}),i({type:y(`capability`),target:g(),access:p(ph).min(1)}),i({type:y(`addon`),target:g(),access:p(ph).min(1)}),vh])),bh=i({id:g(),username:g(),passwordHash:g(),isAdmin:v().default(!1),allowedProviders:mh,allowedDevices:hh,scopes:p(q).default([]),createdAt:a(),updatedAt:a()}),xh=i({id:g(),label:g(),isAdmin:v().default(!1),allowedProviders:mh,allowedDevices:hh,tokenHash:g(),tokenPrefix:g(),createdAt:a(),lastUsedAt:a().optional()}),Sh=i({id:g(),userId:g(),name:g(),tokenHash:g(),tokenPrefix:g(),scopes:p(q),expiresAt:a().nullish(),lastUsedAt:a().nullish(),createdAt:a()}),Ch=i({integrationId:g(),displayName:g(),requestedScopes:p(q),allowedRedirectPrefixes:p(g()).min(1),allowedPrivateHostPaths:p(g()).optional(),requiresPkce:v().optional(),hubUrl:g().optional(),refreshTokenTtlSec:c([a().int().positive(),y(`never`)]).optional()}),wh={name:`oauth-integration`,scope:`system`,mode:`collection`,internal:!0,methods:{getDescriptor:w(h(),Ch,{auth:`admin`})}},Th=i({handle:C,cropFrameSpace:i({x:a(),y:a(),w:a(),h:a()})});i({crop:i({left:a(),top:a(),width:a().positive(),height:a().positive()}).optional(),content:i({width:a().int().positive(),height:a().int().positive()}),fit:m([`stretch`,`contain`]),format:m([`rgb`,`gray`,`jpeg`])});var Eh=i({registryId:g().min(1),id:g().min(1),width:a().int().positive(),height:a().int().positive(),format:m([`rgb`,`gray`]),timestamp:a(),capturedAt:a().optional()}),Dh=m([`onnx`,`coreml`,`openvino`,`tflite`,`pt`,`gguf`]),Oh=m([`detector`,`cropper`,`classifier`,`refiner`,`audio-classifier`]),J=i({runtime:m([`node`,`python`]),backend:g(),format:Dh,device:g().optional()}),kh=i({engine:J,devices:p(i({id:g(),label:g(),description:g().optional()})).readonly(),defaultDevice:g()}),Ah=r(()=>i({addonId:g(),addonName:g(),slot:Oh,inputClasses:p(g()).readonly(),outputClasses:p(g()).readonly(),enabled:v(),modelId:g(),children:p(Ah).readonly(),group:g().optional(),settings:n(g(),u()).optional()})),jh=r(()=>i({addonId:g(),enabled:v(),modelId:g(),children:p(jh).readonly(),settings:n(g(),u()).optional()})),Mh=i({id:g(),name:g(),createdAt:g(),updatedAt:g(),engine:J,steps:p(jh).readonly()}),Nh=i({id:g(),name:g(),formats:n(g(),i({downloaded:v(),sizeMB:a()})),group:Xa.optional(),legacy:v().optional(),provider:Qa.optional()}),Ph=x(),Fh=i({id:g(),name:g(),slot:Oh,inputClasses:p(g()).readonly(),outputClasses:p(g()).readonly(),childSlots:p(Oh).readonly(),models:p(Nh).readonly(),defaultModelId:g(),defaultModelIdByFormat:n(g(),g()).optional(),enabledByDefault:v().optional(),backfillIntoExistingOverrides:v().optional(),defaultConfidence:a(),group:g().optional(),configSchema:p(Ph).readonly().optional()}),Ih=i({id:Oh,label:g(),priority:a(),parentSlot:Oh.nullable(),addons:p(Fh).readonly()}),Lh=i({availableEngines:p(kh).readonly(),selectedEngine:J,slots:p(Ih).readonly()}),Rh=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()}),Y=r(()=>i({addonId:g(),modelId:g().optional(),enabled:v().default(!0),children:p(Y).optional(),settings:n(g(),u()).optional(),jumpDeviceKey:g().optional()})),zh=i({addonId:g(),chosen:g(),running:g(),format:g()}),Bh=i({addonId:g(),kind:m([`unknown-addon`,`no-format-build`]),detail:g()}),Vh=i({ok:v(),issues:p(Bh).readonly(),substitutions:p(zh).readonly(),format:g()}),Hh=i({filename:g(),stepIds:p(g()).readonly().optional()}),Uh=i({base64:g(),filename:g()}),Wh=i({filename:g(),sizeKb:a()}),Gh=i({base64:g()}),Kh=i({id:g(),name:g(),description:g(),available:v(),rawLabels:p(g()).readonly().optional()}),qh=i({activeBackend:g(),availableBackends:p(Kh).readonly(),sampleRate:a(),chunkDurationMs:a()}),Jh=i({filePath:g(),sizeMB:a(),durationMs:a()}),Yh=i({success:v(),error:g().optional(),frame:x().optional()}),Xh=x(),Zh=x(),Qh=x(),$h=x(),eg=x(),tg=x(),ng={name:`pipeline-executor`,scope:`system`,mode:`singleton`,methods:{getAvailableEngines:w(h(),p(J)),getSelectedEngine:w(h(),J),getDefaultSteps:w(J,p(Ah)),getEngineProvisioning:w(i({nodeId:g()}),Rh),getVideoPipelineSteps:w(h(),n(g(),i({modelId:g(),settings:n(g(),u()).readonly()}))),setVideoPipelineSteps:w(i({steps:n(g(),i({modelId:g(),settings:n(g(),u()).readonly()}))}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),clearDeviceOverrides:w(i({nodeId:g()}),i({success:y(!0),clearedDevices:a()}),{kind:`mutation`,auth:`admin`}),getInferenceDeviceHealth:w(i({nodeId:g()}),i({unhealthy:p(i({deviceKey:g(),state:m([`failed`,`backoff`]),since:a(),deaths:a(),lastError:g()})).readonly()})),rearmInferenceDevice:w(i({nodeId:g(),deviceKey:g()}),i({rearmed:v()}),{kind:`mutation`,auth:`admin`}),getSchema:w(h(),Lh),getGlobalSteps:w(h(),p(Ah).readonly().nullable()),getGlobalPipelineConfig:w(h(),Xh),getOrchestratorConfigSchema:w(h(),Zh),validatePipeline:w(i({steps:p(Y)}),Vh),listTemplates:w(h(),p(Mh).readonly()),saveTemplate:w(i({name:g(),steps:p(jh).readonly(),engine:J}),Mh,{kind:`mutation`}),updateTemplate:w(i({id:g(),name:g().optional(),steps:p(jh).readonly().optional()}),Mh,{kind:`mutation`}),deleteTemplate:w(i({id:g()}),h(),{kind:`mutation`}),getCapabilities:w(h(),$h),getAddonModels:w(i({addonId:g()}),eg),downloadModel:w(i({addonId:g(),modelId:g(),format:Dh}),Jh,{kind:`mutation`}),deleteModel:w(i({addonId:g(),modelId:g(),format:Dh}),i({success:y(!0)}),{kind:`mutation`}),runPipeline:w(i({engine:J.optional(),steps:p(Y).min(1),frame:$s.optional(),frameRef:Eh.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:Th.optional()}),tg,{kind:`mutation`}),runPipelineBatch:w(i({engine:J.optional(),steps:p(Y).min(1),frames:p($s).min(1).max(255),deviceId:a().optional(),sessionId:g().optional(),frameId:a().int().nonnegative().optional(),deviceKey:g().optional()}),i({results:p(tg).readonly()}),{kind:`mutation`}),cacheFrameInPool:w(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:w(i({stepId:g(),frameId:a().int()}),n(g(),u()),{kind:`mutation`}),uncacheFrame:w(i({frameId:a().int()}),h(),{kind:`mutation`}),getEffectiveTuning:w(h(),i({batchMode:g(),windowMs:a(),maxBatchSize:a(),concurrency:a()})),listLoadedEngines:w(h(),p(i({engineKey:g(),engine:J,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:w(i({engine:J}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),killEngine:w(i({engine:J,force:v().optional()}),i({success:v(),reason:g().optional()}),{kind:`mutation`,auth:`admin`}),listReferenceImages:w(h(),p(Hh).readonly()),getReferenceImage:w(i({filename:g()}),Uh.nullable()),getReferenceAudioFiles:w(h(),p(Wh).readonly()),getReferenceAudio:w(i({filename:g()}),Gh.nullable()),getAudioCapabilities:w(h(),qh),runAudioTest:w(i({addonId:g(),modelId:g(),filename:g().optional(),settings:n(g(),u()).optional()}),Yh,{kind:`mutation`}),getDetectionConfigSchema:w(h(),Qh)}},rg=m([`include`,`exclude`]),X=i({id:g(),name:g().optional(),zoneIds:p(g()).min(1).readonly(),mode:rg,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)}),ig=p(X).readonly(),ag=m([`polygon`,`tripwire`]),og=i({x:a(),y:a()}),sg=i({id:g(),name:g(),kind:ag.default(`polygon`),polygon:p(og).readonly(),color:g().default(`#3b82f6`)}),cg={name:`zones`,scope:`device`,mode:`singleton`,deviceTypes:[E.Camera],methods:{listZones:w(i({deviceId:a()}),p(sg).readonly()),addZone:w(i({deviceId:a(),zone:sg}),h(),{kind:`mutation`,auth:`admin`}),removeZone:w(i({deviceId:a(),zoneId:g()}),h(),{kind:`mutation`,auth:`admin`}),updateZone:w(i({deviceId:a(),zone:sg}),h(),{kind:`mutation`,auth:`admin`})},runtimeState:i({zones:p(sg).readonly()}),durability:`restored`},lg=m([`new`,`entered`,`left`,`moving`,`idle`]),ug=m([`motion`,`object`,`audio`]),dg=b(`kind`,[em,tm]),fg=m([`motion`,`audio`,`person`,`vehicle`,`animal`,`door`,`pir`,`smoke`,`water`,`button`,`package`,`generic`]),pg=m([`motion`,`audio`,`detection`,`sensor`,`control`,`custom`,`package`]),mg=m([`macro`,`sub`]),hg=i({kind:g(),labelKey:g(),label:g(),color:g(),iconId:g(),icon:fg,category:pg,parentKind:g().nullable(),level:mg,source:i({capName:g(),deviceId:a()})}),gg=i({deviceId:a(),kinds:p(hg).readonly()}),_g=i({id:g(),deviceId:a(),sourceDeviceId:a(),kind:g(),value:n(g(),u()).nullable(),timestamp:a()}),vg=i({x:a(),y:a(),timestamp:a(),bbox:V}),yg=i({timestamp:a(),position:vg,mediaKey:g()}),bg=i({minX:a(),minY:a(),maxX:a(),maxY:a()}),xg=m([`full`,`slim`]),Sg=i({label:g(),peakScore:a(),count:a(),firstAt:a(),lastAt:a()}),Cg=m([`pipeline`,`sensor`,`audio`]),wg=m([`none`,`staging`,`trained`]),Tg={markForTrain:v().optional(),debug:v().optional(),favourited:v().optional()},Eg={retrainStatus:wg.optional()},Dg=i(Tg),Og=i({trackId:g(),markForTrain:v(),debug:v(),favourited:v(),retrainStatus:wg}),kg=c([y(1),y(2)]),Ag=i({stepId:g(),modelId:g().optional(),decidedAt:a(),identityId:g().optional()}),jg={label:g().optional(),labelScore:a().optional(),labelMeta:Ag.optional(),subLabel:g().optional(),subLabelScore:a().optional(),subLabelMeta:Ag.optional()},Mg=i({deviceId:a(),tracks:a().int(),files:a().int(),bytes:a().int()}),Ng=i({generatedAt:a(),trackCount:a().int(),fileCount:a().int(),byteCount:a().int(),truncated:v(),devices:p(Mg).readonly()}),Pg=i({trackId:g(),deviceId:a(),className:g(),...jg,producingDeviceName:g().optional(),source:Cg.optional(),firstSeen:a(),lastSeen:a(),positions:p(vg).readonly(),snapshots:p(yg).readonly(),zonesVisited:p(g()).readonly(),zoneNames:p(g()).readonly().optional(),classes:p(g()).readonly().optional(),totalDistance:a(),state:lg,active:v(),importance:a().optional(),bestEventId:g().optional(),importanceReason:g().optional(),audioLabels:p(Sg).readonly().optional(),envelope:bg.optional(),hasFace:v().optional(),hasEmbeddedFace:v().optional(),hasRider:v().optional(),previewMissReason:g().optional(),...Tg,...Eg}),Fg={id:g(),deviceId:a(),timestamp:a()},Ig=i({...Fg,kind:y(`motion`),regionCount:a(),regions:p(i({bbox:V,pixelCount:a(),intensity:a()})).readonly().optional(),frameWidth:a().optional(),frameHeight:a().optional(),mediaUrl:g().optional()}),Lg=m([`pipeline`,`onboard`]),Rg=m([`enter`,`exit`]),zg=i({direction:Rg,zoneId:g(),zoneName:g().optional()}),Bg=i({...Fg,kind:y(`object`),source:Lg.optional(),frameId:g().optional(),trackId:g().optional(),className:g(),...jg,confidence:a().optional(),bbox:V.optional(),zones:p(g()).readonly().optional(),state:lg.optional(),zoneCrossing:zg.optional(),frameWidth:a().optional(),frameHeight:a().optional(),mediaKey:g().optional(),keyFrameMediaKey:g().optional(),mediaUrl:g().optional(),importance:a().optional()}),Vg=i({...Fg,kind:y(`audio`),rms:a(),dbfs:a(),classification:i({className:g(),originalClass:g().optional(),score:a()}).optional(),mediaUrl:g().optional()}),Hg=m([`crop`,`thumbnail`,`snapshot`,`firstFrame`,`lastFrame`,`fullFrame`,`fullFrameBoxed`,`faceCrop`,`plateCrop`,`keyFrame`,`keyFrameSmall`,`thumbnailSmall`]),Ug=i({key:g(),kind:Hg,base64:g(),sizeBytes:a(),timestamp:a()}),Wg=Ug.omit({base64:!0}),Gg=m([`person`,`vehicle`,`animal`,`package`,`face`,`plate`]),Kg=m([`subject`,`model_error`]),qg=m([`operator`,`assist`]),Jg=i({x:a(),y:a(),w:a(),h:a()}),Yg=i({id:g(),trackId:g(),deviceId:a(),mediaKey:g(),bbox:Jg,macroClass:Gg,label:g().optional(),subLabel:g().optional(),kind:Kg,source:qg,assistModelId:g().optional(),assistScore:a().optional(),exportedInBatch:g().optional(),createdAt:a()}),Xg=Yg.omit({id:!0,trackId:!0,deviceId:!0,mediaKey:!0,createdAt:!0,exportedInBatch:!0}),Zg=i({trackId:g(),deviceId:a(),className:g(),label:g().optional(),firstSeen:a(),lastSeen:a(),frameCount:a().int(),annotationCount:a().int()}),Qg=i({mediaKey:g(),kind:Hg,timestamp:a(),sizeBytes:a().int(),copied:v()}),$g=i({frameId:g(),deviceId:a(),trackId:g(),sourceMediaKey:g(),sourceKind:Hg,sizeBytes:a().int(),width:a().int(),height:a().int(),copiedAt:a()}),e_=m([`source-missing`,`unreadable-image`,`write-failed`]),t_=i({copied:p($g).readonly(),refused:p(i({sourceMediaKey:g(),reason:e_})).readonly()}),n_=i({candidates:p(Qg).readonly(),copies:p($g).readonly(),autoPickMediaKey:g().optional()}),r_=b(`kind`,[i({kind:y(`package`),zone:Jg.optional()}),i({kind:y(`objects`),modelId:g(),minScore:a().optional()})]),i_=b(`kind`,[i({kind:y(`proposed`),modelId:g(),stepId:g(),minScore:a(),proposals:p(Xg).readonly(),belowThreshold:a().int()}),i({kind:y(`refused`),reason:g(),detail:g().optional()})]),a_=i({trackId:g(),retrainStatus:wg,changed:v(),reason:m([`unknown-track`,`no-frames-copied`,`not-staging`,`not-trained`,`unchanged`]).optional()}),o_=1e3,s_=5e3,c_=i({deviceId:a(),since:a().optional(),until:a().optional(),limit:a().int().min(1).max(s_).default(o_),projection:m([`full`,`slim`]).optional()}),l_=c_.extend({classFilter:g().optional()}),u_=i({deviceIds:p(a()),since:a().optional(),until:a().optional(),limit:a().int().min(1).max(1e3).default(200),cursor:g().optional(),projection:xg.optional(),includeStationary:v().optional()}),d_=i({tracks:p(Pg).readonly(),nextCursor:g().nullable()}),f_=40,p_=100,m_=i({id:g(),deviceId:a().int(),openedAt:a().int(),closedAt:a().int(),timestamp:a().int(),memberCount:a().int(),memberTrackIds:p(g()).readonly(),className:g(),classes:p(g()).readonly(),mediaUrl:g().nullable(),singleton:v()}),h_=i({trackId:g(),deviceId:a().int(),className:g(),firstSeen:a().int(),lastSeen:a().int(),mediaUrl:g().nullable()}),g_=m_.extend({members:p(h_).readonly()}),__=i({deviceIds:p(a()),since:a().optional(),until:a().optional(),limit:a().int().min(1).max(p_).default(f_),cursor:g().optional()}),v_=i({groups:p(m_).readonly(),nextCursor:g().nullable()}),y_=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()}),b_=i({id:g(),trackId:g(),timestamp:a(),className:g(),...jg,importance:a(),bestEventId:g(),windowMs:a().optional(),...Tg,...Eg}),x_=i({trackId:g(),className:g(),confidence:a(),bbox:V,zones:p(g()).readonly(),state:lg}),S_=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()}),C_=Bg.extend({score:a()}),w_=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)}),T_=i({tracks:a().int(),events:a().int(),media:a().int(),faces:a().int(),plates:a().int(),embeddings:a().int(),groups:a().int()}),E_=i({mediaDropped:a().int(),tracks:a().int(),events:a().int()}),D_=i({deviceId:a(),rows:a().int(),bytes:a().int()}),O_=i({totalRows:a().int(),totalBytes:a().int(),devices:p(D_).readonly()}),k_=i({motion:a().int(),object:a().int(),audio:a().int()}),A_=i({deviceId:a().optional(),since:a().optional(),until:a().optional(),maxTracks:a().int().positive().optional(),executeOnNodeId:g().optional(),pacingMs:a().int().nonnegative().optional()}),j_=i({deleted:a()}),M_=i({started:v(),alreadyRunning:v()}),N_=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()}),P_=i({timestamp:a(),frame:tg}),F_=i({tracks:p(i({className:g(),firstSeenMs:a(),lastSeenMs:a(),bbox:V,framesMatched:a().int()})).readonly()}),I_={name:`pipeline-analytics`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[E.Camera],exposesDeviceSettings:!0,methods:{getActiveTracks:w(i({deviceId:a()}),p(Pg).readonly()),getTrack:w(i({deviceId:a(),trackId:g()}),Pg.nullable()),listTracks:w(i({deviceId:a(),since:a().optional(),until:a().optional(),limit:a().optional(),zone:dg.optional(),projection:xg.optional(),includeStationary:v().optional()}),p(Pg).readonly()),listRecentTracks:w(u_,d_),listGroups:w(__,v_),getGroup:w(i({deviceId:a(),groupId:g().min(1)}),g_.nullable()),clearTracks:w(i({deviceId:a()}),h(),{kind:`mutation`,auth:`admin`}),getMotionEvents:w(c_,p(Ig).readonly()),getObjectEvents:w(l_,p(Bg).readonly()),getAudioEvents:w(c_,p(Vg).readonly()),listEventKinds:w(i({deviceId:a()}),p(hg).readonly()),listEventKindsBatch:w(i({deviceIds:p(a()).min(1).max(200)}),p(gg).readonly()),getSensorEvents:w(i({deviceId:a(),since:a().optional(),until:a().optional(),kinds:p(g()).optional(),limit:a().int().min(1).max(s_).default(o_)}),p(_g).readonly()),getKeyEvents:w(y_,p(b_).readonly()),getEventDensity:w(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:w(i({deviceId:a(),cutoffMs:a()}),i({motion:a().int(),object:a().int(),audio:a().int()}),{kind:`mutation`,auth:`admin`}),pruneTracksBefore:w(i({deviceId:a(),cutoffMs:a()}),T_,{kind:`mutation`,auth:`admin`}),wipeAllAnalytics:w(i({deviceId:a()}),T_,{kind:`mutation`,auth:`admin`}),reconcileFromDisk:w(i({deviceId:a()}),E_,{kind:`mutation`,auth:`admin`}),deleteTracks:w(i({deviceId:a(),trackIds:p(g()).min(1)}),i({deleted:a().int(),failed:p(g()).readonly()}),{kind:`mutation`,auth:`admin`}),setTrackFlags:w(i({deviceId:a(),trackId:g(),flags:Dg}),Og,{kind:`mutation`}),getEventStoreFootprint:w(i({}),O_,{kind:`query`,auth:`admin`}),pruneEvents:w(i({olderThanMs:a(),reason:_i.optional()}),k_,{kind:`mutation`,auth:`admin`}),deleteDeviceEvents:w(i({deviceId:a()}),k_,{kind:`mutation`,auth:`admin`}),pauseForStorageMigration:w(A,i({paused:y(!0)}),{kind:`mutation`,auth:`admin`}),resumeForStorageMigration:w(A,i({resumed:y(!0)}),{kind:`mutation`,auth:`admin`}),refreshStorageLocationsForMigration:w(A,i({refreshed:y(!0)}),{kind:`mutation`,auth:`admin`}),startStorageMigrationMove:w(Zi,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),getStorageMigrationMoveStatus:w(i({jobId:g()}),Ki.nullable(),{auth:`admin`}),cancelStorageMigrationMove:w(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),relocateMedia:w(Xi,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),listRelocateMediaJobs:w(i({}),p(Ki).readonly(),{kind:`query`,auth:`admin`}),cancelRelocateMedia:w(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),listOpsLog:w(yi,p(vi).readonly(),{kind:`query`,auth:`admin`}),getTrainingExportSummary:w(i({deviceIds:p(a()).optional()}),Ng,{kind:`query`,auth:`admin`}),getTrainingExportUrl:w(i({deviceIds:p(a()).optional()}),i({url:g()}),{kind:`query`,auth:`admin`}),listRetrainStaging:w(i({deviceIds:p(a()).optional(),limit:a().int().min(1).max(500).optional()}),p(Zg).readonly(),{kind:`query`,auth:`admin`}),listRetrainFrames:w(i({trackId:g()}),n_,{kind:`query`,auth:`admin`}),selectRetrainFrames:w(i({deviceId:a(),trackId:g(),mediaKeys:p(g()).min(1)}),t_,{kind:`mutation`,auth:`admin`}),deselectRetrainFrame:w(i({deviceId:a(),trackId:g(),frameId:g()}),i({removed:v(),removedAnnotations:a().int()}),{kind:`mutation`,auth:`admin`}),getRetrainFrameImage:w(i({frameId:g()}),i({base64:g(),width:a().int(),height:a().int()}),{kind:`query`,auth:`admin`}),proposeRetrainAnnotations:w(i({deviceId:a(),trackId:g(),frameId:g(),subject:r_,nodeId:g().optional()}),i_,{kind:`mutation`,auth:`admin`}),runReplayFrameProcessor:w(i({deviceId:a(),source:Lg,zones:p(sg).readonly().optional(),detectionRules:p(X).readonly().optional(),zoneMembershipMinOverlap:a().min(0).max(1).optional(),frames:p(P_).min(1)}),F_,{kind:`mutation`,auth:`admin`}),listRetrainAnnotations:w(i({trackId:g()}),p(Yg).readonly(),{kind:`query`,auth:`admin`}),saveRetrainAnnotations:w(i({deviceId:a(),trackId:g(),frameId:g(),annotations:p(Xg)}),p(Yg).readonly(),{kind:`mutation`,auth:`admin`}),completeRetrainTrack:w(i({deviceId:a(),trackId:g()}),a_,{kind:`mutation`,auth:`admin`}),restageRetrainTrack:w(i({deviceId:a(),trackId:g()}),a_,{kind:`mutation`,auth:`admin`}),getRetrainExportUrl:w(i({deviceIds:p(a()).optional()}),i({url:g()}),{kind:`query`,auth:`admin`}),getEventMedia:w(i({eventId:g(),kind:Hg.optional(),deviceId:a()}),p(Ug).readonly()),getTrackMedia:w(i({trackId:g(),kinds:p(Hg).optional(),deviceId:a()}),p(Ug).readonly()),listTrackMedia:w(i({trackId:g(),deviceId:a()}),p(Wg).readonly()),searchObjectEvents:w(w_,p(C_).readonly()),wipeObjectEmbeddings:w(i({}),j_,{kind:`mutation`,auth:`admin`}),rebuildObjectEmbeddings:w(A_,M_,{kind:`mutation`,auth:`admin`}),getObjectEmbeddingRebuildStatus:w(i({}),N_)},events:{onFrameTracked:{data:i({deviceId:a(),timestamp:a(),frameWidth:a(),frameHeight:a(),detections:p(S_).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:ug,eventId:g(),timestamp:a()})}}},L_=i({activeCameras:a(),throttledCameras:a(),avgInferenceTimeMs:a(),queueDepth:a()}),R_=i({detectionMode:m([`disabled`,`always-on`,`on-motion`]),configuredFps:a(),actualFps:a(),queueDepth:a(),avgInferenceTimeMs:a(),droppedFrames:a(),phase:m([`idle`,`watching`,`active`])}),z_=R_.extend({deviceId:a()}),B_=i({x:a(),y:a(),w:a(),h:a()}),V_=i({bytes:_(Uint8Array).optional(),jpeg:g().optional(),width:a().int().positive(),height:a().int().positive(),tier:m([`native`,`ram-fullframe`]).optional()}),H_=i({bbox:B_,className:g()}),U_=i({stepId:g(),className:g(),score:a(),bbox:B_.optional(),embedding:g().optional(),embeddingMagnitude:a().optional(),embeddingModelId:g().optional(),label:g().optional(),labelTier:c([y(1),y(2)]).optional(),labelModelId:g().optional(),alignedCropJpeg:g().optional(),nativeFaceShortSidePx:a().optional()}),W_=m([`unknown-step`,`model-not-servable`,`unreadable-frame`,`execution-failed`]),G_=b(`kind`,[i({kind:y(`ran`),nodeId:g(),modelId:g(),details:p(U_)}),i({kind:y(`refused`),nodeId:g(),reason:W_,detail:g()})]),K_={min:0,max:6e4,default:3e4,step:500},q_={min:0,max:6e5,default:12e4,step:5e3},J_={min:5e3,max:6e5,default:9e4,step:5e3},Y_={min:1,max:30,default:4,step:1},X_={min:1,max:30,default:10,step:1},Z_={min:0,max:300,default:300,step:5},Q_={min:1,max:10,default:4,step:1},$_=m([`onboard`,`analyzer`]),ev=p($_),tv=i({deviceId:a(),detected:v(),source:$_.default(`analyzer`),regions:p(Wf).readonly().optional()}),nv=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)`),rv=i({deviceKey:g(),weight:a().positive().default(1),maxSessions:a().int().positive().nullable().default(null)}),iv=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(K_.min).default(K_.default),maxSessionHoldMs:a().min(q_.min).max(q_.max).optional(),audioMotionWindowMs:a().min(J_.min).max(J_.max).optional(),motionFps:a().min(Y_.min).max(Y_.max).default(Y_.default),detectionFps:a().min(X_.min).max(X_.max).default(X_.default),motionStreamId:g(),detectionStreamId:g(),motionSources:ev.default([`analyzer`]),pipelineEnabled:v().default(!0),steps:p(Y).readonly().optional(),audio:i({modelId:g().optional(),enabled:v()}).nullable().optional(),zones:p(sg).readonly().default([]),onboardMotionDrivesAnalyzer:v().default(!0),occupancyRecheckEnabled:v().default(!0),occupancyRecheckSec:a().min(Z_.min).max(Z_.max).default(Z_.default),occupancyRecheckFrames:a().min(Q_.min).max(Q_.max).default(Q_.default),frameSource:nv.default({kind:`local-broker`}),deviceKey:g().optional(),inferenceDevices:p(rv).readonly().optional()}),av=[{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:Y_.min,max:Y_.max,step:Y_.step,default:Y_.default,showValue:!0,unit:`fps`,nullable:!0,nullLabel:`Default`,showWhen:{field:`motionSources`,includes:`analyzer`}},{key:`detectionFps`,type:`slider`,label:`Detection FPS`,min:X_.min,max:X_.max,step:X_.step,default:X_.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:K_.min,max:K_.max,step:K_.step,default:K_.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:q_.min,max:q_.max,step:q_.step,default:q_.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:J_.min,max:J_.max,step:J_.step,default:J_.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:Z_.min,max:Z_.max,step:Z_.step,default:Z_.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:Q_.min,max:Q_.max,step:Q_.step,default:Q_.default,showValue:!0,showWhen:{field:`occupancyRecheckEnabled`,equals:!0}}],ov=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()})}),sv=i({framesDecoded:a(),framesAdmitted:a(),framesDroppedPixelFree:a(),viewsMaterialized:a(),viewsSkipped:a(),workerToRunnerBytes:a(),runnerToPoolRawBytes:a(),runnerToPoolJpegBytes:a(),onDemandFullFrameRequests:a(),onDemandCropRequests:a(),nativeHits:a(),nativeMisses:a(),tileHits:a(),tileMisses:a(),fallbackHits:a(),fallbackMisses:a(),retainedWritesAvoided:a(),residentRefs:a(),residentBytes:a(),releases:a(),evictions:a(),staleMisses:a()}),cv=i({node:sv,cameras:p(sv.extend({deviceId:a()}))}),lv=i({nodeId:g(),activeCameras:a(),throttledCameras:a(),avgInferenceTimeMs:a(),queueDepth:a(),frameLazy:cv.optional()}),uv={name:`pipeline-runner`,scope:`system`,mode:`singleton`,methods:{attachCamera:w(iv,i({success:y(!0)}),{kind:`mutation`}),detachCamera:w(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`}),reportMotion:w(tv,i({success:y(!0)}),{kind:`mutation`}),getLocalLoad:w(h(),ov),getLocalMetrics:w(h(),lv),getCameraMetrics:w(i({deviceId:a()}),R_.nullable()),getAllCameraMetrics:w(h(),p(z_).readonly()),getLocalCameras:w(h(),p(a()).readonly()),getNativeCrop:w(i({handle:C,bbox:B_,maxWidth:a().int().positive().optional(),encodeJpeg:v().optional()}),V_.nullable()),runDetailSubtree:w(i({deviceId:a(),frameHandle:C.optional(),frameJpeg:g().optional(),cropJpeg:g().optional(),parent:H_,steps:p(g()).optional()}),i({details:p(U_)}).nullable(),{kind:`mutation`}),runStatelessStep:w(i({stepId:g(),modelId:g(),frameJpeg:g(),bbox:B_,className:g(),sourceDeviceId:a()}),G_,{kind:`mutation`})}},dv=i({engine:J.optional(),steps:p(Y).readonly(),audio:i({engine:J.optional(),modelId:g().optional(),enabled:v(),settings:n(g(),u()).readonly().optional()}).nullable().optional()}),fv=i({id:g(),name:g(),description:g().optional(),config:dv,createdAt:g(),updatedAt:g()}),pv=i({modelId:g().optional(),settings:n(g(),u()).optional(),jumpDeviceKey:g().optional()}),mv=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(),pv).optional()})).optional()}),hv=i({steps:p(Y).readonly(),audio:i({modelId:g(),enabled:v()}).nullable()}),gv=i({modelId:g().optional(),settings:n(g(),u()).readonly().optional()}),_v=i({pinnedAgentNodeId:g().optional(),stepToggles:n(g(),v()).optional(),stepOverridesByDevice:n(g(),n(g(),n(g(),gv))).optional(),pipelineByAgent:n(g(),hv).optional()}),vv=i({deviceId:a(),agentNodeId:g(),pinned:v(),reason:m([`manual`,`capacity`,`hardware-affinity`,`failover`,`rebalance`]),assignedAt:a()}),yv=i({nodeId:g(),online:v(),load:ov,score:a(),decodeHwaccel:g().nullable()}),bv=i({totalAgents:a(),onlineAgents:a(),totalCameras:a(),attachedCameras:a(),activeCameras:a(),avgInferenceTimeMs:a(),queueDepth:a()}),xv=n(g(),g()),Sv=i({ownerNodeId:g(),reachableHost:g().optional(),configIssue:g().optional()}),Cv=i({camStreamId:g(),codec:g(),width:a(),height:a(),fps:a(),kind:g()}),wv=i({streams:p(Cv).readonly()}),Tv=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()})}),Ev=i({profile:g(),status:g(),codec:g(),width:a(),height:a(),subscribers:a(),inFps:a(),outFps:a()}),Dv=i({profiles:p(Ev).readonly(),webrtcSessions:a(),rtspRestream:v()}),Ov=i({framesWritten:a(),getFrameHits:a(),getFrameMisses:a(),budgetMb:a()}),kv=i({nodeId:g(),formats:p(g()).readonly(),sessionCount:a(),shm:Ov}),Av=i({enabled:v(),fps:a()}),jv=m([`idle`,`installing`,`verifying`,`ready`,`failed`]),Mv=i({state:jv,error:g().optional()}),Nv=m([`idle`,`watching`,`active`]),Pv=i({nodeId:g(),engine:i({backend:g(),device:g()}),phase:Nv,configuredFps:a(),actualFps:a(),queueDepth:a(),avgInferenceMs:a(),provisioning:Mv}),Fv=i({nodeId:g(),enabled:v()}),Iv=m([`off`,`continuous`,`events`]),Lv=i({mode:Iv,active:v(),storageBytes:a()}),Rv=m([`source`,`broker`,`detection`,`recording`,`switches`]),zv=m([`timeout`,`error`,`partial`]),Bv=i({stage:Rv,reason:zv,elapsedMs:a()}),Vv=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()}),Hv=i({deviceId:a(),assignment:Tv,source:wv,broker:Dv.nullable(),decoder:kv.nullable(),motion:Av.nullable(),detection:Pv.nullable(),audio:Fv.nullable(),recording:Lv.nullable(),switchedOff:p(jr).readonly(),degraded:p(Bv).readonly(),fetchedAt:a()}),Uv=[`disabled`,`unavailable`,`cannot-host-camera-root`,`accelerator-preferred`],Wv=m(Uv),Gv=i({key:g(),backend:g(),device:g(),format:m(qa),available:v(),enabled:v(),weight:a(),maxSessions:a().nullable(),defaultModelId:g(),steps:n(g(),pv).optional(),exclusion:Wv.nullable()}),Kv=i({nodeId:g(),reachable:v(),devices:p(Gv).readonly()}),qv={name:`pipeline-orchestrator`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,exposesDeviceSettings:!0,methods:{pauseForStorageMigration:w(A,i({paused:y(!0)}),{kind:`mutation`,auth:`admin`}),resumeForStorageMigration:w(A,i({resumed:y(!0)}),{kind:`mutation`,auth:`admin`}),assignPipeline:w(i({deviceId:a(),agentNodeId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),unassignPipeline:w(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setPipelineDevicePin:w(i({deviceId:a(),deviceKey:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getPipelineDevicePin:w(i({deviceId:a()}),i({deviceKey:g().nullable()})),rebalance:w(h(),i({migrated:a()}),{kind:`mutation`,auth:`admin`}),getPipelineAssignments:w(h(),p(vv).readonly()),getPipelineAssignment:w(i({deviceId:a()}),vv.nullable()),getAgentLoad:w(h(),p(yv).readonly()),getGlobalMetrics:w(h(),bv),getCameraMetrics:w(i({deviceId:a()}),R_.nullable()),getCapabilityBindings:w(i({nodeId:g()}),xv),setCapabilityBinding:w(i({nodeId:g(),capName:g(),addonId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getIngestOwner:w(h(),Sv),assignAudio:w(i({deviceId:a(),nodeId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),unassignAudio:w(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getAudioAssignment:w(i({deviceId:a()}),i({nodeId:g(),pinned:v(),assignedAt:a()}).nullable()),getAudioNodeLoad:w(h(),p(i({nodeId:g(),deviceCount:a()}))),getAudioAssignments:w(h(),p(i({deviceId:a(),nodeId:g(),pinned:v(),assignedAt:a()}))),getAgentSettings:w(i({agentNodeId:g()}),mv.nullable()),listAgentSettings:w(h(),p(i({nodeId:g(),settings:mv})).readonly()),removeAgentSettings:w(i({agentNodeId:g()}),i({success:v(),removed:v()}),{kind:`mutation`,auth:`admin`}),setAgentMaxCameras:w(i({agentNodeId:g(),maxCameras:a().int().nonnegative().nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setAgentDetectWeight:w(i({agentNodeId:g(),detectWeight:a().positive().nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setAgentCapabilities:w(i({agentNodeId:g(),detect:v().nullable().optional(),audio:v().nullable().optional(),ingest:v().nullable().optional()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setAgentReachableHost:w(i({agentNodeId:g(),reachableHost:g().nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setAgentInferenceDevices:w(i({agentNodeId:g(),inferenceDevices:n(g(),i({enabled:v(),weight:a().positive().optional(),maxSessions:a().int().positive().optional(),steps:n(g(),pv).optional()}))}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getNodeInferenceDevices:w(i({nodeId:g()}),Kv),resetNodePipelineDefaults:w(i({agentNodeId:g()}),i({success:y(!0),effectiveModelId:g().nullable(),clearedCameraOverrides:a()}),{kind:`mutation`,auth:`admin`}),getCameraSettings:w(i({deviceId:a()}),_v.nullable()),setCameraStepToggle:w(i({deviceId:a(),addonId:g(),enabled:v().nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getCameraStepOverrides:w(i({deviceId:a()}),n(g(),n(g(),n(g(),gv))).nullable()),setCameraStepOverride:w(i({deviceId:a(),agentNodeId:g(),deviceKey:g(),addonId:g(),patch:gv.nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setCameraPipelineForAgent:w(i({deviceId:a(),agentNodeId:g(),pipeline:hv.nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),resolvePipeline:w(i({deviceId:a(),agentNodeId:g().optional()}),dv),getCameraSwitches:w(i({deviceId:a()}),Ir),setCameraSwitch:w(i({deviceId:a(),switchId:jr,enabled:v()}),Ir,{kind:`mutation`,auth:`admin`}),getCameraStatus:w(i({deviceId:a()}),Hv),getCameraStatuses:w(i({deviceIds:p(a()).optional()}),p(Hv).readonly()),reconcileFromDisk:w(h(),Vv,{kind:`mutation`,auth:`admin`}),getReconcileFromDiskStatus:w(h(),Vv,{auth:`admin`}),listTemplates:w(h(),p(fv).readonly()),saveTemplate:w(i({name:g(),description:g().optional(),config:dv}),fv,{kind:`mutation`,auth:`admin`}),updateTemplate:w(i({id:g(),name:g().optional(),description:g().optional(),config:dv.optional()}),fv,{kind:`mutation`,auth:`admin`}),deleteTemplate:w(i({id:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`})}},Jv={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 Yv(e){return Jv[e]??`generic`}var Xv={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 Zv(e,t){let n=Bp[t];if(n===void 0)throw Error(`EVENT_KIND_BY_CAP: cap '${e}' maps to unknown taxonomy kind '${t}'`);return{...n,icon:Yv(n.iconId)}}var Qv=Object.freeze(Object.fromEntries(Object.entries(Xv).map(([e,t])=>[e,Zv(e,t)]))),$v=Object.keys(Xv);function ey(e,t){let n=Bp[e];return n===void 0?null:{kind:n.kind,labelKey:n.labelKey,label:n.label,color:n.color,iconId:n.iconId,icon:Yv(n.iconId),category:n.category,parentKind:n.parentKind,level:n.level,source:{capName:t.capName,deviceId:t.deviceId}}}var ty=m([`workspace`,`baked`,`data-root`]),ny=m([`idle`,`checking`,`staging`,`pending-restart`,`awaiting-confirmation`]),ry=m([`in-sync`,`behind-patch`,`behind-series`,`ahead`,`unknown`]),iy=i({state:ry,seedVersion:g().nullable(),contractVersion:g().nullable(),contractSource:m([`registry`,`running`]).nullable(),message:g()}),ay=i({fromVersion:g(),toVersion:g().nullable(),atMs:a(),reason:g()}),oy=i({packageName:g(),runningVersion:g().nullable(),nodeRuntimeVersion:g().nullable(),activeVersion:g().nullable(),previousVersion:g().nullable(),seedVersion:g().nullable(),latestVersion:g().nullable(),updateAvailable:v(),bootMode:ty,updateState:ny,pendingVersion:g().nullable(),rolledBack:ay.nullable(),stateFileCorrupt:v(),lastCheckedAtMs:a().nullable(),imageContract:iy.optional()}),sy=i({packageName:g(),runningVersion:g().nullable(),latestVersion:g().nullable(),updateAvailable:v(),checkedAtMs:a(),error:g().nullable()}),cy=i({accepted:v(),targetVersion:g().nullable(),restarting:v(),message:g()}),ly={name:`server-management`,scope:`system`,mode:`singleton`,methods:{getServerPackageStatus:w(h(),oy,{auth:`admin`}),checkServerUpdate:w(h(),sy,{kind:`mutation`,auth:`admin`}),applyServerUpdate:w(i({version:g().optional()}),cy,{kind:`mutation`,auth:`admin`,timeoutMs:16*6e4}),rollbackServerUpdate:w(h(),cy,{kind:`mutation`,auth:`admin`}),restartServer:w(h(),cy,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},uy=d(),dy=i({to:c([uy,p(uy).min(1)]),cc:p(uy).optional(),bcc:p(uy).optional(),from:g().optional(),replyTo:g().optional(),subject:g(),text:g(),html:g().optional()}),fy=i({messageId:g(),accepted:p(uy).default([]),rejected:p(uy).default([])}),py=i({ready:v(),host:g(),error:g().optional(),lastVerifiedAt:a().optional()}),my={name:`smtp-provider`,scope:`system`,mode:`collection`,internal:!0,providerKind:`email`,methods:{sendEmail:w(dy,fy,{kind:`mutation`,auth:`admin`,access:`create`}),verify:w(h(),py,{kind:`mutation`,auth:`admin`,access:`view`}),getStatus:w(h(),py,{auth:`admin`})}},hy=i({base64:g(),contentType:g()}),gy=i({lastCapturedAt:a().nullable(),cacheAgeMs:a().nullable(),lastBytes:a().nullable(),lastStreamId:g().nullable()}),_y={name:`snapshot`,scope:`device`,deviceNative:!0,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[E.Camera],exposesDeviceSettings:!0,methods:{getSnapshot:w(i({deviceId:a(),streamId:g().optional(),force:v().optional()}),hy.nullable()),invalidateCache:w(i({deviceId:a()}),h(),{kind:`mutation`,auth:`admin`}),getSnapshotOverview:kt(i({deviceIds:p(a()).min(1).max(200)}),p(i({deviceId:a(),lastCapturedAt:a().nullable(),cacheAgeMs:a().nullable(),etag:g().nullable()}))),getDebugState:kt(i({deviceId:a()}),i({battery:i({sleeping:v(),lastUpdated:a(),lastContactAt:a().optional()}).nullable(),state:i({isBattery:v(),reason:m([`disabled`,`offline`,`sleeping`,`unreachable`,`waking`]).nullable()}),frame:i({capturedAt:a().nullable(),ageMs:a().nullable()}),waking:v()})),getSnapshotLinks:kt(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`,`offline`,`sleeping`,`unreachable`,`waking`]).nullable(),battery:v()})))},status:{schema:gy,kind:`poll`}},vy=i({userId:g(),username:g(),isAdmin:v(),provider:g(),email:g().optional(),displayName:g().optional(),hubUrl:g().optional(),scopes:p(q).optional(),redirectUri:g().optional(),integrationId:g().optional(),jti:g().optional(),codeChallenge:g().optional(),sessionId:g().optional(),refreshTtl:c([a().int().positive(),y(`never`)]).optional()}),yy={name:`sso-bridge`,scope:`system`,mode:`singleton`,internal:!0,methods:{signBridgeToken:w(i({claims:vy,ttlSec:c([a().int().positive(),y(`never`)]).optional()}),i({token:g()}),{auth:`admin`}),verifyBridgeToken:w(i({token:g()}),vy.nullable(),{auth:`admin`})}},by=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)})]),xy={name:`storage`,scope:`system`,mode:`singleton`,methods:{resolve:w(i({location:M,relativePath:g()}),g()),write:w(i({location:M,relativePath:g(),data:_(Uint8Array)}),h(),{kind:`mutation`}),read:w(i({location:M,relativePath:g()}),_(Uint8Array)),exists:w(i({location:M,relativePath:g()}),v()),list:w(i({location:M,prefix:g().optional()}),p(g()).readonly()),delete:w(i({location:M,relativePath:g()}),h(),{kind:`mutation`}),getAvailableSpace:w(i({location:M}),a().nullable()),beginUpload:w(i({location:M,relativePath:g(),sizeBytes:a().optional()}),i({uploadId:g()}),{kind:`mutation`}),writeChunk:w(i({uploadId:g(),offset:a(),data:_(Uint8Array)}),h(),{kind:`mutation`}),finalizeUpload:w(i({uploadId:g()}),h(),{kind:`mutation`}),abortUpload:w(i({uploadId:g()}),h(),{kind:`mutation`}),beginDownload:w(i({location:M,relativePath:g()}),i({downloadId:g(),sizeBytes:a()}),{kind:`mutation`}),readChunk:w(i({downloadId:g(),offset:a(),length:a()}),_(Uint8Array)),endDownload:w(i({downloadId:g()}),h(),{kind:`mutation`}),listLocations:w(i({type:ca.optional()}),p(j).readonly()),getDefaultLocation:w(i({type:ca}),j.nullable()),listLocationDeclarations:w(h(),p(la).readonly()),upsertLocation:w(j.omit({createdAt:!0,updatedAt:!0}),j,{kind:`mutation`,auth:`admin`}),deleteLocation:w(i({id:g()}),h(),{kind:`mutation`,auth:`admin`}),testLocation:w(i({id:g()}),i({ok:v(),error:g().optional()}),{auth:`admin`}),listProviders:w(h(),p(by).readonly()),testConfig:w(i({providerId:g(),config:n(g(),u())}),i({ok:v(),error:g().optional()}),{auth:`admin`})}},Sy=i({bytes:a().int().nonnegative()}),Cy=i({reclaimedBytes:a().int().nonnegative(),exhausted:v()}),wy={name:`storage-evictable`,scope:`system`,mode:`collection`,internal:!0,methods:{getEvictableUsage:w(i({locationId:g()}),Sy,{auth:`admin`}),evict:w(i({locationId:g(),targetBytes:a().int().positive()}),Cy,{kind:`mutation`,auth:`admin`})}},Ty={name:`storage-migration`,scope:`system`,mode:`singleton`,methods:{plan:w(ea,aa,{auth:`admin`}),start:w(ea,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),status:w(i({jobId:g().optional()}),ia.nullable(),{auth:`admin`}),cancel:w(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`})}},Ey=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)})]),Dy=i({ok:v(),error:g().optional()}),Oy=i({location:j,relativePath:g(),sizeBytes:a().optional()}),ky=i({uploadId:g()}),Ay=i({uploadId:g(),offset:a(),data:_(Uint8Array)}),jy=i({uploadId:g()}),My=i({uploadId:g()}),Ny=i({location:j,relativePath:g()}),Py=i({downloadId:g(),sizeBytes:a()}),Fy=i({downloadId:g(),offset:a(),length:a()}),Iy=i({downloadId:g()}),Ly={name:`storage-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{getProviderInfo:w(h(),Ey,{auth:`admin`}),testLocation:w(i({config:n(g(),u())}),Dy,{auth:`admin`}),resolve:w(i({location:j,relativePath:g()}),g(),{auth:`admin`}),write:w(i({location:j,relativePath:g(),data:_(Uint8Array)}),h(),{kind:`mutation`,auth:`admin`}),read:w(i({location:j,relativePath:g()}),_(Uint8Array),{auth:`admin`}),exists:w(i({location:j,relativePath:g()}),v(),{auth:`admin`}),list:w(i({location:j,prefix:g().optional()}),p(g()).readonly(),{auth:`admin`}),delete:w(i({location:j,relativePath:g()}),h(),{kind:`mutation`,auth:`admin`}),getAvailableSpace:w(i({location:j}),a().nullable(),{auth:`admin`}),beginUpload:w(Oy,ky,{kind:`mutation`,auth:`admin`}),writeChunk:w(Ay,h(),{kind:`mutation`,auth:`admin`}),finalizeUpload:w(jy,h(),{kind:`mutation`,auth:`admin`}),abortUpload:w(My,h(),{kind:`mutation`,auth:`admin`}),beginDownload:w(Ny,Py,{kind:`mutation`,auth:`admin`}),readChunk:w(Fy,_(Uint8Array),{auth:`admin`}),endDownload:w(Iy,h(),{kind:`mutation`,auth:`admin`})}},Ry=u().nullable(),zy=n(g(),u()),By=i({sessionId:g(),profileId:g(),label:g(),cols:a().int().positive(),rows:a().int().positive(),startedAt:a()}),Vy=i({profileId:g(),label:g(),description:g().optional(),executable:g().optional(),args:p(g()).readonly().optional(),cwd:g().optional(),environment:p(g()).readonly().optional(),settingsSchema:Ry.optional()}),Hy=i({instanceId:g(),cameraStableId:g(),nodeId:g(),profileId:g(),profileLabel:g(),name:g(),enabled:v(),executable:g(),args:p(g()).readonly(),cwd:g(),environment:p(g()).readonly(),profileSettings:zy}),Uy=i({stableId:g(),nodeId:g(),profileId:g(),profileLabel:g(),name:g(),adoptable:v()}),Wy=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()})]),Gy=i({cursor:a().int().nonnegative(),reset:v(),snapshot:g().optional(),events:p(Wy).readonly()}),Ky={name:`terminal-session`,scope:`system`,mode:`singleton`,methods:{listProfiles:w(h(),p(Vy).readonly(),{auth:`admin`}),listInstances:w(h(),p(Hy).readonly(),{auth:`admin`}),createInstance:w(i({targetNodeId:g().min(1),profileId:g().min(1),name:g().trim().min(1).max(160).optional(),executable:g().max(1024).optional(),args:p(g().max(2048)).max(64).optional(),cwd:g().max(1024).optional(),environment:p(g().max(4096)).max(64).optional(),profileSettings:zy.optional()}),Hy,{kind:`mutation`,auth:`admin`}),updateInstance:w(i({instanceId:g().min(1),name:g().trim().min(1).max(160).optional(),executable:g().max(1024).optional(),args:p(g().max(2048)).max(64).optional(),cwd:g().max(1024).optional(),environment:p(g().max(4096)).max(64).optional(),profileSettings:zy.optional()}),Hy,{kind:`mutation`,auth:`admin`}),deleteInstance:w(i({instanceId:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),setInstanceEnabled:w(i({instanceId:g().min(1),enabled:v()}),Hy,{kind:`mutation`,auth:`admin`}),listLegacyCameras:w(h(),p(Uy).readonly(),{auth:`admin`}),adoptLegacyMonitor:w(i({stableId:g().min(1),name:g().trim().min(1).max(160).optional()}),Hy,{kind:`mutation`,auth:`admin`}),listSessions:w(h(),p(By).readonly(),{auth:`admin`}),openSession:w(i({profileId:g(),cols:a().int().positive(),rows:a().int().positive(),executable:g().max(1024).optional(),args:p(g().max(2048)).max(64).optional(),cwd:g().max(1024).optional(),environment:p(g().max(4096)).max(64).optional()}),By,{kind:`mutation`,auth:`admin`}),resize:w(i({sessionId:g(),cols:a().int().positive(),rows:a().int().positive()}),h(),{kind:`mutation`,auth:`admin`}),pullOutput:w(i({sessionId:g(),afterSeq:a().int().nonnegative(),waitMs:a().int().min(0).max(2e3).default(0),waitForOutput:v().optional()}),Gy,{kind:`mutation`,auth:`admin`,timeoutMs:15e3}),writeInput:w(i({sessionId:g(),data:g().max(64*1024)}),h(),{kind:`mutation`,auth:`admin`}),close:w(i({sessionId:g()}),h(),{kind:`mutation`,auth:`admin`})}},qy=i({urls:c([g(),p(g())]),username:g().optional(),credential:g().optional()}),Jy={name:`turn-provider`,scope:`system`,mode:`collection`,methods:{getTurnServers:w(h(),p(qy).readonly())}},Yy=i({credentialId:g(),label:g(),createdAt:a(),lastUsedAt:a().nullable(),transports:p(g()).default([])}),Xy={name:`user-passkeys`,scope:`system`,mode:`collection`,internal:!0,methods:{beginRegistration:w(i({userId:g(),username:g()}),i({optionsJSON:n(g(),u())}),{kind:`mutation`,auth:`admin`,access:`create`}),finishRegistration:w(i({userId:g(),response:n(g(),u()),label:g()}),i({success:y(!0),credentialId:g()}),{kind:`mutation`,auth:`admin`,access:`create`}),beginAuthentication:w(i({userId:g().optional()}),i({optionsJSON:n(g(),u())}),{kind:`mutation`,access:`view`,auth:`admin`}),finishAuthentication:w(i({userId:g(),response:n(g(),u())}),i({verified:v()}),{kind:`mutation`,access:`view`,auth:`admin`}),beginDiscoverableAuthentication:w(i({}),i({optionsJSON:n(g(),u())}),{kind:`mutation`,access:`view`,auth:`admin`}),finishDiscoverableAuthentication:w(i({response:n(g(),u())}),i({verified:v(),userId:g().nullable()}),{kind:`mutation`,access:`view`,auth:`admin`}),listPasskeys:w(i({userId:g()}),p(Yy),{auth:`admin`}),removePasskey:w(i({userId:g(),credentialId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),getSecondFactorPreference:w(i({userId:g()}),i({enabled:v()}),{auth:`admin`}),setSecondFactorPreference:w(i({userId:g(),enabled:v()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`create`})}},Zy=m([`cosine`,`dot`,`euclidean`]),Qy=n(g(),c([g(),a(),v()])),$y=i({equals:n(g(),c([g(),a(),v()])).optional(),between:n(g(),s([a(),a()])).optional()}),eb=i({id:g(),vector:g(),metadata:Qy}),tb=i({id:g(),score:a(),metadata:Qy}),nb=i({index:g(),dim:a().int().positive(),metric:Zy.default(`cosine`)}),rb=i({index:g(),items:p(eb)}),ib=i({upserted:a(),rejected:a()}),ab=i({index:g(),vector:g(),topK:a().int().positive(),minScore:a().optional(),filter:$y.optional()}),ob=i({matches:p(tb),scanned:a(),truncated:v()}),sb=i({index:g(),ids:p(g())}),cb=i({index:g(),filter:$y}),lb=i({deleted:a()}),ub=i({index:g(),ids:p(g())}),db=i({items:p(i({id:g(),metadata:Qy}))}),fb=i({index:g()}),pb=i({backend:g(),count:a(),dim:a(),metric:Zy,bytes:a().optional(),exact:v()}),mb={name:`vector-store`,scope:`system`,mode:`singleton`,internal:!0,methods:{declareIndex:w(nb,h(),{kind:`mutation`,auth:`admin`}),upsert:w(rb,ib,{kind:`mutation`,auth:`admin`}),query:w(ab,ob,{auth:`admin`}),getByIds:w(ub,db,{auth:`admin`}),deleteByIds:w(sb,lb,{kind:`mutation`,auth:`admin`}),deleteByFilter:w(cb,lb,{kind:`mutation`,auth:`admin`}),stats:w(fb,pb,{auth:`admin`})}},hb=24,gb=3,_b=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()}),vb=i({playbackUrl:g(),playbackEndpoints:p(g()).optional(),token:g().optional()}),yb={name:`videoclips`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[E.Camera],methods:{listClips:w(i({deviceId:a(),since:a(),until:a(),limit:a().int().positive().optional()}),p(_b).readonly(),{kind:`query`,auth:`admin`}),getClipPlayback:w(i({deviceId:a(),clipId:g()}),vb,{kind:`query`,auth:`admin`})}},bb=i({viewportWidth:a().int().positive().optional(),viewportHeight:a().int().positive().optional(),devicePixelRatio:a().positive().optional(),downlinkMbps:a().nonnegative().optional(),prefersTier:g().optional()}).partial(),xb=b(`kind`,[i({kind:y(`adaptive`)}),i({kind:y(`profile`),profile:S}),i({kind:y(`cam-stream`),camStreamId:g().min(1)})]),Sb=i({id:g(),label:g(),target:xb,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()}),Cb={name:`webrtc-session`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,preferredProvider:`stream-broker`,deviceTypes:[E.Camera],methods:{listStreams:w(i({deviceId:a().int().nonnegative()}),p(Sb)),createSession:w(i({deviceId:a().int().nonnegative(),target:xb,hints:bb.optional(),relayOnly:v().optional(),consumerAttribution:ol.optional()}),i({sessionId:g(),sdpOffer:g()}),{kind:`mutation`}),handleOffer:w(i({deviceId:a().int().nonnegative(),target:xb.optional(),sdpOffer:g(),sessionId:g().optional(),relayOnly:v().optional(),nonTrickle:v().optional(),disableTurn:v().optional(),disableIpv6:v().optional(),consumerAttribution:ol.optional(),hints:bb.optional()}),i({sessionId:g(),sdpAnswer:g()}),{kind:`mutation`}),handleAnswer:w(i({deviceId:a().int().nonnegative(),sessionId:g(),sdpAnswer:g()}),h(),{kind:`mutation`}),addIceCandidate:w(i({deviceId:a().int().nonnegative(),sessionId:g(),candidate:g(),sdpMid:g().nullable().optional(),sdpMLineIndex:a().int().nullable().optional()}),h(),{kind:`mutation`}),getIceCandidates:w(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:w(i({deviceId:a().int().nonnegative(),sessionId:g()}),h(),{kind:`mutation`}),hasAdaptiveBitrate:w(i({deviceId:a().int().nonnegative(),profile:S}),v()),getSessionState:w(i({deviceId:a().int().nonnegative(),sessionId:g()}),i({pendingRenegotiation:i({target:xb,epoch:a()}).nullable()}))},mount:{kind:`server-provided`}},wb=i({childDeviceIds:p(a()).readonly(),hiddenChildIds:p(a()).readonly()}),Tb={name:`accessories`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera,E.Hub,E.Switch,E.Light,E.Sensor,E.Thermostat,E.Cover,E.Lock,E.Fan,E.MediaPlayer,E.AlarmPanel,E.Generic],methods:{setChildHidden:w(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:wb,kind:`command-driven`}},Eb=m([`install`,`update`,`uninstall`,`restart`]),Db=m([`queued`,`fetching`,`staged`,`validating`,`applying`,`restarting`,`applied`,`done`,`failed`,`skipped`]),Ob=m([`framework`,`addon`]),kb=i({tsMs:a(),nodeId:g(),packageName:g(),phase:Db,message:g()}),Ab=i({taskId:g(),nodeId:g(),packageName:g(),fromVersion:g().nullable(),toVersion:g(),target:Ob,phase:Db,stagedPath:g().nullable(),attempts:a(),steps:p(kb),error:g().nullable(),startedAtMs:a().nullable(),finishedAtMs:a().nullable()}),jb=m([`running`,`completed`,`failed`,`partially-failed`,`cancelled`]),Mb=m([`single`,`bulk`,`cluster`]),Nb=i({jobId:g(),kind:Eb,createdAtMs:a(),createdBy:g(),scope:Mb,tasks:p(Ab),state:jb,schemaVersion:y(1)}),Pb=m([`debug`,`info`,`warn`,`error`]),Fb=m([`off`,`latest`,`beta`]),Ib=m([`off`,`latest`,`beta`,`inherit`]),Lb=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()}),Rb=i({pid:a().optional(),mode:g(),state:g()}),zb=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()}),Bb=i({manifest:Lb,declaration:u().optional(),source:g(),installSource:g().optional(),process:Rb.optional(),hasBackup:v().optional(),health:zb.nullable().optional()}),Vb=i({name:g(),version:g(),dir:g(),installSource:g().optional()}),Hb=i({name:g(),currentVersion:g(),latestVersion:g(),category:m([`addon`,`core`]),requiresRestart:v(),isSystem:v()}),Ub=i({version:g(),publishedAt:g(),deprecated:g().optional(),distTags:p(g()).readonly()}),Wb=i({name:g(),version:g(),description:g(),keywords:p(g()).readonly(),publishedAt:g(),author:g(),installed:v(),installedVersion:g().optional()}),Gb=i({channel:Fb,intervalSeconds:a(),updateCheckIntervalSeconds:a()}),Kb=Ib,qb=u(),Jb=u(),Yb=u(),Xb=m([`queued`,`updating`,`done`,`done-pending-restart`,`failed`]),Zb=i({name:g(),isSystem:v(),fromVersion:g(),toVersion:g(),status:Xb,error:g().optional(),startedAtMs:a().optional(),completedAtMs:a().optional()}),Qb=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:Qb,cancelled:v(),items:p(Zb).readonly()});var $b=i({packageName:g(),currentVersion:g(),latestVersion:g().nullable(),hasUpdate:v(),description:g().optional(),buildId:g().nullable()}),ex=i({timestamp:g(),level:g(),message:g(),scope:g().optional()}),tx=u(),nx=i({addonId:g().min(1),action:g().min(1),input:u()}),rx={name:`addons`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{list:w(h(),p(Bb).readonly()),getLogs:w(i({addonId:g(),limit:a().min(1).max(500).default(100),level:Pb.optional()}),p(tx)),listPackages:w(h(),p(Vb).readonly()),installPackage:w(i({packageName:g(),version:g().optional()}),Jb,{kind:`mutation`,auth:`admin`}),installFromWorkspace:w(i({packageName:g()}),Jb,{kind:`mutation`,auth:`admin`}),isWorkspaceAvailable:w(h(),v()),listWorkspacePackages:w(h(),p(u()).readonly()),uninstallPackage:w(i({packageName:g()}),u(),{kind:`mutation`,auth:`admin`}),reloadPackages:w(h(),Yb,{kind:`mutation`,auth:`admin`}),searchAvailable:w(i({query:g().optional()}),p(Wb)),listUpdates:w(i({nodeId:g().optional()}),p(Hb).readonly(),{auth:`admin`}),updatePackage:w(i({name:g().min(1),version:g().optional(),nodeId:g().optional()}),u(),{kind:`mutation`,auth:`admin`}),rollbackPackage:w(i({name:g().min(1)}),i({rolledBackTo:g().nullable()}),{kind:`mutation`,auth:`admin`}),forceRefresh:w(i({nodeId:g().optional()}),u(),{kind:`mutation`,auth:`admin`}),restartServer:w(i({confirm:y(!0)}),u(),{kind:`mutation`,auth:`admin`}),getLastRestart:w(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:w(h(),p($b).readonly(),{auth:`admin`}),listCapabilityProviders:w(i({capName:g().min(1)}),p(i({addonId:g(),mode:m([`singleton`,`collection`]),isActive:v()})).readonly()),setCapabilityProviderEnabled:w(i({capName:g().min(1),addonId:g().min(1),enabled:v()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getVersions:w(i({name:g()}),p(Ub).readonly()),restartAddon:w(i({addonId:g()}),qb,{kind:`mutation`,auth:`admin`}),retryLoad:w(i({packageName:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getAutoUpdateSettings:w(h(),Gb,{auth:`admin`}),setAutoUpdateSettings:w(i({channel:Fb,intervalSeconds:a().min(300).max(86400).optional(),updateCheckIntervalSeconds:a().min(900).max(604800).optional()}),u(),{kind:`mutation`,auth:`admin`}),getAddonAutoUpdate:w(i({addonId:g()}),Kb,{auth:`admin`}),setAddonAutoUpdate:w(i({addonId:g(),channel:Ib}),u(),{kind:`mutation`,auth:`admin`}),applyAutoUpdateToAll:w(i({channel:Fb}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),custom:w(nx,u(),{kind:`mutation`}),startJob:w(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:w(i({jobId:g()}),Nb.nullable(),{auth:`admin`}),listJobs:w(i({activeOnly:v().optional()}),p(Nb),{auth:`admin`}),cancelJob:w(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),onAddonLogs:w(i({addonId:g(),level:Pb.optional()}),ex,{kind:`subscription`})},mount:{kind:`server-provided`}},ix=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()}),ax={name:`air-quality-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:ix,kind:`push`},runtimeState:ix,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},ox=i({lux:a().min(0),lastFetchedAt:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional()}),sx={name:`ambient-light-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:ox,kind:`push`},runtimeState:ox,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},cx=i({className:g(),hits:a().int().nonnegative(),avgScore:a().min(0).max(1),peakScore:a().min(0).max(1)}),lx=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(cx).readonly()}),ux=i({ts:a().int(),dbfs:a().nullable(),peakDbfs:a(),avgDbfs:a(),topClass:g().nullable(),topScore:a().min(0).max(1).nullable()}),dx=i({points:p(ux).readonly(),effectiveSampleEveryMs:a().int().positive(),windowMsActual:a().int().nonnegative()}),fx={name:`audio-metrics`,scope:`device`,mode:`singleton`,deviceTypes:[E.Camera],methods:{getCurrentSnapshot:w(i({deviceId:a()}),lx.nullable()),getHistory:w(i({deviceId:a(),windowSec:a().int().positive().optional(),sampleEveryMs:a().int().positive().optional()}),dx)},runtimeState:lx,durability:`session`},px=i({enabled:v(),isRunning:v(),lastTriggeredAt:a(),lastError:g().nullable(),lastChangedAt:a()}),mx={name:`automation-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Automation],methods:{enable:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),disable:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),trigger:w(i({deviceId:a().int().nonnegative(),skipCondition:v().optional()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:px,kind:`push`},runtimeState:px,durability:`session`},hx=i({percentage:a().min(0).max(100),charging:m([`dc`,`solar`,`none`]),sleeping:v(),lastUpdated:a(),lastContactAt:a().optional(),binary:v().optional()}),gx={name:`battery`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera,E.Sensor,E.Button,E.Switch],methods:{wakeForStream:w(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:hx})}},status:{schema:hx,kind:`push`,empty:{percentage:0,charging:`none`,sleeping:!1,lastUpdated:0}},runtimeState:hx,durability:`restored`,volatileStateFields:[`lastUpdated`]},_x=i({on:v(),lastChangedAt:a()}),vx={name:`binary`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:_x,kind:`push`},runtimeState:_x,durability:`restored`,volatileStateFields:[`lastChangedAt`]},yx=i({percentage:a().min(0).max(100),lastChangedAt:a()}),bx={name:`brightness`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Light],methods:{setBrightness:w(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:yx,kind:`command-driven`},runtimeState:yx,durability:`session`},xx={name:`button`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Button],methods:{press:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})}},Sx=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()}),Cx=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()}),wx={name:`camera-credentials`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera],methods:{getCredentials:w(i({deviceId:a()}),Sx.nullable(),{kind:`query`,auth:`admin`})},status:{schema:Cx,kind:`command-driven`}},Tx=i({detected:v(),lastChangedAt:a()}),Ex={name:`carbon-monoxide`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:Tx,kind:`push`},runtimeState:Tx,durability:`restored`,volatileStateFields:[`lastChangedAt`]},Dx=m([`off`,`heat`,`cool`,`auto`,`heat_cool`,`fan_only`,`dry`]),Ox=i({mode:Dx,availableModes:p(Dx),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()}),kx={name:`climate-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Thermostat,E.Climate],methods:{setMode:w(i({deviceId:a().int().nonnegative(),mode:Dx}),h(),{kind:`mutation`,auth:`admin`}),setFanMode:w(i({deviceId:a().int().nonnegative(),fanMode:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),setPreset:w(i({deviceId:a().int().nonnegative(),preset:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),setTarget:w(i({deviceId:a().int().nonnegative(),target:a()}),h(),{kind:`mutation`,auth:`admin`}),setTargetRange:w(i({deviceId:a().int().nonnegative(),targetLow:a(),targetHigh:a()}),h(),{kind:`mutation`,auth:`admin`}),setTargetHumidity:w(i({deviceId:a().int().nonnegative(),targetHumidity:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`}),setSwingVertical:w(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`}),setSwingHorizontal:w(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:Ox,kind:`push`},runtimeState:Ox,durability:`session`},Ax=i({r:a().int().min(0).max(255),g:a().int().min(0).max(255),b:a().int().min(0).max(255)}),jx=i({h:a().min(0).max(360),s:a().min(0).max(100),v:a().min(0).max(100)}),Mx=b(`mode`,[i({mode:y(`rgb`),rgb:Ax}),i({mode:y(`hsv`),hsv:jx}),i({mode:y(`mired`),mireds:a().int().min(50).max(1e3)})]),Nx=i({mode:m([`rgb`,`hsv`,`mired`]),rgb:Ax.optional(),hsv:jx.optional(),mireds:a().int().optional(),lastChangedAt:a()}),Px={name:`color`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Light],methods:{setColor:w(i({deviceId:a().int().nonnegative(),color:Mx}),h(),{kind:`mutation`,auth:`admin`})},events:{onColorChanged:{data:i({deviceId:a(),mode:m([`rgb`,`hsv`,`mired`]),rgb:Ax.optional(),hsv:jx.optional(),mireds:a().int().optional(),lastChangedAt:a()})}},status:{schema:Nx,kind:`command-driven`},runtimeState:Nx,durability:`session`},Fx=2e4,Ix=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()]),Lx=i({settings:n(g(),u())}),Rx=i({label:g()}),zx={name:`connection-test`,scope:`system`,mode:`collection`,methods:{testSettings:w(Lx,Ix,{kind:`mutation`,auth:`admin`}),describeTest:w(h(),Rx,{auth:`admin`})}},Bx=i({connected:v(),lastChangedAt:a()}),Vx={name:`connectivity`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:Bx,kind:`push`},runtimeState:Bx,durability:`restored`,volatileStateFields:[`lastChangedAt`]},Hx=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()}),Ux=i({items:p(Hx),lastChangedAt:a()}),Wx={name:`consumables`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:Object.values(E),deviceConfig:{ui:{kind:`widget`,widgetId:`host/consumables-panel`,tab:`consumables`,topTab:!0,label:`Consumables`,order:5}},methods:{reset:w(i({deviceId:a().int().nonnegative(),key:g().min(1)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:Ux,kind:`push`,empty:{items:[],lastChangedAt:0},itemArray:{path:`items`,keyField:`key`,labelField:`label`,itemSchema:Hx,emptyItem:{key:``,label:``,level:null,status:null,lastResetAt:null,resettable:!1}}},runtimeState:Ux.extend({lastFetchedAt:a()}),durability:`session`},Gx=i({entryOpen:v(),lastChangedAt:a()}),Kx={name:`contact`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:Gx,kind:`push`},runtimeState:Gx,durability:`restored`,volatileStateFields:[`lastChangedAt`]},qx=m([`numeric`,`select`,`text`,`datetime`]),Jx=i({kind:qx,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()}),Yx=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)})]),Xx={name:`control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Control],methods:{setValue:w(i({deviceId:a().int().nonnegative(),control:Yx}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:Jx,kind:`push`},runtimeState:Jx,durability:`session`},Zx=m([`open`,`opening`,`closing`,`closed`,`stopped`]),Qx=i({state:Zx,position:a().min(0).max(100).nullable(),tiltPosition:a().min(0).max(100).nullable(),lastChangedAt:a()}),$x={name:`cover`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Cover],methods:{open:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),close:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),stop:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),setPosition:w(i({deviceId:a().int().nonnegative(),position:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`}),setTiltPosition:w(i({deviceId:a().int().nonnegative(),tiltPosition:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:Qx,kind:`push`},runtimeState:Qx,durability:`restored`,volatileStateFields:[`lastChangedAt`]},eS=m([`auto`,`day`,`night`,`schedule`]),tS=i({min:a(),max:a(),step:a()}),nS=i({mode:eS,sensitivity:a().optional(),switchDelaySec:a().optional(),lastFetchedAt:a()}),rS=i({modes:p(eS),supportsSensitivity:v(),sensitivity:tS.optional(),supportsSwitchDelay:v(),switchDelaySec:tS.optional()}),iS=i({mode:eS.optional(),sensitivity:a().optional(),switchDelaySec:a().optional()}),aS={name:`day-night`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`day-night`,tab:`image`}},methods:{getOptions:w(i({deviceId:a()}),rS),setSettings:w(i({deviceId:a(),settings:iS}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:nS,kind:`poll`},runtimeState:nS,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},oS=i({online:v(),lastChangedAt:a()}),sS={name:`device-status`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{},events:{onStatusChanged:{data:i({deviceId:a(),status:oS})}},status:{schema:oS,kind:`push`},runtimeState:oS,durability:`restored`,volatileStateFields:[`lastChangedAt`]},cS=i({lastPressedAt:a().nullable(),pressCountSinceStart:a()}),lS=i({deviceId:a(),timestamp:a()}),uS={name:`doorbell`,scope:`device`,deviceNative:!0,mode:`singleton`,kind:`wrapper`,defaultActive:!1,deviceTypes:[E.Button,E.Camera],exposesDeviceSettings:!0,methods:{},events:{onPressed:{data:lS}},status:{schema:cS,kind:`push`},runtimeState:cS,durability:`restored`},dS=m([`date`,`time`,`datetime`]),fS=i({value:g(),format:dS.optional(),lastFetchedAt:a()}),pS={name:`enum-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:fS,kind:`push`},runtimeState:fS,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},mS=i({deviceId:a(),eventType:g(),data:n(g(),u()).nullable(),timestamp:a(),seq:a()}),hS=i({eventTypes:p(g()),lastEvent:mS.nullable(),eventCountSinceStart:a()}),gS={name:`event-emitter`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.EventEmitter],methods:{},events:{onEvent:{data:mS}},status:{schema:hS,kind:`push`},runtimeState:hS,durability:`session`},_S=i({id:g(),type:g(),timestamp:a(),label:g().optional(),thumbnailUrl:g().optional(),clipUrl:g().optional(),metadata:n(g(),u()).optional()}),vS={name:`events`,scope:`device`,mode:`singleton`,deviceTypes:[E.Camera],methods:{getEvents:w(i({deviceId:a(),from:a().optional(),to:a().optional(),limit:a().optional()}),p(_S)),getEventThumbnail:w(i({deviceId:a(),eventId:g()}),i({base64:g(),contentType:g()}).nullable()),getEventClipUrl:w(i({deviceId:a(),eventId:g()}),g().nullable())}},yS=i({id:g(),name:g(),sampleCount:a().int().nonnegative(),coverMediaKey:g().optional(),coverBase64:g().optional()}),bS=i({id:g(),source:m([`detected`,`photo`]),addedAt:a().int(),deviceId:a().int().optional(),base64:g().optional()}),xS=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:V.optional(),keyFrameMediaKey:g().optional(),bestMatchScore:a().optional(),nativeFaceShortSidePx:a().optional(),suggestedIdentityId:g().optional(),suggestedMatchScore:a().optional()}),SS=m([`unassigned`,`recognized`,`identified`,`all`]),CS=m([`timestamp`,`suggestionConfidence`]),wS=m([`asc`,`desc`]),TS=i({faceIds:p(g()).readonly(),representativeFaceId:g(),size:a().int(),cohesion:a()}),ES=i({key:g(),kind:g(),base64:g(),sizeBytes:a(),timestamp:a()}),DS={name:`face-gallery`,scope:`system`,mode:`singleton`,methods:{listIdentities:w(i({includeCrops:v().optional()}).optional(),p(yS).readonly()),createIdentity:w(i({name:g().min(1)}),yS,{kind:`mutation`,auth:`admin`}),renameIdentity:w(i({id:g(),name:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),deleteIdentity:w(i({id:g()}),h(),{kind:`mutation`,auth:`admin`}),listIdentitySamples:w(i({identityId:g()}),p(bS).readonly()),removeSample:w(i({identityId:g(),sampleId:g()}),h(),{kind:`mutation`,auth:`admin`}),listRecentFaces:w(i({deviceId:a().int().optional(),deviceIds:p(a().int()).optional(),limit:a().int().positive().optional(),filter:SS.optional(),since:a().int().optional(),until:a().int().optional(),sortBy:CS.optional(),sortDirection:wS.optional(),includeCrops:v().optional()}).optional(),p(xS).readonly()),getFaceByTrack:w(i({deviceId:a().int(),trackId:g()}),xS.nullable()),getFaceMedia:w(i({faceId:g()}),p(ES).readonly()),assignFace:w(i({faceId:g(),identityId:g()}),h(),{kind:`mutation`,auth:`admin`}),unassignFace:w(i({faceId:g()}),h(),{kind:`mutation`,auth:`admin`}),deleteFace:w(i({faceId:g()}),h(),{kind:`mutation`,auth:`admin`}),assignFaces:w(i({faceIds:p(g()).min(1),identityId:g()}),i({assigned:a().int(),failed:p(g()).readonly()}),{kind:`mutation`,auth:`admin`}),unassignFaces:w(i({faceIds:p(g()).min(1)}),i({unassigned:a().int(),failed:p(g()).readonly()}),{kind:`mutation`,auth:`admin`}),suggestFaceClusters:w(i({threshold:a().min(0).max(1).optional(),minClusterSize:a().int().min(2).optional(),maxClusters:a().int().positive().optional(),limit:a().int().positive().optional(),maxFacesScanned:a().int().positive().optional()}).optional(),p(TS).readonly())}},OS=m([`forward`,`reverse`]),kS=i({percentage:a().min(0).max(100).nullable(),percentageStep:a().positive().optional(),preset:g(),availablePresets:p(g()),direction:OS.nullable(),oscillating:v().nullable(),lastChangedAt:a()}),AS={name:`fan-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Fan],methods:{setPercentage:w(i({deviceId:a().int().nonnegative(),percentage:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`}),setPreset:w(i({deviceId:a().int().nonnegative(),preset:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),setDirection:w(i({deviceId:a().int().nonnegative(),direction:OS}),h(),{kind:`mutation`,auth:`admin`}),setOscillating:w(i({deviceId:a().int().nonnegative(),oscillating:v()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:kS,kind:`push`},runtimeState:kS,durability:`session`},jS=i({flags:n(g(),u()),deviceType:g().nullable(),model:g().nullable(),channelCount:a().nullable(),lastProbedAt:a(),lastFetchedAt:a()}),MS={name:`feature-probe`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{},events:{onProbeChanged:{data:i({deviceId:a(),status:jS})}},status:{schema:jS,kind:`push`},runtimeState:jS,durability:`session`},NS=i({flooded:v(),lastChangedAt:a()}),PS={name:`flood`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:NS,kind:`push`},runtimeState:NS,durability:`restored`,volatileStateFields:[`lastChangedAt`]},FS=i({detected:v(),lastChangedAt:a()}),IS={name:`gas`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:FS,kind:`push`},runtimeState:FS,durability:`restored`,volatileStateFields:[`lastChangedAt`]},LS=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()}),RS={name:`humidifier`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Humidifier],methods:{setOn:w(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`}),setTargetHumidity:w(i({deviceId:a().int().nonnegative(),humidity:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`}),setMode:w(i({deviceId:a().int().nonnegative(),mode:g().min(1)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:LS,kind:`push`},runtimeState:LS,durability:`session`},zS=i({percent:a().min(0).max(100),lastFetchedAt:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional()}),BS={name:`humidity-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor,E.Thermostat],methods:{},status:{schema:zS,kind:`push`},runtimeState:zS,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},VS=i({url:g().nullable(),lastUpdated:a().nullable()}),HS={name:`image`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Image],methods:{},status:{schema:VS,kind:`push`},runtimeState:VS,durability:`session`},US=m([`0`,`90`,`180`,`270`]),WS=m([`auto`,`manual`]),GS=m([`auto`,`manual`]),KS=m([`off`,`blc`,`wdr`,`hlc`]),qS=i({min:a(),max:a(),step:a()}),JS=i({brightness:a().optional(),contrast:a().optional(),saturation:a().optional(),sharpness:a().optional(),mirror:v().optional(),flip:v().optional(),rotate:US.optional(),whiteBalance:WS.optional(),warmth:a().optional(),exposureMode:GS.optional(),backlightMode:KS.optional(),lastFetchedAt:a()}),YS=i({supportsBrightness:v(),brightness:qS.optional(),supportsContrast:v(),contrast:qS.optional(),supportsSaturation:v(),saturation:qS.optional(),supportsSharpness:v(),sharpness:qS.optional(),supportsMirror:v(),supportsFlip:v(),rotateOptions:p(US),whiteBalanceModes:p(WS),supportsWarmth:v(),warmth:qS.optional(),exposureModes:p(GS),backlightModes:p(KS)}),XS=i({brightness:a().optional(),contrast:a().optional(),saturation:a().optional(),sharpness:a().optional(),mirror:v().optional(),flip:v().optional(),rotate:US.optional(),whiteBalance:WS.optional(),warmth:a().optional(),exposureMode:GS.optional(),backlightMode:KS.optional()}),ZS={name:`image-settings`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`image-settings`,tab:`image`}},methods:{getOptions:w(i({deviceId:a()}),YS),setSettings:w(i({deviceId:a(),settings:XS}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:JS,kind:`poll`},runtimeState:JS,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},QS=i({id:g(),addonId:g(),name:g(),enabled:v(),info:n(g(),u()).readonly(),createdAt:a(),updatedAt:a(),processState:g()}),$S=i({id:g(),addonId:g(),name:g(),enabled:v(),info:n(g(),u()).readonly(),createdAt:a(),updatedAt:a()}),eC=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()}),tC=m([`validated`,`rejected`,`inconclusive`,`unsupported`]),nC=i({success:v(),error:g().optional(),status:tC.optional(),testedBy:g().nullable().optional(),latencyMs:a().nonnegative().optional(),detail:g().optional()}),rC=i({addonId:g(),name:g(),enabled:v().optional(),info:n(g(),u()).optional(),settings:n(g(),u()).optional(),skipRestart:v().optional()}),iC=i({id:g(),name:g().optional(),enabled:v().optional(),info:n(g(),u()).optional()}),aC=i({success:v(),deletedId:g()}),oC={name:`integrations`,scope:`system`,mode:`singleton`,methods:{list:w(h(),p(QS)),get:w(i({id:g()}),QS),getByAddonId:w(i({addonId:g()}),$S.nullable()),create:w(rC,$S,{kind:`mutation`,auth:`admin`}),update:w(iC,$S,{kind:`mutation`,auth:`admin`}),delete:w(i({id:g()}),aC,{kind:`mutation`,auth:`admin`}),getSettings:w(i({id:g()}),n(g(),u()),{auth:`admin`}),setSettings:w(i({id:g(),settings:n(g(),u())}),i({success:v()}),{kind:`mutation`,auth:`admin`}),getAvailableTypes:w(h(),p(eC),{auth:`admin`}),testConnection:w(i({addonId:g(),settings:n(g(),u())}),nC,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},sC=i({codecs:p(g()),sampleRate:a(),duplex:m([`half`,`full`]),maxBacklogMs:a()}),cC=i({talking:v(),lastSessionAt:a().nullable(),ability:sC.nullable()}),lC=m([`opus`,`s16le`,`g711ulaw`,`g711alaw`]),uC={name:`intercom`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera],methods:{startSession:w(i({deviceId:a()}),i({sessionId:g(),sdpOffer:g()}),{kind:`mutation`,auth:`protected`}),handleAnswer:w(i({deviceId:a(),sessionId:g(),sdpAnswer:g()}),h(),{kind:`mutation`,auth:`protected`}),stopSession:w(i({deviceId:a(),sessionId:g()}),h(),{kind:`mutation`,auth:`protected`}),startTalkSession:w(i({deviceId:a()}),i({sessionId:g()}),{kind:`mutation`,auth:`protected`}),pushTalkAudio:w(i({deviceId:a(),audioBase64:g(),codec:lC.optional(),sampleRate:a().int().positive().optional(),channels:a().int().positive().optional(),sequenceNumber:a().int()}),i({accepted:v()}),{kind:`mutation`,auth:`protected`}),endTalkSession:w(i({deviceId:a()}),h(),{kind:`mutation`,auth:`protected`})},events:{onStatusChanged:{data:i({deviceId:a(),status:cC})}},status:{schema:cC,kind:`command-driven`},runtimeState:cC,durability:`session`},dC=m([`idle`,`mowing`,`paused`,`docked`,`error`]),fC=m([`info`,`warning`,`error`]),pC=i({activity:dC,batteryLevel:a().min(0).max(100).nullable(),progressPercent:a().min(0).max(100).nullable(),currentCode:a().nullable(),currentCodeLabel:g().nullable(),severity:fC,lastChangedAt:a()}),mC={name:`lawn-mower-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.LawnMower],methods:{startMowing:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),pause:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),dock:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:pC,kind:`push`},runtimeState:pC,durability:`session`},hC=m([`lan`,`wifi`,`docker`,`vpn`,`loopback`,`other`]),gC=i({name:g(),family:m([`IPv4`,`IPv6`]),address:g(),cidr:g(),netmask:g(),internal:v(),mac:g(),kind:hC,preferred:v(),plausible:v(),plausibleReason:g()}),_C=i({interfaces:p(gC).readonly(),probedAt:a()}),vC=gC.nullable(),yC=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()}),bC=m([`server-config`,`server-env`,`caller-hint`,`default`]),xC=i({port:a().int().min(1).max(65535),source:bC}),SC=i({endpoints:p(yC).readonly(),localPort:xC}),CC=i({baseUrl:g().nullable(),resolved:g().nullable()}),wC=i({baseUrls:p(g()).readonly(),resolved:p(g()).readonly()}),TC=i({addresses:p(g()).readonly()}),EC=i({mode:m([`generated`,`uploaded`,`disabled`]),leafFingerprintSha256:g().nullable(),caFingerprintSha256:g().nullable(),validTo:g().nullable(),sans:p(g()),caCertPem:g().nullable(),reissueError:g().nullable(),restartRequired:v()}),DC={name:`local-network`,scope:`system`,mode:`singleton`,methods:{list:w(h(),_C),getPreferred:w(h(),vC),getConnectionEndpoints:w(i({port:a().int().min(1).max(65535).optional(),includeLoopback:v().optional(),ipv4Only:v().optional(),scheme:m([`http`,`https`]).optional()}),SC),getNotificationEndpoint:w(h(),CC),setNotificationEndpoint:w(i({baseUrl:g().nullable()}),CC,{kind:`mutation`}),getViewerEndpoints:w(h(),wC),setViewerEndpoints:w(i({baseUrls:p(g()).readonly()}),wC,{kind:`mutation`}),getAllowedAddresses:w(h(),TC),setAllowedAddresses:w(TC,i({success:y(!0)}),{kind:`mutation`}),resetAllowlistToBestMatch:w(h(),TC,{kind:`mutation`}),getTlsStatus:w(h(),EC),regenerateCertificate:w(i({reason:g().optional()}),EC,{kind:`mutation`,auth:`admin`}),uploadCertificate:w(i({certPem:g().min(1),keyPem:g().min(1),caPem:g().optional()}),EC,{kind:`mutation`,auth:`admin`}),downloadCa:w(h(),i({pem:g()})),revertToGeneratedCertificate:w(h(),EC,{kind:`mutation`,auth:`admin`})},mount:{kind:`hub-only`}},OC=m([`locked`,`unlocked`,`locking`,`unlocking`,`jammed`]),kC=i({state:OC,lastChangedAt:a()}),AC={name:`lock-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Lock],methods:{lock:w(i({deviceId:a().int().nonnegative(),code:g().min(1).optional()}),h(),{kind:`mutation`,auth:`admin`}),unlock:w(i({deviceId:a().int().nonnegative(),code:g().min(1).optional()}),h(),{kind:`mutation`,auth:`admin`}),open:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:kC,kind:`push`},runtimeState:kC,durability:`restored`,volatileStateFields:[`lastChangedAt`]},jC=m([`off`,`on`,`idle`,`playing`,`paused`,`buffering`,`standby`]),MC=m([`off`,`all`,`one`]),NC=i({type:g(),title:g(),artist:g().optional(),album:g().optional(),imageUrl:g().optional()}),PC=i({state:jC,volumeLevel:a().min(0).max(100).nullable(),isMuted:v().nullable(),source:g(),availableSources:p(g()),currentMedia:NC.nullable(),positionMs:a().int().nonnegative().nullable(),durationMs:a().int().nonnegative().nullable(),shuffle:v().nullable(),repeat:MC.nullable(),lastChangedAt:a()}),FC={name:`media-player`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.MediaPlayer],methods:{play:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),pause:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),stop:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),next:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),previous:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),seek:w(i({deviceId:a().int().nonnegative(),positionMs:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),setVolume:w(i({deviceId:a().int().nonnegative(),volumeLevel:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`}),setMute:w(i({deviceId:a().int().nonnegative(),muted:v()}),h(),{kind:`mutation`,auth:`admin`}),setShuffle:w(i({deviceId:a().int().nonnegative(),shuffle:v()}),h(),{kind:`mutation`,auth:`admin`}),setRepeat:w(i({deviceId:a().int().nonnegative(),repeat:MC}),h(),{kind:`mutation`,auth:`admin`}),selectSource:w(i({deviceId:a().int().nonnegative(),source:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),playMedia:w(i({deviceId:a().int().nonnegative(),mediaId:g().min(1),mediaType:g().min(1)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:PC,kind:`push`},runtimeState:PC,durability:`session`},IC=i({id:g(),label:g(),scope:m([`mesh`,`public`]),url:g(),hostname:g(),port:a(),protocol:m([`http`,`https`])}),LC=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()}),RC=i({joined:v(),meshIp:g(),magicDnsHostname:g(),peerCount:a(),endpoints:p(IC).readonly(),error:g().optional(),tenantName:g(),magicDnsSuffix:g(),userLogin:g().nullable(),controlPlaneUrl:g(),keyExpiry:a().nullable(),daemonSocket:g().optional(),daemonCliPath:g().optional()}),zC={name:`mesh-network`,scope:`system`,mode:`collection`,providerKind:`mesh`,methods:{getStatus:w(h(),RC),join:w(i({authKey:g().min(8),hostname:g().optional()}),i({joined:y(!0)}),{kind:`mutation`}),startLogin:w(i({hostname:g().optional()}),i({loginUrl:g()}),{kind:`mutation`}),leave:w(h(),i({left:y(!0)}),{kind:`mutation`}),logout:w(h(),i({loggedOut:y(!0)}),{kind:`mutation`}),listPeers:w(h(),i({peers:p(LC).readonly()})),testConnection:w(i({authKey:g().optional()}),i({ok:v(),tenant:g().optional(),daemonVersion:g().optional(),error:g().optional()}),{kind:`mutation`})}},BC=i({detected:v(),lastDetectedAt:a().nullable(),autoClearAfterMs:a().nullable()}),VC=i({deviceId:a(),detected:v(),timestamp:a(),source:$_,regions:p(Wf).readonly().optional()}),HC={name:`motion`,scope:`device`,mode:`singleton`,deviceNative:!0,deviceTypes:[E.Camera,E.Sensor],methods:{isDetected:w(i({deviceId:a()}),v())},events:{onMotionChanged:{data:VC}},status:{schema:BC,kind:`push`},runtimeState:BC,durability:`session`},UC=i({enabled:v(),lastChangedAt:a()}),WC=UC.extend({lastFetchedAt:a()}),GC={name:`motion-trigger`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Light,E.Siren,E.Switch],methods:{setMotionTrigger:w(i({deviceId:a().int().nonnegative(),enabled:v()}),h(),{kind:`mutation`,auth:`admin`})},events:{onMotionTriggerChanged:{data:i({deviceId:a(),enabled:v(),lastChangedAt:a()})}},status:{schema:UC,kind:`command-driven`},runtimeState:WC,durability:`session`},KC=i({id:a(),enabled:v(),shape:nm}),qC=i({enabled:v(),sensitivity:a(),regions:p(KC),lastFetchedAt:a()}),JC=i({maxRegions:a(),supportedShapes:p(am),grid:sm,sensitivity:i({min:a(),max:a(),step:a()})}),YC=i({enabled:v().optional(),sensitivity:a().optional(),regions:p(KC).optional()}),XC={name:`motion-zones`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/motion-zones-grid`,tab:`motion`,label:`Motion Zones`}},methods:{getOptions:w(i({deviceId:a()}),JC),setZone:w(i({deviceId:a(),patch:YC}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:qC,kind:`poll`},runtimeState:qC,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},ZC=m([`person`,`vehicle`,`animal`,`face`,`package`,`other`]),QC=i({class:ZC,timestamp:a(),confidence:a().min(0).max(1).optional()}),$C=i({lastByClass:l(ZC,QC.nullable()),supportedClasses:p(ZC).readonly(),enabled:v()}),ew=$C.extend({lastFetchedAt:a()}),tw={name:`native-object-detection`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera],methods:{setEnabled:w(i({deviceId:a(),enabled:v()}),h(),{kind:`mutation`,auth:`admin`})},events:{onDetected:{data:i({deviceId:a(),detection:QC})}},status:{schema:$C,kind:`push`},runtimeState:ew,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},nw=i({nominalBitrateKbps:a(),observedBitrateKbps:a(),peakBitrateKbps:a(),packetLossPercent:a(),lastUpdated:a()}),rw=i({rttMs:a(),jitterMs:a(),estimatedBandwidthKbps:a(),packetLossPercent:a().min(0).max(100),lastUpdated:a()}),iw=i({deviceId:a(),streams:n(g(),nw),client:rw.optional()}),aw={name:`network-quality`,scope:`system`,mode:`singleton`,methods:{getDeviceStats:w(i({deviceId:a()}),iw.nullable()),getAllStats:w(h(),p(iw).readonly()),reportClientStats:w(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`}},ow=i({addonId:g(),capabilities:p(g()).readonly(),status:g()}),sw=i({pid:a(),name:g(),state:g(),cpuPercent:a(),memoryRss:a(),uptimeSeconds:a(),services:p(ow).readonly(),groupId:g().optional()}),cw=i({id:g(),status:g(),cpuPercent:a(),memoryRss:a()}),lw=i({category:g(),total:a(),healthy:a(),addons:p(cw).readonly()}),uw=i({name:g(),version:g()}),dw=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(sw).readonly(),categories:p(lw).readonly(),rootPackage:uw.nullable()}),fw=i({callerAddonId:g(),providerAddonId:g(),capName:g(),callsPerMin:a(),lastCallAtMs:a()}),pw=i({nodeId:g(),name:g(),version:g(),status:g(),synced:v()}),mw=i({hubVersion:g(),nodes:p(pw)}),hw=i({nodeId:g(),addonId:g()}),gw=i({id:g(),status:g(),version:g().optional(),packageName:g().optional()}),_w=i({success:v()}),vw=i({success:v(),reason:g().optional()}),yw=i({restarted:p(g()).readonly(),failed:p(g()).readonly()}),bw=i({nodeId:g(),name:g()}),xw={name:`nodes`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{topology:w(h(),p(dw).readonly(),{auth:`admin`}),deployAddon:w(hw,_w,{kind:`mutation`,auth:`admin`}),undeployAddon:w(hw,_w,{kind:`mutation`,auth:`admin`}),restartAddon:w(hw,_w,{kind:`mutation`,auth:`admin`}),restartProcess:w(i({nodeId:g(),processName:g()}),vw,{kind:`mutation`,auth:`admin`}),restartNode:w(i({nodeId:g()}),yw,{kind:`mutation`,auth:`admin`}),shutdownNode:w(i({nodeId:g()}),_w,{kind:`mutation`,auth:`admin`}),renameNode:w(i({nodeId:g(),name:g().min(1).max(64)}),bw,{kind:`mutation`,auth:`admin`}),clusterAddonStatus:w(h(),n(g(),mw),{auth:`admin`}),getCapUsageGraph:w(i({windowSeconds:a().int().positive().max(300).default(60)}),p(fw).readonly(),{auth:`admin`}),getNodeAddons:w(i({nodeId:g()}),p(gw).readonly(),{auth:`admin`}),setProcessLogLevel:w(i({nodeId:g(),level:g()}),_w,{kind:`mutation`,auth:`admin`}),executeQuery:w(i({nodeId:g(),addonId:g(),queryName:g(),params:n(g(),u()).optional()}),u(),{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},Sw=m([`min`,`low`,`normal`,`high`]),Cw=i({id:g().min(1),title:g().min(1),uri:o().optional(),destructive:v().optional()}),ww=i({image:v(),priority:v(),data:v(),actions:v(),recipients:v()}),Tw=i({lastSentAt:a(),lastError:g().nullable(),queueDepth:a().int().nonnegative(),supports:ww}),Ew=i({deviceId:a().int().nonnegative(),title:g().optional(),body:g().min(1),image:g().optional(),priority:Sw.optional(),channel:g().optional(),recipients:p(g()).optional(),actions:p(Cw).optional(),data:n(g(),u()).optional()}),Dw=i({notificationId:g(),acceptedAt:a()}),Ow={name:`notifier`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Notifier],methods:{send:w(Ew,Dw,{kind:`mutation`,auth:`admin`}),cancel:w(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:Tw,kind:`command-driven`},runtimeState:Tw,durability:`session`},kw=i({value:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional(),lastFetchedAt:a()}),Aw={name:`numeric-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:kw,kind:`push`},runtimeState:kw,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},jw=m([`text`,`timestamp`,`watermark`]),Mw=m([`top-left`,`top-center`,`top-right`,`bottom-left`,`bottom-center`,`bottom-right`,`custom`]),Nw=i({id:g(),kind:jw,enabled:v(),text:g().optional(),position:Mw.optional(),availablePositions:p(Mw).readonly(),readOnly:v().optional()}),Pw=i({overlays:p(Nw).readonly()}),Fw=i({enabled:v().optional(),text:g().optional(),position:Mw.optional()}).partial(),Iw={name:`osd`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera],methods:{setOverlay:w(i({deviceId:a(),overlayId:g(),patch:Fw}),h(),{kind:`mutation`,auth:`admin`})},events:{onStatusChanged:{data:i({deviceId:a(),status:Pw})}},status:{schema:Pw,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}}}]}},Lw=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`])})]),Rw=i({enabled:v().default(!0),source:Lw,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:vm.optional(),conditions:jm.optional(),fallbackText:g().max(64).default(``)}),zw=i({slotId:g(),kind:jw,readOnly:v(),cameraEnabled:v(),cameraText:g().optional(),binding:Rw.nullable()}),Bw=m([`written`,`unchanged`,`gated`,`unreadable`,`disabled`,`unbound`,`failed`]),Vw=i({slotId:g(),outcome:Bw,text:g(),reason:g().optional()}),Hw=m([`number`,`boolean`,`string`,`enum`]),Uw=i({deviceId:a().int(),deviceName:g(),capName:g(),valuePath:g(),label:g(),valueType:Hw,enumValues:p(g()).readonly().optional()}),Ww={name:`osd-manager`,scope:`system`,mode:`singleton`,methods:{getDeviceOsd:w(i({deviceId:a().int()}),i({supported:v(),slots:p(zw)}),{auth:`admin`}),getSourceCatalog:w(i({deviceId:a().int()}),i({sources:p(Uw)}),{auth:`admin`}),getConditionSupport:w(i({}),i({supported:p(g()),catalog:p(qm)}),{auth:`admin`}),setSlotBinding:w(i({deviceId:a().int(),slotId:g().min(1),binding:Rw}),i({slot:zw,render:Vw}),{kind:`mutation`,auth:`admin`}),clearSlotBinding:w(i({deviceId:a().int(),slotId:g().min(1)}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),copyDeviceConfiguration:w(i({sourceDeviceId:a().int(),targetDeviceId:a().int()}),i({copied:a().int().nonnegative(),skipped:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),previewSlot:w(i({deviceId:a().int(),slotId:g().min(1),binding:Rw.optional()}),Vw,{kind:`mutation`,auth:`admin`}),renderDevice:w(i({deviceId:a().int()}),i({results:p(Vw)}),{kind:`mutation`,auth:`admin`})}},Gw=4,Kw=200,qw=m([`normal`,`offline`,`on_batteries`]),Jw=a().int().min(4).max(200),Yw=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:qw.nullable(),error:g().nullable(),errorCode:a().nullable(),isDualHopper:v(),childLock:v(),indicatorLight:v(),feedSound:v(),volume:a(),lastFetchedAt:a()}),Xw={name:`pet-feeder`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.PetFeeder],methods:{feed:w(i({deviceId:a().int().nonnegative(),grams:Jw.optional(),hopper1:Jw.optional(),hopper2:Jw.optional()}),h(),{kind:`mutation`,auth:`admin`}),cancelFeed:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),resetDesiccant:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),markFoodReplenished:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),callPet:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),playSound:w(i({deviceId:a().int().nonnegative(),soundId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),setChildLock:w(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`}),setIndicatorLight:w(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`}),setFeedSound:w(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`}),setVolume:w(i({deviceId:a().int().nonnegative(),level:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:Yw,kind:`poll`},runtimeState:Yw,durability:`session`},Zw=i({id:g(),name:g(),sampleCount:a().int().nonnegative(),coverMediaKey:g().optional(),coverBase64:g().optional()}),Qw=i({id:g(),text:g(),score:a(),addedAt:a().int(),deviceId:a().int().optional(),base64:g().optional()}),$w=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:V.optional(),keyFrameMediaKey:g().optional(),base64:g().optional(),cropUrl:g().optional()}),eT=i({key:g(),kind:g(),base64:g(),sizeBytes:a(),timestamp:a()}),tT=i({plateIds:p(g()).readonly(),representativePlateId:g(),representativeText:g(),size:a().int(),cohesion:a()}),nT={name:`plate-gallery`,scope:`system`,mode:`singleton`,methods:{listPlates:w(i({deviceId:a().int().optional(),limit:a().int().positive().optional(),includeCrops:v().optional()}).optional(),p($w).readonly()),getPlateByTrack:w(i({deviceId:a().int(),trackId:g()}),$w.nullable()),getPlateMedia:w(i({plateId:g()}),p(eT).readonly()),searchPlates:w(i({text:g().min(1),maxDistance:a().int().min(0).optional(),limit:a().int().positive().optional(),includeCrops:v().optional()}),p($w).readonly()),suggestPlateClusters:w(i({maxDistance:a().int().min(0).optional(),minClusterSize:a().int().min(2).optional(),limit:a().int().positive().optional()}).optional(),p(tT).readonly()),correctPlateText:w(i({plateId:g(),text:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),deletePlate:w(i({plateId:g()}),h(),{kind:`mutation`,auth:`admin`}),listVehicles:w(i({includeCrops:v().optional()}).optional(),p(Zw).readonly()),createVehicle:w(i({name:g().min(1)}),Zw,{kind:`mutation`,auth:`admin`}),renameVehicle:w(i({id:g(),name:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),deleteVehicle:w(i({id:g()}),h(),{kind:`mutation`,auth:`admin`}),listVehicleSamples:w(i({vehicleId:g()}),p(Qw).readonly()),removeVehicleSample:w(i({vehicleId:g(),sampleId:g()}),h(),{kind:`mutation`,auth:`admin`}),assignPlate:w(i({plateId:g(),vehicleId:g()}),h(),{kind:`mutation`,auth:`admin`}),unassignPlate:w(i({plateId:g()}),h(),{kind:`mutation`,auth:`admin`}),assignPlates:w(i({plateIds:p(g()).min(1),vehicleId:g()}),i({assigned:a().int(),failed:p(g()).readonly()}),{kind:`mutation`,auth:`admin`}),unassignPlates:w(i({plateIds:p(g()).min(1)}),i({unassigned:a().int(),failed:p(g()).readonly()}),{kind:`mutation`,auth:`admin`})}},rT=m(qa),iT=m([`videotoolbox`,`cuda`,`nvdec`,`vaapi`,`qsv`,`d3d11va`,`dxva2`,`amf`,`vdpau`,`drm`,`coreml`,`tensorrt`,`openvino`,`directml`,`webgpu`,`none`]).nullable().optional(),aT=i({preferred:p(g()).readonly(),rationale:g()}),oT=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:oT,codec:m([`H264`,`H265`]),family:m([`videotoolbox`,`vaapi`,`nvenc`,`qsv`,`amf`,`software`]),available:v(),reason:g().optional()})).readonly(),defaultH264:oT,defaultH265:oT,probedAt:a()}),i({methods:p(g()).readonly(),probedAt:a()});var sT=m([`darwin`,`linux`,`win32`]),cT=m([`arm64`,`x64`]),lT=i({type:m([`nvidia`,`amd`,`intel`,`apple`]),name:g(),memoryMB:a().optional()}),uT=i({type:m([`apple-ane`,`intel-npu`])}),dT=i({type:y(`coral-edgetpu`),bus:g().optional()}),fT=i({platform:sT,arch:cT,cpuModel:g(),cpuCores:a(),totalRAM_MB:a(),availableRAM_MB:a(),gpu:lT.nullable(),npu:uT.nullable(),coral:dT.nullable().optional()}),pT=i({runtime:m([`node`,`python`]),backend:g(),format:m([`onnx`,`coreml`,`openvino`,`tflite`]),score:a(),reason:g(),available:v()}),mT=i({key:g(),backend:g(),device:g(),format:rT,runtime:y(`python`),score:a(),available:v()}),hT=i({hardware:fT,scores:p(pT).readonly(),bestScore:pT,pythonPath:g().nullable(),devices:p(mT).readonly()}),gT=i({modelId:g(),name:g(),minRAM_MB:a(),accuracyScore:a(),formats:p(g()).readonly()}),_T=i({modelId:g(),runtime:m([`node`,`python`]),backend:g(),format:rT,reason:g()}),vT={name:`platform-probe`,scope:`system`,mode:`singleton`,methods:{getCapabilities:w(h(),hT),getHardware:w(h(),fT),resolveInferenceConfig:w(i({requirements:p(gT).readonly()}),_T),resolveHwAccel:w(i({prefer:iT}),aT)}},yT=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()}),bT={name:`power-meter`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:yT,kind:`push`},runtimeState:yT,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},xT=i({latitude:a().min(-90).max(90),longitude:a().min(-180).max(180),accuracyMeters:a().nonnegative()}),ST=i({state:g(),location:g().nullable(),gps:xT.nullable(),batteryPercent:a().min(0).max(100).nullable(),lastChangedAt:a()}),CT={name:`presence`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Presence],methods:{},status:{schema:ST,kind:`push`},runtimeState:ST,durability:`restored`,volatileStateFields:[`lastChangedAt`]},wT=i({hpa:a(),lastFetchedAt:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional()}),TT={name:`pressure-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:wT,kind:`push`},runtimeState:wT,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},ET=b(`kind`,[em,tm]),DT=i({id:a(),enabled:v(),shape:ET}),OT=i({enabled:v(),regions:p(DT),audioEnabled:v().nullable(),lastFetchedAt:a()}),kT=i({maxRegions:a(),supportedShapes:p(am),polygonVertices:om.optional(),supportsAudioMute:v()}),AT=i({enabled:v().optional(),regions:p(DT).optional()}),jT={name:`privacy-mask`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/privacy-mask-grid`,tab:`image`,label:`Privacy Mask`}},methods:{getOptions:w(i({deviceId:a()}),kT),setMask:w(i({deviceId:a(),patch:AT}),h(),{kind:`mutation`,auth:`admin`}),setAudioEnabled:w(i({deviceId:a(),enabled:v()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:OT,kind:`poll`},runtimeState:OT,durability:`restored`,volatileStateFields:[`lastFetchedAt`]};function MT(e){return e.length===0?null:e.some(e=>e.audioEnabled)}var NT=i({id:g(),name:g()}),PT=i({pan:a(),tilt:a(),zoom:a()}),FT=i({pan:a().optional(),tilt:a().optional(),zoom:a().optional(),speed:a().optional()}),IT=PT.extend({autofocus:v()}),LT=i({hasPan:v(),hasTilt:v(),hasZoom:v(),supportsPresets:v(),maxPresets:a().optional(),hasAutofocus:v()}),RT={name:`ptz`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/ptz-panel`,tab:`ptz`,topTab:!0,label:`PTZ`,order:0}},methods:{move:w(FT.extend({deviceId:a()}),h(),{kind:`mutation`}),continuousMove:w(FT.extend({deviceId:a()}),h(),{kind:`mutation`}),stop:w(i({deviceId:a()}),h(),{kind:`mutation`}),getPresets:w(i({deviceId:a()}),p(NT)),goToPreset:w(i({deviceId:a(),presetId:g()}),h(),{kind:`mutation`}),savePreset:w(i({deviceId:a(),presetId:g(),name:g()}),h(),{kind:`mutation`,auth:`admin`}),deletePreset:w(i({deviceId:a(),presetId:g()}),h(),{kind:`mutation`,auth:`admin`}),getOptions:w(i({deviceId:a()}),LT),goHome:w(i({deviceId:a()}),h(),{kind:`mutation`}),getPosition:w(i({deviceId:a()}),PT),setAutofocus:w(i({deviceId:a(),enabled:v()}),h(),{kind:`mutation`})},status:{schema:IT,kind:`command-driven`}},zT=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)}),BT=i({value:g(),label:g()}),VT=i({enabled:v(),lastChangedAt:a(),currentSettings:zT.nullable(),supportedTargetTypes:p(BT)}),HT=VT.extend({lastFetchedAt:a()}),UT={name:`ptz-autotrack`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/ptz-autotrack`,tab:`ptz`,topTab:!0,label:`Auto-Tracking`,order:5}},methods:{getStatus:w(i({deviceId:a()}),VT),setEnabled:w(i({deviceId:a(),enabled:v()}),h(),{kind:`mutation`}),getSettings:w(i({deviceId:a()}),zT.nullable()),setSettings:w(i({deviceId:a(),settings:zT.partial()}),h(),{kind:`mutation`})},events:{onStatusChanged:{data:i({deviceId:a(),status:VT})}},status:{schema:VT,kind:`command-driven`},runtimeState:HT,durability:`session`},WT={name:`reboot`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera,E.Sensor,E.Switch],methods:{reboot:w(i({deviceId:a().int().nonnegative()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`})}},GT=i({deviceId:a(),enabled:v(),activeMode:m([`off`,`continuous`,`events`]),nodeId:g(),storageBytes:a()}),KT=i({profile:g(),startMs:a(),endMs:a()}),qT=i({deviceId:a(),ranges:p(KT)}),JT=i({deviceId:a(),days:p(a())}),YT=i({deviceId:a(),localMasterPath:g().nullable(),playbackUrl:g().nullable(),playbackEndpoints:p(g())}),XT=i({deviceId:a(),usedBytes:a(),oldestMs:a().nullable().optional()}),ZT=i({locationId:g().nullable(),locationIds:p(g()).optional(),root:g().optional(),usedBytes:a(),availableBytes:a().nullable(),totalBytes:a().nullable()}),QT=i({nodeId:g(),totalUsedBytes:a(),devices:p(XT),locations:p(ZT).optional()}),$T=i({deviceId:a(),profile:g(),fromLocationId:g(),toLocationId:g(),bytes:a(),files:a().int()}),eE=m([`unassigned`,`target-not-writable`,`below-threshold`,`no-headroom`]),tE=i({deviceId:a(),profile:g(),fromLocationId:g(),toLocationId:g().nullable(),bytes:a(),reason:eE}),nE=i({moves:p($T),skipped:p(tE),bytesToMove:a(),jobIds:p(g())}),rE=i({throttleMbps:a().min(1).max(1e3).optional(),minMoveGb:a().min(0).optional()}),iE=b(`kind`,[i({kind:y(`segment`),startMs:a(),durMs:a(),bytes:a()}),i({kind:y(`gap`),nearestEdgeMs:a().nullable(),prevEndMs:a().nullable().optional()})]),aE=i({data:_(Uint8Array)}),oE=i({data:_(Uint8Array),gopStartMs:a(),gopDurMs:a()}),sE=b(`kind`,[i({kind:y(`ok`),data:_(Uint8Array),gopStartMs:a(),gopDurMs:a(),reachesRequestedEnd:v()}),i({kind:y(`spans-multiple-segments`),segmentEndMs:a()})]),cE={name:`recording`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,status:{schema:GT,kind:`command-driven`},methods:{getAvailability:w(i({deviceId:a(),fromMs:a(),toMs:a()}),qT,{kind:`query`,auth:`protected`}),getDaysWithRecordings:w(i({deviceId:a(),fromMs:a(),toMs:a(),tzOffsetMinutes:a()}),JT,{kind:`query`,auth:`protected`}),getPlaybackManifest:w(i({deviceId:a(),fromMs:a(),toMs:a()}),YT,{kind:`query`,auth:`protected`}),getStorageUsage:w(i({}),QT,{kind:`query`,auth:`admin`}),getDeviceConfig:w(i({deviceId:a()}),Vi,{kind:`query`,auth:`admin`}),locateSegment:w(i({deviceId:a(),profile:g(),epochMs:a()}),iE,{kind:`query`,auth:`admin`}),readSegmentBytes:w(i({deviceId:a(),profile:g(),startMs:a()}),aE,{kind:`query`,auth:`admin`}),readGopBytes:w(i({deviceId:a(),profile:g(),startMs:a(),epochMs:a()}),oE,{kind:`query`,auth:`admin`}),readWindowBytes:w(i({deviceId:a(),profile:g(),startMs:a(),fromMs:a(),toMs:a()}),sE,{kind:`query`,auth:`admin`}),setDeviceConfig:w(i({deviceId:a(),config:Vi}),Vi,{kind:`mutation`,auth:`admin`}),rescanStorage:w(i({deviceId:a()}),GT,{kind:`mutation`,auth:`admin`}),pruneFootage:w(i({deviceId:a(),reason:_i.optional()}),i({floorMs:a().nullable(),deletedBuckets:a().int(),reclaimedBytes:a().int()}),{kind:`mutation`,auth:`admin`}),deleteFootprint:w(i({deviceId:a(),fromMs:a().optional(),toMs:a().optional()}),i({deletedBuckets:a().int(),reclaimedBytes:a().int()}),{kind:`mutation`,auth:`admin`}),listOpsLog:w(yi,p(vi).readonly(),{kind:`query`,auth:`admin`}),renderGif:w(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:w(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:w(A,i({paused:y(!0)}),{kind:`mutation`,auth:`admin`}),resumeForStorageMigration:w(A,i({resumed:y(!0)}),{kind:`mutation`,auth:`admin`}),refreshStorageLocationsForMigration:w(A,i({refreshed:y(!0)}),{kind:`mutation`,auth:`admin`}),startStorageMigrationMove:w(Yi,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),getStorageMigrationMoveStatus:w(i({jobId:g()}),Ki.nullable(),{auth:`admin`}),cancelStorageMigrationMove:w(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),relocateFootage:w(Ji,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),listRelocateJobs:w(i({}),p(Ki).readonly(),{kind:`query`,auth:`admin`}),cancelRelocateJob:w(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),planStorageRebalance:w(rE,nE,{kind:`query`,auth:`admin`}),startStorageRebalance:w(rE,nE,{kind:`mutation`,auth:`admin`})}},lE=a().min(.25).max(32),uE=i({fromSec:a().nonnegative(),toSec:a().nonnegative()}).refine(e=>e.toSec>e.fromSec,{message:`dense range must have toSec > fromSec`}),dE=200,fE=i({everyMs:a().int().positive(),ranges:p(uE).min(1).max(200)}),pE=i({everyMs:a().int().positive(),outputFps:a().int().min(1).max(60).optional(),dense:fE.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`]})}),mE=i({speed:lE.optional(),timelapse:pE.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`]})}),hE=m([`queued`,`rendering`,`ready`,`failed`,`expired`,`deleted`]),gE=i({id:g(),deviceId:a(),profile:g(),fromMs:a(),toMs:a(),options:mE,state:hE,progressPct:a().nullable(),fileBytes:a().nullable(),expiresAt:a(),deleteAfterDownload:v(),downloadedAt:a().nullable(),createdAt:a(),createdBy:g(),error:g().nullable()}),_E=i({url:g(),endpoints:p(g())}),vE=50*1024*1024,yE=i({base64:g(),contentType:g(),name:g(),bytes:a().int().nonnegative()}),bE={name:`recording-export`,scope:`system`,mode:`singleton`,methods:{createExport:w(i({deviceId:a(),profile:g().optional(),profiles:p(g()).min(1).optional(),fromMs:a(),toMs:a(),options:mE}).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`]})}),gE,{kind:`mutation`,auth:`protected`}),listExports:w(i({deviceId:a().optional()}),p(gE),{kind:`query`,auth:`protected`}),getExport:w(i({exportId:g()}),gE,{kind:`query`,auth:`protected`}),cancelExport:w(i({exportId:g()}),gE,{kind:`mutation`,auth:`protected`}),deleteExport:w(i({exportId:g()}),gE,{kind:`mutation`,auth:`protected`}),getDownloadUrl:w(i({exportId:g()}),_E,{kind:`query`,auth:`protected`}),readExportBytes:w(i({exportId:g()}),yE,{kind:`query`,auth:`protected`})}},xE=g(),SE=[`day`,`ir`,`night`,`dawn`,`dusk`],CE=m([`skip`,`judge-anyway`]),wE=`__diverged__`,TE=m([`matched`,`diverged`,`unknown`]),EE=m([`no-reference-for-condition`,`view-shifted`,`no-vision-profile`,`encoder-model-changed`,`no-snapshot`]),DE=i({embedding:p(a()),modelId:g(),condition:xE,capturedAt:a(),thumbnailMediaId:g().optional(),anchorEmbedding:p(a()).optional()}),OE=i({id:g(),label:g(),references:p(DE),textPrompts:p(g()).optional(),referenceCount:a(),currentlyMatched:v()}),kE=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()})]),AE=60,jE=120,ME=60,NE=.85,PE=`skip`,FE=8e3,IE=448,LE=!0,RE=i({enabled:v().default(!1),prompt:g().min(1).max(1e3),profileId:g().optional(),timeoutMs:a().int().min(1e3).max(2e4).default(FE),maxImagePx:a().int().min(64).max(2048).default(448),onTimeout:m([`flip`,`hold`]).default(`hold`)}),zE=i({id:g(),label:g(),roi:em,enabled:v(),triggerMode:m([`periodic`,`on-motion`,`both`]),checkIntervalSec:a().optional(),check:kE,states:p(OE),currentStateId:g().nullable(),lastCheckedAt:a().nullable(),lastConfidence:a().nullable(),currentCondition:xE.nullable(),availability:m([`ok`,`unavailable`]),unavailableReason:g().nullable(),baselineStateId:g().nullable(),emit:m([`latched`,`live`]).default(`latched`),verdict:TE,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:RE.optional(),anchorThreshold:a().min(0).max(1).default(NE),autoRestore:v().default(!1),onUncoveredCondition:CE.default(PE),suspendedCondition:xE.nullable().default(null),unavailable:EE.nullable(),coveredConditions:p(xE)}),BE=i({monitors:p(zE),lastFetchedAt:a()}),VE={name:`scene-monitor`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[E.Camera],methods:{listScenes:w(i({deviceId:a()}),BE),createScene:w(i({deviceId:a(),label:g(),roi:em,check:kE,triggerMode:m([`periodic`,`on-motion`,`both`]).optional(),checkIntervalSec:a().optional()}),zE,{kind:`mutation`,auth:`admin`}),updateScene:w(i({deviceId:a(),monitorId:g(),patch:i({label:g().optional(),roi:em.optional(),enabled:v().optional(),triggerMode:m([`periodic`,`on-motion`,`both`]).optional(),checkIntervalSec:a().optional(),check:kE.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:CE.optional(),confirm:RE.nullable().optional()})}),h(),{kind:`mutation`,auth:`admin`}),deleteScene:w(i({deviceId:a(),monitorId:g()}),h(),{kind:`mutation`,auth:`admin`}),captureReference:w(i({deviceId:a(),monitorId:g(),stateId:g().optional(),label:g().optional(),condition:xE.optional()}),i({stateId:g(),referenceCount:a()}),{kind:`mutation`,auth:`admin`}),deleteReference:w(i({deviceId:a(),monitorId:g(),stateId:g(),index:a()}),h(),{kind:`mutation`,auth:`admin`}),recheckNow:w(i({deviceId:a(),monitorId:g()}),h(),{kind:`mutation`,auth:`admin`}),resetScene:w(i({deviceId:a(),monitorId:g(),recapture:v().optional()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:BE,kind:`push`},runtimeState:BE,durability:`session`},HE=i({isRunning:v(),lastRunAt:a(),lastRunSuccess:v().nullable(),lastError:g().nullable(),lastChangedAt:a()}),UE={name:`script-runner`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Script],methods:{run:w(i({deviceId:a().int().nonnegative(),variables:n(g(),u()).optional()}),h(),{kind:`mutation`,auth:`admin`}),stop:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:HE,kind:`push`},runtimeState:HE,durability:`session`},WE=i({detected:v(),lastChangedAt:a()}),GE={name:`smoke`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:WE,kind:`push`},runtimeState:WE,durability:`restored`,volatileStateFields:[`lastChangedAt`]},KE=i({camStreamId:g().min(1),kind:He,url:g().optional(),codec:g().optional(),resolution:Ue.optional(),fps:a().positive().optional(),label:g().optional(),deviceFeatures:p(g()).optional(),autoEligible:v().optional(),metadata:n(g(),u()).optional()}),qE=i({descriptors:p(KE),lastFetchedAt:a()}),JE={name:`stream-catalog`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera],methods:{getCatalog:w(i({deviceId:a().int().nonnegative()}),p(KE).readonly())},runtimeState:qE,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},YE=m([`main`,`sub`,`ext`]),XE=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()}),ZE=i({main:XE.optional(),sub:XE.optional(),ext:XE.optional(),lastFetchedAt:a()}),QE=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()}),$E=i({main:QE.optional(),sub:QE.optional(),ext:QE.optional()}),eD=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()}),tD={name:`stream-params`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`stream-params`,tab:`streaming`}},methods:{getOptions:w(i({deviceId:a()}),$E),setProfile:w(i({deviceId:a(),profile:YE,patch:eD}),h(),{kind:`mutation`,auth:`admin`}),getConfigSchema:w(i({deviceId:a()}),u().nullable())},status:{schema:ZE,kind:`poll`},runtimeState:ZE,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},nD=[{profile:`main`,prefix:`streamMain`,label:`Main stream`},{profile:`sub`,prefix:`streamSub`,label:`Sub stream`},{profile:`ext`,prefix:`streamExt`,label:`Third stream`}];function rD(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 iD(e,t){let n=[];for(let r of nD){let i=e[r.profile];if(!i)continue;let a=rD(r,i,t?.[r.profile]);a&&n.push(a)}return n.length===0?null:{sections:n}}function aD(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 oD=i({on:v(),lastChangedAt:a()}),sD={name:`switch`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Switch,E.Siren,E.Light],methods:{setState:w(i({deviceId:a(),on:v()}),h(),{kind:`mutation`,auth:`admin`})},events:{onStateChanged:{data:i({deviceId:a(),on:v(),lastChangedAt:a()})}},status:{schema:oD,kind:`command-driven`},runtimeState:oD,durability:`restored`,volatileStateFields:[`lastChangedAt`],settings:{bindings:[{kind:`scalar`,statusPath:`on`,method:`setState`,valueArg:`on`,field:{label:`On`,kind:`boolean`}}]}},cD=i({streaming:v(),notifications:v(),objectDetection:v(),remoteAccess:v(),agentCluster:v(),smartHome:v(),recordings:v(),backup:v(),repl:v()}),lD=i({status:y(`ok`),uptime:a()}),uD=i({name:g(),address:g(),family:g(),internal:v()}),dD=m([`operator-set`,`derived-from-ip`]),fD=i({latitude:a().min(-90).max(90),longitude:a().min(-180).max(180),source:dD,updatedAt:a(),label:g().optional()}),pD=i({location:fD.nullable(),derivationAttemptedAt:a().nullable(),derivationError:g().nullable()}),mD=i({latitude:a().min(-90).max(90),longitude:a().min(-180).max(180)}).nullable(),hD=m([`http`,`ws`,`mesh`,`unknown`]),gD=i({http:a(),ws:a(),mesh:a(),unknown:a()}),_D=i({plane:hD,procedure:g(),userAgent:g(),ip:g(),principal:g(),calls:a(),subscriptions:a(),perMin:a()}),vD=i({procedure:g(),calls:a(),planes:gD,subscriptions:a(),perMin:a()}),yD=i({armed:v(),elapsedMs:a(),windowMs:a(),armedUntilMs:a(),httpRequests:a(),batchedRequests:a(),procedureCalls:a(),planes:gD,planesExplainTotal:v(),wsConnections:a(),wsMessages:a(),subscriptions:a(),subscriptionStops:a(),distinctGroups:a(),unattributedCalls:a(),procedures:p(vD).readonly(),groups:p(_D).readonly()}),bD=yD.extend({persisted:v()}),xD=m([`debug`,`info`,`warn`,`error`]),SD=m([`request-census`]),CD=m([`cluster`,`node`,`component`]),wD=m([`default`,`cluster`,`node`,`component`]),TD=i({scope:CD,nodeId:g().nullable(),component:g().nullable(),level:xD.nullable()}),ED=i({level:xD,levelSource:wD}),DD=i({layers:p(TD).readonly()}),OD=i({id:SD,armed:v(),armedUntilMs:a(),remainingMs:a(),persisted:v()}),kD=i({id:SD,armMs:a().int().min(0),reportEveryMs:a().int().positive().optional()}),AD=i({channel:g(),armed:v(),armedUntilMs:a(),remainingMs:a(),deviceIds:p(a().int()).readonly().nullable()}),jD=i({channel:g().min(1),armMs:a().int().min(0),deviceIds:p(a().int()).readonly().nullable().optional()}),MD=i({level:xD.nullable().optional(),diagnostics:p(kD).readonly().optional(),channels:p(jD).readonly().optional()}),ND=lf.extend({addonId:g()}),PD=af.extend({addonId:g()}),FD=i({scopeNodeId:g().optional(),scopeComponent:g().optional()}),ID=i({scopeNodeId:g().optional(),scopeComponent:g().optional(),patch:MD}),LD=i({scopeNodeId:g().nullable(),scopeComponent:g().nullable(),effective:ED,explicit:DD,activeWindows:p(OD).readonly(),channels:p(ai).readonly(),activeChannels:p(AD).readonly(),persisted:v()}),RD={name:`system`,scope:`system`,mode:`singleton`,methods:{info:w(h(),cD),health:w(h(),lD),featureFlags:w(h(),cD),networkAddresses:w(h(),p(uD).readonly()),getRetentionConfig:w(h(),u().nullable(),{auth:`admin`}),setRetentionConfig:w(n(g(),u()),ce(),{kind:`mutation`,auth:`admin`}),forceRetentionCleanup:w(h(),h(),{kind:`mutation`,auth:`admin`}),getSiteLocation:w(h(),pD),setSiteLocation:w(mD,pD,{kind:`mutation`,auth:`admin`}),detectSiteLocation:w(h(),pD,{kind:`mutation`,auth:`admin`}),getRequestCensus:w(h(),bD,{auth:`admin`}),getLoadContributions:w(h(),p(ND).readonly(),{auth:`admin`}),getFailureContributions:w(h(),p(PD).readonly(),{auth:`admin`}),getLoggingSettings:w(FD,LD,{auth:`admin`}),setLoggingSettings:w(ID,LD,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},zD=i({tampered:v(),lastChangedAt:a()}),BD={name:`tamper`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:zD,kind:`push`},runtimeState:zD,durability:`restored`,volatileStateFields:[`lastChangedAt`]},VD=i({celsius:a(),lastFetchedAt:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional()}),HD={name:`temperature-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor,E.Thermostat],methods:{},status:{schema:VD,kind:`push`},runtimeState:VD,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},UD=i({title:g(),message:g(),severity:m([`info`,`warning`,`critical`]),duration:a().optional(),action:i({label:g(),url:g()}).optional()}),WD={name:`toast`,scope:`system`,mode:`singleton`,methods:{onToast:w(h(),UD,{kind:`subscription`})},mount:{kind:`server-provided`}},GD=i({currentVersion:g().nullable(),availableVersion:g().nullable(),updatable:v(),state:g().nullable(),inProgress:v()}),KD={name:`update`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Update],methods:{installUpdate:w(h(),h(),{kind:`mutation`,auth:`admin`})},status:{schema:GD,kind:`poll`},runtimeState:GD,durability:`session`},qD=i({id:g(),username:g(),isAdmin:v().default(!1),allowedProviders:c([p(g()),y(`*`)]),allowedDevices:n(g(),c([p(g()),y(`*`)])),scopes:p(q).default([]),totpEnabled:v().default(!1),createdAt:a(),updatedAt:a()}),JD=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(q).optional()}),YD=i({id:g(),isAdmin:v().optional(),allowedProviders:c([p(g()),y(`*`)]).optional(),allowedDevices:n(g(),c([p(g()),y(`*`)])).optional(),scopes:p(q).optional()}),XD=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()}),ZD=i({label:g(),isAdmin:v().default(!1),allowedProviders:c([p(g()),y(`*`)]).optional(),allowedDevices:n(g(),c([p(g()),y(`*`)])).optional()}),QD=i({token:g(),record:XD}),$D=i({id:g(),userId:g(),name:g(),tokenPrefix:g(),scopes:p(q),expiresAt:a().nullish(),lastUsedAt:a().nullish(),createdAt:a()}),eO=i({userId:g(),name:g(),scopes:p(q),expiresAt:a().optional()}),tO=i({token:g(),record:$D}),nO=i({id:g(),userId:g(),username:g(),integrationId:g(),scopes:p(q),createdAt:a(),lastUsedAt:a(),revokedAt:a().nullable()}),rO=i({secret:g(),otpauthUrl:g()}),iO=i({enabled:v(),confirmedAt:a().nullable()}),aO={name:`user-management`,scope:`system`,mode:`singleton`,methods:{listUsers:w(h(),p(qD),{auth:`admin`}),createUser:w(JD,qD,{kind:`mutation`,auth:`admin`,access:`create`}),updateUser:w(YD,i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),deleteUser:w(i({id:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),resetPassword:w(i({id:g(),newPassword:g().min(6)}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),setUserScopes:w(i({userId:g(),scopes:p(q)}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),validateCredentials:w(i({username:g(),password:g()}),qD.extend({passwordHash:g()}).nullable(),{kind:`mutation`,access:`view`}),listApiKeys:w(h(),p(XD),{auth:`admin`}),createApiKey:w(ZD,QD,{kind:`mutation`,auth:`admin`,access:`create`}),revokeApiKey:w(i({id:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),validateApiKey:w(i({token:g()}),XD.nullable(),{kind:`mutation`,access:`view`}),createScopedToken:w(eO,tO,{kind:`mutation`,auth:`admin`,access:`create`}),revokeScopedToken:w(i({id:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),validateScopedToken:w(i({token:g()}),$D.nullable(),{access:`view`}),listScopedTokens:w(i({userId:g()}),p($D),{auth:`admin`}),setupTotp:w(i({userId:g()}),rO,{kind:`mutation`,auth:`admin`,access:`create`}),confirmTotp:w(i({userId:g(),code:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),disableTotp:w(i({userId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),getTotpStatus:w(i({userId:g()}),iO,{auth:`admin`}),verifyTotp:w(i({userId:g(),code:g()}),i({valid:v()}),{kind:`mutation`,access:`view`}),oauthIssueCode:w(i({integrationId:g(),userId:g(),username:g(),scopes:p(q),redirectUri:g(),hubUrl:g(),codeChallenge:g().optional(),refreshTtlSec:c([a().int().positive(),y(`never`)]).optional()}),i({code:g()}),{kind:`mutation`,access:`create`}),oauthExchangeCode:w(i({code:g(),redirectUri:g(),codeVerifier:g().optional()}),i({accessToken:g(),refreshToken:g(),expiresIn:a()}).nullable(),{kind:`mutation`,access:`view`}),oauthRefresh:w(i({refreshToken:g()}),i({accessToken:g(),refreshToken:g(),expiresIn:a()}).nullable(),{kind:`mutation`,access:`view`}),oauthVerifyAccessToken:w(i({token:g()}),i({userId:g(),username:g(),scopes:p(q)}).nullable(),{access:`view`}),listOauthSessions:w(h(),p(nO),{auth:`admin`}),revokeOauthSession:w(i({id:g()}),i({success:v()}),{kind:`mutation`,auth:`admin`,access:`delete`})}},oO=m([`idle`,`cleaning`,`paused`,`returning`,`docked`,`drying`,`error`]),sO=i({level:a().min(0).max(100).nullable(),status:m([`ok`,`low`,`full`]).nullable()}),cO=i({state:oO,batteryLevel:a().min(0).max(100).nullable(),fanSpeed:g().nullable(),availableFanSpeeds:p(g()),cleanWater:sO.nullable(),dirtyWater:sO.nullable(),detergent:sO.nullable(),dustBin:sO.nullable(),progressPercent:a().min(0).max(100).nullable(),errorCode:a().nullable(),errorLabel:g().nullable(),lastChangedAt:a()}),lO={name:`vacuum-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Vacuum],methods:{start:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),pause:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),stop:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),returnToBase:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),locate:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),setFanSpeed:w(i({deviceId:a().int().nonnegative(),speed:g().min(1)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:cO,kind:`push`},runtimeState:cO,durability:`session`},uO=m([`open`,`opening`,`closing`,`closed`,`stopped`]),dO=i({state:uO,position:a().min(0).max(100).nullable(),lastChangedAt:a()}),fO={name:`valve`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Valve],methods:{open:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),close:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),stop:w(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),setPosition:w(i({deviceId:a().int().nonnegative(),position:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:dO,kind:`push`},runtimeState:dO,durability:`session`},pO=i({detected:v(),lastChangedAt:a()}),mO={name:`vibration`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Sensor],methods:{},status:{schema:pO,kind:`push`},runtimeState:pO,durability:`restored`,volatileStateFields:[`lastChangedAt`]},hO=i({currentTemp:a().nullable(),targetTemp:a().nullable(),operationMode:g().nullable(),availableModes:p(g()),away:v().nullable(),minTemp:a().nullable(),maxTemp:a().nullable(),lastChangedAt:a()}),gO={name:`water-heater`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.WaterHeater],methods:{setTargetTemp:w(i({deviceId:a().int().nonnegative(),temp:a().finite()}),h(),{kind:`mutation`,auth:`admin`}),setOperationMode:w(i({deviceId:a().int().nonnegative(),mode:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),setAway:w(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:hO,kind:`push`},runtimeState:hO,durability:`session`},_O=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()}),vO={name:`weather`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[E.Weather],methods:{},status:{schema:_O,kind:`push`},runtimeState:_O,durability:`session`},yO=i({totalObjects:a().int().nonnegative(),byClass:n(g(),a().int().nonnegative())}),bO=yO.extend({zoneId:g(),zoneName:g(),trackIds:p(g()).readonly()}),xO=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()}),SO=i({ts:a().int(),frameWidth:a().int().nonnegative(),frameHeight:a().int().nonnegative(),zones:p(bO).readonly(),frame:yO,unzoned:yO,stationaryObjects:p(xO).readonly().optional()}),CO=m([`minute`,`5min`,`hour`]),wO=i({from:a().int(),to:a().int(),resolution:CO}),TO=i({ts:a().int(),count:a().int().nonnegative()}),EO={name:`zone-analytics`,scope:`device`,mode:`singleton`,deviceTypes:[E.Camera],methods:{getCurrentSnapshot:w(i({deviceId:a()}),SO.nullable()),getZoneHistory:w(i({deviceId:a(),zoneId:g(),className:g().optional()}).extend(wO.shape),p(TO).readonly()),getCameraHistory:w(i({deviceId:a(),className:g().optional()}).extend(wO.shape),p(TO).readonly()),getUnzonedHistory:w(i({deviceId:a(),className:g().optional()}).extend(wO.shape),p(TO).readonly())},runtimeState:SO,durability:`session`},DO=m([`motion`,`detection`,`package`]),OO={name:`zone-rules`,scope:`device`,mode:`singleton`,deviceTypes:[E.Camera],methods:{listRules:w(i({deviceId:a(),stage:DO}),p(X).readonly()),setRules:w(i({deviceId:a(),stage:DO,rules:p(X).readonly()}),h(),{kind:`mutation`,auth:`admin`})},runtimeState:i({motion:p(X).readonly(),detection:p(X).readonly(),package:p(X).readonly()}),durability:`restored`},kO=[`decoder`,`motion-detection`,`pipeline-executor`,`audio-analyzer`,`pipeline-analytics`,`notification-output`],AO=[...kO,`pipeline-orchestrator`,`pipeline-runner`],jO=[{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 MO(e){for(let t of jO){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 NO(e,t=[]){for(let n of jO){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 PO={contact:`entryOpen`,binary:`on`,switch:`on`,motion:`detected`,flood:`flooded`,gas:`detected`,smoke:`detected`,"carbon-monoxide":`detected`,vibration:`detected`,tamper:`tampered`},FO={contact:`lastChangedAt`,binary:`lastChangedAt`,switch:`lastChangedAt`,motion:`lastDetectedAt`,flood:`lastChangedAt`,gas:`lastChangedAt`,smoke:`lastChangedAt`,"carbon-monoxide":`lastChangedAt`,vibration:`lastChangedAt`,tamper:`lastChangedAt`},IO=Object.keys(PO),LO=[`sensor`,`switch`,`control`];function RO(e){return Object.prototype.hasOwnProperty.call(PO,e)}function zO(e,t){let n=PO[e];if(n===void 0)return null;let r=t[n];return typeof r==`boolean`?r:null}function BO(e,t){let n=FO[e];if(n===void 0)return null;let r=t[n];return typeof r!=`number`||!Number.isFinite(r)||r<=0?null:r}var VO=3e4;function HO(e){let t=zO(e.capName,e.slice);if(t===null)return{edge:`none`,value:null,reason:RO(e.capName)?`non-boolean-value`:`unknown-cap`};if(e.prior===void 0){if(!t)return{edge:`none`,value:t,reason:`baseline-seeded-inactive`};let n=BO(e.capName,e.slice),r=Math.max(e.startedAtMs,e.nowMs-e.firstSightingFreshnessMs);return n===null||n<r?{edge:`none`,value:t,reason:`baseline-seeded-stale-active`}:{edge:`rising`,value:!0}}return e.prior===t?{edge:`none`,value:t,reason:`no-change`}:t?{edge:`rising`,value:!0}:{edge:`none`,value:t,reason:`falling-edge`}}var UO=`camstack/camstack-models`,WO=`https://huggingface.co/${UO}/resolve/main`,GO=`30d`,KO={"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":`30d`},Z={Siren:D.Siren,Floodlight:D.Floodlight,Spotlight:D.Spotlight,PirSensor:D.PirSensor,Chime:D.Chime,Autotrack:D.Autotrack,Nightvision:D.Nightvision,PrivacyMask:D.PrivacyMask},qO={[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 JO(e,t,n){let r=`${e}:${t}`;return typeof n==`number`?`${r}:${n}`:r}var YO=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}))}},XO=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(ZO(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 ZO(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 QO={airQualitySensor:ax,alarmPanel:Qp,ambientLightSensor:sx,audioMetrics:fx,automationControl:mx,battery:gx,binary:vx,brightness:bx,cameraStreams:Cl,carbonMonoxide:Ex,climateControl:kx,color:Px,connectivity:Vx,consumables:Wx,contact:Kx,control:Xx,cover:$x,dayNight:aS,deviceDiscovery:yu,deviceStatus:sS,doorbell:uS,enumSensor:pS,eventEmitter:gS,fanControl:AS,featureProbe:MS,flood:PS,gas:IS,humidifier:RS,humiditySensor:BS,image:HS,imageSettings:ZS,intercom:uC,lawnMowerControl:mC,lockControl:AC,mediaPlayer:FC,motion:HC,motionTrigger:GC,motionZones:XC,nativeObjectDetection:tw,notifier:Ow,numericSensor:Aw,petFeeder:Xw,powerMeter:bT,presence:CT,pressureSensor:TT,privacyMask:jT,ptzAutotrack:UT,sceneMonitor:VE,scriptRunner:UE,smoke:GE,streamCatalog:JE,streamParams:tD,switch:sD,tamper:BD,temperatureSensor:HD,update:KD,vacuumControl:lO,valve:fO,vibration:mO,waterHeater:gO,weather:vO,zoneAnalytics:EO,zoneRules:OO,zones:cg},$O=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=QO[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=YO.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=XO.fromInitial(o,a),e.bindRuntimeState?.(this.runtimeState),e.registerNativeCap?.(sS,{});let s={online:!0,lastChangedAt:Date.now()};this.runtimeState.setCapState(`device-status`,s),e.registerNativeCap?.(MS,{}),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=hu(this.ctx.deviceMeta.metadata)??du({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=fu(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:{[mu]: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 ek(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 tk=class extends Fe{async onInitialize(){return this.ctx.logger.info(`${this.providerName} Provider initialized`),[{capability:Ju,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(E).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 ek(e,this.addonId)}},nk=360*6e4;function rk(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 ik(e){return e===`unreachable`}var ak=`fixed`;function ok(e){let t=e??`hub`;return t.includes(`/`)?t.split(`/`)[0]??`hub`:t}var sk=32,ck=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=ok(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:{[ak]:!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:{[ak]:!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}},lk={[E.Cover]:`cover`,[E.Valve]:`valve`,[E.Humidifier]:`humidifier`,[E.WaterHeater]:`water-heater`,[E.Camera]:`dummy`,[E.Hub]:`dummy`,[E.Switch]:`switch`,[E.Siren]:`switch`,[E.Light]:`light`,[E.Fan]:`fan`,[E.Sensor]:`sensor`,[E.Thermostat]:`thermostat`,[E.Climate]:`climate`,[E.Button]:`button`,[E.EventEmitter]:`dummy`,[E.Update]:`update`,[E.Generic]:`dummy`,[E.Notifier]:`dummy`,[E.Script]:`script`,[E.Automation]:`automation`,[E.Lock]:`lock`,[E.MediaPlayer]:`media-player`,[E.AlarmPanel]:`alarm`,[E.Control]:`control`,[E.Presence]:`sensor`,[E.Weather]:`weather`,[E.Vacuum]:`vacuum`,[E.LawnMower]:`lawn-mower`,[E.Container]:`dummy`,[E.Image]:`image`,[E.PetFeeder]:`pet-feeder`},uk=new Set(Object.values(E));function dk(e){return uk.has(e)?lk[e]:null}var fk=`motion-trigger`;function pk(e){return e.includes(fk)}var mk=[`temperature-sensor`,`humidity-sensor`,`ambient-light-sensor`,`numeric-sensor`,`enum-sensor`];function hk(e){let t=new Set(e.features);switch(e.type){case E.Cover:return{kind:`cover`};case E.Valve:return{kind:`valve`};case E.Lock:return{kind:`lock`};case E.AlarmPanel:return{kind:`alarm`};case E.Light:return t.has(`brightness`)?{kind:`brightness`}:{kind:`switch`};case E.Switch:case E.Siren:return{kind:`switch`};case E.Sensor:case E.Presence:{let e=mk.find(e=>t.has(e));return e?{kind:`sensor`,sensorFeature:e}:{kind:`none`}}default:return{kind:`none`}}}var gk={"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 _k(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function vk(e,t){if(!_k(e))return null;let n=e[t];if(!_k(n))return null;let r=n.mutate;return typeof r==`function`?r:null}function yk(e,t){return!e||e.length===0?!1:e.includes(t.when.hasFeature)}var bk={id:`battery`,label:`Battery-operated camera`,when:{hasFeature:Pt.BatteryOperated},defaults:{audioMode:`disabled`,detectionMode:`on-motion`},settings:{}},xk=[bk];function Sk(e){for(let t of xk)if(yk(e,t))return t;return null}function Ck(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function wk(e,t){let n=t.split(`.`),r=e;for(let e of n){if(!Ck(r))return;r=r[e]}return r}function Tk(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=Ck(o)?o:{};return{...e,[i]:Tk(s,a,n)}}var Ek=3e4,Dk=3,Ok=1e4;async function kk(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 Ak(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 kk(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 jk=`lastFetchedAt`,Mk=6e4,Nk=10*6e4;function Pk(e){let{runtimeState:t,cap:n,ownDeviceId:r,refresh:i,staleMs:a,empty:o,logger:s}=e,c=e.refreshMissCooldownMs??6e4,l=e.staleRead??`await-refresh`,u=0,d=null,f=()=>{let e=t.getCapState(n.name)?.[jk];return typeof e==`number`?e:0},p=e=>{u=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)}})},ee=async e=>{try{await i()}catch(e){throw p(e),e}if(f()>e){u!==0&&(u=0,s?.info(`${n.name}: refresh landed again — resuming normal polling`,{tags:{deviceId:r}}));return}p(void 0)},te=e=>{let t=d;if(t!==null)return t;let n=ee(e).catch(()=>void 0).finally(()=>{d=null});return d=n,n},ne=async()=>{let e=t.getCapState(n.name),r=f();if(e&&Date.now()-r<=a){u=0;return}if(!(Date.now()<u)){if(l===`serve-and-revalidate`){if(d!==null)return;if(e&&r>0){te(r);return}await te(r);return}await ee(r)}},re=()=>{let e=t.getCapState(n.name);if(!e)return o();let{[jk]:r,...i}=e;return i};return{ensureFresh:ne,getStatus:async({deviceId:e})=>{if(e!==r)throw Error(`${n.name}: deviceId mismatch, expected ${r}, got ${e}`);return await ne(),re()}}}function Fk(e){let t=e;for(;t instanceof fe||t instanceof me||t instanceof ee;)t=t.unwrap();return t}function Ik(e){let t=Fk(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 Lk(e,t=``){let n=Fk(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=Fk(n);if(a instanceof se){r.push(...Lk(a,i));continue}let o=Ik(n);o&&r.push({path:i,kind:o.kind,...o.enumValues?{enumValues:o.enumValues}:{}})}return r}function Rk(e){return Lk(e.itemSchema).filter(t=>t.path!==e.keyField).map(e=>({...e,item:!0}))}var zk=`device.state-changed`,Bk=`capability.binding-changed`,Vk=`device.registered`,Hk=`device.unregistered`,Uk=`device.updated`,Wk=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=Kt(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?Jt(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&&!Gk(n,e.id)||e.stableId!==void 0&&(!i||!Gk(i.stableId,e.stableId))||e.addonId!==void 0&&(!i||!Gk(i.addonId,e.addonId))||e.type!==void 0&&(!i||!Gk(i.type,e.type)))continue;if(e.caps!==void 0){let t=Kk(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=Kk(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||!qk(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||!Kk(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:zk},{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:Bk},{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:Vk},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.refreshDeviceMetadata(t.deviceId,`added`)}})),this.bridges.push(e.subscribe({category:Hk},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.applyDeviceRemoval(t.deviceId)}})),this.bridges.push(e.subscribe({category:Uk},{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 Gk(e,t){return Array.isArray(t)?t.includes(e):e===t}function Kk(e){return Array.isArray(e)?e:[e]}function qk(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 Jk(e){return e.def}function Yk(e){return e}function Xk(e,t=`Configuration`,n=`main`){return{sections:[{id:n,title:t,fields:e.map(e=>Zk(e.key,e.schema,e.description))}]}}function Zk(e,t,n){let r=nA(t),i=rA(t),a={key:e,label:n??iA(e),description:n,default:i};return r instanceof re?Qk(e,a):r instanceof ne?$k(r,a):r instanceof ae?{...a,type:`boolean`}:r instanceof ue?tA(r,a):r instanceof de||r instanceof se?{...a,type:`textarea`,rows:6,isJson:!0}:{...a,type:`text`}}function Qk(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 $k(e,t){let n=Yk(e),r=n.minValue,i=n.maxValue,a=r!=null&&isFinite(r)?r:void 0,o=i!=null&&isFinite(i)?i:void 0,s=eA(e);return{...t,type:`number`,...a===void 0?{}:{min:a},...o===void 0?{}:{max:o},...s===void 0?{}:{step:s}}}function eA(e){let t=Jk(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 tA(e,t){let n=e.options.map(e=>String(e));return{...t,type:`select`,options:n.map(e=>({label:iA(e),value:e}))}}function nA(e){return e instanceof ee||e instanceof me||e instanceof fe?nA(Jk(e).innerType):e}function rA(e){if(e instanceof ee)return Jk(e).defaultValue}function iA(e){return e.replace(/([A-Z])/g,` $1`).replace(/[_-]/g,` `).replace(/^\w/,e=>e.toUpperCase()).trim()}var aA=`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(`.`),oA={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`,failureContribution:`failure-contribution`,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`,loadContribution:`load-contribution`,localNetwork:`local-network`,lockControl:`lock-control`,logChannels:`log-channels`,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`},sA=[{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:`failureContribution`,name:`failure-contribution`},{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:`loadContribution`,name:`load-contribution`},{key:`localNetwork`,name:`local-network`},{key:`lockControl`,name:`lock-control`},{key:`logChannels`,name:`log-channels`},{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`}],cA=[Tb,Ds,ks,Ns,Rs,Gs,Us,rx,Nt,ax,Qp,Xs,sx,Zs,lc,_c,fx,yc,mx,Dc,gx,vx,bx,Jc,xx,wx,Yc,Cl,Ex,kx,Px,zx,Vx,Wx,Kx,Xx,Ul,$x,Jl,iu,aS,cu,lu,Mu,yu,Vu,pd,Ht,Ju,md,sS,uS,_d,pS,gS,vS,DS,of,AS,MS,bd,PS,IS,RS,BS,HS,ZS,oC,uC,mC,Zd,Rd,uf,DC,AC,$d,nf,gf,FC,zC,Rf,Bf,Uf,HC,Kf,GC,XC,ip,tw,cp,aw,xw,wp,fh,Ow,Aw,wh,Iw,Ww,Xw,I_,ng,qv,uv,nT,vT,bT,CT,TT,jT,RT,UT,WT,cE,bE,VE,UE,ly,nu,GE,my,_y,yy,xy,wy,Ty,Ly,vl,JE,tD,sD,RD,BD,HD,Ky,WD,Jy,KD,aO,Xy,lO,fO,mb,mO,yb,Rt,gO,vO,Cb,EO,OO,cg],lA=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.getIntegrationSettings":{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.aggregate":{capName:`data-store-provider`,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.insertMany":{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.getBindingsBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getChildren":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getChildrenBatch":{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.getLinkedDevicesBatch":{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`},"failureContribution.list":{capName:`failure-contribution`,capScope:`system`,addonId:null,access:`view`},"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`},"loadContribution.list":{capName:`load-contribution`,capScope:`system`,addonId:null,access:`view`},"localNetwork.downloadCa":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"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.getTlsStatus":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getViewerEndpoints":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.list":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.regenerateCertificate":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.resetAllowlistToBestMatch":{capName:`local-network`,capScope:`system`,addonId:null,access:`delete`},"localNetwork.revertToGeneratedCertificate":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.setAllowedAddresses":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.setNotificationEndpoint":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.setViewerEndpoints":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.uploadCertificate":{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`},"logChannels.apply":{capName:`log-channels`,capScope:`system`,addonId:null,access:`create`},"logChannels.list":{capName:`log-channels`,capScope:`system`,addonId:null,access:`view`},"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.getLoadSeries":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getProcessStats":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"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.resolveArtifactUrl":{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.cancelRelocateMedia":{capName:`pipeline-analytics`,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.getGroup":{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.listGroups":{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.listRelocateMediaJobs":{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.relocateMedia":{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.runReplayFrameProcessor":{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.getInferenceDeviceHealth":{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.rearmInferenceDevice":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.runAudioTest":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.runPipeline":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.runPipelineBatch":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.saveTemplate":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.setVideoPipelineSteps":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.spinEngine":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.uncacheFrame":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.updateTemplate":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"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.readWindowBytes":{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.aggregate":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"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.insertMany":{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.getFailureContributions":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.getLoadContributions":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.getLoggingSettings":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.getRequestCensus":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"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.setLoggingSettings":{capName:`system`,capScope:`system`,addonId:null,access:`create`},"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.updateInstance":{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`}}),uA=`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.failure-contribution.fan-control.filesystem-browse.humidifier.image-settings.integrations.intercom.lawn-mower-control.llm.llm-runtime.load-contribution.local-network.lock-control.log-channels.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(`.`),dA=`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(`.`),fA=`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.failure-contribution.filesystem-browse.integrations.llm.llm-runtime.load-contribution.local-network.log-channels.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(`.`),pA=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.getBindingsBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"deviceManager.getChildren":[{name:`parentDeviceId`,form:`single`,optional:!1}],"deviceManager.getChildrenBatch":[{name:`parentDeviceIds`,form:`array`,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.getLinkedDevicesBatch":[{name:`deviceIds`,form:`array`,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.listAll":[{name:`deviceIds`,form:`array`,optional:!0}],"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},{name:`deviceIds`,form:`array`,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.getGroup":[{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.listGroups":[{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.runReplayFrameProcessor":[{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.readWindowBytes":[{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}]}),mA=`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.getBindingsBatch,deviceManager.getChildren,deviceManager.getChildrenBatch,deviceManager.getConfigSchema,deviceManager.getDevice,deviceManager.getDeviceAggregate,deviceManager.getDeviceLiveInfoAggregate,deviceManager.getDeviceSettingsAggregate,deviceManager.getDeviceStatusAggregate,deviceManager.getDeviceStatusAggregateBatch,deviceManager.getLinkedDevices,deviceManager.getLinkedDevicesBatch,deviceManager.getSettingsSchema,deviceManager.getStreamProfileMap,deviceManager.getStreamSources,deviceManager.getWireableFields,deviceManager.listAll,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.readWindowBytes,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(`,`),hA=Object.freeze({broker:`broker`,"device-export":`device-export`,llm:`ai`,"mesh-network":`mesh`,"mqtt-broker":`broker`,"network-access":`ingress`,"smtp-provider":`email`}),gA=[`broker`,`device-export`,`llm`,`mesh-network`,`mqtt-broker`,`network-access`,`smtp-provider`];function _A(e){let t=[];for(let[n,r]of Object.entries(hA))r===e&&t.push(n);return t}var vA={"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 yA(e){return vA[e]??bA}var bA={durability:`session`,volatileFields:[]};function xA(e){return yA(e).durability===`restored`}var SA=`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(`.`),CA=[{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 live control of every granted camera — PTZ movement, intercom talk-back and on-demand snapshots. Cannot delete devices, and grants nothing on system-scope caps (recording control, users, addons).",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 wA(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),getIntegrationSettings:e=>n(`addonSettings`,`getIntegrationSettings`,`query`,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),getChildrenBatch:e=>n(`deviceManager`,`getChildrenBatch`,`query`,e),getLinkedDevicesBatch:e=>n(`deviceManager`,`getLinkedDevicesBatch`,`query`,e),removeByIntegration:e=>n(`deviceManager`,`removeByIntegration`,`mutation`,e),getBindingsBatch:e=>n(`deviceManager`,`getBindingsBatch`,`query`,e),getAllBindings:e=>n(`deviceManager`,`getAllBindings`,`query`,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),getViewerEndpoints:e=>n(`localNetwork`,`getViewerEndpoints`,`query`,e),setViewerEndpoints:e=>n(`localNetwork`,`setViewerEndpoints`,`mutation`,e),getAllowedAddresses:e=>n(`localNetwork`,`getAllowedAddresses`,`query`,e),setAllowedAddresses:e=>n(`localNetwork`,`setAllowedAddresses`,`mutation`,e),resetAllowlistToBestMatch:e=>n(`localNetwork`,`resetAllowlistToBestMatch`,`mutation`,e),getTlsStatus:e=>n(`localNetwork`,`getTlsStatus`,`query`,e),regenerateCertificate:e=>n(`localNetwork`,`regenerateCertificate`,`mutation`,e),uploadCertificate:e=>n(`localNetwork`,`uploadCertificate`,`mutation`,e),downloadCa:e=>n(`localNetwork`,`downloadCa`,`query`,e),revertToGeneratedCertificate:e=>n(`localNetwork`,`revertToGeneratedCertificate`,`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),getLoadSeries:e=>n(`metricsProvider`,`getLoadSeries`,`query`,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),getInferenceDeviceHealth:e=>n(`pipelineExecutor`,`getInferenceDeviceHealth`,`query`,e),rearmInferenceDevice:e=>n(`pipelineExecutor`,`rearmInferenceDevice`,`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),insertMany:e=>n(`settingsStore`,`insertMany`,`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),aggregate:e=>n(`settingsStore`,`aggregate`,`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),getRequestCensus:e=>n(`system`,`getRequestCensus`,`query`,e),getLoadContributions:e=>n(`system`,`getLoadContributions`,`query`,e),getFailureContributions:e=>n(`system`,`getFailureContributions`,`query`,e),getLoggingSettings:e=>n(`system`,`getLoggingSettings`,`query`,e),setLoggingSettings:e=>n(`system`,`setLoggingSettings`,`mutation`,e)},terminalSession:{listProfiles:e=>n(`terminalSession`,`listProfiles`,`query`,e),listInstances:e=>n(`terminalSession`,`listInstances`,`query`,e),createInstance:e=>n(`terminalSession`,`createInstance`,`mutation`,e),updateInstance:e=>n(`terminalSession`,`updateInstance`,`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 TA=`audio-`;function EA(e){return e.startsWith(TA)?e.slice(6):e}function DA(e){return e.startsWith(TA)?e:`${TA}${e}`}var OA=-96,kA=0,AA=3,jA=-55,MA=1,NA=100,PA=1,FA=300,IA=2,LA=5,RA=1,zA=20,BA=1,VA=60,HA={hitPercent:60,samplingSeconds:10};function UA(e){return e??HA}function WA(e){return e===void 0?null:e.labels!==void 0&&e.labels.length>0?`label`:e.dbThreshold===void 0?null:`level`}function GA(e){return e===void 0?!1:e.dbThreshold===void 0&&(e.labels===void 0||e.labels.length===0)}function KA(e,t,n){return Number.isFinite(e)?Math.min(n,Math.max(t,Math.round(e))):t}function qA(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function JA(e,t){let n=UA(e),r=qA(t,`labels`)?t.labels:n.labels,i=qA(t,`dbThreshold`)?t.dbThreshold:n.dbThreshold,a=r!==void 0&&r.length>0,o=t.mode??(qA(t,`labels`)&&a?`label`:qA(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:KA(c,-96,0)},hitPercent:KA(t.hitPercent??n.hitPercent,1,100),samplingSeconds:KA(t.samplingSeconds??n.samplingSeconds,1,300),...(()=>{let e=qA(t,`confirmHits`)?t.confirmHits:n.confirmHits,r=qA(t,`confirmWindowSec`)?t.confirmWindowSec:n.confirmWindowSec;return{...e===void 0?{}:{confirmHits:KA(e,1,20)},...r===void 0?{}:{confirmWindowSec:KA(r,1,60)}}})()}}function YA(e,t){let n=e?.audioKinds??[],r=n.length>0?n.map(e=>{let t=EA(e.kind);return{value:t,label:e.label,iconId:DA(t),unknown:!1}}):Ap.map(e=>({value:e.id,label:e.name,iconId:DA(e.id),unknown:!1})),i=new Set(r.map(e=>e.value)),a=[];for(let e of t??[]){let t=EA(e);i.has(t)||a.includes(t)||(a.push(t),r.push({value:t,label:t,iconId:DA(t),unknown:!0}))}return{choices:r,unknownLabels:a}}function XA(e,t){let n=EA(t);return(e??[]).some(e=>EA(e)===n)}function ZA(e,t){let n=EA(t),r=e??[];if(XA(r,n)){let e=r.filter(e=>EA(e)!==n);return e.length>0?e:void 0}return[...r,n]}var QA=new Set([`classes`,`classesExclude`]),$A=new Set([`sensorKinds`]),ej=new Set([`occupancy`]);function tj(e){return{value:e.kind,label:e.label}}function nj(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(tj(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 rj(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,[tj(r)]),t.push(e)):i.push(tj(r))}return t.flatMap(e=>{let t=n.get(e);return t===void 0?[]:[{key:e,fallbackLabel:e,options:t}]})}function ij(e,t){if(!t)return null;if(QA.has(e)){let e=nj(t.videoClasses);return t.audioKinds.length>0&&e.push({key:`audio`,fallbackLabel:`Audio`,options:t.audioKinds.map(tj)}),e.length>0?{groups:e}:null}if(ej.has(e)){let e=t.videoClasses.filter(e=>e.parentKind===null).map(tj);return e.length>0?{groups:[{key:`macro`,fallbackLabel:`Classes`,options:e}]}:null}if($A.has(e)){let e=rj(t.labels);return e.length>0?{groups:e}:null}return null}function aj(e){let t=new Set;for(let n of e.groups)for(let e of n.options)t.add(e.value);return t}var oj=[`devices`,`classes`],sj=new Set(oj);function cj(e){return sj.has(e)}function lj(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 uj=[[/&nbsp;/g,` `],[/&amp;/g,`&`],[/&lt;/g,`<`],[/&gt;/g,`>`],[/&quot;/g,`"`],[/&#39;/g,`'`]];function dj(e){let t=e.replace(/<\s*br\s*\/?\s*>/gi,`
346
346
  `).replace(/<\s*\/\s*(p|div|li|h[1-6])\s*>/gi,`
347
347
  `).replace(/<[^>]+>/g,``);for(let[e,n]of uj)t=t.replace(e,n);return t.replace(/\n{3,}/g,`
348
348