@camstack/addon-admin-ui 0.1.33 → 0.1.34
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-DJQnlBBe.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-CZpDKvbm.js} +1 -1
- package/dist/assets/{devices-BnLu5dxg.js → devices-DFv560M2.js} +1 -1
- package/dist/assets/{hostInit-DQ5UjxJa.js → hostInit-bYpW6FId.js} +1 -1
- package/dist/assets/index-8vQS4K6d.js +1 -0
- package/dist/assets/index-B3RV989b.js +1 -0
- package/dist/assets/{index-BmzE49kT.js → index-BuBZuTof.js} +1 -1
- package/dist/assets/index-CJmL3_yz.css +1 -0
- package/dist/assets/index-CtaWAhdy.js +88 -0
- package/dist/assets/index-D4HNoPqG.js +152 -0
- package/dist/assets/{index-dePEzy7t.js → index-DAxxrrPB.js} +1 -1
- package/dist/assets/index-DJ0oJxIB.js +1 -0
- package/dist/assets/{index-DIIqKU3D.js → index-DOOUOoL9.js} +1 -1
- package/dist/assets/index-DUltPrcr.js +1 -0
- package/dist/assets/index-N4SZRZr8.js +1156 -0
- package/dist/assets/{index-CMxz0koW.js → index-xQgtnvQh.js} +1 -1
- package/dist/assets/method-access-map-DLph6s5D.js +1 -0
- package/dist/assets/{remoteEntry-D28y34bi.js → remoteEntry-DToxOPzT.js} +1 -1
- package/dist/assets/{schemas-DZqswtjx.js → schemas-BEt-CulV.js} +1 -1
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-BXwMMqlX.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-C3bnYyiP.js} +2 -2
- package/dist/index.html +7 -7
- package/dist/mf-entry-bootstrap-0.js +2 -2
- package/dist/server/addon.js +168 -5
- package/dist/server/addon.js.map +1 -1
- package/dist/sw.js +1 -1
- package/package.json +1 -1
- package/dist/assets/index-DFRMwfPq.js +0 -1
- package/dist/assets/index-DRW7rVhn.js +0 -1133
- package/dist/assets/index-DYSrVZ4G.js +0 -1
- package/dist/assets/index-DeVjiPqm.js +0 -1
- package/dist/assets/index-DuHBxCOe.js +0 -1
- package/dist/assets/index-Dv0-1gwL.js +0 -80
- package/dist/assets/index-NNW--T4H.js +0 -80
- package/dist/assets/index-n9RexO7D.css +0 -1
- package/dist/assets/method-access-map-OoQznstl.js +0 -1
|
@@ -1 +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};
|
|
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-DOOUOoL9.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{dF as a,dH as c,dI as s,dJ as d,dK as t,dL as o,dM as n,dN as i,dO as r,dP as p,dQ as l,dR as m,dS as u,dT as g,u as v,dU as S,dV as y,dW as N,t as I,r as w,dX as k,q as b,d$ as h,e0 as P,o as A,e1 as f,e2 as M,e4 as C,v as D,e5 as x,n as z,l as O,e6 as R,e8 as B,k as T,eb as U,ec as L,ed as q,ee as E,eg as F,eh as W,ej as H,j as _,ek as j,m as K,el as Q,em as G,en as V,eo as Z,ep as Y,eq as J,er as X,es as $,et as ee,eu as ae,ev as ce,ew as se,ex as de,p as te,ey as oe,ez as ne,eA as ie,eB as re,eD as pe,eE as le,eF as me,eG as ue,eH as ge,eI as ve,eJ as Se,eK as ye,eL as Ne,eM as Ie,s as we,eN as ke,eO as be,eP as he,eQ as Pe,eR as Ae,eS as fe,eT as Me,eV as Ce,i as De,g as xe,z as ze}from"./index-DJ0oJxIB.js";var Oe=(e=>(e.SystemBoot="system.boot",e.SystemAddonsReady="system.addons-ready",e.SystemRestarting="system.restarting",e.SystemRestartCompleted="system.restart-completed",e.SystemReadyState="system.ready-state",e.AddonStarted="addon.started",e.AddonStopped="addon.stopped",e.AddonRestarted="addon.restarted",e.AddonUpdated="addon.updated",e.AddonInstalled="addon.installed",e.AddonUninstalled="addon.uninstalled",e.AddonCrashed="addon.crashed",e.AddonError="addon.error",e.AddonPageReady="addon.page-ready",e.AddonWidgetReady="addon.widget-ready",e.AddonLoadFailed="addon.load-failed",e.AddonLoadRecovered="addon.load-recovered",e.AddonRetryScheduled="addon.retry-scheduled",e.AddonRetryAttempting="addon.retry-attempting",e.DeviceRegistered="device.registered",e.DeviceUnregistered="device.unregistered",e.DeviceEnabled="device.enabled",e.DeviceDisabled="device.disabled",e.DeviceSettingsUpdated="device.settings-updated",e.DeviceBindingsChanged="device.bindings-changed",e.DeviceMetaChanged="device.meta-changed",e.DeviceStreamsRegistered="device.streams-registered",e.IntegrationEnabled="integration.enabled",e.IntegrationDisabled="integration.disabled",e.IntegrationDeleted="integration.deleted",e.ProviderStarted="provider.started",e.ProviderStopped="provider.stopped",e.ProcessCrashed="process.crashed",e.ProcessRestartScheduled="process.restart_scheduled",e.ProcessRestarted="process.restarted",e.RecordingStarted="recording.started",e.RecordingStopped="recording.stopped",e.RecordingError="recording.error",e.RecordingHealthDegraded="recording.health.degraded",e.RecordingStorageCritical="recording.storage.critical",e.RecordingSegmentWritten="recording.segment.written",e.RecordingPolicyFallback="recording.policy.fallback",e.RecordingRetentionCompleted="recording.retention.completed",e.DetectionEvent="detection.event",e.SessionTrackNew="session.track.new",e.SessionTrackExpired="session.track.expired",e.BenchmarkProgress="benchmark.progress",e.PlatformProbePhase="platform-probe.phase",e.PipelineProgress="pipeline.progress",e.PipelineTrace="pipeline.trace",e.PipelineInferenceResult="pipeline.inference-result",e.PipelineCameraAssigned="pipeline.camera-assigned",e.PipelineCameraUnassigned="pipeline.camera-unassigned",e.PipelineCameraUpdated="pipeline.camera-updated",e.PipelineRunnerLoadSnapshot="pipeline.runner-load-snapshot",e.PipelineCameraMetricsSnapshot="pipeline.camera-metrics-snapshot",e.StreamBrokerMetricsSnapshot="stream-broker.metrics-snapshot",e.StreamBrokerOnCamStreamDemand="stream-broker.onCamStreamDemand",e.StreamBrokerOnCamStreamIdle="stream-broker.onCamStreamIdle",e.StreamBrokerOnRequestStreamSourceRefresh="stream-broker.onRequestStreamSourceRefresh",e.DeviceStateChanged="device.state-changed",e.BatteryOnStatusChanged="battery.onStatusChanged",e.DoorbellOnPressed="doorbell.onPressed",e.PipelineEngineMetricsSnapshot="pipeline.engine-metrics-snapshot",e.ClusterTopologySnapshot="cluster.topology-snapshot",e.MetricsNodeResourcesSnapshot="metrics.node-resources-snapshot",e.MetricsNodeProcessesSnapshot="metrics.node-processes-snapshot",e.CapabilityBindingChanged="capability.binding-changed",e.ModelDownloadProgress="model.download.progress",e.AgentRegistered="agent.registered",e.AgentUnregistered="agent.unregistered",e.AgentOnline="agent.online",e.AgentOffline="agent.offline",e.WorkerOnline="worker.online",e.WorkerOffline="worker.offline",e.AgentTaskDispatched="agent.task.dispatched",e.AgentTaskAssigned="agent.task.assigned",e.AgentTrpcConnected="agent.trpc.connected",e.AgentWsConnected="agent.ws.connected",e.AgentWsDisconnected="agent.ws.disconnected",e.AgentBackupActivated="agent.backup.activated",e.OrchestrationSettingsUpdated="orchestration.settings-updated",e.PipelineAgentHwaccelChanged="pipeline.agent-hwaccel-changed",e.MotionAnalysis="detection.motion-analysis",e.MotionZonesRaw="detection.motion-zones-raw",e.MotionOnMotionChanged="motion.on-motion-changed",e.DetectionResult="detection.result",e.DetectionRaw="detection.raw",e.DetectionCameraNative="detection.camera-native",e.PipelineAudioInferenceResult="pipeline.audio-inference-result",e.DetectionPhaseTransition="detection.phase-transition",e.ProviderMotion="provider.motion",e.ProviderDetection="provider.detection",e.EnrichmentEmbeddingStored="enrichment.embedding.stored",e.EnrichmentSceneStateChanged="enrichment.scene.state-changed",e.EnrichmentActivitySummary="enrichment.activity.summary",e.PipelineAnalyticsTrackStarted="pipeline-analytics.track-started",e.PipelineAnalyticsTrackEnded="pipeline-analytics.track-ended",e.PipelineAnalyticsDetectionEvent="pipeline-analytics.detection-event",e.PipelineAnalyticsFrameTracked="pipeline-analytics.frame-tracked",e.FrigateLiveEvent="frigate.live-event",e.CameraStreamsProfileSlotsChanged="camera-streams.onProfileSlotsChanged",e.StreamOnline="stream.online",e.StreamOffline="stream.offline",e.NetworkTunnelStarted="network.tunnel.started",e.NetworkTunnelStopped="network.tunnel.stopped",e.LocalNetworkChanged="network.local.changed",e.BackupCompleted="backup.completed",e.BackupRestored="backup.restored",e.NotificationDispatched="notification.dispatched",e.NotificationFailed="notification.failed",e.DeviceUpdated="device.updated",e.DeviceOnline="device.online",e.DeviceOffline="device.offline",e.DeviceAwake="device.awake",e.DeviceSleeping="device.sleeping",e.RetentionCleanup="retention.cleanup",e))(Oe||{});const Be={accessories:"accessories",addonPages:"addon-pages",addonPagesSource:"addon-pages-source",addonRoutes:"addon-routes",addonSettings:"addon-settings",addonWidgets:"addon-widgets",addonWidgetsSource:"addon-widgets-source",addons:"addons",adminUi:"admin-ui",advancedNotifier:"advanced-notifier",alerts:"alerts",audioAnalysis:"audio-analysis",audioAnalyzer:"audio-analyzer",audioCodec:"audio-codec",audioMetrics:"audio-metrics",authProvider:"auth-provider",authentication:"authentication",backup:"backup",battery:"battery",brightness:"brightness",cameraCredentials:"camera-credentials",cameraStreams:"camera-streams",decoder:"decoder",detectionPipeline:"detection-pipeline",deviceDiscovery:"device-discovery",deviceExport:"device-export",deviceManager:"device-manager",deviceOps:"device-ops",deviceProvider:"device-provider",deviceState:"device-state",deviceStatus:"device-status",doorbell:"doorbell",embeddingEncoder:"embedding-encoder",events:"events",featureProbe:"feature-probe",integrations:"integrations",intercom:"intercom",localNetwork:"local-network",logDestination:"log-destination",meshNetwork:"mesh-network",meshOrchestrator:"mesh-orchestrator",metricsProvider:"metrics-provider",motion:"motion",motionDetection:"motion-detection",motionTrigger:"motion-trigger",mqttBroker:"mqtt-broker",nativeObjectDetection:"native-object-detection",networkAccess:"network-access",networkQuality:"network-quality",nodes:"nodes",notificationOutput:"notification-output",osd:"osd",pipelineAnalytics:"pipeline-analytics",pipelineExecutor:"pipeline-executor",pipelineOrchestrator:"pipeline-orchestrator",pipelineRunner:"pipeline-runner",platformProbe:"platform-probe",ptz:"ptz",ptzAutotrack:"ptz-autotrack",reboot:"reboot",recording:"recording",recordingEngine:"recording-engine",remoteAccess:"remote-access",restreamer:"restreamer",settingsStore:"settings-store",smtpProvider:"smtp-provider",snapshot:"snapshot",snapshotProvider:"snapshot-provider",ssoBridge:"sso-bridge",storage:"storage",storageProvider:"storage-provider",streamBroker:"stream-broker",streamingEngine:"streaming-engine",switch:"switch",system:"system",toast:"toast",turnOrchestrator:"turn-orchestrator",turnProvider:"turn-provider",userManagement:"user-management",userPasskeys:"user-passkeys",webrtc:"webrtc",webrtcSession:"webrtc-session",zoneAnalytics:"zone-analytics",zoneRules:"zone-rules",zones:"zones"},Te=[{key:"accessories",name:"accessories"},{key:"addonPages",name:"addon-pages"},{key:"addonPagesSource",name:"addon-pages-source"},{key:"addonRoutes",name:"addon-routes"},{key:"addonSettings",name:"addon-settings"},{key:"addonWidgets",name:"addon-widgets"},{key:"addonWidgetsSource",name:"addon-widgets-source"},{key:"addons",name:"addons"},{key:"adminUi",name:"admin-ui"},{key:"advancedNotifier",name:"advanced-notifier"},{key:"alerts",name:"alerts"},{key:"audioAnalysis",name:"audio-analysis"},{key:"audioAnalyzer",name:"audio-analyzer"},{key:"audioCodec",name:"audio-codec"},{key:"audioMetrics",name:"audio-metrics"},{key:"authProvider",name:"auth-provider"},{key:"authentication",name:"authentication"},{key:"backup",name:"backup"},{key:"battery",name:"battery"},{key:"brightness",name:"brightness"},{key:"cameraCredentials",name:"camera-credentials"},{key:"cameraStreams",name:"camera-streams"},{key:"decoder",name:"decoder"},{key:"detectionPipeline",name:"detection-pipeline"},{key:"deviceDiscovery",name:"device-discovery"},{key:"deviceExport",name:"device-export"},{key:"deviceManager",name:"device-manager"},{key:"deviceOps",name:"device-ops"},{key:"deviceProvider",name:"device-provider"},{key:"deviceState",name:"device-state"},{key:"deviceStatus",name:"device-status"},{key:"doorbell",name:"doorbell"},{key:"embeddingEncoder",name:"embedding-encoder"},{key:"events",name:"events"},{key:"featureProbe",name:"feature-probe"},{key:"integrations",name:"integrations"},{key:"intercom",name:"intercom"},{key:"localNetwork",name:"local-network"},{key:"logDestination",name:"log-destination"},{key:"meshNetwork",name:"mesh-network"},{key:"meshOrchestrator",name:"mesh-orchestrator"},{key:"metricsProvider",name:"metrics-provider"},{key:"motion",name:"motion"},{key:"motionDetection",name:"motion-detection"},{key:"motionTrigger",name:"motion-trigger"},{key:"mqttBroker",name:"mqtt-broker"},{key:"nativeObjectDetection",name:"native-object-detection"},{key:"networkAccess",name:"network-access"},{key:"networkQuality",name:"network-quality"},{key:"nodes",name:"nodes"},{key:"notificationOutput",name:"notification-output"},{key:"osd",name:"osd"},{key:"pipelineAnalytics",name:"pipeline-analytics"},{key:"pipelineExecutor",name:"pipeline-executor"},{key:"pipelineOrchestrator",name:"pipeline-orchestrator"},{key:"pipelineRunner",name:"pipeline-runner"},{key:"platformProbe",name:"platform-probe"},{key:"ptz",name:"ptz"},{key:"ptzAutotrack",name:"ptz-autotrack"},{key:"reboot",name:"reboot"},{key:"recording",name:"recording"},{key:"recordingEngine",name:"recording-engine"},{key:"remoteAccess",name:"remote-access"},{key:"restreamer",name:"restreamer"},{key:"settingsStore",name:"settings-store"},{key:"smtpProvider",name:"smtp-provider"},{key:"snapshot",name:"snapshot"},{key:"snapshotProvider",name:"snapshot-provider"},{key:"ssoBridge",name:"sso-bridge"},{key:"storage",name:"storage"},{key:"storageProvider",name:"storage-provider"},{key:"streamBroker",name:"stream-broker"},{key:"streamingEngine",name:"streaming-engine"},{key:"switch",name:"switch"},{key:"system",name:"system"},{key:"toast",name:"toast"},{key:"turnOrchestrator",name:"turn-orchestrator"},{key:"turnProvider",name:"turn-provider"},{key:"userManagement",name:"user-management"},{key:"userPasskeys",name:"user-passkeys"},{key:"webrtc",name:"webrtc"},{key:"webrtcSession",name:"webrtc-session"},{key:"zoneAnalytics",name:"zone-analytics"},{key:"zoneRules",name:"zone-rules"},{key:"zones",name:"zones"}],Ue=[a,c,s,d,t,o,n,i,r,p,l,m,u,g,v,S,y,N,I,w,k,b,h,P,A,f,M,C,D,x,z,O,R,B,T,U,L,q,E,F,W,H,_,j,K,Q,G,V,Z,Y,J,X,$,ee,ae,ce,se,de,te,oe,ne,ie,re,pe,le,me,ue,ge,ve,Se,ye,Ne,Ie,we,ke,be,he,Pe,Ae,fe,Me,Ce,De,xe,ze],Le=Object.freeze({"addonPages.listPages":{capName:"addon-pages",capScope:"system",addonId:null,access:"view"},"addonPagesSource.listPages":{capName:"addon-pages-source",capScope:"system",addonId:null,access:"view"},"addonRoutes.getRoutes":{capName:"addon-routes",capScope:"system",addonId:null,access:"view"},"addonRoutes.invoke":{capName:"addon-routes",capScope:"system",addonId:null,access:"create"},"addons.applyAutoUpdateToAll":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.custom":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.forceRefresh":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.getAddonAutoUpdate":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.getAutoUpdateSettings":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.getLastRestart":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.getLogs":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.getVersions":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.installFromWorkspace":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.installPackage":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.isWorkspaceAvailable":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.list":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.listCapabilityProviders":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.listFrameworkPackages":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.listPackages":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.listUpdates":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.listWorkspacePackages":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.onAddonLogs":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.reloadPackages":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.restartAddon":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.restartServer":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.retryLoad":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.rollbackPackage":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.searchAvailable":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.setAddonAutoUpdate":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.setAutoUpdateSettings":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.uninstallPackage":{capName:"addons",capScope:"system",addonId:null,access:"delete"},"addons.updateFrameworkPackage":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.updatePackage":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addonSettings.getDeviceSettings":{capName:"addon-settings",capScope:"system",addonId:null,access:"view"},"addonSettings.getGlobalSettings":{capName:"addon-settings",capScope:"system",addonId:null,access:"view"},"addonSettings.updateDeviceSettings":{capName:"addon-settings",capScope:"system",addonId:null,access:"create"},"addonSettings.updateGlobalSettings":{capName:"addon-settings",capScope:"system",addonId:null,access:"create"},"addonWidgets.listWidgets":{capName:"addon-widgets",capScope:"system",addonId:null,access:"view"},"addonWidgetsSource.listWidgets":{capName:"addon-widgets-source",capScope:"system",addonId:null,access:"view"},"adminUi.getStaticDir":{capName:"admin-ui",capScope:"system",addonId:null,access:"view"},"adminUi.getVersion":{capName:"admin-ui",capScope:"system",addonId:null,access:"view"},"advancedNotifier.deleteRule":{capName:"advanced-notifier",capScope:"system",addonId:null,access:"delete"},"advancedNotifier.getHistory":{capName:"advanced-notifier",capScope:"system",addonId:null,access:"view"},"advancedNotifier.getRules":{capName:"advanced-notifier",capScope:"system",addonId:null,access:"view"},"advancedNotifier.testRule":{capName:"advanced-notifier",capScope:"system",addonId:null,access:"create"},"advancedNotifier.upsertRule":{capName:"advanced-notifier",capScope:"system",addonId:null,access:"create"},"alerts.dismiss":{capName:"alerts",capScope:"system",addonId:null,access:"create"},"alerts.emit":{capName:"alerts",capScope:"system",addonId:null,access:"create"},"alerts.getUnreadCount":{capName:"alerts",capScope:"system",addonId:null,access:"view"},"alerts.list":{capName:"alerts",capScope:"system",addonId:null,access:"view"},"alerts.markAllRead":{capName:"alerts",capScope:"system",addonId:null,access:"create"},"alerts.markRead":{capName:"alerts",capScope:"system",addonId:null,access:"create"},"alerts.update":{capName:"alerts",capScope:"system",addonId:null,access:"create"},"audioAnalysis.resolveDeviceSettings":{capName:"audio-analysis",capScope:"device",addonId:null,access:"view"},"audioAnalyzer.analyseChunk":{capName:"audio-analyzer",capScope:"system",addonId:null,access:"create"},"audioAnalyzer.classify":{capName:"audio-analyzer",capScope:"system",addonId:null,access:"view"},"audioAnalyzer.dispose":{capName:"audio-analyzer",capScope:"system",addonId:null,access:"create"},"audioAnalyzer.isReady":{capName:"audio-analyzer",capScope:"system",addonId:null,access:"view"},"audioAnalyzer.reprobeAudioEngine":{capName:"audio-analyzer",capScope:"system",addonId:null,access:"create"},"audioCodec.canHandle":{capName:"audio-codec",capScope:"system",addonId:null,access:"view"},"audioCodec.closeSession":{capName:"audio-codec",capScope:"system",addonId:null,access:"create"},"audioCodec.createDecodeSession":{capName:"audio-codec",capScope:"system",addonId:null,access:"create"},"audioCodec.createEncodeSession":{capName:"audio-codec",capScope:"system",addonId:null,access:"create"},"audioCodec.flushEncode":{capName:"audio-codec",capScope:"system",addonId:null,access:"create"},"audioCodec.listActiveSessions":{capName:"audio-codec",capScope:"system",addonId:null,access:"view"},"audioCodec.listSupportedCodecs":{capName:"audio-codec",capScope:"system",addonId:null,access:"view"},"audioCodec.pullEncoded":{capName:"audio-codec",capScope:"system",addonId:null,access:"view"},"audioCodec.pullPcm":{capName:"audio-codec",capScope:"system",addonId:null,access:"view"},"audioCodec.pushEncodedFrame":{capName:"audio-codec",capScope:"system",addonId:null,access:"create"},"audioCodec.pushPcm":{capName:"audio-codec",capScope:"system",addonId:null,access:"create"},"audioMetrics.getCurrentSnapshot":{capName:"audio-metrics",capScope:"device",addonId:null,access:"view"},"audioMetrics.getHistory":{capName:"audio-metrics",capScope:"device",addonId:null,access:"view"},"authentication.listProviders":{capName:"authentication",capScope:"system",addonId:null,access:"view"},"authentication.setProviderEnabled":{capName:"authentication",capScope:"system",addonId:null,access:"create"},"authProvider.getLoginUrl":{capName:"auth-provider",capScope:"system",addonId:null,access:"view"},"authProvider.handleCallback":{capName:"auth-provider",capScope:"system",addonId:null,access:"create"},"authProvider.validateCredentials":{capName:"auth-provider",capScope:"system",addonId:null,access:"create"},"authProvider.validateToken":{capName:"auth-provider",capScope:"system",addonId:null,access:"view"},"backup.delete":{capName:"backup",capScope:"system",addonId:null,access:"delete"},"backup.getEntries":{capName:"backup",capScope:"system",addonId:null,access:"view"},"backup.list":{capName:"backup",capScope:"system",addonId:null,access:"view"},"backup.listArchives":{capName:"backup",capScope:"system",addonId:null,access:"view"},"backup.listDestinations":{capName:"backup",capScope:"system",addonId:null,access:"view"},"backup.listLocations":{capName:"backup",capScope:"system",addonId:null,access:"view"},"backup.previewSchedule":{capName:"backup",capScope:"system",addonId:null,access:"view"},"backup.restore":{capName:"backup",capScope:"system",addonId:null,access:"create"},"backup.trigger":{capName:"backup",capScope:"system",addonId:null,access:"create"},"backup.upsertDestinationPolicy":{capName:"backup",capScope:"system",addonId:null,access:"create"},"brightness.setBrightness":{capName:"brightness",capScope:"device",addonId:null,access:"create"},"cameraCredentials.getCredentials":{capName:"camera-credentials",capScope:"device",addonId:null,access:"view"},"cameraStreams.getBrokerStreams":{capName:"camera-streams",capScope:"device",addonId:null,access:"view"},"cameraStreams.getCameraStreams":{capName:"camera-streams",capScope:"device",addonId:null,access:"view"},"cameraStreams.getRtspEntries":{capName:"camera-streams",capScope:"device",addonId:null,access:"view"},"decoder.createSession":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.destroySession":{capName:"decoder",capScope:"system",addonId:null,access:"delete"},"decoder.getInfo":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.getStats":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.listActiveSessions":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.openStream":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.pullFrames":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.pushPacket":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.reprobeHwaccel":{capName:"decoder",capScope:"system",addonId:null,access:"create"},"decoder.supportsCodec":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.updateConfig":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"deviceDiscovery.adoptDevice":{capName:"device-discovery",capScope:"device",addonId:null,access:"create"},"deviceDiscovery.listDiscovered":{capName:"device-discovery",capScope:"device",addonId:null,access:"view"},"deviceDiscovery.refreshDiscovery":{capName:"device-discovery",capScope:"device",addonId:null,access:"create"},"deviceDiscovery.releaseDevice":{capName:"device-discovery",capScope:"device",addonId:null,access:"create"},"deviceExport.exposeDevice":{capName:"device-export",capScope:"system",addonId:null,access:"create"},"deviceExport.getStatus":{capName:"device-export",capScope:"system",addonId:null,access:"view"},"deviceExport.listExposedDevices":{capName:"device-export",capScope:"system",addonId:null,access:"view"},"deviceExport.listSupportedDeviceKinds":{capName:"device-export",capScope:"system",addonId:null,access:"view"},"deviceExport.unexposeDevice":{capName:"device-export",capScope:"system",addonId:null,access:"create"},"deviceManager.addLocation":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.adoptDevice":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.allocateDeviceId":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.createDevice":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.disable":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.discoverDevices":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.enable":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.getAllBindings":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getBindings":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getChildren":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getConfigSchema":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getCreationSchema":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getDevice":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getDeviceAggregate":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getDeviceLiveInfoAggregate":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getDeviceSettingsAggregate":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getDeviceStatusAggregate":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getSettingsSchema":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getStreamProfileMap":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getStreamSources":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.listAll":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.listBindableCapsForDeviceType":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.listLocations":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.listPersistedByAddon":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.listWrappersForCap":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.loadConfig":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.loadMeta":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.loadRuntimeState":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.persistConfig":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.probeStreams":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.registerDevice":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.remove":{capName:"device-manager",capScope:"system",addonId:null,access:"delete"},"deviceManager.removeDevice":{capName:"device-manager",capScope:"system",addonId:null,access:"delete"},"deviceManager.removeLocation":{capName:"device-manager",capScope:"system",addonId:null,access:"delete"},"deviceManager.setDisabled":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.setLocation":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.setMetadata":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.setName":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.setStreamProfileMap":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.setWrapperActive":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.testCreationField":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.testField":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.updateConfig":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.updateDeviceField":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.updateDeviceFieldsBatch":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceOps.getConfigEntries":{capName:"device-ops",capScope:"device",addonId:null,access:"view"},"deviceOps.getSettingsSchema":{capName:"device-ops",capScope:"device",addonId:null,access:"view"},"deviceOps.getStreamSources":{capName:"device-ops",capScope:"device",addonId:null,access:"view"},"deviceOps.removeDevice":{capName:"device-ops",capScope:"device",addonId:null,access:"delete"},"deviceOps.setConfig":{capName:"device-ops",capScope:"device",addonId:null,access:"create"},"deviceProvider.adoptDiscoveredDevice":{capName:"device-provider",capScope:"system",addonId:null,access:"create"},"deviceProvider.createDevice":{capName:"device-provider",capScope:"system",addonId:null,access:"create"},"deviceProvider.discoverDevices":{capName:"device-provider",capScope:"system",addonId:null,access:"create"},"deviceProvider.getChildCreationSchema":{capName:"device-provider",capScope:"system",addonId:null,access:"view"},"deviceProvider.getDevices":{capName:"device-provider",capScope:"system",addonId:null,access:"view"},"deviceProvider.getStatus":{capName:"device-provider",capScope:"system",addonId:null,access:"view"},"deviceProvider.start":{capName:"device-provider",capScope:"system",addonId:null,access:"create"},"deviceProvider.stop":{capName:"device-provider",capScope:"system",addonId:null,access:"create"},"deviceProvider.supportsDiscovery":{capName:"device-provider",capScope:"system",addonId:null,access:"view"},"deviceProvider.supportsManualCreation":{capName:"device-provider",capScope:"system",addonId:null,access:"view"},"deviceProvider.testCreationField":{capName:"device-provider",capScope:"system",addonId:null,access:"create"},"deviceState.getAllSnapshots":{capName:"device-state",capScope:"system",addonId:null,access:"view"},"deviceState.getCapSlice":{capName:"device-state",capScope:"system",addonId:null,access:"view"},"deviceState.getSnapshot":{capName:"device-state",capScope:"system",addonId:null,access:"view"},"deviceState.setCapSlice":{capName:"device-state",capScope:"system",addonId:null,access:"create"},"embeddingEncoder.encode":{capName:"embedding-encoder",capScope:"system",addonId:null,access:"view"},"embeddingEncoder.encodeText":{capName:"embedding-encoder",capScope:"system",addonId:null,access:"view"},"embeddingEncoder.getInfo":{capName:"embedding-encoder",capScope:"system",addonId:null,access:"view"},"events.getEventClipUrl":{capName:"events",capScope:"device",addonId:null,access:"view"},"events.getEvents":{capName:"events",capScope:"device",addonId:null,access:"view"},"events.getEventThumbnail":{capName:"events",capScope:"device",addonId:null,access:"view"},"integrations.create":{capName:"integrations",capScope:"system",addonId:null,access:"create"},"integrations.delete":{capName:"integrations",capScope:"system",addonId:null,access:"delete"},"integrations.get":{capName:"integrations",capScope:"system",addonId:null,access:"view"},"integrations.getAvailableTypes":{capName:"integrations",capScope:"system",addonId:null,access:"view"},"integrations.getByAddonId":{capName:"integrations",capScope:"system",addonId:null,access:"view"},"integrations.getSettings":{capName:"integrations",capScope:"system",addonId:null,access:"view"},"integrations.list":{capName:"integrations",capScope:"system",addonId:null,access:"view"},"integrations.setSettings":{capName:"integrations",capScope:"system",addonId:null,access:"create"},"integrations.testConnection":{capName:"integrations",capScope:"system",addonId:null,access:"create"},"integrations.update":{capName:"integrations",capScope:"system",addonId:null,access:"create"},"intercom.endTalkSession":{capName:"intercom",capScope:"device",addonId:null,access:"create"},"intercom.handleAnswer":{capName:"intercom",capScope:"device",addonId:null,access:"create"},"intercom.pushTalkPcm":{capName:"intercom",capScope:"device",addonId:null,access:"create"},"intercom.startSession":{capName:"intercom",capScope:"device",addonId:null,access:"create"},"intercom.startTalkSession":{capName:"intercom",capScope:"device",addonId:null,access:"create"},"intercom.stopSession":{capName:"intercom",capScope:"device",addonId:null,access:"create"},"localNetwork.getAllowedAddresses":{capName:"local-network",capScope:"system",addonId:null,access:"view"},"localNetwork.getConnectionEndpoints":{capName:"local-network",capScope:"system",addonId:null,access:"view"},"localNetwork.getPreferred":{capName:"local-network",capScope:"system",addonId:null,access:"view"},"localNetwork.list":{capName:"local-network",capScope:"system",addonId:null,access:"view"},"localNetwork.resetAllowlistToBestMatch":{capName:"local-network",capScope:"system",addonId:null,access:"delete"},"localNetwork.setAllowedAddresses":{capName:"local-network",capScope:"system",addonId:null,access:"create"},"logDestination.query":{capName:"log-destination",capScope:"system",addonId:null,access:"view"},"logDestination.write":{capName:"log-destination",capScope:"system",addonId:null,access:"create"},"meshNetwork.getStatus":{capName:"mesh-network",capScope:"system",addonId:null,access:"view"},"meshNetwork.join":{capName:"mesh-network",capScope:"system",addonId:null,access:"create"},"meshNetwork.leave":{capName:"mesh-network",capScope:"system",addonId:null,access:"create"},"meshNetwork.listPeers":{capName:"mesh-network",capScope:"system",addonId:null,access:"view"},"meshNetwork.logout":{capName:"mesh-network",capScope:"system",addonId:null,access:"create"},"meshNetwork.startLogin":{capName:"mesh-network",capScope:"system",addonId:null,access:"create"},"meshNetwork.testConnection":{capName:"mesh-network",capScope:"system",addonId:null,access:"create"},"meshOrchestrator.joinProvider":{capName:"mesh-orchestrator",capScope:"system",addonId:null,access:"create"},"meshOrchestrator.leaveProvider":{capName:"mesh-orchestrator",capScope:"system",addonId:null,access:"create"},"meshOrchestrator.listProviderPeers":{capName:"mesh-orchestrator",capScope:"system",addonId:null,access:"view"},"meshOrchestrator.listProviders":{capName:"mesh-orchestrator",capScope:"system",addonId:null,access:"view"},"meshOrchestrator.logoutProvider":{capName:"mesh-orchestrator",capScope:"system",addonId:null,access:"create"},"meshOrchestrator.startLoginProvider":{capName:"mesh-orchestrator",capScope:"system",addonId:null,access:"create"},"metricsProvider.collectSnapshot":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getAddonStats":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getCached":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getCpuTemperature":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getCurrent":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getDiskSpace":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getGpuInfo":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getProcessStats":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.killProcess":{capName:"metrics-provider",capScope:"system",addonId:null,access:"create"},"metricsProvider.listAddonInstances":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.listNodeProcesses":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"motion.isDetected":{capName:"motion",capScope:"device",addonId:null,access:"view"},"motionDetection.analyze":{capName:"motion-detection",capScope:"device",addonId:null,access:"create"},"motionDetection.removeCamera":{capName:"motion-detection",capScope:"device",addonId:null,access:"delete"},"motionDetection.reset":{capName:"motion-detection",capScope:"device",addonId:null,access:"delete"},"motionTrigger.setMotionTrigger":{capName:"motion-trigger",capScope:"device",addonId:null,access:"create"},"mqttBroker.addBroker":{capName:"mqtt-broker",capScope:"system",addonId:null,access:"create"},"mqttBroker.getBrokerConfig":{capName:"mqtt-broker",capScope:"system",addonId:null,access:"view"},"mqttBroker.getStatus":{capName:"mqtt-broker",capScope:"system",addonId:null,access:"view"},"mqttBroker.listBrokers":{capName:"mqtt-broker",capScope:"system",addonId:null,access:"view"},"mqttBroker.removeBroker":{capName:"mqtt-broker",capScope:"system",addonId:null,access:"delete"},"mqttBroker.startEmbeddedBroker":{capName:"mqtt-broker",capScope:"system",addonId:null,access:"create"},"mqttBroker.stopEmbeddedBroker":{capName:"mqtt-broker",capScope:"system",addonId:null,access:"create"},"mqttBroker.testConnection":{capName:"mqtt-broker",capScope:"system",addonId:null,access:"create"},"networkAccess.getEndpoint":{capName:"network-access",capScope:"system",addonId:null,access:"view"},"networkAccess.getStatus":{capName:"network-access",capScope:"system",addonId:null,access:"view"},"networkAccess.listEndpoints":{capName:"network-access",capScope:"system",addonId:null,access:"view"},"networkAccess.start":{capName:"network-access",capScope:"system",addonId:null,access:"create"},"networkAccess.stop":{capName:"network-access",capScope:"system",addonId:null,access:"create"},"networkQuality.getAllStats":{capName:"network-quality",capScope:"system",addonId:null,access:"view"},"networkQuality.getDeviceStats":{capName:"network-quality",capScope:"system",addonId:null,access:"view"},"networkQuality.reportClientStats":{capName:"network-quality",capScope:"system",addonId:null,access:"create"},"nodes.clusterAddonStatus":{capName:"nodes",capScope:"system",addonId:null,access:"view"},"nodes.deployAddon":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"nodes.executeQuery":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"nodes.getNodeAddons":{capName:"nodes",capScope:"system",addonId:null,access:"view"},"nodes.renameNode":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"nodes.restartAddon":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"nodes.restartNode":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"nodes.restartProcess":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"nodes.setProcessLogLevel":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"nodes.shutdownNode":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"nodes.topology":{capName:"nodes",capScope:"system",addonId:null,access:"view"},"nodes.undeployAddon":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"notificationOutput.send":{capName:"notification-output",capScope:"system",addonId:null,access:"create"},"notificationOutput.sendTest":{capName:"notification-output",capScope:"system",addonId:null,access:"create"},"osd.setOverlay":{capName:"osd",capScope:"device",addonId:null,access:"create"},"pipelineAnalytics.clearTracks":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"delete"},"pipelineAnalytics.getActiveTracks":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.getAudioEvents":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.getEventMedia":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.getMotionEvents":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.getObjectEvents":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.getTrack":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.getTrackMedia":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.listTracks":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineExecutor.cacheFrameInPool":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.deleteModel":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"delete"},"pipelineExecutor.deleteTemplate":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"delete"},"pipelineExecutor.detect":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.downloadModel":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.getAddonModels":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getAudioCapabilities":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getAvailableEngines":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getCapabilities":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getDefaultSteps":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getDetectionConfigSchema":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getEffectiveTuning":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getGlobalPipelineConfig":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getGlobalSteps":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getOrchestratorConfigSchema":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getReferenceAudio":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getReferenceAudioFiles":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getReferenceImage":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getSchema":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getSelectedEngine":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getVideoPipelineSteps":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.inferCached":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.killEngine":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.listLoadedEngines":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.listReferenceImages":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.listTemplates":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.reprobeEngine":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.runAudioTest":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.runPipeline":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.runPipelineBatch":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.saveTemplate":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.setVideoPipelineSteps":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.spinEngine":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.uncacheFrame":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.updateTemplate":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.assignAudio":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.assignDecoder":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.assignPipeline":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.deleteTemplate":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"delete"},"pipelineOrchestrator.getAgentLoad":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getAgentSettings":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getAudioAssignment":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getAudioAssignments":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getAudioNodeLoad":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getCameraMetrics":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getCameraSettings":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getCameraStepOverrides":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getCapabilityBindings":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getDecoderAssignment":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getDecoderAssignments":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getGlobalMetrics":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getPipelineAssignment":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getPipelineAssignments":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.listAgentSettings":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.listTemplates":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.rebalance":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.removeAgentSettings":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"delete"},"pipelineOrchestrator.resolvePipeline":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.saveTemplate":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.setAgentAddonDefaults":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.setCameraPipelineForAgent":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.setCameraStepOverride":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.setCameraStepToggle":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.setCapabilityBinding":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.unassignAudio":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.unassignDecoder":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.unassignPipeline":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.updateTemplate":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineRunner.attachCamera":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"create"},"pipelineRunner.detachCamera":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"create"},"pipelineRunner.getAllCameraMetrics":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"view"},"pipelineRunner.getCameraMetrics":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"view"},"pipelineRunner.getLocalCameras":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"view"},"pipelineRunner.getLocalLoad":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"view"},"pipelineRunner.getLocalMetrics":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"view"},"pipelineRunner.reportMotion":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"create"},"platformProbe.getCapabilities":{capName:"platform-probe",capScope:"system",addonId:null,access:"view"},"platformProbe.getHardware":{capName:"platform-probe",capScope:"system",addonId:null,access:"view"},"platformProbe.getHardwareEncoders":{capName:"platform-probe",capScope:"system",addonId:null,access:"view"},"platformProbe.refreshHardwareEncoders":{capName:"platform-probe",capScope:"system",addonId:null,access:"create"},"platformProbe.resolveHwAccel":{capName:"platform-probe",capScope:"system",addonId:null,access:"view"},"platformProbe.resolveInferenceConfig":{capName:"platform-probe",capScope:"system",addonId:null,access:"view"},"ptz.continuousMove":{capName:"ptz",capScope:"device",addonId:null,access:"create"},"ptz.getPosition":{capName:"ptz",capScope:"device",addonId:null,access:"view"},"ptz.getPresets":{capName:"ptz",capScope:"device",addonId:null,access:"view"},"ptz.goHome":{capName:"ptz",capScope:"device",addonId:null,access:"create"},"ptz.goToPreset":{capName:"ptz",capScope:"device",addonId:null,access:"create"},"ptz.move":{capName:"ptz",capScope:"device",addonId:null,access:"create"},"ptz.stop":{capName:"ptz",capScope:"device",addonId:null,access:"create"},"ptzAutotrack.getSettings":{capName:"ptz-autotrack",capScope:"device",addonId:null,access:"view"},"ptzAutotrack.getStatus":{capName:"ptz-autotrack",capScope:"device",addonId:null,access:"view"},"ptzAutotrack.setEnabled":{capName:"ptz-autotrack",capScope:"device",addonId:null,access:"create"},"ptzAutotrack.setSettings":{capName:"ptz-autotrack",capScope:"device",addonId:null,access:"create"},"reboot.reboot":{capName:"reboot",capScope:"device",addonId:null,access:"create"},"recording.getPlaybackUrl":{capName:"recording",capScope:"device",addonId:null,access:"view"},"recording.getSegments":{capName:"recording",capScope:"device",addonId:null,access:"view"},"recording.getThumbnailAt":{capName:"recording",capScope:"device",addonId:null,access:"view"},"recordingEngine.disable":{capName:"recording-engine",capScope:"system",addonId:null,access:"create"},"recordingEngine.enable":{capName:"recording-engine",capScope:"system",addonId:null,access:"create"},"recordingEngine.estimateGlobalStorage":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.estimateStorage":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getAvailability":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getConfig":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getMotionStats":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getPlaylist":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getPolicy":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getPolicyStatus":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getRetentionConfig":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getSegments":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getStatus":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getStorageUsage":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getThumbnail":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.setPolicy":{capName:"recording-engine",capScope:"system",addonId:null,access:"create"},"recordingEngine.updateConfig":{capName:"recording-engine",capScope:"system",addonId:null,access:"create"},"recordingEngine.updateRetentionConfig":{capName:"recording-engine",capScope:"system",addonId:null,access:"create"},"remoteAccess.listProviders":{capName:"remote-access",capScope:"system",addonId:null,access:"view"},"remoteAccess.startProvider":{capName:"remote-access",capScope:"system",addonId:null,access:"create"},"remoteAccess.stopProvider":{capName:"remote-access",capScope:"system",addonId:null,access:"create"},"restreamer.getExposedResources":{capName:"restreamer",capScope:"system",addonId:null,access:"view"},"restreamer.registerDevice":{capName:"restreamer",capScope:"system",addonId:null,access:"create"},"restreamer.unregisterDevice":{capName:"restreamer",capScope:"system",addonId:null,access:"delete"},"settingsStore.count":{capName:"settings-store",capScope:"system",addonId:null,access:"view"},"settingsStore.declareCollection":{capName:"settings-store",capScope:"system",addonId:null,access:"create"},"settingsStore.delete":{capName:"settings-store",capScope:"system",addonId:null,access:"delete"},"settingsStore.get":{capName:"settings-store",capScope:"system",addonId:null,access:"view"},"settingsStore.insert":{capName:"settings-store",capScope:"system",addonId:null,access:"create"},"settingsStore.isEmpty":{capName:"settings-store",capScope:"system",addonId:null,access:"view"},"settingsStore.query":{capName:"settings-store",capScope:"system",addonId:null,access:"view"},"settingsStore.set":{capName:"settings-store",capScope:"system",addonId:null,access:"create"},"settingsStore.update":{capName:"settings-store",capScope:"system",addonId:null,access:"create"},"smtpProvider.getStatus":{capName:"smtp-provider",capScope:"system",addonId:null,access:"view"},"smtpProvider.sendEmail":{capName:"smtp-provider",capScope:"system",addonId:null,access:"create"},"smtpProvider.verify":{capName:"smtp-provider",capScope:"system",addonId:null,access:"view"},"snapshot.getSnapshot":{capName:"snapshot",capScope:"device",addonId:null,access:"view"},"snapshot.invalidateCache":{capName:"snapshot",capScope:"device",addonId:null,access:"create"},"snapshotProvider.getSnapshot":{capName:"snapshot-provider",capScope:"system",addonId:null,access:"view"},"snapshotProvider.supportsDevice":{capName:"snapshot-provider",capScope:"system",addonId:null,access:"view"},"ssoBridge.signBridgeToken":{capName:"sso-bridge",capScope:"system",addonId:null,access:"view"},"ssoBridge.verifyBridgeToken":{capName:"sso-bridge",capScope:"system",addonId:null,access:"view"},"storage.abortUpload":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.beginDownload":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.beginUpload":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.delete":{capName:"storage",capScope:"system",addonId:null,access:"delete"},"storage.deleteLocation":{capName:"storage",capScope:"system",addonId:null,access:"delete"},"storage.endDownload":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.exists":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.finalizeUpload":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.getAvailableSpace":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.getDefaultLocation":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.list":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.listLocations":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.listProviders":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.read":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.readChunk":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.resolve":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.testConfig":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.testLocation":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.upsertLocation":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.write":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.writeChunk":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storageProvider.abortUpload":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"storageProvider.beginDownload":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"storageProvider.beginUpload":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"storageProvider.delete":{capName:"storage-provider",capScope:"system",addonId:null,access:"delete"},"storageProvider.endDownload":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"storageProvider.exists":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.finalizeUpload":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"storageProvider.getAvailableSpace":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.getProviderInfo":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.list":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.read":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.readChunk":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.resolve":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.testLocation":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.write":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"storageProvider.writeChunk":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"streamBroker.assignProfile":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.getAllRtspEntries":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.getBroker":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.getBrokerStats":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.getPreBufferInfo":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.getRtspEntry":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.getRtspPort":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.getStreamUrl":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.getStreamWithCodec":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.isRtspEnabled":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.killClient":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.listAllCameraStreams":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.listAllProfileSlots":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.listClients":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.publishCameraStream":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.regenerateRtspToken":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.releaseStreamWithCodec":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.restartProfile":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.retractCameraStream":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.setPreBufferDuration":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.setRtspEnabled":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.unassignProfile":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamingEngine.getStreamUrl":{capName:"streaming-engine",capScope:"system",addonId:null,access:"view"},"streamingEngine.listStreams":{capName:"streaming-engine",capScope:"system",addonId:null,access:"view"},"streamingEngine.registerStream":{capName:"streaming-engine",capScope:"system",addonId:null,access:"create"},"streamingEngine.unregisterStream":{capName:"streaming-engine",capScope:"system",addonId:null,access:"delete"},"switch.setState":{capName:"switch",capScope:"device",addonId:null,access:"create"},"system.featureFlags":{capName:"system",capScope:"system",addonId:null,access:"view"},"system.forceRetentionCleanup":{capName:"system",capScope:"system",addonId:null,access:"create"},"system.getRetentionConfig":{capName:"system",capScope:"system",addonId:null,access:"view"},"system.health":{capName:"system",capScope:"system",addonId:null,access:"view"},"system.info":{capName:"system",capScope:"system",addonId:null,access:"view"},"system.networkAddresses":{capName:"system",capScope:"system",addonId:null,access:"view"},"system.setRetentionConfig":{capName:"system",capScope:"system",addonId:null,access:"create"},"toast.onToast":{capName:"toast",capScope:"system",addonId:null,access:"view"},"turnOrchestrator.getAllServers":{capName:"turn-orchestrator",capScope:"system",addonId:null,access:"view"},"turnOrchestrator.listProviders":{capName:"turn-orchestrator",capScope:"system",addonId:null,access:"view"},"turnOrchestrator.setProviderEnabled":{capName:"turn-orchestrator",capScope:"system",addonId:null,access:"create"},"turnProvider.getTurnServers":{capName:"turn-provider",capScope:"system",addonId:null,access:"view"},"userManagement.confirmTotp":{capName:"user-management",capScope:"system",addonId:null,access:"create"},"userManagement.createApiKey":{capName:"user-management",capScope:"system",addonId:null,access:"create"},"userManagement.createScopedToken":{capName:"user-management",capScope:"system",addonId:null,access:"create"},"userManagement.createUser":{capName:"user-management",capScope:"system",addonId:null,access:"create"},"userManagement.deleteUser":{capName:"user-management",capScope:"system",addonId:null,access:"delete"},"userManagement.disableTotp":{capName:"user-management",capScope:"system",addonId:null,access:"delete"},"userManagement.getTotpStatus":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userManagement.listApiKeys":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userManagement.listScopedTokens":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userManagement.listUsers":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userManagement.resetPassword":{capName:"user-management",capScope:"system",addonId:null,access:"create"},"userManagement.revokeApiKey":{capName:"user-management",capScope:"system",addonId:null,access:"delete"},"userManagement.revokeScopedToken":{capName:"user-management",capScope:"system",addonId:null,access:"delete"},"userManagement.setupTotp":{capName:"user-management",capScope:"system",addonId:null,access:"create"},"userManagement.setUserScopes":{capName:"user-management",capScope:"system",addonId:null,access:"create"},"userManagement.updateUser":{capName:"user-management",capScope:"system",addonId:null,access:"create"},"userManagement.validateApiKey":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userManagement.validateCredentials":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userManagement.validateScopedToken":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userManagement.verifyTotp":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userPasskeys.beginAuthentication":{capName:"user-passkeys",capScope:"system",addonId:null,access:"view"},"userPasskeys.beginRegistration":{capName:"user-passkeys",capScope:"system",addonId:null,access:"create"},"userPasskeys.finishAuthentication":{capName:"user-passkeys",capScope:"system",addonId:null,access:"view"},"userPasskeys.finishRegistration":{capName:"user-passkeys",capScope:"system",addonId:null,access:"create"},"userPasskeys.listPasskeys":{capName:"user-passkeys",capScope:"system",addonId:null,access:"view"},"userPasskeys.removePasskey":{capName:"user-passkeys",capScope:"system",addonId:null,access:"delete"},"webrtc.closeSession":{capName:"webrtc",capScope:"system",addonId:null,access:"create"},"webrtc.createSession":{capName:"webrtc",capScope:"system",addonId:null,access:"create"},"webrtc.handleAnswer":{capName:"webrtc",capScope:"system",addonId:null,access:"create"},"webrtc.handleOffer":{capName:"webrtc",capScope:"system",addonId:null,access:"create"},"webrtc.hasAdaptiveBitrate":{capName:"webrtc",capScope:"system",addonId:null,access:"view"},"webrtc.registerStream":{capName:"webrtc",capScope:"system",addonId:null,access:"create"},"webrtc.supportsStream":{capName:"webrtc",capScope:"system",addonId:null,access:"view"},"webrtc.unregisterStream":{capName:"webrtc",capScope:"system",addonId:null,access:"delete"},"webrtcSession.closeSession":{capName:"webrtc-session",capScope:"device",addonId:null,access:"create"},"webrtcSession.createSession":{capName:"webrtc-session",capScope:"device",addonId:null,access:"create"},"webrtcSession.handleAnswer":{capName:"webrtc-session",capScope:"device",addonId:null,access:"create"},"webrtcSession.handleOffer":{capName:"webrtc-session",capScope:"device",addonId:null,access:"create"},"webrtcSession.hasAdaptiveBitrate":{capName:"webrtc-session",capScope:"device",addonId:null,access:"view"},"webrtcSession.listStreams":{capName:"webrtc-session",capScope:"device",addonId:null,access:"view"},"zoneAnalytics.getCameraHistory":{capName:"zone-analytics",capScope:"device",addonId:null,access:"view"},"zoneAnalytics.getCurrentSnapshot":{capName:"zone-analytics",capScope:"device",addonId:null,access:"view"},"zoneAnalytics.getUnzonedHistory":{capName:"zone-analytics",capScope:"device",addonId:null,access:"view"},"zoneAnalytics.getZoneHistory":{capName:"zone-analytics",capScope:"device",addonId:null,access:"view"},"zoneRules.listRules":{capName:"zone-rules",capScope:"device",addonId:null,access:"view"},"zoneRules.setRules":{capName:"zone-rules",capScope:"device",addonId:null,access:"create"},"zones.addZone":{capName:"zones",capScope:"device",addonId:null,access:"create"},"zones.listZones":{capName:"zones",capScope:"device",addonId:null,access:"view"},"zones.removeZone":{capName:"zones",capScope:"device",addonId:null,access:"delete"},"zones.updateZone":{capName:"zones",capScope:"device",addonId:null,access:"create"}}),qe=["addon-pages","addon-pages-source","addon-routes","addon-settings","addon-widgets","addon-widgets-source","addons","admin-ui","advanced-notifier","alerts","audio-analysis","audio-analyzer","audio-codec","audio-metrics","auth-provider","authentication","backup","brightness","camera-credentials","camera-streams","decoder","device-discovery","device-export","device-manager","device-ops","device-provider","device-state","embedding-encoder","events","integrations","intercom","local-network","log-destination","mesh-network","mesh-orchestrator","metrics-provider","motion","motion-detection","motion-trigger","mqtt-broker","network-access","network-quality","nodes","notification-output","osd","pipeline-analytics","pipeline-executor","pipeline-orchestrator","pipeline-runner","platform-probe","ptz","ptz-autotrack","reboot","recording","recording-engine","remote-access","restreamer","settings-store","smtp-provider","snapshot","snapshot-provider","sso-bridge","storage","storage-provider","stream-broker","streaming-engine","switch","system","toast","turn-orchestrator","turn-provider","user-management","user-passkeys","webrtc","webrtc-session","zone-analytics","zone-rules","zones"],Ee=["audio-analysis","audio-metrics","brightness","camera-credentials","camera-streams","device-discovery","device-ops","events","intercom","motion","motion-detection","motion-trigger","osd","pipeline-analytics","ptz","ptz-autotrack","reboot","recording","snapshot","switch","webrtc-session","zone-analytics","zone-rules","zones"],Fe=["addon-pages","addon-pages-source","addon-routes","addon-settings","addon-widgets","addon-widgets-source","addons","admin-ui","advanced-notifier","alerts","audio-analyzer","audio-codec","auth-provider","authentication","backup","decoder","device-export","device-manager","device-provider","device-state","embedding-encoder","integrations","local-network","log-destination","mesh-network","mesh-orchestrator","metrics-provider","mqtt-broker","network-access","network-quality","nodes","notification-output","pipeline-executor","pipeline-orchestrator","pipeline-runner","platform-probe","recording-engine","remote-access","restreamer","settings-store","smtp-provider","snapshot-provider","sso-bridge","storage","storage-provider","stream-broker","streaming-engine","system","toast","turn-orchestrator","turn-provider","user-management","user-passkeys","webrtc"];export{Ue as A,Be as C,Ee as D,Oe as E,qe as K,Le as M,Fe as S,Te as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./preload-helper-BlTxHScW.js";import{g as r,i as a}from"./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-
|
|
1
|
+
import"./preload-helper-BlTxHScW.js";import{g as r,i as a}from"./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-C3bnYyiP.js";export{r as get,a as init};
|
|
@@ -61,4 +61,4 @@ var ve;function l(e,t,n){function r(u,c){if(u._zod||Object.defineProperty(u,"_zo
|
|
|
61
61
|
|
|
62
62
|
`)}h.write("payload.value = newResult;"),h.write("return payload;");const Zt=h.compile();return(T,k)=>Zt(m,T,k)};let i;const s=L,u=!ce.jitless,a=u&&Tt.value,f=t.catchall;let p;e._zod.parse=(m,h)=>{p??(p=r.value);const g=m.value;return s(g)?u&&a&&h?.async===!1&&h.jitless!==!0?(i||(i=o(t.shape)),m=i(m,h),f?at([],g,m,h,p,e):m):n(m,h):(m.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),m)}});function ke(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!D(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>P(s,r,E())))}),t)}const lt=l("$ZodUnion",(e,t)=>{v.init(e,t),_(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),_(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),_(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),_(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${r.map(o=>le(o.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,o)=>{if(n)return n(r,o);let i=!1;const s=[];for(const u of t.options){const c=u._zod.run({value:r.value,issues:[]},o);if(c instanceof Promise)s.push(c),i=!0;else{if(c.issues.length===0)return c;s.push(c)}}return i?Promise.all(s).then(u=>ke(u,r,e,o)):ke(s,r,e,o)}}),kr=l("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,lt.init(e,t);const n=e._zod.parse;_(e._zod,"propValues",()=>{const o={};for(const i of t.options){const s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[u,c]of Object.entries(s)){o[u]||(o[u]=new Set);for(const a of c)o[u].add(a)}}return o});const r=ee(()=>{const o=t.options,i=new Map;for(const s of o){const u=s._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(const c of u){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,s)}}return i});e._zod.parse=(o,i)=>{const s=o.value;if(!L(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;const u=r.value.get(s?.[t.discriminator]);return u?u._zod.run(o,i):t.unionFallback||i.direction==="backward"?n(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(r.value.keys()),input:s,path:[t.discriminator],inst:e}),o)}}),$r=l("$ZodIntersection",(e,t)=>{v.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,i=t.left._zod.run({value:o,issues:[]},r),s=t.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,a])=>$e(n,c,a)):$e(n,i,s)}});function ie(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(x(e)&&x(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),o={...e,...t};for(const i of r){const s=ie(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],i=t[r],s=ie(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function $e(e,t,n){const r=new Map;let o;for(const u of t.issues)if(u.code==="unrecognized_keys"){o??(o=u);for(const c of u.keys)r.has(c)||r.set(c,{}),r.get(c).l=!0}else e.issues.push(u);for(const u of n.issues)if(u.code==="unrecognized_keys")for(const c of u.keys)r.has(c)||r.set(c,{}),r.get(c).r=!0;else e.issues.push(u);const i=[...r].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(i.length&&o&&e.issues.push({...o,keys:i}),D(e))return e;const s=ie(t.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}const Zr=l("$ZodTuple",(e,t)=>{v.init(e,t);const n=t.items;e._zod.parse=(r,o)=>{const i=r.value;if(!Array.isArray(i))return r.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];const s=[],u=Ze(n,"optin"),c=Ze(n,"optout");if(!t.rest){if(i.length<u)return r.issues.push({code:"too_small",minimum:u,inclusive:!0,input:i,inst:e,origin:"array"}),r;i.length>n.length&&r.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:i,inst:e,origin:"array"})}const a=new Array(n.length);for(let f=0;f<n.length;f++){const p=n[f]._zod.run({value:i[f],issues:[]},o);p instanceof Promise?s.push(p.then(m=>{a[f]=m})):a[f]=p}if(t.rest){let f=n.length-1;const p=i.slice(n.length);for(const m of p){f++;const h=t.rest._zod.run({value:m,issues:[]},o);h instanceof Promise?s.push(h.then(g=>Se(g,r,f))):Se(h,r,f)}}return s.length?Promise.all(s).then(()=>Oe(a,r,n,i,c)):Oe(a,r,n,i,c)}});function Ze(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!=="optional")return n+1;return 0}function Se(e,t,n){e.issues.length&&t.issues.push(...N(n,e.issues)),t.value[n]=e.value}function Oe(e,t,n,r,o){for(let i=0;i<n.length;i++){const s=e[i],u=i<r.length;if(s.issues.length){if(!u&&i>=o){t.value.length=i;break}t.issues.push(...N(i,s.issues))}t.value[i]=s.value}for(let i=t.value.length-1;i>=r.length&&(n[i]._zod.optout==="optional"&&t.value[i]===void 0);i--)t.value.length=i;return t}const Sr=l("$ZodRecord",(e,t)=>{v.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!x(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;const i=[],s=t.keyType._zod.values;if(s){n.value={};const u=new Set;for(const a of s)if(typeof a=="string"||typeof a=="number"||typeof a=="symbol"){u.add(typeof a=="number"?a.toString():a);const f=t.keyType._zod.run({value:a,issues:[]},r);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(f.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(h=>P(h,r,E())),input:a,path:[a],inst:e});continue}const p=f.value,m=t.valueType._zod.run({value:o[a],issues:[]},r);m instanceof Promise?i.push(m.then(h=>{h.issues.length&&n.issues.push(...N(a,h.issues)),n.value[p]=h.value})):(m.issues.length&&n.issues.push(...N(a,m.issues)),n.value[p]=m.value)}let c;for(const a in o)u.has(a)||(c=c??[],c.push(a));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:c})}else{n.value={};for(const u of Reflect.ownKeys(o)){if(u==="__proto__"||!Object.prototype.propertyIsEnumerable.call(o,u))continue;let c=t.keyType._zod.run({value:u,issues:[]},r);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&nt.test(u)&&c.issues.length){const p=t.keyType._zod.run({value:Number(u),issues:[]},r);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(c=p)}if(c.issues.length){t.mode==="loose"?n.value[u]=o[u]:n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(p=>P(p,r,E())),input:u,path:[u],inst:e});continue}const f=t.valueType._zod.run({value:o[u],issues:[]},r);f instanceof Promise?i.push(f.then(p=>{p.issues.length&&n.issues.push(...N(u,p.issues)),n.value[c.value]=p.value})):(f.issues.length&&n.issues.push(...N(u,f.issues)),n.value[c.value]=f.value)}}return i.length?Promise.all(i).then(()=>n):n}}),Or=l("$ZodEnum",(e,t)=>{v.init(e,t);const n=Ke(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>Et.has(typeof o)).map(o=>typeof o=="string"?U(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const s=o.value;return r.has(s)||o.issues.push({code:"invalid_value",values:n,input:s,inst:e}),o}}),Ir=l("$ZodLiteral",(e,t)=>{if(v.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?U(r):r?U(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,o)=>{const i=r.value;return n.has(i)||r.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),r}}),Tr=l("$ZodTransform",(e,t)=>{v.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new We(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(n.value=s,n.fallback=!0,n));if(o instanceof Promise)throw new C;return n.value=o,n.fallback=!0,n}});function Ie(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const ft=l("$ZodOptional",(e,t)=>{v.init(e,t),e._zod.optin="optional",e._zod.optout="optional",_(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),_(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${le(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=n.value,i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>Ie(s,o)):Ie(i,o)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),Er=l("$ZodExactOptional",(e,t)=>{ft.init(e,t),_(e._zod,"values",()=>t.innerType._zod.values),_(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),Pr=l("$ZodNullable",(e,t)=>{v.init(e,t),_(e._zod,"optin",()=>t.innerType._zod.optin),_(e._zod,"optout",()=>t.innerType._zod.optout),_(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${le(n.source)}|null)$`):void 0}),_(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),Nr=l("$ZodDefault",(e,t)=>{v.init(e,t),e._zod.optin="optional",_(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>Te(i,t)):Te(o,t)}});function Te(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const jr=l("$ZodPrefault",(e,t)=>{v.init(e,t),e._zod.optin="optional",_(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),Ar=l("$ZodNonOptional",(e,t)=>{v.init(e,t),_(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>Ee(i,e)):Ee(o,e)}});function Ee(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Rr=l("$ZodCatch",(e,t)=>{v.init(e,t),e._zod.optin="optional",_(e._zod,"optout",()=>t.innerType._zod.optout),_(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(s=>P(s,r,E()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(i=>P(i,r,E()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),Dr=l("$ZodPipe",(e,t)=>{v.init(e,t),_(e._zod,"values",()=>t.in._zod.values),_(e._zod,"optin",()=>t.in._zod.optin),_(e._zod,"optout",()=>t.out._zod.optout),_(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const i=t.out._zod.run(n,r);return i instanceof Promise?i.then(s=>K(s,t.in,r)):K(i,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(i=>K(i,t.out,r)):K(o,t.out,r)}});function K(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const Cr=l("$ZodReadonly",(e,t)=>{v.init(e,t),_(e._zod,"propValues",()=>t.innerType._zod.propValues),_(e._zod,"values",()=>t.innerType._zod.values),_(e._zod,"optin",()=>t.innerType?._zod?.optin),_(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(Pe):Pe(o)}});function Pe(e){return e.value=Object.freeze(e.value),e}const xr=l("$ZodLazy",(e,t)=>{v.init(e,t),_(e._zod,"innerType",()=>{const n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),_(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),_(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),_(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),_(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),Ur=l("$ZodCustom",(e,t)=>{O.init(e,t),v.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(i=>Ne(i,n,r,e));Ne(o,n,r,e)}});function Ne(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(V(o))}}var je;class Fr{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Jr(){return new Fr}(je=globalThis).__zod_globalRegistry??(je.__zod_globalRegistry=Jr());const M=globalThis.__zod_globalRegistry;function Mr(e,t){return new e({type:"string",...d(t)})}function pt(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...d(t)})}function Ae(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...d(t)})}function Lr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...d(t)})}function Vr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...d(t)})}function Br(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...d(t)})}function Wr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...d(t)})}function Kr(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...d(t)})}function Gr(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...d(t)})}function Yr(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...d(t)})}function qr(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...d(t)})}function Xr(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...d(t)})}function Hr(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...d(t)})}function Qr(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...d(t)})}function eo(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...d(t)})}function to(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...d(t)})}function no(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...d(t)})}function ro(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...d(t)})}function oo(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...d(t)})}function so(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...d(t)})}function io(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...d(t)})}function uo(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...d(t)})}function co(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...d(t)})}function ao(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...d(t)})}function lo(e,t){return new e({type:"string",format:"date",check:"string_format",...d(t)})}function fo(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...d(t)})}function po(e,t){return new e({type:"string",format:"duration",check:"string_format",...d(t)})}function ho(e,t){return new e({type:"number",checks:[],...d(t)})}function mo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...d(t)})}function _o(e,t){return new e({type:"boolean",...d(t)})}function go(e,t){return new e({type:"null",...d(t)})}function vo(e){return new e({type:"any"})}function zo(e){return new e({type:"unknown"})}function yo(e,t){return new e({type:"never",...d(t)})}function bo(e,t){return new e({type:"void",...d(t)})}function wo(e,t){return new e({type:"date",...d(t)})}function Re(e,t){return new ot({check:"less_than",...d(t),value:e,inclusive:!1})}function Y(e,t){return new ot({check:"less_than",...d(t),value:e,inclusive:!0})}function De(e,t){return new st({check:"greater_than",...d(t),value:e,inclusive:!1})}function q(e,t){return new st({check:"greater_than",...d(t),value:e,inclusive:!0})}function Ce(e,t){return new On({check:"multiple_of",...d(t),value:e})}function dt(e,t){return new Tn({check:"max_length",...d(t),maximum:e})}function H(e,t){return new En({check:"min_length",...d(t),minimum:e})}function ht(e,t){return new Pn({check:"length_equals",...d(t),length:e})}function ko(e,t){return new Nn({check:"string_format",format:"regex",...d(t),pattern:e})}function $o(e){return new jn({check:"string_format",format:"lowercase",...d(e)})}function Zo(e){return new An({check:"string_format",format:"uppercase",...d(e)})}function So(e,t){return new Rn({check:"string_format",format:"includes",...d(t),includes:e})}function Oo(e,t){return new Dn({check:"string_format",format:"starts_with",...d(t),prefix:e})}function Io(e,t){return new Cn({check:"string_format",format:"ends_with",...d(t),suffix:e})}function F(e){return new xn({check:"overwrite",tx:e})}function To(e){return F(t=>t.normalize(e))}function Eo(){return F(e=>e.trim())}function Po(){return F(e=>e.toLowerCase())}function No(){return F(e=>e.toUpperCase())}function jo(){return F(e=>It(e))}function Ao(e,t,n){return new e({type:"array",element:t,...d(n)})}function Ro(e,t,n){const r=d(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function Do(e,t,n){return new e({type:"custom",check:"custom",fn:t,...d(n)})}function Co(e,t){const n=xo(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(V(o,r.value,n._zod.def));else{const i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),r.issues.push(V(i))}},e(r.value,r)),t);return n}function xo(e,t){const n=new O({check:"custom",...d(t)});return n._zod.check=e,n}function mt(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??M,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function b(e,t,n={path:[],schemaPath:[]}){var r;const o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);const u=e._zod.toJSONSchema?.();if(u)s.schema=u;else{const f={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,f);else{const m=s.schema,h=t.processors[o.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);h(e,t,m,f)}const p=e._zod.parent;p&&(s.ref||(s.ref=p),b(p,t,f),t.seen.get(p).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&Object.assign(s.schema,c),t.io==="input"&&S(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&"_prefault"in s.schema&&((r=s.schema).default??(r.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function _t(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const s of e.seen.entries()){const u=e.metadataRegistry.get(s[0])?.id;if(u){const c=r.get(u);if(c&&c!==s[0])throw new Error(`Duplicate schema id "${u}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(u,s[0])}}const o=s=>{const u=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const p=e.external.registry.get(s[0])?.id,m=e.external.uri??(g=>g);if(p)return{ref:m(p)};const h=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=h,{defId:h,ref:`${m("__shared")}#/${u}/${h}`}}if(s[1]===n)return{ref:"#"};const a=`#/${u}/`,f=s[1].schema.id??`__schema${e.counter++}`;return{defId:f,ref:a+f}},i=s=>{if(s[1].schema.$ref)return;const u=s[1],{ref:c,defId:a}=o(s);u.def={...u.schema},a&&(u.defId=a);const f=u.schema;for(const p in f)delete f[p];f.$ref=c};if(e.cycles==="throw")for(const s of e.seen.entries()){const u=s[1];if(u.cycle)throw new Error(`Cycle detected: #/${u.cycle?.join("/")}/<root>
|
|
63
63
|
|
|
64
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const s of e.seen.entries()){const u=s[1];if(t===s[0]){i(s);continue}if(e.external){const a=e.external.registry.get(s[0])?.id;if(t!==s[0]&&a){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(u.cycle){i(s);continue}if(u.count>1&&e.reused==="ref"){i(s);continue}}}function gt(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=u=>{const c=e.seen.get(u);if(c.ref===null)return;const a=c.def??c.schema,f={...a},p=c.ref;if(c.ref=null,p){r(p);const h=e.seen.get(p),g=h.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(a.allOf=a.allOf??[],a.allOf.push(g)):Object.assign(a,g),Object.assign(a,f),u._zod.parent===p)for(const $ in a)$==="$ref"||$==="allOf"||$ in f||delete a[$];if(g.$ref&&h.def)for(const $ in a)$==="$ref"||$==="allOf"||$ in h.def&&JSON.stringify(a[$])===JSON.stringify(h.def[$])&&delete a[$]}const m=u._zod.parent;if(m&&m!==p){r(m);const h=e.seen.get(m);if(h?.schema.$ref&&(a.$ref=h.schema.$ref,h.def))for(const g in a)g==="$ref"||g==="allOf"||g in h.def&&JSON.stringify(a[g])===JSON.stringify(h.def[g])&&delete a[g]}e.override({zodSchema:u,jsonSchema:a,path:c.path??[]})};for(const u of[...e.seen.entries()].reverse())r(u[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const u=e.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(u)}Object.assign(o,n.def??n.schema);const i=e.metadataRegistry.get(t)?.id;i!==void 0&&o.id===i&&delete o.id;const s=e.external?.defs??{};for(const u of e.seen.entries()){const c=u[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,s[c.defId]=c.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{const u=JSON.parse(JSON.stringify(o));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:Q(t,"input",e.processors),output:Q(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function S(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return S(r.element,n);if(r.type==="set")return S(r.valueType,n);if(r.type==="lazy")return S(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return S(r.innerType,n);if(r.type==="intersection")return S(r.left,n)||S(r.right,n);if(r.type==="record"||r.type==="map")return S(r.keyType,n)||S(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:S(r.in,n)||S(r.out,n);if(r.type==="object"){for(const o in r.shape)if(S(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(S(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(S(o,n))return!0;return!!(r.rest&&S(r.rest,n))}return!1}const Uo=(e,t={})=>n=>{const r=mt({...n,processors:t});return b(e,r),_t(r,e),gt(r,e)},Q=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r??{},s=mt({...o??{},target:i,io:t,processors:n});return b(e,s),_t(s,e),gt(s,e)},Fo={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Jo=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:i,maximum:s,format:u,patterns:c,contentEncoding:a}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),u&&(o.format=Fo[u]??u,o.format===""&&delete o.format,u==="time"&&delete o.format),a&&(o.contentEncoding=a),c&&c.size>0){const f=[...c];f.length===1?o.pattern=f[0].source:f.length>1&&(o.allOf=[...f.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},Mo=(e,t,n,r)=>{const o=n,{minimum:i,maximum:s,format:u,multipleOf:c,exclusiveMaximum:a,exclusiveMinimum:f}=e._zod.bag;typeof u=="string"&&u.includes("int")?o.type="integer":o.type="number";const p=typeof f=="number"&&f>=(i??Number.NEGATIVE_INFINITY),m=typeof a=="number"&&a<=(s??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";p?h?(o.minimum=f,o.exclusiveMinimum=!0):o.exclusiveMinimum=f:typeof i=="number"&&(o.minimum=i),m?h?(o.maximum=a,o.exclusiveMaximum=!0):o.exclusiveMaximum=a:typeof s=="number"&&(o.maximum=s),typeof c=="number"&&(o.multipleOf=c)},Lo=(e,t,n,r)=>{n.type="boolean"},Vo=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},Bo=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Wo=(e,t,n,r)=>{n.not={}},Ko=(e,t,n,r)=>{},Go=(e,t,n,r)=>{},Yo=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},qo=(e,t,n,r)=>{const o=e._zod.def,i=Ke(o.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},Xo=(e,t,n,r)=>{const o=e._zod.def,i=[];for(const s of o.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){const s=i[0];n.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[s]:n.const=s}else i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),i.every(s=>typeof s=="boolean")&&(n.type="boolean"),i.every(s=>s===null)&&(n.type="null"),n.enum=i},Ho=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Qo=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},es=(e,t,n,r)=>{const o=n,i=e._zod.def,{minimum:s,maximum:u}=e._zod.bag;typeof s=="number"&&(o.minItems=s),typeof u=="number"&&(o.maxItems=u),o.type="array",o.items=b(i.element,t,{...r,path:[...r.path,"items"]})},ts=(e,t,n,r)=>{const o=n,i=e._zod.def;o.type="object",o.properties={};const s=i.shape;for(const a in s)o.properties[a]=b(s[a],t,{...r,path:[...r.path,"properties",a]});const u=new Set(Object.keys(s)),c=new Set([...u].filter(a=>{const f=i.shape[a]._zod;return t.io==="input"?f.optin===void 0:f.optout===void 0}));c.size>0&&(o.required=Array.from(c)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=b(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},ns=(e,t,n,r)=>{const o=e._zod.def,i=o.inclusive===!1,s=o.options.map((u,c)=>b(u,t,{...r,path:[...r.path,i?"oneOf":"anyOf",c]}));i?n.oneOf=s:n.anyOf=s},rs=(e,t,n,r)=>{const o=e._zod.def,i=b(o.left,t,{...r,path:[...r.path,"allOf",0]}),s=b(o.right,t,{...r,path:[...r.path,"allOf",1]}),u=a=>"allOf"in a&&Object.keys(a).length===1,c=[...u(i)?i.allOf:[i],...u(s)?s.allOf:[s]];n.allOf=c},os=(e,t,n,r)=>{const o=n,i=e._zod.def;o.type="array";const s=t.target==="draft-2020-12"?"prefixItems":"items",u=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((m,h)=>b(m,t,{...r,path:[...r.path,s,h]})),a=i.rest?b(i.rest,t,{...r,path:[...r.path,u,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(o.prefixItems=c,a&&(o.items=a)):t.target==="openapi-3.0"?(o.items={anyOf:c},a&&o.items.anyOf.push(a),o.minItems=c.length,a||(o.maxItems=c.length)):(o.items=c,a&&(o.additionalItems=a));const{minimum:f,maximum:p}=e._zod.bag;typeof f=="number"&&(o.minItems=f),typeof p=="number"&&(o.maxItems=p)},ss=(e,t,n,r)=>{const o=n,i=e._zod.def;o.type="object";const s=i.keyType,c=s._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){const f=b(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(const p of c)o.patternProperties[p.source]=f}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=b(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),o.additionalProperties=b(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const a=s._zod.values;if(a){const f=[...a].filter(p=>typeof p=="string"||typeof p=="number");f.length>0&&(o.required=f)}},is=(e,t,n,r)=>{const o=e._zod.def,i=b(o.innerType,t,r),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},us=(e,t,n,r)=>{const o=e._zod.def;b(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},cs=(e,t,n,r)=>{const o=e._zod.def;b(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},as=(e,t,n,r)=>{const o=e._zod.def;b(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},ls=(e,t,n,r)=>{const o=e._zod.def;b(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},fs=(e,t,n,r)=>{const o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?o.out:o.in:o.out;b(s,t,r);const u=t.seen.get(e);u.ref=s},ps=(e,t,n,r)=>{const o=e._zod.def;b(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},vt=(e,t,n,r)=>{const o=e._zod.def;b(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},ds=(e,t,n,r)=>{const o=e._zod.innerType;b(o,t,r);const i=t.seen.get(e);i.ref=o},hs=l("ZodISODateTime",(e,t)=>{Hn.init(e,t),w.init(e,t)});function ms(e){return ao(hs,e)}const _s=l("ZodISODate",(e,t)=>{Qn.init(e,t),w.init(e,t)});function gs(e){return lo(_s,e)}const vs=l("ZodISOTime",(e,t)=>{er.init(e,t),w.init(e,t)});function zs(e){return fo(vs,e)}const ys=l("ZodISODuration",(e,t)=>{tr.init(e,t),w.init(e,t)});function bs(e){return po(ys,e)}const ws=(e,t)=>{Xe.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Mt(e,n)},flatten:{value:n=>Jt(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,se,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,se,2)}},isEmpty:{get(){return e.issues.length===0}}})},I=l("ZodError",ws,{Parent:Error}),ks=pe(I),$s=de(I),Zs=te(I),Ss=ne(I),Os=Bt(I),Is=Wt(I),Ts=Kt(I),Es=Gt(I),Ps=Yt(I),Ns=qt(I),js=Xt(I),As=Ht(I),xe=new WeakMap;function B(e,t,n){const r=Object.getPrototypeOf(e);let o=xe.get(r);if(o||(o=new Set,xe.set(r,o)),!o.has(t)){o.add(t);for(const i in n){const s=n[i];Object.defineProperty(r,i,{configurable:!0,enumerable:!1,get(){const u=s.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:u}),u},set(u){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:u})}})}}}const z=l("ZodType",(e,t)=>(v.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Q(e,"input"),output:Q(e,"output")}}),e.toJSONSchema=Uo(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,r)=>ks(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>Zs(e,n,r),e.parseAsync=async(n,r)=>$s(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Ss(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>Os(e,n,r),e.decode=(n,r)=>Is(e,n,r),e.encodeAsync=async(n,r)=>Ts(e,n,r),e.decodeAsync=async(n,r)=>Es(e,n,r),e.safeEncode=(n,r)=>Ps(e,n,r),e.safeDecode=(n,r)=>Ns(e,n,r),e.safeEncodeAsync=async(n,r)=>js(e,n,r),e.safeDecodeAsync=async(n,r)=>As(e,n,r),B(e,"ZodType",{check(...n){const r=this.def;return this.clone(j(r,{checks:[...r.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,r){return A(this,n,r)},brand(){return this},register(n,r){return n.add(this,r),this},refine(n,r){return this.check(Ai(n,r))},superRefine(n,r){return this.check(Ri(n,r))},overwrite(n){return this.check(F(n))},optional(){return Le(this)},exactOptional(){return bi(this)},nullable(){return Ve(this)},nullish(){return Le(Ve(this))},nonoptional(n){return Oi(this,n)},array(){return ai(this)},or(n){return fi([this,n])},and(n){return hi(this,n)},transform(n){return Be(this,zi(n))},default(n){return $i(this,n)},prefault(n){return Si(this,n)},catch(n){return Ti(this,n)},pipe(n){return Be(this,n)},readonly(){return Ni(this)},describe(n){const r=this.clone();return M.add(r,{description:n}),r},meta(...n){if(n.length===0)return M.get(this);const r=this.clone();return M.add(r,n[0]),r},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return M.get(e)?.description},configurable:!0}),e)),zt=l("_ZodString",(e,t)=>{he.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Jo(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,B(e,"_ZodString",{regex(...r){return this.check(ko(...r))},includes(...r){return this.check(So(...r))},startsWith(...r){return this.check(Oo(...r))},endsWith(...r){return this.check(Io(...r))},min(...r){return this.check(H(...r))},max(...r){return this.check(dt(...r))},length(...r){return this.check(ht(...r))},nonempty(...r){return this.check(H(1,...r))},lowercase(r){return this.check($o(r))},uppercase(r){return this.check(Zo(r))},trim(){return this.check(Eo())},normalize(...r){return this.check(To(...r))},toLowerCase(){return this.check(Po())},toUpperCase(){return this.check(No())},slugify(){return this.check(jo())}})}),Rs=l("ZodString",(e,t)=>{he.init(e,t),zt.init(e,t),e.email=n=>e.check(pt(yt,n)),e.url=n=>e.check(Kr(Cs,n)),e.jwt=n=>e.check(co(Hs,n)),e.emoji=n=>e.check(Gr(xs,n)),e.guid=n=>e.check(Ae(Ue,n)),e.uuid=n=>e.check(Lr(G,n)),e.uuidv4=n=>e.check(Vr(G,n)),e.uuidv6=n=>e.check(Br(G,n)),e.uuidv7=n=>e.check(Wr(G,n)),e.nanoid=n=>e.check(Yr(Us,n)),e.guid=n=>e.check(Ae(Ue,n)),e.cuid=n=>e.check(qr(Fs,n)),e.cuid2=n=>e.check(Xr(Js,n)),e.ulid=n=>e.check(Hr(Ms,n)),e.base64=n=>e.check(so(Ys,n)),e.base64url=n=>e.check(io(qs,n)),e.xid=n=>e.check(Qr(Ls,n)),e.ksuid=n=>e.check(eo(Vs,n)),e.ipv4=n=>e.check(to(Bs,n)),e.ipv6=n=>e.check(no(Ws,n)),e.cidrv4=n=>e.check(ro(Ks,n)),e.cidrv6=n=>e.check(oo(Gs,n)),e.e164=n=>e.check(uo(Xs,n)),e.datetime=n=>e.check(ms(n)),e.date=n=>e.check(gs(n)),e.time=n=>e.check(zs(n)),e.duration=n=>e.check(bs(n))});function Ds(e){return Mr(Rs,e)}const w=l("ZodStringFormat",(e,t)=>{y.init(e,t),zt.init(e,t)}),yt=l("ZodEmail",(e,t)=>{Ln.init(e,t),w.init(e,t)});function Di(e){return pt(yt,e)}const Ue=l("ZodGUID",(e,t)=>{Jn.init(e,t),w.init(e,t)}),G=l("ZodUUID",(e,t)=>{Mn.init(e,t),w.init(e,t)}),Cs=l("ZodURL",(e,t)=>{Vn.init(e,t),w.init(e,t)}),xs=l("ZodEmoji",(e,t)=>{Bn.init(e,t),w.init(e,t)}),Us=l("ZodNanoID",(e,t)=>{Wn.init(e,t),w.init(e,t)}),Fs=l("ZodCUID",(e,t)=>{Kn.init(e,t),w.init(e,t)}),Js=l("ZodCUID2",(e,t)=>{Gn.init(e,t),w.init(e,t)}),Ms=l("ZodULID",(e,t)=>{Yn.init(e,t),w.init(e,t)}),Ls=l("ZodXID",(e,t)=>{qn.init(e,t),w.init(e,t)}),Vs=l("ZodKSUID",(e,t)=>{Xn.init(e,t),w.init(e,t)}),Bs=l("ZodIPv4",(e,t)=>{nr.init(e,t),w.init(e,t)}),Ws=l("ZodIPv6",(e,t)=>{rr.init(e,t),w.init(e,t)}),Ks=l("ZodCIDRv4",(e,t)=>{or.init(e,t),w.init(e,t)}),Gs=l("ZodCIDRv6",(e,t)=>{sr.init(e,t),w.init(e,t)}),Ys=l("ZodBase64",(e,t)=>{ir.init(e,t),w.init(e,t)}),qs=l("ZodBase64URL",(e,t)=>{cr.init(e,t),w.init(e,t)}),Xs=l("ZodE164",(e,t)=>{ar.init(e,t),w.init(e,t)}),Hs=l("ZodJWT",(e,t)=>{fr.init(e,t),w.init(e,t)}),bt=l("ZodNumber",(e,t)=>{ut.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Mo(e,r,o),B(e,"ZodNumber",{gt(r,o){return this.check(De(r,o))},gte(r,o){return this.check(q(r,o))},min(r,o){return this.check(q(r,o))},lt(r,o){return this.check(Re(r,o))},lte(r,o){return this.check(Y(r,o))},max(r,o){return this.check(Y(r,o))},int(r){return this.check(Fe(r))},safe(r){return this.check(Fe(r))},positive(r){return this.check(De(0,r))},nonnegative(r){return this.check(q(0,r))},negative(r){return this.check(Re(0,r))},nonpositive(r){return this.check(Y(0,r))},multipleOf(r,o){return this.check(Ce(r,o))},step(r,o){return this.check(Ce(r,o))},finite(){return this}});const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Ci(e){return ho(bt,e)}const Qs=l("ZodNumberFormat",(e,t)=>{pr.init(e,t),bt.init(e,t)});function Fe(e){return mo(Qs,e)}const ei=l("ZodBoolean",(e,t)=>{dr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Lo(e,n,r)});function xi(e){return _o(ei,e)}const ti=l("ZodNull",(e,t)=>{hr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Vo(e,n,r)});function Ui(e){return go(ti,e)}const ni=l("ZodAny",(e,t)=>{mr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ko()});function Fi(){return vo(ni)}const ri=l("ZodUnknown",(e,t)=>{_r.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Go()});function Je(){return zo(ri)}const oi=l("ZodNever",(e,t)=>{gr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Wo(e,n,r)});function si(e){return yo(oi,e)}const ii=l("ZodVoid",(e,t)=>{vr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Bo(e,n)});function Ji(e){return bo(ii,e)}const ui=l("ZodDate",(e,t)=>{zr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Yo(e,r),e.min=(r,o)=>e.check(q(r,o)),e.max=(r,o)=>e.check(Y(r,o));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Mi(e){return wo(ui,e)}const ci=l("ZodArray",(e,t)=>{yr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>es(e,n,r,o),e.element=t.element,B(e,"ZodArray",{min(n,r){return this.check(H(n,r))},nonempty(n){return this.check(H(1,n))},max(n,r){return this.check(dt(n,r))},length(n,r){return this.check(ht(n,r))},unwrap(){return this.element}})});function ai(e,t){return Ao(ci,e,t)}const li=l("ZodObject",(e,t)=>{wr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ts(e,n,r,o),_(e,"shape",()=>t.shape),B(e,"ZodObject",{keyof(){return _i(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:Je()})},loose(){return this.clone({...this._zod.def,catchall:Je()})},strict(){return this.clone({...this._zod.def,catchall:si()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return Rt(this,n)},safeExtend(n){return Dt(this,n)},merge(n){return Ct(this,n)},pick(n){return jt(this,n)},omit(n){return At(this,n)},partial(...n){return xt(kt,this,n[0])},required(...n){return Ut($t,this,n[0])}})});function Li(e,t){const n={type:"object",shape:e??{},...d(t)};return new li(n)}const wt=l("ZodUnion",(e,t)=>{lt.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ns(e,n,r,o),e.options=t.options});function fi(e,t){return new wt({type:"union",options:e,...d(t)})}const pi=l("ZodDiscriminatedUnion",(e,t)=>{wt.init(e,t),kr.init(e,t)});function Vi(e,t,n){return new pi({type:"union",options:t,discriminator:e,...d(n)})}const di=l("ZodIntersection",(e,t)=>{$r.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>rs(e,n,r,o)});function hi(e,t){return new di({type:"intersection",left:e,right:t})}const mi=l("ZodTuple",(e,t)=>{Zr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>os(e,n,r,o),e.rest=n=>e.clone({...e._zod.def,rest:n})});function Bi(e,t,n){const r=t instanceof v,o=r?n:t,i=r?t:null;return new mi({type:"tuple",items:e,rest:i,...d(o)})}const Me=l("ZodRecord",(e,t)=>{Sr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ss(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});function Wi(e,t,n){return!t||!t._zod?new Me({type:"record",keyType:Ds(),valueType:e,...d(t)}):new Me({type:"record",keyType:e,valueType:t,...d(n)})}const ue=l("ZodEnum",(e,t)=>{Or.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,i)=>qo(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const i={};for(const s of r)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new ue({...t,checks:[],...d(o),entries:i})},e.exclude=(r,o)=>{const i={...t.entries};for(const s of r)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new ue({...t,checks:[],...d(o),entries:i})}});function _i(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new ue({type:"enum",entries:n,...d(t)})}const gi=l("ZodLiteral",(e,t)=>{Ir.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Xo(e,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Ki(e,t){return new gi({type:"literal",values:Array.isArray(e)?e:[e],...d(t)})}const vi=l("ZodTransform",(e,t)=>{Tr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Qo(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new We(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(V(i,n.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(V(s))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n.fallback=!0,n)):(n.value=o,n.fallback=!0,n)}});function zi(e){return new vi({type:"transform",transform:e})}const kt=l("ZodOptional",(e,t)=>{ft.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>vt(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Le(e){return new kt({type:"optional",innerType:e})}const yi=l("ZodExactOptional",(e,t)=>{Er.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>vt(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function bi(e){return new yi({type:"optional",innerType:e})}const wi=l("ZodNullable",(e,t)=>{Pr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>is(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Ve(e){return new wi({type:"nullable",innerType:e})}const ki=l("ZodDefault",(e,t)=>{Nr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>cs(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function $i(e,t){return new ki({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ye(t)}})}const Zi=l("ZodPrefault",(e,t)=>{jr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>as(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Si(e,t){return new Zi({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ye(t)}})}const $t=l("ZodNonOptional",(e,t)=>{Ar.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>us(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Oi(e,t){return new $t({type:"nonoptional",innerType:e,...d(t)})}const Ii=l("ZodCatch",(e,t)=>{Rr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ls(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ti(e,t){return new Ii({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Ei=l("ZodPipe",(e,t)=>{Dr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>fs(e,n,r,o),e.in=t.in,e.out=t.out});function Be(e,t){return new Ei({type:"pipe",in:e,out:t})}const Pi=l("ZodReadonly",(e,t)=>{Cr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ps(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Ni(e){return new Pi({type:"readonly",innerType:e})}const ji=l("ZodLazy",(e,t)=>{xr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ds(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});function Gi(e){return new ji({type:"lazy",getter:e})}const me=l("ZodCustom",(e,t)=>{Ur.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ho(e,n)});function Yi(e,t){return Ro(me,(()=>!0),t)}function Ai(e,t={}){return Do(me,e,t)}function Ri(e,t){return Co(e,t)}function qi(e,t={}){const n=new me({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...d(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}export{wi as A,Rs as Z,Ji as _,ai as a,xi as b,qi as c,_i as d,Mi as e,fi as f,Gi as g,Yi as h,Vi as i,Di as j,Fi as k,Ki as l,Ui as m,Ci as n,Li as o,bt as p,ei as q,Wi as r,Ds as s,Bi as t,Je as u,ue as v,ci as w,li as x,ki as y,kt as z};
|
|
64
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const s of e.seen.entries()){const u=s[1];if(t===s[0]){i(s);continue}if(e.external){const a=e.external.registry.get(s[0])?.id;if(t!==s[0]&&a){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(u.cycle){i(s);continue}if(u.count>1&&e.reused==="ref"){i(s);continue}}}function gt(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=u=>{const c=e.seen.get(u);if(c.ref===null)return;const a=c.def??c.schema,f={...a},p=c.ref;if(c.ref=null,p){r(p);const h=e.seen.get(p),g=h.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(a.allOf=a.allOf??[],a.allOf.push(g)):Object.assign(a,g),Object.assign(a,f),u._zod.parent===p)for(const $ in a)$==="$ref"||$==="allOf"||$ in f||delete a[$];if(g.$ref&&h.def)for(const $ in a)$==="$ref"||$==="allOf"||$ in h.def&&JSON.stringify(a[$])===JSON.stringify(h.def[$])&&delete a[$]}const m=u._zod.parent;if(m&&m!==p){r(m);const h=e.seen.get(m);if(h?.schema.$ref&&(a.$ref=h.schema.$ref,h.def))for(const g in a)g==="$ref"||g==="allOf"||g in h.def&&JSON.stringify(a[g])===JSON.stringify(h.def[g])&&delete a[g]}e.override({zodSchema:u,jsonSchema:a,path:c.path??[]})};for(const u of[...e.seen.entries()].reverse())r(u[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const u=e.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(u)}Object.assign(o,n.def??n.schema);const i=e.metadataRegistry.get(t)?.id;i!==void 0&&o.id===i&&delete o.id;const s=e.external?.defs??{};for(const u of e.seen.entries()){const c=u[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,s[c.defId]=c.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{const u=JSON.parse(JSON.stringify(o));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:Q(t,"input",e.processors),output:Q(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function S(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return S(r.element,n);if(r.type==="set")return S(r.valueType,n);if(r.type==="lazy")return S(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return S(r.innerType,n);if(r.type==="intersection")return S(r.left,n)||S(r.right,n);if(r.type==="record"||r.type==="map")return S(r.keyType,n)||S(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:S(r.in,n)||S(r.out,n);if(r.type==="object"){for(const o in r.shape)if(S(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(S(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(S(o,n))return!0;return!!(r.rest&&S(r.rest,n))}return!1}const Uo=(e,t={})=>n=>{const r=mt({...n,processors:t});return b(e,r),_t(r,e),gt(r,e)},Q=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r??{},s=mt({...o??{},target:i,io:t,processors:n});return b(e,s),_t(s,e),gt(s,e)},Fo={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Jo=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:i,maximum:s,format:u,patterns:c,contentEncoding:a}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),u&&(o.format=Fo[u]??u,o.format===""&&delete o.format,u==="time"&&delete o.format),a&&(o.contentEncoding=a),c&&c.size>0){const f=[...c];f.length===1?o.pattern=f[0].source:f.length>1&&(o.allOf=[...f.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},Mo=(e,t,n,r)=>{const o=n,{minimum:i,maximum:s,format:u,multipleOf:c,exclusiveMaximum:a,exclusiveMinimum:f}=e._zod.bag;typeof u=="string"&&u.includes("int")?o.type="integer":o.type="number";const p=typeof f=="number"&&f>=(i??Number.NEGATIVE_INFINITY),m=typeof a=="number"&&a<=(s??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";p?h?(o.minimum=f,o.exclusiveMinimum=!0):o.exclusiveMinimum=f:typeof i=="number"&&(o.minimum=i),m?h?(o.maximum=a,o.exclusiveMaximum=!0):o.exclusiveMaximum=a:typeof s=="number"&&(o.maximum=s),typeof c=="number"&&(o.multipleOf=c)},Lo=(e,t,n,r)=>{n.type="boolean"},Vo=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},Bo=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Wo=(e,t,n,r)=>{n.not={}},Ko=(e,t,n,r)=>{},Go=(e,t,n,r)=>{},Yo=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},qo=(e,t,n,r)=>{const o=e._zod.def,i=Ke(o.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},Xo=(e,t,n,r)=>{const o=e._zod.def,i=[];for(const s of o.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){const s=i[0];n.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[s]:n.const=s}else i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),i.every(s=>typeof s=="boolean")&&(n.type="boolean"),i.every(s=>s===null)&&(n.type="null"),n.enum=i},Ho=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Qo=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},es=(e,t,n,r)=>{const o=n,i=e._zod.def,{minimum:s,maximum:u}=e._zod.bag;typeof s=="number"&&(o.minItems=s),typeof u=="number"&&(o.maxItems=u),o.type="array",o.items=b(i.element,t,{...r,path:[...r.path,"items"]})},ts=(e,t,n,r)=>{const o=n,i=e._zod.def;o.type="object",o.properties={};const s=i.shape;for(const a in s)o.properties[a]=b(s[a],t,{...r,path:[...r.path,"properties",a]});const u=new Set(Object.keys(s)),c=new Set([...u].filter(a=>{const f=i.shape[a]._zod;return t.io==="input"?f.optin===void 0:f.optout===void 0}));c.size>0&&(o.required=Array.from(c)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=b(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},ns=(e,t,n,r)=>{const o=e._zod.def,i=o.inclusive===!1,s=o.options.map((u,c)=>b(u,t,{...r,path:[...r.path,i?"oneOf":"anyOf",c]}));i?n.oneOf=s:n.anyOf=s},rs=(e,t,n,r)=>{const o=e._zod.def,i=b(o.left,t,{...r,path:[...r.path,"allOf",0]}),s=b(o.right,t,{...r,path:[...r.path,"allOf",1]}),u=a=>"allOf"in a&&Object.keys(a).length===1,c=[...u(i)?i.allOf:[i],...u(s)?s.allOf:[s]];n.allOf=c},os=(e,t,n,r)=>{const o=n,i=e._zod.def;o.type="array";const s=t.target==="draft-2020-12"?"prefixItems":"items",u=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((m,h)=>b(m,t,{...r,path:[...r.path,s,h]})),a=i.rest?b(i.rest,t,{...r,path:[...r.path,u,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(o.prefixItems=c,a&&(o.items=a)):t.target==="openapi-3.0"?(o.items={anyOf:c},a&&o.items.anyOf.push(a),o.minItems=c.length,a||(o.maxItems=c.length)):(o.items=c,a&&(o.additionalItems=a));const{minimum:f,maximum:p}=e._zod.bag;typeof f=="number"&&(o.minItems=f),typeof p=="number"&&(o.maxItems=p)},ss=(e,t,n,r)=>{const o=n,i=e._zod.def;o.type="object";const s=i.keyType,c=s._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){const f=b(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(const p of c)o.patternProperties[p.source]=f}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=b(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),o.additionalProperties=b(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const a=s._zod.values;if(a){const f=[...a].filter(p=>typeof p=="string"||typeof p=="number");f.length>0&&(o.required=f)}},is=(e,t,n,r)=>{const o=e._zod.def,i=b(o.innerType,t,r),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},us=(e,t,n,r)=>{const o=e._zod.def;b(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},cs=(e,t,n,r)=>{const o=e._zod.def;b(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},as=(e,t,n,r)=>{const o=e._zod.def;b(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},ls=(e,t,n,r)=>{const o=e._zod.def;b(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},fs=(e,t,n,r)=>{const o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?o.out:o.in:o.out;b(s,t,r);const u=t.seen.get(e);u.ref=s},ps=(e,t,n,r)=>{const o=e._zod.def;b(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},vt=(e,t,n,r)=>{const o=e._zod.def;b(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},ds=(e,t,n,r)=>{const o=e._zod.innerType;b(o,t,r);const i=t.seen.get(e);i.ref=o},hs=l("ZodISODateTime",(e,t)=>{Hn.init(e,t),w.init(e,t)});function ms(e){return ao(hs,e)}const _s=l("ZodISODate",(e,t)=>{Qn.init(e,t),w.init(e,t)});function gs(e){return lo(_s,e)}const vs=l("ZodISOTime",(e,t)=>{er.init(e,t),w.init(e,t)});function zs(e){return fo(vs,e)}const ys=l("ZodISODuration",(e,t)=>{tr.init(e,t),w.init(e,t)});function bs(e){return po(ys,e)}const ws=(e,t)=>{Xe.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Mt(e,n)},flatten:{value:n=>Jt(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,se,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,se,2)}},isEmpty:{get(){return e.issues.length===0}}})},I=l("ZodError",ws,{Parent:Error}),ks=pe(I),$s=de(I),Zs=te(I),Ss=ne(I),Os=Bt(I),Is=Wt(I),Ts=Kt(I),Es=Gt(I),Ps=Yt(I),Ns=qt(I),js=Xt(I),As=Ht(I),xe=new WeakMap;function B(e,t,n){const r=Object.getPrototypeOf(e);let o=xe.get(r);if(o||(o=new Set,xe.set(r,o)),!o.has(t)){o.add(t);for(const i in n){const s=n[i];Object.defineProperty(r,i,{configurable:!0,enumerable:!1,get(){const u=s.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:u}),u},set(u){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:u})}})}}}const z=l("ZodType",(e,t)=>(v.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Q(e,"input"),output:Q(e,"output")}}),e.toJSONSchema=Uo(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,r)=>ks(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>Zs(e,n,r),e.parseAsync=async(n,r)=>$s(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Ss(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>Os(e,n,r),e.decode=(n,r)=>Is(e,n,r),e.encodeAsync=async(n,r)=>Ts(e,n,r),e.decodeAsync=async(n,r)=>Es(e,n,r),e.safeEncode=(n,r)=>Ps(e,n,r),e.safeDecode=(n,r)=>Ns(e,n,r),e.safeEncodeAsync=async(n,r)=>js(e,n,r),e.safeDecodeAsync=async(n,r)=>As(e,n,r),B(e,"ZodType",{check(...n){const r=this.def;return this.clone(j(r,{checks:[...r.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,r){return A(this,n,r)},brand(){return this},register(n,r){return n.add(this,r),this},refine(n,r){return this.check(Ai(n,r))},superRefine(n,r){return this.check(Ri(n,r))},overwrite(n){return this.check(F(n))},optional(){return Le(this)},exactOptional(){return bi(this)},nullable(){return Ve(this)},nullish(){return Le(Ve(this))},nonoptional(n){return Oi(this,n)},array(){return ai(this)},or(n){return fi([this,n])},and(n){return hi(this,n)},transform(n){return Be(this,zi(n))},default(n){return $i(this,n)},prefault(n){return Si(this,n)},catch(n){return Ti(this,n)},pipe(n){return Be(this,n)},readonly(){return Ni(this)},describe(n){const r=this.clone();return M.add(r,{description:n}),r},meta(...n){if(n.length===0)return M.get(this);const r=this.clone();return M.add(r,n[0]),r},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return M.get(e)?.description},configurable:!0}),e)),zt=l("_ZodString",(e,t)=>{he.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Jo(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,B(e,"_ZodString",{regex(...r){return this.check(ko(...r))},includes(...r){return this.check(So(...r))},startsWith(...r){return this.check(Oo(...r))},endsWith(...r){return this.check(Io(...r))},min(...r){return this.check(H(...r))},max(...r){return this.check(dt(...r))},length(...r){return this.check(ht(...r))},nonempty(...r){return this.check(H(1,...r))},lowercase(r){return this.check($o(r))},uppercase(r){return this.check(Zo(r))},trim(){return this.check(Eo())},normalize(...r){return this.check(To(...r))},toLowerCase(){return this.check(Po())},toUpperCase(){return this.check(No())},slugify(){return this.check(jo())}})}),Rs=l("ZodString",(e,t)=>{he.init(e,t),zt.init(e,t),e.email=n=>e.check(pt(yt,n)),e.url=n=>e.check(Kr(Cs,n)),e.jwt=n=>e.check(co(Hs,n)),e.emoji=n=>e.check(Gr(xs,n)),e.guid=n=>e.check(Ae(Ue,n)),e.uuid=n=>e.check(Lr(G,n)),e.uuidv4=n=>e.check(Vr(G,n)),e.uuidv6=n=>e.check(Br(G,n)),e.uuidv7=n=>e.check(Wr(G,n)),e.nanoid=n=>e.check(Yr(Us,n)),e.guid=n=>e.check(Ae(Ue,n)),e.cuid=n=>e.check(qr(Fs,n)),e.cuid2=n=>e.check(Xr(Js,n)),e.ulid=n=>e.check(Hr(Ms,n)),e.base64=n=>e.check(so(Ys,n)),e.base64url=n=>e.check(io(qs,n)),e.xid=n=>e.check(Qr(Ls,n)),e.ksuid=n=>e.check(eo(Vs,n)),e.ipv4=n=>e.check(to(Bs,n)),e.ipv6=n=>e.check(no(Ws,n)),e.cidrv4=n=>e.check(ro(Ks,n)),e.cidrv6=n=>e.check(oo(Gs,n)),e.e164=n=>e.check(uo(Xs,n)),e.datetime=n=>e.check(ms(n)),e.date=n=>e.check(gs(n)),e.time=n=>e.check(zs(n)),e.duration=n=>e.check(bs(n))});function Ds(e){return Mr(Rs,e)}const w=l("ZodStringFormat",(e,t)=>{y.init(e,t),zt.init(e,t)}),yt=l("ZodEmail",(e,t)=>{Ln.init(e,t),w.init(e,t)});function Di(e){return pt(yt,e)}const Ue=l("ZodGUID",(e,t)=>{Jn.init(e,t),w.init(e,t)}),G=l("ZodUUID",(e,t)=>{Mn.init(e,t),w.init(e,t)}),Cs=l("ZodURL",(e,t)=>{Vn.init(e,t),w.init(e,t)}),xs=l("ZodEmoji",(e,t)=>{Bn.init(e,t),w.init(e,t)}),Us=l("ZodNanoID",(e,t)=>{Wn.init(e,t),w.init(e,t)}),Fs=l("ZodCUID",(e,t)=>{Kn.init(e,t),w.init(e,t)}),Js=l("ZodCUID2",(e,t)=>{Gn.init(e,t),w.init(e,t)}),Ms=l("ZodULID",(e,t)=>{Yn.init(e,t),w.init(e,t)}),Ls=l("ZodXID",(e,t)=>{qn.init(e,t),w.init(e,t)}),Vs=l("ZodKSUID",(e,t)=>{Xn.init(e,t),w.init(e,t)}),Bs=l("ZodIPv4",(e,t)=>{nr.init(e,t),w.init(e,t)}),Ws=l("ZodIPv6",(e,t)=>{rr.init(e,t),w.init(e,t)}),Ks=l("ZodCIDRv4",(e,t)=>{or.init(e,t),w.init(e,t)}),Gs=l("ZodCIDRv6",(e,t)=>{sr.init(e,t),w.init(e,t)}),Ys=l("ZodBase64",(e,t)=>{ir.init(e,t),w.init(e,t)}),qs=l("ZodBase64URL",(e,t)=>{cr.init(e,t),w.init(e,t)}),Xs=l("ZodE164",(e,t)=>{ar.init(e,t),w.init(e,t)}),Hs=l("ZodJWT",(e,t)=>{fr.init(e,t),w.init(e,t)}),bt=l("ZodNumber",(e,t)=>{ut.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Mo(e,r,o),B(e,"ZodNumber",{gt(r,o){return this.check(De(r,o))},gte(r,o){return this.check(q(r,o))},min(r,o){return this.check(q(r,o))},lt(r,o){return this.check(Re(r,o))},lte(r,o){return this.check(Y(r,o))},max(r,o){return this.check(Y(r,o))},int(r){return this.check(Fe(r))},safe(r){return this.check(Fe(r))},positive(r){return this.check(De(0,r))},nonnegative(r){return this.check(q(0,r))},negative(r){return this.check(Re(0,r))},nonpositive(r){return this.check(Y(0,r))},multipleOf(r,o){return this.check(Ce(r,o))},step(r,o){return this.check(Ce(r,o))},finite(){return this}});const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Ci(e){return ho(bt,e)}const Qs=l("ZodNumberFormat",(e,t)=>{pr.init(e,t),bt.init(e,t)});function Fe(e){return mo(Qs,e)}const ei=l("ZodBoolean",(e,t)=>{dr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Lo(e,n,r)});function xi(e){return _o(ei,e)}const ti=l("ZodNull",(e,t)=>{hr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Vo(e,n,r)});function Ui(e){return go(ti,e)}const ni=l("ZodAny",(e,t)=>{mr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ko()});function Fi(){return vo(ni)}const ri=l("ZodUnknown",(e,t)=>{_r.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Go()});function Je(){return zo(ri)}const oi=l("ZodNever",(e,t)=>{gr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Wo(e,n,r)});function si(e){return yo(oi,e)}const ii=l("ZodVoid",(e,t)=>{vr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Bo(e,n)});function Ji(e){return bo(ii,e)}const ui=l("ZodDate",(e,t)=>{zr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Yo(e,r),e.min=(r,o)=>e.check(q(r,o)),e.max=(r,o)=>e.check(Y(r,o));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Mi(e){return wo(ui,e)}const ci=l("ZodArray",(e,t)=>{yr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>es(e,n,r,o),e.element=t.element,B(e,"ZodArray",{min(n,r){return this.check(H(n,r))},nonempty(n){return this.check(H(1,n))},max(n,r){return this.check(dt(n,r))},length(n,r){return this.check(ht(n,r))},unwrap(){return this.element}})});function ai(e,t){return Ao(ci,e,t)}const li=l("ZodObject",(e,t)=>{wr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ts(e,n,r,o),_(e,"shape",()=>t.shape),B(e,"ZodObject",{keyof(){return _i(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:Je()})},loose(){return this.clone({...this._zod.def,catchall:Je()})},strict(){return this.clone({...this._zod.def,catchall:si()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return Rt(this,n)},safeExtend(n){return Dt(this,n)},merge(n){return Ct(this,n)},pick(n){return jt(this,n)},omit(n){return At(this,n)},partial(...n){return xt(kt,this,n[0])},required(...n){return Ut($t,this,n[0])}})});function Li(e,t){const n={type:"object",shape:e??{},...d(t)};return new li(n)}const wt=l("ZodUnion",(e,t)=>{lt.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ns(e,n,r,o),e.options=t.options});function fi(e,t){return new wt({type:"union",options:e,...d(t)})}const pi=l("ZodDiscriminatedUnion",(e,t)=>{wt.init(e,t),kr.init(e,t)});function Vi(e,t,n){return new pi({type:"union",options:t,discriminator:e,...d(n)})}const di=l("ZodIntersection",(e,t)=>{$r.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>rs(e,n,r,o)});function hi(e,t){return new di({type:"intersection",left:e,right:t})}const mi=l("ZodTuple",(e,t)=>{Zr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>os(e,n,r,o),e.rest=n=>e.clone({...e._zod.def,rest:n})});function Bi(e,t,n){const r=t instanceof v,o=r?n:t,i=r?t:null;return new mi({type:"tuple",items:e,rest:i,...d(o)})}const Me=l("ZodRecord",(e,t)=>{Sr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ss(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});function Wi(e,t,n){return!t||!t._zod?new Me({type:"record",keyType:Ds(),valueType:e,...d(t)}):new Me({type:"record",keyType:e,valueType:t,...d(n)})}const ue=l("ZodEnum",(e,t)=>{Or.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,i)=>qo(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const i={};for(const s of r)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new ue({...t,checks:[],...d(o),entries:i})},e.exclude=(r,o)=>{const i={...t.entries};for(const s of r)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new ue({...t,checks:[],...d(o),entries:i})}});function _i(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new ue({type:"enum",entries:n,...d(t)})}const gi=l("ZodLiteral",(e,t)=>{Ir.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Xo(e,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Ki(e,t){return new gi({type:"literal",values:Array.isArray(e)?e:[e],...d(t)})}const vi=l("ZodTransform",(e,t)=>{Tr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Qo(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new We(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(V(i,n.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(V(s))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n.fallback=!0,n)):(n.value=o,n.fallback=!0,n)}});function zi(e){return new vi({type:"transform",transform:e})}const kt=l("ZodOptional",(e,t)=>{ft.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>vt(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Le(e){return new kt({type:"optional",innerType:e})}const yi=l("ZodExactOptional",(e,t)=>{Er.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>vt(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function bi(e){return new yi({type:"optional",innerType:e})}const wi=l("ZodNullable",(e,t)=>{Pr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>is(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Ve(e){return new wi({type:"nullable",innerType:e})}const ki=l("ZodDefault",(e,t)=>{Nr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>cs(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function $i(e,t){return new ki({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ye(t)}})}const Zi=l("ZodPrefault",(e,t)=>{jr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>as(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Si(e,t){return new Zi({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ye(t)}})}const $t=l("ZodNonOptional",(e,t)=>{Ar.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>us(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Oi(e,t){return new $t({type:"nonoptional",innerType:e,...d(t)})}const Ii=l("ZodCatch",(e,t)=>{Rr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ls(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ti(e,t){return new Ii({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Ei=l("ZodPipe",(e,t)=>{Dr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>fs(e,n,r,o),e.in=t.in,e.out=t.out});function Be(e,t){return new Ei({type:"pipe",in:e,out:t})}const Pi=l("ZodReadonly",(e,t)=>{Cr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ps(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Ni(e){return new Pi({type:"readonly",innerType:e})}const ji=l("ZodLazy",(e,t)=>{xr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ds(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});function Gi(e){return new ji({type:"lazy",getter:e})}const me=l("ZodCustom",(e,t)=>{Ur.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ho(e,n)});function Yi(e,t){return Ro(me,(()=>!0),t)}function Ai(e,t={}){return Do(me,e,t)}function Ri(e,t){return Co(e,t)}function qi(e,t={}){const n=new me({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...d(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}export{wi as A,Rs as Z,Ji as _,ai as a,_i as b,xi as c,qi as d,Mi as e,fi as f,Gi as g,Yi as h,Vi as i,Di as j,Fi as k,Ki as l,Ui as m,Ci as n,Li as o,bt as p,ei as q,Wi as r,Ds as s,Bi as t,Je as u,ue as v,ci as w,li as x,ki as y,kt as z};
|