@telemetryos/root-sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +598 -0
- package/dist/accounts.d.ts +18 -0
- package/dist/applications.d.ts +55 -0
- package/dist/bridge-message-formatter.d.ts +7 -0
- package/dist/bridge-message-validator.d.ts +11 -0
- package/dist/bridge.cjs +1 -0
- package/dist/bridge.d.ts +45 -0
- package/dist/bridge.js +46 -0
- package/dist/client-message-formatter.d.ts +12 -0
- package/dist/client-message-validator.d.ts +26 -0
- package/dist/client.d.ts +293 -0
- package/dist/client.spec.d.ts +1 -0
- package/dist/do-async.d.ts +1 -0
- package/dist/environment.d.ts +10 -0
- package/dist/index-B98VDFRY.js +2974 -0
- package/dist/index-JDXm3DEz.cjs +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +224 -0
- package/dist/index.js +833 -0
- package/dist/index.spec.d.ts +1 -0
- package/dist/media.d.ts +71 -0
- package/dist/root-settings-navigation.d.ts +59 -0
- package/dist/store.d.ts +129 -0
- package/dist/test-setup.d.ts +1 -0
- package/dist/users.d.ts +25 -0
- package/package.json +69 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var g;(function(r){r.assertEqual=n=>n;function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{const a={};for(const i of n)a[i]=i;return a},r.getValidEnumValues=n=>{const a=r.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(const o of a)i[o]=n[o];return r.objectValues(i)},r.objectValues=n=>r.objectKeys(n).map(function(a){return n[a]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const a=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},r.find=(n,a)=>{for(const i of n)if(a(i))return i},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function s(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}r.joinValues=s,r.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(g||(g={}));var ke;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(ke||(ke={}));const f=g.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),R=r=>{switch(typeof r){case"undefined":return f.undefined;case"string":return f.string;case"number":return isNaN(r)?f.nan:f.number;case"boolean":return f.boolean;case"function":return f.function;case"bigint":return f.bigint;case"symbol":return f.symbol;case"object":return Array.isArray(r)?f.array:r===null?f.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?f.promise:typeof Map<"u"&&r instanceof Map?f.map:typeof Set<"u"&&r instanceof Set?f.set:typeof Date<"u"&&r instanceof Date?f.date:f.object;default:return f.unknown}},d=g.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),ze=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class T extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(a){return a.message},s={_errors:[]},n=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)s._errors.push(t(i));else{let o=s,l=0;for(;l<i.path.length;){const c=i.path[l];l===i.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(t(i))):o[c]=o[c]||{_errors:[]},o=o[c],l++}}};return n(this),s}static assert(e){if(!(e instanceof T))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,g.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},s=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):s.push(e(n));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}}T.create=r=>new T(r);const W=(r,e)=>{let t;switch(r.code){case d.invalid_type:r.received===f.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,g.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${g.joinValues(r.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${g.joinValues(r.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${g.joinValues(r.options)}, received '${r.received}'`;break;case d.invalid_arguments:t="Invalid function arguments";break;case d.invalid_return_type:t="Invalid function return type";break;case d.invalid_date:t="Invalid date";break;case d.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:g.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case d.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case d.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case d.custom:t="Invalid input";break;case d.invalid_intersection_types:t="Intersection results could not be merged";break;case d.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,g.assertNever(r)}return{message:t}};let Oe=W;function De(r){Oe=r}function le(){return Oe}const fe=r=>{const{data:e,path:t,errorMaps:s,issueData:n}=r,a=[...t,...n.path||[]],i={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let o="";const l=s.filter(c=>!!c).slice().reverse();for(const c of l)o=c(i,{data:e,defaultError:o}).message;return{...n,path:a,message:o}},Le=[];function u(r,e){const t=le(),s=fe({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===W?void 0:W].filter(n=>!!n)});r.common.issues.push(s)}class k{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const s=[];for(const n of t){if(n.status==="aborted")return v;n.status==="dirty"&&e.dirty(),s.push(n.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const n of t){const a=await n.key,i=await n.value;s.push({key:a,value:i})}return k.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const n of t){const{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return v;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(s[a.value]=i.value)}return{status:e.value,value:s}}}const v=Object.freeze({status:"aborted"}),B=r=>({status:"dirty",value:r}),w=r=>({status:"valid",value:r}),be=r=>r.status==="aborted",we=r=>r.status==="dirty",z=r=>r.status==="valid",G=r=>typeof Promise<"u"&&r instanceof Promise;function he(r,e,t,s){if(typeof e=="function"?r!==e||!0:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(r)}function Ne(r,e,t,s,n){if(typeof e=="function"?r!==e||!0:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(r,t),t}var h;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(h||(h={}));var Y,H;class O{constructor(e,t,s,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Ce=(r,e)=>{if(z(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new T(r.common.issues);return this._error=t,this._error}}};function y(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:s,description:n}=r;if(e&&(t||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,o)=>{var l,c;const{message:p}=r;return i.code==="invalid_enum_value"?{message:p??o.defaultError}:typeof o.data>"u"?{message:(l=p??s)!==null&&l!==void 0?l:o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:(c=p??t)!==null&&c!==void 0?c:o.defaultError}},description:n}}class _{get description(){return this._def.description}_getType(e){return R(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:R(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new k,ctx:{common:e.parent.common,data:e.data,parsedType:R(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(G(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){var s;const n={common:{issues:[],async:(s=t==null?void 0:t.async)!==null&&s!==void 0?s:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:R(e)},a=this._parseSync({data:e,path:n.path,parent:n});return Ce(n,a)}"~validate"(e){var t,s;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:R(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:n});return z(a)?{value:a.value}:{issues:n.common.issues}}catch(a){!((s=(t=a==null?void 0:a.message)===null||t===void 0?void 0:t.toLowerCase())===null||s===void 0)&&s.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(a=>z(a)?{value:a.value}:{issues:n.common.issues})}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:R(e)},n=this._parse({data:e,path:s.path,parent:s}),a=await(G(n)?n:Promise.resolve(n));return Ce(s,a)}refine(e,t){const s=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{const i=e(n),o=()=>a.addIssue({code:d.custom,...s(n)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((s,n)=>e(s)?!0:(n.addIssue(typeof t=="function"?t(s,n):t),!1))}_refinement(e){return new S({schema:this,typeName:m.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return A.create(this,this._def)}nullable(){return P.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return C.create(this)}promise(){return J.create(this,this._def)}or(e){return ee.create([this,e],this._def)}and(e){return te.create(this,e,this._def)}transform(e){return new S({...y(this._def),schema:this,typeName:m.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new ie({...y(this._def),innerType:this,defaultValue:t,typeName:m.ZodDefault})}brand(){return new Ze({typeName:m.ZodBranded,type:this,...y(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new oe({...y(this._def),innerType:this,catchValue:t,typeName:m.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ce.create(this,e)}readonly(){return de.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Ue=/^c[^\s-]{8,}$/i,Be=/^[0-9a-z]+$/,Fe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,We=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,qe=/^[a-z0-9_-]{21}$/i,Je=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ye=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,He=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ge="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let xe;const Qe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Xe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Ke=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,et=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,tt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,rt=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ee="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",st=new RegExp(`^${Ee}$`);function Re(r){let e="[0-5]\\d";r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`);const t=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function nt(r){return new RegExp(`^${Re(r)}$`)}function Ie(r){let e=`${Ee}T${Re(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function at(r,e){return!!((e==="v4"||!e)&&Qe.test(r)||(e==="v6"||!e)&&Ke.test(r))}function it(r,e){if(!Je.test(r))return!1;try{const[t]=r.split("."),s=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(s));return!(typeof n!="object"||n===null||!n.typ||!n.alg||e&&n.alg!==e)}catch{return!1}}function ot(r,e){return!!((e==="v4"||!e)&&Xe.test(r)||(e==="v6"||!e)&&et.test(r))}class Z extends _{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==f.string){const a=this._getOrReturnCtx(e);return u(a,{code:d.invalid_type,expected:f.string,received:a.parsedType}),v}const s=new k;let n;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),u(n,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="max")e.data.length>a.value&&(n=this._getOrReturnCtx(e,n),u(n,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(n=this._getOrReturnCtx(e,n),i?u(n,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&u(n,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),s.dirty())}else if(a.kind==="email")He.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"email",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="emoji")xe||(xe=new RegExp(Ge,"u")),xe.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"emoji",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="uuid")We.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"uuid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="nanoid")qe.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"nanoid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid")Ue.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"cuid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid2")Be.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"cuid2",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="ulid")Fe.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"ulid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),u(n,{validation:"url",code:d.invalid_string,message:a.message}),s.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"regex",code:d.invalid_string,message:a.message}),s.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(e,n),u(n,{code:d.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),s.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(n=this._getOrReturnCtx(e,n),u(n,{code:d.invalid_string,validation:{startsWith:a.value},message:a.message}),s.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(n=this._getOrReturnCtx(e,n),u(n,{code:d.invalid_string,validation:{endsWith:a.value},message:a.message}),s.dirty()):a.kind==="datetime"?Ie(a).test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{code:d.invalid_string,validation:"datetime",message:a.message}),s.dirty()):a.kind==="date"?st.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{code:d.invalid_string,validation:"date",message:a.message}),s.dirty()):a.kind==="time"?nt(a).test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{code:d.invalid_string,validation:"time",message:a.message}),s.dirty()):a.kind==="duration"?Ye.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"duration",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="ip"?at(e.data,a.version)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"ip",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="jwt"?it(e.data,a.alg)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"jwt",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="cidr"?ot(e.data,a.version)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"cidr",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="base64"?tt.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"base64",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="base64url"?rt.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"base64url",code:d.invalid_string,message:a.message}),s.dirty()):g.assertNever(a);return{status:s.value,value:e.data}}_regex(e,t,s){return this.refinement(n=>e.test(n),{validation:t,code:d.invalid_string,...h.errToObj(s)})}_addCheck(e){return new Z({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...h.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...h.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...h.errToObj(e)})}datetime(e){var t,s;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,local:(s=e==null?void 0:e.local)!==null&&s!==void 0?s:!1,...h.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...h.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...h.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...h.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new Z({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Z({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Z({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}Z.create=r=>{var e;return new Z({checks:[],typeName:m.ZodString,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...y(r)})};function dt(r,e){const t=(r.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,n=t>s?t:s,a=parseInt(r.toFixed(n).replace(".","")),i=parseInt(e.toFixed(n).replace(".",""));return a%i/Math.pow(10,n)}class j extends _{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==f.number){const a=this._getOrReturnCtx(e);return u(a,{code:d.invalid_type,expected:f.number,received:a.parsedType}),v}let s;const n=new k;for(const a of this._def.checks)a.kind==="int"?g.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{code:d.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),u(s,{code:d.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),u(s,{code:d.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?dt(e.data,a.value)!==0&&(s=this._getOrReturnCtx(e,s),u(s,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{code:d.not_finite,message:a.message}),n.dirty()):g.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,s,n){return new j({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:h.toString(n)}]})}_addCheck(e){return new j({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&g.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}}j.create=r=>new j({checks:[],typeName:m.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...y(r)});class $ extends _{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==f.bigint)return this._getInvalidInput(e);let s;const n=new k;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),u(s,{code:d.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),u(s,{code:d.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),u(s,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):g.assertNever(a);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return u(t,{code:d.invalid_type,expected:f.bigint,received:t.parsedType}),v}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,s,n){return new $({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:h.toString(n)}]})}_addCheck(e){return new $({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}$.create=r=>{var e;return new $({checks:[],typeName:m.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...y(r)})};class Q extends _{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==f.boolean){const s=this._getOrReturnCtx(e);return u(s,{code:d.invalid_type,expected:f.boolean,received:s.parsedType}),v}return w(e.data)}}Q.create=r=>new Q({typeName:m.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...y(r)});class D extends _{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==f.date){const a=this._getOrReturnCtx(e);return u(a,{code:d.invalid_type,expected:f.date,received:a.parsedType}),v}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return u(a,{code:d.invalid_date}),v}const s=new k;let n;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(n=this._getOrReturnCtx(e,n),u(n,{code:d.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),s.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(n=this._getOrReturnCtx(e,n),u(n,{code:d.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):g.assertNever(a);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new D({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}D.create=r=>new D({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:m.ZodDate,...y(r)});class pe extends _{_parse(e){if(this._getType(e)!==f.symbol){const s=this._getOrReturnCtx(e);return u(s,{code:d.invalid_type,expected:f.symbol,received:s.parsedType}),v}return w(e.data)}}pe.create=r=>new pe({typeName:m.ZodSymbol,...y(r)});class X extends _{_parse(e){if(this._getType(e)!==f.undefined){const s=this._getOrReturnCtx(e);return u(s,{code:d.invalid_type,expected:f.undefined,received:s.parsedType}),v}return w(e.data)}}X.create=r=>new X({typeName:m.ZodUndefined,...y(r)});class K extends _{_parse(e){if(this._getType(e)!==f.null){const s=this._getOrReturnCtx(e);return u(s,{code:d.invalid_type,expected:f.null,received:s.parsedType}),v}return w(e.data)}}K.create=r=>new K({typeName:m.ZodNull,...y(r)});class q extends _{constructor(){super(...arguments),this._any=!0}_parse(e){return w(e.data)}}q.create=r=>new q({typeName:m.ZodAny,...y(r)});class V extends _{constructor(){super(...arguments),this._unknown=!0}_parse(e){return w(e.data)}}V.create=r=>new V({typeName:m.ZodUnknown,...y(r)});class I extends _{_parse(e){const t=this._getOrReturnCtx(e);return u(t,{code:d.invalid_type,expected:f.never,received:t.parsedType}),v}}I.create=r=>new I({typeName:m.ZodNever,...y(r)});class me extends _{_parse(e){if(this._getType(e)!==f.undefined){const s=this._getOrReturnCtx(e);return u(s,{code:d.invalid_type,expected:f.void,received:s.parsedType}),v}return w(e.data)}}me.create=r=>new me({typeName:m.ZodVoid,...y(r)});class C extends _{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),n=this._def;if(t.parsedType!==f.array)return u(t,{code:d.invalid_type,expected:f.array,received:t.parsedType}),v;if(n.exactLength!==null){const i=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(i||o)&&(u(t,{code:i?d.too_big:d.too_small,minimum:o?n.exactLength.value:void 0,maximum:i?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),s.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(u(t,{code:d.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),s.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(u(t,{code:d.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>n.type._parseAsync(new O(t,i,t.path,o)))).then(i=>k.mergeArray(s,i));const a=[...t.data].map((i,o)=>n.type._parseSync(new O(t,i,t.path,o)));return k.mergeArray(s,a)}get element(){return this._def.type}min(e,t){return new C({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new C({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new C({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}}C.create=(r,e)=>new C({type:r,minLength:null,maxLength:null,exactLength:null,typeName:m.ZodArray,...y(e)});function U(r){if(r instanceof x){const e={};for(const t in r.shape){const s=r.shape[t];e[t]=A.create(U(s))}return new x({...r._def,shape:()=>e})}else return r instanceof C?new C({...r._def,type:U(r.element)}):r instanceof A?A.create(U(r.unwrap())):r instanceof P?P.create(U(r.unwrap())):r instanceof N?N.create(r.items.map(e=>U(e))):r}class x extends _{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=g.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==f.object){const c=this._getOrReturnCtx(e);return u(c,{code:d.invalid_type,expected:f.object,received:c.parsedType}),v}const{status:s,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof I&&this._def.unknownKeys==="strip"))for(const c in n.data)i.includes(c)||o.push(c);const l=[];for(const c of i){const p=a[c],b=n.data[c];l.push({key:{status:"valid",value:c},value:p._parse(new O(n,b,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof I){const c=this._def.unknownKeys;if(c==="passthrough")for(const p of o)l.push({key:{status:"valid",value:p},value:{status:"valid",value:n.data[p]}});else if(c==="strict")o.length>0&&(u(n,{code:d.unrecognized_keys,keys:o}),s.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const p of o){const b=n.data[p];l.push({key:{status:"valid",value:p},value:c._parse(new O(n,b,n.path,p)),alwaysSet:p in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const c=[];for(const p of l){const b=await p.key,ue=await p.value;c.push({key:b,value:ue,alwaysSet:p.alwaysSet})}return c}).then(c=>k.mergeObjectSync(s,c)):k.mergeObjectSync(s,l)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new x({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var n,a,i,o;const l=(i=(a=(n=this._def).errorMap)===null||a===void 0?void 0:a.call(n,t,s).message)!==null&&i!==void 0?i:s.defaultError;return t.code==="unrecognized_keys"?{message:(o=h.errToObj(e).message)!==null&&o!==void 0?o:l}:{message:l}}}:{}})}strip(){return new x({...this._def,unknownKeys:"strip"})}passthrough(){return new x({...this._def,unknownKeys:"passthrough"})}extend(e){return new x({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new x({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:m.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new x({...this._def,catchall:e})}pick(e){const t={};return g.objectKeys(e).forEach(s=>{e[s]&&this.shape[s]&&(t[s]=this.shape[s])}),new x({...this._def,shape:()=>t})}omit(e){const t={};return g.objectKeys(this.shape).forEach(s=>{e[s]||(t[s]=this.shape[s])}),new x({...this._def,shape:()=>t})}deepPartial(){return U(this)}partial(e){const t={};return g.objectKeys(this.shape).forEach(s=>{const n=this.shape[s];e&&!e[s]?t[s]=n:t[s]=n.optional()}),new x({...this._def,shape:()=>t})}required(e){const t={};return g.objectKeys(this.shape).forEach(s=>{if(e&&!e[s])t[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof A;)a=a._def.innerType;t[s]=a}}),new x({...this._def,shape:()=>t})}keyof(){return je(g.objectKeys(this.shape))}}x.create=(r,e)=>new x({shape:()=>r,unknownKeys:"strip",catchall:I.create(),typeName:m.ZodObject,...y(e)});x.strictCreate=(r,e)=>new x({shape:()=>r,unknownKeys:"strict",catchall:I.create(),typeName:m.ZodObject,...y(e)});x.lazycreate=(r,e)=>new x({shape:r,unknownKeys:"strip",catchall:I.create(),typeName:m.ZodObject,...y(e)});class ee extends _{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;function n(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new T(o.ctx.common.issues));return u(t,{code:d.invalid_union,unionErrors:i}),v}if(t.common.async)return Promise.all(s.map(async a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a;const i=[];for(const l of s){const c={...t,common:{...t.common,issues:[]},parent:null},p=l._parseSync({data:t.data,path:t.path,parent:c});if(p.status==="valid")return p;p.status==="dirty"&&!a&&(a={result:p,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(l=>new T(l));return u(t,{code:d.invalid_union,unionErrors:o}),v}}get options(){return this._def.options}}ee.create=(r,e)=>new ee({options:r,typeName:m.ZodUnion,...y(e)});const E=r=>r instanceof se?E(r.schema):r instanceof S?E(r.innerType()):r instanceof ne?[r.value]:r instanceof M?r.options:r instanceof ae?g.objectValues(r.enum):r instanceof ie?E(r._def.innerType):r instanceof X?[void 0]:r instanceof K?[null]:r instanceof A?[void 0,...E(r.unwrap())]:r instanceof P?[null,...E(r.unwrap())]:r instanceof Ze||r instanceof de?E(r.unwrap()):r instanceof oe?E(r._def.innerType):[];class _e extends _{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.object)return u(t,{code:d.invalid_type,expected:f.object,received:t.parsedType}),v;const s=this.discriminator,n=t.data[s],a=this.optionsMap.get(n);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(u(t,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),v)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,s){const n=new Map;for(const a of t){const i=E(a.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of i){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,a)}}return new _e({typeName:m.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...y(s)})}}function Te(r,e){const t=R(r),s=R(e);if(r===e)return{valid:!0,data:r};if(t===f.object&&s===f.object){const n=g.objectKeys(e),a=g.objectKeys(r).filter(o=>n.indexOf(o)!==-1),i={...r,...e};for(const o of a){const l=Te(r[o],e[o]);if(!l.valid)return{valid:!1};i[o]=l.data}return{valid:!0,data:i}}else if(t===f.array&&s===f.array){if(r.length!==e.length)return{valid:!1};const n=[];for(let a=0;a<r.length;a++){const i=r[a],o=e[a],l=Te(i,o);if(!l.valid)return{valid:!1};n.push(l.data)}return{valid:!0,data:n}}else return t===f.date&&s===f.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class te extends _{_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=(a,i)=>{if(be(a)||be(i))return v;const o=Te(a.value,i.value);return o.valid?((we(a)||we(i))&&t.dirty(),{status:t.value,value:o.data}):(u(s,{code:d.invalid_intersection_types}),v)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}te.create=(r,e,t)=>new te({left:r,right:e,typeName:m.ZodIntersection,...y(t)});class N extends _{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==f.array)return u(s,{code:d.invalid_type,expected:f.array,received:s.parsedType}),v;if(s.data.length<this._def.items.length)return u(s,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),v;!this._def.rest&&s.data.length>this._def.items.length&&(u(s,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...s.data].map((i,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new O(s,i,s.path,o)):null}).filter(i=>!!i);return s.common.async?Promise.all(a).then(i=>k.mergeArray(t,i)):k.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new N({...this._def,rest:e})}}N.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new N({items:r,typeName:m.ZodTuple,rest:null,...y(e)})};class re extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==f.object)return u(s,{code:d.invalid_type,expected:f.object,received:s.parsedType}),v;const n=[],a=this._def.keyType,i=this._def.valueType;for(const o in s.data)n.push({key:a._parse(new O(s,o,s.path,o)),value:i._parse(new O(s,s.data[o],s.path,o)),alwaysSet:o in s.data});return s.common.async?k.mergeObjectAsync(t,n):k.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,s){return t instanceof _?new re({keyType:e,valueType:t,typeName:m.ZodRecord,...y(s)}):new re({keyType:Z.create(),valueType:e,typeName:m.ZodRecord,...y(t)})}}class ve extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==f.map)return u(s,{code:d.invalid_type,expected:f.map,received:s.parsedType}),v;const n=this._def.keyType,a=this._def.valueType,i=[...s.data.entries()].map(([o,l],c)=>({key:n._parse(new O(s,o,s.path,[c,"key"])),value:a._parse(new O(s,l,s.path,[c,"value"]))}));if(s.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,p=await l.value;if(c.status==="aborted"||p.status==="aborted")return v;(c.status==="dirty"||p.status==="dirty")&&t.dirty(),o.set(c.value,p.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const l of i){const c=l.key,p=l.value;if(c.status==="aborted"||p.status==="aborted")return v;(c.status==="dirty"||p.status==="dirty")&&t.dirty(),o.set(c.value,p.value)}return{status:t.value,value:o}}}}ve.create=(r,e,t)=>new ve({valueType:e,keyType:r,typeName:m.ZodMap,...y(t)});class L extends _{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==f.set)return u(s,{code:d.invalid_type,expected:f.set,received:s.parsedType}),v;const n=this._def;n.minSize!==null&&s.data.size<n.minSize.value&&(u(s,{code:d.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&s.data.size>n.maxSize.value&&(u(s,{code:d.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const a=this._def.valueType;function i(l){const c=new Set;for(const p of l){if(p.status==="aborted")return v;p.status==="dirty"&&t.dirty(),c.add(p.value)}return{status:t.value,value:c}}const o=[...s.data.values()].map((l,c)=>a._parse(new O(s,l,s.path,c)));return s.common.async?Promise.all(o).then(l=>i(l)):i(o)}min(e,t){return new L({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new L({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}L.create=(r,e)=>new L({valueType:r,minSize:null,maxSize:null,typeName:m.ZodSet,...y(e)});class F extends _{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.function)return u(t,{code:d.invalid_type,expected:f.function,received:t.parsedType}),v;function s(o,l){return fe({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,le(),W].filter(c=>!!c),issueData:{code:d.invalid_arguments,argumentsError:l}})}function n(o,l){return fe({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,le(),W].filter(c=>!!c),issueData:{code:d.invalid_return_type,returnTypeError:l}})}const a={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof J){const o=this;return w(async function(...l){const c=new T([]),p=await o._def.args.parseAsync(l,a).catch(ge=>{throw c.addIssue(s(l,ge)),c}),b=await Reflect.apply(i,this,p);return await o._def.returns._def.type.parseAsync(b,a).catch(ge=>{throw c.addIssue(n(b,ge)),c})})}else{const o=this;return w(function(...l){const c=o._def.args.safeParse(l,a);if(!c.success)throw new T([s(l,c.error)]);const p=Reflect.apply(i,this,c.data),b=o._def.returns.safeParse(p,a);if(!b.success)throw new T([n(p,b.error)]);return b.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new F({...this._def,args:N.create(e).rest(V.create())})}returns(e){return new F({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new F({args:e||N.create([]).rest(V.create()),returns:t||V.create(),typeName:m.ZodFunction,...y(s)})}}class se extends _{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}se.create=(r,e)=>new se({getter:r,typeName:m.ZodLazy,...y(e)});class ne extends _{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return u(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),v}return{status:"valid",value:e.data}}get value(){return this._def.value}}ne.create=(r,e)=>new ne({value:r,typeName:m.ZodLiteral,...y(e)});function je(r,e){return new M({values:r,typeName:m.ZodEnum,...y(e)})}class M extends _{constructor(){super(...arguments),Y.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return u(t,{expected:g.joinValues(s),received:t.parsedType,code:d.invalid_type}),v}if(he(this,Y)||Ne(this,Y,new Set(this._def.values)),!he(this,Y).has(e.data)){const t=this._getOrReturnCtx(e),s=this._def.values;return u(t,{received:t.data,code:d.invalid_enum_value,options:s}),v}return w(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return M.create(e,{...this._def,...t})}exclude(e,t=this._def){return M.create(this.options.filter(s=>!e.includes(s)),{...this._def,...t})}}Y=new WeakMap;M.create=je;class ae extends _{constructor(){super(...arguments),H.set(this,void 0)}_parse(e){const t=g.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==f.string&&s.parsedType!==f.number){const n=g.objectValues(t);return u(s,{expected:g.joinValues(n),received:s.parsedType,code:d.invalid_type}),v}if(he(this,H)||Ne(this,H,new Set(g.getValidEnumValues(this._def.values))),!he(this,H).has(e.data)){const n=g.objectValues(t);return u(s,{received:s.data,code:d.invalid_enum_value,options:n}),v}return w(e.data)}get enum(){return this._def.values}}H=new WeakMap;ae.create=(r,e)=>new ae({values:r,typeName:m.ZodNativeEnum,...y(e)});class J extends _{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.promise&&t.common.async===!1)return u(t,{code:d.invalid_type,expected:f.promise,received:t.parsedType}),v;const s=t.parsedType===f.promise?t.data:Promise.resolve(t.data);return w(s.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}J.create=(r,e)=>new J({type:r,typeName:m.ZodPromise,...y(e)});class S extends _{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===m.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:i=>{u(s,i),i.fatal?t.abort():t.dirty()},get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){const i=n.transform(s.data,a);if(s.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return v;const l=await this._def.schema._parseAsync({data:o,path:s.path,parent:s});return l.status==="aborted"?v:l.status==="dirty"||t.value==="dirty"?B(l.value):l});{if(t.value==="aborted")return v;const o=this._def.schema._parseSync({data:i,path:s.path,parent:s});return o.status==="aborted"?v:o.status==="dirty"||t.value==="dirty"?B(o.value):o}}if(n.type==="refinement"){const i=o=>{const l=n.refinement(o,a);if(s.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(s.common.async===!1){const o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?v:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>o.status==="aborted"?v:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(s.common.async===!1){const i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!z(i))return i;const o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>z(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):i);g.assertNever(n)}}S.create=(r,e,t)=>new S({schema:r,typeName:m.ZodEffects,effect:e,...y(t)});S.createWithPreprocess=(r,e,t)=>new S({schema:e,effect:{type:"preprocess",transform:r},typeName:m.ZodEffects,...y(t)});class A extends _{_parse(e){return this._getType(e)===f.undefined?w(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}A.create=(r,e)=>new A({innerType:r,typeName:m.ZodOptional,...y(e)});class P extends _{_parse(e){return this._getType(e)===f.null?w(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}P.create=(r,e)=>new P({innerType:r,typeName:m.ZodNullable,...y(e)});class ie extends _{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===f.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ie.create=(r,e)=>new ie({innerType:r,typeName:m.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...y(e)});class oe extends _{_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return G(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new T(s.common.issues)},input:s.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new T(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}oe.create=(r,e)=>new oe({innerType:r,typeName:m.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...y(e)});class ye extends _{_parse(e){if(this._getType(e)!==f.nan){const s=this._getOrReturnCtx(e);return u(s,{code:d.invalid_type,expected:f.nan,received:s.parsedType}),v}return{status:"valid",value:e.data}}}ye.create=r=>new ye({typeName:m.ZodNaN,...y(r)});const ct=Symbol("zod_brand");class Ze extends _{_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}}class ce extends _{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?v:a.status==="dirty"?(t.dirty(),B(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})})();{const n=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?v:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:s.path,parent:s})}}static create(e,t){return new ce({in:e,out:t,typeName:m.ZodPipeline})}}class de extends _{_parse(e){const t=this._def.innerType._parse(e),s=n=>(z(n)&&(n.value=Object.freeze(n.value)),n);return G(t)?t.then(n=>s(n)):s(t)}unwrap(){return this._def.innerType}}de.create=(r,e)=>new de({innerType:r,typeName:m.ZodReadonly,...y(e)});function Se(r,e){const t=typeof r=="function"?r(e):typeof r=="string"?{message:r}:r;return typeof t=="string"?{message:t}:t}function $e(r,e={},t){return r?q.create().superRefine((s,n)=>{var a,i;const o=r(s);if(o instanceof Promise)return o.then(l=>{var c,p;if(!l){const b=Se(e,s),ue=(p=(c=b.fatal)!==null&&c!==void 0?c:t)!==null&&p!==void 0?p:!0;n.addIssue({code:"custom",...b,fatal:ue})}});if(!o){const l=Se(e,s),c=(i=(a=l.fatal)!==null&&a!==void 0?a:t)!==null&&i!==void 0?i:!0;n.addIssue({code:"custom",...l,fatal:c})}}):q.create()}const ut={object:x.lazycreate};var m;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(m||(m={}));const lt=(r,e={message:`Input not instance of ${r.name}`})=>$e(t=>t instanceof r,e),Me=Z.create,Pe=j.create,ft=ye.create,ht=$.create,Ve=Q.create,pt=D.create,mt=pe.create,vt=X.create,yt=K.create,_t=q.create,gt=V.create,xt=I.create,kt=me.create,bt=C.create,wt=x.create,Tt=x.strictCreate,Zt=ee.create,Ct=_e.create,St=te.create,At=N.create,Ot=re.create,Nt=ve.create,Et=L.create,Rt=F.create,It=se.create,jt=ne.create,$t=M.create,Mt=ae.create,Pt=J.create,Ae=S.create,Vt=A.create,zt=P.create,Dt=S.createWithPreprocess,Lt=ce.create,Ut=()=>Me().optional(),Bt=()=>Pe().optional(),Ft=()=>Ve().optional(),Wt={string:r=>Z.create({...r,coerce:!0}),number:r=>j.create({...r,coerce:!0}),boolean:r=>Q.create({...r,coerce:!0}),bigint:r=>$.create({...r,coerce:!0}),date:r=>D.create({...r,coerce:!0})},qt=v;var Jt=Object.freeze({__proto__:null,defaultErrorMap:W,setErrorMap:De,getErrorMap:le,makeIssue:fe,EMPTY_PATH:Le,addIssueToContext:u,ParseStatus:k,INVALID:v,DIRTY:B,OK:w,isAborted:be,isDirty:we,isValid:z,isAsync:G,get util(){return g},get objectUtil(){return ke},ZodParsedType:f,getParsedType:R,ZodType:_,datetimeRegex:Ie,ZodString:Z,ZodNumber:j,ZodBigInt:$,ZodBoolean:Q,ZodDate:D,ZodSymbol:pe,ZodUndefined:X,ZodNull:K,ZodAny:q,ZodUnknown:V,ZodNever:I,ZodVoid:me,ZodArray:C,ZodObject:x,ZodUnion:ee,ZodDiscriminatedUnion:_e,ZodIntersection:te,ZodTuple:N,ZodRecord:re,ZodMap:ve,ZodSet:L,ZodFunction:F,ZodLazy:se,ZodLiteral:ne,ZodEnum:M,ZodNativeEnum:ae,ZodPromise:J,ZodEffects:S,ZodTransformer:S,ZodOptional:A,ZodNullable:P,ZodDefault:ie,ZodCatch:oe,ZodNaN:ye,BRAND:ct,ZodBranded:Ze,ZodPipeline:ce,ZodReadonly:de,custom:$e,Schema:_,ZodSchema:_,late:ut,get ZodFirstPartyTypeKind(){return m},coerce:Wt,any:_t,array:bt,bigint:ht,boolean:Ve,date:pt,discriminatedUnion:Ct,effect:Ae,enum:$t,function:Rt,instanceof:lt,intersection:St,lazy:It,literal:jt,map:Nt,nan:ft,nativeEnum:Mt,never:xt,null:yt,nullable:zt,number:Pe,object:wt,oboolean:Ft,onumber:Bt,optional:Vt,ostring:Ut,pipeline:Lt,preprocess:Dt,promise:Pt,record:Ot,set:Et,strictObject:Tt,string:Me,symbol:mt,transformer:Ae,tuple:At,undefined:vt,union:Zt,unknown:gt,void:kt,NEVER:qt,ZodIssueCode:d,quotelessJson:ze,ZodError:T});exports.z=Jt;
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("./index-JDXm3DEz.cjs"),k="1.0.0",E={version:k};class M{constructor(e){this._client=e}async getCurrent(){return(await this._client.request("user.getCurrentAccount",{})).account}}class H{constructor(e){this._client=e}async getAllByMountPoint(e){return(await this._client.request("applications.getByMountPoint",{mountPoint:e})).applications}async getByName(e){return(await this._client.request("applications.getByName",{name:e})).application}async getUrl(e,t){return(await this._client.request("applications.getUrl",{name:e,mountPoint:t})).url}}function A(o,e=console.error){o().catch(e)}class ${constructor(e){this._client=e}async getColorScheme(){return(await this._client.request("environment.getColorScheme",{})).colorScheme}subscribeColorScheme(e){A(async()=>{this._client.on("environment.colorSchemeChanged",e),e(await this.getColorScheme())})}unsubscribeColorScheme(e){this._client.off("environment.colorSchemeChanged",e)}}class q{constructor(e){this._client=e}async queryFolders(e){return(await this._client.request("media.queryMediaFolders",{query:e})).folders}async getFoldersByTag(e){return(await this._client.request("media.getMediaFoldersByTag",{tagName:e})).folders}async getFolderById(e){return(await this._client.request("media.getMediaFolderById",{id:e})).folder}async getMediaContentByFolderId(e){return(await this._client.request("media.getMediaContentByFolderId",{folderId:e})).folders}async getMediaContentById(e){return(await this._client.request("media.getMediaContentById",{id:e})).content}}class C{constructor(e){this._client=e}get application(){return new b("application","",this._client)}get instance(){return new b("instance",this._client._applicationId,this._client)}get device(){return new b("device",this._client._applicationId,this._client)}shared(e){return new b("shared",e,this._client)}}class b{constructor(e,t,s){this._kind=e,this._namespace=t,this._client=s}async set(e,t){return(await this._client.request("store.set",{kind:this._kind,namespace:this._namespace,key:e,value:t})).success}async get(e){return(await this._client.request("store.get",{kind:this._kind,namespace:this._namespace,key:e})).value}async subscribe(e,t){return(await this._client.subscribe("store.subscribe",{kind:this._kind,namespace:this._namespace,key:e},t)).success}async unsubscribe(e,t){return(await this._client.unsubscribe("store.unsubscribe",{kind:this._kind,namespace:this._namespace,key:e},t)).success}async delete(e){return(await this._client.request("store.delete",{kind:this._kind,namespace:this._namespace,key:e})).success}}class P{constructor(e){this._client=e}async getCurrent(){return await this._client.request("user.getCurrentUser",{})}}const T=S.z.object({name:S.z.string(),data:S.z.any()});class F{constructor(e){if(e._client._applicationId!=="rootSettingsNavigation")throw new Error("RootSettingsNavigation can only be used in the rootSettingsNavigation mount point");this._store=e}async setRootSettingsNavigation(e){const t=this._store.shared("root-settings-navigation"),s=await t.get("navigation"),r=this._store._client._applicationId;s[r]={applicationId:r,entries:e.entries},t.set("navigation",s)}async getRootSettingsNavigation(){const t=await this._store.shared("root-settings-navigation").get("navigation"),s=this._store._client._applicationId;return t[s]}async getAllRootSettingsNavigation(){return this._store.shared("root-settings-navigation").get("navigation")}}const m=1e3*30;class B{constructor(e){this._applicationName=e,this._applicationId="",this._onHandlers=new Map,this._onceHandlers=new Map,this._subscriptionNamesByHandler=new Map,this._subscriptionNamesBySubjectName=new Map}get accounts(){return new M(this)}get users(){return new P(this)}get store(){return new C(this)}get applications(){return new H(this)}get media(){return new q(this)}get rootSettingsNavigation(){return new F(this.store)}bind(){var e;const t=new URL(window.location.href).searchParams;this._applicationId=(e=t.get("telemetryApplicationId"))!==null&&e!==void 0?e:"",this._windowMessageHandler=s=>{if(s.source===window)return;for(let a=0;a<window.frames.length;a+=1)window.frames[a].postMessage(s.data,"*");const r=T.safeParse(s.data);if(!r.success)return;const i=r.data,c=this._onHandlers.get(i.name),l=this._onceHandlers.get(i.name);if(c)for(const a of c)a(i.data);if(l){for(const a of l)a(i.data);this._onceHandlers.delete(i.name)}},window.addEventListener("message",this._windowMessageHandler)}unbind(){this._windowMessageHandler&&window.removeEventListener("message",this._windowMessageHandler)}send(e,t){const s={telemetrySdkVersion:_,applicationName:this._applicationName,name:e,data:t};window.parent.postMessage(s,"*")}request(e,t){const s=y(),r={telemetrySdkVersion:_,applicationName:this._applicationName,name:e,data:t,responseName:s};window.parent.postMessage(r,"*");let i=!1,c;const l=new Promise((h,d)=>{const p=new Error(`${e} message request with response name of ${s} timed out after ${m}`);setTimeout(()=>{i=!0,this.off(s,c),d(p)},m)}),a=new Promise(h=>{c=d=>{i||h(d)},this.once(s,h)});return Promise.race([l,a])}async subscribe(e,t,s){let r,i;typeof t=="function"?i=t:(r=t,i=s);const c=y(),l=y();let a=this._subscriptionNamesBySubjectName.get(e);a||(a=[],this._subscriptionNamesBySubjectName.set(e,a)),a.push(c),this._subscriptionNamesByHandler.set(i,c),this.on(c,i);const h={telemetrySdkVersion:_,applicationName:this._applicationName,name:e,data:r,responseName:l,subscriptionName:c};window.parent.postMessage(h,"*");let d=!1,p;const N=new Promise((w,g)=>{const f=new Error(`${e} subscribe request with subscription name of ${c} and response name of ${l} timed out after ${m}`);setTimeout(()=>{d=!0,this.off(l,p),g(f)},m)}),v=new Promise(w=>{p=g=>{d||w(g)},this.on(l,w)});return Promise.race([N,v])}async unsubscribe(e,t,s){let r,i;typeof t=="function"?i=t:(r=t,i=s);const c=y();let l=[];if(i){const a=this._subscriptionNamesByHandler.get(i);if(!a)return{success:!1};l=[a],this._subscriptionNamesByHandler.delete(i)}else if(!this._subscriptionNamesBySubjectName.get(e))return{success:!1};for await(const a of l){this.off(a,i);const h={telemetrySdkVersion:_,applicationName:this._applicationName,name:e,data:r,responseName:c,unsubscribeName:a};window.parent.postMessage(h,"*");let d=!1,p;const N=new Promise((g,f)=>{const I=new Error(`${e} unsubscribe request with unsubscribe name of ${a} and response name of ${c} timed out after ${m}`);setTimeout(()=>{d=!0,this.off(c,p),f(I)},m)}),v=new Promise(g=>{p=f=>{d||g(f)},this.once(c,g)});if(!(await Promise.race([N,v])).success)return{success:!1}}return{success:!0}}on(e,t){var s;const r=(s=this._onHandlers.get(e))!==null&&s!==void 0?s:[];r.length===0&&this._onHandlers.set(e,r),r.push(t)}once(e,t){var s;const r=(s=this._onceHandlers.get(e))!==null&&s!==void 0?s:[];r.length===0&&this._onceHandlers.set(e,r),r.push(t)}off(e,t){const s=this._onHandlers.get(e),r=this._onceHandlers.get(e);if(!(!s&&!r)){if(s){for(let i=0;i<s.length;i+=1)t&&s[i]!==t||(s.splice(i,1),i-=1);s.length===0&&this._onHandlers.delete(e)}if(r){for(let i=0;i<r.length;i+=1)t&&r[i]!==t||(r.splice(i,1),i-=1);r.length===0&&this._onceHandlers.delete(e)}}}}function y(){return Math.random().toString(36).slice(2,9)}const _=E.version;let n=null;function R(){return n}function j(o){n=new B(o),n.bind()}function U(){n==null||n.unbind(),n=null}function z(...o){return u(n),n.on(...o)}function L(...o){return u(n),n.once(...o)}function V(...o){return u(n),n.off(...o)}function x(...o){return u(n),n.send(...o)}function D(...o){return u(n),n.request(...o)}function K(...o){return u(n),n.subscribe(...o)}function G(...o){return u(n),n.unsubscribe(...o)}function J(){return u(n),n.store}function O(){return u(n),n.applications}function Q(){return u(n),n.media}function W(){return u(n),n.accounts}function X(){return u(n),n.users}function Y(){return u(n),n.rootSettingsNavigation}function u(o){if(!o)throw new Error("SDK is not configured")}exports.Accounts=M;exports.Applications=H;exports.Client=B;exports.Environment=$;exports.Media=q;exports.Store=C;exports.Users=P;exports.accounts=W;exports.applications=O;exports.configure=j;exports.destroy=U;exports.globalClient=R;exports.media=Q;exports.off=V;exports.on=z;exports.once=L;exports.request=D;exports.rootSettingsNavigation=Y;exports.send=x;exports.store=J;exports.subscribe=K;exports.telemetrySdkVersion=_;exports.unsubscribe=G;exports.users=X;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
export { Accounts } from './accounts.js';
|
|
2
|
+
export { Applications } from './applications.js';
|
|
3
|
+
export { Environment } from './environment.js';
|
|
4
|
+
export { Media } from './media.js';
|
|
5
|
+
export { Store } from './store.js';
|
|
6
|
+
export { Users } from './users.js';
|
|
7
|
+
import { Client } from './client.js';
|
|
8
|
+
export { Client, type SubscriptionResult, type MessageHandler } from './client.js';
|
|
9
|
+
/**
|
|
10
|
+
* The current version of the TelemetryOS SDK.
|
|
11
|
+
*
|
|
12
|
+
* This version string is included in messages sent to the TelemetryOS platform
|
|
13
|
+
* for version verification and compatibility checks.
|
|
14
|
+
*/
|
|
15
|
+
export declare const telemetrySdkVersion: string;
|
|
16
|
+
/**
|
|
17
|
+
* Returns the global client instance used by the convenience functions in this package.
|
|
18
|
+
*
|
|
19
|
+
* This function provides direct access to the underlying Client instance that powers
|
|
20
|
+
* all the exported convenience functions (send, request, store, etc.). Most applications
|
|
21
|
+
* should use the convenience functions rather than accessing the client directly.
|
|
22
|
+
*
|
|
23
|
+
* Advanced use cases might require direct access to the client, such as extending
|
|
24
|
+
* the SDK's functionality or managing multiple client instances.
|
|
25
|
+
*
|
|
26
|
+
* @returns The global client instance, or null if configure() hasn't been called yet
|
|
27
|
+
*/
|
|
28
|
+
export declare function globalClient(): Client | null;
|
|
29
|
+
/**
|
|
30
|
+
* Configures the SDK by initializing the global client instance.
|
|
31
|
+
*
|
|
32
|
+
* This function must be called before using any other exported functions that depend on the global client.
|
|
33
|
+
* The exported convenience functions (send, request, store, etc.) use this global instance internally,
|
|
34
|
+
* simplifying integration for applications that don't require multiple client instances.
|
|
35
|
+
*
|
|
36
|
+
* @param applicationName The name of your application - must match the 'name' property in your application's telemetry.config.json file
|
|
37
|
+
*/
|
|
38
|
+
export declare function configure(applicationName: string): void;
|
|
39
|
+
/**
|
|
40
|
+
* Destroys the SDK by unbinding event listeners and clearing the global client instance.
|
|
41
|
+
*
|
|
42
|
+
* This function is useful when you need to clean up resources or prepare to unload
|
|
43
|
+
* the SDK from the page. It ensures proper cleanup of event listeners to prevent memory leaks.
|
|
44
|
+
*/
|
|
45
|
+
export declare function destroy(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Registers a handler function for a specific message type from the TelemetryOS platform.
|
|
48
|
+
*
|
|
49
|
+
* The handler will be called each time a message with the specified name is received.
|
|
50
|
+
* You can register multiple handlers for the same message type, and all will be executed
|
|
51
|
+
* when that message is received.
|
|
52
|
+
*
|
|
53
|
+
* NOTE: Most application developers should use resource-specific APIs instead of
|
|
54
|
+
* using raw message handlers through on(), send(), request(), etc.
|
|
55
|
+
*
|
|
56
|
+
* @param name The name of the message type to listen for
|
|
57
|
+
* @param handler The callback function to execute when messages are received
|
|
58
|
+
* @throws {Error} If called before configure() or after destroy()
|
|
59
|
+
*/
|
|
60
|
+
export declare function on(...args: Parameters<Client['on']>): void;
|
|
61
|
+
/**
|
|
62
|
+
* Registers a one-time handler for a specific message type.
|
|
63
|
+
*
|
|
64
|
+
* Similar to the `on` function, but the handler will be automatically removed after it
|
|
65
|
+
* is called once. This is useful for initialization events or operations that should
|
|
66
|
+
* only happen once in response to a particular message.
|
|
67
|
+
*
|
|
68
|
+
* NOTE: Most application developers should use resource-specific APIs instead of
|
|
69
|
+
* using raw message handlers through on(), send(), request(), etc.
|
|
70
|
+
*
|
|
71
|
+
* @param name The name of the message type to listen for
|
|
72
|
+
* @param handler The callback function to execute when the message is received
|
|
73
|
+
* @throws {Error} If called before configure() or after destroy()
|
|
74
|
+
*/
|
|
75
|
+
export declare function once(...args: Parameters<Client['once']>): void;
|
|
76
|
+
/**
|
|
77
|
+
* Removes previously registered message handlers.
|
|
78
|
+
*
|
|
79
|
+
* Use this function to stop receiving messages of a specific type or to remove
|
|
80
|
+
* specific handler functions when they're no longer needed.
|
|
81
|
+
*
|
|
82
|
+
* NOTE: Most application developers should use resource-specific APIs instead of
|
|
83
|
+
* using raw message handlers through on(), send(), request(), etc.
|
|
84
|
+
*
|
|
85
|
+
* @param name The name of the message type to stop listening for
|
|
86
|
+
* @param handler Optional. The specific handler function to remove. If omitted, all handlers for this message type will be removed.
|
|
87
|
+
* @throws {Error} If called before configure() or after destroy()
|
|
88
|
+
*/
|
|
89
|
+
export declare function off(...args: Parameters<Client['off']>): void;
|
|
90
|
+
/**
|
|
91
|
+
* Sends a one-way message to the TelemetryOS platform.
|
|
92
|
+
*
|
|
93
|
+
* Use this function for fire-and-forget messages where no response is expected.
|
|
94
|
+
* The message is sent to the parent window using the postMessage API.
|
|
95
|
+
*
|
|
96
|
+
* NOTE: Most application developers should use resource-specific APIs instead of
|
|
97
|
+
* using raw message handlers through on(), send(), request(), etc.
|
|
98
|
+
*
|
|
99
|
+
* @param name The name of the message type to send
|
|
100
|
+
* @param data The data payload to include with the message
|
|
101
|
+
* @throws {Error} If called before configure() or after destroy()
|
|
102
|
+
*/
|
|
103
|
+
export declare function send(...args: Parameters<Client['send']>): void;
|
|
104
|
+
/**
|
|
105
|
+
* Sends a message to the TelemetryOS platform and waits for a response.
|
|
106
|
+
*
|
|
107
|
+
* This implements a request-response pattern over the postMessage API. It generates
|
|
108
|
+
* a unique correlation ID and sets up a listener for the response. If no response is
|
|
109
|
+
* received within the timeout period (30 seconds by default), the promise will reject.
|
|
110
|
+
*
|
|
111
|
+
* NOTE: Most application developers should use resource-specific APIs instead of
|
|
112
|
+
* using raw message handlers through on(), send(), request(), etc.
|
|
113
|
+
*
|
|
114
|
+
* @param name The name of the message type (endpoint) to request
|
|
115
|
+
* @param data The data payload to include with the request
|
|
116
|
+
* @returns A promise that resolves with the response data when received
|
|
117
|
+
* @throws {Error} If the request times out
|
|
118
|
+
* @throws {Error} If called before configure() or after destroy()
|
|
119
|
+
*/
|
|
120
|
+
export declare function request(...args: Parameters<Client['request']>): Promise<unknown>;
|
|
121
|
+
/**
|
|
122
|
+
* Sets up a persistent subscription to messages from the TelemetryOS platform.
|
|
123
|
+
*
|
|
124
|
+
* This function sends an initial subscription message and registers a handler for
|
|
125
|
+
* a specific message type. The handler will be called each time a message with the
|
|
126
|
+
* matching subscription name is received. Unlike the regular `on()` method, this
|
|
127
|
+
* establishes a formal subscription that can be managed with `unsubscribe()`.
|
|
128
|
+
*
|
|
129
|
+
* NOTE: Most application developers should use resource-specific APIs instead of
|
|
130
|
+
* using raw message handlers through on(), send(), request(), etc.
|
|
131
|
+
*
|
|
132
|
+
* @param name The name of the subscription endpoint
|
|
133
|
+
* @param key An identifier or parameters for what you're subscribing to
|
|
134
|
+
* @param handler The callback function that will be invoked when messages are received
|
|
135
|
+
* @returns A promise that resolves with the subscription result ({success: boolean})
|
|
136
|
+
* @throws {Error} If the subscription request times out
|
|
137
|
+
* @throws {Error} If called before configure() or after destroy()
|
|
138
|
+
*/
|
|
139
|
+
export declare function subscribe(...args: Parameters<Client['subscribe']>): Promise<import("./client.js").SubscriptionResult<void>>;
|
|
140
|
+
/**
|
|
141
|
+
* Cancels a subscription previously created with subscribe().
|
|
142
|
+
*
|
|
143
|
+
* This function removes a subscription and stops the handler from receiving messages.
|
|
144
|
+
* It sends an unsubscribe message to the platform to clean up server-side resources
|
|
145
|
+
* and removes the local message handler.
|
|
146
|
+
*
|
|
147
|
+
* NOTE: Most application developers should use resource-specific APIs instead of
|
|
148
|
+
* using raw message handlers through on(), send(), request(), etc.
|
|
149
|
+
*
|
|
150
|
+
* @param name The name of the subscription endpoint (same as used in subscribe)
|
|
151
|
+
* @param key The identifier or parameters for the subscription to cancel
|
|
152
|
+
* @param handler Optional. The specific handler to unsubscribe. If omitted, all handlers for this key will be unsubscribed.
|
|
153
|
+
* @returns A promise that resolves with the unsubscription result ({success: boolean})
|
|
154
|
+
* @throws {Error} If the unsubscription request times out
|
|
155
|
+
* @throws {Error} If called before configure() or after destroy()
|
|
156
|
+
*/
|
|
157
|
+
export declare function unsubscribe(...args: Parameters<Client['unsubscribe']>): Promise<import("./client.js").SubscriptionResult<void>>;
|
|
158
|
+
/**
|
|
159
|
+
* Provides access to the data storage API with multiple persistence scopes.
|
|
160
|
+
*
|
|
161
|
+
* The store API allows you to save, retrieve, and subscribe to data changes. It offers
|
|
162
|
+
* four different storage scopes for different persistence needs:
|
|
163
|
+
*
|
|
164
|
+
* - global: Data shared across all instances of this application within an account
|
|
165
|
+
* - local: Data specific to the current instance of this application
|
|
166
|
+
* - deviceLocal: Data available only on the current device
|
|
167
|
+
* - shared: Data shared between different applications through a common namespace
|
|
168
|
+
*
|
|
169
|
+
* Applications should generally use subscribe() for real-time data access since they may
|
|
170
|
+
* run indefinitely and need to respond to changes. The get() method is provided primarily
|
|
171
|
+
* for ad-hoc or initialization scenarios.
|
|
172
|
+
*
|
|
173
|
+
* @returns The Store API object with access to all storage scopes
|
|
174
|
+
* @throws {Error} If called before configure() or after destroy()
|
|
175
|
+
*/
|
|
176
|
+
export declare function store(): import("./store.js").Store;
|
|
177
|
+
/**
|
|
178
|
+
* Provides access to the applications API for embedding other TelemetryOS applications.
|
|
179
|
+
*
|
|
180
|
+
* This API enables applications to discover and embed other applications within the
|
|
181
|
+
* TelemetryOS ecosystem. It allows querying for applications by name or mount point,
|
|
182
|
+
* and generating URLs that can be used to load applications in iframes.
|
|
183
|
+
*
|
|
184
|
+
* @returns The Applications API object
|
|
185
|
+
* @throws {Error} If called before configure() or after destroy()
|
|
186
|
+
*/
|
|
187
|
+
export declare function applications(): import("./applications.js").Applications;
|
|
188
|
+
/**
|
|
189
|
+
* Provides access to the media API for working with content hosted on the TelemetryOS platform.
|
|
190
|
+
*
|
|
191
|
+
* This API allows applications to browse and access media content uploaded to TelemetryOS.
|
|
192
|
+
* Applications can query media folders, retrieve content metadata, and get access to media files.
|
|
193
|
+
*
|
|
194
|
+
* @returns The Media API object
|
|
195
|
+
* @throws {Error} If called before configure() or after destroy()
|
|
196
|
+
*/
|
|
197
|
+
export declare function media(): import("./media.js").Media;
|
|
198
|
+
/**
|
|
199
|
+
* Provides access to the accounts API for retrieving TelemetryOS account information.
|
|
200
|
+
* @returns The Accounts API object
|
|
201
|
+
* @throws {Error} If called before configure() or after destroy()
|
|
202
|
+
*/
|
|
203
|
+
export declare function accounts(): import("./accounts.js").Accounts;
|
|
204
|
+
/**
|
|
205
|
+
* Provides access to the users API for retrieving TelemetryOS user information.
|
|
206
|
+
* @returns The Users API object
|
|
207
|
+
* @throws {Error} If called before configure() or after destroy()
|
|
208
|
+
*/
|
|
209
|
+
export declare function users(): import("./users.js").Users;
|
|
210
|
+
/**
|
|
211
|
+
* Provides access to the root settings navigation API for TelemetryOS administration UI integration.
|
|
212
|
+
*
|
|
213
|
+
* NOTE: This API is not intended for most application developers. It is specifically designed
|
|
214
|
+
* for root applications that need to integrate with the TelemetryOS administration UI.
|
|
215
|
+
*
|
|
216
|
+
* This API allows root applications to register sidebar navigation entries in the TelemetryOS
|
|
217
|
+
* administration UI. It can only be used by applications that are mounted at the
|
|
218
|
+
* 'rootSettingsNavigation' mount point.
|
|
219
|
+
*
|
|
220
|
+
* @returns The RootSettingsNavigation API object
|
|
221
|
+
* @throws {Error} If called before configure() or after destroy()
|
|
222
|
+
* @throws {Error} If used by an application not mounted at the 'rootSettingsNavigation' mount point
|
|
223
|
+
*/
|
|
224
|
+
export declare function rootSettingsNavigation(): import("./root-settings-navigation.js").RootSettingsNavigation;
|