@walkeros/web-destination-meta 0.1.2 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es5.js CHANGED
@@ -1 +1 @@
1
- "use strict";function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw o}}return a}}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _type_of(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array(e,t):void 0}}var Destination=function(){var e,t,r=function(e){return"object"==(void 0===e?"undefined":_type_of(e))&&null!==e&&!function(e){return Array.isArray(e)}(e)&&"[object Object]"===Object.prototype.toString.call(e)},n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.timestamp||(new Date).setHours(0,13,37,0),r=e.group||"gr0up",n=e.count||1,o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r=_object_spread({},m,r);var n=Object.entries(t).reduce(function(t,n){var o=_sliced_to_array(n,2),a=o[0],i=o[1],c=e[a];return r.merge&&Array.isArray(c)&&Array.isArray(i)?t[a]=i.reduce(function(e,t){return e.includes(t)?e:_to_consumable_array(e).concat([t])},_to_consumable_array(c)):(r.extend||a in e)&&(t[a]=i),t},{});return r.shallow?_object_spread({},e,n):(Object.assign(e,n),e)}({name:"entity action",data:{string:"foo",number:1,boolean:!0,array:[0,"text",!1],not:void 0},context:{dev:["test",1]},globals:{lang:"elb"},custom:{completely:"random"},user:{id:"us3r",device:"c00k13",session:"s3ss10n"},nested:[{entity:"child",data:{is:"subordinated"},nested:[],context:{element:["child",0]}}],consent:{functional:!0},id:"".concat(t,"-").concat(r,"-").concat(n),trigger:"test",entity:"entity",action:"action",timestamp:t,timing:3.14,group:r,count:n,version:{source:v,tagging:1},source:{type:"web",id:"https://localhost:80",previous_id:"http://remotehost:9001"}},e,{merge:!1});if(e.name){var a,i=_sliced_to_array(null!==(a=e.name.split(" "))&&void 0!==a?a:[],2),c=i[0],u=i[1];c&&u&&(o.entity=c,o.action=u)}return o},o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"entity action",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.timestamp||(new Date).setHours(0,13,37,0),o={data:{id:"ers",name:"Everyday Ruck Snack",color:"black",size:"l",price:420}},a={data:{id:"cc",name:"Cool Cap",size:"one size",price:42}};return n(_object_spread_props(_object_spread({},{"cart view":{data:{currency:"EUR",value:2*o.data.price},context:{shopping:["cart",0]},globals:{pagegroup:"shop"},nested:[{entity:"product",data:_object_spread_props(_object_spread({},o.data),{quantity:2}),context:{shopping:["cart",0]},nested:[]}],trigger:"load"},"checkout view":{data:{step:"payment",currency:"EUR",value:o.data.price+a.data.price},context:{shopping:["checkout",0]},globals:{pagegroup:"shop"},nested:[_object_spread_props(_object_spread({entity:"product"},o),{context:{shopping:["checkout",0]},nested:[]}),_object_spread_props(_object_spread({entity:"product"},a),{context:{shopping:["checkout",0]},nested:[]})],trigger:"load"},"order complete":{data:{id:"0rd3r1d",currency:"EUR",shipping:5.22,taxes:73.76,total:555},context:{shopping:["complete",0]},globals:{pagegroup:"shop"},nested:[_object_spread_props(_object_spread({entity:"product"},o),{context:{shopping:["complete",0]},nested:[]}),_object_spread_props(_object_spread({entity:"product"},a),{context:{shopping:["complete",0]},nested:[]}),{entity:"gift",data:{name:"Surprise"},context:{shopping:["complete",0]},nested:[]}],trigger:"load"},"page view":{data:{domain:"www.example.com",title:"walkerOS documentation",referrer:"https://www.elbwalker.com/",search:"?foo=bar",hash:"#hash",id:"/docs/"},globals:{pagegroup:"docs"},trigger:"load"},"product add":_object_spread_props(_object_spread({},o),{context:{shopping:["intent",0]},globals:{pagegroup:"shop"},nested:[],trigger:"click"}),"product view":_object_spread_props(_object_spread({},o),{context:{shopping:["detail",0]},globals:{pagegroup:"shop"},nested:[],trigger:"load"}),"product visible":{data:_object_spread_props(_object_spread({},o.data),{position:3,promo:!0}),context:{shopping:["discover",0]},globals:{pagegroup:"shop"},nested:[],trigger:"load"},"promotion visible":{data:{name:"Setting up tracking easily",position:"hero"},context:{ab_test:["engagement",0]},globals:{pagegroup:"homepage"},trigger:"visible"},"session start":{data:{id:"s3ss10n",start:r,isNew:!0,count:1,runs:1,isStart:!0,storage:!0,referrer:"",device:"c00k13"},user:{id:"us3r",device:"c00k13",session:"s3ss10n",hash:"h4sh",address:"street number",email:"user@example.com",phone:"+49 123 456 789",userAgent:"Mozilla...",browser:"Chrome",browserVersion:"90",deviceType:"desktop",language:"de-DE",country:"DE",region:"HH",city:"Hamburg",zip:"20354",timezone:"Berlin",os:"walkerOS",osVersion:"1.0",screenSize:"1337x420",ip:"127.0.0.0",internal:!0,custom:"value"}}}[e],t),{name:e}))},a=function(e){var t={window:globalThis.window,document:globalThis.document};return e?_object_spread({},t,e):t},i=function(){var e=o("order complete");return["track","Purchase",{value:e.data.total,currency:"EUR",contents:e.nested.filter(function(e){return"product"===e.entity}).map(function(e){return{id:e.data.id,quantity:1}}),content_type:"product",num_items:2},{eventID:e.id}]},c=function(){var e=o("product add");return["track","AddToCart",{currency:"EUR",value:e.data.price,contents:[{id:e.data.id,quantity:1}],content_type:"product"},{eventID:e.id}]},u=function(){var e=o("cart view");return["track","InitiateCheckout",{currency:"EUR",value:e.data.value,contents:e.nested.filter(function(e){return"product"===e.entity}).map(function(e){return{id:e.data.id,quantity:e.data.quantity}}),num_items:e.nested.filter(function(e){return"product"===e.entity}).length},{eventID:e.id}]},s=function(){var e=o("product view");return["track","ViewContent",{currency:"EUR",value:e.data.price,contents:[{id:e.data.id,quantity:1}],content_type:"product"},{eventID:e.id}]},d=Object.defineProperty,p=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,y=Object.prototype.hasOwnProperty,_=function(e,t){for(var r in t)d(e,r,{get:t[r],enumerable:!0})},f={};_(f,{DestinationMeta:function(){return h},default:function(){return E},destinationMeta:function(){return C},examples:function(){return w}});var b=Object.getOwnPropertyNames,g=(e={"package.json":function(e,t){t.exports={name:"@walkeros/core",description:"Core types and platform-agnostic utilities for walkerOS",version:"0.1.2",main:"./dist/index.js",module:"./dist/index.mjs",types:"./dist/index.d.ts",license:"MIT",files:["dist/**"],scripts:{build:"tsup --silent",clean:"rm -rf .turbo && rm -rf node_modules && rm -rf dist",dev:"jest --watchAll --colors",lint:'tsc && eslint "**/*.ts*"',test:"jest",update:"npx npm-check-updates -u && npm update"},dependencies:{},devDependencies:{},repository:{url:"git+https://github.com/elbwalker/walkerOS.git",directory:"packages/core"},author:"elbwalker <hello@elbwalker.com>",homepage:"https://github.com/elbwalker/walkerOS#readme",bugs:{url:"https://github.com/elbwalker/walkerOS/issues"},keywords:["walker","walkerOS","analytics","tracking","data collection","measurement","data privacy","privacy friendly","web analytics","product analytics","core","types","utils"],funding:[{type:"GitHub Sponsors",url:"https://github.com/sponsors/elbwalker"}]}}},function(){return t||(0,e[b(e)[0]])((t={exports:{}}).exports,t),t.exports}),m={merge:!0,shallow:!0,extend:!0},v=g().version,h={},w={};_(w,{events:function(){return j},mapping:function(){return k}});var j={};_(j,{AddToCart:function(){return c},InitiateCheckout:function(){return u},Purchase:function(){return i},ViewContent:function(){return s}});var k={};_(k,{AddToCart:function(){return S},InitiateCheckout:function(){return q},Purchase:function(){return x},ViewContent:function(){return A},config:function(){return P}});var O,x={name:"Purchase",data:{map:{value:"data.total",currency:{value:"EUR"},contents:{loop:["nested",{condition:function(e){return r(e)&&"product"===e.entity},map:{id:"data.id",quantity:{key:"data.quantity",value:1}}}]},content_type:{value:"product"},num_items:{fn:function(e){return e.nested.filter(function(e){return"product"===e.entity}).length}}}}},S={name:"AddToCart",data:{map:{value:"data.price",currency:{value:"EUR"},contents:{set:[{map:{id:"data.id",quantity:{key:"data.quantity",value:1}}}]},content_type:{value:"product"}}}},q={name:"InitiateCheckout",data:{map:{value:"data.value",currency:{value:"EUR"},contents:{loop:["nested",{condition:function(e){return r(e)&&"product"===e.entity},map:{id:"data.id",quantity:{key:"data.quantity",value:1}}}]},num_items:{fn:function(e){return e.nested.filter(function(e){return"product"===e.entity}).length}}}}},A={name:"ViewContent",data:{map:{value:"data.price",currency:{value:"EUR"},content_type:{value:"product"},contents:{set:[{map:{id:"data.id",quantity:{key:"data.quantity",value:1}}}]}}}},P={order:{complete:x},product:{view:A,add:S},cart:{view:q}},C={type:"meta-pixel",config:{},init:function(e){var t=e.config,r=e.env,n=t.settings,o=void 0===n?{}:n,i=t.loadScript,c=o.pixelId;return i&&function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"https://connect.facebook.net/en_US/fbevents.js",r=a(e).document,n=r.createElement("script");n.src=t,n.async=!0,r.head.appendChild(n)}(r),!!c&&(function(e){var t=a(e).window;if(!t.fbq){var r=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.callMethod?r.callMethod.apply(r,t):r.queue.push(t)};t.fbq=r,t._fbq||(t._fbq=r),r.push=r,r.loaded=!0,r.version="2.0",r.queue=[]}}(r),(0,a(r).window.fbq)("init",c),t)},push:function(e,t){t.config;var n=t.mapping,o=void 0===n?{}:n,i=t.data,c=t.env,u=o.settings||{},s=u.track,d=u.trackCustom,p=a(c).window.fbq;"page view"!==e.name||o.settings||(e.name="PageView");var l=s||d||e.name;p(d?"trackCustom":"track",String(l),r(i)?i:{},{eventID:e.id})}},E=C;return O=f,function(e,t,r,n){if(t&&"object"===(void 0===t?"undefined":_type_of(t))||"function"==typeof t){var o=!0,a=!1,i=void 0;try{for(var c,u=function(){var o=c.value;y.call(e,o)||o===r||d(e,o,{get:function(){return t[o]},enumerable:!(n=p(t,o))||n.enumerable})},s=l(t)[Symbol.iterator]();!(o=(c=s.next()).done);o=!0)u()}catch(e){a=!0,i=e}finally{try{o||null==s.return||s.return()}finally{if(a)throw i}}}return e}(d({},"__esModule",{value:!0}),O)}();
1
+ "use strict";function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _assert_this_initialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function asyncGeneratorStep(e,t,r,n,a,i,o){try{var s=e[i](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function o(e){asyncGeneratorStep(i,n,a,o,s,"next",e)}function s(e){asyncGeneratorStep(i,n,a,o,s,"throw",e)}o(void 0)})}}function _call_super(e,t,r){return t=_get_prototype_of(t),_possible_constructor_return(e,_is_native_reflect_construct()?Reflect.construct(t,r||[],_get_prototype_of(e).constructor):t.apply(e,r))}function _class_call_check(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _construct(e,t,r){return _construct=_is_native_reflect_construct()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var a=new(Function.bind.apply(e,n));return r&&_set_prototype_of(a,r.prototype),a},_construct.apply(null,arguments)}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _create_class(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _get_prototype_of(e){return _get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_get_prototype_of(e)}function _inherits(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}}),t&&_set_prototype_of(e,t)}function _instanceof(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _is_native_function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function _iterable_to_array(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,a=_object_without_properties_loose(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,a={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}function _possible_constructor_return(e,t){return!t||"object"!==_type_of(t)&&"function"!=typeof t?_assert_this_initialized(e):t}function _set_prototype_of(e,t){return _set_prototype_of=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_set_prototype_of(e,t)}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _type_of(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array(e,t):void 0}}function _wrap_native_super(e){var t="function"==typeof Map?new Map:void 0;return _wrap_native_super=function(e){if(null===e||!_is_native_function(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return _construct(e,arguments,_get_prototype_of(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_set_prototype_of(r,e)},_wrap_native_super(e)}function _is_native_reflect_construct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_is_native_reflect_construct=function(){return!!e})()}function _ts_generator(e,t){var r,n,a,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(a=2&s[0]?n.return:s[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,s[1])).done)return a;switch(n=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){i.label=s[1];break}if(6===s[0]&&i.label<a[1]){i.label=a[1],a=s;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(s);break}a[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}var Destination=function(){var e=function(e){ee=e},t=function(){return ee},r=function(e,r){var n=t(),a=te({issueData:r,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===X?void 0:X].filter(function(e){return!!e})});e.common.issues.push(a)},n=function(e){if(!e)return{};var t=e.errorMap,r=e.invalid_type_error,n=e.required_error,a=e.description;if(t&&(r||n))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:function(t,a){var i,o,s=e.message;return"invalid_enum_value"===t.code?{message:null!=s?s:a.defaultError}:void 0===a.data?{message:null!==(i=null!=s?s:n)&&void 0!==i?i:a.defaultError}:"invalid_type"!==t.code?{message:a.defaultError}:{message:null!==(o=null!=s?s:r)&&void 0!==o?o:a.defaultError}},description:a}},a=function(e){var t="[0-5]\\d";e.precision?t="".concat(t,"\\.\\d{").concat(e.precision,"}"):null==e.precision&&(t="".concat(t,"(\\.\\d+)?"));var r=e.precision?"+":"?";return"([01]\\d|2[0-3]):[0-5]\\d(:".concat(t,")").concat(r)},i=function(e){return new RegExp("^".concat(a(e),"$"))},o=function(e){var t="".concat(Pe,"T").concat(a(e)),r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t="".concat(t,"(").concat(r.join("|"),")"),new RegExp("^".concat(t,"$"))},s=function(e,t){return!("v4"!==t&&t||!we.test(e))||!("v6"!==t&&t||!Se.test(e))},u=function(e,t){if(!be.test(e))return!1;try{var r=_sliced_to_array(e.split("."),1)[0];if(!r)return!1;var n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),a=JSON.parse(atob(n));return"object"===(void 0===a?"undefined":_type_of(a))&&null!==a&&((!("typ"in a)||"JWT"===(null==a?void 0:a.typ))&&(!!a.alg&&(!t||a.alg===t)))}catch(e){return!1}},c=function(e,t){return!("v4"!==t&&t||!xe.test(e))||!("v6"!==t&&t||!Ae.test(e))},l=function(e,t){var r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,a=r>n?r:n;return Number.parseInt(e.toFixed(a).replace(".",""))%Number.parseInt(t.toFixed(a).replace(".",""))/Math.pow(10,a)},d=function(e,t){return new at(_object_spread({values:e,typeName:vt.ZodEnum},n(t)))},p=function(e,t){var r="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof r?{message:r}:r},f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;return e?De.create().superRefine(function(n,a){var i=e(n);if(_instanceof(i,Promise))return i.then(function(e){if(!e){var i,o,s=p(t,n),u=null===(o=null!==(i=s.fatal)&&void 0!==i?i:r)||void 0===o||o;a.addIssue(_object_spread_props(_object_spread({code:"custom"},s),{fatal:u}))}});if(!i){var o,s,u=p(t,n),c=null===(s=null!==(o=u.fatal)&&void 0!==o?o:r)||void 0===s||s;a.addIssue(_object_spread_props(_object_spread({code:"custom"},u),{fatal:c}))}}):De.create()},_=function(e,t,r,n){(null==n?void 0:n.errorMessages)&&r&&(e.errorMessage=_object_spread_props(_object_spread({},e.errorMessage),_define_property({},t,r)))},h=function(e,t,r,n,a){e[t]=r,_(e,t,n,a)},y=function(e){if("openAi"!==e.target)return{};var t=_to_consumable_array(e.basePath).concat([e.definitionPath,e.openAiAnyTypeName]);return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:"relative"===e.$refStrategy?cr(t,e.currentPath):t.join("/")}},v=function(e,t){return gr(e.type._def,t)},m=function(e,t){var r={type:"string"};if(e.checks){var n=!0,a=!1,i=void 0;try{for(var o,s=e.checks[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;switch(u.kind){case"min":h(r,"minLength","number"==typeof r.minLength?Math.max(r.minLength,u.value):u.value,u.message,t);break;case"max":h(r,"maxLength","number"==typeof r.maxLength?Math.min(r.maxLength,u.value):u.value,u.message,t);break;case"email":switch(t.emailStrategy){case"format:email":k(r,"email",u.message,t);break;case"format:idn-email":k(r,"idn-email",u.message,t);break;case"pattern:zod":j(r,_r.email,u.message,t)}break;case"url":k(r,"uri",u.message,t);break;case"uuid":k(r,"uuid",u.message,t);break;case"regex":j(r,u.regex,u.message,t);break;case"cuid":j(r,_r.cuid,u.message,t);break;case"cuid2":j(r,_r.cuid2,u.message,t);break;case"startsWith":j(r,RegExp("^".concat(g(u.value,t))),u.message,t);break;case"endsWith":j(r,RegExp("".concat(g(u.value,t),"$")),u.message,t);break;case"datetime":k(r,"date-time",u.message,t);break;case"date":k(r,"date",u.message,t);break;case"time":k(r,"time",u.message,t);break;case"duration":k(r,"duration",u.message,t);break;case"length":h(r,"minLength","number"==typeof r.minLength?Math.max(r.minLength,u.value):u.value,u.message,t),h(r,"maxLength","number"==typeof r.maxLength?Math.min(r.maxLength,u.value):u.value,u.message,t);break;case"includes":j(r,RegExp(g(u.value,t)),u.message,t);break;case"ip":"v6"!==u.version&&k(r,"ipv4",u.message,t),"v4"!==u.version&&k(r,"ipv6",u.message,t);break;case"base64url":j(r,_r.base64url,u.message,t);break;case"jwt":j(r,_r.jwt,u.message,t);break;case"cidr":"v6"!==u.version&&j(r,_r.ipv4Cidr,u.message,t),"v4"!==u.version&&j(r,_r.ipv6Cidr,u.message,t);break;case"emoji":j(r,_r.emoji(),u.message,t);break;case"ulid":j(r,_r.ulid,u.message,t);break;case"base64":switch(t.base64Strategy){case"format:binary":k(r,"binary",u.message,t);break;case"contentEncoding:base64":h(r,"contentEncoding","base64",u.message,t);break;case"pattern:zod":j(r,_r.base64,u.message,t)}break;case"nanoid":j(r,_r.nanoid,u.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:(function(){})()}}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}}return r},g=function(e,t){return"escape"===t.patternStrategy?b(e):e},b=function(e){for(var t="",r=0;r<e.length;r++)hr.has(e[r])||(t+="\\"),t+=e[r];return t},k=function(e,t,r,n){var a;e.format||(null===(a=e.anyOf)||void 0===a?void 0:a.some(function(e){return e.format}))?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push(_object_spread({format:e.format},e.errorMessage&&n.errorMessages&&{errorMessage:{format:e.errorMessage.format}})),delete e.format,e.errorMessage&&(delete e.errorMessage.format,0===Object.keys(e.errorMessage).length&&delete e.errorMessage)),e.anyOf.push(_object_spread({format:t},r&&n.errorMessages&&{errorMessage:{format:r}}))):h(e,"format",t,r,n)},j=function(e,t,r,n){var a;e.pattern||(null===(a=e.allOf)||void 0===a?void 0:a.some(function(e){return e.pattern}))?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push(_object_spread({pattern:e.pattern},e.errorMessage&&n.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}})),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,0===Object.keys(e.errorMessage).length&&delete e.errorMessage)),e.allOf.push(_object_spread({pattern:w(t,n)},r&&n.errorMessages&&{errorMessage:{pattern:r}}))):h(e,"pattern",w(t,n),r,n)},w=function(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;for(var r=e.flags.includes("i"),n=e.flags.includes("m"),a=e.flags.includes("s"),i=r?e.source.toLowerCase():e.source,o="",s=!1,u=!1,c=!1,l=0;l<i.length;l++)if(s)o+=i[l],s=!1;else{if(r)if(u){if(i[l].match(/[a-z]/)){var d;c?(o+=i[l],o+="".concat(i[l-2],"-").concat(i[l]).toUpperCase(),c=!1):"-"===i[l+1]&&(null===(d=i[l+2])||void 0===d?void 0:d.match(/[a-z]/))?(o+=i[l],c=!0):o+="".concat(i[l]).concat(i[l].toUpperCase());continue}}else if(i[l].match(/[a-z]/)){o+="[".concat(i[l]).concat(i[l].toUpperCase(),"]");continue}if(n){if("^"===i[l]){o+="(^|(?<=[\r\n]))";continue}if("$"===i[l]){o+="($|(?=[\r\n]))";continue}}a&&"."===i[l]?o+=u?"".concat(i[l],"\r\n"):"[".concat(i[l],"\r\n]"):(o+=i[l],"\\"===i[l]?s=!0:u&&"]"===i[l]?u=!1:u||"["!==i[l]||(u=!0))}try{new RegExp(o)}catch(r){return console.warn("Could not convert regex pattern at ".concat(t.currentPath.join("/")," to a flag-independent form! Falling back to the flag-ignorant source")),e.source}return o},x=function(e,t){var r,n,a,i,o,s,u;if("openAi"===t.target&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),"openApi3"===t.target&&(null===(r=e.keyType)||void 0===r?void 0:r._def.typeName)===vt.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce(function(r,n){var a;return _object_spread_props(_object_spread({},r),_define_property({},n,null!==(a=gr(e.valueType._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["properties",n])})))&&void 0!==a?a:y(t)))},{}),additionalProperties:t.rejectedAdditionalProperties};var c={type:"object",additionalProperties:null!==(u=gr(e.valueType._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["additionalProperties"])})))&&void 0!==u?u:t.allowedAdditionalProperties};if("openApi3"===t.target)return c;if((null===(n=e.keyType)||void 0===n?void 0:n._def.typeName)===vt.ZodString&&(null===(a=e.keyType._def.checks)||void 0===a?void 0:a.length)){var l=m(e.keyType._def,t),d=(l.type,_object_without_properties(l,["type"]));return _object_spread_props(_object_spread({},c),{propertyNames:d})}if((null===(i=e.keyType)||void 0===i?void 0:i._def.typeName)===vt.ZodEnum)return _object_spread_props(_object_spread({},c),{propertyNames:{enum:e.keyType._def.values}});if((null===(o=e.keyType)||void 0===o?void 0:o._def.typeName)===vt.ZodBranded&&e.keyType._def.type._def.typeName===vt.ZodString&&(null===(s=e.keyType._def.type._def.checks)||void 0===s?void 0:s.length)){var p=v(e.keyType._def,t),f=(p.type,_object_without_properties(p,["type"]));return _object_spread_props(_object_spread({},c),{propertyNames:f})}return c},S=function(e,t){if("ZodNever"!==e.catchall._def.typeName)return gr(e.catchall._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["additionalProperties"])}));switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return"strict"===t.removeAdditionalStrategy?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}},A=function(e){try{return e.isOptional()}catch(e){return!0}},Z=function(e,t){var r=[],n={},a=!0,i=!1,o=void 0;try{for(var s,u=Object.entries(e)[Symbol.iterator]();!(a=(s=u.next()).done);a=!0){var c=_sliced_to_array(s.value,2),l=c[0],d=c[1];d.required&&r.push(l);var p={type:d.type};if(d.description&&(p.description=d.description),d.pattern&&(p.pattern=d.pattern),void 0!==d.minLength&&(p.minLength=d.minLength),void 0!==d.maxLength&&(p.maxLength=d.maxLength),void 0!==d.minimum&&(p.minimum=d.minimum),void 0!==d.maximum&&(p.maximum=d.maximum),d.enum&&(p.enum=_to_consumable_array(d.enum)),void 0!==d.default&&(p.default=d.default),"object"===d.type&&d.properties){var f={},_=!0,h=!1,y=void 0;try{for(var v,m=Object.entries(d.properties)[Symbol.iterator]();!(_=(v=m.next()).done);_=!0){var g=_sliced_to_array(v.value,2),b=g[0],k=g[1];f[b]=Nr(k)}}catch(e){h=!0,y=e}finally{try{_||null==m.return||m.return()}finally{if(h)throw y}}p.properties=f}"array"===d.type&&d.items&&(p.items=Nr(d.items)),n[l]=p}}catch(e){i=!0,o=e}finally{try{a||null==u.return||u.return()}finally{if(i)throw o}}var j={type:"object",properties:n};return t&&(j.title=t),r.length>0&&(j.required=r),j},O=function(e){return"object"==(void 0===e?"undefined":_type_of(e))&&null!==e&&!function(e){return Array.isArray(e)}(e)&&"[object Object]"===Object.prototype.toString.call(e)},P=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.timestamp||(new Date).setHours(0,13,37,0),r=e.group||"gr0up",n=e.count||1,a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r=_object_spread({},Ir,r);var n=Object.entries(t).reduce(function(t,n){var a=_sliced_to_array(n,2),i=a[0],o=a[1],s=e[i];return r.merge&&Array.isArray(s)&&Array.isArray(o)?t[i]=o.reduce(function(e,t){return e.includes(t)?e:_to_consumable_array(e).concat([t])},_to_consumable_array(s)):(r.extend||i in e)&&(t[i]=o),t},{});return r.shallow?_object_spread({},e,n):(Object.assign(e,n),e)}({name:"entity action",data:{string:"foo",number:1,boolean:!0,array:[0,"text",!1],not:void 0},context:{dev:["test",1]},globals:{lang:"elb"},custom:{completely:"random"},user:{id:"us3r",device:"c00k13",session:"s3ss10n"},nested:[{entity:"child",data:{is:"subordinated"},nested:[],context:{element:["child",0]}}],consent:{functional:!0},id:"".concat(t,"-").concat(r,"-").concat(n),trigger:"test",entity:"entity",action:"action",timestamp:t,timing:3.14,group:r,count:n,version:{source:"0.2.1",tagging:1},source:{type:"web",id:"https://localhost:80",previous_id:"http://remotehost:9001"}},e,{merge:!1});if(e.name){var i,o=_sliced_to_array(null!==(i=e.name.split(" "))&&void 0!==i?i:[],2),s=o[0],u=o[1];s&&u&&(a.entity=s,a.action=u)}return a},T=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"entity action",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.timestamp||(new Date).setHours(0,13,37,0),n={data:{id:"ers",name:"Everyday Ruck Snack",color:"black",size:"l",price:420}},a={data:{id:"cc",name:"Cool Cap",size:"one size",price:42}};return P(_object_spread_props(_object_spread({},{"cart view":{data:{currency:"EUR",value:2*n.data.price},context:{shopping:["cart",0]},globals:{pagegroup:"shop"},nested:[{entity:"product",data:_object_spread_props(_object_spread({},n.data),{quantity:2}),context:{shopping:["cart",0]},nested:[]}],trigger:"load"},"checkout view":{data:{step:"payment",currency:"EUR",value:n.data.price+a.data.price},context:{shopping:["checkout",0]},globals:{pagegroup:"shop"},nested:[_object_spread_props(_object_spread({entity:"product"},n),{context:{shopping:["checkout",0]},nested:[]}),_object_spread_props(_object_spread({entity:"product"},a),{context:{shopping:["checkout",0]},nested:[]})],trigger:"load"},"order complete":{data:{id:"0rd3r1d",currency:"EUR",shipping:5.22,taxes:73.76,total:555},context:{shopping:["complete",0]},globals:{pagegroup:"shop"},nested:[_object_spread_props(_object_spread({entity:"product"},n),{context:{shopping:["complete",0]},nested:[]}),_object_spread_props(_object_spread({entity:"product"},a),{context:{shopping:["complete",0]},nested:[]}),{entity:"gift",data:{name:"Surprise"},context:{shopping:["complete",0]},nested:[]}],trigger:"load"},"page view":{data:{domain:"www.example.com",title:"walkerOS documentation",referrer:"https://www.elbwalker.com/",search:"?foo=bar",hash:"#hash",id:"/docs/"},globals:{pagegroup:"docs"},trigger:"load"},"product add":_object_spread_props(_object_spread({},n),{context:{shopping:["intent",0]},globals:{pagegroup:"shop"},nested:[],trigger:"click"}),"product view":_object_spread_props(_object_spread({},n),{context:{shopping:["detail",0]},globals:{pagegroup:"shop"},nested:[],trigger:"load"}),"product visible":{data:_object_spread_props(_object_spread({},n.data),{position:3,promo:!0}),context:{shopping:["discover",0]},globals:{pagegroup:"shop"},nested:[],trigger:"load"},"promotion visible":{data:{name:"Setting up tracking easily",position:"hero"},context:{ab_test:["engagement",0]},globals:{pagegroup:"homepage"},trigger:"visible"},"session start":{data:{id:"s3ss10n",start:r,isNew:!0,count:1,runs:1,isStart:!0,storage:!0,referrer:"",device:"c00k13"},user:{id:"us3r",device:"c00k13",session:"s3ss10n",hash:"h4sh",address:"street number",email:"user@example.com",phone:"+49 123 456 789",userAgent:"Mozilla...",browser:"Chrome",browserVersion:"90",deviceType:"desktop",language:"de-DE",country:"DE",region:"HH",city:"Hamburg",zip:"20354",timezone:"Berlin",os:"walkerOS",osVersion:"1.0",screenSize:"1337x420",ip:"127.0.0.0",internal:!0,custom:"value"}}}[e],t),{name:e}))},C=function(e){return _object_spread({window:"undefined"!=typeof window?window:globalThis.window,document:"undefined"!=typeof document?document:globalThis.document},e)},N=function(){var e=T("order complete");return["track","Purchase",{value:e.data.total,currency:"EUR",contents:e.nested.filter(function(e){return"product"===e.entity}).map(function(e){return{id:e.data.id,quantity:1}}),content_type:"product",num_items:2},{eventID:e.id}]},I=function(){var e=T("product add");return["track","AddToCart",{currency:"EUR",value:e.data.price,contents:[{id:e.data.id,quantity:1}],content_type:"product"},{eventID:e.id}]},E=function(){var e=T("cart view");return["track","InitiateCheckout",{currency:"EUR",value:e.data.value,contents:e.nested.filter(function(e){return"product"===e.entity}).map(function(e){return{id:e.data.id,quantity:e.data.quantity}}),num_items:e.nested.filter(function(e){return"product"===e.entity}).length},{eventID:e.id}]},M=function(){var e=T("product view");return["track","ViewContent",{currency:"EUR",value:e.data.price,contents:[{id:e.data.id,quantity:1}],content_type:"product"},{eventID:e.id}]},R=Object.defineProperty,L=Object.getOwnPropertyDescriptor,F=Object.getOwnPropertyNames,D=Object.prototype.hasOwnProperty,z=function(e,t){for(var r in t)R(e,r,{get:t[r],enumerable:!0})},U={};z(U,{DestinationMeta:function(){return Er},default:function(){return sn},destinationMeta:function(){return on},examples:function(){return Mr},mappingSchemaGenerated:function(){return rn},mappingUiSchemaGenerated:function(){return an},schema:function(){return Wr},settingsSchemaGenerated:function(){return tn},settingsUiSchemaGenerated:function(){return nn}});var $,V,q,B={};z(B,{BRAND:function(){return ft},DIRTY:function(){return ie},EMPTY_PATH:function(){return re},INVALID:function(){return ae},NEVER:function(){return ir},OK:function(){return oe},ParseStatus:function(){return ne},Schema:function(){return _e},ZodAny:function(){return De},ZodArray:function(){return Ve},ZodBigInt:function(){return Ie},ZodBoolean:function(){return Ee},ZodBranded:function(){return _t},ZodCatch:function(){return dt},ZodDate:function(){return Me},ZodDefault:function(){return lt},ZodDiscriminatedUnion:function(){return He},ZodEffects:function(){return st},ZodEnum:function(){return at},ZodError:function(){return J},ZodFirstPartyTypeKind:function(){return vt},ZodFunction:function(){return tt},ZodIntersection:function(){return Je},ZodIssueCode:function(){return H},ZodLazy:function(){return rt},ZodLiteral:function(){return nt},ZodMap:function(){return Xe},ZodNaN:function(){return pt},ZodNativeEnum:function(){return it},ZodNever:function(){return Ue},ZodNull:function(){return Fe},ZodNullable:function(){return ct},ZodNumber:function(){return Ne},ZodObject:function(){return Be},ZodOptional:function(){return ut},ZodParsedType:function(){return K},ZodPipeline:function(){return ht},ZodPromise:function(){return ot},ZodReadonly:function(){return yt},ZodRecord:function(){return Qe},ZodSchema:function(){return _e},ZodSet:function(){return et},ZodString:function(){return Ce},ZodSymbol:function(){return Re},ZodTransformer:function(){return st},ZodTuple:function(){return Ye},ZodType:function(){return _e},ZodUndefined:function(){return Le},ZodUnion:function(){return Ke},ZodUnknown:function(){return ze},ZodVoid:function(){return $e},addIssueToContext:function(){return r},any:function(){return Tt},array:function(){return Et},bigint:function(){return xt},boolean:function(){return St},coerce:function(){return ar},custom:function(){return f},date:function(){return At},datetimeRegex:function(){return o},defaultErrorMap:function(){return X},discriminatedUnion:function(){return Ft},effect:function(){return Jt},enum:function(){return Wt},function:function(){return qt},getErrorMap:function(){return t},getParsedType:function(){return W},instanceof:function(){return bt},intersection:function(){return Dt},isAborted:function(){return se},isAsync:function(){return le},isDirty:function(){return ue},isValid:function(){return ce},late:function(){return gt},lazy:function(){return Bt},literal:function(){return Kt},makeIssue:function(){return te},map:function(){return $t},nan:function(){return wt},nativeEnum:function(){return Ht},never:function(){return Nt},null:function(){return Pt},nullable:function(){return Qt},number:function(){return jt},object:function(){return Mt},objectUtil:function(){return q},oboolean:function(){return nr},onumber:function(){return rr},optional:function(){return Yt},ostring:function(){return tr},pipeline:function(){return er},preprocess:function(){return Xt},promise:function(){return Gt},quotelessJson:function(){return G},record:function(){return Ut},set:function(){return Vt},setErrorMap:function(){return e},strictObject:function(){return Rt},string:function(){return kt},symbol:function(){return Zt},transformer:function(){return Jt},tuple:function(){return zt},undefined:function(){return Ot},union:function(){return Lt},unknown:function(){return Ct},util:function(){return $},void:function(){return It}}),(V=$||($={})).assertEqual=function(e){},V.assertIs=function(e){},V.assertNever=function(e){throw new Error},V.arrayToEnum=function(e){var t={},r=!0,n=!1,a=void 0;try{for(var i,o=e[Symbol.iterator]();!(r=(i=o.next()).done);r=!0){var s=i.value;t[s]=s}}catch(e){n=!0,a=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw a}}return t},V.getValidEnumValues=function(e){var t=V.objectKeys(e).filter(function(t){return"number"!=typeof e[e[t]]}),r={},n=!0,a=!1,i=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;r[u]=e[u]}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return V.objectValues(r)},V.objectValues=function(e){return V.objectKeys(e).map(function(t){return e[t]})},V.objectKeys="function"==typeof Object.keys?function(e){return Object.keys(e)}:function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},V.find=function(e,t){var r=!0,n=!1,a=void 0;try{for(var i,o=e[Symbol.iterator]();!(r=(i=o.next()).done);r=!0){var s=i.value;if(t(s))return s}}catch(e){n=!0,a=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw a}}},V.isInteger="function"==typeof Number.isInteger?function(e){return Number.isInteger(e)}:function(e){return"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e},V.joinValues=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" | ";return e.map(function(e){return"string"==typeof e?"'".concat(e,"'"):e}).join(t)},V.jsonStringifyReplacer=function(e,t){return"bigint"===(void 0===t?"undefined":_type_of(t))?t.toString():t},(q||(q={})).mergeShapes=function(e,t){return _object_spread({},e,t)};var K=$.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),W=function(e){switch(void 0===e?"undefined":_type_of(e)){case"undefined":return K.undefined;case"string":return K.string;case"number":return Number.isNaN(e)?K.nan:K.number;case"boolean":return K.boolean;case"function":return K.function;case"bigint":return K.bigint;case"symbol":return K.symbol;case"object":return Array.isArray(e)?K.array:null===e?K.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?K.promise:"undefined"!=typeof Map&&_instanceof(e,Map)?K.map:"undefined"!=typeof Set&&_instanceof(e,Set)?K.set:"undefined"!=typeof Date&&_instanceof(e,Date)?K.date:K.object;default:return K.unknown}},H=$.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"]),G=function(e){return JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:")},J=function(e){function t(e){var r;_class_call_check(this,t),(r=_call_super(this,t)).issues=[],r.addIssue=function(e){r.issues=_to_consumable_array(r.issues).concat([e])},r.addIssues=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];r.issues=_to_consumable_array(r.issues).concat(_to_consumable_array(e))};var n=(_instanceof(this,t)?this.constructor:void 0).prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,n):r.__proto__=n,r.name="ZodError",r.issues=e,r}return _inherits(t,e),_create_class(t,[{key:"errors",get:function(){return this.issues}},{key:"format",value:function(e){var t=e||function(e){return e.message},r={_errors:[]},n=function(e){var a=!0,i=!1,o=void 0;try{for(var s,u=e.issues[Symbol.iterator]();!(a=(s=u.next()).done);a=!0){var c=s.value;if("invalid_union"===c.code)c.unionErrors.map(n);else if("invalid_return_type"===c.code)n(c.returnTypeError);else if("invalid_arguments"===c.code)n(c.argumentsError);else if(0===c.path.length)r._errors.push(t(c));else for(var l=r,d=0;d<c.path.length;){var p=c.path[d];d===c.path.length-1?(l[p]=l[p]||{_errors:[]},l[p]._errors.push(t(c))):l[p]=l[p]||{_errors:[]},l=l[p],d++}}}catch(e){i=!0,o=e}finally{try{a||null==u.return||u.return()}finally{if(i)throw o}}};return n(this),r}},{key:"toString",value:function(){return this.message}},{key:"message",get:function(){return JSON.stringify(this.issues,$.jsonStringifyReplacer,2)}},{key:"isEmpty",get:function(){return 0===this.issues.length}},{key:"flatten",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e.message},t={},r=[],n=!0,a=!1,i=void 0;try{for(var o,s=this.issues[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;if(u.path.length>0){var c=u.path[0];t[c]=t[c]||[],t[c].push(e(u))}else r.push(e(u))}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return{formErrors:r,fieldErrors:t}}},{key:"formErrors",get:function(){return this.flatten()}}],[{key:"assert",value:function(e){if(!_instanceof(e,t))throw new Error("Not a ZodError: ".concat(e))}}]),t}(_wrap_native_super(Error));J.create=function(e){return new J(e)};var Y,Q,X=function(e,t){var r;switch(e.code){case H.invalid_type:r=e.received===K.undefined?"Required":"Expected ".concat(e.expected,", received ").concat(e.received);break;case H.invalid_literal:r="Invalid literal value, expected ".concat(JSON.stringify(e.expected,$.jsonStringifyReplacer));break;case H.unrecognized_keys:r="Unrecognized key(s) in object: ".concat($.joinValues(e.keys,", "));break;case H.invalid_union:r="Invalid input";break;case H.invalid_union_discriminator:r="Invalid discriminator value. Expected ".concat($.joinValues(e.options));break;case H.invalid_enum_value:r="Invalid enum value. Expected ".concat($.joinValues(e.options),", received '").concat(e.received,"'");break;case H.invalid_arguments:r="Invalid function arguments";break;case H.invalid_return_type:r="Invalid function return type";break;case H.invalid_date:r="Invalid date";break;case H.invalid_string:"object"===_type_of(e.validation)?"includes"in e.validation?(r='Invalid input: must include "'.concat(e.validation.includes,'"'),"number"==typeof e.validation.position&&(r="".concat(r," at one or more positions greater than or equal to ").concat(e.validation.position))):"startsWith"in e.validation?r='Invalid input: must start with "'.concat(e.validation.startsWith,'"'):"endsWith"in e.validation?r='Invalid input: must end with "'.concat(e.validation.endsWith,'"'):$.assertNever(e.validation):r="regex"!==e.validation?"Invalid ".concat(e.validation):"Invalid";break;case H.too_small:r="array"===e.type?"Array must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"more than"," ").concat(e.minimum," element(s)"):"string"===e.type?"String must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"over"," ").concat(e.minimum," character(s)"):"number"===e.type||"bigint"===e.type?"Number must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(e.minimum):"date"===e.type?"Date must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(new Date(Number(e.minimum))):"Invalid input";break;case H.too_big:r="array"===e.type?"Array must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"less than"," ").concat(e.maximum," element(s)"):"string"===e.type?"String must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"under"," ").concat(e.maximum," character(s)"):"number"===e.type?"Number must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum):"bigint"===e.type?"BigInt must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum):"date"===e.type?"Date must be ".concat(e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"," ").concat(new Date(Number(e.maximum))):"Invalid input";break;case H.custom:r="Invalid input";break;case H.invalid_intersection_types:r="Intersection results could not be merged";break;case H.not_multiple_of:r="Number must be a multiple of ".concat(e.multipleOf);break;case H.not_finite:r="Number must be finite";break;default:r=t.defaultError,$.assertNever(e)}return{message:r}},ee=X,te=function(e){var t=e.data,r=e.path,n=e.errorMaps,a=e.issueData,i=_to_consumable_array(r).concat(_to_consumable_array(a.path||[])),o=_object_spread_props(_object_spread({},a),{path:i});if(void 0!==a.message)return _object_spread_props(_object_spread({},a),{path:i,message:a.message});var s="",u=n.filter(function(e){return!!e}).slice().reverse(),c=!0,l=!1,d=void 0;try{for(var p,f=u[Symbol.iterator]();!(c=(p=f.next()).done);c=!0){s=(0,p.value)(o,{data:t,defaultError:s}).message}}catch(e){l=!0,d=e}finally{try{c||null==f.return||f.return()}finally{if(l)throw d}}return _object_spread_props(_object_spread({},a),{path:i,message:s})},re=[],ne=function(){function e(){_class_call_check(this,e),this.value="valid"}return _create_class(e,[{key:"dirty",value:function(){"valid"===this.value&&(this.value="dirty")}},{key:"abort",value:function(){"aborted"!==this.value&&(this.value="aborted")}}],[{key:"mergeArray",value:function(e,t){var r=[],n=!0,a=!1,i=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;if("aborted"===u.status)return ae;"dirty"===u.status&&e.dirty(),r.push(u.value)}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return{status:e.value,value:r}}},{key:"mergeObjectAsync",value:function(t,r){return _async_to_generator(function(){var n,a,i,o,s,u,c,l,d,p;return _ts_generator(this,function(f){switch(f.label){case 0:n=[],a=!0,i=!1,o=void 0,f.label=1;case 1:f.trys.push([1,7,8,9]),s=r[Symbol.iterator](),f.label=2;case 2:return(a=(u=s.next()).done)?[3,6]:[4,(c=u.value).key];case 3:return l=f.sent(),[4,c.value];case 4:d=f.sent(),n.push({key:l,value:d}),f.label=5;case 5:return a=!0,[3,2];case 6:return[3,9];case 7:return p=f.sent(),i=!0,o=p,[3,9];case 8:try{a||null==s.return||s.return()}finally{if(i)throw o}return[7];case 9:return[2,e.mergeObjectSync(t,n)]}})})()}},{key:"mergeObjectSync",value:function(e,t){var r={},n=!0,a=!1,i=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value,c=u.key,l=u.value;if("aborted"===c.status)return ae;if("aborted"===l.status)return ae;"dirty"===c.status&&e.dirty(),"dirty"===l.status&&e.dirty(),"__proto__"===c.value||void 0===l.value&&!u.alwaysSet||(r[c.value]=l.value)}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return{status:e.value,value:r}}}]),e}(),ae=Object.freeze({status:"aborted"}),ie=function(e){return{status:"dirty",value:e}},oe=function(e){return{status:"valid",value:e}},se=function(e){return"aborted"===e.status},ue=function(e){return"dirty"===e.status},ce=function(e){return"valid"===e.status},le=function(e){return"undefined"!=typeof Promise&&_instanceof(e,Promise)};(Q=Y||(Y={})).errToObj=function(e){return"string"==typeof e?{message:e}:e||{}},Q.toString=function(e){return"string"==typeof e?e:null==e?void 0:e.message};var de,pe=function(){function e(t,r,n,a){_class_call_check(this,e),this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=a}return _create_class(e,[{key:"path",get:function(){var e,t;this._cachedPath.length||(Array.isArray(this._key)?(e=this._cachedPath).push.apply(e,_to_consumable_array(this._path).concat(_to_consumable_array(this._key))):(t=this._cachedPath).push.apply(t,_to_consumable_array(this._path).concat([this._key])));return this._cachedPath}}]),e}(),fe=function(e,t){if(ce(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;var t=new J(e.common.issues);return this._error=t,this._error}}},_e=function(){function e(t){var r=this;_class_call_check(this,e),this.spa=this.safeParseAsync,this._def=t,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:function(e){return r["~validate"](e)}}}return _create_class(e,[{key:"description",get:function(){return this._def.description}},{key:"_getType",value:function(e){return W(e.data)}},{key:"_getOrReturnCtx",value:function(e,t){return t||{common:e.parent.common,data:e.data,parsedType:W(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}},{key:"_processInputParams",value:function(e){return{status:new ne,ctx:{common:e.parent.common,data:e.data,parsedType:W(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}},{key:"_parseSync",value:function(e){var t=this._parse(e);if(le(t))throw new Error("Synchronous parse encountered promise.");return t}},{key:"_parseAsync",value:function(e){var t=this._parse(e);return Promise.resolve(t)}},{key:"parse",value:function(e,t){var r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}},{key:"safeParse",value:function(e,t){var r,n={common:{issues:[],async:null!==(r=null==t?void 0:t.async)&&void 0!==r&&r,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:W(e)},a=this._parseSync({data:e,path:n.path,parent:n});return fe(n,a)}},{key:"~validate",value:function(e){var t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:W(e)};if(!this["~standard"].async)try{var r=this._parseSync({data:e,path:[],parent:t});return ce(r)?{value:r.value}:{issues:t.common.issues}}catch(e){var n,a;(null==e||null===(a=e.message)||void 0===a||null===(n=a.toLowerCase())||void 0===n?void 0:n.includes("encountered"))&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(function(e){return ce(e)?{value:e.value}:{issues:t.common.issues}})}},{key:"parseAsync",value:function(e,t){return _async_to_generator(function(){var r;return _ts_generator(this,function(n){switch(n.label){case 0:return[4,this.safeParseAsync(e,t)];case 1:if((r=n.sent()).success)return[2,r.data];throw r.error}})}).call(this)}},{key:"safeParseAsync",value:function(e,t){return _async_to_generator(function(){var r,n,a;return _ts_generator(this,function(i){switch(i.label){case 0:return r={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:W(e)},n=this._parse({data:e,path:r.path,parent:r}),[4,le(n)?n:Promise.resolve(n)];case 1:return a=i.sent(),[2,fe(r,a)]}})}).call(this)}},{key:"refine",value:function(e,t){return this._refinement(function(r,n){var a=e(r),i=function(){return n.addIssue(_object_spread({code:H.custom},function(e){return"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t}(r)))};return"undefined"!=typeof Promise&&_instanceof(a,Promise)?a.then(function(e){return!!e||(i(),!1)}):!!a||(i(),!1)})}},{key:"refinement",value:function(e,t){return this._refinement(function(r,n){return!!e(r)||(n.addIssue("function"==typeof t?t(r,n):t),!1)})}},{key:"_refinement",value:function(e){return new st({schema:this,typeName:vt.ZodEffects,effect:{type:"refinement",refinement:e}})}},{key:"superRefine",value:function(e){return this._refinement(e)}},{key:"optional",value:function(){return ut.create(this,this._def)}},{key:"nullable",value:function(){return ct.create(this,this._def)}},{key:"nullish",value:function(){return this.nullable().optional()}},{key:"array",value:function(){return Ve.create(this)}},{key:"promise",value:function(){return ot.create(this,this._def)}},{key:"or",value:function(e){return Ke.create([this,e],this._def)}},{key:"and",value:function(e){return Je.create(this,e,this._def)}},{key:"transform",value:function(e){return new st(_object_spread_props(_object_spread({},n(this._def)),{schema:this,typeName:vt.ZodEffects,effect:{type:"transform",transform:e}}))}},{key:"default",value:function(e){var t="function"==typeof e?e:function(){return e};return new lt(_object_spread_props(_object_spread({},n(this._def)),{innerType:this,defaultValue:t,typeName:vt.ZodDefault}))}},{key:"brand",value:function(){return new _t(_object_spread({typeName:vt.ZodBranded,type:this},n(this._def)))}},{key:"catch",value:function(e){var t="function"==typeof e?e:function(){return e};return new dt(_object_spread_props(_object_spread({},n(this._def)),{innerType:this,catchValue:t,typeName:vt.ZodCatch}))}},{key:"describe",value:function(e){return new(0,this.constructor)(_object_spread_props(_object_spread({},this._def),{description:e}))}},{key:"pipe",value:function(e){return ht.create(this,e)}},{key:"readonly",value:function(){return yt.create(this)}},{key:"isOptional",value:function(){return this.safeParse(void 0).success}},{key:"isNullable",value:function(){return this.safeParse(null).success}}]),e}(),he=/^c[^\s-]{8,}$/i,ye=/^[0-9a-z]+$/,ve=/^[0-9A-HJKMNP-TV-Z]{26}$/i,me=/^[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,ge=/^[a-z0-9_-]{21}$/i,be=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ke=/^[-+]?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)?)??$/,je=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,we=/^(?:(?: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])$/,xe=/^(?:(?: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])$/,Se=/^(([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]))$/,Ae=/^(([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])$/,Ze=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Oe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Pe="((\\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])))",Te=new RegExp("^".concat(Pe,"$")),Ce=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==K.string){var t=this._getOrReturnCtx(e);return r(t,{code:H.invalid_type,expected:K.string,received:t.parsedType}),ae}var n=new ne,a=void 0,l=!0,d=!1,p=void 0;try{for(var f,_=this._def.checks[Symbol.iterator]();!(l=(f=_.next()).done);l=!0){var h=f.value;if("min"===h.kind)e.data.length<h.value&&(a=this._getOrReturnCtx(e,a),r(a,{code:H.too_small,minimum:h.value,type:"string",inclusive:!0,exact:!1,message:h.message}),n.dirty());else if("max"===h.kind)e.data.length>h.value&&(a=this._getOrReturnCtx(e,a),r(a,{code:H.too_big,maximum:h.value,type:"string",inclusive:!0,exact:!1,message:h.message}),n.dirty());else if("length"===h.kind){var y=e.data.length>h.value,v=e.data.length<h.value;(y||v)&&(a=this._getOrReturnCtx(e,a),y?r(a,{code:H.too_big,maximum:h.value,type:"string",inclusive:!0,exact:!0,message:h.message}):v&&r(a,{code:H.too_small,minimum:h.value,type:"string",inclusive:!0,exact:!0,message:h.message}),n.dirty())}else if("email"===h.kind)je.test(e.data)||(a=this._getOrReturnCtx(e,a),r(a,{validation:"email",code:H.invalid_string,message:h.message}),n.dirty());else if("emoji"===h.kind)de||(de=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),de.test(e.data)||(a=this._getOrReturnCtx(e,a),r(a,{validation:"emoji",code:H.invalid_string,message:h.message}),n.dirty());else if("uuid"===h.kind)me.test(e.data)||(a=this._getOrReturnCtx(e,a),r(a,{validation:"uuid",code:H.invalid_string,message:h.message}),n.dirty());else if("nanoid"===h.kind)ge.test(e.data)||(a=this._getOrReturnCtx(e,a),r(a,{validation:"nanoid",code:H.invalid_string,message:h.message}),n.dirty());else if("cuid"===h.kind)he.test(e.data)||(a=this._getOrReturnCtx(e,a),r(a,{validation:"cuid",code:H.invalid_string,message:h.message}),n.dirty());else if("cuid2"===h.kind)ye.test(e.data)||(a=this._getOrReturnCtx(e,a),r(a,{validation:"cuid2",code:H.invalid_string,message:h.message}),n.dirty());else if("ulid"===h.kind)ve.test(e.data)||(a=this._getOrReturnCtx(e,a),r(a,{validation:"ulid",code:H.invalid_string,message:h.message}),n.dirty());else if("url"===h.kind)try{new URL(e.data)}catch(t){a=this._getOrReturnCtx(e,a),r(a,{validation:"url",code:H.invalid_string,message:h.message}),n.dirty()}else if("regex"===h.kind){h.regex.lastIndex=0,h.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),r(a,{validation:"regex",code:H.invalid_string,message:h.message}),n.dirty())}else if("trim"===h.kind)e.data=e.data.trim();else if("includes"===h.kind)e.data.includes(h.value,h.position)||(a=this._getOrReturnCtx(e,a),r(a,{code:H.invalid_string,validation:{includes:h.value,position:h.position},message:h.message}),n.dirty());else if("toLowerCase"===h.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===h.kind)e.data=e.data.toUpperCase();else if("startsWith"===h.kind)e.data.startsWith(h.value)||(a=this._getOrReturnCtx(e,a),r(a,{code:H.invalid_string,validation:{startsWith:h.value},message:h.message}),n.dirty());else if("endsWith"===h.kind)e.data.endsWith(h.value)||(a=this._getOrReturnCtx(e,a),r(a,{code:H.invalid_string,validation:{endsWith:h.value},message:h.message}),n.dirty());else if("datetime"===h.kind){o(h).test(e.data)||(a=this._getOrReturnCtx(e,a),r(a,{code:H.invalid_string,validation:"datetime",message:h.message}),n.dirty())}else if("date"===h.kind){Te.test(e.data)||(a=this._getOrReturnCtx(e,a),r(a,{code:H.invalid_string,validation:"date",message:h.message}),n.dirty())}else if("time"===h.kind){i(h).test(e.data)||(a=this._getOrReturnCtx(e,a),r(a,{code:H.invalid_string,validation:"time",message:h.message}),n.dirty())}else"duration"===h.kind?ke.test(e.data)||(a=this._getOrReturnCtx(e,a),r(a,{validation:"duration",code:H.invalid_string,message:h.message}),n.dirty()):"ip"===h.kind?s(e.data,h.version)||(a=this._getOrReturnCtx(e,a),r(a,{validation:"ip",code:H.invalid_string,message:h.message}),n.dirty()):"jwt"===h.kind?u(e.data,h.alg)||(a=this._getOrReturnCtx(e,a),r(a,{validation:"jwt",code:H.invalid_string,message:h.message}),n.dirty()):"cidr"===h.kind?c(e.data,h.version)||(a=this._getOrReturnCtx(e,a),r(a,{validation:"cidr",code:H.invalid_string,message:h.message}),n.dirty()):"base64"===h.kind?Ze.test(e.data)||(a=this._getOrReturnCtx(e,a),r(a,{validation:"base64",code:H.invalid_string,message:h.message}),n.dirty()):"base64url"===h.kind?Oe.test(e.data)||(a=this._getOrReturnCtx(e,a),r(a,{validation:"base64url",code:H.invalid_string,message:h.message}),n.dirty()):$.assertNever(h)}}catch(e){d=!0,p=e}finally{try{l||null==_.return||_.return()}finally{if(d)throw p}}return{status:n.value,value:e.data}}},{key:"_regex",value:function(e,t,r){return this.refinement(function(t){return e.test(t)},_object_spread({validation:t,code:H.invalid_string},Y.errToObj(r)))}},{key:"_addCheck",value:function(e){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([e])}))}},{key:"email",value:function(e){return this._addCheck(_object_spread({kind:"email"},Y.errToObj(e)))}},{key:"url",value:function(e){return this._addCheck(_object_spread({kind:"url"},Y.errToObj(e)))}},{key:"emoji",value:function(e){return this._addCheck(_object_spread({kind:"emoji"},Y.errToObj(e)))}},{key:"uuid",value:function(e){return this._addCheck(_object_spread({kind:"uuid"},Y.errToObj(e)))}},{key:"nanoid",value:function(e){return this._addCheck(_object_spread({kind:"nanoid"},Y.errToObj(e)))}},{key:"cuid",value:function(e){return this._addCheck(_object_spread({kind:"cuid"},Y.errToObj(e)))}},{key:"cuid2",value:function(e){return this._addCheck(_object_spread({kind:"cuid2"},Y.errToObj(e)))}},{key:"ulid",value:function(e){return this._addCheck(_object_spread({kind:"ulid"},Y.errToObj(e)))}},{key:"base64",value:function(e){return this._addCheck(_object_spread({kind:"base64"},Y.errToObj(e)))}},{key:"base64url",value:function(e){return this._addCheck(_object_spread({kind:"base64url"},Y.errToObj(e)))}},{key:"jwt",value:function(e){return this._addCheck(_object_spread({kind:"jwt"},Y.errToObj(e)))}},{key:"ip",value:function(e){return this._addCheck(_object_spread({kind:"ip"},Y.errToObj(e)))}},{key:"cidr",value:function(e){return this._addCheck(_object_spread({kind:"cidr"},Y.errToObj(e)))}},{key:"datetime",value:function(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck(_object_spread({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!==(r=null==e?void 0:e.local)&&void 0!==r&&r},Y.errToObj(null==e?void 0:e.message)));var t,r}},{key:"date",value:function(e){return this._addCheck({kind:"date",message:e})}},{key:"time",value:function(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck(_object_spread({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision},Y.errToObj(null==e?void 0:e.message)))}},{key:"duration",value:function(e){return this._addCheck(_object_spread({kind:"duration"},Y.errToObj(e)))}},{key:"regex",value:function(e,t){return this._addCheck(_object_spread({kind:"regex",regex:e},Y.errToObj(t)))}},{key:"includes",value:function(e,t){return this._addCheck(_object_spread({kind:"includes",value:e,position:null==t?void 0:t.position},Y.errToObj(null==t?void 0:t.message)))}},{key:"startsWith",value:function(e,t){return this._addCheck(_object_spread({kind:"startsWith",value:e},Y.errToObj(t)))}},{key:"endsWith",value:function(e,t){return this._addCheck(_object_spread({kind:"endsWith",value:e},Y.errToObj(t)))}},{key:"min",value:function(e,t){return this._addCheck(_object_spread({kind:"min",value:e},Y.errToObj(t)))}},{key:"max",value:function(e,t){return this._addCheck(_object_spread({kind:"max",value:e},Y.errToObj(t)))}},{key:"length",value:function(e,t){return this._addCheck(_object_spread({kind:"length",value:e},Y.errToObj(t)))}},{key:"nonempty",value:function(e){return this.min(1,Y.errToObj(e))}},{key:"trim",value:function(){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([{kind:"trim"}])}))}},{key:"toLowerCase",value:function(){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([{kind:"toLowerCase"}])}))}},{key:"toUpperCase",value:function(){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([{kind:"toUpperCase"}])}))}},{key:"isDatetime",get:function(){return!!this._def.checks.find(function(e){return"datetime"===e.kind})}},{key:"isDate",get:function(){return!!this._def.checks.find(function(e){return"date"===e.kind})}},{key:"isTime",get:function(){return!!this._def.checks.find(function(e){return"time"===e.kind})}},{key:"isDuration",get:function(){return!!this._def.checks.find(function(e){return"duration"===e.kind})}},{key:"isEmail",get:function(){return!!this._def.checks.find(function(e){return"email"===e.kind})}},{key:"isURL",get:function(){return!!this._def.checks.find(function(e){return"url"===e.kind})}},{key:"isEmoji",get:function(){return!!this._def.checks.find(function(e){return"emoji"===e.kind})}},{key:"isUUID",get:function(){return!!this._def.checks.find(function(e){return"uuid"===e.kind})}},{key:"isNANOID",get:function(){return!!this._def.checks.find(function(e){return"nanoid"===e.kind})}},{key:"isCUID",get:function(){return!!this._def.checks.find(function(e){return"cuid"===e.kind})}},{key:"isCUID2",get:function(){return!!this._def.checks.find(function(e){return"cuid2"===e.kind})}},{key:"isULID",get:function(){return!!this._def.checks.find(function(e){return"ulid"===e.kind})}},{key:"isIP",get:function(){return!!this._def.checks.find(function(e){return"ip"===e.kind})}},{key:"isCIDR",get:function(){return!!this._def.checks.find(function(e){return"cidr"===e.kind})}},{key:"isBase64",get:function(){return!!this._def.checks.find(function(e){return"base64"===e.kind})}},{key:"isBase64url",get:function(){return!!this._def.checks.find(function(e){return"base64url"===e.kind})}},{key:"minLength",get:function(){var e=null,t=!0,r=!1,n=void 0;try{for(var a,i=this._def.checks[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;"min"===o.kind&&(null===e||o.value>e)&&(e=o.value)}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}},{key:"maxLength",get:function(){var e=null,t=!0,r=!1,n=void 0;try{for(var a,i=this._def.checks[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;"max"===o.kind&&(null===e||o.value<e)&&(e=o.value)}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}}]),t}(_e);Ce.create=function(e){var t;return new Ce(_object_spread({checks:[],typeName:vt.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t},n(e)))};var Ne=function(e){function t(){var e;return _class_call_check(this,t),(e=_call_super(this,t,arguments)).min=e.gte,e.max=e.lte,e.step=e.multipleOf,e}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==K.number){var t=this._getOrReturnCtx(e);return r(t,{code:H.invalid_type,expected:K.number,received:t.parsedType}),ae}var n=void 0,a=new ne,i=!0,o=!1,s=void 0;try{for(var u,c=this._def.checks[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var d=u.value;if("int"===d.kind)$.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),r(n,{code:H.invalid_type,expected:"integer",received:"float",message:d.message}),a.dirty());else if("min"===d.kind){(d.inclusive?e.data<d.value:e.data<=d.value)&&(n=this._getOrReturnCtx(e,n),r(n,{code:H.too_small,minimum:d.value,type:"number",inclusive:d.inclusive,exact:!1,message:d.message}),a.dirty())}else if("max"===d.kind){(d.inclusive?e.data>d.value:e.data>=d.value)&&(n=this._getOrReturnCtx(e,n),r(n,{code:H.too_big,maximum:d.value,type:"number",inclusive:d.inclusive,exact:!1,message:d.message}),a.dirty())}else"multipleOf"===d.kind?0!==l(e.data,d.value)&&(n=this._getOrReturnCtx(e,n),r(n,{code:H.not_multiple_of,multipleOf:d.value,message:d.message}),a.dirty()):"finite"===d.kind?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),r(n,{code:H.not_finite,message:d.message}),a.dirty()):$.assertNever(d)}}catch(e){o=!0,s=e}finally{try{i||null==c.return||c.return()}finally{if(o)throw s}}return{status:a.value,value:e.data}}},{key:"gte",value:function(e,t){return this.setLimit("min",e,!0,Y.toString(t))}},{key:"gt",value:function(e,t){return this.setLimit("min",e,!1,Y.toString(t))}},{key:"lte",value:function(e,t){return this.setLimit("max",e,!0,Y.toString(t))}},{key:"lt",value:function(e,t){return this.setLimit("max",e,!1,Y.toString(t))}},{key:"setLimit",value:function(e,r,n,a){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([{kind:e,value:r,inclusive:n,message:Y.toString(a)}])}))}},{key:"_addCheck",value:function(e){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([e])}))}},{key:"int",value:function(e){return this._addCheck({kind:"int",message:Y.toString(e)})}},{key:"positive",value:function(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Y.toString(e)})}},{key:"negative",value:function(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Y.toString(e)})}},{key:"nonpositive",value:function(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Y.toString(e)})}},{key:"nonnegative",value:function(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Y.toString(e)})}},{key:"multipleOf",value:function(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Y.toString(t)})}},{key:"finite",value:function(e){return this._addCheck({kind:"finite",message:Y.toString(e)})}},{key:"safe",value:function(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Y.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Y.toString(e)})}},{key:"minValue",get:function(){var e=null,t=!0,r=!1,n=void 0;try{for(var a,i=this._def.checks[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;"min"===o.kind&&(null===e||o.value>e)&&(e=o.value)}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}},{key:"maxValue",get:function(){var e=null,t=!0,r=!1,n=void 0;try{for(var a,i=this._def.checks[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;"max"===o.kind&&(null===e||o.value<e)&&(e=o.value)}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}},{key:"isInt",get:function(){return!!this._def.checks.find(function(e){return"int"===e.kind||"multipleOf"===e.kind&&$.isInteger(e.value)})}},{key:"isFinite",get:function(){var e=null,t=null,r=!0,n=!1,a=void 0;try{for(var i,o=this._def.checks[Symbol.iterator]();!(r=(i=o.next()).done);r=!0){var s=i.value;if("finite"===s.kind||"int"===s.kind||"multipleOf"===s.kind)return!0;"min"===s.kind?(null===t||s.value>t)&&(t=s.value):"max"===s.kind&&(null===e||s.value<e)&&(e=s.value)}}catch(e){n=!0,a=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw a}}return Number.isFinite(t)&&Number.isFinite(e)}}]),t}(_e);Ne.create=function(e){return new Ne(_object_spread({checks:[],typeName:vt.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1},n(e)))};var Ie=function(e){function t(){var e;return _class_call_check(this,t),(e=_call_super(this,t,arguments)).min=e.gte,e.max=e.lte,e}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch(t){return this._getInvalidInput(e)}if(this._getType(e)!==K.bigint)return this._getInvalidInput(e);var t=void 0,n=new ne,a=!0,i=!1,o=void 0;try{for(var s,u=this._def.checks[Symbol.iterator]();!(a=(s=u.next()).done);a=!0){var c=s.value;if("min"===c.kind)(c.inclusive?e.data<c.value:e.data<=c.value)&&(t=this._getOrReturnCtx(e,t),r(t,{code:H.too_small,type:"bigint",minimum:c.value,inclusive:c.inclusive,message:c.message}),n.dirty());else if("max"===c.kind){(c.inclusive?e.data>c.value:e.data>=c.value)&&(t=this._getOrReturnCtx(e,t),r(t,{code:H.too_big,type:"bigint",maximum:c.value,inclusive:c.inclusive,message:c.message}),n.dirty())}else"multipleOf"===c.kind?e.data%c.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),r(t,{code:H.not_multiple_of,multipleOf:c.value,message:c.message}),n.dirty()):$.assertNever(c)}}catch(e){i=!0,o=e}finally{try{a||null==u.return||u.return()}finally{if(i)throw o}}return{status:n.value,value:e.data}}},{key:"_getInvalidInput",value:function(e){var t=this._getOrReturnCtx(e);return r(t,{code:H.invalid_type,expected:K.bigint,received:t.parsedType}),ae}},{key:"gte",value:function(e,t){return this.setLimit("min",e,!0,Y.toString(t))}},{key:"gt",value:function(e,t){return this.setLimit("min",e,!1,Y.toString(t))}},{key:"lte",value:function(e,t){return this.setLimit("max",e,!0,Y.toString(t))}},{key:"lt",value:function(e,t){return this.setLimit("max",e,!1,Y.toString(t))}},{key:"setLimit",value:function(e,r,n,a){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([{kind:e,value:r,inclusive:n,message:Y.toString(a)}])}))}},{key:"_addCheck",value:function(e){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([e])}))}},{key:"positive",value:function(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Y.toString(e)})}},{key:"negative",value:function(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Y.toString(e)})}},{key:"nonpositive",value:function(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Y.toString(e)})}},{key:"nonnegative",value:function(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Y.toString(e)})}},{key:"multipleOf",value:function(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Y.toString(t)})}},{key:"minValue",get:function(){var e=null,t=!0,r=!1,n=void 0;try{for(var a,i=this._def.checks[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;"min"===o.kind&&(null===e||o.value>e)&&(e=o.value)}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}},{key:"maxValue",get:function(){var e=null,t=!0,r=!1,n=void 0;try{for(var a,i=this._def.checks[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;"max"===o.kind&&(null===e||o.value<e)&&(e=o.value)}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}}]),t}(_e);Ie.create=function(e){var t;return new Ie(_object_spread({checks:[],typeName:vt.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t},n(e)))};var Ee=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==K.boolean){var t=this._getOrReturnCtx(e);return r(t,{code:H.invalid_type,expected:K.boolean,received:t.parsedType}),ae}return oe(e.data)}}]),t}(_e);Ee.create=function(e){return new Ee(_object_spread({typeName:vt.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1},n(e)))};var Me=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==K.date){var t=this._getOrReturnCtx(e);return r(t,{code:H.invalid_type,expected:K.date,received:t.parsedType}),ae}if(Number.isNaN(e.data.getTime())){var n=this._getOrReturnCtx(e);return r(n,{code:H.invalid_date}),ae}var a=new ne,i=void 0,o=!0,s=!1,u=void 0;try{for(var c,l=this._def.checks[Symbol.iterator]();!(o=(c=l.next()).done);o=!0){var d=c.value;"min"===d.kind?e.data.getTime()<d.value&&(i=this._getOrReturnCtx(e,i),r(i,{code:H.too_small,message:d.message,inclusive:!0,exact:!1,minimum:d.value,type:"date"}),a.dirty()):"max"===d.kind?e.data.getTime()>d.value&&(i=this._getOrReturnCtx(e,i),r(i,{code:H.too_big,message:d.message,inclusive:!0,exact:!1,maximum:d.value,type:"date"}),a.dirty()):$.assertNever(d)}}catch(e){s=!0,u=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw u}}return{status:a.value,value:new Date(e.data.getTime())}}},{key:"_addCheck",value:function(e){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([e])}))}},{key:"min",value:function(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:Y.toString(t)})}},{key:"max",value:function(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:Y.toString(t)})}},{key:"minDate",get:function(){var e=null,t=!0,r=!1,n=void 0;try{for(var a,i=this._def.checks[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;"min"===o.kind&&(null===e||o.value>e)&&(e=o.value)}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return null!=e?new Date(e):null}},{key:"maxDate",get:function(){var e=null,t=!0,r=!1,n=void 0;try{for(var a,i=this._def.checks[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;"max"===o.kind&&(null===e||o.value<e)&&(e=o.value)}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return null!=e?new Date(e):null}}]),t}(_e);Me.create=function(e){return new Me(_object_spread({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:vt.ZodDate},n(e)))};var Re=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._getType(e)!==K.symbol){var t=this._getOrReturnCtx(e);return r(t,{code:H.invalid_type,expected:K.symbol,received:t.parsedType}),ae}return oe(e.data)}}]),t}(_e);Re.create=function(e){return new Re(_object_spread({typeName:vt.ZodSymbol},n(e)))};var Le=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._getType(e)!==K.undefined){var t=this._getOrReturnCtx(e);return r(t,{code:H.invalid_type,expected:K.undefined,received:t.parsedType}),ae}return oe(e.data)}}]),t}(_e);Le.create=function(e){return new Le(_object_spread({typeName:vt.ZodUndefined},n(e)))};var Fe=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._getType(e)!==K.null){var t=this._getOrReturnCtx(e);return r(t,{code:H.invalid_type,expected:K.null,received:t.parsedType}),ae}return oe(e.data)}}]),t}(_e);Fe.create=function(e){return new Fe(_object_spread({typeName:vt.ZodNull},n(e)))};var De=function(e){function t(){var e;return _class_call_check(this,t),(e=_call_super(this,t,arguments))._any=!0,e}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){return oe(e.data)}}]),t}(_e);De.create=function(e){return new De(_object_spread({typeName:vt.ZodAny},n(e)))};var ze=function(e){function t(){var e;return _class_call_check(this,t),(e=_call_super(this,t,arguments))._unknown=!0,e}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){return oe(e.data)}}]),t}(_e);ze.create=function(e){return new ze(_object_spread({typeName:vt.ZodUnknown},n(e)))};var Ue=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._getOrReturnCtx(e);return r(t,{code:H.invalid_type,expected:K.never,received:t.parsedType}),ae}}]),t}(_e);Ue.create=function(e){return new Ue(_object_spread({typeName:vt.ZodNever},n(e)))};var $e=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._getType(e)!==K.undefined){var t=this._getOrReturnCtx(e);return r(t,{code:H.invalid_type,expected:K.void,received:t.parsedType}),ae}return oe(e.data)}}]),t}(_e);$e.create=function(e){return new $e(_object_spread({typeName:vt.ZodVoid},n(e)))};var Ve=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e),n=t.ctx,a=t.status,i=this._def;if(n.parsedType!==K.array)return r(n,{code:H.invalid_type,expected:K.array,received:n.parsedType}),ae;if(null!==i.exactLength){var o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(r(n,{code:o?H.too_big:H.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),a.dirty())}if(null!==i.minLength&&n.data.length<i.minLength.value&&(r(n,{code:H.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),a.dirty()),null!==i.maxLength&&n.data.length>i.maxLength.value&&(r(n,{code:H.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),a.dirty()),n.common.async)return Promise.all(_to_consumable_array(n.data).map(function(e,t){return i.type._parseAsync(new pe(n,e,n.path,t))})).then(function(e){return ne.mergeArray(a,e)});var u=_to_consumable_array(n.data).map(function(e,t){return i.type._parseSync(new pe(n,e,n.path,t))});return ne.mergeArray(a,u)}},{key:"element",get:function(){return this._def.type}},{key:"min",value:function(e,r){return new t(_object_spread_props(_object_spread({},this._def),{minLength:{value:e,message:Y.toString(r)}}))}},{key:"max",value:function(e,r){return new t(_object_spread_props(_object_spread({},this._def),{maxLength:{value:e,message:Y.toString(r)}}))}},{key:"length",value:function(e,r){return new t(_object_spread_props(_object_spread({},this._def),{exactLength:{value:e,message:Y.toString(r)}}))}},{key:"nonempty",value:function(e){return this.min(1,e)}}]),t}(_e);function qe(e){if(_instanceof(e,Be)){var t={};for(var r in e.shape){var n=e.shape[r];t[r]=ut.create(qe(n))}return new Be(_object_spread_props(_object_spread({},e._def),{shape:function(){return t}}))}return _instanceof(e,Ve)?new Ve(_object_spread_props(_object_spread({},e._def),{type:qe(e.element)})):_instanceof(e,ut)?ut.create(qe(e.unwrap())):_instanceof(e,ct)?ct.create(qe(e.unwrap())):_instanceof(e,Ye)?Ye.create(e.items.map(function(e){return qe(e)})):e}Ve.create=function(e,t){return new Ve(_object_spread({type:e,minLength:null,maxLength:null,exactLength:null,typeName:vt.ZodArray},n(t)))};var Be=function(e){function t(){var e;return _class_call_check(this,t),(e=_call_super(this,t,arguments))._cached=null,e.nonstrict=e.passthrough,e.augment=e.extend,e}return _inherits(t,e),_create_class(t,[{key:"_getCached",value:function(){if(null!==this._cached)return this._cached;var e=this._def.shape(),t=$.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}},{key:"_parse",value:function(e){if(this._getType(e)!==K.object){var t=this._getOrReturnCtx(e);return r(t,{code:H.invalid_type,expected:K.object,received:t.parsedType}),ae}var n=this._processInputParams(e),a=n.status,i=n.ctx,o=this._getCached(),s=o.shape,u=o.keys,c=[];if(!_instanceof(this._def.catchall,Ue)||"strip"!==this._def.unknownKeys)for(var l in i.data)u.includes(l)||c.push(l);var d=[],p=!0,f=!1,_=void 0;try{for(var h,y=u[Symbol.iterator]();!(p=(h=y.next()).done);p=!0){var v=h.value,m=s[v],g=i.data[v];d.push({key:{status:"valid",value:v},value:m._parse(new pe(i,g,i.path,v)),alwaysSet:v in i.data})}}catch(e){f=!0,_=e}finally{try{p||null==y.return||y.return()}finally{if(f)throw _}}if(_instanceof(this._def.catchall,Ue)){var b=this._def.unknownKeys;if("passthrough"===b){var k=!0,j=!1,w=void 0;try{for(var x,S=c[Symbol.iterator]();!(k=(x=S.next()).done);k=!0){var A=x.value;d.push({key:{status:"valid",value:A},value:{status:"valid",value:i.data[A]}})}}catch(e){j=!0,w=e}finally{try{k||null==S.return||S.return()}finally{if(j)throw w}}}else if("strict"===b)c.length>0&&(r(i,{code:H.unrecognized_keys,keys:c}),a.dirty());else if("strip"!==b)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{var Z=this._def.catchall,O=!0,P=!1,T=void 0;try{for(var C,N=c[Symbol.iterator]();!(O=(C=N.next()).done);O=!0){var I=C.value,E=i.data[I];d.push({key:{status:"valid",value:I},value:Z._parse(new pe(i,E,i.path,I)),alwaysSet:I in i.data})}}catch(e){P=!0,T=e}finally{try{O||null==N.return||N.return()}finally{if(P)throw T}}}return i.common.async?Promise.resolve().then(function(){return _async_to_generator(function(){var e,t,r,n,a,i,o,s,u,c;return _ts_generator(this,function(l){switch(l.label){case 0:e=[],t=!0,r=!1,n=void 0,l.label=1;case 1:l.trys.push([1,7,8,9]),a=d[Symbol.iterator](),l.label=2;case 2:return(t=(i=a.next()).done)?[3,6]:[4,(o=i.value).key];case 3:return s=l.sent(),[4,o.value];case 4:u=l.sent(),e.push({key:s,value:u,alwaysSet:o.alwaysSet}),l.label=5;case 5:return t=!0,[3,2];case 6:return[3,9];case 7:return c=l.sent(),r=!0,n=c,[3,9];case 8:try{t||null==a.return||a.return()}finally{if(r)throw n}return[7];case 9:return[2,e]}})})()}).then(function(e){return ne.mergeObjectSync(a,e)}):ne.mergeObjectSync(a,d)}},{key:"shape",get:function(){return this._def.shape()}},{key:"strict",value:function(e){var r=this;return Y.errToObj,new t(_object_spread(_object_spread_props(_object_spread({},this._def),{unknownKeys:"strict"}),void 0!==e?{errorMap:function(t,n){var a,i,o,s,u=null!==(o=null===(a=(i=r._def).errorMap)||void 0===a?void 0:a.call(i,t,n).message)&&void 0!==o?o:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(s=Y.errToObj(e).message)&&void 0!==s?s:u}:{message:u}}}:{}))}},{key:"strip",value:function(){return new t(_object_spread_props(_object_spread({},this._def),{unknownKeys:"strip"}))}},{key:"passthrough",value:function(){return new t(_object_spread_props(_object_spread({},this._def),{unknownKeys:"passthrough"}))}},{key:"extend",value:function(e){var r=this;return new t(_object_spread_props(_object_spread({},this._def),{shape:function(){return _object_spread({},r._def.shape(),e)}}))}},{key:"merge",value:function(e){var r=this;return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:function(){return _object_spread({},r._def.shape(),e._def.shape())},typeName:vt.ZodObject})}},{key:"setKey",value:function(e,t){return this.augment(_define_property({},e,t))}},{key:"catchall",value:function(e){return new t(_object_spread_props(_object_spread({},this._def),{catchall:e}))}},{key:"pick",value:function(e){var r={},n=!0,a=!1,i=void 0;try{for(var o,s=$.objectKeys(e)[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;e[u]&&this.shape[u]&&(r[u]=this.shape[u])}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return new t(_object_spread_props(_object_spread({},this._def),{shape:function(){return r}}))}},{key:"omit",value:function(e){var r={},n=!0,a=!1,i=void 0;try{for(var o,s=$.objectKeys(this.shape)[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;e[u]||(r[u]=this.shape[u])}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return new t(_object_spread_props(_object_spread({},this._def),{shape:function(){return r}}))}},{key:"deepPartial",value:function(){return qe(this)}},{key:"partial",value:function(e){var r={},n=!0,a=!1,i=void 0;try{for(var o,s=$.objectKeys(this.shape)[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value,c=this.shape[u];e&&!e[u]?r[u]=c:r[u]=c.optional()}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return new t(_object_spread_props(_object_spread({},this._def),{shape:function(){return r}}))}},{key:"required",value:function(e){var r={},n=!0,a=!1,i=void 0;try{for(var o,s=$.objectKeys(this.shape)[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;if(e&&!e[u])r[u]=this.shape[u];else{for(var c=this.shape[u];_instanceof(c,ut);)c=c._def.innerType;r[u]=c}}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return new t(_object_spread_props(_object_spread({},this._def),{shape:function(){return r}}))}},{key:"keyof",value:function(){return d($.objectKeys(this.shape))}}]),t}(_e);Be.create=function(e,t){return new Be(_object_spread({shape:function(){return e},unknownKeys:"strip",catchall:Ue.create(),typeName:vt.ZodObject},n(t)))},Be.strictCreate=function(e,t){return new Be(_object_spread({shape:function(){return e},unknownKeys:"strict",catchall:Ue.create(),typeName:vt.ZodObject},n(t)))},Be.lazycreate=function(e,t){return new Be(_object_spread({shape:e,unknownKeys:"strip",catchall:Ue.create(),typeName:vt.ZodObject},n(t)))};var Ke=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx,n=this._def.options;if(t.common.async)return Promise.all(n.map(function(e){return _async_to_generator(function(){var r,n;return _ts_generator(this,function(a){switch(a.label){case 0:return r=_object_spread_props(_object_spread({},t),{common:_object_spread_props(_object_spread({},t.common),{issues:[]}),parent:null}),n={},[4,e._parseAsync({data:t.data,path:t.path,parent:r})];case 1:return[2,(n.result=a.sent(),n.ctx=r,n)]}})})()})).then(function(e){var n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;if("valid"===u.result.status)return u.result}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}var c=!0,l=!1,d=void 0;try{for(var p,f=e[Symbol.iterator]();!(c=(p=f.next()).done);c=!0){var _,h=p.value;if("dirty"===h.result.status)return(_=t.common.issues).push.apply(_,_to_consumable_array(h.ctx.common.issues)),h.result}}catch(e){l=!0,d=e}finally{try{c||null==f.return||f.return()}finally{if(l)throw d}}var y=e.map(function(e){return new J(e.ctx.common.issues)});return r(t,{code:H.invalid_union,unionErrors:y}),ae});var a,i=void 0,o=[],s=!0,u=!1,c=void 0;try{for(var l,d=n[Symbol.iterator]();!(s=(l=d.next()).done);s=!0){var p=l.value,f=_object_spread_props(_object_spread({},t),{common:_object_spread_props(_object_spread({},t.common),{issues:[]}),parent:null}),_=p._parseSync({data:t.data,path:t.path,parent:f});if("valid"===_.status)return _;"dirty"!==_.status||i||(i={result:_,ctx:f}),f.common.issues.length&&o.push(f.common.issues)}}catch(e){u=!0,c=e}finally{try{s||null==d.return||d.return()}finally{if(u)throw c}}if(i)return(a=t.common.issues).push.apply(a,_to_consumable_array(i.ctx.common.issues)),i.result;var h=o.map(function(e){return new J(e)});return r(t,{code:H.invalid_union,unionErrors:h}),ae}},{key:"options",get:function(){return this._def.options}}]),t}(_e);Ke.create=function(e,t){return new Ke(_object_spread({options:e,typeName:vt.ZodUnion},n(t)))};var We=function(e){return _instanceof(e,rt)?We(e.schema):_instanceof(e,st)?We(e.innerType()):_instanceof(e,nt)?[e.value]:_instanceof(e,at)?e.options:_instanceof(e,it)?$.objectValues(e.enum):_instanceof(e,lt)?We(e._def.innerType):_instanceof(e,Le)?[void 0]:_instanceof(e,Fe)?[null]:_instanceof(e,ut)?[void 0].concat(_to_consumable_array(We(e.unwrap()))):_instanceof(e,ct)?[null].concat(_to_consumable_array(We(e.unwrap()))):_instanceof(e,_t)||_instanceof(e,yt)?We(e.unwrap()):_instanceof(e,dt)?We(e._def.innerType):[]},He=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx;if(t.parsedType!==K.object)return r(t,{code:H.invalid_type,expected:K.object,received:t.parsedType}),ae;var n=this.discriminator,a=t.data[n],i=this.optionsMap.get(a);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(r(t,{code:H.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),ae)}},{key:"discriminator",get:function(){return this._def.discriminator}},{key:"options",get:function(){return this._def.options}},{key:"optionsMap",get:function(){return this._def.optionsMap}}],[{key:"create",value:function(e,r,a){var i=new Map,o=!0,s=!1,u=void 0;try{for(var c,l=r[Symbol.iterator]();!(o=(c=l.next()).done);o=!0){var d=c.value,p=We(d.shape[e]);if(!p.length)throw new Error("A discriminator value for key `".concat(e,"` could not be extracted from all schema options"));var f=!0,_=!1,h=void 0;try{for(var y,v=p[Symbol.iterator]();!(f=(y=v.next()).done);f=!0){var m=y.value;if(i.has(m))throw new Error("Discriminator property ".concat(String(e)," has duplicate value ").concat(String(m)));i.set(m,d)}}catch(e){_=!0,h=e}finally{try{f||null==v.return||v.return()}finally{if(_)throw h}}}}catch(e){s=!0,u=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw u}}return new t(_object_spread({typeName:vt.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i},n(a)))}}]),t}(_e);function Ge(e,t){var r=W(e),n=W(t);if(e===t)return{valid:!0,data:e};if(r===K.object&&n===K.object){var a=$.objectKeys(t),i=$.objectKeys(e).filter(function(e){return-1!==a.indexOf(e)}),o=_object_spread({},e,t),s=!0,u=!1,c=void 0;try{for(var l,d=i[Symbol.iterator]();!(s=(l=d.next()).done);s=!0){var p=l.value,f=Ge(e[p],t[p]);if(!f.valid)return{valid:!1};o[p]=f.data}}catch(e){u=!0,c=e}finally{try{s||null==d.return||d.return()}finally{if(u)throw c}}return{valid:!0,data:o}}if(r===K.array&&n===K.array){if(e.length!==t.length)return{valid:!1};for(var _=[],h=0;h<e.length;h++){var y=Ge(e[h],t[h]);if(!y.valid)return{valid:!1};_.push(y.data)}return{valid:!0,data:_}}return r===K.date&&n===K.date&&+e===+t?{valid:!0,data:e}:{valid:!1}}var Je=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e),n=t.status,a=t.ctx,i=function(e,t){if(se(e)||se(t))return ae;var i=Ge(e.value,t.value);return i.valid?((ue(e)||ue(t))&&n.dirty(),{status:n.value,value:i.data}):(r(a,{code:H.invalid_intersection_types}),ae)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(function(e){var t=_sliced_to_array(e,2),r=t[0],n=t[1];return i(r,n)}):i(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}]),t}(_e);Je.create=function(e,t,r){return new Je(_object_spread({left:e,right:t,typeName:vt.ZodIntersection},n(r)))};var Ye=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this,n=this._processInputParams(e),a=n.status,i=n.ctx;if(i.parsedType!==K.array)return r(i,{code:H.invalid_type,expected:K.array,received:i.parsedType}),ae;if(i.data.length<this._def.items.length)return r(i,{code:H.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ae;!this._def.rest&&i.data.length>this._def.items.length&&(r(i,{code:H.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),a.dirty());var o=_to_consumable_array(i.data).map(function(e,r){var n=t._def.items[r]||t._def.rest;return n?n._parse(new pe(i,e,i.path,r)):null}).filter(function(e){return!!e});return i.common.async?Promise.all(o).then(function(e){return ne.mergeArray(a,e)}):ne.mergeArray(a,o)}},{key:"items",get:function(){return this._def.items}},{key:"rest",value:function(e){return new t(_object_spread_props(_object_spread({},this._def),{rest:e}))}}]),t}(_e);Ye.create=function(e,t){if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ye(_object_spread({items:e,typeName:vt.ZodTuple,rest:null},n(t)))};var Qe=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"keySchema",get:function(){return this._def.keyType}},{key:"valueSchema",get:function(){return this._def.valueType}},{key:"_parse",value:function(e){var t=this._processInputParams(e),n=t.status,a=t.ctx;if(a.parsedType!==K.object)return r(a,{code:H.invalid_type,expected:K.object,received:a.parsedType}),ae;var i=[],o=this._def.keyType,s=this._def.valueType;for(var u in a.data)i.push({key:o._parse(new pe(a,u,a.path,u)),value:s._parse(new pe(a,a.data[u],a.path,u)),alwaysSet:u in a.data});return a.common.async?ne.mergeObjectAsync(n,i):ne.mergeObjectSync(n,i)}},{key:"element",get:function(){return this._def.valueType}}],[{key:"create",value:function(e,r,a){return _instanceof(r,_e)?new t(_object_spread({keyType:e,valueType:r,typeName:vt.ZodRecord},n(a))):new t(_object_spread({keyType:Ce.create(),valueType:e,typeName:vt.ZodRecord},n(r)))}}]),t}(_e),Xe=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"keySchema",get:function(){return this._def.keyType}},{key:"valueSchema",get:function(){return this._def.valueType}},{key:"_parse",value:function(e){var t=this._processInputParams(e),n=t.status,a=t.ctx;if(a.parsedType!==K.map)return r(a,{code:H.invalid_type,expected:K.map,received:a.parsedType}),ae;var i=this._def.keyType,o=this._def.valueType,s=_to_consumable_array(a.data.entries()).map(function(e,t){var r=_sliced_to_array(e,2),n=r[0],s=r[1];return{key:i._parse(new pe(a,n,a.path,[t,"key"])),value:o._parse(new pe(a,s,a.path,[t,"value"]))}});if(a.common.async){var u=new Map;return Promise.resolve().then(function(){return _async_to_generator(function(){var e,t,r,a,i,o,c,l,d;return _ts_generator(this,function(p){switch(p.label){case 0:e=!0,t=!1,r=void 0,p.label=1;case 1:p.trys.push([1,7,8,9]),a=s[Symbol.iterator](),p.label=2;case 2:return(e=(i=a.next()).done)?[3,6]:[4,(o=i.value).key];case 3:return c=p.sent(),[4,o.value];case 4:if(l=p.sent(),"aborted"===c.status||"aborted"===l.status)return[2,ae];"dirty"!==c.status&&"dirty"!==l.status||n.dirty(),u.set(c.value,l.value),p.label=5;case 5:return e=!0,[3,2];case 6:return[3,9];case 7:return d=p.sent(),t=!0,r=d,[3,9];case 8:try{e||null==a.return||a.return()}finally{if(t)throw r}return[7];case 9:return[2,{status:n.value,value:u}]}})})()})}var c=new Map,l=!0,d=!1,p=void 0;try{for(var f,_=s[Symbol.iterator]();!(l=(f=_.next()).done);l=!0){var h=f.value,y=h.key,v=h.value;if("aborted"===y.status||"aborted"===v.status)return ae;"dirty"!==y.status&&"dirty"!==v.status||n.dirty(),c.set(y.value,v.value)}}catch(e){d=!0,p=e}finally{try{l||null==_.return||_.return()}finally{if(d)throw p}}return{status:n.value,value:c}}}]),t}(_e);Xe.create=function(e,t,r){return new Xe(_object_spread({valueType:t,keyType:e,typeName:vt.ZodMap},n(r)))};var et=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e),n=t.status,a=t.ctx;if(a.parsedType!==K.set)return r(a,{code:H.invalid_type,expected:K.set,received:a.parsedType}),ae;var i=this._def;null!==i.minSize&&a.data.size<i.minSize.value&&(r(a,{code:H.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),null!==i.maxSize&&a.data.size>i.maxSize.value&&(r(a,{code:H.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());var o=this._def.valueType;function s(e){var t=new Set,r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var u=o.value;if("aborted"===u.status)return ae;"dirty"===u.status&&n.dirty(),t.add(u.value)}}catch(e){a=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return{status:n.value,value:t}}var u=_to_consumable_array(a.data.values()).map(function(e,t){return o._parse(new pe(a,e,a.path,t))});return a.common.async?Promise.all(u).then(function(e){return s(e)}):s(u)}},{key:"min",value:function(e,r){return new t(_object_spread_props(_object_spread({},this._def),{minSize:{value:e,message:Y.toString(r)}}))}},{key:"max",value:function(e,r){return new t(_object_spread_props(_object_spread({},this._def),{maxSize:{value:e,message:Y.toString(r)}}))}},{key:"size",value:function(e,t){return this.min(e,t).max(e,t)}},{key:"nonempty",value:function(e){return this.min(1,e)}}]),t}(_e);et.create=function(e,t){return new et(_object_spread({valueType:e,minSize:null,maxSize:null,typeName:vt.ZodSet},n(t)))};var tt=function(e){function a(){var e;return _class_call_check(this,a),(e=_call_super(this,a,arguments)).validate=e.implement,e}return _inherits(a,e),_create_class(a,[{key:"_parse",value:function(e){var n=this._processInputParams(e).ctx;if(n.parsedType!==K.function)return r(n,{code:H.invalid_type,expected:K.function,received:n.parsedType}),ae;function a(e,r){return te({data:e,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,t(),X].filter(function(e){return!!e}),issueData:{code:H.invalid_arguments,argumentsError:r}})}function i(e,r){return te({data:e,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,t(),X].filter(function(e){return!!e}),issueData:{code:H.invalid_return_type,returnTypeError:r}})}var o={errorMap:n.common.contextualErrorMap},s=n.data;if(_instanceof(this._def.returns,ot)){var u=this;return oe(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return _async_to_generator(function(){var e,r,n;return _ts_generator(this,function(c){switch(c.label){case 0:return e=new J([]),[4,u._def.args.parseAsync(t,o).catch(function(r){throw e.addIssue(a(t,r)),e})];case 1:return r=c.sent(),[4,Reflect.apply(s,this,r)];case 2:return n=c.sent(),[4,u._def.returns._def.type.parseAsync(n,o).catch(function(t){throw e.addIssue(i(n,t)),e})];case 3:return[2,c.sent()]}})}).call(this)})}var c=this;return oe(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=c._def.args.safeParse(t,o);if(!n.success)throw new J([a(t,n.error)]);var u=Reflect.apply(s,this,n.data),l=c._def.returns.safeParse(u,o);if(!l.success)throw new J([i(u,l.error)]);return l.data})}},{key:"parameters",value:function(){return this._def.args}},{key:"returnType",value:function(){return this._def.returns}},{key:"args",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return new a(_object_spread_props(_object_spread({},this._def),{args:Ye.create(t).rest(ze.create())}))}},{key:"returns",value:function(e){return new a(_object_spread_props(_object_spread({},this._def),{returns:e}))}},{key:"implement",value:function(e){return this.parse(e)}},{key:"strictImplement",value:function(e){return this.parse(e)}}],[{key:"create",value:function(e,t,r){return new a(_object_spread({args:e||Ye.create([]).rest(ze.create()),returns:t||ze.create(),typeName:vt.ZodFunction},n(r)))}}]),a}(_e),rt=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"schema",get:function(){return this._def.getter()}},{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx;return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}]),t}(_e);rt.create=function(e,t){return new rt(_object_spread({getter:e,typeName:vt.ZodLazy},n(t)))};var nt=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(e.data!==this._def.value){var t=this._getOrReturnCtx(e);return r(t,{received:t.data,code:H.invalid_literal,expected:this._def.value}),ae}return{status:"valid",value:e.data}}},{key:"value",get:function(){return this._def.value}}]),t}(_e);nt.create=function(e,t){return new nt(_object_spread({value:e,typeName:vt.ZodLiteral},n(t)))};var at=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if("string"!=typeof e.data){var t=this._getOrReturnCtx(e),n=this._def.values;return r(t,{expected:$.joinValues(n),received:t.parsedType,code:H.invalid_type}),ae}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){var a=this._getOrReturnCtx(e),i=this._def.values;return r(a,{received:a.data,code:H.invalid_enum_value,options:i}),ae}return oe(e.data)}},{key:"options",get:function(){return this._def.values}},{key:"enum",get:function(){var e={},t=!0,r=!1,n=void 0;try{for(var a,i=this._def.values[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;e[o]=o}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}},{key:"Values",get:function(){var e={},t=!0,r=!1,n=void 0;try{for(var a,i=this._def.values[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;e[o]=o}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}},{key:"Enum",get:function(){var e={},t=!0,r=!1,n=void 0;try{for(var a,i=this._def.values[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;e[o]=o}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}},{key:"extract",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._def;return t.create(e,_object_spread({},this._def,r))}},{key:"exclude",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._def;return t.create(this.options.filter(function(t){return!e.includes(t)}),_object_spread({},this._def,r))}}]),t}(_e);at.create=d;var it=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=$.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==K.string&&n.parsedType!==K.number){var a=$.objectValues(t);return r(n,{expected:$.joinValues(a),received:n.parsedType,code:H.invalid_type}),ae}if(this._cache||(this._cache=new Set($.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){var i=$.objectValues(t);return r(n,{received:n.data,code:H.invalid_enum_value,options:i}),ae}return oe(e.data)}},{key:"enum",get:function(){return this._def.values}}]),t}(_e);it.create=function(e,t){return new it(_object_spread({values:e,typeName:vt.ZodNativeEnum},n(t)))};var ot=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"unwrap",value:function(){return this._def.type}},{key:"_parse",value:function(e){var t=this,n=this._processInputParams(e).ctx;if(n.parsedType!==K.promise&&!1===n.common.async)return r(n,{code:H.invalid_type,expected:K.promise,received:n.parsedType}),ae;var a=n.parsedType===K.promise?n.data:Promise.resolve(n.data);return oe(a.then(function(e){return t._def.type.parseAsync(e,{path:n.path,errorMap:n.common.contextualErrorMap})}))}}]),t}(_e);ot.create=function(e,t){return new ot(_object_spread({type:e,typeName:vt.ZodPromise},n(t)))};var st=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"innerType",value:function(){return this._def.schema}},{key:"sourceType",value:function(){return this._def.schema._def.typeName===vt.ZodEffects?this._def.schema.sourceType():this._def.schema}},{key:"_parse",value:function(e){var t=this,n=this._processInputParams(e),a=n.status,i=n.ctx,o=this._def.effect||null,s={addIssue:function(e){r(i,e),e.fatal?a.abort():a.dirty()},get path(){return i.path}};if(s.addIssue=s.addIssue.bind(s),"preprocess"===o.type){var u=o.transform(i.data,s);if(i.common.async)return Promise.resolve(u).then(function(e){return _async_to_generator(function(){var t;return _ts_generator(this,function(r){switch(r.label){case 0:return"aborted"===a.value?[2,ae]:[4,this._def.schema._parseAsync({data:e,path:i.path,parent:i})];case 1:return"aborted"===(t=r.sent()).status?[2,ae]:"dirty"===t.status||"dirty"===a.value?[2,ie(t.value)]:[2,t]}})}).call(t)});if("aborted"===a.value)return ae;var c=this._def.schema._parseSync({data:u,path:i.path,parent:i});return"aborted"===c.status?ae:"dirty"===c.status||"dirty"===a.value?ie(c.value):c}if("refinement"===o.type){var l=function(e){var t=o.refinement(e,s);if(i.common.async)return Promise.resolve(t);if(_instanceof(t,Promise))throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===i.common.async){var d=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return"aborted"===d.status?ae:("dirty"===d.status&&a.dirty(),l(d.value),{status:a.value,value:d.value})}return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(function(e){return"aborted"===e.status?ae:("dirty"===e.status&&a.dirty(),l(e.value).then(function(){return{status:a.value,value:e.value}}))})}if("transform"===o.type){if(!1===i.common.async){var p=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!ce(p))return ae;var f=o.transform(p.value,s);if(_instanceof(f,Promise))throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:a.value,value:f}}return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(function(e){return ce(e)?Promise.resolve(o.transform(e.value,s)).then(function(e){return{status:a.value,value:e}}):ae})}$.assertNever(o)}}]),t}(_e);st.create=function(e,t,r){return new st(_object_spread({schema:e,typeName:vt.ZodEffects,effect:t},n(r)))},st.createWithPreprocess=function(e,t,r){return new st(_object_spread({schema:t,effect:{type:"preprocess",transform:e},typeName:vt.ZodEffects},n(r)))};var ut=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){return this._getType(e)===K.undefined?oe(void 0):this._def.innerType._parse(e)}},{key:"unwrap",value:function(){return this._def.innerType}}]),t}(_e);ut.create=function(e,t){return new ut(_object_spread({innerType:e,typeName:vt.ZodOptional},n(t)))};var ct=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){return this._getType(e)===K.null?oe(null):this._def.innerType._parse(e)}},{key:"unwrap",value:function(){return this._def.innerType}}]),t}(_e);ct.create=function(e,t){return new ct(_object_spread({innerType:e,typeName:vt.ZodNullable},n(t)))};var lt=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx,r=t.data;return t.parsedType===K.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}},{key:"removeDefault",value:function(){return this._def.innerType}}]),t}(_e);lt.create=function(e,t){return new lt(_object_spread({innerType:e,typeName:vt.ZodDefault,defaultValue:"function"==typeof t.default?t.default:function(){return t.default}},n(t)))};var dt=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this,r=this._processInputParams(e).ctx,n=_object_spread_props(_object_spread({},r),{common:_object_spread_props(_object_spread({},r.common),{issues:[]})}),a=this._def.innerType._parse({data:n.data,path:n.path,parent:_object_spread({},n)});return le(a)?a.then(function(e){return{status:"valid",value:"valid"===e.status?e.value:t._def.catchValue({get error(){return new J(n.common.issues)},input:n.data})}}):{status:"valid",value:"valid"===a.status?a.value:this._def.catchValue({get error(){return new J(n.common.issues)},input:n.data})}}},{key:"removeCatch",value:function(){return this._def.innerType}}]),t}(_e);dt.create=function(e,t){return new dt(_object_spread({innerType:e,typeName:vt.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:function(){return t.catch}},n(t)))};var pt=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._getType(e)!==K.nan){var t=this._getOrReturnCtx(e);return r(t,{code:H.invalid_type,expected:K.nan,received:t.parsedType}),ae}return{status:"valid",value:e.data}}}]),t}(_e);pt.create=function(e){return new pt(_object_spread({typeName:vt.ZodNaN},n(e)))};var ft=Symbol("zod_brand"),_t=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx,r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}},{key:"unwrap",value:function(){return this._def.type}}]),t}(_e),ht=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this,r=this._processInputParams(e),n=r.status,a=r.ctx;if(a.common.async){return _async_to_generator(function(){var e;return _ts_generator(this,function(t){switch(t.label){case 0:return[4,this._def.in._parseAsync({data:a.data,path:a.path,parent:a})];case 1:return"aborted"===(e=t.sent()).status?[2,ae]:"dirty"===e.status?(n.dirty(),[2,ie(e.value)]):[2,this._def.out._parseAsync({data:e.value,path:a.path,parent:a})]}})}).call(t)}var i=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===i.status?ae:"dirty"===i.status?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:a.path,parent:a})}}],[{key:"create",value:function(e,r){return new t({in:e,out:r,typeName:vt.ZodPipeline})}}]),t}(_e),yt=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._def.innerType._parse(e),r=function(e){return ce(e)&&(e.value=Object.freeze(e.value)),e};return le(t)?t.then(function(e){return r(e)}):r(t)}},{key:"unwrap",value:function(){return this._def.innerType}}]),t}(_e);yt.create=function(e,t){return new yt(_object_spread({innerType:e,typeName:vt.ZodReadonly},n(t)))};var vt,mt,gt={object:Be.lazycreate};(mt=vt||(vt={})).ZodString="ZodString",mt.ZodNumber="ZodNumber",mt.ZodNaN="ZodNaN",mt.ZodBigInt="ZodBigInt",mt.ZodBoolean="ZodBoolean",mt.ZodDate="ZodDate",mt.ZodSymbol="ZodSymbol",mt.ZodUndefined="ZodUndefined",mt.ZodNull="ZodNull",mt.ZodAny="ZodAny",mt.ZodUnknown="ZodUnknown",mt.ZodNever="ZodNever",mt.ZodVoid="ZodVoid",mt.ZodArray="ZodArray",mt.ZodObject="ZodObject",mt.ZodUnion="ZodUnion",mt.ZodDiscriminatedUnion="ZodDiscriminatedUnion",mt.ZodIntersection="ZodIntersection",mt.ZodTuple="ZodTuple",mt.ZodRecord="ZodRecord",mt.ZodMap="ZodMap",mt.ZodSet="ZodSet",mt.ZodFunction="ZodFunction",mt.ZodLazy="ZodLazy",mt.ZodLiteral="ZodLiteral",mt.ZodEnum="ZodEnum",mt.ZodEffects="ZodEffects",mt.ZodNativeEnum="ZodNativeEnum",mt.ZodOptional="ZodOptional",mt.ZodNullable="ZodNullable",mt.ZodDefault="ZodDefault",mt.ZodCatch="ZodCatch",mt.ZodPromise="ZodPromise",mt.ZodBranded="ZodBranded",mt.ZodPipeline="ZodPipeline",mt.ZodReadonly="ZodReadonly";var bt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{message:"Input not instance of ".concat(e.name)};return f(function(t){return _instanceof(t,e)},t)},kt=Ce.create,jt=Ne.create,wt=pt.create,xt=Ie.create,St=Ee.create,At=Me.create,Zt=Re.create,Ot=Le.create,Pt=Fe.create,Tt=De.create,Ct=ze.create,Nt=Ue.create,It=$e.create,Et=Ve.create,Mt=Be.create,Rt=Be.strictCreate,Lt=Ke.create,Ft=He.create,Dt=Je.create,zt=Ye.create,Ut=Qe.create,$t=Xe.create,Vt=et.create,qt=tt.create,Bt=rt.create,Kt=nt.create,Wt=at.create,Ht=it.create,Gt=ot.create,Jt=st.create,Yt=ut.create,Qt=ct.create,Xt=st.createWithPreprocess,er=ht.create,tr=function(){return kt().optional()},rr=function(){return jt().optional()},nr=function(){return St().optional()},ar={string:function(e){return Ce.create(_object_spread_props(_object_spread({},e),{coerce:!0}))},number:function(e){return Ne.create(_object_spread_props(_object_spread({},e),{coerce:!0}))},boolean:function(e){return Ee.create(_object_spread_props(_object_spread({},e),{coerce:!0}))},bigint:function(e){return Ie.create(_object_spread_props(_object_spread({},e),{coerce:!0}))},date:function(e){return Me.create(_object_spread_props(_object_spread({},e),{coerce:!0}))}},ir=ae,or=Symbol("Let zodToJsonSchema decide on which parser to use"),sr={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},ur=function(e){var t=function(e){return"string"==typeof e?_object_spread_props(_object_spread({},sr),{name:e}):_object_spread({},sr,e)}(e),r=void 0!==t.name?_to_consumable_array(t.basePath).concat([t.definitionPath,t.name]):t.basePath;return _object_spread_props(_object_spread({},t),{flags:{hasReferencedOpenAiAnyType:!1},currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(function(e){var r=_sliced_to_array(e,2),n=r[0],a=r[1];return[a._def,{def:a._def,path:_to_consumable_array(t.basePath).concat([t.definitionPath,n]),jsonSchema:void 0}]}))})},cr=function(e,t){for(var r=0;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString()].concat(_to_consumable_array(t.slice(r))).join("/")};function lr(e,t,r){var n=null!=r?r:t.dateStrategy;if(Array.isArray(n))return{anyOf:n.map(function(r,n){return lr(e,t,r)})};switch(n){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return dr(e,t)}}var dr=function(e,t){var r={type:"integer",format:"unix-time"};if("openApi3"===t.target)return r;var n=!0,a=!1,i=void 0;try{for(var o,s=e.checks[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;switch(u.kind){case"min":h(r,"minimum",u.value,u.message,t);break;case"max":h(r,"maximum",u.value,u.message,t)}}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r},pr=function(e){return(!("type"in e)||"string"!==e.type)&&"allOf"in e},fr=void 0,_r={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:function(){return void 0===fr&&(fr=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),fr},uuid:/^[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}$/,ipv4:/^(?:(?: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])$/,ipv4Cidr:/^(?:(?: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])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([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])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/},hr=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789"),yr={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"},vr=function(e,t){var r=(_instanceof(e.options,Map)?Array.from(e.options.values()):e.options).map(function(e,r){return gr(e._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["anyOf","".concat(r)])}))}).filter(function(e){return!!e&&(!t.strictUnions||"object"===(void 0===e?"undefined":_type_of(e))&&Object.keys(e).length>0)});return r.length?{anyOf:r}:void 0},mr=function(e,t,r){switch(t){case vt.ZodString:return m(e,r);case vt.ZodNumber:return function(e,t){var r={type:"number"};if(!e.checks)return r;var n=!0,a=!1,i=void 0;try{for(var o,s=e.checks[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;switch(u.kind){case"int":r.type="integer",_(r,"type",u.message,t);break;case"min":"jsonSchema7"===t.target?u.inclusive?h(r,"minimum",u.value,u.message,t):h(r,"exclusiveMinimum",u.value,u.message,t):(u.inclusive||(r.exclusiveMinimum=!0),h(r,"minimum",u.value,u.message,t));break;case"max":"jsonSchema7"===t.target?u.inclusive?h(r,"maximum",u.value,u.message,t):h(r,"exclusiveMaximum",u.value,u.message,t):(u.inclusive||(r.exclusiveMaximum=!0),h(r,"maximum",u.value,u.message,t));break;case"multipleOf":h(r,"multipleOf",u.value,u.message,t)}}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r}(e,r);case vt.ZodObject:return function(e,t){var r="openAi"===t.target,n={type:"object",properties:{}},a=[],i=e.shape();for(var o in i){var s=i[o];if(void 0!==s&&void 0!==s._def){var u=A(s);u&&r&&("ZodOptional"===s._def.typeName&&(s=s._def.innerType),s.isNullable()||(s=s.nullable()),u=!1);var c=gr(s._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["properties",o]),propertyPath:_to_consumable_array(t.currentPath).concat(["properties",o])}));void 0!==c&&(n.properties[o]=c,u||a.push(o))}}a.length&&(n.required=a);var l=S(e,t);return void 0!==l&&(n.additionalProperties=l),n}(e,r);case vt.ZodBigInt:return function(e,t){var r={type:"integer",format:"int64"};if(!e.checks)return r;var n=!0,a=!1,i=void 0;try{for(var o,s=e.checks[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;switch(u.kind){case"min":"jsonSchema7"===t.target?u.inclusive?h(r,"minimum",u.value,u.message,t):h(r,"exclusiveMinimum",u.value,u.message,t):(u.inclusive||(r.exclusiveMinimum=!0),h(r,"minimum",u.value,u.message,t));break;case"max":"jsonSchema7"===t.target?u.inclusive?h(r,"maximum",u.value,u.message,t):h(r,"exclusiveMaximum",u.value,u.message,t):(u.inclusive||(r.exclusiveMaximum=!0),h(r,"maximum",u.value,u.message,t));break;case"multipleOf":h(r,"multipleOf",u.value,u.message,t)}}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r}(e,r);case vt.ZodBoolean:return{type:"boolean"};case vt.ZodDate:return lr(e,r);case vt.ZodUndefined:return function(e){return{not:y(e)}}(r);case vt.ZodNull:return function(e){return"openApi3"===e.target?{enum:["null"],nullable:!0}:{type:"null"}}(r);case vt.ZodArray:return function(e,t){var r,n,a,i={type:"array"};return(null===(r=e.type)||void 0===r?void 0:r._def)&&(null===(a=e.type)||void 0===a||null===(n=a._def)||void 0===n?void 0:n.typeName)!==vt.ZodAny&&(i.items=gr(e.type._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["items"])}))),e.minLength&&h(i,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&h(i,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(h(i,"minItems",e.exactLength.value,e.exactLength.message,t),h(i,"maxItems",e.exactLength.value,e.exactLength.message,t)),i}(e,r);case vt.ZodUnion:case vt.ZodDiscriminatedUnion:return function(e,t){if("openApi3"===t.target)return vr(e,t);var r=_instanceof(e.options,Map)?Array.from(e.options.values()):e.options;if(r.every(function(e){return e._def.typeName in yr&&(!e._def.checks||!e._def.checks.length)})){var n=r.reduce(function(e,t){var r=yr[t._def.typeName];return r&&!e.includes(r)?_to_consumable_array(e).concat([r]):e},[]);return{type:n.length>1?n:n[0]}}if(r.every(function(e){return"ZodLiteral"===e._def.typeName&&!e.description})){var a=r.reduce(function(e,t){var r=_type_of(t._def.value);switch(r){case"string":case"number":case"boolean":return _to_consumable_array(e).concat([r]);case"bigint":return _to_consumable_array(e).concat(["integer"]);case"object":if(null===t._def.value)return _to_consumable_array(e).concat(["null"]);default:return e}},[]);if(a.length===r.length){var i=a.filter(function(e,t,r){return r.indexOf(e)===t});return{type:i.length>1?i:i[0],enum:r.reduce(function(e,t){return e.includes(t._def.value)?e:_to_consumable_array(e).concat([t._def.value])},[])}}}else if(r.every(function(e){return"ZodEnum"===e._def.typeName}))return{type:"string",enum:r.reduce(function(e,t){return _to_consumable_array(e).concat(_to_consumable_array(t._def.values.filter(function(t){return!e.includes(t)})))},[])};return vr(e,t)}(e,r);case vt.ZodIntersection:return function(e,t){var r=[gr(e.left._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["allOf","0"])})),gr(e.right._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["allOf","1"])}))].filter(function(e){return!!e}),n="jsonSchema2019-09"===t.target?{unevaluatedProperties:!1}:void 0,a=[];return r.forEach(function(e){if(pr(e)){var t;(t=a).push.apply(t,_to_consumable_array(e.allOf)),void 0===e.unevaluatedProperties&&(n=void 0)}else{var r=e;"additionalProperties"in e&&!1===e.additionalProperties?(e.additionalProperties,r=_object_without_properties(e,["additionalProperties"])):n=void 0,a.push(r)}}),a.length?_object_spread({allOf:a},n):void 0}(e,r);case vt.ZodTuple:return function(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map(function(e,r){return gr(e._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["items","".concat(r)])}))}).reduce(function(e,t){return void 0===t?e:_to_consumable_array(e).concat([t])},[]),additionalItems:gr(e.rest._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["additionalItems"])}))}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map(function(e,r){return gr(e._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["items","".concat(r)])}))}).reduce(function(e,t){return void 0===t?e:_to_consumable_array(e).concat([t])},[])}}(e,r);case vt.ZodRecord:return x(e,r);case vt.ZodLiteral:return function(e,t){var r=_type_of(e.value);return"bigint"!==r&&"number"!==r&&"boolean"!==r&&"string"!==r?{type:Array.isArray(e.value)?"array":"object"}:"openApi3"===t.target?{type:"bigint"===r?"integer":r,enum:[e.value]}:{type:"bigint"===r?"integer":r,const:e.value}}(e,r);case vt.ZodEnum:return function(e){return{type:"string",enum:Array.from(e.values)}}(e);case vt.ZodNativeEnum:return function(e){var t=e.values,r=Object.keys(e.values).filter(function(e){return"number"!=typeof t[t[e]]}).map(function(e){return t[e]}),n=Array.from(new Set(r.map(function(e){return void 0===e?"undefined":_type_of(e)})));return{type:1===n.length?"string"===n[0]?"string":"number":["string","number"],enum:r}}(e);case vt.ZodNullable:return function(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return"openApi3"===t.target?{type:yr[e.innerType._def.typeName],nullable:!0}:{type:[yr[e.innerType._def.typeName],"null"]};if("openApi3"===t.target){var r=gr(e.innerType._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath)}));return r&&"$ref"in r?{allOf:[r],nullable:!0}:r&&_object_spread_props(_object_spread({},r),{nullable:!0})}var n=gr(e.innerType._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["anyOf","0"])}));return n&&{anyOf:[n,{type:"null"}]}}(e,r);case vt.ZodOptional:return function(e,t){var r;if(t.currentPath.toString()===(null===(r=t.propertyPath)||void 0===r?void 0:r.toString()))return gr(e.innerType._def,t);var n=gr(e.innerType._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["anyOf","1"])}));return n?{anyOf:[{not:y(t)},n]}:y(t)}(e,r);case vt.ZodMap:return function(e,t){return"record"===t.mapStrategy?x(e,t):{type:"array",maxItems:125,items:{type:"array",items:[gr(e.keyType._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["items","items","0"])}))||y(t),gr(e.valueType._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["items","items","1"])}))||y(t)],minItems:2,maxItems:2}}}(e,r);case vt.ZodSet:return function(e,t){var r={type:"array",uniqueItems:!0,items:gr(e.valueType._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["items"])}))};return e.minSize&&h(r,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&h(r,"maxItems",e.maxSize.value,e.maxSize.message,t),r}(e,r);case vt.ZodLazy:return function(){return e.getter()._def};case vt.ZodPromise:return function(e,t){return gr(e.type._def,t)}(e,r);case vt.ZodNaN:case vt.ZodNever:return function(e){return"openAi"===e.target?void 0:{not:y(_object_spread_props(_object_spread({},e),{currentPath:_to_consumable_array(e.currentPath).concat(["not"])}))}}(r);case vt.ZodEffects:return function(e,t){return"input"===t.effectStrategy?gr(e.schema._def,t):y(t)}(e,r);case vt.ZodAny:return y(r);case vt.ZodUnknown:return function(e){return y(e)}(r);case vt.ZodDefault:return function(e,t){return _object_spread_props(_object_spread({},gr(e.innerType._def,t)),{default:e.defaultValue()})}(e,r);case vt.ZodBranded:return v(e,r);case vt.ZodReadonly:case vt.ZodCatch:return function(e,t){return gr(e.innerType._def,t)}(e,r);case vt.ZodPipeline:return function(e,t){if("input"===t.pipeStrategy)return gr(e.in._def,t);if("output"===t.pipeStrategy)return gr(e.out._def,t);var r=gr(e.in._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["allOf","0"])}));return{allOf:[r,gr(e.out._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["allOf",r?"1":"0"])}))].filter(function(e){return void 0!==e})}}(e,r);case vt.ZodFunction:case vt.ZodVoid:case vt.ZodSymbol:default:return}};function gr(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t.seen.get(e);if(t.override){var a,i=null===(a=t.override)||void 0===a?void 0:a.call(t,e,t,n,r);if(i!==or)return i}if(n&&!r){var o=br(n,t);if(void 0!==o)return o}var s={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,s);var u=mr(e,e.typeName,t),c="function"==typeof u?gr(u(),t):u;if(c&&kr(e,t,c),t.postProcess){var l=t.postProcess(c,e,t);return s.jsonSchema=c,l}return s.jsonSchema=c,c}var br=function(e,t){switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:cr(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every(function(e,r){return t.currentPath[r]===e})?(console.warn("Recursive reference detected at ".concat(t.currentPath.join("/"),"! Defaulting to any")),y(t)):"seen"===t.$refStrategy?y(t):void 0}},kr=function(e,t,r){return e.description&&(r.description=e.description,t.markdownDescription&&(r.markdownDescription=e.description)),r},jr=function(e,t){var r,n=ur(t),a="object"===(void 0===t?"undefined":_type_of(t))&&t.definitions?Object.entries(t.definitions).reduce(function(e,t){var r,a=_sliced_to_array(t,2),i=a[0],o=a[1];return _object_spread_props(_object_spread({},e),_define_property({},i,null!==(r=gr(o._def,_object_spread_props(_object_spread({},n),{currentPath:_to_consumable_array(n.basePath).concat([n.definitionPath,i])}),!0))&&void 0!==r?r:y(n)))},{}):void 0,i="string"==typeof t?t:"title"===(null==t?void 0:t.nameStrategy)||null==t?void 0:t.name,o=null!==(r=gr(e._def,void 0===i?n:_object_spread_props(_object_spread({},n),{currentPath:_to_consumable_array(n.basePath).concat([n.definitionPath,i])}),!1))&&void 0!==r?r:y(n),s="object"===(void 0===t?"undefined":_type_of(t))&&void 0!==t.name&&"title"===t.nameStrategy?t.name:void 0;void 0!==s&&(o.title=s),n.flags.hasReferencedOpenAiAnyType&&(a||(a={}),a[n.openAiAnyTypeName]||(a[n.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:"relative"===n.$refStrategy?"1":_to_consumable_array(n.basePath).concat([n.definitionPath,n.openAiAnyTypeName]).join("/")}}));var u=void 0===i?a?_object_spread_props(_object_spread({},o),_define_property({},n.definitionPath,a)):o:_define_property({$ref:_to_consumable_array("relative"===n.$refStrategy?[]:n.basePath).concat([n.definitionPath,i]).join("/")},n.definitionPath,_object_spread_props(_object_spread({},a),_define_property({},i,o)));return"jsonSchema7"===n.target?u.$schema="http://json-schema.org/draft-07/schema#":"jsonSchema2019-09"!==n.target&&"openAi"!==n.target||(u.$schema="https://json-schema.org/draft/2019-09/schema#"),"openAi"===n.target&&("anyOf"in u||"oneOf"in u||"allOf"in u||"type"in u&&Array.isArray(u.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),u},wr=B.record(B.string(),B.boolean()).describe("Consent requirement mapping"),xr=B.lazy(function(){return B.union([B.string(),B.number(),B.boolean(),Or,B.array(xr)])}),Sr=B.tuple([xr,xr]).describe("Loop: [source, transform] tuple for array transformations"),Ar=B.array(xr).describe("Set: Array of values"),Zr=B.record(B.string(),xr).describe("Map: Object mapping keys to values"),Or=B.object({key:B.string().optional().describe('Property path (e.g., "data.id")'),value:B.union([B.string(),B.number(),B.boolean()]).optional().describe("Static primitive value"),fn:B.string().optional().describe("Function string for custom transformation"),map:Zr.optional().describe("Object with key-value mappings"),loop:Sr.optional().describe("Tuple [source, transform]"),set:Ar.optional().describe("Array of values"),consent:wr.optional().describe("Required consent states"),condition:B.string().optional().describe("Condition function string"),validate:B.string().optional().describe("Validation function string")}).refine(function(e){return Object.keys(e).length>0},{message:"ValueConfig must have at least one property"}).describe("Value configuration for transformations"),Pr=Sr,Tr=Ar,Cr=Zr;jr(Or,{target:"jsonSchema7",$refStrategy:"relative",name:"ValueConfig"}),jr(Pr,{target:"jsonSchema7",$refStrategy:"relative",name:"Loop"}),jr(Tr,{target:"jsonSchema7",$refStrategy:"relative",name:"Set"}),jr(Cr,{target:"jsonSchema7",$refStrategy:"relative",name:"Map"});function Nr(e){var t={type:e.type};if(e.description&&(t.description=e.description),e.pattern&&(t.pattern=e.pattern),void 0!==e.minLength&&(t.minLength=e.minLength),void 0!==e.maxLength&&(t.maxLength=e.maxLength),void 0!==e.minimum&&(t.minimum=e.minimum),void 0!==e.maximum&&(t.maximum=e.maximum),e.enum&&(t.enum=_to_consumable_array(e.enum)),void 0!==e.default&&(t.default=e.default),"object"===e.type&&e.properties){var r={},n=!0,a=!1,i=void 0;try{for(var o,s=Object.entries(e.properties)[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=_sliced_to_array(o.value,2),c=u[0],l=u[1];r[c]=Nr(l)}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}t.properties=r}return"array"===e.type&&e.items&&(t.items=Nr(e.items)),t}var Ir={merge:!0,shallow:!0,extend:!0},Er={},Mr={};z(Mr,{env:function(){return Rr},events:function(){return zr},mapping:function(){return Ur}});var Rr={};z(Rr,{init:function(){return Fr},push:function(){return Dr}});var Lr=function(){},Fr={window:{fbq:void 0,_fbq:void 0},document:{createElement:function(){return{src:"",async:!1,setAttribute:function(){},removeAttribute:function(){}}},head:{appendChild:function(){}}}},Dr={window:{fbq:Object.assign(Lr,{callMethod:Lr,queue:[],push:Lr,loaded:!0,version:"2.0"}),_fbq:Object.assign(Lr,{callMethod:Lr,queue:[],push:Lr,loaded:!0,version:"2.0"})},document:{createElement:function(){return{src:"",async:!1,setAttribute:function(){},removeAttribute:function(){}}},head:{appendChild:function(){}}}},zr={};z(zr,{AddToCart:function(){return I},InitiateCheckout:function(){return E},Purchase:function(){return N},ViewContent:function(){return M}});var Ur={};z(Ur,{AddToCart:function(){return Vr},InitiateCheckout:function(){return qr},Purchase:function(){return $r},ViewContent:function(){return Br},config:function(){return Kr}});var $r={name:"Purchase",data:{map:{value:"data.total",currency:{value:"EUR"},contents:{loop:["nested",{condition:function(e){return O(e)&&"product"===e.entity},map:{id:"data.id",quantity:{key:"data.quantity",value:1}}}]},content_type:{value:"product"},num_items:{fn:function(e){return e.nested.filter(function(e){return"product"===e.entity}).length}}}}},Vr={name:"AddToCart",data:{map:{value:"data.price",currency:{value:"EUR"},contents:{set:[{map:{id:"data.id",quantity:{key:"data.quantity",value:1}}}]},content_type:{value:"product"}}}},qr={name:"InitiateCheckout",data:{map:{value:"data.value",currency:{value:"EUR"},contents:{loop:["nested",{condition:function(e){return O(e)&&"product"===e.entity},map:{id:"data.id",quantity:{key:"data.quantity",value:1}}}]},num_items:{fn:function(e){return e.nested.filter(function(e){return"product"===e.entity}).length}}}}},Br={name:"ViewContent",data:{map:{value:"data.price",currency:{value:"EUR"},content_type:{value:"product"},contents:{set:[{map:{id:"data.id",quantity:{key:"data.quantity",value:1}}}]}}}},Kr={order:{complete:$r},product:{view:Br,add:Vr},cart:{view:qr}},Wr={};z(Wr,{dataSchema:function(){return Xr},dataUiSchema:function(){return en},mappingSchema:function(){return Yr},mappingUiSchema:function(){return Qr},settingsSchema:function(){return Gr},settingsUiSchema:function(){return Jr}});var Hr,Gr={type:"object",title:"Meta Pixel Settings",properties:{pixelId:{type:"string",title:"Pixel ID",description:"Your Meta (Facebook) Pixel ID",minLength:1,pattern:"^[0-9]+$"}},required:["pixelId"]},Jr={pixelId:{"ui:placeholder":"e.g., 1234567890123456","ui:help":"Find your Pixel ID in Meta Events Manager"}},Yr={type:"object",title:"Meta Pixel Mapping",properties:{track:{type:"string",title:"Standard Event Name",description:"Meta Pixel standard event name",enum:["PageView","AddPaymentInfo","AddToCart","AddToWishlist","CompleteRegistration","Contact","CustomizeProduct","Donate","FindLocation","InitiateCheckout","Lead","Purchase","Schedule","Search","StartTrial","SubmitApplication","Subscribe","ViewContent"]},trackCustom:{type:"string",title:"Custom Event Name",description:"Custom event name for trackCustom"}}},Qr={track:{"ui:placeholder":"Select standard event","ui:help":"Use standard events for better conversion tracking"},trackCustom:{"ui:placeholder":"e.g., CustomEventName","ui:help":"Custom events for tracking non-standard actions"},"ui:order":["track","trackCustom"]},Xr={type:"object",title:"Meta Pixel Event Data",description:"Properties that can be sent with Meta Pixel events",properties:{value:{type:"number",title:"Value",description:"Monetary value of the event (e.g., purchase total, product price)"},currency:{type:"string",title:"Currency",description:"Currency code in ISO 4217 format (e.g., USD, EUR, GBP)",enum:["USD","EUR","GBP","JPY","CAD","AUD","CHF","CNY","SEK","NZD","KRW","SGD","NOK","MXN","INR","BRL","ZAR","DKK","PLN","THB","IDR","HUF","CZK","ILS","CLP","PHP","AED","COP","SAR","MYR","RON"]},content_name:{type:"string",title:"Content Name",description:"Name of the page, product, or content"},content_category:{type:"string",title:"Content Category",description:"Category of the page or product"},content_ids:{type:"array",title:"Content IDs",description:"Array of product IDs, SKUs, or content identifiers",items:{type:"string"}},contents:{type:"array",title:"Contents",description:"Array of product items with details (id, quantity, etc.)",items:{type:"object",properties:{id:{type:"string",title:"Product ID",description:"Product identifier or SKU"},quantity:{type:"number",title:"Quantity",description:"Quantity of this product"},item_price:{type:"number",title:"Item Price",description:"Price per item"}}}},content_type:{type:"string",title:"Content Type",description:"Type of content (product or product_group)",enum:["product","product_group"]},num_items:{type:"number",title:"Number of Items",description:"Total number of items (e.g., in cart or order)"},predicted_ltv:{type:"number",title:"Predicted LTV",description:"Predicted lifetime value of the customer"},search_string:{type:"string",title:"Search String",description:"Search query entered by the user"},status:{type:"boolean",title:"Status",description:"Status of the registration or checkout"}},additionalProperties:!0},en={value:{"ui:placeholder":"e.g., 99.99","ui:help":"The monetary value associated with this event"},currency:{"ui:placeholder":"Select currency","ui:help":"Use the ISO 4217 currency code"},content_name:{"ui:placeholder":"e.g., Blue Running Shoes","ui:help":"Descriptive name of the content or product"},content_category:{"ui:placeholder":"e.g., Shoes > Running","ui:help":"Category hierarchy for the content"},content_ids:{"ui:placeholder":"Add product IDs","ui:help":"List of product identifiers"},contents:{"ui:help":"Array of products with detailed information"},content_type:{"ui:placeholder":"Select content type","ui:help":"Specify whether tracking individual products or product groups"},num_items:{"ui:placeholder":"e.g., 3","ui:help":"Total quantity of items"},search_string:{"ui:placeholder":"e.g., running shoes","ui:help":"The search term used by the customer"}},tn=Z({pixelId:{type:"string",required:!0,pattern:"^[0-9]+$",description:"Your Meta (Facebook) Pixel ID",minLength:1}},"Meta Pixel Settings"),rn=Z({track:{type:"string",description:"Meta Pixel standard event name",enum:["PageView","AddPaymentInfo","AddToCart","AddToWishlist","CompleteRegistration","Contact","CustomizeProduct","Donate","FindLocation","InitiateCheckout","Lead","Purchase","Schedule","Search","StartTrial","SubmitApplication","Subscribe","ViewContent"]},trackCustom:{type:"string",description:"Custom event name for trackCustom"},enabled:{type:"boolean",description:"Enable or disable this tracking rule"}},"Meta Pixel Mapping"),nn={pixelId:{"ui:placeholder":"e.g., 1234567890123456","ui:help":"Find your Pixel ID in Meta Events Manager"}},an={track:{"ui:placeholder":"Select standard event","ui:help":"Use standard events for better conversion tracking"},trackCustom:{"ui:placeholder":"e.g., CustomEventName","ui:help":"Custom events for tracking non-standard actions"},"ui:order":["track","trackCustom"]},on={type:"meta-pixel",config:{},init:function(e){var t=e.config,r=e.env,n=t.settings,a=void 0===n?{}:n,i=t.loadScript,o=a.pixelId;return i&&function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"https://connect.facebook.net/en_US/fbevents.js",r=C(e).document,n=r.createElement("script");n.src=t,n.async=!0,r.head.appendChild(n)}(r),!!o&&(function(e){var t=C(e).window;if(!t.fbq){var r=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.callMethod?r.callMethod.apply(r,t):r.queue.push(t)};t.fbq=r,t._fbq||(t._fbq=r),r.push=r,r.loaded=!0,r.version="2.0",r.queue=[]}}(r),(0,C(r).window.fbq)("init",o),t)},push:function(e,t){t.config;var r=t.mapping,n=void 0===r?{}:r,a=t.data,i=t.env,o=n.settings||{},s=o.track,u=o.trackCustom,c=C(i).window.fbq;"page view"!==e.name||n.settings||(e.name="PageView");var l=s||u||e.name;c(u?"trackCustom":"track",String(l),O(a)?a:{},{eventID:e.id})}},sn=on;return Hr=U,function(e,t,r,n){if(t&&"object"===(void 0===t?"undefined":_type_of(t))||"function"==typeof t){var a=!0,i=!1,o=void 0;try{for(var s,u=function(){var a=s.value;D.call(e,a)||a===r||R(e,a,{get:function(){return t[a]},enumerable:!(n=L(t,a))||n.enumerable})},c=F(t)[Symbol.iterator]();!(a=(s=c.next()).done);a=!0)u()}catch(e){i=!0,o=e}finally{try{a||null==c.return||c.return()}finally{if(i)throw o}}}return e}(R({},"__esModule",{value:!0}),Hr)}();