@camstack/addon-admin-ui 0.1.31 → 0.1.33
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-BMrP2H8p.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-DJQnlBBe.js} +1 -1
- package/dist/assets/devices-BnLu5dxg.js +1 -0
- package/dist/assets/{hostInit-DIOhqSQ8.js → hostInit-DQ5UjxJa.js} +1 -1
- package/dist/assets/{index-B7F0mwMZ.js → index-BmzE49kT.js} +1 -1
- package/dist/assets/index-CMxz0koW.js +1 -0
- package/dist/assets/index-DFRMwfPq.js +1 -0
- package/dist/assets/{index-B4mdRb1N.js → index-DIIqKU3D.js} +1 -1
- package/dist/assets/index-DRW7rVhn.js +1133 -0
- package/dist/assets/index-DYSrVZ4G.js +1 -0
- package/dist/assets/index-DeVjiPqm.js +1 -0
- package/dist/assets/index-DuHBxCOe.js +1 -0
- package/dist/assets/{index-DUfO0e8s.js → index-Dv0-1gwL.js} +25 -25
- package/dist/assets/{index-B3ayOsQz.js → index-NNW--T4H.js} +26 -26
- package/dist/assets/index-dePEzy7t.js +1 -0
- package/dist/assets/{index-CMnchRgf.css → index-n9RexO7D.css} +1 -1
- package/dist/assets/method-access-map-OoQznstl.js +1 -0
- package/dist/assets/{remoteEntry-6Pin_7dI.js → remoteEntry-D28y34bi.js} +1 -1
- package/dist/assets/{schemas-XgIEoUz3.js → schemas-DZqswtjx.js} +4 -4
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-8g-kqXK4.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-BXwMMqlX.js} +2 -2
- package/dist/index.html +7 -7
- package/dist/mf-entry-bootstrap-0.js +2 -2
- package/dist/server/addon.js +13480 -3
- package/dist/server/addon.js.map +1 -1
- package/dist/sw.js +1 -1
- package/package.json +1 -1
- package/dist/assets/devices-CZsVkxKZ.js +0 -1
- package/dist/assets/index-4wFotr3p.js +0 -1
- package/dist/assets/index-DJIpFuqj.js +0 -1
- package/dist/assets/index-DSFtUS7Z.js +0 -1
- package/dist/assets/index-Dc2Moq2w.js +0 -1
- package/dist/assets/index-FDG6Ru4K.js +0 -1
- package/dist/assets/index-Z_9-zlb_.js +0 -1
- package/dist/assets/index-lh_RKGLY.js +0 -1118
- package/dist/assets/method-access-map-D3ooxuVS.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as a}from"./preload-helper-BlTxHScW.js";import"./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-
|
|
1
|
+
import{_ as a}from"./preload-helper-BlTxHScW.js";import"./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-BXwMMqlX.js";const n={"@camstack/sdk":async()=>await a(()=>import("./index-CMxz0koW.js").then(r=>r.i),[]),"@camstack/types":async()=>await a(()=>import("./index-DuHBxCOe.js"),[]),"@camstack/ui-library":async()=>await a(()=>import("./index-NNW--T4H.js").then(r=>r.i),[]),"@tanstack/react-query":async()=>await a(()=>import("./__mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.mjs-CeLhKMin.js").then(r=>r.q),[]),"@trpc/client":async()=>await a(()=>import("./__mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_client__loadShare__.mjs-DIkg6-MH.js").then(r=>r.G),[]),"@trpc/react-query":async()=>await a(()=>import("./__mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.mjs-OcRSBqRe.js").then(r=>r.b),[]),react:async()=>await a(()=>import("./__mfe_internal__admin_ui_host__loadShare__react__loadShare__.mjs-Dl4u0xYE.js").then(r=>r._),[]),"react-dom":async()=>await a(()=>import("./__mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.mjs-CzO_Esxm.js").then(r=>r._),[]),"react-dom/client":async()=>await a(()=>import("./__mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs-DNpf5SLz.js").then(r=>r._),[]),"react/jsx-runtime":async()=>await a(()=>import("./__mfe_internal__admin_ui_host__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs-C_6K4VBY.js").then(r=>r._),[])},o={"@camstack/sdk":{name:"@camstack/sdk",version:"0.1.47",scope:["default"],loaded:!1,from:"__mfe_internal__admin_ui_host",async get(){o["@camstack/sdk"].loaded=!0;const{"@camstack/sdk":e}=n,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"^0.1.47"}},"@camstack/types":{name:"@camstack/types",version:"0.1.33",scope:["default"],loaded:!1,from:"__mfe_internal__admin_ui_host",async get(){o["@camstack/types"].loaded=!0;const{"@camstack/types":e}=n,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"^0.1.33"}},"@camstack/ui-library":{name:"@camstack/ui-library",version:"0.1.50",scope:["default"],loaded:!1,from:"__mfe_internal__admin_ui_host",async get(){o["@camstack/ui-library"].loaded=!0;const{"@camstack/ui-library":e}=n,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"^0.1.50"}},"@tanstack/react-query":{name:"@tanstack/react-query",version:"5.100.9",scope:["default"],loaded:!1,from:"__mfe_internal__admin_ui_host",async get(){o["@tanstack/react-query"].loaded=!0;const{"@tanstack/react-query":e}=n,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"^5.100.9"}},"@trpc/client":{name:"@trpc/client",version:"11.17.0",scope:["default"],loaded:!1,from:"__mfe_internal__admin_ui_host",async get(){o["@trpc/client"].loaded=!0;const{"@trpc/client":e}=n,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"^11.17.0"}},"@trpc/react-query":{name:"@trpc/react-query",version:"11.17.0",scope:["default"],loaded:!1,from:"__mfe_internal__admin_ui_host",async get(){o["@trpc/react-query"].loaded=!0;const{"@trpc/react-query":e}=n,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"^11.17.0"}},react:{name:"react",version:"19.2.5",scope:["default"],loaded:!1,from:"__mfe_internal__admin_ui_host",async get(){o.react.loaded=!0;const{react:e}=n,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"^19.2.5"}},"react-dom":{name:"react-dom",version:"19.2.5",scope:["default"],loaded:!1,from:"__mfe_internal__admin_ui_host",async get(){o["react-dom"].loaded=!0;const{"react-dom":e}=n,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"^19.2.5"}},"react-dom/client":{name:"react-dom/client",version:"19.2.5",scope:["default"],loaded:!1,from:"__mfe_internal__admin_ui_host",async get(){o["react-dom/client"].loaded=!0;const{"react-dom/client":e}=n,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"^19.2.5"}},"react/jsx-runtime":{name:"react/jsx-runtime",version:"19.2.5",scope:["default"],loaded:!1,from:"__mfe_internal__admin_ui_host",async get(){o["react/jsx-runtime"].loaded=!0;const{"react/jsx-runtime":e}=n,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"^19.2.5"}}},c=[];export{c as usedRemotes,o as usedShared};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as we,c as L,F as _e,s as be}from"./__mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_client__loadShare__.mjs-DIkg6-MH.js";import{e as x,f as Ee}from"./index-DeVjiPqm.js";class Pe{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(t,r){this.keyToValue.set(t,r),this.valueToKey.set(r,t)}getByKey(t){return this.keyToValue.get(t)}getByValue(t){return this.valueToKey.get(t)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}}class q{constructor(t){this.generateIdentifier=t,this.kv=new Pe}register(t,r){this.kv.getByValue(t)||(r||(r=this.generateIdentifier(t)),this.kv.set(r,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}}class ve extends q{constructor(){super(t=>t.name),this.classToAllowedProps=new Map}register(t,r){typeof r=="object"?(r.allowProps&&this.classToAllowedProps.set(t,r.allowProps),super.register(t,r.identifier)):super.register(t,r)}getAllowedProps(t){return this.classToAllowedProps.get(t)}}function Ce(e){if("values"in Object)return Object.values(e);const t=[];for(const r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t}function ke(e,t){const r=Ce(e);if("find"in r)return r.find(t);const n=r;for(let s=0;s<n.length;s++){const i=n[s];if(t(i))return i}}function g(e,t){Object.entries(e).forEach(([r,n])=>t(n,r))}function C(e,t){return e.indexOf(t)!==-1}function D(e,t){for(let r=0;r<e.length;r++){const n=e[r];if(t(n))return n}}class Se{constructor(){this.transfomers={}}register(t){this.transfomers[t.name]=t}findApplicable(t){return ke(this.transfomers,r=>r.isApplicable(t))}findByName(t){return this.transfomers[t]}}const Ie=e=>Object.prototype.toString.call(e).slice(8,-1),K=e=>typeof e>"u",Te=e=>e===null,E=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,I=e=>E(e)&&Object.keys(e).length===0,p=e=>Array.isArray(e),Re=e=>typeof e=="string",Ae=e=>typeof e=="number"&&!isNaN(e),Oe=e=>typeof e=="boolean",Me=e=>e instanceof RegExp,P=e=>e instanceof Map,v=e=>e instanceof Set,W=e=>Ie(e)==="Symbol",Ne=e=>e instanceof Date&&!isNaN(e.valueOf()),F=e=>e instanceof Error,B=e=>typeof e=="number"&&isNaN(e),Le=e=>Oe(e)||Te(e)||K(e)||Ae(e)||Re(e)||W(e),xe=e=>typeof e=="bigint",De=e=>e===1/0||e===-1/0,Be=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),Ve=e=>e instanceof URL,T=e=>e.replace(/\\/g,"\\\\").replace(/\./g,"\\."),S=e=>e.map(String).map(T).join("."),b=(e,t)=>{const r=[];let n="";for(let i=0;i<e.length;i++){let o=e.charAt(i);if(!t&&o==="\\"){const u=e.charAt(i+1);if(u==="\\"){n+="\\",i++;continue}else if(u!==".")throw Error("invalid path")}if(o==="\\"&&e.charAt(i+1)==="."){n+=".",i++;continue}if(o==="."){r.push(n),n="";continue}n+=o}const s=n;return r.push(s),r};function m(e,t,r,n){return{isApplicable:e,annotation:t,transform:r,untransform:n}}const $=[m(K,"undefined",()=>null,()=>{}),m(xe,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),m(Ne,"Date",e=>e.toISOString(),e=>new Date(e)),m(F,"Error",(e,t)=>{const r={name:e.name,message:e.message};return"cause"in e&&(r.cause=e.cause),t.allowedErrorProps.forEach(n=>{r[n]=e[n]}),r},(e,t)=>{const r=new Error(e.message,{cause:e.cause});return r.name=e.name,r.stack=e.stack,t.allowedErrorProps.forEach(n=>{r[n]=e[n]}),r}),m(Me,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),r=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,r)}),m(v,"set",e=>[...e.values()],e=>new Set(e)),m(P,"map",e=>[...e.entries()],e=>new Map(e)),m(e=>B(e)||De(e),"number",e=>B(e)?"NaN":e>0?"Infinity":"-Infinity",Number),m(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),m(Ve,"URL",e=>e.toString(),e=>new URL(e))];function k(e,t,r,n){return{isApplicable:e,annotation:t,transform:r,untransform:n}}const Y=k((e,t)=>W(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,r)=>{const n=r.symbolRegistry.getValue(t[1]);if(!n)throw new Error("Trying to deserialize unknown symbol");return n}),Ue=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),G=k(Be,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const r=Ue[t[1]];if(!r)throw new Error("Trying to deserialize unknown typed array");return new r(e)});function H(e,t){return e?.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}const X=k(H,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const r=t.classRegistry.getAllowedProps(e.constructor);if(!r)return{...e};const n={};return r.forEach(s=>{n[s]=e[s]}),n},(e,t,r)=>{const n=r.classRegistry.getValue(t[1]);if(!n)throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(n.prototype),e)}),Q=k((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,r)=>{const n=r.customTransformerRegistry.findByName(t[1]);if(!n)throw new Error("Trying to deserialize unknown custom value");return n.deserialize(e)}),ze=[X,Y,Q,G],V=(e,t)=>{const r=D(ze,s=>s.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation(e,t)};const n=D($,s=>s.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation}},Z={};$.forEach(e=>{Z[e.annotation]=e});const qe=(e,t,r)=>{if(p(t))switch(t[0]){case"symbol":return Y.untransform(e,t,r);case"class":return X.untransform(e,t,r);case"custom":return Q.untransform(e,t,r);case"typed-array":return G.untransform(e,t,r);default:throw new Error("Unknown transformation: "+t)}else{const n=Z[t];if(!n)throw new Error("Unknown transformation: "+t);return n.untransform(e,r)}},y=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const r=e.keys();for(;t>0;)r.next(),t--;return r.next().value};function j(e){if(C(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(C(e,"prototype"))throw new Error("prototype is not allowed as a property");if(C(e,"constructor"))throw new Error("constructor is not allowed as a property")}const Ke=(e,t)=>{j(t);for(let r=0;r<t.length;r++){const n=t[r];if(v(e))e=y(e,+n);else if(P(e)){const s=+n,i=+t[++r]==0?"key":"value",o=y(e,s);switch(i){case"key":e=o;break;case"value":e=e.get(o);break}}else e=e[n]}return e},R=(e,t,r)=>{if(j(t),t.length===0)return r(e);let n=e;for(let i=0;i<t.length-1;i++){const o=t[i];if(p(n)){const c=+o;n=n[c]}else if(E(n))n=n[o];else if(v(n)){const c=+o;n=y(n,c)}else if(P(n)){if(i===t.length-2)break;const l=+o,u=+t[++i]==0?"key":"value",f=y(n,l);switch(u){case"key":n=f;break;case"value":n=n.get(f);break}}}const s=t[t.length-1];if(p(n)?n[+s]=r(n[+s]):E(n)&&(n[s]=r(n[s])),v(n)){const i=y(n,+s),o=r(i);i!==o&&(n.delete(i),n.add(o))}if(P(n)){const i=+t[t.length-2],o=y(n,i);switch(+s==0?"key":"value"){case"key":{const l=r(o);n.set(l,n.get(o)),l!==o&&n.delete(o);break}case"value":{n.set(o,r(n.get(o)));break}}}return e},J=e=>e<1;function A(e,t,r,n=[]){if(!e)return;const s=J(r);if(!p(e)){g(e,(c,l)=>A(c,t,r,[...n,...b(l,s)]));return}const[i,o]=e;o&&g(o,(c,l)=>{A(c,t,r,[...n,...b(l,s)])}),t(i,n)}function We(e,t,r,n){return A(t,(s,i)=>{e=R(e,i,o=>qe(o,s,n))},r),e}function Fe(e,t,r){const n=J(r);function s(i,o){const c=Ke(e,b(o,n));i.map(l=>b(l,n)).forEach(l=>{e=R(e,l,()=>c)})}if(p(t)){const[i,o]=t;i.forEach(c=>{e=R(e,b(c,n),()=>e)}),o&&g(o,s)}else g(t,s);return e}const $e=(e,t)=>E(e)||p(e)||P(e)||v(e)||F(e)||H(e,t);function Ye(e,t,r){const n=r.get(e);n?n.push(t):r.set(e,[t])}function Ge(e,t){const r={};let n;return e.forEach(s=>{if(s.length<=1)return;t||(s=s.map(c=>c.map(String)).sort((c,l)=>c.length-l.length));const[i,...o]=s;i.length===0?n=o.map(S):r[S(i)]=o.map(S)}),n?I(r)?[n]:[n,r]:I(r)?void 0:r}const ee=(e,t,r,n,s=[],i=[],o=new Map)=>{const c=Le(e);if(!c){Ye(e,s,t);const d=o.get(e);if(d)return n?{transformedValue:null}:d}if(!$e(e,r)){const d=V(e,r),h=d?{transformedValue:d.value,annotations:[d.type]}:{transformedValue:e};return c||o.set(e,h),h}if(C(i,e))return{transformedValue:null};const l=V(e,r),u=l?.value??e,f=p(u)?[]:{},w={};g(u,(d,h)=>{if(h==="__proto__"||h==="constructor"||h==="prototype")throw new Error(`Detected property ${h}. This is a prototype pollution risk, please remove it from your object.`);const _=ee(d,t,r,n,[...s,h],[...i,e],o);f[h]=_.transformedValue,p(_.annotations)?w[T(h)]=_.annotations:E(_.annotations)&&g(_.annotations,(ye,ge)=>{w[T(h)+"."+ge]=ye})});const N=I(w)?{transformedValue:f,annotations:l?[l.type]:void 0}:{transformedValue:f,annotations:l?[l.type,w]:w};return c||o.set(e,N),N};function te(e){return Object.prototype.toString.call(e).slice(8,-1)}function U(e){return te(e)==="Array"}function He(e){if(te(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function Xe(e,t,r,n,s){const i={}.propertyIsEnumerable.call(n,t)?"enumerable":"nonenumerable";i==="enumerable"&&(e[t]=r),s&&i==="nonenumerable"&&Object.defineProperty(e,t,{value:r,enumerable:!1,writable:!0,configurable:!0})}function O(e,t={}){if(U(e))return e.map(s=>O(s,t));if(!He(e))return e;const r=Object.getOwnPropertyNames(e),n=Object.getOwnPropertySymbols(e);return[...r,...n].reduce((s,i)=>{if(i==="__proto__"||U(t.props)&&!t.props.includes(i))return s;const o=e[i],c=O(o,t);return Xe(s,i,c,e,t.nonenumerable),s},{})}class a{constructor({dedupe:t=!1}={}){this.classRegistry=new ve,this.symbolRegistry=new q(r=>r.description??""),this.customTransformerRegistry=new Se,this.allowedErrorProps=[],this.dedupe=t}serialize(t){const r=new Map,n=ee(t,r,this,this.dedupe),s={json:n.transformedValue};n.annotations&&(s.meta={...s.meta,values:n.annotations});const i=Ge(r,this.dedupe);return i&&(s.meta={...s.meta,referentialEqualities:i}),s.meta&&(s.meta.v=1),s}deserialize(t,r){const{json:n,meta:s}=t;let i=r?.inPlace?n:O(n);return s?.values&&(i=We(i,s.values,s.v??0,this)),s?.referentialEqualities&&(i=Fe(i,s.referentialEqualities,s.v??0)),i}stringify(t){return JSON.stringify(this.serialize(t))}parse(t){return this.deserialize(JSON.parse(t),{inPlace:!0})}registerClass(t,r){this.classRegistry.register(t,r)}registerSymbol(t,r){this.symbolRegistry.register(t,r)}registerCustom(t,r){this.customTransformerRegistry.register({name:r,...t})}allowErrorProps(...t){this.allowedErrorProps.push(...t)}}a.defaultInstance=new a;a.serialize=a.defaultInstance.serialize.bind(a.defaultInstance);a.deserialize=a.defaultInstance.deserialize.bind(a.defaultInstance);a.stringify=a.defaultInstance.stringify.bind(a.defaultInstance);a.parse=a.defaultInstance.parse.bind(a.defaultInstance);a.registerClass=a.defaultInstance.registerClass.bind(a.defaultInstance);a.registerSymbol=a.defaultInstance.registerSymbol.bind(a.defaultInstance);a.registerCustom=a.defaultInstance.registerCustom.bind(a.defaultInstance);a.allowErrorProps=a.defaultInstance.allowErrorProps.bind(a.defaultInstance);a.serialize;a.deserialize;a.stringify;a.parse;a.registerClass;a.registerCustom;a.registerSymbol;a.allowErrorProps;const Qe=1e4,Ze=3e3,je=2e3,Je=3e4;class et{_serverUrl;useWs;baseRetryMs;maxRetryMs;onConnectionChange;token;_trpcClient;_wsClient=null;mirror=null;mirrorInit=null;connected=!1;connectedPromise=null;_systemProxy;_connectionVersion=0;connectionListeners=new Set;constructor(t){this._serverUrl=t.serverUrl.replace(/\/+$/,""),this.token=t.token;const r=typeof window<"u";this.useWs=t.useWebSocket??r,this.onConnectionChange=t.onConnectionChange,this.baseRetryMs=t.retryDelayMs??je,this.maxRetryMs=t.maxRetryDelayMs??Je,this._trpcClient=this.buildTrpcClient(),this._systemProxy=x(this._trpcClient)}get serverUrl(){return this._serverUrl}get connectionVersion(){return this._connectionVersion}subscribeConnectionEvents(t){return this.connectionListeners.add(t),()=>{this.connectionListeners.delete(t)}}emitConnectionEvent(t){try{this.onConnectionChange?.(t)}catch{}for(const r of this.connectionListeners)try{r(t,this._connectionVersion)}catch{}}async awaitConnected(t){if(this.connected)return;if(this.connectedPromise)return this.connectedPromise;const r=t??15e3;this.connectedPromise=(async()=>{const n=this._trpcClient.auth.me.query();Number.isFinite(r)?await new Promise((s,i)=>{const o=setTimeout(()=>i(new Error(`System.awaitConnected: probe timed out after ${r}ms`)),r);n.then(()=>{clearTimeout(o),s()},c=>{clearTimeout(o),i(c instanceof Error?c:new Error(String(c)))})}):await n,this.connected=!0})();try{await this.connectedPromise}finally{this.connectedPromise=null}}async init(t){if(this.mirror?.isReady())return;if(this.mirrorInit)return this.mirrorInit;const r=new Ee(this._trpcClient);return this.mirror=r,this.mirrorInit=(async()=>{await this.awaitConnected(t),await r.init(t)})().finally(()=>{this.mirrorInit=null}),this.mirrorInit}async awaitReady(){if(!this.mirror?.isReady())return this.mirrorInit?this.mirrorInit:this.init()}isReady(){return this.mirror?.isReady()??!1}isConnected(){return this.connected}reconnect(){this.useWs&&(this.emitConnectionEvent("connecting"),this._wsClient?.close(),this.disposeMirror(),this.connected=!1,this.connectedPromise=null,this._trpcClient=this.buildTrpcClient(),this._systemProxy=x(this._trpcClient))}switchServerUrl(t){const r=t.replace(/\/+$/,"");r!==this._serverUrl&&(this._serverUrl=r,this.reconnect())}async raceConnectionEndpoints(t){const r=t?.perCandidateTimeoutMs??1500,n=(()=>{try{return new URL(this._serverUrl)}catch{return null}})(),s=n?.port?Number(n.port):n?.protocol==="https:"?443:80,i=n?.protocol==="https:"?"https":"http",c=this._trpcClient.localNetwork?.getConnectionEndpoints;if(!c)return{winner:this._serverUrl,switched:!1};let l;try{l=(await c.query({port:s,ipv4Only:t?.ipv4Only,scheme:i})).endpoints}catch{return{winner:this._serverUrl,switched:!1}}if(l.length===0)return{winner:this._serverUrl,switched:!1};const u=await tt(l.map(f=>f.baseUrl),r);return!u||u===this._serverUrl?{winner:u??this._serverUrl,switched:!1}:(this.switchServerUrl(u),{winner:u,switched:!0})}close(){this.disposeMirror(),this.connected=!1,this.connectedPromise=null,this._wsClient?.close()}disposeMirror(){this.mirror?.dispose(),this.mirror=null,this.mirrorInit=null}async login(t,r){const n=await this._trpcClient.auth.login.mutate({username:t,password:r});if(typeof n=="object"&&n!==null&&"token"in n){const s=n,i=s.token;typeof i=="string"&&s.requiresTotp!==!0&&this.setToken(i)}return n}async loginVerifyTotp(t,r){const n=await this._trpcClient.auth.loginVerifyTotp.mutate({challengeToken:t,code:r});if(typeof n=="object"&&n!==null&&"token"in n){const s=n.token;typeof s=="string"&&this.setToken(s)}return n}async logout(){await this._trpcClient.auth.logout.mutate()}async getMe(){return await this._trpcClient.auth.me.query()}async changeOwnPassword(t){return await this._trpcClient.auth.changeOwnPassword.mutate(t)}async setupOwnTotp(){return await this._trpcClient.auth.setupOwnTotp.mutate()}async confirmOwnTotp(t){return await this._trpcClient.auth.confirmOwnTotp.mutate(t)}async disableOwnTotp(){return await this._trpcClient.auth.disableOwnTotp.mutate()}async getOwnTotpStatus(){return await this._trpcClient.auth.getOwnTotpStatus.query()}setToken(t){this.token=t}listDevices(t){return this.mirror?(t?this.mirror.query(t):this.mirror.getAllDevices()).map(n=>this.attachBinding(n)):[]}getDevice(t){const r=this.mirror?.getDeviceById(t)??null;return r?this.attachBinding(r):null}getDeviceByName(t){const r=this.mirror?.getDeviceByName(t)??null;return r?this.attachBinding(r):null}getDeviceByStableId(t){const r=this.mirror?.getDeviceByStableId(t)??null;return r?this.attachBinding(r):null}async waitForDevice(t,r){this.mirror||await this.init();const n=await this.mirror.waitForDevice(t,r??3e4);return this.attachBinding(n)}onDeviceAdded(t){if(!this.mirror)throw new Error("System.onDeviceAdded: call init() before subscribing");return this.mirror.onDeviceAdded(t)}onDeviceRemoved(t){if(!this.mirror)throw new Error("System.onDeviceRemoved: call init() before subscribing");return this.mirror.onDeviceRemoved(t)}attachBinding(t){const r=this.lookupBinding(t.deviceId);if(r===t.binding)return t;const n=t;return n.binding=r,t}lookupBinding(t){return this.mirror?this.mirror.getDeviceById(t)?.binding??null:null}get addonPages(){return this._systemProxy.addonPages}get addonSettings(){return this._systemProxy.addonSettings}get alerts(){return this._systemProxy.alerts}get audioAnalyzer(){return this._systemProxy.audioAnalyzer}get audioCodec(){return this._systemProxy.audioCodec}get backup(){return this._systemProxy.backup}get decoder(){return this._systemProxy.decoder}get deviceManager(){return this._systemProxy.deviceManager}get deviceProvider(){return this._systemProxy.deviceProvider}get deviceState(){return this._systemProxy.deviceState}get metricsProvider(){return this._systemProxy.metricsProvider}get notificationOutput(){return this._systemProxy.notificationOutput}get pipelineExecutor(){return this._systemProxy.pipelineExecutor}get pipelineOrchestrator(){return this._systemProxy.pipelineOrchestrator}get pipelineRunner(){return this._systemProxy.pipelineRunner}get platformProbe(){return this._systemProxy.platformProbe}get recordingEngine(){return this._systemProxy.recordingEngine}get settingsStore(){return this._systemProxy.settingsStore}get storage(){return this._systemProxy.storage}get streamBroker(){return this._systemProxy.streamBroker}get turnProvider(){return this._systemProxy.turnProvider}get userManagement(){return this._systemProxy.userManagement}subscribeEvent(t,r){const n=this._trpcClient.live.onEvent.subscribe({category:t},{onData:s=>{try{r(s)}catch{}}});return()=>{try{n.unsubscribe()}catch{}}}get trpcClient(){return this._trpcClient}get wsClient(){return this._wsClient}buildTrpcClient(){const t=()=>{const r={};return this.token&&(r.Authorization=`Bearer ${this.token}`),r};if(this.useWs){const r=this._serverUrl.replace(/^http/,"ws")+"/trpc",n=this.baseRetryMs,s=this.maxRetryMs;return this._wsClient=we({url:r,connectionParams:()=>({token:this.token}),retryDelayMs:i=>Math.min(n*Math.pow(2,i),s),keepAlive:{enabled:!0,intervalMs:Qe,pongTimeoutMs:Ze},onOpen:()=>{this._connectionVersion+=1,this.emitConnectionEvent("connected")},onClose:()=>{this.emitConnectionEvent("disconnected")}}),L({links:[_e({client:this._wsClient,transformer:a})]})}return this._wsClient=null,L({links:[be({url:`${this._serverUrl}/trpc`,headers:t,transformer:a})]})}}function ft(e){return new et(e)}async function tt(e,t){if(e.length===0)return null;if(typeof fetch!="function")return e[0]??null;const n=typeof window<"u"&&typeof window.location<"u"&&window.location.protocol==="https:"?e.filter(o=>o.toLowerCase().startsWith("https://")):e;if(n.length===0)return null;const s=n.map(()=>new AbortController),i=n.map(async(o,c)=>{const l=s[c],u=setTimeout(()=>l.abort(),t);try{const f=await fetch(`${o.replace(/\/+$/,"")}/trpc/health`,{method:"GET",signal:l.signal,credentials:"omit"});if(!f.ok)throw new Error(`${f.status}`);return o}finally{clearTimeout(u)}});try{const o=await Promise.any(i);for(const c of s)try{c.abort()}catch{}return o}catch{return null}}var re=(e=>(e.Motion="motion",e.Person="person",e.Vehicle="vehicle",e.Animal="animal",e.Audio="audio",e.Face="face",e.Plate="plate",e.Package="package",e.Doorbell="doorbell",e.Sensor="sensor",e))(re||{});const ne=["animal","dog_cat","dog","cat","horse","sheep","cow","elephant","bear","zebra","giraffe","mouse","rabbit","deer","lion","tiger","bird","eagle","owl","pigeon","fish","whale","dolphin","snake","turtle","lizard"],se=["person","people","pedestrian","rider","driver","cyclist","skier","skateboarder","face","hand","head","body"],ie=["vehicle","car","truck","bus","motorcycle","bicycle","van","ambulance","police_car","fire_truck","train","subway","tram","airplane","boat","ship","helicopter"],oe=["face","eyes","nose","mouth","ears","eyebrows","left_eye","right_eye","pupil","iris","eyelid","eye_corner","upper_lip","lower_lip","teeth","chin","cheek","forehead","jaw","glasses","sunglasses","facial_hair","beard","mustache","facial_landmark","facial_keypoint"],ae=["plate","license_plate","front_plate","rear_plate","motorcycle_plate","temporary_plate","dealer_plate","licensePlate","plate_number","plate_character","plate_digit","plate_letter","plate_symbol","plate_region","plate_country_identifier","plate_frame","plate_bolt","plate_sticker","plate_validation_tag","damaged_plate","obscured_plate","dirty_plate"],ce=["motion","movement","other"],le=["package","packet"],ue=["audio"],fe=["speech","scream","babbling","yell","bellow","whoop","whispering","laughter","snicker","crying","cry","sigh","singing","choir","chant","mantra","child_singing","rapping","humming","groan","grunt","whistling","breathing","wheeze","snoring","gasp","pant","snort","cough","throat_clearing","sneeze","sniff","cheering","applause","chatter","crowd","children_playing","bark","yip","howl","bow-wow","growling","whimper_dog","purr","meow","hiss","caterwaul","pets","livestock","doorbell","ding-dong","door","slam","knock","alarm","telephone","music","dog","dogs"],he=["doorbell","ring"],me=["lock","binary","flood","entry","door","leak","door_open","flooded","entry_open"],de={...ne.reduce((e,t)=>({...e,[t]:"animal"}),{}),...se.reduce((e,t)=>({...e,[t]:"person"}),{}),...ie.reduce((e,t)=>({...e,[t]:"vehicle"}),{}),...ce.reduce((e,t)=>({...e,[t]:"motion"}),{}),...le.reduce((e,t)=>({...e,[t]:"package"}),{}),...oe.reduce((e,t)=>({...e,[t]:"face"}),{}),...ae.reduce((e,t)=>({...e,[t]:"plate"}),{}),...ue.reduce((e,t)=>({...e,[t]:"audio"}),{}),...fe.reduce((e,t)=>({...e,[t]:"audio"}),{}),...he.reduce((e,t)=>({...e,[t]:"doorbell"}),{}),...me.reduce((e,t)=>({...e,[t]:"sensor"}),{})},rt=e=>oe.includes(e),nt=e=>ae.includes(e),ht=e=>ne.includes(e),mt=e=>se.includes(e),dt=e=>ie.includes(e),pt=e=>ce.includes(e),yt=e=>he.includes(e),gt=e=>le.includes(e),wt=e=>ue.includes(e)||fe.includes(e),_t=e=>me.includes(e),bt=e=>rt(e)||nt(e),Et=e=>de[e],Pt=e=>{const{className:t}=e,r={face:"person",plate:"vehicle"},n=de[t];return n&&n!==t?n:r[t]},st=Object.values(re),M=st.filter(e=>e!=="motion"),pe=["person","doorbell","package"],it=[...pe,"vehicle","animal","audio","face","plate"],ot=[...M];function vt(e,t){switch(e){case"critical":return pe;case"important":return it;case"all":return ot;case"custom":return t?.length?t:M;default:return M}}const z={Light:"light",Switch:"switch",WindowCovering:"cover",Lock:"lock",SecuritySystem:"alarm",Buttons:"button",Select:"select",Siren:"siren",Sensor:"sensor",Entry:"entry",Program:"script",MediaPlayer:"media_player",Outlet:"switch",light:"light",switch:"switch",input_boolean:"switch",cover:"cover",lock:"lock",alarm_control_panel:"alarm",input_button:"button",button:"button",input_select:"select",select:"select",siren:"siren",sensor:"sensor",media_player:"media_player",script:"script"},Ct={light:"light",switch:"switch",input_boolean:"switch",cover:"cover",lock:"lock",alarm_control_panel:"alarm",input_button:"button",button:"button",input_select:"select",select:"select",siren:"siren",sensor:"sensor",binary_sensor:"sensor",media_player:"media_player",script:"script",climate:"climate",camera:"camera",fan:"fan",vacuum:"vacuum",automation:"automation",scene:"scene",input_number:"sensor",person:"person",device_tracker:"tracker",weather:"weather",water_heater:"climate"},kt={Light:"light",Switch:"switch",WindowCovering:"cover",Lock:"lock",SecuritySystem:"alarm",Buttons:"button",Select:"select",Siren:"siren",Sensor:"sensor",Entry:"entry",Program:"script",MediaPlayer:"media_player",Camera:"camera",Doorbell:"doorbell",Fan:"fan",Outlet:"switch"};function St(e){const t=z[e];if(t)return t;const r=e.toLowerCase();return z[r]??null}const at=["Entry","Light","Switch","Lock","SecuritySystem","Buttons","WindowCovering","Siren","Sensor","Select","Program"],It=new Set(at),ct=["light","switch","input_boolean","cover","lock","alarm_control_panel","input_button","button","input_select","select","siren","media_player","script"],Tt=new Set(ct);export{gt as A,mt as B,nt as C,M as D,ct as E,_t as F,dt as G,Ct as H,ae as I,ce as J,le as K,se as L,tt as M,me as N,ie as O,z as R,a as S,ot as T,re as a,Tt as b,ft as c,at as d,It as e,kt as f,et as g,pe as h,it as i,ne as j,ue as k,fe as l,st as m,de as n,he as o,oe as p,St as q,vt as r,Et as s,Pt as t,ht as u,wt as v,yt as w,rt as x,bt as y,pt as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as h}from"./preload-helper-BlTxHScW.js";const r="__mf_module_cache__";globalThis[r]||={share:{},remote:{}};globalThis[r].share||={};globalThis[r].remote||={};const o=globalThis[r];let e;async function g(){return e||(e=(async()=>{const i=await(await h(()=>import("./remoteEntry-
|
|
1
|
+
import{_ as h}from"./preload-helper-BlTxHScW.js";const r="__mf_module_cache__";globalThis[r]||={share:{},remote:{}};globalThis[r].share||={};globalThis[r].remote||={};const o=globalThis[r];let e;async function g(){return e||(e=(async()=>{const i=await(await h(()=>import("./remoteEntry-D28y34bi.js"),[])).init(),s={react:{shareConfig:{singleton:!0,requiredVersion:"^19.2.5"}},"react-dom":{shareConfig:{singleton:!0,requiredVersion:"^19.2.5"}},"react/jsx-runtime":{shareConfig:{singleton:!0,requiredVersion:"^19.2.5"}},"@camstack/sdk":{shareConfig:{singleton:!0,requiredVersion:"^0.1.47"}},"@camstack/types":{shareConfig:{singleton:!0,requiredVersion:"^0.1.33"}},"@camstack/ui-library":{shareConfig:{singleton:!0,requiredVersion:"^0.1.50"}},"@tanstack/react-query":{shareConfig:{singleton:!0,requiredVersion:"^5.100.9"}},"@trpc/client":{shareConfig:{singleton:!0,requiredVersion:"^11.17.0"}},"@trpc/react-query":{shareConfig:{singleton:!0,requiredVersion:"^11.17.0"}},"react-dom/client":{shareConfig:{singleton:!0,requiredVersion:"^19.2.5"}}};for(const[t,u]of Object.entries(s))o.share[t]===void 0&&await i.loadShare(t,{customShareInfo:{shareConfig:u.shareConfig}}).then(n=>{const c=typeof n=="function"?n():n;return Promise.resolve(c).then(l=>{o.share[t]=l})});const a=[];return await Promise.all(a),i})()),e}e=g();export{e as hostInitPromise,g as initHost};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as b,a as h,E,b as T,d as S,e as M,H as _,R as L,f as I,g as y,T as D,h as P,i as A,j as v,k as R,l as N,c as k,m as O,n as w,o as x,p as V,q as F,r as B,s as Y,t as j,u as q,v as G,w as H,x as $,y as z,z as U,A as W,B as Z,C as J,F as K,G as X,I as Q,J as ee,K as te,L as ae,M as se,N as re,O as le}from"./devices-
|
|
1
|
+
import{D as b,a as h,E,b as T,d as S,e as M,H as _,R as L,f as I,g as y,T as D,h as P,i as A,j as v,k as R,l as N,c as k,m as O,n as w,o as x,p as V,q as F,r as B,s as Y,t as j,u as q,v as G,w as H,x as $,y as z,z as U,A as W,B as Z,C as J,F as K,G as X,I as Q,J as ee,K as te,L as ae,M as se,N as re,O as le}from"./devices-BnLu5dxg.js";const c=[{id:"liveStream",label:"Live Stream",sources:{frigate:!0,scrypted:!0,rtsp:!0},adapterMethod:"getLiveStream"},{id:"multiResolution",label:"Multi-Resolution",sources:{frigate:!0,scrypted:!0,rtsp:!1},adapterMethod:"getResolutions"},{id:"motion",label:"Motion Detection",sources:{frigate:!1,scrypted:!0,rtsp:!1},adapterMethod:"getMotion"},{id:"objectDetection",label:"Object Detection",sources:{frigate:!1,scrypted:!0,rtsp:!1},adapterMethod:"getObjectDetections"},{id:"audioVolume",label:"Audio Level",sources:{frigate:!1,scrypted:!0,rtsp:!1},adapterMethod:"getAudioVolume"},{id:"audioVolumes",label:"Audio Volumes (dBFS)",sources:{frigate:!1,scrypted:!0,rtsp:!1},adapterMethod:"getAudioVolumes"},{id:"ptz",label:"PTZ Control",sources:{frigate:!1,scrypted:!0,rtsp:!1},adapterMethod:"getPTZ"},{id:"intercom",label:"Intercom (Mic)",sources:{frigate:!1,scrypted:!0,rtsp:!1},adapterMethod:"getIntercomSupport"},{id:"deviceStatus",label:"Device Status",sources:{frigate:!1,scrypted:!0,rtsp:!1},adapterMethod:"getStatus"},{id:"timeline",label:"Detection Timeline",sources:{frigate:!0,scrypted:!0,rtsp:!1},adapterMethod:"getCameraDayData"},{id:"clusteredTimeline",label:"Clustered Timeline",sources:{frigate:!0,scrypted:!0,rtsp:!1},requiresBackend:!0,adapterMethod:"getClusteredDayData"},{id:"detectionClasses",label:"Detection Classes",sources:{frigate:!0,scrypted:!0,rtsp:!1},adapterMethod:"getDetectionClasses"},{id:"videoClips",label:"Video Clips",sources:{frigate:!0,scrypted:!0,rtsp:!1},adapterMethod:"getVideoClips"},{id:"nvrPlayback",label:"NVR Playback",sources:{frigate:!0,scrypted:!0,rtsp:!1},adapterMethod:"getNvrPlaybackSupported"},{id:"nvrScrub",label:"NVR Scrub/Seek",sources:{frigate:!1,scrypted:!0,rtsp:!1},adapterMethod:"seekRecordingStream"},{id:"recordingThumbnail",label:"Recording Thumbnails",sources:{frigate:!0,scrypted:!0,rtsp:!1},adapterMethod:"getRecordingStreamThumbnail"},{id:"nvrSeekToLive",label:"Seek to Live",sources:{frigate:!1,scrypted:!0,rtsp:!1},adapterMethod:"seekNvrToLive"}];function ie(s,e,n){const i=c.find(o=>o.id===s);return!(!i||!i.sources[e]||i.platforms&&i.platforms[n]===!1)}function oe(s){return c.filter(e=>e.sources[s])}function de(){return c.filter(s=>s.requiresBackend)}function ue(s,e,n){if(s.length===0)return null;const i=e.viewportWidth*e.viewportHeight*(e.pixelRatio??1),o=e.bandwidthMbps??100,f=e.packetLoss??0,m=e.rttMs??50;let r="high";e.maxResolution==="low"||e.isCellular||o<1||f>.05?r="low":e.maxResolution==="medium"||o<5||i<5e5||m>200?r="medium":(e.maxResolution==="high"||i>2e6)&&(r="high");const g={main:"high",sub:"medium",ext:"low"},C=n??"native",p=s.map(t=>{let a=0;const d=g[t.profile]??"medium";if(d===r?a+=100:(r==="high"&&d==="medium"||r==="medium"&&d==="high"||r==="medium"&&d==="low"||r==="low"&&d==="medium")&&(a+=50),t.transport===C?a+=30:t.transport==="native"?a+=20:t.transport==="rtsp"?a+=15:t.transport==="rtmp"&&(a+=10),t.metadata?.width&&t.metadata?.height){const u=t.metadata.width*t.metadata.height/Math.max(i,1);u>=.8&&u<=2?a+=25:u>=.5&&u<=3&&(a+=15),u>4&&o<10&&(a-=20)}return t.metadata?.codec&&(o<5&&t.metadata.codec.includes("265")&&(a+=10),o>=10&&t.metadata.codec.includes("264")&&(a+=5)),{...t,score:a,targetTier:r}});p.sort((t,a)=>a.score-t.score);const l=p[0];return{streamName:l.streamName,profile:l.profile,transport:l.transport,label:l.label,metadata:l.metadata,reason:`${l.targetTier} quality → ${l.profile}/${l.transport} (score: ${l.score})`}}function ce(s,e){return e?10:s.isCellular||(s.packetLoss??0)>.02?15:30}const fe=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_ENABLED_CLASSES:b,DetectionClass:h,ELIGIBLE_HA_DOMAINS:E,ELIGIBLE_HA_DOMAINS_SET:T,ELIGIBLE_SCRYPTED_DEVICE_TYPES:S,ELIGIBLE_SCRYPTED_DEVICE_TYPES_SET:M,FEATURE_MATRIX:c,HA_DOMAIN_TYPE_MAP:_,RAW_TO_CANONICAL:L,SCRYPTED_TYPE_TO_CANONICAL:I,System:y,TIMELINE_PRESET_ALL:D,TIMELINE_PRESET_CRITICAL:P,TIMELINE_PRESET_IMPORTANT:A,animalClasses:v,audioClasses:R,audioLabelClasses:N,createSystem:k,defaultDetectionClasses:O,detectionClassesDefaultMap:w,doorbellClasses:x,faceClasses:V,getBackendRequiredFeatures:de,getCanonicalDeviceType:F,getClassesForTimelinePreset:B,getNextEvalInterval:ce,getParentClass:Y,getParentDetectionClass:j,getSourceFeatures:oe,isAnimalClassname:q,isAudioClassname:G,isDoorbellClassname:H,isFaceClassname:$,isFeatureAvailable:ie,isLabelDetection:z,isMotionClassname:U,isPackageClassname:W,isPersonClassname:Z,isPlateClassname:J,isSensorLabelClassname:K,isVehicleClassname:X,licensePlateClasses:Q,motionClasses:ee,packageClasses:te,personClasses:ae,raceFastestEndpoint:se,selectOptimalStream:ue,sensorLabelClasses:re,vehicleClasses:le},Symbol.toStringTag,{value:"Module"}));export{fe as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as Mt}from"./__mfe_internal__admin_ui_host__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs-C_6K4VBY.js";import{r as Ot}from"./__mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_client__loadShare__.mjs_commonjs-proxy-WD2WouMQ.js";import{r as Lt}from"./index-DIIqKU3D.js";function Dt(a,_){for(var E=0;E<_.length;E++){const C=_[E];if(typeof C!="string"&&!Array.isArray(C)){for(const w in C)if(w!=="default"&&!(w in a)){const k=Object.getOwnPropertyDescriptor(C,w);k&&Object.defineProperty(a,w,k.get?k:{enumerable:!0,get:()=>C[w]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var se={};(function(a){Object.defineProperty(a,Symbol.toStringTag,{value:"Module"});const _=Ot,E=Lt;class C{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(t,r){this.keyToValue.set(t,r),this.valueToKey.set(r,t)}getByKey(t){return this.keyToValue.get(t)}getByValue(t){return this.valueToKey.get(t)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}}class w{constructor(t){this.generateIdentifier=t,this.kv=new C}register(t,r){this.kv.getByValue(t)||(r||(r=this.generateIdentifier(t)),this.kv.set(r,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}}class k extends w{constructor(){super(t=>t.name),this.classToAllowedProps=new Map}register(t,r){typeof r=="object"?(r.allowProps&&this.classToAllowedProps.set(t,r.allowProps),super.register(t,r.identifier)):super.register(t,r)}getAllowedProps(t){return this.classToAllowedProps.get(t)}}function Me(e){if("values"in Object)return Object.values(e);const t=[];for(const r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t}function Oe(e,t){const r=Me(e);if("find"in r)return r.find(t);const s=r;for(let n=0;n<s.length;n++){const i=s[n];if(t(i))return i}}function P(e,t){Object.entries(e).forEach(([r,s])=>t(s,r))}function O(e,t){return e.indexOf(t)!==-1}function ne(e,t){for(let r=0;r<e.length;r++){const s=e[r];if(t(s))return s}}class Le{constructor(){this.transfomers={}}register(t){this.transfomers[t.name]=t}findApplicable(t){return Oe(this.transfomers,r=>r.isApplicable(t))}findByName(t){return this.transfomers[t]}}const De=e=>Object.prototype.toString.call(e).slice(8,-1),ie=e=>typeof e>"u",Ne=e=>e===null,I=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,V=e=>I(e)&&Object.keys(e).length===0,b=e=>Array.isArray(e),Ve=e=>typeof e=="string",Be=e=>typeof e=="number"&&!isNaN(e),Ue=e=>typeof e=="boolean",ze=e=>e instanceof RegExp,R=e=>e instanceof Map,A=e=>e instanceof Set,oe=e=>De(e)==="Symbol",Fe=e=>e instanceof Date&&!isNaN(e.valueOf()),ae=e=>e instanceof Error,le=e=>typeof e=="number"&&isNaN(e),$e=e=>Ue(e)||Ne(e)||ie(e)||Be(e)||Ve(e)||oe(e),qe=e=>typeof e=="bigint",Ye=e=>e===1/0||e===-1/0,We=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),Ke=e=>e instanceof URL,B=e=>e.replace(/\\/g,"\\\\").replace(/\./g,"\\."),U=e=>e.map(String).map(B).join("."),M=(e,t)=>{const r=[];let s="";for(let i=0;i<e.length;i++){let o=e.charAt(i);if(!t&&o==="\\"){const m=e.charAt(i+1);if(m==="\\"){s+="\\",i++;continue}else if(m!==".")throw Error("invalid path")}if(o==="\\"&&e.charAt(i+1)==="."){s+=".",i++;continue}if(o==="."){r.push(s),s="";continue}s+=o}const n=s;return r.push(n),r};function g(e,t,r,s){return{isApplicable:e,annotation:t,transform:r,untransform:s}}const ce=[g(ie,"undefined",()=>null,()=>{}),g(qe,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),g(Fe,"Date",e=>e.toISOString(),e=>new Date(e)),g(ae,"Error",(e,t)=>{const r={name:e.name,message:e.message};return"cause"in e&&(r.cause=e.cause),t.allowedErrorProps.forEach(s=>{r[s]=e[s]}),r},(e,t)=>{const r=new Error(e.message,{cause:e.cause});return r.name=e.name,r.stack=e.stack,t.allowedErrorProps.forEach(s=>{r[s]=e[s]}),r}),g(ze,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),r=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,r)}),g(A,"set",e=>[...e.values()],e=>new Set(e)),g(R,"map",e=>[...e.entries()],e=>new Map(e)),g(e=>le(e)||Ye(e),"number",e=>le(e)?"NaN":e>0?"Infinity":"-Infinity",Number),g(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),g(Ke,"URL",e=>e.toString(),e=>new URL(e))];function L(e,t,r,s){return{isApplicable:e,annotation:t,transform:r,untransform:s}}const ue=L((e,t)=>oe(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,r)=>{const s=r.symbolRegistry.getValue(t[1]);if(!s)throw new Error("Trying to deserialize unknown symbol");return s}),Ge=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),de=L(We,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const r=Ge[t[1]];if(!r)throw new Error("Trying to deserialize unknown typed array");return new r(e)});function fe(e,t){return e?.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}const me=L(fe,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const r=t.classRegistry.getAllowedProps(e.constructor);if(!r)return{...e};const s={};return r.forEach(n=>{s[n]=e[n]}),s},(e,t,r)=>{const s=r.classRegistry.getValue(t[1]);if(!s)throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(s.prototype),e)}),he=L((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,r)=>{const s=r.customTransformerRegistry.findByName(t[1]);if(!s)throw new Error("Trying to deserialize unknown custom value");return s.deserialize(e)}),xe=[me,ue,he,de],pe=(e,t)=>{const r=ne(xe,n=>n.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation(e,t)};const s=ne(ce,n=>n.isApplicable(e,t));if(s)return{value:s.transform(e,t),type:s.annotation}},ye={};ce.forEach(e=>{ye[e.annotation]=e});const He=(e,t,r)=>{if(b(t))switch(t[0]){case"symbol":return ue.untransform(e,t,r);case"class":return me.untransform(e,t,r);case"custom":return he.untransform(e,t,r);case"typed-array":return de.untransform(e,t,r);default:throw new Error("Unknown transformation: "+t)}else{const s=ye[t];if(!s)throw new Error("Unknown transformation: "+t);return s.untransform(e,r)}},S=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const r=e.keys();for(;t>0;)r.next(),t--;return r.next().value};function ge(e){if(O(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(O(e,"prototype"))throw new Error("prototype is not allowed as a property");if(O(e,"constructor"))throw new Error("constructor is not allowed as a property")}const je=(e,t)=>{ge(t);for(let r=0;r<t.length;r++){const s=t[r];if(A(e))e=S(e,+s);else if(R(e)){const n=+s,i=+t[++r]==0?"key":"value",o=S(e,n);switch(i){case"key":e=o;break;case"value":e=e.get(o);break}}else e=e[s]}return e},z=(e,t,r)=>{if(ge(t),t.length===0)return r(e);let s=e;for(let i=0;i<t.length-1;i++){const o=t[i];if(b(s)){const l=+o;s=s[l]}else if(I(s))s=s[o];else if(A(s)){const l=+o;s=S(s,l)}else if(R(s)){if(i===t.length-2)break;const u=+o,m=+t[++i]==0?"key":"value",p=S(s,u);switch(m){case"key":s=p;break;case"value":s=s.get(p);break}}}const n=t[t.length-1];if(b(s)?s[+n]=r(s[+n]):I(s)&&(s[n]=r(s[n])),A(s)){const i=S(s,+n),o=r(i);i!==o&&(s.delete(i),s.add(o))}if(R(s)){const i=+t[t.length-2],o=S(s,i);switch(+n==0?"key":"value"){case"key":{const u=r(o);s.set(u,s.get(o)),u!==o&&s.delete(o);break}case"value":{s.set(o,r(s.get(o)));break}}}return e},_e=e=>e<1;function F(e,t,r,s=[]){if(!e)return;const n=_e(r);if(!b(e)){P(e,(l,u)=>F(l,t,r,[...s,...M(u,n)]));return}const[i,o]=e;o&&P(o,(l,u)=>{F(l,t,r,[...s,...M(u,n)])}),t(i,s)}function Xe(e,t,r,s){return F(t,(n,i)=>{e=z(e,i,o=>He(o,n,s))},r),e}function Ze(e,t,r){const s=_e(r);function n(i,o){const l=je(e,M(o,s));i.map(u=>M(u,s)).forEach(u=>{e=z(e,u,()=>l)})}if(b(t)){const[i,o]=t;i.forEach(l=>{e=z(e,M(l,s),()=>e)}),o&&P(o,n)}else P(t,n);return e}const Qe=(e,t)=>I(e)||b(e)||R(e)||A(e)||ae(e)||fe(e,t);function Je(e,t,r){const s=r.get(e);s?s.push(t):r.set(e,[t])}function et(e,t){const r={};let s;return e.forEach(n=>{if(n.length<=1)return;t||(n=n.map(l=>l.map(String)).sort((l,u)=>l.length-u.length));const[i,...o]=n;i.length===0?s=o.map(U):r[U(i)]=o.map(U)}),s?V(r)?[s]:[s,r]:V(r)?void 0:r}const we=(e,t,r,s,n=[],i=[],o=new Map)=>{const l=$e(e);if(!l){Je(e,n,t);const d=o.get(e);if(d)return s?{transformedValue:null}:d}if(!Qe(e,r)){const d=pe(e,r),h=d?{transformedValue:d.value,annotations:[d.type]}:{transformedValue:e};return l||o.set(e,h),h}if(O(i,e))return{transformedValue:null};const u=pe(e,r),m=u?.value??e,p=b(m)?[]:{},y={};P(m,(d,h)=>{if(h==="__proto__"||h==="constructor"||h==="prototype")throw new Error(`Detected property ${h}. This is a prototype pollution risk, please remove it from your object.`);const T=we(d,t,r,s,[...n,h],[...i,e],o);p[h]=T.transformedValue,b(T.annotations)?y[B(h)]=T.annotations:I(T.annotations)&&P(T.annotations,(v,At)=>{y[B(h)+"."+At]=v})});const f=V(y)?{transformedValue:p,annotations:u?[u.type]:void 0}:{transformedValue:p,annotations:u?[u.type,y]:y};return l||o.set(e,f),f};function be(e){return Object.prototype.toString.call(e).slice(8,-1)}function Ee(e){return be(e)==="Array"}function tt(e){if(be(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function rt(e,t,r,s,n){const i={}.propertyIsEnumerable.call(s,t)?"enumerable":"nonenumerable";i==="enumerable"&&(e[t]=r),n&&i==="nonenumerable"&&Object.defineProperty(e,t,{value:r,enumerable:!1,writable:!0,configurable:!0})}function $(e,t={}){if(Ee(e))return e.map(n=>$(n,t));if(!tt(e))return e;const r=Object.getOwnPropertyNames(e),s=Object.getOwnPropertySymbols(e);return[...r,...s].reduce((n,i)=>{if(i==="__proto__"||Ee(t.props)&&!t.props.includes(i))return n;const o=e[i],l=$(o,t);return rt(n,i,l,e,t.nonenumerable),n},{})}class c{constructor({dedupe:t=!1}={}){this.classRegistry=new k,this.symbolRegistry=new w(r=>r.description??""),this.customTransformerRegistry=new Le,this.allowedErrorProps=[],this.dedupe=t}serialize(t){const r=new Map,s=we(t,r,this,this.dedupe),n={json:s.transformedValue};s.annotations&&(n.meta={...n.meta,values:s.annotations});const i=et(r,this.dedupe);return i&&(n.meta={...n.meta,referentialEqualities:i}),n.meta&&(n.meta.v=1),n}deserialize(t,r){const{json:s,meta:n}=t;let i=r?.inPlace?s:$(s);return n?.values&&(i=Xe(i,n.values,n.v??0,this)),n?.referentialEqualities&&(i=Ze(i,n.referentialEqualities,n.v??0)),i}stringify(t){return JSON.stringify(this.serialize(t))}parse(t){return this.deserialize(JSON.parse(t),{inPlace:!0})}registerClass(t,r){this.classRegistry.register(t,r)}registerSymbol(t,r){this.symbolRegistry.register(t,r)}registerCustom(t,r){this.customTransformerRegistry.register({name:r,...t})}allowErrorProps(...t){this.allowedErrorProps.push(...t)}}c.defaultInstance=new c,c.serialize=c.defaultInstance.serialize.bind(c.defaultInstance),c.deserialize=c.defaultInstance.deserialize.bind(c.defaultInstance),c.stringify=c.defaultInstance.stringify.bind(c.defaultInstance),c.parse=c.defaultInstance.parse.bind(c.defaultInstance),c.registerClass=c.defaultInstance.registerClass.bind(c.defaultInstance),c.registerSymbol=c.defaultInstance.registerSymbol.bind(c.defaultInstance),c.registerCustom=c.defaultInstance.registerCustom.bind(c.defaultInstance),c.allowErrorProps=c.defaultInstance.allowErrorProps.bind(c.defaultInstance),c.serialize,c.deserialize,c.stringify,c.parse,c.registerClass,c.registerCustom,c.registerSymbol,c.allowErrorProps;const st=1e4,nt=3e3,it=2e3,ot=3e4;class Ce{_serverUrl;useWs;baseRetryMs;maxRetryMs;onConnectionChange;token;_trpcClient;_wsClient=null;mirror=null;mirrorInit=null;connected=!1;connectedPromise=null;_systemProxy;_connectionVersion=0;connectionListeners=new Set;constructor(t){this._serverUrl=t.serverUrl.replace(/\/+$/,""),this.token=t.token;const r=typeof window<"u";this.useWs=t.useWebSocket??r,this.onConnectionChange=t.onConnectionChange,this.baseRetryMs=t.retryDelayMs??it,this.maxRetryMs=t.maxRetryDelayMs??ot,this._trpcClient=this.buildTrpcClient(),this._systemProxy=E.createSystemProxy(this._trpcClient)}get serverUrl(){return this._serverUrl}get connectionVersion(){return this._connectionVersion}subscribeConnectionEvents(t){return this.connectionListeners.add(t),()=>{this.connectionListeners.delete(t)}}emitConnectionEvent(t){try{this.onConnectionChange?.(t)}catch{}for(const r of this.connectionListeners)try{r(t,this._connectionVersion)}catch{}}async awaitConnected(t){if(this.connected)return;if(this.connectedPromise)return this.connectedPromise;const r=t??15e3;this.connectedPromise=(async()=>{const s=this._trpcClient.auth.me.query();Number.isFinite(r)?await new Promise((n,i)=>{const o=setTimeout(()=>i(new Error(`System.awaitConnected: probe timed out after ${r}ms`)),r);s.then(()=>{clearTimeout(o),n()},l=>{clearTimeout(o),i(l instanceof Error?l:new Error(String(l)))})}):await s,this.connected=!0})();try{await this.connectedPromise}finally{this.connectedPromise=null}}async init(t){if(this.mirror?.isReady())return;if(this.mirrorInit)return this.mirrorInit;const r=new E.SystemMirror(this._trpcClient);return this.mirror=r,this.mirrorInit=(async()=>{await this.awaitConnected(t),await r.init(t)})().finally(()=>{this.mirrorInit=null}),this.mirrorInit}async awaitReady(){if(!this.mirror?.isReady())return this.mirrorInit?this.mirrorInit:this.init()}isReady(){return this.mirror?.isReady()??!1}isConnected(){return this.connected}reconnect(){this.useWs&&(this.emitConnectionEvent("connecting"),this._wsClient?.close(),this.disposeMirror(),this.connected=!1,this.connectedPromise=null,this._trpcClient=this.buildTrpcClient(),this._systemProxy=E.createSystemProxy(this._trpcClient))}switchServerUrl(t){const r=t.replace(/\/+$/,"");r!==this._serverUrl&&(this._serverUrl=r,this.reconnect())}async raceConnectionEndpoints(t){const r=t?.perCandidateTimeoutMs??1500,s=(()=>{try{return new URL(this._serverUrl)}catch{return null}})(),n=s?.port?Number(s.port):s?.protocol==="https:"?443:80,i=s?.protocol==="https:"?"https":"http",l=this._trpcClient.localNetwork?.getConnectionEndpoints;if(!l)return{winner:this._serverUrl,switched:!1};let u;try{u=(await l.query({port:n,ipv4Only:t?.ipv4Only,scheme:i})).endpoints}catch{return{winner:this._serverUrl,switched:!1}}if(u.length===0)return{winner:this._serverUrl,switched:!1};const m=await ve(u.map(p=>p.baseUrl),r);return!m||m===this._serverUrl?{winner:m??this._serverUrl,switched:!1}:(this.switchServerUrl(m),{winner:m,switched:!0})}close(){this.disposeMirror(),this.connected=!1,this.connectedPromise=null,this._wsClient?.close()}disposeMirror(){this.mirror?.dispose(),this.mirror=null,this.mirrorInit=null}async login(t,r){const s=await this._trpcClient.auth.login.mutate({username:t,password:r});if(typeof s=="object"&&s!==null&&"token"in s){const n=s,i=n.token;typeof i=="string"&&n.requiresTotp!==!0&&this.setToken(i)}return s}async loginVerifyTotp(t,r){const s=await this._trpcClient.auth.loginVerifyTotp.mutate({challengeToken:t,code:r});if(typeof s=="object"&&s!==null&&"token"in s){const n=s.token;typeof n=="string"&&this.setToken(n)}return s}async logout(){await this._trpcClient.auth.logout.mutate()}async getMe(){return await this._trpcClient.auth.me.query()}async changeOwnPassword(t){return await this._trpcClient.auth.changeOwnPassword.mutate(t)}async setupOwnTotp(){return await this._trpcClient.auth.setupOwnTotp.mutate()}async confirmOwnTotp(t){return await this._trpcClient.auth.confirmOwnTotp.mutate(t)}async disableOwnTotp(){return await this._trpcClient.auth.disableOwnTotp.mutate()}async getOwnTotpStatus(){return await this._trpcClient.auth.getOwnTotpStatus.query()}setToken(t){this.token=t}listDevices(t){return this.mirror?(t?this.mirror.query(t):this.mirror.getAllDevices()).map(s=>this.attachBinding(s)):[]}getDevice(t){const r=this.mirror?.getDeviceById(t)??null;return r?this.attachBinding(r):null}getDeviceByName(t){const r=this.mirror?.getDeviceByName(t)??null;return r?this.attachBinding(r):null}getDeviceByStableId(t){const r=this.mirror?.getDeviceByStableId(t)??null;return r?this.attachBinding(r):null}async waitForDevice(t,r){this.mirror||await this.init();const s=await this.mirror.waitForDevice(t,r??3e4);return this.attachBinding(s)}onDeviceAdded(t){if(!this.mirror)throw new Error("System.onDeviceAdded: call init() before subscribing");return this.mirror.onDeviceAdded(t)}onDeviceRemoved(t){if(!this.mirror)throw new Error("System.onDeviceRemoved: call init() before subscribing");return this.mirror.onDeviceRemoved(t)}attachBinding(t){const r=this.lookupBinding(t.deviceId);if(r===t.binding)return t;const s=t;return s.binding=r,t}lookupBinding(t){return this.mirror?this.mirror.getDeviceById(t)?.binding??null:null}get addonPages(){return this._systemProxy.addonPages}get addonSettings(){return this._systemProxy.addonSettings}get alerts(){return this._systemProxy.alerts}get audioAnalyzer(){return this._systemProxy.audioAnalyzer}get audioCodec(){return this._systemProxy.audioCodec}get backup(){return this._systemProxy.backup}get decoder(){return this._systemProxy.decoder}get deviceManager(){return this._systemProxy.deviceManager}get deviceProvider(){return this._systemProxy.deviceProvider}get deviceState(){return this._systemProxy.deviceState}get metricsProvider(){return this._systemProxy.metricsProvider}get notificationOutput(){return this._systemProxy.notificationOutput}get pipelineExecutor(){return this._systemProxy.pipelineExecutor}get pipelineOrchestrator(){return this._systemProxy.pipelineOrchestrator}get pipelineRunner(){return this._systemProxy.pipelineRunner}get platformProbe(){return this._systemProxy.platformProbe}get recordingEngine(){return this._systemProxy.recordingEngine}get settingsStore(){return this._systemProxy.settingsStore}get storage(){return this._systemProxy.storage}get streamBroker(){return this._systemProxy.streamBroker}get turnProvider(){return this._systemProxy.turnProvider}get userManagement(){return this._systemProxy.userManagement}subscribeEvent(t,r){const s=this._trpcClient.live.onEvent.subscribe({category:t},{onData:n=>{try{r(n)}catch{}}});return()=>{try{s.unsubscribe()}catch{}}}get trpcClient(){return this._trpcClient}get wsClient(){return this._wsClient}buildTrpcClient(){const t=()=>{const r={};return this.token&&(r.Authorization=`Bearer ${this.token}`),r};if(this.useWs){const r=this._serverUrl.replace(/^http/,"ws")+"/trpc",s=this.baseRetryMs,n=this.maxRetryMs;return this._wsClient=_.createWSClient({url:r,connectionParams:()=>({token:this.token}),retryDelayMs:i=>Math.min(s*Math.pow(2,i),n),keepAlive:{enabled:!0,intervalMs:st,pongTimeoutMs:nt},onOpen:()=>{this._connectionVersion+=1,this.emitConnectionEvent("connected")},onClose:()=>{this.emitConnectionEvent("disconnected")}}),_.createTRPCClient({links:[_.wsLink({client:this._wsClient,transformer:c})]})}return this._wsClient=null,_.createTRPCClient({links:[_.httpLink({url:`${this._serverUrl}/trpc`,headers:t,transformer:c})]})}}function at(e){return new Ce(e)}async function ve(e,t){if(e.length===0)return null;if(typeof fetch!="function")return e[0]??null;const s=typeof window<"u"&&typeof window.location<"u"&&window.location.protocol==="https:"?e.filter(o=>o.toLowerCase().startsWith("https://")):e;if(s.length===0)return null;const n=s.map(()=>new AbortController),i=s.map(async(o,l)=>{const u=n[l],m=setTimeout(()=>u.abort(),t);try{const p=await fetch(`${o.replace(/\/+$/,"")}/trpc/health`,{method:"GET",signal:u.signal,credentials:"omit"});if(!p.ok)throw new Error(`${p.status}`);return o}finally{clearTimeout(m)}});try{const o=await Promise.any(i);for(const l of n)try{l.abort()}catch{}return o}catch{return null}}var q=(e=>(e.Motion="motion",e.Person="person",e.Vehicle="vehicle",e.Animal="animal",e.Audio="audio",e.Face="face",e.Plate="plate",e.Package="package",e.Doorbell="doorbell",e.Sensor="sensor",e))(q||{});const Y=["animal","dog_cat","dog","cat","horse","sheep","cow","elephant","bear","zebra","giraffe","mouse","rabbit","deer","lion","tiger","bird","eagle","owl","pigeon","fish","whale","dolphin","snake","turtle","lizard"],W=["person","people","pedestrian","rider","driver","cyclist","skier","skateboarder","face","hand","head","body"],K=["vehicle","car","truck","bus","motorcycle","bicycle","van","ambulance","police_car","fire_truck","train","subway","tram","airplane","boat","ship","helicopter"],G=["face","eyes","nose","mouth","ears","eyebrows","left_eye","right_eye","pupil","iris","eyelid","eye_corner","upper_lip","lower_lip","teeth","chin","cheek","forehead","jaw","glasses","sunglasses","facial_hair","beard","mustache","facial_landmark","facial_keypoint"],x=["plate","license_plate","front_plate","rear_plate","motorcycle_plate","temporary_plate","dealer_plate","licensePlate","plate_number","plate_character","plate_digit","plate_letter","plate_symbol","plate_region","plate_country_identifier","plate_frame","plate_bolt","plate_sticker","plate_validation_tag","damaged_plate","obscured_plate","dirty_plate"],H=["motion","movement","other"],j=["package","packet"],X=["audio"],Z=["speech","scream","babbling","yell","bellow","whoop","whispering","laughter","snicker","crying","cry","sigh","singing","choir","chant","mantra","child_singing","rapping","humming","groan","grunt","whistling","breathing","wheeze","snoring","gasp","pant","snort","cough","throat_clearing","sneeze","sniff","cheering","applause","chatter","crowd","children_playing","bark","yip","howl","bow-wow","growling","whimper_dog","purr","meow","hiss","caterwaul","pets","livestock","doorbell","ding-dong","door","slam","knock","alarm","telephone","music","dog","dogs"],Q=["doorbell","ring"],J=["lock","binary","flood","entry","door","leak","door_open","flooded","entry_open"],ee={...Y.reduce((e,t)=>({...e,[t]:"animal"}),{}),...W.reduce((e,t)=>({...e,[t]:"person"}),{}),...K.reduce((e,t)=>({...e,[t]:"vehicle"}),{}),...H.reduce((e,t)=>({...e,[t]:"motion"}),{}),...j.reduce((e,t)=>({...e,[t]:"package"}),{}),...G.reduce((e,t)=>({...e,[t]:"face"}),{}),...x.reduce((e,t)=>({...e,[t]:"plate"}),{}),...X.reduce((e,t)=>({...e,[t]:"audio"}),{}),...Z.reduce((e,t)=>({...e,[t]:"audio"}),{}),...Q.reduce((e,t)=>({...e,[t]:"doorbell"}),{}),...J.reduce((e,t)=>({...e,[t]:"sensor"}),{})},Pe=e=>G.includes(e),Se=e=>x.includes(e),lt=e=>Y.includes(e),ct=e=>W.includes(e),ut=e=>K.includes(e),dt=e=>H.includes(e),ft=e=>Q.includes(e),mt=e=>j.includes(e),ht=e=>X.includes(e)||Z.includes(e),pt=e=>J.includes(e),yt=e=>Pe(e)||Se(e),gt=e=>ee[e],_t=e=>{const{className:t}=e,r={face:"person",plate:"vehicle"},s=ee[t];return s&&s!==t?s:r[t]},Te=Object.values(q),D=Te.filter(e=>e!=="motion"),te=["person","doorbell","package"],ke=[...te,"vehicle","animal","audio","face","plate"],Ie=[...D];function wt(e,t){switch(e){case"critical":return te;case"important":return ke;case"all":return Ie;case"custom":return t?.length?t:D;default:return D}}const re={Light:"light",Switch:"switch",WindowCovering:"cover",Lock:"lock",SecuritySystem:"alarm",Buttons:"button",Select:"select",Siren:"siren",Sensor:"sensor",Entry:"entry",Program:"script",MediaPlayer:"media_player",Outlet:"switch",light:"light",switch:"switch",input_boolean:"switch",cover:"cover",lock:"lock",alarm_control_panel:"alarm",input_button:"button",button:"button",input_select:"select",select:"select",siren:"siren",sensor:"sensor",media_player:"media_player",script:"script"},bt={light:"light",switch:"switch",input_boolean:"switch",cover:"cover",lock:"lock",alarm_control_panel:"alarm",input_button:"button",button:"button",input_select:"select",select:"select",siren:"siren",sensor:"sensor",binary_sensor:"sensor",media_player:"media_player",script:"script",climate:"climate",camera:"camera",fan:"fan",vacuum:"vacuum",automation:"automation",scene:"scene",input_number:"sensor",person:"person",device_tracker:"tracker",weather:"weather",water_heater:"climate"},Et={Light:"light",Switch:"switch",WindowCovering:"cover",Lock:"lock",SecuritySystem:"alarm",Buttons:"button",Select:"select",Siren:"siren",Sensor:"sensor",Entry:"entry",Program:"script",MediaPlayer:"media_player",Camera:"camera",Doorbell:"doorbell",Fan:"fan",Outlet:"switch"};function Ct(e){const t=re[e];if(t)return t;const r=e.toLowerCase();return re[r]??null}const Re=["Entry","Light","Switch","Lock","SecuritySystem","Buttons","WindowCovering","Siren","Sensor","Select","Program"],vt=new Set(Re),Ae=["light","switch","input_boolean","cover","lock","alarm_control_panel","input_button","button","input_select","select","siren","media_player","script"],Pt=new Set(Ae),N=[{id:"liveStream",label:"Live Stream",sources:{frigate:!0,scrypted:!0,rtsp:!0},adapterMethod:"getLiveStream"},{id:"multiResolution",label:"Multi-Resolution",sources:{frigate:!0,scrypted:!0,rtsp:!1},adapterMethod:"getResolutions"},{id:"motion",label:"Motion Detection",sources:{frigate:!1,scrypted:!0,rtsp:!1},adapterMethod:"getMotion"},{id:"objectDetection",label:"Object Detection",sources:{frigate:!1,scrypted:!0,rtsp:!1},adapterMethod:"getObjectDetections"},{id:"audioVolume",label:"Audio Level",sources:{frigate:!1,scrypted:!0,rtsp:!1},adapterMethod:"getAudioVolume"},{id:"audioVolumes",label:"Audio Volumes (dBFS)",sources:{frigate:!1,scrypted:!0,rtsp:!1},adapterMethod:"getAudioVolumes"},{id:"ptz",label:"PTZ Control",sources:{frigate:!1,scrypted:!0,rtsp:!1},adapterMethod:"getPTZ"},{id:"intercom",label:"Intercom (Mic)",sources:{frigate:!1,scrypted:!0,rtsp:!1},adapterMethod:"getIntercomSupport"},{id:"deviceStatus",label:"Device Status",sources:{frigate:!1,scrypted:!0,rtsp:!1},adapterMethod:"getStatus"},{id:"timeline",label:"Detection Timeline",sources:{frigate:!0,scrypted:!0,rtsp:!1},adapterMethod:"getCameraDayData"},{id:"clusteredTimeline",label:"Clustered Timeline",sources:{frigate:!0,scrypted:!0,rtsp:!1},requiresBackend:!0,adapterMethod:"getClusteredDayData"},{id:"detectionClasses",label:"Detection Classes",sources:{frigate:!0,scrypted:!0,rtsp:!1},adapterMethod:"getDetectionClasses"},{id:"videoClips",label:"Video Clips",sources:{frigate:!0,scrypted:!0,rtsp:!1},adapterMethod:"getVideoClips"},{id:"nvrPlayback",label:"NVR Playback",sources:{frigate:!0,scrypted:!0,rtsp:!1},adapterMethod:"getNvrPlaybackSupported"},{id:"nvrScrub",label:"NVR Scrub/Seek",sources:{frigate:!1,scrypted:!0,rtsp:!1},adapterMethod:"seekRecordingStream"},{id:"recordingThumbnail",label:"Recording Thumbnails",sources:{frigate:!0,scrypted:!0,rtsp:!1},adapterMethod:"getRecordingStreamThumbnail"},{id:"nvrSeekToLive",label:"Seek to Live",sources:{frigate:!1,scrypted:!0,rtsp:!1},adapterMethod:"seekNvrToLive"}];function St(e,t,r){const s=N.find(n=>n.id===e);return!(!s||!s.sources[t]||s.platforms&&s.platforms[r]===!1)}function Tt(e){return N.filter(t=>t.sources[e])}function kt(){return N.filter(e=>e.requiresBackend)}function It(e,t,r){if(e.length===0)return null;const s=t.viewportWidth*t.viewportHeight*(t.pixelRatio??1),n=t.bandwidthMbps??100,i=t.packetLoss??0,o=t.rttMs??50;let l="high";t.maxResolution==="low"||t.isCellular||n<1||i>.05?l="low":t.maxResolution==="medium"||n<5||s<5e5||o>200?l="medium":(t.maxResolution==="high"||s>2e6)&&(l="high");const u={main:"high",sub:"medium",ext:"low"},m=r??"native",p=e.map(f=>{let d=0;const h=u[f.profile]??"medium";if(h===l?d+=100:(l==="high"&&h==="medium"||l==="medium"&&h==="high"||l==="medium"&&h==="low"||l==="low"&&h==="medium")&&(d+=50),f.transport===m?d+=30:f.transport==="native"?d+=20:f.transport==="rtsp"?d+=15:f.transport==="rtmp"&&(d+=10),f.metadata?.width&&f.metadata?.height){const v=f.metadata.width*f.metadata.height/Math.max(s,1);v>=.8&&v<=2?d+=25:v>=.5&&v<=3&&(d+=15),v>4&&n<10&&(d-=20)}return f.metadata?.codec&&(n<5&&f.metadata.codec.includes("265")&&(d+=10),n>=10&&f.metadata.codec.includes("264")&&(d+=5)),{...f,score:d,targetTier:l}});p.sort((f,d)=>d.score-f.score);const y=p[0];return{streamName:y.streamName,profile:y.profile,transport:y.transport,label:y.label,metadata:y.metadata,reason:`${y.targetTier} quality → ${y.profile}/${y.transport} (score: ${y.score})`}}function Rt(e,t){return t?10:e.isCellular||(e.packetLoss??0)>.02?15:30}a.DEFAULT_ENABLED_CLASSES=D,a.DetectionClass=q,a.ELIGIBLE_HA_DOMAINS=Ae,a.ELIGIBLE_HA_DOMAINS_SET=Pt,a.ELIGIBLE_SCRYPTED_DEVICE_TYPES=Re,a.ELIGIBLE_SCRYPTED_DEVICE_TYPES_SET=vt,a.FEATURE_MATRIX=N,a.HA_DOMAIN_TYPE_MAP=bt,a.RAW_TO_CANONICAL=re,a.SCRYPTED_TYPE_TO_CANONICAL=Et,a.System=Ce,a.TIMELINE_PRESET_ALL=Ie,a.TIMELINE_PRESET_CRITICAL=te,a.TIMELINE_PRESET_IMPORTANT=ke,a.animalClasses=Y,a.audioClasses=X,a.audioLabelClasses=Z,a.createSystem=at,a.defaultDetectionClasses=Te,a.detectionClassesDefaultMap=ee,a.doorbellClasses=Q,a.faceClasses=G,a.getBackendRequiredFeatures=kt,a.getCanonicalDeviceType=Ct,a.getClassesForTimelinePreset=wt,a.getNextEvalInterval=Rt,a.getParentClass=gt,a.getParentDetectionClass=_t,a.getSourceFeatures=Tt,a.isAnimalClassname=lt,a.isAudioClassname=ht,a.isDoorbellClassname=ft,a.isFaceClassname=Pe,a.isFeatureAvailable=St,a.isLabelDetection=yt,a.isMotionClassname=dt,a.isPackageClassname=mt,a.isPersonClassname=ct,a.isPlateClassname=Se,a.isSensorLabelClassname=pt,a.isVehicleClassname=ut,a.licensePlateClasses=x,a.motionClasses=H,a.packageClasses=j,a.personClasses=W,a.raceFastestEndpoint=ve,a.selectOptimalStream=It,a.sensorLabelClasses=J,a.vehicleClasses=K})(se);const Nt=Mt(se),zt=Dt({__proto__:null,default:Nt},[se]);export{zt as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as k,z as B,g as F,i as U,s as z,p as $,m as W,j,k as P,l as K,n as R,o as H,q,r as Z,t as V,u as G,v as Y,A as Se,w as ye,x as be,y as Ce,B as ve,C as we,E as Ie,F as Ae,G as Ee,H as _e,I as De,J as ke,K as Pe,L as Re,N as Ne,O as Te,P as Oe,Q as xe,R as Me,T as Le,U as Be,V as Fe,X as Ue,Y as ze,Z as $e,_ as We,$ as je,a0 as Ke,a1 as He,a2 as qe,a3 as Ze,a4 as Ve,a5 as Ge,a6 as Ye,a7 as Je,a8 as Qe,a9 as Xe,aa as et,ab as tt,ac as at,ad as st,ae as it,af as nt,ag as rt,ah as ot,ai as ct,aj as dt,ak as lt,al as ut,am as ht,an as mt,ao as pt,ap as ft,aq as gt,ar as St,as as yt,at as bt,au as Ct,av as vt,aw as wt,ax as It,ay as At,az as Et,aA as _t,aB as Dt,aC as kt,aD as Pt,aE as Rt,aF as Nt,aG as Tt,aH as Ot,aI as xt,aJ as Mt,aK as Lt,aL as Bt,aM as Ft,aN as Ut,aO as zt,aP as $t,aQ as Wt,aR as jt,aS as Kt,aT as Ht,aU as qt,aV as Zt,aW as Vt,aX as Gt,aY as Yt,aZ as Jt,a_ as Qt,a$ as Xt,b0 as ea,b1 as ta,b2 as aa,b as sa,b3 as ia,D as na,b4 as ra,b5 as oa,b6 as ca,b7 as da,a as la,b8 as ua,b9 as ha,ba as ma,bb as pa,bc as fa,bd as ga,be as Sa,bf as ya,bg as ba,bh as Ca,bi as va,bj as wa,bk as Ia,bl as Aa,bm as Ea,bn as _a,bo as Da,bp as ka,bq as Pa,br as Ra,bs as Na,bt as Ta,bu as Oa,bv as xa,bw as Ma,bx as La,by as Ba,bz as Fa,bA as Ua,bB as za,bC as $a,M as Wa,bD as ja,bE as Ka,bF as Ha,bG as qa,bH as Za,bI as Va,bJ as Ga,bK as Ya,bL as Ja,bM as Qa,bN as Xa,S as es,bO as ts,bP as as,bQ as ss,bR as is,bS as ns,bT as rs,bU as os,bV as cs,bW as ds,bX as ls,bY as us,bZ as hs,b_ as ms,b$ as ps,c0 as fs,c1 as gs,c2 as Ss,c3 as ys,c4 as bs,c5 as Cs,c6 as vs,c7 as ws,c8 as Is,c9 as As,ca as Es,cb as _s,cc as Ds,cd as ks,ce as Ps,cf as Rs,cg as Ns,ch as Ts,ci as Os,cj as xs,ck as Ms,cl as Ls,cm as Bs,cn as Fs,co as Us,cp as zs,cq as $s,cr as Ws,cs as js,ct as Ks,cu as Hs,cv as qs,cw as Zs,cx as Vs,cy as Gs,cz as Ys,cA as Js,d as Qs,cB as Xs,cC as ei,cD as ti,cE as ai,cF as si,cG as ii,cH as ni,cI as ri,cJ as oi,cK as ci,cL as di,cM as li,cN as ui,cO as hi,cP as mi,cQ as pi,cR as fi,cS as gi,cT as Si,cU as yi,cV as bi,cW as Ci,cX as vi,cY as wi,cZ as Ii,c_ as Ai,c$ as Ei,d0 as _i,d1 as Di,d2 as ki,d3 as Pi,d4 as Ri,d5 as Ni,d6 as Ti,d7 as Oi,d8 as xi,f as Mi,d9 as Li,da as Bi,db as Fi,dc as Ui,dd as zi,de as $i,df as Wi,dg as ji,dh as Ki,di as Hi,dj as qi,dk as Zi,dl as Vi,dm as Gi,dn as Yi,dp as Ji,W as Qi,dq as Xi,dr as en,ds as tn,dt as an,du as sn,dv as nn,dw as rn,dx as on,dy as cn,dz as dn,dA as ln,dB as un,dC as hn,dD as mn,dE as pn,dF as fn,dG as gn,dH as Sn,dI as yn,dJ as bn,dK as Cn,dL as vn,dM as wn,dN as In,dO as An,dP as En,dQ as _n,dR as Dn,dS as kn,dT as Pn,dU as Rn,dV as Nn,c as Tn,dW as On,dX as xn,dY as Mn,e as Ln,dZ as Bn,d_ as Fn,d$ as Un,e0 as zn,e1 as $n,e2 as Wn,e3 as jn,e4 as Kn,e5 as Hn,e6 as qn,e7 as Zn,e8 as Vn,e9 as Gn,ea as Yn,eb as Jn,ec as Qn,ed as Xn,ee as er,ef as tr,eg as ar,eh as sr,ei as ir,ej as nr,ek as rr,el as or,em as cr,en as dr,eo as lr,ep as ur,eq as hr,er as mr,es as pr,et as fr,eu as gr,ev as Sr,ew as yr,ex as br,ey as Cr,ez as vr,eA as wr,eB as Ir,eC as Ar,eD as Er,eE as _r,eF as Dr,eG as kr,eH as Pr,eI as Rr,eJ as Nr,eK as Tr,eL as Or,eM as xr,eN as Mr,eO as Lr,eP as Br,eQ as Fr,eR as Ur,eS as zr,eT as $r}from"./index-DeVjiPqm.js";import{E as C,A as Wr,C as jr,a as Kr,D as Hr,K as qr,M as Zr,S as Vr}from"./method-access-map-OoQznstl.js";import{Z as Gr,p as Yr,q as Jr,v as Qr,w as Xr,x as eo,y as J,z as to,A as ao}from"./schemas-DZqswtjx.js";class so{disposers=[];disposed=!1;onError;constructor(e={}){this.onError=e.onError??((t,s)=>{console.error(`[DisposerChain] disposer #${s} threw`,t)})}add(e){if(this.disposed){try{const t=e();t&&typeof t.then=="function"&&t.catch(s=>this.onError(s,-1))}catch(t){this.onError(t,-1)}return()=>{}}return this.disposers.push(e),()=>{const t=this.disposers.indexOf(e);t>=0&&this.disposers.splice(t,1)}}get isDisposed(){return this.disposed}get size(){return this.disposers.length}async dispose(){if(this.disposed)return;this.disposed=!0;const e=this.disposers.slice().reverse();this.disposers=[];for(let t=0;t<e.length;t++){const s=e[t];try{const i=s();i&&typeof i.then=="function"&&await i}catch(i){this.onError(i,e.length-1-t)}}}}const Q="main-group",X="hub-only";function b(a){return{placement:a.execution?.placement??X,group:a.execution?.group??Q}}function io(a){const e=b(a).placement;return e==="any-node"||e==="agent-only"}function no(a){return b(a).placement==="agent-only"}function ro(a){return b(a).group}function oo(a){return b(a).placement}function co(a,e){return a.category===e}function N(a,e,t){return{id:typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2),timestamp:new Date,source:e,category:a,data:t}}function ee(a,e){const t=e.ts??Date.now();a.emit(N("system.ready-state",{type:"capability",id:e.capName,nodeId:e.sourceNodeId},{capName:e.capName,scope:e.scope,state:e.state,generation:e.generation,sourceNodeId:e.sourceNodeId,ts:t}))}class te{_ctx=null;_config;_readinessGeneration=typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2,14);_registeredCapNames=[];defaults;constructor(e){this.defaults=e,this._config={...e}}get autoEmitReadiness(){return!0}get ctx(){if(!this._ctx)throw new Error(`${this.constructor.name}: ctx accessed before initialize()`);return this._ctx}get ctxIfReady(){return this._ctx}get config(){return this._config}async initialize(e){this._ctx=e,await this.resolveConfig();const t=await this.onInitialize();this.emitLifecycle(C.AddonStarted);const s=ae(t),i=s&&"providers"in s&&s.providers?s.providers:[];return this._registeredCapNames=i.map(n=>n.capability.name),s}postBrokerStart(){this.autoEmitReadiness&&this._registeredCapNames.length>0&&this.emitReadinessForProviders("ready")}async onHubReachable(){}async shutdown(){this.emitLifecycle(C.AddonStopped),this.autoEmitReadiness&&this.emitReadinessForProviders("down"),await this.onShutdown();for(const e of this._subscriptions)e();this._subscriptions=[],this._ctx=null}async onShutdown(){}async onConfigChanged(){}field(e){return e}schema(e){return e}globalSettingsSchema(){return null}deviceSettingsSchema(){return null}async getGlobalSettings(e){const t=this.globalSettingsSchema();if(!t)return{sections:[]};const s=await this._ctx?.settings?.readAddonStore()??{};return k(t,e?{...s,...e}:s)}async updateGlobalSettings(e){await this._ctx?.settings?.writeAddonStore(e),await this.resolveConfig(),await this.onConfigChanged(),this.emitLifecycle(C.AddonUpdated,{level:"global"}),this.maybeAutoRestart(e,this.globalSettingsSchema())}maybeAutoRestart(e,t){if(!t)return;const s=new Set;for(const o of t.sections)for(const c of o.fields)c.type==="separator"||c.type==="info"||c.requiresRestart&&s.add(c.key);if(s.size===0||!Object.keys(e).some(o=>s.has(o)))return;const n=this._ctx;if(!n)return;const r=n.id;setImmediate(()=>{n.api.addons?.restartAddon?.mutate({addonId:r}).then(()=>{n.logger.info("addon auto-restart triggered by restart-required setting change",{meta:{changedFields:Object.keys(e).filter(c=>s.has(c))}})}).catch(c=>{n.logger.error("addon auto-restart failed",{meta:{error:c instanceof Error?c.message:String(c)}})})})}async getDeviceSettings(e){const t=this.deviceSettingsSchema();if(!t)return{sections:[]};const s=await this._ctx?.settings?.readDeviceStore(e)??{};return k(t,s)}async updateDeviceSettings(e,t){await this._ctx?.settings?.writeDeviceStore(e,t)}_subscriptions=[];watchCapability(e,t){const s=Array.isArray(e)?e:[e],i=new Set(s);this.subscribe({category:"system.ready-state"},n=>{const r=n.data;if(typeof r.capName!="string"||!i.has(r.capName)||r.scope?.type!=="node")return;const o=r.scope.nodeId;if(typeof o!="string"||o.length===0)return;const c=r.capName;r.state==="down"?t.onDown?.(o,c):r.state==="ready"&&t.onReady?.(o,c)})}subscribe(e,t){const s=this.ctx.eventBus.subscribe(e,t);this._subscriptions.push(s)}emitLifecycle(e,t){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:e,data:t??{}})}catch{}}emitReadinessForProviders(e){const t=this._ctx;if(!t||this._registeredCapNames.length===0)return;const s=t.kernel?.localNodeId??"hub",i=s.includes("/")?s.split("/")[0]:s;for(const n of this._registeredCapNames)try{ee(t.eventBus,{capName:n,scope:{type:"node",nodeId:i},state:e,generation:this._readinessGeneration,sourceNodeId:i})}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 e=await this.readAddonStoreWithRetry(),t={...this.defaults};for(const s of Object.keys(this.defaults)){const i=e[s];if(i!=null){const n=typeof this.defaults[s];typeof i===n&&(t[s]=i)}}this._config=t}async readAddonStoreWithRetry(){const e=this._ctx?.settings;if(!e)return{};const t=[150,350,600,900];let s;for(let i=0;i<=t.length;i++)try{return await e.readAddonStore()??{}}catch(n){s=n;const r=n instanceof Error?n.message:String(n);if(!(r.includes("SqliteSettingsBackend not initialized")||r.includes("provider not available")))throw n;if(i===t.length)break;await new Promise(c=>setTimeout(c,t[i]))}return this._ctx?.logger?.warn?.("readAddonStore: settings-store unavailable after retries — using defaults",{meta:{error:s instanceof Error?s.message:String(s)}}),{}}}function ae(a){if(a!=null)return Array.isArray(a)?{providers:a}:a}function lo(a,e){return{id:a,getRoutes:()=>e,invoke:async t=>{const s=uo(e,t.method,t.path);if(!s)return{status:404,headers:{},redirectUrl:null,body:{error:`No route matches ${t.method} ${t.path}`}};const i={status:200,headers:{},redirectUrl:null},n=mo(i),r={params:{...t.params,...s.params},query:t.query,body:t.body,headers:t.headers,...t.user?{user:t.user}:{},...t.scopedToken!==void 0?{scopedToken:t.scopedToken}:{}};return await s.route.handler(r,n),i}}}function uo(a,e,t){const s=e.toUpperCase();for(const i of a){if(i.method!==s)continue;const n=ho(i.path,t);if(n!==null)return{route:i,params:n}}return null}function ho(a,e){const t=a.split("/").filter(Boolean),s=e.split("/").filter(Boolean);if(t.length!==s.length)return null;const i={};for(let n=0;n<t.length;n++){const r=t[n],o=s[n];if(r.startsWith(":"))i[r.slice(1)]=o;else if(r!==o)return null}return i}function mo(a){const e={status(t){return a.status=t,e},code(t){return a.status=t,e},send(t){a.body=t},redirect(t){a.redirectUrl=t,a.status===200&&(a.status=302)},header(t,s){return a.headers[t.toLowerCase()]=s,e},type(t){return a.contentType=t,e}};return e}class se extends Error{capName;scope;waitedMs;constructor(e,t,s){super(`Timed out waiting for ${e} (${f(t)}) to become ready after ${s}ms`),this.name="ReadinessTimeoutError",this.capName=e,this.scope=t,this.waitedMs=s}}function v(a,e){return`${a}|${f(e)}`}function f(a){switch(a.type){case"global":return"global";case"node":return`node:${a.nodeId}`;case"device":return`device:${a.deviceId}`}}function _(a,e){return a.type!==e.type?!1:a.type==="global"||e.type==="global"?!0:a.type==="node"&&e.type==="node"?a.nodeId===e.nodeId:a.type==="device"&&e.type==="device"?a.deviceId===e.deviceId:!1}class po{bus;sourceNodeId;logger;now;generation;snapshot=new Map;subscriptions=new Set;unsubscribeBus;unsubscribeAgentOffline;constructor(e){if(this.bus=e.eventBus,this.sourceNodeId=e.sourceNodeId,this.logger=e.logger,this.now=e.now??(()=>Date.now()),this.generation=e.generation??fo(),this.unsubscribeBus=this.bus.subscribe({category:"system.ready-state"},t=>this.ingest(t.data)),this.unsubscribeAgentOffline=this.bus.subscribe({category:"agent.offline"},t=>this.synthesizeDownForNode(t.data.agentId)),typeof this.bus.getRecent=="function")try{const t=this.bus.getRecent({category:"system.ready-state"});for(const s of t)this.ingest(s.data)}catch{}}close(){this.unsubscribeBus(),this.unsubscribeAgentOffline(),this.subscriptions.clear()}get(e,t){return this.snapshot.get(v(e,t))??null}getSnapshotForTransport(){return Array.from(this.snapshot.values())}hydrate(e){const t=this.now();for(const s of e){const i=v(s.capName,s.scope);if(this.snapshot.has(i))continue;const n={capName:s.capName,scope:s.scope,state:s.state,generation:s.generation,epoch:1,lastChange:t,sourceNodeId:s.sourceNodeId};this.snapshot.set(i,n),this.logger&&this.logger.debug(`readiness: ${s.capName} (${f(s.scope)}) → ${s.state} (hydrated, gen=${s.generation.slice(0,6)})`);const r={capName:s.capName,scope:s.scope,state:s.state,epoch:1,generation:s.generation,sourceNodeId:"hydrated",ts:t,durationInPrevState:0};for(const o of this.subscriptions)if(o.capName===s.capName&&_(o.scope,s.scope))try{o.handler(r)}catch(c){this.logger?.warn(`readiness hydrate handler threw for ${s.capName}: ${c.message??String(c)}`)}}}getAll(){return new Map(this.snapshot)}emitReady(e,t){this.emitTransition(e,t,"ready")}emitStarting(e,t){this.emitTransition(e,t,"starting")}emitDown(e,t){this.emitTransition(e,t,"down")}awaitReady(e,t,s={}){const i=s.timeoutMs??Number.POSITIVE_INFINITY,n=this.now();return this.get(e,t)?.state==="ready"?Promise.resolve():s.signal?.aborted?Promise.reject(s.signal.reason??new Error("aborted")):new Promise((o,c)=>{let l=!1;const d=this.onReadyState(e,t,A=>{A.state==="ready"&&(l||(l=!0,p(),o()))}),u=!Number.isFinite(i)?null:setTimeout(()=>{l||(l=!0,p(),c(new se(e,t,this.now()-n)))},i),S=()=>{l||(l=!0,p(),c(s.signal?.reason??new Error("aborted")))};s.signal?.addEventListener("abort",S,{once:!0});function p(){d(),u!==null&&clearTimeout(u),s.signal?.removeEventListener("abort",S)}})}onReadyState(e,t,s){const i={capName:e,scope:t,handler:s};this.subscriptions.add(i);const n=this.get(e,t);return n!==null&&queueMicrotask(()=>{this.subscriptions.has(i)&&s({capName:e,scope:t,state:n.state,epoch:n.epoch,generation:n.generation,sourceNodeId:this.sourceNodeId,ts:n.lastChange,durationInPrevState:0})}),()=>{this.subscriptions.delete(i)}}emitTransition(e,t,s){const i=this.now();this.bus.emit(N("system.ready-state",{type:"capability",id:e,nodeId:this.sourceNodeId},{capName:e,scope:t,state:s,generation:this.generation,sourceNodeId:this.sourceNodeId,ts:i}))}ingest(e){if(typeof e?.capName!="string"||e.state!=="ready"&&e.state!=="starting"&&e.state!=="down"||typeof e.generation!="string"||e.scope?.type!=="global"&&e.scope?.type!=="node"&&e.scope?.type!=="device")return;const t=v(e.capName,e.scope),s=this.snapshot.get(t)??null,i=this.now();let n;if(s===null?n=e.state==="ready"?1:0:s.generation!==e.generation&&e.state==="ready"?n=s.epoch+1:n=s.epoch,s!==null&&s.generation===e.generation&&s.state===e.state)return;const r=s===null?0:Math.max(0,i-s.lastChange),o={capName:e.capName,scope:e.scope,state:e.state,generation:e.generation,epoch:n,lastChange:i,sourceNodeId:e.sourceNodeId};this.snapshot.set(t,o);const c={capName:e.capName,scope:e.scope,state:e.state,epoch:n,generation:e.generation,sourceNodeId:e.sourceNodeId,ts:e.ts,durationInPrevState:r};this.logger&&this.logger.debug(`readiness: ${e.capName} (${f(e.scope)}) → ${e.state} epoch=${n} gen=${e.generation.slice(0,6)} (prev ${r}ms)`);for(const l of this.subscriptions)if(l.capName===e.capName&&_(l.scope,e.scope))try{l.handler(c)}catch(d){this.logger?.warn(`readiness handler threw for ${e.capName}: ${d.message??String(d)}`)}}synthesizeDownForNode(e){const t=this.now();for(const[s,i]of this.snapshot){if(i.state==="down"||!(i.scope.type==="node"&&i.scope.nodeId===e||i.scope.type==="device"&&i.sourceNodeId===e))continue;const r=Math.max(0,t-i.lastChange),o={...i,state:"down",lastChange:t};this.snapshot.set(s,o);const c={capName:i.capName,scope:i.scope,state:"down",epoch:i.epoch,generation:i.generation,sourceNodeId:this.sourceNodeId,ts:t,durationInPrevState:r};this.logger&&this.logger.debug(`readiness: ${i.capName} (${f(i.scope)}) → down (synthesized from agent.offline ${e})`);for(const l of this.subscriptions)if(l.capName===i.capName&&_(l.scope,i.scope))try{l.handler(c)}catch(d){this.logger?.warn(`readiness handler threw during agent.offline demux for ${i.capName}: ${d.message??String(d)}`)}}}}function fo(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2,14)}function go(a,e){for(const{capName:t,scope:s}of e)a.emitDown(t,s)}const So=["data","media","recordings","recordings-high","recordings-low","recordings-clips","event-images","models","addons-data","cache","logs","backups"],yo={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"},ie={high:"High",mid:"Mid",low:"Low"};function bo(a){return ie[a]??a.charAt(0).toUpperCase()+a.slice(1)}function ne(a){return(a.width??0)*(a.height??0)}function re(a){if(a.length===0)return[];const e=a.map((s,i)=>({s,i,px:ne(s.metadata??{})})).sort((s,i)=>i.px-s.px),t=Array.from({length:a.length});for(let s=0;s<e.length;s++){const{s:i,i:n}=e[s];let r;s===0?r="high":s===e.length-1?r="low":r="mid",t[n]={...i,quality:r}}return t}function Co(a){const e=a.height??0,t=a.width??0;return e>=1080||t>=1920?"high":e>=480||t>=640?"mid":"low"}function vo(a){const e=a.protocols.find(i=>i.type==="rtsp"&&i.url)??a.protocols.find(i=>i.url),t=e?.type,s=t==="rtsp"?"rtsp":t==="http"||t==="flv"?"http-mjpeg":"custom";return{id:a.id,label:a.label??a.id,protocol:s,url:e?.url,profileHint:a.quality}}function m(a){return typeof a=="string"}function wo(a){return typeof a=="object"&&a!==null&&!Array.isArray(a)}function Io(a){return m(a)&&a.trim()?{url:a}:wo(a)&&m(a.url)&&a.url.trim()?{url:a.url,label:m(a.label)?a.label:void 0}:null}function Ao(a){const e=m(a.snapshot_url)?a.snapshot_url:void 0;if(Array.isArray(a.streams)){const r=[];for(const o of a.streams){const c=Io(o);c&&r.push(c)}return{streams:r,snapshot_url:e}}const t=[],s=m(a.main_stream_url)?a.main_stream_url:void 0;s&&t.push({url:s,label:m(a.main_stream_name)?a.main_stream_name:void 0});const i=m(a.sub_stream_url)?a.sub_stream_url:void 0;i&&t.push({url:i,label:m(a.sub_stream_name)?a.sub_stream_name:void 0});const n=m(a.third_stream_url)?a.third_stream_url:void 0;return n&&t.push({url:n,label:m(a.third_stream_name)?a.third_stream_name:void 0}),{streams:t,snapshot_url:e}}function Eo(a){if(a.length===0)return{};const e=re(a),t={},s=e.find(o=>o.quality==="high"),i=e.find(o=>o.quality==="mid"),n=e.find(o=>o.quality==="low");s&&(t.high=s.id),i&&(t.mid=i.id),n&&(t.low=n.id);const r=s??i??n??e[0];return r&&(t.high||(t.high=r.id),t.mid||(t.mid=r.id),t.low||(t.low=r.id)),t}const _o={streaming:!0,notifications:!0,objectDetection:!1,remoteAccess:!0,agentCluster:!1,smartHome:!0,recordings:!0,backup:!0,repl:!0},Do=["face","plate"],ko=["face","plate","clip","custom"],Po={cleanupIntervalMs:3600*1e3,detectionEventsDays:30,audioLevelsDays:7,snapshotsDays:14};var oe=(a=>(a.Addon="addon",a.Core="core",a.Device="device",a.Provider="provider",a.System="system",a))(oe||{});const ce="camstack/camstack-models",Ro=`https://huggingface.co/${ce}/resolve/main`,No={"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 T(a){return JSON.parse(a)}function de(a){return a===null||typeof a!="object"||Array.isArray(a)?null:{...a}}function To(a){return Array.isArray(a)?a:[]}function Oo(a,e=""){return typeof a=="string"?a:e}function xo(a,e=0){return typeof a=="number"?a:e}function Mo(a,e=!1){return typeof a=="boolean"?a:e}function Lo(a){try{return de(T(a))}catch{return null}}function Bo(a){try{const e=T(a);return Array.isArray(e)?e:null}catch{return null}}function Fo(a,e){return`https://huggingface.co/${a}/resolve/main/${e}`}function Uo(a,e){if(a.length!==e.length)return 0;let t=0,s=0,i=0;for(let r=0;r<a.length;r++)t+=a[r]*e[r],s+=a[r]*a[r],i+=e[r]*e[r];const n=Math.sqrt(s)*Math.sqrt(i);return n===0?0:t/n}class zo{constructor(e,t){this.elementId=e,this.getBackend=typeof t=="function"?t:()=>t}cache={};listeners=new Set;loaded=!1;getBackend;async ensureLoaded(){if(this.loaded)return;const e=this.getBackend();if(!e)throw new Error(`ElementConfigStore(${this.elementId}): settings backend not available`);const t=await e.query({collection:"config",filter:{where:{id:this.elementId},limit:1}});t.length>0&&(this.cache=t[0].data??{}),this.loaded=!0}getAll(){return{...this.cache}}get(e){const t=e.split(".");let s=this.cache;for(const i of t){if(s===null||typeof s!="object"||Array.isArray(s))return;s=Reflect.get(s,i)}return s}async set(e,t){await this.ensureLoaded(),$o(this.cache,e,t),await this.persist(),this.notifyListeners()}async setAll(e){await this.ensureLoaded(),this.cache={...e},await this.persist(),this.notifyListeners()}onChange(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}async load(){await this.ensureLoaded()}async loadDefaults(e){await this.ensureLoaded(),Object.keys(this.cache).length===0&&(this.cache={...e},await this.persist())}async persist(){const e=this.getBackend();if(!e)throw new Error(`ElementConfigStore(${this.elementId}): settings backend not available — cannot persist config`);await e.set({collection:"config",key:this.elementId,value:this.cache})}notifyListeners(){const e=this.getAll();for(const t of this.listeners)try{t(e)}catch{}}}function $o(a,e,t){const s=e.split(".");let i=a;for(let n=0;n<s.length-1;n++){const r=s[n],o=i[r];if(o===null||typeof o!="object"||Array.isArray(o)){const c={};i[r]=c,i=c}else i=o}i[s[s.length-1]]=t}const O={cpu:"onnx",coreml:"onnx",cuda:"onnx",tensorrt:"onnx","onnx-py":"onnx",pytorch:"pt",openvino:"openvino"},le={onnx:"onnx",coreml:"coreml",openvino:"openvino",tflite:"tflite",pytorch:"pt"},ue={coreml:"coreml_inference.py",pytorch:"pytorch_inference.py",openvino:"openvino_inference.py"};function he(a,e){return a==="node"?"onnx":{coreml:"coreml",openvino:"openvino",pytorch:"pytorch","onnx-py":"onnx",cpu:"onnx"}[e]??e}function Wo(a,e){return a==="node"?O[e]??"onnx":{coreml:"coreml",openvino:"openvino",pytorch:"pt","onnx-py":"onnx",cpu:"onnx"}[e]??"onnx"}function jo(a,e){return!a||a==="auto"?"auto":he(a,e??"cpu")}function Ko(a){return O[a]??"onnx"}function Ho(a){return le[a]}function qo(a){return ue[a]}function Zo(a){return a==="coreml"||a==="pytorch"||a==="openvino"}function me(a){return a instanceof Error?a.message:typeof a=="string"?a:String(a)}async function Vo(a,e){const t=performance.now();try{return{output:e!==void 0?await Go(a(),e):await a(),durationMs:M(performance.now()-t),ok:!0}}catch(s){return{output:void 0,durationMs:M(performance.now()-t),ok:!1,error:me(s)}}}function M(a){return Math.round(a*100)/100}function Go(a,e){return new Promise((t,s)=>{const i=setTimeout(()=>s(new Error(`Inference timeout after ${e}ms`)),e);a.then(n=>{clearTimeout(i),t(n)}).catch(n=>{clearTimeout(i),s(n)})})}const Yo=[{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"}],Jo=[{id:"person",name:"Person"},{id:"vehicle",name:"Vehicle"},{id:"animal",name:"Animal"}],Qo={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},Xo={camera:{type:"camera",label:"Camera",icon:"camera"}};class g{schema;data;persistFn;constructor(e,t,s){this.schema=e,this.data=t,this.persistFn=s}static fromSchema(e,t,s={},i){const n=e.safeParse(s);if(n.success)return new g(e,n.data,t);const r=new Set;for(const d of n.error.issues){const h=d.path[0];typeof h=="string"&&r.add(h)}const o={...s};for(const d of r)delete o[d];const c=e.safeParse(o);if(i?.({droppedKeys:[...r],issues:n.error.issues}),c.success)return t(c.data).catch(()=>{}),new g(e,c.data,t);const l=e.parse({});return new g(e,l,t)}get values(){return this.data}get(e){return this.data[e]}async set(e,t){const s=this.schema.parse({...this.data,[e]:t});this.data=s,await this.persistFn(this.data)}async setAll(e){const t=this.schema.parse({...this.data,...e});this.data=t,await this.persistFn(this.data)}async deleteKey(e){const{[e]:t,...s}=this.data,i=this.schema.parse(s);this.data=i,await this.persistFn(this.data)}entries(){const e=this.schema.shape;return Object.entries(e).map(([t,s])=>({key:t,schema:s,value:this.data[t],description:s.description}))}}class I{writer;pendingWrites=new Set;slices;schemas=new Map;listeners=new Set;capListeners=new Map;constructor(e,t){this.writer=t,this.slices=new Map;for(const[s,i]of Object.entries(e))i&&typeof i=="object"&&!Array.isArray(i)&&this.slices.set(s,{...i})}static fromInitial(e,t){return new I(e,t)}installCapSchema(e,t){const s=this.schemas.get(e);if(s){if(s!==t)throw new Error(`[DeviceRuntimeState] capability "${e}" registered a different runtime-state schema; each cap must declare ONE shape across every provider`);return}this.schemas.set(e,t);const i=this.slices.get(e);if(i){const n=t.safeParse(i);n.success?this.slices.set(e,n.data):this.slices.delete(e)}}getCapState(e){const t=this.slices.get(e);if(t)return Object.freeze({...t})}getCapField(e,t){return this.slices.get(e)?.[t]}setCapState(e,t){this.applyCapWrite(e,t,!1)}patchCapState(e,t){this.applyCapWrite(e,t,!0)}applyCapWrite(e,t,s){const i=this.schemas.get(e);if(!i)throw new Error(`[DeviceRuntimeState] no schema registered for cap "${e}" — did the device register it via ctx.registerNativeCap before writing?`);const n=this.slices.get(e)??{},r=s?{...n,...t}:{...t},o=i.parse(r);if(ec(n,o))return;this.slices.set(e,o),this.fireListeners([e]);const c=this.writer(e,{...o}).catch(()=>{});this.pendingWrites.add(c),c.finally(()=>{this.pendingWrites.delete(c)})}fireListeners(e){const t=this.snapshot();for(const s of this.listeners)try{s(e,t)}catch{}for(const s of e){const i=this.capListeners.get(s);if(!i)continue;const n=this.getCapState(s);for(const r of i)try{r(n)}catch{}}}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}subscribeCap(e,t){let s=this.capListeners.get(e);s||(s=new Set,this.capListeners.set(e,s));const i=n=>{t(n)};return s.add(i),()=>{const n=this.capListeners.get(e);n&&(n.delete(i),n.size===0&&this.capListeners.delete(e))}}snapshot(){const e={};for(const[t,s]of this.slices)e[t]=Object.freeze({...s});return Object.freeze(e)}async flush(){if(this.pendingWrites.size===0)return;const e=[...this.pendingWrites];await Promise.allSettled(e)}}function ec(a,e){const t=Object.keys(a),s=Object.keys(e);if(t.length!==s.length)return!1;for(const i of t)if(a[i]!==e[i])return!1;return!0}const D="lastFetchedAt";function tc(a){const{runtimeState:e,cap:t,ownDeviceId:s,refresh:i,staleMs:n,empty:r}=a,o=async()=>{const d=e.getCapState(t.name),h=typeof d?.[D]=="number"?d[D]:0;(!d||Date.now()-h>n)&&await i()},c=()=>{const d=e.getCapState(t.name);if(!d)return r();const{[D]:h,...u}=d;return u};return{ensureFresh:o,getStatus:async({deviceId:d})=>{if(d!==s)throw new Error(`${t.name}: deviceId mismatch, expected ${s}, got ${d}`);return await o(),c()}}}const ac={audioMetrics:G,battery:V,brightness:Z,cameraStreams:q,deviceDiscovery:H,deviceStatus:R,doorbell:K,featureProbe:P,motion:j,motionTrigger:W,ptzAutotrack:$,switch:z,zoneAnalytics:U,zoneRules:F,zones:B};class sc{id;stableId;type;name;parentDeviceId;role;get online(){return this.runtimeState.getCapState("device-status")?.online??!1}set online(e){this.markOnline(e)}get state(){if(!this._stateProxyCache){const e={},t={get:(s,i)=>{const n=i;if(n in e)return e[n];const r=ac[n];if(!r)return;const o=this.sliceProxy(r);return e[n]=o,o}};this._stateProxyCache=new Proxy(e,t)}return this._stateProxyCache}_stateProxyCache;config;runtimeState;ctx;location;disabled;constructor(e,t,s){if(this.ctx=e,this.id=e.id,this.stableId=e.stableId,this.type=s.type,!e.deviceMeta)throw new Error(`BaseDevice constructor: ctx.deviceMeta is required (id=${e.id} stableId=${e.stableId})`);this.name=e.deviceMeta.name,this.location=e.deviceMeta.location,this.disabled=e.deviceMeta.disabled,this.role=s.role,this.parentDeviceId=e.parentDeviceId;const i=e.persistedConfig??{};this.config=g.fromSchema(t,d=>e.persistConfig(d),i,({droppedKeys:d,issues:h})=>{e.logger.warn("Device config recovery: dropping invalid persisted fields",{tags:{deviceId:e.id,stableId:e.stableId},meta:{droppedKeys:[...d],firstIssue:h[0]?.message??null}})});let n=null;const r=async(d,h)=>{n||(n=e.fetchDevice(e.id)),await(await n).deviceState.setCapSlice({capName:d,slice:h})},o=e.initialRuntimeState??{};this.runtimeState=I.fromInitial(o,r),e.bindRuntimeState?.(this.runtimeState),e.registerNativeCap?.(R,{});const c={online:!1,lastChangedAt:Date.now()};this.runtimeState.setCapState("device-status",c),e.registerNativeCap?.(P,{});const l={flags:{},deviceType:null,model:null,channelCount:null,lastProbedAt:0,lastFetchedAt:0};this.runtimeState.setCapState("feature-probe",l)}async removeDevice(){}markOnline(e){if(this.online===e)return;const t={online:e,lastChangedAt:Date.now()};this.runtimeState.setCapState("device-status",t)}async refreshFeatures(){const t=this.ctx.api?.deviceManager?.registerDevice;if(t)try{await t.mutate({addonId:this.ctx.deviceMeta.addonId,stableId:this.stableId,id:this.id,type:this.type,name:this.name,parentDeviceId:this.parentDeviceId,features:[...this.features],config:{}})}catch{}}getCapSlice(e){return this.runtimeState.getCapState(e.name)??null}setCapSlice(e,t){this.runtimeState.setCapState(e.name,t)}sliceProxy(e){const t={},s={get:(i,n)=>this.runtimeState.getCapState(e.name)?.[n],set:(i,n,r)=>(this.runtimeState.patchCapState(e.name,{[n]:r}),!0),has:(i,n)=>{const r=this.runtimeState.getCapState(e.name);return r?n in r:!1},ownKeys:()=>{const i=this.runtimeState.getCapState(e.name);return i?Object.keys(i):[]},getOwnPropertyDescriptor:(i,n)=>{const r=this.runtimeState.getCapState(e.name);if(!(!r||!(n in r)))return{configurable:!0,enumerable:!0,value:r[n]}}};return new Proxy(t,s)}getSettingsUISchema(){return{sections:[]}}async applySettingsPatch(e){await this.config.setAll(e)}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 pe(a,e){const t={};for(const s of a.config.entries())t[s.key]=s.value;return{id:a.id,stableId:a.stableId,addonId:e,type:String(a.type),name:a.name,parentDeviceId:a.parentDeviceId,online:a.online,features:[...a.features],config:t}}class ic extends te{async onInitialize(){return this.ctx.logger.info(`${this.providerName} Provider initialized`),[{capability:Y,provider:this}]}async onShutdown(){const e=await this.ctx.kernel.devices?.getAll()??[];for(const t of e)try{await this.ctx.kernel.devices?.decommission(t.id)}catch(s){this.ctx.logger.warn(`${this.providerName}: decommission failed`,{tags:{deviceId:t.id,stableId:t.stableId},meta:{error:s instanceof Error?s.message:String(s)}})}this.ctx.logger.info(`${this.providerName} Provider shut down`,{meta:{decommissionedCount:e.length}})}async start(){}async stop(){}async getStatus(){return{connected:!0,deviceCount:(await this.ctx.kernel.devices?.getAll()??[]).length}}async getDevices(){return(await this.ctx.kernel.devices?.getAll()??[]).map(t=>({id:t.stableId,name:t.name,type:String(t.type)}))}async supportsDiscovery(){return!1}async discoverDevices(){return[]}async adoptDiscoveredDevice(e){throw new Error(`${this.providerName} provider does not support discovery-based adoption`)}async supportsManualCreation(){return!0}async getChildCreationSchema(e){return this.onGetCreationSchema(e.type)}async createDevice(e){const t=await this.onCreateDevice(e.type,e.config),s=this.deviceClasses[t.meta.type];if(!s)throw new Error(`${this.providerName} provider: no device class registered for type "${t.meta.type}" — add it to the deviceClasses map`);const i=this.generateStableId(t.meta.type,t.config),n=await this.ctx.kernel.devices.create(i,s,t.config,null,t.meta);if(t.onAfterCreate)try{await t.onAfterCreate(n)}catch(r){this.ctx.logger.warn("createDevice: onAfterCreate hook threw — device is already registered",{tags:{deviceId:n.id,stableId:i},meta:{error:r instanceof Error?r.message:String(r)}})}return this.toSummary(n)}generateStableId(e,t){return`${this.addonId}-${Date.now()}`}async testCreationField(e){return{status:"ok",labels:["probe not implemented"]}}async restoreDevices(e){await this.onRestoreDevices(e),e.length>0&&this.ctx.logger.info(`Restored ${e.length} ${this.providerName} device(s)`)}async onRestoreDevices(e){const t=new Set;for(const i of e){if(i.parentDeviceId!==null)continue;const n=this.deviceClasses[i.type];if(!n){this.ctx.logger.warn("No device class registered for restored type — skipping",{tags:{stableId:i.stableId},meta:{type:i.type}});continue}try{await this.ctx.kernel.devices.create(i.stableId,n,{}),t.add(i.id)}catch(r){this.ctx.logger.warn("Failed to restore device",{tags:{stableId:i.stableId},meta:{type:i.type,error:r instanceof Error?r.message:String(r)}})}}const s=e.filter(i=>i.parentDeviceId!==null);for(const i of s){const n=this.deviceClasses[i.type];if(n&&i.parentDeviceId!==null&&t.has(i.parentDeviceId))try{await this.ctx.kernel.devices.create(i.stableId,n,{},i.parentDeviceId),t.add(i.id)}catch(r){this.ctx.logger.warn("Failed to restore hub-adopted child",{tags:{stableId:i.stableId,parentDeviceId:i.parentDeviceId},meta:{type:i.type,error:r instanceof Error?r.message:String(r)}})}}}toSummary(e){return pe(e,this.addonId)}}function y(a){return a.def}function nc(a,e="Configuration",t="main"){const s=a.map(i=>rc(i.key,i.schema,i.description));return{sections:[{id:t,title:e,fields:s}]}}function rc(a,e,t){const s=w(e),i=uc(e),n=t??fe(a),r={key:a,label:n,description:t,default:i};return s instanceof Gr?oc(a,r):s instanceof Yr?cc(s,r):s instanceof Jr?{...r,type:"boolean"}:s instanceof Qr?lc(s,r):s instanceof Xr||s instanceof eo?{...r,type:"textarea",rows:6,isJson:!0}:{...r,type:"text"}}function oc(a,e){const t=a.toLowerCase();return t.includes("password")||t.includes("secret")||t.includes("token")||t.includes("apikey")||t.includes("api_key")?{...e,type:"password",showToggle:!0}:{...e,type:"text"}}function cc(a,e){const t=a,s=t.minValue,i=t.maxValue,n=s!=null&&isFinite(s)?s:void 0,r=i!=null&&isFinite(i)?i:void 0,o=dc(a);return{...e,type:"number",...n!==void 0?{min:n}:{},...r!==void 0?{max:r}:{},...o!==void 0?{step:o}:{}}}function dc(a){const t=y(a).checks??[];for(const s of t)if(s._zod?.def?.check==="multiple_of"&&s._zod.def.value!==void 0)return s._zod.def.value}function lc(a,e){const t=a.options.map(i=>String(i));return{...e,type:"select",options:t.map(i=>({label:fe(i),value:i}))}}function w(a){return a instanceof J||a instanceof to||a instanceof ao?w(y(a).innerType):a}function uc(a){if(a instanceof J)return y(a).defaultValue}function fe(a){return a.replace(/([A-Z])/g," $1").replace(/[_-]/g," ").replace(/^\w/,e=>e.toUpperCase()).trim()}function hc(a,e,t,s,i){if(t.length===0||e.length===0)return{passed:a,excluded:[]};const n=t.filter(u=>u.enabled!==!1),r=n.filter(u=>u.mode==="include"),o=n.filter(u=>u.mode==="exclude"),c=r.length>0,l=new Map(e.map(u=>[u.id,u])),d=[],h=[];for(const u of a){const S=s(u),p=i?.(u),A=r.some(E=>L(E,S,p,l)),x=o.some(E=>L(E,S,p,l));c?A&&!x?d.push(u):h.push(u):x?h.push(u):d.push(u)}return{passed:d,excluded:h}}function L(a,e,t,s){if(a.classFilter&&a.classFilter.length>0&&t!==void 0&&!a.classFilter.includes(t))return!1;for(const i of a.zoneIds){const n=s.get(i);if(n&&mc(e,n.polygon))return!0}return!1}function mc(a,e){if(e.length<3)return!1;let t=!1;const{x:s,y:i}=a;for(let n=0,r=e.length-1;n<e.length;r=n++){const o=e[n],c=e[r];o.y>i!=c.y>i&&s<(c.x-o.x)*(i-o.y)/(c.y-o.y||Number.EPSILON)+o.x&&(t=!t)}return t}function pc(a){return a}function fc(a,e,t){return{input:a,output:e,kind:t?.kind??"query",auth:t?.auth??"protected",scope:t?.scope??{kind:"system"}}}const gc=["accessories","battery","brightness","camera-credentials","device-discovery","device-export","device-status","doorbell","feature-probe","intercom","motion","motion-trigger","mqtt-broker","native-object-detection","osd","ptz","ptz-autotrack","snapshot","switch"],Sc=[{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"]}]}],ge=Object.freeze({"device-export":"device-export","mesh-network":"mesh","mqtt-broker":"broker","network-access":"ingress","smtp-provider":"email"}),yc=["device-export","mesh-network","mqtt-broker","network-access","smtp-provider"];function bc(a){const e=[];for(const[t,s]of Object.entries(ge))s===a&&e.push(t);return e}function Cc(a){try{const e=new URL(a);return!e.username&&!e.password?a:(e.username="",e.password="",e.toString())}catch{return a}}class vc{constructor(e){this.capacity=e,this.items=Array.from({length:e})}items;head=0;tail=0;count=0;get size(){return this.count}push(e){this.items[this.tail]=e,this.tail=(this.tail+1)%this.capacity,this.count<this.capacity?this.count++:this.head=(this.head+1)%this.capacity}drain(e){const t=[],s=Math.min(e,this.count);for(let i=0;i<s;i++)t.push(this.items[this.head]),this.items[this.head]=void 0,this.head=(this.head+1)%this.capacity;return this.count-=s,t}}function wc(a,e,t){const s={};for(const i of Object.keys(t))s[i]=n=>a.addons.custom.mutate({addonId:e,action:i,input:n});return s}const _c=Object.freeze(Object.defineProperty({__proto__:null,ACCESSORY_LABEL:Se,ALL_CAPABILITY_DEFINITIONS:Wr,APPLE_SA_TO_MACRO:ye,AUDIO_BACKEND_CHOICES:be,AUDIO_MACRO_LABELS:Ce,AccessoriesStatusSchema:ve,AccessoryKind:we,AddBrokerInputSchema:Ie,AddonAutoUpdateSchema:Ae,AddonListItemSchema:Ee,AddonPageDeclarationSchema:_e,AddonPageInfoSchema:De,AgentLoadSummarySchema:ke,AlertSchema:Pe,AlertSeveritySchema:Re,AlertSourceSchema:Ne,AlertStatusSchema:Te,ApiKeyRecordSchema:Oe,ApiKeySummarySchema:xe,ArchiveEntrySchema:Me,ArchiveManifestSchema:Le,AudioAnalysisResultSchema:Be,AudioAnalysisSettingsSchema:Fe,AudioChunkInputSchema:Ue,AudioClassSummarySchema:ze,AudioClassificationLabelSchema:$e,AudioClassificationResultSchema:We,AudioCodecInfoSchema:je,AudioDecodeSessionConfigSchema:Ke,AudioEncodeSessionConfigSchema:He,AudioEncodedChunkSchema:qe,AudioEventSchema:Ze,AudioLevelSchema:Ve,AudioMetricsHistoryPointSchema:Ge,AudioMetricsHistorySchema:Ye,AudioMetricsSnapshotSchema:Je,AudioPcmChunkSchema:Qe,AuthProviderInfoSchema:Xe,AuthResultSchema:et,AutoUpdateSettingsSchema:tt,AvailableIntegrationTypeSchema:at,BACKEND_TO_FORMAT:O,BATTERY_DEVICE_PROFILE:st,BackupDestinationInfoSchema:it,BackupEntrySchema:nt,BaseAddon:te,BaseDevice:sc,BaseDeviceProvider:ic,BatteryStatusSchema:rt,BoundingBoxSchema:ot,BrightnessStatusSchema:ct,BrokerAudioClientSchema:dt,BrokerClientsSchema:lt,BrokerConnectionDetailsSchema:ut,BrokerDecodedClientSchema:ht,BrokerInfoSchema:mt,BrokerRtspClientSchema:pt,BrokerStatsSchema:ft,BrokerStatusSchema:gt,CAM_PROFILE_ORDER:St,CAPABILITY_NAMES:jr,CAPABILITY_ROUTER_KEYS:Kr,CAP_NAMES_WITH_STATUS:gc,CAP_PROVIDER_KIND_MAP:ge,COCO_80_LABELS:Yo,COCO_TO_MACRO:Qo,CamProfileSchema:yt,CamStreamKindSchema:bt,CamStreamResolutionSchema:Ct,CameraCredentialsSchema:vt,CameraCredentialsStatusSchema:wt,CameraMetricsSchema:It,CameraMetricsWithDeviceIdSchema:At,CameraStreamSchema:Et,CapScopeSchema:_t,CapabilityBindingsSchema:Dt,ChargingStatus:kt,ClientNetworkStatsSchema:Pt,ClusterAddonNodeDeploymentSchema:Rt,ClusterAddonStatusEntrySchema:Nt,CollectionColumnSchema:Tt,CollectionIndexSchema:Ot,ConfigEntrySchema:xt,ConfigSectionWithValuesSchema:Mt,ConfigTabDeclarationSchema:Lt,CreateApiKeyInputSchema:Bt,CreateApiKeyResultSchema:Ft,CreateIntegrationInputSchema:Ut,CreateScopedTokenInputSchema:zt,CreateScopedTokenResultSchema:$t,CreateUserInputSchema:Wt,CustomActionInputSchema:jt,DEFAULT_ADDON_GROUP:Q,DEFAULT_ADDON_PLACEMENT:X,DEFAULT_AUDIO_ANALYZER_CONFIG:Kt,DEFAULT_DECODER_HWACCEL_CONFIG:Ht,DEFAULT_FEATURES:_o,DEFAULT_LOCATION_SUBDIRS:yo,DEFAULT_RETENTION:Po,DEVICE_CAP_NAMES:Hr,DEVICE_PROFILES:qt,DEVICE_SETTINGS_CONTRIBUTION_METHODS:Zt,DEVICE_STATUS_METHOD:Vt,DEVICE_TYPE_INFO:Xo,DecodedFrameSchema:Gt,DecoderAssignmentSchema:Yt,DecoderSessionConfigSchema:Jt,DecoderStatsSchema:Qt,DeleteIntegrationResultSchema:Xt,DetectorOutputSchema:ea,DeviceConfig:g,DeviceDiscoveryStatusSchema:ta,DeviceExportExposeInputSchema:aa,DeviceExportStatusSchema:sa,DeviceExportUnexposeInputSchema:ia,DeviceFeature:na,DeviceInfoSchema:ra,DeviceNetworkStatsSchema:oa,DeviceRole:ca,DeviceRuntimeState:I,DeviceStatusSchema:da,DeviceType:la,DiscoveredChildDeviceSchema:ua,DiscoveredChildStatusSchema:ha,DiscoveredDeviceSchema:ma,DisposerChain:so,DoorbellPressEventSchema:pa,DoorbellStatusSchema:fa,ElementConfigStore:zo,EmbeddingInfoSchema:ga,EmbeddingResultSchema:Sa,EncodedPacketSchema:ya,EnrichedWidgetMetadataSchema:ba,EventCategory:C,EventItemSchema:Ca,EventKindSchema:va,EventSourceType:oe,ExposedDeviceSchema:wa,ExposedResourceSchema:Ia,FeatureManifestSchema:Aa,FeatureProbeStatusSchema:Ea,FrameInputSchema:_a,GetStreamWithCodecInputSchema:Da,GlobalMetricsSchema:ka,HF_BASE_URL:Ro,HF_REPO:ce,HWACCEL_OPTIONS:Pa,HealthStatusSchema:Ra,HistoryPointSchema:Na,HistoryResolutionEnum:Ta,InstalledPackageSchema:Oa,IntegrationLiteSchema:xa,IntegrationWithStateSchema:Ma,IntercomAbilitySchema:La,IntercomStatusSchema:Ba,KNOWN_CAP_NAMES:qr,LocationStatSchema:Fa,LogEntrySchema:Ua,LogLevelSchema:za,LogStreamEntrySchema:$a,MACRO_LABELS:Jo,METHOD_ACCESS_MAP:Zr,MODEL_FORMATS:Wa,MediaFileSchema:ja,MethodAccessSchema:Ka,MotionAnalysisResultSchema:Ha,MotionEventSchema:qa,MotionOnMotionChangedDataSchema:Za,MotionRegionSchema:Va,MotionSourceEnum:Ga,MotionSourcesSchema:Ya,MotionStatusSchema:Ja,MotionTriggerRuntimeStateSchema:Qa,MotionTriggerStatusSchema:Xa,MqttBrokerStatusSchema:es,NativeDetectionSchema:ts,NativeObjectClassEnum:as,NativeObjectDetectionStatusSchema:ss,NetworkAccessStatusSchema:is,NetworkAddressSchema:ns,NetworkEndpointSchema:rs,NotificationHistoryEntrySchema:os,NotificationRuleSchema:cs,NotificationSchema:ds,ObjectEventSchema:ls,OrchestratorMetricsSchema:us,OsdOverlayKindEnum:hs,OsdOverlayPatchSchema:ms,OsdOverlaySchema:ps,OsdPositionEnum:fs,OsdStatusSchema:gs,PIPELINE_FLOW_CAPABILITY_NAMES:Ss,PIPELINE_OWNER_CAPABILITY_NAMES:ys,PROVIDER_KIND_CAP_NAMES:yc,PYTHON_SCRIPT:ue,PackageUpdateSchema:bs,PackageVersionInfoSchema:Cs,PasskeySummarySchema:vs,PcmSampleFormatSchema:ws,PerScopeBreakdownSchema:Is,PipelineAssignmentSchema:As,PipelineDefaultStepSchema:Es,PipelineEngineChoiceSchema:_s,PipelineRunResultBridge:Ds,PipelineStepInputSchema:ks,PlaceholderReasonSchema:Ps,PolygonPointSchema:Rs,ProfileSlotSchema:Ns,ProfileSlotStatusSchema:Ts,ProviderStatusSchema:Os,PtzAutotrackRuntimeStateSchema:xs,PtzAutotrackSettingsSchema:Ms,PtzAutotrackStatusSchema:Ls,PtzAutotrackTargetOptionSchema:Bs,PtzMoveCommandSchema:Fs,PtzPositionSchema:Us,PtzPresetSchema:zs,QueryFilterSchema:$s,RECOGNITION_TYPES:ko,RUNTIME_DEFAULTS:No,RUNTIME_TO_FORMAT:le,ReadinessRegistry:po,ReadinessTimeoutError:se,RegisteredStreamSchema:Ws,RemoteAccessEndpointSchema:js,RemoteAccessProviderInfoSchema:Ks,ReportMotionInputSchema:Hs,RingBuffer:vc,RtpSourceSchema:qs,RtspRestreamEntrySchema:Zs,RunnerCameraConfigSchema:Vs,RunnerCameraDeviceUIFields:Gs,RunnerLocalLoadSchema:Ys,RunnerLocalMetricsSchema:Js,SCOPE_PRESETS:Sc,STORAGE_LOCATION_CARDINALITY:Qs,STORAGE_LOCATION_TYPES:So,STREAM_QUALITY_LABELS:ie,SUB_DETECTION_TYPES:Do,SYSTEM_CAP_NAMES:Vr,ScopedTokenSchema:Xs,ScopedTokenSummarySchema:ei,SearchResultSchema:ti,SegmentSchema:ai,SendEmailInputSchema:si,SendEmailResultSchema:ii,SettingsPatchSchema:ni,SettingsRecordSchema:ri,SettingsSchemaWithValuesSchema:oi,SettingsUpdateResultSchema:ci,SmtpStatusSchema:di,SnapshotImageSchema:li,SpatialDetectionSchema:ui,SsoBridgeClaimsSchema:hi,StartEmbeddedInputSchema:mi,StorageAbortUploadInputSchema:pi,StorageBeginDownloadInputSchema:fi,StorageBeginDownloadResultSchema:gi,StorageBeginUploadInputSchema:Si,StorageBeginUploadResultSchema:yi,StorageEndDownloadInputSchema:bi,StorageFinalizeUploadInputSchema:Ci,StorageLocationRefSchema:vi,StorageLocationSchema:wi,StorageLocationTypeSchema:Ii,StorageProviderInfoSchema:Ai,StorageReadChunkInputSchema:Ei,StorageTestLocationResultSchema:_i,StorageWriteChunkInputSchema:Di,StreamFormatSchema:ki,StreamInfoSchema:Pi,StreamNetworkStatsSchema:Ri,StreamSourceEntrySchema:Ni,StreamSourceSchema:Ti,SwitchStatusSchema:Oi,SystemMetricsSchema:xi,SystemMirror:Mi,TestConnectionResultSchema:Li,ToastSchema:Bi,TokenScopeSchema:Fi,TopologyNodeSchema:Ui,TopologyProcessSchema:zi,TopologyServiceSchema:$i,TrackSchema:Wi,TrackStateSchema:ji,TrackedDetectionSchema:Ki,TurnProviderInfoSchema:Hi,TurnServerSchema:qi,UpdateIntegrationInputSchema:Zi,UpdateUserInputSchema:Vi,UserRecordSchema:Gi,UserSummarySchema:Yi,WELL_KNOWN_TABS:Ji,WELL_KNOWN_TAB_MAP:Qi,WebrtcStreamChoiceSchema:Xi,WebrtcStreamTargetSchema:en,WidgetHostEnum:tn,WidgetMetadataSchema:an,WidgetSizeEnum:sn,YAMNET_TO_MACRO:nn,ZoneKindEnum:rn,ZoneRuleModeEnum:on,ZoneRuleSchema:cn,ZoneRuleStageEnum:dn,ZoneRulesArraySchema:ln,ZoneSchema:un,ZoneScopeBreakdownSchema:hn,accessoriesCapability:mn,accessoryStableId:pn,addonPagesCapability:fn,addonPagesSourceCapability:gn,addonRoutesCapability:Sn,addonSettingsCapability:yn,addonWidgetsCapability:bn,addonWidgetsSourceCapability:Cn,addonsCapability:vn,adminUiCapability:wn,advancedNotifierCapability:In,alertsCapability:An,asBoolean:Mo,asJsonArray:To,asJsonObject:de,asNumber:xo,asString:Oo,audioAnalysisCapability:En,audioAnalyzerCapability:_n,audioCodecCapability:Dn,audioMetricsCapability:G,authProviderCapability:kn,authenticationCapability:Pn,autoAssignProfiles:Eo,backupCapability:Rn,batteryCapability:V,bindAddonActions:wc,brightnessCapability:Z,buildAddonRouteProvider:lo,cameraCredentialsCapability:Nn,cameraStreamsCapability:q,classifyStream:Co,classifyStreams:re,cosineSimilarity:Uo,createDeviceProxy:Tn,createEvent:N,createLazyTrpcSource:On,createMirrorSource:xn,createRuntimeStateBridge:tc,createSliceHandle:Mn,createSystemProxy:Ln,customAction:fc,decoderCapability:Bn,defineCustomActions:pc,detectionPipelineCapability:Fn,deviceDiscoveryCapability:H,deviceExportCapability:Un,deviceManagerCapability:zn,deviceMatchesProfile:$n,deviceOpsCapability:Wn,deviceProviderCapability:Y,deviceStateCapability:jn,deviceStatusCapability:R,doorbellCapability:K,embeddingEncoderCapability:Kn,emitDownForOwnedCaps:go,emitReadiness:ee,errMsg:me,evaluateZoneRules:hc,event:Hn,eventsCapability:qn,expandCapMethods:Zn,featureProbeCapability:P,formatForBackend:Ko,formatForRuntime:Ho,getAudioMacroClassIds:Vn,getCapsByProviderKind:bc,hfModelUrl:Fo,hydrateSchema:k,integrationsCapability:Gn,intercomCapability:Yn,isAgentOnlyPlacement:no,isDeployableToAgent:io,isEvent:co,localNetworkCapability:Jn,logDestinationCapability:Qn,mapAudioLabelToMacro:Xn,maskUrlCredentials:Cc,meshNetworkCapability:er,meshOrchestratorCapability:tr,method:ar,metricsProviderCapability:sr,motionCapability:j,motionDetectionCapability:ir,motionTriggerCapability:W,mqttBrokerCapability:nr,nativeObjectDetectionCapability:rr,networkAccessCapability:or,networkQualityCapability:cr,nodesCapability:dr,normalizeAddonInitResult:ae,notificationOutputCapability:lr,osdCapability:ur,parseCameraStreamConfig:Ao,parseJsonArray:Bo,parseJsonObject:Lo,parseJsonUnknown:T,pipelineAnalyticsCapability:hr,pipelineExecutorCapability:mr,pipelineOrchestratorCapability:pr,pipelineRunnerCapability:fr,platformProbeCapability:gr,ptzAutotrackCapability:$,ptzCapability:Sr,pythonScriptForBackend:qo,readinessKey:v,rebootCapability:yr,recordingCapability:br,recordingEngineCapability:Cr,remoteAccessCapability:vr,requiresPython:Zo,resolveAddonExecution:b,resolveAddonGroup:ro,resolveAddonPlacement:oo,resolveAddonRuntime:jo,resolveDetectionRuntime:he,resolveDeviceProfile:wr,resolveModelFormat:Wo,restreamerCapability:Ir,runInferenceStep:Vo,scopeKey:f,settingsStoreCapability:Ar,smtpProviderCapability:Er,snapshotCapability:_r,snapshotProviderCapability:Dr,ssoBridgeCapability:kr,storageCapability:Pr,storageProviderCapability:Rr,streamBrokerCapability:Nr,streamPixels:ne,streamQualityLabel:bo,streamingEngineCapability:Tr,switchCapability:z,systemCapability:Or,toDeviceSummary:pe,toStreamSourceEntry:vo,toastCapability:xr,turnOrchestratorCapability:Mr,turnProviderCapability:Lr,userManagementCapability:Br,userPasskeysCapability:Fr,webrtcCapability:Ur,webrtcClientHintsSchema:zr,webrtcSessionCapability:$r,zodEntriesToConfigUI:nc,zoneAnalyticsCapability:U,zoneRulesCapability:F,zonesCapability:B},Symbol.toStringTag,{value:"Module"}));export{ge as C,So as S,de as a,_c as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as r}from"./index-
|
|
1
|
+
import{s as r}from"./index-DFRMwfPq.js";import{b as e}from"./__mfe_internal__admin_ui_host__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs-C_6K4VBY.js";const o=e(r);export{o as r};
|