@tossplace/pos-plugin-sdk 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/npm-publish.yml +71 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.esm.js +1 -0
- package/package.json +28 -0
- package/types/callback/createCallbackId.d.ts +1 -0
- package/types/cash-receipt/cash-receipt.d.ts +5 -0
- package/types/catalog/catalog.d.ts +9 -0
- package/types/category/category.d.ts +8 -0
- package/types/error/PosPluginSdkError.d.ts +7 -0
- package/types/error/__test__/PosPluginSdkError.test.d.ts +1 -0
- package/types/http/http.d.ts +14 -0
- package/types/index.d.ts +13 -0
- package/types/log/log.d.ts +4 -0
- package/types/merchant/merchant.d.ts +9 -0
- package/types/option/option.d.ts +9 -0
- package/types/order/order.d.ts +19 -0
- package/types/payment/assertPayment.d.ts +2 -0
- package/types/payment/payment.d.ts +13 -0
- package/types/payment-method/payment-method.d.ts +12 -0
- package/types/pos/sdk.d.ts +37 -0
- package/types/printer/printer.d.ts +5 -0
- package/types/storage/storage.d.ts +17 -0
- package/types/table/table.d.ts +14 -0
- package/types/toast/toast.d.ts +8 -0
- package/types/ui/popup/popup.d.ts +2 -0
- package/types/ui/ui.d.ts +5 -0
- package/types/websocket/websocket.d.ts +34 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={452:(e,t,n)=>{var r,a;n.r(t),n.d(t,{assert:()=>G,ensured:()=>J,is:()=>Y,isFulfilled:()=>W,isNotNull:()=>q,isRejected:()=>K,notNull:()=>H}),function(e){e.SYSTEM="SYSTEM",e.MAINTENANCE="MAINTENANCE",e.USER_WARNING="USER_WARNING",e.VENDOR_SYSTEM="VENDOR_SYSTEM",e.VENDOR_WARNING="VENDOR_WARNING",e.SYSTEM_WARNING="SYSTEM_WARNING",e.NETWORK="NETWORK",e.ASSERT="ASSERT"}(r||(r={}));class s extends Error{constructor(e,t={}){super(e),this.origin="unknown",t.cause instanceof Error&&(this.cause=t.cause),"string"==typeof t.origin&&(this.origin=origin),delete t.cause,this.debugInfo=t,Object.defineProperty(this,"name",{value:new.target.name,enumerable:!0,writable:!0,configurable:!0}),Object.defineProperty(this,"_stack",{value:this.stack,enumerable:!1,writable:!0,configurable:!0}),Object.setPrototypeOf?Object.setPrototypeOf(this,new.target.prototype):this.__proto__=new.target.prototype,Error.captureStackTrace?.(this,this.constructor),Reflect.set(this,"_stack",this.stack),Object.defineProperties(this,{stack:{enumerable:!0,get(){return this._stack},set(e){this._stack=e},configurable:!0},message:{enumerable:!0,writable:!0,configurable:!0}})}}class i extends s{constructor(){super(...arguments),this.errorType=r.SYSTEM}}class o extends s{constructor(){super(...arguments),this.errorType=r.MAINTENANCE}}class d extends s{constructor(){super(...arguments),this.errorType=r.USER_WARNING}}class u extends s{constructor(){super(...arguments),this.errorType=r.VENDOR_SYSTEM}}class c extends s{constructor(){super(...arguments),this.errorType=r.VENDOR_WARNING}}class l extends s{constructor(){super(...arguments),this.errorType=r.SYSTEM_WARNING}}class p extends s{constructor(){super(...arguments),this.errorType=r.NETWORK}}class h extends s{constructor(){super(...arguments),this.errorType=r.ASSERT}}function m(e){throw e}!function(e){e.RUNTIME_ERROR="SYSTEM",e.BAD_REQUEST="ASSERT",e.PARSE_ERROR="SYSTEM",e.RETRYABLE_VENDOR_ERROR="VENDOR_WARNING",e.RETRYABLE_SYSTEM_ERROR="SYSTEM_WARNING"}(a||(a={})),new Proxy({},{get:(e,t)=>e=>e instanceof s&&e.errorType===t}),m.assert=function(e,t){throw new h(e,t)},m.system=function(e,t){throw new i(e,t)},m.systemWarning=function(e,t){throw new l(e,t)},m.userWarning=function(e,t){throw new d(e,t)},m.vendorWarning=function(e,t){throw new c(e,t)},m.vendorSystem=function(e,t){throw new u(e,t)},m.maintenance=function(e,t){throw new o(e,t)},m.network=function(e,t){throw new p(e,t)};const f=(e,...t)=>{throw function(e){if(!(e instanceof Error))return!1;if(!("debugInfo"in e))return!1;const t=e;return"object"==typeof t?.debugInfo&&null!==t.debugInfo}(e)||(e.debugInfo={}),e.debugInfo.args=t,e};function y({typeName:e,args:t,cause:n}){throw new h(`'${e}' 타입이어야 합니다.`,{cause:n,args:t})}f.withMasking=function(e){return(t,...n)=>{const r=e(...n);Array.isArray(r)&&f(t,...r),f(t,r)}};const g=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"],v=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...g],_=["null","undefined","string","number","bigint","boolean","symbol"];function b(e){return t=>typeof t===e}const{toString:P}=Object.prototype,k=e=>{const t=P.call(e).slice(8,-1);return/HTML\w+Element/.test(t)&&x.domElement(e)?"HTMLElement":(n=t,v.includes(n)?t:void 0);var n},w=e=>t=>k(t)===e;function x(e){if(null===e)return"null";switch(typeof e){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol"}if(x.observable(e))return"Observable";if(x.array(e))return"Array";if(x.buffer(e))return"Buffer";const t=k(e);if(t)return t;if(e instanceof String||e instanceof Boolean||e instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}x.undefined=b("undefined"),x.string=b("string");const I=b("number");x.number=e=>I(e)&&!x.nan(e),x.bigint=b("bigint"),x.function_=b("function"),x.null_=e=>null===e,x.class_=e=>x.function_(e)&&e.toString().startsWith("class "),x.boolean=e=>!0===e||!1===e,x.symbol=b("symbol"),x.numericString=e=>x.string(e)&&!x.emptyStringOrWhitespace(e)&&!Number.isNaN(Number(e)),x.array=(e,t)=>!!Array.isArray(e)&&(!x.function_(t)||e.every(t)),x.buffer=e=>e?.constructor?.isBuffer?.(e)??!1,x.blob=e=>w("Blob")(e),x.nullOrUndefined=e=>x.null_(e)||x.undefined(e),x.object=e=>!x.null_(e)&&("object"==typeof e||x.function_(e)),x.iterable=e=>x.function_(e?.[Symbol.iterator]),x.asyncIterable=e=>x.function_(e?.[Symbol.asyncIterator]),x.generator=e=>x.iterable(e)&&x.function_(e?.next)&&x.function_(e?.throw),x.asyncGenerator=e=>x.asyncIterable(e)&&x.function_(e.next)&&x.function_(e.throw),x.nativePromise=e=>w("Promise")(e),x.promise=e=>x.nativePromise(e)||(e=>x.function_(e?.then)&&x.function_(e?.catch))(e),x.generatorFunction=w("GeneratorFunction"),x.asyncGeneratorFunction=e=>"AsyncGeneratorFunction"===k(e),x.asyncFunction=e=>"AsyncFunction"===k(e),x.boundFunction=e=>x.function_(e)&&!e.hasOwnProperty("prototype"),x.regExp=w("RegExp"),x.date=w("Date"),x.error=w("Error"),x.map=e=>w("Map")(e),x.set=e=>w("Set")(e),x.weakMap=e=>w("WeakMap")(e),x.weakSet=e=>w("WeakSet")(e),x.int8Array=w("Int8Array"),x.uint8Array=w("Uint8Array"),x.uint8ClampedArray=w("Uint8ClampedArray"),x.int16Array=w("Int16Array"),x.uint16Array=w("Uint16Array"),x.int32Array=w("Int32Array"),x.uint32Array=w("Uint32Array"),x.float32Array=w("Float32Array"),x.float64Array=w("Float64Array"),x.bigInt64Array=w("BigInt64Array"),x.bigUint64Array=w("BigUint64Array"),x.arrayBuffer=w("ArrayBuffer"),x.sharedArrayBuffer=w("SharedArrayBuffer"),x.dataView=w("DataView"),x.enumCase=(e,t)=>Object.values(t).includes(e),x.directInstanceOf=(e,t)=>Object.getPrototypeOf(e)===t.prototype,x.urlInstance=e=>w("URL")(e),x.urlString=e=>{if(!x.string(e))return!1;try{return new URL(e),!0}catch{return!1}},x.truthy=e=>Boolean(e),x.falsy=e=>!e,x.nan=e=>Number.isNaN(e),x.primitive=e=>{return x.null_(e)||(t=typeof e,_.includes(t));var t},x.integer=e=>Number.isInteger(e),x.safeInteger=e=>Number.isSafeInteger(e),x.plainObject=e=>{if("[object Object]"!==P.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.getPrototypeOf({})},x.typedArray=e=>{return t=k(e),g.includes(t);var t},x.arrayLike=e=>!x.nullOrUndefined(e)&&!x.function_(e)&&(e=>x.safeInteger(e)&&e>=0)(e.length),x.inRange=(e,t)=>{if(x.number(t))return e>=Math.min(0,t)&&e<=Math.max(t,0);if(x.array(t)&&2===t.length)return e>=Math.min(...t)&&e<=Math.max(...t);throw new TypeError(`Invalid range: ${JSON.stringify(t)}`)};const T=["innerHTML","ownerDocument","style","attributes","nodeValue"];x.domElement=e=>x.object(e)&&1===e.nodeType&&x.string(e.nodeName)&&!x.plainObject(e)&&T.every((t=>t in e)),x.observable=e=>!!e&&(e===e[Symbol.observable]?.()||e===e["@@observable"]?.()),x.nodeStream=e=>x.object(e)&&x.function_(e.pipe)&&!x.observable(e),x.infinite=e=>e===1/0||e===-1/0;const O=e=>t=>x.integer(t)&&Math.abs(t%2)===e;x.evenInteger=O(0),x.oddInteger=O(1),x.emptyArray=e=>x.array(e)&&0===e.length,x.nonEmptyArray=e=>x.array(e)&&e.length>0,x.emptyString=e=>x.string(e)&&0===e.length,x.emptyStringOrWhitespace=e=>x.emptyString(e)||(e=>x.string(e)&&!/\S/.test(e))(e),x.nonEmptyString=e=>x.string(e)&&e.length>0,x.nonEmptyStringAndNotWhitespace=e=>x.string(e)&&!x.emptyStringOrWhitespace(e),x.emptyObject=e=>x.object(e)&&!x.map(e)&&!x.set(e)&&0===Object.keys(e).length,x.nonEmptyObject=e=>x.object(e)&&!x.map(e)&&!x.set(e)&&Object.keys(e).length>0,x.emptySet=e=>x.set(e)&&0===e.size,x.nonEmptySet=e=>x.set(e)&&e.size>0,x.emptyMap=e=>x.map(e)&&0===e.size,x.nonEmptyMap=e=>x.map(e)&&e.size>0,x.propertyKey=e=>x.any([x.string,x.number,x.symbol],e),x.formData=e=>w("FormData")(e),x.urlSearchParams=e=>w("URLSearchParams")(e);const S=(e,t,n)=>{if(!x.function_(t))throw new TypeError(`Invalid predicate: ${JSON.stringify(t)}`);if(0===n.length)throw new TypeError("Invalid number of values");return e.call(n,t)};x.any=(e,...t)=>(x.array(e)?e:[e]).some((e=>S(Array.prototype.some,e,t))),x.all=(e,...t)=>S(Array.prototype.every,e,t);const C=(e,t,n,r={})=>{if(!e){const{multipleValues:e}=r,a=e?`received values of types ${[...new Set(n.map((e=>`\`${x(e)}\``)))].join(", ")}`:`received value of type \`${x(n)}\``;throw new TypeError(`Expected value which is \`${t}\`, ${a}.`)}},Z={undefined:e=>C(x.undefined(e),"undefined",e),string:e=>C(x.string(e),"string",e),number:e=>C(x.number(e),"number",e),bigint:e=>C(x.bigint(e),"bigint",e),function_:e=>C(x.function_(e),"Function",e),null_:e=>C(x.null_(e),"null",e),class_:e=>C(x.class_(e),"Class",e),boolean:e=>C(x.boolean(e),"boolean",e),symbol:e=>C(x.symbol(e),"symbol",e),numericString:e=>C(x.numericString(e),"string with a number",e),array:(e,t)=>{C(x.array(e),"Array",e),t&&e.forEach(t)},buffer:e=>C(x.buffer(e),"Buffer",e),blob:e=>C(x.blob(e),"Blob",e),nullOrUndefined:e=>C(x.nullOrUndefined(e),"null or undefined",e),object:e=>C(x.object(e),"Object",e),iterable:e=>C(x.iterable(e),"Iterable",e),asyncIterable:e=>C(x.asyncIterable(e),"AsyncIterable",e),generator:e=>C(x.generator(e),"Generator",e),asyncGenerator:e=>C(x.asyncGenerator(e),"AsyncGenerator",e),nativePromise:e=>C(x.nativePromise(e),"native Promise",e),promise:e=>C(x.promise(e),"Promise",e),generatorFunction:e=>C(x.generatorFunction(e),"GeneratorFunction",e),asyncGeneratorFunction:e=>C(x.asyncGeneratorFunction(e),"AsyncGeneratorFunction",e),asyncFunction:e=>C(x.asyncFunction(e),"AsyncFunction",e),boundFunction:e=>C(x.boundFunction(e),"Function",e),regExp:e=>C(x.regExp(e),"RegExp",e),date:e=>C(x.date(e),"Date",e),error:e=>C(x.error(e),"Error",e),map:e=>C(x.map(e),"Map",e),set:e=>C(x.set(e),"Set",e),weakMap:e=>C(x.weakMap(e),"WeakMap",e),weakSet:e=>C(x.weakSet(e),"WeakSet",e),int8Array:e=>C(x.int8Array(e),"Int8Array",e),uint8Array:e=>C(x.uint8Array(e),"Uint8Array",e),uint8ClampedArray:e=>C(x.uint8ClampedArray(e),"Uint8ClampedArray",e),int16Array:e=>C(x.int16Array(e),"Int16Array",e),uint16Array:e=>C(x.uint16Array(e),"Uint16Array",e),int32Array:e=>C(x.int32Array(e),"Int32Array",e),uint32Array:e=>C(x.uint32Array(e),"Uint32Array",e),float32Array:e=>C(x.float32Array(e),"Float32Array",e),float64Array:e=>C(x.float64Array(e),"Float64Array",e),bigInt64Array:e=>C(x.bigInt64Array(e),"BigInt64Array",e),bigUint64Array:e=>C(x.bigUint64Array(e),"BigUint64Array",e),arrayBuffer:e=>C(x.arrayBuffer(e),"ArrayBuffer",e),sharedArrayBuffer:e=>C(x.sharedArrayBuffer(e),"SharedArrayBuffer",e),dataView:e=>C(x.dataView(e),"DataView",e),enumCase:(e,t)=>C(x.enumCase(e,t),"EnumCase",e),urlInstance:e=>C(x.urlInstance(e),"URL",e),urlString:e=>C(x.urlString(e),"string with a URL",e),truthy:e=>C(x.truthy(e),"truthy",e),falsy:e=>C(x.falsy(e),"falsy",e),nan:e=>C(x.nan(e),"NaN",e),primitive:e=>C(x.primitive(e),"primitive",e),integer:e=>C(x.integer(e),"integer",e),safeInteger:e=>C(x.safeInteger(e),"integer",e),plainObject:e=>C(x.plainObject(e),"plain object",e),typedArray:e=>C(x.typedArray(e),"TypedArray",e),arrayLike:e=>C(x.arrayLike(e),"array-like",e),domElement:e=>C(x.domElement(e),"HTMLElement",e),observable:e=>C(x.observable(e),"Observable",e),nodeStream:e=>C(x.nodeStream(e),"Node.js Stream",e),infinite:e=>C(x.infinite(e),"infinite number",e),emptyArray:e=>C(x.emptyArray(e),"empty array",e),nonEmptyArray:e=>C(x.nonEmptyArray(e),"non-empty array",e),emptyString:e=>C(x.emptyString(e),"empty string",e),emptyStringOrWhitespace:e=>C(x.emptyStringOrWhitespace(e),"empty string or whitespace",e),nonEmptyString:e=>C(x.nonEmptyString(e),"non-empty string",e),nonEmptyStringAndNotWhitespace:e=>C(x.nonEmptyStringAndNotWhitespace(e),"non-empty string and not whitespace",e),emptyObject:e=>C(x.emptyObject(e),"empty object",e),nonEmptyObject:e=>C(x.nonEmptyObject(e),"non-empty object",e),emptySet:e=>C(x.emptySet(e),"empty set",e),nonEmptySet:e=>C(x.nonEmptySet(e),"non-empty set",e),emptyMap:e=>C(x.emptyMap(e),"empty map",e),nonEmptyMap:e=>C(x.nonEmptyMap(e),"non-empty map",e),propertyKey:e=>C(x.propertyKey(e),"PropertyKey",e),formData:e=>C(x.formData(e),"FormData",e),urlSearchParams:e=>C(x.urlSearchParams(e),"URLSearchParams",e),evenInteger:e=>C(x.evenInteger(e),"even integer",e),oddInteger:e=>C(x.oddInteger(e),"odd integer",e),directInstanceOf:(e,t)=>C(x.directInstanceOf(e,t),"T",e),inRange:(e,t)=>C(x.inRange(e,t),"in range",e),any:(e,...t)=>C(x.any(e,...t),"predicate returns truthy for any value",t,{multipleValues:!0}),all:(e,...t)=>C(x.all(e,...t),"predicate returns truthy for all values",t,{multipleValues:!0})};Object.defineProperties(x,{class:{value:x.class_},function:{value:x.function_},null:{value:x.null_}}),Object.defineProperties(Z,{class:{value:Z.class_},function:{value:Z.function_},null:{value:Z.null_}});const A=x;function j(e,t){return{name:e,is:t,assert:(n,...r)=>function({condition:e,typeName:t,args:n,cause:r}){e||y({typeName:t,args:n,cause:r})}({condition:t(n,...r),typeName:e,args:[n]})}}const E=j("businessRegistrationNumber",(e=>{if(null==e||!A.string(e))return!1;const t=e.replace(/\D/g,"");return!["9999999999","1111111111","999999999","0000000000","4444444444"].some((e=>e===t))&&10===t.length})),N=j("datePattern",((e,t)=>{if(!A.string(e))return!1;switch(t){case"YYYYMMDD":return/^\d{8}$/.test(e)&&n(e.slice(4,6))&&r(e.slice(6,8));case"YYMMDD":return/^\d{6}$/.test(e)&&n(e.slice(2,4))&&r(e.slice(4,6));case"YYYY-MM-DD":return/^\d{4}-\d{2}-\d{2}$/.test(e)&&n(e.slice(5,7))&&r(e.slice(8,10));case"YY-MM-DD":return/^\d{2}-\d{2}-\d{2}$/.test(e)&&n(e.slice(3,5))&&r(e.slice(6,8));default:throw new i(`Unknown date pattern: ${t}`,{pattern:t,value:e})}function n(e){const t=Number(e);return t>=1&&t<=12}function r(e){const t=Number(e);return t>=1&&t<=31}})),R=j("false",(e=>!1===e)),M=j("html",(e=>A.string(e)&&/<[a-z]+>[^<]*<\/[a-z]+>/g.test(e))),z=j("jsonString",(e=>{try{return!!A.string(e)&&(JSON.parse(e),!0)}catch{return!1}})),D=j("mailOrderBusinessNumber",(e=>{if(null==e||!A.string(e)||0===e.trim().length)return!1;const t=e.replace(/-/g,"");return!["(중복말소)"].some((e=>e===t))&&!!/[^0]/g.test(t)&&Boolean(e.match(/^[\dㄱ-ㅎ가-힣\w]/))})),L=j("objectOrArrayString",(e=>{try{if(A.string(e)){const t=JSON.parse(e);return A.array(t)||A.plainObject(t)}return!1}catch{return!1}})),U=j("residentRegistrationNumber",(e=>{if(null==e||!A.string(e))return!1;const t=e.replace(/-/g,"");return!!A.numericString(t)&&13===t.length&&(!function(e){const t=parseInt(e.slice(0,2)),n=parseInt(e.slice(2,4));return!(t>=20&&n>=10)}(t)||function(e){const t=parseInt(e[e.length-1]);return(11-e.slice(0,e.length-1).split("").map((e=>parseInt(e))).reduce(((e,t,n)=>e+t*(n%8+2)),0)%11)%10===t}(t))})),V={datePatternType:N,falseType:R,trueType:j("true",(e=>!0===e)),htmlType:M,jsonStringType:z,objectOrArrayStringType:L,businessRegistrationNumberType:E,mailOrderBusinessNumberType:D,residentRegistrationNumberType:U};function $(e){return Object.entries(V).reduce(((t,[n,r])=>{if(n!==`${r.name}Type`)throw new i(`Handler이름은 {{name}}Type이어야 합니다.\n- ${n} !== ${r.name}Type`,{handlerVariable:n,handlerName:r.name});return{...t,[r.name]:r[e]}}),{})}const F=$("is"),B=$("assert");function W(e){return"fulfilled"===e.status}function q(e){return null!=e}function K(e){return"rejected"===e.status}function H(e,t=()=>{throw new h("예상하지 못한 Nullable 값을 받았습니다.")}){return null==e&&t(),e}const Y=function(e,t){for(const n in t)e[n]=t[n];return function(e){const t=new Proxy({},{get:(t,n)=>(n in t||(t[n]=(...t)=>!e[n].apply(null,t)),t[n])});return e.not=t,e}(e)}(A,F),G=function(e,t){const n={...t};return new Proxy(e,{get(e,t){if(!(t in n)){const r=e[t];n[t]=(...e)=>{try{return r(...e)}catch(n){y({typeName:t,args:e,cause:n})}}}return n[t]}})}(Z,B),J=function(e){return new Proxy({},{get:(t,n)=>(n in t||(t[n]=(...t)=>((0,e[n])(...t),t[0])),t[n])})}(G)},2726:(e,t,n)=>{var r,a,s;n.r(t),n.d(t,{Validate:()=>Lt,safeParseJson:()=>Dt,typeGuard:()=>zt,validate:()=>Mt,validateWith:()=>Ut}),function(e){e.SYSTEM="SYSTEM",e.MAINTENANCE="MAINTENANCE",e.USER_WARNING="USER_WARNING",e.VENDOR_SYSTEM="VENDOR_SYSTEM",e.VENDOR_WARNING="VENDOR_WARNING",e.SYSTEM_WARNING="SYSTEM_WARNING",e.NETWORK="NETWORK",e.ASSERT="ASSERT",e.INFO="INFO"}(r||(r={}));class i extends Error{static isWebAutomationError(e){const t="function"==typeof(n=e)&&n.toString().startsWith("class ")?function(e){const t=new WeakMap;let n=e;for(;;)try{return t.has(n)?null:(t.set(n,!0),new n(""))}catch(e){if(!Object.getPrototypeOf(n))return null;n=Object.getPrototypeOf(n)}}(e):e;var n;if("object"!=typeof t)return!1;try{return"origin"in t&&"debugInfo"in t&&"errorType"in t&&"string"==typeof t.origin&&"object"==typeof t.debugInfo&&"string"==typeof t.errorType}catch(e){return!1}}constructor(e,t={}){super(e),this.origin="unknown",t.cause instanceof Error&&(this.cause=t.cause),"string"==typeof t.origin&&(this.origin=t.origin),this.errorType||(this.errorType=r.SYSTEM),delete t.cause,this.debugInfo=t,Object.defineProperty(this,"name",{value:new.target.name,enumerable:!0,writable:!0,configurable:!0}),Object.defineProperty(this,"_stack",{value:this.stack,enumerable:!1,writable:!0,configurable:!0}),Object.setPrototypeOf?Object.setPrototypeOf(this,new.target.prototype):this.__proto__=new.target.prototype,Error.captureStackTrace?.(this,this.constructor),Reflect.set(this,"_stack",this.stack),Object.defineProperties(this,{stack:{enumerable:!0,get(){return this._stack},set(e){this._stack=e},configurable:!0},message:{enumerable:!0,writable:!0,configurable:!0}})}}class o extends i{constructor(){super(...arguments),this.errorType=r.SYSTEM}}class d extends i{constructor(){super(...arguments),this.errorType=r.ASSERT}}!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},e.getValidEnumValues=t=>{const n=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),r={};for(const e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(const n of e)if(t(n))return n},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(a||(a={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(s||(s={}));const u=a.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),c=e=>{switch(typeof e){case"undefined":return u.undefined;case"string":return u.string;case"number":return isNaN(e)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(e)?u.array:null===e?u.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?u.promise:"undefined"!=typeof Map&&e instanceof Map?u.map:"undefined"!=typeof Set&&e instanceof Set?u.set:"undefined"!=typeof Date&&e instanceof Date?u.date:u.object;default:return u.unknown}},l=a.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class p extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(const a of e.issues)if("invalid_union"===a.code)a.unionErrors.map(r);else if("invalid_return_type"===a.code)r(a.returnTypeError);else if("invalid_arguments"===a.code)r(a.argumentsError);else if(0===a.path.length)n._errors.push(t(a));else{let e=n,r=0;for(;r<a.path.length;){const n=a.path[r];r===a.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(a))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(e){if(!(e instanceof p))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,a.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},n=[];for(const r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}p.create=e=>new p(e);const h=(e,t)=>{let n;switch(e.code){case l.invalid_type:n=e.received===u.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case l.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,a.jsonStringifyReplacer)}`;break;case l.unrecognized_keys:n=`Unrecognized key(s) in object: ${a.joinValues(e.keys,", ")}`;break;case l.invalid_union:n="Invalid input";break;case l.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${a.joinValues(e.options)}`;break;case l.invalid_enum_value:n=`Invalid enum value. Expected ${a.joinValues(e.options)}, received '${e.received}'`;break;case l.invalid_arguments:n="Invalid function arguments";break;case l.invalid_return_type:n="Invalid function return type";break;case l.invalid_date:n="Invalid date";break;case l.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:a.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case l.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case l.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case l.custom:n="Invalid input";break;case l.invalid_intersection_types:n="Intersection results could not be merged";break;case l.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case l.not_finite:n="Number must be finite";break;default:n=t.defaultError,a.assertNever(e)}return{message:n}};let m=h;function f(){return m}const y=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,s=[...n,...a.path||[]],i={...a,path:s};if(void 0!==a.message)return{...a,path:s,message:a.message};let o="";const d=r.filter((e=>!!e)).slice().reverse();for(const e of d)o=e(i,{data:t,defaultError:o}).message;return{...a,path:s,message:o}};function g(e,t){const n=f(),r=y({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===h?void 0:h].filter((e=>!!e))});e.common.issues.push(r)}class v{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const r of t){if("aborted"===r.status)return _;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const e of t){const t=await e.key,r=await e.value;n.push({key:t,value:r})}return v.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const r of t){const{key:t,value:a}=r;if("aborted"===t.status)return _;if("aborted"===a.status)return _;"dirty"===t.status&&e.dirty(),"dirty"===a.status&&e.dirty(),"__proto__"===t.value||void 0===a.value&&!r.alwaysSet||(n[t.value]=a.value)}return{status:e.value,value:n}}}const _=Object.freeze({status:"aborted"}),b=e=>({status:"dirty",value:e}),P=e=>({status:"valid",value:e}),k=e=>"aborted"===e.status,w=e=>"dirty"===e.status,x=e=>"valid"===e.status,I=e=>"undefined"!=typeof Promise&&e instanceof Promise;function T(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function O(e,t,n,r,a){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?a.call(e,n):a?a.value=n:t.set(e,n),n}var S,C,Z;"function"==typeof SuppressedError&&SuppressedError,function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(S||(S={}));class A{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const j=(e,t)=>{if(x(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new p(e.common.issues);return this._error=t,this._error}}};function E(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:a}:{errorMap:(t,a)=>{var s,i;const{message:o}=e;return"invalid_enum_value"===t.code?{message:null!=o?o:a.defaultError}:void 0===a.data?{message:null!==(s=null!=o?o:r)&&void 0!==s?s:a.defaultError}:"invalid_type"!==t.code?{message:a.defaultError}:{message:null!==(i=null!=o?o:n)&&void 0!==i?i:a.defaultError}},description:a}}class N{get description(){return this._def.description}_getType(e){return c(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:c(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new v,ctx:{common:e.parent.common,data:e.data,parsedType:c(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(I(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:c(e)},a=this._parseSync({data:e,path:r.path,parent:r});return j(r,a)}"~validate"(e){var t,n;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:c(e)};if(!this["~standard"].async)try{const t=this._parseSync({data:e,path:[],parent:r});return x(t)?{value:t.value}:{issues:r.common.issues}}catch(e){(null===(n=null===(t=null==e?void 0:e.message)||void 0===t?void 0:t.toLowerCase())||void 0===n?void 0:n.includes("encountered"))&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then((e=>x(e)?{value:e.value}:{issues:r.common.issues}))}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:c(e)},r=this._parse({data:e,path:n.path,parent:n}),a=await(I(r)?r:Promise.resolve(r));return j(n,a)}refine(e,t){const n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,r)=>{const a=e(t),s=()=>r.addIssue({code:l.custom,...n(t)});return"undefined"!=typeof Promise&&a instanceof Promise?a.then((e=>!!e||(s(),!1))):!!a||(s(),!1)}))}refinement(e,t){return this._refinement(((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1)))}_refinement(e){return new Ne({schema:this,typeName:Ke.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return Re.create(this,this._def)}nullable(){return Me.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return fe.create(this)}promise(){return Ee.create(this,this._def)}or(e){return ve.create([this,e],this._def)}and(e){return ke.create(this,e,this._def)}transform(e){return new Ne({...E(this._def),schema:this,typeName:Ke.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new ze({...E(this._def),innerType:this,defaultValue:t,typeName:Ke.ZodDefault})}brand(){return new Ve({typeName:Ke.ZodBranded,type:this,...E(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new De({...E(this._def),innerType:this,catchValue:t,typeName:Ke.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return $e.create(this,e)}readonly(){return Fe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const R=/^c[^\s-]{8,}$/i,M=/^[0-9a-z]+$/,z=/^[0-9A-HJKMNP-TV-Z]{26}$/i,D=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,L=/^[a-z0-9_-]{21}$/i,U=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,V=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,$=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let F;const B=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,W=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,q=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,K=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,H=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Y=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,G="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",J=new RegExp(`^${G}$`);function X(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function Q(e){let t=`${G}T${X(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function ee(e,t){if(!U.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(r));return!("object"!=typeof a||null===a||!a.typ||!a.alg||t&&a.alg!==t)}catch(e){return!1}}function te(e,t){return!("v4"!==t&&t||!W.test(e))||!("v6"!==t&&t||!K.test(e))}class ne extends N{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const t=this._getOrReturnCtx(e);return g(t,{code:l.invalid_type,expected:u.string,received:t.parsedType}),_}const t=new v;let n;for(const i of this._def.checks)if("min"===i.kind)e.data.length<i.value&&(n=this._getOrReturnCtx(e,n),g(n,{code:l.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),t.dirty());else if("max"===i.kind)e.data.length>i.value&&(n=this._getOrReturnCtx(e,n),g(n,{code:l.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),t.dirty());else if("length"===i.kind){const r=e.data.length>i.value,a=e.data.length<i.value;(r||a)&&(n=this._getOrReturnCtx(e,n),r?g(n,{code:l.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&g(n,{code:l.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),t.dirty())}else if("email"===i.kind)$.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"email",code:l.invalid_string,message:i.message}),t.dirty());else if("emoji"===i.kind)F||(F=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),F.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"emoji",code:l.invalid_string,message:i.message}),t.dirty());else if("uuid"===i.kind)D.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"uuid",code:l.invalid_string,message:i.message}),t.dirty());else if("nanoid"===i.kind)L.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"nanoid",code:l.invalid_string,message:i.message}),t.dirty());else if("cuid"===i.kind)R.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"cuid",code:l.invalid_string,message:i.message}),t.dirty());else if("cuid2"===i.kind)M.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"cuid2",code:l.invalid_string,message:i.message}),t.dirty());else if("ulid"===i.kind)z.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"ulid",code:l.invalid_string,message:i.message}),t.dirty());else if("url"===i.kind)try{new URL(e.data)}catch(r){n=this._getOrReturnCtx(e,n),g(n,{validation:"url",code:l.invalid_string,message:i.message}),t.dirty()}else"regex"===i.kind?(i.regex.lastIndex=0,i.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"regex",code:l.invalid_string,message:i.message}),t.dirty())):"trim"===i.kind?e.data=e.data.trim():"includes"===i.kind?e.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(e,n),g(n,{code:l.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),t.dirty()):"toLowerCase"===i.kind?e.data=e.data.toLowerCase():"toUpperCase"===i.kind?e.data=e.data.toUpperCase():"startsWith"===i.kind?e.data.startsWith(i.value)||(n=this._getOrReturnCtx(e,n),g(n,{code:l.invalid_string,validation:{startsWith:i.value},message:i.message}),t.dirty()):"endsWith"===i.kind?e.data.endsWith(i.value)||(n=this._getOrReturnCtx(e,n),g(n,{code:l.invalid_string,validation:{endsWith:i.value},message:i.message}),t.dirty()):"datetime"===i.kind?Q(i).test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{code:l.invalid_string,validation:"datetime",message:i.message}),t.dirty()):"date"===i.kind?J.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{code:l.invalid_string,validation:"date",message:i.message}),t.dirty()):"time"===i.kind?new RegExp(`^${X(i)}$`).test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{code:l.invalid_string,validation:"time",message:i.message}),t.dirty()):"duration"===i.kind?V.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"duration",code:l.invalid_string,message:i.message}),t.dirty()):"ip"===i.kind?(r=e.data,("v4"!==(s=i.version)&&s||!B.test(r))&&("v6"!==s&&s||!q.test(r))&&(n=this._getOrReturnCtx(e,n),g(n,{validation:"ip",code:l.invalid_string,message:i.message}),t.dirty())):"jwt"===i.kind?ee(e.data,i.alg)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"jwt",code:l.invalid_string,message:i.message}),t.dirty()):"cidr"===i.kind?te(e.data,i.version)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"cidr",code:l.invalid_string,message:i.message}),t.dirty()):"base64"===i.kind?H.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"base64",code:l.invalid_string,message:i.message}),t.dirty()):"base64url"===i.kind?Y.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"base64url",code:l.invalid_string,message:i.message}),t.dirty()):a.assertNever(i);var r,s;return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement((t=>e.test(t)),{validation:t,code:l.invalid_string,...S.errToObj(n)})}_addCheck(e){return new ne({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...S.errToObj(e)})}url(e){return this._addCheck({kind:"url",...S.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...S.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...S.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...S.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...S.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...S.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...S.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...S.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...S.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...S.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...S.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...S.errToObj(e)})}datetime(e){var t,n;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(n=null==e?void 0:e.local)&&void 0!==n&&n,...S.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...S.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...S.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...S.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...S.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...S.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...S.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...S.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...S.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...S.errToObj(t)})}nonempty(e){return this.min(1,S.errToObj(e))}trim(){return new ne({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ne({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ne({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isCIDR(){return!!this._def.checks.find((e=>"cidr"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get isBase64url(){return!!this._def.checks.find((e=>"base64url"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function re(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r;return parseInt(e.toFixed(a).replace(".",""))%parseInt(t.toFixed(a).replace(".",""))/Math.pow(10,a)}ne.create=e=>{var t;return new ne({checks:[],typeName:Ke.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...E(e)})};class ae extends N{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){const t=this._getOrReturnCtx(e);return g(t,{code:l.invalid_type,expected:u.number,received:t.parsedType}),_}let t;const n=new v;for(const r of this._def.checks)"int"===r.kind?a.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),g(t,{code:l.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty()):"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),g(t,{code:l.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),g(t,{code:l.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"multipleOf"===r.kind?0!==re(e.data,r.value)&&(t=this._getOrReturnCtx(e,t),g(t,{code:l.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),g(t,{code:l.not_finite,message:r.message}),n.dirty()):a.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,S.toString(t))}gt(e,t){return this.setLimit("min",e,!1,S.toString(t))}lte(e,t){return this.setLimit("max",e,!0,S.toString(t))}lt(e,t){return this.setLimit("max",e,!1,S.toString(t))}setLimit(e,t,n,r){return new ae({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:S.toString(r)}]})}_addCheck(e){return new ae({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:S.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:S.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:S.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:S.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:S.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:S.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:S.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:S.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:S.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&a.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}ae.create=e=>new ae({checks:[],typeName:Ke.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...E(e)});class se extends N{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch(t){return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let t;const n=new v;for(const r of this._def.checks)"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),g(t,{code:l.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),g(t,{code:l.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),g(t,{code:l.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):a.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return g(t,{code:l.invalid_type,expected:u.bigint,received:t.parsedType}),_}gte(e,t){return this.setLimit("min",e,!0,S.toString(t))}gt(e,t){return this.setLimit("min",e,!1,S.toString(t))}lte(e,t){return this.setLimit("max",e,!0,S.toString(t))}lt(e,t){return this.setLimit("max",e,!1,S.toString(t))}setLimit(e,t,n,r){return new se({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:S.toString(r)}]})}_addCheck(e){return new se({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:S.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:S.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:S.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:S.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:S.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}se.create=e=>{var t;return new se({checks:[],typeName:Ke.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...E(e)})};class ie extends N{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==u.boolean){const t=this._getOrReturnCtx(e);return g(t,{code:l.invalid_type,expected:u.boolean,received:t.parsedType}),_}return P(e.data)}}ie.create=e=>new ie({typeName:Ke.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...E(e)});class oe extends N{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const t=this._getOrReturnCtx(e);return g(t,{code:l.invalid_type,expected:u.date,received:t.parsedType}),_}if(isNaN(e.data.getTime()))return g(this._getOrReturnCtx(e),{code:l.invalid_date}),_;const t=new v;let n;for(const r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),g(n,{code:l.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),t.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),g(n,{code:l.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),t.dirty()):a.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new oe({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:S.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:S.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}oe.create=e=>new oe({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:Ke.ZodDate,...E(e)});class de extends N{_parse(e){if(this._getType(e)!==u.symbol){const t=this._getOrReturnCtx(e);return g(t,{code:l.invalid_type,expected:u.symbol,received:t.parsedType}),_}return P(e.data)}}de.create=e=>new de({typeName:Ke.ZodSymbol,...E(e)});class ue extends N{_parse(e){if(this._getType(e)!==u.undefined){const t=this._getOrReturnCtx(e);return g(t,{code:l.invalid_type,expected:u.undefined,received:t.parsedType}),_}return P(e.data)}}ue.create=e=>new ue({typeName:Ke.ZodUndefined,...E(e)});class ce extends N{_parse(e){if(this._getType(e)!==u.null){const t=this._getOrReturnCtx(e);return g(t,{code:l.invalid_type,expected:u.null,received:t.parsedType}),_}return P(e.data)}}ce.create=e=>new ce({typeName:Ke.ZodNull,...E(e)});class le extends N{constructor(){super(...arguments),this._any=!0}_parse(e){return P(e.data)}}le.create=e=>new le({typeName:Ke.ZodAny,...E(e)});class pe extends N{constructor(){super(...arguments),this._unknown=!0}_parse(e){return P(e.data)}}pe.create=e=>new pe({typeName:Ke.ZodUnknown,...E(e)});class he extends N{_parse(e){const t=this._getOrReturnCtx(e);return g(t,{code:l.invalid_type,expected:u.never,received:t.parsedType}),_}}he.create=e=>new he({typeName:Ke.ZodNever,...E(e)});class me extends N{_parse(e){if(this._getType(e)!==u.undefined){const t=this._getOrReturnCtx(e);return g(t,{code:l.invalid_type,expected:u.void,received:t.parsedType}),_}return P(e.data)}}me.create=e=>new me({typeName:Ke.ZodVoid,...E(e)});class fe extends N{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==u.array)return g(t,{code:l.invalid_type,expected:u.array,received:t.parsedType}),_;if(null!==r.exactLength){const e=t.data.length>r.exactLength.value,a=t.data.length<r.exactLength.value;(e||a)&&(g(t,{code:e?l.too_big:l.too_small,minimum:a?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(g(t,{code:l.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(g(t,{code:l.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map(((e,n)=>r.type._parseAsync(new A(t,e,t.path,n))))).then((e=>v.mergeArray(n,e)));const a=[...t.data].map(((e,n)=>r.type._parseSync(new A(t,e,t.path,n))));return v.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new fe({...this._def,minLength:{value:e,message:S.toString(t)}})}max(e,t){return new fe({...this._def,maxLength:{value:e,message:S.toString(t)}})}length(e,t){return new fe({...this._def,exactLength:{value:e,message:S.toString(t)}})}nonempty(e){return this.min(1,e)}}function ye(e){if(e instanceof ge){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Re.create(ye(r))}return new ge({...e._def,shape:()=>t})}return e instanceof fe?new fe({...e._def,type:ye(e.element)}):e instanceof Re?Re.create(ye(e.unwrap())):e instanceof Me?Me.create(ye(e.unwrap())):e instanceof we?we.create(e.items.map((e=>ye(e)))):e}fe.create=(e,t)=>new fe({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ke.ZodArray,...E(t)});class ge extends N{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=a.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==u.object){const t=this._getOrReturnCtx(e);return g(t,{code:l.invalid_type,expected:u.object,received:t.parsedType}),_}const{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof he&&"strip"===this._def.unknownKeys))for(const e in n.data)a.includes(e)||s.push(e);const i=[];for(const e of a){const t=r[e],a=n.data[e];i.push({key:{status:"valid",value:e},value:t._parse(new A(n,a,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof he){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of s)i.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)s.length>0&&(g(n,{code:l.unrecognized_keys,keys:s}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of s){const r=n.data[t];i.push({key:{status:"valid",value:t},value:e._parse(new A(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of i){const n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e})).then((e=>v.mergeObjectSync(t,e))):v.mergeObjectSync(t,i)}get shape(){return this._def.shape()}strict(e){return S.errToObj,new ge({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,a,s,i;const o=null!==(s=null===(a=(r=this._def).errorMap)||void 0===a?void 0:a.call(r,t,n).message)&&void 0!==s?s:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(i=S.errToObj(e).message)&&void 0!==i?i:o}:{message:o}}}:{}})}strip(){return new ge({...this._def,unknownKeys:"strip"})}passthrough(){return new ge({...this._def,unknownKeys:"passthrough"})}extend(e){return new ge({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ge({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ke.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ge({...this._def,catchall:e})}pick(e){const t={};return a.objectKeys(e).forEach((n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])})),new ge({...this._def,shape:()=>t})}omit(e){const t={};return a.objectKeys(this.shape).forEach((n=>{e[n]||(t[n]=this.shape[n])})),new ge({...this._def,shape:()=>t})}deepPartial(){return ye(this)}partial(e){const t={};return a.objectKeys(this.shape).forEach((n=>{const r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()})),new ge({...this._def,shape:()=>t})}required(e){const t={};return a.objectKeys(this.shape).forEach((n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof Re;)e=e._def.innerType;t[n]=e}})),new ge({...this._def,shape:()=>t})}keyof(){return Ze(a.objectKeys(this.shape))}}ge.create=(e,t)=>new ge({shape:()=>e,unknownKeys:"strip",catchall:he.create(),typeName:Ke.ZodObject,...E(t)}),ge.strictCreate=(e,t)=>new ge({shape:()=>e,unknownKeys:"strict",catchall:he.create(),typeName:Ke.ZodObject,...E(t)}),ge.lazycreate=(e,t)=>new ge({shape:e,unknownKeys:"strip",catchall:he.create(),typeName:Ke.ZodObject,...E(t)});class ve extends N{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map((async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;const n=e.map((e=>new p(e.ctx.common.issues)));return g(t,{code:l.invalid_union,unionErrors:n}),_}));{let e;const r=[];for(const a of n){const n={...t,common:{...t.common,issues:[]},parent:null},s=a._parseSync({data:t.data,path:t.path,parent:n});if("valid"===s.status)return s;"dirty"!==s.status||e||(e={result:s,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const a=r.map((e=>new p(e)));return g(t,{code:l.invalid_union,unionErrors:a}),_}}get options(){return this._def.options}}ve.create=(e,t)=>new ve({options:e,typeName:Ke.ZodUnion,...E(t)});const _e=e=>e instanceof Se?_e(e.schema):e instanceof Ne?_e(e.innerType()):e instanceof Ce?[e.value]:e instanceof Ae?e.options:e instanceof je?a.objectValues(e.enum):e instanceof ze?_e(e._def.innerType):e instanceof ue?[void 0]:e instanceof ce?[null]:e instanceof Re?[void 0,..._e(e.unwrap())]:e instanceof Me?[null,..._e(e.unwrap())]:e instanceof Ve||e instanceof Fe?_e(e.unwrap()):e instanceof De?_e(e._def.innerType):[];class be extends N{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return g(t,{code:l.invalid_type,expected:u.object,received:t.parsedType}),_;const n=this.discriminator,r=t.data[n],a=this.optionsMap.get(r);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(g(t,{code:l.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),_)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const r=new Map;for(const n of t){const t=_e(n.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of t){if(r.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);r.set(a,n)}}return new be({typeName:Ke.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...E(n)})}}function Pe(e,t){const n=c(e),r=c(t);if(e===t)return{valid:!0,data:e};if(n===u.object&&r===u.object){const n=a.objectKeys(t),r=a.objectKeys(e).filter((e=>-1!==n.indexOf(e))),s={...e,...t};for(const n of r){const r=Pe(e[n],t[n]);if(!r.valid)return{valid:!1};s[n]=r.data}return{valid:!0,data:s}}if(n===u.array&&r===u.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let r=0;r<e.length;r++){const a=Pe(e[r],t[r]);if(!a.valid)return{valid:!1};n.push(a.data)}return{valid:!0,data:n}}return n===u.date&&r===u.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ke extends N{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(k(e)||k(r))return _;const a=Pe(e.value,r.value);return a.valid?((w(e)||w(r))&&t.dirty(),{status:t.value,value:a.data}):(g(n,{code:l.invalid_intersection_types}),_)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then((([e,t])=>r(e,t))):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}ke.create=(e,t,n)=>new ke({left:e,right:t,typeName:Ke.ZodIntersection,...E(n)});class we extends N{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.array)return g(n,{code:l.invalid_type,expected:u.array,received:n.parsedType}),_;if(n.data.length<this._def.items.length)return g(n,{code:l.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),_;!this._def.rest&&n.data.length>this._def.items.length&&(g(n,{code:l.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...n.data].map(((e,t)=>{const r=this._def.items[t]||this._def.rest;return r?r._parse(new A(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(r).then((e=>v.mergeArray(t,e))):v.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new we({...this._def,rest:e})}}we.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new we({items:e,typeName:Ke.ZodTuple,rest:null,...E(t)})};class xe extends N{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.object)return g(n,{code:l.invalid_type,expected:u.object,received:n.parsedType}),_;const r=[],a=this._def.keyType,s=this._def.valueType;for(const e in n.data)r.push({key:a._parse(new A(n,e,n.path,e)),value:s._parse(new A(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?v.mergeObjectAsync(t,r):v.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,n){return new xe(t instanceof N?{keyType:e,valueType:t,typeName:Ke.ZodRecord,...E(n)}:{keyType:ne.create(),valueType:e,typeName:Ke.ZodRecord,...E(t)})}}class Ie extends N{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.map)return g(n,{code:l.invalid_type,expected:u.map,received:n.parsedType}),_;const r=this._def.keyType,a=this._def.valueType,s=[...n.data.entries()].map((([e,t],s)=>({key:r._parse(new A(n,e,n.path,[s,"key"])),value:a._parse(new A(n,t,n.path,[s,"value"]))})));if(n.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const n of s){const r=await n.key,a=await n.value;if("aborted"===r.status||"aborted"===a.status)return _;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const n of s){const r=n.key,a=n.value;if("aborted"===r.status||"aborted"===a.status)return _;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}}}Ie.create=(e,t,n)=>new Ie({valueType:t,keyType:e,typeName:Ke.ZodMap,...E(n)});class Te extends N{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.set)return g(n,{code:l.invalid_type,expected:u.set,received:n.parsedType}),_;const r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(g(n,{code:l.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&(g(n,{code:l.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());const a=this._def.valueType;function s(e){const n=new Set;for(const r of e){if("aborted"===r.status)return _;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}const i=[...n.data.values()].map(((e,t)=>a._parse(new A(n,e,n.path,t))));return n.common.async?Promise.all(i).then((e=>s(e))):s(i)}min(e,t){return new Te({...this._def,minSize:{value:e,message:S.toString(t)}})}max(e,t){return new Te({...this._def,maxSize:{value:e,message:S.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Te.create=(e,t)=>new Te({valueType:e,minSize:null,maxSize:null,typeName:Ke.ZodSet,...E(t)});class Oe extends N{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.function)return g(t,{code:l.invalid_type,expected:u.function,received:t.parsedType}),_;function n(e,n){return y({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,f(),h].filter((e=>!!e)),issueData:{code:l.invalid_arguments,argumentsError:n}})}function r(e,n){return y({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,f(),h].filter((e=>!!e)),issueData:{code:l.invalid_return_type,returnTypeError:n}})}const a={errorMap:t.common.contextualErrorMap},s=t.data;if(this._def.returns instanceof Ee){const e=this;return P((async function(...t){const i=new p([]),o=await e._def.args.parseAsync(t,a).catch((e=>{throw i.addIssue(n(t,e)),i})),d=await Reflect.apply(s,this,o);return await e._def.returns._def.type.parseAsync(d,a).catch((e=>{throw i.addIssue(r(d,e)),i}))}))}{const e=this;return P((function(...t){const i=e._def.args.safeParse(t,a);if(!i.success)throw new p([n(t,i.error)]);const o=Reflect.apply(s,this,i.data),d=e._def.returns.safeParse(o,a);if(!d.success)throw new p([r(o,d.error)]);return d.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Oe({...this._def,args:we.create(e).rest(pe.create())})}returns(e){return new Oe({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new Oe({args:e||we.create([]).rest(pe.create()),returns:t||pe.create(),typeName:Ke.ZodFunction,...E(n)})}}class Se extends N{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Se.create=(e,t)=>new Se({getter:e,typeName:Ke.ZodLazy,...E(t)});class Ce extends N{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return g(t,{received:t.data,code:l.invalid_literal,expected:this._def.value}),_}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Ze(e,t){return new Ae({values:e,typeName:Ke.ZodEnum,...E(t)})}Ce.create=(e,t)=>new Ce({value:e,typeName:Ke.ZodLiteral,...E(t)});class Ae extends N{constructor(){super(...arguments),C.set(this,void 0)}_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return g(t,{expected:a.joinValues(n),received:t.parsedType,code:l.invalid_type}),_}if(T(this,C,"f")||O(this,C,new Set(this._def.values),"f"),!T(this,C,"f").has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return g(t,{received:t.data,code:l.invalid_enum_value,options:n}),_}return P(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Ae.create(e,{...this._def,...t})}exclude(e,t=this._def){return Ae.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}C=new WeakMap,Ae.create=Ze;class je extends N{constructor(){super(...arguments),Z.set(this,void 0)}_parse(e){const t=a.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==u.string&&n.parsedType!==u.number){const e=a.objectValues(t);return g(n,{expected:a.joinValues(e),received:n.parsedType,code:l.invalid_type}),_}if(T(this,Z,"f")||O(this,Z,new Set(a.getValidEnumValues(this._def.values)),"f"),!T(this,Z,"f").has(e.data)){const e=a.objectValues(t);return g(n,{received:n.data,code:l.invalid_enum_value,options:e}),_}return P(e.data)}get enum(){return this._def.values}}Z=new WeakMap,je.create=(e,t)=>new je({values:e,typeName:Ke.ZodNativeEnum,...E(t)});class Ee extends N{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&!1===t.common.async)return g(t,{code:l.invalid_type,expected:u.promise,received:t.parsedType}),_;const n=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return P(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}Ee.create=(e,t)=>new Ee({type:e,typeName:Ke.ZodPromise,...E(t)});class Ne extends N{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ke.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,s={addIssue:e=>{g(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),"preprocess"===r.type){const e=r.transform(n.data,s);if(n.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return _;const r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?_:"dirty"===r.status||"dirty"===t.value?b(r.value):r}));{if("aborted"===t.value)return _;const r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?_:"dirty"===r.status||"dirty"===t.value?b(r.value):r}}if("refinement"===r.type){const e=e=>{const t=r.refinement(e,s);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?_:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((n=>"aborted"===n.status?_:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===r.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!x(e))return e;const a=r.transform(e.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((e=>x(e)?Promise.resolve(r.transform(e.value,s)).then((e=>({status:t.value,value:e}))):e))}a.assertNever(r)}}Ne.create=(e,t,n)=>new Ne({schema:e,typeName:Ke.ZodEffects,effect:t,...E(n)}),Ne.createWithPreprocess=(e,t,n)=>new Ne({schema:t,effect:{type:"preprocess",transform:e},typeName:Ke.ZodEffects,...E(n)});class Re extends N{_parse(e){return this._getType(e)===u.undefined?P(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Re.create=(e,t)=>new Re({innerType:e,typeName:Ke.ZodOptional,...E(t)});class Me extends N{_parse(e){return this._getType(e)===u.null?P(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Me.create=(e,t)=>new Me({innerType:e,typeName:Ke.ZodNullable,...E(t)});class ze extends N{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===u.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ze.create=(e,t)=>new ze({innerType:e,typeName:Ke.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...E(t)});class De extends N{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return I(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new p(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new p(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}De.create=(e,t)=>new De({innerType:e,typeName:Ke.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...E(t)});class Le extends N{_parse(e){if(this._getType(e)!==u.nan){const t=this._getOrReturnCtx(e);return g(t,{code:l.invalid_type,expected:u.nan,received:t.parsedType}),_}return{status:"valid",value:e.data}}}Le.create=e=>new Le({typeName:Ke.ZodNaN,...E(e)});const Ue=Symbol("zod_brand");class Ve extends N{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class $e extends N{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?_:"dirty"===e.status?(t.dirty(),b(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?_:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new $e({in:e,out:t,typeName:Ke.ZodPipeline})}}class Fe extends N{_parse(e){const t=this._def.innerType._parse(e),n=e=>(x(e)&&(e.value=Object.freeze(e.value)),e);return I(t)?t.then((e=>n(e))):n(t)}unwrap(){return this._def.innerType}}function Be(e,t){const n="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof n?{message:n}:n}function We(e,t={},n){return e?le.create().superRefine(((r,a)=>{var s,i;const o=e(r);if(o instanceof Promise)return o.then((e=>{var s,i;if(!e){const e=Be(t,r),o=null===(i=null!==(s=e.fatal)&&void 0!==s?s:n)||void 0===i||i;a.addIssue({code:"custom",...e,fatal:o})}}));if(!o){const e=Be(t,r),o=null===(i=null!==(s=e.fatal)&&void 0!==s?s:n)||void 0===i||i;a.addIssue({code:"custom",...e,fatal:o})}})):le.create()}Fe.create=(e,t)=>new Fe({innerType:e,typeName:Ke.ZodReadonly,...E(t)});const qe={object:ge.lazycreate};var Ke;!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(Ke||(Ke={}));const He=ne.create,Ye=ae.create,Ge=Le.create,Je=se.create,Xe=ie.create,Qe=oe.create,et=de.create,tt=ue.create,nt=ce.create,rt=le.create,at=pe.create,st=he.create,it=me.create,ot=fe.create,dt=ge.create,ut=ge.strictCreate,ct=ve.create,lt=be.create,pt=ke.create,ht=we.create,mt=xe.create,ft=Ie.create,yt=Te.create,gt=Oe.create,vt=Se.create,_t=Ce.create,bt=Ae.create,Pt=je.create,kt=Ee.create,wt=Ne.create,xt=Re.create,It=Me.create,Tt=Ne.createWithPreprocess,Ot=$e.create,St={string:e=>ne.create({...e,coerce:!0}),number:e=>ae.create({...e,coerce:!0}),boolean:e=>ie.create({...e,coerce:!0}),bigint:e=>se.create({...e,coerce:!0}),date:e=>oe.create({...e,coerce:!0})},Ct=_;var Zt=Object.freeze({__proto__:null,defaultErrorMap:h,setErrorMap:function(e){m=e},getErrorMap:f,makeIssue:y,EMPTY_PATH:[],addIssueToContext:g,ParseStatus:v,INVALID:_,DIRTY:b,OK:P,isAborted:k,isDirty:w,isValid:x,isAsync:I,get util(){return a},get objectUtil(){return s},ZodParsedType:u,getParsedType:c,ZodType:N,datetimeRegex:Q,ZodString:ne,ZodNumber:ae,ZodBigInt:se,ZodBoolean:ie,ZodDate:oe,ZodSymbol:de,ZodUndefined:ue,ZodNull:ce,ZodAny:le,ZodUnknown:pe,ZodNever:he,ZodVoid:me,ZodArray:fe,ZodObject:ge,ZodUnion:ve,ZodDiscriminatedUnion:be,ZodIntersection:ke,ZodTuple:we,ZodRecord:xe,ZodMap:Ie,ZodSet:Te,ZodFunction:Oe,ZodLazy:Se,ZodLiteral:Ce,ZodEnum:Ae,ZodNativeEnum:je,ZodPromise:Ee,ZodEffects:Ne,ZodTransformer:Ne,ZodOptional:Re,ZodNullable:Me,ZodDefault:ze,ZodCatch:De,ZodNaN:Le,BRAND:Ue,ZodBranded:Ve,ZodPipeline:$e,ZodReadonly:Fe,custom:We,Schema:N,ZodSchema:N,late:qe,get ZodFirstPartyTypeKind(){return Ke},coerce:St,any:rt,array:ot,bigint:Je,boolean:Xe,date:Qe,discriminatedUnion:lt,effect:wt,enum:bt,function:gt,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>We((t=>t instanceof e),t),intersection:pt,lazy:vt,literal:_t,map:ft,nan:Ge,nativeEnum:Pt,never:st,null:nt,nullable:It,number:Ye,object:dt,oboolean:()=>Xe().optional(),onumber:()=>Ye().optional(),optional:xt,ostring:()=>He().optional(),pipeline:Ot,preprocess:Tt,promise:kt,record:mt,set:yt,strictObject:ut,string:He,symbol:et,transformer:wt,tuple:ht,undefined:tt,union:ct,unknown:at,void:it,NEVER:Ct,ZodIssueCode:l,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:p});function At(e){return e instanceof Promise||"function"==typeof e?.then&&"function"==typeof e?.catch}function jt(e){return e.map((({message:e,path:t})=>`- ${e}`+(t.length?` at given${function(e){return e.map((e=>"number"==typeof e?`[${e}]`:`.${e}`)).join("")}(t)}`:""))).join("\n")}const Et=(e,t)=>{throw new d("Schema validation에 실패했습니다.\n"+jt(t),{errors:t})},Nt=e=>(t,n)=>{throw new d("Input schema validation에 실패했습니다.\n"+jt(n)+`\nat ${e}`,{errors:n})},Rt=e=>(t,n)=>{throw new d("Output schema validation에 실패했습니다.\n"+jt(n)+`\nat ${e}`,{errors:n})};function Mt(e,t=Et){return n=>{const r=e.safeParse(n);if(!r.success){const e=r.error.errors;if("string"==typeof t)throw new d(t,{errors:e});return t(n,e)}return r.data}}function zt(e,t=Et){return n=>{Mt(e,t)(n)}}function Dt(e,t=Zt.any(),n){try{return Mt(t,n)(JSON.parse(e))}catch(t){if(t instanceof SyntaxError){if("function"==typeof n)return n(e,[]);if("string"==typeof n)throw new o(n,{cause:t})}throw t}}const Lt={Arguments:function(...e){return(t,n,r)=>{const a=r.value,s=Zt.tuple(e);r.value=function(...e){const r=Mt(s,Nt(`${t.constructor.name}.${String(n)}`))(e);return a.apply(this,r)}}},Return:function(e){let t;return t=Array.isArray(e)?e.length>=2?Zt.union(e):e[0]:e,(e,n,r)=>{const a=r.value;r.value=function(...r){const s=a.apply(this,r),i=Mt(t,Rt(`${e.constructor.name}.${String(n)}`));return At(s)?s.then(i):i(s)}}}};function Ut(e,t,n){return function(...r){const a=null==n?t:n,s=a.name||"anonymous",i=null==n?Zt.any():t;Array.isArray(e)||(e=[e]);const o=Mt(Zt.tuple(e),Nt(s))(r),d=a.apply(this,o);return At(d)?d.then(Mt(i,Rt(s))):Mt(i,Rt(s))(d)}}},2615:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CashReceiptSchema=void 0;const r=n(8211);t.CashReceiptSchema=r.z.object({orderId:r.z.string(),amount:r.z.number(),issueDate:r.z.string(),issueNumber:r.z.string(),cardNumber:r.z.string()})},407:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PluginHttpRequestSchema=t.HttpRequestSchema=void 0;const r=n(8211),a=r.z.enum(["GET","POST","DELETE","HEAD","OPTIONS","PUT","PATCH"]);t.HttpRequestSchema=r.z.object({method:a,payload:r.z.any().nullable().optional(),headers:r.z.array(r.z.tuple([r.z.string(),r.z.string()]))}),t.PluginHttpRequestSchema=t.HttpRequestSchema.extend({url:r.z.string()})},9594:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PluginCashReceiptSchema=t.PluginCashReceiptIssuerTypeSchema=t.PluginCashReceiptIssuerType=t.PluginCashReceiptIssuanceTypeSchema=t.PluginCashReceiptIssuanceType=t.PluginCashReceipt=t.PluginCashPayment=t.VanTypeSchema=t.VanType=t.PluginPaymentCardTypeSchema=t.PluginPaymentCardType=t.PluginCardPaymentSchema=t.PluginCardPayment=t.PluginDiscount=t.PluginOrderState=t.PluginOrderItemSchema=t.PluginOrderItem=t.PluginOrderDiningOption=t.PluginOrderDtoSchema=t.PluginOrderDto=t.PluginOrderSchema=t.PluginOrder=t.PluginMessageResponse=t.PluginMessageNames=t.PluginMessage=t.FromWorkerMessage=t.FromWebviewMessage=t.PluginLanguagePack=t.PluginCatalogItemPriceType=t.PluginCatalogItemPrice=t.PluginCatalogItemOptionChoiceSchema=t.PluginCatalogItemOptionChoice=t.PluginCatalogItemOption=t.CatalogItemOptionChoiceState=t.PluginCatalogItemLabel=t.PluginCatalogItemDto=t.PluginCatalogItem=t.PluginCatalogCategory=t.PluginServerOnHttpRequest=t.PluginPrice=t.PaymentMethodResponse=t.ExternalPaymentMethodResponse=t.TossMerchant=t.PluginHttpResponse=t.PluginHttpRequestSchema=t.PluginHttpRequest=t.HttpRequestSchema=t.HttpMethod=t.CashReceiptSchema=t.CashReceipt=void 0,t.hasCallbackId=t.PopupElements=t.PopupActionResponse=t.BarcodeResponseSchema=t.BarcodeElementsSchema=t.AllPopupType=t.AllPopupResponseSchema=t.AllPopupElementsSchema=t.AlertResponseSchema=t.AlertElementsSchema=t.PluginTableSchema=t.PluginTableGroupSchema=t.PluginTableGroup=t.PluginTable=t.PluginHallSchema=t.PluginHall=t.PluginPaymentSourceType=t.PluginPaymentInstallment=t.PluginPaymentDtoSchema=t.PluginPaymentDto=t.PluginCancelledPaymentDto=t.PluginPaymentStateSchema=t.PluginPaymentState=t.PluginPaymentBaseSchema=t.PluginPaymentBase=t.PluginPaymentOf=t.PluginPayment=t.PluginExternalPayment=void 0;var r=n(2615);Object.defineProperty(t,"CashReceipt",{enumerable:!0,get:function(){return r.CashReceipt}}),Object.defineProperty(t,"CashReceiptSchema",{enumerable:!0,get:function(){return r.CashReceiptSchema}});var a=n(407);Object.defineProperty(t,"HttpMethod",{enumerable:!0,get:function(){return a.HttpMethod}}),Object.defineProperty(t,"HttpRequestSchema",{enumerable:!0,get:function(){return a.HttpRequestSchema}}),Object.defineProperty(t,"PluginHttpRequest",{enumerable:!0,get:function(){return a.PluginHttpRequest}}),Object.defineProperty(t,"PluginHttpRequestSchema",{enumerable:!0,get:function(){return a.PluginHttpRequestSchema}}),Object.defineProperty(t,"PluginHttpResponse",{enumerable:!0,get:function(){return a.PluginHttpResponse}});var s=n(4763);Object.defineProperty(t,"TossMerchant",{enumerable:!0,get:function(){return s.TossMerchant}});var i=n(8375);Object.defineProperty(t,"ExternalPaymentMethodResponse",{enumerable:!0,get:function(){return i.ExternalPaymentMethodResponse}}),Object.defineProperty(t,"PaymentMethodResponse",{enumerable:!0,get:function(){return i.PaymentMethodResponse}});var o=n(9339);Object.defineProperty(t,"PluginPrice",{enumerable:!0,get:function(){return o.PluginPrice}});var d=n(5720);Object.defineProperty(t,"PluginServerOnHttpRequest",{enumerable:!0,get:function(){return d.PluginServerOnHttpRequest}});var u=n(5686);Object.defineProperty(t,"PluginCatalogCategory",{enumerable:!0,get:function(){return u.PluginCatalogCategory}});var c=n(9197);Object.defineProperty(t,"PluginCatalogItem",{enumerable:!0,get:function(){return c.PluginCatalogItem}}),Object.defineProperty(t,"PluginCatalogItemDto",{enumerable:!0,get:function(){return c.PluginCatalogItemDto}});var l=n(195);Object.defineProperty(t,"PluginCatalogItemLabel",{enumerable:!0,get:function(){return l.PluginCatalogItemLabel}});var p=n(6572);Object.defineProperty(t,"CatalogItemOptionChoiceState",{enumerable:!0,get:function(){return p.CatalogItemOptionChoiceState}}),Object.defineProperty(t,"PluginCatalogItemOption",{enumerable:!0,get:function(){return p.PluginCatalogItemOption}}),Object.defineProperty(t,"PluginCatalogItemOptionChoice",{enumerable:!0,get:function(){return p.PluginCatalogItemOptionChoice}}),Object.defineProperty(t,"PluginCatalogItemOptionChoiceSchema",{enumerable:!0,get:function(){return p.PluginCatalogItemOptionChoiceSchema}});var h=n(8624);Object.defineProperty(t,"PluginCatalogItemPrice",{enumerable:!0,get:function(){return h.PluginCatalogItemPrice}}),Object.defineProperty(t,"PluginCatalogItemPriceType",{enumerable:!0,get:function(){return h.PluginCatalogItemPriceType}});var m=n(9895);Object.defineProperty(t,"PluginLanguagePack",{enumerable:!0,get:function(){return m.PluginLanguagePack}});var f=n(7446);Object.defineProperty(t,"FromWebviewMessage",{enumerable:!0,get:function(){return f.FromWebviewMessage}}),Object.defineProperty(t,"FromWorkerMessage",{enumerable:!0,get:function(){return f.FromWorkerMessage}}),Object.defineProperty(t,"PluginMessage",{enumerable:!0,get:function(){return f.PluginMessage}}),Object.defineProperty(t,"PluginMessageNames",{enumerable:!0,get:function(){return f.PluginMessageNames}}),Object.defineProperty(t,"PluginMessageResponse",{enumerable:!0,get:function(){return f.PluginMessageResponse}});var y=n(4486);Object.defineProperty(t,"PluginOrder",{enumerable:!0,get:function(){return y.PluginOrder}}),Object.defineProperty(t,"PluginOrderSchema",{enumerable:!0,get:function(){return y.PluginOrderSchema}});var g=n(513);Object.defineProperty(t,"PluginOrderDto",{enumerable:!0,get:function(){return g.PluginOrderDto}}),Object.defineProperty(t,"PluginOrderDtoSchema",{enumerable:!0,get:function(){return g.PluginOrderDtoSchema}});var v=n(8569);Object.defineProperty(t,"PluginOrderDiningOption",{enumerable:!0,get:function(){return v.PluginOrderDiningOption}}),Object.defineProperty(t,"PluginOrderItem",{enumerable:!0,get:function(){return v.PluginOrderItem}}),Object.defineProperty(t,"PluginOrderItemSchema",{enumerable:!0,get:function(){return v.PluginOrderItemSchema}});var _=n(801);Object.defineProperty(t,"PluginOrderState",{enumerable:!0,get:function(){return _.PluginOrderState}});var b=n(3603);Object.defineProperty(t,"PluginDiscount",{enumerable:!0,get:function(){return b.PluginDiscount}});var P=n(5324);Object.defineProperty(t,"PluginCardPayment",{enumerable:!0,get:function(){return P.PluginCardPayment}}),Object.defineProperty(t,"PluginCardPaymentSchema",{enumerable:!0,get:function(){return P.PluginCardPaymentSchema}}),Object.defineProperty(t,"PluginPaymentCardType",{enumerable:!0,get:function(){return P.PluginPaymentCardType}}),Object.defineProperty(t,"PluginPaymentCardTypeSchema",{enumerable:!0,get:function(){return P.PluginPaymentCardTypeSchema}}),Object.defineProperty(t,"VanType",{enumerable:!0,get:function(){return P.VanType}}),Object.defineProperty(t,"VanTypeSchema",{enumerable:!0,get:function(){return P.VanTypeSchema}});var k=n(8523);Object.defineProperty(t,"PluginCashPayment",{enumerable:!0,get:function(){return k.PluginCashPayment}});var w=n(9553);Object.defineProperty(t,"PluginCashReceipt",{enumerable:!0,get:function(){return w.PluginCashReceipt}}),Object.defineProperty(t,"PluginCashReceiptIssuanceType",{enumerable:!0,get:function(){return w.PluginCashReceiptIssuanceType}}),Object.defineProperty(t,"PluginCashReceiptIssuanceTypeSchema",{enumerable:!0,get:function(){return w.PluginCashReceiptIssuanceTypeSchema}}),Object.defineProperty(t,"PluginCashReceiptIssuerType",{enumerable:!0,get:function(){return w.PluginCashReceiptIssuerType}}),Object.defineProperty(t,"PluginCashReceiptIssuerTypeSchema",{enumerable:!0,get:function(){return w.PluginCashReceiptIssuerTypeSchema}}),Object.defineProperty(t,"PluginCashReceiptSchema",{enumerable:!0,get:function(){return w.PluginCashReceiptSchema}});var x=n(3627);Object.defineProperty(t,"PluginExternalPayment",{enumerable:!0,get:function(){return x.PluginExternalPayment}});var I=n(810);Object.defineProperty(t,"PluginPayment",{enumerable:!0,get:function(){return I.PluginPayment}}),Object.defineProperty(t,"PluginPaymentOf",{enumerable:!0,get:function(){return I.PluginPaymentOf}});var T=n(7415);Object.defineProperty(t,"PluginPaymentBase",{enumerable:!0,get:function(){return T.PluginPaymentBase}}),Object.defineProperty(t,"PluginPaymentBaseSchema",{enumerable:!0,get:function(){return T.PluginPaymentBaseSchema}}),Object.defineProperty(t,"PluginPaymentState",{enumerable:!0,get:function(){return T.PluginPaymentState}}),Object.defineProperty(t,"PluginPaymentStateSchema",{enumerable:!0,get:function(){return T.PluginPaymentStateSchema}});var O=n(2501);Object.defineProperty(t,"PluginCancelledPaymentDto",{enumerable:!0,get:function(){return O.PluginCancelledPaymentDto}}),Object.defineProperty(t,"PluginPaymentDto",{enumerable:!0,get:function(){return O.PluginPaymentDto}}),Object.defineProperty(t,"PluginPaymentDtoSchema",{enumerable:!0,get:function(){return O.PluginPaymentDtoSchema}});var S=n(9835);Object.defineProperty(t,"PluginPaymentInstallment",{enumerable:!0,get:function(){return S.PluginPaymentInstallment}});var C=n(7919);Object.defineProperty(t,"PluginPaymentSourceType",{enumerable:!0,get:function(){return C.PluginPaymentSourceType}});var Z=n(2979);Object.defineProperty(t,"PluginHall",{enumerable:!0,get:function(){return Z.PluginHall}}),Object.defineProperty(t,"PluginHallSchema",{enumerable:!0,get:function(){return Z.PluginHallSchema}});var A=n(958);Object.defineProperty(t,"PluginTable",{enumerable:!0,get:function(){return A.PluginTable}}),Object.defineProperty(t,"PluginTableGroup",{enumerable:!0,get:function(){return A.PluginTableGroup}}),Object.defineProperty(t,"PluginTableGroupSchema",{enumerable:!0,get:function(){return A.PluginTableGroupSchema}}),Object.defineProperty(t,"PluginTableSchema",{enumerable:!0,get:function(){return A.PluginTableSchema}});var j=n(8759);Object.defineProperty(t,"AlertElementsSchema",{enumerable:!0,get:function(){return j.AlertElementsSchema}}),Object.defineProperty(t,"AlertResponseSchema",{enumerable:!0,get:function(){return j.AlertResponseSchema}}),Object.defineProperty(t,"AllPopupElementsSchema",{enumerable:!0,get:function(){return j.AllPopupElementsSchema}}),Object.defineProperty(t,"AllPopupResponseSchema",{enumerable:!0,get:function(){return j.AllPopupResponseSchema}}),Object.defineProperty(t,"AllPopupType",{enumerable:!0,get:function(){return j.AllPopupType}}),Object.defineProperty(t,"BarcodeElementsSchema",{enumerable:!0,get:function(){return j.BarcodeElementsSchema}}),Object.defineProperty(t,"BarcodeResponseSchema",{enumerable:!0,get:function(){return j.BarcodeResponseSchema}}),Object.defineProperty(t,"PopupActionResponse",{enumerable:!0,get:function(){return j.PopupActionResponse}}),Object.defineProperty(t,"PopupElements",{enumerable:!0,get:function(){return j.PopupElements}});var E=n(5478);Object.defineProperty(t,"hasCallbackId",{enumerable:!0,get:function(){return E.hasCallbackId}})},4763:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},8375:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},9339:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},5720:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},5686:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PluginCatalogCategorySchema=void 0;const r=n(8211),a=n(5871);t.PluginCatalogCategorySchema=r.z.object({id:r.z.number(),title:r.z.string(),titleI18n:r.z.lazy((()=>a.PluginLanguagePackSchema)).nullable().optional()})},9197:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},195:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},6572:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PluginCatalogItemOptionChoiceSchema=void 0;const r=n(8211),a=n(5871);t.PluginCatalogItemOptionChoiceSchema=r.z.object({id:r.z.number(),title:r.z.string(),titleI18n:r.z.lazy((()=>a.PluginLanguagePackSchema)).nullable().optional(),priceValue:r.z.number(),imageUrl:r.z.string().nullable().optional(),state:r.z.enum(["ON_SALE","SOLD_OUT"])})},8624:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},3747:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},9895:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PluginLanguagePackSchema=void 0;const r=n(8211);t.PluginLanguagePackSchema=r.z.object({languages:r.z.record(r.z.string(),r.z.string())})},5871:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),a(n(9895),t),a(n(3747),t)},7446:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},4486:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PluginOrderSchema=t.PluginOrderRequestInfoSchema=t.PluginOrderPaymentPriceSchema=t.PluginOrderChargePriceSchema=void 0;const r=n(3603),a=n(8569),s=n(958),i=n(810),o=n(8211);t.PluginOrderChargePriceSchema=o.z.object({chargeDiscountValue:o.z.number(),chargeListPriceValue:o.z.number(),chargePriceValue:o.z.number(),chargeSupplyValue:o.z.number(),chargeTaxValue:o.z.number(),chargeTipValue:o.z.number()}),t.PluginOrderPaymentPriceSchema=o.z.object({paymentUnpaidValue:o.z.number(),paymentPaidValue:o.z.number()}),t.PluginOrderRequestInfoSchema=o.z.object({requestAt:o.z.string(),expiredAt:o.z.string(),expectedReadyAt:o.z.string(),estimatedReadyAt:o.z.string().nullable().optional(),acceptedAt:o.z.string().nullable().optional(),declinedAt:o.z.string().nullable().optional(),declinedReason:o.z.string().nullable().optional()}),t.PluginOrderSchema=o.z.object({id:o.z.string(),tableId:o.z.number().nullable().optional(),table:o.z.lazy((()=>s.PluginTableSchema)).nullable().optional(),orderKey:o.z.string(),state:o.z.enum(["OPENED","PAID","CANCELLED","COMPLETED","REFUNDED"]),lineItems:o.z.array(o.z.lazy((()=>a.PluginOrderItemSchema))),discounts:o.z.array(o.z.lazy((()=>r.PluginDiscountSchema))).nullable().optional(),payments:o.z.array(o.z.lazy((()=>i.PluginPaymentSchema))),chargePrice:o.z.lazy((()=>t.PluginOrderChargePriceSchema)),paymentPrice:o.z.lazy((()=>t.PluginOrderPaymentPriceSchema)),requestedInfo:o.z.lazy((()=>t.PluginOrderRequestInfoSchema)).nullable().optional(),source:o.z.string(),memo:o.z.string().nullable().optional(),openedAt:o.z.string().nullable().optional(),createdAt:o.z.string(),updatedAt:o.z.string().nullable().optional(),cancelledAt:o.z.string().nullable().optional(),completedAt:o.z.string().nullable().optional()})},513:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PluginOrderDtoSchema=void 0;const r=n(8211),a=n(8569),s=n(3603);t.PluginOrderDtoSchema=r.z.object({memo:r.z.string().nullable().optional(),discounts:r.z.array(s.PluginDiscountSchema),tableId:r.z.number().nullable().optional(),lineItems:r.z.array(a.PluginOrderItemSchema.omit({id:!0,orderId:!0}))})},8569:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PluginOrderItemSchema=void 0;const r=n(8211),a=n(3603),s=n(6572),i=n(5686);t.PluginOrderItemSchema=r.z.object({id:r.z.string(),orderId:r.z.string(),diningOption:r.z.enum(["HERE","TOGO","DELIVERY","PICKUP"]),item:r.z.object({id:r.z.number(),title:r.z.string(),category:r.z.lazy((()=>i.PluginCatalogCategorySchema))}),quantity:r.z.object({value:r.z.number()}),chargePrice:r.z.object({value:r.z.number()}),optionChoices:r.z.array(r.z.lazy((()=>s.PluginCatalogItemOptionChoiceSchema))),discounts:r.z.array(r.z.lazy((()=>a.PluginDiscountSchema))).nullable().optional(),memo:r.z.string().nullable().optional()})},801:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},3603:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PluginDiscountSchema=void 0;const r=n(8211),a=n(5871);t.PluginDiscountSchema=r.z.object({amountMoney:r.z.object({value:r.z.number()}),title:r.z.string(),titleI18n:r.z.lazy((()=>a.PluginLanguagePackSchema)).nullable().optional()})},5324:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PluginCardDetailsSchema=t.PluginCardPaymentSchema=t.PluginPaymentCardTypeSchema=t.VanTypeSchema=void 0;const r=n(8211),a=n(7415);t.VanTypeSchema=r.z.enum(["NICE","KIS","SMARTRO","KOVAN"]),t.PluginPaymentCardTypeSchema=r.z.enum(["CREDIT","DEBIT","PREPAID","FOREIGN"]),t.PluginCardPaymentSchema=a.PluginPaymentBaseSchema.extend({sourceType:r.z.literal("CARD"),cardDetails:r.z.lazy((()=>t.PluginCardDetailsSchema))}),t.PluginCardDetailsSchema=r.z.object({installmentMonth:r.z.string().max(2),cardType:t.PluginPaymentCardTypeSchema,cardBrand:r.z.string(),cardBrandId:r.z.string().nullable().optional(),cardNo:r.z.string().refine((e=>e.length>=12),{message:"카드번호는 최소 12자리여야합니다"}),source:r.z.string().nullable().optional(),sourceId:r.z.string().nullable().optional(),balance:r.z.number().nullable().optional(),van:t.VanTypeSchema.nullable().optional()})},8523:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PluginCashPaymentSchema=void 0;const r=n(8211),a=n(7415);t.PluginCashPaymentSchema=a.PluginPaymentBaseSchema.extend({sourceType:r.z.literal("CASH")})},9553:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PluginCashReceiptSchema=t.PluginCashReceiptIssuanceTypeSchema=t.PluginCashReceiptIssuerTypeSchema=void 0;const r=n(8211);t.PluginCashReceiptIssuerTypeSchema=r.z.enum(["CONSUMER","BUSINESSES"]),t.PluginCashReceiptIssuanceTypeSchema=r.z.enum(["PHONE","BUSINESS_NUMBER","CARD"]),t.PluginCashReceiptSchema=r.z.object({identityNumber:r.z.string(),issuerType:t.PluginCashReceiptIssuerTypeSchema,issuanceType:t.PluginCashReceiptIssuanceTypeSchema,selfIssuance:r.z.boolean()})},3627:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PluginExternalPaymentSchema=void 0;const r=n(8211),a=n(7415);t.PluginExternalPaymentSchema=a.PluginPaymentBaseSchema.extend({sourceType:r.z.literal("EXTERNAL"),externalDetails:r.z.object({source:r.z.string().nullable().optional(),sourceId:r.z.string().nullable().optional()})})},810:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PluginPaymentSchema=void 0;const r=n(8211),a=n(5324),s=n(8523),i=n(3627);t.PluginPaymentSchema=r.z.object({paymentKey:r.z.string()}).and(r.z.discriminatedUnion("sourceType",[a.PluginCardPaymentSchema,s.PluginCashPaymentSchema,i.PluginExternalPaymentSchema]))},7415:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PluginPaymentBaseSchema=t.PluginPaymentStateSchema=void 0;const r=n(8211);t.PluginPaymentStateSchema=r.z.enum(["APPROVED","COMPLETED","CANCELLED"]),t.PluginPaymentBaseSchema=r.z.object({id:r.z.string(),orderId:r.z.string(),state:t.PluginPaymentStateSchema,sourceType:r.z.custom(),amountMoney:r.z.number(),taxMoney:r.z.number(),supplyMoney:r.z.number(),tipMoney:r.z.number(),taxExemptMoney:r.z.number().nullable().optional(),approvedNo:r.z.string(),approvedAt:r.z.string(),cancelledAt:r.z.string().nullable().optional(),cashReceipt:r.z.custom().nullable().optional()})},2501:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PluginPaymentDtoSchema=void 0;const r=n(8211),a=n(9553),s=n(5324),i=r.z.object({orderId:r.z.string(),sourceType:r.z.custom(),amountMoney:r.z.number(),taxMoney:r.z.number(),approvedNo:r.z.string(),approvedAt:r.z.string(),paymentKey:r.z.string(),supplyMoney:r.z.number(),tipMoney:r.z.number(),taxExemptMoney:r.z.number().nullable().optional()}),o=i.extend({sourceType:r.z.literal("CARD"),cardDetails:r.z.lazy((()=>s.PluginCardDetailsSchema))}),d=i.extend({sourceType:r.z.literal("CASH"),cashReceipt:a.PluginCashReceiptSchema.nullable().optional()}),u=i.extend({sourceType:r.z.literal("EXTERNAL")});t.PluginPaymentDtoSchema=r.z.discriminatedUnion("sourceType",[o,d,u])},9835:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},7919:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},2979:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PluginHallSchema=void 0;const r=n(8211);t.PluginHallSchema=r.z.object({id:r.z.number(),title:r.z.string(),order:r.z.number()})},958:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PluginTableSchema=t.PluginTableGroupSchema=void 0;const r=n(8211);t.PluginTableGroupSchema=r.z.object({id:r.z.number(),color:r.z.string(),merchantId:r.z.number(),tableIds:r.z.array(r.z.number())}),t.PluginTableSchema=r.z.object({id:r.z.number(),hallId:r.z.number(),title:r.z.string(),group:t.PluginTableGroupSchema.nullable().optional()})},8759:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AllPopupResponseSchema=t.AllPopupElementsSchema=t.BarcodeResponseSchema=t.AlertResponseSchema=t.BarcodeElementsSchema=t.AlertElementsSchema=void 0;const r=n(8211);t.AlertElementsSchema=r.z.object({type:r.z.literal("alert"),title:r.z.string(),description:r.z.string(),image:r.z.string(),cta:r.z.string()}),t.BarcodeElementsSchema=r.z.object({type:r.z.literal("barcode"),productName:r.z.string()}),t.AlertResponseSchema=r.z.object({type:r.z.literal("alert")}),t.BarcodeResponseSchema=r.z.discriminatedUnion("complete",[r.z.object({type:r.z.literal("barcode"),complete:r.z.literal(!0),data:r.z.discriminatedUnion("result",[r.z.object({barcode:r.z.string(),result:r.z.literal("SUCCESS")}),r.z.object({result:r.z.literal("CANCELLED")})])}),r.z.object({type:r.z.literal("barcode"),complete:r.z.literal(!1),errorMessage:r.z.string()})]),t.AllPopupElementsSchema=r.z.discriminatedUnion("type",[t.AlertElementsSchema,t.BarcodeElementsSchema]),t.AllPopupResponseSchema=r.z.union([t.AlertResponseSchema,t.BarcodeResponseSchema])},5478:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.hasCallbackId=void 0,t.hasCallbackId=function(e){return"callbackId"in e}},1837:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.notRequireResultHandler=void 0,t.notRequireResultHandler=(n=new Map,{set:(e,t)=>{n.set(e,t)},get:e=>n.get(e)})},9574:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.requireResultHandler=void 0;const r=n(9594);var a;t.requireResultHandler=(a=new Map,{has:e=>(0,r.hasCallbackId)(e)&&a.has(e.callbackId),set:(e,t)=>{(0,r.hasCallbackId)(e)&&a.set(e.callbackId,t)},get:e=>{if((0,r.hasCallbackId)(e))return a.get(e.callbackId)},del:e=>{(0,r.hasCallbackId)(e)&&a.delete(e.callbackId)}})},1369:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.webview=void 0;const r=n(9594),a=n(452),s=n(9574),i=n(1837);self.onmessage=({data:e})=>{if(!a.is.nullOrUndefined(e)&&!a.is.nullOrUndefined(e.name))if(console.log("======= webview >> worker ======="),console.log(e),self.postMessage({name:"log",data:{log:JSON.stringify({type:"fromWebview",data:e})}}),s.requireResultHandler.has(e)){const t=s.requireResultHandler.get(e);if(a.is.falsy(t))throw new Error(`${e.name}의 callback id를 찾지 못 했어요. 이미 실행되었을 가능성이 있습니다`);t(e)}else{const t=i.notRequireResultHandler.get(e.name);if(a.is.falsy(t))return;t(e)}},self.onerror=(e,t,n,r,s)=>{a.is.truthy(s)&&console.error("error on message",s),console.log("error event",{event:e,source:t,lineno:n,colno:r})},t.webview={send:function(e){if(console.log("======= worker >> webview ======="),console.log(e),self.postMessage({name:"log",data:{log:JSON.stringify({type:"fromWorker",message:e})}}),(0,r.hasCallbackId)(e))return new Promise((t=>{s.requireResultHandler.set(e,(e=>{t(e),s.requireResultHandler.del(e)})),self.postMessage(e)}));self.postMessage(e)},addHandler:function(e,t){i.notRequireResultHandler.set(e,t)}}},8137:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.webview=void 0;var r=n(1369);Object.defineProperty(t,"webview",{enumerable:!0,get:function(){return r.webview}})},8924:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createCallbackId=void 0,t.createCallbackId=function(e=10){let t="";for(let n=0;n<e;n++)t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(62*Math.random()));return t}},7147:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function i(e){try{d(r.next(e))}catch(e){s(e)}}function o(e){try{d(r.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,o)}d((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.cashReceipt=void 0;const a=n(8924),s=n(8137),i=n(9594),o=n(6788),d=n(2726);t.cashReceipt={add:function(e){return r(this,void 0,void 0,(function*(){(0,d.validate)(i.CashReceiptSchema)(e);const t=yield s.webview.send({name:"cash-receipt.issue.request",callbackId:(0,a.createCallbackId)(),data:e});if(!t.data.complete)throw new o.PosPluginSdkError(t.data.errorMessage)}))}}},6485:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function i(e){try{d(r.next(e))}catch(e){s(e)}}function o(e){try{d(r.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,o)}d((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.catalog=void 0;const a=n(8924),s=n(8137),i=n(6788),o=new Map;t.catalog={getCatalogs:function(){return r(this,void 0,void 0,(function*(){const e=yield s.webview.send({name:"catalog.list.request",callbackId:(0,a.createCallbackId)(),data:{}});if(!e.data.complete)throw new i.PosPluginSdkError(e.data.errorMessage);return e.data.catalogs}))},on:function(e,t){return r(this,void 0,void 0,(function*(){o.set(e,t),s.webview.addHandler("catalog.change.event",(({data:e})=>{const t=o.get(e.event);t&&t(e.catalog)}))}))}}},7687:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function i(e){try{d(r.next(e))}catch(e){s(e)}}function o(e){try{d(r.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,o)}d((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.category=void 0;const a=n(8924),s=n(8137),i=n(6788);t.category={getCategories:function(){return r(this,void 0,void 0,(function*(){const e=yield s.webview.send({name:"category.list.request",callbackId:(0,a.createCallbackId)(),data:{}});if(!e.data.complete)throw new i.PosPluginSdkError(e.data.errorMessage);return e.data.categories}))}}},6788:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PosPluginSdkError=void 0;class n extends Error{constructor(e){super(e)}static isPosPluginSdkError(e){return e instanceof n}}t.PosPluginSdkError=n},4347:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function i(e){try{d(r.next(e))}catch(e){s(e)}}function o(e){try{d(r.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,o)}d((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.http=void 0;const a=n(8137),s=n(9594),i=n(8924),o=n(2726);function d(e){return t=>r(this,void 0,void 0,(function*(){return(0,o.validate)(s.PluginHttpRequestSchema)(Object.assign(Object.assign({},t),{method:e})),(yield a.webview.send({name:"http.client.request",callbackId:(0,i.createCallbackId)(),data:{url:t.url,method:e,payload:t.payload,headers:t.headers}})).data}))}t.http={get:(e,t)=>d("GET")({url:e,payload:void 0,headers:t||[]}),post:(e,t,n)=>d("POST")({url:e,payload:t,headers:n||[]}),delete:(e,t)=>d("DELETE")({url:e,payload:void 0,headers:t||[]}),head:(e,t)=>d("HEAD")({url:e,payload:void 0,headers:t||[]}),options:(e,t)=>d("OPTIONS")({url:e,payload:void 0,headers:t||[]}),put:(e,t,n)=>d("PUT")({url:e,payload:t,headers:n||[]}),patch:(e,t,n)=>d("PATCH")({url:e,payload:t,headers:n||[]})}},4591:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function i(e){try{d(r.next(e))}catch(e){s(e)}}function o(e){try{d(r.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,o)}d((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.merchant=t.getMerchant=void 0;const a=n(8137),s=n(8924),i=n(6788);function o(){var e;return r(this,void 0,void 0,(function*(){const{data:t}=yield a.webview.send({name:"merchant.info.request",callbackId:(0,s.createCallbackId)(),data:{}});if(!t.complete)throw new i.PosPluginSdkError(null!==(e=t.errorMessage)&&void 0!==e?e:"Unknown error");return t.merchant}))}t.getMerchant=o,t.merchant={getMerchant:o}},2765:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function i(e){try{d(r.next(e))}catch(e){s(e)}}function o(e){try{d(r.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,o)}d((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.option=void 0;const a=n(8924),s=n(8137),i=n(6788),o=new Map;t.option={getOptions:function(){return r(this,void 0,void 0,(function*(){const e=yield s.webview.send({name:"option.list.request",callbackId:(0,a.createCallbackId)(),data:{}});if(!e.data.complete)throw new i.PosPluginSdkError(e.data.errorMessage);return e.data.options}))},on:function(e,t){return r(this,void 0,void 0,(function*(){o.set(e,t),s.webview.addHandler("option.change.event",(({data:e})=>{const t=o.get(e.event);t&&t(e.option)}))}))}}},6605:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function i(e){try{d(r.next(e))}catch(e){s(e)}}function o(e){try{d(r.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,o)}d((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.order=void 0;const a=n(8924),s=n(9594),i=n(8137),o=n(6788),d=n(2726),u=new Map;t.order={getOrder:function(e){return r(this,void 0,void 0,(function*(){const t=yield i.webview.send({name:"order.get.request",callbackId:(0,a.createCallbackId)(),data:{id:e}});if(!t.data.complete)throw new o.PosPluginSdkError(t.data.errorMessage);return t.data.order}))},on:function(e,t){return r(this,void 0,void 0,(function*(){u.set(e,t),i.webview.addHandler("order.change.event",(({data:e})=>{const t=u.get(e.event);t&&t(e.order)}))}))},add:function(e){return r(this,void 0,void 0,(function*(){(0,d.validate)(s.PluginOrderDtoSchema)(e);const t=yield i.webview.send({name:"order.add.request",callbackId:(0,a.createCallbackId)(),data:{order:e}});if(!t.data.complete)throw new o.PosPluginSdkError(t.data.errorMessage);return t.data.order}))},cancel:function(e){return r(this,void 0,void 0,(function*(){const t=yield i.webview.send({name:"order.cancel.request",callbackId:(0,a.createCallbackId)(),data:{id:e}});if(!t.data.complete)throw new o.PosPluginSdkError(t.data.errorMessage)}))},addMenu:function(e,t){return r(this,void 0,void 0,(function*(){(0,d.validate)(s.PluginOrderDtoSchema)(t);const n=yield i.webview.send({name:"order.add-menu.request",callbackId:(0,a.createCallbackId)(),data:{id:e,order:t}});if(!n.data.complete)throw new o.PosPluginSdkError(n.data.errorMessage);return n.data.order}))},complete:function(e){return r(this,void 0,void 0,(function*(){const t=yield i.webview.send({name:"order.complete.request",callbackId:(0,a.createCallbackId)(),data:{id:e}});if(!t.data.complete)throw new o.PosPluginSdkError(t.data.errorMessage);return t.data.order}))}}},2799:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function i(e){try{d(r.next(e))}catch(e){s(e)}}function o(e){try{d(r.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,o)}d((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.paymentMethod=void 0;const a=n(8137),s=new Map,i=new Map;t.paymentMethod={add:function({data:e,payCallback:t,cancelCallback:n}){s.set(e.id,t),i.set(e.id,n),a.webview.addHandler("payment.method.event.request",(t=>r(this,void 0,void 0,(function*(){const n="pay"===t.data.event?s.get(t.data.id):i.get(t.data.id);if(n)try{if("pay"===t.data.event){const e=yield n(t.data.order,t.data.price);a.webview.send({name:"payment.method.event.response",callbackId:t.callbackId,data:{event:t.data.event,id:t.data.id,complete:!0,paymentDto:e?{approvedNo:e.approvedNo,approvedAt:e.approvedAt,paymentKey:e.paymentKey,sourceType:"EXTERNAL"}:void 0}})}else if("cancel"===t.data.event){const e=yield n(t.data.order,t.data.payment);a.webview.send({name:"payment.method.event.response",callbackId:t.callbackId,data:{event:t.data.event,id:t.data.id,complete:!0,cancelledPaymentDto:e}})}}catch(e){a.webview.send({name:"payment.method.event.response",callbackId:t.callbackId,data:{event:t.data.event,id:t.data.id,complete:!1,errorMessage:e.message}})}else a.webview.send({name:"payment.method.event.response",callbackId:t.callbackId,data:{event:t.data.event,id:t.data.id,complete:!1,errorMessage:`${e.paymentName}로 ${"pay"===t.data.event?"결제":"결제취소"} 할 수 없습니다.`}})})))),a.webview.send({name:"payment.method.add",data:e})}}},8925:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function i(e){try{d(r.next(e))}catch(e){s(e)}}function o(e){try{d(r.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,o)}d((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.payment=void 0;const a=n(8137),s=n(9594),i=n(8924),o=n(6788),d=n(2726),u=new Map;t.payment={on:function(e,t){return r(this,void 0,void 0,(function*(){u.set(e,t),a.webview.addHandler("payment.change.event",(({data:e})=>{const t=u.get(e.event);t&&t(e.payment)}))}))},add:function(e,t){return r(this,void 0,void 0,(function*(){(0,d.validate)(s.PluginPaymentDtoSchema)(t);const n=yield a.webview.send({name:"payment.add.request",callbackId:(0,i.createCallbackId)(),data:{order:e,paymentDto:t}});if(!n.data.complete)throw new o.PosPluginSdkError(n.data.errorMessage);return n.data.payment}))},cancel:function(e,t){return r(this,void 0,void 0,(function*(){const n=yield a.webview.send({name:"payment.cancel.request",callbackId:(0,i.createCallbackId)(),data:{order:e,payment:t}});if(!n.data.complete)throw new o.PosPluginSdkError(n.data.errorMessage)}))}}},7567:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.pos=void 0;const r=n(7147),a=n(853),s=n(4513),i=n(7687),o=n(6485),d=n(2765),u=n(6605),c=n(4347),l=n(8925),p=n(3061),h=n(4591),m=n(5179),f=n(2799),y=n(9397);t.pos={storage:a.storage,table:s.table,category:i.category,catalog:o.catalog,option:d.option,cashReceipt:r.cashReceipt,order:u.order,payment:l.payment,http:c.http,toast:p.toast,merchant:h.merchant,ui:m.ui,paymentMethod:f.paymentMethod,websocket:y.websocket}},853:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function i(e){try{d(r.next(e))}catch(e){s(e)}}function o(e){try{d(r.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,o)}d((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.storage=void 0;const a=n(8924),s=n(8137),i=n(6788);t.storage={get:function(e){var t;return r(this,void 0,void 0,(function*(){const{data:n}=yield s.webview.send({name:"storage.get.request",callbackId:(0,a.createCallbackId)(),data:{key:e}});if(!n.complete)throw new i.PosPluginSdkError(null!==(t=n.errorMessage)&&void 0!==t?t:"Unknown error");return n.value}))},set:function(e,t){var n;return r(this,void 0,void 0,(function*(){const{data:r}=yield s.webview.send({name:"storage.set.request",callbackId:(0,a.createCallbackId)(),data:{key:e,value:t}});if(!r.complete)throw new i.PosPluginSdkError(null!==(n=r.errorMessage)&&void 0!==n?n:"Unknown error")}))},del:function(e){var t;return r(this,void 0,void 0,(function*(){const{data:n}=yield s.webview.send({name:"storage.delete.request",callbackId:(0,a.createCallbackId)(),data:{key:e}});if(!n.complete)throw new i.PosPluginSdkError(null!==(t=n.errorMessage)&&void 0!==t?t:"Unknown error")}))}}},4513:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function i(e){try{d(r.next(e))}catch(e){s(e)}}function o(e){try{d(r.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,o)}d((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.table=void 0;const a=n(8924),s=n(8137),i=n(9594),o=n(6788),d=n(2726),u=new Map;t.table={getTables:function(){return r(this,void 0,void 0,(function*(){const e=yield s.webview.send({name:"table.list.request",callbackId:(0,a.createCallbackId)(),data:{}});if(!e.data.complete)throw new o.PosPluginSdkError(e.data.errorMessage);return e.data.tables}))},on:function(e,t){u.set(e,t),s.webview.addHandler("table.change.event",(({data:e})=>{const t=u.get(e.event);t&&("order-update"===e.event||"add"===e.event||"clear"===e.event?t(e.table):"swap"!==e.event&&"move"!==e.event&&"merge"!==e.event||t(e.from,e.to))}))},clearTable:function({table:e,order:t}){return r(this,void 0,void 0,(function*(){(0,d.validate)(i.PluginTableSchema)(e),(0,d.validate)(i.PluginOrderSchema)(t);const n=yield s.webview.send({name:"table.clear.request",callbackId:(0,a.createCallbackId)(),data:{table:e,order:t}});if(!n.data.complete)throw new o.PosPluginSdkError(n.data.errorMessage)}))}}},3061:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toast=void 0;const r=n(8137),a=n(8924);t.toast={open:function(e){r.webview.send({name:"toast.open",callbackId:(0,a.createCallbackId)(),data:{message:e}})}}},3086:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function i(e){try{d(r.next(e))}catch(e){s(e)}}function o(e){try{d(r.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,o)}d((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.openPopup=void 0;const a=n(8924),s=n(9594),i=n(8137),o=n(2726);t.openPopup=function(e){return r(this,void 0,void 0,(function*(){return(0,o.validate)(s.AllPopupElementsSchema)(e),(yield i.webview.send({name:"popup.request",callbackId:(0,a.createCallbackId)(),data:e})).data}))}},5179:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ui=void 0;const r=n(3086);t.ui={openPopup:r.openPopup}},9397:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function i(e){try{d(r.next(e))}catch(e){s(e)}}function o(e){try{d(r.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,o)}d((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.websocket=t.Websocket=void 0;const a=n(8137),s=n(8924),i=new Map;class o{constructor(e,t,n){this.url=e,this.headers=t,this.options=n,this.onMessageCallback=void 0,this.onErrorCallback=void 0,this.onCloseCallback=void 0,this.onOpenCallback=void 0}connect(){return r(this,void 0,void 0,(function*(){const e=yield a.webview.send({name:"websocket.connect.request",callbackId:(0,s.createCallbackId)(),data:Object.assign({url:this.url,headers:this.headers},this.options)});if(!e.data.complete)throw new Error(e.data.errorMessage)}))}disconnect(){return r(this,void 0,void 0,(function*(){yield a.webview.send({name:"websocket.disconnect.request",callbackId:(0,s.createCallbackId)(),data:{url:this.url}})}))}send(e){a.webview.send({name:"websocket.send",data:{url:this.url,data:e.data,option:e.option}})}onMessage(e){this.onMessageCallback=e}onError(e){this.onErrorCallback=e}onClose(e){this.onCloseCallback=e}onOpen(e){this.onOpenCallback=e}}t.Websocket=o,t.websocket={create:function(e,t,n){return r(this,void 0,void 0,(function*(){0===i.size&&a.webview.addHandler("websocket.event",(e=>{const t=i.get(e.data.url);t&&("open"===e.data.event&&t.onOpenCallback&&t.onOpenCallback(),"close"===e.data.event&&t.onCloseCallback&&t.onCloseCallback(e.data.code),"message"===e.data.event&&t.onMessageCallback&&t.onMessageCallback(e.data.data),"error"===e.data.event&&t.onErrorCallback&&t.onErrorCallback(e.data.errorName,e.data.errorMessage))}));const r=new o(e,t,n);return yield r.connect(),i.set(e,r),r}))}}},7498:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ZodError=t.quotelessJson=t.ZodIssueCode=void 0;const r=n(1721);t.ZodIssueCode=r.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),t.quotelessJson=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class a extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(const a of e.issues)if("invalid_union"===a.code)a.unionErrors.map(r);else if("invalid_return_type"===a.code)r(a.returnTypeError);else if("invalid_arguments"===a.code)r(a.argumentsError);else if(0===a.path.length)n._errors.push(t(a));else{let e=n,r=0;for(;r<a.path.length;){const n=a.path[r];r===a.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(a))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(e){if(!(e instanceof a))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,r.util.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},n=[];for(const r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}t.ZodError=a,a.create=e=>new a(e)},8652:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorMap=t.setErrorMap=t.defaultErrorMap=void 0;const a=r(n(548));t.defaultErrorMap=a.default;let s=a.default;t.setErrorMap=function(e){s=e},t.getErrorMap=function(){return s}},5772:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),a(n(8652),t),a(n(9082),t),a(n(5209),t),a(n(1721),t),a(n(1554),t),a(n(7498),t)},4439:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.errorUtil=void 0,function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(n||(t.errorUtil=n={}))},9082:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isAsync=t.isValid=t.isDirty=t.isAborted=t.OK=t.DIRTY=t.INVALID=t.ParseStatus=t.addIssueToContext=t.EMPTY_PATH=t.makeIssue=void 0;const a=n(8652),s=r(n(548));t.makeIssue=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,s=[...n,...a.path||[]],i={...a,path:s};if(void 0!==a.message)return{...a,path:s,message:a.message};let o="";const d=r.filter((e=>!!e)).slice().reverse();for(const e of d)o=e(i,{data:t,defaultError:o}).message;return{...a,path:s,message:o}},t.EMPTY_PATH=[],t.addIssueToContext=function(e,n){const r=(0,a.getErrorMap)(),i=(0,t.makeIssue)({issueData:n,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===s.default?void 0:s.default].filter((e=>!!e))});e.common.issues.push(i)};class i{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const a of n){if("aborted"===a.status)return t.INVALID;"dirty"===a.status&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const n=[];for(const e of t){const t=await e.key,r=await e.value;n.push({key:t,value:r})}return i.mergeObjectSync(e,n)}static mergeObjectSync(e,n){const r={};for(const a of n){const{key:n,value:s}=a;if("aborted"===n.status)return t.INVALID;if("aborted"===s.status)return t.INVALID;"dirty"===n.status&&e.dirty(),"dirty"===s.status&&e.dirty(),"__proto__"===n.value||void 0===s.value&&!a.alwaysSet||(r[n.value]=s.value)}return{status:e.value,value:r}}}t.ParseStatus=i,t.INVALID=Object.freeze({status:"aborted"}),t.DIRTY=e=>({status:"dirty",value:e}),t.OK=e=>({status:"valid",value:e}),t.isAborted=e=>"aborted"===e.status,t.isDirty=e=>"dirty"===e.status,t.isValid=e=>"valid"===e.status,t.isAsync=e=>"undefined"!=typeof Promise&&e instanceof Promise},5209:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},1721:(e,t)=>{var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.getParsedType=t.ZodParsedType=t.objectUtil=t.util=void 0,function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},e.getValidEnumValues=t=>{const n=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),r={};for(const e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(const n of e)if(t(n))return n},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(n||(t.util=n={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(r||(t.objectUtil=r={})),t.ZodParsedType=n.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),t.getParsedType=e=>{switch(typeof e){case"undefined":return t.ZodParsedType.undefined;case"string":return t.ZodParsedType.string;case"number":return isNaN(e)?t.ZodParsedType.nan:t.ZodParsedType.number;case"boolean":return t.ZodParsedType.boolean;case"function":return t.ZodParsedType.function;case"bigint":return t.ZodParsedType.bigint;case"symbol":return t.ZodParsedType.symbol;case"object":return Array.isArray(e)?t.ZodParsedType.array:null===e?t.ZodParsedType.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?t.ZodParsedType.promise:"undefined"!=typeof Map&&e instanceof Map?t.ZodParsedType.map:"undefined"!=typeof Set&&e instanceof Set?t.ZodParsedType.set:"undefined"!=typeof Date&&e instanceof Date?t.ZodParsedType.date:t.ZodParsedType.object;default:return t.ZodParsedType.unknown}}},8211:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t},i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.z=void 0;const o=s(n(5772));t.z=o,i(n(5772),t),t.default=o},548:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=n(1721),a=n(7498);t.default=(e,t)=>{let n;switch(e.code){case a.ZodIssueCode.invalid_type:n=e.received===r.ZodParsedType.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case a.ZodIssueCode.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,r.util.jsonStringifyReplacer)}`;break;case a.ZodIssueCode.unrecognized_keys:n=`Unrecognized key(s) in object: ${r.util.joinValues(e.keys,", ")}`;break;case a.ZodIssueCode.invalid_union:n="Invalid input";break;case a.ZodIssueCode.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${r.util.joinValues(e.options)}`;break;case a.ZodIssueCode.invalid_enum_value:n=`Invalid enum value. Expected ${r.util.joinValues(e.options)}, received '${e.received}'`;break;case a.ZodIssueCode.invalid_arguments:n="Invalid function arguments";break;case a.ZodIssueCode.invalid_return_type:n="Invalid function return type";break;case a.ZodIssueCode.invalid_date:n="Invalid date";break;case a.ZodIssueCode.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:r.util.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case a.ZodIssueCode.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case a.ZodIssueCode.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case a.ZodIssueCode.custom:n="Invalid input";break;case a.ZodIssueCode.invalid_intersection_types:n="Intersection results could not be merged";break;case a.ZodIssueCode.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case a.ZodIssueCode.not_finite:n="Number must be finite";break;default:n=t.defaultError,r.util.assertNever(e)}return{message:n}}},1554:function(e,t,n){var r,a,s=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},i=this&&this.__classPrivateFieldSet||function(e,t,n,r,a){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?a.call(e,n):a?a.value=n:t.set(e,n),n};Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=t.bigint=t.array=t.any=t.coerce=t.ZodFirstPartyTypeKind=t.late=t.ZodSchema=t.Schema=t.custom=t.ZodReadonly=t.ZodPipeline=t.ZodBranded=t.BRAND=t.ZodNaN=t.ZodCatch=t.ZodDefault=t.ZodNullable=t.ZodOptional=t.ZodTransformer=t.ZodEffects=t.ZodPromise=t.ZodNativeEnum=t.ZodEnum=t.ZodLiteral=t.ZodLazy=t.ZodFunction=t.ZodSet=t.ZodMap=t.ZodRecord=t.ZodTuple=t.ZodIntersection=t.ZodDiscriminatedUnion=t.ZodUnion=t.ZodObject=t.ZodArray=t.ZodVoid=t.ZodNever=t.ZodUnknown=t.ZodAny=t.ZodNull=t.ZodUndefined=t.ZodSymbol=t.ZodDate=t.ZodBoolean=t.ZodBigInt=t.ZodNumber=t.ZodString=t.datetimeRegex=t.ZodType=void 0,t.NEVER=t.void=t.unknown=t.union=t.undefined=t.tuple=t.transformer=t.symbol=t.string=t.strictObject=t.set=t.record=t.promise=t.preprocess=t.pipeline=t.ostring=t.optional=t.onumber=t.oboolean=t.object=t.number=t.nullable=t.null=t.never=t.nativeEnum=t.nan=t.map=t.literal=t.lazy=t.intersection=t.instanceof=t.function=t.enum=t.effect=t.discriminatedUnion=t.date=void 0;const o=n(8652),d=n(4439),u=n(9082),c=n(1721),l=n(7498);class p{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const h=(e,t)=>{if((0,u.isValid)(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new l.ZodError(e.common.issues);return this._error=t,this._error}}};function m(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:a}:{errorMap:(t,a)=>{var s,i;const{message:o}=e;return"invalid_enum_value"===t.code?{message:null!=o?o:a.defaultError}:void 0===a.data?{message:null!==(s=null!=o?o:r)&&void 0!==s?s:a.defaultError}:"invalid_type"!==t.code?{message:a.defaultError}:{message:null!==(i=null!=o?o:n)&&void 0!==i?i:a.defaultError}},description:a}}class f{get description(){return this._def.description}_getType(e){return(0,c.getParsedType)(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,c.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new u.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,c.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if((0,u.isAsync)(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,c.getParsedType)(e)},a=this._parseSync({data:e,path:r.path,parent:r});return h(r,a)}"~validate"(e){var t,n;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,c.getParsedType)(e)};if(!this["~standard"].async)try{const t=this._parseSync({data:e,path:[],parent:r});return(0,u.isValid)(t)?{value:t.value}:{issues:r.common.issues}}catch(e){(null===(n=null===(t=null==e?void 0:e.message)||void 0===t?void 0:t.toLowerCase())||void 0===n?void 0:n.includes("encountered"))&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then((e=>(0,u.isValid)(e)?{value:e.value}:{issues:r.common.issues}))}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,c.getParsedType)(e)},r=this._parse({data:e,path:n.path,parent:n}),a=await((0,u.isAsync)(r)?r:Promise.resolve(r));return h(n,a)}refine(e,t){const n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,r)=>{const a=e(t),s=()=>r.addIssue({code:l.ZodIssueCode.custom,...n(t)});return"undefined"!=typeof Promise&&a instanceof Promise?a.then((e=>!!e||(s(),!1))):!!a||(s(),!1)}))}refinement(e,t){return this._refinement(((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1)))}_refinement(e){return new fe({schema:this,typeName:Te.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return ye.create(this,this._def)}nullable(){return ge.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return G.create(this)}promise(){return me.create(this,this._def)}or(e){return Q.create([this,e],this._def)}and(e){return re.create(this,e,this._def)}transform(e){return new fe({...m(this._def),schema:this,typeName:Te.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new ve({...m(this._def),innerType:this,defaultValue:t,typeName:Te.ZodDefault})}brand(){return new Pe({typeName:Te.ZodBranded,type:this,...m(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new _e({...m(this._def),innerType:this,catchValue:t,typeName:Te.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return ke.create(this,e)}readonly(){return we.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}t.ZodType=f,t.Schema=f,t.ZodSchema=f;const y=/^c[^\s-]{8,}$/i,g=/^[0-9a-z]+$/,v=/^[0-9A-HJKMNP-TV-Z]{26}$/i,_=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,b=/^[a-z0-9_-]{21}$/i,P=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,k=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,w=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let x;const I=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,T=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,O=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,S=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,C=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Z=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,A="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",j=new RegExp(`^${A}$`);function E(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function N(e){let t=`${A}T${E(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function R(e,t){if(!P.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(r));return!("object"!=typeof a||null===a||!a.typ||!a.alg||t&&a.alg!==t)}catch(e){return!1}}function M(e,t){return!("v4"!==t&&t||!T.test(e))||!("v6"!==t&&t||!S.test(e))}t.datetimeRegex=N;class z extends f{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==c.ZodParsedType.string){const t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.string,received:t.parsedType}),u.INVALID}const t=new u.ParseStatus;let n;for(const s of this._def.checks)if("min"===s.kind)e.data.length<s.value&&(n=this._getOrReturnCtx(e,n),(0,u.addIssueToContext)(n,{code:l.ZodIssueCode.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if("max"===s.kind)e.data.length>s.value&&(n=this._getOrReturnCtx(e,n),(0,u.addIssueToContext)(n,{code:l.ZodIssueCode.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if("length"===s.kind){const r=e.data.length>s.value,a=e.data.length<s.value;(r||a)&&(n=this._getOrReturnCtx(e,n),r?(0,u.addIssueToContext)(n,{code:l.ZodIssueCode.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&(0,u.addIssueToContext)(n,{code:l.ZodIssueCode.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),t.dirty())}else if("email"===s.kind)w.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,u.addIssueToContext)(n,{validation:"email",code:l.ZodIssueCode.invalid_string,message:s.message}),t.dirty());else if("emoji"===s.kind)x||(x=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),x.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,u.addIssueToContext)(n,{validation:"emoji",code:l.ZodIssueCode.invalid_string,message:s.message}),t.dirty());else if("uuid"===s.kind)_.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,u.addIssueToContext)(n,{validation:"uuid",code:l.ZodIssueCode.invalid_string,message:s.message}),t.dirty());else if("nanoid"===s.kind)b.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,u.addIssueToContext)(n,{validation:"nanoid",code:l.ZodIssueCode.invalid_string,message:s.message}),t.dirty());else if("cuid"===s.kind)y.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,u.addIssueToContext)(n,{validation:"cuid",code:l.ZodIssueCode.invalid_string,message:s.message}),t.dirty());else if("cuid2"===s.kind)g.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,u.addIssueToContext)(n,{validation:"cuid2",code:l.ZodIssueCode.invalid_string,message:s.message}),t.dirty());else if("ulid"===s.kind)v.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,u.addIssueToContext)(n,{validation:"ulid",code:l.ZodIssueCode.invalid_string,message:s.message}),t.dirty());else if("url"===s.kind)try{new URL(e.data)}catch(r){n=this._getOrReturnCtx(e,n),(0,u.addIssueToContext)(n,{validation:"url",code:l.ZodIssueCode.invalid_string,message:s.message}),t.dirty()}else"regex"===s.kind?(s.regex.lastIndex=0,s.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,u.addIssueToContext)(n,{validation:"regex",code:l.ZodIssueCode.invalid_string,message:s.message}),t.dirty())):"trim"===s.kind?e.data=e.data.trim():"includes"===s.kind?e.data.includes(s.value,s.position)||(n=this._getOrReturnCtx(e,n),(0,u.addIssueToContext)(n,{code:l.ZodIssueCode.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),t.dirty()):"toLowerCase"===s.kind?e.data=e.data.toLowerCase():"toUpperCase"===s.kind?e.data=e.data.toUpperCase():"startsWith"===s.kind?e.data.startsWith(s.value)||(n=this._getOrReturnCtx(e,n),(0,u.addIssueToContext)(n,{code:l.ZodIssueCode.invalid_string,validation:{startsWith:s.value},message:s.message}),t.dirty()):"endsWith"===s.kind?e.data.endsWith(s.value)||(n=this._getOrReturnCtx(e,n),(0,u.addIssueToContext)(n,{code:l.ZodIssueCode.invalid_string,validation:{endsWith:s.value},message:s.message}),t.dirty()):"datetime"===s.kind?N(s).test(e.data)||(n=this._getOrReturnCtx(e,n),(0,u.addIssueToContext)(n,{code:l.ZodIssueCode.invalid_string,validation:"datetime",message:s.message}),t.dirty()):"date"===s.kind?j.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,u.addIssueToContext)(n,{code:l.ZodIssueCode.invalid_string,validation:"date",message:s.message}),t.dirty()):"time"===s.kind?new RegExp(`^${E(s)}$`).test(e.data)||(n=this._getOrReturnCtx(e,n),(0,u.addIssueToContext)(n,{code:l.ZodIssueCode.invalid_string,validation:"time",message:s.message}),t.dirty()):"duration"===s.kind?k.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,u.addIssueToContext)(n,{validation:"duration",code:l.ZodIssueCode.invalid_string,message:s.message}),t.dirty()):"ip"===s.kind?(r=e.data,("v4"!==(a=s.version)&&a||!I.test(r))&&("v6"!==a&&a||!O.test(r))&&(n=this._getOrReturnCtx(e,n),(0,u.addIssueToContext)(n,{validation:"ip",code:l.ZodIssueCode.invalid_string,message:s.message}),t.dirty())):"jwt"===s.kind?R(e.data,s.alg)||(n=this._getOrReturnCtx(e,n),(0,u.addIssueToContext)(n,{validation:"jwt",code:l.ZodIssueCode.invalid_string,message:s.message}),t.dirty()):"cidr"===s.kind?M(e.data,s.version)||(n=this._getOrReturnCtx(e,n),(0,u.addIssueToContext)(n,{validation:"cidr",code:l.ZodIssueCode.invalid_string,message:s.message}),t.dirty()):"base64"===s.kind?C.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,u.addIssueToContext)(n,{validation:"base64",code:l.ZodIssueCode.invalid_string,message:s.message}),t.dirty()):"base64url"===s.kind?Z.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,u.addIssueToContext)(n,{validation:"base64url",code:l.ZodIssueCode.invalid_string,message:s.message}),t.dirty()):c.util.assertNever(s);var r,a;return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement((t=>e.test(t)),{validation:t,code:l.ZodIssueCode.invalid_string,...d.errorUtil.errToObj(n)})}_addCheck(e){return new z({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...d.errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:"url",...d.errorUtil.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...d.errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...d.errorUtil.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...d.errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...d.errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...d.errorUtil.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...d.errorUtil.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...d.errorUtil.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...d.errorUtil.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...d.errorUtil.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...d.errorUtil.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...d.errorUtil.errToObj(e)})}datetime(e){var t,n;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(n=null==e?void 0:e.local)&&void 0!==n&&n,...d.errorUtil.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...d.errorUtil.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...d.errorUtil.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...d.errorUtil.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...d.errorUtil.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...d.errorUtil.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...d.errorUtil.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...d.errorUtil.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...d.errorUtil.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...d.errorUtil.errToObj(t)})}nonempty(e){return this.min(1,d.errorUtil.errToObj(e))}trim(){return new z({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new z({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new z({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isCIDR(){return!!this._def.checks.find((e=>"cidr"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get isBase64url(){return!!this._def.checks.find((e=>"base64url"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function D(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r;return parseInt(e.toFixed(a).replace(".",""))%parseInt(t.toFixed(a).replace(".",""))/Math.pow(10,a)}t.ZodString=z,z.create=e=>{var t;return new z({checks:[],typeName:Te.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...m(e)})};class L extends f{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==c.ZodParsedType.number){const t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.number,received:t.parsedType}),u.INVALID}let t;const n=new u.ParseStatus;for(const r of this._def.checks)"int"===r.kind?c.util.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty()):"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"multipleOf"===r.kind?0!==D(e.data,r.value)&&(t=this._getOrReturnCtx(e,t),(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.not_finite,message:r.message}),n.dirty()):c.util.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,d.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,d.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,d.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,d.errorUtil.toString(t))}setLimit(e,t,n,r){return new L({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:d.errorUtil.toString(r)}]})}_addCheck(e){return new L({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:d.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:d.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:d.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:d.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:d.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:d.errorUtil.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:d.errorUtil.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:d.errorUtil.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:d.errorUtil.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&c.util.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}t.ZodNumber=L,L.create=e=>new L({checks:[],typeName:Te.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...m(e)});class U extends f{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch(t){return this._getInvalidInput(e)}if(this._getType(e)!==c.ZodParsedType.bigint)return this._getInvalidInput(e);let t;const n=new u.ParseStatus;for(const r of this._def.checks)"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):c.util.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.bigint,received:t.parsedType}),u.INVALID}gte(e,t){return this.setLimit("min",e,!0,d.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,d.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,d.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,d.errorUtil.toString(t))}setLimit(e,t,n,r){return new U({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:d.errorUtil.toString(r)}]})}_addCheck(e){return new U({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:d.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:d.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:d.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:d.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:d.errorUtil.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}t.ZodBigInt=U,U.create=e=>{var t;return new U({checks:[],typeName:Te.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...m(e)})};class V extends f{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==c.ZodParsedType.boolean){const t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.boolean,received:t.parsedType}),u.INVALID}return(0,u.OK)(e.data)}}t.ZodBoolean=V,V.create=e=>new V({typeName:Te.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...m(e)});class $ extends f{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==c.ZodParsedType.date){const t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.date,received:t.parsedType}),u.INVALID}if(isNaN(e.data.getTime())){const t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.invalid_date}),u.INVALID}const t=new u.ParseStatus;let n;for(const r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),(0,u.addIssueToContext)(n,{code:l.ZodIssueCode.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),t.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),(0,u.addIssueToContext)(n,{code:l.ZodIssueCode.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),t.dirty()):c.util.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new $({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:d.errorUtil.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:d.errorUtil.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}t.ZodDate=$,$.create=e=>new $({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:Te.ZodDate,...m(e)});class F extends f{_parse(e){if(this._getType(e)!==c.ZodParsedType.symbol){const t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.symbol,received:t.parsedType}),u.INVALID}return(0,u.OK)(e.data)}}t.ZodSymbol=F,F.create=e=>new F({typeName:Te.ZodSymbol,...m(e)});class B extends f{_parse(e){if(this._getType(e)!==c.ZodParsedType.undefined){const t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.undefined,received:t.parsedType}),u.INVALID}return(0,u.OK)(e.data)}}t.ZodUndefined=B,B.create=e=>new B({typeName:Te.ZodUndefined,...m(e)});class W extends f{_parse(e){if(this._getType(e)!==c.ZodParsedType.null){const t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.null,received:t.parsedType}),u.INVALID}return(0,u.OK)(e.data)}}t.ZodNull=W,W.create=e=>new W({typeName:Te.ZodNull,...m(e)});class q extends f{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,u.OK)(e.data)}}t.ZodAny=q,q.create=e=>new q({typeName:Te.ZodAny,...m(e)});class K extends f{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,u.OK)(e.data)}}t.ZodUnknown=K,K.create=e=>new K({typeName:Te.ZodUnknown,...m(e)});class H extends f{_parse(e){const t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.never,received:t.parsedType}),u.INVALID}}t.ZodNever=H,H.create=e=>new H({typeName:Te.ZodNever,...m(e)});class Y extends f{_parse(e){if(this._getType(e)!==c.ZodParsedType.undefined){const t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.void,received:t.parsedType}),u.INVALID}return(0,u.OK)(e.data)}}t.ZodVoid=Y,Y.create=e=>new Y({typeName:Te.ZodVoid,...m(e)});class G extends f{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==c.ZodParsedType.array)return(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.array,received:t.parsedType}),u.INVALID;if(null!==r.exactLength){const e=t.data.length>r.exactLength.value,a=t.data.length<r.exactLength.value;(e||a)&&((0,u.addIssueToContext)(t,{code:e?l.ZodIssueCode.too_big:l.ZodIssueCode.too_small,minimum:a?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&((0,u.addIssueToContext)(t,{code:l.ZodIssueCode.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&((0,u.addIssueToContext)(t,{code:l.ZodIssueCode.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map(((e,n)=>r.type._parseAsync(new p(t,e,t.path,n))))).then((e=>u.ParseStatus.mergeArray(n,e)));const a=[...t.data].map(((e,n)=>r.type._parseSync(new p(t,e,t.path,n))));return u.ParseStatus.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new G({...this._def,minLength:{value:e,message:d.errorUtil.toString(t)}})}max(e,t){return new G({...this._def,maxLength:{value:e,message:d.errorUtil.toString(t)}})}length(e,t){return new G({...this._def,exactLength:{value:e,message:d.errorUtil.toString(t)}})}nonempty(e){return this.min(1,e)}}function J(e){if(e instanceof X){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=ye.create(J(r))}return new X({...e._def,shape:()=>t})}return e instanceof G?new G({...e._def,type:J(e.element)}):e instanceof ye?ye.create(J(e.unwrap())):e instanceof ge?ge.create(J(e.unwrap())):e instanceof ae?ae.create(e.items.map((e=>J(e)))):e}t.ZodArray=G,G.create=(e,t)=>new G({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Te.ZodArray,...m(t)});class X extends f{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=c.util.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==c.ZodParsedType.object){const t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.object,received:t.parsedType}),u.INVALID}const{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof H&&"strip"===this._def.unknownKeys))for(const e in n.data)a.includes(e)||s.push(e);const i=[];for(const e of a){const t=r[e],a=n.data[e];i.push({key:{status:"valid",value:e},value:t._parse(new p(n,a,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof H){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of s)i.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)s.length>0&&((0,u.addIssueToContext)(n,{code:l.ZodIssueCode.unrecognized_keys,keys:s}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of s){const r=n.data[t];i.push({key:{status:"valid",value:t},value:e._parse(new p(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of i){const n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e})).then((e=>u.ParseStatus.mergeObjectSync(t,e))):u.ParseStatus.mergeObjectSync(t,i)}get shape(){return this._def.shape()}strict(e){return d.errorUtil.errToObj,new X({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,a,s,i;const o=null!==(s=null===(a=(r=this._def).errorMap)||void 0===a?void 0:a.call(r,t,n).message)&&void 0!==s?s:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(i=d.errorUtil.errToObj(e).message)&&void 0!==i?i:o}:{message:o}}}:{}})}strip(){return new X({...this._def,unknownKeys:"strip"})}passthrough(){return new X({...this._def,unknownKeys:"passthrough"})}extend(e){return new X({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new X({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Te.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new X({...this._def,catchall:e})}pick(e){const t={};return c.util.objectKeys(e).forEach((n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])})),new X({...this._def,shape:()=>t})}omit(e){const t={};return c.util.objectKeys(this.shape).forEach((n=>{e[n]||(t[n]=this.shape[n])})),new X({...this._def,shape:()=>t})}deepPartial(){return J(this)}partial(e){const t={};return c.util.objectKeys(this.shape).forEach((n=>{const r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()})),new X({...this._def,shape:()=>t})}required(e){const t={};return c.util.objectKeys(this.shape).forEach((n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof ye;)e=e._def.innerType;t[n]=e}})),new X({...this._def,shape:()=>t})}keyof(){return le(c.util.objectKeys(this.shape))}}t.ZodObject=X,X.create=(e,t)=>new X({shape:()=>e,unknownKeys:"strip",catchall:H.create(),typeName:Te.ZodObject,...m(t)}),X.strictCreate=(e,t)=>new X({shape:()=>e,unknownKeys:"strict",catchall:H.create(),typeName:Te.ZodObject,...m(t)}),X.lazycreate=(e,t)=>new X({shape:e,unknownKeys:"strip",catchall:H.create(),typeName:Te.ZodObject,...m(t)});class Q extends f{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map((async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;const n=e.map((e=>new l.ZodError(e.ctx.common.issues)));return(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.invalid_union,unionErrors:n}),u.INVALID}));{let e;const r=[];for(const a of n){const n={...t,common:{...t.common,issues:[]},parent:null},s=a._parseSync({data:t.data,path:t.path,parent:n});if("valid"===s.status)return s;"dirty"!==s.status||e||(e={result:s,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const a=r.map((e=>new l.ZodError(e)));return(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.invalid_union,unionErrors:a}),u.INVALID}}get options(){return this._def.options}}t.ZodUnion=Q,Q.create=(e,t)=>new Q({options:e,typeName:Te.ZodUnion,...m(t)});const ee=e=>e instanceof ue?ee(e.schema):e instanceof fe?ee(e.innerType()):e instanceof ce?[e.value]:e instanceof pe?e.options:e instanceof he?c.util.objectValues(e.enum):e instanceof ve?ee(e._def.innerType):e instanceof B?[void 0]:e instanceof W?[null]:e instanceof ye?[void 0,...ee(e.unwrap())]:e instanceof ge?[null,...ee(e.unwrap())]:e instanceof Pe||e instanceof we?ee(e.unwrap()):e instanceof _e?ee(e._def.innerType):[];class te extends f{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==c.ZodParsedType.object)return(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.object,received:t.parsedType}),u.INVALID;const n=this.discriminator,r=t.data[n],a=this.optionsMap.get(r);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):((0,u.addIssueToContext)(t,{code:l.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),u.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const r=new Map;for(const n of t){const t=ee(n.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of t){if(r.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);r.set(a,n)}}return new te({typeName:Te.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...m(n)})}}function ne(e,t){const n=(0,c.getParsedType)(e),r=(0,c.getParsedType)(t);if(e===t)return{valid:!0,data:e};if(n===c.ZodParsedType.object&&r===c.ZodParsedType.object){const n=c.util.objectKeys(t),r=c.util.objectKeys(e).filter((e=>-1!==n.indexOf(e))),a={...e,...t};for(const n of r){const r=ne(e[n],t[n]);if(!r.valid)return{valid:!1};a[n]=r.data}return{valid:!0,data:a}}if(n===c.ZodParsedType.array&&r===c.ZodParsedType.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let r=0;r<e.length;r++){const a=ne(e[r],t[r]);if(!a.valid)return{valid:!1};n.push(a.data)}return{valid:!0,data:n}}return n===c.ZodParsedType.date&&r===c.ZodParsedType.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}t.ZodDiscriminatedUnion=te;class re extends f{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if((0,u.isAborted)(e)||(0,u.isAborted)(r))return u.INVALID;const a=ne(e.value,r.value);return a.valid?(((0,u.isDirty)(e)||(0,u.isDirty)(r))&&t.dirty(),{status:t.value,value:a.data}):((0,u.addIssueToContext)(n,{code:l.ZodIssueCode.invalid_intersection_types}),u.INVALID)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then((([e,t])=>r(e,t))):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}t.ZodIntersection=re,re.create=(e,t,n)=>new re({left:e,right:t,typeName:Te.ZodIntersection,...m(n)});class ae extends f{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==c.ZodParsedType.array)return(0,u.addIssueToContext)(n,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.array,received:n.parsedType}),u.INVALID;if(n.data.length<this._def.items.length)return(0,u.addIssueToContext)(n,{code:l.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),u.INVALID;!this._def.rest&&n.data.length>this._def.items.length&&((0,u.addIssueToContext)(n,{code:l.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...n.data].map(((e,t)=>{const r=this._def.items[t]||this._def.rest;return r?r._parse(new p(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(r).then((e=>u.ParseStatus.mergeArray(t,e))):u.ParseStatus.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new ae({...this._def,rest:e})}}t.ZodTuple=ae,ae.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ae({items:e,typeName:Te.ZodTuple,rest:null,...m(t)})};class se extends f{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==c.ZodParsedType.object)return(0,u.addIssueToContext)(n,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.object,received:n.parsedType}),u.INVALID;const r=[],a=this._def.keyType,s=this._def.valueType;for(const e in n.data)r.push({key:a._parse(new p(n,e,n.path,e)),value:s._parse(new p(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?u.ParseStatus.mergeObjectAsync(t,r):u.ParseStatus.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,n){return new se(t instanceof f?{keyType:e,valueType:t,typeName:Te.ZodRecord,...m(n)}:{keyType:z.create(),valueType:e,typeName:Te.ZodRecord,...m(t)})}}t.ZodRecord=se;class ie extends f{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==c.ZodParsedType.map)return(0,u.addIssueToContext)(n,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.map,received:n.parsedType}),u.INVALID;const r=this._def.keyType,a=this._def.valueType,s=[...n.data.entries()].map((([e,t],s)=>({key:r._parse(new p(n,e,n.path,[s,"key"])),value:a._parse(new p(n,t,n.path,[s,"value"]))})));if(n.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const n of s){const r=await n.key,a=await n.value;if("aborted"===r.status||"aborted"===a.status)return u.INVALID;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const n of s){const r=n.key,a=n.value;if("aborted"===r.status||"aborted"===a.status)return u.INVALID;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}}}t.ZodMap=ie,ie.create=(e,t,n)=>new ie({valueType:t,keyType:e,typeName:Te.ZodMap,...m(n)});class oe extends f{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==c.ZodParsedType.set)return(0,u.addIssueToContext)(n,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.set,received:n.parsedType}),u.INVALID;const r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&((0,u.addIssueToContext)(n,{code:l.ZodIssueCode.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&((0,u.addIssueToContext)(n,{code:l.ZodIssueCode.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());const a=this._def.valueType;function s(e){const n=new Set;for(const r of e){if("aborted"===r.status)return u.INVALID;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}const i=[...n.data.values()].map(((e,t)=>a._parse(new p(n,e,n.path,t))));return n.common.async?Promise.all(i).then((e=>s(e))):s(i)}min(e,t){return new oe({...this._def,minSize:{value:e,message:d.errorUtil.toString(t)}})}max(e,t){return new oe({...this._def,maxSize:{value:e,message:d.errorUtil.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}t.ZodSet=oe,oe.create=(e,t)=>new oe({valueType:e,minSize:null,maxSize:null,typeName:Te.ZodSet,...m(t)});class de extends f{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==c.ZodParsedType.function)return(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.function,received:t.parsedType}),u.INVALID;function n(e,n){return(0,u.makeIssue)({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,o.getErrorMap)(),o.defaultErrorMap].filter((e=>!!e)),issueData:{code:l.ZodIssueCode.invalid_arguments,argumentsError:n}})}function r(e,n){return(0,u.makeIssue)({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,o.getErrorMap)(),o.defaultErrorMap].filter((e=>!!e)),issueData:{code:l.ZodIssueCode.invalid_return_type,returnTypeError:n}})}const a={errorMap:t.common.contextualErrorMap},s=t.data;if(this._def.returns instanceof me){const e=this;return(0,u.OK)((async function(...t){const i=new l.ZodError([]),o=await e._def.args.parseAsync(t,a).catch((e=>{throw i.addIssue(n(t,e)),i})),d=await Reflect.apply(s,this,o);return await e._def.returns._def.type.parseAsync(d,a).catch((e=>{throw i.addIssue(r(d,e)),i}))}))}{const e=this;return(0,u.OK)((function(...t){const i=e._def.args.safeParse(t,a);if(!i.success)throw new l.ZodError([n(t,i.error)]);const o=Reflect.apply(s,this,i.data),d=e._def.returns.safeParse(o,a);if(!d.success)throw new l.ZodError([r(o,d.error)]);return d.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new de({...this._def,args:ae.create(e).rest(K.create())})}returns(e){return new de({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new de({args:e||ae.create([]).rest(K.create()),returns:t||K.create(),typeName:Te.ZodFunction,...m(n)})}}t.ZodFunction=de;class ue extends f{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}t.ZodLazy=ue,ue.create=(e,t)=>new ue({getter:e,typeName:Te.ZodLazy,...m(t)});class ce extends f{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{received:t.data,code:l.ZodIssueCode.invalid_literal,expected:this._def.value}),u.INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}}function le(e,t){return new pe({values:e,typeName:Te.ZodEnum,...m(t)})}t.ZodLiteral=ce,ce.create=(e,t)=>new ce({value:e,typeName:Te.ZodLiteral,...m(t)});class pe extends f{constructor(){super(...arguments),r.set(this,void 0)}_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return(0,u.addIssueToContext)(t,{expected:c.util.joinValues(n),received:t.parsedType,code:l.ZodIssueCode.invalid_type}),u.INVALID}if(s(this,r,"f")||i(this,r,new Set(this._def.values),"f"),!s(this,r,"f").has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return(0,u.addIssueToContext)(t,{received:t.data,code:l.ZodIssueCode.invalid_enum_value,options:n}),u.INVALID}return(0,u.OK)(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return pe.create(e,{...this._def,...t})}exclude(e,t=this._def){return pe.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}t.ZodEnum=pe,r=new WeakMap,pe.create=le;class he extends f{constructor(){super(...arguments),a.set(this,void 0)}_parse(e){const t=c.util.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==c.ZodParsedType.string&&n.parsedType!==c.ZodParsedType.number){const e=c.util.objectValues(t);return(0,u.addIssueToContext)(n,{expected:c.util.joinValues(e),received:n.parsedType,code:l.ZodIssueCode.invalid_type}),u.INVALID}if(s(this,a,"f")||i(this,a,new Set(c.util.getValidEnumValues(this._def.values)),"f"),!s(this,a,"f").has(e.data)){const e=c.util.objectValues(t);return(0,u.addIssueToContext)(n,{received:n.data,code:l.ZodIssueCode.invalid_enum_value,options:e}),u.INVALID}return(0,u.OK)(e.data)}get enum(){return this._def.values}}t.ZodNativeEnum=he,a=new WeakMap,he.create=(e,t)=>new he({values:e,typeName:Te.ZodNativeEnum,...m(t)});class me extends f{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==c.ZodParsedType.promise&&!1===t.common.async)return(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.promise,received:t.parsedType}),u.INVALID;const n=t.parsedType===c.ZodParsedType.promise?t.data:Promise.resolve(t.data);return(0,u.OK)(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}t.ZodPromise=me,me.create=(e,t)=>new me({type:e,typeName:Te.ZodPromise,...m(t)});class fe extends f{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Te.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,a={addIssue:e=>{(0,u.addIssueToContext)(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),"preprocess"===r.type){const e=r.transform(n.data,a);if(n.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return u.INVALID;const r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?u.INVALID:"dirty"===r.status||"dirty"===t.value?(0,u.DIRTY)(r.value):r}));{if("aborted"===t.value)return u.INVALID;const r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?u.INVALID:"dirty"===r.status||"dirty"===t.value?(0,u.DIRTY)(r.value):r}}if("refinement"===r.type){const e=e=>{const t=r.refinement(e,a);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?u.INVALID:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((n=>"aborted"===n.status?u.INVALID:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===r.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!(0,u.isValid)(e))return e;const s=r.transform(e.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:s}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((e=>(0,u.isValid)(e)?Promise.resolve(r.transform(e.value,a)).then((e=>({status:t.value,value:e}))):e))}c.util.assertNever(r)}}t.ZodEffects=fe,t.ZodTransformer=fe,fe.create=(e,t,n)=>new fe({schema:e,typeName:Te.ZodEffects,effect:t,...m(n)}),fe.createWithPreprocess=(e,t,n)=>new fe({schema:t,effect:{type:"preprocess",transform:e},typeName:Te.ZodEffects,...m(n)});class ye extends f{_parse(e){return this._getType(e)===c.ZodParsedType.undefined?(0,u.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}t.ZodOptional=ye,ye.create=(e,t)=>new ye({innerType:e,typeName:Te.ZodOptional,...m(t)});class ge extends f{_parse(e){return this._getType(e)===c.ZodParsedType.null?(0,u.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}t.ZodNullable=ge,ge.create=(e,t)=>new ge({innerType:e,typeName:Te.ZodNullable,...m(t)});class ve extends f{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===c.ZodParsedType.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}t.ZodDefault=ve,ve.create=(e,t)=>new ve({innerType:e,typeName:Te.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...m(t)});class _e extends f{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return(0,u.isAsync)(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new l.ZodError(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new l.ZodError(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}t.ZodCatch=_e,_e.create=(e,t)=>new _e({innerType:e,typeName:Te.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...m(t)});class be extends f{_parse(e){if(this._getType(e)!==c.ZodParsedType.nan){const t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.nan,received:t.parsedType}),u.INVALID}return{status:"valid",value:e.data}}}t.ZodNaN=be,be.create=e=>new be({typeName:Te.ZodNaN,...m(e)}),t.BRAND=Symbol("zod_brand");class Pe extends f{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}t.ZodBranded=Pe;class ke extends f{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?u.INVALID:"dirty"===e.status?(t.dirty(),(0,u.DIRTY)(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?u.INVALID:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new ke({in:e,out:t,typeName:Te.ZodPipeline})}}t.ZodPipeline=ke;class we extends f{_parse(e){const t=this._def.innerType._parse(e),n=e=>((0,u.isValid)(e)&&(e.value=Object.freeze(e.value)),e);return(0,u.isAsync)(t)?t.then((e=>n(e))):n(t)}unwrap(){return this._def.innerType}}function xe(e,t){const n="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof n?{message:n}:n}function Ie(e,t={},n){return e?q.create().superRefine(((r,a)=>{var s,i;const o=e(r);if(o instanceof Promise)return o.then((e=>{var s,i;if(!e){const e=xe(t,r),o=null===(i=null!==(s=e.fatal)&&void 0!==s?s:n)||void 0===i||i;a.addIssue({code:"custom",...e,fatal:o})}}));if(!o){const e=xe(t,r),o=null===(i=null!==(s=e.fatal)&&void 0!==s?s:n)||void 0===i||i;a.addIssue({code:"custom",...e,fatal:o})}})):q.create()}var Te;t.ZodReadonly=we,we.create=(e,t)=>new we({innerType:e,typeName:Te.ZodReadonly,...m(t)}),t.custom=Ie,t.late={object:X.lazycreate},function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(Te||(t.ZodFirstPartyTypeKind=Te={})),t.instanceof=(e,t={message:`Input not instance of ${e.name}`})=>Ie((t=>t instanceof e),t);const Oe=z.create;t.string=Oe;const Se=L.create;t.number=Se;const Ce=be.create;t.nan=Ce;const Ze=U.create;t.bigint=Ze;const Ae=V.create;t.boolean=Ae;const je=$.create;t.date=je;const Ee=F.create;t.symbol=Ee;const Ne=B.create;t.undefined=Ne;const Re=W.create;t.null=Re;const Me=q.create;t.any=Me;const ze=K.create;t.unknown=ze;const De=H.create;t.never=De;const Le=Y.create;t.void=Le;const Ue=G.create;t.array=Ue;const Ve=X.create;t.object=Ve;const $e=X.strictCreate;t.strictObject=$e;const Fe=Q.create;t.union=Fe;const Be=te.create;t.discriminatedUnion=Be;const We=re.create;t.intersection=We;const qe=ae.create;t.tuple=qe;const Ke=se.create;t.record=Ke;const He=ie.create;t.map=He;const Ye=oe.create;t.set=Ye;const Ge=de.create;t.function=Ge;const Je=ue.create;t.lazy=Je;const Xe=ce.create;t.literal=Xe;const Qe=pe.create;t.enum=Qe;const et=he.create;t.nativeEnum=et;const tt=me.create;t.promise=tt;const nt=fe.create;t.effect=nt,t.transformer=nt;const rt=ye.create;t.optional=rt;const at=ge.create;t.nullable=at;const st=fe.createWithPreprocess;t.preprocess=st;const it=ke.create;t.pipeline=it,t.ostring=()=>Oe().optional(),t.onumber=()=>Se().optional(),t.oboolean=()=>Ae().optional(),t.coerce={string:e=>z.create({...e,coerce:!0}),number:e=>L.create({...e,coerce:!0}),boolean:e=>V.create({...e,coerce:!0}),bigint:e=>U.create({...e,coerce:!0}),date:e=>$.create({...e,coerce:!0})},t.NEVER=u.INVALID}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var s=t[r]={exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{var e=r;Object.defineProperty(e,"BJ",{value:!0}),e.dx=e.n1=e.pd=e.kt=e.Sm=e.qn=e.YY=e.A5=e.eP=e.JC=void 0;var t=n(6485);Object.defineProperty(e,"JC",{enumerable:!0,get:function(){return t.CatalogTypes}});var a=n(7687);Object.defineProperty(e,"eP",{enumerable:!0,get:function(){return a.CategoryTypes}});var s=n(6788);Object.defineProperty(e,"A5",{enumerable:!0,get:function(){return s.PosPluginSdkError}});var i=n(4347);Object.defineProperty(e,"YY",{enumerable:!0,get:function(){return i.HttpTypes}});var o=n(4591);Object.defineProperty(e,"qn",{enumerable:!0,get:function(){return o.MerchantTypes}});var d=n(2765);Object.defineProperty(e,"Sm",{enumerable:!0,get:function(){return d.MenuOptionTypes}});var u=n(6605);Object.defineProperty(e,"kt",{enumerable:!0,get:function(){return u.OrderTypes}});var c=n(7567);Object.defineProperty(e,"pd",{enumerable:!0,get:function(){return c.Sdk}}),Object.defineProperty(e,"n1",{enumerable:!0,get:function(){return c.pos}});var l=n(853);Object.defineProperty(e,"dx",{enumerable:!0,get:function(){return l.StorageTypes}})})();var a=r.JC,s=r.eP,i=r.YY,o=r.Sm,d=r.qn,u=r.kt,c=r.A5,l=r.pd,p=r.dx,h=r.BJ,m=r.n1;export{a as CatalogTypes,s as CategoryTypes,i as HttpTypes,o as MenuOptionTypes,d as MerchantTypes,u as OrderTypes,c as PosPluginSdkError,l as Sdk,p as StorageTypes,h as __esModule,m as pos};
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tossplace/pos-plugin-sdk",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "포스 플러그인 sdk",
|
|
5
|
+
"main": "dist/index.cjs.js",
|
|
6
|
+
"module": "dist/index.esm.js",
|
|
7
|
+
"types": "types/src/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
"import": "./dist/index.esm.js",
|
|
10
|
+
"require": "./dist/index.cjs.js"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/tossplace/pos-plugin-sdk.git"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"tossplace"
|
|
21
|
+
],
|
|
22
|
+
"author": "tossplace",
|
|
23
|
+
"license": "ISC",
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/tossplace/pos-plugin-sdk/issues"
|
|
26
|
+
},
|
|
27
|
+
"homepage": "https://github.com/tossplace/pos-plugin-sdk#readme"
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createCallbackId(length?: number): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PluginCatalogItem } from '@tossplace-nexus/plugin-types';
|
|
2
|
+
/**
|
|
3
|
+
* @publicApi
|
|
4
|
+
*/
|
|
5
|
+
export interface CatalogTypes {
|
|
6
|
+
getCatalogs: () => Promise<PluginCatalogItem[]>;
|
|
7
|
+
on: (event: 'sold-out' | 'on-sale', callback: (menu: PluginCatalogItem) => void) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const catalog: CatalogTypes;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PluginHttpResponse } from '@tossplace-nexus/plugin-types';
|
|
2
|
+
/**
|
|
3
|
+
* @publicApi
|
|
4
|
+
*/
|
|
5
|
+
export interface HttpTypes {
|
|
6
|
+
get: (url: string, headers?: [string, string][]) => Promise<PluginHttpResponse>;
|
|
7
|
+
post: (url: string, payload: any, headers?: [string, string][]) => Promise<PluginHttpResponse>;
|
|
8
|
+
delete: (url: string, headers?: [string, string][]) => Promise<PluginHttpResponse>;
|
|
9
|
+
head: (url: string, headers?: [string, string][]) => Promise<PluginHttpResponse>;
|
|
10
|
+
options: (url: string, headers?: [string, string][]) => Promise<PluginHttpResponse>;
|
|
11
|
+
put: (url: string, payload: any, headers?: [string, string][]) => Promise<PluginHttpResponse>;
|
|
12
|
+
patch: (url: string, payload: any, headers?: [string, string][]) => Promise<PluginHttpResponse>;
|
|
13
|
+
}
|
|
14
|
+
export declare const http: HttpTypes;
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DO NOT MODIFY, AUTO GENERATED.
|
|
3
|
+
* @codegen export
|
|
4
|
+
*/
|
|
5
|
+
export { CatalogTypes } from './catalog/catalog';
|
|
6
|
+
export { CategoryTypes } from './category/category';
|
|
7
|
+
export { PosPluginSdkError } from './error/PosPluginSdkError';
|
|
8
|
+
export { HttpTypes } from './http/http';
|
|
9
|
+
export { MerchantTypes } from './merchant/merchant';
|
|
10
|
+
export { MenuOptionTypes } from './option/option';
|
|
11
|
+
export { OrderTypes } from './order/order';
|
|
12
|
+
export { Sdk, pos } from './pos/sdk';
|
|
13
|
+
export { StorageTypes } from './storage/storage';
|