@atlaskit/web-config-client 0.4.0 → 0.5.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/CHANGELOG.md +18 -0
- package/config/babel.config.js +3 -0
- package/config/webpack.common.js +43 -0
- package/config/webpack.config.js +50 -0
- package/dist/types/main.d.ts +1 -1
- package/dist/types-ts4.5/main.d.ts +1 -1
- package/dist/web-config-client.with-deps.amd.js +5453 -0
- package/dist/web-config-client.with-deps.amd.min.js +1 -0
- package/package.json +9 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
define("web-config-client",[],(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);var r=n(1);n.d(t,"ConfigClient",(function(){return r.ConfigClient}));var a=n(2);n.d(t,"ConfigCollection",(function(){return a.ConfigCollection})),n.d(t,"ConfigError",(function(){return a.ConfigError})),n.d(t,"ConfigMapSchema",(function(){return a.ConfigMapSchema}))},function(e,t,n){"use strict";n.r(t),n.d(t,"ConfigClient",(function(){return a}));var r=n(2);class a{static async fetch(e){var t;const n=null!==(t=e.fetch)&&void 0!==t?t:globalThis.fetch,a=await n(e.ffsBaseUrl+"/api/v2/configurations",{method:"POST",body:JSON.stringify(e.context),headers:{"content-type":"application/json","x-api-key":e.ffsApiKey}});if(!a.ok)throw new Error(`Unexpected response ${a.status}: ${await a.text()}`);const i=await a.text();return r.ConfigCollection.fromValues(i)}}},function(e,t,n){"use strict";n.r(t);var r=n(3);n.d(t,"ConfigCollection",(function(){return r.ConfigCollection}));var a=n(18);n.d(t,"ConfigError",(function(){return a.ConfigError})),n.d(t,"AnyConfigSchema",(function(){return a.AnyConfigSchema})),n.d(t,"ConfigMapSchema",(function(){return a.ConfigMapSchema})),n.d(t,"MinimalConfigSchema",(function(){return a.MinimalConfigSchema})),n.d(t,"StandardConfigSchema",(function(){return a.StandardConfigSchema})),n.d(t,"minimalToMap",(function(){return a.minimalToMap})),n.d(t,"standardToMap",(function(){return a.standardToMap}))},function(e,t,n){"use strict";n.r(t),n.d(t,"ParseError",(function(){return v})),n.d(t,"ConfigCollection",(function(){return g}));var r=n(4),a=n.n(r),i=n(8),s=n.n(i),o=n(9),u=n.n(o),d=n(11),c=n.n(d),l=n(12),f=n.n(l),p=n(14),h=n.n(p),m=n(18);function y(e,t,n){return t=c()(t),u()(e,function(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return function(){return!!e}()}()?Reflect.construct(t,n||[],c()(e).constructor):t.apply(e,n))}var v=function(e){function t(e,n){var r;return s()(this,t),(r=y(this,t,[e])).cause=n,r}return f()(t,e),a()(t)}(h()(Error));var g=function(){function e(t){s()(this,e),this.config=t}return a()(e,[{key:"toJson",value:function(e){switch(e){case"standard":return JSON.stringify(Object(m.mapToStandard)(this.config));case"minimal":return JSON.stringify(Object(m.mapToMinimal)(this.config))}}},{key:"getBoolean",value:function(e){var t=this.config.get(e);if(!t)return{error:m.ConfigError.NotFound};var n=t.value;return"boolean"!=typeof n?{error:m.ConfigError.IncorrectType,received:n}:{value:n}}},{key:"getString",value:function(e){var t=this.config.get(e);if(!t)return{error:m.ConfigError.NotFound};var n=t.value;return"string"!=typeof n?{error:m.ConfigError.IncorrectType,received:n}:{value:n}}},{key:"getNumber",value:function(e){var t=this.config.get(e);if(!t)return{error:m.ConfigError.NotFound};var n=t.value;return"number"!=typeof n?{error:m.ConfigError.IncorrectType,received:n}:{value:n}}},{key:"getStringList",value:function(e){var t=this.config.get(e);if(!t)return{error:m.ConfigError.NotFound};var n=t.value;return Array.isArray(n)&&n.every((function(e){return"string"==typeof e}))?{value:n}:{error:m.ConfigError.IncorrectType,received:n}}},{key:"getNumberList",value:function(e){var t=this.config.get(e);if(!t)return{error:m.ConfigError.NotFound};var n=t.value;return Array.isArray(n)&&n.every((function(e){return"number"==typeof e}))?{value:n}:{error:m.ConfigError.IncorrectType,received:n}}}],[{key:"fromValues",value:function(t,n){var r=function(e){try{return{data:m.AnyConfigSchema.parse(JSON.parse(e)),success:!0}}catch(e){return e instanceof Error?{success:!1,error:e}:{success:!1,error:new v("An unknown error occurred during parsing",e)}}}(t);if(!r.success){var a=new v("Failed to deserialize config",r.error);if(null!=n&&n.throw)throw a;return console.error(a),e.empty()}return new e(Array.isArray(r.data)?Object(m.minimalToMap)(r.data):Object(m.standardToMap)(r.data))}},{key:"empty",value:function(){return new e(new Map)}}])}()},function(e,t,n){var r=n(5);function a(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,r(a.key),a)}}e.exports=function(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(6).default,a=n(7);e.exports=function(e){var t=a(e,"string");return"symbol"==r(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(6).default;e.exports=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=r(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(6).default,a=n(10);e.exports=function(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return a(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(13);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t,r)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(11),a=n(13),i=n(15),s=n(16);function o(t){var n="function"==typeof Map?new Map:void 0;return e.exports=o=function(e){if(null===e||!i(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return s(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),a(t,e)},e.exports.__esModule=!0,e.exports.default=e.exports,o(t)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(17),a=n(13);e.exports=function(e,t,n){if(r())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,t);var s=new(e.bind.apply(e,i));return n&&a(s,n.prototype),s},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(e.exports=n=function(){return!!t},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";n.r(t),n.d(t,"ConfigError",(function(){return c})),n.d(t,"StandardConfigSchema",(function(){return l})),n.d(t,"MinimalConfigSchema",(function(){return f})),n.d(t,"AnyConfigSchema",(function(){return p})),n.d(t,"ConfigMapSchema",(function(){return h})),n.d(t,"minimalToMap",(function(){return y})),n.d(t,"standardToMap",(function(){return v})),n.d(t,"mapToMinimal",(function(){return g})),n.d(t,"mapToStandard",(function(){return _}));var r=n(6),a=n.n(r),i=n(19),s=n.n(i),o=n(25);function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return d(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var c=function(e){return e.NotFound="not_found",e.InvalidState="state_invalid",e.IncorrectType="incorrect_type",e}({}),l=o.z.record(o.z.string(),o.z.object({value:o.z.union([o.z.boolean(),o.z.string(),o.z.number(),o.z.string().array(),o.z.number().array()])})),f=o.z.tuple([o.z.string().array(),o.z.array(o.z.string()).refine((function(e){return e.length%2==0})),o.z.array(o.z.union([o.z.string(),o.z.number()])).refine((function(e){if(e.length%2!=0)return!1;for(var t=0;t<e.length;t+=2){if("string"!=typeof e[t])return!1;if("number"!=typeof e[t+1])return!1}return!0})),o.z.array(o.z.union([o.z.string(),o.z.string().array()])).refine((function(e){if(e.length%2!=0)return!1;for(var t=0;t<e.length;t+=2){var n=e[t],r=e[t+1];if("string"!=typeof n)return!1;if(!Array.isArray(r)||!r.every((function(e){return"string"==typeof e})))return!1}return!0})),o.z.array(o.z.union([o.z.string(),o.z.number().array()])).refine((function(e){if(e.length%2!=0)return!1;for(var t=0;t<e.length;t+=2){var n=e[t],r=e[t+1];if("string"!=typeof n)return!1;if(!Array.isArray(r)||!r.every((function(e){return"number"==typeof e})))return!1}return!0}))]),p=o.z.union([l,f]),h=o.z.map(o.z.string(),o.z.object({value:o.z.union([o.z.boolean(),o.z.string(),o.z.number(),o.z.string().array(),o.z.number().array()])}));function m(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],a=e[n+1];if("string"!=typeof r)throw new Error("Expected a string while iterating pairs, got: ".concat(e[n]));t(r,a)}}function y(e){var t=new Map;return e[0].forEach((function(e){return t.set(e,{value:!0})})),m(e[1],(function(e,n){return t.set(e,{value:n})})),m(e[2],(function(e,n){return t.set(e,{value:n})})),m(e[3],(function(e,n){return t.set(e,{value:n})})),m(e[4],(function(e,n){return t.set(e,{value:n})})),t}function v(e){var t=new Map;return Object.entries(e).forEach((function(e){var n=s()(e,2),r=n[0],a=n[1];return t.set(r,a)})),t}function g(e){var t,n=[[],[],[],[],[]],r=u(e.entries());try{for(r.s();!(t=r.n()).done;){var i=s()(t.value,2),o=i[0],d=i[1].value;switch(a()(d)){case"boolean":d&&n[0].push(o);break;case"string":n[1].push(o,d);break;case"number":n[2].push(o,d);break;default:if(!Array.isArray(d))throw new Error("Unexpected configuration value: ".concat(d));if(d.every((function(e){return"string"==typeof e}))){n[3].push(o,d);break}if(d.every((function(e){return"number"==typeof e}))){n[4].push(o,d);break}throw new Error("Unexpected configuration value: ".concat(d))}}}catch(e){r.e(e)}finally{r.f()}return n}function _(e){return Object.fromEntries(e.entries())}},function(e,t,n){var r=n(20),a=n(21),i=n(22),s=n(24);e.exports=function(e,t){return r(e)||a(e,t)||i(e,t)||s()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,s,o=[],u=!0,d=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);u=!0);}catch(e){d=!0,a=e}finally{try{if(!u&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(d)throw a}}return o}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(23);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r,a;n.r(t),n.d(t,"BRAND",(function(){return ze})),n.d(t,"DIRTY",(function(){return _})),n.d(t,"EMPTY_PATH",(function(){return m})),n.d(t,"INVALID",(function(){return g})),n.d(t,"NEVER",(function(){return Et})),n.d(t,"OK",(function(){return b})),n.d(t,"ParseStatus",(function(){return v})),n.d(t,"Schema",(function(){return M})),n.d(t,"ZodAny",(function(){return ce})),n.d(t,"ZodArray",(function(){return he})),n.d(t,"ZodBigInt",(function(){return ae})),n.d(t,"ZodBoolean",(function(){return ie})),n.d(t,"ZodBranded",(function(){return $e})),n.d(t,"ZodCatch",(function(){return Pe})),n.d(t,"ZodDate",(function(){return se})),n.d(t,"ZodDefault",(function(){return Ie})),n.d(t,"ZodDiscriminatedUnion",(function(){return ge})),n.d(t,"ZodEffects",(function(){return je})),n.d(t,"ZodEnum",(function(){return Se})),n.d(t,"ZodError",(function(){return d})),n.d(t,"ZodFirstPartyTypeKind",(function(){return Be})),n.d(t,"ZodFunction",(function(){return Ze})),n.d(t,"ZodIntersection",(function(){return _e})),n.d(t,"ZodIssueCode",(function(){return o})),n.d(t,"ZodLazy",(function(){return Te})),n.d(t,"ZodLiteral",(function(){return Ce})),n.d(t,"ZodMap",(function(){return ke})),n.d(t,"ZodNaN",(function(){return Re})),n.d(t,"ZodNativeEnum",(function(){return Ae})),n.d(t,"ZodNever",(function(){return fe})),n.d(t,"ZodNull",(function(){return de})),n.d(t,"ZodNullable",(function(){return Me})),n.d(t,"ZodNumber",(function(){return re})),n.d(t,"ZodObject",(function(){return me})),n.d(t,"ZodOptional",(function(){return Ne})),n.d(t,"ZodParsedType",(function(){return i})),n.d(t,"ZodPipeline",(function(){return Fe})),n.d(t,"ZodPromise",(function(){return Ee})),n.d(t,"ZodReadonly",(function(){return De})),n.d(t,"ZodRecord",(function(){return xe})),n.d(t,"ZodSchema",(function(){return M})),n.d(t,"ZodSet",(function(){return we})),n.d(t,"ZodString",(function(){return te})),n.d(t,"ZodSymbol",(function(){return oe})),n.d(t,"ZodTransformer",(function(){return je})),n.d(t,"ZodTuple",(function(){return be})),n.d(t,"ZodType",(function(){return M})),n.d(t,"ZodUndefined",(function(){return ue})),n.d(t,"ZodUnion",(function(){return ye})),n.d(t,"ZodUnknown",(function(){return le})),n.d(t,"ZodVoid",(function(){return pe})),n.d(t,"addIssueToContext",(function(){return y})),n.d(t,"any",(function(){return tt})),n.d(t,"array",(function(){return it})),n.d(t,"bigint",(function(){return Ye})),n.d(t,"boolean",(function(){return He})),n.d(t,"coerce",(function(){return At})),n.d(t,"custom",(function(){return Ue})),n.d(t,"date",(function(){return Ge})),n.d(t,"datetimeRegex",(function(){return X})),n.d(t,"default",(function(){return jt})),n.d(t,"defaultErrorMap",(function(){return c})),n.d(t,"discriminatedUnion",(function(){return dt})),n.d(t,"effect",(function(){return xt})),n.d(t,"enum",(function(){return gt})),n.d(t,"function",(function(){return mt})),n.d(t,"getErrorMap",(function(){return p})),n.d(t,"getParsedType",(function(){return s})),n.d(t,"instanceof",(function(){return Ke})),n.d(t,"intersection",(function(){return ct})),n.d(t,"isAborted",(function(){return x})),n.d(t,"isAsync",(function(){return Z})),n.d(t,"isDirty",(function(){return k})),n.d(t,"isValid",(function(){return w})),n.d(t,"late",(function(){return Ve})),n.d(t,"lazy",(function(){return yt})),n.d(t,"literal",(function(){return vt})),n.d(t,"makeIssue",(function(){return h})),n.d(t,"map",(function(){return pt})),n.d(t,"nan",(function(){return Je})),n.d(t,"nativeEnum",(function(){return _t})),n.d(t,"never",(function(){return rt})),n.d(t,"null",(function(){return et})),n.d(t,"nullable",(function(){return wt})),n.d(t,"number",(function(){return qe})),n.d(t,"object",(function(){return st})),n.d(t,"objectUtil",(function(){return a})),n.d(t,"oboolean",(function(){return St})),n.d(t,"onumber",(function(){return Ot})),n.d(t,"optional",(function(){return kt})),n.d(t,"ostring",(function(){return Ct})),n.d(t,"pipeline",(function(){return Tt})),n.d(t,"preprocess",(function(){return Zt})),n.d(t,"promise",(function(){return bt})),n.d(t,"quotelessJson",(function(){return u})),n.d(t,"record",(function(){return ft})),n.d(t,"set",(function(){return ht})),n.d(t,"setErrorMap",(function(){return f})),n.d(t,"strictObject",(function(){return ot})),n.d(t,"string",(function(){return We})),n.d(t,"symbol",(function(){return Xe})),n.d(t,"transformer",(function(){return xt})),n.d(t,"tuple",(function(){return lt})),n.d(t,"undefined",(function(){return Qe})),n.d(t,"union",(function(){return ut})),n.d(t,"unknown",(function(){return nt})),n.d(t,"util",(function(){return r})),n.d(t,"void",(function(){return at})),n.d(t,"z",(function(){return jt})),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}(r||(r={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(a||(a={}));const i=r.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),s=e=>{switch(typeof e){case"undefined":return i.undefined;case"string":return i.string;case"number":return isNaN(e)?i.nan:i.number;case"boolean":return i.boolean;case"function":return i.function;case"bigint":return i.bigint;case"symbol":return i.symbol;case"object":return Array.isArray(e)?i.array:null===e?i.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?i.promise:"undefined"!=typeof Map&&e instanceof Map?i.map:"undefined"!=typeof Set&&e instanceof Set?i.set:"undefined"!=typeof Date&&e instanceof Date?i.date:i.object;default:return i.unknown}},o=r.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"]),u=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class d 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 d))throw new Error("Not a ZodError: "+e)}toString(){return this.message}get message(){return JSON.stringify(this.issues,r.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()}}d.create=e=>new d(e);const c=(e,t)=>{let n;switch(e.code){case o.invalid_type:n=e.received===i.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case o.invalid_literal:n="Invalid literal value, expected "+JSON.stringify(e.expected,r.jsonStringifyReplacer);break;case o.unrecognized_keys:n="Unrecognized key(s) in object: "+r.joinValues(e.keys,", ");break;case o.invalid_union:n="Invalid input";break;case o.invalid_union_discriminator:n="Invalid discriminator value. Expected "+r.joinValues(e.options);break;case o.invalid_enum_value:n=`Invalid enum value. Expected ${r.joinValues(e.options)}, received '${e.received}'`;break;case o.invalid_arguments:n="Invalid function arguments";break;case o.invalid_return_type:n="Invalid function return type";break;case o.invalid_date:n="Invalid date";break;case o.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.assertNever(e.validation):n="regex"!==e.validation?"Invalid "+e.validation:"Invalid";break;case o.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 o.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 o.custom:n="Invalid input";break;case o.invalid_intersection_types:n="Intersection results could not be merged";break;case o.not_multiple_of:n="Number must be a multiple of "+e.multipleOf;break;case o.not_finite:n="Number must be finite";break;default:n=t.defaultError,r.assertNever(e)}return{message:n}};let l=c;function f(e){l=e}function p(){return l}const h=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,i=[...n,...a.path||[]],s={...a,path:i};if(void 0!==a.message)return{...a,path:i,message:a.message};let o="";const u=r.filter(e=>!!e).slice().reverse();for(const e of u)o=e(s,{data:t,defaultError:o}).message;return{...a,path:i,message:o}},m=[];function y(e,t){const n=p(),r=h({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===c?void 0:c].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 g;"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 g;if("aborted"===a.status)return g;"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 g=Object.freeze({status:"aborted"}),_=e=>({status:"dirty",value:e}),b=e=>({status:"valid",value:e}),x=e=>"aborted"===e.status,k=e=>"dirty"===e.status,w=e=>"valid"===e.status,Z=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 C(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 O,S,A;"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}(O||(O={}));class E{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(w(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 d(e.common.issues);return this._error=t,this._error}}};function N(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.');if(t)return{errorMap:t,description:a};return{errorMap:(t,a)=>{var i,s;const{message:o}=e;return"invalid_enum_value"===t.code?{message:null!=o?o:a.defaultError}:void 0===a.data?{message:null!==(i=null!=o?o:r)&&void 0!==i?i:a.defaultError}:"invalid_type"!==t.code?{message:a.defaultError}:{message:null!==(s=null!=o?o:n)&&void 0!==s?s:a.defaultError}},description:a}}class M{get description(){return this._def.description}_getType(e){return s(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:s(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:s(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Z(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:s(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:s(e)};if(!this["~standard"].async)try{const t=this._parseSync({data:e,path:[],parent:r});return w(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=>w(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:s(e)},r=this._parse({data:e,path:n.path,parent:n}),a=await(Z(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),i=()=>r.addIssue({code:o.custom,...n(t)});return"undefined"!=typeof Promise&&a instanceof Promise?a.then(e=>!!e||(i(),!1)):!!a||(i(),!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 je({schema:this,typeName:Be.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 Ne.create(this,this._def)}nullable(){return Me.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return he.create(this)}promise(){return Ee.create(this,this._def)}or(e){return ye.create([this,e],this._def)}and(e){return _e.create(this,e,this._def)}transform(e){return new je({...N(this._def),schema:this,typeName:Be.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Ie({...N(this._def),innerType:this,defaultValue:t,typeName:Be.ZodDefault})}brand(){return new $e({typeName:Be.ZodBranded,type:this,...N(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new Pe({...N(this._def),innerType:this,catchValue:t,typeName:Be.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Fe.create(this,e)}readonly(){return De.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const I=/^c[^\s-]{8,}$/i,P=/^[0-9a-z]+$/,R=/^[0-9A-HJKMNP-TV-Z]{26}$/i,z=/^[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,$=/^[a-z0-9_-]{21}$/i,F=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,D=/^[-+]?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)?)??$/,L=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let U;const V=/^(?:(?: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])$/,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])\/(3[0-2]|[12]?[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]))$/,W=/^(([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])$/,q=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,J=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Y="((\\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])))",H=new RegExp(`^${Y}$`);function G(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+="(\\.\\d+)?"),t}function X(e){let t=`${Y}T${G(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 Q(e,t){if(!F.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 ee(e,t){return!("v4"!==t&&t||!B.test(e))||!("v6"!==t&&t||!W.test(e))}class te extends M{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==i.string){const t=this._getOrReturnCtx(e);return y(t,{code:o.invalid_type,expected:i.string,received:t.parsedType}),g}const t=new v;let n=void 0;for(const i of this._def.checks)if("min"===i.kind)e.data.length<i.value&&(n=this._getOrReturnCtx(e,n),y(n,{code:o.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),y(n,{code:o.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?y(n,{code:o.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&y(n,{code:o.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),t.dirty())}else if("email"===i.kind)L.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:"email",code:o.invalid_string,message:i.message}),t.dirty());else if("emoji"===i.kind)U||(U=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),U.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:"emoji",code:o.invalid_string,message:i.message}),t.dirty());else if("uuid"===i.kind)z.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:"uuid",code:o.invalid_string,message:i.message}),t.dirty());else if("nanoid"===i.kind)$.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:"nanoid",code:o.invalid_string,message:i.message}),t.dirty());else if("cuid"===i.kind)I.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:"cuid",code:o.invalid_string,message:i.message}),t.dirty());else if("cuid2"===i.kind)P.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:"cuid2",code:o.invalid_string,message:i.message}),t.dirty());else if("ulid"===i.kind)R.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:"ulid",code:o.invalid_string,message:i.message}),t.dirty());else if("url"===i.kind)try{new URL(e.data)}catch(r){n=this._getOrReturnCtx(e,n),y(n,{validation:"url",code:o.invalid_string,message:i.message}),t.dirty()}else if("regex"===i.kind){i.regex.lastIndex=0;i.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:"regex",code:o.invalid_string,message:i.message}),t.dirty())}else if("trim"===i.kind)e.data=e.data.trim();else if("includes"===i.kind)e.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(e,n),y(n,{code:o.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),t.dirty());else if("toLowerCase"===i.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===i.kind)e.data=e.data.toUpperCase();else if("startsWith"===i.kind)e.data.startsWith(i.value)||(n=this._getOrReturnCtx(e,n),y(n,{code:o.invalid_string,validation:{startsWith:i.value},message:i.message}),t.dirty());else if("endsWith"===i.kind)e.data.endsWith(i.value)||(n=this._getOrReturnCtx(e,n),y(n,{code:o.invalid_string,validation:{endsWith:i.value},message:i.message}),t.dirty());else if("datetime"===i.kind){X(i).test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{code:o.invalid_string,validation:"datetime",message:i.message}),t.dirty())}else if("date"===i.kind){H.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{code:o.invalid_string,validation:"date",message:i.message}),t.dirty())}else if("time"===i.kind){new RegExp(`^${G(i)}$`).test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{code:o.invalid_string,validation:"time",message:i.message}),t.dirty())}else"duration"===i.kind?D.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:"duration",code:o.invalid_string,message:i.message}),t.dirty()):"ip"===i.kind?(a=e.data,("v4"!==(s=i.version)&&s||!V.test(a))&&("v6"!==s&&s||!K.test(a))&&(n=this._getOrReturnCtx(e,n),y(n,{validation:"ip",code:o.invalid_string,message:i.message}),t.dirty())):"jwt"===i.kind?Q(e.data,i.alg)||(n=this._getOrReturnCtx(e,n),y(n,{validation:"jwt",code:o.invalid_string,message:i.message}),t.dirty()):"cidr"===i.kind?ee(e.data,i.version)||(n=this._getOrReturnCtx(e,n),y(n,{validation:"cidr",code:o.invalid_string,message:i.message}),t.dirty()):"base64"===i.kind?q.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:"base64",code:o.invalid_string,message:i.message}),t.dirty()):"base64url"===i.kind?J.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:"base64url",code:o.invalid_string,message:i.message}),t.dirty()):r.assertNever(i);var a,s;return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:o.invalid_string,...O.errToObj(n)})}_addCheck(e){return new te({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...O.errToObj(e)})}url(e){return this._addCheck({kind:"url",...O.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...O.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...O.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...O.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...O.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...O.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...O.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...O.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...O.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...O.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...O.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...O.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,...O.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,...O.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...O.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...O.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...O.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...O.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...O.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...O.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...O.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...O.errToObj(t)})}nonempty(e){return this.min(1,O.errToObj(e))}trim(){return new te({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new te({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new te({...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 ne(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)}te.create=e=>{var t;return new te({checks:[],typeName:Be.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...N(e)})};class re extends M{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==i.number){const t=this._getOrReturnCtx(e);return y(t,{code:o.invalid_type,expected:i.number,received:t.parsedType}),g}let t=void 0;const n=new v;for(const a of this._def.checks)if("int"===a.kind)r.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),y(t,{code:o.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty());else if("min"===a.kind){(a.inclusive?e.data<a.value:e.data<=a.value)&&(t=this._getOrReturnCtx(e,t),y(t,{code:o.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty())}else if("max"===a.kind){(a.inclusive?e.data>a.value:e.data>=a.value)&&(t=this._getOrReturnCtx(e,t),y(t,{code:o.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty())}else"multipleOf"===a.kind?0!==ne(e.data,a.value)&&(t=this._getOrReturnCtx(e,t),y(t,{code:o.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):"finite"===a.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),y(t,{code:o.not_finite,message:a.message}),n.dirty()):r.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,O.toString(t))}gt(e,t){return this.setLimit("min",e,!1,O.toString(t))}lte(e,t){return this.setLimit("max",e,!0,O.toString(t))}lt(e,t){return this.setLimit("max",e,!1,O.toString(t))}setLimit(e,t,n,r){return new re({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:O.toString(r)}]})}_addCheck(e){return new re({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:O.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:O.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:O.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:O.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:O.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:O.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:O.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:O.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:O.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&&r.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)}}re.create=e=>new re({checks:[],typeName:Be.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...N(e)});class ae extends M{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)!==i.bigint)return this._getInvalidInput(e);let t=void 0;const n=new v;for(const a of this._def.checks)if("min"===a.kind){(a.inclusive?e.data<a.value:e.data<=a.value)&&(t=this._getOrReturnCtx(e,t),y(t,{code:o.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty())}else if("max"===a.kind){(a.inclusive?e.data>a.value:e.data>=a.value)&&(t=this._getOrReturnCtx(e,t),y(t,{code:o.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty())}else"multipleOf"===a.kind?e.data%a.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),y(t,{code:o.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):r.assertNever(a);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return y(t,{code:o.invalid_type,expected:i.bigint,received:t.parsedType}),g}gte(e,t){return this.setLimit("min",e,!0,O.toString(t))}gt(e,t){return this.setLimit("min",e,!1,O.toString(t))}lte(e,t){return this.setLimit("max",e,!0,O.toString(t))}lt(e,t){return this.setLimit("max",e,!1,O.toString(t))}setLimit(e,t,n,r){return new ae({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:O.toString(r)}]})}_addCheck(e){return new ae({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:O.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:O.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:O.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:O.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:O.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}}ae.create=e=>{var t;return new ae({checks:[],typeName:Be.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...N(e)})};class ie extends M{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==i.boolean){const t=this._getOrReturnCtx(e);return y(t,{code:o.invalid_type,expected:i.boolean,received:t.parsedType}),g}return b(e.data)}}ie.create=e=>new ie({typeName:Be.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...N(e)});class se extends M{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==i.date){const t=this._getOrReturnCtx(e);return y(t,{code:o.invalid_type,expected:i.date,received:t.parsedType}),g}if(isNaN(e.data.getTime())){return y(this._getOrReturnCtx(e),{code:o.invalid_date}),g}const t=new v;let n=void 0;for(const a of this._def.checks)"min"===a.kind?e.data.getTime()<a.value&&(n=this._getOrReturnCtx(e,n),y(n,{code:o.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),t.dirty()):"max"===a.kind?e.data.getTime()>a.value&&(n=this._getOrReturnCtx(e,n),y(n,{code:o.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),t.dirty()):r.assertNever(a);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new se({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:O.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:O.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}}se.create=e=>new se({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:Be.ZodDate,...N(e)});class oe extends M{_parse(e){if(this._getType(e)!==i.symbol){const t=this._getOrReturnCtx(e);return y(t,{code:o.invalid_type,expected:i.symbol,received:t.parsedType}),g}return b(e.data)}}oe.create=e=>new oe({typeName:Be.ZodSymbol,...N(e)});class ue extends M{_parse(e){if(this._getType(e)!==i.undefined){const t=this._getOrReturnCtx(e);return y(t,{code:o.invalid_type,expected:i.undefined,received:t.parsedType}),g}return b(e.data)}}ue.create=e=>new ue({typeName:Be.ZodUndefined,...N(e)});class de extends M{_parse(e){if(this._getType(e)!==i.null){const t=this._getOrReturnCtx(e);return y(t,{code:o.invalid_type,expected:i.null,received:t.parsedType}),g}return b(e.data)}}de.create=e=>new de({typeName:Be.ZodNull,...N(e)});class ce extends M{constructor(){super(...arguments),this._any=!0}_parse(e){return b(e.data)}}ce.create=e=>new ce({typeName:Be.ZodAny,...N(e)});class le extends M{constructor(){super(...arguments),this._unknown=!0}_parse(e){return b(e.data)}}le.create=e=>new le({typeName:Be.ZodUnknown,...N(e)});class fe extends M{_parse(e){const t=this._getOrReturnCtx(e);return y(t,{code:o.invalid_type,expected:i.never,received:t.parsedType}),g}}fe.create=e=>new fe({typeName:Be.ZodNever,...N(e)});class pe extends M{_parse(e){if(this._getType(e)!==i.undefined){const t=this._getOrReturnCtx(e);return y(t,{code:o.invalid_type,expected:i.void,received:t.parsedType}),g}return b(e.data)}}pe.create=e=>new pe({typeName:Be.ZodVoid,...N(e)});class he extends M{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==i.array)return y(t,{code:o.invalid_type,expected:i.array,received:t.parsedType}),g;if(null!==r.exactLength){const e=t.data.length>r.exactLength.value,a=t.data.length<r.exactLength.value;(e||a)&&(y(t,{code:e?o.too_big:o.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&&(y(t,{code:o.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&&(y(t,{code:o.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 E(t,e,t.path,n)))).then(e=>v.mergeArray(n,e));const a=[...t.data].map((e,n)=>r.type._parseSync(new E(t,e,t.path,n)));return v.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new he({...this._def,minLength:{value:e,message:O.toString(t)}})}max(e,t){return new he({...this._def,maxLength:{value:e,message:O.toString(t)}})}length(e,t){return new he({...this._def,exactLength:{value:e,message:O.toString(t)}})}nonempty(e){return this.min(1,e)}}he.create=(e,t)=>new he({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Be.ZodArray,...N(t)});class me extends M{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=r.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==i.object){const t=this._getOrReturnCtx(e);return y(t,{code:o.invalid_type,expected:i.object,received:t.parsedType}),g}const{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof fe&&"strip"===this._def.unknownKeys))for(const e in n.data)a.includes(e)||s.push(e);const u=[];for(const e of a){const t=r[e],a=n.data[e];u.push({key:{status:"valid",value:e},value:t._parse(new E(n,a,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof fe){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of s)u.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)s.length>0&&(y(n,{code:o.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];u.push({key:{status:"valid",value:t},value:e._parse(new E(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const e=[];for(const t of u){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,u)}get shape(){return this._def.shape()}strict(e){return O.errToObj,new me({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,a,i,s;const o=null!==(i=null===(a=(r=this._def).errorMap)||void 0===a?void 0:a.call(r,t,n).message)&&void 0!==i?i:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(s=O.errToObj(e).message)&&void 0!==s?s:o}:{message:o}}}:{}})}strip(){return new me({...this._def,unknownKeys:"strip"})}passthrough(){return new me({...this._def,unknownKeys:"passthrough"})}extend(e){return new me({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new me({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Be.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new me({...this._def,catchall:e})}pick(e){const t={};return r.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new me({...this._def,shape:()=>t})}omit(e){const t={};return r.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new me({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof me){const n={};for(const r in t.shape){const a=t.shape[r];n[r]=Ne.create(e(a))}return new me({...t._def,shape:()=>n})}return t instanceof he?new he({...t._def,type:e(t.element)}):t instanceof Ne?Ne.create(e(t.unwrap())):t instanceof Me?Me.create(e(t.unwrap())):t instanceof be?be.create(t.items.map(t=>e(t))):t}(this)}partial(e){const t={};return r.objectKeys(this.shape).forEach(n=>{const r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()}),new me({...this._def,shape:()=>t})}required(e){const t={};return r.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof Ne;)e=e._def.innerType;t[n]=e}}),new me({...this._def,shape:()=>t})}keyof(){return Oe(r.objectKeys(this.shape))}}me.create=(e,t)=>new me({shape:()=>e,unknownKeys:"strip",catchall:fe.create(),typeName:Be.ZodObject,...N(t)}),me.strictCreate=(e,t)=>new me({shape:()=>e,unknownKeys:"strict",catchall:fe.create(),typeName:Be.ZodObject,...N(t)}),me.lazycreate=(e,t)=>new me({shape:e,unknownKeys:"strip",catchall:fe.create(),typeName:Be.ZodObject,...N(t)});class ye extends M{_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 d(e.ctx.common.issues));return y(t,{code:o.invalid_union,unionErrors:n}),g}));{let e=void 0;const r=[];for(const a of n){const n={...t,common:{...t.common,issues:[]},parent:null},i=a._parseSync({data:t.data,path:t.path,parent:n});if("valid"===i.status)return i;"dirty"!==i.status||e||(e={result:i,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 d(e));return y(t,{code:o.invalid_union,unionErrors:a}),g}}get options(){return this._def.options}}ye.create=(e,t)=>new ye({options:e,typeName:Be.ZodUnion,...N(t)});const ve=e=>e instanceof Te?ve(e.schema):e instanceof je?ve(e.innerType()):e instanceof Ce?[e.value]:e instanceof Se?e.options:e instanceof Ae?r.objectValues(e.enum):e instanceof Ie?ve(e._def.innerType):e instanceof ue?[void 0]:e instanceof de?[null]:e instanceof Ne?[void 0,...ve(e.unwrap())]:e instanceof Me?[null,...ve(e.unwrap())]:e instanceof $e||e instanceof De?ve(e.unwrap()):e instanceof Pe?ve(e._def.innerType):[];class ge extends M{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==i.object)return y(t,{code:o.invalid_type,expected:i.object,received:t.parsedType}),g;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}):(y(t,{code:o.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),g)}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=ve(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 ge({typeName:Be.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...N(n)})}}class _e extends M{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),a=(e,a)=>{if(x(e)||x(a))return g;const u=function e(t,n){const a=s(t),o=s(n);if(t===n)return{valid:!0,data:t};if(a===i.object&&o===i.object){const a=r.objectKeys(n),i=r.objectKeys(t).filter(e=>-1!==a.indexOf(e)),s={...t,...n};for(const r of i){const a=e(t[r],n[r]);if(!a.valid)return{valid:!1};s[r]=a.data}return{valid:!0,data:s}}if(a===i.array&&o===i.array){if(t.length!==n.length)return{valid:!1};const r=[];for(let a=0;a<t.length;a++){const i=e(t[a],n[a]);if(!i.valid)return{valid:!1};r.push(i.data)}return{valid:!0,data:r}}return a===i.date&&o===i.date&&+t==+n?{valid:!0,data:t}:{valid:!1}}(e.value,a.value);return u.valid?((k(e)||k(a))&&t.dirty(),{status:t.value,value:u.data}):(y(n,{code:o.invalid_intersection_types}),g)};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])=>a(e,t)):a(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}_e.create=(e,t,n)=>new _e({left:e,right:t,typeName:Be.ZodIntersection,...N(n)});class be extends M{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==i.array)return y(n,{code:o.invalid_type,expected:i.array,received:n.parsedType}),g;if(n.data.length<this._def.items.length)return y(n,{code:o.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),g;!this._def.rest&&n.data.length>this._def.items.length&&(y(n,{code:o.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 E(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 be({...this._def,rest:e})}}be.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new be({items:e,typeName:Be.ZodTuple,rest:null,...N(t)})};class xe extends M{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!==i.object)return y(n,{code:o.invalid_type,expected:i.object,received:n.parsedType}),g;const r=[],a=this._def.keyType,s=this._def.valueType;for(const e in n.data)r.push({key:a._parse(new E(n,e,n.path,e)),value:s._parse(new E(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 M?{keyType:e,valueType:t,typeName:Be.ZodRecord,...N(n)}:{keyType:te.create(),valueType:e,typeName:Be.ZodRecord,...N(t)})}}class ke extends M{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!==i.map)return y(n,{code:o.invalid_type,expected:i.map,received:n.parsedType}),g;const r=this._def.keyType,a=this._def.valueType,s=[...n.data.entries()].map(([e,t],i)=>({key:r._parse(new E(n,e,n.path,[i,"key"])),value:a._parse(new E(n,t,n.path,[i,"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 g;"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 g;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}}}ke.create=(e,t,n)=>new ke({valueType:t,keyType:e,typeName:Be.ZodMap,...N(n)});class we extends M{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==i.set)return y(n,{code:o.invalid_type,expected:i.set,received:n.parsedType}),g;const r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(y(n,{code:o.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&&(y(n,{code:o.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 g;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}const u=[...n.data.values()].map((e,t)=>a._parse(new E(n,e,n.path,t)));return n.common.async?Promise.all(u).then(e=>s(e)):s(u)}min(e,t){return new we({...this._def,minSize:{value:e,message:O.toString(t)}})}max(e,t){return new we({...this._def,maxSize:{value:e,message:O.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}we.create=(e,t)=>new we({valueType:e,minSize:null,maxSize:null,typeName:Be.ZodSet,...N(t)});class Ze extends M{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==i.function)return y(t,{code:o.invalid_type,expected:i.function,received:t.parsedType}),g;function n(e,n){return h({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,p(),c].filter(e=>!!e),issueData:{code:o.invalid_arguments,argumentsError:n}})}function r(e,n){return h({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,p(),c].filter(e=>!!e),issueData:{code:o.invalid_return_type,returnTypeError:n}})}const a={errorMap:t.common.contextualErrorMap},s=t.data;if(this._def.returns instanceof Ee){const e=this;return b((async function(...t){const i=new d([]),o=await e._def.args.parseAsync(t,a).catch(e=>{throw i.addIssue(n(t,e)),i}),u=await Reflect.apply(s,this,o);return await e._def.returns._def.type.parseAsync(u,a).catch(e=>{throw i.addIssue(r(u,e)),i})}))}{const e=this;return b((function(...t){const i=e._def.args.safeParse(t,a);if(!i.success)throw new d([n(t,i.error)]);const o=Reflect.apply(s,this,i.data),u=e._def.returns.safeParse(o,a);if(!u.success)throw new d([r(o,u.error)]);return u.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Ze({...this._def,args:be.create(e).rest(le.create())})}returns(e){return new Ze({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new Ze({args:e||be.create([]).rest(le.create()),returns:t||le.create(),typeName:Be.ZodFunction,...N(n)})}}class Te extends M{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})}}Te.create=(e,t)=>new Te({getter:e,typeName:Be.ZodLazy,...N(t)});class Ce extends M{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return y(t,{received:t.data,code:o.invalid_literal,expected:this._def.value}),g}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Oe(e,t){return new Se({values:e,typeName:Be.ZodEnum,...N(t)})}Ce.create=(e,t)=>new Ce({value:e,typeName:Be.ZodLiteral,...N(t)});class Se extends M{constructor(){super(...arguments),S.set(this,void 0)}_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return y(t,{expected:r.joinValues(n),received:t.parsedType,code:o.invalid_type}),g}if(T(this,S,"f")||C(this,S,new Set(this._def.values),"f"),!T(this,S,"f").has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return y(t,{received:t.data,code:o.invalid_enum_value,options:n}),g}return b(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Se.create(e,{...this._def,...t})}exclude(e,t=this._def){return Se.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}S=new WeakMap,Se.create=Oe;class Ae extends M{constructor(){super(...arguments),A.set(this,void 0)}_parse(e){const t=r.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==i.string&&n.parsedType!==i.number){const e=r.objectValues(t);return y(n,{expected:r.joinValues(e),received:n.parsedType,code:o.invalid_type}),g}if(T(this,A,"f")||C(this,A,new Set(r.getValidEnumValues(this._def.values)),"f"),!T(this,A,"f").has(e.data)){const e=r.objectValues(t);return y(n,{received:n.data,code:o.invalid_enum_value,options:e}),g}return b(e.data)}get enum(){return this._def.values}}A=new WeakMap,Ae.create=(e,t)=>new Ae({values:e,typeName:Be.ZodNativeEnum,...N(t)});class Ee extends M{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==i.promise&&!1===t.common.async)return y(t,{code:o.invalid_type,expected:i.promise,received:t.parsedType}),g;const n=t.parsedType===i.promise?t.data:Promise.resolve(t.data);return b(n.then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Ee.create=(e,t)=>new Ee({type:e,typeName:Be.ZodPromise,...N(t)});class je extends M{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Be.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),a=this._def.effect||null,i={addIssue:e=>{y(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===a.type){const e=a.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return g;const r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?g:"dirty"===r.status||"dirty"===t.value?_(r.value):r});{if("aborted"===t.value)return g;const r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?g:"dirty"===r.status||"dirty"===t.value?_(r.value):r}}if("refinement"===a.type){const e=e=>{const t=a.refinement(e,i);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?g:("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?g:("dirty"===n.status&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if("transform"===a.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!w(e))return e;const r=a.transform(e.value,i);if(r instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:r}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>w(e)?Promise.resolve(a.transform(e.value,i)).then(e=>({status:t.value,value:e})):e)}r.assertNever(a)}}je.create=(e,t,n)=>new je({schema:e,typeName:Be.ZodEffects,effect:t,...N(n)}),je.createWithPreprocess=(e,t,n)=>new je({schema:t,effect:{type:"preprocess",transform:e},typeName:Be.ZodEffects,...N(n)});class Ne extends M{_parse(e){return this._getType(e)===i.undefined?b(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ne.create=(e,t)=>new Ne({innerType:e,typeName:Be.ZodOptional,...N(t)});class Me extends M{_parse(e){return this._getType(e)===i.null?b(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Me.create=(e,t)=>new Me({innerType:e,typeName:Be.ZodNullable,...N(t)});class Ie extends M{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===i.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Ie.create=(e,t)=>new Ie({innerType:e,typeName:Be.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...N(t)});class Pe extends M{_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 Z(r)?r.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new d(n.common.issues)},input:n.data})})):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new d(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Pe.create=(e,t)=>new Pe({innerType:e,typeName:Be.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...N(t)});class Re extends M{_parse(e){if(this._getType(e)!==i.nan){const t=this._getOrReturnCtx(e);return y(t,{code:o.invalid_type,expected:i.nan,received:t.parsedType}),g}return{status:"valid",value:e.data}}}Re.create=e=>new Re({typeName:Be.ZodNaN,...N(e)});const ze=Symbol("zod_brand");class $e extends M{_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 Fe extends M{_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?g:"dirty"===e.status?(t.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?g:"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 Fe({in:e,out:t,typeName:Be.ZodPipeline})}}class De extends M{_parse(e){const t=this._def.innerType._parse(e),n=e=>(w(e)&&(e.value=Object.freeze(e.value)),e);return Z(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}}function Le(e,t){const n="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof n?{message:n}:n}function Ue(e,t={},n){return e?ce.create().superRefine((r,a)=>{var i,s;const o=e(r);if(o instanceof Promise)return o.then(e=>{var i,s;if(!e){const e=Le(t,r),o=null===(s=null!==(i=e.fatal)&&void 0!==i?i:n)||void 0===s||s;a.addIssue({code:"custom",...e,fatal:o})}});if(!o){const e=Le(t,r),o=null===(s=null!==(i=e.fatal)&&void 0!==i?i:n)||void 0===s||s;a.addIssue({code:"custom",...e,fatal:o})}}):ce.create()}De.create=(e,t)=>new De({innerType:e,typeName:Be.ZodReadonly,...N(t)});const Ve={object:me.lazycreate};var Be;!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"}(Be||(Be={}));const Ke=(e,t={message:"Input not instance of "+e.name})=>Ue(t=>t instanceof e,t),We=te.create,qe=re.create,Je=Re.create,Ye=ae.create,He=ie.create,Ge=se.create,Xe=oe.create,Qe=ue.create,et=de.create,tt=ce.create,nt=le.create,rt=fe.create,at=pe.create,it=he.create,st=me.create,ot=me.strictCreate,ut=ye.create,dt=ge.create,ct=_e.create,lt=be.create,ft=xe.create,pt=ke.create,ht=we.create,mt=Ze.create,yt=Te.create,vt=Ce.create,gt=Se.create,_t=Ae.create,bt=Ee.create,xt=je.create,kt=Ne.create,wt=Me.create,Zt=je.createWithPreprocess,Tt=Fe.create,Ct=()=>We().optional(),Ot=()=>qe().optional(),St=()=>He().optional(),At={string:e=>te.create({...e,coerce:!0}),number:e=>re.create({...e,coerce:!0}),boolean:e=>ie.create({...e,coerce:!0}),bigint:e=>ae.create({...e,coerce:!0}),date:e=>se.create({...e,coerce:!0})},Et=g;var jt=Object.freeze({__proto__:null,defaultErrorMap:c,setErrorMap:f,getErrorMap:p,makeIssue:h,EMPTY_PATH:m,addIssueToContext:y,ParseStatus:v,INVALID:g,DIRTY:_,OK:b,isAborted:x,isDirty:k,isValid:w,isAsync:Z,get util(){return r},get objectUtil(){return a},ZodParsedType:i,getParsedType:s,ZodType:M,datetimeRegex:X,ZodString:te,ZodNumber:re,ZodBigInt:ae,ZodBoolean:ie,ZodDate:se,ZodSymbol:oe,ZodUndefined:ue,ZodNull:de,ZodAny:ce,ZodUnknown:le,ZodNever:fe,ZodVoid:pe,ZodArray:he,ZodObject:me,ZodUnion:ye,ZodDiscriminatedUnion:ge,ZodIntersection:_e,ZodTuple:be,ZodRecord:xe,ZodMap:ke,ZodSet:we,ZodFunction:Ze,ZodLazy:Te,ZodLiteral:Ce,ZodEnum:Se,ZodNativeEnum:Ae,ZodPromise:Ee,ZodEffects:je,ZodTransformer:je,ZodOptional:Ne,ZodNullable:Me,ZodDefault:Ie,ZodCatch:Pe,ZodNaN:Re,BRAND:ze,ZodBranded:$e,ZodPipeline:Fe,ZodReadonly:De,custom:Ue,Schema:M,ZodSchema:M,late:Ve,get ZodFirstPartyTypeKind(){return Be},coerce:At,any:tt,array:it,bigint:Ye,boolean:He,date:Ge,discriminatedUnion:dt,effect:xt,enum:gt,function:mt,instanceof:Ke,intersection:ct,lazy:yt,literal:vt,map:pt,nan:Je,nativeEnum:_t,never:rt,null:et,nullable:wt,number:qe,object:st,oboolean:St,onumber:Ot,optional:kt,ostring:Ct,pipeline:Tt,preprocess:Zt,promise:bt,record:ft,set:ht,strictObject:ot,string:We,symbol:Xe,transformer:xt,tuple:lt,undefined:Qe,union:ut,unknown:nt,void:at,NEVER:Et,ZodIssueCode:o,quotelessJson:u,ZodError:d})}])}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/web-config-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "JavaScript Frontend Web Client for Dynamic Configuration.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -27,6 +27,10 @@
|
|
|
27
27
|
]
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"webpack-build": "NODE_OPTIONS=--max-old-space-size=4096 webpack --env NODE_ENV=production --env prod --progress --config config/webpack.config.js",
|
|
32
|
+
"ak-postbuild": "NODE_OPTIONS=--max-old-space-size=4096 webpack --env NODE_ENV=production --env prod --config config/webpack.config.js"
|
|
33
|
+
},
|
|
30
34
|
"sideEffects": [
|
|
31
35
|
"*.compiled.css"
|
|
32
36
|
],
|
|
@@ -46,11 +50,13 @@
|
|
|
46
50
|
"@af/visual-regression": "*",
|
|
47
51
|
"@atlaskit/ssr": "*",
|
|
48
52
|
"@atlaskit/visual-regression": "*",
|
|
49
|
-
"@atlassian/feature-
|
|
53
|
+
"@atlassian/experiment-feature-gates": "^5.3.0",
|
|
50
54
|
"@testing-library/react": "^13.4.0",
|
|
51
55
|
"react-dom": "^18.2.0",
|
|
52
56
|
"typescript": "~5.4.2",
|
|
53
|
-
"wait-for-expect": "^1.2.0"
|
|
57
|
+
"wait-for-expect": "^1.2.0",
|
|
58
|
+
"webpack": "^4.41.3",
|
|
59
|
+
"webpack-cli": "^4.10.0"
|
|
54
60
|
},
|
|
55
61
|
"techstack": {
|
|
56
62
|
"@atlassian/frontend": {
|