@botpress/sdk 2.5.0 → 3.0.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/.turbo/turbo-build.log +11 -5
- package/dist/bot/client/index.d.ts +6 -0
- package/dist/bot/client/types.d.ts +87 -0
- package/dist/bot/definition.d.ts +17 -9
- package/dist/bot/implementation.d.ts +11 -10
- package/dist/bot/index.d.ts +1 -1
- package/dist/bot/server/types.d.ts +32 -26
- package/dist/bot/types/common.d.ts +6 -2
- package/dist/bot/types/generic.d.ts +110 -9
- package/dist/fixtures.d.ts +49 -0
- package/dist/index.cjs +129 -0
- package/dist/index.cjs.map +7 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +123 -0
- package/dist/index.mjs.map +7 -0
- package/dist/integration/client/types.d.ts +2 -1
- package/dist/integration/definition/index.d.ts +48 -12
- package/dist/integration/definition/types.d.ts +6 -1
- package/dist/integration/index.d.ts +1 -1
- package/dist/integration/types/common.d.ts +0 -7
- package/dist/interface/definition.d.ts +0 -2
- package/dist/interface/index.d.ts +1 -0
- package/dist/interface/resolve.d.ts +18 -0
- package/dist/interface/types/index.d.ts +1 -0
- package/dist/package.d.ts +4 -2
- package/dist/plugin/action-proxy/index.d.ts +2 -0
- package/dist/plugin/action-proxy/proxy.d.ts +5 -0
- package/dist/plugin/action-proxy/types.d.ts +14 -0
- package/dist/plugin/action-proxy/types.test.d.ts +1 -0
- package/dist/plugin/definition.d.ts +11 -6
- package/dist/plugin/implementation.d.ts +21 -15
- package/dist/plugin/index.d.ts +2 -1
- package/dist/plugin/interface-resolution.d.ts +15 -0
- package/dist/plugin/server/index.d.ts +1 -0
- package/dist/plugin/server/types.d.ts +241 -1
- package/dist/plugin/types/common.d.ts +41 -0
- package/dist/plugin/types/generic.d.ts +110 -2
- package/dist/plugin/types/index.d.ts +2 -0
- package/dist/serve.d.ts +2 -2
- package/dist/utils/record-utils.d.ts +2 -0
- package/dist/utils/record-utils.test.d.ts +1 -0
- package/dist/utils/type-utils.d.ts +15 -0
- package/dist/zui.d.ts +1 -0
- package/package.json +9 -5
- package/dist/bot/merge-bots.d.ts +0 -2
- package/dist/index.js +0 -129
- package/dist/index.js.map +0 -7
package/dist/index.js
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
"use strict";var Yp=Object.create;var Ir=Object.defineProperty;var Xp=Object.getOwnPropertyDescriptor;var Qp=Object.getOwnPropertyNames;var eh=Object.getPrototypeOf,th=Object.prototype.hasOwnProperty;var Ca=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ar=(t,e)=>{for(var r in e)Ir(t,r,{get:e[r],enumerable:!0})},Bs=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Qp(e))!th.call(t,a)&&a!==r&&Ir(t,a,{get:()=>e[a],enumerable:!(n=Xp(e,a))||n.enumerable});return t};var et=(t,e,r)=>(r=t!=null?Yp(eh(t)):{},Bs(e||!t||!t.__esModule?Ir(r,"default",{value:t,enumerable:!0}):r,t)),rh=t=>Bs(Ir({},"__esModule",{value:!0}),t);var qs=Ca(H=>{"use strict";var Jt=Symbol.for("react.element"),nh=Symbol.for("react.portal"),ah=Symbol.for("react.fragment"),ih=Symbol.for("react.strict_mode"),sh=Symbol.for("react.profiler"),oh=Symbol.for("react.provider"),uh=Symbol.for("react.context"),ch=Symbol.for("react.forward_ref"),lh=Symbol.for("react.suspense"),dh=Symbol.for("react.memo"),fh=Symbol.for("react.lazy"),Ms=Symbol.iterator;function ph(t){return t===null||typeof t!="object"?null:(t=Ms&&t[Ms]||t["@@iterator"],typeof t=="function"?t:null)}var $s={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Hs=Object.assign,Us={};function Et(t,e,r){this.props=t,this.context=e,this.refs=Us,this.updater=r||$s}Et.prototype.isReactComponent={};Et.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Et.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Fs(){}Fs.prototype=Et.prototype;function Ia(t,e,r){this.props=t,this.context=e,this.refs=Us,this.updater=r||$s}var Aa=Ia.prototype=new Fs;Aa.constructor=Ia;Hs(Aa,Et.prototype);Aa.isPureReactComponent=!0;var js=Array.isArray,Ls=Object.prototype.hasOwnProperty,Ra={current:null},zs={key:!0,ref:!0,__self:!0,__source:!0};function Ks(t,e,r){var n,a={},i=null,u=null;if(e!=null)for(n in e.ref!==void 0&&(u=e.ref),e.key!==void 0&&(i=""+e.key),e)Ls.call(e,n)&&!zs.hasOwnProperty(n)&&(a[n]=e[n]);var c=arguments.length-2;if(c===1)a.children=r;else if(1<c){for(var f=Array(c),p=0;p<c;p++)f[p]=arguments[p+2];a.children=f}if(t&&t.defaultProps)for(n in c=t.defaultProps,c)a[n]===void 0&&(a[n]=c[n]);return{$$typeof:Jt,type:t,key:i,ref:u,props:a,_owner:Ra.current}}function hh(t,e){return{$$typeof:Jt,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function Da(t){return typeof t=="object"&&t!==null&&t.$$typeof===Jt}function gh(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var Ns=/\/+/g;function Za(t,e){return typeof t=="object"&&t!==null&&t.key!=null?gh(""+t.key):e.toString(36)}function Dr(t,e,r,n,a){var i=typeof t;(i==="undefined"||i==="boolean")&&(t=null);var u=!1;if(t===null)u=!0;else switch(i){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case Jt:case nh:u=!0}}if(u)return u=t,a=a(u),t=n===""?"."+Za(u,0):n,js(a)?(r="",t!=null&&(r=t.replace(Ns,"$&/")+"/"),Dr(a,e,r,"",function(p){return p})):a!=null&&(Da(a)&&(a=hh(a,r+(!a.key||u&&u.key===a.key?"":(""+a.key).replace(Ns,"$&/")+"/")+t)),e.push(a)),1;if(u=0,n=n===""?".":n+":",js(t))for(var c=0;c<t.length;c++){i=t[c];var f=n+Za(i,c);u+=Dr(i,e,r,f,a)}else if(f=ph(t),typeof f=="function")for(t=f.call(t),c=0;!(i=t.next()).done;)i=i.value,f=n+Za(i,c++),u+=Dr(i,e,r,f,a);else if(i==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return u}function Rr(t,e,r){if(t==null)return t;var n=[],a=0;return Dr(t,n,"","",function(i){return e.call(r,i,a++)}),n}function mh(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(r){(t._status===0||t._status===-1)&&(t._status=1,t._result=r)},function(r){(t._status===0||t._status===-1)&&(t._status=2,t._result=r)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var _e={current:null},Br={transition:null},yh={ReactCurrentDispatcher:_e,ReactCurrentBatchConfig:Br,ReactCurrentOwner:Ra};function Vs(){throw Error("act(...) is not supported in production builds of React.")}H.Children={map:Rr,forEach:function(t,e,r){Rr(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return Rr(t,function(){e++}),e},toArray:function(t){return Rr(t,function(e){return e})||[]},only:function(t){if(!Da(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};H.Component=Et;H.Fragment=ah;H.Profiler=sh;H.PureComponent=Ia;H.StrictMode=ih;H.Suspense=lh;H.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yh;H.act=Vs;H.cloneElement=function(t,e,r){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var n=Hs({},t.props),a=t.key,i=t.ref,u=t._owner;if(e!=null){if(e.ref!==void 0&&(i=e.ref,u=Ra.current),e.key!==void 0&&(a=""+e.key),t.type&&t.type.defaultProps)var c=t.type.defaultProps;for(f in e)Ls.call(e,f)&&!zs.hasOwnProperty(f)&&(n[f]=e[f]===void 0&&c!==void 0?c[f]:e[f])}var f=arguments.length-2;if(f===1)n.children=r;else if(1<f){c=Array(f);for(var p=0;p<f;p++)c[p]=arguments[p+2];n.children=c}return{$$typeof:Jt,type:t.type,key:a,ref:i,props:n,_owner:u}};H.createContext=function(t){return t={$$typeof:uh,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:oh,_context:t},t.Consumer=t};H.createElement=Ks;H.createFactory=function(t){var e=Ks.bind(null,t);return e.type=t,e};H.createRef=function(){return{current:null}};H.forwardRef=function(t){return{$$typeof:ch,render:t}};H.isValidElement=Da;H.lazy=function(t){return{$$typeof:fh,_payload:{_status:-1,_result:t},_init:mh}};H.memo=function(t,e){return{$$typeof:dh,type:t,compare:e===void 0?null:e}};H.startTransition=function(t){var e=Br.transition;Br.transition={};try{t()}finally{Br.transition=e}};H.unstable_act=Vs;H.useCallback=function(t,e){return _e.current.useCallback(t,e)};H.useContext=function(t){return _e.current.useContext(t)};H.useDebugValue=function(){};H.useDeferredValue=function(t){return _e.current.useDeferredValue(t)};H.useEffect=function(t,e){return _e.current.useEffect(t,e)};H.useId=function(){return _e.current.useId()};H.useImperativeHandle=function(t,e,r){return _e.current.useImperativeHandle(t,e,r)};H.useInsertionEffect=function(t,e){return _e.current.useInsertionEffect(t,e)};H.useLayoutEffect=function(t,e){return _e.current.useLayoutEffect(t,e)};H.useMemo=function(t,e){return _e.current.useMemo(t,e)};H.useReducer=function(t,e,r){return _e.current.useReducer(t,e,r)};H.useRef=function(t){return _e.current.useRef(t)};H.useState=function(t){return _e.current.useState(t)};H.useSyncExternalStore=function(t,e,r){return _e.current.useSyncExternalStore(t,e,r)};H.useTransition=function(){return _e.current.useTransition()};H.version="18.3.1"});var Gs=Ca((U,Mr)=>{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t="18.3.1",e=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),j=Symbol.iterator,W="@@iterator";function Y(o){if(o===null||typeof o!="object")return null;var d=j&&o[j]||o[W];return typeof d=="function"?d:null}var K={current:null},B={transition:null},$={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},V={current:null},re={},Ce=null;function De(o){Ce=o}re.setExtraStackFrame=function(o){Ce=o},re.getCurrentStack=null,re.getStackAddendum=function(){var o="";Ce&&(o+=Ce);var d=re.getCurrentStack;return d&&(o+=d()||""),o};var xe=!1,me=!1,Kt=!1,Vt=!1,ye=!1,oe={ReactCurrentDispatcher:K,ReactCurrentBatchConfig:B,ReactCurrentOwner:V};oe.ReactDebugCurrentFrame=re,oe.ReactCurrentActQueue=$;function le(o){{for(var d=arguments.length,h=new Array(d>1?d-1:0),m=1;m<d;m++)h[m-1]=arguments[m];Ze("warn",o,h)}}function N(o){{for(var d=arguments.length,h=new Array(d>1?d-1:0),m=1;m<d;m++)h[m-1]=arguments[m];Ze("error",o,h)}}function Ze(o,d,h){{var m=oe.ReactDebugCurrentFrame,b=m.getStackAddendum();b!==""&&(d+="%s",h=h.concat([b]));var C=h.map(function(S){return String(S)});C.unshift("Warning: "+d),Function.prototype.apply.call(console[o],console,C)}}var Oe={};function Ke(o,d){{var h=o.constructor,m=h&&(h.displayName||h.name)||"ReactClass",b=m+"."+d;if(Oe[b])return;N("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",d,m),Oe[b]=!0}}var Ji={isMounted:function(o){return!1},enqueueForceUpdate:function(o,d,h){Ke(o,"forceUpdate")},enqueueReplaceState:function(o,d,h,m){Ke(o,"replaceState")},enqueueSetState:function(o,d,h,m){Ke(o,"setState")}},Be=Object.assign,fa={};Object.freeze(fa);function Qe(o,d,h){this.props=o,this.context=d,this.refs=fa,this.updater=h||Ji}Qe.prototype.isReactComponent={},Qe.prototype.setState=function(o,d){if(typeof o!="object"&&typeof o!="function"&&o!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,o,d,"setState")},Qe.prototype.forceUpdate=function(o){this.updater.enqueueForceUpdate(this,o,"forceUpdate")};{var pa={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},zf=function(o,d){Object.defineProperty(Qe.prototype,o,{get:function(){le("%s(...) is deprecated in plain JavaScript React classes. %s",d[0],d[1])}})};for(var ha in pa)pa.hasOwnProperty(ha)&&zf(ha,pa[ha])}function Yi(){}Yi.prototype=Qe.prototype;function ga(o,d,h){this.props=o,this.context=d,this.refs=fa,this.updater=h||Ji}var ma=ga.prototype=new Yi;ma.constructor=ga,Be(ma,Qe.prototype),ma.isPureReactComponent=!0;function Kf(){var o={current:null};return Object.seal(o),o}var Vf=Array.isArray;function br(o){return Vf(o)}function qf(o){{var d=typeof Symbol=="function"&&Symbol.toStringTag,h=d&&o[Symbol.toStringTag]||o.constructor.name||"Object";return h}}function Gf(o){try{return Xi(o),!1}catch{return!0}}function Xi(o){return""+o}function Tr(o){if(Gf(o))return N("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",qf(o)),Xi(o)}function Wf(o,d,h){var m=o.displayName;if(m)return m;var b=d.displayName||d.name||"";return b!==""?h+"("+b+")":h}function Qi(o){return o.displayName||"Context"}function Ve(o){if(o==null)return null;if(typeof o.tag=="number"&&N("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case a:return"StrictMode";case p:return"Suspense";case y:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case c:var d=o;return Qi(d)+".Consumer";case u:var h=o;return Qi(h._context)+".Provider";case f:return Wf(o,o.render,"ForwardRef");case T:var m=o.displayName||null;return m!==null?m:Ve(o.type)||"Memo";case Z:{var b=o,C=b._payload,S=b._init;try{return Ve(S(C))}catch{return null}}}return null}var qt=Object.prototype.hasOwnProperty,es={key:!0,ref:!0,__self:!0,__source:!0},ts,rs,ya;ya={};function ns(o){if(qt.call(o,"ref")){var d=Object.getOwnPropertyDescriptor(o,"ref").get;if(d&&d.isReactWarning)return!1}return o.ref!==void 0}function as(o){if(qt.call(o,"key")){var d=Object.getOwnPropertyDescriptor(o,"key").get;if(d&&d.isReactWarning)return!1}return o.key!==void 0}function Jf(o,d){var h=function(){ts||(ts=!0,N("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",d))};h.isReactWarning=!0,Object.defineProperty(o,"key",{get:h,configurable:!0})}function Yf(o,d){var h=function(){rs||(rs=!0,N("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",d))};h.isReactWarning=!0,Object.defineProperty(o,"ref",{get:h,configurable:!0})}function Xf(o){if(typeof o.ref=="string"&&V.current&&o.__self&&V.current.stateNode!==o.__self){var d=Ve(V.current.type);ya[d]||(N('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',d,o.ref),ya[d]=!0)}}var va=function(o,d,h,m,b,C,S){var R={$$typeof:e,type:o,key:d,ref:h,props:S,_owner:C};return R._store={},Object.defineProperty(R._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(R,"_self",{configurable:!1,enumerable:!1,writable:!1,value:m}),Object.defineProperty(R,"_source",{configurable:!1,enumerable:!1,writable:!1,value:b}),Object.freeze&&(Object.freeze(R.props),Object.freeze(R)),R};function Qf(o,d,h){var m,b={},C=null,S=null,R=null,L=null;if(d!=null){ns(d)&&(S=d.ref,Xf(d)),as(d)&&(Tr(d.key),C=""+d.key),R=d.__self===void 0?null:d.__self,L=d.__source===void 0?null:d.__source;for(m in d)qt.call(d,m)&&!es.hasOwnProperty(m)&&(b[m]=d[m])}var X=arguments.length-2;if(X===1)b.children=h;else if(X>1){for(var ee=Array(X),te=0;te<X;te++)ee[te]=arguments[te+2];Object.freeze&&Object.freeze(ee),b.children=ee}if(o&&o.defaultProps){var ne=o.defaultProps;for(m in ne)b[m]===void 0&&(b[m]=ne[m])}if(C||S){var ue=typeof o=="function"?o.displayName||o.name||"Unknown":o;C&&Jf(b,ue),S&&Yf(b,ue)}return va(o,C,S,R,L,V.current,b)}function ep(o,d){var h=va(o.type,d,o.ref,o._self,o._source,o._owner,o.props);return h}function tp(o,d,h){if(o==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+o+".");var m,b=Be({},o.props),C=o.key,S=o.ref,R=o._self,L=o._source,X=o._owner;if(d!=null){ns(d)&&(S=d.ref,X=V.current),as(d)&&(Tr(d.key),C=""+d.key);var ee;o.type&&o.type.defaultProps&&(ee=o.type.defaultProps);for(m in d)qt.call(d,m)&&!es.hasOwnProperty(m)&&(d[m]===void 0&&ee!==void 0?b[m]=ee[m]:b[m]=d[m])}var te=arguments.length-2;if(te===1)b.children=h;else if(te>1){for(var ne=Array(te),ue=0;ue<te;ue++)ne[ue]=arguments[ue+2];b.children=ne}return va(o.type,C,S,R,L,X,b)}function _t(o){return typeof o=="object"&&o!==null&&o.$$typeof===e}var is=".",rp=":";function np(o){var d=/[=:]/g,h={"=":"=0",":":"=2"},m=o.replace(d,function(b){return h[b]});return"$"+m}var ss=!1,ap=/\/+/g;function os(o){return o.replace(ap,"$&/")}function _a(o,d){return typeof o=="object"&&o!==null&&o.key!=null?(Tr(o.key),np(""+o.key)):d.toString(36)}function Er(o,d,h,m,b){var C=typeof o;(C==="undefined"||C==="boolean")&&(o=null);var S=!1;if(o===null)S=!0;else switch(C){case"string":case"number":S=!0;break;case"object":switch(o.$$typeof){case e:case r:S=!0}}if(S){var R=o,L=b(R),X=m===""?is+_a(R,0):m;if(br(L)){var ee="";X!=null&&(ee=os(X)+"/"),Er(L,d,ee,"",function(Jp){return Jp})}else L!=null&&(_t(L)&&(L.key&&(!R||R.key!==L.key)&&Tr(L.key),L=ep(L,h+(L.key&&(!R||R.key!==L.key)?os(""+L.key)+"/":"")+X)),d.push(L));return 1}var te,ne,ue=0,fe=m===""?is:m+rp;if(br(o))for(var Zr=0;Zr<o.length;Zr++)te=o[Zr],ne=fe+_a(te,Zr),ue+=Er(te,d,h,ne,b);else{var Oa=Y(o);if(typeof Oa=="function"){var As=o;Oa===As.entries&&(ss||le("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),ss=!0);for(var Gp=Oa.call(As),Rs,Wp=0;!(Rs=Gp.next()).done;)te=Rs.value,ne=fe+_a(te,Wp++),ue+=Er(te,d,h,ne,b)}else if(C==="object"){var Ds=String(o);throw new Error("Objects are not valid as a React child (found: "+(Ds==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":Ds)+"). If you meant to render a collection of children, use an array instead.")}}return ue}function Pr(o,d,h){if(o==null)return o;var m=[],b=0;return Er(o,m,"","",function(C){return d.call(h,C,b++)}),m}function ip(o){var d=0;return Pr(o,function(){d++}),d}function sp(o,d,h){Pr(o,function(){d.apply(this,arguments)},h)}function op(o){return Pr(o,function(d){return d})||[]}function up(o){if(!_t(o))throw new Error("React.Children.only expected to receive a single React element child.");return o}function cp(o){var d={$$typeof:c,_currentValue:o,_currentValue2:o,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};d.Provider={$$typeof:u,_context:d};var h=!1,m=!1,b=!1;{var C={$$typeof:c,_context:d};Object.defineProperties(C,{Provider:{get:function(){return m||(m=!0,N("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),d.Provider},set:function(S){d.Provider=S}},_currentValue:{get:function(){return d._currentValue},set:function(S){d._currentValue=S}},_currentValue2:{get:function(){return d._currentValue2},set:function(S){d._currentValue2=S}},_threadCount:{get:function(){return d._threadCount},set:function(S){d._threadCount=S}},Consumer:{get:function(){return h||(h=!0,N("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),d.Consumer}},displayName:{get:function(){return d.displayName},set:function(S){b||(le("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",S),b=!0)}}}),d.Consumer=C}return d._currentRenderer=null,d._currentRenderer2=null,d}var Gt=-1,ba=0,us=1,lp=2;function dp(o){if(o._status===Gt){var d=o._result,h=d();if(h.then(function(C){if(o._status===ba||o._status===Gt){var S=o;S._status=us,S._result=C}},function(C){if(o._status===ba||o._status===Gt){var S=o;S._status=lp,S._result=C}}),o._status===Gt){var m=o;m._status=ba,m._result=h}}if(o._status===us){var b=o._result;return b===void 0&&N(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
2
|
-
|
|
3
|
-
Your code should look like:
|
|
4
|
-
const MyComponent = lazy(() => import('./MyComponent'))
|
|
5
|
-
|
|
6
|
-
Did you accidentally put curly braces around the import?`,b),"default"in b||N(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
7
|
-
|
|
8
|
-
Your code should look like:
|
|
9
|
-
const MyComponent = lazy(() => import('./MyComponent'))`,b),b.default}else throw o._result}function fp(o){var d={_status:Gt,_result:o},h={$$typeof:Z,_payload:d,_init:dp};{var m,b;Object.defineProperties(h,{defaultProps:{configurable:!0,get:function(){return m},set:function(C){N("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),m=C,Object.defineProperty(h,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return b},set:function(C){N("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),b=C,Object.defineProperty(h,"propTypes",{enumerable:!0})}}})}return h}function pp(o){o!=null&&o.$$typeof===T?N("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof o!="function"?N("forwardRef requires a render function but was given %s.",o===null?"null":typeof o):o.length!==0&&o.length!==2&&N("forwardRef render functions accept exactly two parameters: props and ref. %s",o.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),o!=null&&(o.defaultProps!=null||o.propTypes!=null)&&N("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var d={$$typeof:f,render:o};{var h;Object.defineProperty(d,"displayName",{enumerable:!1,configurable:!0,get:function(){return h},set:function(m){h=m,!o.name&&!o.displayName&&(o.displayName=m)}})}return d}var cs;cs=Symbol.for("react.module.reference");function ls(o){return!!(typeof o=="string"||typeof o=="function"||o===n||o===i||ye||o===a||o===p||o===y||Vt||o===w||xe||me||Kt||typeof o=="object"&&o!==null&&(o.$$typeof===Z||o.$$typeof===T||o.$$typeof===u||o.$$typeof===c||o.$$typeof===f||o.$$typeof===cs||o.getModuleId!==void 0))}function hp(o,d){ls(o)||N("memo: The first argument must be a component. Instead received: %s",o===null?"null":typeof o);var h={$$typeof:T,type:o,compare:d===void 0?null:d};{var m;Object.defineProperty(h,"displayName",{enumerable:!1,configurable:!0,get:function(){return m},set:function(b){m=b,!o.name&&!o.displayName&&(o.displayName=b)}})}return h}function ve(){var o=K.current;return o===null&&N(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
10
|
-
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
11
|
-
2. You might be breaking the Rules of Hooks
|
|
12
|
-
3. You might have more than one copy of React in the same app
|
|
13
|
-
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),o}function gp(o){var d=ve();if(o._context!==void 0){var h=o._context;h.Consumer===o?N("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):h.Provider===o&&N("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return d.useContext(o)}function mp(o){var d=ve();return d.useState(o)}function yp(o,d,h){var m=ve();return m.useReducer(o,d,h)}function vp(o){var d=ve();return d.useRef(o)}function _p(o,d){var h=ve();return h.useEffect(o,d)}function bp(o,d){var h=ve();return h.useInsertionEffect(o,d)}function Tp(o,d){var h=ve();return h.useLayoutEffect(o,d)}function Ep(o,d){var h=ve();return h.useCallback(o,d)}function Pp(o,d){var h=ve();return h.useMemo(o,d)}function Sp(o,d,h){var m=ve();return m.useImperativeHandle(o,d,h)}function xp(o,d){{var h=ve();return h.useDebugValue(o,d)}}function wp(){var o=ve();return o.useTransition()}function kp(o){var d=ve();return d.useDeferredValue(o)}function Op(){var o=ve();return o.useId()}function Cp(o,d,h){var m=ve();return m.useSyncExternalStore(o,d,h)}var Wt=0,ds,fs,ps,hs,gs,ms,ys;function vs(){}vs.__reactDisabledLog=!0;function Zp(){{if(Wt===0){ds=console.log,fs=console.info,ps=console.warn,hs=console.error,gs=console.group,ms=console.groupCollapsed,ys=console.groupEnd;var o={configurable:!0,enumerable:!0,value:vs,writable:!0};Object.defineProperties(console,{info:o,log:o,warn:o,error:o,group:o,groupCollapsed:o,groupEnd:o})}Wt++}}function Ip(){{if(Wt--,Wt===0){var o={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Be({},o,{value:ds}),info:Be({},o,{value:fs}),warn:Be({},o,{value:ps}),error:Be({},o,{value:hs}),group:Be({},o,{value:gs}),groupCollapsed:Be({},o,{value:ms}),groupEnd:Be({},o,{value:ys})})}Wt<0&&N("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ta=oe.ReactCurrentDispatcher,Ea;function Sr(o,d,h){{if(Ea===void 0)try{throw Error()}catch(b){var m=b.stack.trim().match(/\n( *(at )?)/);Ea=m&&m[1]||""}return`
|
|
14
|
-
`+Ea+o}}var Pa=!1,xr;{var Ap=typeof WeakMap=="function"?WeakMap:Map;xr=new Ap}function _s(o,d){if(!o||Pa)return"";{var h=xr.get(o);if(h!==void 0)return h}var m;Pa=!0;var b=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var C;C=Ta.current,Ta.current=null,Zp();try{if(d){var S=function(){throw Error()};if(Object.defineProperty(S.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(S,[])}catch(fe){m=fe}Reflect.construct(o,[],S)}else{try{S.call()}catch(fe){m=fe}o.call(S.prototype)}}else{try{throw Error()}catch(fe){m=fe}o()}}catch(fe){if(fe&&m&&typeof fe.stack=="string"){for(var R=fe.stack.split(`
|
|
15
|
-
`),L=m.stack.split(`
|
|
16
|
-
`),X=R.length-1,ee=L.length-1;X>=1&&ee>=0&&R[X]!==L[ee];)ee--;for(;X>=1&&ee>=0;X--,ee--)if(R[X]!==L[ee]){if(X!==1||ee!==1)do if(X--,ee--,ee<0||R[X]!==L[ee]){var te=`
|
|
17
|
-
`+R[X].replace(" at new "," at ");return o.displayName&&te.includes("<anonymous>")&&(te=te.replace("<anonymous>",o.displayName)),typeof o=="function"&&xr.set(o,te),te}while(X>=1&&ee>=0);break}}}finally{Pa=!1,Ta.current=C,Ip(),Error.prepareStackTrace=b}var ne=o?o.displayName||o.name:"",ue=ne?Sr(ne):"";return typeof o=="function"&&xr.set(o,ue),ue}function Rp(o,d,h){return _s(o,!1)}function Dp(o){var d=o.prototype;return!!(d&&d.isReactComponent)}function wr(o,d,h){if(o==null)return"";if(typeof o=="function")return _s(o,Dp(o));if(typeof o=="string")return Sr(o);switch(o){case p:return Sr("Suspense");case y:return Sr("SuspenseList")}if(typeof o=="object")switch(o.$$typeof){case f:return Rp(o.render);case T:return wr(o.type,d,h);case Z:{var m=o,b=m._payload,C=m._init;try{return wr(C(b),d,h)}catch{}}}return""}var bs={},Ts=oe.ReactDebugCurrentFrame;function kr(o){if(o){var d=o._owner,h=wr(o.type,o._source,d?d.type:null);Ts.setExtraStackFrame(h)}else Ts.setExtraStackFrame(null)}function Bp(o,d,h,m,b){{var C=Function.call.bind(qt);for(var S in o)if(C(o,S)){var R=void 0;try{if(typeof o[S]!="function"){var L=Error((m||"React class")+": "+h+" type `"+S+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[S]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw L.name="Invariant Violation",L}R=o[S](d,S,m,h,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(X){R=X}R&&!(R instanceof Error)&&(kr(b),N("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",m||"React class",h,S,typeof R),kr(null)),R instanceof Error&&!(R.message in bs)&&(bs[R.message]=!0,kr(b),N("Failed %s type: %s",h,R.message),kr(null))}}}function bt(o){if(o){var d=o._owner,h=wr(o.type,o._source,d?d.type:null);De(h)}else De(null)}var Sa;Sa=!1;function Es(){if(V.current){var o=Ve(V.current.type);if(o)return`
|
|
18
|
-
|
|
19
|
-
Check the render method of \``+o+"`."}return""}function Mp(o){if(o!==void 0){var d=o.fileName.replace(/^.*[\\\/]/,""),h=o.lineNumber;return`
|
|
20
|
-
|
|
21
|
-
Check your code at `+d+":"+h+"."}return""}function jp(o){return o!=null?Mp(o.__source):""}var Ps={};function Np(o){var d=Es();if(!d){var h=typeof o=="string"?o:o.displayName||o.name;h&&(d=`
|
|
22
|
-
|
|
23
|
-
Check the top-level render call using <`+h+">.")}return d}function Ss(o,d){if(!(!o._store||o._store.validated||o.key!=null)){o._store.validated=!0;var h=Np(d);if(!Ps[h]){Ps[h]=!0;var m="";o&&o._owner&&o._owner!==V.current&&(m=" It was passed a child from "+Ve(o._owner.type)+"."),bt(o),N('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',h,m),bt(null)}}}function xs(o,d){if(typeof o=="object"){if(br(o))for(var h=0;h<o.length;h++){var m=o[h];_t(m)&&Ss(m,d)}else if(_t(o))o._store&&(o._store.validated=!0);else if(o){var b=Y(o);if(typeof b=="function"&&b!==o.entries)for(var C=b.call(o),S;!(S=C.next()).done;)_t(S.value)&&Ss(S.value,d)}}}function ws(o){{var d=o.type;if(d==null||typeof d=="string")return;var h;if(typeof d=="function")h=d.propTypes;else if(typeof d=="object"&&(d.$$typeof===f||d.$$typeof===T))h=d.propTypes;else return;if(h){var m=Ve(d);Bp(h,o.props,"prop",m,o)}else if(d.PropTypes!==void 0&&!Sa){Sa=!0;var b=Ve(d);N("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",b||"Unknown")}typeof d.getDefaultProps=="function"&&!d.getDefaultProps.isReactClassApproved&&N("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function $p(o){{for(var d=Object.keys(o.props),h=0;h<d.length;h++){var m=d[h];if(m!=="children"&&m!=="key"){bt(o),N("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",m),bt(null);break}}o.ref!==null&&(bt(o),N("Invalid attribute `ref` supplied to `React.Fragment`."),bt(null))}}function ks(o,d,h){var m=ls(o);if(!m){var b="";(o===void 0||typeof o=="object"&&o!==null&&Object.keys(o).length===0)&&(b+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var C=jp(d);C?b+=C:b+=Es();var S;o===null?S="null":br(o)?S="array":o!==void 0&&o.$$typeof===e?(S="<"+(Ve(o.type)||"Unknown")+" />",b=" Did you accidentally export a JSX literal instead of a component?"):S=typeof o,N("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",S,b)}var R=Qf.apply(this,arguments);if(R==null)return R;if(m)for(var L=2;L<arguments.length;L++)xs(arguments[L],o);return o===n?$p(R):ws(R),R}var Os=!1;function Hp(o){var d=ks.bind(null,o);return d.type=o,Os||(Os=!0,le("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(d,"type",{enumerable:!1,get:function(){return le("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:o}),o}}),d}function Up(o,d,h){for(var m=tp.apply(this,arguments),b=2;b<arguments.length;b++)xs(arguments[b],m.type);return ws(m),m}function Fp(o,d){var h=B.transition;B.transition={};var m=B.transition;B.transition._updatedFibers=new Set;try{o()}finally{if(B.transition=h,h===null&&m._updatedFibers){var b=m._updatedFibers.size;b>10&&le("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),m._updatedFibers.clear()}}}var Cs=!1,Or=null;function Lp(o){if(Or===null)try{var d=("require"+Math.random()).slice(0,7),h=Mr&&Mr[d];Or=h.call(Mr,"timers").setImmediate}catch{Or=function(b){Cs===!1&&(Cs=!0,typeof MessageChannel>"u"&&N("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var C=new MessageChannel;C.port1.onmessage=b,C.port2.postMessage(void 0)}}return Or(o)}var Tt=0,Zs=!1;function Is(o){{var d=Tt;Tt++,$.current===null&&($.current=[]);var h=$.isBatchingLegacy,m;try{if($.isBatchingLegacy=!0,m=o(),!h&&$.didScheduleLegacyUpdate){var b=$.current;b!==null&&($.didScheduleLegacyUpdate=!1,ka(b))}}catch(ne){throw Cr(d),ne}finally{$.isBatchingLegacy=h}if(m!==null&&typeof m=="object"&&typeof m.then=="function"){var C=m,S=!1,R={then:function(ne,ue){S=!0,C.then(function(fe){Cr(d),Tt===0?xa(fe,ne,ue):ne(fe)},function(fe){Cr(d),ue(fe)})}};return!Zs&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){S||(Zs=!0,N("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),R}else{var L=m;if(Cr(d),Tt===0){var X=$.current;X!==null&&(ka(X),$.current=null);var ee={then:function(ne,ue){$.current===null?($.current=[],xa(L,ne,ue)):ne(L)}};return ee}else{var te={then:function(ne,ue){ne(L)}};return te}}}}function Cr(o){o!==Tt-1&&N("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Tt=o}function xa(o,d,h){{var m=$.current;if(m!==null)try{ka(m),Lp(function(){m.length===0?($.current=null,d(o)):xa(o,d,h)})}catch(b){h(b)}else d(o)}}var wa=!1;function ka(o){if(!wa){wa=!0;var d=0;try{for(;d<o.length;d++){var h=o[d];do h=h(!0);while(h!==null)}o.length=0}catch(m){throw o=o.slice(d+1),m}finally{wa=!1}}}var zp=ks,Kp=Up,Vp=Hp,qp={map:Pr,forEach:sp,count:ip,toArray:op,only:up};U.Children=qp,U.Component=Qe,U.Fragment=n,U.Profiler=i,U.PureComponent=ga,U.StrictMode=a,U.Suspense=p,U.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oe,U.act=Is,U.cloneElement=Kp,U.createContext=cp,U.createElement=zp,U.createFactory=Vp,U.createRef=Kf,U.forwardRef=pp,U.isValidElement=_t,U.lazy=fp,U.memo=hp,U.startTransition=Fp,U.unstable_act=Is,U.useCallback=Ep,U.useContext=gp,U.useDebugValue=xp,U.useDeferredValue=kp,U.useEffect=_p,U.useId=Op,U.useImperativeHandle=Sp,U.useInsertionEffect=bp,U.useLayoutEffect=Tp,U.useMemo=Pp,U.useReducer=yp,U.useRef=vp,U.useState=mp,U.useSyncExternalStore=Cp,U.useTransition=wp,U.version=t,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()});var Pt=Ca((V_,Ba)=>{"use strict";process.env.NODE_ENV==="production"?Ba.exports=qs():Ba.exports=Gs()});var L_={};Ar(L_,{BRAND:()=>Pl,Bot:()=>oa,BotDefinition:()=>sa,BotLogger:()=>Xe,BotSpecificClient:()=>Ae,DIRTY:()=>st,EMPTY_PATH:()=>yl,ErrorBoundary:()=>It,INVALID:()=>O,Integration:()=>ia,IntegrationDefinition:()=>ra,IntegrationLogger:()=>Ye,IntegrationSpecificClient:()=>Lt,InterfaceDefinition:()=>ua,NEVER:()=>mf,OK:()=>he,ParseInputLazyPath:()=>we,ParseStatus:()=>be,Plugin:()=>la,PluginDefinition:()=>ca,RuntimeError:()=>da.RuntimeError,Schema:()=>D,ZodAny:()=>cr,ZodArray:()=>Bt,ZodBigInt:()=>Hn,ZodBoolean:()=>Un,ZodBranded:()=>Fn,ZodCatch:()=>Ln,ZodDate:()=>zn,ZodDefault:()=>dr,ZodDiscriminatedUnion:()=>_i,ZodEffects:()=>Je,ZodEnum:()=>yt,ZodError:()=>Ie,ZodFirstPartyTypeKind:()=>gi,ZodFunction:()=>Ti,ZodIntersection:()=>Kn,ZodIssueCode:()=>_,ZodLazy:()=>Vn,ZodLiteral:()=>qn,ZodMap:()=>Ei,ZodNaN:()=>Pi,ZodNativeEnum:()=>Gn,ZodNever:()=>Ge,ZodNull:()=>Wn,ZodNullable:()=>ut,ZodNumber:()=>Jn,ZodObject:()=>ct,ZodOptional:()=>He,ZodParsedType:()=>P,ZodPipeline:()=>Yn,ZodPromise:()=>pr,ZodReadonly:()=>hr,ZodRecord:()=>Si,ZodRef:()=>xi,ZodSchema:()=>D,ZodSet:()=>wi,ZodString:()=>ge,ZodSymbol:()=>Bi,ZodTransformer:()=>Je,ZodTuple:()=>lt,ZodType:()=>D,ZodUndefined:()=>Xn,ZodUnion:()=>Qn,ZodUnknown:()=>Zt,ZodVoid:()=>Mi,ZuiForm:()=>p_,addIssueToContext:()=>E,agent:()=>Td,aimodel:()=>wd,any:()=>jd,array:()=>Ud,bigint:()=>Ad,boolean:()=>Fi,botIdHeader:()=>mr,botUserIdHeader:()=>Ki,coerce:()=>gf,configurationHeader:()=>yr,configurationTypeHeader:()=>Gi,conversation:()=>vd,createZodEnum:()=>fr,cuid2Regex:()=>Oi,cuidRegex:()=>ki,custom:()=>vi,datasource:()=>kd,date:()=>Rd,datetimeRegex:()=>Di,defaultComponentDefinitions:()=>h_,discriminatedUnion:()=>Kd,effect:()=>ai,emailRegex:()=>Ii,enum:()=>rf,errorUtil:()=>k,event:()=>Ed,fromJsonSchema:()=>pf,fromObject:()=>hf,function:()=>Qd,getErrorMap:()=>Rt,getParsedType:()=>Ne,instanceof:()=>Zd,integrationIdHeader:()=>Vi,intent:()=>xd,intersection:()=>Vd,ipv4Regex:()=>Ai,ipv6Regex:()=>Ri,isAborted:()=>Xr,isApiError:()=>da.isApiError,isAsync:()=>ur,isDirty:()=>Qr,isEmojiRegex:()=>Hl,isValid:()=>Dt,jsonSchemaToZui:()=>gr,knowledgebase:()=>Od,late:()=>Cd,lazy:()=>ef,literal:()=>tf,makeIssue:()=>or,map:()=>Yd,message:()=>bd,messages:()=>zi,nan:()=>Id,nativeEnum:()=>nf,never:()=>$d,null:()=>Md,nullable:()=>of,number:()=>Ui,object:()=>Fd,objectToZui:()=>jt,objectUtil:()=>Jr,oboolean:()=>ff,onumber:()=>df,operationHeader:()=>vr,optional:()=>sf,ostring:()=>lf,parseBody:()=>ke,pipeline:()=>cf,preprocess:()=>uf,processCreateParams:()=>A,promise:()=>af,quotelessJson:()=>hl,readonly:()=>Jd,record:()=>Gd,ref:()=>Wd,serve:()=>_r,set:()=>Xd,setErrorMap:()=>yi,strictObject:()=>Ld,string:()=>Hi,symbol:()=>Dd,table:()=>Pd,tablerow:()=>Sd,transformer:()=>ai,transforms:()=>g_,tuple:()=>qd,typeHeader:()=>Wi,ulidRegex:()=>Ci,undefined:()=>Bd,union:()=>zd,unknown:()=>Nd,user:()=>_d,util:()=>M,uuidRegex:()=>Zi,variable:()=>yd,void:()=>Hd,webhookIdHeader:()=>qi,withErrorBoundary:()=>bf,z:()=>x,zuiToJsonSchema:()=>ea});module.exports=rh(L_);var zi={};Ar(zi,{defaults:()=>b_,markdown:()=>__});var An=et(Pt(),1),ae=et(Pt(),1),Ue=et(Pt(),1),Nt=et(Pt(),1),Ee=et(Pt(),1),ii=Object.defineProperty,vh=Object.defineProperties,_h=Object.getOwnPropertyDescriptors,qr=Object.getOwnPropertySymbols,Zo=Object.prototype.hasOwnProperty,Io=Object.prototype.propertyIsEnumerable,Ws=(t,e,r)=>e in t?ii(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,l=(t,e)=>{for(var r in e||(e={}))Zo.call(e,r)&&Ws(t,r,e[r]);if(qr)for(var r of qr(e))Io.call(e,r)&&Ws(t,r,e[r]);return t},g=(t,e)=>vh(t,_h(e)),s=(t,e)=>ii(t,"name",{value:e,configurable:!0}),Ao=(t,e)=>{var r={};for(var n in t)Zo.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&qr)for(var n of qr(t))e.indexOf(n)<0&&Io.call(t,n)&&(r[n]=t[n]);return r},Ro=(t,e)=>{for(var r in e)ii(t,r,{get:e[r],enumerable:!0})},x={};Ro(x,{BRAND:()=>Pl,DIRTY:()=>st,EMPTY_PATH:()=>yl,INVALID:()=>O,NEVER:()=>mf,OK:()=>he,ParseInputLazyPath:()=>we,ParseStatus:()=>be,Schema:()=>D,ZodAny:()=>cr,ZodArray:()=>Bt,ZodBigInt:()=>Hn,ZodBoolean:()=>Un,ZodBranded:()=>Fn,ZodCatch:()=>Ln,ZodDate:()=>zn,ZodDefault:()=>dr,ZodDiscriminatedUnion:()=>_i,ZodEffects:()=>Je,ZodEnum:()=>yt,ZodError:()=>Ie,ZodFirstPartyTypeKind:()=>gi,ZodFunction:()=>Ti,ZodIntersection:()=>Kn,ZodIssueCode:()=>_,ZodLazy:()=>Vn,ZodLiteral:()=>qn,ZodMap:()=>Ei,ZodNaN:()=>Pi,ZodNativeEnum:()=>Gn,ZodNever:()=>Ge,ZodNull:()=>Wn,ZodNullable:()=>ut,ZodNumber:()=>Jn,ZodObject:()=>ct,ZodOptional:()=>He,ZodParsedType:()=>P,ZodPipeline:()=>Yn,ZodPromise:()=>pr,ZodReadonly:()=>hr,ZodRecord:()=>Si,ZodRef:()=>xi,ZodSchema:()=>D,ZodSet:()=>wi,ZodString:()=>ge,ZodSymbol:()=>Bi,ZodTransformer:()=>Je,ZodTuple:()=>lt,ZodType:()=>D,ZodUndefined:()=>Xn,ZodUnion:()=>Qn,ZodUnknown:()=>Zt,ZodVoid:()=>Mi,addIssueToContext:()=>E,agent:()=>Td,aimodel:()=>wd,any:()=>jd,array:()=>Ud,bigint:()=>Ad,boolean:()=>Fi,coerce:()=>gf,conversation:()=>vd,createZodEnum:()=>fr,cuid2Regex:()=>Oi,cuidRegex:()=>ki,custom:()=>vi,datasource:()=>kd,date:()=>Rd,datetimeRegex:()=>Di,default:()=>Lv,discriminatedUnion:()=>Kd,effect:()=>ai,emailRegex:()=>Ii,enum:()=>rf,errorUtil:()=>k,event:()=>Ed,fromJsonSchema:()=>pf,fromObject:()=>hf,function:()=>Qd,getErrorMap:()=>Rt,getParsedType:()=>Ne,instanceof:()=>Zd,intent:()=>xd,intersection:()=>Vd,ipv4Regex:()=>Ai,ipv6Regex:()=>Ri,isAborted:()=>Xr,isAsync:()=>ur,isDirty:()=>Qr,isEmojiRegex:()=>Hl,isValid:()=>Dt,jsonSchemaToZui:()=>gr,knowledgebase:()=>Od,late:()=>Cd,lazy:()=>ef,literal:()=>tf,makeIssue:()=>or,map:()=>Yd,message:()=>bd,nan:()=>Id,nativeEnum:()=>nf,never:()=>$d,null:()=>Md,nullable:()=>of,number:()=>Ui,object:()=>Fd,objectToZui:()=>jt,objectUtil:()=>Jr,oboolean:()=>ff,onumber:()=>df,optional:()=>sf,ostring:()=>lf,pipeline:()=>cf,preprocess:()=>uf,processCreateParams:()=>A,promise:()=>af,quotelessJson:()=>hl,readonly:()=>Jd,record:()=>Gd,ref:()=>Wd,set:()=>Xd,setErrorMap:()=>yi,strictObject:()=>Ld,string:()=>Hi,symbol:()=>Dd,table:()=>Pd,tablerow:()=>Sd,transformer:()=>ai,tuple:()=>qd,ulidRegex:()=>Ci,undefined:()=>Bd,union:()=>zd,unknown:()=>Nd,user:()=>_d,util:()=>M,uuidRegex:()=>Zi,variable:()=>yd,void:()=>Hd,zuiToJsonSchema:()=>ea});var F="x-zui",Do=(0,ae.createContext)({formData:void 0,formSchema:void 0,setFormData:s(()=>{throw new Error("Must be within a FormDataProvider")},"setFormData"),setHiddenState:s(()=>{throw new Error("Must be within a FormDataProvider")},"setHiddenState"),setDisabledState:s(()=>{throw new Error("Must be within a FormDataProvider")},"setDisabledState"),hiddenState:{},disabledState:{},validation:{formValid:null,formErrors:null}}),Js=s((t,e,r)=>{var n;let a=(n=e[F])==null?void 0:n[t];if(typeof a>"u")return!1;if(typeof a=="boolean")return a;if(typeof a=="string"){if(typeof window>"u")return console.warn("Function evaluation is not supported in server side rendering"),!1;let u=new Function("return "+a)()(r);switch(typeof u){case"object":case"boolean":return u;default:return!1}}return!1},"parseMaskableField"),Bo=s((t,e)=>{let r=(0,ae.useContext)(Do);if(r===void 0)throw new Error("useFormData must be used within a FormDataProvider");let n=(0,ae.useMemo)(()=>at(r.formData,e),[r.formData,e]),a=(0,ae.useMemo)(()=>{var w;return r.validation.formValid===null?{formValid:null,formErrors:null}:r.validation.formValid===!1?{formValid:!1,formErrors:((w=r.validation.formErrors)==null?void 0:w.filter(j=>No(j.path,e)).map(j=>({message:j.message,code:j.code,path:e})))||null}:{formValid:!0,formErrors:[]}},[r.validation.formValid,r.validation.formErrors,e]),i=r.dataTransform?r.dataTransform(n):n,u=(0,ae.useMemo)(()=>Js("hidden",t,i),[t,i]),c=(0,ae.useMemo)(()=>Js("disabled",t,i),[t,i]);(0,ae.useEffect)(()=>{r.setHiddenState(w=>St(w,e,u||{})),r.setDisabledState(w=>St(w,e,c||{}))},[JSON.stringify({fieldSchema:t,data:n})]);let{disabled:f,hidden:p}=(0,ae.useMemo)(()=>{let w=u===!0||at(r.hiddenState,e),j=c===!0||at(r.disabledState,e);return{hidden:w===!0,disabled:j===!0}},[r.hiddenState,r.disabledState,u,c,e]),y=(0,ae.useCallback)((w,j)=>{r.setFormData(W=>St(W,w,j))},[r.setFormData]),T=(0,ae.useCallback)((w,j=void 0)=>{let W=Ct(t.items);r.setFormData(Y=>{let K=at(Y,w)||[];return j===void 0&&(j=W),St(Y,w,Array.isArray(K)?[...K,j]:[j])})},[r.setFormData]),Z=(0,ae.useCallback)((w,j)=>{r.setFormData(W=>{let Y=at(W,w)||[];return Array.isArray(Y)?(Y.splice(j,1),St(W,w,Y)):W})},[r.setFormData]);return l(g(l({},r),{data:n,disabled:f,hidden:p,handlePropertyChange:y,addArrayItem:T,removeArrayItem:Z}),a)},"useFormData");function St(t,e,r){if(e.length===0)return r;let n=e.length;return e.reduce((a,i,u)=>(u===n-1?a[i]=r:a[i]||(a[i]=isNaN(Number(i))?{}:[]),a[i]),t??{}),l({},t)}s(St,"setObjectPath");var Ct=s((t,e)=>{var r,n,a,i;if(Array.isArray(t))return Ct(t[0]);if(t.default)return t.default;if(t.nullable)return null;if(!e){if((r=t.anyOf)!=null&&r.length)return Ct(t.anyOf[0]);if(t.type==="object"&&t.properties){let u={};return Object.entries(t.properties).map(([c,f])=>{var p;u[c]=Ct(f,!((p=t.required)!=null&&p.includes(c))||Mo(f)||!1)}),u}if(t.type==="array")return t.minItems&&t.minItems>0?[Ct(t.items)]:[];if(t.type==="string")return(n=t.enum)!=null&&n.length?t.enum[0]:"";if(t.type==="number")return(a=t.enum)!=null&&a.length?t.enum[0]:0;if(t.type==="boolean")return(i=t.enum)!=null&&i.length?t.enum[0]:!1}},"getDefaultValues"),bh=s(({children:t,setFormData:e,formData:r,formSchema:n,disableValidation:a,onValidation:i,dataTransform:u})=>{let[c,f]=(0,ae.useState)({}),[p,y]=(0,ae.useState)({}),T=u?u(r):r,Z=(0,ae.useMemo)(()=>{if(a)return{formValid:null,formErrors:null};if(!n)return{formValid:null,formErrors:null};let w=gr(n).safeParse(T);return w.success?{formValid:!0,formErrors:[]}:{formValid:!1,formErrors:w.error.issues}},[JSON.stringify({transformedData:T})]);return(0,ae.useEffect)(()=>{i&&i(Z)},[Z]),ae.default.createElement(Do.Provider,{value:{formData:r,setFormData:e,formSchema:n,validation:Z,hiddenState:c,setHiddenState:f,disabledState:p,setDisabledState:y,dataTransform:u}},t)},"FormDataProvider");function at(t,e){return e.reduce((r,n)=>r?r[n]:null,t)}s(at,"getPathData");function Mo(t){var e;return((e=t.anyOf)==null?void 0:e.some(r=>r.not&&Object.keys(r.not).length===0))||!1}s(Mo,"isOptional");function Gr(t,e){let r=l({},t);for(let n in e)e.hasOwnProperty(n)&&(typeof e[n]=="object"&&e[n]!==null&&!Array.isArray(e[n])?typeof r[n]=="object"&&r[n]!==null&&!Array.isArray(r[n])?r[n]=Gr(r[n],e[n]):r[n]=Gr({},e[n]):r[n]=e[n]);return r}s(Gr,"deepMerge");var Th=s((t,e)=>{let{handlePropertyChange:r,data:n}=Bo(t,e),{discriminator:a,value:i,discriminatedSchema:u}=(0,An.useMemo)(()=>{let c=jo(t.anyOf),f=c?.key?n?.[c.key]:t.default||null,p=Eh(c?.key||null,f,t.anyOf);return{discriminator:c,value:f,discriminatedSchema:p}},[t.anyOf,n]);return(0,An.useEffect)(()=>{a?.key&&a?.values.length&&Object.keys(n||{}).length<1&&!t.default&&r(e,{[a.key]:a.values[0]})},[]),{discriminator:a,discriminatorValue:i,discriminatedSchema:u}},"useDiscriminator"),jo=s(t=>{let e=t?.map(r=>r.type!=="object"||!r.properties?null:Object.entries(r.properties).map(([n,a])=>{var i;return a.type==="string"&&((i=a.enum)!=null&&i.length)?{key:n,value:a.enum[0]}:null}).filter(n=>!!n)).flat().reduce((r,n)=>{if(!n)return r;let{key:a,value:i}=n;return r.key===null&&(r.key=a),r.key===a&&r.values.push(i),r},{key:null,values:[]});return e?.key===null||!e?.values.length?null:e},"resolveDiscriminator"),Eh=s((t,e,r)=>{var n,a;if(!r?.length||!t||!e)return null;for(let i of r){if(i.type!=="object")continue;let u=(n=i.properties)==null?void 0:n[t];if(u?.type==="string"&&((a=u.enum)!=null&&a.length)&&u.enum[0]===e)return g(l({},i),{properties:g(l({},i.properties),{[t]:g(l({},u),{[F]:{hidden:!0}})})})}return null},"resolveDiscriminatedSchema"),Ph=s(t=>{var e;return(e=t.anyOf)!=null&&e.length?jo(t.anyOf)?"discriminatedUnion":"object":t.type==="integer"?"number":t.type},"getSchemaType"),Sh=s((t,e)=>{var r,n,a;let i=Ph(e),u=((r=e[F])==null?void 0:r.displayAs)||null;if(!u||!Array.isArray(u)||u.length<2){let y=(n=t?.[i])==null?void 0:n.default;return y?{Component:y,type:i,id:"default",params:{}}:null}let c=u[0],f=((a=t?.[i])==null?void 0:a[c])||null;if(!f)return console.warn(`Component ${i}.${c} not found`),null;let p=u[1]||{};return{Component:f,type:i,id:c,params:p}},"resolveComponent");function No(t,e){return t.length!==e.length?!1:t.every((r,n)=>r===e[n])}s(No,"pathMatches");function Ha(t,e){return e||(e=new RegExp("/s|-|_| ","g")),Uo(t).split(e).map($o).map(Fo).reduce(Ho)}s(Ha,"formatTitle");function $o(t){return t.charAt(0).toUpperCase()+t.substring(1)}s($o,"capitalize");function Ho(t,e){return`${t} ${e}`}s(Ho,"combine");function Uo(t){return t.replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/([A-Z]+)([A-Z][a-z\d]+)/g,"$1_$2").toLowerCase()}s(Uo,"decamelize");function Fo(t,e,r){let n=t.toLowerCase(),a=t.toUpperCase();for(let i of Ch)if(i.toLowerCase()===n)return i;return xh.includes(a)?a:e===0||e===r.length-1||t.length>=4?t:Oh.includes(n)||kh.includes(n)||wh.includes(n)?n:t}s(Fo,"handleSpecialWords");var xh=["2D","3D","4WD","A2O","API","BIOS","CCTV","CC","CCV","CD","CD-ROM","COBOL","CIA","CMS","CSS","CSV","CV","DIY","DVD","DB","DNA","E3","EIN","ESPN","FAQ","FAQs","FTP","FPS","FORTRAN","FBI","HTML","HTTP","ID","IP","ISO","JS","JSON","LASER","M2A","M2M","M2MM","M2O","MMORPG","NAFTA","NASA","NDA","O2M","PDF","PHP","POP","RAM","RNGR","ROM","RPG","RTFM","RTS","SCUBA","SITCOM","SKU","SMTP","SQL","SSN","SWAT","TBS","TTL","TV","TNA","UI","URL","USB","UWP","VIP","W3C","WYSIWYG","WWW","WWE","WWF"],wh=["a","an","the"],kh=["and","that","but","or","as","if","when","than","because","while","where","after","so","though","since","until","whether","before","although","nor","like","once","unless","now","except"],Oh=["about","above","across","after","against","along","among","around","at","because of","before","behind","below","beneath","beside","besides","between","beyond","but","by","concerning","despite","down","during","except","excepting","for","from","in","in front of","inside","in spite of","instead of","into","like","near","of","off","on","onto","out","outside","over","past","regarding","since","through","throughout","to","toward","under","underneath","until","up","upon","up to","with","within","without","with regard to","with respect to"],Ch=["2FA","3D","4K","5K","8K","AGI","BI","ChatGPT","CTA","DateTime","GitHub","GPT","HD","IBMid","ID","IDs","iMac","IMAX","iOS","IP","iPad","iPhone","iPod","LDAP","LinkedIn","LLM","M2M","M2O","macOS","McDonalds","ML","MySQL","NLG","NLP","NLU","O2M","OpenAI","PDFs","PEFT","pH","PostgreSQL","SEO","TTS","UHD","UUID","XSS","YouTube"];function Lo(t){return typeof t=="symbol"?"symbol":typeof t=="bigint"?`${t.toString()}n`:$e(t)}s(Lo,"primitiveToTypscriptLiteralType");function $e(t){return typeof t>"u"?"undefined":typeof t=="symbol"?t.description?`Symbol(${$e(t.description)})`:"Symbol()":typeof t=="bigint"?`BigInt(${t.toString()})`:JSON.stringify(t)}s($e,"primitiveToTypescriptValue");function zo(t){return typeof t>"u"?"undefined":JSON.stringify(t)}s(zo,"unknownToTypescriptValue");var Ys=s(t=>/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(t)?t:$e(t),"toPropertyKey"),Zh=s(t=>t.charAt(0).toUpperCase()+t.slice(1),"capitalize"),Ko=s(t=>{let e=/[^a-zA-Z0-9_]/g;return t.split(e).map(Zh).filter(n=>!!n).join("")},"toTypeArgumentName"),I=s(t=>{let e=(t??"").split(`
|
|
24
|
-
`).filter(r=>r.trim().length>0);return e.length===0?"":e.length===1?`/** ${e[0]} */`:`/**
|
|
25
|
-
* ${e.join(`
|
|
26
|
-
* `)}
|
|
27
|
-
*/`},"getMultilineComment"),Vo={};Ro(Vo,{JsonSchemaToZuiError:()=>Wo,ObjectToZuiError:()=>Ua,UnrepresentableGenericError:()=>Fa,UnsupportedZuiToJsonSchemaError:()=>Ih,UnsupportedZuiToTypescriptSchemaError:()=>rt,UnsupportedZuiToTypescriptTypeError:()=>iu,UntitledDeclarationError:()=>ou,ZuiToJsonSchemaError:()=>Xo,ZuiToTypescriptSchemaError:()=>tu,ZuiToTypescriptTypeError:()=>Rn,ZuiTransformError:()=>$t});var qo=class extends Error{constructor(e,r){super(r),this.transform=e}};s(qo,"ZuiTransformError");var $t=qo,Go=class extends $t{constructor(e){super("json-schema-to-zui",e)}};s(Go,"JsonSchemaToZuiError");var Wo=Go,Jo=class extends $t{constructor(e){super("object-to-zui",e)}};s(Jo,"ObjectToZuiError");var Ua=Jo,Yo=class extends $t{constructor(e){super("zui-to-json-schema",e)}};s(Yo,"ZuiToJsonSchemaError");var Xo=Yo,Qo=class extends Xo{constructor(e){super(`Zod type ${e} cannot be transformed to JSON Schema.`)}};s(Qo,"UnsupportedZuiToJsonSchemaError");var Ih=Qo,eu=class extends $t{constructor(e){super("zui-to-typescript-schema",e)}};s(eu,"ZuiToTypescriptSchemaError");var tu=eu,ru=class extends tu{constructor(e){super(`Zod type ${e} cannot be transformed to TypeScript schema.`)}};s(ru,"UnsupportedZuiToTypescriptSchemaError");var rt=ru,nu=class extends $t{constructor(e){super("zui-to-typescript-type",e)}};s(nu,"ZuiToTypescriptTypeError");var Rn=nu,au=class extends Rn{constructor(e){super(`Zod type ${e} cannot be transformed to TypeScript type.`)}};s(au,"UnsupportedZuiToTypescriptTypeError");var iu=au,su=class extends Rn{constructor(){super("Schema must have a title to be transformed to a TypeScript type with a declaration.")}};s(su,"UntitledDeclarationError");var ou=su,uu=class extends Rn{constructor(){super('ZodRef can only be transformed to a TypeScript type with a "type" declaration.')}};s(uu,"UnrepresentableGenericError");var Fa=uu,cu=["string","number","boolean","unknown","void","any","null","undefined","never","bigint","symbol","object"],Ah=s(t=>cu.includes(t),"isPrimitive"),Rh=s(t=>cu.map(e=>`${e}[]`).includes(t),"isArrayOfPrimitives"),Xs=s(t=>t.replace(/ +/g," ").trim(),"stripSpaces"),lu=class{constructor(e,r,n=!1){this.key=e,this.value=r,this.optional=n}};s(lu,"KeyValue");var jr=lu,du=class{constructor(e){this.schema=e}};s(du,"FnParameters");var Qs=du,fu=class{constructor(e){this.schema=e}};s(fu,"FnReturn");var eo=fu,pu=class{constructor(e){this.props=e}};s(pu,"Declaration");var $r=pu;function Wr(t,e={}){let r=Mh(t,e),n=z(r,{});return e.formatter&&(n=e.formatter(n)),n}s(Wr,"toTypescript");function z(t,e){var r,n,a;let i=g(l({},e),{parent:t});if(t===null)return"";if(t instanceof $r)return Dh(t,i);if(t instanceof jr){if(t.value instanceof v.ZodOptional){let w=t.value._def.innerType;return w instanceof v.Schema&&!w.description&&t.value.description&&(w=w?.describe(t.value.description)),z(new jr(t.key,w,!0),i)}let f=I(t.value._def.description),p=f?.trim().length>0?`
|
|
28
|
-
`:"",y=t.value.describe(""),Z=t.optional||t.value.isOptional()?"?":"";return`${p}${f}${p}${t.key}${Z}: ${z(y,i)}${p}`}if(t instanceof Qs){if(t.schema instanceof v.ZodTuple){let y="";for(let T=0;T<t.schema.items.length;T++){let Z=(a=(n=(r=t.schema.items[T])==null?void 0:r.ui)==null?void 0:n.title)!=null?a:`arg${T}`,w=t.schema.items[T];y+=`${z(new jr(Ys(Z),w),i)}${T<t.schema.items.length-1?", ":""} `}return y}let f=z(t.schema,i);return f.startsWith("{")&&f.endsWith("}")||f.startsWith("[")&&f.endsWith("]")||f.startsWith("(")&&f.endsWith(")")||f.startsWith("Array<")&&f.endsWith(">")||f.startsWith("Record<")&&f.endsWith(">")||Rh(f)?`args: ${f}`:f}if(t instanceof eo)return t.schema instanceof v.ZodOptional?`${z(t.schema.unwrap(),i)} | undefined`:z(t.schema,i);let c=t._def;switch(c.typeName){case v.ZodFirstPartyTypeKind.ZodString:return`${I(c.description)} string`.trim();case v.ZodFirstPartyTypeKind.ZodNumber:case v.ZodFirstPartyTypeKind.ZodNaN:case v.ZodFirstPartyTypeKind.ZodBigInt:return`${I(c.description)} number`.trim();case v.ZodFirstPartyTypeKind.ZodBoolean:return`${I(t._def.description)} boolean`.trim();case v.ZodFirstPartyTypeKind.ZodDate:return`${I(c.description)} Date`.trim();case v.ZodFirstPartyTypeKind.ZodUndefined:return`${I(c.description)} undefined`.trim();case v.ZodFirstPartyTypeKind.ZodNull:return`${I(c.description)} null`.trim();case v.ZodFirstPartyTypeKind.ZodAny:return`${I(c.description)} any`.trim();case v.ZodFirstPartyTypeKind.ZodUnknown:return`${I(c.description)} unknown`.trim();case v.ZodFirstPartyTypeKind.ZodNever:return`${I(c.description)} never`.trim();case v.ZodFirstPartyTypeKind.ZodVoid:return`${I(c.description)} void`.trim();case v.ZodFirstPartyTypeKind.ZodArray:let f=z(c.type,i);return Ah(f)?`${f}[]`:`Array<${f}>`;case v.ZodFirstPartyTypeKind.ZodObject:return`{ ${Object.entries(c.shape()).map(([$,V])=>z(new jr(Ys($),V),i)).join("; ")} }`;case v.ZodFirstPartyTypeKind.ZodUnion:let y=c.options.map($=>z($,i));return`${I(c.description)}
|
|
29
|
-
${y.join(" | ")}`;case v.ZodFirstPartyTypeKind.ZodDiscriminatedUnion:let T=c.options.map($=>z($,i));return`${I(t._def.description)}
|
|
30
|
-
${T.join(" | ")}`;case v.ZodFirstPartyTypeKind.ZodIntersection:return`${z(c.left,i)} & ${z(c.right,i)}`;case v.ZodFirstPartyTypeKind.ZodTuple:return c.items.length===0?"":`[${c.items.map($=>z($,i)).join(", ")}]`;case v.ZodFirstPartyTypeKind.ZodRecord:let w=z(c.keyType,i),j=z(c.valueType,i);return`${I(c.description)} { [key: ${w}]: ${j} }`;case v.ZodFirstPartyTypeKind.ZodMap:return`Map<${z(c.keyType,i)}, ${z(c.valueType,i)}>`;case v.ZodFirstPartyTypeKind.ZodSet:return`Set<${z(c.valueType,i)}>`;case v.ZodFirstPartyTypeKind.ZodFunction:let W=z(new Qs(c.args),i),Y=z(new eo(c.returns),i);return`${I(c.description)}
|
|
31
|
-
(${W}) => ${Y}`;case v.ZodFirstPartyTypeKind.ZodLazy:return z(c.getter(),i);case v.ZodFirstPartyTypeKind.ZodLiteral:let K=Lo(c.value);return`${I(c.description)}
|
|
32
|
-
${K}`.trim();case v.ZodFirstPartyTypeKind.ZodEnum:return c.values.map($e).join(" | ");case v.ZodFirstPartyTypeKind.ZodEffects:return z(c.schema,i);case v.ZodFirstPartyTypeKind.ZodNativeEnum:throw new iu(v.ZodFirstPartyTypeKind.ZodNativeEnum);case v.ZodFirstPartyTypeKind.ZodOptional:return`${z(c.innerType,i)} | undefined`;case v.ZodFirstPartyTypeKind.ZodNullable:return`${z(c.innerType,i)} | null`;case v.ZodFirstPartyTypeKind.ZodDefault:return z(c.innerType,i);case v.ZodFirstPartyTypeKind.ZodCatch:return z(c.innerType,i);case v.ZodFirstPartyTypeKind.ZodPromise:return`Promise<${z(c.type,i)}>`;case v.ZodFirstPartyTypeKind.ZodBranded:return z(c.type,i);case v.ZodFirstPartyTypeKind.ZodPipeline:return z(c.in,i);case v.ZodFirstPartyTypeKind.ZodSymbol:return`${I(c.description)} symbol`.trim();case v.ZodFirstPartyTypeKind.ZodReadonly:return`Readonly<${z(c.innerType,i)}>`;case v.ZodFirstPartyTypeKind.ZodRef:return Ko(c.uri);default:M.assertNever(c)}}s(z,"sUnwrapZod");var Dh=s((t,e)=>{if(t.props.type==="none")return z(t.props.schema,e);let r=I(t.props.schema.description),n=t.props.schema.describe(""),a=z(n,e);if(t.props.type==="variable")return Xs(`${r}declare const ${t.props.identifier}: ${a};`);let i=t.props.args.length>0?`<${t.props.args.map(Ko).join(", ")}>`:"";return Xs(`${r}type ${t.props.identifier}${i} = ${a};`)},"unwrapDeclaration"),Bh=s(t=>t.declaration?t.declaration===!0?"variable":t.declaration:"none","getDeclarationType"),Mh=s((t,e)=>{let r=Bh(e),n=t.getReferences();if(r==="none"){if(n.length>0)throw new Fa;return new $r({type:"none",schema:t})}let a="title"in t.ui?t.ui.title:null;if(!a)throw new ou;if(r==="variable"){if(n.length>0)throw new Fa;return new $r({type:"variable",identifier:a,schema:t})}return new $r({type:"type",identifier:a,schema:t,args:n})},"getDeclarationProps"),jh=typeof global=="object"&&global&&global.Object===Object&&global,hu=jh,Nh=typeof self=="object"&&self&&self.Object===Object&&self,$h=hu||Nh||Function("return this")(),Le=$h,Hh=Le.Symbol,qe=Hh,gu=Object.prototype,Uh=gu.hasOwnProperty,Fh=gu.toString,Yt=qe?qe.toStringTag:void 0;function mu(t){var e=Uh.call(t,Yt),r=t[Yt];try{t[Yt]=void 0;var n=!0}catch{}var a=Fh.call(t);return n&&(e?t[Yt]=r:delete t[Yt]),a}s(mu,"getRawTag");var Lh=mu,zh=Object.prototype,Kh=zh.toString;function yu(t){return Kh.call(t)}s(yu,"objectToString");var Vh=yu,qh="[object Null]",Gh="[object Undefined]",to=qe?qe.toStringTag:void 0;function vu(t){return t==null?t===void 0?Gh:qh:to&&to in Object(t)?Lh(t):Vh(t)}s(vu,"baseGetTag");var Ht=vu;function _u(t){return t!=null&&typeof t=="object"}s(_u,"isObjectLike");var At=_u,Wh="[object Symbol]";function bu(t){return typeof t=="symbol"||At(t)&&Ht(t)==Wh}s(bu,"isSymbol");var si=bu;function Tu(t,e){for(var r=-1,n=t==null?0:t.length,a=Array(n);++r<n;)a[r]=e(t[r],r,t);return a}s(Tu,"arrayMap");var Jh=Tu,Yh=Array.isArray,Fe=Yh,Xh=1/0,ro=qe?qe.prototype:void 0,no=ro?ro.toString:void 0;function oi(t){if(typeof t=="string")return t;if(Fe(t))return Jh(t,oi)+"";if(si(t))return no?no.call(t):"";var e=t+"";return e=="0"&&1/t==-Xh?"-0":e}s(oi,"baseToString");var Qh=oi;function Eu(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}s(Eu,"isObject");var ui=Eu;function Pu(t){return t}s(Pu,"identity");var eg=Pu,tg="[object AsyncFunction]",rg="[object Function]",ng="[object GeneratorFunction]",ag="[object Proxy]";function Su(t){if(!ui(t))return!1;var e=Ht(t);return e==rg||e==ng||e==tg||e==ag}s(Su,"isFunction");var xu=Su,ig=Le["__core-js_shared__"],Ma=ig,ao=function(){var t=/[^.]+$/.exec(Ma&&Ma.keys&&Ma.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function wu(t){return!!ao&&ao in t}s(wu,"isMasked");var sg=wu,og=Function.prototype,ug=og.toString;function ku(t){if(t!=null){try{return ug.call(t)}catch{}try{return t+""}catch{}}return""}s(ku,"toSource");var dt=ku,cg=/[\\^$.*+?()[\]{}|]/g,lg=/^\[object .+?Constructor\]$/,dg=Function.prototype,fg=Object.prototype,pg=dg.toString,hg=fg.hasOwnProperty,gg=RegExp("^"+pg.call(hg).replace(cg,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ou(t){if(!ui(t)||sg(t))return!1;var e=xu(t)?gg:lg;return e.test(dt(t))}s(Ou,"baseIsNative");var mg=Ou;function Cu(t,e){return t?.[e]}s(Cu,"getValue");var yg=Cu;function Zu(t,e){var r=yg(t,e);return mg(r)?r:void 0}s(Zu,"getNative");var ft=Zu,vg=ft(Le,"WeakMap"),La=vg,_g=function(){try{var t=ft(Object,"defineProperty");return t({},"",{}),t}catch{}}(),io=_g,bg=9007199254740991,Tg=/^(?:0|[1-9]\d*)$/;function Iu(t,e){var r=typeof t;return e=e??bg,!!e&&(r=="number"||r!="symbol"&&Tg.test(t))&&t>-1&&t%1==0&&t<e}s(Iu,"isIndex");var Au=Iu;function Ru(t,e,r){e=="__proto__"&&io?io(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}s(Ru,"baseAssignValue");var Eg=Ru;function Du(t,e){return t===e||t!==t&&e!==e}s(Du,"eq");var Bu=Du,Pg=9007199254740991;function Mu(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Pg}s(Mu,"isLength");var ci=Mu;function ju(t){return t!=null&&ci(t.length)&&!xu(t)}s(ju,"isArrayLike");var Sg=ju,xg=Object.prototype;function Nu(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||xg;return t===r}s(Nu,"isPrototype");var wg=Nu;function $u(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}s($u,"baseTimes");var kg=$u,Og="[object Arguments]";function Hu(t){return At(t)&&Ht(t)==Og}s(Hu,"baseIsArguments");var so=Hu,Uu=Object.prototype,Cg=Uu.hasOwnProperty,Zg=Uu.propertyIsEnumerable,Ig=so(function(){return arguments}())?so:function(t){return At(t)&&Cg.call(t,"callee")&&!Zg.call(t,"callee")},Fu=Ig;function Lu(){return!1}s(Lu,"stubFalse");var Ag=Lu,zu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,oo=zu&&typeof module=="object"&&module&&!module.nodeType&&module,Rg=oo&&oo.exports===zu,uo=Rg?Le.Buffer:void 0,Dg=uo?uo.isBuffer:void 0,Bg=Dg||Ag,za=Bg,Mg="[object Arguments]",jg="[object Array]",Ng="[object Boolean]",$g="[object Date]",Hg="[object Error]",Ug="[object Function]",Fg="[object Map]",Lg="[object Number]",zg="[object Object]",Kg="[object RegExp]",Vg="[object Set]",qg="[object String]",Gg="[object WeakMap]",Wg="[object ArrayBuffer]",Jg="[object DataView]",Yg="[object Float32Array]",Xg="[object Float64Array]",Qg="[object Int8Array]",em="[object Int16Array]",tm="[object Int32Array]",rm="[object Uint8Array]",nm="[object Uint8ClampedArray]",am="[object Uint16Array]",im="[object Uint32Array]",Q={};Q[Yg]=Q[Xg]=Q[Qg]=Q[em]=Q[tm]=Q[rm]=Q[nm]=Q[am]=Q[im]=!0;Q[Mg]=Q[jg]=Q[Wg]=Q[Ng]=Q[Jg]=Q[$g]=Q[Hg]=Q[Ug]=Q[Fg]=Q[Lg]=Q[zg]=Q[Kg]=Q[Vg]=Q[qg]=Q[Gg]=!1;function Ku(t){return At(t)&&ci(t.length)&&!!Q[Ht(t)]}s(Ku,"baseIsTypedArray");var sm=Ku;function Vu(t){return function(e){return t(e)}}s(Vu,"baseUnary");var om=Vu,qu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,nr=qu&&typeof module=="object"&&module&&!module.nodeType&&module,um=nr&&nr.exports===qu,ja=um&&hu.process,cm=function(){try{var t=nr&&nr.require&&nr.require("util").types;return t||ja&&ja.binding&&ja.binding("util")}catch{}}(),co=cm,lo=co&&co.isTypedArray,lm=lo?om(lo):sm,Gu=lm,dm=Object.prototype,fm=dm.hasOwnProperty;function Wu(t,e){var r=Fe(t),n=!r&&Fu(t),a=!r&&!n&&za(t),i=!r&&!n&&!a&&Gu(t),u=r||n||a||i,c=u?kg(t.length,String):[],f=c.length;for(var p in t)(e||fm.call(t,p))&&!(u&&(p=="length"||a&&(p=="offset"||p=="parent")||i&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||Au(p,f)))&&c.push(p);return c}s(Wu,"arrayLikeKeys");var pm=Wu;function Ju(t,e){return function(r){return t(e(r))}}s(Ju,"overArg");var hm=Ju,gm=hm(Object.keys,Object),mm=gm,ym=Object.prototype,vm=ym.hasOwnProperty;function Yu(t){if(!wg(t))return mm(t);var e=[];for(var r in Object(t))vm.call(t,r)&&r!="constructor"&&e.push(r);return e}s(Yu,"baseKeys");var _m=Yu;function Xu(t){return Sg(t)?pm(t):_m(t)}s(Xu,"keys");var li=Xu,bm=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Tm=/^\w*$/;function Qu(t,e){if(Fe(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||si(t)?!0:Tm.test(t)||!bm.test(t)||e!=null&&t in Object(e)}s(Qu,"isKey");var di=Qu,Em=ft(Object,"create"),ar=Em;function ec(){this.__data__=ar?ar(null):{},this.size=0}s(ec,"hashClear");var Pm=ec;function tc(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}s(tc,"hashDelete");var Sm=tc,xm="__lodash_hash_undefined__",wm=Object.prototype,km=wm.hasOwnProperty;function rc(t){var e=this.__data__;if(ar){var r=e[t];return r===xm?void 0:r}return km.call(e,t)?e[t]:void 0}s(rc,"hashGet");var Om=rc,Cm=Object.prototype,Zm=Cm.hasOwnProperty;function nc(t){var e=this.__data__;return ar?e[t]!==void 0:Zm.call(e,t)}s(nc,"hashHas");var Im=nc,Am="__lodash_hash_undefined__";function ac(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=ar&&e===void 0?Am:e,this}s(ac,"hashSet");var Rm=ac;function pt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s(pt,"Hash");pt.prototype.clear=Pm;pt.prototype.delete=Sm;pt.prototype.get=Om;pt.prototype.has=Im;pt.prototype.set=Rm;var fo=pt;function ic(){this.__data__=[],this.size=0}s(ic,"listCacheClear");var Dm=ic;function sc(t,e){for(var r=t.length;r--;)if(Bu(t[r][0],e))return r;return-1}s(sc,"assocIndexOf");var Dn=sc,Bm=Array.prototype,Mm=Bm.splice;function oc(t){var e=this.__data__,r=Dn(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Mm.call(e,r,1),--this.size,!0}s(oc,"listCacheDelete");var jm=oc;function uc(t){var e=this.__data__,r=Dn(e,t);return r<0?void 0:e[r][1]}s(uc,"listCacheGet");var Nm=uc;function cc(t){return Dn(this.__data__,t)>-1}s(cc,"listCacheHas");var $m=cc;function lc(t,e){var r=this.__data__,n=Dn(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}s(lc,"listCacheSet");var Hm=lc;function ht(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s(ht,"ListCache");ht.prototype.clear=Dm;ht.prototype.delete=jm;ht.prototype.get=Nm;ht.prototype.has=$m;ht.prototype.set=Hm;var Bn=ht,Um=ft(Le,"Map"),ir=Um;function dc(){this.size=0,this.__data__={hash:new fo,map:new(ir||Bn),string:new fo}}s(dc,"mapCacheClear");var Fm=dc;function fc(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}s(fc,"isKeyable");var Lm=fc;function pc(t,e){var r=t.__data__;return Lm(e)?r[typeof e=="string"?"string":"hash"]:r.map}s(pc,"getMapData");var Mn=pc;function hc(t){var e=Mn(this,t).delete(t);return this.size-=e?1:0,e}s(hc,"mapCacheDelete");var zm=hc;function gc(t){return Mn(this,t).get(t)}s(gc,"mapCacheGet");var Km=gc;function mc(t){return Mn(this,t).has(t)}s(mc,"mapCacheHas");var Vm=mc;function yc(t,e){var r=Mn(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}s(yc,"mapCacheSet");var qm=yc;function gt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s(gt,"MapCache");gt.prototype.clear=Fm;gt.prototype.delete=zm;gt.prototype.get=Km;gt.prototype.has=Vm;gt.prototype.set=qm;var jn=gt,Gm="Expected a function";function Nn(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Gm);var r=s(function(){var n=arguments,a=e?e.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var u=t.apply(this,n);return r.cache=i.set(a,u)||i,u},"memoized");return r.cache=new(Nn.Cache||jn),r}s(Nn,"memoize");Nn.Cache=jn;var Wm=Nn,Jm=500;function vc(t){var e=Wm(t,function(n){return r.size===Jm&&r.clear(),n}),r=e.cache;return e}s(vc,"memoizeCapped");var Ym=vc,Xm=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Qm=/\\(\\)?/g,ey=Ym(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Xm,function(r,n,a,i){e.push(a?i.replace(Qm,"$1"):n||r)}),e}),ty=ey;function _c(t){return t==null?"":Qh(t)}s(_c,"toString");var ry=_c;function bc(t,e){return Fe(t)?t:di(t,e)?[t]:ty(ry(t))}s(bc,"castPath");var Tc=bc,ny=1/0;function Ec(t){if(typeof t=="string"||si(t))return t;var e=t+"";return e=="0"&&1/t==-ny?"-0":e}s(Ec,"toKey");var $n=Ec;function Pc(t,e){e=Tc(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[$n(e[r++])];return r&&r==n?t:void 0}s(Pc,"baseGet");var Sc=Pc;function xc(t,e,r){var n=t==null?void 0:Sc(t,e);return n===void 0?r:n}s(xc,"get");var ay=xc;function wc(t,e){for(var r=-1,n=e.length,a=t.length;++r<n;)t[a+r]=e[r];return t}s(wc,"arrayPush");var iy=wc;function kc(){this.__data__=new Bn,this.size=0}s(kc,"stackClear");var sy=kc;function Oc(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}s(Oc,"stackDelete");var oy=Oc;function Cc(t){return this.__data__.get(t)}s(Cc,"stackGet");var uy=Cc;function Zc(t){return this.__data__.has(t)}s(Zc,"stackHas");var cy=Zc,ly=200;function Ic(t,e){var r=this.__data__;if(r instanceof Bn){var n=r.__data__;if(!ir||n.length<ly-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new jn(n)}return r.set(t,e),this.size=r.size,this}s(Ic,"stackSet");var dy=Ic;function mt(t){var e=this.__data__=new Bn(t);this.size=e.size}s(mt,"Stack");mt.prototype.clear=sy;mt.prototype.delete=oy;mt.prototype.get=uy;mt.prototype.has=cy;mt.prototype.set=dy;var Hr=mt;function Ac(t,e){for(var r=-1,n=t==null?0:t.length,a=0,i=[];++r<n;){var u=t[r];e(u,r,t)&&(i[a++]=u)}return i}s(Ac,"arrayFilter");var fy=Ac;function Rc(){return[]}s(Rc,"stubArray");var py=Rc,hy=Object.prototype,gy=hy.propertyIsEnumerable,po=Object.getOwnPropertySymbols,my=po?function(t){return t==null?[]:(t=Object(t),fy(po(t),function(e){return gy.call(t,e)}))}:py,yy=my;function Dc(t,e,r){var n=e(t);return Fe(t)?n:iy(n,r(t))}s(Dc,"baseGetAllKeys");var vy=Dc;function Bc(t){return vy(t,li,yy)}s(Bc,"getAllKeys");var ho=Bc,_y=ft(Le,"DataView"),Ka=_y,by=ft(Le,"Promise"),Va=by,Ty=ft(Le,"Set"),qa=Ty,go="[object Map]",Ey="[object Object]",mo="[object Promise]",yo="[object Set]",vo="[object WeakMap]",_o="[object DataView]",Py=dt(Ka),Sy=dt(ir),xy=dt(Va),wy=dt(qa),ky=dt(La),nt=Ht;(Ka&&nt(new Ka(new ArrayBuffer(1)))!=_o||ir&&nt(new ir)!=go||Va&&nt(Va.resolve())!=mo||qa&&nt(new qa)!=yo||La&&nt(new La)!=vo)&&(nt=s(function(t){var e=Ht(t),r=e==Ey?t.constructor:void 0,n=r?dt(r):"";if(n)switch(n){case Py:return _o;case Sy:return go;case xy:return mo;case wy:return yo;case ky:return vo}return e},"getTag"));var bo=nt,Oy=Le.Uint8Array,To=Oy,Cy="__lodash_hash_undefined__";function Mc(t){return this.__data__.set(t,Cy),this}s(Mc,"setCacheAdd");var Zy=Mc;function jc(t){return this.__data__.has(t)}s(jc,"setCacheHas");var Iy=jc;function sr(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new jn;++e<r;)this.add(t[e])}s(sr,"SetCache");sr.prototype.add=sr.prototype.push=Zy;sr.prototype.has=Iy;var Ay=sr;function Nc(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}s(Nc,"arraySome");var Ry=Nc;function $c(t,e){return t.has(e)}s($c,"cacheHas");var Dy=$c,By=1,My=2;function Hc(t,e,r,n,a,i){var u=r&By,c=t.length,f=e.length;if(c!=f&&!(u&&f>c))return!1;var p=i.get(t),y=i.get(e);if(p&&y)return p==e&&y==t;var T=-1,Z=!0,w=r&My?new Ay:void 0;for(i.set(t,e),i.set(e,t);++T<c;){var j=t[T],W=e[T];if(n)var Y=u?n(W,j,T,e,t,i):n(j,W,T,t,e,i);if(Y!==void 0){if(Y)continue;Z=!1;break}if(w){if(!Ry(e,function(K,B){if(!Dy(w,B)&&(j===K||a(j,K,r,n,i)))return w.push(B)})){Z=!1;break}}else if(!(j===W||a(j,W,r,n,i))){Z=!1;break}}return i.delete(t),i.delete(e),Z}s(Hc,"equalArrays");var Uc=Hc;function Fc(t){var e=-1,r=Array(t.size);return t.forEach(function(n,a){r[++e]=[a,n]}),r}s(Fc,"mapToArray");var jy=Fc;function Lc(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}s(Lc,"setToArray");var Ny=Lc,$y=1,Hy=2,Uy="[object Boolean]",Fy="[object Date]",Ly="[object Error]",zy="[object Map]",Ky="[object Number]",Vy="[object RegExp]",qy="[object Set]",Gy="[object String]",Wy="[object Symbol]",Jy="[object ArrayBuffer]",Yy="[object DataView]",Eo=qe?qe.prototype:void 0,Na=Eo?Eo.valueOf:void 0;function zc(t,e,r,n,a,i,u){switch(r){case Yy:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Jy:return!(t.byteLength!=e.byteLength||!i(new To(t),new To(e)));case Uy:case Fy:case Ky:return Bu(+t,+e);case Ly:return t.name==e.name&&t.message==e.message;case Vy:case Gy:return t==e+"";case zy:var c=jy;case qy:var f=n&$y;if(c||(c=Ny),t.size!=e.size&&!f)return!1;var p=u.get(t);if(p)return p==e;n|=Hy,u.set(t,e);var y=Uc(c(t),c(e),n,a,i,u);return u.delete(t),y;case Wy:if(Na)return Na.call(t)==Na.call(e)}return!1}s(zc,"equalByTag");var Xy=zc,Qy=1,ev=Object.prototype,tv=ev.hasOwnProperty;function Kc(t,e,r,n,a,i){var u=r&Qy,c=ho(t),f=c.length,p=ho(e),y=p.length;if(f!=y&&!u)return!1;for(var T=f;T--;){var Z=c[T];if(!(u?Z in e:tv.call(e,Z)))return!1}var w=i.get(t),j=i.get(e);if(w&&j)return w==e&&j==t;var W=!0;i.set(t,e),i.set(e,t);for(var Y=u;++T<f;){Z=c[T];var K=t[Z],B=e[Z];if(n)var $=u?n(B,K,Z,e,t,i):n(K,B,Z,t,e,i);if(!($===void 0?K===B||a(K,B,r,n,i):$)){W=!1;break}Y||(Y=Z=="constructor")}if(W&&!Y){var V=t.constructor,re=e.constructor;V!=re&&"constructor"in t&&"constructor"in e&&!(typeof V=="function"&&V instanceof V&&typeof re=="function"&&re instanceof re)&&(W=!1)}return i.delete(t),i.delete(e),W}s(Kc,"equalObjects");var rv=Kc,nv=1,Po="[object Arguments]",So="[object Array]",Nr="[object Object]",av=Object.prototype,xo=av.hasOwnProperty;function Vc(t,e,r,n,a,i){var u=Fe(t),c=Fe(e),f=u?So:bo(t),p=c?So:bo(e);f=f==Po?Nr:f,p=p==Po?Nr:p;var y=f==Nr,T=p==Nr,Z=f==p;if(Z&&za(t)){if(!za(e))return!1;u=!0,y=!1}if(Z&&!y)return i||(i=new Hr),u||Gu(t)?Uc(t,e,r,n,a,i):Xy(t,e,f,r,n,a,i);if(!(r&nv)){var w=y&&xo.call(t,"__wrapped__"),j=T&&xo.call(e,"__wrapped__");if(w||j){var W=w?t.value():t,Y=j?e.value():e;return i||(i=new Hr),a(W,Y,r,n,i)}}return Z?(i||(i=new Hr),rv(t,e,r,n,a,i)):!1}s(Vc,"baseIsEqualDeep");var iv=Vc;function fi(t,e,r,n,a){return t===e?!0:t==null||e==null||!At(t)&&!At(e)?t!==t&&e!==e:iv(t,e,r,n,fi,a)}s(fi,"baseIsEqual");var pi=fi,sv=1,ov=2;function qc(t,e,r,n){var a=r.length,i=a,u=!n;if(t==null)return!i;for(t=Object(t);a--;){var c=r[a];if(u&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++a<i;){c=r[a];var f=c[0],p=t[f],y=c[1];if(u&&c[2]){if(p===void 0&&!(f in t))return!1}else{var T=new Hr;if(n)var Z=n(p,y,f,t,e,T);if(!(Z===void 0?pi(y,p,sv|ov,n,T):Z))return!1}}return!0}s(qc,"baseIsMatch");var uv=qc;function Gc(t){return t===t&&!ui(t)}s(Gc,"isStrictComparable");var Wc=Gc;function Jc(t){for(var e=li(t),r=e.length;r--;){var n=e[r],a=t[n];e[r]=[n,a,Wc(a)]}return e}s(Jc,"getMatchData");var cv=Jc;function Yc(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}s(Yc,"matchesStrictComparable");var Xc=Yc;function Qc(t){var e=cv(t);return e.length==1&&e[0][2]?Xc(e[0][0],e[0][1]):function(r){return r===t||uv(r,t,e)}}s(Qc,"baseMatches");var lv=Qc;function el(t,e){return t!=null&&e in Object(t)}s(el,"baseHasIn");var dv=el;function tl(t,e,r){e=Tc(e,t);for(var n=-1,a=e.length,i=!1;++n<a;){var u=$n(e[n]);if(!(i=t!=null&&r(t,u)))break;t=t[u]}return i||++n!=a?i:(a=t==null?0:t.length,!!a&&ci(a)&&Au(u,a)&&(Fe(t)||Fu(t)))}s(tl,"hasPath");var fv=tl;function rl(t,e){return t!=null&&fv(t,e,dv)}s(rl,"hasIn");var pv=rl,hv=1,gv=2;function nl(t,e){return di(t)&&Wc(e)?Xc($n(t),e):function(r){var n=ay(r,t);return n===void 0&&n===e?pv(r,t):pi(e,n,hv|gv)}}s(nl,"baseMatchesProperty");var mv=nl;function al(t){return function(e){return e?.[t]}}s(al,"baseProperty");var yv=al;function il(t){return function(e){return Sc(e,t)}}s(il,"basePropertyDeep");var vv=il;function sl(t){return di(t)?yv($n(t)):vv(t)}s(sl,"property");var _v=sl;function ol(t){return typeof t=="function"?t:t==null?eg:typeof t=="object"?Fe(t)?mv(t[0],t[1]):lv(t):_v(t)}s(ol,"baseIteratee");var bv=ol;function ul(t){return function(e,r,n){for(var a=-1,i=Object(e),u=n(e),c=u.length;c--;){var f=u[t?c:++a];if(r(i[f],f,i)===!1)break}return e}}s(ul,"createBaseFor");var Tv=ul,Ev=Tv(),Pv=Ev;function cl(t,e){return t&&Pv(t,e,li)}s(cl,"baseForOwn");var Sv=cl;function ll(t,e){return pi(t,e)}s(ll,"isEqual");var ot=ll;function dl(t,e){var r={};return e=bv(e,3),Sv(t,function(n,a,i){Eg(r,a,e(n,a,i))}),r}s(dl,"mapValues");var xv=dl;function hi(t){return ie(t)}s(hi,"toTypescriptSchema");function ie(t){let r=t._def;switch(r.typeName){case v.ZodFirstPartyTypeKind.ZodString:return`${I(r.description)}z.string()`.trim();case v.ZodFirstPartyTypeKind.ZodNumber:return`${I(r.description)}z.number()`.trim();case v.ZodFirstPartyTypeKind.ZodNaN:return`${I(r.description)}z.nan()`.trim();case v.ZodFirstPartyTypeKind.ZodBigInt:return`${I(r.description)}z.bigint()`.trim();case v.ZodFirstPartyTypeKind.ZodBoolean:return`${I(t._def.description)}z.boolean()`.trim();case v.ZodFirstPartyTypeKind.ZodDate:return`${I(r.description)}z.date()`.trim();case v.ZodFirstPartyTypeKind.ZodUndefined:return`${I(r.description)}z.undefined()`.trim();case v.ZodFirstPartyTypeKind.ZodNull:return`${I(r.description)}z.null()`.trim();case v.ZodFirstPartyTypeKind.ZodAny:return`${I(r.description)}z.any()`.trim();case v.ZodFirstPartyTypeKind.ZodUnknown:return`${I(r.description)}z.unknown()`.trim();case v.ZodFirstPartyTypeKind.ZodNever:return`${I(r.description)}z.never()`.trim();case v.ZodFirstPartyTypeKind.ZodVoid:return`${I(r.description)}z.void()`.trim();case v.ZodFirstPartyTypeKind.ZodArray:return`z.array(${ie(r.type)})`;case v.ZodFirstPartyTypeKind.ZodObject:let n=xv(r.shape(),re=>re instanceof v.Schema?ie(re):"z.any()");return[`${I(r.description)}z.object({`,...Object.entries(n).map(([re,Ce])=>` ${re}: ${Ce},`),"})"].join(`
|
|
33
|
-
`).trim();case v.ZodFirstPartyTypeKind.ZodUnion:let a=r.options.map(ie);return`${I(r.description)}z.union([${a.join(", ")}])`.trim();case v.ZodFirstPartyTypeKind.ZodDiscriminatedUnion:let i=r.options.map(ie),u=$e(r.discriminator);return`${I(r.description)}z.discriminatedUnion(${u}, [${i.join(", ")}])`.trim();case v.ZodFirstPartyTypeKind.ZodIntersection:let c=ie(r.left),f=ie(r.right);return`${I(r.description)}z.intersection(${c}, ${f})`.trim();case v.ZodFirstPartyTypeKind.ZodTuple:let p=r.items.map(ie);return`${I(r.description)}z.tuple([${p.join(", ")}])`.trim();case v.ZodFirstPartyTypeKind.ZodRecord:let y=ie(r.keyType),T=ie(r.valueType);return`${I(r.description)}z.record(${y}, ${T})`.trim();case v.ZodFirstPartyTypeKind.ZodMap:let Z=ie(r.keyType),w=ie(r.valueType);return`${I(r.description)}z.map(${Z}, ${w})`.trim();case v.ZodFirstPartyTypeKind.ZodSet:return`${I(r.description)}z.set(${ie(r.valueType)})`.trim();case v.ZodFirstPartyTypeKind.ZodFunction:let j=r.args.items.map(ie),W=j.length?`.args(${j.join(", ")})`:"",Y=ie(r.returns);return`${I(r.description)}z.function()${W}.returns(${Y})`.trim();case v.ZodFirstPartyTypeKind.ZodLazy:return`${I(r.description)}z.lazy(() => ${ie(r.getter())})`.trim();case v.ZodFirstPartyTypeKind.ZodLiteral:let K=$e(r.value);return`${I(r.description)}z.literal(${K})`.trim();case v.ZodFirstPartyTypeKind.ZodEnum:let B=r.values.map($e);return`${I(r.description)}z.enum([${B.join(", ")}])`.trim();case v.ZodFirstPartyTypeKind.ZodEffects:throw new rt(v.ZodFirstPartyTypeKind.ZodEffects);case v.ZodFirstPartyTypeKind.ZodNativeEnum:throw new rt(v.ZodFirstPartyTypeKind.ZodNativeEnum);case v.ZodFirstPartyTypeKind.ZodOptional:return`${I(r.description)}z.optional(${ie(r.innerType)})`.trim();case v.ZodFirstPartyTypeKind.ZodNullable:return`${I(r.description)}z.nullable(${ie(r.innerType)})`.trim();case v.ZodFirstPartyTypeKind.ZodDefault:let $=zo(r.defaultValue());return`${I(r.description)}${ie(r.innerType)}.default(${$})`.trim();case v.ZodFirstPartyTypeKind.ZodCatch:throw new rt(v.ZodFirstPartyTypeKind.ZodCatch);case v.ZodFirstPartyTypeKind.ZodPromise:return`${I(r.description)}z.promise(${ie(r.type)})`.trim();case v.ZodFirstPartyTypeKind.ZodBranded:throw new rt(v.ZodFirstPartyTypeKind.ZodBranded);case v.ZodFirstPartyTypeKind.ZodPipeline:throw new rt(v.ZodFirstPartyTypeKind.ZodPipeline);case v.ZodFirstPartyTypeKind.ZodSymbol:throw new rt(v.ZodFirstPartyTypeKind.ZodSymbol);case v.ZodFirstPartyTypeKind.ZodReadonly:return`${I(r.description)}z.readonly(${ie(r.innerType)})`.trim();case v.ZodFirstPartyTypeKind.ZodRef:let V=$e(r.uri);return`${I(r.description)}z.ref(${V})`.trim();default:M.assertNever(r)}}s(ie,"sUnwrapZod");var fl=class{constructor(e,r,n,a){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=a}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};s(fl,"ParseInputLazyPath");var we=fl,wo=s((t,e)=>{if(Dt(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Ie(t.common.issues);return this._error=r,this._error}}},"handleResult"),pl=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}dereference(e){return this}getReferences(){return[]}_getType(e){return Ne(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Ne(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new be,ctx:{common:e.parent.common,data:e.data,parsedType:Ne(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(ur(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;let a={common:{issues:[],async:(n=r?.async)!=null?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ne(e)},i=this._parseSync({data:e,path:a.path,parent:a});return wo(a,i)}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ne(e)},a=this._parse({data:e,path:n.path,parent:n}),i=await(ur(a)?a:Promise.resolve(a));return wo(n,i)}refine(e,r){let n=s(a=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(a):r,"getIssueProperties");return this._refinement((a,i)=>{let u=e(a),c=s(()=>i.addIssue(l({code:_.custom},n(a))),"setError");return typeof Promise<"u"&&u instanceof Promise?u.then(f=>f?!0:(c(),!1)):u?!0:(c(),!1)})}refinement(e,r){return this._refinement((n,a)=>e(n)?!0:(a.addIssue(typeof r=="function"?r(n,a):r),!1))}_refinement(e){return new Je({schema:this,typeName:"ZodEffects",effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return He.create(this,this._def)}nullable(){return ut.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Bt.create(this,this._def)}promise(){return pr.create(this,this._def)}or(e){return Qn.create([this,e],this._def)}and(e){return Kn.create(this,e,this._def)}transform(e){return new Je(g(l({},A(this._def)),{schema:this,typeName:"ZodEffects",effect:{type:"transform",transform:e}}))}default(e){let r=typeof e=="function"?e:()=>e;return new dr(g(l({},A(this._def)),{innerType:this,defaultValue:r,typeName:"ZodDefault"}))}brand(){return new Fn(l({typeName:"ZodBranded",type:this},A(this._def)))}catch(e){let r=typeof e=="function"?e:()=>e;return new Ln(g(l({},A(this._def)),{innerType:this,catchValue:r,typeName:"ZodCatch"}))}describe(e){let r=this.constructor;return new r(g(l({},this._def),{description:e}))}pipe(e){return Yn.create(this,e)}readonly(){return hr.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}metadata(e){for(let[r,n]of Object.entries(e))this._def[F]=g(l({},this._def[F]),{[r]:n});return this}getMetadata(){return l({},this._def[F])}setMetadata(e){this._def[F]=l({},e)}get ui(){let e=this._getMetadataRoot();return l({},e._def[F])}_setZuiMeta(e,r){let n=this._getMetadataRoot();n._def[F]=g(l({},n._def[F]),{[e]:r})}_getMetadataRoot(){let e=this._def;switch(e.typeName){case"ZodNullable":case"ZodDefault":case"ZodOptional":case"ZodReadonly":return e.innerType;case"ZodEffects":return e.schema;default:return this}}displayAs(e){var r,n,a;return(a=(r=this._def)[n=F])!=null||(r[n]={}),this._def[F].displayAs=[e.id,e.params],this}title(e){return this._setZuiMeta("title",e),this}hidden(e){let r;return e===void 0?r=!0:typeof e=="function"?r=e.toString():r=e,this._setZuiMeta("hidden",r),this}disabled(e){let r;return e===void 0?r=!0:typeof e=="function"?r=e.toString():r=e,this._setZuiMeta("disabled",r),this}placeholder(e){return this._setZuiMeta("placeholder",e),this}toJsonSchema(e){return ea(this,e)}toTypescript(e){return Wr(this,e)}toTypescriptSchema(){return hi(this)}async toTypescriptAsync(e){let r=Wr(this,g(l({},e),{formatter:void 0}));return e?.formatter&&(r=await e.formatter(r)),r}static fromObject(e,r){return jt(e,r)}static fromJsonSchema(e){return gr(e)}};s(pl,"ZodType");var D=pl,gi=(t=>(t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodRef="ZodRef",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly",t))(gi||{}),M;(t=>{t.assertEqual=s(a=>a,"assertEqual");function e(a){}t.assertIs=e,s(e,"assertIs");function r(a){throw new Error("assertNever called")}t.assertNever=r,s(r,"assertNever"),t.arrayToEnum=s(a=>{let i={};for(let u of a)i[u]=u;return i},"arrayToEnum"),t.getValidEnumValues=s(a=>{let i=(0,t.objectKeys)(a).filter(c=>typeof a[a[c]]!="number"),u={};for(let c of i)u[c]=a[c];return(0,t.objectValues)(u)},"getValidEnumValues"),t.objectValues=s(a=>(0,t.objectKeys)(a).map(function(i){return a[i]}),"objectValues"),t.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{let i=[];for(let u in a)Object.prototype.hasOwnProperty.call(a,u)&&i.push(u);return i},t.find=s((a,i)=>{for(let u of a)if(i(u))return u},"find"),t.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&isFinite(a)&&Math.floor(a)===a;function n(a,i=" | "){return a.map(u=>typeof u=="string"?`'${u}'`:u).join(i)}t.joinValues=n,s(n,"joinValues"),t.jsonStringifyReplacer=s((a,i)=>typeof i=="bigint"?i.toString():i,"jsonStringifyReplacer"),t.compareFunctions=s((a,i)=>a.toString()===i.toString(),"compareFunctions")})(M||(M={}));var Jr;(t=>{t.mergeShapes=s((e,r)=>l(l({},e),r),"mergeShapes")})(Jr||(Jr={}));var P=M.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ne=s(t=>{switch(typeof t){case"undefined":return P.undefined;case"string":return P.string;case"number":return isNaN(t)?P.nan:P.number;case"boolean":return P.boolean;case"function":return P.function;case"bigint":return P.bigint;case"symbol":return P.symbol;case"object":return Array.isArray(t)?P.array:t===null?P.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?P.promise:typeof Map<"u"&&t instanceof Map?P.map:typeof Set<"u"&&t instanceof Set?P.set:typeof Date<"u"&&t instanceof Date?P.date:P.object;default:return P.unknown}},"getParsedType");function A(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:a}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a,[F]:t?.[F]}:{errorMap:s((u,c)=>u.code!=="invalid_type"?{message:c.defaultError}:typeof c.data>"u"?{message:n??c.defaultError}:{message:r??c.defaultError},"customMap"),description:a,[F]:t?.[F]}}s(A,"processCreateParams");var mi=s((t,e)=>{let r;switch(t.code){case _.invalid_type:t.received===P.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case _.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,M.jsonStringifyReplacer)}`;break;case _.unrecognized_keys:r=`Unrecognized key(s) in object: ${M.joinValues(t.keys,", ")}`;break;case _.invalid_union:r="Invalid input";break;case _.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${M.joinValues(t.options)}`;break;case _.invalid_enum_value:r=`Invalid enum value. Expected ${M.joinValues(t.options)}, received '${t.received}'`;break;case _.invalid_arguments:r="Invalid function arguments";break;case _.invalid_return_type:r="Invalid function return type";break;case _.invalid_date:r="Invalid date";break;case _.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:M.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case _.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case _.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case _.custom:r="Invalid input";break;case _.invalid_intersection_types:r="Intersection results could not be merged";break;case _.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case _.not_finite:r="Number must be finite";break;case _.unresolved_reference:r="Unresolved reference";break;default:r=e.defaultError,M.assertNever(t)}return{message:r}},"errorMap"),ko=mi,_=M.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","unresolved_reference"]),hl=s(t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson"),Yr=class gl extends Error{constructor(e){super(),this.issues=[],this.addIssue=s(n=>{this.issues=[...this.issues,n]},"addIssue"),this.addIssues=s((n=[])=>{this.issues=[...this.issues,...n]},"addIssues");let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let r=e||function(i){return i.message},n={_errors:[]},a=s(i=>{for(let u of i.issues)if(u.code==="invalid_union")u.unionErrors.map(a);else if(u.code==="invalid_return_type")a(u.returnTypeError);else if(u.code==="invalid_arguments")a(u.argumentsError);else if(u.path.length===0)n._errors.push(r(u));else{let c=n,f=0;for(;f<u.path.length;){let p=u.path[f];f===u.path.length-1?(c[p]=c[p]||{_errors:[]},c[p]._errors.push(r(u))):c[p]=c[p]||{_errors:[]},c=c[p],f++}}},"processError");return a(this),n}static assert(e){if(!(e instanceof gl))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,M.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let a of this.issues)a.path.length>0?(r[a.path[0]]=r[a.path[0]]||[],r[a.path[0]].push(e(a))):n.push(e(a));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};s(Yr,"ZodError");Yr.create=s(t=>new Yr(t),"create");var Ie=Yr,ml=mi;function yi(t){ml=t}s(yi,"setErrorMap");function Rt(){return ml}s(Rt,"getErrorMap");var or=s(t=>{var e;let{data:r,path:n,errorMaps:a,issueData:i}=t,u=[...n,...i.path||[]],c=g(l({},i),{path:u}),f="",p=a.filter(y=>!!y).slice().reverse();for(let y of p)f=y(c,{data:r,defaultError:f}).message;return g(l({},i),{path:u,message:(e=i.message)!=null?e:f})},"makeIssue"),yl=[];function E(t,e){let r=or({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Rt(),mi].filter(n=>!!n)});t.common.issues.push(r)}s(E,"addIssueToContext");var vl=class _l{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let a of r){if(a.status==="aborted")return O;a.status==="dirty"&&e.dirty(),n.push(a.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let a of r)n.push({key:await a.key,value:await a.value});return _l.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let a of r){let{key:i,value:u}=a;if(i.status==="aborted"||u.status==="aborted")return O;i.status==="dirty"&&e.dirty(),u.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof u.value<"u"||a.alwaysSet)&&(n[i.value]=u.value)}return{status:e.value,value:n}}};s(vl,"ParseStatus");var be=vl,O=Object.freeze({status:"aborted"}),st=s(t=>({status:"dirty",value:t}),"DIRTY"),he=s(t=>({status:"valid",value:t}),"OK"),Xr=s(t=>t.status==="aborted","isAborted"),Qr=s(t=>t.status==="dirty","isDirty"),Dt=s(t=>t.status==="valid","isValid"),ur=s(t=>typeof Promise<"u"&&t instanceof Promise,"isAsync"),k;(t=>{t.errToObj=s(e=>typeof e=="string"?{message:e}:e||{},"errToObj"),t.toString=s(e=>typeof e=="string"?e:e?.message,"toString")})(k||(k={}));var en=class bl extends D{constructor(){super(...arguments),this._any=!0}_parse(e){return he(e.data)}isEqual(e){return e instanceof bl}};s(en,"ZodAny");en.create=s(t=>new en(l({typeName:"ZodAny"},A(t))),"create");var cr=en,tn=class xt extends D{dereference(e){return new xt(g(l({},this._def),{type:this._def.type.dereference(e)}))}getReferences(){return this._def.type.getReferences()}isEqual(e){var r,n,a,i,u,c;return e instanceof xt?ot((r=this._def.exactLength)==null?void 0:r.value,(n=e._def.exactLength)==null?void 0:n.value)&&ot((a=this._def.maxLength)==null?void 0:a.value,(i=e._def.maxLength)==null?void 0:i.value)&&ot((u=this._def.minLength)==null?void 0:u.value,(c=e._def.minLength)==null?void 0:c.value)&&this._def.type.isEqual(e._def.type):!1}_parse(e){let{ctx:r,status:n}=this._processInputParams(e),a=this._def;if(r.parsedType!==P.array)return E(r,{code:_.invalid_type,expected:P.array,received:r.parsedType}),O;if(a.exactLength!==null){let u=r.data.length>a.exactLength.value,c=r.data.length<a.exactLength.value;(u||c)&&(E(r,{code:u?_.too_big:_.too_small,minimum:c?a.exactLength.value:void 0,maximum:u?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),n.dirty())}if(a.minLength!==null&&r.data.length<a.minLength.value&&(E(r,{code:_.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),n.dirty()),a.maxLength!==null&&r.data.length>a.maxLength.value&&(E(r,{code:_.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((u,c)=>a.type._parseAsync(new we(r,u,r.path,c)))).then(u=>be.mergeArray(n,u));let i=[...r.data].map((u,c)=>a.type._parseSync(new we(r,u,r.path,c)));return be.mergeArray(n,i)}get element(){return this._def.type}min(e,r){return new xt(g(l({},this._def),{minLength:{value:e,message:k.toString(r)}}))}max(e,r){return new xt(g(l({},this._def),{maxLength:{value:e,message:k.toString(r)}}))}length(e,r){return new xt(g(l({},this._def),{exactLength:{value:e,message:k.toString(r)}}))}nonempty(e){return this.min(1,e)}};s(tn,"ZodArray");tn.create=s((t,e)=>new tn(l({type:t,minLength:null,maxLength:null,exactLength:null,typeName:"ZodArray"},A(e))),"create");var Bt=tn,wv={compare:ot},Tl=class{constructor(e=[],r={}){this._options=l(l({},wv),r),this._items=[];for(let n of e)this.add(n)}get items(){return[...this._items]}get size(){return this._items.length}has(e){return this._items.some(r=>this._options.compare(r,e))}add(e){this.has(e)||this._items.push(e)}isEqual(e){return this.size!==e.size?!1:this.isSubsetOf(e)&&e.isSubsetOf(this)}isSubsetOf(e){return this.size>e.size?!1:this._items.every(r=>e.has(r))}};s(Tl,"CustomSet");var ce=Tl,rn=class Ur extends D{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==P.bigint){let i=this._getOrReturnCtx(e);return E(i,{code:_.invalid_type,expected:P.bigint,received:i.parsedType}),O}let n,a=new be;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),E(n,{code:_.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),E(n,{code:_.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),E(n,{code:_.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):M.assertNever(i);return{status:a.value,value:e.data}}isEqual(e){if(!(e instanceof Ur)||this._def.coerce!==e._def.coerce)return!1;let r=new ce(this._def.checks),n=new ce(e._def.checks);return r.isEqual(n)}gte(e,r){return this.setLimit("min",e,!0,k.toString(r))}gt(e,r){return this.setLimit("min",e,!1,k.toString(r))}lte(e,r){return this.setLimit("max",e,!0,k.toString(r))}lt(e,r){return this.setLimit("max",e,!1,k.toString(r))}setLimit(e,r,n,a){return new Ur(g(l({},this._def),{checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:k.toString(a)}]}))}_addCheck(e){return new Ur(g(l({},this._def),{checks:[...this._def.checks,e]}))}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:k.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:k.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:k.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:k.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:k.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};s(rn,"ZodBigInt");rn.create=s(t=>{var e;return new rn(l({checks:[],typeName:"ZodBigInt",coerce:(e=t?.coerce)!=null?e:!1},A(t)))},"create");var Hn=rn,nn=class El extends D{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==P.boolean){let n=this._getOrReturnCtx(e);return E(n,{code:_.invalid_type,expected:P.boolean,received:n.parsedType}),O}return he(e.data)}isEqual(e){return e instanceof El?this._def.coerce===e._def.coerce:!1}};s(nn,"ZodBoolean");nn.create=s(t=>new nn(l({typeName:"ZodBoolean",coerce:t?.coerce||!1},A(t))),"create");var Un=nn,Pl=Symbol("zod_brand"),Sl=class xl extends D{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}isEqual(e){return e instanceof xl?this._def.type.isEqual(e._def.type):!1}};s(Sl,"ZodBranded");var Fn=Sl,an=class wl extends D{_parse(e){let{ctx:r}=this._processInputParams(e),n=g(l({},r),{common:g(l({},r.common),{issues:[]})}),a=this._def.innerType._parse({data:n.data,path:n.path,parent:l({},n)});return ur(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ie(n.common.issues)},input:n.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Ie(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}isEqual(e){return e instanceof wl?this._def.innerType.isEqual(e._def.innerType)&&M.compareFunctions(this._def.catchValue,e._def.catchValue):!1}};s(an,"ZodCatch");an.create=s((t,e)=>new an(l({innerType:t,typeName:"ZodCatch",catchValue:typeof e.catch=="function"?e.catch:()=>e.catch},A(e))),"create");var Ln=an,vi=s((t,e={},r)=>t?cr.create().superRefine((n,a)=>{var i,u;if(!t(n)){let c=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,f=(u=(i=c.fatal)!=null?i:r)!=null?u:!0,p=typeof c=="string"?{message:c}:c;a.addIssue(g(l({code:"custom"},p),{fatal:f}))}}):cr.create(),"custom"),sn=class Ga extends D{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==P.date){let i=this._getOrReturnCtx(e);return E(i,{code:_.invalid_type,expected:P.date,received:i.parsedType}),O}if(isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return E(i,{code:_.invalid_date}),O}let n=new be,a;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(a=this._getOrReturnCtx(e,a),E(a,{code:_.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(a=this._getOrReturnCtx(e,a),E(a,{code:_.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):M.assertNever(i);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Ga(g(l({},this._def),{checks:[...this._def.checks,e]}))}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:k.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:k.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}isEqual(e){if(!(e instanceof Ga))return!1;let r=new ce(this._def.checks),n=new ce(e._def.checks);return r.isEqual(n)&&this._def.coerce===e._def.coerce}};s(sn,"ZodDate");sn.create=s(t=>new sn(l({checks:[],coerce:t?.coerce||!1,typeName:"ZodDate"},A(t))),"create");var zn=sn,on=class Wa extends D{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===P.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}dereference(e){return new Wa(g(l({},this._def),{innerType:this._def.innerType.dereference(e)}))}isEqual(e){return e instanceof Wa?this._def.innerType.isEqual(e._def.innerType)&&ot(this._def.defaultValue(),e._def.defaultValue()):!1}};s(on,"ZodDefault");on.create=s((t,e,r)=>new on(l({innerType:t,typeName:"ZodDefault",defaultValue:typeof e=="function"?e:()=>e},A(r))),"create");var dr=on,ze=s(t=>Array.from(new Set(t)),"unique"),je=s(t=>t instanceof Vn?je(t.schema):t instanceof Je?je(t.innerType()):t instanceof qn?[t.value]:t instanceof yt?t.options:t instanceof Gn?M.objectValues(t.enum):t instanceof dr?je(t._def.innerType):t instanceof Xn?[void 0]:t instanceof Wn?[null]:t instanceof He?[void 0,...je(t.unwrap())]:t instanceof ut?[null,...je(t.unwrap())]:t instanceof Fn||t instanceof hr?je(t.unwrap()):t instanceof Ln?je(t._def.innerType):[],"getDiscriminator"),kl=class wt extends D{dereference(e){let r=this.options.map(a=>a.dereference(e)),n=wt._getOptionsMap(this.discriminator,r);return new wt(g(l({},this._def),{options:r,optionsMap:n}))}getReferences(){return ze(this.options.flatMap(e=>e.getReferences()))}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==P.object)return E(r,{code:_.invalid_type,expected:P.object,received:r.parsedType}),O;let n=this.discriminator,a=r.data[n],i=this.optionsMap.get(a);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(E(r,{code:_.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),O)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let a=wt._getOptionsMap(e,r);return new wt(l({typeName:"ZodDiscriminatedUnion",discriminator:e,options:r,optionsMap:a},A(n)))}static _getOptionsMap(e,r){let n=new Map;for(let a of r){let i=je(a.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let u of i){if(n.has(u))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(u)}`);n.set(u,a)}}return n}isEqual(e){if(!(e instanceof wt)||this._def.discriminator!==e._def.discriminator)return!1;let r=s((i,u)=>i.isEqual(u),"compare"),n=new ce(this._def.options,{compare:r}),a=new ce(e._def.options,{compare:r});return n.isEqual(a)}};s(kl,"ZodDiscriminatedUnion");var _i=kl;function fr(t,e){return new yt(l({values:t,typeName:"ZodEnum"},A(e)))}s(fr,"createZodEnum");var bi=class Fr extends D{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return E(r,{expected:M.joinValues(n),received:r.parsedType,code:_.invalid_type}),O}if(this._def.values.indexOf(e.data)===-1){let r=this._getOrReturnCtx(e),n=this._def.values;return E(r,{received:r.data,code:_.invalid_enum_value,options:n}),O}return he(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return Fr.create(e,l(l({},this._def),r))}exclude(e,r=this._def){return Fr.create(this.options.filter(n=>!e.includes(n)),l(l({},this._def),r))}isEqual(e){if(!(e instanceof Fr))return!1;let r=new ce(this._def.values),n=new ce(e._def.values);return r.isEqual(n)}};s(bi,"ZodEnum");bi.create=fr;var yt=bi,Ol=class kt extends D{constructor(){super(...arguments),this.validate=this.implement}dereference(e){let r=this._def.args.dereference(e),n=this._def.returns.dereference(e);return new kt(g(l({},this._def),{args:r,returns:n}))}getReferences(){return ze([...this._def.args.getReferences(),...this._def.returns.getReferences()])}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==P.function)return E(r,{code:_.invalid_type,expected:P.function,received:r.parsedType}),O;function n(c,f){return or({data:c,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Rt(),ko].filter(p=>!!p),issueData:{code:_.invalid_arguments,argumentsError:f}})}s(n,"makeArgsIssue");function a(c,f){return or({data:c,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Rt(),ko].filter(p=>!!p),issueData:{code:_.invalid_return_type,returnTypeError:f}})}s(a,"makeReturnsIssue");let i={errorMap:r.common.contextualErrorMap},u=r.data;if(this._def.returns instanceof pr){let c=this;return he(async function(...f){let p=new Ie([]),y=await c._def.args.parseAsync(f,i).catch(w=>{throw p.addIssue(n(f,w)),p}),T=await Reflect.apply(u,this,y);return await c._def.returns._def.type.parseAsync(T,i).catch(w=>{throw p.addIssue(a(T,w)),p})})}else{let c=this;return he(function(...f){let p=c._def.args.safeParse(f,i);if(!p.success)throw new Ie([n(f,p.error)]);let y=Reflect.apply(u,this,p.data),T=c._def.returns.safeParse(y,i);if(!T.success)throw new Ie([a(y,T.error)]);return T.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new kt(g(l({},this._def),{args:lt.create(e).rest(Zt.create())}))}returns(e){return new kt(g(l({},this._def),{returns:e}))}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new kt(l({args:e||lt.create([]).rest(Zt.create()),returns:r||Zt.create(),typeName:"ZodFunction"},A(n)))}isEqual(e){return e instanceof kt&&this._def.args.isEqual(e._def.args)&&this._def.returns.isEqual(e._def.returns)}};s(Ol,"ZodFunction");var Ti=Ol;function un(t,e){let r=Ne(t),n=Ne(e);if(t===e)return{valid:!0,data:t};if(r===P.object&&n===P.object){let a=M.objectKeys(e),i=M.objectKeys(t).filter(c=>a.indexOf(c)!==-1),u=l(l({},t),e);for(let c of i){let f=un(t[c],e[c]);if(!f.valid)return{valid:!1};u[c]=f.data}return{valid:!0,data:u}}else if(r===P.array&&n===P.array){if(t.length!==e.length)return{valid:!1};let a=[];for(let i=0;i<t.length;i++){let u=t[i],c=e[i],f=un(u,c);if(!f.valid)return{valid:!1};a.push(f.data)}return{valid:!0,data:a}}else return r===P.date&&n===P.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}s(un,"mergeValues");var cn=class Ja extends D{dereference(e){return new Ja(g(l({},this._def),{left:this._def.left.dereference(e),right:this._def.right.dereference(e)}))}getReferences(){return ze([...this._def.left.getReferences(),...this._def.right.getReferences()])}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),a=s((i,u)=>{if(Xr(i)||Xr(u))return O;let c=un(i.value,u.value);return c.valid?((Qr(i)||Qr(u))&&r.dirty(),{status:r.value,value:c.data}):(E(n,{code:_.invalid_intersection_types}),O)},"handleParsed");return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,u])=>a(i,u)):a(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}isEqual(e){if(!(e instanceof Ja))return!1;let r=s((i,u)=>i.isEqual(u),"compare"),n=new ce([this._def.left,this._def.right],{compare:r}),a=new ce([e._def.left,e._def.right],{compare:r});return n.isEqual(a)}};s(cn,"ZodIntersection");cn.create=s((t,e,r)=>new cn(l({left:t,right:e,typeName:"ZodIntersection"},A(r))),"create");var Kn=cn,ln=class Cl extends D{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}isEqual(e){return e instanceof Cl?this._def.getter().isEqual(e._def.getter()):!1}};s(ln,"ZodLazy");ln.create=s((t,e)=>new ln(l({getter:t,typeName:"ZodLazy"},A(e))),"create");var Vn=ln,dn=class Zl extends D{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return E(r,{received:r.data,code:_.invalid_literal,expected:this._def.value}),O}return{status:"valid",value:e.data}}get value(){return this._def.value}isEqual(e){return e instanceof Zl?ot(this._def.value,e._def.value):!1}};s(dn,"ZodLiteral");dn.create=s((t,e)=>new dn(l({value:t,typeName:"ZodLiteral"},A(e))),"create");var qn=dn,fn=class Ya extends D{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}dereference(e){let r=this._def.keyType.dereference(e),n=this._def.valueType.dereference(e);return new Ya(g(l({},this._def),{keyType:r,valueType:n}))}getReferences(){return ze([...this._def.keyType.getReferences(),...this._def.valueType.getReferences()])}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==P.map)return E(n,{code:_.invalid_type,expected:P.map,received:n.parsedType}),O;let a=this._def.keyType,i=this._def.valueType,u=[...n.data.entries()].map(([c,f],p)=>({key:a._parse(new we(n,c,n.path,[p,"key"])),value:i._parse(new we(n,f,n.path,[p,"value"]))}));if(n.common.async){let c=new Map;return Promise.resolve().then(async()=>{for(let f of u){let p=await f.key,y=await f.value;if(p.status==="aborted"||y.status==="aborted")return O;(p.status==="dirty"||y.status==="dirty")&&r.dirty(),c.set(p.value,y.value)}return{status:r.value,value:c}})}else{let c=new Map;for(let f of u){let p=f.key,y=f.value;if(p.status==="aborted"||y.status==="aborted")return O;(p.status==="dirty"||y.status==="dirty")&&r.dirty(),c.set(p.value,y.value)}return{status:r.value,value:c}}}isEqual(e){return!(!(e instanceof Ya)||!this._def.keyType.isEqual(e._def.keyType)||!this._def.valueType.isEqual(e._def.valueType))}};s(fn,"ZodMap");fn.create=s((t,e,r)=>new fn(l({valueType:e,keyType:t,typeName:"ZodMap"},A(r))),"create");var Ei=fn,pn=class Il extends D{_parse(e){if(this._getType(e)!==P.nan){let n=this._getOrReturnCtx(e);return E(n,{code:_.invalid_type,expected:P.nan,received:n.parsedType}),O}return{status:"valid",value:e.data}}isEqual(e){return e instanceof Il}};s(pn,"ZodNaN");pn.create=s(t=>new pn(l({typeName:"ZodNaN"},A(t))),"create");var Pi=pn,hn=class Al extends D{_parse(e){let r=M.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==P.string&&n.parsedType!==P.number){let a=M.objectValues(r);return E(n,{expected:M.joinValues(a),received:n.parsedType,code:_.invalid_type}),O}if(r.indexOf(e.data)===-1){let a=M.objectValues(r);return E(n,{received:n.data,code:_.invalid_enum_value,options:a}),O}return he(e.data)}get enum(){return this._def.values}isEqual(e){return e instanceof Al?ot(this._def.values,e._def.values):!1}};s(hn,"ZodNativeEnum");hn.create=s((t,e)=>new hn(l({values:t,typeName:"ZodNativeEnum"},A(e))),"create");var Gn=hn,gn=class Rl extends D{_parse(e){let r=this._getOrReturnCtx(e);return E(r,{code:_.invalid_type,expected:P.never,received:r.parsedType}),O}isEqual(e){return e instanceof Rl}};s(gn,"ZodNever");gn.create=s(t=>new gn(l({typeName:"ZodNever"},A(t))),"create");var Ge=gn,mn=class Dl extends D{_parse(e){if(this._getType(e)!==P.null){let n=this._getOrReturnCtx(e);return E(n,{code:_.invalid_type,expected:P.null,received:n.parsedType}),O}return he(e.data)}isEqual(e){return e instanceof Dl}};s(mn,"ZodNull");mn.create=s(t=>new mn(l({typeName:"ZodNull"},A(t))),"create");var Wn=mn,yn=class Xa extends D{dereference(e){return new Xa(g(l({},this._def),{innerType:this._def.innerType.dereference(e)}))}getReferences(){return this._def.innerType.getReferences()}_parse(e){return this._getType(e)===P.null?he(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}isEqual(e){return e instanceof Xa?this._def.innerType.isEqual(e._def.innerType):!1}};s(yn,"ZodNullable");yn.create=s((t,e)=>new yn(l({innerType:t,typeName:"ZodNullable"},A(e))),"create");var ut=yn;function Bl(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,a=r>n?r:n,i=parseInt(t.toFixed(a).replace(".","")),u=parseInt(e.toFixed(a).replace(".",""));return i%u/Math.pow(10,a)}s(Bl,"floatSafeRemainder");var vn=class Lr extends D{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==P.number){let i=this._getOrReturnCtx(e);return E(i,{code:_.invalid_type,expected:P.number,received:i.parsedType}),O}let n,a=new be;for(let i of this._def.checks)i.kind==="int"?M.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{code:_.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),E(n,{code:_.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),E(n,{code:_.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?Bl(e.data,i.value)!==0&&(n=this._getOrReturnCtx(e,n),E(n,{code:_.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{code:_.not_finite,message:i.message}),a.dirty()):M.assertNever(i);return{status:a.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,k.toString(r))}gt(e,r){return this.setLimit("min",e,!1,k.toString(r))}lte(e,r){return this.setLimit("max",e,!0,k.toString(r))}lt(e,r){return this.setLimit("max",e,!1,k.toString(r))}setLimit(e,r,n,a){return new Lr(g(l({},this._def),{checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:k.toString(a)}]}))}_addCheck(e){return new Lr(g(l({},this._def),{checks:[...this._def.checks,e]}))}int(e){return this._addCheck({kind:"int",message:k.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:k.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:k.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:k.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:k.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:k.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:k.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:k.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:k.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&M.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}isEqual(e){if(!(e instanceof Lr))return!1;let r=new ce(this._def.checks),n=new ce(e._def.checks);return r.isEqual(n)}};s(vn,"ZodNumber");vn.create=s(t=>new vn(l({checks:[],typeName:"ZodNumber",coerce:t?.coerce||!1},A(t))),"create");var Jn=vn;function it(t){if(t instanceof ct){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=He.create(it(n))}return new ct(g(l({},t._def),{shape:s(()=>e,"shape")}))}else return t instanceof Bt?new Bt(g(l({},t._def),{type:it(t.element)})):t instanceof He?He.create(it(t.unwrap())):t instanceof ut?ut.create(it(t.unwrap())):t instanceof lt?lt.create(t.items.map(e=>it(e))):t}s(it,"deepPartialify");var We=class Se extends D{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=M.objectKeys(e);return this._cached={shape:e,keys:r}}dereference(e){let r=this._def.shape(),n={};for(let a in r)n[a]=r[a].dereference(e);return new Se(g(l({},this._def),{shape:s(()=>n,"shape")}))}getReferences(){let e=this._def.shape(),r=[];for(let n in e)r.push(...e[n].getReferences());return ze(r)}_parse(e){if(this._getType(e)!==P.object){let p=this._getOrReturnCtx(e);return E(p,{code:_.invalid_type,expected:P.object,received:p.parsedType}),O}let{status:n,ctx:a}=this._processInputParams(e),{shape:i,keys:u}=this._getCached(),c=[];if(!(this._def.catchall instanceof Ge&&this._def.unknownKeys==="strip"))for(let p in a.data)u.includes(p)||c.push(p);let f=[];for(let p of u){let y=i[p],T=a.data[p];f.push({key:{status:"valid",value:p},value:y._parse(new we(a,T,a.path,p)),alwaysSet:p in a.data})}if(this._def.catchall instanceof Ge){let p=this._def.unknownKeys;if(p==="passthrough")for(let y of c)f.push({key:{status:"valid",value:y},value:{status:"valid",value:a.data[y]}});else if(p==="strict")c.length>0&&(E(a,{code:_.unrecognized_keys,keys:c}),n.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let p=this._def.catchall;for(let y of c){let T=a.data[y];f.push({key:{status:"valid",value:y},value:p._parse(new we(a,T,a.path,y)),alwaysSet:y in a.data})}}return a.common.async?Promise.resolve().then(async()=>{let p=[];for(let y of f){let T=await y.key;p.push({key:T,value:await y.value,alwaysSet:y.alwaysSet})}return p}).then(p=>be.mergeObjectSync(n,p)):be.mergeObjectSync(n,f)}get shape(){return this._def.shape()}strict(e){return k.errToObj,new Se(l(g(l({},this._def),{unknownKeys:"strict"}),e!==void 0?{errorMap:s((r,n)=>{var a,i,u,c;let f=(u=(i=(a=this._def).errorMap)==null?void 0:i.call(a,r,n).message)!=null?u:n.defaultError;return r.code==="unrecognized_keys"?{message:(c=k.errToObj(e).message)!=null?c:f}:{message:f}},"errorMap")}:{}))}strip(){return new Se(g(l({},this._def),{unknownKeys:"strip"}))}passthrough(){return new Se(g(l({},this._def),{unknownKeys:"passthrough"}))}extend(e){return new Se(g(l({},this._def),{shape:s(()=>l(l({},this._def.shape()),e),"shape")}))}merge(e){return new Se({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:s(()=>l(l({},this._def.shape()),e._def.shape()),"shape"),typeName:"ZodObject"})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new Se(g(l({},this._def),{catchall:e}))}pick(e){let r={};return M.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new Se(g(l({},this._def),{shape:s(()=>r,"shape")}))}omit(e){let r={};return M.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new Se(g(l({},this._def),{shape:s(()=>r,"shape")}))}deepPartial(){return it(this)}partial(e){let r={};return M.objectKeys(this.shape).forEach(n=>{let a=this.shape[n];e&&!e[n]?r[n]=a:r[n]=a?.optional()}),new Se(g(l({},this._def),{shape:s(()=>r,"shape")}))}required(e){let r={};return M.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof He;)i=i._def.innerType;r[n]=i}}),new Se(g(l({},this._def),{shape:s(()=>r,"shape")}))}keyof(){return fr(M.objectKeys(this.shape))}isEqual(e){if(!(e instanceof Se)||!this._def.catchall.isEqual(e._def.catchall)||this._def.unknownKeys!==e._def.unknownKeys)return!1;let r=this._def.shape(),n=e._def.shape(),a=s((c,f)=>c[0]===f[0]&&c[1].isEqual(f[1]),"compare"),i=new ce(Object.entries(r),{compare:a}),u=new ce(Object.entries(n),{compare:a});return i.isEqual(u)}};s(We,"ZodObject");We.create=s((t,e)=>new We(l({shape:s(()=>t,"shape"),unknownKeys:"strip",catchall:Ge.create(),typeName:"ZodObject"},A(e))),"create");We.strictCreate=s((t,e)=>new We(l({shape:s(()=>t,"shape"),unknownKeys:"strict",catchall:Ge.create(),typeName:"ZodObject"},A(e))),"strictCreate");We.lazycreate=s((t,e)=>new We(l({shape:t,unknownKeys:"strip",catchall:Ge.create(),typeName:"ZodObject"},A(e))),"lazycreate");var ct=We,_n=class Qa extends D{dereference(e){return new Qa(g(l({},this._def),{innerType:this._def.innerType.dereference(e)}))}getReferences(){return this._def.innerType.getReferences()}_parse(e){return this._getType(e)===P.undefined?he(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}isEqual(e){return e instanceof Qa?this._def.innerType.isEqual(e._def.innerType):!1}};s(_n,"ZodOptional");_n.create=s((t,e)=>new _n(l({innerType:t,typeName:"ZodOptional"},A(e))),"create");var He=_n,Ml=class zr extends D{dereference(e){return new zr(g(l({},this._def),{in:this._def.in.dereference(e),out:this._def.out.dereference(e)}))}getReferences(){return ze([...this._def.in.getReferences(),...this._def.out.getReferences()])}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return s(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?O:i.status==="dirty"?(r.dirty(),st(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})},"handleAsync")();{let a=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?O:a.status==="dirty"?(r.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:n.path,parent:n})}}static create(e,r){return new zr({in:e,out:r,typeName:"ZodPipeline"})}isEqual(e){return!(!(e instanceof zr)||!this._def.in.isEqual(e._def.in)||!this._def.out.isEqual(e._def.out))}};s(Ml,"ZodPipeline");var Yn=Ml,bn=class ei extends D{unwrap(){return this._def.type}dereference(e){return new ei(g(l({},this._def),{type:this._def.type.dereference(e)}))}getReferences(){return this._def.type.getReferences()}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==P.promise&&r.common.async===!1)return E(r,{code:_.invalid_type,expected:P.promise,received:r.parsedType}),O;let n=r.parsedType===P.promise?r.data:Promise.resolve(r.data);return he(n.then(a=>this._def.type.parseAsync(a,{path:r.path,errorMap:r.common.contextualErrorMap})))}isEqual(e){return e instanceof ei?this._def.type.isEqual(e._def.type):!1}};s(bn,"ZodPromise");bn.create=s((t,e)=>new bn(l({type:t,typeName:"ZodPromise"},A(e))),"create");var pr=bn,Tn=class ti extends D{dereference(e){return new ti(g(l({},this._def),{innerType:this._def.innerType.dereference(e)}))}getReferences(){return this._def.innerType.getReferences()}_parse(e){let r=this._def.innerType._parse(e);return Dt(r)&&(r.value=Object.freeze(r.value)),r}unwrap(){return this._def.innerType}isEqual(e){return e instanceof ti?this._def.innerType.isEqual(e._def.innerType):!1}};s(Tn,"ZodReadonly");Tn.create=s((t,e)=>new Tn(l({innerType:t,typeName:"ZodReadonly"},A(e))),"create");var hr=Tn,jl=class Qt extends D{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}dereference(e){let r=this._def.keyType.dereference(e),n=this._def.valueType.dereference(e);return new Qt(g(l({},this._def),{keyType:r,valueType:n}))}getReferences(){return ze([...this._def.keyType.getReferences(),...this._def.valueType.getReferences()])}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==P.object)return E(n,{code:_.invalid_type,expected:P.object,received:n.parsedType}),O;let a=[],i=this._def.keyType,u=this._def.valueType;for(let c in n.data)a.push({key:i._parse(new we(n,c,n.path,c)),value:u._parse(new we(n,n.data[c],n.path,c))});return n.common.async?be.mergeObjectAsync(r,a):be.mergeObjectSync(r,a)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof D?new Qt(l({keyType:e,valueType:r,typeName:"ZodRecord"},A(n))):new Qt(l({keyType:ge.create(),valueType:e,typeName:"ZodRecord"},A(r)))}isEqual(e){return!(!(e instanceof Qt)||!this._def.keyType.isEqual(e._def.keyType)||!this._def.valueType.isEqual(e._def.valueType))}};s(jl,"ZodRecord");var Si=jl,En=class Nl extends D{dereference(e){let r=e[this._def.uri];return r||this}getReferences(){return[this._def.uri]}_parse(e){let r=this._getOrReturnCtx(e);return E(r,{code:_.unresolved_reference}),O}isOptional(){return!1}isNullable(){return!1}isEqual(e){return e instanceof Nl?this._def.uri===e._def.uri:!1}};s(En,"ZodRef");En.create=s(t=>new En({typeName:"ZodRef",uri:t}),"create");var xi=En,Pn=class er extends D{dereference(e){return new er(g(l({},this._def),{valueType:this._def.valueType.dereference(e)}))}getReferences(){return this._def.valueType.getReferences()}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==P.set)return E(n,{code:_.invalid_type,expected:P.set,received:n.parsedType}),O;let a=this._def;a.minSize!==null&&n.data.size<a.minSize.value&&(E(n,{code:_.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),r.dirty()),a.maxSize!==null&&n.data.size>a.maxSize.value&&(E(n,{code:_.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),r.dirty());let i=this._def.valueType;function u(f){let p=new Set;for(let y of f){if(y.status==="aborted")return O;y.status==="dirty"&&r.dirty(),p.add(y.value)}return{status:r.value,value:p}}s(u,"finalizeSet");let c=[...n.data.values()].map((f,p)=>i._parse(new we(n,f,n.path,p)));return n.common.async?Promise.all(c).then(f=>u(f)):u(c)}min(e,r){return new er(g(l({},this._def),{minSize:{value:e,message:k.toString(r)}}))}max(e,r){return new er(g(l({},this._def),{maxSize:{value:e,message:k.toString(r)}}))}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}isEqual(e){var r,n,a,i;if(!(e instanceof er))return!1;let u=(r=this._def.minSize)==null?void 0:r.value,c=(n=e._def.minSize)==null?void 0:n.value;if(u!==c)return!1;let f=(a=this._def.maxSize)==null?void 0:a.value,p=(i=e._def.maxSize)==null?void 0:i.value;return f!==p?!1:this._def.valueType.isEqual(e._def.valueType)}};s(Pn,"ZodSet");Pn.create=s((t,e)=>new Pn(l({valueType:t,minSize:null,maxSize:null,typeName:"ZodSet"},A(e))),"create");var wi=Pn,ki=/^c[^\s-]{8,}$/i,Oi=/^[a-z][a-z0-9]*$/,Ci=/^[0-9A-HJKMNP-TV-Z]{26}$/,Zi=/^[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,Ii=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,$l="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Hl=s(t=>t===$l,"isEmojiRegex"),$a,Ai=/^(((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}))$/,Ri=/^(([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})))$/,Di=s(t=>t.precision?t.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}Z$`):t.precision===0?t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"),"datetimeRegex");function Ul(t,e){return!!((e==="v4"||!e)&&Ai.test(t)||(e==="v6"||!e)&&Ri.test(t))}s(Ul,"isValidIP");var Sn=class Ot extends D{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==P.string){let i=this._getOrReturnCtx(e);return E(i,{code:_.invalid_type,expected:P.string,received:i.parsedType}),O}let n=new be,a;for(let i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(a=this._getOrReturnCtx(e,a),E(a,{code:_.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")e.data.length>i.value&&(a=this._getOrReturnCtx(e,a),E(a,{code:_.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){let u=e.data.length>i.value,c=e.data.length<i.value;(u||c)&&(a=this._getOrReturnCtx(e,a),u?E(a,{code:_.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):c&&E(a,{code:_.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")Ii.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"email",code:_.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")$a||($a=new RegExp($l,"u")),$a.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"emoji",code:_.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")Zi.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"uuid",code:_.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")ki.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"cuid",code:_.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")Oi.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"cuid2",code:_.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")Ci.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"ulid",code:_.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),E(a,{validation:"url",code:_.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"regex",code:_.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(e,a),E(a,{code:_.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(a=this._getOrReturnCtx(e,a),E(a,{code:_.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(a=this._getOrReturnCtx(e,a),E(a,{code:_.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?Di(i).test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{code:_.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="ip"?Ul(e.data,i.version)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"ip",code:_.invalid_string,message:i.message}),n.dirty()):M.assertNever(i);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(a=>e.test(a),l({validation:r,code:_.invalid_string},k.errToObj(n)))}_addCheck(e){return new Ot(g(l({},this._def),{checks:[...this._def.checks,e]}))}email(e){return this._addCheck(l({kind:"email"},k.errToObj(e)))}url(e){return this._addCheck(l({kind:"url"},k.errToObj(e)))}emoji(e){return this._addCheck(l({kind:"emoji"},k.errToObj(e)))}uuid(e){return this._addCheck(l({kind:"uuid"},k.errToObj(e)))}cuid(e){return this._addCheck(l({kind:"cuid"},k.errToObj(e)))}cuid2(e){return this._addCheck(l({kind:"cuid2"},k.errToObj(e)))}ulid(e){return this._addCheck(l({kind:"ulid"},k.errToObj(e)))}ip(e){return this._addCheck(l({kind:"ip"},k.errToObj(e)))}datetime(e){var r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck(l({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(r=e?.offset)!=null?r:!1},k.errToObj(e?.message)))}regex(e,r){return this._addCheck(l({kind:"regex",regex:e},k.errToObj(r)))}includes(e,r){return this._addCheck(l({kind:"includes",value:e,position:r?.position},k.errToObj(r?.message)))}startsWith(e,r){return this._addCheck(l({kind:"startsWith",value:e},k.errToObj(r)))}endsWith(e,r){return this._addCheck(l({kind:"endsWith",value:e},k.errToObj(r)))}min(e,r){return this._addCheck(l({kind:"min",value:e},k.errToObj(r)))}max(e,r){return this._addCheck(l({kind:"max",value:e},k.errToObj(r)))}length(e,r){return this._addCheck(l({kind:"length",value:e},k.errToObj(r)))}nonempty(e){return this.min(1,k.errToObj(e))}trim(){return new Ot(g(l({},this._def),{checks:[...this._def.checks,{kind:"trim"}]}))}secret(){return this._def[F]=g(l({},this._def[F]),{secret:!0}),this}toLowerCase(){return new Ot(g(l({},this._def),{checks:[...this._def.checks,{kind:"toLowerCase"}]}))}toUpperCase(){return new Ot(g(l({},this._def),{checks:[...this._def.checks,{kind:"toUpperCase"}]}))}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}isEqual(e){if(!(e instanceof Ot))return!1;let r=new ce(this._def.checks),n=new ce(e._def.checks);return r.isEqual(n)}};s(Sn,"ZodString");Sn.create=s(t=>{var e;return new Sn(l({checks:[],typeName:"ZodString",coerce:(e=t?.coerce)!=null?e:!1},A(t)))},"create");var ge=Sn,xn=class Fl extends D{_parse(e){if(this._getType(e)!==P.symbol){let n=this._getOrReturnCtx(e);return E(n,{code:_.invalid_type,expected:P.symbol,received:n.parsedType}),O}return he(e.data)}isEqual(e){return e instanceof Fl}};s(xn,"ZodSymbol");xn.create=s(t=>new xn(l({typeName:"ZodSymbol"},A(t))),"create");var Bi=xn,Mt=class ri extends D{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName==="ZodEffects"?this._def.schema.sourceType():this._def.schema}dereference(e){return new ri(g(l({},this._def),{schema:this._def.schema.dereference(e)}))}getReferences(){return this._def.schema.getReferences()}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),a=this._def.effect||null,i={addIssue:s(u=>{E(n,u),u.fatal?r.abort():r.dirty()},"addIssue"),get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){let u=a.transform(n.data,i);if(n.common.async)return Promise.resolve(u).then(async c=>{if(r.value==="aborted")return O;let f=await this._def.schema._parseAsync({data:c,path:n.path,parent:n});return f.status==="aborted"?O:f.status==="dirty"||r.value==="dirty"?st(f.value):f});{if(r.value==="aborted")return O;let c=this._def.schema._parseSync({data:u,path:n.path,parent:n});return c.status==="aborted"?O:c.status==="dirty"||r.value==="dirty"?st(c.value):c}}if(a.type==="refinement"){let u=s(c=>{let f=a.refinement(c,i);if(n.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c},"executeRefinement");if(n.common.async===!1){let c=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return c.status==="aborted"?O:(c.status==="dirty"&&r.dirty(),u(c.value),{status:r.value,value:c.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(c=>c.status==="aborted"?O:(c.status==="dirty"&&r.dirty(),u(c.value).then(()=>({status:r.value,value:c.value}))))}if(a.type==="transform")if(n.common.async===!1){let u=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Dt(u))return u;let c=a.transform(u.value,i);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:c}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(u=>Dt(u)?Promise.resolve(a.transform(u.value,i)).then(c=>({status:r.value,value:c})):u);M.assertNever(a)}isEqual(e){return!(e instanceof ri)||!this._def.schema.isEqual(e._def.schema)?!1:this._def.effect.type==="refinement"?e._def.effect.type!=="refinement"?!1:M.compareFunctions(this._def.effect.refinement,e._def.effect.refinement):this._def.effect.type==="transform"?e._def.effect.type!=="transform"?!1:M.compareFunctions(this._def.effect.transform,e._def.effect.transform):this._def.effect.type==="preprocess"?e._def.effect.type!=="preprocess"?!1:M.compareFunctions(this._def.effect.transform,e._def.effect.transform):(M.assertNever(this._def.effect),!1)}};s(Mt,"ZodEffects");Mt.create=s((t,e,r)=>new Mt(l({schema:t,typeName:"ZodEffects",effect:e},A(r))),"create");Mt.createWithPreprocess=s((t,e,r)=>new Mt(l({schema:e,effect:{type:"preprocess",transform:t},typeName:"ZodEffects"},A(r))),"createWithPreprocess");var Je=Mt,wn=class Kr extends D{dereference(e){let r=this._def.items.map(a=>a.dereference(e)),n=this._def.rest?this._def.rest.dereference(e):null;return new Kr(g(l({},this._def),{items:r,rest:n}))}getReferences(){return ze([...this._def.items.flatMap(e=>e.getReferences()),...this._def.rest?this._def.rest.getReferences():[]])}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==P.array)return E(n,{code:_.invalid_type,expected:P.array,received:n.parsedType}),O;if(n.data.length<this._def.items.length)return E(n,{code:_.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),O;!this._def.rest&&n.data.length>this._def.items.length&&(E(n,{code:_.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...n.data].map((u,c)=>{let f=this._def.items[c]||this._def.rest;return f?f._parse(new we(n,u,n.path,c)):null}).filter(u=>!!u);return n.common.async?Promise.all(i).then(u=>be.mergeArray(r,u)):be.mergeArray(r,i)}get items(){return this._def.items}rest(e){return new Kr(g(l({},this._def),{rest:e}))}isEqual(e){if(!(e instanceof Kr)||!this._restEquals(e))return!1;let r=s((i,u)=>i.isEqual(u),"compare"),n=new ce(this._def.items,{compare:r}),a=new ce(e._def.items,{compare:r});return n.isEqual(a)}_restEquals(e){return this._def.rest===null?e._def.rest===null:e._def.rest!==null&&this._def.rest.isEqual(e._def.rest)}};s(wn,"ZodTuple");wn.create=s((t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new wn(l({items:t,typeName:"ZodTuple",rest:null},A(e)))},"create");var lt=wn,kn=class Ll extends D{_parse(e){if(this._getType(e)!==P.undefined){let n=this._getOrReturnCtx(e);return E(n,{code:_.invalid_type,expected:P.undefined,received:n.parsedType}),O}return he(e.data)}isEqual(e){return e instanceof Ll}};s(kn,"ZodUndefined");kn.create=s(t=>new kn(l({typeName:"ZodUndefined"},A(t))),"create");var Xn=kn,On=class ni extends D{dereference(e){let r=this._def.options.map(n=>n.dereference(e));return new ni(g(l({},this._def),{options:r}))}getReferences(){return ze(this._def.options.reduce((e,r)=>[...e,...r.getReferences()],[]))}_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function a(i){for(let c of i)if(c.result.status==="valid")return c.result;for(let c of i)if(c.result.status==="dirty")return r.common.issues.push(...c.ctx.common.issues),c.result;let u=i.map(c=>new Ie(c.ctx.common.issues));return E(r,{code:_.invalid_union,unionErrors:u}),O}if(s(a,"handleResults"),r.common.async)return Promise.all(n.map(async i=>{let u=g(l({},r),{common:g(l({},r.common),{issues:[]}),parent:null});return{result:await i._parseAsync({data:r.data,path:r.path,parent:u}),ctx:u}})).then(a);{let i,u=[];for(let f of n){let p=g(l({},r),{common:g(l({},r.common),{issues:[]}),parent:null}),y=f._parseSync({data:r.data,path:r.path,parent:p});if(y.status==="valid")return y;y.status==="dirty"&&!i&&(i={result:y,ctx:p}),p.common.issues.length&&u.push(p.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let c=u.map(f=>new Ie(f));return E(r,{code:_.invalid_union,unionErrors:c}),O}}get options(){return this._def.options}isEqual(e){if(!(e instanceof ni))return!1;let r=s((i,u)=>i.isEqual(u),"compare"),n=new ce([...this._def.options],{compare:r}),a=new ce([...e._def.options],{compare:r});return n.isEqual(a)}};s(On,"ZodUnion");On.create=s((t,e)=>new On(l({options:t,typeName:"ZodUnion"},A(e))),"create");var Qn=On,Cn=class zl extends D{constructor(){super(...arguments),this._unknown=!0}_parse(e){return he(e.data)}isEqual(e){return e instanceof zl}};s(Cn,"ZodUnknown");Cn.create=s(t=>new Cn(l({typeName:"ZodUnknown"},A(t))),"create");var Zt=Cn,Zn=class Kl extends D{_parse(e){if(this._getType(e)!==P.undefined){let n=this._getOrReturnCtx(e);return E(n,{code:_.invalid_type,expected:P.void,received:n.parsedType}),O}return he(e.data)}isEqual(e){return e instanceof Kl}};s(Zn,"ZodVoid");Zn.create=s(t=>new Zn(l({typeName:"ZodVoid"},A(t))),"create");var Mi=Zn,kv=/^\d{4}-\d{2}-\d{2}(T|\s)?((\d{2}:\d{2}:\d{2}(\.\d{1,3})?)|(\d{2}:\d{2}))?(\s?([+-]\d{2}:\d{2}|Z))?$/,jt=s((t,e,r=!0)=>{if(typeof t!="object")throw new Ua("Input must be an object");let n=s(u=>{let c=u;return e?.nullable&&(c=c.nullable()),e?.optional&&(c=c.optional()),e?.passtrough&&typeof c.passthrough=="function"&&(c=c.passthrough()),c},"applyOptions"),a=Object.entries(t).reduce((u,[c,f])=>{if(f===null)u[c]=n(x.null());else switch(typeof f){case"string":u[c]=kv.test(f)?n(x.string().datetime()):n(x.string());break;case"number":u[c]=n(x.number());break;case"boolean":u[c]=n(x.boolean());break;case"object":Array.isArray(f)?f.length===0?u[c]=n(x.array(x.unknown())):typeof f[0]=="object"?u[c]=n(x.array(jt(f[0],e,!1))):["string","number","boolean"].includes(typeof f[0])&&(u[c]=n(x.array(x[typeof f[0]]()))):u[c]=n(jt(f,e,!1));break;default:throw new Ua(`Unsupported type for key ${c}`)}return u},{}),i=Object.keys(a).length>0;return e?.passtrough||!r&&!i?x.object(a).passthrough():x.object(a)},"objectToZui");function Vl(){return{}}s(Vl,"parseAnyDef");function ji(t,e,r,n){n?.errorMessages&&r&&(t.errorMessage=g(l({},t.errorMessage),{[e]:r}))}s(ji,"addErrorMessage");function J(t,e,r,n,a){t[e]=r,ji(t,e,n,a)}s(J,"setResponseValueAndErrors");function ql(t,e){var r,n;let a={type:"array"};return((n=(r=t.type)==null?void 0:r._def)==null?void 0:n.typeName)!=="ZodAny"&&(a.items=q(t.type._def,g(l({},e),{currentPath:[...e.currentPath,"items"]}))),t.minLength&&J(a,"minItems",t.minLength.value,t.minLength.message,e),t.maxLength&&J(a,"maxItems",t.maxLength.value,t.maxLength.message,e),t.exactLength&&(J(a,"minItems",t.exactLength.value,t.exactLength.message,e),J(a,"maxItems",t.exactLength.value,t.exactLength.message,e)),a}s(ql,"parseArrayDef");function Gl(t,e){let r=l({type:"integer",format:"int64"},t.coerce?{[F]:{coerce:t.coerce||void 0}}:{});if(!t.checks)return r;for(let n of t.checks)switch(n.kind){case"min":e.target==="jsonSchema7"?n.inclusive?J(r,"minimum",n.value,n.message,e):J(r,"exclusiveMinimum",n.value,n.message,e):(n.inclusive||(r.exclusiveMinimum=!0),J(r,"minimum",n.value,n.message,e));break;case"max":e.target==="jsonSchema7"?n.inclusive?J(r,"maximum",n.value,n.message,e):J(r,"exclusiveMaximum",n.value,n.message,e):(n.inclusive||(r.exclusiveMaximum=!0),J(r,"maximum",n.value,n.message,e));break;case"multipleOf":J(r,"multipleOf",n.value,n.message,e);break}return r}s(Gl,"parseBigintDef");function Wl(t){return l({type:"boolean"},t.coerce?{[F]:{coerce:t.coerce||void 0}}:{})}s(Wl,"parseBooleanDef");function Jl(t,e){return q(t.type._def,e)}s(Jl,"parseBrandedDef");var Ov=s((t,e)=>q(t.innerType._def,e),"parseCatchDef");function Yl(t,e){return e.dateStrategy=="integer"?Cv(t,e):l({type:"string",format:"date-time"},t.coerce?{[F]:{coerce:t.coerce||void 0}}:{})}s(Yl,"parseDateDef");var Cv=s((t,e)=>{let r=l({type:"integer",format:"unix-time"},t.coerce?{[F]:{coerce:t.coerce||void 0}}:{});for(let n of t.checks)switch(n.kind){case"min":e.target==="jsonSchema7"&&J(r,"minimum",n.value,n.message,e);break;case"max":e.target==="jsonSchema7"&&J(r,"maximum",n.value,n.message,e);break}return r},"integerDateParser");function Xl(t,e){return g(l({},q(t.innerType._def,e)),{default:t.defaultValue()})}s(Xl,"parseDefaultDef");function Ql(t,e){return e.effectStrategy==="input"?q(t.schema._def,e):{}}s(Ql,"parseEffectsDef");function ed(t){return{type:"string",enum:t.values}}s(ed,"parseEnumDef");var Zv=s(t=>"type"in t&&t.type==="string"?!1:"allOf"in t,"isJsonSchema7AllOfType");function td(t,e){let r=[q(t.left._def,g(l({},e),{currentPath:[...e.currentPath,"allOf","0"]})),q(t.right._def,g(l({},e),{currentPath:[...e.currentPath,"allOf","1"]}))].filter(i=>!!i),n=e.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,a=[];return r.forEach(i=>{if(Zv(i))a.push(...i.allOf),i.unevaluatedProperties===void 0&&(n=void 0);else{let u=i;if("additionalProperties"in i&&i.additionalProperties===!1){let c=i,{additionalProperties:f}=c;u=Ao(c,["additionalProperties"])}else n=void 0;a.push(u)}}),a.length?l({allOf:a},n):void 0}s(td,"parseIntersectionDef");function rd(t,e){let r=typeof t.value;return r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string"?{type:Array.isArray(t.value)?"array":"object"}:e.target==="openApi3"?{type:r==="bigint"?"integer":r,enum:[t.value]}:{type:r==="bigint"?"integer":r,const:t.value}}s(rd,"parseLiteralDef");var Xt={cuid:"^[cC][^\\s-]{8,}$",cuid2:"^[a-z][a-z0-9]*$",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:"^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",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]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$",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})))$"};function Ni(t,e){let r=l({type:"string"},t.coerce?{[F]:{coerce:t.coerce||void 0}}:{});function n(a){return e.patternStrategy==="escape"?Iv(a):a}if(s(n,"processPattern"),t.checks)for(let a of t.checks)switch(a.kind){case"min":J(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,a.value):a.value,a.message,e);break;case"max":J(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,a.value):a.value,a.message,e);break;case"email":switch(e.emailStrategy){case"format:email":tt(r,"email",a.message,e);break;case"format:idn-email":tt(r,"idn-email",a.message,e);break;case"pattern:zod":Me(r,Xt.email,a.message,e);break}break;case"url":tt(r,"uri",a.message,e);break;case"uuid":tt(r,"uuid",a.message,e);break;case"regex":Me(r,a.regex.source,a.message,e);break;case"cuid":Me(r,Xt.cuid,a.message,e);break;case"cuid2":Me(r,Xt.cuid2,a.message,e);break;case"startsWith":Me(r,"^"+n(a.value),a.message,e);break;case"endsWith":Me(r,n(a.value)+"$",a.message,e);break;case"datetime":tt(r,"date-time",a.message,e);break;case"length":J(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,a.value):a.value,a.message,e),J(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,a.value):a.value,a.message,e);break;case"includes":{Me(r,n(a.value),a.message,e);break}case"ip":{a.version!=="v6"&&tt(r,"ipv4",a.message,e),a.version!=="v4"&&tt(r,"ipv6",a.message,e);break}case"emoji":Me(r,Xt.emoji,a.message,e);break;case"ulid":{Me(r,Xt.ulid,a.message,e);break}case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}s(Ni,"parseStringDef");var Iv=s(t=>Array.from(t).map(e=>/[a-zA-Z0-9]/.test(e)?e:`\\${e}`).join(""),"escapeNonAlphaNumeric"),tt=s((t,e,r,n)=>{var a;t.format||(a=t.anyOf)!=null&&a.some(i=>i.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push(l({format:t.format},t.errorMessage&&n.errorMessages&&{errorMessage:{format:t.errorMessage.format}})),delete t.format,t.errorMessage&&(delete t.errorMessage.format,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.anyOf.push(l({format:e},r&&n.errorMessages&&{errorMessage:{format:r}}))):J(t,"format",e,r,n)},"addFormat"),Me=s((t,e,r,n)=>{var a;t.pattern||(a=t.allOf)!=null&&a.some(i=>i.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push(l({pattern:t.pattern},t.errorMessage&&n.errorMessages&&{errorMessage:{pattern:t.errorMessage.pattern}})),delete t.pattern,t.errorMessage&&(delete t.errorMessage.pattern,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.allOf.push(l({pattern:e},r&&n.errorMessages&&{errorMessage:{pattern:r}}))):J(t,"pattern",e,r,n)},"addPattern");function $i(t,e){var r,n,a,i,u;if(e.target==="openApi3"&&((r=t.keyType)==null?void 0:r._def.typeName)==="ZodEnum")return{type:"object",required:t.keyType._def.values,properties:t.keyType._def.values.reduce((f,p)=>{var y;return g(l({},f),{[p]:(y=q(t.valueType._def,g(l({},e),{currentPath:[...e.currentPath,"properties",p]})))!=null?y:{}})},{}),additionalProperties:!1};let c={type:"object",additionalProperties:(n=q(t.valueType._def,g(l({},e),{currentPath:[...e.currentPath,"additionalProperties"]})))!=null?n:{}};if(e.target==="openApi3")return c;if(((a=t.keyType)==null?void 0:a._def.typeName)==="ZodString"&&((i=t.keyType._def.checks)!=null&&i.length)){let f=Object.entries(Ni(t.keyType._def,e)).reduce((p,[y,T])=>y==="type"?p:g(l({},p),{[y]:T}),{});return g(l({},c),{propertyNames:f})}else if(((u=t.keyType)==null?void 0:u._def.typeName)==="ZodEnum")return g(l({},c),{propertyNames:{enum:t.keyType._def.values}});return c}s($i,"parseRecordDef");function nd(t,e){if(e.mapStrategy==="record")return $i(t,e);let r=q(t.keyType._def,g(l({},e),{currentPath:[...e.currentPath,"items","items","0"]}))||{},n=q(t.valueType._def,g(l({},e),{currentPath:[...e.currentPath,"items","items","1"]}))||{};return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}s(nd,"parseMapDef");function ad(t){let e=t.values,n=Object.keys(t.values).filter(i=>typeof e[e[i]]!="number").map(i=>e[i]),a=Array.from(new Set(n.map(i=>typeof i)));return{type:a.length===1?a[0]==="string"?"string":"number":["string","number"],enum:n.filter(i=>typeof i=="string"||typeof i=="number")}}s(ad,"parseNativeEnumDef");function id(){return{not:{}}}s(id,"parseNeverDef");function sd(t){return t.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}s(sd,"parseNullDef");var In={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function od(t,e){if(e.target==="openApi3")return Oo(t,e);let r=t.options instanceof Map?Array.from(t.options.values()):t.options;if(r.every(n=>n._def.typeName in In&&(!n._def.checks||!n._def.checks.length))){let n=r.reduce((a,i)=>{let u=In[i._def.typeName];return u&&!a.includes(u)?[...a,u]:a},[]);return{type:n.length>1?n:n[0]}}else if(r.every(n=>n._def.typeName==="ZodLiteral"&&!n.description)){let n=r.reduce((a,i)=>{let u=typeof i._def.value;switch(u){case"string":case"number":case"boolean":return[...a,u];case"bigint":return[...a,"integer"];case"object":if(i._def.value===null)return[...a,"null"];case"symbol":case"undefined":case"function":default:return a}},[]);if(n.length===r.length){let a=n.filter((i,u,c)=>c.indexOf(i)===u);return{type:a.length>1?a:a[0],enum:r.reduce((i,u)=>i.includes(u._def.value)?i:[...i,u._def.value],[])}}}else if(r.every(n=>n._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((n,a)=>[...n,...a._def.values.filter(i=>!n.includes(i))],[])};return Oo(t,e)}s(od,"parseUnionDef");var Oo=s((t,e)=>{let r=(t.options instanceof Map?Array.from(t.options.values()):t.options).map((a,i)=>q(a._def,g(l({},e),{currentPath:[...e.currentPath,e.unionStrategy,`${i}`]}))).filter(a=>!!a&&(!e.strictUnions||typeof a=="object"&&Object.keys(a).length>0)),n=e.discriminator&&t.typeName==="ZodDiscriminatedUnion"&&typeof t.discriminator=="string"?{discriminator:{propertyName:t.discriminator}}:{};if(r.length)return e.unionStrategy==="anyOf"?l({anyOf:r},n):l({oneOf:r},n)},"asUnionOf");function ud(t,e){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(t.innerType._def.typeName)&&(!t.innerType._def.checks||!t.innerType._def.checks.length))return e.target==="openApi3"?{type:In[t.innerType._def.typeName],nullable:!0}:{type:[In[t.innerType._def.typeName],"null"]};if(e.target==="openApi3"){let n=q(t.innerType._def,g(l({},e),{currentPath:[...e.currentPath]}));return n&&g(l({},n),{nullable:!0})}let r=q(t.innerType._def,g(l({},e),{currentPath:[...e.currentPath,"anyOf","0"]}));return r&&{anyOf:[r,{type:"null"}]}}s(ud,"parseNullableDef");function cd(t,e){let r=l({type:"number"},t.coerce?{[F]:{coerce:t.coerce||void 0}}:{});if(!t.checks)return r;for(let n of t.checks)switch(n.kind){case"int":r.type="integer",ji(r,"type",n.message,e);break;case"min":e.target==="jsonSchema7"?n.inclusive?J(r,"minimum",n.value,n.message,e):J(r,"exclusiveMinimum",n.value,n.message,e):(n.inclusive||(r.exclusiveMinimum=!0),J(r,"minimum",n.value,n.message,e));break;case"max":e.target==="jsonSchema7"?n.inclusive?J(r,"maximum",n.value,n.message,e):J(r,"exclusiveMaximum",n.value,n.message,e):(n.inclusive||(r.exclusiveMaximum=!0),J(r,"maximum",n.value,n.message,e));break;case"multipleOf":J(r,"multipleOf",n.value,n.message,e);break}return r}s(cd,"parseNumberDef");function ld(t,e){var r;let n=g(l({type:"object"},Object.entries(t.shape()).reduce((a,[i,u])=>{if(u===void 0||u._def===void 0)return a;let c=q(u._def,g(l({},e),{currentPath:[...e.currentPath,"properties",i],propertyPath:[...e.currentPath,"properties",i]}));return c===void 0?a:{properties:g(l({},a.properties),{[i]:c}),required:u.isOptional()?a.required:[...a.required,i]}},{properties:{},required:[]})),{additionalProperties:t.catchall._def.typeName==="ZodNever"?t.unknownKeys==="passthrough":(r=q(t.catchall._def,g(l({},e),{currentPath:[...e.currentPath,"additionalProperties"]})))!=null?r:!0});return n.required.length||delete n.required,n}s(ld,"parseObjectDef");var Av=s((t,e)=>{var r;if(e.currentPath.toString()===((r=e.propertyPath)==null?void 0:r.toString()))return q(t.innerType._def,e);let n=q(t.innerType._def,g(l({},e),{currentPath:[...e.currentPath,"anyOf","1"]}));return n?{anyOf:[{not:{}},n]}:{}},"parseOptionalDef"),Rv=s((t,e)=>{if(e.pipeStrategy==="input")return q(t.in._def,e);if(e.pipeStrategy==="output")return q(t.out._def,e);let r=q(t.in._def,g(l({},e),{currentPath:[...e.currentPath,"allOf","0"]})),n=q(t.out._def,g(l({},e),{currentPath:[...e.currentPath,"allOf",r?"1":"0"]}));return{allOf:[r,n].filter(a=>a!==void 0)}},"parsePipelineDef");function dd(t,e){return q(t.type._def,e)}s(dd,"parsePromiseDef");function fd(t,e){let n={type:"array",uniqueItems:!0,items:q(t.valueType._def,g(l({},e),{currentPath:[...e.currentPath,"items"]}))};return t.minSize&&J(n,"minItems",t.minSize.value,t.minSize.message,e),t.maxSize&&J(n,"maxItems",t.maxSize.value,t.maxSize.message,e),n}s(fd,"parseSetDef");function pd(t,e){return t.rest?{type:"array",minItems:t.items.length,items:t.items.map((r,n)=>q(r._def,g(l({},e),{currentPath:[...e.currentPath,"items",`${n}`]}))).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:q(t.rest._def,g(l({},e),{currentPath:[...e.currentPath,"additionalItems"]}))}:{type:"array",minItems:t.items.length,maxItems:t.items.length,items:t.items.map((r,n)=>q(r._def,g(l({},e),{currentPath:[...e.currentPath,"items",`${n}`]}))).reduce((r,n)=>n===void 0?r:[...r,n],[])}}s(pd,"parseTupleDef");function hd(){return{not:{}}}s(hd,"parseUndefinedDef");function gd(){return{}}s(gd,"parseUnknownDef");var Dv=s((t,e)=>q(t.innerType._def,e),"parseReadonlyDef");function md(t){return{$ref:t.uri}}s(md,"parseRefDef");function q(t,e,r=!1){let n=e.seen.get(t);if(n&&!r){let u=Bv(n,e);if(u!==void 0)return u}let a={def:t,path:e.currentPath,jsonSchema:void 0};e.seen.set(t,a);let i=jv(t,t.typeName,e);return i&&Nv(t,e,i),a.jsonSchema=i,i}s(q,"parseDef");var Bv=s((t,e)=>{switch(e.$refStrategy){case"root":return{$ref:t.path.join("/")};case"relative":return{$ref:Mv(e.currentPath,t.path)};case"none":case"seen":return t.path.length<e.currentPath.length&&t.path.every((r,n)=>e.currentPath[n]===r)?(console.warn(`Recursive reference detected at ${e.currentPath.join("/")}! Defaulting to any`),{}):e.$refStrategy==="seen"?{}:void 0}},"get$ref"),Mv=s((t,e)=>{let r=0;for(;r<t.length&&r<e.length&&t[r]===e[r];r++);return[(t.length-r).toString(),...e.slice(r)].join("/")},"getRelativePath"),jv=s((t,e,r)=>{switch(e){case"ZodString":return Ni(t,r);case"ZodNumber":return cd(t,r);case"ZodObject":return ld(t,r);case"ZodBigInt":return Gl(t,r);case"ZodBoolean":return Wl(t);case"ZodDate":return Yl(t,r);case"ZodUndefined":return hd();case"ZodNull":return sd(r);case"ZodArray":return ql(t,r);case"ZodUnion":case"ZodDiscriminatedUnion":return od(t,r);case"ZodIntersection":return td(t,r);case"ZodTuple":return pd(t,r);case"ZodRecord":return $i(t,r);case"ZodRef":return md(t);case"ZodLiteral":return rd(t,r);case"ZodEnum":return ed(t);case"ZodNativeEnum":return ad(t);case"ZodNullable":return ud(t,r);case"ZodOptional":return Av(t,r);case"ZodMap":return nd(t,r);case"ZodSet":return fd(t,r);case"ZodLazy":return q(t.getter()._def,r);case"ZodPromise":return dd(t,r);case"ZodNaN":case"ZodNever":return id();case"ZodEffects":return Ql(t,r);case"ZodAny":return Vl();case"ZodUnknown":return gd();case"ZodDefault":return Xl(t,r);case"ZodBranded":return Jl(t,r);case"ZodReadonly":return Dv(t,r);case"ZodCatch":return Ov(t,r);case"ZodPipeline":return Rv(t,r);case"ZodFunction":case"ZodVoid":case"ZodSymbol":return;default:return(n=>{})(e)}},"selectParser"),Nv=s((t,e,r)=>(t.description&&(r.description=t.description,e.markdownDescription&&(r.markdownDescription=t.description)),Object.assign(r,{[F]:l(l({},t[F]),r[F])}),r),"addMeta"),Co={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"string",mapStrategy:"entries",definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",emailStrategy:"format:email",discriminator:!1,unionStrategy:"anyOf"},$v=s(t=>typeof t=="string"?g(l({},Co),{name:t}):l(l({},Co),t),"getDefaultOptions"),Hv=s(t=>{let e=$v(t),r=e.name!==void 0?[...e.basePath,e.definitionPath,e.name]:e.basePath;return g(l({},e),{currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(e.definitions).map(([n,a])=>[a._def,{def:a._def,path:[...e.basePath,e.definitionPath,n],jsonSchema:void 0}]))})},"getRefs"),Uv=s((t,e)=>{var r;let n=Hv(e),a=typeof e=="object"&&e.definitions?Object.entries(e.definitions).reduce((f,[p,y])=>{var T;return g(l({},f),{[p]:(T=q(y._def,g(l({},n),{currentPath:[...n.basePath,n.definitionPath,p]}),!0))!=null?T:{}})},{}):void 0,i=typeof e=="string"?e:e?.name,u=(r=q(t._def,i===void 0?n:g(l({},n),{currentPath:[...n.basePath,n.definitionPath,i]}),!1))!=null?r:{},c=i===void 0?a?g(l({},u),{[n.definitionPath]:a}):u:{$ref:[...n.$refStrategy==="relative"?[]:n.basePath,n.definitionPath,i].join("/"),[n.definitionPath]:g(l({},a),{[i]:u})};return n.target==="jsonSchema7"?c.$schema="http://json-schema.org/draft-07/schema#":n.target==="jsonSchema2019-09"&&(c.$schema="https://json-schema.org/draft/2019-09/schema#"),c},"zodToJsonSchema"),ea=s((t,e={target:"openApi3"})=>{let r=Uv(t,e);return e.$schemaUrl===!1?delete r.$schema:typeof e.$schemaUrl=="string"&&(r.$schema=e.$schemaUrl),r},"zuiToJsonSchema"),Fv=["gpt-3.5-turbo","gpt-3.5-turbo-16k","gpt-4","gpt-4-1106-preview","gpt-4-vision-preview","gpt-4-0125-preview","gpt-4-turbo-preview","gpt-4-turbo","gpt-4o","gpt-3.5-turbo-0125","gpt-3.5-turbo-1106"],db=yt.create(["any","string","number","boolean","object","pattern","date","array","target","time","enum"]),yd=s(t=>ge.create().displayAs({id:"variable",params:l({type:t?.type||"any"},t?.params)}),"variable"),vd=s(t=>ge.create().displayAs({id:"conversation",params:l({},t?.params)}),"conversation"),_d=s(t=>ge.create().displayAs({id:"user",params:l({},t?.params)}),"user"),bd=s(t=>ge.create().displayAs({id:"message",params:l({},t?.params)}),"message"),Td=s(t=>ge.create().displayAs({id:"agent",params:l({},t?.params)}),"agent"),Ed=s(t=>ge.create().displayAs({id:"event",params:l({},t?.params)}),"event"),Pd=s(t=>ge.create().displayAs({id:"table",params:l({},t?.params)}),"table"),Sd=s(t=>ge.create().displayAs({id:"tablerow",params:l({},t?.params)}),"tablerow"),xd=s(t=>ge.create().displayAs({id:"intent",params:l({},t?.params)}),"intent"),wd=s(()=>yt.create(Fv).displayAs({id:"dropdown",params:{}}),"aimodel"),kd=s(t=>ge.create().displayAs({id:"datasource",params:l({},t)}),"datasource"),Od=s(t=>ge.create().displayAs({id:"knowledgebase",params:l({},t)}),"knowledgebase"),Cd={object:ct.lazycreate},Zd=s((t,e={message:`Input not instance of ${t.name}`})=>vi(r=>r instanceof t,e),"instanceOfType"),Hi=ge.create,Ui=Jn.create,Id=Pi.create,Ad=Hn.create,Fi=Un.create,Rd=zn.create,Dd=Bi.create,Bd=Xn.create,Md=Wn.create,jd=cr.create,Nd=Zt.create,$d=Ge.create,Hd=Mi.create,Ud=Bt.create,Fd=ct.create,Ld=ct.strictCreate,zd=Qn.create,Kd=_i.create,Vd=Kn.create,qd=lt.create,Gd=Si.create,Wd=xi.create,Jd=hr.create,Yd=Ei.create,Xd=wi.create,Qd=Ti.create,ef=Vn.create,tf=qn.create,rf=yt.create,nf=Gn.create,af=pr.create,ai=Je.create,sf=He.create,of=ut.create,Lv=dr.create,uf=Je.createWithPreprocess,cf=Yn.create,lf=s(()=>Hi().optional(),"ostring"),df=s(()=>Ui().optional(),"onumber"),ff=s(()=>Fi().optional(),"oboolean"),pf=D.fromJsonSchema,hf=D.fromObject,gf={string:s(t=>ge.create(g(l({},t),{coerce:!0})),"string"),number:s(t=>Jn.create(g(l({},t),{coerce:!0})),"number"),boolean:s(t=>Un.create(g(l({},t),{coerce:!0})),"boolean"),bigint:s(t=>Hn.create(g(l({},t),{coerce:!0})),"bigint"),date:s(t=>zn.create(g(l({},t),{coerce:!0})),"date")},mf=O,v=x,yf=s((t,e)=>t.anyOf.length?t.anyOf.length===1?de(t.anyOf[0],g(l({},e),{path:[...e.path,"anyOf",0]})):`z.union([${t.anyOf.map((r,n)=>de(r,g(l({},e),{path:[...e.path,"anyOf",n]}))).join(", ")}])`:"z.any()","parseAnyOf"),zv=s(t=>{var e;return(e=t[F])!=null&&e.coerce?"z.coerce.boolean()":"z.boolean()"},"parseBoolean"),Kv=s(t=>"z.any()","parseDefault"),Vv=s((t,e)=>`z.union([${t.type.map(r=>de(g(l({},t),{type:r}),e)).join(", ")}])`,"parseMultipleType"),qv=s((t,e)=>`z.any().refine((value) => !${de(t.not,g(l({},e),{path:[...e.path,"not"]}))}.safeParse(value).success, "Invalid input: Should NOT be valid against schema")`,"parseNot"),Gv=s(t=>"z.null()","parseNull"),Wv=s(t=>[t.slice(0,t.length/2),t.slice(t.length/2)],"half"),Jv=s((t,...e)=>Object.keys(t).reduce((r,n)=>(e.includes(n)||(r[n]=t[n]),r),{}),"omit");function pe(t,e,r){var n;let a=t[e],i="";if(a!==void 0){let u=r({value:a,json:JSON.stringify(a)});if(u){let c=u[0],f=u.length===3?u[1]:"",p=u.length===3?u[2]:u[1];i+=c,((n=t.errorMessage)==null?void 0:n[e])!==void 0&&(i+=f+JSON.stringify(t.errorMessage[e])),i+=p}}return i}s(pe,"withMessage");var tr=Symbol("Original index"),Yv=s(t=>{let e=[];for(let r=0;r<t.length;r++){let n=t[r];if(typeof n=="boolean")e.push(n?{[tr]:r}:{[tr]:r,not:{}});else{if(tr in n)return t;e.push(g(l({},n),{[tr]:r}))}}return e},"ensureOriginalIndex");function lr(t,e){if(t.allOf.length===0)return"z.never()";if(t.allOf.length===1){let r=t.allOf[0];return de(r,g(l({},e),{path:[...e.path,"allOf",r[tr]]}))}else{let[r,n]=Wv(Yv(t.allOf));return`z.intersection(${lr({allOf:r},e)}, ${lr({allOf:n},e)})`}}s(lr,"parseAllOf");var Xv=s((t,e)=>{if(Array.isArray(t.items))return`z.tuple([${t.items.map((n,a)=>de(n,g(l({},e),{path:[...e.path,"items",a]})))}])`;let r=t.items?`z.array(${de(t.items,g(l({},e),{path:[...e.path,"items"]}))})`:"z.array(z.any())";return r+=pe(t,"minItems",({json:n})=>[`.min(${n}`,", ",")"]),r+=pe(t,"maxItems",({json:n})=>[`.max(${n}`,", ",")"]),r},"parseArray"),Qv=s(t=>`z.literal(${JSON.stringify(t.const)})`,"parseConst"),e_=s(t=>t.enum.length===0?"z.never()":t.enum.length===1?`z.literal(${JSON.stringify(t.enum[0])})`:t.enum.every(e=>typeof e=="string")?`z.enum([${t.enum.map(e=>JSON.stringify(e))}])`:`z.union([${t.enum.map(e=>`z.literal(${JSON.stringify(e)})`).join(", ")}])`,"parseEnum"),t_=s((t,e)=>{let r=de(t.if,g(l({},e),{path:[...e.path,"if"]})),n=de(t.then,g(l({},e),{path:[...e.path,"then"]})),a=de(t.else,g(l({},e),{path:[...e.path,"else"]}));return`z.union([${n}, ${a}]).superRefine((value,ctx) => {
|
|
34
|
-
const result = ${r}.safeParse(value).success
|
|
35
|
-
? ${n}.safeParse(value)
|
|
36
|
-
: ${a}.safeParse(value);
|
|
37
|
-
if (!result.success) {
|
|
38
|
-
result.error.errors.forEach((error) => ctx.addIssue(error))
|
|
39
|
-
}
|
|
40
|
-
})`},"parseIfThenElse"),r_=s(t=>{var e;let r="z.number()";return(e=t[F])!=null&&e.coerce&&(r="z.coerce.number()"),t.type==="integer"?r+=pe(t,"type",()=>[".int(",")"]):r+=pe(t,"format",({value:n})=>{if(n==="int64")return[".int(",")"]}),r+=pe(t,"multipleOf",({value:n,json:a})=>n===1?r.startsWith("z.number().int(")?void 0:[".int(",")"]:[`.multipleOf(${a}`,", ",")"]),typeof t.minimum=="number"?t.exclusiveMinimum===!0?r+=pe(t,"minimum",({json:n})=>[`.gt(${n}`,", ",")"]):r+=pe(t,"minimum",({json:n})=>[`.gte(${n}`,", ",")"]):typeof t.exclusiveMinimum=="number"&&(r+=pe(t,"exclusiveMinimum",({json:n})=>[`.gt(${n}`,", ",")"])),typeof t.maximum=="number"?t.exclusiveMaximum===!0?r+=pe(t,"maximum",({json:n})=>[`.lt(${n}`,", ",")"]):r+=pe(t,"maximum",({json:n})=>[`.lte(${n}`,", ",")"]):typeof t.exclusiveMaximum=="number"&&(r+=pe(t,"exclusiveMaximum",({json:n})=>[`.lt(${n}`,", ",")"])),r},"parseNumber"),Li=s((t,e)=>t.oneOf.length?t.oneOf.length===1?de(t.oneOf[0],g(l({},e),{path:[...e.path,"oneOf",0]})):`z.any().superRefine((x, ctx) => {
|
|
41
|
-
const schemas = [${t.oneOf.map((r,n)=>de(r,g(l({},e),{path:[...e.path,"oneOf",n]}))).join(", ")}];
|
|
42
|
-
const errors = schemas.reduce(
|
|
43
|
-
(errors: z.ZodError[], schema) =>
|
|
44
|
-
((result) => ("error" in result ? [...errors, result.error] : errors))(
|
|
45
|
-
schema.safeParse(x)
|
|
46
|
-
),
|
|
47
|
-
[]
|
|
48
|
-
);
|
|
49
|
-
if (schemas.length - errors.length !== 1) {
|
|
50
|
-
ctx.addIssue({
|
|
51
|
-
path: ctx.path,
|
|
52
|
-
code: "invalid_union",
|
|
53
|
-
unionErrors: errors,
|
|
54
|
-
message: "Invalid input: Should pass single schema",
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
})`:"z.any()","parseOneOf");function vf(t,e){let r;t.properties&&(Object.keys(t.properties).length?(r="z.object({ ",r+=Object.keys(t.properties).map(u=>{let c=t.properties[u],f=`${JSON.stringify(u)}: ${de(c,g(l({},e),{path:[...e.path,"properties",u]}))}`,p=typeof c=="object"&&c.default!==void 0||typeof t.default=="object"&&t.default!==null&&u in t.default,y=Array.isArray(t.required)?t.required.includes(u):typeof c=="object"&&c.required===!0;return!p&&!y?`${f}.optional()`:f}).join(", "),r+=" })"):r="z.object({})");let n=t.additionalProperties!==void 0?de(t.additionalProperties,g(l({},e),{path:[...e.path,"additionalProperties"]})):void 0,a;if(t.patternProperties){let u=Object.fromEntries(Object.entries(t.patternProperties).map(([c,f])=>[c,de(f,g(l({},e),{path:[...e.path,"patternProperties",c]}))],{}));a="",r?n?a+=`.catchall(z.union([${[...Object.values(u),n].join(", ")}]))`:Object.keys(u).length>1?a+=`.catchall(z.union([${Object.values(u).join(", ")}]))`:a+=`.catchall(${Object.values(u)})`:n?a+=`z.record(z.union([${[...Object.values(u),n].join(", ")}]))`:Object.keys(u).length>1?a+=`z.record(z.union([${Object.values(u).join(", ")}]))`:a+=`z.record(${Object.values(u)})`,a+=`.superRefine((value, ctx) => {
|
|
58
|
-
`,a+=`for (const key in value) {
|
|
59
|
-
`,n&&(t.properties?a+=`let evaluated = [${Object.keys(t.properties).map(c=>JSON.stringify(c)).join(", ")}].includes(key)
|
|
60
|
-
`:a+=`let evaluated = false
|
|
61
|
-
`);for(let c in t.patternProperties)a+="if (key.match(new RegExp("+JSON.stringify(c)+`))) {
|
|
62
|
-
`,n&&(a+=`evaluated = true
|
|
63
|
-
`),a+="const result = "+u[c]+`.safeParse(value[key])
|
|
64
|
-
`,a+=`if (!result.success) {
|
|
65
|
-
`,a+=`ctx.addIssue({
|
|
66
|
-
path: [...ctx.path, key],
|
|
67
|
-
code: 'custom',
|
|
68
|
-
message: \`Invalid input: Key matching regex /\${key}/ must match schema\`,
|
|
69
|
-
params: {
|
|
70
|
-
issues: result.error.issues
|
|
71
|
-
}
|
|
72
|
-
})
|
|
73
|
-
`,a+=`}
|
|
74
|
-
`,a+=`}
|
|
75
|
-
`;n&&(a+=`if (!evaluated) {
|
|
76
|
-
`,a+="const result = "+n+`.safeParse(value[key])
|
|
77
|
-
`,a+=`if (!result.success) {
|
|
78
|
-
`,a+=`ctx.addIssue({
|
|
79
|
-
path: [...ctx.path, key],
|
|
80
|
-
code: 'custom',
|
|
81
|
-
message: \`Invalid input: must match catchall schema\`,
|
|
82
|
-
params: {
|
|
83
|
-
issues: result.error.issues
|
|
84
|
-
}
|
|
85
|
-
})
|
|
86
|
-
`,a+=`}
|
|
87
|
-
`,a+=`}
|
|
88
|
-
`),a+=`}
|
|
89
|
-
`,a+="})"}let i=r?a?r+a:n?n==="z.never()"?r+".strict()":r+`.catchall(${n})`:r:a||(n?`z.record(${n})`:"z.record(z.any())");return se.an.anyOf(t)&&(i+=`.and(${yf(g(l({},t),{anyOf:t.anyOf.map(u=>typeof u=="object"&&!u.type&&(u.properties||u.additionalProperties||u.patternProperties)?g(l({},u),{type:"object"}):u)}),e)})`),se.a.oneOf(t)&&(i+=`.and(${Li(g(l({},t),{oneOf:t.oneOf.map(u=>typeof u=="object"&&!u.type&&(u.properties||u.additionalProperties||u.patternProperties)?g(l({},u),{type:"object"}):u)}),e)})`),se.an.allOf(t)&&(i+=`.and(${lr(g(l({},t),{allOf:t.allOf.map(u=>typeof u=="object"&&!u.type&&(u.properties||u.additionalProperties||u.patternProperties)?g(l({},u),{type:"object"}):u)}),e)})`),i}s(vf,"parseObject");var n_=s(t=>{var e;let r="z.string()";if((e=t[F])!=null&&e.coerce){if(t.format==="date-time")return"z.coerce.date()";r="z.coerce.string()"}return r+=pe(t,"format",({value:n})=>{switch(n){case"email":return[".email(",")"];case"ip":return[".ip(",")"];case"ipv4":return['.ip({ version: "v4"',", message: "," })"];case"ipv6":return['.ip({ version: "v6"',", message: "," })"];case"uri":return[".url(",")"];case"uuid":return[".uuid(",")"];case"date-time":return[".datetime(",")"]}}),r+=pe(t,"pattern",({json:n})=>[`.regex(new RegExp(${n})`,", ",")"]),r+=pe(t,"minLength",({json:n})=>[`.min(${n}`,", ",")"]),r+=pe(t,"maxLength",({json:n})=>[`.max(${n}`,", ",")"]),r},"parseString"),a_=s((t,e)=>`${de(Jv(t,"nullable"),e,!0)}.nullable()`,"parseNullable"),i_=s(t=>`z.ref('${t.$ref}')`,"parseRef"),s_=s((t,e)=>{var r,n;if(t.oneOf.length<=1||!((r=t.discriminator)!=null&&r.propertyName))return Li(t,e);let a=t.oneOf.map((i,u)=>de(i,g(l({},e),{path:[...e.path,"oneOf",u]})));return`z.discriminatedUnion("${(n=t.discriminator)==null?void 0:n.propertyName}", [${a.join(", ")}])`},"parseDiscriminator"),de=s((t,e={seen:new Map,path:[]},r)=>{if(typeof t!="object")return t?"z.any()":"z.never()";if(e.parserOverride){let i=e.parserOverride(t,e);if(typeof i=="string")return i}let n=e.seen.get(t);if(n){if(n.r!==void 0)return n.r;if(e.depth===void 0||n.n>=e.depth)return"z.any()";n.n+=1}else n={r:void 0,n:0},e.seen.set(t,n);let a=c_(t,e);return r||(a=o_(t,a),e.withoutDefaults||(a=u_(t,a))),n.r=a,a},"parseSchema"),o_=s((t,e)=>(t.description&&(e+=`.describe(${JSON.stringify(t.description)})`),e),"addMeta"),u_=s((t,e)=>(t.default!==void 0&&(e+=`.default(${JSON.stringify(t.default)})`),e),"addDefaults"),c_=s((t,e)=>se.a.nullable(t)?a_(t,e):se.an.object(t)?vf(t,e):se.an.array(t)?Xv(t,e):se.an.anyOf(t)?yf(t,e):se.an.allOf(t)?lr(t,e):se.a.discriminator(t)?s_(t,e):se.a.oneOf(t)?Li(t,e):se.a.not(t)?qv(t,e):se.an.enum(t)?e_(t):se.a.const(t)?Qv(t):se.a.multipleType(t)?Vv(t,e):se.a.primitive(t,"string")?n_(t):se.a.primitive(t,"number")||se.a.primitive(t,"integer")?r_(t):se.a.primitive(t,"boolean")?zv(t):se.a.primitive(t,"null")?Gv(t):se.a.conditional(t)?t_(t,e):se.a.ref(t)?i_(t):Kv(t),"selectParser"),se={an:{object:s(t=>t.type==="object","object"),array:s(t=>t.type==="array","array"),anyOf:s(t=>t.anyOf!==void 0,"anyOf"),allOf:s(t=>t.allOf!==void 0,"allOf"),enum:s(t=>t.enum!==void 0,"enum")},a:{nullable:s(t=>t.nullable===!0,"nullable"),multipleType:s(t=>Array.isArray(t.type),"multipleType"),not:s(t=>t.not!==void 0,"not"),const:s(t=>t.const!==void 0,"const"),primitive:s((t,e)=>t.type===e,"primitive"),conditional:s(t=>Boolean("if"in t&&t.if&&"then"in t&&"else"in t&&t.then&&t.else),"conditional"),discriminator:s(t=>{var e;return t.oneOf!==void 0&&((e=t.discriminator)==null?void 0:e.propertyName)!==void 0},"discriminator"),oneOf:s(t=>t.oneOf!==void 0,"oneOf"),ref:s(t=>t.$ref!==void 0,"ref")}},l_=s(t=>{let e;try{e=new Function("z",`return ${t}`)(v)}catch(r){return{sucess:!1,error:`Failed to evaluate schema: ${(r instanceof Error?r:new Error(String(r))).message}`}}return e instanceof v.ZodType?{sucess:!0,value:e}:{sucess:!1,error:`String "${t}" does not evaluate to a Zod schema`}},"evalZuiString"),d_=s(t=>de(t,{seen:new Map,path:[]}),"jsonSchemaToZodStr"),f_=s(t=>{let e=d_(t);e=e.replaceAll("errors: z.ZodError[]","errors");let r=l_(e);if(!r.sucess)throw new Wo(r.error);return r.value},"jsonSchemaToZod"),rr=s((t,e)=>{var r,n;if(e[F]&&t._def&&(t._def[F]=e[F]),((r=t._def)==null?void 0:r.typeName)==="ZodObject"&&e.type==="object"&&e.properties&&Object.entries(e.properties).forEach(([a,i])=>{let u=typeof t._def.shape=="function"?t._def.shape():t._def.shape;u[a]&&rr(u[a],i)}),((n=t._def)==null?void 0:n.typeName)==="ZodRecord"&&e.type==="object"&&e.additionalProperties&&rr(t._def.valueType,e.additionalProperties),e.type==="array"&&e.items){let a=e.items;if(typeof a=="object"&&!Array.isArray(a)){let i=t._def.type;i&&rr(i,a)}else Array.isArray(a)&&a.forEach((i,u)=>{let c=t._def;c.typeName===x.ZodFirstPartyTypeKind.ZodTuple&&rr(c.items[u],i)})}},"applyZuiPropsRecursively"),gr=s(t=>{let e=f_(t);return rr(e,t),e},"jsonSchemaToZui"),_f=class extends Nt.Component{constructor(){super(...arguments),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,r){console.error("Uncaught error:",e,r)}render(){return this.state.hasError&&this.props.fallback?Nt.default.createElement(this.props.fallback,{error:this.state.error,schema:this.props.fieldSchema}):this.props.children}};s(_f,"ErrorBoundary");var It=_f;function bf(t,e){return r=>Nt.default.createElement(It,{fallback:e,fieldSchema:r.fieldSchema,path:r.path},Nt.default.createElement(t,l({},r)))}s(bf,"withErrorBoundary");var Vr=s(t=>{var e=t,{components:r,fieldSchema:n,path:a,required:i,fallback:u}=e,c=Ao(e,["components","fieldSchema","path","required","fallback"]),f,p;let{formData:y,disabled:T,hidden:Z,handlePropertyChange:w,addArrayItem:j,removeArrayItem:W,formErrors:Y,formValid:K}=Bo(n,a),B=(0,Ee.useMemo)(()=>at(y,a),[y,a]),$=(0,Ee.useMemo)(()=>Sh(r,n),[n,r]),{discriminator:V,discriminatedSchema:re,discriminatorValue:Ce}=Th(n,a);if(!$||Z===!0)return null;let{Component:De,type:xe}=$,me={type:xe,componentID:$.id,scope:a.join("."),context:{path:a,readonly:!1,formData:y,formErrors:Y,formValid:K,updateForm:w,updateFormData:s(ye=>w([],ye),"updateFormData")},onChange:s(ye=>w(a,ye),"onChange"),disabled:T,errors:Y?.filter(ye=>ye.path===a)||[],label:((f=n[F])==null?void 0:f.title)||Ha(((p=a[a.length-1])==null?void 0:p.toString())||""),params:$.params,schema:n,zuiProps:n[F]};if(n.type==="array"&&xe==="array"){let ye=De,oe=me.schema,le=Array.isArray(B)||typeof B=="object"?B:[],N=l(g(l({},me),{type:xe,schema:oe,data:le,addItem:s(Ze=>j(a,Ze),"addItem"),removeItem:s(Ze=>W(a,Ze),"removeItem")}),c);return Array.isArray(n.items)?null:Ee.default.createElement(ye,g(l({key:me.scope},N),{isArrayChild:N.isArrayChild}),Array.isArray(N.data)?N.data.map((Ze,Oe)=>{let Ke=[...a,Oe.toString()];return Ee.default.createElement(It,{key:Ke.join("."),fallback:u,fieldSchema:n.items,path:Ke},Ee.default.createElement(Vr,{key:Ke.join("."),components:r,fieldSchema:n.items,path:Ke,required:i,isArrayChild:!0,index:Oe,removeSelf:()=>W(a,Oe),fallback:u}))}):[])}if(n.type==="object"&&xe==="object"&&n.properties){let ye=De,oe=l(g(l({},me),{type:xe,schema:me.schema,data:B||{}}),c);return Ee.default.createElement(ye,g(l({key:me.scope},oe),{isArrayChild:oe.isArrayChild}),Object.entries(n.properties).map(([le,N])=>{var Ze;let Oe=[...a,le];return Ee.default.createElement(It,{key:Oe.join("."),fallback:u,fieldSchema:N,path:Oe},Ee.default.createElement(Vr,{key:Oe.join("."),components:r,fieldSchema:N,path:Oe,required:((Ze=n.required)==null?void 0:Ze.includes(le))||!1,isArrayChild:!1,fallback:u}))}))}if(xe==="discriminatedUnion"){let ye=De,oe=l(g(l({},me),{type:xe,schema:me.schema,data:B||{},discriminatorKey:V?.key||null,discriminatorLabel:Ha(V?.key||"Unknown"),discriminatorOptions:V?.values||null,discriminatorValue:Ce,setDiscriminator:s(le=>{if(!V?.key){console.warn("No discriminator key found, cannot set discriminator");return}w(a,{[V.key]:le})},"setDiscriminator")}),c);return Ee.default.createElement(ye,g(l({key:me.scope},oe),{isArrayChild:oe.isArrayChild}),re&&Ee.default.createElement(It,{key:a.join("."),fallback:u,fieldSchema:re,path:a},Ee.default.createElement(Vr,{components:r,fieldSchema:re,path:a,required:i,isArrayChild:!1,fallback:u})))}let Kt=De,Vt=l(g(l({},me),{type:xe,schema:me.schema,config:{},required:i,data:B,description:n.description}),c);return Ee.default.createElement(Kt,l({},Vt))},"FormElementRenderer"),p_=s(({schema:t,components:e,onChange:r,value:n,disableValidation:a,fallback:i,dataTransform:u,onValidation:c})=>{let[f,p]=(0,Ue.useState)(n);return(0,Ue.useEffect)(()=>{r(f)},[f]),(0,Ue.useEffect)(()=>{let y=Ct(t);p(T=>Gr(y,T))},[JSON.stringify(t),p]),Ue.default.createElement(bh,{formData:f,setFormData:p,formSchema:t,disableValidation:a||!1,dataTransform:u,onValidation:c},Ue.default.createElement(It,{fallback:i,fieldSchema:t,path:[]},Ue.default.createElement(Vr,{components:e,fieldSchema:t,path:[],fallback:i,required:!0,isArrayChild:!1})))},"ZuiForm"),h_={string:{},number:{slider:{id:"slider",params:v.object({})}},boolean:{switch:{id:"switch",params:v.object({})}},array:{},object:{},discriminatedUnion:{}},g_={errors:Vo,jsonSchemaToZui:gr,zuiToJsonSchema:ea,objectToZui:jt,toTypescript:Wr,toTypescriptSchema:hi};var Tf=x;var Te=x.string().min(1),Pf=x.object({text:Te}),Sf=x.object({markdown:Te}),xf=x.object({imageUrl:Te}),wf=x.object({audioUrl:Te}),kf=x.object({videoUrl:Te}),Of=x.object({fileUrl:Te,title:Te.optional()}),Cf=x.object({latitude:x.number(),longitude:x.number(),address:x.string().optional(),title:x.string().optional()}),Zf=x.object({title:Te,subtitle:Te.optional(),imageUrl:Te.optional(),actions:x.array(x.object({action:x.enum(["postback","url","say"]),label:Te,value:Te}))}),Ef=x.object({text:Te,options:x.array(x.object({label:Te,value:Te}))}),m_=x.object({items:x.array(Zf)}),y_=x.union([x.object({type:x.literal("text"),payload:Pf}),x.object({type:x.literal("markdown"),payload:Sf}),x.object({type:x.literal("image"),payload:xf}),x.object({type:x.literal("audio"),payload:wf}),x.object({type:x.literal("video"),payload:kf}),x.object({type:x.literal("file"),payload:Of}),x.object({type:x.literal("location"),payload:Cf})]),v_=x.object({items:x.array(y_)}),__={schema:Sf},b_={text:{schema:Pf},image:{schema:xf},audio:{schema:wf},video:{schema:kf},file:{schema:Of},location:{schema:Cf},carousel:{schema:m_},card:{schema:Zf},dropdown:{schema:Ef},choice:{schema:Ef},bloc:{schema:v_}};var mr="x-bot-id",Ki="x-bot-user-id",Vi="x-integration-id",qi="x-webhook-id",Gi="x-bp-configuration-type",yr="x-bp-configuration",vr="x-bp-operation",Wi="x-bp-type";var If=require("node:http");var Ut=console;function ke(t){if(!t.body)throw new Error("Missing body");return JSON.parse(t.body)}async function _r(t,e=8072,r=S_){let n=(0,If.createServer)(async(a,i)=>{try{let u=await T_(a);if(u.path==="/health"){i.writeHead(200).end("ok");return}let c=await t(u);i.writeHead(c?.status??200,c?.headers??{}).end(c?.body??"{}")}catch(u){Ut.error("Error while handling request",{error:u?.message??"Internal error occured"}),i.writeHead(500).end(JSON.stringify({error:u?.message??"Internal error occured"}))}});return n.listen(e,()=>r(e)),n}async function T_(t){let e=await P_(t),r={};for(let a=0;a<t.rawHeaders.length;a+=2){let i=t.rawHeaders[a].toLowerCase(),u=t.rawHeaders[a+1];r[i]=u}let n=new URL(t.url??"",t.headers.host?`http://${t.headers.host}`:"http://botpress.cloud");return{body:e,path:n.pathname,query:E_(n.search,"?"),headers:r,method:t.method?.toUpperCase()??"GET"}}function E_(t,e){return t.indexOf(e)===0?t.slice(e.length):t}async function P_(t){return new Promise((e,r)=>{if(t.method!=="POST"&&t.method!=="PUT"&&t.method!=="PATCH")return e(void 0);let n="";t.on("data",a=>n+=a.toString()),t.on("error",a=>r(a)),t.on("end",()=>e(n))})}function S_(t){Ut.info(`Listening on port ${t}`)}var da=require("@botpress/client");var Pe={};Ar(Pe,{mapValues:()=>w_,pairs:()=>Af,values:()=>x_});var Af=t=>Object.entries(t),x_=t=>Object.values(t),w_=(t,e)=>Object.fromEntries(Af(t).map(([r,n])=>[r,e(n,r)]));var G={};Ar(G,{safePush:()=>k_});var k_=(t,...e)=>t?[...t,...e]:[...e];var ta=Symbol("schemaName"),Rf=t=>t?Pe.mapValues(t,(r,n)=>({...r,[ta]:n})):{},Df=t=>ta in t&&t[ta]!==void 0,Bf=t=>t[ta];var ra=class{constructor(e){this.props=e;this.name=e.name,this.version=e.version,this.icon=e.icon,this.readme=e.readme,this.title=e.title,this.identifier=e.identifier,this.description=e.description,this.configuration=e.configuration,this.configurations=e.configurations,this.events=e.events,this.actions=e.actions,this.channels=e.channels,this.states=e.states,this.user=e.user,this.secrets=e.secrets,this.entities=e.entities,this.interfaces=e.interfaces,this.__advanced=e.__advanced}name;version;title;description;icon;readme;configuration;configurations;events;actions;channels;states;user;secrets;identifier;entities;interfaces;__advanced;extend(e,r){let n=r(Rf(this.entities)),a=Pe.pairs(n).find(([p,y])=>!Df(y));if(a)throw new Error(`Cannot extend interface "${e.name}" with entity "${a[0]}"; the provided schema is not part of the integration's entities.`);let i=this;i.interfaces??={};let u=Pe.mapValues(n,p=>({name:Bf(p),schema:p.schema})),c=Object.values(u).map(p=>p.name),f=c.length===0?e.name:`${e.name}<${c.join(",")}>`;return i.interfaces[f]={...e,entities:u},this}};var vt=require("@botpress/client");var Mf=require("@botpress/client"),na={retries:3,retryCondition:t=>Mf.axiosRetry.isNetworkOrIdempotentRequestError(t)||[429,502].includes(t.response?.status??0),retryDelay:t=>t*1e3};var Lt=class{constructor(e){this._client=e}createConversation=e=>this._client.createConversation(e);getConversation=e=>this._client.getConversation(e);listConversations=e=>this._client.listConversations(e);getOrCreateConversation=e=>this._client.getOrCreateConversation(e);updateConversation=e=>this._client.updateConversation(e);deleteConversation=e=>this._client.deleteConversation(e);listParticipants=e=>this._client.listParticipants(e);addParticipant=e=>this._client.addParticipant(e);getParticipant=e=>this._client.getParticipant(e);removeParticipant=e=>this._client.removeParticipant(e);createEvent=e=>this._client.createEvent(e);getEvent=e=>this._client.getEvent(e);listEvents=e=>this._client.listEvents(e);createMessage=e=>this._client.createMessage(e);getOrCreateMessage=e=>this._client.getOrCreateMessage(e);getMessage=e=>this._client.getMessage(e);updateMessage=e=>this._client.updateMessage(e);listMessages=e=>this._client.listMessages(e);deleteMessage=e=>this._client.deleteMessage(e);createUser=e=>this._client.createUser(e);getUser=e=>this._client.getUser(e);listUsers=e=>this._client.listUsers(e);getOrCreateUser=e=>this._client.getOrCreateUser(e);updateUser=e=>this._client.updateUser(e);deleteUser=e=>this._client.deleteUser(e);getState=e=>this._client.getState(e);setState=e=>this._client.setState(e);getOrSetState=e=>this._client.getOrSetState(e);patchState=e=>this._client.patchState(e);configureIntegration=e=>this._client.configureIntegration(e);uploadFile=e=>this._client.uploadFile(e);upsertFile=e=>this._client.upsertFile(e);deleteFile=e=>this._client.deleteFile(e);listFiles=e=>this._client.listFiles(e);getFile=e=>this._client.getFile(e);updateFileMetadata=e=>this._client.updateFileMetadata(e)};var aa=class{_cost=0;get cost(){return this._cost}setCost(e){this._cost=e}toJSON(){return{cost:this.cost}}};var O_=x.enum(["webhook_received","message_created","action_triggered","register","unregister","ping","create_user","create_conversation"]),jf=t=>{let e=t[mr],r=t[Ki],n=t[Vi],a=t[qi],i=t[Gi],u=t[yr],c=O_.parse(t[vr]);if(!e)throw new Error("Missing bot headers");if(!r)throw new Error("Missing bot user headers");if(!n)throw new Error("Missing integration headers");if(!a)throw new Error("Missing webhook headers");if(!u)throw new Error("Missing configuration headers");if(!c)throw new Error("Missing operation headers");return{botId:e,botUserId:r,integrationId:n,webhookId:a,operation:c,configurationType:i??null,configuration:u?JSON.parse(Buffer.from(u,"base64").toString("utf-8")):{}}};var Nf=et(require("util")),zt=class{defaultOptions;constructor(e){this.defaultOptions=e}info(...e){this._log("info",e)}debug(...e){this._log("debug",e)}warn(...e){this._log("warn",e)}error(...e){this._log("error",e)}_log(e,r){this._getConsoleMethod(e)(this._serializeMessage(r))}_serializeMessage(e){let r=Nf.default.format(...e);return process.env.BP_LOG_FORMAT==="json"?this.getJsonMessage(r):r}getJsonMessage(e){return JSON.stringify({msg:e,options:this.defaultOptions})}_getConsoleMethod(e){switch(e){case"debug":return console.debug;case"warn":return console.warn;case"error":return console.error;default:return console.info}}};var Ye=class extends zt{constructor(e){super({visibleToBotOwners:!0,...e})}with(e){return new Ye({...this.defaultOptions,...e})}withUserId(e){return this.with({userId:e})}withConversationId(e){return this.with({conversationId:e})}withVisibleToBotOwners(e){return this.with({visibleToBotOwners:e})}forBot(){return this.withVisibleToBotOwners(!0)}getJsonMessage(e){return JSON.stringify({msg:e,visible_to_bot_owner:this.defaultOptions.visibleToBotOwners,options:this.defaultOptions})}};var $f=t=>async e=>{let r=jf(e.headers),n=new vt.Client({botId:r.botId,integrationId:r.integrationId,retry:na}),a=new Lt(n),i=new Ye,u={ctx:r,req:e,client:a,logger:i,instance:t};try{let c;switch(r.operation){case"webhook_received":c=await Z_(u);break;case"register":c=await I_(u);break;case"unregister":c=await A_(u);break;case"message_created":c=await B_(u);break;case"action_triggered":c=await M_(u);break;case"ping":c=await C_(u);break;case"create_user":c=await R_(u);break;case"create_conversation":c=await D_(u);break;default:throw new Error(`Unknown operation ${r.operation}`)}return c?{...c,status:c.status??200}:{status:200}}catch(c){if((0,vt.isApiError)(c)){let p=c.type==="Runtime"?c:new vt.RuntimeError(c.message,c);return i.forBot().error(p.message),{status:p.code,body:JSON.stringify(p.toJSON())}}console.error(c);let f=new vt.RuntimeError("An unexpected error occurred in the integration. Bot owners: Check logs for more informations. Integration owners: throw a RuntimeError to return a custom error message instead.");return i.forBot().error(f.message),{status:f.code,body:JSON.stringify(f.toJSON())}}},C_=async t=>{},Z_=async({client:t,ctx:e,req:r,logger:n,instance:a})=>{let{req:i}=ke(r);return a.webhook({client:t,ctx:e,req:i,logger:n})},I_=async({client:t,ctx:e,req:r,logger:n,instance:a})=>{if(!a.register)return;let{webhookUrl:i}=ke(r);await a.register({client:t,ctx:e,webhookUrl:i,logger:n})},A_=async({client:t,ctx:e,req:r,logger:n,instance:a})=>{if(!a.unregister)return;let{webhookUrl:i}=ke(r);await a.unregister({ctx:e,webhookUrl:i,client:t,logger:n})},R_=async({client:t,ctx:e,req:r,logger:n,instance:a})=>{if(!a.createUser)return;let{tags:i}=ke(r);return await a.createUser({ctx:e,client:t,tags:i,logger:n})},D_=async({client:t,ctx:e,req:r,logger:n,instance:a})=>{if(!a.createConversation)return;let{channel:i,tags:u}=ke(r);return await a.createConversation({ctx:e,client:t,channel:i,tags:u,logger:n})},B_=async({ctx:t,req:e,client:r,logger:n,instance:a})=>{let{conversation:i,user:u,type:c,payload:f,message:p}=ke(e),y=a.channels[i.channel];if(!y)throw new Error(`Channel ${i.channel} not found`);let T=y.messages[c];if(!T)throw new Error(`Message of type ${c} not found in channel ${i.channel}`);await T({ctx:t,conversation:i,message:p,user:u,type:c,client:r,payload:f,ack:async({tags:w})=>{await r.updateMessage({id:p.id,tags:w})},logger:n})},M_=async({req:t,ctx:e,client:r,logger:n,instance:a})=>{let{input:i,type:u}=ke(t);if(!u)throw new Error("Missing action type");let c=a.actions[u];if(!c)throw new Error(`Action ${u} not found`);let f=new aa,y={output:await c({ctx:e,input:i,client:r,type:u,logger:n,metadata:f}),meta:f.toJSON()};return{body:JSON.stringify(y)}};var ia=class{constructor(e){this.props=e;this.actions=e.actions,this.channels=e.channels,this.register=e.register,this.unregister=e.unregister,this.createUser=e.createUser,this.createConversation=e.createConversation,this.webhook=e.handler}actions;channels;register;unregister;createUser;createConversation;webhook;handler=$f(this);start=e=>_r(this.handler,e)};var sa=class{constructor(e){this.props=e;this.integrations=e.integrations,this.plugins=e.plugins,this.user=e.user,this.conversation=e.conversation,this.message=e.message,this.states=e.states,this.configuration=e.configuration,this.events=e.events,this.recurringEvents=e.recurringEvents,this.actions=e.actions}integrations;plugins;user;conversation;message;states;configuration;events;recurringEvents;actions;addIntegration(e,r){let n=this;return n.integrations||(n.integrations={}),n.integrations[e.name]={enabled:r.enabled,...e,configurationType:r.configurationType,configuration:r.configuration},this}addPlugin(e,r){let n=this;return n.plugins||(n.plugins={}),n.plugins[e.name]={...e,configuration:r.configuration,interfaces:r.interfaces},n.user=this._mergeUser(n.user,e.definition.user),n.conversation=this._mergeConversation(n.conversation,e.definition.conversation),n.message=this._mergeMessage(n.message,e.definition.message),n.states=this._mergeStates(n.states,e.definition.states),n.events=this._mergeEvents(n.events,e.definition.events),n.recurringEvents=this._mergeRecurringEvents(n.recurringEvents,e.definition.recurringEvents),n.actions=this._mergeActions(n.actions,e.definition.actions),this}_mergeUser=(e,r)=>({tags:{...e?.tags,...r?.tags}});_mergeConversation=(e,r)=>({tags:{...e?.tags,...r?.tags}});_mergeMessage=(e,r)=>({tags:{...e?.tags,...r?.tags}});_mergeStates=(e,r)=>({...e,...r});_mergeEvents=(e,r)=>({...e,...r});_mergeRecurringEvents=(e,r)=>({...e,...r});_mergeActions=(e,r)=>({...e,...r})};var Hf=(t,e)=>{for(let[r,n]of Object.entries(e.actionHandlers))t.actionHandlers[r]=n;for(let[r,n]of Object.entries(e.eventHandlers))n&&(t.eventHandlers[r]=G.safePush(t.eventHandlers[r],...n));for(let[r,n]of Object.entries(e.messageHandlers))n&&(t.messageHandlers[r]=G.safePush(t.messageHandlers[r],...n));for(let[r,n]of Object.entries(e.stateExpiredHandlers))n&&(t.stateExpiredHandlers[r]=G.safePush(t.stateExpiredHandlers[r],...n));for(let[r,n]of Object.entries(e.hookHandlers))for(let[a,i]of Object.entries(n))i&&(t.hookHandlers[r][a]=G.safePush(t.hookHandlers[r][a],...i))};var Ff=et(require("@botpress/client"));var Xe=class extends zt{constructor(e){super({...e})}with(e){return new Xe({...this.defaultOptions,...e})}withUserId(e){return this.with({userId:e})}withConversationId(e){return this.with({conversationId:e})}withWorkflowId(e){return this.with({workflowId:e})}};var Ae=class{constructor(e,r={before:{},after:{}}){this._client=e;this._hooks=r}getConversation=e=>this._run("getConversation",e);listConversations=e=>this._run("listConversations",e);updateConversation=e=>this._run("updateConversation",e);deleteConversation=e=>this._run("deleteConversation",e);listParticipants=e=>this._run("listParticipants",e);addParticipant=e=>this._run("addParticipant",e);getParticipant=e=>this._run("getParticipant",e);removeParticipant=e=>this._run("removeParticipant",e);getEvent=e=>this._run("getEvent",e);listEvents=e=>this._run("listEvents",e);createMessage=e=>this._run("createMessage",e);getOrCreateMessage=e=>this._run("getOrCreateMessage",e);getMessage=e=>this._run("getMessage",e);updateMessage=e=>this._run("updateMessage",e);listMessages=e=>this._run("listMessages",e);deleteMessage=e=>this._run("deleteMessage",e);getUser=e=>this._run("getUser",e);listUsers=e=>this._run("listUsers",e);updateUser=e=>this._run("updateUser",e);deleteUser=e=>this._run("deleteUser",e);getState=e=>this._run("getState",e);setState=e=>this._run("setState",e);getOrSetState=e=>this._run("getOrSetState",e);patchState=e=>this._run("patchState",e);callAction=e=>this._run("callAction",e);uploadFile=e=>this._run("uploadFile",e);upsertFile=e=>this._run("upsertFile",e);deleteFile=e=>this._run("deleteFile",e);listFiles=e=>this._run("listFiles",e);getFile=e=>this._run("getFile",e);updateFileMetadata=e=>this._run("updateFileMetadata",e);searchFiles=e=>this._run("searchFiles",e);trackAnalytics=e=>this._run("trackAnalytics",e);createConversation=e=>this._client.createConversation(e);getOrCreateConversation=e=>this._client.getOrCreateConversation(e);createUser=e=>this._client.createUser(e);getOrCreateUser=e=>this._client.getOrCreateUser(e);_run=async(e,r)=>{let n=this._hooks.before[e];n&&(r=await n(r));let a=await this._client[e](r),i=this._hooks.after[e];return i&&(a=await i(a)),a}};var j_=x.enum(["event_received","register","unregister","ping","action_triggered"]),Uf=t=>{let e=t[mr],r=t[yr],n=t[Wi],a=j_.parse(t[vr]);if(!e)throw new Error("Missing bot headers");if(!n)throw new Error("Missing type headers");if(!r)throw new Error("Missing configuration headers");if(!a)throw new Error("Missing operation headers");return{botId:e,operation:a,type:n,configuration:r?JSON.parse(Buffer.from(r,"base64").toString("utf-8")):{}}};var Re={status:200},Lf=t=>async e=>{let r=Uf(e.headers),n=new Xe,a=new Ff.Client({botId:r.botId,retry:na}),i=new Ae(a,{before:{createMessage:async c=>{let f=t.hookHandlers.before_outgoing_message[c.type]??[],p=t.hookHandlers.before_outgoing_message["*"]??[],y=[...f,...p];for(let T of y)c=(await T({client:new Ae(a),ctx:r,logger:n,data:c}))?.data??c;return c},callAction:async c=>{let f=t.hookHandlers.before_outgoing_call_action[c.type]??[],p=t.hookHandlers.before_outgoing_call_action["*"]??[],y=[...f,...p];for(let T of y)c=(await T({client:new Ae(a),ctx:r,logger:n,data:c}))?.data??c;return c}},after:{createMessage:async c=>{let f=t.hookHandlers.after_outgoing_message[c.message.type]??[],p=t.hookHandlers.after_outgoing_message["*"]??[],y=[...f,...p];for(let T of y)c=(await T({client:new Ae(a),ctx:r,logger:n,data:c}))?.data??c;return c},callAction:async c=>{let f=t.hookHandlers.after_outgoing_call_action[c.output.type]??[],p=t.hookHandlers.after_outgoing_call_action["*"]??[],y=[...f,...p];for(let T of y)c=(await T({client:new Ae(a),ctx:r,logger:n,data:c}))?.data??c;return c}}}),u={req:e,ctx:r,logger:n,client:i,self:t};switch(r.operation){case"action_triggered":return await F_(u);case"event_received":return await U_(u);case"register":return await $_(u);case"unregister":return await H_(u);case"ping":return await N_(u);default:throw new Error(`Unknown operation ${r.operation}`)}},N_=async({ctx:t})=>(Ut.info(`Received ${t.operation} operation for bot ${t.botId} of type ${t.type}`),Re),$_=async t=>Re,H_=async t=>Re,U_=async({ctx:t,logger:e,req:r,client:n,self:a})=>{Ut.debug(`Received event ${t.type}`);let i=ke(r);if(t.type==="message_created"){let K=i.event,B=K.payload.message,$=a.hookHandlers.before_incoming_message[B.type]??[],V=a.hookHandlers.before_incoming_message["*"]??[],re=[...$,...V];for(let oe of re){let le=await oe({client:n,ctx:t,logger:e,data:B});if(B=le?.data??B,le?.stop)return Re}let Ce={user:K.payload.user,conversation:K.payload.conversation,states:K.payload.states,message:B,event:K},De=a.messageHandlers[B.type]??[],xe=a.messageHandlers["*"]??[],me=[...De,...xe];for(let oe of me)await oe({...Ce,client:n,ctx:t,logger:e});let Kt=a.hookHandlers.after_incoming_message[B.type]??[],Vt=a.hookHandlers.after_incoming_message["*"]??[],ye=[...Kt,...Vt];for(let oe of ye){let le=await oe({client:n,ctx:t,data:B,logger:e});if(B=le?.data??B,le?.stop)return Re}return Re}if(t.type==="state_expired"){let $={state:i.event.payload.state},V=a.stateExpiredHandlers["*"]??[];for(let re of V)await re({...$,client:n,ctx:t,logger:e});return Re}let u=i.event,c=a.hookHandlers.before_incoming_event[u.type]??[],f=a.hookHandlers.before_incoming_event["*"]??[],p=[...c,...f];for(let K of p){let B=await K({client:n,ctx:t,data:u,logger:e});if(u=B?.data??u,B?.stop)return Re}let y={event:u},T=a.eventHandlers[u.type]??[],Z=a.eventHandlers["*"]??[],w=[...T,...Z];for(let K of w)await K({...y,client:n,ctx:t,logger:e});let j=a.hookHandlers.after_incoming_event[u.type]??[],W=a.hookHandlers.after_incoming_event["*"]??[],Y=[...j,...W];for(let K of Y){let B=await K({client:n,ctx:t,data:u,logger:e});if(u=B?.data??u,B?.stop)return Re}return Re},F_=async({ctx:t,logger:e,req:r,client:n,self:a})=>{let{input:i,type:u}=ke(r);if(!u)throw new Error("Missing action type");let c=a.actionHandlers[u];if(!c)throw new Error(`Action ${u} not found`);let p={output:await c({ctx:t,logger:e,input:i,client:n,type:u})};return{status:200,body:JSON.stringify(p)}};var oa=class{constructor(e){this.props=e;this.actionHandlers=e.actions;let r=Pe.values(e.plugins);for(let n of r)this._use(n)}actionHandlers;messageHandlers={};eventHandlers={};stateExpiredHandlers={};hookHandlers={before_incoming_event:{},before_incoming_message:{},before_outgoing_message:{},before_outgoing_call_action:{},after_incoming_event:{},after_incoming_message:{},after_outgoing_message:{},after_outgoing_call_action:{}};get actions(){return this.actionHandlers}on={message:(e,r)=>{this.messageHandlers[e]=G.safePush(this.messageHandlers[e],r)},event:(e,r)=>{this.eventHandlers[e]=G.safePush(this.eventHandlers[e],r)},stateExpired:(e,r)=>{this.stateExpiredHandlers[e]=G.safePush(this.stateExpiredHandlers[e],r)},beforeIncomingEvent:(e,r)=>{this.hookHandlers.before_incoming_event[e]=G.safePush(this.hookHandlers.before_incoming_event[e],r)},beforeIncomingMessage:(e,r)=>{this.hookHandlers.before_incoming_message[e]=G.safePush(this.hookHandlers.before_incoming_message[e],r)},beforeOutgoingMessage:(e,r)=>{this.hookHandlers.before_outgoing_message[e]=G.safePush(this.hookHandlers.before_outgoing_message[e],r)},beforeOutgoingCallAction:(e,r)=>{this.hookHandlers.before_outgoing_call_action[e]=G.safePush(this.hookHandlers.before_outgoing_call_action[e],r)},afterIncomingEvent:(e,r)=>{this.hookHandlers.after_incoming_event[e]=G.safePush(this.hookHandlers.after_incoming_event[e],r)},afterIncomingMessage:(e,r)=>{this.hookHandlers.after_incoming_message[e]=G.safePush(this.hookHandlers.after_incoming_message[e],r)},afterOutgoingMessage:(e,r)=>{this.hookHandlers.after_outgoing_message[e]=G.safePush(this.hookHandlers.after_outgoing_message[e],r)},afterOutgoingCallAction:(e,r)=>{this.hookHandlers.after_outgoing_call_action[e]=G.safePush(this.hookHandlers.after_outgoing_call_action[e],r)}};_use=e=>{Hf(this,e)};handler=Lf(this);start=e=>_r(this.handler,e)};var ua=class{constructor(e){this.props=e;this.name=e.name,this.version=e.version,this.entities=e.entities??{},this.templateName=e.templateName;let r=this._getEntityReference(this.entities),n=e.events===void 0?{}:Pe.mapValues(e.events,u=>({...u,schema:u.schema(r)})),a=e.actions===void 0?{}:Pe.mapValues(e.actions,u=>({...u,input:{...u.input,schema:u.input.schema(r)},output:{...u.output,schema:u.output.schema(r)}})),i=e.channels===void 0?{}:Pe.mapValues(e.channels,u=>({...u,messages:Pe.mapValues(u.messages,c=>({...c,schema:c.schema(r)}))}));this.events=n,this.actions=a,this.channels=i}name;version;entities;events;actions;channels;templateName;_getEntityReference=e=>{let r={};for(let[n,a]of Object.entries(e)){let i=a.schema._def["x-zui"]?.title,u=a.schema._def.description,c=Tf.ref(n);i&&c.title(i),u&&c.describe(u),r[n]=c}return r}};var ca=class{constructor(e){this.props=e;this.name=e.name,this.version=e.version,this.integrations=e.integrations,this.interfaces=e.interfaces,this.user=e.user,this.conversation=e.conversation,this.message=e.message,this.states=e.states,this.configuration=e.configuration,this.events=e.events,this.recurringEvents=e.recurringEvents,this.actions=e.actions}name;version;integrations;interfaces;user;conversation;message;states;configuration;events;recurringEvents;actions};var la=class{constructor(e){this.props=e;this.actionHandlers=e.actions}_runtimeProps;actionHandlers;messageHandlers={};eventHandlers={};stateExpiredHandlers={};hookHandlers={before_incoming_event:{},before_incoming_message:{},before_outgoing_message:{},before_outgoing_call_action:{},after_incoming_event:{},after_incoming_message:{},after_outgoing_message:{},after_outgoing_call_action:{}};initialize(e){return this._runtimeProps=e,this}get config(){if(!this._runtimeProps)throw new Error("Plugin not correctly initialized. This is likely because you access your plugin config outside of an handler.");return this._runtimeProps}on={message:(e,r)=>{this.messageHandlers[e]=G.safePush(this.messageHandlers[e],r)},event:(e,r)=>{this.eventHandlers[e]=G.safePush(this.eventHandlers[e],r)},stateExpired:(e,r)=>{this.stateExpiredHandlers[e]=G.safePush(this.stateExpiredHandlers[e],r)},beforeIncomingEvent:(e,r)=>{this.hookHandlers.before_incoming_event[e]=G.safePush(this.hookHandlers.before_incoming_event[e],r)},beforeIncomingMessage:(e,r)=>{this.hookHandlers.before_incoming_message[e]=G.safePush(this.hookHandlers.before_incoming_message[e],r)},beforeOutgoingMessage:(e,r)=>{this.hookHandlers.before_outgoing_message[e]=G.safePush(this.hookHandlers.before_outgoing_message[e],r)},beforeOutgoingCallAction:(e,r)=>{this.hookHandlers.before_outgoing_call_action[e]=G.safePush(this.hookHandlers.before_outgoing_call_action[e],r)},afterIncomingEvent:(e,r)=>{this.hookHandlers.after_incoming_event[e]=G.safePush(this.hookHandlers.after_incoming_event[e],r)},afterIncomingMessage:(e,r)=>{this.hookHandlers.after_incoming_message[e]=G.safePush(this.hookHandlers.after_incoming_message[e],r)},afterOutgoingMessage:(e,r)=>{this.hookHandlers.after_outgoing_message[e]=G.safePush(this.hookHandlers.after_outgoing_message[e],r)},afterOutgoingCallAction:(e,r)=>{this.hookHandlers.after_outgoing_call_action[e]=G.safePush(this.hookHandlers.after_outgoing_call_action[e],r)}}};0&&(module.exports={BRAND,Bot,BotDefinition,BotLogger,BotSpecificClient,DIRTY,EMPTY_PATH,ErrorBoundary,INVALID,Integration,IntegrationDefinition,IntegrationLogger,IntegrationSpecificClient,InterfaceDefinition,NEVER,OK,ParseInputLazyPath,ParseStatus,Plugin,PluginDefinition,RuntimeError,Schema,ZodAny,ZodArray,ZodBigInt,ZodBoolean,ZodBranded,ZodCatch,ZodDate,ZodDefault,ZodDiscriminatedUnion,ZodEffects,ZodEnum,ZodError,ZodFirstPartyTypeKind,ZodFunction,ZodIntersection,ZodIssueCode,ZodLazy,ZodLiteral,ZodMap,ZodNaN,ZodNativeEnum,ZodNever,ZodNull,ZodNullable,ZodNumber,ZodObject,ZodOptional,ZodParsedType,ZodPipeline,ZodPromise,ZodReadonly,ZodRecord,ZodRef,ZodSchema,ZodSet,ZodString,ZodSymbol,ZodTransformer,ZodTuple,ZodType,ZodUndefined,ZodUnion,ZodUnknown,ZodVoid,ZuiForm,addIssueToContext,agent,aimodel,any,array,bigint,boolean,botIdHeader,botUserIdHeader,coerce,configurationHeader,configurationTypeHeader,conversation,createZodEnum,cuid2Regex,cuidRegex,custom,datasource,date,datetimeRegex,defaultComponentDefinitions,discriminatedUnion,effect,emailRegex,enum:null,errorUtil,event,fromJsonSchema,fromObject,function:null,getErrorMap,getParsedType,instanceof:null,integrationIdHeader,intent,intersection,ipv4Regex,ipv6Regex,isAborted,isApiError,isAsync,isDirty,isEmojiRegex,isValid,jsonSchemaToZui,knowledgebase,late,lazy,literal,makeIssue,map,message,messages,nan,nativeEnum,never,null:null,nullable,number,object,objectToZui,objectUtil,oboolean,onumber,operationHeader,optional,ostring,parseBody,pipeline,preprocess,processCreateParams,promise,quotelessJson,readonly,record,ref,serve,set,setErrorMap,strictObject,string,symbol,table,tablerow,transformer,transforms,tuple,typeHeader,ulidRegex,undefined,union,unknown,user,util,uuidRegex,variable,void:null,webhookIdHeader,withErrorBoundary,z,zuiToJsonSchema});
|
|
90
|
-
/*! Bundled license information:
|
|
91
|
-
|
|
92
|
-
react/cjs/react.production.min.js:
|
|
93
|
-
(**
|
|
94
|
-
* @license React
|
|
95
|
-
* react.production.min.js
|
|
96
|
-
*
|
|
97
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
98
|
-
*
|
|
99
|
-
* This source code is licensed under the MIT license found in the
|
|
100
|
-
* LICENSE file in the root directory of this source tree.
|
|
101
|
-
*)
|
|
102
|
-
|
|
103
|
-
react/cjs/react.development.js:
|
|
104
|
-
(**
|
|
105
|
-
* @license React
|
|
106
|
-
* react.development.js
|
|
107
|
-
*
|
|
108
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
109
|
-
*
|
|
110
|
-
* This source code is licensed under the MIT license found in the
|
|
111
|
-
* LICENSE file in the root directory of this source tree.
|
|
112
|
-
*)
|
|
113
|
-
|
|
114
|
-
@bpinternal/zui/dist/index.js:
|
|
115
|
-
(*! Bundled license information:
|
|
116
|
-
|
|
117
|
-
lodash-es/lodash.js:
|
|
118
|
-
(**
|
|
119
|
-
* @license
|
|
120
|
-
* Lodash (Custom Build) <https://lodash.com/>
|
|
121
|
-
* Build: `lodash modularize exports="es" -o ./`
|
|
122
|
-
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
123
|
-
* Released under MIT license <https://lodash.com/license>
|
|
124
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
125
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
126
|
-
*)
|
|
127
|
-
*)
|
|
128
|
-
*/
|
|
129
|
-
//# sourceMappingURL=index.js.map
|