@camstack/addon-admin-ui 1.1.44 → 1.1.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AddLocationWizard-W-dt-zcF.js → AddLocationWizard-Bvw9_2YN.js} +1 -1
- package/dist/assets/{AddonCollectionPage-BfbidCIk.js → AddonCollectionPage-DLYcF1eI.js} +1 -1
- package/dist/assets/{Addons-CiErH07A.js → Addons-BDiRSQCj.js} +1 -1
- package/dist/assets/{AdminTabs-DrhpSgcL.js → AdminTabs-CY2rlSZx.js} +1 -1
- package/dist/assets/{BrokerForm-BsEdM3IE.js → BrokerForm-DrGabABg.js} +1 -1
- package/dist/assets/{Capabilities-B5t7v_pY.js → Capabilities-CcpO8NTn.js} +1 -1
- package/dist/assets/{CapabilityBadges-_S1XuALV.js → CapabilityBadges-CYoWl0J1.js} +1 -1
- package/dist/assets/{Cluster-CcDlebrP.js → Cluster-CpXN23Iz.js} +1 -1
- package/dist/assets/{Dashboard-CMXG2pAs.js → Dashboard-Bo25XR8Q.js} +1 -1
- package/dist/assets/{Data-B4QFRILt.js → Data-Blw93_kT.js} +1 -1
- package/dist/assets/{DetectionIntelligence-DEFWthMx.js → DetectionIntelligence-Kl1XQi-o.js} +1 -1
- package/dist/assets/{DeviceDetail-CDsrMXH5.js → DeviceDetail-BAb02UMT.js} +1 -1
- package/dist/assets/{Devices-DYAE6I8E.js → Devices-DcjotJtp.js} +1 -1
- package/dist/assets/{EmbedPlayerPage-DtWip1D7.js → EmbedPlayerPage-ilPK8vT0.js} +1 -1
- package/dist/assets/{FormBuilder-ctPbkSgx.js → FormBuilder-DmAaqS0P.js} +1 -1
- package/dist/assets/{Identity-I201Qzj3.js → Identity-C2h8wn_8.js} +1 -1
- package/dist/assets/{IntegrationDetail-BpLmdyV0.js → IntegrationDetail-10_w9sQG.js} +1 -1
- package/dist/assets/{Integrations-Ba1Ft6Lg.js → Integrations-AjG9O0Zs.js} +1 -1
- package/dist/assets/{Integrations-72vMf_ew.js → Integrations-CU-UBQ8j.js} +1 -1
- package/dist/assets/{Logs-OajAHe1T.js → Logs-DkJkJGxW.js} +1 -1
- package/dist/assets/{MotionZonesSettings-DnVWhQ3W.js → MotionZonesSettings-DL55VLbI.js} +1 -1
- package/dist/assets/{MyAccess-BI02Q775.js → MyAccess-C92RXlCz.js} +1 -1
- package/dist/assets/{Network-CbckA9FR.js → Network-DrP265Eb.js} +1 -1
- package/dist/assets/{NodeAddonsSettingsPanel-DLV3dQah.js → NodeAddonsSettingsPanel-B-nngyAf.js} +1 -1
- package/dist/assets/{NotificationTargets-DPgzOZJj.js → NotificationTargets-DFzihL8u.js} +1 -1
- package/dist/assets/{Pipeline-CzL14MLN.js → Pipeline-DcmtJ_a1.js} +1 -1
- package/dist/assets/{PrivacyMaskSettings-BF7f56Ma.js → PrivacyMaskSettings-8aXddQXv.js} +1 -1
- package/dist/assets/{ProviderIcon-R9NDoXR8.js → ProviderIcon-CJ8-0ZH-.js} +1 -1
- package/dist/assets/{ScanNetworkModal-Bkgknqh0.js → ScanNetworkModal-CrN7Gcg1.js} +1 -1
- package/dist/assets/{ServerManagement-CiOBwHFm.js → ServerManagement-r1GIGpJa.js} +1 -1
- package/dist/assets/{Settings-BJ5JyTmk.js → Settings-IWs_JmTb.js} +1 -1
- package/dist/assets/{Showroom-BVOBdodI.js → Showroom-BvK9z4rI.js} +1 -1
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-B9iXARjp.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-D33LJRoa.js} +1 -1
- package/dist/assets/{build-cluster-graph-D5l4dXUI.js → build-cluster-graph-9hzchTfD.js} +1 -1
- package/dist/assets/circle-check-big-DOB-ecd1.js +1 -0
- package/dist/assets/{copy-C4YYit8o.js → copy-B5w123s3.js} +1 -1
- package/dist/assets/{dist-_--y0TkY.js → dist-BqJ4ODEV.js} +1 -1
- package/dist/assets/{dist-Cc1jotFK.js → dist-bNuNFLZO.js} +1 -1
- package/dist/assets/{download-CcmtuTlP.js → download-DWrwa5ZQ.js} +1 -1
- package/dist/assets/{hostInit-N8y4wuPR.js → hostInit-Dum3X3mF.js} +1 -1
- package/dist/assets/index-BXn17UrG.css +2 -0
- package/dist/assets/index-Da74gHj8.js +4 -0
- package/dist/assets/{key-round-9Pliwnd3.js → key-round-Bu_8dxr0.js} +1 -1
- package/dist/assets/{mf-entry-bootstrap-0-26120332.js → mf-entry-bootstrap-0-13dbf296.js} +2 -2
- package/dist/assets/{pencil-CTazAhnk.js → pencil-CMdxyxwT.js} +1 -1
- package/dist/assets/{player-overlays-DvECsQcQ.js → player-overlays-BjWq4Lsw.js} +1 -1
- package/dist/assets/plus-1uqeoQzi.js +1 -0
- package/dist/assets/{radio-Du7Wln2r.js → radio-BIgunYjc.js} +1 -1
- package/dist/assets/{refresh-cw-CJ45Ilhx.js → refresh-cw-tNOo1uMj.js} +1 -1
- package/dist/assets/remoteEntry-C23sPYAV.js +1 -0
- package/dist/assets/{rotate-ccw-W3q0lk1C.js → rotate-ccw-DclQoHZh.js} +1 -1
- package/dist/assets/rotate-cw-DLAr4sQa.js +1 -0
- package/dist/assets/search-pN6xkGSc.js +1 -0
- package/dist/assets/{sparkles-D554Wh_Z.js → sparkles-Oe69VehF.js} +1 -1
- package/dist/assets/square-BKeg-u96.js +1 -0
- package/dist/assets/{square-check-big-DIp1zufT.js → square-check-big-BbU9Wg7X.js} +1 -1
- package/dist/assets/{src-C6jtYpqC.js → src-PqKMUhAl.js} +1 -1
- package/dist/assets/{src-B0KmWVsT.js → src-nTmr96zw.js} +4 -4
- package/dist/assets/{upload-DXXNcUOb.js → upload-noUat_HJ.js} +1 -1
- package/dist/assets/{useDevice-B6x5GJHo.js → useDevice-DWAforOz.js} +1 -1
- package/dist/assets/{useEventInvalidation-Dre3P4lQ.js → useEventInvalidation-DEG6y8gC.js} +1 -1
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-DNODt-Nr.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-qa0QFz07.js} +2 -2
- package/dist/assets/{wifi-BsxKQH3U.js → wifi-BSE6EyYx.js} +1 -1
- package/dist/assets/{zap-CJJPiCEM.js → zap-C03h8r1S.js} +1 -1
- package/dist/index.html +6 -6
- package/dist/server/addon.js +29 -1
- package/package.json +1 -1
- package/dist/assets/circle-check-big-CXE5SuGj.js +0 -1
- package/dist/assets/index-BNTiPmxL.css +0 -2
- package/dist/assets/index-DwPiqIa2.js +0 -4
- package/dist/assets/plus-bMOzNfod.js +0 -1
- package/dist/assets/remoteEntry-DvYnqxQP.js +0 -1
- package/dist/assets/rotate-cw-DDj0C8XB.js +0 -1
- package/dist/assets/search-CfaoVnI_.js +0 -1
- package/dist/assets/square-uC5wQ_s4.js +0 -1
|
@@ -4,4 +4,4 @@ import{a as e,r as t}from"./rolldown-runtime-Cyuzqnbw.js";import{t as n}from"./v
|
|
|
4
4
|
`).replace(/<\s*\/\s*(p|div|li|h[1-6])\s*>/gi,`
|
|
5
5
|
`).replace(/<[^>]+>/g,``);for(let[e,n]of Pi)t=t.replace(e,n);return t.replace(/\n{3,}/g,`
|
|
6
6
|
|
|
7
|
-
`).trim()}var Ii=[[/&/g,`&`],[/</g,`<`],[/>/g,`>`],[/"/g,`"`],[/'/g,`'`]];function Li(e){let t=e;for(let[e,n]of Ii)t=t.replace(e,n);return t}function Ri(e){return Li(e).replace(/\n/g,`<br>`)}function zi(e){return Li(e).replace(/(\*\*|__)(.*?)\1/g,`<b>$2</b>`).replace(/(\*|_)(.*?)\1/g,`<i>$2</i>`).replace(/`([^`]*)`/g,`<code>$1</code>`).replace(/\[([^\]]*)\]\(([^)]*)\)/g,`<a href="$2">$1</a>`).replace(/\n/g,`<br>`)}var Bi={text:[`text`,`markdown`,`html`],markdown:[`markdown`,`html`,`text`],html:[`html`,`text`,`markdown`]};function Vi(e,t){for(let n of Bi[e])if(t.includes(n))return n;return t[0]??`text`}function Hi(e,t,n){if(t===n)return e;if(n===`text`){if(t===`markdown`)return Ni(e);if(t===`html`)return Fi(e)}if(n===`html`){if(t===`text`)return Ri(e);if(t===`markdown`)return zi(e)}if(n===`markdown`){if(t===`text`)return e;if(t===`html`)return Fi(e)}return e}function Ui(e){return{id:e.id,ordinal:e.ordinal,...e.flags?{flags:e.flags}:{},...e.requires?{requires:e.requires}:{}}}function Wi(e,t){if(e.length===0)return null;if(t.level!==void 0){let n=e.find(e=>e.id===t.level);if(n)return Ui(n)}let n=e.filter(e=>e.ordinal!==null);if(n.length===0)return Ui(e[0]);let r=t.priority;return Ui([...n].sort((e,t)=>{let n=Math.abs((e.ordinal??0)-r),i=Math.abs((t.ordinal??0)-r);return n===i?(t.ordinal??0)-(e.ordinal??0):n-i})[0])}function Gi(e,t){if(t<=0||e.length<=t)return[e];let n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n}function Ki(e,t){let n=[],r=t.format,i=Vi(r,e.format);i!==r&&n.push(`format`);let a=Hi(t.body,r,i),o=Wi(e.levels,t),s=t.attachments??[],c=[];for(let t of s){if(!e.attachments.mediaTypes.includes(t.mediaType)){n.push(`attachment:${t.mediaType}`);continue}if(e.attachments.mode===`url`&&t.url===void 0){n.push(`attachment:noUrl`);continue}if(t.bytes!==void 0&&e.attachments.maxBytes!==void 0&&t.bytes.length>e.attachments.maxBytes){n.push(`attachment:maxBytes`);continue}if(c.length>=e.attachments.max){n.push(`attachment:max`);continue}let r=e.attachments.mode===`bytes`&&t.bytes===void 0&&t.url!==void 0;c.push({mediaType:t.mediaType,...t.url===void 0?{}:{url:t.url},...t.bytes===void 0?{}:{bytes:t.bytes},...t.mime===void 0?{}:{mime:t.mime},...t.name===void 0?{}:{name:t.name},needsFetch:r})}let l=t.actions??[],u=l.slice(0,Math.max(0,e.actions));l.length>u.length&&n.push(`actions`);let d=null;t.clickUrl!==void 0&&(e.clickUrl?d=t.clickUrl:n.push(`clickUrl`));let f=null;t.sound!==void 0&&(e.sound?f=t.sound:n.push(`sound`));let ee=null;t.ttl!==void 0&&(e.ttl?ee=t.ttl:n.push(`ttl`));let p=t.tag??null,te=Gi(a,e.bodyMaxLen),m=te.length>1,h={level:o?.id??``,format:i,attachmentsSent:c.length,actionsSent:u.length,truncated:m,dropped:n};return{body:te[0]??``,...t.title===void 0?{}:{title:t.title},format:i,level:o,attachments:c,actions:u,clickUrl:d,sound:f,ttl:ee,tag:p,bodyParts:te,renderedAs:h}}var qi=y({online:m(),lastChangedAt:i()}),Ji={name:`device-status`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{},events:{onStatusChanged:{data:y({deviceId:i(),status:qi})}},status:{schema:qi,kind:`push`},runtimeState:qi},Yi=y({flags:o(a(),r()),deviceType:a().nullable(),model:a().nullable(),channelCount:i().nullable(),lastProbedAt:i(),lastFetchedAt:i()}),Xi={name:`feature-probe`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{},events:{onProbeChanged:{data:y({deviceId:i(),status:Yi})}},status:{schema:Yi,kind:`push`},runtimeState:Yi},Zi=y({co2Ppm:i().min(0).optional(),vocPpb:i().min(0).optional(),pm25:i().min(0).optional(),pm10:i().min(0).optional(),aqi:i().optional(),lastFetchedAt:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional()}),Qi={name:`air-quality-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:Zi,kind:`push`},runtimeState:Zi};function $i(e){return e.mount?e.mount:e.deviceNative===!0?{kind:`device-native`}:e.mode===`collection`?{kind:`collection`}:{kind:`singleton`}}var ea=y({id:a(),title:a(),description:a().optional(),style:v([`card`,`accordion`]).optional(),defaultCollapsed:m().optional(),columns:g([c(1),c(2),c(3),c(4)]).optional(),tab:a().optional(),location:v([`settings`,`top-tab`]).optional(),order:i().optional(),fields:h(ae())}),ta=y({tabs:h(y({id:a(),label:a(),icon:a(),order:i().optional()})).optional(),sections:h(ea)}).nullable(),na={getDeviceSettingsContribution:{input:y({deviceId:i()}),output:ta,kind:`query`,auth:`protected`},getDeviceLiveContribution:{input:y({deviceId:i()}),output:ta,kind:`query`,auth:`protected`},applyDeviceSettingsPatch:{input:y({deviceId:i(),patch:o(a(),r())}),output:y({success:c(!0)}),kind:`mutation`,auth:`admin`}},ra={getStatus:{input:y({deviceId:i()}),output:r().nullable(),kind:`query`,auth:`protected`}};function ia(e){let t=e.methods;return e.exposesDeviceSettings&&(t={...na,...t}),e.status&&(t={...ra,...t}),t}function R(e,t,n){return{input:e,output:t,kind:n?.kind??`query`,auth:n?.auth??`protected`,...n?.access===void 0?{}:{access:n.access},timeoutMs:n?.timeoutMs}}function z(e){return{data:e}}function aa(e){return e?.deviceConfig!==void 0}var oa=v([`disarmed`,`armed_home`,`armed_away`,`armed_night`,`armed_vacation`,`armed_custom_bypass`,`arming`,`disarming`,`pending`,`triggered`]),sa=v([`home`,`away`,`night`,`vacation`,`custom_bypass`]),ca=y({state:oa,availableModes:h(sa),requiresCode:m(),lastChangedAt:i()}),la={name:`alarm-panel`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.AlarmPanel],methods:{arm:R(y({deviceId:i().int().nonnegative(),mode:sa,code:a().min(1).optional()}),_(),{kind:`mutation`,auth:`admin`}),disarm:R(y({deviceId:i().int().nonnegative(),code:a().min(1).optional()}),_(),{kind:`mutation`,auth:`admin`}),trigger:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:ca,kind:`push`},runtimeState:ca},ua=y({lux:i().min(0),lastFetchedAt:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional()}),da={name:`ambient-light-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:ua,kind:`push`},runtimeState:ua},fa=y({className:a(),hits:i().int().nonnegative(),avgScore:i().min(0).max(1),peakScore:i().min(0).max(1)}),pa=y({ts:i().int(),windowSec:i().int().positive(),level:y({rms:i(),dbfs:i()}),peakDbfs:i(),avgDbfs:i(),current:y({className:a(),score:i().min(0).max(1),timestamp:i().int()}).nullable(),byClass:h(fa).readonly()}),ma=y({ts:i().int(),dbfs:i().nullable(),peakDbfs:i(),avgDbfs:i(),topClass:a().nullable(),topScore:i().min(0).max(1).nullable()}),ha=y({points:h(ma).readonly(),effectiveSampleEveryMs:i().int().positive(),windowMsActual:i().int().nonnegative()}),ga={name:`audio-metrics`,scope:`device`,mode:`singleton`,deviceTypes:[F.Camera],methods:{getCurrentSnapshot:R(y({deviceId:i()}),pa.nullable()),getHistory:R(y({deviceId:i(),windowSec:i().int().positive().optional(),sampleEveryMs:i().int().positive().optional()}),ha)},runtimeState:pa},_a=y({enabled:m(),isRunning:m(),lastTriggeredAt:i(),lastError:a().nullable(),lastChangedAt:i()}),va={name:`automation-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Automation],methods:{enable:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),disable:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),trigger:R(y({deviceId:i().int().nonnegative(),skipCondition:m().optional()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:_a,kind:`push`},runtimeState:_a},ya=y({percentage:i().min(0).max(100),charging:v([`dc`,`solar`,`none`]),sleeping:m(),lastUpdated:i(),binary:m().optional()}),ba={name:`battery`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera,F.Sensor,F.Button,F.Switch],methods:{wakeForStream:R(y({deviceId:i(),timeoutMs:i().int().min(500).max(3e4).default(8e3)}),y({awoke:m(),durationMs:i()}),{kind:`mutation`})},events:{onStatusChanged:{data:y({deviceId:i(),status:ya})}},status:{schema:ya,kind:`push`,empty:{percentage:0,charging:`none`,sleeping:!1,lastUpdated:0}},runtimeState:ya},xa=y({on:m(),lastChangedAt:i()}),Sa={name:`binary`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:xa,kind:`push`},runtimeState:xa},Ca=y({percentage:i().min(0).max(100),lastChangedAt:i()}),wa={name:`brightness`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Light],methods:{setBrightness:R(y({deviceId:i().int().nonnegative(),percentage:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`})},events:{onBrightnessChanged:{data:y({deviceId:i(),percentage:i().min(0).max(100),lastChangedAt:i()})}},status:{schema:Ca,kind:`command-driven`},runtimeState:Ca},Ta=v([`webrtc`,`hls`,`mjpeg`,`rtsp`]),Ea=y({brokerId:a(),url:a(),mutedUrl:a(),enabled:m(),codec:a().optional(),resolution:y({width:i().int().positive(),height:i().int().positive()}).optional()}),Da=y({sessionId:a(),remoteAddr:a(),userAgent:a().nullish(),playing:m(),muted:m(),connectedAt:i(),lastRtpAt:i(),bytesSent:i()}),Oa=y({tag:a(),subscribedAt:i(),maxFps:i(),framesDelivered:i(),framesDropped:i()}),ka=y({tag:a(),subscribedAt:i(),chunksDelivered:i()}),Aa=v([`alexa`,`homekit`,`webrtc-browser`,`webrtc-mobile`,`webrtc-whep`,`rtsp-listen`,`derived-broker`,`recording`,`pipeline`,`snapshot`,`warmup`,`unknown`]),ja=y({kind:Aa,label:a().optional(),media:v([`audio`,`video`,`both`]).optional(),targetCodec:a().optional(),transport:v([`passthrough`,`repacketize`,`transcode`]).optional(),remoteAddr:a().optional(),userAgent:a().optional(),userId:a().optional(),sessionId:a().optional(),extra:o(a(),a()).optional()}).readonly(),Ma=y({id:a(),channel:v([`annexb`,`rtp`]),attribution:ja,subscribedAt:i(),packetsDelivered:i()}),Na=y({rtsp:h(Da).readonly(),decoded:h(Oa).readonly(),audio:h(ka).readonly(),encoded:h(Ma).readonly(),pipeClients:i(),encodedSubscribers:i()}),Pa=v([`reconnecting`,`sleeping`,`offline`,`disabled`,`waking`]),Fa=v([`h264`,`h265`,`copy`]),Ia=v([`aac`,`opus`,`pcmu`,`copy`,`none`]),La=y({deviceId:i().int().nonnegative(),video:Fa,audio:Ia.optional(),profile:S.optional(),targetResolution:y({width:i().int().positive(),height:i().int().positive()}).optional(),outputArgs:h(a()).optional(),audioEgress:m().optional(),hostname:a().optional(),tag:a().optional()}),Ra=y({url:a(),videoCodec:v([`H264`,`H265`]),audioCodec:a(),resolution:y({width:i().int().positive(),height:i().int().positive()}),transcoded:m(),encoder:a(),pipelineKey:a()}),za={name:`stream-broker`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,methods:{publishCameraStream:R(y({deviceId:i().int().nonnegative(),camStreamId:a().min(1),kind:Tt,url:a().optional(),codec:a().optional(),resolution:C.optional(),fps:i().positive().optional(),label:a().optional(),deviceFeatures:h(a()).optional(),autoEligible:m().optional(),metadata:o(a(),r()).optional(),sourceCamStreamId:a().min(1).optional(),encodeProfile:Rn.optional()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),retractCameraStream:R(y({deviceId:i().int().nonnegative(),camStreamId:a().min(1)}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),assignProfile:R(y({deviceId:i().int().nonnegative(),profile:S,camStreamId:a().min(1)}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),unassignProfile:R(y({deviceId:i().int().nonnegative(),profile:S}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),listAllCameraStreams:R(_(),h(Et).readonly()),listAllProfileSlots:R(_(),h(Ot).readonly()),getBrokerStats:R(y({brokerId:a()}),Gt),probeStream:R(y({brokerId:a()}),y({probed:m(),summary:a()}),{kind:`mutation`,auth:`admin`}),listClients:R(y({brokerId:a()}),Na),killClient:R(y({brokerId:a(),channel:v([`rtsp`,`decoded`,`audio`]),handle:a()}),y({killed:m()}),{kind:`mutation`,auth:`admin`}),restartProfile:R(y({deviceId:i().int().nonnegative(),profile:S}),y({success:m()}),{kind:`mutation`,auth:`admin`}),getStreamUrl:R(y({streamId:a(),format:Ta}),y({url:a()})),getStreamWithCodec:R(La,Ra,{kind:`mutation`,auth:`admin`}),releaseStreamWithCodec:R(y({pipelineKey:a()}),y({released:m(),refcount:i().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),subscribeAudioChunks:R(Ht,Ut,{kind:`mutation`}),pullAudioChunks:R(y({subscriptionId:a(),maxCount:i().int().positive().default(8)}),h(Vt).readonly()),unsubscribeAudioChunks:R(y({subscriptionId:a()}),y({released:m()}),{kind:`mutation`}),subscribeFrames:R(zt,Bt,{kind:`mutation`}),pullFrameHandles:R(y({subscriptionId:a(),maxCount:i().int().positive().default(4)}),h(Lt).readonly()),unsubscribeFrames:R(y({subscriptionId:a()}),y({released:m()}),{kind:`mutation`}),setPreBufferDuration:R(y({brokerId:a(),seconds:i().min(0).max(30)}),_(),{kind:`mutation`,auth:`admin`}),getPreBufferInfo:R(y({brokerId:a()}),y({configuredSec:i(),bufferedMs:i(),packetCount:i()})),getRtspPort:R(_(),i()),getAllRtspEntries:R(y({hostname:a().optional()}),h(Ea).readonly()),getRtspEntry:R(y({brokerId:a(),hostname:a().optional()}),Ea.nullable()),regenerateRtspToken:R(y({brokerId:a()}),a().nullable(),{kind:`mutation`,auth:`admin`}),setRtspEnabled:R(y({brokerId:a(),enabled:m()}),_(),{kind:`mutation`,auth:`admin`}),isRtspEnabled:R(y({brokerId:a()}),m())},events:{onCamStreamDemand:z(y({deviceId:i().int().nonnegative(),camStreamId:a(),profile:S})),onCamStreamIdle:z(y({deviceId:i().int().nonnegative(),camStreamId:a()})),onRequestStreamSourceRefresh:z(y({deviceId:i().int().nonnegative(),camStreamId:a(),brokerId:a()}))}},Ba=v([`h264`,`h265`,`hevc`,`av1`,`mjpeg`,`vp8`,`vp9`]),Va=y({acceptCodecs:h(Ba).readonly().optional(),minHeight:i().int().positive().optional(),minWidth:i().int().positive().optional(),excludeDerived:m().optional(),requireSiblingCodec:h(Ba).readonly().optional()}).readonly(),Ha=y({preferredProviders:h(a()).readonly().optional(),resolutionPreference:v([`highest`,`lowest`]).optional()}).readonly(),Ua=y({camStreamId:a(),codec:a().optional(),resolution:C.optional(),reason:a()}),Wa={name:`camera-streams`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[F.Camera],methods:{getCameraStreams:R(y({deviceId:i().int().nonnegative()}),h(Et).readonly()),getBrokerStreams:R(y({deviceId:i().int().nonnegative()}),h(Ot).readonly()),getRtspEntries:R(y({deviceId:i().int().nonnegative(),hostname:a().optional()}),h(Ea).readonly()),getProfileRtspEntries:R(y({deviceId:i().int().nonnegative(),hostname:a().optional()}),h(Kt).readonly()),pickStream:R(y({deviceId:i().int().nonnegative(),requirements:Va,preferences:Ha.optional()}),Ua.nullable())},events:{onCamStreamsChanged:z(y({deviceId:i().int().nonnegative(),camStreams:h(Et).readonly()})),onProfileSlotsChanged:z(y({deviceId:i().int().nonnegative(),profileSlots:h(Ot).readonly()}))},runtimeState:y({online:m(),slotStatuses:y({high:Dt.optional(),mid:Dt.optional(),low:Dt.optional()}),slotErrors:y({high:a().optional(),mid:a().optional(),low:a().optional()}),lastChangedAt:i()})},Ga=y({detected:m(),lastChangedAt:i()}),Ka={name:`carbon-monoxide`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:Ga,kind:`push`},runtimeState:Ga},qa=v([`off`,`heat`,`cool`,`auto`,`heat_cool`,`fan_only`,`dry`]),Ja=y({mode:qa,availableModes:h(qa),fanMode:a(),availableFanModes:h(a()),preset:a(),availablePresets:h(a()),target:i().nullable(),targetHigh:i().nullable(),targetLow:i().nullable(),targetHumidity:i().min(0).max(100).nullable(),currentTemp:i().nullable(),currentHumidity:i().min(0).max(100).nullable(),swingVertical:m().nullable(),swingHorizontal:m().nullable(),lastFetchedAt:i()}),Ya={name:`climate-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Thermostat,F.Climate],methods:{setMode:R(y({deviceId:i().int().nonnegative(),mode:qa}),_(),{kind:`mutation`,auth:`admin`}),setFanMode:R(y({deviceId:i().int().nonnegative(),fanMode:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),setPreset:R(y({deviceId:i().int().nonnegative(),preset:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),setTarget:R(y({deviceId:i().int().nonnegative(),target:i()}),_(),{kind:`mutation`,auth:`admin`}),setTargetRange:R(y({deviceId:i().int().nonnegative(),targetLow:i(),targetHigh:i()}),_(),{kind:`mutation`,auth:`admin`}),setTargetHumidity:R(y({deviceId:i().int().nonnegative(),targetHumidity:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`}),setSwingVertical:R(y({deviceId:i().int().nonnegative(),on:m()}),_(),{kind:`mutation`,auth:`admin`}),setSwingHorizontal:R(y({deviceId:i().int().nonnegative(),on:m()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Ja,kind:`push`},runtimeState:Ja},Xa=y({r:i().int().min(0).max(255),g:i().int().min(0).max(255),b:i().int().min(0).max(255)}),Za=y({h:i().min(0).max(360),s:i().min(0).max(100),v:i().min(0).max(100)}),Qa=b(`mode`,[y({mode:c(`rgb`),rgb:Xa}),y({mode:c(`hsv`),hsv:Za}),y({mode:c(`mired`),mireds:i().int().min(50).max(1e3)})]),$a=y({mode:v([`rgb`,`hsv`,`mired`]),rgb:Xa.optional(),hsv:Za.optional(),mireds:i().int().optional(),lastChangedAt:i()}),eo={name:`color`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Light],methods:{setColor:R(y({deviceId:i().int().nonnegative(),color:Qa}),_(),{kind:`mutation`,auth:`admin`})},events:{onColorChanged:{data:y({deviceId:i(),mode:v([`rgb`,`hsv`,`mired`]),rgb:Xa.optional(),hsv:Za.optional(),mireds:i().int().optional(),lastChangedAt:i()})}},status:{schema:$a,kind:`command-driven`},runtimeState:$a},to=y({connected:m(),lastChangedAt:i()}),no={name:`connectivity`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:to,kind:`push`},runtimeState:to},ro=y({key:a().min(1),label:a().min(1),level:i().min(0).max(100).nullable(),status:v([`ok`,`replace`]).nullable(),lastResetAt:i().nullable(),resettable:m()}),io=y({items:h(ro),lastChangedAt:i()}),ao={name:`consumables`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:Object.values(F),deviceConfig:{ui:{kind:`widget`,widgetId:`host/consumables-panel`,tab:`consumables`,topTab:!0,label:`Consumables`,order:5}},methods:{reset:R(y({deviceId:i().int().nonnegative(),key:a().min(1)}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:io,kind:`push`,empty:{items:[],lastChangedAt:0},itemArray:{path:`items`,keyField:`key`,labelField:`label`,itemSchema:ro,emptyItem:{key:``,label:``,level:null,status:null,lastResetAt:null,resettable:!1}}},runtimeState:io.extend({lastFetchedAt:i()})},oo=y({entryOpen:m(),lastChangedAt:i()}),so={name:`contact`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:oo,kind:`push`},runtimeState:oo},co=v([`numeric`,`select`,`text`,`datetime`]),lo=y({kind:co,value:g([i(),a()]),options:h(a()),lastChangedAt:i(),unit:a().optional(),min:i().optional(),max:i().optional(),step:i().optional(),precision:i().int().min(0).max(10).optional(),format:v([`date`,`time`,`datetime`]).optional()}),uo=b(`kind`,[y({kind:c(`numeric`),value:i()}),y({kind:c(`select`),value:a().min(1)}),y({kind:c(`text`),value:a()}),y({kind:c(`datetime`),value:a().min(1)})]),fo={name:`control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Control],methods:{setValue:R(y({deviceId:i().int().nonnegative(),control:uo}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:lo,kind:`push`},runtimeState:lo},po=v([`open`,`opening`,`closing`,`closed`,`stopped`]),mo=y({state:po,position:i().min(0).max(100).nullable(),tiltPosition:i().min(0).max(100).nullable(),lastChangedAt:i()}),ho={name:`cover`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Cover],methods:{open:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),close:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),stop:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),setPosition:R(y({deviceId:i().int().nonnegative(),position:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`}),setTiltPosition:R(y({deviceId:i().int().nonnegative(),tiltPosition:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:mo,kind:`push`},runtimeState:mo},go=v([`auto`,`day`,`night`,`schedule`]),_o=y({min:i(),max:i(),step:i()}),vo=y({mode:go,sensitivity:i().optional(),switchDelaySec:i().optional(),lastFetchedAt:i()}),yo=y({modes:h(go),supportsSensitivity:m(),sensitivity:_o.optional(),supportsSwitchDelay:m(),switchDelaySec:_o.optional()}),bo=y({mode:go.optional(),sensitivity:i().optional(),switchDelaySec:i().optional()}),xo={name:`day-night`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`day-night`,tab:`image`}},methods:{getOptions:R(y({deviceId:i()}),yo),setSettings:R(y({deviceId:i(),settings:bo}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:vo,kind:`poll`},runtimeState:vo},B=y({id:a(),system:a(),uniqueId:a().optional(),raw:o(a(),r()).optional()});function So(e){return{id:e.stableId,system:e.addonId}}function Co(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 wo(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 To=`sourceInfo`;function Eo(e){if(!e)return null;let t=e[To];if(!t)return null;let n=B.safeParse(t);return n.success?n.data:null}var Do=v([`online`,`sleeping`,`offline`,`unknown`]),V=fe(()=>y({childNativeId:a(),name:a(),type:v(F),status:Do,metadata:y({model:a().optional(),serialNumber:a().optional(),uid:a().optional(),rtspChannel:i().int().nonnegative().optional(),isBattery:m().optional(),isDoorbell:m().optional(),isMultifocal:m().optional(),externalLocation:a().optional(),manufacturer:a().optional(),integration:a().optional()}).default({}),alreadyAdopted:m(),adoptedDeviceId:i().int().nonnegative().nullable(),capabilities:h(a()).readonly().optional(),features:h(a()).readonly().optional(),sourceInfo:B.optional(),children:h(V).readonly().optional()})),Oo=y({discovered:h(V),lastDiscoveryAt:i().int().nonnegative().nullable(),lastError:a().nullable()}),ko={name:`device-discovery`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Hub],status:{schema:Oo,kind:`poll`},runtimeState:Oo.extend({lastFetchedAt:i().int().nonnegative()}),methods:{listDiscovered:R(y({deviceId:i().int().nonnegative()}),h(V).readonly()),refreshDiscovery:R(y({deviceId:i().int().nonnegative()}),h(V).readonly(),{kind:`mutation`,auth:`admin`}),adoptDevice:R(y({deviceId:i().int().nonnegative(),childNativeId:a(),name:a().optional()}),y({deviceId:i().int().nonnegative(),stableId:a()}),{kind:`mutation`,auth:`admin`}),releaseDevice:R(y({deviceId:i().int().nonnegative(),childDeviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`})}},Ao=y({lastPressedAt:i().nullable(),pressCountSinceStart:i()}),jo=y({deviceId:i(),timestamp:i()}),Mo={name:`doorbell`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Button],methods:{},events:{onPressed:{data:jo}},status:{schema:Ao,kind:`push`},runtimeState:Ao},No=v([`date`,`time`,`datetime`]),Po=y({value:a(),format:No.optional(),lastFetchedAt:i()}),Fo={name:`enum-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:Po,kind:`push`},runtimeState:Po},Io=y({deviceId:i(),eventType:a(),data:o(a(),r()).nullable(),timestamp:i(),seq:i()}),Lo=y({eventTypes:h(a()),lastEvent:Io.nullable(),eventCountSinceStart:i()}),Ro={name:`event-emitter`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.EventEmitter],methods:{},events:{onEvent:{data:Io}},status:{schema:Lo,kind:`push`},runtimeState:Lo},zo=v([`forward`,`reverse`]),Bo=y({percentage:i().min(0).max(100).nullable(),percentageStep:i().positive().optional(),preset:a(),availablePresets:h(a()),direction:zo.nullable(),oscillating:m().nullable(),lastChangedAt:i()}),Vo={name:`fan-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Fan],methods:{setPercentage:R(y({deviceId:i().int().nonnegative(),percentage:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`}),setPreset:R(y({deviceId:i().int().nonnegative(),preset:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),setDirection:R(y({deviceId:i().int().nonnegative(),direction:zo}),_(),{kind:`mutation`,auth:`admin`}),setOscillating:R(y({deviceId:i().int().nonnegative(),oscillating:m()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Bo,kind:`push`},runtimeState:Bo},Ho=y({flooded:m(),lastChangedAt:i()}),Uo={name:`flood`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:Ho,kind:`push`},runtimeState:Ho},Wo=y({detected:m(),lastChangedAt:i()}),Go={name:`gas`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:Wo,kind:`push`},runtimeState:Wo},Ko=y({on:m(),currentHumidity:i().min(0).max(100).nullable(),targetHumidity:i().min(0).max(100).nullable(),mode:a().nullable(),availableModes:h(a()),action:a().nullable(),minHumidity:i().nullable(),maxHumidity:i().nullable(),lastChangedAt:i()}),qo={name:`humidifier`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Humidifier],methods:{setOn:R(y({deviceId:i().int().nonnegative(),on:m()}),_(),{kind:`mutation`,auth:`admin`}),setTargetHumidity:R(y({deviceId:i().int().nonnegative(),humidity:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`}),setMode:R(y({deviceId:i().int().nonnegative(),mode:a().min(1)}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Ko,kind:`push`},runtimeState:Ko},Jo=y({percent:i().min(0).max(100),lastFetchedAt:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional()}),Yo={name:`humidity-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor,F.Thermostat],methods:{},status:{schema:Jo,kind:`push`},runtimeState:Jo},Xo=y({url:a().nullable(),lastUpdated:i().nullable()}),Zo={name:`image`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Image],methods:{},status:{schema:Xo,kind:`push`},runtimeState:Xo},Qo=v([`0`,`90`,`180`,`270`]),$o=v([`auto`,`manual`]),es=v([`auto`,`manual`]),ts=v([`off`,`blc`,`wdr`,`hlc`]),ns=y({min:i(),max:i(),step:i()}),rs=y({brightness:i().optional(),contrast:i().optional(),saturation:i().optional(),sharpness:i().optional(),mirror:m().optional(),flip:m().optional(),rotate:Qo.optional(),whiteBalance:$o.optional(),warmth:i().optional(),exposureMode:es.optional(),backlightMode:ts.optional(),lastFetchedAt:i()}),is=y({supportsBrightness:m(),brightness:ns.optional(),supportsContrast:m(),contrast:ns.optional(),supportsSaturation:m(),saturation:ns.optional(),supportsSharpness:m(),sharpness:ns.optional(),supportsMirror:m(),supportsFlip:m(),rotateOptions:h(Qo),whiteBalanceModes:h($o),supportsWarmth:m(),warmth:ns.optional(),exposureModes:h(es),backlightModes:h(ts)}),as=y({brightness:i().optional(),contrast:i().optional(),saturation:i().optional(),sharpness:i().optional(),mirror:m().optional(),flip:m().optional(),rotate:Qo.optional(),whiteBalance:$o.optional(),warmth:i().optional(),exposureMode:es.optional(),backlightMode:ts.optional()}),os={name:`image-settings`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`image-settings`,tab:`image`}},methods:{getOptions:R(y({deviceId:i()}),is),setSettings:R(y({deviceId:i(),settings:as}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:rs,kind:`poll`},runtimeState:rs},ss=v([`idle`,`mowing`,`paused`,`docked`,`error`]),cs=v([`info`,`warning`,`error`]),ls=y({activity:ss,batteryLevel:i().min(0).max(100).nullable(),progressPercent:i().min(0).max(100).nullable(),currentCode:i().nullable(),currentCodeLabel:a().nullable(),severity:cs,lastChangedAt:i()}),us={name:`lawn-mower-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.LawnMower],methods:{startMowing:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),pause:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),dock:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:ls,kind:`push`},runtimeState:ls},ds=v([`locked`,`unlocked`,`locking`,`unlocking`,`jammed`]),fs=y({state:ds,lastChangedAt:i()}),ps={name:`lock-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Lock],methods:{lock:R(y({deviceId:i().int().nonnegative(),code:a().min(1).optional()}),_(),{kind:`mutation`,auth:`admin`}),unlock:R(y({deviceId:i().int().nonnegative(),code:a().min(1).optional()}),_(),{kind:`mutation`,auth:`admin`}),open:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:fs,kind:`push`},runtimeState:fs},ms=v([`off`,`on`,`idle`,`playing`,`paused`,`buffering`,`standby`]),hs=v([`off`,`all`,`one`]),gs=y({type:a(),title:a(),artist:a().optional(),album:a().optional(),imageUrl:a().optional()}),_s=y({state:ms,volumeLevel:i().min(0).max(100).nullable(),isMuted:m().nullable(),source:a(),availableSources:h(a()),currentMedia:gs.nullable(),positionMs:i().int().nonnegative().nullable(),durationMs:i().int().nonnegative().nullable(),shuffle:m().nullable(),repeat:hs.nullable(),lastChangedAt:i()}),vs={name:`media-player`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.MediaPlayer],methods:{play:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),pause:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),stop:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),next:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),previous:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),seek:R(y({deviceId:i().int().nonnegative(),positionMs:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),setVolume:R(y({deviceId:i().int().nonnegative(),volumeLevel:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`}),setMute:R(y({deviceId:i().int().nonnegative(),muted:m()}),_(),{kind:`mutation`,auth:`admin`}),setShuffle:R(y({deviceId:i().int().nonnegative(),shuffle:m()}),_(),{kind:`mutation`,auth:`admin`}),setRepeat:R(y({deviceId:i().int().nonnegative(),repeat:hs}),_(),{kind:`mutation`,auth:`admin`}),selectSource:R(y({deviceId:i().int().nonnegative(),source:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),playMedia:R(y({deviceId:i().int().nonnegative(),mediaId:a().min(1),mediaType:a().min(1)}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:_s,kind:`push`},runtimeState:_s},ys=v([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]),bs=y({data:u(),format:ys,width:i(),height:i(),timestamp:i()}),H=y({x:i(),y:i(),w:i(),h:i()}),xs=y({class:a(),originalClass:a(),score:i(),bbox:H}),Ss=y({data:p(Uint8Array),sampleRate:i(),channels:i(),timestamp:i(),deviceId:i().optional()}),Cs=y({rms:i(),dbfs:i()}),ws=y({className:a(),originalClass:a().optional(),score:i()}),Ts=y({bbox:H,pixelCount:i(),intensity:i()}),Es=y({detected:m(),regionCount:i(),regions:h(Ts).readonly(),rawRegions:h(Ts).readonly(),frameWidth:i(),frameHeight:i(),analysisMs:i()}),Ds={name:`motion-detection`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,exposesDeviceSettings:!0,methods:{analyze:R(y({deviceId:i(),frame:bs.optional(),frameHandle:Lt.optional()}),Es,{kind:`mutation`}),removeCamera:R(y({deviceId:i()}),_(),{kind:`mutation`}),reset:R(_(),_(),{kind:`mutation`})},events:{onMotion:{data:y({deviceId:i(),detected:m(),regionCount:i()})}}},Os=y({activeCameras:i(),throttledCameras:i(),avgInferenceTimeMs:i(),queueDepth:i()}),ks=y({detectionMode:v([`disabled`,`always-on`,`on-motion`]),configuredFps:i(),actualFps:i(),queueDepth:i(),avgInferenceTimeMs:i(),droppedFrames:i(),phase:v([`idle`,`watching`,`active`])}),As=ks.extend({deviceId:i()}),js=v([`onnx`,`coreml`,`openvino`,`tflite`,`pt`]),Ms=v([`detector`,`cropper`,`classifier`,`refiner`,`audio-classifier`]),U=y({runtime:v([`node`,`python`]),backend:a(),format:js,device:a().optional()}),Ns=y({engine:U,devices:h(y({id:a(),label:a(),description:a().optional()})).readonly(),defaultDevice:a()}),Ps=fe(()=>y({addonId:a(),addonName:a(),slot:Ms,inputClasses:h(a()).readonly(),outputClasses:h(a()).readonly(),enabled:m(),modelId:a(),children:h(Ps).readonly(),group:a().optional(),settings:o(a(),r()).optional()})),Fs=fe(()=>y({addonId:a(),enabled:m(),modelId:a(),children:h(Fs).readonly(),settings:o(a(),r()).optional()})),Is=y({id:a(),name:a(),createdAt:a(),updatedAt:a(),engine:U,steps:h(Fs).readonly()}),Ls=y({id:a(),name:a(),formats:o(a(),y({downloaded:m(),sizeMB:i()})),group:Se.optional(),legacy:m().optional()}),Rs=u(),zs=y({id:a(),name:a(),slot:Ms,inputClasses:h(a()).readonly(),outputClasses:h(a()).readonly(),childSlots:h(Ms).readonly(),models:h(Ls).readonly(),defaultModelId:a(),defaultModelIdByFormat:o(a(),a()).optional(),enabledByDefault:m().optional(),defaultConfidence:i(),group:a().optional(),configSchema:h(Rs).readonly().optional()}),Bs=y({id:Ms,label:a(),priority:i(),parentSlot:Ms.nullable(),addons:h(zs).readonly()}),Vs=y({availableEngines:h(Ns).readonly(),selectedEngine:U,slots:h(Bs).readonly()}),Hs=y({runtimeId:v([`onnx`,`openvino`,`coreml`]).nullable(),device:a().nullable(),state:v([`idle`,`installing`,`verifying`,`ready`,`failed`]),progress:i().optional(),error:a().optional(),nextRetryAt:i().optional(),configIssues:h(a()).optional()}),W=fe(()=>y({addonId:a(),modelId:a().optional(),enabled:m().default(!0),children:h(W).optional(),settings:o(a(),r()).optional()})),Us=y({addonId:a(),chosen:a(),running:a(),format:a()}),Ws=y({addonId:a(),kind:v([`unknown-addon`,`no-format-build`]),detail:a()}),Gs=y({ok:m(),issues:h(Ws).readonly(),substitutions:h(Us).readonly(),format:a()}),Ks=y({filename:a(),stepIds:h(a()).readonly().optional()}),qs=y({base64:a(),filename:a()}),Js=y({filename:a(),sizeKb:i()}),Ys=y({base64:a()}),Xs=y({id:a(),name:a(),description:a(),available:m(),rawLabels:h(a()).readonly().optional()}),Zs=y({activeBackend:a(),availableBackends:h(Xs).readonly(),sampleRate:i(),chunkDurationMs:i()}),Qs=y({filePath:a(),sizeMB:i(),durationMs:i()}),$s=y({success:m(),error:a().optional(),frame:u().optional()}),ec=u(),tc=u(),nc=u(),rc=u(),ic=u(),ac=u(),oc={name:`pipeline-executor`,scope:`system`,mode:`singleton`,methods:{getAvailableEngines:R(_(),h(U)),getSelectedEngine:R(_(),U),getDefaultSteps:R(U,h(Ps)),reprobeEngine:R(_(),U,{kind:`mutation`,auth:`admin`}),getEngineProvisioning:R(y({nodeId:a()}),Hs),getVideoPipelineSteps:R(_(),o(a(),y({modelId:a(),settings:o(a(),r()).readonly()}))),setVideoPipelineSteps:R(y({steps:o(a(),y({modelId:a(),settings:o(a(),r()).readonly()}))}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),clearDeviceOverrides:R(y({nodeId:a()}),y({success:c(!0),clearedDevices:i()}),{kind:`mutation`,auth:`admin`}),getSchema:R(_(),Vs),getGlobalSteps:R(_(),h(Ps).readonly().nullable()),getGlobalPipelineConfig:R(_(),ec),getOrchestratorConfigSchema:R(_(),tc),validatePipeline:R(y({steps:h(W)}),Gs),listTemplates:R(_(),h(Is).readonly()),saveTemplate:R(y({name:a(),steps:h(Fs).readonly(),engine:U}),Is,{kind:`mutation`}),updateTemplate:R(y({id:a(),name:a().optional(),steps:h(Fs).readonly().optional()}),Is,{kind:`mutation`}),deleteTemplate:R(y({id:a()}),_(),{kind:`mutation`}),getCapabilities:R(_(),rc),getAddonModels:R(y({addonId:a()}),ic),downloadModel:R(y({addonId:a(),modelId:a(),format:js}),Qs,{kind:`mutation`}),deleteModel:R(y({addonId:a(),modelId:a(),format:js}),y({success:c(!0)}),{kind:`mutation`}),runPipeline:R(y({engine:U.optional(),steps:h(W).min(1),frame:bs.optional(),frameHandle:Lt.optional(),imageBase64:a().optional(),image:p(Uint8Array).optional(),referenceImage:a().optional(),deviceId:i().optional(),sessionId:a().optional()}),ac,{kind:`mutation`}),runPipelineBatch:R(y({engine:U.optional(),steps:h(W).min(1),frames:h(bs).min(1).max(255),deviceId:i().optional(),sessionId:a().optional()}),y({results:h(ac).readonly()}),{kind:`mutation`}),cacheFrameInPool:R(y({data:p(Uint8Array),width:i().int().positive(),height:i().int().positive(),format:v([`rgb`,`bgr`,`gray`])}),y({frameId:i(),width:i(),height:i()}),{kind:`mutation`}),inferCached:R(y({stepId:a(),frameId:i().int()}),o(a(),r()),{kind:`mutation`}),uncacheFrame:R(y({frameId:i().int()}),_(),{kind:`mutation`}),getEffectiveTuning:R(_(),y({batchMode:a(),windowMs:i(),maxBatchSize:i(),concurrency:i()})),listLoadedEngines:R(_(),h(y({engineKey:a(),engine:U,modelsLoaded:h(a()).readonly(),inUseByCameras:h(i()).readonly(),kind:v([`runtime`,`warm-override`]),poolPid:i().nullable(),idleMs:i().nullable(),idleTtlMs:i().nullable()})).readonly()),spinEngine:R(y({engine:U}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),killEngine:R(y({engine:U,force:m().optional()}),y({success:m(),reason:a().optional()}),{kind:`mutation`,auth:`admin`}),listReferenceImages:R(_(),h(Ks).readonly()),getReferenceImage:R(y({filename:a()}),qs.nullable()),getReferenceAudioFiles:R(_(),h(Js).readonly()),getReferenceAudio:R(y({filename:a()}),Ys.nullable()),getAudioCapabilities:R(_(),Zs),runAudioTest:R(y({addonId:a(),modelId:a(),filename:a().optional(),settings:o(a(),r()).optional()}),$s,{kind:`mutation`}),getDetectionConfigSchema:R(_(),nc)}},sc=v([`polygon`,`tripwire`]),cc=y({x:i(),y:i()}),G=y({id:a(),name:a(),kind:sc.default(`polygon`),polygon:h(cc).readonly(),color:a().default(`#3b82f6`)}),lc={name:`zones`,scope:`device`,mode:`singleton`,deviceTypes:[F.Camera],methods:{listZones:R(y({deviceId:i()}),h(G).readonly()),addZone:R(y({deviceId:i(),zone:G}),_(),{kind:`mutation`,auth:`admin`}),removeZone:R(y({deviceId:i(),zoneId:a()}),_(),{kind:`mutation`,auth:`admin`}),updateZone:R(y({deviceId:i(),zone:G}),_(),{kind:`mutation`,auth:`admin`})},runtimeState:y({zones:h(G).readonly()})},K={min:0,max:6e4,default:3e4,step:500},q={min:1,max:30,default:4,step:1},J={min:1,max:30,default:10,step:1},Y={min:0,max:300,default:30,step:5},X={min:1,max:10,default:4,step:1},uc=v([`onboard`,`analyzer`]),dc=h(uc),fc=y({deviceId:i(),detected:m(),source:uc.default(`analyzer`),regions:h(Ts).readonly().optional()}),pc=b(`kind`,[y({kind:c(`local-broker`)}),y({kind:c(`remote-restream`),ownerNodeId:a(),ownerReachableHost:a().optional(),hubHostnameOverride:a().optional()})]).describe(`Per-camera frame-source mode for the runner (P2c)`),mc=y({deviceId:i(),detectionMode:v([`disabled`,`always-on`,`on-motion`]).default(`on-motion`),audioMode:v([`disabled`,`always-on`,`on-motion`]).default(`always-on`),motionCooldownMs:i().min(K.min).default(K.default),motionFps:i().min(q.min).max(q.max).default(q.default),detectionFps:i().min(J.min).max(J.max).default(J.default),motionStreamId:a(),detectionStreamId:a(),motionSources:dc.default([`analyzer`]),pipelineEnabled:m().default(!0),steps:h(W).readonly().optional(),audio:y({modelId:a().optional(),enabled:m()}).nullable().optional(),zones:h(G).readonly().default([]),onboardMotionDrivesAnalyzer:m().default(!0),occupancyRecheckEnabled:m().default(!1),occupancyRecheckSec:i().min(Y.min).max(Y.max).default(Y.default),occupancyRecheckFrames:i().min(X.min).max(X.max).default(X.default),frameSource:pc.default({kind:`local-broker`})}),hc=[{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:q.min,max:q.max,step:q.step,default:q.default,showValue:!0,unit:`fps`,nullable:!0,nullLabel:`Default`,showWhen:{field:`motionSources`,includes:`analyzer`}},{key:`detectionFps`,type:`slider`,label:`Detection FPS`,min:J.min,max:J.max,step:J.step,default:J.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:`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 to confirm the scene is truly empty (catches stationary objects motion-gating would miss). Off by default — it adds decoder re-dial churn.`,default:!1},{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:Y.min,max:Y.max,step:Y.step,default:Y.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:X.min,max:X.max,step:X.step,default:X.default,showValue:!0,showWhen:{field:`occupancyRecheckEnabled`,equals:!0}}],gc=y({nodeId:a(),attachedCameras:i(),activeCameras:i(),avgInferenceFps:i(),avgInferenceTimeMs:i(),queueDepthTotal:i(),hardware:y({hasGpu:m(),inferenceBackend:a().optional(),cpuCores:i().optional()})}),_c=y({nodeId:a(),activeCameras:i(),throttledCameras:i(),avgInferenceTimeMs:i(),queueDepth:i()}),vc={name:`pipeline-runner`,scope:`system`,mode:`singleton`,methods:{attachCamera:R(mc,y({success:c(!0)}),{kind:`mutation`}),detachCamera:R(y({deviceId:i()}),y({success:c(!0)}),{kind:`mutation`}),reportMotion:R(fc,y({success:c(!0)}),{kind:`mutation`}),getLocalLoad:R(_(),gc),getLocalMetrics:R(_(),_c),getCameraMetrics:R(y({deviceId:i()}),ks.nullable()),getAllCameraMetrics:R(_(),h(As).readonly()),getLocalCameras:R(_(),h(i()).readonly())}},yc=y({detected:m(),lastDetectedAt:i().nullable(),autoClearAfterMs:i().nullable()}),bc=y({deviceId:i(),detected:m(),timestamp:i(),source:uc,regions:h(Ts).readonly().optional()}),xc={name:`motion`,scope:`device`,mode:`singleton`,deviceTypes:[F.Camera,F.Sensor],methods:{isDetected:R(y({deviceId:i()}),m())},events:{onMotionChanged:{data:bc}},status:{schema:yc,kind:`push`},runtimeState:yc},Sc=y({enabled:m(),lastChangedAt:i()}),Cc=Sc.extend({lastFetchedAt:i()}),wc={name:`motion-trigger`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Light,F.Siren,F.Switch],methods:{setMotionTrigger:R(y({deviceId:i().int().nonnegative(),enabled:m()}),_(),{kind:`mutation`,auth:`admin`})},events:{onMotionTriggerChanged:{data:y({deviceId:i(),enabled:m(),lastChangedAt:i()})}},status:{schema:Sc,kind:`command-driven`},runtimeState:Cc},Tc=y({x:i(),y:i()}),Ec=y({kind:c(`rect`),x:i(),y:i(),width:i(),height:i()}),Dc=y({kind:c(`polygon`),points:h(Tc)}),Oc=y({kind:c(`grid`),gridWidth:i(),gridHeight:i(),cells:h(m())}),kc=y({kind:c(`line`),points:h(Tc)}),Ac=b(`kind`,[Ec,Dc,Oc,kc]),jc=v([`rect`,`polygon`,`grid`,`line`]),Mc=y({min:i(),max:i()}),Nc=y({width:i(),height:i()}),Pc=y({id:i(),enabled:m(),shape:Oc}),Fc=y({enabled:m(),sensitivity:i(),regions:h(Pc),lastFetchedAt:i()}),Ic=y({maxRegions:i(),supportedShapes:h(jc),grid:Nc,sensitivity:y({min:i(),max:i(),step:i()})}),Lc=y({enabled:m().optional(),sensitivity:i().optional(),regions:h(Pc).optional()}),Rc={name:`motion-zones`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/motion-zones-grid`,tab:`motion`,label:`Motion Zones`}},methods:{getOptions:R(y({deviceId:i()}),Ic),setZone:R(y({deviceId:i(),patch:Lc}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Fc,kind:`poll`},runtimeState:Fc},zc=v([`person`,`vehicle`,`animal`,`face`,`package`,`other`]),Bc=y({class:zc,timestamp:i(),confidence:i().min(0).max(1).optional()}),Vc=y({lastByClass:l(zc,Bc.nullable()),supportedClasses:h(zc).readonly(),enabled:m()}),Hc=Vc.extend({lastFetchedAt:i()}),Uc={name:`native-object-detection`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera],methods:{setEnabled:R(y({deviceId:i(),enabled:m()}),_(),{kind:`mutation`,auth:`admin`})},events:{onDetected:{data:y({deviceId:i(),detection:Bc})}},status:{schema:Vc,kind:`push`},runtimeState:Hc},Wc=v([`min`,`low`,`normal`,`high`]),Gc=y({id:a().min(1),title:a().min(1),uri:re().optional(),destructive:m().optional()}),Kc=y({image:m(),priority:m(),data:m(),actions:m(),recipients:m()}),qc=y({lastSentAt:i(),lastError:a().nullable(),queueDepth:i().int().nonnegative(),supports:Kc}),Jc=y({deviceId:i().int().nonnegative(),title:a().optional(),body:a().min(1),image:a().optional(),priority:Wc.optional(),channel:a().optional(),recipients:h(a()).optional(),actions:h(Gc).optional(),data:o(a(),r()).optional()}),Yc=y({notificationId:a(),acceptedAt:i()}),Xc={name:`notifier`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Notifier],methods:{send:R(Jc,Yc,{kind:`mutation`,auth:`admin`}),cancel:R(y({deviceId:i().int().nonnegative(),notificationId:a().min(1)}),_(),{kind:`mutation`,auth:`admin`})},events:{onSent:{data:y({deviceId:i(),notificationId:a(),success:m(),error:a().nullable(),acceptedAt:i()})}},status:{schema:qc,kind:`command-driven`},runtimeState:qc},Zc=y({value:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional(),lastFetchedAt:i()}),Qc={name:`numeric-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:Zc,kind:`push`},runtimeState:Zc},$c=v([`normal`,`offline`,`on_batteries`]),el=i().int().min(4).max(200),tl=y({foodLevel:i().nullable(),food1:i().nullable(),food2:i().nullable(),lowFood:m(),batteryPower:i().min(0).max(100).nullable(),desiccantLeftDays:i().nullable(),feeding:m(),status:$c.nullable(),error:a().nullable(),errorCode:i().nullable(),isDualHopper:m(),childLock:m(),indicatorLight:m(),feedSound:m(),volume:i(),lastFetchedAt:i()}),nl={name:`pet-feeder`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.PetFeeder],methods:{feed:R(y({deviceId:i().int().nonnegative(),grams:el.optional(),hopper1:el.optional(),hopper2:el.optional()}),_(),{kind:`mutation`,auth:`admin`}),cancelFeed:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),resetDesiccant:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),markFoodReplenished:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),callPet:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),playSound:R(y({deviceId:i().int().nonnegative(),soundId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),setChildLock:R(y({deviceId:i().int().nonnegative(),on:m()}),_(),{kind:`mutation`,auth:`admin`}),setIndicatorLight:R(y({deviceId:i().int().nonnegative(),on:m()}),_(),{kind:`mutation`,auth:`admin`}),setFeedSound:R(y({deviceId:i().int().nonnegative(),on:m()}),_(),{kind:`mutation`,auth:`admin`}),setVolume:R(y({deviceId:i().int().nonnegative(),level:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:tl,kind:`poll`},runtimeState:tl},rl=y({watts:i().optional(),kwhTotal:i().optional(),volts:i().optional(),amps:i().optional(),va:i().optional(),powerFactor:i().min(0).max(1).optional(),lastFetchedAt:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional()}),il={name:`power-meter`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:rl,kind:`push`},runtimeState:rl},al=y({latitude:i().min(-90).max(90),longitude:i().min(-180).max(180),accuracyMeters:i().nonnegative()}),ol=y({state:a(),location:a().nullable(),gps:al.nullable(),batteryPercent:i().min(0).max(100).nullable(),lastChangedAt:i()}),sl={name:`presence`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Presence],methods:{},status:{schema:ol,kind:`push`},runtimeState:ol},cl=y({hpa:i(),lastFetchedAt:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional()}),ll={name:`pressure-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:cl,kind:`push`},runtimeState:cl},ul=b(`kind`,[Ec,Dc]),dl=y({id:i(),enabled:m(),shape:ul}),fl=y({enabled:m(),regions:h(dl),lastFetchedAt:i()}),pl=y({maxRegions:i(),supportedShapes:h(jc),polygonVertices:Mc.optional()}),ml=y({enabled:m().optional(),regions:h(dl).optional()}),hl={name:`privacy-mask`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/privacy-mask-grid`,tab:`image`,label:`Privacy Mask`}},methods:{getOptions:R(y({deviceId:i()}),pl),setMask:R(y({deviceId:i(),patch:ml}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:fl,kind:`poll`},runtimeState:fl},gl=y({targetType:a().describe(`Vendor target string (people/vehicle/pet); empty = camera default`),stopDelaySeconds:i().int().min(0).max(300),disappearDelaySeconds:i().int().min(0).max(300)}),_l=y({value:a(),label:a()}),vl=y({enabled:m(),lastChangedAt:i(),currentSettings:gl.nullable(),supportedTargetTypes:h(_l)}),yl=vl.extend({lastFetchedAt:i()}),bl={name:`ptz-autotrack`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/ptz-autotrack`,tab:`ptz`,topTab:!0,label:`Auto-Tracking`,order:5}},methods:{getStatus:R(y({deviceId:i()}),vl),setEnabled:R(y({deviceId:i(),enabled:m()}),_(),{kind:`mutation`}),getSettings:R(y({deviceId:i()}),gl.nullable()),setSettings:R(y({deviceId:i(),settings:gl.partial()}),_(),{kind:`mutation`})},events:{onStatusChanged:{data:y({deviceId:i(),status:vl})}},status:{schema:vl,kind:`command-driven`},runtimeState:yl},xl=y({isRunning:m(),lastRunAt:i(),lastRunSuccess:m().nullable(),lastError:a().nullable(),lastChangedAt:i()}),Sl={name:`script-runner`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Script],methods:{run:R(y({deviceId:i().int().nonnegative(),variables:o(a(),r()).optional()}),_(),{kind:`mutation`,auth:`admin`}),stop:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:xl,kind:`push`},runtimeState:xl},Cl=y({detected:m(),lastChangedAt:i()}),wl={name:`smoke`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:Cl,kind:`push`},runtimeState:Cl},Tl=v([`main`,`sub`,`ext`]),El=y({width:i(),height:i(),codec:v([`h264`,`h265`]),framerate:i(),bitrate:i(),bitrateMode:v([`vbr`,`cbr`]).optional(),encoderProfile:v([`high`,`main`,`baseline`]).optional(),gop:i().optional(),audio:m().optional()}),Dl=y({main:El.optional(),sub:El.optional(),ext:El.optional(),lastFetchedAt:i()}),Ol=y({resolutions:h(y({width:i(),height:i()})),codecs:h(v([`h264`,`h265`])),framerates:h(i()),bitrates:h(i()),bitrateRange:s([i(),i()]).optional(),supportsBitrateMode:m(),supportsEncoderProfile:m(),supportsGop:m(),gop:y({min:i(),max:i(),step:i()}).optional()}),kl=y({main:Ol.optional(),sub:Ol.optional(),ext:Ol.optional()}),Al=y({width:i().optional(),height:i().optional(),codec:v([`h264`,`h265`]).optional(),framerate:i().optional(),bitrate:i().optional(),bitrateMode:v([`vbr`,`cbr`]).optional(),encoderProfile:v([`high`,`main`,`baseline`]).optional(),gop:i().optional(),audio:m().optional()}),jl={name:`stream-params`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`stream-params`,tab:`streaming`}},methods:{getOptions:R(y({deviceId:i()}),kl),setProfile:R(y({deviceId:i(),profile:Tl,patch:Al}),_(),{kind:`mutation`,auth:`admin`}),getConfigSchema:R(y({deviceId:i()}),r().nullable())},status:{schema:Dl,kind:`poll`},runtimeState:Dl},Ml=y({on:m(),lastChangedAt:i()}),Nl={name:`switch`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Switch,F.Siren,F.Light],methods:{setState:R(y({deviceId:i(),on:m()}),_(),{kind:`mutation`,auth:`admin`})},events:{onStateChanged:{data:y({deviceId:i(),on:m(),lastChangedAt:i()})}},status:{schema:Ml,kind:`command-driven`},runtimeState:Ml,settings:{bindings:[{kind:`scalar`,statusPath:`on`,method:`setState`,valueArg:`on`,field:{label:`On`,kind:`boolean`}}]}},Pl=y({tampered:m(),lastChangedAt:i()}),Fl={name:`tamper`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:Pl,kind:`push`},runtimeState:Pl},Il=y({celsius:i(),lastFetchedAt:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional()}),Ll={name:`temperature-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor,F.Thermostat],methods:{},status:{schema:Il,kind:`push`},runtimeState:Il},Rl=y({currentVersion:a().nullable(),availableVersion:a().nullable(),updatable:m(),state:a().nullable(),inProgress:m()}),zl={name:`update`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Update],methods:{installUpdate:R(_(),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Rl,kind:`poll`},runtimeState:Rl},Bl=v([`idle`,`cleaning`,`paused`,`returning`,`docked`,`drying`,`error`]),Vl=y({level:i().min(0).max(100).nullable(),status:v([`ok`,`low`,`full`]).nullable()}),Hl=y({state:Bl,batteryLevel:i().min(0).max(100).nullable(),fanSpeed:a().nullable(),availableFanSpeeds:h(a()),cleanWater:Vl.nullable(),dirtyWater:Vl.nullable(),detergent:Vl.nullable(),dustBin:Vl.nullable(),progressPercent:i().min(0).max(100).nullable(),errorCode:i().nullable(),errorLabel:a().nullable(),lastChangedAt:i()}),Ul={name:`vacuum-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Vacuum],methods:{start:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),pause:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),stop:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),returnToBase:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),locate:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),setFanSpeed:R(y({deviceId:i().int().nonnegative(),speed:a().min(1)}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Hl,kind:`push`},runtimeState:Hl},Wl=v([`open`,`opening`,`closing`,`closed`,`stopped`]),Gl=y({state:Wl,position:i().min(0).max(100).nullable(),lastChangedAt:i()}),Kl={name:`valve`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Valve],methods:{open:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),close:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),stop:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),setPosition:R(y({deviceId:i().int().nonnegative(),position:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Gl,kind:`push`},runtimeState:Gl},ql=y({detected:m(),lastChangedAt:i()}),Jl={name:`vibration`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:ql,kind:`push`},runtimeState:ql},Yl=y({currentTemp:i().nullable(),targetTemp:i().nullable(),operationMode:a().nullable(),availableModes:h(a()),away:m().nullable(),minTemp:i().nullable(),maxTemp:i().nullable(),lastChangedAt:i()}),Xl={name:`water-heater`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.WaterHeater],methods:{setTargetTemp:R(y({deviceId:i().int().nonnegative(),temp:i().finite()}),_(),{kind:`mutation`,auth:`admin`}),setOperationMode:R(y({deviceId:i().int().nonnegative(),mode:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),setAway:R(y({deviceId:i().int().nonnegative(),on:m()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Yl,kind:`push`},runtimeState:Yl},Zl=y({condition:a().nullable(),temperature:i().nullable(),temperatureUnit:a().nullable(),humidity:i().min(0).max(100).nullable(),pressure:i().nullable(),pressureUnit:a().nullable(),windSpeed:i().nullable(),windSpeedUnit:a().nullable(),windBearing:i().nullable(),lastFetchedAt:i()}),Ql={name:`weather`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Weather],methods:{},status:{schema:Zl,kind:`push`},runtimeState:Zl},$l=y({totalObjects:i().int().nonnegative(),byClass:o(a(),i().int().nonnegative())}),eu=$l.extend({zoneId:a(),zoneName:a(),trackIds:h(a()).readonly()}),tu=y({ts:i().int(),frameWidth:i().int().nonnegative(),frameHeight:i().int().nonnegative(),zones:h(eu).readonly(),frame:$l,unzoned:$l}),nu=v([`minute`,`5min`,`hour`]),ru=y({from:i().int(),to:i().int(),resolution:nu}),iu=y({ts:i().int(),count:i().int().nonnegative()}),au={name:`zone-analytics`,scope:`device`,mode:`singleton`,deviceTypes:[F.Camera],methods:{getCurrentSnapshot:R(y({deviceId:i()}),tu.nullable()),getZoneHistory:R(y({deviceId:i(),zoneId:a(),className:a().optional()}).extend(ru.shape),h(iu).readonly()),getCameraHistory:R(y({deviceId:i(),className:a().optional()}).extend(ru.shape),h(iu).readonly()),getUnzonedHistory:R(y({deviceId:i(),className:a().optional()}).extend(ru.shape),h(iu).readonly())},runtimeState:tu},ou=v([`include`,`exclude`]),su=y({id:a(),name:a().optional(),zoneIds:h(a()).min(1).readonly(),mode:ou,classFilter:h(a()).readonly().optional(),overlapThreshold:i().min(0).max(1).optional(),bboxInclusionPct:i().min(0).max(100).optional(),preferMask:m().optional(),enabled:m().default(!0)}),cu=h(su).readonly(),lu=v([`motion`,`detection`]),uu={name:`zone-rules`,scope:`device`,mode:`singleton`,deviceTypes:[F.Camera],methods:{listRules:R(y({deviceId:i(),stage:lu}),h(su).readonly()),setRules:R(y({deviceId:i(),stage:lu,rules:h(su).readonly()}),_(),{kind:`mutation`,auth:`admin`})},runtimeState:y({motion:h(su).readonly(),detection:h(su).readonly()})},du={airQualitySensor:Qi,alarmPanel:la,ambientLightSensor:da,audioMetrics:ga,automationControl:va,battery:ba,binary:Sa,brightness:wa,cameraStreams:Wa,carbonMonoxide:Ka,climateControl:Ya,color:eo,connectivity:no,consumables:ao,contact:so,control:fo,cover:ho,dayNight:xo,deviceDiscovery:ko,deviceStatus:Ji,doorbell:Mo,enumSensor:Fo,eventEmitter:Ro,fanControl:Vo,featureProbe:Xi,flood:Uo,gas:Go,humidifier:qo,humiditySensor:Yo,image:Zo,imageSettings:os,lawnMowerControl:us,lockControl:ps,mediaPlayer:vs,motion:xc,motionTrigger:wc,motionZones:Rc,nativeObjectDetection:Uc,notifier:Xc,numericSensor:Qc,petFeeder:nl,powerMeter:il,presence:sl,pressureSensor:ll,privacyMask:hl,ptzAutotrack:bl,scriptRunner:Sl,smoke:wl,streamParams:jl,switch:Nl,tamper:Fl,temperatureSensor:Ll,update:zl,vacuumControl:Ul,valve:Kl,vibration:Jl,waterHeater:Xl,weather:Ql,zoneAnalytics:au,zoneRules:uu,zones:lc},fu=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=du[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=wi.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=Ti.fromInitial(o,a),e.bindRuntimeState?.(this.runtimeState),e.registerNativeCap?.(Ji,{});let s={online:!0,lastChangedAt:Date.now()};this.runtimeState.setCapState(`device-status`,s),e.registerNativeCap?.(Xi,{}),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=Eo(this.ctx.deviceMeta.metadata)??So({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=Co(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:{[To]:t}})}catch{}this.ctx.eventBus.emit(at(`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}},pu={"°C":{dimension:`temperature`,factor:1,offset:0},"°F":{dimension:`temperature`,factor:5/9,offset:-160/9},K:{dimension:`temperature`,factor:1,offset:-273.15},hPa:{dimension:`pressure`,factor:1,offset:0},kPa:{dimension:`pressure`,factor:10,offset:0},Pa:{dimension:`pressure`,factor:.01,offset:0},mbar:{dimension:`pressure`,factor:1,offset:0},bar:{dimension:`pressure`,factor:1e3,offset:0},inHg:{dimension:`pressure`,factor:33.8639,offset:0},mmHg:{dimension:`pressure`,factor:1.33322,offset:0},psi:{dimension:`pressure`,factor:68.9476,offset:0},"m/s":{dimension:`speed`,factor:1,offset:0},"km/h":{dimension:`speed`,factor:1/3.6,offset:0},mph:{dimension:`speed`,factor:.44704,offset:0},kn:{dimension:`speed`,factor:.514444,offset:0},"mm/h":{dimension:`precipitation-rate`,factor:1,offset:0},"in/h":{dimension:`precipitation-rate`,factor:25.4,offset:0},m:{dimension:`length`,factor:1,offset:0},mm:{dimension:`length`,factor:.001,offset:0},cm:{dimension:`length`,factor:.01,offset:0},km:{dimension:`length`,factor:1e3,offset:0},in:{dimension:`length`,factor:.0254,offset:0},ft:{dimension:`length`,factor:.3048,offset:0},mi:{dimension:`length`,factor:1609.344,offset:0},lx:{dimension:`illuminance`,factor:1,offset:0},"W/m²":{dimension:`irradiance`,factor:1,offset:0},W:{dimension:`power`,factor:1,offset:0},kW:{dimension:`power`,factor:1e3,offset:0},VA:{dimension:`apparent-power`,factor:1,offset:0},Wh:{dimension:`energy`,factor:1,offset:0},kWh:{dimension:`energy`,factor:1e3,offset:0},MWh:{dimension:`energy`,factor:1e6,offset:0},V:{dimension:`voltage`,factor:1,offset:0},mV:{dimension:`voltage`,factor:.001,offset:0},A:{dimension:`current`,factor:1,offset:0},mA:{dimension:`current`,factor:.001,offset:0},ppm:{dimension:`concentration-volume`,factor:1,offset:0},ppb:{dimension:`concentration-volume`,factor:.001,offset:0},"µg/m³":{dimension:`concentration-mass`,factor:1,offset:0},"mg/m³":{dimension:`concentration-mass`,factor:1e3,offset:0},kg:{dimension:`mass`,factor:1,offset:0},g:{dimension:`mass`,factor:.001,offset:0},lb:{dimension:`mass`,factor:.453592,offset:0},oz:{dimension:`mass`,factor:.0283495,offset:0},"%":{dimension:`percentage`,factor:1,offset:0}},mu=class extends Error{from;to;reason;constructor(e,t,n){super(`[units] cannot convert '${e}' → '${t}': ${n}`),this.name=`UnitConversionError`,this.from=e,this.to=t,this.reason=n}};function hu(e){return Object.hasOwn(pu,e)?pu[e]:void 0}function gu(e){return hu(e)?.dimension}function _u(e,t){return e*t.factor+t.offset}function vu(e,t){return(e-t.offset)/t.factor}function yu(e,t,n){if(t===n)return e;let r=hu(t);if(!r)throw new mu(t,n,`unknown-from`);let i=hu(n);if(!i)throw new mu(t,n,`unknown-to`);if(r.dimension!==i.dimension)throw new mu(t,n,`cross-dimension`);return vu(_u(e,r),i)}function bu(e,t,n){if(t===n)return e;let r=hu(t);if(!r)return;let i=hu(n);if(i&&r.dimension===i.dimension)return vu(_u(e,r),i)}function xu(e,t){if(e===t)return!0;let n=gu(e);return n===void 0?!1:n===gu(t)}function Su(e){let t=[];for(let[n,r]of Object.entries(pu))r.dimension===e&&t.push(n);return t}var Cu=y({connected:m(),deviceCount:i(),error:a().optional()}),wu=y({externalId:a(),name:a(),type:a(),metadata:o(a(),r()).optional()}),Tu=y({stableId:a(),type:v(F),suggestedName:a(),prefilledConfig:o(a(),r()),sourceInfo:B.optional()}),Eu=y({id:i(),stableId:a(),addonId:a(),type:a(),name:a(),parentDeviceId:i().nullable(),online:m(),features:h(a()),config:o(a(),r()),sourceInfo:B.optional()}),Du=y({status:v([`ok`,`error`]),labels:h(a()).optional(),error:a().optional()}),Ou=r(),ku={name:`device-provider`,scope:`system`,mode:`collection`,methods:{start:R(_(),_(),{kind:`mutation`}),stop:R(_(),_(),{kind:`mutation`}),getStatus:R(_(),Cu),getDevices:R(_(),h(y({id:a(),name:a(),type:a()}))),supportsDiscovery:R(y({}),m()),discoverDevices:R(y({params:o(a(),r()).optional()}),h(Tu),{kind:`mutation`,auth:`admin`}),getDiscoveryParamsSchema:R(y({}),Ou),getManualCreationType:R(y({}),y({deviceType:v(F).nullable()})),adoptDiscoveredDevice:R(y({candidate:Tu}),Eu,{kind:`mutation`,auth:`admin`}),supportsManualCreation:R(y({}),m()),getChildCreationSchema:R(y({type:v(F)}),Ou),createDevice:R(y({type:v(F),config:o(a(),r())}),Eu,{kind:`mutation`,auth:`admin`}),testCreationField:R(y({type:v(F),key:a(),value:r(),formValues:o(a(),r()).optional()}),Du,{kind:`mutation`,auth:`admin`})}};function Au(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 ju=class extends pt{async onInitialize(){return this.ctx.logger.info(`${this.providerName} Provider initialized`),[{capability:ku,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(F).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;for(let n of e){if(n.parentDeviceId!==null)continue;let e=this.deviceClasses[n.type];if(!e){this.ctx.logger.warn(`No device class registered for restored type — skipping`,{tags:{stableId:n.stableId},meta:{type:n.type}});continue}try{await this.ctx.kernel.devices.create(n.stableId,e,{}),t.add(n.id)}catch(e){this.ctx.logger.warn(`Failed to restore device`,{tags:{stableId:n.stableId},meta:{type:n.type,error:e instanceof Error?e.message:String(e)}})}}let n=e.filter(e=>e.parentDeviceId!==null);for(let e of n){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 Au(e,this.addonId)}};function Mu(e){return e.def}function Nu(e){return e}function Pu(e,t=`Configuration`,n=`main`){return{sections:[{id:n,title:t,fields:e.map(e=>Fu(e.key,e.schema,e.description))}]}}function Fu(e,t,n){let r=Bu(t),i=Vu(t),a={key:e,label:n??Hu(e),description:n,default:i};return r instanceof ie?Iu(e,a):r instanceof se?Lu(r,a):r instanceof oe?{...a,type:`boolean`}:r instanceof ne?zu(r,a):r instanceof ue||r instanceof le?{...a,type:`textarea`,rows:6,isJson:!0}:{...a,type:`text`}}function Iu(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 Lu(e,t){let n=Nu(e),r=n.minValue,i=n.maxValue,a=r!=null&&isFinite(r)?r:void 0,o=i!=null&&isFinite(i)?i:void 0,s=Ru(e);return{...t,type:`number`,...a===void 0?{}:{min:a},...o===void 0?{}:{max:o},...s===void 0?{}:{step:s}}}function Ru(e){let t=Mu(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 zu(e,t){let n=e.options.map(e=>String(e));return{...t,type:`select`,options:n.map(e=>({label:Hu(e),value:e}))}}function Bu(e){return e instanceof ce||e instanceof ee||e instanceof d?Bu(Mu(e).innerType):e}function Vu(e){if(e instanceof ce)return Mu(e).defaultValue}function Hu(e){return e.replace(/([A-Z])/g,` $1`).replace(/[_-]/g,` `).replace(/^\w/,e=>e.toUpperCase()).trim()}function Uu(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Wu(e,t){let n=t.split(`.`),r=e;for(let e of n){if(!Uu(r))return;r=r[e]}return r}function Gu(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=Uu(o)?o:{};return{...e,[i]:Gu(s,a,n)}}function Ku(e,t){if(!t||t.kind===`identity`)return e;if(t.kind===`enum-map`){let n=String(e);return Object.prototype.hasOwnProperty.call(t.mapping,n)?t.mapping[n]:t.fallback??null}if(t.kind===`linear`){if(typeof e!=`number`||Number.isNaN(e))return null;let n=e*t.scale+t.offset;if(t.clamp){let e=t.clamp[0],r=t.clamp[1];n=Math.min(r,Math.max(e,n))}return n}return e}function qu(e){let t=e;for(;t instanceof d||t instanceof ee||t instanceof ce;)t=t.unwrap();return t}function Ju(e){let t=qu(e);return t instanceof ne?{kind:`enum`,enumValues:t.options}:t instanceof se?{kind:`number`}:t instanceof ie?{kind:`string`}:t instanceof oe?{kind:`boolean`}:null}function Yu(e,t=``){let n=qu(e);if(!(n instanceof le))return[];let r=[],i=n.shape;for(let[e,n]of Object.entries(i)){let i=t?`${t}.${e}`:e,a=qu(n);if(a instanceof le){r.push(...Yu(a,i));continue}let o=Ju(n);o&&r.push({path:i,kind:o.kind,...o.enumValues?{enumValues:o.enumValues}:{}})}return r}function Xu(e){return Yu(e.itemSchema).filter(t=>t.path!==e.keyField).map(e=>({...e,item:!0}))}var Zu=`device.state-changed`;function Qu(e){let t=new Map,n=new Map,r=null,i=(e,t)=>`${e}:${t}`,a=()=>{r||e.live?.onEvent&&(r=e.live.onEvent.subscribe({category:Zu},{onData:e=>{let r=e.data;if(!r||typeof r.deviceId!=`number`||typeof r.capName!=`string`)return;let a=i(r.deviceId,r.capName);t.set(a,r.slice);let o=n.get(a);if(o)for(let e of o)try{e(r.slice)}catch{}}}))},o=()=>{r&&(n.size>0||(r.unsubscribe(),r=null))};return{read(e,n){return t.get(i(e,n))},async refresh(r,a){let o=await e.deviceState.getCapSlice.query({deviceId:r,capName:a}),s=i(r,a);t.set(s,o??void 0);let c=n.get(s);if(c)for(let e of c)try{e(o??void 0)}catch{}},watch(e,t,r){let s=i(e,t),c=n.get(s);return c||(c=new Set,n.set(s,c)),c.add(r),a(),()=>{c.delete(r),c.size===0&&n.delete(s),o()}},async write(t,n,r){await e.deviceState.setCapSlice.mutate({deviceId:t,capName:n,slice:r})}}}function $u(e,t,n){let r=(e,t)=>`${e}:${t}`;return{read(t,n){return e.get(t)?.get(n)},async refresh(){},watch(e,n,i){let a=r(e,n),o=t.get(a);return o||(o=new Set,t.set(a,o)),o.add(i),()=>{o.delete(i),o.size===0&&t.delete(a)}},async write(e,t,r){if(!n)throw Error(`createMirrorSource: write requires an api reference — pass it as the third argument when constructing the source`);await n.deviceState.setCapSlice.mutate({deviceId:e,capName:t,slice:r})}}}function Z(e,t,n){let r=ed(e)?e:Qu(e);return{get value(){return r.read(t,n)},refresh(){return r.refresh(t,n)},subscribe(e){let i=r.watch(t,n,t=>{try{e(t)}catch{}});try{e(r.read(t,n))}catch{}return r.read(t,n)===void 0&&r.refresh(t,n).catch(()=>void 0),i},async set(e){await r.write(t,n,e)},async patch(e){let i={...r.read(t,n),...e};await r.write(t,n,i)}}}function ed(e){return typeof e.read==`function`&&typeof e.watch==`function`}function td(e,t,n){let r=e,i=n?.stateSource??Qu(e);function a(e,n){let r=typeof e==`object`&&e?e:{};return n===void 0?{...r,deviceId:t.deviceId}:{...r,deviceId:t.deviceId,nodeId:n}}function o(e,t,n,i,a){let o=r[e]?.[t];if(!o)throw Error(`DeviceProxy: api has no '${e}.${t}'`);let s=o;return n===`mutation`?s.mutate(i):n===`subscription`?s.subscribe(i,a):s.query(i)}function s(e,n,r,i,s,c){return o(n,r,i,a(s,t.entries.find(t=>t.capName===e)?.providerNodeId),c)}function c(e,t,n,r,i){return o(e,t,n,a(r,void 0),i)}return{deviceId:t.deviceId,binding:t,state:{airQualitySensor:Z(i,t.deviceId,`air-quality-sensor`),alarmPanel:Z(i,t.deviceId,`alarm-panel`),ambientLightSensor:Z(i,t.deviceId,`ambient-light-sensor`),audioMetrics:Z(i,t.deviceId,`audio-metrics`),automationControl:Z(i,t.deviceId,`automation-control`),battery:Z(i,t.deviceId,`battery`),binary:Z(i,t.deviceId,`binary`),brightness:Z(i,t.deviceId,`brightness`),cameraStreams:Z(i,t.deviceId,`camera-streams`),carbonMonoxide:Z(i,t.deviceId,`carbon-monoxide`),climateControl:Z(i,t.deviceId,`climate-control`),color:Z(i,t.deviceId,`color`),connectivity:Z(i,t.deviceId,`connectivity`),consumables:Z(i,t.deviceId,`consumables`),contact:Z(i,t.deviceId,`contact`),control:Z(i,t.deviceId,`control`),cover:Z(i,t.deviceId,`cover`),dayNight:Z(i,t.deviceId,`day-night`),deviceDiscovery:Z(i,t.deviceId,`device-discovery`),deviceStatus:Z(i,t.deviceId,`device-status`),doorbell:Z(i,t.deviceId,`doorbell`),enumSensor:Z(i,t.deviceId,`enum-sensor`),eventEmitter:Z(i,t.deviceId,`event-emitter`),fanControl:Z(i,t.deviceId,`fan-control`),featureProbe:Z(i,t.deviceId,`feature-probe`),flood:Z(i,t.deviceId,`flood`),gas:Z(i,t.deviceId,`gas`),humidifier:Z(i,t.deviceId,`humidifier`),humiditySensor:Z(i,t.deviceId,`humidity-sensor`),image:Z(i,t.deviceId,`image`),imageSettings:Z(i,t.deviceId,`image-settings`),lawnMowerControl:Z(i,t.deviceId,`lawn-mower-control`),lockControl:Z(i,t.deviceId,`lock-control`),mediaPlayer:Z(i,t.deviceId,`media-player`),motion:Z(i,t.deviceId,`motion`),motionTrigger:Z(i,t.deviceId,`motion-trigger`),motionZones:Z(i,t.deviceId,`motion-zones`),nativeObjectDetection:Z(i,t.deviceId,`native-object-detection`),notifier:Z(i,t.deviceId,`notifier`),numericSensor:Z(i,t.deviceId,`numeric-sensor`),petFeeder:Z(i,t.deviceId,`pet-feeder`),powerMeter:Z(i,t.deviceId,`power-meter`),presence:Z(i,t.deviceId,`presence`),pressureSensor:Z(i,t.deviceId,`pressure-sensor`),privacyMask:Z(i,t.deviceId,`privacy-mask`),ptzAutotrack:Z(i,t.deviceId,`ptz-autotrack`),scriptRunner:Z(i,t.deviceId,`script-runner`),smoke:Z(i,t.deviceId,`smoke`),streamParams:Z(i,t.deviceId,`stream-params`),switch:Z(i,t.deviceId,`switch`),tamper:Z(i,t.deviceId,`tamper`),temperatureSensor:Z(i,t.deviceId,`temperature-sensor`),update:Z(i,t.deviceId,`update`),vacuumControl:Z(i,t.deviceId,`vacuum-control`),valve:Z(i,t.deviceId,`valve`),vibration:Z(i,t.deviceId,`vibration`),waterHeater:Z(i,t.deviceId,`water-heater`),weather:Z(i,t.deviceId,`weather`),zoneAnalytics:Z(i,t.deviceId,`zone-analytics`),zoneRules:Z(i,t.deviceId,`zone-rules`),zones:Z(i,t.deviceId,`zones`)},accessories:{setChildHidden:e=>s(`accessories`,`accessories`,`setChildHidden`,`mutation`,e),getStatus:e=>s(`accessories`,`accessories`,`getStatus`,`query`,e)},airQualitySensor:{getStatus:e=>s(`air-quality-sensor`,`airQualitySensor`,`getStatus`,`query`,e)},alarmPanel:{arm:e=>s(`alarm-panel`,`alarmPanel`,`arm`,`mutation`,e),disarm:e=>s(`alarm-panel`,`alarmPanel`,`disarm`,`mutation`,e),trigger:e=>s(`alarm-panel`,`alarmPanel`,`trigger`,`mutation`,e),getStatus:e=>s(`alarm-panel`,`alarmPanel`,`getStatus`,`query`,e)},ambientLightSensor:{getStatus:e=>s(`ambient-light-sensor`,`ambientLightSensor`,`getStatus`,`query`,e)},audioAnalysis:{resolveDeviceSettings:e=>s(`audio-analysis`,`audioAnalysis`,`resolveDeviceSettings`,`query`,e),getDeviceSettingsContribution:e=>s(`audio-analysis`,`audioAnalysis`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`audio-analysis`,`audioAnalysis`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`audio-analysis`,`audioAnalysis`,`applyDeviceSettingsPatch`,`mutation`,e)},audioMetrics:{getCurrentSnapshot:e=>s(`audio-metrics`,`audioMetrics`,`getCurrentSnapshot`,`query`,e),getHistory:e=>s(`audio-metrics`,`audioMetrics`,`getHistory`,`query`,e)},automationControl:{enable:e=>s(`automation-control`,`automationControl`,`enable`,`mutation`,e),disable:e=>s(`automation-control`,`automationControl`,`disable`,`mutation`,e),trigger:e=>s(`automation-control`,`automationControl`,`trigger`,`mutation`,e),getStatus:e=>s(`automation-control`,`automationControl`,`getStatus`,`query`,e)},battery:{wakeForStream:e=>s(`battery`,`battery`,`wakeForStream`,`mutation`,e),getStatus:e=>s(`battery`,`battery`,`getStatus`,`query`,e)},binary:{getStatus:e=>s(`binary`,`binary`,`getStatus`,`query`,e)},brightness:{setBrightness:e=>s(`brightness`,`brightness`,`setBrightness`,`mutation`,e),getStatus:e=>s(`brightness`,`brightness`,`getStatus`,`query`,e)},button:{press:e=>s(`button`,`button`,`press`,`mutation`,e)},cameraCredentials:{getCredentials:e=>s(`camera-credentials`,`cameraCredentials`,`getCredentials`,`query`,e),getStatus:e=>s(`camera-credentials`,`cameraCredentials`,`getStatus`,`query`,e)},cameraStreams:{getCameraStreams:e=>s(`camera-streams`,`cameraStreams`,`getCameraStreams`,`query`,e),getBrokerStreams:e=>s(`camera-streams`,`cameraStreams`,`getBrokerStreams`,`query`,e),getRtspEntries:e=>s(`camera-streams`,`cameraStreams`,`getRtspEntries`,`query`,e),getProfileRtspEntries:e=>s(`camera-streams`,`cameraStreams`,`getProfileRtspEntries`,`query`,e),pickStream:e=>s(`camera-streams`,`cameraStreams`,`pickStream`,`query`,e)},carbonMonoxide:{getStatus:e=>s(`carbon-monoxide`,`carbonMonoxide`,`getStatus`,`query`,e)},climateControl:{setMode:e=>s(`climate-control`,`climateControl`,`setMode`,`mutation`,e),setFanMode:e=>s(`climate-control`,`climateControl`,`setFanMode`,`mutation`,e),setPreset:e=>s(`climate-control`,`climateControl`,`setPreset`,`mutation`,e),setTarget:e=>s(`climate-control`,`climateControl`,`setTarget`,`mutation`,e),setTargetRange:e=>s(`climate-control`,`climateControl`,`setTargetRange`,`mutation`,e),setTargetHumidity:e=>s(`climate-control`,`climateControl`,`setTargetHumidity`,`mutation`,e),setSwingVertical:e=>s(`climate-control`,`climateControl`,`setSwingVertical`,`mutation`,e),setSwingHorizontal:e=>s(`climate-control`,`climateControl`,`setSwingHorizontal`,`mutation`,e),getStatus:e=>s(`climate-control`,`climateControl`,`getStatus`,`query`,e)},color:{setColor:e=>s(`color`,`color`,`setColor`,`mutation`,e),getStatus:e=>s(`color`,`color`,`getStatus`,`query`,e)},connectivity:{getStatus:e=>s(`connectivity`,`connectivity`,`getStatus`,`query`,e)},consumables:{reset:e=>s(`consumables`,`consumables`,`reset`,`mutation`,e),getStatus:e=>s(`consumables`,`consumables`,`getStatus`,`query`,e)},contact:{getStatus:e=>s(`contact`,`contact`,`getStatus`,`query`,e)},control:{setValue:e=>s(`control`,`control`,`setValue`,`mutation`,e),getStatus:e=>s(`control`,`control`,`getStatus`,`query`,e)},cover:{open:e=>s(`cover`,`cover`,`open`,`mutation`,e),close:e=>s(`cover`,`cover`,`close`,`mutation`,e),stop:e=>s(`cover`,`cover`,`stop`,`mutation`,e),setPosition:e=>s(`cover`,`cover`,`setPosition`,`mutation`,e),setTiltPosition:e=>s(`cover`,`cover`,`setTiltPosition`,`mutation`,e),getStatus:e=>s(`cover`,`cover`,`getStatus`,`query`,e)},dayNight:{getOptions:e=>s(`day-night`,`dayNight`,`getOptions`,`query`,e),setSettings:e=>s(`day-night`,`dayNight`,`setSettings`,`mutation`,e),getStatus:e=>s(`day-night`,`dayNight`,`getStatus`,`query`,e)},detectionPipeline:{getDeviceSettingsContribution:e=>s(`detection-pipeline`,`detectionPipeline`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`detection-pipeline`,`detectionPipeline`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`detection-pipeline`,`detectionPipeline`,`applyDeviceSettingsPatch`,`mutation`,e)},deviceDiscovery:{listDiscovered:e=>s(`device-discovery`,`deviceDiscovery`,`listDiscovered`,`query`,e),refreshDiscovery:e=>s(`device-discovery`,`deviceDiscovery`,`refreshDiscovery`,`mutation`,e),adoptDevice:e=>s(`device-discovery`,`deviceDiscovery`,`adoptDevice`,`mutation`,e),releaseDevice:e=>s(`device-discovery`,`deviceDiscovery`,`releaseDevice`,`mutation`,e),getStatus:e=>s(`device-discovery`,`deviceDiscovery`,`getStatus`,`query`,e)},deviceOps:{getStreamSources:e=>s(`device-ops`,`deviceOps`,`getStreamSources`,`query`,e),getConfigEntries:e=>s(`device-ops`,`deviceOps`,`getConfigEntries`,`query`,e),setConfig:e=>s(`device-ops`,`deviceOps`,`setConfig`,`mutation`,e),runAction:e=>s(`device-ops`,`deviceOps`,`runAction`,`mutation`,e),removeDevice:e=>s(`device-ops`,`deviceOps`,`removeDevice`,`mutation`,e),getSettingsSchema:e=>s(`device-ops`,`deviceOps`,`getSettingsSchema`,`query`,e),getRawState:e=>s(`device-ops`,`deviceOps`,`getRawState`,`query`,e)},deviceStatus:{getStatus:e=>s(`device-status`,`deviceStatus`,`getStatus`,`query`,e)},doorbell:{getStatus:e=>s(`doorbell`,`doorbell`,`getStatus`,`query`,e)},enumSensor:{getStatus:e=>s(`enum-sensor`,`enumSensor`,`getStatus`,`query`,e)},eventEmitter:{getStatus:e=>s(`event-emitter`,`eventEmitter`,`getStatus`,`query`,e)},events:{getEvents:e=>s(`events`,`events`,`getEvents`,`query`,e),getEventThumbnail:e=>s(`events`,`events`,`getEventThumbnail`,`query`,e),getEventClipUrl:e=>s(`events`,`events`,`getEventClipUrl`,`query`,e)},fanControl:{setPercentage:e=>s(`fan-control`,`fanControl`,`setPercentage`,`mutation`,e),setPreset:e=>s(`fan-control`,`fanControl`,`setPreset`,`mutation`,e),setDirection:e=>s(`fan-control`,`fanControl`,`setDirection`,`mutation`,e),setOscillating:e=>s(`fan-control`,`fanControl`,`setOscillating`,`mutation`,e),getStatus:e=>s(`fan-control`,`fanControl`,`getStatus`,`query`,e)},featureProbe:{getStatus:e=>s(`feature-probe`,`featureProbe`,`getStatus`,`query`,e)},flood:{getStatus:e=>s(`flood`,`flood`,`getStatus`,`query`,e)},gas:{getStatus:e=>s(`gas`,`gas`,`getStatus`,`query`,e)},humidifier:{setOn:e=>s(`humidifier`,`humidifier`,`setOn`,`mutation`,e),setTargetHumidity:e=>s(`humidifier`,`humidifier`,`setTargetHumidity`,`mutation`,e),setMode:e=>s(`humidifier`,`humidifier`,`setMode`,`mutation`,e),getStatus:e=>s(`humidifier`,`humidifier`,`getStatus`,`query`,e)},humiditySensor:{getStatus:e=>s(`humidity-sensor`,`humiditySensor`,`getStatus`,`query`,e)},image:{getStatus:e=>s(`image`,`image`,`getStatus`,`query`,e)},imageSettings:{getOptions:e=>s(`image-settings`,`imageSettings`,`getOptions`,`query`,e),setSettings:e=>s(`image-settings`,`imageSettings`,`setSettings`,`mutation`,e),getStatus:e=>s(`image-settings`,`imageSettings`,`getStatus`,`query`,e)},intercom:{startSession:e=>s(`intercom`,`intercom`,`startSession`,`mutation`,e),handleAnswer:e=>s(`intercom`,`intercom`,`handleAnswer`,`mutation`,e),stopSession:e=>s(`intercom`,`intercom`,`stopSession`,`mutation`,e),startTalkSession:e=>s(`intercom`,`intercom`,`startTalkSession`,`mutation`,e),pushTalkAudio:e=>s(`intercom`,`intercom`,`pushTalkAudio`,`mutation`,e),endTalkSession:e=>s(`intercom`,`intercom`,`endTalkSession`,`mutation`,e),getStatus:e=>s(`intercom`,`intercom`,`getStatus`,`query`,e)},lawnMowerControl:{startMowing:e=>s(`lawn-mower-control`,`lawnMowerControl`,`startMowing`,`mutation`,e),pause:e=>s(`lawn-mower-control`,`lawnMowerControl`,`pause`,`mutation`,e),dock:e=>s(`lawn-mower-control`,`lawnMowerControl`,`dock`,`mutation`,e),getStatus:e=>s(`lawn-mower-control`,`lawnMowerControl`,`getStatus`,`query`,e)},lockControl:{lock:e=>s(`lock-control`,`lockControl`,`lock`,`mutation`,e),unlock:e=>s(`lock-control`,`lockControl`,`unlock`,`mutation`,e),open:e=>s(`lock-control`,`lockControl`,`open`,`mutation`,e),getStatus:e=>s(`lock-control`,`lockControl`,`getStatus`,`query`,e)},mediaPlayer:{play:e=>s(`media-player`,`mediaPlayer`,`play`,`mutation`,e),pause:e=>s(`media-player`,`mediaPlayer`,`pause`,`mutation`,e),stop:e=>s(`media-player`,`mediaPlayer`,`stop`,`mutation`,e),next:e=>s(`media-player`,`mediaPlayer`,`next`,`mutation`,e),previous:e=>s(`media-player`,`mediaPlayer`,`previous`,`mutation`,e),seek:e=>s(`media-player`,`mediaPlayer`,`seek`,`mutation`,e),setVolume:e=>s(`media-player`,`mediaPlayer`,`setVolume`,`mutation`,e),setMute:e=>s(`media-player`,`mediaPlayer`,`setMute`,`mutation`,e),setShuffle:e=>s(`media-player`,`mediaPlayer`,`setShuffle`,`mutation`,e),setRepeat:e=>s(`media-player`,`mediaPlayer`,`setRepeat`,`mutation`,e),selectSource:e=>s(`media-player`,`mediaPlayer`,`selectSource`,`mutation`,e),playMedia:e=>s(`media-player`,`mediaPlayer`,`playMedia`,`mutation`,e),getStatus:e=>s(`media-player`,`mediaPlayer`,`getStatus`,`query`,e)},motion:{isDetected:e=>s(`motion`,`motion`,`isDetected`,`query`,e),getStatus:e=>s(`motion`,`motion`,`getStatus`,`query`,e)},motionDetection:{analyze:e=>s(`motion-detection`,`motionDetection`,`analyze`,`mutation`,e),removeCamera:e=>s(`motion-detection`,`motionDetection`,`removeCamera`,`mutation`,e),reset:e=>s(`motion-detection`,`motionDetection`,`reset`,`mutation`,e),getDeviceSettingsContribution:e=>s(`motion-detection`,`motionDetection`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`motion-detection`,`motionDetection`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`motion-detection`,`motionDetection`,`applyDeviceSettingsPatch`,`mutation`,e)},motionTrigger:{setMotionTrigger:e=>s(`motion-trigger`,`motionTrigger`,`setMotionTrigger`,`mutation`,e),getStatus:e=>s(`motion-trigger`,`motionTrigger`,`getStatus`,`query`,e)},motionZones:{getOptions:e=>s(`motion-zones`,`motionZones`,`getOptions`,`query`,e),setZone:e=>s(`motion-zones`,`motionZones`,`setZone`,`mutation`,e),getStatus:e=>s(`motion-zones`,`motionZones`,`getStatus`,`query`,e)},nativeObjectDetection:{setEnabled:e=>s(`native-object-detection`,`nativeObjectDetection`,`setEnabled`,`mutation`,e),getStatus:e=>s(`native-object-detection`,`nativeObjectDetection`,`getStatus`,`query`,e)},notifier:{send:e=>s(`notifier`,`notifier`,`send`,`mutation`,e),cancel:e=>s(`notifier`,`notifier`,`cancel`,`mutation`,e),getStatus:e=>s(`notifier`,`notifier`,`getStatus`,`query`,e)},numericSensor:{getStatus:e=>s(`numeric-sensor`,`numericSensor`,`getStatus`,`query`,e)},osd:{setOverlay:e=>s(`osd`,`osd`,`setOverlay`,`mutation`,e),getStatus:e=>s(`osd`,`osd`,`getStatus`,`query`,e)},petFeeder:{feed:e=>s(`pet-feeder`,`petFeeder`,`feed`,`mutation`,e),cancelFeed:e=>s(`pet-feeder`,`petFeeder`,`cancelFeed`,`mutation`,e),resetDesiccant:e=>s(`pet-feeder`,`petFeeder`,`resetDesiccant`,`mutation`,e),markFoodReplenished:e=>s(`pet-feeder`,`petFeeder`,`markFoodReplenished`,`mutation`,e),callPet:e=>s(`pet-feeder`,`petFeeder`,`callPet`,`mutation`,e),playSound:e=>s(`pet-feeder`,`petFeeder`,`playSound`,`mutation`,e),setChildLock:e=>s(`pet-feeder`,`petFeeder`,`setChildLock`,`mutation`,e),setIndicatorLight:e=>s(`pet-feeder`,`petFeeder`,`setIndicatorLight`,`mutation`,e),setFeedSound:e=>s(`pet-feeder`,`petFeeder`,`setFeedSound`,`mutation`,e),setVolume:e=>s(`pet-feeder`,`petFeeder`,`setVolume`,`mutation`,e),getStatus:e=>s(`pet-feeder`,`petFeeder`,`getStatus`,`query`,e)},pipelineAnalytics:{getActiveTracks:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getActiveTracks`,`query`,e),getTrack:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getTrack`,`query`,e),listTracks:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listTracks`,`query`,e),clearTracks:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`clearTracks`,`mutation`,e),getMotionEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getMotionEvents`,`query`,e),getObjectEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getObjectEvents`,`query`,e),getAudioEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getAudioEvents`,`query`,e),getEventDensity:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getEventDensity`,`query`,e),pruneEventsBefore:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`pruneEventsBefore`,`mutation`,e),getEventMedia:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getEventMedia`,`query`,e),getTrackMedia:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getTrackMedia`,`query`,e),searchObjectEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`searchObjectEvents`,`query`,e),getDeviceSettingsContribution:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`applyDeviceSettingsPatch`,`mutation`,e)},powerMeter:{getStatus:e=>s(`power-meter`,`powerMeter`,`getStatus`,`query`,e)},presence:{getStatus:e=>s(`presence`,`presence`,`getStatus`,`query`,e)},pressureSensor:{getStatus:e=>s(`pressure-sensor`,`pressureSensor`,`getStatus`,`query`,e)},privacyMask:{getOptions:e=>s(`privacy-mask`,`privacyMask`,`getOptions`,`query`,e),setMask:e=>s(`privacy-mask`,`privacyMask`,`setMask`,`mutation`,e),getStatus:e=>s(`privacy-mask`,`privacyMask`,`getStatus`,`query`,e)},ptz:{move:e=>s(`ptz`,`ptz`,`move`,`mutation`,e),continuousMove:e=>s(`ptz`,`ptz`,`continuousMove`,`mutation`,e),stop:e=>s(`ptz`,`ptz`,`stop`,`mutation`,e),getPresets:e=>s(`ptz`,`ptz`,`getPresets`,`query`,e),goToPreset:e=>s(`ptz`,`ptz`,`goToPreset`,`mutation`,e),savePreset:e=>s(`ptz`,`ptz`,`savePreset`,`mutation`,e),deletePreset:e=>s(`ptz`,`ptz`,`deletePreset`,`mutation`,e),getOptions:e=>s(`ptz`,`ptz`,`getOptions`,`query`,e),goHome:e=>s(`ptz`,`ptz`,`goHome`,`mutation`,e),getPosition:e=>s(`ptz`,`ptz`,`getPosition`,`query`,e),setAutofocus:e=>s(`ptz`,`ptz`,`setAutofocus`,`mutation`,e),getStatus:e=>s(`ptz`,`ptz`,`getStatus`,`query`,e)},ptzAutotrack:{getStatus:e=>s(`ptz-autotrack`,`ptzAutotrack`,`getStatus`,`query`,e),setEnabled:e=>s(`ptz-autotrack`,`ptzAutotrack`,`setEnabled`,`mutation`,e),getSettings:e=>s(`ptz-autotrack`,`ptzAutotrack`,`getSettings`,`query`,e),setSettings:e=>s(`ptz-autotrack`,`ptzAutotrack`,`setSettings`,`mutation`,e)},reboot:{reboot:e=>s(`reboot`,`reboot`,`reboot`,`mutation`,e)},scriptRunner:{run:e=>s(`script-runner`,`scriptRunner`,`run`,`mutation`,e),stop:e=>s(`script-runner`,`scriptRunner`,`stop`,`mutation`,e),getStatus:e=>s(`script-runner`,`scriptRunner`,`getStatus`,`query`,e)},smoke:{getStatus:e=>s(`smoke`,`smoke`,`getStatus`,`query`,e)},snapshot:{getSnapshot:e=>s(`snapshot`,`snapshot`,`getSnapshot`,`query`,e),invalidateCache:e=>s(`snapshot`,`snapshot`,`invalidateCache`,`mutation`,e),getStatus:e=>s(`snapshot`,`snapshot`,`getStatus`,`query`,e),getDeviceSettingsContribution:e=>s(`snapshot`,`snapshot`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`snapshot`,`snapshot`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`snapshot`,`snapshot`,`applyDeviceSettingsPatch`,`mutation`,e)},streamCatalog:{getCatalog:e=>s(`stream-catalog`,`streamCatalog`,`getCatalog`,`query`,e)},streamParams:{getOptions:e=>s(`stream-params`,`streamParams`,`getOptions`,`query`,e),setProfile:e=>s(`stream-params`,`streamParams`,`setProfile`,`mutation`,e),getConfigSchema:e=>s(`stream-params`,`streamParams`,`getConfigSchema`,`query`,e),getStatus:e=>s(`stream-params`,`streamParams`,`getStatus`,`query`,e)},switch:{setState:e=>s(`switch`,`switch`,`setState`,`mutation`,e),getStatus:e=>s(`switch`,`switch`,`getStatus`,`query`,e)},tamper:{getStatus:e=>s(`tamper`,`tamper`,`getStatus`,`query`,e)},temperatureSensor:{getStatus:e=>s(`temperature-sensor`,`temperatureSensor`,`getStatus`,`query`,e)},update:{installUpdate:e=>s(`update`,`update`,`installUpdate`,`mutation`,e),getStatus:e=>s(`update`,`update`,`getStatus`,`query`,e)},vacuumControl:{start:e=>s(`vacuum-control`,`vacuumControl`,`start`,`mutation`,e),pause:e=>s(`vacuum-control`,`vacuumControl`,`pause`,`mutation`,e),stop:e=>s(`vacuum-control`,`vacuumControl`,`stop`,`mutation`,e),returnToBase:e=>s(`vacuum-control`,`vacuumControl`,`returnToBase`,`mutation`,e),locate:e=>s(`vacuum-control`,`vacuumControl`,`locate`,`mutation`,e),setFanSpeed:e=>s(`vacuum-control`,`vacuumControl`,`setFanSpeed`,`mutation`,e),getStatus:e=>s(`vacuum-control`,`vacuumControl`,`getStatus`,`query`,e)},valve:{open:e=>s(`valve`,`valve`,`open`,`mutation`,e),close:e=>s(`valve`,`valve`,`close`,`mutation`,e),stop:e=>s(`valve`,`valve`,`stop`,`mutation`,e),setPosition:e=>s(`valve`,`valve`,`setPosition`,`mutation`,e),getStatus:e=>s(`valve`,`valve`,`getStatus`,`query`,e)},vibration:{getStatus:e=>s(`vibration`,`vibration`,`getStatus`,`query`,e)},videoclips:{listClips:e=>s(`videoclips`,`videoclips`,`listClips`,`query`,e),getClipPlayback:e=>s(`videoclips`,`videoclips`,`getClipPlayback`,`query`,e)},waterHeater:{setTargetTemp:e=>s(`water-heater`,`waterHeater`,`setTargetTemp`,`mutation`,e),setOperationMode:e=>s(`water-heater`,`waterHeater`,`setOperationMode`,`mutation`,e),setAway:e=>s(`water-heater`,`waterHeater`,`setAway`,`mutation`,e),getStatus:e=>s(`water-heater`,`waterHeater`,`getStatus`,`query`,e)},weather:{getStatus:e=>s(`weather`,`weather`,`getStatus`,`query`,e)},webrtcSession:{listStreams:e=>s(`webrtc-session`,`webrtcSession`,`listStreams`,`query`,e),createSession:e=>s(`webrtc-session`,`webrtcSession`,`createSession`,`mutation`,e),handleOffer:e=>s(`webrtc-session`,`webrtcSession`,`handleOffer`,`mutation`,e),handleAnswer:e=>s(`webrtc-session`,`webrtcSession`,`handleAnswer`,`mutation`,e),addIceCandidate:e=>s(`webrtc-session`,`webrtcSession`,`addIceCandidate`,`mutation`,e),getIceCandidates:e=>s(`webrtc-session`,`webrtcSession`,`getIceCandidates`,`query`,e),closeSession:e=>s(`webrtc-session`,`webrtcSession`,`closeSession`,`mutation`,e),hasAdaptiveBitrate:e=>s(`webrtc-session`,`webrtcSession`,`hasAdaptiveBitrate`,`query`,e),getSessionState:e=>s(`webrtc-session`,`webrtcSession`,`getSessionState`,`query`,e)},zoneAnalytics:{getCurrentSnapshot:e=>s(`zone-analytics`,`zoneAnalytics`,`getCurrentSnapshot`,`query`,e),getZoneHistory:e=>s(`zone-analytics`,`zoneAnalytics`,`getZoneHistory`,`query`,e),getCameraHistory:e=>s(`zone-analytics`,`zoneAnalytics`,`getCameraHistory`,`query`,e),getUnzonedHistory:e=>s(`zone-analytics`,`zoneAnalytics`,`getUnzonedHistory`,`query`,e)},zoneRules:{listRules:e=>s(`zone-rules`,`zoneRules`,`listRules`,`query`,e),setRules:e=>s(`zone-rules`,`zoneRules`,`setRules`,`mutation`,e)},zones:{listZones:e=>s(`zones`,`zones`,`listZones`,`query`,e),addZone:e=>s(`zones`,`zones`,`addZone`,`mutation`,e),removeZone:e=>s(`zones`,`zones`,`removeZone`,`mutation`,e),updateZone:e=>s(`zones`,`zones`,`updateZone`,`mutation`,e)},addonSettings:{getDeviceSettings:e=>c(`addonSettings`,`getDeviceSettings`,`query`,e),updateDeviceSettings:e=>c(`addonSettings`,`updateDeviceSettings`,`mutation`,e)},cameraPipelineConfig:{getDeviceSettingsContribution:e=>c(`cameraPipelineConfig`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`cameraPipelineConfig`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`cameraPipelineConfig`,`applyDeviceSettingsPatch`,`mutation`,e)},deviceAdoption:{getStatus:e=>c(`deviceAdoption`,`getStatus`,`query`,e)},deviceExport:{getDeviceSettingsContribution:e=>c(`deviceExport`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`deviceExport`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`deviceExport`,`applyDeviceSettingsPatch`,`mutation`,e)},deviceManager:{loadConfig:e=>c(`deviceManager`,`loadConfig`,`query`,e),loadRuntimeState:e=>c(`deviceManager`,`loadRuntimeState`,`query`,e),loadMeta:e=>c(`deviceManager`,`loadMeta`,`query`,e),setName:e=>c(`deviceManager`,`setName`,`mutation`,e),setLocation:e=>c(`deviceManager`,`setLocation`,`mutation`,e),setType:e=>c(`deviceManager`,`setType`,`mutation`,e),setIntegrationId:e=>c(`deviceManager`,`setIntegrationId`,`mutation`,e),setLinkDeviceId:e=>c(`deviceManager`,`setLinkDeviceId`,`mutation`,e),setPrimaryChildEntityId:e=>c(`deviceManager`,`setPrimaryChildEntityId`,`mutation`,e),setChildLayout:e=>c(`deviceManager`,`setChildLayout`,`mutation`,e),setDeviceLinks:e=>c(`deviceManager`,`setDeviceLinks`,`mutation`,e),setDisplay:e=>c(`deviceManager`,`setDisplay`,`mutation`,e),getWireableFields:e=>c(`deviceManager`,`getWireableFields`,`query`,e),setRole:e=>c(`deviceManager`,`setRole`,`mutation`,e),applyInitialMeta:e=>c(`deviceManager`,`applyInitialMeta`,`mutation`,e),setMetadata:e=>c(`deviceManager`,`setMetadata`,`mutation`,e),setDisabled:e=>c(`deviceManager`,`setDisabled`,`mutation`,e),getDevice:e=>c(`deviceManager`,`getDevice`,`query`,e),getStreamSources:e=>c(`deviceManager`,`getStreamSources`,`query`,e),getConfigSchema:e=>c(`deviceManager`,`getConfigSchema`,`query`,e),getSettingsSchema:e=>c(`deviceManager`,`getSettingsSchema`,`query`,e),updateConfig:e=>c(`deviceManager`,`updateConfig`,`mutation`,e),enable:e=>c(`deviceManager`,`enable`,`mutation`,e),disable:e=>c(`deviceManager`,`disable`,`mutation`,e),remove:e=>c(`deviceManager`,`remove`,`mutation`,e),getStreamProfileMap:e=>c(`deviceManager`,`getStreamProfileMap`,`query`,e),setStreamProfileMap:e=>c(`deviceManager`,`setStreamProfileMap`,`mutation`,e),probeStreams:e=>c(`deviceManager`,`probeStreams`,`mutation`,e),getBindings:e=>c(`deviceManager`,`getBindings`,`query`,e),getAllBindings:e=>c(`deviceManager`,`getAllBindings`,`query`,e),setWrapperActive:e=>c(`deviceManager`,`setWrapperActive`,`mutation`,e),getDeviceSettingsAggregate:e=>c(`deviceManager`,`getDeviceSettingsAggregate`,`query`,e),getDeviceLiveInfoAggregate:e=>c(`deviceManager`,`getDeviceLiveInfoAggregate`,`query`,e),getDeviceAggregate:e=>c(`deviceManager`,`getDeviceAggregate`,`query`,e),runDeviceAction:e=>c(`deviceManager`,`runDeviceAction`,`mutation`,e),updateDeviceField:e=>c(`deviceManager`,`updateDeviceField`,`mutation`,e),updateDeviceFieldsBatch:e=>c(`deviceManager`,`updateDeviceFieldsBatch`,`mutation`,e),testField:e=>c(`deviceManager`,`testField`,`mutation`,e),getDeviceStatusAggregate:e=>c(`deviceManager`,`getDeviceStatusAggregate`,`query`,e)},deviceState:{getSnapshot:e=>c(`deviceState`,`getSnapshot`,`query`,e),getCapSlice:e=>c(`deviceState`,`getCapSlice`,`query`,e),setCapSlice:e=>c(`deviceState`,`setCapSlice`,`mutation`,e)},faceGallery:{getFaceByTrack:e=>c(`faceGallery`,`getFaceByTrack`,`query`,e)},networkQuality:{getDeviceStats:e=>c(`networkQuality`,`getDeviceStats`,`query`,e),reportClientStats:e=>c(`networkQuality`,`reportClientStats`,`mutation`,e)},pipelineExecutor:{runPipeline:e=>c(`pipelineExecutor`,`runPipeline`,`mutation`,e),runPipelineBatch:e=>c(`pipelineExecutor`,`runPipelineBatch`,`mutation`,e)},pipelineOrchestrator:{assignPipeline:e=>c(`pipelineOrchestrator`,`assignPipeline`,`mutation`,e),unassignPipeline:e=>c(`pipelineOrchestrator`,`unassignPipeline`,`mutation`,e),getPipelineAssignment:e=>c(`pipelineOrchestrator`,`getPipelineAssignment`,`query`,e),getCameraMetrics:e=>c(`pipelineOrchestrator`,`getCameraMetrics`,`query`,e),assignAudio:e=>c(`pipelineOrchestrator`,`assignAudio`,`mutation`,e),unassignAudio:e=>c(`pipelineOrchestrator`,`unassignAudio`,`mutation`,e),getAudioAssignment:e=>c(`pipelineOrchestrator`,`getAudioAssignment`,`query`,e),getAudioAssignments:e=>c(`pipelineOrchestrator`,`getAudioAssignments`,`query`,e),getCameraSettings:e=>c(`pipelineOrchestrator`,`getCameraSettings`,`query`,e),setCameraStepToggle:e=>c(`pipelineOrchestrator`,`setCameraStepToggle`,`mutation`,e),getCameraStepOverrides:e=>c(`pipelineOrchestrator`,`getCameraStepOverrides`,`query`,e),setCameraStepOverride:e=>c(`pipelineOrchestrator`,`setCameraStepOverride`,`mutation`,e),setCameraPipelineForAgent:e=>c(`pipelineOrchestrator`,`setCameraPipelineForAgent`,`mutation`,e),resolvePipeline:e=>c(`pipelineOrchestrator`,`resolvePipeline`,`query`,e),getCameraStatus:e=>c(`pipelineOrchestrator`,`getCameraStatus`,`query`,e),getDeviceSettingsContribution:e=>c(`pipelineOrchestrator`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`pipelineOrchestrator`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`pipelineOrchestrator`,`applyDeviceSettingsPatch`,`mutation`,e)},pipelineRunner:{detachCamera:e=>c(`pipelineRunner`,`detachCamera`,`mutation`,e),getCameraMetrics:e=>c(`pipelineRunner`,`getCameraMetrics`,`query`,e)},plateGallery:{listPlates:e=>c(`plateGallery`,`listPlates`,`query`,e),getPlateByTrack:e=>c(`plateGallery`,`getPlateByTrack`,`query`,e)},recording:{getAvailability:e=>c(`recording`,`getAvailability`,`query`,e),getDaysWithRecordings:e=>c(`recording`,`getDaysWithRecordings`,`query`,e),getPlaybackManifest:e=>c(`recording`,`getPlaybackManifest`,`query`,e),getDeviceConfig:e=>c(`recording`,`getDeviceConfig`,`query`,e),locateSegment:e=>c(`recording`,`locateSegment`,`query`,e),readSegmentBytes:e=>c(`recording`,`readSegmentBytes`,`query`,e),setDeviceConfig:e=>c(`recording`,`setDeviceConfig`,`mutation`,e),rescanStorage:e=>c(`recording`,`rescanStorage`,`mutation`,e),pruneFootage:e=>c(`recording`,`pruneFootage`,`mutation`,e),getStatus:e=>c(`recording`,`getStatus`,`query`,e),getDeviceSettingsContribution:e=>c(`recording`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`recording`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`recording`,`applyDeviceSettingsPatch`,`mutation`,e)},streamBroker:{publishCameraStream:e=>c(`streamBroker`,`publishCameraStream`,`mutation`,e),retractCameraStream:e=>c(`streamBroker`,`retractCameraStream`,`mutation`,e),assignProfile:e=>c(`streamBroker`,`assignProfile`,`mutation`,e),unassignProfile:e=>c(`streamBroker`,`unassignProfile`,`mutation`,e),restartProfile:e=>c(`streamBroker`,`restartProfile`,`mutation`,e),getDeviceSettingsContribution:e=>c(`streamBroker`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`streamBroker`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`streamBroker`,`applyDeviceSettingsPatch`,`mutation`,e)}}}function nd(e,t,n,r,i){if(n.length===0||t.length===0)return{passed:e,excluded:[]};let a=n.filter(e=>e.enabled!==!1),o=a.filter(e=>e.mode===`include`),s=a.filter(e=>e.mode===`exclude`),c=o.length>0,l=new Map(t.map(e=>[e.id,e])),u=[],d=[];for(let t of e){let e=r(t),n=i?.(t),a=o.some(t=>rd(t,e,n,l)),f=s.some(t=>rd(t,e,n,l));c?a&&!f?u.push(t):d.push(t):f?d.push(t):u.push(t)}return{passed:u,excluded:d}}function rd(e,t,n,r){if(e.classFilter&&e.classFilter.length>0&&n!==void 0&&!e.classFilter.includes(n))return!1;for(let n of e.zoneIds){let e=r.get(n);if(e&&id(t,e.polygon))return!0}return!1}function id(e,t){if(t.length<3)return!1;let n=!1,{x:r,y:i}=e;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a];o.y>i!=s.y>i&&r<(s.x-o.x)*(i-o.y)/(s.y-o.y||2**-52)+o.x&&(n=!n)}return n}function ad(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),updateFrameworkPackage:e=>n(`addons`,`updateFrameworkPackage`,`mutation`,e),getVersions:e=>n(`addons`,`getVersions`,`query`,e),restartAddon:e=>n(`addons`,`restartAddon`,`mutation`,e),retryLoad:e=>n(`addons`,`retryLoad`,`mutation`,e),getAutoUpdateSettings:e=>n(`addons`,`getAutoUpdateSettings`,`query`,e),setAutoUpdateSettings:e=>n(`addons`,`setAutoUpdateSettings`,`mutation`,e),getAddonAutoUpdate:e=>n(`addons`,`getAddonAutoUpdate`,`query`,e),setAddonAutoUpdate:e=>n(`addons`,`setAddonAutoUpdate`,`mutation`,e),applyAutoUpdateToAll:e=>n(`addons`,`applyAutoUpdateToAll`,`mutation`,e),custom:e=>n(`addons`,`custom`,`mutation`,e),startJob:e=>n(`addons`,`startJob`,`mutation`,e),getJob:e=>n(`addons`,`getJob`,`query`,e),listJobs:e=>n(`addons`,`listJobs`,`query`,e),cancelJob:e=>n(`addons`,`cancelJob`,`mutation`,e),onAddonLogs:(e,t)=>n(`addons`,`onAddonLogs`,`subscription`,e,t)},addonSettings:{getGlobalSettings:e=>n(`addonSettings`,`getGlobalSettings`,`query`,e),updateGlobalSettings:e=>n(`addonSettings`,`updateGlobalSettings`,`mutation`,e)},addonWidgets:{listWidgets:e=>n(`addonWidgets`,`listWidgets`,`query`,e)},alerts:{emit:e=>n(`alerts`,`emit`,`mutation`,e),update:e=>n(`alerts`,`update`,`mutation`,e),list:e=>n(`alerts`,`list`,`query`,e),getUnreadCount:e=>n(`alerts`,`getUnreadCount`,`query`,e),markRead:e=>n(`alerts`,`markRead`,`mutation`,e),markAllRead:e=>n(`alerts`,`markAllRead`,`mutation`,e),dismiss:e=>n(`alerts`,`dismiss`,`mutation`,e)},audioAnalyzer:{analyseChunk:e=>n(`audioAnalyzer`,`analyseChunk`,`mutation`,e),classify:e=>n(`audioAnalyzer`,`classify`,`query`,e),isReady:e=>n(`audioAnalyzer`,`isReady`,`query`,e),dispose:e=>n(`audioAnalyzer`,`dispose`,`mutation`,e),reprobeAudioEngine:e=>n(`audioAnalyzer`,`reprobeAudioEngine`,`mutation`,e)},audioCodec:{listSupportedCodecs:e=>n(`audioCodec`,`listSupportedCodecs`,`query`,e),canHandle:e=>n(`audioCodec`,`canHandle`,`query`,e),createDecodeSession:e=>n(`audioCodec`,`createDecodeSession`,`mutation`,e),createEncodeSession:e=>n(`audioCodec`,`createEncodeSession`,`mutation`,e),closeSession:e=>n(`audioCodec`,`closeSession`,`mutation`,e),pushEncodedFrame:e=>n(`audioCodec`,`pushEncodedFrame`,`mutation`,e),pullPcm:e=>n(`audioCodec`,`pullPcm`,`query`,e),pushPcm:e=>n(`audioCodec`,`pushPcm`,`mutation`,e),pullEncoded:e=>n(`audioCodec`,`pullEncoded`,`query`,e),flushEncode:e=>n(`audioCodec`,`flushEncode`,`mutation`,e),listActiveSessions:e=>n(`audioCodec`,`listActiveSessions`,`query`,e)},backup:{listDestinations:e=>n(`backup`,`listDestinations`,`query`,e),trigger:e=>n(`backup`,`trigger`,`mutation`,e),list:e=>n(`backup`,`list`,`query`,e),listLocations:e=>n(`backup`,`listLocations`,`query`,e),getEntries:e=>n(`backup`,`getEntries`,`query`,e),restore:e=>n(`backup`,`restore`,`mutation`,e),delete:e=>n(`backup`,`delete`,`mutation`,e),listArchives:e=>n(`backup`,`listArchives`,`query`,e),upsertDestinationPolicy:e=>n(`backup`,`upsertDestinationPolicy`,`mutation`,e),previewSchedule:e=>n(`backup`,`previewSchedule`,`query`,e)},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)},decoder:{supportsCodec:e=>n(`decoder`,`supportsCodec`,`query`,e),getInfo:e=>n(`decoder`,`getInfo`,`query`,e),createSession:e=>n(`decoder`,`createSession`,`query`,e),destroySession:e=>n(`decoder`,`destroySession`,`query`,e),pushPacket:e=>n(`decoder`,`pushPacket`,`query`,e),openStream:e=>n(`decoder`,`openStream`,`query`,e),pullFrames:e=>n(`decoder`,`pullFrames`,`query`,e),pullHandles:e=>n(`decoder`,`pullHandles`,`query`,e),getFrame:e=>n(`decoder`,`getFrame`,`query`,e),getShmStats:e=>n(`decoder`,`getShmStats`,`query`,e),updateConfig:e=>n(`decoder`,`updateConfig`,`query`,e),getStats:e=>n(`decoder`,`getStats`,`query`,e),listActiveSessions:e=>n(`decoder`,`listActiveSessions`,`query`,e),reprobeHwaccel:e=>n(`decoder`,`reprobeHwaccel`,`mutation`,e)},deviceAdoption:{listCandidateFilters:e=>n(`deviceAdoption`,`listCandidateFilters`,`query`,e),listCandidates:e=>n(`deviceAdoption`,`listCandidates`,`query`,e),getCandidate:e=>n(`deviceAdoption`,`getCandidate`,`query`,e),refresh:e=>n(`deviceAdoption`,`refresh`,`mutation`,e),adopt:e=>n(`deviceAdoption`,`adopt`,`mutation`,e),release:e=>n(`deviceAdoption`,`release`,`mutation`,e),resync:e=>n(`deviceAdoption`,`resync`,`mutation`,e)},deviceExport:{getStatus:e=>n(`deviceExport`,`getStatus`,`query`,e),listSupportedDeviceKinds:e=>n(`deviceExport`,`listSupportedDeviceKinds`,`query`,e),listExposedDevices:e=>n(`deviceExport`,`listExposedDevices`,`query`,e),exposeDevice:e=>n(`deviceExport`,`exposeDevice`,`mutation`,e),unexposeDevice:e=>n(`deviceExport`,`unexposeDevice`,`mutation`,e)},deviceManager:{allocateDeviceId:e=>n(`deviceManager`,`allocateDeviceId`,`mutation`,e),registerDevice:e=>n(`deviceManager`,`registerDevice`,`mutation`,e),removeDevice:e=>n(`deviceManager`,`removeDevice`,`mutation`,e),persistConfig:e=>n(`deviceManager`,`persistConfig`,`mutation`,e),getRoleDisplayDefaults:e=>n(`deviceManager`,`getRoleDisplayDefaults`,`query`,e),setRoleDisplayDefaults:e=>n(`deviceManager`,`setRoleDisplayDefaults`,`mutation`,e),listLocations:e=>n(`deviceManager`,`listLocations`,`query`,e),addLocation:e=>n(`deviceManager`,`addLocation`,`mutation`,e),removeLocation:e=>n(`deviceManager`,`removeLocation`,`mutation`,e),listPersistedByAddon:e=>n(`deviceManager`,`listPersistedByAddon`,`query`,e),listAll:e=>n(`deviceManager`,`listAll`,`query`,e),getChildren:e=>n(`deviceManager`,`getChildren`,`query`,e),removeByIntegration:e=>n(`deviceManager`,`removeByIntegration`,`mutation`,e),listWrappersForCap:e=>n(`deviceManager`,`listWrappersForCap`,`query`,e),listBindableCapsForDeviceType:e=>n(`deviceManager`,`listBindableCapsForDeviceType`,`query`,e),discoverDevices:e=>n(`deviceManager`,`discoverDevices`,`mutation`,e),adoptDevice:e=>n(`deviceManager`,`adoptDevice`,`mutation`,e),getCreationSchema:e=>n(`deviceManager`,`getCreationSchema`,`query`,e),createDevice:e=>n(`deviceManager`,`createDevice`,`mutation`,e),testCreationField:e=>n(`deviceManager`,`testCreationField`,`mutation`,e),adoptionListCandidateFilters:e=>n(`deviceManager`,`adoptionListCandidateFilters`,`query`,e),adoptionListCandidates:e=>n(`deviceManager`,`adoptionListCandidates`,`query`,e),adoptionRefresh:e=>n(`deviceManager`,`adoptionRefresh`,`mutation`,e),adoptionAdopt:e=>n(`deviceManager`,`adoptionAdopt`,`mutation`,e),adoptionRelease:e=>n(`deviceManager`,`adoptionRelease`,`mutation`,e),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)},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),listRecentFaces:e=>n(`faceGallery`,`listRecentFaces`,`query`,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)},localNetwork:{list:e=>n(`localNetwork`,`list`,`query`,e),getPreferred:e=>n(`localNetwork`,`getPreferred`,`query`,e),getConnectionEndpoints:e=>n(`localNetwork`,`getConnectionEndpoints`,`query`,e),getAllowedAddresses:e=>n(`localNetwork`,`getAllowedAddresses`,`query`,e),setAllowedAddresses:e=>n(`localNetwork`,`setAllowedAddresses`,`mutation`,e),resetAllowlistToBestMatch:e=>n(`localNetwork`,`resetAllowlistToBestMatch`,`mutation`,e)},meshNetwork:{getStatus:e=>n(`meshNetwork`,`getStatus`,`query`,e),join:e=>n(`meshNetwork`,`join`,`mutation`,e),startLogin:e=>n(`meshNetwork`,`startLogin`,`mutation`,e),leave:e=>n(`meshNetwork`,`leave`,`mutation`,e),logout:e=>n(`meshNetwork`,`logout`,`mutation`,e),listPeers:e=>n(`meshNetwork`,`listPeers`,`query`,e),testConnection:e=>n(`meshNetwork`,`testConnection`,`mutation`,e)},metricsProvider:{collectSnapshot:e=>n(`metricsProvider`,`collectSnapshot`,`query`,e),getCached:e=>n(`metricsProvider`,`getCached`,`query`,e),getCurrent:e=>n(`metricsProvider`,`getCurrent`,`query`,e),getDiskSpace:e=>n(`metricsProvider`,`getDiskSpace`,`query`,e),getGpuInfo:e=>n(`metricsProvider`,`getGpuInfo`,`query`,e),getCpuTemperature:e=>n(`metricsProvider`,`getCpuTemperature`,`query`,e),getProcessStats:e=>n(`metricsProvider`,`getProcessStats`,`query`,e),listAddonInstances:e=>n(`metricsProvider`,`listAddonInstances`,`query`,e),getAddonStats:e=>n(`metricsProvider`,`getAddonStats`,`query`,e),listNodeProcesses:e=>n(`metricsProvider`,`listNodeProcesses`,`query`,e),killProcess:e=>n(`metricsProvider`,`killProcess`,`mutation`,e),dumpHeapSnapshot:e=>n(`metricsProvider`,`dumpHeapSnapshot`,`mutation`,e)},mqttBroker:{listBrokers:e=>n(`mqttBroker`,`listBrokers`,`query`,e),getBrokerConfig:e=>n(`mqttBroker`,`getBrokerConfig`,`query`,e),addBroker:e=>n(`mqttBroker`,`addBroker`,`mutation`,e),removeBroker:e=>n(`mqttBroker`,`removeBroker`,`mutation`,e),testConnection:e=>n(`mqttBroker`,`testConnection`,`mutation`,e),startEmbeddedBroker:e=>n(`mqttBroker`,`startEmbeddedBroker`,`mutation`,e),stopEmbeddedBroker:e=>n(`mqttBroker`,`stopEmbeddedBroker`,`mutation`,e),getStatus:e=>n(`mqttBroker`,`getStatus`,`query`,e)},networkAccess:{start:e=>n(`networkAccess`,`start`,`mutation`,e),stop:e=>n(`networkAccess`,`stop`,`mutation`,e),getEndpoint:e=>n(`networkAccess`,`getEndpoint`,`query`,e),getStatus:e=>n(`networkAccess`,`getStatus`,`query`,e),listEndpoints:e=>n(`networkAccess`,`listEndpoints`,`query`,e)},networkQuality:{getAllStats:e=>n(`networkQuality`,`getAllStats`,`query`,e)},nodes:{topology:e=>n(`nodes`,`topology`,`query`,e),deployAddon:e=>n(`nodes`,`deployAddon`,`mutation`,e),undeployAddon:e=>n(`nodes`,`undeployAddon`,`mutation`,e),restartAddon:e=>n(`nodes`,`restartAddon`,`mutation`,e),restartProcess:e=>n(`nodes`,`restartProcess`,`mutation`,e),restartNode:e=>n(`nodes`,`restartNode`,`mutation`,e),shutdownNode:e=>n(`nodes`,`shutdownNode`,`mutation`,e),renameNode:e=>n(`nodes`,`renameNode`,`mutation`,e),clusterAddonStatus:e=>n(`nodes`,`clusterAddonStatus`,`query`,e),getCapUsageGraph:e=>n(`nodes`,`getCapUsageGraph`,`query`,e),getNodeAddons:e=>n(`nodes`,`getNodeAddons`,`query`,e),setProcessLogLevel:e=>n(`nodes`,`setProcessLogLevel`,`mutation`,e),executeQuery:e=>n(`nodes`,`executeQuery`,`mutation`,e)},notificationOutput:{listTargetKinds:e=>n(`notificationOutput`,`listTargetKinds`,`query`,e),listTargets:e=>n(`notificationOutput`,`listTargets`,`query`,e),discoverTargets:e=>n(`notificationOutput`,`discoverTargets`,`query`,e),send:e=>n(`notificationOutput`,`send`,`mutation`,e),testTarget:e=>n(`notificationOutput`,`testTarget`,`mutation`,e),upsertTarget:e=>n(`notificationOutput`,`upsertTarget`,`mutation`,e),deleteTarget:e=>n(`notificationOutput`,`deleteTarget`,`mutation`,e),setTargetEnabled:e=>n(`notificationOutput`,`setTargetEnabled`,`mutation`,e)},pipelineExecutor:{getAvailableEngines:e=>n(`pipelineExecutor`,`getAvailableEngines`,`query`,e),getSelectedEngine:e=>n(`pipelineExecutor`,`getSelectedEngine`,`query`,e),getDefaultSteps:e=>n(`pipelineExecutor`,`getDefaultSteps`,`query`,e),reprobeEngine:e=>n(`pipelineExecutor`,`reprobeEngine`,`mutation`,e),getEngineProvisioning:e=>n(`pipelineExecutor`,`getEngineProvisioning`,`query`,e),getVideoPipelineSteps:e=>n(`pipelineExecutor`,`getVideoPipelineSteps`,`query`,e),setVideoPipelineSteps:e=>n(`pipelineExecutor`,`setVideoPipelineSteps`,`mutation`,e),clearDeviceOverrides:e=>n(`pipelineExecutor`,`clearDeviceOverrides`,`mutation`,e),getSchema:e=>n(`pipelineExecutor`,`getSchema`,`query`,e),getGlobalSteps:e=>n(`pipelineExecutor`,`getGlobalSteps`,`query`,e),getGlobalPipelineConfig:e=>n(`pipelineExecutor`,`getGlobalPipelineConfig`,`query`,e),getOrchestratorConfigSchema:e=>n(`pipelineExecutor`,`getOrchestratorConfigSchema`,`query`,e),validatePipeline:e=>n(`pipelineExecutor`,`validatePipeline`,`query`,e),listTemplates:e=>n(`pipelineExecutor`,`listTemplates`,`query`,e),saveTemplate:e=>n(`pipelineExecutor`,`saveTemplate`,`mutation`,e),updateTemplate:e=>n(`pipelineExecutor`,`updateTemplate`,`mutation`,e),deleteTemplate:e=>n(`pipelineExecutor`,`deleteTemplate`,`mutation`,e),getCapabilities:e=>n(`pipelineExecutor`,`getCapabilities`,`query`,e),getAddonModels:e=>n(`pipelineExecutor`,`getAddonModels`,`query`,e),downloadModel:e=>n(`pipelineExecutor`,`downloadModel`,`mutation`,e),deleteModel:e=>n(`pipelineExecutor`,`deleteModel`,`mutation`,e),cacheFrameInPool:e=>n(`pipelineExecutor`,`cacheFrameInPool`,`mutation`,e),inferCached:e=>n(`pipelineExecutor`,`inferCached`,`mutation`,e),uncacheFrame:e=>n(`pipelineExecutor`,`uncacheFrame`,`mutation`,e),getEffectiveTuning:e=>n(`pipelineExecutor`,`getEffectiveTuning`,`query`,e),listLoadedEngines:e=>n(`pipelineExecutor`,`listLoadedEngines`,`query`,e),spinEngine:e=>n(`pipelineExecutor`,`spinEngine`,`mutation`,e),killEngine:e=>n(`pipelineExecutor`,`killEngine`,`mutation`,e),listReferenceImages:e=>n(`pipelineExecutor`,`listReferenceImages`,`query`,e),getReferenceImage:e=>n(`pipelineExecutor`,`getReferenceImage`,`query`,e),getReferenceAudioFiles:e=>n(`pipelineExecutor`,`getReferenceAudioFiles`,`query`,e),getReferenceAudio:e=>n(`pipelineExecutor`,`getReferenceAudio`,`query`,e),getAudioCapabilities:e=>n(`pipelineExecutor`,`getAudioCapabilities`,`query`,e),runAudioTest:e=>n(`pipelineExecutor`,`runAudioTest`,`mutation`,e),getDetectionConfigSchema:e=>n(`pipelineExecutor`,`getDetectionConfigSchema`,`query`,e)},pipelineOrchestrator:{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),setAgentAddonDefaults:e=>n(`pipelineOrchestrator`,`setAgentAddonDefaults`,`mutation`,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),resetNodePipelineDefaults:e=>n(`pipelineOrchestrator`,`resetNodePipelineDefaults`,`mutation`,e),getCameraStatuses:e=>n(`pipelineOrchestrator`,`getCameraStatuses`,`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)},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)},recording:{getStorageUsage:e=>n(`recording`,`getStorageUsage`,`query`,e)},serverManagement:{getServerPackageStatus:e=>n(`serverManagement`,`getServerPackageStatus`,`query`,e),checkServerUpdate:e=>n(`serverManagement`,`checkServerUpdate`,`mutation`,e),applyServerUpdate:e=>n(`serverManagement`,`applyServerUpdate`,`mutation`,e),rollbackServerUpdate:e=>n(`serverManagement`,`rollbackServerUpdate`,`mutation`,e),restartServer:e=>n(`serverManagement`,`restartServer`,`mutation`,e)},settingsStore:{get:e=>n(`settingsStore`,`get`,`query`,e),set:e=>n(`settingsStore`,`set`,`mutation`,e),query:e=>n(`settingsStore`,`query`,`query`,e),insert:e=>n(`settingsStore`,`insert`,`mutation`,e),update:e=>n(`settingsStore`,`update`,`mutation`,e),delete:e=>n(`settingsStore`,`delete`,`mutation`,e),count:e=>n(`settingsStore`,`count`,`query`,e),histogram:e=>n(`settingsStore`,`histogram`,`query`,e),isEmpty:e=>n(`settingsStore`,`isEmpty`,`query`,e),declareCollection:e=>n(`settingsStore`,`declareCollection`,`mutation`,e)},storage:{resolve:e=>n(`storage`,`resolve`,`query`,e),write:e=>n(`storage`,`write`,`mutation`,e),read:e=>n(`storage`,`read`,`query`,e),exists:e=>n(`storage`,`exists`,`query`,e),list:e=>n(`storage`,`list`,`query`,e),delete:e=>n(`storage`,`delete`,`mutation`,e),getAvailableSpace:e=>n(`storage`,`getAvailableSpace`,`query`,e),beginUpload:e=>n(`storage`,`beginUpload`,`mutation`,e),writeChunk:e=>n(`storage`,`writeChunk`,`mutation`,e),finalizeUpload:e=>n(`storage`,`finalizeUpload`,`mutation`,e),abortUpload:e=>n(`storage`,`abortUpload`,`mutation`,e),beginDownload:e=>n(`storage`,`beginDownload`,`mutation`,e),readChunk:e=>n(`storage`,`readChunk`,`query`,e),endDownload:e=>n(`storage`,`endDownload`,`mutation`,e),listLocations:e=>n(`storage`,`listLocations`,`query`,e),getDefaultLocation:e=>n(`storage`,`getDefaultLocation`,`query`,e),listLocationDeclarations:e=>n(`storage`,`listLocationDeclarations`,`query`,e),upsertLocation:e=>n(`storage`,`upsertLocation`,`mutation`,e),deleteLocation:e=>n(`storage`,`deleteLocation`,`mutation`,e),testLocation:e=>n(`storage`,`testLocation`,`query`,e),listProviders:e=>n(`storage`,`listProviders`,`query`,e),testConfig:e=>n(`storage`,`testConfig`,`query`,e)},streamBroker:{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),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)},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 od=`device.state-changed`,sd=`capability.binding-changed`,cd=`device.registered`,ld=`device.unregistered`,ud=`device.updated`,dd=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=$u(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?td(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&&!fd(n,e.id)||e.stableId!==void 0&&(!i||!fd(i.stableId,e.stableId))||e.addonId!==void 0&&(!i||!fd(i.addonId,e.addonId))||e.type!==void 0&&(!i||!fd(i.type,e.type)))continue;if(e.caps!==void 0){let t=pd(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=pd(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||!md(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||!pd(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:od},{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:sd},{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:cd},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.refreshDeviceMetadata(t.deviceId,`added`)}})),this.bridges.push(e.subscribe({category:ld},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.applyDeviceRemoval(t.deviceId)}})),this.bridges.push(e.subscribe({category:ud},{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.getAllBindings.query({})).find(t=>t.deviceId===e);t?this.bindings.set(e,t):this.applyDeviceRemoval(e)}catch{}}async refreshDeviceMetadata(e,t){try{let n=(await this.api.deviceManager.listAll.query({})).find(t=>t.id===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 fd(e,t){return Array.isArray(t)?t.includes(e):e===t}function pd(e){return Array.isArray(e)?e:[e]}function md(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}var hd=y({id:a(),label:a(),icon:a(),path:a(),remoteName:a(),bundle:a(),section:a().optional(),sectionLabel:a().optional()}),gd=y({addonId:a(),page:hd,bundleUrl:a()}),_d={name:`addon-pages`,scope:`system`,mode:`singleton`,methods:{listPages:R(_(),h(gd).readonly())}},vd=y({id:a(),label:a(),icon:a(),path:a(),remoteName:a(),bundle:a(),section:a().optional(),sectionLabel:a().optional()}),yd={name:`addon-pages-source`,scope:`system`,mode:`collection`,internal:!0,methods:{listPages:R(_(),h(vd).readonly())}},bd=y({method:v([`GET`,`POST`,`PUT`,`DELETE`,`PATCH`]),path:a(),access:v([`public`,`authenticated`,`admin`]).optional(),description:a().optional()}),xd=y({method:a(),path:a(),params:o(a(),a()),query:o(a(),a()),body:r(),headers:o(a(),a()),user:y({id:a(),username:a(),isAdmin:m()}).optional(),scopedToken:r().optional()}),Sd=y({status:i().int(),headers:o(a(),a()),redirectUrl:a().nullable(),body:r().optional(),contentType:a().optional()}),Cd={name:`addon-routes`,scope:`system`,mode:`collection`,internal:!0,methods:{getRoutes:R(_(),h(bd)),invoke:R(xd,Sd,{kind:`mutation`})},mount:{kind:`skip`}},wd=y({id:a(),label:a(),icon:a(),order:i().optional()}),Td=y({id:a(),title:a(),description:a().optional(),style:v([`card`,`accordion`]).optional(),defaultCollapsed:m().optional(),columns:g([c(1),c(2),c(3),c(4)]).optional(),tab:a().optional(),location:v([`settings`,`top-tab`]).optional(),order:i().optional(),fields:h(ae())}),Q=y({tabs:h(wd).optional(),sections:h(Td)}),Ed=o(a(),r()),Dd=y({success:c(!0)}),Od={name:`addon-settings`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{getGlobalSettings:R(y({addonId:a(),nodeId:a().optional(),overlay:o(a(),r()).optional(),cap:a().optional()}),Q.nullable()),updateGlobalSettings:R(y({addonId:a(),nodeId:a().optional(),patch:Ed}),Dd,{kind:`mutation`,auth:`admin`}),getDeviceSettings:R(y({addonId:a(),deviceId:i(),nodeId:a().optional()}),Q.nullable()),updateDeviceSettings:R(y({addonId:a(),deviceId:i(),nodeId:a().optional(),patch:Ed}),Dd,{kind:`mutation`,auth:`admin`})}},kd=v([`device-tab`,`dashboard`,`integration-detail`]),Ad=v([`xs`,`sm`,`md`,`lg`,`xl`]),jd=y({remoteName:a(),exposedModule:a(),componentKey:a().optional()}),Md=y({tab:a(),subTab:a().optional(),label:a(),order:i().optional(),kind:c(`remote`),remote:jd,stableId:a(),description:a().optional(),icon:a().optional(),bundle:a(),hosts:h(kd).readonly(),requires:y({deviceContext:m().default(!1),integrationContext:m().default(!1)}),preAuth:m().optional().default(!1),defaultSize:Ad.default(`md`),allowedSizes:h(Ad).readonly().default([`sm`,`md`,`lg`]),defaultColumns:i().int().min(1).max(12).default(6),defaultRows:i().int().min(1).max(12).default(1)}),Nd={name:`addon-widgets-source`,scope:`system`,mode:`collection`,internal:!0,methods:{listWidgets:R(_(),h(Md).readonly())}},Pd=Md.extend({addonId:a(),bundleUrl:a()}),Fd={name:`addon-widgets`,scope:`system`,mode:`singleton`,methods:{listWidgets:R(_(),h(Pd).readonly())}},Id=y({staticDir:a()}),Ld=y({version:a()}),Rd={name:`admin-ui`,scope:`system`,mode:`singleton`,internal:!0,methods:{getStaticDir:R(_(),Id),getVersion:R(_(),Ld)}},zd=y({staticDir:a()}),Bd=y({version:a()}),Vd={name:`viewer-ui`,scope:`system`,mode:`singleton`,internal:!0,methods:{getStaticDir:R(_(),zd),getVersion:R(_(),Bd)}},Hd=y({deviceIds:h(i()).readonly().optional(),classNames:h(a()).readonly().optional(),zoneIds:h(a()).readonly().optional(),minConfidence:i().optional(),source:v([`pipeline`,`onboard`,`any`]).optional(),schedule:y({days:h(i()).readonly(),startHour:i(),endHour:i()}).optional(),cooldownSeconds:i().optional(),minDwellSeconds:i().optional(),eventTypeTokens:h(a()).readonly().optional(),clipDescription:y({text:a().min(1),minSimilarity:i().min(0).max(1)}).optional()}),Ud=y({title:a(),body:a(),imageMode:v([`crop`,`annotated`,`full`,`none`])}),Wd=y({id:a(),name:a(),enabled:m(),eventTypes:h(a()).readonly(),conditions:Hd,outputs:h(a()).readonly(),template:Ud.optional(),priority:v([`low`,`normal`,`high`,`critical`])}),Gd=y({ruleId:a(),eventId:a(),timestamp:i(),wouldFire:m(),reason:a().optional()}),Kd=y({id:a(),ruleId:a(),ruleName:a(),eventId:a(),timestamp:i(),outputs:h(a()).readonly(),success:m(),error:a().optional(),deviceId:i().optional()}),qd=y({ruleId:a().optional(),deviceId:i().optional(),from:i().optional(),to:i().optional(),limit:i().optional()}),Jd={name:`advanced-notifier`,scope:`system`,mode:`singleton`,internal:!0,methods:{getRules:R(_(),y({rules:h(Wd).readonly()})),upsertRule:R(y({rule:Wd}),y({success:c(!0)}),{kind:`mutation`}),deleteRule:R(y({ruleId:a()}),y({success:c(!0)}),{kind:`mutation`}),testRule:R(y({ruleId:a(),lookbackMinutes:i()}),y({results:h(Gd).readonly()}),{kind:`mutation`}),getHistory:R(y({filter:qd.optional()}),y({entries:h(Kd).readonly()}))}},Yd=v([`info`,`success`,`warning`,`error`]),Xd=v([`active`,`in-progress`,`completed`,`failed`,`dismissed`]),Zd=y({type:a(),id:a()}),Qd=y({id:a(),category:a(),severity:Yd,title:a(),message:a(),status:Xd,progress:i().optional(),read:m(),createdAt:i(),updatedAt:i(),source:Zd.optional(),metadata:o(a(),r()).optional()}),$d={name:`alerts`,scope:`system`,mode:`singleton`,methods:{emit:R(Qd,_(),{kind:`mutation`}),update:R(y({alertId:a(),patch:Qd.partial()}),_(),{kind:`mutation`}),list:R(y({unreadOnly:m().optional(),limit:i().optional()}).optional(),h(Qd).readonly()),getUnreadCount:R(_(),i()),markRead:R(y({alertId:a()}),_(),{kind:`mutation`}),markAllRead:R(_(),_(),{kind:`mutation`}),dismiss:R(y({alertId:a()}),_(),{kind:`mutation`})}},ef={name:`audio-analysis`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[F.Camera],exposesDeviceSettings:!0,methods:{resolveDeviceSettings:R(y({deviceId:i()}),u())},events:{onAudioLevel:z(y({deviceId:i(),rms:i(),dbfs:i()}))}},tf=y({level:Cs,classification:y({labels:h(ws).readonly(),inferenceMs:i()}).optional(),timestamp:i()}),nf=y({minConfidence:i().min(0).max(1).default(.3),allowedClasses:h(a()).default([])}),rf=y({labels:h(ws).readonly(),rawLabels:h(ws).readonly().optional(),inferenceMs:i()}),af=[{value:`auto`,label:`Auto (platform default)`},{value:`apple-soundanalysis`,label:`Apple SoundAnalysis (macOS 12+)`},{value:`yamnet-onnx`,label:`YAMNet ONNX (cross-platform)`}],of={audioBackend:`auto`,probedBestAudioBackend:``,selectedAudioModel:``},sf={name:`audio-analyzer`,scope:`system`,mode:`singleton`,methods:{analyseChunk:R(y({chunk:Ss,settings:nf}),tf.nullable(),{kind:`mutation`}),classify:R(Ss,rf,{timeoutMs:3e4}),isReady:R(_(),m()),dispose:R(_(),_(),{kind:`mutation`}),reprobeAudioEngine:R(_(),y({backend:a()}),{kind:`mutation`,auth:`admin`})}},cf=v([`f32le`,`s16le`]),lf=y({codec:a(),canDecode:m(),canEncode:m(),label:a().optional()}),uf=y({codec:a(),sourceSampleRate:i().int().positive(),sourceChannels:i().int().positive(),extraData:p(Uint8Array).optional(),targetSampleRate:i().int().positive(),targetChannels:i().int().positive(),targetFormat:cf.optional(),idleMs:i().int().positive().optional(),tag:a().optional()}),df=y({codec:a(),sourceSampleRate:i().int().positive(),sourceChannels:i().int().positive(),sourceFormat:cf.optional(),targetSampleRate:i().int().positive(),targetChannels:i().int().positive(),bitrateKbps:i().int().positive().optional(),idleMs:i().int().positive().optional(),tag:a().optional()}),ff=y({data:p(Uint8Array),sampleRate:i().int().positive(),channels:i().int().positive(),format:cf,pts:i()}),pf=y({data:p(Uint8Array),codec:a(),pts:i(),frameComplete:m()}),mf=y({sessionId:a(),kind:v([`decode`,`encode`]),codec:a(),sourceSampleRate:i(),sourceChannels:i(),targetSampleRate:i(),targetChannels:i(),format:cf,tag:a().optional(),createdAtMs:i(),lastActivityMs:i(),framesIn:i(),framesOut:i()}),hf={name:`audio-codec`,scope:`system`,mode:`singleton`,preferredProvider:`decoder-nodeav`,methods:{listSupportedCodecs:R(_(),h(lf).readonly()),canHandle:R(y({codec:a(),kind:v([`decode`,`encode`])}),m()),createDecodeSession:R(uf,y({sessionId:a(),nodeId:a()}),{kind:`mutation`}),createEncodeSession:R(df,y({sessionId:a(),nodeId:a()}),{kind:`mutation`}),closeSession:R(y({sessionId:a(),nodeId:a().optional()}),_(),{kind:`mutation`}),pushEncodedFrame:R(y({sessionId:a(),nodeId:a().optional(),data:p(Uint8Array),pts:i().optional()}),_(),{kind:`mutation`}),pullPcm:R(y({sessionId:a(),nodeId:a().optional(),maxCount:i().int().positive().default(8)}),h(ff)),pushPcm:R(y({sessionId:a(),nodeId:a().optional(),data:p(Uint8Array),pts:i().optional()}),_(),{kind:`mutation`}),pullEncoded:R(y({sessionId:a(),nodeId:a().optional(),maxCount:i().int().positive().default(8)}),h(pf)),flushEncode:R(y({sessionId:a(),nodeId:a().optional()}),h(pf),{kind:`mutation`}),listActiveSessions:R(_(),h(mf).readonly())}},gf=y({userId:a(),username:a(),email:a().optional(),displayName:a().optional(),isAdmin:m().default(!1)}),_f={name:`auth-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{validateCredentials:R(y({username:a(),password:a()}),gf.nullable(),{kind:`mutation`}),getLoginUrl:R(y({state:a()}),a()),handleCallback:R(o(a(),a()),gf,{kind:`mutation`}),validateToken:R(y({token:a()}),gf.nullable())},mount:{kind:`skip`}},vf=v([`primary`,`second-factor`]),yf=y({kind:c(`redirect`),id:a(),label:a(),icon:a().optional(),startUrl:a(),stage:vf}),bf=y({kind:c(`widget`),id:a(),addonId:a(),bundle:a(),remote:jd,stage:vf}),xf=b(`kind`,[yf,bf]),Sf={name:`login-method`,scope:`system`,mode:`collection`,internal:!0,methods:{getLoginMethods:R(_(),h(xf).readonly())},mount:{kind:`skip`}},Cf=y({subId:a(),displayName:a(),description:a().optional(),kind:a(),triggerSupported:m(),restoreSupported:m()}).extend({id:a(),addonId:a(),enabled:m(),retentionCount:i(),label:a().optional(),lastSuccessAt:i().optional(),lastSuccessSizeBytes:i().optional(),cron:a().optional(),nextRunAt:i().optional(),lastRunAt:i().optional()}),wf=y({id:a(),filename:a(),createdAt:i(),sizeBytes:i(),label:a().optional(),locations:h(a()).readonly()}),Tf=y({id:a(),destinationId:a().optional(),label:a().optional(),createdAt:i(),sizeBytes:i(),locations:h(a()).optional()}),Ef=y({path:a(),kind:v([`file`,`dir`,`symlink`]),sizeBytes:i(),mtime:i()}),Df=y({archiveVersion:c(1),createdAt:i(),dataDir:a(),locations:h(a()),entries:h(Ef),totalBytes:i(),totalFiles:i()}),Of=y({name:a(),sizeBytes:i(),fileCount:i(),present:m()}),kf={name:`backup`,scope:`system`,mode:`singleton`,methods:{listDestinations:R(_(),h(Cf).readonly(),{auth:`admin`}),trigger:R(y({destinations:h(a()).optional(),locations:h(a()).optional(),label:a().optional()}).optional(),h(Tf).readonly(),{kind:`mutation`,auth:`admin`}),list:R(_(),h(Tf).readonly(),{auth:`admin`}),listLocations:R(_(),h(Of).readonly(),{auth:`admin`}),getEntries:R(y({destinationId:a(),backupId:a()}),Df.nullable(),{auth:`admin`}),restore:R(y({destinationId:a(),backupId:a(),locations:h(a()).optional()}),_(),{kind:`mutation`,auth:`admin`}),delete:R(y({destinationId:a(),backupId:a()}),_(),{kind:`mutation`,auth:`admin`}),listArchives:R(y({destinationId:a()}),h(wf).readonly(),{auth:`admin`}),upsertDestinationPolicy:R(y({locationId:a(),enabled:m(),retentionCount:i().int().min(1).max(1e3),label:a().optional(),cron:a().optional()}),_(),{kind:`mutation`,auth:`admin`}),previewSchedule:R(y({cron:a(),count:i().int().min(1).max(20).optional()}),y({ok:m(),error:a().optional(),nextRuns:h(i()).readonly()}))}},Af=v([`connected`,`disconnected`,`connecting`,`auth-failed`,`unreachable`,`error`]),jf=y({id:a(),addonId:a(),name:a(),kind:a(),status:Af,info:o(a(),r()),lastCheckedAt:i().nullable(),error:a().nullable()}),Mf=y({brokerCount:i().int().nonnegative(),connectedCount:i().int().nonnegative()}),Nf=y({addonId:a(),kinds:h(y({kind:a(),label:a()}))}),Pf=y({kind:a().optional()}),Ff=y({id:a()}),If=y({kind:a().min(1),name:a().min(1),settings:o(a(),r())}),Lf=y({id:a()}),Rf=y({id:a()}),zf=b(`ok`,[y({ok:c(!0),latencyMs:i().nonnegative()}),y({ok:c(!1),error:a()})]),Bf=o(a(),r()),Vf=y({kind:a()}),Hf=y({kind:a(),settings:Bf}),Uf=b(`ok`,[y({ok:c(!0),latencyMs:i().nonnegative().optional()}).strict(),y({ok:c(!1),error:a()})]),Wf=r().nullable(),Gf=y({brokerId:a(),target:o(a(),r()),payload:r().optional()}),Kf=y({brokerId:a(),filter:o(a(),r())}),qf=y({subscriptionId:a()}),Jf=y({brokerId:a(),subscriptionId:a()}),Yf=y({brokerId:a(),key:a()}),Xf={name:`broker`,scope:`system`,mode:`collection`,providerKind:`broker`,status:{schema:Mf,kind:`poll`},methods:{list:R(Pf,h(jf)),get:R(Ff,jf.nullable()),listProviders:R(_(),h(Nf),{auth:`admin`}),add:R(If,Lf,{kind:`mutation`,auth:`admin`}),remove:R(Rf,_(),{kind:`mutation`,auth:`admin`}),testConnection:R(Ff,zf,{kind:`mutation`,auth:`admin`}),getSettings:R(Ff,Bf.nullable(),{auth:`admin`}),setSettings:R(y({id:a(),settings:Bf}),_(),{kind:`mutation`,auth:`admin`}),getBrokerConfig:R(Ff,Bf.nullable(),{auth:`admin`}),getSettingsSchema:R(Vf,Wf,{auth:`admin`}),testSettings:R(Hf,Uf,{kind:`mutation`,auth:`admin`}),publish:R(Gf,r(),{kind:`mutation`,auth:`admin`}),subscribe:R(Kf,qf,{kind:`mutation`,auth:`admin`}),unsubscribe:R(Jf,_(),{kind:`mutation`,auth:`admin`}),getState:R(Yf,r().nullable()),getStatus:R(_(),Mf)}},Zf={name:`camera-pipeline-config`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[F.Camera],exposesDeviceSettings:!0,methods:{}};function Qf(e){let t=e._def;return e.constructor?.name===`ZodVoid`||t?.type===`void`||t?.typeName===`ZodVoid`}function $f(e){let t=e._def;return e.constructor?.name===`ZodObject`||t?.type===`object`||t?.typeName===`ZodObject`}function ep(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 tp(e){let t=e.loose;return typeof t==`function`?t.call(e):e}function np(e){return e===`public`?`public`:e===`admin`||e===`superAdmin`?`admin`:`protected`}function rp(e){return e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function ip(e){return e}function ap(e,t,n){return{input:e,output:t,kind:n?.kind??`query`,auth:n?.auth??`protected`,scope:n?.scope??{kind:`system`}}}function op(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 sp=y({stepId:a(),entry:Ce}),cp={name:`custom-model-registry`,scope:`system`,mode:`collection`,internal:!0,methods:{listModels:R(_(),h(sp).readonly())}},lp=[{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)`}],up={hwaccel:`auto`,probedBestHwaccel:``},dp=y({sessionId:a(),slotCount:i().int(),slotByteLength:i().int(),segmentBytes:i().int(),budgetMb:i().int(),framesWritten:i().int(),getFrameHits:i().int(),getFrameMisses:i().int()}),fp={name:`decoder`,scope:`system`,mode:`singleton`,preferredProvider:`decoder-nodeav`,methods:{supportsCodec:R(y({codec:a()}),m()),getInfo:R(_(),y({id:a(),name:a(),isPullMode:m().optional(),priority:i().optional(),hwaccel:a().optional(),probedBestHwaccel:a().optional()})),createSession:R(Fn,y({sessionId:a(),nodeId:a()})),destroySession:R(y({sessionId:a()}),_()),pushPacket:R(y({sessionId:a(),packet:Ft}),_()),openStream:R(y({sessionId:a(),url:a()}),_()),pullFrames:R(y({sessionId:a(),maxCount:i().default(1),waitMs:i().optional()}),h(It)),pullHandles:R(y({sessionId:a(),maxCount:i().default(1),waitMs:i().optional()}),h(Lt)),getFrame:R(y({handle:Lt}),It.nullable()),getShmStats:R(y({sessionId:a()}),dp.nullable()),updateConfig:R(y({sessionId:a(),config:Fn.partial()}),_()),getStats:R(y({sessionId:a()}),Pn),listActiveSessions:R(_(),h(y({sessionId:a(),codec:a(),outputFormat:a(),createdAtMs:i()})).readonly()),reprobeHwaccel:R(_(),y({backend:a()}),{kind:`mutation`,auth:`admin`})}},pp={name:`detection-pipeline`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[F.Camera],exposesDeviceSettings:!0,methods:{}},mp=y({id:a(),label:a(),isDefault:m().optional()}),hp=y({search:a().optional(),area:a().optional(),manufacturer:a().optional(),adoptedOnly:m().optional(),unadoptedOnly:m().optional()}),gp=y({integrationId:a(),page:i().int().positive().default(1),pageSize:i().int().positive().max(2e4).default(50),filter:a().optional(),filterText:hp.optional()}),_p=y({candidates:h(V).readonly(),totalCount:i().int().nonnegative(),page:i().int().positive(),pageSize:i().int().positive()}),vp=y({integrationId:a(),childNativeId:a()}),yp=y({lastDiscoveryAt:i().int().nonnegative().nullable(),candidateCount:i().int().nonnegative(),adoptedCount:i().int().nonnegative(),lastError:a().nullable()}),bp=y({name:a().min(1).optional(),hiddenChildIds:h(a()).optional()}),xp=y({integrationId:a(),childNativeIds:h(a()).min(1),filter:a().optional(),importLocations:m().optional(),perCandidate:o(a(),bp).optional()}),Sp=y({adopted:h(y({childNativeId:a(),parentDeviceId:i().int().nonnegative(),accessoryDeviceIds:h(i().int().nonnegative()).readonly()})).readonly()}),Cp=y({integrationId:a(),camDeviceId:i().int().nonnegative()}),wp=y({camDeviceId:i().int().nonnegative(),resetToSource:m().optional()}),Tp=y({changed:m(),rebuiltChildren:i().int().nonnegative(),removedChildren:i().int().nonnegative().optional()}),Ep={name:`device-adoption`,scope:`system`,mode:`singleton`,status:{schema:yp,kind:`poll`},methods:{listCandidateFilters:R(y({integrationId:a()}),y({filters:h(mp)}),{auth:`admin`}),listCandidates:R(gp,_p,{auth:`admin`}),getCandidate:R(vp,V.nullable(),{auth:`admin`}),refresh:R(y({integrationId:a()}),yp,{kind:`mutation`,auth:`admin`}),adopt:R(xp,Sp,{kind:`mutation`,auth:`admin`}),release:R(Cp,_(),{kind:`mutation`,auth:`admin`}),resync:R(wp,Tp,{kind:`mutation`,auth:`admin`})}},Dp=v([`unlinked`,`linked`,`error`]),Op=y({label:a(),value:a(),secret:m().optional()}),kp=y({qr:a().optional(),fields:h(Op).readonly().optional(),note:a().optional()}),Ap=y({linkState:Dp,exposedDeviceCount:i(),error:a().optional(),setup:kp.optional()}),jp=a(),Mp=y({deviceId:a(),exposedAs:a().optional(),capabilities:h(a()).optional()}),Np=y({deviceId:a(),capabilities:h(a()).optional()}),Pp=y({deviceId:a()}),Fp={name:`device-export`,scope:`system`,mode:`collection`,providerKind:`device-export`,status:{schema:Ap,kind:`poll`},exposesDeviceSettings:!0,methods:{getStatus:R(_(),Ap),listSupportedDeviceKinds:R(_(),h(jp)),listExposedDevices:R(_(),h(Mp)),exposeDevice:R(Np,_(),{kind:`mutation`}),unexposeDevice:R(Pp,_(),{kind:`mutation`})}},Ip=y({childKey:a(),section:a(),order:i().optional(),collapsed:m().optional()}),Lp=y({kind:c(`field`).optional(),sourceKey:a(),cap:a(),fieldPath:a()}),Rp=y({kind:c(`literal`),value:g([a(),i(),m(),te()])}),zp=y({kind:c(`global`),sourceStableId:a(),cap:a(),fieldPath:a()}),Bp=y({kind:c(`expression`),expr:a().min(1).max(Mr),bindings:o(a().regex(Pr),g([Lp,Rp,zp]))}).superRefine((e,t)=>{let n=mi(e);n!==null&&t.addIssue({code:`custom`,message:n,path:[`expr`]})}),Vp=y({id:a(),source:g([Lp,Rp,zp,Bp]),target:y({cap:a(),fieldPath:a(),itemKey:a().optional()}),transform:b(`kind`,[y({kind:c(`identity`)}),y({kind:c(`enum-map`),mapping:o(a(),g([a(),i(),m()])),fallback:g([a(),i(),m()]).optional()}),y({kind:c(`linear`),scale:i(),offset:i(),clamp:s([i(),i()]).readonly().optional()})]).optional()}),Hp=y({unit:a().min(1).optional(),precision:i().int().min(0).max(10).optional()}),Up=y({icon:a().min(1).optional(),label:a().min(1).optional(),unit:a().min(1).optional(),precision:i().int().min(0).max(10).optional(),hidden:m().optional(),perCap:o(a(),Hp).optional()}),Wp=y({unit:a().min(1).optional(),precision:i().int().min(0).max(10).optional(),icon:a().min(1).optional()}),Gp=y({id:i(),stableId:a(),addonId:a(),type:v(F),name:a(),location:a().nullable(),disabled:m(),parentDeviceId:i().nullable(),role:a().nullable().optional(),online:m(),probed:m().optional(),features:h(a()),isCamera:m(),config:o(a(),r()),metadata:o(a(),r()).nullable().optional(),sourceInfo:B.optional(),integrationId:a().optional(),linkDeviceId:i().nullable().optional(),primaryChildEntityId:a().nullable().optional(),childLayout:h(Ip).readonly().optional(),deviceLinks:h(Vp).readonly().optional(),display:Up.optional()}),Kp=y({key:a(),value:r(),description:a().optional()}),qp=y({id:i(),stableId:a(),type:a(),name:a(),location:a().nullable(),disabled:m(),parentDeviceId:i().nullable(),role:a().nullable().optional()}),Jp=y({id:i(),stableId:a(),addonId:a(),type:a(),name:a(),userNamed:m().optional(),location:a().nullable(),disabled:m(),parentDeviceId:i().nullable(),metadata:o(a(),r()).nullable().optional(),sourceInfo:B.optional(),integrationId:a().optional(),linkDeviceId:i().nullable().optional(),primaryChildEntityId:a().nullable().optional(),childLayout:h(Ip).readonly().optional(),deviceLinks:h(Vp).readonly().optional(),role:a().nullable().optional(),display:Up.optional()}),Yp=r().nullable(),Xp=y({streamId:a(),width:i().optional(),height:i().optional(),codec:a().optional(),fps:i().optional(),bitrateKbps:i().optional()}),Zp=y({addonId:a(),stableId:a(),id:i(),type:a(),name:a(),location:a().nullable().optional(),disabled:m().optional(),parentDeviceId:i().nullable(),role:a().nullable().optional(),features:h(a()).optional(),config:o(a(),r())}),Qp=y({deviceId:i()}),$p=y({deviceId:i(),data:o(a(),r())}),em={name:`device-manager`,scope:`system`,mode:`singleton`,methods:{allocateDeviceId:R(y({addonId:a(),stableId:a()}),y({id:i()}),{kind:`mutation`}),registerDevice:R(Zp,_(),{kind:`mutation`}),removeDevice:R(Qp,_(),{kind:`mutation`}),persistConfig:R($p,_(),{kind:`mutation`}),loadConfig:R(y({deviceId:i()}),o(a(),r())),loadRuntimeState:R(y({deviceId:i()}),o(a(),r())),loadMeta:R(y({deviceId:i()}),Jp.nullable()),setName:R(y({deviceId:i(),name:a()}),_(),{kind:`mutation`,auth:`admin`}),setLocation:R(y({deviceId:i(),location:a().nullable()}),_(),{kind:`mutation`,auth:`admin`}),setType:R(y({deviceId:i(),type:v(F)}),_(),{kind:`mutation`,auth:`admin`}),setIntegrationId:R(y({deviceId:i(),integrationId:a()}),_(),{kind:`mutation`,auth:`admin`}),setLinkDeviceId:R(y({deviceId:i(),linkDeviceId:i().nullable()}),_(),{kind:`mutation`,auth:`admin`}),setPrimaryChildEntityId:R(y({deviceId:i(),primaryChildEntityId:a().nullable()}),_(),{kind:`mutation`,auth:`admin`}),setChildLayout:R(y({deviceId:i(),childLayout:h(Ip).readonly()}),_(),{kind:`mutation`,auth:`admin`}),setDeviceLinks:R(y({deviceId:i(),deviceLinks:h(Vp).readonly()}),_(),{kind:`mutation`,auth:`admin`}),setDisplay:R(y({deviceId:i(),display:Up.nullable()}),_(),{kind:`mutation`,auth:`admin`}),getRoleDisplayDefaults:R(y({}),y({defaults:o(a(),Wp)}),{kind:`query`}),setRoleDisplayDefaults:R(y({defaults:o(a(),Wp)}),_(),{kind:`mutation`,auth:`admin`}),getWireableFields:R(y({deviceId:i(),includeSynthesizable:m().optional()}),y({caps:h(y({cap:a(),fields:h(y({path:a(),kind:v([`string`,`number`,`boolean`,`enum`]),enumValues:h(a()).optional(),item:m().optional()})).readonly(),itemArray:y({path:a(),keyField:a()}).optional()})).readonly()}),{kind:`query`}),setRole:R(y({deviceId:i(),role:a().nullable()}),_(),{kind:`mutation`,auth:`admin`}),applyInitialMeta:R(y({deviceId:i(),name:a().optional(),location:a().nullable().optional(),type:v(F).optional(),integrationId:a().optional(),linkDeviceId:i().nullable().optional(),role:a().nullable().optional()}),_(),{kind:`mutation`,auth:`admin`}),setMetadata:R(y({deviceId:i(),patch:o(a(),r())}),_(),{kind:`mutation`,auth:`admin`}),listLocations:R(_(),h(a())),addLocation:R(y({name:a()}),_(),{kind:`mutation`,auth:`admin`}),removeLocation:R(y({name:a(),cascade:m().optional()}),_(),{kind:`mutation`,auth:`admin`}),setDisabled:R(y({deviceId:i(),disabled:m()}),_(),{kind:`mutation`,auth:`admin`}),listPersistedByAddon:R(y({addonId:a()}),h(qp)),listAll:R(y({addonId:a().optional()}),h(Gp)),getDevice:R(y({deviceId:i()}),Gp.nullable()),getChildren:R(y({parentDeviceId:i()}),h(Gp)),getStreamSources:R(y({deviceId:i()}),h(Nt)),getConfigSchema:R(y({deviceId:i()}),h(Kp)),getSettingsSchema:R(y({deviceId:i()}),Yp),updateConfig:R(y({deviceId:i(),values:o(a(),r())}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),enable:R(y({deviceId:i()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),disable:R(y({deviceId:i()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),remove:R(y({deviceId:i()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),removeByIntegration:R(y({integrationId:a()}),y({removed:i()}),{kind:`mutation`,auth:`admin`}),getStreamProfileMap:R(y({deviceId:i()}),o(a(),a().nullable())),setStreamProfileMap:R(y({deviceId:i(),profileMap:o(a(),a().nullable())}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),probeStreams:R(y({deviceId:i()}),h(Xp),{kind:`mutation`,auth:`admin`}),getBindings:R(y({deviceId:i()}),y({deviceId:i(),entries:h(y({capName:a(),kind:v([`native`,`wrapped`,`linked`]),providerAddonId:a(),providerNodeId:a(),nativeAddonId:a()}))})),getAllBindings:R(y({}),h(y({deviceId:i(),entries:h(y({capName:a(),kind:v([`native`,`wrapped`,`linked`]),providerAddonId:a(),providerNodeId:a(),nativeAddonId:a()}))}))),setWrapperActive:R(y({deviceId:i(),capName:a(),wrapperAddonId:a(),active:m()}),_(),{kind:`mutation`,auth:`admin`}),listWrappersForCap:R(y({capName:a()}),h(a())),listBindableCapsForDeviceType:R(y({deviceType:a()}),h(y({capName:a(),wrappers:h(a())}))),getDeviceSettingsAggregate:R(y({deviceId:i()}),Q.nullable()),getDeviceLiveInfoAggregate:R(y({deviceId:i()}),Q.nullable()),getDeviceAggregate:R(y({deviceId:i()}),y({settings:Q.nullable(),live:Q.nullable()})),runDeviceAction:R(y({deviceId:i().int().nonnegative(),action:a().min(1),input:r()}),r(),{kind:`mutation`}),updateDeviceField:R(y({deviceId:i(),writerCapName:a(),writerAddonId:a(),key:a(),value:r()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),updateDeviceFieldsBatch:R(y({deviceId:i(),changes:h(y({writerCapName:a(),writerAddonId:a(),key:a(),value:r()}))}),y({success:c(!0),failures:h(y({writerCapName:a(),writerAddonId:a(),error:a()}))}),{kind:`mutation`,auth:`admin`}),discoverDevices:R(y({addonId:a()}),h(Tu),{kind:`mutation`,auth:`admin`}),adoptDevice:R(y({addonId:a(),candidate:Tu,integrationId:a().optional()}),Eu,{kind:`mutation`,auth:`admin`}),getCreationSchema:R(y({addonId:a(),type:v(F)}),r().nullable()),createDevice:R(y({addonId:a(),type:v(F),config:o(a(),r()),integrationId:a().optional()}),Eu,{kind:`mutation`,auth:`admin`}),testCreationField:R(y({addonId:a(),type:v(F),key:a(),value:r(),formValues:o(a(),r()).optional()}),Du,{kind:`mutation`,auth:`admin`}),adoptionListCandidateFilters:R(y({addonId:a(),integrationId:a()}),y({filters:h(mp)}),{auth:`admin`}),adoptionListCandidates:R(gp.extend({addonId:a()}),_p,{auth:`admin`}),adoptionRefresh:R(y({addonId:a(),integrationId:a()}),yp,{kind:`mutation`,auth:`admin`}),adoptionAdopt:R(xp.extend({addonId:a()}),Sp,{kind:`mutation`,auth:`admin`}),adoptionRelease:R(Cp.extend({addonId:a()}),_(),{kind:`mutation`,auth:`admin`}),adoptionResync:R(wp,Tp,{kind:`mutation`,auth:`admin`}),discoveryProviders:R(y({}),y({providers:h(y({addonId:a(),label:a()})).readonly()}),{auth:`admin`}),discoverAllProviders:R(y({}),y({groups:h(y({addonId:a(),label:a(),candidates:h(Tu).readonly(),error:a().nullable()})).readonly()}),{kind:`mutation`,auth:`admin`}),discoverProvider:R(y({addonId:a(),params:o(a(),r()).optional()}),y({candidates:h(Tu).readonly()}),{kind:`mutation`,auth:`admin`}),providerCreationType:R(y({addonId:a()}),y({deviceType:v(F).nullable()}),{auth:`admin`}),providerDiscoveryParamsSchema:R(y({addonId:a()}),r(),{auth:`admin`}),testField:R(y({deviceId:i(),key:a(),value:r()}),Du,{kind:`mutation`,auth:`admin`}),getDeviceStatusAggregate:R(y({deviceId:i(),caps:h(a()).readonly().optional()}),o(a(),r().nullable()))}},tm={name:`device-state`,scope:`system`,mode:`singleton`,methods:{getSnapshot:R(y({deviceId:i()}),o(a(),o(a(),r()))),getCapSlice:R(y({deviceId:i(),capName:a()}),o(a(),r()).nullable()),getAllSnapshots:R(y({}),o(a(),o(a(),o(a(),r())))),setCapSlice:R(y({deviceId:i(),capName:a(),slice:o(a(),r())}),_(),{kind:`mutation`})},events:{onChanged:z(y({deviceId:i(),capName:a(),slice:o(a(),r())}))}},nm=y({embedding:h(i()),inferenceMs:i()}),rm=y({modelId:a(),embeddingDim:i(),ready:m()}),im={name:`embedding-encoder`,scope:`system`,mode:`collection`,internal:!0,methods:{encode:R(y({crop:p(Uint8Array),width:i(),height:i()}),nm),encodeText:R(y({text:a()}),nm),getInfo:R(_(),rm)}},am=y({name:a(),path:a()}),om=y({path:a(),entries:h(am).readonly(),freeBytes:i(),totalBytes:i()}),sm={name:`filesystem-browse`,scope:`system`,mode:`singleton`,internal:!0,methods:{listAllowedRoots:R(_(),h(a()).readonly(),{auth:`admin`}),browse:R(y({path:a()}),om,{auth:`admin`}),createDir:R(y({path:a()}),y({path:a()}),{kind:`mutation`,auth:`admin`})}},cm=v([`debug`,`info`,`warn`,`error`]),lm=y({timestamp:de(),level:cm,scope:h(a()),message:a(),meta:o(a(),r()).optional(),tags:o(a(),a()).optional()}),um={name:`log-destination`,scope:`system`,mode:`collection`,internal:!0,methods:{write:R(lm,_(),{kind:`mutation`}),query:R(y({scope:h(a()).optional(),level:cm.optional(),since:de().optional(),until:de().optional(),limit:i().optional(),tags:o(a(),a()).optional()}),h(lm).readonly())},mount:{kind:`skip`}},dm=y({total:i(),user:i(),system:i(),irq:i(),nice:i(),loadAvg:s([i(),i(),i()]),cores:i()}),fm=y({percent:i(),totalBytes:i(),usedBytes:i(),availableBytes:i(),swapUsedBytes:i(),swapTotalBytes:i()}),pm=y({readBytes:i(),writeBytes:i(),readOps:i(),writeOps:i(),timestampMs:i()}),mm=y({rxBytes:i(),txBytes:i(),rxPackets:i(),txPackets:i(),rxErrors:i(),txErrors:i(),timestampMs:i()}),hm=y({utilization:i(),model:a(),memoryUsedBytes:i(),memoryTotalBytes:i(),temperature:i().nullable()}),gm=y({openFds:i(),threadCount:i(),activeHandles:i(),activeRequests:i()}),_m=y({avg10:i(),avg60:i(),avg300:i()}),vm=y({some:_m,full:_m.nullable()}),ym=y({cpu:dm,memory:fm,gpu:hm.nullable(),network:mm,disk:pm,pressure:y({cpu:vm.nullable(),memory:vm.nullable(),io:vm.nullable()}),process:gm,cpuTemperature:i().nullable(),timestampMs:i()}),bm=y({path:a(),totalBytes:i(),usedBytes:i(),availableBytes:i(),percent:i()}),xm=y({pid:i(),cpu:i(),memory:i(),privateBytes:i().optional(),sharedBytes:i().optional()}),Sm=y({addonId:a(),nodeId:a(),role:v([`hub`,`worker`]),pid:i(),state:v([`starting`,`running`,`stopping`,`stopped`,`crashed`]),uptimeSec:i()}),Cm=y({pid:i(),ppid:i(),pgid:i(),classification:v([`root`,`managed`,`system`,`ghost`]),addonId:a().nullable(),nodeId:a().nullable(),command:a(),cpuPercent:i(),memoryRssBytes:i(),uptimeSec:i(),orphaned:m()}),wm=y({pid:i(),force:m().optional()}),Tm=y({success:m(),reason:a().optional(),signal:v([`SIGTERM`,`SIGKILL`]).optional()}),Em=y({addonId:a()}),Dm=y({success:m(),path:a().optional(),pid:i().optional(),reason:a().optional()}),Om=y({cpuPercent:i(),memoryPercent:i(),memoryUsedMB:i(),memoryTotalMB:i(),diskPercent:i().optional(),temperature:i().optional(),gpuPercent:i().optional(),gpuMemoryPercent:i().optional()}),km={name:`metrics-provider`,scope:`system`,mode:`singleton`,methods:{collectSnapshot:R(_(),ym),getCached:R(_(),ym.nullable()),getCurrent:R(_(),Om),getDiskSpace:R(y({dirPath:a()}),bm),getGpuInfo:R(_(),hm.nullable()),getCpuTemperature:R(_(),i().nullable()),getProcessStats:R(y({pids:h(i())}),h(xm)),listAddonInstances:R(_(),h(Sm).readonly()),getAddonStats:R(y({addonId:a()}),xm.nullable()),listNodeProcesses:R(_(),h(Cm).readonly()),killProcess:R(wm,Tm,{kind:`mutation`,auth:`admin`}),dumpHeapSnapshot:R(Em,Dm,{kind:`mutation`,auth:`admin`})}},Am=y({sourceUrl:a(),metadata:Te,targets:h(we).min(1).readonly(),calibrationRef:a().optional(),sessionId:a().optional()}),jm={name:`model-convert`,scope:`system`,mode:`singleton`,internal:!0,methods:{convert:R(Am,De,{kind:`mutation`,auth:`admin`,timeoutMs:6e5})}},Mm=y({nodeId:a(),modelId:a(),format:v(ye),entry:Ce}),Nm=y({ok:m(),sha256:a(),bytes:i(),path:a()}),Pm={name:`model-distributor`,scope:`system`,mode:`singleton`,internal:!0,methods:{distributeModel:R(Mm,Nm,{kind:`mutation`,auth:`admin`})}},Fm=v([`external`,`embedded`]),Im=v([`connected`,`disconnected`,`auth-failed`,`unreachable`,`tls-error`]),Lm=y({id:a(),name:a(),url:a(),kind:Fm,status:Im,latencyMs:i().nullable(),error:a().optional(),connectedClients:i().int().nonnegative().optional(),lastCheckedAt:i().optional()}),Rm=y({url:a(),username:a().optional(),password:a().optional(),clientIdPrefix:a().optional()}),zm=y({name:a().min(1),url:a().regex(/^(mqtt|mqtts|ws|wss):\/\//,`URL must start with mqtt(s):// or ws(s)://`),username:a().optional(),password:a().optional(),clientIdPrefix:a().optional()}),Bm=y({id:a()}),Vm=y({id:a()}),Hm=b(`ok`,[y({ok:c(!0),latencyMs:i()}),y({ok:c(!1),error:a()})]),Um=y({port:i().int().min(1).max(65535).default(1883),allowAnonymous:m().default(!1),username:a().optional(),password:a().optional()}),Wm=y({id:a(),url:a()}),Gm=y({brokerCount:i(),embeddedRunning:m()}),Km={name:`mqtt-broker`,scope:`system`,mode:`collection`,providerKind:`broker`,status:{schema:Gm,kind:`poll`},methods:{listBrokers:R(_(),h(Lm)),getBrokerConfig:R(Vm,Rm),addBroker:R(zm,Bm,{kind:`mutation`}),removeBroker:R(Vm,_(),{kind:`mutation`}),testConnection:R(Vm,Hm,{kind:`mutation`}),startEmbeddedBroker:R(Um,Wm,{kind:`mutation`}),stopEmbeddedBroker:R(Vm,_(),{kind:`mutation`}),getStatus:R(_(),Gm)}},qm=y({url:a(),hostname:a(),port:i(),protocol:v([`http`,`https`])}),Jm=y({connected:m(),endpoint:qm.nullable(),error:a().optional()}),Ym=qm.extend({id:a(),label:a(),mode:a().optional(),sourcePort:i().optional()}),Xm={name:`network-access`,scope:`system`,mode:`collection`,providerKind:`ingress`,methods:{start:R(_(),qm,{kind:`mutation`}),stop:R(_(),_(),{kind:`mutation`}),getEndpoint:R(_(),qm.nullable()),getStatus:R(_(),Jm),listEndpoints:R(_(),h(Ym).readonly())}},Zm=v([`image`,`video`,`gif`,`audio`,`icon`]),Qm=y({mediaType:Zm,url:a().optional(),bytes:p(Uint8Array).optional(),mime:a().optional(),name:a().optional()}).refine(e=>e.url!==void 0||e.bytes!==void 0,{message:"Attachment requires either `url` or `bytes`"}),$m=v([`text`,`markdown`,`html`]),eh=y({id:a(),label:a(),url:a().optional()}),th=y({body:a(),title:a().optional(),format:$m.default(`text`),priority:i().int().min(1).max(5).default(3),level:a().optional(),attachments:h(Qm).optional(),clickUrl:a().optional(),actions:h(eh).optional(),sound:a().optional(),ttl:i().optional(),tag:a().optional(),deviceId:i().optional(),eventId:a().optional(),metadata:o(a(),r()).optional()}),nh=y({id:a(),label:a(),ordinal:i().int().min(1).max(5).nullable(),flags:y({critical:m().optional(),silent:m().optional(),noPush:m().optional()}).optional(),requires:h(a()).optional(),description:a().optional()}),rh=y({attachments:y({mediaTypes:h(Zm),mode:v([`url`,`bytes`,`both`]),max:i().int().nonnegative(),maxBytes:i().int().positive().optional()}),actions:i().int().nonnegative(),levels:h(nh),format:h($m),clickUrl:m(),sound:m(),ttl:m(),bodyMaxLen:i().int().positive()}),ih=r(),ah=y({kind:a(),label:a(),icon:a(),addonId:a(),configSchema:ih,supportsDiscovery:m(),caps:rh}),oh=y({id:a(),name:a(),kind:a(),addonId:a(),enabled:m(),config:o(a(),r())}),sh=y({kind:a(),suggestedName:a(),config:o(a(),r())}),ch=y({level:a(),format:$m,attachmentsSent:i().int().nonnegative(),actionsSent:i().int().nonnegative(),truncated:m(),dropped:h(a())}),lh=y({success:m(),error:a().optional(),renderedAs:ch.optional()}),uh=lh,dh={name:`notification-output`,scope:`system`,mode:`collection`,methods:{listTargetKinds:R(y({}),h(ah)),listTargets:R(y({}),h(oh)),discoverTargets:R(y({kind:a(),config:o(a(),r()).optional()}),h(sh)),send:R(y({targetId:a(),notification:th}),lh,{kind:`mutation`}),testTarget:R(y({targetId:a(),sample:th.optional()}),uh,{kind:`mutation`}),upsertTarget:R(y({target:oh}),oh,{kind:`mutation`}),deleteTarget:R(y({targetId:a()}),_(),{kind:`mutation`}),setTargetEnabled:R(y({targetId:a(),enabled:m()}),_(),{kind:`mutation`})}},fh=v([`view`,`create`,`delete`]),ph=g([c(`*`),h(a())]),mh=o(a(),g([c(`*`),h(a())])),hh=v([`device`,`system`]),$=b(`type`,[y({type:c(`category`),target:hh,access:h(fh).min(1)}),y({type:c(`capability`),target:a(),access:h(fh).min(1)}),y({type:c(`addon`),target:a(),access:h(fh).min(1)}),y({type:c(`device`),targets:h(a()).min(1),access:h(fh).min(1)})]),gh=y({id:a(),username:a(),passwordHash:a(),isAdmin:m().default(!1),allowedProviders:ph,allowedDevices:mh,scopes:h($).default([]),createdAt:i(),updatedAt:i()}),_h=y({id:a(),label:a(),isAdmin:m().default(!1),allowedProviders:ph,allowedDevices:mh,tokenHash:a(),tokenPrefix:a(),createdAt:i(),lastUsedAt:i().optional()}),vh=y({id:a(),userId:a(),name:a(),tokenHash:a(),tokenPrefix:a(),scopes:h($),expiresAt:i().nullish(),lastUsedAt:i().nullish(),createdAt:i()}),yh=y({integrationId:a(),displayName:a(),requestedScopes:h($),allowedRedirectPrefixes:h(a()).min(1),hubUrl:a().optional()}),bh={name:`oauth-integration`,scope:`system`,mode:`collection`,internal:!0,methods:{getDescriptor:R(_(),yh)}},xh=v([`new`,`entered`,`left`,`moving`,`idle`]),Sh=v([`motion`,`object`,`audio`]),Ch=y({x:i(),y:i(),timestamp:i(),bbox:H}),wh=y({timestamp:i(),position:Ch,mediaKey:a()}),Th=y({trackId:a(),deviceId:i(),className:a(),label:a().optional(),firstSeen:i(),lastSeen:i(),positions:h(Ch).readonly(),snapshots:h(wh).readonly(),zonesVisited:h(a()).readonly(),totalDistance:i(),state:xh,active:m()}),Eh={id:a(),deviceId:i(),timestamp:i()},Dh=y({...Eh,kind:c(`motion`),regionCount:i(),regions:h(y({bbox:H,pixelCount:i(),intensity:i()})).readonly().optional(),frameWidth:i().optional(),frameHeight:i().optional(),mediaUrl:a().optional()}),Oh=v([`pipeline`,`onboard`]),kh=y({...Eh,kind:c(`object`),source:Oh.optional(),frameId:a().optional(),trackId:a().optional(),className:a(),label:a().optional(),confidence:i().optional(),bbox:H.optional(),zones:h(a()).readonly().optional(),state:xh.optional(),frameWidth:i().optional(),frameHeight:i().optional(),mediaKey:a().optional(),mediaUrl:a().optional()}),Ah=y({...Eh,kind:c(`audio`),rms:i(),dbfs:i(),classification:y({className:a(),originalClass:a().optional(),score:i()}).optional(),mediaUrl:a().optional()}),jh=v([`crop`,`thumbnail`,`snapshot`,`firstFrame`,`lastFrame`,`fullFrame`,`fullFrameBoxed`,`faceCrop`,`plateCrop`]),Mh=y({key:a(),kind:jh,base64:a(),sizeBytes:i(),timestamp:i()}),Nh=y({deviceId:i(),since:i().optional(),until:i().optional(),limit:i().int().min(1).max(5e3).default(1e3),projection:v([`full`,`slim`]).optional()}),Ph=Nh.extend({classFilter:a().optional()}),Fh=y({trackId:a(),className:a(),confidence:i(),bbox:H,zones:h(a()).readonly(),state:xh}),Ih=kh.extend({score:i()}),Lh=y({text:a(),deviceId:i().optional(),since:i().optional(),until:i().optional(),classFilter:a().optional(),limit:i().default(50),minScore:i().min(0).max(1).default(.2)}),Rh={name:`pipeline-analytics`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[F.Camera],exposesDeviceSettings:!0,methods:{getActiveTracks:R(y({deviceId:i()}),h(Th).readonly()),getTrack:R(y({deviceId:i(),trackId:a()}),Th.nullable()),listTracks:R(y({deviceId:i(),since:i().optional(),until:i().optional(),limit:i().optional()}),h(Th).readonly()),clearTracks:R(y({deviceId:i()}),_(),{kind:`mutation`,auth:`admin`}),getMotionEvents:R(Nh,h(Dh).readonly()),getObjectEvents:R(Ph,h(kh).readonly()),getAudioEvents:R(Nh,h(Ah).readonly()),getEventDensity:R(y({deviceId:i(),since:i(),until:i(),bucketMs:i().int().positive()}),h(y({bucketStart:i(),motion:i().int(),object:i().int(),audio:i().int()})).readonly()),pruneEventsBefore:R(y({deviceId:i(),cutoffMs:i()}),y({motion:i().int(),object:i().int(),audio:i().int()}),{kind:`mutation`,auth:`admin`}),getEventMedia:R(y({eventId:a(),kind:jh.optional()}),h(Mh).readonly()),getTrackMedia:R(y({trackId:a()}),h(Mh).readonly()),searchObjectEvents:R(Lh,h(Ih).readonly())},events:{onFrameTracked:{data:y({deviceId:i(),timestamp:i(),frameWidth:i(),frameHeight:i(),detections:h(Fh).readonly()})},onTrackStarted:{data:y({deviceId:i(),trackId:a(),className:a()})},onTrackEnded:{data:y({deviceId:i(),trackId:a(),className:a(),durationMs:i()})},onDetectionEvent:{data:y({deviceId:i(),kind:Sh,eventId:a(),timestamp:i()})}}},zh=y({engine:U.optional(),steps:h(W).readonly(),audio:y({engine:U.optional(),modelId:a().optional(),enabled:m(),settings:o(a(),r()).readonly().optional()}).nullable().optional()}),Bh=y({id:a(),name:a(),description:a().optional(),config:zh,createdAt:a(),updatedAt:a()}),Vh=y({enabled:m(),modelId:a().optional(),settings:o(a(),r()).readonly()}),Hh=y({addonDefaults:o(a(),Vh).readonly(),maxCameras:i().int().nonnegative().nullable().default(null),detectWeight:i().positive().optional(),detect:m().optional(),decode:m().optional(),audio:m().optional(),ingest:m().optional(),reachableHost:a().optional()}),Uh=y({steps:h(W).readonly(),audio:y({modelId:a(),enabled:m()}).nullable()}),Wh=y({enabled:m().optional(),modelId:a().optional(),settings:o(a(),r()).readonly().optional()}),Gh=y({pinnedAgentNodeId:a().optional(),stepToggles:o(a(),m()).optional(),stepOverridesByAgent:o(a(),o(a(),Wh)).optional(),pipelineByAgent:o(a(),Uh).optional()}),Kh=y({deviceId:i(),agentNodeId:a(),pinned:m(),reason:v([`manual`,`capacity`,`hardware-affinity`,`failover`,`rebalance`]),assignedAt:i()}),qh=y({nodeId:a(),online:m(),load:gc,score:i(),decodeHwaccel:a().nullable()}),Jh=y({totalAgents:i(),onlineAgents:i(),totalCameras:i(),attachedCameras:i(),activeCameras:i(),avgInferenceTimeMs:i(),queueDepth:i()}),Yh=o(a(),a()),Xh=y({ownerNodeId:a(),reachableHost:a().optional(),configIssue:a().optional()}),Zh=y({camStreamId:a(),codec:a(),width:i(),height:i(),fps:i(),kind:a()}),Qh=y({streams:h(Zh).readonly()}),$h=y({detectionNodeId:a().nullable(),decoderNodeId:a().nullable(),audioNodeId:a().nullable(),sourceNodeId:a().nullable(),pinned:y({detection:m(),decoder:m(),audio:m()}),reasons:y({detection:a().optional(),decoder:a().optional(),audio:a().optional()})}),eg=y({profile:a(),status:a(),codec:a(),width:i(),height:i(),subscribers:i(),inFps:i(),outFps:i()}),tg=y({profiles:h(eg).readonly(),webrtcSessions:i(),rtspRestream:m()}),ng=y({framesWritten:i(),getFrameHits:i(),getFrameMisses:i(),budgetMb:i()}),rg=y({nodeId:a(),formats:h(a()).readonly(),sessionCount:i(),shm:ng}),ig=y({enabled:m(),fps:i()}),ag=v([`idle`,`installing`,`verifying`,`ready`,`failed`]),og=y({state:ag,error:a().optional()}),sg=v([`idle`,`watching`,`active`]),cg=y({nodeId:a(),engine:y({backend:a(),device:a()}),phase:sg,configuredFps:i(),actualFps:i(),queueDepth:i(),avgInferenceMs:i(),provisioning:og}),lg=y({nodeId:a(),enabled:m()}),ug=v([`off`,`continuous`,`events`]),dg=y({mode:ug,active:m(),storageBytes:i()}),fg=y({deviceId:i(),assignment:$h,source:Qh,broker:tg.nullable(),decoder:rg.nullable(),motion:ig.nullable(),detection:cg.nullable(),audio:lg.nullable(),recording:dg.nullable(),fetchedAt:i()}),pg={name:`pipeline-orchestrator`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,exposesDeviceSettings:!0,methods:{assignPipeline:R(y({deviceId:i(),agentNodeId:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),unassignPipeline:R(y({deviceId:i()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),rebalance:R(_(),y({migrated:i()}),{kind:`mutation`,auth:`admin`}),getPipelineAssignments:R(_(),h(Kh).readonly()),getPipelineAssignment:R(y({deviceId:i()}),Kh.nullable()),getAgentLoad:R(_(),h(qh).readonly()),getGlobalMetrics:R(_(),Jh),getCameraMetrics:R(y({deviceId:i()}),ks.nullable()),getCapabilityBindings:R(y({nodeId:a()}),Yh),setCapabilityBinding:R(y({nodeId:a(),capName:a(),addonId:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),getIngestOwner:R(_(),Xh),assignAudio:R(y({deviceId:i(),nodeId:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),unassignAudio:R(y({deviceId:i()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),getAudioAssignment:R(y({deviceId:i()}),y({nodeId:a(),pinned:m(),assignedAt:i()}).nullable()),getAudioNodeLoad:R(_(),h(y({nodeId:a(),deviceCount:i()}))),getAudioAssignments:R(_(),h(y({deviceId:i(),nodeId:a(),pinned:m(),assignedAt:i()}))),getAgentSettings:R(y({agentNodeId:a()}),Hh.nullable()),listAgentSettings:R(_(),h(y({nodeId:a(),settings:Hh})).readonly()),setAgentAddonDefaults:R(y({agentNodeId:a(),defaults:o(a(),Vh)}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),removeAgentSettings:R(y({agentNodeId:a()}),y({success:m(),removed:m()}),{kind:`mutation`,auth:`admin`}),setAgentMaxCameras:R(y({agentNodeId:a(),maxCameras:i().int().nonnegative().nullable()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),setAgentDetectWeight:R(y({agentNodeId:a(),detectWeight:i().positive().nullable()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),setAgentCapabilities:R(y({agentNodeId:a(),detect:m().nullable().optional(),audio:m().nullable().optional(),ingest:m().nullable().optional()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),setAgentReachableHost:R(y({agentNodeId:a(),reachableHost:a().nullable()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),resetNodePipelineDefaults:R(y({agentNodeId:a()}),y({success:c(!0),effectiveModelId:a().nullable(),clearedCameraOverrides:i()}),{kind:`mutation`,auth:`admin`}),getCameraSettings:R(y({deviceId:i()}),Gh.nullable()),setCameraStepToggle:R(y({deviceId:i(),addonId:a(),enabled:m().nullable()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),getCameraStepOverrides:R(y({deviceId:i()}),o(a(),o(a(),Wh)).nullable()),setCameraStepOverride:R(y({deviceId:i(),agentNodeId:a(),addonId:a(),patch:Wh.nullable()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),setCameraPipelineForAgent:R(y({deviceId:i(),agentNodeId:a(),pipeline:Uh.nullable()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),resolvePipeline:R(y({deviceId:i(),agentNodeId:a().optional()}),zh),getCameraStatus:R(y({deviceId:i()}),fg),getCameraStatuses:R(y({deviceIds:h(i()).optional()}),h(fg).readonly()),listTemplates:R(_(),h(Bh).readonly()),saveTemplate:R(y({name:a(),description:a().optional(),config:zh}),Bh,{kind:`mutation`,auth:`admin`}),updateTemplate:R(y({id:a(),name:a().optional(),description:a().optional(),config:zh.optional()}),Bh,{kind:`mutation`,auth:`admin`}),deleteTemplate:R(y({id:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`})}},mg=v([`workspace`,`baked`,`data-root`]),hg=v([`idle`,`checking`,`staging`,`pending-restart`,`awaiting-confirmation`]),gg=y({fromVersion:a(),toVersion:a().nullable(),atMs:i(),reason:a()}),_g=y({packageName:a(),runningVersion:a().nullable(),nodeRuntimeVersion:a().nullable(),activeVersion:a().nullable(),previousVersion:a().nullable(),seedVersion:a().nullable(),latestVersion:a().nullable(),updateAvailable:m(),bootMode:mg,updateState:hg,pendingVersion:a().nullable(),rolledBack:gg.nullable(),stateFileCorrupt:m(),lastCheckedAtMs:i().nullable()}),vg=y({packageName:a(),runningVersion:a().nullable(),latestVersion:a().nullable(),updateAvailable:m(),checkedAtMs:i(),error:a().nullable()}),yg=y({accepted:m(),targetVersion:a().nullable(),restarting:m(),message:a()}),bg={name:`server-management`,scope:`system`,mode:`singleton`,methods:{getServerPackageStatus:R(_(),_g,{auth:`admin`}),checkServerUpdate:R(_(),vg,{kind:`mutation`,auth:`admin`}),applyServerUpdate:R(y({version:a().optional()}),yg,{kind:`mutation`,auth:`admin`}),rollbackServerUpdate:R(_(),yg,{kind:`mutation`,auth:`admin`}),restartServer:R(_(),yg,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},xg=y({where:o(a(),r()).optional(),whereIn:o(a(),h(r())).optional(),whereBetween:o(a(),s([r(),r()])).optional(),orderBy:y({field:a(),direction:v([`asc`,`desc`])}).optional(),limit:i().optional(),offset:i().optional()}),Sg=y({id:a(),data:o(a(),r())}),Cg=y({name:a(),type:v([`TEXT`,`INTEGER`,`REAL`,`JSON`,`BOOLEAN`]),primaryKey:m().optional(),notNull:m().optional(),unique:m().optional()}),wg=y({name:a(),columns:h(a()).readonly(),unique:m().optional()}),Tg={name:`settings-store`,scope:`system`,mode:`singleton`,methods:{get:R(y({namespace:a().optional(),collection:a(),key:a()}),r()),set:R(y({namespace:a().optional(),collection:a(),key:a(),value:r()}),_(),{kind:`mutation`}),query:R(y({namespace:a().optional(),collection:a(),filter:xg.optional()}),h(Sg).readonly()),insert:R(y({namespace:a().optional(),collection:a(),record:Sg}),_(),{kind:`mutation`}),update:R(y({namespace:a().optional(),collection:a(),id:a(),data:o(a(),r())}),_(),{kind:`mutation`}),delete:R(y({namespace:a().optional(),collection:a(),key:a()}),_(),{kind:`mutation`}),count:R(y({namespace:a().optional(),collection:a(),filter:xg.optional()}),i()),histogram:R(y({namespace:a().optional(),collection:a(),field:a(),bucketSize:i().int().positive(),origin:i().int(),filter:xg.optional()}),h(y({bucket:i().int(),count:i().int()})).readonly()),isEmpty:R(y({namespace:a().optional(),collection:a()}),m()),declareCollection:R(y({namespace:a().optional(),collection:a(),columns:h(Cg).readonly(),indexes:h(wg).readonly().optional()}),_(),{kind:`mutation`})}},Eg=f(),Dg=y({to:g([Eg,h(Eg).min(1)]),cc:h(Eg).optional(),bcc:h(Eg).optional(),from:a().optional(),replyTo:a().optional(),subject:a(),text:a(),html:a().optional()}),Og=y({messageId:a(),accepted:h(Eg).default([]),rejected:h(Eg).default([])}),kg=y({ready:m(),host:a(),error:a().optional(),lastVerifiedAt:i().optional()}),Ag={name:`smtp-provider`,scope:`system`,mode:`collection`,internal:!0,providerKind:`email`,methods:{sendEmail:R(Dg,Og,{kind:`mutation`,auth:`admin`,access:`create`}),verify:R(_(),kg,{kind:`mutation`,auth:`admin`,access:`view`}),getStatus:R(_(),kg,{auth:`admin`})}},jg=y({base64:a(),contentType:a()}),Mg=y({lastCapturedAt:i().nullable(),cacheAgeMs:i().nullable(),lastBytes:i().nullable(),lastStreamId:a().nullable()}),Ng={name:`snapshot`,scope:`device`,deviceNative:!0,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[F.Camera],exposesDeviceSettings:!0,methods:{getSnapshot:R(y({deviceId:i(),streamId:a().optional(),force:m().optional()}),jg.nullable()),invalidateCache:R(y({deviceId:i()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Mg,kind:`poll`}},Pg=y({userId:a(),username:a(),isAdmin:m(),provider:a(),email:a().optional(),displayName:a().optional(),hubUrl:a().optional(),scopes:h($).optional(),redirectUri:a().optional(),integrationId:a().optional(),jti:a().optional(),sessionId:a().optional()}),Fg={name:`sso-bridge`,scope:`system`,mode:`singleton`,internal:!0,methods:{signBridgeToken:R(y({claims:Pg,ttlSec:i().int().positive().optional()}),y({token:a()})),verifyBridgeToken:R(y({token:a()}),Pg.nullable())}},Ig=b(`shouldSaveDiskSpace`,[y({providerId:a().min(1),displayName:a().min(1),configSchema:r(),nodeLocal:m(),shouldSaveDiskSpace:c(!0),minFreePercent:i().min(0).max(100)}),y({providerId:a().min(1),displayName:a().min(1),configSchema:r(),nodeLocal:m(),shouldSaveDiskSpace:c(!1),minFreePercent:c(null)})]),Lg={name:`storage`,scope:`system`,mode:`singleton`,methods:{resolve:R(y({location:E,relativePath:a()}),a()),write:R(y({location:E,relativePath:a(),data:p(Uint8Array)}),_(),{kind:`mutation`}),read:R(y({location:E,relativePath:a()}),p(Uint8Array)),exists:R(y({location:E,relativePath:a()}),m()),list:R(y({location:E,prefix:a().optional()}),h(a()).readonly()),delete:R(y({location:E,relativePath:a()}),_(),{kind:`mutation`}),getAvailableSpace:R(y({location:E}),i().nullable()),beginUpload:R(y({location:E,relativePath:a(),sizeBytes:i().optional()}),y({uploadId:a()}),{kind:`mutation`}),writeChunk:R(y({uploadId:a(),offset:i(),data:p(Uint8Array)}),_(),{kind:`mutation`}),finalizeUpload:R(y({uploadId:a()}),_(),{kind:`mutation`}),abortUpload:R(y({uploadId:a()}),_(),{kind:`mutation`}),beginDownload:R(y({location:E,relativePath:a()}),y({downloadId:a(),sizeBytes:i()}),{kind:`mutation`}),readChunk:R(y({downloadId:a(),offset:i(),length:i()}),p(Uint8Array)),endDownload:R(y({downloadId:a()}),_(),{kind:`mutation`}),listLocations:R(y({type:yn.optional()}),h(T).readonly()),getDefaultLocation:R(y({type:yn}),T.nullable()),listLocationDeclarations:R(_(),h(bn).readonly()),upsertLocation:R(T.omit({createdAt:!0,updatedAt:!0}),T,{kind:`mutation`,auth:`admin`}),deleteLocation:R(y({id:a()}),_(),{kind:`mutation`,auth:`admin`}),testLocation:R(y({id:a()}),y({ok:m(),error:a().optional()}),{auth:`admin`}),listProviders:R(_(),h(Ig).readonly()),testConfig:R(y({providerId:a(),config:o(a(),r())}),y({ok:m(),error:a().optional()}),{auth:`admin`})}},Rg=y({bytes:i().int().nonnegative()}),zg=y({reclaimedBytes:i().int().nonnegative(),exhausted:m()}),Bg={name:`storage-evictable`,scope:`system`,mode:`collection`,internal:!0,methods:{getEvictableUsage:R(y({locationId:a()}),Rg),evict:R(y({locationId:a(),targetBytes:i().int().positive()}),zg,{kind:`mutation`})}},Vg=b(`shouldSaveDiskSpace`,[y({providerId:a().min(1),displayName:a().min(1),configSchema:r(),nodeLocal:m(),shouldSaveDiskSpace:c(!0),minFreePercent:i().min(0).max(100)}),y({providerId:a().min(1),displayName:a().min(1),configSchema:r(),nodeLocal:m(),shouldSaveDiskSpace:c(!1),minFreePercent:c(null)})]),Hg=y({ok:m(),error:a().optional()}),Ug=y({location:T,relativePath:a(),sizeBytes:i().optional()}),Wg=y({uploadId:a()}),Gg=y({uploadId:a(),offset:i(),data:p(Uint8Array)}),Kg=y({uploadId:a()}),qg=y({uploadId:a()}),Jg=y({location:T,relativePath:a()}),Yg=y({downloadId:a(),sizeBytes:i()}),Xg=y({downloadId:a(),offset:i(),length:i()}),Zg=y({downloadId:a()}),Qg={name:`storage-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{getProviderInfo:R(_(),Vg),testLocation:R(y({config:o(a(),r())}),Hg,{auth:`admin`}),resolve:R(y({location:T,relativePath:a()}),a()),write:R(y({location:T,relativePath:a(),data:p(Uint8Array)}),_(),{kind:`mutation`}),read:R(y({location:T,relativePath:a()}),p(Uint8Array)),exists:R(y({location:T,relativePath:a()}),m()),list:R(y({location:T,prefix:a().optional()}),h(a()).readonly()),delete:R(y({location:T,relativePath:a()}),_(),{kind:`mutation`}),getAvailableSpace:R(y({location:T}),i().nullable()),beginUpload:R(Ug,Wg,{kind:`mutation`}),writeChunk:R(Gg,_(),{kind:`mutation`}),finalizeUpload:R(Kg,_(),{kind:`mutation`}),abortUpload:R(qg,_(),{kind:`mutation`}),beginDownload:R(Jg,Yg,{kind:`mutation`}),readChunk:R(Xg,p(Uint8Array)),endDownload:R(Zg,_(),{kind:`mutation`})}},$g=y({urls:g([a(),h(a())]),username:a().optional(),credential:a().optional()}),e_={name:`turn-provider`,scope:`system`,mode:`collection`,methods:{getTurnServers:R(_(),h($g).readonly())}},t_=y({credentialId:a(),label:a(),createdAt:i(),lastUsedAt:i().nullable(),transports:h(a()).default([])}),n_={name:`user-passkeys`,scope:`system`,mode:`collection`,internal:!0,methods:{beginRegistration:R(y({userId:a(),username:a()}),y({optionsJSON:o(a(),r())}),{kind:`mutation`,auth:`admin`,access:`create`}),finishRegistration:R(y({userId:a(),response:o(a(),r()),label:a()}),y({success:c(!0),credentialId:a()}),{kind:`mutation`,auth:`admin`,access:`create`}),beginAuthentication:R(y({userId:a().optional()}),y({optionsJSON:o(a(),r())}),{kind:`mutation`,access:`view`}),finishAuthentication:R(y({userId:a(),response:o(a(),r())}),y({verified:m()}),{kind:`mutation`,access:`view`}),beginDiscoverableAuthentication:R(y({}),y({optionsJSON:o(a(),r())}),{kind:`mutation`,access:`view`}),finishDiscoverableAuthentication:R(y({response:o(a(),r())}),y({verified:m(),userId:a().nullable()}),{kind:`mutation`,access:`view`}),listPasskeys:R(y({userId:a()}),h(t_),{auth:`admin`}),removePasskey:R(y({userId:a(),credentialId:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`})}},r_=y({id:a(),source:a(),kind:v([`motion`,`object`,`audio`,`native`]),timeRange:y({startMs:i(),endMs:i()}),thumbnail:a().optional()}),i_=y({playbackUrl:a(),playbackEndpoints:h(a()).optional(),token:a().optional()}),a_={name:`videoclips`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,methods:{listClips:R(y({deviceId:i(),since:i(),until:i(),limit:i().int().positive().optional()}),h(r_).readonly(),{kind:`query`,auth:`admin`}),getClipPlayback:R(y({deviceId:i(),clipId:a()}),i_,{kind:`query`,auth:`admin`})}},o_=y({viewportWidth:i().int().positive().optional(),viewportHeight:i().int().positive().optional(),devicePixelRatio:i().positive().optional(),downlinkMbps:i().nonnegative().optional(),prefersTier:a().optional()}).partial(),s_=b(`kind`,[y({kind:c(`adaptive`)}),y({kind:c(`profile`),profile:S}),y({kind:c(`cam-stream`),camStreamId:a().min(1)})]),c_=y({id:a(),label:a(),target:s_,codec:a().nullable(),resolution:y({width:i(),height:i()}).nullable(),status:v([`idle`,`connecting`,`streaming`,`error`,`stopped`]).nullable(),inputFps:i().nullable(),decodeFps:i().nullable(),bitrateKbps:i().nullable()}),l_={name:`webrtc-session`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,preferredProvider:`stream-broker`,deviceTypes:[F.Camera],methods:{listStreams:R(y({deviceId:i().int().nonnegative()}),h(c_)),createSession:R(y({deviceId:i().int().nonnegative(),target:s_,hints:o_.optional(),relayOnly:m().optional(),consumerAttribution:ja.optional()}),y({sessionId:a(),sdpOffer:a()}),{kind:`mutation`}),handleOffer:R(y({deviceId:i().int().nonnegative(),target:s_.optional(),sdpOffer:a(),sessionId:a().optional(),relayOnly:m().optional(),nonTrickle:m().optional(),disableTurn:m().optional(),disableIpv6:m().optional(),consumerAttribution:ja.optional()}),y({sessionId:a(),sdpAnswer:a()}),{kind:`mutation`}),handleAnswer:R(y({deviceId:i().int().nonnegative(),sessionId:a(),sdpAnswer:a()}),_(),{kind:`mutation`}),addIceCandidate:R(y({deviceId:i().int().nonnegative(),sessionId:a(),candidate:a(),sdpMid:a().nullable().optional(),sdpMLineIndex:i().int().nullable().optional()}),_(),{kind:`mutation`}),getIceCandidates:R(y({deviceId:i().int().nonnegative(),sessionId:a()}),y({candidates:h(y({candidate:a(),sdpMid:a().nullable(),sdpMLineIndex:i().int().nullable()})),done:m()}),{kind:`query`}),closeSession:R(y({deviceId:i().int().nonnegative(),sessionId:a()}),_(),{kind:`mutation`}),hasAdaptiveBitrate:R(y({deviceId:i().int().nonnegative(),profile:S}),m()),getSessionState:R(y({deviceId:i().int().nonnegative(),sessionId:a()}),y({pendingRenegotiation:y({target:s_,epoch:i()}).nullable()}))},mount:{kind:`server-provided`}},u_=y({childDeviceIds:h(i()).readonly(),hiddenChildIds:h(i()).readonly()}),d_={name:`accessories`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera,F.Hub,F.Switch,F.Light,F.Sensor,F.Thermostat,F.Cover,F.Lock,F.Fan,F.MediaPlayer,F.AlarmPanel,F.Generic],methods:{setChildHidden:R(y({deviceId:i().int().nonnegative(),childDeviceId:i().int().nonnegative(),hidden:m()}),_(),{kind:`mutation`,auth:`admin`})},events:{onAccessoriesChanged:{data:y({deviceId:i(),childDeviceIds:h(i()).readonly(),hiddenChildIds:h(i()).readonly()})},onChildVisibilityChanged:{data:y({deviceId:i(),childDeviceId:i(),hidden:m()})}},status:{schema:u_,kind:`command-driven`}},f_=v([`install`,`update`,`uninstall`,`restart`]),p_=v([`queued`,`fetching`,`staged`,`validating`,`applying`,`restarting`,`applied`,`done`,`failed`,`skipped`]),m_=v([`framework`,`addon`]),h_=y({tsMs:i(),nodeId:a(),packageName:a(),phase:p_,message:a()}),g_=y({taskId:a(),nodeId:a(),packageName:a(),fromVersion:a().nullable(),toVersion:a(),target:m_,phase:p_,stagedPath:a().nullable(),attempts:i(),steps:h(h_),error:a().nullable(),startedAtMs:i().nullable(),finishedAtMs:i().nullable()}),__=v([`running`,`completed`,`failed`,`partially-failed`,`cancelled`]),v_=v([`single`,`bulk`,`cluster`]),y_=y({jobId:a(),kind:f_,createdAtMs:i(),createdBy:a(),scope:v_,tasks:h(g_),state:__,schemaVersion:c(1)}),b_=v([`debug`,`info`,`warn`,`error`]),x_=v([`off`,`latest`,`beta`]),S_=v([`off`,`latest`,`beta`,`inherit`]),C_=y({id:a(),name:a().optional(),version:a().optional(),description:a().optional(),icon:a().optional(),color:a().optional(),capabilities:h(r()).readonly().optional(),packageName:a(),packageVersion:a(),packageDisplayName:a().optional(),bundle:y({displayName:a(),description:a().optional(),icon:a().optional()}).optional(),protected:m().optional(),removable:m().optional()}),w_=y({pid:i().optional(),mode:a(),state:a()}),T_=y({phase:v([`pending`,`healthy`,`failed`]),retryCount:i(),firstFailureAt:i().nullable(),lastAttemptAt:i().nullable(),lastError:y({message:a(),stack:a().optional()}).nullable(),nextRetryAt:i().nullable(),alertEmitted:m(),retrying:m(),inGracePeriod:m()}),E_=y({manifest:C_,declaration:r().optional(),source:a(),installSource:a().optional(),process:w_.optional(),hasBackup:m().optional(),health:T_.nullable().optional()}),D_=y({name:a(),version:a(),dir:a(),installSource:a().optional()}),O_=y({name:a(),currentVersion:a(),latestVersion:a(),category:v([`addon`,`core`]),requiresRestart:m(),isSystem:m()}),k_=y({version:a(),publishedAt:a(),deprecated:a().optional(),distTags:h(a()).readonly()}),A_=y({name:a(),version:a(),description:a(),keywords:h(a()).readonly(),publishedAt:a(),author:a(),installed:m(),installedVersion:a().optional()}),j_=y({channel:x_,intervalSeconds:i()}),M_=S_,N_=r(),P_=r(),F_=r(),I_=y({packageName:a(),fromVersion:a(),toVersion:a(),restartingAt:i()}),L_=v([`queued`,`updating`,`done`,`done-pending-restart`,`failed`]),R_=y({name:a(),isSystem:m(),fromVersion:a(),toVersion:a(),status:L_,error:a().optional(),startedAtMs:i().optional(),completedAtMs:i().optional()}),z_=v([`regular`,`system`,`restarting`,`finalizing`]);y({id:a(),nodeId:a(),startedAtMs:i(),completedAtMs:i().optional(),total:i(),completed:i(),failed:i(),current:a().nullable(),phase:z_,cancelled:m(),items:h(R_).readonly()});var B_=y({packageName:a(),currentVersion:a(),latestVersion:a().nullable(),hasUpdate:m(),description:a().optional(),buildId:a().nullable()}),V_=y({timestamp:a(),level:a(),message:a(),scope:a().optional()}),H_=r(),U_=y({addonId:a().min(1),action:a().min(1),input:r()}),W_={name:`addons`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{list:R(_(),h(E_).readonly()),getLogs:R(y({addonId:a(),limit:i().min(1).max(500).default(100),level:b_.optional()}),h(H_)),listPackages:R(_(),h(D_).readonly()),installPackage:R(y({packageName:a(),version:a().optional()}),P_,{kind:`mutation`,auth:`admin`}),installFromWorkspace:R(y({packageName:a()}),P_,{kind:`mutation`,auth:`admin`}),isWorkspaceAvailable:R(_(),m()),listWorkspacePackages:R(_(),h(r()).readonly()),uninstallPackage:R(y({packageName:a()}),r(),{kind:`mutation`,auth:`admin`}),reloadPackages:R(_(),F_,{kind:`mutation`,auth:`admin`}),searchAvailable:R(y({query:a().optional()}),h(A_)),listUpdates:R(y({nodeId:a().optional()}),h(O_).readonly(),{auth:`admin`}),updatePackage:R(y({name:a().min(1),version:a().optional(),nodeId:a().optional()}),r(),{kind:`mutation`,auth:`admin`}),rollbackPackage:R(y({name:a().min(1)}),y({rolledBackTo:a().nullable()}),{kind:`mutation`,auth:`admin`}),forceRefresh:R(y({nodeId:a().optional()}),r(),{kind:`mutation`,auth:`admin`}),restartServer:R(y({confirm:c(!0)}),r(),{kind:`mutation`,auth:`admin`}),getLastRestart:R(_(),y({kind:v([`framework-update`,`manual`,`system`,`framework-bulk-update`]),packageName:a().optional(),fromVersion:a().optional(),toVersion:a().optional(),requestedBy:a().optional(),requestedAt:i()}).nullable(),{auth:`admin`}),listFrameworkPackages:R(_(),h(B_).readonly(),{auth:`admin`}),listCapabilityProviders:R(y({capName:a().min(1)}),h(y({addonId:a(),mode:v([`singleton`,`collection`]),isActive:m()})).readonly()),setCapabilityProviderEnabled:R(y({capName:a().min(1),addonId:a().min(1),enabled:m()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),updateFrameworkPackage:R(y({packageName:a().min(1),version:a().optional(),deferRestart:m().optional()}),I_,{kind:`mutation`,auth:`admin`}),getVersions:R(y({name:a()}),h(k_).readonly()),restartAddon:R(y({addonId:a()}),N_,{kind:`mutation`,auth:`admin`}),retryLoad:R(y({packageName:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),getAutoUpdateSettings:R(_(),j_,{auth:`admin`}),setAutoUpdateSettings:R(y({channel:x_,intervalSeconds:i().min(300).max(86400).optional()}),r(),{kind:`mutation`,auth:`admin`}),getAddonAutoUpdate:R(y({addonId:a()}),M_,{auth:`admin`}),setAddonAutoUpdate:R(y({addonId:a(),channel:S_}),r(),{kind:`mutation`,auth:`admin`}),applyAutoUpdateToAll:R(y({channel:x_}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),custom:R(U_,r(),{kind:`mutation`}),startJob:R(y({kind:v([`install`,`update`,`uninstall`,`restart`]),targets:h(y({name:a().min(1),version:a().min(1)})).min(1),nodeIds:h(a()).optional()}),y({jobId:a()}),{kind:`mutation`,auth:`admin`}),getJob:R(y({jobId:a()}),y_.nullable(),{auth:`admin`}),listJobs:R(y({activeOnly:m().optional()}),h(y_),{auth:`admin`}),cancelJob:R(y({jobId:a()}),y({cancelled:m()}),{kind:`mutation`,auth:`admin`}),onAddonLogs:R(y({addonId:a(),level:b_.optional()}),V_,{kind:`subscription`})},mount:{kind:`server-provided`}},G_={name:`button`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Button],methods:{press:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`})}},K_=y({host:a(),port:i().int().positive().optional(),onvifPort:i().int().positive().optional(),rtspPort:i().int().positive().optional(),https:m().optional(),username:a().optional(),password:a().optional(),onvifProfile:a().optional()}),q_=y({host:a(),port:i().int().positive().nullable(),onvifPort:i().int().positive().nullable(),rtspPort:i().int().positive().nullable(),https:m().nullable(),hasUsername:m(),hasPassword:m(),onvifProfile:a().nullable()}),J_={name:`camera-credentials`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera],methods:{getCredentials:R(y({deviceId:i()}),K_.nullable(),{kind:`query`,auth:`admin`})},status:{schema:q_,kind:`command-driven`}},Y_=y({id:a(),label:a(),protocol:v([`rtsp`,`rtmp`,`annexb`,`http-mjpeg`,`webrtc`,`custom`]),url:a().optional(),resolution:y({width:i(),height:i()}).optional(),fps:i().optional(),bitrate:i().optional(),codec:a().optional(),profileHint:S.optional(),sdp:a().optional()}),X_=y({key:a(),value:r()}),Z_=y({source:a(),data:o(a(),r())}),Q_={name:`device-ops`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{getStreamSources:R(y({deviceId:i()}),h(Y_)),getConfigEntries:R(y({deviceId:i()}),h(X_)),setConfig:R(y({deviceId:i(),values:o(a(),r())}),_(),{kind:`mutation`}),runAction:R(y({deviceId:i(),action:a().min(1),input:r()}),r(),{kind:`mutation`}),removeDevice:R(y({deviceId:i()}),_(),{kind:`mutation`}),getSettingsSchema:R(y({deviceId:i()}),r().nullable()),getRawState:R(y({deviceId:i()}),Z_.nullable(),{auth:`protected`})}},$_=y({id:a(),type:a(),timestamp:i(),label:a().optional(),thumbnailUrl:a().optional(),clipUrl:a().optional(),metadata:o(a(),r()).optional()}),ev={name:`events`,scope:`device`,mode:`singleton`,deviceTypes:[F.Camera],methods:{getEvents:R(y({deviceId:i(),from:i().optional(),to:i().optional(),limit:i().optional()}),h($_)),getEventThumbnail:R(y({deviceId:i(),eventId:a()}),y({base64:a(),contentType:a()}).nullable()),getEventClipUrl:R(y({deviceId:i(),eventId:a()}),a().nullable())}},tv=y({id:a(),name:a(),sampleCount:i().int().nonnegative(),coverMediaKey:a().optional(),coverBase64:a().optional()}),nv=y({id:a(),source:v([`detected`,`photo`]),addedAt:i().int(),deviceId:i().int().optional(),base64:a().optional()}),rv=y({faceId:a(),deviceId:i().int(),trackId:a(),timestamp:i().int(),recognizedIdentityId:a().optional(),identityName:a().optional(),assigned:m(),base64:a().optional()}),iv=v([`unassigned`,`recognized`,`all`]),av=y({key:a(),kind:a(),base64:a(),sizeBytes:i(),timestamp:i()}),ov={name:`face-gallery`,scope:`system`,mode:`singleton`,methods:{listIdentities:R(_(),h(tv).readonly()),createIdentity:R(y({name:a().min(1)}),tv,{kind:`mutation`,auth:`admin`}),renameIdentity:R(y({id:a(),name:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),deleteIdentity:R(y({id:a()}),_(),{kind:`mutation`,auth:`admin`}),listIdentitySamples:R(y({identityId:a()}),h(nv).readonly()),removeSample:R(y({identityId:a(),sampleId:a()}),_(),{kind:`mutation`,auth:`admin`}),listRecentFaces:R(y({limit:i().int().positive().optional(),filter:iv.optional()}).optional(),h(rv).readonly()),getFaceByTrack:R(y({deviceId:i().int(),trackId:a()}),rv.nullable()),getFaceMedia:R(y({faceId:a()}),h(av).readonly()),assignFace:R(y({faceId:a(),identityId:a()}),_(),{kind:`mutation`,auth:`admin`}),unassignFace:R(y({faceId:a()}),_(),{kind:`mutation`,auth:`admin`}),deleteFace:R(y({faceId:a()}),_(),{kind:`mutation`,auth:`admin`}),assignFaces:R(y({faceIds:h(a()).min(1),identityId:a()}),y({assigned:i().int(),failed:h(a()).readonly()}),{kind:`mutation`,auth:`admin`}),unassignFaces:R(y({faceIds:h(a()).min(1)}),y({unassigned:i().int(),failed:h(a()).readonly()}),{kind:`mutation`,auth:`admin`}),suggestFaceClusters:R(y({threshold:i().min(0).max(1).optional(),minClusterSize:i().int().min(2).optional(),limit:i().int().positive().optional()}).optional(),h(y({faceIds:h(a()).readonly(),representativeFaceId:a(),size:i().int(),cohesion:i()})).readonly())}},sv=y({id:a(),addonId:a(),name:a(),enabled:m(),info:o(a(),r()).readonly(),createdAt:i(),updatedAt:i(),processState:a()}),cv=y({id:a(),addonId:a(),name:a(),enabled:m(),info:o(a(),r()).readonly(),createdAt:i(),updatedAt:i()}),lv=y({addonId:a(),name:a(),description:a(),iconUrl:a().nullable(),color:a(),instanceMode:a(),mode:v([`standalone`,`account`,`broker`]),discoveryMode:a(),kind:v([`device-adoption`,`device-provider`]),brokerKind:a().nullable(),supportsLocationImport:m(),existingInstances:h(y({id:a(),name:a()})),canAdd:m()}),uv=y({success:m(),error:a().optional()}),dv=y({addonId:a(),name:a(),enabled:m().optional(),info:o(a(),r()).optional(),settings:o(a(),r()).optional(),skipRestart:m().optional()}),fv=y({id:a(),name:a().optional(),enabled:m().optional(),info:o(a(),r()).optional()}),pv=y({success:m(),deletedId:a()}),mv={name:`integrations`,scope:`system`,mode:`singleton`,methods:{list:R(_(),h(sv)),get:R(y({id:a()}),sv),getByAddonId:R(y({addonId:a()}),cv.nullable()),create:R(dv,cv,{kind:`mutation`,auth:`admin`}),update:R(fv,cv,{kind:`mutation`,auth:`admin`}),delete:R(y({id:a()}),pv,{kind:`mutation`,auth:`admin`}),getSettings:R(y({id:a()}),o(a(),r()),{auth:`admin`}),setSettings:R(y({id:a(),settings:o(a(),r())}),y({success:m()}),{kind:`mutation`,auth:`admin`}),getAvailableTypes:R(_(),h(lv),{auth:`admin`}),testConnection:R(y({addonId:a(),settings:o(a(),r())}),uv,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},hv=y({codecs:h(a()),sampleRate:i(),duplex:v([`half`,`full`]),maxBacklogMs:i()}),gv=y({talking:m(),lastSessionAt:i().nullable(),ability:hv.nullable()}),_v=v([`opus`,`s16le`,`g711ulaw`,`g711alaw`]),vv={name:`intercom`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera],methods:{startSession:R(y({deviceId:i()}),y({sessionId:a(),sdpOffer:a()}),{kind:`mutation`,auth:`admin`}),handleAnswer:R(y({deviceId:i(),sessionId:a(),sdpAnswer:a()}),_(),{kind:`mutation`,auth:`admin`}),stopSession:R(y({deviceId:i(),sessionId:a()}),_(),{kind:`mutation`,auth:`admin`}),startTalkSession:R(y({deviceId:i()}),y({sessionId:a()}),{kind:`mutation`,auth:`admin`}),pushTalkAudio:R(y({deviceId:i(),audioBase64:a(),codec:_v.optional(),sampleRate:i().int().positive().optional(),channels:i().int().positive().optional(),sequenceNumber:i().int()}),y({accepted:m()}),{kind:`mutation`,auth:`admin`}),endTalkSession:R(y({deviceId:i()}),_(),{kind:`mutation`,auth:`admin`})},events:{onStatusChanged:{data:y({deviceId:i(),status:gv})}},status:{schema:gv,kind:`command-driven`}},yv=v([`lan`,`wifi`,`docker`,`vpn`,`loopback`,`other`]),bv=y({name:a(),family:v([`IPv4`,`IPv6`]),address:a(),cidr:a(),netmask:a(),internal:m(),mac:a(),kind:yv,preferred:m(),plausible:m(),plausibleReason:a()}),xv=y({interfaces:h(bv).readonly(),probedAt:i()}),Sv=bv.nullable(),Cv=y({endpoints:h(y({label:a(),baseUrl:a(),kind:v([`lan-ipv4`,`lan-ipv6`,`public`,`loopback`]),interfaceKind:v([`lan`,`wifi`,`docker`,`vpn`,`other`,`loopback`,`public`]),plausible:m(),plausibleReason:a(),priority:i()})).readonly()}),wv=y({addresses:h(a()).readonly()}),Tv={name:`local-network`,scope:`system`,mode:`singleton`,methods:{list:R(_(),xv),getPreferred:R(_(),Sv),getConnectionEndpoints:R(y({port:i().int().min(1).max(65535),includeLoopback:m().optional(),ipv4Only:m().optional(),scheme:v([`http`,`https`]).optional()}),Cv),getAllowedAddresses:R(_(),wv),setAllowedAddresses:R(wv,y({success:c(!0)}),{kind:`mutation`}),resetAllowlistToBestMatch:R(_(),wv,{kind:`mutation`})},mount:{kind:`hub-only`}},Ev=y({id:a(),label:a(),scope:v([`mesh`,`public`]),url:a(),hostname:a(),port:i(),protocol:v([`http`,`https`])}),Dv=y({id:a(),hostname:a(),magicDns:a(),addresses:h(a()).readonly(),os:a().optional(),online:m(),lastSeenMs:i(),isSelf:m(),connection:v([`direct`,`relay`,`idle`]),relay:a().nullable(),lastHandshakeMs:i(),rxBytes:i(),txBytes:i(),tags:h(a()).readonly(),exitNodeOption:m(),advertisedRoutes:h(a()).readonly(),userLogin:a().nullable(),keyExpiry:i().nullable()}),Ov=y({joined:m(),meshIp:a(),magicDnsHostname:a(),peerCount:i(),endpoints:h(Ev).readonly(),error:a().optional(),tenantName:a(),magicDnsSuffix:a(),userLogin:a().nullable(),controlPlaneUrl:a(),keyExpiry:i().nullable(),daemonSocket:a().optional(),daemonCliPath:a().optional()}),kv={name:`mesh-network`,scope:`system`,mode:`collection`,providerKind:`mesh`,methods:{getStatus:R(_(),Ov),join:R(y({authKey:a().min(8),hostname:a().optional()}),y({joined:c(!0)}),{kind:`mutation`}),startLogin:R(y({hostname:a().optional()}),y({loginUrl:a()}),{kind:`mutation`}),leave:R(_(),y({left:c(!0)}),{kind:`mutation`}),logout:R(_(),y({loggedOut:c(!0)}),{kind:`mutation`}),listPeers:R(_(),y({peers:h(Dv).readonly()})),testConnection:R(y({authKey:a().optional()}),y({ok:m(),tenant:a().optional(),daemonVersion:a().optional(),error:a().optional()}),{kind:`mutation`})}},Av=y({nominalBitrateKbps:i(),observedBitrateKbps:i(),peakBitrateKbps:i(),packetLossPercent:i(),lastUpdated:i()}),jv=y({rttMs:i(),jitterMs:i(),estimatedBandwidthKbps:i(),packetLossPercent:i().min(0).max(100),lastUpdated:i()}),Mv=y({deviceId:i(),streams:o(a(),Av),client:jv.optional()}),Nv={name:`network-quality`,scope:`system`,mode:`singleton`,methods:{getDeviceStats:R(y({deviceId:i()}),Mv.nullable()),getAllStats:R(_(),h(Mv).readonly()),reportClientStats:R(y({deviceId:i(),rttMs:i().min(0).max(6e4),jitterMs:i().min(0).max(1e4),estimatedBandwidthKbps:i().min(0).max(1e6),packetLossPercent:i().min(0).max(100)}),_(),{kind:`mutation`})},mount:{kind:`server-provided`}},Pv=y({addonId:a(),capabilities:h(a()).readonly(),status:a()}),Fv=y({pid:i(),name:a(),state:a(),cpuPercent:i(),memoryRss:i(),uptimeSeconds:i(),services:h(Pv).readonly(),groupId:a().optional()}),Iv=y({id:a(),status:a(),cpuPercent:i(),memoryRss:i()}),Lv=y({category:a(),total:i(),healthy:i(),addons:h(Iv).readonly()}),Rv=y({name:a(),version:a()}),zv=y({id:a(),name:a(),hostname:a(),platform:a(),arch:a(),cpuModel:a().nullable(),cpuCores:i(),memoryMB:i(),engines:h(a()).readonly(),isHub:m(),isOnline:m(),cpuPercent:i(),memoryPercent:i(),uptime:i(),lastSeen:a(),localIps:h(a()).readonly(),addons:h(y({id:a(),capabilities:h(a()).readonly(),status:a()})).readonly(),processes:h(Fv).readonly(),categories:h(Lv).readonly(),rootPackage:Rv.nullable()}),Bv=y({callerAddonId:a(),providerAddonId:a(),capName:a(),callsPerMin:i(),lastCallAtMs:i()}),Vv=y({nodeId:a(),name:a(),version:a(),status:a(),synced:m()}),Hv=y({hubVersion:a(),nodes:h(Vv)}),Uv=y({nodeId:a(),addonId:a()}),Wv=y({id:a(),status:a(),version:a().optional(),packageName:a().optional()}),Gv=y({success:m()}),Kv=y({success:m(),reason:a().optional()}),qv=y({restarted:h(a()).readonly(),failed:h(a()).readonly()}),Jv=y({nodeId:a(),name:a()}),Yv={name:`nodes`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{topology:R(_(),h(zv).readonly(),{auth:`admin`}),deployAddon:R(Uv,Gv,{kind:`mutation`,auth:`admin`}),undeployAddon:R(Uv,Gv,{kind:`mutation`,auth:`admin`}),restartAddon:R(Uv,Gv,{kind:`mutation`,auth:`admin`}),restartProcess:R(y({nodeId:a(),processName:a()}),Kv,{kind:`mutation`,auth:`admin`}),restartNode:R(y({nodeId:a()}),qv,{kind:`mutation`,auth:`admin`}),shutdownNode:R(y({nodeId:a()}),Gv,{kind:`mutation`,auth:`admin`}),renameNode:R(y({nodeId:a(),name:a().min(1).max(64)}),Jv,{kind:`mutation`,auth:`admin`}),clusterAddonStatus:R(_(),o(a(),Hv),{auth:`admin`}),getCapUsageGraph:R(y({windowSeconds:i().int().positive().max(300).default(60)}),h(Bv).readonly(),{auth:`admin`}),getNodeAddons:R(y({nodeId:a()}),h(Wv).readonly(),{auth:`admin`}),setProcessLogLevel:R(y({nodeId:a(),level:a()}),Gv,{kind:`mutation`,auth:`admin`}),executeQuery:R(y({nodeId:a(),addonId:a(),queryName:a(),params:o(a(),r()).optional()}),r(),{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},Xv=v([`text`,`timestamp`,`watermark`]),Zv=v([`top-left`,`top-center`,`top-right`,`bottom-left`,`bottom-center`,`bottom-right`,`custom`]),Qv=y({id:a(),kind:Xv,enabled:m(),text:a().optional(),position:Zv.optional(),availablePositions:h(Zv).readonly(),readOnly:m().optional()}),$v=y({overlays:h(Qv).readonly()}),ey=y({enabled:m().optional(),text:a().optional(),position:Zv.optional()}).partial(),ty={name:`osd`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera],methods:{setOverlay:R(y({deviceId:i(),overlayId:a(),patch:ey}),_(),{kind:`mutation`,auth:`admin`})},events:{onStatusChanged:{data:y({deviceId:i(),status:$v})}},status:{schema:$v,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}}}]}},ny=y({plateId:a(),deviceId:i().int(),trackId:a(),timestamp:i().int(),text:a(),score:i(),corrected:m(),base64:a().optional()}),ry=y({key:a(),kind:a(),base64:a(),sizeBytes:i(),timestamp:i()}),iy=y({plateIds:h(a()).readonly(),representativePlateId:a(),representativeText:a(),size:i().int(),cohesion:i()}),ay={name:`plate-gallery`,scope:`system`,mode:`singleton`,methods:{listPlates:R(y({deviceId:i().int().optional(),limit:i().int().positive().optional()}).optional(),h(ny).readonly()),getPlateByTrack:R(y({deviceId:i().int(),trackId:a()}),ny.nullable()),getPlateMedia:R(y({plateId:a()}),h(ry).readonly()),searchPlates:R(y({text:a().min(1),maxDistance:i().int().min(0).optional(),limit:i().int().positive().optional()}),h(ny).readonly()),suggestPlateClusters:R(y({maxDistance:i().int().min(0).optional(),minClusterSize:i().int().min(2).optional(),limit:i().int().positive().optional()}).optional(),h(iy).readonly()),correctPlateText:R(y({plateId:a(),text:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),deletePlate:R(y({plateId:a()}),_(),{kind:`mutation`,auth:`admin`})}},oy=v(ye),sy=v([`videotoolbox`,`cuda`,`nvdec`,`vaapi`,`qsv`,`d3d11va`,`dxva2`,`amf`,`vdpau`,`drm`,`coreml`,`tensorrt`,`openvino`,`directml`,`webgpu`,`none`]).nullable().optional(),cy=y({preferred:h(a()).readonly(),rationale:a()}),ly=v([`h264_videotoolbox`,`hevc_videotoolbox`,`h264_vaapi`,`hevc_vaapi`,`h264_nvenc`,`hevc_nvenc`,`h264_qsv`,`hevc_qsv`,`h264_amf`,`hevc_amf`,`libx264`,`libx265`]);y({encoders:h(y({encoder:ly,codec:v([`H264`,`H265`]),family:v([`videotoolbox`,`vaapi`,`nvenc`,`qsv`,`amf`,`software`]),available:m(),reason:a().optional()})).readonly(),defaultH264:ly,defaultH265:ly,probedAt:i()}),y({methods:h(a()).readonly(),probedAt:i()});var uy=v([`darwin`,`linux`,`win32`]),dy=v([`arm64`,`x64`]),fy=y({type:v([`nvidia`,`amd`,`intel`,`apple`]),name:a(),memoryMB:i().optional()}),py=y({type:v([`apple-ane`,`intel-npu`])}),my=y({platform:uy,arch:dy,cpuModel:a(),cpuCores:i(),totalRAM_MB:i(),availableRAM_MB:i(),gpu:fy.nullable(),npu:py.nullable()}),hy=y({runtime:v([`node`,`python`]),backend:a(),format:v([`onnx`,`coreml`,`openvino`]),score:i(),reason:a(),available:m()}),gy=y({hardware:my,scores:h(hy).readonly(),bestScore:hy,pythonPath:a().nullable()}),_y=y({modelId:a(),name:a(),minRAM_MB:i(),accuracyScore:i(),formats:h(a()).readonly()}),vy=y({modelId:a(),runtime:v([`node`,`python`]),backend:a(),format:oy,reason:a()}),yy={name:`platform-probe`,scope:`system`,mode:`singleton`,methods:{getCapabilities:R(_(),gy),getHardware:R(_(),my),resolveInferenceConfig:R(y({requirements:h(_y).readonly()}),vy),resolveHwAccel:R(y({prefer:sy}),cy)}},by=y({id:a(),name:a()}),xy=y({pan:i(),tilt:i(),zoom:i()}),Sy=y({pan:i().optional(),tilt:i().optional(),zoom:i().optional(),speed:i().optional()}),Cy=xy.extend({autofocus:m()}),wy=y({hasPan:m(),hasTilt:m(),hasZoom:m(),supportsPresets:m(),maxPresets:i().optional(),hasAutofocus:m()}),Ty={name:`ptz`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/ptz-panel`,tab:`ptz`,topTab:!0,label:`PTZ`,order:0}},methods:{move:R(Sy.extend({deviceId:i()}),_(),{kind:`mutation`}),continuousMove:R(Sy.extend({deviceId:i()}),_(),{kind:`mutation`}),stop:R(y({deviceId:i()}),_(),{kind:`mutation`}),getPresets:R(y({deviceId:i()}),h(by)),goToPreset:R(y({deviceId:i(),presetId:a()}),_(),{kind:`mutation`}),savePreset:R(y({deviceId:i(),presetId:a(),name:a()}),_(),{kind:`mutation`,auth:`admin`}),deletePreset:R(y({deviceId:i(),presetId:a()}),_(),{kind:`mutation`,auth:`admin`}),getOptions:R(y({deviceId:i()}),wy),goHome:R(y({deviceId:i()}),_(),{kind:`mutation`}),getPosition:R(y({deviceId:i()}),xy),setAutofocus:R(y({deviceId:i(),enabled:m()}),_(),{kind:`mutation`})},status:{schema:Cy,kind:`command-driven`}},Ey={name:`reboot`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera,F.Sensor,F.Switch],methods:{reboot:R(y({deviceId:i().int().nonnegative()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`})}},Dy=y({deviceId:i(),enabled:m(),activeMode:v([`off`,`continuous`,`events`]),nodeId:a(),storageBytes:i()}),Oy=y({profile:a(),startMs:i(),endMs:i()}),ky=y({deviceId:i(),ranges:h(Oy)}),Ay=y({deviceId:i(),days:h(i())}),jy=y({deviceId:i(),localMasterPath:a().nullable(),playbackUrl:a().nullable(),playbackEndpoints:h(a())}),My=y({deviceId:i(),usedBytes:i()}),Ny=y({locationId:a().nullable(),usedBytes:i(),availableBytes:i().nullable(),totalBytes:i().nullable()}),Py=y({nodeId:a(),totalUsedBytes:i(),devices:h(My),locations:h(Ny)}),Fy=b(`kind`,[y({kind:c(`segment`),startMs:i(),durMs:i(),bytes:i()}),y({kind:c(`gap`),nearestEdgeMs:i().nullable()})]),Iy=y({data:p(Uint8Array)}),Ly={name:`recording`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,status:{schema:Dy,kind:`command-driven`},methods:{getAvailability:R(y({deviceId:i(),fromMs:i(),toMs:i()}),ky,{kind:`query`,auth:`admin`}),getDaysWithRecordings:R(y({deviceId:i(),fromMs:i(),toMs:i(),tzOffsetMinutes:i()}),Ay,{kind:`query`,auth:`admin`}),getPlaybackManifest:R(y({deviceId:i(),fromMs:i(),toMs:i()}),jy,{kind:`query`,auth:`admin`}),getStorageUsage:R(y({}),Py,{kind:`query`,auth:`admin`}),getDeviceConfig:R(y({deviceId:i()}),on,{kind:`query`,auth:`admin`}),locateSegment:R(y({deviceId:i(),profile:a(),epochMs:i()}),Fy,{kind:`query`,auth:`admin`}),readSegmentBytes:R(y({deviceId:i(),profile:a(),startMs:i()}),Iy,{kind:`query`,auth:`admin`}),setDeviceConfig:R(y({deviceId:i(),config:on}),on,{kind:`mutation`,auth:`admin`}),rescanStorage:R(y({deviceId:i()}),Dy,{kind:`mutation`,auth:`admin`}),pruneFootage:R(y({deviceId:i()}),y({floorMs:i().nullable(),deletedBuckets:i().int(),reclaimedBytes:i().int()}),{kind:`mutation`,auth:`admin`})}},Ry=y({camStreamId:a().min(1),kind:Tt,url:a().optional(),codec:a().optional(),resolution:C.optional(),fps:i().positive().optional(),label:a().optional(),deviceFeatures:h(a()).optional(),autoEligible:m().optional(),metadata:o(a(),r()).optional()}),zy={name:`stream-catalog`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera],methods:{getCatalog:R(y({deviceId:i().int().nonnegative()}),h(Ry).readonly())}},By=[{profile:`main`,prefix:`streamMain`,label:`Main stream`},{profile:`sub`,prefix:`streamSub`,label:`Sub stream`},{profile:`ext`,prefix:`streamExt`,label:`Third stream`}];function Vy(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 Hy(e,t){let n=[];for(let r of By){let i=e[r.profile];if(!i)continue;let a=Vy(r,i,t?.[r.profile]);a&&n.push(a)}return n.length===0?null:{sections:n}}function Uy(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 Wy=y({streaming:m(),notifications:m(),objectDetection:m(),remoteAccess:m(),agentCluster:m(),smartHome:m(),recordings:m(),backup:m(),repl:m()}),Gy=y({status:c(`ok`),uptime:i()}),Ky=y({name:a(),address:a(),family:a(),internal:m()}),qy={name:`system`,scope:`system`,mode:`singleton`,methods:{info:R(_(),Wy),health:R(_(),Gy),featureFlags:R(_(),Wy),networkAddresses:R(_(),h(Ky).readonly()),getRetentionConfig:R(_(),r().nullable(),{auth:`admin`}),setRetentionConfig:R(o(a(),r()),te(),{kind:`mutation`,auth:`admin`}),forceRetentionCleanup:R(_(),_(),{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},Jy=y({title:a(),message:a(),severity:v([`info`,`warning`,`critical`]),duration:i().optional(),action:y({label:a(),url:a()}).optional()}),Yy={name:`toast`,scope:`system`,mode:`singleton`,methods:{onToast:R(_(),Jy,{kind:`subscription`})},mount:{kind:`server-provided`}},Xy=y({id:a(),username:a(),isAdmin:m().default(!1),allowedProviders:g([h(a()),c(`*`)]),allowedDevices:o(a(),g([h(a()),c(`*`)])),scopes:h($).default([]),totpEnabled:m().default(!1),createdAt:i(),updatedAt:i()}),Zy=y({username:a(),password:a().min(6),isAdmin:m().default(!1),allowedProviders:g([h(a()),c(`*`)]).optional(),allowedDevices:o(a(),g([h(a()),c(`*`)])).optional(),scopes:h($).optional()}),Qy=y({id:a(),isAdmin:m().optional(),allowedProviders:g([h(a()),c(`*`)]).optional(),allowedDevices:o(a(),g([h(a()),c(`*`)])).optional(),scopes:h($).optional()}),$y=y({id:a(),label:a(),isAdmin:m().default(!1),allowedProviders:g([h(a()),c(`*`)]).optional(),allowedDevices:o(a(),g([h(a()),c(`*`)])).optional(),tokenPrefix:a(),createdAt:i(),lastUsedAt:i().optional()}),eb=y({label:a(),isAdmin:m().default(!1),allowedProviders:g([h(a()),c(`*`)]).optional(),allowedDevices:o(a(),g([h(a()),c(`*`)])).optional()}),tb=y({token:a(),record:$y}),nb=y({id:a(),userId:a(),name:a(),tokenPrefix:a(),scopes:h($),expiresAt:i().nullish(),lastUsedAt:i().nullish(),createdAt:i()}),rb=y({userId:a(),name:a(),scopes:h($),expiresAt:i().optional()}),ib=y({token:a(),record:nb}),ab=y({id:a(),userId:a(),username:a(),integrationId:a(),scopes:h($),createdAt:i(),lastUsedAt:i(),revokedAt:i().nullable()}),ob=y({secret:a(),otpauthUrl:a()}),sb=y({enabled:m(),confirmedAt:i().nullable()}),cb={name:`user-management`,scope:`system`,mode:`singleton`,methods:{listUsers:R(_(),h(Xy),{auth:`admin`}),createUser:R(Zy,Xy,{kind:`mutation`,auth:`admin`,access:`create`}),updateUser:R(Qy,y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),deleteUser:R(y({id:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),resetPassword:R(y({id:a(),newPassword:a().min(6)}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),setUserScopes:R(y({userId:a(),scopes:h($)}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),validateCredentials:R(y({username:a(),password:a()}),Xy.extend({passwordHash:a()}).nullable(),{kind:`mutation`,access:`view`}),listApiKeys:R(_(),h($y),{auth:`admin`}),createApiKey:R(eb,tb,{kind:`mutation`,auth:`admin`,access:`create`}),revokeApiKey:R(y({id:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),validateApiKey:R(y({token:a()}),$y.nullable(),{kind:`mutation`,access:`view`}),createScopedToken:R(rb,ib,{kind:`mutation`,auth:`admin`,access:`create`}),revokeScopedToken:R(y({id:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),validateScopedToken:R(y({token:a()}),nb.nullable(),{access:`view`}),listScopedTokens:R(y({userId:a()}),h(nb),{auth:`admin`}),setupTotp:R(y({userId:a()}),ob,{kind:`mutation`,auth:`admin`,access:`create`}),confirmTotp:R(y({userId:a(),code:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),disableTotp:R(y({userId:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),getTotpStatus:R(y({userId:a()}),sb,{auth:`admin`}),verifyTotp:R(y({userId:a(),code:a()}),y({valid:m()}),{kind:`mutation`,access:`view`}),oauthIssueCode:R(y({integrationId:a(),userId:a(),username:a(),scopes:h($),redirectUri:a(),hubUrl:a()}),y({code:a()}),{kind:`mutation`,access:`create`}),oauthExchangeCode:R(y({code:a(),redirectUri:a()}),y({accessToken:a(),refreshToken:a(),expiresIn:i()}).nullable(),{kind:`mutation`,access:`view`}),oauthRefresh:R(y({refreshToken:a()}),y({accessToken:a(),refreshToken:a(),expiresIn:i()}).nullable(),{kind:`mutation`,access:`view`}),oauthVerifyAccessToken:R(y({token:a()}),y({userId:a(),username:a(),scopes:h($)}).nullable(),{access:`view`}),listOauthSessions:R(_(),h(ab),{auth:`admin`}),revokeOauthSession:R(y({id:a()}),y({success:m()}),{kind:`mutation`,auth:`admin`,access:`delete`})}},lb=[`decoder`,`motion-detection`,`pipeline-executor`,`audio-analyzer`,`pipeline-analytics`,`notification-output`],ub=[...lb,`pipeline-orchestrator`,`pipeline-runner`],db={accessories:`accessories`,addonPages:`addon-pages`,addonPagesSource:`addon-pages-source`,addonRoutes:`addon-routes`,addonSettings:`addon-settings`,addonWidgets:`addon-widgets`,addonWidgetsSource:`addon-widgets-source`,addons:`addons`,adminUi:`admin-ui`,advancedNotifier:`advanced-notifier`,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`,connectivity:`connectivity`,consumables:`consumables`,contact:`contact`,control:`control`,cover:`cover`,customModelRegistry:`custom-model-registry`,dayNight:`day-night`,decoder:`decoder`,detectionPipeline:`detection-pipeline`,deviceAdoption:`device-adoption`,deviceDiscovery:`device-discovery`,deviceExport:`device-export`,deviceManager:`device-manager`,deviceOps:`device-ops`,deviceProvider:`device-provider`,deviceState:`device-state`,deviceStatus:`device-status`,doorbell:`doorbell`,embeddingEncoder:`embedding-encoder`,enumSensor:`enum-sensor`,eventEmitter:`event-emitter`,events:`events`,faceGallery:`face-gallery`,fanControl:`fan-control`,featureProbe:`feature-probe`,filesystemBrowse:`filesystem-browse`,flood:`flood`,gas:`gas`,humidifier:`humidifier`,humiditySensor:`humidity-sensor`,image:`image`,imageSettings:`image-settings`,integrations:`integrations`,intercom:`intercom`,lawnMowerControl:`lawn-mower-control`,localNetwork:`local-network`,lockControl:`lock-control`,logDestination:`log-destination`,loginMethod:`login-method`,mediaPlayer:`media-player`,meshNetwork:`mesh-network`,metricsProvider:`metrics-provider`,modelConvert:`model-convert`,modelDistributor:`model-distributor`,motion:`motion`,motionDetection:`motion-detection`,motionTrigger:`motion-trigger`,motionZones:`motion-zones`,mqttBroker:`mqtt-broker`,nativeObjectDetection:`native-object-detection`,networkAccess:`network-access`,networkQuality:`network-quality`,nodes:`nodes`,notificationOutput:`notification-output`,notifier:`notifier`,numericSensor:`numeric-sensor`,oauthIntegration:`oauth-integration`,osd:`osd`,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`,scriptRunner:`script-runner`,serverManagement:`server-management`,settingsStore:`settings-store`,smoke:`smoke`,smtpProvider:`smtp-provider`,snapshot:`snapshot`,ssoBridge:`sso-bridge`,storage:`storage`,storageEvictable:`storage-evictable`,storageProvider:`storage-provider`,streamBroker:`stream-broker`,streamCatalog:`stream-catalog`,streamParams:`stream-params`,switch:`switch`,system:`system`,tamper:`tamper`,temperatureSensor:`temperature-sensor`,toast:`toast`,turnProvider:`turn-provider`,update:`update`,userManagement:`user-management`,userPasskeys:`user-passkeys`,vacuumControl:`vacuum-control`,valve:`valve`,vibration:`vibration`,videoclips:`videoclips`,viewerUi:`viewer-ui`,waterHeater:`water-heater`,weather:`weather`,webrtcSession:`webrtc-session`,zoneAnalytics:`zone-analytics`,zoneRules:`zone-rules`,zones:`zones`},fb=[{key:`accessories`,name:`accessories`},{key:`addonPages`,name:`addon-pages`},{key:`addonPagesSource`,name:`addon-pages-source`},{key:`addonRoutes`,name:`addon-routes`},{key:`addonSettings`,name:`addon-settings`},{key:`addonWidgets`,name:`addon-widgets`},{key:`addonWidgetsSource`,name:`addon-widgets-source`},{key:`addons`,name:`addons`},{key:`adminUi`,name:`admin-ui`},{key:`advancedNotifier`,name:`advanced-notifier`},{key:`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:`connectivity`,name:`connectivity`},{key:`consumables`,name:`consumables`},{key:`contact`,name:`contact`},{key:`control`,name:`control`},{key:`cover`,name:`cover`},{key:`customModelRegistry`,name:`custom-model-registry`},{key:`dayNight`,name:`day-night`},{key:`decoder`,name:`decoder`},{key:`detectionPipeline`,name:`detection-pipeline`},{key:`deviceAdoption`,name:`device-adoption`},{key:`deviceDiscovery`,name:`device-discovery`},{key:`deviceExport`,name:`device-export`},{key:`deviceManager`,name:`device-manager`},{key:`deviceOps`,name:`device-ops`},{key:`deviceProvider`,name:`device-provider`},{key:`deviceState`,name:`device-state`},{key:`deviceStatus`,name:`device-status`},{key:`doorbell`,name:`doorbell`},{key:`embeddingEncoder`,name:`embedding-encoder`},{key:`enumSensor`,name:`enum-sensor`},{key:`eventEmitter`,name:`event-emitter`},{key:`events`,name:`events`},{key:`faceGallery`,name:`face-gallery`},{key:`fanControl`,name:`fan-control`},{key:`featureProbe`,name:`feature-probe`},{key:`filesystemBrowse`,name:`filesystem-browse`},{key:`flood`,name:`flood`},{key:`gas`,name:`gas`},{key:`humidifier`,name:`humidifier`},{key:`humiditySensor`,name:`humidity-sensor`},{key:`image`,name:`image`},{key:`imageSettings`,name:`image-settings`},{key:`integrations`,name:`integrations`},{key:`intercom`,name:`intercom`},{key:`lawnMowerControl`,name:`lawn-mower-control`},{key:`localNetwork`,name:`local-network`},{key:`lockControl`,name:`lock-control`},{key:`logDestination`,name:`log-destination`},{key:`loginMethod`,name:`login-method`},{key:`mediaPlayer`,name:`media-player`},{key:`meshNetwork`,name:`mesh-network`},{key:`metricsProvider`,name:`metrics-provider`},{key:`modelConvert`,name:`model-convert`},{key:`modelDistributor`,name:`model-distributor`},{key:`motion`,name:`motion`},{key:`motionDetection`,name:`motion-detection`},{key:`motionTrigger`,name:`motion-trigger`},{key:`motionZones`,name:`motion-zones`},{key:`mqttBroker`,name:`mqtt-broker`},{key:`nativeObjectDetection`,name:`native-object-detection`},{key:`networkAccess`,name:`network-access`},{key:`networkQuality`,name:`network-quality`},{key:`nodes`,name:`nodes`},{key:`notificationOutput`,name:`notification-output`},{key:`notifier`,name:`notifier`},{key:`numericSensor`,name:`numeric-sensor`},{key:`oauthIntegration`,name:`oauth-integration`},{key:`osd`,name:`osd`},{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:`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:`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:`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:`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`}],pb=[d_,_d,yd,Cd,Od,Fd,Nd,W_,Rd,Jd,Qi,la,$d,da,ef,sf,hf,ga,_f,va,kf,ba,Sa,wa,Xf,G_,J_,Zf,Wa,Ka,Ya,eo,no,ao,so,fo,ho,cp,xo,fp,pp,Ep,ko,Fp,em,Q_,ku,tm,Ji,Mo,im,Fo,Ro,ev,ov,Vo,Xi,sm,Uo,Go,qo,Yo,Zo,os,mv,vv,us,Tv,ps,um,Sf,vs,kv,km,jm,Pm,xc,Ds,wc,Rc,Km,Uc,Xm,Nv,Yv,dh,Xc,Qc,bh,ty,nl,Rh,oc,pg,vc,ay,yy,il,sl,ll,hl,Ty,bl,Ey,Ly,Sl,bg,Tg,wl,Ag,Ng,Fg,Lg,Bg,Qg,za,zy,jl,Nl,qy,Fl,Ll,Yy,e_,zl,cb,n_,Ul,Kl,Jl,a_,Vd,Xl,Ql,l_,au,uu,lc],mb=`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.script-runner.smoke.snapshot.stream-params.switch.tamper.temperature-sensor.update.vacuum-control.valve.vibration.water-heater.weather`.split(`.`),hb=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.updateFrameworkPackage":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.updatePackage":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addonSettings.getDeviceSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`view`},"addonSettings.getGlobalSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`view`},"addonSettings.updateDeviceSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`create`},"addonSettings.updateGlobalSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`create`},"addonWidgets.listWidgets":{capName:`addon-widgets`,capScope:`system`,addonId:null,access:`view`},"addonWidgetsSource.listWidgets":{capName:`addon-widgets-source`,capScope:`system`,addonId:null,access:`view`},"adminUi.getStaticDir":{capName:`admin-ui`,capScope:`system`,addonId:null,access:`view`},"adminUi.getVersion":{capName:`admin-ui`,capScope:`system`,addonId:null,access:`view`},"advancedNotifier.deleteRule":{capName:`advanced-notifier`,capScope:`system`,addonId:null,access:`delete`},"advancedNotifier.getHistory":{capName:`advanced-notifier`,capScope:`system`,addonId:null,access:`view`},"advancedNotifier.getRules":{capName:`advanced-notifier`,capScope:`system`,addonId:null,access:`view`},"advancedNotifier.testRule":{capName:`advanced-notifier`,capScope:`system`,addonId:null,access:`create`},"advancedNotifier.upsertRule":{capName:`advanced-notifier`,capScope:`system`,addonId:null,access:`create`},"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.getEntries":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.list":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.listArchives":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.listDestinations":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.listLocations":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.previewSchedule":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.restore":{capName:`backup`,capScope:`system`,addonId:null,access:`create`},"backup.trigger":{capName:`backup`,capScope:`system`,addonId:null,access:`create`},"backup.upsertDestinationPolicy":{capName:`backup`,capScope:`system`,addonId:null,access:`create`},"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`},"consumables.reset":{capName:`consumables`,capScope:`device`,addonId:null,access:`delete`},"control.setValue":{capName:`control`,capScope:`device`,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`},"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.adoptionListCandidateFilters":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.adoptionListCandidates":{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.allocateDeviceId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.applyInitialMeta":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.createDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.disable":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoverAllProviders":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoverDevices":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoverProvider":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoveryProviders":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.enable":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.getAllBindings":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getBindings":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getChildren":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getConfigSchema":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getCreationSchema":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceLiveInfoAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceSettingsAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceStatusAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.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.setDeviceLinks":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setDisabled":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setDisplay":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setIntegrationId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setLinkDeviceId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setLocation":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setMetadata":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setName":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setPrimaryChildEntityId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setRole":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setRoleDisplayDefaults":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setStreamProfileMap":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setType":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setWrapperActive":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.testCreationField":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.testField":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.updateConfig":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.updateDeviceField":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.updateDeviceFieldsBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceOps.getConfigEntries":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`},"deviceOps.getRawState":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`},"deviceOps.getSettingsSchema":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`},"deviceOps.getStreamSources":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`},"deviceOps.removeDevice":{capName:`device-ops`,capScope:`device`,addonId:null,access:`delete`},"deviceOps.runAction":{capName:`device-ops`,capScope:`device`,addonId:null,access:`create`},"deviceOps.setConfig":{capName:`device-ops`,capScope:`device`,addonId:null,access:`create`},"deviceProvider.adoptDiscoveredDevice":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.createDevice":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.discoverDevices":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.getChildCreationSchema":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.getDevices":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.getDiscoveryParamsSchema":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.getManualCreationType":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.getStatus":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.start":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.stop":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.supportsDiscovery":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.supportsManualCreation":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.testCreationField":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceState.getAllSnapshots":{capName:`device-state`,capScope:`system`,addonId:null,access:`view`},"deviceState.getCapSlice":{capName:`device-state`,capScope:`system`,addonId:null,access:`view`},"deviceState.getSnapshot":{capName:`device-state`,capScope:`system`,addonId:null,access:`view`},"deviceState.setCapSlice":{capName:`device-state`,capScope:`system`,addonId:null,access:`create`},"embeddingEncoder.encode":{capName:`embedding-encoder`,capScope:`system`,addonId:null,access:`view`},"embeddingEncoder.encodeText":{capName:`embedding-encoder`,capScope:`system`,addonId:null,access:`view`},"embeddingEncoder.getInfo":{capName:`embedding-encoder`,capScope:`system`,addonId:null,access:`view`},"events.getEventClipUrl":{capName:`events`,capScope:`device`,addonId:null,access:`view`},"events.getEvents":{capName:`events`,capScope:`device`,addonId:null,access:`view`},"events.getEventThumbnail":{capName:`events`,capScope:`device`,addonId:null,access:`view`},"faceGallery.assignFace":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.assignFaces":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.createIdentity":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.deleteFace":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`delete`},"faceGallery.deleteIdentity":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`delete`},"faceGallery.getFaceByTrack":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.getFaceMedia":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.listIdentities":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.listIdentitySamples":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.listRecentFaces":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.removeSample":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`delete`},"faceGallery.renameIdentity":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.suggestFaceClusters":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.unassignFace":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.unassignFaces":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"fanControl.setDirection":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"fanControl.setOscillating":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"fanControl.setPercentage":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"fanControl.setPreset":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"filesystemBrowse.browse":{capName:`filesystem-browse`,capScope:`system`,addonId:null,access:`view`},"filesystemBrowse.createDir":{capName:`filesystem-browse`,capScope:`system`,addonId:null,access:`create`},"filesystemBrowse.listAllowedRoots":{capName:`filesystem-browse`,capScope:`system`,addonId:null,access:`view`},"humidifier.setMode":{capName:`humidifier`,capScope:`device`,addonId:null,access:`create`},"humidifier.setOn":{capName:`humidifier`,capScope:`device`,addonId:null,access:`create`},"humidifier.setTargetHumidity":{capName:`humidifier`,capScope:`device`,addonId:null,access:`create`},"imageSettings.getOptions":{capName:`image-settings`,capScope:`device`,addonId:null,access:`view`},"imageSettings.setSettings":{capName:`image-settings`,capScope:`device`,addonId:null,access:`create`},"integrations.create":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`},"integrations.delete":{capName:`integrations`,capScope:`system`,addonId:null,access:`delete`},"integrations.get":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.getAvailableTypes":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.getByAddonId":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.getSettings":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.list":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.setSettings":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`},"integrations.testConnection":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`},"integrations.update":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`},"intercom.endTalkSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.handleAnswer":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.pushTalkAudio":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.startSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.startTalkSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.stopSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"lawnMowerControl.dock":{capName:`lawn-mower-control`,capScope:`device`,addonId:null,access:`create`},"lawnMowerControl.pause":{capName:`lawn-mower-control`,capScope:`device`,addonId:null,access:`create`},"lawnMowerControl.startMowing":{capName:`lawn-mower-control`,capScope:`device`,addonId:null,access:`create`},"localNetwork.getAllowedAddresses":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getConnectionEndpoints":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getPreferred":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.list":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.resetAllowlistToBestMatch":{capName:`local-network`,capScope:`system`,addonId:null,access:`delete`},"localNetwork.setAllowedAddresses":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"lockControl.lock":{capName:`lock-control`,capScope:`device`,addonId:null,access:`create`},"lockControl.open":{capName:`lock-control`,capScope:`device`,addonId:null,access:`create`},"lockControl.unlock":{capName:`lock-control`,capScope:`device`,addonId:null,access:`create`},"logDestination.query":{capName:`log-destination`,capScope:`system`,addonId:null,access:`view`},"logDestination.write":{capName:`log-destination`,capScope:`system`,addonId:null,access:`create`},"loginMethod.getLoginMethods":{capName:`login-method`,capScope:`system`,addonId:null,access:`view`},"mediaPlayer.next":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.pause":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.play":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.playMedia":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.previous":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.seek":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.selectSource":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setMute":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setRepeat":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setShuffle":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setVolume":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.stop":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"meshNetwork.getStatus":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`view`},"meshNetwork.join":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"meshNetwork.leave":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"meshNetwork.listPeers":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`view`},"meshNetwork.logout":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"meshNetwork.startLogin":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"meshNetwork.testConnection":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"metricsProvider.collectSnapshot":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.dumpHeapSnapshot":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`create`},"metricsProvider.getAddonStats":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getCached":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getCpuTemperature":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getCurrent":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getDiskSpace":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getGpuInfo":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getProcessStats":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.killProcess":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`create`},"metricsProvider.listAddonInstances":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.listNodeProcesses":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"modelConvert.convert":{capName:`model-convert`,capScope:`system`,addonId:null,access:`create`},"modelDistributor.distributeModel":{capName:`model-distributor`,capScope:`system`,addonId:null,access:`create`},"motion.isDetected":{capName:`motion`,capScope:`device`,addonId:null,access:`view`},"motionDetection.analyze":{capName:`motion-detection`,capScope:`device`,addonId:null,access:`create`},"motionDetection.removeCamera":{capName:`motion-detection`,capScope:`device`,addonId:null,access:`delete`},"motionDetection.reset":{capName:`motion-detection`,capScope:`device`,addonId:null,access:`delete`},"motionTrigger.setMotionTrigger":{capName:`motion-trigger`,capScope:`device`,addonId:null,access:`create`},"motionZones.getOptions":{capName:`motion-zones`,capScope:`device`,addonId:null,access:`view`},"motionZones.setZone":{capName:`motion-zones`,capScope:`device`,addonId:null,access:`create`},"mqttBroker.addBroker":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`create`},"mqttBroker.getBrokerConfig":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`view`},"mqttBroker.getStatus":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`view`},"mqttBroker.listBrokers":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`view`},"mqttBroker.removeBroker":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`delete`},"mqttBroker.startEmbeddedBroker":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`create`},"mqttBroker.stopEmbeddedBroker":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`create`},"mqttBroker.testConnection":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`create`},"nativeObjectDetection.setEnabled":{capName:`native-object-detection`,capScope:`device`,addonId:null,access:`create`},"networkAccess.getEndpoint":{capName:`network-access`,capScope:`system`,addonId:null,access:`view`},"networkAccess.getStatus":{capName:`network-access`,capScope:`system`,addonId:null,access:`view`},"networkAccess.listEndpoints":{capName:`network-access`,capScope:`system`,addonId:null,access:`view`},"networkAccess.start":{capName:`network-access`,capScope:`system`,addonId:null,access:`create`},"networkAccess.stop":{capName:`network-access`,capScope:`system`,addonId:null,access:`create`},"networkQuality.getAllStats":{capName:`network-quality`,capScope:`system`,addonId:null,access:`view`},"networkQuality.getDeviceStats":{capName:`network-quality`,capScope:`system`,addonId:null,access:`view`},"networkQuality.reportClientStats":{capName:`network-quality`,capScope:`system`,addonId:null,access:`create`},"nodes.clusterAddonStatus":{capName:`nodes`,capScope:`system`,addonId:null,access:`view`},"nodes.deployAddon":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.executeQuery":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.getCapUsageGraph":{capName:`nodes`,capScope:`system`,addonId:null,access:`view`},"nodes.getNodeAddons":{capName:`nodes`,capScope:`system`,addonId:null,access:`view`},"nodes.renameNode":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.restartAddon":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.restartNode":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.restartProcess":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.setProcessLogLevel":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.shutdownNode":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.topology":{capName:`nodes`,capScope:`system`,addonId:null,access:`view`},"nodes.undeployAddon":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.deleteTarget":{capName:`notification-output`,capScope:`system`,addonId:null,access:`delete`},"notificationOutput.discoverTargets":{capName:`notification-output`,capScope:`system`,addonId:null,access:`view`},"notificationOutput.listTargetKinds":{capName:`notification-output`,capScope:`system`,addonId:null,access:`view`},"notificationOutput.listTargets":{capName:`notification-output`,capScope:`system`,addonId:null,access:`view`},"notificationOutput.send":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.setTargetEnabled":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.testTarget":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.upsertTarget":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"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`},"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.clearTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.getActiveTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getAudioEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getEventDensity":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getEventMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getMotionEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getObjectEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getTrack":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getTrackMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.pruneEventsBefore":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.searchObjectEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineExecutor.cacheFrameInPool":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.clearDeviceOverrides":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`delete`},"pipelineExecutor.deleteModel":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`delete`},"pipelineExecutor.deleteTemplate":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`delete`},"pipelineExecutor.downloadModel":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.getAddonModels":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getAudioCapabilities":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getAvailableEngines":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getCapabilities":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getDefaultSteps":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getDetectionConfigSchema":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getEffectiveTuning":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getEngineProvisioning":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getGlobalPipelineConfig":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getGlobalSteps":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getOrchestratorConfigSchema":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getReferenceAudio":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getReferenceAudioFiles":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getReferenceImage":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getSchema":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getSelectedEngine":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getVideoPipelineSteps":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.inferCached":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.killEngine":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.listLoadedEngines":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.listReferenceImages":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.listTemplates":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.reprobeEngine":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.runAudioTest":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.runPipeline":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.runPipelineBatch":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.saveTemplate":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.setVideoPipelineSteps":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.spinEngine":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.uncacheFrame":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.updateTemplate":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"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.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.getPipelineAssignment":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getPipelineAssignments":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.listAgentSettings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.listTemplates":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.rebalance":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.removeAgentSettings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`delete`},"pipelineOrchestrator.resetNodePipelineDefaults":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`delete`},"pipelineOrchestrator.resolvePipeline":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.saveTemplate":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentAddonDefaults":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentCapabilities":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentDetectWeight":{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.setCapabilityBinding":{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.reportMotion":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"plateGallery.correctPlateText":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.deletePlate":{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.searchPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.suggestPlateClusters":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"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.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.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.getStorageUsage":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.locateSegment":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.pruneFootage":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.readSegmentBytes":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.rescanStorage":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.setDeviceConfig":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"scriptRunner.run":{capName:`script-runner`,capScope:`device`,addonId:null,access:`create`},"scriptRunner.stop":{capName:`script-runner`,capScope:`device`,addonId:null,access:`create`},"serverManagement.applyServerUpdate":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"serverManagement.checkServerUpdate":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"serverManagement.getServerPackageStatus":{capName:`server-management`,capScope:`system`,addonId:null,access:`view`},"serverManagement.restartServer":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"serverManagement.rollbackServerUpdate":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"settingsStore.count":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.declareCollection":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"settingsStore.delete":{capName:`settings-store`,capScope:`system`,addonId:null,access:`delete`},"settingsStore.get":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.histogram":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.insert":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"settingsStore.isEmpty":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.query":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.set":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"settingsStore.update":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"smtpProvider.getStatus":{capName:`smtp-provider`,capScope:`system`,addonId:null,access:`view`},"smtpProvider.sendEmail":{capName:`smtp-provider`,capScope:`system`,addonId:null,access:`create`},"smtpProvider.verify":{capName:`smtp-provider`,capScope:`system`,addonId:null,access:`view`},"snapshot.getSnapshot":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.invalidateCache":{capName:`snapshot`,capScope:`device`,addonId:null,access:`create`},"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`},"storageProvider.abortUpload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.beginDownload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.beginUpload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.delete":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`delete`},"storageProvider.endDownload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.exists":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.finalizeUpload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.getAvailableSpace":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.getProviderInfo":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.list":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.read":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.readChunk":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.resolve":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.testLocation":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.write":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.writeChunk":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"streamBroker.assignProfile":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.getAllRtspEntries":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getBrokerStats":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getPreBufferInfo":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getRtspEntry":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getRtspPort":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getStreamUrl":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getStreamWithCodec":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.isRtspEnabled":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.killClient":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.listAllCameraStreams":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.listAllProfileSlots":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.listClients":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.probeStream":{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.releaseStreamWithCodec":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.restartProfile":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.retractCameraStream":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.setPreBufferDuration":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.setRtspEnabled":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.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.featureFlags":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.forceRetentionCleanup":{capName:`system`,capScope:`system`,addonId:null,access:`create`},"system.getRetentionConfig":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.health":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.info":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.networkAddresses":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.setRetentionConfig":{capName:`system`,capScope:`system`,addonId:null,access:`create`},"toast.onToast":{capName:`toast`,capScope:`system`,addonId:null,access:`view`},"turnProvider.getTurnServers":{capName:`turn-provider`,capScope:`system`,addonId:null,access:`view`},"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.listPasskeys":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.removePasskey":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`delete`},"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`},"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`}}),gb=`accessories.addon-pages.addon-pages-source.addon-routes.addon-settings.addon-widgets.addon-widgets-source.addons.admin-ui.advanced-notifier.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.consumables.control.cover.custom-model-registry.day-night.decoder.device-adoption.device-discovery.device-export.device-manager.device-ops.device-provider.device-state.embedding-encoder.events.face-gallery.fan-control.filesystem-browse.humidifier.image-settings.integrations.intercom.lawn-mower-control.local-network.lock-control.log-destination.login-method.media-player.mesh-network.metrics-provider.model-convert.model-distributor.motion.motion-detection.motion-trigger.motion-zones.mqtt-broker.native-object-detection.network-access.network-quality.nodes.notification-output.notifier.oauth-integration.osd.pet-feeder.pipeline-analytics.pipeline-executor.pipeline-orchestrator.pipeline-runner.plate-gallery.platform-probe.privacy-mask.ptz.ptz-autotrack.reboot.recording.script-runner.server-management.settings-store.smtp-provider.snapshot.sso-bridge.storage.storage-evictable.storage-provider.stream-broker.stream-catalog.stream-params.switch.system.toast.turn-provider.update.user-management.user-passkeys.vacuum-control.valve.videoclips.viewer-ui.water-heater.webrtc-session.zone-analytics.zone-rules.zones`.split(`.`),_b=`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.script-runner.snapshot.stream-catalog.stream-params.switch.update.vacuum-control.valve.videoclips.water-heater.webrtc-session.zone-analytics.zone-rules.zones`.split(`.`),vb=`addon-pages.addon-pages-source.addon-routes.addon-settings.addon-widgets.addon-widgets-source.addons.admin-ui.advanced-notifier.alerts.audio-analyzer.audio-codec.auth-provider.backup.broker.custom-model-registry.decoder.device-adoption.device-export.device-manager.device-provider.device-state.embedding-encoder.face-gallery.filesystem-browse.integrations.local-network.log-destination.login-method.mesh-network.metrics-provider.model-convert.model-distributor.mqtt-broker.network-access.network-quality.nodes.notification-output.oauth-integration.pipeline-executor.pipeline-orchestrator.pipeline-runner.plate-gallery.platform-probe.recording.server-management.settings-store.smtp-provider.sso-bridge.storage.storage-evictable.storage-provider.stream-broker.system.toast.turn-provider.user-management.user-passkeys.viewer-ui`.split(`.`),yb=[{id:`camera-viewer`,label:`Camera viewer`,description:"Read-only over every device — live streams, recordings, motion events, battery state. Combine with `allowedDevices` to restrict to specific cameras.",rows:[{type:`category`,target:`device`,access:[`view`]}]},{id:`camera-operator`,label:`Camera operator`,description:"Everything `camera-viewer` does plus PTZ control, intercom, snapshots and recording start/stop. Cannot delete devices or recordings.",rows:[{type:`category`,target:`device`,access:[`view`,`create`]}]},{id:`cli-deployer`,label:`CLI deployer`,description:"Push addons to the hub and tail their logs. Used by the `camstack` CLI on dev machines. No delete access — a stolen token cannot uninstall.",rows:[{type:`capability`,target:`addons`,access:[`view`,`create`]}]},{id:`event-listener`,label:`Event listener`,description:`Subscribe to motion / audio events. Used by webhook bridges and Home Assistant integrations.`,rows:[{type:`capability`,target:`events`,access:[`view`]},{type:`capability`,target:`motion-detection`,access:[`view`]},{type:`capability`,target:`audio-analysis`,access:[`view`]}]}],bb=Object.freeze({broker:`broker`,"device-export":`device-export`,"mesh-network":`mesh`,"mqtt-broker":`broker`,"network-access":`ingress`,"smtp-provider":`email`}),xb=[`broker`,`device-export`,`mesh-network`,`mqtt-broker`,`network-access`,`smtp-provider`];function Sb(e){let t=[];for(let[n,r]of Object.entries(bb))r===e&&t.push(n);return t}var Cb=y({name:a(),stagedPath:a(),backupPath:a(),toVersion:a(),fromVersion:a().nullable()}),wb=y({jobId:a(),taskId:a(),packages:h(Cb),requestedAtMs:i(),schemaVersion:c(1)}),Tb=y({jobId:a(),taskId:a(),backups:h(y({name:a(),backupPath:a(),livePath:a()})),appliedAtMs:i(),bootAttempts:i(),schemaVersion:c(1)});function Eb(e,t){let n=e.length,r=t.length;if(n===0)return r;if(r===0)return n;let i=Array.from({length:r+1},(e,t)=>t),a=Array.from({length:r+1},()=>0);for(let o=1;o<=n;o++){a[0]=o;let n=i[0]??0;for(let s=1;s<=r;s++){let r=i[s]??0,c=a[s-1]??0,l=e.charCodeAt(o-1)===t.charCodeAt(s-1)?0:1;a[s]=Math.min(r+1,c+1,n+l),n=r}for(let e=0;e<=r;e++)i[e]=a[e]??0}return i[r]??0}function Db(e,t){let n=e.trim().toLowerCase(),r=t.trim().toLowerCase();return n===r?1:n.length===0||r.length===0?0:1-Eb(n,r)/Math.max(n.length,r.length)}function Ob(e,t,n=.8){let r=null,i=0;for(let a of t){let t=Db(e,a);t>=n&&t>i&&(r=a,i=t)}return r}var kb=[/^user$/i,/^usr$/i,/^username$/i,/^password$/i,/^pwd$/i,/^pass$/i,/^passwd$/i,/^secret$/i,/^token$/i,/^auth$/i,/^auth[_-]?token$/i,/^bearer$/i,/^api[_-]?key$/i,/^access[_-]?token$/i,/^refresh[_-]?token$/i];function Ab(e){return kb.some(t=>t.test(e))}function jb(e){try{let t=new URL(e),n=!1;(t.username||t.password)&&(t.username=``,t.password=``,n=!0);for(let e of Array.from(t.searchParams.keys()))Ab(e)&&(t.searchParams.set(e,`***`),n=!0);return n?t.toString():e}catch{return e}}var Mb=class{capacity;items;head=0;tail=0;count=0;constructor(e){this.capacity=e,this.items=Array.from({length:e})}get size(){return this.count}push(e){this.items[this.tail]=e,this.tail=(this.tail+1)%this.capacity,this.count<this.capacity?this.count++:this.head=(this.head+1)%this.capacity}drain(e){let t=[],n=Math.min(e,this.count);for(let e=0;e<n;e++)t.push(this.items[this.head]),this.items[this.head]=void 0,this.head=(this.head+1)%this.capacity;return this.count-=n,t}};function Nb(e,t,n){let r=t*n;if(r<=0||e.length===0)return Array.from({length:Math.max(0,r)}).fill(!1);let i=Array.from({length:r}).fill(!1);for(let r=0;r<n;r++)for(let a=0;a<t;a++){let o=(a+.5)/t,s=(r+.5)/n;for(let n of e)if(o>=n.x&&o<=n.x+n.w&&s>=n.y&&s<=n.y+n.h){i[r*t+a]=!0;break}}return i}function Pb(e,t,n,r){if(t<=0||n<=0||r<=0)return[];let i=t*n,a=Array.from({length:i}).fill(!1),o=Math.min(e.length,i);for(let t=0;t<o;t++)a[t]=e[t]===!0;let s=[],c=[];for(let e=0;e<=n;e++){let r=[];if(e<n){let n=-1;for(let i=0;i<=t;i++){let o=i<t&&a[e*t+i]===!0;o&&n===-1?n=i:!o&&n!==-1&&(r.push({colStart:n,colEnd:i-1}),n=-1)}}let i=new Set,o=[];for(let t of c){let n=r.findIndex(e=>e.colStart===t.colStart&&e.colEnd===t.colEnd);n>=0?(o.push(t),i.add(n)):s.push({...t,rowEnd:e-1})}for(let t=0;t<r.length;t++)if(!i.has(t)){let n=r[t];o.push({colStart:n.colStart,colEnd:n.colEnd,rowStart:e})}c.length=0;for(let e of o)c.push(e)}if(s.length===0)return[];let l=s.slice().toSorted((e,t)=>{let n=(e.colEnd-e.colStart+1)*(e.rowEnd-e.rowStart+1);return(t.colEnd-t.colStart+1)*(t.rowEnd-t.rowStart+1)-n});return(r>0?l.slice(0,r):l).map(e=>({x:e.colStart/t,y:e.rowStart/n,w:(e.colEnd-e.colStart+1)/t,h:(e.rowEnd-e.rowStart+1)/n}))}function Fb(e){return new Promise(t=>setTimeout(t,Math.max(0,e)))}function Ib(e,t){return t.aborted?Promise.resolve():new Promise(n=>{let r=setTimeout(()=>{t.removeEventListener(`abort`,i),n()},Math.max(0,e)),i=()=>{clearTimeout(r),t.removeEventListener(`abort`,i),n()};t.addEventListener(`abort`,i,{once:!0})})}function Lb(e,t,n){let r={};for(let i of Object.keys(n))r[i]=n=>e.addons.custom.mutate({addonId:t,action:i,input:n});return r}var Rb={value:`auto`,label:`Auto`},zb={value:`cpu`,label:`CPU`},Bb=[{id:`onnx`,supports:()=>!0,devices:e=>{if(!e)return[zb];let t=[zb];return e.gpu?.type===`nvidia`&&t.push({value:`cuda`,label:`CUDA`}),e.npu?.type===`apple-ane`&&t.push({value:`coreml`,label:`CoreML EP`}),t},defaultDevice:`cpu`},{id:`openvino`,supports:e=>e?.arch===`x64`&&e.platform!==`darwin`&&e.gpu?.type===`intel`,devices:e=>{if(!e)return[Rb];let t=[Rb,zb];return e.gpu?.type===`intel`&&t.push({value:`gpu`,label:`GPU`}),e.npu?.type===`intel-npu`&&t.push({value:`npu`,label:`NPU`}),t},defaultDevice:`auto`},{id:`coreml`,supports:e=>e?.platform===`darwin`,devices:e=>{let t={value:`all`,label:`All (ANE + GPU + CPU)`};if(!e)return[t];let n=[t];return e.npu?.type===`apple-ane`&&n.push({value:`ane`,label:`Apple Neural Engine`}),n.push({value:`gpu`,label:`GPU`},zb),n},defaultDevice:`all`}];function Vb(e){let t=Bb.find(t=>t.id===e);if(!t)throw Error(`Unknown runtime: ${e}`);return t}function Hb(e){return Bb.filter(t=>t.supports(e)).map(e=>e.id)}function Ub(e,t){return Vb(e).devices(t)}function Wb(e){return Vb(e).defaultDevice}function Gb(e){return hr(e)}function Kb(e){let t=[];if(e.platform===`darwin`&&e.arch===`arm64`&&t.push({runtime:`python`,backend:`coreml`,format:`coreml`,score:95,reason:`Apple Neural Engine (Python CoreML)`,available:!0}),e.gpu?.type===`nvidia`&&t.push({runtime:`python`,backend:`cuda`,format:`onnx`,score:85,reason:`NVIDIA CUDA (Python ONNX Runtime)`,available:!0}),e.gpu?.type===`intel`){let n=e.npu?.type===`intel-npu`?90:80;t.push({runtime:`python`,backend:`openvino`,format:`openvino`,score:n,reason:`Intel OpenVINO`,available:!0})}t.push({runtime:`python`,backend:`cpu`,format:`onnx`,score:50,reason:`CPU (Python ONNX Runtime)`,available:!0});let n=t.toSorted((e,t)=>t.score-e.score);return{scores:n,best:n.find(e=>e.available)??n[n.length-1]}}var qb=t({ACCESSORY_LABEL:()=>vi,ALL_CAPABILITY_DEFINITIONS:()=>pb,APPLE_SA_TO_MACRO:()=>Dr,AUDIO_BACKEND_CHOICES:()=>af,AUDIO_MACRO_LABELS:()=>Tr,AccessoriesStatusSchema:()=>u_,AccessoryKind:()=>L,AddBrokerInputSchema:()=>zm,AddonAutoUpdateSchema:()=>M_,AddonListItemSchema:()=>E_,AddonPageDeclarationSchema:()=>vd,AddonPageInfoSchema:()=>gd,AdoptionAdoptInputSchema:()=>xp,AdoptionAdoptResultSchema:()=>Sp,AdoptionFilterSchema:()=>mp,AdoptionGetCandidateInputSchema:()=>vp,AdoptionListCandidatesInputSchema:()=>gp,AdoptionListCandidatesOutputSchema:()=>_p,AdoptionReleaseInputSchema:()=>Cp,AdoptionStatusSchema:()=>yp,AgentLoadSummarySchema:()=>qh,AirQualitySensorStatusSchema:()=>Zi,AlarmArmModeSchema:()=>sa,AlarmPanelStatusSchema:()=>ca,AlarmStateSchema:()=>oa,AlertSchema:()=>Qd,AlertSeveritySchema:()=>Yd,AlertSourceSchema:()=>Zd,AlertStatusSchema:()=>Xd,AmbientLightSensorStatusSchema:()=>ua,ApiKeyRecordSchema:()=>_h,ApiKeySummarySchema:()=>$y,ArchiveEntrySchema:()=>Ef,ArchiveManifestSchema:()=>Df,AttachmentMediaTypeSchema:()=>Zm,AttachmentSchema:()=>Qm,AudioAnalysisResultSchema:()=>tf,AudioAnalysisSettingsSchema:()=>nf,AudioChunkInputSchema:()=>Ss,AudioClassSummarySchema:()=>fa,AudioClassificationLabelSchema:()=>ws,AudioClassificationResultSchema:()=>rf,AudioCodecInfoSchema:()=>lf,AudioDecodeSessionConfigSchema:()=>uf,AudioEncodeSchema:()=>Ln,AudioEncodeSessionConfigSchema:()=>df,AudioEncodedChunkSchema:()=>pf,AudioEventSchema:()=>Ah,AudioLevelSchema:()=>Cs,AudioMetricsHistoryPointSchema:()=>ma,AudioMetricsHistorySchema:()=>ha,AudioMetricsSnapshotSchema:()=>pa,AudioPcmChunkSchema:()=>ff,AuthResultSchema:()=>gf,AutoUpdateSettingsSchema:()=>j_,AutomationControlStatusSchema:()=>_a,AvailableIntegrationTypeSchema:()=>lv,BACKEND_TO_FORMAT:()=>cr,BATTERY_DEVICE_PROFILE:()=>xi,BacklightModeSchema:()=>ts,BackupDestinationInfoSchema:()=>Cf,BackupEntrySchema:()=>Tf,BaseAddon:()=>pt,BaseDevice:()=>fu,BaseDeviceProvider:()=>ju,BatteryStatusSchema:()=>ya,BinaryStatusSchema:()=>xa,BoundingBoxSchema:()=>H,BrightnessStatusSchema:()=>Ca,BrokerAddInputSchema:()=>If,BrokerAudioClientSchema:()=>ka,BrokerClientsSchema:()=>Na,BrokerConnectionDetailsSchema:()=>Rm,BrokerConsumerAttributionSchema:()=>ja,BrokerConsumerKindSchema:()=>Aa,BrokerDecodedClientSchema:()=>Oa,BrokerEncodedClientSchema:()=>Ma,BrokerGetStateInputSchema:()=>Yf,BrokerInfoSchema:()=>Lm,BrokerProviderInfoSchema:()=>Nf,BrokerPublishInputSchema:()=>Gf,BrokerRegistryStatusSchema:()=>Mf,BrokerRtspClientSchema:()=>Da,BrokerStatsSchema:()=>Gt,BrokerStatusEnum:()=>Af,BrokerStatusSchema:()=>Wt,BrokerSubscribeInputSchema:()=>Kf,BrokerSubscribeResultSchema:()=>qf,BrokerTestConnectionResultSchema:()=>zf,BrokerUnsubscribeInputSchema:()=>Jf,CAM_PROFILE_ORDER:()=>wt,CAPABILITY_NAMES:()=>db,CAPABILITY_ROUTER_KEYS:()=>fb,CAP_NAMES_WITH_STATUS:()=>mb,CAP_NODE_PIN_CONTEXT_KEY:()=>qn,CAP_PROVIDER_KIND_MAP:()=>bb,COCO_80_LABELS:()=>Sr,COCO_TO_MACRO:()=>wr,CamProfileSchema:()=>S,CamStreamDescriptorSchema:()=>Ry,CamStreamKindSchema:()=>Tt,CamStreamResolutionSchema:()=>C,CameraAssignmentStatusSchema:()=>$h,CameraAudioStatusSchema:()=>lg,CameraBrokerProfileSchema:()=>eg,CameraBrokerStatusSchema:()=>tg,CameraCredentialsSchema:()=>K_,CameraCredentialsStatusSchema:()=>q_,CameraDecoderShmSchema:()=>ng,CameraDecoderStatusSchema:()=>rg,CameraDetectionPhaseSchema:()=>sg,CameraDetectionProvisioningSchema:()=>og,CameraDetectionProvisioningStateSchema:()=>ag,CameraDetectionStatusSchema:()=>cg,CameraMetricsSchema:()=>ks,CameraMetricsWithDeviceIdSchema:()=>As,CameraMotionStatusSchema:()=>ig,CameraRecordingModeSchema:()=>ug,CameraRecordingStatusSchema:()=>dg,CameraSourceStatusSchema:()=>Qh,CameraSourceStreamSchema:()=>Zh,CameraStatusSchema:()=>fg,CameraStreamSchema:()=>Et,CandidateQueryFilterSchema:()=>hp,CapScopeSchema:()=>hh,CapabilityBindingsSchema:()=>Yh,CarbonMonoxideStatusSchema:()=>Ga,ChargingStatus:()=>_i,ClientNetworkStatsSchema:()=>jv,ClimateControlStatusSchema:()=>Ja,ClipPlaybackSchema:()=>i_,ClipSchema:()=>r_,ClusterAddonNodeDeploymentSchema:()=>Vv,ClusterAddonStatusEntrySchema:()=>Hv,CollectionColumnSchema:()=>Cg,CollectionIndexSchema:()=>wg,ColorStatusSchema:()=>$a,ConfigEntrySchema:()=>Kp,ConfigSectionWithValuesSchema:()=>Td,ConfigTabDeclarationSchema:()=>wd,ConnectivityStatusSchema:()=>to,ConsumableItemSchema:()=>ro,ConsumablesStatusSchema:()=>io,ContactStatusSchema:()=>oo,ControlKindSchema:()=>co,ControlStatusSchema:()=>lo,ConvertArtifactSchema:()=>Ee,ConvertResultSchema:()=>De,ConvertTargetSchema:()=>we,CoverStateSchema:()=>po,CoverStatusSchema:()=>mo,CreateApiKeyInputSchema:()=>eb,CreateApiKeyResultSchema:()=>tb,CreateIntegrationInputSchema:()=>dv,CreateScopedTokenInputSchema:()=>rb,CreateScopedTokenResultSchema:()=>ib,CreateUserInputSchema:()=>Zy,CustomActionInputSchema:()=>U_,CustomModelDescriptorSchema:()=>sp,DATAPLANE_SECRET_HEADER:()=>vn,DEFAULT_ADDON_PLACEMENT:()=>Be,DEFAULT_AUDIO_ANALYZER_CONFIG:()=>of,DEFAULT_DECODER_HWACCEL_CONFIG:()=>up,DEFAULT_FEATURES:()=>jn,DEFAULT_RETENTION:()=>Hn,DEVICE_CAP_NAMES:()=>_b,DEVICE_PROFILES:()=>Si,DEVICE_SETTINGS_CONTRIBUTION_METHODS:()=>na,DEVICE_STATUS_METHOD:()=>ra,DEVICE_TYPE_INFO:()=>jr,DayNightModeSchema:()=>go,DayNightOptionsSchema:()=>yo,DayNightSettingsPatchSchema:()=>bo,DayNightStatusSchema:()=>vo,DecodedAudioChunkSchema:()=>Vt,DecodedFrameSchema:()=>It,DecoderSessionConfigSchema:()=>Fn,DecoderStatsSchema:()=>Pn,DeleteIntegrationResultSchema:()=>pv,DetectionSourceSchema:()=>Oh,DeviceCodeSeveritySchema:()=>cs,DeviceConfig:()=>wi,DeviceDiscoveryStatusSchema:()=>Oo,DeviceExportExposeInputSchema:()=>Np,DeviceExportStatusSchema:()=>Ap,DeviceExportUnexposeInputSchema:()=>Pp,DeviceFeature:()=>gi,DeviceInfoSchema:()=>Gp,DeviceNetworkStatsSchema:()=>Mv,DeviceRole:()=>I,DeviceRuntimeState:()=>Ti,DeviceStatusSchema:()=>qi,DeviceType:()=>F,DiscoveredChildDeviceSchema:()=>V,DiscoveredChildStatusSchema:()=>Do,DiscoveredDeviceSchema:()=>wu,DiscoveredTargetSchema:()=>sh,DisposerChain:()=>ze,DoorbellPressEventSchema:()=>jo,DoorbellStatusSchema:()=>Ao,EVENT_PAD_MS:()=>qt,EXPRESSION_BUILTINS:()=>Jr,EXPRESSION_BUILTIN_NAMES:()=>Yr,EXPRESSION_COMPILE_CACHE_CAPACITY:()=>256,EXPRESSION_IDENTIFIER_RE:()=>Pr,EXPRESSION_INJECTED_NOW:()=>`now`,ElementConfigStore:()=>or,EmbeddingInfoSchema:()=>rm,EmbeddingResultSchema:()=>nm,EncodeProfileSchema:()=>Rn,EncodedPacketSchema:()=>Ft,EnrichedWidgetMetadataSchema:()=>Pd,EnumSensorDateTimeFormatSchema:()=>No,EnumSensorStatusSchema:()=>Po,EventCategory:()=>qe,EventEmitterStatusSchema:()=>Lo,EventFireSchema:()=>Io,EventItemSchema:()=>$_,EventKindSchema:()=>Sh,EventSourceType:()=>Un,ExportSetupFieldSchema:()=>Op,ExportSetupSchema:()=>kp,ExposedDeviceSchema:()=>Mp,ExposureModeSchema:()=>es,ExpressionEvalError:()=>k,ExpressionParseError:()=>O,FanControlStatusSchema:()=>Bo,FanDirectionSchema:()=>zo,FeatureManifestSchema:()=>Wy,FeatureProbeStatusSchema:()=>Yi,FloodStatusSchema:()=>Ho,FrameHandleFormatSchema:()=>Rt,FrameHandleSchema:()=>Lt,FrameInputSchema:()=>bs,GasStatusSchema:()=>Wo,GetStreamWithCodecInputSchema:()=>La,GlobalMetricsSchema:()=>Jh,HF_BASE_URL:()=>Gn,HF_REPO:()=>Wn,HWACCEL_OPTIONS:()=>lp,HealthStatusSchema:()=>Gy,HistoryPointSchema:()=>iu,HistoryResolutionEnum:()=>nu,HumidifierStatusSchema:()=>Ko,HumiditySensorStatusSchema:()=>Jo,HvacModeSchema:()=>qa,ImageRotateSchema:()=>Qo,ImageSettingsOptionsSchema:()=>is,ImageSettingsPatchSchema:()=>as,ImageSettingsStatusSchema:()=>rs,ImageStatusSchema:()=>Xo,IngestOwnerSchema:()=>Xh,InstalledPackageSchema:()=>D_,IntegrationLiteSchema:()=>cv,IntegrationWithStateSchema:()=>sv,IntercomAbilitySchema:()=>hv,IntercomStatusSchema:()=>gv,KNOWN_CAP_NAMES:()=>gb,LabelDefinitionSchema:()=>ve,LawnMowerActivitySchema:()=>ss,LawnMowerControlStatusSchema:()=>ls,LocateSegmentResultSchema:()=>Fy,LocationStatSchema:()=>Of,LockControlStatusSchema:()=>fs,LockStateSchema:()=>ds,LogEntrySchema:()=>lm,LogLevelSchema:()=>cm,LogStreamEntrySchema:()=>V_,LoginMethodContributionSchema:()=>xf,LoginStageEnum:()=>vf,MACRO_LABELS:()=>Cr,MAX_EXPRESSION_AST_NODES:()=>256,MAX_EXPRESSION_BINDINGS:()=>32,MAX_EXPRESSION_CALL_ARGS:()=>16,MAX_EXPRESSION_EVAL_STEPS:()=>Nr,MAX_EXPRESSION_SOURCE_LENGTH:()=>Mr,METHOD_ACCESS_MAP:()=>hb,MODEL_FORMATS:()=>ye,MaskGridDimsSchema:()=>Nc,MaskGridShapeSchema:()=>Oc,MaskLineShapeSchema:()=>kc,MaskPointSchema:()=>Tc,MaskPolygonShapeSchema:()=>Dc,MaskPolygonVerticesSchema:()=>Mc,MaskRectShapeSchema:()=>Ec,MaskShapeKindSchema:()=>jc,MaskShapeSchema:()=>Ac,MediaFileSchema:()=>Mh,MediaPlayerRepeatSchema:()=>hs,MediaPlayerStateSchema:()=>ms,MediaPlayerStatusSchema:()=>_s,MeshPeerSchema:()=>Dv,MeshStatusSchema:()=>Ov,MethodAccessSchema:()=>fh,ModelCatalogEntrySchema:()=>Ce,ModelConvertInputSchema:()=>Am,ModelConvertMetadataSchema:()=>Te,ModelDistributeInputSchema:()=>Mm,ModelDistributeResultSchema:()=>Nm,ModelExtraFileSchema:()=>be,ModelFormatEntrySchema:()=>x,ModelFormatsSchema:()=>xe,ModelSubstitutionSchema:()=>Us,ModelVariantGroupSchema:()=>Se,MotionAnalysisResultSchema:()=>Es,MotionEventSchema:()=>Dh,MotionOnMotionChangedDataSchema:()=>bc,MotionRegionSchema:()=>Ts,MotionSourceEnum:()=>uc,MotionSourcesSchema:()=>dc,MotionStatusSchema:()=>yc,MotionTriggerRuntimeStateSchema:()=>Cc,MotionTriggerStatusSchema:()=>Sc,MotionZoneOptionsSchema:()=>Ic,MotionZonePatchSchema:()=>Lc,MotionZoneRegionSchema:()=>Pc,MotionZoneStatusSchema:()=>Fc,MqttBrokerStatusSchema:()=>Gm,NativeDetectionSchema:()=>Bc,NativeObjectClassEnum:()=>zc,NativeObjectDetectionRuntimeStateSchema:()=>Hc,NativeObjectDetectionStatusSchema:()=>Vc,NetworkAccessStatusSchema:()=>Jm,NetworkAddressSchema:()=>Ky,NetworkEndpointSchema:()=>qm,NotificationActionSchema:()=>eh,NotificationFormatSchema:()=>$m,NotificationHistoryEntrySchema:()=>Kd,NotificationRuleSchema:()=>Wd,NotificationSchema:()=>th,NotifierStatusSchema:()=>qc,NumericSensorStatusSchema:()=>Zc,OauthIntegrationDescriptorSchema:()=>yh,ObjectEventSchema:()=>kh,OrchestratorMetricsSchema:()=>Os,OsdOverlayKindEnum:()=>Xv,OsdOverlayPatchSchema:()=>ey,OsdOverlaySchema:()=>Qv,OsdPositionEnum:()=>Zv,OsdStatusSchema:()=>$v,PET_FEEDER_MANUAL_FEED_MAX:()=>200,PET_FEEDER_MANUAL_FEED_MIN:()=>4,PIPELINE_FLOW_CAPABILITY_NAMES:()=>lb,PIPELINE_OWNER_CAPABILITY_NAMES:()=>ub,PROVIDER_KIND_CAP_NAMES:()=>xb,PYTHON_SCRIPT:()=>ur,PackageUpdateSchema:()=>O_,PackageVersionInfoSchema:()=>k_,PasskeySummarySchema:()=>t_,PcmSampleFormatSchema:()=>cf,PerScopeBreakdownSchema:()=>$l,PetFeederStatusSchema:()=>tl,PickStreamPreferencesSchema:()=>Ha,PickStreamRequirementsSchema:()=>Va,PickedCamStreamSchema:()=>Ua,PipelineAssignmentSchema:()=>Kh,PipelineDefaultStepSchema:()=>Ps,PipelineEngineChoiceSchema:()=>U,PipelineRunResultBridge:()=>ac,PipelineStepInputSchema:()=>W,PipelineValidationIssueSchema:()=>Ws,PipelineValidationResultSchema:()=>Gs,PlaceholderReasonSchema:()=>Pa,PolygonPointSchema:()=>cc,PowerMeterStatusSchema:()=>rl,PresenceStatusSchema:()=>ol,PressureSensorStatusSchema:()=>cl,PrivacyMaskOptionsSchema:()=>pl,PrivacyMaskPatchSchema:()=>ml,PrivacyMaskRegionSchema:()=>dl,PrivacyMaskShapeSchema:()=>ul,PrivacyMaskStatusSchema:()=>fl,ProfileRtspEntrySchema:()=>Kt,ProfileSlotSchema:()=>Ot,ProfileSlotStatusSchema:()=>Dt,ProviderStatusSchema:()=>Cu,PtzAutotrackRuntimeStateSchema:()=>yl,PtzAutotrackSettingsSchema:()=>gl,PtzAutotrackStatusSchema:()=>vl,PtzAutotrackTargetOptionSchema:()=>_l,PtzMoveCommandSchema:()=>Sy,PtzPositionSchema:()=>xy,PtzPresetSchema:()=>by,PtzStatusSchema:()=>Cy,QueryFilterSchema:()=>xg,REACHABILITY_FAILURES_TO_OFFLINE:()=>3,REACHABILITY_POLL_INTERVAL_MS:()=>ki,REACHABILITY_PROBE_TIMEOUT_MS:()=>Ai,RECOGNITION_TYPES:()=>Nn,RESERVED_BINDING_NAMES:()=>Fr,RUNTIME_DEFAULTS:()=>Kn,RUNTIME_TO_FORMAT:()=>lr,RawStateResultSchema:()=>Z_,ReadSegmentBytesResultSchema:()=>Iy,ReadinessRegistry:()=>hn,ReadinessTimeoutError:()=>fn,RecordingAvailabilitySchema:()=>ky,RecordingBandModeSchema:()=>en,RecordingBandSchema:()=>nn,RecordingBandTriggersSchema:()=>tn,RecordingConfigSchema:()=>on,RecordingDaysSchema:()=>Ay,RecordingDeviceUsageSchema:()=>My,RecordingLocationUsageSchema:()=>Ny,RecordingManifestSchema:()=>jy,RecordingModeSchema:()=>Zt,RecordingRangeSchema:()=>Oy,RecordingRetentionSchema:()=>an,RecordingRuleSchema:()=>rn,RecordingScheduleSchema:()=>Xt,RecordingStatusSchema:()=>Dy,RecordingStorageModeSchema:()=>Qt,RecordingStorageUsageSchema:()=>Py,RecordingTriggersSchema:()=>$t,RecordingWeekdaySchema:()=>Jt,RedirectLoginMethodSchema:()=>yf,RenderedAsSchema:()=>ch,ReportMotionInputSchema:()=>fc,RingBuffer:()=>Mb,RtpSourceSchema:()=>Ra,RtspRestreamEntrySchema:()=>Ea,RunnerCameraConfigSchema:()=>mc,RunnerCameraDeviceUIFields:()=>hc,RunnerFrameSourceSchema:()=>pc,RunnerLocalLoadSchema:()=>gc,RunnerLocalMetricsSchema:()=>_c,SCOPE_PRESETS:()=>yb,SOURCE_INFO_METADATA_KEY:()=>To,STREAM_PROFILE_META:()=>By,STREAM_QUALITY_LABELS:()=>xn,SUB_DETECTION_TYPES:()=>Mn,SYSTEM_CAP_NAMES:()=>vb,ScopedTokenSchema:()=>vh,ScopedTokenSummarySchema:()=>nb,ScoredObjectEventSchema:()=>Ih,ScriptRunnerStatusSchema:()=>xl,SearchResultSchema:()=>A_,SendEmailInputSchema:()=>Dg,SendEmailResultSchema:()=>Og,SendResultSchema:()=>lh,ServerBootModeSchema:()=>mg,ServerPackageStatusSchema:()=>_g,ServerRollbackInfoSchema:()=>gg,ServerUpdateActionResultSchema:()=>yg,ServerUpdateCheckResultSchema:()=>vg,ServerUpdateStateSchema:()=>hg,SettingsPatchSchema:()=>Ed,SettingsRecordSchema:()=>Sg,SettingsSchemaWithValuesSchema:()=>Q,SettingsUpdateResultSchema:()=>Dd,ShmRingStatsSchema:()=>dp,SmokeStatusSchema:()=>Cl,SmtpStatusSchema:()=>kg,SnapshotImageSchema:()=>jg,SourceInfoSchema:()=>B,SpatialDetectionSchema:()=>xs,SsoBridgeClaimsSchema:()=>Pg,StartEmbeddedInputSchema:()=>Um,StorageAbortUploadInputSchema:()=>qg,StorageBeginDownloadInputSchema:()=>Jg,StorageBeginDownloadResultSchema:()=>Yg,StorageBeginUploadInputSchema:()=>Ug,StorageBeginUploadResultSchema:()=>Wg,StorageEndDownloadInputSchema:()=>Zg,StorageFinalizeUploadInputSchema:()=>Kg,StorageLocationDeclarationSchema:()=>bn,StorageLocationRefSchema:()=>E,StorageLocationSchema:()=>T,StorageLocationTypeSchema:()=>yn,StorageProviderInfoSchema:()=>Vg,StorageReadChunkInputSchema:()=>Xg,StorageTestLocationResultSchema:()=>Hg,StorageWriteChunkInputSchema:()=>Gg,StreamCodecSchema:()=>Ba,StreamFormatSchema:()=>Ta,StreamNetworkStatsSchema:()=>Av,StreamParamsOptionsSchema:()=>kl,StreamParamsStatusSchema:()=>Dl,StreamProfileConfigSchema:()=>El,StreamProfileOptionsSchema:()=>Ol,StreamProfilePatchSchema:()=>Al,StreamProfileSchema:()=>Tl,StreamSourceEntrySchema:()=>Nt,StreamSourceSchema:()=>Pt,SubscribeAudioChunksInputSchema:()=>Ht,SubscribeAudioChunksResultSchema:()=>Ut,SubscribeFramesInputSchema:()=>zt,SubscribeFramesResultSchema:()=>Bt,SwitchStatusSchema:()=>Ml,SystemMetricsSchema:()=>Om,SystemMirror:()=>dd,TIMEZONES:()=>St,TamperStatusSchema:()=>Pl,TankStatusSchema:()=>Vl,TargetKindCapsSchema:()=>rh,TargetKindLevelSchema:()=>nh,TargetKindSchema:()=>ah,TargetSchema:()=>oh,TemperatureSensorStatusSchema:()=>Il,TestConnectionResultSchema:()=>uv,TestResultSchema:()=>uh,ToastSchema:()=>Jy,TokenScopeSchema:()=>$,TopologyNodeSchema:()=>zv,TopologyProcessSchema:()=>Fv,TopologyServiceSchema:()=>Pv,TrackSchema:()=>Th,TrackStateSchema:()=>xh,TrackedDetectionSchema:()=>Fh,TurnServerSchema:()=>$g,UNIT_TABLE:()=>pu,UnifiedBrokerInfoSchema:()=>jf,UnitConversionError:()=>mu,UpdateIntegrationInputSchema:()=>fv,UpdateStatusSchema:()=>Rl,UpdateUserInputSchema:()=>Qy,UserRecordSchema:()=>gh,UserSummarySchema:()=>Xy,VacuumControlStatusSchema:()=>Hl,VacuumStateSchema:()=>Bl,ValveStateSchema:()=>Wl,ValveStatusSchema:()=>Gl,VibrationStatusSchema:()=>ql,VideoEncodeSchema:()=>In,WELL_KNOWN_TABS:()=>Je,WELL_KNOWN_TAB_MAP:()=>Ye,WaterHeaterStatusSchema:()=>Yl,WeatherStatusSchema:()=>Zl,WebrtcStreamChoiceSchema:()=>c_,WebrtcStreamTargetSchema:()=>s_,WhiteBalanceModeSchema:()=>$o,WidgetHostEnum:()=>kd,WidgetLoginMethodSchema:()=>bf,WidgetMetadataSchema:()=>Md,WidgetRemoteSchema:()=>jd,WidgetSizeEnum:()=>Ad,YAMNET_TO_MACRO:()=>Er,ZoneKindEnum:()=>sc,ZoneRuleModeEnum:()=>ou,ZoneRuleSchema:()=>su,ZoneRuleStageEnum:()=>lu,ZoneRulesArraySchema:()=>cu,ZoneSchema:()=>G,ZoneScopeBreakdownSchema:()=>eu,accessoriesCapability:()=>d_,accessoryStableId:()=>yi,addonPagesCapability:()=>_d,addonPagesSourceCapability:()=>yd,addonRoutesCapability:()=>Cd,addonSettingsCapability:()=>Od,addonWidgetsCapability:()=>Fd,addonWidgetsSourceCapability:()=>Nd,addonsCapability:()=>W_,adminUiCapability:()=>Rd,advancedNotifierCapability:()=>Jd,airQualitySensorCapability:()=>Qi,alarmPanelCapability:()=>la,alertsCapability:()=>$d,ambientLightSensorCapability:()=>da,applyTransform:()=>Ku,asBoolean:()=>tr,asJsonArray:()=>Qn,asJsonObject:()=>Zn,asNumber:()=>er,asString:()=>$n,audioAnalysisCapability:()=>ef,audioAnalyzerCapability:()=>sf,audioCodecCapability:()=>hf,audioMetricsCapability:()=>ga,authProviderCapability:()=>_f,autoAssignProfiles:()=>An,automationControlCapability:()=>va,backupCapability:()=>kf,batteryCapability:()=>ba,bestLocationMatch:()=>Ob,binaryCapability:()=>Sa,bindAddonActions:()=>Lb,brightnessCapability:()=>wa,brokerCapability:()=>Xf,buildAddonRouteProvider:()=>gt,buildModelVariantGroups:()=>Ie,buildStreamParamsConfigSchema:()=>Hy,buttonCapability:()=>G_,cameraCredentialsCapability:()=>J_,cameraPipelineConfigCapability:()=>Zf,cameraStreamsCapability:()=>Wa,canConvertUnit:()=>xu,carbonMonoxideCapability:()=>Ka,cellsToRects:()=>Pb,classifyStream:()=>Tn,classifyStreams:()=>wn,climateControlCapability:()=>Ya,collectHydratedFieldEntries:()=>Ze,collectHydratedFieldValues:()=>$e,colorCapability:()=>eo,compileExpression:()=>di,compileExpressionSafe:()=>fi,connectivityCapability:()=>no,consumablesCapability:()=>ao,contactCapability:()=>so,controlCapability:()=>fo,convertUnit:()=>yu,cosineSimilarity:()=>ar,coverCapability:()=>ho,createDeviceProxy:()=>td,createDurableState:()=>st,createEvent:()=>at,createExpressionScope:()=>ni,createLazyTrpcSource:()=>Qu,createMirrorSource:()=>$u,createRuntimeStateBridge:()=>Oi,createSliceHandle:()=>Z,createSystemProxy:()=>ad,customAction:()=>ap,customModelRegistryCapability:()=>cp,dayNightCapability:()=>xo,decoderCapability:()=>fp,defaultDeviceFor:()=>Wb,defineCustomActions:()=>ip,describeModelVariant:()=>Re,detectionPipelineCapability:()=>pp,deviceAdoptionCapability:()=>Ep,deviceCustomAction:()=>op,deviceDiscoveryCapability:()=>ko,deviceExportCapability:()=>Fp,deviceManagerCapability:()=>em,deviceMatchesProfile:()=>bi,deviceOpsCapability:()=>Q_,deviceProviderCapability:()=>ku,deviceStateCapability:()=>tm,deviceStatusCapability:()=>Ji,doorbellCapability:()=>Mo,embeddingEncoderCapability:()=>im,emitDownForOwnedCaps:()=>_n,emitReadiness:()=>ot,encodeProfileFromStreamShape:()=>zn,enumSensorCapability:()=>Fo,enumerateItemArrayFields:()=>Xu,enumerateSchemaFields:()=>Yu,errMsg:()=>vr,evaluateAst:()=>li,evaluateLinkExpression:()=>hi,evaluateZoneRules:()=>nd,event:()=>z,eventEmitterCapability:()=>Ro,eventsCapability:()=>ev,expandCapMethods:()=>ia,extractSourceInfoFromMetadata:()=>Eo,faceGalleryCapability:()=>ov,fanControlCapability:()=>Vo,featureProbeCapability:()=>Xi,filesystemBrowseCapability:()=>sm,findTimezone:()=>Ct,floodCapability:()=>Uo,formatForBackend:()=>mr,formatForRuntime:()=>hr,frameworkSwapConfirmSchema:()=>Tb,frameworkSwapPackageSchema:()=>Cb,gasCapability:()=>Go,getAudioMacroClassIds:()=>Ar,getByPath:()=>Wu,getCapsByProviderKind:()=>Sb,hfModelUrl:()=>ir,htmlToText:()=>Fi,humidifierCapability:()=>qo,humiditySensorCapability:()=>Yo,hydrateSchema:()=>tt,imageCapability:()=>Zo,imageSettingsCapability:()=>os,integrationsCapability:()=>mv,intercomCapability:()=>vv,isAgentOnlyPlacement:()=>Ue,isArrayOutputSchema:()=>ep,isDeployableToAgent:()=>He,isDeviceConfigCap:()=>aa,isEvent:()=>it,isObjectInput:()=>$f,isVoidInput:()=>Qf,jobKindSchema:()=>f_,kebabToCamel:()=>rp,lawnMowerControlCapability:()=>us,lifecycleJobSchema:()=>y_,lifecycleJobScopeSchema:()=>v_,lifecycleJobStateSchema:()=>__,lifecycleTaskSchema:()=>g_,localNetworkCapability:()=>Tv,locationSimilarity:()=>Db,lockControlCapability:()=>ps,logDestinationCapability:()=>um,loginMethodCapability:()=>Sf,looseSchema:()=>tp,makeProfileBrokerId:()=>kt,makeSourceBrokerId:()=>At,mapAudioLabelToMacro:()=>kr,markdownToHtmlLite:()=>zi,markdownToText:()=>Ni,maskUrlCredentials:()=>jb,mediaPlayerCapability:()=>vs,mergeSourceInfo:()=>Co,meshNetworkCapability:()=>kv,method:()=>R,metricsProviderCapability:()=>km,migrateConfigToBands:()=>dn,modelConvertCapability:()=>jm,modelDistributorCapability:()=>Pm,modelFormatForRuntime:()=>Gb,motionCapability:()=>xc,motionDetectionCapability:()=>Ds,motionTriggerCapability:()=>wc,motionZonesCapability:()=>Rc,mqttBrokerCapability:()=>Km,nativeObjectDetectionCapability:()=>Uc,networkAccessCapability:()=>Xm,networkQualityCapability:()=>Nv,nodePin:()=>Jn,nodesCapability:()=>Yv,normalizeAddonInitResult:()=>ht,normalizeUnit:()=>wo,notificationOutputCapability:()=>dh,notifierCapability:()=>Xc,numericSensorCapability:()=>Qc,oauthIntegrationCapability:()=>bh,osdCapability:()=>ty,parseCameraStreamConfig:()=>kn,parseExpression:()=>ei,parseJsonArray:()=>rr,parseJsonObject:()=>nr,parseJsonUnknown:()=>Xn,parseProfileBrokerId:()=>jt,parseStreamParamsFormPatch:()=>Uy,pendingFrameworkSwapSchema:()=>wb,petFeederCapability:()=>nl,pickPreferredRtspEntry:()=>Bn,pipelineAnalyticsCapability:()=>Rh,pipelineExecutorCapability:()=>oc,pipelineOrchestratorCapability:()=>pg,pipelineRunnerCapability:()=>vc,plateGalleryCapability:()=>ay,platformProbeCapability:()=>yy,powerMeterCapability:()=>il,prepareNotification:()=>Ki,presenceCapability:()=>sl,pressureSensorCapability:()=>ll,privacyMaskCapability:()=>hl,procedureAuthKey:()=>np,ptzAutotrackCapability:()=>bl,ptzCapability:()=>Ty,pythonScriptForBackend:()=>gr,readNodePin:()=>Yn,readinessKey:()=>pn,rebootCapability:()=>Ey,recordingCapability:()=>Ly,rectsToCells:()=>Nb,requiresPython:()=>_r,resolveAddonExecution:()=>Ve,resolveAddonGroup:()=>We,resolveAddonPlacement:()=>Ke,resolveAddonRuntime:()=>pr,resolveCapMount:()=>$i,resolveDetectionRuntime:()=>dr,resolveDeviceProfile:()=>Ci,resolveFormat:()=>Vi,resolveHydratedFieldValue:()=>et,resolveModelFormat:()=>fr,resolveRunnerId:()=>Ge,resolveVariantModelId:()=>Le,runInferenceStep:()=>yr,runtimeDevices:()=>Ub,scopeKey:()=>w,scoreRuntimes:()=>Kb,scriptRunnerCapability:()=>Sl,selectAssignedProfileSlots:()=>Mt,serverManagementCapability:()=>bg,setByPath:()=>Gu,settingsStoreCapability:()=>Tg,sleep:()=>Fb,sleepCancellable:()=>Ib,smokeCapability:()=>wl,smtpProviderCapability:()=>Ag,snapshotCapability:()=>Ng,ssoBridgeCapability:()=>Fg,startReachabilityPoll:()=>Mi,storageCapability:()=>Lg,storageEvictableCapability:()=>Bg,storageProviderCapability:()=>Qg,streamBrokerCapability:()=>za,streamCatalogCapability:()=>zy,streamParamsCapability:()=>jl,streamPixels:()=>Cn,streamQualityLabel:()=>Sn,supportedRuntimes:()=>Hb,switchCapability:()=>Nl,synthesizeSourceInfo:()=>So,systemCapability:()=>qy,tamperCapability:()=>Fl,taskLogEntrySchema:()=>h_,taskPhaseSchema:()=>p_,taskTargetSchema:()=>m_,temperatureSensorCapability:()=>Ll,textToHtml:()=>Ri,toDeviceSummary:()=>Au,toExpressionValue:()=>pi,toStreamSourceEntry:()=>En,toastCapability:()=>Yy,tokenize:()=>Vr,transcodeBody:()=>Hi,tryConvertUnit:()=>bu,turnProviderCapability:()=>e_,unitDimension:()=>gu,unitsForDimension:()=>Su,updateCapability:()=>zl,userManagementCapability:()=>cb,userPasskeysCapability:()=>n_,vacuumControlCapability:()=>Ul,validateExpressionSource:()=>mi,valveCapability:()=>Kl,vibrationCapability:()=>Jl,videoclipsCapability:()=>a_,viewerUiCapability:()=>Vd,waterHeaterCapability:()=>Xl,weatherCapability:()=>Ql,webrtcClientHintsSchema:()=>o_,webrtcSessionCapability:()=>l_,wiringAddonHealthSchema:()=>he,wiringHealthSnapshotSchema:()=>_e,wiringNodeHealthSchema:()=>ge,wiringProbeKindSchema:()=>pe,wiringProbeResultSchema:()=>me,zodEntriesToConfigUI:()=>Pu,zoneAnalyticsCapability:()=>au,zoneRulesCapability:()=>uu,zonesCapability:()=>lc});export{Fr as A,Re as B,I as C,fi as D,mi as E,Ct as F,ye as H,Ye as I,Ze as L,S as M,At as N,Yr as O,St as P,qe as R,gi as S,hi as T,Le as V,xu as _,Dy as a,Su as b,Ap as c,dd as d,ad as f,Wu as g,Z as h,pb as i,on as j,Pr as k,Mp as l,Qu as m,bb as n,Ov as o,td as p,gb as r,Jm as s,qb as t,Mf as u,bu as v,F as w,B as x,gu as y,Ie as z};
|
|
7
|
+
`).trim()}var Ii=[[/&/g,`&`],[/</g,`<`],[/>/g,`>`],[/"/g,`"`],[/'/g,`'`]];function Li(e){let t=e;for(let[e,n]of Ii)t=t.replace(e,n);return t}function Ri(e){return Li(e).replace(/\n/g,`<br>`)}function zi(e){return Li(e).replace(/(\*\*|__)(.*?)\1/g,`<b>$2</b>`).replace(/(\*|_)(.*?)\1/g,`<i>$2</i>`).replace(/`([^`]*)`/g,`<code>$1</code>`).replace(/\[([^\]]*)\]\(([^)]*)\)/g,`<a href="$2">$1</a>`).replace(/\n/g,`<br>`)}var Bi={text:[`text`,`markdown`,`html`],markdown:[`markdown`,`html`,`text`],html:[`html`,`text`,`markdown`]};function Vi(e,t){for(let n of Bi[e])if(t.includes(n))return n;return t[0]??`text`}function Hi(e,t,n){if(t===n)return e;if(n===`text`){if(t===`markdown`)return Ni(e);if(t===`html`)return Fi(e)}if(n===`html`){if(t===`text`)return Ri(e);if(t===`markdown`)return zi(e)}if(n===`markdown`){if(t===`text`)return e;if(t===`html`)return Fi(e)}return e}function Ui(e){return{id:e.id,ordinal:e.ordinal,...e.flags?{flags:e.flags}:{},...e.requires?{requires:e.requires}:{}}}function Wi(e,t){if(e.length===0)return null;if(t.level!==void 0){let n=e.find(e=>e.id===t.level);if(n)return Ui(n)}let n=e.filter(e=>e.ordinal!==null);if(n.length===0)return Ui(e[0]);let r=t.priority;return Ui([...n].sort((e,t)=>{let n=Math.abs((e.ordinal??0)-r),i=Math.abs((t.ordinal??0)-r);return n===i?(t.ordinal??0)-(e.ordinal??0):n-i})[0])}function Gi(e,t){if(t<=0||e.length<=t)return[e];let n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n}function Ki(e,t){let n=[],r=t.format,i=Vi(r,e.format);i!==r&&n.push(`format`);let a=Hi(t.body,r,i),o=Wi(e.levels,t),s=t.attachments??[],c=[];for(let t of s){if(!e.attachments.mediaTypes.includes(t.mediaType)){n.push(`attachment:${t.mediaType}`);continue}if(e.attachments.mode===`url`&&t.url===void 0){n.push(`attachment:noUrl`);continue}if(t.bytes!==void 0&&e.attachments.maxBytes!==void 0&&t.bytes.length>e.attachments.maxBytes){n.push(`attachment:maxBytes`);continue}if(c.length>=e.attachments.max){n.push(`attachment:max`);continue}let r=e.attachments.mode===`bytes`&&t.bytes===void 0&&t.url!==void 0;c.push({mediaType:t.mediaType,...t.url===void 0?{}:{url:t.url},...t.bytes===void 0?{}:{bytes:t.bytes},...t.mime===void 0?{}:{mime:t.mime},...t.name===void 0?{}:{name:t.name},needsFetch:r})}let l=t.actions??[],u=l.slice(0,Math.max(0,e.actions));l.length>u.length&&n.push(`actions`);let d=null;t.clickUrl!==void 0&&(e.clickUrl?d=t.clickUrl:n.push(`clickUrl`));let f=null;t.sound!==void 0&&(e.sound?f=t.sound:n.push(`sound`));let ee=null;t.ttl!==void 0&&(e.ttl?ee=t.ttl:n.push(`ttl`));let p=t.tag??null,te=Gi(a,e.bodyMaxLen),m=te.length>1,h={level:o?.id??``,format:i,attachmentsSent:c.length,actionsSent:u.length,truncated:m,dropped:n};return{body:te[0]??``,...t.title===void 0?{}:{title:t.title},format:i,level:o,attachments:c,actions:u,clickUrl:d,sound:f,ttl:ee,tag:p,bodyParts:te,renderedAs:h}}var qi=y({online:m(),lastChangedAt:i()}),Ji={name:`device-status`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{},events:{onStatusChanged:{data:y({deviceId:i(),status:qi})}},status:{schema:qi,kind:`push`},runtimeState:qi},Yi=y({flags:o(a(),r()),deviceType:a().nullable(),model:a().nullable(),channelCount:i().nullable(),lastProbedAt:i(),lastFetchedAt:i()}),Xi={name:`feature-probe`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{},events:{onProbeChanged:{data:y({deviceId:i(),status:Yi})}},status:{schema:Yi,kind:`push`},runtimeState:Yi},Zi=y({co2Ppm:i().min(0).optional(),vocPpb:i().min(0).optional(),pm25:i().min(0).optional(),pm10:i().min(0).optional(),aqi:i().optional(),lastFetchedAt:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional()}),Qi={name:`air-quality-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:Zi,kind:`push`},runtimeState:Zi};function $i(e){return e.mount?e.mount:e.deviceNative===!0?{kind:`device-native`}:e.mode===`collection`?{kind:`collection`}:{kind:`singleton`}}var ea=y({id:a(),title:a(),description:a().optional(),style:v([`card`,`accordion`]).optional(),defaultCollapsed:m().optional(),columns:g([c(1),c(2),c(3),c(4)]).optional(),tab:a().optional(),location:v([`settings`,`top-tab`]).optional(),order:i().optional(),fields:h(ae())}),ta=y({tabs:h(y({id:a(),label:a(),icon:a(),order:i().optional()})).optional(),sections:h(ea)}).nullable(),na={getDeviceSettingsContribution:{input:y({deviceId:i()}),output:ta,kind:`query`,auth:`protected`},getDeviceLiveContribution:{input:y({deviceId:i()}),output:ta,kind:`query`,auth:`protected`},applyDeviceSettingsPatch:{input:y({deviceId:i(),patch:o(a(),r())}),output:y({success:c(!0)}),kind:`mutation`,auth:`admin`}},ra={getStatus:{input:y({deviceId:i()}),output:r().nullable(),kind:`query`,auth:`protected`}};function ia(e){let t=e.methods;return e.exposesDeviceSettings&&(t={...na,...t}),e.status&&(t={...ra,...t}),t}function R(e,t,n){return{input:e,output:t,kind:n?.kind??`query`,auth:n?.auth??`protected`,...n?.access===void 0?{}:{access:n.access},timeoutMs:n?.timeoutMs}}function z(e){return{data:e}}function aa(e){return e?.deviceConfig!==void 0}var oa=v([`disarmed`,`armed_home`,`armed_away`,`armed_night`,`armed_vacation`,`armed_custom_bypass`,`arming`,`disarming`,`pending`,`triggered`]),sa=v([`home`,`away`,`night`,`vacation`,`custom_bypass`]),ca=y({state:oa,availableModes:h(sa),requiresCode:m(),lastChangedAt:i()}),la={name:`alarm-panel`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.AlarmPanel],methods:{arm:R(y({deviceId:i().int().nonnegative(),mode:sa,code:a().min(1).optional()}),_(),{kind:`mutation`,auth:`admin`}),disarm:R(y({deviceId:i().int().nonnegative(),code:a().min(1).optional()}),_(),{kind:`mutation`,auth:`admin`}),trigger:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:ca,kind:`push`},runtimeState:ca},ua=y({lux:i().min(0),lastFetchedAt:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional()}),da={name:`ambient-light-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:ua,kind:`push`},runtimeState:ua},fa=y({className:a(),hits:i().int().nonnegative(),avgScore:i().min(0).max(1),peakScore:i().min(0).max(1)}),pa=y({ts:i().int(),windowSec:i().int().positive(),level:y({rms:i(),dbfs:i()}),peakDbfs:i(),avgDbfs:i(),current:y({className:a(),score:i().min(0).max(1),timestamp:i().int()}).nullable(),byClass:h(fa).readonly()}),ma=y({ts:i().int(),dbfs:i().nullable(),peakDbfs:i(),avgDbfs:i(),topClass:a().nullable(),topScore:i().min(0).max(1).nullable()}),ha=y({points:h(ma).readonly(),effectiveSampleEveryMs:i().int().positive(),windowMsActual:i().int().nonnegative()}),ga={name:`audio-metrics`,scope:`device`,mode:`singleton`,deviceTypes:[F.Camera],methods:{getCurrentSnapshot:R(y({deviceId:i()}),pa.nullable()),getHistory:R(y({deviceId:i(),windowSec:i().int().positive().optional(),sampleEveryMs:i().int().positive().optional()}),ha)},runtimeState:pa},_a=y({enabled:m(),isRunning:m(),lastTriggeredAt:i(),lastError:a().nullable(),lastChangedAt:i()}),va={name:`automation-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Automation],methods:{enable:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),disable:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),trigger:R(y({deviceId:i().int().nonnegative(),skipCondition:m().optional()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:_a,kind:`push`},runtimeState:_a},ya=y({percentage:i().min(0).max(100),charging:v([`dc`,`solar`,`none`]),sleeping:m(),lastUpdated:i(),binary:m().optional()}),ba={name:`battery`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera,F.Sensor,F.Button,F.Switch],methods:{wakeForStream:R(y({deviceId:i(),timeoutMs:i().int().min(500).max(3e4).default(8e3)}),y({awoke:m(),durationMs:i()}),{kind:`mutation`})},events:{onStatusChanged:{data:y({deviceId:i(),status:ya})}},status:{schema:ya,kind:`push`,empty:{percentage:0,charging:`none`,sleeping:!1,lastUpdated:0}},runtimeState:ya},xa=y({on:m(),lastChangedAt:i()}),Sa={name:`binary`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:xa,kind:`push`},runtimeState:xa},Ca=y({percentage:i().min(0).max(100),lastChangedAt:i()}),wa={name:`brightness`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Light],methods:{setBrightness:R(y({deviceId:i().int().nonnegative(),percentage:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`})},events:{onBrightnessChanged:{data:y({deviceId:i(),percentage:i().min(0).max(100),lastChangedAt:i()})}},status:{schema:Ca,kind:`command-driven`},runtimeState:Ca},Ta=v([`webrtc`,`hls`,`mjpeg`,`rtsp`]),Ea=y({brokerId:a(),url:a(),mutedUrl:a(),enabled:m(),codec:a().optional(),resolution:y({width:i().int().positive(),height:i().int().positive()}).optional()}),Da=y({sessionId:a(),remoteAddr:a(),userAgent:a().nullish(),playing:m(),muted:m(),connectedAt:i(),lastRtpAt:i(),bytesSent:i()}),Oa=y({tag:a(),subscribedAt:i(),maxFps:i(),framesDelivered:i(),framesDropped:i()}),ka=y({tag:a(),subscribedAt:i(),chunksDelivered:i()}),Aa=v([`alexa`,`homekit`,`webrtc-browser`,`webrtc-mobile`,`webrtc-whep`,`rtsp-listen`,`derived-broker`,`recording`,`pipeline`,`snapshot`,`warmup`,`unknown`]),ja=y({kind:Aa,label:a().optional(),media:v([`audio`,`video`,`both`]).optional(),targetCodec:a().optional(),transport:v([`passthrough`,`repacketize`,`transcode`]).optional(),remoteAddr:a().optional(),userAgent:a().optional(),userId:a().optional(),sessionId:a().optional(),extra:o(a(),a()).optional()}).readonly(),Ma=y({id:a(),channel:v([`annexb`,`rtp`]),attribution:ja,subscribedAt:i(),packetsDelivered:i()}),Na=y({rtsp:h(Da).readonly(),decoded:h(Oa).readonly(),audio:h(ka).readonly(),encoded:h(Ma).readonly(),pipeClients:i(),encodedSubscribers:i()}),Pa=v([`reconnecting`,`sleeping`,`offline`,`disabled`,`waking`]),Fa=v([`h264`,`h265`,`copy`]),Ia=v([`aac`,`opus`,`pcmu`,`copy`,`none`]),La=y({deviceId:i().int().nonnegative(),video:Fa,audio:Ia.optional(),profile:S.optional(),targetResolution:y({width:i().int().positive(),height:i().int().positive()}).optional(),outputArgs:h(a()).optional(),audioEgress:m().optional(),hostname:a().optional(),tag:a().optional()}),Ra=y({url:a(),videoCodec:v([`H264`,`H265`]),audioCodec:a(),resolution:y({width:i().int().positive(),height:i().int().positive()}),transcoded:m(),encoder:a(),pipelineKey:a()}),za={name:`stream-broker`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,methods:{publishCameraStream:R(y({deviceId:i().int().nonnegative(),camStreamId:a().min(1),kind:Tt,url:a().optional(),codec:a().optional(),resolution:C.optional(),fps:i().positive().optional(),label:a().optional(),deviceFeatures:h(a()).optional(),autoEligible:m().optional(),metadata:o(a(),r()).optional(),sourceCamStreamId:a().min(1).optional(),encodeProfile:Rn.optional()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),retractCameraStream:R(y({deviceId:i().int().nonnegative(),camStreamId:a().min(1)}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),assignProfile:R(y({deviceId:i().int().nonnegative(),profile:S,camStreamId:a().min(1)}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),unassignProfile:R(y({deviceId:i().int().nonnegative(),profile:S}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),listAllCameraStreams:R(_(),h(Et).readonly()),listAllProfileSlots:R(_(),h(Ot).readonly()),getBrokerStats:R(y({brokerId:a()}),Gt),probeStream:R(y({brokerId:a()}),y({probed:m(),summary:a()}),{kind:`mutation`,auth:`admin`}),listClients:R(y({brokerId:a()}),Na),killClient:R(y({brokerId:a(),channel:v([`rtsp`,`decoded`,`audio`]),handle:a()}),y({killed:m()}),{kind:`mutation`,auth:`admin`}),restartProfile:R(y({deviceId:i().int().nonnegative(),profile:S}),y({success:m()}),{kind:`mutation`,auth:`admin`}),getStreamUrl:R(y({streamId:a(),format:Ta}),y({url:a()})),getStreamWithCodec:R(La,Ra,{kind:`mutation`,auth:`admin`}),releaseStreamWithCodec:R(y({pipelineKey:a()}),y({released:m(),refcount:i().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),subscribeAudioChunks:R(Ht,Ut,{kind:`mutation`}),pullAudioChunks:R(y({subscriptionId:a(),maxCount:i().int().positive().default(8)}),h(Vt).readonly()),unsubscribeAudioChunks:R(y({subscriptionId:a()}),y({released:m()}),{kind:`mutation`}),subscribeFrames:R(zt,Bt,{kind:`mutation`}),pullFrameHandles:R(y({subscriptionId:a(),maxCount:i().int().positive().default(4)}),h(Lt).readonly()),unsubscribeFrames:R(y({subscriptionId:a()}),y({released:m()}),{kind:`mutation`}),setPreBufferDuration:R(y({brokerId:a(),seconds:i().min(0).max(30)}),_(),{kind:`mutation`,auth:`admin`}),getPreBufferInfo:R(y({brokerId:a()}),y({configuredSec:i(),bufferedMs:i(),packetCount:i()})),getRtspPort:R(_(),i()),getAllRtspEntries:R(y({hostname:a().optional()}),h(Ea).readonly()),getRtspEntry:R(y({brokerId:a(),hostname:a().optional()}),Ea.nullable()),regenerateRtspToken:R(y({brokerId:a()}),a().nullable(),{kind:`mutation`,auth:`admin`}),setRtspEnabled:R(y({brokerId:a(),enabled:m()}),_(),{kind:`mutation`,auth:`admin`}),isRtspEnabled:R(y({brokerId:a()}),m())},events:{onCamStreamDemand:z(y({deviceId:i().int().nonnegative(),camStreamId:a(),profile:S})),onCamStreamIdle:z(y({deviceId:i().int().nonnegative(),camStreamId:a()})),onRequestStreamSourceRefresh:z(y({deviceId:i().int().nonnegative(),camStreamId:a(),brokerId:a()}))}},Ba=v([`h264`,`h265`,`hevc`,`av1`,`mjpeg`,`vp8`,`vp9`]),Va=y({acceptCodecs:h(Ba).readonly().optional(),minHeight:i().int().positive().optional(),minWidth:i().int().positive().optional(),excludeDerived:m().optional(),requireSiblingCodec:h(Ba).readonly().optional()}).readonly(),Ha=y({preferredProviders:h(a()).readonly().optional(),resolutionPreference:v([`highest`,`lowest`]).optional()}).readonly(),Ua=y({camStreamId:a(),codec:a().optional(),resolution:C.optional(),reason:a()}),Wa={name:`camera-streams`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[F.Camera],methods:{getCameraStreams:R(y({deviceId:i().int().nonnegative()}),h(Et).readonly()),getBrokerStreams:R(y({deviceId:i().int().nonnegative()}),h(Ot).readonly()),getRtspEntries:R(y({deviceId:i().int().nonnegative(),hostname:a().optional()}),h(Ea).readonly()),getProfileRtspEntries:R(y({deviceId:i().int().nonnegative(),hostname:a().optional()}),h(Kt).readonly()),pickStream:R(y({deviceId:i().int().nonnegative(),requirements:Va,preferences:Ha.optional()}),Ua.nullable())},events:{onCamStreamsChanged:z(y({deviceId:i().int().nonnegative(),camStreams:h(Et).readonly()})),onProfileSlotsChanged:z(y({deviceId:i().int().nonnegative(),profileSlots:h(Ot).readonly()}))},runtimeState:y({online:m(),slotStatuses:y({high:Dt.optional(),mid:Dt.optional(),low:Dt.optional()}),slotErrors:y({high:a().optional(),mid:a().optional(),low:a().optional()}),lastChangedAt:i()})},Ga=y({detected:m(),lastChangedAt:i()}),Ka={name:`carbon-monoxide`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:Ga,kind:`push`},runtimeState:Ga},qa=v([`off`,`heat`,`cool`,`auto`,`heat_cool`,`fan_only`,`dry`]),Ja=y({mode:qa,availableModes:h(qa),fanMode:a(),availableFanModes:h(a()),preset:a(),availablePresets:h(a()),target:i().nullable(),targetHigh:i().nullable(),targetLow:i().nullable(),targetHumidity:i().min(0).max(100).nullable(),currentTemp:i().nullable(),currentHumidity:i().min(0).max(100).nullable(),swingVertical:m().nullable(),swingHorizontal:m().nullable(),lastFetchedAt:i()}),Ya={name:`climate-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Thermostat,F.Climate],methods:{setMode:R(y({deviceId:i().int().nonnegative(),mode:qa}),_(),{kind:`mutation`,auth:`admin`}),setFanMode:R(y({deviceId:i().int().nonnegative(),fanMode:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),setPreset:R(y({deviceId:i().int().nonnegative(),preset:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),setTarget:R(y({deviceId:i().int().nonnegative(),target:i()}),_(),{kind:`mutation`,auth:`admin`}),setTargetRange:R(y({deviceId:i().int().nonnegative(),targetLow:i(),targetHigh:i()}),_(),{kind:`mutation`,auth:`admin`}),setTargetHumidity:R(y({deviceId:i().int().nonnegative(),targetHumidity:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`}),setSwingVertical:R(y({deviceId:i().int().nonnegative(),on:m()}),_(),{kind:`mutation`,auth:`admin`}),setSwingHorizontal:R(y({deviceId:i().int().nonnegative(),on:m()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Ja,kind:`push`},runtimeState:Ja},Xa=y({r:i().int().min(0).max(255),g:i().int().min(0).max(255),b:i().int().min(0).max(255)}),Za=y({h:i().min(0).max(360),s:i().min(0).max(100),v:i().min(0).max(100)}),Qa=b(`mode`,[y({mode:c(`rgb`),rgb:Xa}),y({mode:c(`hsv`),hsv:Za}),y({mode:c(`mired`),mireds:i().int().min(50).max(1e3)})]),$a=y({mode:v([`rgb`,`hsv`,`mired`]),rgb:Xa.optional(),hsv:Za.optional(),mireds:i().int().optional(),lastChangedAt:i()}),eo={name:`color`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Light],methods:{setColor:R(y({deviceId:i().int().nonnegative(),color:Qa}),_(),{kind:`mutation`,auth:`admin`})},events:{onColorChanged:{data:y({deviceId:i(),mode:v([`rgb`,`hsv`,`mired`]),rgb:Xa.optional(),hsv:Za.optional(),mireds:i().int().optional(),lastChangedAt:i()})}},status:{schema:$a,kind:`command-driven`},runtimeState:$a},to=y({connected:m(),lastChangedAt:i()}),no={name:`connectivity`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:to,kind:`push`},runtimeState:to},ro=y({key:a().min(1),label:a().min(1),level:i().min(0).max(100).nullable(),status:v([`ok`,`replace`]).nullable(),lastResetAt:i().nullable(),resettable:m()}),io=y({items:h(ro),lastChangedAt:i()}),ao={name:`consumables`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:Object.values(F),deviceConfig:{ui:{kind:`widget`,widgetId:`host/consumables-panel`,tab:`consumables`,topTab:!0,label:`Consumables`,order:5}},methods:{reset:R(y({deviceId:i().int().nonnegative(),key:a().min(1)}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:io,kind:`push`,empty:{items:[],lastChangedAt:0},itemArray:{path:`items`,keyField:`key`,labelField:`label`,itemSchema:ro,emptyItem:{key:``,label:``,level:null,status:null,lastResetAt:null,resettable:!1}}},runtimeState:io.extend({lastFetchedAt:i()})},oo=y({entryOpen:m(),lastChangedAt:i()}),so={name:`contact`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:oo,kind:`push`},runtimeState:oo},co=v([`numeric`,`select`,`text`,`datetime`]),lo=y({kind:co,value:g([i(),a()]),options:h(a()),lastChangedAt:i(),unit:a().optional(),min:i().optional(),max:i().optional(),step:i().optional(),precision:i().int().min(0).max(10).optional(),format:v([`date`,`time`,`datetime`]).optional()}),uo=b(`kind`,[y({kind:c(`numeric`),value:i()}),y({kind:c(`select`),value:a().min(1)}),y({kind:c(`text`),value:a()}),y({kind:c(`datetime`),value:a().min(1)})]),fo={name:`control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Control],methods:{setValue:R(y({deviceId:i().int().nonnegative(),control:uo}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:lo,kind:`push`},runtimeState:lo},po=v([`open`,`opening`,`closing`,`closed`,`stopped`]),mo=y({state:po,position:i().min(0).max(100).nullable(),tiltPosition:i().min(0).max(100).nullable(),lastChangedAt:i()}),ho={name:`cover`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Cover],methods:{open:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),close:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),stop:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),setPosition:R(y({deviceId:i().int().nonnegative(),position:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`}),setTiltPosition:R(y({deviceId:i().int().nonnegative(),tiltPosition:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:mo,kind:`push`},runtimeState:mo},go=v([`auto`,`day`,`night`,`schedule`]),_o=y({min:i(),max:i(),step:i()}),vo=y({mode:go,sensitivity:i().optional(),switchDelaySec:i().optional(),lastFetchedAt:i()}),yo=y({modes:h(go),supportsSensitivity:m(),sensitivity:_o.optional(),supportsSwitchDelay:m(),switchDelaySec:_o.optional()}),bo=y({mode:go.optional(),sensitivity:i().optional(),switchDelaySec:i().optional()}),xo={name:`day-night`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`day-night`,tab:`image`}},methods:{getOptions:R(y({deviceId:i()}),yo),setSettings:R(y({deviceId:i(),settings:bo}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:vo,kind:`poll`},runtimeState:vo},B=y({id:a(),system:a(),uniqueId:a().optional(),raw:o(a(),r()).optional()});function So(e){return{id:e.stableId,system:e.addonId}}function Co(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 wo(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 To=`sourceInfo`;function Eo(e){if(!e)return null;let t=e[To];if(!t)return null;let n=B.safeParse(t);return n.success?n.data:null}var Do=v([`online`,`sleeping`,`offline`,`unknown`]),V=fe(()=>y({childNativeId:a(),name:a(),type:v(F),status:Do,metadata:y({model:a().optional(),serialNumber:a().optional(),uid:a().optional(),rtspChannel:i().int().nonnegative().optional(),isBattery:m().optional(),isDoorbell:m().optional(),isMultifocal:m().optional(),externalLocation:a().optional(),manufacturer:a().optional(),integration:a().optional()}).default({}),alreadyAdopted:m(),adoptedDeviceId:i().int().nonnegative().nullable(),capabilities:h(a()).readonly().optional(),features:h(a()).readonly().optional(),sourceInfo:B.optional(),children:h(V).readonly().optional()})),Oo=y({discovered:h(V),lastDiscoveryAt:i().int().nonnegative().nullable(),lastError:a().nullable()}),ko={name:`device-discovery`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Hub],status:{schema:Oo,kind:`poll`},runtimeState:Oo.extend({lastFetchedAt:i().int().nonnegative()}),methods:{listDiscovered:R(y({deviceId:i().int().nonnegative()}),h(V).readonly()),refreshDiscovery:R(y({deviceId:i().int().nonnegative()}),h(V).readonly(),{kind:`mutation`,auth:`admin`}),adoptDevice:R(y({deviceId:i().int().nonnegative(),childNativeId:a(),name:a().optional()}),y({deviceId:i().int().nonnegative(),stableId:a()}),{kind:`mutation`,auth:`admin`}),releaseDevice:R(y({deviceId:i().int().nonnegative(),childDeviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`})}},Ao=y({lastPressedAt:i().nullable(),pressCountSinceStart:i()}),jo=y({deviceId:i(),timestamp:i()}),Mo={name:`doorbell`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Button],methods:{},events:{onPressed:{data:jo}},status:{schema:Ao,kind:`push`},runtimeState:Ao},No=v([`date`,`time`,`datetime`]),Po=y({value:a(),format:No.optional(),lastFetchedAt:i()}),Fo={name:`enum-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:Po,kind:`push`},runtimeState:Po},Io=y({deviceId:i(),eventType:a(),data:o(a(),r()).nullable(),timestamp:i(),seq:i()}),Lo=y({eventTypes:h(a()),lastEvent:Io.nullable(),eventCountSinceStart:i()}),Ro={name:`event-emitter`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.EventEmitter],methods:{},events:{onEvent:{data:Io}},status:{schema:Lo,kind:`push`},runtimeState:Lo},zo=v([`forward`,`reverse`]),Bo=y({percentage:i().min(0).max(100).nullable(),percentageStep:i().positive().optional(),preset:a(),availablePresets:h(a()),direction:zo.nullable(),oscillating:m().nullable(),lastChangedAt:i()}),Vo={name:`fan-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Fan],methods:{setPercentage:R(y({deviceId:i().int().nonnegative(),percentage:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`}),setPreset:R(y({deviceId:i().int().nonnegative(),preset:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),setDirection:R(y({deviceId:i().int().nonnegative(),direction:zo}),_(),{kind:`mutation`,auth:`admin`}),setOscillating:R(y({deviceId:i().int().nonnegative(),oscillating:m()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Bo,kind:`push`},runtimeState:Bo},Ho=y({flooded:m(),lastChangedAt:i()}),Uo={name:`flood`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:Ho,kind:`push`},runtimeState:Ho},Wo=y({detected:m(),lastChangedAt:i()}),Go={name:`gas`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:Wo,kind:`push`},runtimeState:Wo},Ko=y({on:m(),currentHumidity:i().min(0).max(100).nullable(),targetHumidity:i().min(0).max(100).nullable(),mode:a().nullable(),availableModes:h(a()),action:a().nullable(),minHumidity:i().nullable(),maxHumidity:i().nullable(),lastChangedAt:i()}),qo={name:`humidifier`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Humidifier],methods:{setOn:R(y({deviceId:i().int().nonnegative(),on:m()}),_(),{kind:`mutation`,auth:`admin`}),setTargetHumidity:R(y({deviceId:i().int().nonnegative(),humidity:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`}),setMode:R(y({deviceId:i().int().nonnegative(),mode:a().min(1)}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Ko,kind:`push`},runtimeState:Ko},Jo=y({percent:i().min(0).max(100),lastFetchedAt:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional()}),Yo={name:`humidity-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor,F.Thermostat],methods:{},status:{schema:Jo,kind:`push`},runtimeState:Jo},Xo=y({url:a().nullable(),lastUpdated:i().nullable()}),Zo={name:`image`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Image],methods:{},status:{schema:Xo,kind:`push`},runtimeState:Xo},Qo=v([`0`,`90`,`180`,`270`]),$o=v([`auto`,`manual`]),es=v([`auto`,`manual`]),ts=v([`off`,`blc`,`wdr`,`hlc`]),ns=y({min:i(),max:i(),step:i()}),rs=y({brightness:i().optional(),contrast:i().optional(),saturation:i().optional(),sharpness:i().optional(),mirror:m().optional(),flip:m().optional(),rotate:Qo.optional(),whiteBalance:$o.optional(),warmth:i().optional(),exposureMode:es.optional(),backlightMode:ts.optional(),lastFetchedAt:i()}),is=y({supportsBrightness:m(),brightness:ns.optional(),supportsContrast:m(),contrast:ns.optional(),supportsSaturation:m(),saturation:ns.optional(),supportsSharpness:m(),sharpness:ns.optional(),supportsMirror:m(),supportsFlip:m(),rotateOptions:h(Qo),whiteBalanceModes:h($o),supportsWarmth:m(),warmth:ns.optional(),exposureModes:h(es),backlightModes:h(ts)}),as=y({brightness:i().optional(),contrast:i().optional(),saturation:i().optional(),sharpness:i().optional(),mirror:m().optional(),flip:m().optional(),rotate:Qo.optional(),whiteBalance:$o.optional(),warmth:i().optional(),exposureMode:es.optional(),backlightMode:ts.optional()}),os={name:`image-settings`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`image-settings`,tab:`image`}},methods:{getOptions:R(y({deviceId:i()}),is),setSettings:R(y({deviceId:i(),settings:as}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:rs,kind:`poll`},runtimeState:rs},ss=v([`idle`,`mowing`,`paused`,`docked`,`error`]),cs=v([`info`,`warning`,`error`]),ls=y({activity:ss,batteryLevel:i().min(0).max(100).nullable(),progressPercent:i().min(0).max(100).nullable(),currentCode:i().nullable(),currentCodeLabel:a().nullable(),severity:cs,lastChangedAt:i()}),us={name:`lawn-mower-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.LawnMower],methods:{startMowing:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),pause:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),dock:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:ls,kind:`push`},runtimeState:ls},ds=v([`locked`,`unlocked`,`locking`,`unlocking`,`jammed`]),fs=y({state:ds,lastChangedAt:i()}),ps={name:`lock-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Lock],methods:{lock:R(y({deviceId:i().int().nonnegative(),code:a().min(1).optional()}),_(),{kind:`mutation`,auth:`admin`}),unlock:R(y({deviceId:i().int().nonnegative(),code:a().min(1).optional()}),_(),{kind:`mutation`,auth:`admin`}),open:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:fs,kind:`push`},runtimeState:fs},ms=v([`off`,`on`,`idle`,`playing`,`paused`,`buffering`,`standby`]),hs=v([`off`,`all`,`one`]),gs=y({type:a(),title:a(),artist:a().optional(),album:a().optional(),imageUrl:a().optional()}),_s=y({state:ms,volumeLevel:i().min(0).max(100).nullable(),isMuted:m().nullable(),source:a(),availableSources:h(a()),currentMedia:gs.nullable(),positionMs:i().int().nonnegative().nullable(),durationMs:i().int().nonnegative().nullable(),shuffle:m().nullable(),repeat:hs.nullable(),lastChangedAt:i()}),vs={name:`media-player`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.MediaPlayer],methods:{play:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),pause:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),stop:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),next:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),previous:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),seek:R(y({deviceId:i().int().nonnegative(),positionMs:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),setVolume:R(y({deviceId:i().int().nonnegative(),volumeLevel:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`}),setMute:R(y({deviceId:i().int().nonnegative(),muted:m()}),_(),{kind:`mutation`,auth:`admin`}),setShuffle:R(y({deviceId:i().int().nonnegative(),shuffle:m()}),_(),{kind:`mutation`,auth:`admin`}),setRepeat:R(y({deviceId:i().int().nonnegative(),repeat:hs}),_(),{kind:`mutation`,auth:`admin`}),selectSource:R(y({deviceId:i().int().nonnegative(),source:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),playMedia:R(y({deviceId:i().int().nonnegative(),mediaId:a().min(1),mediaType:a().min(1)}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:_s,kind:`push`},runtimeState:_s},ys=v([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]),bs=y({data:u(),format:ys,width:i(),height:i(),timestamp:i()}),H=y({x:i(),y:i(),w:i(),h:i()}),xs=y({class:a(),originalClass:a(),score:i(),bbox:H}),Ss=y({data:p(Uint8Array),sampleRate:i(),channels:i(),timestamp:i(),deviceId:i().optional()}),Cs=y({rms:i(),dbfs:i()}),ws=y({className:a(),originalClass:a().optional(),score:i()}),Ts=y({bbox:H,pixelCount:i(),intensity:i()}),Es=y({detected:m(),regionCount:i(),regions:h(Ts).readonly(),rawRegions:h(Ts).readonly(),frameWidth:i(),frameHeight:i(),analysisMs:i()}),Ds={name:`motion-detection`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,exposesDeviceSettings:!0,methods:{analyze:R(y({deviceId:i(),frame:bs.optional(),frameHandle:Lt.optional()}),Es,{kind:`mutation`}),removeCamera:R(y({deviceId:i()}),_(),{kind:`mutation`}),reset:R(_(),_(),{kind:`mutation`})},events:{onMotion:{data:y({deviceId:i(),detected:m(),regionCount:i()})}}},Os=y({activeCameras:i(),throttledCameras:i(),avgInferenceTimeMs:i(),queueDepth:i()}),ks=y({detectionMode:v([`disabled`,`always-on`,`on-motion`]),configuredFps:i(),actualFps:i(),queueDepth:i(),avgInferenceTimeMs:i(),droppedFrames:i(),phase:v([`idle`,`watching`,`active`])}),As=ks.extend({deviceId:i()}),js=v([`onnx`,`coreml`,`openvino`,`tflite`,`pt`]),Ms=v([`detector`,`cropper`,`classifier`,`refiner`,`audio-classifier`]),U=y({runtime:v([`node`,`python`]),backend:a(),format:js,device:a().optional()}),Ns=y({engine:U,devices:h(y({id:a(),label:a(),description:a().optional()})).readonly(),defaultDevice:a()}),Ps=fe(()=>y({addonId:a(),addonName:a(),slot:Ms,inputClasses:h(a()).readonly(),outputClasses:h(a()).readonly(),enabled:m(),modelId:a(),children:h(Ps).readonly(),group:a().optional(),settings:o(a(),r()).optional()})),Fs=fe(()=>y({addonId:a(),enabled:m(),modelId:a(),children:h(Fs).readonly(),settings:o(a(),r()).optional()})),Is=y({id:a(),name:a(),createdAt:a(),updatedAt:a(),engine:U,steps:h(Fs).readonly()}),Ls=y({id:a(),name:a(),formats:o(a(),y({downloaded:m(),sizeMB:i()})),group:Se.optional(),legacy:m().optional()}),Rs=u(),zs=y({id:a(),name:a(),slot:Ms,inputClasses:h(a()).readonly(),outputClasses:h(a()).readonly(),childSlots:h(Ms).readonly(),models:h(Ls).readonly(),defaultModelId:a(),defaultModelIdByFormat:o(a(),a()).optional(),enabledByDefault:m().optional(),defaultConfidence:i(),group:a().optional(),configSchema:h(Rs).readonly().optional()}),Bs=y({id:Ms,label:a(),priority:i(),parentSlot:Ms.nullable(),addons:h(zs).readonly()}),Vs=y({availableEngines:h(Ns).readonly(),selectedEngine:U,slots:h(Bs).readonly()}),Hs=y({runtimeId:v([`onnx`,`openvino`,`coreml`]).nullable(),device:a().nullable(),state:v([`idle`,`installing`,`verifying`,`ready`,`failed`]),progress:i().optional(),error:a().optional(),nextRetryAt:i().optional(),configIssues:h(a()).optional()}),W=fe(()=>y({addonId:a(),modelId:a().optional(),enabled:m().default(!0),children:h(W).optional(),settings:o(a(),r()).optional()})),Us=y({addonId:a(),chosen:a(),running:a(),format:a()}),Ws=y({addonId:a(),kind:v([`unknown-addon`,`no-format-build`]),detail:a()}),Gs=y({ok:m(),issues:h(Ws).readonly(),substitutions:h(Us).readonly(),format:a()}),Ks=y({filename:a(),stepIds:h(a()).readonly().optional()}),qs=y({base64:a(),filename:a()}),Js=y({filename:a(),sizeKb:i()}),Ys=y({base64:a()}),Xs=y({id:a(),name:a(),description:a(),available:m(),rawLabels:h(a()).readonly().optional()}),Zs=y({activeBackend:a(),availableBackends:h(Xs).readonly(),sampleRate:i(),chunkDurationMs:i()}),Qs=y({filePath:a(),sizeMB:i(),durationMs:i()}),$s=y({success:m(),error:a().optional(),frame:u().optional()}),ec=u(),tc=u(),nc=u(),rc=u(),ic=u(),ac=u(),oc={name:`pipeline-executor`,scope:`system`,mode:`singleton`,methods:{getAvailableEngines:R(_(),h(U)),getSelectedEngine:R(_(),U),getDefaultSteps:R(U,h(Ps)),reprobeEngine:R(_(),U,{kind:`mutation`,auth:`admin`}),getEngineProvisioning:R(y({nodeId:a()}),Hs),getVideoPipelineSteps:R(_(),o(a(),y({modelId:a(),settings:o(a(),r()).readonly()}))),setVideoPipelineSteps:R(y({steps:o(a(),y({modelId:a(),settings:o(a(),r()).readonly()}))}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),clearDeviceOverrides:R(y({nodeId:a()}),y({success:c(!0),clearedDevices:i()}),{kind:`mutation`,auth:`admin`}),getSchema:R(_(),Vs),getGlobalSteps:R(_(),h(Ps).readonly().nullable()),getGlobalPipelineConfig:R(_(),ec),getOrchestratorConfigSchema:R(_(),tc),validatePipeline:R(y({steps:h(W)}),Gs),listTemplates:R(_(),h(Is).readonly()),saveTemplate:R(y({name:a(),steps:h(Fs).readonly(),engine:U}),Is,{kind:`mutation`}),updateTemplate:R(y({id:a(),name:a().optional(),steps:h(Fs).readonly().optional()}),Is,{kind:`mutation`}),deleteTemplate:R(y({id:a()}),_(),{kind:`mutation`}),getCapabilities:R(_(),rc),getAddonModels:R(y({addonId:a()}),ic),downloadModel:R(y({addonId:a(),modelId:a(),format:js}),Qs,{kind:`mutation`}),deleteModel:R(y({addonId:a(),modelId:a(),format:js}),y({success:c(!0)}),{kind:`mutation`}),runPipeline:R(y({engine:U.optional(),steps:h(W).min(1),frame:bs.optional(),frameHandle:Lt.optional(),imageBase64:a().optional(),image:p(Uint8Array).optional(),referenceImage:a().optional(),deviceId:i().optional(),sessionId:a().optional()}),ac,{kind:`mutation`}),runPipelineBatch:R(y({engine:U.optional(),steps:h(W).min(1),frames:h(bs).min(1).max(255),deviceId:i().optional(),sessionId:a().optional()}),y({results:h(ac).readonly()}),{kind:`mutation`}),cacheFrameInPool:R(y({data:p(Uint8Array),width:i().int().positive(),height:i().int().positive(),format:v([`rgb`,`bgr`,`gray`])}),y({frameId:i(),width:i(),height:i()}),{kind:`mutation`}),inferCached:R(y({stepId:a(),frameId:i().int()}),o(a(),r()),{kind:`mutation`}),uncacheFrame:R(y({frameId:i().int()}),_(),{kind:`mutation`}),getEffectiveTuning:R(_(),y({batchMode:a(),windowMs:i(),maxBatchSize:i(),concurrency:i()})),listLoadedEngines:R(_(),h(y({engineKey:a(),engine:U,modelsLoaded:h(a()).readonly(),inUseByCameras:h(i()).readonly(),kind:v([`runtime`,`warm-override`]),poolPid:i().nullable(),idleMs:i().nullable(),idleTtlMs:i().nullable()})).readonly()),spinEngine:R(y({engine:U}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),killEngine:R(y({engine:U,force:m().optional()}),y({success:m(),reason:a().optional()}),{kind:`mutation`,auth:`admin`}),listReferenceImages:R(_(),h(Ks).readonly()),getReferenceImage:R(y({filename:a()}),qs.nullable()),getReferenceAudioFiles:R(_(),h(Js).readonly()),getReferenceAudio:R(y({filename:a()}),Ys.nullable()),getAudioCapabilities:R(_(),Zs),runAudioTest:R(y({addonId:a(),modelId:a(),filename:a().optional(),settings:o(a(),r()).optional()}),$s,{kind:`mutation`}),getDetectionConfigSchema:R(_(),nc)}},sc=v([`polygon`,`tripwire`]),cc=y({x:i(),y:i()}),G=y({id:a(),name:a(),kind:sc.default(`polygon`),polygon:h(cc).readonly(),color:a().default(`#3b82f6`)}),lc={name:`zones`,scope:`device`,mode:`singleton`,deviceTypes:[F.Camera],methods:{listZones:R(y({deviceId:i()}),h(G).readonly()),addZone:R(y({deviceId:i(),zone:G}),_(),{kind:`mutation`,auth:`admin`}),removeZone:R(y({deviceId:i(),zoneId:a()}),_(),{kind:`mutation`,auth:`admin`}),updateZone:R(y({deviceId:i(),zone:G}),_(),{kind:`mutation`,auth:`admin`})},runtimeState:y({zones:h(G).readonly()})},K={min:0,max:6e4,default:3e4,step:500},q={min:1,max:30,default:4,step:1},J={min:1,max:30,default:10,step:1},Y={min:0,max:300,default:30,step:5},X={min:1,max:10,default:4,step:1},uc=v([`onboard`,`analyzer`]),dc=h(uc),fc=y({deviceId:i(),detected:m(),source:uc.default(`analyzer`),regions:h(Ts).readonly().optional()}),pc=b(`kind`,[y({kind:c(`local-broker`)}),y({kind:c(`remote-restream`),ownerNodeId:a(),ownerReachableHost:a().optional(),hubHostnameOverride:a().optional()})]).describe(`Per-camera frame-source mode for the runner (P2c)`),mc=y({deviceId:i(),detectionMode:v([`disabled`,`always-on`,`on-motion`]).default(`on-motion`),audioMode:v([`disabled`,`always-on`,`on-motion`]).default(`always-on`),motionCooldownMs:i().min(K.min).default(K.default),motionFps:i().min(q.min).max(q.max).default(q.default),detectionFps:i().min(J.min).max(J.max).default(J.default),motionStreamId:a(),detectionStreamId:a(),motionSources:dc.default([`analyzer`]),pipelineEnabled:m().default(!0),steps:h(W).readonly().optional(),audio:y({modelId:a().optional(),enabled:m()}).nullable().optional(),zones:h(G).readonly().default([]),onboardMotionDrivesAnalyzer:m().default(!0),occupancyRecheckEnabled:m().default(!1),occupancyRecheckSec:i().min(Y.min).max(Y.max).default(Y.default),occupancyRecheckFrames:i().min(X.min).max(X.max).default(X.default),frameSource:pc.default({kind:`local-broker`})}),hc=[{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:q.min,max:q.max,step:q.step,default:q.default,showValue:!0,unit:`fps`,nullable:!0,nullLabel:`Default`,showWhen:{field:`motionSources`,includes:`analyzer`}},{key:`detectionFps`,type:`slider`,label:`Detection FPS`,min:J.min,max:J.max,step:J.step,default:J.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:`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 to confirm the scene is truly empty (catches stationary objects motion-gating would miss). Off by default — it adds decoder re-dial churn.`,default:!1},{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:Y.min,max:Y.max,step:Y.step,default:Y.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:X.min,max:X.max,step:X.step,default:X.default,showValue:!0,showWhen:{field:`occupancyRecheckEnabled`,equals:!0}}],gc=y({nodeId:a(),attachedCameras:i(),activeCameras:i(),avgInferenceFps:i(),avgInferenceTimeMs:i(),queueDepthTotal:i(),hardware:y({hasGpu:m(),inferenceBackend:a().optional(),cpuCores:i().optional()})}),_c=y({nodeId:a(),activeCameras:i(),throttledCameras:i(),avgInferenceTimeMs:i(),queueDepth:i()}),vc={name:`pipeline-runner`,scope:`system`,mode:`singleton`,methods:{attachCamera:R(mc,y({success:c(!0)}),{kind:`mutation`}),detachCamera:R(y({deviceId:i()}),y({success:c(!0)}),{kind:`mutation`}),reportMotion:R(fc,y({success:c(!0)}),{kind:`mutation`}),getLocalLoad:R(_(),gc),getLocalMetrics:R(_(),_c),getCameraMetrics:R(y({deviceId:i()}),ks.nullable()),getAllCameraMetrics:R(_(),h(As).readonly()),getLocalCameras:R(_(),h(i()).readonly())}},yc=y({detected:m(),lastDetectedAt:i().nullable(),autoClearAfterMs:i().nullable()}),bc=y({deviceId:i(),detected:m(),timestamp:i(),source:uc,regions:h(Ts).readonly().optional()}),xc={name:`motion`,scope:`device`,mode:`singleton`,deviceTypes:[F.Camera,F.Sensor],methods:{isDetected:R(y({deviceId:i()}),m())},events:{onMotionChanged:{data:bc}},status:{schema:yc,kind:`push`},runtimeState:yc},Sc=y({enabled:m(),lastChangedAt:i()}),Cc=Sc.extend({lastFetchedAt:i()}),wc={name:`motion-trigger`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Light,F.Siren,F.Switch],methods:{setMotionTrigger:R(y({deviceId:i().int().nonnegative(),enabled:m()}),_(),{kind:`mutation`,auth:`admin`})},events:{onMotionTriggerChanged:{data:y({deviceId:i(),enabled:m(),lastChangedAt:i()})}},status:{schema:Sc,kind:`command-driven`},runtimeState:Cc},Tc=y({x:i(),y:i()}),Ec=y({kind:c(`rect`),x:i(),y:i(),width:i(),height:i()}),Dc=y({kind:c(`polygon`),points:h(Tc)}),Oc=y({kind:c(`grid`),gridWidth:i(),gridHeight:i(),cells:h(m())}),kc=y({kind:c(`line`),points:h(Tc)}),Ac=b(`kind`,[Ec,Dc,Oc,kc]),jc=v([`rect`,`polygon`,`grid`,`line`]),Mc=y({min:i(),max:i()}),Nc=y({width:i(),height:i()}),Pc=y({id:i(),enabled:m(),shape:Oc}),Fc=y({enabled:m(),sensitivity:i(),regions:h(Pc),lastFetchedAt:i()}),Ic=y({maxRegions:i(),supportedShapes:h(jc),grid:Nc,sensitivity:y({min:i(),max:i(),step:i()})}),Lc=y({enabled:m().optional(),sensitivity:i().optional(),regions:h(Pc).optional()}),Rc={name:`motion-zones`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/motion-zones-grid`,tab:`motion`,label:`Motion Zones`}},methods:{getOptions:R(y({deviceId:i()}),Ic),setZone:R(y({deviceId:i(),patch:Lc}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Fc,kind:`poll`},runtimeState:Fc},zc=v([`person`,`vehicle`,`animal`,`face`,`package`,`other`]),Bc=y({class:zc,timestamp:i(),confidence:i().min(0).max(1).optional()}),Vc=y({lastByClass:l(zc,Bc.nullable()),supportedClasses:h(zc).readonly(),enabled:m()}),Hc=Vc.extend({lastFetchedAt:i()}),Uc={name:`native-object-detection`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera],methods:{setEnabled:R(y({deviceId:i(),enabled:m()}),_(),{kind:`mutation`,auth:`admin`})},events:{onDetected:{data:y({deviceId:i(),detection:Bc})}},status:{schema:Vc,kind:`push`},runtimeState:Hc},Wc=v([`min`,`low`,`normal`,`high`]),Gc=y({id:a().min(1),title:a().min(1),uri:re().optional(),destructive:m().optional()}),Kc=y({image:m(),priority:m(),data:m(),actions:m(),recipients:m()}),qc=y({lastSentAt:i(),lastError:a().nullable(),queueDepth:i().int().nonnegative(),supports:Kc}),Jc=y({deviceId:i().int().nonnegative(),title:a().optional(),body:a().min(1),image:a().optional(),priority:Wc.optional(),channel:a().optional(),recipients:h(a()).optional(),actions:h(Gc).optional(),data:o(a(),r()).optional()}),Yc=y({notificationId:a(),acceptedAt:i()}),Xc={name:`notifier`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Notifier],methods:{send:R(Jc,Yc,{kind:`mutation`,auth:`admin`}),cancel:R(y({deviceId:i().int().nonnegative(),notificationId:a().min(1)}),_(),{kind:`mutation`,auth:`admin`})},events:{onSent:{data:y({deviceId:i(),notificationId:a(),success:m(),error:a().nullable(),acceptedAt:i()})}},status:{schema:qc,kind:`command-driven`},runtimeState:qc},Zc=y({value:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional(),lastFetchedAt:i()}),Qc={name:`numeric-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:Zc,kind:`push`},runtimeState:Zc},$c=v([`normal`,`offline`,`on_batteries`]),el=i().int().min(4).max(200),tl=y({foodLevel:i().nullable(),food1:i().nullable(),food2:i().nullable(),lowFood:m(),batteryPower:i().min(0).max(100).nullable(),desiccantLeftDays:i().nullable(),feeding:m(),status:$c.nullable(),error:a().nullable(),errorCode:i().nullable(),isDualHopper:m(),childLock:m(),indicatorLight:m(),feedSound:m(),volume:i(),lastFetchedAt:i()}),nl={name:`pet-feeder`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.PetFeeder],methods:{feed:R(y({deviceId:i().int().nonnegative(),grams:el.optional(),hopper1:el.optional(),hopper2:el.optional()}),_(),{kind:`mutation`,auth:`admin`}),cancelFeed:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),resetDesiccant:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),markFoodReplenished:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),callPet:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),playSound:R(y({deviceId:i().int().nonnegative(),soundId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),setChildLock:R(y({deviceId:i().int().nonnegative(),on:m()}),_(),{kind:`mutation`,auth:`admin`}),setIndicatorLight:R(y({deviceId:i().int().nonnegative(),on:m()}),_(),{kind:`mutation`,auth:`admin`}),setFeedSound:R(y({deviceId:i().int().nonnegative(),on:m()}),_(),{kind:`mutation`,auth:`admin`}),setVolume:R(y({deviceId:i().int().nonnegative(),level:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:tl,kind:`poll`},runtimeState:tl},rl=y({watts:i().optional(),kwhTotal:i().optional(),volts:i().optional(),amps:i().optional(),va:i().optional(),powerFactor:i().min(0).max(1).optional(),lastFetchedAt:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional()}),il={name:`power-meter`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:rl,kind:`push`},runtimeState:rl},al=y({latitude:i().min(-90).max(90),longitude:i().min(-180).max(180),accuracyMeters:i().nonnegative()}),ol=y({state:a(),location:a().nullable(),gps:al.nullable(),batteryPercent:i().min(0).max(100).nullable(),lastChangedAt:i()}),sl={name:`presence`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Presence],methods:{},status:{schema:ol,kind:`push`},runtimeState:ol},cl=y({hpa:i(),lastFetchedAt:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional()}),ll={name:`pressure-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:cl,kind:`push`},runtimeState:cl},ul=b(`kind`,[Ec,Dc]),dl=y({id:i(),enabled:m(),shape:ul}),fl=y({enabled:m(),regions:h(dl),lastFetchedAt:i()}),pl=y({maxRegions:i(),supportedShapes:h(jc),polygonVertices:Mc.optional()}),ml=y({enabled:m().optional(),regions:h(dl).optional()}),hl={name:`privacy-mask`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/privacy-mask-grid`,tab:`image`,label:`Privacy Mask`}},methods:{getOptions:R(y({deviceId:i()}),pl),setMask:R(y({deviceId:i(),patch:ml}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:fl,kind:`poll`},runtimeState:fl},gl=y({targetType:a().describe(`Vendor target string (people/vehicle/pet); empty = camera default`),stopDelaySeconds:i().int().min(0).max(300),disappearDelaySeconds:i().int().min(0).max(300)}),_l=y({value:a(),label:a()}),vl=y({enabled:m(),lastChangedAt:i(),currentSettings:gl.nullable(),supportedTargetTypes:h(_l)}),yl=vl.extend({lastFetchedAt:i()}),bl={name:`ptz-autotrack`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/ptz-autotrack`,tab:`ptz`,topTab:!0,label:`Auto-Tracking`,order:5}},methods:{getStatus:R(y({deviceId:i()}),vl),setEnabled:R(y({deviceId:i(),enabled:m()}),_(),{kind:`mutation`}),getSettings:R(y({deviceId:i()}),gl.nullable()),setSettings:R(y({deviceId:i(),settings:gl.partial()}),_(),{kind:`mutation`})},events:{onStatusChanged:{data:y({deviceId:i(),status:vl})}},status:{schema:vl,kind:`command-driven`},runtimeState:yl},xl=y({isRunning:m(),lastRunAt:i(),lastRunSuccess:m().nullable(),lastError:a().nullable(),lastChangedAt:i()}),Sl={name:`script-runner`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Script],methods:{run:R(y({deviceId:i().int().nonnegative(),variables:o(a(),r()).optional()}),_(),{kind:`mutation`,auth:`admin`}),stop:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:xl,kind:`push`},runtimeState:xl},Cl=y({detected:m(),lastChangedAt:i()}),wl={name:`smoke`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:Cl,kind:`push`},runtimeState:Cl},Tl=v([`main`,`sub`,`ext`]),El=y({width:i(),height:i(),codec:v([`h264`,`h265`]),framerate:i(),bitrate:i(),bitrateMode:v([`vbr`,`cbr`]).optional(),encoderProfile:v([`high`,`main`,`baseline`]).optional(),gop:i().optional(),audio:m().optional()}),Dl=y({main:El.optional(),sub:El.optional(),ext:El.optional(),lastFetchedAt:i()}),Ol=y({resolutions:h(y({width:i(),height:i()})),codecs:h(v([`h264`,`h265`])),framerates:h(i()),bitrates:h(i()),bitrateRange:s([i(),i()]).optional(),supportsBitrateMode:m(),supportsEncoderProfile:m(),supportsGop:m(),gop:y({min:i(),max:i(),step:i()}).optional()}),kl=y({main:Ol.optional(),sub:Ol.optional(),ext:Ol.optional()}),Al=y({width:i().optional(),height:i().optional(),codec:v([`h264`,`h265`]).optional(),framerate:i().optional(),bitrate:i().optional(),bitrateMode:v([`vbr`,`cbr`]).optional(),encoderProfile:v([`high`,`main`,`baseline`]).optional(),gop:i().optional(),audio:m().optional()}),jl={name:`stream-params`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`stream-params`,tab:`streaming`}},methods:{getOptions:R(y({deviceId:i()}),kl),setProfile:R(y({deviceId:i(),profile:Tl,patch:Al}),_(),{kind:`mutation`,auth:`admin`}),getConfigSchema:R(y({deviceId:i()}),r().nullable())},status:{schema:Dl,kind:`poll`},runtimeState:Dl},Ml=y({on:m(),lastChangedAt:i()}),Nl={name:`switch`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Switch,F.Siren,F.Light],methods:{setState:R(y({deviceId:i(),on:m()}),_(),{kind:`mutation`,auth:`admin`})},events:{onStateChanged:{data:y({deviceId:i(),on:m(),lastChangedAt:i()})}},status:{schema:Ml,kind:`command-driven`},runtimeState:Ml,settings:{bindings:[{kind:`scalar`,statusPath:`on`,method:`setState`,valueArg:`on`,field:{label:`On`,kind:`boolean`}}]}},Pl=y({tampered:m(),lastChangedAt:i()}),Fl={name:`tamper`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:Pl,kind:`push`},runtimeState:Pl},Il=y({celsius:i(),lastFetchedAt:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional()}),Ll={name:`temperature-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor,F.Thermostat],methods:{},status:{schema:Il,kind:`push`},runtimeState:Il},Rl=y({currentVersion:a().nullable(),availableVersion:a().nullable(),updatable:m(),state:a().nullable(),inProgress:m()}),zl={name:`update`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Update],methods:{installUpdate:R(_(),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Rl,kind:`poll`},runtimeState:Rl},Bl=v([`idle`,`cleaning`,`paused`,`returning`,`docked`,`drying`,`error`]),Vl=y({level:i().min(0).max(100).nullable(),status:v([`ok`,`low`,`full`]).nullable()}),Hl=y({state:Bl,batteryLevel:i().min(0).max(100).nullable(),fanSpeed:a().nullable(),availableFanSpeeds:h(a()),cleanWater:Vl.nullable(),dirtyWater:Vl.nullable(),detergent:Vl.nullable(),dustBin:Vl.nullable(),progressPercent:i().min(0).max(100).nullable(),errorCode:i().nullable(),errorLabel:a().nullable(),lastChangedAt:i()}),Ul={name:`vacuum-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Vacuum],methods:{start:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),pause:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),stop:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),returnToBase:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),locate:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),setFanSpeed:R(y({deviceId:i().int().nonnegative(),speed:a().min(1)}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Hl,kind:`push`},runtimeState:Hl},Wl=v([`open`,`opening`,`closing`,`closed`,`stopped`]),Gl=y({state:Wl,position:i().min(0).max(100).nullable(),lastChangedAt:i()}),Kl={name:`valve`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Valve],methods:{open:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),close:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),stop:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),setPosition:R(y({deviceId:i().int().nonnegative(),position:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Gl,kind:`push`},runtimeState:Gl},ql=y({detected:m(),lastChangedAt:i()}),Jl={name:`vibration`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Sensor],methods:{},status:{schema:ql,kind:`push`},runtimeState:ql},Yl=y({currentTemp:i().nullable(),targetTemp:i().nullable(),operationMode:a().nullable(),availableModes:h(a()),away:m().nullable(),minTemp:i().nullable(),maxTemp:i().nullable(),lastChangedAt:i()}),Xl={name:`water-heater`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.WaterHeater],methods:{setTargetTemp:R(y({deviceId:i().int().nonnegative(),temp:i().finite()}),_(),{kind:`mutation`,auth:`admin`}),setOperationMode:R(y({deviceId:i().int().nonnegative(),mode:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),setAway:R(y({deviceId:i().int().nonnegative(),on:m()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Yl,kind:`push`},runtimeState:Yl},Zl=y({condition:a().nullable(),temperature:i().nullable(),temperatureUnit:a().nullable(),humidity:i().min(0).max(100).nullable(),pressure:i().nullable(),pressureUnit:a().nullable(),windSpeed:i().nullable(),windSpeedUnit:a().nullable(),windBearing:i().nullable(),lastFetchedAt:i()}),Ql={name:`weather`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Weather],methods:{},status:{schema:Zl,kind:`push`},runtimeState:Zl},$l=y({totalObjects:i().int().nonnegative(),byClass:o(a(),i().int().nonnegative())}),eu=$l.extend({zoneId:a(),zoneName:a(),trackIds:h(a()).readonly()}),tu=y({ts:i().int(),frameWidth:i().int().nonnegative(),frameHeight:i().int().nonnegative(),zones:h(eu).readonly(),frame:$l,unzoned:$l}),nu=v([`minute`,`5min`,`hour`]),ru=y({from:i().int(),to:i().int(),resolution:nu}),iu=y({ts:i().int(),count:i().int().nonnegative()}),au={name:`zone-analytics`,scope:`device`,mode:`singleton`,deviceTypes:[F.Camera],methods:{getCurrentSnapshot:R(y({deviceId:i()}),tu.nullable()),getZoneHistory:R(y({deviceId:i(),zoneId:a(),className:a().optional()}).extend(ru.shape),h(iu).readonly()),getCameraHistory:R(y({deviceId:i(),className:a().optional()}).extend(ru.shape),h(iu).readonly()),getUnzonedHistory:R(y({deviceId:i(),className:a().optional()}).extend(ru.shape),h(iu).readonly())},runtimeState:tu},ou=v([`include`,`exclude`]),su=y({id:a(),name:a().optional(),zoneIds:h(a()).min(1).readonly(),mode:ou,classFilter:h(a()).readonly().optional(),overlapThreshold:i().min(0).max(1).optional(),bboxInclusionPct:i().min(0).max(100).optional(),preferMask:m().optional(),enabled:m().default(!0)}),cu=h(su).readonly(),lu=v([`motion`,`detection`]),uu={name:`zone-rules`,scope:`device`,mode:`singleton`,deviceTypes:[F.Camera],methods:{listRules:R(y({deviceId:i(),stage:lu}),h(su).readonly()),setRules:R(y({deviceId:i(),stage:lu,rules:h(su).readonly()}),_(),{kind:`mutation`,auth:`admin`})},runtimeState:y({motion:h(su).readonly(),detection:h(su).readonly()})},du={airQualitySensor:Qi,alarmPanel:la,ambientLightSensor:da,audioMetrics:ga,automationControl:va,battery:ba,binary:Sa,brightness:wa,cameraStreams:Wa,carbonMonoxide:Ka,climateControl:Ya,color:eo,connectivity:no,consumables:ao,contact:so,control:fo,cover:ho,dayNight:xo,deviceDiscovery:ko,deviceStatus:Ji,doorbell:Mo,enumSensor:Fo,eventEmitter:Ro,fanControl:Vo,featureProbe:Xi,flood:Uo,gas:Go,humidifier:qo,humiditySensor:Yo,image:Zo,imageSettings:os,lawnMowerControl:us,lockControl:ps,mediaPlayer:vs,motion:xc,motionTrigger:wc,motionZones:Rc,nativeObjectDetection:Uc,notifier:Xc,numericSensor:Qc,petFeeder:nl,powerMeter:il,presence:sl,pressureSensor:ll,privacyMask:hl,ptzAutotrack:bl,scriptRunner:Sl,smoke:wl,streamParams:jl,switch:Nl,tamper:Fl,temperatureSensor:Ll,update:zl,vacuumControl:Ul,valve:Kl,vibration:Jl,waterHeater:Xl,weather:Ql,zoneAnalytics:au,zoneRules:uu,zones:lc},fu=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=du[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=wi.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=Ti.fromInitial(o,a),e.bindRuntimeState?.(this.runtimeState),e.registerNativeCap?.(Ji,{});let s={online:!0,lastChangedAt:Date.now()};this.runtimeState.setCapState(`device-status`,s),e.registerNativeCap?.(Xi,{}),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=Eo(this.ctx.deviceMeta.metadata)??So({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=Co(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:{[To]:t}})}catch{}this.ctx.eventBus.emit(at(`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}},pu={"°C":{dimension:`temperature`,factor:1,offset:0},"°F":{dimension:`temperature`,factor:5/9,offset:-160/9},K:{dimension:`temperature`,factor:1,offset:-273.15},hPa:{dimension:`pressure`,factor:1,offset:0},kPa:{dimension:`pressure`,factor:10,offset:0},Pa:{dimension:`pressure`,factor:.01,offset:0},mbar:{dimension:`pressure`,factor:1,offset:0},bar:{dimension:`pressure`,factor:1e3,offset:0},inHg:{dimension:`pressure`,factor:33.8639,offset:0},mmHg:{dimension:`pressure`,factor:1.33322,offset:0},psi:{dimension:`pressure`,factor:68.9476,offset:0},"m/s":{dimension:`speed`,factor:1,offset:0},"km/h":{dimension:`speed`,factor:1/3.6,offset:0},mph:{dimension:`speed`,factor:.44704,offset:0},kn:{dimension:`speed`,factor:.514444,offset:0},"mm/h":{dimension:`precipitation-rate`,factor:1,offset:0},"in/h":{dimension:`precipitation-rate`,factor:25.4,offset:0},m:{dimension:`length`,factor:1,offset:0},mm:{dimension:`length`,factor:.001,offset:0},cm:{dimension:`length`,factor:.01,offset:0},km:{dimension:`length`,factor:1e3,offset:0},in:{dimension:`length`,factor:.0254,offset:0},ft:{dimension:`length`,factor:.3048,offset:0},mi:{dimension:`length`,factor:1609.344,offset:0},lx:{dimension:`illuminance`,factor:1,offset:0},"W/m²":{dimension:`irradiance`,factor:1,offset:0},W:{dimension:`power`,factor:1,offset:0},kW:{dimension:`power`,factor:1e3,offset:0},VA:{dimension:`apparent-power`,factor:1,offset:0},Wh:{dimension:`energy`,factor:1,offset:0},kWh:{dimension:`energy`,factor:1e3,offset:0},MWh:{dimension:`energy`,factor:1e6,offset:0},V:{dimension:`voltage`,factor:1,offset:0},mV:{dimension:`voltage`,factor:.001,offset:0},A:{dimension:`current`,factor:1,offset:0},mA:{dimension:`current`,factor:.001,offset:0},ppm:{dimension:`concentration-volume`,factor:1,offset:0},ppb:{dimension:`concentration-volume`,factor:.001,offset:0},"µg/m³":{dimension:`concentration-mass`,factor:1,offset:0},"mg/m³":{dimension:`concentration-mass`,factor:1e3,offset:0},kg:{dimension:`mass`,factor:1,offset:0},g:{dimension:`mass`,factor:.001,offset:0},lb:{dimension:`mass`,factor:.453592,offset:0},oz:{dimension:`mass`,factor:.0283495,offset:0},"%":{dimension:`percentage`,factor:1,offset:0}},mu=class extends Error{from;to;reason;constructor(e,t,n){super(`[units] cannot convert '${e}' → '${t}': ${n}`),this.name=`UnitConversionError`,this.from=e,this.to=t,this.reason=n}};function hu(e){return Object.hasOwn(pu,e)?pu[e]:void 0}function gu(e){return hu(e)?.dimension}function _u(e,t){return e*t.factor+t.offset}function vu(e,t){return(e-t.offset)/t.factor}function yu(e,t,n){if(t===n)return e;let r=hu(t);if(!r)throw new mu(t,n,`unknown-from`);let i=hu(n);if(!i)throw new mu(t,n,`unknown-to`);if(r.dimension!==i.dimension)throw new mu(t,n,`cross-dimension`);return vu(_u(e,r),i)}function bu(e,t,n){if(t===n)return e;let r=hu(t);if(!r)return;let i=hu(n);if(i&&r.dimension===i.dimension)return vu(_u(e,r),i)}function xu(e,t){if(e===t)return!0;let n=gu(e);return n===void 0?!1:n===gu(t)}function Su(e){let t=[];for(let[n,r]of Object.entries(pu))r.dimension===e&&t.push(n);return t}var Cu=y({connected:m(),deviceCount:i(),error:a().optional()}),wu=y({externalId:a(),name:a(),type:a(),metadata:o(a(),r()).optional()}),Tu=y({stableId:a(),type:v(F),suggestedName:a(),prefilledConfig:o(a(),r()),sourceInfo:B.optional()}),Eu=y({id:i(),stableId:a(),addonId:a(),type:a(),name:a(),parentDeviceId:i().nullable(),online:m(),features:h(a()),config:o(a(),r()),sourceInfo:B.optional()}),Du=y({status:v([`ok`,`error`]),labels:h(a()).optional(),error:a().optional()}),Ou=r(),ku={name:`device-provider`,scope:`system`,mode:`collection`,methods:{start:R(_(),_(),{kind:`mutation`}),stop:R(_(),_(),{kind:`mutation`}),getStatus:R(_(),Cu),getDevices:R(_(),h(y({id:a(),name:a(),type:a()}))),supportsDiscovery:R(y({}),m()),discoverDevices:R(y({params:o(a(),r()).optional()}),h(Tu),{kind:`mutation`,auth:`admin`}),getDiscoveryParamsSchema:R(y({}),Ou),getManualCreationType:R(y({}),y({deviceType:v(F).nullable()})),adoptDiscoveredDevice:R(y({candidate:Tu}),Eu,{kind:`mutation`,auth:`admin`}),supportsManualCreation:R(y({}),m()),getChildCreationSchema:R(y({type:v(F)}),Ou),createDevice:R(y({type:v(F),config:o(a(),r())}),Eu,{kind:`mutation`,auth:`admin`}),testCreationField:R(y({type:v(F),key:a(),value:r(),formValues:o(a(),r()).optional()}),Du,{kind:`mutation`,auth:`admin`})}};function Au(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 ju=class extends pt{async onInitialize(){return this.ctx.logger.info(`${this.providerName} Provider initialized`),[{capability:ku,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(F).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;for(let n of e){if(n.parentDeviceId!==null)continue;let e=this.deviceClasses[n.type];if(!e){this.ctx.logger.warn(`No device class registered for restored type — skipping`,{tags:{stableId:n.stableId},meta:{type:n.type}});continue}try{await this.ctx.kernel.devices.create(n.stableId,e,{}),t.add(n.id)}catch(e){this.ctx.logger.warn(`Failed to restore device`,{tags:{stableId:n.stableId},meta:{type:n.type,error:e instanceof Error?e.message:String(e)}})}}let n=e.filter(e=>e.parentDeviceId!==null);for(let e of n){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 Au(e,this.addonId)}};function Mu(e){return e.def}function Nu(e){return e}function Pu(e,t=`Configuration`,n=`main`){return{sections:[{id:n,title:t,fields:e.map(e=>Fu(e.key,e.schema,e.description))}]}}function Fu(e,t,n){let r=Bu(t),i=Vu(t),a={key:e,label:n??Hu(e),description:n,default:i};return r instanceof ie?Iu(e,a):r instanceof se?Lu(r,a):r instanceof oe?{...a,type:`boolean`}:r instanceof ne?zu(r,a):r instanceof ue||r instanceof le?{...a,type:`textarea`,rows:6,isJson:!0}:{...a,type:`text`}}function Iu(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 Lu(e,t){let n=Nu(e),r=n.minValue,i=n.maxValue,a=r!=null&&isFinite(r)?r:void 0,o=i!=null&&isFinite(i)?i:void 0,s=Ru(e);return{...t,type:`number`,...a===void 0?{}:{min:a},...o===void 0?{}:{max:o},...s===void 0?{}:{step:s}}}function Ru(e){let t=Mu(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 zu(e,t){let n=e.options.map(e=>String(e));return{...t,type:`select`,options:n.map(e=>({label:Hu(e),value:e}))}}function Bu(e){return e instanceof ce||e instanceof ee||e instanceof d?Bu(Mu(e).innerType):e}function Vu(e){if(e instanceof ce)return Mu(e).defaultValue}function Hu(e){return e.replace(/([A-Z])/g,` $1`).replace(/[_-]/g,` `).replace(/^\w/,e=>e.toUpperCase()).trim()}function Uu(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Wu(e,t){let n=t.split(`.`),r=e;for(let e of n){if(!Uu(r))return;r=r[e]}return r}function Gu(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=Uu(o)?o:{};return{...e,[i]:Gu(s,a,n)}}function Ku(e,t){if(!t||t.kind===`identity`)return e;if(t.kind===`enum-map`){let n=String(e);return Object.prototype.hasOwnProperty.call(t.mapping,n)?t.mapping[n]:t.fallback??null}if(t.kind===`linear`){if(typeof e!=`number`||Number.isNaN(e))return null;let n=e*t.scale+t.offset;if(t.clamp){let e=t.clamp[0],r=t.clamp[1];n=Math.min(r,Math.max(e,n))}return n}return e}function qu(e){let t=e;for(;t instanceof d||t instanceof ee||t instanceof ce;)t=t.unwrap();return t}function Ju(e){let t=qu(e);return t instanceof ne?{kind:`enum`,enumValues:t.options}:t instanceof se?{kind:`number`}:t instanceof ie?{kind:`string`}:t instanceof oe?{kind:`boolean`}:null}function Yu(e,t=``){let n=qu(e);if(!(n instanceof le))return[];let r=[],i=n.shape;for(let[e,n]of Object.entries(i)){let i=t?`${t}.${e}`:e,a=qu(n);if(a instanceof le){r.push(...Yu(a,i));continue}let o=Ju(n);o&&r.push({path:i,kind:o.kind,...o.enumValues?{enumValues:o.enumValues}:{}})}return r}function Xu(e){return Yu(e.itemSchema).filter(t=>t.path!==e.keyField).map(e=>({...e,item:!0}))}var Zu=`device.state-changed`;function Qu(e){let t=new Map,n=new Map,r=null,i=(e,t)=>`${e}:${t}`,a=()=>{r||e.live?.onEvent&&(r=e.live.onEvent.subscribe({category:Zu},{onData:e=>{let r=e.data;if(!r||typeof r.deviceId!=`number`||typeof r.capName!=`string`)return;let a=i(r.deviceId,r.capName);t.set(a,r.slice);let o=n.get(a);if(o)for(let e of o)try{e(r.slice)}catch{}}}))},o=()=>{r&&(n.size>0||(r.unsubscribe(),r=null))};return{read(e,n){return t.get(i(e,n))},async refresh(r,a){let o=await e.deviceState.getCapSlice.query({deviceId:r,capName:a}),s=i(r,a);t.set(s,o??void 0);let c=n.get(s);if(c)for(let e of c)try{e(o??void 0)}catch{}},watch(e,t,r){let s=i(e,t),c=n.get(s);return c||(c=new Set,n.set(s,c)),c.add(r),a(),()=>{c.delete(r),c.size===0&&n.delete(s),o()}},async write(t,n,r){await e.deviceState.setCapSlice.mutate({deviceId:t,capName:n,slice:r})}}}function $u(e,t,n){let r=(e,t)=>`${e}:${t}`;return{read(t,n){return e.get(t)?.get(n)},async refresh(){},watch(e,n,i){let a=r(e,n),o=t.get(a);return o||(o=new Set,t.set(a,o)),o.add(i),()=>{o.delete(i),o.size===0&&t.delete(a)}},async write(e,t,r){if(!n)throw Error(`createMirrorSource: write requires an api reference — pass it as the third argument when constructing the source`);await n.deviceState.setCapSlice.mutate({deviceId:e,capName:t,slice:r})}}}function Z(e,t,n){let r=ed(e)?e:Qu(e);return{get value(){return r.read(t,n)},refresh(){return r.refresh(t,n)},subscribe(e){let i=r.watch(t,n,t=>{try{e(t)}catch{}});try{e(r.read(t,n))}catch{}return r.read(t,n)===void 0&&r.refresh(t,n).catch(()=>void 0),i},async set(e){await r.write(t,n,e)},async patch(e){let i={...r.read(t,n),...e};await r.write(t,n,i)}}}function ed(e){return typeof e.read==`function`&&typeof e.watch==`function`}function td(e,t,n){let r=e,i=n?.stateSource??Qu(e);function a(e,n){let r=typeof e==`object`&&e?e:{};return n===void 0?{...r,deviceId:t.deviceId}:{...r,deviceId:t.deviceId,nodeId:n}}function o(e,t,n,i,a){let o=r[e]?.[t];if(!o)throw Error(`DeviceProxy: api has no '${e}.${t}'`);let s=o;return n===`mutation`?s.mutate(i):n===`subscription`?s.subscribe(i,a):s.query(i)}function s(e,n,r,i,s,c){return o(n,r,i,a(s,t.entries.find(t=>t.capName===e)?.providerNodeId),c)}function c(e,t,n,r,i){return o(e,t,n,a(r,void 0),i)}return{deviceId:t.deviceId,binding:t,state:{airQualitySensor:Z(i,t.deviceId,`air-quality-sensor`),alarmPanel:Z(i,t.deviceId,`alarm-panel`),ambientLightSensor:Z(i,t.deviceId,`ambient-light-sensor`),audioMetrics:Z(i,t.deviceId,`audio-metrics`),automationControl:Z(i,t.deviceId,`automation-control`),battery:Z(i,t.deviceId,`battery`),binary:Z(i,t.deviceId,`binary`),brightness:Z(i,t.deviceId,`brightness`),cameraStreams:Z(i,t.deviceId,`camera-streams`),carbonMonoxide:Z(i,t.deviceId,`carbon-monoxide`),climateControl:Z(i,t.deviceId,`climate-control`),color:Z(i,t.deviceId,`color`),connectivity:Z(i,t.deviceId,`connectivity`),consumables:Z(i,t.deviceId,`consumables`),contact:Z(i,t.deviceId,`contact`),control:Z(i,t.deviceId,`control`),cover:Z(i,t.deviceId,`cover`),dayNight:Z(i,t.deviceId,`day-night`),deviceDiscovery:Z(i,t.deviceId,`device-discovery`),deviceStatus:Z(i,t.deviceId,`device-status`),doorbell:Z(i,t.deviceId,`doorbell`),enumSensor:Z(i,t.deviceId,`enum-sensor`),eventEmitter:Z(i,t.deviceId,`event-emitter`),fanControl:Z(i,t.deviceId,`fan-control`),featureProbe:Z(i,t.deviceId,`feature-probe`),flood:Z(i,t.deviceId,`flood`),gas:Z(i,t.deviceId,`gas`),humidifier:Z(i,t.deviceId,`humidifier`),humiditySensor:Z(i,t.deviceId,`humidity-sensor`),image:Z(i,t.deviceId,`image`),imageSettings:Z(i,t.deviceId,`image-settings`),lawnMowerControl:Z(i,t.deviceId,`lawn-mower-control`),lockControl:Z(i,t.deviceId,`lock-control`),mediaPlayer:Z(i,t.deviceId,`media-player`),motion:Z(i,t.deviceId,`motion`),motionTrigger:Z(i,t.deviceId,`motion-trigger`),motionZones:Z(i,t.deviceId,`motion-zones`),nativeObjectDetection:Z(i,t.deviceId,`native-object-detection`),notifier:Z(i,t.deviceId,`notifier`),numericSensor:Z(i,t.deviceId,`numeric-sensor`),petFeeder:Z(i,t.deviceId,`pet-feeder`),powerMeter:Z(i,t.deviceId,`power-meter`),presence:Z(i,t.deviceId,`presence`),pressureSensor:Z(i,t.deviceId,`pressure-sensor`),privacyMask:Z(i,t.deviceId,`privacy-mask`),ptzAutotrack:Z(i,t.deviceId,`ptz-autotrack`),scriptRunner:Z(i,t.deviceId,`script-runner`),smoke:Z(i,t.deviceId,`smoke`),streamParams:Z(i,t.deviceId,`stream-params`),switch:Z(i,t.deviceId,`switch`),tamper:Z(i,t.deviceId,`tamper`),temperatureSensor:Z(i,t.deviceId,`temperature-sensor`),update:Z(i,t.deviceId,`update`),vacuumControl:Z(i,t.deviceId,`vacuum-control`),valve:Z(i,t.deviceId,`valve`),vibration:Z(i,t.deviceId,`vibration`),waterHeater:Z(i,t.deviceId,`water-heater`),weather:Z(i,t.deviceId,`weather`),zoneAnalytics:Z(i,t.deviceId,`zone-analytics`),zoneRules:Z(i,t.deviceId,`zone-rules`),zones:Z(i,t.deviceId,`zones`)},accessories:{setChildHidden:e=>s(`accessories`,`accessories`,`setChildHidden`,`mutation`,e),getStatus:e=>s(`accessories`,`accessories`,`getStatus`,`query`,e)},airQualitySensor:{getStatus:e=>s(`air-quality-sensor`,`airQualitySensor`,`getStatus`,`query`,e)},alarmPanel:{arm:e=>s(`alarm-panel`,`alarmPanel`,`arm`,`mutation`,e),disarm:e=>s(`alarm-panel`,`alarmPanel`,`disarm`,`mutation`,e),trigger:e=>s(`alarm-panel`,`alarmPanel`,`trigger`,`mutation`,e),getStatus:e=>s(`alarm-panel`,`alarmPanel`,`getStatus`,`query`,e)},ambientLightSensor:{getStatus:e=>s(`ambient-light-sensor`,`ambientLightSensor`,`getStatus`,`query`,e)},audioAnalysis:{resolveDeviceSettings:e=>s(`audio-analysis`,`audioAnalysis`,`resolveDeviceSettings`,`query`,e),getDeviceSettingsContribution:e=>s(`audio-analysis`,`audioAnalysis`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`audio-analysis`,`audioAnalysis`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`audio-analysis`,`audioAnalysis`,`applyDeviceSettingsPatch`,`mutation`,e)},audioMetrics:{getCurrentSnapshot:e=>s(`audio-metrics`,`audioMetrics`,`getCurrentSnapshot`,`query`,e),getHistory:e=>s(`audio-metrics`,`audioMetrics`,`getHistory`,`query`,e)},automationControl:{enable:e=>s(`automation-control`,`automationControl`,`enable`,`mutation`,e),disable:e=>s(`automation-control`,`automationControl`,`disable`,`mutation`,e),trigger:e=>s(`automation-control`,`automationControl`,`trigger`,`mutation`,e),getStatus:e=>s(`automation-control`,`automationControl`,`getStatus`,`query`,e)},battery:{wakeForStream:e=>s(`battery`,`battery`,`wakeForStream`,`mutation`,e),getStatus:e=>s(`battery`,`battery`,`getStatus`,`query`,e)},binary:{getStatus:e=>s(`binary`,`binary`,`getStatus`,`query`,e)},brightness:{setBrightness:e=>s(`brightness`,`brightness`,`setBrightness`,`mutation`,e),getStatus:e=>s(`brightness`,`brightness`,`getStatus`,`query`,e)},button:{press:e=>s(`button`,`button`,`press`,`mutation`,e)},cameraCredentials:{getCredentials:e=>s(`camera-credentials`,`cameraCredentials`,`getCredentials`,`query`,e),getStatus:e=>s(`camera-credentials`,`cameraCredentials`,`getStatus`,`query`,e)},cameraStreams:{getCameraStreams:e=>s(`camera-streams`,`cameraStreams`,`getCameraStreams`,`query`,e),getBrokerStreams:e=>s(`camera-streams`,`cameraStreams`,`getBrokerStreams`,`query`,e),getRtspEntries:e=>s(`camera-streams`,`cameraStreams`,`getRtspEntries`,`query`,e),getProfileRtspEntries:e=>s(`camera-streams`,`cameraStreams`,`getProfileRtspEntries`,`query`,e),pickStream:e=>s(`camera-streams`,`cameraStreams`,`pickStream`,`query`,e)},carbonMonoxide:{getStatus:e=>s(`carbon-monoxide`,`carbonMonoxide`,`getStatus`,`query`,e)},climateControl:{setMode:e=>s(`climate-control`,`climateControl`,`setMode`,`mutation`,e),setFanMode:e=>s(`climate-control`,`climateControl`,`setFanMode`,`mutation`,e),setPreset:e=>s(`climate-control`,`climateControl`,`setPreset`,`mutation`,e),setTarget:e=>s(`climate-control`,`climateControl`,`setTarget`,`mutation`,e),setTargetRange:e=>s(`climate-control`,`climateControl`,`setTargetRange`,`mutation`,e),setTargetHumidity:e=>s(`climate-control`,`climateControl`,`setTargetHumidity`,`mutation`,e),setSwingVertical:e=>s(`climate-control`,`climateControl`,`setSwingVertical`,`mutation`,e),setSwingHorizontal:e=>s(`climate-control`,`climateControl`,`setSwingHorizontal`,`mutation`,e),getStatus:e=>s(`climate-control`,`climateControl`,`getStatus`,`query`,e)},color:{setColor:e=>s(`color`,`color`,`setColor`,`mutation`,e),getStatus:e=>s(`color`,`color`,`getStatus`,`query`,e)},connectivity:{getStatus:e=>s(`connectivity`,`connectivity`,`getStatus`,`query`,e)},consumables:{reset:e=>s(`consumables`,`consumables`,`reset`,`mutation`,e),getStatus:e=>s(`consumables`,`consumables`,`getStatus`,`query`,e)},contact:{getStatus:e=>s(`contact`,`contact`,`getStatus`,`query`,e)},control:{setValue:e=>s(`control`,`control`,`setValue`,`mutation`,e),getStatus:e=>s(`control`,`control`,`getStatus`,`query`,e)},cover:{open:e=>s(`cover`,`cover`,`open`,`mutation`,e),close:e=>s(`cover`,`cover`,`close`,`mutation`,e),stop:e=>s(`cover`,`cover`,`stop`,`mutation`,e),setPosition:e=>s(`cover`,`cover`,`setPosition`,`mutation`,e),setTiltPosition:e=>s(`cover`,`cover`,`setTiltPosition`,`mutation`,e),getStatus:e=>s(`cover`,`cover`,`getStatus`,`query`,e)},dayNight:{getOptions:e=>s(`day-night`,`dayNight`,`getOptions`,`query`,e),setSettings:e=>s(`day-night`,`dayNight`,`setSettings`,`mutation`,e),getStatus:e=>s(`day-night`,`dayNight`,`getStatus`,`query`,e)},detectionPipeline:{getDeviceSettingsContribution:e=>s(`detection-pipeline`,`detectionPipeline`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`detection-pipeline`,`detectionPipeline`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`detection-pipeline`,`detectionPipeline`,`applyDeviceSettingsPatch`,`mutation`,e)},deviceDiscovery:{listDiscovered:e=>s(`device-discovery`,`deviceDiscovery`,`listDiscovered`,`query`,e),refreshDiscovery:e=>s(`device-discovery`,`deviceDiscovery`,`refreshDiscovery`,`mutation`,e),adoptDevice:e=>s(`device-discovery`,`deviceDiscovery`,`adoptDevice`,`mutation`,e),releaseDevice:e=>s(`device-discovery`,`deviceDiscovery`,`releaseDevice`,`mutation`,e),getStatus:e=>s(`device-discovery`,`deviceDiscovery`,`getStatus`,`query`,e)},deviceOps:{getStreamSources:e=>s(`device-ops`,`deviceOps`,`getStreamSources`,`query`,e),getConfigEntries:e=>s(`device-ops`,`deviceOps`,`getConfigEntries`,`query`,e),setConfig:e=>s(`device-ops`,`deviceOps`,`setConfig`,`mutation`,e),runAction:e=>s(`device-ops`,`deviceOps`,`runAction`,`mutation`,e),removeDevice:e=>s(`device-ops`,`deviceOps`,`removeDevice`,`mutation`,e),getSettingsSchema:e=>s(`device-ops`,`deviceOps`,`getSettingsSchema`,`query`,e),getRawState:e=>s(`device-ops`,`deviceOps`,`getRawState`,`query`,e)},deviceStatus:{getStatus:e=>s(`device-status`,`deviceStatus`,`getStatus`,`query`,e)},doorbell:{getStatus:e=>s(`doorbell`,`doorbell`,`getStatus`,`query`,e)},enumSensor:{getStatus:e=>s(`enum-sensor`,`enumSensor`,`getStatus`,`query`,e)},eventEmitter:{getStatus:e=>s(`event-emitter`,`eventEmitter`,`getStatus`,`query`,e)},events:{getEvents:e=>s(`events`,`events`,`getEvents`,`query`,e),getEventThumbnail:e=>s(`events`,`events`,`getEventThumbnail`,`query`,e),getEventClipUrl:e=>s(`events`,`events`,`getEventClipUrl`,`query`,e)},fanControl:{setPercentage:e=>s(`fan-control`,`fanControl`,`setPercentage`,`mutation`,e),setPreset:e=>s(`fan-control`,`fanControl`,`setPreset`,`mutation`,e),setDirection:e=>s(`fan-control`,`fanControl`,`setDirection`,`mutation`,e),setOscillating:e=>s(`fan-control`,`fanControl`,`setOscillating`,`mutation`,e),getStatus:e=>s(`fan-control`,`fanControl`,`getStatus`,`query`,e)},featureProbe:{getStatus:e=>s(`feature-probe`,`featureProbe`,`getStatus`,`query`,e)},flood:{getStatus:e=>s(`flood`,`flood`,`getStatus`,`query`,e)},gas:{getStatus:e=>s(`gas`,`gas`,`getStatus`,`query`,e)},humidifier:{setOn:e=>s(`humidifier`,`humidifier`,`setOn`,`mutation`,e),setTargetHumidity:e=>s(`humidifier`,`humidifier`,`setTargetHumidity`,`mutation`,e),setMode:e=>s(`humidifier`,`humidifier`,`setMode`,`mutation`,e),getStatus:e=>s(`humidifier`,`humidifier`,`getStatus`,`query`,e)},humiditySensor:{getStatus:e=>s(`humidity-sensor`,`humiditySensor`,`getStatus`,`query`,e)},image:{getStatus:e=>s(`image`,`image`,`getStatus`,`query`,e)},imageSettings:{getOptions:e=>s(`image-settings`,`imageSettings`,`getOptions`,`query`,e),setSettings:e=>s(`image-settings`,`imageSettings`,`setSettings`,`mutation`,e),getStatus:e=>s(`image-settings`,`imageSettings`,`getStatus`,`query`,e)},intercom:{startSession:e=>s(`intercom`,`intercom`,`startSession`,`mutation`,e),handleAnswer:e=>s(`intercom`,`intercom`,`handleAnswer`,`mutation`,e),stopSession:e=>s(`intercom`,`intercom`,`stopSession`,`mutation`,e),startTalkSession:e=>s(`intercom`,`intercom`,`startTalkSession`,`mutation`,e),pushTalkAudio:e=>s(`intercom`,`intercom`,`pushTalkAudio`,`mutation`,e),endTalkSession:e=>s(`intercom`,`intercom`,`endTalkSession`,`mutation`,e),getStatus:e=>s(`intercom`,`intercom`,`getStatus`,`query`,e)},lawnMowerControl:{startMowing:e=>s(`lawn-mower-control`,`lawnMowerControl`,`startMowing`,`mutation`,e),pause:e=>s(`lawn-mower-control`,`lawnMowerControl`,`pause`,`mutation`,e),dock:e=>s(`lawn-mower-control`,`lawnMowerControl`,`dock`,`mutation`,e),getStatus:e=>s(`lawn-mower-control`,`lawnMowerControl`,`getStatus`,`query`,e)},lockControl:{lock:e=>s(`lock-control`,`lockControl`,`lock`,`mutation`,e),unlock:e=>s(`lock-control`,`lockControl`,`unlock`,`mutation`,e),open:e=>s(`lock-control`,`lockControl`,`open`,`mutation`,e),getStatus:e=>s(`lock-control`,`lockControl`,`getStatus`,`query`,e)},mediaPlayer:{play:e=>s(`media-player`,`mediaPlayer`,`play`,`mutation`,e),pause:e=>s(`media-player`,`mediaPlayer`,`pause`,`mutation`,e),stop:e=>s(`media-player`,`mediaPlayer`,`stop`,`mutation`,e),next:e=>s(`media-player`,`mediaPlayer`,`next`,`mutation`,e),previous:e=>s(`media-player`,`mediaPlayer`,`previous`,`mutation`,e),seek:e=>s(`media-player`,`mediaPlayer`,`seek`,`mutation`,e),setVolume:e=>s(`media-player`,`mediaPlayer`,`setVolume`,`mutation`,e),setMute:e=>s(`media-player`,`mediaPlayer`,`setMute`,`mutation`,e),setShuffle:e=>s(`media-player`,`mediaPlayer`,`setShuffle`,`mutation`,e),setRepeat:e=>s(`media-player`,`mediaPlayer`,`setRepeat`,`mutation`,e),selectSource:e=>s(`media-player`,`mediaPlayer`,`selectSource`,`mutation`,e),playMedia:e=>s(`media-player`,`mediaPlayer`,`playMedia`,`mutation`,e),getStatus:e=>s(`media-player`,`mediaPlayer`,`getStatus`,`query`,e)},motion:{isDetected:e=>s(`motion`,`motion`,`isDetected`,`query`,e),getStatus:e=>s(`motion`,`motion`,`getStatus`,`query`,e)},motionDetection:{analyze:e=>s(`motion-detection`,`motionDetection`,`analyze`,`mutation`,e),removeCamera:e=>s(`motion-detection`,`motionDetection`,`removeCamera`,`mutation`,e),reset:e=>s(`motion-detection`,`motionDetection`,`reset`,`mutation`,e),getDeviceSettingsContribution:e=>s(`motion-detection`,`motionDetection`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`motion-detection`,`motionDetection`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`motion-detection`,`motionDetection`,`applyDeviceSettingsPatch`,`mutation`,e)},motionTrigger:{setMotionTrigger:e=>s(`motion-trigger`,`motionTrigger`,`setMotionTrigger`,`mutation`,e),getStatus:e=>s(`motion-trigger`,`motionTrigger`,`getStatus`,`query`,e)},motionZones:{getOptions:e=>s(`motion-zones`,`motionZones`,`getOptions`,`query`,e),setZone:e=>s(`motion-zones`,`motionZones`,`setZone`,`mutation`,e),getStatus:e=>s(`motion-zones`,`motionZones`,`getStatus`,`query`,e)},nativeObjectDetection:{setEnabled:e=>s(`native-object-detection`,`nativeObjectDetection`,`setEnabled`,`mutation`,e),getStatus:e=>s(`native-object-detection`,`nativeObjectDetection`,`getStatus`,`query`,e)},notifier:{send:e=>s(`notifier`,`notifier`,`send`,`mutation`,e),cancel:e=>s(`notifier`,`notifier`,`cancel`,`mutation`,e),getStatus:e=>s(`notifier`,`notifier`,`getStatus`,`query`,e)},numericSensor:{getStatus:e=>s(`numeric-sensor`,`numericSensor`,`getStatus`,`query`,e)},osd:{setOverlay:e=>s(`osd`,`osd`,`setOverlay`,`mutation`,e),getStatus:e=>s(`osd`,`osd`,`getStatus`,`query`,e)},petFeeder:{feed:e=>s(`pet-feeder`,`petFeeder`,`feed`,`mutation`,e),cancelFeed:e=>s(`pet-feeder`,`petFeeder`,`cancelFeed`,`mutation`,e),resetDesiccant:e=>s(`pet-feeder`,`petFeeder`,`resetDesiccant`,`mutation`,e),markFoodReplenished:e=>s(`pet-feeder`,`petFeeder`,`markFoodReplenished`,`mutation`,e),callPet:e=>s(`pet-feeder`,`petFeeder`,`callPet`,`mutation`,e),playSound:e=>s(`pet-feeder`,`petFeeder`,`playSound`,`mutation`,e),setChildLock:e=>s(`pet-feeder`,`petFeeder`,`setChildLock`,`mutation`,e),setIndicatorLight:e=>s(`pet-feeder`,`petFeeder`,`setIndicatorLight`,`mutation`,e),setFeedSound:e=>s(`pet-feeder`,`petFeeder`,`setFeedSound`,`mutation`,e),setVolume:e=>s(`pet-feeder`,`petFeeder`,`setVolume`,`mutation`,e),getStatus:e=>s(`pet-feeder`,`petFeeder`,`getStatus`,`query`,e)},pipelineAnalytics:{getActiveTracks:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getActiveTracks`,`query`,e),getTrack:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getTrack`,`query`,e),listTracks:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listTracks`,`query`,e),clearTracks:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`clearTracks`,`mutation`,e),getMotionEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getMotionEvents`,`query`,e),getObjectEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getObjectEvents`,`query`,e),getAudioEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getAudioEvents`,`query`,e),getEventDensity:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getEventDensity`,`query`,e),pruneEventsBefore:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`pruneEventsBefore`,`mutation`,e),getEventMedia:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getEventMedia`,`query`,e),getTrackMedia:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getTrackMedia`,`query`,e),searchObjectEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`searchObjectEvents`,`query`,e),getDeviceSettingsContribution:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`applyDeviceSettingsPatch`,`mutation`,e)},powerMeter:{getStatus:e=>s(`power-meter`,`powerMeter`,`getStatus`,`query`,e)},presence:{getStatus:e=>s(`presence`,`presence`,`getStatus`,`query`,e)},pressureSensor:{getStatus:e=>s(`pressure-sensor`,`pressureSensor`,`getStatus`,`query`,e)},privacyMask:{getOptions:e=>s(`privacy-mask`,`privacyMask`,`getOptions`,`query`,e),setMask:e=>s(`privacy-mask`,`privacyMask`,`setMask`,`mutation`,e),getStatus:e=>s(`privacy-mask`,`privacyMask`,`getStatus`,`query`,e)},ptz:{move:e=>s(`ptz`,`ptz`,`move`,`mutation`,e),continuousMove:e=>s(`ptz`,`ptz`,`continuousMove`,`mutation`,e),stop:e=>s(`ptz`,`ptz`,`stop`,`mutation`,e),getPresets:e=>s(`ptz`,`ptz`,`getPresets`,`query`,e),goToPreset:e=>s(`ptz`,`ptz`,`goToPreset`,`mutation`,e),savePreset:e=>s(`ptz`,`ptz`,`savePreset`,`mutation`,e),deletePreset:e=>s(`ptz`,`ptz`,`deletePreset`,`mutation`,e),getOptions:e=>s(`ptz`,`ptz`,`getOptions`,`query`,e),goHome:e=>s(`ptz`,`ptz`,`goHome`,`mutation`,e),getPosition:e=>s(`ptz`,`ptz`,`getPosition`,`query`,e),setAutofocus:e=>s(`ptz`,`ptz`,`setAutofocus`,`mutation`,e),getStatus:e=>s(`ptz`,`ptz`,`getStatus`,`query`,e)},ptzAutotrack:{getStatus:e=>s(`ptz-autotrack`,`ptzAutotrack`,`getStatus`,`query`,e),setEnabled:e=>s(`ptz-autotrack`,`ptzAutotrack`,`setEnabled`,`mutation`,e),getSettings:e=>s(`ptz-autotrack`,`ptzAutotrack`,`getSettings`,`query`,e),setSettings:e=>s(`ptz-autotrack`,`ptzAutotrack`,`setSettings`,`mutation`,e)},reboot:{reboot:e=>s(`reboot`,`reboot`,`reboot`,`mutation`,e)},scriptRunner:{run:e=>s(`script-runner`,`scriptRunner`,`run`,`mutation`,e),stop:e=>s(`script-runner`,`scriptRunner`,`stop`,`mutation`,e),getStatus:e=>s(`script-runner`,`scriptRunner`,`getStatus`,`query`,e)},smoke:{getStatus:e=>s(`smoke`,`smoke`,`getStatus`,`query`,e)},snapshot:{getSnapshot:e=>s(`snapshot`,`snapshot`,`getSnapshot`,`query`,e),invalidateCache:e=>s(`snapshot`,`snapshot`,`invalidateCache`,`mutation`,e),getStatus:e=>s(`snapshot`,`snapshot`,`getStatus`,`query`,e),getDeviceSettingsContribution:e=>s(`snapshot`,`snapshot`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`snapshot`,`snapshot`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`snapshot`,`snapshot`,`applyDeviceSettingsPatch`,`mutation`,e)},streamCatalog:{getCatalog:e=>s(`stream-catalog`,`streamCatalog`,`getCatalog`,`query`,e)},streamParams:{getOptions:e=>s(`stream-params`,`streamParams`,`getOptions`,`query`,e),setProfile:e=>s(`stream-params`,`streamParams`,`setProfile`,`mutation`,e),getConfigSchema:e=>s(`stream-params`,`streamParams`,`getConfigSchema`,`query`,e),getStatus:e=>s(`stream-params`,`streamParams`,`getStatus`,`query`,e)},switch:{setState:e=>s(`switch`,`switch`,`setState`,`mutation`,e),getStatus:e=>s(`switch`,`switch`,`getStatus`,`query`,e)},tamper:{getStatus:e=>s(`tamper`,`tamper`,`getStatus`,`query`,e)},temperatureSensor:{getStatus:e=>s(`temperature-sensor`,`temperatureSensor`,`getStatus`,`query`,e)},update:{installUpdate:e=>s(`update`,`update`,`installUpdate`,`mutation`,e),getStatus:e=>s(`update`,`update`,`getStatus`,`query`,e)},vacuumControl:{start:e=>s(`vacuum-control`,`vacuumControl`,`start`,`mutation`,e),pause:e=>s(`vacuum-control`,`vacuumControl`,`pause`,`mutation`,e),stop:e=>s(`vacuum-control`,`vacuumControl`,`stop`,`mutation`,e),returnToBase:e=>s(`vacuum-control`,`vacuumControl`,`returnToBase`,`mutation`,e),locate:e=>s(`vacuum-control`,`vacuumControl`,`locate`,`mutation`,e),setFanSpeed:e=>s(`vacuum-control`,`vacuumControl`,`setFanSpeed`,`mutation`,e),getStatus:e=>s(`vacuum-control`,`vacuumControl`,`getStatus`,`query`,e)},valve:{open:e=>s(`valve`,`valve`,`open`,`mutation`,e),close:e=>s(`valve`,`valve`,`close`,`mutation`,e),stop:e=>s(`valve`,`valve`,`stop`,`mutation`,e),setPosition:e=>s(`valve`,`valve`,`setPosition`,`mutation`,e),getStatus:e=>s(`valve`,`valve`,`getStatus`,`query`,e)},vibration:{getStatus:e=>s(`vibration`,`vibration`,`getStatus`,`query`,e)},videoclips:{listClips:e=>s(`videoclips`,`videoclips`,`listClips`,`query`,e),getClipPlayback:e=>s(`videoclips`,`videoclips`,`getClipPlayback`,`query`,e)},waterHeater:{setTargetTemp:e=>s(`water-heater`,`waterHeater`,`setTargetTemp`,`mutation`,e),setOperationMode:e=>s(`water-heater`,`waterHeater`,`setOperationMode`,`mutation`,e),setAway:e=>s(`water-heater`,`waterHeater`,`setAway`,`mutation`,e),getStatus:e=>s(`water-heater`,`waterHeater`,`getStatus`,`query`,e)},weather:{getStatus:e=>s(`weather`,`weather`,`getStatus`,`query`,e)},webrtcSession:{listStreams:e=>s(`webrtc-session`,`webrtcSession`,`listStreams`,`query`,e),createSession:e=>s(`webrtc-session`,`webrtcSession`,`createSession`,`mutation`,e),handleOffer:e=>s(`webrtc-session`,`webrtcSession`,`handleOffer`,`mutation`,e),handleAnswer:e=>s(`webrtc-session`,`webrtcSession`,`handleAnswer`,`mutation`,e),addIceCandidate:e=>s(`webrtc-session`,`webrtcSession`,`addIceCandidate`,`mutation`,e),getIceCandidates:e=>s(`webrtc-session`,`webrtcSession`,`getIceCandidates`,`query`,e),closeSession:e=>s(`webrtc-session`,`webrtcSession`,`closeSession`,`mutation`,e),hasAdaptiveBitrate:e=>s(`webrtc-session`,`webrtcSession`,`hasAdaptiveBitrate`,`query`,e),getSessionState:e=>s(`webrtc-session`,`webrtcSession`,`getSessionState`,`query`,e)},zoneAnalytics:{getCurrentSnapshot:e=>s(`zone-analytics`,`zoneAnalytics`,`getCurrentSnapshot`,`query`,e),getZoneHistory:e=>s(`zone-analytics`,`zoneAnalytics`,`getZoneHistory`,`query`,e),getCameraHistory:e=>s(`zone-analytics`,`zoneAnalytics`,`getCameraHistory`,`query`,e),getUnzonedHistory:e=>s(`zone-analytics`,`zoneAnalytics`,`getUnzonedHistory`,`query`,e)},zoneRules:{listRules:e=>s(`zone-rules`,`zoneRules`,`listRules`,`query`,e),setRules:e=>s(`zone-rules`,`zoneRules`,`setRules`,`mutation`,e)},zones:{listZones:e=>s(`zones`,`zones`,`listZones`,`query`,e),addZone:e=>s(`zones`,`zones`,`addZone`,`mutation`,e),removeZone:e=>s(`zones`,`zones`,`removeZone`,`mutation`,e),updateZone:e=>s(`zones`,`zones`,`updateZone`,`mutation`,e)},addonSettings:{getDeviceSettings:e=>c(`addonSettings`,`getDeviceSettings`,`query`,e),updateDeviceSettings:e=>c(`addonSettings`,`updateDeviceSettings`,`mutation`,e)},cameraPipelineConfig:{getDeviceSettingsContribution:e=>c(`cameraPipelineConfig`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`cameraPipelineConfig`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`cameraPipelineConfig`,`applyDeviceSettingsPatch`,`mutation`,e)},deviceAdoption:{getStatus:e=>c(`deviceAdoption`,`getStatus`,`query`,e)},deviceExport:{getDeviceSettingsContribution:e=>c(`deviceExport`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`deviceExport`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`deviceExport`,`applyDeviceSettingsPatch`,`mutation`,e)},deviceManager:{loadConfig:e=>c(`deviceManager`,`loadConfig`,`query`,e),loadRuntimeState:e=>c(`deviceManager`,`loadRuntimeState`,`query`,e),loadMeta:e=>c(`deviceManager`,`loadMeta`,`query`,e),setName:e=>c(`deviceManager`,`setName`,`mutation`,e),setLocation:e=>c(`deviceManager`,`setLocation`,`mutation`,e),setType:e=>c(`deviceManager`,`setType`,`mutation`,e),setIntegrationId:e=>c(`deviceManager`,`setIntegrationId`,`mutation`,e),setLinkDeviceId:e=>c(`deviceManager`,`setLinkDeviceId`,`mutation`,e),setPrimaryChildEntityId:e=>c(`deviceManager`,`setPrimaryChildEntityId`,`mutation`,e),setChildLayout:e=>c(`deviceManager`,`setChildLayout`,`mutation`,e),setDeviceLinks:e=>c(`deviceManager`,`setDeviceLinks`,`mutation`,e),setDisplay:e=>c(`deviceManager`,`setDisplay`,`mutation`,e),getWireableFields:e=>c(`deviceManager`,`getWireableFields`,`query`,e),setRole:e=>c(`deviceManager`,`setRole`,`mutation`,e),applyInitialMeta:e=>c(`deviceManager`,`applyInitialMeta`,`mutation`,e),setMetadata:e=>c(`deviceManager`,`setMetadata`,`mutation`,e),setDisabled:e=>c(`deviceManager`,`setDisabled`,`mutation`,e),getDevice:e=>c(`deviceManager`,`getDevice`,`query`,e),getStreamSources:e=>c(`deviceManager`,`getStreamSources`,`query`,e),getConfigSchema:e=>c(`deviceManager`,`getConfigSchema`,`query`,e),getSettingsSchema:e=>c(`deviceManager`,`getSettingsSchema`,`query`,e),updateConfig:e=>c(`deviceManager`,`updateConfig`,`mutation`,e),enable:e=>c(`deviceManager`,`enable`,`mutation`,e),disable:e=>c(`deviceManager`,`disable`,`mutation`,e),remove:e=>c(`deviceManager`,`remove`,`mutation`,e),getStreamProfileMap:e=>c(`deviceManager`,`getStreamProfileMap`,`query`,e),setStreamProfileMap:e=>c(`deviceManager`,`setStreamProfileMap`,`mutation`,e),probeStreams:e=>c(`deviceManager`,`probeStreams`,`mutation`,e),getBindings:e=>c(`deviceManager`,`getBindings`,`query`,e),getAllBindings:e=>c(`deviceManager`,`getAllBindings`,`query`,e),setWrapperActive:e=>c(`deviceManager`,`setWrapperActive`,`mutation`,e),getDeviceSettingsAggregate:e=>c(`deviceManager`,`getDeviceSettingsAggregate`,`query`,e),getDeviceLiveInfoAggregate:e=>c(`deviceManager`,`getDeviceLiveInfoAggregate`,`query`,e),getDeviceAggregate:e=>c(`deviceManager`,`getDeviceAggregate`,`query`,e),runDeviceAction:e=>c(`deviceManager`,`runDeviceAction`,`mutation`,e),updateDeviceField:e=>c(`deviceManager`,`updateDeviceField`,`mutation`,e),updateDeviceFieldsBatch:e=>c(`deviceManager`,`updateDeviceFieldsBatch`,`mutation`,e),testField:e=>c(`deviceManager`,`testField`,`mutation`,e),getDeviceStatusAggregate:e=>c(`deviceManager`,`getDeviceStatusAggregate`,`query`,e)},deviceState:{getSnapshot:e=>c(`deviceState`,`getSnapshot`,`query`,e),getCapSlice:e=>c(`deviceState`,`getCapSlice`,`query`,e),setCapSlice:e=>c(`deviceState`,`setCapSlice`,`mutation`,e)},faceGallery:{getFaceByTrack:e=>c(`faceGallery`,`getFaceByTrack`,`query`,e)},networkQuality:{getDeviceStats:e=>c(`networkQuality`,`getDeviceStats`,`query`,e),reportClientStats:e=>c(`networkQuality`,`reportClientStats`,`mutation`,e)},pipelineExecutor:{runPipeline:e=>c(`pipelineExecutor`,`runPipeline`,`mutation`,e),runPipelineBatch:e=>c(`pipelineExecutor`,`runPipelineBatch`,`mutation`,e)},pipelineOrchestrator:{assignPipeline:e=>c(`pipelineOrchestrator`,`assignPipeline`,`mutation`,e),unassignPipeline:e=>c(`pipelineOrchestrator`,`unassignPipeline`,`mutation`,e),getPipelineAssignment:e=>c(`pipelineOrchestrator`,`getPipelineAssignment`,`query`,e),getCameraMetrics:e=>c(`pipelineOrchestrator`,`getCameraMetrics`,`query`,e),assignAudio:e=>c(`pipelineOrchestrator`,`assignAudio`,`mutation`,e),unassignAudio:e=>c(`pipelineOrchestrator`,`unassignAudio`,`mutation`,e),getAudioAssignment:e=>c(`pipelineOrchestrator`,`getAudioAssignment`,`query`,e),getAudioAssignments:e=>c(`pipelineOrchestrator`,`getAudioAssignments`,`query`,e),getCameraSettings:e=>c(`pipelineOrchestrator`,`getCameraSettings`,`query`,e),setCameraStepToggle:e=>c(`pipelineOrchestrator`,`setCameraStepToggle`,`mutation`,e),getCameraStepOverrides:e=>c(`pipelineOrchestrator`,`getCameraStepOverrides`,`query`,e),setCameraStepOverride:e=>c(`pipelineOrchestrator`,`setCameraStepOverride`,`mutation`,e),setCameraPipelineForAgent:e=>c(`pipelineOrchestrator`,`setCameraPipelineForAgent`,`mutation`,e),resolvePipeline:e=>c(`pipelineOrchestrator`,`resolvePipeline`,`query`,e),getCameraStatus:e=>c(`pipelineOrchestrator`,`getCameraStatus`,`query`,e),getDeviceSettingsContribution:e=>c(`pipelineOrchestrator`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`pipelineOrchestrator`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`pipelineOrchestrator`,`applyDeviceSettingsPatch`,`mutation`,e)},pipelineRunner:{detachCamera:e=>c(`pipelineRunner`,`detachCamera`,`mutation`,e),getCameraMetrics:e=>c(`pipelineRunner`,`getCameraMetrics`,`query`,e)},plateGallery:{listPlates:e=>c(`plateGallery`,`listPlates`,`query`,e),getPlateByTrack:e=>c(`plateGallery`,`getPlateByTrack`,`query`,e)},recording:{getAvailability:e=>c(`recording`,`getAvailability`,`query`,e),getDaysWithRecordings:e=>c(`recording`,`getDaysWithRecordings`,`query`,e),getPlaybackManifest:e=>c(`recording`,`getPlaybackManifest`,`query`,e),getDeviceConfig:e=>c(`recording`,`getDeviceConfig`,`query`,e),locateSegment:e=>c(`recording`,`locateSegment`,`query`,e),readSegmentBytes:e=>c(`recording`,`readSegmentBytes`,`query`,e),setDeviceConfig:e=>c(`recording`,`setDeviceConfig`,`mutation`,e),rescanStorage:e=>c(`recording`,`rescanStorage`,`mutation`,e),pruneFootage:e=>c(`recording`,`pruneFootage`,`mutation`,e),getStatus:e=>c(`recording`,`getStatus`,`query`,e),getDeviceSettingsContribution:e=>c(`recording`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`recording`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`recording`,`applyDeviceSettingsPatch`,`mutation`,e)},streamBroker:{publishCameraStream:e=>c(`streamBroker`,`publishCameraStream`,`mutation`,e),retractCameraStream:e=>c(`streamBroker`,`retractCameraStream`,`mutation`,e),assignProfile:e=>c(`streamBroker`,`assignProfile`,`mutation`,e),unassignProfile:e=>c(`streamBroker`,`unassignProfile`,`mutation`,e),restartProfile:e=>c(`streamBroker`,`restartProfile`,`mutation`,e),getDeviceSettingsContribution:e=>c(`streamBroker`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`streamBroker`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`streamBroker`,`applyDeviceSettingsPatch`,`mutation`,e)}}}function nd(e,t,n,r,i){if(n.length===0||t.length===0)return{passed:e,excluded:[]};let a=n.filter(e=>e.enabled!==!1),o=a.filter(e=>e.mode===`include`),s=a.filter(e=>e.mode===`exclude`),c=o.length>0,l=new Map(t.map(e=>[e.id,e])),u=[],d=[];for(let t of e){let e=r(t),n=i?.(t),a=o.some(t=>rd(t,e,n,l)),f=s.some(t=>rd(t,e,n,l));c?a&&!f?u.push(t):d.push(t):f?d.push(t):u.push(t)}return{passed:u,excluded:d}}function rd(e,t,n,r){if(e.classFilter&&e.classFilter.length>0&&n!==void 0&&!e.classFilter.includes(n))return!1;for(let n of e.zoneIds){let e=r.get(n);if(e&&id(t,e.polygon))return!0}return!1}function id(e,t){if(t.length<3)return!1;let n=!1,{x:r,y:i}=e;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a];o.y>i!=s.y>i&&r<(s.x-o.x)*(i-o.y)/(s.y-o.y||2**-52)+o.x&&(n=!n)}return n}function ad(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),updateFrameworkPackage:e=>n(`addons`,`updateFrameworkPackage`,`mutation`,e),getVersions:e=>n(`addons`,`getVersions`,`query`,e),restartAddon:e=>n(`addons`,`restartAddon`,`mutation`,e),retryLoad:e=>n(`addons`,`retryLoad`,`mutation`,e),getAutoUpdateSettings:e=>n(`addons`,`getAutoUpdateSettings`,`query`,e),setAutoUpdateSettings:e=>n(`addons`,`setAutoUpdateSettings`,`mutation`,e),getAddonAutoUpdate:e=>n(`addons`,`getAddonAutoUpdate`,`query`,e),setAddonAutoUpdate:e=>n(`addons`,`setAddonAutoUpdate`,`mutation`,e),applyAutoUpdateToAll:e=>n(`addons`,`applyAutoUpdateToAll`,`mutation`,e),custom:e=>n(`addons`,`custom`,`mutation`,e),startJob:e=>n(`addons`,`startJob`,`mutation`,e),getJob:e=>n(`addons`,`getJob`,`query`,e),listJobs:e=>n(`addons`,`listJobs`,`query`,e),cancelJob:e=>n(`addons`,`cancelJob`,`mutation`,e),onAddonLogs:(e,t)=>n(`addons`,`onAddonLogs`,`subscription`,e,t)},addonSettings:{getGlobalSettings:e=>n(`addonSettings`,`getGlobalSettings`,`query`,e),updateGlobalSettings:e=>n(`addonSettings`,`updateGlobalSettings`,`mutation`,e)},addonWidgets:{listWidgets:e=>n(`addonWidgets`,`listWidgets`,`query`,e)},alerts:{emit:e=>n(`alerts`,`emit`,`mutation`,e),update:e=>n(`alerts`,`update`,`mutation`,e),list:e=>n(`alerts`,`list`,`query`,e),getUnreadCount:e=>n(`alerts`,`getUnreadCount`,`query`,e),markRead:e=>n(`alerts`,`markRead`,`mutation`,e),markAllRead:e=>n(`alerts`,`markAllRead`,`mutation`,e),dismiss:e=>n(`alerts`,`dismiss`,`mutation`,e)},audioAnalyzer:{analyseChunk:e=>n(`audioAnalyzer`,`analyseChunk`,`mutation`,e),classify:e=>n(`audioAnalyzer`,`classify`,`query`,e),isReady:e=>n(`audioAnalyzer`,`isReady`,`query`,e),dispose:e=>n(`audioAnalyzer`,`dispose`,`mutation`,e),reprobeAudioEngine:e=>n(`audioAnalyzer`,`reprobeAudioEngine`,`mutation`,e)},audioCodec:{listSupportedCodecs:e=>n(`audioCodec`,`listSupportedCodecs`,`query`,e),canHandle:e=>n(`audioCodec`,`canHandle`,`query`,e),createDecodeSession:e=>n(`audioCodec`,`createDecodeSession`,`mutation`,e),createEncodeSession:e=>n(`audioCodec`,`createEncodeSession`,`mutation`,e),closeSession:e=>n(`audioCodec`,`closeSession`,`mutation`,e),pushEncodedFrame:e=>n(`audioCodec`,`pushEncodedFrame`,`mutation`,e),pullPcm:e=>n(`audioCodec`,`pullPcm`,`query`,e),pushPcm:e=>n(`audioCodec`,`pushPcm`,`mutation`,e),pullEncoded:e=>n(`audioCodec`,`pullEncoded`,`query`,e),flushEncode:e=>n(`audioCodec`,`flushEncode`,`mutation`,e),listActiveSessions:e=>n(`audioCodec`,`listActiveSessions`,`query`,e)},backup:{listDestinations:e=>n(`backup`,`listDestinations`,`query`,e),trigger:e=>n(`backup`,`trigger`,`mutation`,e),list:e=>n(`backup`,`list`,`query`,e),listLocations:e=>n(`backup`,`listLocations`,`query`,e),getEntries:e=>n(`backup`,`getEntries`,`query`,e),restore:e=>n(`backup`,`restore`,`mutation`,e),delete:e=>n(`backup`,`delete`,`mutation`,e),listArchives:e=>n(`backup`,`listArchives`,`query`,e),upsertDestinationPolicy:e=>n(`backup`,`upsertDestinationPolicy`,`mutation`,e),previewSchedule:e=>n(`backup`,`previewSchedule`,`query`,e)},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)},decoder:{supportsCodec:e=>n(`decoder`,`supportsCodec`,`query`,e),getInfo:e=>n(`decoder`,`getInfo`,`query`,e),createSession:e=>n(`decoder`,`createSession`,`query`,e),destroySession:e=>n(`decoder`,`destroySession`,`query`,e),pushPacket:e=>n(`decoder`,`pushPacket`,`query`,e),openStream:e=>n(`decoder`,`openStream`,`query`,e),pullFrames:e=>n(`decoder`,`pullFrames`,`query`,e),pullHandles:e=>n(`decoder`,`pullHandles`,`query`,e),getFrame:e=>n(`decoder`,`getFrame`,`query`,e),getShmStats:e=>n(`decoder`,`getShmStats`,`query`,e),updateConfig:e=>n(`decoder`,`updateConfig`,`query`,e),getStats:e=>n(`decoder`,`getStats`,`query`,e),listActiveSessions:e=>n(`decoder`,`listActiveSessions`,`query`,e),reprobeHwaccel:e=>n(`decoder`,`reprobeHwaccel`,`mutation`,e)},deviceAdoption:{listCandidateFilters:e=>n(`deviceAdoption`,`listCandidateFilters`,`query`,e),listCandidates:e=>n(`deviceAdoption`,`listCandidates`,`query`,e),getCandidate:e=>n(`deviceAdoption`,`getCandidate`,`query`,e),refresh:e=>n(`deviceAdoption`,`refresh`,`mutation`,e),adopt:e=>n(`deviceAdoption`,`adopt`,`mutation`,e),release:e=>n(`deviceAdoption`,`release`,`mutation`,e),resync:e=>n(`deviceAdoption`,`resync`,`mutation`,e)},deviceExport:{getStatus:e=>n(`deviceExport`,`getStatus`,`query`,e),listSupportedDeviceKinds:e=>n(`deviceExport`,`listSupportedDeviceKinds`,`query`,e),listExposedDevices:e=>n(`deviceExport`,`listExposedDevices`,`query`,e),exposeDevice:e=>n(`deviceExport`,`exposeDevice`,`mutation`,e),unexposeDevice:e=>n(`deviceExport`,`unexposeDevice`,`mutation`,e)},deviceManager:{allocateDeviceId:e=>n(`deviceManager`,`allocateDeviceId`,`mutation`,e),registerDevice:e=>n(`deviceManager`,`registerDevice`,`mutation`,e),removeDevice:e=>n(`deviceManager`,`removeDevice`,`mutation`,e),persistConfig:e=>n(`deviceManager`,`persistConfig`,`mutation`,e),getRoleDisplayDefaults:e=>n(`deviceManager`,`getRoleDisplayDefaults`,`query`,e),setRoleDisplayDefaults:e=>n(`deviceManager`,`setRoleDisplayDefaults`,`mutation`,e),listLocations:e=>n(`deviceManager`,`listLocations`,`query`,e),addLocation:e=>n(`deviceManager`,`addLocation`,`mutation`,e),removeLocation:e=>n(`deviceManager`,`removeLocation`,`mutation`,e),listPersistedByAddon:e=>n(`deviceManager`,`listPersistedByAddon`,`query`,e),listAll:e=>n(`deviceManager`,`listAll`,`query`,e),getChildren:e=>n(`deviceManager`,`getChildren`,`query`,e),removeByIntegration:e=>n(`deviceManager`,`removeByIntegration`,`mutation`,e),listWrappersForCap:e=>n(`deviceManager`,`listWrappersForCap`,`query`,e),listBindableCapsForDeviceType:e=>n(`deviceManager`,`listBindableCapsForDeviceType`,`query`,e),discoverDevices:e=>n(`deviceManager`,`discoverDevices`,`mutation`,e),adoptDevice:e=>n(`deviceManager`,`adoptDevice`,`mutation`,e),getCreationSchema:e=>n(`deviceManager`,`getCreationSchema`,`query`,e),createDevice:e=>n(`deviceManager`,`createDevice`,`mutation`,e),testCreationField:e=>n(`deviceManager`,`testCreationField`,`mutation`,e),adoptionListCandidateFilters:e=>n(`deviceManager`,`adoptionListCandidateFilters`,`query`,e),adoptionListCandidates:e=>n(`deviceManager`,`adoptionListCandidates`,`query`,e),adoptionRefresh:e=>n(`deviceManager`,`adoptionRefresh`,`mutation`,e),adoptionAdopt:e=>n(`deviceManager`,`adoptionAdopt`,`mutation`,e),adoptionRelease:e=>n(`deviceManager`,`adoptionRelease`,`mutation`,e),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)},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),listRecentFaces:e=>n(`faceGallery`,`listRecentFaces`,`query`,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)},localNetwork:{list:e=>n(`localNetwork`,`list`,`query`,e),getPreferred:e=>n(`localNetwork`,`getPreferred`,`query`,e),getConnectionEndpoints:e=>n(`localNetwork`,`getConnectionEndpoints`,`query`,e),getAllowedAddresses:e=>n(`localNetwork`,`getAllowedAddresses`,`query`,e),setAllowedAddresses:e=>n(`localNetwork`,`setAllowedAddresses`,`mutation`,e),resetAllowlistToBestMatch:e=>n(`localNetwork`,`resetAllowlistToBestMatch`,`mutation`,e)},meshNetwork:{getStatus:e=>n(`meshNetwork`,`getStatus`,`query`,e),join:e=>n(`meshNetwork`,`join`,`mutation`,e),startLogin:e=>n(`meshNetwork`,`startLogin`,`mutation`,e),leave:e=>n(`meshNetwork`,`leave`,`mutation`,e),logout:e=>n(`meshNetwork`,`logout`,`mutation`,e),listPeers:e=>n(`meshNetwork`,`listPeers`,`query`,e),testConnection:e=>n(`meshNetwork`,`testConnection`,`mutation`,e)},metricsProvider:{collectSnapshot:e=>n(`metricsProvider`,`collectSnapshot`,`query`,e),getCached:e=>n(`metricsProvider`,`getCached`,`query`,e),getCurrent:e=>n(`metricsProvider`,`getCurrent`,`query`,e),getDiskSpace:e=>n(`metricsProvider`,`getDiskSpace`,`query`,e),getGpuInfo:e=>n(`metricsProvider`,`getGpuInfo`,`query`,e),getCpuTemperature:e=>n(`metricsProvider`,`getCpuTemperature`,`query`,e),getProcessStats:e=>n(`metricsProvider`,`getProcessStats`,`query`,e),listAddonInstances:e=>n(`metricsProvider`,`listAddonInstances`,`query`,e),getAddonStats:e=>n(`metricsProvider`,`getAddonStats`,`query`,e),listNodeProcesses:e=>n(`metricsProvider`,`listNodeProcesses`,`query`,e),killProcess:e=>n(`metricsProvider`,`killProcess`,`mutation`,e),dumpHeapSnapshot:e=>n(`metricsProvider`,`dumpHeapSnapshot`,`mutation`,e)},mqttBroker:{listBrokers:e=>n(`mqttBroker`,`listBrokers`,`query`,e),getBrokerConfig:e=>n(`mqttBroker`,`getBrokerConfig`,`query`,e),addBroker:e=>n(`mqttBroker`,`addBroker`,`mutation`,e),removeBroker:e=>n(`mqttBroker`,`removeBroker`,`mutation`,e),testConnection:e=>n(`mqttBroker`,`testConnection`,`mutation`,e),startEmbeddedBroker:e=>n(`mqttBroker`,`startEmbeddedBroker`,`mutation`,e),stopEmbeddedBroker:e=>n(`mqttBroker`,`stopEmbeddedBroker`,`mutation`,e),getStatus:e=>n(`mqttBroker`,`getStatus`,`query`,e)},networkAccess:{start:e=>n(`networkAccess`,`start`,`mutation`,e),stop:e=>n(`networkAccess`,`stop`,`mutation`,e),getEndpoint:e=>n(`networkAccess`,`getEndpoint`,`query`,e),getStatus:e=>n(`networkAccess`,`getStatus`,`query`,e),listEndpoints:e=>n(`networkAccess`,`listEndpoints`,`query`,e)},networkQuality:{getAllStats:e=>n(`networkQuality`,`getAllStats`,`query`,e)},nodes:{topology:e=>n(`nodes`,`topology`,`query`,e),deployAddon:e=>n(`nodes`,`deployAddon`,`mutation`,e),undeployAddon:e=>n(`nodes`,`undeployAddon`,`mutation`,e),restartAddon:e=>n(`nodes`,`restartAddon`,`mutation`,e),restartProcess:e=>n(`nodes`,`restartProcess`,`mutation`,e),restartNode:e=>n(`nodes`,`restartNode`,`mutation`,e),shutdownNode:e=>n(`nodes`,`shutdownNode`,`mutation`,e),renameNode:e=>n(`nodes`,`renameNode`,`mutation`,e),clusterAddonStatus:e=>n(`nodes`,`clusterAddonStatus`,`query`,e),getCapUsageGraph:e=>n(`nodes`,`getCapUsageGraph`,`query`,e),getNodeAddons:e=>n(`nodes`,`getNodeAddons`,`query`,e),setProcessLogLevel:e=>n(`nodes`,`setProcessLogLevel`,`mutation`,e),executeQuery:e=>n(`nodes`,`executeQuery`,`mutation`,e)},notificationOutput:{listTargetKinds:e=>n(`notificationOutput`,`listTargetKinds`,`query`,e),listTargets:e=>n(`notificationOutput`,`listTargets`,`query`,e),discoverTargets:e=>n(`notificationOutput`,`discoverTargets`,`query`,e),send:e=>n(`notificationOutput`,`send`,`mutation`,e),testTarget:e=>n(`notificationOutput`,`testTarget`,`mutation`,e),upsertTarget:e=>n(`notificationOutput`,`upsertTarget`,`mutation`,e),deleteTarget:e=>n(`notificationOutput`,`deleteTarget`,`mutation`,e),setTargetEnabled:e=>n(`notificationOutput`,`setTargetEnabled`,`mutation`,e)},pipelineExecutor:{getAvailableEngines:e=>n(`pipelineExecutor`,`getAvailableEngines`,`query`,e),getSelectedEngine:e=>n(`pipelineExecutor`,`getSelectedEngine`,`query`,e),getDefaultSteps:e=>n(`pipelineExecutor`,`getDefaultSteps`,`query`,e),reprobeEngine:e=>n(`pipelineExecutor`,`reprobeEngine`,`mutation`,e),getEngineProvisioning:e=>n(`pipelineExecutor`,`getEngineProvisioning`,`query`,e),getVideoPipelineSteps:e=>n(`pipelineExecutor`,`getVideoPipelineSteps`,`query`,e),setVideoPipelineSteps:e=>n(`pipelineExecutor`,`setVideoPipelineSteps`,`mutation`,e),clearDeviceOverrides:e=>n(`pipelineExecutor`,`clearDeviceOverrides`,`mutation`,e),getSchema:e=>n(`pipelineExecutor`,`getSchema`,`query`,e),getGlobalSteps:e=>n(`pipelineExecutor`,`getGlobalSteps`,`query`,e),getGlobalPipelineConfig:e=>n(`pipelineExecutor`,`getGlobalPipelineConfig`,`query`,e),getOrchestratorConfigSchema:e=>n(`pipelineExecutor`,`getOrchestratorConfigSchema`,`query`,e),validatePipeline:e=>n(`pipelineExecutor`,`validatePipeline`,`query`,e),listTemplates:e=>n(`pipelineExecutor`,`listTemplates`,`query`,e),saveTemplate:e=>n(`pipelineExecutor`,`saveTemplate`,`mutation`,e),updateTemplate:e=>n(`pipelineExecutor`,`updateTemplate`,`mutation`,e),deleteTemplate:e=>n(`pipelineExecutor`,`deleteTemplate`,`mutation`,e),getCapabilities:e=>n(`pipelineExecutor`,`getCapabilities`,`query`,e),getAddonModels:e=>n(`pipelineExecutor`,`getAddonModels`,`query`,e),downloadModel:e=>n(`pipelineExecutor`,`downloadModel`,`mutation`,e),deleteModel:e=>n(`pipelineExecutor`,`deleteModel`,`mutation`,e),cacheFrameInPool:e=>n(`pipelineExecutor`,`cacheFrameInPool`,`mutation`,e),inferCached:e=>n(`pipelineExecutor`,`inferCached`,`mutation`,e),uncacheFrame:e=>n(`pipelineExecutor`,`uncacheFrame`,`mutation`,e),getEffectiveTuning:e=>n(`pipelineExecutor`,`getEffectiveTuning`,`query`,e),listLoadedEngines:e=>n(`pipelineExecutor`,`listLoadedEngines`,`query`,e),spinEngine:e=>n(`pipelineExecutor`,`spinEngine`,`mutation`,e),killEngine:e=>n(`pipelineExecutor`,`killEngine`,`mutation`,e),listReferenceImages:e=>n(`pipelineExecutor`,`listReferenceImages`,`query`,e),getReferenceImage:e=>n(`pipelineExecutor`,`getReferenceImage`,`query`,e),getReferenceAudioFiles:e=>n(`pipelineExecutor`,`getReferenceAudioFiles`,`query`,e),getReferenceAudio:e=>n(`pipelineExecutor`,`getReferenceAudio`,`query`,e),getAudioCapabilities:e=>n(`pipelineExecutor`,`getAudioCapabilities`,`query`,e),runAudioTest:e=>n(`pipelineExecutor`,`runAudioTest`,`mutation`,e),getDetectionConfigSchema:e=>n(`pipelineExecutor`,`getDetectionConfigSchema`,`query`,e)},pipelineOrchestrator:{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),setAgentAddonDefaults:e=>n(`pipelineOrchestrator`,`setAgentAddonDefaults`,`mutation`,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),resetNodePipelineDefaults:e=>n(`pipelineOrchestrator`,`resetNodePipelineDefaults`,`mutation`,e),getCameraStatuses:e=>n(`pipelineOrchestrator`,`getCameraStatuses`,`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)},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)},recording:{getStorageUsage:e=>n(`recording`,`getStorageUsage`,`query`,e)},serverManagement:{getServerPackageStatus:e=>n(`serverManagement`,`getServerPackageStatus`,`query`,e),checkServerUpdate:e=>n(`serverManagement`,`checkServerUpdate`,`mutation`,e),applyServerUpdate:e=>n(`serverManagement`,`applyServerUpdate`,`mutation`,e),rollbackServerUpdate:e=>n(`serverManagement`,`rollbackServerUpdate`,`mutation`,e),restartServer:e=>n(`serverManagement`,`restartServer`,`mutation`,e)},settingsStore:{get:e=>n(`settingsStore`,`get`,`query`,e),set:e=>n(`settingsStore`,`set`,`mutation`,e),query:e=>n(`settingsStore`,`query`,`query`,e),insert:e=>n(`settingsStore`,`insert`,`mutation`,e),update:e=>n(`settingsStore`,`update`,`mutation`,e),delete:e=>n(`settingsStore`,`delete`,`mutation`,e),count:e=>n(`settingsStore`,`count`,`query`,e),histogram:e=>n(`settingsStore`,`histogram`,`query`,e),isEmpty:e=>n(`settingsStore`,`isEmpty`,`query`,e),declareCollection:e=>n(`settingsStore`,`declareCollection`,`mutation`,e)},storage:{resolve:e=>n(`storage`,`resolve`,`query`,e),write:e=>n(`storage`,`write`,`mutation`,e),read:e=>n(`storage`,`read`,`query`,e),exists:e=>n(`storage`,`exists`,`query`,e),list:e=>n(`storage`,`list`,`query`,e),delete:e=>n(`storage`,`delete`,`mutation`,e),getAvailableSpace:e=>n(`storage`,`getAvailableSpace`,`query`,e),beginUpload:e=>n(`storage`,`beginUpload`,`mutation`,e),writeChunk:e=>n(`storage`,`writeChunk`,`mutation`,e),finalizeUpload:e=>n(`storage`,`finalizeUpload`,`mutation`,e),abortUpload:e=>n(`storage`,`abortUpload`,`mutation`,e),beginDownload:e=>n(`storage`,`beginDownload`,`mutation`,e),readChunk:e=>n(`storage`,`readChunk`,`query`,e),endDownload:e=>n(`storage`,`endDownload`,`mutation`,e),listLocations:e=>n(`storage`,`listLocations`,`query`,e),getDefaultLocation:e=>n(`storage`,`getDefaultLocation`,`query`,e),listLocationDeclarations:e=>n(`storage`,`listLocationDeclarations`,`query`,e),upsertLocation:e=>n(`storage`,`upsertLocation`,`mutation`,e),deleteLocation:e=>n(`storage`,`deleteLocation`,`mutation`,e),testLocation:e=>n(`storage`,`testLocation`,`query`,e),listProviders:e=>n(`storage`,`listProviders`,`query`,e),testConfig:e=>n(`storage`,`testConfig`,`query`,e)},streamBroker:{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),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)},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 od=`device.state-changed`,sd=`capability.binding-changed`,cd=`device.registered`,ld=`device.unregistered`,ud=`device.updated`,dd=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=$u(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?td(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&&!fd(n,e.id)||e.stableId!==void 0&&(!i||!fd(i.stableId,e.stableId))||e.addonId!==void 0&&(!i||!fd(i.addonId,e.addonId))||e.type!==void 0&&(!i||!fd(i.type,e.type)))continue;if(e.caps!==void 0){let t=pd(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=pd(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||!md(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||!pd(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:od},{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:sd},{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:cd},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.refreshDeviceMetadata(t.deviceId,`added`)}})),this.bridges.push(e.subscribe({category:ld},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.applyDeviceRemoval(t.deviceId)}})),this.bridges.push(e.subscribe({category:ud},{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.getAllBindings.query({})).find(t=>t.deviceId===e);t?this.bindings.set(e,t):this.applyDeviceRemoval(e)}catch{}}async refreshDeviceMetadata(e,t){try{let n=(await this.api.deviceManager.listAll.query({})).find(t=>t.id===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 fd(e,t){return Array.isArray(t)?t.includes(e):e===t}function pd(e){return Array.isArray(e)?e:[e]}function md(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}var hd=y({id:a(),label:a(),icon:a(),path:a(),remoteName:a(),bundle:a(),section:a().optional(),sectionLabel:a().optional()}),gd=y({addonId:a(),page:hd,bundleUrl:a()}),_d={name:`addon-pages`,scope:`system`,mode:`singleton`,methods:{listPages:R(_(),h(gd).readonly())}},vd=y({id:a(),label:a(),icon:a(),path:a(),remoteName:a(),bundle:a(),section:a().optional(),sectionLabel:a().optional()}),yd={name:`addon-pages-source`,scope:`system`,mode:`collection`,internal:!0,methods:{listPages:R(_(),h(vd).readonly())}},bd=y({method:v([`GET`,`POST`,`PUT`,`DELETE`,`PATCH`]),path:a(),access:v([`public`,`authenticated`,`admin`]).optional(),description:a().optional()}),xd=y({method:a(),path:a(),params:o(a(),a()),query:o(a(),a()),body:r(),headers:o(a(),a()),user:y({id:a(),username:a(),isAdmin:m()}).optional(),scopedToken:r().optional()}),Sd=y({status:i().int(),headers:o(a(),a()),redirectUrl:a().nullable(),body:r().optional(),contentType:a().optional()}),Cd={name:`addon-routes`,scope:`system`,mode:`collection`,internal:!0,methods:{getRoutes:R(_(),h(bd)),invoke:R(xd,Sd,{kind:`mutation`})},mount:{kind:`skip`}},wd=y({id:a(),label:a(),icon:a(),order:i().optional()}),Td=y({id:a(),title:a(),description:a().optional(),style:v([`card`,`accordion`]).optional(),defaultCollapsed:m().optional(),columns:g([c(1),c(2),c(3),c(4)]).optional(),tab:a().optional(),location:v([`settings`,`top-tab`]).optional(),order:i().optional(),fields:h(ae())}),Q=y({tabs:h(wd).optional(),sections:h(Td)}),Ed=o(a(),r()),Dd=y({success:c(!0)}),Od={name:`addon-settings`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{getGlobalSettings:R(y({addonId:a(),nodeId:a().optional(),overlay:o(a(),r()).optional(),cap:a().optional()}),Q.nullable()),updateGlobalSettings:R(y({addonId:a(),nodeId:a().optional(),patch:Ed}),Dd,{kind:`mutation`,auth:`admin`}),getDeviceSettings:R(y({addonId:a(),deviceId:i(),nodeId:a().optional()}),Q.nullable()),updateDeviceSettings:R(y({addonId:a(),deviceId:i(),nodeId:a().optional(),patch:Ed}),Dd,{kind:`mutation`,auth:`admin`})}},kd=v([`device-tab`,`dashboard`,`integration-detail`]),Ad=v([`xs`,`sm`,`md`,`lg`,`xl`]),jd=y({remoteName:a(),exposedModule:a(),componentKey:a().optional()}),Md=y({tab:a(),subTab:a().optional(),label:a(),order:i().optional(),kind:c(`remote`),remote:jd,stableId:a(),description:a().optional(),icon:a().optional(),bundle:a(),hosts:h(kd).readonly(),requires:y({deviceContext:m().default(!1),integrationContext:m().default(!1)}),preAuth:m().optional().default(!1),defaultSize:Ad.default(`md`),allowedSizes:h(Ad).readonly().default([`sm`,`md`,`lg`]),defaultColumns:i().int().min(1).max(12).default(6),defaultRows:i().int().min(1).max(12).default(1)}),Nd={name:`addon-widgets-source`,scope:`system`,mode:`collection`,internal:!0,methods:{listWidgets:R(_(),h(Md).readonly())}},Pd=Md.extend({addonId:a(),bundleUrl:a()}),Fd={name:`addon-widgets`,scope:`system`,mode:`singleton`,methods:{listWidgets:R(_(),h(Pd).readonly())}},Id=y({staticDir:a()}),Ld=y({version:a()}),Rd={name:`admin-ui`,scope:`system`,mode:`singleton`,internal:!0,methods:{getStaticDir:R(_(),Id),getVersion:R(_(),Ld)}},zd=y({staticDir:a()}),Bd=y({version:a()}),Vd={name:`viewer-ui`,scope:`system`,mode:`singleton`,internal:!0,methods:{getStaticDir:R(_(),zd),getVersion:R(_(),Bd)}},Hd=y({deviceIds:h(i()).readonly().optional(),classNames:h(a()).readonly().optional(),zoneIds:h(a()).readonly().optional(),minConfidence:i().optional(),source:v([`pipeline`,`onboard`,`any`]).optional(),schedule:y({days:h(i()).readonly(),startHour:i(),endHour:i()}).optional(),cooldownSeconds:i().optional(),minDwellSeconds:i().optional(),eventTypeTokens:h(a()).readonly().optional(),clipDescription:y({text:a().min(1),minSimilarity:i().min(0).max(1)}).optional()}),Ud=y({title:a(),body:a(),imageMode:v([`crop`,`annotated`,`full`,`none`])}),Wd=y({id:a(),name:a(),enabled:m(),eventTypes:h(a()).readonly(),conditions:Hd,outputs:h(a()).readonly(),template:Ud.optional(),priority:v([`low`,`normal`,`high`,`critical`])}),Gd=y({ruleId:a(),eventId:a(),timestamp:i(),wouldFire:m(),reason:a().optional()}),Kd=y({id:a(),ruleId:a(),ruleName:a(),eventId:a(),timestamp:i(),outputs:h(a()).readonly(),success:m(),error:a().optional(),deviceId:i().optional()}),qd=y({ruleId:a().optional(),deviceId:i().optional(),from:i().optional(),to:i().optional(),limit:i().optional()}),Jd={name:`advanced-notifier`,scope:`system`,mode:`singleton`,internal:!0,methods:{getRules:R(_(),y({rules:h(Wd).readonly()})),upsertRule:R(y({rule:Wd}),y({success:c(!0)}),{kind:`mutation`}),deleteRule:R(y({ruleId:a()}),y({success:c(!0)}),{kind:`mutation`}),testRule:R(y({ruleId:a(),lookbackMinutes:i()}),y({results:h(Gd).readonly()}),{kind:`mutation`}),getHistory:R(y({filter:qd.optional()}),y({entries:h(Kd).readonly()}))}},Yd=v([`info`,`success`,`warning`,`error`]),Xd=v([`active`,`in-progress`,`completed`,`failed`,`dismissed`]),Zd=y({type:a(),id:a()}),Qd=y({id:a(),category:a(),severity:Yd,title:a(),message:a(),status:Xd,progress:i().optional(),read:m(),createdAt:i(),updatedAt:i(),source:Zd.optional(),metadata:o(a(),r()).optional()}),$d={name:`alerts`,scope:`system`,mode:`singleton`,methods:{emit:R(Qd,_(),{kind:`mutation`}),update:R(y({alertId:a(),patch:Qd.partial()}),_(),{kind:`mutation`}),list:R(y({unreadOnly:m().optional(),limit:i().optional()}).optional(),h(Qd).readonly()),getUnreadCount:R(_(),i()),markRead:R(y({alertId:a()}),_(),{kind:`mutation`}),markAllRead:R(_(),_(),{kind:`mutation`}),dismiss:R(y({alertId:a()}),_(),{kind:`mutation`})}},ef={name:`audio-analysis`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[F.Camera],exposesDeviceSettings:!0,methods:{resolveDeviceSettings:R(y({deviceId:i()}),u())},events:{onAudioLevel:z(y({deviceId:i(),rms:i(),dbfs:i()}))}},tf=y({level:Cs,classification:y({labels:h(ws).readonly(),inferenceMs:i()}).optional(),timestamp:i()}),nf=y({minConfidence:i().min(0).max(1).default(.3),allowedClasses:h(a()).default([])}),rf=y({labels:h(ws).readonly(),rawLabels:h(ws).readonly().optional(),inferenceMs:i()}),af=[{value:`auto`,label:`Auto (platform default)`},{value:`apple-soundanalysis`,label:`Apple SoundAnalysis (macOS 12+)`},{value:`yamnet-onnx`,label:`YAMNet ONNX (cross-platform)`}],of={audioBackend:`auto`,probedBestAudioBackend:``,selectedAudioModel:``},sf={name:`audio-analyzer`,scope:`system`,mode:`singleton`,methods:{analyseChunk:R(y({chunk:Ss,settings:nf}),tf.nullable(),{kind:`mutation`}),classify:R(Ss,rf,{timeoutMs:3e4}),isReady:R(_(),m()),dispose:R(_(),_(),{kind:`mutation`}),reprobeAudioEngine:R(_(),y({backend:a()}),{kind:`mutation`,auth:`admin`})}},cf=v([`f32le`,`s16le`]),lf=y({codec:a(),canDecode:m(),canEncode:m(),label:a().optional()}),uf=y({codec:a(),sourceSampleRate:i().int().positive(),sourceChannels:i().int().positive(),extraData:p(Uint8Array).optional(),targetSampleRate:i().int().positive(),targetChannels:i().int().positive(),targetFormat:cf.optional(),idleMs:i().int().positive().optional(),tag:a().optional()}),df=y({codec:a(),sourceSampleRate:i().int().positive(),sourceChannels:i().int().positive(),sourceFormat:cf.optional(),targetSampleRate:i().int().positive(),targetChannels:i().int().positive(),bitrateKbps:i().int().positive().optional(),idleMs:i().int().positive().optional(),tag:a().optional()}),ff=y({data:p(Uint8Array),sampleRate:i().int().positive(),channels:i().int().positive(),format:cf,pts:i()}),pf=y({data:p(Uint8Array),codec:a(),pts:i(),frameComplete:m()}),mf=y({sessionId:a(),kind:v([`decode`,`encode`]),codec:a(),sourceSampleRate:i(),sourceChannels:i(),targetSampleRate:i(),targetChannels:i(),format:cf,tag:a().optional(),createdAtMs:i(),lastActivityMs:i(),framesIn:i(),framesOut:i()}),hf={name:`audio-codec`,scope:`system`,mode:`singleton`,preferredProvider:`decoder-nodeav`,methods:{listSupportedCodecs:R(_(),h(lf).readonly()),canHandle:R(y({codec:a(),kind:v([`decode`,`encode`])}),m()),createDecodeSession:R(uf,y({sessionId:a(),nodeId:a()}),{kind:`mutation`}),createEncodeSession:R(df,y({sessionId:a(),nodeId:a()}),{kind:`mutation`}),closeSession:R(y({sessionId:a(),nodeId:a().optional()}),_(),{kind:`mutation`}),pushEncodedFrame:R(y({sessionId:a(),nodeId:a().optional(),data:p(Uint8Array),pts:i().optional()}),_(),{kind:`mutation`}),pullPcm:R(y({sessionId:a(),nodeId:a().optional(),maxCount:i().int().positive().default(8)}),h(ff)),pushPcm:R(y({sessionId:a(),nodeId:a().optional(),data:p(Uint8Array),pts:i().optional()}),_(),{kind:`mutation`}),pullEncoded:R(y({sessionId:a(),nodeId:a().optional(),maxCount:i().int().positive().default(8)}),h(pf)),flushEncode:R(y({sessionId:a(),nodeId:a().optional()}),h(pf),{kind:`mutation`}),listActiveSessions:R(_(),h(mf).readonly())}},gf=y({userId:a(),username:a(),email:a().optional(),displayName:a().optional(),isAdmin:m().default(!1)}),_f={name:`auth-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{validateCredentials:R(y({username:a(),password:a()}),gf.nullable(),{kind:`mutation`}),getLoginUrl:R(y({state:a()}),a()),handleCallback:R(o(a(),a()),gf,{kind:`mutation`}),validateToken:R(y({token:a()}),gf.nullable())},mount:{kind:`skip`}},vf=v([`primary`,`second-factor`]),yf=y({kind:c(`redirect`),id:a(),label:a(),icon:a().optional(),startUrl:a(),stage:vf}),bf=y({kind:c(`widget`),id:a(),addonId:a(),bundle:a(),remote:jd,stage:vf}),xf=b(`kind`,[yf,bf]),Sf={name:`login-method`,scope:`system`,mode:`collection`,internal:!0,methods:{getLoginMethods:R(_(),h(xf).readonly())},mount:{kind:`skip`}},Cf=y({subId:a(),displayName:a(),description:a().optional(),kind:a(),triggerSupported:m(),restoreSupported:m()}).extend({id:a(),addonId:a(),enabled:m(),retentionCount:i(),label:a().optional(),lastSuccessAt:i().optional(),lastSuccessSizeBytes:i().optional(),cron:a().optional(),nextRunAt:i().optional(),lastRunAt:i().optional()}),wf=y({id:a(),filename:a(),createdAt:i(),sizeBytes:i(),label:a().optional(),locations:h(a()).readonly()}),Tf=y({id:a(),destinationId:a().optional(),label:a().optional(),createdAt:i(),sizeBytes:i(),locations:h(a()).optional()}),Ef=y({path:a(),kind:v([`file`,`dir`,`symlink`]),sizeBytes:i(),mtime:i()}),Df=y({archiveVersion:c(1),createdAt:i(),dataDir:a(),locations:h(a()),entries:h(Ef),totalBytes:i(),totalFiles:i()}),Of=y({name:a(),sizeBytes:i(),fileCount:i(),present:m()}),kf={name:`backup`,scope:`system`,mode:`singleton`,methods:{listDestinations:R(_(),h(Cf).readonly(),{auth:`admin`}),trigger:R(y({destinations:h(a()).optional(),locations:h(a()).optional(),label:a().optional()}).optional(),h(Tf).readonly(),{kind:`mutation`,auth:`admin`}),list:R(_(),h(Tf).readonly(),{auth:`admin`}),listLocations:R(_(),h(Of).readonly(),{auth:`admin`}),getEntries:R(y({destinationId:a(),backupId:a()}),Df.nullable(),{auth:`admin`}),restore:R(y({destinationId:a(),backupId:a(),locations:h(a()).optional()}),_(),{kind:`mutation`,auth:`admin`}),delete:R(y({destinationId:a(),backupId:a()}),_(),{kind:`mutation`,auth:`admin`}),listArchives:R(y({destinationId:a()}),h(wf).readonly(),{auth:`admin`}),upsertDestinationPolicy:R(y({locationId:a(),enabled:m(),retentionCount:i().int().min(1).max(1e3),label:a().optional(),cron:a().optional()}),_(),{kind:`mutation`,auth:`admin`}),previewSchedule:R(y({cron:a(),count:i().int().min(1).max(20).optional()}),y({ok:m(),error:a().optional(),nextRuns:h(i()).readonly()}))}},Af=v([`connected`,`disconnected`,`connecting`,`auth-failed`,`unreachable`,`error`]),jf=y({id:a(),addonId:a(),name:a(),kind:a(),status:Af,info:o(a(),r()),lastCheckedAt:i().nullable(),error:a().nullable()}),Mf=y({brokerCount:i().int().nonnegative(),connectedCount:i().int().nonnegative()}),Nf=y({addonId:a(),kinds:h(y({kind:a(),label:a()}))}),Pf=y({kind:a().optional()}),Ff=y({id:a()}),If=y({kind:a().min(1),name:a().min(1),settings:o(a(),r())}),Lf=y({id:a()}),Rf=y({id:a()}),zf=b(`ok`,[y({ok:c(!0),latencyMs:i().nonnegative()}),y({ok:c(!1),error:a()})]),Bf=o(a(),r()),Vf=y({kind:a()}),Hf=y({kind:a(),settings:Bf}),Uf=b(`ok`,[y({ok:c(!0),latencyMs:i().nonnegative().optional()}).strict(),y({ok:c(!1),error:a()})]),Wf=r().nullable(),Gf=y({brokerId:a(),target:o(a(),r()),payload:r().optional()}),Kf=y({brokerId:a(),filter:o(a(),r())}),qf=y({subscriptionId:a()}),Jf=y({brokerId:a(),subscriptionId:a()}),Yf=y({brokerId:a(),key:a()}),Xf={name:`broker`,scope:`system`,mode:`collection`,providerKind:`broker`,status:{schema:Mf,kind:`poll`},methods:{list:R(Pf,h(jf)),get:R(Ff,jf.nullable()),listProviders:R(_(),h(Nf),{auth:`admin`}),add:R(If,Lf,{kind:`mutation`,auth:`admin`}),remove:R(Rf,_(),{kind:`mutation`,auth:`admin`}),testConnection:R(Ff,zf,{kind:`mutation`,auth:`admin`}),getSettings:R(Ff,Bf.nullable(),{auth:`admin`}),setSettings:R(y({id:a(),settings:Bf}),_(),{kind:`mutation`,auth:`admin`}),getBrokerConfig:R(Ff,Bf.nullable(),{auth:`admin`}),getSettingsSchema:R(Vf,Wf,{auth:`admin`}),testSettings:R(Hf,Uf,{kind:`mutation`,auth:`admin`}),publish:R(Gf,r(),{kind:`mutation`,auth:`admin`}),subscribe:R(Kf,qf,{kind:`mutation`,auth:`admin`}),unsubscribe:R(Jf,_(),{kind:`mutation`,auth:`admin`}),getState:R(Yf,r().nullable()),getStatus:R(_(),Mf)}},Zf={name:`camera-pipeline-config`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[F.Camera],exposesDeviceSettings:!0,methods:{}};function Qf(e){let t=e._def;return e.constructor?.name===`ZodVoid`||t?.type===`void`||t?.typeName===`ZodVoid`}function $f(e){let t=e._def;return e.constructor?.name===`ZodObject`||t?.type===`object`||t?.typeName===`ZodObject`}function ep(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 tp(e){let t=e.loose;return typeof t==`function`?t.call(e):e}function np(e){return e===`public`?`public`:e===`admin`||e===`superAdmin`?`admin`:`protected`}function rp(e){return e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function ip(e){return e}function ap(e,t,n){return{input:e,output:t,kind:n?.kind??`query`,auth:n?.auth??`protected`,scope:n?.scope??{kind:`system`}}}function op(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 sp=y({stepId:a(),entry:Ce}),cp={name:`custom-model-registry`,scope:`system`,mode:`collection`,internal:!0,methods:{listModels:R(_(),h(sp).readonly())}},lp=[{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)`}],up={hwaccel:`auto`,probedBestHwaccel:``},dp=y({sessionId:a(),slotCount:i().int(),slotByteLength:i().int(),segmentBytes:i().int(),budgetMb:i().int(),framesWritten:i().int(),getFrameHits:i().int(),getFrameMisses:i().int()}),fp={name:`decoder`,scope:`system`,mode:`singleton`,preferredProvider:`decoder-nodeav`,methods:{supportsCodec:R(y({codec:a()}),m()),getInfo:R(_(),y({id:a(),name:a(),isPullMode:m().optional(),priority:i().optional(),hwaccel:a().optional(),probedBestHwaccel:a().optional()})),createSession:R(Fn,y({sessionId:a(),nodeId:a()})),destroySession:R(y({sessionId:a()}),_()),pushPacket:R(y({sessionId:a(),packet:Ft}),_()),openStream:R(y({sessionId:a(),url:a()}),_()),pullFrames:R(y({sessionId:a(),maxCount:i().default(1),waitMs:i().optional()}),h(It)),pullHandles:R(y({sessionId:a(),maxCount:i().default(1),waitMs:i().optional()}),h(Lt)),getFrame:R(y({handle:Lt}),It.nullable()),getShmStats:R(y({sessionId:a()}),dp.nullable()),updateConfig:R(y({sessionId:a(),config:Fn.partial()}),_()),getStats:R(y({sessionId:a()}),Pn),listActiveSessions:R(_(),h(y({sessionId:a(),codec:a(),outputFormat:a(),createdAtMs:i()})).readonly()),reprobeHwaccel:R(_(),y({backend:a()}),{kind:`mutation`,auth:`admin`})}},pp={name:`detection-pipeline`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[F.Camera],exposesDeviceSettings:!0,methods:{}},mp=y({id:a(),label:a(),isDefault:m().optional()}),hp=y({search:a().optional(),area:a().optional(),manufacturer:a().optional(),adoptedOnly:m().optional(),unadoptedOnly:m().optional()}),gp=y({integrationId:a(),page:i().int().positive().default(1),pageSize:i().int().positive().max(2e4).default(50),filter:a().optional(),filterText:hp.optional()}),_p=y({candidates:h(V).readonly(),totalCount:i().int().nonnegative(),page:i().int().positive(),pageSize:i().int().positive()}),vp=y({integrationId:a(),childNativeId:a()}),yp=y({lastDiscoveryAt:i().int().nonnegative().nullable(),candidateCount:i().int().nonnegative(),adoptedCount:i().int().nonnegative(),lastError:a().nullable()}),bp=y({name:a().min(1).optional(),hiddenChildIds:h(a()).optional()}),xp=y({integrationId:a(),childNativeIds:h(a()).min(1),filter:a().optional(),importLocations:m().optional(),perCandidate:o(a(),bp).optional()}),Sp=y({adopted:h(y({childNativeId:a(),parentDeviceId:i().int().nonnegative(),accessoryDeviceIds:h(i().int().nonnegative()).readonly()})).readonly()}),Cp=y({integrationId:a(),camDeviceId:i().int().nonnegative()}),wp=y({camDeviceId:i().int().nonnegative(),resetToSource:m().optional()}),Tp=y({changed:m(),rebuiltChildren:i().int().nonnegative(),removedChildren:i().int().nonnegative().optional()}),Ep={name:`device-adoption`,scope:`system`,mode:`singleton`,status:{schema:yp,kind:`poll`},methods:{listCandidateFilters:R(y({integrationId:a()}),y({filters:h(mp)}),{auth:`admin`}),listCandidates:R(gp,_p,{auth:`admin`}),getCandidate:R(vp,V.nullable(),{auth:`admin`}),refresh:R(y({integrationId:a()}),yp,{kind:`mutation`,auth:`admin`}),adopt:R(xp,Sp,{kind:`mutation`,auth:`admin`}),release:R(Cp,_(),{kind:`mutation`,auth:`admin`}),resync:R(wp,Tp,{kind:`mutation`,auth:`admin`})}},Dp=v([`unlinked`,`linked`,`error`]),Op=y({label:a(),value:a(),secret:m().optional()}),kp=y({qr:a().optional(),fields:h(Op).readonly().optional(),note:a().optional()}),Ap=y({linkState:Dp,exposedDeviceCount:i(),error:a().optional(),setup:kp.optional()}),jp=a(),Mp=y({deviceId:a(),exposedAs:a().optional(),capabilities:h(a()).optional()}),Np=y({deviceId:a(),capabilities:h(a()).optional()}),Pp=y({deviceId:a()}),Fp={name:`device-export`,scope:`system`,mode:`collection`,providerKind:`device-export`,status:{schema:Ap,kind:`poll`},exposesDeviceSettings:!0,methods:{getStatus:R(_(),Ap),listSupportedDeviceKinds:R(_(),h(jp)),listExposedDevices:R(_(),h(Mp)),exposeDevice:R(Np,_(),{kind:`mutation`}),unexposeDevice:R(Pp,_(),{kind:`mutation`})}},Ip=y({childKey:a(),section:a(),order:i().optional(),collapsed:m().optional()}),Lp=y({kind:c(`field`).optional(),sourceKey:a(),cap:a(),fieldPath:a()}),Rp=y({kind:c(`literal`),value:g([a(),i(),m(),te()])}),zp=y({kind:c(`global`),sourceStableId:a(),cap:a(),fieldPath:a()}),Bp=y({kind:c(`expression`),expr:a().min(1).max(Mr),bindings:o(a().regex(Pr),g([Lp,Rp,zp]))}).superRefine((e,t)=>{let n=mi(e);n!==null&&t.addIssue({code:`custom`,message:n,path:[`expr`]})}),Vp=y({id:a(),source:g([Lp,Rp,zp,Bp]),target:y({cap:a(),fieldPath:a(),itemKey:a().optional()}),transform:b(`kind`,[y({kind:c(`identity`)}),y({kind:c(`enum-map`),mapping:o(a(),g([a(),i(),m()])),fallback:g([a(),i(),m()]).optional()}),y({kind:c(`linear`),scale:i(),offset:i(),clamp:s([i(),i()]).readonly().optional()})]).optional()}),Hp=y({unit:a().min(1).optional(),precision:i().int().min(0).max(10).optional()}),Up=y({icon:a().min(1).optional(),label:a().min(1).optional(),unit:a().min(1).optional(),precision:i().int().min(0).max(10).optional(),hidden:m().optional(),perCap:o(a(),Hp).optional()}),Wp=y({unit:a().min(1).optional(),precision:i().int().min(0).max(10).optional(),icon:a().min(1).optional()}),Gp=y({id:i(),stableId:a(),addonId:a(),type:v(F),name:a(),location:a().nullable(),disabled:m(),parentDeviceId:i().nullable(),role:a().nullable().optional(),online:m(),probed:m().optional(),features:h(a()),isCamera:m(),config:o(a(),r()),metadata:o(a(),r()).nullable().optional(),sourceInfo:B.optional(),integrationId:a().optional(),linkDeviceId:i().nullable().optional(),primaryChildEntityId:a().nullable().optional(),childLayout:h(Ip).readonly().optional(),deviceLinks:h(Vp).readonly().optional(),display:Up.optional()}),Kp=y({key:a(),value:r(),description:a().optional()}),qp=y({id:i(),stableId:a(),type:a(),name:a(),location:a().nullable(),disabled:m(),parentDeviceId:i().nullable(),role:a().nullable().optional()}),Jp=y({id:i(),stableId:a(),addonId:a(),type:a(),name:a(),userNamed:m().optional(),location:a().nullable(),disabled:m(),parentDeviceId:i().nullable(),metadata:o(a(),r()).nullable().optional(),sourceInfo:B.optional(),integrationId:a().optional(),linkDeviceId:i().nullable().optional(),primaryChildEntityId:a().nullable().optional(),childLayout:h(Ip).readonly().optional(),deviceLinks:h(Vp).readonly().optional(),role:a().nullable().optional(),display:Up.optional()}),Yp=r().nullable(),Xp=y({streamId:a(),width:i().optional(),height:i().optional(),codec:a().optional(),fps:i().optional(),bitrateKbps:i().optional()}),Zp=y({addonId:a(),stableId:a(),id:i(),type:a(),name:a(),location:a().nullable().optional(),disabled:m().optional(),parentDeviceId:i().nullable(),role:a().nullable().optional(),features:h(a()).optional(),config:o(a(),r())}),Qp=y({deviceId:i()}),$p=y({deviceId:i(),data:o(a(),r())}),em={name:`device-manager`,scope:`system`,mode:`singleton`,methods:{allocateDeviceId:R(y({addonId:a(),stableId:a()}),y({id:i()}),{kind:`mutation`}),registerDevice:R(Zp,_(),{kind:`mutation`}),removeDevice:R(Qp,_(),{kind:`mutation`}),persistConfig:R($p,_(),{kind:`mutation`}),loadConfig:R(y({deviceId:i()}),o(a(),r())),loadRuntimeState:R(y({deviceId:i()}),o(a(),r())),loadMeta:R(y({deviceId:i()}),Jp.nullable()),setName:R(y({deviceId:i(),name:a()}),_(),{kind:`mutation`,auth:`admin`}),setLocation:R(y({deviceId:i(),location:a().nullable()}),_(),{kind:`mutation`,auth:`admin`}),setType:R(y({deviceId:i(),type:v(F)}),_(),{kind:`mutation`,auth:`admin`}),setIntegrationId:R(y({deviceId:i(),integrationId:a()}),_(),{kind:`mutation`,auth:`admin`}),setLinkDeviceId:R(y({deviceId:i(),linkDeviceId:i().nullable()}),_(),{kind:`mutation`,auth:`admin`}),setPrimaryChildEntityId:R(y({deviceId:i(),primaryChildEntityId:a().nullable()}),_(),{kind:`mutation`,auth:`admin`}),setChildLayout:R(y({deviceId:i(),childLayout:h(Ip).readonly()}),_(),{kind:`mutation`,auth:`admin`}),setDeviceLinks:R(y({deviceId:i(),deviceLinks:h(Vp).readonly()}),_(),{kind:`mutation`,auth:`admin`}),setDisplay:R(y({deviceId:i(),display:Up.nullable()}),_(),{kind:`mutation`,auth:`admin`}),getRoleDisplayDefaults:R(y({}),y({defaults:o(a(),Wp)}),{kind:`query`}),setRoleDisplayDefaults:R(y({defaults:o(a(),Wp)}),_(),{kind:`mutation`,auth:`admin`}),getWireableFields:R(y({deviceId:i(),includeSynthesizable:m().optional()}),y({caps:h(y({cap:a(),fields:h(y({path:a(),kind:v([`string`,`number`,`boolean`,`enum`]),enumValues:h(a()).optional(),item:m().optional()})).readonly(),itemArray:y({path:a(),keyField:a()}).optional()})).readonly()}),{kind:`query`}),setRole:R(y({deviceId:i(),role:a().nullable()}),_(),{kind:`mutation`,auth:`admin`}),applyInitialMeta:R(y({deviceId:i(),name:a().optional(),location:a().nullable().optional(),type:v(F).optional(),integrationId:a().optional(),linkDeviceId:i().nullable().optional(),role:a().nullable().optional()}),_(),{kind:`mutation`,auth:`admin`}),setMetadata:R(y({deviceId:i(),patch:o(a(),r())}),_(),{kind:`mutation`,auth:`admin`}),listLocations:R(_(),h(a())),addLocation:R(y({name:a()}),_(),{kind:`mutation`,auth:`admin`}),removeLocation:R(y({name:a(),cascade:m().optional()}),_(),{kind:`mutation`,auth:`admin`}),setDisabled:R(y({deviceId:i(),disabled:m()}),_(),{kind:`mutation`,auth:`admin`}),listPersistedByAddon:R(y({addonId:a()}),h(qp)),listAll:R(y({addonId:a().optional()}),h(Gp)),getDevice:R(y({deviceId:i()}),Gp.nullable()),getChildren:R(y({parentDeviceId:i()}),h(Gp)),getStreamSources:R(y({deviceId:i()}),h(Nt)),getConfigSchema:R(y({deviceId:i()}),h(Kp)),getSettingsSchema:R(y({deviceId:i()}),Yp),updateConfig:R(y({deviceId:i(),values:o(a(),r())}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),enable:R(y({deviceId:i()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),disable:R(y({deviceId:i()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),remove:R(y({deviceId:i()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),removeByIntegration:R(y({integrationId:a()}),y({removed:i()}),{kind:`mutation`,auth:`admin`}),getStreamProfileMap:R(y({deviceId:i()}),o(a(),a().nullable())),setStreamProfileMap:R(y({deviceId:i(),profileMap:o(a(),a().nullable())}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),probeStreams:R(y({deviceId:i()}),h(Xp),{kind:`mutation`,auth:`admin`}),getBindings:R(y({deviceId:i()}),y({deviceId:i(),entries:h(y({capName:a(),kind:v([`native`,`wrapped`,`linked`]),providerAddonId:a(),providerNodeId:a(),nativeAddonId:a()}))})),getAllBindings:R(y({}),h(y({deviceId:i(),entries:h(y({capName:a(),kind:v([`native`,`wrapped`,`linked`]),providerAddonId:a(),providerNodeId:a(),nativeAddonId:a()}))}))),setWrapperActive:R(y({deviceId:i(),capName:a(),wrapperAddonId:a(),active:m()}),_(),{kind:`mutation`,auth:`admin`}),listWrappersForCap:R(y({capName:a()}),h(a())),listBindableCapsForDeviceType:R(y({deviceType:a()}),h(y({capName:a(),wrappers:h(a())}))),getDeviceSettingsAggregate:R(y({deviceId:i()}),Q.nullable()),getDeviceLiveInfoAggregate:R(y({deviceId:i()}),Q.nullable()),getDeviceAggregate:R(y({deviceId:i()}),y({settings:Q.nullable(),live:Q.nullable()})),runDeviceAction:R(y({deviceId:i().int().nonnegative(),action:a().min(1),input:r()}),r(),{kind:`mutation`}),updateDeviceField:R(y({deviceId:i(),writerCapName:a(),writerAddonId:a(),key:a(),value:r()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),updateDeviceFieldsBatch:R(y({deviceId:i(),changes:h(y({writerCapName:a(),writerAddonId:a(),key:a(),value:r()}))}),y({success:c(!0),failures:h(y({writerCapName:a(),writerAddonId:a(),error:a()}))}),{kind:`mutation`,auth:`admin`}),discoverDevices:R(y({addonId:a()}),h(Tu),{kind:`mutation`,auth:`admin`}),adoptDevice:R(y({addonId:a(),candidate:Tu,integrationId:a().optional()}),Eu,{kind:`mutation`,auth:`admin`}),getCreationSchema:R(y({addonId:a(),type:v(F)}),r().nullable()),createDevice:R(y({addonId:a(),type:v(F),config:o(a(),r()),integrationId:a().optional()}),Eu,{kind:`mutation`,auth:`admin`}),testCreationField:R(y({addonId:a(),type:v(F),key:a(),value:r(),formValues:o(a(),r()).optional()}),Du,{kind:`mutation`,auth:`admin`}),adoptionListCandidateFilters:R(y({addonId:a(),integrationId:a()}),y({filters:h(mp)}),{auth:`admin`}),adoptionListCandidates:R(gp.extend({addonId:a()}),_p,{auth:`admin`}),adoptionRefresh:R(y({addonId:a(),integrationId:a()}),yp,{kind:`mutation`,auth:`admin`}),adoptionAdopt:R(xp.extend({addonId:a()}),Sp,{kind:`mutation`,auth:`admin`}),adoptionRelease:R(Cp.extend({addonId:a()}),_(),{kind:`mutation`,auth:`admin`}),adoptionResync:R(wp,Tp,{kind:`mutation`,auth:`admin`}),discoveryProviders:R(y({}),y({providers:h(y({addonId:a(),label:a()})).readonly()}),{auth:`admin`}),discoverAllProviders:R(y({}),y({groups:h(y({addonId:a(),label:a(),candidates:h(Tu).readonly(),error:a().nullable()})).readonly()}),{kind:`mutation`,auth:`admin`}),discoverProvider:R(y({addonId:a(),params:o(a(),r()).optional()}),y({candidates:h(Tu).readonly()}),{kind:`mutation`,auth:`admin`}),providerCreationType:R(y({addonId:a()}),y({deviceType:v(F).nullable()}),{auth:`admin`}),providerDiscoveryParamsSchema:R(y({addonId:a()}),r(),{auth:`admin`}),testField:R(y({deviceId:i(),key:a(),value:r()}),Du,{kind:`mutation`,auth:`admin`}),getDeviceStatusAggregate:R(y({deviceId:i(),caps:h(a()).readonly().optional()}),o(a(),r().nullable()))}},tm={name:`device-state`,scope:`system`,mode:`singleton`,methods:{getSnapshot:R(y({deviceId:i()}),o(a(),o(a(),r()))),getCapSlice:R(y({deviceId:i(),capName:a()}),o(a(),r()).nullable()),getAllSnapshots:R(y({}),o(a(),o(a(),o(a(),r())))),setCapSlice:R(y({deviceId:i(),capName:a(),slice:o(a(),r())}),_(),{kind:`mutation`})},events:{onChanged:z(y({deviceId:i(),capName:a(),slice:o(a(),r())}))}},nm=y({embedding:h(i()),inferenceMs:i()}),rm=y({modelId:a(),embeddingDim:i(),ready:m()}),im={name:`embedding-encoder`,scope:`system`,mode:`collection`,internal:!0,methods:{encode:R(y({crop:p(Uint8Array),width:i(),height:i()}),nm),encodeText:R(y({text:a()}),nm),getInfo:R(_(),rm)}},am=y({name:a(),path:a()}),om=y({path:a(),entries:h(am).readonly(),freeBytes:i(),totalBytes:i()}),sm={name:`filesystem-browse`,scope:`system`,mode:`singleton`,internal:!0,methods:{listAllowedRoots:R(_(),h(a()).readonly(),{auth:`admin`}),browse:R(y({path:a()}),om,{auth:`admin`}),createDir:R(y({path:a()}),y({path:a()}),{kind:`mutation`,auth:`admin`})}},cm=v([`debug`,`info`,`warn`,`error`]),lm=y({timestamp:de(),level:cm,scope:h(a()),message:a(),meta:o(a(),r()).optional(),tags:o(a(),a()).optional()}),um={name:`log-destination`,scope:`system`,mode:`collection`,internal:!0,methods:{write:R(lm,_(),{kind:`mutation`}),query:R(y({scope:h(a()).optional(),level:cm.optional(),since:de().optional(),until:de().optional(),limit:i().optional(),tags:o(a(),a()).optional()}),h(lm).readonly())},mount:{kind:`skip`}},dm=y({total:i(),user:i(),system:i(),irq:i(),nice:i(),loadAvg:s([i(),i(),i()]),cores:i()}),fm=y({percent:i(),totalBytes:i(),usedBytes:i(),availableBytes:i(),swapUsedBytes:i(),swapTotalBytes:i()}),pm=y({readBytes:i(),writeBytes:i(),readOps:i(),writeOps:i(),timestampMs:i()}),mm=y({rxBytes:i(),txBytes:i(),rxPackets:i(),txPackets:i(),rxErrors:i(),txErrors:i(),timestampMs:i()}),hm=y({utilization:i(),model:a(),memoryUsedBytes:i(),memoryTotalBytes:i(),temperature:i().nullable()}),gm=y({openFds:i(),threadCount:i(),activeHandles:i(),activeRequests:i()}),_m=y({avg10:i(),avg60:i(),avg300:i()}),vm=y({some:_m,full:_m.nullable()}),ym=y({cpu:dm,memory:fm,gpu:hm.nullable(),network:mm,disk:pm,pressure:y({cpu:vm.nullable(),memory:vm.nullable(),io:vm.nullable()}),process:gm,cpuTemperature:i().nullable(),timestampMs:i()}),bm=y({path:a(),totalBytes:i(),usedBytes:i(),availableBytes:i(),percent:i()}),xm=y({pid:i(),cpu:i(),memory:i(),privateBytes:i().optional(),sharedBytes:i().optional()}),Sm=y({addonId:a(),nodeId:a(),role:v([`hub`,`worker`]),pid:i(),state:v([`starting`,`running`,`stopping`,`stopped`,`crashed`]),uptimeSec:i()}),Cm=y({pid:i(),ppid:i(),pgid:i(),classification:v([`root`,`managed`,`system`,`ghost`]),addonId:a().nullable(),nodeId:a().nullable(),command:a(),cpuPercent:i(),memoryRssBytes:i(),uptimeSec:i(),orphaned:m()}),wm=y({pid:i(),force:m().optional()}),Tm=y({success:m(),reason:a().optional(),signal:v([`SIGTERM`,`SIGKILL`]).optional()}),Em=y({addonId:a()}),Dm=y({success:m(),path:a().optional(),pid:i().optional(),reason:a().optional()}),Om=y({cpuPercent:i(),memoryPercent:i(),memoryUsedMB:i(),memoryTotalMB:i(),diskPercent:i().optional(),temperature:i().optional(),gpuPercent:i().optional(),gpuMemoryPercent:i().optional()}),km={name:`metrics-provider`,scope:`system`,mode:`singleton`,methods:{collectSnapshot:R(_(),ym),getCached:R(_(),ym.nullable()),getCurrent:R(_(),Om),getDiskSpace:R(y({dirPath:a()}),bm),getGpuInfo:R(_(),hm.nullable()),getCpuTemperature:R(_(),i().nullable()),getProcessStats:R(y({pids:h(i())}),h(xm)),listAddonInstances:R(_(),h(Sm).readonly()),getAddonStats:R(y({addonId:a()}),xm.nullable()),listNodeProcesses:R(_(),h(Cm).readonly()),killProcess:R(wm,Tm,{kind:`mutation`,auth:`admin`}),dumpHeapSnapshot:R(Em,Dm,{kind:`mutation`,auth:`admin`})}},Am=y({sourceUrl:a(),metadata:Te,targets:h(we).min(1).readonly(),calibrationRef:a().optional(),sessionId:a().optional()}),jm={name:`model-convert`,scope:`system`,mode:`singleton`,internal:!0,methods:{convert:R(Am,De,{kind:`mutation`,auth:`admin`,timeoutMs:6e5})}},Mm=y({nodeId:a(),modelId:a(),format:v(ye),entry:Ce}),Nm=y({ok:m(),sha256:a(),bytes:i(),path:a()}),Pm={name:`model-distributor`,scope:`system`,mode:`singleton`,internal:!0,methods:{distributeModel:R(Mm,Nm,{kind:`mutation`,auth:`admin`})}},Fm=v([`external`,`embedded`]),Im=v([`connected`,`disconnected`,`auth-failed`,`unreachable`,`tls-error`]),Lm=y({id:a(),name:a(),url:a(),kind:Fm,status:Im,latencyMs:i().nullable(),error:a().optional(),connectedClients:i().int().nonnegative().optional(),lastCheckedAt:i().optional()}),Rm=y({url:a(),username:a().optional(),password:a().optional(),clientIdPrefix:a().optional()}),zm=y({name:a().min(1),url:a().regex(/^(mqtt|mqtts|ws|wss):\/\//,`URL must start with mqtt(s):// or ws(s)://`),username:a().optional(),password:a().optional(),clientIdPrefix:a().optional()}),Bm=y({id:a()}),Vm=y({id:a()}),Hm=b(`ok`,[y({ok:c(!0),latencyMs:i()}),y({ok:c(!1),error:a()})]),Um=y({port:i().int().min(1).max(65535).default(1883),allowAnonymous:m().default(!1),username:a().optional(),password:a().optional()}),Wm=y({id:a(),url:a()}),Gm=y({brokerCount:i(),embeddedRunning:m()}),Km={name:`mqtt-broker`,scope:`system`,mode:`collection`,providerKind:`broker`,status:{schema:Gm,kind:`poll`},methods:{listBrokers:R(_(),h(Lm)),getBrokerConfig:R(Vm,Rm),addBroker:R(zm,Bm,{kind:`mutation`}),removeBroker:R(Vm,_(),{kind:`mutation`}),testConnection:R(Vm,Hm,{kind:`mutation`}),startEmbeddedBroker:R(Um,Wm,{kind:`mutation`}),stopEmbeddedBroker:R(Vm,_(),{kind:`mutation`}),getStatus:R(_(),Gm)}},qm=y({url:a(),hostname:a(),port:i(),protocol:v([`http`,`https`])}),Jm=y({connected:m(),endpoint:qm.nullable(),error:a().optional()}),Ym=qm.extend({id:a(),label:a(),mode:a().optional(),sourcePort:i().optional()}),Xm={name:`network-access`,scope:`system`,mode:`collection`,providerKind:`ingress`,methods:{start:R(_(),qm,{kind:`mutation`}),stop:R(_(),_(),{kind:`mutation`}),getEndpoint:R(_(),qm.nullable()),getStatus:R(_(),Jm),listEndpoints:R(_(),h(Ym).readonly())}},Zm=v([`image`,`video`,`gif`,`audio`,`icon`]),Qm=y({mediaType:Zm,url:a().optional(),bytes:p(Uint8Array).optional(),mime:a().optional(),name:a().optional()}).refine(e=>e.url!==void 0||e.bytes!==void 0,{message:"Attachment requires either `url` or `bytes`"}),$m=v([`text`,`markdown`,`html`]),eh=y({id:a(),label:a(),url:a().optional()}),th=y({body:a(),title:a().optional(),format:$m.default(`text`),priority:i().int().min(1).max(5).default(3),level:a().optional(),attachments:h(Qm).optional(),clickUrl:a().optional(),actions:h(eh).optional(),sound:a().optional(),ttl:i().optional(),tag:a().optional(),deviceId:i().optional(),eventId:a().optional(),metadata:o(a(),r()).optional()}),nh=y({id:a(),label:a(),ordinal:i().int().min(1).max(5).nullable(),flags:y({critical:m().optional(),silent:m().optional(),noPush:m().optional()}).optional(),requires:h(a()).optional(),description:a().optional()}),rh=y({attachments:y({mediaTypes:h(Zm),mode:v([`url`,`bytes`,`both`]),max:i().int().nonnegative(),maxBytes:i().int().positive().optional()}),actions:i().int().nonnegative(),levels:h(nh),format:h($m),clickUrl:m(),sound:m(),ttl:m(),bodyMaxLen:i().int().positive()}),ih=r(),ah=y({kind:a(),label:a(),icon:a(),addonId:a(),configSchema:ih,supportsDiscovery:m(),caps:rh}),oh=y({id:a(),name:a(),kind:a(),addonId:a(),enabled:m(),config:o(a(),r())}),sh=y({kind:a(),suggestedName:a(),config:o(a(),r())}),ch=y({level:a(),format:$m,attachmentsSent:i().int().nonnegative(),actionsSent:i().int().nonnegative(),truncated:m(),dropped:h(a())}),lh=y({success:m(),error:a().optional(),renderedAs:ch.optional()}),uh=lh,dh={name:`notification-output`,scope:`system`,mode:`collection`,methods:{listTargetKinds:R(y({}),h(ah)),listTargets:R(y({}),h(oh)),discoverTargets:R(y({kind:a(),config:o(a(),r()).optional()}),h(sh)),send:R(y({targetId:a(),notification:th}),lh,{kind:`mutation`}),testTarget:R(y({targetId:a(),sample:th.optional()}),uh,{kind:`mutation`}),upsertTarget:R(y({target:oh}),oh,{kind:`mutation`}),deleteTarget:R(y({targetId:a()}),_(),{kind:`mutation`}),setTargetEnabled:R(y({targetId:a(),enabled:m()}),_(),{kind:`mutation`})}},fh=v([`view`,`create`,`delete`]),ph=g([c(`*`),h(a())]),mh=o(a(),g([c(`*`),h(a())])),hh=v([`device`,`system`]),$=b(`type`,[y({type:c(`category`),target:hh,access:h(fh).min(1)}),y({type:c(`capability`),target:a(),access:h(fh).min(1)}),y({type:c(`addon`),target:a(),access:h(fh).min(1)}),y({type:c(`device`),targets:h(a()).min(1),access:h(fh).min(1)})]),gh=y({id:a(),username:a(),passwordHash:a(),isAdmin:m().default(!1),allowedProviders:ph,allowedDevices:mh,scopes:h($).default([]),createdAt:i(),updatedAt:i()}),_h=y({id:a(),label:a(),isAdmin:m().default(!1),allowedProviders:ph,allowedDevices:mh,tokenHash:a(),tokenPrefix:a(),createdAt:i(),lastUsedAt:i().optional()}),vh=y({id:a(),userId:a(),name:a(),tokenHash:a(),tokenPrefix:a(),scopes:h($),expiresAt:i().nullish(),lastUsedAt:i().nullish(),createdAt:i()}),yh=y({integrationId:a(),displayName:a(),requestedScopes:h($),allowedRedirectPrefixes:h(a()).min(1),hubUrl:a().optional()}),bh={name:`oauth-integration`,scope:`system`,mode:`collection`,internal:!0,methods:{getDescriptor:R(_(),yh)}},xh=v([`new`,`entered`,`left`,`moving`,`idle`]),Sh=v([`motion`,`object`,`audio`]),Ch=y({x:i(),y:i(),timestamp:i(),bbox:H}),wh=y({timestamp:i(),position:Ch,mediaKey:a()}),Th=y({trackId:a(),deviceId:i(),className:a(),label:a().optional(),firstSeen:i(),lastSeen:i(),positions:h(Ch).readonly(),snapshots:h(wh).readonly(),zonesVisited:h(a()).readonly(),totalDistance:i(),state:xh,active:m()}),Eh={id:a(),deviceId:i(),timestamp:i()},Dh=y({...Eh,kind:c(`motion`),regionCount:i(),regions:h(y({bbox:H,pixelCount:i(),intensity:i()})).readonly().optional(),frameWidth:i().optional(),frameHeight:i().optional(),mediaUrl:a().optional()}),Oh=v([`pipeline`,`onboard`]),kh=y({...Eh,kind:c(`object`),source:Oh.optional(),frameId:a().optional(),trackId:a().optional(),className:a(),label:a().optional(),confidence:i().optional(),bbox:H.optional(),zones:h(a()).readonly().optional(),state:xh.optional(),frameWidth:i().optional(),frameHeight:i().optional(),mediaKey:a().optional(),mediaUrl:a().optional()}),Ah=y({...Eh,kind:c(`audio`),rms:i(),dbfs:i(),classification:y({className:a(),originalClass:a().optional(),score:i()}).optional(),mediaUrl:a().optional()}),jh=v([`crop`,`thumbnail`,`snapshot`,`firstFrame`,`lastFrame`,`fullFrame`,`fullFrameBoxed`,`faceCrop`,`plateCrop`]),Mh=y({key:a(),kind:jh,base64:a(),sizeBytes:i(),timestamp:i()}),Nh=y({deviceId:i(),since:i().optional(),until:i().optional(),limit:i().int().min(1).max(5e3).default(1e3),projection:v([`full`,`slim`]).optional()}),Ph=Nh.extend({classFilter:a().optional()}),Fh=y({trackId:a(),className:a(),confidence:i(),bbox:H,zones:h(a()).readonly(),state:xh}),Ih=kh.extend({score:i()}),Lh=y({text:a(),deviceId:i().optional(),since:i().optional(),until:i().optional(),classFilter:a().optional(),limit:i().default(50),minScore:i().min(0).max(1).default(.2)}),Rh={name:`pipeline-analytics`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[F.Camera],exposesDeviceSettings:!0,methods:{getActiveTracks:R(y({deviceId:i()}),h(Th).readonly()),getTrack:R(y({deviceId:i(),trackId:a()}),Th.nullable()),listTracks:R(y({deviceId:i(),since:i().optional(),until:i().optional(),limit:i().optional()}),h(Th).readonly()),clearTracks:R(y({deviceId:i()}),_(),{kind:`mutation`,auth:`admin`}),getMotionEvents:R(Nh,h(Dh).readonly()),getObjectEvents:R(Ph,h(kh).readonly()),getAudioEvents:R(Nh,h(Ah).readonly()),getEventDensity:R(y({deviceId:i(),since:i(),until:i(),bucketMs:i().int().positive()}),h(y({bucketStart:i(),motion:i().int(),object:i().int(),audio:i().int()})).readonly()),pruneEventsBefore:R(y({deviceId:i(),cutoffMs:i()}),y({motion:i().int(),object:i().int(),audio:i().int()}),{kind:`mutation`,auth:`admin`}),getEventMedia:R(y({eventId:a(),kind:jh.optional()}),h(Mh).readonly()),getTrackMedia:R(y({trackId:a()}),h(Mh).readonly()),searchObjectEvents:R(Lh,h(Ih).readonly())},events:{onFrameTracked:{data:y({deviceId:i(),timestamp:i(),frameWidth:i(),frameHeight:i(),detections:h(Fh).readonly()})},onTrackStarted:{data:y({deviceId:i(),trackId:a(),className:a()})},onTrackEnded:{data:y({deviceId:i(),trackId:a(),className:a(),durationMs:i()})},onDetectionEvent:{data:y({deviceId:i(),kind:Sh,eventId:a(),timestamp:i()})}}},zh=y({engine:U.optional(),steps:h(W).readonly(),audio:y({engine:U.optional(),modelId:a().optional(),enabled:m(),settings:o(a(),r()).readonly().optional()}).nullable().optional()}),Bh=y({id:a(),name:a(),description:a().optional(),config:zh,createdAt:a(),updatedAt:a()}),Vh=y({enabled:m(),modelId:a().optional(),settings:o(a(),r()).readonly()}),Hh=y({addonDefaults:o(a(),Vh).readonly(),maxCameras:i().int().nonnegative().nullable().default(null),detectWeight:i().positive().optional(),detect:m().optional(),decode:m().optional(),audio:m().optional(),ingest:m().optional(),reachableHost:a().optional()}),Uh=y({steps:h(W).readonly(),audio:y({modelId:a(),enabled:m()}).nullable()}),Wh=y({enabled:m().optional(),modelId:a().optional(),settings:o(a(),r()).readonly().optional()}),Gh=y({pinnedAgentNodeId:a().optional(),stepToggles:o(a(),m()).optional(),stepOverridesByAgent:o(a(),o(a(),Wh)).optional(),pipelineByAgent:o(a(),Uh).optional()}),Kh=y({deviceId:i(),agentNodeId:a(),pinned:m(),reason:v([`manual`,`capacity`,`hardware-affinity`,`failover`,`rebalance`]),assignedAt:i()}),qh=y({nodeId:a(),online:m(),load:gc,score:i(),decodeHwaccel:a().nullable()}),Jh=y({totalAgents:i(),onlineAgents:i(),totalCameras:i(),attachedCameras:i(),activeCameras:i(),avgInferenceTimeMs:i(),queueDepth:i()}),Yh=o(a(),a()),Xh=y({ownerNodeId:a(),reachableHost:a().optional(),configIssue:a().optional()}),Zh=y({camStreamId:a(),codec:a(),width:i(),height:i(),fps:i(),kind:a()}),Qh=y({streams:h(Zh).readonly()}),$h=y({detectionNodeId:a().nullable(),decoderNodeId:a().nullable(),audioNodeId:a().nullable(),sourceNodeId:a().nullable(),pinned:y({detection:m(),decoder:m(),audio:m()}),reasons:y({detection:a().optional(),decoder:a().optional(),audio:a().optional()})}),eg=y({profile:a(),status:a(),codec:a(),width:i(),height:i(),subscribers:i(),inFps:i(),outFps:i()}),tg=y({profiles:h(eg).readonly(),webrtcSessions:i(),rtspRestream:m()}),ng=y({framesWritten:i(),getFrameHits:i(),getFrameMisses:i(),budgetMb:i()}),rg=y({nodeId:a(),formats:h(a()).readonly(),sessionCount:i(),shm:ng}),ig=y({enabled:m(),fps:i()}),ag=v([`idle`,`installing`,`verifying`,`ready`,`failed`]),og=y({state:ag,error:a().optional()}),sg=v([`idle`,`watching`,`active`]),cg=y({nodeId:a(),engine:y({backend:a(),device:a()}),phase:sg,configuredFps:i(),actualFps:i(),queueDepth:i(),avgInferenceMs:i(),provisioning:og}),lg=y({nodeId:a(),enabled:m()}),ug=v([`off`,`continuous`,`events`]),dg=y({mode:ug,active:m(),storageBytes:i()}),fg=y({deviceId:i(),assignment:$h,source:Qh,broker:tg.nullable(),decoder:rg.nullable(),motion:ig.nullable(),detection:cg.nullable(),audio:lg.nullable(),recording:dg.nullable(),fetchedAt:i()}),pg={name:`pipeline-orchestrator`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,exposesDeviceSettings:!0,methods:{assignPipeline:R(y({deviceId:i(),agentNodeId:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),unassignPipeline:R(y({deviceId:i()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),rebalance:R(_(),y({migrated:i()}),{kind:`mutation`,auth:`admin`}),getPipelineAssignments:R(_(),h(Kh).readonly()),getPipelineAssignment:R(y({deviceId:i()}),Kh.nullable()),getAgentLoad:R(_(),h(qh).readonly()),getGlobalMetrics:R(_(),Jh),getCameraMetrics:R(y({deviceId:i()}),ks.nullable()),getCapabilityBindings:R(y({nodeId:a()}),Yh),setCapabilityBinding:R(y({nodeId:a(),capName:a(),addonId:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),getIngestOwner:R(_(),Xh),assignAudio:R(y({deviceId:i(),nodeId:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),unassignAudio:R(y({deviceId:i()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),getAudioAssignment:R(y({deviceId:i()}),y({nodeId:a(),pinned:m(),assignedAt:i()}).nullable()),getAudioNodeLoad:R(_(),h(y({nodeId:a(),deviceCount:i()}))),getAudioAssignments:R(_(),h(y({deviceId:i(),nodeId:a(),pinned:m(),assignedAt:i()}))),getAgentSettings:R(y({agentNodeId:a()}),Hh.nullable()),listAgentSettings:R(_(),h(y({nodeId:a(),settings:Hh})).readonly()),setAgentAddonDefaults:R(y({agentNodeId:a(),defaults:o(a(),Vh)}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),removeAgentSettings:R(y({agentNodeId:a()}),y({success:m(),removed:m()}),{kind:`mutation`,auth:`admin`}),setAgentMaxCameras:R(y({agentNodeId:a(),maxCameras:i().int().nonnegative().nullable()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),setAgentDetectWeight:R(y({agentNodeId:a(),detectWeight:i().positive().nullable()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),setAgentCapabilities:R(y({agentNodeId:a(),detect:m().nullable().optional(),audio:m().nullable().optional(),ingest:m().nullable().optional()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),setAgentReachableHost:R(y({agentNodeId:a(),reachableHost:a().nullable()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),resetNodePipelineDefaults:R(y({agentNodeId:a()}),y({success:c(!0),effectiveModelId:a().nullable(),clearedCameraOverrides:i()}),{kind:`mutation`,auth:`admin`}),getCameraSettings:R(y({deviceId:i()}),Gh.nullable()),setCameraStepToggle:R(y({deviceId:i(),addonId:a(),enabled:m().nullable()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),getCameraStepOverrides:R(y({deviceId:i()}),o(a(),o(a(),Wh)).nullable()),setCameraStepOverride:R(y({deviceId:i(),agentNodeId:a(),addonId:a(),patch:Wh.nullable()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),setCameraPipelineForAgent:R(y({deviceId:i(),agentNodeId:a(),pipeline:Uh.nullable()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),resolvePipeline:R(y({deviceId:i(),agentNodeId:a().optional()}),zh),getCameraStatus:R(y({deviceId:i()}),fg),getCameraStatuses:R(y({deviceIds:h(i()).optional()}),h(fg).readonly()),listTemplates:R(_(),h(Bh).readonly()),saveTemplate:R(y({name:a(),description:a().optional(),config:zh}),Bh,{kind:`mutation`,auth:`admin`}),updateTemplate:R(y({id:a(),name:a().optional(),description:a().optional(),config:zh.optional()}),Bh,{kind:`mutation`,auth:`admin`}),deleteTemplate:R(y({id:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`})}},mg=v([`workspace`,`baked`,`data-root`]),hg=v([`idle`,`checking`,`staging`,`pending-restart`,`awaiting-confirmation`]),gg=y({fromVersion:a(),toVersion:a().nullable(),atMs:i(),reason:a()}),_g=y({packageName:a(),runningVersion:a().nullable(),nodeRuntimeVersion:a().nullable(),activeVersion:a().nullable(),previousVersion:a().nullable(),seedVersion:a().nullable(),latestVersion:a().nullable(),updateAvailable:m(),bootMode:mg,updateState:hg,pendingVersion:a().nullable(),rolledBack:gg.nullable(),stateFileCorrupt:m(),lastCheckedAtMs:i().nullable()}),vg=y({packageName:a(),runningVersion:a().nullable(),latestVersion:a().nullable(),updateAvailable:m(),checkedAtMs:i(),error:a().nullable()}),yg=y({accepted:m(),targetVersion:a().nullable(),restarting:m(),message:a()}),bg={name:`server-management`,scope:`system`,mode:`singleton`,methods:{getServerPackageStatus:R(_(),_g,{auth:`admin`}),checkServerUpdate:R(_(),vg,{kind:`mutation`,auth:`admin`}),applyServerUpdate:R(y({version:a().optional()}),yg,{kind:`mutation`,auth:`admin`}),rollbackServerUpdate:R(_(),yg,{kind:`mutation`,auth:`admin`}),restartServer:R(_(),yg,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},xg=y({where:o(a(),r()).optional(),whereIn:o(a(),h(r())).optional(),whereBetween:o(a(),s([r(),r()])).optional(),orderBy:y({field:a(),direction:v([`asc`,`desc`])}).optional(),limit:i().optional(),offset:i().optional()}),Sg=y({id:a(),data:o(a(),r())}),Cg=y({name:a(),type:v([`TEXT`,`INTEGER`,`REAL`,`JSON`,`BOOLEAN`]),primaryKey:m().optional(),notNull:m().optional(),unique:m().optional()}),wg=y({name:a(),columns:h(a()).readonly(),unique:m().optional()}),Tg={name:`settings-store`,scope:`system`,mode:`singleton`,methods:{get:R(y({namespace:a().optional(),collection:a(),key:a()}),r()),set:R(y({namespace:a().optional(),collection:a(),key:a(),value:r()}),_(),{kind:`mutation`}),query:R(y({namespace:a().optional(),collection:a(),filter:xg.optional()}),h(Sg).readonly()),insert:R(y({namespace:a().optional(),collection:a(),record:Sg}),_(),{kind:`mutation`}),update:R(y({namespace:a().optional(),collection:a(),id:a(),data:o(a(),r())}),_(),{kind:`mutation`}),delete:R(y({namespace:a().optional(),collection:a(),key:a()}),_(),{kind:`mutation`}),count:R(y({namespace:a().optional(),collection:a(),filter:xg.optional()}),i()),histogram:R(y({namespace:a().optional(),collection:a(),field:a(),bucketSize:i().int().positive(),origin:i().int(),filter:xg.optional()}),h(y({bucket:i().int(),count:i().int()})).readonly()),isEmpty:R(y({namespace:a().optional(),collection:a()}),m()),declareCollection:R(y({namespace:a().optional(),collection:a(),columns:h(Cg).readonly(),indexes:h(wg).readonly().optional()}),_(),{kind:`mutation`})}},Eg=f(),Dg=y({to:g([Eg,h(Eg).min(1)]),cc:h(Eg).optional(),bcc:h(Eg).optional(),from:a().optional(),replyTo:a().optional(),subject:a(),text:a(),html:a().optional()}),Og=y({messageId:a(),accepted:h(Eg).default([]),rejected:h(Eg).default([])}),kg=y({ready:m(),host:a(),error:a().optional(),lastVerifiedAt:i().optional()}),Ag={name:`smtp-provider`,scope:`system`,mode:`collection`,internal:!0,providerKind:`email`,methods:{sendEmail:R(Dg,Og,{kind:`mutation`,auth:`admin`,access:`create`}),verify:R(_(),kg,{kind:`mutation`,auth:`admin`,access:`view`}),getStatus:R(_(),kg,{auth:`admin`})}},jg=y({base64:a(),contentType:a()}),Mg=y({lastCapturedAt:i().nullable(),cacheAgeMs:i().nullable(),lastBytes:i().nullable(),lastStreamId:a().nullable()}),Ng={name:`snapshot`,scope:`device`,deviceNative:!0,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[F.Camera],exposesDeviceSettings:!0,methods:{getSnapshot:R(y({deviceId:i(),streamId:a().optional(),force:m().optional()}),jg.nullable()),invalidateCache:R(y({deviceId:i()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Mg,kind:`poll`}},Pg=y({userId:a(),username:a(),isAdmin:m(),provider:a(),email:a().optional(),displayName:a().optional(),hubUrl:a().optional(),scopes:h($).optional(),redirectUri:a().optional(),integrationId:a().optional(),jti:a().optional(),sessionId:a().optional()}),Fg={name:`sso-bridge`,scope:`system`,mode:`singleton`,internal:!0,methods:{signBridgeToken:R(y({claims:Pg,ttlSec:i().int().positive().optional()}),y({token:a()})),verifyBridgeToken:R(y({token:a()}),Pg.nullable())}},Ig=b(`shouldSaveDiskSpace`,[y({providerId:a().min(1),displayName:a().min(1),configSchema:r(),nodeLocal:m(),shouldSaveDiskSpace:c(!0),minFreePercent:i().min(0).max(100)}),y({providerId:a().min(1),displayName:a().min(1),configSchema:r(),nodeLocal:m(),shouldSaveDiskSpace:c(!1),minFreePercent:c(null)})]),Lg={name:`storage`,scope:`system`,mode:`singleton`,methods:{resolve:R(y({location:E,relativePath:a()}),a()),write:R(y({location:E,relativePath:a(),data:p(Uint8Array)}),_(),{kind:`mutation`}),read:R(y({location:E,relativePath:a()}),p(Uint8Array)),exists:R(y({location:E,relativePath:a()}),m()),list:R(y({location:E,prefix:a().optional()}),h(a()).readonly()),delete:R(y({location:E,relativePath:a()}),_(),{kind:`mutation`}),getAvailableSpace:R(y({location:E}),i().nullable()),beginUpload:R(y({location:E,relativePath:a(),sizeBytes:i().optional()}),y({uploadId:a()}),{kind:`mutation`}),writeChunk:R(y({uploadId:a(),offset:i(),data:p(Uint8Array)}),_(),{kind:`mutation`}),finalizeUpload:R(y({uploadId:a()}),_(),{kind:`mutation`}),abortUpload:R(y({uploadId:a()}),_(),{kind:`mutation`}),beginDownload:R(y({location:E,relativePath:a()}),y({downloadId:a(),sizeBytes:i()}),{kind:`mutation`}),readChunk:R(y({downloadId:a(),offset:i(),length:i()}),p(Uint8Array)),endDownload:R(y({downloadId:a()}),_(),{kind:`mutation`}),listLocations:R(y({type:yn.optional()}),h(T).readonly()),getDefaultLocation:R(y({type:yn}),T.nullable()),listLocationDeclarations:R(_(),h(bn).readonly()),upsertLocation:R(T.omit({createdAt:!0,updatedAt:!0}),T,{kind:`mutation`,auth:`admin`}),deleteLocation:R(y({id:a()}),_(),{kind:`mutation`,auth:`admin`}),testLocation:R(y({id:a()}),y({ok:m(),error:a().optional()}),{auth:`admin`}),listProviders:R(_(),h(Ig).readonly()),testConfig:R(y({providerId:a(),config:o(a(),r())}),y({ok:m(),error:a().optional()}),{auth:`admin`})}},Rg=y({bytes:i().int().nonnegative()}),zg=y({reclaimedBytes:i().int().nonnegative(),exhausted:m()}),Bg={name:`storage-evictable`,scope:`system`,mode:`collection`,internal:!0,methods:{getEvictableUsage:R(y({locationId:a()}),Rg),evict:R(y({locationId:a(),targetBytes:i().int().positive()}),zg,{kind:`mutation`})}},Vg=b(`shouldSaveDiskSpace`,[y({providerId:a().min(1),displayName:a().min(1),configSchema:r(),nodeLocal:m(),shouldSaveDiskSpace:c(!0),minFreePercent:i().min(0).max(100)}),y({providerId:a().min(1),displayName:a().min(1),configSchema:r(),nodeLocal:m(),shouldSaveDiskSpace:c(!1),minFreePercent:c(null)})]),Hg=y({ok:m(),error:a().optional()}),Ug=y({location:T,relativePath:a(),sizeBytes:i().optional()}),Wg=y({uploadId:a()}),Gg=y({uploadId:a(),offset:i(),data:p(Uint8Array)}),Kg=y({uploadId:a()}),qg=y({uploadId:a()}),Jg=y({location:T,relativePath:a()}),Yg=y({downloadId:a(),sizeBytes:i()}),Xg=y({downloadId:a(),offset:i(),length:i()}),Zg=y({downloadId:a()}),Qg={name:`storage-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{getProviderInfo:R(_(),Vg),testLocation:R(y({config:o(a(),r())}),Hg,{auth:`admin`}),resolve:R(y({location:T,relativePath:a()}),a()),write:R(y({location:T,relativePath:a(),data:p(Uint8Array)}),_(),{kind:`mutation`}),read:R(y({location:T,relativePath:a()}),p(Uint8Array)),exists:R(y({location:T,relativePath:a()}),m()),list:R(y({location:T,prefix:a().optional()}),h(a()).readonly()),delete:R(y({location:T,relativePath:a()}),_(),{kind:`mutation`}),getAvailableSpace:R(y({location:T}),i().nullable()),beginUpload:R(Ug,Wg,{kind:`mutation`}),writeChunk:R(Gg,_(),{kind:`mutation`}),finalizeUpload:R(Kg,_(),{kind:`mutation`}),abortUpload:R(qg,_(),{kind:`mutation`}),beginDownload:R(Jg,Yg,{kind:`mutation`}),readChunk:R(Xg,p(Uint8Array)),endDownload:R(Zg,_(),{kind:`mutation`})}},$g=y({urls:g([a(),h(a())]),username:a().optional(),credential:a().optional()}),e_={name:`turn-provider`,scope:`system`,mode:`collection`,methods:{getTurnServers:R(_(),h($g).readonly())}},t_=y({credentialId:a(),label:a(),createdAt:i(),lastUsedAt:i().nullable(),transports:h(a()).default([])}),n_={name:`user-passkeys`,scope:`system`,mode:`collection`,internal:!0,methods:{beginRegistration:R(y({userId:a(),username:a()}),y({optionsJSON:o(a(),r())}),{kind:`mutation`,auth:`admin`,access:`create`}),finishRegistration:R(y({userId:a(),response:o(a(),r()),label:a()}),y({success:c(!0),credentialId:a()}),{kind:`mutation`,auth:`admin`,access:`create`}),beginAuthentication:R(y({userId:a().optional()}),y({optionsJSON:o(a(),r())}),{kind:`mutation`,access:`view`}),finishAuthentication:R(y({userId:a(),response:o(a(),r())}),y({verified:m()}),{kind:`mutation`,access:`view`}),beginDiscoverableAuthentication:R(y({}),y({optionsJSON:o(a(),r())}),{kind:`mutation`,access:`view`}),finishDiscoverableAuthentication:R(y({response:o(a(),r())}),y({verified:m(),userId:a().nullable()}),{kind:`mutation`,access:`view`}),listPasskeys:R(y({userId:a()}),h(t_),{auth:`admin`}),removePasskey:R(y({userId:a(),credentialId:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),getSecondFactorPreference:R(y({userId:a()}),y({enabled:m()}),{auth:`admin`}),setSecondFactorPreference:R(y({userId:a(),enabled:m()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`create`})}},r_=y({id:a(),source:a(),kind:v([`motion`,`object`,`audio`,`native`]),timeRange:y({startMs:i(),endMs:i()}),thumbnail:a().optional()}),i_=y({playbackUrl:a(),playbackEndpoints:h(a()).optional(),token:a().optional()}),a_={name:`videoclips`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,methods:{listClips:R(y({deviceId:i(),since:i(),until:i(),limit:i().int().positive().optional()}),h(r_).readonly(),{kind:`query`,auth:`admin`}),getClipPlayback:R(y({deviceId:i(),clipId:a()}),i_,{kind:`query`,auth:`admin`})}},o_=y({viewportWidth:i().int().positive().optional(),viewportHeight:i().int().positive().optional(),devicePixelRatio:i().positive().optional(),downlinkMbps:i().nonnegative().optional(),prefersTier:a().optional()}).partial(),s_=b(`kind`,[y({kind:c(`adaptive`)}),y({kind:c(`profile`),profile:S}),y({kind:c(`cam-stream`),camStreamId:a().min(1)})]),c_=y({id:a(),label:a(),target:s_,codec:a().nullable(),resolution:y({width:i(),height:i()}).nullable(),status:v([`idle`,`connecting`,`streaming`,`error`,`stopped`]).nullable(),inputFps:i().nullable(),decodeFps:i().nullable(),bitrateKbps:i().nullable()}),l_={name:`webrtc-session`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,preferredProvider:`stream-broker`,deviceTypes:[F.Camera],methods:{listStreams:R(y({deviceId:i().int().nonnegative()}),h(c_)),createSession:R(y({deviceId:i().int().nonnegative(),target:s_,hints:o_.optional(),relayOnly:m().optional(),consumerAttribution:ja.optional()}),y({sessionId:a(),sdpOffer:a()}),{kind:`mutation`}),handleOffer:R(y({deviceId:i().int().nonnegative(),target:s_.optional(),sdpOffer:a(),sessionId:a().optional(),relayOnly:m().optional(),nonTrickle:m().optional(),disableTurn:m().optional(),disableIpv6:m().optional(),consumerAttribution:ja.optional()}),y({sessionId:a(),sdpAnswer:a()}),{kind:`mutation`}),handleAnswer:R(y({deviceId:i().int().nonnegative(),sessionId:a(),sdpAnswer:a()}),_(),{kind:`mutation`}),addIceCandidate:R(y({deviceId:i().int().nonnegative(),sessionId:a(),candidate:a(),sdpMid:a().nullable().optional(),sdpMLineIndex:i().int().nullable().optional()}),_(),{kind:`mutation`}),getIceCandidates:R(y({deviceId:i().int().nonnegative(),sessionId:a()}),y({candidates:h(y({candidate:a(),sdpMid:a().nullable(),sdpMLineIndex:i().int().nullable()})),done:m()}),{kind:`query`}),closeSession:R(y({deviceId:i().int().nonnegative(),sessionId:a()}),_(),{kind:`mutation`}),hasAdaptiveBitrate:R(y({deviceId:i().int().nonnegative(),profile:S}),m()),getSessionState:R(y({deviceId:i().int().nonnegative(),sessionId:a()}),y({pendingRenegotiation:y({target:s_,epoch:i()}).nullable()}))},mount:{kind:`server-provided`}},u_=y({childDeviceIds:h(i()).readonly(),hiddenChildIds:h(i()).readonly()}),d_={name:`accessories`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera,F.Hub,F.Switch,F.Light,F.Sensor,F.Thermostat,F.Cover,F.Lock,F.Fan,F.MediaPlayer,F.AlarmPanel,F.Generic],methods:{setChildHidden:R(y({deviceId:i().int().nonnegative(),childDeviceId:i().int().nonnegative(),hidden:m()}),_(),{kind:`mutation`,auth:`admin`})},events:{onAccessoriesChanged:{data:y({deviceId:i(),childDeviceIds:h(i()).readonly(),hiddenChildIds:h(i()).readonly()})},onChildVisibilityChanged:{data:y({deviceId:i(),childDeviceId:i(),hidden:m()})}},status:{schema:u_,kind:`command-driven`}},f_=v([`install`,`update`,`uninstall`,`restart`]),p_=v([`queued`,`fetching`,`staged`,`validating`,`applying`,`restarting`,`applied`,`done`,`failed`,`skipped`]),m_=v([`framework`,`addon`]),h_=y({tsMs:i(),nodeId:a(),packageName:a(),phase:p_,message:a()}),g_=y({taskId:a(),nodeId:a(),packageName:a(),fromVersion:a().nullable(),toVersion:a(),target:m_,phase:p_,stagedPath:a().nullable(),attempts:i(),steps:h(h_),error:a().nullable(),startedAtMs:i().nullable(),finishedAtMs:i().nullable()}),__=v([`running`,`completed`,`failed`,`partially-failed`,`cancelled`]),v_=v([`single`,`bulk`,`cluster`]),y_=y({jobId:a(),kind:f_,createdAtMs:i(),createdBy:a(),scope:v_,tasks:h(g_),state:__,schemaVersion:c(1)}),b_=v([`debug`,`info`,`warn`,`error`]),x_=v([`off`,`latest`,`beta`]),S_=v([`off`,`latest`,`beta`,`inherit`]),C_=y({id:a(),name:a().optional(),version:a().optional(),description:a().optional(),icon:a().optional(),color:a().optional(),capabilities:h(r()).readonly().optional(),packageName:a(),packageVersion:a(),packageDisplayName:a().optional(),bundle:y({displayName:a(),description:a().optional(),icon:a().optional()}).optional(),protected:m().optional(),removable:m().optional()}),w_=y({pid:i().optional(),mode:a(),state:a()}),T_=y({phase:v([`pending`,`healthy`,`failed`]),retryCount:i(),firstFailureAt:i().nullable(),lastAttemptAt:i().nullable(),lastError:y({message:a(),stack:a().optional()}).nullable(),nextRetryAt:i().nullable(),alertEmitted:m(),retrying:m(),inGracePeriod:m()}),E_=y({manifest:C_,declaration:r().optional(),source:a(),installSource:a().optional(),process:w_.optional(),hasBackup:m().optional(),health:T_.nullable().optional()}),D_=y({name:a(),version:a(),dir:a(),installSource:a().optional()}),O_=y({name:a(),currentVersion:a(),latestVersion:a(),category:v([`addon`,`core`]),requiresRestart:m(),isSystem:m()}),k_=y({version:a(),publishedAt:a(),deprecated:a().optional(),distTags:h(a()).readonly()}),A_=y({name:a(),version:a(),description:a(),keywords:h(a()).readonly(),publishedAt:a(),author:a(),installed:m(),installedVersion:a().optional()}),j_=y({channel:x_,intervalSeconds:i()}),M_=S_,N_=r(),P_=r(),F_=r(),I_=y({packageName:a(),fromVersion:a(),toVersion:a(),restartingAt:i()}),L_=v([`queued`,`updating`,`done`,`done-pending-restart`,`failed`]),R_=y({name:a(),isSystem:m(),fromVersion:a(),toVersion:a(),status:L_,error:a().optional(),startedAtMs:i().optional(),completedAtMs:i().optional()}),z_=v([`regular`,`system`,`restarting`,`finalizing`]);y({id:a(),nodeId:a(),startedAtMs:i(),completedAtMs:i().optional(),total:i(),completed:i(),failed:i(),current:a().nullable(),phase:z_,cancelled:m(),items:h(R_).readonly()});var B_=y({packageName:a(),currentVersion:a(),latestVersion:a().nullable(),hasUpdate:m(),description:a().optional(),buildId:a().nullable()}),V_=y({timestamp:a(),level:a(),message:a(),scope:a().optional()}),H_=r(),U_=y({addonId:a().min(1),action:a().min(1),input:r()}),W_={name:`addons`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{list:R(_(),h(E_).readonly()),getLogs:R(y({addonId:a(),limit:i().min(1).max(500).default(100),level:b_.optional()}),h(H_)),listPackages:R(_(),h(D_).readonly()),installPackage:R(y({packageName:a(),version:a().optional()}),P_,{kind:`mutation`,auth:`admin`}),installFromWorkspace:R(y({packageName:a()}),P_,{kind:`mutation`,auth:`admin`}),isWorkspaceAvailable:R(_(),m()),listWorkspacePackages:R(_(),h(r()).readonly()),uninstallPackage:R(y({packageName:a()}),r(),{kind:`mutation`,auth:`admin`}),reloadPackages:R(_(),F_,{kind:`mutation`,auth:`admin`}),searchAvailable:R(y({query:a().optional()}),h(A_)),listUpdates:R(y({nodeId:a().optional()}),h(O_).readonly(),{auth:`admin`}),updatePackage:R(y({name:a().min(1),version:a().optional(),nodeId:a().optional()}),r(),{kind:`mutation`,auth:`admin`}),rollbackPackage:R(y({name:a().min(1)}),y({rolledBackTo:a().nullable()}),{kind:`mutation`,auth:`admin`}),forceRefresh:R(y({nodeId:a().optional()}),r(),{kind:`mutation`,auth:`admin`}),restartServer:R(y({confirm:c(!0)}),r(),{kind:`mutation`,auth:`admin`}),getLastRestart:R(_(),y({kind:v([`framework-update`,`manual`,`system`,`framework-bulk-update`]),packageName:a().optional(),fromVersion:a().optional(),toVersion:a().optional(),requestedBy:a().optional(),requestedAt:i()}).nullable(),{auth:`admin`}),listFrameworkPackages:R(_(),h(B_).readonly(),{auth:`admin`}),listCapabilityProviders:R(y({capName:a().min(1)}),h(y({addonId:a(),mode:v([`singleton`,`collection`]),isActive:m()})).readonly()),setCapabilityProviderEnabled:R(y({capName:a().min(1),addonId:a().min(1),enabled:m()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),updateFrameworkPackage:R(y({packageName:a().min(1),version:a().optional(),deferRestart:m().optional()}),I_,{kind:`mutation`,auth:`admin`}),getVersions:R(y({name:a()}),h(k_).readonly()),restartAddon:R(y({addonId:a()}),N_,{kind:`mutation`,auth:`admin`}),retryLoad:R(y({packageName:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),getAutoUpdateSettings:R(_(),j_,{auth:`admin`}),setAutoUpdateSettings:R(y({channel:x_,intervalSeconds:i().min(300).max(86400).optional()}),r(),{kind:`mutation`,auth:`admin`}),getAddonAutoUpdate:R(y({addonId:a()}),M_,{auth:`admin`}),setAddonAutoUpdate:R(y({addonId:a(),channel:S_}),r(),{kind:`mutation`,auth:`admin`}),applyAutoUpdateToAll:R(y({channel:x_}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),custom:R(U_,r(),{kind:`mutation`}),startJob:R(y({kind:v([`install`,`update`,`uninstall`,`restart`]),targets:h(y({name:a().min(1),version:a().min(1)})).min(1),nodeIds:h(a()).optional()}),y({jobId:a()}),{kind:`mutation`,auth:`admin`}),getJob:R(y({jobId:a()}),y_.nullable(),{auth:`admin`}),listJobs:R(y({activeOnly:m().optional()}),h(y_),{auth:`admin`}),cancelJob:R(y({jobId:a()}),y({cancelled:m()}),{kind:`mutation`,auth:`admin`}),onAddonLogs:R(y({addonId:a(),level:b_.optional()}),V_,{kind:`subscription`})},mount:{kind:`server-provided`}},G_={name:`button`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Button],methods:{press:R(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`})}},K_=y({host:a(),port:i().int().positive().optional(),onvifPort:i().int().positive().optional(),rtspPort:i().int().positive().optional(),https:m().optional(),username:a().optional(),password:a().optional(),onvifProfile:a().optional()}),q_=y({host:a(),port:i().int().positive().nullable(),onvifPort:i().int().positive().nullable(),rtspPort:i().int().positive().nullable(),https:m().nullable(),hasUsername:m(),hasPassword:m(),onvifProfile:a().nullable()}),J_={name:`camera-credentials`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera],methods:{getCredentials:R(y({deviceId:i()}),K_.nullable(),{kind:`query`,auth:`admin`})},status:{schema:q_,kind:`command-driven`}},Y_=y({id:a(),label:a(),protocol:v([`rtsp`,`rtmp`,`annexb`,`http-mjpeg`,`webrtc`,`custom`]),url:a().optional(),resolution:y({width:i(),height:i()}).optional(),fps:i().optional(),bitrate:i().optional(),codec:a().optional(),profileHint:S.optional(),sdp:a().optional()}),X_=y({key:a(),value:r()}),Z_=y({source:a(),data:o(a(),r())}),Q_={name:`device-ops`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{getStreamSources:R(y({deviceId:i()}),h(Y_)),getConfigEntries:R(y({deviceId:i()}),h(X_)),setConfig:R(y({deviceId:i(),values:o(a(),r())}),_(),{kind:`mutation`}),runAction:R(y({deviceId:i(),action:a().min(1),input:r()}),r(),{kind:`mutation`}),removeDevice:R(y({deviceId:i()}),_(),{kind:`mutation`}),getSettingsSchema:R(y({deviceId:i()}),r().nullable()),getRawState:R(y({deviceId:i()}),Z_.nullable(),{auth:`protected`})}},$_=y({id:a(),type:a(),timestamp:i(),label:a().optional(),thumbnailUrl:a().optional(),clipUrl:a().optional(),metadata:o(a(),r()).optional()}),ev={name:`events`,scope:`device`,mode:`singleton`,deviceTypes:[F.Camera],methods:{getEvents:R(y({deviceId:i(),from:i().optional(),to:i().optional(),limit:i().optional()}),h($_)),getEventThumbnail:R(y({deviceId:i(),eventId:a()}),y({base64:a(),contentType:a()}).nullable()),getEventClipUrl:R(y({deviceId:i(),eventId:a()}),a().nullable())}},tv=y({id:a(),name:a(),sampleCount:i().int().nonnegative(),coverMediaKey:a().optional(),coverBase64:a().optional()}),nv=y({id:a(),source:v([`detected`,`photo`]),addedAt:i().int(),deviceId:i().int().optional(),base64:a().optional()}),rv=y({faceId:a(),deviceId:i().int(),trackId:a(),timestamp:i().int(),recognizedIdentityId:a().optional(),identityName:a().optional(),assigned:m(),base64:a().optional()}),iv=v([`unassigned`,`recognized`,`all`]),av=y({key:a(),kind:a(),base64:a(),sizeBytes:i(),timestamp:i()}),ov={name:`face-gallery`,scope:`system`,mode:`singleton`,methods:{listIdentities:R(_(),h(tv).readonly()),createIdentity:R(y({name:a().min(1)}),tv,{kind:`mutation`,auth:`admin`}),renameIdentity:R(y({id:a(),name:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),deleteIdentity:R(y({id:a()}),_(),{kind:`mutation`,auth:`admin`}),listIdentitySamples:R(y({identityId:a()}),h(nv).readonly()),removeSample:R(y({identityId:a(),sampleId:a()}),_(),{kind:`mutation`,auth:`admin`}),listRecentFaces:R(y({limit:i().int().positive().optional(),filter:iv.optional()}).optional(),h(rv).readonly()),getFaceByTrack:R(y({deviceId:i().int(),trackId:a()}),rv.nullable()),getFaceMedia:R(y({faceId:a()}),h(av).readonly()),assignFace:R(y({faceId:a(),identityId:a()}),_(),{kind:`mutation`,auth:`admin`}),unassignFace:R(y({faceId:a()}),_(),{kind:`mutation`,auth:`admin`}),deleteFace:R(y({faceId:a()}),_(),{kind:`mutation`,auth:`admin`}),assignFaces:R(y({faceIds:h(a()).min(1),identityId:a()}),y({assigned:i().int(),failed:h(a()).readonly()}),{kind:`mutation`,auth:`admin`}),unassignFaces:R(y({faceIds:h(a()).min(1)}),y({unassigned:i().int(),failed:h(a()).readonly()}),{kind:`mutation`,auth:`admin`}),suggestFaceClusters:R(y({threshold:i().min(0).max(1).optional(),minClusterSize:i().int().min(2).optional(),limit:i().int().positive().optional()}).optional(),h(y({faceIds:h(a()).readonly(),representativeFaceId:a(),size:i().int(),cohesion:i()})).readonly())}},sv=y({id:a(),addonId:a(),name:a(),enabled:m(),info:o(a(),r()).readonly(),createdAt:i(),updatedAt:i(),processState:a()}),cv=y({id:a(),addonId:a(),name:a(),enabled:m(),info:o(a(),r()).readonly(),createdAt:i(),updatedAt:i()}),lv=y({addonId:a(),name:a(),description:a(),iconUrl:a().nullable(),color:a(),instanceMode:a(),mode:v([`standalone`,`account`,`broker`]),discoveryMode:a(),kind:v([`device-adoption`,`device-provider`]),brokerKind:a().nullable(),supportsLocationImport:m(),existingInstances:h(y({id:a(),name:a()})),canAdd:m()}),uv=y({success:m(),error:a().optional()}),dv=y({addonId:a(),name:a(),enabled:m().optional(),info:o(a(),r()).optional(),settings:o(a(),r()).optional(),skipRestart:m().optional()}),fv=y({id:a(),name:a().optional(),enabled:m().optional(),info:o(a(),r()).optional()}),pv=y({success:m(),deletedId:a()}),mv={name:`integrations`,scope:`system`,mode:`singleton`,methods:{list:R(_(),h(sv)),get:R(y({id:a()}),sv),getByAddonId:R(y({addonId:a()}),cv.nullable()),create:R(dv,cv,{kind:`mutation`,auth:`admin`}),update:R(fv,cv,{kind:`mutation`,auth:`admin`}),delete:R(y({id:a()}),pv,{kind:`mutation`,auth:`admin`}),getSettings:R(y({id:a()}),o(a(),r()),{auth:`admin`}),setSettings:R(y({id:a(),settings:o(a(),r())}),y({success:m()}),{kind:`mutation`,auth:`admin`}),getAvailableTypes:R(_(),h(lv),{auth:`admin`}),testConnection:R(y({addonId:a(),settings:o(a(),r())}),uv,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},hv=y({codecs:h(a()),sampleRate:i(),duplex:v([`half`,`full`]),maxBacklogMs:i()}),gv=y({talking:m(),lastSessionAt:i().nullable(),ability:hv.nullable()}),_v=v([`opus`,`s16le`,`g711ulaw`,`g711alaw`]),vv={name:`intercom`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera],methods:{startSession:R(y({deviceId:i()}),y({sessionId:a(),sdpOffer:a()}),{kind:`mutation`,auth:`admin`}),handleAnswer:R(y({deviceId:i(),sessionId:a(),sdpAnswer:a()}),_(),{kind:`mutation`,auth:`admin`}),stopSession:R(y({deviceId:i(),sessionId:a()}),_(),{kind:`mutation`,auth:`admin`}),startTalkSession:R(y({deviceId:i()}),y({sessionId:a()}),{kind:`mutation`,auth:`admin`}),pushTalkAudio:R(y({deviceId:i(),audioBase64:a(),codec:_v.optional(),sampleRate:i().int().positive().optional(),channels:i().int().positive().optional(),sequenceNumber:i().int()}),y({accepted:m()}),{kind:`mutation`,auth:`admin`}),endTalkSession:R(y({deviceId:i()}),_(),{kind:`mutation`,auth:`admin`})},events:{onStatusChanged:{data:y({deviceId:i(),status:gv})}},status:{schema:gv,kind:`command-driven`}},yv=v([`lan`,`wifi`,`docker`,`vpn`,`loopback`,`other`]),bv=y({name:a(),family:v([`IPv4`,`IPv6`]),address:a(),cidr:a(),netmask:a(),internal:m(),mac:a(),kind:yv,preferred:m(),plausible:m(),plausibleReason:a()}),xv=y({interfaces:h(bv).readonly(),probedAt:i()}),Sv=bv.nullable(),Cv=y({endpoints:h(y({label:a(),baseUrl:a(),kind:v([`lan-ipv4`,`lan-ipv6`,`public`,`loopback`]),interfaceKind:v([`lan`,`wifi`,`docker`,`vpn`,`other`,`loopback`,`public`]),plausible:m(),plausibleReason:a(),priority:i()})).readonly()}),wv=y({addresses:h(a()).readonly()}),Tv={name:`local-network`,scope:`system`,mode:`singleton`,methods:{list:R(_(),xv),getPreferred:R(_(),Sv),getConnectionEndpoints:R(y({port:i().int().min(1).max(65535),includeLoopback:m().optional(),ipv4Only:m().optional(),scheme:v([`http`,`https`]).optional()}),Cv),getAllowedAddresses:R(_(),wv),setAllowedAddresses:R(wv,y({success:c(!0)}),{kind:`mutation`}),resetAllowlistToBestMatch:R(_(),wv,{kind:`mutation`})},mount:{kind:`hub-only`}},Ev=y({id:a(),label:a(),scope:v([`mesh`,`public`]),url:a(),hostname:a(),port:i(),protocol:v([`http`,`https`])}),Dv=y({id:a(),hostname:a(),magicDns:a(),addresses:h(a()).readonly(),os:a().optional(),online:m(),lastSeenMs:i(),isSelf:m(),connection:v([`direct`,`relay`,`idle`]),relay:a().nullable(),lastHandshakeMs:i(),rxBytes:i(),txBytes:i(),tags:h(a()).readonly(),exitNodeOption:m(),advertisedRoutes:h(a()).readonly(),userLogin:a().nullable(),keyExpiry:i().nullable()}),Ov=y({joined:m(),meshIp:a(),magicDnsHostname:a(),peerCount:i(),endpoints:h(Ev).readonly(),error:a().optional(),tenantName:a(),magicDnsSuffix:a(),userLogin:a().nullable(),controlPlaneUrl:a(),keyExpiry:i().nullable(),daemonSocket:a().optional(),daemonCliPath:a().optional()}),kv={name:`mesh-network`,scope:`system`,mode:`collection`,providerKind:`mesh`,methods:{getStatus:R(_(),Ov),join:R(y({authKey:a().min(8),hostname:a().optional()}),y({joined:c(!0)}),{kind:`mutation`}),startLogin:R(y({hostname:a().optional()}),y({loginUrl:a()}),{kind:`mutation`}),leave:R(_(),y({left:c(!0)}),{kind:`mutation`}),logout:R(_(),y({loggedOut:c(!0)}),{kind:`mutation`}),listPeers:R(_(),y({peers:h(Dv).readonly()})),testConnection:R(y({authKey:a().optional()}),y({ok:m(),tenant:a().optional(),daemonVersion:a().optional(),error:a().optional()}),{kind:`mutation`})}},Av=y({nominalBitrateKbps:i(),observedBitrateKbps:i(),peakBitrateKbps:i(),packetLossPercent:i(),lastUpdated:i()}),jv=y({rttMs:i(),jitterMs:i(),estimatedBandwidthKbps:i(),packetLossPercent:i().min(0).max(100),lastUpdated:i()}),Mv=y({deviceId:i(),streams:o(a(),Av),client:jv.optional()}),Nv={name:`network-quality`,scope:`system`,mode:`singleton`,methods:{getDeviceStats:R(y({deviceId:i()}),Mv.nullable()),getAllStats:R(_(),h(Mv).readonly()),reportClientStats:R(y({deviceId:i(),rttMs:i().min(0).max(6e4),jitterMs:i().min(0).max(1e4),estimatedBandwidthKbps:i().min(0).max(1e6),packetLossPercent:i().min(0).max(100)}),_(),{kind:`mutation`})},mount:{kind:`server-provided`}},Pv=y({addonId:a(),capabilities:h(a()).readonly(),status:a()}),Fv=y({pid:i(),name:a(),state:a(),cpuPercent:i(),memoryRss:i(),uptimeSeconds:i(),services:h(Pv).readonly(),groupId:a().optional()}),Iv=y({id:a(),status:a(),cpuPercent:i(),memoryRss:i()}),Lv=y({category:a(),total:i(),healthy:i(),addons:h(Iv).readonly()}),Rv=y({name:a(),version:a()}),zv=y({id:a(),name:a(),hostname:a(),platform:a(),arch:a(),cpuModel:a().nullable(),cpuCores:i(),memoryMB:i(),engines:h(a()).readonly(),isHub:m(),isOnline:m(),cpuPercent:i(),memoryPercent:i(),uptime:i(),lastSeen:a(),localIps:h(a()).readonly(),addons:h(y({id:a(),capabilities:h(a()).readonly(),status:a()})).readonly(),processes:h(Fv).readonly(),categories:h(Lv).readonly(),rootPackage:Rv.nullable()}),Bv=y({callerAddonId:a(),providerAddonId:a(),capName:a(),callsPerMin:i(),lastCallAtMs:i()}),Vv=y({nodeId:a(),name:a(),version:a(),status:a(),synced:m()}),Hv=y({hubVersion:a(),nodes:h(Vv)}),Uv=y({nodeId:a(),addonId:a()}),Wv=y({id:a(),status:a(),version:a().optional(),packageName:a().optional()}),Gv=y({success:m()}),Kv=y({success:m(),reason:a().optional()}),qv=y({restarted:h(a()).readonly(),failed:h(a()).readonly()}),Jv=y({nodeId:a(),name:a()}),Yv={name:`nodes`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{topology:R(_(),h(zv).readonly(),{auth:`admin`}),deployAddon:R(Uv,Gv,{kind:`mutation`,auth:`admin`}),undeployAddon:R(Uv,Gv,{kind:`mutation`,auth:`admin`}),restartAddon:R(Uv,Gv,{kind:`mutation`,auth:`admin`}),restartProcess:R(y({nodeId:a(),processName:a()}),Kv,{kind:`mutation`,auth:`admin`}),restartNode:R(y({nodeId:a()}),qv,{kind:`mutation`,auth:`admin`}),shutdownNode:R(y({nodeId:a()}),Gv,{kind:`mutation`,auth:`admin`}),renameNode:R(y({nodeId:a(),name:a().min(1).max(64)}),Jv,{kind:`mutation`,auth:`admin`}),clusterAddonStatus:R(_(),o(a(),Hv),{auth:`admin`}),getCapUsageGraph:R(y({windowSeconds:i().int().positive().max(300).default(60)}),h(Bv).readonly(),{auth:`admin`}),getNodeAddons:R(y({nodeId:a()}),h(Wv).readonly(),{auth:`admin`}),setProcessLogLevel:R(y({nodeId:a(),level:a()}),Gv,{kind:`mutation`,auth:`admin`}),executeQuery:R(y({nodeId:a(),addonId:a(),queryName:a(),params:o(a(),r()).optional()}),r(),{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},Xv=v([`text`,`timestamp`,`watermark`]),Zv=v([`top-left`,`top-center`,`top-right`,`bottom-left`,`bottom-center`,`bottom-right`,`custom`]),Qv=y({id:a(),kind:Xv,enabled:m(),text:a().optional(),position:Zv.optional(),availablePositions:h(Zv).readonly(),readOnly:m().optional()}),$v=y({overlays:h(Qv).readonly()}),ey=y({enabled:m().optional(),text:a().optional(),position:Zv.optional()}).partial(),ty={name:`osd`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera],methods:{setOverlay:R(y({deviceId:i(),overlayId:a(),patch:ey}),_(),{kind:`mutation`,auth:`admin`})},events:{onStatusChanged:{data:y({deviceId:i(),status:$v})}},status:{schema:$v,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}}}]}},ny=y({plateId:a(),deviceId:i().int(),trackId:a(),timestamp:i().int(),text:a(),score:i(),corrected:m(),base64:a().optional()}),ry=y({key:a(),kind:a(),base64:a(),sizeBytes:i(),timestamp:i()}),iy=y({plateIds:h(a()).readonly(),representativePlateId:a(),representativeText:a(),size:i().int(),cohesion:i()}),ay={name:`plate-gallery`,scope:`system`,mode:`singleton`,methods:{listPlates:R(y({deviceId:i().int().optional(),limit:i().int().positive().optional()}).optional(),h(ny).readonly()),getPlateByTrack:R(y({deviceId:i().int(),trackId:a()}),ny.nullable()),getPlateMedia:R(y({plateId:a()}),h(ry).readonly()),searchPlates:R(y({text:a().min(1),maxDistance:i().int().min(0).optional(),limit:i().int().positive().optional()}),h(ny).readonly()),suggestPlateClusters:R(y({maxDistance:i().int().min(0).optional(),minClusterSize:i().int().min(2).optional(),limit:i().int().positive().optional()}).optional(),h(iy).readonly()),correctPlateText:R(y({plateId:a(),text:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),deletePlate:R(y({plateId:a()}),_(),{kind:`mutation`,auth:`admin`})}},oy=v(ye),sy=v([`videotoolbox`,`cuda`,`nvdec`,`vaapi`,`qsv`,`d3d11va`,`dxva2`,`amf`,`vdpau`,`drm`,`coreml`,`tensorrt`,`openvino`,`directml`,`webgpu`,`none`]).nullable().optional(),cy=y({preferred:h(a()).readonly(),rationale:a()}),ly=v([`h264_videotoolbox`,`hevc_videotoolbox`,`h264_vaapi`,`hevc_vaapi`,`h264_nvenc`,`hevc_nvenc`,`h264_qsv`,`hevc_qsv`,`h264_amf`,`hevc_amf`,`libx264`,`libx265`]);y({encoders:h(y({encoder:ly,codec:v([`H264`,`H265`]),family:v([`videotoolbox`,`vaapi`,`nvenc`,`qsv`,`amf`,`software`]),available:m(),reason:a().optional()})).readonly(),defaultH264:ly,defaultH265:ly,probedAt:i()}),y({methods:h(a()).readonly(),probedAt:i()});var uy=v([`darwin`,`linux`,`win32`]),dy=v([`arm64`,`x64`]),fy=y({type:v([`nvidia`,`amd`,`intel`,`apple`]),name:a(),memoryMB:i().optional()}),py=y({type:v([`apple-ane`,`intel-npu`])}),my=y({platform:uy,arch:dy,cpuModel:a(),cpuCores:i(),totalRAM_MB:i(),availableRAM_MB:i(),gpu:fy.nullable(),npu:py.nullable()}),hy=y({runtime:v([`node`,`python`]),backend:a(),format:v([`onnx`,`coreml`,`openvino`]),score:i(),reason:a(),available:m()}),gy=y({hardware:my,scores:h(hy).readonly(),bestScore:hy,pythonPath:a().nullable()}),_y=y({modelId:a(),name:a(),minRAM_MB:i(),accuracyScore:i(),formats:h(a()).readonly()}),vy=y({modelId:a(),runtime:v([`node`,`python`]),backend:a(),format:oy,reason:a()}),yy={name:`platform-probe`,scope:`system`,mode:`singleton`,methods:{getCapabilities:R(_(),gy),getHardware:R(_(),my),resolveInferenceConfig:R(y({requirements:h(_y).readonly()}),vy),resolveHwAccel:R(y({prefer:sy}),cy)}},by=y({id:a(),name:a()}),xy=y({pan:i(),tilt:i(),zoom:i()}),Sy=y({pan:i().optional(),tilt:i().optional(),zoom:i().optional(),speed:i().optional()}),Cy=xy.extend({autofocus:m()}),wy=y({hasPan:m(),hasTilt:m(),hasZoom:m(),supportsPresets:m(),maxPresets:i().optional(),hasAutofocus:m()}),Ty={name:`ptz`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/ptz-panel`,tab:`ptz`,topTab:!0,label:`PTZ`,order:0}},methods:{move:R(Sy.extend({deviceId:i()}),_(),{kind:`mutation`}),continuousMove:R(Sy.extend({deviceId:i()}),_(),{kind:`mutation`}),stop:R(y({deviceId:i()}),_(),{kind:`mutation`}),getPresets:R(y({deviceId:i()}),h(by)),goToPreset:R(y({deviceId:i(),presetId:a()}),_(),{kind:`mutation`}),savePreset:R(y({deviceId:i(),presetId:a(),name:a()}),_(),{kind:`mutation`,auth:`admin`}),deletePreset:R(y({deviceId:i(),presetId:a()}),_(),{kind:`mutation`,auth:`admin`}),getOptions:R(y({deviceId:i()}),wy),goHome:R(y({deviceId:i()}),_(),{kind:`mutation`}),getPosition:R(y({deviceId:i()}),xy),setAutofocus:R(y({deviceId:i(),enabled:m()}),_(),{kind:`mutation`})},status:{schema:Cy,kind:`command-driven`}},Ey={name:`reboot`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera,F.Sensor,F.Switch],methods:{reboot:R(y({deviceId:i().int().nonnegative()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`})}},Dy=y({deviceId:i(),enabled:m(),activeMode:v([`off`,`continuous`,`events`]),nodeId:a(),storageBytes:i()}),Oy=y({profile:a(),startMs:i(),endMs:i()}),ky=y({deviceId:i(),ranges:h(Oy)}),Ay=y({deviceId:i(),days:h(i())}),jy=y({deviceId:i(),localMasterPath:a().nullable(),playbackUrl:a().nullable(),playbackEndpoints:h(a())}),My=y({deviceId:i(),usedBytes:i()}),Ny=y({locationId:a().nullable(),usedBytes:i(),availableBytes:i().nullable(),totalBytes:i().nullable()}),Py=y({nodeId:a(),totalUsedBytes:i(),devices:h(My),locations:h(Ny)}),Fy=b(`kind`,[y({kind:c(`segment`),startMs:i(),durMs:i(),bytes:i()}),y({kind:c(`gap`),nearestEdgeMs:i().nullable()})]),Iy=y({data:p(Uint8Array)}),Ly={name:`recording`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,status:{schema:Dy,kind:`command-driven`},methods:{getAvailability:R(y({deviceId:i(),fromMs:i(),toMs:i()}),ky,{kind:`query`,auth:`admin`}),getDaysWithRecordings:R(y({deviceId:i(),fromMs:i(),toMs:i(),tzOffsetMinutes:i()}),Ay,{kind:`query`,auth:`admin`}),getPlaybackManifest:R(y({deviceId:i(),fromMs:i(),toMs:i()}),jy,{kind:`query`,auth:`admin`}),getStorageUsage:R(y({}),Py,{kind:`query`,auth:`admin`}),getDeviceConfig:R(y({deviceId:i()}),on,{kind:`query`,auth:`admin`}),locateSegment:R(y({deviceId:i(),profile:a(),epochMs:i()}),Fy,{kind:`query`,auth:`admin`}),readSegmentBytes:R(y({deviceId:i(),profile:a(),startMs:i()}),Iy,{kind:`query`,auth:`admin`}),setDeviceConfig:R(y({deviceId:i(),config:on}),on,{kind:`mutation`,auth:`admin`}),rescanStorage:R(y({deviceId:i()}),Dy,{kind:`mutation`,auth:`admin`}),pruneFootage:R(y({deviceId:i()}),y({floorMs:i().nullable(),deletedBuckets:i().int(),reclaimedBytes:i().int()}),{kind:`mutation`,auth:`admin`})}},Ry=y({camStreamId:a().min(1),kind:Tt,url:a().optional(),codec:a().optional(),resolution:C.optional(),fps:i().positive().optional(),label:a().optional(),deviceFeatures:h(a()).optional(),autoEligible:m().optional(),metadata:o(a(),r()).optional()}),zy={name:`stream-catalog`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[F.Camera],methods:{getCatalog:R(y({deviceId:i().int().nonnegative()}),h(Ry).readonly())}},By=[{profile:`main`,prefix:`streamMain`,label:`Main stream`},{profile:`sub`,prefix:`streamSub`,label:`Sub stream`},{profile:`ext`,prefix:`streamExt`,label:`Third stream`}];function Vy(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 Hy(e,t){let n=[];for(let r of By){let i=e[r.profile];if(!i)continue;let a=Vy(r,i,t?.[r.profile]);a&&n.push(a)}return n.length===0?null:{sections:n}}function Uy(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 Wy=y({streaming:m(),notifications:m(),objectDetection:m(),remoteAccess:m(),agentCluster:m(),smartHome:m(),recordings:m(),backup:m(),repl:m()}),Gy=y({status:c(`ok`),uptime:i()}),Ky=y({name:a(),address:a(),family:a(),internal:m()}),qy={name:`system`,scope:`system`,mode:`singleton`,methods:{info:R(_(),Wy),health:R(_(),Gy),featureFlags:R(_(),Wy),networkAddresses:R(_(),h(Ky).readonly()),getRetentionConfig:R(_(),r().nullable(),{auth:`admin`}),setRetentionConfig:R(o(a(),r()),te(),{kind:`mutation`,auth:`admin`}),forceRetentionCleanup:R(_(),_(),{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},Jy=y({title:a(),message:a(),severity:v([`info`,`warning`,`critical`]),duration:i().optional(),action:y({label:a(),url:a()}).optional()}),Yy={name:`toast`,scope:`system`,mode:`singleton`,methods:{onToast:R(_(),Jy,{kind:`subscription`})},mount:{kind:`server-provided`}},Xy=y({id:a(),username:a(),isAdmin:m().default(!1),allowedProviders:g([h(a()),c(`*`)]),allowedDevices:o(a(),g([h(a()),c(`*`)])),scopes:h($).default([]),totpEnabled:m().default(!1),createdAt:i(),updatedAt:i()}),Zy=y({username:a(),password:a().min(6),isAdmin:m().default(!1),allowedProviders:g([h(a()),c(`*`)]).optional(),allowedDevices:o(a(),g([h(a()),c(`*`)])).optional(),scopes:h($).optional()}),Qy=y({id:a(),isAdmin:m().optional(),allowedProviders:g([h(a()),c(`*`)]).optional(),allowedDevices:o(a(),g([h(a()),c(`*`)])).optional(),scopes:h($).optional()}),$y=y({id:a(),label:a(),isAdmin:m().default(!1),allowedProviders:g([h(a()),c(`*`)]).optional(),allowedDevices:o(a(),g([h(a()),c(`*`)])).optional(),tokenPrefix:a(),createdAt:i(),lastUsedAt:i().optional()}),eb=y({label:a(),isAdmin:m().default(!1),allowedProviders:g([h(a()),c(`*`)]).optional(),allowedDevices:o(a(),g([h(a()),c(`*`)])).optional()}),tb=y({token:a(),record:$y}),nb=y({id:a(),userId:a(),name:a(),tokenPrefix:a(),scopes:h($),expiresAt:i().nullish(),lastUsedAt:i().nullish(),createdAt:i()}),rb=y({userId:a(),name:a(),scopes:h($),expiresAt:i().optional()}),ib=y({token:a(),record:nb}),ab=y({id:a(),userId:a(),username:a(),integrationId:a(),scopes:h($),createdAt:i(),lastUsedAt:i(),revokedAt:i().nullable()}),ob=y({secret:a(),otpauthUrl:a()}),sb=y({enabled:m(),confirmedAt:i().nullable()}),cb={name:`user-management`,scope:`system`,mode:`singleton`,methods:{listUsers:R(_(),h(Xy),{auth:`admin`}),createUser:R(Zy,Xy,{kind:`mutation`,auth:`admin`,access:`create`}),updateUser:R(Qy,y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),deleteUser:R(y({id:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),resetPassword:R(y({id:a(),newPassword:a().min(6)}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),setUserScopes:R(y({userId:a(),scopes:h($)}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),validateCredentials:R(y({username:a(),password:a()}),Xy.extend({passwordHash:a()}).nullable(),{kind:`mutation`,access:`view`}),listApiKeys:R(_(),h($y),{auth:`admin`}),createApiKey:R(eb,tb,{kind:`mutation`,auth:`admin`,access:`create`}),revokeApiKey:R(y({id:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),validateApiKey:R(y({token:a()}),$y.nullable(),{kind:`mutation`,access:`view`}),createScopedToken:R(rb,ib,{kind:`mutation`,auth:`admin`,access:`create`}),revokeScopedToken:R(y({id:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),validateScopedToken:R(y({token:a()}),nb.nullable(),{access:`view`}),listScopedTokens:R(y({userId:a()}),h(nb),{auth:`admin`}),setupTotp:R(y({userId:a()}),ob,{kind:`mutation`,auth:`admin`,access:`create`}),confirmTotp:R(y({userId:a(),code:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),disableTotp:R(y({userId:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),getTotpStatus:R(y({userId:a()}),sb,{auth:`admin`}),verifyTotp:R(y({userId:a(),code:a()}),y({valid:m()}),{kind:`mutation`,access:`view`}),oauthIssueCode:R(y({integrationId:a(),userId:a(),username:a(),scopes:h($),redirectUri:a(),hubUrl:a()}),y({code:a()}),{kind:`mutation`,access:`create`}),oauthExchangeCode:R(y({code:a(),redirectUri:a()}),y({accessToken:a(),refreshToken:a(),expiresIn:i()}).nullable(),{kind:`mutation`,access:`view`}),oauthRefresh:R(y({refreshToken:a()}),y({accessToken:a(),refreshToken:a(),expiresIn:i()}).nullable(),{kind:`mutation`,access:`view`}),oauthVerifyAccessToken:R(y({token:a()}),y({userId:a(),username:a(),scopes:h($)}).nullable(),{access:`view`}),listOauthSessions:R(_(),h(ab),{auth:`admin`}),revokeOauthSession:R(y({id:a()}),y({success:m()}),{kind:`mutation`,auth:`admin`,access:`delete`})}},lb=[`decoder`,`motion-detection`,`pipeline-executor`,`audio-analyzer`,`pipeline-analytics`,`notification-output`],ub=[...lb,`pipeline-orchestrator`,`pipeline-runner`],db={accessories:`accessories`,addonPages:`addon-pages`,addonPagesSource:`addon-pages-source`,addonRoutes:`addon-routes`,addonSettings:`addon-settings`,addonWidgets:`addon-widgets`,addonWidgetsSource:`addon-widgets-source`,addons:`addons`,adminUi:`admin-ui`,advancedNotifier:`advanced-notifier`,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`,connectivity:`connectivity`,consumables:`consumables`,contact:`contact`,control:`control`,cover:`cover`,customModelRegistry:`custom-model-registry`,dayNight:`day-night`,decoder:`decoder`,detectionPipeline:`detection-pipeline`,deviceAdoption:`device-adoption`,deviceDiscovery:`device-discovery`,deviceExport:`device-export`,deviceManager:`device-manager`,deviceOps:`device-ops`,deviceProvider:`device-provider`,deviceState:`device-state`,deviceStatus:`device-status`,doorbell:`doorbell`,embeddingEncoder:`embedding-encoder`,enumSensor:`enum-sensor`,eventEmitter:`event-emitter`,events:`events`,faceGallery:`face-gallery`,fanControl:`fan-control`,featureProbe:`feature-probe`,filesystemBrowse:`filesystem-browse`,flood:`flood`,gas:`gas`,humidifier:`humidifier`,humiditySensor:`humidity-sensor`,image:`image`,imageSettings:`image-settings`,integrations:`integrations`,intercom:`intercom`,lawnMowerControl:`lawn-mower-control`,localNetwork:`local-network`,lockControl:`lock-control`,logDestination:`log-destination`,loginMethod:`login-method`,mediaPlayer:`media-player`,meshNetwork:`mesh-network`,metricsProvider:`metrics-provider`,modelConvert:`model-convert`,modelDistributor:`model-distributor`,motion:`motion`,motionDetection:`motion-detection`,motionTrigger:`motion-trigger`,motionZones:`motion-zones`,mqttBroker:`mqtt-broker`,nativeObjectDetection:`native-object-detection`,networkAccess:`network-access`,networkQuality:`network-quality`,nodes:`nodes`,notificationOutput:`notification-output`,notifier:`notifier`,numericSensor:`numeric-sensor`,oauthIntegration:`oauth-integration`,osd:`osd`,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`,scriptRunner:`script-runner`,serverManagement:`server-management`,settingsStore:`settings-store`,smoke:`smoke`,smtpProvider:`smtp-provider`,snapshot:`snapshot`,ssoBridge:`sso-bridge`,storage:`storage`,storageEvictable:`storage-evictable`,storageProvider:`storage-provider`,streamBroker:`stream-broker`,streamCatalog:`stream-catalog`,streamParams:`stream-params`,switch:`switch`,system:`system`,tamper:`tamper`,temperatureSensor:`temperature-sensor`,toast:`toast`,turnProvider:`turn-provider`,update:`update`,userManagement:`user-management`,userPasskeys:`user-passkeys`,vacuumControl:`vacuum-control`,valve:`valve`,vibration:`vibration`,videoclips:`videoclips`,viewerUi:`viewer-ui`,waterHeater:`water-heater`,weather:`weather`,webrtcSession:`webrtc-session`,zoneAnalytics:`zone-analytics`,zoneRules:`zone-rules`,zones:`zones`},fb=[{key:`accessories`,name:`accessories`},{key:`addonPages`,name:`addon-pages`},{key:`addonPagesSource`,name:`addon-pages-source`},{key:`addonRoutes`,name:`addon-routes`},{key:`addonSettings`,name:`addon-settings`},{key:`addonWidgets`,name:`addon-widgets`},{key:`addonWidgetsSource`,name:`addon-widgets-source`},{key:`addons`,name:`addons`},{key:`adminUi`,name:`admin-ui`},{key:`advancedNotifier`,name:`advanced-notifier`},{key:`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:`connectivity`,name:`connectivity`},{key:`consumables`,name:`consumables`},{key:`contact`,name:`contact`},{key:`control`,name:`control`},{key:`cover`,name:`cover`},{key:`customModelRegistry`,name:`custom-model-registry`},{key:`dayNight`,name:`day-night`},{key:`decoder`,name:`decoder`},{key:`detectionPipeline`,name:`detection-pipeline`},{key:`deviceAdoption`,name:`device-adoption`},{key:`deviceDiscovery`,name:`device-discovery`},{key:`deviceExport`,name:`device-export`},{key:`deviceManager`,name:`device-manager`},{key:`deviceOps`,name:`device-ops`},{key:`deviceProvider`,name:`device-provider`},{key:`deviceState`,name:`device-state`},{key:`deviceStatus`,name:`device-status`},{key:`doorbell`,name:`doorbell`},{key:`embeddingEncoder`,name:`embedding-encoder`},{key:`enumSensor`,name:`enum-sensor`},{key:`eventEmitter`,name:`event-emitter`},{key:`events`,name:`events`},{key:`faceGallery`,name:`face-gallery`},{key:`fanControl`,name:`fan-control`},{key:`featureProbe`,name:`feature-probe`},{key:`filesystemBrowse`,name:`filesystem-browse`},{key:`flood`,name:`flood`},{key:`gas`,name:`gas`},{key:`humidifier`,name:`humidifier`},{key:`humiditySensor`,name:`humidity-sensor`},{key:`image`,name:`image`},{key:`imageSettings`,name:`image-settings`},{key:`integrations`,name:`integrations`},{key:`intercom`,name:`intercom`},{key:`lawnMowerControl`,name:`lawn-mower-control`},{key:`localNetwork`,name:`local-network`},{key:`lockControl`,name:`lock-control`},{key:`logDestination`,name:`log-destination`},{key:`loginMethod`,name:`login-method`},{key:`mediaPlayer`,name:`media-player`},{key:`meshNetwork`,name:`mesh-network`},{key:`metricsProvider`,name:`metrics-provider`},{key:`modelConvert`,name:`model-convert`},{key:`modelDistributor`,name:`model-distributor`},{key:`motion`,name:`motion`},{key:`motionDetection`,name:`motion-detection`},{key:`motionTrigger`,name:`motion-trigger`},{key:`motionZones`,name:`motion-zones`},{key:`mqttBroker`,name:`mqtt-broker`},{key:`nativeObjectDetection`,name:`native-object-detection`},{key:`networkAccess`,name:`network-access`},{key:`networkQuality`,name:`network-quality`},{key:`nodes`,name:`nodes`},{key:`notificationOutput`,name:`notification-output`},{key:`notifier`,name:`notifier`},{key:`numericSensor`,name:`numeric-sensor`},{key:`oauthIntegration`,name:`oauth-integration`},{key:`osd`,name:`osd`},{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:`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:`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:`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:`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`}],pb=[d_,_d,yd,Cd,Od,Fd,Nd,W_,Rd,Jd,Qi,la,$d,da,ef,sf,hf,ga,_f,va,kf,ba,Sa,wa,Xf,G_,J_,Zf,Wa,Ka,Ya,eo,no,ao,so,fo,ho,cp,xo,fp,pp,Ep,ko,Fp,em,Q_,ku,tm,Ji,Mo,im,Fo,Ro,ev,ov,Vo,Xi,sm,Uo,Go,qo,Yo,Zo,os,mv,vv,us,Tv,ps,um,Sf,vs,kv,km,jm,Pm,xc,Ds,wc,Rc,Km,Uc,Xm,Nv,Yv,dh,Xc,Qc,bh,ty,nl,Rh,oc,pg,vc,ay,yy,il,sl,ll,hl,Ty,bl,Ey,Ly,Sl,bg,Tg,wl,Ag,Ng,Fg,Lg,Bg,Qg,za,zy,jl,Nl,qy,Fl,Ll,Yy,e_,zl,cb,n_,Ul,Kl,Jl,a_,Vd,Xl,Ql,l_,au,uu,lc],mb=`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.script-runner.smoke.snapshot.stream-params.switch.tamper.temperature-sensor.update.vacuum-control.valve.vibration.water-heater.weather`.split(`.`),hb=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.updateFrameworkPackage":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.updatePackage":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addonSettings.getDeviceSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`view`},"addonSettings.getGlobalSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`view`},"addonSettings.updateDeviceSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`create`},"addonSettings.updateGlobalSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`create`},"addonWidgets.listWidgets":{capName:`addon-widgets`,capScope:`system`,addonId:null,access:`view`},"addonWidgetsSource.listWidgets":{capName:`addon-widgets-source`,capScope:`system`,addonId:null,access:`view`},"adminUi.getStaticDir":{capName:`admin-ui`,capScope:`system`,addonId:null,access:`view`},"adminUi.getVersion":{capName:`admin-ui`,capScope:`system`,addonId:null,access:`view`},"advancedNotifier.deleteRule":{capName:`advanced-notifier`,capScope:`system`,addonId:null,access:`delete`},"advancedNotifier.getHistory":{capName:`advanced-notifier`,capScope:`system`,addonId:null,access:`view`},"advancedNotifier.getRules":{capName:`advanced-notifier`,capScope:`system`,addonId:null,access:`view`},"advancedNotifier.testRule":{capName:`advanced-notifier`,capScope:`system`,addonId:null,access:`create`},"advancedNotifier.upsertRule":{capName:`advanced-notifier`,capScope:`system`,addonId:null,access:`create`},"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.getEntries":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.list":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.listArchives":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.listDestinations":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.listLocations":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.previewSchedule":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.restore":{capName:`backup`,capScope:`system`,addonId:null,access:`create`},"backup.trigger":{capName:`backup`,capScope:`system`,addonId:null,access:`create`},"backup.upsertDestinationPolicy":{capName:`backup`,capScope:`system`,addonId:null,access:`create`},"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`},"consumables.reset":{capName:`consumables`,capScope:`device`,addonId:null,access:`delete`},"control.setValue":{capName:`control`,capScope:`device`,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`},"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.adoptionListCandidateFilters":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.adoptionListCandidates":{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.allocateDeviceId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.applyInitialMeta":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.createDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.disable":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoverAllProviders":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoverDevices":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoverProvider":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoveryProviders":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.enable":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.getAllBindings":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getBindings":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getChildren":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getConfigSchema":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getCreationSchema":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceLiveInfoAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceSettingsAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceStatusAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.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.setDeviceLinks":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setDisabled":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setDisplay":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setIntegrationId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setLinkDeviceId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setLocation":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setMetadata":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setName":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setPrimaryChildEntityId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setRole":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setRoleDisplayDefaults":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setStreamProfileMap":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setType":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setWrapperActive":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.testCreationField":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.testField":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.updateConfig":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.updateDeviceField":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.updateDeviceFieldsBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceOps.getConfigEntries":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`},"deviceOps.getRawState":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`},"deviceOps.getSettingsSchema":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`},"deviceOps.getStreamSources":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`},"deviceOps.removeDevice":{capName:`device-ops`,capScope:`device`,addonId:null,access:`delete`},"deviceOps.runAction":{capName:`device-ops`,capScope:`device`,addonId:null,access:`create`},"deviceOps.setConfig":{capName:`device-ops`,capScope:`device`,addonId:null,access:`create`},"deviceProvider.adoptDiscoveredDevice":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.createDevice":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.discoverDevices":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.getChildCreationSchema":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.getDevices":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.getDiscoveryParamsSchema":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.getManualCreationType":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.getStatus":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.start":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.stop":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.supportsDiscovery":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.supportsManualCreation":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.testCreationField":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceState.getAllSnapshots":{capName:`device-state`,capScope:`system`,addonId:null,access:`view`},"deviceState.getCapSlice":{capName:`device-state`,capScope:`system`,addonId:null,access:`view`},"deviceState.getSnapshot":{capName:`device-state`,capScope:`system`,addonId:null,access:`view`},"deviceState.setCapSlice":{capName:`device-state`,capScope:`system`,addonId:null,access:`create`},"embeddingEncoder.encode":{capName:`embedding-encoder`,capScope:`system`,addonId:null,access:`view`},"embeddingEncoder.encodeText":{capName:`embedding-encoder`,capScope:`system`,addonId:null,access:`view`},"embeddingEncoder.getInfo":{capName:`embedding-encoder`,capScope:`system`,addonId:null,access:`view`},"events.getEventClipUrl":{capName:`events`,capScope:`device`,addonId:null,access:`view`},"events.getEvents":{capName:`events`,capScope:`device`,addonId:null,access:`view`},"events.getEventThumbnail":{capName:`events`,capScope:`device`,addonId:null,access:`view`},"faceGallery.assignFace":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.assignFaces":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.createIdentity":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.deleteFace":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`delete`},"faceGallery.deleteIdentity":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`delete`},"faceGallery.getFaceByTrack":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.getFaceMedia":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.listIdentities":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.listIdentitySamples":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.listRecentFaces":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.removeSample":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`delete`},"faceGallery.renameIdentity":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.suggestFaceClusters":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.unassignFace":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.unassignFaces":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"fanControl.setDirection":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"fanControl.setOscillating":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"fanControl.setPercentage":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"fanControl.setPreset":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"filesystemBrowse.browse":{capName:`filesystem-browse`,capScope:`system`,addonId:null,access:`view`},"filesystemBrowse.createDir":{capName:`filesystem-browse`,capScope:`system`,addonId:null,access:`create`},"filesystemBrowse.listAllowedRoots":{capName:`filesystem-browse`,capScope:`system`,addonId:null,access:`view`},"humidifier.setMode":{capName:`humidifier`,capScope:`device`,addonId:null,access:`create`},"humidifier.setOn":{capName:`humidifier`,capScope:`device`,addonId:null,access:`create`},"humidifier.setTargetHumidity":{capName:`humidifier`,capScope:`device`,addonId:null,access:`create`},"imageSettings.getOptions":{capName:`image-settings`,capScope:`device`,addonId:null,access:`view`},"imageSettings.setSettings":{capName:`image-settings`,capScope:`device`,addonId:null,access:`create`},"integrations.create":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`},"integrations.delete":{capName:`integrations`,capScope:`system`,addonId:null,access:`delete`},"integrations.get":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.getAvailableTypes":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.getByAddonId":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.getSettings":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.list":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.setSettings":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`},"integrations.testConnection":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`},"integrations.update":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`},"intercom.endTalkSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.handleAnswer":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.pushTalkAudio":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.startSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.startTalkSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.stopSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"lawnMowerControl.dock":{capName:`lawn-mower-control`,capScope:`device`,addonId:null,access:`create`},"lawnMowerControl.pause":{capName:`lawn-mower-control`,capScope:`device`,addonId:null,access:`create`},"lawnMowerControl.startMowing":{capName:`lawn-mower-control`,capScope:`device`,addonId:null,access:`create`},"localNetwork.getAllowedAddresses":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getConnectionEndpoints":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getPreferred":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.list":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.resetAllowlistToBestMatch":{capName:`local-network`,capScope:`system`,addonId:null,access:`delete`},"localNetwork.setAllowedAddresses":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"lockControl.lock":{capName:`lock-control`,capScope:`device`,addonId:null,access:`create`},"lockControl.open":{capName:`lock-control`,capScope:`device`,addonId:null,access:`create`},"lockControl.unlock":{capName:`lock-control`,capScope:`device`,addonId:null,access:`create`},"logDestination.query":{capName:`log-destination`,capScope:`system`,addonId:null,access:`view`},"logDestination.write":{capName:`log-destination`,capScope:`system`,addonId:null,access:`create`},"loginMethod.getLoginMethods":{capName:`login-method`,capScope:`system`,addonId:null,access:`view`},"mediaPlayer.next":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.pause":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.play":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.playMedia":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.previous":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.seek":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.selectSource":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setMute":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setRepeat":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setShuffle":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setVolume":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.stop":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"meshNetwork.getStatus":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`view`},"meshNetwork.join":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"meshNetwork.leave":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"meshNetwork.listPeers":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`view`},"meshNetwork.logout":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"meshNetwork.startLogin":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"meshNetwork.testConnection":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"metricsProvider.collectSnapshot":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.dumpHeapSnapshot":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`create`},"metricsProvider.getAddonStats":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getCached":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getCpuTemperature":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getCurrent":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getDiskSpace":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getGpuInfo":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getProcessStats":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.killProcess":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`create`},"metricsProvider.listAddonInstances":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.listNodeProcesses":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"modelConvert.convert":{capName:`model-convert`,capScope:`system`,addonId:null,access:`create`},"modelDistributor.distributeModel":{capName:`model-distributor`,capScope:`system`,addonId:null,access:`create`},"motion.isDetected":{capName:`motion`,capScope:`device`,addonId:null,access:`view`},"motionDetection.analyze":{capName:`motion-detection`,capScope:`device`,addonId:null,access:`create`},"motionDetection.removeCamera":{capName:`motion-detection`,capScope:`device`,addonId:null,access:`delete`},"motionDetection.reset":{capName:`motion-detection`,capScope:`device`,addonId:null,access:`delete`},"motionTrigger.setMotionTrigger":{capName:`motion-trigger`,capScope:`device`,addonId:null,access:`create`},"motionZones.getOptions":{capName:`motion-zones`,capScope:`device`,addonId:null,access:`view`},"motionZones.setZone":{capName:`motion-zones`,capScope:`device`,addonId:null,access:`create`},"mqttBroker.addBroker":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`create`},"mqttBroker.getBrokerConfig":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`view`},"mqttBroker.getStatus":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`view`},"mqttBroker.listBrokers":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`view`},"mqttBroker.removeBroker":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`delete`},"mqttBroker.startEmbeddedBroker":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`create`},"mqttBroker.stopEmbeddedBroker":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`create`},"mqttBroker.testConnection":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`create`},"nativeObjectDetection.setEnabled":{capName:`native-object-detection`,capScope:`device`,addonId:null,access:`create`},"networkAccess.getEndpoint":{capName:`network-access`,capScope:`system`,addonId:null,access:`view`},"networkAccess.getStatus":{capName:`network-access`,capScope:`system`,addonId:null,access:`view`},"networkAccess.listEndpoints":{capName:`network-access`,capScope:`system`,addonId:null,access:`view`},"networkAccess.start":{capName:`network-access`,capScope:`system`,addonId:null,access:`create`},"networkAccess.stop":{capName:`network-access`,capScope:`system`,addonId:null,access:`create`},"networkQuality.getAllStats":{capName:`network-quality`,capScope:`system`,addonId:null,access:`view`},"networkQuality.getDeviceStats":{capName:`network-quality`,capScope:`system`,addonId:null,access:`view`},"networkQuality.reportClientStats":{capName:`network-quality`,capScope:`system`,addonId:null,access:`create`},"nodes.clusterAddonStatus":{capName:`nodes`,capScope:`system`,addonId:null,access:`view`},"nodes.deployAddon":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.executeQuery":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.getCapUsageGraph":{capName:`nodes`,capScope:`system`,addonId:null,access:`view`},"nodes.getNodeAddons":{capName:`nodes`,capScope:`system`,addonId:null,access:`view`},"nodes.renameNode":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.restartAddon":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.restartNode":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.restartProcess":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.setProcessLogLevel":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.shutdownNode":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.topology":{capName:`nodes`,capScope:`system`,addonId:null,access:`view`},"nodes.undeployAddon":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.deleteTarget":{capName:`notification-output`,capScope:`system`,addonId:null,access:`delete`},"notificationOutput.discoverTargets":{capName:`notification-output`,capScope:`system`,addonId:null,access:`view`},"notificationOutput.listTargetKinds":{capName:`notification-output`,capScope:`system`,addonId:null,access:`view`},"notificationOutput.listTargets":{capName:`notification-output`,capScope:`system`,addonId:null,access:`view`},"notificationOutput.send":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.setTargetEnabled":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.testTarget":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.upsertTarget":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"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`},"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.clearTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.getActiveTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getAudioEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getEventDensity":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getEventMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getMotionEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getObjectEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getTrack":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getTrackMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.pruneEventsBefore":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.searchObjectEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineExecutor.cacheFrameInPool":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.clearDeviceOverrides":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`delete`},"pipelineExecutor.deleteModel":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`delete`},"pipelineExecutor.deleteTemplate":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`delete`},"pipelineExecutor.downloadModel":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.getAddonModels":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getAudioCapabilities":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getAvailableEngines":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getCapabilities":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getDefaultSteps":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getDetectionConfigSchema":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getEffectiveTuning":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getEngineProvisioning":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getGlobalPipelineConfig":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getGlobalSteps":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getOrchestratorConfigSchema":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getReferenceAudio":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getReferenceAudioFiles":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getReferenceImage":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getSchema":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getSelectedEngine":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getVideoPipelineSteps":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.inferCached":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.killEngine":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.listLoadedEngines":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.listReferenceImages":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.listTemplates":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.reprobeEngine":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.runAudioTest":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.runPipeline":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.runPipelineBatch":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.saveTemplate":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.setVideoPipelineSteps":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.spinEngine":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.uncacheFrame":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.updateTemplate":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"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.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.getPipelineAssignment":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getPipelineAssignments":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.listAgentSettings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.listTemplates":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.rebalance":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.removeAgentSettings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`delete`},"pipelineOrchestrator.resetNodePipelineDefaults":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`delete`},"pipelineOrchestrator.resolvePipeline":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.saveTemplate":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentAddonDefaults":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentCapabilities":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentDetectWeight":{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.setCapabilityBinding":{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.reportMotion":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"plateGallery.correctPlateText":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.deletePlate":{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.searchPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.suggestPlateClusters":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"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.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.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.getStorageUsage":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.locateSegment":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.pruneFootage":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.readSegmentBytes":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.rescanStorage":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.setDeviceConfig":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"scriptRunner.run":{capName:`script-runner`,capScope:`device`,addonId:null,access:`create`},"scriptRunner.stop":{capName:`script-runner`,capScope:`device`,addonId:null,access:`create`},"serverManagement.applyServerUpdate":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"serverManagement.checkServerUpdate":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"serverManagement.getServerPackageStatus":{capName:`server-management`,capScope:`system`,addonId:null,access:`view`},"serverManagement.restartServer":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"serverManagement.rollbackServerUpdate":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"settingsStore.count":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.declareCollection":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"settingsStore.delete":{capName:`settings-store`,capScope:`system`,addonId:null,access:`delete`},"settingsStore.get":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.histogram":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.insert":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"settingsStore.isEmpty":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.query":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.set":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"settingsStore.update":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"smtpProvider.getStatus":{capName:`smtp-provider`,capScope:`system`,addonId:null,access:`view`},"smtpProvider.sendEmail":{capName:`smtp-provider`,capScope:`system`,addonId:null,access:`create`},"smtpProvider.verify":{capName:`smtp-provider`,capScope:`system`,addonId:null,access:`view`},"snapshot.getSnapshot":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.invalidateCache":{capName:`snapshot`,capScope:`device`,addonId:null,access:`create`},"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`},"storageProvider.abortUpload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.beginDownload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.beginUpload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.delete":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`delete`},"storageProvider.endDownload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.exists":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.finalizeUpload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.getAvailableSpace":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.getProviderInfo":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.list":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.read":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.readChunk":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.resolve":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.testLocation":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.write":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.writeChunk":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"streamBroker.assignProfile":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.getAllRtspEntries":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getBrokerStats":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getPreBufferInfo":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getRtspEntry":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getRtspPort":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getStreamUrl":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getStreamWithCodec":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.isRtspEnabled":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.killClient":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.listAllCameraStreams":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.listAllProfileSlots":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.listClients":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.probeStream":{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.releaseStreamWithCodec":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.restartProfile":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.retractCameraStream":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.setPreBufferDuration":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.setRtspEnabled":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.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.featureFlags":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.forceRetentionCleanup":{capName:`system`,capScope:`system`,addonId:null,access:`create`},"system.getRetentionConfig":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.health":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.info":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.networkAddresses":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.setRetentionConfig":{capName:`system`,capScope:`system`,addonId:null,access:`create`},"toast.onToast":{capName:`toast`,capScope:`system`,addonId:null,access:`view`},"turnProvider.getTurnServers":{capName:`turn-provider`,capScope:`system`,addonId:null,access:`view`},"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`},"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`}}),gb=`accessories.addon-pages.addon-pages-source.addon-routes.addon-settings.addon-widgets.addon-widgets-source.addons.admin-ui.advanced-notifier.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.consumables.control.cover.custom-model-registry.day-night.decoder.device-adoption.device-discovery.device-export.device-manager.device-ops.device-provider.device-state.embedding-encoder.events.face-gallery.fan-control.filesystem-browse.humidifier.image-settings.integrations.intercom.lawn-mower-control.local-network.lock-control.log-destination.login-method.media-player.mesh-network.metrics-provider.model-convert.model-distributor.motion.motion-detection.motion-trigger.motion-zones.mqtt-broker.native-object-detection.network-access.network-quality.nodes.notification-output.notifier.oauth-integration.osd.pet-feeder.pipeline-analytics.pipeline-executor.pipeline-orchestrator.pipeline-runner.plate-gallery.platform-probe.privacy-mask.ptz.ptz-autotrack.reboot.recording.script-runner.server-management.settings-store.smtp-provider.snapshot.sso-bridge.storage.storage-evictable.storage-provider.stream-broker.stream-catalog.stream-params.switch.system.toast.turn-provider.update.user-management.user-passkeys.vacuum-control.valve.videoclips.viewer-ui.water-heater.webrtc-session.zone-analytics.zone-rules.zones`.split(`.`),_b=`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.script-runner.snapshot.stream-catalog.stream-params.switch.update.vacuum-control.valve.videoclips.water-heater.webrtc-session.zone-analytics.zone-rules.zones`.split(`.`),vb=`addon-pages.addon-pages-source.addon-routes.addon-settings.addon-widgets.addon-widgets-source.addons.admin-ui.advanced-notifier.alerts.audio-analyzer.audio-codec.auth-provider.backup.broker.custom-model-registry.decoder.device-adoption.device-export.device-manager.device-provider.device-state.embedding-encoder.face-gallery.filesystem-browse.integrations.local-network.log-destination.login-method.mesh-network.metrics-provider.model-convert.model-distributor.mqtt-broker.network-access.network-quality.nodes.notification-output.oauth-integration.pipeline-executor.pipeline-orchestrator.pipeline-runner.plate-gallery.platform-probe.recording.server-management.settings-store.smtp-provider.sso-bridge.storage.storage-evictable.storage-provider.stream-broker.system.toast.turn-provider.user-management.user-passkeys.viewer-ui`.split(`.`),yb=[{id:`camera-viewer`,label:`Camera viewer`,description:"Read-only over every device — live streams, recordings, motion events, battery state. Combine with `allowedDevices` to restrict to specific cameras.",rows:[{type:`category`,target:`device`,access:[`view`]}]},{id:`camera-operator`,label:`Camera operator`,description:"Everything `camera-viewer` does plus PTZ control, intercom, snapshots and recording start/stop. Cannot delete devices or recordings.",rows:[{type:`category`,target:`device`,access:[`view`,`create`]}]},{id:`cli-deployer`,label:`CLI deployer`,description:"Push addons to the hub and tail their logs. Used by the `camstack` CLI on dev machines. No delete access — a stolen token cannot uninstall.",rows:[{type:`capability`,target:`addons`,access:[`view`,`create`]}]},{id:`event-listener`,label:`Event listener`,description:`Subscribe to motion / audio events. Used by webhook bridges and Home Assistant integrations.`,rows:[{type:`capability`,target:`events`,access:[`view`]},{type:`capability`,target:`motion-detection`,access:[`view`]},{type:`capability`,target:`audio-analysis`,access:[`view`]}]}],bb=Object.freeze({broker:`broker`,"device-export":`device-export`,"mesh-network":`mesh`,"mqtt-broker":`broker`,"network-access":`ingress`,"smtp-provider":`email`}),xb=[`broker`,`device-export`,`mesh-network`,`mqtt-broker`,`network-access`,`smtp-provider`];function Sb(e){let t=[];for(let[n,r]of Object.entries(bb))r===e&&t.push(n);return t}var Cb=y({name:a(),stagedPath:a(),backupPath:a(),toVersion:a(),fromVersion:a().nullable()}),wb=y({jobId:a(),taskId:a(),packages:h(Cb),requestedAtMs:i(),schemaVersion:c(1)}),Tb=y({jobId:a(),taskId:a(),backups:h(y({name:a(),backupPath:a(),livePath:a()})),appliedAtMs:i(),bootAttempts:i(),schemaVersion:c(1)});function Eb(e,t){let n=e.length,r=t.length;if(n===0)return r;if(r===0)return n;let i=Array.from({length:r+1},(e,t)=>t),a=Array.from({length:r+1},()=>0);for(let o=1;o<=n;o++){a[0]=o;let n=i[0]??0;for(let s=1;s<=r;s++){let r=i[s]??0,c=a[s-1]??0,l=e.charCodeAt(o-1)===t.charCodeAt(s-1)?0:1;a[s]=Math.min(r+1,c+1,n+l),n=r}for(let e=0;e<=r;e++)i[e]=a[e]??0}return i[r]??0}function Db(e,t){let n=e.trim().toLowerCase(),r=t.trim().toLowerCase();return n===r?1:n.length===0||r.length===0?0:1-Eb(n,r)/Math.max(n.length,r.length)}function Ob(e,t,n=.8){let r=null,i=0;for(let a of t){let t=Db(e,a);t>=n&&t>i&&(r=a,i=t)}return r}var kb=[/^user$/i,/^usr$/i,/^username$/i,/^password$/i,/^pwd$/i,/^pass$/i,/^passwd$/i,/^secret$/i,/^token$/i,/^auth$/i,/^auth[_-]?token$/i,/^bearer$/i,/^api[_-]?key$/i,/^access[_-]?token$/i,/^refresh[_-]?token$/i];function Ab(e){return kb.some(t=>t.test(e))}function jb(e){try{let t=new URL(e),n=!1;(t.username||t.password)&&(t.username=``,t.password=``,n=!0);for(let e of Array.from(t.searchParams.keys()))Ab(e)&&(t.searchParams.set(e,`***`),n=!0);return n?t.toString():e}catch{return e}}var Mb=class{capacity;items;head=0;tail=0;count=0;constructor(e){this.capacity=e,this.items=Array.from({length:e})}get size(){return this.count}push(e){this.items[this.tail]=e,this.tail=(this.tail+1)%this.capacity,this.count<this.capacity?this.count++:this.head=(this.head+1)%this.capacity}drain(e){let t=[],n=Math.min(e,this.count);for(let e=0;e<n;e++)t.push(this.items[this.head]),this.items[this.head]=void 0,this.head=(this.head+1)%this.capacity;return this.count-=n,t}};function Nb(e,t,n){let r=t*n;if(r<=0||e.length===0)return Array.from({length:Math.max(0,r)}).fill(!1);let i=Array.from({length:r}).fill(!1);for(let r=0;r<n;r++)for(let a=0;a<t;a++){let o=(a+.5)/t,s=(r+.5)/n;for(let n of e)if(o>=n.x&&o<=n.x+n.w&&s>=n.y&&s<=n.y+n.h){i[r*t+a]=!0;break}}return i}function Pb(e,t,n,r){if(t<=0||n<=0||r<=0)return[];let i=t*n,a=Array.from({length:i}).fill(!1),o=Math.min(e.length,i);for(let t=0;t<o;t++)a[t]=e[t]===!0;let s=[],c=[];for(let e=0;e<=n;e++){let r=[];if(e<n){let n=-1;for(let i=0;i<=t;i++){let o=i<t&&a[e*t+i]===!0;o&&n===-1?n=i:!o&&n!==-1&&(r.push({colStart:n,colEnd:i-1}),n=-1)}}let i=new Set,o=[];for(let t of c){let n=r.findIndex(e=>e.colStart===t.colStart&&e.colEnd===t.colEnd);n>=0?(o.push(t),i.add(n)):s.push({...t,rowEnd:e-1})}for(let t=0;t<r.length;t++)if(!i.has(t)){let n=r[t];o.push({colStart:n.colStart,colEnd:n.colEnd,rowStart:e})}c.length=0;for(let e of o)c.push(e)}if(s.length===0)return[];let l=s.slice().toSorted((e,t)=>{let n=(e.colEnd-e.colStart+1)*(e.rowEnd-e.rowStart+1);return(t.colEnd-t.colStart+1)*(t.rowEnd-t.rowStart+1)-n});return(r>0?l.slice(0,r):l).map(e=>({x:e.colStart/t,y:e.rowStart/n,w:(e.colEnd-e.colStart+1)/t,h:(e.rowEnd-e.rowStart+1)/n}))}function Fb(e){return new Promise(t=>setTimeout(t,Math.max(0,e)))}function Ib(e,t){return t.aborted?Promise.resolve():new Promise(n=>{let r=setTimeout(()=>{t.removeEventListener(`abort`,i),n()},Math.max(0,e)),i=()=>{clearTimeout(r),t.removeEventListener(`abort`,i),n()};t.addEventListener(`abort`,i,{once:!0})})}function Lb(e,t,n){let r={};for(let i of Object.keys(n))r[i]=n=>e.addons.custom.mutate({addonId:t,action:i,input:n});return r}var Rb={value:`auto`,label:`Auto`},zb={value:`cpu`,label:`CPU`},Bb=[{id:`onnx`,supports:()=>!0,devices:e=>{if(!e)return[zb];let t=[zb];return e.gpu?.type===`nvidia`&&t.push({value:`cuda`,label:`CUDA`}),e.npu?.type===`apple-ane`&&t.push({value:`coreml`,label:`CoreML EP`}),t},defaultDevice:`cpu`},{id:`openvino`,supports:e=>e?.arch===`x64`&&e.platform!==`darwin`&&e.gpu?.type===`intel`,devices:e=>{if(!e)return[Rb];let t=[Rb,zb];return e.gpu?.type===`intel`&&t.push({value:`gpu`,label:`GPU`}),e.npu?.type===`intel-npu`&&t.push({value:`npu`,label:`NPU`}),t},defaultDevice:`auto`},{id:`coreml`,supports:e=>e?.platform===`darwin`,devices:e=>{let t={value:`all`,label:`All (ANE + GPU + CPU)`};if(!e)return[t];let n=[t];return e.npu?.type===`apple-ane`&&n.push({value:`ane`,label:`Apple Neural Engine`}),n.push({value:`gpu`,label:`GPU`},zb),n},defaultDevice:`all`}];function Vb(e){let t=Bb.find(t=>t.id===e);if(!t)throw Error(`Unknown runtime: ${e}`);return t}function Hb(e){return Bb.filter(t=>t.supports(e)).map(e=>e.id)}function Ub(e,t){return Vb(e).devices(t)}function Wb(e){return Vb(e).defaultDevice}function Gb(e){return hr(e)}function Kb(e){let t=[];if(e.platform===`darwin`&&e.arch===`arm64`&&t.push({runtime:`python`,backend:`coreml`,format:`coreml`,score:95,reason:`Apple Neural Engine (Python CoreML)`,available:!0}),e.gpu?.type===`nvidia`&&t.push({runtime:`python`,backend:`cuda`,format:`onnx`,score:85,reason:`NVIDIA CUDA (Python ONNX Runtime)`,available:!0}),e.gpu?.type===`intel`){let n=e.npu?.type===`intel-npu`?90:80;t.push({runtime:`python`,backend:`openvino`,format:`openvino`,score:n,reason:`Intel OpenVINO`,available:!0})}t.push({runtime:`python`,backend:`cpu`,format:`onnx`,score:50,reason:`CPU (Python ONNX Runtime)`,available:!0});let n=t.toSorted((e,t)=>t.score-e.score);return{scores:n,best:n.find(e=>e.available)??n[n.length-1]}}var qb=t({ACCESSORY_LABEL:()=>vi,ALL_CAPABILITY_DEFINITIONS:()=>pb,APPLE_SA_TO_MACRO:()=>Dr,AUDIO_BACKEND_CHOICES:()=>af,AUDIO_MACRO_LABELS:()=>Tr,AccessoriesStatusSchema:()=>u_,AccessoryKind:()=>L,AddBrokerInputSchema:()=>zm,AddonAutoUpdateSchema:()=>M_,AddonListItemSchema:()=>E_,AddonPageDeclarationSchema:()=>vd,AddonPageInfoSchema:()=>gd,AdoptionAdoptInputSchema:()=>xp,AdoptionAdoptResultSchema:()=>Sp,AdoptionFilterSchema:()=>mp,AdoptionGetCandidateInputSchema:()=>vp,AdoptionListCandidatesInputSchema:()=>gp,AdoptionListCandidatesOutputSchema:()=>_p,AdoptionReleaseInputSchema:()=>Cp,AdoptionStatusSchema:()=>yp,AgentLoadSummarySchema:()=>qh,AirQualitySensorStatusSchema:()=>Zi,AlarmArmModeSchema:()=>sa,AlarmPanelStatusSchema:()=>ca,AlarmStateSchema:()=>oa,AlertSchema:()=>Qd,AlertSeveritySchema:()=>Yd,AlertSourceSchema:()=>Zd,AlertStatusSchema:()=>Xd,AmbientLightSensorStatusSchema:()=>ua,ApiKeyRecordSchema:()=>_h,ApiKeySummarySchema:()=>$y,ArchiveEntrySchema:()=>Ef,ArchiveManifestSchema:()=>Df,AttachmentMediaTypeSchema:()=>Zm,AttachmentSchema:()=>Qm,AudioAnalysisResultSchema:()=>tf,AudioAnalysisSettingsSchema:()=>nf,AudioChunkInputSchema:()=>Ss,AudioClassSummarySchema:()=>fa,AudioClassificationLabelSchema:()=>ws,AudioClassificationResultSchema:()=>rf,AudioCodecInfoSchema:()=>lf,AudioDecodeSessionConfigSchema:()=>uf,AudioEncodeSchema:()=>Ln,AudioEncodeSessionConfigSchema:()=>df,AudioEncodedChunkSchema:()=>pf,AudioEventSchema:()=>Ah,AudioLevelSchema:()=>Cs,AudioMetricsHistoryPointSchema:()=>ma,AudioMetricsHistorySchema:()=>ha,AudioMetricsSnapshotSchema:()=>pa,AudioPcmChunkSchema:()=>ff,AuthResultSchema:()=>gf,AutoUpdateSettingsSchema:()=>j_,AutomationControlStatusSchema:()=>_a,AvailableIntegrationTypeSchema:()=>lv,BACKEND_TO_FORMAT:()=>cr,BATTERY_DEVICE_PROFILE:()=>xi,BacklightModeSchema:()=>ts,BackupDestinationInfoSchema:()=>Cf,BackupEntrySchema:()=>Tf,BaseAddon:()=>pt,BaseDevice:()=>fu,BaseDeviceProvider:()=>ju,BatteryStatusSchema:()=>ya,BinaryStatusSchema:()=>xa,BoundingBoxSchema:()=>H,BrightnessStatusSchema:()=>Ca,BrokerAddInputSchema:()=>If,BrokerAudioClientSchema:()=>ka,BrokerClientsSchema:()=>Na,BrokerConnectionDetailsSchema:()=>Rm,BrokerConsumerAttributionSchema:()=>ja,BrokerConsumerKindSchema:()=>Aa,BrokerDecodedClientSchema:()=>Oa,BrokerEncodedClientSchema:()=>Ma,BrokerGetStateInputSchema:()=>Yf,BrokerInfoSchema:()=>Lm,BrokerProviderInfoSchema:()=>Nf,BrokerPublishInputSchema:()=>Gf,BrokerRegistryStatusSchema:()=>Mf,BrokerRtspClientSchema:()=>Da,BrokerStatsSchema:()=>Gt,BrokerStatusEnum:()=>Af,BrokerStatusSchema:()=>Wt,BrokerSubscribeInputSchema:()=>Kf,BrokerSubscribeResultSchema:()=>qf,BrokerTestConnectionResultSchema:()=>zf,BrokerUnsubscribeInputSchema:()=>Jf,CAM_PROFILE_ORDER:()=>wt,CAPABILITY_NAMES:()=>db,CAPABILITY_ROUTER_KEYS:()=>fb,CAP_NAMES_WITH_STATUS:()=>mb,CAP_NODE_PIN_CONTEXT_KEY:()=>qn,CAP_PROVIDER_KIND_MAP:()=>bb,COCO_80_LABELS:()=>Sr,COCO_TO_MACRO:()=>wr,CamProfileSchema:()=>S,CamStreamDescriptorSchema:()=>Ry,CamStreamKindSchema:()=>Tt,CamStreamResolutionSchema:()=>C,CameraAssignmentStatusSchema:()=>$h,CameraAudioStatusSchema:()=>lg,CameraBrokerProfileSchema:()=>eg,CameraBrokerStatusSchema:()=>tg,CameraCredentialsSchema:()=>K_,CameraCredentialsStatusSchema:()=>q_,CameraDecoderShmSchema:()=>ng,CameraDecoderStatusSchema:()=>rg,CameraDetectionPhaseSchema:()=>sg,CameraDetectionProvisioningSchema:()=>og,CameraDetectionProvisioningStateSchema:()=>ag,CameraDetectionStatusSchema:()=>cg,CameraMetricsSchema:()=>ks,CameraMetricsWithDeviceIdSchema:()=>As,CameraMotionStatusSchema:()=>ig,CameraRecordingModeSchema:()=>ug,CameraRecordingStatusSchema:()=>dg,CameraSourceStatusSchema:()=>Qh,CameraSourceStreamSchema:()=>Zh,CameraStatusSchema:()=>fg,CameraStreamSchema:()=>Et,CandidateQueryFilterSchema:()=>hp,CapScopeSchema:()=>hh,CapabilityBindingsSchema:()=>Yh,CarbonMonoxideStatusSchema:()=>Ga,ChargingStatus:()=>_i,ClientNetworkStatsSchema:()=>jv,ClimateControlStatusSchema:()=>Ja,ClipPlaybackSchema:()=>i_,ClipSchema:()=>r_,ClusterAddonNodeDeploymentSchema:()=>Vv,ClusterAddonStatusEntrySchema:()=>Hv,CollectionColumnSchema:()=>Cg,CollectionIndexSchema:()=>wg,ColorStatusSchema:()=>$a,ConfigEntrySchema:()=>Kp,ConfigSectionWithValuesSchema:()=>Td,ConfigTabDeclarationSchema:()=>wd,ConnectivityStatusSchema:()=>to,ConsumableItemSchema:()=>ro,ConsumablesStatusSchema:()=>io,ContactStatusSchema:()=>oo,ControlKindSchema:()=>co,ControlStatusSchema:()=>lo,ConvertArtifactSchema:()=>Ee,ConvertResultSchema:()=>De,ConvertTargetSchema:()=>we,CoverStateSchema:()=>po,CoverStatusSchema:()=>mo,CreateApiKeyInputSchema:()=>eb,CreateApiKeyResultSchema:()=>tb,CreateIntegrationInputSchema:()=>dv,CreateScopedTokenInputSchema:()=>rb,CreateScopedTokenResultSchema:()=>ib,CreateUserInputSchema:()=>Zy,CustomActionInputSchema:()=>U_,CustomModelDescriptorSchema:()=>sp,DATAPLANE_SECRET_HEADER:()=>vn,DEFAULT_ADDON_PLACEMENT:()=>Be,DEFAULT_AUDIO_ANALYZER_CONFIG:()=>of,DEFAULT_DECODER_HWACCEL_CONFIG:()=>up,DEFAULT_FEATURES:()=>jn,DEFAULT_RETENTION:()=>Hn,DEVICE_CAP_NAMES:()=>_b,DEVICE_PROFILES:()=>Si,DEVICE_SETTINGS_CONTRIBUTION_METHODS:()=>na,DEVICE_STATUS_METHOD:()=>ra,DEVICE_TYPE_INFO:()=>jr,DayNightModeSchema:()=>go,DayNightOptionsSchema:()=>yo,DayNightSettingsPatchSchema:()=>bo,DayNightStatusSchema:()=>vo,DecodedAudioChunkSchema:()=>Vt,DecodedFrameSchema:()=>It,DecoderSessionConfigSchema:()=>Fn,DecoderStatsSchema:()=>Pn,DeleteIntegrationResultSchema:()=>pv,DetectionSourceSchema:()=>Oh,DeviceCodeSeveritySchema:()=>cs,DeviceConfig:()=>wi,DeviceDiscoveryStatusSchema:()=>Oo,DeviceExportExposeInputSchema:()=>Np,DeviceExportStatusSchema:()=>Ap,DeviceExportUnexposeInputSchema:()=>Pp,DeviceFeature:()=>gi,DeviceInfoSchema:()=>Gp,DeviceNetworkStatsSchema:()=>Mv,DeviceRole:()=>I,DeviceRuntimeState:()=>Ti,DeviceStatusSchema:()=>qi,DeviceType:()=>F,DiscoveredChildDeviceSchema:()=>V,DiscoveredChildStatusSchema:()=>Do,DiscoveredDeviceSchema:()=>wu,DiscoveredTargetSchema:()=>sh,DisposerChain:()=>ze,DoorbellPressEventSchema:()=>jo,DoorbellStatusSchema:()=>Ao,EVENT_PAD_MS:()=>qt,EXPRESSION_BUILTINS:()=>Jr,EXPRESSION_BUILTIN_NAMES:()=>Yr,EXPRESSION_COMPILE_CACHE_CAPACITY:()=>256,EXPRESSION_IDENTIFIER_RE:()=>Pr,EXPRESSION_INJECTED_NOW:()=>`now`,ElementConfigStore:()=>or,EmbeddingInfoSchema:()=>rm,EmbeddingResultSchema:()=>nm,EncodeProfileSchema:()=>Rn,EncodedPacketSchema:()=>Ft,EnrichedWidgetMetadataSchema:()=>Pd,EnumSensorDateTimeFormatSchema:()=>No,EnumSensorStatusSchema:()=>Po,EventCategory:()=>qe,EventEmitterStatusSchema:()=>Lo,EventFireSchema:()=>Io,EventItemSchema:()=>$_,EventKindSchema:()=>Sh,EventSourceType:()=>Un,ExportSetupFieldSchema:()=>Op,ExportSetupSchema:()=>kp,ExposedDeviceSchema:()=>Mp,ExposureModeSchema:()=>es,ExpressionEvalError:()=>k,ExpressionParseError:()=>O,FanControlStatusSchema:()=>Bo,FanDirectionSchema:()=>zo,FeatureManifestSchema:()=>Wy,FeatureProbeStatusSchema:()=>Yi,FloodStatusSchema:()=>Ho,FrameHandleFormatSchema:()=>Rt,FrameHandleSchema:()=>Lt,FrameInputSchema:()=>bs,GasStatusSchema:()=>Wo,GetStreamWithCodecInputSchema:()=>La,GlobalMetricsSchema:()=>Jh,HF_BASE_URL:()=>Gn,HF_REPO:()=>Wn,HWACCEL_OPTIONS:()=>lp,HealthStatusSchema:()=>Gy,HistoryPointSchema:()=>iu,HistoryResolutionEnum:()=>nu,HumidifierStatusSchema:()=>Ko,HumiditySensorStatusSchema:()=>Jo,HvacModeSchema:()=>qa,ImageRotateSchema:()=>Qo,ImageSettingsOptionsSchema:()=>is,ImageSettingsPatchSchema:()=>as,ImageSettingsStatusSchema:()=>rs,ImageStatusSchema:()=>Xo,IngestOwnerSchema:()=>Xh,InstalledPackageSchema:()=>D_,IntegrationLiteSchema:()=>cv,IntegrationWithStateSchema:()=>sv,IntercomAbilitySchema:()=>hv,IntercomStatusSchema:()=>gv,KNOWN_CAP_NAMES:()=>gb,LabelDefinitionSchema:()=>ve,LawnMowerActivitySchema:()=>ss,LawnMowerControlStatusSchema:()=>ls,LocateSegmentResultSchema:()=>Fy,LocationStatSchema:()=>Of,LockControlStatusSchema:()=>fs,LockStateSchema:()=>ds,LogEntrySchema:()=>lm,LogLevelSchema:()=>cm,LogStreamEntrySchema:()=>V_,LoginMethodContributionSchema:()=>xf,LoginStageEnum:()=>vf,MACRO_LABELS:()=>Cr,MAX_EXPRESSION_AST_NODES:()=>256,MAX_EXPRESSION_BINDINGS:()=>32,MAX_EXPRESSION_CALL_ARGS:()=>16,MAX_EXPRESSION_EVAL_STEPS:()=>Nr,MAX_EXPRESSION_SOURCE_LENGTH:()=>Mr,METHOD_ACCESS_MAP:()=>hb,MODEL_FORMATS:()=>ye,MaskGridDimsSchema:()=>Nc,MaskGridShapeSchema:()=>Oc,MaskLineShapeSchema:()=>kc,MaskPointSchema:()=>Tc,MaskPolygonShapeSchema:()=>Dc,MaskPolygonVerticesSchema:()=>Mc,MaskRectShapeSchema:()=>Ec,MaskShapeKindSchema:()=>jc,MaskShapeSchema:()=>Ac,MediaFileSchema:()=>Mh,MediaPlayerRepeatSchema:()=>hs,MediaPlayerStateSchema:()=>ms,MediaPlayerStatusSchema:()=>_s,MeshPeerSchema:()=>Dv,MeshStatusSchema:()=>Ov,MethodAccessSchema:()=>fh,ModelCatalogEntrySchema:()=>Ce,ModelConvertInputSchema:()=>Am,ModelConvertMetadataSchema:()=>Te,ModelDistributeInputSchema:()=>Mm,ModelDistributeResultSchema:()=>Nm,ModelExtraFileSchema:()=>be,ModelFormatEntrySchema:()=>x,ModelFormatsSchema:()=>xe,ModelSubstitutionSchema:()=>Us,ModelVariantGroupSchema:()=>Se,MotionAnalysisResultSchema:()=>Es,MotionEventSchema:()=>Dh,MotionOnMotionChangedDataSchema:()=>bc,MotionRegionSchema:()=>Ts,MotionSourceEnum:()=>uc,MotionSourcesSchema:()=>dc,MotionStatusSchema:()=>yc,MotionTriggerRuntimeStateSchema:()=>Cc,MotionTriggerStatusSchema:()=>Sc,MotionZoneOptionsSchema:()=>Ic,MotionZonePatchSchema:()=>Lc,MotionZoneRegionSchema:()=>Pc,MotionZoneStatusSchema:()=>Fc,MqttBrokerStatusSchema:()=>Gm,NativeDetectionSchema:()=>Bc,NativeObjectClassEnum:()=>zc,NativeObjectDetectionRuntimeStateSchema:()=>Hc,NativeObjectDetectionStatusSchema:()=>Vc,NetworkAccessStatusSchema:()=>Jm,NetworkAddressSchema:()=>Ky,NetworkEndpointSchema:()=>qm,NotificationActionSchema:()=>eh,NotificationFormatSchema:()=>$m,NotificationHistoryEntrySchema:()=>Kd,NotificationRuleSchema:()=>Wd,NotificationSchema:()=>th,NotifierStatusSchema:()=>qc,NumericSensorStatusSchema:()=>Zc,OauthIntegrationDescriptorSchema:()=>yh,ObjectEventSchema:()=>kh,OrchestratorMetricsSchema:()=>Os,OsdOverlayKindEnum:()=>Xv,OsdOverlayPatchSchema:()=>ey,OsdOverlaySchema:()=>Qv,OsdPositionEnum:()=>Zv,OsdStatusSchema:()=>$v,PET_FEEDER_MANUAL_FEED_MAX:()=>200,PET_FEEDER_MANUAL_FEED_MIN:()=>4,PIPELINE_FLOW_CAPABILITY_NAMES:()=>lb,PIPELINE_OWNER_CAPABILITY_NAMES:()=>ub,PROVIDER_KIND_CAP_NAMES:()=>xb,PYTHON_SCRIPT:()=>ur,PackageUpdateSchema:()=>O_,PackageVersionInfoSchema:()=>k_,PasskeySummarySchema:()=>t_,PcmSampleFormatSchema:()=>cf,PerScopeBreakdownSchema:()=>$l,PetFeederStatusSchema:()=>tl,PickStreamPreferencesSchema:()=>Ha,PickStreamRequirementsSchema:()=>Va,PickedCamStreamSchema:()=>Ua,PipelineAssignmentSchema:()=>Kh,PipelineDefaultStepSchema:()=>Ps,PipelineEngineChoiceSchema:()=>U,PipelineRunResultBridge:()=>ac,PipelineStepInputSchema:()=>W,PipelineValidationIssueSchema:()=>Ws,PipelineValidationResultSchema:()=>Gs,PlaceholderReasonSchema:()=>Pa,PolygonPointSchema:()=>cc,PowerMeterStatusSchema:()=>rl,PresenceStatusSchema:()=>ol,PressureSensorStatusSchema:()=>cl,PrivacyMaskOptionsSchema:()=>pl,PrivacyMaskPatchSchema:()=>ml,PrivacyMaskRegionSchema:()=>dl,PrivacyMaskShapeSchema:()=>ul,PrivacyMaskStatusSchema:()=>fl,ProfileRtspEntrySchema:()=>Kt,ProfileSlotSchema:()=>Ot,ProfileSlotStatusSchema:()=>Dt,ProviderStatusSchema:()=>Cu,PtzAutotrackRuntimeStateSchema:()=>yl,PtzAutotrackSettingsSchema:()=>gl,PtzAutotrackStatusSchema:()=>vl,PtzAutotrackTargetOptionSchema:()=>_l,PtzMoveCommandSchema:()=>Sy,PtzPositionSchema:()=>xy,PtzPresetSchema:()=>by,PtzStatusSchema:()=>Cy,QueryFilterSchema:()=>xg,REACHABILITY_FAILURES_TO_OFFLINE:()=>3,REACHABILITY_POLL_INTERVAL_MS:()=>ki,REACHABILITY_PROBE_TIMEOUT_MS:()=>Ai,RECOGNITION_TYPES:()=>Nn,RESERVED_BINDING_NAMES:()=>Fr,RUNTIME_DEFAULTS:()=>Kn,RUNTIME_TO_FORMAT:()=>lr,RawStateResultSchema:()=>Z_,ReadSegmentBytesResultSchema:()=>Iy,ReadinessRegistry:()=>hn,ReadinessTimeoutError:()=>fn,RecordingAvailabilitySchema:()=>ky,RecordingBandModeSchema:()=>en,RecordingBandSchema:()=>nn,RecordingBandTriggersSchema:()=>tn,RecordingConfigSchema:()=>on,RecordingDaysSchema:()=>Ay,RecordingDeviceUsageSchema:()=>My,RecordingLocationUsageSchema:()=>Ny,RecordingManifestSchema:()=>jy,RecordingModeSchema:()=>Zt,RecordingRangeSchema:()=>Oy,RecordingRetentionSchema:()=>an,RecordingRuleSchema:()=>rn,RecordingScheduleSchema:()=>Xt,RecordingStatusSchema:()=>Dy,RecordingStorageModeSchema:()=>Qt,RecordingStorageUsageSchema:()=>Py,RecordingTriggersSchema:()=>$t,RecordingWeekdaySchema:()=>Jt,RedirectLoginMethodSchema:()=>yf,RenderedAsSchema:()=>ch,ReportMotionInputSchema:()=>fc,RingBuffer:()=>Mb,RtpSourceSchema:()=>Ra,RtspRestreamEntrySchema:()=>Ea,RunnerCameraConfigSchema:()=>mc,RunnerCameraDeviceUIFields:()=>hc,RunnerFrameSourceSchema:()=>pc,RunnerLocalLoadSchema:()=>gc,RunnerLocalMetricsSchema:()=>_c,SCOPE_PRESETS:()=>yb,SOURCE_INFO_METADATA_KEY:()=>To,STREAM_PROFILE_META:()=>By,STREAM_QUALITY_LABELS:()=>xn,SUB_DETECTION_TYPES:()=>Mn,SYSTEM_CAP_NAMES:()=>vb,ScopedTokenSchema:()=>vh,ScopedTokenSummarySchema:()=>nb,ScoredObjectEventSchema:()=>Ih,ScriptRunnerStatusSchema:()=>xl,SearchResultSchema:()=>A_,SendEmailInputSchema:()=>Dg,SendEmailResultSchema:()=>Og,SendResultSchema:()=>lh,ServerBootModeSchema:()=>mg,ServerPackageStatusSchema:()=>_g,ServerRollbackInfoSchema:()=>gg,ServerUpdateActionResultSchema:()=>yg,ServerUpdateCheckResultSchema:()=>vg,ServerUpdateStateSchema:()=>hg,SettingsPatchSchema:()=>Ed,SettingsRecordSchema:()=>Sg,SettingsSchemaWithValuesSchema:()=>Q,SettingsUpdateResultSchema:()=>Dd,ShmRingStatsSchema:()=>dp,SmokeStatusSchema:()=>Cl,SmtpStatusSchema:()=>kg,SnapshotImageSchema:()=>jg,SourceInfoSchema:()=>B,SpatialDetectionSchema:()=>xs,SsoBridgeClaimsSchema:()=>Pg,StartEmbeddedInputSchema:()=>Um,StorageAbortUploadInputSchema:()=>qg,StorageBeginDownloadInputSchema:()=>Jg,StorageBeginDownloadResultSchema:()=>Yg,StorageBeginUploadInputSchema:()=>Ug,StorageBeginUploadResultSchema:()=>Wg,StorageEndDownloadInputSchema:()=>Zg,StorageFinalizeUploadInputSchema:()=>Kg,StorageLocationDeclarationSchema:()=>bn,StorageLocationRefSchema:()=>E,StorageLocationSchema:()=>T,StorageLocationTypeSchema:()=>yn,StorageProviderInfoSchema:()=>Vg,StorageReadChunkInputSchema:()=>Xg,StorageTestLocationResultSchema:()=>Hg,StorageWriteChunkInputSchema:()=>Gg,StreamCodecSchema:()=>Ba,StreamFormatSchema:()=>Ta,StreamNetworkStatsSchema:()=>Av,StreamParamsOptionsSchema:()=>kl,StreamParamsStatusSchema:()=>Dl,StreamProfileConfigSchema:()=>El,StreamProfileOptionsSchema:()=>Ol,StreamProfilePatchSchema:()=>Al,StreamProfileSchema:()=>Tl,StreamSourceEntrySchema:()=>Nt,StreamSourceSchema:()=>Pt,SubscribeAudioChunksInputSchema:()=>Ht,SubscribeAudioChunksResultSchema:()=>Ut,SubscribeFramesInputSchema:()=>zt,SubscribeFramesResultSchema:()=>Bt,SwitchStatusSchema:()=>Ml,SystemMetricsSchema:()=>Om,SystemMirror:()=>dd,TIMEZONES:()=>St,TamperStatusSchema:()=>Pl,TankStatusSchema:()=>Vl,TargetKindCapsSchema:()=>rh,TargetKindLevelSchema:()=>nh,TargetKindSchema:()=>ah,TargetSchema:()=>oh,TemperatureSensorStatusSchema:()=>Il,TestConnectionResultSchema:()=>uv,TestResultSchema:()=>uh,ToastSchema:()=>Jy,TokenScopeSchema:()=>$,TopologyNodeSchema:()=>zv,TopologyProcessSchema:()=>Fv,TopologyServiceSchema:()=>Pv,TrackSchema:()=>Th,TrackStateSchema:()=>xh,TrackedDetectionSchema:()=>Fh,TurnServerSchema:()=>$g,UNIT_TABLE:()=>pu,UnifiedBrokerInfoSchema:()=>jf,UnitConversionError:()=>mu,UpdateIntegrationInputSchema:()=>fv,UpdateStatusSchema:()=>Rl,UpdateUserInputSchema:()=>Qy,UserRecordSchema:()=>gh,UserSummarySchema:()=>Xy,VacuumControlStatusSchema:()=>Hl,VacuumStateSchema:()=>Bl,ValveStateSchema:()=>Wl,ValveStatusSchema:()=>Gl,VibrationStatusSchema:()=>ql,VideoEncodeSchema:()=>In,WELL_KNOWN_TABS:()=>Je,WELL_KNOWN_TAB_MAP:()=>Ye,WaterHeaterStatusSchema:()=>Yl,WeatherStatusSchema:()=>Zl,WebrtcStreamChoiceSchema:()=>c_,WebrtcStreamTargetSchema:()=>s_,WhiteBalanceModeSchema:()=>$o,WidgetHostEnum:()=>kd,WidgetLoginMethodSchema:()=>bf,WidgetMetadataSchema:()=>Md,WidgetRemoteSchema:()=>jd,WidgetSizeEnum:()=>Ad,YAMNET_TO_MACRO:()=>Er,ZoneKindEnum:()=>sc,ZoneRuleModeEnum:()=>ou,ZoneRuleSchema:()=>su,ZoneRuleStageEnum:()=>lu,ZoneRulesArraySchema:()=>cu,ZoneSchema:()=>G,ZoneScopeBreakdownSchema:()=>eu,accessoriesCapability:()=>d_,accessoryStableId:()=>yi,addonPagesCapability:()=>_d,addonPagesSourceCapability:()=>yd,addonRoutesCapability:()=>Cd,addonSettingsCapability:()=>Od,addonWidgetsCapability:()=>Fd,addonWidgetsSourceCapability:()=>Nd,addonsCapability:()=>W_,adminUiCapability:()=>Rd,advancedNotifierCapability:()=>Jd,airQualitySensorCapability:()=>Qi,alarmPanelCapability:()=>la,alertsCapability:()=>$d,ambientLightSensorCapability:()=>da,applyTransform:()=>Ku,asBoolean:()=>tr,asJsonArray:()=>Qn,asJsonObject:()=>Zn,asNumber:()=>er,asString:()=>$n,audioAnalysisCapability:()=>ef,audioAnalyzerCapability:()=>sf,audioCodecCapability:()=>hf,audioMetricsCapability:()=>ga,authProviderCapability:()=>_f,autoAssignProfiles:()=>An,automationControlCapability:()=>va,backupCapability:()=>kf,batteryCapability:()=>ba,bestLocationMatch:()=>Ob,binaryCapability:()=>Sa,bindAddonActions:()=>Lb,brightnessCapability:()=>wa,brokerCapability:()=>Xf,buildAddonRouteProvider:()=>gt,buildModelVariantGroups:()=>Ie,buildStreamParamsConfigSchema:()=>Hy,buttonCapability:()=>G_,cameraCredentialsCapability:()=>J_,cameraPipelineConfigCapability:()=>Zf,cameraStreamsCapability:()=>Wa,canConvertUnit:()=>xu,carbonMonoxideCapability:()=>Ka,cellsToRects:()=>Pb,classifyStream:()=>Tn,classifyStreams:()=>wn,climateControlCapability:()=>Ya,collectHydratedFieldEntries:()=>Ze,collectHydratedFieldValues:()=>$e,colorCapability:()=>eo,compileExpression:()=>di,compileExpressionSafe:()=>fi,connectivityCapability:()=>no,consumablesCapability:()=>ao,contactCapability:()=>so,controlCapability:()=>fo,convertUnit:()=>yu,cosineSimilarity:()=>ar,coverCapability:()=>ho,createDeviceProxy:()=>td,createDurableState:()=>st,createEvent:()=>at,createExpressionScope:()=>ni,createLazyTrpcSource:()=>Qu,createMirrorSource:()=>$u,createRuntimeStateBridge:()=>Oi,createSliceHandle:()=>Z,createSystemProxy:()=>ad,customAction:()=>ap,customModelRegistryCapability:()=>cp,dayNightCapability:()=>xo,decoderCapability:()=>fp,defaultDeviceFor:()=>Wb,defineCustomActions:()=>ip,describeModelVariant:()=>Re,detectionPipelineCapability:()=>pp,deviceAdoptionCapability:()=>Ep,deviceCustomAction:()=>op,deviceDiscoveryCapability:()=>ko,deviceExportCapability:()=>Fp,deviceManagerCapability:()=>em,deviceMatchesProfile:()=>bi,deviceOpsCapability:()=>Q_,deviceProviderCapability:()=>ku,deviceStateCapability:()=>tm,deviceStatusCapability:()=>Ji,doorbellCapability:()=>Mo,embeddingEncoderCapability:()=>im,emitDownForOwnedCaps:()=>_n,emitReadiness:()=>ot,encodeProfileFromStreamShape:()=>zn,enumSensorCapability:()=>Fo,enumerateItemArrayFields:()=>Xu,enumerateSchemaFields:()=>Yu,errMsg:()=>vr,evaluateAst:()=>li,evaluateLinkExpression:()=>hi,evaluateZoneRules:()=>nd,event:()=>z,eventEmitterCapability:()=>Ro,eventsCapability:()=>ev,expandCapMethods:()=>ia,extractSourceInfoFromMetadata:()=>Eo,faceGalleryCapability:()=>ov,fanControlCapability:()=>Vo,featureProbeCapability:()=>Xi,filesystemBrowseCapability:()=>sm,findTimezone:()=>Ct,floodCapability:()=>Uo,formatForBackend:()=>mr,formatForRuntime:()=>hr,frameworkSwapConfirmSchema:()=>Tb,frameworkSwapPackageSchema:()=>Cb,gasCapability:()=>Go,getAudioMacroClassIds:()=>Ar,getByPath:()=>Wu,getCapsByProviderKind:()=>Sb,hfModelUrl:()=>ir,htmlToText:()=>Fi,humidifierCapability:()=>qo,humiditySensorCapability:()=>Yo,hydrateSchema:()=>tt,imageCapability:()=>Zo,imageSettingsCapability:()=>os,integrationsCapability:()=>mv,intercomCapability:()=>vv,isAgentOnlyPlacement:()=>Ue,isArrayOutputSchema:()=>ep,isDeployableToAgent:()=>He,isDeviceConfigCap:()=>aa,isEvent:()=>it,isObjectInput:()=>$f,isVoidInput:()=>Qf,jobKindSchema:()=>f_,kebabToCamel:()=>rp,lawnMowerControlCapability:()=>us,lifecycleJobSchema:()=>y_,lifecycleJobScopeSchema:()=>v_,lifecycleJobStateSchema:()=>__,lifecycleTaskSchema:()=>g_,localNetworkCapability:()=>Tv,locationSimilarity:()=>Db,lockControlCapability:()=>ps,logDestinationCapability:()=>um,loginMethodCapability:()=>Sf,looseSchema:()=>tp,makeProfileBrokerId:()=>kt,makeSourceBrokerId:()=>At,mapAudioLabelToMacro:()=>kr,markdownToHtmlLite:()=>zi,markdownToText:()=>Ni,maskUrlCredentials:()=>jb,mediaPlayerCapability:()=>vs,mergeSourceInfo:()=>Co,meshNetworkCapability:()=>kv,method:()=>R,metricsProviderCapability:()=>km,migrateConfigToBands:()=>dn,modelConvertCapability:()=>jm,modelDistributorCapability:()=>Pm,modelFormatForRuntime:()=>Gb,motionCapability:()=>xc,motionDetectionCapability:()=>Ds,motionTriggerCapability:()=>wc,motionZonesCapability:()=>Rc,mqttBrokerCapability:()=>Km,nativeObjectDetectionCapability:()=>Uc,networkAccessCapability:()=>Xm,networkQualityCapability:()=>Nv,nodePin:()=>Jn,nodesCapability:()=>Yv,normalizeAddonInitResult:()=>ht,normalizeUnit:()=>wo,notificationOutputCapability:()=>dh,notifierCapability:()=>Xc,numericSensorCapability:()=>Qc,oauthIntegrationCapability:()=>bh,osdCapability:()=>ty,parseCameraStreamConfig:()=>kn,parseExpression:()=>ei,parseJsonArray:()=>rr,parseJsonObject:()=>nr,parseJsonUnknown:()=>Xn,parseProfileBrokerId:()=>jt,parseStreamParamsFormPatch:()=>Uy,pendingFrameworkSwapSchema:()=>wb,petFeederCapability:()=>nl,pickPreferredRtspEntry:()=>Bn,pipelineAnalyticsCapability:()=>Rh,pipelineExecutorCapability:()=>oc,pipelineOrchestratorCapability:()=>pg,pipelineRunnerCapability:()=>vc,plateGalleryCapability:()=>ay,platformProbeCapability:()=>yy,powerMeterCapability:()=>il,prepareNotification:()=>Ki,presenceCapability:()=>sl,pressureSensorCapability:()=>ll,privacyMaskCapability:()=>hl,procedureAuthKey:()=>np,ptzAutotrackCapability:()=>bl,ptzCapability:()=>Ty,pythonScriptForBackend:()=>gr,readNodePin:()=>Yn,readinessKey:()=>pn,rebootCapability:()=>Ey,recordingCapability:()=>Ly,rectsToCells:()=>Nb,requiresPython:()=>_r,resolveAddonExecution:()=>Ve,resolveAddonGroup:()=>We,resolveAddonPlacement:()=>Ke,resolveAddonRuntime:()=>pr,resolveCapMount:()=>$i,resolveDetectionRuntime:()=>dr,resolveDeviceProfile:()=>Ci,resolveFormat:()=>Vi,resolveHydratedFieldValue:()=>et,resolveModelFormat:()=>fr,resolveRunnerId:()=>Ge,resolveVariantModelId:()=>Le,runInferenceStep:()=>yr,runtimeDevices:()=>Ub,scopeKey:()=>w,scoreRuntimes:()=>Kb,scriptRunnerCapability:()=>Sl,selectAssignedProfileSlots:()=>Mt,serverManagementCapability:()=>bg,setByPath:()=>Gu,settingsStoreCapability:()=>Tg,sleep:()=>Fb,sleepCancellable:()=>Ib,smokeCapability:()=>wl,smtpProviderCapability:()=>Ag,snapshotCapability:()=>Ng,ssoBridgeCapability:()=>Fg,startReachabilityPoll:()=>Mi,storageCapability:()=>Lg,storageEvictableCapability:()=>Bg,storageProviderCapability:()=>Qg,streamBrokerCapability:()=>za,streamCatalogCapability:()=>zy,streamParamsCapability:()=>jl,streamPixels:()=>Cn,streamQualityLabel:()=>Sn,supportedRuntimes:()=>Hb,switchCapability:()=>Nl,synthesizeSourceInfo:()=>So,systemCapability:()=>qy,tamperCapability:()=>Fl,taskLogEntrySchema:()=>h_,taskPhaseSchema:()=>p_,taskTargetSchema:()=>m_,temperatureSensorCapability:()=>Ll,textToHtml:()=>Ri,toDeviceSummary:()=>Au,toExpressionValue:()=>pi,toStreamSourceEntry:()=>En,toastCapability:()=>Yy,tokenize:()=>Vr,transcodeBody:()=>Hi,tryConvertUnit:()=>bu,turnProviderCapability:()=>e_,unitDimension:()=>gu,unitsForDimension:()=>Su,updateCapability:()=>zl,userManagementCapability:()=>cb,userPasskeysCapability:()=>n_,vacuumControlCapability:()=>Ul,validateExpressionSource:()=>mi,valveCapability:()=>Kl,vibrationCapability:()=>Jl,videoclipsCapability:()=>a_,viewerUiCapability:()=>Vd,waterHeaterCapability:()=>Xl,weatherCapability:()=>Ql,webrtcClientHintsSchema:()=>o_,webrtcSessionCapability:()=>l_,wiringAddonHealthSchema:()=>he,wiringHealthSnapshotSchema:()=>_e,wiringNodeHealthSchema:()=>ge,wiringProbeKindSchema:()=>pe,wiringProbeResultSchema:()=>me,zodEntriesToConfigUI:()=>Pu,zoneAnalyticsCapability:()=>au,zoneRulesCapability:()=>uu,zonesCapability:()=>lc});export{Fr as A,Re as B,I as C,fi as D,mi as E,Ct as F,ye as H,Ye as I,Ze as L,S as M,At as N,Yr as O,St as P,qe as R,gi as S,hi as T,Le as V,xu as _,Dy as a,Su as b,Ap as c,dd as d,ad as f,Wu as g,Z as h,pb as i,on as j,Pr as k,Mp as l,Qu as m,bb as n,Ov as o,td as p,gb as r,Jm as s,qb as t,Mf as u,bu as v,F as w,B as x,gu as y,Ie as z};
|