@perses-dev/histogram-chart-plugin 0.12.0-rc.0 → 0.12.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/__mf/js/{HistogramChart.1d9576d2.js → HistogramChart.e667cd2b.js} +2 -2
- package/__mf/js/async/535.32b814f1.js +1 -0
- package/__mf/js/async/{892.895a9539.js → 892.f82ac287.js} +2 -2
- package/__mf/js/async/__federation_expose_HistogramChart.c1589bb7.js +1 -0
- package/__mf/js/{main.a7f394e2.js → main.ffd61509.js} +2 -2
- package/mf-manifest.json +9 -9
- package/mf-stats.json +9 -9
- package/package.json +4 -4
- package/__mf/js/async/535.3e045ff2.js +0 -1
- package/__mf/js/async/__federation_expose_HistogramChart.106ef17b.js +0 -1
- /package/__mf/js/async/{892.895a9539.js.LICENSE.txt → 892.f82ac287.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.chunk_HistogramChart=self.chunk_HistogramChart||[]).push([["535"],{25706(e,t,a){let r;a.r(t),a.d(t,{ONE_WEEK_IN_MS:()=>v,querySpecSchema:()=>tm,annotationDisplaySchema:()=>tn,buildPanelSpecSchema:()=>ty,resolvePanelRef:()=>j,variableDefinitionSchema:()=>tA,variableTextSchema:()=>tO,isTimeSeriesValueTuple:()=>P,otlpresourcev1:()=>p,parseDurationString:()=>x,isValidQueryPluginType:()=>$,ONE_YEAR_IN_MS:()=>k,DURATION_REGEX:()=>b,createPanelRef:()=>R,getSuggestedStepMs:()=>E,otlpcommonv1:()=>c,variableListSpecSchema:()=>tb,variableDisplaySchema:()=>tk,DEFAULT_ALL_VALUE:()=>"$__all",ONE_HOUR_IN_MS:()=>y,convertTimeToDuration:()=>O,ONE_MINUTE_IN_MS:()=>6e4,intervalToDuration:()=>T,getPanelKeyFromRef:()=>I,isDurationString:()=>w,panelSpecSchema:()=>t_,buildVariableDefinitionSchema:()=>tM,otlptracev1:()=>h,annotationSpecSchema:()=>tu,buildDatasourceSpecSchema:()=>tc,panelDisplaySpec:()=>th,panelDefinitionSchema:()=>tg,buildVariableListSchema:()=>tS,datasourceSpecSchema:()=>to,buildVariableSpecSchema:()=>tC,isAbsoluteTimeRange:()=>C,ONE_SECOND_IN_MS:()=>1e3,displaySchema:()=>tl,variableListSchema:()=>tw,variableTextSpecSchema:()=>tT,isValidTraceId:()=>D,roundStepInterval:()=>N,durationValidationSchema:()=>tp,toAbsoluteTimeRange:()=>A,buildVariableListSpecSchema:()=>tx,buildAnnotationSpecSchema:()=>td,buildPanelDefinitionSchema:()=>tv,isRelativeTimeRange:()=>Z,linkSchema:()=>tf,variableSpecSchema:()=>tZ,formatDuration:()=>S,ONE_DAY_IN_MS:()=>g,pluginSchema:()=>ti});var s,i,n,d,u,l,o,c={};a.r(c);var p={};a.r(p);var h={};a.r(h),a.d(h,{StatusCodeError:()=>V,StatusCodeOk:()=>F,StatusCodeUnset:()=>L});var m=a(12015),f=a(65130),_=a(38086);let y=36e5,g=864e5,v=6048e5,k=31536e6,b=/^(?:(\d+)y)?(?:(\d+)w)?(?:(\d+)d)?(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?(?:(\d+)ms)?$/;function x(e){let t=b.exec(e);if(null===t)throw Error(`Invalid duration string '${e}'`);return{years:parseInt(t[1]??"0"),months:0,weeks:parseInt(t[2]??"0"),days:parseInt(t[3]??"0"),hours:parseInt(t[4]??"0"),minutes:parseInt(t[5]??"0"),seconds:parseInt(t[6]??"0")+parseInt(t[7]??"0")/1e3}}function w(e){return""!==e&&b.test(e)}function S(e){let t=[];if(e.years&&t.push(`${e.years}y`),e.weeks&&t.push(`${e.weeks}w`),e.days&&t.push(`${e.days}d`),e.hours&&t.push(`${e.hours}h`),e.minutes&&t.push(`${e.minutes}m`),e.seconds){let a=Math.trunc(e.seconds);a&&t.push(`${a}s`);let r=Math.round((e.seconds-a)*1e3);r&&t.push(`${r}ms`)}return t.join("")}function T(e){return O(e.end.valueOf()-e.start.valueOf())}function O(e){let t=Math.trunc(e/k);t>0&&(e-=t*k);let a=Math.trunc(e/v);a>0&&(e-=a*v);let r=Math.trunc(e/g);r>0&&(e-=r*g);let s=Math.trunc(e/y);s>0&&(e-=s*y);let i=Math.trunc(e/6e4);return i>0&&(e-=6e4*i),{years:t,months:0,weeks:a,days:r,hours:s,minutes:i,seconds:e/1e3}}function Z(e){return void 0!==e.pastDuration}function C(e){return void 0!==e.start&&void 0!==e.end}function A(e){let t=e.end??new Date;return{start:function(e,t){var a,r,s,i,n;let{years:d=0,months:u=0,weeks:l=0,days:o=0,hours:c=0,minutes:p=0,seconds:h=0}=t,y=(a=u+12*d,r=void 0,s=(0,_.P)(e,-a,r),i=o+7*l,n=void 0,(0,f.f)(s,-i,n));return(0,m.w)(e,y-1e3*(h+60*(p+60*c)))}(t,x(e.pastDuration)),end:t}}let M=[{maxMs:15,roundedStepMs:10,display:"0.01s"},{maxMs:35,roundedStepMs:20,display:"0.02s"},{maxMs:75,roundedStepMs:50,display:"0.05s"},{maxMs:150,roundedStepMs:100,display:"0.1s"},{maxMs:350,roundedStepMs:200,display:"0.2s"},{maxMs:750,roundedStepMs:500,display:"0.5s"},{maxMs:1500,roundedStepMs:1e3,display:"1s"},{maxMs:3500,roundedStepMs:2e3,display:"2s"},{maxMs:7500,roundedStepMs:5e3,display:"5s"},{maxMs:12500,roundedStepMs:1e4,display:"10s"},{maxMs:17500,roundedStepMs:15e3,display:"15s"},{maxMs:25e3,roundedStepMs:2e4,display:"20s"},{maxMs:45e3,roundedStepMs:3e4,display:"30s"},{maxMs:9e4,roundedStepMs:6e4,display:"1m"},{maxMs:21e4,roundedStepMs:12e4,display:"2m"},{maxMs:45e4,roundedStepMs:3e5,display:"5m"},{maxMs:75e4,roundedStepMs:6e5,display:"10m"},{maxMs:75e4,roundedStepMs:9e5,display:"15m"},{maxMs:15e5,roundedStepMs:12e5,display:"20m"},{maxMs:27e5,roundedStepMs:18e5,display:"30m"},{maxMs:54e5,roundedStepMs:36e5,display:"1h"},{maxMs:9e6,roundedStepMs:72e5,display:"2h"},{maxMs:162e5,roundedStepMs:108e5,display:"3h"},{maxMs:324e5,roundedStepMs:216e5,display:"6h"},{maxMs:864e5,roundedStepMs:432e5,display:"12h"},{maxMs:6048e5,roundedStepMs:864e5,display:"1d"},{maxMs:18144e5,roundedStepMs:6048e5,display:"1w"},{maxMs:36288e5,roundedStepMs:2592e6,display:"30d"},{maxMs:63072e6,roundedStepMs:31536e6,display:"1y"}];function N(e){for(let{maxMs:t,roundedStepMs:a}of M)if(e<t)return a;return 15e3}function E(e,t){return N(Math.floor((e.end.valueOf()-e.start.valueOf())/t))}function j(e,t){let a=I(t),r=e.panels[a];if(void 0===r)throw Error(`Could not resolve panels reference ${t.$ref}`);return r}function I(e){return e.$ref.substring(14)}function R(e){return{$ref:`#/spec/panels/${e}`}}function $(e){return["TimeSeriesQuery","TraceQuery","ProfileQuery","LogQuery","AlertsQuery","SilencesQuery"].includes(e)}function P(e){return 2===e.length}function D(e){return/^[0-9a-fA-F]+$/.test(e)}let L="STATUS_CODE_UNSET",F="STATUS_CODE_OK",V="STATUS_CODE_ERROR";(s=d||(d={})).assertEqual=e=>{},s.assertIs=function(e){},s.assertNever=function(e){throw Error()},s.arrayToEnum=e=>{let t={};for(let a of e)t[a]=a;return t},s.getValidEnumValues=e=>{let t=s.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),a={};for(let r of t)a[r]=e[r];return s.objectValues(a)},s.objectValues=e=>s.objectKeys(e).map(function(t){return e[t]}),s.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.push(a);return t},s.find=(e,t)=>{for(let a of e)if(t(a))return a},s.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,s.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},s.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(u||(u={})).mergeShapes=(e,t)=>({...e,...t});let z=d.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),U=e=>{switch(typeof e){case"undefined":return z.undefined;case"string":return z.string;case"number":return Number.isNaN(e)?z.nan:z.number;case"boolean":return z.boolean;case"function":return z.function;case"bigint":return z.bigint;case"symbol":return z.symbol;case"object":if(Array.isArray(e))return z.array;if(null===e)return z.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return z.promise;if("u">typeof Map&&e instanceof Map)return z.map;if("u">typeof Set&&e instanceof Set)return z.set;if("u">typeof Date&&e instanceof Date)return z.date;return z.object;default:return z.unknown}},K=d.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"]);class W extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(e){return e.message},a={_errors:[]},r=e=>{for(let s of e.issues)if("invalid_union"===s.code)s.unionErrors.map(r);else if("invalid_return_type"===s.code)r(s.returnTypeError);else if("invalid_arguments"===s.code)r(s.argumentsError);else if(0===s.path.length)a._errors.push(t(s));else{let e=a,r=0;for(;r<s.path.length;){let a=s.path[r];r===s.path.length-1?(e[a]=e[a]||{_errors:[]},e[a]._errors.push(t(s))):e[a]=e[a]||{_errors:[]},e=e[a],r++}}};return r(this),a}static assert(e){if(!(e instanceof W))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,d.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t={},a=[];for(let r of this.issues)if(r.path.length>0){let a=r.path[0];t[a]=t[a]||[],t[a].push(e(r))}else a.push(e(r));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}W.create=e=>new W(e);let B=(e,t)=>{let a;switch(e.code){case K.invalid_type:a=e.received===z.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case K.invalid_literal:a=`Invalid literal value, expected ${JSON.stringify(e.expected,d.jsonStringifyReplacer)}`;break;case K.unrecognized_keys:a=`Unrecognized key(s) in object: ${d.joinValues(e.keys,", ")}`;break;case K.invalid_union:a="Invalid input";break;case K.invalid_union_discriminator:a=`Invalid discriminator value. Expected ${d.joinValues(e.options)}`;break;case K.invalid_enum_value:a=`Invalid enum value. Expected ${d.joinValues(e.options)}, received '${e.received}'`;break;case K.invalid_arguments:a="Invalid function arguments";break;case K.invalid_return_type:a="Invalid function return type";break;case K.invalid_date:a="Invalid date";break;case K.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(a=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(a=`${a} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?a=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?a=`Invalid input: must end with "${e.validation.endsWith}"`:d.assertNever(e.validation):a="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case K.too_small:a="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type||"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case K.too_big:a="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case K.custom:a="Invalid input";break;case K.invalid_intersection_types:a="Intersection results could not be merged";break;case K.not_multiple_of:a=`Number must be a multiple of ${e.multipleOf}`;break;case K.not_finite:a="Number must be finite";break;default:a=t.defaultError,d.assertNever(e)}return{message:a}};(i=l||(l={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},i.toString=e=>"string"==typeof e?e:e?.message;let q=e=>{let{data:t,path:a,errorMaps:r,issueData:s}=e,i=[...a,...s.path||[]],n={...s,path:i};if(void 0!==s.message)return{...s,path:i,message:s.message};let d="";for(let e of r.filter(e=>!!e).slice().reverse())d=e(n,{data:t,defaultError:d}).message;return{...s,path:i,message:d}};function Q(e,t){let a=q({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,B,void 0].filter(e=>!!e)});e.common.issues.push(a)}class H{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let a=[];for(let r of t){if("aborted"===r.status)return J;"dirty"===r.status&&e.dirty(),a.push(r.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){let a=[];for(let e of t){let t=await e.key,r=await e.value;a.push({key:t,value:r})}return H.mergeObjectSync(e,a)}static mergeObjectSync(e,t){let a={};for(let r of t){let{key:t,value:s}=r;if("aborted"===t.status||"aborted"===s.status)return J;"dirty"===t.status&&e.dirty(),"dirty"===s.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==s.value||r.alwaysSet)&&(a[t.value]=s.value)}return{status:e.value,value:a}}}let J=Object.freeze({status:"aborted"}),Y=e=>({status:"dirty",value:e}),G=e=>({status:"valid",value:e}),X=e=>"u">typeof Promise&&e instanceof Promise;class ee{constructor(e,t,a,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let et=(e,t)=>{if("valid"===t.status)return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new W(e.common.issues);return this._error=t,this._error}}};function ea(e){if(!e)return{};let{errorMap:t,invalid_type_error:a,required_error:r,description:s}=e;if(t&&(a||r))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:s}:{errorMap:(t,s)=>{let{message:i}=e;return"invalid_enum_value"===t.code?{message:i??s.defaultError}:void 0===s.data?{message:i??r??s.defaultError}:"invalid_type"!==t.code?{message:s.defaultError}:{message:i??a??s.defaultError}},description:s}}class er{get description(){return this._def.description}_getType(e){return U(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:U(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new H,ctx:{common:e.parent.common,data:e.data,parsedType:U(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(X(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){let a={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:U(e)},r=this._parseSync({data:e,path:a.path,parent:a});return et(a,r)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:U(e)};if(!this["~standard"].async)try{let a=this._parseSync({data:e,path:[],parent:t});return"valid"===a.status?{value:a.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>"valid"===e.status?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){let a={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:U(e)},r=this._parse({data:e,path:a.path,parent:a});return et(a,await (X(r)?r:Promise.resolve(r)))}refine(e,t){return this._refinement((a,r)=>{let s=e(a),i=()=>r.addIssue({code:K.custom,..."string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(a):t});return"u">typeof Promise&&s instanceof Promise?s.then(e=>!!e||(i(),!1)):!!s||(i(),!1)})}refinement(e,t){return this._refinement((a,r)=>!!e(a)||(r.addIssue("function"==typeof t?t(a,r):t),!1))}_refinement(e){return new eJ({schema:this,typeName:o.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:e=>this["~validate"](e)}}optional(){return eY.create(this,this._def)}nullable(){return eG.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ej.create(this)}promise(){return eH.create(this,this._def)}or(e){return eR.create([this,e],this._def)}and(e){return eD.create(this,e,this._def)}transform(e){return new eJ({...ea(this._def),schema:this,typeName:o.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new eX({...ea(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:o.ZodDefault})}brand(){return new e4({typeName:o.ZodBranded,type:this,...ea(this._def)})}catch(e){return new e0({...ea(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:o.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return e9.create(this,e)}readonly(){return e5.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let es=/^c[^\s-]{8,}$/i,ei=/^[0-9a-z]+$/,en=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ed=/^[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,eu=/^[a-z0-9_-]{21}$/i,el=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,eo=/^[-+]?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)?)??$/,ec=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ep=/^(?:(?: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])$/,eh=/^(?:(?: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])$/,em=/^(([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]))$/,ef=/^(([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])$/,e_=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ey=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,eg="((\\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])))",ev=RegExp(`^${eg}$`);function ek(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);let a=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${a}`}class eb extends er{_parse(e){var t,a,s,i;let n;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==z.string){let t=this._getOrReturnCtx(e);return Q(t,{code:K.invalid_type,expected:z.string,received:t.parsedType}),J}let u=new H;for(let l of this._def.checks)if("min"===l.kind)e.data.length<l.value&&(Q(n=this._getOrReturnCtx(e,n),{code:K.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),u.dirty());else if("max"===l.kind)e.data.length>l.value&&(Q(n=this._getOrReturnCtx(e,n),{code:K.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),u.dirty());else if("length"===l.kind){let t=e.data.length>l.value,a=e.data.length<l.value;(t||a)&&(n=this._getOrReturnCtx(e,n),t?Q(n,{code:K.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):a&&Q(n,{code:K.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),u.dirty())}else if("email"===l.kind)ec.test(e.data)||(Q(n=this._getOrReturnCtx(e,n),{validation:"email",code:K.invalid_string,message:l.message}),u.dirty());else if("emoji"===l.kind)r||(r=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),r.test(e.data)||(Q(n=this._getOrReturnCtx(e,n),{validation:"emoji",code:K.invalid_string,message:l.message}),u.dirty());else if("uuid"===l.kind)ed.test(e.data)||(Q(n=this._getOrReturnCtx(e,n),{validation:"uuid",code:K.invalid_string,message:l.message}),u.dirty());else if("nanoid"===l.kind)eu.test(e.data)||(Q(n=this._getOrReturnCtx(e,n),{validation:"nanoid",code:K.invalid_string,message:l.message}),u.dirty());else if("cuid"===l.kind)es.test(e.data)||(Q(n=this._getOrReturnCtx(e,n),{validation:"cuid",code:K.invalid_string,message:l.message}),u.dirty());else if("cuid2"===l.kind)ei.test(e.data)||(Q(n=this._getOrReturnCtx(e,n),{validation:"cuid2",code:K.invalid_string,message:l.message}),u.dirty());else if("ulid"===l.kind)en.test(e.data)||(Q(n=this._getOrReturnCtx(e,n),{validation:"ulid",code:K.invalid_string,message:l.message}),u.dirty());else if("url"===l.kind)try{new URL(e.data)}catch{Q(n=this._getOrReturnCtx(e,n),{validation:"url",code:K.invalid_string,message:l.message}),u.dirty()}else"regex"===l.kind?(l.regex.lastIndex=0,l.regex.test(e.data)||(Q(n=this._getOrReturnCtx(e,n),{validation:"regex",code:K.invalid_string,message:l.message}),u.dirty())):"trim"===l.kind?e.data=e.data.trim():"includes"===l.kind?e.data.includes(l.value,l.position)||(Q(n=this._getOrReturnCtx(e,n),{code:K.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),u.dirty()):"toLowerCase"===l.kind?e.data=e.data.toLowerCase():"toUpperCase"===l.kind?e.data=e.data.toUpperCase():"startsWith"===l.kind?e.data.startsWith(l.value)||(Q(n=this._getOrReturnCtx(e,n),{code:K.invalid_string,validation:{startsWith:l.value},message:l.message}),u.dirty()):"endsWith"===l.kind?e.data.endsWith(l.value)||(Q(n=this._getOrReturnCtx(e,n),{code:K.invalid_string,validation:{endsWith:l.value},message:l.message}),u.dirty()):"datetime"===l.kind?(function(e){let t=`${eg}T${ek(e)}`,a=[];return a.push(e.local?"Z?":"Z"),e.offset&&a.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${a.join("|")})`,RegExp(`^${t}$`)})(l).test(e.data)||(Q(n=this._getOrReturnCtx(e,n),{code:K.invalid_string,validation:"datetime",message:l.message}),u.dirty()):"date"===l.kind?ev.test(e.data)||(Q(n=this._getOrReturnCtx(e,n),{code:K.invalid_string,validation:"date",message:l.message}),u.dirty()):"time"===l.kind?RegExp(`^${ek(l)}$`).test(e.data)||(Q(n=this._getOrReturnCtx(e,n),{code:K.invalid_string,validation:"time",message:l.message}),u.dirty()):"duration"===l.kind?eo.test(e.data)||(Q(n=this._getOrReturnCtx(e,n),{validation:"duration",code:K.invalid_string,message:l.message}),u.dirty()):"ip"===l.kind?(t=e.data,!(("v4"===(a=l.version)||!a)&&ep.test(t)||("v6"===a||!a)&&em.test(t))&&1&&(Q(n=this._getOrReturnCtx(e,n),{validation:"ip",code:K.invalid_string,message:l.message}),u.dirty())):"jwt"===l.kind?!function(e,t){if(!el.test(e))return!1;try{let[a]=e.split(".");if(!a)return!1;let r=a.replace(/-/g,"+").replace(/_/g,"/").padEnd(a.length+(4-a.length%4)%4,"="),s=JSON.parse(atob(r));if("object"!=typeof s||null===s||"typ"in s&&s?.typ!=="JWT"||!s.alg||t&&s.alg!==t)return!1;return!0}catch{return!1}}(e.data,l.alg)&&(Q(n=this._getOrReturnCtx(e,n),{validation:"jwt",code:K.invalid_string,message:l.message}),u.dirty()):"cidr"===l.kind?(s=e.data,!(("v4"===(i=l.version)||!i)&&eh.test(s)||("v6"===i||!i)&&ef.test(s))&&1&&(Q(n=this._getOrReturnCtx(e,n),{validation:"cidr",code:K.invalid_string,message:l.message}),u.dirty())):"base64"===l.kind?e_.test(e.data)||(Q(n=this._getOrReturnCtx(e,n),{validation:"base64",code:K.invalid_string,message:l.message}),u.dirty()):"base64url"===l.kind?ey.test(e.data)||(Q(n=this._getOrReturnCtx(e,n),{validation:"base64url",code:K.invalid_string,message:l.message}),u.dirty()):d.assertNever(l);return{status:u.value,value:e.data}}_regex(e,t,a){return this.refinement(t=>e.test(t),{validation:t,code:K.invalid_string,...l.errToObj(a)})}_addCheck(e){return new eb({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...l.errToObj(e)})}url(e){return this._addCheck({kind:"url",...l.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...l.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...l.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...l.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...l.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...l.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...l.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...l.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...l.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...l.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...l.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...l.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...l.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...l.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...l.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...l.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...l.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...l.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...l.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...l.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...l.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...l.errToObj(t)})}nonempty(e){return this.min(1,l.errToObj(e))}trim(){return new eb({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new eb({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new eb({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}eb.create=e=>new eb({checks:[],typeName:o.ZodString,coerce:e?.coerce??!1,...ea(e)});class ex extends er{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==z.number){let t=this._getOrReturnCtx(e);return Q(t,{code:K.invalid_type,expected:z.number,received:t.parsedType}),J}let a=new H;for(let r of this._def.checks)"int"===r.kind?d.isInteger(e.data)||(Q(t=this._getOrReturnCtx(e,t),{code:K.invalid_type,expected:"integer",received:"float",message:r.message}),a.dirty()):"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(Q(t=this._getOrReturnCtx(e,t),{code:K.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),a.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(Q(t=this._getOrReturnCtx(e,t),{code:K.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),a.dirty()):"multipleOf"===r.kind?0!==function(e,t){let a=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=a>r?a:r;return Number.parseInt(e.toFixed(s).replace(".",""))%Number.parseInt(t.toFixed(s).replace(".",""))/10**s}(e.data,r.value)&&(Q(t=this._getOrReturnCtx(e,t),{code:K.not_multiple_of,multipleOf:r.value,message:r.message}),a.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(Q(t=this._getOrReturnCtx(e,t),{code:K.not_finite,message:r.message}),a.dirty()):d.assertNever(r);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,a,r){return new ex({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:l.toString(r)}]})}_addCheck(e){return new ex({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:l.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:l.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:l.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:l.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&d.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let a of this._def.checks)if("finite"===a.kind||"int"===a.kind||"multipleOf"===a.kind)return!0;else"min"===a.kind?(null===t||a.value>t)&&(t=a.value):"max"===a.kind&&(null===e||a.value<e)&&(e=a.value);return Number.isFinite(t)&&Number.isFinite(e)}}ex.create=e=>new ex({checks:[],typeName:o.ZodNumber,coerce:e?.coerce||!1,...ea(e)});class ew extends er{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==z.bigint)return this._getInvalidInput(e);let a=new H;for(let r of this._def.checks)"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(Q(t=this._getOrReturnCtx(e,t),{code:K.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),a.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(Q(t=this._getOrReturnCtx(e,t),{code:K.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),a.dirty()):"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(Q(t=this._getOrReturnCtx(e,t),{code:K.not_multiple_of,multipleOf:r.value,message:r.message}),a.dirty()):d.assertNever(r);return{status:a.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return Q(t,{code:K.invalid_type,expected:z.bigint,received:t.parsedType}),J}gte(e,t){return this.setLimit("min",e,!0,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,a,r){return new ew({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:l.toString(r)}]})}_addCheck(e){return new ew({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}ew.create=e=>new ew({checks:[],typeName:o.ZodBigInt,coerce:e?.coerce??!1,...ea(e)});class eS extends er{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==z.boolean){let t=this._getOrReturnCtx(e);return Q(t,{code:K.invalid_type,expected:z.boolean,received:t.parsedType}),J}return G(e.data)}}eS.create=e=>new eS({typeName:o.ZodBoolean,coerce:e?.coerce||!1,...ea(e)});class eT extends er{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==z.date){let t=this._getOrReturnCtx(e);return Q(t,{code:K.invalid_type,expected:z.date,received:t.parsedType}),J}if(Number.isNaN(e.data.getTime()))return Q(this._getOrReturnCtx(e),{code:K.invalid_date}),J;let a=new H;for(let r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(Q(t=this._getOrReturnCtx(e,t),{code:K.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),a.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(Q(t=this._getOrReturnCtx(e,t),{code:K.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),a.dirty()):d.assertNever(r);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new eT({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:l.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:l.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}eT.create=e=>new eT({checks:[],coerce:e?.coerce||!1,typeName:o.ZodDate,...ea(e)});class eO extends er{_parse(e){if(this._getType(e)!==z.symbol){let t=this._getOrReturnCtx(e);return Q(t,{code:K.invalid_type,expected:z.symbol,received:t.parsedType}),J}return G(e.data)}}eO.create=e=>new eO({typeName:o.ZodSymbol,...ea(e)});class eZ extends er{_parse(e){if(this._getType(e)!==z.undefined){let t=this._getOrReturnCtx(e);return Q(t,{code:K.invalid_type,expected:z.undefined,received:t.parsedType}),J}return G(e.data)}}eZ.create=e=>new eZ({typeName:o.ZodUndefined,...ea(e)});class eC extends er{_parse(e){if(this._getType(e)!==z.null){let t=this._getOrReturnCtx(e);return Q(t,{code:K.invalid_type,expected:z.null,received:t.parsedType}),J}return G(e.data)}}eC.create=e=>new eC({typeName:o.ZodNull,...ea(e)});class eA extends er{constructor(){super(...arguments),this._any=!0}_parse(e){return G(e.data)}}eA.create=e=>new eA({typeName:o.ZodAny,...ea(e)});class eM extends er{constructor(){super(...arguments),this._unknown=!0}_parse(e){return G(e.data)}}eM.create=e=>new eM({typeName:o.ZodUnknown,...ea(e)});class eN extends er{_parse(e){let t=this._getOrReturnCtx(e);return Q(t,{code:K.invalid_type,expected:z.never,received:t.parsedType}),J}}eN.create=e=>new eN({typeName:o.ZodNever,...ea(e)});class eE extends er{_parse(e){if(this._getType(e)!==z.undefined){let t=this._getOrReturnCtx(e);return Q(t,{code:K.invalid_type,expected:z.void,received:t.parsedType}),J}return G(e.data)}}eE.create=e=>new eE({typeName:o.ZodVoid,...ea(e)});class ej extends er{_parse(e){let{ctx:t,status:a}=this._processInputParams(e),r=this._def;if(t.parsedType!==z.array)return Q(t,{code:K.invalid_type,expected:z.array,received:t.parsedType}),J;if(null!==r.exactLength){let e=t.data.length>r.exactLength.value,s=t.data.length<r.exactLength.value;(e||s)&&(Q(t,{code:e?K.too_big:K.too_small,minimum:s?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),a.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(Q(t,{code:K.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),a.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(Q(t,{code:K.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map((e,a)=>r.type._parseAsync(new ee(t,e,t.path,a)))).then(e=>H.mergeArray(a,e));let s=[...t.data].map((e,a)=>r.type._parseSync(new ee(t,e,t.path,a)));return H.mergeArray(a,s)}get element(){return this._def.type}min(e,t){return new ej({...this._def,minLength:{value:e,message:l.toString(t)}})}max(e,t){return new ej({...this._def,maxLength:{value:e,message:l.toString(t)}})}length(e,t){return new ej({...this._def,exactLength:{value:e,message:l.toString(t)}})}nonempty(e){return this.min(1,e)}}ej.create=(e,t)=>new ej({type:e,minLength:null,maxLength:null,exactLength:null,typeName:o.ZodArray,...ea(t)});class eI extends er{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=d.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==z.object){let t=this._getOrReturnCtx(e);return Q(t,{code:K.invalid_type,expected:z.object,received:t.parsedType}),J}let{status:t,ctx:a}=this._processInputParams(e),{shape:r,keys:s}=this._getCached(),i=[];if(!(this._def.catchall instanceof eN&&"strip"===this._def.unknownKeys))for(let e in a.data)s.includes(e)||i.push(e);let n=[];for(let e of s){let t=r[e],s=a.data[e];n.push({key:{status:"valid",value:e},value:t._parse(new ee(a,s,a.path,e)),alwaysSet:e in a.data})}if(this._def.catchall instanceof eN){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of i)n.push({key:{status:"valid",value:e},value:{status:"valid",value:a.data[e]}});else if("strict"===e)i.length>0&&(Q(a,{code:K.unrecognized_keys,keys:i}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of i){let r=a.data[t];n.push({key:{status:"valid",value:t},value:e._parse(new ee(a,r,a.path,t)),alwaysSet:t in a.data})}}return a.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of n){let a=await t.key,r=await t.value;e.push({key:a,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>H.mergeObjectSync(t,e)):H.mergeObjectSync(t,n)}get shape(){return this._def.shape()}strict(e){return l.errToObj,new eI({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,a)=>{let r=this._def.errorMap?.(t,a).message??a.defaultError;return"unrecognized_keys"===t.code?{message:l.errToObj(e).message??r}:{message:r}}}:{}})}strip(){return new eI({...this._def,unknownKeys:"strip"})}passthrough(){return new eI({...this._def,unknownKeys:"passthrough"})}extend(e){return new eI({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new eI({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:o.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new eI({...this._def,catchall:e})}pick(e){let t={};for(let a of d.objectKeys(e))e[a]&&this.shape[a]&&(t[a]=this.shape[a]);return new eI({...this._def,shape:()=>t})}omit(e){let t={};for(let a of d.objectKeys(this.shape))e[a]||(t[a]=this.shape[a]);return new eI({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof eI){let a={};for(let r in t.shape){let s=t.shape[r];a[r]=eY.create(e(s))}return new eI({...t._def,shape:()=>a})}if(t instanceof ej)return new ej({...t._def,type:e(t.element)});if(t instanceof eY)return eY.create(e(t.unwrap()));if(t instanceof eG)return eG.create(e(t.unwrap()));if(t instanceof eL)return eL.create(t.items.map(t=>e(t)));else return t}(this)}partial(e){let t={};for(let a of d.objectKeys(this.shape)){let r=this.shape[a];e&&!e[a]?t[a]=r:t[a]=r.optional()}return new eI({...this._def,shape:()=>t})}required(e){let t={};for(let a of d.objectKeys(this.shape))if(e&&!e[a])t[a]=this.shape[a];else{let e=this.shape[a];for(;e instanceof eY;)e=e._def.innerType;t[a]=e}return new eI({...this._def,shape:()=>t})}keyof(){return eB(d.objectKeys(this.shape))}}eI.create=(e,t)=>new eI({shape:()=>e,unknownKeys:"strip",catchall:eN.create(),typeName:o.ZodObject,...ea(t)}),eI.strictCreate=(e,t)=>new eI({shape:()=>e,unknownKeys:"strict",catchall:eN.create(),typeName:o.ZodObject,...ea(t)}),eI.lazycreate=(e,t)=>new eI({shape:e,unknownKeys:"strip",catchall:eN.create(),typeName:o.ZodObject,...ea(t)});class eR extends er{_parse(e){let{ctx:t}=this._processInputParams(e),a=this._def.options;if(t.common.async)return Promise.all(a.map(async e=>{let a={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:a}),ctx:a}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let a of e)if("dirty"===a.result.status)return t.common.issues.push(...a.ctx.common.issues),a.result;let a=e.map(e=>new W(e.ctx.common.issues));return Q(t,{code:K.invalid_union,unionErrors:a}),J});{let e,r=[];for(let s of a){let a={...t,common:{...t.common,issues:[]},parent:null},i=s._parseSync({data:t.data,path:t.path,parent:a});if("valid"===i.status)return i;"dirty"!==i.status||e||(e={result:i,ctx:a}),a.common.issues.length&&r.push(a.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let s=r.map(e=>new W(e));return Q(t,{code:K.invalid_union,unionErrors:s}),J}}get options(){return this._def.options}}eR.create=(e,t)=>new eR({options:e,typeName:o.ZodUnion,...ea(t)});let e$=e=>{if(e instanceof eK)return e$(e.schema);if(e instanceof eJ)return e$(e.innerType());if(e instanceof eW)return[e.value];if(e instanceof eq)return e.options;if(e instanceof eQ)return d.objectValues(e.enum);else if(e instanceof eX)return e$(e._def.innerType);else if(e instanceof eZ)return[void 0];else if(e instanceof eC)return[null];else if(e instanceof eY)return[void 0,...e$(e.unwrap())];else if(e instanceof eG)return[null,...e$(e.unwrap())];else if(e instanceof e4)return e$(e.unwrap());else if(e instanceof e5)return e$(e.unwrap());else if(e instanceof e0)return e$(e._def.innerType);else return[]};class eP extends er{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==z.object)return Q(t,{code:K.invalid_type,expected:z.object,received:t.parsedType}),J;let a=this.discriminator,r=t.data[a],s=this.optionsMap.get(r);return s?t.common.async?s._parseAsync({data:t.data,path:t.path,parent:t}):s._parseSync({data:t.data,path:t.path,parent:t}):(Q(t,{code:K.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),J)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,a){let r=new Map;for(let a of t){let t=e$(a.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let s of t){if(r.has(s))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);r.set(s,a)}}return new eP({typeName:o.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...ea(a)})}}class eD extends er{_parse(e){let{status:t,ctx:a}=this._processInputParams(e),r=(e,r)=>{if("aborted"===e.status||"aborted"===r.status)return J;let s=function e(t,a){let r=U(t),s=U(a);if(t===a)return{valid:!0,data:t};if(r===z.object&&s===z.object){let r=d.objectKeys(a),s=d.objectKeys(t).filter(e=>-1!==r.indexOf(e)),i={...t,...a};for(let r of s){let s=e(t[r],a[r]);if(!s.valid)return{valid:!1};i[r]=s.data}return{valid:!0,data:i}}if(r===z.array&&s===z.array){if(t.length!==a.length)return{valid:!1};let r=[];for(let s=0;s<t.length;s++){let i=e(t[s],a[s]);if(!i.valid)return{valid:!1};r.push(i.data)}return{valid:!0,data:r}}if(r===z.date&&s===z.date&&+t==+a)return{valid:!0,data:t};return{valid:!1}}(e.value,r.value);return s.valid?(("dirty"===e.status||"dirty"===r.status)&&t.dirty(),{status:t.value,value:s.data}):(Q(a,{code:K.invalid_intersection_types}),J)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}eD.create=(e,t,a)=>new eD({left:e,right:t,typeName:o.ZodIntersection,...ea(a)});class eL extends er{_parse(e){let{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==z.array)return Q(a,{code:K.invalid_type,expected:z.array,received:a.parsedType}),J;if(a.data.length<this._def.items.length)return Q(a,{code:K.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),J;!this._def.rest&&a.data.length>this._def.items.length&&(Q(a,{code:K.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let r=[...a.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new ee(a,e,a.path,t)):null}).filter(e=>!!e);return a.common.async?Promise.all(r).then(e=>H.mergeArray(t,e)):H.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new eL({...this._def,rest:e})}}eL.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new eL({items:e,typeName:o.ZodTuple,rest:null,...ea(t)})};class eF extends er{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==z.object)return Q(a,{code:K.invalid_type,expected:z.object,received:a.parsedType}),J;let r=[],s=this._def.keyType,i=this._def.valueType;for(let e in a.data)r.push({key:s._parse(new ee(a,e,a.path,e)),value:i._parse(new ee(a,a.data[e],a.path,e)),alwaysSet:e in a.data});return a.common.async?H.mergeObjectAsync(t,r):H.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,a){return new eF(t instanceof er?{keyType:e,valueType:t,typeName:o.ZodRecord,...ea(a)}:{keyType:eb.create(),valueType:e,typeName:o.ZodRecord,...ea(t)})}}class eV extends er{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==z.map)return Q(a,{code:K.invalid_type,expected:z.map,received:a.parsedType}),J;let r=this._def.keyType,s=this._def.valueType,i=[...a.data.entries()].map(([e,t],i)=>({key:r._parse(new ee(a,e,a.path,[i,"key"])),value:s._parse(new ee(a,t,a.path,[i,"value"]))}));if(a.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let a of i){let r=await a.key,s=await a.value;if("aborted"===r.status||"aborted"===s.status)return J;("dirty"===r.status||"dirty"===s.status)&&t.dirty(),e.set(r.value,s.value)}return{status:t.value,value:e}})}{let e=new Map;for(let a of i){let r=a.key,s=a.value;if("aborted"===r.status||"aborted"===s.status)return J;("dirty"===r.status||"dirty"===s.status)&&t.dirty(),e.set(r.value,s.value)}return{status:t.value,value:e}}}}eV.create=(e,t,a)=>new eV({valueType:t,keyType:e,typeName:o.ZodMap,...ea(a)});class ez extends er{_parse(e){let{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==z.set)return Q(a,{code:K.invalid_type,expected:z.set,received:a.parsedType}),J;let r=this._def;null!==r.minSize&&a.data.size<r.minSize.value&&(Q(a,{code:K.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&a.data.size>r.maxSize.value&&(Q(a,{code:K.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let s=this._def.valueType;function i(e){let a=new Set;for(let r of e){if("aborted"===r.status)return J;"dirty"===r.status&&t.dirty(),a.add(r.value)}return{status:t.value,value:a}}let n=[...a.data.values()].map((e,t)=>s._parse(new ee(a,e,a.path,t)));return a.common.async?Promise.all(n).then(e=>i(e)):i(n)}min(e,t){return new ez({...this._def,minSize:{value:e,message:l.toString(t)}})}max(e,t){return new ez({...this._def,maxSize:{value:e,message:l.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ez.create=(e,t)=>new ez({valueType:e,minSize:null,maxSize:null,typeName:o.ZodSet,...ea(t)});class eU extends er{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==z.function)return Q(t,{code:K.invalid_type,expected:z.function,received:t.parsedType}),J;function a(e,a){return q({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,B,B].filter(e=>!!e),issueData:{code:K.invalid_arguments,argumentsError:a}})}function r(e,a){return q({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,B,B].filter(e=>!!e),issueData:{code:K.invalid_return_type,returnTypeError:a}})}let s={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof eH){let e=this;return G(async function(...t){let n=new W([]),d=await e._def.args.parseAsync(t,s).catch(e=>{throw n.addIssue(a(t,e)),n}),u=await Reflect.apply(i,this,d);return await e._def.returns._def.type.parseAsync(u,s).catch(e=>{throw n.addIssue(r(u,e)),n})})}{let e=this;return G(function(...t){let n=e._def.args.safeParse(t,s);if(!n.success)throw new W([a(t,n.error)]);let d=Reflect.apply(i,this,n.data),u=e._def.returns.safeParse(d,s);if(!u.success)throw new W([r(d,u.error)]);return u.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new eU({...this._def,args:eL.create(e).rest(eM.create())})}returns(e){return new eU({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,a){return new eU({args:e||eL.create([]).rest(eM.create()),returns:t||eM.create(),typeName:o.ZodFunction,...ea(a)})}}class eK extends er{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}eK.create=(e,t)=>new eK({getter:e,typeName:o.ZodLazy,...ea(t)});class eW extends er{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return Q(t,{received:t.data,code:K.invalid_literal,expected:this._def.value}),J}return{status:"valid",value:e.data}}get value(){return this._def.value}}function eB(e,t){return new eq({values:e,typeName:o.ZodEnum,...ea(t)})}eW.create=(e,t)=>new eW({value:e,typeName:o.ZodLiteral,...ea(t)});class eq extends er{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),a=this._def.values;return Q(t,{expected:d.joinValues(a),received:t.parsedType,code:K.invalid_type}),J}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),a=this._def.values;return Q(t,{received:t.data,code:K.invalid_enum_value,options:a}),J}return G(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return eq.create(e,{...this._def,...t})}exclude(e,t=this._def){return eq.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}eq.create=eB;class eQ extends er{_parse(e){let t=d.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==z.string&&a.parsedType!==z.number){let e=d.objectValues(t);return Q(a,{expected:d.joinValues(e),received:a.parsedType,code:K.invalid_type}),J}if(this._cache||(this._cache=new Set(d.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let e=d.objectValues(t);return Q(a,{received:a.data,code:K.invalid_enum_value,options:e}),J}return G(e.data)}get enum(){return this._def.values}}eQ.create=(e,t)=>new eQ({values:e,typeName:o.ZodNativeEnum,...ea(t)});class eH extends er{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==z.promise&&!1===t.common.async?(Q(t,{code:K.invalid_type,expected:z.promise,received:t.parsedType}),J):G((t.parsedType===z.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}eH.create=(e,t)=>new eH({type:e,typeName:o.ZodPromise,...ea(t)});class eJ extends er{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===o.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:a}=this._processInputParams(e),r=this._def.effect||null,s={addIssue:e=>{Q(a,e),e.fatal?t.abort():t.dirty()},get path(){return a.path}};if(s.addIssue=s.addIssue.bind(s),"preprocess"===r.type){let e=r.transform(a.data,s);if(a.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return J;let r=await this._def.schema._parseAsync({data:e,path:a.path,parent:a});return"aborted"===r.status?J:"dirty"===r.status||"dirty"===t.value?Y(r.value):r});{if("aborted"===t.value)return J;let r=this._def.schema._parseSync({data:e,path:a.path,parent:a});return"aborted"===r.status?J:"dirty"===r.status||"dirty"===t.value?Y(r.value):r}}if("refinement"===r.type){let e=e=>{let t=r.refinement(e,s);if(a.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==a.common.async)return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(a=>"aborted"===a.status?J:("dirty"===a.status&&t.dirty(),e(a.value).then(()=>({status:t.value,value:a.value}))));{let r=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===r.status?J:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}}if("transform"===r.type)if(!1!==a.common.async)return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(e=>"valid"!==e.status?J:Promise.resolve(r.transform(e.value,s)).then(e=>({status:t.value,value:e})));else{let e=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if("valid"!==e.status)return J;let i=r.transform(e.value,s);if(i instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}d.assertNever(r)}}eJ.create=(e,t,a)=>new eJ({schema:e,typeName:o.ZodEffects,effect:t,...ea(a)}),eJ.createWithPreprocess=(e,t,a)=>new eJ({schema:t,effect:{type:"preprocess",transform:e},typeName:o.ZodEffects,...ea(a)});class eY extends er{_parse(e){return this._getType(e)===z.undefined?G(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eY.create=(e,t)=>new eY({innerType:e,typeName:o.ZodOptional,...ea(t)});class eG extends er{_parse(e){return this._getType(e)===z.null?G(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eG.create=(e,t)=>new eG({innerType:e,typeName:o.ZodNullable,...ea(t)});class eX extends er{_parse(e){let{ctx:t}=this._processInputParams(e),a=t.data;return t.parsedType===z.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}eX.create=(e,t)=>new eX({innerType:e,typeName:o.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...ea(t)});class e0 extends er{_parse(e){let{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return X(r)?r.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new W(a.common.issues)},input:a.data})})):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new W(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}e0.create=(e,t)=>new e0({innerType:e,typeName:o.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...ea(t)});class e1 extends er{_parse(e){if(this._getType(e)!==z.nan){let t=this._getOrReturnCtx(e);return Q(t,{code:K.invalid_type,expected:z.nan,received:t.parsedType}),J}return{status:"valid",value:e.data}}}e1.create=e=>new e1({typeName:o.ZodNaN,...ea(e)}),Symbol("zod_brand");class e4 extends er{_parse(e){let{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class e9 extends er{_parse(e){let{status:t,ctx:a}=this._processInputParams(e);if(a.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?J:"dirty"===e.status?(t.dirty(),Y(e.value)):this._def.out._parseAsync({data:e.value,path:a.path,parent:a})})();{let e=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?J:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:a.path,parent:a})}}static create(e,t){return new e9({in:e,out:t,typeName:o.ZodPipeline})}}class e5 extends er{_parse(e){let t=this._def.innerType._parse(e),a=e=>("valid"===e.status&&(e.value=Object.freeze(e.value)),e);return X(t)?t.then(e=>a(e)):a(t)}unwrap(){return this._def.innerType}}e5.create=(e,t)=>new e5({innerType:e,typeName:o.ZodReadonly,...ea(t)}),eI.lazycreate,(n=o||(o={})).ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly";let e2=eb.create;ex.create,e1.create,ew.create;let e3=eS.create;eT.create,eO.create,eZ.create,eC.create;let e6=eA.create;eM.create,eN.create,eE.create;let e8=ej.create,e7=eI.create;eI.strictCreate;let te=eR.create,tt=eP.create;eD.create,eL.create;let ta=eF.create;eV.create,ez.create,eU.create,eK.create;let tr=eW.create,ts=eq.create;eQ.create,eH.create,eJ.create,eY.create,eG.create,eJ.createWithPreprocess,e9.create;let ti=e7({kind:e2().min(1,"Required"),spec:ta(e2(),e6())}),tn=e7({name:e2(),description:e2().optional(),hidden:e3().optional(),color:e2().optional()});function td(e){return e7({display:tn,plugin:e})}let tu=e7({display:tn,plugin:ti}),tl=e7({name:e2().optional(),description:e2().optional()}),to=e7({display:tl.optional(),default:e3(),plugin:ti});function tc(e){return e7({display:tl.optional(),default:e3(),plugin:e})}let tp=e2().min(1,"Required").regex(b,"Must be a valid duration string"),th=e7({name:e2().optional(),description:e2().optional()}),tm=e7({kind:e2().min(1),spec:e7({name:e2().optional(),plugin:ti})}),tf=e7({name:e2().optional(),url:e2().min(1),tooltip:e2().optional(),renderVariables:e3().optional(),targetBlank:e3().optional()}),t_=e7({display:th.optional(),plugin:ti,queries:e8(tm).optional(),links:e8(tf).optional()});function ty(e){return e7({display:th.optional(),plugin:e,queries:e8(tm).optional(),links:e8(tf).optional()})}let tg=e7({kind:tr("Panel"),spec:t_});function tv(e){return e7({kind:tr("Panel"),spec:ty(e)})}let tk=e7({name:e2().optional(),description:e2().optional(),hidden:e3().optional()}),tb=e7({name:e2().min(1),display:tk.optional(),defaultValue:e2().or(e8(e2())).optional(),allowAllValue:e3(),allowMultiple:e3(),customAllValue:e2().optional(),capturingRegexp:e2().optional(),sort:ts(["none","alphabetical-asc","alphabetical-desc","numerical-asc","numerical-desc","alphabetical-ci-asc","alphabetical-ci-desc"]).optional(),plugin:ti});function tx(e){return e7({name:e2().min(1),display:tk.optional(),defaultValue:e2().or(e8(e2())).optional(),allowAllValue:e3(),allowMultiple:e3(),customAllValue:e2().optional(),capturingRegexp:e2().optional(),sort:ts(["none","alphabetical-asc","alphabetical-desc","numerical-asc","numerical-desc","alphabetical-ci-asc","alphabetical-ci-desc"]).optional(),plugin:e})}let tw=e7({kind:tr("ListVariable"),spec:tb});function tS(e){return e7({kind:tr("ListVariable"),spec:tx(e)})}let tT=e7({name:e2().min(1),display:tk.optional(),value:e2(),constant:e3().optional()}),tO=e7({kind:tr("TextVariable"),spec:tT}),tZ=tt("kind",[tO,tw]);function tC(e){return te([tO,tS(e)])}let tA=tZ;function tM(e){return tt("kind",[e7({kind:tr("ListVariable"),spec:tx(e)}),e7({kind:tr("TextVariable"),spec:tT})])}}}]);
|