scordi-extension 1.19.2 → 1.19.3

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.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "../../../../../../../@crx/manifest": {
3
- "file": "assets/crx-manifest.js-CJchIcA5.js",
3
+ "file": "assets/crx-manifest.js-xno-IwCB.js",
4
4
  "name": "crx-manifest.js",
5
5
  "src": "../../../../../../../@crx/manifest",
6
6
  "isEntry": true
7
7
  },
8
- "_CheckStatusBlock-SHS8UE3Y.js": {
9
- "file": "assets/CheckStatusBlock-SHS8UE3Y.js",
8
+ "_CheckStatusBlock-DN-UPTR0.js": {
9
+ "file": "assets/CheckStatusBlock-DN-UPTR0.js",
10
10
  "name": "CheckStatusBlock"
11
11
  },
12
12
  "__commonjsHelpers-Cpj98o6Y.js": {
@@ -20,48 +20,48 @@
20
20
  "__commonjsHelpers-Cpj98o6Y.js"
21
21
  ]
22
22
  },
23
- "_main.tsx-loader-DgRYruti.js": {
24
- "file": "assets/main.tsx-loader-DgRYruti.js",
25
- "src": "_main.tsx-loader-DgRYruti.js"
23
+ "_main.tsx-loader-DELkK-cB.js": {
24
+ "file": "assets/main.tsx-loader-DELkK-cB.js",
25
+ "src": "_main.tsx-loader-DELkK-cB.js"
26
26
  },
27
- "_types-Cg19pcas.js": {
28
- "file": "assets/types-Cg19pcas.js",
27
+ "_types-CVxt4LQP.js": {
28
+ "file": "assets/types-CVxt4LQP.js",
29
29
  "name": "types",
30
30
  "imports": [
31
- "_CheckStatusBlock-SHS8UE3Y.js",
31
+ "_CheckStatusBlock-DN-UPTR0.js",
32
32
  "__commonjsHelpers-Cpj98o6Y.js"
33
33
  ]
34
34
  },
35
35
  "src/background/index.ts": {
36
- "file": "assets/index.ts-DJ5XQ8Ww.js",
36
+ "file": "assets/index.ts-BP5jfbpv.js",
37
37
  "name": "index.ts",
38
38
  "src": "src/background/index.ts",
39
39
  "isEntry": true,
40
40
  "imports": [
41
- "_CheckStatusBlock-SHS8UE3Y.js",
42
- "_types-Cg19pcas.js",
41
+ "_CheckStatusBlock-DN-UPTR0.js",
42
+ "_types-CVxt4LQP.js",
43
43
  "__commonjsHelpers-Cpj98o6Y.js"
44
44
  ]
45
45
  },
46
46
  "src/blocks/index.ts": {
47
- "file": "assets/index-CDFPkq_b.js",
47
+ "file": "assets/index-C0PIM2d6.js",
48
48
  "name": "index",
49
49
  "src": "src/blocks/index.ts",
50
50
  "isDynamicEntry": true,
51
51
  "imports": [
52
- "_types-Cg19pcas.js",
53
- "_CheckStatusBlock-SHS8UE3Y.js",
52
+ "_types-CVxt4LQP.js",
53
+ "_CheckStatusBlock-DN-UPTR0.js",
54
54
  "__commonjsHelpers-Cpj98o6Y.js"
55
55
  ]
56
56
  },
57
57
  "src/content/main.tsx": {
58
- "file": "assets/main.tsx-DuZo_acF.js",
58
+ "file": "assets/main.tsx-8cMDV2RI.js",
59
59
  "name": "main.tsx",
60
60
  "src": "src/content/main.tsx",
61
61
  "isEntry": true,
62
62
  "imports": [
63
63
  "_index-DAApl7DU.js",
64
- "_CheckStatusBlock-SHS8UE3Y.js",
64
+ "_CheckStatusBlock-DN-UPTR0.js",
65
65
  "__commonjsHelpers-Cpj98o6Y.js"
66
66
  ],
67
67
  "dynamicImports": [
@@ -0,0 +1 @@
1
+ function ht(s){return s&&s.isBlock===!0&&s.type==="EXECUTE_BLOCK"}function mt(s){return s&&s.type==="CDP_CLICK"}function pt(s){return s&&s.type==="CDP_KEYPRESS"}function yt(s){return s&&s.type==="CDP_EXECUTE_JAVASCRIPT"}function gt(s){return s&&s.type==="FETCH_API"}function _t(s){return s&&s.type==="EXPORT_DATA"}function vt(s){return s&&s.type==="NETWORK_CATCH"}function kt(s){return s&&s.type==="SHOW_EXECUTION_STATUS"}function xt(s){return s&&s.type==="HIDE_EXECUTION_STATUS"}function wt(s){return s&&s.type==="SHOW_CONFIRMATION"}function bt(s){return s&&s.type==="CLOSE_TAB"}function Tt(s){return s&&s.type==="TRIGGER_CONFIRMATION"}function Ct(s){return s&&s.$isError===!0}var v;(function(s){s.assertEqual=r=>{};function e(r){}s.assertIs=e;function t(r){throw new Error}s.assertNever=t,s.arrayToEnum=r=>{const n={};for(const i of r)n[i]=i;return n},s.getValidEnumValues=r=>{const n=s.objectKeys(r).filter(o=>typeof r[r[o]]!="number"),i={};for(const o of n)i[o]=r[o];return s.objectValues(i)},s.objectValues=r=>s.objectKeys(r).map(function(n){return r[n]}),s.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const n=[];for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&n.push(i);return n},s.find=(r,n)=>{for(const i of r)if(n(i))return i},s.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function a(r,n=" | "){return r.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}s.joinValues=a,s.jsonStringifyReplacer=(r,n)=>typeof n=="bigint"?n.toString():n})(v||(v={}));var Se;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(Se||(Se={}));const l=v.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),M=s=>{switch(typeof s){case"undefined":return l.undefined;case"string":return l.string;case"number":return Number.isNaN(s)?l.nan:l.number;case"boolean":return l.boolean;case"function":return l.function;case"bigint":return l.bigint;case"symbol":return l.symbol;case"object":return Array.isArray(s)?l.array:s===null?l.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?l.promise:typeof Map<"u"&&s instanceof Map?l.map:typeof Set<"u"&&s instanceof Set?l.set:typeof Date<"u"&&s instanceof Date?l.date:l.object;default:return l.unknown}},c=v.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"]),St=s=>JSON.stringify(s,null,2).replace(/"([^"]+)":/g,"$1:");class T extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};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(n){return n.message},a={_errors:[]},r=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(r);else if(i.code==="invalid_return_type")r(i.returnTypeError);else if(i.code==="invalid_arguments")r(i.argumentsError);else if(i.path.length===0)a._errors.push(t(i));else{let o=a,f=0;for(;f<i.path.length;){const u=i.path[f];f===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(t(i))):o[u]=o[u]||{_errors:[]},o=o[u],f++}}};return r(this),a}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,v.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},a=[];for(const r of this.issues)if(r.path.length>0){const n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else a.push(e(r));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}T.create=s=>new T(s);const G=(s,e)=>{let t;switch(s.code){case c.invalid_type:s.received===l.undefined?t="Required":t=`Expected ${s.expected}, received ${s.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(s.expected,v.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${v.joinValues(s.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${v.joinValues(s.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${v.joinValues(s.options)}, received '${s.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(t=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?t=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?t=`Invalid input: must end with "${s.validation.endsWith}"`:v.assertNever(s.validation):s.validation!=="regex"?t=`Invalid ${s.validation}`:t="Invalid";break;case c.too_small:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="bigint"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:t="Invalid input";break;case c.too_big:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?t=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${s.multipleOf}`;break;case c.not_finite:t="Number must be finite";break;default:t=e.defaultError,v.assertNever(s)}return{message:t}};let Re=G;function Et(s){Re=s}function ye(){return Re}const ge=s=>{const{data:e,path:t,errorMaps:a,issueData:r}=s,n=[...t,...r.path||[]],i={...r,path:n};if(r.message!==void 0)return{...r,path:n,message:r.message};let o="";const f=a.filter(u=>!!u).slice().reverse();for(const u of f)o=u(i,{data:e,defaultError:o}).message;return{...r,path:n,message:o}},At=[];function d(s,e){const t=ye(),a=ge({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===G?void 0:G].filter(r=>!!r)});s.common.issues.push(a)}class w{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const r of t){if(r.status==="aborted")return m;r.status==="dirty"&&e.dirty(),a.push(r.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const r of t){const n=await r.key,i=await r.value;a.push({key:n,value:i})}return w.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const r of t){const{key:n,value:i}=r;if(n.status==="aborted"||i.status==="aborted")return m;n.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),n.value!=="__proto__"&&(typeof i.value<"u"||r.alwaysSet)&&(a[n.value]=i.value)}return{status:e.value,value:a}}}const m=Object.freeze({status:"aborted"}),H=s=>({status:"dirty",value:s}),b=s=>({status:"valid",value:s}),Ee=s=>s.status==="aborted",Ae=s=>s.status==="dirty",F=s=>s.status==="valid",ee=s=>typeof Promise<"u"&&s instanceof Promise;var h;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(h||(h={}));class A{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}}const Oe=(s,e)=>{if(F(e))return{success:!0,data:e.value};if(!s.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(s.common.issues);return this._error=t,this._error}}};function g(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:a,description:r}=s;if(e&&(t||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:r}:{errorMap:(i,o)=>{const{message:f}=s;return i.code==="invalid_enum_value"?{message:f??o.defaultError}:typeof o.data>"u"?{message:f??a??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:f??t??o.defaultError}},description:r}}class _{get description(){return this._def.description}_getType(e){return M(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:M(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new w,ctx:{common:e.parent.common,data:e.data,parsedType:M(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(ee(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 a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){const a={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:M(e)},r=this._parseSync({data:e,path:a.path,parent:a});return Oe(a,r)}"~validate"(e){var a,r;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:M(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:t});return F(n)?{value:n.value}:{issues:t.common.issues}}catch(n){(r=(a=n==null?void 0:n.message)==null?void 0:a.toLowerCase())!=null&&r.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(n=>F(n)?{value:n.value}:{issues:t.common.issues})}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={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:M(e)},r=this._parse({data:e,path:a.path,parent:a}),n=await(ee(r)?r:Promise.resolve(r));return Oe(a,n)}refine(e,t){const a=r=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(r):t;return this._refinement((r,n)=>{const i=e(r),o=()=>n.addIssue({code:c.custom,...a(r)});return typeof Promise<"u"&&i instanceof Promise?i.then(f=>f?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((a,r)=>e(a)?!0:(r.addIssue(typeof t=="function"?t(a,r):t),!1))}_refinement(e){return new Z({schema:this,typeName:p.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 I.create(this,this._def)}nullable(){return D.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return E.create(this)}promise(){return Q.create(this,this._def)}or(e){return re.create([this,e],this._def)}and(e){return ne.create(this,e,this._def)}transform(e){return new Z({...g(this._def),schema:this,typeName:p.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new ue({...g(this._def),innerType:this,defaultValue:t,typeName:p.ZodDefault})}brand(){return new $e({typeName:p.ZodBranded,type:this,...g(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new le({...g(this._def),innerType:this,catchValue:t,typeName:p.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return he.create(this,e)}readonly(){return fe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Le=/^c[^\s-]{8,}$/i,Ve=/^[0-9a-z]+$/,De=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ze=/^[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,Ue=/^[a-z0-9_-]{21}$/i,Be=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Fe=/^[-+]?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)?)??$/,qe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,We="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let me;const He=/^(?:(?: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])$/,Je=/^(?:(?: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])$/,Xe=/^(([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]))$/,Ye=/^(([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])$/,Ge=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ke=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ze="((\\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])))",Qe=new RegExp(`^${Ze}$`);function je(s){let e="[0-5]\\d";s.precision?e=`${e}\\.\\d{${s.precision}}`:s.precision==null&&(e=`${e}(\\.\\d+)?`);const t=s.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function et(s){return new RegExp(`^${je(s)}$`)}function tt(s){let e=`${Ze}T${je(s)}`;const t=[];return t.push(s.local?"Z?":"Z"),s.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function st(s,e){return!!((e==="v4"||!e)&&He.test(s)||(e==="v6"||!e)&&Xe.test(s))}function at(s,e){if(!Be.test(s))return!1;try{const[t]=s.split(".");if(!t)return!1;const a=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),r=JSON.parse(atob(a));return!(typeof r!="object"||r===null||"typ"in r&&(r==null?void 0:r.typ)!=="JWT"||!r.alg||e&&r.alg!==e)}catch{return!1}}function rt(s,e){return!!((e==="v4"||!e)&&Je.test(s)||(e==="v6"||!e)&&Ye.test(s))}class S extends _{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==l.string){const n=this._getOrReturnCtx(e);return d(n,{code:c.invalid_type,expected:l.string,received:n.parsedType}),m}const a=new w;let r;for(const n of this._def.checks)if(n.kind==="min")e.data.length<n.value&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),a.dirty());else if(n.kind==="max")e.data.length>n.value&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),a.dirty());else if(n.kind==="length"){const i=e.data.length>n.value,o=e.data.length<n.value;(i||o)&&(r=this._getOrReturnCtx(e,r),i?d(r,{code:c.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):o&&d(r,{code:c.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),a.dirty())}else if(n.kind==="email")qe.test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"email",code:c.invalid_string,message:n.message}),a.dirty());else if(n.kind==="emoji")me||(me=new RegExp(We,"u")),me.test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"emoji",code:c.invalid_string,message:n.message}),a.dirty());else if(n.kind==="uuid")ze.test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"uuid",code:c.invalid_string,message:n.message}),a.dirty());else if(n.kind==="nanoid")Ue.test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"nanoid",code:c.invalid_string,message:n.message}),a.dirty());else if(n.kind==="cuid")Le.test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"cuid",code:c.invalid_string,message:n.message}),a.dirty());else if(n.kind==="cuid2")Ve.test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"cuid2",code:c.invalid_string,message:n.message}),a.dirty());else if(n.kind==="ulid")De.test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"ulid",code:c.invalid_string,message:n.message}),a.dirty());else if(n.kind==="url")try{new URL(e.data)}catch{r=this._getOrReturnCtx(e,r),d(r,{validation:"url",code:c.invalid_string,message:n.message}),a.dirty()}else n.kind==="regex"?(n.regex.lastIndex=0,n.regex.test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"regex",code:c.invalid_string,message:n.message}),a.dirty())):n.kind==="trim"?e.data=e.data.trim():n.kind==="includes"?e.data.includes(n.value,n.position)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),a.dirty()):n.kind==="toLowerCase"?e.data=e.data.toLowerCase():n.kind==="toUpperCase"?e.data=e.data.toUpperCase():n.kind==="startsWith"?e.data.startsWith(n.value)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.invalid_string,validation:{startsWith:n.value},message:n.message}),a.dirty()):n.kind==="endsWith"?e.data.endsWith(n.value)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.invalid_string,validation:{endsWith:n.value},message:n.message}),a.dirty()):n.kind==="datetime"?tt(n).test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.invalid_string,validation:"datetime",message:n.message}),a.dirty()):n.kind==="date"?Qe.test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.invalid_string,validation:"date",message:n.message}),a.dirty()):n.kind==="time"?et(n).test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.invalid_string,validation:"time",message:n.message}),a.dirty()):n.kind==="duration"?Fe.test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"duration",code:c.invalid_string,message:n.message}),a.dirty()):n.kind==="ip"?st(e.data,n.version)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"ip",code:c.invalid_string,message:n.message}),a.dirty()):n.kind==="jwt"?at(e.data,n.alg)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"jwt",code:c.invalid_string,message:n.message}),a.dirty()):n.kind==="cidr"?rt(e.data,n.version)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"cidr",code:c.invalid_string,message:n.message}),a.dirty()):n.kind==="base64"?Ge.test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"base64",code:c.invalid_string,message:n.message}),a.dirty()):n.kind==="base64url"?Ke.test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"base64url",code:c.invalid_string,message:n.message}),a.dirty()):v.assertNever(n);return{status:a.value,value:e.data}}_regex(e,t,a){return this.refinement(r=>e.test(r),{validation:t,code:c.invalid_string,...h.errToObj(a)})}_addCheck(e){return new S({...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){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:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!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 S({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new S({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new S({...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}}S.create=s=>new S({checks:[],typeName:p.ZodString,coerce:(s==null?void 0:s.coerce)??!1,...g(s)});function nt(s,e){const t=(s.toString().split(".")[1]||"").length,a=(e.toString().split(".")[1]||"").length,r=t>a?t:a,n=Number.parseInt(s.toFixed(r).replace(".","")),i=Number.parseInt(e.toFixed(r).replace(".",""));return n%i/10**r}class P 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)!==l.number){const n=this._getOrReturnCtx(e);return d(n,{code:c.invalid_type,expected:l.number,received:n.parsedType}),m}let a;const r=new w;for(const n of this._def.checks)n.kind==="int"?v.isInteger(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{code:c.invalid_type,expected:"integer",received:"float",message:n.message}),r.dirty()):n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(a=this._getOrReturnCtx(e,a),d(a,{code:c.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(a=this._getOrReturnCtx(e,a),d(a,{code:c.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):n.kind==="multipleOf"?nt(e.data,n.value)!==0&&(a=this._getOrReturnCtx(e,a),d(a,{code:c.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{code:c.not_finite,message:n.message}),r.dirty()):v.assertNever(n);return{status:r.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,a,r){return new P({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:h.toString(r)}]})}_addCheck(e){return new P({...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"&&v.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(t===null||a.value>t)&&(t=a.value):a.kind==="max"&&(e===null||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}P.create=s=>new P({checks:[],typeName:p.ZodNumber,coerce:(s==null?void 0:s.coerce)||!1,...g(s)});class L 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)!==l.bigint)return this._getInvalidInput(e);let a;const r=new w;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(a=this._getOrReturnCtx(e,a),d(a,{code:c.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(a=this._getOrReturnCtx(e,a),d(a,{code:c.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(a=this._getOrReturnCtx(e,a),d(a,{code:c.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):v.assertNever(n);return{status:r.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return d(t,{code:c.invalid_type,expected:l.bigint,received:t.parsedType}),m}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,a,r){return new L({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:h.toString(r)}]})}_addCheck(e){return new L({...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}}L.create=s=>new L({checks:[],typeName:p.ZodBigInt,coerce:(s==null?void 0:s.coerce)??!1,...g(s)});class te extends _{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==l.boolean){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:l.boolean,received:a.parsedType}),m}return b(e.data)}}te.create=s=>new te({typeName:p.ZodBoolean,coerce:(s==null?void 0:s.coerce)||!1,...g(s)});class q extends _{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==l.date){const n=this._getOrReturnCtx(e);return d(n,{code:c.invalid_type,expected:l.date,received:n.parsedType}),m}if(Number.isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return d(n,{code:c.invalid_date}),m}const a=new w;let r;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()<n.value&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),a.dirty()):n.kind==="max"?e.data.getTime()>n.value&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),a.dirty()):v.assertNever(n);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new q({...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}}q.create=s=>new q({checks:[],coerce:(s==null?void 0:s.coerce)||!1,typeName:p.ZodDate,...g(s)});class _e extends _{_parse(e){if(this._getType(e)!==l.symbol){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:l.symbol,received:a.parsedType}),m}return b(e.data)}}_e.create=s=>new _e({typeName:p.ZodSymbol,...g(s)});class se extends _{_parse(e){if(this._getType(e)!==l.undefined){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:l.undefined,received:a.parsedType}),m}return b(e.data)}}se.create=s=>new se({typeName:p.ZodUndefined,...g(s)});class ae extends _{_parse(e){if(this._getType(e)!==l.null){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:l.null,received:a.parsedType}),m}return b(e.data)}}ae.create=s=>new ae({typeName:p.ZodNull,...g(s)});class K extends _{constructor(){super(...arguments),this._any=!0}_parse(e){return b(e.data)}}K.create=s=>new K({typeName:p.ZodAny,...g(s)});class B extends _{constructor(){super(...arguments),this._unknown=!0}_parse(e){return b(e.data)}}B.create=s=>new B({typeName:p.ZodUnknown,...g(s)});class $ extends _{_parse(e){const t=this._getOrReturnCtx(e);return d(t,{code:c.invalid_type,expected:l.never,received:t.parsedType}),m}}$.create=s=>new $({typeName:p.ZodNever,...g(s)});class ve extends _{_parse(e){if(this._getType(e)!==l.undefined){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:l.void,received:a.parsedType}),m}return b(e.data)}}ve.create=s=>new ve({typeName:p.ZodVoid,...g(s)});class E extends _{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),r=this._def;if(t.parsedType!==l.array)return d(t,{code:c.invalid_type,expected:l.array,received:t.parsedType}),m;if(r.exactLength!==null){const i=t.data.length>r.exactLength.value,o=t.data.length<r.exactLength.value;(i||o)&&(d(t,{code:i?c.too_big:c.too_small,minimum:o?r.exactLength.value:void 0,maximum:i?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),a.dirty())}if(r.minLength!==null&&t.data.length<r.minLength.value&&(d(t,{code:c.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),a.dirty()),r.maxLength!==null&&t.data.length>r.maxLength.value&&(d(t,{code:c.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((i,o)=>r.type._parseAsync(new A(t,i,t.path,o)))).then(i=>w.mergeArray(a,i));const n=[...t.data].map((i,o)=>r.type._parseSync(new A(t,i,t.path,o)));return w.mergeArray(a,n)}get element(){return this._def.type}min(e,t){return new E({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new E({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new E({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}}E.create=(s,e)=>new E({type:s,minLength:null,maxLength:null,exactLength:null,typeName:p.ZodArray,...g(e)});function U(s){if(s instanceof x){const e={};for(const t in s.shape){const a=s.shape[t];e[t]=I.create(U(a))}return new x({...s._def,shape:()=>e})}else return s instanceof E?new E({...s._def,type:U(s.element)}):s instanceof I?I.create(U(s.unwrap())):s instanceof D?D.create(U(s.unwrap())):s instanceof R?R.create(s.items.map(e=>U(e))):s}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=v.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==l.object){const u=this._getOrReturnCtx(e);return d(u,{code:c.invalid_type,expected:l.object,received:u.parsedType}),m}const{status:a,ctx:r}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof $&&this._def.unknownKeys==="strip"))for(const u in r.data)i.includes(u)||o.push(u);const f=[];for(const u of i){const y=n[u],k=r.data[u];f.push({key:{status:"valid",value:u},value:y._parse(new A(r,k,r.path,u)),alwaysSet:u in r.data})}if(this._def.catchall instanceof $){const u=this._def.unknownKeys;if(u==="passthrough")for(const y of o)f.push({key:{status:"valid",value:y},value:{status:"valid",value:r.data[y]}});else if(u==="strict")o.length>0&&(d(r,{code:c.unrecognized_keys,keys:o}),a.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const y of o){const k=r.data[y];f.push({key:{status:"valid",value:y},value:u._parse(new A(r,k,r.path,y)),alwaysSet:y in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const u=[];for(const y of f){const k=await y.key,O=await y.value;u.push({key:k,value:O,alwaysSet:y.alwaysSet})}return u}).then(u=>w.mergeObjectSync(a,u)):w.mergeObjectSync(a,f)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new x({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,a)=>{var n,i;const r=((i=(n=this._def).errorMap)==null?void 0:i.call(n,t,a).message)??a.defaultError;return t.code==="unrecognized_keys"?{message:h.errToObj(e).message??r}:{message:r}}}:{}})}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:p.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new x({...this._def,catchall:e})}pick(e){const t={};for(const a of v.objectKeys(e))e[a]&&this.shape[a]&&(t[a]=this.shape[a]);return new x({...this._def,shape:()=>t})}omit(e){const t={};for(const a of v.objectKeys(this.shape))e[a]||(t[a]=this.shape[a]);return new x({...this._def,shape:()=>t})}deepPartial(){return U(this)}partial(e){const t={};for(const a of v.objectKeys(this.shape)){const r=this.shape[a];e&&!e[a]?t[a]=r:t[a]=r.optional()}return new x({...this._def,shape:()=>t})}required(e){const t={};for(const a of v.objectKeys(this.shape))if(e&&!e[a])t[a]=this.shape[a];else{let n=this.shape[a];for(;n instanceof I;)n=n._def.innerType;t[a]=n}return new x({...this._def,shape:()=>t})}keyof(){return Me(v.objectKeys(this.shape))}}x.create=(s,e)=>new x({shape:()=>s,unknownKeys:"strip",catchall:$.create(),typeName:p.ZodObject,...g(e)});x.strictCreate=(s,e)=>new x({shape:()=>s,unknownKeys:"strict",catchall:$.create(),typeName:p.ZodObject,...g(e)});x.lazycreate=(s,e)=>new x({shape:s,unknownKeys:"strip",catchall:$.create(),typeName:p.ZodObject,...g(e)});class re extends _{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;function r(n){for(const o of n)if(o.result.status==="valid")return o.result;for(const o of n)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=n.map(o=>new T(o.ctx.common.issues));return d(t,{code:c.invalid_union,unionErrors:i}),m}if(t.common.async)return Promise.all(a.map(async n=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await n._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(r);{let n;const i=[];for(const f of a){const u={...t,common:{...t.common,issues:[]},parent:null},y=f._parseSync({data:t.data,path:t.path,parent:u});if(y.status==="valid")return y;y.status==="dirty"&&!n&&(n={result:y,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(n)return t.common.issues.push(...n.ctx.common.issues),n.result;const o=i.map(f=>new T(f));return d(t,{code:c.invalid_union,unionErrors:o}),m}}get options(){return this._def.options}}re.create=(s,e)=>new re({options:s,typeName:p.ZodUnion,...g(e)});const N=s=>s instanceof oe?N(s.schema):s instanceof Z?N(s.innerType()):s instanceof ce?[s.value]:s instanceof V?s.options:s instanceof de?v.objectValues(s.enum):s instanceof ue?N(s._def.innerType):s instanceof se?[void 0]:s instanceof ae?[null]:s instanceof I?[void 0,...N(s.unwrap())]:s instanceof D?[null,...N(s.unwrap())]:s instanceof $e||s instanceof fe?N(s.unwrap()):s instanceof le?N(s._def.innerType):[];class Te extends _{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==l.object)return d(t,{code:c.invalid_type,expected:l.object,received:t.parsedType}),m;const a=this.discriminator,r=t.data[a],n=this.optionsMap.get(r);return n?t.common.async?n._parseAsync({data:t.data,path:t.path,parent:t}):n._parseSync({data:t.data,path:t.path,parent:t}):(d(t,{code:c.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),m)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,a){const r=new Map;for(const n of t){const i=N(n.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(r.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);r.set(o,n)}}return new Te({typeName:p.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...g(a)})}}function ke(s,e){const t=M(s),a=M(e);if(s===e)return{valid:!0,data:s};if(t===l.object&&a===l.object){const r=v.objectKeys(e),n=v.objectKeys(s).filter(o=>r.indexOf(o)!==-1),i={...s,...e};for(const o of n){const f=ke(s[o],e[o]);if(!f.valid)return{valid:!1};i[o]=f.data}return{valid:!0,data:i}}else if(t===l.array&&a===l.array){if(s.length!==e.length)return{valid:!1};const r=[];for(let n=0;n<s.length;n++){const i=s[n],o=e[n],f=ke(i,o);if(!f.valid)return{valid:!1};r.push(f.data)}return{valid:!0,data:r}}else return t===l.date&&a===l.date&&+s==+e?{valid:!0,data:s}:{valid:!1}}class ne extends _{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),r=(n,i)=>{if(Ee(n)||Ee(i))return m;const o=ke(n.value,i.value);return o.valid?((Ae(n)||Ae(i))&&t.dirty(),{status:t.value,value:o.data}):(d(a,{code:c.invalid_intersection_types}),m)};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(([n,i])=>r(n,i)):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}))}}ne.create=(s,e,t)=>new ne({left:s,right:e,typeName:p.ZodIntersection,...g(t)});class R extends _{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==l.array)return d(a,{code:c.invalid_type,expected:l.array,received:a.parsedType}),m;if(a.data.length<this._def.items.length)return d(a,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m;!this._def.rest&&a.data.length>this._def.items.length&&(d(a,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...a.data].map((i,o)=>{const f=this._def.items[o]||this._def.rest;return f?f._parse(new A(a,i,a.path,o)):null}).filter(i=>!!i);return a.common.async?Promise.all(n).then(i=>w.mergeArray(t,i)):w.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new R({...this._def,rest:e})}}R.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new R({items:s,typeName:p.ZodTuple,rest:null,...g(e)})};class ie extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==l.object)return d(a,{code:c.invalid_type,expected:l.object,received:a.parsedType}),m;const r=[],n=this._def.keyType,i=this._def.valueType;for(const o in a.data)r.push({key:n._parse(new A(a,o,a.path,o)),value:i._parse(new A(a,a.data[o],a.path,o)),alwaysSet:o in a.data});return a.common.async?w.mergeObjectAsync(t,r):w.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,a){return t instanceof _?new ie({keyType:e,valueType:t,typeName:p.ZodRecord,...g(a)}):new ie({keyType:S.create(),valueType:e,typeName:p.ZodRecord,...g(t)})}}class xe extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==l.map)return d(a,{code:c.invalid_type,expected:l.map,received:a.parsedType}),m;const r=this._def.keyType,n=this._def.valueType,i=[...a.data.entries()].map(([o,f],u)=>({key:r._parse(new A(a,o,a.path,[u,"key"])),value:n._parse(new A(a,f,a.path,[u,"value"]))}));if(a.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const f of i){const u=await f.key,y=await f.value;if(u.status==="aborted"||y.status==="aborted")return m;(u.status==="dirty"||y.status==="dirty")&&t.dirty(),o.set(u.value,y.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const f of i){const u=f.key,y=f.value;if(u.status==="aborted"||y.status==="aborted")return m;(u.status==="dirty"||y.status==="dirty")&&t.dirty(),o.set(u.value,y.value)}return{status:t.value,value:o}}}}xe.create=(s,e,t)=>new xe({valueType:e,keyType:s,typeName:p.ZodMap,...g(t)});class W extends _{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==l.set)return d(a,{code:c.invalid_type,expected:l.set,received:a.parsedType}),m;const r=this._def;r.minSize!==null&&a.data.size<r.minSize.value&&(d(a,{code:c.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),r.maxSize!==null&&a.data.size>r.maxSize.value&&(d(a,{code:c.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());const n=this._def.valueType;function i(f){const u=new Set;for(const y of f){if(y.status==="aborted")return m;y.status==="dirty"&&t.dirty(),u.add(y.value)}return{status:t.value,value:u}}const o=[...a.data.values()].map((f,u)=>n._parse(new A(a,f,a.path,u)));return a.common.async?Promise.all(o).then(f=>i(f)):i(o)}min(e,t){return new W({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new W({...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)}}W.create=(s,e)=>new W({valueType:s,minSize:null,maxSize:null,typeName:p.ZodSet,...g(e)});class Y extends _{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==l.function)return d(t,{code:c.invalid_type,expected:l.function,received:t.parsedType}),m;function a(o,f){return ge({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ye(),G].filter(u=>!!u),issueData:{code:c.invalid_arguments,argumentsError:f}})}function r(o,f){return ge({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ye(),G].filter(u=>!!u),issueData:{code:c.invalid_return_type,returnTypeError:f}})}const n={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof Q){const o=this;return b(async function(...f){const u=new T([]),y=await o._def.args.parseAsync(f,n).catch(C=>{throw u.addIssue(a(f,C)),u}),k=await Reflect.apply(i,this,y);return await o._def.returns._def.type.parseAsync(k,n).catch(C=>{throw u.addIssue(r(k,C)),u})})}else{const o=this;return b(function(...f){const u=o._def.args.safeParse(f,n);if(!u.success)throw new T([a(f,u.error)]);const y=Reflect.apply(i,this,u.data),k=o._def.returns.safeParse(y,n);if(!k.success)throw new T([r(y,k.error)]);return k.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Y({...this._def,args:R.create(e).rest(B.create())})}returns(e){return new Y({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,a){return new Y({args:e||R.create([]).rest(B.create()),returns:t||B.create(),typeName:p.ZodFunction,...g(a)})}}class oe 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})}}oe.create=(s,e)=>new oe({getter:s,typeName:p.ZodLazy,...g(e)});class ce extends _{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return d(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}ce.create=(s,e)=>new ce({value:s,typeName:p.ZodLiteral,...g(e)});function Me(s,e){return new V({values:s,typeName:p.ZodEnum,...g(e)})}class V extends _{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),a=this._def.values;return d(t,{expected:v.joinValues(a),received:t.parsedType,code:c.invalid_type}),m}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return d(t,{received:t.data,code:c.invalid_enum_value,options:a}),m}return b(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 V.create(e,{...this._def,...t})}exclude(e,t=this._def){return V.create(this.options.filter(a=>!e.includes(a)),{...this._def,...t})}}V.create=Me;class de extends _{_parse(e){const t=v.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==l.string&&a.parsedType!==l.number){const r=v.objectValues(t);return d(a,{expected:v.joinValues(r),received:a.parsedType,code:c.invalid_type}),m}if(this._cache||(this._cache=new Set(v.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const r=v.objectValues(t);return d(a,{received:a.data,code:c.invalid_enum_value,options:r}),m}return b(e.data)}get enum(){return this._def.values}}de.create=(s,e)=>new de({values:s,typeName:p.ZodNativeEnum,...g(e)});class Q extends _{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==l.promise&&t.common.async===!1)return d(t,{code:c.invalid_type,expected:l.promise,received:t.parsedType}),m;const a=t.parsedType===l.promise?t.data:Promise.resolve(t.data);return b(a.then(r=>this._def.type.parseAsync(r,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Q.create=(s,e)=>new Q({type:s,typeName:p.ZodPromise,...g(e)});class Z extends _{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===p.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),r=this._def.effect||null,n={addIssue:i=>{d(a,i),i.fatal?t.abort():t.dirty()},get path(){return a.path}};if(n.addIssue=n.addIssue.bind(n),r.type==="preprocess"){const i=r.transform(a.data,n);if(a.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return m;const f=await this._def.schema._parseAsync({data:o,path:a.path,parent:a});return f.status==="aborted"?m:f.status==="dirty"||t.value==="dirty"?H(f.value):f});{if(t.value==="aborted")return m;const o=this._def.schema._parseSync({data:i,path:a.path,parent:a});return o.status==="aborted"?m:o.status==="dirty"||t.value==="dirty"?H(o.value):o}}if(r.type==="refinement"){const i=o=>{const f=r.refinement(o,n);if(a.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(a.common.async===!1){const o=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(o=>o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(r.type==="transform")if(a.common.async===!1){const i=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!F(i))return m;const o=r.transform(i.value,n);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:a.data,path:a.path,parent:a}).then(i=>F(i)?Promise.resolve(r.transform(i.value,n)).then(o=>({status:t.value,value:o})):m);v.assertNever(r)}}Z.create=(s,e,t)=>new Z({schema:s,typeName:p.ZodEffects,effect:e,...g(t)});Z.createWithPreprocess=(s,e,t)=>new Z({schema:e,effect:{type:"preprocess",transform:s},typeName:p.ZodEffects,...g(t)});class I extends _{_parse(e){return this._getType(e)===l.undefined?b(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}I.create=(s,e)=>new I({innerType:s,typeName:p.ZodOptional,...g(e)});class D extends _{_parse(e){return this._getType(e)===l.null?b(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}D.create=(s,e)=>new D({innerType:s,typeName:p.ZodNullable,...g(e)});class ue extends _{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===l.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ue.create=(s,e)=>new ue({innerType:s,typeName:p.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...g(e)});class le extends _{_parse(e){const{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 ee(r)?r.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new T(a.common.issues)},input:a.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new T(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}le.create=(s,e)=>new le({innerType:s,typeName:p.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...g(e)});class we extends _{_parse(e){if(this._getType(e)!==l.nan){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:l.nan,received:a.parsedType}),m}return{status:"valid",value:e.data}}}we.create=s=>new we({typeName:p.ZodNaN,...g(s)});const Ot=Symbol("zod_brand");class $e extends _{_parse(e){const{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 he extends _{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),H(n.value)):this._def.out._parseAsync({data:n.value,path:a.path,parent:a})})();{const r=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return r.status==="aborted"?m:r.status==="dirty"?(t.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:a.path,parent:a})}}static create(e,t){return new he({in:e,out:t,typeName:p.ZodPipeline})}}class fe extends _{_parse(e){const t=this._def.innerType._parse(e),a=r=>(F(r)&&(r.value=Object.freeze(r.value)),r);return ee(t)?t.then(r=>a(r)):a(t)}unwrap(){return this._def.innerType}}fe.create=(s,e)=>new fe({innerType:s,typeName:p.ZodReadonly,...g(e)});function Ne(s,e){const t=typeof s=="function"?s(e):typeof s=="string"?{message:s}:s;return typeof t=="string"?{message:t}:t}function it(s,e={},t){return s?K.create().superRefine((a,r)=>{const n=s(a);if(n instanceof Promise)return n.then(i=>{if(!i){const o=Ne(e,a),f=o.fatal??t??!0;r.addIssue({code:"custom",...o,fatal:f})}});if(!n){const i=Ne(e,a),o=i.fatal??t??!0;r.addIssue({code:"custom",...i,fatal:o})}}):K.create()}const Nt={object:x.lazycreate};var p;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(p||(p={}));const It=(s,e={message:`Input not instance of ${s.name}`})=>it(t=>t instanceof s,e),J=S.create,be=P.create,Rt=we.create,Zt=L.create,X=te.create,jt=q.create,Mt=_e.create,$t=se.create,Pt=ae.create,Lt=K.create,Vt=B.create,Dt=$.create,zt=ve.create,Ut=E.create,pe=x.create,Bt=x.strictCreate,Ft=re.create,qt=Te.create,Wt=ne.create,Ht=R.create,Jt=ie.create,Xt=xe.create,Yt=W.create,Gt=Y.create,Kt=oe.create,ot=ce.create,Ie=V.create,Qt=de.create,es=Q.create,ts=Z.create,ss=I.create,as=D.create,rs=Z.createWithPreprocess,ns=he.create,is=()=>J().optional(),os=()=>be().optional(),cs=()=>X().optional(),ds={string:(s=>S.create({...s,coerce:!0})),number:(s=>P.create({...s,coerce:!0})),boolean:(s=>te.create({...s,coerce:!0})),bigint:(s=>L.create({...s,coerce:!0})),date:(s=>q.create({...s,coerce:!0}))},us=m,ct=pe({name:ot("check-status"),checkType:Ie(["login","pageLoad","element","custom"]),title:J(),description:J().optional(),notification:pe({message:J(),urgency:Ie(["low","medium","high"]).optional()}).optional(),options:pe({timeoutMs:be().optional(),retryable:X().optional(),autoOpen:X().optional(),customValidator:J().optional(),autoClick:X().optional(),clickDelay:be().optional(),fallbackToManual:X().optional()}).optional()});function ls(s){return ct.parse(s)}async function fs(s){var e,t,a,r;try{const n=`check-status-${Date.now()}-${Math.random().toString(36).substring(2,11)}`,i=((e=s.notification)==null?void 0:e.message)||`${s.title} 확인이 필요합니다`,o=((t=s.notification)==null?void 0:t.urgency)||"medium";if(window.dispatchEvent(new CustomEvent("8g-show-notification",{detail:{id:n,message:i,urgency:o,checkType:s.checkType,title:s.title,description:s.description,options:s.options,autoClick:(a=s.options)==null?void 0:a.autoClick}})),(r=s.options)!=null&&r.autoClick){const u=s.options.clickDelay||500;console.log(`[CheckStatusBlock] Auto-click enabled, waiting ${u}ms before clicking`),await new Promise(z=>setTimeout(z,u));const y={width:window.innerWidth,height:window.innerHeight},k=60,O={right:60,bottom:200},C={x:y.width-O.right-k/2,y:y.height-O.bottom-k/2};console.log(`[CheckStatusBlock] Sending CDP click to (${C.x}, ${C.y})`);try{await chrome.runtime.sendMessage({type:"CDP_CLICK",data:{x:C.x,y:C.y,button:"left"}}),console.log("[CheckStatusBlock] CDP click sent successfully")}catch(z){if(console.error("[CheckStatusBlock] CDP click failed:",z),!s.options.fallbackToManual)throw new Error("Auto-click failed and no fallback enabled");console.log("[CheckStatusBlock] Falling back to manual mode")}}return{data:await new Promise((u,y)=>{var Ce;let k=null;(Ce=s.options)!=null&&Ce.timeoutMs&&(k=setTimeout(()=>{window.dispatchEvent(new CustomEvent("8g-hide-notification",{detail:{id:n}})),y(new Error("Check status timeout"))},s.options.timeoutMs));const O=j=>{j.detail.notificationId===n&&(k&&clearTimeout(k),window.removeEventListener("8g-check-status-result",O),window.dispatchEvent(new CustomEvent("8g-hide-notification",{detail:{id:n}})),j.detail.success?u(j.detail.data):y(new Error(j.detail.message||"Check status failed")))},C=j=>{j.detail.notificationId===n&&(k&&clearTimeout(k),window.removeEventListener("8g-notification-dismissed",C),window.removeEventListener("8g-check-status-result",O),y(new Error("User dismissed the notification")))};window.addEventListener("8g-check-status-result",O),window.addEventListener("8g-notification-dismissed",C);const z=j=>{j.detail.id===n&&(k&&clearTimeout(k),window.removeEventListener("8g-show-check-status-fallback",z),window.dispatchEvent(new CustomEvent("8g-show-check-status",{detail:{checkType:s.checkType,title:s.title,description:s.description,onConfirm:Pe=>{window.dispatchEvent(new CustomEvent("8g-hide-check-status")),window.dispatchEvent(new CustomEvent("8g-hide-notification",{detail:{id:n}})),u(Pe)},onCancel:()=>{window.dispatchEvent(new CustomEvent("8g-hide-check-status")),window.dispatchEvent(new CustomEvent("8g-hide-notification",{detail:{id:n}})),y(new Error("User cancelled"))}}})))};window.addEventListener("8g-show-check-status-fallback",z)})||{confirmed:!0},hasError:!1}}catch(n){return{data:null,hasError:!0,message:n instanceof Error?n.message:"Check status failed"}}}function hs(s){switch(s){case"login":return dt();case"pageLoad":return ut();case"element":return lt();case"custom":return{success:!0,message:"Custom check passed"};default:return{success:!1,message:"Unknown check type"}}}function dt(){return[document.querySelector('[data-testid="user-avatar"]'),document.querySelector(".user-profile"),document.querySelector("#account-menu"),document.cookie.includes("session="),localStorage.getItem("user_id")].some(t=>!!t)?{success:!0,message:"로그인되어 있습니다!",data:ft()}:{success:!1,message:"로그인이 필요합니다."}}function ut(){const s=document.readyState==="complete";return{success:s,message:s?"페이지가 완전히 로드되었습니다.":"페이지 로딩 중..."}}function lt(){const s=document.querySelector("[data-status-check]");return{success:!!s,message:s?"요소를 찾았습니다.":"요소를 찾을 수 없습니다."}}function ft(){const s=document.querySelector("[data-email]")||document.querySelector(".user-email")||document.querySelector('input[type="email"][disabled]'),e=document.querySelector("[data-name]")||document.querySelector(".user-name")||document.querySelector(".profile-name");return{email:(s==null?void 0:s.textContent)||(s==null?void 0:s.getAttribute("value"))||"unknown@example.com",name:(e==null?void 0:e.textContent)||"User"}}export{we as $,K as A,Ot as B,ct as C,H as D,At as E,E as F,L as G,te as H,m as I,$e as J,le as K,q as L,ue as M,us as N,b as O,w as P,Te as Q,Z as R,V as S,T,Y as U,ne as V,c as W,oe as X,ce as Y,p as Z,xe as _,ht as a,Vt as a$,de as a0,$ as a1,ae as a2,D as a3,P as a4,x as a5,I as a6,l as a7,he as a8,Q as a9,Ae as aA,F as aB,Nt as aC,Kt as aD,ge as aE,Xt as aF,Rt as aG,Qt as aH,Dt as aI,Pt as aJ,as as aK,Se as aL,cs as aM,os as aN,ss as aO,is as aP,ns as aQ,rs as aR,es as aS,St as aT,Jt as aU,Yt as aV,Et as aW,Bt as aX,Mt as aY,Ht as aZ,$t as a_,fe as aa,ie as ab,W as ac,S as ad,_e as ae,R as af,se as ag,re as ah,B as ai,ve as aj,d as ak,Zt as al,ds as am,it as an,jt as ao,tt as ap,G as aq,qt as ar,ts as as,Gt as at,ye as au,M as av,It as aw,Wt as ax,Ee as ay,ee as az,kt as b,v as b0,zt as b1,xt as c,wt as d,bt as e,Tt as f,Lt as g,Ut as h,Ct as i,Ie as j,X as k,ot as l,mt as m,be as n,pe as o,hs as p,pt as q,yt as r,J as s,gt as t,Ft as u,_t as v,vt as w,ls as x,fs as y,_ as z};
@@ -0,0 +1 @@
1
+ import{v as t,h as s,a as l,b as c,c as r,d as o,e as i,f as n,g as d,i as B,j as k,k as v,l as h,m as u,n as m,o as S,p as w,q as p,r as E,s as x,t as C,u as f,w as A,x as F,y as V,z as y,A as D,B as G,D as g,E as N,F as P,G as T,H as W,I as J,J as K,K as L,L as M,M as j,N as U,O as H,P as $,Q as q,R as z,S as I,T as O,U as Q,V as R,W as X}from"./types-CVxt4LQP.js";import{ab as ca,ah as ra,X as oa,a0 as ia,a2 as na,a3 as da,aj as Ba,ae as ka,ac as va,Z as ha,a9 as ua,Y as ma,_ as Sa,a4 as wa,ag as pa,a7 as Ea,af as xa,ai as Ca,a8 as fa,aa as Aa,a1 as Fa,$ as Va,ad as ya,a5 as Da,a6 as Ga}from"./types-CVxt4LQP.js";import{x as Y,y as Z}from"./CheckStatusBlock-DN-UPTR0.js";import{C as Na}from"./CheckStatusBlock-DN-UPTR0.js";import"./_commonjsHelpers-Cpj98o6Y.js";class ta{static async executeBlock(e){try{switch(e.name){case"get-text":{const a=R(e);return await X(a)}case"attribute-value":{const a=O(e);return await Q(a)}case"get-value-form":{const a=z(e);return await I(a)}case"set-value-form":{const a=$(e);return await q(a)}case"set-contenteditable":{const a=U(e);return await H(a)}case"clear-value-form":{const a=M(e);return await j(a)}case"element-exists":{const a=K(e);return await L(a)}case"event-click":{const a=W(e);return await J(a)}case"keypress":{const a=P(e);return await T(a)}case"wait":{const a=g(e);return await N(a)}case"wait-for-condition":{const a=D(e);return await G(a)}case"navigate":{const a=V(e);return await y(a)}case"save-assets":{const a=A(e);return await F(a)}case"get-element-data":{const a=C(e);return await f(a)}case"scroll":{const a=E(e);return await x(a)}case"ai-parse-data":{const a=w(e);return await p(a)}case"fetch-api":{const a=m(e);return await S(a)}case"transform-data":{const a=h(e);return await u(a)}case"export-data":{const a=k(e);return await v(a)}case"network-catch":{const a=d(e);return await B(a)}case"mark-border":{const a=i(e);return await n(a)}case"apply-locale":{const a=r(e);return await o(a)}case"paste-value":{const a=l(e);return await c(a)}case"check-status":{const a=Y(e);return await Z(a)}case"execute-javascript":{const a=t(e);return await s(a)}default:return{hasError:!0,message:`Unknown block type: ${e.name}`,data:null}}}catch(a){return{hasError:!0,message:a instanceof Error?a.message:"Unknown error in block execution",data:null}}}}export{ca as AiParseDataBlockSchema,ra as ApplyLocaleBlockSchema,oa as BaseBlockSchema,ta as BlockHandler,Na as CheckStatusBlockSchema,ia as ClearValueFormsBlockSchema,na as ElementExistsBlockSchema,da as EventClickBlockSchema,Ba as ExecuteJavaScriptBlockSchema,ka as ExportDataBlockSchema,va as FetchApiBlockSchema,ha as GetAttributeValueBlockSchema,ua as GetElementDataBlockSchema,ma as GetTextBlockSchema,Sa as GetValueFormsBlockSchema,wa as KeypressBlockSchema,pa as MarkBorderBlockSchema,Ea as NavigateBlockSchema,xa as NetworkCatchBlockSchema,Ca as PasteValueBlockSchema,fa as SaveAssetsBlockSchema,Aa as ScrollBlockSchema,Fa as SetContentEditableBlockSchema,Va as SetValueFormsBlockSchema,ya as TransformDataBlockSchema,Da as WaitBlockSchema,Ga as WaitForConditionBlockSchema};