react-luminus-components 2.0.19 → 2.0.21
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 +34 -34
- package/dist/{FormDisabledProvider-CuciVC1c.js → FormDisabledProvider-BT-dACLY.js} +1 -1
- package/dist/{FormDisabledProvider-Cr4O-dM-.cjs → FormDisabledProvider-Nmvq1MRp.cjs} +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts +2 -1
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +5 -5
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +4 -4
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +225 -236
- package/dist/main.cjs.js +1 -1
- package/dist/main.es.js +5 -5
- package/dist/{nivo-bar-C_X0vU1-.cjs → nivo-bar-DFZCSJG9.cjs} +1 -1
- package/dist/{nivo-bar-CZxCjOf4.js → nivo-bar-DWZDhBsU.js} +337 -328
- package/dist/style.css +1 -1
- package/dist/{useIsFormDirty-DVXHyw3w.cjs → useIsFormDirty-DFxDsCoY.cjs} +1 -1
- package/dist/{useIsFormDirty-MJrbyifK.js → useIsFormDirty-DPDTYR-y.js} +1 -1
- package/dist/{useLocalStorageState-n3PiEif_.js → useLocalStorageState-BUzecYnv.js} +1 -1
- package/dist/{useLocalStorageState-Cb-47swy.cjs → useLocalStorageState-C5j4rNZi.cjs} +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +2 -2
- package/package.json +1 -1
|
@@ -243,7 +243,7 @@ to {
|
|
|
243
243
|
* LICENSE file in the root directory of this source tree.
|
|
244
244
|
*/var hb;function IA(){return hb||(hb=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,_=e?Symbol.for("react.scope"):60119;function w(N){return typeof N=="string"||typeof N=="function"||N===r||N===c||N===a||N===i||N===d||N===f||typeof N=="object"&&N!==null&&(N.$$typeof===p||N.$$typeof===h||N.$$typeof===o||N.$$typeof===s||N.$$typeof===u||N.$$typeof===g||N.$$typeof===x||N.$$typeof===_||N.$$typeof===m)}function C(N){if(typeof N=="object"&&N!==null){var te=N.$$typeof;switch(te){case t:var K=N.type;switch(K){case l:case c:case r:case a:case i:case d:return K;default:var G=K&&K.$$typeof;switch(G){case s:case u:case p:case h:case o:return G;default:return te}}case n:return te}}}var b=l,S=c,M=s,$=o,k=t,R=u,T=r,E=p,A=h,j=n,I=a,D=i,O=d,L=!1;function B(N){return L||(L=!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.")),P(N)||C(N)===l}function P(N){return C(N)===c}function H(N){return C(N)===s}function Y(N){return C(N)===o}function q(N){return typeof N=="object"&&N!==null&&N.$$typeof===t}function Z(N){return C(N)===u}function X(N){return C(N)===r}function J(N){return C(N)===p}function ee(N){return C(N)===h}function W(N){return C(N)===n}function F(N){return C(N)===a}function z(N){return C(N)===i}function V(N){return C(N)===d}Nt.AsyncMode=b,Nt.ConcurrentMode=S,Nt.ContextConsumer=M,Nt.ContextProvider=$,Nt.Element=k,Nt.ForwardRef=R,Nt.Fragment=T,Nt.Lazy=E,Nt.Memo=A,Nt.Portal=j,Nt.Profiler=I,Nt.StrictMode=D,Nt.Suspense=O,Nt.isAsyncMode=B,Nt.isConcurrentMode=P,Nt.isContextConsumer=H,Nt.isContextProvider=Y,Nt.isElement=q,Nt.isForwardRef=Z,Nt.isFragment=X,Nt.isLazy=J,Nt.isMemo=ee,Nt.isPortal=W,Nt.isProfiler=F,Nt.isStrictMode=z,Nt.isSuspense=V,Nt.isValidElementType=w,Nt.typeOf=C}()),Nt}var pb;function NA(){return pb||(pb=1,process.env.NODE_ENV==="production"?Jc.exports=jA():Jc.exports=IA()),Jc.exports}var Gh,mb;function PA(){if(mb)return Gh;mb=1;var e=NA(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[e.ForwardRef]=r,a[e.Memo]=i;function o(p){return e.isMemo(p)?i:a[p.$$typeof]||t}var s=Object.defineProperty,l=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,f=Object.prototype;function h(p,m,g){if(typeof m!="string"){if(f){var x=d(m);x&&x!==f&&h(p,x,g)}var _=l(m);c&&(_=_.concat(c(m)));for(var w=o(p),C=o(m),b=0;b<_.length;++b){var S=_[b];if(!n[S]&&!(g&&g[S])&&!(C&&C[S])&&!(w&&w[S])){var M=u(m,S);try{s(p,S,M)}catch{}}}}return p}return Gh=h,Gh}PA();function LA(){return typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"}function Kg(e,t){const n=v.useContext(I4);if(!n)throw new Error("Missing <CookiesProvider>");const i=Object.assign(Object.assign({},{doNotUpdate:!0}),t),[a,o]=v.useState(()=>n.getAll(i));LA()&&v.useLayoutEffect(()=>{function u(){const d=n.getAll(i);FA(e||null,d,a)&&o(d)}return n.addChangeListener(u),()=>{n.removeChangeListener(u)}},[n,a]);const s=v.useMemo(()=>n.set.bind(n),[n]),l=v.useMemo(()=>n.remove.bind(n),[n]),c=v.useMemo(()=>n.update.bind(n),[n]);return[a,s,l,c]}function FA(e,t,n){if(!e)return!0;for(let r of e)if(t[r]!==n[r])return!0;return!1}const zA=()=>{const e=Ie.c(12),{axiosOptions:t,cookieDomain:n}=v.useContext(rn);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=["Authorization"],e[0]=r):r=e[0];const[,i,a]=Kg(r);let o;e[1]!==t?(o=Zt.create(t),e[1]=t,e[2]=o):o=e[2];const s=o,l=BA;let c;e[3]!==s||e[4]!==n||e[5]!==i?(c=async(p,m)=>s.post("/user/login",{kid:p,password:m}).then(g=>(localStorage.setItem("token",g.data),i("Authorization",g.data,{path:"/",secure:!0,sameSite:"none",domain:n,expires:Gx(new Date(Date.now()),24)}),g.data)).catch(WA),e[3]=s,e[4]=n,e[5]=i,e[6]=c):c=e[6];const u=c;let d;e[7]!==a?(d=()=>{localStorage.removeItem("token"),localStorage.removeItem("user"),a("Authorization")},e[7]=a,e[8]=d):d=e[8];const f=d;let h;return e[9]!==u||e[10]!==f?(h={isAuthenticated:l,login:u,logout:f},e[9]=u,e[10]=f,e[11]=h):h=e[11],h};function BA(){const e=localStorage.getItem("token");return e!==null&&e.length>0}function WA(e){return console.log(e),null}const UA=()=>{const e=Ie.c(18);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=["Authorization"],e[0]=t):t=e[0];const[,,n]=Kg(t),{msalScopes:r,msalExtraScopes:i}=v.useContext(Wd),{instance:a,inProgress:o}=n1.useMsal(),s=n1.useIsAuthenticated();let l;e[1]!==s?(l=()=>s,e[1]=s,e[2]=l):l=e[2];const c=l;let u;e[3]!==c||e[4]!==o?(u=()=>!c()&&o!==cT.InteractionStatus.None,e[3]=c,e[4]=o,e[5]=u):u=e[5];const d=u;let f;e[6]!==a||e[7]!==i||e[8]!==r?(f=async()=>a.loginRedirect({scopes:r,extraScopesToConsent:i}).then(HA).catch(VA),e[6]=a,e[7]=i,e[8]=r,e[9]=f):f=e[9];const h=f;let p;e[10]!==a||e[11]!==n?(p=()=>{a.logout(),localStorage.removeItem("user"),n("Authorization")},e[10]=a,e[11]=n,e[12]=p):p=e[12];const m=p;let g;return e[13]!==c||e[14]!==d||e[15]!==h||e[16]!==m?(g={isAuthenticated:c,isAuthenticating:d,login:h,logout:m},e[13]=c,e[14]=d,e[15]=h,e[16]=m,e[17]=g):g=e[17],g};function HA(){return""}function VA(){return null}const N4=()=>{const e=Ie.c(12),{useMsal:t}=v.useContext(Wd),n=zA(),r=UA();let i;e[0]!==n||e[1]!==r||e[2]!==t?(i=(u,d)=>t?r.login():n.login(u,d),e[0]=n,e[1]=r,e[2]=t,e[3]=i):i=e[3];const a=i,o=t?r.isAuthenticated:n.isAuthenticated;let s;e[4]!==r||e[5]!==t?(s=t?r.isAuthenticating:qA,e[4]=r,e[5]=t,e[6]=s):s=e[6];const l=t?r.logout:n.logout;let c;return e[7]!==o||e[8]!==s||e[9]!==l||e[10]!==a?(c={isAuthenticated:o,isAuthenticating:s,login:a,logout:l},e[7]=o,e[8]=s,e[9]=l,e[10]=a,e[11]=c):c=e[11],c};function qA(){return!1}const YA="_toast_1s57i_1",Fs={toast:YA},GA=e=>{switch(e){case"success":return 5e3;case"info":return 5e3;case"danger":return 1e4;case"warning":return 1e4;case"prompt":return 1e4;default:return 5e3}},Xd=()=>{const e=Ie.c(1),t=ZA;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n={addNotification:t},e[0]=n):n=e[0],n};function ZA(e,t){const n=t4(e),r=GA(t),i=y.jsxs(y.Fragment,{children:[n,y.jsx(I_,{onClick:()=>po.dismiss(n),type:"button",style:{position:"absolute",fontSize:"12px",top:"calc(50% - 6px)",right:"8px"}})]});e:switch(t){case"success":{po(i,{id:n,duration:r,position:"top-center",icon:y.jsx(kE,{size:12}),className:se("luminus-toast-success rounded shadow bg-success",Fs.toast)});break e}case"danger":{po(i,{id:n,duration:r,position:"top-center",icon:y.jsx(mE,{size:12}),className:se("luminus-toast-danger rounded shadow bg-danger",Fs.toast)});break e}case"warning":{po(i,{id:n,duration:r,position:"top-center",icon:y.jsx(uE,{size:12}),className:se("luminus-toast-warning rounded shadow bg-warning",Fs.toast)});break e}case"info":{po(i,{id:n,duration:r,position:"top-center",icon:y.jsx(fE,{size:12}),className:se("luminus-toast-info rounded shadow bg-info",Fs.toast)});break e}case"prompt":{po(i,{id:n,duration:r,position:"top-center",icon:y.jsx(pE,{size:12}),className:se("luminus-toast-prompt rounded shadow bg-light",Fs.toast)});break e}}}const XA=Zt.CancelToken,Kd=e=>{const{authenticated:t=!0,differentBaseUrl:n,silent:r=!1,customToken:i,ignoreDelegation:a,noToastOnStatus:o}={...e},{language:s,axiosOptions:l,texts:{axios:c}}=v.useContext(rn),{delegation:u}=v.useContext(Z_),{getToken:d}=v.useContext(Wd),f=v.useMemo(()=>(u==null?void 0:u.id)??null,[u==null?void 0:u.id]),{addNotification:h}=Xd(),{isAuthenticating:p,isAuthenticated:m}=N4(),g=v.useMemo(()=>Zt.create(l),[l]),x=v.useCallback(async b=>{var M,$,k;if(t&&!b.headers.Authorization){if(p())return Promise.reject(new Error("Authentication in progress"));if(!m())return Promise.reject(new Error("Not authenticated"));const R=i?{token:i,expiresOn:Gx(new Date(Date.now()),1)}:await d();if(!R)return console.log("No bearer token"),Promise.reject(new Error("No bearer token"));if(Qx(R.expiresOn))return console.log("Token expired"),Promise.reject(new Error("Token expired"));b.headers.Authorization=`Bearer ${R.token}`}f!==null&&!a&&(b.headers.DelegationId=f.toString());const S=localStorage.getItem("search-use-asterisk")!=="false";return b.headers["Search-Use-Asterisk"]=S?"true":"false",(M=b.url)!=null&&M.includes("culture=")?b.url=($=b.url)==null?void 0:$.replace(/culture=[a-z]{2}/,`culture=${s}`):b.url=`${b.url}${(k=b.url)!=null&&k.includes("?")?"&":"?"}culture=${s}`,b},[t,d,s,i,f,a,p,m]),_=v.useCallback(async b=>{var $,k;if(Zt.isCancel(b)||b.message==="Authentication in progress"||b.message==="No bearer token"||b.message==="Token expired")return Promise.reject(b);let S;if(b.response.data instanceof Blob?S=await J_(b.response.data):S=Ud(b.response.data),S.length>0){const R=S.find(T=>T.name.toLowerCase()==="others");return R?(!r&&h(R.errors,"danger"),Promise.reject(b)):(!r&&h(c.validationError,"warning"),Promise.reject(b))}const M=Q_(b);return M!==null?(!r&&h(`${c.permissionError}: ${Vg(", ",...M)}`,"danger"),Promise.reject(b)):(o??[]).includes(($=b.response)==null?void 0:$.status)?Promise.reject(b):((k=b.response)==null?void 0:k.status)===403?(!r&&h(c.forbiddenError,"danger"),Promise.reject(b)):b.message&&b.message==="Network Error"?(!r&&h(c.networkError,"danger"),Promise.reject(b)):(Zt.isCancel(b)||(!r&&h(c.unexpectedError,"danger"),(b.response||b.request)&&!r&&h(c.unexpectedError,"danger")),Promise.reject(b))},[h,c.forbiddenError,c.networkError,c.permissionError,c.unexpectedError,c.validationError,r,o]),[w,C]=v.useState(!1);return v.useEffect(()=>{n&&(g.defaults.baseURL=n)},[n,g.defaults]),v.useEffect(()=>{g.interceptors.request.clear();const b=g.interceptors.request.use(x,S=>Promise.reject(S));return C(!0),console.log("useAxios: setting interceptors"),()=>{C(!1),console.log("useAxios: ejecting interceptors"),g.interceptors.request.eject(b)}},[g.interceptors.request,x]),v.useEffect(()=>{g.interceptors.response.clear();const b=g.interceptors.response.use(S=>S,_);return()=>{g.interceptors.response.eject(b)}},[g.interceptors.response,_]),g.interceptorsUsed=w,g};let nl;const Jg=()=>{const e=Ie.c(15),{show:t,text:n,showConfirm:r,hideConfirm:i,textSm:a}=v.useContext(P_);let o;e[0]!==i?(o=()=>{i()},e[0]=i,e[1]=o):o=e[1];const s=o;let l;e[2]!==s?(l=()=>{s(),nl&&nl(!0)},e[2]=s,e[3]=l):l=e[3];const c=l;let u;e[4]!==s?(u=()=>{s(),nl&&nl(!1)},e[4]=s,e[5]=u):u=e[5];const d=u;let f;e[6]!==r?(f=async(m,g)=>(r(m,g),new Promise(KA)),e[6]=r,e[7]=f):f=e[7];const h=f;let p;return e[8]!==h||e[9]!==d||e[10]!==c||e[11]!==t||e[12]!==n||e[13]!==a?(p={confirm:h,onConfirm:c,onCancel:d,show:t,text:n,textSm:a},e[8]=h,e[9]=d,e[10]=c,e[11]=t,e[12]=n,e[13]=a,e[14]=p):p=e[14],p};function KA(e){nl=e}var wt;(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(wt||(wt={}));var dm;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(dm||(dm={}));const Se=wt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ci=e=>{switch(typeof e){case"undefined":return Se.undefined;case"string":return Se.string;case"number":return Number.isNaN(e)?Se.nan:Se.number;case"boolean":return Se.boolean;case"function":return Se.function;case"bigint":return Se.bigint;case"symbol":return Se.symbol;case"object":return Array.isArray(e)?Se.array:e===null?Se.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Se.promise:typeof Map<"u"&&e instanceof Map?Se.map:typeof Set<"u"&&e instanceof Set?Se.set:typeof Date<"u"&&e instanceof Date?Se.date:Se.object;default:return Se.unknown}},he=wt.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"]),JA=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class er extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,l=0;for(;l<o.path.length;){const c=o.path[l];l===o.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(n(o))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return i(this),r}static assert(t){if(!(t instanceof er))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,wt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)if(i.path.length>0){const a=i.path[0];n[a]=n[a]||[],n[a].push(t(i))}else r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}er.create=e=>new er(e);const Ko=(e,t)=>{let n;switch(e.code){case he.invalid_type:e.received===Se.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case he.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,wt.jsonStringifyReplacer)}`;break;case he.unrecognized_keys:n=`Unrecognized key(s) in object: ${wt.joinValues(e.keys,", ")}`;break;case he.invalid_union:n="Invalid input";break;case he.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${wt.joinValues(e.options)}`;break;case he.invalid_enum_value:n=`Invalid enum value. Expected ${wt.joinValues(e.options)}, received '${e.received}'`;break;case he.invalid_arguments:n="Invalid function arguments";break;case he.invalid_return_type:n="Invalid function return type";break;case he.invalid_date:n="Invalid date";break;case he.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:wt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case he.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case he.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case he.custom:n="Invalid input";break;case he.invalid_intersection_types:n="Intersection results could not be merged";break;case he.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case he.not_finite:n="Number must be finite";break;default:n=t.defaultError,wt.assertNever(e)}return{message:n}};let P4=Ko;function QA(e){P4=e}function Uu(){return P4}const Hu=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},e9=[];function _e(e,t){const n=Uu(),r=Hu({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Ko?void 0:Ko].filter(i=>!!i)});e.common.issues.push(r)}class On{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return He;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const a=await i.key,o=await i.value;r.push({key:a,value:o})}return On.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return He;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}}const He=Object.freeze({status:"aborted"}),ko=e=>({status:"dirty",value:e}),Pn=e=>({status:"valid",value:e}),fm=e=>e.status==="aborted",hm=e=>e.status==="dirty",Pa=e=>e.status==="valid",_l=e=>typeof Promise<"u"&&e instanceof Promise;var Oe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Oe||(Oe={}));class Br{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const gb=(e,t)=>{if(Pa(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new er(e.common.issues);return this._error=n,this._error}}};function ct(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,s)=>{const{message:l}=e;return o.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??r??s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:l??n??s.defaultError}},description:i}}class pt{get description(){return this._def.description}_getType(t){return ci(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ci(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new On,ctx:{common:t.parent.common,data:t.data,parsedType:ci(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(_l(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ci(t)},i=this._parseSync({data:t,path:r.path,parent:r});return gb(r,i)}"~validate"(t){var r,i;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ci(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:n});return Pa(a)?{value:a.value}:{issues:n.common.issues}}catch(a){(i=(r=a==null?void 0:a.message)==null?void 0:r.toLowerCase())!=null&&i.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(a=>Pa(a)?{value:a.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ci(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(_l(i)?i:Promise.resolve(i));return gb(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:he.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Sr({schema:this,typeName:qe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Lr.create(this,this._def)}nullable(){return Xi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Cr.create(this)}promise(){return Qo.create(this,this._def)}or(t){return $l.create([this,t],this._def)}and(t){return kl.create(this,t,this._def)}transform(t){return new Sr({...ct(this._def),schema:this,typeName:qe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Rl({...ct(this._def),innerType:this,defaultValue:n,typeName:qe.ZodDefault})}brand(){return new Qg({typeName:qe.ZodBranded,type:this,...ct(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Dl({...ct(this._def),innerType:this,catchValue:n,typeName:qe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return yc.create(this,t)}readonly(){return jl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const t9=/^c[^\s-]{8,}$/i,n9=/^[0-9a-z]+$/,r9=/^[0-9A-HJKMNP-TV-Z]{26}$/i,i9=/^[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,a9=/^[a-z0-9_-]{21}$/i,o9=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,s9=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,l9=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,c9="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Zh;const u9=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,d9=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,f9=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,h9=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,p9=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,m9=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,L4="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",g9=new RegExp(`^${L4}$`);function F4(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function v9(e){return new RegExp(`^${F4(e)}$`)}function z4(e){let t=`${L4}T${F4(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function b9(e,t){return!!((t==="v4"||!t)&&u9.test(e)||(t==="v6"||!t)&&f9.test(e))}function y9(e,t){if(!o9.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||"typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||t&&i.alg!==t)}catch{return!1}}function x9(e,t){return!!((t==="v4"||!t)&&d9.test(e)||(t==="v6"||!t)&&h9.test(e))}class wr extends pt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Se.string){const a=this._getOrReturnCtx(t);return _e(a,{code:he.invalid_type,expected:Se.string,received:a.parsedType}),He}const r=new On;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:he.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:he.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?_e(i,{code:he.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&_e(i,{code:he.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")l9.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"email",code:he.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")Zh||(Zh=new RegExp(c9,"u")),Zh.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"emoji",code:he.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")i9.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"uuid",code:he.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")a9.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"nanoid",code:he.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")t9.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"cuid",code:he.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")n9.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"cuid2",code:he.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")r9.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"ulid",code:he.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),_e(i,{validation:"url",code:he.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"regex",code:he.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?z4(a).test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?g9.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?v9(a).test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?s9.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"duration",code:he.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?b9(t.data,a.version)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"ip",code:he.invalid_string,message:a.message}),r.dirty()):a.kind==="jwt"?y9(t.data,a.alg)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"jwt",code:he.invalid_string,message:a.message}),r.dirty()):a.kind==="cidr"?x9(t.data,a.version)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"cidr",code:he.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?p9.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"base64",code:he.invalid_string,message:a.message}),r.dirty()):a.kind==="base64url"?m9.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"base64url",code:he.invalid_string,message:a.message}),r.dirty()):wt.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:he.invalid_string,...Oe.errToObj(r)})}_addCheck(t){return new wr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Oe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Oe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Oe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Oe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Oe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Oe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Oe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Oe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Oe.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Oe.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Oe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Oe.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Oe.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...Oe.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Oe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Oe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Oe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Oe.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Oe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Oe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Oe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Oe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Oe.errToObj(n)})}nonempty(t){return this.min(1,Oe.errToObj(t))}trim(){return new wr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new wr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new wr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}wr.create=e=>new wr({checks:[],typeName:qe.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...ct(e)});function w9(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=Number.parseInt(e.toFixed(i).replace(".","")),o=Number.parseInt(t.toFixed(i).replace(".",""));return a%o/10**i}class Yi extends pt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Se.number){const a=this._getOrReturnCtx(t);return _e(a,{code:he.invalid_type,expected:Se.number,received:a.parsedType}),He}let r;const i=new On;for(const a of this._def.checks)a.kind==="int"?wt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),_e(r,{code:he.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?w9(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),_e(r,{code:he.not_finite,message:a.message}),i.dirty()):wt.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Oe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Oe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Oe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Oe.toString(n))}setLimit(t,n,r,i){return new Yi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Oe.toString(i)}]})}_addCheck(t){return new Yi({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Oe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Oe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Oe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Oe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Oe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Oe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Oe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Oe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Oe.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&wt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Yi.create=e=>new Yi({checks:[],typeName:qe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ct(e)});class Gi extends pt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Se.bigint)return this._getInvalidInput(t);let r;const i=new On;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):wt.assertNever(a);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return _e(n,{code:he.invalid_type,expected:Se.bigint,received:n.parsedType}),He}gte(t,n){return this.setLimit("min",t,!0,Oe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Oe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Oe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Oe.toString(n))}setLimit(t,n,r,i){return new Gi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Oe.toString(i)}]})}_addCheck(t){return new Gi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Oe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Oe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Oe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Oe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Oe.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Gi.create=e=>new Gi({checks:[],typeName:qe.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...ct(e)});class Cl extends pt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Se.boolean){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Se.boolean,received:r.parsedType}),He}return Pn(t.data)}}Cl.create=e=>new Cl({typeName:qe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ct(e)});class La extends pt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Se.date){const a=this._getOrReturnCtx(t);return _e(a,{code:he.invalid_type,expected:Se.date,received:a.parsedType}),He}if(Number.isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return _e(a,{code:he.invalid_date}),He}const r=new On;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:he.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:he.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):wt.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new La({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Oe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Oe.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}La.create=e=>new La({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:qe.ZodDate,...ct(e)});class Vu extends pt{_parse(t){if(this._getType(t)!==Se.symbol){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Se.symbol,received:r.parsedType}),He}return Pn(t.data)}}Vu.create=e=>new Vu({typeName:qe.ZodSymbol,...ct(e)});class Sl extends pt{_parse(t){if(this._getType(t)!==Se.undefined){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Se.undefined,received:r.parsedType}),He}return Pn(t.data)}}Sl.create=e=>new Sl({typeName:qe.ZodUndefined,...ct(e)});class Tl extends pt{_parse(t){if(this._getType(t)!==Se.null){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Se.null,received:r.parsedType}),He}return Pn(t.data)}}Tl.create=e=>new Tl({typeName:qe.ZodNull,...ct(e)});class Jo extends pt{constructor(){super(...arguments),this._any=!0}_parse(t){return Pn(t.data)}}Jo.create=e=>new Jo({typeName:qe.ZodAny,...ct(e)});class Aa extends pt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Pn(t.data)}}Aa.create=e=>new Aa({typeName:qe.ZodUnknown,...ct(e)});class xi extends pt{_parse(t){const n=this._getOrReturnCtx(t);return _e(n,{code:he.invalid_type,expected:Se.never,received:n.parsedType}),He}}xi.create=e=>new xi({typeName:qe.ZodNever,...ct(e)});class qu extends pt{_parse(t){if(this._getType(t)!==Se.undefined){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Se.void,received:r.parsedType}),He}return Pn(t.data)}}qu.create=e=>new qu({typeName:qe.ZodVoid,...ct(e)});class Cr extends pt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==Se.array)return _e(n,{code:he.invalid_type,expected:Se.array,received:n.parsedType}),He;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(_e(n,{code:o?he.too_big:he.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(_e(n,{code:he.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(_e(n,{code:he.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>i.type._parseAsync(new Br(n,o,n.path,s)))).then(o=>On.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new Br(n,o,n.path,s)));return On.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new Cr({...this._def,minLength:{value:t,message:Oe.toString(n)}})}max(t,n){return new Cr({...this._def,maxLength:{value:t,message:Oe.toString(n)}})}length(t,n){return new Cr({...this._def,exactLength:{value:t,message:Oe.toString(n)}})}nonempty(t){return this.min(1,t)}}Cr.create=(e,t)=>new Cr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:qe.ZodArray,...ct(t)});function $o(e){if(e instanceof tn){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Lr.create($o(r))}return new tn({...e._def,shape:()=>t})}else return e instanceof Cr?new Cr({...e._def,type:$o(e.element)}):e instanceof Lr?Lr.create($o(e.unwrap())):e instanceof Xi?Xi.create($o(e.unwrap())):e instanceof Wr?Wr.create(e.items.map(t=>$o(t))):e}class tn extends pt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=wt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Se.object){const c=this._getOrReturnCtx(t);return _e(c,{code:he.invalid_type,expected:Se.object,received:c.parsedType}),He}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof xi&&this._def.unknownKeys==="strip"))for(const c in i.data)o.includes(c)||s.push(c);const l=[];for(const c of o){const u=a[c],d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Br(i,d,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof xi){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(c==="strict")s.length>0&&(_e(i,{code:he.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Br(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>On.mergeObjectSync(r,c)):On.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Oe.errToObj,new tn({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var a,o;const i=((o=(a=this._def).errorMap)==null?void 0:o.call(a,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:Oe.errToObj(t).message??i}:{message:i}}}:{}})}strip(){return new tn({...this._def,unknownKeys:"strip"})}passthrough(){return new tn({...this._def,unknownKeys:"passthrough"})}extend(t){return new tn({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new tn({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:qe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new tn({...this._def,catchall:t})}pick(t){const n={};for(const r of wt.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new tn({...this._def,shape:()=>n})}omit(t){const n={};for(const r of wt.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new tn({...this._def,shape:()=>n})}deepPartial(){return $o(this)}partial(t){const n={};for(const r of wt.objectKeys(this.shape)){const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}return new tn({...this._def,shape:()=>n})}required(t){const n={};for(const r of wt.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Lr;)a=a._def.innerType;n[r]=a}return new tn({...this._def,shape:()=>n})}keyof(){return B4(wt.objectKeys(this.shape))}}tn.create=(e,t)=>new tn({shape:()=>e,unknownKeys:"strip",catchall:xi.create(),typeName:qe.ZodObject,...ct(t)});tn.strictCreate=(e,t)=>new tn({shape:()=>e,unknownKeys:"strict",catchall:xi.create(),typeName:qe.ZodObject,...ct(t)});tn.lazycreate=(e,t)=>new tn({shape:e,unknownKeys:"strip",catchall:xi.create(),typeName:qe.ZodObject,...ct(t)});class $l extends pt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new er(s.ctx.common.issues));return _e(n,{code:he.invalid_union,unionErrors:o}),He}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!a&&(a={result:u,ctx:c}),c.common.issues.length&&o.push(c.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(l=>new er(l));return _e(n,{code:he.invalid_union,unionErrors:s}),He}}get options(){return this._def.options}}$l.create=(e,t)=>new $l({options:e,typeName:qe.ZodUnion,...ct(t)});const ii=e=>e instanceof El?ii(e.schema):e instanceof Sr?ii(e.innerType()):e instanceof Ol?[e.value]:e instanceof Zi?e.options:e instanceof Al?wt.objectValues(e.enum):e instanceof Rl?ii(e._def.innerType):e instanceof Sl?[void 0]:e instanceof Tl?[null]:e instanceof Lr?[void 0,...ii(e.unwrap())]:e instanceof Xi?[null,...ii(e.unwrap())]:e instanceof Qg||e instanceof jl?ii(e.unwrap()):e instanceof Dl?ii(e._def.innerType):[];class Jd extends pt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Se.object)return _e(n,{code:he.invalid_type,expected:Se.object,received:n.parsedType}),He;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(_e(n,{code:he.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),He)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const a of n){const o=ii(a.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a)}}return new Jd({typeName:qe.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...ct(r)})}}function pm(e,t){const n=ci(e),r=ci(t);if(e===t)return{valid:!0,data:e};if(n===Se.object&&r===Se.object){const i=wt.objectKeys(t),a=wt.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const l=pm(e[s],t[s]);if(!l.valid)return{valid:!1};o[s]=l.data}return{valid:!0,data:o}}else if(n===Se.array&&r===Se.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a],l=pm(o,s);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===Se.date&&r===Se.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class kl extends pt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(fm(a)||fm(o))return He;const s=pm(a.value,o.value);return s.valid?((hm(a)||hm(o))&&n.dirty(),{status:n.value,value:s.data}):(_e(r,{code:he.invalid_intersection_types}),He)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}kl.create=(e,t,n)=>new kl({left:e,right:t,typeName:qe.ZodIntersection,...ct(n)});class Wr extends pt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Se.array)return _e(r,{code:he.invalid_type,expected:Se.array,received:r.parsedType}),He;if(r.data.length<this._def.items.length)return _e(r,{code:he.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),He;!this._def.rest&&r.data.length>this._def.items.length&&(_e(r,{code:he.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Br(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>On.mergeArray(n,o)):On.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new Wr({...this._def,rest:t})}}Wr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Wr({items:e,typeName:qe.ZodTuple,rest:null,...ct(t)})};class Ml extends pt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Se.object)return _e(r,{code:he.invalid_type,expected:Se.object,received:r.parsedType}),He;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new Br(r,s,r.path,s)),value:o._parse(new Br(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?On.mergeObjectAsync(n,i):On.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof pt?new Ml({keyType:t,valueType:n,typeName:qe.ZodRecord,...ct(r)}):new Ml({keyType:wr.create(),valueType:t,typeName:qe.ZodRecord,...ct(n)})}}class Yu extends pt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Se.map)return _e(r,{code:he.invalid_type,expected:Se.map,received:r.parsedType}),He;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,l],c)=>({key:i._parse(new Br(r,s,r.path,[c,"key"])),value:a._parse(new Br(r,l,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of o){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return He;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of o){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return He;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}Yu.create=(e,t,n)=>new Yu({valueType:t,keyType:e,typeName:qe.ZodMap,...ct(n)});class Fa extends pt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Se.set)return _e(r,{code:he.invalid_type,expected:Se.set,received:r.parsedType}),He;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(_e(r,{code:he.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(_e(r,{code:he.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(l){const c=new Set;for(const u of l){if(u.status==="aborted")return He;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((l,c)=>a._parse(new Br(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>o(l)):o(s)}min(t,n){return new Fa({...this._def,minSize:{value:t,message:Oe.toString(n)}})}max(t,n){return new Fa({...this._def,maxSize:{value:t,message:Oe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Fa.create=(e,t)=>new Fa({valueType:e,minSize:null,maxSize:null,typeName:qe.ZodSet,...ct(t)});class Do extends pt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Se.function)return _e(n,{code:he.invalid_type,expected:Se.function,received:n.parsedType}),He;function r(s,l){return Hu({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Uu(),Ko].filter(c=>!!c),issueData:{code:he.invalid_arguments,argumentsError:l}})}function i(s,l){return Hu({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Uu(),Ko].filter(c=>!!c),issueData:{code:he.invalid_return_type,returnTypeError:l}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof Qo){const s=this;return Pn(async function(...l){const c=new er([]),u=await s._def.args.parseAsync(l,a).catch(h=>{throw c.addIssue(r(l,h)),c}),d=await Reflect.apply(o,this,u);return await s._def.returns._def.type.parseAsync(d,a).catch(h=>{throw c.addIssue(i(d,h)),c})})}else{const s=this;return Pn(function(...l){const c=s._def.args.safeParse(l,a);if(!c.success)throw new er([r(l,c.error)]);const u=Reflect.apply(o,this,c.data),d=s._def.returns.safeParse(u,a);if(!d.success)throw new er([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Do({...this._def,args:Wr.create(t).rest(Aa.create())})}returns(t){return new Do({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Do({args:t||Wr.create([]).rest(Aa.create()),returns:n||Aa.create(),typeName:qe.ZodFunction,...ct(r)})}}class El extends pt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}El.create=(e,t)=>new El({getter:e,typeName:qe.ZodLazy,...ct(t)});class Ol extends pt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return _e(n,{received:n.data,code:he.invalid_literal,expected:this._def.value}),He}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ol.create=(e,t)=>new Ol({value:e,typeName:qe.ZodLiteral,...ct(t)});function B4(e,t){return new Zi({values:e,typeName:qe.ZodEnum,...ct(t)})}class Zi extends pt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return _e(n,{expected:wt.joinValues(r),received:n.parsedType,code:he.invalid_type}),He}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return _e(n,{received:n.data,code:he.invalid_enum_value,options:r}),He}return Pn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Zi.create(t,{...this._def,...n})}exclude(t,n=this._def){return Zi.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Zi.create=B4;class Al extends pt{_parse(t){const n=wt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Se.string&&r.parsedType!==Se.number){const i=wt.objectValues(n);return _e(r,{expected:wt.joinValues(i),received:r.parsedType,code:he.invalid_type}),He}if(this._cache||(this._cache=new Set(wt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const i=wt.objectValues(n);return _e(r,{received:r.data,code:he.invalid_enum_value,options:i}),He}return Pn(t.data)}get enum(){return this._def.values}}Al.create=(e,t)=>new Al({values:e,typeName:qe.ZodNativeEnum,...ct(t)});class Qo extends pt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Se.promise&&n.common.async===!1)return _e(n,{code:he.invalid_type,expected:Se.promise,received:n.parsedType}),He;const r=n.parsedType===Se.promise?n.data:Promise.resolve(n.data);return Pn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Qo.create=(e,t)=>new Qo({type:e,typeName:qe.ZodPromise,...ct(t)});class Sr extends pt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===qe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{_e(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);if(r.common.async)return Promise.resolve(o).then(async s=>{if(n.value==="aborted")return He;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?He:l.status==="dirty"||n.value==="dirty"?ko(l.value):l});{if(n.value==="aborted")return He;const s=this._def.schema._parseSync({data:o,path:r.path,parent:r});return s.status==="aborted"?He:s.status==="dirty"||n.value==="dirty"?ko(s.value):s}}if(i.type==="refinement"){const o=s=>{const l=i.refinement(s,a);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?He:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?He:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Pa(o))return He;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>Pa(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):He);wt.assertNever(i)}}Sr.create=(e,t,n)=>new Sr({schema:e,typeName:qe.ZodEffects,effect:t,...ct(n)});Sr.createWithPreprocess=(e,t,n)=>new Sr({schema:t,effect:{type:"preprocess",transform:e},typeName:qe.ZodEffects,...ct(n)});class Lr extends pt{_parse(t){return this._getType(t)===Se.undefined?Pn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Lr.create=(e,t)=>new Lr({innerType:e,typeName:qe.ZodOptional,...ct(t)});class Xi extends pt{_parse(t){return this._getType(t)===Se.null?Pn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Xi.create=(e,t)=>new Xi({innerType:e,typeName:qe.ZodNullable,...ct(t)});class Rl extends pt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Se.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Rl.create=(e,t)=>new Rl({innerType:e,typeName:qe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ct(t)});class Dl extends pt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return _l(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new er(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new er(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Dl.create=(e,t)=>new Dl({innerType:e,typeName:qe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ct(t)});class Gu extends pt{_parse(t){if(this._getType(t)!==Se.nan){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Se.nan,received:r.parsedType}),He}return{status:"valid",value:t.data}}}Gu.create=e=>new Gu({typeName:qe.ZodNaN,...ct(e)});const _9=Symbol("zod_brand");class Qg extends pt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class yc extends pt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?He:a.status==="dirty"?(n.dirty(),ko(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?He:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new yc({in:t,out:n,typeName:qe.ZodPipeline})}}class jl extends pt{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Pa(i)&&(i.value=Object.freeze(i.value)),i);return _l(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}jl.create=(e,t)=>new jl({innerType:e,typeName:qe.ZodReadonly,...ct(t)});function vb(e,t){const n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function W4(e,t={},n){return e?Jo.create().superRefine((r,i)=>{const a=e(r);if(a instanceof Promise)return a.then(o=>{if(!o){const s=vb(t,r),l=s.fatal??n??!0;i.addIssue({code:"custom",...s,fatal:l})}});if(!a){const o=vb(t,r),s=o.fatal??n??!0;i.addIssue({code:"custom",...o,fatal:s})}}):Jo.create()}const C9={object:tn.lazycreate};var qe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(qe||(qe={}));const S9=(e,t={message:`Input not instance of ${e.name}`})=>W4(n=>n instanceof e,t),e0=wr.create,U4=Yi.create,T9=Gu.create,$9=Gi.create,H4=Cl.create,k9=La.create,M9=Vu.create,E9=Sl.create,O9=Tl.create,V4=Jo.create,A9=Aa.create,R9=xi.create,D9=qu.create,q4=Cr.create,di=tn.create,j9=tn.strictCreate,I9=$l.create,N9=Jd.create,P9=kl.create,L9=Wr.create,F9=Ml.create,z9=Yu.create,B9=Fa.create,W9=Do.create,U9=El.create,H9=Ol.create,Y4=Zi.create,V9=Al.create,q9=Qo.create,bb=Sr.create,Y9=Lr.create,G9=Xi.create,Z9=Sr.createWithPreprocess,X9=yc.create,K9=()=>e0().optional(),J9=()=>U4().optional(),Q9=()=>H4().optional(),rl={string:e=>wr.create({...e,coerce:!0}),number:e=>Yi.create({...e,coerce:!0}),boolean:e=>Cl.create({...e,coerce:!0}),bigint:e=>Gi.create({...e,coerce:!0}),date:e=>La.create({...e,coerce:!0})},eR=He,il=Object.freeze(Object.defineProperty({__proto__:null,BRAND:_9,DIRTY:ko,EMPTY_PATH:e9,INVALID:He,NEVER:eR,OK:Pn,ParseStatus:On,Schema:pt,ZodAny:Jo,ZodArray:Cr,ZodBigInt:Gi,ZodBoolean:Cl,ZodBranded:Qg,ZodCatch:Dl,ZodDate:La,ZodDefault:Rl,ZodDiscriminatedUnion:Jd,ZodEffects:Sr,ZodEnum:Zi,ZodError:er,get ZodFirstPartyTypeKind(){return qe},ZodFunction:Do,ZodIntersection:kl,ZodIssueCode:he,ZodLazy:El,ZodLiteral:Ol,ZodMap:Yu,ZodNaN:Gu,ZodNativeEnum:Al,ZodNever:xi,ZodNull:Tl,ZodNullable:Xi,ZodNumber:Yi,ZodObject:tn,ZodOptional:Lr,ZodParsedType:Se,ZodPipeline:yc,ZodPromise:Qo,ZodReadonly:jl,ZodRecord:Ml,ZodSchema:pt,ZodSet:Fa,ZodString:wr,ZodSymbol:Vu,ZodTransformer:Sr,ZodTuple:Wr,ZodType:pt,ZodUndefined:Sl,ZodUnion:$l,ZodUnknown:Aa,ZodVoid:qu,addIssueToContext:_e,any:V4,array:q4,bigint:$9,boolean:H4,coerce:rl,custom:W4,date:k9,datetimeRegex:z4,defaultErrorMap:Ko,discriminatedUnion:N9,effect:bb,enum:Y4,function:W9,getErrorMap:Uu,getParsedType:ci,instanceof:S9,intersection:P9,isAborted:fm,isAsync:_l,isDirty:hm,isValid:Pa,late:C9,lazy:U9,literal:H9,makeIssue:Hu,map:z9,nan:T9,nativeEnum:V9,never:R9,null:O9,nullable:G9,number:U4,object:di,get objectUtil(){return dm},oboolean:Q9,onumber:J9,optional:Y9,ostring:K9,pipeline:X9,preprocess:Z9,promise:q9,quotelessJson:JA,record:F9,set:B9,setErrorMap:QA,strictObject:j9,string:e0,symbol:M9,transformer:bb,tuple:L9,undefined:E9,union:I9,unknown:A9,get util(){return wt},void:D9},Symbol.toStringTag,{value:"Module"})),Qd=()=>{const e=Ie.c(43),{texts:t}=v.useContext(rn),{formValidation:n}=t;let r;e[0]!==n?(r=(O,L)=>{const B=L===void 0?!1:L;let P=(O!=null&&O.useCoerce?rl:il).string({invalid_type_error:n.required,required_error:n.required});return B||(P=P.min(1,n.required)),O!=null&&O.email&&(P=P.email(n.invalidEmail)),O!=null&&O.length&&(P=P.min(O.length,n.length(O.length))),O!=null&&O.minLength&&(P=P.min(O.minLength,n.minLength(O.minLength))),O!=null&&O.maxLength&&(P=P.max(O.maxLength,n.maxLength(O.maxLength))),O!=null&&O.numeric&&(P=P.regex(/^\d+$/,n.noCharactersOtherThanNumbers)),O!=null&&O.regex&&(P=P.regex(O.regex,n.invalidFormat)),P.transform(tR)},e[0]=n,e[1]=r):r=e[1];const i=r;let a;e[2]!==i?(a=O=>i(O,!1),e[2]=i,e[3]=a):a=e[3];const o=a;let s;e[4]!==i?(s=O=>i(O,!0).nullable().optional().transform(nR),e[4]=i,e[5]=s):s=e[5];const l=s;let c;e[6]!==n?(c=O=>{const L=(O==null?void 0:O.min)??Number.MIN_SAFE_INTEGER,B=(O==null?void 0:O.max)??Number.MAX_SAFE_INTEGER,P=(O!=null&&O.useCoerce?rl:il).number({invalid_type_error:n.required,required_error:n.required}).min(L,n.lessThanMin(L)).max(B,n.moreThanMax(B));return P.transform(rR),P},e[6]=n,e[7]=c):c=e[7];const u=c;let d;e[8]!==u?(d=O=>u(O).nullable().optional().transform(iR),e[8]=u,e[9]=d):d=e[9];const f=d;let h;e[10]!==n.required?(h=O=>((O==null?void 0:O.useCoerce)===!1?il:rl).boolean({invalid_type_error:n.required,required_error:n.required}).transform(aR),e[10]=n.required,e[11]=h):h=e[11];const p=h;let m;e[12]!==n.invalidDate||e[13]!==n.required?(m=O=>(O!=null&&O.useCoerce?rl:il).string({invalid_type_error:n.required,required_error:n.required}).refine(i4,{message:n.invalidDate}).transform(oR),e[12]=n.invalidDate,e[13]=n.required,e[14]=m):m=e[14];const g=m;let x;e[15]!==g?(x=O=>g(O).nullable().optional().transform(sR),e[15]=g,e[16]=x):x=e[16];const _=x;let w;e[17]!==n.required?(w=(O,L)=>Y4(O,{invalid_type_error:n.required,required_error:n.required}).transform(lR),e[17]=n.required,e[18]=w):w=e[18];const C=w;let b;e[19]!==C?(b=(O,L)=>C(O,L).nullable().transform(cR),e[19]=C,e[20]=b):b=e[20];const S=b;let M;e[21]!==f?(M=O=>di({id:f({useCoerce:!0})}).nullable().transform(uR),e[21]=f,e[22]=M):M=e[22];const $=M;let k;e[23]!==u?(k=O=>di({id:u()}).transform(dR),e[23]=u,e[24]=k):k=e[24];const R=k;let T;e[25]!==l?(T=O=>di({id:l({useCoerce:!0})}).nullable().transform(fR),e[25]=l,e[26]=T):T=e[26];const E=T;let A;e[27]!==o?(A=O=>di({id:o()}).transform(hR),e[27]=o,e[28]=A):A=e[28];const j=A,I=mR;let D;return e[29]!==p||e[30]!==_||e[31]!==g||e[32]!==S||e[33]!==C||e[34]!==f||e[35]!==u||e[36]!==$||e[37]!==R||e[38]!==E||e[39]!==j||e[40]!==l||e[41]!==o?(D={zString:l,zStringRequired:o,zNumber:f,zNumberRequired:u,zBool:p,zDate:_,zDateRequired:g,zEnum:S,zEnumRequired:C,zObjectIdInt:$,zObjectIdIntRequired:R,zObjectIdStr:E,zObjectIdStrRequired:j,zFile:I},e[29]=p,e[30]=_,e[31]=g,e[32]=S,e[33]=C,e[34]=f,e[35]=u,e[36]=$,e[37]=R,e[38]=E,e[39]=j,e[40]=l,e[41]=o,e[42]=D):D=e[42],D};function tR(e){return e??null}function nR(e){return e??null}function rR(e){return e??null}function iR(e){return e??null}function aR(e){return e??null}function oR(e){return e??null}function sR(e){return e??null}function lR(e){return e??null}function cR(e){return e??null}function uR(e){return e??null}function dR(e){return e??null}function fR(e){return e??null}function hR(e){return e??null}function pR(e){return Array.from(e??[])}function mR(e){const{required:t,multiple:n,maxFileSize:r}=e;return V4().transform(pR).refine(a=>!t||(a==null?void 0:a.length)>0,"File is required.").refine(a=>n||(a==null?void 0:a.length)<=1,"Multiple files not allowed.").refine(a=>a.every(o=>o.size<=r),`Maximum file size is ${Go(r)}.`).transform(a=>(n?a:a==null?void 0:a[0])??null)}const G4=(e,t)=>{const n=Ie.c(4);let r,i;n[0]!==t||n[1]!==e?(r=()=>{const a=o=>{e.some(s=>s.current&&s.current.contains(o.target))||t()};return document.addEventListener("mouseup",a),()=>{document.removeEventListener("mouseup",a)}},i=[e,t],n[0]=t,n[1]=e,n[2]=r,n[3]=i):(r=n[2],i=n[3]),v.useEffect(r,i)},Z4=()=>{const e=Ie.c(4),{user:t}=v.useContext(G_);let n;e[0]!==(t==null?void 0:t.permissions)?(n=(a,o)=>{const s=o===void 0?"any":o;return a.length===0?!0:s==="any"?a.some(l=>{var c;return(c=t==null?void 0:t.permissions)==null?void 0:c.includes(l)}):a.every(l=>{var c;return(c=t==null?void 0:t.permissions)==null?void 0:c.includes(l)})},e[0]=t==null?void 0:t.permissions,e[1]=n):n=e[1];const r=n;let i;return e[2]!==r?(i={checkUserHasPermissions:r},e[2]=r,e[3]=i):i=e[3],i},X4=(e,t)=>{const n=Ie.c(6);let r,i;n[0]!==e?(r=()=>(document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}),i=[e],n[0]=e,n[1]=r,n[2]=i):(r=n[1],i=n[2]),v.useEffect(r,i);let a,o;n[3]!==t?(a=()=>t===void 0?gR:(document.addEventListener("keyup",t),()=>{document.removeEventListener("keyup",t)}),o=[t],n[3]=t,n[4]=a,n[5]=o):(a=n[4],o=n[5]),v.useEffect(a,o)};function gR(){}const t0=(e,t,n)=>{let r;e:{if(n){r=e;break e}if(e!=="date"&&e!=="datetime-local"&&e!=="time"){r=e;break e}if(!t){r="text";break e}r=e}return r},K4=()=>{const{addNotification:e}=Xd(),{texts:{clipboard:t}}=v.useContext(rn);return{copyToClipboard:v.useCallback(async r=>{var i;try{await((i=navigator.clipboard)==null?void 0:i.writeText(r)),e(t.copySuccess(r),"prompt")}catch(a){console.error(a),e(t.copyError,"danger")}},[e,t])}},xc=()=>{const e=Ie.c(7),[t,n]=v.useState(window.innerWidth),[r,i]=v.useState(window.innerHeight);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{n(window.innerWidth),i(window.innerHeight)},e[0]=a):a=e[0];const o=a;let s,l;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=()=>(window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)),l=[],e[1]=s,e[2]=l):(s=e[1],l=e[2]),v.useEffect(s,l);const c=t<992;let u;return e[3]!==r||e[4]!==c||e[5]!==t?(u={width:t,height:r,isMobile:c},e[3]=r,e[4]=c,e[5]=t,e[6]=u):u=e[6],u},J4=v.createContext({addHelmet:e=>{},removeHelmet:()=>{}}),Q4=v.createContext(void 0),yb={falseIfNotInit:!1},ef=e=>{const{falseIfNotInit:t}=e===void 0?yb:e,n=t===void 0?yb.falseIfNotInit:t,r=v.useContext(Q4);if(!n&&r===void 0)throw new Error("FormDisabledProvider not initilized. Probably tried to use useFormDisabledContext outside FormDisabledProvider.");return r??!1},vR="_button_1wjon_1",bR="_filled_1wjon_7",yR="_sm_1wjon_13",xR="_md_1wjon_18",wR="_lg_1wjon_23",mo={button:vR,filled:bR,sm:yR,md:xR,lg:wR},za=e=>{const t=Ie.c(24);let n,r,i,a,o,s;t[0]!==e?({variant:a,color:o,size:s,className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s):(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]);const l=a===void 0?"filled":a,c=o===void 0?"primary":o,u=s===void 0?"md":s;if(i.as==="link"){const d=i.href??"/",f=`luminus-primary-button ${c} btn ${l==="outlined"?`btn-outline-${c}`:`btn-${c}`} ${r??""}`,h=mo[l],p=mo[u];let m;t[7]!==f||t[8]!==h||t[9]!==p?(m=se(f,mo.button,h,p),t[7]=f,t[8]=h,t[9]=p,t[10]=m):m=t[10];let g;return t[11]!==n||t[12]!==i||t[13]!==d||t[14]!==m?(g=y.jsx(ss.Link,{to:d,className:m,...i,children:n}),t[11]=n,t[12]=i,t[13]=d,t[14]=m,t[15]=g):g=t[15],g}if(i.as==="button"||i.as===void 0){const d=`luminus-primary-button ${c} btn ${l==="outlined"?`btn-outline-${c}`:`btn-${c}`} ${r??""}`,f=mo[l],h=mo[u];let p;t[16]!==d||t[17]!==f||t[18]!==h?(p=se(d,mo.button,f,h),t[16]=d,t[17]=f,t[18]=h,t[19]=p):p=t[19];let m;return t[20]!==n||t[21]!==i||t[22]!==p?(m=y.jsx("button",{type:"button",className:p,...i,children:n}),t[20]=n,t[21]=i,t[22]=p,t[23]=m):m=t[23],m}return null},_R="_button_1r3i0_1",mm={button:_R},tf=e=>{const t=Ie.c(21);let n,r,i,a,o;t[0]!==e?({color:o,icon:i,className:r,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o):(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]);const s=o===void 0?"primary":o;if(a.as==="link"){const l=a.href??"/",c=`luminus-context-button btn text-${s} ${r??""}`;let u;t[6]!==c?(u=se(c,mm.button),t[6]=c,t[7]=u):u=t[7];let d;return t[8]!==n||t[9]!==i||t[10]!==a||t[11]!==l||t[12]!==u?(d=y.jsxs(ss.Link,{to:l,className:u,...a,children:[i,n]}),t[8]=n,t[9]=i,t[10]=a,t[11]=l,t[12]=u,t[13]=d):d=t[13],d}if(a.as==="button"||a.as===void 0){const l=`luminus-context-button btn text-${s} ${r??""}`;let c;t[14]!==l?(c=se(l,mm.button),t[14]=l,t[15]=c):c=t[15];let u;return t[16]!==n||t[17]!==i||t[18]!==a||t[19]!==c?(u=y.jsxs("button",{type:"button",className:c,...a,children:[i,n]}),t[16]=n,t[17]=i,t[18]=a,t[19]=c,t[20]=u):u=t[20],u}return null},CR="_icon-button_15e26_1",SR="_sm_15e26_14",TR="_md_15e26_23",$R="_lg_15e26_32",Qc={"icon-button":"_icon-button_15e26_1",iconButton:CR,sm:SR,md:TR,lg:$R},wc=e=>{const t=Ie.c(23);let n,r,i,a,o,s;t[0]!==e?({type:a,color:o,size:s,children:n,className:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s):(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]);const l=a===void 0?"button":a,c=o===void 0?"primary":o,u=s===void 0?"md":s;if(i.as==="link"){const d=i.href??"/",f=`luminus-icon-button btn text-${c} ${r??""}`,h=Qc[u];let p;t[7]!==f||t[8]!==h?(p=se(f,Qc.iconButton,h),t[7]=f,t[8]=h,t[9]=p):p=t[9];let m;return t[10]!==n||t[11]!==i||t[12]!==d||t[13]!==p?(m=y.jsx(ss.Link,{to:d,className:p,...i,children:n}),t[10]=n,t[11]=i,t[12]=d,t[13]=p,t[14]=m):m=t[14],m}if(i.as==="button"||i.as===void 0){const d=`luminus-icon-button btn text-${c} ${r??""}`,f=Qc[u];let h;t[15]!==d||t[16]!==f?(h=se(d,Qc.iconButton,f),t[15]=d,t[16]=f,t[17]=h):h=t[17];let p;return t[18]!==n||t[19]!==i||t[20]!==h||t[21]!==l?(p=y.jsx("button",{type:l,className:h,...i,children:n}),t[18]=n,t[19]=i,t[20]=h,t[21]=l,t[22]=p):p=t[22],p}return null};var n0={},Zu={exports:{}};Zu.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,a=2,o=9007199254740991,s="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Function]",p="[object GeneratorFunction]",m="[object Map]",g="[object Number]",x="[object Null]",_="[object Object]",w="[object Promise]",C="[object Proxy]",b="[object RegExp]",S="[object Set]",M="[object String]",$="[object Symbol]",k="[object Undefined]",R="[object WeakMap]",T="[object ArrayBuffer]",E="[object DataView]",A="[object Float32Array]",j="[object Float64Array]",I="[object Int8Array]",D="[object Int16Array]",O="[object Int32Array]",L="[object Uint8Array]",B="[object Uint8ClampedArray]",P="[object Uint16Array]",H="[object Uint32Array]",Y=/[\\^$.*+?()[\]{}|]/g,q=/^\[object .+?Constructor\]$/,Z=/^(?:0|[1-9]\d*)$/,X={};X[A]=X[j]=X[I]=X[D]=X[O]=X[L]=X[B]=X[P]=X[H]=!0,X[s]=X[l]=X[T]=X[u]=X[E]=X[d]=X[f]=X[h]=X[m]=X[g]=X[_]=X[b]=X[S]=X[M]=X[R]=!1;var J=typeof Hn=="object"&&Hn&&Hn.Object===Object&&Hn,ee=typeof self=="object"&&self&&self.Object===Object&&self,W=J||ee||Function("return this")(),F=t&&!t.nodeType&&t,z=F&&!0&&e&&!e.nodeType&&e,V=z&&z.exports===F,N=V&&J.process,te=function(){try{return N&&N.binding&&N.binding("util")}catch{}}(),K=te&&te.isTypedArray;function G(U,Q){for(var ue=-1,ke=U==null?0:U.length,Xt=0,dt=[];++ue<ke;){var on=U[ue];Q(on,ue,U)&&(dt[Xt++]=on)}return dt}function oe(U,Q){for(var ue=-1,ke=Q.length,Xt=U.length;++ue<ke;)U[Xt+ue]=Q[ue];return U}function ne(U,Q){for(var ue=-1,ke=U==null?0:U.length;++ue<ke;)if(Q(U[ue],ue,U))return!0;return!1}function re(U,Q){for(var ue=-1,ke=Array(U);++ue<U;)ke[ue]=Q(ue);return ke}function ae(U){return function(Q){return U(Q)}}function le(U,Q){return U.has(Q)}function ye(U,Q){return U==null?void 0:U[Q]}function ge(U){var Q=-1,ue=Array(U.size);return U.forEach(function(ke,Xt){ue[++Q]=[Xt,ke]}),ue}function be(U,Q){return function(ue){return U(Q(ue))}}function Me(U){var Q=-1,ue=Array(U.size);return U.forEach(function(ke){ue[++Q]=ke}),ue}var ce=Array.prototype,de=Function.prototype,Ce=Object.prototype,Ge=W["__core-js_shared__"],we=de.toString,ve=Ce.hasOwnProperty,Pe=function(){var U=/[^.]+$/.exec(Ge&&Ge.keys&&Ge.keys.IE_PROTO||"");return U?"Symbol(src)_1."+U:""}(),Ze=Ce.toString,_t=RegExp("^"+we.call(ve).replace(Y,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Te=V?W.Buffer:void 0,Re=W.Symbol,at=W.Uint8Array,Ue=Ce.propertyIsEnumerable,mt=ce.splice,ut=Re?Re.toStringTag:void 0,At=Object.getOwnPropertySymbols,Ke=Te?Te.isBuffer:void 0,Le=be(Object.keys,Object),Ve=co(W,"DataView"),et=co(W,"Map"),Fe=co(W,"Promise"),tt=co(W,"Set"),vt=co(W,"WeakMap"),ot=co(Object,"create"),Ne=ca(Ve),Ee=ca(et),Ye=ca(Fe),xt=ca(tt),nt=ca(vt),bt=Re?Re.prototype:void 0,Jt=bt?bt.valueOf:void 0;function Ft(U){var Q=-1,ue=U==null?0:U.length;for(this.clear();++Q<ue;){var ke=U[Q];this.set(ke[0],ke[1])}}function Bt(){this.__data__=ot?ot(null):{},this.size=0}function fn(U){var Q=this.has(U)&&delete this.__data__[U];return this.size-=Q?1:0,Q}function qt(U){var Q=this.__data__;if(ot){var ue=Q[U];return ue===r?void 0:ue}return ve.call(Q,U)?Q[U]:void 0}function $e(U){var Q=this.__data__;return ot?Q[U]!==void 0:ve.call(Q,U)}function Je(U,Q){var ue=this.__data__;return this.size+=this.has(U)?0:1,ue[U]=ot&&Q===void 0?r:Q,this}Ft.prototype.clear=Bt,Ft.prototype.delete=fn,Ft.prototype.get=qt,Ft.prototype.has=$e,Ft.prototype.set=Je;function St(U){var Q=-1,ue=U==null?0:U.length;for(this.clear();++Q<ue;){var ke=U[Q];this.set(ke[0],ke[1])}}function an(){this.__data__=[],this.size=0}function Yt(U){var Q=this.__data__,ue=Jr(Q,U);if(ue<0)return!1;var ke=Q.length-1;return ue==ke?Q.pop():mt.call(Q,ue,1),--this.size,!0}function ze(U){var Q=this.__data__,ue=Jr(Q,U);return ue<0?void 0:Q[ue][1]}function Be(U){return Jr(this.__data__,U)>-1}function ht(U,Q){var ue=this.__data__,ke=Jr(ue,U);return ke<0?(++this.size,ue.push([U,Q])):ue[ke][1]=Q,this}St.prototype.clear=an,St.prototype.delete=Yt,St.prototype.get=ze,St.prototype.has=Be,St.prototype.set=ht;function Rt(U){var Q=-1,ue=U==null?0:U.length;for(this.clear();++Q<ue;){var ke=U[Q];this.set(ke[0],ke[1])}}function Tt(){this.size=0,this.__data__={hash:new Ft,map:new(et||St),string:new Ft}}function Qe(U){var Q=$i(this,U).delete(U);return this.size-=Q?1:0,Q}function $t(U){return $i(this,U).get(U)}function vr(U){return $i(this,U).has(U)}function ln(U,Q){var ue=$i(this,U),ke=ue.size;return ue.set(U,Q),this.size+=ue.size==ke?0:1,this}Rt.prototype.clear=Tt,Rt.prototype.delete=Qe,Rt.prototype.get=$t,Rt.prototype.has=vr,Rt.prototype.set=ln;function cn(U){var Q=-1,ue=U==null?0:U.length;for(this.__data__=new Rt;++Q<ue;)this.add(U[Q])}function An(U){return this.__data__.set(U,r),this}function ia(U){return this.__data__.has(U)}cn.prototype.add=cn.prototype.push=An,cn.prototype.has=ia;function Ct(U){var Q=this.__data__=new St(U);this.size=Q.size}function aa(){this.__data__=new St,this.size=0}function Ae(U){var Q=this.__data__,ue=Q.delete(U);return this.size=Q.size,ue}function Er(U){return this.__data__.get(U)}function oa(U){return this.__data__.has(U)}function so(U,Q){var ue=this.__data__;if(ue instanceof St){var ke=ue.__data__;if(!et||ke.length<n-1)return ke.push([U,Q]),this.size=++ue.size,this;ue=this.__data__=new Rt(ke)}return ue.set(U,Q),this.size=ue.size,this}Ct.prototype.clear=aa,Ct.prototype.delete=Ae,Ct.prototype.get=Er,Ct.prototype.has=oa,Ct.prototype.set=so;function lo(U,Q){var ue=Bc(U),ke=!ue&&rT(U),Xt=!ue&&!ke&&kh(U),dt=!ue&&!ke&&!Xt&&e1(U),on=ue||ke||Xt||dt,vn=on?re(U.length,String):[],wn=vn.length;for(var Qt in U)ve.call(U,Qt)&&!(on&&(Qt=="length"||Xt&&(Qt=="offset"||Qt=="parent")||dt&&(Qt=="buffer"||Qt=="byteLength"||Qt=="byteOffset")||J5(Qt,wn)))&&vn.push(Qt);return vn}function Jr(U,Q){for(var ue=U.length;ue--;)if(Xv(U[ue][0],Q))return ue;return-1}function Lc(U,Q,ue){var ke=Q(U);return Bc(U)?ke:oe(ke,ue(U))}function Qr(U){return U==null?U===void 0?k:x:ut&&ut in Object(U)?X5(U):nT(U)}function As(U){return Ds(U)&&Qr(U)==s}function sa(U,Q,ue,ke,Xt){return U===Q?!0:U==null||Q==null||!Ds(U)&&!Ds(Q)?U!==U&&Q!==Q:Rs(U,Q,ue,ke,sa,Xt)}function Rs(U,Q,ue,ke,Xt,dt){var on=Bc(U),vn=Bc(Q),wn=on?l:ki(U),Qt=vn?l:ki(Q);wn=wn==s?_:wn,Qt=Qt==s?_:Qt;var Jn=wn==_,br=Qt==_,Cn=wn==Qt;if(Cn&&kh(U)){if(!kh(Q))return!1;on=!0,Jn=!1}if(Cn&&!Jn)return dt||(dt=new Ct),on||e1(U)?Rn(U,Q,ue,ke,Xt,dt):Th(U,Q,wn,ue,ke,Xt,dt);if(!(ue&i)){var rr=Jn&&ve.call(U,"__wrapped__"),ir=br&&ve.call(Q,"__wrapped__");if(rr||ir){var Mi=rr?U.value():U,ei=ir?Q.value():Q;return dt||(dt=new Ct),Xt(Mi,ei,ue,ke,dt)}}return Cn?(dt||(dt=new Ct),$h(U,Q,ue,ke,Xt,dt)):!1}function Fc(U){if(!Qv(U)||eT(U))return!1;var Q=Kv(U)?_t:q;return Q.test(ca(U))}function la(U){return Ds(U)&&Jv(U.length)&&!!X[Qr(U)]}function zc(U){if(!tT(U))return Le(U);var Q=[];for(var ue in Object(U))ve.call(U,ue)&&ue!="constructor"&&Q.push(ue);return Q}function Rn(U,Q,ue,ke,Xt,dt){var on=ue&i,vn=U.length,wn=Q.length;if(vn!=wn&&!(on&&wn>vn))return!1;var Qt=dt.get(U);if(Qt&&dt.get(Q))return Qt==Q;var Jn=-1,br=!0,Cn=ue&a?new cn:void 0;for(dt.set(U,Q),dt.set(Q,U);++Jn<vn;){var rr=U[Jn],ir=Q[Jn];if(ke)var Mi=on?ke(ir,rr,Jn,Q,U,dt):ke(rr,ir,Jn,U,Q,dt);if(Mi!==void 0){if(Mi)continue;br=!1;break}if(Cn){if(!ne(Q,function(ei,ua){if(!le(Cn,ua)&&(rr===ei||Xt(rr,ei,ue,ke,dt)))return Cn.push(ua)})){br=!1;break}}else if(!(rr===ir||Xt(rr,ir,ue,ke,dt))){br=!1;break}}return dt.delete(U),dt.delete(Q),br}function Th(U,Q,ue,ke,Xt,dt,on){switch(ue){case E:if(U.byteLength!=Q.byteLength||U.byteOffset!=Q.byteOffset)return!1;U=U.buffer,Q=Q.buffer;case T:return!(U.byteLength!=Q.byteLength||!dt(new at(U),new at(Q)));case u:case d:case g:return Xv(+U,+Q);case f:return U.name==Q.name&&U.message==Q.message;case b:case M:return U==Q+"";case m:var vn=ge;case S:var wn=ke&i;if(vn||(vn=Me),U.size!=Q.size&&!wn)return!1;var Qt=on.get(U);if(Qt)return Qt==Q;ke|=a,on.set(U,Q);var Jn=Rn(vn(U),vn(Q),ke,Xt,dt,on);return on.delete(U),Jn;case $:if(Jt)return Jt.call(U)==Jt.call(Q)}return!1}function $h(U,Q,ue,ke,Xt,dt){var on=ue&i,vn=Or(U),wn=vn.length,Qt=Or(Q),Jn=Qt.length;if(wn!=Jn&&!on)return!1;for(var br=wn;br--;){var Cn=vn[br];if(!(on?Cn in Q:ve.call(Q,Cn)))return!1}var rr=dt.get(U);if(rr&&dt.get(Q))return rr==Q;var ir=!0;dt.set(U,Q),dt.set(Q,U);for(var Mi=on;++br<wn;){Cn=vn[br];var ei=U[Cn],ua=Q[Cn];if(ke)var t1=on?ke(ua,ei,Cn,Q,U,dt):ke(ei,ua,Cn,U,Q,dt);if(!(t1===void 0?ei===ua||Xt(ei,ua,ue,ke,dt):t1)){ir=!1;break}Mi||(Mi=Cn=="constructor")}if(ir&&!Mi){var Wc=U.constructor,Uc=Q.constructor;Wc!=Uc&&"constructor"in U&&"constructor"in Q&&!(typeof Wc=="function"&&Wc instanceof Wc&&typeof Uc=="function"&&Uc instanceof Uc)&&(ir=!1)}return dt.delete(U),dt.delete(Q),ir}function Or(U){return Lc(U,oT,K5)}function $i(U,Q){var ue=U.__data__;return Q5(Q)?ue[typeof Q=="string"?"string":"hash"]:ue.map}function co(U,Q){var ue=ye(U,Q);return Fc(ue)?ue:void 0}function X5(U){var Q=ve.call(U,ut),ue=U[ut];try{U[ut]=void 0;var ke=!0}catch{}var Xt=Ze.call(U);return ke&&(Q?U[ut]=ue:delete U[ut]),Xt}var K5=At?function(U){return U==null?[]:(U=Object(U),G(At(U),function(Q){return Ue.call(U,Q)}))}:sT,ki=Qr;(Ve&&ki(new Ve(new ArrayBuffer(1)))!=E||et&&ki(new et)!=m||Fe&&ki(Fe.resolve())!=w||tt&&ki(new tt)!=S||vt&&ki(new vt)!=R)&&(ki=function(U){var Q=Qr(U),ue=Q==_?U.constructor:void 0,ke=ue?ca(ue):"";if(ke)switch(ke){case Ne:return E;case Ee:return m;case Ye:return w;case xt:return S;case nt:return R}return Q});function J5(U,Q){return Q=Q??o,!!Q&&(typeof U=="number"||Z.test(U))&&U>-1&&U%1==0&&U<Q}function Q5(U){var Q=typeof U;return Q=="string"||Q=="number"||Q=="symbol"||Q=="boolean"?U!=="__proto__":U===null}function eT(U){return!!Pe&&Pe in U}function tT(U){var Q=U&&U.constructor,ue=typeof Q=="function"&&Q.prototype||Ce;return U===ue}function nT(U){return Ze.call(U)}function ca(U){if(U!=null){try{return we.call(U)}catch{}try{return U+""}catch{}}return""}function Xv(U,Q){return U===Q||U!==U&&Q!==Q}var rT=As(function(){return arguments}())?As:function(U){return Ds(U)&&ve.call(U,"callee")&&!Ue.call(U,"callee")},Bc=Array.isArray;function iT(U){return U!=null&&Jv(U.length)&&!Kv(U)}var kh=Ke||lT;function aT(U,Q){return sa(U,Q)}function Kv(U){if(!Qv(U))return!1;var Q=Qr(U);return Q==h||Q==p||Q==c||Q==C}function Jv(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=o}function Qv(U){var Q=typeof U;return U!=null&&(Q=="object"||Q=="function")}function Ds(U){return U!=null&&typeof U=="object"}var e1=K?ae(K):la;function oT(U){return iT(U)?lo(U):zc(U)}function sT(){return[]}function lT(){return!1}e.exports=aT})(Zu,Zu.exports);var kR=Zu.exports,e3={exports:{}};(function(e,t){var n=function(){var r=function(b,S){var M=236,$=17,k=b,R=a[S],T=null,E=0,A=null,j=[],I={},D=function(W,F){E=k*4+17,T=function(z){for(var V=new Array(z),N=0;N<z;N+=1){V[N]=new Array(z);for(var te=0;te<z;te+=1)V[N][te]=null}return V}(E),O(0,0),O(E-7,0),O(0,E-7),P(),B(),Y(W,F),k>=7&&H(W),A==null&&(A=X(k,R,j)),q(A,F)},O=function(W,F){for(var z=-1;z<=7;z+=1)if(!(W+z<=-1||E<=W+z))for(var V=-1;V<=7;V+=1)F+V<=-1||E<=F+V||(0<=z&&z<=6&&(V==0||V==6)||0<=V&&V<=6&&(z==0||z==6)||2<=z&&z<=4&&2<=V&&V<=4?T[W+z][F+V]=!0:T[W+z][F+V]=!1)},L=function(){for(var W=0,F=0,z=0;z<8;z+=1){D(!0,z);var V=s.getLostPoint(I);(z==0||W>V)&&(W=V,F=z)}return F},B=function(){for(var W=8;W<E-8;W+=1)T[W][6]==null&&(T[W][6]=W%2==0);for(var F=8;F<E-8;F+=1)T[6][F]==null&&(T[6][F]=F%2==0)},P=function(){for(var W=s.getPatternPosition(k),F=0;F<W.length;F+=1)for(var z=0;z<W.length;z+=1){var V=W[F],N=W[z];if(T[V][N]==null)for(var te=-2;te<=2;te+=1)for(var K=-2;K<=2;K+=1)te==-2||te==2||K==-2||K==2||te==0&&K==0?T[V+te][N+K]=!0:T[V+te][N+K]=!1}},H=function(W){for(var F=s.getBCHTypeNumber(k),z=0;z<18;z+=1){var V=!W&&(F>>z&1)==1;T[Math.floor(z/3)][z%3+E-8-3]=V}for(var z=0;z<18;z+=1){var V=!W&&(F>>z&1)==1;T[z%3+E-8-3][Math.floor(z/3)]=V}},Y=function(W,F){for(var z=R<<3|F,V=s.getBCHTypeInfo(z),N=0;N<15;N+=1){var te=!W&&(V>>N&1)==1;N<6?T[N][8]=te:N<8?T[N+1][8]=te:T[E-15+N][8]=te}for(var N=0;N<15;N+=1){var te=!W&&(V>>N&1)==1;N<8?T[8][E-N-1]=te:N<9?T[8][15-N-1+1]=te:T[8][15-N-1]=te}T[E-8][8]=!W},q=function(W,F){for(var z=-1,V=E-1,N=7,te=0,K=s.getMaskFunction(F),G=E-1;G>0;G-=2)for(G==6&&(G-=1);;){for(var oe=0;oe<2;oe+=1)if(T[V][G-oe]==null){var ne=!1;te<W.length&&(ne=(W[te]>>>N&1)==1);var re=K(V,G-oe);re&&(ne=!ne),T[V][G-oe]=ne,N-=1,N==-1&&(te+=1,N=7)}if(V+=z,V<0||E<=V){V-=z,z=-z;break}}},Z=function(W,F){for(var z=0,V=0,N=0,te=new Array(F.length),K=new Array(F.length),G=0;G<F.length;G+=1){var oe=F[G].dataCount,ne=F[G].totalCount-oe;V=Math.max(V,oe),N=Math.max(N,ne),te[G]=new Array(oe);for(var re=0;re<te[G].length;re+=1)te[G][re]=255&W.getBuffer()[re+z];z+=oe;var ae=s.getErrorCorrectPolynomial(ne),le=c(te[G],ae.getLength()-1),ye=le.mod(ae);K[G]=new Array(ae.getLength()-1);for(var re=0;re<K[G].length;re+=1){var ge=re+ye.getLength()-K[G].length;K[G][re]=ge>=0?ye.getAt(ge):0}}for(var be=0,re=0;re<F.length;re+=1)be+=F[re].totalCount;for(var Me=new Array(be),ce=0,re=0;re<V;re+=1)for(var G=0;G<F.length;G+=1)re<te[G].length&&(Me[ce]=te[G][re],ce+=1);for(var re=0;re<N;re+=1)for(var G=0;G<F.length;G+=1)re<K[G].length&&(Me[ce]=K[G][re],ce+=1);return Me},X=function(W,F,z){for(var V=u.getRSBlocks(W,F),N=d(),te=0;te<z.length;te+=1){var K=z[te];N.put(K.getMode(),4),N.put(K.getLength(),s.getLengthInBits(K.getMode(),W)),K.write(N)}for(var G=0,te=0;te<V.length;te+=1)G+=V[te].dataCount;if(N.getLengthInBits()>G*8)throw"code length overflow. ("+N.getLengthInBits()+">"+G*8+")";for(N.getLengthInBits()+4<=G*8&&N.put(0,4);N.getLengthInBits()%8!=0;)N.putBit(!1);for(;!(N.getLengthInBits()>=G*8||(N.put(M,8),N.getLengthInBits()>=G*8));)N.put($,8);return Z(N,V)};I.addData=function(W,F){F=F||"Byte";var z=null;switch(F){case"Numeric":z=f(W);break;case"Alphanumeric":z=h(W);break;case"Byte":z=p(W);break;case"Kanji":z=m(W);break;default:throw"mode:"+F}j.push(z),A=null},I.isDark=function(W,F){if(W<0||E<=W||F<0||E<=F)throw W+","+F;return T[W][F]},I.getModuleCount=function(){return E},I.make=function(){if(k<1){for(var W=1;W<40;W++){for(var F=u.getRSBlocks(W,R),z=d(),V=0;V<j.length;V++){var N=j[V];z.put(N.getMode(),4),z.put(N.getLength(),s.getLengthInBits(N.getMode(),W)),N.write(z)}for(var te=0,V=0;V<F.length;V++)te+=F[V].dataCount;if(z.getLengthInBits()<=te*8)break}k=W}D(!1,L())},I.createTableTag=function(W,F){W=W||2,F=typeof F>"u"?W*4:F;var z="";z+='<table style="',z+=" border-width: 0px; border-style: none;",z+=" border-collapse: collapse;",z+=" padding: 0px; margin: "+F+"px;",z+='">',z+="<tbody>";for(var V=0;V<I.getModuleCount();V+=1){z+="<tr>";for(var N=0;N<I.getModuleCount();N+=1)z+='<td style="',z+=" border-width: 0px; border-style: none;",z+=" border-collapse: collapse;",z+=" padding: 0px; margin: 0px;",z+=" width: "+W+"px;",z+=" height: "+W+"px;",z+=" background-color: ",z+=I.isDark(V,N)?"#000000":"#ffffff",z+=";",z+='"/>';z+="</tr>"}return z+="</tbody>",z+="</table>",z},I.createSvgTag=function(W,F,z,V){var N={};typeof arguments[0]=="object"&&(N=arguments[0],W=N.cellSize,F=N.margin,z=N.alt,V=N.title),W=W||2,F=typeof F>"u"?W*4:F,z=typeof z=="string"?{text:z}:z||{},z.text=z.text||null,z.id=z.text?z.id||"qrcode-description":null,V=typeof V=="string"?{text:V}:V||{},V.text=V.text||null,V.id=V.text?V.id||"qrcode-title":null;var te=I.getModuleCount()*W+F*2,K,G,oe,ne,re="",ae;for(ae="l"+W+",0 0,"+W+" -"+W+",0 0,-"+W+"z ",re+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',re+=N.scalable?"":' width="'+te+'px" height="'+te+'px"',re+=' viewBox="0 0 '+te+" "+te+'" ',re+=' preserveAspectRatio="xMinYMin meet"',re+=V.text||z.text?' role="img" aria-labelledby="'+J([V.id,z.id].join(" ").trim())+'"':"",re+=">",re+=V.text?'<title id="'+J(V.id)+'">'+J(V.text)+"</title>":"",re+=z.text?'<description id="'+J(z.id)+'">'+J(z.text)+"</description>":"",re+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',re+='<path d="',oe=0;oe<I.getModuleCount();oe+=1)for(ne=oe*W+F,K=0;K<I.getModuleCount();K+=1)I.isDark(oe,K)&&(G=K*W+F,re+="M"+G+","+ne+ae);return re+='" stroke="transparent" fill="black"/>',re+="</svg>",re},I.createDataURL=function(W,F){W=W||2,F=typeof F>"u"?W*4:F;var z=I.getModuleCount()*W+F*2,V=F,N=z-F;return C(z,z,function(te,K){if(V<=te&&te<N&&V<=K&&K<N){var G=Math.floor((te-V)/W),oe=Math.floor((K-V)/W);return I.isDark(oe,G)?0:1}else return 1})},I.createImgTag=function(W,F,z){W=W||2,F=typeof F>"u"?W*4:F;var V=I.getModuleCount()*W+F*2,N="";return N+="<img",N+=' src="',N+=I.createDataURL(W,F),N+='"',N+=' width="',N+=V,N+='"',N+=' height="',N+=V,N+='"',z&&(N+=' alt="',N+=J(z),N+='"'),N+="/>",N};var J=function(W){for(var F="",z=0;z<W.length;z+=1){var V=W.charAt(z);switch(V){case"<":F+="<";break;case">":F+=">";break;case"&":F+="&";break;case'"':F+=""";break;default:F+=V;break}}return F},ee=function(W){var F=1;W=typeof W>"u"?F*2:W;var z=I.getModuleCount()*F+W*2,V=W,N=z-W,te,K,G,oe,ne,re={"██":"█","█ ":"▀"," █":"▄"," ":" "},ae={"██":"▀","█ ":"▀"," █":" "," ":" "},le="";for(te=0;te<z;te+=2){for(G=Math.floor((te-V)/F),oe=Math.floor((te+1-V)/F),K=0;K<z;K+=1)ne="█",V<=K&&K<N&&V<=te&&te<N&&I.isDark(G,Math.floor((K-V)/F))&&(ne=" "),V<=K&&K<N&&V<=te+1&&te+1<N&&I.isDark(oe,Math.floor((K-V)/F))?ne+=" ":ne+="█",le+=W<1&&te+1>=N?ae[ne]:re[ne];le+=`
|
|
245
245
|
`}return z%2&&W>0?le.substring(0,le.length-z-1)+Array(z+1).join("▀"):le.substring(0,le.length-1)};return I.createASCII=function(W,F){if(W=W||1,W<2)return ee(F);W-=1,F=typeof F>"u"?W*2:F;var z=I.getModuleCount()*W+F*2,V=F,N=z-F,te,K,G,oe,ne=Array(W+1).join("██"),re=Array(W+1).join(" "),ae="",le="";for(te=0;te<z;te+=1){for(G=Math.floor((te-V)/W),le="",K=0;K<z;K+=1)oe=1,V<=K&&K<N&&V<=te&&te<N&&I.isDark(G,Math.floor((K-V)/W))&&(oe=0),le+=oe?ne:re;for(G=0;G<W;G+=1)ae+=le+`
|
|
246
|
-
`}return ae.substring(0,ae.length-1)},I.renderTo2dContext=function(W,F){F=F||2;for(var z=I.getModuleCount(),V=0;V<z;V++)for(var N=0;N<z;N++)W.fillStyle=I.isDark(V,N)?"black":"white",W.fillRect(V*F,N*F,F,F)},I};r.stringToBytesFuncs={default:function(b){for(var S=[],M=0;M<b.length;M+=1){var $=b.charCodeAt(M);S.push($&255)}return S}},r.stringToBytes=r.stringToBytesFuncs.default,r.createStringToBytes=function(b,S){var M=function(){for(var k=_(b),R=function(){var B=k.read();if(B==-1)throw"eof";return B},T=0,E={};;){var A=k.read();if(A==-1)break;var j=R(),I=R(),D=R(),O=String.fromCharCode(A<<8|j),L=I<<8|D;E[O]=L,T+=1}if(T!=S)throw T+" != "+S;return E}(),$=63;return function(k){for(var R=[],T=0;T<k.length;T+=1){var E=k.charCodeAt(T);if(E<128)R.push(E);else{var A=M[k.charAt(T)];typeof A=="number"?(A&255)==A?R.push(A):(R.push(A>>>8),R.push(A&255)):R.push($)}}return R}};var i={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},a={L:1,M:0,Q:3,H:2},o={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},s=function(){var b=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],S=1335,M=7973,$=21522,k={},R=function(T){for(var E=0;T!=0;)E+=1,T>>>=1;return E};return k.getBCHTypeInfo=function(T){for(var E=T<<10;R(E)-R(S)>=0;)E^=S<<R(E)-R(S);return(T<<10|E)^$},k.getBCHTypeNumber=function(T){for(var E=T<<12;R(E)-R(M)>=0;)E^=M<<R(E)-R(M);return T<<12|E},k.getPatternPosition=function(T){return b[T-1]},k.getMaskFunction=function(T){switch(T){case o.PATTERN000:return function(E,A){return(E+A)%2==0};case o.PATTERN001:return function(E,A){return E%2==0};case o.PATTERN010:return function(E,A){return A%3==0};case o.PATTERN011:return function(E,A){return(E+A)%3==0};case o.PATTERN100:return function(E,A){return(Math.floor(E/2)+Math.floor(A/3))%2==0};case o.PATTERN101:return function(E,A){return E*A%2+E*A%3==0};case o.PATTERN110:return function(E,A){return(E*A%2+E*A%3)%2==0};case o.PATTERN111:return function(E,A){return(E*A%3+(E+A)%2)%2==0};default:throw"bad maskPattern:"+T}},k.getErrorCorrectPolynomial=function(T){for(var E=c([1],0),A=0;A<T;A+=1)E=E.multiply(c([1,l.gexp(A)],0));return E},k.getLengthInBits=function(T,E){if(1<=E&&E<10)switch(T){case i.MODE_NUMBER:return 10;case i.MODE_ALPHA_NUM:return 9;case i.MODE_8BIT_BYTE:return 8;case i.MODE_KANJI:return 8;default:throw"mode:"+T}else if(E<27)switch(T){case i.MODE_NUMBER:return 12;case i.MODE_ALPHA_NUM:return 11;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 10;default:throw"mode:"+T}else if(E<41)switch(T){case i.MODE_NUMBER:return 14;case i.MODE_ALPHA_NUM:return 13;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 12;default:throw"mode:"+T}else throw"type:"+E},k.getLostPoint=function(T){for(var E=T.getModuleCount(),A=0,j=0;j<E;j+=1)for(var I=0;I<E;I+=1){for(var D=0,O=T.isDark(j,I),L=-1;L<=1;L+=1)if(!(j+L<0||E<=j+L))for(var B=-1;B<=1;B+=1)I+B<0||E<=I+B||L==0&&B==0||O==T.isDark(j+L,I+B)&&(D+=1);D>5&&(A+=3+D-5)}for(var j=0;j<E-1;j+=1)for(var I=0;I<E-1;I+=1){var P=0;T.isDark(j,I)&&(P+=1),T.isDark(j+1,I)&&(P+=1),T.isDark(j,I+1)&&(P+=1),T.isDark(j+1,I+1)&&(P+=1),(P==0||P==4)&&(A+=3)}for(var j=0;j<E;j+=1)for(var I=0;I<E-6;I+=1)T.isDark(j,I)&&!T.isDark(j,I+1)&&T.isDark(j,I+2)&&T.isDark(j,I+3)&&T.isDark(j,I+4)&&!T.isDark(j,I+5)&&T.isDark(j,I+6)&&(A+=40);for(var I=0;I<E;I+=1)for(var j=0;j<E-6;j+=1)T.isDark(j,I)&&!T.isDark(j+1,I)&&T.isDark(j+2,I)&&T.isDark(j+3,I)&&T.isDark(j+4,I)&&!T.isDark(j+5,I)&&T.isDark(j+6,I)&&(A+=40);for(var H=0,I=0;I<E;I+=1)for(var j=0;j<E;j+=1)T.isDark(j,I)&&(H+=1);var Y=Math.abs(100*H/E/E-50)/5;return A+=Y*10,A},k}(),l=function(){for(var b=new Array(256),S=new Array(256),M=0;M<8;M+=1)b[M]=1<<M;for(var M=8;M<256;M+=1)b[M]=b[M-4]^b[M-5]^b[M-6]^b[M-8];for(var M=0;M<255;M+=1)S[b[M]]=M;var $={};return $.glog=function(k){if(k<1)throw"glog("+k+")";return S[k]},$.gexp=function(k){for(;k<0;)k+=255;for(;k>=256;)k-=255;return b[k]},$}();function c(b,S){if(typeof b.length>"u")throw b.length+"/"+S;var M=function(){for(var k=0;k<b.length&&b[k]==0;)k+=1;for(var R=new Array(b.length-k+S),T=0;T<b.length-k;T+=1)R[T]=b[T+k];return R}(),$={};return $.getAt=function(k){return M[k]},$.getLength=function(){return M.length},$.multiply=function(k){for(var R=new Array($.getLength()+k.getLength()-1),T=0;T<$.getLength();T+=1)for(var E=0;E<k.getLength();E+=1)R[T+E]^=l.gexp(l.glog($.getAt(T))+l.glog(k.getAt(E)));return c(R,0)},$.mod=function(k){if($.getLength()-k.getLength()<0)return $;for(var R=l.glog($.getAt(0))-l.glog(k.getAt(0)),T=new Array($.getLength()),E=0;E<$.getLength();E+=1)T[E]=$.getAt(E);for(var E=0;E<k.getLength();E+=1)T[E]^=l.gexp(l.glog(k.getAt(E))+R);return c(T,0).mod(k)},$}var u=function(){var b=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],S=function(k,R){var T={};return T.totalCount=k,T.dataCount=R,T},M={},$=function(k,R){switch(R){case a.L:return b[(k-1)*4+0];case a.M:return b[(k-1)*4+1];case a.Q:return b[(k-1)*4+2];case a.H:return b[(k-1)*4+3];default:return}};return M.getRSBlocks=function(k,R){var T=$(k,R);if(typeof T>"u")throw"bad rs block @ typeNumber:"+k+"/errorCorrectionLevel:"+R;for(var E=T.length/3,A=[],j=0;j<E;j+=1)for(var I=T[j*3+0],D=T[j*3+1],O=T[j*3+2],L=0;L<I;L+=1)A.push(S(D,O));return A},M}(),d=function(){var b=[],S=0,M={};return M.getBuffer=function(){return b},M.getAt=function($){var k=Math.floor($/8);return(b[k]>>>7-$%8&1)==1},M.put=function($,k){for(var R=0;R<k;R+=1)M.putBit(($>>>k-R-1&1)==1)},M.getLengthInBits=function(){return S},M.putBit=function($){var k=Math.floor(S/8);b.length<=k&&b.push(0),$&&(b[k]|=128>>>S%8),S+=1},M},f=function(b){var S=i.MODE_NUMBER,M=b,$={};$.getMode=function(){return S},$.getLength=function(T){return M.length},$.write=function(T){for(var E=M,A=0;A+2<E.length;)T.put(k(E.substring(A,A+3)),10),A+=3;A<E.length&&(E.length-A==1?T.put(k(E.substring(A,A+1)),4):E.length-A==2&&T.put(k(E.substring(A,A+2)),7))};var k=function(T){for(var E=0,A=0;A<T.length;A+=1)E=E*10+R(T.charAt(A));return E},R=function(T){if("0"<=T&&T<="9")return T.charCodeAt(0)-48;throw"illegal char :"+T};return $},h=function(b){var S=i.MODE_ALPHA_NUM,M=b,$={};$.getMode=function(){return S},$.getLength=function(R){return M.length},$.write=function(R){for(var T=M,E=0;E+1<T.length;)R.put(k(T.charAt(E))*45+k(T.charAt(E+1)),11),E+=2;E<T.length&&R.put(k(T.charAt(E)),6)};var k=function(R){if("0"<=R&&R<="9")return R.charCodeAt(0)-48;if("A"<=R&&R<="Z")return R.charCodeAt(0)-65+10;switch(R){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+R}};return $},p=function(b){var S=i.MODE_8BIT_BYTE,M=r.stringToBytes(b),$={};return $.getMode=function(){return S},$.getLength=function(k){return M.length},$.write=function(k){for(var R=0;R<M.length;R+=1)k.put(M[R],8)},$},m=function(b){var S=i.MODE_KANJI,M=r.stringToBytesFuncs.SJIS;if(!M)throw"sjis not supported.";(function(R,T){var E=M(R);if(E.length!=2||(E[0]<<8|E[1])!=T)throw"sjis not supported."})("友",38726);var $=M(b),k={};return k.getMode=function(){return S},k.getLength=function(R){return~~($.length/2)},k.write=function(R){for(var T=$,E=0;E+1<T.length;){var A=(255&T[E])<<8|255&T[E+1];if(33088<=A&&A<=40956)A-=33088;else if(57408<=A&&A<=60351)A-=49472;else throw"illegal char at "+(E+1)+"/"+A;A=(A>>>8&255)*192+(A&255),R.put(A,13),E+=2}if(E<T.length)throw"illegal char at "+(E+1)},k},g=function(){var b=[],S={};return S.writeByte=function(M){b.push(M&255)},S.writeShort=function(M){S.writeByte(M),S.writeByte(M>>>8)},S.writeBytes=function(M,$,k){$=$||0,k=k||M.length;for(var R=0;R<k;R+=1)S.writeByte(M[R+$])},S.writeString=function(M){for(var $=0;$<M.length;$+=1)S.writeByte(M.charCodeAt($))},S.toByteArray=function(){return b},S.toString=function(){var M="";M+="[";for(var $=0;$<b.length;$+=1)$>0&&(M+=","),M+=b[$];return M+="]",M},S},x=function(){var b=0,S=0,M=0,$="",k={},R=function(E){$+=String.fromCharCode(T(E&63))},T=function(E){if(!(E<0)){if(E<26)return 65+E;if(E<52)return 97+(E-26);if(E<62)return 48+(E-52);if(E==62)return 43;if(E==63)return 47}throw"n:"+E};return k.writeByte=function(E){for(b=b<<8|E&255,S+=8,M+=1;S>=6;)R(b>>>S-6),S-=6},k.flush=function(){if(S>0&&(R(b<<6-S),b=0,S=0),M%3!=0)for(var E=3-M%3,A=0;A<E;A+=1)$+="="},k.toString=function(){return $},k},_=function(b){var S=b,M=0,$=0,k=0,R={};R.read=function(){for(;k<8;){if(M>=S.length){if(k==0)return-1;throw"unexpected end of file./"+k}var E=S.charAt(M);if(M+=1,E=="=")return k=0,-1;if(E.match(/^\s$/))continue;$=$<<6|T(E.charCodeAt(0)),k+=6}var A=$>>>k-8&255;return k-=8,A};var T=function(E){if(65<=E&&E<=90)return E-65;if(97<=E&&E<=122)return E-97+26;if(48<=E&&E<=57)return E-48+52;if(E==43)return 62;if(E==47)return 63;throw"c:"+E};return R},w=function(b,S){var M=b,$=S,k=new Array(b*S),R={};R.setPixel=function(j,I,D){k[I*M+j]=D},R.write=function(j){j.writeString("GIF87a"),j.writeShort(M),j.writeShort($),j.writeByte(128),j.writeByte(0),j.writeByte(0),j.writeByte(0),j.writeByte(0),j.writeByte(0),j.writeByte(255),j.writeByte(255),j.writeByte(255),j.writeString(","),j.writeShort(0),j.writeShort(0),j.writeShort(M),j.writeShort($),j.writeByte(0);var I=2,D=E(I);j.writeByte(I);for(var O=0;D.length-O>255;)j.writeByte(255),j.writeBytes(D,O,255),O+=255;j.writeByte(D.length-O),j.writeBytes(D,O,D.length-O),j.writeByte(0),j.writeString(";")};var T=function(j){var I=j,D=0,O=0,L={};return L.write=function(B,P){if(B>>>P)throw"length over";for(;D+P>=8;)I.writeByte(255&(B<<D|O)),P-=8-D,B>>>=8-D,O=0,D=0;O=B<<D|O,D=D+P},L.flush=function(){D>0&&I.writeByte(O)},L},E=function(j){for(var I=1<<j,D=(1<<j)+1,O=j+1,L=A(),B=0;B<I;B+=1)L.add(String.fromCharCode(B));L.add(String.fromCharCode(I)),L.add(String.fromCharCode(D));var P=g(),H=T(P);H.write(I,O);var Y=0,q=String.fromCharCode(k[Y]);for(Y+=1;Y<k.length;){var Z=String.fromCharCode(k[Y]);Y+=1,L.contains(q+Z)?q=q+Z:(H.write(L.indexOf(q),O),L.size()<4095&&(L.size()==1<<O&&(O+=1),L.add(q+Z)),q=Z)}return H.write(L.indexOf(q),O),H.write(D,O),H.flush(),P.toByteArray()},A=function(){var j={},I=0,D={};return D.add=function(O){if(D.contains(O))throw"dup key:"+O;j[O]=I,I+=1},D.size=function(){return I},D.indexOf=function(O){return j[O]},D.contains=function(O){return typeof j[O]<"u"},D};return R},C=function(b,S,M){for(var $=w(b,S),k=0;k<S;k+=1)for(var R=0;R<b;R+=1)$.setPixel(R,k,M(R,k));var T=g();$.write(T);for(var E=x(),A=T.toByteArray(),j=0;j<A.length;j+=1)E.writeByte(A[j]);return E.flush(),"data:image/gif;base64,"+E};return r}();(function(){n.stringToBytesFuncs["UTF-8"]=function(r){function i(a){for(var o=[],s=0;s<a.length;s++){var l=a.charCodeAt(s);l<128?o.push(l):l<2048?o.push(192|l>>6,128|l&63):l<55296||l>=57344?o.push(224|l>>12,128|l>>6&63,128|l&63):(s++,l=65536+((l&1023)<<10|a.charCodeAt(s)&1023),o.push(240|l>>18,128|l>>12&63,128|l>>6&63,128|l&63))}return o}return i(r)}})(),function(r){e.exports=r()}(function(){return n})})(e3);var MR=e3.exports,ER=Hn&&Hn.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),gm=Hn&&Hn.__assign||function(){return gm=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},gm.apply(this,arguments)};Object.defineProperty(n0,"__esModule",{value:!0});exports.QRCode_1=n0.QRCode=void 0;var OR=kR,AR=MR,Xh=v,RR=function(e){ER(t,e);function t(n){var r=e.call(this,n)||this;return r.canvasRef=Xh.createRef(),r}return t.prototype.download=function(n,r){if(this.canvasRef.current){var i=void 0;switch(n){case"jpg":i="image/jpeg";break;case"webp":i="image/webp";break;case"png":default:i="image/png";break}var a=this.canvasRef.current.toDataURL(i,1),o=document.createElement("a");o.download=r??"react-qrcode-logo",o.href=a,o.click()}},t.prototype.utf16to8=function(n){var r="",i,a,o=n.length;for(i=0;i<o;i++)a=n.charCodeAt(i),a>=1&&a<=127?r+=n.charAt(i):a>2047?(r+=String.fromCharCode(224|a>>12&15),r+=String.fromCharCode(128|a>>6&63),r+=String.fromCharCode(128|a>>0&63)):(r+=String.fromCharCode(192|a>>6&31),r+=String.fromCharCode(128|a>>0&63));return r},t.prototype.drawRoundedSquare=function(n,r,i,a,o,s,l,c){c.lineWidth=n,c.fillStyle=o,c.strokeStyle=o,i+=n/2,r+=n/2,a-=n,Array.isArray(s)||(s=[s,s,s,s]),s=s.map(function(p){return p=Math.min(p,a/2),p<0?0:p});var u=s[0]||0,d=s[1]||0,f=s[2]||0,h=s[3]||0;c.beginPath(),c.moveTo(r+u,i),c.lineTo(r+a-d,i),d&&c.quadraticCurveTo(r+a,i,r+a,i+d),c.lineTo(r+a,i+a-f),f&&c.quadraticCurveTo(r+a,i+a,r+a-f,i+a),c.lineTo(r+h,i+a),h&&c.quadraticCurveTo(r,i+a,r,i+a-h),c.lineTo(r,i+u),u&&c.quadraticCurveTo(r,i,r+u,i),c.closePath(),c.stroke(),l&&c.fill()},t.prototype.drawPositioningPattern=function(n,r,i,a,o,s,l){l===void 0&&(l=[0,0,0,0]);var c=Math.ceil(r),u,d;typeof l!="number"&&!Array.isArray(l)?(u=l.outer||0,d=l.inner||0):(u=l,d=u);var f,h;typeof s!="string"?(f=s.outer,h=s.inner):(f=s,h=s);var p=a*r+i,m=o*r+i,g=r*7;this.drawRoundedSquare(c,m,p,g,f,u,!1,n),g=r*3,p+=r*2,m+=r*2,this.drawRoundedSquare(c,m,p,g,h,d,!0,n)},t.prototype.isInPositioninZone=function(n,r,i){return i.some(function(a){return r>=a.row&&r<=a.row+7&&n>=a.col&&n<=a.col+7})},t.prototype.transformPixelLengthIntoNumberOfCells=function(n,r){return n/r},t.prototype.isCoordinateInImage=function(n,r,i,a,o,s,l,c){if(c){var u=2,d=this.transformPixelLengthIntoNumberOfCells(o,l),f=this.transformPixelLengthIntoNumberOfCells(s,l),h=this.transformPixelLengthIntoNumberOfCells(i,l)-1,p=this.transformPixelLengthIntoNumberOfCells(a,l)-1;return r>=d-u&&r<=d+h+u&&n>=f-u&&n<=f+p+u}else return!1},t.prototype.shouldComponentUpdate=function(n){return!OR(this.props,n)},t.prototype.componentDidMount=function(){this.update()},t.prototype.componentDidUpdate=function(){this.update()},t.prototype.update=function(){var n,r=this.props,i=r.value,a=r.ecLevel,o=r.enableCORS,s=r.bgColor,l=r.fgColor,c=r.logoImage,u=r.logoOpacity,d=r.logoOnLoad,f=r.removeQrCodeBehindLogo,h=r.qrStyle,p=r.eyeRadius,m=r.eyeColor,g=r.logoPaddingStyle,x=+this.props.size,_=+this.props.quietZone,w=this.props.logoWidth?+this.props.logoWidth:0,C=this.props.logoHeight?+this.props.logoHeight:0,b=this.props.logoPadding?+this.props.logoPadding:0,S=AR(0,a);S.addData(this.utf16to8(i)),S.make();var M=(n=this.canvasRef)===null||n===void 0?void 0:n.current,$=M.getContext("2d"),k=x+2*_,R=S.getModuleCount(),T=x/R,E=window.devicePixelRatio||1;M.height=M.width=k*E,$.scale(E,E),$.fillStyle=s,$.fillRect(0,0,k,k);var A=_,j=[{row:0,col:0},{row:0,col:R-7},{row:R-7,col:0}];if($.strokeStyle=l,h==="dots"){$.fillStyle=l;for(var I=T/2,D=0;D<R;D++)for(var O=0;O<R;O++)S.isDark(D,O)&&!this.isInPositioninZone(D,O,j)&&($.beginPath(),$.arc(Math.round(O*T)+I+A,Math.round(D*T)+I+A,I/100*75,0,2*Math.PI,!1),$.closePath(),$.fill())}else if(h==="fluid"){for(var I=Math.ceil(T/2),D=0;D<R;D++)for(var O=0;O<R;O++)if(S.isDark(D,O)&&!this.isInPositioninZone(D,O,j)){var L=[!1,!1,!1,!1];D>0&&!S.isDark(D-1,O)&&O>0&&!S.isDark(D,O-1)&&(L[0]=!0),D>0&&!S.isDark(D-1,O)&&O<R-1&&!S.isDark(D,O+1)&&(L[1]=!0),D<R-1&&!S.isDark(D+1,O)&&O<R-1&&!S.isDark(D,O+1)&&(L[2]=!0),D<R-1&&!S.isDark(D+1,O)&&O>0&&!S.isDark(D,O-1)&&(L[3]=!0);var B=Math.ceil((O+1)*T)-Math.floor(O*T),P=Math.ceil((D+1)*T)-Math.floor(D*T);$.fillStyle=l,$.beginPath(),$.arc(Math.round(O*T)+I+A,Math.round(D*T)+I+A,I,0,2*Math.PI,!1),$.closePath(),$.fill(),L[0]||$.fillRect(Math.round(O*T)+A,Math.round(D*T)+A,B/2,P/2),L[1]||$.fillRect(Math.round(O*T)+A+Math.floor(B/2),Math.round(D*T)+A,B/2,P/2),L[2]||$.fillRect(Math.round(O*T)+A+Math.floor(B/2),Math.round(D*T)+A+Math.floor(P/2),B/2,P/2),L[3]||$.fillRect(Math.round(O*T)+A,Math.round(D*T)+A+Math.floor(P/2),B/2,P/2)}}else for(var D=0;D<R;D++)for(var O=0;O<R;O++)if(S.isDark(D,O)&&!this.isInPositioninZone(D,O,j)){$.fillStyle=l;var B=Math.ceil((O+1)*T)-Math.floor(O*T),P=Math.ceil((D+1)*T)-Math.floor(D*T);$.fillRect(Math.round(O*T)+A,Math.round(D*T)+A,B,P)}for(var H=0;H<3;H++){var Y=j[H],D=Y.row,O=Y.col,q=p,Z=void 0;Array.isArray(q)&&(q=q[H]),typeof q=="number"&&(q=[q,q,q,q]),m?Array.isArray(m)?Z=m[H]:Z=m:Z=l,this.drawPositioningPattern($,T,A,D,O,Z,q)}if(c){var X=new Image;o&&(X.crossOrigin="Anonymous"),X.onload=function(J){$.save();var ee=w||x*.2,W=C||ee,F=(x-ee)/2,z=(x-W)/2;if(f||b){$.beginPath(),$.strokeStyle=s,$.fillStyle=s;var V=ee+2*b,N=W+2*b,te=F+A-b,K=z+A-b;if(g==="circle"){var G=te+V/2,oe=K+N/2;$.ellipse(G,oe,V/2,N/2,0,0,2*Math.PI),$.stroke(),$.fill()}else $.fillRect(te,K,V,N)}$.globalAlpha=u,$.drawImage(X,F+A,z+A,ee,W),$.restore(),d&&d(J)},X.src=c}},t.prototype.render=function(){var n,r=+this.props.size+2*+this.props.quietZone;return Xh.createElement("canvas",{id:(n=this.props.id)!==null&&n!==void 0?n:"react-qrcode-logo",height:r,width:r,style:gm({height:r+"px",width:r+"px"},this.props.style),ref:this.canvasRef})},t.defaultProps={value:"https://reactjs.org/",ecLevel:"M",enableCORS:!1,size:150,quietZone:10,bgColor:"#FFFFFF",fgColor:"#000000",logoOpacity:1,qrStyle:"squares",eyeRadius:[0,0,0],logoPaddingStyle:"square"},t}(Xh.Component);exports.QRCode_1=n0.QRCode=RR;const DR="_floating-label_3xm9u_1",jR="_without-label_3xm9u_21",IR="_floating-label-check_3xm9u_184",Kh={floatingLabel:DR,withoutLabel:jR,floatingLabelCheck:IR},NR=e=>{const t=Ie.c(3),{hint:n,children:r}=e;let i;return t[0]!==r||t[1]!==n?(i=n?y.jsx(Hg,{text:n,placement:"top",children:r}):r,t[0]=r,t[1]=n,t[2]=i):i=t[2],i},nf=({ref:e,hidden:t,children:n,className:r,isInvalid:i,isForRadioInput:a,inputContainerClassName:o,isForCheckInput:s,hint:l,required:c,disabled:u,...d})=>{const{ProjectIconComponent:f}=v.useContext(rn),h=d.withoutLabel?"":y.jsxs("div",{className:"d-flex gap-1 align-items-center",children:[d.label,c?y.jsx("span",{className:se("fw-bold",{"text-danger":!u}),style:{fontSize:"16px"},children:"*"}):null,l?y.jsx("div",{className:"d-flex align-items-center",children:y.jsx(f,{icon:"info"})}):null]});return s?y.jsx("div",{className:se("luminus-floating-label-check",Kh.floatingLabelCheck),children:n}):y.jsx(NR,{hint:l,children:y.jsx(Ig,{ref:e,label:y.jsx("div",{className:"d-flex gap-1 align-items-center",children:h}),hidden:t??!1,className:se(`luminus-floating-label ${r??""}`,Kh.floatingLabel,{[o??""]:o},{[Kh.withoutLabel]:d.withoutLabel}),children:n})})};nf.displayName="FloatingLabelInput";const PR="_row-label-input_i295l_1",LR="_label_i295l_4",FR="_input-container_i295l_9",zR="_keep-check-label_i295l_132",BR="_is-invalid_i295l_160",zs={rowLabelInput:PR,label:LR,inputContainer:FR,keepCheckLabel:zR,isInvalid:BR},_c=({ref:e,hidden:t,children:n,required:r,disabled:i,className:a,isInvalid:o,isForRadioInput:s,isForTextAreaInput:l,inputContainerClassName:c,hint:u,...d})=>{const{ProjectIconComponent:f}=v.useContext(rn),h=d.withoutLabel?y.jsx(y.Fragment,{}):y.jsx("label",{className:se("label col-6",{"col-12":l},zs.label),children:y.jsxs(In,{variant:"form-label",className:se("d-flex gap-1 align-items-center",o?"text-danger":""),children:[d.label,r?y.jsx("span",{className:se("fw-bold",{"text-danger":!i}),style:{fontSize:"16px"},children:"*"}):null,u?y.jsx("div",{className:"d-flex align-items-center",style:{paddingTop:"2px"},children:y.jsx(f,{icon:"info"})}):null]})});return y.jsxs("div",{ref:e,className:se("luminus-row-label row gx-0 gy-0",{"is-invalid":o},{[zs.isInvalid]:o},{[a??""]:a},{"d-none":t},zs.rowLabelInput),children:[u?y.jsx(Hg,{text:u,placement:"top",children:h}):h,y.jsx("div",{className:se("input-container",zs.inputContainer,{"col-6":!d.withoutLabel&&!l},{"col-12":d.withoutLabel||l},{[zs.keepCheckLabel]:s},{[c??""]:c}),children:n})]})};_c.displayName="RowLabelInput";const t3=e=>{const t=Ie.c(4),{ref:n,children:r,className:i,hidden:a}=e,o=`${a?"d-none":""} ${i}`;let s;return t[0]!==r||t[1]!==n||t[2]!==o?(s=y.jsx("div",{ref:n,className:o,children:r}),t[0]=r,t[1]=n,t[2]=o,t[3]=s):s=t[3],s};t3.displayName="NoInputContainer";const n3=e=>{const t=Ie.c(8),{currentSelection:n,selectedItemNavigateTo:r,children:i}=e;if(!n||!n.id||!r){let l;return t[0]!==i?(l=y.jsx("div",{className:"luminus-input-container position-relative w-100",children:i}),t[0]=i,t[1]=l):l=t[1],l}let a;t[2]!==n||t[3]!==r?(a=r(n),t[2]=n,t[3]=r,t[4]=a):a=t[4];const o=a;let s;return t[5]!==i||t[6]!==o?(s=y.jsx(ss.Link,{to:o,className:"luminus-input-container position-relative w-100 text-decoration-none",children:i}),t[5]=i,t[6]=o,t[7]=s):s=t[7],s},r3=({InputContainer:e=nf,type:t,value:n,onChange:r,debounceMs:i,label:a,withoutLabel:o,placeholder:s,size:l,hidden:c,disabled:u,showClearIcon:d,clearValue:f,list:h,className:p,step:m,minLength:g,maxLength:x,noSelectOnFocus:_,hint:w,onConfirm:C,autoComplete:b})=>{var P,H,Y;const S=t==="number",M=v.useCallback(()=>{if(!r)return;const q=f??null;r(S?q?Number(q):null:(q==null?void 0:q.toString())??"")},[f,S,r]),$=v.useRef(null),[k,R]=v.useState((n==null?void 0:n.toString())??""),T=v.useCallback(q=>{const Z=q;r&&r(S?Z==null||Z===""?null:Number(Z):Z||null)},[S,r]),E=v.useCallback(q=>{var X;const Z=(X=q.target)==null?void 0:X.value;if(!i){T(Z);return}R(Z),$.current!==null&&window.clearTimeout($.current),$.current=window.setTimeout(()=>{T(Z)},i)},[i,T]),A=v.useMemo(()=>{if(C!==void 0)return q=>{q.key==="Enter"&&C&&C()}},[C]);v.useEffect(()=>{R(n===null?"":n.toString())},[n]);const[j,I]=v.useState(!1),D=t0(t,n?n.toString()??null:null,j),O=v.useRef(null),L=(((P=O.current)==null?void 0:P.scrollWidth)??0)>(((H=O.current)==null?void 0:H.clientWidth)??0),B=(Y=O.current)==null?void 0:Y.getBoundingClientRect();return y.jsxs(e,{withoutLabel:o,label:a??"",hidden:c,className:p,hint:w,disabled:u,children:[y.jsx(Gr.Control,{type:D,placeholder:s??a,size:l,value:i?k:(n==null?void 0:n.toString())??"",onChange:E,className:p??"",hidden:c,disabled:u??!1,list:h,onFocus:q=>{I(!0),!_&&q.target.select()},onBlur:()=>I(!1),onKeyDown:A,step:m,minLength:g,maxLength:x,autoComplete:b,ref:O}),d&&n!==null&&r&&!u&&y.jsx("div",{className:`luminus-input-remove-icon ${t!=="text"?"inset":""}`,children:y.jsx(wc,{color:"secondary",size:"sm",onClick:M,children:y.jsx(hc,{})})}),L?y.jsx("div",{className:"luminus-overflow-tooltip",style:{opacity:0,position:"fixed",top:((B==null?void 0:B.top)??0)+((B==null?void 0:B.height)??0),left:(B==null?void 0:B.left)??0},children:i?k:(n==null?void 0:n.toString())??""}):null]})},i3=e=>{const t=Ie.c(7),{value:n,MiniDetailComponent:r,children:i,miniDetailPlacement:a}=e;if(!n||!r)return i;let o;t[0]!==n?(o=n.toString(),t[0]=n,t[1]=o):o=t[1];let s;return t[2]!==r||t[3]!==i||t[4]!==a||t[5]!==o?(s=y.jsx(r,{id:o,placement:a,children:i}),t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s):s=t[6],s},a3=({InputContainer:e=nf,value:t,options:n,onChange:r,label:i,withoutLabel:a,isNumber:o,size:s,hidden:l,disabled:c,noSortOptions:u,className:d,suffixIdToName:f,noEmptyOption:h,appendCurrentSelectionWithName:p,dropdownWidth:m,hint:g,addNewOptionPath:x,refreshOptions:_,MiniDetailComponent:w,miniDetailPlacement:C,selectedItemNavigateTo:b,noRemoveButton:S})=>{const{texts:{customSelect:M}}=v.useContext(rn),[$,k]=v.useState(!1),[R,T]=v.useState(""),E=v.useCallback(B=>{T(B)},[]),A=v.useMemo(()=>n.find(B=>B.id===t)??null,[n,t]),j=v.useCallback(B=>{var P;return B===null?"":!B.name||B.name.length===0?((P=B.id)==null?void 0:P.toString())??"":f?`${B.name} (${B.id})`:B.name},[f]),I=v.useMemo(()=>{const B=n?[...n]:[];return p!==void 0&&t!==void 0&&t!==null&&(B.some(P=>P.id===t)||B.push({id:t,name:p})),B.map(P=>({id:P.id,name:j(P)})).filter(P=>qg(P.name,R)).sort((P,H)=>u?0:(P.name??"").localeCompare(H.name??""))},[n,u,R,j,p,t]),D=v.useCallback(B=>{var P;r&&r((B==null?void 0:B.id)===void 0||(B==null?void 0:B.id)===null?null:o?Number(B.id):(P=B.id)==null?void 0:P.toString())},[r,o]),O=v.useCallback(B=>{k(!1),D(B)},[D]),L=v.useRef(null);return y.jsx(y.Fragment,{children:y.jsxs(e,{withoutLabel:a,label:i??"",hidden:l,inputContainerClassName:se({"luminus-dropdown-select-open":$}),className:d,hint:g,disabled:c,children:[y.jsx(n3,{currentSelection:A,selectedItemNavigateTo:b,children:y.jsx(i3,{value:t,MiniDetailComponent:w,miniDetailPlacement:C,children:y.jsxs(Gr.Select,{ref:L,size:s,value:t??"",onMouseDown:B=>{B.currentTarget.focus(),B.preventDefault()},onClick:()=>{!c&&k(!0)},onChange:()=>{},className:se("w-100",{"luminus-dropdown-picker-disabled":c}),hidden:l,children:[h&&!(t==null||t==="")?void 0:y.jsx("option",{value:""}),t!=null&&y.jsx("option",{value:t,children:j(A)})]})})}),L.current&&y.jsx(lC,{show:$,onCancel:()=>k(!1),items:I,currentSelection:A??null,onSelectionChange:O,onSearchQueryChange:E,texts:M,disabled:c,inputRef:L,autoHideSearch:!0,allItemsLength:n.length,itemsNameWidth:m,addNewOptionPath:x,refreshOptions:_,noRemoveButton:S})]})})};function WR(e){return it({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function UR(e){return it({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function HR(e){return it({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"},child:[]}]})(e)}function VR(e){return it({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm250.2-143.7c-12.2-12-47-8.7-64.4-6.5-17.2-10.5-28.7-25-36.8-46.3 3.9-16.1 10.1-40.6 5.4-56-4.2-26.2-37.8-23.6-42.6-5.9-4.4 16.1-.4 38.5 7 67.1-10 23.9-24.9 56-35.4 74.4-20 10.3-47 26.2-51 46.2-3.3 15.8 26 55.2 76.1-31.2 22.4-7.4 46.8-16.5 68.4-20.1 18.9 10.2 41 17 55.8 17 25.5 0 28-28.2 17.5-38.7zm-198.1 77.8c5.1-13.7 24.5-29.5 30.4-35-19 30.3-30.4 35.7-30.4 35zm81.6-190.6c7.4 0 6.7 32.1 1.8 40.8-4.4-13.9-4.3-40.8-1.8-40.8zm-24.4 136.6c9.7-16.9 18-37 24.7-54.7 8.3 15.1 18.9 27.2 30.1 35.5-20.8 4.3-38.9 13.1-54.8 19.2zm131.6-5s-5 6-37.3-7.8c35.1-2.6 40.9 5.4 37.3 7.8z"},child:[]}]})(e)}const rf=e=>{const t=Ie.c(66),{InputContainer:n,formField:r,label:i,resetsFields:a,options:o,isNumber:s,size:l,showClearIcon:c,clearValue:u,noSortOptions:d,required:f,hidden:h,disabled:p,withoutLabel:m,hint:g,className:x}=e,_=n===void 0?_c:n,{control:w,getValues:C,setValue:b}=sn.useFormContext(),{isSubmitted:S}=sn.useFormState();let M;t[0]===Symbol.for("react.memo_cache_sentinel")?(M={falseIfNotInit:!0},t[0]=M):M=t[0];const $=ef(M);let k;t[1]!==w||t[2]!==r?(k={name:r,control:w},t[1]=w,t[2]=r,t[3]=k):k=t[3];const{field:R,fieldState:T}=sn.useController(k),{value:E,onChange:A,onBlur:j,ref:I,name:D}=R,{error:O}=T,[L,B]=v.useState(!1);let P;if(t[4]!==d||t[5]!==o){let le;t[7]!==d?(le=(ye,ge)=>d?0:(ye.name??"").localeCompare(ge.name??""),t[7]=d,t[8]=le):le=t[8],P=o.toSorted(le),t[4]=d,t[5]=o,t[6]=P}else P=t[6];const H=P;let Y;t[9]!==u||t[10]!==r||t[11]!==s||t[12]!==b||t[13]!==L?(Y=()=>{const le=u??null;s?b(r,le===null?null:Number(le),{shouldDirty:!0,shouldValidate:L}):b(r,(le==null?void 0:le.toString())??"",{shouldDirty:!0,shouldValidate:L})},t[9]=u,t[10]=r,t[11]=s,t[12]=b,t[13]=L,t[14]=Y):Y=t[14];const q=Y,Z=p||$;let X;t[15]!==r||t[16]!==C||t[17]!==b?(X=()=>{b(r,C(r))},t[15]=r,t[16]=C,t[17]=b,t[18]=X):X=t[18];let J;t[19]!==r||t[20]!==C||t[21]!==H||t[22]!==b?(J=[H,r,C,b],t[19]=r,t[20]=C,t[21]=H,t[22]=b,t[23]=J):J=t[23],v.useEffect(X,J);let ee,W;t[24]!==S?(ee=()=>{S&&B(!0)},W=[S],t[24]=S,t[25]=ee,t[26]=W):(ee=t[25],W=t[26]),v.useEffect(ee,W);const F=O!==void 0;let z;t[27]!==A||t[28]!==s||t[29]!==a||t[30]!==b||t[31]!==L?(z=le=>{const ye=le.target.value;let ge;s?ge=ye===""?null:parseInt(ye,10):ge=ye===""?null:ye,A(ge),a&&a.forEach(be=>b(be,null,{shouldDirty:!0,shouldValidate:L}))},t[27]=A,t[28]=s,t[29]=a,t[30]=b,t[31]=L,t[32]=z):z=t[32];const V=z,N=i??"",te=E??"";let K;t[33]===Symbol.for("react.memo_cache_sentinel")?(K=y.jsx("option",{value:""}),t[33]=K):K=t[33];let G;t[34]!==H?(G=H.map(qR),t[34]=H,t[35]=G):G=t[35];let oe;t[36]!==Z||t[37]!==D||t[38]!==j||t[39]!==I||t[40]!==V||t[41]!==h||t[42]!==F||t[43]!==l||t[44]!==te||t[45]!==G?(oe=y.jsxs(Gr.Select,{size:l,name:D,value:te,onChange:V,onBlur:j,ref:I,isInvalid:F,hidden:h,disabled:Z,className:"w-100",children:[K,G]}),t[36]=Z,t[37]=D,t[38]=j,t[39]=I,t[40]=V,t[41]=h,t[42]=F,t[43]=l,t[44]=te,t[45]=G,t[46]=oe):oe=t[46];let ne;t[47]!==q||t[48]!==E||t[49]!==c?(ne=c&&E!=null&&y.jsx("div",{className:"luminus-input-remove-icon inset",children:y.jsx(wc,{color:"secondary",size:"sm",onClick:q,children:y.jsx(hc,{})})}),t[47]=q,t[48]=E,t[49]=c,t[50]=ne):ne=t[50];let re;t[51]!==O?(re=O&&y.jsx(df,{message:O.message}),t[51]=O,t[52]=re):re=t[52];let ae;return t[53]!==_||t[54]!==Z||t[55]!==x||t[56]!==h||t[57]!==g||t[58]!==F||t[59]!==f||t[60]!==N||t[61]!==oe||t[62]!==ne||t[63]!==re||t[64]!==m?(ae=y.jsx(y.Fragment,{children:y.jsxs(_,{label:N,required:f,disabled:Z,hidden:h,withoutLabel:m,isInvalid:F,hint:g,className:x,children:[oe,ne,re]})}),t[53]=_,t[54]=Z,t[55]=x,t[56]=h,t[57]=g,t[58]=F,t[59]=f,t[60]=N,t[61]=oe,t[62]=ne,t[63]=re,t[64]=m,t[65]=ae):ae=t[65],ae};function qR(e){return y.jsx("option",{value:e.id??"",children:e.name},e.id)}const r0=e=>{const t=Ie.c(61),{InputContainer:n,formField:r,label:i,resetsFields:a,size:o,showClearIcon:s,clearValue:l,required:c,hidden:u,disabled:d,rows:f,withoutLabel:h,customFormControlProps:p,minLength:m,maxLength:g,hint:x,onChange:_,className:w}=e,C=n===void 0?_c:n,{control:b,setValue:S}=sn.useFormContext(),{isSubmitted:M}=sn.useFormState();let $;t[0]===Symbol.for("react.memo_cache_sentinel")?($={falseIfNotInit:!0},t[0]=$):$=t[0];const k=ef($),[R,T]=v.useState(!1);let E;t[1]!==b||t[2]!==r?(E={name:r,control:b},t[1]=b,t[2]=r,t[3]=E):E=t[3];const{field:A,fieldState:j}=sn.useController(E),{onChange:I,onBlur:D,ref:O,value:L,name:B}=A,{error:P}=j;let H;t[4]!==p?(H=p??{},t[4]=p,t[5]=H):H=t[5];let Y,q,Z;t[6]!==H?({onChange:q,onBlur:Y,...Z}=H,t[6]=H,t[7]=Y,t[8]=q,t[9]=Z):(Y=t[7],q=t[8],Z=t[9]);let X;t[10]!==l||t[11]!==r||t[12]!==S||t[13]!==R?(X=()=>{const be=l??null,Me=be==null||be===""?null:be.toString();S(r,Me,{shouldDirty:!0,shouldValidate:R})},t[10]=l,t[11]=r,t[12]=S,t[13]=R,t[14]=X):X=t[14];const J=X,ee=d||k;let W,F;t[15]!==M?(W=()=>{M&&T(!0)},F=[M],t[15]=M,t[16]=W,t[17]=F):(W=t[16],F=t[17]),v.useEffect(W,F);const z=P!==void 0;let V;t[18]!==q||t[19]!==I||t[20]!==_||t[21]!==a||t[22]!==S||t[23]!==R?(V=be=>{const Me=be.target.value,ce=Me==null||Me===""?null:Me;I(ce),a&&a.forEach(de=>S(de,null,{shouldDirty:!0,shouldValidate:R})),_&&_(ce),q&&q(be)},t[18]=q,t[19]=I,t[20]=_,t[21]=a,t[22]=S,t[23]=R,t[24]=V):V=t[24];const N=V;let te;t[25]!==Y||t[26]!==D?(te=be=>{D(),Y&&Y(be)},t[25]=Y,t[26]=D,t[27]=te):te=t[27];const K=te,G=L!=null&&L!=="",oe=i??"",ne=L??"",re=f??2;let ae;t[28]!==ee||t[29]!==B||t[30]!==O||t[31]!==K||t[32]!==N||t[33]!==u||t[34]!==z||t[35]!==g||t[36]!==m||t[37]!==Z||t[38]!==o||t[39]!==ne||t[40]!==re?(ae=y.jsx(Gr.Control,{as:"textarea",name:B,size:o,value:ne,onChange:N,onBlur:K,ref:O,isInvalid:z,hidden:u,disabled:ee,rows:re,className:"w-100",minLength:m,maxLength:g,...Z}),t[28]=ee,t[29]=B,t[30]=O,t[31]=K,t[32]=N,t[33]=u,t[34]=z,t[35]=g,t[36]=m,t[37]=Z,t[38]=o,t[39]=ne,t[40]=re,t[41]=ae):ae=t[41];let le;t[42]!==J||t[43]!==G||t[44]!==s?(le=s&&G&&y.jsx("div",{className:"luminus-input-remove-icon",children:y.jsx(wc,{color:"secondary",size:"sm",onClick:J,children:y.jsx(hc,{})})}),t[42]=J,t[43]=G,t[44]=s,t[45]=le):le=t[45];let ye;t[46]!==P?(ye=P&&y.jsx(df,{message:P.message}),t[46]=P,t[47]=ye):ye=t[47];let ge;return t[48]!==C||t[49]!==ee||t[50]!==w||t[51]!==u||t[52]!==x||t[53]!==z||t[54]!==c||t[55]!==oe||t[56]!==ae||t[57]!==le||t[58]!==ye||t[59]!==h?(ge=y.jsxs(C,{label:oe,required:c,disabled:ee,hidden:u,withoutLabel:h,isInvalid:z,className:w,hint:x,isForTextAreaInput:!0,children:[ae,le,ye]}),t[48]=C,t[49]=ee,t[50]=w,t[51]=u,t[52]=x,t[53]=z,t[54]=c,t[55]=oe,t[56]=ae,t[57]=le,t[58]=ye,t[59]=h,t[60]=ge):ge=t[60],ge},es=({ref:e,InputContainer:t=_c,type:n,formField:r,label:i,placeholder:a,size:o,resetsFields:s,showClearIcon:l,clearValue:c,required:u,hidden:d,disabled:f,withoutLabel:h,list:p,step:m,CustomOnChangeComponent:g,noSelectOnFocus:x,minLength:_,maxLength:w,hint:C,onChange:b,className:S,autoComplete:M})=>{var V,N,te,K;const{control:$,setValue:k}=sn.useFormContext(),{isSubmitted:R}=sn.useFormState(),T=ef({falseIfNotInit:!0}),{field:{value:E,onChange:A,onBlur:j,ref:I,name:D},fieldState:{error:O}}=sn.useController({name:r,control:$}),[L,B]=v.useState(!1),P=v.useCallback(()=>{const G=c??null;n==="number"?k(r,G!==null?Number(G):null,{shouldDirty:!0,shouldValidate:L}):k(r,(G==null?void 0:G.toString())??"",{shouldDirty:!0,shouldValidate:L})},[c,n,k,r,L]),H=v.useMemo(()=>f||T,[f,T]),Y=O!==void 0,[q,Z]=v.useState(!1),X=t0(n,E??null,q),J=v.useCallback(G=>{const oe=G.target.value;let ne=oe;n==="number"?ne=oe===""?null:Number(oe):ne=oe===""?null:oe,A(ne),s&&s.forEach(re=>k(re,null,{shouldDirty:!0,shouldValidate:L})),b&&b(ne===null?null:n==="number"?ne??null:ne.toString())},[A,b,s,k,L,n]),ee=v.useCallback(()=>{Z(!1),j()},[j]),W=v.useRef(null),F=(((V=W.current)==null?void 0:V.scrollWidth)??0)>(((N=W.current)==null?void 0:N.clientWidth)??0),z=(te=W.current)==null?void 0:te.getBoundingClientRect();return v.useImperativeHandle(e,()=>W.current,[W]),v.useEffect(()=>{R&&B(!0)},[R]),y.jsxs(t,{label:i,required:u,disabled:H,hidden:d,withoutLabel:h??!1,isInvalid:Y,hint:C,className:S,children:[y.jsxs("div",{className:"luminus-input-container position-relative w-100",children:[y.jsx(Gr.Control,{type:X,placeholder:a??i,size:o,name:D,value:E??"",onChange:J,onBlur:ee,onFocus:G=>{Z(!0),!x&&G.target.select()},ref:G=>{I(G),W.current=G},isInvalid:Y,hidden:d,disabled:H,list:p,className:"w-100",step:m,minLength:_,maxLength:w,autoComplete:M}),g&&y.jsx("div",{className:"custom-picker-button",children:g})]}),l&&E!=null&&y.jsx("div",{className:`luminus-input-remove-icon ${n!=="text"?"inset":""}`,children:y.jsx(wc,{color:"secondary",size:"sm",onClick:P,children:y.jsx(hc,{})})}),F?y.jsx("div",{className:"luminus-overflow-tooltip",style:{opacity:0,position:"fixed",top:((z==null?void 0:z.top)??0)+((z==null?void 0:z.height)??0),left:(z==null?void 0:z.left)??0,pointerEvents:"none"},children:((K=W.current)==null?void 0:K.value)??""}):null,O&&y.jsx(df,{message:O.message})]})},YR="_item_1dy8x_1",o3={item:YR},Ca=e=>{const t=Ie.c(17);let n,r,i,a,o,s,l;t[0]!==e?({color:s,icon:i,className:r,children:n,to:l,as:a,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=l):(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7]);const u=`btn luminus-dropdown-item text-nowrap rounded text-${s===void 0?"primary":s} ${r??""}`;let d;t[8]!==u?(d=se(u,o3.item),t[8]=u,t[9]=d):d=t[9];const f=a==="link"?ss.Link:void 0,h=l??"";let p;return t[10]!==n||t[11]!==i||t[12]!==o||t[13]!==d||t[14]!==f||t[15]!==h?(p=y.jsxs(Yo.Item,{className:d,as:f,to:h,...o,children:[i,n]}),t[10]=n,t[11]=i,t[12]=o,t[13]=d,t[14]=f,t[15]=h,t[16]=p):p=t[16],p},GR="_button_qhwih_1",ZR={button:GR},i0=({ref:e,color:t="primary",icon:n=y.jsx(N_,{size:21}),text:r,onClick:i,className:a,children:o,...s})=>y.jsxs("button",{type:"button",ref:e,onClick:l=>{l.preventDefault(),i(l)},"aria-label":"dropdown toggle",className:se(`btn luminus-context-button text-${t} ${a??""}`,ZR.button),...s,children:[n,r]}),a0=e=>{const t=Ie.c(2);let n;return t[0]!==e?(n=y.jsx(Yo.Toggle,{...e}),t[0]=e,t[1]=n):n=t[1],n},XR="_divider_1e6rk_1",KR={divider:XR},vm=e=>{const t=Ie.c(4),{className:n}=e;let r;t[0]!==n?(r=se("luminus-dropdown-divider",n,KR.divider),t[0]=n,t[1]=r):r=t[1];let i;return t[2]!==r?(i=y.jsx(Yo.Divider,{className:r}),t[2]=r,t[3]=i):i=t[3],i},JR="_dropdown_1lk66_1",QR={dropdown:JR},o0=e=>{const t=Ie.c(14);let n,r,i,a;t[0]!==e?({toggle:a,children:r,align:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a):(n=t[1],r=t[2],i=t[3],a=t[4]);let o;t[5]===Symbol.for("react.memo_cache_sentinel")?(o=se("luminus-dropdown rounded shadow",QR.dropdown),t[5]=o):o=t[5];let s;t[6]!==n||t[7]!==r?(s=y.jsx(Yo.Menu,{className:o,align:n,children:r}),t[6]=n,t[7]=r,t[8]=s):s=t[8];let l;return t[9]!==n||t[10]!==i||t[11]!==s||t[12]!==a?(l=y.jsxs(Yo,{...i,align:n,children:[a,s]}),t[9]=n,t[10]=i,t[11]=s,t[12]=a,t[13]=l):l=t[13],l},eD="_wrapper_1tb6d_1",tD="_controls_1tb6d_16",nD="_explorerWindow_1tb6d_20",rD="_folderList_1tb6d_28",iD="_fileList_1tb6d_35",aD="_dndText_1tb6d_61",da={wrapper:eD,controls:tD,explorerWindow:nD,folderList:rD,fileList:iD,dndText:aD},mn=v.createContext({apiActions:{},loadDocuments(){throw new Error("DocumentsContext was not initialized.")},reducer:[{},{}],entityType:"",entityId:-1}),oD="_defaultFolder_8tlxv_1",sD="_names_8tlxv_5",lD="_folderType_8tlxv_9",Jh={defaultFolder:oD,names:sD,folderType:lD},s3=e=>{const t=Ie.c(19),{isActive:n,isDefault:r,folderName:i,typeName:a}=e,{ProjectIconComponent:o}=v.useContext(rn),s=`folder${n?"-filled":""}`,l=r?Jh.defaultFolder:"text-primary";let c;t[0]!==l?(c=se("d-inline-block",l),t[0]=l,t[1]=c):c=t[1];let u;t[2]===Symbol.for("react.memo_cache_sentinel")?(u={className:"d-block"},t[2]=u):u=t[2];let d;t[3]!==o||t[4]!==s||t[5]!==c?(d=y.jsx(o,{icon:s,className:c,iconProps:u,size:18}),t[3]=o,t[4]=s,t[5]=c,t[6]=d):d=t[6];let f;t[7]===Symbol.for("react.memo_cache_sentinel")?(f=se("d-flex flex-column gap-0 align-items-start",Jh.names),t[7]=f):f=t[7];const h=n?"fw-bold":"";let p;t[8]!==i||t[9]!==h?(p=y.jsx("span",{className:h,children:i}),t[8]=i,t[9]=h,t[10]=p):p=t[10];let m;t[11]!==a?(m=a?y.jsxs("span",{className:Jh.folderType,children:["(",a,")"]}):null,t[11]=a,t[12]=m):m=t[12];let g;t[13]!==p||t[14]!==m?(g=y.jsxs("div",{className:f,children:[p,m]}),t[13]=p,t[14]=m,t[15]=g):g=t[15];let x;return t[16]!==g||t[17]!==d?(x=y.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[d,g]}),t[16]=g,t[17]=d,t[18]=x):x=t[18],x},cD=e=>{const t=Ie.c(9),{customText:n}=e,{reducer:r}=v.useContext(mn),[i,a]=r;let o;t[0]!==a?(o=()=>{a({type:"select-folder",folderId:"root"})},t[0]=a,t[1]=o):o=t[1];const s=o;let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=se("border-0 bg-transparent"),t[2]=l):l=t[2];const c=n??"root",u=i.activeFolder==="root";let d;t[3]!==c||t[4]!==u?(d=y.jsx(s3,{folderName:c,isActive:u,typeName:"",isDefault:!0}),t[3]=c,t[4]=u,t[5]=d):d=t[5];let f;return t[6]!==s||t[7]!==d?(f=y.jsx("li",{children:y.jsx("button",{onClick:s,type:"button",className:l,children:d})}),t[6]=s,t[7]=d,t[8]=f):f=t[8],f};function uD(e){if(e.state!=="openned-modal")throw new Error('Not in "openned-modal" state!')}const l3=()=>{const e=Kd(),{startLoading:t,stopLoading:n}=v.useContext(Bd),{reducer:[,r]}=v.useContext(mn),i=v.useCallback(async(o,s)=>{t("documents-renameFolder");try{await e.put("/documents/folder/rename",{folderId:o,name:s}),r({type:"update-folders",folderIds:[o],newProperties:{name:s}})}finally{n("documents-renameFolder")}},[e,r,t,n]),a=v.useCallback(async o=>{t("documentsFolderCreate");try{const s=await e.post("/documents/folder",o);r({type:"create-folder",folderData:o,folderId:s.data.id,isOnlyRead:s.data.onlyRead})}finally{n("documentsFolderCreate")}},[e,r,t,n]);return{renameFolder:i,createFolder:a}},xb=(e,t,n)=>{if(e&&"reportValidity"in e){const r=sn.get(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},c3=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?xb(r.ref,n,e):r.refs&&r.refs.forEach(i=>xb(i,n,e))}},dD=(e,t)=>{t.shouldUseNativeValidation&&c3(e,t);const n={};for(const r in e){const i=sn.get(t.fields,r),a=Object.assign(e[r]||{},{ref:i&&i.ref});if(fD(t.names||Object.keys(e),r)){const o=Object.assign({},sn.get(n,r));sn.set(o,"root",a),sn.set(n,r,o)}else sn.set(n,r,a)}return n},fD=(e,t)=>e.some(n=>n.startsWith(t+"."));var hD=function(e,t){for(var n={};e.length;){var r=e[0],i=r.code,a=r.message,o=r.path.join(".");if(!n[o])if("unionErrors"in r){var s=r.unionErrors[0].errors[0];n[o]={message:s.message,type:s.code}}else n[o]={message:a,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(u){return u.errors.forEach(function(d){return e.push(d)})}),t){var l=n[o].types,c=l&&l[r.code];n[o]=sn.appendErrors(o,t,n,i,c?[].concat(c,r.message):r.message)}e.shift()}return n},af=function(e,t,n){return n===void 0&&(n={}),function(r,i,a){try{return Promise.resolve(function(o,s){try{var l=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(c){return a.shouldUseNativeValidation&&c3({},a),{errors:{},values:n.raw?r:c}})}catch(c){return s(c)}return l&&l.then?l.then(void 0,s):l}(0,function(o){if(function(s){return Array.isArray(s==null?void 0:s.errors)}(o))return{values:{},errors:dD(hD(o.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}}};const pD=()=>{const e=Ie.c(14),{reducer:t,entityId:n,entityType:r}=v.useContext(mn),[i]=t,{zNumberRequired:a,zStringRequired:o}=Qd(),{createFolder:s}=l3();let l,c;if(e[0]!==a||e[1]!==o){const m=di({name:o(),documentTypeId:a()});c=sn.useForm,l=af(m),e[0]=a,e[1]=o,e[2]=l,e[3]=c}else l=e[2],c=e[3];let u;e[4]!==l?(u={resolver:l},e[4]=l,e[5]=u):u=e[5];const d=c(u);let f;e[6]!==s||e[7]!==n||e[8]!==r||e[9]!==i.activeFolder?(f=async m=>{const g={...m,dbObjectId:n.toString(),entity:r,parentFolderId:i.activeFolder==="root"?null:i.activeFolder};await s(g)},e[6]=s,e[7]=n,e[8]=r,e[9]=i.activeFolder,e[10]=f):f=e[10];const h=f;let p;return e[11]!==d||e[12]!==h?(p={formMethods:d,onSubmit:h},e[11]=d,e[12]=h,e[13]=p):p=e[13],p},mD=e=>{var b;const t=Ie.c(38),{handleClose:n}=e,{texts:r}=v.useContext(rn),{documents:i}=r,{reducer:a,entityType:o}=v.useContext(mn),[s]=a;if(uD(s),s.modalType!=="create-folder")throw new Error("Tried to render CreateFolderModal without create-folder modal type reducer state.");const{onSubmit:l,formMethods:c}=pD();let u;t[0]!==c||t[1]!==l?(u=c.handleSubmit(l),t[0]=c,t[1]=l,t[2]=u):u=t[2];let d;if(t[3]!==i||t[4]!==o||t[5]!==s.chosenFolderId||t[6]!==s.foldersMap){let S;t[8]!==o||t[9]!==s.chosenFolderId||t[10]!==s.foldersMap?(S=((b=s.foldersMap.get(s.chosenFolderId))==null?void 0:b.name)??o,t[8]=o,t[9]=s.chosenFolderId,t[10]=s.foldersMap,t[11]=S):S=t[11],d=i.createFolderInFolder(S),t[3]=i,t[4]=o,t[5]=s.chosenFolderId,t[6]=s.foldersMap,t[7]=d}else d=t[7];let f;t[12]!==d?(f=y.jsx(Vn.Header,{closeButton:!0,children:y.jsx(Vn.Title,{children:d})}),t[12]=d,t[13]=f):f=t[13];let h;t[14]!==i.name?(h=y.jsx(es,{formField:"name",type:"text",label:i.name,required:!0}),t[14]=i.name,t[15]=h):h=t[15];let p;t[16]!==i.folderType||t[17]!==s.documentTypes?(p=y.jsx(rf,{options:s.documentTypes,formField:"documentTypeId",label:i.folderType,isNumber:!0,required:!0}),t[16]=i.folderType,t[17]=s.documentTypes,t[18]=p):p=t[18];let m;t[19]!==h||t[20]!==p?(m=y.jsxs(Vn.Body,{children:[h,p]}),t[19]=h,t[20]=p,t[21]=m):m=t[21];let g;t[22]!==i.cancel||t[23]!==n?(g=y.jsx(za,{onClick:n,variant:"outlined",color:"secondary",children:i.cancel}),t[22]=i.cancel,t[23]=n,t[24]=g):g=t[24];let x;t[25]!==i.createFolder?(x=y.jsx(za,{type:"submit",children:i.createFolder}),t[25]=i.createFolder,t[26]=x):x=t[26];let _;t[27]!==x||t[28]!==g?(_=y.jsxs(Vn.Footer,{children:[g,x]}),t[27]=x,t[28]=g,t[29]=_):_=t[29];let w;t[30]!==_||t[31]!==u||t[32]!==f||t[33]!==m?(w=y.jsxs(Gr,{onSubmit:u,children:[f,m,_]}),t[30]=_,t[31]=u,t[32]=f,t[33]=m,t[34]=w):w=t[34];let C;return t[35]!==c||t[36]!==w?(C=y.jsx(y.Fragment,{children:y.jsx(sn.FormProvider,{...c,children:w})}),t[35]=c,t[36]=w,t[37]=C):C=t[37],C},u3=100,gD=(e,t)=>{const n=Kd(),{startLoading:r,stopLoading:i}=v.useContext(Bd),{loadDocuments:a}=v.useContext(mn),{zStringRequired:o,zString:s,zNumberRequired:l,zDateRequired:c}=Qd(),u=di({name:o(),description:s(),validToDate:c(),documentTypeId:l()}),d=sn.useForm({resolver:af(u),defaultValues:{...e,validToDate:Hd(e.validToDate)}}),f=v.useCallback(async h=>{r("documents-updateProperties");try{await n.put(`/documents/${e.id}/update-info`,h),await a(),t()}finally{i("documents-updateProperties")}},[n,e.id,t,a,r,i]);return{formMethods:d,onSubmit:f}},vD=e=>{const t=Ie.c(38),{handleClose:n,file:r}=e,{texts:i}=v.useContext(rn),{documents:a}=i,{reducer:o}=v.useContext(mn),[s]=o,{formMethods:l,onSubmit:c}=gD(r,n);let u;t[0]!==a.editFileProperties?(u=y.jsx(Vn.Header,{closeButton:!0,children:y.jsx(Vn.Title,{children:a.editFileProperties})}),t[0]=a.editFileProperties,t[1]=u):u=t[1];let d;t[2]!==l||t[3]!==c?(d=l.handleSubmit(c),t[2]=l,t[3]=c,t[4]=d):d=t[4];let f;t[5]!==a.name?(f=y.jsx(es,{formField:"name",type:"text",label:a.name,required:!0}),t[5]=a.name,t[6]=f):f=t[6];let h;t[7]!==a.validSince?(h=y.jsx(es,{formField:"validToDate",type:"date",label:a.validSince,required:!0}),t[7]=a.validSince,t[8]=h):h=t[8];let p;t[9]!==a.category||t[10]!==s.documentTypes?(p=y.jsx(rf,{formField:"documentTypeId",label:a.category,options:s.documentTypes,isNumber:!0,required:!0}),t[9]=a.category,t[10]=s.documentTypes,t[11]=p):p=t[11];let m;t[12]===Symbol.for("react.memo_cache_sentinel")?(m={maxLength:u3},t[12]=m):m=t[12];let g;t[13]!==a.description?(g=y.jsx(r0,{formField:"description",label:a.description,customFormControlProps:m}),t[13]=a.description,t[14]=g):g=t[14];let x;t[15]!==f||t[16]!==h||t[17]!==p||t[18]!==g?(x=y.jsxs(Vn.Body,{children:[f,h,p,g]}),t[15]=f,t[16]=h,t[17]=p,t[18]=g,t[19]=x):x=t[19];let _;t[20]!==a.cancel||t[21]!==n?(_=y.jsx(za,{onClick:n,color:"secondary",variant:"outlined",children:a.cancel}),t[20]=a.cancel,t[21]=n,t[22]=_):_=t[22];let w;t[23]!==a.save?(w=y.jsx(za,{type:"submit",children:a.save}),t[23]=a.save,t[24]=w):w=t[24];let C;t[25]!==_||t[26]!==w?(C=y.jsxs(Vn.Footer,{children:[_,w]}),t[25]=_,t[26]=w,t[27]=C):C=t[27];let b;t[28]!==x||t[29]!==C||t[30]!==d?(b=y.jsxs(Gr,{onSubmit:d,children:[x,C]}),t[28]=x,t[29]=C,t[30]=d,t[31]=b):b=t[31];let S;t[32]!==l||t[33]!==b?(S=y.jsx(sn.FormProvider,{...l,children:b}),t[32]=l,t[33]=b,t[34]=S):S=t[34];let M;return t[35]!==S||t[36]!==u?(M=y.jsxs(y.Fragment,{children:[u,S]}),t[35]=S,t[36]=u,t[37]=M):M=t[37],M},bD=e=>{const t=Ie.c(9),{handleClose:n}=e,{reducer:r}=v.useContext(mn),[i]=r;let a;e:{if(i.markedFiles.length!==1){a=void 0;break e}let l;if(t[0]!==i.constantFiles||t[1]!==i.markedFiles[0]){let c;t[3]!==i.markedFiles[0]?(c=u=>u.id===i.markedFiles[0],t[3]=i.markedFiles[0],t[4]=c):c=t[4],l=i.constantFiles.find(c),t[0]=i.constantFiles,t[1]=i.markedFiles[0],t[2]=l}else l=t[2];a=l}const o=a;if(o===void 0){n();let l;return t[5]===Symbol.for("react.memo_cache_sentinel")?(l=y.jsx(y.Fragment,{}),t[5]=l):l=t[5],l}let s;return t[6]!==o||t[7]!==n?(s=y.jsx(vD,{file:o,handleClose:n}),t[6]=o,t[7]=n,t[8]=s):s=t[8],s},yD=()=>{const{reducer:[e,t]}=v.useContext(mn),n=v.useCallback(()=>{t({type:"close-modal"})},[t]),r=v.useMemo(()=>{if(e.state!=="openned-modal")return null;switch(e.modalType){case"create-folder":return y.jsx(mD,{handleClose:n});case"edit-file-properties":return y.jsx(bD,{handleClose:n});default:return null}},[e.state,e.modalType]);return y.jsx(Vn,{show:e.state==="openned-modal",onHide:n,children:r})},wb="documents_drag_image_element",Xu="drop-container-highlight-class",_b="data-drop-container-id",Cb="data-draggable-id",xD=()=>{const e=document.getElementById(wb);if(e!==null)return e;const t=document.createElement("div");return t.id=wb,t.style.position="absolute",t.style.top=`${-window.outerHeight}px`,t.style.left=`${-window.outerWidth}px`,t.style.width="50px",t.style.height="50px",t.style.backgroundColor="rgba(0, 0, 0, 0.5)",t.style.color="white",t.style.display="flex",t.style.alignItems="center",t.style.justifyContent="center",t.style.fontSize="16px",t.style.borderRadius="5px",document.body.appendChild(t),t},s0=()=>{const e=Ie.c(12),{apiActions:t,reducer:n}=v.useContext(mn),{moveDocuments:r}=t,[i]=n;let a;e[0]!==i.markedFiles?(a=x=>{var _;if(i.markedFiles.length>0){const w=xD();w.innerHTML=i.markedFiles.length.toString(),x.dataTransfer.setDragImage(w,0,0),x.dataTransfer.clearData(),x.dataTransfer.setData("application/json",JSON.stringify(i.markedFiles)),x.dataTransfer.dropEffect="none",x.dataTransfer.effectAllowed="move"}else x.dataTransfer.setData("application/json",JSON.stringify([parseInt(((_=x.currentTarget.attributes.getNamedItem(Cb))==null?void 0:_.nodeValue)??"",10)])),x.dataTransfer.dropEffect="none",x.dataTransfer.effectAllowed="move"},e[0]=i.markedFiles,e[1]=a):a=e[1];const o=a;let s;e[2]!==o||e[3]!==i.markedFiles?(s=x=>({[Cb]:x,draggable:i.markedFiles.length===0||i.markedFiles.includes(x),onDragStart:o}),e[2]=o,e[3]=i.markedFiles,e[4]=s):s=e[4];const l=s;let c;e[5]!==r?(c=x=>_=>{var b;_.preventDefault(),_.stopPropagation(),_.currentTarget.classList.remove(Xu);const w=_.dataTransfer.files;if(x&&w&&w.length>0){x(w);return}const C=_.dataTransfer.getData("application/json");if(C){const S=JSON.parse(C),M=parseInt(((b=_.currentTarget.attributes.getNamedItem(_b))==null?void 0:b.value)??"",10);r(M,S)}},e[5]=r,e[6]=c):c=e[6];const u=c,d=_D,f=CD,h=SD;let p;e[7]!==u?(p=(x,_)=>({onDrop:u(_==null?void 0:_.onFilesDrop),onDragOver:d(),onDragEnter:f(_==null?void 0:_.ignoreInner),onDragLeave:h,[_b]:x}),e[7]=u,e[8]=p):p=e[8];const m=p;let g;return e[9]!==l||e[10]!==m?(g={getDraggableProps:l,getDropProps:m},e[9]=l,e[10]=m,e[11]=g):g=e[11],g};function wD(e){e.preventDefault(),e.stopPropagation()}function _D(){return wD}function CD(e){return t=>{t.preventDefault(),t.stopPropagation(),t.dataTransfer.types.includes("Files")?(t.dataTransfer.dropEffect="copy",t.currentTarget.classList.add(Xu)):!e&&t.dataTransfer.types.includes("application/json")?(t.dataTransfer.dropEffect="move",t.currentTarget.classList.add(Xu)):t.dataTransfer.dropEffect="none"}}function SD(e){e.preventDefault(),e.stopPropagation(),e.target===e.currentTarget&&(e.dataTransfer.dropEffect="none",e.currentTarget.classList.remove(Xu))}function d3(e,t,n){for(let r=0;r<e.childrenIds.length;r++){const i=e.childrenIds[r];if(i===t)return!0;const a=n.get(i);if(a&&d3(a,t,n))return!0}return!1}function TD(e){if(e.activeFolder==="root")return!1;const t=e.foldersMap.get(e.activeFolder);return!(t!=null&&t.onlyRead)}function f3(e,t){const n=t.get(e);return n===void 0?"":n.parentId===null?n.name:`${f3(n.parentId,t)}/${n.name}`}const $D=()=>{const e=Ie.c(6),{zString:t,zStringRequired:n,zNumberRequired:r}=Qd();let i;e[0]!==r||e[1]!==t||e[2]!==n?(i=di({validToDate:n(),description:t(),name:t(),documentTypeId:r()}),e[0]=r,e[1]=t,e[2]=n,e[3]=i):i=e[3];const a=i;let o;return e[4]!==a?(o={formSchema:a},e[4]=a,e[5]=o):o=e[5],o},l0=e=>{var X;const t=Ie.c(69),{handleClose:n,files:r,targetFolderId:i}=e,{texts:a}=v.useContext(rn),{documents:o}=a,{reducer:s,apiActions:l}=v.useContext(mn),[c]=s,{uploadFiles:u}=l;let d;t[0]!==r?(d=[...r],t[0]=r,t[1]=d):d=t[1];const f=d,h=i??c.activeFolder;let p;t[2]!==h||t[3]!==c.foldersMap?(p=h==="root"?void 0:c.foldersMap.get(h),t[2]=h,t[3]=c.foldersMap,t[4]=p):p=t[4];const m=p,{formSchema:g}=$D();let x;t[5]!==g?(x=af(g),t[5]=g,t[6]=x):x=t[6];let _;t[7]===Symbol.for("react.memo_cache_sentinel")?(_=Hd(new Date().toISOString()),t[7]=_):_=t[7];let w;t[8]!==h||t[9]!==c.documentTypes||t[10]!==c.foldersMap?(w=(X=c.documentTypes.find(J=>{var ee;return J.name===((ee=c.foldersMap.get(h))==null?void 0:ee.defaultDocType)}))==null?void 0:X.id,t[8]=h,t[9]=c.documentTypes,t[10]=c.foldersMap,t[11]=w):w=t[11];let C;t[12]!==w?(C={validToDate:_,documentTypeId:w},t[12]=w,t[13]=C):C=t[13];let b;t[14]!==x||t[15]!==C?(b={resolver:x,defaultValues:C},t[14]=x,t[15]=C,t[16]=b):b=t[16];const S=sn.useForm(b);let M;t[17]!==r||t[18]!==h||t[19]!==n||t[20]!==u?(M=async J=>{h!=="root"&&(await u(r,{folderId:h,...J}),n())},t[17]=r,t[18]=h,t[19]=n,t[20]=u,t[21]=M):M=t[21];const $=M;let k;t[22]!==o||t[23]!==r.length||t[24]!==m.name?(k=o.uploadFilesPrompt(r.length,m.name),t[22]=o,t[23]=r.length,t[24]=m.name,t[25]=k):k=t[25];let R;t[26]!==f?(R=y.jsx("ul",{children:f.map(kD)}),t[26]=f,t[27]=R):R=t[27];let T;t[28]!==k||t[29]!==R?(T=y.jsx(Vn.Header,{closeButton:!0,children:y.jsxs("div",{children:[k,R]})}),t[28]=k,t[29]=R,t[30]=T):T=t[30];let E;t[31]!==S||t[32]!==$?(E=S.handleSubmit($),t[31]=S,t[32]=$,t[33]=E):E=t[33];let A;t[34]!==o.documentType||t[35]!==c.documentTypes?(A=y.jsx(rf,{formField:"documentTypeId",label:o.documentType,options:c.documentTypes,isNumber:!0,required:!0}),t[34]=o.documentType,t[35]=c.documentTypes,t[36]=A):A=t[36];let j;t[37]!==o.validSince?(j=y.jsx(es,{formField:"validToDate",label:o.validSince,type:"date",required:!0}),t[37]=o.validSince,t[38]=j):j=t[38];let I;t[39]!==o.name||t[40]!==f.length?(I=f.length===1?y.jsx(es,{formField:"name",label:o.name,type:"text"}):null,t[39]=o.name,t[40]=f.length,t[41]=I):I=t[41];let D;t[42]===Symbol.for("react.memo_cache_sentinel")?(D={maxLength:u3},t[42]=D):D=t[42];let O;t[43]!==o.description?(O=y.jsx(r0,{formField:"description",label:o.description,customFormControlProps:D}),t[43]=o.description,t[44]=O):O=t[44];let L;t[45]!==A||t[46]!==j||t[47]!==I||t[48]!==O?(L=y.jsxs(Vn.Body,{children:[A,j,I,O]}),t[45]=A,t[46]=j,t[47]=I,t[48]=O,t[49]=L):L=t[49];let B;t[50]!==o.cancel||t[51]!==n?(B=y.jsx(za,{variant:"outlined",color:"secondary",onClick:n,children:o.cancel}),t[50]=o.cancel,t[51]=n,t[52]=B):B=t[52];let P;t[53]!==o.upload?(P=y.jsx(za,{type:"submit",children:o.upload}),t[53]=o.upload,t[54]=P):P=t[54];let H;t[55]!==B||t[56]!==P?(H=y.jsxs(Vn.Footer,{children:[B,P]}),t[55]=B,t[56]=P,t[57]=H):H=t[57];let Y;t[58]!==E||t[59]!==L||t[60]!==H?(Y=y.jsxs(Gr,{onSubmit:E,children:[L,H]}),t[58]=E,t[59]=L,t[60]=H,t[61]=Y):Y=t[61];let q;t[62]!==S||t[63]!==Y?(q=y.jsx(sn.FormProvider,{...S,children:Y}),t[62]=S,t[63]=Y,t[64]=q):q=t[64];let Z;return t[65]!==n||t[66]!==T||t[67]!==q?(Z=y.jsxs(Vn,{show:!0,onHide:n,children:[T,q]}),t[65]=n,t[66]=T,t[67]=q,t[68]=Z):Z=t[68],Z};function kD(e,t){return y.jsxs("li",{children:[e.name," - ",Go(e.size)]},`${e.name}-${t}`)}const MD="_folder_1cktt_1",ED="_collapseArrowDiv_1cktt_8",OD="_button_1cktt_20",AD="_nestedList_1cktt_24",RD="_numberOfFiles_1cktt_31",DD="_collapseArrow_1cktt_8",fa={folder:MD,collapseArrowDiv:ED,button:OD,nestedList:AD,numberOfFiles:RD,collapseArrow:DD},h3=e=>{const t=Ie.c(59),{dirId:n,writePermissions:r}=e,{ProjectIconComponent:i}=v.useContext(rn),{reducer:a}=v.useContext(mn),[o,s]=a,{getDropProps:l}=s0(),[c,u]=v.useState(null),[d,f]=v.useState(!0);let h,p;t[0]!==n||t[1]!==o.foldersMap?(p=o.foldersMap.get(n),t[0]=n,t[1]=o.foldersMap,t[2]=p):p=t[2];const m=p;if(m===void 0)throw new Error(`tried to get dir with id ${n}`);h=m;const g=h;let x;t[3]!==n||t[4]!==g||t[5]!==s||t[6]!==o.activeFolder||t[7]!==o.foldersMap?(x=()=>{o.activeFolder!=="root"&&d3(g,o.activeFolder,o.foldersMap)&&s({type:"select-folder",folderId:n}),f(!0)},t[3]=n,t[4]=g,t[5]=s,t[6]=o.activeFolder,t[7]=o.foldersMap,t[8]=x):x=t[8];const _=x,w=g.childrenIds.length>0;let C;t[9]!==n||t[10]!==s?(C=()=>{s({type:"select-folder",folderId:n})},t[9]=n,t[10]=s,t[11]=C):C=t[11];const b=C;let S;if(t[12]!==n||t[13]!==o.filteredFiles){let Y;t[15]!==n?(Y=q=>q.folderId===n&&q.archive===!1,t[15]=n,t[16]=Y):Y=t[16],S=o.filteredFiles.filter(Y),t[12]=n,t[13]=o.filteredFiles,t[14]=S}else S=t[14];const M=S.length;let $;t[17]!==i||t[18]!==_||t[19]!==w||t[20]!==d?($=w?d?y.jsx("button",{onClick:()=>f(!1),type:"button",children:y.jsx(i,{icon:"chevron-right",iconProps:{className:fa.collapseArrow}})}):y.jsx("button",{onClick:_,type:"button",children:y.jsx(i,{icon:"chevron-down",iconProps:{className:fa.collapseArrow}})}):null,t[17]=i,t[18]=_,t[19]=w,t[20]=d,t[21]=$):$=t[21];let k;t[22]!==$?(k=y.jsx("div",{className:fa.collapseArrowDiv,children:$}),t[22]=$,t[23]=k):k=t[23];let R;t[24]===Symbol.for("react.memo_cache_sentinel")?(R=se(fa.button),t[24]=R):R=t[24];let T;t[25]!==n||t[26]!==g.onlyRead||t[27]!==l||t[28]!==r?(T=r&&!g.onlyRead?l(n,{onFilesDrop:Y=>u(Y)}):{},t[25]=n,t[26]=g.onlyRead,t[27]=l,t[28]=r,t[29]=T):T=t[29];const E=g.defaultDocType??"",A=n===o.activeFolder;let j;t[30]!==g.isDefault||t[31]!==g.name||t[32]!==E||t[33]!==A?(j=y.jsx(s3,{isDefault:g.isDefault,folderName:g.name,typeName:E,isActive:A}),t[30]=g.isDefault,t[31]=g.name,t[32]=E,t[33]=A,t[34]=j):j=t[34];let I;t[35]!==M?(I=M>0?y.jsxs("span",{className:fa.numberOfFiles,children:["[",M,"]"]}):void 0,t[35]=M,t[36]=I):I=t[36];let D;t[37]!==j||t[38]!==I?(D=y.jsxs("div",{className:"d-flex align-items-center gap-2",children:[j,I]}),t[37]=j,t[38]=I,t[39]=D):D=t[39];let O;t[40]!==b||t[41]!==T||t[42]!==D?(O=y.jsx("button",{className:R,onClick:b,type:"button",...T,children:D}),t[40]=b,t[41]=T,t[42]=D,t[43]=O):O=t[43];let L;t[44]!==g.childrenIds||t[45]!==w||t[46]!==d||t[47]!==r?(L=w?d?null:y.jsx("ul",{className:fa.nestedList,children:g==null?void 0:g.childrenIds.map(Y=>y.jsx(h3,{dirId:Y,writePermissions:r},Y))}):void 0,t[44]=g.childrenIds,t[45]=w,t[46]=d,t[47]=r,t[48]=L):L=t[48];let B;t[49]!==O||t[50]!==L||t[51]!==k?(B=y.jsxs("li",{className:fa.folder,children:[k,O,L]}),t[49]=O,t[50]=L,t[51]=k,t[52]=B):B=t[52];let P;t[53]!==n||t[54]!==c?(P=c!==null?y.jsx(l0,{files:c,handleClose:()=>u(null),targetFolderId:n}):null,t[53]=n,t[54]=c,t[55]=P):P=t[55];let H;return t[56]!==B||t[57]!==P?(H=y.jsxs(y.Fragment,{children:[B,P]}),t[56]=B,t[57]=P,t[58]=H):H=t[58],H},jD="_wrapper_1th2u_1",ID="_downloadButton_1th2u_9",bm={wrapper:jD,downloadButton:ID},p3=6048e5,ND=864e5,Sb=Symbol.for("constructDateFrom");function wi(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Sb in e?e[Sb](t):e instanceof Date?new e.constructor(t):new Date(t)}function nr(e,t){return wi(t||e,e)}function m3(e,t){const n=()=>wi(t==null?void 0:t.in,NaN),r=zD(e);let i;if(r.date){const l=BD(r.date,2);i=WD(l.restDateString,l.year)}if(!i||isNaN(+i))return n();const a=+i;let o=0,s;if(r.time&&(o=UD(r.time),isNaN(o)))return n();if(r.timezone){if(s=HD(r.timezone),isNaN(s))return n()}else{const l=new Date(a+o),c=nr(0,t==null?void 0:t.in);return c.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),c.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),c}return nr(a+o+s,t==null?void 0:t.in)}const eu={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},PD=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,LD=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,FD=/^([+-])(\d{2})(?::?(\d{2}))?$/;function zD(e){const t={},n=e.split(eu.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],eu.timeZoneDelimiter.test(t.date)&&(t.date=e.split(eu.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const i=eu.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function BD(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:a===null?i:a*100,restDateString:e.slice((r[1]||r[2]).length)}}function WD(e,t){if(t===null)return new Date(NaN);const n=e.match(PD);if(!n)return new Date(NaN);const r=!!n[4],i=Bs(n[1]),a=Bs(n[2])-1,o=Bs(n[3]),s=Bs(n[4]),l=Bs(n[5])-1;if(r)return ZD(t,s,l)?VD(t,s,l):new Date(NaN);{const c=new Date(0);return!YD(t,a,o)||!GD(t,i)?new Date(NaN):(c.setUTCFullYear(t,a,Math.max(i,o)),c)}}function Bs(e){return e?parseInt(e):1}function UD(e){const t=e.match(LD);if(!t)return NaN;const n=Qh(t[1]),r=Qh(t[2]),i=Qh(t[3]);return XD(n,r,i)?n*36e5+r*6e4+i*1e3:NaN}function Qh(e){return e&&parseFloat(e.replace(",","."))||0}function HD(e){if(e==="Z")return 0;const t=e.match(FD);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return KD(r,i)?n*(r*36e5+i*6e4):NaN}function VD(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const i=r.getUTCDay()||7,a=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+a),r}const qD=[31,null,31,30,31,30,31,31,30,31,30,31];function g3(e){return e%400===0||e%4===0&&e%100!==0}function YD(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(qD[t]||(g3(e)?29:28))}function GD(e,t){return t>=1&&t<=(g3(e)?366:365)}function ZD(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function XD(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function KD(e,t){return t>=0&&t<=59}let JD={};function of(){return JD}function Il(e,t){var s,l,c,u;const n=of(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,i=nr(e,t==null?void 0:t.in),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function Ku(e,t){return Il(e,{...t,weekStartsOn:1})}function v3(e,t){const n=nr(e,t==null?void 0:t.in),r=n.getFullYear(),i=wi(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const a=Ku(i),o=wi(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const s=Ku(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Tb(e){const t=nr(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function QD(e,...t){const n=wi.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function $b(e,t){const n=nr(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function ej(e,t,n){const[r,i]=QD(n==null?void 0:n.in,e,t),a=$b(r),o=$b(i),s=+a-Tb(a),l=+o-Tb(o);return Math.round((s-l)/ND)}function tj(e,t){const n=v3(e,t),r=wi(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ku(r)}function nj(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function rj(e){return!(!nj(e)&&typeof e!="number"||isNaN(+nr(e)))}function ij(e,t){const n=nr(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const aj={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},oj=(e,t,n)=>{let r;const i=aj[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function ep(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const sj={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},lj={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},cj={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},uj={date:ep({formats:sj,defaultWidth:"full"}),time:ep({formats:lj,defaultWidth:"full"}),dateTime:ep({formats:cj,defaultWidth:"full"})},dj={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},fj=(e,t,n,r)=>dj[e];function Ws(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):o;i=e.formattingValues[s]||e.formattingValues[o]}else{const o=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[o]}const a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}const hj={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},pj={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},mj={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},gj={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},vj={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},bj={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},yj=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},xj={ordinalNumber:yj,era:Ws({values:hj,defaultWidth:"wide"}),quarter:Ws({values:pj,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ws({values:mj,defaultWidth:"wide"}),day:Ws({values:gj,defaultWidth:"wide"}),dayPeriod:Ws({values:vj,defaultWidth:"wide",formattingValues:bj,defaultFormattingWidth:"wide"})};function Us(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?_j(s,d=>d.test(o)):wj(s,d=>d.test(o));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(o.length);return{value:c,rest:u}}}function wj(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function _j(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Cj(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;const s=t.slice(i.length);return{value:o,rest:s}}}const Sj=/^(\d+)(th|st|nd|rd)?/i,Tj=/\d+/i,$j={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},kj={any:[/^b/i,/^(a|c)/i]},Mj={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ej={any:[/1/i,/2/i,/3/i,/4/i]},Oj={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Aj={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Rj={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Dj={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},jj={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ij={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Nj={ordinalNumber:Cj({matchPattern:Sj,parsePattern:Tj,valueCallback:e=>parseInt(e,10)}),era:Us({matchPatterns:$j,defaultMatchWidth:"wide",parsePatterns:kj,defaultParseWidth:"any"}),quarter:Us({matchPatterns:Mj,defaultMatchWidth:"wide",parsePatterns:Ej,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Us({matchPatterns:Oj,defaultMatchWidth:"wide",parsePatterns:Aj,defaultParseWidth:"any"}),day:Us({matchPatterns:Rj,defaultMatchWidth:"wide",parsePatterns:Dj,defaultParseWidth:"any"}),dayPeriod:Us({matchPatterns:jj,defaultMatchWidth:"any",parsePatterns:Ij,defaultParseWidth:"any"})},Pj={code:"en-US",formatDistance:oj,formatLong:uj,formatRelative:fj,localize:xj,match:Nj,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Lj(e,t){const n=nr(e,t==null?void 0:t.in);return ej(n,ij(n))+1}function Fj(e,t){const n=nr(e,t==null?void 0:t.in),r=+Ku(n)-+tj(n);return Math.round(r/p3)+1}function b3(e,t){var u,d,f,h;const n=nr(e,t==null?void 0:t.in),r=n.getFullYear(),i=of(),a=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??i.firstWeekContainsDate??((h=(f=i.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,o=wi((t==null?void 0:t.in)||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);const s=Il(o,t),l=wi((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const c=Il(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function zj(e,t){var o,s,l,c;const n=of(),r=(t==null?void 0:t.firstWeekContainsDate)??((s=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:s.firstWeekContainsDate)??n.firstWeekContainsDate??((c=(l=n.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??1,i=b3(e,t),a=wi((t==null?void 0:t.in)||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),Il(a,t)}function Bj(e,t){const n=nr(e,t==null?void 0:t.in),r=+Il(n,t)-+zj(n,t);return Math.round(r/p3)+1}function zt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Ai={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return zt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):zt(n+1,2)},d(e,t){return zt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return zt(e.getHours()%12||12,t.length)},H(e,t){return zt(e.getHours(),t.length)},m(e,t){return zt(e.getMinutes(),t.length)},s(e,t){return zt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return zt(i,t.length)}},go={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},kb={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Ai.y(e,t)},Y:function(e,t,n,r){const i=b3(e,r),a=i>0?i:1-i;if(t==="YY"){const o=a%100;return zt(o,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):zt(a,t.length)},R:function(e,t){const n=v3(e);return zt(n,t.length)},u:function(e,t){const n=e.getFullYear();return zt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return zt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return zt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Ai.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return zt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=Bj(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):zt(i,t.length)},I:function(e,t,n){const r=Fj(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):zt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ai.d(e,t)},D:function(e,t,n){const r=Lj(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):zt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return zt(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return zt(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return zt(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=go.noon:r===0?i=go.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=go.evening:r>=12?i=go.afternoon:r>=4?i=go.morning:i=go.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Ai.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ai.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):zt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):zt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ai.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ai.s(e,t)},S:function(e,t){return Ai.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Eb(r);case"XXXX":case"XX":return va(r);case"XXXXX":case"XXX":default:return va(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Eb(r);case"xxxx":case"xx":return va(r);case"xxxxx":case"xxx":default:return va(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Mb(r,":");case"OOOO":default:return"GMT"+va(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Mb(r,":");case"zzzz":default:return"GMT"+va(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return zt(r,t.length)},T:function(e,t,n){return zt(+e,t.length)}};function Mb(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+zt(a,2)}function Eb(e,t){return e%60===0?(e>0?"-":"+")+zt(Math.abs(e)/60,2):va(e,t)}function va(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=zt(Math.trunc(r/60),2),a=zt(r%60,2);return n+i+t+a}const Ob=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},y3=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Wj=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Ob(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Ob(r,t)).replace("{{time}}",y3(i,t))},Uj={p:y3,P:Wj},Hj=/^D+$/,Vj=/^Y+$/,qj=["D","DD","YY","YYYY"];function Yj(e){return Hj.test(e)}function Gj(e){return Vj.test(e)}function Zj(e,t,n){const r=Xj(e,t,n);if(console.warn(r),qj.includes(e))throw new RangeError(r)}function Xj(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Kj=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jj=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Qj=/^'([^]*?)'?$/,eI=/''/g,tI=/[a-zA-Z]/;function x3(e,t,n){var u,d,f,h;const r=of(),i=r.locale??Pj,a=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,o=r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,s=nr(e,n==null?void 0:n.in);if(!rj(s))throw new RangeError("Invalid time value");let l=t.match(Jj).map(p=>{const m=p[0];if(m==="p"||m==="P"){const g=Uj[m];return g(p,i.formatLong)}return p}).join("").match(Kj).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:nI(p)};if(kb[m])return{isToken:!0,value:p};if(m.match(tI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));const c={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(Gj(m)||Yj(m))&&Zj(m,t,String(e));const g=kb[m[0]];return g(s,m,i.localize,c)}).join("")}function nI(e){const t=e.match(Qj);return t?t[1].replace(eI,"'"):e}function w3(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var Nl;(function(e){e.event="event",e.props="prop"})(Nl||(Nl={}));function Li(){}function rI(e){var t,n=void 0;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t&&r.length===t.length&&r.every(function(a,o){return a===t[o]})||(t=r,n=e.apply(void 0,r)),n}}function Pl(e){return!!(e||"").match(/\d/)}function jo(e){return e==null}function iI(e){return typeof e=="number"&&isNaN(e)}function _3(e){return jo(e)||iI(e)||typeof e=="number"&&!isFinite(e)}function C3(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function aI(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function oI(e,t,n){var r=aI(n),i=e.search(/[1-9]/);return i=i===-1?e.length:i,e.substring(0,i)+e.substring(i,e.length).replace(r,"$1"+t)}function sI(e){var t=v.useRef(e);t.current=e;var n=v.useRef(function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t.current.apply(t,r)});return n.current}function c0(e,t){t===void 0&&(t=!0);var n=e[0]==="-",r=n&&t;e=e.replace("-","");var i=e.split("."),a=i[0],o=i[1]||"";return{beforeDecimal:a,afterDecimal:o,hasNegation:n,addNegation:r}}function lI(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",i=n[1]||"";return(t?"-":"")+r+(i?"."+i:"")}function S3(e,t,n){for(var r="",i=n?"0":"",a=0;a<=t-1;a++)r+=e[a]||i;return r}function Ab(e,t){return Array(t+1).join(e)}function T3(e){var t=e+"",n=t[0]==="-"?"-":"";n&&(t=t.substring(1));var r=t.split(/[eE]/g),i=r[0],a=r[1];if(a=Number(a),!a)return n+i;i=i.replace(".","");var o=1+a,s=i.length;return o<0?i="0."+Ab("0",Math.abs(o))+i:o>=s?i=i+Ab("0",o-s):i=(i.substring(0,o)||"0")+"."+i.substring(o),n+i}function Rb(e,t,n){if(["","-"].indexOf(e)!==-1)return e;var r=(e.indexOf(".")!==-1||n)&&t,i=c0(e),a=i.beforeDecimal,o=i.afterDecimal,s=i.hasNegation,l=parseFloat("0."+(o||"0")),c=o.length<=t?"0."+o:l.toFixed(t),u=c.split("."),d=a;a&&Number(u[0])&&(d=a.split("").reverse().reduce(function(m,g,x){return m.length>x?(Number(m[0])+Number(g)).toString()+m.substring(1,m.length):g+m},u[0]));var f=S3(u[1]||"",t,n),h=s?"-":"",p=r?".":"";return""+h+d+p+f}function xa(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var $3=rI(function(e,t){for(var n=0,r=0,i=e.length,a=t.length;e[n]===t[n]&&n<i;)n++;for(;e[i-1-r]===t[a-1-r]&&a-r>n&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:a-r}}}),cI=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function uI(e,t,n){return Math.min(Math.max(e,t),n)}function tp(e){return Math.max(e.selectionStart,e.selectionEnd)}function dI(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function fI(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function hI(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function pI(e,t,n,r,i,a,o){o===void 0&&(o=hI);var s=i.findIndex(function(C){return C}),l=e.slice(0,s);!t&&!n.startsWith(l)&&(t=l,n=l+n,r=r+l.length);for(var c=n.length,u=e.length,d={},f=new Array(c),h=0;h<c;h++){f[h]=-1;for(var p=0,m=u;p<m;p++){var g=o({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:h,formattedValueIndex:p});if(g&&d[p]!==!0){f[h]=p,d[p]=!0;break}}}for(var x=r;x<c&&(f[x]===-1||!a(n[x]));)x++;var _=x===c||f[x]===-1?u:f[x];for(x=r-1;x>0&&f[x]===-1;)x--;var w=x===-1||f[x]===-1?0:f[x]+1;return w>_?_:r-w<_-r?w:_}function Db(e,t,n,r){var i=e.length;if(t=uI(t,0,i),r==="left"){for(;t>=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=i&&!n[t];)t++;t>i&&(t=n.lastIndexOf(!0))}return t===-1&&(t=i),t}function mI(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(Pl(e[n])||Pl(e[n-1]));return t}function k3(e,t,n,r,i,a){a===void 0&&(a=Li);var o=sI(function(p,m){var g,x;return _3(p)?(x="",g=""):typeof p=="number"||m?(x=typeof p=="number"?T3(p):p,g=r(x)):(x=i(p,void 0),g=r(x)),{formattedValue:g,numAsString:x}}),s=v.useState(function(){return o(jo(e)?t:e,n)}),l=s[0],c=s[1],u=function(p,m){p.formattedValue!==l.formattedValue&&c({formattedValue:p.formattedValue,numAsString:p.value}),a(p,m)},d=e,f=n;jo(e)&&(d=l.numAsString,f=!0);var h=o(d,f);return v.useMemo(function(){c(h)},[h.formattedValue]),[l,u]}function gI(e){return e.replace(/[^0-9]/g,"")}function vI(e){return e}function bI(e){var t=e.type;t===void 0&&(t="text");var n=e.displayType;n===void 0&&(n="input");var r=e.customInput,i=e.renderText,a=e.getInputRef,o=e.format;o===void 0&&(o=vI);var s=e.removeFormatting;s===void 0&&(s=gI);var l=e.defaultValue,c=e.valueIsNumericString,u=e.onValueChange,d=e.isAllowed,f=e.onChange;f===void 0&&(f=Li);var h=e.onKeyDown;h===void 0&&(h=Li);var p=e.onMouseUp;p===void 0&&(p=Li);var m=e.onFocus;m===void 0&&(m=Li);var g=e.onBlur;g===void 0&&(g=Li);var x=e.value,_=e.getCaretBoundary;_===void 0&&(_=mI);var w=e.isValidInputCharacter;w===void 0&&(w=Pl);var C=e.isCharacterSame,b=w3(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),S=k3(x,l,!!c,o,s,u),M=S[0],$=M.formattedValue,k=M.numAsString,R=S[1],T=v.useRef(),E=v.useRef({formattedValue:$,numAsString:k}),A=function(ne,re){E.current={formattedValue:ne.formattedValue,numAsString:ne.value},R(ne,re)},j=v.useState(!1),I=j[0],D=j[1],O=v.useRef(null),L=v.useRef({setCaretTimeout:null,focusTimeout:null});v.useEffect(function(){return D(!0),function(){clearTimeout(L.current.setCaretTimeout),clearTimeout(L.current.focusTimeout)}},[]);var B=o,P=function(ne,re){var ae=parseFloat(re);return{formattedValue:ne,value:re,floatValue:isNaN(ae)?void 0:ae}},H=function(ne,re,ae){ne.selectionStart===0&&ne.selectionEnd===ne.value.length||(xa(ne,re),L.current.setCaretTimeout=setTimeout(function(){ne.value===ae&&ne.selectionStart!==re&&xa(ne,re)},0))},Y=function(ne,re,ae){return Db(ne,re,_(ne),ae)},q=function(ne,re,ae){var le=_(re),ye=pI(re,$,ne,ae,le,w,C);return ye=Db(re,ye,le),ye},Z=function(ne){var re=ne.formattedValue;re===void 0&&(re="");var ae=ne.input,le=ne.source,ye=ne.event,ge=ne.numAsString,be;if(ae){var Me=ne.inputValue||ae.value,ce=tp(ae);ae.value=re,be=q(Me,re,ce),be!==void 0&&H(ae,be,re)}re!==$&&A(P(re,ge),{event:ye,source:le})};v.useEffect(function(){var ne=E.current,re=ne.formattedValue,ae=ne.numAsString;($!==re||k!==ae)&&A(P($,k),{event:void 0,source:Nl.props})},[$,k]);var X=O.current?tp(O.current):void 0,J=typeof window<"u"?v.useLayoutEffect:v.useEffect;J(function(){var ne=O.current;if($!==E.current.formattedValue&&ne){var re=q(E.current.formattedValue,$,X);ne.value=$,H(ne,re,$)}},[$]);var ee=function(ne,re,ae){var le=re.target,ye=T.current?cI(T.current,le.selectionEnd):$3($,ne),ge=Object.assign(Object.assign({},ye),{lastValue:$}),be=s(ne,ge),Me=B(be);if(be=s(Me,void 0),d&&!d(P(Me,be))){var ce=re.target,de=tp(ce),Ce=q(ne,$,de);return ce.value=$,H(ce,Ce,$),!1}return Z({formattedValue:Me,numAsString:be,inputValue:ne,event:re,source:ae,input:re.target}),!0},W=function(ne,re){re===void 0&&(re=0);var ae=ne.selectionStart,le=ne.selectionEnd;T.current={selectionStart:ae,selectionEnd:le+re}},F=function(ne){var re=ne.target,ae=re.value,le=ee(ae,ne,Nl.event);le&&f(ne),T.current=void 0},z=function(ne){var re=ne.target,ae=ne.key,le=re.selectionStart,ye=re.selectionEnd,ge=re.value;ge===void 0&&(ge="");var be;ae==="ArrowLeft"||ae==="Backspace"?be=Math.max(le-1,0):ae==="ArrowRight"?be=Math.min(le+1,ge.length):ae==="Delete"&&(be=le);var Me=0;ae==="Delete"&&le===ye&&(Me=1);var ce=ae==="ArrowLeft"||ae==="ArrowRight";if(be===void 0||le!==ye&&!ce){h(ne),W(re,Me);return}var de=be;if(ce){var Ce=ae==="ArrowLeft"?"left":"right";de=Y(ge,be,Ce),de!==be&&ne.preventDefault()}else ae==="Delete"&&!w(ge[be])?de=Y(ge,be,"right"):ae==="Backspace"&&!w(ge[be])&&(de=Y(ge,be,"left"));de!==be&&H(re,de,ge),h(ne),W(re,Me)},V=function(ne){var re=ne.target,ae=function(){var le=re.selectionStart,ye=re.selectionEnd,ge=re.value;if(ge===void 0&&(ge=""),le===ye){var be=Y(ge,le);be!==le&&H(re,be,ge)}};ae(),requestAnimationFrame(function(){ae()}),p(ne),W(re)},N=function(ne){ne.persist&&ne.persist();var re=ne.target,ae=ne.currentTarget;O.current=re,L.current.focusTimeout=setTimeout(function(){var le=re.selectionStart,ye=re.selectionEnd,ge=re.value;ge===void 0&&(ge="");var be=Y(ge,le);be!==le&&!(le===0&&ye===ge.length)&&H(re,be,ge),m(Object.assign(Object.assign({},ne),{currentTarget:ae}))},0)},te=function(ne){O.current=null,clearTimeout(L.current.focusTimeout),clearTimeout(L.current.setCaretTimeout),g(ne)},K=I&&dI()?"numeric":void 0,G=Object.assign({inputMode:K},b,{type:t,value:$,onChange:F,onKeyDown:z,onMouseUp:V,onFocus:N,onBlur:te});if(n==="text")return i?v.createElement(v.Fragment,null,i($,b)||null):v.createElement("span",Object.assign({},b,{ref:a}),$);if(r){var oe=r;return v.createElement(oe,Object.assign({},G,{ref:a}))}return v.createElement("input",Object.assign({},G,{ref:a}))}function jb(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,i=t.prefix;i===void 0&&(i="");var a=t.suffix;a===void 0&&(a="");var o=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s="thousand"),e===""||e==="-")return e;var l=sf(t),c=l.thousandSeparator,u=l.decimalSeparator,d=n!==0&&e.indexOf(".")!==-1||n&&r,f=c0(e,o),h=f.beforeDecimal,p=f.afterDecimal,m=f.addNegation;return n!==void 0&&(p=S3(p,n,!!r)),c&&(h=oI(h,c,s)),i&&(h=i+h),a&&(p=p+a),m&&(h="-"+h),e=h+(d&&u||"")+p,e}function sf(e){var t=e.decimalSeparator;t===void 0&&(t=".");var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return n===!0&&(n=","),r||(r=[t,"."]),{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function yI(e,t){e===void 0&&(e="");var n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),i=n.test(e),a=r.test(e);return e=e.replace(/-/g,""),i&&!a&&t&&(e="-"+e),e}function xI(e,t){return new RegExp("(^-)|[0-9]|"+C3(e),"g")}function wI(e,t,n){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(n!=null&&n.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function _I(e,t,n){var r;t===void 0&&(t=fI(e));var i=n.allowNegative,a=n.prefix;a===void 0&&(a="");var o=n.suffix;o===void 0&&(o="");var s=n.decimalScale,l=t.from,c=t.to,u=c.start,d=c.end,f=sf(n),h=f.allowedDecimalSeparators,p=f.decimalSeparator,m=e[d]===p;if(Pl(e)&&(e===a||e===o)&&t.lastValue==="")return e;if(d-u===1&&h.indexOf(e[u])!==-1){var g=s===0?"":p;e=e.substring(0,u)+g+e.substring(u+1,e.length)}var x=function(O,L,B){var P=!1,H=!1;a.startsWith("-")?P=!1:O.startsWith("--")?(P=!1,H=!0):o.startsWith("-")&&O.length===o.length?P=!1:O[0]==="-"&&(P=!0);var Y=P?1:0;return H&&(Y=2),Y&&(O=O.substring(Y),L-=Y,B-=Y),{value:O,start:L,end:B,hasNegation:P}},_=x(e,u,d),w=_.hasNegation;r=_,e=r.value,u=r.start,d=r.end;var C=x(t.lastValue,l.start,l.end),b=C.start,S=C.end,M=C.value,$=e.substring(u,d);e.length&&M.length&&(b>M.length-o.length||S<a.length)&&!($&&o.startsWith($))&&(e=M);var k=0;e.startsWith(a)?k+=a.length:u<a.length&&(k=u),e=e.substring(k),d-=k;var R=e.length,T=e.length-o.length;e.endsWith(o)?R=T:(d>T||d>e.length-o.length)&&(R=d),e=e.substring(0,R),e=yI(w?"-"+e:e,i),e=(e.match(xI(p))||[]).join("");var E=e.indexOf(p);e=e.replace(new RegExp(C3(p),"g"),function(O,L){return L===E?".":""});var A=c0(e,i),j=A.beforeDecimal,I=A.afterDecimal,D=A.addNegation;return c.end-c.start<l.end-l.start&&j===""&&m&&!parseFloat(I)&&(e=D?"-":""),e}function CI(e,t){var n=t.prefix;n===void 0&&(n="");var r=t.suffix;r===void 0&&(r="");var i=Array.from({length:e.length+1}).map(function(){return!0}),a=e[0]==="-";i.fill(!1,0,n.length+(a?1:0));var o=e.length;return i.fill(!1,o-r.length+1,o+1),i}function SI(e){var t=sf(e),n=t.thousandSeparator,r=t.decimalSeparator,i=e.prefix;i===void 0&&(i="");var a=e.allowNegative;if(a===void 0&&(a=!0),n===r)throw new Error(`
|
|
246
|
+
`}return ae.substring(0,ae.length-1)},I.renderTo2dContext=function(W,F){F=F||2;for(var z=I.getModuleCount(),V=0;V<z;V++)for(var N=0;N<z;N++)W.fillStyle=I.isDark(V,N)?"black":"white",W.fillRect(V*F,N*F,F,F)},I};r.stringToBytesFuncs={default:function(b){for(var S=[],M=0;M<b.length;M+=1){var $=b.charCodeAt(M);S.push($&255)}return S}},r.stringToBytes=r.stringToBytesFuncs.default,r.createStringToBytes=function(b,S){var M=function(){for(var k=_(b),R=function(){var B=k.read();if(B==-1)throw"eof";return B},T=0,E={};;){var A=k.read();if(A==-1)break;var j=R(),I=R(),D=R(),O=String.fromCharCode(A<<8|j),L=I<<8|D;E[O]=L,T+=1}if(T!=S)throw T+" != "+S;return E}(),$=63;return function(k){for(var R=[],T=0;T<k.length;T+=1){var E=k.charCodeAt(T);if(E<128)R.push(E);else{var A=M[k.charAt(T)];typeof A=="number"?(A&255)==A?R.push(A):(R.push(A>>>8),R.push(A&255)):R.push($)}}return R}};var i={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},a={L:1,M:0,Q:3,H:2},o={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},s=function(){var b=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],S=1335,M=7973,$=21522,k={},R=function(T){for(var E=0;T!=0;)E+=1,T>>>=1;return E};return k.getBCHTypeInfo=function(T){for(var E=T<<10;R(E)-R(S)>=0;)E^=S<<R(E)-R(S);return(T<<10|E)^$},k.getBCHTypeNumber=function(T){for(var E=T<<12;R(E)-R(M)>=0;)E^=M<<R(E)-R(M);return T<<12|E},k.getPatternPosition=function(T){return b[T-1]},k.getMaskFunction=function(T){switch(T){case o.PATTERN000:return function(E,A){return(E+A)%2==0};case o.PATTERN001:return function(E,A){return E%2==0};case o.PATTERN010:return function(E,A){return A%3==0};case o.PATTERN011:return function(E,A){return(E+A)%3==0};case o.PATTERN100:return function(E,A){return(Math.floor(E/2)+Math.floor(A/3))%2==0};case o.PATTERN101:return function(E,A){return E*A%2+E*A%3==0};case o.PATTERN110:return function(E,A){return(E*A%2+E*A%3)%2==0};case o.PATTERN111:return function(E,A){return(E*A%3+(E+A)%2)%2==0};default:throw"bad maskPattern:"+T}},k.getErrorCorrectPolynomial=function(T){for(var E=c([1],0),A=0;A<T;A+=1)E=E.multiply(c([1,l.gexp(A)],0));return E},k.getLengthInBits=function(T,E){if(1<=E&&E<10)switch(T){case i.MODE_NUMBER:return 10;case i.MODE_ALPHA_NUM:return 9;case i.MODE_8BIT_BYTE:return 8;case i.MODE_KANJI:return 8;default:throw"mode:"+T}else if(E<27)switch(T){case i.MODE_NUMBER:return 12;case i.MODE_ALPHA_NUM:return 11;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 10;default:throw"mode:"+T}else if(E<41)switch(T){case i.MODE_NUMBER:return 14;case i.MODE_ALPHA_NUM:return 13;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 12;default:throw"mode:"+T}else throw"type:"+E},k.getLostPoint=function(T){for(var E=T.getModuleCount(),A=0,j=0;j<E;j+=1)for(var I=0;I<E;I+=1){for(var D=0,O=T.isDark(j,I),L=-1;L<=1;L+=1)if(!(j+L<0||E<=j+L))for(var B=-1;B<=1;B+=1)I+B<0||E<=I+B||L==0&&B==0||O==T.isDark(j+L,I+B)&&(D+=1);D>5&&(A+=3+D-5)}for(var j=0;j<E-1;j+=1)for(var I=0;I<E-1;I+=1){var P=0;T.isDark(j,I)&&(P+=1),T.isDark(j+1,I)&&(P+=1),T.isDark(j,I+1)&&(P+=1),T.isDark(j+1,I+1)&&(P+=1),(P==0||P==4)&&(A+=3)}for(var j=0;j<E;j+=1)for(var I=0;I<E-6;I+=1)T.isDark(j,I)&&!T.isDark(j,I+1)&&T.isDark(j,I+2)&&T.isDark(j,I+3)&&T.isDark(j,I+4)&&!T.isDark(j,I+5)&&T.isDark(j,I+6)&&(A+=40);for(var I=0;I<E;I+=1)for(var j=0;j<E-6;j+=1)T.isDark(j,I)&&!T.isDark(j+1,I)&&T.isDark(j+2,I)&&T.isDark(j+3,I)&&T.isDark(j+4,I)&&!T.isDark(j+5,I)&&T.isDark(j+6,I)&&(A+=40);for(var H=0,I=0;I<E;I+=1)for(var j=0;j<E;j+=1)T.isDark(j,I)&&(H+=1);var Y=Math.abs(100*H/E/E-50)/5;return A+=Y*10,A},k}(),l=function(){for(var b=new Array(256),S=new Array(256),M=0;M<8;M+=1)b[M]=1<<M;for(var M=8;M<256;M+=1)b[M]=b[M-4]^b[M-5]^b[M-6]^b[M-8];for(var M=0;M<255;M+=1)S[b[M]]=M;var $={};return $.glog=function(k){if(k<1)throw"glog("+k+")";return S[k]},$.gexp=function(k){for(;k<0;)k+=255;for(;k>=256;)k-=255;return b[k]},$}();function c(b,S){if(typeof b.length>"u")throw b.length+"/"+S;var M=function(){for(var k=0;k<b.length&&b[k]==0;)k+=1;for(var R=new Array(b.length-k+S),T=0;T<b.length-k;T+=1)R[T]=b[T+k];return R}(),$={};return $.getAt=function(k){return M[k]},$.getLength=function(){return M.length},$.multiply=function(k){for(var R=new Array($.getLength()+k.getLength()-1),T=0;T<$.getLength();T+=1)for(var E=0;E<k.getLength();E+=1)R[T+E]^=l.gexp(l.glog($.getAt(T))+l.glog(k.getAt(E)));return c(R,0)},$.mod=function(k){if($.getLength()-k.getLength()<0)return $;for(var R=l.glog($.getAt(0))-l.glog(k.getAt(0)),T=new Array($.getLength()),E=0;E<$.getLength();E+=1)T[E]=$.getAt(E);for(var E=0;E<k.getLength();E+=1)T[E]^=l.gexp(l.glog(k.getAt(E))+R);return c(T,0).mod(k)},$}var u=function(){var b=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],S=function(k,R){var T={};return T.totalCount=k,T.dataCount=R,T},M={},$=function(k,R){switch(R){case a.L:return b[(k-1)*4+0];case a.M:return b[(k-1)*4+1];case a.Q:return b[(k-1)*4+2];case a.H:return b[(k-1)*4+3];default:return}};return M.getRSBlocks=function(k,R){var T=$(k,R);if(typeof T>"u")throw"bad rs block @ typeNumber:"+k+"/errorCorrectionLevel:"+R;for(var E=T.length/3,A=[],j=0;j<E;j+=1)for(var I=T[j*3+0],D=T[j*3+1],O=T[j*3+2],L=0;L<I;L+=1)A.push(S(D,O));return A},M}(),d=function(){var b=[],S=0,M={};return M.getBuffer=function(){return b},M.getAt=function($){var k=Math.floor($/8);return(b[k]>>>7-$%8&1)==1},M.put=function($,k){for(var R=0;R<k;R+=1)M.putBit(($>>>k-R-1&1)==1)},M.getLengthInBits=function(){return S},M.putBit=function($){var k=Math.floor(S/8);b.length<=k&&b.push(0),$&&(b[k]|=128>>>S%8),S+=1},M},f=function(b){var S=i.MODE_NUMBER,M=b,$={};$.getMode=function(){return S},$.getLength=function(T){return M.length},$.write=function(T){for(var E=M,A=0;A+2<E.length;)T.put(k(E.substring(A,A+3)),10),A+=3;A<E.length&&(E.length-A==1?T.put(k(E.substring(A,A+1)),4):E.length-A==2&&T.put(k(E.substring(A,A+2)),7))};var k=function(T){for(var E=0,A=0;A<T.length;A+=1)E=E*10+R(T.charAt(A));return E},R=function(T){if("0"<=T&&T<="9")return T.charCodeAt(0)-48;throw"illegal char :"+T};return $},h=function(b){var S=i.MODE_ALPHA_NUM,M=b,$={};$.getMode=function(){return S},$.getLength=function(R){return M.length},$.write=function(R){for(var T=M,E=0;E+1<T.length;)R.put(k(T.charAt(E))*45+k(T.charAt(E+1)),11),E+=2;E<T.length&&R.put(k(T.charAt(E)),6)};var k=function(R){if("0"<=R&&R<="9")return R.charCodeAt(0)-48;if("A"<=R&&R<="Z")return R.charCodeAt(0)-65+10;switch(R){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+R}};return $},p=function(b){var S=i.MODE_8BIT_BYTE,M=r.stringToBytes(b),$={};return $.getMode=function(){return S},$.getLength=function(k){return M.length},$.write=function(k){for(var R=0;R<M.length;R+=1)k.put(M[R],8)},$},m=function(b){var S=i.MODE_KANJI,M=r.stringToBytesFuncs.SJIS;if(!M)throw"sjis not supported.";(function(R,T){var E=M(R);if(E.length!=2||(E[0]<<8|E[1])!=T)throw"sjis not supported."})("友",38726);var $=M(b),k={};return k.getMode=function(){return S},k.getLength=function(R){return~~($.length/2)},k.write=function(R){for(var T=$,E=0;E+1<T.length;){var A=(255&T[E])<<8|255&T[E+1];if(33088<=A&&A<=40956)A-=33088;else if(57408<=A&&A<=60351)A-=49472;else throw"illegal char at "+(E+1)+"/"+A;A=(A>>>8&255)*192+(A&255),R.put(A,13),E+=2}if(E<T.length)throw"illegal char at "+(E+1)},k},g=function(){var b=[],S={};return S.writeByte=function(M){b.push(M&255)},S.writeShort=function(M){S.writeByte(M),S.writeByte(M>>>8)},S.writeBytes=function(M,$,k){$=$||0,k=k||M.length;for(var R=0;R<k;R+=1)S.writeByte(M[R+$])},S.writeString=function(M){for(var $=0;$<M.length;$+=1)S.writeByte(M.charCodeAt($))},S.toByteArray=function(){return b},S.toString=function(){var M="";M+="[";for(var $=0;$<b.length;$+=1)$>0&&(M+=","),M+=b[$];return M+="]",M},S},x=function(){var b=0,S=0,M=0,$="",k={},R=function(E){$+=String.fromCharCode(T(E&63))},T=function(E){if(!(E<0)){if(E<26)return 65+E;if(E<52)return 97+(E-26);if(E<62)return 48+(E-52);if(E==62)return 43;if(E==63)return 47}throw"n:"+E};return k.writeByte=function(E){for(b=b<<8|E&255,S+=8,M+=1;S>=6;)R(b>>>S-6),S-=6},k.flush=function(){if(S>0&&(R(b<<6-S),b=0,S=0),M%3!=0)for(var E=3-M%3,A=0;A<E;A+=1)$+="="},k.toString=function(){return $},k},_=function(b){var S=b,M=0,$=0,k=0,R={};R.read=function(){for(;k<8;){if(M>=S.length){if(k==0)return-1;throw"unexpected end of file./"+k}var E=S.charAt(M);if(M+=1,E=="=")return k=0,-1;if(E.match(/^\s$/))continue;$=$<<6|T(E.charCodeAt(0)),k+=6}var A=$>>>k-8&255;return k-=8,A};var T=function(E){if(65<=E&&E<=90)return E-65;if(97<=E&&E<=122)return E-97+26;if(48<=E&&E<=57)return E-48+52;if(E==43)return 62;if(E==47)return 63;throw"c:"+E};return R},w=function(b,S){var M=b,$=S,k=new Array(b*S),R={};R.setPixel=function(j,I,D){k[I*M+j]=D},R.write=function(j){j.writeString("GIF87a"),j.writeShort(M),j.writeShort($),j.writeByte(128),j.writeByte(0),j.writeByte(0),j.writeByte(0),j.writeByte(0),j.writeByte(0),j.writeByte(255),j.writeByte(255),j.writeByte(255),j.writeString(","),j.writeShort(0),j.writeShort(0),j.writeShort(M),j.writeShort($),j.writeByte(0);var I=2,D=E(I);j.writeByte(I);for(var O=0;D.length-O>255;)j.writeByte(255),j.writeBytes(D,O,255),O+=255;j.writeByte(D.length-O),j.writeBytes(D,O,D.length-O),j.writeByte(0),j.writeString(";")};var T=function(j){var I=j,D=0,O=0,L={};return L.write=function(B,P){if(B>>>P)throw"length over";for(;D+P>=8;)I.writeByte(255&(B<<D|O)),P-=8-D,B>>>=8-D,O=0,D=0;O=B<<D|O,D=D+P},L.flush=function(){D>0&&I.writeByte(O)},L},E=function(j){for(var I=1<<j,D=(1<<j)+1,O=j+1,L=A(),B=0;B<I;B+=1)L.add(String.fromCharCode(B));L.add(String.fromCharCode(I)),L.add(String.fromCharCode(D));var P=g(),H=T(P);H.write(I,O);var Y=0,q=String.fromCharCode(k[Y]);for(Y+=1;Y<k.length;){var Z=String.fromCharCode(k[Y]);Y+=1,L.contains(q+Z)?q=q+Z:(H.write(L.indexOf(q),O),L.size()<4095&&(L.size()==1<<O&&(O+=1),L.add(q+Z)),q=Z)}return H.write(L.indexOf(q),O),H.write(D,O),H.flush(),P.toByteArray()},A=function(){var j={},I=0,D={};return D.add=function(O){if(D.contains(O))throw"dup key:"+O;j[O]=I,I+=1},D.size=function(){return I},D.indexOf=function(O){return j[O]},D.contains=function(O){return typeof j[O]<"u"},D};return R},C=function(b,S,M){for(var $=w(b,S),k=0;k<S;k+=1)for(var R=0;R<b;R+=1)$.setPixel(R,k,M(R,k));var T=g();$.write(T);for(var E=x(),A=T.toByteArray(),j=0;j<A.length;j+=1)E.writeByte(A[j]);return E.flush(),"data:image/gif;base64,"+E};return r}();(function(){n.stringToBytesFuncs["UTF-8"]=function(r){function i(a){for(var o=[],s=0;s<a.length;s++){var l=a.charCodeAt(s);l<128?o.push(l):l<2048?o.push(192|l>>6,128|l&63):l<55296||l>=57344?o.push(224|l>>12,128|l>>6&63,128|l&63):(s++,l=65536+((l&1023)<<10|a.charCodeAt(s)&1023),o.push(240|l>>18,128|l>>12&63,128|l>>6&63,128|l&63))}return o}return i(r)}})(),function(r){e.exports=r()}(function(){return n})})(e3);var MR=e3.exports,ER=Hn&&Hn.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),gm=Hn&&Hn.__assign||function(){return gm=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},gm.apply(this,arguments)};Object.defineProperty(n0,"__esModule",{value:!0});exports.QRCode_1=n0.QRCode=void 0;var OR=kR,AR=MR,Xh=v,RR=function(e){ER(t,e);function t(n){var r=e.call(this,n)||this;return r.canvasRef=Xh.createRef(),r}return t.prototype.download=function(n,r){if(this.canvasRef.current){var i=void 0;switch(n){case"jpg":i="image/jpeg";break;case"webp":i="image/webp";break;case"png":default:i="image/png";break}var a=this.canvasRef.current.toDataURL(i,1),o=document.createElement("a");o.download=r??"react-qrcode-logo",o.href=a,o.click()}},t.prototype.utf16to8=function(n){var r="",i,a,o=n.length;for(i=0;i<o;i++)a=n.charCodeAt(i),a>=1&&a<=127?r+=n.charAt(i):a>2047?(r+=String.fromCharCode(224|a>>12&15),r+=String.fromCharCode(128|a>>6&63),r+=String.fromCharCode(128|a>>0&63)):(r+=String.fromCharCode(192|a>>6&31),r+=String.fromCharCode(128|a>>0&63));return r},t.prototype.drawRoundedSquare=function(n,r,i,a,o,s,l,c){c.lineWidth=n,c.fillStyle=o,c.strokeStyle=o,i+=n/2,r+=n/2,a-=n,Array.isArray(s)||(s=[s,s,s,s]),s=s.map(function(p){return p=Math.min(p,a/2),p<0?0:p});var u=s[0]||0,d=s[1]||0,f=s[2]||0,h=s[3]||0;c.beginPath(),c.moveTo(r+u,i),c.lineTo(r+a-d,i),d&&c.quadraticCurveTo(r+a,i,r+a,i+d),c.lineTo(r+a,i+a-f),f&&c.quadraticCurveTo(r+a,i+a,r+a-f,i+a),c.lineTo(r+h,i+a),h&&c.quadraticCurveTo(r,i+a,r,i+a-h),c.lineTo(r,i+u),u&&c.quadraticCurveTo(r,i,r+u,i),c.closePath(),c.stroke(),l&&c.fill()},t.prototype.drawPositioningPattern=function(n,r,i,a,o,s,l){l===void 0&&(l=[0,0,0,0]);var c=Math.ceil(r),u,d;typeof l!="number"&&!Array.isArray(l)?(u=l.outer||0,d=l.inner||0):(u=l,d=u);var f,h;typeof s!="string"?(f=s.outer,h=s.inner):(f=s,h=s);var p=a*r+i,m=o*r+i,g=r*7;this.drawRoundedSquare(c,m,p,g,f,u,!1,n),g=r*3,p+=r*2,m+=r*2,this.drawRoundedSquare(c,m,p,g,h,d,!0,n)},t.prototype.isInPositioninZone=function(n,r,i){return i.some(function(a){return r>=a.row&&r<=a.row+7&&n>=a.col&&n<=a.col+7})},t.prototype.transformPixelLengthIntoNumberOfCells=function(n,r){return n/r},t.prototype.isCoordinateInImage=function(n,r,i,a,o,s,l,c){if(c){var u=2,d=this.transformPixelLengthIntoNumberOfCells(o,l),f=this.transformPixelLengthIntoNumberOfCells(s,l),h=this.transformPixelLengthIntoNumberOfCells(i,l)-1,p=this.transformPixelLengthIntoNumberOfCells(a,l)-1;return r>=d-u&&r<=d+h+u&&n>=f-u&&n<=f+p+u}else return!1},t.prototype.shouldComponentUpdate=function(n){return!OR(this.props,n)},t.prototype.componentDidMount=function(){this.update()},t.prototype.componentDidUpdate=function(){this.update()},t.prototype.update=function(){var n,r=this.props,i=r.value,a=r.ecLevel,o=r.enableCORS,s=r.bgColor,l=r.fgColor,c=r.logoImage,u=r.logoOpacity,d=r.logoOnLoad,f=r.removeQrCodeBehindLogo,h=r.qrStyle,p=r.eyeRadius,m=r.eyeColor,g=r.logoPaddingStyle,x=+this.props.size,_=+this.props.quietZone,w=this.props.logoWidth?+this.props.logoWidth:0,C=this.props.logoHeight?+this.props.logoHeight:0,b=this.props.logoPadding?+this.props.logoPadding:0,S=AR(0,a);S.addData(this.utf16to8(i)),S.make();var M=(n=this.canvasRef)===null||n===void 0?void 0:n.current,$=M.getContext("2d"),k=x+2*_,R=S.getModuleCount(),T=x/R,E=window.devicePixelRatio||1;M.height=M.width=k*E,$.scale(E,E),$.fillStyle=s,$.fillRect(0,0,k,k);var A=_,j=[{row:0,col:0},{row:0,col:R-7},{row:R-7,col:0}];if($.strokeStyle=l,h==="dots"){$.fillStyle=l;for(var I=T/2,D=0;D<R;D++)for(var O=0;O<R;O++)S.isDark(D,O)&&!this.isInPositioninZone(D,O,j)&&($.beginPath(),$.arc(Math.round(O*T)+I+A,Math.round(D*T)+I+A,I/100*75,0,2*Math.PI,!1),$.closePath(),$.fill())}else if(h==="fluid"){for(var I=Math.ceil(T/2),D=0;D<R;D++)for(var O=0;O<R;O++)if(S.isDark(D,O)&&!this.isInPositioninZone(D,O,j)){var L=[!1,!1,!1,!1];D>0&&!S.isDark(D-1,O)&&O>0&&!S.isDark(D,O-1)&&(L[0]=!0),D>0&&!S.isDark(D-1,O)&&O<R-1&&!S.isDark(D,O+1)&&(L[1]=!0),D<R-1&&!S.isDark(D+1,O)&&O<R-1&&!S.isDark(D,O+1)&&(L[2]=!0),D<R-1&&!S.isDark(D+1,O)&&O>0&&!S.isDark(D,O-1)&&(L[3]=!0);var B=Math.ceil((O+1)*T)-Math.floor(O*T),P=Math.ceil((D+1)*T)-Math.floor(D*T);$.fillStyle=l,$.beginPath(),$.arc(Math.round(O*T)+I+A,Math.round(D*T)+I+A,I,0,2*Math.PI,!1),$.closePath(),$.fill(),L[0]||$.fillRect(Math.round(O*T)+A,Math.round(D*T)+A,B/2,P/2),L[1]||$.fillRect(Math.round(O*T)+A+Math.floor(B/2),Math.round(D*T)+A,B/2,P/2),L[2]||$.fillRect(Math.round(O*T)+A+Math.floor(B/2),Math.round(D*T)+A+Math.floor(P/2),B/2,P/2),L[3]||$.fillRect(Math.round(O*T)+A,Math.round(D*T)+A+Math.floor(P/2),B/2,P/2)}}else for(var D=0;D<R;D++)for(var O=0;O<R;O++)if(S.isDark(D,O)&&!this.isInPositioninZone(D,O,j)){$.fillStyle=l;var B=Math.ceil((O+1)*T)-Math.floor(O*T),P=Math.ceil((D+1)*T)-Math.floor(D*T);$.fillRect(Math.round(O*T)+A,Math.round(D*T)+A,B,P)}for(var H=0;H<3;H++){var Y=j[H],D=Y.row,O=Y.col,q=p,Z=void 0;Array.isArray(q)&&(q=q[H]),typeof q=="number"&&(q=[q,q,q,q]),m?Array.isArray(m)?Z=m[H]:Z=m:Z=l,this.drawPositioningPattern($,T,A,D,O,Z,q)}if(c){var X=new Image;o&&(X.crossOrigin="Anonymous"),X.onload=function(J){$.save();var ee=w||x*.2,W=C||ee,F=(x-ee)/2,z=(x-W)/2;if(f||b){$.beginPath(),$.strokeStyle=s,$.fillStyle=s;var V=ee+2*b,N=W+2*b,te=F+A-b,K=z+A-b;if(g==="circle"){var G=te+V/2,oe=K+N/2;$.ellipse(G,oe,V/2,N/2,0,0,2*Math.PI),$.stroke(),$.fill()}else $.fillRect(te,K,V,N)}$.globalAlpha=u,$.drawImage(X,F+A,z+A,ee,W),$.restore(),d&&d(J)},X.src=c}},t.prototype.render=function(){var n,r=+this.props.size+2*+this.props.quietZone;return Xh.createElement("canvas",{id:(n=this.props.id)!==null&&n!==void 0?n:"react-qrcode-logo",height:r,width:r,style:gm({height:r+"px",width:r+"px"},this.props.style),ref:this.canvasRef})},t.defaultProps={value:"https://reactjs.org/",ecLevel:"M",enableCORS:!1,size:150,quietZone:10,bgColor:"#FFFFFF",fgColor:"#000000",logoOpacity:1,qrStyle:"squares",eyeRadius:[0,0,0],logoPaddingStyle:"square"},t}(Xh.Component);exports.QRCode_1=n0.QRCode=RR;const DR="_floating-label_3xm9u_1",jR="_without-label_3xm9u_21",IR="_floating-label-check_3xm9u_184",Kh={floatingLabel:DR,withoutLabel:jR,floatingLabelCheck:IR},NR=e=>{const t=Ie.c(3),{hint:n,children:r}=e;let i;return t[0]!==r||t[1]!==n?(i=n?y.jsx(Hg,{text:n,placement:"top",children:r}):r,t[0]=r,t[1]=n,t[2]=i):i=t[2],i},nf=({ref:e,hidden:t,children:n,className:r,isInvalid:i,isForRadioInput:a,inputContainerClassName:o,isForCheckInput:s,hint:l,required:c,disabled:u,...d})=>{const{ProjectIconComponent:f}=v.useContext(rn),h=d.withoutLabel?"":y.jsxs("div",{className:"d-flex gap-1 align-items-center",children:[d.label,c?y.jsx("span",{className:se("fw-bold",{"text-danger":!u}),style:{fontSize:"16px"},children:"*"}):null,l?y.jsx("div",{className:"d-flex align-items-center",children:y.jsx(f,{icon:"info"})}):null]});return s?y.jsx("div",{className:se("luminus-floating-label-check",Kh.floatingLabelCheck),children:n}):y.jsx(NR,{hint:l,children:y.jsx(Ig,{ref:e,label:y.jsx("div",{className:"d-flex gap-1 align-items-center",children:h}),hidden:t??!1,className:se(`luminus-floating-label ${r??""}`,Kh.floatingLabel,{[o??""]:o},{[Kh.withoutLabel]:d.withoutLabel}),children:n})})};nf.displayName="FloatingLabelInput";const PR="_row-label-input_i295l_1",LR="_label_i295l_4",FR="_input-container_i295l_9",zR="_keep-check-label_i295l_132",BR="_is-invalid_i295l_160",zs={rowLabelInput:PR,label:LR,inputContainer:FR,keepCheckLabel:zR,isInvalid:BR},_c=({ref:e,hidden:t,children:n,required:r,disabled:i,className:a,isInvalid:o,isForRadioInput:s,isForTextAreaInput:l,inputContainerClassName:c,hint:u,...d})=>{const{ProjectIconComponent:f}=v.useContext(rn),h=d.withoutLabel?y.jsx(y.Fragment,{}):y.jsx("label",{className:se("label col-6",{"col-12":l},zs.label),children:y.jsxs(In,{variant:"form-label",className:se("d-flex gap-1 align-items-center",o?"text-danger":""),children:[d.label,r?y.jsx("span",{className:se("fw-bold",{"text-danger":!i}),style:{fontSize:"16px"},children:"*"}):null,u?y.jsx("div",{className:"d-flex align-items-center",style:{paddingTop:"2px"},children:y.jsx(f,{icon:"info"})}):null]})});return y.jsxs("div",{ref:e,className:se("luminus-row-label row gx-0 gy-0",{"is-invalid":o},{[zs.isInvalid]:o},{[a??""]:a},{"d-none":t},zs.rowLabelInput),children:[u?y.jsx(Hg,{text:u,placement:"top",children:h}):h,y.jsx("div",{className:se("input-container",zs.inputContainer,{"col-6":!d.withoutLabel&&!l},{"col-12":d.withoutLabel||l},{[zs.keepCheckLabel]:s},{[c??""]:c}),children:n})]})};_c.displayName="RowLabelInput";const t3=e=>{const t=Ie.c(4),{ref:n,children:r,className:i,hidden:a}=e,o=`${a?"d-none":""} ${i}`;let s;return t[0]!==r||t[1]!==n||t[2]!==o?(s=y.jsx("div",{ref:n,className:o,children:r}),t[0]=r,t[1]=n,t[2]=o,t[3]=s):s=t[3],s};t3.displayName="NoInputContainer";const n3=e=>{const t=Ie.c(8),{currentSelection:n,selectedItemNavigateTo:r,children:i}=e;if(!n||!n.id||!r){let l;return t[0]!==i?(l=y.jsx("div",{className:"luminus-input-container position-relative w-100",children:i}),t[0]=i,t[1]=l):l=t[1],l}let a;t[2]!==n||t[3]!==r?(a=r(n),t[2]=n,t[3]=r,t[4]=a):a=t[4];const o=a;let s;return t[5]!==i||t[6]!==o?(s=y.jsx(ss.Link,{to:o,className:"luminus-input-container position-relative w-100 text-decoration-none",children:i}),t[5]=i,t[6]=o,t[7]=s):s=t[7],s},r3=({InputContainer:e=nf,type:t,value:n,onChange:r,debounceMs:i,label:a,withoutLabel:o,placeholder:s,size:l,hidden:c,disabled:u,showClearIcon:d,clearValue:f,list:h,className:p,step:m,minLength:g,maxLength:x,noSelectOnFocus:_,hint:w,onConfirm:C,autoComplete:b})=>{var P,H,Y;const S=t==="number",M=v.useCallback(()=>{if(!r)return;const q=f??null;r(S?q?Number(q):null:(q==null?void 0:q.toString())??"")},[f,S,r]),$=v.useRef(null),[k,R]=v.useState((n==null?void 0:n.toString())??""),T=v.useCallback(q=>{const Z=q;r&&r(S?Z==null||Z===""?null:Number(Z):Z||null)},[S,r]),E=v.useCallback(q=>{var X;const Z=(X=q.target)==null?void 0:X.value;if(!i){T(Z);return}R(Z),$.current!==null&&window.clearTimeout($.current),$.current=window.setTimeout(()=>{T(Z)},i)},[i,T]),A=v.useMemo(()=>{if(C!==void 0)return q=>{q.key==="Enter"&&C&&C()}},[C]);v.useEffect(()=>{R(n===null?"":n.toString())},[n]);const[j,I]=v.useState(!1),D=t0(t,n?n.toString()??null:null,j),O=v.useRef(null),L=(((P=O.current)==null?void 0:P.scrollWidth)??0)>(((H=O.current)==null?void 0:H.clientWidth)??0),B=(Y=O.current)==null?void 0:Y.getBoundingClientRect();return y.jsxs(e,{withoutLabel:o,label:a??"",hidden:c,className:p,hint:w,disabled:u,children:[y.jsx(Gr.Control,{type:D,placeholder:s??a,size:l,value:i?k:(n==null?void 0:n.toString())??"",onChange:E,className:p??"",hidden:c,disabled:u??!1,list:h,onFocus:q=>{I(!0),!_&&q.target.select()},onBlur:()=>I(!1),onKeyDown:A,step:m,minLength:g,maxLength:x,autoComplete:b,ref:O}),d&&n!==null&&r&&!u&&y.jsx("div",{className:`luminus-input-remove-icon ${t!=="text"?"inset":""}`,children:y.jsx(wc,{color:"secondary",size:"sm",onClick:M,children:y.jsx(hc,{})})}),L?y.jsx("div",{className:"luminus-overflow-tooltip",style:{opacity:0,position:"fixed",top:((B==null?void 0:B.top)??0)+((B==null?void 0:B.height)??0),left:(B==null?void 0:B.left)??0},children:i?k:(n==null?void 0:n.toString())??""}):null]})},i3=e=>{const t=Ie.c(7),{value:n,MiniDetailComponent:r,children:i,miniDetailPlacement:a}=e;if(!n||!r)return i;let o;t[0]!==n?(o=n.toString(),t[0]=n,t[1]=o):o=t[1];let s;return t[2]!==r||t[3]!==i||t[4]!==a||t[5]!==o?(s=y.jsx(r,{id:o,placement:a,children:i}),t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s):s=t[6],s},a3=({InputContainer:e=nf,value:t,options:n,onChange:r,label:i,withoutLabel:a,isNumber:o,size:s,hidden:l,disabled:c,noSortOptions:u,className:d,suffixIdToName:f,noEmptyOption:h,appendCurrentSelectionWithName:p,dropdownWidth:m,hint:g,addNewOptionPath:x,refreshOptions:_,MiniDetailComponent:w,miniDetailPlacement:C,selectedItemNavigateTo:b,noRemoveButton:S})=>{const{texts:{customSelect:M}}=v.useContext(rn),[$,k]=v.useState(!1),[R,T]=v.useState(""),E=v.useCallback(B=>{T(B)},[]),A=v.useMemo(()=>n.find(B=>B.id===t)??null,[n,t]),j=v.useCallback(B=>{var P;return B===null?"":!B.name||B.name.length===0?((P=B.id)==null?void 0:P.toString())??"":f?`${B.name} (${B.id})`:B.name},[f]),I=v.useMemo(()=>{const B=n?[...n]:[];return p!==void 0&&t!==void 0&&t!==null&&(B.some(P=>P.id===t)||B.push({id:t,name:p})),B.map(P=>({id:P.id,name:j(P)})).filter(P=>qg(P.name,R)).sort((P,H)=>u?0:(P.name??"").localeCompare(H.name??""))},[n,u,R,j,p,t]),D=v.useCallback(B=>{var P;r&&r((B==null?void 0:B.id)===void 0||(B==null?void 0:B.id)===null?null:o?Number(B.id):(P=B.id)==null?void 0:P.toString())},[r,o]),O=v.useCallback(B=>{k(!1),D(B)},[D]),L=v.useRef(null);return y.jsx(y.Fragment,{children:y.jsxs(e,{withoutLabel:a,label:i??"",hidden:l,inputContainerClassName:se({"luminus-dropdown-select-open":$}),className:d,hint:g,disabled:c,children:[y.jsx(n3,{currentSelection:A,selectedItemNavigateTo:b,children:y.jsx(i3,{value:t,MiniDetailComponent:w,miniDetailPlacement:C,children:y.jsxs(Gr.Select,{ref:L,size:s,value:t??"",onMouseDown:B=>{B.currentTarget.focus(),B.preventDefault()},onClick:()=>{!c&&k(!0)},onChange:()=>{},className:se("w-100",{"luminus-dropdown-picker-disabled":c}),hidden:l,children:[h&&!(t==null||t==="")?void 0:y.jsx("option",{value:""}),t!=null&&y.jsx("option",{value:t,children:j(A)})]})})}),L.current&&y.jsx(lC,{show:$,onCancel:()=>k(!1),items:I,currentSelection:A??null,onSelectionChange:O,onSearchQueryChange:E,texts:M,disabled:c,inputRef:L,autoHideSearch:!0,allItemsLength:n.length,itemsNameWidth:m,addNewOptionPath:x,refreshOptions:_,noRemoveButton:S})]})})};function WR(e){return it({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function UR(e){return it({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function HR(e){return it({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"},child:[]}]})(e)}function VR(e){return it({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm250.2-143.7c-12.2-12-47-8.7-64.4-6.5-17.2-10.5-28.7-25-36.8-46.3 3.9-16.1 10.1-40.6 5.4-56-4.2-26.2-37.8-23.6-42.6-5.9-4.4 16.1-.4 38.5 7 67.1-10 23.9-24.9 56-35.4 74.4-20 10.3-47 26.2-51 46.2-3.3 15.8 26 55.2 76.1-31.2 22.4-7.4 46.8-16.5 68.4-20.1 18.9 10.2 41 17 55.8 17 25.5 0 28-28.2 17.5-38.7zm-198.1 77.8c5.1-13.7 24.5-29.5 30.4-35-19 30.3-30.4 35.7-30.4 35zm81.6-190.6c7.4 0 6.7 32.1 1.8 40.8-4.4-13.9-4.3-40.8-1.8-40.8zm-24.4 136.6c9.7-16.9 18-37 24.7-54.7 8.3 15.1 18.9 27.2 30.1 35.5-20.8 4.3-38.9 13.1-54.8 19.2zm131.6-5s-5 6-37.3-7.8c35.1-2.6 40.9 5.4 37.3 7.8z"},child:[]}]})(e)}const rf=e=>{const t=Ie.c(66),{InputContainer:n,formField:r,label:i,resetsFields:a,options:o,isNumber:s,size:l,showClearIcon:c,clearValue:u,noSortOptions:d,required:f,hidden:h,disabled:p,withoutLabel:m,hint:g,className:x}=e,_=n===void 0?_c:n,{control:w,getValues:C,setValue:b}=sn.useFormContext(),{isSubmitted:S}=sn.useFormState();let M;t[0]===Symbol.for("react.memo_cache_sentinel")?(M={falseIfNotInit:!0},t[0]=M):M=t[0];const $=ef(M);let k;t[1]!==w||t[2]!==r?(k={name:r,control:w},t[1]=w,t[2]=r,t[3]=k):k=t[3];const{field:R,fieldState:T}=sn.useController(k),{value:E,onChange:A,onBlur:j,ref:I,name:D}=R,{error:O}=T,[L,B]=v.useState(!1);let P;if(t[4]!==d||t[5]!==o){let le;t[7]!==d?(le=(ye,ge)=>d?0:(ye.name??"").localeCompare(ge.name??""),t[7]=d,t[8]=le):le=t[8],P=o.toSorted(le),t[4]=d,t[5]=o,t[6]=P}else P=t[6];const H=P;let Y;t[9]!==u||t[10]!==r||t[11]!==s||t[12]!==b||t[13]!==L?(Y=()=>{const le=u??null;s?b(r,le===null?null:Number(le),{shouldDirty:!0,shouldValidate:L}):b(r,(le==null?void 0:le.toString())??"",{shouldDirty:!0,shouldValidate:L})},t[9]=u,t[10]=r,t[11]=s,t[12]=b,t[13]=L,t[14]=Y):Y=t[14];const q=Y,Z=p||$;let X;t[15]!==r||t[16]!==C||t[17]!==b?(X=()=>{b(r,C(r))},t[15]=r,t[16]=C,t[17]=b,t[18]=X):X=t[18];let J;t[19]!==r||t[20]!==C||t[21]!==H||t[22]!==b?(J=[H,r,C,b],t[19]=r,t[20]=C,t[21]=H,t[22]=b,t[23]=J):J=t[23],v.useEffect(X,J);let ee,W;t[24]!==S?(ee=()=>{S&&B(!0)},W=[S],t[24]=S,t[25]=ee,t[26]=W):(ee=t[25],W=t[26]),v.useEffect(ee,W);const F=O!==void 0;let z;t[27]!==A||t[28]!==s||t[29]!==a||t[30]!==b||t[31]!==L?(z=le=>{const ye=le.target.value;let ge;s?ge=ye===""?null:parseInt(ye,10):ge=ye===""?null:ye,A(ge),a&&a.forEach(be=>b(be,null,{shouldDirty:!0,shouldValidate:L}))},t[27]=A,t[28]=s,t[29]=a,t[30]=b,t[31]=L,t[32]=z):z=t[32];const V=z,N=i??"",te=E??"";let K;t[33]===Symbol.for("react.memo_cache_sentinel")?(K=y.jsx("option",{value:""}),t[33]=K):K=t[33];let G;t[34]!==H?(G=H.map(qR),t[34]=H,t[35]=G):G=t[35];let oe;t[36]!==Z||t[37]!==D||t[38]!==j||t[39]!==I||t[40]!==V||t[41]!==h||t[42]!==F||t[43]!==l||t[44]!==te||t[45]!==G?(oe=y.jsxs(Gr.Select,{size:l,name:D,value:te,onChange:V,onBlur:j,ref:I,isInvalid:F,hidden:h,disabled:Z,className:"w-100",children:[K,G]}),t[36]=Z,t[37]=D,t[38]=j,t[39]=I,t[40]=V,t[41]=h,t[42]=F,t[43]=l,t[44]=te,t[45]=G,t[46]=oe):oe=t[46];let ne;t[47]!==q||t[48]!==E||t[49]!==c?(ne=c&&E!=null&&y.jsx("div",{className:"luminus-input-remove-icon inset",children:y.jsx(wc,{color:"secondary",size:"sm",onClick:q,children:y.jsx(hc,{})})}),t[47]=q,t[48]=E,t[49]=c,t[50]=ne):ne=t[50];let re;t[51]!==O?(re=O&&y.jsx(df,{message:O.message}),t[51]=O,t[52]=re):re=t[52];let ae;return t[53]!==_||t[54]!==Z||t[55]!==x||t[56]!==h||t[57]!==g||t[58]!==F||t[59]!==f||t[60]!==N||t[61]!==oe||t[62]!==ne||t[63]!==re||t[64]!==m?(ae=y.jsx(y.Fragment,{children:y.jsxs(_,{label:N,required:f,disabled:Z,hidden:h,withoutLabel:m,isInvalid:F,hint:g,className:x,children:[oe,ne,re]})}),t[53]=_,t[54]=Z,t[55]=x,t[56]=h,t[57]=g,t[58]=F,t[59]=f,t[60]=N,t[61]=oe,t[62]=ne,t[63]=re,t[64]=m,t[65]=ae):ae=t[65],ae};function qR(e){return y.jsx("option",{value:e.id??"",children:e.name},e.id)}const r0=e=>{const t=Ie.c(61),{InputContainer:n,formField:r,label:i,resetsFields:a,size:o,showClearIcon:s,clearValue:l,required:c,hidden:u,disabled:d,rows:f,withoutLabel:h,customFormControlProps:p,minLength:m,maxLength:g,hint:x,onChange:_,className:w}=e,C=n===void 0?_c:n,{control:b,setValue:S}=sn.useFormContext(),{isSubmitted:M}=sn.useFormState();let $;t[0]===Symbol.for("react.memo_cache_sentinel")?($={falseIfNotInit:!0},t[0]=$):$=t[0];const k=ef($),[R,T]=v.useState(!1);let E;t[1]!==b||t[2]!==r?(E={name:r,control:b},t[1]=b,t[2]=r,t[3]=E):E=t[3];const{field:A,fieldState:j}=sn.useController(E),{onChange:I,onBlur:D,ref:O,value:L,name:B}=A,{error:P}=j;let H;t[4]!==p?(H=p??{},t[4]=p,t[5]=H):H=t[5];let Y,q,Z;t[6]!==H?({onChange:q,onBlur:Y,...Z}=H,t[6]=H,t[7]=Y,t[8]=q,t[9]=Z):(Y=t[7],q=t[8],Z=t[9]);let X;t[10]!==l||t[11]!==r||t[12]!==S||t[13]!==R?(X=()=>{const be=l??null,Me=be==null||be===""?null:be.toString();S(r,Me,{shouldDirty:!0,shouldValidate:R})},t[10]=l,t[11]=r,t[12]=S,t[13]=R,t[14]=X):X=t[14];const J=X,ee=d||k;let W,F;t[15]!==M?(W=()=>{M&&T(!0)},F=[M],t[15]=M,t[16]=W,t[17]=F):(W=t[16],F=t[17]),v.useEffect(W,F);const z=P!==void 0;let V;t[18]!==q||t[19]!==I||t[20]!==_||t[21]!==a||t[22]!==S||t[23]!==R?(V=be=>{const Me=be.target.value,ce=Me==null||Me===""?null:Me;I(ce),a&&a.forEach(de=>S(de,null,{shouldDirty:!0,shouldValidate:R})),_&&_(ce),q&&q(be)},t[18]=q,t[19]=I,t[20]=_,t[21]=a,t[22]=S,t[23]=R,t[24]=V):V=t[24];const N=V;let te;t[25]!==Y||t[26]!==D?(te=be=>{D(),Y&&Y(be)},t[25]=Y,t[26]=D,t[27]=te):te=t[27];const K=te,G=L!=null&&L!=="",oe=i??"",ne=L??"",re=f??2;let ae;t[28]!==ee||t[29]!==B||t[30]!==O||t[31]!==K||t[32]!==N||t[33]!==u||t[34]!==z||t[35]!==g||t[36]!==m||t[37]!==Z||t[38]!==o||t[39]!==ne||t[40]!==re?(ae=y.jsx(Gr.Control,{as:"textarea",name:B,size:o,value:ne,onChange:N,onBlur:K,ref:O,isInvalid:z,hidden:u,disabled:ee,rows:re,className:"w-100",minLength:m,maxLength:g,...Z}),t[28]=ee,t[29]=B,t[30]=O,t[31]=K,t[32]=N,t[33]=u,t[34]=z,t[35]=g,t[36]=m,t[37]=Z,t[38]=o,t[39]=ne,t[40]=re,t[41]=ae):ae=t[41];let le;t[42]!==J||t[43]!==G||t[44]!==s?(le=s&&G&&y.jsx("div",{className:"luminus-input-remove-icon",children:y.jsx(wc,{color:"secondary",size:"sm",onClick:J,children:y.jsx(hc,{})})}),t[42]=J,t[43]=G,t[44]=s,t[45]=le):le=t[45];let ye;t[46]!==P?(ye=P&&y.jsx(df,{message:P.message}),t[46]=P,t[47]=ye):ye=t[47];let ge;return t[48]!==C||t[49]!==ee||t[50]!==w||t[51]!==u||t[52]!==x||t[53]!==z||t[54]!==c||t[55]!==oe||t[56]!==ae||t[57]!==le||t[58]!==ye||t[59]!==h?(ge=y.jsxs(C,{label:oe,required:c,disabled:ee,hidden:u,withoutLabel:h,isInvalid:z,className:w,hint:x,isForTextAreaInput:!0,children:[ae,le,ye]}),t[48]=C,t[49]=ee,t[50]=w,t[51]=u,t[52]=x,t[53]=z,t[54]=c,t[55]=oe,t[56]=ae,t[57]=le,t[58]=ye,t[59]=h,t[60]=ge):ge=t[60],ge},es=({ref:e,InputContainer:t=_c,type:n,formField:r,label:i,placeholder:a,size:o,resetsFields:s,showClearIcon:l,clearValue:c,required:u,hidden:d,disabled:f,withoutLabel:h,list:p,step:m,CustomOnChangeComponent:g,noSelectOnFocus:x,minLength:_,maxLength:w,hint:C,onChange:b,className:S,autoComplete:M})=>{var V,N,te,K;const{control:$,setValue:k}=sn.useFormContext(),{isSubmitted:R}=sn.useFormState(),T=ef({falseIfNotInit:!0}),{field:{value:E,onChange:A,onBlur:j,ref:I,name:D},fieldState:{error:O}}=sn.useController({name:r,control:$}),[L,B]=v.useState(!1),P=v.useCallback(()=>{const G=c??null;n==="number"?k(r,G!==null?Number(G):null,{shouldDirty:!0,shouldValidate:L}):k(r,(G==null?void 0:G.toString())??"",{shouldDirty:!0,shouldValidate:L})},[c,n,k,r,L]),H=v.useMemo(()=>f||T,[f,T]),Y=O!==void 0,[q,Z]=v.useState(!1),X=t0(n,E??null,q),J=v.useCallback(G=>{const oe=G.target.value;let ne=oe;n==="number"?ne=oe===""?null:Number(oe):ne=oe===""?null:oe,A(ne),s&&s.forEach(re=>k(re,null,{shouldDirty:!0,shouldValidate:L})),b&&b(ne===null?null:n==="number"?ne??null:ne.toString())},[A,b,s,k,L,n]),ee=v.useCallback(()=>{Z(!1),j()},[j]),W=v.useRef(null),F=(((V=W.current)==null?void 0:V.scrollWidth)??0)>(((N=W.current)==null?void 0:N.clientWidth)??0),z=(te=W.current)==null?void 0:te.getBoundingClientRect();return v.useImperativeHandle(e,()=>W.current,[W]),v.useEffect(()=>{R&&B(!0)},[R]),y.jsxs(t,{label:i,required:u,disabled:H,hidden:d,withoutLabel:h??!1,isInvalid:Y,hint:C,className:S,children:[y.jsxs("div",{className:"luminus-input-container position-relative w-100",children:[y.jsx(Gr.Control,{type:X,placeholder:a??i,size:o,name:D,value:E??"",onChange:J,onBlur:ee,onFocus:G=>{Z(!0),!x&&G.target.select()},ref:G=>{I(G),W.current=G},isInvalid:Y,hidden:d,disabled:H,list:p,className:"w-100",step:m,minLength:_,maxLength:w,autoComplete:M}),g&&y.jsx("div",{className:"custom-picker-button",children:g})]}),l&&E!=null&&y.jsx("div",{className:`luminus-input-remove-icon ${n!=="text"?"inset":""}`,children:y.jsx(wc,{color:"secondary",size:"sm",onClick:P,children:y.jsx(hc,{})})}),F?y.jsx("div",{className:"luminus-overflow-tooltip",style:{opacity:0,position:"fixed",top:((z==null?void 0:z.top)??0)+((z==null?void 0:z.height)??0),left:(z==null?void 0:z.left)??0,pointerEvents:"none"},children:((K=W.current)==null?void 0:K.value)??""}):null,O&&y.jsx(df,{message:O.message})]})},YR="_item_1dy8x_1",o3={item:YR},Ca=e=>{const t=Ie.c(17);let n,r,i,a,o,s,l;t[0]!==e?({color:s,icon:i,className:r,children:n,to:l,as:a,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=l):(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7]);const u=`btn luminus-dropdown-item text-nowrap rounded text-${s===void 0?"primary":s} ${r??""}`;let d;t[8]!==u?(d=se(u,o3.item),t[8]=u,t[9]=d):d=t[9];const f=a==="link"?ss.Link:void 0,h=l??"";let p;return t[10]!==n||t[11]!==i||t[12]!==o||t[13]!==d||t[14]!==f||t[15]!==h?(p=y.jsxs(Yo.Item,{className:d,as:f,to:h,...o,children:[i,n]}),t[10]=n,t[11]=i,t[12]=o,t[13]=d,t[14]=f,t[15]=h,t[16]=p):p=t[16],p},GR="_button_qhwih_1",ZR={button:GR},i0=({ref:e,color:t="primary",icon:n=y.jsx(N_,{size:21}),text:r,onClick:i,className:a,children:o,...s})=>y.jsxs("button",{type:"button",ref:e,onClick:l=>{l.preventDefault(),i(l)},"aria-label":"dropdown toggle",className:se(`btn luminus-context-button text-${t} ${a??""}`,ZR.button),...s,children:[n,r]}),a0=e=>{const t=Ie.c(2);let n;return t[0]!==e?(n=y.jsx(Yo.Toggle,{...e}),t[0]=e,t[1]=n):n=t[1],n},XR="_divider_1e6rk_1",KR={divider:XR},vm=e=>{const t=Ie.c(4),{className:n}=e;let r;t[0]!==n?(r=se("luminus-dropdown-divider",n,KR.divider),t[0]=n,t[1]=r):r=t[1];let i;return t[2]!==r?(i=y.jsx(Yo.Divider,{className:r}),t[2]=r,t[3]=i):i=t[3],i},JR="_dropdown_1lk66_1",QR={dropdown:JR},o0=e=>{const t=Ie.c(23);let n,r,i,a,o,s,l,c,u,d;if(t[0]!==e){const{toggle:m,children:g,align:x,..._}=e;a=g,i=x;const{menuAlign:w,menuClassName:C,...b}=_.menuProps||{};o=w,s=b,r=Yo,c=_,u=i,d=m,n=Yo.Menu,l=se("luminus-dropdown rounded shadow",QR.dropdown,C),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=l,t[8]=c,t[9]=u,t[10]=d}else n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],d=t[10];const f=i||o;let h;t[11]!==n||t[12]!==a||t[13]!==s||t[14]!==l||t[15]!==f?(h=y.jsx(n,{className:l,align:f,...s,children:a}),t[11]=n,t[12]=a,t[13]=s,t[14]=l,t[15]=f,t[16]=h):h=t[16];let p;return t[17]!==r||t[18]!==c||t[19]!==u||t[20]!==d||t[21]!==h?(p=y.jsxs(r,{...c,align:u,children:[d,h]}),t[17]=r,t[18]=c,t[19]=u,t[20]=d,t[21]=h,t[22]=p):p=t[22],p},eD="_wrapper_1tb6d_1",tD="_controls_1tb6d_16",nD="_explorerWindow_1tb6d_20",rD="_folderList_1tb6d_28",iD="_fileList_1tb6d_35",aD="_dndText_1tb6d_61",da={wrapper:eD,controls:tD,explorerWindow:nD,folderList:rD,fileList:iD,dndText:aD},mn=v.createContext({apiActions:{},loadDocuments(){throw new Error("DocumentsContext was not initialized.")},reducer:[{},{}],entityType:"",entityId:-1}),oD="_defaultFolder_8tlxv_1",sD="_names_8tlxv_5",lD="_folderType_8tlxv_9",Jh={defaultFolder:oD,names:sD,folderType:lD},s3=e=>{const t=Ie.c(19),{isActive:n,isDefault:r,folderName:i,typeName:a}=e,{ProjectIconComponent:o}=v.useContext(rn),s=`folder${n?"-filled":""}`,l=r?Jh.defaultFolder:"text-primary";let c;t[0]!==l?(c=se("d-inline-block",l),t[0]=l,t[1]=c):c=t[1];let u;t[2]===Symbol.for("react.memo_cache_sentinel")?(u={className:"d-block"},t[2]=u):u=t[2];let d;t[3]!==o||t[4]!==s||t[5]!==c?(d=y.jsx(o,{icon:s,className:c,iconProps:u,size:18}),t[3]=o,t[4]=s,t[5]=c,t[6]=d):d=t[6];let f;t[7]===Symbol.for("react.memo_cache_sentinel")?(f=se("d-flex flex-column gap-0 align-items-start",Jh.names),t[7]=f):f=t[7];const h=n?"fw-bold":"";let p;t[8]!==i||t[9]!==h?(p=y.jsx("span",{className:h,children:i}),t[8]=i,t[9]=h,t[10]=p):p=t[10];let m;t[11]!==a?(m=a?y.jsxs("span",{className:Jh.folderType,children:["(",a,")"]}):null,t[11]=a,t[12]=m):m=t[12];let g;t[13]!==p||t[14]!==m?(g=y.jsxs("div",{className:f,children:[p,m]}),t[13]=p,t[14]=m,t[15]=g):g=t[15];let x;return t[16]!==g||t[17]!==d?(x=y.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[d,g]}),t[16]=g,t[17]=d,t[18]=x):x=t[18],x},cD=e=>{const t=Ie.c(9),{customText:n}=e,{reducer:r}=v.useContext(mn),[i,a]=r;let o;t[0]!==a?(o=()=>{a({type:"select-folder",folderId:"root"})},t[0]=a,t[1]=o):o=t[1];const s=o;let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=se("border-0 bg-transparent"),t[2]=l):l=t[2];const c=n??"root",u=i.activeFolder==="root";let d;t[3]!==c||t[4]!==u?(d=y.jsx(s3,{folderName:c,isActive:u,typeName:"",isDefault:!0}),t[3]=c,t[4]=u,t[5]=d):d=t[5];let f;return t[6]!==s||t[7]!==d?(f=y.jsx("li",{children:y.jsx("button",{onClick:s,type:"button",className:l,children:d})}),t[6]=s,t[7]=d,t[8]=f):f=t[8],f};function uD(e){if(e.state!=="openned-modal")throw new Error('Not in "openned-modal" state!')}const l3=()=>{const e=Kd(),{startLoading:t,stopLoading:n}=v.useContext(Bd),{reducer:[,r]}=v.useContext(mn),i=v.useCallback(async(o,s)=>{t("documents-renameFolder");try{await e.put("/documents/folder/rename",{folderId:o,name:s}),r({type:"update-folders",folderIds:[o],newProperties:{name:s}})}finally{n("documents-renameFolder")}},[e,r,t,n]),a=v.useCallback(async o=>{t("documentsFolderCreate");try{const s=await e.post("/documents/folder",o);r({type:"create-folder",folderData:o,folderId:s.data.id,isOnlyRead:s.data.onlyRead})}finally{n("documentsFolderCreate")}},[e,r,t,n]);return{renameFolder:i,createFolder:a}},xb=(e,t,n)=>{if(e&&"reportValidity"in e){const r=sn.get(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},c3=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?xb(r.ref,n,e):r.refs&&r.refs.forEach(i=>xb(i,n,e))}},dD=(e,t)=>{t.shouldUseNativeValidation&&c3(e,t);const n={};for(const r in e){const i=sn.get(t.fields,r),a=Object.assign(e[r]||{},{ref:i&&i.ref});if(fD(t.names||Object.keys(e),r)){const o=Object.assign({},sn.get(n,r));sn.set(o,"root",a),sn.set(n,r,o)}else sn.set(n,r,a)}return n},fD=(e,t)=>e.some(n=>n.startsWith(t+"."));var hD=function(e,t){for(var n={};e.length;){var r=e[0],i=r.code,a=r.message,o=r.path.join(".");if(!n[o])if("unionErrors"in r){var s=r.unionErrors[0].errors[0];n[o]={message:s.message,type:s.code}}else n[o]={message:a,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(u){return u.errors.forEach(function(d){return e.push(d)})}),t){var l=n[o].types,c=l&&l[r.code];n[o]=sn.appendErrors(o,t,n,i,c?[].concat(c,r.message):r.message)}e.shift()}return n},af=function(e,t,n){return n===void 0&&(n={}),function(r,i,a){try{return Promise.resolve(function(o,s){try{var l=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(c){return a.shouldUseNativeValidation&&c3({},a),{errors:{},values:n.raw?r:c}})}catch(c){return s(c)}return l&&l.then?l.then(void 0,s):l}(0,function(o){if(function(s){return Array.isArray(s==null?void 0:s.errors)}(o))return{values:{},errors:dD(hD(o.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}}};const pD=()=>{const e=Ie.c(14),{reducer:t,entityId:n,entityType:r}=v.useContext(mn),[i]=t,{zNumberRequired:a,zStringRequired:o}=Qd(),{createFolder:s}=l3();let l,c;if(e[0]!==a||e[1]!==o){const m=di({name:o(),documentTypeId:a()});c=sn.useForm,l=af(m),e[0]=a,e[1]=o,e[2]=l,e[3]=c}else l=e[2],c=e[3];let u;e[4]!==l?(u={resolver:l},e[4]=l,e[5]=u):u=e[5];const d=c(u);let f;e[6]!==s||e[7]!==n||e[8]!==r||e[9]!==i.activeFolder?(f=async m=>{const g={...m,dbObjectId:n.toString(),entity:r,parentFolderId:i.activeFolder==="root"?null:i.activeFolder};await s(g)},e[6]=s,e[7]=n,e[8]=r,e[9]=i.activeFolder,e[10]=f):f=e[10];const h=f;let p;return e[11]!==d||e[12]!==h?(p={formMethods:d,onSubmit:h},e[11]=d,e[12]=h,e[13]=p):p=e[13],p},mD=e=>{var b;const t=Ie.c(38),{handleClose:n}=e,{texts:r}=v.useContext(rn),{documents:i}=r,{reducer:a,entityType:o}=v.useContext(mn),[s]=a;if(uD(s),s.modalType!=="create-folder")throw new Error("Tried to render CreateFolderModal without create-folder modal type reducer state.");const{onSubmit:l,formMethods:c}=pD();let u;t[0]!==c||t[1]!==l?(u=c.handleSubmit(l),t[0]=c,t[1]=l,t[2]=u):u=t[2];let d;if(t[3]!==i||t[4]!==o||t[5]!==s.chosenFolderId||t[6]!==s.foldersMap){let S;t[8]!==o||t[9]!==s.chosenFolderId||t[10]!==s.foldersMap?(S=((b=s.foldersMap.get(s.chosenFolderId))==null?void 0:b.name)??o,t[8]=o,t[9]=s.chosenFolderId,t[10]=s.foldersMap,t[11]=S):S=t[11],d=i.createFolderInFolder(S),t[3]=i,t[4]=o,t[5]=s.chosenFolderId,t[6]=s.foldersMap,t[7]=d}else d=t[7];let f;t[12]!==d?(f=y.jsx(Vn.Header,{closeButton:!0,children:y.jsx(Vn.Title,{children:d})}),t[12]=d,t[13]=f):f=t[13];let h;t[14]!==i.name?(h=y.jsx(es,{formField:"name",type:"text",label:i.name,required:!0}),t[14]=i.name,t[15]=h):h=t[15];let p;t[16]!==i.folderType||t[17]!==s.documentTypes?(p=y.jsx(rf,{options:s.documentTypes,formField:"documentTypeId",label:i.folderType,isNumber:!0,required:!0}),t[16]=i.folderType,t[17]=s.documentTypes,t[18]=p):p=t[18];let m;t[19]!==h||t[20]!==p?(m=y.jsxs(Vn.Body,{children:[h,p]}),t[19]=h,t[20]=p,t[21]=m):m=t[21];let g;t[22]!==i.cancel||t[23]!==n?(g=y.jsx(za,{onClick:n,variant:"outlined",color:"secondary",children:i.cancel}),t[22]=i.cancel,t[23]=n,t[24]=g):g=t[24];let x;t[25]!==i.createFolder?(x=y.jsx(za,{type:"submit",children:i.createFolder}),t[25]=i.createFolder,t[26]=x):x=t[26];let _;t[27]!==x||t[28]!==g?(_=y.jsxs(Vn.Footer,{children:[g,x]}),t[27]=x,t[28]=g,t[29]=_):_=t[29];let w;t[30]!==_||t[31]!==u||t[32]!==f||t[33]!==m?(w=y.jsxs(Gr,{onSubmit:u,children:[f,m,_]}),t[30]=_,t[31]=u,t[32]=f,t[33]=m,t[34]=w):w=t[34];let C;return t[35]!==c||t[36]!==w?(C=y.jsx(y.Fragment,{children:y.jsx(sn.FormProvider,{...c,children:w})}),t[35]=c,t[36]=w,t[37]=C):C=t[37],C},u3=100,gD=(e,t)=>{const n=Kd(),{startLoading:r,stopLoading:i}=v.useContext(Bd),{loadDocuments:a}=v.useContext(mn),{zStringRequired:o,zString:s,zNumberRequired:l,zDateRequired:c}=Qd(),u=di({name:o(),description:s(),validToDate:c(),documentTypeId:l()}),d=sn.useForm({resolver:af(u),defaultValues:{...e,validToDate:Hd(e.validToDate)}}),f=v.useCallback(async h=>{r("documents-updateProperties");try{await n.put(`/documents/${e.id}/update-info`,h),await a(),t()}finally{i("documents-updateProperties")}},[n,e.id,t,a,r,i]);return{formMethods:d,onSubmit:f}},vD=e=>{const t=Ie.c(38),{handleClose:n,file:r}=e,{texts:i}=v.useContext(rn),{documents:a}=i,{reducer:o}=v.useContext(mn),[s]=o,{formMethods:l,onSubmit:c}=gD(r,n);let u;t[0]!==a.editFileProperties?(u=y.jsx(Vn.Header,{closeButton:!0,children:y.jsx(Vn.Title,{children:a.editFileProperties})}),t[0]=a.editFileProperties,t[1]=u):u=t[1];let d;t[2]!==l||t[3]!==c?(d=l.handleSubmit(c),t[2]=l,t[3]=c,t[4]=d):d=t[4];let f;t[5]!==a.name?(f=y.jsx(es,{formField:"name",type:"text",label:a.name,required:!0}),t[5]=a.name,t[6]=f):f=t[6];let h;t[7]!==a.validSince?(h=y.jsx(es,{formField:"validToDate",type:"date",label:a.validSince,required:!0}),t[7]=a.validSince,t[8]=h):h=t[8];let p;t[9]!==a.category||t[10]!==s.documentTypes?(p=y.jsx(rf,{formField:"documentTypeId",label:a.category,options:s.documentTypes,isNumber:!0,required:!0}),t[9]=a.category,t[10]=s.documentTypes,t[11]=p):p=t[11];let m;t[12]===Symbol.for("react.memo_cache_sentinel")?(m={maxLength:u3},t[12]=m):m=t[12];let g;t[13]!==a.description?(g=y.jsx(r0,{formField:"description",label:a.description,customFormControlProps:m}),t[13]=a.description,t[14]=g):g=t[14];let x;t[15]!==f||t[16]!==h||t[17]!==p||t[18]!==g?(x=y.jsxs(Vn.Body,{children:[f,h,p,g]}),t[15]=f,t[16]=h,t[17]=p,t[18]=g,t[19]=x):x=t[19];let _;t[20]!==a.cancel||t[21]!==n?(_=y.jsx(za,{onClick:n,color:"secondary",variant:"outlined",children:a.cancel}),t[20]=a.cancel,t[21]=n,t[22]=_):_=t[22];let w;t[23]!==a.save?(w=y.jsx(za,{type:"submit",children:a.save}),t[23]=a.save,t[24]=w):w=t[24];let C;t[25]!==_||t[26]!==w?(C=y.jsxs(Vn.Footer,{children:[_,w]}),t[25]=_,t[26]=w,t[27]=C):C=t[27];let b;t[28]!==x||t[29]!==C||t[30]!==d?(b=y.jsxs(Gr,{onSubmit:d,children:[x,C]}),t[28]=x,t[29]=C,t[30]=d,t[31]=b):b=t[31];let S;t[32]!==l||t[33]!==b?(S=y.jsx(sn.FormProvider,{...l,children:b}),t[32]=l,t[33]=b,t[34]=S):S=t[34];let M;return t[35]!==S||t[36]!==u?(M=y.jsxs(y.Fragment,{children:[u,S]}),t[35]=S,t[36]=u,t[37]=M):M=t[37],M},bD=e=>{const t=Ie.c(9),{handleClose:n}=e,{reducer:r}=v.useContext(mn),[i]=r;let a;e:{if(i.markedFiles.length!==1){a=void 0;break e}let l;if(t[0]!==i.constantFiles||t[1]!==i.markedFiles[0]){let c;t[3]!==i.markedFiles[0]?(c=u=>u.id===i.markedFiles[0],t[3]=i.markedFiles[0],t[4]=c):c=t[4],l=i.constantFiles.find(c),t[0]=i.constantFiles,t[1]=i.markedFiles[0],t[2]=l}else l=t[2];a=l}const o=a;if(o===void 0){n();let l;return t[5]===Symbol.for("react.memo_cache_sentinel")?(l=y.jsx(y.Fragment,{}),t[5]=l):l=t[5],l}let s;return t[6]!==o||t[7]!==n?(s=y.jsx(vD,{file:o,handleClose:n}),t[6]=o,t[7]=n,t[8]=s):s=t[8],s},yD=()=>{const{reducer:[e,t]}=v.useContext(mn),n=v.useCallback(()=>{t({type:"close-modal"})},[t]),r=v.useMemo(()=>{if(e.state!=="openned-modal")return null;switch(e.modalType){case"create-folder":return y.jsx(mD,{handleClose:n});case"edit-file-properties":return y.jsx(bD,{handleClose:n});default:return null}},[e.state,e.modalType]);return y.jsx(Vn,{show:e.state==="openned-modal",onHide:n,children:r})},wb="documents_drag_image_element",Xu="drop-container-highlight-class",_b="data-drop-container-id",Cb="data-draggable-id",xD=()=>{const e=document.getElementById(wb);if(e!==null)return e;const t=document.createElement("div");return t.id=wb,t.style.position="absolute",t.style.top=`${-window.outerHeight}px`,t.style.left=`${-window.outerWidth}px`,t.style.width="50px",t.style.height="50px",t.style.backgroundColor="rgba(0, 0, 0, 0.5)",t.style.color="white",t.style.display="flex",t.style.alignItems="center",t.style.justifyContent="center",t.style.fontSize="16px",t.style.borderRadius="5px",document.body.appendChild(t),t},s0=()=>{const e=Ie.c(12),{apiActions:t,reducer:n}=v.useContext(mn),{moveDocuments:r}=t,[i]=n;let a;e[0]!==i.markedFiles?(a=x=>{var _;if(i.markedFiles.length>0){const w=xD();w.innerHTML=i.markedFiles.length.toString(),x.dataTransfer.setDragImage(w,0,0),x.dataTransfer.clearData(),x.dataTransfer.setData("application/json",JSON.stringify(i.markedFiles)),x.dataTransfer.dropEffect="none",x.dataTransfer.effectAllowed="move"}else x.dataTransfer.setData("application/json",JSON.stringify([parseInt(((_=x.currentTarget.attributes.getNamedItem(Cb))==null?void 0:_.nodeValue)??"",10)])),x.dataTransfer.dropEffect="none",x.dataTransfer.effectAllowed="move"},e[0]=i.markedFiles,e[1]=a):a=e[1];const o=a;let s;e[2]!==o||e[3]!==i.markedFiles?(s=x=>({[Cb]:x,draggable:i.markedFiles.length===0||i.markedFiles.includes(x),onDragStart:o}),e[2]=o,e[3]=i.markedFiles,e[4]=s):s=e[4];const l=s;let c;e[5]!==r?(c=x=>_=>{var b;_.preventDefault(),_.stopPropagation(),_.currentTarget.classList.remove(Xu);const w=_.dataTransfer.files;if(x&&w&&w.length>0){x(w);return}const C=_.dataTransfer.getData("application/json");if(C){const S=JSON.parse(C),M=parseInt(((b=_.currentTarget.attributes.getNamedItem(_b))==null?void 0:b.value)??"",10);r(M,S)}},e[5]=r,e[6]=c):c=e[6];const u=c,d=_D,f=CD,h=SD;let p;e[7]!==u?(p=(x,_)=>({onDrop:u(_==null?void 0:_.onFilesDrop),onDragOver:d(),onDragEnter:f(_==null?void 0:_.ignoreInner),onDragLeave:h,[_b]:x}),e[7]=u,e[8]=p):p=e[8];const m=p;let g;return e[9]!==l||e[10]!==m?(g={getDraggableProps:l,getDropProps:m},e[9]=l,e[10]=m,e[11]=g):g=e[11],g};function wD(e){e.preventDefault(),e.stopPropagation()}function _D(){return wD}function CD(e){return t=>{t.preventDefault(),t.stopPropagation(),t.dataTransfer.types.includes("Files")?(t.dataTransfer.dropEffect="copy",t.currentTarget.classList.add(Xu)):!e&&t.dataTransfer.types.includes("application/json")?(t.dataTransfer.dropEffect="move",t.currentTarget.classList.add(Xu)):t.dataTransfer.dropEffect="none"}}function SD(e){e.preventDefault(),e.stopPropagation(),e.target===e.currentTarget&&(e.dataTransfer.dropEffect="none",e.currentTarget.classList.remove(Xu))}function d3(e,t,n){for(let r=0;r<e.childrenIds.length;r++){const i=e.childrenIds[r];if(i===t)return!0;const a=n.get(i);if(a&&d3(a,t,n))return!0}return!1}function TD(e){if(e.activeFolder==="root")return!1;const t=e.foldersMap.get(e.activeFolder);return!(t!=null&&t.onlyRead)}function f3(e,t){const n=t.get(e);return n===void 0?"":n.parentId===null?n.name:`${f3(n.parentId,t)}/${n.name}`}const $D=()=>{const e=Ie.c(6),{zString:t,zStringRequired:n,zNumberRequired:r}=Qd();let i;e[0]!==r||e[1]!==t||e[2]!==n?(i=di({validToDate:n(),description:t(),name:t(),documentTypeId:r()}),e[0]=r,e[1]=t,e[2]=n,e[3]=i):i=e[3];const a=i;let o;return e[4]!==a?(o={formSchema:a},e[4]=a,e[5]=o):o=e[5],o},l0=e=>{var X;const t=Ie.c(69),{handleClose:n,files:r,targetFolderId:i}=e,{texts:a}=v.useContext(rn),{documents:o}=a,{reducer:s,apiActions:l}=v.useContext(mn),[c]=s,{uploadFiles:u}=l;let d;t[0]!==r?(d=[...r],t[0]=r,t[1]=d):d=t[1];const f=d,h=i??c.activeFolder;let p;t[2]!==h||t[3]!==c.foldersMap?(p=h==="root"?void 0:c.foldersMap.get(h),t[2]=h,t[3]=c.foldersMap,t[4]=p):p=t[4];const m=p,{formSchema:g}=$D();let x;t[5]!==g?(x=af(g),t[5]=g,t[6]=x):x=t[6];let _;t[7]===Symbol.for("react.memo_cache_sentinel")?(_=Hd(new Date().toISOString()),t[7]=_):_=t[7];let w;t[8]!==h||t[9]!==c.documentTypes||t[10]!==c.foldersMap?(w=(X=c.documentTypes.find(J=>{var ee;return J.name===((ee=c.foldersMap.get(h))==null?void 0:ee.defaultDocType)}))==null?void 0:X.id,t[8]=h,t[9]=c.documentTypes,t[10]=c.foldersMap,t[11]=w):w=t[11];let C;t[12]!==w?(C={validToDate:_,documentTypeId:w},t[12]=w,t[13]=C):C=t[13];let b;t[14]!==x||t[15]!==C?(b={resolver:x,defaultValues:C},t[14]=x,t[15]=C,t[16]=b):b=t[16];const S=sn.useForm(b);let M;t[17]!==r||t[18]!==h||t[19]!==n||t[20]!==u?(M=async J=>{h!=="root"&&(await u(r,{folderId:h,...J}),n())},t[17]=r,t[18]=h,t[19]=n,t[20]=u,t[21]=M):M=t[21];const $=M;let k;t[22]!==o||t[23]!==r.length||t[24]!==m.name?(k=o.uploadFilesPrompt(r.length,m.name),t[22]=o,t[23]=r.length,t[24]=m.name,t[25]=k):k=t[25];let R;t[26]!==f?(R=y.jsx("ul",{children:f.map(kD)}),t[26]=f,t[27]=R):R=t[27];let T;t[28]!==k||t[29]!==R?(T=y.jsx(Vn.Header,{closeButton:!0,children:y.jsxs("div",{children:[k,R]})}),t[28]=k,t[29]=R,t[30]=T):T=t[30];let E;t[31]!==S||t[32]!==$?(E=S.handleSubmit($),t[31]=S,t[32]=$,t[33]=E):E=t[33];let A;t[34]!==o.documentType||t[35]!==c.documentTypes?(A=y.jsx(rf,{formField:"documentTypeId",label:o.documentType,options:c.documentTypes,isNumber:!0,required:!0}),t[34]=o.documentType,t[35]=c.documentTypes,t[36]=A):A=t[36];let j;t[37]!==o.validSince?(j=y.jsx(es,{formField:"validToDate",label:o.validSince,type:"date",required:!0}),t[37]=o.validSince,t[38]=j):j=t[38];let I;t[39]!==o.name||t[40]!==f.length?(I=f.length===1?y.jsx(es,{formField:"name",label:o.name,type:"text"}):null,t[39]=o.name,t[40]=f.length,t[41]=I):I=t[41];let D;t[42]===Symbol.for("react.memo_cache_sentinel")?(D={maxLength:u3},t[42]=D):D=t[42];let O;t[43]!==o.description?(O=y.jsx(r0,{formField:"description",label:o.description,customFormControlProps:D}),t[43]=o.description,t[44]=O):O=t[44];let L;t[45]!==A||t[46]!==j||t[47]!==I||t[48]!==O?(L=y.jsxs(Vn.Body,{children:[A,j,I,O]}),t[45]=A,t[46]=j,t[47]=I,t[48]=O,t[49]=L):L=t[49];let B;t[50]!==o.cancel||t[51]!==n?(B=y.jsx(za,{variant:"outlined",color:"secondary",onClick:n,children:o.cancel}),t[50]=o.cancel,t[51]=n,t[52]=B):B=t[52];let P;t[53]!==o.upload?(P=y.jsx(za,{type:"submit",children:o.upload}),t[53]=o.upload,t[54]=P):P=t[54];let H;t[55]!==B||t[56]!==P?(H=y.jsxs(Vn.Footer,{children:[B,P]}),t[55]=B,t[56]=P,t[57]=H):H=t[57];let Y;t[58]!==E||t[59]!==L||t[60]!==H?(Y=y.jsxs(Gr,{onSubmit:E,children:[L,H]}),t[58]=E,t[59]=L,t[60]=H,t[61]=Y):Y=t[61];let q;t[62]!==S||t[63]!==Y?(q=y.jsx(sn.FormProvider,{...S,children:Y}),t[62]=S,t[63]=Y,t[64]=q):q=t[64];let Z;return t[65]!==n||t[66]!==T||t[67]!==q?(Z=y.jsxs(Vn,{show:!0,onHide:n,children:[T,q]}),t[65]=n,t[66]=T,t[67]=q,t[68]=Z):Z=t[68],Z};function kD(e,t){return y.jsxs("li",{children:[e.name," - ",Go(e.size)]},`${e.name}-${t}`)}const MD="_folder_1cktt_1",ED="_collapseArrowDiv_1cktt_8",OD="_button_1cktt_20",AD="_nestedList_1cktt_24",RD="_numberOfFiles_1cktt_31",DD="_collapseArrow_1cktt_8",fa={folder:MD,collapseArrowDiv:ED,button:OD,nestedList:AD,numberOfFiles:RD,collapseArrow:DD},h3=e=>{const t=Ie.c(59),{dirId:n,writePermissions:r}=e,{ProjectIconComponent:i}=v.useContext(rn),{reducer:a}=v.useContext(mn),[o,s]=a,{getDropProps:l}=s0(),[c,u]=v.useState(null),[d,f]=v.useState(!0);let h,p;t[0]!==n||t[1]!==o.foldersMap?(p=o.foldersMap.get(n),t[0]=n,t[1]=o.foldersMap,t[2]=p):p=t[2];const m=p;if(m===void 0)throw new Error(`tried to get dir with id ${n}`);h=m;const g=h;let x;t[3]!==n||t[4]!==g||t[5]!==s||t[6]!==o.activeFolder||t[7]!==o.foldersMap?(x=()=>{o.activeFolder!=="root"&&d3(g,o.activeFolder,o.foldersMap)&&s({type:"select-folder",folderId:n}),f(!0)},t[3]=n,t[4]=g,t[5]=s,t[6]=o.activeFolder,t[7]=o.foldersMap,t[8]=x):x=t[8];const _=x,w=g.childrenIds.length>0;let C;t[9]!==n||t[10]!==s?(C=()=>{s({type:"select-folder",folderId:n})},t[9]=n,t[10]=s,t[11]=C):C=t[11];const b=C;let S;if(t[12]!==n||t[13]!==o.filteredFiles){let Y;t[15]!==n?(Y=q=>q.folderId===n&&q.archive===!1,t[15]=n,t[16]=Y):Y=t[16],S=o.filteredFiles.filter(Y),t[12]=n,t[13]=o.filteredFiles,t[14]=S}else S=t[14];const M=S.length;let $;t[17]!==i||t[18]!==_||t[19]!==w||t[20]!==d?($=w?d?y.jsx("button",{onClick:()=>f(!1),type:"button",children:y.jsx(i,{icon:"chevron-right",iconProps:{className:fa.collapseArrow}})}):y.jsx("button",{onClick:_,type:"button",children:y.jsx(i,{icon:"chevron-down",iconProps:{className:fa.collapseArrow}})}):null,t[17]=i,t[18]=_,t[19]=w,t[20]=d,t[21]=$):$=t[21];let k;t[22]!==$?(k=y.jsx("div",{className:fa.collapseArrowDiv,children:$}),t[22]=$,t[23]=k):k=t[23];let R;t[24]===Symbol.for("react.memo_cache_sentinel")?(R=se(fa.button),t[24]=R):R=t[24];let T;t[25]!==n||t[26]!==g.onlyRead||t[27]!==l||t[28]!==r?(T=r&&!g.onlyRead?l(n,{onFilesDrop:Y=>u(Y)}):{},t[25]=n,t[26]=g.onlyRead,t[27]=l,t[28]=r,t[29]=T):T=t[29];const E=g.defaultDocType??"",A=n===o.activeFolder;let j;t[30]!==g.isDefault||t[31]!==g.name||t[32]!==E||t[33]!==A?(j=y.jsx(s3,{isDefault:g.isDefault,folderName:g.name,typeName:E,isActive:A}),t[30]=g.isDefault,t[31]=g.name,t[32]=E,t[33]=A,t[34]=j):j=t[34];let I;t[35]!==M?(I=M>0?y.jsxs("span",{className:fa.numberOfFiles,children:["[",M,"]"]}):void 0,t[35]=M,t[36]=I):I=t[36];let D;t[37]!==j||t[38]!==I?(D=y.jsxs("div",{className:"d-flex align-items-center gap-2",children:[j,I]}),t[37]=j,t[38]=I,t[39]=D):D=t[39];let O;t[40]!==b||t[41]!==T||t[42]!==D?(O=y.jsx("button",{className:R,onClick:b,type:"button",...T,children:D}),t[40]=b,t[41]=T,t[42]=D,t[43]=O):O=t[43];let L;t[44]!==g.childrenIds||t[45]!==w||t[46]!==d||t[47]!==r?(L=w?d?null:y.jsx("ul",{className:fa.nestedList,children:g==null?void 0:g.childrenIds.map(Y=>y.jsx(h3,{dirId:Y,writePermissions:r},Y))}):void 0,t[44]=g.childrenIds,t[45]=w,t[46]=d,t[47]=r,t[48]=L):L=t[48];let B;t[49]!==O||t[50]!==L||t[51]!==k?(B=y.jsxs("li",{className:fa.folder,children:[k,O,L]}),t[49]=O,t[50]=L,t[51]=k,t[52]=B):B=t[52];let P;t[53]!==n||t[54]!==c?(P=c!==null?y.jsx(l0,{files:c,handleClose:()=>u(null),targetFolderId:n}):null,t[53]=n,t[54]=c,t[55]=P):P=t[55];let H;return t[56]!==B||t[57]!==P?(H=y.jsxs(y.Fragment,{children:[B,P]}),t[56]=B,t[57]=P,t[58]=H):H=t[58],H},jD="_wrapper_1th2u_1",ID="_downloadButton_1th2u_9",bm={wrapper:jD,downloadButton:ID},p3=6048e5,ND=864e5,Sb=Symbol.for("constructDateFrom");function wi(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Sb in e?e[Sb](t):e instanceof Date?new e.constructor(t):new Date(t)}function nr(e,t){return wi(t||e,e)}function m3(e,t){const n=()=>wi(t==null?void 0:t.in,NaN),r=zD(e);let i;if(r.date){const l=BD(r.date,2);i=WD(l.restDateString,l.year)}if(!i||isNaN(+i))return n();const a=+i;let o=0,s;if(r.time&&(o=UD(r.time),isNaN(o)))return n();if(r.timezone){if(s=HD(r.timezone),isNaN(s))return n()}else{const l=new Date(a+o),c=nr(0,t==null?void 0:t.in);return c.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),c.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),c}return nr(a+o+s,t==null?void 0:t.in)}const eu={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},PD=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,LD=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,FD=/^([+-])(\d{2})(?::?(\d{2}))?$/;function zD(e){const t={},n=e.split(eu.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],eu.timeZoneDelimiter.test(t.date)&&(t.date=e.split(eu.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const i=eu.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function BD(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:a===null?i:a*100,restDateString:e.slice((r[1]||r[2]).length)}}function WD(e,t){if(t===null)return new Date(NaN);const n=e.match(PD);if(!n)return new Date(NaN);const r=!!n[4],i=Bs(n[1]),a=Bs(n[2])-1,o=Bs(n[3]),s=Bs(n[4]),l=Bs(n[5])-1;if(r)return ZD(t,s,l)?VD(t,s,l):new Date(NaN);{const c=new Date(0);return!YD(t,a,o)||!GD(t,i)?new Date(NaN):(c.setUTCFullYear(t,a,Math.max(i,o)),c)}}function Bs(e){return e?parseInt(e):1}function UD(e){const t=e.match(LD);if(!t)return NaN;const n=Qh(t[1]),r=Qh(t[2]),i=Qh(t[3]);return XD(n,r,i)?n*36e5+r*6e4+i*1e3:NaN}function Qh(e){return e&&parseFloat(e.replace(",","."))||0}function HD(e){if(e==="Z")return 0;const t=e.match(FD);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return KD(r,i)?n*(r*36e5+i*6e4):NaN}function VD(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const i=r.getUTCDay()||7,a=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+a),r}const qD=[31,null,31,30,31,30,31,31,30,31,30,31];function g3(e){return e%400===0||e%4===0&&e%100!==0}function YD(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(qD[t]||(g3(e)?29:28))}function GD(e,t){return t>=1&&t<=(g3(e)?366:365)}function ZD(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function XD(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function KD(e,t){return t>=0&&t<=59}let JD={};function of(){return JD}function Il(e,t){var s,l,c,u;const n=of(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,i=nr(e,t==null?void 0:t.in),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function Ku(e,t){return Il(e,{...t,weekStartsOn:1})}function v3(e,t){const n=nr(e,t==null?void 0:t.in),r=n.getFullYear(),i=wi(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const a=Ku(i),o=wi(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const s=Ku(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Tb(e){const t=nr(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function QD(e,...t){const n=wi.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function $b(e,t){const n=nr(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function ej(e,t,n){const[r,i]=QD(n==null?void 0:n.in,e,t),a=$b(r),o=$b(i),s=+a-Tb(a),l=+o-Tb(o);return Math.round((s-l)/ND)}function tj(e,t){const n=v3(e,t),r=wi(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ku(r)}function nj(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function rj(e){return!(!nj(e)&&typeof e!="number"||isNaN(+nr(e)))}function ij(e,t){const n=nr(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const aj={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},oj=(e,t,n)=>{let r;const i=aj[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function ep(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const sj={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},lj={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},cj={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},uj={date:ep({formats:sj,defaultWidth:"full"}),time:ep({formats:lj,defaultWidth:"full"}),dateTime:ep({formats:cj,defaultWidth:"full"})},dj={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},fj=(e,t,n,r)=>dj[e];function Ws(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):o;i=e.formattingValues[s]||e.formattingValues[o]}else{const o=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[o]}const a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}const hj={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},pj={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},mj={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},gj={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},vj={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},bj={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},yj=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},xj={ordinalNumber:yj,era:Ws({values:hj,defaultWidth:"wide"}),quarter:Ws({values:pj,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ws({values:mj,defaultWidth:"wide"}),day:Ws({values:gj,defaultWidth:"wide"}),dayPeriod:Ws({values:vj,defaultWidth:"wide",formattingValues:bj,defaultFormattingWidth:"wide"})};function Us(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?_j(s,d=>d.test(o)):wj(s,d=>d.test(o));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(o.length);return{value:c,rest:u}}}function wj(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function _j(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Cj(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;const s=t.slice(i.length);return{value:o,rest:s}}}const Sj=/^(\d+)(th|st|nd|rd)?/i,Tj=/\d+/i,$j={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},kj={any:[/^b/i,/^(a|c)/i]},Mj={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ej={any:[/1/i,/2/i,/3/i,/4/i]},Oj={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Aj={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Rj={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Dj={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},jj={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ij={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Nj={ordinalNumber:Cj({matchPattern:Sj,parsePattern:Tj,valueCallback:e=>parseInt(e,10)}),era:Us({matchPatterns:$j,defaultMatchWidth:"wide",parsePatterns:kj,defaultParseWidth:"any"}),quarter:Us({matchPatterns:Mj,defaultMatchWidth:"wide",parsePatterns:Ej,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Us({matchPatterns:Oj,defaultMatchWidth:"wide",parsePatterns:Aj,defaultParseWidth:"any"}),day:Us({matchPatterns:Rj,defaultMatchWidth:"wide",parsePatterns:Dj,defaultParseWidth:"any"}),dayPeriod:Us({matchPatterns:jj,defaultMatchWidth:"any",parsePatterns:Ij,defaultParseWidth:"any"})},Pj={code:"en-US",formatDistance:oj,formatLong:uj,formatRelative:fj,localize:xj,match:Nj,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Lj(e,t){const n=nr(e,t==null?void 0:t.in);return ej(n,ij(n))+1}function Fj(e,t){const n=nr(e,t==null?void 0:t.in),r=+Ku(n)-+tj(n);return Math.round(r/p3)+1}function b3(e,t){var u,d,f,h;const n=nr(e,t==null?void 0:t.in),r=n.getFullYear(),i=of(),a=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??i.firstWeekContainsDate??((h=(f=i.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,o=wi((t==null?void 0:t.in)||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);const s=Il(o,t),l=wi((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const c=Il(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function zj(e,t){var o,s,l,c;const n=of(),r=(t==null?void 0:t.firstWeekContainsDate)??((s=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:s.firstWeekContainsDate)??n.firstWeekContainsDate??((c=(l=n.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??1,i=b3(e,t),a=wi((t==null?void 0:t.in)||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),Il(a,t)}function Bj(e,t){const n=nr(e,t==null?void 0:t.in),r=+Il(n,t)-+zj(n,t);return Math.round(r/p3)+1}function zt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Ai={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return zt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):zt(n+1,2)},d(e,t){return zt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return zt(e.getHours()%12||12,t.length)},H(e,t){return zt(e.getHours(),t.length)},m(e,t){return zt(e.getMinutes(),t.length)},s(e,t){return zt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return zt(i,t.length)}},go={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},kb={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Ai.y(e,t)},Y:function(e,t,n,r){const i=b3(e,r),a=i>0?i:1-i;if(t==="YY"){const o=a%100;return zt(o,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):zt(a,t.length)},R:function(e,t){const n=v3(e);return zt(n,t.length)},u:function(e,t){const n=e.getFullYear();return zt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return zt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return zt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Ai.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return zt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=Bj(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):zt(i,t.length)},I:function(e,t,n){const r=Fj(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):zt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ai.d(e,t)},D:function(e,t,n){const r=Lj(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):zt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return zt(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return zt(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return zt(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=go.noon:r===0?i=go.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=go.evening:r>=12?i=go.afternoon:r>=4?i=go.morning:i=go.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Ai.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ai.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):zt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):zt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ai.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ai.s(e,t)},S:function(e,t){return Ai.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Eb(r);case"XXXX":case"XX":return va(r);case"XXXXX":case"XXX":default:return va(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Eb(r);case"xxxx":case"xx":return va(r);case"xxxxx":case"xxx":default:return va(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Mb(r,":");case"OOOO":default:return"GMT"+va(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Mb(r,":");case"zzzz":default:return"GMT"+va(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return zt(r,t.length)},T:function(e,t,n){return zt(+e,t.length)}};function Mb(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+zt(a,2)}function Eb(e,t){return e%60===0?(e>0?"-":"+")+zt(Math.abs(e)/60,2):va(e,t)}function va(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=zt(Math.trunc(r/60),2),a=zt(r%60,2);return n+i+t+a}const Ob=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},y3=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Wj=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Ob(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Ob(r,t)).replace("{{time}}",y3(i,t))},Uj={p:y3,P:Wj},Hj=/^D+$/,Vj=/^Y+$/,qj=["D","DD","YY","YYYY"];function Yj(e){return Hj.test(e)}function Gj(e){return Vj.test(e)}function Zj(e,t,n){const r=Xj(e,t,n);if(console.warn(r),qj.includes(e))throw new RangeError(r)}function Xj(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Kj=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jj=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Qj=/^'([^]*?)'?$/,eI=/''/g,tI=/[a-zA-Z]/;function x3(e,t,n){var u,d,f,h;const r=of(),i=r.locale??Pj,a=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,o=r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,s=nr(e,n==null?void 0:n.in);if(!rj(s))throw new RangeError("Invalid time value");let l=t.match(Jj).map(p=>{const m=p[0];if(m==="p"||m==="P"){const g=Uj[m];return g(p,i.formatLong)}return p}).join("").match(Kj).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:nI(p)};if(kb[m])return{isToken:!0,value:p};if(m.match(tI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));const c={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(Gj(m)||Yj(m))&&Zj(m,t,String(e));const g=kb[m[0]];return g(s,m,i.localize,c)}).join("")}function nI(e){const t=e.match(Qj);return t?t[1].replace(eI,"'"):e}function w3(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var Nl;(function(e){e.event="event",e.props="prop"})(Nl||(Nl={}));function Li(){}function rI(e){var t,n=void 0;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t&&r.length===t.length&&r.every(function(a,o){return a===t[o]})||(t=r,n=e.apply(void 0,r)),n}}function Pl(e){return!!(e||"").match(/\d/)}function jo(e){return e==null}function iI(e){return typeof e=="number"&&isNaN(e)}function _3(e){return jo(e)||iI(e)||typeof e=="number"&&!isFinite(e)}function C3(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function aI(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function oI(e,t,n){var r=aI(n),i=e.search(/[1-9]/);return i=i===-1?e.length:i,e.substring(0,i)+e.substring(i,e.length).replace(r,"$1"+t)}function sI(e){var t=v.useRef(e);t.current=e;var n=v.useRef(function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t.current.apply(t,r)});return n.current}function c0(e,t){t===void 0&&(t=!0);var n=e[0]==="-",r=n&&t;e=e.replace("-","");var i=e.split("."),a=i[0],o=i[1]||"";return{beforeDecimal:a,afterDecimal:o,hasNegation:n,addNegation:r}}function lI(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",i=n[1]||"";return(t?"-":"")+r+(i?"."+i:"")}function S3(e,t,n){for(var r="",i=n?"0":"",a=0;a<=t-1;a++)r+=e[a]||i;return r}function Ab(e,t){return Array(t+1).join(e)}function T3(e){var t=e+"",n=t[0]==="-"?"-":"";n&&(t=t.substring(1));var r=t.split(/[eE]/g),i=r[0],a=r[1];if(a=Number(a),!a)return n+i;i=i.replace(".","");var o=1+a,s=i.length;return o<0?i="0."+Ab("0",Math.abs(o))+i:o>=s?i=i+Ab("0",o-s):i=(i.substring(0,o)||"0")+"."+i.substring(o),n+i}function Rb(e,t,n){if(["","-"].indexOf(e)!==-1)return e;var r=(e.indexOf(".")!==-1||n)&&t,i=c0(e),a=i.beforeDecimal,o=i.afterDecimal,s=i.hasNegation,l=parseFloat("0."+(o||"0")),c=o.length<=t?"0."+o:l.toFixed(t),u=c.split("."),d=a;a&&Number(u[0])&&(d=a.split("").reverse().reduce(function(m,g,x){return m.length>x?(Number(m[0])+Number(g)).toString()+m.substring(1,m.length):g+m},u[0]));var f=S3(u[1]||"",t,n),h=s?"-":"",p=r?".":"";return""+h+d+p+f}function xa(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var $3=rI(function(e,t){for(var n=0,r=0,i=e.length,a=t.length;e[n]===t[n]&&n<i;)n++;for(;e[i-1-r]===t[a-1-r]&&a-r>n&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:a-r}}}),cI=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function uI(e,t,n){return Math.min(Math.max(e,t),n)}function tp(e){return Math.max(e.selectionStart,e.selectionEnd)}function dI(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function fI(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function hI(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function pI(e,t,n,r,i,a,o){o===void 0&&(o=hI);var s=i.findIndex(function(C){return C}),l=e.slice(0,s);!t&&!n.startsWith(l)&&(t=l,n=l+n,r=r+l.length);for(var c=n.length,u=e.length,d={},f=new Array(c),h=0;h<c;h++){f[h]=-1;for(var p=0,m=u;p<m;p++){var g=o({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:h,formattedValueIndex:p});if(g&&d[p]!==!0){f[h]=p,d[p]=!0;break}}}for(var x=r;x<c&&(f[x]===-1||!a(n[x]));)x++;var _=x===c||f[x]===-1?u:f[x];for(x=r-1;x>0&&f[x]===-1;)x--;var w=x===-1||f[x]===-1?0:f[x]+1;return w>_?_:r-w<_-r?w:_}function Db(e,t,n,r){var i=e.length;if(t=uI(t,0,i),r==="left"){for(;t>=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=i&&!n[t];)t++;t>i&&(t=n.lastIndexOf(!0))}return t===-1&&(t=i),t}function mI(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(Pl(e[n])||Pl(e[n-1]));return t}function k3(e,t,n,r,i,a){a===void 0&&(a=Li);var o=sI(function(p,m){var g,x;return _3(p)?(x="",g=""):typeof p=="number"||m?(x=typeof p=="number"?T3(p):p,g=r(x)):(x=i(p,void 0),g=r(x)),{formattedValue:g,numAsString:x}}),s=v.useState(function(){return o(jo(e)?t:e,n)}),l=s[0],c=s[1],u=function(p,m){p.formattedValue!==l.formattedValue&&c({formattedValue:p.formattedValue,numAsString:p.value}),a(p,m)},d=e,f=n;jo(e)&&(d=l.numAsString,f=!0);var h=o(d,f);return v.useMemo(function(){c(h)},[h.formattedValue]),[l,u]}function gI(e){return e.replace(/[^0-9]/g,"")}function vI(e){return e}function bI(e){var t=e.type;t===void 0&&(t="text");var n=e.displayType;n===void 0&&(n="input");var r=e.customInput,i=e.renderText,a=e.getInputRef,o=e.format;o===void 0&&(o=vI);var s=e.removeFormatting;s===void 0&&(s=gI);var l=e.defaultValue,c=e.valueIsNumericString,u=e.onValueChange,d=e.isAllowed,f=e.onChange;f===void 0&&(f=Li);var h=e.onKeyDown;h===void 0&&(h=Li);var p=e.onMouseUp;p===void 0&&(p=Li);var m=e.onFocus;m===void 0&&(m=Li);var g=e.onBlur;g===void 0&&(g=Li);var x=e.value,_=e.getCaretBoundary;_===void 0&&(_=mI);var w=e.isValidInputCharacter;w===void 0&&(w=Pl);var C=e.isCharacterSame,b=w3(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),S=k3(x,l,!!c,o,s,u),M=S[0],$=M.formattedValue,k=M.numAsString,R=S[1],T=v.useRef(),E=v.useRef({formattedValue:$,numAsString:k}),A=function(ne,re){E.current={formattedValue:ne.formattedValue,numAsString:ne.value},R(ne,re)},j=v.useState(!1),I=j[0],D=j[1],O=v.useRef(null),L=v.useRef({setCaretTimeout:null,focusTimeout:null});v.useEffect(function(){return D(!0),function(){clearTimeout(L.current.setCaretTimeout),clearTimeout(L.current.focusTimeout)}},[]);var B=o,P=function(ne,re){var ae=parseFloat(re);return{formattedValue:ne,value:re,floatValue:isNaN(ae)?void 0:ae}},H=function(ne,re,ae){ne.selectionStart===0&&ne.selectionEnd===ne.value.length||(xa(ne,re),L.current.setCaretTimeout=setTimeout(function(){ne.value===ae&&ne.selectionStart!==re&&xa(ne,re)},0))},Y=function(ne,re,ae){return Db(ne,re,_(ne),ae)},q=function(ne,re,ae){var le=_(re),ye=pI(re,$,ne,ae,le,w,C);return ye=Db(re,ye,le),ye},Z=function(ne){var re=ne.formattedValue;re===void 0&&(re="");var ae=ne.input,le=ne.source,ye=ne.event,ge=ne.numAsString,be;if(ae){var Me=ne.inputValue||ae.value,ce=tp(ae);ae.value=re,be=q(Me,re,ce),be!==void 0&&H(ae,be,re)}re!==$&&A(P(re,ge),{event:ye,source:le})};v.useEffect(function(){var ne=E.current,re=ne.formattedValue,ae=ne.numAsString;($!==re||k!==ae)&&A(P($,k),{event:void 0,source:Nl.props})},[$,k]);var X=O.current?tp(O.current):void 0,J=typeof window<"u"?v.useLayoutEffect:v.useEffect;J(function(){var ne=O.current;if($!==E.current.formattedValue&&ne){var re=q(E.current.formattedValue,$,X);ne.value=$,H(ne,re,$)}},[$]);var ee=function(ne,re,ae){var le=re.target,ye=T.current?cI(T.current,le.selectionEnd):$3($,ne),ge=Object.assign(Object.assign({},ye),{lastValue:$}),be=s(ne,ge),Me=B(be);if(be=s(Me,void 0),d&&!d(P(Me,be))){var ce=re.target,de=tp(ce),Ce=q(ne,$,de);return ce.value=$,H(ce,Ce,$),!1}return Z({formattedValue:Me,numAsString:be,inputValue:ne,event:re,source:ae,input:re.target}),!0},W=function(ne,re){re===void 0&&(re=0);var ae=ne.selectionStart,le=ne.selectionEnd;T.current={selectionStart:ae,selectionEnd:le+re}},F=function(ne){var re=ne.target,ae=re.value,le=ee(ae,ne,Nl.event);le&&f(ne),T.current=void 0},z=function(ne){var re=ne.target,ae=ne.key,le=re.selectionStart,ye=re.selectionEnd,ge=re.value;ge===void 0&&(ge="");var be;ae==="ArrowLeft"||ae==="Backspace"?be=Math.max(le-1,0):ae==="ArrowRight"?be=Math.min(le+1,ge.length):ae==="Delete"&&(be=le);var Me=0;ae==="Delete"&&le===ye&&(Me=1);var ce=ae==="ArrowLeft"||ae==="ArrowRight";if(be===void 0||le!==ye&&!ce){h(ne),W(re,Me);return}var de=be;if(ce){var Ce=ae==="ArrowLeft"?"left":"right";de=Y(ge,be,Ce),de!==be&&ne.preventDefault()}else ae==="Delete"&&!w(ge[be])?de=Y(ge,be,"right"):ae==="Backspace"&&!w(ge[be])&&(de=Y(ge,be,"left"));de!==be&&H(re,de,ge),h(ne),W(re,Me)},V=function(ne){var re=ne.target,ae=function(){var le=re.selectionStart,ye=re.selectionEnd,ge=re.value;if(ge===void 0&&(ge=""),le===ye){var be=Y(ge,le);be!==le&&H(re,be,ge)}};ae(),requestAnimationFrame(function(){ae()}),p(ne),W(re)},N=function(ne){ne.persist&&ne.persist();var re=ne.target,ae=ne.currentTarget;O.current=re,L.current.focusTimeout=setTimeout(function(){var le=re.selectionStart,ye=re.selectionEnd,ge=re.value;ge===void 0&&(ge="");var be=Y(ge,le);be!==le&&!(le===0&&ye===ge.length)&&H(re,be,ge),m(Object.assign(Object.assign({},ne),{currentTarget:ae}))},0)},te=function(ne){O.current=null,clearTimeout(L.current.focusTimeout),clearTimeout(L.current.setCaretTimeout),g(ne)},K=I&&dI()?"numeric":void 0,G=Object.assign({inputMode:K},b,{type:t,value:$,onChange:F,onKeyDown:z,onMouseUp:V,onFocus:N,onBlur:te});if(n==="text")return i?v.createElement(v.Fragment,null,i($,b)||null):v.createElement("span",Object.assign({},b,{ref:a}),$);if(r){var oe=r;return v.createElement(oe,Object.assign({},G,{ref:a}))}return v.createElement("input",Object.assign({},G,{ref:a}))}function jb(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,i=t.prefix;i===void 0&&(i="");var a=t.suffix;a===void 0&&(a="");var o=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s="thousand"),e===""||e==="-")return e;var l=sf(t),c=l.thousandSeparator,u=l.decimalSeparator,d=n!==0&&e.indexOf(".")!==-1||n&&r,f=c0(e,o),h=f.beforeDecimal,p=f.afterDecimal,m=f.addNegation;return n!==void 0&&(p=S3(p,n,!!r)),c&&(h=oI(h,c,s)),i&&(h=i+h),a&&(p=p+a),m&&(h="-"+h),e=h+(d&&u||"")+p,e}function sf(e){var t=e.decimalSeparator;t===void 0&&(t=".");var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return n===!0&&(n=","),r||(r=[t,"."]),{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function yI(e,t){e===void 0&&(e="");var n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),i=n.test(e),a=r.test(e);return e=e.replace(/-/g,""),i&&!a&&t&&(e="-"+e),e}function xI(e,t){return new RegExp("(^-)|[0-9]|"+C3(e),"g")}function wI(e,t,n){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(n!=null&&n.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function _I(e,t,n){var r;t===void 0&&(t=fI(e));var i=n.allowNegative,a=n.prefix;a===void 0&&(a="");var o=n.suffix;o===void 0&&(o="");var s=n.decimalScale,l=t.from,c=t.to,u=c.start,d=c.end,f=sf(n),h=f.allowedDecimalSeparators,p=f.decimalSeparator,m=e[d]===p;if(Pl(e)&&(e===a||e===o)&&t.lastValue==="")return e;if(d-u===1&&h.indexOf(e[u])!==-1){var g=s===0?"":p;e=e.substring(0,u)+g+e.substring(u+1,e.length)}var x=function(O,L,B){var P=!1,H=!1;a.startsWith("-")?P=!1:O.startsWith("--")?(P=!1,H=!0):o.startsWith("-")&&O.length===o.length?P=!1:O[0]==="-"&&(P=!0);var Y=P?1:0;return H&&(Y=2),Y&&(O=O.substring(Y),L-=Y,B-=Y),{value:O,start:L,end:B,hasNegation:P}},_=x(e,u,d),w=_.hasNegation;r=_,e=r.value,u=r.start,d=r.end;var C=x(t.lastValue,l.start,l.end),b=C.start,S=C.end,M=C.value,$=e.substring(u,d);e.length&&M.length&&(b>M.length-o.length||S<a.length)&&!($&&o.startsWith($))&&(e=M);var k=0;e.startsWith(a)?k+=a.length:u<a.length&&(k=u),e=e.substring(k),d-=k;var R=e.length,T=e.length-o.length;e.endsWith(o)?R=T:(d>T||d>e.length-o.length)&&(R=d),e=e.substring(0,R),e=yI(w?"-"+e:e,i),e=(e.match(xI(p))||[]).join("");var E=e.indexOf(p);e=e.replace(new RegExp(C3(p),"g"),function(O,L){return L===E?".":""});var A=c0(e,i),j=A.beforeDecimal,I=A.afterDecimal,D=A.addNegation;return c.end-c.start<l.end-l.start&&j===""&&m&&!parseFloat(I)&&(e=D?"-":""),e}function CI(e,t){var n=t.prefix;n===void 0&&(n="");var r=t.suffix;r===void 0&&(r="");var i=Array.from({length:e.length+1}).map(function(){return!0}),a=e[0]==="-";i.fill(!1,0,n.length+(a?1:0));var o=e.length;return i.fill(!1,o-r.length+1,o+1),i}function SI(e){var t=sf(e),n=t.thousandSeparator,r=t.decimalSeparator,i=e.prefix;i===void 0&&(i="");var a=e.allowNegative;if(a===void 0&&(a=!0),n===r)throw new Error(`
|
|
247
247
|
Decimal separator can't be same as thousand separator.
|
|
248
248
|
thousandSeparator: `+n+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
|
249
249
|
decimalSeparator: `+r+` (default value for decimalSeparator is .)
|