react-luminus-components 1.1.6 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +53 -46
- package/dist/DataKey-Bo883ncO.js +1 -0
- package/dist/DataKey-CXMJ5YCH.mjs +51 -0
- package/dist/{InvalidFeedback.module-DJcRbXSF.mjs → SimplePicker.module-BL8k4kWN.mjs} +217 -199
- package/dist/{InvalidFeedback.module-DrVBvau3.js → SimplePicker.module-DnODgYFl.js} +21 -21
- package/dist/SimpleTooltip-BmkUawod.js +1 -0
- package/dist/{SimpleTooltip-CKNsKZll.mjs → SimpleTooltip-DgJ8gBIF.mjs} +2 -2
- package/dist/components/Buttons/FloatingSubmit/FloatingFormSubmit.d.ts +3 -2
- package/dist/components/Buttons/PrimaryButton/PrimaryButton.d.ts +1 -1
- package/dist/components/Form/DropdownPicker/DropdownPicker.d.ts +19 -0
- package/dist/components/Form/index.d.ts +1 -1
- package/dist/components/HookForm/DropdownPicker/HookFormDropdownPicker.d.ts +15 -0
- package/dist/components/HookForm/index.d.ts +1 -1
- package/dist/components/common/InputContainer/InputContainer.d.ts +2 -1
- package/dist/components/common/SimplePicker/SimplePicker.d.ts +15 -0
- package/dist/components/common/index.d.ts +1 -0
- package/dist/contexts/luminus-components/LuminusComponentsContext.d.ts +2 -2
- package/dist/contexts/luminus-components/LuminusComponentsProvider.d.ts +3 -3
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +648 -74
- package/dist/{hasClass-2sGhxaPc.mjs → hasClass-BHK2NooK.mjs} +1 -1
- package/dist/{hasClass-Ch2izaph.js → hasClass-C-64QyIl.js} +5 -5
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useClickOutside/useClickOutside.d.ts +3 -0
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +35 -33
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +2 -2
- package/dist/main.cjs.js +1 -1
- package/dist/main.d.ts +3 -3
- package/dist/main.es.js +1773 -1763
- package/dist/models/index.d.ts +3 -2
- package/dist/models/prop-types/{HookFormEmployeePickerProps.d.ts → HookFormDropdownPickerProps.d.ts} +3 -2
- package/dist/models/texts/DropdownPickerTexts.d.ts +5 -0
- package/dist/models/texts/FormSubmitTexts.d.ts +4 -0
- package/dist/style.css +1 -1
- package/dist/useClickOutside-BjJyGTec.mjs +14 -0
- package/dist/useClickOutside-DsVG12Cs.js +1 -0
- package/dist/useConfirm-5bscOMVZ.js +1 -0
- package/dist/{useConfirm-Cv_8Pxgx.mjs → useConfirm-Rw0k8LNX.mjs} +1 -1
- package/package.json +2 -3
- package/dist/Modal-Cgt4jEpF.mjs +0 -627
- package/dist/Modal-dXyx77X0.js +0 -1
- package/dist/SimpleTooltip-hw-DnjyJ.js +0 -1
- package/dist/components/EmployeePicker/EmployeeSearch/EmployeeSearch.d.ts +0 -7
- package/dist/components/EmployeePicker/EmployeeSearchModal/EmployeeSearchModal.d.ts +0 -9
- package/dist/components/EmployeePicker/comps/EmployeeSearchItem/EmployeeSearchItem.d.ts +0 -7
- package/dist/components/EmployeePicker/comps/index.d.ts +0 -1
- package/dist/components/EmployeePicker/index.d.ts +0 -2
- package/dist/components/Form/EmployeePicker/EmployeePicker.d.ts +0 -13
- package/dist/components/HookForm/EmployeePicker/HookFormEmployeePicker.d.ts +0 -9
- package/dist/models/texts/EmployeeSearchModalTexts.d.ts +0 -6
- package/dist/useConfirm-BCj1t5rw.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as ue from "react";
|
|
2
2
|
import K, { useContext as ne, useMemo as ot, useRef as Y, useCallback as $, useEffect as H, useState as Ae, useLayoutEffect as it, createContext as at, cloneElement as De } from "react";
|
|
3
|
-
import { h as st, j as Q,
|
|
3
|
+
import { h as st, j as Q, d as ut } from "./SimplePicker.module-BL8k4kWN.mjs";
|
|
4
4
|
import ee from "react-dom";
|
|
5
5
|
function ct(e, n) {
|
|
6
6
|
if (e == null)
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";const p=require("react"),G=require("./
|
|
1
|
+
"use strict";const p=require("react"),G=require("./SimplePicker.module-DnODgYFl.js"),J=require("react-dom");function ut(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const r=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,r.get?r:{enumerable:!0,get:()=>e[i]})}}return n.default=e,Object.freeze(n)}const ie=ut(p);function Ve(e,n){if(e==null)return{};var i={},r=Object.keys(e),o,t;for(t=0;t<r.length;t++)o=r[t],!(n.indexOf(o)>=0)&&(i[o]=e[o]);return i}function Oe(e,n){return Oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Oe(e,n)}function ct(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,Oe(e,n)}const ft=["xxl","xl","lg","md","sm","xs"],lt="xs",se=ie.createContext({prefixes:{},breakpoints:ft,minBreakpoint:lt});function dt(e,n){const{prefixes:i}=p.useContext(se);return e||i[n]||n}function pt(){const{breakpoints:e}=p.useContext(se);return e}function vt(){const{minBreakpoint:e}=p.useContext(se);return e}function Et(){const{dir:e}=p.useContext(se);return e==="rtl"}function we(e){return e&&e.ownerDocument||document}function yt(e){var n=we(e);return n&&n.defaultView||window}function mt(e,n){return yt(e).getComputedStyle(e,n)}var ht=/([A-Z])/g;function bt(e){return e.replace(ht,"-$1").toLowerCase()}var xt=/^ms-/;function re(e){return bt(e).replace(xt,"-ms-")}var Tt=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function gt(e){return!!(e&&Tt.test(e))}function je(e,n){var i="",r="";if(typeof n=="string")return e.style.getPropertyValue(re(n))||mt(e).getPropertyValue(re(n));Object.keys(n).forEach(function(o){var t=n[o];!t&&t!==0?e.style.removeProperty(re(o)):gt(o)?r+=o+"("+t+") ":i+=re(o)+": "+t+";"}),r&&(i+="transform: "+r+";"),e.style.cssText+=";"+i}var Se={exports:{}},oe={exports:{}},_={};/** @license React v16.13.1
|
|
2
2
|
* react-is.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
5
5
|
*
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/var
|
|
8
|
+
*/var Ie;function Rt(){if(Ie)return _;Ie=1;var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,t=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,v=e?Symbol.for("react.concurrent_mode"):60111,E=e?Symbol.for("react.forward_ref"):60112,y=e?Symbol.for("react.suspense"):60113,C=e?Symbol.for("react.suspense_list"):60120,k=e?Symbol.for("react.memo"):60115,M=e?Symbol.for("react.lazy"):60116,j=e?Symbol.for("react.block"):60121,I=e?Symbol.for("react.fundamental"):60117,L=e?Symbol.for("react.responder"):60118,F=e?Symbol.for("react.scope"):60119;function A(c){if(typeof c=="object"&&c!==null){var N=c.$$typeof;switch(N){case n:switch(c=c.type,c){case d:case v:case r:case t:case o:case y:return c;default:switch(c=c&&c.$$typeof,c){case u:case E:case M:case k:case s:return c;default:return N}}case i:return N}}}function D(c){return A(c)===v}return _.AsyncMode=d,_.ConcurrentMode=v,_.ContextConsumer=u,_.ContextProvider=s,_.Element=n,_.ForwardRef=E,_.Fragment=r,_.Lazy=M,_.Memo=k,_.Portal=i,_.Profiler=t,_.StrictMode=o,_.Suspense=y,_.isAsyncMode=function(c){return D(c)||A(c)===d},_.isConcurrentMode=D,_.isContextConsumer=function(c){return A(c)===u},_.isContextProvider=function(c){return A(c)===s},_.isElement=function(c){return typeof c=="object"&&c!==null&&c.$$typeof===n},_.isForwardRef=function(c){return A(c)===E},_.isFragment=function(c){return A(c)===r},_.isLazy=function(c){return A(c)===M},_.isMemo=function(c){return A(c)===k},_.isPortal=function(c){return A(c)===i},_.isProfiler=function(c){return A(c)===t},_.isStrictMode=function(c){return A(c)===o},_.isSuspense=function(c){return A(c)===y},_.isValidElementType=function(c){return typeof c=="string"||typeof c=="function"||c===r||c===v||c===t||c===o||c===y||c===C||typeof c=="object"&&c!==null&&(c.$$typeof===M||c.$$typeof===k||c.$$typeof===s||c.$$typeof===u||c.$$typeof===E||c.$$typeof===I||c.$$typeof===L||c.$$typeof===F||c.$$typeof===j)},_.typeOf=A,_}var P={};/** @license React v16.13.1
|
|
9
9
|
* react-is.development.js
|
|
10
10
|
*
|
|
11
11
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
12
|
*
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
|
-
*/var Le;function Ot(){return Le||(Le=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,t=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,v=e?Symbol.for("react.concurrent_mode"):60111,E=e?Symbol.for("react.forward_ref"):60112,y=e?Symbol.for("react.suspense"):60113,C=e?Symbol.for("react.suspense_list"):60120,k=e?Symbol.for("react.memo"):60115,M=e?Symbol.for("react.lazy"):60116,j=e?Symbol.for("react.block"):60121,
|
|
15
|
+
*/var Le;function Ot(){return Le||(Le=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,t=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,v=e?Symbol.for("react.concurrent_mode"):60111,E=e?Symbol.for("react.forward_ref"):60112,y=e?Symbol.for("react.suspense"):60113,C=e?Symbol.for("react.suspense_list"):60120,k=e?Symbol.for("react.memo"):60115,M=e?Symbol.for("react.lazy"):60116,j=e?Symbol.for("react.block"):60121,I=e?Symbol.for("react.fundamental"):60117,L=e?Symbol.for("react.responder"):60118,F=e?Symbol.for("react.scope"):60119;function A(f){return typeof f=="string"||typeof f=="function"||f===r||f===v||f===t||f===o||f===y||f===C||typeof f=="object"&&f!==null&&(f.$$typeof===M||f.$$typeof===k||f.$$typeof===s||f.$$typeof===u||f.$$typeof===E||f.$$typeof===I||f.$$typeof===L||f.$$typeof===F||f.$$typeof===j)}function D(f){if(typeof f=="object"&&f!==null){var q=f.$$typeof;switch(q){case n:var ne=f.type;switch(ne){case d:case v:case r:case t:case o:case y:return ne;default:var Ae=ne&&ne.$$typeof;switch(Ae){case u:case E:case M:case k:case s:return Ae;default:return q}}case i:return q}}}var c=d,N=v,V=u,ce=s,fe=n,le=E,ee=r,de=M,pe=k,K=i,ve=t,W=o,X=y,te=!1;function Ee(f){return te||(te=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),a(f)||D(f)===d}function a(f){return D(f)===v}function l(f){return D(f)===u}function g(f){return D(f)===s}function x(f){return typeof f=="object"&&f!==null&&f.$$typeof===n}function m(f){return D(f)===E}function R(f){return D(f)===r}function b(f){return D(f)===M}function T(f){return D(f)===k}function O(f){return D(f)===i}function w(f){return D(f)===t}function S(f){return D(f)===o}function $(f){return D(f)===y}P.AsyncMode=c,P.ConcurrentMode=N,P.ContextConsumer=V,P.ContextProvider=ce,P.Element=fe,P.ForwardRef=le,P.Fragment=ee,P.Lazy=de,P.Memo=pe,P.Portal=K,P.Profiler=ve,P.StrictMode=W,P.Suspense=X,P.isAsyncMode=Ee,P.isConcurrentMode=a,P.isContextConsumer=l,P.isContextProvider=g,P.isElement=x,P.isForwardRef=m,P.isFragment=R,P.isLazy=b,P.isMemo=T,P.isPortal=O,P.isProfiler=w,P.isStrictMode=S,P.isSuspense=$,P.isValidElementType=A,P.typeOf=D}()),P}var Ne;function Xe(){return Ne||(Ne=1,process.env.NODE_ENV==="production"?oe.exports=Rt():oe.exports=Ot()),oe.exports}/*
|
|
16
16
|
object-assign
|
|
17
17
|
(c) Sindre Sorhus
|
|
18
18
|
@license MIT
|
|
19
|
-
*/var ye,$e;function St(){if($e)return ye;$e=1;var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function r(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function o(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var s={},u=0;u<10;u++)s["_"+String.fromCharCode(u)]=u;var d=Object.getOwnPropertyNames(s).map(function(E){return s[E]});if(d.join("")!=="0123456789")return!1;var v={};return"abcdefghijklmnopqrst".split("").forEach(function(E){v[E]=E}),Object.keys(Object.assign({},v)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ye=o()?Object.assign:function(t,s){for(var u,d=r(t),v,E=1;E<arguments.length;E++){u=Object(arguments[E]);for(var y in u)n.call(u,y)&&(d[y]=u[y]);if(e){v=e(u);for(var C=0;C<v.length;C++)i.call(u,v[C])&&(d[v[C]]=u[v[C]])}}return d},ye}var me,We;function De(){if(We)return me;We=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return me=e,me}var he,qe;function Ke(){return qe||(qe=1,he=Function.call.bind(Object.prototype.hasOwnProperty)),he}var be,Fe;function Ct(){if(Fe)return be;Fe=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var n=De(),i={},r=Ke();e=function(t){var s="Warning: "+t;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(t,s,u,d,v){if(process.env.NODE_ENV!=="production"){for(var E in t)if(r(t,E)){var y;try{if(typeof t[E]!="function"){var C=Error((d||"React class")+": "+u+" type `"+E+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[E]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw C.name="Invariant Violation",C}y=t[E](s,E,d,u,null,n)}catch(M){y=M}if(y&&!(y instanceof Error)&&e((d||"React class")+": type specification of "+u+" `"+E+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof y+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),y instanceof Error&&!(y.message in i)){i[y.message]=!0;var k=v?v():"";e("Failed "+u+" type: "+y.message+(k??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(i={})},be=o,be}var xe,Ue;function _t(){if(Ue)return xe;Ue=1;var e=Xe(),n=St(),i=De(),r=Ke(),o=Ct(),t=function(){};process.env.NODE_ENV!=="production"&&(t=function(u){var d="Warning: "+u;typeof console<"u"&&console.error(d);try{throw new Error(d)}catch{}});function s(){return null}return xe=function(u,d){var v=typeof Symbol=="function"&&Symbol.iterator,E="@@iterator";function y(a){var l=a&&(v&&a[v]||a[E]);if(typeof l=="function")return l}var C="<<anonymous>>",k={array:L("array"),bigint:L("bigint"),bool:L("boolean"),func:L("function"),number:L("number"),object:L("object"),string:L("string"),symbol:L("symbol"),any:F(),arrayOf:
|
|
20
|
-
Valid keys: `+JSON.stringify(Object.keys(a),null," "));var f=$(T,S,m,R,b+"."+S,i);if(f)return f}return null}return A(l)}function K(a){switch(typeof a){case"number":case"string":case"undefined":return!0;case"boolean":return!a;case"object":if(Array.isArray(a))return a.every(K);if(a===null||u(a))return!0;var l=y(a);if(l){var g=l.call(a),x;if(l!==a.entries){for(;!(x=g.next()).done;)if(!K(x.value))return!1}else for(;!(x=g.next()).done;){var m=x.value;if(m&&!K(m[1]))return!1}}else return!1;return!0;default:return!1}}function ve(a,l){return a==="symbol"?!0:l?l["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&l instanceof Symbol:!1}function W(a){var l=typeof a;return Array.isArray(a)?"array":a instanceof RegExp?"object":ve(l,a)?"symbol":l}function X(a){if(typeof a>"u"||a===null)return""+a;var l=W(a);if(l==="object"){if(a instanceof Date)return"date";if(a instanceof RegExp)return"regexp"}return l}function te(a){var l=X(a);switch(l){case"array":case"object":return"an "+l;case"boolean":case"date":case"regexp":return"a "+l;default:return l}}function Ee(a){return!a.constructor||!a.constructor.name?C:a.constructor.name}return k.checkPropTypes=o,k.resetWarningCache=o.resetWarningCache,k.PropTypes=k,k},xe}var Te,Ye;function Pt(){if(Ye)return Te;Ye=1;var e=De();function n(){}function i(){}return i.resetWarningCache=n,Te=function(){function r(s,u,d,v,E,y){if(y!==e){var C=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw C.name="Invariant Violation",C}}r.isRequired=r;function o(){return r}var t={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:i,resetWarningCache:n};return t.PropTypes=t,t},Te}if(process.env.NODE_ENV!=="production"){var wt=Xe(),jt=!0;Se.exports=_t()(wt.isElement,jt)}else Se.exports=Pt()();var Dt=Se.exports;const h=G.getDefaultExportFromCjs(Dt),Be={disabled:!1};var kt=process.env.NODE_ENV!=="production"?h.oneOfType([h.number,h.shape({enter:h.number,exit:h.number,appear:h.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&h.oneOfType([h.string,h.shape({enter:h.string,exit:h.string,active:h.string}),h.shape({enter:h.string,enterDone:h.string,enterActive:h.string,exit:h.string,exitDone:h.string,exitActive:h.string})]);const He=p.createContext(null);var Mt=function(n){return n.scrollTop},Z="unmounted",B="exited",U="entering",z="entered",ae="exiting",Y=function(e){ct(n,e);function n(r,o){var t;t=e.call(this,r,o)||this;var s=o,u=s&&!s.isMounting?r.enter:r.appear,d;return t.appearStatus=null,r.in?u?(d=B,t.appearStatus=U):d=z:r.unmountOnExit||r.mountOnEnter?d=Z:d=B,t.state={status:d},t.nextCallback=null,t}n.getDerivedStateFromProps=function(o,t){var s=o.in;return s&&t.status===Z?{status:B}:null};var i=n.prototype;return i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(o){var t=null;if(o!==this.props){var s=this.state.status;this.props.in?s!==U&&s!==z&&(t=U):(s===U||s===z)&&(t=ae)}this.updateStatus(!1,t)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var o=this.props.timeout,t,s,u;return t=s=u=o,o!=null&&typeof o!="number"&&(t=o.exit,s=o.enter,u=o.appear!==void 0?o.appear:s),{exit:t,enter:s,appear:u}},i.updateStatus=function(o,t){if(o===void 0&&(o=!1),t!==null)if(this.cancelNextCallback(),t===U){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:J.findDOMNode(this);s&&Mt(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===B&&this.setState({status:Z})},i.performEnter=function(o){var t=this,s=this.props.enter,u=this.context?this.context.isMounting:o,d=this.props.nodeRef?[u]:[J.findDOMNode(this),u],v=d[0],E=d[1],y=this.getTimeouts(),C=u?y.appear:y.enter;if(!o&&!s||Be.disabled){this.safeSetState({status:z},function(){t.props.onEntered(v)});return}this.props.onEnter(v,E),this.safeSetState({status:U},function(){t.props.onEntering(v,E),t.onTransitionEnd(C,function(){t.safeSetState({status:z},function(){t.props.onEntered(v,E)})})})},i.performExit=function(){var o=this,t=this.props.exit,s=this.getTimeouts(),u=this.props.nodeRef?void 0:J.findDOMNode(this);if(!t||Be.disabled){this.safeSetState({status:B},function(){o.props.onExited(u)});return}this.props.onExit(u),this.safeSetState({status:ae},function(){o.props.onExiting(u),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:B},function(){o.props.onExited(u)})})})},i.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(o,t){t=this.setNextCallback(t),this.setState(o,t)},i.setNextCallback=function(o){var t=this,s=!0;return this.nextCallback=function(u){s&&(s=!1,t.nextCallback=null,o(u))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},i.onTransitionEnd=function(o,t){this.setNextCallback(t);var s=this.props.nodeRef?this.props.nodeRef.current:J.findDOMNode(this),u=o==null&&!this.props.addEndListener;if(!s||u){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var d=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],v=d[0],E=d[1];this.props.addEndListener(v,E)}o!=null&&setTimeout(this.nextCallback,o)},i.render=function(){var o=this.state.status;if(o===Z)return null;var t=this.props,s=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var u=Ve(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return p.createElement(He.Provider,{value:null},typeof s=="function"?s(o,u):p.cloneElement(p.Children.only(s),u))},n}(p.Component);Y.contextType=He;Y.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:h.shape({current:typeof Element>"u"?h.any:function(e,n,i,r,o,t){var s=e[n];return h.instanceOf(s&&"ownerDocument"in s?s.ownerDocument.defaultView.Element:Element)(e,n,i,r,o,t)}}),children:h.oneOfType([h.func.isRequired,h.element.isRequired]).isRequired,in:h.bool,mountOnEnter:h.bool,unmountOnExit:h.bool,appear:h.bool,enter:h.bool,exit:h.bool,timeout:function(n){var i=kt;n.addEndListener||(i=i.isRequired);for(var r=arguments.length,o=new Array(r>1?r-1:0),t=1;t<r;t++)o[t-1]=arguments[t];return i.apply(void 0,[n].concat(o))},addEndListener:h.func,onEnter:h.func,onEntering:h.func,onEntered:h.func,onExit:h.func,onExiting:h.func,onExited:h.func}:{};function H(){}Y.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:H,onEntering:H,onEntered:H,onExit:H,onExiting:H,onExited:H};Y.UNMOUNTED=Z;Y.EXITED=B;Y.ENTERING=U;Y.ENTERED=z;Y.EXITING=ae;const It=Y,ue=!!(typeof window<"u"&&window.document&&window.document.createElement);var Ce=!1,_e=!1;try{var ge={get passive(){return Ce=!0},get once(){return _e=Ce=!0}};ue&&(window.addEventListener("test",ge,ge),window.removeEventListener("test",ge,!0))}catch{}function Je(e,n,i,r){if(r&&typeof r!="boolean"&&!_e){var o=r.once,t=r.capture,s=i;!_e&&o&&(s=i.__once||function u(d){this.removeEventListener(n,u,t),i.call(this,d)},i.__once=s),e.addEventListener(n,s,Ce?r:t)}e.addEventListener(n,i,r)}function Ze(e,n,i,r){var o=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(n,i,o),i.__once&&e.removeEventListener(n,i.__once,o)}function ke(e,n,i,r){return Je(e,n,i,r),function(){Ze(e,n,i,r)}}function At(e,n,i,r){if(i===void 0&&(i=!1),r===void 0&&(r=!0),e){var o=document.createEvent("HTMLEvents");o.initEvent(n,i,r),e.dispatchEvent(o)}}function Lt(e){var n=je(e,"transitionDuration")||"",i=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*i}function Nt(e,n,i){i===void 0&&(i=5);var r=!1,o=setTimeout(function(){r||At(e,"transitionend",!0)},n+i),t=ke(e,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(o),t()}}function Qe(e,n,i,r){i==null&&(i=Lt(e)||0);var o=Nt(e,i,r),t=ke(e,"transitionend",n);return function(){o(),t()}}function ze(e,n){const i=je(e,n)||"",r=i.indexOf("ms")===-1?1e3:1;return parseFloat(i)*r}function et(e,n){const i=ze(e,"transitionDuration"),r=ze(e,"transitionDelay"),o=Qe(e,t=>{t.target===e&&(o(),n(t))},i+r)}function tt(e){e.offsetHeight}const Ge=e=>!e||typeof e=="function"?e:n=>{e.current=n};function $t(e,n){const i=Ge(e),r=Ge(n);return o=>{i&&i(o),r&&r(o)}}function Q(e,n){return p.useMemo(()=>$t(e,n),[e,n])}function nt(e){return e&&"setState"in e?J.findDOMNode(e):e??null}const Wt=p.forwardRef(({onEnter:e,onEntering:n,onEntered:i,onExit:r,onExiting:o,onExited:t,addEndListener:s,children:u,childRef:d,...v},E)=>{const y=p.useRef(null),C=Q(y,d),k=N=>{C(nt(N))},M=N=>V=>{N&&y.current&&N(y.current,V)},j=p.useCallback(M(e),[e]),A=p.useCallback(M(n),[n]),L=p.useCallback(M(i),[i]),F=p.useCallback(M(r),[r]),I=p.useCallback(M(o),[o]),D=p.useCallback(M(t),[t]),c=p.useCallback(M(s),[s]);return G.jsxRuntimeExports.jsx(It,{ref:E,...v,onEnter:j,onEntered:L,onEntering:A,onExit:F,onExited:D,onExiting:I,addEndListener:c,nodeRef:y,children:typeof u=="function"?(N,V)=>u(N,{...V,ref:k}):p.cloneElement(u,{ref:k})})}),rt=Wt;function qt(e){const n=p.useRef(e);return p.useEffect(()=>{n.current=e},[e]),n}function Me(e){const n=qt(e);return p.useCallback(function(...i){return n.current&&n.current(...i)},[n])}function Ft(){return p.useState(null)}function Ut(){const e=p.useRef(!0),n=p.useRef(()=>e.current);return p.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),n.current}const Yt=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",Bt=typeof document<"u",Pe=Bt||Yt?p.useLayoutEffect:p.useEffect,zt={[U]:"show",[z]:"show"},ot=ie.forwardRef(({className:e,children:n,transitionClasses:i={},onEnter:r,...o},t)=>{const s={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...o},u=p.useCallback((d,v)=>{tt(d),r==null||r(d,v)},[r]);return G.jsxRuntimeExports.jsx(rt,{ref:t,addEndListener:et,...s,onEnter:u,childRef:n.ref,children:(d,v)=>ie.cloneElement(n,{...v,className:G.classNames("fade",e,n.props.className,zt[d],i[d])})})});ot.displayName="Fade";const Gt=ot;function Vt(e){const n=p.useRef(e);return n.current=e,n}function Xt(e){const n=Vt(e);p.useEffect(()=>()=>n.current(),[])}function Kt(e,n){if(e.contains)return e.contains(n);if(e.compareDocumentPosition)return e===n||!!(e.compareDocumentPosition(n)&16)}const it=p.createContext(ue?window:void 0);it.Provider;function at(){return p.useContext(it)}const Re=(e,n)=>ue?e==null?(n||we()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function Ht(e,n){const i=at(),[r,o]=p.useState(()=>Re(e,i==null?void 0:i.document));if(!r){const t=Re(e);t&&o(t)}return p.useEffect(()=>{n&&r&&n(r)},[n,r]),p.useEffect(()=>{const t=Re(e);t!==r&&o(t)},[e,r]),r}function st({children:e,in:n,onExited:i,mountOnEnter:r,unmountOnExit:o}){const t=p.useRef(null),s=p.useRef(n),u=Me(i);p.useEffect(()=>{n?s.current=!0:u(t.current)},[n,u]);const d=Q(t,e.ref),v=p.cloneElement(e,{ref:d});return n?v:o||!s.current&&r?null:v}const Jt=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];function Zt(e,n){if(e==null)return{};var i={},r=Object.keys(e),o,t;for(t=0;t<r.length;t++)o=r[t],!(n.indexOf(o)>=0)&&(i[o]=e[o]);return i}function Qt(e){let{onEnter:n,onEntering:i,onEntered:r,onExit:o,onExiting:t,onExited:s,addEndListener:u,children:d}=e,v=Zt(e,Jt);const E=p.useRef(null),y=Q(E,typeof d=="function"?null:d.ref),C=D=>c=>{D&&E.current&&D(E.current,c)},k=p.useCallback(C(n),[n]),M=p.useCallback(C(i),[i]),j=p.useCallback(C(r),[r]),A=p.useCallback(C(o),[o]),L=p.useCallback(C(t),[t]),F=p.useCallback(C(s),[s]),I=p.useCallback(C(u),[u]);return Object.assign({},v,{nodeRef:E},n&&{onEnter:k},i&&{onEntering:M},r&&{onEntered:j},o&&{onExit:A},t&&{onExiting:L},s&&{onExited:F},u&&{addEndListener:I},{children:typeof d=="function"?(D,c)=>d(D,Object.assign({},c,{ref:y})):p.cloneElement(d,{ref:y})})}const en=["component"];function tn(e,n){if(e==null)return{};var i={},r=Object.keys(e),o,t;for(t=0;t<r.length;t++)o=r[t],!(n.indexOf(o)>=0)&&(i[o]=e[o]);return i}const nn=ie.forwardRef((e,n)=>{let{component:i}=e,r=tn(e,en);const o=Qt(r);return G.jsxRuntimeExports.jsx(i,Object.assign({ref:n},o))}),rn=nn;function on({in:e,onTransition:n}){const i=p.useRef(null),r=p.useRef(!0),o=Me(n);return Pe(()=>{if(!i.current)return;let t=!1;return o({in:e,element:i.current,initial:r.current,isStale:()=>t}),()=>{t=!0}},[e,o]),Pe(()=>(r.current=!1,()=>{r.current=!0}),[]),i}function an({children:e,in:n,onExited:i,onEntered:r,transition:o}){const[t,s]=p.useState(!n);n&&t&&s(!1);const u=on({in:!!n,onTransition:v=>{const E=()=>{v.isStale()||(v.in?r==null||r(v.element,v.initial):(s(!0),i==null||i(v.element)))};Promise.resolve(o(v)).then(E,y=>{throw v.in||s(!0),y})}}),d=Q(u,e.ref);return t&&!n?null:p.cloneElement(e,{ref:d})}function sn(e,n,i){return e?G.jsxRuntimeExports.jsx(rn,Object.assign({},i,{component:e})):n?G.jsxRuntimeExports.jsx(an,Object.assign({},i,{transition:n})):G.jsxRuntimeExports.jsx(st,Object.assign({},i))}function un(e){return e.code==="Escape"||e.keyCode===27}function cn(e,n){return e.classList?!!n&&e.classList.contains(n):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+n+" ")!==-1}exports.ENTERED=z;exports.ENTERING=U;exports.EXITED=B;exports.EXITING=ae;exports.Fade=Gt;exports.NoopTransition=st;exports.PropTypes=h;exports.TransitionWrapper=rt;exports._objectWithoutPropertiesLoose=Ve;exports.addEventListener=Je;exports.canUseDOM=ue;exports.contains=Kt;exports.hasClass=cn;exports.isEscKey=un;exports.listen=ke;exports.ownerDocument=we;exports.removeEventListener=Ze;exports.renderTransition=sn;exports.safeFindDOMNode=nt;exports.style=je;exports.transitionEnd=Qe;exports.transitionEndListener=et;exports.triggerBrowserReflow=tt;exports.useBootstrapBreakpoints=pt;exports.useBootstrapMinBreakpoint=vt;exports.useBootstrapPrefix=dt;exports.useCallbackRef=Ft;exports.useEventCallback=Me;exports.useIsRTL=Et;exports.useIsomorphicEffect=Pe;exports.useMergedRefs=Q;exports.useMounted=Ut;exports.useWaitForDOMRef=Ht;exports.useWillUnmount=Xt;exports.useWindow=at;
|
|
19
|
+
*/var ye,$e;function St(){if($e)return ye;$e=1;var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function r(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function o(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var s={},u=0;u<10;u++)s["_"+String.fromCharCode(u)]=u;var d=Object.getOwnPropertyNames(s).map(function(E){return s[E]});if(d.join("")!=="0123456789")return!1;var v={};return"abcdefghijklmnopqrst".split("").forEach(function(E){v[E]=E}),Object.keys(Object.assign({},v)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ye=o()?Object.assign:function(t,s){for(var u,d=r(t),v,E=1;E<arguments.length;E++){u=Object(arguments[E]);for(var y in u)n.call(u,y)&&(d[y]=u[y]);if(e){v=e(u);for(var C=0;C<v.length;C++)i.call(u,v[C])&&(d[v[C]]=u[v[C]])}}return d},ye}var me,We;function De(){if(We)return me;We=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return me=e,me}var he,qe;function Ke(){return qe||(qe=1,he=Function.call.bind(Object.prototype.hasOwnProperty)),he}var be,Fe;function Ct(){if(Fe)return be;Fe=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var n=De(),i={},r=Ke();e=function(t){var s="Warning: "+t;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(t,s,u,d,v){if(process.env.NODE_ENV!=="production"){for(var E in t)if(r(t,E)){var y;try{if(typeof t[E]!="function"){var C=Error((d||"React class")+": "+u+" type `"+E+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[E]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw C.name="Invariant Violation",C}y=t[E](s,E,d,u,null,n)}catch(M){y=M}if(y&&!(y instanceof Error)&&e((d||"React class")+": type specification of "+u+" `"+E+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof y+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),y instanceof Error&&!(y.message in i)){i[y.message]=!0;var k=v?v():"";e("Failed "+u+" type: "+y.message+(k??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(i={})},be=o,be}var xe,Ue;function _t(){if(Ue)return xe;Ue=1;var e=Xe(),n=St(),i=De(),r=Ke(),o=Ct(),t=function(){};process.env.NODE_ENV!=="production"&&(t=function(u){var d="Warning: "+u;typeof console<"u"&&console.error(d);try{throw new Error(d)}catch{}});function s(){return null}return xe=function(u,d){var v=typeof Symbol=="function"&&Symbol.iterator,E="@@iterator";function y(a){var l=a&&(v&&a[v]||a[E]);if(typeof l=="function")return l}var C="<<anonymous>>",k={array:L("array"),bigint:L("bigint"),bool:L("boolean"),func:L("function"),number:L("number"),object:L("object"),string:L("string"),symbol:L("symbol"),any:F(),arrayOf:A,element:D(),elementType:c(),instanceOf:N,node:le(),objectOf:ce,oneOf:V,oneOfType:fe,shape:de,exact:pe};function M(a,l){return a===l?a!==0||1/a===1/l:a!==a&&l!==l}function j(a,l){this.message=a,this.data=l&&typeof l=="object"?l:{},this.stack=""}j.prototype=Error.prototype;function I(a){if(process.env.NODE_ENV!=="production")var l={},g=0;function x(R,b,T,O,w,S,$){if(O=O||C,S=S||T,$!==i){if(d){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var q=O+":"+T;!l[q]&&g<3&&(t("You are manually calling a React.PropTypes validation function for the `"+S+"` prop on `"+O+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),l[q]=!0,g++)}}return b[T]==null?R?b[T]===null?new j("The "+w+" `"+S+"` is marked as required "+("in `"+O+"`, but its value is `null`.")):new j("The "+w+" `"+S+"` is marked as required in "+("`"+O+"`, but its value is `undefined`.")):null:a(b,T,O,w,S)}var m=x.bind(null,!1);return m.isRequired=x.bind(null,!0),m}function L(a){function l(g,x,m,R,b,T){var O=g[x],w=W(O);if(w!==a){var S=X(O);return new j("Invalid "+R+" `"+b+"` of type "+("`"+S+"` supplied to `"+m+"`, expected ")+("`"+a+"`."),{expectedType:a})}return null}return I(l)}function F(){return I(s)}function A(a){function l(g,x,m,R,b){if(typeof a!="function")return new j("Property `"+b+"` of component `"+m+"` has invalid PropType notation inside arrayOf.");var T=g[x];if(!Array.isArray(T)){var O=W(T);return new j("Invalid "+R+" `"+b+"` of type "+("`"+O+"` supplied to `"+m+"`, expected an array."))}for(var w=0;w<T.length;w++){var S=a(T,w,m,R,b+"["+w+"]",i);if(S instanceof Error)return S}return null}return I(l)}function D(){function a(l,g,x,m,R){var b=l[g];if(!u(b)){var T=W(b);return new j("Invalid "+m+" `"+R+"` of type "+("`"+T+"` supplied to `"+x+"`, expected a single ReactElement."))}return null}return I(a)}function c(){function a(l,g,x,m,R){var b=l[g];if(!e.isValidElementType(b)){var T=W(b);return new j("Invalid "+m+" `"+R+"` of type "+("`"+T+"` supplied to `"+x+"`, expected a single ReactElement type."))}return null}return I(a)}function N(a){function l(g,x,m,R,b){if(!(g[x]instanceof a)){var T=a.name||C,O=Ee(g[x]);return new j("Invalid "+R+" `"+b+"` of type "+("`"+O+"` supplied to `"+m+"`, expected ")+("instance of `"+T+"`."))}return null}return I(l)}function V(a){if(!Array.isArray(a))return process.env.NODE_ENV!=="production"&&(arguments.length>1?t("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):t("Invalid argument supplied to oneOf, expected an array.")),s;function l(g,x,m,R,b){for(var T=g[x],O=0;O<a.length;O++)if(M(T,a[O]))return null;var w=JSON.stringify(a,function($,f){var q=X(f);return q==="symbol"?String(f):f});return new j("Invalid "+R+" `"+b+"` of value `"+String(T)+"` "+("supplied to `"+m+"`, expected one of "+w+"."))}return I(l)}function ce(a){function l(g,x,m,R,b){if(typeof a!="function")return new j("Property `"+b+"` of component `"+m+"` has invalid PropType notation inside objectOf.");var T=g[x],O=W(T);if(O!=="object")return new j("Invalid "+R+" `"+b+"` of type "+("`"+O+"` supplied to `"+m+"`, expected an object."));for(var w in T)if(r(T,w)){var S=a(T,w,m,R,b+"."+w,i);if(S instanceof Error)return S}return null}return I(l)}function fe(a){if(!Array.isArray(a))return process.env.NODE_ENV!=="production"&&t("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var l=0;l<a.length;l++){var g=a[l];if(typeof g!="function")return t("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+te(g)+" at index "+l+"."),s}function x(m,R,b,T,O){for(var w=[],S=0;S<a.length;S++){var $=a[S],f=$(m,R,b,T,O,i);if(f==null)return null;f.data&&r(f.data,"expectedType")&&w.push(f.data.expectedType)}var q=w.length>0?", expected one of type ["+w.join(", ")+"]":"";return new j("Invalid "+T+" `"+O+"` supplied to "+("`"+b+"`"+q+"."))}return I(x)}function le(){function a(l,g,x,m,R){return K(l[g])?null:new j("Invalid "+m+" `"+R+"` supplied to "+("`"+x+"`, expected a ReactNode."))}return I(a)}function ee(a,l,g,x,m){return new j((a||"React class")+": "+l+" type `"+g+"."+x+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+m+"`.")}function de(a){function l(g,x,m,R,b){var T=g[x],O=W(T);if(O!=="object")return new j("Invalid "+R+" `"+b+"` of type `"+O+"` "+("supplied to `"+m+"`, expected `object`."));for(var w in a){var S=a[w];if(typeof S!="function")return ee(m,R,b,w,X(S));var $=S(T,w,m,R,b+"."+w,i);if($)return $}return null}return I(l)}function pe(a){function l(g,x,m,R,b){var T=g[x],O=W(T);if(O!=="object")return new j("Invalid "+R+" `"+b+"` of type `"+O+"` "+("supplied to `"+m+"`, expected `object`."));var w=n({},g[x],a);for(var S in w){var $=a[S];if(r(a,S)&&typeof $!="function")return ee(m,R,b,S,X($));if(!$)return new j("Invalid "+R+" `"+b+"` key `"+S+"` supplied to `"+m+"`.\nBad object: "+JSON.stringify(g[x],null," ")+`
|
|
20
|
+
Valid keys: `+JSON.stringify(Object.keys(a),null," "));var f=$(T,S,m,R,b+"."+S,i);if(f)return f}return null}return I(l)}function K(a){switch(typeof a){case"number":case"string":case"undefined":return!0;case"boolean":return!a;case"object":if(Array.isArray(a))return a.every(K);if(a===null||u(a))return!0;var l=y(a);if(l){var g=l.call(a),x;if(l!==a.entries){for(;!(x=g.next()).done;)if(!K(x.value))return!1}else for(;!(x=g.next()).done;){var m=x.value;if(m&&!K(m[1]))return!1}}else return!1;return!0;default:return!1}}function ve(a,l){return a==="symbol"?!0:l?l["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&l instanceof Symbol:!1}function W(a){var l=typeof a;return Array.isArray(a)?"array":a instanceof RegExp?"object":ve(l,a)?"symbol":l}function X(a){if(typeof a>"u"||a===null)return""+a;var l=W(a);if(l==="object"){if(a instanceof Date)return"date";if(a instanceof RegExp)return"regexp"}return l}function te(a){var l=X(a);switch(l){case"array":case"object":return"an "+l;case"boolean":case"date":case"regexp":return"a "+l;default:return l}}function Ee(a){return!a.constructor||!a.constructor.name?C:a.constructor.name}return k.checkPropTypes=o,k.resetWarningCache=o.resetWarningCache,k.PropTypes=k,k},xe}var Te,Ye;function Pt(){if(Ye)return Te;Ye=1;var e=De();function n(){}function i(){}return i.resetWarningCache=n,Te=function(){function r(s,u,d,v,E,y){if(y!==e){var C=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw C.name="Invariant Violation",C}}r.isRequired=r;function o(){return r}var t={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:i,resetWarningCache:n};return t.PropTypes=t,t},Te}if(process.env.NODE_ENV!=="production"){var wt=Xe(),jt=!0;Se.exports=_t()(wt.isElement,jt)}else Se.exports=Pt()();var Dt=Se.exports;const h=G.getDefaultExportFromCjs(Dt),Be={disabled:!1};var kt=process.env.NODE_ENV!=="production"?h.oneOfType([h.number,h.shape({enter:h.number,exit:h.number,appear:h.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&h.oneOfType([h.string,h.shape({enter:h.string,exit:h.string,active:h.string}),h.shape({enter:h.string,enterDone:h.string,enterActive:h.string,exit:h.string,exitDone:h.string,exitActive:h.string})]);const He=p.createContext(null);var Mt=function(n){return n.scrollTop},Z="unmounted",B="exited",U="entering",z="entered",ae="exiting",Y=function(e){ct(n,e);function n(r,o){var t;t=e.call(this,r,o)||this;var s=o,u=s&&!s.isMounting?r.enter:r.appear,d;return t.appearStatus=null,r.in?u?(d=B,t.appearStatus=U):d=z:r.unmountOnExit||r.mountOnEnter?d=Z:d=B,t.state={status:d},t.nextCallback=null,t}n.getDerivedStateFromProps=function(o,t){var s=o.in;return s&&t.status===Z?{status:B}:null};var i=n.prototype;return i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(o){var t=null;if(o!==this.props){var s=this.state.status;this.props.in?s!==U&&s!==z&&(t=U):(s===U||s===z)&&(t=ae)}this.updateStatus(!1,t)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var o=this.props.timeout,t,s,u;return t=s=u=o,o!=null&&typeof o!="number"&&(t=o.exit,s=o.enter,u=o.appear!==void 0?o.appear:s),{exit:t,enter:s,appear:u}},i.updateStatus=function(o,t){if(o===void 0&&(o=!1),t!==null)if(this.cancelNextCallback(),t===U){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:J.findDOMNode(this);s&&Mt(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===B&&this.setState({status:Z})},i.performEnter=function(o){var t=this,s=this.props.enter,u=this.context?this.context.isMounting:o,d=this.props.nodeRef?[u]:[J.findDOMNode(this),u],v=d[0],E=d[1],y=this.getTimeouts(),C=u?y.appear:y.enter;if(!o&&!s||Be.disabled){this.safeSetState({status:z},function(){t.props.onEntered(v)});return}this.props.onEnter(v,E),this.safeSetState({status:U},function(){t.props.onEntering(v,E),t.onTransitionEnd(C,function(){t.safeSetState({status:z},function(){t.props.onEntered(v,E)})})})},i.performExit=function(){var o=this,t=this.props.exit,s=this.getTimeouts(),u=this.props.nodeRef?void 0:J.findDOMNode(this);if(!t||Be.disabled){this.safeSetState({status:B},function(){o.props.onExited(u)});return}this.props.onExit(u),this.safeSetState({status:ae},function(){o.props.onExiting(u),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:B},function(){o.props.onExited(u)})})})},i.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(o,t){t=this.setNextCallback(t),this.setState(o,t)},i.setNextCallback=function(o){var t=this,s=!0;return this.nextCallback=function(u){s&&(s=!1,t.nextCallback=null,o(u))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},i.onTransitionEnd=function(o,t){this.setNextCallback(t);var s=this.props.nodeRef?this.props.nodeRef.current:J.findDOMNode(this),u=o==null&&!this.props.addEndListener;if(!s||u){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var d=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],v=d[0],E=d[1];this.props.addEndListener(v,E)}o!=null&&setTimeout(this.nextCallback,o)},i.render=function(){var o=this.state.status;if(o===Z)return null;var t=this.props,s=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var u=Ve(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return p.createElement(He.Provider,{value:null},typeof s=="function"?s(o,u):p.cloneElement(p.Children.only(s),u))},n}(p.Component);Y.contextType=He;Y.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:h.shape({current:typeof Element>"u"?h.any:function(e,n,i,r,o,t){var s=e[n];return h.instanceOf(s&&"ownerDocument"in s?s.ownerDocument.defaultView.Element:Element)(e,n,i,r,o,t)}}),children:h.oneOfType([h.func.isRequired,h.element.isRequired]).isRequired,in:h.bool,mountOnEnter:h.bool,unmountOnExit:h.bool,appear:h.bool,enter:h.bool,exit:h.bool,timeout:function(n){var i=kt;n.addEndListener||(i=i.isRequired);for(var r=arguments.length,o=new Array(r>1?r-1:0),t=1;t<r;t++)o[t-1]=arguments[t];return i.apply(void 0,[n].concat(o))},addEndListener:h.func,onEnter:h.func,onEntering:h.func,onEntered:h.func,onExit:h.func,onExiting:h.func,onExited:h.func}:{};function H(){}Y.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:H,onEntering:H,onEntered:H,onExit:H,onExiting:H,onExited:H};Y.UNMOUNTED=Z;Y.EXITED=B;Y.ENTERING=U;Y.ENTERED=z;Y.EXITING=ae;const At=Y,ue=!!(typeof window<"u"&&window.document&&window.document.createElement);var Ce=!1,_e=!1;try{var ge={get passive(){return Ce=!0},get once(){return _e=Ce=!0}};ue&&(window.addEventListener("test",ge,ge),window.removeEventListener("test",ge,!0))}catch{}function Je(e,n,i,r){if(r&&typeof r!="boolean"&&!_e){var o=r.once,t=r.capture,s=i;!_e&&o&&(s=i.__once||function u(d){this.removeEventListener(n,u,t),i.call(this,d)},i.__once=s),e.addEventListener(n,s,Ce?r:t)}e.addEventListener(n,i,r)}function Ze(e,n,i,r){var o=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(n,i,o),i.__once&&e.removeEventListener(n,i.__once,o)}function ke(e,n,i,r){return Je(e,n,i,r),function(){Ze(e,n,i,r)}}function It(e,n,i,r){if(i===void 0&&(i=!1),r===void 0&&(r=!0),e){var o=document.createEvent("HTMLEvents");o.initEvent(n,i,r),e.dispatchEvent(o)}}function Lt(e){var n=je(e,"transitionDuration")||"",i=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*i}function Nt(e,n,i){i===void 0&&(i=5);var r=!1,o=setTimeout(function(){r||It(e,"transitionend",!0)},n+i),t=ke(e,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(o),t()}}function Qe(e,n,i,r){i==null&&(i=Lt(e)||0);var o=Nt(e,i,r),t=ke(e,"transitionend",n);return function(){o(),t()}}function ze(e,n){const i=je(e,n)||"",r=i.indexOf("ms")===-1?1e3:1;return parseFloat(i)*r}function et(e,n){const i=ze(e,"transitionDuration"),r=ze(e,"transitionDelay"),o=Qe(e,t=>{t.target===e&&(o(),n(t))},i+r)}function tt(e){e.offsetHeight}const Ge=e=>!e||typeof e=="function"?e:n=>{e.current=n};function $t(e,n){const i=Ge(e),r=Ge(n);return o=>{i&&i(o),r&&r(o)}}function Q(e,n){return p.useMemo(()=>$t(e,n),[e,n])}function nt(e){return e&&"setState"in e?J.findDOMNode(e):e??null}const Wt=p.forwardRef(({onEnter:e,onEntering:n,onEntered:i,onExit:r,onExiting:o,onExited:t,addEndListener:s,children:u,childRef:d,...v},E)=>{const y=p.useRef(null),C=Q(y,d),k=N=>{C(nt(N))},M=N=>V=>{N&&y.current&&N(y.current,V)},j=p.useCallback(M(e),[e]),I=p.useCallback(M(n),[n]),L=p.useCallback(M(i),[i]),F=p.useCallback(M(r),[r]),A=p.useCallback(M(o),[o]),D=p.useCallback(M(t),[t]),c=p.useCallback(M(s),[s]);return G.jsxRuntimeExports.jsx(At,{ref:E,...v,onEnter:j,onEntered:L,onEntering:I,onExit:F,onExited:D,onExiting:A,addEndListener:c,nodeRef:y,children:typeof u=="function"?(N,V)=>u(N,{...V,ref:k}):p.cloneElement(u,{ref:k})})}),rt=Wt;function qt(e){const n=p.useRef(e);return p.useEffect(()=>{n.current=e},[e]),n}function Me(e){const n=qt(e);return p.useCallback(function(...i){return n.current&&n.current(...i)},[n])}function Ft(){return p.useState(null)}function Ut(){const e=p.useRef(!0),n=p.useRef(()=>e.current);return p.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),n.current}const Yt=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",Bt=typeof document<"u",Pe=Bt||Yt?p.useLayoutEffect:p.useEffect,zt={[U]:"show",[z]:"show"},ot=ie.forwardRef(({className:e,children:n,transitionClasses:i={},onEnter:r,...o},t)=>{const s={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...o},u=p.useCallback((d,v)=>{tt(d),r==null||r(d,v)},[r]);return G.jsxRuntimeExports.jsx(rt,{ref:t,addEndListener:et,...s,onEnter:u,childRef:n.ref,children:(d,v)=>ie.cloneElement(n,{...v,className:G.classNames("fade",e,n.props.className,zt[d],i[d])})})});ot.displayName="Fade";const Gt=ot;function Vt(e){const n=p.useRef(e);return n.current=e,n}function Xt(e){const n=Vt(e);p.useEffect(()=>()=>n.current(),[])}function Kt(e,n){if(e.contains)return e.contains(n);if(e.compareDocumentPosition)return e===n||!!(e.compareDocumentPosition(n)&16)}const it=p.createContext(ue?window:void 0);it.Provider;function at(){return p.useContext(it)}const Re=(e,n)=>ue?e==null?(n||we()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function Ht(e,n){const i=at(),[r,o]=p.useState(()=>Re(e,i==null?void 0:i.document));if(!r){const t=Re(e);t&&o(t)}return p.useEffect(()=>{n&&r&&n(r)},[n,r]),p.useEffect(()=>{const t=Re(e);t!==r&&o(t)},[e,r]),r}function st({children:e,in:n,onExited:i,mountOnEnter:r,unmountOnExit:o}){const t=p.useRef(null),s=p.useRef(n),u=Me(i);p.useEffect(()=>{n?s.current=!0:u(t.current)},[n,u]);const d=Q(t,e.ref),v=p.cloneElement(e,{ref:d});return n?v:o||!s.current&&r?null:v}const Jt=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];function Zt(e,n){if(e==null)return{};var i={},r=Object.keys(e),o,t;for(t=0;t<r.length;t++)o=r[t],!(n.indexOf(o)>=0)&&(i[o]=e[o]);return i}function Qt(e){let{onEnter:n,onEntering:i,onEntered:r,onExit:o,onExiting:t,onExited:s,addEndListener:u,children:d}=e,v=Zt(e,Jt);const E=p.useRef(null),y=Q(E,typeof d=="function"?null:d.ref),C=D=>c=>{D&&E.current&&D(E.current,c)},k=p.useCallback(C(n),[n]),M=p.useCallback(C(i),[i]),j=p.useCallback(C(r),[r]),I=p.useCallback(C(o),[o]),L=p.useCallback(C(t),[t]),F=p.useCallback(C(s),[s]),A=p.useCallback(C(u),[u]);return Object.assign({},v,{nodeRef:E},n&&{onEnter:k},i&&{onEntering:M},r&&{onEntered:j},o&&{onExit:I},t&&{onExiting:L},s&&{onExited:F},u&&{addEndListener:A},{children:typeof d=="function"?(D,c)=>d(D,Object.assign({},c,{ref:y})):p.cloneElement(d,{ref:y})})}const en=["component"];function tn(e,n){if(e==null)return{};var i={},r=Object.keys(e),o,t;for(t=0;t<r.length;t++)o=r[t],!(n.indexOf(o)>=0)&&(i[o]=e[o]);return i}const nn=ie.forwardRef((e,n)=>{let{component:i}=e,r=tn(e,en);const o=Qt(r);return G.jsxRuntimeExports.jsx(i,Object.assign({ref:n},o))}),rn=nn;function on({in:e,onTransition:n}){const i=p.useRef(null),r=p.useRef(!0),o=Me(n);return Pe(()=>{if(!i.current)return;let t=!1;return o({in:e,element:i.current,initial:r.current,isStale:()=>t}),()=>{t=!0}},[e,o]),Pe(()=>(r.current=!1,()=>{r.current=!0}),[]),i}function an({children:e,in:n,onExited:i,onEntered:r,transition:o}){const[t,s]=p.useState(!n);n&&t&&s(!1);const u=on({in:!!n,onTransition:v=>{const E=()=>{v.isStale()||(v.in?r==null||r(v.element,v.initial):(s(!0),i==null||i(v.element)))};Promise.resolve(o(v)).then(E,y=>{throw v.in||s(!0),y})}}),d=Q(u,e.ref);return t&&!n?null:p.cloneElement(e,{ref:d})}function sn(e,n,i){return e?G.jsxRuntimeExports.jsx(rn,Object.assign({},i,{component:e})):n?G.jsxRuntimeExports.jsx(an,Object.assign({},i,{transition:n})):G.jsxRuntimeExports.jsx(st,Object.assign({},i))}function un(e){return e.code==="Escape"||e.keyCode===27}function cn(e,n){return e.classList?!!n&&e.classList.contains(n):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+n+" ")!==-1}exports.ENTERED=z;exports.ENTERING=U;exports.EXITED=B;exports.EXITING=ae;exports.Fade=Gt;exports.NoopTransition=st;exports.PropTypes=h;exports.TransitionWrapper=rt;exports._objectWithoutPropertiesLoose=Ve;exports.addEventListener=Je;exports.canUseDOM=ue;exports.contains=Kt;exports.hasClass=cn;exports.isEscKey=un;exports.listen=ke;exports.ownerDocument=we;exports.removeEventListener=Ze;exports.renderTransition=sn;exports.safeFindDOMNode=nt;exports.style=je;exports.transitionEnd=Qe;exports.transitionEndListener=et;exports.triggerBrowserReflow=tt;exports.useBootstrapBreakpoints=pt;exports.useBootstrapMinBreakpoint=vt;exports.useBootstrapPrefix=dt;exports.useCallbackRef=Ft;exports.useEventCallback=Me;exports.useIsRTL=Et;exports.useIsomorphicEffect=Pe;exports.useMergedRefs=Q;exports.useMounted=Ut;exports.useWaitForDOMRef=Ht;exports.useWillUnmount=Xt;exports.useWindow=at;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -3,3 +3,4 @@ export { default as useNotifications } from './useNotifications/useNotifications
|
|
|
3
3
|
export { useAxios, cancelToken } from './useAxios/useAxios';
|
|
4
4
|
export { default as useConfirm } from './useConfirm/useConfirm';
|
|
5
5
|
export { default as useZodSchemaTypes } from './useZodSchemaTypes/useZodSchemaTypes';
|
|
6
|
+
export { default as useClickOutside } from './useClickOutside/useClickOutside';
|
package/dist/hooks.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ie=require("./InvalidFeedback.module-DrVBvau3.js"),Ve=require("./useConfirm-BCj1t5rw.js"),ze=require("react"),$e=require("./utils.cjs.js");var g;(function(r){r.assertEqual=n=>n;function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{const a={};for(const i of n)a[i]=i;return a},r.getValidEnumValues=n=>{const a=r.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(const o of a)i[o]=n[o];return r.objectValues(i)},r.objectValues=n=>r.objectKeys(n).map(function(a){return n[a]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const a=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},r.find=(n,a)=>{for(const i of n)if(a(i))return i},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function s(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}r.joinValues=s,r.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(g||(g={}));var be;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(be||(be={}));const u=g.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),P=r=>{switch(typeof r){case"undefined":return u.undefined;case"string":return u.string;case"number":return isNaN(r)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(r)?u.array:r===null?u.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?u.promise:typeof Map<"u"&&r instanceof Map?u.map:typeof Set<"u"&&r instanceof Set?u.set:typeof Date<"u"&&r instanceof Date?u.date:u.object;default:return u.unknown}},c=g.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"]),Le=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class O extends Error{constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(a){return a.message},s={_errors:[]},n=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)s._errors.push(t(i));else{let o=s,f=0;for(;f<i.path.length;){const d=i.path[f];f===i.path.length-1?(o[d]=o[d]||{_errors:[]},o[d]._errors.push(t(i))):o[d]=o[d]||{_errors:[]},o=o[d],f++}}};return n(this),s}toString(){return this.message}get message(){return JSON.stringify(this.issues,g.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},s=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):s.push(e(n));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}}O.create=r=>new O(r);const H=(r,e)=>{let t;switch(r.code){case c.invalid_type:r.received===u.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,g.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${g.joinValues(r.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${g.joinValues(r.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${g.joinValues(r.options)}, received '${r.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:g.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case c.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case c.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case c.not_finite:t="Number must be finite";break;default:t=e.defaultError,g.assertNever(r)}return{message:t}};let Ce=H;function De(r){Ce=r}function ue(){return Ce}const le=r=>{const{data:e,path:t,errorMaps:s,issueData:n}=r,a=[...t,...n.path||[]],i={...n,path:a};let o="";const f=s.filter(d=>!!d).slice().reverse();for(const d of f)o=d(i,{data:e,defaultError:o}).message;return{...n,path:a,message:n.message||o}},Ue=[];function l(r,e){const t=le({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,ue(),H].filter(s=>!!s)});r.common.issues.push(t)}class T{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const s=[];for(const n of t){if(n.status==="aborted")return m;n.status==="dirty"&&e.dirty(),s.push(n.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const n of t)s.push({key:await n.key,value:await n.value});return T.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const n of t){const{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return m;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(s[a.value]=i.value)}return{status:e.value,value:s}}}const m=Object.freeze({status:"aborted"}),Ne=r=>({status:"dirty",value:r}),Z=r=>({status:"valid",value:r}),ke=r=>r.status==="aborted",we=r=>r.status==="dirty",G=r=>r.status==="valid",fe=r=>typeof Promise<"u"&&r instanceof Promise;var h;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(h||(h={}));class R{constructor(e,t,s,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Ze=(r,e)=>{if(G(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new O(r.common.issues);return this._error=t,this._error}}};function y(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:s,description:n}=r;if(e&&(t||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,o)=>i.code!=="invalid_type"?{message:o.defaultError}:typeof o.data>"u"?{message:s??o.defaultError}:{message:t??o.defaultError},description:n}}class v{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}_getType(e){return P(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:P(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new T,ctx:{common:e.parent.common,data:e.data,parsedType:P(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(fe(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){var s;const n={common:{issues:[],async:(s=t==null?void 0:t.async)!==null&&s!==void 0?s:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:P(e)},a=this._parseSync({data:e,path:n.path,parent:n});return Ze(n,a)}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:P(e)},n=this._parse({data:e,path:s.path,parent:s}),a=await(fe(n)?n:Promise.resolve(n));return Ze(s,a)}refine(e,t){const s=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{const i=e(n),o=()=>a.addIssue({code:c.custom,...s(n)});return typeof Promise<"u"&&i instanceof Promise?i.then(f=>f?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((s,n)=>e(s)?!0:(n.addIssue(typeof t=="function"?t(s,n):t),!1))}_refinement(e){return new I({schema:this,typeName:p.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return A.create(this,this._def)}nullable(){return q.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return E.create(this,this._def)}promise(){return Y.create(this,this._def)}or(e){return F.create([this,e],this._def)}and(e){return ee.create(this,e,this._def)}transform(e){return new I({...y(this._def),schema:this,typeName:p.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new ae({...y(this._def),innerType:this,defaultValue:t,typeName:p.ZodDefault})}brand(){return new Ee({typeName:p.ZodBranded,type:this,...y(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ye({...y(this._def),innerType:this,catchValue:t,typeName:p.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return oe.create(this,e)}readonly(){return _e.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const qe=/^c[^\s-]{8,}$/i,Be=/^[a-z][a-z0-9]*$/,We=/^[0-9A-HJKMNP-TV-Z]{26}$/,Je=/^[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,Ye=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,He="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let xe;const Ge=/^(((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}))$/,Xe=/^(([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})))$/,Qe=r=>r.precision?r.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${r.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${r.precision}}Z$`):r.precision===0?r.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$"):r.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$");function Ke(r,e){return!!((e==="v4"||!e)&&Ge.test(r)||(e==="v6"||!e)&&Xe.test(r))}class N extends v{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:u.string,received:a.parsedType}),m}const s=new T;let n;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="max")e.data.length>a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(n=this._getOrReturnCtx(e,n),i?l(n,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&l(n,{code:c.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),s.dirty())}else if(a.kind==="email")Ye.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"email",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="emoji")xe||(xe=new RegExp(He,"u")),xe.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"emoji",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="uuid")Je.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"uuid",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid")qe.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"cuid",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid2")Be.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"cuid2",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="ulid")We.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"ulid",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),l(n,{validation:"url",code:c.invalid_string,message:a.message}),s.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"regex",code:c.invalid_string,message:a.message}),s.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(e,n),l(n,{code:c.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),s.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(n=this._getOrReturnCtx(e,n),l(n,{code:c.invalid_string,validation:{startsWith:a.value},message:a.message}),s.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(n=this._getOrReturnCtx(e,n),l(n,{code:c.invalid_string,validation:{endsWith:a.value},message:a.message}),s.dirty()):a.kind==="datetime"?Qe(a).test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:c.invalid_string,validation:"datetime",message:a.message}),s.dirty()):a.kind==="ip"?Ke(e.data,a.version)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"ip",code:c.invalid_string,message:a.message}),s.dirty()):g.assertNever(a);return{status:s.value,value:e.data}}_regex(e,t,s){return this.refinement(n=>e.test(n),{validation:t,code:c.invalid_string,...h.errToObj(s)})}_addCheck(e){return new N({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}datetime(e){var t;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,...h.errToObj(e==null?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...h.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new N({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new N({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new N({...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(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}N.create=r=>{var e;return new N({checks:[],typeName:p.ZodString,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...y(r)})};function Fe(r,e){const t=(r.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,n=t>s?t:s,a=parseInt(r.toFixed(n).replace(".","")),i=parseInt(e.toFixed(n).replace(".",""));return a%i/Math.pow(10,n)}class V extends v{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){const a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:u.number,received:a.parsedType}),m}let s;const n=new T;for(const a of this._def.checks)a.kind==="int"?g.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:c.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?Fe(e.data,a.value)!==0&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:c.not_finite,message:a.message}),n.dirty()):g.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,s,n){return new V({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:h.toString(n)}]})}_addCheck(e){return new V({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&g.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}}V.create=r=>new V({checks:[],typeName:p.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...y(r)});class z extends v{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)!==u.bigint){const a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:u.bigint,received:a.parsedType}),m}let s;const n=new T;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):g.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,s,n){return new z({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:h.toString(n)}]})}_addCheck(e){return new z({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}z.create=r=>{var e;return new z({checks:[],typeName:p.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...y(r)})};class X extends v{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:u.boolean,received:s.parsedType}),m}return Z(e.data)}}X.create=r=>new X({typeName:p.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...y(r)});class D extends v{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:u.date,received:a.parsedType}),m}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_date}),m}const s=new T;let n;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),s.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):g.assertNever(a);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new D({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}D.create=r=>new D({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:p.ZodDate,...y(r)});class he extends v{_parse(e){if(this._getType(e)!==u.symbol){const s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:u.symbol,received:s.parsedType}),m}return Z(e.data)}}he.create=r=>new he({typeName:p.ZodSymbol,...y(r)});class Q extends v{_parse(e){if(this._getType(e)!==u.undefined){const s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:u.undefined,received:s.parsedType}),m}return Z(e.data)}}Q.create=r=>new Q({typeName:p.ZodUndefined,...y(r)});class K extends v{_parse(e){if(this._getType(e)!==u.null){const s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:u.null,received:s.parsedType}),m}return Z(e.data)}}K.create=r=>new K({typeName:p.ZodNull,...y(r)});class J extends v{constructor(){super(...arguments),this._any=!0}_parse(e){return Z(e.data)}}J.create=r=>new J({typeName:p.ZodAny,...y(r)});class L extends v{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Z(e.data)}}L.create=r=>new L({typeName:p.ZodUnknown,...y(r)});class M extends v{_parse(e){const t=this._getOrReturnCtx(e);return l(t,{code:c.invalid_type,expected:u.never,received:t.parsedType}),m}}M.create=r=>new M({typeName:p.ZodNever,...y(r)});class pe extends v{_parse(e){if(this._getType(e)!==u.undefined){const s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:u.void,received:s.parsedType}),m}return Z(e.data)}}pe.create=r=>new pe({typeName:p.ZodVoid,...y(r)});class E extends v{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),n=this._def;if(t.parsedType!==u.array)return l(t,{code:c.invalid_type,expected:u.array,received:t.parsedType}),m;if(n.exactLength!==null){const i=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(i||o)&&(l(t,{code:i?c.too_big:c.too_small,minimum:o?n.exactLength.value:void 0,maximum:i?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),s.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(l(t,{code:c.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),s.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(l(t,{code:c.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>n.type._parseAsync(new R(t,i,t.path,o)))).then(i=>T.mergeArray(s,i));const a=[...t.data].map((i,o)=>n.type._parseSync(new R(t,i,t.path,o)));return T.mergeArray(s,a)}get element(){return this._def.type}min(e,t){return new E({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new E({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new E({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}}E.create=(r,e)=>new E({type:r,minLength:null,maxLength:null,exactLength:null,typeName:p.ZodArray,...y(e)});function B(r){if(r instanceof b){const e={};for(const t in r.shape){const s=r.shape[t];e[t]=A.create(B(s))}return new b({...r._def,shape:()=>e})}else return r instanceof E?new E({...r._def,type:B(r.element)}):r instanceof A?A.create(B(r.unwrap())):r instanceof q?q.create(B(r.unwrap())):r instanceof j?j.create(r.items.map(e=>B(e))):r}class b extends v{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=g.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==u.object){const d=this._getOrReturnCtx(e);return l(d,{code:c.invalid_type,expected:u.object,received:d.parsedType}),m}const{status:s,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof M&&this._def.unknownKeys==="strip"))for(const d in n.data)i.includes(d)||o.push(d);const f=[];for(const d of i){const _=a[d],S=n.data[d];f.push({key:{status:"valid",value:d},value:_._parse(new R(n,S,n.path,d)),alwaysSet:d in n.data})}if(this._def.catchall instanceof M){const d=this._def.unknownKeys;if(d==="passthrough")for(const _ of o)f.push({key:{status:"valid",value:_},value:{status:"valid",value:n.data[_]}});else if(d==="strict")o.length>0&&(l(n,{code:c.unrecognized_keys,keys:o}),s.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const d=this._def.catchall;for(const _ of o){const S=n.data[_];f.push({key:{status:"valid",value:_},value:d._parse(new R(n,S,n.path,_)),alwaysSet:_ in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const d=[];for(const _ of f){const S=await _.key;d.push({key:S,value:await _.value,alwaysSet:_.alwaysSet})}return d}).then(d=>T.mergeObjectSync(s,d)):T.mergeObjectSync(s,f)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new b({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var n,a,i,o;const f=(i=(a=(n=this._def).errorMap)===null||a===void 0?void 0:a.call(n,t,s).message)!==null&&i!==void 0?i:s.defaultError;return t.code==="unrecognized_keys"?{message:(o=h.errToObj(e).message)!==null&&o!==void 0?o:f}:{message:f}}}:{}})}strip(){return new b({...this._def,unknownKeys:"strip"})}passthrough(){return new b({...this._def,unknownKeys:"passthrough"})}extend(e){return new b({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new b({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:p.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new b({...this._def,catchall:e})}pick(e){const t={};return g.objectKeys(e).forEach(s=>{e[s]&&this.shape[s]&&(t[s]=this.shape[s])}),new b({...this._def,shape:()=>t})}omit(e){const t={};return g.objectKeys(this.shape).forEach(s=>{e[s]||(t[s]=this.shape[s])}),new b({...this._def,shape:()=>t})}deepPartial(){return B(this)}partial(e){const t={};return g.objectKeys(this.shape).forEach(s=>{const n=this.shape[s];e&&!e[s]?t[s]=n:t[s]=n.optional()}),new b({...this._def,shape:()=>t})}required(e){const t={};return g.objectKeys(this.shape).forEach(s=>{if(e&&!e[s])t[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof A;)a=a._def.innerType;t[s]=a}}),new b({...this._def,shape:()=>t})}keyof(){return Oe(g.objectKeys(this.shape))}}b.create=(r,e)=>new b({shape:()=>r,unknownKeys:"strip",catchall:M.create(),typeName:p.ZodObject,...y(e)});b.strictCreate=(r,e)=>new b({shape:()=>r,unknownKeys:"strict",catchall:M.create(),typeName:p.ZodObject,...y(e)});b.lazycreate=(r,e)=>new b({shape:r,unknownKeys:"strip",catchall:M.create(),typeName:p.ZodObject,...y(e)});class F extends v{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;function n(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new O(o.ctx.common.issues));return l(t,{code:c.invalid_union,unionErrors:i}),m}if(t.common.async)return Promise.all(s.map(async a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a;const i=[];for(const f of s){const d={...t,common:{...t.common,issues:[]},parent:null},_=f._parseSync({data:t.data,path:t.path,parent:d});if(_.status==="valid")return _;_.status==="dirty"&&!a&&(a={result:_,ctx:d}),d.common.issues.length&&i.push(d.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(f=>new O(f));return l(t,{code:c.invalid_union,unionErrors:o}),m}}get options(){return this._def.options}}F.create=(r,e)=>new F({options:r,typeName:p.ZodUnion,...y(e)});const de=r=>r instanceof re?de(r.schema):r instanceof I?de(r.innerType()):r instanceof se?[r.value]:r instanceof $?r.options:r instanceof ne?Object.keys(r.enum):r instanceof ae?de(r._def.innerType):r instanceof Q?[void 0]:r instanceof K?[null]:null;class ge extends v{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return l(t,{code:c.invalid_type,expected:u.object,received:t.parsedType}),m;const s=this.discriminator,n=t.data[s],a=this.optionsMap.get(n);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(l(t,{code:c.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),m)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,s){const n=new Map;for(const a of t){const i=de(a.shape[e]);if(!i)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of i){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,a)}}return new ge({typeName:p.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...y(s)})}}function Te(r,e){const t=P(r),s=P(e);if(r===e)return{valid:!0,data:r};if(t===u.object&&s===u.object){const n=g.objectKeys(e),a=g.objectKeys(r).filter(o=>n.indexOf(o)!==-1),i={...r,...e};for(const o of a){const f=Te(r[o],e[o]);if(!f.valid)return{valid:!1};i[o]=f.data}return{valid:!0,data:i}}else if(t===u.array&&s===u.array){if(r.length!==e.length)return{valid:!1};const n=[];for(let a=0;a<r.length;a++){const i=r[a],o=e[a],f=Te(i,o);if(!f.valid)return{valid:!1};n.push(f.data)}return{valid:!0,data:n}}else return t===u.date&&s===u.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class ee extends v{_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=(a,i)=>{if(ke(a)||ke(i))return m;const o=Te(a.value,i.value);return o.valid?((we(a)||we(i))&&t.dirty(),{status:t.value,value:o.data}):(l(s,{code:c.invalid_intersection_types}),m)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}ee.create=(r,e,t)=>new ee({left:r,right:e,typeName:p.ZodIntersection,...y(t)});class j extends v{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.array)return l(s,{code:c.invalid_type,expected:u.array,received:s.parsedType}),m;if(s.data.length<this._def.items.length)return l(s,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m;!this._def.rest&&s.data.length>this._def.items.length&&(l(s,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...s.data].map((i,o)=>{const f=this._def.items[o]||this._def.rest;return f?f._parse(new R(s,i,s.path,o)):null}).filter(i=>!!i);return s.common.async?Promise.all(a).then(i=>T.mergeArray(t,i)):T.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new j({...this._def,rest:e})}}j.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new j({items:r,typeName:p.ZodTuple,rest:null,...y(e)})};class te extends v{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.object)return l(s,{code:c.invalid_type,expected:u.object,received:s.parsedType}),m;const n=[],a=this._def.keyType,i=this._def.valueType;for(const o in s.data)n.push({key:a._parse(new R(s,o,s.path,o)),value:i._parse(new R(s,s.data[o],s.path,o))});return s.common.async?T.mergeObjectAsync(t,n):T.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,s){return t instanceof v?new te({keyType:e,valueType:t,typeName:p.ZodRecord,...y(s)}):new te({keyType:N.create(),valueType:e,typeName:p.ZodRecord,...y(t)})}}class me extends v{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.map)return l(s,{code:c.invalid_type,expected:u.map,received:s.parsedType}),m;const n=this._def.keyType,a=this._def.valueType,i=[...s.data.entries()].map(([o,f],d)=>({key:n._parse(new R(s,o,s.path,[d,"key"])),value:a._parse(new R(s,f,s.path,[d,"value"]))}));if(s.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const f of i){const d=await f.key,_=await f.value;if(d.status==="aborted"||_.status==="aborted")return m;(d.status==="dirty"||_.status==="dirty")&&t.dirty(),o.set(d.value,_.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const f of i){const d=f.key,_=f.value;if(d.status==="aborted"||_.status==="aborted")return m;(d.status==="dirty"||_.status==="dirty")&&t.dirty(),o.set(d.value,_.value)}return{status:t.value,value:o}}}}me.create=(r,e,t)=>new me({valueType:e,keyType:r,typeName:p.ZodMap,...y(t)});class U extends v{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.set)return l(s,{code:c.invalid_type,expected:u.set,received:s.parsedType}),m;const n=this._def;n.minSize!==null&&s.data.size<n.minSize.value&&(l(s,{code:c.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&s.data.size>n.maxSize.value&&(l(s,{code:c.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const a=this._def.valueType;function i(f){const d=new Set;for(const _ of f){if(_.status==="aborted")return m;_.status==="dirty"&&t.dirty(),d.add(_.value)}return{status:t.value,value:d}}const o=[...s.data.values()].map((f,d)=>a._parse(new R(s,f,s.path,d)));return s.common.async?Promise.all(o).then(f=>i(f)):i(o)}min(e,t){return new U({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new U({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}U.create=(r,e)=>new U({valueType:r,minSize:null,maxSize:null,typeName:p.ZodSet,...y(e)});class W extends v{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.function)return l(t,{code:c.invalid_type,expected:u.function,received:t.parsedType}),m;function s(o,f){return le({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ue(),H].filter(d=>!!d),issueData:{code:c.invalid_arguments,argumentsError:f}})}function n(o,f){return le({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ue(),H].filter(d=>!!d),issueData:{code:c.invalid_return_type,returnTypeError:f}})}const a={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof Y){const o=this;return Z(async function(...f){const d=new O([]),_=await o._def.args.parseAsync(f,a).catch(ce=>{throw d.addIssue(s(f,ce)),d}),S=await Reflect.apply(i,this,_);return await o._def.returns._def.type.parseAsync(S,a).catch(ce=>{throw d.addIssue(n(S,ce)),d})})}else{const o=this;return Z(function(...f){const d=o._def.args.safeParse(f,a);if(!d.success)throw new O([s(f,d.error)]);const _=Reflect.apply(i,this,d.data),S=o._def.returns.safeParse(_,a);if(!S.success)throw new O([n(_,S.error)]);return S.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new W({...this._def,args:j.create(e).rest(L.create())})}returns(e){return new W({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new W({args:e||j.create([]).rest(L.create()),returns:t||L.create(),typeName:p.ZodFunction,...y(s)})}}class re extends v{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}re.create=(r,e)=>new re({getter:r,typeName:p.ZodLazy,...y(e)});class se extends v{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return l(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}se.create=(r,e)=>new se({value:r,typeName:p.ZodLiteral,...y(e)});function Oe(r,e){return new $({values:r,typeName:p.ZodEnum,...y(e)})}class $ extends v{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return l(t,{expected:g.joinValues(s),received:t.parsedType,code:c.invalid_type}),m}if(this._def.values.indexOf(e.data)===-1){const t=this._getOrReturnCtx(e),s=this._def.values;return l(t,{received:t.data,code:c.invalid_enum_value,options:s}),m}return Z(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return $.create(e)}exclude(e){return $.create(this.options.filter(t=>!e.includes(t)))}}$.create=Oe;class ne extends v{_parse(e){const t=g.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==u.string&&s.parsedType!==u.number){const n=g.objectValues(t);return l(s,{expected:g.joinValues(n),received:s.parsedType,code:c.invalid_type}),m}if(t.indexOf(e.data)===-1){const n=g.objectValues(t);return l(s,{received:s.data,code:c.invalid_enum_value,options:n}),m}return Z(e.data)}get enum(){return this._def.values}}ne.create=(r,e)=>new ne({values:r,typeName:p.ZodNativeEnum,...y(e)});class Y extends v{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return l(t,{code:c.invalid_type,expected:u.promise,received:t.parsedType}),m;const s=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return Z(s.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Y.create=(r,e)=>new Y({type:r,typeName:p.ZodPromise,...y(e)});class I extends v{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===p.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:i=>{l(s,i),i.fatal?t.abort():t.dirty()},get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){const i=n.transform(s.data,a);return s.common.issues.length?{status:"dirty",value:s.data}:s.common.async?Promise.resolve(i).then(o=>this._def.schema._parseAsync({data:o,path:s.path,parent:s})):this._def.schema._parseSync({data:i,path:s.path,parent:s})}if(n.type==="refinement"){const i=o=>{const f=n.refinement(o,a);if(s.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(s.common.async===!1){const o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(s.common.async===!1){const i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!G(i))return i;const o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>G(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):i);g.assertNever(n)}}I.create=(r,e,t)=>new I({schema:r,typeName:p.ZodEffects,effect:e,...y(t)});I.createWithPreprocess=(r,e,t)=>new I({schema:e,effect:{type:"preprocess",transform:r},typeName:p.ZodEffects,...y(t)});class A extends v{_parse(e){return this._getType(e)===u.undefined?Z(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}A.create=(r,e)=>new A({innerType:r,typeName:p.ZodOptional,...y(e)});class q extends v{_parse(e){return this._getType(e)===u.null?Z(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}q.create=(r,e)=>new q({innerType:r,typeName:p.ZodNullable,...y(e)});class ae extends v{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===u.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ae.create=(r,e)=>new ae({innerType:r,typeName:p.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...y(e)});class ye extends v{_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return fe(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new O(s.common.issues)},input:s.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new O(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}ye.create=(r,e)=>new ye({innerType:r,typeName:p.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...y(e)});class ve extends v{_parse(e){if(this._getType(e)!==u.nan){const s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:u.nan,received:s.parsedType}),m}return{status:"valid",value:e.data}}}ve.create=r=>new ve({typeName:p.ZodNaN,...y(r)});const et=Symbol("zod_brand");class Ee extends v{_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}}class oe extends v{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),Ne(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})})();{const n=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:s.path,parent:s})}}static create(e,t){return new oe({in:e,out:t,typeName:p.ZodPipeline})}}class _e extends v{_parse(e){const t=this._def.innerType._parse(e);return G(t)&&(t.value=Object.freeze(t.value)),t}}_e.create=(r,e)=>new _e({innerType:r,typeName:p.ZodReadonly,...y(e)});const Ie=(r,e={},t)=>r?J.create().superRefine((s,n)=>{var a,i;if(!r(s)){const o=typeof e=="function"?e(s):typeof e=="string"?{message:e}:e,f=(i=(a=o.fatal)!==null&&a!==void 0?a:t)!==null&&i!==void 0?i:!0,d=typeof o=="string"?{message:o}:o;n.addIssue({code:"custom",...d,fatal:f})}}):J.create(),tt={object:b.lazycreate};var p;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(p||(p={}));const rt=(r,e={message:`Input not instance of ${r.name}`})=>Ie(t=>t instanceof r,e),Re=N.create,je=V.create,st=ve.create,nt=z.create,Ae=X.create,at=D.create,it=he.create,ot=Q.create,ct=K.create,dt=J.create,ut=L.create,lt=M.create,ft=pe.create,ht=E.create,pt=b.create,mt=b.strictCreate,yt=F.create,vt=ge.create,_t=ee.create,gt=j.create,xt=te.create,bt=me.create,kt=U.create,wt=W.create,Tt=re.create,Zt=se.create,St=$.create,Ct=ne.create,Nt=Y.create,Se=I.create,Ot=A.create,Et=q.create,It=I.createWithPreprocess,Rt=oe.create,jt=()=>Re().optional(),At=()=>je().optional(),Mt=()=>Ae().optional(),Pt={string:r=>N.create({...r,coerce:!0}),number:r=>V.create({...r,coerce:!0}),boolean:r=>X.create({...r,coerce:!0}),bigint:r=>z.create({...r,coerce:!0}),date:r=>D.create({...r,coerce:!0})},Vt=m;var C=Object.freeze({__proto__:null,defaultErrorMap:H,setErrorMap:De,getErrorMap:ue,makeIssue:le,EMPTY_PATH:Ue,addIssueToContext:l,ParseStatus:T,INVALID:m,DIRTY:Ne,OK:Z,isAborted:ke,isDirty:we,isValid:G,isAsync:fe,get util(){return g},get objectUtil(){return be},ZodParsedType:u,getParsedType:P,ZodType:v,ZodString:N,ZodNumber:V,ZodBigInt:z,ZodBoolean:X,ZodDate:D,ZodSymbol:he,ZodUndefined:Q,ZodNull:K,ZodAny:J,ZodUnknown:L,ZodNever:M,ZodVoid:pe,ZodArray:E,ZodObject:b,ZodUnion:F,ZodDiscriminatedUnion:ge,ZodIntersection:ee,ZodTuple:j,ZodRecord:te,ZodMap:me,ZodSet:U,ZodFunction:W,ZodLazy:re,ZodLiteral:se,ZodEnum:$,ZodNativeEnum:ne,ZodPromise:Y,ZodEffects:I,ZodTransformer:I,ZodOptional:A,ZodNullable:q,ZodDefault:ae,ZodCatch:ye,ZodNaN:ve,BRAND:et,ZodBranded:Ee,ZodPipeline:oe,ZodReadonly:_e,custom:Ie,Schema:v,ZodSchema:v,late:tt,get ZodFirstPartyTypeKind(){return p},coerce:Pt,any:dt,array:ht,bigint:nt,boolean:Ae,date:at,discriminatedUnion:vt,effect:Se,enum:St,function:wt,instanceof:rt,intersection:_t,lazy:Tt,literal:Zt,map:bt,nan:st,nativeEnum:Ct,never:lt,null:ct,nullable:Et,number:je,object:pt,oboolean:Mt,onumber:At,optional:Ot,ostring:jt,pipeline:Rt,preprocess:It,promise:Nt,record:xt,set:kt,strictObject:mt,string:Re,symbol:it,transformer:Se,tuple:gt,undefined:ot,union:yt,unknown:ut,void:ft,NEVER:Vt,ZodIssueCode:c,quotelessJson:Le,ZodError:O});const zt=()=>{const{formValidationTexts:r}=ze.useContext(ie.LuminusComponentsContext),e=x=>(x!=null&&x.useCoerce?C.coerce:C).string({invalid_type_error:r.required}).transform(w=>w??null),t=x=>e(x).nullable().optional().transform(k=>k??null),s=x=>(x!=null&&x.useCoerce?C.coerce:C).number({invalid_type_error:r.required}).transform(w=>w??null),n=x=>s(x).nullable().optional().transform(k=>k??null),a=x=>(x!=null&&x.useCoerce?C.coerce:C).boolean({invalid_type_error:r.required}).transform(k=>k??null),i=x=>(x!=null&&x.useCoerce?C.coerce:C).string({invalid_type_error:r.required}).refine($e.isISODate,{message:r.invalidDate}).transform(w=>w??null),o=x=>i(x).nullable().transform(k=>k??null),f=(x,k)=>C.enum(x,{invalid_type_error:r.required}).transform(Pe=>Pe??null);return{zString:t,zStringRequired:e,zNumber:n,zNumberRequired:s,zBool:a,zDate:o,zDateRequired:i,zEnum:(x,k)=>f(x).nullable().transform(w=>w??null),zEnumRequired:f,zObjectIdInt:x=>C.object({id:n({useCoerce:!0})}).nullable().transform(w=>w??null),zObjectIdIntRequired:x=>C.object({id:s()}).transform(w=>w??null),zObjectIdStr:x=>C.object({id:t({useCoerce:!0})}).nullable().transform(w=>w??null),zObjectIdStrRequired:x=>C.object({id:e()}).transform(w=>w??null)}};exports.cancelToken=ie.cancelToken;exports.useAuth=ie.useAuth;exports.useAxios=ie.useAxios;exports.useNotifications=ie.useNotifications;exports.useConfirm=Ve.useConfirm;exports.useZodSchemaTypes=zt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ie=require("./SimplePicker.module-DnODgYFl.js"),Ve=require("./useConfirm-5bscOMVZ.js"),ze=require("react"),$e=require("./utils.cjs.js"),Le=require("./useClickOutside-DsVG12Cs.js");var g;(function(r){r.assertEqual=n=>n;function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{const a={};for(const i of n)a[i]=i;return a},r.getValidEnumValues=n=>{const a=r.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(const o of a)i[o]=n[o];return r.objectValues(i)},r.objectValues=n=>r.objectKeys(n).map(function(a){return n[a]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const a=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},r.find=(n,a)=>{for(const i of n)if(a(i))return i},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function s(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}r.joinValues=s,r.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(g||(g={}));var be;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(be||(be={}));const u=g.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),P=r=>{switch(typeof r){case"undefined":return u.undefined;case"string":return u.string;case"number":return isNaN(r)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(r)?u.array:r===null?u.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?u.promise:typeof Map<"u"&&r instanceof Map?u.map:typeof Set<"u"&&r instanceof Set?u.set:typeof Date<"u"&&r instanceof Date?u.date:u.object;default:return u.unknown}},c=g.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"]),De=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class N extends Error{constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(a){return a.message},s={_errors:[]},n=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)s._errors.push(t(i));else{let o=s,f=0;for(;f<i.path.length;){const d=i.path[f];f===i.path.length-1?(o[d]=o[d]||{_errors:[]},o[d]._errors.push(t(i))):o[d]=o[d]||{_errors:[]},o=o[d],f++}}};return n(this),s}toString(){return this.message}get message(){return JSON.stringify(this.issues,g.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},s=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):s.push(e(n));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}}N.create=r=>new N(r);const H=(r,e)=>{let t;switch(r.code){case c.invalid_type:r.received===u.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,g.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${g.joinValues(r.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${g.joinValues(r.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${g.joinValues(r.options)}, received '${r.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:g.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case c.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case c.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case c.not_finite:t="Number must be finite";break;default:t=e.defaultError,g.assertNever(r)}return{message:t}};let Ce=H;function Ue(r){Ce=r}function ue(){return Ce}const le=r=>{const{data:e,path:t,errorMaps:s,issueData:n}=r,a=[...t,...n.path||[]],i={...n,path:a};let o="";const f=s.filter(d=>!!d).slice().reverse();for(const d of f)o=d(i,{data:e,defaultError:o}).message;return{...n,path:a,message:n.message||o}},qe=[];function l(r,e){const t=le({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,ue(),H].filter(s=>!!s)});r.common.issues.push(t)}class T{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const s=[];for(const n of t){if(n.status==="aborted")return m;n.status==="dirty"&&e.dirty(),s.push(n.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const n of t)s.push({key:await n.key,value:await n.value});return T.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const n of t){const{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return m;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(s[a.value]=i.value)}return{status:e.value,value:s}}}const m=Object.freeze({status:"aborted"}),Oe=r=>({status:"dirty",value:r}),Z=r=>({status:"valid",value:r}),ke=r=>r.status==="aborted",we=r=>r.status==="dirty",G=r=>r.status==="valid",fe=r=>typeof Promise<"u"&&r instanceof Promise;var h;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(h||(h={}));class R{constructor(e,t,s,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Ze=(r,e)=>{if(G(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new N(r.common.issues);return this._error=t,this._error}}};function y(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:s,description:n}=r;if(e&&(t||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,o)=>i.code!=="invalid_type"?{message:o.defaultError}:typeof o.data>"u"?{message:s??o.defaultError}:{message:t??o.defaultError},description:n}}class v{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}_getType(e){return P(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:P(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new T,ctx:{common:e.parent.common,data:e.data,parsedType:P(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(fe(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){var s;const n={common:{issues:[],async:(s=t==null?void 0:t.async)!==null&&s!==void 0?s:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:P(e)},a=this._parseSync({data:e,path:n.path,parent:n});return Ze(n,a)}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:P(e)},n=this._parse({data:e,path:s.path,parent:s}),a=await(fe(n)?n:Promise.resolve(n));return Ze(s,a)}refine(e,t){const s=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{const i=e(n),o=()=>a.addIssue({code:c.custom,...s(n)});return typeof Promise<"u"&&i instanceof Promise?i.then(f=>f?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((s,n)=>e(s)?!0:(n.addIssue(typeof t=="function"?t(s,n):t),!1))}_refinement(e){return new I({schema:this,typeName:p.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return A.create(this,this._def)}nullable(){return q.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return E.create(this,this._def)}promise(){return Y.create(this,this._def)}or(e){return F.create([this,e],this._def)}and(e){return ee.create(this,e,this._def)}transform(e){return new I({...y(this._def),schema:this,typeName:p.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new ae({...y(this._def),innerType:this,defaultValue:t,typeName:p.ZodDefault})}brand(){return new Ee({typeName:p.ZodBranded,type:this,...y(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ye({...y(this._def),innerType:this,catchValue:t,typeName:p.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return oe.create(this,e)}readonly(){return _e.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Be=/^c[^\s-]{8,}$/i,We=/^[a-z][a-z0-9]*$/,Je=/^[0-9A-HJKMNP-TV-Z]{26}$/,Ye=/^[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,He=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ge="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let xe;const Xe=/^(((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}))$/,Qe=/^(([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})))$/,Ke=r=>r.precision?r.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${r.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${r.precision}}Z$`):r.precision===0?r.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$"):r.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$");function Fe(r,e){return!!((e==="v4"||!e)&&Xe.test(r)||(e==="v6"||!e)&&Qe.test(r))}class O extends v{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:u.string,received:a.parsedType}),m}const s=new T;let n;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="max")e.data.length>a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(n=this._getOrReturnCtx(e,n),i?l(n,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&l(n,{code:c.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),s.dirty())}else if(a.kind==="email")He.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"email",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="emoji")xe||(xe=new RegExp(Ge,"u")),xe.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"emoji",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="uuid")Ye.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"uuid",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid")Be.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"cuid",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid2")We.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"cuid2",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="ulid")Je.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"ulid",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),l(n,{validation:"url",code:c.invalid_string,message:a.message}),s.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"regex",code:c.invalid_string,message:a.message}),s.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(e,n),l(n,{code:c.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),s.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(n=this._getOrReturnCtx(e,n),l(n,{code:c.invalid_string,validation:{startsWith:a.value},message:a.message}),s.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(n=this._getOrReturnCtx(e,n),l(n,{code:c.invalid_string,validation:{endsWith:a.value},message:a.message}),s.dirty()):a.kind==="datetime"?Ke(a).test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:c.invalid_string,validation:"datetime",message:a.message}),s.dirty()):a.kind==="ip"?Fe(e.data,a.version)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"ip",code:c.invalid_string,message:a.message}),s.dirty()):g.assertNever(a);return{status:s.value,value:e.data}}_regex(e,t,s){return this.refinement(n=>e.test(n),{validation:t,code:c.invalid_string,...h.errToObj(s)})}_addCheck(e){return new O({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}datetime(e){var t;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,...h.errToObj(e==null?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...h.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new O({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new O({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new O({...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(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}O.create=r=>{var e;return new O({checks:[],typeName:p.ZodString,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...y(r)})};function et(r,e){const t=(r.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,n=t>s?t:s,a=parseInt(r.toFixed(n).replace(".","")),i=parseInt(e.toFixed(n).replace(".",""));return a%i/Math.pow(10,n)}class V extends v{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){const a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:u.number,received:a.parsedType}),m}let s;const n=new T;for(const a of this._def.checks)a.kind==="int"?g.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:c.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?et(e.data,a.value)!==0&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:c.not_finite,message:a.message}),n.dirty()):g.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,s,n){return new V({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:h.toString(n)}]})}_addCheck(e){return new V({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&g.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}}V.create=r=>new V({checks:[],typeName:p.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...y(r)});class z extends v{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)!==u.bigint){const a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:u.bigint,received:a.parsedType}),m}let s;const n=new T;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):g.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,s,n){return new z({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:h.toString(n)}]})}_addCheck(e){return new z({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}z.create=r=>{var e;return new z({checks:[],typeName:p.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...y(r)})};class X extends v{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:u.boolean,received:s.parsedType}),m}return Z(e.data)}}X.create=r=>new X({typeName:p.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...y(r)});class D extends v{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:u.date,received:a.parsedType}),m}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_date}),m}const s=new T;let n;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),s.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):g.assertNever(a);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new D({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}D.create=r=>new D({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:p.ZodDate,...y(r)});class he extends v{_parse(e){if(this._getType(e)!==u.symbol){const s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:u.symbol,received:s.parsedType}),m}return Z(e.data)}}he.create=r=>new he({typeName:p.ZodSymbol,...y(r)});class Q extends v{_parse(e){if(this._getType(e)!==u.undefined){const s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:u.undefined,received:s.parsedType}),m}return Z(e.data)}}Q.create=r=>new Q({typeName:p.ZodUndefined,...y(r)});class K extends v{_parse(e){if(this._getType(e)!==u.null){const s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:u.null,received:s.parsedType}),m}return Z(e.data)}}K.create=r=>new K({typeName:p.ZodNull,...y(r)});class J extends v{constructor(){super(...arguments),this._any=!0}_parse(e){return Z(e.data)}}J.create=r=>new J({typeName:p.ZodAny,...y(r)});class L extends v{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Z(e.data)}}L.create=r=>new L({typeName:p.ZodUnknown,...y(r)});class M extends v{_parse(e){const t=this._getOrReturnCtx(e);return l(t,{code:c.invalid_type,expected:u.never,received:t.parsedType}),m}}M.create=r=>new M({typeName:p.ZodNever,...y(r)});class pe extends v{_parse(e){if(this._getType(e)!==u.undefined){const s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:u.void,received:s.parsedType}),m}return Z(e.data)}}pe.create=r=>new pe({typeName:p.ZodVoid,...y(r)});class E extends v{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),n=this._def;if(t.parsedType!==u.array)return l(t,{code:c.invalid_type,expected:u.array,received:t.parsedType}),m;if(n.exactLength!==null){const i=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(i||o)&&(l(t,{code:i?c.too_big:c.too_small,minimum:o?n.exactLength.value:void 0,maximum:i?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),s.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(l(t,{code:c.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),s.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(l(t,{code:c.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>n.type._parseAsync(new R(t,i,t.path,o)))).then(i=>T.mergeArray(s,i));const a=[...t.data].map((i,o)=>n.type._parseSync(new R(t,i,t.path,o)));return T.mergeArray(s,a)}get element(){return this._def.type}min(e,t){return new E({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new E({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new E({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}}E.create=(r,e)=>new E({type:r,minLength:null,maxLength:null,exactLength:null,typeName:p.ZodArray,...y(e)});function B(r){if(r instanceof b){const e={};for(const t in r.shape){const s=r.shape[t];e[t]=A.create(B(s))}return new b({...r._def,shape:()=>e})}else return r instanceof E?new E({...r._def,type:B(r.element)}):r instanceof A?A.create(B(r.unwrap())):r instanceof q?q.create(B(r.unwrap())):r instanceof j?j.create(r.items.map(e=>B(e))):r}class b extends v{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=g.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==u.object){const d=this._getOrReturnCtx(e);return l(d,{code:c.invalid_type,expected:u.object,received:d.parsedType}),m}const{status:s,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof M&&this._def.unknownKeys==="strip"))for(const d in n.data)i.includes(d)||o.push(d);const f=[];for(const d of i){const _=a[d],S=n.data[d];f.push({key:{status:"valid",value:d},value:_._parse(new R(n,S,n.path,d)),alwaysSet:d in n.data})}if(this._def.catchall instanceof M){const d=this._def.unknownKeys;if(d==="passthrough")for(const _ of o)f.push({key:{status:"valid",value:_},value:{status:"valid",value:n.data[_]}});else if(d==="strict")o.length>0&&(l(n,{code:c.unrecognized_keys,keys:o}),s.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const d=this._def.catchall;for(const _ of o){const S=n.data[_];f.push({key:{status:"valid",value:_},value:d._parse(new R(n,S,n.path,_)),alwaysSet:_ in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const d=[];for(const _ of f){const S=await _.key;d.push({key:S,value:await _.value,alwaysSet:_.alwaysSet})}return d}).then(d=>T.mergeObjectSync(s,d)):T.mergeObjectSync(s,f)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new b({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var n,a,i,o;const f=(i=(a=(n=this._def).errorMap)===null||a===void 0?void 0:a.call(n,t,s).message)!==null&&i!==void 0?i:s.defaultError;return t.code==="unrecognized_keys"?{message:(o=h.errToObj(e).message)!==null&&o!==void 0?o:f}:{message:f}}}:{}})}strip(){return new b({...this._def,unknownKeys:"strip"})}passthrough(){return new b({...this._def,unknownKeys:"passthrough"})}extend(e){return new b({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new b({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:p.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new b({...this._def,catchall:e})}pick(e){const t={};return g.objectKeys(e).forEach(s=>{e[s]&&this.shape[s]&&(t[s]=this.shape[s])}),new b({...this._def,shape:()=>t})}omit(e){const t={};return g.objectKeys(this.shape).forEach(s=>{e[s]||(t[s]=this.shape[s])}),new b({...this._def,shape:()=>t})}deepPartial(){return B(this)}partial(e){const t={};return g.objectKeys(this.shape).forEach(s=>{const n=this.shape[s];e&&!e[s]?t[s]=n:t[s]=n.optional()}),new b({...this._def,shape:()=>t})}required(e){const t={};return g.objectKeys(this.shape).forEach(s=>{if(e&&!e[s])t[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof A;)a=a._def.innerType;t[s]=a}}),new b({...this._def,shape:()=>t})}keyof(){return Ne(g.objectKeys(this.shape))}}b.create=(r,e)=>new b({shape:()=>r,unknownKeys:"strip",catchall:M.create(),typeName:p.ZodObject,...y(e)});b.strictCreate=(r,e)=>new b({shape:()=>r,unknownKeys:"strict",catchall:M.create(),typeName:p.ZodObject,...y(e)});b.lazycreate=(r,e)=>new b({shape:r,unknownKeys:"strip",catchall:M.create(),typeName:p.ZodObject,...y(e)});class F extends v{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;function n(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new N(o.ctx.common.issues));return l(t,{code:c.invalid_union,unionErrors:i}),m}if(t.common.async)return Promise.all(s.map(async a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a;const i=[];for(const f of s){const d={...t,common:{...t.common,issues:[]},parent:null},_=f._parseSync({data:t.data,path:t.path,parent:d});if(_.status==="valid")return _;_.status==="dirty"&&!a&&(a={result:_,ctx:d}),d.common.issues.length&&i.push(d.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(f=>new N(f));return l(t,{code:c.invalid_union,unionErrors:o}),m}}get options(){return this._def.options}}F.create=(r,e)=>new F({options:r,typeName:p.ZodUnion,...y(e)});const de=r=>r instanceof re?de(r.schema):r instanceof I?de(r.innerType()):r instanceof se?[r.value]:r instanceof $?r.options:r instanceof ne?Object.keys(r.enum):r instanceof ae?de(r._def.innerType):r instanceof Q?[void 0]:r instanceof K?[null]:null;class ge extends v{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return l(t,{code:c.invalid_type,expected:u.object,received:t.parsedType}),m;const s=this.discriminator,n=t.data[s],a=this.optionsMap.get(n);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(l(t,{code:c.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),m)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,s){const n=new Map;for(const a of t){const i=de(a.shape[e]);if(!i)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of i){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,a)}}return new ge({typeName:p.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...y(s)})}}function Te(r,e){const t=P(r),s=P(e);if(r===e)return{valid:!0,data:r};if(t===u.object&&s===u.object){const n=g.objectKeys(e),a=g.objectKeys(r).filter(o=>n.indexOf(o)!==-1),i={...r,...e};for(const o of a){const f=Te(r[o],e[o]);if(!f.valid)return{valid:!1};i[o]=f.data}return{valid:!0,data:i}}else if(t===u.array&&s===u.array){if(r.length!==e.length)return{valid:!1};const n=[];for(let a=0;a<r.length;a++){const i=r[a],o=e[a],f=Te(i,o);if(!f.valid)return{valid:!1};n.push(f.data)}return{valid:!0,data:n}}else return t===u.date&&s===u.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class ee extends v{_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=(a,i)=>{if(ke(a)||ke(i))return m;const o=Te(a.value,i.value);return o.valid?((we(a)||we(i))&&t.dirty(),{status:t.value,value:o.data}):(l(s,{code:c.invalid_intersection_types}),m)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}ee.create=(r,e,t)=>new ee({left:r,right:e,typeName:p.ZodIntersection,...y(t)});class j extends v{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.array)return l(s,{code:c.invalid_type,expected:u.array,received:s.parsedType}),m;if(s.data.length<this._def.items.length)return l(s,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m;!this._def.rest&&s.data.length>this._def.items.length&&(l(s,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...s.data].map((i,o)=>{const f=this._def.items[o]||this._def.rest;return f?f._parse(new R(s,i,s.path,o)):null}).filter(i=>!!i);return s.common.async?Promise.all(a).then(i=>T.mergeArray(t,i)):T.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new j({...this._def,rest:e})}}j.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new j({items:r,typeName:p.ZodTuple,rest:null,...y(e)})};class te extends v{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.object)return l(s,{code:c.invalid_type,expected:u.object,received:s.parsedType}),m;const n=[],a=this._def.keyType,i=this._def.valueType;for(const o in s.data)n.push({key:a._parse(new R(s,o,s.path,o)),value:i._parse(new R(s,s.data[o],s.path,o))});return s.common.async?T.mergeObjectAsync(t,n):T.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,s){return t instanceof v?new te({keyType:e,valueType:t,typeName:p.ZodRecord,...y(s)}):new te({keyType:O.create(),valueType:e,typeName:p.ZodRecord,...y(t)})}}class me extends v{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.map)return l(s,{code:c.invalid_type,expected:u.map,received:s.parsedType}),m;const n=this._def.keyType,a=this._def.valueType,i=[...s.data.entries()].map(([o,f],d)=>({key:n._parse(new R(s,o,s.path,[d,"key"])),value:a._parse(new R(s,f,s.path,[d,"value"]))}));if(s.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const f of i){const d=await f.key,_=await f.value;if(d.status==="aborted"||_.status==="aborted")return m;(d.status==="dirty"||_.status==="dirty")&&t.dirty(),o.set(d.value,_.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const f of i){const d=f.key,_=f.value;if(d.status==="aborted"||_.status==="aborted")return m;(d.status==="dirty"||_.status==="dirty")&&t.dirty(),o.set(d.value,_.value)}return{status:t.value,value:o}}}}me.create=(r,e,t)=>new me({valueType:e,keyType:r,typeName:p.ZodMap,...y(t)});class U extends v{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.set)return l(s,{code:c.invalid_type,expected:u.set,received:s.parsedType}),m;const n=this._def;n.minSize!==null&&s.data.size<n.minSize.value&&(l(s,{code:c.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&s.data.size>n.maxSize.value&&(l(s,{code:c.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const a=this._def.valueType;function i(f){const d=new Set;for(const _ of f){if(_.status==="aborted")return m;_.status==="dirty"&&t.dirty(),d.add(_.value)}return{status:t.value,value:d}}const o=[...s.data.values()].map((f,d)=>a._parse(new R(s,f,s.path,d)));return s.common.async?Promise.all(o).then(f=>i(f)):i(o)}min(e,t){return new U({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new U({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}U.create=(r,e)=>new U({valueType:r,minSize:null,maxSize:null,typeName:p.ZodSet,...y(e)});class W extends v{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.function)return l(t,{code:c.invalid_type,expected:u.function,received:t.parsedType}),m;function s(o,f){return le({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ue(),H].filter(d=>!!d),issueData:{code:c.invalid_arguments,argumentsError:f}})}function n(o,f){return le({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ue(),H].filter(d=>!!d),issueData:{code:c.invalid_return_type,returnTypeError:f}})}const a={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof Y){const o=this;return Z(async function(...f){const d=new N([]),_=await o._def.args.parseAsync(f,a).catch(ce=>{throw d.addIssue(s(f,ce)),d}),S=await Reflect.apply(i,this,_);return await o._def.returns._def.type.parseAsync(S,a).catch(ce=>{throw d.addIssue(n(S,ce)),d})})}else{const o=this;return Z(function(...f){const d=o._def.args.safeParse(f,a);if(!d.success)throw new N([s(f,d.error)]);const _=Reflect.apply(i,this,d.data),S=o._def.returns.safeParse(_,a);if(!S.success)throw new N([n(_,S.error)]);return S.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new W({...this._def,args:j.create(e).rest(L.create())})}returns(e){return new W({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new W({args:e||j.create([]).rest(L.create()),returns:t||L.create(),typeName:p.ZodFunction,...y(s)})}}class re extends v{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}re.create=(r,e)=>new re({getter:r,typeName:p.ZodLazy,...y(e)});class se extends v{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return l(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}se.create=(r,e)=>new se({value:r,typeName:p.ZodLiteral,...y(e)});function Ne(r,e){return new $({values:r,typeName:p.ZodEnum,...y(e)})}class $ extends v{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return l(t,{expected:g.joinValues(s),received:t.parsedType,code:c.invalid_type}),m}if(this._def.values.indexOf(e.data)===-1){const t=this._getOrReturnCtx(e),s=this._def.values;return l(t,{received:t.data,code:c.invalid_enum_value,options:s}),m}return Z(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return $.create(e)}exclude(e){return $.create(this.options.filter(t=>!e.includes(t)))}}$.create=Ne;class ne extends v{_parse(e){const t=g.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==u.string&&s.parsedType!==u.number){const n=g.objectValues(t);return l(s,{expected:g.joinValues(n),received:s.parsedType,code:c.invalid_type}),m}if(t.indexOf(e.data)===-1){const n=g.objectValues(t);return l(s,{received:s.data,code:c.invalid_enum_value,options:n}),m}return Z(e.data)}get enum(){return this._def.values}}ne.create=(r,e)=>new ne({values:r,typeName:p.ZodNativeEnum,...y(e)});class Y extends v{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return l(t,{code:c.invalid_type,expected:u.promise,received:t.parsedType}),m;const s=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return Z(s.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Y.create=(r,e)=>new Y({type:r,typeName:p.ZodPromise,...y(e)});class I extends v{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===p.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:i=>{l(s,i),i.fatal?t.abort():t.dirty()},get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){const i=n.transform(s.data,a);return s.common.issues.length?{status:"dirty",value:s.data}:s.common.async?Promise.resolve(i).then(o=>this._def.schema._parseAsync({data:o,path:s.path,parent:s})):this._def.schema._parseSync({data:i,path:s.path,parent:s})}if(n.type==="refinement"){const i=o=>{const f=n.refinement(o,a);if(s.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(s.common.async===!1){const o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(s.common.async===!1){const i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!G(i))return i;const o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>G(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):i);g.assertNever(n)}}I.create=(r,e,t)=>new I({schema:r,typeName:p.ZodEffects,effect:e,...y(t)});I.createWithPreprocess=(r,e,t)=>new I({schema:e,effect:{type:"preprocess",transform:r},typeName:p.ZodEffects,...y(t)});class A extends v{_parse(e){return this._getType(e)===u.undefined?Z(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}A.create=(r,e)=>new A({innerType:r,typeName:p.ZodOptional,...y(e)});class q extends v{_parse(e){return this._getType(e)===u.null?Z(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}q.create=(r,e)=>new q({innerType:r,typeName:p.ZodNullable,...y(e)});class ae extends v{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===u.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ae.create=(r,e)=>new ae({innerType:r,typeName:p.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...y(e)});class ye extends v{_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return fe(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new N(s.common.issues)},input:s.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new N(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}ye.create=(r,e)=>new ye({innerType:r,typeName:p.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...y(e)});class ve extends v{_parse(e){if(this._getType(e)!==u.nan){const s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:u.nan,received:s.parsedType}),m}return{status:"valid",value:e.data}}}ve.create=r=>new ve({typeName:p.ZodNaN,...y(r)});const tt=Symbol("zod_brand");class Ee extends v{_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}}class oe extends v{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),Oe(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})})();{const n=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:s.path,parent:s})}}static create(e,t){return new oe({in:e,out:t,typeName:p.ZodPipeline})}}class _e extends v{_parse(e){const t=this._def.innerType._parse(e);return G(t)&&(t.value=Object.freeze(t.value)),t}}_e.create=(r,e)=>new _e({innerType:r,typeName:p.ZodReadonly,...y(e)});const Ie=(r,e={},t)=>r?J.create().superRefine((s,n)=>{var a,i;if(!r(s)){const o=typeof e=="function"?e(s):typeof e=="string"?{message:e}:e,f=(i=(a=o.fatal)!==null&&a!==void 0?a:t)!==null&&i!==void 0?i:!0,d=typeof o=="string"?{message:o}:o;n.addIssue({code:"custom",...d,fatal:f})}}):J.create(),rt={object:b.lazycreate};var p;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(p||(p={}));const st=(r,e={message:`Input not instance of ${r.name}`})=>Ie(t=>t instanceof r,e),Re=O.create,je=V.create,nt=ve.create,at=z.create,Ae=X.create,it=D.create,ot=he.create,ct=Q.create,dt=K.create,ut=J.create,lt=L.create,ft=M.create,ht=pe.create,pt=E.create,mt=b.create,yt=b.strictCreate,vt=F.create,_t=ge.create,gt=ee.create,xt=j.create,bt=te.create,kt=me.create,wt=U.create,Tt=W.create,Zt=re.create,St=se.create,Ct=$.create,Ot=ne.create,Nt=Y.create,Se=I.create,Et=A.create,It=q.create,Rt=I.createWithPreprocess,jt=oe.create,At=()=>Re().optional(),Mt=()=>je().optional(),Pt=()=>Ae().optional(),Vt={string:r=>O.create({...r,coerce:!0}),number:r=>V.create({...r,coerce:!0}),boolean:r=>X.create({...r,coerce:!0}),bigint:r=>z.create({...r,coerce:!0}),date:r=>D.create({...r,coerce:!0})},zt=m;var C=Object.freeze({__proto__:null,defaultErrorMap:H,setErrorMap:Ue,getErrorMap:ue,makeIssue:le,EMPTY_PATH:qe,addIssueToContext:l,ParseStatus:T,INVALID:m,DIRTY:Oe,OK:Z,isAborted:ke,isDirty:we,isValid:G,isAsync:fe,get util(){return g},get objectUtil(){return be},ZodParsedType:u,getParsedType:P,ZodType:v,ZodString:O,ZodNumber:V,ZodBigInt:z,ZodBoolean:X,ZodDate:D,ZodSymbol:he,ZodUndefined:Q,ZodNull:K,ZodAny:J,ZodUnknown:L,ZodNever:M,ZodVoid:pe,ZodArray:E,ZodObject:b,ZodUnion:F,ZodDiscriminatedUnion:ge,ZodIntersection:ee,ZodTuple:j,ZodRecord:te,ZodMap:me,ZodSet:U,ZodFunction:W,ZodLazy:re,ZodLiteral:se,ZodEnum:$,ZodNativeEnum:ne,ZodPromise:Y,ZodEffects:I,ZodTransformer:I,ZodOptional:A,ZodNullable:q,ZodDefault:ae,ZodCatch:ye,ZodNaN:ve,BRAND:tt,ZodBranded:Ee,ZodPipeline:oe,ZodReadonly:_e,custom:Ie,Schema:v,ZodSchema:v,late:rt,get ZodFirstPartyTypeKind(){return p},coerce:Vt,any:ut,array:pt,bigint:at,boolean:Ae,date:it,discriminatedUnion:_t,effect:Se,enum:Ct,function:Tt,instanceof:st,intersection:gt,lazy:Zt,literal:St,map:kt,nan:nt,nativeEnum:Ot,never:ft,null:dt,nullable:It,number:je,object:mt,oboolean:Pt,onumber:Mt,optional:Et,ostring:At,pipeline:jt,preprocess:Rt,promise:Nt,record:bt,set:wt,strictObject:yt,string:Re,symbol:ot,transformer:Se,tuple:xt,undefined:ct,union:vt,unknown:lt,void:ht,NEVER:zt,ZodIssueCode:c,quotelessJson:De,ZodError:N});const $t=()=>{const{formValidationTexts:r}=ze.useContext(ie.LuminusComponentsContext),e=x=>(x!=null&&x.useCoerce?C.coerce:C).string({invalid_type_error:r.required}).transform(w=>w??null),t=x=>e(x).nullable().optional().transform(k=>k??null),s=x=>(x!=null&&x.useCoerce?C.coerce:C).number({invalid_type_error:r.required}).transform(w=>w??null),n=x=>s(x).nullable().optional().transform(k=>k??null),a=x=>(x!=null&&x.useCoerce?C.coerce:C).boolean({invalid_type_error:r.required}).transform(k=>k??null),i=x=>(x!=null&&x.useCoerce?C.coerce:C).string({invalid_type_error:r.required}).refine($e.isISODate,{message:r.invalidDate}).transform(w=>w??null),o=x=>i(x).nullable().transform(k=>k??null),f=(x,k)=>C.enum(x,{invalid_type_error:r.required}).transform(Pe=>Pe??null);return{zString:t,zStringRequired:e,zNumber:n,zNumberRequired:s,zBool:a,zDate:o,zDateRequired:i,zEnum:(x,k)=>f(x).nullable().transform(w=>w??null),zEnumRequired:f,zObjectIdInt:x=>C.object({id:n({useCoerce:!0})}).nullable().transform(w=>w??null),zObjectIdIntRequired:x=>C.object({id:s()}).transform(w=>w??null),zObjectIdStr:x=>C.object({id:t({useCoerce:!0})}).nullable().transform(w=>w??null),zObjectIdStrRequired:x=>C.object({id:e()}).transform(w=>w??null)}};exports.cancelToken=ie.cancelToken;exports.useAuth=ie.useAuth;exports.useAxios=ie.useAxios;exports.useNotifications=ie.useNotifications;exports.useConfirm=Ve.useConfirm;exports.useClickOutside=Le.useClickOutside;exports.useZodSchemaTypes=$t;
|