@pdfme/ui 5.4.6-dev.29 → 5.4.6-dev.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js
CHANGED
|
@@ -8433,7 +8433,7 @@ const Schema$1 = object$1({
|
|
|
8433
8433
|
__isSplit: boolean$1().optional()
|
|
8434
8434
|
}).passthrough(), SchemaForUIAdditionalInfo = object$1({ id: string$1() });
|
|
8435
8435
|
Schema$1.merge(SchemaForUIAdditionalInfo);
|
|
8436
|
-
const ArrayBufferSchema = any$1().refine((a) => a instanceof ArrayBuffer), Uint8ArraySchema = any$1().refine((a) => a instanceof Uint8Array), BlankPdf = object$1({
|
|
8436
|
+
const ArrayBufferSchema = any$1().refine((a) => a instanceof ArrayBuffer), Uint8ArraySchema = any$1().refine((a) => a instanceof Uint8Array && a.buffer instanceof ArrayBuffer), BlankPdf = object$1({
|
|
8437
8437
|
width: number$1(),
|
|
8438
8438
|
height: number$1(),
|
|
8439
8439
|
padding: tuple([number$1(), number$1(), number$1(), number$1()]),
|
package/dist/index.umd.js
CHANGED
|
@@ -21,7 +21,7 @@ Add a <Suspense fallback=...> component higher in the tree to provide a loading
|
|
|
21
21
|
newResult[${C}] = ${_}.value;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
`)}m.write("payload.value = newResult;"),m.write("return payload;");const T=m.compile();return(I,_)=>T(f,I,_)};let p;const v=isObject$5,A=!globalConfig$1.jitless,g=A&&allowsEval.value,b=s.catchall;let y;a._zod.parse=(f,m)=>{y??(y=u.value);const E=f.value;return v(E)?A&&g&&m?.async===!1&&m.jitless!==!0?(p||(p=d(s.shape)),f=p(f,m),b?handleCatchall([],E,f,m,y,a):f):c(f,m):(f.issues.push({expected:"object",code:"invalid_type",input:E,inst:a}),f)}});function handleUnionResults(a,s,c,u){for(const p of a)if(p.issues.length===0)return s.value=p.value,s;const d=a.filter(p=>!aborted(p));return d.length===1?(s.value=d[0].value,d[0]):(s.issues.push({code:"invalid_union",input:s.value,inst:c,errors:a.map(p=>p.issues.map(v=>finalizeIssue(v,u,config())))}),s)}const $ZodUnion=$constructor("$ZodUnion",(a,s)=>{$ZodType.init(a,s),defineLazy(a._zod,"optin",()=>s.options.some(d=>d._zod.optin==="optional")?"optional":void 0),defineLazy(a._zod,"optout",()=>s.options.some(d=>d._zod.optout==="optional")?"optional":void 0),defineLazy(a._zod,"values",()=>{if(s.options.every(d=>d._zod.values))return new Set(s.options.flatMap(d=>Array.from(d._zod.values)))}),defineLazy(a._zod,"pattern",()=>{if(s.options.every(d=>d._zod.pattern)){const d=s.options.map(p=>p._zod.pattern);return new RegExp(`^(${d.map(p=>cleanRegex(p.source)).join("|")})$`)}});const c=s.options.length===1,u=s.options[0]._zod.run;a._zod.parse=(d,p)=>{if(c)return u(d,p);let v=!1;const A=[];for(const x of s.options){const g=x._zod.run({value:d.value,issues:[]},p);if(g instanceof Promise)A.push(g),v=!0;else{if(g.issues.length===0)return g;A.push(g)}}return v?Promise.all(A).then(x=>handleUnionResults(x,d,a,p)):handleUnionResults(A,d,a,p)}}),$ZodIntersection=$constructor("$ZodIntersection",(a,s)=>{$ZodType.init(a,s),a._zod.parse=(c,u)=>{const d=c.value,p=s.left._zod.run({value:d,issues:[]},u),v=s.right._zod.run({value:d,issues:[]},u);return p instanceof Promise||v instanceof Promise?Promise.all([p,v]).then(([x,g])=>handleIntersectionResults(c,x,g)):handleIntersectionResults(c,p,v)}});function mergeValues(a,s){if(a===s)return{valid:!0,data:a};if(a instanceof Date&&s instanceof Date&&+a==+s)return{valid:!0,data:a};if(isPlainObject$1(a)&&isPlainObject$1(s)){const c=Object.keys(s),u=Object.keys(a).filter(p=>c.indexOf(p)!==-1),d={...a,...s};for(const p of u){const v=mergeValues(a[p],s[p]);if(!v.valid)return{valid:!1,mergeErrorPath:[p,...v.mergeErrorPath]};d[p]=v.data}return{valid:!0,data:d}}if(Array.isArray(a)&&Array.isArray(s)){if(a.length!==s.length)return{valid:!1,mergeErrorPath:[]};const c=[];for(let u=0;u<a.length;u++){const d=a[u],p=s[u],v=mergeValues(d,p);if(!v.valid)return{valid:!1,mergeErrorPath:[u,...v.mergeErrorPath]};c.push(v.data)}return{valid:!0,data:c}}return{valid:!1,mergeErrorPath:[]}}function handleIntersectionResults(a,s,c){if(s.issues.length&&a.issues.push(...s.issues),c.issues.length&&a.issues.push(...c.issues),aborted(a))return a;const u=mergeValues(s.value,c.value);if(!u.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(u.mergeErrorPath)}`);return a.value=u.data,a}const $ZodTuple=$constructor("$ZodTuple",(a,s)=>{$ZodType.init(a,s);const c=s.items,u=c.length-[...c].reverse().findIndex(d=>d._zod.optin!=="optional");a._zod.parse=(d,p)=>{const v=d.value;if(!Array.isArray(v))return d.issues.push({input:v,inst:a,expected:"tuple",code:"invalid_type"}),d;d.value=[];const A=[];if(!s.rest){const g=v.length>c.length,b=v.length<u-1;if(g||b)return d.issues.push({...g?{code:"too_big",maximum:c.length}:{code:"too_small",minimum:c.length},input:v,inst:a,origin:"array"}),d}let x=-1;for(const g of c){if(x++,x>=v.length&&x>=u)continue;const b=g._zod.run({value:v[x],issues:[]},p);b instanceof Promise?A.push(b.then(y=>handleTupleResult(y,d,x))):handleTupleResult(b,d,x)}if(s.rest){const g=v.slice(c.length);for(const b of g){x++;const y=s.rest._zod.run({value:b,issues:[]},p);y instanceof Promise?A.push(y.then(f=>handleTupleResult(f,d,x))):handleTupleResult(y,d,x)}}return A.length?Promise.all(A).then(()=>d):d}});function handleTupleResult(a,s,c){a.issues.length&&s.issues.push(...prefixIssues(c,a.issues)),s.value[c]=a.value}const $ZodRecord=$constructor("$ZodRecord",(a,s)=>{$ZodType.init(a,s),a._zod.parse=(c,u)=>{const d=c.value;if(!isPlainObject$1(d))return c.issues.push({expected:"record",code:"invalid_type",input:d,inst:a}),c;const p=[];if(s.keyType._zod.values){const v=s.keyType._zod.values;c.value={};for(const x of v)if(typeof x=="string"||typeof x=="number"||typeof x=="symbol"){const g=s.valueType._zod.run({value:d[x],issues:[]},u);g instanceof Promise?p.push(g.then(b=>{b.issues.length&&c.issues.push(...prefixIssues(x,b.issues)),c.value[x]=b.value})):(g.issues.length&&c.issues.push(...prefixIssues(x,g.issues)),c.value[x]=g.value)}let A;for(const x in d)v.has(x)||(A=A??[],A.push(x));A&&A.length>0&&c.issues.push({code:"unrecognized_keys",input:d,inst:a,keys:A})}else{c.value={};for(const v of Reflect.ownKeys(d)){if(v==="__proto__")continue;const A=s.keyType._zod.run({value:v,issues:[]},u);if(A instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(A.issues.length){c.issues.push({code:"invalid_key",origin:"record",issues:A.issues.map(g=>finalizeIssue(g,u,config())),input:v,path:[v],inst:a}),c.value[A.value]=A.value;continue}const x=s.valueType._zod.run({value:d[v],issues:[]},u);x instanceof Promise?p.push(x.then(g=>{g.issues.length&&c.issues.push(...prefixIssues(v,g.issues)),c.value[A.value]=g.value})):(x.issues.length&&c.issues.push(...prefixIssues(v,x.issues)),c.value[A.value]=x.value)}}return p.length?Promise.all(p).then(()=>c):c}}),$ZodEnum=$constructor("$ZodEnum",(a,s)=>{$ZodType.init(a,s);const c=getEnumValues(s.entries),u=new Set(c);a._zod.values=u,a._zod.pattern=new RegExp(`^(${c.filter(d=>propertyKeyTypes.has(typeof d)).map(d=>typeof d=="string"?escapeRegex(d):d.toString()).join("|")})$`),a._zod.parse=(d,p)=>{const v=d.value;return u.has(v)||d.issues.push({code:"invalid_value",values:c,input:v,inst:a}),d}}),$ZodTransform=$constructor("$ZodTransform",(a,s)=>{$ZodType.init(a,s),a._zod.parse=(c,u)=>{if(u.direction==="backward")throw new $ZodEncodeError(a.constructor.name);const d=s.transform(c.value,c);if(u.async)return(d instanceof Promise?d:Promise.resolve(d)).then(v=>(c.value=v,c));if(d instanceof Promise)throw new $ZodAsyncError;return c.value=d,c}});function handleOptionalResult(a,s){return a.issues.length&&s===void 0?{issues:[],value:void 0}:a}const $ZodOptional=$constructor("$ZodOptional",(a,s)=>{$ZodType.init(a,s),a._zod.optin="optional",a._zod.optout="optional",defineLazy(a._zod,"values",()=>s.innerType._zod.values?new Set([...s.innerType._zod.values,void 0]):void 0),defineLazy(a._zod,"pattern",()=>{const c=s.innerType._zod.pattern;return c?new RegExp(`^(${cleanRegex(c.source)})?$`):void 0}),a._zod.parse=(c,u)=>{if(s.innerType._zod.optin==="optional"){const d=s.innerType._zod.run(c,u);return d instanceof Promise?d.then(p=>handleOptionalResult(p,c.value)):handleOptionalResult(d,c.value)}return c.value===void 0?c:s.innerType._zod.run(c,u)}}),$ZodNullable=$constructor("$ZodNullable",(a,s)=>{$ZodType.init(a,s),defineLazy(a._zod,"optin",()=>s.innerType._zod.optin),defineLazy(a._zod,"optout",()=>s.innerType._zod.optout),defineLazy(a._zod,"pattern",()=>{const c=s.innerType._zod.pattern;return c?new RegExp(`^(${cleanRegex(c.source)}|null)$`):void 0}),defineLazy(a._zod,"values",()=>s.innerType._zod.values?new Set([...s.innerType._zod.values,null]):void 0),a._zod.parse=(c,u)=>c.value===null?c:s.innerType._zod.run(c,u)}),$ZodDefault=$constructor("$ZodDefault",(a,s)=>{$ZodType.init(a,s),a._zod.optin="optional",defineLazy(a._zod,"values",()=>s.innerType._zod.values),a._zod.parse=(c,u)=>{if(u.direction==="backward")return s.innerType._zod.run(c,u);if(c.value===void 0)return c.value=s.defaultValue,c;const d=s.innerType._zod.run(c,u);return d instanceof Promise?d.then(p=>handleDefaultResult(p,s)):handleDefaultResult(d,s)}});function handleDefaultResult(a,s){return a.value===void 0&&(a.value=s.defaultValue),a}const $ZodPrefault=$constructor("$ZodPrefault",(a,s)=>{$ZodType.init(a,s),a._zod.optin="optional",defineLazy(a._zod,"values",()=>s.innerType._zod.values),a._zod.parse=(c,u)=>(u.direction==="backward"||c.value===void 0&&(c.value=s.defaultValue),s.innerType._zod.run(c,u))}),$ZodNonOptional=$constructor("$ZodNonOptional",(a,s)=>{$ZodType.init(a,s),defineLazy(a._zod,"values",()=>{const c=s.innerType._zod.values;return c?new Set([...c].filter(u=>u!==void 0)):void 0}),a._zod.parse=(c,u)=>{const d=s.innerType._zod.run(c,u);return d instanceof Promise?d.then(p=>handleNonOptionalResult(p,a)):handleNonOptionalResult(d,a)}});function handleNonOptionalResult(a,s){return!a.issues.length&&a.value===void 0&&a.issues.push({code:"invalid_type",expected:"nonoptional",input:a.value,inst:s}),a}const $ZodCatch=$constructor("$ZodCatch",(a,s)=>{$ZodType.init(a,s),defineLazy(a._zod,"optin",()=>s.innerType._zod.optin),defineLazy(a._zod,"optout",()=>s.innerType._zod.optout),defineLazy(a._zod,"values",()=>s.innerType._zod.values),a._zod.parse=(c,u)=>{if(u.direction==="backward")return s.innerType._zod.run(c,u);const d=s.innerType._zod.run(c,u);return d instanceof Promise?d.then(p=>(c.value=p.value,p.issues.length&&(c.value=s.catchValue({...c,error:{issues:p.issues.map(v=>finalizeIssue(v,u,config()))},input:c.value}),c.issues=[]),c)):(c.value=d.value,d.issues.length&&(c.value=s.catchValue({...c,error:{issues:d.issues.map(p=>finalizeIssue(p,u,config()))},input:c.value}),c.issues=[]),c)}}),$ZodPipe=$constructor("$ZodPipe",(a,s)=>{$ZodType.init(a,s),defineLazy(a._zod,"values",()=>s.in._zod.values),defineLazy(a._zod,"optin",()=>s.in._zod.optin),defineLazy(a._zod,"optout",()=>s.out._zod.optout),defineLazy(a._zod,"propValues",()=>s.in._zod.propValues),a._zod.parse=(c,u)=>{if(u.direction==="backward"){const p=s.out._zod.run(c,u);return p instanceof Promise?p.then(v=>handlePipeResult(v,s.in,u)):handlePipeResult(p,s.in,u)}const d=s.in._zod.run(c,u);return d instanceof Promise?d.then(p=>handlePipeResult(p,s.out,u)):handlePipeResult(d,s.out,u)}});function handlePipeResult(a,s,c){return a.issues.length?(a.aborted=!0,a):s._zod.run({value:a.value,issues:a.issues},c)}const $ZodReadonly=$constructor("$ZodReadonly",(a,s)=>{$ZodType.init(a,s),defineLazy(a._zod,"propValues",()=>s.innerType._zod.propValues),defineLazy(a._zod,"values",()=>s.innerType._zod.values),defineLazy(a._zod,"optin",()=>s.innerType._zod.optin),defineLazy(a._zod,"optout",()=>s.innerType._zod.optout),a._zod.parse=(c,u)=>{if(u.direction==="backward")return s.innerType._zod.run(c,u);const d=s.innerType._zod.run(c,u);return d instanceof Promise?d.then(handleReadonlyResult):handleReadonlyResult(d)}});function handleReadonlyResult(a){return a.value=Object.freeze(a.value),a}const $ZodCustom=$constructor("$ZodCustom",(a,s)=>{$ZodCheck.init(a,s),$ZodType.init(a,s),a._zod.parse=(c,u)=>c,a._zod.check=c=>{const u=c.value,d=s.fn(u);if(d instanceof Promise)return d.then(p=>handleRefineResult(p,c,u,a));handleRefineResult(d,c,u,a)}});function handleRefineResult(a,s,c,u){if(!a){const d={code:"custom",input:c,inst:u,path:[...u._zod.def.path??[]],continue:!u._zod.def.abort};u._zod.def.params&&(d.params=u._zod.def.params),s.issues.push(issue(d))}}class $ZodRegistry{constructor(){this._map=new WeakMap,this._idmap=new Map}add(s,...c){const u=c[0];if(this._map.set(s,u),u&&typeof u=="object"&&"id"in u){if(this._idmap.has(u.id))throw new Error(`ID ${u.id} already exists in the registry`);this._idmap.set(u.id,s)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(s){const c=this._map.get(s);return c&&typeof c=="object"&&"id"in c&&this._idmap.delete(c.id),this._map.delete(s),this}get(s){const c=s._zod.parent;if(c){const u={...this.get(c)??{}};delete u.id;const d={...u,...this._map.get(s)};return Object.keys(d).length?d:void 0}return this._map.get(s)}has(s){return this._map.has(s)}}function registry(){return new $ZodRegistry}const globalRegistry=registry();function _string(a,s){return new a({type:"string",...normalizeParams(s)})}function _email(a,s){return new a({type:"string",format:"email",check:"string_format",abort:!1,...normalizeParams(s)})}function _guid(a,s){return new a({type:"string",format:"guid",check:"string_format",abort:!1,...normalizeParams(s)})}function _uuid(a,s){return new a({type:"string",format:"uuid",check:"string_format",abort:!1,...normalizeParams(s)})}function _uuidv4(a,s){return new a({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...normalizeParams(s)})}function _uuidv6(a,s){return new a({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...normalizeParams(s)})}function _uuidv7(a,s){return new a({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...normalizeParams(s)})}function _url(a,s){return new a({type:"string",format:"url",check:"string_format",abort:!1,...normalizeParams(s)})}function _emoji(a,s){return new a({type:"string",format:"emoji",check:"string_format",abort:!1,...normalizeParams(s)})}function _nanoid(a,s){return new a({type:"string",format:"nanoid",check:"string_format",abort:!1,...normalizeParams(s)})}function _cuid(a,s){return new a({type:"string",format:"cuid",check:"string_format",abort:!1,...normalizeParams(s)})}function _cuid2(a,s){return new a({type:"string",format:"cuid2",check:"string_format",abort:!1,...normalizeParams(s)})}function _ulid(a,s){return new a({type:"string",format:"ulid",check:"string_format",abort:!1,...normalizeParams(s)})}function _xid(a,s){return new a({type:"string",format:"xid",check:"string_format",abort:!1,...normalizeParams(s)})}function _ksuid(a,s){return new a({type:"string",format:"ksuid",check:"string_format",abort:!1,...normalizeParams(s)})}function _ipv4(a,s){return new a({type:"string",format:"ipv4",check:"string_format",abort:!1,...normalizeParams(s)})}function _ipv6(a,s){return new a({type:"string",format:"ipv6",check:"string_format",abort:!1,...normalizeParams(s)})}function _cidrv4(a,s){return new a({type:"string",format:"cidrv4",check:"string_format",abort:!1,...normalizeParams(s)})}function _cidrv6(a,s){return new a({type:"string",format:"cidrv6",check:"string_format",abort:!1,...normalizeParams(s)})}function _base64(a,s){return new a({type:"string",format:"base64",check:"string_format",abort:!1,...normalizeParams(s)})}function _base64url(a,s){return new a({type:"string",format:"base64url",check:"string_format",abort:!1,...normalizeParams(s)})}function _e164(a,s){return new a({type:"string",format:"e164",check:"string_format",abort:!1,...normalizeParams(s)})}function _jwt(a,s){return new a({type:"string",format:"jwt",check:"string_format",abort:!1,...normalizeParams(s)})}function _isoDateTime(a,s){return new a({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...normalizeParams(s)})}function _isoDate(a,s){return new a({type:"string",format:"date",check:"string_format",...normalizeParams(s)})}function _isoTime(a,s){return new a({type:"string",format:"time",check:"string_format",precision:null,...normalizeParams(s)})}function _isoDuration(a,s){return new a({type:"string",format:"duration",check:"string_format",...normalizeParams(s)})}function _number(a,s){return new a({type:"number",checks:[],...normalizeParams(s)})}function _int(a,s){return new a({type:"number",check:"number_format",abort:!1,format:"safeint",...normalizeParams(s)})}function _boolean(a,s){return new a({type:"boolean",...normalizeParams(s)})}function _any(a){return new a({type:"any"})}function _unknown(a){return new a({type:"unknown"})}function _never(a,s){return new a({type:"never",...normalizeParams(s)})}function _date(a,s){return new a({type:"date",...normalizeParams(s)})}function _lt(a,s){return new $ZodCheckLessThan({check:"less_than",...normalizeParams(s),value:a,inclusive:!1})}function _lte(a,s){return new $ZodCheckLessThan({check:"less_than",...normalizeParams(s),value:a,inclusive:!0})}function _gt(a,s){return new $ZodCheckGreaterThan({check:"greater_than",...normalizeParams(s),value:a,inclusive:!1})}function _gte(a,s){return new $ZodCheckGreaterThan({check:"greater_than",...normalizeParams(s),value:a,inclusive:!0})}function _multipleOf(a,s){return new $ZodCheckMultipleOf({check:"multiple_of",...normalizeParams(s),value:a})}function _maxLength(a,s){return new $ZodCheckMaxLength({check:"max_length",...normalizeParams(s),maximum:a})}function _minLength(a,s){return new $ZodCheckMinLength({check:"min_length",...normalizeParams(s),minimum:a})}function _length(a,s){return new $ZodCheckLengthEquals({check:"length_equals",...normalizeParams(s),length:a})}function _regex(a,s){return new $ZodCheckRegex({check:"string_format",format:"regex",...normalizeParams(s),pattern:a})}function _lowercase(a){return new $ZodCheckLowerCase({check:"string_format",format:"lowercase",...normalizeParams(a)})}function _uppercase(a){return new $ZodCheckUpperCase({check:"string_format",format:"uppercase",...normalizeParams(a)})}function _includes(a,s){return new $ZodCheckIncludes({check:"string_format",format:"includes",...normalizeParams(s),includes:a})}function _startsWith(a,s){return new $ZodCheckStartsWith({check:"string_format",format:"starts_with",...normalizeParams(s),prefix:a})}function _endsWith(a,s){return new $ZodCheckEndsWith({check:"string_format",format:"ends_with",...normalizeParams(s),suffix:a})}function _overwrite(a){return new $ZodCheckOverwrite({check:"overwrite",tx:a})}function _normalize(a){return _overwrite(s=>s.normalize(a))}function _trim(){return _overwrite(a=>a.trim())}function _toLowerCase(){return _overwrite(a=>a.toLowerCase())}function _toUpperCase(){return _overwrite(a=>a.toUpperCase())}function _array(a,s,c){return new a({type:"array",element:s,...normalizeParams(c)})}function _refine(a,s,c){return new a({type:"custom",check:"custom",fn:s,...normalizeParams(c)})}function _superRefine(a){const s=_check(c=>(c.addIssue=u=>{if(typeof u=="string")c.issues.push(issue(u,c.value,s._zod.def));else{const d=u;d.fatal&&(d.continue=!1),d.code??(d.code="custom"),d.input??(d.input=c.value),d.inst??(d.inst=s),d.continue??(d.continue=!s._zod.def.abort),c.issues.push(issue(d))}},a(c.value,c)));return s}function _check(a,s){const c=new $ZodCheck({check:"custom",...normalizeParams(s)});return c._zod.check=a,c}const ZodISODateTime=$constructor("ZodISODateTime",(a,s)=>{$ZodISODateTime.init(a,s),ZodStringFormat.init(a,s)});function datetime(a){return _isoDateTime(ZodISODateTime,a)}const ZodISODate=$constructor("ZodISODate",(a,s)=>{$ZodISODate.init(a,s),ZodStringFormat.init(a,s)});function date$2(a){return _isoDate(ZodISODate,a)}const ZodISOTime=$constructor("ZodISOTime",(a,s)=>{$ZodISOTime.init(a,s),ZodStringFormat.init(a,s)});function time(a){return _isoTime(ZodISOTime,a)}const ZodISODuration=$constructor("ZodISODuration",(a,s)=>{$ZodISODuration.init(a,s),ZodStringFormat.init(a,s)});function duration(a){return _isoDuration(ZodISODuration,a)}const initializer=(a,s)=>{$ZodError.init(a,s),a.name="ZodError",Object.defineProperties(a,{format:{value:c=>formatError(a,c)},flatten:{value:c=>flattenError(a,c)},addIssue:{value:c=>{a.issues.push(c),a.message=JSON.stringify(a.issues,jsonStringifyReplacer,2)}},addIssues:{value:c=>{a.issues.push(...c),a.message=JSON.stringify(a.issues,jsonStringifyReplacer,2)}},isEmpty:{get(){return a.issues.length===0}}})},ZodError=$constructor("ZodError",initializer),ZodRealError=$constructor("ZodError",initializer,{Parent:Error}),parse$2=_parse(ZodRealError),parseAsync=_parseAsync(ZodRealError),safeParse=_safeParse(ZodRealError),safeParseAsync=_safeParseAsync(ZodRealError),encode=_encode(ZodRealError),decode$1=_decode(ZodRealError),encodeAsync=_encodeAsync(ZodRealError),decodeAsync=_decodeAsync(ZodRealError),safeEncode=_safeEncode(ZodRealError),safeDecode=_safeDecode(ZodRealError),safeEncodeAsync=_safeEncodeAsync(ZodRealError),safeDecodeAsync=_safeDecodeAsync(ZodRealError),ZodType=$constructor("ZodType",(a,s)=>($ZodType.init(a,s),a.def=s,a.type=s.type,Object.defineProperty(a,"_def",{value:s}),a.check=(...c)=>a.clone(mergeDefs(s,{checks:[...s.checks??[],...c.map(u=>typeof u=="function"?{_zod:{check:u,def:{check:"custom"},onattach:[]}}:u)]})),a.clone=(c,u)=>clone$2(a,c,u),a.brand=()=>a,a.register=((c,u)=>(c.add(a,u),a)),a.parse=(c,u)=>parse$2(a,c,u,{callee:a.parse}),a.safeParse=(c,u)=>safeParse(a,c,u),a.parseAsync=async(c,u)=>parseAsync(a,c,u,{callee:a.parseAsync}),a.safeParseAsync=async(c,u)=>safeParseAsync(a,c,u),a.spa=a.safeParseAsync,a.encode=(c,u)=>encode(a,c,u),a.decode=(c,u)=>decode$1(a,c,u),a.encodeAsync=async(c,u)=>encodeAsync(a,c,u),a.decodeAsync=async(c,u)=>decodeAsync(a,c,u),a.safeEncode=(c,u)=>safeEncode(a,c,u),a.safeDecode=(c,u)=>safeDecode(a,c,u),a.safeEncodeAsync=async(c,u)=>safeEncodeAsync(a,c,u),a.safeDecodeAsync=async(c,u)=>safeDecodeAsync(a,c,u),a.refine=(c,u)=>a.check(refine(c,u)),a.superRefine=c=>a.check(superRefine(c)),a.overwrite=c=>a.check(_overwrite(c)),a.optional=()=>optional(a),a.nullable=()=>nullable(a),a.nullish=()=>optional(nullable(a)),a.nonoptional=c=>nonoptional(a,c),a.array=()=>array$1(a),a.or=c=>union([a,c]),a.and=c=>intersection(a,c),a.transform=c=>pipe(a,transform$1(c)),a.default=c=>_default(a,c),a.prefault=c=>prefault(a,c),a.catch=c=>_catch(a,c),a.pipe=c=>pipe(a,c),a.readonly=()=>readonly(a),a.describe=c=>{const u=a.clone();return globalRegistry.add(u,{description:c}),u},Object.defineProperty(a,"description",{get(){return globalRegistry.get(a)?.description},configurable:!0}),a.meta=(...c)=>{if(c.length===0)return globalRegistry.get(a);const u=a.clone();return globalRegistry.add(u,c[0]),u},a.isOptional=()=>a.safeParse(void 0).success,a.isNullable=()=>a.safeParse(null).success,a)),_ZodString=$constructor("_ZodString",(a,s)=>{$ZodString.init(a,s),ZodType.init(a,s);const c=a._zod.bag;a.format=c.format??null,a.minLength=c.minimum??null,a.maxLength=c.maximum??null,a.regex=(...u)=>a.check(_regex(...u)),a.includes=(...u)=>a.check(_includes(...u)),a.startsWith=(...u)=>a.check(_startsWith(...u)),a.endsWith=(...u)=>a.check(_endsWith(...u)),a.min=(...u)=>a.check(_minLength(...u)),a.max=(...u)=>a.check(_maxLength(...u)),a.length=(...u)=>a.check(_length(...u)),a.nonempty=(...u)=>a.check(_minLength(1,...u)),a.lowercase=u=>a.check(_lowercase(u)),a.uppercase=u=>a.check(_uppercase(u)),a.trim=()=>a.check(_trim()),a.normalize=(...u)=>a.check(_normalize(...u)),a.toLowerCase=()=>a.check(_toLowerCase()),a.toUpperCase=()=>a.check(_toUpperCase())}),ZodString=$constructor("ZodString",(a,s)=>{$ZodString.init(a,s),_ZodString.init(a,s),a.email=c=>a.check(_email(ZodEmail,c)),a.url=c=>a.check(_url(ZodURL,c)),a.jwt=c=>a.check(_jwt(ZodJWT,c)),a.emoji=c=>a.check(_emoji(ZodEmoji,c)),a.guid=c=>a.check(_guid(ZodGUID,c)),a.uuid=c=>a.check(_uuid(ZodUUID,c)),a.uuidv4=c=>a.check(_uuidv4(ZodUUID,c)),a.uuidv6=c=>a.check(_uuidv6(ZodUUID,c)),a.uuidv7=c=>a.check(_uuidv7(ZodUUID,c)),a.nanoid=c=>a.check(_nanoid(ZodNanoID,c)),a.guid=c=>a.check(_guid(ZodGUID,c)),a.cuid=c=>a.check(_cuid(ZodCUID,c)),a.cuid2=c=>a.check(_cuid2(ZodCUID2,c)),a.ulid=c=>a.check(_ulid(ZodULID,c)),a.base64=c=>a.check(_base64(ZodBase64,c)),a.base64url=c=>a.check(_base64url(ZodBase64URL,c)),a.xid=c=>a.check(_xid(ZodXID,c)),a.ksuid=c=>a.check(_ksuid(ZodKSUID,c)),a.ipv4=c=>a.check(_ipv4(ZodIPv4,c)),a.ipv6=c=>a.check(_ipv6(ZodIPv6,c)),a.cidrv4=c=>a.check(_cidrv4(ZodCIDRv4,c)),a.cidrv6=c=>a.check(_cidrv6(ZodCIDRv6,c)),a.e164=c=>a.check(_e164(ZodE164,c)),a.datetime=c=>a.check(datetime(c)),a.date=c=>a.check(date$2(c)),a.time=c=>a.check(time(c)),a.duration=c=>a.check(duration(c))});function string$1(a){return _string(ZodString,a)}const ZodStringFormat=$constructor("ZodStringFormat",(a,s)=>{$ZodStringFormat.init(a,s),_ZodString.init(a,s)}),ZodEmail=$constructor("ZodEmail",(a,s)=>{$ZodEmail.init(a,s),ZodStringFormat.init(a,s)}),ZodGUID=$constructor("ZodGUID",(a,s)=>{$ZodGUID.init(a,s),ZodStringFormat.init(a,s)}),ZodUUID=$constructor("ZodUUID",(a,s)=>{$ZodUUID.init(a,s),ZodStringFormat.init(a,s)}),ZodURL=$constructor("ZodURL",(a,s)=>{$ZodURL.init(a,s),ZodStringFormat.init(a,s)}),ZodEmoji=$constructor("ZodEmoji",(a,s)=>{$ZodEmoji.init(a,s),ZodStringFormat.init(a,s)}),ZodNanoID=$constructor("ZodNanoID",(a,s)=>{$ZodNanoID.init(a,s),ZodStringFormat.init(a,s)}),ZodCUID=$constructor("ZodCUID",(a,s)=>{$ZodCUID.init(a,s),ZodStringFormat.init(a,s)}),ZodCUID2=$constructor("ZodCUID2",(a,s)=>{$ZodCUID2.init(a,s),ZodStringFormat.init(a,s)}),ZodULID=$constructor("ZodULID",(a,s)=>{$ZodULID.init(a,s),ZodStringFormat.init(a,s)}),ZodXID=$constructor("ZodXID",(a,s)=>{$ZodXID.init(a,s),ZodStringFormat.init(a,s)}),ZodKSUID=$constructor("ZodKSUID",(a,s)=>{$ZodKSUID.init(a,s),ZodStringFormat.init(a,s)}),ZodIPv4=$constructor("ZodIPv4",(a,s)=>{$ZodIPv4.init(a,s),ZodStringFormat.init(a,s)}),ZodIPv6=$constructor("ZodIPv6",(a,s)=>{$ZodIPv6.init(a,s),ZodStringFormat.init(a,s)}),ZodCIDRv4=$constructor("ZodCIDRv4",(a,s)=>{$ZodCIDRv4.init(a,s),ZodStringFormat.init(a,s)}),ZodCIDRv6=$constructor("ZodCIDRv6",(a,s)=>{$ZodCIDRv6.init(a,s),ZodStringFormat.init(a,s)}),ZodBase64=$constructor("ZodBase64",(a,s)=>{$ZodBase64.init(a,s),ZodStringFormat.init(a,s)}),ZodBase64URL=$constructor("ZodBase64URL",(a,s)=>{$ZodBase64URL.init(a,s),ZodStringFormat.init(a,s)}),ZodE164=$constructor("ZodE164",(a,s)=>{$ZodE164.init(a,s),ZodStringFormat.init(a,s)}),ZodJWT=$constructor("ZodJWT",(a,s)=>{$ZodJWT.init(a,s),ZodStringFormat.init(a,s)}),ZodNumber=$constructor("ZodNumber",(a,s)=>{$ZodNumber.init(a,s),ZodType.init(a,s),a.gt=(u,d)=>a.check(_gt(u,d)),a.gte=(u,d)=>a.check(_gte(u,d)),a.min=(u,d)=>a.check(_gte(u,d)),a.lt=(u,d)=>a.check(_lt(u,d)),a.lte=(u,d)=>a.check(_lte(u,d)),a.max=(u,d)=>a.check(_lte(u,d)),a.int=u=>a.check(int(u)),a.safe=u=>a.check(int(u)),a.positive=u=>a.check(_gt(0,u)),a.nonnegative=u=>a.check(_gte(0,u)),a.negative=u=>a.check(_lt(0,u)),a.nonpositive=u=>a.check(_lte(0,u)),a.multipleOf=(u,d)=>a.check(_multipleOf(u,d)),a.step=(u,d)=>a.check(_multipleOf(u,d)),a.finite=()=>a;const c=a._zod.bag;a.minValue=Math.max(c.minimum??Number.NEGATIVE_INFINITY,c.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,a.maxValue=Math.min(c.maximum??Number.POSITIVE_INFINITY,c.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,a.isInt=(c.format??"").includes("int")||Number.isSafeInteger(c.multipleOf??.5),a.isFinite=!0,a.format=c.format??null});function number$1(a){return _number(ZodNumber,a)}const ZodNumberFormat=$constructor("ZodNumberFormat",(a,s)=>{$ZodNumberFormat.init(a,s),ZodNumber.init(a,s)});function int(a){return _int(ZodNumberFormat,a)}const ZodBoolean=$constructor("ZodBoolean",(a,s)=>{$ZodBoolean.init(a,s),ZodType.init(a,s)});function boolean$1(a){return _boolean(ZodBoolean,a)}const ZodAny=$constructor("ZodAny",(a,s)=>{$ZodAny.init(a,s),ZodType.init(a,s)});function any$1(){return _any(ZodAny)}const ZodUnknown=$constructor("ZodUnknown",(a,s)=>{$ZodUnknown.init(a,s),ZodType.init(a,s)});function unknown(){return _unknown(ZodUnknown)}const ZodNever=$constructor("ZodNever",(a,s)=>{$ZodNever.init(a,s),ZodType.init(a,s)});function never(a){return _never(ZodNever,a)}const ZodDate=$constructor("ZodDate",(a,s)=>{$ZodDate.init(a,s),ZodType.init(a,s),a.min=(u,d)=>a.check(_gte(u,d)),a.max=(u,d)=>a.check(_lte(u,d));const c=a._zod.bag;a.minDate=c.minimum?new Date(c.minimum):null,a.maxDate=c.maximum?new Date(c.maximum):null});function date$1(a){return _date(ZodDate,a)}const ZodArray=$constructor("ZodArray",(a,s)=>{$ZodArray.init(a,s),ZodType.init(a,s),a.element=s.element,a.min=(c,u)=>a.check(_minLength(c,u)),a.nonempty=c=>a.check(_minLength(1,c)),a.max=(c,u)=>a.check(_maxLength(c,u)),a.length=(c,u)=>a.check(_length(c,u)),a.unwrap=()=>a.element});function array$1(a,s){return _array(ZodArray,a,s)}const ZodObject=$constructor("ZodObject",(a,s)=>{$ZodObjectJIT.init(a,s),ZodType.init(a,s),defineLazy(a,"shape",()=>s.shape),a.keyof=()=>_enum(Object.keys(a._zod.def.shape)),a.catchall=c=>a.clone({...a._zod.def,catchall:c}),a.passthrough=()=>a.clone({...a._zod.def,catchall:unknown()}),a.loose=()=>a.clone({...a._zod.def,catchall:unknown()}),a.strict=()=>a.clone({...a._zod.def,catchall:never()}),a.strip=()=>a.clone({...a._zod.def,catchall:void 0}),a.extend=c=>extend(a,c),a.safeExtend=c=>safeExtend(a,c),a.merge=c=>merge$2(a,c),a.pick=c=>pick(a,c),a.omit=c=>omit$1(a,c),a.partial=(...c)=>partial(ZodOptional,a,c[0]),a.required=(...c)=>required$2(ZodNonOptional,a,c[0])});function object$1(a,s){const c={type:"object",shape:a??{},...normalizeParams(s)};return new ZodObject(c)}const ZodUnion=$constructor("ZodUnion",(a,s)=>{$ZodUnion.init(a,s),ZodType.init(a,s),a.options=s.options});function union(a,s){return new ZodUnion({type:"union",options:a,...normalizeParams(s)})}const ZodIntersection=$constructor("ZodIntersection",(a,s)=>{$ZodIntersection.init(a,s),ZodType.init(a,s)});function intersection(a,s){return new ZodIntersection({type:"intersection",left:a,right:s})}const ZodTuple=$constructor("ZodTuple",(a,s)=>{$ZodTuple.init(a,s),ZodType.init(a,s),a.rest=c=>a.clone({...a._zod.def,rest:c})});function tuple(a,s,c){const u=s instanceof $ZodType,d=u?c:s,p=u?s:null;return new ZodTuple({type:"tuple",items:a,rest:p,...normalizeParams(d)})}const ZodRecord=$constructor("ZodRecord",(a,s)=>{$ZodRecord.init(a,s),ZodType.init(a,s),a.keyType=s.keyType,a.valueType=s.valueType});function record(a,s,c){return new ZodRecord({type:"record",keyType:a,valueType:s,...normalizeParams(c)})}const ZodEnum=$constructor("ZodEnum",(a,s)=>{$ZodEnum.init(a,s),ZodType.init(a,s),a.enum=s.entries,a.options=Object.values(s.entries);const c=new Set(Object.keys(s.entries));a.extract=(u,d)=>{const p={};for(const v of u)if(c.has(v))p[v]=s.entries[v];else throw new Error(`Key ${v} not found in enum`);return new ZodEnum({...s,checks:[],...normalizeParams(d),entries:p})},a.exclude=(u,d)=>{const p={...s.entries};for(const v of u)if(c.has(v))delete p[v];else throw new Error(`Key ${v} not found in enum`);return new ZodEnum({...s,checks:[],...normalizeParams(d),entries:p})}});function _enum(a,s){const c=Array.isArray(a)?Object.fromEntries(a.map(u=>[u,u])):a;return new ZodEnum({type:"enum",entries:c,...normalizeParams(s)})}const ZodTransform=$constructor("ZodTransform",(a,s)=>{$ZodTransform.init(a,s),ZodType.init(a,s),a._zod.parse=(c,u)=>{if(u.direction==="backward")throw new $ZodEncodeError(a.constructor.name);c.addIssue=p=>{if(typeof p=="string")c.issues.push(issue(p,c.value,s));else{const v=p;v.fatal&&(v.continue=!1),v.code??(v.code="custom"),v.input??(v.input=c.value),v.inst??(v.inst=a),c.issues.push(issue(v))}};const d=s.transform(c.value,c);return d instanceof Promise?d.then(p=>(c.value=p,c)):(c.value=d,c)}});function transform$1(a){return new ZodTransform({type:"transform",transform:a})}const ZodOptional=$constructor("ZodOptional",(a,s)=>{$ZodOptional.init(a,s),ZodType.init(a,s),a.unwrap=()=>a._zod.def.innerType});function optional(a){return new ZodOptional({type:"optional",innerType:a})}const ZodNullable=$constructor("ZodNullable",(a,s)=>{$ZodNullable.init(a,s),ZodType.init(a,s),a.unwrap=()=>a._zod.def.innerType});function nullable(a){return new ZodNullable({type:"nullable",innerType:a})}const ZodDefault=$constructor("ZodDefault",(a,s)=>{$ZodDefault.init(a,s),ZodType.init(a,s),a.unwrap=()=>a._zod.def.innerType,a.removeDefault=a.unwrap});function _default(a,s){return new ZodDefault({type:"default",innerType:a,get defaultValue(){return typeof s=="function"?s():shallowClone(s)}})}const ZodPrefault=$constructor("ZodPrefault",(a,s)=>{$ZodPrefault.init(a,s),ZodType.init(a,s),a.unwrap=()=>a._zod.def.innerType});function prefault(a,s){return new ZodPrefault({type:"prefault",innerType:a,get defaultValue(){return typeof s=="function"?s():shallowClone(s)}})}const ZodNonOptional=$constructor("ZodNonOptional",(a,s)=>{$ZodNonOptional.init(a,s),ZodType.init(a,s),a.unwrap=()=>a._zod.def.innerType});function nonoptional(a,s){return new ZodNonOptional({type:"nonoptional",innerType:a,...normalizeParams(s)})}const ZodCatch=$constructor("ZodCatch",(a,s)=>{$ZodCatch.init(a,s),ZodType.init(a,s),a.unwrap=()=>a._zod.def.innerType,a.removeCatch=a.unwrap});function _catch(a,s){return new ZodCatch({type:"catch",innerType:a,catchValue:typeof s=="function"?s:()=>s})}const ZodPipe=$constructor("ZodPipe",(a,s)=>{$ZodPipe.init(a,s),ZodType.init(a,s),a.in=s.in,a.out=s.out});function pipe(a,s){return new ZodPipe({type:"pipe",in:a,out:s})}const ZodReadonly=$constructor("ZodReadonly",(a,s)=>{$ZodReadonly.init(a,s),ZodType.init(a,s),a.unwrap=()=>a._zod.def.innerType});function readonly(a){return new ZodReadonly({type:"readonly",innerType:a})}const ZodCustom=$constructor("ZodCustom",(a,s)=>{$ZodCustom.init(a,s),ZodType.init(a,s)});function refine(a,s={}){return _refine(ZodCustom,a,s)}function superRefine(a){return _superRefine(a)}var buffer$1={},base64Js={},hasRequiredBase64Js;function requireBase64Js(){if(hasRequiredBase64Js)return base64Js;hasRequiredBase64Js=1,base64Js.byteLength=A,base64Js.toByteArray=g,base64Js.fromByteArray=f;for(var a=[],s=[],c=typeof Uint8Array<"u"?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,p=u.length;d<p;++d)a[d]=u[d],s[u.charCodeAt(d)]=d;s[45]=62,s[95]=63;function v(m){var E=m.length;if(E%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var w=m.indexOf("=");w===-1&&(w=E);var S=w===E?0:4-w%4;return[w,S]}function A(m){var E=v(m),w=E[0],S=E[1];return(w+S)*3/4-S}function x(m,E,w){return(E+w)*3/4-w}function g(m){var E,w=v(m),S=w[0],$=w[1],T=new c(x(m,S,$)),I=0,_=$>0?S-4:S,C;for(C=0;C<_;C+=4)E=s[m.charCodeAt(C)]<<18|s[m.charCodeAt(C+1)]<<12|s[m.charCodeAt(C+2)]<<6|s[m.charCodeAt(C+3)],T[I++]=E>>16&255,T[I++]=E>>8&255,T[I++]=E&255;return $===2&&(E=s[m.charCodeAt(C)]<<2|s[m.charCodeAt(C+1)]>>4,T[I++]=E&255),$===1&&(E=s[m.charCodeAt(C)]<<10|s[m.charCodeAt(C+1)]<<4|s[m.charCodeAt(C+2)]>>2,T[I++]=E>>8&255,T[I++]=E&255),T}function b(m){return a[m>>18&63]+a[m>>12&63]+a[m>>6&63]+a[m&63]}function y(m,E,w){for(var S,$=[],T=E;T<w;T+=3)S=(m[T]<<16&16711680)+(m[T+1]<<8&65280)+(m[T+2]&255),$.push(b(S));return $.join("")}function f(m){for(var E,w=m.length,S=w%3,$=[],T=16383,I=0,_=w-S;I<_;I+=T)$.push(y(m,I,I+T>_?_:I+T));return S===1?(E=m[w-1],$.push(a[E>>2]+a[E<<4&63]+"==")):S===2&&(E=(m[w-2]<<8)+m[w-1],$.push(a[E>>10]+a[E>>4&63]+a[E<<2&63]+"=")),$.join("")}return base64Js}var ieee754={};var hasRequiredIeee754;function requireIeee754(){return hasRequiredIeee754||(hasRequiredIeee754=1,ieee754.read=function(a,s,c,u,d){var p,v,A=d*8-u-1,x=(1<<A)-1,g=x>>1,b=-7,y=c?d-1:0,f=c?-1:1,m=a[s+y];for(y+=f,p=m&(1<<-b)-1,m>>=-b,b+=A;b>0;p=p*256+a[s+y],y+=f,b-=8);for(v=p&(1<<-b)-1,p>>=-b,b+=u;b>0;v=v*256+a[s+y],y+=f,b-=8);if(p===0)p=1-g;else{if(p===x)return v?NaN:(m?-1:1)*(1/0);v=v+Math.pow(2,u),p=p-g}return(m?-1:1)*v*Math.pow(2,p-u)},ieee754.write=function(a,s,c,u,d,p){var v,A,x,g=p*8-d-1,b=(1<<g)-1,y=b>>1,f=d===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=u?0:p-1,E=u?1:-1,w=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(A=isNaN(s)?1:0,v=b):(v=Math.floor(Math.log(s)/Math.LN2),s*(x=Math.pow(2,-v))<1&&(v--,x*=2),v+y>=1?s+=f/x:s+=f*Math.pow(2,1-y),s*x>=2&&(v++,x/=2),v+y>=b?(A=0,v=b):v+y>=1?(A=(s*x-1)*Math.pow(2,d),v=v+y):(A=s*Math.pow(2,y-1)*Math.pow(2,d),v=0));d>=8;a[c+m]=A&255,m+=E,A/=256,d-=8);for(v=v<<d|A,g+=d;g>0;a[c+m]=v&255,m+=E,v/=256,g-=8);a[c+m-E]|=w*128}),ieee754}var hasRequiredBuffer;function requireBuffer(){return hasRequiredBuffer||(hasRequiredBuffer=1,(function(a){const s=requireBase64Js(),c=requireIeee754(),u=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;a.Buffer=A,a.SlowBuffer=T,a.INSPECT_MAX_BYTES=50;const d=2147483647;a.kMaxLength=d,A.TYPED_ARRAY_SUPPORT=p(),!A.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function p(){try{const Ae=new Uint8Array(1),ue={foo:function(){return 42}};return Object.setPrototypeOf(ue,Uint8Array.prototype),Object.setPrototypeOf(Ae,ue),Ae.foo()===42}catch{return!1}}Object.defineProperty(A.prototype,"parent",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.buffer}}),Object.defineProperty(A.prototype,"offset",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.byteOffset}});function v(Ae){if(Ae>d)throw new RangeError('The value "'+Ae+'" is invalid for option "size"');const ue=new Uint8Array(Ae);return Object.setPrototypeOf(ue,A.prototype),ue}function A(Ae,ue,ce){if(typeof Ae=="number"){if(typeof ue=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return y(Ae)}return x(Ae,ue,ce)}A.poolSize=8192;function x(Ae,ue,ce){if(typeof Ae=="string")return f(Ae,ue);if(ArrayBuffer.isView(Ae))return E(Ae);if(Ae==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Ae);if(ye(Ae,ArrayBuffer)||Ae&&ye(Ae.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ye(Ae,SharedArrayBuffer)||Ae&&ye(Ae.buffer,SharedArrayBuffer)))return w(Ae,ue,ce);if(typeof Ae=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Ce=Ae.valueOf&&Ae.valueOf();if(Ce!=null&&Ce!==Ae)return A.from(Ce,ue,ce);const _e=S(Ae);if(_e)return _e;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Ae[Symbol.toPrimitive]=="function")return A.from(Ae[Symbol.toPrimitive]("string"),ue,ce);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Ae)}A.from=function(Ae,ue,ce){return x(Ae,ue,ce)},Object.setPrototypeOf(A.prototype,Uint8Array.prototype),Object.setPrototypeOf(A,Uint8Array);function g(Ae){if(typeof Ae!="number")throw new TypeError('"size" argument must be of type number');if(Ae<0)throw new RangeError('The value "'+Ae+'" is invalid for option "size"')}function b(Ae,ue,ce){return g(Ae),Ae<=0?v(Ae):ue!==void 0?typeof ce=="string"?v(Ae).fill(ue,ce):v(Ae).fill(ue):v(Ae)}A.alloc=function(Ae,ue,ce){return b(Ae,ue,ce)};function y(Ae){return g(Ae),v(Ae<0?0:$(Ae)|0)}A.allocUnsafe=function(Ae){return y(Ae)},A.allocUnsafeSlow=function(Ae){return y(Ae)};function f(Ae,ue){if((typeof ue!="string"||ue==="")&&(ue="utf8"),!A.isEncoding(ue))throw new TypeError("Unknown encoding: "+ue);const ce=I(Ae,ue)|0;let Ce=v(ce);const _e=Ce.write(Ae,ue);return _e!==ce&&(Ce=Ce.slice(0,_e)),Ce}function m(Ae){const ue=Ae.length<0?0:$(Ae.length)|0,ce=v(ue);for(let Ce=0;Ce<ue;Ce+=1)ce[Ce]=Ae[Ce]&255;return ce}function E(Ae){if(ye(Ae,Uint8Array)){const ue=new Uint8Array(Ae);return w(ue.buffer,ue.byteOffset,ue.byteLength)}return m(Ae)}function w(Ae,ue,ce){if(ue<0||Ae.byteLength<ue)throw new RangeError('"offset" is outside of buffer bounds');if(Ae.byteLength<ue+(ce||0))throw new RangeError('"length" is outside of buffer bounds');let Ce;return ue===void 0&&ce===void 0?Ce=new Uint8Array(Ae):ce===void 0?Ce=new Uint8Array(Ae,ue):Ce=new Uint8Array(Ae,ue,ce),Object.setPrototypeOf(Ce,A.prototype),Ce}function S(Ae){if(A.isBuffer(Ae)){const ue=$(Ae.length)|0,ce=v(ue);return ce.length===0||Ae.copy(ce,0,0,ue),ce}if(Ae.length!==void 0)return typeof Ae.length!="number"||Ee(Ae.length)?v(0):m(Ae);if(Ae.type==="Buffer"&&Array.isArray(Ae.data))return m(Ae.data)}function $(Ae){if(Ae>=d)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d.toString(16)+" bytes");return Ae|0}function T(Ae){return+Ae!=Ae&&(Ae=0),A.alloc(+Ae)}A.isBuffer=function(ue){return ue!=null&&ue._isBuffer===!0&&ue!==A.prototype},A.compare=function(ue,ce){if(ye(ue,Uint8Array)&&(ue=A.from(ue,ue.offset,ue.byteLength)),ye(ce,Uint8Array)&&(ce=A.from(ce,ce.offset,ce.byteLength)),!A.isBuffer(ue)||!A.isBuffer(ce))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ue===ce)return 0;let Ce=ue.length,_e=ce.length;for(let Te=0,De=Math.min(Ce,_e);Te<De;++Te)if(ue[Te]!==ce[Te]){Ce=ue[Te],_e=ce[Te];break}return Ce<_e?-1:_e<Ce?1:0},A.isEncoding=function(ue){switch(String(ue).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},A.concat=function(ue,ce){if(!Array.isArray(ue))throw new TypeError('"list" argument must be an Array of Buffers');if(ue.length===0)return A.alloc(0);let Ce;if(ce===void 0)for(ce=0,Ce=0;Ce<ue.length;++Ce)ce+=ue[Ce].length;const _e=A.allocUnsafe(ce);let Te=0;for(Ce=0;Ce<ue.length;++Ce){let De=ue[Ce];if(ye(De,Uint8Array))Te+De.length>_e.length?(A.isBuffer(De)||(De=A.from(De)),De.copy(_e,Te)):Uint8Array.prototype.set.call(_e,De,Te);else if(A.isBuffer(De))De.copy(_e,Te);else throw new TypeError('"list" argument must be an Array of Buffers');Te+=De.length}return _e};function I(Ae,ue){if(A.isBuffer(Ae))return Ae.length;if(ArrayBuffer.isView(Ae)||ye(Ae,ArrayBuffer))return Ae.byteLength;if(typeof Ae!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Ae);const ce=Ae.length,Ce=arguments.length>2&&arguments[2]===!0;if(!Ce&&ce===0)return 0;let _e=!1;for(;;)switch(ue){case"ascii":case"latin1":case"binary":return ce;case"utf8":case"utf-8":return me(Ae).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ce*2;case"hex":return ce>>>1;case"base64":return ve(Ae).length;default:if(_e)return Ce?-1:me(Ae).length;ue=(""+ue).toLowerCase(),_e=!0}}A.byteLength=I;function _(Ae,ue,ce){let Ce=!1;if((ue===void 0||ue<0)&&(ue=0),ue>this.length||((ce===void 0||ce>this.length)&&(ce=this.length),ce<=0)||(ce>>>=0,ue>>>=0,ce<=ue))return"";for(Ae||(Ae="utf8");;)switch(Ae){case"hex":return L(this,ue,ce);case"utf8":case"utf-8":return V(this,ue,ce);case"ascii":return N(this,ue,ce);case"latin1":case"binary":return P(this,ue,ce);case"base64":return j(this,ue,ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H(this,ue,ce);default:if(Ce)throw new TypeError("Unknown encoding: "+Ae);Ae=(Ae+"").toLowerCase(),Ce=!0}}A.prototype._isBuffer=!0;function C(Ae,ue,ce){const Ce=Ae[ue];Ae[ue]=Ae[ce],Ae[ce]=Ce}A.prototype.swap16=function(){const ue=this.length;if(ue%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let ce=0;ce<ue;ce+=2)C(this,ce,ce+1);return this},A.prototype.swap32=function(){const ue=this.length;if(ue%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let ce=0;ce<ue;ce+=4)C(this,ce,ce+3),C(this,ce+1,ce+2);return this},A.prototype.swap64=function(){const ue=this.length;if(ue%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let ce=0;ce<ue;ce+=8)C(this,ce,ce+7),C(this,ce+1,ce+6),C(this,ce+2,ce+5),C(this,ce+3,ce+4);return this},A.prototype.toString=function(){const ue=this.length;return ue===0?"":arguments.length===0?V(this,0,ue):_.apply(this,arguments)},A.prototype.toLocaleString=A.prototype.toString,A.prototype.equals=function(ue){if(!A.isBuffer(ue))throw new TypeError("Argument must be a Buffer");return this===ue?!0:A.compare(this,ue)===0},A.prototype.inspect=function(){let ue="";const ce=a.INSPECT_MAX_BYTES;return ue=this.toString("hex",0,ce).replace(/(.{2})/g,"$1 ").trim(),this.length>ce&&(ue+=" ... "),"<Buffer "+ue+">"},u&&(A.prototype[u]=A.prototype.inspect),A.prototype.compare=function(ue,ce,Ce,_e,Te){if(ye(ue,Uint8Array)&&(ue=A.from(ue,ue.offset,ue.byteLength)),!A.isBuffer(ue))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ue);if(ce===void 0&&(ce=0),Ce===void 0&&(Ce=ue?ue.length:0),_e===void 0&&(_e=0),Te===void 0&&(Te=this.length),ce<0||Ce>ue.length||_e<0||Te>this.length)throw new RangeError("out of range index");if(_e>=Te&&ce>=Ce)return 0;if(_e>=Te)return-1;if(ce>=Ce)return 1;if(ce>>>=0,Ce>>>=0,_e>>>=0,Te>>>=0,this===ue)return 0;let De=Te-_e,Re=Ce-ce;const Be=Math.min(De,Re),Pe=this.slice(_e,Te),Me=ue.slice(ce,Ce);for(let Fe=0;Fe<Be;++Fe)if(Pe[Fe]!==Me[Fe]){De=Pe[Fe],Re=Me[Fe];break}return De<Re?-1:Re<De?1:0};function R(Ae,ue,ce,Ce,_e){if(Ae.length===0)return-1;if(typeof ce=="string"?(Ce=ce,ce=0):ce>2147483647?ce=2147483647:ce<-2147483648&&(ce=-2147483648),ce=+ce,Ee(ce)&&(ce=_e?0:Ae.length-1),ce<0&&(ce=Ae.length+ce),ce>=Ae.length){if(_e)return-1;ce=Ae.length-1}else if(ce<0)if(_e)ce=0;else return-1;if(typeof ue=="string"&&(ue=A.from(ue,Ce)),A.isBuffer(ue))return ue.length===0?-1:B(Ae,ue,ce,Ce,_e);if(typeof ue=="number")return ue=ue&255,typeof Uint8Array.prototype.indexOf=="function"?_e?Uint8Array.prototype.indexOf.call(Ae,ue,ce):Uint8Array.prototype.lastIndexOf.call(Ae,ue,ce):B(Ae,[ue],ce,Ce,_e);throw new TypeError("val must be string, number or Buffer")}function B(Ae,ue,ce,Ce,_e){let Te=1,De=Ae.length,Re=ue.length;if(Ce!==void 0&&(Ce=String(Ce).toLowerCase(),Ce==="ucs2"||Ce==="ucs-2"||Ce==="utf16le"||Ce==="utf-16le")){if(Ae.length<2||ue.length<2)return-1;Te=2,De/=2,Re/=2,ce/=2}function Be(Me,Fe){return Te===1?Me[Fe]:Me.readUInt16BE(Fe*Te)}let Pe;if(_e){let Me=-1;for(Pe=ce;Pe<De;Pe++)if(Be(Ae,Pe)===Be(ue,Me===-1?0:Pe-Me)){if(Me===-1&&(Me=Pe),Pe-Me+1===Re)return Me*Te}else Me!==-1&&(Pe-=Pe-Me),Me=-1}else for(ce+Re>De&&(ce=De-Re),Pe=ce;Pe>=0;Pe--){let Me=!0;for(let Fe=0;Fe<Re;Fe++)if(Be(Ae,Pe+Fe)!==Be(ue,Fe)){Me=!1;break}if(Me)return Pe}return-1}A.prototype.includes=function(ue,ce,Ce){return this.indexOf(ue,ce,Ce)!==-1},A.prototype.indexOf=function(ue,ce,Ce){return R(this,ue,ce,Ce,!0)},A.prototype.lastIndexOf=function(ue,ce,Ce){return R(this,ue,ce,Ce,!1)};function k(Ae,ue,ce,Ce){ce=Number(ce)||0;const _e=Ae.length-ce;Ce?(Ce=Number(Ce),Ce>_e&&(Ce=_e)):Ce=_e;const Te=ue.length;Ce>Te/2&&(Ce=Te/2);let De;for(De=0;De<Ce;++De){const Re=parseInt(ue.substr(De*2,2),16);if(Ee(Re))return De;Ae[ce+De]=Re}return De}function O(Ae,ue,ce,Ce){return he(me(ue,Ae.length-ce),Ae,ce,Ce)}function F(Ae,ue,ce,Ce){return he(be(ue),Ae,ce,Ce)}function M(Ae,ue,ce,Ce){return he(ve(ue),Ae,ce,Ce)}function G(Ae,ue,ce,Ce){return he(le(ue,Ae.length-ce),Ae,ce,Ce)}A.prototype.write=function(ue,ce,Ce,_e){if(ce===void 0)_e="utf8",Ce=this.length,ce=0;else if(Ce===void 0&&typeof ce=="string")_e=ce,Ce=this.length,ce=0;else if(isFinite(ce))ce=ce>>>0,isFinite(Ce)?(Ce=Ce>>>0,_e===void 0&&(_e="utf8")):(_e=Ce,Ce=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Te=this.length-ce;if((Ce===void 0||Ce>Te)&&(Ce=Te),ue.length>0&&(Ce<0||ce<0)||ce>this.length)throw new RangeError("Attempt to write outside buffer bounds");_e||(_e="utf8");let De=!1;for(;;)switch(_e){case"hex":return k(this,ue,ce,Ce);case"utf8":case"utf-8":return O(this,ue,ce,Ce);case"ascii":case"latin1":case"binary":return F(this,ue,ce,Ce);case"base64":return M(this,ue,ce,Ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,ue,ce,Ce);default:if(De)throw new TypeError("Unknown encoding: "+_e);_e=(""+_e).toLowerCase(),De=!0}},A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function j(Ae,ue,ce){return ue===0&&ce===Ae.length?s.fromByteArray(Ae):s.fromByteArray(Ae.slice(ue,ce))}function V(Ae,ue,ce){ce=Math.min(Ae.length,ce);const Ce=[];let _e=ue;for(;_e<ce;){const Te=Ae[_e];let De=null,Re=Te>239?4:Te>223?3:Te>191?2:1;if(_e+Re<=ce){let Be,Pe,Me,Fe;switch(Re){case 1:Te<128&&(De=Te);break;case 2:Be=Ae[_e+1],(Be&192)===128&&(Fe=(Te&31)<<6|Be&63,Fe>127&&(De=Fe));break;case 3:Be=Ae[_e+1],Pe=Ae[_e+2],(Be&192)===128&&(Pe&192)===128&&(Fe=(Te&15)<<12|(Be&63)<<6|Pe&63,Fe>2047&&(Fe<55296||Fe>57343)&&(De=Fe));break;case 4:Be=Ae[_e+1],Pe=Ae[_e+2],Me=Ae[_e+3],(Be&192)===128&&(Pe&192)===128&&(Me&192)===128&&(Fe=(Te&15)<<18|(Be&63)<<12|(Pe&63)<<6|Me&63,Fe>65535&&Fe<1114112&&(De=Fe))}}De===null?(De=65533,Re=1):De>65535&&(De-=65536,Ce.push(De>>>10&1023|55296),De=56320|De&1023),Ce.push(De),_e+=Re}return D(Ce)}const U=4096;function D(Ae){const ue=Ae.length;if(ue<=U)return String.fromCharCode.apply(String,Ae);let ce="",Ce=0;for(;Ce<ue;)ce+=String.fromCharCode.apply(String,Ae.slice(Ce,Ce+=U));return ce}function N(Ae,ue,ce){let Ce="";ce=Math.min(Ae.length,ce);for(let _e=ue;_e<ce;++_e)Ce+=String.fromCharCode(Ae[_e]&127);return Ce}function P(Ae,ue,ce){let Ce="";ce=Math.min(Ae.length,ce);for(let _e=ue;_e<ce;++_e)Ce+=String.fromCharCode(Ae[_e]);return Ce}function L(Ae,ue,ce){const Ce=Ae.length;(!ue||ue<0)&&(ue=0),(!ce||ce<0||ce>Ce)&&(ce=Ce);let _e="";for(let Te=ue;Te<ce;++Te)_e+=xe[Ae[Te]];return _e}function H(Ae,ue,ce){const Ce=Ae.slice(ue,ce);let _e="";for(let Te=0;Te<Ce.length-1;Te+=2)_e+=String.fromCharCode(Ce[Te]+Ce[Te+1]*256);return _e}A.prototype.slice=function(ue,ce){const Ce=this.length;ue=~~ue,ce=ce===void 0?Ce:~~ce,ue<0?(ue+=Ce,ue<0&&(ue=0)):ue>Ce&&(ue=Ce),ce<0?(ce+=Ce,ce<0&&(ce=0)):ce>Ce&&(ce=Ce),ce<ue&&(ce=ue);const _e=this.subarray(ue,ce);return Object.setPrototypeOf(_e,A.prototype),_e};function W(Ae,ue,ce){if(Ae%1!==0||Ae<0)throw new RangeError("offset is not uint");if(Ae+ue>ce)throw new RangeError("Trying to access beyond buffer length")}A.prototype.readUintLE=A.prototype.readUIntLE=function(ue,ce,Ce){ue=ue>>>0,ce=ce>>>0,Ce||W(ue,ce,this.length);let _e=this[ue],Te=1,De=0;for(;++De<ce&&(Te*=256);)_e+=this[ue+De]*Te;return _e},A.prototype.readUintBE=A.prototype.readUIntBE=function(ue,ce,Ce){ue=ue>>>0,ce=ce>>>0,Ce||W(ue,ce,this.length);let _e=this[ue+--ce],Te=1;for(;ce>0&&(Te*=256);)_e+=this[ue+--ce]*Te;return _e},A.prototype.readUint8=A.prototype.readUInt8=function(ue,ce){return ue=ue>>>0,ce||W(ue,1,this.length),this[ue]},A.prototype.readUint16LE=A.prototype.readUInt16LE=function(ue,ce){return ue=ue>>>0,ce||W(ue,2,this.length),this[ue]|this[ue+1]<<8},A.prototype.readUint16BE=A.prototype.readUInt16BE=function(ue,ce){return ue=ue>>>0,ce||W(ue,2,this.length),this[ue]<<8|this[ue+1]},A.prototype.readUint32LE=A.prototype.readUInt32LE=function(ue,ce){return ue=ue>>>0,ce||W(ue,4,this.length),(this[ue]|this[ue+1]<<8|this[ue+2]<<16)+this[ue+3]*16777216},A.prototype.readUint32BE=A.prototype.readUInt32BE=function(ue,ce){return ue=ue>>>0,ce||W(ue,4,this.length),this[ue]*16777216+(this[ue+1]<<16|this[ue+2]<<8|this[ue+3])},A.prototype.readBigUInt64LE=we(function(ue){ue=ue>>>0,se(ue,"offset");const ce=this[ue],Ce=this[ue+7];(ce===void 0||Ce===void 0)&&fe(ue,this.length-8);const _e=ce+this[++ue]*2**8+this[++ue]*2**16+this[++ue]*2**24,Te=this[++ue]+this[++ue]*2**8+this[++ue]*2**16+Ce*2**24;return BigInt(_e)+(BigInt(Te)<<BigInt(32))}),A.prototype.readBigUInt64BE=we(function(ue){ue=ue>>>0,se(ue,"offset");const ce=this[ue],Ce=this[ue+7];(ce===void 0||Ce===void 0)&&fe(ue,this.length-8);const _e=ce*2**24+this[++ue]*2**16+this[++ue]*2**8+this[++ue],Te=this[++ue]*2**24+this[++ue]*2**16+this[++ue]*2**8+Ce;return(BigInt(_e)<<BigInt(32))+BigInt(Te)}),A.prototype.readIntLE=function(ue,ce,Ce){ue=ue>>>0,ce=ce>>>0,Ce||W(ue,ce,this.length);let _e=this[ue],Te=1,De=0;for(;++De<ce&&(Te*=256);)_e+=this[ue+De]*Te;return Te*=128,_e>=Te&&(_e-=Math.pow(2,8*ce)),_e},A.prototype.readIntBE=function(ue,ce,Ce){ue=ue>>>0,ce=ce>>>0,Ce||W(ue,ce,this.length);let _e=ce,Te=1,De=this[ue+--_e];for(;_e>0&&(Te*=256);)De+=this[ue+--_e]*Te;return Te*=128,De>=Te&&(De-=Math.pow(2,8*ce)),De},A.prototype.readInt8=function(ue,ce){return ue=ue>>>0,ce||W(ue,1,this.length),this[ue]&128?(255-this[ue]+1)*-1:this[ue]},A.prototype.readInt16LE=function(ue,ce){ue=ue>>>0,ce||W(ue,2,this.length);const Ce=this[ue]|this[ue+1]<<8;return Ce&32768?Ce|4294901760:Ce},A.prototype.readInt16BE=function(ue,ce){ue=ue>>>0,ce||W(ue,2,this.length);const Ce=this[ue+1]|this[ue]<<8;return Ce&32768?Ce|4294901760:Ce},A.prototype.readInt32LE=function(ue,ce){return ue=ue>>>0,ce||W(ue,4,this.length),this[ue]|this[ue+1]<<8|this[ue+2]<<16|this[ue+3]<<24},A.prototype.readInt32BE=function(ue,ce){return ue=ue>>>0,ce||W(ue,4,this.length),this[ue]<<24|this[ue+1]<<16|this[ue+2]<<8|this[ue+3]},A.prototype.readBigInt64LE=we(function(ue){ue=ue>>>0,se(ue,"offset");const ce=this[ue],Ce=this[ue+7];(ce===void 0||Ce===void 0)&&fe(ue,this.length-8);const _e=this[ue+4]+this[ue+5]*2**8+this[ue+6]*2**16+(Ce<<24);return(BigInt(_e)<<BigInt(32))+BigInt(ce+this[++ue]*2**8+this[++ue]*2**16+this[++ue]*2**24)}),A.prototype.readBigInt64BE=we(function(ue){ue=ue>>>0,se(ue,"offset");const ce=this[ue],Ce=this[ue+7];(ce===void 0||Ce===void 0)&&fe(ue,this.length-8);const _e=(ce<<24)+this[++ue]*2**16+this[++ue]*2**8+this[++ue];return(BigInt(_e)<<BigInt(32))+BigInt(this[++ue]*2**24+this[++ue]*2**16+this[++ue]*2**8+Ce)}),A.prototype.readFloatLE=function(ue,ce){return ue=ue>>>0,ce||W(ue,4,this.length),c.read(this,ue,!0,23,4)},A.prototype.readFloatBE=function(ue,ce){return ue=ue>>>0,ce||W(ue,4,this.length),c.read(this,ue,!1,23,4)},A.prototype.readDoubleLE=function(ue,ce){return ue=ue>>>0,ce||W(ue,8,this.length),c.read(this,ue,!0,52,8)},A.prototype.readDoubleBE=function(ue,ce){return ue=ue>>>0,ce||W(ue,8,this.length),c.read(this,ue,!1,52,8)};function J(Ae,ue,ce,Ce,_e,Te){if(!A.isBuffer(Ae))throw new TypeError('"buffer" argument must be a Buffer instance');if(ue>_e||ue<Te)throw new RangeError('"value" argument is out of bounds');if(ce+Ce>Ae.length)throw new RangeError("Index out of range")}A.prototype.writeUintLE=A.prototype.writeUIntLE=function(ue,ce,Ce,_e){if(ue=+ue,ce=ce>>>0,Ce=Ce>>>0,!_e){const Re=Math.pow(2,8*Ce)-1;J(this,ue,ce,Ce,Re,0)}let Te=1,De=0;for(this[ce]=ue&255;++De<Ce&&(Te*=256);)this[ce+De]=ue/Te&255;return ce+Ce},A.prototype.writeUintBE=A.prototype.writeUIntBE=function(ue,ce,Ce,_e){if(ue=+ue,ce=ce>>>0,Ce=Ce>>>0,!_e){const Re=Math.pow(2,8*Ce)-1;J(this,ue,ce,Ce,Re,0)}let Te=Ce-1,De=1;for(this[ce+Te]=ue&255;--Te>=0&&(De*=256);)this[ce+Te]=ue/De&255;return ce+Ce},A.prototype.writeUint8=A.prototype.writeUInt8=function(ue,ce,Ce){return ue=+ue,ce=ce>>>0,Ce||J(this,ue,ce,1,255,0),this[ce]=ue&255,ce+1},A.prototype.writeUint16LE=A.prototype.writeUInt16LE=function(ue,ce,Ce){return ue=+ue,ce=ce>>>0,Ce||J(this,ue,ce,2,65535,0),this[ce]=ue&255,this[ce+1]=ue>>>8,ce+2},A.prototype.writeUint16BE=A.prototype.writeUInt16BE=function(ue,ce,Ce){return ue=+ue,ce=ce>>>0,Ce||J(this,ue,ce,2,65535,0),this[ce]=ue>>>8,this[ce+1]=ue&255,ce+2},A.prototype.writeUint32LE=A.prototype.writeUInt32LE=function(ue,ce,Ce){return ue=+ue,ce=ce>>>0,Ce||J(this,ue,ce,4,4294967295,0),this[ce+3]=ue>>>24,this[ce+2]=ue>>>16,this[ce+1]=ue>>>8,this[ce]=ue&255,ce+4},A.prototype.writeUint32BE=A.prototype.writeUInt32BE=function(ue,ce,Ce){return ue=+ue,ce=ce>>>0,Ce||J(this,ue,ce,4,4294967295,0),this[ce]=ue>>>24,this[ce+1]=ue>>>16,this[ce+2]=ue>>>8,this[ce+3]=ue&255,ce+4};function re(Ae,ue,ce,Ce,_e){oe(ue,Ce,_e,Ae,ce,7);let Te=Number(ue&BigInt(4294967295));Ae[ce++]=Te,Te=Te>>8,Ae[ce++]=Te,Te=Te>>8,Ae[ce++]=Te,Te=Te>>8,Ae[ce++]=Te;let De=Number(ue>>BigInt(32)&BigInt(4294967295));return Ae[ce++]=De,De=De>>8,Ae[ce++]=De,De=De>>8,Ae[ce++]=De,De=De>>8,Ae[ce++]=De,ce}function K(Ae,ue,ce,Ce,_e){oe(ue,Ce,_e,Ae,ce,7);let Te=Number(ue&BigInt(4294967295));Ae[ce+7]=Te,Te=Te>>8,Ae[ce+6]=Te,Te=Te>>8,Ae[ce+5]=Te,Te=Te>>8,Ae[ce+4]=Te;let De=Number(ue>>BigInt(32)&BigInt(4294967295));return Ae[ce+3]=De,De=De>>8,Ae[ce+2]=De,De=De>>8,Ae[ce+1]=De,De=De>>8,Ae[ce]=De,ce+8}A.prototype.writeBigUInt64LE=we(function(ue,ce=0){return re(this,ue,ce,BigInt(0),BigInt("0xffffffffffffffff"))}),A.prototype.writeBigUInt64BE=we(function(ue,ce=0){return K(this,ue,ce,BigInt(0),BigInt("0xffffffffffffffff"))}),A.prototype.writeIntLE=function(ue,ce,Ce,_e){if(ue=+ue,ce=ce>>>0,!_e){const Be=Math.pow(2,8*Ce-1);J(this,ue,ce,Ce,Be-1,-Be)}let Te=0,De=1,Re=0;for(this[ce]=ue&255;++Te<Ce&&(De*=256);)ue<0&&Re===0&&this[ce+Te-1]!==0&&(Re=1),this[ce+Te]=(ue/De>>0)-Re&255;return ce+Ce},A.prototype.writeIntBE=function(ue,ce,Ce,_e){if(ue=+ue,ce=ce>>>0,!_e){const Be=Math.pow(2,8*Ce-1);J(this,ue,ce,Ce,Be-1,-Be)}let Te=Ce-1,De=1,Re=0;for(this[ce+Te]=ue&255;--Te>=0&&(De*=256);)ue<0&&Re===0&&this[ce+Te+1]!==0&&(Re=1),this[ce+Te]=(ue/De>>0)-Re&255;return ce+Ce},A.prototype.writeInt8=function(ue,ce,Ce){return ue=+ue,ce=ce>>>0,Ce||J(this,ue,ce,1,127,-128),ue<0&&(ue=255+ue+1),this[ce]=ue&255,ce+1},A.prototype.writeInt16LE=function(ue,ce,Ce){return ue=+ue,ce=ce>>>0,Ce||J(this,ue,ce,2,32767,-32768),this[ce]=ue&255,this[ce+1]=ue>>>8,ce+2},A.prototype.writeInt16BE=function(ue,ce,Ce){return ue=+ue,ce=ce>>>0,Ce||J(this,ue,ce,2,32767,-32768),this[ce]=ue>>>8,this[ce+1]=ue&255,ce+2},A.prototype.writeInt32LE=function(ue,ce,Ce){return ue=+ue,ce=ce>>>0,Ce||J(this,ue,ce,4,2147483647,-2147483648),this[ce]=ue&255,this[ce+1]=ue>>>8,this[ce+2]=ue>>>16,this[ce+3]=ue>>>24,ce+4},A.prototype.writeInt32BE=function(ue,ce,Ce){return ue=+ue,ce=ce>>>0,Ce||J(this,ue,ce,4,2147483647,-2147483648),ue<0&&(ue=4294967295+ue+1),this[ce]=ue>>>24,this[ce+1]=ue>>>16,this[ce+2]=ue>>>8,this[ce+3]=ue&255,ce+4},A.prototype.writeBigInt64LE=we(function(ue,ce=0){return re(this,ue,ce,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),A.prototype.writeBigInt64BE=we(function(ue,ce=0){return K(this,ue,ce,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function q(Ae,ue,ce,Ce,_e,Te){if(ce+Ce>Ae.length)throw new RangeError("Index out of range");if(ce<0)throw new RangeError("Index out of range")}function Y(Ae,ue,ce,Ce,_e){return ue=+ue,ce=ce>>>0,_e||q(Ae,ue,ce,4),c.write(Ae,ue,ce,Ce,23,4),ce+4}A.prototype.writeFloatLE=function(ue,ce,Ce){return Y(this,ue,ce,!0,Ce)},A.prototype.writeFloatBE=function(ue,ce,Ce){return Y(this,ue,ce,!1,Ce)};function ee(Ae,ue,ce,Ce,_e){return ue=+ue,ce=ce>>>0,_e||q(Ae,ue,ce,8),c.write(Ae,ue,ce,Ce,52,8),ce+8}A.prototype.writeDoubleLE=function(ue,ce,Ce){return ee(this,ue,ce,!0,Ce)},A.prototype.writeDoubleBE=function(ue,ce,Ce){return ee(this,ue,ce,!1,Ce)},A.prototype.copy=function(ue,ce,Ce,_e){if(!A.isBuffer(ue))throw new TypeError("argument should be a Buffer");if(Ce||(Ce=0),!_e&&_e!==0&&(_e=this.length),ce>=ue.length&&(ce=ue.length),ce||(ce=0),_e>0&&_e<Ce&&(_e=Ce),_e===Ce||ue.length===0||this.length===0)return 0;if(ce<0)throw new RangeError("targetStart out of bounds");if(Ce<0||Ce>=this.length)throw new RangeError("Index out of range");if(_e<0)throw new RangeError("sourceEnd out of bounds");_e>this.length&&(_e=this.length),ue.length-ce<_e-Ce&&(_e=ue.length-ce+Ce);const Te=_e-Ce;return this===ue&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(ce,Ce,_e):Uint8Array.prototype.set.call(ue,this.subarray(Ce,_e),ce),Te},A.prototype.fill=function(ue,ce,Ce,_e){if(typeof ue=="string"){if(typeof ce=="string"?(_e=ce,ce=0,Ce=this.length):typeof Ce=="string"&&(_e=Ce,Ce=this.length),_e!==void 0&&typeof _e!="string")throw new TypeError("encoding must be a string");if(typeof _e=="string"&&!A.isEncoding(_e))throw new TypeError("Unknown encoding: "+_e);if(ue.length===1){const De=ue.charCodeAt(0);(_e==="utf8"&&De<128||_e==="latin1")&&(ue=De)}}else typeof ue=="number"?ue=ue&255:typeof ue=="boolean"&&(ue=Number(ue));if(ce<0||this.length<ce||this.length<Ce)throw new RangeError("Out of range index");if(Ce<=ce)return this;ce=ce>>>0,Ce=Ce===void 0?this.length:Ce>>>0,ue||(ue=0);let Te;if(typeof ue=="number")for(Te=ce;Te<Ce;++Te)this[Te]=ue;else{const De=A.isBuffer(ue)?ue:A.from(ue,_e),Re=De.length;if(Re===0)throw new TypeError('The value "'+ue+'" is invalid for argument "value"');for(Te=0;Te<Ce-ce;++Te)this[Te+ce]=De[Te%Re]}return this};const Q={};function Z(Ae,ue,ce){Q[Ae]=class extends ce{constructor(){super(),Object.defineProperty(this,"message",{value:ue.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Ae}]`,this.stack,delete this.name}get code(){return Ae}set code(_e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:_e,writable:!0})}toString(){return`${this.name} [${Ae}]: ${this.message}`}}}Z("ERR_BUFFER_OUT_OF_BOUNDS",function(Ae){return Ae?`${Ae} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Z("ERR_INVALID_ARG_TYPE",function(Ae,ue){return`The "${Ae}" argument must be of type number. Received type ${typeof ue}`},TypeError),Z("ERR_OUT_OF_RANGE",function(Ae,ue,ce){let Ce=`The value of "${Ae}" is out of range.`,_e=ce;return Number.isInteger(ce)&&Math.abs(ce)>2**32?_e=te(String(ce)):typeof ce=="bigint"&&(_e=String(ce),(ce>BigInt(2)**BigInt(32)||ce<-(BigInt(2)**BigInt(32)))&&(_e=te(_e)),_e+="n"),Ce+=` It must be ${ue}. Received ${_e}`,Ce},RangeError);function te(Ae){let ue="",ce=Ae.length;const Ce=Ae[0]==="-"?1:0;for(;ce>=Ce+4;ce-=3)ue=`_${Ae.slice(ce-3,ce)}${ue}`;return`${Ae.slice(0,ce)}${ue}`}function ae(Ae,ue,ce){se(ue,"offset"),(Ae[ue]===void 0||Ae[ue+ce]===void 0)&&fe(ue,Ae.length-(ce+1))}function oe(Ae,ue,ce,Ce,_e,Te){if(Ae>ce||Ae<ue){const De=typeof ue=="bigint"?"n":"";let Re;throw ue===0||ue===BigInt(0)?Re=`>= 0${De} and < 2${De} ** ${(Te+1)*8}${De}`:Re=`>= -(2${De} ** ${(Te+1)*8-1}${De}) and < 2 ** ${(Te+1)*8-1}${De}`,new Q.ERR_OUT_OF_RANGE("value",Re,Ae)}ae(Ce,_e,Te)}function se(Ae,ue){if(typeof Ae!="number")throw new Q.ERR_INVALID_ARG_TYPE(ue,"number",Ae)}function fe(Ae,ue,ce){throw Math.floor(Ae)!==Ae?(se(Ae,ce),new Q.ERR_OUT_OF_RANGE("offset","an integer",Ae)):ue<0?new Q.ERR_BUFFER_OUT_OF_BOUNDS:new Q.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${ue}`,Ae)}const pe=/[^+/0-9A-Za-z-_]/g;function ge(Ae){if(Ae=Ae.split("=")[0],Ae=Ae.trim().replace(pe,""),Ae.length<2)return"";for(;Ae.length%4!==0;)Ae=Ae+"=";return Ae}function me(Ae,ue){ue=ue||1/0;let ce;const Ce=Ae.length;let _e=null;const Te=[];for(let De=0;De<Ce;++De){if(ce=Ae.charCodeAt(De),ce>55295&&ce<57344){if(!_e){if(ce>56319){(ue-=3)>-1&&Te.push(239,191,189);continue}else if(De+1===Ce){(ue-=3)>-1&&Te.push(239,191,189);continue}_e=ce;continue}if(ce<56320){(ue-=3)>-1&&Te.push(239,191,189),_e=ce;continue}ce=(_e-55296<<10|ce-56320)+65536}else _e&&(ue-=3)>-1&&Te.push(239,191,189);if(_e=null,ce<128){if((ue-=1)<0)break;Te.push(ce)}else if(ce<2048){if((ue-=2)<0)break;Te.push(ce>>6|192,ce&63|128)}else if(ce<65536){if((ue-=3)<0)break;Te.push(ce>>12|224,ce>>6&63|128,ce&63|128)}else if(ce<1114112){if((ue-=4)<0)break;Te.push(ce>>18|240,ce>>12&63|128,ce>>6&63|128,ce&63|128)}else throw new Error("Invalid code point")}return Te}function be(Ae){const ue=[];for(let ce=0;ce<Ae.length;++ce)ue.push(Ae.charCodeAt(ce)&255);return ue}function le(Ae,ue){let ce,Ce,_e;const Te=[];for(let De=0;De<Ae.length&&!((ue-=2)<0);++De)ce=Ae.charCodeAt(De),Ce=ce>>8,_e=ce%256,Te.push(_e),Te.push(Ce);return Te}function ve(Ae){return s.toByteArray(ge(Ae))}function he(Ae,ue,ce,Ce){let _e;for(_e=0;_e<Ce&&!(_e+ce>=ue.length||_e>=Ae.length);++_e)ue[_e+ce]=Ae[_e];return _e}function ye(Ae,ue){return Ae instanceof ue||Ae!=null&&Ae.constructor!=null&&Ae.constructor.name!=null&&Ae.constructor.name===ue.name}function Ee(Ae){return Ae!==Ae}const xe=(function(){const Ae="0123456789abcdef",ue=new Array(256);for(let ce=0;ce<16;++ce){const Ce=ce*16;for(let _e=0;_e<16;++_e)ue[Ce+_e]=Ae[ce]+Ae[_e]}return ue})();function we(Ae){return typeof BigInt>"u"?$e:Ae}function $e(){throw new Error("BigInt not supported")}})(buffer$1)),buffer$1}var bufferExports=requireBuffer();const langs=["en","zh","ja","ko","ar","th","pl","it","de","es","fr"],Lang=_enum(langs);object$1({cancel:string$1(),close:string$1(),set:string$1(),clear:string$1(),field:string$1(),fieldName:string$1(),align:string$1(),width:string$1(),opacity:string$1(),height:string$1(),rotate:string$1(),edit:string$1(),required:string$1(),editable:string$1(),plsInputName:string$1(),fieldMustUniq:string$1(),notUniq:string$1(),noKeyName:string$1(),fieldsList:string$1(),editField:string$1(),type:string$1(),errorOccurred:string$1(),errorBulkUpdateFieldName:string$1(),commitBulkUpdateFieldName:string$1(),bulkUpdateFieldName:string$1(),addPageAfter:string$1(),removePage:string$1(),removePageConfirm:string$1(),"validation.uniqueName":string$1(),"validation.hexColor":string$1(),"validation.dateTimeFormat":string$1(),"schemas.color":string$1(),"schemas.borderWidth":string$1(),"schemas.borderColor":string$1(),"schemas.backgroundColor":string$1(),"schemas.textColor":string$1(),"schemas.bgColor":string$1(),"schemas.horizontal":string$1(),"schemas.vertical":string$1(),"schemas.left":string$1(),"schemas.center":string$1(),"schemas.right":string$1(),"schemas.top":string$1(),"schemas.middle":string$1(),"schemas.bottom":string$1(),"schemas.padding":string$1(),"schemas.text.fontName":string$1(),"schemas.text.size":string$1(),"schemas.text.spacing":string$1(),"schemas.text.textAlign":string$1(),"schemas.text.verticalAlign":string$1(),"schemas.text.lineHeight":string$1(),"schemas.text.min":string$1(),"schemas.text.max":string$1(),"schemas.text.fit":string$1(),"schemas.text.dynamicFontSize":string$1(),"schemas.text.format":string$1(),"schemas.radius":string$1(),"schemas.mvt.typingInstructions":string$1(),"schemas.mvt.sampleField":string$1(),"schemas.mvt.variablesSampleData":string$1(),"schemas.barcodes.barColor":string$1(),"schemas.barcodes.includetext":string$1(),"schemas.table.alternateBackgroundColor":string$1(),"schemas.table.tableStyle":string$1(),"schemas.table.showHead":string$1(),"schemas.table.headStyle":string$1(),"schemas.table.bodyStyle":string$1(),"schemas.table.columnStyle":string$1(),"schemas.date.format":string$1(),"schemas.date.locale":string$1(),"schemas.select.options":string$1(),"schemas.select.optionPlaceholder":string$1(),"schemas.radioGroup.groupName":string$1()}),_enum(["viewer","form","designer"]);const ColorType=_enum(["rgb","cmyk"]).optional();object$1({height:number$1(),width:number$1()});const Schema$1=object$1({name:string$1(),type:string$1(),content:string$1().optional(),position:object$1({x:number$1(),y:number$1()}),width:number$1(),height:number$1(),rotate:number$1().optional(),opacity:number$1().optional(),readOnly:boolean$1().optional(),required:boolean$1().optional(),__bodyRange:object$1({start:number$1(),end:number$1().optional()}).optional(),__isSplit:boolean$1().optional()}).passthrough(),SchemaForUIAdditionalInfo=object$1({id:string$1()});Schema$1.merge(SchemaForUIAdditionalInfo);const ArrayBufferSchema=any$1().refine(a=>a instanceof ArrayBuffer),Uint8ArraySchema=any$1().refine(a=>a instanceof Uint8Array),BlankPdf=object$1({width:number$1(),height:number$1(),padding:tuple([number$1(),number$1(),number$1(),number$1()]),staticSchema:array$1(Schema$1).optional()}),CustomPdf=union([string$1(),ArrayBufferSchema,Uint8ArraySchema]),BasePdf=union([CustomPdf,BlankPdf]);array$1(record(string$1(),Schema$1));const SchemaPageArray=array$1(array$1(Schema$1)),Template=object$1({schemas:SchemaPageArray,basePdf:BasePdf,pdfmeVersion:string$1().optional()}).passthrough(),Inputs=array$1(record(string$1(),any$1())).min(1),Font=record(string$1(),object$1({data:union([string$1(),ArrayBufferSchema,Uint8ArraySchema]),fallback:boolean$1().optional(),subset:boolean$1().optional()})),Plugin=object$1({ui:any$1(),pdf:any$1(),propPanel:object$1({schema:unknown(),widgets:record(string$1(),any$1()).optional(),defaultSchema:Schema$1}),icon:string$1().optional()}).passthrough(),CommonOptions=object$1({font:Font.optional()}).passthrough(),CommonProps=object$1({template:Template,options:CommonOptions.optional(),plugins:record(string$1(),Plugin).optional()}),GeneratorOptions=CommonOptions.extend({colorType:ColorType,author:string$1().optional(),creationDate:date$1().optional(),creator:string$1().optional(),keywords:array$1(string$1()).optional(),lang:Lang.optional(),modificationDate:date$1().optional(),producer:string$1().optional(),subject:string$1().optional(),title:string$1().optional()});CommonProps.extend({inputs:Inputs,options:GeneratorOptions.optional()}).strict();const UIOptions=CommonOptions.extend({lang:Lang.optional(),labels:record(string$1(),string$1()).optional(),theme:record(string$1(),unknown()).optional(),icons:record(string$1(),string$1()).optional(),requiredByDefault:boolean$1().optional(),maxZoom:number$1().optional(),sidebarOpen:boolean$1().optional(),zoomLevel:number$1().optional()}),HTMLElementSchema=any$1().refine(a=>a instanceof HTMLElement),UIProps=CommonProps.extend({domContainer:HTMLElementSchema,options:UIOptions.optional()}),PreviewProps=UIProps.extend({inputs:Inputs}).strict(),DesignerProps=UIProps.extend({}).strict(),cloneDeep$1=structuredClone,uniq=a=>Array.from(new Set(a)),getFallbackFontName=a=>{const c=Object.entries(a).reduce((u,d)=>{const[p,v]=d;return!u&&v.fallback?p:u},"");if(c==="")throw Error("[@pdfme/common] fallback flag is not found in font. true fallback flag must be only one.");return c},getDefaultFont=()=>({[DEFAULT_FONT_NAME]:{data:b64toUint8Array(DEFAULT_FONT_VALUE),fallback:!0}}),mm2pt=a=>parseFloat(String(a))*MM_TO_PT_RATIO,pt2mm=a=>a*PT_TO_MM_RATIO,pt2px=a=>a*PT_TO_PX_RATIO,px2mm=a=>parseFloat(String(a))*.26458333333333,blob2Base64Pdf=a=>new Promise((s,c)=>{const u=new FileReader;u.onloadend=()=>{u.result.startsWith("data:application/pdf;")?s(u.result):c(Error("[@pdfme/common] template.basePdf must be pdf data."))},u.readAsDataURL(a)}),isHexValid=a=>/^#(?:[A-Fa-f0-9]{3,4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/i.test(a),migrateTemplate=a=>{a.schemas&&Array.isArray(a.schemas)&&a.schemas.length>0&&!Array.isArray(a.schemas[0])&&(a.schemas=a.schemas.map(s=>Object.entries(s).map(([c,u])=>({...u,name:c}))))},getB64BasePdf=async a=>{if(typeof a=="string"&&!a.startsWith("data:application/pdf;")&&typeof window<"u"){const u=await(await fetch(a)).blob();return blob2Base64Pdf(u)}if(typeof a=="string")return a;const s=a instanceof Uint8Array?a:new Uint8Array(a);return"data:application/pdf;base64,"+bufferExports.Buffer.from(s).toString("base64")},isBlankPdf=a=>BlankPdf.safeParse(a).success,getByteString=a=>bufferExports.Buffer.from(a,"base64").toString("binary"),b64toUint8Array=a=>{const s=a.split(";base64,")[1]?a.split(";base64,")[1]:a,c=getByteString(s),u=new Uint8Array(c.length);for(let d=0;d<c.length;d+=1)u[d]=c.charCodeAt(d);return u},getFontNamesInSchemas=a=>uniq(a.map(s=>s.map(c=>c.fontName??"")).reduce((s,c)=>s.concat(c),[]).filter(Boolean)),checkFont=a=>{const{font:s,template:{schemas:c}}=a,d=Object.values(s).reduce((A,x)=>x.fallback?A+1:A,0);if(d===0)throw Error(`[@pdfme/common] fallback flag is not found in font. true fallback flag must be only one.
|
|
24
|
+
`)}m.write("payload.value = newResult;"),m.write("return payload;");const T=m.compile();return(I,_)=>T(f,I,_)};let p;const v=isObject$5,A=!globalConfig$1.jitless,g=A&&allowsEval.value,b=s.catchall;let y;a._zod.parse=(f,m)=>{y??(y=u.value);const E=f.value;return v(E)?A&&g&&m?.async===!1&&m.jitless!==!0?(p||(p=d(s.shape)),f=p(f,m),b?handleCatchall([],E,f,m,y,a):f):c(f,m):(f.issues.push({expected:"object",code:"invalid_type",input:E,inst:a}),f)}});function handleUnionResults(a,s,c,u){for(const p of a)if(p.issues.length===0)return s.value=p.value,s;const d=a.filter(p=>!aborted(p));return d.length===1?(s.value=d[0].value,d[0]):(s.issues.push({code:"invalid_union",input:s.value,inst:c,errors:a.map(p=>p.issues.map(v=>finalizeIssue(v,u,config())))}),s)}const $ZodUnion=$constructor("$ZodUnion",(a,s)=>{$ZodType.init(a,s),defineLazy(a._zod,"optin",()=>s.options.some(d=>d._zod.optin==="optional")?"optional":void 0),defineLazy(a._zod,"optout",()=>s.options.some(d=>d._zod.optout==="optional")?"optional":void 0),defineLazy(a._zod,"values",()=>{if(s.options.every(d=>d._zod.values))return new Set(s.options.flatMap(d=>Array.from(d._zod.values)))}),defineLazy(a._zod,"pattern",()=>{if(s.options.every(d=>d._zod.pattern)){const d=s.options.map(p=>p._zod.pattern);return new RegExp(`^(${d.map(p=>cleanRegex(p.source)).join("|")})$`)}});const c=s.options.length===1,u=s.options[0]._zod.run;a._zod.parse=(d,p)=>{if(c)return u(d,p);let v=!1;const A=[];for(const x of s.options){const g=x._zod.run({value:d.value,issues:[]},p);if(g instanceof Promise)A.push(g),v=!0;else{if(g.issues.length===0)return g;A.push(g)}}return v?Promise.all(A).then(x=>handleUnionResults(x,d,a,p)):handleUnionResults(A,d,a,p)}}),$ZodIntersection=$constructor("$ZodIntersection",(a,s)=>{$ZodType.init(a,s),a._zod.parse=(c,u)=>{const d=c.value,p=s.left._zod.run({value:d,issues:[]},u),v=s.right._zod.run({value:d,issues:[]},u);return p instanceof Promise||v instanceof Promise?Promise.all([p,v]).then(([x,g])=>handleIntersectionResults(c,x,g)):handleIntersectionResults(c,p,v)}});function mergeValues(a,s){if(a===s)return{valid:!0,data:a};if(a instanceof Date&&s instanceof Date&&+a==+s)return{valid:!0,data:a};if(isPlainObject$1(a)&&isPlainObject$1(s)){const c=Object.keys(s),u=Object.keys(a).filter(p=>c.indexOf(p)!==-1),d={...a,...s};for(const p of u){const v=mergeValues(a[p],s[p]);if(!v.valid)return{valid:!1,mergeErrorPath:[p,...v.mergeErrorPath]};d[p]=v.data}return{valid:!0,data:d}}if(Array.isArray(a)&&Array.isArray(s)){if(a.length!==s.length)return{valid:!1,mergeErrorPath:[]};const c=[];for(let u=0;u<a.length;u++){const d=a[u],p=s[u],v=mergeValues(d,p);if(!v.valid)return{valid:!1,mergeErrorPath:[u,...v.mergeErrorPath]};c.push(v.data)}return{valid:!0,data:c}}return{valid:!1,mergeErrorPath:[]}}function handleIntersectionResults(a,s,c){if(s.issues.length&&a.issues.push(...s.issues),c.issues.length&&a.issues.push(...c.issues),aborted(a))return a;const u=mergeValues(s.value,c.value);if(!u.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(u.mergeErrorPath)}`);return a.value=u.data,a}const $ZodTuple=$constructor("$ZodTuple",(a,s)=>{$ZodType.init(a,s);const c=s.items,u=c.length-[...c].reverse().findIndex(d=>d._zod.optin!=="optional");a._zod.parse=(d,p)=>{const v=d.value;if(!Array.isArray(v))return d.issues.push({input:v,inst:a,expected:"tuple",code:"invalid_type"}),d;d.value=[];const A=[];if(!s.rest){const g=v.length>c.length,b=v.length<u-1;if(g||b)return d.issues.push({...g?{code:"too_big",maximum:c.length}:{code:"too_small",minimum:c.length},input:v,inst:a,origin:"array"}),d}let x=-1;for(const g of c){if(x++,x>=v.length&&x>=u)continue;const b=g._zod.run({value:v[x],issues:[]},p);b instanceof Promise?A.push(b.then(y=>handleTupleResult(y,d,x))):handleTupleResult(b,d,x)}if(s.rest){const g=v.slice(c.length);for(const b of g){x++;const y=s.rest._zod.run({value:b,issues:[]},p);y instanceof Promise?A.push(y.then(f=>handleTupleResult(f,d,x))):handleTupleResult(y,d,x)}}return A.length?Promise.all(A).then(()=>d):d}});function handleTupleResult(a,s,c){a.issues.length&&s.issues.push(...prefixIssues(c,a.issues)),s.value[c]=a.value}const $ZodRecord=$constructor("$ZodRecord",(a,s)=>{$ZodType.init(a,s),a._zod.parse=(c,u)=>{const d=c.value;if(!isPlainObject$1(d))return c.issues.push({expected:"record",code:"invalid_type",input:d,inst:a}),c;const p=[];if(s.keyType._zod.values){const v=s.keyType._zod.values;c.value={};for(const x of v)if(typeof x=="string"||typeof x=="number"||typeof x=="symbol"){const g=s.valueType._zod.run({value:d[x],issues:[]},u);g instanceof Promise?p.push(g.then(b=>{b.issues.length&&c.issues.push(...prefixIssues(x,b.issues)),c.value[x]=b.value})):(g.issues.length&&c.issues.push(...prefixIssues(x,g.issues)),c.value[x]=g.value)}let A;for(const x in d)v.has(x)||(A=A??[],A.push(x));A&&A.length>0&&c.issues.push({code:"unrecognized_keys",input:d,inst:a,keys:A})}else{c.value={};for(const v of Reflect.ownKeys(d)){if(v==="__proto__")continue;const A=s.keyType._zod.run({value:v,issues:[]},u);if(A instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(A.issues.length){c.issues.push({code:"invalid_key",origin:"record",issues:A.issues.map(g=>finalizeIssue(g,u,config())),input:v,path:[v],inst:a}),c.value[A.value]=A.value;continue}const x=s.valueType._zod.run({value:d[v],issues:[]},u);x instanceof Promise?p.push(x.then(g=>{g.issues.length&&c.issues.push(...prefixIssues(v,g.issues)),c.value[A.value]=g.value})):(x.issues.length&&c.issues.push(...prefixIssues(v,x.issues)),c.value[A.value]=x.value)}}return p.length?Promise.all(p).then(()=>c):c}}),$ZodEnum=$constructor("$ZodEnum",(a,s)=>{$ZodType.init(a,s);const c=getEnumValues(s.entries),u=new Set(c);a._zod.values=u,a._zod.pattern=new RegExp(`^(${c.filter(d=>propertyKeyTypes.has(typeof d)).map(d=>typeof d=="string"?escapeRegex(d):d.toString()).join("|")})$`),a._zod.parse=(d,p)=>{const v=d.value;return u.has(v)||d.issues.push({code:"invalid_value",values:c,input:v,inst:a}),d}}),$ZodTransform=$constructor("$ZodTransform",(a,s)=>{$ZodType.init(a,s),a._zod.parse=(c,u)=>{if(u.direction==="backward")throw new $ZodEncodeError(a.constructor.name);const d=s.transform(c.value,c);if(u.async)return(d instanceof Promise?d:Promise.resolve(d)).then(v=>(c.value=v,c));if(d instanceof Promise)throw new $ZodAsyncError;return c.value=d,c}});function handleOptionalResult(a,s){return a.issues.length&&s===void 0?{issues:[],value:void 0}:a}const $ZodOptional=$constructor("$ZodOptional",(a,s)=>{$ZodType.init(a,s),a._zod.optin="optional",a._zod.optout="optional",defineLazy(a._zod,"values",()=>s.innerType._zod.values?new Set([...s.innerType._zod.values,void 0]):void 0),defineLazy(a._zod,"pattern",()=>{const c=s.innerType._zod.pattern;return c?new RegExp(`^(${cleanRegex(c.source)})?$`):void 0}),a._zod.parse=(c,u)=>{if(s.innerType._zod.optin==="optional"){const d=s.innerType._zod.run(c,u);return d instanceof Promise?d.then(p=>handleOptionalResult(p,c.value)):handleOptionalResult(d,c.value)}return c.value===void 0?c:s.innerType._zod.run(c,u)}}),$ZodNullable=$constructor("$ZodNullable",(a,s)=>{$ZodType.init(a,s),defineLazy(a._zod,"optin",()=>s.innerType._zod.optin),defineLazy(a._zod,"optout",()=>s.innerType._zod.optout),defineLazy(a._zod,"pattern",()=>{const c=s.innerType._zod.pattern;return c?new RegExp(`^(${cleanRegex(c.source)}|null)$`):void 0}),defineLazy(a._zod,"values",()=>s.innerType._zod.values?new Set([...s.innerType._zod.values,null]):void 0),a._zod.parse=(c,u)=>c.value===null?c:s.innerType._zod.run(c,u)}),$ZodDefault=$constructor("$ZodDefault",(a,s)=>{$ZodType.init(a,s),a._zod.optin="optional",defineLazy(a._zod,"values",()=>s.innerType._zod.values),a._zod.parse=(c,u)=>{if(u.direction==="backward")return s.innerType._zod.run(c,u);if(c.value===void 0)return c.value=s.defaultValue,c;const d=s.innerType._zod.run(c,u);return d instanceof Promise?d.then(p=>handleDefaultResult(p,s)):handleDefaultResult(d,s)}});function handleDefaultResult(a,s){return a.value===void 0&&(a.value=s.defaultValue),a}const $ZodPrefault=$constructor("$ZodPrefault",(a,s)=>{$ZodType.init(a,s),a._zod.optin="optional",defineLazy(a._zod,"values",()=>s.innerType._zod.values),a._zod.parse=(c,u)=>(u.direction==="backward"||c.value===void 0&&(c.value=s.defaultValue),s.innerType._zod.run(c,u))}),$ZodNonOptional=$constructor("$ZodNonOptional",(a,s)=>{$ZodType.init(a,s),defineLazy(a._zod,"values",()=>{const c=s.innerType._zod.values;return c?new Set([...c].filter(u=>u!==void 0)):void 0}),a._zod.parse=(c,u)=>{const d=s.innerType._zod.run(c,u);return d instanceof Promise?d.then(p=>handleNonOptionalResult(p,a)):handleNonOptionalResult(d,a)}});function handleNonOptionalResult(a,s){return!a.issues.length&&a.value===void 0&&a.issues.push({code:"invalid_type",expected:"nonoptional",input:a.value,inst:s}),a}const $ZodCatch=$constructor("$ZodCatch",(a,s)=>{$ZodType.init(a,s),defineLazy(a._zod,"optin",()=>s.innerType._zod.optin),defineLazy(a._zod,"optout",()=>s.innerType._zod.optout),defineLazy(a._zod,"values",()=>s.innerType._zod.values),a._zod.parse=(c,u)=>{if(u.direction==="backward")return s.innerType._zod.run(c,u);const d=s.innerType._zod.run(c,u);return d instanceof Promise?d.then(p=>(c.value=p.value,p.issues.length&&(c.value=s.catchValue({...c,error:{issues:p.issues.map(v=>finalizeIssue(v,u,config()))},input:c.value}),c.issues=[]),c)):(c.value=d.value,d.issues.length&&(c.value=s.catchValue({...c,error:{issues:d.issues.map(p=>finalizeIssue(p,u,config()))},input:c.value}),c.issues=[]),c)}}),$ZodPipe=$constructor("$ZodPipe",(a,s)=>{$ZodType.init(a,s),defineLazy(a._zod,"values",()=>s.in._zod.values),defineLazy(a._zod,"optin",()=>s.in._zod.optin),defineLazy(a._zod,"optout",()=>s.out._zod.optout),defineLazy(a._zod,"propValues",()=>s.in._zod.propValues),a._zod.parse=(c,u)=>{if(u.direction==="backward"){const p=s.out._zod.run(c,u);return p instanceof Promise?p.then(v=>handlePipeResult(v,s.in,u)):handlePipeResult(p,s.in,u)}const d=s.in._zod.run(c,u);return d instanceof Promise?d.then(p=>handlePipeResult(p,s.out,u)):handlePipeResult(d,s.out,u)}});function handlePipeResult(a,s,c){return a.issues.length?(a.aborted=!0,a):s._zod.run({value:a.value,issues:a.issues},c)}const $ZodReadonly=$constructor("$ZodReadonly",(a,s)=>{$ZodType.init(a,s),defineLazy(a._zod,"propValues",()=>s.innerType._zod.propValues),defineLazy(a._zod,"values",()=>s.innerType._zod.values),defineLazy(a._zod,"optin",()=>s.innerType._zod.optin),defineLazy(a._zod,"optout",()=>s.innerType._zod.optout),a._zod.parse=(c,u)=>{if(u.direction==="backward")return s.innerType._zod.run(c,u);const d=s.innerType._zod.run(c,u);return d instanceof Promise?d.then(handleReadonlyResult):handleReadonlyResult(d)}});function handleReadonlyResult(a){return a.value=Object.freeze(a.value),a}const $ZodCustom=$constructor("$ZodCustom",(a,s)=>{$ZodCheck.init(a,s),$ZodType.init(a,s),a._zod.parse=(c,u)=>c,a._zod.check=c=>{const u=c.value,d=s.fn(u);if(d instanceof Promise)return d.then(p=>handleRefineResult(p,c,u,a));handleRefineResult(d,c,u,a)}});function handleRefineResult(a,s,c,u){if(!a){const d={code:"custom",input:c,inst:u,path:[...u._zod.def.path??[]],continue:!u._zod.def.abort};u._zod.def.params&&(d.params=u._zod.def.params),s.issues.push(issue(d))}}class $ZodRegistry{constructor(){this._map=new WeakMap,this._idmap=new Map}add(s,...c){const u=c[0];if(this._map.set(s,u),u&&typeof u=="object"&&"id"in u){if(this._idmap.has(u.id))throw new Error(`ID ${u.id} already exists in the registry`);this._idmap.set(u.id,s)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(s){const c=this._map.get(s);return c&&typeof c=="object"&&"id"in c&&this._idmap.delete(c.id),this._map.delete(s),this}get(s){const c=s._zod.parent;if(c){const u={...this.get(c)??{}};delete u.id;const d={...u,...this._map.get(s)};return Object.keys(d).length?d:void 0}return this._map.get(s)}has(s){return this._map.has(s)}}function registry(){return new $ZodRegistry}const globalRegistry=registry();function _string(a,s){return new a({type:"string",...normalizeParams(s)})}function _email(a,s){return new a({type:"string",format:"email",check:"string_format",abort:!1,...normalizeParams(s)})}function _guid(a,s){return new a({type:"string",format:"guid",check:"string_format",abort:!1,...normalizeParams(s)})}function _uuid(a,s){return new a({type:"string",format:"uuid",check:"string_format",abort:!1,...normalizeParams(s)})}function _uuidv4(a,s){return new a({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...normalizeParams(s)})}function _uuidv6(a,s){return new a({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...normalizeParams(s)})}function _uuidv7(a,s){return new a({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...normalizeParams(s)})}function _url(a,s){return new a({type:"string",format:"url",check:"string_format",abort:!1,...normalizeParams(s)})}function _emoji(a,s){return new a({type:"string",format:"emoji",check:"string_format",abort:!1,...normalizeParams(s)})}function _nanoid(a,s){return new a({type:"string",format:"nanoid",check:"string_format",abort:!1,...normalizeParams(s)})}function _cuid(a,s){return new a({type:"string",format:"cuid",check:"string_format",abort:!1,...normalizeParams(s)})}function _cuid2(a,s){return new a({type:"string",format:"cuid2",check:"string_format",abort:!1,...normalizeParams(s)})}function _ulid(a,s){return new a({type:"string",format:"ulid",check:"string_format",abort:!1,...normalizeParams(s)})}function _xid(a,s){return new a({type:"string",format:"xid",check:"string_format",abort:!1,...normalizeParams(s)})}function _ksuid(a,s){return new a({type:"string",format:"ksuid",check:"string_format",abort:!1,...normalizeParams(s)})}function _ipv4(a,s){return new a({type:"string",format:"ipv4",check:"string_format",abort:!1,...normalizeParams(s)})}function _ipv6(a,s){return new a({type:"string",format:"ipv6",check:"string_format",abort:!1,...normalizeParams(s)})}function _cidrv4(a,s){return new a({type:"string",format:"cidrv4",check:"string_format",abort:!1,...normalizeParams(s)})}function _cidrv6(a,s){return new a({type:"string",format:"cidrv6",check:"string_format",abort:!1,...normalizeParams(s)})}function _base64(a,s){return new a({type:"string",format:"base64",check:"string_format",abort:!1,...normalizeParams(s)})}function _base64url(a,s){return new a({type:"string",format:"base64url",check:"string_format",abort:!1,...normalizeParams(s)})}function _e164(a,s){return new a({type:"string",format:"e164",check:"string_format",abort:!1,...normalizeParams(s)})}function _jwt(a,s){return new a({type:"string",format:"jwt",check:"string_format",abort:!1,...normalizeParams(s)})}function _isoDateTime(a,s){return new a({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...normalizeParams(s)})}function _isoDate(a,s){return new a({type:"string",format:"date",check:"string_format",...normalizeParams(s)})}function _isoTime(a,s){return new a({type:"string",format:"time",check:"string_format",precision:null,...normalizeParams(s)})}function _isoDuration(a,s){return new a({type:"string",format:"duration",check:"string_format",...normalizeParams(s)})}function _number(a,s){return new a({type:"number",checks:[],...normalizeParams(s)})}function _int(a,s){return new a({type:"number",check:"number_format",abort:!1,format:"safeint",...normalizeParams(s)})}function _boolean(a,s){return new a({type:"boolean",...normalizeParams(s)})}function _any(a){return new a({type:"any"})}function _unknown(a){return new a({type:"unknown"})}function _never(a,s){return new a({type:"never",...normalizeParams(s)})}function _date(a,s){return new a({type:"date",...normalizeParams(s)})}function _lt(a,s){return new $ZodCheckLessThan({check:"less_than",...normalizeParams(s),value:a,inclusive:!1})}function _lte(a,s){return new $ZodCheckLessThan({check:"less_than",...normalizeParams(s),value:a,inclusive:!0})}function _gt(a,s){return new $ZodCheckGreaterThan({check:"greater_than",...normalizeParams(s),value:a,inclusive:!1})}function _gte(a,s){return new $ZodCheckGreaterThan({check:"greater_than",...normalizeParams(s),value:a,inclusive:!0})}function _multipleOf(a,s){return new $ZodCheckMultipleOf({check:"multiple_of",...normalizeParams(s),value:a})}function _maxLength(a,s){return new $ZodCheckMaxLength({check:"max_length",...normalizeParams(s),maximum:a})}function _minLength(a,s){return new $ZodCheckMinLength({check:"min_length",...normalizeParams(s),minimum:a})}function _length(a,s){return new $ZodCheckLengthEquals({check:"length_equals",...normalizeParams(s),length:a})}function _regex(a,s){return new $ZodCheckRegex({check:"string_format",format:"regex",...normalizeParams(s),pattern:a})}function _lowercase(a){return new $ZodCheckLowerCase({check:"string_format",format:"lowercase",...normalizeParams(a)})}function _uppercase(a){return new $ZodCheckUpperCase({check:"string_format",format:"uppercase",...normalizeParams(a)})}function _includes(a,s){return new $ZodCheckIncludes({check:"string_format",format:"includes",...normalizeParams(s),includes:a})}function _startsWith(a,s){return new $ZodCheckStartsWith({check:"string_format",format:"starts_with",...normalizeParams(s),prefix:a})}function _endsWith(a,s){return new $ZodCheckEndsWith({check:"string_format",format:"ends_with",...normalizeParams(s),suffix:a})}function _overwrite(a){return new $ZodCheckOverwrite({check:"overwrite",tx:a})}function _normalize(a){return _overwrite(s=>s.normalize(a))}function _trim(){return _overwrite(a=>a.trim())}function _toLowerCase(){return _overwrite(a=>a.toLowerCase())}function _toUpperCase(){return _overwrite(a=>a.toUpperCase())}function _array(a,s,c){return new a({type:"array",element:s,...normalizeParams(c)})}function _refine(a,s,c){return new a({type:"custom",check:"custom",fn:s,...normalizeParams(c)})}function _superRefine(a){const s=_check(c=>(c.addIssue=u=>{if(typeof u=="string")c.issues.push(issue(u,c.value,s._zod.def));else{const d=u;d.fatal&&(d.continue=!1),d.code??(d.code="custom"),d.input??(d.input=c.value),d.inst??(d.inst=s),d.continue??(d.continue=!s._zod.def.abort),c.issues.push(issue(d))}},a(c.value,c)));return s}function _check(a,s){const c=new $ZodCheck({check:"custom",...normalizeParams(s)});return c._zod.check=a,c}const ZodISODateTime=$constructor("ZodISODateTime",(a,s)=>{$ZodISODateTime.init(a,s),ZodStringFormat.init(a,s)});function datetime(a){return _isoDateTime(ZodISODateTime,a)}const ZodISODate=$constructor("ZodISODate",(a,s)=>{$ZodISODate.init(a,s),ZodStringFormat.init(a,s)});function date$2(a){return _isoDate(ZodISODate,a)}const ZodISOTime=$constructor("ZodISOTime",(a,s)=>{$ZodISOTime.init(a,s),ZodStringFormat.init(a,s)});function time(a){return _isoTime(ZodISOTime,a)}const ZodISODuration=$constructor("ZodISODuration",(a,s)=>{$ZodISODuration.init(a,s),ZodStringFormat.init(a,s)});function duration(a){return _isoDuration(ZodISODuration,a)}const initializer=(a,s)=>{$ZodError.init(a,s),a.name="ZodError",Object.defineProperties(a,{format:{value:c=>formatError(a,c)},flatten:{value:c=>flattenError(a,c)},addIssue:{value:c=>{a.issues.push(c),a.message=JSON.stringify(a.issues,jsonStringifyReplacer,2)}},addIssues:{value:c=>{a.issues.push(...c),a.message=JSON.stringify(a.issues,jsonStringifyReplacer,2)}},isEmpty:{get(){return a.issues.length===0}}})},ZodError=$constructor("ZodError",initializer),ZodRealError=$constructor("ZodError",initializer,{Parent:Error}),parse$2=_parse(ZodRealError),parseAsync=_parseAsync(ZodRealError),safeParse=_safeParse(ZodRealError),safeParseAsync=_safeParseAsync(ZodRealError),encode=_encode(ZodRealError),decode$1=_decode(ZodRealError),encodeAsync=_encodeAsync(ZodRealError),decodeAsync=_decodeAsync(ZodRealError),safeEncode=_safeEncode(ZodRealError),safeDecode=_safeDecode(ZodRealError),safeEncodeAsync=_safeEncodeAsync(ZodRealError),safeDecodeAsync=_safeDecodeAsync(ZodRealError),ZodType=$constructor("ZodType",(a,s)=>($ZodType.init(a,s),a.def=s,a.type=s.type,Object.defineProperty(a,"_def",{value:s}),a.check=(...c)=>a.clone(mergeDefs(s,{checks:[...s.checks??[],...c.map(u=>typeof u=="function"?{_zod:{check:u,def:{check:"custom"},onattach:[]}}:u)]})),a.clone=(c,u)=>clone$2(a,c,u),a.brand=()=>a,a.register=((c,u)=>(c.add(a,u),a)),a.parse=(c,u)=>parse$2(a,c,u,{callee:a.parse}),a.safeParse=(c,u)=>safeParse(a,c,u),a.parseAsync=async(c,u)=>parseAsync(a,c,u,{callee:a.parseAsync}),a.safeParseAsync=async(c,u)=>safeParseAsync(a,c,u),a.spa=a.safeParseAsync,a.encode=(c,u)=>encode(a,c,u),a.decode=(c,u)=>decode$1(a,c,u),a.encodeAsync=async(c,u)=>encodeAsync(a,c,u),a.decodeAsync=async(c,u)=>decodeAsync(a,c,u),a.safeEncode=(c,u)=>safeEncode(a,c,u),a.safeDecode=(c,u)=>safeDecode(a,c,u),a.safeEncodeAsync=async(c,u)=>safeEncodeAsync(a,c,u),a.safeDecodeAsync=async(c,u)=>safeDecodeAsync(a,c,u),a.refine=(c,u)=>a.check(refine(c,u)),a.superRefine=c=>a.check(superRefine(c)),a.overwrite=c=>a.check(_overwrite(c)),a.optional=()=>optional(a),a.nullable=()=>nullable(a),a.nullish=()=>optional(nullable(a)),a.nonoptional=c=>nonoptional(a,c),a.array=()=>array$1(a),a.or=c=>union([a,c]),a.and=c=>intersection(a,c),a.transform=c=>pipe(a,transform$1(c)),a.default=c=>_default(a,c),a.prefault=c=>prefault(a,c),a.catch=c=>_catch(a,c),a.pipe=c=>pipe(a,c),a.readonly=()=>readonly(a),a.describe=c=>{const u=a.clone();return globalRegistry.add(u,{description:c}),u},Object.defineProperty(a,"description",{get(){return globalRegistry.get(a)?.description},configurable:!0}),a.meta=(...c)=>{if(c.length===0)return globalRegistry.get(a);const u=a.clone();return globalRegistry.add(u,c[0]),u},a.isOptional=()=>a.safeParse(void 0).success,a.isNullable=()=>a.safeParse(null).success,a)),_ZodString=$constructor("_ZodString",(a,s)=>{$ZodString.init(a,s),ZodType.init(a,s);const c=a._zod.bag;a.format=c.format??null,a.minLength=c.minimum??null,a.maxLength=c.maximum??null,a.regex=(...u)=>a.check(_regex(...u)),a.includes=(...u)=>a.check(_includes(...u)),a.startsWith=(...u)=>a.check(_startsWith(...u)),a.endsWith=(...u)=>a.check(_endsWith(...u)),a.min=(...u)=>a.check(_minLength(...u)),a.max=(...u)=>a.check(_maxLength(...u)),a.length=(...u)=>a.check(_length(...u)),a.nonempty=(...u)=>a.check(_minLength(1,...u)),a.lowercase=u=>a.check(_lowercase(u)),a.uppercase=u=>a.check(_uppercase(u)),a.trim=()=>a.check(_trim()),a.normalize=(...u)=>a.check(_normalize(...u)),a.toLowerCase=()=>a.check(_toLowerCase()),a.toUpperCase=()=>a.check(_toUpperCase())}),ZodString=$constructor("ZodString",(a,s)=>{$ZodString.init(a,s),_ZodString.init(a,s),a.email=c=>a.check(_email(ZodEmail,c)),a.url=c=>a.check(_url(ZodURL,c)),a.jwt=c=>a.check(_jwt(ZodJWT,c)),a.emoji=c=>a.check(_emoji(ZodEmoji,c)),a.guid=c=>a.check(_guid(ZodGUID,c)),a.uuid=c=>a.check(_uuid(ZodUUID,c)),a.uuidv4=c=>a.check(_uuidv4(ZodUUID,c)),a.uuidv6=c=>a.check(_uuidv6(ZodUUID,c)),a.uuidv7=c=>a.check(_uuidv7(ZodUUID,c)),a.nanoid=c=>a.check(_nanoid(ZodNanoID,c)),a.guid=c=>a.check(_guid(ZodGUID,c)),a.cuid=c=>a.check(_cuid(ZodCUID,c)),a.cuid2=c=>a.check(_cuid2(ZodCUID2,c)),a.ulid=c=>a.check(_ulid(ZodULID,c)),a.base64=c=>a.check(_base64(ZodBase64,c)),a.base64url=c=>a.check(_base64url(ZodBase64URL,c)),a.xid=c=>a.check(_xid(ZodXID,c)),a.ksuid=c=>a.check(_ksuid(ZodKSUID,c)),a.ipv4=c=>a.check(_ipv4(ZodIPv4,c)),a.ipv6=c=>a.check(_ipv6(ZodIPv6,c)),a.cidrv4=c=>a.check(_cidrv4(ZodCIDRv4,c)),a.cidrv6=c=>a.check(_cidrv6(ZodCIDRv6,c)),a.e164=c=>a.check(_e164(ZodE164,c)),a.datetime=c=>a.check(datetime(c)),a.date=c=>a.check(date$2(c)),a.time=c=>a.check(time(c)),a.duration=c=>a.check(duration(c))});function string$1(a){return _string(ZodString,a)}const ZodStringFormat=$constructor("ZodStringFormat",(a,s)=>{$ZodStringFormat.init(a,s),_ZodString.init(a,s)}),ZodEmail=$constructor("ZodEmail",(a,s)=>{$ZodEmail.init(a,s),ZodStringFormat.init(a,s)}),ZodGUID=$constructor("ZodGUID",(a,s)=>{$ZodGUID.init(a,s),ZodStringFormat.init(a,s)}),ZodUUID=$constructor("ZodUUID",(a,s)=>{$ZodUUID.init(a,s),ZodStringFormat.init(a,s)}),ZodURL=$constructor("ZodURL",(a,s)=>{$ZodURL.init(a,s),ZodStringFormat.init(a,s)}),ZodEmoji=$constructor("ZodEmoji",(a,s)=>{$ZodEmoji.init(a,s),ZodStringFormat.init(a,s)}),ZodNanoID=$constructor("ZodNanoID",(a,s)=>{$ZodNanoID.init(a,s),ZodStringFormat.init(a,s)}),ZodCUID=$constructor("ZodCUID",(a,s)=>{$ZodCUID.init(a,s),ZodStringFormat.init(a,s)}),ZodCUID2=$constructor("ZodCUID2",(a,s)=>{$ZodCUID2.init(a,s),ZodStringFormat.init(a,s)}),ZodULID=$constructor("ZodULID",(a,s)=>{$ZodULID.init(a,s),ZodStringFormat.init(a,s)}),ZodXID=$constructor("ZodXID",(a,s)=>{$ZodXID.init(a,s),ZodStringFormat.init(a,s)}),ZodKSUID=$constructor("ZodKSUID",(a,s)=>{$ZodKSUID.init(a,s),ZodStringFormat.init(a,s)}),ZodIPv4=$constructor("ZodIPv4",(a,s)=>{$ZodIPv4.init(a,s),ZodStringFormat.init(a,s)}),ZodIPv6=$constructor("ZodIPv6",(a,s)=>{$ZodIPv6.init(a,s),ZodStringFormat.init(a,s)}),ZodCIDRv4=$constructor("ZodCIDRv4",(a,s)=>{$ZodCIDRv4.init(a,s),ZodStringFormat.init(a,s)}),ZodCIDRv6=$constructor("ZodCIDRv6",(a,s)=>{$ZodCIDRv6.init(a,s),ZodStringFormat.init(a,s)}),ZodBase64=$constructor("ZodBase64",(a,s)=>{$ZodBase64.init(a,s),ZodStringFormat.init(a,s)}),ZodBase64URL=$constructor("ZodBase64URL",(a,s)=>{$ZodBase64URL.init(a,s),ZodStringFormat.init(a,s)}),ZodE164=$constructor("ZodE164",(a,s)=>{$ZodE164.init(a,s),ZodStringFormat.init(a,s)}),ZodJWT=$constructor("ZodJWT",(a,s)=>{$ZodJWT.init(a,s),ZodStringFormat.init(a,s)}),ZodNumber=$constructor("ZodNumber",(a,s)=>{$ZodNumber.init(a,s),ZodType.init(a,s),a.gt=(u,d)=>a.check(_gt(u,d)),a.gte=(u,d)=>a.check(_gte(u,d)),a.min=(u,d)=>a.check(_gte(u,d)),a.lt=(u,d)=>a.check(_lt(u,d)),a.lte=(u,d)=>a.check(_lte(u,d)),a.max=(u,d)=>a.check(_lte(u,d)),a.int=u=>a.check(int(u)),a.safe=u=>a.check(int(u)),a.positive=u=>a.check(_gt(0,u)),a.nonnegative=u=>a.check(_gte(0,u)),a.negative=u=>a.check(_lt(0,u)),a.nonpositive=u=>a.check(_lte(0,u)),a.multipleOf=(u,d)=>a.check(_multipleOf(u,d)),a.step=(u,d)=>a.check(_multipleOf(u,d)),a.finite=()=>a;const c=a._zod.bag;a.minValue=Math.max(c.minimum??Number.NEGATIVE_INFINITY,c.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,a.maxValue=Math.min(c.maximum??Number.POSITIVE_INFINITY,c.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,a.isInt=(c.format??"").includes("int")||Number.isSafeInteger(c.multipleOf??.5),a.isFinite=!0,a.format=c.format??null});function number$1(a){return _number(ZodNumber,a)}const ZodNumberFormat=$constructor("ZodNumberFormat",(a,s)=>{$ZodNumberFormat.init(a,s),ZodNumber.init(a,s)});function int(a){return _int(ZodNumberFormat,a)}const ZodBoolean=$constructor("ZodBoolean",(a,s)=>{$ZodBoolean.init(a,s),ZodType.init(a,s)});function boolean$1(a){return _boolean(ZodBoolean,a)}const ZodAny=$constructor("ZodAny",(a,s)=>{$ZodAny.init(a,s),ZodType.init(a,s)});function any$1(){return _any(ZodAny)}const ZodUnknown=$constructor("ZodUnknown",(a,s)=>{$ZodUnknown.init(a,s),ZodType.init(a,s)});function unknown(){return _unknown(ZodUnknown)}const ZodNever=$constructor("ZodNever",(a,s)=>{$ZodNever.init(a,s),ZodType.init(a,s)});function never(a){return _never(ZodNever,a)}const ZodDate=$constructor("ZodDate",(a,s)=>{$ZodDate.init(a,s),ZodType.init(a,s),a.min=(u,d)=>a.check(_gte(u,d)),a.max=(u,d)=>a.check(_lte(u,d));const c=a._zod.bag;a.minDate=c.minimum?new Date(c.minimum):null,a.maxDate=c.maximum?new Date(c.maximum):null});function date$1(a){return _date(ZodDate,a)}const ZodArray=$constructor("ZodArray",(a,s)=>{$ZodArray.init(a,s),ZodType.init(a,s),a.element=s.element,a.min=(c,u)=>a.check(_minLength(c,u)),a.nonempty=c=>a.check(_minLength(1,c)),a.max=(c,u)=>a.check(_maxLength(c,u)),a.length=(c,u)=>a.check(_length(c,u)),a.unwrap=()=>a.element});function array$1(a,s){return _array(ZodArray,a,s)}const ZodObject=$constructor("ZodObject",(a,s)=>{$ZodObjectJIT.init(a,s),ZodType.init(a,s),defineLazy(a,"shape",()=>s.shape),a.keyof=()=>_enum(Object.keys(a._zod.def.shape)),a.catchall=c=>a.clone({...a._zod.def,catchall:c}),a.passthrough=()=>a.clone({...a._zod.def,catchall:unknown()}),a.loose=()=>a.clone({...a._zod.def,catchall:unknown()}),a.strict=()=>a.clone({...a._zod.def,catchall:never()}),a.strip=()=>a.clone({...a._zod.def,catchall:void 0}),a.extend=c=>extend(a,c),a.safeExtend=c=>safeExtend(a,c),a.merge=c=>merge$2(a,c),a.pick=c=>pick(a,c),a.omit=c=>omit$1(a,c),a.partial=(...c)=>partial(ZodOptional,a,c[0]),a.required=(...c)=>required$2(ZodNonOptional,a,c[0])});function object$1(a,s){const c={type:"object",shape:a??{},...normalizeParams(s)};return new ZodObject(c)}const ZodUnion=$constructor("ZodUnion",(a,s)=>{$ZodUnion.init(a,s),ZodType.init(a,s),a.options=s.options});function union(a,s){return new ZodUnion({type:"union",options:a,...normalizeParams(s)})}const ZodIntersection=$constructor("ZodIntersection",(a,s)=>{$ZodIntersection.init(a,s),ZodType.init(a,s)});function intersection(a,s){return new ZodIntersection({type:"intersection",left:a,right:s})}const ZodTuple=$constructor("ZodTuple",(a,s)=>{$ZodTuple.init(a,s),ZodType.init(a,s),a.rest=c=>a.clone({...a._zod.def,rest:c})});function tuple(a,s,c){const u=s instanceof $ZodType,d=u?c:s,p=u?s:null;return new ZodTuple({type:"tuple",items:a,rest:p,...normalizeParams(d)})}const ZodRecord=$constructor("ZodRecord",(a,s)=>{$ZodRecord.init(a,s),ZodType.init(a,s),a.keyType=s.keyType,a.valueType=s.valueType});function record(a,s,c){return new ZodRecord({type:"record",keyType:a,valueType:s,...normalizeParams(c)})}const ZodEnum=$constructor("ZodEnum",(a,s)=>{$ZodEnum.init(a,s),ZodType.init(a,s),a.enum=s.entries,a.options=Object.values(s.entries);const c=new Set(Object.keys(s.entries));a.extract=(u,d)=>{const p={};for(const v of u)if(c.has(v))p[v]=s.entries[v];else throw new Error(`Key ${v} not found in enum`);return new ZodEnum({...s,checks:[],...normalizeParams(d),entries:p})},a.exclude=(u,d)=>{const p={...s.entries};for(const v of u)if(c.has(v))delete p[v];else throw new Error(`Key ${v} not found in enum`);return new ZodEnum({...s,checks:[],...normalizeParams(d),entries:p})}});function _enum(a,s){const c=Array.isArray(a)?Object.fromEntries(a.map(u=>[u,u])):a;return new ZodEnum({type:"enum",entries:c,...normalizeParams(s)})}const ZodTransform=$constructor("ZodTransform",(a,s)=>{$ZodTransform.init(a,s),ZodType.init(a,s),a._zod.parse=(c,u)=>{if(u.direction==="backward")throw new $ZodEncodeError(a.constructor.name);c.addIssue=p=>{if(typeof p=="string")c.issues.push(issue(p,c.value,s));else{const v=p;v.fatal&&(v.continue=!1),v.code??(v.code="custom"),v.input??(v.input=c.value),v.inst??(v.inst=a),c.issues.push(issue(v))}};const d=s.transform(c.value,c);return d instanceof Promise?d.then(p=>(c.value=p,c)):(c.value=d,c)}});function transform$1(a){return new ZodTransform({type:"transform",transform:a})}const ZodOptional=$constructor("ZodOptional",(a,s)=>{$ZodOptional.init(a,s),ZodType.init(a,s),a.unwrap=()=>a._zod.def.innerType});function optional(a){return new ZodOptional({type:"optional",innerType:a})}const ZodNullable=$constructor("ZodNullable",(a,s)=>{$ZodNullable.init(a,s),ZodType.init(a,s),a.unwrap=()=>a._zod.def.innerType});function nullable(a){return new ZodNullable({type:"nullable",innerType:a})}const ZodDefault=$constructor("ZodDefault",(a,s)=>{$ZodDefault.init(a,s),ZodType.init(a,s),a.unwrap=()=>a._zod.def.innerType,a.removeDefault=a.unwrap});function _default(a,s){return new ZodDefault({type:"default",innerType:a,get defaultValue(){return typeof s=="function"?s():shallowClone(s)}})}const ZodPrefault=$constructor("ZodPrefault",(a,s)=>{$ZodPrefault.init(a,s),ZodType.init(a,s),a.unwrap=()=>a._zod.def.innerType});function prefault(a,s){return new ZodPrefault({type:"prefault",innerType:a,get defaultValue(){return typeof s=="function"?s():shallowClone(s)}})}const ZodNonOptional=$constructor("ZodNonOptional",(a,s)=>{$ZodNonOptional.init(a,s),ZodType.init(a,s),a.unwrap=()=>a._zod.def.innerType});function nonoptional(a,s){return new ZodNonOptional({type:"nonoptional",innerType:a,...normalizeParams(s)})}const ZodCatch=$constructor("ZodCatch",(a,s)=>{$ZodCatch.init(a,s),ZodType.init(a,s),a.unwrap=()=>a._zod.def.innerType,a.removeCatch=a.unwrap});function _catch(a,s){return new ZodCatch({type:"catch",innerType:a,catchValue:typeof s=="function"?s:()=>s})}const ZodPipe=$constructor("ZodPipe",(a,s)=>{$ZodPipe.init(a,s),ZodType.init(a,s),a.in=s.in,a.out=s.out});function pipe(a,s){return new ZodPipe({type:"pipe",in:a,out:s})}const ZodReadonly=$constructor("ZodReadonly",(a,s)=>{$ZodReadonly.init(a,s),ZodType.init(a,s),a.unwrap=()=>a._zod.def.innerType});function readonly(a){return new ZodReadonly({type:"readonly",innerType:a})}const ZodCustom=$constructor("ZodCustom",(a,s)=>{$ZodCustom.init(a,s),ZodType.init(a,s)});function refine(a,s={}){return _refine(ZodCustom,a,s)}function superRefine(a){return _superRefine(a)}var buffer$1={},base64Js={},hasRequiredBase64Js;function requireBase64Js(){if(hasRequiredBase64Js)return base64Js;hasRequiredBase64Js=1,base64Js.byteLength=A,base64Js.toByteArray=g,base64Js.fromByteArray=f;for(var a=[],s=[],c=typeof Uint8Array<"u"?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,p=u.length;d<p;++d)a[d]=u[d],s[u.charCodeAt(d)]=d;s[45]=62,s[95]=63;function v(m){var E=m.length;if(E%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var w=m.indexOf("=");w===-1&&(w=E);var S=w===E?0:4-w%4;return[w,S]}function A(m){var E=v(m),w=E[0],S=E[1];return(w+S)*3/4-S}function x(m,E,w){return(E+w)*3/4-w}function g(m){var E,w=v(m),S=w[0],$=w[1],T=new c(x(m,S,$)),I=0,_=$>0?S-4:S,C;for(C=0;C<_;C+=4)E=s[m.charCodeAt(C)]<<18|s[m.charCodeAt(C+1)]<<12|s[m.charCodeAt(C+2)]<<6|s[m.charCodeAt(C+3)],T[I++]=E>>16&255,T[I++]=E>>8&255,T[I++]=E&255;return $===2&&(E=s[m.charCodeAt(C)]<<2|s[m.charCodeAt(C+1)]>>4,T[I++]=E&255),$===1&&(E=s[m.charCodeAt(C)]<<10|s[m.charCodeAt(C+1)]<<4|s[m.charCodeAt(C+2)]>>2,T[I++]=E>>8&255,T[I++]=E&255),T}function b(m){return a[m>>18&63]+a[m>>12&63]+a[m>>6&63]+a[m&63]}function y(m,E,w){for(var S,$=[],T=E;T<w;T+=3)S=(m[T]<<16&16711680)+(m[T+1]<<8&65280)+(m[T+2]&255),$.push(b(S));return $.join("")}function f(m){for(var E,w=m.length,S=w%3,$=[],T=16383,I=0,_=w-S;I<_;I+=T)$.push(y(m,I,I+T>_?_:I+T));return S===1?(E=m[w-1],$.push(a[E>>2]+a[E<<4&63]+"==")):S===2&&(E=(m[w-2]<<8)+m[w-1],$.push(a[E>>10]+a[E>>4&63]+a[E<<2&63]+"=")),$.join("")}return base64Js}var ieee754={};var hasRequiredIeee754;function requireIeee754(){return hasRequiredIeee754||(hasRequiredIeee754=1,ieee754.read=function(a,s,c,u,d){var p,v,A=d*8-u-1,x=(1<<A)-1,g=x>>1,b=-7,y=c?d-1:0,f=c?-1:1,m=a[s+y];for(y+=f,p=m&(1<<-b)-1,m>>=-b,b+=A;b>0;p=p*256+a[s+y],y+=f,b-=8);for(v=p&(1<<-b)-1,p>>=-b,b+=u;b>0;v=v*256+a[s+y],y+=f,b-=8);if(p===0)p=1-g;else{if(p===x)return v?NaN:(m?-1:1)*(1/0);v=v+Math.pow(2,u),p=p-g}return(m?-1:1)*v*Math.pow(2,p-u)},ieee754.write=function(a,s,c,u,d,p){var v,A,x,g=p*8-d-1,b=(1<<g)-1,y=b>>1,f=d===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=u?0:p-1,E=u?1:-1,w=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(A=isNaN(s)?1:0,v=b):(v=Math.floor(Math.log(s)/Math.LN2),s*(x=Math.pow(2,-v))<1&&(v--,x*=2),v+y>=1?s+=f/x:s+=f*Math.pow(2,1-y),s*x>=2&&(v++,x/=2),v+y>=b?(A=0,v=b):v+y>=1?(A=(s*x-1)*Math.pow(2,d),v=v+y):(A=s*Math.pow(2,y-1)*Math.pow(2,d),v=0));d>=8;a[c+m]=A&255,m+=E,A/=256,d-=8);for(v=v<<d|A,g+=d;g>0;a[c+m]=v&255,m+=E,v/=256,g-=8);a[c+m-E]|=w*128}),ieee754}var hasRequiredBuffer;function requireBuffer(){return hasRequiredBuffer||(hasRequiredBuffer=1,(function(a){const s=requireBase64Js(),c=requireIeee754(),u=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;a.Buffer=A,a.SlowBuffer=T,a.INSPECT_MAX_BYTES=50;const d=2147483647;a.kMaxLength=d,A.TYPED_ARRAY_SUPPORT=p(),!A.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function p(){try{const Ae=new Uint8Array(1),ue={foo:function(){return 42}};return Object.setPrototypeOf(ue,Uint8Array.prototype),Object.setPrototypeOf(Ae,ue),Ae.foo()===42}catch{return!1}}Object.defineProperty(A.prototype,"parent",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.buffer}}),Object.defineProperty(A.prototype,"offset",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.byteOffset}});function v(Ae){if(Ae>d)throw new RangeError('The value "'+Ae+'" is invalid for option "size"');const ue=new Uint8Array(Ae);return Object.setPrototypeOf(ue,A.prototype),ue}function A(Ae,ue,ce){if(typeof Ae=="number"){if(typeof ue=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return y(Ae)}return x(Ae,ue,ce)}A.poolSize=8192;function x(Ae,ue,ce){if(typeof Ae=="string")return f(Ae,ue);if(ArrayBuffer.isView(Ae))return E(Ae);if(Ae==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Ae);if(ye(Ae,ArrayBuffer)||Ae&&ye(Ae.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ye(Ae,SharedArrayBuffer)||Ae&&ye(Ae.buffer,SharedArrayBuffer)))return w(Ae,ue,ce);if(typeof Ae=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Ce=Ae.valueOf&&Ae.valueOf();if(Ce!=null&&Ce!==Ae)return A.from(Ce,ue,ce);const _e=S(Ae);if(_e)return _e;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Ae[Symbol.toPrimitive]=="function")return A.from(Ae[Symbol.toPrimitive]("string"),ue,ce);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Ae)}A.from=function(Ae,ue,ce){return x(Ae,ue,ce)},Object.setPrototypeOf(A.prototype,Uint8Array.prototype),Object.setPrototypeOf(A,Uint8Array);function g(Ae){if(typeof Ae!="number")throw new TypeError('"size" argument must be of type number');if(Ae<0)throw new RangeError('The value "'+Ae+'" is invalid for option "size"')}function b(Ae,ue,ce){return g(Ae),Ae<=0?v(Ae):ue!==void 0?typeof ce=="string"?v(Ae).fill(ue,ce):v(Ae).fill(ue):v(Ae)}A.alloc=function(Ae,ue,ce){return b(Ae,ue,ce)};function y(Ae){return g(Ae),v(Ae<0?0:$(Ae)|0)}A.allocUnsafe=function(Ae){return y(Ae)},A.allocUnsafeSlow=function(Ae){return y(Ae)};function f(Ae,ue){if((typeof ue!="string"||ue==="")&&(ue="utf8"),!A.isEncoding(ue))throw new TypeError("Unknown encoding: "+ue);const ce=I(Ae,ue)|0;let Ce=v(ce);const _e=Ce.write(Ae,ue);return _e!==ce&&(Ce=Ce.slice(0,_e)),Ce}function m(Ae){const ue=Ae.length<0?0:$(Ae.length)|0,ce=v(ue);for(let Ce=0;Ce<ue;Ce+=1)ce[Ce]=Ae[Ce]&255;return ce}function E(Ae){if(ye(Ae,Uint8Array)){const ue=new Uint8Array(Ae);return w(ue.buffer,ue.byteOffset,ue.byteLength)}return m(Ae)}function w(Ae,ue,ce){if(ue<0||Ae.byteLength<ue)throw new RangeError('"offset" is outside of buffer bounds');if(Ae.byteLength<ue+(ce||0))throw new RangeError('"length" is outside of buffer bounds');let Ce;return ue===void 0&&ce===void 0?Ce=new Uint8Array(Ae):ce===void 0?Ce=new Uint8Array(Ae,ue):Ce=new Uint8Array(Ae,ue,ce),Object.setPrototypeOf(Ce,A.prototype),Ce}function S(Ae){if(A.isBuffer(Ae)){const ue=$(Ae.length)|0,ce=v(ue);return ce.length===0||Ae.copy(ce,0,0,ue),ce}if(Ae.length!==void 0)return typeof Ae.length!="number"||Ee(Ae.length)?v(0):m(Ae);if(Ae.type==="Buffer"&&Array.isArray(Ae.data))return m(Ae.data)}function $(Ae){if(Ae>=d)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d.toString(16)+" bytes");return Ae|0}function T(Ae){return+Ae!=Ae&&(Ae=0),A.alloc(+Ae)}A.isBuffer=function(ue){return ue!=null&&ue._isBuffer===!0&&ue!==A.prototype},A.compare=function(ue,ce){if(ye(ue,Uint8Array)&&(ue=A.from(ue,ue.offset,ue.byteLength)),ye(ce,Uint8Array)&&(ce=A.from(ce,ce.offset,ce.byteLength)),!A.isBuffer(ue)||!A.isBuffer(ce))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ue===ce)return 0;let Ce=ue.length,_e=ce.length;for(let Te=0,De=Math.min(Ce,_e);Te<De;++Te)if(ue[Te]!==ce[Te]){Ce=ue[Te],_e=ce[Te];break}return Ce<_e?-1:_e<Ce?1:0},A.isEncoding=function(ue){switch(String(ue).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},A.concat=function(ue,ce){if(!Array.isArray(ue))throw new TypeError('"list" argument must be an Array of Buffers');if(ue.length===0)return A.alloc(0);let Ce;if(ce===void 0)for(ce=0,Ce=0;Ce<ue.length;++Ce)ce+=ue[Ce].length;const _e=A.allocUnsafe(ce);let Te=0;for(Ce=0;Ce<ue.length;++Ce){let De=ue[Ce];if(ye(De,Uint8Array))Te+De.length>_e.length?(A.isBuffer(De)||(De=A.from(De)),De.copy(_e,Te)):Uint8Array.prototype.set.call(_e,De,Te);else if(A.isBuffer(De))De.copy(_e,Te);else throw new TypeError('"list" argument must be an Array of Buffers');Te+=De.length}return _e};function I(Ae,ue){if(A.isBuffer(Ae))return Ae.length;if(ArrayBuffer.isView(Ae)||ye(Ae,ArrayBuffer))return Ae.byteLength;if(typeof Ae!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Ae);const ce=Ae.length,Ce=arguments.length>2&&arguments[2]===!0;if(!Ce&&ce===0)return 0;let _e=!1;for(;;)switch(ue){case"ascii":case"latin1":case"binary":return ce;case"utf8":case"utf-8":return me(Ae).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ce*2;case"hex":return ce>>>1;case"base64":return ve(Ae).length;default:if(_e)return Ce?-1:me(Ae).length;ue=(""+ue).toLowerCase(),_e=!0}}A.byteLength=I;function _(Ae,ue,ce){let Ce=!1;if((ue===void 0||ue<0)&&(ue=0),ue>this.length||((ce===void 0||ce>this.length)&&(ce=this.length),ce<=0)||(ce>>>=0,ue>>>=0,ce<=ue))return"";for(Ae||(Ae="utf8");;)switch(Ae){case"hex":return L(this,ue,ce);case"utf8":case"utf-8":return V(this,ue,ce);case"ascii":return N(this,ue,ce);case"latin1":case"binary":return P(this,ue,ce);case"base64":return j(this,ue,ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H(this,ue,ce);default:if(Ce)throw new TypeError("Unknown encoding: "+Ae);Ae=(Ae+"").toLowerCase(),Ce=!0}}A.prototype._isBuffer=!0;function C(Ae,ue,ce){const Ce=Ae[ue];Ae[ue]=Ae[ce],Ae[ce]=Ce}A.prototype.swap16=function(){const ue=this.length;if(ue%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let ce=0;ce<ue;ce+=2)C(this,ce,ce+1);return this},A.prototype.swap32=function(){const ue=this.length;if(ue%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let ce=0;ce<ue;ce+=4)C(this,ce,ce+3),C(this,ce+1,ce+2);return this},A.prototype.swap64=function(){const ue=this.length;if(ue%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let ce=0;ce<ue;ce+=8)C(this,ce,ce+7),C(this,ce+1,ce+6),C(this,ce+2,ce+5),C(this,ce+3,ce+4);return this},A.prototype.toString=function(){const ue=this.length;return ue===0?"":arguments.length===0?V(this,0,ue):_.apply(this,arguments)},A.prototype.toLocaleString=A.prototype.toString,A.prototype.equals=function(ue){if(!A.isBuffer(ue))throw new TypeError("Argument must be a Buffer");return this===ue?!0:A.compare(this,ue)===0},A.prototype.inspect=function(){let ue="";const ce=a.INSPECT_MAX_BYTES;return ue=this.toString("hex",0,ce).replace(/(.{2})/g,"$1 ").trim(),this.length>ce&&(ue+=" ... "),"<Buffer "+ue+">"},u&&(A.prototype[u]=A.prototype.inspect),A.prototype.compare=function(ue,ce,Ce,_e,Te){if(ye(ue,Uint8Array)&&(ue=A.from(ue,ue.offset,ue.byteLength)),!A.isBuffer(ue))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ue);if(ce===void 0&&(ce=0),Ce===void 0&&(Ce=ue?ue.length:0),_e===void 0&&(_e=0),Te===void 0&&(Te=this.length),ce<0||Ce>ue.length||_e<0||Te>this.length)throw new RangeError("out of range index");if(_e>=Te&&ce>=Ce)return 0;if(_e>=Te)return-1;if(ce>=Ce)return 1;if(ce>>>=0,Ce>>>=0,_e>>>=0,Te>>>=0,this===ue)return 0;let De=Te-_e,Re=Ce-ce;const Be=Math.min(De,Re),Pe=this.slice(_e,Te),Me=ue.slice(ce,Ce);for(let Fe=0;Fe<Be;++Fe)if(Pe[Fe]!==Me[Fe]){De=Pe[Fe],Re=Me[Fe];break}return De<Re?-1:Re<De?1:0};function R(Ae,ue,ce,Ce,_e){if(Ae.length===0)return-1;if(typeof ce=="string"?(Ce=ce,ce=0):ce>2147483647?ce=2147483647:ce<-2147483648&&(ce=-2147483648),ce=+ce,Ee(ce)&&(ce=_e?0:Ae.length-1),ce<0&&(ce=Ae.length+ce),ce>=Ae.length){if(_e)return-1;ce=Ae.length-1}else if(ce<0)if(_e)ce=0;else return-1;if(typeof ue=="string"&&(ue=A.from(ue,Ce)),A.isBuffer(ue))return ue.length===0?-1:B(Ae,ue,ce,Ce,_e);if(typeof ue=="number")return ue=ue&255,typeof Uint8Array.prototype.indexOf=="function"?_e?Uint8Array.prototype.indexOf.call(Ae,ue,ce):Uint8Array.prototype.lastIndexOf.call(Ae,ue,ce):B(Ae,[ue],ce,Ce,_e);throw new TypeError("val must be string, number or Buffer")}function B(Ae,ue,ce,Ce,_e){let Te=1,De=Ae.length,Re=ue.length;if(Ce!==void 0&&(Ce=String(Ce).toLowerCase(),Ce==="ucs2"||Ce==="ucs-2"||Ce==="utf16le"||Ce==="utf-16le")){if(Ae.length<2||ue.length<2)return-1;Te=2,De/=2,Re/=2,ce/=2}function Be(Me,Fe){return Te===1?Me[Fe]:Me.readUInt16BE(Fe*Te)}let Pe;if(_e){let Me=-1;for(Pe=ce;Pe<De;Pe++)if(Be(Ae,Pe)===Be(ue,Me===-1?0:Pe-Me)){if(Me===-1&&(Me=Pe),Pe-Me+1===Re)return Me*Te}else Me!==-1&&(Pe-=Pe-Me),Me=-1}else for(ce+Re>De&&(ce=De-Re),Pe=ce;Pe>=0;Pe--){let Me=!0;for(let Fe=0;Fe<Re;Fe++)if(Be(Ae,Pe+Fe)!==Be(ue,Fe)){Me=!1;break}if(Me)return Pe}return-1}A.prototype.includes=function(ue,ce,Ce){return this.indexOf(ue,ce,Ce)!==-1},A.prototype.indexOf=function(ue,ce,Ce){return R(this,ue,ce,Ce,!0)},A.prototype.lastIndexOf=function(ue,ce,Ce){return R(this,ue,ce,Ce,!1)};function k(Ae,ue,ce,Ce){ce=Number(ce)||0;const _e=Ae.length-ce;Ce?(Ce=Number(Ce),Ce>_e&&(Ce=_e)):Ce=_e;const Te=ue.length;Ce>Te/2&&(Ce=Te/2);let De;for(De=0;De<Ce;++De){const Re=parseInt(ue.substr(De*2,2),16);if(Ee(Re))return De;Ae[ce+De]=Re}return De}function O(Ae,ue,ce,Ce){return he(me(ue,Ae.length-ce),Ae,ce,Ce)}function F(Ae,ue,ce,Ce){return he(be(ue),Ae,ce,Ce)}function M(Ae,ue,ce,Ce){return he(ve(ue),Ae,ce,Ce)}function G(Ae,ue,ce,Ce){return he(le(ue,Ae.length-ce),Ae,ce,Ce)}A.prototype.write=function(ue,ce,Ce,_e){if(ce===void 0)_e="utf8",Ce=this.length,ce=0;else if(Ce===void 0&&typeof ce=="string")_e=ce,Ce=this.length,ce=0;else if(isFinite(ce))ce=ce>>>0,isFinite(Ce)?(Ce=Ce>>>0,_e===void 0&&(_e="utf8")):(_e=Ce,Ce=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Te=this.length-ce;if((Ce===void 0||Ce>Te)&&(Ce=Te),ue.length>0&&(Ce<0||ce<0)||ce>this.length)throw new RangeError("Attempt to write outside buffer bounds");_e||(_e="utf8");let De=!1;for(;;)switch(_e){case"hex":return k(this,ue,ce,Ce);case"utf8":case"utf-8":return O(this,ue,ce,Ce);case"ascii":case"latin1":case"binary":return F(this,ue,ce,Ce);case"base64":return M(this,ue,ce,Ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,ue,ce,Ce);default:if(De)throw new TypeError("Unknown encoding: "+_e);_e=(""+_e).toLowerCase(),De=!0}},A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function j(Ae,ue,ce){return ue===0&&ce===Ae.length?s.fromByteArray(Ae):s.fromByteArray(Ae.slice(ue,ce))}function V(Ae,ue,ce){ce=Math.min(Ae.length,ce);const Ce=[];let _e=ue;for(;_e<ce;){const Te=Ae[_e];let De=null,Re=Te>239?4:Te>223?3:Te>191?2:1;if(_e+Re<=ce){let Be,Pe,Me,Fe;switch(Re){case 1:Te<128&&(De=Te);break;case 2:Be=Ae[_e+1],(Be&192)===128&&(Fe=(Te&31)<<6|Be&63,Fe>127&&(De=Fe));break;case 3:Be=Ae[_e+1],Pe=Ae[_e+2],(Be&192)===128&&(Pe&192)===128&&(Fe=(Te&15)<<12|(Be&63)<<6|Pe&63,Fe>2047&&(Fe<55296||Fe>57343)&&(De=Fe));break;case 4:Be=Ae[_e+1],Pe=Ae[_e+2],Me=Ae[_e+3],(Be&192)===128&&(Pe&192)===128&&(Me&192)===128&&(Fe=(Te&15)<<18|(Be&63)<<12|(Pe&63)<<6|Me&63,Fe>65535&&Fe<1114112&&(De=Fe))}}De===null?(De=65533,Re=1):De>65535&&(De-=65536,Ce.push(De>>>10&1023|55296),De=56320|De&1023),Ce.push(De),_e+=Re}return D(Ce)}const U=4096;function D(Ae){const ue=Ae.length;if(ue<=U)return String.fromCharCode.apply(String,Ae);let ce="",Ce=0;for(;Ce<ue;)ce+=String.fromCharCode.apply(String,Ae.slice(Ce,Ce+=U));return ce}function N(Ae,ue,ce){let Ce="";ce=Math.min(Ae.length,ce);for(let _e=ue;_e<ce;++_e)Ce+=String.fromCharCode(Ae[_e]&127);return Ce}function P(Ae,ue,ce){let Ce="";ce=Math.min(Ae.length,ce);for(let _e=ue;_e<ce;++_e)Ce+=String.fromCharCode(Ae[_e]);return Ce}function L(Ae,ue,ce){const Ce=Ae.length;(!ue||ue<0)&&(ue=0),(!ce||ce<0||ce>Ce)&&(ce=Ce);let _e="";for(let Te=ue;Te<ce;++Te)_e+=xe[Ae[Te]];return _e}function H(Ae,ue,ce){const Ce=Ae.slice(ue,ce);let _e="";for(let Te=0;Te<Ce.length-1;Te+=2)_e+=String.fromCharCode(Ce[Te]+Ce[Te+1]*256);return _e}A.prototype.slice=function(ue,ce){const Ce=this.length;ue=~~ue,ce=ce===void 0?Ce:~~ce,ue<0?(ue+=Ce,ue<0&&(ue=0)):ue>Ce&&(ue=Ce),ce<0?(ce+=Ce,ce<0&&(ce=0)):ce>Ce&&(ce=Ce),ce<ue&&(ce=ue);const _e=this.subarray(ue,ce);return Object.setPrototypeOf(_e,A.prototype),_e};function W(Ae,ue,ce){if(Ae%1!==0||Ae<0)throw new RangeError("offset is not uint");if(Ae+ue>ce)throw new RangeError("Trying to access beyond buffer length")}A.prototype.readUintLE=A.prototype.readUIntLE=function(ue,ce,Ce){ue=ue>>>0,ce=ce>>>0,Ce||W(ue,ce,this.length);let _e=this[ue],Te=1,De=0;for(;++De<ce&&(Te*=256);)_e+=this[ue+De]*Te;return _e},A.prototype.readUintBE=A.prototype.readUIntBE=function(ue,ce,Ce){ue=ue>>>0,ce=ce>>>0,Ce||W(ue,ce,this.length);let _e=this[ue+--ce],Te=1;for(;ce>0&&(Te*=256);)_e+=this[ue+--ce]*Te;return _e},A.prototype.readUint8=A.prototype.readUInt8=function(ue,ce){return ue=ue>>>0,ce||W(ue,1,this.length),this[ue]},A.prototype.readUint16LE=A.prototype.readUInt16LE=function(ue,ce){return ue=ue>>>0,ce||W(ue,2,this.length),this[ue]|this[ue+1]<<8},A.prototype.readUint16BE=A.prototype.readUInt16BE=function(ue,ce){return ue=ue>>>0,ce||W(ue,2,this.length),this[ue]<<8|this[ue+1]},A.prototype.readUint32LE=A.prototype.readUInt32LE=function(ue,ce){return ue=ue>>>0,ce||W(ue,4,this.length),(this[ue]|this[ue+1]<<8|this[ue+2]<<16)+this[ue+3]*16777216},A.prototype.readUint32BE=A.prototype.readUInt32BE=function(ue,ce){return ue=ue>>>0,ce||W(ue,4,this.length),this[ue]*16777216+(this[ue+1]<<16|this[ue+2]<<8|this[ue+3])},A.prototype.readBigUInt64LE=we(function(ue){ue=ue>>>0,se(ue,"offset");const ce=this[ue],Ce=this[ue+7];(ce===void 0||Ce===void 0)&&fe(ue,this.length-8);const _e=ce+this[++ue]*2**8+this[++ue]*2**16+this[++ue]*2**24,Te=this[++ue]+this[++ue]*2**8+this[++ue]*2**16+Ce*2**24;return BigInt(_e)+(BigInt(Te)<<BigInt(32))}),A.prototype.readBigUInt64BE=we(function(ue){ue=ue>>>0,se(ue,"offset");const ce=this[ue],Ce=this[ue+7];(ce===void 0||Ce===void 0)&&fe(ue,this.length-8);const _e=ce*2**24+this[++ue]*2**16+this[++ue]*2**8+this[++ue],Te=this[++ue]*2**24+this[++ue]*2**16+this[++ue]*2**8+Ce;return(BigInt(_e)<<BigInt(32))+BigInt(Te)}),A.prototype.readIntLE=function(ue,ce,Ce){ue=ue>>>0,ce=ce>>>0,Ce||W(ue,ce,this.length);let _e=this[ue],Te=1,De=0;for(;++De<ce&&(Te*=256);)_e+=this[ue+De]*Te;return Te*=128,_e>=Te&&(_e-=Math.pow(2,8*ce)),_e},A.prototype.readIntBE=function(ue,ce,Ce){ue=ue>>>0,ce=ce>>>0,Ce||W(ue,ce,this.length);let _e=ce,Te=1,De=this[ue+--_e];for(;_e>0&&(Te*=256);)De+=this[ue+--_e]*Te;return Te*=128,De>=Te&&(De-=Math.pow(2,8*ce)),De},A.prototype.readInt8=function(ue,ce){return ue=ue>>>0,ce||W(ue,1,this.length),this[ue]&128?(255-this[ue]+1)*-1:this[ue]},A.prototype.readInt16LE=function(ue,ce){ue=ue>>>0,ce||W(ue,2,this.length);const Ce=this[ue]|this[ue+1]<<8;return Ce&32768?Ce|4294901760:Ce},A.prototype.readInt16BE=function(ue,ce){ue=ue>>>0,ce||W(ue,2,this.length);const Ce=this[ue+1]|this[ue]<<8;return Ce&32768?Ce|4294901760:Ce},A.prototype.readInt32LE=function(ue,ce){return ue=ue>>>0,ce||W(ue,4,this.length),this[ue]|this[ue+1]<<8|this[ue+2]<<16|this[ue+3]<<24},A.prototype.readInt32BE=function(ue,ce){return ue=ue>>>0,ce||W(ue,4,this.length),this[ue]<<24|this[ue+1]<<16|this[ue+2]<<8|this[ue+3]},A.prototype.readBigInt64LE=we(function(ue){ue=ue>>>0,se(ue,"offset");const ce=this[ue],Ce=this[ue+7];(ce===void 0||Ce===void 0)&&fe(ue,this.length-8);const _e=this[ue+4]+this[ue+5]*2**8+this[ue+6]*2**16+(Ce<<24);return(BigInt(_e)<<BigInt(32))+BigInt(ce+this[++ue]*2**8+this[++ue]*2**16+this[++ue]*2**24)}),A.prototype.readBigInt64BE=we(function(ue){ue=ue>>>0,se(ue,"offset");const ce=this[ue],Ce=this[ue+7];(ce===void 0||Ce===void 0)&&fe(ue,this.length-8);const _e=(ce<<24)+this[++ue]*2**16+this[++ue]*2**8+this[++ue];return(BigInt(_e)<<BigInt(32))+BigInt(this[++ue]*2**24+this[++ue]*2**16+this[++ue]*2**8+Ce)}),A.prototype.readFloatLE=function(ue,ce){return ue=ue>>>0,ce||W(ue,4,this.length),c.read(this,ue,!0,23,4)},A.prototype.readFloatBE=function(ue,ce){return ue=ue>>>0,ce||W(ue,4,this.length),c.read(this,ue,!1,23,4)},A.prototype.readDoubleLE=function(ue,ce){return ue=ue>>>0,ce||W(ue,8,this.length),c.read(this,ue,!0,52,8)},A.prototype.readDoubleBE=function(ue,ce){return ue=ue>>>0,ce||W(ue,8,this.length),c.read(this,ue,!1,52,8)};function J(Ae,ue,ce,Ce,_e,Te){if(!A.isBuffer(Ae))throw new TypeError('"buffer" argument must be a Buffer instance');if(ue>_e||ue<Te)throw new RangeError('"value" argument is out of bounds');if(ce+Ce>Ae.length)throw new RangeError("Index out of range")}A.prototype.writeUintLE=A.prototype.writeUIntLE=function(ue,ce,Ce,_e){if(ue=+ue,ce=ce>>>0,Ce=Ce>>>0,!_e){const Re=Math.pow(2,8*Ce)-1;J(this,ue,ce,Ce,Re,0)}let Te=1,De=0;for(this[ce]=ue&255;++De<Ce&&(Te*=256);)this[ce+De]=ue/Te&255;return ce+Ce},A.prototype.writeUintBE=A.prototype.writeUIntBE=function(ue,ce,Ce,_e){if(ue=+ue,ce=ce>>>0,Ce=Ce>>>0,!_e){const Re=Math.pow(2,8*Ce)-1;J(this,ue,ce,Ce,Re,0)}let Te=Ce-1,De=1;for(this[ce+Te]=ue&255;--Te>=0&&(De*=256);)this[ce+Te]=ue/De&255;return ce+Ce},A.prototype.writeUint8=A.prototype.writeUInt8=function(ue,ce,Ce){return ue=+ue,ce=ce>>>0,Ce||J(this,ue,ce,1,255,0),this[ce]=ue&255,ce+1},A.prototype.writeUint16LE=A.prototype.writeUInt16LE=function(ue,ce,Ce){return ue=+ue,ce=ce>>>0,Ce||J(this,ue,ce,2,65535,0),this[ce]=ue&255,this[ce+1]=ue>>>8,ce+2},A.prototype.writeUint16BE=A.prototype.writeUInt16BE=function(ue,ce,Ce){return ue=+ue,ce=ce>>>0,Ce||J(this,ue,ce,2,65535,0),this[ce]=ue>>>8,this[ce+1]=ue&255,ce+2},A.prototype.writeUint32LE=A.prototype.writeUInt32LE=function(ue,ce,Ce){return ue=+ue,ce=ce>>>0,Ce||J(this,ue,ce,4,4294967295,0),this[ce+3]=ue>>>24,this[ce+2]=ue>>>16,this[ce+1]=ue>>>8,this[ce]=ue&255,ce+4},A.prototype.writeUint32BE=A.prototype.writeUInt32BE=function(ue,ce,Ce){return ue=+ue,ce=ce>>>0,Ce||J(this,ue,ce,4,4294967295,0),this[ce]=ue>>>24,this[ce+1]=ue>>>16,this[ce+2]=ue>>>8,this[ce+3]=ue&255,ce+4};function re(Ae,ue,ce,Ce,_e){oe(ue,Ce,_e,Ae,ce,7);let Te=Number(ue&BigInt(4294967295));Ae[ce++]=Te,Te=Te>>8,Ae[ce++]=Te,Te=Te>>8,Ae[ce++]=Te,Te=Te>>8,Ae[ce++]=Te;let De=Number(ue>>BigInt(32)&BigInt(4294967295));return Ae[ce++]=De,De=De>>8,Ae[ce++]=De,De=De>>8,Ae[ce++]=De,De=De>>8,Ae[ce++]=De,ce}function K(Ae,ue,ce,Ce,_e){oe(ue,Ce,_e,Ae,ce,7);let Te=Number(ue&BigInt(4294967295));Ae[ce+7]=Te,Te=Te>>8,Ae[ce+6]=Te,Te=Te>>8,Ae[ce+5]=Te,Te=Te>>8,Ae[ce+4]=Te;let De=Number(ue>>BigInt(32)&BigInt(4294967295));return Ae[ce+3]=De,De=De>>8,Ae[ce+2]=De,De=De>>8,Ae[ce+1]=De,De=De>>8,Ae[ce]=De,ce+8}A.prototype.writeBigUInt64LE=we(function(ue,ce=0){return re(this,ue,ce,BigInt(0),BigInt("0xffffffffffffffff"))}),A.prototype.writeBigUInt64BE=we(function(ue,ce=0){return K(this,ue,ce,BigInt(0),BigInt("0xffffffffffffffff"))}),A.prototype.writeIntLE=function(ue,ce,Ce,_e){if(ue=+ue,ce=ce>>>0,!_e){const Be=Math.pow(2,8*Ce-1);J(this,ue,ce,Ce,Be-1,-Be)}let Te=0,De=1,Re=0;for(this[ce]=ue&255;++Te<Ce&&(De*=256);)ue<0&&Re===0&&this[ce+Te-1]!==0&&(Re=1),this[ce+Te]=(ue/De>>0)-Re&255;return ce+Ce},A.prototype.writeIntBE=function(ue,ce,Ce,_e){if(ue=+ue,ce=ce>>>0,!_e){const Be=Math.pow(2,8*Ce-1);J(this,ue,ce,Ce,Be-1,-Be)}let Te=Ce-1,De=1,Re=0;for(this[ce+Te]=ue&255;--Te>=0&&(De*=256);)ue<0&&Re===0&&this[ce+Te+1]!==0&&(Re=1),this[ce+Te]=(ue/De>>0)-Re&255;return ce+Ce},A.prototype.writeInt8=function(ue,ce,Ce){return ue=+ue,ce=ce>>>0,Ce||J(this,ue,ce,1,127,-128),ue<0&&(ue=255+ue+1),this[ce]=ue&255,ce+1},A.prototype.writeInt16LE=function(ue,ce,Ce){return ue=+ue,ce=ce>>>0,Ce||J(this,ue,ce,2,32767,-32768),this[ce]=ue&255,this[ce+1]=ue>>>8,ce+2},A.prototype.writeInt16BE=function(ue,ce,Ce){return ue=+ue,ce=ce>>>0,Ce||J(this,ue,ce,2,32767,-32768),this[ce]=ue>>>8,this[ce+1]=ue&255,ce+2},A.prototype.writeInt32LE=function(ue,ce,Ce){return ue=+ue,ce=ce>>>0,Ce||J(this,ue,ce,4,2147483647,-2147483648),this[ce]=ue&255,this[ce+1]=ue>>>8,this[ce+2]=ue>>>16,this[ce+3]=ue>>>24,ce+4},A.prototype.writeInt32BE=function(ue,ce,Ce){return ue=+ue,ce=ce>>>0,Ce||J(this,ue,ce,4,2147483647,-2147483648),ue<0&&(ue=4294967295+ue+1),this[ce]=ue>>>24,this[ce+1]=ue>>>16,this[ce+2]=ue>>>8,this[ce+3]=ue&255,ce+4},A.prototype.writeBigInt64LE=we(function(ue,ce=0){return re(this,ue,ce,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),A.prototype.writeBigInt64BE=we(function(ue,ce=0){return K(this,ue,ce,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function q(Ae,ue,ce,Ce,_e,Te){if(ce+Ce>Ae.length)throw new RangeError("Index out of range");if(ce<0)throw new RangeError("Index out of range")}function Y(Ae,ue,ce,Ce,_e){return ue=+ue,ce=ce>>>0,_e||q(Ae,ue,ce,4),c.write(Ae,ue,ce,Ce,23,4),ce+4}A.prototype.writeFloatLE=function(ue,ce,Ce){return Y(this,ue,ce,!0,Ce)},A.prototype.writeFloatBE=function(ue,ce,Ce){return Y(this,ue,ce,!1,Ce)};function ee(Ae,ue,ce,Ce,_e){return ue=+ue,ce=ce>>>0,_e||q(Ae,ue,ce,8),c.write(Ae,ue,ce,Ce,52,8),ce+8}A.prototype.writeDoubleLE=function(ue,ce,Ce){return ee(this,ue,ce,!0,Ce)},A.prototype.writeDoubleBE=function(ue,ce,Ce){return ee(this,ue,ce,!1,Ce)},A.prototype.copy=function(ue,ce,Ce,_e){if(!A.isBuffer(ue))throw new TypeError("argument should be a Buffer");if(Ce||(Ce=0),!_e&&_e!==0&&(_e=this.length),ce>=ue.length&&(ce=ue.length),ce||(ce=0),_e>0&&_e<Ce&&(_e=Ce),_e===Ce||ue.length===0||this.length===0)return 0;if(ce<0)throw new RangeError("targetStart out of bounds");if(Ce<0||Ce>=this.length)throw new RangeError("Index out of range");if(_e<0)throw new RangeError("sourceEnd out of bounds");_e>this.length&&(_e=this.length),ue.length-ce<_e-Ce&&(_e=ue.length-ce+Ce);const Te=_e-Ce;return this===ue&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(ce,Ce,_e):Uint8Array.prototype.set.call(ue,this.subarray(Ce,_e),ce),Te},A.prototype.fill=function(ue,ce,Ce,_e){if(typeof ue=="string"){if(typeof ce=="string"?(_e=ce,ce=0,Ce=this.length):typeof Ce=="string"&&(_e=Ce,Ce=this.length),_e!==void 0&&typeof _e!="string")throw new TypeError("encoding must be a string");if(typeof _e=="string"&&!A.isEncoding(_e))throw new TypeError("Unknown encoding: "+_e);if(ue.length===1){const De=ue.charCodeAt(0);(_e==="utf8"&&De<128||_e==="latin1")&&(ue=De)}}else typeof ue=="number"?ue=ue&255:typeof ue=="boolean"&&(ue=Number(ue));if(ce<0||this.length<ce||this.length<Ce)throw new RangeError("Out of range index");if(Ce<=ce)return this;ce=ce>>>0,Ce=Ce===void 0?this.length:Ce>>>0,ue||(ue=0);let Te;if(typeof ue=="number")for(Te=ce;Te<Ce;++Te)this[Te]=ue;else{const De=A.isBuffer(ue)?ue:A.from(ue,_e),Re=De.length;if(Re===0)throw new TypeError('The value "'+ue+'" is invalid for argument "value"');for(Te=0;Te<Ce-ce;++Te)this[Te+ce]=De[Te%Re]}return this};const Q={};function Z(Ae,ue,ce){Q[Ae]=class extends ce{constructor(){super(),Object.defineProperty(this,"message",{value:ue.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Ae}]`,this.stack,delete this.name}get code(){return Ae}set code(_e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:_e,writable:!0})}toString(){return`${this.name} [${Ae}]: ${this.message}`}}}Z("ERR_BUFFER_OUT_OF_BOUNDS",function(Ae){return Ae?`${Ae} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Z("ERR_INVALID_ARG_TYPE",function(Ae,ue){return`The "${Ae}" argument must be of type number. Received type ${typeof ue}`},TypeError),Z("ERR_OUT_OF_RANGE",function(Ae,ue,ce){let Ce=`The value of "${Ae}" is out of range.`,_e=ce;return Number.isInteger(ce)&&Math.abs(ce)>2**32?_e=te(String(ce)):typeof ce=="bigint"&&(_e=String(ce),(ce>BigInt(2)**BigInt(32)||ce<-(BigInt(2)**BigInt(32)))&&(_e=te(_e)),_e+="n"),Ce+=` It must be ${ue}. Received ${_e}`,Ce},RangeError);function te(Ae){let ue="",ce=Ae.length;const Ce=Ae[0]==="-"?1:0;for(;ce>=Ce+4;ce-=3)ue=`_${Ae.slice(ce-3,ce)}${ue}`;return`${Ae.slice(0,ce)}${ue}`}function ae(Ae,ue,ce){se(ue,"offset"),(Ae[ue]===void 0||Ae[ue+ce]===void 0)&&fe(ue,Ae.length-(ce+1))}function oe(Ae,ue,ce,Ce,_e,Te){if(Ae>ce||Ae<ue){const De=typeof ue=="bigint"?"n":"";let Re;throw ue===0||ue===BigInt(0)?Re=`>= 0${De} and < 2${De} ** ${(Te+1)*8}${De}`:Re=`>= -(2${De} ** ${(Te+1)*8-1}${De}) and < 2 ** ${(Te+1)*8-1}${De}`,new Q.ERR_OUT_OF_RANGE("value",Re,Ae)}ae(Ce,_e,Te)}function se(Ae,ue){if(typeof Ae!="number")throw new Q.ERR_INVALID_ARG_TYPE(ue,"number",Ae)}function fe(Ae,ue,ce){throw Math.floor(Ae)!==Ae?(se(Ae,ce),new Q.ERR_OUT_OF_RANGE("offset","an integer",Ae)):ue<0?new Q.ERR_BUFFER_OUT_OF_BOUNDS:new Q.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${ue}`,Ae)}const pe=/[^+/0-9A-Za-z-_]/g;function ge(Ae){if(Ae=Ae.split("=")[0],Ae=Ae.trim().replace(pe,""),Ae.length<2)return"";for(;Ae.length%4!==0;)Ae=Ae+"=";return Ae}function me(Ae,ue){ue=ue||1/0;let ce;const Ce=Ae.length;let _e=null;const Te=[];for(let De=0;De<Ce;++De){if(ce=Ae.charCodeAt(De),ce>55295&&ce<57344){if(!_e){if(ce>56319){(ue-=3)>-1&&Te.push(239,191,189);continue}else if(De+1===Ce){(ue-=3)>-1&&Te.push(239,191,189);continue}_e=ce;continue}if(ce<56320){(ue-=3)>-1&&Te.push(239,191,189),_e=ce;continue}ce=(_e-55296<<10|ce-56320)+65536}else _e&&(ue-=3)>-1&&Te.push(239,191,189);if(_e=null,ce<128){if((ue-=1)<0)break;Te.push(ce)}else if(ce<2048){if((ue-=2)<0)break;Te.push(ce>>6|192,ce&63|128)}else if(ce<65536){if((ue-=3)<0)break;Te.push(ce>>12|224,ce>>6&63|128,ce&63|128)}else if(ce<1114112){if((ue-=4)<0)break;Te.push(ce>>18|240,ce>>12&63|128,ce>>6&63|128,ce&63|128)}else throw new Error("Invalid code point")}return Te}function be(Ae){const ue=[];for(let ce=0;ce<Ae.length;++ce)ue.push(Ae.charCodeAt(ce)&255);return ue}function le(Ae,ue){let ce,Ce,_e;const Te=[];for(let De=0;De<Ae.length&&!((ue-=2)<0);++De)ce=Ae.charCodeAt(De),Ce=ce>>8,_e=ce%256,Te.push(_e),Te.push(Ce);return Te}function ve(Ae){return s.toByteArray(ge(Ae))}function he(Ae,ue,ce,Ce){let _e;for(_e=0;_e<Ce&&!(_e+ce>=ue.length||_e>=Ae.length);++_e)ue[_e+ce]=Ae[_e];return _e}function ye(Ae,ue){return Ae instanceof ue||Ae!=null&&Ae.constructor!=null&&Ae.constructor.name!=null&&Ae.constructor.name===ue.name}function Ee(Ae){return Ae!==Ae}const xe=(function(){const Ae="0123456789abcdef",ue=new Array(256);for(let ce=0;ce<16;++ce){const Ce=ce*16;for(let _e=0;_e<16;++_e)ue[Ce+_e]=Ae[ce]+Ae[_e]}return ue})();function we(Ae){return typeof BigInt>"u"?$e:Ae}function $e(){throw new Error("BigInt not supported")}})(buffer$1)),buffer$1}var bufferExports=requireBuffer();const langs=["en","zh","ja","ko","ar","th","pl","it","de","es","fr"],Lang=_enum(langs);object$1({cancel:string$1(),close:string$1(),set:string$1(),clear:string$1(),field:string$1(),fieldName:string$1(),align:string$1(),width:string$1(),opacity:string$1(),height:string$1(),rotate:string$1(),edit:string$1(),required:string$1(),editable:string$1(),plsInputName:string$1(),fieldMustUniq:string$1(),notUniq:string$1(),noKeyName:string$1(),fieldsList:string$1(),editField:string$1(),type:string$1(),errorOccurred:string$1(),errorBulkUpdateFieldName:string$1(),commitBulkUpdateFieldName:string$1(),bulkUpdateFieldName:string$1(),addPageAfter:string$1(),removePage:string$1(),removePageConfirm:string$1(),"validation.uniqueName":string$1(),"validation.hexColor":string$1(),"validation.dateTimeFormat":string$1(),"schemas.color":string$1(),"schemas.borderWidth":string$1(),"schemas.borderColor":string$1(),"schemas.backgroundColor":string$1(),"schemas.textColor":string$1(),"schemas.bgColor":string$1(),"schemas.horizontal":string$1(),"schemas.vertical":string$1(),"schemas.left":string$1(),"schemas.center":string$1(),"schemas.right":string$1(),"schemas.top":string$1(),"schemas.middle":string$1(),"schemas.bottom":string$1(),"schemas.padding":string$1(),"schemas.text.fontName":string$1(),"schemas.text.size":string$1(),"schemas.text.spacing":string$1(),"schemas.text.textAlign":string$1(),"schemas.text.verticalAlign":string$1(),"schemas.text.lineHeight":string$1(),"schemas.text.min":string$1(),"schemas.text.max":string$1(),"schemas.text.fit":string$1(),"schemas.text.dynamicFontSize":string$1(),"schemas.text.format":string$1(),"schemas.radius":string$1(),"schemas.mvt.typingInstructions":string$1(),"schemas.mvt.sampleField":string$1(),"schemas.mvt.variablesSampleData":string$1(),"schemas.barcodes.barColor":string$1(),"schemas.barcodes.includetext":string$1(),"schemas.table.alternateBackgroundColor":string$1(),"schemas.table.tableStyle":string$1(),"schemas.table.showHead":string$1(),"schemas.table.headStyle":string$1(),"schemas.table.bodyStyle":string$1(),"schemas.table.columnStyle":string$1(),"schemas.date.format":string$1(),"schemas.date.locale":string$1(),"schemas.select.options":string$1(),"schemas.select.optionPlaceholder":string$1(),"schemas.radioGroup.groupName":string$1()}),_enum(["viewer","form","designer"]);const ColorType=_enum(["rgb","cmyk"]).optional();object$1({height:number$1(),width:number$1()});const Schema$1=object$1({name:string$1(),type:string$1(),content:string$1().optional(),position:object$1({x:number$1(),y:number$1()}),width:number$1(),height:number$1(),rotate:number$1().optional(),opacity:number$1().optional(),readOnly:boolean$1().optional(),required:boolean$1().optional(),__bodyRange:object$1({start:number$1(),end:number$1().optional()}).optional(),__isSplit:boolean$1().optional()}).passthrough(),SchemaForUIAdditionalInfo=object$1({id:string$1()});Schema$1.merge(SchemaForUIAdditionalInfo);const ArrayBufferSchema=any$1().refine(a=>a instanceof ArrayBuffer),Uint8ArraySchema=any$1().refine(a=>a instanceof Uint8Array&&a.buffer instanceof ArrayBuffer),BlankPdf=object$1({width:number$1(),height:number$1(),padding:tuple([number$1(),number$1(),number$1(),number$1()]),staticSchema:array$1(Schema$1).optional()}),CustomPdf=union([string$1(),ArrayBufferSchema,Uint8ArraySchema]),BasePdf=union([CustomPdf,BlankPdf]);array$1(record(string$1(),Schema$1));const SchemaPageArray=array$1(array$1(Schema$1)),Template=object$1({schemas:SchemaPageArray,basePdf:BasePdf,pdfmeVersion:string$1().optional()}).passthrough(),Inputs=array$1(record(string$1(),any$1())).min(1),Font=record(string$1(),object$1({data:union([string$1(),ArrayBufferSchema,Uint8ArraySchema]),fallback:boolean$1().optional(),subset:boolean$1().optional()})),Plugin=object$1({ui:any$1(),pdf:any$1(),propPanel:object$1({schema:unknown(),widgets:record(string$1(),any$1()).optional(),defaultSchema:Schema$1}),icon:string$1().optional()}).passthrough(),CommonOptions=object$1({font:Font.optional()}).passthrough(),CommonProps=object$1({template:Template,options:CommonOptions.optional(),plugins:record(string$1(),Plugin).optional()}),GeneratorOptions=CommonOptions.extend({colorType:ColorType,author:string$1().optional(),creationDate:date$1().optional(),creator:string$1().optional(),keywords:array$1(string$1()).optional(),lang:Lang.optional(),modificationDate:date$1().optional(),producer:string$1().optional(),subject:string$1().optional(),title:string$1().optional()});CommonProps.extend({inputs:Inputs,options:GeneratorOptions.optional()}).strict();const UIOptions=CommonOptions.extend({lang:Lang.optional(),labels:record(string$1(),string$1()).optional(),theme:record(string$1(),unknown()).optional(),icons:record(string$1(),string$1()).optional(),requiredByDefault:boolean$1().optional(),maxZoom:number$1().optional(),sidebarOpen:boolean$1().optional(),zoomLevel:number$1().optional()}),HTMLElementSchema=any$1().refine(a=>a instanceof HTMLElement),UIProps=CommonProps.extend({domContainer:HTMLElementSchema,options:UIOptions.optional()}),PreviewProps=UIProps.extend({inputs:Inputs}).strict(),DesignerProps=UIProps.extend({}).strict(),cloneDeep$1=structuredClone,uniq=a=>Array.from(new Set(a)),getFallbackFontName=a=>{const c=Object.entries(a).reduce((u,d)=>{const[p,v]=d;return!u&&v.fallback?p:u},"");if(c==="")throw Error("[@pdfme/common] fallback flag is not found in font. true fallback flag must be only one.");return c},getDefaultFont=()=>({[DEFAULT_FONT_NAME]:{data:b64toUint8Array(DEFAULT_FONT_VALUE),fallback:!0}}),mm2pt=a=>parseFloat(String(a))*MM_TO_PT_RATIO,pt2mm=a=>a*PT_TO_MM_RATIO,pt2px=a=>a*PT_TO_PX_RATIO,px2mm=a=>parseFloat(String(a))*.26458333333333,blob2Base64Pdf=a=>new Promise((s,c)=>{const u=new FileReader;u.onloadend=()=>{u.result.startsWith("data:application/pdf;")?s(u.result):c(Error("[@pdfme/common] template.basePdf must be pdf data."))},u.readAsDataURL(a)}),isHexValid=a=>/^#(?:[A-Fa-f0-9]{3,4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/i.test(a),migrateTemplate=a=>{a.schemas&&Array.isArray(a.schemas)&&a.schemas.length>0&&!Array.isArray(a.schemas[0])&&(a.schemas=a.schemas.map(s=>Object.entries(s).map(([c,u])=>({...u,name:c}))))},getB64BasePdf=async a=>{if(typeof a=="string"&&!a.startsWith("data:application/pdf;")&&typeof window<"u"){const u=await(await fetch(a)).blob();return blob2Base64Pdf(u)}if(typeof a=="string")return a;const s=a instanceof Uint8Array?a:new Uint8Array(a);return"data:application/pdf;base64,"+bufferExports.Buffer.from(s).toString("base64")},isBlankPdf=a=>BlankPdf.safeParse(a).success,getByteString=a=>bufferExports.Buffer.from(a,"base64").toString("binary"),b64toUint8Array=a=>{const s=a.split(";base64,")[1]?a.split(";base64,")[1]:a,c=getByteString(s),u=new Uint8Array(c.length);for(let d=0;d<c.length;d+=1)u[d]=c.charCodeAt(d);return u},getFontNamesInSchemas=a=>uniq(a.map(s=>s.map(c=>c.fontName??"")).reduce((s,c)=>s.concat(c),[]).filter(Boolean)),checkFont=a=>{const{font:s,template:{schemas:c}}=a,d=Object.values(s).reduce((A,x)=>x.fallback?A+1:A,0);if(d===0)throw Error(`[@pdfme/common] fallback flag is not found in font. true fallback flag must be only one.
|
|
25
25
|
Check this document: https://pdfme.com/docs/custom-fonts#about-font-type`);if(d>1)throw Error(`[@pdfme/common] ${d} fallback flags found in font. true fallback flag must be only one.
|
|
26
26
|
Check this document: https://pdfme.com/docs/custom-fonts#about-font-type`);const p=getFontNamesInSchemas(c),v=Object.keys(s);if(p.some(A=>!v.includes(A)))throw Error(`[@pdfme/common] ${p.filter(A=>!v.includes(A)).join()} of template.schemas is not found in font.
|
|
27
27
|
Check this document: https://pdfme.com/docs/custom-fonts`)},checkPlugins=a=>{const{plugins:s,template:{schemas:c}}=a,u=uniq(c.map(p=>p.map(v=>v.type)).flat()),d=Object.values(s).map(p=>p?p.propPanel.defaultSchema.type:void 0);if(u.some(p=>!d.includes(p)))throw Error(`[@pdfme/common] ${u.filter(p=>!d.includes(p)).join()} of template.schemas is not found in plugins.`)},checkProps=(a,s)=>{try{s.parse(a)}catch(c){if(c instanceof ZodError){const u=c.issues.map(d=>`ERROR POSITION: ${d.path.join(".")}
|
|
@@ -12,7 +12,7 @@ export declare abstract class BaseUIClass {
|
|
|
12
12
|
constructor(props: UIProps);
|
|
13
13
|
protected getLang(): "en" | "zh" | "ja" | "ko" | "ar" | "th" | "pl" | "it" | "de" | "es" | "fr";
|
|
14
14
|
protected getFont(): Record<string, {
|
|
15
|
-
data: string | ArrayBuffer | Uint8Array<
|
|
15
|
+
data: string | ArrayBuffer | Uint8Array<ArrayBuffer>;
|
|
16
16
|
fallback?: boolean | undefined;
|
|
17
17
|
subset?: boolean | undefined;
|
|
18
18
|
}>;
|
|
@@ -41,7 +41,7 @@ export declare abstract class BaseUIClass {
|
|
|
41
41
|
} | undefined;
|
|
42
42
|
__isSplit?: boolean | undefined;
|
|
43
43
|
}[][];
|
|
44
|
-
basePdf: string | ArrayBuffer | Uint8Array<
|
|
44
|
+
basePdf: string | ArrayBuffer | Uint8Array<ArrayBuffer> | {
|
|
45
45
|
width: number;
|
|
46
46
|
height: number;
|
|
47
47
|
padding: [number, number, number, number];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PluginRegistry, UIOptions } from '@pdfme/common';
|
|
2
2
|
export declare const I18nContext: import("react").Context<(key: keyof import("@pdfme/common").Dict, dict?: import("@pdfme/common").Dict) => string>;
|
|
3
3
|
export declare const FontContext: import("react").Context<Record<string, {
|
|
4
|
-
data: string | ArrayBuffer | Uint8Array<
|
|
4
|
+
data: string | ArrayBuffer | Uint8Array<ArrayBuffer>;
|
|
5
5
|
fallback?: boolean | undefined;
|
|
6
6
|
subset?: boolean | undefined;
|
|
7
7
|
}>>;
|