@camstack/addon-admin-ui 0.1.46 → 0.2.0
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/_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-DhUskkLv.js +1 -0
- package/dist/assets/_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-1rzf3QZV.js +1 -0
- package/dist/assets/_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_client__loadShare__.js-CSJxMxg6.js +6 -0
- package/dist/assets/_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.js-CPJ7iclX.js +1 -0
- package/dist/assets/_virtual_mf___mfe_internal__admin_ui_host__loadShare__konva__loadShare__.js-B7XYY0cV.js +15 -0
- package/dist/assets/_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.js-C2cB5JUo.js +1 -0
- package/dist/assets/_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-CXx5u_N6.js +9 -0
- package/dist/assets/_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_konva__loadShare__.js-B2sDsXg0.js +19 -0
- package/dist/assets/browser-BHo8W_uH.js +8 -0
- package/dist/assets/dist-CGRDjIOZ.js +1 -0
- package/dist/assets/dist-mzJ_Pmak.js +1 -0
- package/dist/assets/dist-q2poCTnb.js +75 -0
- package/dist/assets/hostInit-BKCH_xPO.js +1 -0
- package/dist/assets/index-CYoeHsdE.js +82 -0
- package/dist/assets/index-D2K_AdnO.css +2 -0
- package/dist/{mf-entry-bootstrap-0.js → assets/mf-entry-bootstrap-0-adeca54a.js} +7 -5
- package/dist/assets/remoteEntry-aR0pkhzt.js +1 -0
- package/dist/assets/rolldown-runtime-Cyuzqnbw.js +1 -0
- package/dist/assets/schemas-CuE8EXQ7.js +64 -0
- package/dist/assets/src-BE2rTAMO.js +1 -0
- package/dist/assets/src-CrhOk7JL.js +1 -0
- package/dist/assets/virtualExposes-SIMIW5lI.js +1 -0
- package/dist/assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-BU185vSK.js +5 -0
- package/dist/assets/virtual_mf-exposes___mfe_internal__admin_ui_host__remoteEntry-_hash_-DnnXQRkG.js +1 -0
- package/dist/assets/vite-preload-helper-zJ_50EbN.js +1 -0
- package/dist/index.html +30 -13
- package/dist/server/addon.js +19925 -13686
- package/dist/sw.js +1 -1
- package/package.json +11 -9
- package/dist/assets/__mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.mjs-CRKSbdgN.js +0 -1
- package/dist/assets/__mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.mjs_commonjs-proxy-BGPfTw3V.js +0 -1
- package/dist/assets/__mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_client__loadShare__.mjs-DIkg6-MH.js +0 -6
- package/dist/assets/__mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_client__loadShare__.mjs_commonjs-proxy-WD2WouMQ.js +0 -1
- package/dist/assets/__mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.mjs-jPpiOa0I.js +0 -1
- package/dist/assets/__mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.mjs_commonjs-proxy-DYNYuSL7.js +0 -1
- package/dist/assets/__mfe_internal__admin_ui_host__loadShare__konva__loadShare__.mjs-g85Oidc0.js +0 -15
- package/dist/assets/__mfe_internal__admin_ui_host__loadShare__konva__loadShare__.mjs_commonjs-proxy-Bqeq2Zwj.js +0 -1
- package/dist/assets/__mfe_internal__admin_ui_host__loadShare__react__loadShare__.mjs-ij0ODm-n.js +0 -9
- package/dist/assets/__mfe_internal__admin_ui_host__loadShare__react__loadShare__.mjs_commonjs-proxy-C4Ko8zXp.js +0 -1
- package/dist/assets/__mfe_internal__admin_ui_host__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs-C_6K4VBY.js +0 -9
- package/dist/assets/__mfe_internal__admin_ui_host__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs_commonjs-proxy-DrLZNXOX.js +0 -1
- package/dist/assets/__mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.mjs-Cf5gSqc_.js +0 -9
- package/dist/assets/__mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-CYaX3FDr.js +0 -1
- package/dist/assets/__mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs-rHwdrynu.js +0 -25
- package/dist/assets/__mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs_commonjs-proxy-DRDS6j-Y.js +0 -1
- package/dist/assets/__mfe_internal__admin_ui_host__loadShare__react_mf_2_konva__loadShare__.mjs-cUuqcEcL.js +0 -35
- package/dist/assets/__mfe_internal__admin_ui_host__loadShare__react_mf_2_konva__loadShare__.mjs_commonjs-proxy-CzMP41OH.js +0 -1
- package/dist/assets/_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-DNAkeUTZ.js +0 -1
- package/dist/assets/browser-BXdiCFWD.js +0 -8
- package/dist/assets/devices-DaqavVOg.js +0 -1
- package/dist/assets/hostInit-ByQycOVJ.js +0 -1
- package/dist/assets/index-B6kubsZI.js +0 -151
- package/dist/assets/index-BI1a6Whs.js +0 -1
- package/dist/assets/index-BVNg3Krt.js +0 -1185
- package/dist/assets/index-BbwPCEeT.js +0 -1
- package/dist/assets/index-BpC2rqYA.js +0 -1
- package/dist/assets/index-CukoHCyD.js +0 -1
- package/dist/assets/index-Cyva9RmE.js +0 -1
- package/dist/assets/index-DLnW8nGB.css +0 -1
- package/dist/assets/index-DNydUTOB.js +0 -1
- package/dist/assets/index-DVLRgczW.js +0 -1
- package/dist/assets/index-PXbclFuZ.js +0 -87
- package/dist/assets/index-QqQmcu5i.js +0 -1
- package/dist/assets/method-access-map-DjDdPRYC.js +0 -1
- package/dist/assets/preload-helper-BlTxHScW.js +0 -1
- package/dist/assets/remoteEntry-iRKuVHUX.js +0 -1
- package/dist/assets/schemas-BdJePqbR.js +0 -64
- package/dist/assets/virtualExposes-_ivNhQLP.js +0 -1
- package/dist/assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-QVZxTxLo.js +0 -8
- package/dist/server/addon.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as t,a as l,_ as h,s as e,r as b,l as w,n as a,b as g,c as S,d as M,u as f,e as it,p as Io,f as R,g as he,h as Mt,i as _,t as Et,j as ko,k as cn,m as wo,Z as Ao,q as Co,v as No,w as Po,x as Do,y as Mo,z as rn,A as Eo,B as xo}from"./schemas-BdJePqbR.js";const To=S(["singleton","device","widget"]),ia=t({capName:e(),kind:To,deviceId:a().optional(),reachable:g(),latencyMs:a(),error:e().optional()}),Ro=t({addonId:e(),caps:l(ia).readonly(),widgets:l(ia).readonly()}),Bo=t({nodeId:e(),addons:l(Ro).readonly()}),Dm=t({ok:g(),degraded:g(),checkedAt:e(),nodes:l(Bo).readonly(),summary:t({total:a(),reachable:a(),unreachable:a()})}),qo=["onnx","coreml","openvino","tflite","pt"],Oo=[{id:"overview",label:"Overview",icon:"layout-dashboard",order:-10},{id:"general",label:"General",icon:"settings",order:0},{id:"image",label:"Image",icon:"image",order:5},{id:"light",label:"Light",icon:"lightbulb",order:7},{id:"motion",label:"Motion",icon:"activity",order:10},{id:"audio",label:"Audio",icon:"mic",order:12},{id:"alarms",label:"Alarms",icon:"bell-ring",order:13},{id:"snapshot",label:"Snapshot",icon:"camera",order:15},{id:"osd",label:"OSD",icon:"type",order:18},{id:"stream-broker",label:"Stream Broker",icon:"radio",order:20},{id:"streaming",label:"Streaming",icon:"video",order:35},{id:"ptz",label:"PTZ",icon:"move",order:40},{id:"pipeline",label:"Detection Pipeline",icon:"cpu",order:39},{id:"zones",label:"Detection",icon:"shapes",order:38},{id:"live-stats",label:"Live Stats",icon:"activity",order:39},{id:"recording",label:"Recording",icon:"circle-dot",order:40},{id:"engine",label:"Inference Engine",icon:"zap",order:41},{id:"scheduler",label:"Scheduler",icon:"list-checks",order:42},{id:"decoder",label:"Decoder",icon:"film",order:43},{id:"notifications",label:"Notifications",icon:"bell",order:50},{id:"network",label:"Network",icon:"globe",order:60},{id:"storage",label:"Storage",icon:"hard-drive",order:70},{id:"advanced",label:"Advanced",icon:"wrench",order:100}],Mm=Object.fromEntries(Oo.map(i=>[i.id,i]));function zo(i){return i.type==="separator"||i.type==="info"||i.type==="button"||i.type==="object-array"||i.type==="widget"||i.type==="addon-action-button"}function ca(i,s){return{...i.tabs?{tabs:[...i.tabs]}:{},sections:i.sections.map(n=>({...n,fields:n.fields.map(d=>ct(d,s))}))}}function ct(i,s){if(zo(i))return i;if(i.type==="group"){const y=i.fields.map(A=>ct(A,s));return{...i,fields:y}}if(i.type==="sub-tabs"){const y=i.tabs.map(A=>({...A,fields:A.fields.map(k=>ct(k,s))}));return{...i,tabs:y}}const n=i.key,d=Object.prototype.hasOwnProperty.call(s,n)?s[n]:void 0,p=i.default;if(i.multiple){const y=Array.isArray(d)?d:d!=null?[d]:[],I=i.multiple.itemDefault!==void 0?i.multiple.itemDefault:p!==void 0?p:Lo(i)==="string"?"":null,A=Math.max(i.multiple.min,y.length),k=[];for(let C=0;C<A;C++)k.push(C<y.length?y[C]:I);return{...i,value:k}}const u=d!==void 0?d:p!==void 0?p:null;if(i.type==="password")return{...i,value:""};const v=i.type==="textarea"&&i.isJson&&u!==null&&typeof u=="object"?JSON.stringify(u,null,2):u;return{...i,value:v}}function Lo(i){switch(i.type){case"text":case"textarea":case"password":case"color":case"probe":return"string";case"number":case"slider":return"number";case"boolean":return"boolean";default:return"other"}}const te=S(["data","media","recordings","recordings-high","recordings-low","recordings-clips","event-images","models","cache","logs","addons-data","backups"]),Em={data:"singleton",media:"singleton",cache:"singleton",logs:"singleton","addons-data":"singleton",models:"singleton","event-images":"singleton",recordings:"multi","recordings-high":"multi","recordings-low":"multi","recordings-clips":"multi",backups:"multi"},O=t({id:e().regex(/^[a-z][a-z0-9-]*:[a-z0-9-]+$/),type:te,displayName:e().min(1),providerId:e().min(1),config:b(e(),f()),isDefault:g().default(!1),isSystem:g().default(!1),createdAt:a(),updatedAt:a()}),H=R([te,e().regex(/^[a-z][a-z0-9-]*:[a-z0-9-]+$/)]),_o=t({inputFps:a(),outputFps:a(),avgDecodeTimeMs:a(),droppedFrames:a()}),ra=t({codec:e(),maxFps:a().default(0),outputFormat:S(["jpeg","rgb","bgr","yuv420","gray"]).default("jpeg"),scale:a().default(1),width:a().optional(),height:a().optional(),deviceId:a().int().nonnegative().optional(),tag:e().optional(),frameSink:S(["callback","shm"]).default("callback")});function Uo(i){return i instanceof Error?i.message:typeof i=="string"?i:String(i)}const Fo=[{id:"speech",name:"Speech",icon:"🗣️"},{id:"scream",name:"Scream / Shout",icon:"😱"},{id:"crying",name:"Crying / Baby",icon:"😢"},{id:"laughter",name:"Laughter",icon:"😂"},{id:"music",name:"Music",icon:"🎵"},{id:"dog",name:"Dog",icon:"🐕"},{id:"cat",name:"Cat",icon:"🐈"},{id:"bird",name:"Bird",icon:"🐦"},{id:"animal",name:"Animal (other)",icon:"🐾"},{id:"alarm",name:"Alarm / Siren",icon:"🚨"},{id:"doorbell",name:"Doorbell / Knock",icon:"🔔"},{id:"glass_breaking",name:"Glass Breaking",icon:"💥"},{id:"gunshot",name:"Gunshot / Explosion",icon:"💣"},{id:"vehicle",name:"Vehicle",icon:"🚗"},{id:"siren",name:"Emergency Siren",icon:"🚑"},{id:"fire",name:"Fire / Smoke",icon:"🔥"},{id:"water",name:"Water",icon:"💧"},{id:"wind",name:"Wind / Weather",icon:"🌬️"},{id:"door",name:"Door",icon:"🚪"},{id:"footsteps",name:"Footsteps",icon:"👣"},{id:"crowd",name:"Crowd / Chatter",icon:"👥"},{id:"telephone",name:"Telephone",icon:"📞"},{id:"engine",name:"Engine / Motor",icon:"⚙️"},{id:"tools",name:"Tools / Construction",icon:"🔨"},{id:"silence",name:"Silence",icon:"🤫"}],Ho={mapping:{Speech:"speech","Child speech, kid speaking":"speech",Conversation:"speech","Narration, monologue":"speech",Babbling:"speech",Whispering:"speech","Speech synthesizer":"speech",Humming:"speech",Rapping:"speech",Singing:"speech",Choir:"speech","Child singing":"speech",Shout:"scream",Bellow:"scream",Yell:"scream",Screaming:"scream","Children shouting":"scream",Whoop:"scream","Crying, sobbing":"crying","Baby cry, infant cry":"crying",Whimper:"crying","Wail, moan":"crying",Groan:"crying",Laughter:"laughter","Baby laughter":"laughter",Giggle:"laughter",Snicker:"laughter","Belly laugh":"laughter","Chuckle, chortle":"laughter",Music:"music","Musical instrument":"music",Guitar:"music",Piano:"music",Drum:"music","Drum kit":"music","Violin, fiddle":"music",Flute:"music",Saxophone:"music",Trumpet:"music",Synthesizer:"music","Pop music":"music","Rock music":"music","Hip hop music":"music","Classical music":"music",Jazz:"music","Electronic music":"music","Background music":"music",Dog:"dog",Bark:"dog",Yip:"dog",Howl:"dog","Bow-wow":"dog",Growling:"dog","Whimper (dog)":"dog",Cat:"cat",Purr:"cat",Meow:"cat",Hiss:"cat",Caterwaul:"cat",Bird:"bird","Bird vocalization, bird call, bird song":"bird","Chirp, tweet":"bird",Squawk:"bird",Crow:"bird",Owl:"bird","Pigeon, dove":"bird",Animal:"animal","Domestic animals, pets":"animal","Livestock, farm animals, working animals":"animal",Horse:"animal","Cattle, bovinae":"animal",Pig:"animal",Sheep:"animal",Goat:"animal",Frog:"animal",Insect:"animal",Cricket:"animal",Alarm:"alarm","Alarm clock":"alarm","Smoke detector, smoke alarm":"alarm","Fire alarm":"alarm",Buzzer:"alarm","Civil defense siren":"alarm","Car alarm":"alarm",Siren:"siren","Police car (siren)":"siren","Ambulance (siren)":"siren","Fire engine, fire truck (siren)":"siren","Emergency vehicle":"siren",Foghorn:"siren",Doorbell:"doorbell","Ding-dong":"doorbell",Knock:"doorbell",Tap:"doorbell",Glass:"glass_breaking",Shatter:"glass_breaking","Chink, clink":"glass_breaking","Gunshot, gunfire":"gunshot","Machine gun":"gunshot",Explosion:"gunshot",Fireworks:"gunshot",Firecracker:"gunshot","Artillery fire":"gunshot","Cap gun":"gunshot",Boom:"gunshot",Vehicle:"vehicle",Car:"vehicle",Truck:"vehicle",Bus:"vehicle",Motorcycle:"vehicle","Car passing by":"vehicle","Vehicle horn, car horn, honking":"vehicle","Traffic noise, roadway noise":"vehicle",Train:"vehicle",Aircraft:"vehicle",Helicopter:"vehicle",Bicycle:"vehicle",Skateboard:"vehicle",Fire:"fire",Crackle:"fire",Water:"water",Rain:"water",Raindrop:"water","Rain on surface":"water",Stream:"water",Waterfall:"water",Ocean:"water","Waves, surf":"water","Splash, splatter":"water",Wind:"wind",Thunderstorm:"wind",Thunder:"wind","Wind noise (microphone)":"wind","Rustling leaves":"wind",Door:"door","Sliding door":"door",Slam:"door","Cupboard open or close":"door","Walk, footsteps":"footsteps",Run:"footsteps",Shuffle:"footsteps",Crowd:"crowd",Chatter:"crowd",Cheering:"crowd",Applause:"crowd","Children playing":"crowd","Hubbub, speech noise, speech babble":"crowd",Telephone:"telephone","Telephone bell ringing":"telephone",Ringtone:"telephone","Telephone dialing, DTMF":"telephone","Busy signal":"telephone",Engine:"engine","Engine starting":"engine",Idling:"engine","Accelerating, revving, vroom":"engine","Light engine (high frequency)":"engine","Medium engine (mid frequency)":"engine","Heavy engine (low frequency)":"engine","Lawn mower":"engine",Chainsaw:"engine",Hammer:"tools",Jackhammer:"tools",Sawing:"tools","Power tool":"tools",Drill:"tools",Sanding:"tools",Silence:"silence"},preserveOriginal:!1},$o={mapping:{speech:"speech",child_speech:"speech",conversation:"speech",whispering:"speech",singing:"speech",humming:"speech",shout:"scream",yell:"scream",screaming:"scream",crying:"crying",baby_crying:"crying",sobbing:"crying",laughter:"laughter",baby_laughter:"laughter",giggling:"laughter",music:"music",guitar:"music",piano:"music",drums:"music",dog_bark:"dog",dog_bow_wow:"dog",dog_growling:"dog",dog_howl:"dog",cat_meow:"cat",cat_purr:"cat",cat_hiss:"cat",bird:"bird",bird_chirp:"bird",bird_squawk:"bird",animal:"animal",horse:"animal",cow_moo:"animal",insect:"animal",alarm:"alarm",smoke_alarm:"alarm",fire_alarm:"alarm",car_alarm:"alarm",siren:"siren",police_siren:"siren",ambulance_siren:"siren",doorbell:"doorbell",door_knock:"doorbell",knocking:"doorbell",glass_breaking:"glass_breaking",glass_shatter:"glass_breaking",gunshot:"gunshot",explosion:"gunshot",fireworks:"gunshot",car:"vehicle",truck:"vehicle",motorcycle:"vehicle",car_horn:"vehicle",vehicle_horn:"vehicle",traffic:"vehicle",fire:"fire",fire_crackle:"fire",water:"water",rain:"water",ocean:"water",splash:"water",wind:"wind",thunder:"wind",thunderstorm:"wind",door:"door",door_slam:"door",sliding_door:"door",footsteps:"footsteps",walking:"footsteps",running:"footsteps",crowd:"crowd",chatter:"crowd",cheering:"crowd",applause:"crowd",telephone_ring:"telephone",ringtone:"telephone",engine:"engine",engine_starting:"engine",lawn_mower:"engine",chainsaw:"engine",hammer:"tools",jackhammer:"tools",drill:"tools",power_tool:"tools",silence:"silence"},preserveOriginal:!1},xt=new Map;for(const[i,s]of Object.entries(Ho.mapping))xt.set(i.toLowerCase(),s);for(const[i,s]of Object.entries($o.mapping))xt.set(i.toLowerCase(),s);function xm(i){return xt.get(i.toLowerCase())??null}function Tm(){return Fo.map(i=>i.id)}var N=(i=>(i.Camera="camera",i.Hub="hub",i.Light="light",i.Siren="siren",i.Switch="switch",i.Sensor="sensor",i.Thermostat="thermostat",i.Button="button",i.Generic="generic",i))(N||{}),dn=(i=>(i.BatteryOperated="battery-operated",i.Rebootable="rebootable",i.NativeSnapshot="native-snapshot",i.DoorbellButton="doorbell-button",i.TwoWayAudio="two-way-audio",i.PanTiltZoom="pan-tilt-zoom",i.PtzAutotrack="ptz-autotrack",i.MotionTrigger="motion-trigger",i))(dn||{}),Wo=(i=>(i.ChargingDC="charging-dc",i.ChargingSolar="charging-solar",i.NotCharging="not-charging",i))(Wo||{}),$=(i=>(i.Siren="siren",i.Floodlight="floodlight",i.Spotlight="spotlight",i.PirSensor="pir-sensor",i.Chime="chime",i.Autotrack="autotrack",i.Nightvision="nightvision",i.PrivacyMask="privacy-mask",i.Doorbell="doorbell",i))($||{});const G={Siren:$.Siren,Floodlight:$.Floodlight,Spotlight:$.Spotlight,PirSensor:$.PirSensor,Chime:$.Chime,Autotrack:$.Autotrack,Nightvision:$.Nightvision,PrivacyMask:$.PrivacyMask},Rm={[G.Siren]:"Siren",[G.Floodlight]:"Floodlight",[G.Spotlight]:"Spotlight",[G.PirSensor]:"PIR",[G.Chime]:"Chime",[G.Autotrack]:"Autotracking",[G.Nightvision]:"Night Vision",[G.PrivacyMask]:"Privacy Mask"};function Bm(i,s,n){const d=`${i}:${s}`;return typeof n=="number"?`${d}:${n}`:d}function Go(i,s){return!i||i.length===0?!1:i.includes(s.when.hasFeature)}const Vo={id:"battery",label:"Battery-operated camera",when:{hasFeature:dn.BatteryOperated},defaults:{audioMode:"disabled",detectionMode:"on-motion"},settings:{"snapshot.minRefreshIntervalSec":3600,"streamBroker.preBufferEnabled":!1}},Ko=[Vo];function qm(i){for(const s of Ko)if(Go(i,s))return s;return null}const Le=t({online:g(),lastChangedAt:a()}),Tt={name:"device-status",scope:"device",mode:"singleton",methods:{},events:{onStatusChanged:{data:t({deviceId:a(),status:Le})}},status:{schema:Le,kind:"push"},runtimeState:Le},_e=t({flags:b(e(),f()),deviceType:e().nullable(),model:e().nullable(),channelCount:a().nullable(),lastProbedAt:a(),lastFetchedAt:a()}),Rt={name:"feature-probe",scope:"device",mode:"singleton",methods:{},events:{onProbeChanged:{data:t({deviceId:a(),status:_e})}},status:{schema:_e,kind:"push"},runtimeState:_e},jo=t({id:e(),title:e(),description:e().optional(),style:S(["card","accordion"]).optional(),defaultCollapsed:g().optional(),columns:R([w(1),w(2),w(3),w(4)]).optional(),tab:e().optional(),location:S(["settings","top-tab"]).optional(),order:a().optional(),fields:l(cn())}),Zo=t({id:e(),label:e(),icon:e(),order:a().optional()}),Yo=t({tabs:l(Zo).optional(),sections:l(jo)}),da=Yo.nullable(),Qo={getDeviceSettingsContribution:{input:t({deviceId:a()}),output:da,kind:"query",auth:"protected"},getDeviceLiveContribution:{input:t({deviceId:a()}),output:da,kind:"query",auth:"protected"},applyDeviceSettingsPatch:{input:t({deviceId:a(),patch:b(e(),f())}),output:t({success:w(!0)}),kind:"mutation",auth:"admin"}},Jo={getStatus:{input:t({deviceId:a()}),output:f().nullable(),kind:"query",auth:"protected"}};function Om(i){let s=i.methods;return i.exposesDeviceSettings&&(s={...Qo,...s}),i.status&&(s={...Jo,...s}),s}function c(i,s,n){return{input:i,output:s,kind:n?.kind??"query",auth:n?.auth??"protected",...n?.access!==void 0?{access:n.access}:{},timeoutMs:n?.timeoutMs}}function Y(i){return{data:i}}function zm(i){return i?.deviceConfig!==void 0}const Xo=t({className:e(),hits:a().int().nonnegative(),avgScore:a().min(0).max(1),peakScore:a().min(0).max(1)}),la=t({ts:a().int(),windowSec:a().int().positive(),level:t({rms:a(),dbfs:a()}),peakDbfs:a(),avgDbfs:a(),current:t({className:e(),score:a().min(0).max(1),timestamp:a().int()}).nullable(),byClass:l(Xo).readonly()}),es=t({ts:a().int(),dbfs:a().nullable(),peakDbfs:a(),avgDbfs:a(),topClass:e().nullable(),topScore:a().min(0).max(1).nullable()}),ts=t({points:l(es).readonly(),effectiveSampleEveryMs:a().int().positive(),windowMsActual:a().int().nonnegative()}),ln={name:"audio-metrics",scope:"device",mode:"singleton",deviceTypes:[N.Camera],methods:{getCurrentSnapshot:c(t({deviceId:a()}),la.nullable()),getHistory:c(t({deviceId:a(),windowSec:a().int().positive().optional(),sampleEveryMs:a().int().positive().optional()}),ts)},runtimeState:la},Ue=t({percentage:a().min(0).max(100),charging:S(["dc","solar","none"]),sleeping:g(),lastUpdated:a()}),pn={name:"battery",scope:"device",mode:"singleton",deviceTypes:[N.Camera,N.Sensor,N.Button,N.Switch],methods:{},events:{onStatusChanged:{data:t({deviceId:a(),status:Ue})}},status:{schema:Ue,kind:"push"},runtimeState:Ue},pa=t({percentage:a().min(0).max(100),lastChangedAt:a()}),mn={name:"brightness",scope:"device",mode:"singleton",deviceTypes:[N.Light],methods:{setBrightness:c(t({deviceId:a().int().nonnegative(),percentage:a().min(0).max(100)}),h(),{kind:"mutation",auth:"admin"})},events:{onBrightnessChanged:{data:t({deviceId:a(),percentage:a().min(0).max(100),lastChangedAt:a()})}},status:{schema:pa,kind:"command-driven"},runtimeState:pa},K=S(["high","mid","low"]),Lm=["high","mid","low"],Bt=S(["pull-rtsp","pull-rtmp","pull-http","pull-rfc4571","push-annexb"]),Be=t({width:a().int().positive(),height:a().int().positive()}),rt=t({camStreamId:e().min(1),deviceId:a().int().nonnegative(),kind:Bt,url:e().optional(),codec:e().optional(),resolution:Be.optional(),fps:a().positive().optional(),label:e().optional(),deviceFeatures:l(e()).optional(),autoEligible:g().optional(),metadata:b(e(),f()).optional()}),we=S(["unassigned","idle","connecting","streaming","error"]),dt=t({deviceId:a().int().nonnegative(),profile:K,brokerId:e(),sourceCamStreamId:e().nullable(),status:we,resolution:Be.optional(),codec:e().optional(),preBufferSec:a().nonnegative().optional(),errorMessage:e().optional()}),as=t({id:e(),label:e(),protocol:S(["rtsp","rtmp","annexb","http-mjpeg","webrtc","custom"]),url:e().optional(),resolution:t({width:a(),height:a()}).readonly().optional(),fps:a().optional(),bitrate:a().optional(),codec:e().optional(),profileHint:S(["high","mid","low"]).optional()}),_m=t({type:e(),url:e(),videoCodec:e().optional(),audioCodec:e().optional(),metadata:b(e(),f()).readonly().optional()}),ns=t({type:S(["video","audio"]),data:M(Uint8Array),pts:a(),dts:a(),keyframe:g(),codec:e()}),ma=t({data:M(Uint8Array),width:a(),height:a(),format:S(["jpeg","rgb","bgr","yuv420","gray"]),timestamp:a()}),lt=t({shmId:e(),slot:a().int().nonnegative(),seq:a().int().nonnegative(),width:a().int().positive(),height:a().int().positive(),format:S(["jpeg","rgb","bgr","yuv420","gray"]),pts:a(),byteLength:a().int().nonnegative(),nodeId:e(),slotCount:a().int().positive()}),os=S(["rgb","bgr","yuv420","gray"]),ss=t({brokerId:e(),format:os,maxFps:a().positive().optional(),tag:e().optional()}),is=t({subscriptionId:e(),maxFps:a().nonnegative()}),cs=t({data:M(Uint8Array),sampleRate:a().int().positive(),channels:a().int().positive(),timestamp:a()}),rs=t({brokerId:e(),tag:e().optional()}),ds=t({subscriptionId:e()}),ls=S(["idle","connecting","streaming","error","stopped"]),ps=t({status:ls,inputFps:a(),decodeFps:a(),encodedSubscribers:a(),decodedSubscribers:a(),uptimeMs:a(),bitrateKbps:a(),idrIntervalMs:a(),codec:e().optional(),totalBytes:a(),packetCount:a(),rtspClients:a(),pipeClients:a(),preBufferSec:a(),preBufferMs:a(),preBufferPackets:a(),decoderNodeId:e().nullable(),audio:t({codec:e(),sampleRate:a(),channels:a(),supported:g()}).nullable().optional()}),qt=S(["webrtc","hls","mjpeg","rtsp"]),ms=t({streamId:e(),format:qt,url:e().nullable(),active:g()}),us={name:"streaming-engine",scope:"system",mode:"singleton",internal:!0,methods:{registerStream:c(t({streamId:e(),sourceUrl:e(),codec:e().optional()}),h(),{kind:"mutation"}),unregisterStream:c(t({streamId:e()}),h(),{kind:"mutation"}),getStreamUrl:c(t({streamId:e(),format:qt}),e().nullable()),listStreams:c(h(),l(ms))}},pt=t({brokerId:e(),url:e(),mutedUrl:e(),enabled:g()}),gs=t({sessionId:e(),remoteAddr:e(),playing:g(),muted:g(),connectedAt:a(),lastRtpAt:a(),bytesSent:a()}),hs=t({tag:e(),subscribedAt:a(),maxFps:a(),framesDelivered:a(),framesDropped:a()}),vs=t({tag:e(),subscribedAt:a(),chunksDelivered:a()}),ys=t({rtsp:l(gs).readonly(),decoded:l(hs).readonly(),audio:l(vs).readonly(),pipeClients:a(),encodedSubscribers:a()}),Um=S(["reconnecting","sleeping","offline","disabled","waking"]),Ss=S(["H264","H265","auto"]),fs=S(["AAC","Opus","PCMU","none"]),un=t({width:a().int().positive(),height:a().int().positive()}),bs=t({deviceId:a().int().nonnegative(),videoCodec:Ss,audioCodec:fs.optional(),maxResolution:un.optional(),tag:e().optional()}),Is=t({url:e(),videoCodec:S(["H264","H265"]),audioCodec:e(),resolution:un,transcoded:g(),encoder:e(),pipelineKey:e()}),ks={name:"stream-broker",scope:"system",mode:"singleton",exposesDeviceSettings:!0,methods:{publishCameraStream:c(t({deviceId:a().int().nonnegative(),camStreamId:e().min(1),kind:Bt,url:e().optional(),codec:e().optional(),resolution:Be.optional(),fps:a().positive().optional(),label:e().optional(),deviceFeatures:l(e()).optional(),autoEligible:g().optional(),metadata:b(e(),f()).optional()}),t({success:w(!0)}),{kind:"mutation",auth:"admin"}),retractCameraStream:c(t({deviceId:a().int().nonnegative(),camStreamId:e().min(1)}),t({success:w(!0)}),{kind:"mutation",auth:"admin"}),assignProfile:c(t({deviceId:a().int().nonnegative(),profile:K,camStreamId:e().min(1)}),t({success:w(!0)}),{kind:"mutation",auth:"admin"}),unassignProfile:c(t({deviceId:a().int().nonnegative(),profile:K}),t({success:w(!0)}),{kind:"mutation",auth:"admin"}),listAllCameraStreams:c(h(),l(rt).readonly()),listAllProfileSlots:c(h(),l(dt).readonly()),getBrokerStats:c(t({brokerId:e()}),ps),listClients:c(t({brokerId:e()}),ys),killClient:c(t({brokerId:e(),channel:S(["rtsp","decoded","audio"]),handle:e()}),t({killed:g()}),{kind:"mutation",auth:"admin"}),restartProfile:c(t({deviceId:a().int().nonnegative(),profile:K}),t({success:g()}),{kind:"mutation",auth:"admin"}),getStreamUrl:c(t({streamId:e(),format:qt}),t({url:e()})),getStreamWithCodec:c(bs,Is,{kind:"mutation",auth:"admin"}),releaseStreamWithCodec:c(t({pipelineKey:e()}),t({released:g(),refcount:a().int().nonnegative()}),{kind:"mutation",auth:"admin"}),subscribeAudioChunks:c(rs,ds,{kind:"mutation"}),pullAudioChunks:c(t({subscriptionId:e(),maxCount:a().int().positive().default(8)}),l(cs).readonly()),unsubscribeAudioChunks:c(t({subscriptionId:e()}),t({released:g()}),{kind:"mutation"}),subscribeFrames:c(ss,is,{kind:"mutation"}),pullFrameHandles:c(t({subscriptionId:e(),maxCount:a().int().positive().default(4)}),l(lt).readonly()),unsubscribeFrames:c(t({subscriptionId:e()}),t({released:g()}),{kind:"mutation"}),setPreBufferDuration:c(t({brokerId:e(),seconds:a().min(0).max(30)}),h(),{kind:"mutation",auth:"admin"}),getPreBufferInfo:c(t({brokerId:e()}),t({configuredSec:a(),bufferedMs:a(),packetCount:a()})),getRtspPort:c(h(),a()),getAllRtspEntries:c(t({hostname:e().optional()}),l(pt).readonly()),getRtspEntry:c(t({brokerId:e(),hostname:e().optional()}),pt.nullable()),regenerateRtspToken:c(t({brokerId:e()}),e().nullable(),{kind:"mutation",auth:"admin"}),setRtspEnabled:c(t({brokerId:e(),enabled:g()}),h(),{kind:"mutation",auth:"admin"}),isRtspEnabled:c(t({brokerId:e()}),g())},events:{onCamStreamDemand:Y(t({deviceId:a().int().nonnegative(),camStreamId:e(),profile:K})),onCamStreamIdle:Y(t({deviceId:a().int().nonnegative(),camStreamId:e()})),onRequestStreamSourceRefresh:Y(t({deviceId:a().int().nonnegative(),camStreamId:e(),brokerId:e()}))}},gn={name:"camera-streams",scope:"device",mode:"singleton",kind:"wrapper",defaultActive:!0,deviceTypes:[N.Camera],methods:{getCameraStreams:c(t({deviceId:a().int().nonnegative()}),l(rt).readonly()),getBrokerStreams:c(t({deviceId:a().int().nonnegative()}),l(dt).readonly()),getRtspEntries:c(t({deviceId:a().int().nonnegative(),hostname:e().optional()}),l(pt).readonly())},events:{onCamStreamsChanged:Y(t({deviceId:a().int().nonnegative(),camStreams:l(rt).readonly()})),onProfileSlotsChanged:Y(t({deviceId:a().int().nonnegative(),profileSlots:l(dt).readonly()}))},runtimeState:t({online:g(),slotStatuses:t({high:we.optional(),mid:we.optional(),low:we.optional()}),slotErrors:t({high:e().optional(),mid:e().optional(),low:e().optional()}),lastChangedAt:a()})},ws=S(["online","sleeping","offline","unknown"]),mt=t({childNativeId:e(),name:e(),type:S(N),status:ws,metadata:t({model:e().optional(),serialNumber:e().optional(),uid:e().optional(),rtspChannel:a().int().nonnegative().optional(),isBattery:g().optional(),isDoorbell:g().optional(),isMultifocal:g().optional()}).default({}),alreadyAdopted:g(),adoptedDeviceId:a().int().nonnegative().nullable()}),ua=t({discovered:l(mt),lastDiscoveryAt:a().int().nonnegative().nullable(),lastError:e().nullable()}),hn={name:"device-discovery",scope:"device",mode:"singleton",deviceTypes:[N.Hub],status:{schema:ua,kind:"poll"},runtimeState:ua.extend({lastFetchedAt:a().int().nonnegative()}),methods:{listDiscovered:c(t({deviceId:a().int().nonnegative()}),l(mt).readonly()),refreshDiscovery:c(t({deviceId:a().int().nonnegative()}),l(mt).readonly(),{kind:"mutation",auth:"admin"}),adoptDevice:c(t({deviceId:a().int().nonnegative(),childNativeId:e(),name:e().optional()}),t({deviceId:a().int().nonnegative(),stableId:e()}),{kind:"mutation",auth:"admin"}),releaseDevice:c(t({deviceId:a().int().nonnegative(),childDeviceId:a().int().nonnegative()}),h(),{kind:"mutation",auth:"admin"})}},ga=t({lastPressedAt:a().nullable(),pressCountSinceStart:a()}),As=t({deviceId:a(),timestamp:a()}),vn={name:"doorbell",scope:"device",mode:"singleton",deviceTypes:[N.Button],methods:{},events:{onPressed:{data:As}},status:{schema:ga,kind:"push"},runtimeState:ga},Cs=S(["jpeg","rgb","bgr","yuv420","gray"]),Ae=t({data:_(),format:Cs,width:a(),height:a(),timestamp:a()}),ne=t({x:a(),y:a(),w:a(),h:a()}),Ns=t({class:e(),originalClass:e(),score:a(),bbox:ne}),ha=t({data:M(Uint8Array),sampleRate:a(),channels:a(),timestamp:a(),deviceId:a().optional()}),Ps=t({rms:a(),dbfs:a()}),ut=t({className:e(),originalClass:e().optional(),score:a()}),Me=t({bbox:ne,pixelCount:a(),intensity:a()}),Ds=t({detected:g(),regionCount:a(),regions:l(Me).readonly(),rawRegions:l(Me).readonly(),frameWidth:a(),frameHeight:a(),analysisMs:a()}),Ms={name:"motion-detection",scope:"device",mode:"singleton",kind:"wrapper",defaultActive:!0,exposesDeviceSettings:!0,methods:{analyze:c(t({deviceId:a(),frame:Ae}),Ds,{kind:"mutation"}),removeCamera:c(t({deviceId:a()}),h(),{kind:"mutation"}),reset:c(h(),h(),{kind:"mutation"})},events:{onMotion:{data:t({deviceId:a(),detected:g(),regionCount:a()})}}},Fm=t({activeCameras:a(),throttledCameras:a(),avgInferenceTimeMs:a(),queueDepth:a()}),Ot=t({detectionMode:S(["disabled","always-on","on-motion"]),configuredFps:a(),actualFps:a(),queueDepth:a(),avgInferenceTimeMs:a(),droppedFrames:a(),phase:S(["idle","watching","active"])}),Es=Ot.extend({deviceId:a()}),gt=S(["onnx","coreml","openvino","tflite","pt"]),ue=S(["detector","cropper","classifier","refiner","audio-classifier"]),T=t({runtime:S(["node","python"]),backend:e(),format:gt,device:e().optional()}),xs=t({id:e(),label:e(),description:e().optional()}),Ts=t({engine:T,devices:l(xs).readonly(),defaultDevice:e()}),ht=Mt(()=>t({addonId:e(),addonName:e(),slot:ue,inputClasses:l(e()).readonly(),outputClasses:l(e()).readonly(),enabled:g(),modelId:e(),children:l(ht).readonly(),engine:T.optional(),group:e().optional(),settings:b(e(),f()).optional()})),Ee=Mt(()=>t({addonId:e(),enabled:g(),modelId:e(),children:l(Ee).readonly(),settings:b(e(),f()).optional()})),Fe=t({id:e(),name:e(),createdAt:e(),updatedAt:e(),engine:T,steps:l(Ee).readonly()}),Rs=t({id:e(),name:e(),formats:b(e(),t({downloaded:g(),sizeMB:a()}))}),Bs=_(),qs=t({id:e(),name:e(),slot:ue,inputClasses:l(e()).readonly(),outputClasses:l(e()).readonly(),childSlots:l(ue).readonly(),models:l(Rs).readonly(),defaultModelId:e(),defaultModelIdByFormat:b(e(),e()).optional(),enabledByDefault:g().optional(),defaultConfidence:a(),group:e().optional(),configSchema:l(Bs).readonly().optional()}),Os=t({id:ue,label:e(),priority:a(),parentSlot:ue.nullable(),addons:l(qs).readonly()}),zs=t({availableEngines:l(Ts).readonly(),selectedEngine:T,slots:l(Os).readonly()}),Ls=t({detections:l(Ns).readonly(),inferenceMs:a(),modelId:e()}),ae=Mt(()=>t({addonId:e(),modelId:e(),enabled:g().default(!0),children:l(ae).optional(),settings:b(e(),f()).optional()})),_s=t({filename:e(),stepIds:l(e()).readonly().optional()}),Us=t({base64:e(),filename:e()}),Fs=t({filename:e(),sizeKb:a()}),Hs=t({base64:e()}),$s=t({id:e(),name:e(),description:e(),available:g(),rawLabels:l(e()).readonly().optional()}),Ws=t({activeBackend:e(),availableBackends:l($s).readonly(),sampleRate:a(),chunkDurationMs:a()}),Gs=t({filePath:e(),sizeMB:a(),durationMs:a()}),Vs=t({success:g(),error:e().optional(),frame:_().optional()}),Ks=_(),js=_(),Zs=_(),Ys=_(),Qs=_(),va=_(),Js={name:"pipeline-executor",scope:"system",mode:"singleton",methods:{getAvailableEngines:c(h(),l(T)),getSelectedEngine:c(h(),T),getDefaultSteps:c(T,l(ht)),reprobeEngine:c(h(),T,{kind:"mutation",auth:"admin"}),getVideoPipelineSteps:c(h(),b(e(),t({modelId:e(),settings:b(e(),f()).readonly()}))),setVideoPipelineSteps:c(t({steps:b(e(),t({modelId:e(),settings:b(e(),f()).readonly()}))}),t({success:w(!0)}),{kind:"mutation",auth:"admin"}),getSchema:c(h(),zs),getGlobalSteps:c(h(),l(ht).readonly().nullable()),getGlobalPipelineConfig:c(h(),Ks),getOrchestratorConfigSchema:c(h(),js),listTemplates:c(h(),l(Fe).readonly()),saveTemplate:c(t({name:e(),steps:l(Ee).readonly(),engine:T}),Fe,{kind:"mutation"}),updateTemplate:c(t({id:e(),name:e().optional(),steps:l(Ee).readonly().optional()}),Fe,{kind:"mutation"}),deleteTemplate:c(t({id:e()}),h(),{kind:"mutation"}),getCapabilities:c(h(),Ys),getAddonModels:c(t({addonId:e()}),Qs),downloadModel:c(t({addonId:e(),modelId:e(),format:gt}),Gs,{kind:"mutation"}),deleteModel:c(t({addonId:e(),modelId:e(),format:gt}),t({success:w(!0)}),{kind:"mutation"}),detect:c(t({addonId:e(),frame:Ae,config:b(e(),f()).optional()}),Ls),runPipeline:c(t({engine:T.optional(),steps:l(ae).min(1),frame:Ae.optional(),imageBase64:e().optional(),image:M(Uint8Array).optional(),referenceImage:e().optional(),deviceId:a().optional(),sessionId:e().optional()}),va,{kind:"mutation"}),runPipelineBatch:c(t({engine:T.optional(),steps:l(ae).min(1),frames:l(Ae).min(1).max(255),deviceId:a().optional(),sessionId:e().optional()}),t({results:l(va).readonly()}),{kind:"mutation"}),cacheFrameInPool:c(t({data:M(Uint8Array),width:a().int().positive(),height:a().int().positive(),format:S(["rgb","bgr","gray"])}),t({frameId:a(),width:a(),height:a()}),{kind:"mutation"}),inferCached:c(t({stepId:e(),frameId:a().int()}),b(e(),f()),{kind:"mutation"}),uncacheFrame:c(t({frameId:a().int()}),h(),{kind:"mutation"}),getEffectiveTuning:c(h(),t({batchMode:e(),windowMs:a(),maxBatchSize:a(),concurrency:a()})),listLoadedEngines:c(h(),l(t({engineKey:e(),engine:T,modelsLoaded:l(e()).readonly(),inUseByCameras:l(a()).readonly(),kind:S(["runtime","warm-override"]),poolPid:a().nullable(),idleMs:a().nullable(),idleTtlMs:a().nullable()})).readonly()),spinEngine:c(t({engine:T}),t({success:w(!0)}),{kind:"mutation",auth:"admin"}),killEngine:c(t({engine:T,force:g().optional()}),t({success:g(),reason:e().optional()}),{kind:"mutation",auth:"admin"}),listReferenceImages:c(h(),l(_s).readonly()),getReferenceImage:c(t({filename:e()}),Us.nullable()),getReferenceAudioFiles:c(h(),l(Fs).readonly()),getReferenceAudio:c(t({filename:e()}),Hs.nullable()),getAudioCapabilities:c(h(),Ws),runAudioTest:c(t({addonId:e(),modelId:e(),filename:e().optional(),settings:b(e(),f()).optional()}),Vs,{kind:"mutation"}),getDetectionConfigSchema:c(h(),Zs)}},Xs=S(["polygon","tripwire"]),ei=t({x:a(),y:a()}),de=t({id:e(),name:e(),kind:Xs.default("polygon"),polygon:l(ei).readonly(),color:e().default("#3b82f6")}),yn={name:"zones",scope:"device",mode:"singleton",deviceTypes:[N.Camera],methods:{listZones:c(t({deviceId:a()}),l(de).readonly()),addZone:c(t({deviceId:a(),zone:de}),h(),{kind:"mutation",auth:"admin"}),removeZone:c(t({deviceId:a(),zoneId:e()}),h(),{kind:"mutation",auth:"admin"}),updateZone:c(t({deviceId:a(),zone:de}),h(),{kind:"mutation",auth:"admin"})},runtimeState:t({zones:l(de).readonly()})},Q={min:0,max:6e4,default:3e4,step:500},j={min:1,max:30,default:4,step:1},Z={min:1,max:30,default:10,step:1},zt=S(["onboard","analyzer"]),ti=l(zt),ai=t({deviceId:a(),detected:g(),source:zt.default("analyzer"),regions:l(Me).readonly().optional()}),ni=t({deviceId:a(),detectionMode:S(["disabled","always-on","on-motion"]).default("on-motion"),audioMode:S(["disabled","always-on","on-motion"]).default("always-on"),motionCooldownMs:a().min(Q.min).default(Q.default),motionFps:a().min(j.min).max(j.max).default(j.default),detectionFps:a().min(Z.min).max(Z.max).default(Z.default),motionStreamId:e(),detectionStreamId:e(),motionSources:ti.default(["analyzer"]),pipelineEnabled:g().default(!0),engine:T.optional(),steps:l(ae).readonly().optional(),audio:t({engine:T,modelId:e(),enabled:g()}).nullable().optional(),zones:l(de).readonly().default([]),onboardMotionDrivesAnalyzer:g().default(!0)}),Hm=[{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:j.min,max:j.max,step:j.step,default:j.default,showValue:!0,unit:"fps",showWhen:{field:"motionSources",includes:"analyzer"}},{key:"detectionFps",type:"slider",label:"Detection FPS",min:Z.min,max:Z.max,step:Z.step,default:Z.default,showValue:!0,unit:"fps"},{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:Q.min,max:Q.max,step:Q.step,default:Q.default,showValue:!0,unit:"s",displayScale:1e3},{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"}}],Sn=t({nodeId:e(),attachedCameras:a(),activeCameras:a(),avgInferenceFps:a(),avgInferenceTimeMs:a(),queueDepthTotal:a(),hardware:t({hasGpu:g(),inferenceBackend:e().optional(),cpuCores:a().optional()})}),oi=t({nodeId:e(),activeCameras:a(),throttledCameras:a(),avgInferenceTimeMs:a(),queueDepth:a()}),si={name:"pipeline-runner",scope:"system",mode:"singleton",methods:{attachCamera:c(ni,t({success:w(!0)}),{kind:"mutation"}),detachCamera:c(t({deviceId:a()}),t({success:w(!0)}),{kind:"mutation"}),reportMotion:c(ai,t({success:w(!0)}),{kind:"mutation"}),getLocalLoad:c(h(),Sn),getLocalMetrics:c(h(),oi),getCameraMetrics:c(t({deviceId:a()}),Ot.nullable()),getAllCameraMetrics:c(h(),l(Es).readonly()),getLocalCameras:c(h(),l(a()).readonly())}},ya=t({detected:g(),lastDetectedAt:a().nullable(),autoClearAfterMs:a().nullable()}),ii=t({deviceId:a(),detected:g(),timestamp:a(),source:zt,regions:l(Me).readonly().optional()}),fn={name:"motion",scope:"device",mode:"singleton",deviceTypes:[N.Camera,N.Sensor],methods:{isDetected:c(t({deviceId:a()}),g())},events:{onMotionChanged:{data:ii}},status:{schema:ya,kind:"push"},runtimeState:ya},bn=t({enabled:g(),lastChangedAt:a()}),ci=bn.extend({lastFetchedAt:a()}),In={name:"motion-trigger",scope:"device",mode:"singleton",deviceTypes:[N.Light,N.Siren,N.Switch],methods:{setMotionTrigger:c(t({deviceId:a().int().nonnegative(),enabled:g()}),h(),{kind:"mutation",auth:"admin"})},events:{onMotionTriggerChanged:{data:t({deviceId:a(),enabled:g(),lastChangedAt:a()})}},status:{schema:bn,kind:"command-driven"},runtimeState:ci},kn=t({x:a(),y:a()}),wn=t({kind:w("rect"),x:a(),y:a(),width:a(),height:a()}),An=t({kind:w("polygon"),points:l(kn)}),Cn=t({kind:w("grid"),gridWidth:a(),gridHeight:a(),cells:l(g())}),ri=t({kind:w("line"),points:l(kn)}),$m=he("kind",[wn,An,Cn,ri]),Nn=S(["rect","polygon","grid","line"]),di=t({min:a(),max:a()}),li=t({width:a(),height:a()}),Pn=t({id:a(),enabled:g(),shape:Cn}),Sa=t({enabled:g(),sensitivity:a(),regions:l(Pn),lastFetchedAt:a()}),pi=t({maxRegions:a(),supportedShapes:l(Nn),grid:li,sensitivity:t({min:a(),max:a(),step:a()})}),mi=t({enabled:g().optional(),sensitivity:a().optional(),regions:l(Pn).optional()}),Dn={name:"motion-zones",scope:"device",mode:"singleton",deviceTypes:[N.Camera],deviceConfig:{ui:{kind:"widget",widgetId:"host/motion-zones-grid",tab:"motion",label:"Motion Zones"}},methods:{getOptions:c(t({deviceId:a()}),pi),setZone:c(t({deviceId:a(),patch:mi}),h(),{kind:"mutation",auth:"admin"})},status:{schema:Sa,kind:"poll"},runtimeState:Sa},vt=S(["person","vehicle","animal","face","package","other"]),Mn=t({class:vt,timestamp:a(),confidence:a().min(0).max(1).optional()}),En=t({lastByClass:Io(vt,Mn.nullable()),supportedClasses:l(vt).readonly(),enabled:g()}),ui=En.extend({lastFetchedAt:a()}),xn={name:"native-object-detection",scope:"device",mode:"singleton",deviceTypes:[N.Camera],methods:{setEnabled:c(t({deviceId:a(),enabled:g()}),h(),{kind:"mutation",auth:"admin"})},events:{onDetected:{data:t({deviceId:a(),detection:Mn})}},status:{schema:En,kind:"push"},runtimeState:ui},gi=he("kind",[wn,An]),Tn=t({id:a(),enabled:g(),shape:gi}),fa=t({enabled:g(),regions:l(Tn),lastFetchedAt:a()}),hi=t({maxRegions:a(),supportedShapes:l(Nn),polygonVertices:di.optional()}),vi=t({enabled:g().optional(),regions:l(Tn).optional()}),Rn={name:"privacy-mask",scope:"device",mode:"singleton",deviceTypes:[N.Camera],deviceConfig:{ui:{kind:"widget",widgetId:"host/privacy-mask-grid",tab:"image",label:"Privacy Mask"}},methods:{getOptions:c(t({deviceId:a()}),hi),setMask:c(t({deviceId:a(),patch:vi}),h(),{kind:"mutation",auth:"admin"})},status:{schema:fa,kind:"poll"},runtimeState:fa},yi=e().describe("Vendor target string (people/vehicle/pet); empty = camera default"),yt=t({targetType:yi,stopDelaySeconds:a().int().min(0).max(300),disappearDelaySeconds:a().int().min(0).max(300)}),Si=t({value:e(),label:e()}),Ce=t({enabled:g(),lastChangedAt:a(),currentSettings:yt.nullable(),supportedTargetTypes:l(Si)}),fi=Ce.extend({lastFetchedAt:a()}),Bn={name:"ptz-autotrack",scope:"device",mode:"singleton",deviceTypes:[N.Camera],deviceConfig:{ui:{kind:"widget",widgetId:"host/ptz-autotrack",tab:"ptz",topTab:!0,label:"Auto-Tracking",order:5}},methods:{getStatus:c(t({deviceId:a()}),Ce),setEnabled:c(t({deviceId:a(),enabled:g()}),h(),{kind:"mutation"}),getSettings:c(t({deviceId:a()}),yt.nullable()),setSettings:c(t({deviceId:a(),settings:yt.partial()}),h(),{kind:"mutation"})},events:{onStatusChanged:{data:t({deviceId:a(),status:Ce})}},status:{schema:Ce,kind:"command-driven"},runtimeState:fi},bi=S(["main","sub","ext"]),He=t({width:a(),height:a(),codec:S(["h264","h265"]),framerate:a(),bitrate:a(),bitrateMode:S(["vbr","cbr"]).optional(),encoderProfile:S(["high","main","baseline"]).optional(),gop:a().optional(),audio:g().optional()}),ba=t({main:He.optional(),sub:He.optional(),ext:He.optional(),lastFetchedAt:a()}),$e=t({resolutions:l(t({width:a(),height:a()})),codecs:l(S(["h264","h265"])),framerates:l(a()),bitrates:l(a()),bitrateRange:Et([a(),a()]).optional(),supportsBitrateMode:g(),supportsEncoderProfile:g(),supportsGop:g(),gop:t({min:a(),max:a(),step:a()}).optional()}),Ii=t({main:$e.optional(),sub:$e.optional(),ext:$e.optional()}),ki=t({width:a().optional(),height:a().optional(),codec:S(["h264","h265"]).optional(),framerate:a().optional(),bitrate:a().optional(),bitrateMode:S(["vbr","cbr"]).optional(),encoderProfile:S(["high","main","baseline"]).optional(),gop:a().optional(),audio:g().optional()}),qn={name:"stream-params",scope:"device",mode:"singleton",deviceTypes:[N.Camera],deviceConfig:{ui:{kind:"derived-form",builderId:"stream-params",tab:"streaming"}},methods:{getOptions:c(t({deviceId:a()}),Ii),setProfile:c(t({deviceId:a(),profile:bi,patch:ki}),h(),{kind:"mutation",auth:"admin"}),getConfigSchema:c(t({deviceId:a()}),f().nullable())},status:{schema:ba,kind:"poll"},runtimeState:ba},Ia=t({on:g(),lastChangedAt:a()}),On={name:"switch",scope:"device",mode:"singleton",deviceTypes:[N.Switch,N.Siren,N.Light],methods:{setState:c(t({deviceId:a(),on:g()}),h(),{kind:"mutation",auth:"admin"})},events:{onStateChanged:{data:t({deviceId:a(),on:g(),lastChangedAt:a()})}},status:{schema:Ia,kind:"command-driven"},runtimeState:Ia,settings:{bindings:[{kind:"scalar",statusPath:"on",method:"setState",valueArg:"on",field:{label:"On",kind:"boolean"}}]}},St=t({totalObjects:a().int().nonnegative(),byClass:b(e(),a().int().nonnegative())}),wi=St.extend({zoneId:e(),zoneName:e(),trackIds:l(e()).readonly()}),ka=t({ts:a().int(),frameWidth:a().int().nonnegative(),frameHeight:a().int().nonnegative(),zones:l(wi).readonly(),frame:St,unzoned:St}),Ai=S(["minute","5min","hour"]),We=t({from:a().int(),to:a().int(),resolution:Ai}),Ge=t({ts:a().int(),count:a().int().nonnegative()}),zn={name:"zone-analytics",scope:"device",mode:"singleton",deviceTypes:[N.Camera],methods:{getCurrentSnapshot:c(t({deviceId:a()}),ka.nullable()),getZoneHistory:c(t({deviceId:a(),zoneId:e(),className:e().optional()}).extend(We.shape),l(Ge).readonly()),getCameraHistory:c(t({deviceId:a(),className:e().optional()}).extend(We.shape),l(Ge).readonly()),getUnzonedHistory:c(t({deviceId:a(),className:e().optional()}).extend(We.shape),l(Ge).readonly())},runtimeState:ka},Ci=S(["include","exclude"]),le=t({id:e(),name:e().optional(),zoneIds:l(e()).min(1).readonly(),mode:Ci,classFilter:l(e()).readonly().optional(),overlapThreshold:a().min(0).max(1).optional(),bboxInclusionPct:a().min(0).max(100).optional(),preferMask:g().optional(),enabled:g().default(!0)}),Wm=l(le).readonly(),wa=S(["motion","detection"]),Ln={name:"zone-rules",scope:"device",mode:"singleton",deviceTypes:[N.Camera],methods:{listRules:c(t({deviceId:a(),stage:wa}),l(le).readonly()),setRules:c(t({deviceId:a(),stage:wa,rules:l(le).readonly()}),h(),{kind:"mutation",auth:"admin"})},runtimeState:t({motion:l(le).readonly(),detection:l(le).readonly()})},Ni=t({connected:g(),deviceCount:a(),error:e().optional()}),Gm=t({externalId:e(),name:e(),type:e(),metadata:b(e(),f()).optional()}),xe=t({stableId:e(),type:S(N),suggestedName:e(),prefilledConfig:b(e(),f())}),Te=t({id:a(),stableId:e(),addonId:e(),type:e(),name:e(),parentDeviceId:a().nullable(),online:g(),features:l(e()),config:b(e(),f())}),ft=t({status:S(["ok","error"]),labels:l(e()).optional(),error:e().optional()}),Pi=f(),_n={name:"device-provider",scope:"system",mode:"collection",methods:{start:c(h(),h(),{kind:"mutation"}),stop:c(h(),h(),{kind:"mutation"}),getStatus:c(h(),Ni),getDevices:c(h(),l(t({id:e(),name:e(),type:e()}))),supportsDiscovery:c(t({}),g()),discoverDevices:c(t({}),l(xe),{kind:"mutation",auth:"admin"}),adoptDiscoveredDevice:c(t({candidate:xe}),Te,{kind:"mutation",auth:"admin"}),supportsManualCreation:c(t({}),g()),getChildCreationSchema:c(t({type:S(N)}),Pi),createDevice:c(t({type:S(N),config:b(e(),f())}),Te,{kind:"mutation",auth:"admin"}),testCreationField:c(t({type:S(N),key:e(),value:f(),formValues:b(e(),f()).optional()}),ft,{kind:"mutation",auth:"admin"})}},Di=t({id:e(),label:e(),icon:e(),order:a().optional()}),Mi=t({id:e(),title:e(),description:e().optional(),style:S(["card","accordion"]).optional(),defaultCollapsed:g().optional(),columns:R([w(1),w(2),w(3),w(4)]).optional(),tab:e().optional(),location:S(["settings","top-tab"]).optional(),order:a().optional(),fields:l(cn())}),J=t({tabs:l(Di).optional(),sections:l(Mi)}),Aa=b(e(),f()),Ca=t({success:w(!0)}),Ei={name:"addon-settings",scope:"system",mode:"singleton",nodeIdMode:"data",methods:{getGlobalSettings:c(t({addonId:e(),nodeId:e().optional(),overlay:b(e(),f()).optional(),cap:e().optional()}),J.nullable()),updateGlobalSettings:c(t({addonId:e(),nodeId:e().optional(),patch:Aa}),Ca,{kind:"mutation",auth:"admin"}),getDeviceSettings:c(t({addonId:e(),deviceId:a(),nodeId:e().optional()}),J.nullable()),updateDeviceSettings:c(t({addonId:e(),deviceId:a(),nodeId:e().optional(),patch:Aa}),Ca,{kind:"mutation",auth:"admin"})}},xi=S(["info","success","warning","error"]),Ti=S(["active","in-progress","completed","failed","dismissed"]),Ri=t({type:e(),id:e()}),Ve=t({id:e(),category:e(),severity:xi,title:e(),message:e(),status:Ti,progress:a().optional(),read:g(),createdAt:a(),updatedAt:a(),source:Ri.optional(),metadata:b(e(),f()).optional()}),Bi={name:"alerts",scope:"system",mode:"singleton",methods:{emit:c(Ve,h(),{kind:"mutation"}),update:c(t({alertId:e(),patch:Ve.partial()}),h(),{kind:"mutation"}),list:c(t({unreadOnly:g().optional(),limit:a().optional()}).optional(),l(Ve).readonly()),getUnreadCount:c(h(),a()),markRead:c(t({alertId:e()}),h(),{kind:"mutation"}),markAllRead:c(h(),h(),{kind:"mutation"}),dismiss:c(t({alertId:e()}),h(),{kind:"mutation"})}},qi={name:"storage",scope:"system",mode:"singleton",methods:{resolve:c(t({location:H,relativePath:e()}),e()),write:c(t({location:H,relativePath:e(),data:M(Uint8Array)}),h(),{kind:"mutation"}),read:c(t({location:H,relativePath:e()}),M(Uint8Array)),exists:c(t({location:H,relativePath:e()}),g()),list:c(t({location:H,prefix:e().optional()}),l(e()).readonly()),delete:c(t({location:H,relativePath:e()}),h(),{kind:"mutation"}),getAvailableSpace:c(t({location:H}),a().nullable()),beginUpload:c(t({location:H,relativePath:e(),sizeBytes:a().optional()}),t({uploadId:e()}),{kind:"mutation"}),writeChunk:c(t({uploadId:e(),offset:a(),data:M(Uint8Array)}),h(),{kind:"mutation"}),finalizeUpload:c(t({uploadId:e()}),h(),{kind:"mutation"}),abortUpload:c(t({uploadId:e()}),h(),{kind:"mutation"}),beginDownload:c(t({location:H,relativePath:e()}),t({downloadId:e(),sizeBytes:a()}),{kind:"mutation"}),readChunk:c(t({downloadId:e(),offset:a(),length:a()}),M(Uint8Array)),endDownload:c(t({downloadId:e()}),h(),{kind:"mutation"}),listLocations:c(t({type:te.optional()}),l(O).readonly()),getDefaultLocation:c(t({type:te}),O.nullable()),upsertLocation:c(O.omit({createdAt:!0,updatedAt:!0}),O,{kind:"mutation",auth:"admin"}),deleteLocation:c(t({id:e()}),h(),{kind:"mutation",auth:"admin"}),testLocation:c(t({id:e()}),t({ok:g(),error:e().optional()}),{auth:"admin"}),listProviders:c(h(),l(t({providerId:e(),displayName:e(),supportedLocationTypes:l(te).readonly(),configSchema:f()})).readonly()),testConfig:c(t({providerId:e(),config:b(e(),f())}),t({ok:g(),error:e().optional()}),{auth:"admin"})}},Oi=t({providerId:e().min(1),displayName:e().min(1),supportedLocationTypes:l(te).readonly(),configSchema:f()}),zi=t({ok:g(),error:e().optional()}),Li=t({location:O,relativePath:e(),sizeBytes:a().optional()}),_i=t({uploadId:e()}),Ui=t({uploadId:e(),offset:a(),data:M(Uint8Array)}),Fi=t({uploadId:e()}),Hi=t({uploadId:e()}),$i=t({location:O,relativePath:e()}),Wi=t({downloadId:e(),sizeBytes:a()}),Gi=t({downloadId:e(),offset:a(),length:a()}),Vi=t({downloadId:e()}),Ki={name:"storage-provider",scope:"system",mode:"collection",internal:!0,methods:{getProviderInfo:c(h(),Oi),testLocation:c(t({config:b(e(),f())}),zi,{auth:"admin"}),resolve:c(t({location:O,relativePath:e()}),e()),write:c(t({location:O,relativePath:e(),data:M(Uint8Array)}),h(),{kind:"mutation"}),read:c(t({location:O,relativePath:e()}),M(Uint8Array)),exists:c(t({location:O,relativePath:e()}),g()),list:c(t({location:O,prefix:e().optional()}),l(e()).readonly()),delete:c(t({location:O,relativePath:e()}),h(),{kind:"mutation"}),getAvailableSpace:c(t({location:O}),a().nullable()),beginUpload:c(Li,_i,{kind:"mutation"}),writeChunk:c(Ui,h(),{kind:"mutation"}),finalizeUpload:c(Fi,h(),{kind:"mutation"}),abortUpload:c(Hi,h(),{kind:"mutation"}),beginDownload:c($i,Wi,{kind:"mutation"}),readChunk:c(Gi,M(Uint8Array)),endDownload:c(Vi,h(),{kind:"mutation"})}},ji=t({subId:e(),displayName:e(),description:e().optional(),kind:e(),triggerSupported:g(),restoreSupported:g()}),Zi=ji.extend({id:e(),addonId:e(),enabled:g(),retentionCount:a(),label:e().optional(),lastSuccessAt:a().optional(),lastSuccessSizeBytes:a().optional(),cron:e().optional(),nextRunAt:a().optional(),lastRunAt:a().optional()}),Yi=t({id:e(),filename:e(),createdAt:a(),sizeBytes:a(),label:e().optional(),locations:l(e()).readonly()}),Na=t({id:e(),destinationId:e().optional(),label:e().optional(),createdAt:a(),sizeBytes:a(),locations:l(e()).optional()}),Qi=t({path:e(),kind:S(["file","dir","symlink"]),sizeBytes:a(),mtime:a()}),Ji=t({archiveVersion:w(1),createdAt:a(),dataDir:e(),locations:l(e()),entries:l(Qi),totalBytes:a(),totalFiles:a()}),Xi=t({name:e(),sizeBytes:a(),fileCount:a(),present:g()}),ec={name:"backup",scope:"system",mode:"singleton",methods:{listDestinations:c(h(),l(Zi).readonly(),{auth:"admin"}),trigger:c(t({destinations:l(e()).optional(),locations:l(e()).optional(),label:e().optional()}).optional(),l(Na).readonly(),{kind:"mutation",auth:"admin"}),list:c(h(),l(Na).readonly(),{auth:"admin"}),listLocations:c(h(),l(Xi).readonly(),{auth:"admin"}),getEntries:c(t({destinationId:e(),backupId:e()}),Ji.nullable(),{auth:"admin"}),restore:c(t({destinationId:e(),backupId:e(),locations:l(e()).optional()}),h(),{kind:"mutation",auth:"admin"}),delete:c(t({destinationId:e(),backupId:e()}),h(),{kind:"mutation",auth:"admin"}),listArchives:c(t({destinationId:e()}),l(Yi).readonly(),{auth:"admin"}),upsertDestinationPolicy:c(t({locationId:e(),enabled:g(),retentionCount:a().int().min(1).max(1e3),label:e().optional(),cron:e().optional()}),h(),{kind:"mutation",auth:"admin"}),previewSchedule:c(t({cron:e(),count:a().int().min(1).max(20).optional()}),t({ok:g(),error:e().optional(),nextRuns:l(a()).readonly()}))}},Pa=t({where:b(e(),f()).optional(),whereIn:b(e(),l(f())).optional(),whereBetween:b(e(),Et([f(),f()])).optional(),orderBy:t({field:e(),direction:S(["asc","desc"])}).optional(),limit:a().optional(),offset:a().optional()}),Da=t({id:e(),data:b(e(),f())}),tc=t({name:e(),type:S(["TEXT","INTEGER","REAL","JSON","BOOLEAN"]),primaryKey:g().optional(),notNull:g().optional(),unique:g().optional()}),ac=t({name:e(),columns:l(e()).readonly(),unique:g().optional()}),nc={name:"settings-store",scope:"system",mode:"singleton",methods:{get:c(t({namespace:e().optional(),collection:e(),key:e()}),f()),set:c(t({namespace:e().optional(),collection:e(),key:e(),value:f()}),h(),{kind:"mutation"}),query:c(t({namespace:e().optional(),collection:e(),filter:Pa.optional()}),l(Da).readonly()),insert:c(t({namespace:e().optional(),collection:e(),record:Da}),h(),{kind:"mutation"}),update:c(t({namespace:e().optional(),collection:e(),id:e(),data:b(e(),f())}),h(),{kind:"mutation"}),delete:c(t({namespace:e().optional(),collection:e(),key:e()}),h(),{kind:"mutation"}),count:c(t({namespace:e().optional(),collection:e(),filter:Pa.optional()}),a()),isEmpty:c(t({namespace:e().optional(),collection:e()}),g()),declareCollection:c(t({namespace:e().optional(),collection:e(),columns:l(tc).readonly(),indexes:l(ac).readonly().optional()}),h(),{kind:"mutation"})}},Un=S(["debug","info","warn","error"]),Ma=t({timestamp:it(),level:Un,scope:l(e()),message:e(),meta:b(e(),f()).optional(),tags:b(e(),e()).optional()}),oc={name:"log-destination",scope:"system",mode:"collection",internal:!0,methods:{write:c(Ma,h(),{kind:"mutation"}),query:c(t({scope:l(e()).optional(),level:Un.optional(),since:it().optional(),until:it().optional(),limit:a().optional(),tags:b(e(),e()).optional()}),l(Ma).readonly())}},sc=t({staticDir:e()}),ic=t({version:e()}),cc={name:"admin-ui",scope:"system",mode:"singleton",internal:!0,methods:{getStaticDir:c(h(),sc),getVersion:c(h(),ic)}},fe=S(["view","create","delete"]),Fn=R([w("*"),l(e())]),Hn=b(e(),R([w("*"),l(e())])),rc=S(["device","system"]),z=he("type",[t({type:w("category"),target:rc,access:l(fe).min(1)}),t({type:w("capability"),target:e(),access:l(fe).min(1)}),t({type:w("addon"),target:e(),access:l(fe).min(1)}),t({type:w("device"),targets:l(e()).min(1),access:l(fe).min(1)})]),Vm=t({id:e(),username:e(),passwordHash:e(),isAdmin:g().default(!1),allowedProviders:Fn,allowedDevices:Hn,scopes:l(z).default([]),createdAt:a(),updatedAt:a()}),Km=t({id:e(),label:e(),isAdmin:g().default(!1),allowedProviders:Fn,allowedDevices:Hn,tokenHash:e(),tokenPrefix:e(),createdAt:a(),lastUsedAt:a().optional()}),jm=t({id:e(),userId:e(),name:e(),tokenHash:e(),tokenPrefix:e(),scopes:l(z),expiresAt:a().nullish(),lastUsedAt:a().nullish(),createdAt:a()}),Ea=t({userId:e(),username:e(),isAdmin:g(),provider:e(),email:e().optional(),displayName:e().optional(),hubUrl:e().optional(),scopes:l(z).optional(),redirectUri:e().optional(),integrationId:e().optional(),jti:e().optional(),sessionId:e().optional()}),dc={name:"sso-bridge",scope:"system",mode:"singleton",internal:!0,methods:{signBridgeToken:c(t({claims:Ea,ttlSec:a().int().positive().optional()}),t({token:e()})),verifyBridgeToken:c(t({token:e()}),Ea.nullable())}},lc=t({integrationId:e(),displayName:e(),requestedScopes:l(z),allowedRedirectPrefixes:l(e()).min(1),hubUrl:e().optional()}),pc={name:"oauth-integration",scope:"system",mode:"collection",internal:!0,methods:{getDescriptor:c(h(),lc)}},mc=t({credentialId:e(),label:e(),createdAt:a(),lastUsedAt:a().nullable(),transports:l(e()).default([])}),uc={name:"user-passkeys",scope:"system",mode:"collection",internal:!0,methods:{beginRegistration:c(t({userId:e(),username:e()}),t({optionsJSON:b(e(),f())}),{kind:"mutation",auth:"admin",access:"create"}),finishRegistration:c(t({userId:e(),response:b(e(),f()),label:e()}),t({success:w(!0),credentialId:e()}),{kind:"mutation",auth:"admin",access:"create"}),beginAuthentication:c(t({userId:e().optional()}),t({optionsJSON:b(e(),f())}),{kind:"mutation",access:"view"}),finishAuthentication:c(t({userId:e(),response:b(e(),f())}),t({verified:g()}),{kind:"mutation",access:"view"}),listPasskeys:c(t({userId:e()}),l(mc),{auth:"admin"}),removePasskey:c(t({userId:e(),credentialId:e()}),t({success:w(!0)}),{kind:"mutation",auth:"admin",access:"delete"})}},X=ko(),gc=t({to:R([X,l(X).min(1)]),cc:l(X).optional(),bcc:l(X).optional(),from:e().optional(),replyTo:e().optional(),subject:e(),text:e(),html:e().optional()}),hc=t({messageId:e(),accepted:l(X).default([]),rejected:l(X).default([])}),xa=t({ready:g(),host:e(),error:e().optional(),lastVerifiedAt:a().optional()}),vc={name:"smtp-provider",scope:"system",mode:"collection",internal:!0,providerKind:"email",methods:{sendEmail:c(gc,hc,{kind:"mutation",auth:"admin",access:"create"}),verify:c(h(),xa,{kind:"mutation",auth:"admin",access:"view"}),getStatus:c(h(),xa,{auth:"admin"})}},yc=S(["external","embedded"]),Sc=S(["connected","disconnected","auth-failed","unreachable","tls-error"]),fc=t({id:e(),name:e(),url:e(),kind:yc,status:Sc,latencyMs:a().nullable(),error:e().optional(),connectedClients:a().int().nonnegative().optional(),lastCheckedAt:a().optional()}),bc=t({url:e(),username:e().optional(),password:e().optional(),clientIdPrefix:e().optional()}),Ic=t({name:e().min(1),url:e().regex(/^(mqtt|mqtts|ws|wss):\/\//,"URL must start with mqtt(s):// or ws(s)://"),username:e().optional(),password:e().optional(),clientIdPrefix:e().optional()}),kc=t({id:e()}),be=t({id:e()}),wc=he("ok",[t({ok:w(!0),latencyMs:a()}),t({ok:w(!1),error:e()})]),Ac=t({port:a().int().min(1).max(65535).default(1883),allowAnonymous:g().default(!1),username:e().optional(),password:e().optional()}),Cc=t({id:e(),url:e()}),Ta=t({brokerCount:a(),embeddedRunning:g()}),Nc={name:"mqtt-broker",scope:"system",mode:"collection",providerKind:"broker",status:{schema:Ta,kind:"poll"},methods:{listBrokers:c(h(),l(fc)),getBrokerConfig:c(be,bc),addBroker:c(Ic,kc,{kind:"mutation"}),removeBroker:c(be,h(),{kind:"mutation"}),testConnection:c(be,wc,{kind:"mutation"}),startEmbeddedBroker:c(Ac,Cc,{kind:"mutation"}),stopEmbeddedBroker:c(be,h(),{kind:"mutation"}),getStatus:c(h(),Ta)}},Pc=S(["unlinked","linked","error"]),Dc=t({label:e(),value:e(),secret:g().optional()}),Mc=t({qr:e().optional(),fields:l(Dc).readonly().optional(),note:e().optional()}),Ra=t({linkState:Pc,exposedDeviceCount:a(),error:e().optional(),setup:Mc.optional()}),Ec=e(),xc=t({deviceId:e(),exposedAs:e().optional(),capabilities:l(e()).optional()}),Tc=t({deviceId:e(),capabilities:l(e()).optional()}),Rc=t({deviceId:e()}),Bc={name:"device-export",scope:"system",mode:"collection",providerKind:"device-export",status:{schema:Ra,kind:"poll"},exposesDeviceSettings:!0,methods:{getStatus:c(h(),Ra),listSupportedDeviceKinds:c(h(),l(Ec)),listExposedDevices:c(h(),l(xc)),exposeDevice:c(Tc,h(),{kind:"mutation"}),unexposeDevice:c(Rc,h(),{kind:"mutation"})}},qc=t({id:e(),label:e(),icon:e(),path:e(),remoteName:e(),bundle:e()}),Oc=t({addonId:e(),page:qc,bundleUrl:e()}),zc={name:"addon-pages",scope:"system",mode:"singleton",methods:{listPages:c(h(),l(Oc).readonly())}},Lc=t({id:e(),label:e(),icon:e(),path:e(),remoteName:e(),bundle:e()}),_c={name:"addon-pages-source",scope:"system",mode:"collection",internal:!0,methods:{listPages:c(h(),l(Lc).readonly())}},Uc=S(["device-tab","dashboard","integration-detail"]),Ba=S(["xs","sm","md","lg","xl"]),Fc=t({remoteName:e(),exposedModule:e(),componentKey:e().optional()}),$n=t({tab:e(),subTab:e().optional(),label:e(),order:a().optional(),kind:w("remote"),remote:Fc,stableId:e(),description:e().optional(),icon:e().optional(),bundle:e(),hosts:l(Uc).readonly(),requires:t({deviceContext:g().default(!1),integrationContext:g().default(!1)}),defaultSize:Ba.default("md"),allowedSizes:l(Ba).readonly().default(["sm","md","lg"]),defaultColumns:a().int().min(1).max(12).default(6),defaultRows:a().int().min(1).max(12).default(1)}),Hc={name:"addon-widgets-source",scope:"system",mode:"collection",internal:!0,methods:{listWidgets:c(h(),l($n).readonly())}},$c=$n.extend({addonId:e(),bundleUrl:e()}),Wc={name:"addon-widgets",scope:"system",mode:"singleton",methods:{listWidgets:c(h(),l($c).readonly())}},Gc=t({method:S(["GET","POST","PUT","DELETE","PATCH"]),path:e(),access:S(["public","authenticated","admin"]).optional(),description:e().optional()}),Vc=t({method:e(),path:e(),params:b(e(),e()),query:b(e(),e()),body:f(),headers:b(e(),e()),user:t({id:e(),username:e(),isAdmin:g()}).optional(),scopedToken:f().optional()}),Kc=t({status:a().int(),headers:b(e(),e()),redirectUrl:e().nullable(),body:f().optional(),contentType:e().optional()}),jc={name:"addon-routes",scope:"system",mode:"collection",internal:!0,methods:{getRoutes:c(h(),l(Gc)),invoke:c(Vc,Kc,{kind:"mutation"})}},Zm=[{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)"}],Ym={hwaccel:"auto",probedBestHwaccel:""},Zc=t({sessionId:e(),slotCount:a().int(),slotByteLength:a().int(),segmentBytes:a().int(),budgetMb:a().int(),framesWritten:a().int(),getFrameHits:a().int(),getFrameMisses:a().int()}),Yc={name:"decoder",scope:"system",mode:"singleton",methods:{supportsCodec:c(t({codec:e()}),g()),getInfo:c(h(),t({id:e(),name:e(),isPullMode:g().optional(),priority:a().optional()})),createSession:c(ra,t({sessionId:e(),nodeId:e()})),destroySession:c(t({sessionId:e()}),h()),pushPacket:c(t({sessionId:e(),packet:ns}),h()),openStream:c(t({sessionId:e(),url:e()}),h()),pullFrames:c(t({sessionId:e(),maxCount:a().default(1)}),l(ma)),pullHandles:c(t({sessionId:e(),maxCount:a().default(1)}),l(lt)),getFrame:c(t({handle:lt}),ma.nullable()),getShmStats:c(t({sessionId:e()}),Zc.nullable()),updateConfig:c(t({sessionId:e(),config:ra.partial()}),h()),getStats:c(t({sessionId:e()}),_o),listActiveSessions:c(h(),l(t({sessionId:e(),codec:e(),outputFormat:e(),createdAtMs:a()})).readonly()),reprobeHwaccel:c(h(),t({backend:e()}),{kind:"mutation",auth:"admin"})}},Qc=t({streamId:e(),label:e().optional(),codec:e(),type:S(["video","audio"]),sourceUrl:e()}),Jc=t({streamId:e(),format:e(),value:e()}),Xc={name:"restreamer",scope:"system",mode:"collection",internal:!0,methods:{registerDevice:c(t({deviceId:a(),streams:l(Qc).readonly()}),h(),{kind:"mutation"}),unregisterDevice:c(t({deviceId:a()}),h(),{kind:"mutation"}),getExposedResources:c(t({deviceId:a()}),l(Jc).readonly())}},Wn=t({viewportWidth:a().int().positive().optional(),viewportHeight:a().int().positive().optional(),devicePixelRatio:a().positive().optional(),downlinkMbps:a().nonnegative().optional(),prefersTier:e().optional()}).partial(),er={name:"webrtc",scope:"system",mode:"collection",internal:!0,methods:{handleOffer:c(t({streamId:e(),sdpOffer:e()}),e(),{kind:"mutation"}),supportsStream:c(t({streamId:e()}),g()),registerStream:c(t({streamId:e(),codec:e()}),h(),{kind:"mutation"}),unregisterStream:c(t({streamId:e()}),h(),{kind:"mutation"}),createSession:c(t({streamId:e(),hints:Wn.optional()}),t({sessionId:e(),sdpOffer:e()}),{kind:"mutation"}),handleAnswer:c(t({sessionId:e(),sdpAnswer:e()}),h(),{kind:"mutation"}),closeSession:c(t({sessionId:e()}),h(),{kind:"mutation"}),hasAdaptiveBitrate:c(t({streamId:e()}),g())}},bt=he("kind",[t({kind:w("adaptive")}),t({kind:w("profile"),profile:K}),t({kind:w("cam-stream"),camStreamId:e().min(1)})]),tr=t({id:e(),label:e(),target:bt,codec:e().nullable(),resolution:t({width:a(),height:a()}).nullable(),status:S(["idle","connecting","streaming","error","stopped"]).nullable(),inputFps:a().nullable(),decodeFps:a().nullable(),bitrateKbps:a().nullable()}),ar={name:"webrtc-session",scope:"device",mode:"singleton",kind:"wrapper",defaultActive:!0,deviceTypes:[N.Camera],methods:{listStreams:c(t({deviceId:a().int().nonnegative()}),l(tr)),createSession:c(t({deviceId:a().int().nonnegative(),target:bt,hints:Wn.optional(),relayOnly:g().optional()}),t({sessionId:e(),sdpOffer:e()}),{kind:"mutation"}),handleOffer:c(t({deviceId:a().int().nonnegative(),target:bt.optional(),sdpOffer:e(),sessionId:e().optional(),relayOnly:g().optional()}),t({sessionId:e(),sdpAnswer:e()}),{kind:"mutation"}),handleAnswer:c(t({deviceId:a().int().nonnegative(),sessionId:e(),sdpAnswer:e()}),h(),{kind:"mutation"}),addIceCandidate:c(t({deviceId:a().int().nonnegative(),sessionId:e(),candidate:e(),sdpMid:e().nullable().optional(),sdpMLineIndex:a().int().nullable().optional()}),h(),{kind:"mutation"}),getIceCandidates:c(t({deviceId:a().int().nonnegative(),sessionId:e()}),t({candidates:l(t({candidate:e(),sdpMid:e().nullable(),sdpMLineIndex:a().int().nullable()})),done:g()}),{kind:"query"}),closeSession:c(t({deviceId:a().int().nonnegative(),sessionId:e()}),h(),{kind:"mutation"}),hasAdaptiveBitrate:c(t({deviceId:a().int().nonnegative(),profile:K}),g())}},Ne=t({engine:T,steps:l(ae).readonly(),audio:t({engine:T,modelId:e(),enabled:g(),settings:b(e(),f()).readonly().optional()}).nullable().optional()}),Ke=t({id:e(),name:e(),description:e().optional(),config:Ne,createdAt:e(),updatedAt:e()}),Gn=t({enabled:g(),modelId:e(),settings:b(e(),f()).readonly()}),qa=t({addonDefaults:b(e(),Gn).readonly()}),Vn=t({steps:l(ae).readonly(),audio:t({modelId:e(),enabled:g()}).nullable()}),It=t({enabled:g().optional(),modelId:e().optional(),settings:b(e(),f()).readonly().optional()}),nr=t({pinnedAgentNodeId:e().optional(),stepToggles:b(e(),g()).optional(),stepOverridesByAgent:b(e(),b(e(),It)).optional(),pipelineByAgent:b(e(),Vn).optional()}),Oa=t({deviceId:a(),agentNodeId:e(),pinned:g(),reason:S(["manual","capacity","hardware-affinity","failover","rebalance"]),assignedAt:a()}),za=t({deviceId:a(),decoderNodeId:e(),pinned:g(),reason:S(["manual","co-located","capacity","hardware-affinity"])}),or=t({nodeId:e(),online:g(),load:Sn,score:a()}),sr=t({totalAgents:a(),onlineAgents:a(),totalCameras:a(),attachedCameras:a(),activeCameras:a(),avgInferenceTimeMs:a(),queueDepth:a()}),ir=b(e(),e()),cr={name:"pipeline-orchestrator",scope:"system",mode:"singleton",exposesDeviceSettings:!0,methods:{assignPipeline:c(t({deviceId:a(),agentNodeId:e()}),t({success:w(!0)}),{kind:"mutation",auth:"admin"}),unassignPipeline:c(t({deviceId:a()}),t({success:w(!0)}),{kind:"mutation",auth:"admin"}),rebalance:c(h(),t({migrated:a()}),{kind:"mutation",auth:"admin"}),getPipelineAssignments:c(h(),l(Oa).readonly()),getPipelineAssignment:c(t({deviceId:a()}),Oa.nullable()),getAgentLoad:c(h(),l(or).readonly()),getGlobalMetrics:c(h(),sr),getCameraMetrics:c(t({deviceId:a()}),Ot.nullable()),getCapabilityBindings:c(t({nodeId:e()}),ir),setCapabilityBinding:c(t({nodeId:e(),capName:e(),addonId:e()}),t({success:w(!0)}),{kind:"mutation",auth:"admin"}),assignDecoder:c(t({deviceId:a(),nodeId:e()}),h(),{kind:"mutation",auth:"admin"}),unassignDecoder:c(t({deviceId:a()}),h(),{kind:"mutation",auth:"admin"}),getDecoderAssignments:c(h(),l(za).readonly()),assignAudio:c(t({deviceId:a(),nodeId:e()}),t({success:w(!0)}),{kind:"mutation",auth:"admin"}),unassignAudio:c(t({deviceId:a()}),t({success:w(!0)}),{kind:"mutation",auth:"admin"}),getAudioAssignment:c(t({deviceId:a()}),t({nodeId:e(),pinned:g(),assignedAt:a()}).nullable()),getAudioNodeLoad:c(h(),l(t({nodeId:e(),deviceCount:a()}))),getAudioAssignments:c(h(),l(t({deviceId:a(),nodeId:e(),pinned:g(),assignedAt:a()}))),getDecoderAssignment:c(t({deviceId:a(),pipelineNodeId:e().optional()}),za),getAgentSettings:c(t({agentNodeId:e()}),qa.nullable()),listAgentSettings:c(h(),l(t({nodeId:e(),settings:qa})).readonly()),setAgentAddonDefaults:c(t({agentNodeId:e(),defaults:b(e(),Gn)}),t({success:w(!0)}),{kind:"mutation",auth:"admin"}),removeAgentSettings:c(t({agentNodeId:e()}),t({success:g(),removed:g()}),{kind:"mutation",auth:"admin"}),getCameraSettings:c(t({deviceId:a()}),nr.nullable()),setCameraStepToggle:c(t({deviceId:a(),addonId:e(),enabled:g().nullable()}),t({success:w(!0)}),{kind:"mutation",auth:"admin"}),getCameraStepOverrides:c(t({deviceId:a()}),b(e(),b(e(),It)).nullable()),setCameraStepOverride:c(t({deviceId:a(),agentNodeId:e(),addonId:e(),patch:It.nullable()}),t({success:w(!0)}),{kind:"mutation",auth:"admin"}),setCameraPipelineForAgent:c(t({deviceId:a(),agentNodeId:e(),pipeline:Vn.nullable()}),t({success:w(!0)}),{kind:"mutation",auth:"admin"}),resolvePipeline:c(t({deviceId:a(),agentNodeId:e().optional()}),Ne),listTemplates:c(h(),l(Ke).readonly()),saveTemplate:c(t({name:e(),description:e().optional(),config:Ne}),Ke,{kind:"mutation",auth:"admin"}),updateTemplate:c(t({id:e(),name:e().optional(),description:e().optional(),config:Ne.optional()}),Ke,{kind:"mutation",auth:"admin"}),deleteTemplate:c(t({id:e()}),t({success:w(!0)}),{kind:"mutation",auth:"admin"})}},rr=t({level:Ps,classification:t({labels:l(ut).readonly(),inferenceMs:a()}).optional(),timestamp:a()}),dr=t({minConfidence:a().min(0).max(1).default(.3),allowedClasses:l(e()).default([])}),lr=t({labels:l(ut).readonly(),rawLabels:l(ut).readonly().optional(),inferenceMs:a()}),Qm=[{value:"auto",label:"Auto (platform default)"},{value:"apple-soundanalysis",label:"Apple SoundAnalysis (macOS 12+)"},{value:"yamnet-onnx",label:"YAMNet ONNX (cross-platform)"}],Jm={audioBackend:"auto",probedBestAudioBackend:"",selectedAudioModel:""},pr={name:"audio-analyzer",scope:"system",mode:"singleton",methods:{analyseChunk:c(t({chunk:ha,settings:dr}),rr.nullable(),{kind:"mutation"}),classify:c(ha,lr,{timeoutMs:3e4}),isReady:c(h(),g()),dispose:c(h(),h(),{kind:"mutation"}),reprobeAudioEngine:c(h(),t({backend:e()}),{kind:"mutation",auth:"admin"})}},mr={name:"audio-analysis",scope:"device",mode:"singleton",kind:"wrapper",defaultActive:!0,deviceTypes:[N.Camera],exposesDeviceSettings:!0,methods:{resolveDeviceSettings:c(t({deviceId:a()}),_())},events:{onAudioLevel:Y(t({deviceId:a(),rms:a(),dbfs:a()}))}},qe=S(["f32le","s16le"]),ur=t({codec:e(),canDecode:g(),canEncode:g(),label:e().optional()}),gr=t({codec:e(),sourceSampleRate:a().int().positive(),sourceChannels:a().int().positive(),extraData:M(Uint8Array).optional(),targetSampleRate:a().int().positive(),targetChannels:a().int().positive(),targetFormat:qe.optional(),idleMs:a().int().positive().optional(),tag:e().optional()}),hr=t({codec:e(),sourceSampleRate:a().int().positive(),sourceChannels:a().int().positive(),sourceFormat:qe.optional(),targetSampleRate:a().int().positive(),targetChannels:a().int().positive(),bitrateKbps:a().int().positive().optional(),idleMs:a().int().positive().optional(),tag:e().optional()}),vr=t({data:M(Uint8Array),sampleRate:a().int().positive(),channels:a().int().positive(),format:qe,pts:a()}),La=t({data:M(Uint8Array),codec:e(),pts:a(),frameComplete:g()}),yr=t({sessionId:e(),kind:S(["decode","encode"]),codec:e(),sourceSampleRate:a(),sourceChannels:a(),targetSampleRate:a(),targetChannels:a(),format:qe,tag:e().optional(),createdAtMs:a(),lastActivityMs:a(),framesIn:a(),framesOut:a()}),Sr={name:"audio-codec",scope:"system",mode:"singleton",methods:{listSupportedCodecs:c(h(),l(ur).readonly()),canHandle:c(t({codec:e(),kind:S(["decode","encode"])}),g()),createDecodeSession:c(gr,t({sessionId:e(),nodeId:e()}),{kind:"mutation"}),createEncodeSession:c(hr,t({sessionId:e(),nodeId:e()}),{kind:"mutation"}),closeSession:c(t({sessionId:e(),nodeId:e().optional()}),h(),{kind:"mutation"}),pushEncodedFrame:c(t({sessionId:e(),nodeId:e().optional(),data:M(Uint8Array),pts:a().optional()}),h(),{kind:"mutation"}),pullPcm:c(t({sessionId:e(),nodeId:e().optional(),maxCount:a().int().positive().default(8)}),l(vr)),pushPcm:c(t({sessionId:e(),nodeId:e().optional(),data:M(Uint8Array),pts:a().optional()}),h(),{kind:"mutation"}),pullEncoded:c(t({sessionId:e(),nodeId:e().optional(),maxCount:a().int().positive().default(8)}),l(La)),flushEncode:c(t({sessionId:e(),nodeId:e().optional()}),l(La),{kind:"mutation"}),listActiveSessions:c(h(),l(yr).readonly())}},_a=t({embedding:l(a()),inferenceMs:a()}),fr=t({modelId:e(),embeddingDim:a(),ready:g()}),br={name:"embedding-encoder",scope:"system",mode:"collection",internal:!0,methods:{encode:c(t({crop:M(Uint8Array),width:a(),height:a()}),_a),encodeText:c(t({text:e()}),_a),getInfo:c(h(),fr)}},je=t({id:a(),stableId:e(),addonId:e(),type:S(N),name:e(),location:e().nullable(),disabled:g(),parentDeviceId:a().nullable(),role:e().nullable().optional(),online:g(),features:l(e()),isCamera:g(),config:b(e(),f()),metadata:b(e(),f()).nullable().optional()}),Ir=t({key:e(),value:f(),description:e().optional()}),kr=t({id:a(),stableId:e(),type:e(),name:e(),location:e().nullable(),disabled:g(),parentDeviceId:a().nullable(),role:e().nullable().optional()}),wr=t({id:a(),stableId:e(),addonId:e(),type:e(),name:e(),location:e().nullable(),disabled:g(),parentDeviceId:a().nullable(),metadata:b(e(),f()).nullable().optional()}),Ar=f().nullable(),Cr=t({streamId:e(),width:a().optional(),height:a().optional(),codec:e().optional(),fps:a().optional(),bitrateKbps:a().optional()}),Nr=t({addonId:e(),stableId:e(),id:a(),type:e(),name:e(),location:e().nullable().optional(),disabled:g().optional(),parentDeviceId:a().nullable(),role:e().nullable().optional(),features:l(e()).optional(),config:b(e(),f())}),Pr=t({deviceId:a()}),Dr=t({deviceId:a(),data:b(e(),f())}),Mr={name:"device-manager",scope:"system",mode:"singleton",methods:{allocateDeviceId:c(t({addonId:e(),stableId:e()}),t({id:a()}),{kind:"mutation"}),registerDevice:c(Nr,h(),{kind:"mutation"}),removeDevice:c(Pr,h(),{kind:"mutation"}),persistConfig:c(Dr,h(),{kind:"mutation"}),loadConfig:c(t({deviceId:a()}),b(e(),f())),loadRuntimeState:c(t({deviceId:a()}),b(e(),f())),loadMeta:c(t({deviceId:a()}),wr.nullable()),setName:c(t({deviceId:a(),name:e()}),h(),{kind:"mutation",auth:"admin"}),setLocation:c(t({deviceId:a(),location:e().nullable()}),h(),{kind:"mutation",auth:"admin"}),setMetadata:c(t({deviceId:a(),patch:b(e(),f())}),h(),{kind:"mutation",auth:"admin"}),listLocations:c(h(),l(e())),addLocation:c(t({name:e()}),h(),{kind:"mutation",auth:"admin"}),removeLocation:c(t({name:e(),cascade:g().optional()}),h(),{kind:"mutation",auth:"admin"}),setDisabled:c(t({deviceId:a(),disabled:g()}),h(),{kind:"mutation",auth:"admin"}),listPersistedByAddon:c(t({addonId:e()}),l(kr)),listAll:c(t({addonId:e().optional()}),l(je)),getDevice:c(t({deviceId:a()}),je.nullable()),getChildren:c(t({parentDeviceId:a()}),l(je)),getStreamSources:c(t({deviceId:a()}),l(as)),getConfigSchema:c(t({deviceId:a()}),l(Ir)),getSettingsSchema:c(t({deviceId:a()}),Ar),updateConfig:c(t({deviceId:a(),values:b(e(),f())}),t({success:w(!0)}),{kind:"mutation",auth:"admin"}),enable:c(t({deviceId:a()}),t({success:w(!0)}),{kind:"mutation",auth:"admin"}),disable:c(t({deviceId:a()}),t({success:w(!0)}),{kind:"mutation",auth:"admin"}),remove:c(t({deviceId:a()}),t({success:w(!0)}),{kind:"mutation",auth:"admin"}),getStreamProfileMap:c(t({deviceId:a()}),b(e(),e().nullable())),setStreamProfileMap:c(t({deviceId:a(),profileMap:b(e(),e().nullable())}),t({success:w(!0)}),{kind:"mutation",auth:"admin"}),probeStreams:c(t({deviceId:a()}),l(Cr),{kind:"mutation",auth:"admin"}),getBindings:c(t({deviceId:a()}),t({deviceId:a(),entries:l(t({capName:e(),kind:S(["native","wrapped"]),providerAddonId:e(),providerNodeId:e(),nativeAddonId:e()}))})),getAllBindings:c(t({}),l(t({deviceId:a(),entries:l(t({capName:e(),kind:S(["native","wrapped"]),providerAddonId:e(),providerNodeId:e(),nativeAddonId:e()}))}))),setWrapperActive:c(t({deviceId:a(),capName:e(),wrapperAddonId:e(),active:g()}),h(),{kind:"mutation",auth:"admin"}),listWrappersForCap:c(t({capName:e()}),l(e())),listBindableCapsForDeviceType:c(t({deviceType:e()}),l(t({capName:e(),wrappers:l(e())}))),getDeviceSettingsAggregate:c(t({deviceId:a()}),J.nullable()),getDeviceLiveInfoAggregate:c(t({deviceId:a()}),J.nullable()),getDeviceAggregate:c(t({deviceId:a()}),t({settings:J.nullable(),live:J.nullable()})),updateDeviceField:c(t({deviceId:a(),writerCapName:e(),writerAddonId:e(),key:e(),value:f()}),t({success:w(!0)}),{kind:"mutation",auth:"admin"}),updateDeviceFieldsBatch:c(t({deviceId:a(),changes:l(t({writerCapName:e(),writerAddonId:e(),key:e(),value:f()}))}),t({success:w(!0),failures:l(t({writerCapName:e(),writerAddonId:e(),error:e()}))}),{kind:"mutation",auth:"admin"}),discoverDevices:c(t({addonId:e()}),l(xe),{kind:"mutation",auth:"admin"}),adoptDevice:c(t({addonId:e(),candidate:xe}),Te,{kind:"mutation",auth:"admin"}),getCreationSchema:c(t({addonId:e(),type:S(N)}),f().nullable()),createDevice:c(t({addonId:e(),type:S(N),config:b(e(),f())}),Te,{kind:"mutation",auth:"admin"}),testCreationField:c(t({addonId:e(),type:S(N),key:e(),value:f(),formValues:b(e(),f()).optional()}),ft,{kind:"mutation",auth:"admin"}),testField:c(t({deviceId:a(),key:e(),value:f()}),ft,{kind:"mutation",auth:"admin"}),getDeviceStatusAggregate:c(t({deviceId:a(),caps:l(e()).readonly().optional()}),b(e(),f().nullable()))}},Er={name:"device-state",scope:"system",mode:"singleton",methods:{getSnapshot:c(t({deviceId:a()}),b(e(),b(e(),f()))),getCapSlice:c(t({deviceId:a(),capName:e()}),b(e(),f()).nullable()),getAllSnapshots:c(t({}),b(e(),b(e(),b(e(),f())))),setCapSlice:c(t({deviceId:a(),capName:e(),slice:b(e(),f())}),h(),{kind:"mutation"})},events:{onChanged:Y(t({deviceId:a(),capName:e(),slice:b(e(),f())}))}},Ze=t({userId:e(),username:e(),email:e().optional(),displayName:e().optional(),isAdmin:g().default(!1)}),xr={name:"auth-provider",scope:"system",mode:"collection",internal:!0,methods:{validateCredentials:c(t({username:e(),password:e()}),Ze.nullable(),{kind:"mutation"}),getLoginUrl:c(t({state:e()}),e()),handleCallback:c(b(e(),e()),Ze,{kind:"mutation"}),validateToken:c(t({token:e()}),Ze.nullable())}},Re=t({url:e(),hostname:e(),port:a(),protocol:S(["http","https"])}),Tr=t({connected:g(),endpoint:Re.nullable(),error:e().optional()}),Rr=Re.extend({id:e(),label:e(),mode:e().optional(),sourcePort:a().optional()}),Br={name:"network-access",scope:"system",mode:"collection",providerKind:"ingress",methods:{start:c(h(),Re,{kind:"mutation"}),stop:c(h(),h(),{kind:"mutation"}),getEndpoint:c(h(),Re.nullable()),getStatus:c(h(),Tr),listEndpoints:c(h(),l(Rr).readonly())}},qr=t({urls:R([e(),l(e())]),username:e().optional(),credential:e().optional()}),Or={name:"turn-provider",scope:"system",mode:"collection",methods:{getTurnServers:c(h(),l(qr).readonly())}},Kn=t({base64:e(),contentType:e()}),zr=t({lastCapturedAt:a().nullable(),cacheAgeMs:a().nullable(),lastBytes:a().nullable(),lastStreamId:e().nullable()}),Lr={name:"snapshot",scope:"device",mode:"singleton",kind:"wrapper",defaultActive:!0,deviceTypes:[N.Camera],exposesDeviceSettings:!0,methods:{getSnapshot:c(t({deviceId:a(),streamId:e().optional(),force:g().optional()}),Kn.nullable()),invalidateCache:c(t({deviceId:a()}),h(),{kind:"mutation",auth:"admin"})},status:{schema:zr,kind:"poll"}},_r={name:"snapshot-provider",scope:"system",mode:"collection",methods:{supportsDevice:c(t({deviceId:a()}),g()),getSnapshot:c(t({deviceId:a(),streamId:e().optional()}),Kn.nullable())}},Ur=t({title:e(),body:e(),imageUrl:e().optional(),deviceId:a().optional(),eventId:e().optional(),priority:S(["low","normal","high","critical"]).default("normal"),metadata:b(e(),f()).optional()}),Fr={name:"notification-output",scope:"system",mode:"collection",methods:{send:c(Ur,h(),{kind:"mutation"}),sendTest:c(h(),t({success:g(),error:e().optional()}),{kind:"mutation"})}},Hr=t({deviceIds:l(a()).readonly().optional(),classNames:l(e()).readonly().optional(),zoneIds:l(e()).readonly().optional(),minConfidence:a().optional(),source:S(["pipeline","onboard","any"]).optional(),schedule:t({days:l(a()).readonly(),startHour:a(),endHour:a()}).optional(),cooldownSeconds:a().optional(),minDwellSeconds:a().optional()}),$r=t({title:e(),body:e(),imageMode:S(["crop","annotated","full","none"])}),Ua=t({id:e(),name:e(),enabled:g(),eventTypes:l(e()).readonly(),conditions:Hr,outputs:l(e()).readonly(),template:$r.optional(),priority:S(["low","normal","high","critical"])}),Wr=t({ruleId:e(),eventId:e(),timestamp:a(),wouldFire:g(),reason:e().optional()}),Gr=t({id:e(),ruleId:e(),ruleName:e(),eventId:e(),timestamp:a(),outputs:l(e()).readonly(),success:g(),error:e().optional(),deviceId:a().optional()}),Vr=t({ruleId:e().optional(),deviceId:a().optional(),from:a().optional(),to:a().optional(),limit:a().optional()}),Kr={name:"advanced-notifier",scope:"system",mode:"singleton",internal:!0,methods:{getRules:c(h(),t({rules:l(Ua).readonly()})),upsertRule:c(t({rule:Ua}),t({success:w(!0)}),{kind:"mutation"}),deleteRule:c(t({ruleId:e()}),t({success:w(!0)}),{kind:"mutation"}),testRule:c(t({ruleId:e(),lookbackMinutes:a()}),t({results:l(Wr).readonly()}),{kind:"mutation"}),getHistory:c(t({filter:Vr.optional()}),t({entries:l(Gr).readonly()}))}},jn=S(["continuous","motion","scheduled","composite"]),jr=t({streamId:e(),mode:S(["always","inherit"])}),Zr=t({days:l(a()).readonly(),startTime:e(),endTime:e(),mode:S(["continuous","motion"])}),ge=t({deviceId:a(),mode:jn,streams:l(jr).readonly(),enabled:g(),preBufferSec:a(),postBufferSec:a(),scheduleRules:l(Zr).readonly().optional()}),Zn=S(["recording:main","recording:mid","recording:sub","thumbnail:scrub","thumbnail:event"]),kt=t({deviceId:a(),dataCategory:Zn,storageName:e(),subDirectory:e(),retentionDays:a().nullable(),retentionGb:a().nullable()}),Yr=t({id:e(),deviceId:a(),streamId:e(),startTime:a(),endTime:a(),duration:a(),path:e(),storageName:e(),subDirectory:e(),sizeBytes:a(),codec:S(["h264","h265"]),hasAudio:g()}),Qr=t({deviceId:a(),timestamp:a(),path:e(),storageName:e(),subDirectory:e(),sizeBytes:a(),category:S(["scrub","event"])}),Jr=t({startTime:a(),endTime:a(),streams:l(e()).readonly()}),Xr=t({totalBytes:a(),segmentCount:a()}),ed=t({bitrateKbps:a(),retentionDays:a().nullable(),retentionGb:a().nullable(),estimatedGb:a(),estimatedDaysAtCapacity:a().nullable()}),Fa=t({perStream:b(e(),ed),thumbnails:t({estimatedGb:a()}),totalEstimatedGb:a(),motionEstimate:t({avgEventsPerDay:a(),avgDurationSec:a(),dutyCyclePercent:a()}).optional()}),td=t({totalEvents:a(),avgDurationSec:a(),avgEventsPerDay:a(),dutyCyclePercent:a()}),Ie=t({deviceId:a()}),ad=t({deviceId:a(),policy:ge.omit({deviceId:!0}),storageOverrides:l(kt.omit({deviceId:!0})).readonly().optional(),ffmpegOverrides:b(e(),f()).optional()}),Ha=t({deviceId:a(),startTime:a(),endTime:a()}),nd=t({deviceId:a(),streamId:e(),startTime:a(),endTime:a()}),od=t({deviceId:a(),streamId:e(),startTime:a(),endTime:a(),live:g().optional()}),sd=t({deviceId:a(),timestamp:a(),category:e().optional()}),id=t({deviceId:a(),streamId:e()}),cd=t({deviceId:a(),motionInput:t({avgEventsPerDay:a(),avgDurationSec:a()}).optional()}),rd=t({deviceId:a(),dataCategory:Zn}),dd=t({deviceId:a(),policy:ge.omit({deviceId:!0})}),ld=t({deviceId:a(),policy:ge.omit({deviceId:!0}),ffmpegOverrides:b(e(),f()).optional()}),pd={name:"recording-engine",scope:"system",mode:"singleton",methods:{getStatus:c(h(),t({activeRecordings:a(),totalSegments:a(),totalSizeMB:a()})),enable:c(ad,h(),{kind:"mutation",auth:"admin"}),disable:c(Ie,h(),{kind:"mutation",auth:"admin"}),getConfig:c(Ie,ge.nullable()),updateConfig:c(ld,h(),{kind:"mutation",auth:"admin"}),getPlaylist:c(od,e()),getThumbnail:c(sd,Qr.nullable()),getSegments:c(nd,l(Yr).readonly()),getAvailability:c(Ha,l(Jr).readonly()),estimateStorage:c(cd,Fa),estimateGlobalStorage:c(h(),Fa),getStorageUsage:c(id,Xr),setPolicy:c(dd,h(),{kind:"mutation",auth:"admin"}),getPolicy:c(Ie,ge.nullable()),getPolicyStatus:c(Ie,t({deviceId:a(),enabled:g(),mode:jn,activeStreams:a()}).nullable()),getRetentionConfig:c(rd,kt.nullable()),updateRetentionConfig:c(kt,h(),{kind:"mutation",auth:"admin"}),getMotionStats:c(Ha,td)}},md={name:"detection-pipeline",scope:"device",mode:"singleton",kind:"wrapper",defaultActive:!0,deviceTypes:[N.Camera],exposesDeviceSettings:!0,methods:{}},ud={name:"camera-pipeline-config",scope:"device",mode:"singleton",kind:"wrapper",defaultActive:!0,deviceTypes:[N.Camera],exposesDeviceSettings:!0,methods:{}},Lt=S(["new","entered","left","moving","idle"]),gd=S(["motion","object","audio"]),Yn=t({x:a(),y:a(),timestamp:a(),bbox:ne}),hd=t({timestamp:a(),position:Yn,mediaKey:e()}),Ye=t({trackId:e(),deviceId:a(),className:e(),label:e().optional(),firstSeen:a(),lastSeen:a(),positions:l(Yn).readonly(),snapshots:l(hd).readonly(),zonesVisited:l(e()).readonly(),totalDistance:a(),state:Lt,active:g()}),_t={id:e(),deviceId:a(),timestamp:a()},vd=t({..._t,kind:w("motion"),regionCount:a(),regions:l(t({bbox:ne,pixelCount:a(),intensity:a()})).readonly(),frameWidth:a(),frameHeight:a()}),yd=t({..._t,kind:w("object"),trackId:e(),className:e(),label:e().optional(),confidence:a(),bbox:ne,zones:l(e()).readonly(),state:Lt,mediaKey:e().optional()}),Sd=t({..._t,kind:w("audio"),rms:a(),dbfs:a(),classification:t({className:e(),originalClass:e().optional(),score:a()}).optional()}),$a=t({key:e(),kind:S(["crop","thumbnail","snapshot"]),base64:e(),sizeBytes:a(),timestamp:a()}),fd=1e3,bd=5e3,wt=t({deviceId:a(),since:a().optional(),until:a().optional(),limit:a().int().min(1).max(bd).default(fd)}),Id=wt.extend({classFilter:e().optional()}),kd=t({trackId:e(),className:e(),confidence:a(),bbox:ne,zones:l(e()).readonly(),state:Lt}),wd={name:"pipeline-analytics",scope:"device",mode:"singleton",kind:"wrapper",defaultActive:!0,deviceTypes:[N.Camera],exposesDeviceSettings:!0,methods:{getActiveTracks:c(t({deviceId:a()}),l(Ye).readonly()),getTrack:c(t({deviceId:a(),trackId:e()}),Ye.nullable()),listTracks:c(t({deviceId:a(),since:a().optional(),until:a().optional(),limit:a().optional()}),l(Ye).readonly()),clearTracks:c(t({deviceId:a()}),h(),{kind:"mutation",auth:"admin"}),getMotionEvents:c(wt,l(vd).readonly()),getObjectEvents:c(Id,l(yd).readonly()),getAudioEvents:c(wt,l(Sd).readonly()),getEventMedia:c(t({eventId:e()}),l($a).readonly()),getTrackMedia:c(t({trackId:e()}),l($a).readonly())},events:{onFrameTracked:{data:t({deviceId:a(),timestamp:a(),frameWidth:a(),frameHeight:a(),detections:l(kd).readonly()})},onTrackStarted:{data:t({deviceId:a(),trackId:e(),className:e()})},onTrackEnded:{data:t({deviceId:a(),trackId:e(),className:e(),durationMs:a()})},onDetectionEvent:{data:t({deviceId:a(),kind:gd,eventId:e(),timestamp:a()})}}},Ad=t({total:a(),user:a(),system:a(),irq:a(),nice:a(),loadAvg:Et([a(),a(),a()]),cores:a()}),Cd=t({percent:a(),totalBytes:a(),usedBytes:a(),availableBytes:a(),swapUsedBytes:a(),swapTotalBytes:a()}),Nd=t({readBytes:a(),writeBytes:a(),readOps:a(),writeOps:a(),timestampMs:a()}),Pd=t({rxBytes:a(),txBytes:a(),rxPackets:a(),txPackets:a(),rxErrors:a(),txErrors:a(),timestampMs:a()}),Qn=t({utilization:a(),model:e(),memoryUsedBytes:a(),memoryTotalBytes:a(),temperature:a().nullable()}),Dd=t({openFds:a(),threadCount:a(),activeHandles:a(),activeRequests:a()}),Wa=t({avg10:a(),avg60:a(),avg300:a()}),Qe=t({some:Wa,full:Wa.nullable()}),Ga=t({cpu:Ad,memory:Cd,gpu:Qn.nullable(),network:Pd,disk:Nd,pressure:t({cpu:Qe.nullable(),memory:Qe.nullable(),io:Qe.nullable()}),process:Dd,cpuTemperature:a().nullable(),timestampMs:a()}),Md=t({path:e(),totalBytes:a(),usedBytes:a(),availableBytes:a(),percent:a()}),Va=t({pid:a(),cpu:a(),memory:a()}),Ed=t({addonId:e(),nodeId:e(),role:S(["hub","worker"]),pid:a(),state:S(["starting","running","stopping","stopped","crashed"]),uptimeSec:a()}),xd=t({pid:a(),ppid:a(),pgid:a(),classification:S(["root","managed","system","ghost"]),addonId:e().nullable(),nodeId:e().nullable(),command:e(),cpuPercent:a(),memoryRssBytes:a(),uptimeSec:a(),orphaned:g()}),Td=t({pid:a(),force:g().optional()}),Rd=t({success:g(),reason:e().optional(),signal:S(["SIGTERM","SIGKILL"]).optional()}),Bd=t({cpuPercent:a(),memoryPercent:a(),memoryUsedMB:a(),memoryTotalMB:a(),diskPercent:a().optional(),temperature:a().optional(),gpuPercent:a().optional(),gpuMemoryPercent:a().optional()}),qd={name:"metrics-provider",scope:"system",mode:"singleton",methods:{collectSnapshot:c(h(),Ga),getCached:c(h(),Ga.nullable()),getCurrent:c(h(),Bd),getDiskSpace:c(t({dirPath:e()}),Md),getGpuInfo:c(h(),Qn.nullable()),getCpuTemperature:c(h(),a().nullable()),getProcessStats:c(t({pids:l(a())}),l(Va)),listAddonInstances:c(h(),l(Ed).readonly()),getAddonStats:c(t({addonId:e()}),Va.nullable()),listNodeProcesses:c(h(),l(xd).readonly()),killProcess:c(Td,Rd,{kind:"mutation",auth:"admin"})}},Od=t({id:e(),name:e()}),Jn=t({pan:a(),tilt:a(),zoom:a()}),Ka=t({pan:a().optional(),tilt:a().optional(),zoom:a().optional(),speed:a().optional()}),zd=Jn.extend({autofocus:g()}),Ld=t({hasPan:g(),hasTilt:g(),hasZoom:g(),supportsPresets:g(),maxPresets:a().optional(),hasAutofocus:g()}),_d={name:"ptz",scope:"device",mode:"singleton",deviceTypes:[N.Camera],deviceConfig:{ui:{kind:"widget",widgetId:"host/ptz-panel",tab:"ptz",topTab:!0,label:"PTZ",order:0}},methods:{move:c(Ka.extend({deviceId:a()}),h(),{kind:"mutation"}),continuousMove:c(Ka.extend({deviceId:a()}),h(),{kind:"mutation"}),stop:c(t({deviceId:a()}),h(),{kind:"mutation"}),getPresets:c(t({deviceId:a()}),l(Od)),goToPreset:c(t({deviceId:a(),presetId:e()}),h(),{kind:"mutation"}),savePreset:c(t({deviceId:a(),presetId:e(),name:e()}),h(),{kind:"mutation",auth:"admin"}),deletePreset:c(t({deviceId:a(),presetId:e()}),h(),{kind:"mutation",auth:"admin"}),getOptions:c(t({deviceId:a()}),Ld),goHome:c(t({deviceId:a()}),h(),{kind:"mutation"}),getPosition:c(t({deviceId:a()}),Jn),setAutofocus:c(t({deviceId:a(),enabled:g()}),h(),{kind:"mutation"})},status:{schema:zd,kind:"command-driven"}},Ud=t({id:e(),type:e(),timestamp:a(),label:e().optional(),thumbnailUrl:e().optional(),clipUrl:e().optional(),metadata:b(e(),f()).optional()}),Fd={name:"events",scope:"device",mode:"singleton",deviceTypes:[N.Camera],methods:{getEvents:c(t({deviceId:a(),from:a().optional(),to:a().optional(),limit:a().optional()}),l(Ud)),getEventThumbnail:c(t({deviceId:a(),eventId:e()}),t({base64:e(),contentType:e()}).nullable()),getEventClipUrl:c(t({deviceId:a(),eventId:e()}),e().nullable())}},Hd=t({id:e(),startTs:a(),endTs:a(),durationSec:a(),sizeBytes:a().optional()}),$d={name:"recording",scope:"device",mode:"singleton",deviceTypes:[N.Camera],methods:{getSegments:c(t({deviceId:a(),from:a().optional(),to:a().optional()}),l(Hd)),getPlaybackUrl:c(t({deviceId:a(),segmentId:e()}),e().nullable()),getThumbnailAt:c(t({deviceId:a(),timestamp:a()}),t({base64:e(),contentType:e()}).nullable())}},Wd=t({id:e(),label:e(),protocol:S(["rtsp","rtmp","annexb","http-mjpeg","webrtc","custom"]),url:e().optional(),resolution:t({width:a(),height:a()}).optional(),fps:a().optional(),bitrate:a().optional(),codec:e().optional(),profileHint:S(["high","mid","low"]).optional(),sdp:e().optional()}),Gd=t({key:e(),value:f()}),Vd={name:"device-ops",scope:"device",mode:"singleton",methods:{getStreamSources:c(t({deviceId:a()}),l(Wd)),getConfigEntries:c(t({deviceId:a()}),l(Gd)),setConfig:c(t({deviceId:a(),values:b(e(),f())}),h(),{kind:"mutation"}),removeDevice:c(t({deviceId:a()}),h(),{kind:"mutation"}),getSettingsSchema:c(t({deviceId:a()}),f().nullable())}},Kd=t({host:e(),port:a().int().positive().optional(),onvifPort:a().int().positive().optional(),rtspPort:a().int().positive().optional(),https:g().optional(),username:e().optional(),password:e().optional(),onvifProfile:e().optional()}),jd=t({host:e(),port:a().int().positive().nullable(),onvifPort:a().int().positive().nullable(),rtspPort:a().int().positive().nullable(),https:g().nullable(),hasUsername:g(),hasPassword:g(),onvifProfile:e().nullable()}),Zd={name:"camera-credentials",scope:"device",mode:"singleton",deviceTypes:[N.Camera],methods:{getCredentials:c(t({deviceId:a()}),Kd.nullable(),{kind:"query",auth:"admin"})},status:{schema:jd,kind:"command-driven"}},Yd={name:"reboot",scope:"device",mode:"singleton",deviceTypes:[N.Camera,N.Sensor,N.Switch],methods:{reboot:c(t({deviceId:a().int().nonnegative()}),t({success:w(!0)}),{kind:"mutation",auth:"admin"})}},Qd=S(["text","timestamp","watermark"]),At=S(["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right","custom"]),Jd=t({id:e(),kind:Qd,enabled:g(),text:e().optional(),position:At.optional(),availablePositions:l(At).readonly(),readOnly:g().optional()}),ja=t({overlays:l(Jd).readonly()}),Xd=t({enabled:g().optional(),text:e().optional(),position:At.optional()}).partial(),el={name:"osd",scope:"device",mode:"singleton",deviceTypes:[N.Camera],methods:{setOverlay:c(t({deviceId:a(),overlayId:e(),patch:Xd}),h(),{kind:"mutation",auth:"admin"})},events:{onStatusChanged:{data:t({deviceId:a(),status:ja})}},status:{schema:ja,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:i=>`${String(i.id)} enabled`,kind:"boolean"},text:{label:i=>`${String(i.id)} text`,kind:"text",when:i=>i.kind!=="timestamp"&&!i.readOnly},position:{label:i=>`${String(i.id)} position`,kind:"select",options:i=>i.availablePositions??[],when:i=>Array.isArray(i.availablePositions)&&i.availablePositions.length>0}}}]}},tl=t({childDeviceIds:l(a()).readonly()}),al={name:"accessories",scope:"device",mode:"singleton",deviceTypes:[N.Camera,N.Hub],methods:{},events:{onAccessoriesChanged:{data:t({deviceId:a(),childDeviceIds:l(a()).readonly()})}},status:{schema:tl,kind:"command-driven"}},nl=t({codecs:l(e()),sampleRate:a(),duplex:S(["half","full"]),maxBacklogMs:a()}),Za=t({talking:g(),lastSessionAt:a().nullable(),ability:nl.nullable()}),ol={name:"intercom",scope:"device",mode:"singleton",deviceTypes:[N.Camera],methods:{startSession:c(t({deviceId:a()}),t({sessionId:e(),sdpOffer:e()}),{kind:"mutation",auth:"admin"}),handleAnswer:c(t({deviceId:a(),sessionId:e(),sdpAnswer:e()}),h(),{kind:"mutation",auth:"admin"}),stopSession:c(t({deviceId:a(),sessionId:e()}),h(),{kind:"mutation",auth:"admin"}),startTalkSession:c(t({deviceId:a()}),t({sessionId:e()}),{kind:"mutation",auth:"admin"}),pushTalkPcm:c(t({deviceId:a(),pcmBase64:e(),sequenceNumber:a().int()}),t({accepted:g()}),{kind:"mutation",auth:"admin"}),endTalkSession:c(t({deviceId:a()}),h(),{kind:"mutation",auth:"admin"})},events:{onStatusChanged:{data:t({deviceId:a(),status:Za})}},status:{schema:Za,kind:"command-driven"}},sl=t({camStreamId:e().min(1),kind:Bt,url:e().optional(),codec:e().optional(),resolution:Be.optional(),fps:a().positive().optional(),label:e().optional(),deviceFeatures:l(e()).optional(),autoEligible:g().optional(),metadata:b(e(),f()).optional()}),il={name:"stream-catalog",scope:"device",mode:"singleton",deviceTypes:[N.Camera],methods:{getCatalog:c(t({deviceId:a().int().nonnegative()}),l(sl).readonly())}},cl=S(qo),rl=S(["videotoolbox","cuda","nvdec","vaapi","qsv","d3d11va","dxva2","amf","vdpau","drm","coreml","tensorrt","openvino","directml","webgpu","none"]).nullable().optional(),dl=t({preferred:l(e()).readonly()}),Ct=S(["h264_videotoolbox","hevc_videotoolbox","h264_vaapi","hevc_vaapi","h264_nvenc","hevc_nvenc","h264_qsv","hevc_qsv","h264_amf","hevc_amf","libx264","libx265"]),ll=t({encoder:Ct,codec:S(["H264","H265"]),family:S(["videotoolbox","vaapi","nvenc","qsv","amf","software"]),available:g(),reason:e().optional()}),Ya=t({encoders:l(ll).readonly(),defaultH264:Ct,defaultH265:Ct,probedAt:a()}),pl=S(["darwin","linux","win32"]),ml=S(["arm64","x64"]),ul=t({type:S(["nvidia","amd","intel","apple"]),name:e(),memoryMB:a().optional()}),gl=t({type:S(["apple-ane","intel-npu"])}),Xn=t({platform:pl,arch:ml,cpuModel:e(),cpuCores:a(),totalRAM_MB:a(),availableRAM_MB:a(),gpu:ul.nullable(),npu:gl.nullable()}),Qa=t({runtime:S(["node","python"]),backend:e(),format:S(["onnx","coreml","openvino"]),score:a(),reason:e(),available:g()}),hl=t({hardware:Xn,scores:l(Qa).readonly(),bestScore:Qa,pythonPath:e().nullable()}),vl=t({modelId:e(),name:e(),minRAM_MB:a(),accuracyScore:a(),formats:l(e()).readonly()}),yl=t({modelId:e(),runtime:S(["node","python"]),backend:e(),format:cl,reason:e()}),Sl={name:"platform-probe",scope:"system",mode:"singleton",methods:{getCapabilities:c(h(),hl),getHardware:c(h(),Xn),resolveInferenceConfig:c(t({requirements:l(vl).readonly()}),yl),resolveHwAccel:c(t({prefer:rl,nodeId:e().optional()}),dl),getHardwareEncoders:c(h(),Ya),refreshHardwareEncoders:c(h(),Ya,{kind:"mutation",auth:"admin"})}},fl=S(["lan","wifi","docker","vpn","loopback","other"]),eo=t({name:e(),family:S(["IPv4","IPv6"]),address:e(),cidr:e(),netmask:e(),internal:g(),mac:e(),kind:fl,preferred:g(),plausible:g(),plausibleReason:e()}),bl=t({interfaces:l(eo).readonly(),probedAt:a()}),Il=eo.nullable(),kl=t({label:e(),baseUrl:e(),kind:S(["lan-ipv4","lan-ipv6","public","loopback"]),interfaceKind:S(["lan","wifi","docker","vpn","other","loopback","public"]),plausible:g(),plausibleReason:e(),priority:a()}),wl=t({endpoints:l(kl).readonly()}),Je=t({addresses:l(e()).readonly()}),Al={name:"local-network",scope:"system",mode:"singleton",methods:{list:c(h(),bl),getPreferred:c(h(),Il),getConnectionEndpoints:c(t({port:a().int().min(1).max(65535),includeLoopback:g().optional(),ipv4Only:g().optional(),scheme:S(["http","https"]).optional()}),wl),getAllowedAddresses:c(h(),Je),setAllowedAddresses:c(Je,t({success:w(!0)}),{kind:"mutation"}),resetAllowlistToBestMatch:c(h(),Je,{kind:"mutation"})}},Cl=t({id:e(),label:e(),scope:S(["mesh","public"]),url:e(),hostname:e(),port:a(),protocol:S(["http","https"])}),Nl=t({id:e(),hostname:e(),magicDns:e(),addresses:l(e()).readonly(),os:e().optional(),online:g(),lastSeenMs:a(),isSelf:g(),connection:S(["direct","relay","idle"]),relay:e().nullable(),lastHandshakeMs:a(),rxBytes:a(),txBytes:a(),tags:l(e()).readonly(),exitNodeOption:g(),advertisedRoutes:l(e()).readonly(),userLogin:e().nullable(),keyExpiry:a().nullable()}),Pl=t({joined:g(),meshIp:e(),magicDnsHostname:e(),peerCount:a(),endpoints:l(Cl).readonly(),error:e().optional(),tenantName:e(),magicDnsSuffix:e(),userLogin:e().nullable(),controlPlaneUrl:e(),keyExpiry:a().nullable(),daemonSocket:e().optional(),daemonCliPath:e().optional()}),Dl={name:"mesh-network",scope:"system",mode:"collection",providerKind:"mesh",methods:{getStatus:c(h(),Pl),join:c(t({authKey:e().min(8),hostname:e().optional()}),t({joined:w(!0)}),{kind:"mutation"}),startLogin:c(t({hostname:e().optional()}),t({loginUrl:e()}),{kind:"mutation"}),leave:c(h(),t({left:w(!0)}),{kind:"mutation"}),logout:c(h(),t({loggedOut:w(!0)}),{kind:"mutation"}),listPeers:c(h(),t({peers:l(Nl).readonly()})),testConnection:c(t({authKey:e().optional()}),t({ok:g(),tenant:e().optional(),daemonVersion:e().optional(),error:e().optional()}),{kind:"mutation"})}},Xe=t({id:e(),username:e(),isAdmin:g().default(!1),allowedProviders:R([l(e()),w("*")]),allowedDevices:b(e(),R([l(e()),w("*")])),scopes:l(z).default([]),totpEnabled:g().default(!1),createdAt:a(),updatedAt:a()}),Ml=t({username:e(),password:e().min(6),isAdmin:g().default(!1),allowedProviders:R([l(e()),w("*")]).optional(),allowedDevices:b(e(),R([l(e()),w("*")])).optional(),scopes:l(z).optional()}),El=t({id:e(),isAdmin:g().optional(),allowedProviders:R([l(e()),w("*")]).optional(),allowedDevices:b(e(),R([l(e()),w("*")])).optional(),scopes:l(z).optional()}),Nt=t({id:e(),label:e(),isAdmin:g().default(!1),allowedProviders:R([l(e()),w("*")]).optional(),allowedDevices:b(e(),R([l(e()),w("*")])).optional(),tokenPrefix:e(),createdAt:a(),lastUsedAt:a().optional()}),xl=t({label:e(),isAdmin:g().default(!1),allowedProviders:R([l(e()),w("*")]).optional(),allowedDevices:b(e(),R([l(e()),w("*")])).optional()}),Tl=t({token:e(),record:Nt}),Pt=t({id:e(),userId:e(),name:e(),tokenPrefix:e(),scopes:l(z),expiresAt:a().nullish(),lastUsedAt:a().nullish(),createdAt:a()}),Rl=t({userId:e(),name:e(),scopes:l(z),expiresAt:a().optional()}),Bl=t({token:e(),record:Pt}),ql=t({id:e(),userId:e(),username:e(),integrationId:e(),scopes:l(z),createdAt:a(),lastUsedAt:a(),revokedAt:a().nullable()}),Ol=t({secret:e(),otpauthUrl:e()}),zl=t({enabled:g(),confirmedAt:a().nullable()}),Ll={name:"user-management",scope:"system",mode:"singleton",methods:{listUsers:c(h(),l(Xe),{auth:"admin"}),createUser:c(Ml,Xe,{kind:"mutation",auth:"admin",access:"create"}),updateUser:c(El,t({success:w(!0)}),{kind:"mutation",auth:"admin",access:"create"}),deleteUser:c(t({id:e()}),t({success:w(!0)}),{kind:"mutation",auth:"admin",access:"delete"}),resetPassword:c(t({id:e(),newPassword:e().min(6)}),t({success:w(!0)}),{kind:"mutation",auth:"admin",access:"create"}),setUserScopes:c(t({userId:e(),scopes:l(z)}),t({success:w(!0)}),{kind:"mutation",auth:"admin",access:"create"}),validateCredentials:c(t({username:e(),password:e()}),Xe.extend({passwordHash:e()}).nullable(),{kind:"mutation",access:"view"}),listApiKeys:c(h(),l(Nt),{auth:"admin"}),createApiKey:c(xl,Tl,{kind:"mutation",auth:"admin",access:"create"}),revokeApiKey:c(t({id:e()}),t({success:w(!0)}),{kind:"mutation",auth:"admin",access:"delete"}),validateApiKey:c(t({token:e()}),Nt.nullable(),{kind:"mutation",access:"view"}),createScopedToken:c(Rl,Bl,{kind:"mutation",auth:"admin",access:"create"}),revokeScopedToken:c(t({id:e()}),t({success:w(!0)}),{kind:"mutation",auth:"admin",access:"delete"}),validateScopedToken:c(t({token:e()}),Pt.nullable(),{access:"view"}),listScopedTokens:c(t({userId:e()}),l(Pt),{auth:"admin"}),setupTotp:c(t({userId:e()}),Ol,{kind:"mutation",auth:"admin",access:"create"}),confirmTotp:c(t({userId:e(),code:e()}),t({success:w(!0)}),{kind:"mutation",auth:"admin",access:"create"}),disableTotp:c(t({userId:e()}),t({success:w(!0)}),{kind:"mutation",auth:"admin",access:"delete"}),getTotpStatus:c(t({userId:e()}),zl,{auth:"admin"}),verifyTotp:c(t({userId:e(),code:e()}),t({valid:g()}),{kind:"mutation",access:"view"}),oauthIssueCode:c(t({integrationId:e(),userId:e(),username:e(),scopes:l(z),redirectUri:e(),hubUrl:e()}),t({code:e()}),{kind:"mutation",access:"create"}),oauthExchangeCode:c(t({code:e(),redirectUri:e()}),t({accessToken:e(),refreshToken:e(),expiresIn:a()}).nullable(),{kind:"mutation",access:"view"}),oauthRefresh:c(t({refreshToken:e()}),t({accessToken:e(),refreshToken:e(),expiresIn:a()}).nullable(),{kind:"mutation",access:"view"}),oauthVerifyAccessToken:c(t({token:e()}),t({userId:e(),username:e(),scopes:l(z)}).nullable(),{access:"view"}),listOauthSessions:c(h(),l(ql),{auth:"admin"}),revokeOauthSession:c(t({id:e()}),t({success:g()}),{kind:"mutation",auth:"admin",access:"delete"})}},Ja=t({streaming:g(),notifications:g(),objectDetection:g(),remoteAccess:g(),agentCluster:g(),smartHome:g(),recordings:g(),backup:g(),repl:g()}),_l=t({status:w("ok"),uptime:a()}),Ul=t({name:e(),address:e(),family:e(),internal:g()}),Fl={name:"system",scope:"system",mode:"singleton",methods:{info:c(h(),Ja),health:c(h(),_l),featureFlags:c(h(),Ja),networkAddresses:c(h(),l(Ul).readonly()),getRetentionConfig:c(h(),f().nullable(),{auth:"admin"}),setRetentionConfig:c(b(e(),f()),wo(),{kind:"mutation",auth:"admin"}),forceRetentionCleanup:c(h(),h(),{kind:"mutation",auth:"admin"})}},Hl=t({nominalBitrateKbps:a(),observedBitrateKbps:a(),peakBitrateKbps:a(),packetLossPercent:a(),lastUpdated:a()}),$l=t({rttMs:a(),jitterMs:a(),estimatedBandwidthKbps:a(),lastUpdated:a()}),Xa=t({deviceId:a(),streams:b(e(),Hl),client:$l.optional()}),Wl={name:"network-quality",scope:"system",mode:"singleton",methods:{getDeviceStats:c(t({deviceId:a()}),Xa.nullable()),getAllStats:c(h(),l(Xa).readonly()),reportClientStats:c(t({deviceId:a(),rttMs:a().min(0).max(6e4),jitterMs:a().min(0).max(1e4),estimatedBandwidthKbps:a().min(0).max(1e6)}),h(),{kind:"mutation"})}},Gl=t({title:e(),message:e(),severity:S(["info","warning","critical"]),duration:a().optional(),action:t({label:e(),url:e()}).optional()}),Vl={name:"toast",scope:"system",mode:"singleton",methods:{onToast:c(h(),Gl,{kind:"subscription"})}},Kl=t({addonId:e(),capabilities:l(e()).readonly(),status:e()}),jl=t({pid:a(),name:e(),state:e(),cpuPercent:a(),memoryRss:a(),uptimeSeconds:a(),services:l(Kl).readonly(),groupId:e().optional()}),Zl=t({id:e(),status:e(),cpuPercent:a(),memoryRss:a()}),Yl=t({category:e(),total:a(),healthy:a(),addons:l(Zl).readonly()}),Ql=t({id:e(),name:e(),hostname:e(),platform:e(),arch:e(),cpuModel:e().nullable(),cpuCores:a(),memoryMB:a(),engines:l(e()).readonly(),isHub:g(),isOnline:g(),cpuPercent:a(),memoryPercent:a(),uptime:a(),lastSeen:e(),localIps:l(e()).readonly(),addons:l(t({id:e(),capabilities:l(e()).readonly(),status:e()})).readonly(),processes:l(jl).readonly(),categories:l(Yl).readonly()}),Jl=t({callerAddonId:e(),providerAddonId:e(),capName:e(),callsPerMin:a(),lastCallAtMs:a()}),Xl=t({nodeId:e(),name:e(),version:e(),status:e(),synced:g()}),ep=t({hubVersion:e(),nodes:l(Xl)}),et=t({nodeId:e(),addonId:e()}),tp=t({id:e(),status:e(),version:e().optional(),packageName:e().optional()}),re=t({success:g()}),ap=t({success:g(),reason:e().optional()}),np=t({restarted:l(e()).readonly(),failed:l(e()).readonly()}),op=t({nodeId:e(),name:e()}),sp={name:"nodes",scope:"system",mode:"singleton",nodeIdMode:"data",methods:{topology:c(h(),l(Ql).readonly(),{auth:"admin"}),deployAddon:c(et,re,{kind:"mutation",auth:"admin"}),undeployAddon:c(et,re,{kind:"mutation",auth:"admin"}),restartAddon:c(et,re,{kind:"mutation",auth:"admin"}),restartProcess:c(t({nodeId:e(),processName:e()}),ap,{kind:"mutation",auth:"admin"}),restartNode:c(t({nodeId:e()}),np,{kind:"mutation",auth:"admin"}),shutdownNode:c(t({nodeId:e()}),re,{kind:"mutation",auth:"admin"}),renameNode:c(t({nodeId:e(),name:e().min(1).max(64)}),op,{kind:"mutation",auth:"admin"}),clusterAddonStatus:c(h(),b(e(),ep),{auth:"admin"}),getCapUsageGraph:c(t({windowSeconds:a().int().positive().max(300).default(60)}),l(Jl).readonly(),{auth:"admin"}),getNodeAddons:c(t({nodeId:e()}),l(tp).readonly(),{auth:"admin"}),setProcessLogLevel:c(t({nodeId:e(),level:e()}),re,{kind:"mutation",auth:"admin"}),executeQuery:c(t({nodeId:e(),addonId:e(),queryName:e(),params:b(e(),f()).optional()}),f(),{kind:"mutation",auth:"admin"})}},en=t({id:e(),addonId:e(),name:e(),enabled:g(),info:b(e(),f()).readonly(),createdAt:a(),updatedAt:a(),processState:e()}),tt=t({id:e(),addonId:e(),name:e(),enabled:g(),info:b(e(),f()).readonly(),createdAt:a(),updatedAt:a()}),ip=t({addonId:e(),name:e(),description:e(),iconUrl:e().nullable(),color:e(),instanceMode:e(),discoveryMode:e(),existingInstances:l(t({id:e(),name:e()})),canAdd:g()}),cp=t({success:g(),error:e().optional()}),rp=t({addonId:e(),name:e(),enabled:g().optional(),info:b(e(),f()).optional(),settings:b(e(),f()).optional(),skipRestart:g().optional()}),dp=t({id:e(),name:e().optional(),enabled:g().optional(),info:b(e(),f()).optional()}),lp=t({success:g(),deletedId:e()}),pp={name:"integrations",scope:"system",mode:"singleton",methods:{list:c(h(),l(en)),get:c(t({id:e()}),en),getByAddonId:c(t({addonId:e()}),tt.nullable()),create:c(rp,tt,{kind:"mutation",auth:"admin"}),update:c(dp,tt,{kind:"mutation",auth:"admin"}),delete:c(t({id:e()}),lp,{kind:"mutation",auth:"admin"}),getSettings:c(t({id:e()}),b(e(),f()),{auth:"admin"}),setSettings:c(t({id:e(),settings:b(e(),f())}),t({success:g()}),{kind:"mutation",auth:"admin"}),getAvailableTypes:c(h(),l(ip),{auth:"admin"}),testConnection:c(t({addonId:e(),settings:b(e(),f())}),cp,{kind:"mutation",auth:"admin"})}},tn=S(["debug","info","warn","error"]),Dt=S(["off","latest","beta"]),to=S(["off","latest","beta","inherit"]),mp=t({id:e(),name:e().optional(),version:e().optional(),description:e().optional(),icon:e().optional(),color:e().optional(),capabilities:l(f()).readonly().optional(),packageName:e(),packageVersion:e(),packageDisplayName:e().optional(),bundle:t({displayName:e(),description:e().optional(),icon:e().optional()}).optional(),protected:g().optional(),removable:g().optional()}),up=t({pid:a().optional(),mode:e(),state:e()}),gp=t({phase:S(["pending","healthy","failed"]),retryCount:a(),firstFailureAt:a().nullable(),lastAttemptAt:a().nullable(),lastError:t({message:e(),stack:e().optional()}).nullable(),nextRetryAt:a().nullable(),alertEmitted:g(),retrying:g(),inGracePeriod:g()}),hp=t({manifest:mp,declaration:f().optional(),source:e(),installSource:e().optional(),process:up.optional(),hasBackup:g().optional(),health:gp.nullable().optional()}),vp=t({name:e(),version:e(),dir:e(),installSource:e().optional()}),yp=t({name:e(),currentVersion:e(),latestVersion:e(),category:S(["addon","core"]),requiresRestart:g(),isSystem:g()}),Sp=t({version:e(),publishedAt:e(),deprecated:e().optional(),distTags:l(e()).readonly()}),fp=t({name:e(),version:e(),description:e(),keywords:l(e()).readonly(),publishedAt:e(),author:e(),installed:g(),installedVersion:e().optional()}),bp=t({channel:Dt,intervalSeconds:a()}),Ip=to,kp=f(),an=f(),wp=f(),Ap=t({packageName:e(),fromVersion:e(),toVersion:e(),restartingAt:a()}),Cp=S(["queued","updating","done","done-pending-restart","failed"]),Np=t({name:e(),isSystem:g(),fromVersion:e(),toVersion:e(),status:Cp,error:e().optional(),startedAtMs:a().optional(),completedAtMs:a().optional()}),Pp=S(["regular","system","restarting","finalizing"]),nn=t({id:e(),nodeId:e(),startedAtMs:a(),completedAtMs:a().optional(),total:a(),completed:a(),failed:a(),current:e().nullable(),phase:Pp,cancelled:g(),items:l(Np).readonly()}),Dp=t({packageName:e(),currentVersion:e(),latestVersion:e().nullable(),hasUpdate:g(),description:e().optional()}),Mp=t({timestamp:e(),level:e(),message:e(),scope:e().optional()}),Ep=f(),xp=t({addonId:e().min(1),action:e().min(1),input:f()}),Tp={name:"addons",scope:"system",mode:"singleton",nodeIdMode:"data",methods:{list:c(h(),l(hp).readonly()),getLogs:c(t({addonId:e(),limit:a().min(1).max(500).default(100),level:tn.optional()}),l(Ep)),listPackages:c(h(),l(vp).readonly()),installPackage:c(t({packageName:e(),version:e().optional()}),an,{kind:"mutation",auth:"admin"}),installFromWorkspace:c(t({packageName:e()}),an,{kind:"mutation",auth:"admin"}),isWorkspaceAvailable:c(h(),g()),listWorkspacePackages:c(h(),l(f()).readonly()),uninstallPackage:c(t({packageName:e()}),f(),{kind:"mutation",auth:"admin"}),reloadPackages:c(h(),wp,{kind:"mutation",auth:"admin"}),searchAvailable:c(t({query:e().optional()}),l(fp)),listUpdates:c(t({nodeId:e().optional()}),l(yp).readonly(),{auth:"admin"}),updatePackage:c(t({name:e().min(1),version:e().optional(),nodeId:e().optional()}),f(),{kind:"mutation",auth:"admin"}),rollbackPackage:c(t({name:e().min(1)}),t({rolledBackTo:e().nullable()}),{kind:"mutation",auth:"admin"}),forceRefresh:c(t({nodeId:e().optional()}),f(),{kind:"mutation",auth:"admin"}),restartServer:c(t({confirm:w(!0)}),f(),{kind:"mutation",auth:"admin"}),getLastRestart:c(h(),t({kind:S(["framework-update","manual","system","framework-bulk-update"]),packageName:e().optional(),fromVersion:e().optional(),toVersion:e().optional(),requestedBy:e().optional(),requestedAt:a()}).nullable(),{auth:"admin"}),listFrameworkPackages:c(h(),l(Dp).readonly(),{auth:"admin"}),listCapabilityProviders:c(t({capName:e().min(1)}),l(t({addonId:e(),mode:S(["singleton","collection"]),isActive:g()})).readonly()),setCapabilityProviderEnabled:c(t({capName:e().min(1),addonId:e().min(1),enabled:g()}),t({success:w(!0)}),{kind:"mutation",auth:"admin"}),updateFrameworkPackage:c(t({packageName:e().min(1),version:e().optional(),deferRestart:g().optional()}),Ap,{kind:"mutation",auth:"admin"}),startBulkUpdate:c(t({nodeId:e(),items:l(t({name:e(),version:e(),isSystem:g()})).readonly()}),t({id:e()}),{kind:"mutation",auth:"admin"}),getBulkUpdateState:c(t({id:e()}),nn.nullable(),{auth:"admin"}),cancelBulkUpdate:c(t({id:e()}),t({cancelled:g()}),{kind:"mutation",auth:"admin"}),listActiveBulkUpdates:c(t({nodeId:e().optional()}),l(nn).readonly(),{auth:"admin"}),getVersions:c(t({name:e()}),l(Sp).readonly()),restartAddon:c(t({addonId:e()}),kp,{kind:"mutation",auth:"admin"}),retryLoad:c(t({packageName:e()}),t({success:w(!0)}),{kind:"mutation",auth:"admin"}),getAutoUpdateSettings:c(h(),bp,{auth:"admin"}),setAutoUpdateSettings:c(t({channel:Dt,intervalSeconds:a().min(300).max(86400).optional()}),f(),{kind:"mutation",auth:"admin"}),getAddonAutoUpdate:c(t({addonId:e()}),Ip,{auth:"admin"}),setAddonAutoUpdate:c(t({addonId:e(),channel:to}),f(),{kind:"mutation",auth:"admin"}),applyAutoUpdateToAll:c(t({channel:Dt}),t({success:w(!0)}),{kind:"mutation",auth:"admin"}),custom:c(xp,f(),{kind:"mutation"}),onAddonLogs:c(t({addonId:e(),level:tn.optional()}),Mp,{kind:"subscription"})}},Rp=["decoder","motion-detection","pipeline-executor","audio-analyzer","pipeline-analytics","notification-output"],Xm=[...Rp,"pipeline-orchestrator","pipeline-runner"];class eu{disposers=[];disposed=!1;onError;constructor(s={}){this.onError=s.onError??((n,d)=>{console.error(`[DisposerChain] disposer #${d} threw`,n)})}add(s){if(this.disposed){try{const n=s();n&&typeof n.then=="function"&&n.catch(d=>this.onError(d,-1))}catch(n){this.onError(n,-1)}return()=>{}}return this.disposers.push(s),()=>{const n=this.disposers.indexOf(s);n>=0&&this.disposers.splice(n,1)}}get isDisposed(){return this.disposed}get size(){return this.disposers.length}async dispose(){if(this.disposed)return;this.disposed=!0;const s=this.disposers.slice().reverse();this.disposers=[];for(let n=0;n<s.length;n++){const d=s[n];try{const p=d();p&&typeof p.then=="function"&&await p}catch(p){this.onError(p,s.length-1-n)}}}}const Bp="hub-only";function Oe(i){return{placement:i.execution?.placement??Bp,group:i.execution?.group}}function tu(i){const s=Oe(i).placement;return s==="any-node"||s==="agent-only"}function au(i){return Oe(i).placement==="agent-only"}function nu(i){return Oe(i).group}function ou(i,s){return i.execution?.group??s}function su(i){return Oe(i).placement}var Pe=(i=>(i.SystemBoot="system.boot",i.SystemAddonsReady="system.addons-ready",i.SystemRestarting="system.restarting",i.SystemRestartCompleted="system.restart-completed",i.SystemReadyState="system.ready-state",i.AddonStarted="addon.started",i.AddonStopped="addon.stopped",i.AddonRestarted="addon.restarted",i.AddonUpdated="addon.updated",i.AddonInstalled="addon.installed",i.AddonUninstalled="addon.uninstalled",i.AddonCrashed="addon.crashed",i.AddonError="addon.error",i.AddonPageReady="addon.page-ready",i.AddonWidgetReady="addon.widget-ready",i.AddonLoadFailed="addon.load-failed",i.AddonLoadRecovered="addon.load-recovered",i.AddonRetryScheduled="addon.retry-scheduled",i.AddonRetryAttempting="addon.retry-attempting",i.DeviceRegistered="device.registered",i.DeviceUnregistered="device.unregistered",i.DeviceEnabled="device.enabled",i.DeviceDisabled="device.disabled",i.DeviceSettingsUpdated="device.settings-updated",i.DeviceBindingsChanged="device.bindings-changed",i.DeviceMetaChanged="device.meta-changed",i.DeviceStreamsRegistered="device.streams-registered",i.IntegrationEnabled="integration.enabled",i.IntegrationDisabled="integration.disabled",i.IntegrationDeleted="integration.deleted",i.ProviderStarted="provider.started",i.ProviderStopped="provider.stopped",i.ProcessCrashed="process.crashed",i.ProcessRestartScheduled="process.restart_scheduled",i.ProcessRestarted="process.restarted",i.RecordingStarted="recording.started",i.RecordingStopped="recording.stopped",i.RecordingError="recording.error",i.RecordingHealthDegraded="recording.health.degraded",i.RecordingStorageCritical="recording.storage.critical",i.RecordingSegmentWritten="recording.segment.written",i.RecordingPolicyFallback="recording.policy.fallback",i.RecordingRetentionCompleted="recording.retention.completed",i.DetectionEvent="detection.event",i.SessionTrackNew="session.track.new",i.SessionTrackExpired="session.track.expired",i.BenchmarkProgress="benchmark.progress",i.PlatformProbePhase="platform-probe.phase",i.PipelineProgress="pipeline.progress",i.PipelineTrace="pipeline.trace",i.PipelineInferenceResult="pipeline.inference-result",i.PipelineCameraAssigned="pipeline.camera-assigned",i.PipelineCameraUnassigned="pipeline.camera-unassigned",i.PipelineCameraUpdated="pipeline.camera-updated",i.PipelineRunnerLoadSnapshot="pipeline.runner-load-snapshot",i.PipelineCameraMetricsSnapshot="pipeline.camera-metrics-snapshot",i.StreamBrokerMetricsSnapshot="stream-broker.metrics-snapshot",i.StreamBrokerOnCamStreamDemand="stream-broker.onCamStreamDemand",i.StreamBrokerOnCamStreamIdle="stream-broker.onCamStreamIdle",i.StreamBrokerOnRequestStreamSourceRefresh="stream-broker.onRequestStreamSourceRefresh",i.StreamParamsChanged="stream-params.changed",i.DeviceStateChanged="device.state-changed",i.BatteryOnStatusChanged="battery.onStatusChanged",i.DoorbellOnPressed="doorbell.onPressed",i.PipelineEngineMetricsSnapshot="pipeline.engine-metrics-snapshot",i.ClusterTopologySnapshot="cluster.topology-snapshot",i.MetricsNodeResourcesSnapshot="metrics.node-resources-snapshot",i.MetricsNodeProcessesSnapshot="metrics.node-processes-snapshot",i.CapabilityBindingChanged="capability.binding-changed",i.ModelDownloadProgress="model.download.progress",i.AgentRegistered="agent.registered",i.AgentUnregistered="agent.unregistered",i.AgentOnline="agent.online",i.AgentOffline="agent.offline",i.WorkerOnline="worker.online",i.WorkerOffline="worker.offline",i.AgentTaskDispatched="agent.task.dispatched",i.AgentTaskAssigned="agent.task.assigned",i.AgentTrpcConnected="agent.trpc.connected",i.AgentWsConnected="agent.ws.connected",i.AgentWsDisconnected="agent.ws.disconnected",i.AgentBackupActivated="agent.backup.activated",i.OrchestrationSettingsUpdated="orchestration.settings-updated",i.PipelineAgentHwaccelChanged="pipeline.agent-hwaccel-changed",i.MotionAnalysis="detection.motion-analysis",i.MotionZonesRaw="detection.motion-zones-raw",i.MotionOnMotionChanged="motion.on-motion-changed",i.DetectionResult="detection.result",i.DetectionRaw="detection.raw",i.DetectionCameraNative="detection.camera-native",i.PipelineAudioInferenceResult="pipeline.audio-inference-result",i.DetectionPhaseTransition="detection.phase-transition",i.ProviderMotion="provider.motion",i.ProviderDetection="provider.detection",i.EnrichmentEmbeddingStored="enrichment.embedding.stored",i.EnrichmentSceneStateChanged="enrichment.scene.state-changed",i.EnrichmentActivitySummary="enrichment.activity.summary",i.PipelineAnalyticsTrackStarted="pipeline-analytics.track-started",i.PipelineAnalyticsTrackEnded="pipeline-analytics.track-ended",i.PipelineAnalyticsDetectionEvent="pipeline-analytics.detection-event",i.PipelineAnalyticsFrameTracked="pipeline-analytics.frame-tracked",i.FrigateLiveEvent="frigate.live-event",i.CameraStreamsProfileSlotsChanged="camera-streams.onProfileSlotsChanged",i.StreamOnline="stream.online",i.StreamOffline="stream.offline",i.NetworkTunnelStarted="network.tunnel.started",i.NetworkTunnelStopped="network.tunnel.stopped",i.LocalNetworkChanged="network.local.changed",i.MeshNetworkChanged="network.mesh.changed",i.BackupCompleted="backup.completed",i.BackupRestored="backup.restored",i.NotificationDispatched="notification.dispatched",i.NotificationFailed="notification.failed",i.DeviceUpdated="device.updated",i.DeviceOnline="device.online",i.DeviceOffline="device.offline",i.DeviceAwake="device.awake",i.DeviceSleeping="device.sleeping",i.RetentionCleanup="retention.cleanup",i.AddonsBulkUpdateProgress="addons.bulk-update-progress",i))(Pe||{});function iu(i,s){return i.category===s}function ao(i,s,n){return{id:typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2),timestamp:new Date,source:s,category:i,data:n}}function qp(i,s){const n=s.ts??Date.now();i.emit(ao("system.ready-state",{type:"capability",id:s.capName,nodeId:s.sourceNodeId},{capName:s.capName,scope:s.scope,state:s.state,generation:s.generation,sourceNodeId:s.sourceNodeId,ts:n}))}class Op{_ctx=null;_config;_readinessGeneration=typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2,14);_registeredCapNames=[];defaults;constructor(s){this.defaults=s,this._config={...s}}get autoEmitReadiness(){return!0}get ctx(){if(!this._ctx)throw new Error(`${this.constructor.name}: ctx accessed before initialize()`);return this._ctx}get ctxIfReady(){return this._ctx}get config(){return this._config}async initialize(s){this._ctx=s,await this.resolveConfig();const n=await this.onInitialize();this.emitLifecycle(Pe.AddonStarted);const d=zp(n),p=d&&"providers"in d&&d.providers?d.providers:[];return this._registeredCapNames=p.map(u=>u.capability.name),d}postBrokerStart(){this.autoEmitReadiness&&this._registeredCapNames.length>0&&this.emitReadinessForProviders("ready")}async onHubReachable(){}async shutdown(){this.emitLifecycle(Pe.AddonStopped),this.autoEmitReadiness&&this.emitReadinessForProviders("down"),await this.onShutdown();for(const s of this._subscriptions)s();this._subscriptions=[],this._ctx=null}async onShutdown(){}async onConfigChanged(){}field(s){return s}schema(s){return s}globalSettingsSchema(s){return null}deviceSettingsSchema(){return null}async getGlobalSettings(s,n){const d=this.globalSettingsSchema(n);if(!d)return{sections:[]};const p=await this._ctx?.settings?.readAddonStore()??{};return ca(d,s?{...p,...s}:p)}async updateGlobalSettings(s){await this._ctx?.settings?.writeAddonStore(s),await this.resolveConfig(),await this.onConfigChanged(),this.emitLifecycle(Pe.AddonUpdated,{level:"global"}),this.maybeAutoRestart(s,this.globalSettingsSchema())}maybeAutoRestart(s,n){if(!n)return;const d=new Set;for(const m of n.sections)for(const y of m.fields)y.type==="separator"||y.type==="info"||y.requiresRestart&&d.add(y.key);if(d.size===0||!Object.keys(s).some(m=>d.has(m)))return;const u=this._ctx;if(!u)return;const v=u.id;setImmediate(()=>{u.api.addons?.restartAddon?.mutate({addonId:v}).then(()=>{u.logger.info("addon auto-restart triggered by restart-required setting change",{meta:{changedFields:Object.keys(s).filter(y=>d.has(y))}})}).catch(y=>{u.logger.error("addon auto-restart failed",{meta:{error:y instanceof Error?y.message:String(y)}})})})}async getDeviceSettings(s){const n=this.deviceSettingsSchema();if(!n)return{sections:[]};const d=await this._ctx?.settings?.readDeviceStore(s)??{};return ca(n,d)}async updateDeviceSettings(s,n){await this._ctx?.settings?.writeDeviceStore(s,n)}_subscriptions=[];watchCapability(s,n){const d=Array.isArray(s)?s:[s],p=new Set(d);this.subscribe({category:"system.ready-state"},u=>{const v=u.data;if(typeof v.capName!="string"||!p.has(v.capName)||v.scope?.type!=="node")return;const m=v.scope.nodeId;if(typeof m!="string"||m.length===0)return;const y=v.capName;v.state==="down"?n.onDown?.(m,y):v.state==="ready"&&n.onReady?.(m,y)})}subscribe(s,n){const d=this.ctx.eventBus.subscribe(s,n);this._subscriptions.push(d)}emitLifecycle(s,n){try{this._ctx?.eventBus.emit({id:`${this._ctx.id}-${Date.now()}`,timestamp:new Date,source:{type:"addon",id:this._ctx.id,nodeId:this._ctx.kernel.localNodeId??"hub"},category:s,data:n??{}})}catch{}}emitReadinessForProviders(s){const n=this._ctx;if(!n||this._registeredCapNames.length===0)return;const d=n.kernel?.localNodeId??"hub",p=d.includes("/")?d.split("/")[0]:d;for(const u of this._registeredCapNames)try{qp(n.eventBus,{capName:u,scope:{type:"node",nodeId:p},state:s,generation:this._readinessGeneration,sourceNodeId:p})}catch{}}async resolveModelsDir(){return this.ctx.api.storage.resolve.query({location:"models",relativePath:""}).catch(()=>"camstack-data/models")}get capabilities(){return this.ctx.capabilities??null}async resolveConfig(){const s=await this.readAddonStoreWithRetry(),n={...this.defaults};for(const d of Object.keys(this.defaults)){const p=s[d];if(p!=null){const u=typeof this.defaults[d];typeof p===u&&(n[d]=p)}}this._config=n}async readAddonStoreWithRetry(){const s=this._ctx?.settings;if(!s)return{};const n=[150,350,600,900];let d;for(let p=0;p<=n.length;p++)try{return await s.readAddonStore()??{}}catch(u){d=u;const v=u instanceof Error?u.message:String(u);if(!(v.includes("SqliteSettingsBackend not initialized")||v.includes("provider not available")))throw u;if(p===n.length)break;await new Promise(y=>setTimeout(y,n[p]))}return this._ctx?.logger?.warn?.("readAddonStore: settings-store unavailable after retries — using defaults",{meta:{error:d instanceof Error?d.message:String(d)}}),{}}}function zp(i){if(i!=null)return Array.isArray(i)?{providers:i}:i}function cu(i,s){return{id:i,getRoutes:()=>s,invoke:async n=>{const d=Lp(s,n.method,n.path);if(!d)return{status:404,headers:{},redirectUrl:null,body:{error:`No route matches ${n.method} ${n.path}`}};const p={status:200,headers:{},redirectUrl:null},u=Up(p),v={params:{...n.params,...d.params},query:n.query,body:n.body,headers:n.headers,...n.user?{user:n.user}:{},...n.scopedToken!==void 0?{scopedToken:n.scopedToken}:{}};return await d.route.handler(v,u),p}}}function Lp(i,s,n){const d=s.toUpperCase();for(const p of i){if(p.method!==d)continue;const u=_p(p.path,n);if(u!==null)return{route:p,params:u}}return null}function _p(i,s){const n=i.split("/").filter(Boolean),d=s.split("/").filter(Boolean);if(n.length!==d.length)return null;const p={};for(let u=0;u<n.length;u++){const v=n[u],m=d[u];if(v.startsWith(":"))p[v.slice(1)]=m;else if(v!==m)return null}return p}function Up(i){const s={status(n){return i.status=n,s},code(n){return i.status=n,s},send(n){i.body=n},redirect(n){i.redirectUrl=n,i.status===200&&(i.status=302)},header(n,d){return i.headers[n.toLowerCase()]=d,s},type(n){return i.contentType=n,s}};return s}class Fp extends Error{capName;scope;waitedMs;constructor(s,n,d){super(`Timed out waiting for ${s} (${ee(n)}) to become ready after ${d}ms`),this.name="ReadinessTimeoutError",this.capName=s,this.scope=n,this.waitedMs=d}}function at(i,s){return`${i}|${ee(s)}`}function ee(i){switch(i.type){case"global":return"global";case"node":return`node:${i.nodeId}`;case"device":return`device:${i.deviceId}`}}function nt(i,s){return i.type!==s.type?!1:i.type==="global"||s.type==="global"?!0:i.type==="node"&&s.type==="node"?i.nodeId===s.nodeId:i.type==="device"&&s.type==="device"?i.deviceId===s.deviceId:!1}class ru{bus;sourceNodeId;logger;now;generation;snapshot=new Map;subscriptions=new Set;unsubscribeBus;unsubscribeAgentOffline;constructor(s){if(this.bus=s.eventBus,this.sourceNodeId=s.sourceNodeId,this.logger=s.logger,this.now=s.now??(()=>Date.now()),this.generation=s.generation??Hp(),this.unsubscribeBus=this.bus.subscribe({category:"system.ready-state"},n=>this.ingest(n.data)),this.unsubscribeAgentOffline=this.bus.subscribe({category:"agent.offline"},n=>this.synthesizeDownForNode(n.data.agentId)),typeof this.bus.getRecent=="function")try{const n=this.bus.getRecent({category:"system.ready-state"});for(const d of n)this.ingest(d.data)}catch{}}close(){this.unsubscribeBus(),this.unsubscribeAgentOffline(),this.subscriptions.clear()}get(s,n){return this.snapshot.get(at(s,n))??null}getSnapshotForTransport(){return Array.from(this.snapshot.values())}hydrate(s){const n=this.now();for(const d of s){const p=at(d.capName,d.scope);if(this.snapshot.has(p))continue;const u={capName:d.capName,scope:d.scope,state:d.state,generation:d.generation,epoch:1,lastChange:n,sourceNodeId:d.sourceNodeId};this.snapshot.set(p,u),this.logger&&this.logger.debug(`readiness: ${d.capName} (${ee(d.scope)}) → ${d.state} (hydrated, gen=${d.generation.slice(0,6)})`);const v={capName:d.capName,scope:d.scope,state:d.state,epoch:1,generation:d.generation,sourceNodeId:"hydrated",ts:n,durationInPrevState:0};for(const m of this.subscriptions)if(m.capName===d.capName&&nt(m.scope,d.scope))try{m.handler(v)}catch(y){this.logger?.warn(`readiness hydrate handler threw for ${d.capName}: ${y.message??String(y)}`)}}}getAll(){return new Map(this.snapshot)}emitReady(s,n){this.emitTransition(s,n,"ready")}emitStarting(s,n){this.emitTransition(s,n,"starting")}emitDown(s,n){this.emitTransition(s,n,"down")}awaitReady(s,n,d={}){const p=d.timeoutMs??Number.POSITIVE_INFINITY,u=this.now();return this.get(s,n)?.state==="ready"?Promise.resolve():d.signal?.aborted?Promise.reject(d.signal.reason??new Error("aborted")):new Promise((m,y)=>{let I=!1;const A=this.onReadyState(s,n,q=>{q.state==="ready"&&(I||(I=!0,D(),m()))}),C=!Number.isFinite(p)?null:setTimeout(()=>{I||(I=!0,D(),y(new Fp(s,n,this.now()-u)))},p),B=setInterval(()=>{I||this.logger?.warn(`readiness: still awaiting ${s} (${ee(n)}) after ${this.now()-u}ms`)},3e4);typeof B.unref=="function"&&B.unref();const P=()=>{I||(I=!0,D(),y(d.signal?.reason??new Error("aborted")))};d.signal?.addEventListener("abort",P,{once:!0});function D(){A(),C!==null&&clearTimeout(C),clearInterval(B),d.signal?.removeEventListener("abort",P)}})}onReadyState(s,n,d){const p={capName:s,scope:n,handler:d};this.subscriptions.add(p);const u=this.get(s,n);return u!==null&&queueMicrotask(()=>{this.subscriptions.has(p)&&d({capName:s,scope:n,state:u.state,epoch:u.epoch,generation:u.generation,sourceNodeId:this.sourceNodeId,ts:u.lastChange,durationInPrevState:0})}),()=>{this.subscriptions.delete(p)}}emitTransition(s,n,d){const p=this.now();this.bus.emit(ao("system.ready-state",{type:"capability",id:s,nodeId:this.sourceNodeId},{capName:s,scope:n,state:d,generation:this.generation,sourceNodeId:this.sourceNodeId,ts:p}))}ingest(s){if(typeof s?.capName!="string"||s.state!=="ready"&&s.state!=="starting"&&s.state!=="down"||typeof s.generation!="string"||s.scope?.type!=="global"&&s.scope?.type!=="node"&&s.scope?.type!=="device")return;const n=at(s.capName,s.scope),d=this.snapshot.get(n)??null,p=this.now();let u;if(d===null?u=s.state==="ready"?1:0:d.generation!==s.generation&&s.state==="ready"?u=d.epoch+1:u=d.epoch,d!==null&&d.generation===s.generation&&d.state===s.state)return;const v=d===null?0:Math.max(0,p-d.lastChange),m={capName:s.capName,scope:s.scope,state:s.state,generation:s.generation,epoch:u,lastChange:p,sourceNodeId:s.sourceNodeId};this.snapshot.set(n,m);const y={capName:s.capName,scope:s.scope,state:s.state,epoch:u,generation:s.generation,sourceNodeId:s.sourceNodeId,ts:s.ts,durationInPrevState:v};this.logger&&this.logger.debug(`readiness: ${s.capName} (${ee(s.scope)}) → ${s.state} epoch=${u} gen=${s.generation.slice(0,6)} (prev ${v}ms)`);for(const I of this.subscriptions)if(I.capName===s.capName&&nt(I.scope,s.scope))try{I.handler(y)}catch(A){this.logger?.warn(`readiness handler threw for ${s.capName}: ${A.message??String(A)}`)}}synthesizeDownForNode(s){const n=this.now();for(const[d,p]of this.snapshot){if(p.state==="down"||!(p.scope.type==="node"&&p.scope.nodeId===s||p.scope.type==="device"&&p.sourceNodeId===s))continue;const v=Math.max(0,n-p.lastChange),m={...p,state:"down",lastChange:n};this.snapshot.set(d,m);const y={capName:p.capName,scope:p.scope,state:"down",epoch:p.epoch,generation:p.generation,sourceNodeId:this.sourceNodeId,ts:n,durationInPrevState:v};this.logger&&this.logger.debug(`readiness: ${p.capName} (${ee(p.scope)}) → down (synthesized from agent.offline ${s})`);for(const I of this.subscriptions)if(I.capName===p.capName&&nt(I.scope,p.scope))try{I.handler(y)}catch(A){this.logger?.warn(`readiness handler threw during agent.offline demux for ${p.capName}: ${A.message??String(A)}`)}}}}function Hp(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2,14)}function du(i,s){for(const{capName:n,scope:d}of s)i.emitDown(n,d)}const lu=["data","media","recordings","recordings-high","recordings-low","recordings-clips","event-images","models","addons-data","cache","logs","backups"],pu={data:"db",media:"media",recordings:"recordings","recordings-high":"recordings-high","recordings-low":"recordings-low","recordings-clips":"recordings-clips","event-images":"event-images",models:"models","addons-data":"addons-data",cache:"/tmp/camstack-cache",logs:"logs",backups:"backups"},$p={high:"High",mid:"Mid",low:"Low"};function mu(i){return $p[i]??i.charAt(0).toUpperCase()+i.slice(1)}function Wp(i){return(i.width??0)*(i.height??0)}function Gp(i){if(i.length===0)return[];const s=i.map((d,p)=>({s:d,i:p,px:Wp(d.metadata??{})})).sort((d,p)=>p.px-d.px),n=Array.from({length:i.length});for(let d=0;d<s.length;d++){const{s:p,i:u}=s[d];let v;d===0?v="high":d===s.length-1?v="low":v="mid",n[u]={...p,quality:v}}return n}function uu(i){const s=i.height??0,n=i.width??0;return s>=1080||n>=1920?"high":s>=480||n>=640?"mid":"low"}function gu(i){const s=i.protocols.find(p=>p.type==="rtsp"&&p.url)??i.protocols.find(p=>p.url),n=s?.type,d=n==="rtsp"?"rtsp":n==="http"||n==="flv"?"http-mjpeg":"custom";return{id:i.id,label:i.label??i.id,protocol:d,url:s?.url,profileHint:i.quality}}function L(i){return typeof i=="string"}function Vp(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}function Kp(i){return L(i)&&i.trim()?{url:i}:Vp(i)&&L(i.url)&&i.url.trim()?{url:i.url,label:L(i.label)?i.label:void 0}:null}function hu(i){const s=L(i.snapshot_url)?i.snapshot_url:void 0;if(Array.isArray(i.streams)){const v=[];for(const m of i.streams){const y=Kp(m);y&&v.push(y)}return{streams:v,snapshot_url:s}}const n=[],d=L(i.main_stream_url)?i.main_stream_url:void 0;d&&n.push({url:d,label:L(i.main_stream_name)?i.main_stream_name:void 0});const p=L(i.sub_stream_url)?i.sub_stream_url:void 0;p&&n.push({url:p,label:L(i.sub_stream_name)?i.sub_stream_name:void 0});const u=L(i.third_stream_url)?i.third_stream_url:void 0;return u&&n.push({url:u,label:L(i.third_stream_name)?i.third_stream_name:void 0}),{streams:n,snapshot_url:s}}function vu(i){if(i.length===0)return{};const s=Gp(i),n={},d=s.find(m=>m.quality==="high"),p=s.find(m=>m.quality==="mid"),u=s.find(m=>m.quality==="low");d&&(n.high=d.id),p&&(n.mid=p.id),u&&(n.low=u.id);const v=d??p??u??s[0];return v&&(n.high||(n.high=v.id),n.mid||(n.mid=v.id),n.low||(n.low=v.id)),n}const yu={streaming:!0,notifications:!0,objectDetection:!1,remoteAccess:!0,agentCluster:!1,smartHome:!0,recordings:!0,backup:!0,repl:!0},Su=["face","plate"],fu=["face","plate","clip","custom"],bu={cleanupIntervalMs:3600*1e3,detectionEventsDays:30,audioLevelsDays:7,snapshotsDays:14};var jp=(i=>(i.Addon="addon",i.Core="core",i.Device="device",i.Provider="provider",i.System="system",i))(jp||{});const Zp="camstack/camstack-models",Iu=`https://huggingface.co/${Zp}/resolve/main`,ku={"features.streaming":!0,"features.notifications":!0,"features.objectDetection":!1,"features.remoteAccess":!0,"features.agentCluster":!1,"features.smartHome":!0,"features.recordings":!0,"features.backup":!0,"features.repl":!0,"retention.detectionEventsDays":30,"retention.audioLevelsDays":7,"logging.level":"info","logging.retentionDays":30,"eventBus.ringBufferSize":1e4,"storage.provider":"sqlite-storage","storage.locations":{data:"camstack-data/data",media:"camstack-data/media",recordings:"camstack-data/recordings",cache:"/tmp/camstack-cache",logs:"camstack-data/logs",models:"camstack-data/models"},providers:[],"recording.segmentDurationSeconds":4,"recording.defaultRetentionDays":30,"ffmpeg.binaryPath":"ffmpeg","ffmpeg.hwAccel":"auto","ffmpeg.threadCount":0,"auth.tokenExpiry":"24h"};function no(i){return JSON.parse(i)}function Yp(i){return i===null||typeof i!="object"||Array.isArray(i)?null:{...i}}function wu(i){return Array.isArray(i)?i:[]}function Au(i,s=""){return typeof i=="string"?i:s}function Cu(i,s=0){return typeof i=="number"?i:s}function Nu(i,s=!1){return typeof i=="boolean"?i:s}function Pu(i){try{return Yp(no(i))}catch{return null}}function Du(i){try{const s=no(i);return Array.isArray(s)?s:null}catch{return null}}function Mu(i,s){return`https://huggingface.co/${i}/resolve/main/${s}`}function Eu(i,s){if(i.length!==s.length)return 0;let n=0,d=0,p=0;for(let v=0;v<i.length;v++)n+=i[v]*s[v],d+=i[v]*i[v],p+=s[v]*s[v];const u=Math.sqrt(d)*Math.sqrt(p);return u===0?0:n/u}class xu{constructor(s,n){this.elementId=s,this.getBackend=typeof n=="function"?n:()=>n}cache={};listeners=new Set;loaded=!1;getBackend;async ensureLoaded(){if(this.loaded)return;const s=this.getBackend();if(!s)throw new Error(`ElementConfigStore(${this.elementId}): settings backend not available`);const n=await s.query({collection:"config",filter:{where:{id:this.elementId},limit:1}});n.length>0&&(this.cache=n[0].data??{}),this.loaded=!0}getAll(){return{...this.cache}}get(s){const n=s.split(".");let d=this.cache;for(const p of n){if(d===null||typeof d!="object"||Array.isArray(d))return;d=Reflect.get(d,p)}return d}async set(s,n){await this.ensureLoaded(),Qp(this.cache,s,n),await this.persist(),this.notifyListeners()}async setAll(s){await this.ensureLoaded(),this.cache={...s},await this.persist(),this.notifyListeners()}onChange(s){return this.listeners.add(s),()=>{this.listeners.delete(s)}}async load(){await this.ensureLoaded()}async loadDefaults(s){await this.ensureLoaded(),Object.keys(this.cache).length===0&&(this.cache={...s},await this.persist())}async persist(){const s=this.getBackend();if(!s)throw new Error(`ElementConfigStore(${this.elementId}): settings backend not available — cannot persist config`);await s.set({collection:"config",key:this.elementId,value:this.cache})}notifyListeners(){const s=this.getAll();for(const n of this.listeners)try{n(s)}catch{}}}function Qp(i,s,n){const d=s.split(".");let p=i;for(let u=0;u<d.length-1;u++){const v=d[u],m=p[v];if(m===null||typeof m!="object"||Array.isArray(m)){const y={};p[v]=y,p=y}else p=m}p[d[d.length-1]]=n}const oo={cpu:"onnx",coreml:"onnx",cuda:"onnx",tensorrt:"onnx","onnx-py":"onnx",pytorch:"pt",openvino:"openvino"},Jp={onnx:"onnx",coreml:"coreml",openvino:"openvino",tflite:"tflite",pytorch:"pt"},Xp={coreml:"coreml_inference.py",pytorch:"pytorch_inference.py",openvino:"openvino_inference.py"};function em(i,s){return i==="node"?"onnx":{coreml:"coreml",openvino:"openvino",pytorch:"pytorch","onnx-py":"onnx",cpu:"onnx"}[s]??s}function Tu(i,s){return i==="node"?oo[s]??"onnx":{coreml:"coreml",openvino:"openvino",pytorch:"pt","onnx-py":"onnx",cpu:"onnx"}[s]??"onnx"}function Ru(i,s){return!i||i==="auto"?"auto":em(i,s??"cpu")}function Bu(i){return oo[i]??"onnx"}function qu(i){return Jp[i]}function Ou(i){return Xp[i]}function zu(i){return i==="coreml"||i==="pytorch"||i==="openvino"}async function Lu(i,s){const n=performance.now();try{return{output:s!==void 0?await tm(i(),s):await i(),durationMs:on(performance.now()-n),ok:!0}}catch(d){return{output:void 0,durationMs:on(performance.now()-n),ok:!1,error:Uo(d)}}}function on(i){return Math.round(i*100)/100}function tm(i,s){return new Promise((n,d)=>{const p=setTimeout(()=>d(new Error(`Inference timeout after ${s}ms`)),s);i.then(u=>{clearTimeout(p),n(u)}).catch(u=>{clearTimeout(p),d(u)})})}const _u=[{id:"person",name:"Person"},{id:"bicycle",name:"Bicycle"},{id:"car",name:"Car"},{id:"motorcycle",name:"Motorcycle"},{id:"airplane",name:"Airplane"},{id:"bus",name:"Bus"},{id:"train",name:"Train"},{id:"truck",name:"Truck"},{id:"boat",name:"Boat"},{id:"traffic light",name:"Traffic Light"},{id:"fire hydrant",name:"Fire Hydrant"},{id:"stop sign",name:"Stop Sign"},{id:"parking meter",name:"Parking Meter"},{id:"bench",name:"Bench"},{id:"bird",name:"Bird"},{id:"cat",name:"Cat"},{id:"dog",name:"Dog"},{id:"horse",name:"Horse"},{id:"sheep",name:"Sheep"},{id:"cow",name:"Cow"},{id:"elephant",name:"Elephant"},{id:"bear",name:"Bear"},{id:"zebra",name:"Zebra"},{id:"giraffe",name:"Giraffe"},{id:"backpack",name:"Backpack"},{id:"umbrella",name:"Umbrella"},{id:"handbag",name:"Handbag"},{id:"tie",name:"Tie"},{id:"suitcase",name:"Suitcase"},{id:"frisbee",name:"Frisbee"},{id:"skis",name:"Skis"},{id:"snowboard",name:"Snowboard"},{id:"sports ball",name:"Sports Ball"},{id:"kite",name:"Kite"},{id:"baseball bat",name:"Baseball Bat"},{id:"baseball glove",name:"Baseball Glove"},{id:"skateboard",name:"Skateboard"},{id:"surfboard",name:"Surfboard"},{id:"tennis racket",name:"Tennis Racket"},{id:"bottle",name:"Bottle"},{id:"wine glass",name:"Wine Glass"},{id:"cup",name:"Cup"},{id:"fork",name:"Fork"},{id:"knife",name:"Knife"},{id:"spoon",name:"Spoon"},{id:"bowl",name:"Bowl"},{id:"banana",name:"Banana"},{id:"apple",name:"Apple"},{id:"sandwich",name:"Sandwich"},{id:"orange",name:"Orange"},{id:"broccoli",name:"Broccoli"},{id:"carrot",name:"Carrot"},{id:"hot dog",name:"Hot Dog"},{id:"pizza",name:"Pizza"},{id:"donut",name:"Donut"},{id:"cake",name:"Cake"},{id:"chair",name:"Chair"},{id:"couch",name:"Couch"},{id:"potted plant",name:"Potted Plant"},{id:"bed",name:"Bed"},{id:"dining table",name:"Dining Table"},{id:"toilet",name:"Toilet"},{id:"tv",name:"TV"},{id:"laptop",name:"Laptop"},{id:"mouse",name:"Mouse"},{id:"remote",name:"Remote"},{id:"keyboard",name:"Keyboard"},{id:"cell phone",name:"Cell Phone"},{id:"microwave",name:"Microwave"},{id:"oven",name:"Oven"},{id:"toaster",name:"Toaster"},{id:"sink",name:"Sink"},{id:"refrigerator",name:"Refrigerator"},{id:"book",name:"Book"},{id:"clock",name:"Clock"},{id:"vase",name:"Vase"},{id:"scissors",name:"Scissors"},{id:"teddy bear",name:"Teddy Bear"},{id:"hair drier",name:"Hair Drier"},{id:"toothbrush",name:"Toothbrush"}],Uu=[{id:"person",name:"Person"},{id:"vehicle",name:"Vehicle"},{id:"animal",name:"Animal"}],Fu={mapping:{person:"person",bicycle:"vehicle",car:"vehicle",motorcycle:"vehicle",airplane:"vehicle",bus:"vehicle",train:"vehicle",truck:"vehicle",boat:"vehicle",bird:"animal",cat:"animal",dog:"animal",horse:"animal",sheep:"animal",cow:"animal",elephant:"animal",bear:"animal",zebra:"animal",giraffe:"animal"},preserveOriginal:!1},Hu={camera:{type:"camera",label:"Camera",icon:"camera"}};class pe{schema;data;persistFn;constructor(s,n,d){this.schema=s,this.data=n,this.persistFn=d}static fromSchema(s,n,d={},p){const u=s.safeParse(d);if(u.success)return new pe(s,u.data,n);const v=new Set;for(const A of u.error.issues){const k=A.path[0];typeof k=="string"&&v.add(k)}const m={...d};for(const A of v)delete m[A];const y=s.safeParse(m);if(p?.({droppedKeys:[...v],issues:u.error.issues}),y.success)return n(y.data).catch(()=>{}),new pe(s,y.data,n);const I=s.parse({});return new pe(s,I,n)}get values(){return this.data}get(s){return this.data[s]}async set(s,n){const d=this.schema.parse({...this.data,[s]:n});this.data=d,await this.persistFn(this.data)}async setAll(s){const n=this.schema.parse({...this.data,...s});this.data=n,await this.persistFn(this.data)}async deleteKey(s){const{[s]:n,...d}=this.data,p=this.schema.parse(d);this.data=p,await this.persistFn(this.data)}entries(){const s=this.schema.shape;return Object.entries(s).map(([n,d])=>({key:n,schema:d,value:this.data[n],description:d.description}))}}class Ut{writer;pendingWrites=new Set;slices;schemas=new Map;listeners=new Set;capListeners=new Map;constructor(s,n){this.writer=n,this.slices=new Map;for(const[d,p]of Object.entries(s))p&&typeof p=="object"&&!Array.isArray(p)&&this.slices.set(d,{...p})}static fromInitial(s,n){return new Ut(s,n)}installCapSchema(s,n){const d=this.schemas.get(s);if(d){if(d!==n)throw new Error(`[DeviceRuntimeState] capability "${s}" registered a different runtime-state schema; each cap must declare ONE shape across every provider`);return}this.schemas.set(s,n);const p=this.slices.get(s);if(p){const u=n.safeParse(p);u.success?this.slices.set(s,u.data):this.slices.delete(s)}}getCapState(s){const n=this.slices.get(s);if(n)return Object.freeze({...n})}getCapField(s,n){return this.slices.get(s)?.[n]}setCapState(s,n){this.applyCapWrite(s,n,!1)}patchCapState(s,n){this.applyCapWrite(s,n,!0)}applyCapWrite(s,n,d){const p=this.schemas.get(s);if(!p)throw new Error(`[DeviceRuntimeState] no schema registered for cap "${s}" — did the device register it via ctx.registerNativeCap before writing?`);const u=this.slices.get(s)??{},v=d?{...u,...n}:{...n},m=p.parse(v);if(am(u,m))return;this.slices.set(s,m),this.fireListeners([s]);const y=this.writer(s,{...m}).catch(()=>{});this.pendingWrites.add(y),y.finally(()=>{this.pendingWrites.delete(y)})}fireListeners(s){const n=this.snapshot();for(const d of this.listeners)try{d(s,n)}catch{}for(const d of s){const p=this.capListeners.get(d);if(!p)continue;const u=this.getCapState(d);for(const v of p)try{v(u)}catch{}}}subscribe(s){return this.listeners.add(s),()=>{this.listeners.delete(s)}}subscribeCap(s,n){let d=this.capListeners.get(s);d||(d=new Set,this.capListeners.set(s,d));const p=u=>{n(u)};return d.add(p),()=>{const u=this.capListeners.get(s);u&&(u.delete(p),u.size===0&&this.capListeners.delete(s))}}snapshot(){const s={};for(const[n,d]of this.slices)s[n]=Object.freeze({...d});return Object.freeze(s)}async flush(){if(this.pendingWrites.size===0)return;const s=[...this.pendingWrites];await Promise.allSettled(s)}}function am(i,s){const n=Object.keys(i),d=Object.keys(s);if(n.length!==d.length)return!1;for(const p of n)if(i[p]!==s[p])return!1;return!0}const ot="lastFetchedAt";function $u(i){const{runtimeState:s,cap:n,ownDeviceId:d,refresh:p,staleMs:u,empty:v}=i,m=async()=>{const A=s.getCapState(n.name),k=typeof A?.[ot]=="number"?A[ot]:0;(!A||Date.now()-k>u)&&await p()},y=()=>{const A=s.getCapState(n.name);if(!A)return v();const{[ot]:k,...C}=A;return C};return{ensureFresh:m,getStatus:async({deviceId:A})=>{if(A!==d)throw new Error(`${n.name}: deviceId mismatch, expected ${d}, got ${A}`);return await m(),y()}}}const nm={audioMetrics:ln,battery:pn,brightness:mn,cameraStreams:gn,deviceDiscovery:hn,deviceStatus:Tt,doorbell:vn,featureProbe:Rt,motion:fn,motionTrigger:In,motionZones:Dn,nativeObjectDetection:xn,privacyMask:Rn,ptzAutotrack:Bn,streamParams:qn,switch:On,zoneAnalytics:zn,zoneRules:Ln,zones:yn};class Wu{id;stableId;type;name;parentDeviceId;role;get online(){return this.runtimeState.getCapState("device-status")?.online??!1}set online(s){this.markOnline(s)}get state(){if(!this._stateProxyCache){const s={},n={get:(d,p)=>{const u=p;if(u in s)return s[u];const v=nm[u];if(!v)return;const m=this.sliceProxy(v);return s[u]=m,m}};this._stateProxyCache=new Proxy(s,n)}return this._stateProxyCache}_stateProxyCache;config;runtimeState;ctx;location;disabled;constructor(s,n,d){if(this.ctx=s,this.id=s.id,this.stableId=s.stableId,this.type=d.type,!s.deviceMeta)throw new Error(`BaseDevice constructor: ctx.deviceMeta is required (id=${s.id} stableId=${s.stableId})`);this.name=s.deviceMeta.name,this.location=s.deviceMeta.location,this.disabled=s.deviceMeta.disabled,this.role=d.role,this.parentDeviceId=s.parentDeviceId;const p=s.persistedConfig??{};this.config=pe.fromSchema(n,A=>s.persistConfig(A),p,({droppedKeys:A,issues:k})=>{s.logger.warn("Device config recovery: dropping invalid persisted fields",{tags:{deviceId:s.id,stableId:s.stableId},meta:{droppedKeys:[...A],firstIssue:k[0]?.message??null}})});let u=null;const v=async(A,k)=>{u||(u=s.fetchDevice(s.id)),await(await u).deviceState.setCapSlice({capName:A,slice:k})},m=s.initialRuntimeState??{};this.runtimeState=Ut.fromInitial(m,v),s.bindRuntimeState?.(this.runtimeState),s.registerNativeCap?.(Tt,{});const y={online:!1,lastChangedAt:Date.now()};this.runtimeState.setCapState("device-status",y),s.registerNativeCap?.(Rt,{});const I={flags:{},deviceType:null,model:null,channelCount:null,lastProbedAt:0,lastFetchedAt:0};this.runtimeState.setCapState("feature-probe",I)}async removeDevice(){}markOnline(s){if(this.online===s)return;const n={online:s,lastChangedAt:Date.now()};this.runtimeState.setCapState("device-status",n)}async refreshFeatures(){const n=this.ctx.api?.deviceManager?.registerDevice;if(n)try{await n.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(s){return this.runtimeState.getCapState(s.name)??null}setCapSlice(s,n){this.runtimeState.setCapState(s.name,n)}sliceProxy(s){const n={},d={get:(p,u)=>this.runtimeState.getCapState(s.name)?.[u],set:(p,u,v)=>(this.runtimeState.patchCapState(s.name,{[u]:v}),!0),has:(p,u)=>{const v=this.runtimeState.getCapState(s.name);return v?u in v:!1},ownKeys:()=>{const p=this.runtimeState.getCapState(s.name);return p?Object.keys(p):[]},getOwnPropertyDescriptor:(p,u)=>{const v=this.runtimeState.getCapState(s.name);if(!(!v||!(u in v)))return{configurable:!0,enumerable:!0,value:v[u]}}};return new Proxy(n,d)}getSettingsUISchema(){return{sections:[]}}async applySettingsPatch(s){await this.config.setAll(s)}async onProbe(){}async onActivate(){}async reprobe(){this._kernelReprobe?await this._kernelReprobe():await this.onProbe()}_kernelReprobe;getAccessoryChildren(){return[]}getProbeFlags(){return this.runtimeState.getCapState("feature-probe")?.flags??{}}hasProbed(){return(this.runtimeState.getCapState("feature-probe")?.lastProbedAt??0)>0}}function om(i,s){const n={};for(const d of i.config.entries())n[d.key]=d.value;return{id:i.id,stableId:i.stableId,addonId:s,type:String(i.type),name:i.name,parentDeviceId:i.parentDeviceId,online:i.online,features:[...i.features],config:n}}class Gu extends Op{async onInitialize(){return this.ctx.logger.info(`${this.providerName} Provider initialized`),[{capability:_n,provider:this}]}async onShutdown(){const s=await this.ctx.kernel.devices?.getAll()??[];for(const n of s)try{await this.ctx.kernel.devices?.decommission(n.id)}catch(d){this.ctx.logger.warn(`${this.providerName}: decommission failed`,{tags:{deviceId:n.id,stableId:n.stableId},meta:{error:d instanceof Error?d.message:String(d)}})}this.ctx.logger.info(`${this.providerName} Provider shut down`,{meta:{decommissionedCount:s.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(n=>({id:n.stableId,name:n.name,type:String(n.type)}))}async supportsDiscovery(){return!1}async discoverDevices(){return[]}async adoptDiscoveredDevice(s){throw new Error(`${this.providerName} provider does not support discovery-based adoption`)}async supportsManualCreation(){return!0}async getChildCreationSchema(s){return this.onGetCreationSchema(s.type)}async createDevice(s){const n=await this.onCreateDevice(s.type,s.config),d=this.deviceClasses[n.meta.type];if(!d)throw new Error(`${this.providerName} provider: no device class registered for type "${n.meta.type}" — add it to the deviceClasses map`);const p=this.generateStableId(n.meta.type,n.config),u=await this.ctx.kernel.devices.create(p,d,n.config,null,n.meta);if(n.onAfterCreate)try{await n.onAfterCreate(u)}catch(v){this.ctx.logger.warn("createDevice: onAfterCreate hook threw — device is already registered",{tags:{deviceId:u.id,stableId:p},meta:{error:v instanceof Error?v.message:String(v)}})}return this.toSummary(u)}generateStableId(s,n){return`${this.addonId}-${Date.now()}`}async testCreationField(s){return{status:"ok",labels:["probe not implemented"]}}async restoreDevices(s){await this.onRestoreDevices(s),s.length>0&&this.ctx.logger.info(`Restored ${s.length} ${this.providerName} device(s)`)}async onRestoreDevices(s){const n=new Set;for(const p of s){if(p.parentDeviceId!==null)continue;const u=this.deviceClasses[p.type];if(!u){this.ctx.logger.warn("No device class registered for restored type — skipping",{tags:{stableId:p.stableId},meta:{type:p.type}});continue}try{await this.ctx.kernel.devices.create(p.stableId,u,{}),n.add(p.id)}catch(v){this.ctx.logger.warn("Failed to restore device",{tags:{stableId:p.stableId},meta:{type:p.type,error:v instanceof Error?v.message:String(v)}})}}const d=s.filter(p=>p.parentDeviceId!==null);for(const p of d){const u=this.deviceClasses[p.type];if(u&&p.parentDeviceId!==null&&n.has(p.parentDeviceId))try{await this.ctx.kernel.devices.create(p.stableId,u,{},p.parentDeviceId),n.add(p.id)}catch(v){this.ctx.logger.warn("Failed to restore hub-adopted child",{tags:{stableId:p.stableId,parentDeviceId:p.parentDeviceId},meta:{type:p.type,error:v instanceof Error?v.message:String(v)}})}}}toSummary(s){return om(s,this.addonId)}}function me(i){return i.def}function Vu(i,s="Configuration",n="main"){const d=i.map(p=>sm(p.key,p.schema,p.description));return{sections:[{id:n,title:s,fields:d}]}}function sm(i,s,n){const d=De(s),p=lm(s),u=n??so(i),v={key:i,label:u,description:n,default:p};return d instanceof Ao?im(i,v):d instanceof Co?cm(d,v):d instanceof No?{...v,type:"boolean"}:d instanceof Po?dm(d,v):d instanceof Do||d instanceof Mo?{...v,type:"textarea",rows:6,isJson:!0}:{...v,type:"text"}}function im(i,s){const n=i.toLowerCase();return n.includes("password")||n.includes("secret")||n.includes("token")||n.includes("apikey")||n.includes("api_key")?{...s,type:"password",showToggle:!0}:{...s,type:"text"}}function cm(i,s){const n=i,d=n.minValue,p=n.maxValue,u=d!=null&&isFinite(d)?d:void 0,v=p!=null&&isFinite(p)?p:void 0,m=rm(i);return{...s,type:"number",...u!==void 0?{min:u}:{},...v!==void 0?{max:v}:{},...m!==void 0?{step:m}:{}}}function rm(i){const n=me(i).checks??[];for(const d of n)if(d._zod?.def?.check==="multiple_of"&&d._zod.def.value!==void 0)return d._zod.def.value}function dm(i,s){const n=i.options.map(p=>String(p));return{...s,type:"select",options:n.map(p=>({label:so(p),value:p}))}}function De(i){return i instanceof rn||i instanceof Eo||i instanceof xo?De(me(i).innerType):i}function lm(i){if(i instanceof rn)return me(i).defaultValue}function so(i){return i.replace(/([A-Z])/g," $1").replace(/[_-]/g," ").replace(/^\w/,s=>s.toUpperCase()).trim()}const pm="device.state-changed";function io(i){const s=new Map,n=new Map;let d=null;const p=(m,y)=>`${m}:${y}`,u=()=>{d||i.live?.onEvent&&(d=i.live.onEvent.subscribe({category:pm},{onData:m=>{const y=m.data;if(!y||typeof y.deviceId!="number"||typeof y.capName!="string")return;const I=p(y.deviceId,y.capName);s.set(I,y.slice);const A=n.get(I);if(A)for(const k of A)try{k(y.slice)}catch{}}}))},v=()=>{d&&(n.size>0||(d.unsubscribe(),d=null))};return{read(m,y){return s.get(p(m,y))},async refresh(m,y){const I=await i.deviceState.getCapSlice.query({deviceId:m,capName:y}),A=p(m,y);s.set(A,I??void 0);const k=n.get(A);if(k)for(const C of k)try{C(I??void 0)}catch{}},watch(m,y,I){const A=p(m,y);let k=n.get(A);return k||(k=new Set,n.set(A,k)),k.add(I),u(),()=>{k.delete(I),k.size===0&&n.delete(A),v()}},async write(m,y,I){await i.deviceState.setCapSlice.mutate({deviceId:m,capName:y,slice:I})}}}function mm(i,s,n){const d=(p,u)=>`${p}:${u}`;return{read(p,u){return i.get(p)?.get(u)},async refresh(){},watch(p,u,v){const m=d(p,u);let y=s.get(m);return y||(y=new Set,s.set(m,y)),y.add(v),()=>{y.delete(v),y.size===0&&s.delete(m)}},async write(p,u,v){if(!n)throw new Error("createMirrorSource: write requires an api reference — pass it as the third argument when constructing the source");await n.deviceState.setCapSlice.mutate({deviceId:p,capName:u,slice:v})}}}function x(i,s,n){const d=um(i)?i:io(i);return{get value(){return d.read(s,n)},refresh(){return d.refresh(s,n)},subscribe(p){const u=d.watch(s,n,v=>{try{p(v)}catch{}});try{p(d.read(s,n))}catch{}return d.read(s,n)===void 0&&d.refresh(s,n).catch(()=>{}),u},async set(p){await d.write(s,n,p)},async patch(p){const v={...d.read(s,n)??{},...p};await d.write(s,n,v)}}}function um(i){return typeof i.read=="function"&&typeof i.watch=="function"}function gm(i,s,n){const d=i,p=n?.stateSource??io(i);function u(r,U){const F=typeof r=="object"&&r!==null?r:{};return U!==void 0?{...F,deviceId:s.deviceId,nodeId:U}:{...F,deviceId:s.deviceId}}function v(r,U,F,V,ie){const Se=d[r]?.[U];if(!Se)throw new Error(`DeviceProxy: api has no '${r}.${U}'`);const ce=Se;return F==="mutation"?ce.mutate(V):F==="subscription"?ce.subscribe(V,ie):ce.query(V)}function m(r,U,F,V,ie,Se){const ce=s.entries.find(bo=>bo.capName===r);return v(U,F,V,u(ie,ce?.providerNodeId),Se)}function y(r,U,F,V,ie){return v(r,U,F,u(V,void 0),ie)}const I={getStatus:r=>m("accessories","accessories","getStatus","query",r)},A={resolveDeviceSettings:r=>m("audio-analysis","audioAnalysis","resolveDeviceSettings","query",r),getDeviceSettingsContribution:r=>m("audio-analysis","audioAnalysis","getDeviceSettingsContribution","query",r),getDeviceLiveContribution:r=>m("audio-analysis","audioAnalysis","getDeviceLiveContribution","query",r),applyDeviceSettingsPatch:r=>m("audio-analysis","audioAnalysis","applyDeviceSettingsPatch","mutation",r)},k={getCurrentSnapshot:r=>m("audio-metrics","audioMetrics","getCurrentSnapshot","query",r),getHistory:r=>m("audio-metrics","audioMetrics","getHistory","query",r)},C={getStatus:r=>m("battery","battery","getStatus","query",r)},E={setBrightness:r=>m("brightness","brightness","setBrightness","mutation",r),getStatus:r=>m("brightness","brightness","getStatus","query",r)},B={getCredentials:r=>m("camera-credentials","cameraCredentials","getCredentials","query",r),getStatus:r=>m("camera-credentials","cameraCredentials","getStatus","query",r)},P={getCameraStreams:r=>m("camera-streams","cameraStreams","getCameraStreams","query",r),getBrokerStreams:r=>m("camera-streams","cameraStreams","getBrokerStreams","query",r),getRtspEntries:r=>m("camera-streams","cameraStreams","getRtspEntries","query",r)},D={getDeviceSettingsContribution:r=>m("detection-pipeline","detectionPipeline","getDeviceSettingsContribution","query",r),getDeviceLiveContribution:r=>m("detection-pipeline","detectionPipeline","getDeviceLiveContribution","query",r),applyDeviceSettingsPatch:r=>m("detection-pipeline","detectionPipeline","applyDeviceSettingsPatch","mutation",r)},q={listDiscovered:r=>m("device-discovery","deviceDiscovery","listDiscovered","query",r),refreshDiscovery:r=>m("device-discovery","deviceDiscovery","refreshDiscovery","mutation",r),adoptDevice:r=>m("device-discovery","deviceDiscovery","adoptDevice","mutation",r),releaseDevice:r=>m("device-discovery","deviceDiscovery","releaseDevice","mutation",r),getStatus:r=>m("device-discovery","deviceDiscovery","getStatus","query",r)},Ft={getStreamSources:r=>m("device-ops","deviceOps","getStreamSources","query",r),getConfigEntries:r=>m("device-ops","deviceOps","getConfigEntries","query",r),setConfig:r=>m("device-ops","deviceOps","setConfig","mutation",r),removeDevice:r=>m("device-ops","deviceOps","removeDevice","mutation",r),getSettingsSchema:r=>m("device-ops","deviceOps","getSettingsSchema","query",r)},Ht={getStatus:r=>m("device-status","deviceStatus","getStatus","query",r)},$t={getStatus:r=>m("doorbell","doorbell","getStatus","query",r)},Wt={getEvents:r=>m("events","events","getEvents","query",r),getEventThumbnail:r=>m("events","events","getEventThumbnail","query",r),getEventClipUrl:r=>m("events","events","getEventClipUrl","query",r)},Gt={getStatus:r=>m("feature-probe","featureProbe","getStatus","query",r)},Vt={startSession:r=>m("intercom","intercom","startSession","mutation",r),handleAnswer:r=>m("intercom","intercom","handleAnswer","mutation",r),stopSession:r=>m("intercom","intercom","stopSession","mutation",r),startTalkSession:r=>m("intercom","intercom","startTalkSession","mutation",r),pushTalkPcm:r=>m("intercom","intercom","pushTalkPcm","mutation",r),endTalkSession:r=>m("intercom","intercom","endTalkSession","mutation",r),getStatus:r=>m("intercom","intercom","getStatus","query",r)},Kt={isDetected:r=>m("motion","motion","isDetected","query",r),getStatus:r=>m("motion","motion","getStatus","query",r)},jt={analyze:r=>m("motion-detection","motionDetection","analyze","mutation",r),removeCamera:r=>m("motion-detection","motionDetection","removeCamera","mutation",r),reset:r=>m("motion-detection","motionDetection","reset","mutation",r),getDeviceSettingsContribution:r=>m("motion-detection","motionDetection","getDeviceSettingsContribution","query",r),getDeviceLiveContribution:r=>m("motion-detection","motionDetection","getDeviceLiveContribution","query",r),applyDeviceSettingsPatch:r=>m("motion-detection","motionDetection","applyDeviceSettingsPatch","mutation",r)},Zt={setMotionTrigger:r=>m("motion-trigger","motionTrigger","setMotionTrigger","mutation",r),getStatus:r=>m("motion-trigger","motionTrigger","getStatus","query",r)},Yt={getOptions:r=>m("motion-zones","motionZones","getOptions","query",r),setZone:r=>m("motion-zones","motionZones","setZone","mutation",r),getStatus:r=>m("motion-zones","motionZones","getStatus","query",r)},Qt={setEnabled:r=>m("native-object-detection","nativeObjectDetection","setEnabled","mutation",r),getStatus:r=>m("native-object-detection","nativeObjectDetection","getStatus","query",r)},Jt={setOverlay:r=>m("osd","osd","setOverlay","mutation",r),getStatus:r=>m("osd","osd","getStatus","query",r)},Xt={getActiveTracks:r=>m("pipeline-analytics","pipelineAnalytics","getActiveTracks","query",r),getTrack:r=>m("pipeline-analytics","pipelineAnalytics","getTrack","query",r),listTracks:r=>m("pipeline-analytics","pipelineAnalytics","listTracks","query",r),clearTracks:r=>m("pipeline-analytics","pipelineAnalytics","clearTracks","mutation",r),getMotionEvents:r=>m("pipeline-analytics","pipelineAnalytics","getMotionEvents","query",r),getObjectEvents:r=>m("pipeline-analytics","pipelineAnalytics","getObjectEvents","query",r),getAudioEvents:r=>m("pipeline-analytics","pipelineAnalytics","getAudioEvents","query",r),getEventMedia:r=>m("pipeline-analytics","pipelineAnalytics","getEventMedia","query",r),getTrackMedia:r=>m("pipeline-analytics","pipelineAnalytics","getTrackMedia","query",r),getDeviceSettingsContribution:r=>m("pipeline-analytics","pipelineAnalytics","getDeviceSettingsContribution","query",r),getDeviceLiveContribution:r=>m("pipeline-analytics","pipelineAnalytics","getDeviceLiveContribution","query",r),applyDeviceSettingsPatch:r=>m("pipeline-analytics","pipelineAnalytics","applyDeviceSettingsPatch","mutation",r)},ea={getOptions:r=>m("privacy-mask","privacyMask","getOptions","query",r),setMask:r=>m("privacy-mask","privacyMask","setMask","mutation",r),getStatus:r=>m("privacy-mask","privacyMask","getStatus","query",r)},ta={move:r=>m("ptz","ptz","move","mutation",r),continuousMove:r=>m("ptz","ptz","continuousMove","mutation",r),stop:r=>m("ptz","ptz","stop","mutation",r),getPresets:r=>m("ptz","ptz","getPresets","query",r),goToPreset:r=>m("ptz","ptz","goToPreset","mutation",r),savePreset:r=>m("ptz","ptz","savePreset","mutation",r),deletePreset:r=>m("ptz","ptz","deletePreset","mutation",r),getOptions:r=>m("ptz","ptz","getOptions","query",r),goHome:r=>m("ptz","ptz","goHome","mutation",r),getPosition:r=>m("ptz","ptz","getPosition","query",r),setAutofocus:r=>m("ptz","ptz","setAutofocus","mutation",r),getStatus:r=>m("ptz","ptz","getStatus","query",r)},aa={getStatus:r=>m("ptz-autotrack","ptzAutotrack","getStatus","query",r),setEnabled:r=>m("ptz-autotrack","ptzAutotrack","setEnabled","mutation",r),getSettings:r=>m("ptz-autotrack","ptzAutotrack","getSettings","query",r),setSettings:r=>m("ptz-autotrack","ptzAutotrack","setSettings","mutation",r)},na={reboot:r=>m("reboot","reboot","reboot","mutation",r)},oa={getSegments:r=>m("recording","recording","getSegments","query",r),getPlaybackUrl:r=>m("recording","recording","getPlaybackUrl","query",r),getThumbnailAt:r=>m("recording","recording","getThumbnailAt","query",r)},sa={getSnapshot:r=>m("snapshot","snapshot","getSnapshot","query",r),invalidateCache:r=>m("snapshot","snapshot","invalidateCache","mutation",r),getStatus:r=>m("snapshot","snapshot","getStatus","query",r),getDeviceSettingsContribution:r=>m("snapshot","snapshot","getDeviceSettingsContribution","query",r),getDeviceLiveContribution:r=>m("snapshot","snapshot","getDeviceLiveContribution","query",r),applyDeviceSettingsPatch:r=>m("snapshot","snapshot","applyDeviceSettingsPatch","mutation",r)},o={getCatalog:r=>m("stream-catalog","streamCatalog","getCatalog","query",r)},W={getOptions:r=>m("stream-params","streamParams","getOptions","query",r),setProfile:r=>m("stream-params","streamParams","setProfile","mutation",r),getConfigSchema:r=>m("stream-params","streamParams","getConfigSchema","query",r),getStatus:r=>m("stream-params","streamParams","getStatus","query",r)},ve={setState:r=>m("switch","switch","setState","mutation",r),getStatus:r=>m("switch","switch","getStatus","query",r)},oe={listStreams:r=>m("webrtc-session","webrtcSession","listStreams","query",r),createSession:r=>m("webrtc-session","webrtcSession","createSession","mutation",r),handleOffer:r=>m("webrtc-session","webrtcSession","handleOffer","mutation",r),handleAnswer:r=>m("webrtc-session","webrtcSession","handleAnswer","mutation",r),addIceCandidate:r=>m("webrtc-session","webrtcSession","addIceCandidate","mutation",r),getIceCandidates:r=>m("webrtc-session","webrtcSession","getIceCandidates","query",r),closeSession:r=>m("webrtc-session","webrtcSession","closeSession","mutation",r),hasAdaptiveBitrate:r=>m("webrtc-session","webrtcSession","hasAdaptiveBitrate","query",r)},ze={getCurrentSnapshot:r=>m("zone-analytics","zoneAnalytics","getCurrentSnapshot","query",r),getZoneHistory:r=>m("zone-analytics","zoneAnalytics","getZoneHistory","query",r),getCameraHistory:r=>m("zone-analytics","zoneAnalytics","getCameraHistory","query",r),getUnzonedHistory:r=>m("zone-analytics","zoneAnalytics","getUnzonedHistory","query",r)},ye={listRules:r=>m("zone-rules","zoneRules","listRules","query",r),setRules:r=>m("zone-rules","zoneRules","setRules","mutation",r)},se={listZones:r=>m("zones","zones","listZones","query",r),addZone:r=>m("zones","zones","addZone","mutation",r),removeZone:r=>m("zones","zones","removeZone","mutation",r),updateZone:r=>m("zones","zones","updateZone","mutation",r)},co={getDeviceSettings:r=>y("addonSettings","getDeviceSettings","query",r),updateDeviceSettings:r=>y("addonSettings","updateDeviceSettings","mutation",r)},ro={getDeviceSettingsContribution:r=>y("cameraPipelineConfig","getDeviceSettingsContribution","query",r),getDeviceLiveContribution:r=>y("cameraPipelineConfig","getDeviceLiveContribution","query",r),applyDeviceSettingsPatch:r=>y("cameraPipelineConfig","applyDeviceSettingsPatch","mutation",r)},lo={getDeviceSettingsContribution:r=>y("deviceExport","getDeviceSettingsContribution","query",r),getDeviceLiveContribution:r=>y("deviceExport","getDeviceLiveContribution","query",r),applyDeviceSettingsPatch:r=>y("deviceExport","applyDeviceSettingsPatch","mutation",r)},po={loadConfig:r=>y("deviceManager","loadConfig","query",r),loadRuntimeState:r=>y("deviceManager","loadRuntimeState","query",r),loadMeta:r=>y("deviceManager","loadMeta","query",r),setName:r=>y("deviceManager","setName","mutation",r),setLocation:r=>y("deviceManager","setLocation","mutation",r),setMetadata:r=>y("deviceManager","setMetadata","mutation",r),setDisabled:r=>y("deviceManager","setDisabled","mutation",r),getDevice:r=>y("deviceManager","getDevice","query",r),getStreamSources:r=>y("deviceManager","getStreamSources","query",r),getConfigSchema:r=>y("deviceManager","getConfigSchema","query",r),getSettingsSchema:r=>y("deviceManager","getSettingsSchema","query",r),updateConfig:r=>y("deviceManager","updateConfig","mutation",r),enable:r=>y("deviceManager","enable","mutation",r),disable:r=>y("deviceManager","disable","mutation",r),remove:r=>y("deviceManager","remove","mutation",r),getStreamProfileMap:r=>y("deviceManager","getStreamProfileMap","query",r),setStreamProfileMap:r=>y("deviceManager","setStreamProfileMap","mutation",r),probeStreams:r=>y("deviceManager","probeStreams","mutation",r),getBindings:r=>y("deviceManager","getBindings","query",r),getAllBindings:r=>y("deviceManager","getAllBindings","query",r),setWrapperActive:r=>y("deviceManager","setWrapperActive","mutation",r),getDeviceSettingsAggregate:r=>y("deviceManager","getDeviceSettingsAggregate","query",r),getDeviceLiveInfoAggregate:r=>y("deviceManager","getDeviceLiveInfoAggregate","query",r),getDeviceAggregate:r=>y("deviceManager","getDeviceAggregate","query",r),updateDeviceField:r=>y("deviceManager","updateDeviceField","mutation",r),updateDeviceFieldsBatch:r=>y("deviceManager","updateDeviceFieldsBatch","mutation",r),testField:r=>y("deviceManager","testField","mutation",r),getDeviceStatusAggregate:r=>y("deviceManager","getDeviceStatusAggregate","query",r)},mo={getSnapshot:r=>y("deviceState","getSnapshot","query",r),getCapSlice:r=>y("deviceState","getCapSlice","query",r),setCapSlice:r=>y("deviceState","setCapSlice","mutation",r)},uo={getDeviceStats:r=>y("networkQuality","getDeviceStats","query",r),reportClientStats:r=>y("networkQuality","reportClientStats","mutation",r)},go={runPipeline:r=>y("pipelineExecutor","runPipeline","mutation",r),runPipelineBatch:r=>y("pipelineExecutor","runPipelineBatch","mutation",r)},ho={assignPipeline:r=>y("pipelineOrchestrator","assignPipeline","mutation",r),unassignPipeline:r=>y("pipelineOrchestrator","unassignPipeline","mutation",r),getPipelineAssignment:r=>y("pipelineOrchestrator","getPipelineAssignment","query",r),getCameraMetrics:r=>y("pipelineOrchestrator","getCameraMetrics","query",r),assignDecoder:r=>y("pipelineOrchestrator","assignDecoder","mutation",r),unassignDecoder:r=>y("pipelineOrchestrator","unassignDecoder","mutation",r),assignAudio:r=>y("pipelineOrchestrator","assignAudio","mutation",r),unassignAudio:r=>y("pipelineOrchestrator","unassignAudio","mutation",r),getAudioAssignment:r=>y("pipelineOrchestrator","getAudioAssignment","query",r),getAudioAssignments:r=>y("pipelineOrchestrator","getAudioAssignments","query",r),getDecoderAssignment:r=>y("pipelineOrchestrator","getDecoderAssignment","query",r),getCameraSettings:r=>y("pipelineOrchestrator","getCameraSettings","query",r),setCameraStepToggle:r=>y("pipelineOrchestrator","setCameraStepToggle","mutation",r),getCameraStepOverrides:r=>y("pipelineOrchestrator","getCameraStepOverrides","query",r),setCameraStepOverride:r=>y("pipelineOrchestrator","setCameraStepOverride","mutation",r),setCameraPipelineForAgent:r=>y("pipelineOrchestrator","setCameraPipelineForAgent","mutation",r),resolvePipeline:r=>y("pipelineOrchestrator","resolvePipeline","query",r),getDeviceSettingsContribution:r=>y("pipelineOrchestrator","getDeviceSettingsContribution","query",r),getDeviceLiveContribution:r=>y("pipelineOrchestrator","getDeviceLiveContribution","query",r),applyDeviceSettingsPatch:r=>y("pipelineOrchestrator","applyDeviceSettingsPatch","mutation",r)},vo={detachCamera:r=>y("pipelineRunner","detachCamera","mutation",r),getCameraMetrics:r=>y("pipelineRunner","getCameraMetrics","query",r)},yo={getPolicyStatus:r=>y("recordingEngine","getPolicyStatus","query",r)},So={supportsDevice:r=>y("snapshotProvider","supportsDevice","query",r),getSnapshot:r=>y("snapshotProvider","getSnapshot","query",r)},fo={publishCameraStream:r=>y("streamBroker","publishCameraStream","mutation",r),retractCameraStream:r=>y("streamBroker","retractCameraStream","mutation",r),assignProfile:r=>y("streamBroker","assignProfile","mutation",r),unassignProfile:r=>y("streamBroker","unassignProfile","mutation",r),restartProfile:r=>y("streamBroker","restartProfile","mutation",r),getDeviceSettingsContribution:r=>y("streamBroker","getDeviceSettingsContribution","query",r),getDeviceLiveContribution:r=>y("streamBroker","getDeviceLiveContribution","query",r),applyDeviceSettingsPatch:r=>y("streamBroker","applyDeviceSettingsPatch","mutation",r)};return{deviceId:s.deviceId,binding:s,state:{audioMetrics:x(p,s.deviceId,"audio-metrics"),battery:x(p,s.deviceId,"battery"),brightness:x(p,s.deviceId,"brightness"),cameraStreams:x(p,s.deviceId,"camera-streams"),deviceDiscovery:x(p,s.deviceId,"device-discovery"),deviceStatus:x(p,s.deviceId,"device-status"),doorbell:x(p,s.deviceId,"doorbell"),featureProbe:x(p,s.deviceId,"feature-probe"),motion:x(p,s.deviceId,"motion"),motionTrigger:x(p,s.deviceId,"motion-trigger"),motionZones:x(p,s.deviceId,"motion-zones"),nativeObjectDetection:x(p,s.deviceId,"native-object-detection"),privacyMask:x(p,s.deviceId,"privacy-mask"),ptzAutotrack:x(p,s.deviceId,"ptz-autotrack"),streamParams:x(p,s.deviceId,"stream-params"),switch:x(p,s.deviceId,"switch"),zoneAnalytics:x(p,s.deviceId,"zone-analytics"),zoneRules:x(p,s.deviceId,"zone-rules"),zones:x(p,s.deviceId,"zones")},accessories:I,audioAnalysis:A,audioMetrics:k,battery:C,brightness:E,cameraCredentials:B,cameraStreams:P,detectionPipeline:D,deviceDiscovery:q,deviceOps:Ft,deviceStatus:Ht,doorbell:$t,events:Wt,featureProbe:Gt,intercom:Vt,motion:Kt,motionDetection:jt,motionTrigger:Zt,motionZones:Yt,nativeObjectDetection:Qt,osd:Jt,pipelineAnalytics:Xt,privacyMask:ea,ptz:ta,ptzAutotrack:aa,reboot:na,recording:oa,snapshot:sa,streamCatalog:o,streamParams:W,switch:ve,webrtcSession:oe,zoneAnalytics:ze,zoneRules:ye,zones:se,addonSettings:co,cameraPipelineConfig:ro,deviceExport:lo,deviceManager:po,deviceState:mo,networkQuality:uo,pipelineExecutor:go,pipelineOrchestrator:ho,pipelineRunner:vo,recordingEngine:yo,snapshotProvider:So,streamBroker:fo}}function Ku(i,s,n,d,p){if(n.length===0||s.length===0)return{passed:i,excluded:[]};const u=n.filter(C=>C.enabled!==!1),v=u.filter(C=>C.mode==="include"),m=u.filter(C=>C.mode==="exclude"),y=v.length>0,I=new Map(s.map(C=>[C.id,C])),A=[],k=[];for(const C of i){const E=d(C),B=p?.(C),P=v.some(q=>sn(q,E,B,I)),D=m.some(q=>sn(q,E,B,I));y?P&&!D?A.push(C):k.push(C):D?k.push(C):A.push(C)}return{passed:A,excluded:k}}function sn(i,s,n,d){if(i.classFilter&&i.classFilter.length>0&&n!==void 0&&!i.classFilter.includes(n))return!1;for(const p of i.zoneIds){const u=d.get(p);if(u&&hm(s,u.polygon))return!0}return!1}function hm(i,s){if(s.length<3)return!1;let n=!1;const{x:d,y:p}=i;for(let u=0,v=s.length-1;u<s.length;v=u++){const m=s[u],y=s[v];m.y>p!=y.y>p&&d<(y.x-m.x)*(p-m.y)/(y.y-m.y||Number.EPSILON)+m.x&&(n=!n)}return n}function ju(i){const s=i;function n(o,W,ve,oe,ze){const ye=s[o]?.[W];if(!ye)throw new Error(`SystemProxy: api has no '${o}.${W}'`);const se=ye;return ve==="mutation"?se.mutate(oe):ve==="subscription"?se.subscribe(oe,ze):se.query(oe)}return{addonPages:{listPages:o=>n("addonPages","listPages","query",o)},addons:{list:o=>n("addons","list","query",o),getLogs:o=>n("addons","getLogs","query",o),listPackages:o=>n("addons","listPackages","query",o),installPackage:o=>n("addons","installPackage","mutation",o),installFromWorkspace:o=>n("addons","installFromWorkspace","mutation",o),isWorkspaceAvailable:o=>n("addons","isWorkspaceAvailable","query",o),listWorkspacePackages:o=>n("addons","listWorkspacePackages","query",o),uninstallPackage:o=>n("addons","uninstallPackage","mutation",o),reloadPackages:o=>n("addons","reloadPackages","mutation",o),searchAvailable:o=>n("addons","searchAvailable","query",o),listUpdates:o=>n("addons","listUpdates","query",o),updatePackage:o=>n("addons","updatePackage","mutation",o),rollbackPackage:o=>n("addons","rollbackPackage","mutation",o),forceRefresh:o=>n("addons","forceRefresh","mutation",o),restartServer:o=>n("addons","restartServer","mutation",o),getLastRestart:o=>n("addons","getLastRestart","query",o),listFrameworkPackages:o=>n("addons","listFrameworkPackages","query",o),listCapabilityProviders:o=>n("addons","listCapabilityProviders","query",o),setCapabilityProviderEnabled:o=>n("addons","setCapabilityProviderEnabled","mutation",o),updateFrameworkPackage:o=>n("addons","updateFrameworkPackage","mutation",o),startBulkUpdate:o=>n("addons","startBulkUpdate","mutation",o),getBulkUpdateState:o=>n("addons","getBulkUpdateState","query",o),cancelBulkUpdate:o=>n("addons","cancelBulkUpdate","mutation",o),listActiveBulkUpdates:o=>n("addons","listActiveBulkUpdates","query",o),getVersions:o=>n("addons","getVersions","query",o),restartAddon:o=>n("addons","restartAddon","mutation",o),retryLoad:o=>n("addons","retryLoad","mutation",o),getAutoUpdateSettings:o=>n("addons","getAutoUpdateSettings","query",o),setAutoUpdateSettings:o=>n("addons","setAutoUpdateSettings","mutation",o),getAddonAutoUpdate:o=>n("addons","getAddonAutoUpdate","query",o),setAddonAutoUpdate:o=>n("addons","setAddonAutoUpdate","mutation",o),applyAutoUpdateToAll:o=>n("addons","applyAutoUpdateToAll","mutation",o),custom:o=>n("addons","custom","mutation",o),onAddonLogs:(o,W)=>n("addons","onAddonLogs","subscription",o,W)},addonSettings:{getGlobalSettings:o=>n("addonSettings","getGlobalSettings","query",o),updateGlobalSettings:o=>n("addonSettings","updateGlobalSettings","mutation",o)},addonWidgets:{listWidgets:o=>n("addonWidgets","listWidgets","query",o)},alerts:{emit:o=>n("alerts","emit","mutation",o),update:o=>n("alerts","update","mutation",o),list:o=>n("alerts","list","query",o),getUnreadCount:o=>n("alerts","getUnreadCount","query",o),markRead:o=>n("alerts","markRead","mutation",o),markAllRead:o=>n("alerts","markAllRead","mutation",o),dismiss:o=>n("alerts","dismiss","mutation",o)},audioAnalyzer:{analyseChunk:o=>n("audioAnalyzer","analyseChunk","mutation",o),classify:o=>n("audioAnalyzer","classify","query",o),isReady:o=>n("audioAnalyzer","isReady","query",o),dispose:o=>n("audioAnalyzer","dispose","mutation",o),reprobeAudioEngine:o=>n("audioAnalyzer","reprobeAudioEngine","mutation",o)},audioCodec:{listSupportedCodecs:o=>n("audioCodec","listSupportedCodecs","query",o),canHandle:o=>n("audioCodec","canHandle","query",o),createDecodeSession:o=>n("audioCodec","createDecodeSession","mutation",o),createEncodeSession:o=>n("audioCodec","createEncodeSession","mutation",o),closeSession:o=>n("audioCodec","closeSession","mutation",o),pushEncodedFrame:o=>n("audioCodec","pushEncodedFrame","mutation",o),pullPcm:o=>n("audioCodec","pullPcm","query",o),pushPcm:o=>n("audioCodec","pushPcm","mutation",o),pullEncoded:o=>n("audioCodec","pullEncoded","query",o),flushEncode:o=>n("audioCodec","flushEncode","mutation",o),listActiveSessions:o=>n("audioCodec","listActiveSessions","query",o)},backup:{listDestinations:o=>n("backup","listDestinations","query",o),trigger:o=>n("backup","trigger","mutation",o),list:o=>n("backup","list","query",o),listLocations:o=>n("backup","listLocations","query",o),getEntries:o=>n("backup","getEntries","query",o),restore:o=>n("backup","restore","mutation",o),delete:o=>n("backup","delete","mutation",o),listArchives:o=>n("backup","listArchives","query",o),upsertDestinationPolicy:o=>n("backup","upsertDestinationPolicy","mutation",o),previewSchedule:o=>n("backup","previewSchedule","query",o)},decoder:{supportsCodec:o=>n("decoder","supportsCodec","query",o),getInfo:o=>n("decoder","getInfo","query",o),createSession:o=>n("decoder","createSession","query",o),destroySession:o=>n("decoder","destroySession","query",o),pushPacket:o=>n("decoder","pushPacket","query",o),openStream:o=>n("decoder","openStream","query",o),pullFrames:o=>n("decoder","pullFrames","query",o),pullHandles:o=>n("decoder","pullHandles","query",o),getFrame:o=>n("decoder","getFrame","query",o),getShmStats:o=>n("decoder","getShmStats","query",o),updateConfig:o=>n("decoder","updateConfig","query",o),getStats:o=>n("decoder","getStats","query",o),listActiveSessions:o=>n("decoder","listActiveSessions","query",o),reprobeHwaccel:o=>n("decoder","reprobeHwaccel","mutation",o)},deviceExport:{getStatus:o=>n("deviceExport","getStatus","query",o),listSupportedDeviceKinds:o=>n("deviceExport","listSupportedDeviceKinds","query",o),listExposedDevices:o=>n("deviceExport","listExposedDevices","query",o),exposeDevice:o=>n("deviceExport","exposeDevice","mutation",o),unexposeDevice:o=>n("deviceExport","unexposeDevice","mutation",o)},deviceManager:{allocateDeviceId:o=>n("deviceManager","allocateDeviceId","mutation",o),registerDevice:o=>n("deviceManager","registerDevice","mutation",o),removeDevice:o=>n("deviceManager","removeDevice","mutation",o),persistConfig:o=>n("deviceManager","persistConfig","mutation",o),listLocations:o=>n("deviceManager","listLocations","query",o),addLocation:o=>n("deviceManager","addLocation","mutation",o),removeLocation:o=>n("deviceManager","removeLocation","mutation",o),listPersistedByAddon:o=>n("deviceManager","listPersistedByAddon","query",o),listAll:o=>n("deviceManager","listAll","query",o),getChildren:o=>n("deviceManager","getChildren","query",o),listWrappersForCap:o=>n("deviceManager","listWrappersForCap","query",o),listBindableCapsForDeviceType:o=>n("deviceManager","listBindableCapsForDeviceType","query",o),discoverDevices:o=>n("deviceManager","discoverDevices","mutation",o),adoptDevice:o=>n("deviceManager","adoptDevice","mutation",o),getCreationSchema:o=>n("deviceManager","getCreationSchema","query",o),createDevice:o=>n("deviceManager","createDevice","mutation",o),testCreationField:o=>n("deviceManager","testCreationField","mutation",o)},deviceProvider:{start:o=>n("deviceProvider","start","mutation",o),stop:o=>n("deviceProvider","stop","mutation",o),getStatus:o=>n("deviceProvider","getStatus","query",o),getDevices:o=>n("deviceProvider","getDevices","query",o),supportsDiscovery:o=>n("deviceProvider","supportsDiscovery","query",o),discoverDevices:o=>n("deviceProvider","discoverDevices","mutation",o),adoptDiscoveredDevice:o=>n("deviceProvider","adoptDiscoveredDevice","mutation",o),supportsManualCreation:o=>n("deviceProvider","supportsManualCreation","query",o),getChildCreationSchema:o=>n("deviceProvider","getChildCreationSchema","query",o),createDevice:o=>n("deviceProvider","createDevice","mutation",o),testCreationField:o=>n("deviceProvider","testCreationField","mutation",o)},deviceState:{getAllSnapshots:o=>n("deviceState","getAllSnapshots","query",o)},integrations:{list:o=>n("integrations","list","query",o),get:o=>n("integrations","get","query",o),getByAddonId:o=>n("integrations","getByAddonId","query",o),create:o=>n("integrations","create","mutation",o),update:o=>n("integrations","update","mutation",o),delete:o=>n("integrations","delete","mutation",o),getSettings:o=>n("integrations","getSettings","query",o),setSettings:o=>n("integrations","setSettings","mutation",o),getAvailableTypes:o=>n("integrations","getAvailableTypes","query",o),testConnection:o=>n("integrations","testConnection","mutation",o)},localNetwork:{list:o=>n("localNetwork","list","query",o),getPreferred:o=>n("localNetwork","getPreferred","query",o),getConnectionEndpoints:o=>n("localNetwork","getConnectionEndpoints","query",o),getAllowedAddresses:o=>n("localNetwork","getAllowedAddresses","query",o),setAllowedAddresses:o=>n("localNetwork","setAllowedAddresses","mutation",o),resetAllowlistToBestMatch:o=>n("localNetwork","resetAllowlistToBestMatch","mutation",o)},meshNetwork:{getStatus:o=>n("meshNetwork","getStatus","query",o),join:o=>n("meshNetwork","join","mutation",o),startLogin:o=>n("meshNetwork","startLogin","mutation",o),leave:o=>n("meshNetwork","leave","mutation",o),logout:o=>n("meshNetwork","logout","mutation",o),listPeers:o=>n("meshNetwork","listPeers","query",o),testConnection:o=>n("meshNetwork","testConnection","mutation",o)},metricsProvider:{collectSnapshot:o=>n("metricsProvider","collectSnapshot","query",o),getCached:o=>n("metricsProvider","getCached","query",o),getCurrent:o=>n("metricsProvider","getCurrent","query",o),getDiskSpace:o=>n("metricsProvider","getDiskSpace","query",o),getGpuInfo:o=>n("metricsProvider","getGpuInfo","query",o),getCpuTemperature:o=>n("metricsProvider","getCpuTemperature","query",o),getProcessStats:o=>n("metricsProvider","getProcessStats","query",o),listAddonInstances:o=>n("metricsProvider","listAddonInstances","query",o),getAddonStats:o=>n("metricsProvider","getAddonStats","query",o),listNodeProcesses:o=>n("metricsProvider","listNodeProcesses","query",o),killProcess:o=>n("metricsProvider","killProcess","mutation",o)},mqttBroker:{listBrokers:o=>n("mqttBroker","listBrokers","query",o),getBrokerConfig:o=>n("mqttBroker","getBrokerConfig","query",o),addBroker:o=>n("mqttBroker","addBroker","mutation",o),removeBroker:o=>n("mqttBroker","removeBroker","mutation",o),testConnection:o=>n("mqttBroker","testConnection","mutation",o),startEmbeddedBroker:o=>n("mqttBroker","startEmbeddedBroker","mutation",o),stopEmbeddedBroker:o=>n("mqttBroker","stopEmbeddedBroker","mutation",o),getStatus:o=>n("mqttBroker","getStatus","query",o)},networkAccess:{start:o=>n("networkAccess","start","mutation",o),stop:o=>n("networkAccess","stop","mutation",o),getEndpoint:o=>n("networkAccess","getEndpoint","query",o),getStatus:o=>n("networkAccess","getStatus","query",o),listEndpoints:o=>n("networkAccess","listEndpoints","query",o)},networkQuality:{getAllStats:o=>n("networkQuality","getAllStats","query",o)},nodes:{topology:o=>n("nodes","topology","query",o),deployAddon:o=>n("nodes","deployAddon","mutation",o),undeployAddon:o=>n("nodes","undeployAddon","mutation",o),restartAddon:o=>n("nodes","restartAddon","mutation",o),restartProcess:o=>n("nodes","restartProcess","mutation",o),restartNode:o=>n("nodes","restartNode","mutation",o),shutdownNode:o=>n("nodes","shutdownNode","mutation",o),renameNode:o=>n("nodes","renameNode","mutation",o),clusterAddonStatus:o=>n("nodes","clusterAddonStatus","query",o),getCapUsageGraph:o=>n("nodes","getCapUsageGraph","query",o),getNodeAddons:o=>n("nodes","getNodeAddons","query",o),setProcessLogLevel:o=>n("nodes","setProcessLogLevel","mutation",o),executeQuery:o=>n("nodes","executeQuery","mutation",o)},notificationOutput:{send:o=>n("notificationOutput","send","mutation",o),sendTest:o=>n("notificationOutput","sendTest","mutation",o)},pipelineExecutor:{getAvailableEngines:o=>n("pipelineExecutor","getAvailableEngines","query",o),getSelectedEngine:o=>n("pipelineExecutor","getSelectedEngine","query",o),getDefaultSteps:o=>n("pipelineExecutor","getDefaultSteps","query",o),reprobeEngine:o=>n("pipelineExecutor","reprobeEngine","mutation",o),getVideoPipelineSteps:o=>n("pipelineExecutor","getVideoPipelineSteps","query",o),setVideoPipelineSteps:o=>n("pipelineExecutor","setVideoPipelineSteps","mutation",o),getSchema:o=>n("pipelineExecutor","getSchema","query",o),getGlobalSteps:o=>n("pipelineExecutor","getGlobalSteps","query",o),getGlobalPipelineConfig:o=>n("pipelineExecutor","getGlobalPipelineConfig","query",o),getOrchestratorConfigSchema:o=>n("pipelineExecutor","getOrchestratorConfigSchema","query",o),listTemplates:o=>n("pipelineExecutor","listTemplates","query",o),saveTemplate:o=>n("pipelineExecutor","saveTemplate","mutation",o),updateTemplate:o=>n("pipelineExecutor","updateTemplate","mutation",o),deleteTemplate:o=>n("pipelineExecutor","deleteTemplate","mutation",o),getCapabilities:o=>n("pipelineExecutor","getCapabilities","query",o),getAddonModels:o=>n("pipelineExecutor","getAddonModels","query",o),downloadModel:o=>n("pipelineExecutor","downloadModel","mutation",o),deleteModel:o=>n("pipelineExecutor","deleteModel","mutation",o),detect:o=>n("pipelineExecutor","detect","query",o),cacheFrameInPool:o=>n("pipelineExecutor","cacheFrameInPool","mutation",o),inferCached:o=>n("pipelineExecutor","inferCached","mutation",o),uncacheFrame:o=>n("pipelineExecutor","uncacheFrame","mutation",o),getEffectiveTuning:o=>n("pipelineExecutor","getEffectiveTuning","query",o),listLoadedEngines:o=>n("pipelineExecutor","listLoadedEngines","query",o),spinEngine:o=>n("pipelineExecutor","spinEngine","mutation",o),killEngine:o=>n("pipelineExecutor","killEngine","mutation",o),listReferenceImages:o=>n("pipelineExecutor","listReferenceImages","query",o),getReferenceImage:o=>n("pipelineExecutor","getReferenceImage","query",o),getReferenceAudioFiles:o=>n("pipelineExecutor","getReferenceAudioFiles","query",o),getReferenceAudio:o=>n("pipelineExecutor","getReferenceAudio","query",o),getAudioCapabilities:o=>n("pipelineExecutor","getAudioCapabilities","query",o),runAudioTest:o=>n("pipelineExecutor","runAudioTest","mutation",o),getDetectionConfigSchema:o=>n("pipelineExecutor","getDetectionConfigSchema","query",o)},pipelineOrchestrator:{rebalance:o=>n("pipelineOrchestrator","rebalance","mutation",o),getPipelineAssignments:o=>n("pipelineOrchestrator","getPipelineAssignments","query",o),getAgentLoad:o=>n("pipelineOrchestrator","getAgentLoad","query",o),getGlobalMetrics:o=>n("pipelineOrchestrator","getGlobalMetrics","query",o),getCapabilityBindings:o=>n("pipelineOrchestrator","getCapabilityBindings","query",o),setCapabilityBinding:o=>n("pipelineOrchestrator","setCapabilityBinding","mutation",o),getDecoderAssignments:o=>n("pipelineOrchestrator","getDecoderAssignments","query",o),getAudioNodeLoad:o=>n("pipelineOrchestrator","getAudioNodeLoad","query",o),getAgentSettings:o=>n("pipelineOrchestrator","getAgentSettings","query",o),listAgentSettings:o=>n("pipelineOrchestrator","listAgentSettings","query",o),setAgentAddonDefaults:o=>n("pipelineOrchestrator","setAgentAddonDefaults","mutation",o),removeAgentSettings:o=>n("pipelineOrchestrator","removeAgentSettings","mutation",o),listTemplates:o=>n("pipelineOrchestrator","listTemplates","query",o),saveTemplate:o=>n("pipelineOrchestrator","saveTemplate","mutation",o),updateTemplate:o=>n("pipelineOrchestrator","updateTemplate","mutation",o),deleteTemplate:o=>n("pipelineOrchestrator","deleteTemplate","mutation",o)},pipelineRunner:{attachCamera:o=>n("pipelineRunner","attachCamera","mutation",o),reportMotion:o=>n("pipelineRunner","reportMotion","mutation",o),getLocalLoad:o=>n("pipelineRunner","getLocalLoad","query",o),getLocalMetrics:o=>n("pipelineRunner","getLocalMetrics","query",o),getAllCameraMetrics:o=>n("pipelineRunner","getAllCameraMetrics","query",o),getLocalCameras:o=>n("pipelineRunner","getLocalCameras","query",o)},platformProbe:{getCapabilities:o=>n("platformProbe","getCapabilities","query",o),getHardware:o=>n("platformProbe","getHardware","query",o),resolveInferenceConfig:o=>n("platformProbe","resolveInferenceConfig","query",o),resolveHwAccel:o=>n("platformProbe","resolveHwAccel","query",o),getHardwareEncoders:o=>n("platformProbe","getHardwareEncoders","query",o),refreshHardwareEncoders:o=>n("platformProbe","refreshHardwareEncoders","mutation",o)},recordingEngine:{getStatus:o=>n("recordingEngine","getStatus","query",o),enable:o=>n("recordingEngine","enable","mutation",o),disable:o=>n("recordingEngine","disable","mutation",o),getConfig:o=>n("recordingEngine","getConfig","query",o),updateConfig:o=>n("recordingEngine","updateConfig","mutation",o),getPlaylist:o=>n("recordingEngine","getPlaylist","query",o),getThumbnail:o=>n("recordingEngine","getThumbnail","query",o),getSegments:o=>n("recordingEngine","getSegments","query",o),getAvailability:o=>n("recordingEngine","getAvailability","query",o),estimateStorage:o=>n("recordingEngine","estimateStorage","query",o),estimateGlobalStorage:o=>n("recordingEngine","estimateGlobalStorage","query",o),getStorageUsage:o=>n("recordingEngine","getStorageUsage","query",o),setPolicy:o=>n("recordingEngine","setPolicy","mutation",o),getPolicy:o=>n("recordingEngine","getPolicy","query",o),getRetentionConfig:o=>n("recordingEngine","getRetentionConfig","query",o),updateRetentionConfig:o=>n("recordingEngine","updateRetentionConfig","mutation",o),getMotionStats:o=>n("recordingEngine","getMotionStats","query",o)},settingsStore:{get:o=>n("settingsStore","get","query",o),set:o=>n("settingsStore","set","mutation",o),query:o=>n("settingsStore","query","query",o),insert:o=>n("settingsStore","insert","mutation",o),update:o=>n("settingsStore","update","mutation",o),delete:o=>n("settingsStore","delete","mutation",o),count:o=>n("settingsStore","count","query",o),isEmpty:o=>n("settingsStore","isEmpty","query",o),declareCollection:o=>n("settingsStore","declareCollection","mutation",o)},storage:{resolve:o=>n("storage","resolve","query",o),write:o=>n("storage","write","mutation",o),read:o=>n("storage","read","query",o),exists:o=>n("storage","exists","query",o),list:o=>n("storage","list","query",o),delete:o=>n("storage","delete","mutation",o),getAvailableSpace:o=>n("storage","getAvailableSpace","query",o),beginUpload:o=>n("storage","beginUpload","mutation",o),writeChunk:o=>n("storage","writeChunk","mutation",o),finalizeUpload:o=>n("storage","finalizeUpload","mutation",o),abortUpload:o=>n("storage","abortUpload","mutation",o),beginDownload:o=>n("storage","beginDownload","mutation",o),readChunk:o=>n("storage","readChunk","query",o),endDownload:o=>n("storage","endDownload","mutation",o),listLocations:o=>n("storage","listLocations","query",o),getDefaultLocation:o=>n("storage","getDefaultLocation","query",o),upsertLocation:o=>n("storage","upsertLocation","mutation",o),deleteLocation:o=>n("storage","deleteLocation","mutation",o),testLocation:o=>n("storage","testLocation","query",o),listProviders:o=>n("storage","listProviders","query",o),testConfig:o=>n("storage","testConfig","query",o)},streamBroker:{listAllCameraStreams:o=>n("streamBroker","listAllCameraStreams","query",o),listAllProfileSlots:o=>n("streamBroker","listAllProfileSlots","query",o),getBrokerStats:o=>n("streamBroker","getBrokerStats","query",o),listClients:o=>n("streamBroker","listClients","query",o),killClient:o=>n("streamBroker","killClient","mutation",o),getStreamUrl:o=>n("streamBroker","getStreamUrl","query",o),getStreamWithCodec:o=>n("streamBroker","getStreamWithCodec","mutation",o),releaseStreamWithCodec:o=>n("streamBroker","releaseStreamWithCodec","mutation",o),subscribeAudioChunks:o=>n("streamBroker","subscribeAudioChunks","mutation",o),pullAudioChunks:o=>n("streamBroker","pullAudioChunks","query",o),unsubscribeAudioChunks:o=>n("streamBroker","unsubscribeAudioChunks","mutation",o),subscribeFrames:o=>n("streamBroker","subscribeFrames","mutation",o),pullFrameHandles:o=>n("streamBroker","pullFrameHandles","query",o),unsubscribeFrames:o=>n("streamBroker","unsubscribeFrames","mutation",o),setPreBufferDuration:o=>n("streamBroker","setPreBufferDuration","mutation",o),getPreBufferInfo:o=>n("streamBroker","getPreBufferInfo","query",o),getRtspPort:o=>n("streamBroker","getRtspPort","query",o),getAllRtspEntries:o=>n("streamBroker","getAllRtspEntries","query",o),getRtspEntry:o=>n("streamBroker","getRtspEntry","query",o),regenerateRtspToken:o=>n("streamBroker","regenerateRtspToken","mutation",o),setRtspEnabled:o=>n("streamBroker","setRtspEnabled","mutation",o),isRtspEnabled:o=>n("streamBroker","isRtspEnabled","query",o)},system:{info:o=>n("system","info","query",o),health:o=>n("system","health","query",o),featureFlags:o=>n("system","featureFlags","query",o),networkAddresses:o=>n("system","networkAddresses","query",o),getRetentionConfig:o=>n("system","getRetentionConfig","query",o),setRetentionConfig:o=>n("system","setRetentionConfig","mutation",o),forceRetentionCleanup:o=>n("system","forceRetentionCleanup","mutation",o)},toast:{onToast:(o,W)=>n("toast","onToast","subscription",o,W)},turnProvider:{getTurnServers:o=>n("turnProvider","getTurnServers","query",o)},userManagement:{listUsers:o=>n("userManagement","listUsers","query",o),createUser:o=>n("userManagement","createUser","mutation",o),updateUser:o=>n("userManagement","updateUser","mutation",o),deleteUser:o=>n("userManagement","deleteUser","mutation",o),resetPassword:o=>n("userManagement","resetPassword","mutation",o),setUserScopes:o=>n("userManagement","setUserScopes","mutation",o),validateCredentials:o=>n("userManagement","validateCredentials","mutation",o),listApiKeys:o=>n("userManagement","listApiKeys","query",o),createApiKey:o=>n("userManagement","createApiKey","mutation",o),revokeApiKey:o=>n("userManagement","revokeApiKey","mutation",o),validateApiKey:o=>n("userManagement","validateApiKey","mutation",o),createScopedToken:o=>n("userManagement","createScopedToken","mutation",o),revokeScopedToken:o=>n("userManagement","revokeScopedToken","mutation",o),validateScopedToken:o=>n("userManagement","validateScopedToken","query",o),listScopedTokens:o=>n("userManagement","listScopedTokens","query",o),setupTotp:o=>n("userManagement","setupTotp","mutation",o),confirmTotp:o=>n("userManagement","confirmTotp","mutation",o),disableTotp:o=>n("userManagement","disableTotp","mutation",o),getTotpStatus:o=>n("userManagement","getTotpStatus","query",o),verifyTotp:o=>n("userManagement","verifyTotp","mutation",o),oauthIssueCode:o=>n("userManagement","oauthIssueCode","mutation",o),oauthExchangeCode:o=>n("userManagement","oauthExchangeCode","mutation",o),oauthRefresh:o=>n("userManagement","oauthRefresh","mutation",o),oauthVerifyAccessToken:o=>n("userManagement","oauthVerifyAccessToken","query",o),listOauthSessions:o=>n("userManagement","listOauthSessions","query",o),revokeOauthSession:o=>n("userManagement","revokeOauthSession","mutation",o)}}}const vm="device.state-changed",ym="capability.binding-changed",Sm="device.registered",fm="device.unregistered",bm="device.updated";class Zu{constructor(s){this.api=s,this.stateSource=mm(this.stateMirror,this.handleListeners,this.api)}stateMirror=new Map;bindings=new Map;devices=new Map;handleListeners=new Map;globalStateListeners=new Set;capListeners=new Map;deviceListeners=new Map;addedListeners=new Set;removedListeners=new Set;pendingWaits=new Set;stateSource;bridges=[];initialized=!1;initPromise=null;async init(s=15e3){if(!this.initialized){if(this.initPromise)return this.initPromise;this.initPromise=(async()=>{const n=(v,m)=>Number.isFinite(s)?new Promise((y,I)=>{const A=setTimeout(()=>I(new Error(`SystemMirror.init: '${m}' timed out after ${s}ms`)),s);v.then(k=>{clearTimeout(A),y(k)},k=>{clearTimeout(A),I(k)})}):v,[d,p,u]=await Promise.all([n(this.api.deviceManager.getAllBindings.query({}),"deviceManager.getAllBindings"),n(this.api.deviceState.getAllSnapshots.query({}),"deviceState.getAllSnapshots"),n(this.api.deviceManager.listAll.query({}),"deviceManager.listAll")]);for(const v of d)this.bindings.set(v.deviceId,v);for(const[v,m]of Object.entries(p)){const y=Number(v);if(!Number.isFinite(y))continue;const I=new Map;for(const[A,k]of Object.entries(m))I.set(A,k);this.stateMirror.set(y,I)}for(const v of u)this.devices.set(v.id,v);try{this.subscribeBus()}catch{}this.initialized=!0})();try{await this.initPromise}finally{this.initPromise=null}}}isReady(){return this.initialized}async awaitReady(){if(!this.initialized)return this.initPromise?this.initPromise:this.init()}dispose(){for(const s of this.bridges)try{s.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(s){const n=this.bindings.get(s);return n?gm(this.api,n,{stateSource:this.stateSource}):null}getDeviceByName(s){for(const n of this.devices.values())if(n.name===s)return this.getDeviceById(n.id);return null}getDeviceByStableId(s){for(const n of this.devices.values())if(n.stableId===s)return this.getDeviceById(n.id);return null}getDevicesByAddon(s){return this.query({addonId:s})}getDevicesByType(s){return this.query({type:s})}getDeviceInfo(s){return this.devices.get(s)??null}getAllDevices(){const s=[];for(const n of this.bindings.keys()){const d=this.getDeviceById(n);d&&s.push(d)}return s}filterByCap(s){return this.query({caps:s})}query(s={}){const n=[];for(const[d,p]of this.bindings){const u=this.devices.get(d);if(s.id!==void 0&&!ke(d,s.id)||s.stableId!==void 0&&(!u||!ke(u.stableId,s.stableId))||s.addonId!==void 0&&(!u||!ke(u.addonId,s.addonId))||s.type!==void 0&&(!u||!ke(u.type,s.type)))continue;if(s.caps!==void 0){const m=st(s.caps),y=new Set(p.entries.map(I=>I.capName));if(!m.every(I=>y.has(I)))continue}if(s.anyCap!==void 0){const m=st(s.anyCap),y=new Set(p.entries.map(I=>I.capName));if(!m.some(I=>y.has(I)))continue}if(s.name!==void 0&&(!u||!Im(u.name,s.name))||s.online!==void 0&&(!u||u.online!==s.online))continue;if(s.parentDeviceId!==void 0){if(!u)continue;const m=s.parentDeviceId;if((u.parentDeviceId??null)!==m)continue}if(s.feature!==void 0&&(!u||!st(s.feature).every(y=>u.features.includes(y)))||s.isCamera!==void 0&&(!u||u.isCamera!==s.isCamera))continue;const v=this.getDeviceById(d);if(v){if(s.where&&u){if(!s.where(u,v))continue}else if(s.where&&!u)continue;n.push(v)}}return n}whereState(s,n){const d=[];for(const[p,u]of this.stateMirror){const v=u.get(s);if(!v||!n(v,p))continue;const m=this.getDeviceById(p);m&&d.push(m)}return d}mapState(s,n){const d=[];for(const[p,u]of this.stateMirror){const v=u.get(s);v&&d.push(n(v,p))}return d}findState(s,n){for(const[d,p]of this.stateMirror){const u=p.get(s);if(u&&n(u,d))return this.getDeviceById(d)}return null}countByCap(s){let n=0;for(const d of this.bindings.values())d.entries.some(p=>p.capName===s)&&n++;return n}countByState(s,n){let d=0;for(const[p,u]of this.stateMirror){const v=u.get(s);v&&n(v,p)&&d++}return d}listen(s){return this.globalStateListeners.add(s),()=>{this.globalStateListeners.delete(s)}}listenCap(s,n){let d=this.capListeners.get(s);return d||(d=new Set,this.capListeners.set(s,d)),d.add(n),()=>{d.delete(n),d.size===0&&this.capListeners.delete(s)}}listenDevice(s,n){let d=this.deviceListeners.get(s);return d||(d=new Set,this.deviceListeners.set(s,d)),d.add(n),()=>{d.delete(n),d.size===0&&this.deviceListeners.delete(s)}}onDeviceAdded(s){return this.addedListeners.add(s),()=>{this.addedListeners.delete(s)}}onDeviceRemoved(s){return this.removedListeners.add(s),()=>{this.removedListeners.delete(s)}}waitForState(s,n,d,p=3e4){return new Promise((u,v)=>{const y=(()=>{const k=this.stateMirror.get(s)?.get(n);return k&&d(k)?k:null})();if(y){u(y);return}let I=null;const A=this.listenDevice(s,(k,C,E)=>{C===n&&E&&d(E)&&(I&&clearTimeout(I),A(),u(E))});Number.isFinite(p)&&(I=setTimeout(()=>{A(),v(new Error(`waitForState timed out after ${p}ms (deviceId=${s}, capName=${n})`))},p))})}waitForDevice(s,n=3e4){return new Promise((d,p)=>{const u=this.getDeviceById(s);if(u){d(u);return}let v=null;const m=this.onDeviceAdded(y=>{if(y!==s)return;const I=this.getDeviceById(y);I&&(v&&clearTimeout(v),m(),d(I))});Number.isFinite(n)&&(v=setTimeout(()=>{m(),p(new Error(`waitForDevice timed out after ${n}ms (deviceId=${s})`))},n))})}async forEachCap(s,n){for(const d of this.filterByCap(s))await n(d)}async invokeCap(s,n,d,p={}){const u=this.filterByCap(s),v=Math.max(1,p.parallelism??u.length),m=[];for(let y=0;y<u.length;y+=v){const I=u.slice(y,y+v),A=await Promise.allSettled(I.map(async k=>{const C=k[s];if(!C||typeof C[n]!="function")throw new Error(`device '${k.deviceId}' does not expose '${s}.${n}'`);return await C[n](d)}));for(let k=0;k<A.length;k++){const C=I[k],E=A[k];E.status==="fulfilled"?m.push({deviceId:C.deviceId,ok:!0,result:E.value}):m.push({deviceId:C.deviceId,ok:!1,error:E.reason})}}return m}summary(){const s={},n={},d={};let p=0,u=0;for(const v of this.bindings.values())for(const m of v.entries)s[m.capName]=(s[m.capName]??0)+1;for(const v of this.devices.values())n[v.addonId]=(n[v.addonId]??0)+1,d[v.type]=(d[v.type]??0)+1,v.online?p++:u++;return{totalDevices:this.bindings.size,online:p,offline:u,byCap:s,byAddon:n,byType:d,statedDevices:this.stateMirror.size}}dump(s){const n=p=>{const u=this.devices.get(p)??null,v=this.bindings.get(p)??null,m={},y=this.stateMirror.get(p);if(y)for(const[I,A]of y)m[I]={...A};return{deviceId:p,info:u,binding:v?{...v,entries:v.entries.map(I=>({...I}))}:null,state:m}};if(s!==void 0)return n(s);const d=[];for(const p of this.bindings.keys())d.push(n(p));return d}getRawMirror(){return this.stateMirror}getSystemState(){const s=new Map;for(const[n,d]of this.stateMirror){const p=new Map;for(const[u,v]of d)p.set(u,{...v});s.set(n,p)}return s}subscribeBus(){if(!this.api.live?.onEvent)return;const s=this.api.live.onEvent;this.bridges.push(s.subscribe({category:vm},{onData:n=>{const d=n.data;!d||typeof d.deviceId!="number"||typeof d.capName!="string"||this.applyStateUpdate(d.deviceId,d.capName,d.slice)}})),this.bridges.push(s.subscribe({category:ym},{onData:n=>{const d=n.data,p=typeof d?.deviceId=="number"?d.deviceId:d?.source?.type==="device"&&typeof d.source.id=="number"?d.source.id:null;p!==null&&this.refreshBinding(p)}})),this.bridges.push(s.subscribe({category:Sm},{onData:n=>{const d=n.data;typeof d?.deviceId=="number"&&this.refreshDeviceMetadata(d.deviceId,"added")}})),this.bridges.push(s.subscribe({category:fm},{onData:n=>{const d=n.data;typeof d?.deviceId=="number"&&this.applyDeviceRemoval(d.deviceId)}})),this.bridges.push(s.subscribe({category:bm},{onData:n=>{const d=n.data;typeof d?.deviceId=="number"&&this.refreshDeviceMetadata(d.deviceId,"updated")}}))}applyStateUpdate(s,n,d){let p=this.stateMirror.get(s);p||(p=new Map,this.stateMirror.set(s,p)),d===void 0?p.delete(n):p.set(n,d);const u=`${s}:${n}`,v=this.handleListeners.get(u);if(v)for(const I of v)try{I(d)}catch{}for(const I of this.globalStateListeners)try{I(s,n,d)}catch{}const m=this.capListeners.get(n);if(m)for(const I of m)try{I(s,d)}catch{}const y=this.deviceListeners.get(s);if(y)for(const I of y)try{I(s,n,d)}catch{}}applyDeviceRemoval(s){const n=this.devices.get(s)??null;this.bindings.delete(s),this.devices.delete(s),this.stateMirror.delete(s);for(const d of this.removedListeners)try{d(s,n)}catch{}}async refreshBinding(s){try{const d=(await this.api.deviceManager.getAllBindings.query({})).find(p=>p.deviceId===s);d?this.bindings.set(s,d):this.applyDeviceRemoval(s)}catch{}}async refreshDeviceMetadata(s,n){try{const p=(await this.api.deviceManager.listAll.query({})).find(v=>v.id===s);if(!p)return;const u=!this.devices.has(s);if(this.devices.set(s,p),n==="added"&&u){await this.refreshBinding(s);for(const v of this.addedListeners)try{v(s,p)}catch{}}}catch{}}}function ke(i,s){return Array.isArray(s)?s.includes(i):i===s}function st(i){return Array.isArray(i)?i:[i]}function Im(i,s){return typeof s=="string"?i===s:s instanceof RegExp?s.test(i):"exact"in s?i===s.exact:"contains"in s?i.toLowerCase().includes(s.contains.toLowerCase()):!1}function Yu(i){return i}function Qu(i,s,n){return{input:i,output:s,kind:n?.kind??"query",auth:n?.auth??"protected",scope:n?.scope??{kind:"system"}}}const km=[{profile:"main",prefix:"streamMain",label:"Main stream"},{profile:"sub",prefix:"streamSub",label:"Sub stream"},{profile:"ext",prefix:"streamExt",label:"Third stream"}];function wm(i,s,n){const d=[];if(s.resolutions.length>0){const p=s.resolutions.map(v=>({value:`${String(v.width)}x${String(v.height)}`,label:`${String(v.width)}×${String(v.height)}`})),u=n?`${String(n.width)}x${String(n.height)}`:void 0;u&&!p.some(v=>v.value===u)&&p.unshift({value:u,label:`${u.replace("x","×")} (current)`}),d.push({type:"select",key:`${i.prefix}_resolution`,label:"Resolution",options:p,default:u??p[0]?.value??""})}if(s.codecs.length>0&&d.push({type:"select",key:`${i.prefix}_codec`,label:"Codec",options:s.codecs.map(p=>({value:p,label:p==="h264"?"H.264":"H.265"})),default:n?.codec??s.codecs[0]}),s.framerates.length>0){const p=s.framerates.map(v=>({value:String(v),label:`${String(v)} fps`})),u=n?.framerate;u!==void 0&&!s.framerates.includes(u)&&p.unshift({value:String(u),label:`${String(u)} fps (current)`}),d.push({type:"select",key:`${i.prefix}_framerate`,label:"Frame rate",options:p,default:u!==void 0?String(u):p[0]?.value??""})}if(s.bitrates.length>0){const p=s.bitrates.map(v=>({value:String(v),label:`${String(v)} kbps`})),u=n?.bitrate;u!==void 0&&!s.bitrates.includes(u)&&p.unshift({value:String(u),label:`${String(u)} kbps (current)`}),d.push({type:"select",key:`${i.prefix}_bitrate`,label:"Bitrate",options:p,default:u!==void 0?String(u):p[0]?.value??""})}else{const p=s.bitrateRange;d.push({type:"number",key:`${i.prefix}_bitrate`,label:"Bitrate",unit:"kbps",...p?{min:p[0],max:p[1]}:{},default:n?.bitrate??p?.[0]??0})}if(s.supportsBitrateMode&&d.push({type:"select",key:`${i.prefix}_bitrateMode`,label:"Bitrate mode",options:[{value:"vbr",label:"VBR (variable)"},{value:"cbr",label:"CBR (constant)"}],default:n?.bitrateMode??"vbr"}),s.supportsEncoderProfile&&d.push({type:"select",key:`${i.prefix}_encoderProfile`,label:"Encoder profile",options:[{value:"baseline",label:"Baseline"},{value:"main",label:"Main"},{value:"high",label:"High"}],default:n?.encoderProfile??"main"}),s.supportsGop){const p=s.gop;if(p){const u=[];for(let m=p.min;m<=p.max;m+=p.step)u.push({value:String(m),label:`${String(m)} s`});const v=n?.gop;v!==void 0&&!u.some(m=>m.value===String(v))&&u.unshift({value:String(v),label:`${String(v)} s (current)`}),d.push({type:"select",key:`${i.prefix}_gop`,label:"I-frame interval (GOP)",options:u,default:v!==void 0?String(v):u[0]?.value??""})}else d.push({type:"number",key:`${i.prefix}_gop`,label:"I-frame interval (GOP)",unit:"s",min:1,default:n?.gop??1})}return d.length===0?null:{id:`stream-${i.profile}`,tab:"streaming",title:i.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:d}}function Ju(i,s){const n=[];for(const d of km){const p=i[d.profile];if(!p)continue;const u=wm(d,p,s?.[d.profile]);u&&n.push(u)}return n.length===0?null:{sections:n}}function Xu(i,s){const n={};let d=!1;const p=`${s}_resolution`;if(p in i&&typeof i[p]=="string"){const[k,C]=i[p].split("x").map(Number);Number.isFinite(k)&&Number.isFinite(C)&&(n.width=k,n.height=C,d=!0)}const u=`${s}_codec`;u in i&&(i[u]==="h264"||i[u]==="h265")&&(n.codec=i[u],d=!0);const v=`${s}_framerate`;if(v in i){const k=Number(i[v]);Number.isFinite(k)&&(n.framerate=k,d=!0)}const m=`${s}_bitrate`;if(m in i){const k=Number(i[m]);Number.isFinite(k)&&(n.bitrate=k,d=!0)}const y=`${s}_bitrateMode`;y in i&&(i[y]==="vbr"||i[y]==="cbr")&&(n.bitrateMode=i[y],d=!0);const I=`${s}_encoderProfile`;I in i&&(i[I]==="high"||i[I]==="main"||i[I]==="baseline")&&(n.encoderProfile=i[I],d=!0);const A=`${s}_gop`;if(A in i){const k=Number(i[A]);Number.isFinite(k)&&(n.gop=k,d=!0)}return d?n:null}const eg={accessories:"accessories",addonPages:"addon-pages",addonPagesSource:"addon-pages-source",addonRoutes:"addon-routes",addonSettings:"addon-settings",addonWidgets:"addon-widgets",addonWidgetsSource:"addon-widgets-source",addons:"addons",adminUi:"admin-ui",advancedNotifier:"advanced-notifier",alerts:"alerts",audioAnalysis:"audio-analysis",audioAnalyzer:"audio-analyzer",audioCodec:"audio-codec",audioMetrics:"audio-metrics",authProvider:"auth-provider",backup:"backup",battery:"battery",brightness:"brightness",cameraCredentials:"camera-credentials",cameraPipelineConfig:"camera-pipeline-config",cameraStreams:"camera-streams",decoder:"decoder",detectionPipeline:"detection-pipeline",deviceDiscovery:"device-discovery",deviceExport:"device-export",deviceManager:"device-manager",deviceOps:"device-ops",deviceProvider:"device-provider",deviceState:"device-state",deviceStatus:"device-status",doorbell:"doorbell",embeddingEncoder:"embedding-encoder",events:"events",featureProbe:"feature-probe",integrations:"integrations",intercom:"intercom",localNetwork:"local-network",logDestination:"log-destination",meshNetwork:"mesh-network",metricsProvider:"metrics-provider",motion:"motion",motionDetection:"motion-detection",motionTrigger:"motion-trigger",motionZones:"motion-zones",mqttBroker:"mqtt-broker",nativeObjectDetection:"native-object-detection",networkAccess:"network-access",networkQuality:"network-quality",nodes:"nodes",notificationOutput:"notification-output",oauthIntegration:"oauth-integration",osd:"osd",pipelineAnalytics:"pipeline-analytics",pipelineExecutor:"pipeline-executor",pipelineOrchestrator:"pipeline-orchestrator",pipelineRunner:"pipeline-runner",platformProbe:"platform-probe",privacyMask:"privacy-mask",ptz:"ptz",ptzAutotrack:"ptz-autotrack",reboot:"reboot",recording:"recording",recordingEngine:"recording-engine",restreamer:"restreamer",settingsStore:"settings-store",smtpProvider:"smtp-provider",snapshot:"snapshot",snapshotProvider:"snapshot-provider",ssoBridge:"sso-bridge",storage:"storage",storageProvider:"storage-provider",streamBroker:"stream-broker",streamCatalog:"stream-catalog",streamParams:"stream-params",streamingEngine:"streaming-engine",switch:"switch",system:"system",toast:"toast",turnProvider:"turn-provider",userManagement:"user-management",userPasskeys:"user-passkeys",webrtc:"webrtc",webrtcSession:"webrtc-session",zoneAnalytics:"zone-analytics",zoneRules:"zone-rules",zones:"zones"},tg=[{key:"accessories",name:"accessories"},{key:"addonPages",name:"addon-pages"},{key:"addonPagesSource",name:"addon-pages-source"},{key:"addonRoutes",name:"addon-routes"},{key:"addonSettings",name:"addon-settings"},{key:"addonWidgets",name:"addon-widgets"},{key:"addonWidgetsSource",name:"addon-widgets-source"},{key:"addons",name:"addons"},{key:"adminUi",name:"admin-ui"},{key:"advancedNotifier",name:"advanced-notifier"},{key:"alerts",name:"alerts"},{key:"audioAnalysis",name:"audio-analysis"},{key:"audioAnalyzer",name:"audio-analyzer"},{key:"audioCodec",name:"audio-codec"},{key:"audioMetrics",name:"audio-metrics"},{key:"authProvider",name:"auth-provider"},{key:"backup",name:"backup"},{key:"battery",name:"battery"},{key:"brightness",name:"brightness"},{key:"cameraCredentials",name:"camera-credentials"},{key:"cameraPipelineConfig",name:"camera-pipeline-config"},{key:"cameraStreams",name:"camera-streams"},{key:"decoder",name:"decoder"},{key:"detectionPipeline",name:"detection-pipeline"},{key:"deviceDiscovery",name:"device-discovery"},{key:"deviceExport",name:"device-export"},{key:"deviceManager",name:"device-manager"},{key:"deviceOps",name:"device-ops"},{key:"deviceProvider",name:"device-provider"},{key:"deviceState",name:"device-state"},{key:"deviceStatus",name:"device-status"},{key:"doorbell",name:"doorbell"},{key:"embeddingEncoder",name:"embedding-encoder"},{key:"events",name:"events"},{key:"featureProbe",name:"feature-probe"},{key:"integrations",name:"integrations"},{key:"intercom",name:"intercom"},{key:"localNetwork",name:"local-network"},{key:"logDestination",name:"log-destination"},{key:"meshNetwork",name:"mesh-network"},{key:"metricsProvider",name:"metrics-provider"},{key:"motion",name:"motion"},{key:"motionDetection",name:"motion-detection"},{key:"motionTrigger",name:"motion-trigger"},{key:"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:"oauthIntegration",name:"oauth-integration"},{key:"osd",name:"osd"},{key:"pipelineAnalytics",name:"pipeline-analytics"},{key:"pipelineExecutor",name:"pipeline-executor"},{key:"pipelineOrchestrator",name:"pipeline-orchestrator"},{key:"pipelineRunner",name:"pipeline-runner"},{key:"platformProbe",name:"platform-probe"},{key:"privacyMask",name:"privacy-mask"},{key:"ptz",name:"ptz"},{key:"ptzAutotrack",name:"ptz-autotrack"},{key:"reboot",name:"reboot"},{key:"recording",name:"recording"},{key:"recordingEngine",name:"recording-engine"},{key:"restreamer",name:"restreamer"},{key:"settingsStore",name:"settings-store"},{key:"smtpProvider",name:"smtp-provider"},{key:"snapshot",name:"snapshot"},{key:"snapshotProvider",name:"snapshot-provider"},{key:"ssoBridge",name:"sso-bridge"},{key:"storage",name:"storage"},{key:"storageProvider",name:"storage-provider"},{key:"streamBroker",name:"stream-broker"},{key:"streamCatalog",name:"stream-catalog"},{key:"streamParams",name:"stream-params"},{key:"streamingEngine",name:"streaming-engine"},{key:"switch",name:"switch"},{key:"system",name:"system"},{key:"toast",name:"toast"},{key:"turnProvider",name:"turn-provider"},{key:"userManagement",name:"user-management"},{key:"userPasskeys",name:"user-passkeys"},{key:"webrtc",name:"webrtc"},{key:"webrtcSession",name:"webrtc-session"},{key:"zoneAnalytics",name:"zone-analytics"},{key:"zoneRules",name:"zone-rules"},{key:"zones",name:"zones"}],ag=[al,zc,_c,jc,Ei,Wc,Hc,Tp,cc,Kr,Bi,mr,pr,Sr,ln,xr,ec,pn,mn,Zd,ud,gn,Yc,md,hn,Bc,Mr,Vd,_n,Er,Tt,vn,br,Fd,Rt,pp,ol,Al,oc,Dl,qd,fn,Ms,In,Dn,Nc,xn,Br,Wl,sp,Fr,pc,el,wd,Js,cr,si,Sl,Rn,_d,Bn,Yd,$d,pd,Xc,nc,vc,Lr,_r,dc,qi,Ki,ks,il,qn,us,On,Fl,Vl,Or,Ll,uc,er,ar,zn,Ln,yn],ng=["accessories","battery","brightness","camera-credentials","device-discovery","device-export","device-status","doorbell","feature-probe","intercom","motion","motion-trigger","motion-zones","mqtt-broker","native-object-detection","osd","privacy-mask","ptz","ptz-autotrack","snapshot","stream-params","switch"],og=Object.freeze({"addonPages.listPages":{capName:"addon-pages",capScope:"system",addonId:null,access:"view"},"addonPagesSource.listPages":{capName:"addon-pages-source",capScope:"system",addonId:null,access:"view"},"addonRoutes.getRoutes":{capName:"addon-routes",capScope:"system",addonId:null,access:"view"},"addonRoutes.invoke":{capName:"addon-routes",capScope:"system",addonId:null,access:"create"},"addons.applyAutoUpdateToAll":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.cancelBulkUpdate":{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.getBulkUpdateState":{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.listActiveBulkUpdates":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.listCapabilityProviders":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.listFrameworkPackages":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.listPackages":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.listUpdates":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.listWorkspacePackages":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.onAddonLogs":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.reloadPackages":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.restartAddon":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.restartServer":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.retryLoad":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.rollbackPackage":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.searchAvailable":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.setAddonAutoUpdate":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.setAutoUpdateSettings":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.setCapabilityProviderEnabled":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.startBulkUpdate":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.uninstallPackage":{capName:"addons",capScope:"system",addonId:null,access:"delete"},"addons.updateFrameworkPackage":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.updatePackage":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addonSettings.getDeviceSettings":{capName:"addon-settings",capScope:"system",addonId:null,access:"view"},"addonSettings.getGlobalSettings":{capName:"addon-settings",capScope:"system",addonId:null,access:"view"},"addonSettings.updateDeviceSettings":{capName:"addon-settings",capScope:"system",addonId:null,access:"create"},"addonSettings.updateGlobalSettings":{capName:"addon-settings",capScope:"system",addonId:null,access:"create"},"addonWidgets.listWidgets":{capName:"addon-widgets",capScope:"system",addonId:null,access:"view"},"addonWidgetsSource.listWidgets":{capName:"addon-widgets-source",capScope:"system",addonId:null,access:"view"},"adminUi.getStaticDir":{capName:"admin-ui",capScope:"system",addonId:null,access:"view"},"adminUi.getVersion":{capName:"admin-ui",capScope:"system",addonId:null,access:"view"},"advancedNotifier.deleteRule":{capName:"advanced-notifier",capScope:"system",addonId:null,access:"delete"},"advancedNotifier.getHistory":{capName:"advanced-notifier",capScope:"system",addonId:null,access:"view"},"advancedNotifier.getRules":{capName:"advanced-notifier",capScope:"system",addonId:null,access:"view"},"advancedNotifier.testRule":{capName:"advanced-notifier",capScope:"system",addonId:null,access:"create"},"advancedNotifier.upsertRule":{capName:"advanced-notifier",capScope:"system",addonId:null,access:"create"},"alerts.dismiss":{capName:"alerts",capScope:"system",addonId:null,access:"create"},"alerts.emit":{capName:"alerts",capScope:"system",addonId:null,access:"create"},"alerts.getUnreadCount":{capName:"alerts",capScope:"system",addonId:null,access:"view"},"alerts.list":{capName:"alerts",capScope:"system",addonId:null,access:"view"},"alerts.markAllRead":{capName:"alerts",capScope:"system",addonId:null,access:"create"},"alerts.markRead":{capName:"alerts",capScope:"system",addonId:null,access:"create"},"alerts.update":{capName:"alerts",capScope:"system",addonId:null,access:"create"},"audioAnalysis.resolveDeviceSettings":{capName:"audio-analysis",capScope:"device",addonId:null,access:"view"},"audioAnalyzer.analyseChunk":{capName:"audio-analyzer",capScope:"system",addonId:null,access:"create"},"audioAnalyzer.classify":{capName:"audio-analyzer",capScope:"system",addonId:null,access:"view"},"audioAnalyzer.dispose":{capName:"audio-analyzer",capScope:"system",addonId:null,access:"create"},"audioAnalyzer.isReady":{capName:"audio-analyzer",capScope:"system",addonId:null,access:"view"},"audioAnalyzer.reprobeAudioEngine":{capName:"audio-analyzer",capScope:"system",addonId:null,access:"create"},"audioCodec.canHandle":{capName:"audio-codec",capScope:"system",addonId:null,access:"view"},"audioCodec.closeSession":{capName:"audio-codec",capScope:"system",addonId:null,access:"create"},"audioCodec.createDecodeSession":{capName:"audio-codec",capScope:"system",addonId:null,access:"create"},"audioCodec.createEncodeSession":{capName:"audio-codec",capScope:"system",addonId:null,access:"create"},"audioCodec.flushEncode":{capName:"audio-codec",capScope:"system",addonId:null,access:"create"},"audioCodec.listActiveSessions":{capName:"audio-codec",capScope:"system",addonId:null,access:"view"},"audioCodec.listSupportedCodecs":{capName:"audio-codec",capScope:"system",addonId:null,access:"view"},"audioCodec.pullEncoded":{capName:"audio-codec",capScope:"system",addonId:null,access:"view"},"audioCodec.pullPcm":{capName:"audio-codec",capScope:"system",addonId:null,access:"view"},"audioCodec.pushEncodedFrame":{capName:"audio-codec",capScope:"system",addonId:null,access:"create"},"audioCodec.pushPcm":{capName:"audio-codec",capScope:"system",addonId:null,access:"create"},"audioMetrics.getCurrentSnapshot":{capName:"audio-metrics",capScope:"device",addonId:null,access:"view"},"audioMetrics.getHistory":{capName:"audio-metrics",capScope:"device",addonId:null,access:"view"},"authProvider.getLoginUrl":{capName:"auth-provider",capScope:"system",addonId:null,access:"view"},"authProvider.handleCallback":{capName:"auth-provider",capScope:"system",addonId:null,access:"create"},"authProvider.validateCredentials":{capName:"auth-provider",capScope:"system",addonId:null,access:"create"},"authProvider.validateToken":{capName:"auth-provider",capScope:"system",addonId:null,access:"view"},"backup.delete":{capName:"backup",capScope:"system",addonId:null,access:"delete"},"backup.getEntries":{capName:"backup",capScope:"system",addonId:null,access:"view"},"backup.list":{capName:"backup",capScope:"system",addonId:null,access:"view"},"backup.listArchives":{capName:"backup",capScope:"system",addonId:null,access:"view"},"backup.listDestinations":{capName:"backup",capScope:"system",addonId:null,access:"view"},"backup.listLocations":{capName:"backup",capScope:"system",addonId:null,access:"view"},"backup.previewSchedule":{capName:"backup",capScope:"system",addonId:null,access:"view"},"backup.restore":{capName:"backup",capScope:"system",addonId:null,access:"create"},"backup.trigger":{capName:"backup",capScope:"system",addonId:null,access:"create"},"backup.upsertDestinationPolicy":{capName:"backup",capScope:"system",addonId:null,access:"create"},"brightness.setBrightness":{capName:"brightness",capScope:"device",addonId:null,access:"create"},"cameraCredentials.getCredentials":{capName:"camera-credentials",capScope:"device",addonId:null,access:"view"},"cameraStreams.getBrokerStreams":{capName:"camera-streams",capScope:"device",addonId:null,access:"view"},"cameraStreams.getCameraStreams":{capName:"camera-streams",capScope:"device",addonId:null,access:"view"},"cameraStreams.getRtspEntries":{capName:"camera-streams",capScope:"device",addonId:null,access:"view"},"decoder.createSession":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.destroySession":{capName:"decoder",capScope:"system",addonId:null,access:"delete"},"decoder.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"},"deviceDiscovery.adoptDevice":{capName:"device-discovery",capScope:"device",addonId:null,access:"create"},"deviceDiscovery.listDiscovered":{capName:"device-discovery",capScope:"device",addonId:null,access:"view"},"deviceDiscovery.refreshDiscovery":{capName:"device-discovery",capScope:"device",addonId:null,access:"create"},"deviceDiscovery.releaseDevice":{capName:"device-discovery",capScope:"device",addonId:null,access:"create"},"deviceExport.exposeDevice":{capName:"device-export",capScope:"system",addonId:null,access:"create"},"deviceExport.getStatus":{capName:"device-export",capScope:"system",addonId:null,access:"view"},"deviceExport.listExposedDevices":{capName:"device-export",capScope:"system",addonId:null,access:"view"},"deviceExport.listSupportedDeviceKinds":{capName:"device-export",capScope:"system",addonId:null,access:"view"},"deviceExport.unexposeDevice":{capName:"device-export",capScope:"system",addonId:null,access:"create"},"deviceManager.addLocation":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.adoptDevice":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.allocateDeviceId":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.createDevice":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.disable":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.discoverDevices":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.enable":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.getAllBindings":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getBindings":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getChildren":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getConfigSchema":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getCreationSchema":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getDevice":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getDeviceAggregate":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getDeviceLiveInfoAggregate":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getDeviceSettingsAggregate":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getDeviceStatusAggregate":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getSettingsSchema":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getStreamProfileMap":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getStreamSources":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.listAll":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.listBindableCapsForDeviceType":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.listLocations":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.listPersistedByAddon":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.listWrappersForCap":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.loadConfig":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.loadMeta":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.loadRuntimeState":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.persistConfig":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.probeStreams":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.registerDevice":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.remove":{capName:"device-manager",capScope:"system",addonId:null,access:"delete"},"deviceManager.removeDevice":{capName:"device-manager",capScope:"system",addonId:null,access:"delete"},"deviceManager.removeLocation":{capName:"device-manager",capScope:"system",addonId:null,access:"delete"},"deviceManager.setDisabled":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.setLocation":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.setMetadata":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.setName":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.setStreamProfileMap":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.setWrapperActive":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.testCreationField":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.testField":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.updateConfig":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.updateDeviceField":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.updateDeviceFieldsBatch":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceOps.getConfigEntries":{capName:"device-ops",capScope:"device",addonId:null,access:"view"},"deviceOps.getSettingsSchema":{capName:"device-ops",capScope:"device",addonId:null,access:"view"},"deviceOps.getStreamSources":{capName:"device-ops",capScope:"device",addonId:null,access:"view"},"deviceOps.removeDevice":{capName:"device-ops",capScope:"device",addonId:null,access:"delete"},"deviceOps.setConfig":{capName:"device-ops",capScope:"device",addonId:null,access:"create"},"deviceProvider.adoptDiscoveredDevice":{capName:"device-provider",capScope:"system",addonId:null,access:"create"},"deviceProvider.createDevice":{capName:"device-provider",capScope:"system",addonId:null,access:"create"},"deviceProvider.discoverDevices":{capName:"device-provider",capScope:"system",addonId:null,access:"create"},"deviceProvider.getChildCreationSchema":{capName:"device-provider",capScope:"system",addonId:null,access:"view"},"deviceProvider.getDevices":{capName:"device-provider",capScope:"system",addonId:null,access:"view"},"deviceProvider.getStatus":{capName:"device-provider",capScope:"system",addonId:null,access:"view"},"deviceProvider.start":{capName:"device-provider",capScope:"system",addonId:null,access:"create"},"deviceProvider.stop":{capName:"device-provider",capScope:"system",addonId:null,access:"create"},"deviceProvider.supportsDiscovery":{capName:"device-provider",capScope:"system",addonId:null,access:"view"},"deviceProvider.supportsManualCreation":{capName:"device-provider",capScope:"system",addonId:null,access:"view"},"deviceProvider.testCreationField":{capName:"device-provider",capScope:"system",addonId:null,access:"create"},"deviceState.getAllSnapshots":{capName:"device-state",capScope:"system",addonId:null,access:"view"},"deviceState.getCapSlice":{capName:"device-state",capScope:"system",addonId:null,access:"view"},"deviceState.getSnapshot":{capName:"device-state",capScope:"system",addonId:null,access:"view"},"deviceState.setCapSlice":{capName:"device-state",capScope:"system",addonId:null,access:"create"},"embeddingEncoder.encode":{capName:"embedding-encoder",capScope:"system",addonId:null,access:"view"},"embeddingEncoder.encodeText":{capName:"embedding-encoder",capScope:"system",addonId:null,access:"view"},"embeddingEncoder.getInfo":{capName:"embedding-encoder",capScope:"system",addonId:null,access:"view"},"events.getEventClipUrl":{capName:"events",capScope:"device",addonId:null,access:"view"},"events.getEvents":{capName:"events",capScope:"device",addonId:null,access:"view"},"events.getEventThumbnail":{capName:"events",capScope:"device",addonId:null,access:"view"},"integrations.create":{capName:"integrations",capScope:"system",addonId:null,access:"create"},"integrations.delete":{capName:"integrations",capScope:"system",addonId:null,access:"delete"},"integrations.get":{capName:"integrations",capScope:"system",addonId:null,access:"view"},"integrations.getAvailableTypes":{capName:"integrations",capScope:"system",addonId:null,access:"view"},"integrations.getByAddonId":{capName:"integrations",capScope:"system",addonId:null,access:"view"},"integrations.getSettings":{capName:"integrations",capScope:"system",addonId:null,access:"view"},"integrations.list":{capName:"integrations",capScope:"system",addonId:null,access:"view"},"integrations.setSettings":{capName:"integrations",capScope:"system",addonId:null,access:"create"},"integrations.testConnection":{capName:"integrations",capScope:"system",addonId:null,access:"create"},"integrations.update":{capName:"integrations",capScope:"system",addonId:null,access:"create"},"intercom.endTalkSession":{capName:"intercom",capScope:"device",addonId:null,access:"create"},"intercom.handleAnswer":{capName:"intercom",capScope:"device",addonId:null,access:"create"},"intercom.pushTalkPcm":{capName:"intercom",capScope:"device",addonId:null,access:"create"},"intercom.startSession":{capName:"intercom",capScope:"device",addonId:null,access:"create"},"intercom.startTalkSession":{capName:"intercom",capScope:"device",addonId:null,access:"create"},"intercom.stopSession":{capName:"intercom",capScope:"device",addonId:null,access:"create"},"localNetwork.getAllowedAddresses":{capName:"local-network",capScope:"system",addonId:null,access:"view"},"localNetwork.getConnectionEndpoints":{capName:"local-network",capScope:"system",addonId:null,access:"view"},"localNetwork.getPreferred":{capName:"local-network",capScope:"system",addonId:null,access:"view"},"localNetwork.list":{capName:"local-network",capScope:"system",addonId:null,access:"view"},"localNetwork.resetAllowlistToBestMatch":{capName:"local-network",capScope:"system",addonId:null,access:"delete"},"localNetwork.setAllowedAddresses":{capName:"local-network",capScope:"system",addonId:null,access:"create"},"logDestination.query":{capName:"log-destination",capScope:"system",addonId:null,access:"view"},"logDestination.write":{capName:"log-destination",capScope:"system",addonId:null,access:"create"},"meshNetwork.getStatus":{capName:"mesh-network",capScope:"system",addonId:null,access:"view"},"meshNetwork.join":{capName:"mesh-network",capScope:"system",addonId:null,access:"create"},"meshNetwork.leave":{capName:"mesh-network",capScope:"system",addonId:null,access:"create"},"meshNetwork.listPeers":{capName:"mesh-network",capScope:"system",addonId:null,access:"view"},"meshNetwork.logout":{capName:"mesh-network",capScope:"system",addonId:null,access:"create"},"meshNetwork.startLogin":{capName:"mesh-network",capScope:"system",addonId:null,access:"create"},"meshNetwork.testConnection":{capName:"mesh-network",capScope:"system",addonId:null,access:"create"},"metricsProvider.collectSnapshot":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getAddonStats":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getCached":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getCpuTemperature":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getCurrent":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getDiskSpace":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getGpuInfo":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getProcessStats":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.killProcess":{capName:"metrics-provider",capScope:"system",addonId:null,access:"create"},"metricsProvider.listAddonInstances":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.listNodeProcesses":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"motion.isDetected":{capName:"motion",capScope:"device",addonId:null,access:"view"},"motionDetection.analyze":{capName:"motion-detection",capScope:"device",addonId:null,access:"create"},"motionDetection.removeCamera":{capName:"motion-detection",capScope:"device",addonId:null,access:"delete"},"motionDetection.reset":{capName:"motion-detection",capScope:"device",addonId:null,access:"delete"},"motionTrigger.setMotionTrigger":{capName:"motion-trigger",capScope:"device",addonId:null,access:"create"},"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.send":{capName:"notification-output",capScope:"system",addonId:null,access:"create"},"notificationOutput.sendTest":{capName:"notification-output",capScope:"system",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"},"pipelineAnalytics.clearTracks":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"delete"},"pipelineAnalytics.getActiveTracks":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.getAudioEvents":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.getEventMedia":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.getMotionEvents":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.getObjectEvents":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.getTrack":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.getTrackMedia":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.listTracks":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineExecutor.cacheFrameInPool":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.deleteModel":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"delete"},"pipelineExecutor.deleteTemplate":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"delete"},"pipelineExecutor.detect":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.downloadModel":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.getAddonModels":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getAudioCapabilities":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getAvailableEngines":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getCapabilities":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getDefaultSteps":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getDetectionConfigSchema":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getEffectiveTuning":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getGlobalPipelineConfig":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getGlobalSteps":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getOrchestratorConfigSchema":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getReferenceAudio":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getReferenceAudioFiles":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getReferenceImage":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getSchema":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getSelectedEngine":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getVideoPipelineSteps":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.inferCached":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.killEngine":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.listLoadedEngines":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.listReferenceImages":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.listTemplates":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.reprobeEngine":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.runAudioTest":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.runPipeline":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.runPipelineBatch":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.saveTemplate":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.setVideoPipelineSteps":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.spinEngine":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.uncacheFrame":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.updateTemplate":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.assignAudio":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.assignDecoder":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.assignPipeline":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.deleteTemplate":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"delete"},"pipelineOrchestrator.getAgentLoad":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getAgentSettings":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getAudioAssignment":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getAudioAssignments":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getAudioNodeLoad":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getCameraMetrics":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getCameraSettings":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getCameraStepOverrides":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getCapabilityBindings":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getDecoderAssignment":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getDecoderAssignments":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getGlobalMetrics":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getPipelineAssignment":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getPipelineAssignments":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.listAgentSettings":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.listTemplates":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.rebalance":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.removeAgentSettings":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"delete"},"pipelineOrchestrator.resolvePipeline":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.saveTemplate":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.setAgentAddonDefaults":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.setCameraPipelineForAgent":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.setCameraStepOverride":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.setCameraStepToggle":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.setCapabilityBinding":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.unassignAudio":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.unassignDecoder":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.unassignPipeline":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.updateTemplate":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineRunner.attachCamera":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"create"},"pipelineRunner.detachCamera":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"create"},"pipelineRunner.getAllCameraMetrics":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"view"},"pipelineRunner.getCameraMetrics":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"view"},"pipelineRunner.getLocalCameras":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"view"},"pipelineRunner.getLocalLoad":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"view"},"pipelineRunner.getLocalMetrics":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"view"},"pipelineRunner.reportMotion":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"create"},"platformProbe.getCapabilities":{capName:"platform-probe",capScope:"system",addonId:null,access:"view"},"platformProbe.getHardware":{capName:"platform-probe",capScope:"system",addonId:null,access:"view"},"platformProbe.getHardwareEncoders":{capName:"platform-probe",capScope:"system",addonId:null,access:"view"},"platformProbe.refreshHardwareEncoders":{capName:"platform-probe",capScope:"system",addonId:null,access:"create"},"platformProbe.resolveHwAccel":{capName:"platform-probe",capScope:"system",addonId:null,access:"view"},"platformProbe.resolveInferenceConfig":{capName:"platform-probe",capScope:"system",addonId:null,access:"view"},"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.getPlaybackUrl":{capName:"recording",capScope:"device",addonId:null,access:"view"},"recording.getSegments":{capName:"recording",capScope:"device",addonId:null,access:"view"},"recording.getThumbnailAt":{capName:"recording",capScope:"device",addonId:null,access:"view"},"recordingEngine.disable":{capName:"recording-engine",capScope:"system",addonId:null,access:"create"},"recordingEngine.enable":{capName:"recording-engine",capScope:"system",addonId:null,access:"create"},"recordingEngine.estimateGlobalStorage":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.estimateStorage":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getAvailability":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getConfig":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getMotionStats":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getPlaylist":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getPolicy":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getPolicyStatus":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getRetentionConfig":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getSegments":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getStatus":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getStorageUsage":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getThumbnail":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.setPolicy":{capName:"recording-engine",capScope:"system",addonId:null,access:"create"},"recordingEngine.updateConfig":{capName:"recording-engine",capScope:"system",addonId:null,access:"create"},"recordingEngine.updateRetentionConfig":{capName:"recording-engine",capScope:"system",addonId:null,access:"create"},"restreamer.getExposedResources":{capName:"restreamer",capScope:"system",addonId:null,access:"view"},"restreamer.registerDevice":{capName:"restreamer",capScope:"system",addonId:null,access:"create"},"restreamer.unregisterDevice":{capName:"restreamer",capScope:"system",addonId:null,access:"delete"},"settingsStore.count":{capName:"settings-store",capScope:"system",addonId:null,access:"view"},"settingsStore.declareCollection":{capName:"settings-store",capScope:"system",addonId:null,access:"create"},"settingsStore.delete":{capName:"settings-store",capScope:"system",addonId:null,access:"delete"},"settingsStore.get":{capName:"settings-store",capScope:"system",addonId:null,access:"view"},"settingsStore.insert":{capName:"settings-store",capScope:"system",addonId:null,access:"create"},"settingsStore.isEmpty":{capName:"settings-store",capScope:"system",addonId:null,access:"view"},"settingsStore.query":{capName:"settings-store",capScope:"system",addonId:null,access:"view"},"settingsStore.set":{capName:"settings-store",capScope:"system",addonId:null,access:"create"},"settingsStore.update":{capName:"settings-store",capScope:"system",addonId:null,access:"create"},"smtpProvider.getStatus":{capName:"smtp-provider",capScope:"system",addonId:null,access:"view"},"smtpProvider.sendEmail":{capName:"smtp-provider",capScope:"system",addonId:null,access:"create"},"smtpProvider.verify":{capName:"smtp-provider",capScope:"system",addonId:null,access:"view"},"snapshot.getSnapshot":{capName:"snapshot",capScope:"device",addonId:null,access:"view"},"snapshot.invalidateCache":{capName:"snapshot",capScope:"device",addonId:null,access:"create"},"snapshotProvider.getSnapshot":{capName:"snapshot-provider",capScope:"system",addonId:null,access:"view"},"snapshotProvider.supportsDevice":{capName:"snapshot-provider",capScope:"system",addonId:null,access:"view"},"ssoBridge.signBridgeToken":{capName:"sso-bridge",capScope:"system",addonId:null,access:"view"},"ssoBridge.verifyBridgeToken":{capName:"sso-bridge",capScope:"system",addonId:null,access:"view"},"storage.abortUpload":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.beginDownload":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.beginUpload":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.delete":{capName:"storage",capScope:"system",addonId:null,access:"delete"},"storage.deleteLocation":{capName:"storage",capScope:"system",addonId:null,access:"delete"},"storage.endDownload":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.exists":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.finalizeUpload":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.getAvailableSpace":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.getDefaultLocation":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.list":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.listLocations":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.listProviders":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.read":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.readChunk":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.resolve":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.testConfig":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.testLocation":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.upsertLocation":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.write":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.writeChunk":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storageProvider.abortUpload":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"storageProvider.beginDownload":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"storageProvider.beginUpload":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"storageProvider.delete":{capName:"storage-provider",capScope:"system",addonId:null,access:"delete"},"storageProvider.endDownload":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"storageProvider.exists":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.finalizeUpload":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"storageProvider.getAvailableSpace":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.getProviderInfo":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.list":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.read":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.readChunk":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.resolve":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.testLocation":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.write":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"storageProvider.writeChunk":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"streamBroker.assignProfile":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.getAllRtspEntries":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.getBrokerStats":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.getPreBufferInfo":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.getRtspEntry":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.getRtspPort":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.getStreamUrl":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.getStreamWithCodec":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.isRtspEnabled":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.killClient":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.listAllCameraStreams":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.listAllProfileSlots":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.listClients":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.publishCameraStream":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.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"},"streamingEngine.getStreamUrl":{capName:"streaming-engine",capScope:"system",addonId:null,access:"view"},"streamingEngine.listStreams":{capName:"streaming-engine",capScope:"system",addonId:null,access:"view"},"streamingEngine.registerStream":{capName:"streaming-engine",capScope:"system",addonId:null,access:"create"},"streamingEngine.unregisterStream":{capName:"streaming-engine",capScope:"system",addonId:null,access:"delete"},"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"},"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.beginRegistration":{capName:"user-passkeys",capScope:"system",addonId:null,access:"create"},"userPasskeys.finishAuthentication":{capName:"user-passkeys",capScope:"system",addonId:null,access:"view"},"userPasskeys.finishRegistration":{capName:"user-passkeys",capScope:"system",addonId:null,access:"create"},"userPasskeys.listPasskeys":{capName:"user-passkeys",capScope:"system",addonId:null,access:"view"},"userPasskeys.removePasskey":{capName:"user-passkeys",capScope:"system",addonId:null,access:"delete"},"webrtc.closeSession":{capName:"webrtc",capScope:"system",addonId:null,access:"create"},"webrtc.createSession":{capName:"webrtc",capScope:"system",addonId:null,access:"create"},"webrtc.handleAnswer":{capName:"webrtc",capScope:"system",addonId:null,access:"create"},"webrtc.handleOffer":{capName:"webrtc",capScope:"system",addonId:null,access:"create"},"webrtc.hasAdaptiveBitrate":{capName:"webrtc",capScope:"system",addonId:null,access:"view"},"webrtc.registerStream":{capName:"webrtc",capScope:"system",addonId:null,access:"create"},"webrtc.supportsStream":{capName:"webrtc",capScope:"system",addonId:null,access:"view"},"webrtc.unregisterStream":{capName:"webrtc",capScope:"system",addonId:null,access:"delete"},"webrtcSession.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.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"}}),sg=["addon-pages","addon-pages-source","addon-routes","addon-settings","addon-widgets","addon-widgets-source","addons","admin-ui","advanced-notifier","alerts","audio-analysis","audio-analyzer","audio-codec","audio-metrics","auth-provider","backup","brightness","camera-credentials","camera-streams","decoder","device-discovery","device-export","device-manager","device-ops","device-provider","device-state","embedding-encoder","events","integrations","intercom","local-network","log-destination","mesh-network","metrics-provider","motion","motion-detection","motion-trigger","motion-zones","mqtt-broker","native-object-detection","network-access","network-quality","nodes","notification-output","oauth-integration","osd","pipeline-analytics","pipeline-executor","pipeline-orchestrator","pipeline-runner","platform-probe","privacy-mask","ptz","ptz-autotrack","reboot","recording","recording-engine","restreamer","settings-store","smtp-provider","snapshot","snapshot-provider","sso-bridge","storage","storage-provider","stream-broker","stream-catalog","stream-params","streaming-engine","switch","system","toast","turn-provider","user-management","user-passkeys","webrtc","webrtc-session","zone-analytics","zone-rules","zones"],ig=["audio-analysis","audio-metrics","brightness","camera-credentials","camera-streams","device-discovery","device-ops","events","intercom","motion","motion-detection","motion-trigger","motion-zones","native-object-detection","osd","pipeline-analytics","privacy-mask","ptz","ptz-autotrack","reboot","recording","snapshot","stream-catalog","stream-params","switch","webrtc-session","zone-analytics","zone-rules","zones"],cg=["addon-pages","addon-pages-source","addon-routes","addon-settings","addon-widgets","addon-widgets-source","addons","admin-ui","advanced-notifier","alerts","audio-analyzer","audio-codec","auth-provider","backup","decoder","device-export","device-manager","device-provider","device-state","embedding-encoder","integrations","local-network","log-destination","mesh-network","metrics-provider","mqtt-broker","network-access","network-quality","nodes","notification-output","oauth-integration","pipeline-executor","pipeline-orchestrator","pipeline-runner","platform-probe","recording-engine","restreamer","settings-store","smtp-provider","snapshot-provider","sso-bridge","storage","storage-provider","stream-broker","streaming-engine","system","toast","turn-provider","user-management","user-passkeys","webrtc"],rg=[{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"]}]}],Am=Object.freeze({"device-export":"device-export","mesh-network":"mesh","mqtt-broker":"broker","network-access":"ingress","smtp-provider":"email"}),dg=["device-export","mesh-network","mqtt-broker","network-access","smtp-provider"];function lg(i){const s=[];for(const[n,d]of Object.entries(Am))d===i&&s.push(n);return s}const Cm=[/^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 Nm(i){return Cm.some(s=>s.test(i))}function pg(i){try{const s=new URL(i);let n=!1;(s.username||s.password)&&(s.username="",s.password="",n=!0);for(const d of[...s.searchParams.keys()])Nm(d)&&(s.searchParams.set(d,"***"),n=!0);return n?s.toString():i}catch{return i}}class mg{constructor(s){this.capacity=s,this.items=Array.from({length:s})}items;head=0;tail=0;count=0;get size(){return this.count}push(s){this.items[this.tail]=s,this.tail=(this.tail+1)%this.capacity,this.count<this.capacity?this.count++:this.head=(this.head+1)%this.capacity}drain(s){const n=[],d=Math.min(s,this.count);for(let p=0;p<d;p++)n.push(this.items[this.head]),this.items[this.head]=void 0,this.head=(this.head+1)%this.capacity;return this.count-=d,n}}function ug(i,s,n){const d=s*n;if(d<=0||i.length===0)return new Array(Math.max(0,d)).fill(!1);const p=new Array(d).fill(!1);for(let u=0;u<n;u++)for(let v=0;v<s;v++){const m=(v+.5)/s,y=(u+.5)/n;for(const I of i)if(m>=I.x&&m<=I.x+I.w&&y>=I.y&&y<=I.y+I.h){p[u*s+v]=!0;break}}return p}function gg(i,s,n,d){if(s<=0||n<=0||d<=0)return[];const p=s*n,u=new Array(p).fill(!1),v=Math.min(i.length,p);for(let k=0;k<v;k++)u[k]=i[k]===!0;const m=[],y=[];for(let k=0;k<=n;k++){const C=[];if(k<n){let P=-1;for(let D=0;D<=s;D++){const q=D<s&&u[k*s+D]===!0;q&&P===-1?P=D:!q&&P!==-1&&(C.push({colStart:P,colEnd:D-1}),P=-1)}}const E=new Set,B=[];for(const P of y){const D=C.findIndex(q=>q.colStart===P.colStart&&q.colEnd===P.colEnd);D>=0?(B.push(P),E.add(D)):m.push({...P,rowEnd:k-1})}for(let P=0;P<C.length;P++)if(!E.has(P)){const D=C[P];B.push({colStart:D.colStart,colEnd:D.colEnd,rowStart:k})}y.length=0;for(const P of B)y.push(P)}if(m.length===0)return[];const I=m.slice().sort((k,C)=>{const E=(k.colEnd-k.colStart+1)*(k.rowEnd-k.rowStart+1);return(C.colEnd-C.colStart+1)*(C.rowEnd-C.rowStart+1)-E});return(d>0?I.slice(0,d):I).map(k=>({x:k.colStart/s,y:k.rowStart/n,w:(k.colEnd-k.colStart+1)/s,h:(k.rowEnd-k.rowStart+1)/n}))}function hg(i,s,n){const d={};for(const p of Object.keys(n))d[p]=u=>i.addons.custom.mutate({addonId:s,action:p,input:u});return d}export{Rm as ACCESSORY_LABEL,ag as ALL_CAPABILITY_DEFINITIONS,$o as APPLE_SA_TO_MACRO,Qm as AUDIO_BACKEND_CHOICES,Fo as AUDIO_MACRO_LABELS,tl as AccessoriesStatusSchema,G as AccessoryKind,Ic as AddBrokerInputSchema,Ip as AddonAutoUpdateSchema,hp as AddonListItemSchema,Lc as AddonPageDeclarationSchema,Oc as AddonPageInfoSchema,or as AgentLoadSummarySchema,Ve as AlertSchema,xi as AlertSeveritySchema,Ri as AlertSourceSchema,Ti as AlertStatusSchema,Km as ApiKeyRecordSchema,Nt as ApiKeySummarySchema,Qi as ArchiveEntrySchema,Ji as ArchiveManifestSchema,rr as AudioAnalysisResultSchema,dr as AudioAnalysisSettingsSchema,ha as AudioChunkInputSchema,Xo as AudioClassSummarySchema,ut as AudioClassificationLabelSchema,lr as AudioClassificationResultSchema,ur as AudioCodecInfoSchema,gr as AudioDecodeSessionConfigSchema,hr as AudioEncodeSessionConfigSchema,La as AudioEncodedChunkSchema,Sd as AudioEventSchema,Ps as AudioLevelSchema,es as AudioMetricsHistoryPointSchema,ts as AudioMetricsHistorySchema,la as AudioMetricsSnapshotSchema,vr as AudioPcmChunkSchema,Ze as AuthResultSchema,bp as AutoUpdateSettingsSchema,ip as AvailableIntegrationTypeSchema,oo as BACKEND_TO_FORMAT,Vo as BATTERY_DEVICE_PROFILE,Zi as BackupDestinationInfoSchema,Na as BackupEntrySchema,Op as BaseAddon,Wu as BaseDevice,Gu as BaseDeviceProvider,Ue as BatteryStatusSchema,ne as BoundingBoxSchema,pa as BrightnessStatusSchema,vs as BrokerAudioClientSchema,ys as BrokerClientsSchema,bc as BrokerConnectionDetailsSchema,hs as BrokerDecodedClientSchema,fc as BrokerInfoSchema,gs as BrokerRtspClientSchema,ps as BrokerStatsSchema,ls as BrokerStatusSchema,Lm as CAM_PROFILE_ORDER,eg as CAPABILITY_NAMES,tg as CAPABILITY_ROUTER_KEYS,ng as CAP_NAMES_WITH_STATUS,Am as CAP_PROVIDER_KIND_MAP,_u as COCO_80_LABELS,Fu as COCO_TO_MACRO,K as CamProfileSchema,sl as CamStreamDescriptorSchema,Bt as CamStreamKindSchema,Be as CamStreamResolutionSchema,Kd as CameraCredentialsSchema,jd as CameraCredentialsStatusSchema,Ot as CameraMetricsSchema,Es as CameraMetricsWithDeviceIdSchema,rt as CameraStreamSchema,rc as CapScopeSchema,ir as CapabilityBindingsSchema,Wo as ChargingStatus,$l as ClientNetworkStatsSchema,Xl as ClusterAddonNodeDeploymentSchema,ep as ClusterAddonStatusEntrySchema,tc as CollectionColumnSchema,ac as CollectionIndexSchema,Ir as ConfigEntrySchema,Mi as ConfigSectionWithValuesSchema,Di as ConfigTabDeclarationSchema,xl as CreateApiKeyInputSchema,Tl as CreateApiKeyResultSchema,rp as CreateIntegrationInputSchema,Rl as CreateScopedTokenInputSchema,Bl as CreateScopedTokenResultSchema,Ml as CreateUserInputSchema,xp as CustomActionInputSchema,Bp as DEFAULT_ADDON_PLACEMENT,Jm as DEFAULT_AUDIO_ANALYZER_CONFIG,Ym as DEFAULT_DECODER_HWACCEL_CONFIG,yu as DEFAULT_FEATURES,pu as DEFAULT_LOCATION_SUBDIRS,bu as DEFAULT_RETENTION,ig as DEVICE_CAP_NAMES,Ko as DEVICE_PROFILES,Qo as DEVICE_SETTINGS_CONTRIBUTION_METHODS,Jo as DEVICE_STATUS_METHOD,Hu as DEVICE_TYPE_INFO,cs as DecodedAudioChunkSchema,ma as DecodedFrameSchema,za as DecoderAssignmentSchema,ra as DecoderSessionConfigSchema,_o as DecoderStatsSchema,lp as DeleteIntegrationResultSchema,Ls as DetectorOutputSchema,pe as DeviceConfig,ua as DeviceDiscoveryStatusSchema,Tc as DeviceExportExposeInputSchema,Ra as DeviceExportStatusSchema,Rc as DeviceExportUnexposeInputSchema,dn as DeviceFeature,je as DeviceInfoSchema,Xa as DeviceNetworkStatsSchema,$ as DeviceRole,Ut as DeviceRuntimeState,Le as DeviceStatusSchema,N as DeviceType,mt as DiscoveredChildDeviceSchema,ws as DiscoveredChildStatusSchema,Gm as DiscoveredDeviceSchema,eu as DisposerChain,As as DoorbellPressEventSchema,ga as DoorbellStatusSchema,xu as ElementConfigStore,fr as EmbeddingInfoSchema,_a as EmbeddingResultSchema,ns as EncodedPacketSchema,$c as EnrichedWidgetMetadataSchema,Pe as EventCategory,Ud as EventItemSchema,gd as EventKindSchema,jp as EventSourceType,Dc as ExportSetupFieldSchema,Mc as ExportSetupSchema,xc as ExposedDeviceSchema,Jc as ExposedResourceSchema,Ja as FeatureManifestSchema,_e as FeatureProbeStatusSchema,os as FrameHandleFormatSchema,lt as FrameHandleSchema,Ae as FrameInputSchema,bs as GetStreamWithCodecInputSchema,sr as GlobalMetricsSchema,Iu as HF_BASE_URL,Zp as HF_REPO,Zm as HWACCEL_OPTIONS,_l as HealthStatusSchema,Ge as HistoryPointSchema,Ai as HistoryResolutionEnum,vp as InstalledPackageSchema,tt as IntegrationLiteSchema,en as IntegrationWithStateSchema,nl as IntercomAbilitySchema,Za as IntercomStatusSchema,sg as KNOWN_CAP_NAMES,Xi as LocationStatSchema,Ma as LogEntrySchema,Un as LogLevelSchema,Mp as LogStreamEntrySchema,Uu as MACRO_LABELS,og as METHOD_ACCESS_MAP,qo as MODEL_FORMATS,li as MaskGridDimsSchema,Cn as MaskGridShapeSchema,ri as MaskLineShapeSchema,kn as MaskPointSchema,An as MaskPolygonShapeSchema,di as MaskPolygonVerticesSchema,wn as MaskRectShapeSchema,Nn as MaskShapeKindSchema,$m as MaskShapeSchema,$a as MediaFileSchema,Nl as MeshPeerSchema,Pl as MeshStatusSchema,fe as MethodAccessSchema,Ds as MotionAnalysisResultSchema,vd as MotionEventSchema,ii as MotionOnMotionChangedDataSchema,Me as MotionRegionSchema,zt as MotionSourceEnum,ti as MotionSourcesSchema,ya as MotionStatusSchema,ci as MotionTriggerRuntimeStateSchema,bn as MotionTriggerStatusSchema,pi as MotionZoneOptionsSchema,mi as MotionZonePatchSchema,Pn as MotionZoneRegionSchema,Sa as MotionZoneStatusSchema,Ta as MqttBrokerStatusSchema,Mn as NativeDetectionSchema,vt as NativeObjectClassEnum,ui as NativeObjectDetectionRuntimeStateSchema,En as NativeObjectDetectionStatusSchema,Tr as NetworkAccessStatusSchema,Ul as NetworkAddressSchema,Re as NetworkEndpointSchema,Gr as NotificationHistoryEntrySchema,Ua as NotificationRuleSchema,Ur as NotificationSchema,lc as OauthIntegrationDescriptorSchema,yd as ObjectEventSchema,Fm as OrchestratorMetricsSchema,Qd as OsdOverlayKindEnum,Xd as OsdOverlayPatchSchema,Jd as OsdOverlaySchema,At as OsdPositionEnum,ja as OsdStatusSchema,Rp as PIPELINE_FLOW_CAPABILITY_NAMES,Xm as PIPELINE_OWNER_CAPABILITY_NAMES,dg as PROVIDER_KIND_CAP_NAMES,Xp as PYTHON_SCRIPT,yp as PackageUpdateSchema,Sp as PackageVersionInfoSchema,mc as PasskeySummarySchema,qe as PcmSampleFormatSchema,St as PerScopeBreakdownSchema,Oa as PipelineAssignmentSchema,ht as PipelineDefaultStepSchema,T as PipelineEngineChoiceSchema,va as PipelineRunResultBridge,ae as PipelineStepInputSchema,Um as PlaceholderReasonSchema,ei as PolygonPointSchema,hi as PrivacyMaskOptionsSchema,vi as PrivacyMaskPatchSchema,Tn as PrivacyMaskRegionSchema,gi as PrivacyMaskShapeSchema,fa as PrivacyMaskStatusSchema,dt as ProfileSlotSchema,we as ProfileSlotStatusSchema,Ni as ProviderStatusSchema,fi as PtzAutotrackRuntimeStateSchema,yt as PtzAutotrackSettingsSchema,Ce as PtzAutotrackStatusSchema,Si as PtzAutotrackTargetOptionSchema,Ka as PtzMoveCommandSchema,Jn as PtzPositionSchema,Od as PtzPresetSchema,zd as PtzStatusSchema,Pa as QueryFilterSchema,fu as RECOGNITION_TYPES,ku as RUNTIME_DEFAULTS,Jp as RUNTIME_TO_FORMAT,ru as ReadinessRegistry,Fp as ReadinessTimeoutError,Qc as RegisteredStreamSchema,ai as ReportMotionInputSchema,mg as RingBuffer,Is as RtpSourceSchema,pt as RtspRestreamEntrySchema,ni as RunnerCameraConfigSchema,Hm as RunnerCameraDeviceUIFields,Sn as RunnerLocalLoadSchema,oi as RunnerLocalMetricsSchema,rg as SCOPE_PRESETS,Em as STORAGE_LOCATION_CARDINALITY,lu as STORAGE_LOCATION_TYPES,km as STREAM_PROFILE_META,$p as STREAM_QUALITY_LABELS,Su as SUB_DETECTION_TYPES,cg as SYSTEM_CAP_NAMES,jm as ScopedTokenSchema,Pt as ScopedTokenSummarySchema,fp as SearchResultSchema,Hd as SegmentSchema,gc as SendEmailInputSchema,hc as SendEmailResultSchema,Aa as SettingsPatchSchema,Da as SettingsRecordSchema,J as SettingsSchemaWithValuesSchema,Ca as SettingsUpdateResultSchema,Zc as ShmRingStatsSchema,xa as SmtpStatusSchema,Kn as SnapshotImageSchema,Ns as SpatialDetectionSchema,Ea as SsoBridgeClaimsSchema,Ac as StartEmbeddedInputSchema,Hi as StorageAbortUploadInputSchema,$i as StorageBeginDownloadInputSchema,Wi as StorageBeginDownloadResultSchema,Li as StorageBeginUploadInputSchema,_i as StorageBeginUploadResultSchema,Vi as StorageEndDownloadInputSchema,Fi as StorageFinalizeUploadInputSchema,H as StorageLocationRefSchema,O as StorageLocationSchema,te as StorageLocationTypeSchema,Oi as StorageProviderInfoSchema,Gi as StorageReadChunkInputSchema,zi as StorageTestLocationResultSchema,Ui as StorageWriteChunkInputSchema,qt as StreamFormatSchema,ms as StreamInfoSchema,Hl as StreamNetworkStatsSchema,Ii as StreamParamsOptionsSchema,ba as StreamParamsStatusSchema,He as StreamProfileConfigSchema,$e as StreamProfileOptionsSchema,ki as StreamProfilePatchSchema,bi as StreamProfileSchema,as as StreamSourceEntrySchema,_m as StreamSourceSchema,rs as SubscribeAudioChunksInputSchema,ds as SubscribeAudioChunksResultSchema,ss as SubscribeFramesInputSchema,is as SubscribeFramesResultSchema,Ia as SwitchStatusSchema,Bd as SystemMetricsSchema,Zu as SystemMirror,cp as TestConnectionResultSchema,Gl as ToastSchema,z as TokenScopeSchema,Ql as TopologyNodeSchema,jl as TopologyProcessSchema,Kl as TopologyServiceSchema,Ye as TrackSchema,Lt as TrackStateSchema,kd as TrackedDetectionSchema,qr as TurnServerSchema,dp as UpdateIntegrationInputSchema,El as UpdateUserInputSchema,Vm as UserRecordSchema,Xe as UserSummarySchema,Oo as WELL_KNOWN_TABS,Mm as WELL_KNOWN_TAB_MAP,tr as WebrtcStreamChoiceSchema,bt as WebrtcStreamTargetSchema,Uc as WidgetHostEnum,$n as WidgetMetadataSchema,Fc as WidgetRemoteSchema,Ba as WidgetSizeEnum,Ho as YAMNET_TO_MACRO,Xs as ZoneKindEnum,Ci as ZoneRuleModeEnum,le as ZoneRuleSchema,wa as ZoneRuleStageEnum,Wm as ZoneRulesArraySchema,de as ZoneSchema,wi as ZoneScopeBreakdownSchema,al as accessoriesCapability,Bm as accessoryStableId,zc as addonPagesCapability,_c as addonPagesSourceCapability,jc as addonRoutesCapability,Ei as addonSettingsCapability,Wc as addonWidgetsCapability,Hc as addonWidgetsSourceCapability,Tp as addonsCapability,cc as adminUiCapability,Kr as advancedNotifierCapability,Bi as alertsCapability,Nu as asBoolean,wu as asJsonArray,Yp as asJsonObject,Cu as asNumber,Au as asString,mr as audioAnalysisCapability,pr as audioAnalyzerCapability,Sr as audioCodecCapability,ln as audioMetricsCapability,xr as authProviderCapability,vu as autoAssignProfiles,ec as backupCapability,pn as batteryCapability,hg as bindAddonActions,mn as brightnessCapability,cu as buildAddonRouteProvider,Ju as buildStreamParamsConfigSchema,Zd as cameraCredentialsCapability,ud as cameraPipelineConfigCapability,gn as cameraStreamsCapability,gg as cellsToRects,uu as classifyStream,Gp as classifyStreams,Eu as cosineSimilarity,gm as createDeviceProxy,ao as createEvent,io as createLazyTrpcSource,mm as createMirrorSource,$u as createRuntimeStateBridge,x as createSliceHandle,ju as createSystemProxy,Qu as customAction,Yc as decoderCapability,Yu as defineCustomActions,md as detectionPipelineCapability,hn as deviceDiscoveryCapability,Bc as deviceExportCapability,Mr as deviceManagerCapability,Go as deviceMatchesProfile,Vd as deviceOpsCapability,_n as deviceProviderCapability,Er as deviceStateCapability,Tt as deviceStatusCapability,vn as doorbellCapability,br as embeddingEncoderCapability,du as emitDownForOwnedCaps,qp as emitReadiness,Uo as errMsg,Ku as evaluateZoneRules,Y as event,Fd as eventsCapability,Om as expandCapMethods,Rt as featureProbeCapability,Bu as formatForBackend,qu as formatForRuntime,Tm as getAudioMacroClassIds,lg as getCapsByProviderKind,Mu as hfModelUrl,ca as hydrateSchema,pp as integrationsCapability,ol as intercomCapability,au as isAgentOnlyPlacement,tu as isDeployableToAgent,zm as isDeviceConfigCap,iu as isEvent,Al as localNetworkCapability,oc as logDestinationCapability,xm as mapAudioLabelToMacro,pg as maskUrlCredentials,Dl as meshNetworkCapability,c as method,qd as metricsProviderCapability,fn as motionCapability,Ms as motionDetectionCapability,In as motionTriggerCapability,Dn as motionZonesCapability,Nc as mqttBrokerCapability,xn as nativeObjectDetectionCapability,Br as networkAccessCapability,Wl as networkQualityCapability,sp as nodesCapability,zp as normalizeAddonInitResult,Fr as notificationOutputCapability,pc as oauthIntegrationCapability,el as osdCapability,hu as parseCameraStreamConfig,Du as parseJsonArray,Pu as parseJsonObject,no as parseJsonUnknown,Xu as parseStreamParamsFormPatch,wd as pipelineAnalyticsCapability,Js as pipelineExecutorCapability,cr as pipelineOrchestratorCapability,si as pipelineRunnerCapability,Sl as platformProbeCapability,Rn as privacyMaskCapability,Bn as ptzAutotrackCapability,_d as ptzCapability,Ou as pythonScriptForBackend,at as readinessKey,Yd as rebootCapability,$d as recordingCapability,pd as recordingEngineCapability,ug as rectsToCells,zu as requiresPython,Oe as resolveAddonExecution,nu as resolveAddonGroup,su as resolveAddonPlacement,Ru as resolveAddonRuntime,em as resolveDetectionRuntime,qm as resolveDeviceProfile,Tu as resolveModelFormat,ou as resolveRunnerId,Xc as restreamerCapability,Lu as runInferenceStep,ee as scopeKey,nc as settingsStoreCapability,vc as smtpProviderCapability,Lr as snapshotCapability,_r as snapshotProviderCapability,dc as ssoBridgeCapability,qi as storageCapability,Ki as storageProviderCapability,ks as streamBrokerCapability,il as streamCatalogCapability,qn as streamParamsCapability,Wp as streamPixels,mu as streamQualityLabel,us as streamingEngineCapability,On as switchCapability,Fl as systemCapability,om as toDeviceSummary,gu as toStreamSourceEntry,Vl as toastCapability,Or as turnProviderCapability,Ll as userManagementCapability,uc as userPasskeysCapability,er as webrtcCapability,Wn as webrtcClientHintsSchema,ar as webrtcSessionCapability,Ro as wiringAddonHealthSchema,Dm as wiringHealthSnapshotSchema,Bo as wiringNodeHealthSchema,To as wiringProbeKindSchema,ia as wiringProbeResultSchema,Vu as zodEntriesToConfigUI,zn as zoneAnalyticsCapability,Ln as zoneRulesCapability,yn as zonesCapability};
|