@wellesley/apps 1.0.731 → 1.0.732
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/index.mjs +3 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Sv,{useCallback as nt,forwardRef as ol,createElement as $a,useEffect as os,useState as hr}from"https://cdn.jsdelivr.net/npm/react@18.2.0/+esm";import{useSelector as Hi}from"https://cdn.jsdelivr.net/npm/react-redux@9.1.0/+esm";import{userSlice as jv,useGetApiV1AccountsProfileQuery as Iv,UserAvatar as Ev}from"https://cdn.jsdelivr.net/npm/@wellesley/user@1.0.
|
|
1
|
+
import Sv,{useCallback as nt,forwardRef as ol,createElement as $a,useEffect as os,useState as hr}from"https://cdn.jsdelivr.net/npm/react@18.2.0/+esm";import{useSelector as Hi}from"https://cdn.jsdelivr.net/npm/react-redux@9.1.0/+esm";import{userSlice as jv,useGetApiV1AccountsProfileQuery as Iv,UserAvatar as Ev}from"https://cdn.jsdelivr.net/npm/@wellesley/user@1.0.806";import{getRoute as Xi,getEntryAppRoute as Cv,useAppsNavigate as Tv}from"https://cdn.jsdelivr.net/npm/@wellesley/router@1.0.717";import{api as Nv,usePostApiV1UsersMutation as Ov,useGetApiV1AppsByAppIdQuery as Rv}from"https://cdn.jsdelivr.net/npm/@wellesley/openapi@1.0.791";import{toast as Ec}from"https://cdn.jsdelivr.net/npm/@wellesley/system-toast@1.0.135";import{createAction as ul,createSlice as cl}from"https://cdn.jsdelivr.net/npm/@reduxjs/toolkit@2.2.1/+esm";import{authToken as Lv,authSlice as Pv}from"https://cdn.jsdelivr.net/npm/@wellesley/auth@1.0.847";import{cn as gr,Button as Fa,Dialog as Zv,DialogContent as Mv,Form as $v,FormField as Cc,FormItem as Tc,FormLabel as Nc,FormControl as Oc,Input as Rc,FormMessage as Lc,ButtonLoader as qa,Avatar as ll,AvatarImage as fl,AvatarFallback as dl,Carousel as Dv,CarouselContent as Wv,CarouselItem as Uv,CarouselPrevious as zv,CarouselNext as Bv,AlertDialog as Vv,AlertDialogContent as Fv,AlertDialogHeader as qv,AlertDialogTitle as Gv,AlertDialogDescription as Jv,AlertDialogFooter as Yv,AlertDialogCancel as Qv,AlertDialogAction as Kv,TooltipWrapper as Hv}from"https://cdn.jsdelivr.net/npm/@wellesley/ui@1.0.753";import{get as Da,set as Ta,appendErrors as Xv,useForm as ey}from"https://cdn.jsdelivr.net/npm/react-hook-form@7.51.0/+esm";import{getStore as ty}from"https://cdn.jsdelivr.net/npm/@wellesley/store@1.0.790";import{getErrorByStatusCode as ry}from"https://cdn.jsdelivr.net/npm/@wellesley/error-kit@1.0.640";import{useNavigate as ny,useParams as iy}from"https://cdn.jsdelivr.net/npm/react-router-dom@6.22.2/+esm";const b1=()=>{const e=Hi(jv.selectors.selectCurrentUser),t=`@${null==e?void 0:e.username}`,n={$root:"/","$user-post":Xi("/:username/posts/:postId",{username:t}),$user:Xi("/:username/profile/:tab?",{username:t})};return{getMappedRoute:nt((({id:e,manifest:{routes:t}})=>{var r;const i=null==(r=t.find((e=>!!e.entryPointFor)))?void 0:r.path,a=`/${e}`;return i&&i.startsWith("$")?n[i]||a:i||a}),[])}},us=()=>"object"!=typeof window,hl=()=>ml()?location.hostname:location.hostname.replace(/\w\w\w\.|^/,"."),pl=e=>{const t=new Date;return t.setTime(t.getTime()+24*e*60*60*1e3),t.toUTCString()},gl=e=>Object.keys(e).reduce(((t,n)=>`${t}${n}${!0===e[n]?"":`=${e[n]}`};`),""),sy=(e,t)=>{const n=us()?"":document.cookie,r=`; ${t||n}`.split(`; ${e}=`);if(2===r.length)return(r.pop()||"").replace("=","").split(";").shift()},ay=(e,t)=>{us()||(document.cookie=gl({[e]:"",path:"/",domain:t||hl(),expires:"Thu, 01 Jan 1970 00:00:01 GMT"}))},oy=["localhost","127.0.0.1","dev.localtest.me","wellesleydev.localtest.me"],ml=()=>oy.includes(location.hostname),uy=(e,t="",n=10,r)=>{us()||(document.cookie=gl({[e]:t,path:"/",domain:r||hl(),expires:pl(n),...!ml()&&{SameSite:"None",Secure:!0}}))},Vn={set:uy,remove:ay,get:sy,getExpireDate:pl},cy="lastAppFor",_l=(e="global")=>`${cy}:${e}`,ly=({link:e,username:t,groupname:n})=>{const r=_l(n||t||"global");Vn.set(r,e,1/24)},Pc=({username:e,groupname:t})=>{const n=_l(t||e||"global");return Vn.get(n)};var Zc,Gi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Sn={exports:{}},fy=Sn.exports;
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Lodash <https://lodash.com/>
|
|
@@ -33,10 +33,10 @@ import Sv,{useCallback as nt,forwardRef as ol,createElement as $a,useEffect as o
|
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the ISC license.
|
|
35
35
|
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const by=ol((({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:s,...o},u)=>$a("svg",{ref:u,...xy,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:vl("lucide",i),...o},[...s.map((([e,t])=>$a(e,t))),...Array.isArray(a)?a:[a]]))),Ga=(e,t)=>{const n=ol((({className:n,...r},i)=>$a(by,{ref:i,iconNode:t,className:vl(`lucide-${yy(e)}`,n),...r})));return n.displayName=`${e}`,n},wy=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],ky=Ga("ArrowLeft",wy),Ay=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Sy=Ga("LoaderCircle",Ay),jy=[["path",{d:"M4 11a9 9 0 0 1 9 9",key:"pv89mb"}],["path",{d:"M4 4a16 16 0 0 1 16 16",key:"k0647b"}],["circle",{cx:"5",cy:"19",r:"1",key:"bfqh0e"}]],Iy=Ga("Rss",jy),Ey={404:{user:{title:"Oops! We can’t find that page",description:"This page isn’t available. It may have been removed or you don’t have permission to view it",links:[{text:"Go to feed",link:"/feed",icon:j.jsx(Iy,{size:20,color:"white"})},{text:"Discover groups",link:"/discover"}]}},500:{user:{title:"Oops, something went wrong!",description:'We are already on it. Please try again later or contact us at <a href="mailto:support@wave.video">support@wave.video</a>'}},user404:{user:{title:"We could not find the user you were looking for",description:"Check the username and try one more time",links:[{text:"Wellsley account",link:"/account"},{text:"account settings",link:"/account/settings"}]}},group404:{user:{title:"Oops! We can't find that page",description:"This page isn’t available. It may have been removed or you don’t have permission to view it",links:[{text:"Go to group",link:"/discover"}]}},groupHidden:{user:{title:"This is a hidden private group",description:"Access is restricted — you can join only via a direct invitation link from the owner"}},page404:{user:{title:"We could not find the page you were looking for",description:"Check the address and try one more time"}},post404:{user:{title:"We could not find the post you were looking for",description:"Check the address and try one more time"}},RBACInsufficientPermissions:{user:{title:"You don't have permission to perform this action",description:"Please contact the administrator to get access"}}},Cy=404,Za=(e=Cy,t=!0)=>{const n=Ey[e],r=null==n?void 0:n.user;return t?r:n.guest||r},Ty=e=>{var t,n,r,i;if(!e)return Za(500).description;if(Qi.isString(e))return e;if("data"in e&&Qi.isString(e.data))return e.data;if("data"in e&&null!=(t=e.data)&&t.errorCode)return null==(n=e.data)?void 0:n.message;if("isUnhandledError"in e&&!e.isUnhandledError){const{status:t,data:n}=null==e?void 0:e.error;return(Qi.isString(n)?n:null==n?void 0:n.message)||(null==(r=Za(t||500))?void 0:r.description)}return"message"in e&&e.message?e.message:"error"in e?e.error:"status"in e?null==(i=Za(e.status))?void 0:i.description:void 0},ct=async(e,t,n)=>{try{return await e,t&&Ec.success(t),e}catch(e){Ec.error(`${Ty(e)}`)}},Ny=Nv.enhanceEndpoints({endpoints:{getApiV1GroupsByGroupIdChannels:{providesTags:["Group_Channels"],async onQueryStarted(e,{queryFulfilled:t}){await ct(t)}},postApiV1Apps:{invalidatesTags:["Admin_Apps","Secure"],async onQueryStarted(e,{queryFulfilled:t}){await ct(t)}},getApiV1GroupsByGroupIdApps:{providesTags:(e,t,n)=>[{type:"Group_Apps",id:n.groupId}],keepUnusedDataFor:300,async onQueryStarted(e,{queryFulfilled:t}){await ct(t)}},getApiV1AppsUser:{providesTags:["User_Apps","Secure"],async onQueryStarted(e,{queryFulfilled:t}){await ct(t)}},putApiV1AppsUserByAppId:{invalidatesTags:["User_Apps"],async onQueryStarted(e,{queryFulfilled:t}){await ct(t)}},putApiV1GroupsByGroupIdAppsAndAppId:{invalidatesTags:["User_Apps"],async onQueryStarted(e,{queryFulfilled:t}){await ct(t)}},getApiV1Apps:{providesTags:["User_Apps","Secure"],async onQueryStarted(e,{queryFulfilled:t}){await ct(t)}},deleteApiV1GroupsByGroupIdAppsAndAppId:{invalidatesTags:["Group_Apps"],async onQueryStarted(e,{queryFulfilled:t}){await ct(t)}},deleteApiV1AppsUserByAppId:{invalidatesTags:["User_Apps"],async onQueryStarted(e,{queryFulfilled:t}){await ct(t)}},deleteApiV1AppsByAppId:{invalidatesTags:["Admin_Apps","Secure"],async onQueryStarted(e,{queryFulfilled:t}){await ct(t)}},getApiV1AppsInstalled:{providesTags:["Admin_Apps","Secure"],async onQueryStarted(e,{queryFulfilled:t}){await ct(t)}}}}),{useLazyGetApiV1GroupsByGroupIdChannelsQuery:Oy,usePutApiV1GroupsByGroupIdAppsAndAppIdMutation:w1,useGetApiV1GroupsByGroupIdAppsQuery:k1,useLazyGetApiV1GroupsByGroupIdAppsQuery:Ry,useDeleteApiV1AppsUserByAppIdMutation:A1,usePutApiV1AppsUserByAppIdMutation:S1,useGetApiV1AppsQuery:j1,useGetApiV1AppsUserQuery:I1,useGetApiV1AppsInstalledQuery:E1,usePostApiV1AppsMutation:C1,useDeleteApiV1AppsByAppIdMutation:Ly,useLazyGetApiV1AppsUserQuery:Py,useLazyGetApiV1AppsQuery:Zy}=Ny,My=({groupName:e,channel:t,type:n="profile",tab:r=""})=>Xi("settings"===n?"/g/:groupname/:channelname/settings/:tab?":"/g/:groupname/:channelname/:tab?",{groupname:e,channelname:`@${t.groupUserName}`,tab:r}),$y=()=>{const[e]=Oy({}),t=nt((async t=>{const n=await e({groupId:t},!0).unwrap();return null==n?void 0:n.find((e=>e.groupMain))}),[e]);return{getDefaultChannelLink:nt((async({groupId:e,groupName:n,defaultChannel:r})=>{const i=r??await t(e);return i?My({groupName:n,channel:{groupUserName:i.groupUserName}}):null}),[e,t])}},Dy=e=>{if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)},Wy=e=>Dy(e)&&"type"in e&&"string"==typeof e.type,
|
|
36
|
+
*/const by=ol((({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:s,...o},u)=>$a("svg",{ref:u,...xy,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:vl("lucide",i),...o},[...s.map((([e,t])=>$a(e,t))),...Array.isArray(a)?a:[a]]))),Ga=(e,t)=>{const n=ol((({className:n,...r},i)=>$a(by,{ref:i,iconNode:t,className:vl(`lucide-${yy(e)}`,n),...r})));return n.displayName=`${e}`,n},wy=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],ky=Ga("ArrowLeft",wy),Ay=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Sy=Ga("LoaderCircle",Ay),jy=[["path",{d:"M4 11a9 9 0 0 1 9 9",key:"pv89mb"}],["path",{d:"M4 4a16 16 0 0 1 16 16",key:"k0647b"}],["circle",{cx:"5",cy:"19",r:"1",key:"bfqh0e"}]],Iy=Ga("Rss",jy),Ey={404:{user:{title:"Oops! We can’t find that page",description:"This page isn’t available. It may have been removed or you don’t have permission to view it",links:[{text:"Go to feed",link:"/feed",icon:j.jsx(Iy,{size:20,color:"white"})},{text:"Discover groups",link:"/discover"}]}},500:{user:{title:"Oops, something went wrong!",description:'We are already on it. Please try again later or contact us at <a href="mailto:support@wave.video">support@wave.video</a>'}},user404:{user:{title:"We could not find the user you were looking for",description:"Check the username and try one more time",links:[{text:"Wellsley account",link:"/account"},{text:"account settings",link:"/account/settings"}]}},group404:{user:{title:"Oops! We can't find that page",description:"This page isn’t available. It may have been removed or you don’t have permission to view it",links:[{text:"Go to group",link:"/discover"}]}},groupHidden:{user:{title:"This is a hidden private group",description:"Access is restricted — you can join only via a direct invitation link from the owner"}},page404:{user:{title:"We could not find the page you were looking for",description:"Check the address and try one more time"}},post404:{user:{title:"We could not find the post you were looking for",description:"Check the address and try one more time"}},RBACInsufficientPermissions:{user:{title:"You don't have permission to perform this action",description:"Please contact the administrator to get access"}}},Cy=404,Za=(e=Cy,t=!0)=>{const n=Ey[e],r=null==n?void 0:n.user;return t?r:n.guest||r},Ty=e=>{var t,n,r,i;if(!e)return Za(500).description;if(Qi.isString(e))return e;if("data"in e&&Qi.isString(e.data))return e.data;if("data"in e&&null!=(t=e.data)&&t.errorCode)return null==(n=e.data)?void 0:n.message;if("isUnhandledError"in e&&!e.isUnhandledError){const{status:t,data:n}=null==e?void 0:e.error;return(Qi.isString(n)?n:null==n?void 0:n.message)||(null==(r=Za(t||500))?void 0:r.description)}return"message"in e&&e.message?e.message:"error"in e?e.error:"status"in e?null==(i=Za(e.status))?void 0:i.description:void 0},ct=async(e,t,n)=>{try{return await e,t&&Ec.success(t),e}catch(e){Ec.error(`${Ty(e)}`)}},Ny=Nv.enhanceEndpoints({endpoints:{getApiV1GroupsByGroupIdChannels:{providesTags:["Group_Channels"],async onQueryStarted(e,{queryFulfilled:t}){await ct(t)}},postApiV1Apps:{invalidatesTags:["Admin_Apps","Secure"],async onQueryStarted(e,{queryFulfilled:t}){await ct(t)}},getApiV1GroupsByGroupIdApps:{providesTags:(e,t,n)=>[{type:"Group_Apps",id:n.groupId}],keepUnusedDataFor:300,async onQueryStarted(e,{queryFulfilled:t}){await ct(t)}},getApiV1AppsUser:{providesTags:["User_Apps","Secure"],async onQueryStarted(e,{queryFulfilled:t}){await ct(t)}},putApiV1AppsUserByAppId:{invalidatesTags:["User_Apps"],async onQueryStarted(e,{queryFulfilled:t}){await ct(t)}},putApiV1GroupsByGroupIdAppsAndAppId:{invalidatesTags:["User_Apps"],async onQueryStarted(e,{queryFulfilled:t}){await ct(t)}},getApiV1Apps:{providesTags:["User_Apps","Secure"],async onQueryStarted(e,{queryFulfilled:t}){await ct(t)}},deleteApiV1GroupsByGroupIdAppsAndAppId:{invalidatesTags:["Group_Apps"],async onQueryStarted(e,{queryFulfilled:t}){await ct(t)}},deleteApiV1AppsUserByAppId:{invalidatesTags:["User_Apps"],async onQueryStarted(e,{queryFulfilled:t}){await ct(t)}},deleteApiV1AppsByAppId:{invalidatesTags:["Admin_Apps","Secure"],async onQueryStarted(e,{queryFulfilled:t}){await ct(t)}},getApiV1AppsInstalled:{providesTags:["Admin_Apps","Secure"],async onQueryStarted(e,{queryFulfilled:t}){await ct(t)}}}}),{useLazyGetApiV1GroupsByGroupIdChannelsQuery:Oy,usePutApiV1GroupsByGroupIdAppsAndAppIdMutation:w1,useGetApiV1GroupsByGroupIdAppsQuery:k1,useLazyGetApiV1GroupsByGroupIdAppsQuery:Ry,useDeleteApiV1AppsUserByAppIdMutation:A1,usePutApiV1AppsUserByAppIdMutation:S1,useGetApiV1AppsQuery:j1,useGetApiV1AppsUserQuery:I1,useGetApiV1AppsInstalledQuery:E1,usePostApiV1AppsMutation:C1,useDeleteApiV1AppsByAppIdMutation:Ly,useLazyGetApiV1AppsUserQuery:Py,useLazyGetApiV1AppsQuery:Zy}=Ny,My=({groupName:e,channel:t,type:n="profile",tab:r=""})=>Xi("settings"===n?"/g/:groupname/:channelname/settings/:tab?":"/g/:groupname/:channelname/:tab?",{groupname:e,channelname:`@${t.groupUserName}`,tab:r}),$y=()=>{const[e]=Oy({}),t=nt((async t=>{const n=await e({groupId:t},!0).unwrap();return null==n?void 0:n.find((e=>e.groupMain))}),[e]);return{getDefaultChannelLink:nt((async({groupId:e,groupName:n,defaultChannel:r})=>{const i=r??await t(e);return i?My({groupName:n,channel:{groupUserName:i.groupUserName}}):null}),[e,t])}},Dy=e=>{if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)},Wy=e=>Dy(e)&&"type"in e&&"string"==typeof e.type,re=e=>{const t=t=>({type:e,payload:t});return t.toString=()=>`${e}`,t.type=e,t.match=t=>Wy(t)&&t.type===e,t};
|
|
37
37
|
/**
|
|
38
38
|
* @license lucide-react v0.471.2 - ISC
|
|
39
39
|
*
|
|
40
40
|
* This source code is licensed under the ISC license.
|
|
41
41
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/ie("remoteReady");const Uy=ie("askLogin");ie("reselectUser"),ie("requestLogout"),ie("setConfirmLeavePage"),ie("requestChangePath"),ie("wsSubscribe"),ie("wsUnSubscribe"),ie("hostStoreConnect"),ie("remoteLogin"),ie("remoteLogout"),ie("wsOnMessage"),ie("setRouterPath"),ie("setDeviceType"),ie("setDeviceWidth");const zy=ie("setUserError"),By=ie("setUserIsError"),Vy=ie("setUserPending"),Fy=ie("setUserSuccess"),qy=ie("setUserData"),Gy=ie("updateAccountData"),Jy=ie("updateUser");ie("addNotification"),ie("markNotification"),ie("setNotificationsError"),ie("setNotificationsList"),ie("setNotificationsPending"),ie("setNotificationsTotalCount"),ie("setNotificationsUnreadCount"),ie("resetNotificationsState"),ie("undoNotification"),ie("setInstanceInfo"),ie("setInstanceInfoPending"),ie("setInstanceInfoError"),ie("setPlatformSettings"),ie("setProfileSettings"),ie("setGroupData"),ie("setGroupLoading"),ul("requestMicroFrontendFetch"),ul("sendMicroFrontendFetchResponse");const Bc={data:null,isError:!1,isPending:!1,isSuccess:!1},yl=cl({name:"user",initialState:Bc,reducers:{reset:e=>{Object.assign(e,Bc)}},extraReducers:e=>{e.addCase(qy,((e,{payload:t})=>{e.data=t})).addCase(Gy,((e,{payload:t})=>{e.data&&Object.assign(e.data,t||{})})).addCase(Fy,((e,{payload:t})=>{e.isSuccess=t})).addCase(Vy,((e,{payload:t})=>{e.isPending=t})).addCase(By,((e,{payload:t})=>{e.isError=t})).addCase(zy,((e,{payload:t})=>{e.error=t})).addCase(Jy,((e,{payload:t})=>{var n;null!=(n=e.data)&&n.users&&(e.data.users=e.data.users.map((e=>t.id===e.id?t:e)))}))},selectors:{selectIsError:e=>e.isError,selectError:e=>e.error,selectPending:e=>e.isPending,selectData:e=>e.data,selectAccount:e=>{var t;return null==(t=e.data)?void 0:t.account},selectAccountId:e=>{var t;return null==(t=e.data)?void 0:t.account.id},selectUsers:e=>{var t;return null==(t=e.data)?void 0:t.users},selectUserById:(e,t)=>{var n;return null==(n=e.data)?void 0:n.users.find((({id:e})=>e===t))},selectCurrentUser:e=>{var t;return null==(t=e.data)?void 0:t.users.find((({id:t})=>{var n;return t===(null==(n=e.data)?void 0:n.selectedUserId)}))},selectSelectedUserId:e=>{var t;return null==(t=e.data)?void 0:t.selectedUserId},selectSuccess:e=>e.isSuccess}}),Yy=({entryPoint:e})=>{const t=Hi(yl.selectors.selectCurrentUser),n=(null==t?void 0:t.username)||void 0;return nt(((t,r)=>Cv({id:t.id,routes:t.manifest.routes,username:n,groupname:r||void 0,entryPoint:e})),[e,n])},Qy=()=>{const[e]=Py(),[t]=Zy();return nt((async()=>Lv.hasToken()?e().unwrap():t().unwrap()),[e,t])},Ky=({entryPoint:e})=>{const t=Yy({entryPoint:e}),n=Qy(),[r]=Ry({}),i=nt((async e=>e?await r({groupId:e},!0).unwrap():[]),[r]);return{getDefaultAppLink:nt((async({defaultApp:r,groupName:a,groupId:s})=>{const o=r??("USER"===e?await n():await i(s))[0];return t(o,a)}),[t,n,e,i])}},T1=({link:e,username:t,groupname:n,isActive:r})=>{os((()=>{r&&ly({link:e,username:t,groupname:n})}),[r,e,t,n])},Hy=({entryPoint:e})=>{const t=Tv(),{getDefaultChannelLink:n}=$y(),{getDefaultAppLink:r}=Ky({entryPoint:e}),i=nt((async({username:e,groupId:t,defaultApp:i,groupName:a,defaultChannel:s})=>Pc({username:e,groupname:a})||t&&await n({groupId:t,groupName:a,defaultChannel:s})||await r({groupId:t,groupName:a,defaultApp:i})),[Pc,n,r]);return{openLastApp:nt((async({queryParams:e,...n})=>{const r=await i(n);r&&t(r,{queryParams:e})}),[t,i]),getLastAppLink:i}},Ji=({title:e,value:t})=>j.jsxs("div",{className:"flex h-5 justify-between text-sm even:bg-gray-50",children:[j.jsx("div",{className:"text-gray-500",children:e}),j.jsx("div",{className:"text-gray-900",children:t})]}),N1=({version:e,updatedAt:t,dateInstalled:n,visibility:r})=>j.jsxs("div",{className:"w-full",children:[j.jsx(Ji,{title:"Version",value:e}),j.jsx(Ji,{title:"Date installed",value:n}),j.jsx(Ji,{title:"Visibility",value:r}),j.jsx(Ji,{title:"Last updated",value:t})]}),Xy=({className:e})=>j.jsx(Sy,{className:gr("animate-spin",e)}),En="8.48.0",Pt=globalThis;function Ja(e,t,n){const r=Pt,i=r.__SENTRY__=r.__SENTRY__||{},a=i[En]=i[En]||{};return a[e]||(a[e]=t())}const xl=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,e0="Sentry Logger ",Vc=["debug","info","warn","error","log","assert","trace"],Fc={};function t0(e){if(!("console"in Pt))return e();const t=Pt.console,n={},r=Object.keys(Fc);r.forEach((e=>{const r=Fc[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}function r0(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return xl?Vc.forEach((n=>{t[n]=(...t)=>{e&&t0((()=>{Pt.console[n](`${e0}[${n}]:`,...t)}))}})):Vc.forEach((e=>{t[e]=()=>{}})),t}const Ki=Ja("logger",r0);function Ya(){return Qa(Pt),Pt}function Qa(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||En,t[En]=t[En]||{}}const n0=Object.prototype.toString;function i0(e,t){return n0.call(e)===`[object ${t}]`}function s0(e){return i0(e,"Object")}function a0(e){return!(!e||!e.then||"function"!=typeof e.then)}function o0(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{xl&&Ki.log(`Failed to add non-enumerable property "${t}" to object`,e)}}const bl=1e3;function wl(){return Date.now()/bl}function u0(){const{performance:e}=Pt;if(!e||!e.now)return wl;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/bl}const c0=u0();function Ur(){const e=Pt,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return"10000000100040008000100000000000".replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function l0(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||c0(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Ur()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function qc(){return Ur()}function Gc(){return Ur().substring(16)}function kl(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&t&&0===Object.keys(t).length)return e;const r={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=kl(r[e],t[e],n-1));return r}(()=>{const{performance:e}=Pt;if(!e||!e.now)return;const t=36e5,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,a=i<t,s=e.timing&&e.timing.navigationStart,o="number"==typeof s?Math.abs(s+n-r):t;(a||o<t)&&(i<=o&&e.timeOrigin)})();const Wa="_sentrySpan";function Jc(e,t){t?o0(e,Wa,t):delete e[Wa]}function Yc(e){return e[Wa]}const f0=100;class Ka{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:qc(),spanId:Gc()}}clone(){const e=new Ka;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,Jc(e,Yc(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&l0(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,[n,r]=t instanceof Cn?[t.getScopeData(),t.getRequestSession()]:s0(t)?[e,e.requestSession]:[],{tags:i,extra:a,user:s,contexts:o,level:u,fingerprint:c=[],propagationContext:l}=n||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...o},s&&Object.keys(s).length&&(this._user=s),u&&(this._level=u),c.length&&(this._fingerprint=c),l&&(this._propagationContext=l),r&&(this._requestSession=r),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,Jc(this,void 0),this._attachments=[],this.setPropagationContext({traceId:qc()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:f0;if(n<=0)return this;const r={timestamp:wl(),...e},i=this._breadcrumbs;return i.push(r),this._breadcrumbs=i.length>n?i.slice(-n):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Yc(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=kl(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:Gc(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:Ur();if(!this._client)return Ki.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n&&n.event_id?n.event_id:Ur();if(!this._client)return Ki.warn("No client configured on scope - will not capture message!"),r;const i=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:Ur();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(Ki.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}const Cn=Ka;function d0(){return Ja("defaultCurrentScope",(()=>new Cn))}function h0(){return Ja("defaultIsolationScope",(()=>new Cn))}class p0{constructor(e,t){let n,r;n=e||new Cn,r=t||new Cn,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return a0(n)?n.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function Br(){const e=Qa(Ya());return e.stack=e.stack||new p0(d0(),h0())}function g0(e){return Br().withScope(e)}function m0(e,t){const n=Br();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function Qc(e){return Br().withScope((()=>e(Br().getIsolationScope())))}function _0(){return{withIsolationScope:Qc,withScope:g0,withSetScope:m0,withSetIsolationScope:(e,t)=>Qc(t),getCurrentScope:()=>Br().getScope(),getIsolationScope:()=>Br().getIsolationScope()}}function Al(e){const t=Qa(e);return t.acs?t.acs:_0()}function Sl(){return Al(Ya()).getCurrentScope()}function v0(){return Al(Ya()).getIsolationScope()}function y0(e,t){return Sl().captureException(e,void 0)}function x0(e,t){const n={captureContext:t};return Sl().captureMessage(e,void 0,n)}function b0(e,t){v0().setExtra(e,t)}const w0=(...e)=>{let t="";for(const n of e){if(n instanceof Error){const e=n;return b0("exceptionMessage",t),void y0(e)}if("object"!=typeof n)t+=n;else try{t+=" "+JSON.stringify(n)}catch{t+=" "+n}}x0(t)},k0="wlsy",jl=()=>{try{return window.localStorage}catch(e){console.warn("Error getting window.localStorage storage",e)}},A0=()=>{const e=new Set,t=jl();if(!t)return[];for(let n=0;n<(null==t?void 0:t.length);n+=1){const r=null==t?void 0:t.key(n);"string"==typeof r&&e.add(r)}return Array.from(e)},S0=e=>{const t=`${k0}`,n=e=>`${t}:${e}`,r=()=>A0().filter((e=>e.startsWith(`${t}:`))),i=e=>e.slice(t.length+1),a=jl(),s=e=>{try{return null==a?void 0:a.getItem(n(e))}catch{return null}},o=(e,t)=>{try{null==a||a.setItem(n(e),String(t))}catch{return}};return{getItem:s,setItem:o,removeItem:e=>{try{null==a||a.removeItem(n(e))}catch{return}},clear:()=>{try{r().forEach((e=>null==a?void 0:a.removeItem(e)))}catch{return}},keys:()=>r().map(i),has:e=>null!==s(e),getJSON:e=>{const t=s(e);if(null==t)return null;try{return JSON.parse(t)}catch{return null}},setJSON:(e,t)=>{try{o(e,JSON.stringify(t))}catch{return}}}},Kc=["debug","info","warn","error"],j0=(e,t)=>{const n=Kc.indexOf(e);return Kc.indexOf(t)>=n},Yi=(e,t,n,...r)=>{j0(t,e)&&console.log(`[${e}] ${n}`,...r)},I0=()=>S0().getItem("logger_lvl"),E0=(e=(us()?"info":I0()||"warn"))=>{let t=e;return{debug:(e,...n)=>Yi("debug",t,e,...n),info:(e,...n)=>Yi("info",t,e,...n),warn:(e,...n)=>Yi("warn",t,e,...n),error:(e,...n)=>(w0(e,...n),Yi("error",t,e,...n)),setLevel:e=>{t=e},getLevel:()=>t}},Ha=E0(),Il=(e=!1)=>{const[t,n]=hr(e);return[t,nt((()=>n(!0)),[]),nt((()=>n(!1)),[]),nt((()=>n((e=>!e))),[]),n]},C0=({children:e,className:t,onChange:n})=>j.jsxs(Fa,{as:"label",variant:"primary",className:t,children:[e,j.jsx("input",{multiple:!1,type:"file",accept:"image/png, image/jpeg",onChange:({target:e})=>{if(!e.files)return;const t=e.files[0];n({file:t,objectUrl:URL.createObjectURL(t)}),e.value=""},id:"inputFile",className:"hidden"})]});var se,Ua;!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},e.getValidEnumValues=t=>{const n=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),r={};for(const e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(const n of e)if(t(n))return n},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(se||(se={})),(Ua||(Ua={})).mergeShapes=(e,t)=>({...e,...t});const O=se.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Yt=e=>{switch(typeof e){case"undefined":return O.undefined;case"string":return O.string;case"number":return isNaN(e)?O.nan:O.number;case"boolean":return O.boolean;case"function":return O.function;case"bigint":return O.bigint;case"symbol":return O.symbol;case"object":return Array.isArray(e)?O.array:null===e?O.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?O.promise:typeof Map<"u"&&e instanceof Map?O.map:typeof Set<"u"&&e instanceof Set?O.set:typeof Date<"u"&&e instanceof Date?O.date:O.object;default:return O.unknown}},E=se.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"]),T0=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Je extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(const i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(r);else if("invalid_return_type"===i.code)r(i.returnTypeError);else if("invalid_arguments"===i.code)r(i.argumentsError);else if(0===i.path.length)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){const n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(e){if(!(e instanceof Je))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,se.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},n=[];for(const r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}Je.create=e=>new Je(e);const Vr=(e,t)=>{let n;switch(e.code){case E.invalid_type:n=e.received===O.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case E.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,se.jsonStringifyReplacer)}`;break;case E.unrecognized_keys:n=`Unrecognized key(s) in object: ${se.joinValues(e.keys,", ")}`;break;case E.invalid_union:n="Invalid input";break;case E.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${se.joinValues(e.options)}`;break;case E.invalid_enum_value:n=`Invalid enum value. Expected ${se.joinValues(e.options)}, received '${e.received}'`;break;case E.invalid_arguments:n="Invalid function arguments";break;case E.invalid_return_type:n="Invalid function return type";break;case E.invalid_date:n="Invalid date";break;case E.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:se.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case E.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case E.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case E.custom:n="Invalid input";break;case E.invalid_intersection_types:n="Intersection results could not be merged";break;case E.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case E.not_finite:n="Number must be finite";break;default:n=t.defaultError,se.assertNever(e)}return{message:n}};let El=Vr;function N0(e){El=e}function es(){return El}const ts=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],s={...i,path:a};if(void 0!==i.message)return{...i,path:a,message:i.message};let o="";const u=r.filter((e=>!!e)).slice().reverse();for(const e of u)o=e(s,{data:t,defaultError:o}).message;return{...i,path:a,message:o}},O0=[];function C(e,t){const n=es(),r=ts({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Vr?void 0:Vr].filter((e=>!!e))});e.common.issues.push(r)}class Ne{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const r of t){if("aborted"===r.status)return q;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const e of t){const t=await e.key,r=await e.value;n.push({key:t,value:r})}return Ne.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const r of t){const{key:t,value:i}=r;if("aborted"===t.status||"aborted"===i.status)return q;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"!==t.value&&(typeof i.value<"u"||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}}const q=Object.freeze({status:"aborted"}),Wr=e=>({status:"dirty",value:e}),Ze=e=>({status:"valid",value:e}),za=e=>"aborted"===e.status,Ba=e=>"dirty"===e.status,Tn=e=>"valid"===e.status,Nn=e=>typeof Promise<"u"&&e instanceof Promise;function rs(e,t,n,r){if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function Cl(e,t,n,r,i){if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var $,jn,In;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}($||($={}));class bt{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Hc=(e,t)=>{if(Tn(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new Je(e.common.issues);return this._error=t,this._error}}};function K(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:(t,i)=>{var a,s;const{message:o}=e;return"invalid_enum_value"===t.code?{message:o??i.defaultError}:typeof i.data>"u"?{message:null!==(a=o??r)&&void 0!==a?a:i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:null!==(s=o??n)&&void 0!==s?s:i.defaultError}},description:i}}class X{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return Yt(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Yt(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Ne,ctx:{common:e.parent.common,data:e.data,parsedType:Yt(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Nn(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Yt(e)},i=this._parseSync({data:e,path:r.path,parent:r});return Hc(r,i)}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Yt(e)},r=this._parse({data:e,path:n.path,parent:n}),i=await(Nn(r)?r:Promise.resolve(r));return Hc(n,i)}refine(e,t){const n=e=>"string"==typeof t||typeof t>"u"?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,r)=>{const i=e(t),a=()=>r.addIssue({code:E.custom,...n(t)});return typeof Promise<"u"&&i instanceof Promise?i.then((e=>!!e||(a(),!1))):!!i||(a(),!1)}))}refinement(e,t){return this._refinement(((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1)))}_refinement(e){return new dt({schema:this,typeName:F.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return xt.create(this,this._def)}nullable(){return Xt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ft.create(this,this._def)}promise(){return qr.create(this,this._def)}or(e){return Pn.create([this,e],this._def)}and(e){return Zn.create(this,e,this._def)}transform(e){return new dt({...K(this._def),schema:this,typeName:F.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Un({...K(this._def),innerType:this,defaultValue:t,typeName:F.ZodDefault})}brand(){return new Xa({typeName:F.ZodBranded,type:this,...K(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new zn({...K(this._def),innerType:this,catchValue:t,typeName:F.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Fn.create(this,e)}readonly(){return Bn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const R0=/^c[^\s-]{8,}$/i,L0=/^[0-9a-z]+$/,P0=/^[0-9A-HJKMNP-TV-Z]{26}$/,Z0=/^[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,M0=/^[a-z0-9_-]{21}$/i,$0=/^[-+]?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)?)??$/,D0=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,W0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ma;const U0=/^(?:(?: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])$/,z0=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,B0=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Tl="((\\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])))",V0=new RegExp(`^${Tl}$`);function Nl(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function F0(e){return new RegExp(`^${Nl(e)}$`)}function Ol(e){let t=`${Tl}T${Nl(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 q0(e,t){return!(("v4"!==t&&t||!U0.test(e))&&("v6"!==t&&t||!z0.test(e)))}class lt extends X{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==O.string){const t=this._getOrReturnCtx(e);return C(t,{code:E.invalid_type,expected:O.string,received:t.parsedType}),q}const t=new Ne;let n;for(const r of this._def.checks)if("min"===r.kind)e.data.length<r.value&&(n=this._getOrReturnCtx(e,n),C(n,{code:E.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),t.dirty());else if("max"===r.kind)e.data.length>r.value&&(n=this._getOrReturnCtx(e,n),C(n,{code:E.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),t.dirty());else if("length"===r.kind){const i=e.data.length>r.value,a=e.data.length<r.value;(i||a)&&(n=this._getOrReturnCtx(e,n),i?C(n,{code:E.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}):a&&C(n,{code:E.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if("email"===r.kind)D0.test(e.data)||(n=this._getOrReturnCtx(e,n),C(n,{validation:"email",code:E.invalid_string,message:r.message}),t.dirty());else if("emoji"===r.kind)Ma||(Ma=new RegExp(W0,"u")),Ma.test(e.data)||(n=this._getOrReturnCtx(e,n),C(n,{validation:"emoji",code:E.invalid_string,message:r.message}),t.dirty());else if("uuid"===r.kind)Z0.test(e.data)||(n=this._getOrReturnCtx(e,n),C(n,{validation:"uuid",code:E.invalid_string,message:r.message}),t.dirty());else if("nanoid"===r.kind)M0.test(e.data)||(n=this._getOrReturnCtx(e,n),C(n,{validation:"nanoid",code:E.invalid_string,message:r.message}),t.dirty());else if("cuid"===r.kind)R0.test(e.data)||(n=this._getOrReturnCtx(e,n),C(n,{validation:"cuid",code:E.invalid_string,message:r.message}),t.dirty());else if("cuid2"===r.kind)L0.test(e.data)||(n=this._getOrReturnCtx(e,n),C(n,{validation:"cuid2",code:E.invalid_string,message:r.message}),t.dirty());else if("ulid"===r.kind)P0.test(e.data)||(n=this._getOrReturnCtx(e,n),C(n,{validation:"ulid",code:E.invalid_string,message:r.message}),t.dirty());else if("url"===r.kind)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),C(n,{validation:"url",code:E.invalid_string,message:r.message}),t.dirty()}else"regex"===r.kind?(r.regex.lastIndex=0,r.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),C(n,{validation:"regex",code:E.invalid_string,message:r.message}),t.dirty())):"trim"===r.kind?e.data=e.data.trim():"includes"===r.kind?e.data.includes(r.value,r.position)||(n=this._getOrReturnCtx(e,n),C(n,{code:E.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty()):"toLowerCase"===r.kind?e.data=e.data.toLowerCase():"toUpperCase"===r.kind?e.data=e.data.toUpperCase():"startsWith"===r.kind?e.data.startsWith(r.value)||(n=this._getOrReturnCtx(e,n),C(n,{code:E.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty()):"endsWith"===r.kind?e.data.endsWith(r.value)||(n=this._getOrReturnCtx(e,n),C(n,{code:E.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty()):"datetime"===r.kind?Ol(r).test(e.data)||(n=this._getOrReturnCtx(e,n),C(n,{code:E.invalid_string,validation:"datetime",message:r.message}),t.dirty()):"date"===r.kind?V0.test(e.data)||(n=this._getOrReturnCtx(e,n),C(n,{code:E.invalid_string,validation:"date",message:r.message}),t.dirty()):"time"===r.kind?F0(r).test(e.data)||(n=this._getOrReturnCtx(e,n),C(n,{code:E.invalid_string,validation:"time",message:r.message}),t.dirty()):"duration"===r.kind?$0.test(e.data)||(n=this._getOrReturnCtx(e,n),C(n,{validation:"duration",code:E.invalid_string,message:r.message}),t.dirty()):"ip"===r.kind?q0(e.data,r.version)||(n=this._getOrReturnCtx(e,n),C(n,{validation:"ip",code:E.invalid_string,message:r.message}),t.dirty()):"base64"===r.kind?B0.test(e.data)||(n=this._getOrReturnCtx(e,n),C(n,{validation:"base64",code:E.invalid_string,message:r.message}),t.dirty()):se.assertNever(r);return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement((t=>e.test(t)),{validation:t,code:E.invalid_string,...$.errToObj(n)})}_addCheck(e){return new lt({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...$.errToObj(e)})}url(e){return this._addCheck({kind:"url",...$.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...$.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...$.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...$.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...$.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...$.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...$.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...$.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...$.errToObj(e)})}datetime(e){var t,n;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(null==e?void 0:e.precision)>"u"?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(n=null==e?void 0:e.local)&&void 0!==n&&n,...$.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(null==e?void 0:e.precision)>"u"?null:null==e?void 0:e.precision,...$.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...$.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...$.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...$.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...$.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...$.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...$.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...$.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...$.errToObj(t)})}nonempty(e){return this.min(1,$.errToObj(e))}trim(){return new lt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new lt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new lt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function G0(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r;return parseInt(e.toFixed(i).replace(".",""))%parseInt(t.toFixed(i).replace(".",""))/Math.pow(10,i)}lt.create=e=>{var t;return new lt({checks:[],typeName:F.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...K(e)})};class Qt extends X{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==O.number){const t=this._getOrReturnCtx(e);return C(t,{code:E.invalid_type,expected:O.number,received:t.parsedType}),q}let t;const n=new Ne;for(const r of this._def.checks)"int"===r.kind?se.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),C(t,{code:E.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty()):"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),C(t,{code:E.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),C(t,{code:E.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"multipleOf"===r.kind?0!==G0(e.data,r.value)&&(t=this._getOrReturnCtx(e,t),C(t,{code:E.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),C(t,{code:E.not_finite,message:r.message}),n.dirty()):se.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,$.toString(t))}gt(e,t){return this.setLimit("min",e,!1,$.toString(t))}lte(e,t){return this.setLimit("max",e,!0,$.toString(t))}lt(e,t){return this.setLimit("max",e,!1,$.toString(t))}setLimit(e,t,n,r){return new Qt({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:$.toString(r)}]})}_addCheck(e){return new Qt({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:$.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:$.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:$.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:$.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:$.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:$.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:$.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:$.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:$.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&se.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}Qt.create=e=>new Qt({checks:[],typeName:F.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...K(e)});class Kt extends X{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==O.bigint){const t=this._getOrReturnCtx(e);return C(t,{code:E.invalid_type,expected:O.bigint,received:t.parsedType}),q}let t;const n=new Ne;for(const r of this._def.checks)"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),C(t,{code:E.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),C(t,{code:E.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),C(t,{code:E.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):se.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,$.toString(t))}gt(e,t){return this.setLimit("min",e,!1,$.toString(t))}lte(e,t){return this.setLimit("max",e,!0,$.toString(t))}lt(e,t){return this.setLimit("max",e,!1,$.toString(t))}setLimit(e,t,n,r){return new Kt({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:$.toString(r)}]})}_addCheck(e){return new Kt({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:$.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:$.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:$.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:$.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:$.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}Kt.create=e=>{var t;return new Kt({checks:[],typeName:F.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...K(e)})};class On extends X{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==O.boolean){const t=this._getOrReturnCtx(e);return C(t,{code:E.invalid_type,expected:O.boolean,received:t.parsedType}),q}return Ze(e.data)}}On.create=e=>new On({typeName:F.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...K(e)});class mr extends X{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==O.date){const t=this._getOrReturnCtx(e);return C(t,{code:E.invalid_type,expected:O.date,received:t.parsedType}),q}if(isNaN(e.data.getTime())){return C(this._getOrReturnCtx(e),{code:E.invalid_date}),q}const t=new Ne;let n;for(const r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),C(n,{code:E.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),t.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),C(n,{code:E.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),t.dirty()):se.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new mr({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:$.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:$.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}mr.create=e=>new mr({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:F.ZodDate,...K(e)});class ns extends X{_parse(e){if(this._getType(e)!==O.symbol){const t=this._getOrReturnCtx(e);return C(t,{code:E.invalid_type,expected:O.symbol,received:t.parsedType}),q}return Ze(e.data)}}ns.create=e=>new ns({typeName:F.ZodSymbol,...K(e)});class Rn extends X{_parse(e){if(this._getType(e)!==O.undefined){const t=this._getOrReturnCtx(e);return C(t,{code:E.invalid_type,expected:O.undefined,received:t.parsedType}),q}return Ze(e.data)}}Rn.create=e=>new Rn({typeName:F.ZodUndefined,...K(e)});class Ln extends X{_parse(e){if(this._getType(e)!==O.null){const t=this._getOrReturnCtx(e);return C(t,{code:E.invalid_type,expected:O.null,received:t.parsedType}),q}return Ze(e.data)}}Ln.create=e=>new Ln({typeName:F.ZodNull,...K(e)});class Fr extends X{constructor(){super(...arguments),this._any=!0}_parse(e){return Ze(e.data)}}Fr.create=e=>new Fr({typeName:F.ZodAny,...K(e)});class pr extends X{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ze(e.data)}}pr.create=e=>new pr({typeName:F.ZodUnknown,...K(e)});class Zt extends X{_parse(e){const t=this._getOrReturnCtx(e);return C(t,{code:E.invalid_type,expected:O.never,received:t.parsedType}),q}}Zt.create=e=>new Zt({typeName:F.ZodNever,...K(e)});class is extends X{_parse(e){if(this._getType(e)!==O.undefined){const t=this._getOrReturnCtx(e);return C(t,{code:E.invalid_type,expected:O.void,received:t.parsedType}),q}return Ze(e.data)}}is.create=e=>new is({typeName:F.ZodVoid,...K(e)});class ft extends X{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==O.array)return C(t,{code:E.invalid_type,expected:O.array,received:t.parsedType}),q;if(null!==r.exactLength){const e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(C(t,{code:e?E.too_big:E.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(C(t,{code:E.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(C(t,{code:E.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map(((e,n)=>r.type._parseAsync(new bt(t,e,t.path,n))))).then((e=>Ne.mergeArray(n,e)));const i=[...t.data].map(((e,n)=>r.type._parseSync(new bt(t,e,t.path,n))));return Ne.mergeArray(n,i)}get element(){return this._def.type}min(e,t){return new ft({...this._def,minLength:{value:e,message:$.toString(t)}})}max(e,t){return new ft({...this._def,maxLength:{value:e,message:$.toString(t)}})}length(e,t){return new ft({...this._def,exactLength:{value:e,message:$.toString(t)}})}nonempty(e){return this.min(1,e)}}function Dr(e){if(e instanceof pe){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=xt.create(Dr(r))}return new pe({...e._def,shape:()=>t})}return e instanceof ft?new ft({...e._def,type:Dr(e.element)}):e instanceof xt?xt.create(Dr(e.unwrap())):e instanceof Xt?Xt.create(Dr(e.unwrap())):e instanceof wt?wt.create(e.items.map((e=>Dr(e)))):e}ft.create=(e,t)=>new ft({type:e,minLength:null,maxLength:null,exactLength:null,typeName:F.ZodArray,...K(t)});class pe extends X{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=se.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==O.object){const t=this._getOrReturnCtx(e);return C(t,{code:E.invalid_type,expected:O.object,received:t.parsedType}),q}const{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Zt&&"strip"===this._def.unknownKeys))for(const e in n.data)i.includes(e)||a.push(e);const s=[];for(const e of i){const t=r[e],i=n.data[e];s.push({key:{status:"valid",value:e},value:t._parse(new bt(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof Zt){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of a)s.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)a.length>0&&(C(n,{code:E.unrecognized_keys,keys:a}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of a){const r=n.data[t];s.push({key:{status:"valid",value:t},value:e._parse(new bt(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of s){const n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e})).then((e=>Ne.mergeObjectSync(t,e))):Ne.mergeObjectSync(t,s)}get shape(){return this._def.shape()}strict(e){return $.errToObj,new pe({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,i,a,s;const o=null!==(a=null===(i=(r=this._def).errorMap)||void 0===i?void 0:i.call(r,t,n).message)&&void 0!==a?a:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(s=$.errToObj(e).message)&&void 0!==s?s:o}:{message:o}}}:{}})}strip(){return new pe({...this._def,unknownKeys:"strip"})}passthrough(){return new pe({...this._def,unknownKeys:"passthrough"})}extend(e){return new pe({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new pe({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:F.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new pe({...this._def,catchall:e})}pick(e){const t={};return se.objectKeys(e).forEach((n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])})),new pe({...this._def,shape:()=>t})}omit(e){const t={};return se.objectKeys(this.shape).forEach((n=>{e[n]||(t[n]=this.shape[n])})),new pe({...this._def,shape:()=>t})}deepPartial(){return Dr(this)}partial(e){const t={};return se.objectKeys(this.shape).forEach((n=>{const r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()})),new pe({...this._def,shape:()=>t})}required(e){const t={};return se.objectKeys(this.shape).forEach((n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof xt;)e=e._def.innerType;t[n]=e}})),new pe({...this._def,shape:()=>t})}keyof(){return Rl(se.objectKeys(this.shape))}}pe.create=(e,t)=>new pe({shape:()=>e,unknownKeys:"strip",catchall:Zt.create(),typeName:F.ZodObject,...K(t)}),pe.strictCreate=(e,t)=>new pe({shape:()=>e,unknownKeys:"strict",catchall:Zt.create(),typeName:F.ZodObject,...K(t)}),pe.lazycreate=(e,t)=>new pe({shape:e,unknownKeys:"strip",catchall:Zt.create(),typeName:F.ZodObject,...K(t)});class Pn extends X{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map((async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;const n=e.map((e=>new Je(e.ctx.common.issues)));return C(t,{code:E.invalid_union,unionErrors:n}),q}));{let e;const r=[];for(const i of n){const n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if("valid"===a.status)return a;"dirty"===a.status&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const i=r.map((e=>new Je(e)));return C(t,{code:E.invalid_union,unionErrors:i}),q}}get options(){return this._def.options}}Pn.create=(e,t)=>new Pn({options:e,typeName:F.ZodUnion,...K(t)});const Lt=e=>e instanceof $n?Lt(e.schema):e instanceof dt?Lt(e.innerType()):e instanceof Dn?[e.value]:e instanceof Ht?e.options:e instanceof Wn?se.objectValues(e.enum):e instanceof Un?Lt(e._def.innerType):e instanceof Rn?[void 0]:e instanceof Ln?[null]:e instanceof xt?[void 0,...Lt(e.unwrap())]:e instanceof Xt?[null,...Lt(e.unwrap())]:e instanceof Xa||e instanceof Bn?Lt(e.unwrap()):e instanceof zn?Lt(e._def.innerType):[];class cs extends X{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==O.object)return C(t,{code:E.invalid_type,expected:O.object,received:t.parsedType}),q;const n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(C(t,{code:E.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),q)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const r=new Map;for(const n of t){const t=Lt(n.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const i of t){if(r.has(i))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);r.set(i,n)}}return new cs({typeName:F.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...K(n)})}}function Va(e,t){const n=Yt(e),r=Yt(t);if(e===t)return{valid:!0,data:e};if(n===O.object&&r===O.object){const n=se.objectKeys(t),r=se.objectKeys(e).filter((e=>-1!==n.indexOf(e))),i={...e,...t};for(const n of r){const r=Va(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}if(n===O.array&&r===O.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let r=0;r<e.length;r++){const i=Va(e[r],t[r]);if(!i.valid)return{valid:!1};n.push(i.data)}return{valid:!0,data:n}}return n===O.date&&r===O.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Zn extends X{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(za(e)||za(r))return q;const i=Va(e.value,r.value);return i.valid?((Ba(e)||Ba(r))&&t.dirty(),{status:t.value,value:i.data}):(C(n,{code:E.invalid_intersection_types}),q)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then((([e,t])=>r(e,t))):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Zn.create=(e,t,n)=>new Zn({left:e,right:t,typeName:F.ZodIntersection,...K(n)});class wt extends X{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==O.array)return C(n,{code:E.invalid_type,expected:O.array,received:n.parsedType}),q;if(n.data.length<this._def.items.length)return C(n,{code:E.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),q;!this._def.rest&&n.data.length>this._def.items.length&&(C(n,{code:E.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...n.data].map(((e,t)=>{const r=this._def.items[t]||this._def.rest;return r?r._parse(new bt(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(r).then((e=>Ne.mergeArray(t,e))):Ne.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new wt({...this._def,rest:e})}}wt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new wt({items:e,typeName:F.ZodTuple,rest:null,...K(t)})};class Mn extends X{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==O.object)return C(n,{code:E.invalid_type,expected:O.object,received:n.parsedType}),q;const r=[],i=this._def.keyType,a=this._def.valueType;for(const e in n.data)r.push({key:i._parse(new bt(n,e,n.path,e)),value:a._parse(new bt(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?Ne.mergeObjectAsync(t,r):Ne.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,n){return new Mn(t instanceof X?{keyType:e,valueType:t,typeName:F.ZodRecord,...K(n)}:{keyType:lt.create(),valueType:e,typeName:F.ZodRecord,...K(t)})}}class ss extends X{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==O.map)return C(n,{code:E.invalid_type,expected:O.map,received:n.parsedType}),q;const r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map((([e,t],a)=>({key:r._parse(new bt(n,e,n.path,[a,"key"])),value:i._parse(new bt(n,t,n.path,[a,"value"]))})));if(n.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const n of a){const r=await n.key,i=await n.value;if("aborted"===r.status||"aborted"===i.status)return q;("dirty"===r.status||"dirty"===i.status)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const n of a){const r=n.key,i=n.value;if("aborted"===r.status||"aborted"===i.status)return q;("dirty"===r.status||"dirty"===i.status)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}}ss.create=(e,t,n)=>new ss({valueType:t,keyType:e,typeName:F.ZodMap,...K(n)});class _r extends X{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==O.set)return C(n,{code:E.invalid_type,expected:O.set,received:n.parsedType}),q;const r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(C(n,{code:E.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&(C(n,{code:E.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());const i=this._def.valueType;function a(e){const n=new Set;for(const r of e){if("aborted"===r.status)return q;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}const s=[...n.data.values()].map(((e,t)=>i._parse(new bt(n,e,n.path,t))));return n.common.async?Promise.all(s).then((e=>a(e))):a(s)}min(e,t){return new _r({...this._def,minSize:{value:e,message:$.toString(t)}})}max(e,t){return new _r({...this._def,maxSize:{value:e,message:$.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}_r.create=(e,t)=>new _r({valueType:e,minSize:null,maxSize:null,typeName:F.ZodSet,...K(t)});class zr extends X{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==O.function)return C(t,{code:E.invalid_type,expected:O.function,received:t.parsedType}),q;function n(e,n){return ts({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,es(),Vr].filter((e=>!!e)),issueData:{code:E.invalid_arguments,argumentsError:n}})}function r(e,n){return ts({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,es(),Vr].filter((e=>!!e)),issueData:{code:E.invalid_return_type,returnTypeError:n}})}const i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof qr){const e=this;return Ze((async function(...t){const s=new Je([]),o=await e._def.args.parseAsync(t,i).catch((e=>{throw s.addIssue(n(t,e)),s})),u=await Reflect.apply(a,this,o);return await e._def.returns._def.type.parseAsync(u,i).catch((e=>{throw s.addIssue(r(u,e)),s}))}))}{const e=this;return Ze((function(...t){const s=e._def.args.safeParse(t,i);if(!s.success)throw new Je([n(t,s.error)]);const o=Reflect.apply(a,this,s.data),u=e._def.returns.safeParse(o,i);if(!u.success)throw new Je([r(o,u.error)]);return u.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new zr({...this._def,args:wt.create(e).rest(pr.create())})}returns(e){return new zr({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new zr({args:e||wt.create([]).rest(pr.create()),returns:t||pr.create(),typeName:F.ZodFunction,...K(n)})}}class $n extends X{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}$n.create=(e,t)=>new $n({getter:e,typeName:F.ZodLazy,...K(t)});class Dn extends X{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return C(t,{received:t.data,code:E.invalid_literal,expected:this._def.value}),q}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Rl(e,t){return new Ht({values:e,typeName:F.ZodEnum,...K(t)})}Dn.create=(e,t)=>new Dn({value:e,typeName:F.ZodLiteral,...K(t)});class Ht extends X{constructor(){super(...arguments),jn.set(this,void 0)}_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return C(t,{expected:se.joinValues(n),received:t.parsedType,code:E.invalid_type}),q}if(rs(this,jn)||Cl(this,jn,new Set(this._def.values)),!rs(this,jn).has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return C(t,{received:t.data,code:E.invalid_enum_value,options:n}),q}return Ze(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Ht.create(e,{...this._def,...t})}exclude(e,t=this._def){return Ht.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}jn=new WeakMap,Ht.create=Rl;class Wn extends X{constructor(){super(...arguments),In.set(this,void 0)}_parse(e){const t=se.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==O.string&&n.parsedType!==O.number){const e=se.objectValues(t);return C(n,{expected:se.joinValues(e),received:n.parsedType,code:E.invalid_type}),q}if(rs(this,In)||Cl(this,In,new Set(se.getValidEnumValues(this._def.values))),!rs(this,In).has(e.data)){const e=se.objectValues(t);return C(n,{received:n.data,code:E.invalid_enum_value,options:e}),q}return Ze(e.data)}get enum(){return this._def.values}}In=new WeakMap,Wn.create=(e,t)=>new Wn({values:e,typeName:F.ZodNativeEnum,...K(t)});class qr extends X{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==O.promise&&!1===t.common.async)return C(t,{code:E.invalid_type,expected:O.promise,received:t.parsedType}),q;const n=t.parsedType===O.promise?t.data:Promise.resolve(t.data);return Ze(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}qr.create=(e,t)=>new qr({type:e,typeName:F.ZodPromise,...K(t)});class dt extends X{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===F.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{C(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===r.type){const e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return q;const r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?q:"dirty"===r.status||"dirty"===t.value?Wr(r.value):r}));{if("aborted"===t.value)return q;const r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?q:"dirty"===r.status||"dirty"===t.value?Wr(r.value):r}}if("refinement"===r.type){const e=e=>{const t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?q:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((n=>"aborted"===n.status?q:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===r.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Tn(e))return e;const a=r.transform(e.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((e=>Tn(e)?Promise.resolve(r.transform(e.value,i)).then((e=>({status:t.value,value:e}))):e))}se.assertNever(r)}}dt.create=(e,t,n)=>new dt({schema:e,typeName:F.ZodEffects,effect:t,...K(n)}),dt.createWithPreprocess=(e,t,n)=>new dt({schema:t,effect:{type:"preprocess",transform:e},typeName:F.ZodEffects,...K(n)});class xt extends X{_parse(e){return this._getType(e)===O.undefined?Ze(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}xt.create=(e,t)=>new xt({innerType:e,typeName:F.ZodOptional,...K(t)});class Xt extends X{_parse(e){return this._getType(e)===O.null?Ze(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Xt.create=(e,t)=>new Xt({innerType:e,typeName:F.ZodNullable,...K(t)});class Un extends X{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===O.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Un.create=(e,t)=>new Un({innerType:e,typeName:F.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...K(t)});class zn extends X{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Nn(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new Je(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new Je(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}zn.create=(e,t)=>new zn({innerType:e,typeName:F.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...K(t)});class as extends X{_parse(e){if(this._getType(e)!==O.nan){const t=this._getOrReturnCtx(e);return C(t,{code:E.invalid_type,expected:O.nan,received:t.parsedType}),q}return{status:"valid",value:e.data}}}as.create=e=>new as({typeName:F.ZodNaN,...K(e)});const J0=Symbol("zod_brand");class Xa extends X{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class Fn extends X{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?q:"dirty"===e.status?(t.dirty(),Wr(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?q:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new Fn({in:e,out:t,typeName:F.ZodPipeline})}}class Bn extends X{_parse(e){const t=this._def.innerType._parse(e),n=e=>(Tn(e)&&(e.value=Object.freeze(e.value)),e);return Nn(t)?t.then((e=>n(e))):n(t)}unwrap(){return this._def.innerType}}function Ll(e,t={},n){return e?Fr.create().superRefine(((r,i)=>{var a,s;if(!e(r)){const e="function"==typeof t?t(r):"string"==typeof t?{message:t}:t,o=null===(s=null!==(a=e.fatal)&&void 0!==a?a:n)||void 0===s||s,u="string"==typeof e?{message:e}:e;i.addIssue({code:"custom",...u,fatal:o})}})):Fr.create()}Bn.create=(e,t)=>new Bn({innerType:e,typeName:F.ZodReadonly,...K(t)});const Y0={object:pe.lazycreate};var F;!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"}(F||(F={}));const Q0=(e,t={message:`Input not instance of ${e.name}`})=>Ll((t=>t instanceof e),t),Pl=lt.create,Zl=Qt.create,K0=as.create,H0=Kt.create,Ml=On.create,X0=mr.create,ex=ns.create,tx=Rn.create,rx=Ln.create,nx=Fr.create,ix=pr.create,sx=Zt.create,ax=is.create,ox=ft.create,ux=pe.create,cx=pe.strictCreate,lx=Pn.create,fx=cs.create,dx=Zn.create,hx=wt.create,px=Mn.create,gx=ss.create,mx=_r.create,_x=zr.create,vx=$n.create,yx=Dn.create,xx=Ht.create,bx=Wn.create,wx=qr.create,Xc=dt.create,kx=xt.create,Ax=Xt.create,Sx=dt.createWithPreprocess,jx=Fn.create,Ix=()=>Pl().optional(),Ex=()=>Zl().optional(),Cx=()=>Ml().optional(),Tx={string:e=>lt.create({...e,coerce:!0}),number:e=>Qt.create({...e,coerce:!0}),boolean:e=>On.create({...e,coerce:!0}),bigint:e=>Kt.create({...e,coerce:!0}),date:e=>mr.create({...e,coerce:!0})},Nx=q;var ye=Object.freeze({__proto__:null,defaultErrorMap:Vr,setErrorMap:N0,getErrorMap:es,makeIssue:ts,EMPTY_PATH:O0,addIssueToContext:C,ParseStatus:Ne,INVALID:q,DIRTY:Wr,OK:Ze,isAborted:za,isDirty:Ba,isValid:Tn,isAsync:Nn,get util(){return se},get objectUtil(){return Ua},ZodParsedType:O,getParsedType:Yt,ZodType:X,datetimeRegex:Ol,ZodString:lt,ZodNumber:Qt,ZodBigInt:Kt,ZodBoolean:On,ZodDate:mr,ZodSymbol:ns,ZodUndefined:Rn,ZodNull:Ln,ZodAny:Fr,ZodUnknown:pr,ZodNever:Zt,ZodVoid:is,ZodArray:ft,ZodObject:pe,ZodUnion:Pn,ZodDiscriminatedUnion:cs,ZodIntersection:Zn,ZodTuple:wt,ZodRecord:Mn,ZodMap:ss,ZodSet:_r,ZodFunction:zr,ZodLazy:$n,ZodLiteral:Dn,ZodEnum:Ht,ZodNativeEnum:Wn,ZodPromise:qr,ZodEffects:dt,ZodTransformer:dt,ZodOptional:xt,ZodNullable:Xt,ZodDefault:Un,ZodCatch:zn,ZodNaN:as,BRAND:J0,ZodBranded:Xa,ZodPipeline:Fn,ZodReadonly:Bn,custom:Ll,Schema:X,ZodSchema:X,late:Y0,get ZodFirstPartyTypeKind(){return F},coerce:Tx,any:nx,array:ox,bigint:H0,boolean:Ml,date:X0,discriminatedUnion:fx,effect:Xc,enum:xx,function:_x,instanceof:Q0,intersection:dx,lazy:vx,literal:yx,map:gx,nan:K0,nativeEnum:bx,never:sx,null:rx,nullable:Ax,number:Zl,object:ux,oboolean:Cx,onumber:Ex,optional:kx,ostring:Ix,pipeline:jx,preprocess:Sx,promise:wx,record:px,set:mx,strictObject:cx,string:Pl,symbol:ex,transformer:Xc,tuple:hx,undefined:tx,union:lx,unknown:ix,void:ax,NEVER:Nx,ZodIssueCode:E,quotelessJson:T0,ZodError:Je}),el=function(e,t,n){if(e&&"reportValidity"in e){var r=Da(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},$l=function(e,t){var n=function(n){var r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?el(r.ref,n,e):r.refs&&r.refs.forEach((function(t){return el(t,n,e)}))};for(var r in t.fields)n(r)},Ox=function(e,t){t.shouldUseNativeValidation&&$l(e,t);var n={};for(var r in e){var i=Da(t.fields,r),a=Object.assign(e[r]||{},{ref:i&&i.ref});if(Rx(t.names||Object.keys(e),r)){var s=Object.assign({},Da(n,r));Ta(s,"root",a),Ta(n,r,s)}else Ta(n,r,a)}return n},Rx=function(e,t){return e.some((function(e){return e.startsWith(t+".")}))},Lx=function(e,t){for(var n={};e.length;){var r=e[0],i=r.code,a=r.message,s=r.path.join(".");if(!n[s])if("unionErrors"in r){var o=r.unionErrors[0].errors[0];n[s]={message:o.message,type:o.code}}else n[s]={message:a,type:i};if("unionErrors"in r&&r.unionErrors.forEach((function(t){return t.errors.forEach((function(t){return e.push(t)}))})),t){var u=n[s].types,c=u&&u[r.code];n[s]=Xv(s,t,n,i,c?[].concat(c,r.message):r.message)}e.shift()}return n},Px=function(e,t,n){return void 0===n&&(n={}),function(r,i,a){try{return Promise.resolve(function(i,s){try{var o=Promise.resolve(e["sync"===n.mode?"parse":"parseAsync"](r,t)).then((function(e){return a.shouldUseNativeValidation&&$l({},a),{errors:{},values:n.raw?r:e}}))}catch(e){return s(e)}return o&&o.then?o.then(void 0,s):o}(0,(function(e){if(null!=e.errors)return{values:{},errors:Ox(Lx(e.errors,!a.shouldUseNativeValidation&&"all"===a.criteriaMode),a)};throw e})))}catch(e){return Promise.reject(e)}}},Dl=(e=>(e.header="header",e.avatar="avatar",e))(Dl||{});const Zx=({user:e,type:t})=>{var n,r,i,a;if(!e)return"";try{return("avatar"===t?null==(r=null==(n=e.avatar)?void 0:n.files[0])?void 0:r.uri:null==(a=null==(i=e.header)?void 0:i.files[0])?void 0:a.uri)||""}catch{return""}},Mx=e=>{const t=e.match(/^(.*?)(\d*)$/);if(t&&t[2]){const e=t[1]||"",n=t[2]||"0";return`${e}${parseInt(n,10)+1}`}return`${e}_1`},$x=()=>{const{data:e}=Iv({}),t=null==e?void 0:e.users[(null==e?void 0:e.users.length)-1||0];return{avatar:Zx({user:t,type:Dl.avatar}),displayName:null==t?void 0:t.displayName,username:(null==t?void 0:t.username)&&Mx(t.username)}},tl=({value:e,limit:t})=>j.jsxs("span",{children:[j.jsx("span",{className:gr("text-base font-semibold "+(null!=e&&e.length?"text-gray-900":"text-gray-400")),children:(null==e?void 0:e.length)||0}),j.jsxs("span",{className:"text-base font-semibold text-gray-400",children:["/",t]})]}),rl=e=>{e.preventDefault()},Dx=e=>e?{onOpenAutoFocus:rl,onCloseAutoFocus:rl}:{},Wx=({open:e,modal:t,children:n,onCloseModal:r,className:i,skipModalAutofocus:a=!1,...s})=>e?j.jsx(Zv,{open:e,modal:t,onOpenChange:e=>{e||null==r||r()},children:j.jsx(Mv,{className:gr(i),closeSize:"small",closeVariant:"insideCard",onCloseModal:r,...s,...Dx(a),childrenClassName:gr("overflow-auto",s.title?"max-h-[calc(90vh-65px)]":"max-h-[90vh]",s.childrenClassName),children:n})}):null,Wl=3,Ul=64,nl=5,il=2,zl=30,Ux=50,Bl=30,ls={short:"Too short",long:"Too long"},eo=new RegExp("\\p{Extended_Pictographic}","u"),Vl=({showInlineError:e=!0})=>ye.string().trim().min(1,e?"Username is required":"").min(2,e?"Must be at least 2 characters long":"").max(30,ls.long).regex(/^[0-9a-zA-Z_]+[0-9a-zA-Z_.]*$/,"Only latin letters, digits, _ and . allowed"),Fl=ye.string().trim().min(1,"Display name is required").max(50).regex(/^[^@]*$/,"@ is not allowed").superRefine(((e,t)=>{const n=eo.test(e),r=/[a-zA-Z0-9]/.test(e);n&&!r&&t.addIssue({code:ye.ZodIssueCode.custom,message:"Emojis alone are not allowed. Please add text"})})),zx=ye.string().max(1024,ls.long).optional(),ql=({minLength:e,minErrorMessage:t,maxLength:n,regexErrorMessage:r})=>ye.string().trim().min(e,t).max(n,ls.long).regex(/^[0-9a-zA-Z_]+[0-9a-zA-Z_.]*$/,r);ql({minLength:2,maxLength:30,regexErrorMessage:"Invalid characters. ex.: group_name_1"}),ql({minLength:2,minErrorMessage:ls.short,maxLength:30,regexErrorMessage:"Invalid characters. ex.: channel_name_1"}),ye.string().trim().min(1,"").regex(/^[0-9a-zA-Z_]+[0-9a-zA-Z_.]*$|^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{1,}$/,"Invalid characters");const Bx="Required: A-Z, a-z, 0-9, special character, min 3, max 64";ye.string().trim().superRefine(((e,t)=>{eo.test(e)&&t.addIssue({code:ye.ZodIssueCode.custom,message:"Emojis are not allowed"}),/[A-Z]/.test(e)&&/[a-z]/.test(e)&&/[0-9]/.test(e)&&/[^A-Za-z0-9]/.test(e)&&e.length>=3&&e.length<=64||t.addIssue({code:ye.ZodIssueCode.custom,message:Bx})})),ye.string().trim().min(5,"Must be at least 5 characters long").regex(/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/i,"Email format is not valid").refine((e=>!eo.test(e)),"Emojis are not allowed"),ye.object({bio:zx,username:Vl({showInlineError:!0}),displayName:Fl}),ye.object({show:ye.boolean(),dateOnly:ye.boolean(),date:ye.date().optional().nullable()}),ye.object({show:ye.boolean(),dateOnly:ye.boolean(),date:ye.date().optional().nullable()});const Vx=e=>{var t;const n=e,r=409===(null==n?void 0:n.status);return{message:"UserNameIsReserved"===(null==(t=null==n?void 0:n.data)?void 0:t.errorCode)?"Restricted words detected. Please, try alternatives":"Username already in use. Please, try another one",isError:r}},sl={displayName:56,username:30},Fx=ye.object({username:Vl({showInlineError:!1}),displayName:Fl}),O1=({isOpen:e,onAdd:t,onCancel:n})=>{const[r,i,a]=Il(),[s]=Ov(),{avatar:o,displayName:u,username:c}=$x(),[l,d]=hr(),f=ey({resolver:Px(Fx),defaultValues:{displayName:u,username:c}}),p=async({username:e,displayName:n})=>{try{i(),await s({userCreate:{displayName:n,username:e,actorType:"Service",avatarId:null,headerId:null}}),null==t||t(e)}catch(e){Ha.error("NewAppProfileModal submit error: ",e);const t=e,{isError:n,message:r}=Vx(t);n&&f.setError("username",{message:r})}finally{a()}},h=f.getFieldState("displayName").invalid||f.getFieldState("username").invalid||!f.getValues().displayName||!f.getValues().username;return j.jsxs(Wx,{open:e,onCloseModal:n,title:"Add an app",children:[j.jsx("p",{className:"mt-4 text-sm font-medium text-gray-500",children:"Create a new user name to join the APP NAME and with more text like so it is gonna work too"}),j.jsxs("div",{className:"my-4 flex items-center justify-between",children:[j.jsxs("div",{className:"flex items-center",children:[j.jsx(Ev,{size:96,name:f.getValues().displayName||"",imgUrl:o||(null==l?void 0:l.objectUrl)}),j.jsxs("div",{className:"ml-4 text-gray-700",children:[j.jsx("h4",{className:"mb-1 text-base font-semibold leading-[22px]",children:f.getValues().displayName}),f.getValues().username&&j.jsx("span",{className:"text-base font-semibold leading-[14px]",children:`@${f.getValues().username}`})]})]}),j.jsx(C0,{onChange:e=>d(e),className:"mr-2 cursor-pointer uppercase",children:"Change Photo"})]}),j.jsx($v,{...f,children:j.jsxs("form",{className:"even:*:my-5",onSubmit:(...e)=>{f.handleSubmit(p)(...e)},children:[j.jsx(Cc,{control:f.control,name:"displayName",render:({field:e})=>j.jsxs(Tc,{children:[j.jsxs("div",{className:"flex items-center justify-between",children:[j.jsx(Nc,{children:"Display Name"}),j.jsx(tl,{value:e.value,limit:sl.displayName})]}),j.jsx(Oc,{children:j.jsx(Rc,{...e})}),j.jsx(Lc,{})]})}),j.jsx(Cc,{control:f.control,name:"username",render:({field:e})=>j.jsxs(Tc,{className:"relative",children:[j.jsxs("div",{className:"flex items-center justify-between",children:[j.jsx(Nc,{children:"User name"}),j.jsx(tl,{value:e.value,limit:sl.username})]}),j.jsx("div",{className:"absolute left-3 top-[34px] text-sm text-gray-400",children:"@"}),j.jsx(Oc,{children:j.jsx(Rc,{className:"pl-7",...e})}),j.jsx(Lc,{})]})}),j.jsxs("div",{className:"flex w-full flex-row justify-end",children:[j.jsx(Fa,{variant:"tertiary",className:"mr-3 uppercase",onClick:n,children:"Cancel"}),j.jsx(qa,{size:"m",variant:"primary",type:"submit",className:"uppercase",disabled:h,isLoading:r,children:"Add"})]})]})})]})},qx=({code:e})=>{const{title:t,description:n}=ry(e);return j.jsxs("div",{className:"mt-10 flex w-[580px] flex-col items-center text-lg text-red-500",children:[j.jsx("h3",{className:"font-semibold",children:t}),j.jsx("p",{className:"text-sm",children:n})]})},Gl=(e,t)=>{const[n,r]=Qi.capitalize(e).split(" "),i=e=>{var t;return null==(t=e.at(0))?void 0:t.toUpperCase()};return t&&r?`${i(n)}${i(r)}`:n.slice(0,t?2:1)},Gx=({title:e,preview:t,description:n,onClick:r})=>j.jsxs("div",{className:"rounded-xs flex cursor-pointer flex-row bg-white p-2 hover:shadow-md",onClick:r,children:[j.jsxs(ll,{className:"rounded-xs mr-3 h-10 w-10",children:[j.jsx(fl,{className:"border-2 border-solid border-gray-900/20",src:t||"",alt:"app-avatar"}),j.jsx(dl,{children:Gl(e)})]}),j.jsxs("div",{className:"flex flex-col",children:[j.jsx("h4",{className:"text-sm font-semibold text-gray-800",children:e}),j.jsx("p",{className:"text-sm text-gray-600",children:n})]})]}),R1=({list:e,onClick:t})=>j.jsx("div",{className:"grid grid-cols-2 gap-4 pt-6",children:null==e?void 0:e.map((e=>j.jsx(Gx,{onClick:()=>t(e.id),...e},e.id)))}),L1=({title:e,hasBack:t=!1})=>{const n=ny();return j.jsxs("h1",{className:"mb-8 flex flex-row items-center text-lg font-semibold uppercase text-gray-700",children:[t&&j.jsx(ky,{className:"mr-4 cursor-pointer",onClick:()=>n(-1)}),e]})},P1=(e=[],t)=>e.find((e=>{var n,r;return+((null==(r=null==(n=e.split("/").pop())?void 0:n.match(/\d+/))?void 0:r[0])||0)===t}))||e[0],Z1="appId",Jx=()=>{const e=iy();return Rv({appId:e.appId},{skip:!e.appId})},M1=({children:e})=>j.jsx("div",{className:"pl-5 pr-5 *:mt-6 first:*:mt-0",children:e}),Yx=e=>{const[t,n]=hr(),[r,i]=hr(0),[a,s]=hr(),o=Array.from(Array(a).keys());return os((()=>{t&&(s(t.slideNodes().length),i(t.selectedScrollSnap()+1),t.on("select",(()=>{i(t.selectedScrollSnap()+1)})))}),[t]),[n,()=>o.length<2?null:j.jsx("ul",{className:"flex min-h-5 items-center justify-center",children:null==o?void 0:o.map(((e,n)=>j.jsx("li",{onClick:()=>null==t?void 0:t.scrollTo(n),className:gr("ml-0.5 size-1.5 cursor-pointer rounded-[10px] bg-gray-300 transition-[0.2s]",n+1===r&&"w-3 bg-gray-700")},n)))}),t,r]},$1=({previews:e})=>{const[t,n]=Yx();return j.jsxs(Dv,{setApi:t,className:"w-full overflow-hidden rounded-[6px]",children:[j.jsx(Wv,{children:e.map(((e,t)=>j.jsx(Uv,{className:"flex max-w-[100%] basis-[unset] items-center",children:j.jsx("img",{src:e,className:"h-[260px]"})},t)))}),j.jsx(zv,{}),j.jsx(Bv,{}),j.jsx(n,{})]})},D1=({children:e})=>{const{data:t,isSuccess:n,isLoading:r,isError:i,error:a}=Jx();return r?j.jsx(Xy,{}):i?j.jsx(qx,{code:a.status}):n?e(t):null},W1=({appId:e,canDelete:t,onDelete:n})=>{const[r,i]=hr(!1),[a,,,s]=Il(),[o,{isLoading:u,isSuccess:c}]=Ly();return os((()=>{c&&(null==n||n())}),[c,n]),j.jsxs("div",{className:"flex flex-col",children:[j.jsx(qa,{disabled:!t,className:gr("mb-2 mt-3 h-10 w-32 bg-red-500 uppercase",!t&&"bg-gray-500"),isLoading:u,onClick:()=>i(!0),children:"Delete App"}),j.jsx(Vv,{open:r,onOpenChange:i,children:j.jsxs(Fv,{children:[j.jsxs(qv,{children:[j.jsx(Gv,{children:"Are you absolutely sure?"}),j.jsx(Jv,{children:"This action cannot be undone. This will permanently delete your app and remove your data from our servers."})]}),j.jsxs(Yv,{children:[j.jsx(Qv,{children:"Cancel"}),j.jsx(Kv,{onClick:()=>{o({appId:e})},children:"Continue"})]})]})}),!t&&j.jsxs("div",{className:"text-sm font-medium text-gray-500",children:[j.jsxs("div",{className:"flex flex-row",children:[j.jsx("span",{children:"There are active users, you cannot delete this app. "}),j.jsxs(Fa,{size:"s",variant:"tertiary",className:"text-blue_100 ml-1 underline",onClick:s,children:["Read ",a?"less":"more"]})]}),a&&j.jsx("p",{children:"some description here"})]})]})},Qx=({preview:e,title:t,className:n})=>j.jsxs(ll,{className:gr("rounded-xs h-24 w-24",n),children:[j.jsx(fl,{className:"border-2 border-solid border-gray-900/20",src:e||"",alt:"app-avatar"}),j.jsx(dl,{className:"text-3xl font-semibold text-gray-700",children:Gl(t)})]}),U1=()=>null,z1=({children:e})=>j.jsx("p",{className:"w-full text-sm text-gray-900",children:e}),Kx=e=>`@${e.username}${e.local?"":`@${e.domain}`}`,Hx=e=>{try{const{type:t,payload:n}=e,r={type:t};return void 0!==n&&(r.payload=JSON.parse(JSON.stringify(n))),r}catch(t){return Ha.warn(`Could not serialize action type: ${e.type}`,t),{type:e.type,payload:`[Non-serializable payload for action: ${e.type}]`}}},Xx=e=>{const t=window.parent??window;if(t)try{const n=Hx(e);t.postMessage(n,"*")}catch(e){Ha.error("Failed to process or send message:",e)}},to="auth_token",Jl=()=>Vn.get(to)||void 0,e1=e=>Vn.set(to,e),t1=()=>Vn.remove(to),r1=()=>!!Jl(),n1={getToken:Jl,setToken:e1,removeToken:t1,hasToken:r1},al={forgotPasswordStep:"request",forgotPasswordFields:null,signupStep:"rules",signupFields:null,token:null,newEmail:null,isPending:!!n1.getToken(),isAuthenticated:!1,isAskLoginOpen:!1},i1=cl({name:"auth",initialState:al,reducers:{setAskLoginOpen:(e,t)=>{e.isAskLoginOpen=t.payload},login:(e,t)=>{e.isAuthenticated=!0,e.token=t.payload||null,e.isPending=!1},logout:()=>({...al,isPending:!1}),setNewEmail:(e,t)=>{e.newEmail=t.payload},setForgotPasswordStep:(e,t)=>{e.forgotPasswordStep=t.payload},updateForgotPasswordFields:(e,t)=>{e.forgotPasswordFields={...e.forgotPasswordFields,...t.payload}},resetForgotPasswordFields:e=>{e.forgotPasswordFields=null},setSignupStep:(e,t)=>{e.signupStep=t.payload},updateSignupFields:(e,t)=>{e.signupFields={...e.signupFields,...t.payload}},resetSignupFields:e=>{e.signupFields=null},setPending:(e,t)=>{e.isPending=t.payload}},selectors:{selectAskLoginOpen:e=>e.isAskLoginOpen,selectToken:e=>e.token,selectNewEmail:e=>e.newEmail,selectForgotPasswordStep:e=>e.forgotPasswordStep,selectForgotPasswordFields:e=>e.forgotPasswordFields,selectSignupStep:e=>e.signupStep,selectSignupFields:e=>e.signupFields,selectPending:e=>e.isPending,selectIsAuthenticated:e=>e.isAuthenticated}}),s1=()=>{window.parent===window?ty().dispatch(i1.actions.setAskLoginOpen(!0)):Xx(Uy())},a1=e=>{const t=Hi(yl.selectors.selectCurrentUser),n=Hi(Pv.selectors.selectIsAuthenticated),r="SUSPENDED"===(null==t?void 0:t.state),i=r;return{isDisabled:i,guardedAction:(e=()=>{})=>()=>{n?n&&!r&&e():s1()},ActionTooltipWrapper:({children:e,triggerClassname:n})=>i?j.jsx(Hv,{theme:"dark",tooltipText:`${Kx(t)} is suspended`,size:"default",triggerClassname:n,children:j.jsx("div",{className:"!pointer-events-auto w-full",children:e})}):j.jsx(j.Fragment,{children:e})}},o1=({title:e,developer:t,buttonName:n,isLoading:r=!1,renderButtons:i,onClick:a})=>{const{isDisabled:s,ActionTooltipWrapper:o}=a1();return j.jsxs("div",{className:"flex flex-col",children:[j.jsx("div",{className:"flex flex-row items-center text-3xl font-semibold uppercase leading-7 text-gray-700",children:j.jsx("span",{children:e})}),t&&j.jsx("div",{className:"text-blue_100 mt-1 text-sm",children:t}),j.jsx(o,{children:j.jsxs("div",{className:"mt-3 flex justify-center",children:[j.jsx(qa,{size:"m",variant:"primary",className:"uppercase",isLoading:r,onClick:a,disabled:s,children:n}),j.jsx("div",{className:"ml-2",children:null==i?void 0:i()})]})})]})},B1=({title:e,developer:t,preview:n,buttonName:r,isLoading:i,onClick:a,renderButtons:s})=>j.jsxs("div",{className:"flex items-center justify-between",children:[j.jsx(o1,{title:e,developer:t,buttonName:r,isLoading:i,onClick:a,renderButtons:s}),j.jsx(Qx,{preview:n,title:e})]}),V1=({group:e})=>{const{getLastAppLink:t}=Hy({entryPoint:"GROUP"}),[n,r]=hr(null);return os((()=>{const n=null==e?void 0:e.groupId,i=null==e?void 0:e.groupName;n&&i&&(async()=>{const e=await t({groupId:n,groupName:i});e&&r(e)})()}),[null==e?void 0:e.groupId,null==e?void 0:e.groupName,t]),n};export{D1 as AppData,W1 as AppDelete,z1 as AppDescription,N1 as AppInfo,$1 as AppPreviews,U1 as AppUsernames,M1 as AppViewContainer,qx as AppViewError,R1 as AppsList,L1 as Header,Xy as Loader,O1 as NewAppProfileModal,B1 as TitleAvatarBlock,Z1 as appIdParam,Ny as appsApi,P1 as getAppIcon,b1 as useAppRoute,$y as useDefaultChannelLink,Ly as useDeleteApiV1AppsByAppIdMutation,A1 as useDeleteApiV1AppsUserByAppIdMutation,E1 as useGetApiV1AppsInstalledQuery,j1 as useGetApiV1AppsQuery,I1 as useGetApiV1AppsUserQuery,k1 as useGetApiV1GroupsByGroupIdAppsQuery,Yy as useGetAppLink,V1 as useGroupLink,Zy as useLazyGetApiV1AppsQuery,Py as useLazyGetApiV1AppsUserQuery,Ry as useLazyGetApiV1GroupsByGroupIdAppsQuery,Oy as useLazyGetApiV1GroupsByGroupIdChannelsQuery,Hy as useOpenLastApp,Qy as usePersonalAppsList,C1 as usePostApiV1AppsMutation,S1 as usePutApiV1AppsUserByAppIdMutation,w1 as usePutApiV1GroupsByGroupIdAppsAndAppIdMutation,T1 as useSetLastApp};
|
|
42
|
+
*/re("remoteReady");const Uy=re("askLogin");re("reselectUser"),re("requestLogout"),re("setConfirmLeavePage"),re("requestChangePath"),re("wsSubscribe"),re("wsUnSubscribe"),re("hostStoreConnect"),re("remoteLogin"),re("remoteLogout"),re("wsOnMessage"),re("setRouterPath"),re("setDeviceType"),re("setDeviceWidth");const zy=re("setUserError"),By=re("setUserIsError"),Vy=re("setUserPending"),Fy=re("setUserSuccess"),qy=re("setUserData"),Gy=re("updateAccountData"),Jy=re("updateUser");re("addNotification"),re("markNotification"),re("setNotificationsError"),re("setNotificationsList"),re("setNotificationsPending"),re("setNotificationsTotalCount"),re("setNotificationsUnreadCount"),re("acceptAllFollowRequests"),re("resetNotificationsState"),re("undoNotification"),re("setInstanceInfo"),re("setInstanceInfoPending"),re("setInstanceInfoError"),re("setPlatformSettings"),re("setProfileSettings"),re("setGroupData"),re("setGroupLoading"),ul("requestMicroFrontendFetch"),ul("sendMicroFrontendFetchResponse");const Bc={data:null,isError:!1,isPending:!1,isSuccess:!1},yl=cl({name:"user",initialState:Bc,reducers:{reset:e=>{Object.assign(e,Bc)}},extraReducers:e=>{e.addCase(qy,((e,{payload:t})=>{e.data=t})).addCase(Gy,((e,{payload:t})=>{e.data&&Object.assign(e.data,t||{})})).addCase(Fy,((e,{payload:t})=>{e.isSuccess=t})).addCase(Vy,((e,{payload:t})=>{e.isPending=t})).addCase(By,((e,{payload:t})=>{e.isError=t})).addCase(zy,((e,{payload:t})=>{e.error=t})).addCase(Jy,((e,{payload:t})=>{var n;null!=(n=e.data)&&n.users&&(e.data.users=e.data.users.map((e=>t.id===e.id?t:e)))}))},selectors:{selectIsError:e=>e.isError,selectError:e=>e.error,selectPending:e=>e.isPending,selectData:e=>e.data,selectAccount:e=>{var t;return null==(t=e.data)?void 0:t.account},selectAccountId:e=>{var t;return null==(t=e.data)?void 0:t.account.id},selectUsers:e=>{var t;return null==(t=e.data)?void 0:t.users},selectUserById:(e,t)=>{var n;return null==(n=e.data)?void 0:n.users.find((({id:e})=>e===t))},selectCurrentUser:e=>{var t;return null==(t=e.data)?void 0:t.users.find((({id:t})=>{var n;return t===(null==(n=e.data)?void 0:n.selectedUserId)}))},selectSelectedUserId:e=>{var t;return null==(t=e.data)?void 0:t.selectedUserId},selectSuccess:e=>e.isSuccess}}),Yy=({entryPoint:e})=>{const t=Hi(yl.selectors.selectCurrentUser),n=(null==t?void 0:t.username)||void 0;return nt(((t,r)=>Cv({id:t.id,routes:t.manifest.routes,username:n,groupname:r||void 0,entryPoint:e})),[e,n])},Qy=()=>{const[e]=Py(),[t]=Zy();return nt((async()=>Lv.hasToken()?e().unwrap():t().unwrap()),[e,t])},Ky=({entryPoint:e})=>{const t=Yy({entryPoint:e}),n=Qy(),[r]=Ry({}),i=nt((async e=>e?await r({groupId:e},!0).unwrap():[]),[r]);return{getDefaultAppLink:nt((async({defaultApp:r,groupName:a,groupId:s})=>{const o=r??("USER"===e?await n():await i(s))[0];return t(o,a)}),[t,n,e,i])}},T1=({link:e,username:t,groupname:n,isActive:r})=>{os((()=>{r&&ly({link:e,username:t,groupname:n})}),[r,e,t,n])},Hy=({entryPoint:e})=>{const t=Tv(),{getDefaultChannelLink:n}=$y(),{getDefaultAppLink:r}=Ky({entryPoint:e}),i=nt((async({username:e,groupId:t,defaultApp:i,groupName:a,defaultChannel:s})=>Pc({username:e,groupname:a})||t&&await n({groupId:t,groupName:a,defaultChannel:s})||await r({groupId:t,groupName:a,defaultApp:i})),[Pc,n,r]);return{openLastApp:nt((async({queryParams:e,...n})=>{const r=await i(n);r&&t(r,{queryParams:e})}),[t,i]),getLastAppLink:i}},Ji=({title:e,value:t})=>j.jsxs("div",{className:"flex h-5 justify-between text-sm even:bg-gray-50",children:[j.jsx("div",{className:"text-gray-500",children:e}),j.jsx("div",{className:"text-gray-900",children:t})]}),N1=({version:e,updatedAt:t,dateInstalled:n,visibility:r})=>j.jsxs("div",{className:"w-full",children:[j.jsx(Ji,{title:"Version",value:e}),j.jsx(Ji,{title:"Date installed",value:n}),j.jsx(Ji,{title:"Visibility",value:r}),j.jsx(Ji,{title:"Last updated",value:t})]}),Xy=({className:e})=>j.jsx(Sy,{className:gr("animate-spin",e)}),En="8.48.0",Pt=globalThis;function Ja(e,t,n){const r=Pt,i=r.__SENTRY__=r.__SENTRY__||{},a=i[En]=i[En]||{};return a[e]||(a[e]=t())}const xl=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,e0="Sentry Logger ",Vc=["debug","info","warn","error","log","assert","trace"],Fc={};function t0(e){if(!("console"in Pt))return e();const t=Pt.console,n={},r=Object.keys(Fc);r.forEach((e=>{const r=Fc[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}function r0(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return xl?Vc.forEach((n=>{t[n]=(...t)=>{e&&t0((()=>{Pt.console[n](`${e0}[${n}]:`,...t)}))}})):Vc.forEach((e=>{t[e]=()=>{}})),t}const Ki=Ja("logger",r0);function Ya(){return Qa(Pt),Pt}function Qa(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||En,t[En]=t[En]||{}}const n0=Object.prototype.toString;function i0(e,t){return n0.call(e)===`[object ${t}]`}function s0(e){return i0(e,"Object")}function a0(e){return!(!e||!e.then||"function"!=typeof e.then)}function o0(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{xl&&Ki.log(`Failed to add non-enumerable property "${t}" to object`,e)}}const bl=1e3;function wl(){return Date.now()/bl}function u0(){const{performance:e}=Pt;if(!e||!e.now)return wl;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/bl}const c0=u0();function Ur(){const e=Pt,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return"10000000100040008000100000000000".replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function l0(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||c0(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Ur()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function qc(){return Ur()}function Gc(){return Ur().substring(16)}function kl(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&t&&0===Object.keys(t).length)return e;const r={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=kl(r[e],t[e],n-1));return r}(()=>{const{performance:e}=Pt;if(!e||!e.now)return;const t=36e5,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,a=i<t,s=e.timing&&e.timing.navigationStart,o="number"==typeof s?Math.abs(s+n-r):t;(a||o<t)&&(i<=o&&e.timeOrigin)})();const Wa="_sentrySpan";function Jc(e,t){t?o0(e,Wa,t):delete e[Wa]}function Yc(e){return e[Wa]}const f0=100;class Ka{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:qc(),spanId:Gc()}}clone(){const e=new Ka;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,Jc(e,Yc(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&l0(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,[n,r]=t instanceof Cn?[t.getScopeData(),t.getRequestSession()]:s0(t)?[e,e.requestSession]:[],{tags:i,extra:a,user:s,contexts:o,level:u,fingerprint:c=[],propagationContext:l}=n||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...o},s&&Object.keys(s).length&&(this._user=s),u&&(this._level=u),c.length&&(this._fingerprint=c),l&&(this._propagationContext=l),r&&(this._requestSession=r),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,Jc(this,void 0),this._attachments=[],this.setPropagationContext({traceId:qc()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:f0;if(n<=0)return this;const r={timestamp:wl(),...e},i=this._breadcrumbs;return i.push(r),this._breadcrumbs=i.length>n?i.slice(-n):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Yc(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=kl(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:Gc(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:Ur();if(!this._client)return Ki.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n&&n.event_id?n.event_id:Ur();if(!this._client)return Ki.warn("No client configured on scope - will not capture message!"),r;const i=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:Ur();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(Ki.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}const Cn=Ka;function d0(){return Ja("defaultCurrentScope",(()=>new Cn))}function h0(){return Ja("defaultIsolationScope",(()=>new Cn))}class p0{constructor(e,t){let n,r;n=e||new Cn,r=t||new Cn,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return a0(n)?n.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function Br(){const e=Qa(Ya());return e.stack=e.stack||new p0(d0(),h0())}function g0(e){return Br().withScope(e)}function m0(e,t){const n=Br();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function Qc(e){return Br().withScope((()=>e(Br().getIsolationScope())))}function _0(){return{withIsolationScope:Qc,withScope:g0,withSetScope:m0,withSetIsolationScope:(e,t)=>Qc(t),getCurrentScope:()=>Br().getScope(),getIsolationScope:()=>Br().getIsolationScope()}}function Al(e){const t=Qa(e);return t.acs?t.acs:_0()}function Sl(){return Al(Ya()).getCurrentScope()}function v0(){return Al(Ya()).getIsolationScope()}function y0(e,t){return Sl().captureException(e,void 0)}function x0(e,t){const n={captureContext:t};return Sl().captureMessage(e,void 0,n)}function b0(e,t){v0().setExtra(e,t)}const w0=(...e)=>{let t="";for(const n of e){if(n instanceof Error){const e=n;return b0("exceptionMessage",t),void y0(e)}if("object"!=typeof n)t+=n;else try{t+=" "+JSON.stringify(n)}catch{t+=" "+n}}x0(t)},k0="wlsy",jl=()=>{try{return window.localStorage}catch(e){console.warn("Error getting window.localStorage storage",e)}},A0=()=>{const e=new Set,t=jl();if(!t)return[];for(let n=0;n<(null==t?void 0:t.length);n+=1){const r=null==t?void 0:t.key(n);"string"==typeof r&&e.add(r)}return Array.from(e)},S0=e=>{const t=`${k0}`,n=e=>`${t}:${e}`,r=()=>A0().filter((e=>e.startsWith(`${t}:`))),i=e=>e.slice(t.length+1),a=jl(),s=e=>{try{return null==a?void 0:a.getItem(n(e))}catch{return null}},o=(e,t)=>{try{null==a||a.setItem(n(e),String(t))}catch{return}};return{getItem:s,setItem:o,removeItem:e=>{try{null==a||a.removeItem(n(e))}catch{return}},clear:()=>{try{r().forEach((e=>null==a?void 0:a.removeItem(e)))}catch{return}},keys:()=>r().map(i),has:e=>null!==s(e),getJSON:e=>{const t=s(e);if(null==t)return null;try{return JSON.parse(t)}catch{return null}},setJSON:(e,t)=>{try{o(e,JSON.stringify(t))}catch{return}}}},Kc=["debug","info","warn","error"],j0=(e,t)=>{const n=Kc.indexOf(e);return Kc.indexOf(t)>=n},Yi=(e,t,n,...r)=>{j0(t,e)&&console.log(`[${e}] ${n}`,...r)},I0=()=>S0().getItem("logger_lvl"),E0=(e=(us()?"info":I0()||"warn"))=>{let t=e;return{debug:(e,...n)=>Yi("debug",t,e,...n),info:(e,...n)=>Yi("info",t,e,...n),warn:(e,...n)=>Yi("warn",t,e,...n),error:(e,...n)=>(w0(e,...n),Yi("error",t,e,...n)),setLevel:e=>{t=e},getLevel:()=>t}},Ha=E0(),Il=(e=!1)=>{const[t,n]=hr(e);return[t,nt((()=>n(!0)),[]),nt((()=>n(!1)),[]),nt((()=>n((e=>!e))),[]),n]},C0=({children:e,className:t,onChange:n})=>j.jsxs(Fa,{as:"label",variant:"primary",className:t,children:[e,j.jsx("input",{multiple:!1,type:"file",accept:"image/png, image/jpeg",onChange:({target:e})=>{if(!e.files)return;const t=e.files[0];n({file:t,objectUrl:URL.createObjectURL(t)}),e.value=""},id:"inputFile",className:"hidden"})]});var se,Ua;!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},e.getValidEnumValues=t=>{const n=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),r={};for(const e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(const n of e)if(t(n))return n},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(se||(se={})),(Ua||(Ua={})).mergeShapes=(e,t)=>({...e,...t});const O=se.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Yt=e=>{switch(typeof e){case"undefined":return O.undefined;case"string":return O.string;case"number":return isNaN(e)?O.nan:O.number;case"boolean":return O.boolean;case"function":return O.function;case"bigint":return O.bigint;case"symbol":return O.symbol;case"object":return Array.isArray(e)?O.array:null===e?O.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?O.promise:typeof Map<"u"&&e instanceof Map?O.map:typeof Set<"u"&&e instanceof Set?O.set:typeof Date<"u"&&e instanceof Date?O.date:O.object;default:return O.unknown}},E=se.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"]),T0=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Je extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(const i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(r);else if("invalid_return_type"===i.code)r(i.returnTypeError);else if("invalid_arguments"===i.code)r(i.argumentsError);else if(0===i.path.length)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){const n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(e){if(!(e instanceof Je))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,se.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},n=[];for(const r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}Je.create=e=>new Je(e);const Vr=(e,t)=>{let n;switch(e.code){case E.invalid_type:n=e.received===O.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case E.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,se.jsonStringifyReplacer)}`;break;case E.unrecognized_keys:n=`Unrecognized key(s) in object: ${se.joinValues(e.keys,", ")}`;break;case E.invalid_union:n="Invalid input";break;case E.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${se.joinValues(e.options)}`;break;case E.invalid_enum_value:n=`Invalid enum value. Expected ${se.joinValues(e.options)}, received '${e.received}'`;break;case E.invalid_arguments:n="Invalid function arguments";break;case E.invalid_return_type:n="Invalid function return type";break;case E.invalid_date:n="Invalid date";break;case E.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:se.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case E.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case E.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case E.custom:n="Invalid input";break;case E.invalid_intersection_types:n="Intersection results could not be merged";break;case E.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case E.not_finite:n="Number must be finite";break;default:n=t.defaultError,se.assertNever(e)}return{message:n}};let El=Vr;function N0(e){El=e}function es(){return El}const ts=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],s={...i,path:a};if(void 0!==i.message)return{...i,path:a,message:i.message};let o="";const u=r.filter((e=>!!e)).slice().reverse();for(const e of u)o=e(s,{data:t,defaultError:o}).message;return{...i,path:a,message:o}},O0=[];function C(e,t){const n=es(),r=ts({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Vr?void 0:Vr].filter((e=>!!e))});e.common.issues.push(r)}class Ne{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const r of t){if("aborted"===r.status)return q;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const e of t){const t=await e.key,r=await e.value;n.push({key:t,value:r})}return Ne.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const r of t){const{key:t,value:i}=r;if("aborted"===t.status||"aborted"===i.status)return q;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"!==t.value&&(typeof i.value<"u"||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}}const q=Object.freeze({status:"aborted"}),Wr=e=>({status:"dirty",value:e}),Ze=e=>({status:"valid",value:e}),za=e=>"aborted"===e.status,Ba=e=>"dirty"===e.status,Tn=e=>"valid"===e.status,Nn=e=>typeof Promise<"u"&&e instanceof Promise;function rs(e,t,n,r){if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function Cl(e,t,n,r,i){if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var $,jn,In;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}($||($={}));class bt{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Hc=(e,t)=>{if(Tn(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new Je(e.common.issues);return this._error=t,this._error}}};function K(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:(t,i)=>{var a,s;const{message:o}=e;return"invalid_enum_value"===t.code?{message:o??i.defaultError}:typeof i.data>"u"?{message:null!==(a=o??r)&&void 0!==a?a:i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:null!==(s=o??n)&&void 0!==s?s:i.defaultError}},description:i}}class X{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return Yt(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Yt(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Ne,ctx:{common:e.parent.common,data:e.data,parsedType:Yt(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Nn(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Yt(e)},i=this._parseSync({data:e,path:r.path,parent:r});return Hc(r,i)}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Yt(e)},r=this._parse({data:e,path:n.path,parent:n}),i=await(Nn(r)?r:Promise.resolve(r));return Hc(n,i)}refine(e,t){const n=e=>"string"==typeof t||typeof t>"u"?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,r)=>{const i=e(t),a=()=>r.addIssue({code:E.custom,...n(t)});return typeof Promise<"u"&&i instanceof Promise?i.then((e=>!!e||(a(),!1))):!!i||(a(),!1)}))}refinement(e,t){return this._refinement(((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1)))}_refinement(e){return new dt({schema:this,typeName:F.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return xt.create(this,this._def)}nullable(){return Xt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ft.create(this,this._def)}promise(){return qr.create(this,this._def)}or(e){return Pn.create([this,e],this._def)}and(e){return Zn.create(this,e,this._def)}transform(e){return new dt({...K(this._def),schema:this,typeName:F.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Un({...K(this._def),innerType:this,defaultValue:t,typeName:F.ZodDefault})}brand(){return new Xa({typeName:F.ZodBranded,type:this,...K(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new zn({...K(this._def),innerType:this,catchValue:t,typeName:F.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Fn.create(this,e)}readonly(){return Bn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const R0=/^c[^\s-]{8,}$/i,L0=/^[0-9a-z]+$/,P0=/^[0-9A-HJKMNP-TV-Z]{26}$/,Z0=/^[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,M0=/^[a-z0-9_-]{21}$/i,$0=/^[-+]?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)?)??$/,D0=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,W0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ma;const U0=/^(?:(?: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])$/,z0=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,B0=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Tl="((\\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])))",V0=new RegExp(`^${Tl}$`);function Nl(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function F0(e){return new RegExp(`^${Nl(e)}$`)}function Ol(e){let t=`${Tl}T${Nl(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 q0(e,t){return!(("v4"!==t&&t||!U0.test(e))&&("v6"!==t&&t||!z0.test(e)))}class lt extends X{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==O.string){const t=this._getOrReturnCtx(e);return C(t,{code:E.invalid_type,expected:O.string,received:t.parsedType}),q}const t=new Ne;let n;for(const r of this._def.checks)if("min"===r.kind)e.data.length<r.value&&(n=this._getOrReturnCtx(e,n),C(n,{code:E.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),t.dirty());else if("max"===r.kind)e.data.length>r.value&&(n=this._getOrReturnCtx(e,n),C(n,{code:E.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),t.dirty());else if("length"===r.kind){const i=e.data.length>r.value,a=e.data.length<r.value;(i||a)&&(n=this._getOrReturnCtx(e,n),i?C(n,{code:E.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}):a&&C(n,{code:E.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if("email"===r.kind)D0.test(e.data)||(n=this._getOrReturnCtx(e,n),C(n,{validation:"email",code:E.invalid_string,message:r.message}),t.dirty());else if("emoji"===r.kind)Ma||(Ma=new RegExp(W0,"u")),Ma.test(e.data)||(n=this._getOrReturnCtx(e,n),C(n,{validation:"emoji",code:E.invalid_string,message:r.message}),t.dirty());else if("uuid"===r.kind)Z0.test(e.data)||(n=this._getOrReturnCtx(e,n),C(n,{validation:"uuid",code:E.invalid_string,message:r.message}),t.dirty());else if("nanoid"===r.kind)M0.test(e.data)||(n=this._getOrReturnCtx(e,n),C(n,{validation:"nanoid",code:E.invalid_string,message:r.message}),t.dirty());else if("cuid"===r.kind)R0.test(e.data)||(n=this._getOrReturnCtx(e,n),C(n,{validation:"cuid",code:E.invalid_string,message:r.message}),t.dirty());else if("cuid2"===r.kind)L0.test(e.data)||(n=this._getOrReturnCtx(e,n),C(n,{validation:"cuid2",code:E.invalid_string,message:r.message}),t.dirty());else if("ulid"===r.kind)P0.test(e.data)||(n=this._getOrReturnCtx(e,n),C(n,{validation:"ulid",code:E.invalid_string,message:r.message}),t.dirty());else if("url"===r.kind)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),C(n,{validation:"url",code:E.invalid_string,message:r.message}),t.dirty()}else"regex"===r.kind?(r.regex.lastIndex=0,r.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),C(n,{validation:"regex",code:E.invalid_string,message:r.message}),t.dirty())):"trim"===r.kind?e.data=e.data.trim():"includes"===r.kind?e.data.includes(r.value,r.position)||(n=this._getOrReturnCtx(e,n),C(n,{code:E.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty()):"toLowerCase"===r.kind?e.data=e.data.toLowerCase():"toUpperCase"===r.kind?e.data=e.data.toUpperCase():"startsWith"===r.kind?e.data.startsWith(r.value)||(n=this._getOrReturnCtx(e,n),C(n,{code:E.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty()):"endsWith"===r.kind?e.data.endsWith(r.value)||(n=this._getOrReturnCtx(e,n),C(n,{code:E.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty()):"datetime"===r.kind?Ol(r).test(e.data)||(n=this._getOrReturnCtx(e,n),C(n,{code:E.invalid_string,validation:"datetime",message:r.message}),t.dirty()):"date"===r.kind?V0.test(e.data)||(n=this._getOrReturnCtx(e,n),C(n,{code:E.invalid_string,validation:"date",message:r.message}),t.dirty()):"time"===r.kind?F0(r).test(e.data)||(n=this._getOrReturnCtx(e,n),C(n,{code:E.invalid_string,validation:"time",message:r.message}),t.dirty()):"duration"===r.kind?$0.test(e.data)||(n=this._getOrReturnCtx(e,n),C(n,{validation:"duration",code:E.invalid_string,message:r.message}),t.dirty()):"ip"===r.kind?q0(e.data,r.version)||(n=this._getOrReturnCtx(e,n),C(n,{validation:"ip",code:E.invalid_string,message:r.message}),t.dirty()):"base64"===r.kind?B0.test(e.data)||(n=this._getOrReturnCtx(e,n),C(n,{validation:"base64",code:E.invalid_string,message:r.message}),t.dirty()):se.assertNever(r);return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement((t=>e.test(t)),{validation:t,code:E.invalid_string,...$.errToObj(n)})}_addCheck(e){return new lt({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...$.errToObj(e)})}url(e){return this._addCheck({kind:"url",...$.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...$.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...$.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...$.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...$.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...$.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...$.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...$.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...$.errToObj(e)})}datetime(e){var t,n;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(null==e?void 0:e.precision)>"u"?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(n=null==e?void 0:e.local)&&void 0!==n&&n,...$.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(null==e?void 0:e.precision)>"u"?null:null==e?void 0:e.precision,...$.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...$.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...$.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...$.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...$.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...$.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...$.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...$.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...$.errToObj(t)})}nonempty(e){return this.min(1,$.errToObj(e))}trim(){return new lt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new lt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new lt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function G0(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r;return parseInt(e.toFixed(i).replace(".",""))%parseInt(t.toFixed(i).replace(".",""))/Math.pow(10,i)}lt.create=e=>{var t;return new lt({checks:[],typeName:F.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...K(e)})};class Qt extends X{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==O.number){const t=this._getOrReturnCtx(e);return C(t,{code:E.invalid_type,expected:O.number,received:t.parsedType}),q}let t;const n=new Ne;for(const r of this._def.checks)"int"===r.kind?se.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),C(t,{code:E.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty()):"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),C(t,{code:E.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),C(t,{code:E.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"multipleOf"===r.kind?0!==G0(e.data,r.value)&&(t=this._getOrReturnCtx(e,t),C(t,{code:E.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),C(t,{code:E.not_finite,message:r.message}),n.dirty()):se.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,$.toString(t))}gt(e,t){return this.setLimit("min",e,!1,$.toString(t))}lte(e,t){return this.setLimit("max",e,!0,$.toString(t))}lt(e,t){return this.setLimit("max",e,!1,$.toString(t))}setLimit(e,t,n,r){return new Qt({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:$.toString(r)}]})}_addCheck(e){return new Qt({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:$.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:$.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:$.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:$.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:$.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:$.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:$.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:$.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:$.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&se.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}Qt.create=e=>new Qt({checks:[],typeName:F.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...K(e)});class Kt extends X{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==O.bigint){const t=this._getOrReturnCtx(e);return C(t,{code:E.invalid_type,expected:O.bigint,received:t.parsedType}),q}let t;const n=new Ne;for(const r of this._def.checks)"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),C(t,{code:E.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),C(t,{code:E.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),C(t,{code:E.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):se.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,$.toString(t))}gt(e,t){return this.setLimit("min",e,!1,$.toString(t))}lte(e,t){return this.setLimit("max",e,!0,$.toString(t))}lt(e,t){return this.setLimit("max",e,!1,$.toString(t))}setLimit(e,t,n,r){return new Kt({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:$.toString(r)}]})}_addCheck(e){return new Kt({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:$.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:$.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:$.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:$.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:$.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}Kt.create=e=>{var t;return new Kt({checks:[],typeName:F.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...K(e)})};class On extends X{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==O.boolean){const t=this._getOrReturnCtx(e);return C(t,{code:E.invalid_type,expected:O.boolean,received:t.parsedType}),q}return Ze(e.data)}}On.create=e=>new On({typeName:F.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...K(e)});class mr extends X{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==O.date){const t=this._getOrReturnCtx(e);return C(t,{code:E.invalid_type,expected:O.date,received:t.parsedType}),q}if(isNaN(e.data.getTime())){return C(this._getOrReturnCtx(e),{code:E.invalid_date}),q}const t=new Ne;let n;for(const r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),C(n,{code:E.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),t.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),C(n,{code:E.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),t.dirty()):se.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new mr({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:$.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:$.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}mr.create=e=>new mr({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:F.ZodDate,...K(e)});class ns extends X{_parse(e){if(this._getType(e)!==O.symbol){const t=this._getOrReturnCtx(e);return C(t,{code:E.invalid_type,expected:O.symbol,received:t.parsedType}),q}return Ze(e.data)}}ns.create=e=>new ns({typeName:F.ZodSymbol,...K(e)});class Rn extends X{_parse(e){if(this._getType(e)!==O.undefined){const t=this._getOrReturnCtx(e);return C(t,{code:E.invalid_type,expected:O.undefined,received:t.parsedType}),q}return Ze(e.data)}}Rn.create=e=>new Rn({typeName:F.ZodUndefined,...K(e)});class Ln extends X{_parse(e){if(this._getType(e)!==O.null){const t=this._getOrReturnCtx(e);return C(t,{code:E.invalid_type,expected:O.null,received:t.parsedType}),q}return Ze(e.data)}}Ln.create=e=>new Ln({typeName:F.ZodNull,...K(e)});class Fr extends X{constructor(){super(...arguments),this._any=!0}_parse(e){return Ze(e.data)}}Fr.create=e=>new Fr({typeName:F.ZodAny,...K(e)});class pr extends X{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ze(e.data)}}pr.create=e=>new pr({typeName:F.ZodUnknown,...K(e)});class Zt extends X{_parse(e){const t=this._getOrReturnCtx(e);return C(t,{code:E.invalid_type,expected:O.never,received:t.parsedType}),q}}Zt.create=e=>new Zt({typeName:F.ZodNever,...K(e)});class is extends X{_parse(e){if(this._getType(e)!==O.undefined){const t=this._getOrReturnCtx(e);return C(t,{code:E.invalid_type,expected:O.void,received:t.parsedType}),q}return Ze(e.data)}}is.create=e=>new is({typeName:F.ZodVoid,...K(e)});class ft extends X{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==O.array)return C(t,{code:E.invalid_type,expected:O.array,received:t.parsedType}),q;if(null!==r.exactLength){const e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(C(t,{code:e?E.too_big:E.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(C(t,{code:E.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(C(t,{code:E.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map(((e,n)=>r.type._parseAsync(new bt(t,e,t.path,n))))).then((e=>Ne.mergeArray(n,e)));const i=[...t.data].map(((e,n)=>r.type._parseSync(new bt(t,e,t.path,n))));return Ne.mergeArray(n,i)}get element(){return this._def.type}min(e,t){return new ft({...this._def,minLength:{value:e,message:$.toString(t)}})}max(e,t){return new ft({...this._def,maxLength:{value:e,message:$.toString(t)}})}length(e,t){return new ft({...this._def,exactLength:{value:e,message:$.toString(t)}})}nonempty(e){return this.min(1,e)}}function Dr(e){if(e instanceof pe){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=xt.create(Dr(r))}return new pe({...e._def,shape:()=>t})}return e instanceof ft?new ft({...e._def,type:Dr(e.element)}):e instanceof xt?xt.create(Dr(e.unwrap())):e instanceof Xt?Xt.create(Dr(e.unwrap())):e instanceof wt?wt.create(e.items.map((e=>Dr(e)))):e}ft.create=(e,t)=>new ft({type:e,minLength:null,maxLength:null,exactLength:null,typeName:F.ZodArray,...K(t)});class pe extends X{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=se.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==O.object){const t=this._getOrReturnCtx(e);return C(t,{code:E.invalid_type,expected:O.object,received:t.parsedType}),q}const{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Zt&&"strip"===this._def.unknownKeys))for(const e in n.data)i.includes(e)||a.push(e);const s=[];for(const e of i){const t=r[e],i=n.data[e];s.push({key:{status:"valid",value:e},value:t._parse(new bt(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof Zt){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of a)s.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)a.length>0&&(C(n,{code:E.unrecognized_keys,keys:a}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of a){const r=n.data[t];s.push({key:{status:"valid",value:t},value:e._parse(new bt(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of s){const n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e})).then((e=>Ne.mergeObjectSync(t,e))):Ne.mergeObjectSync(t,s)}get shape(){return this._def.shape()}strict(e){return $.errToObj,new pe({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,i,a,s;const o=null!==(a=null===(i=(r=this._def).errorMap)||void 0===i?void 0:i.call(r,t,n).message)&&void 0!==a?a:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(s=$.errToObj(e).message)&&void 0!==s?s:o}:{message:o}}}:{}})}strip(){return new pe({...this._def,unknownKeys:"strip"})}passthrough(){return new pe({...this._def,unknownKeys:"passthrough"})}extend(e){return new pe({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new pe({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:F.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new pe({...this._def,catchall:e})}pick(e){const t={};return se.objectKeys(e).forEach((n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])})),new pe({...this._def,shape:()=>t})}omit(e){const t={};return se.objectKeys(this.shape).forEach((n=>{e[n]||(t[n]=this.shape[n])})),new pe({...this._def,shape:()=>t})}deepPartial(){return Dr(this)}partial(e){const t={};return se.objectKeys(this.shape).forEach((n=>{const r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()})),new pe({...this._def,shape:()=>t})}required(e){const t={};return se.objectKeys(this.shape).forEach((n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof xt;)e=e._def.innerType;t[n]=e}})),new pe({...this._def,shape:()=>t})}keyof(){return Rl(se.objectKeys(this.shape))}}pe.create=(e,t)=>new pe({shape:()=>e,unknownKeys:"strip",catchall:Zt.create(),typeName:F.ZodObject,...K(t)}),pe.strictCreate=(e,t)=>new pe({shape:()=>e,unknownKeys:"strict",catchall:Zt.create(),typeName:F.ZodObject,...K(t)}),pe.lazycreate=(e,t)=>new pe({shape:e,unknownKeys:"strip",catchall:Zt.create(),typeName:F.ZodObject,...K(t)});class Pn extends X{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map((async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;const n=e.map((e=>new Je(e.ctx.common.issues)));return C(t,{code:E.invalid_union,unionErrors:n}),q}));{let e;const r=[];for(const i of n){const n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if("valid"===a.status)return a;"dirty"===a.status&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const i=r.map((e=>new Je(e)));return C(t,{code:E.invalid_union,unionErrors:i}),q}}get options(){return this._def.options}}Pn.create=(e,t)=>new Pn({options:e,typeName:F.ZodUnion,...K(t)});const Lt=e=>e instanceof $n?Lt(e.schema):e instanceof dt?Lt(e.innerType()):e instanceof Dn?[e.value]:e instanceof Ht?e.options:e instanceof Wn?se.objectValues(e.enum):e instanceof Un?Lt(e._def.innerType):e instanceof Rn?[void 0]:e instanceof Ln?[null]:e instanceof xt?[void 0,...Lt(e.unwrap())]:e instanceof Xt?[null,...Lt(e.unwrap())]:e instanceof Xa||e instanceof Bn?Lt(e.unwrap()):e instanceof zn?Lt(e._def.innerType):[];class cs extends X{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==O.object)return C(t,{code:E.invalid_type,expected:O.object,received:t.parsedType}),q;const n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(C(t,{code:E.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),q)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const r=new Map;for(const n of t){const t=Lt(n.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const i of t){if(r.has(i))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);r.set(i,n)}}return new cs({typeName:F.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...K(n)})}}function Va(e,t){const n=Yt(e),r=Yt(t);if(e===t)return{valid:!0,data:e};if(n===O.object&&r===O.object){const n=se.objectKeys(t),r=se.objectKeys(e).filter((e=>-1!==n.indexOf(e))),i={...e,...t};for(const n of r){const r=Va(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}if(n===O.array&&r===O.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let r=0;r<e.length;r++){const i=Va(e[r],t[r]);if(!i.valid)return{valid:!1};n.push(i.data)}return{valid:!0,data:n}}return n===O.date&&r===O.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Zn extends X{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(za(e)||za(r))return q;const i=Va(e.value,r.value);return i.valid?((Ba(e)||Ba(r))&&t.dirty(),{status:t.value,value:i.data}):(C(n,{code:E.invalid_intersection_types}),q)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then((([e,t])=>r(e,t))):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Zn.create=(e,t,n)=>new Zn({left:e,right:t,typeName:F.ZodIntersection,...K(n)});class wt extends X{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==O.array)return C(n,{code:E.invalid_type,expected:O.array,received:n.parsedType}),q;if(n.data.length<this._def.items.length)return C(n,{code:E.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),q;!this._def.rest&&n.data.length>this._def.items.length&&(C(n,{code:E.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...n.data].map(((e,t)=>{const r=this._def.items[t]||this._def.rest;return r?r._parse(new bt(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(r).then((e=>Ne.mergeArray(t,e))):Ne.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new wt({...this._def,rest:e})}}wt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new wt({items:e,typeName:F.ZodTuple,rest:null,...K(t)})};class Mn extends X{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==O.object)return C(n,{code:E.invalid_type,expected:O.object,received:n.parsedType}),q;const r=[],i=this._def.keyType,a=this._def.valueType;for(const e in n.data)r.push({key:i._parse(new bt(n,e,n.path,e)),value:a._parse(new bt(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?Ne.mergeObjectAsync(t,r):Ne.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,n){return new Mn(t instanceof X?{keyType:e,valueType:t,typeName:F.ZodRecord,...K(n)}:{keyType:lt.create(),valueType:e,typeName:F.ZodRecord,...K(t)})}}class ss extends X{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==O.map)return C(n,{code:E.invalid_type,expected:O.map,received:n.parsedType}),q;const r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map((([e,t],a)=>({key:r._parse(new bt(n,e,n.path,[a,"key"])),value:i._parse(new bt(n,t,n.path,[a,"value"]))})));if(n.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const n of a){const r=await n.key,i=await n.value;if("aborted"===r.status||"aborted"===i.status)return q;("dirty"===r.status||"dirty"===i.status)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const n of a){const r=n.key,i=n.value;if("aborted"===r.status||"aborted"===i.status)return q;("dirty"===r.status||"dirty"===i.status)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}}ss.create=(e,t,n)=>new ss({valueType:t,keyType:e,typeName:F.ZodMap,...K(n)});class _r extends X{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==O.set)return C(n,{code:E.invalid_type,expected:O.set,received:n.parsedType}),q;const r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(C(n,{code:E.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&(C(n,{code:E.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());const i=this._def.valueType;function a(e){const n=new Set;for(const r of e){if("aborted"===r.status)return q;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}const s=[...n.data.values()].map(((e,t)=>i._parse(new bt(n,e,n.path,t))));return n.common.async?Promise.all(s).then((e=>a(e))):a(s)}min(e,t){return new _r({...this._def,minSize:{value:e,message:$.toString(t)}})}max(e,t){return new _r({...this._def,maxSize:{value:e,message:$.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}_r.create=(e,t)=>new _r({valueType:e,minSize:null,maxSize:null,typeName:F.ZodSet,...K(t)});class zr extends X{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==O.function)return C(t,{code:E.invalid_type,expected:O.function,received:t.parsedType}),q;function n(e,n){return ts({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,es(),Vr].filter((e=>!!e)),issueData:{code:E.invalid_arguments,argumentsError:n}})}function r(e,n){return ts({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,es(),Vr].filter((e=>!!e)),issueData:{code:E.invalid_return_type,returnTypeError:n}})}const i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof qr){const e=this;return Ze((async function(...t){const s=new Je([]),o=await e._def.args.parseAsync(t,i).catch((e=>{throw s.addIssue(n(t,e)),s})),u=await Reflect.apply(a,this,o);return await e._def.returns._def.type.parseAsync(u,i).catch((e=>{throw s.addIssue(r(u,e)),s}))}))}{const e=this;return Ze((function(...t){const s=e._def.args.safeParse(t,i);if(!s.success)throw new Je([n(t,s.error)]);const o=Reflect.apply(a,this,s.data),u=e._def.returns.safeParse(o,i);if(!u.success)throw new Je([r(o,u.error)]);return u.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new zr({...this._def,args:wt.create(e).rest(pr.create())})}returns(e){return new zr({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new zr({args:e||wt.create([]).rest(pr.create()),returns:t||pr.create(),typeName:F.ZodFunction,...K(n)})}}class $n extends X{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}$n.create=(e,t)=>new $n({getter:e,typeName:F.ZodLazy,...K(t)});class Dn extends X{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return C(t,{received:t.data,code:E.invalid_literal,expected:this._def.value}),q}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Rl(e,t){return new Ht({values:e,typeName:F.ZodEnum,...K(t)})}Dn.create=(e,t)=>new Dn({value:e,typeName:F.ZodLiteral,...K(t)});class Ht extends X{constructor(){super(...arguments),jn.set(this,void 0)}_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return C(t,{expected:se.joinValues(n),received:t.parsedType,code:E.invalid_type}),q}if(rs(this,jn)||Cl(this,jn,new Set(this._def.values)),!rs(this,jn).has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return C(t,{received:t.data,code:E.invalid_enum_value,options:n}),q}return Ze(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Ht.create(e,{...this._def,...t})}exclude(e,t=this._def){return Ht.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}jn=new WeakMap,Ht.create=Rl;class Wn extends X{constructor(){super(...arguments),In.set(this,void 0)}_parse(e){const t=se.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==O.string&&n.parsedType!==O.number){const e=se.objectValues(t);return C(n,{expected:se.joinValues(e),received:n.parsedType,code:E.invalid_type}),q}if(rs(this,In)||Cl(this,In,new Set(se.getValidEnumValues(this._def.values))),!rs(this,In).has(e.data)){const e=se.objectValues(t);return C(n,{received:n.data,code:E.invalid_enum_value,options:e}),q}return Ze(e.data)}get enum(){return this._def.values}}In=new WeakMap,Wn.create=(e,t)=>new Wn({values:e,typeName:F.ZodNativeEnum,...K(t)});class qr extends X{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==O.promise&&!1===t.common.async)return C(t,{code:E.invalid_type,expected:O.promise,received:t.parsedType}),q;const n=t.parsedType===O.promise?t.data:Promise.resolve(t.data);return Ze(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}qr.create=(e,t)=>new qr({type:e,typeName:F.ZodPromise,...K(t)});class dt extends X{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===F.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{C(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===r.type){const e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return q;const r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?q:"dirty"===r.status||"dirty"===t.value?Wr(r.value):r}));{if("aborted"===t.value)return q;const r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?q:"dirty"===r.status||"dirty"===t.value?Wr(r.value):r}}if("refinement"===r.type){const e=e=>{const t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?q:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((n=>"aborted"===n.status?q:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===r.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Tn(e))return e;const a=r.transform(e.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((e=>Tn(e)?Promise.resolve(r.transform(e.value,i)).then((e=>({status:t.value,value:e}))):e))}se.assertNever(r)}}dt.create=(e,t,n)=>new dt({schema:e,typeName:F.ZodEffects,effect:t,...K(n)}),dt.createWithPreprocess=(e,t,n)=>new dt({schema:t,effect:{type:"preprocess",transform:e},typeName:F.ZodEffects,...K(n)});class xt extends X{_parse(e){return this._getType(e)===O.undefined?Ze(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}xt.create=(e,t)=>new xt({innerType:e,typeName:F.ZodOptional,...K(t)});class Xt extends X{_parse(e){return this._getType(e)===O.null?Ze(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Xt.create=(e,t)=>new Xt({innerType:e,typeName:F.ZodNullable,...K(t)});class Un extends X{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===O.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Un.create=(e,t)=>new Un({innerType:e,typeName:F.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...K(t)});class zn extends X{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Nn(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new Je(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new Je(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}zn.create=(e,t)=>new zn({innerType:e,typeName:F.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...K(t)});class as extends X{_parse(e){if(this._getType(e)!==O.nan){const t=this._getOrReturnCtx(e);return C(t,{code:E.invalid_type,expected:O.nan,received:t.parsedType}),q}return{status:"valid",value:e.data}}}as.create=e=>new as({typeName:F.ZodNaN,...K(e)});const J0=Symbol("zod_brand");class Xa extends X{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class Fn extends X{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?q:"dirty"===e.status?(t.dirty(),Wr(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?q:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new Fn({in:e,out:t,typeName:F.ZodPipeline})}}class Bn extends X{_parse(e){const t=this._def.innerType._parse(e),n=e=>(Tn(e)&&(e.value=Object.freeze(e.value)),e);return Nn(t)?t.then((e=>n(e))):n(t)}unwrap(){return this._def.innerType}}function Ll(e,t={},n){return e?Fr.create().superRefine(((r,i)=>{var a,s;if(!e(r)){const e="function"==typeof t?t(r):"string"==typeof t?{message:t}:t,o=null===(s=null!==(a=e.fatal)&&void 0!==a?a:n)||void 0===s||s,u="string"==typeof e?{message:e}:e;i.addIssue({code:"custom",...u,fatal:o})}})):Fr.create()}Bn.create=(e,t)=>new Bn({innerType:e,typeName:F.ZodReadonly,...K(t)});const Y0={object:pe.lazycreate};var F;!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"}(F||(F={}));const Q0=(e,t={message:`Input not instance of ${e.name}`})=>Ll((t=>t instanceof e),t),Pl=lt.create,Zl=Qt.create,K0=as.create,H0=Kt.create,Ml=On.create,X0=mr.create,ex=ns.create,tx=Rn.create,rx=Ln.create,nx=Fr.create,ix=pr.create,sx=Zt.create,ax=is.create,ox=ft.create,ux=pe.create,cx=pe.strictCreate,lx=Pn.create,fx=cs.create,dx=Zn.create,hx=wt.create,px=Mn.create,gx=ss.create,mx=_r.create,_x=zr.create,vx=$n.create,yx=Dn.create,xx=Ht.create,bx=Wn.create,wx=qr.create,Xc=dt.create,kx=xt.create,Ax=Xt.create,Sx=dt.createWithPreprocess,jx=Fn.create,Ix=()=>Pl().optional(),Ex=()=>Zl().optional(),Cx=()=>Ml().optional(),Tx={string:e=>lt.create({...e,coerce:!0}),number:e=>Qt.create({...e,coerce:!0}),boolean:e=>On.create({...e,coerce:!0}),bigint:e=>Kt.create({...e,coerce:!0}),date:e=>mr.create({...e,coerce:!0})},Nx=q;var ye=Object.freeze({__proto__:null,defaultErrorMap:Vr,setErrorMap:N0,getErrorMap:es,makeIssue:ts,EMPTY_PATH:O0,addIssueToContext:C,ParseStatus:Ne,INVALID:q,DIRTY:Wr,OK:Ze,isAborted:za,isDirty:Ba,isValid:Tn,isAsync:Nn,get util(){return se},get objectUtil(){return Ua},ZodParsedType:O,getParsedType:Yt,ZodType:X,datetimeRegex:Ol,ZodString:lt,ZodNumber:Qt,ZodBigInt:Kt,ZodBoolean:On,ZodDate:mr,ZodSymbol:ns,ZodUndefined:Rn,ZodNull:Ln,ZodAny:Fr,ZodUnknown:pr,ZodNever:Zt,ZodVoid:is,ZodArray:ft,ZodObject:pe,ZodUnion:Pn,ZodDiscriminatedUnion:cs,ZodIntersection:Zn,ZodTuple:wt,ZodRecord:Mn,ZodMap:ss,ZodSet:_r,ZodFunction:zr,ZodLazy:$n,ZodLiteral:Dn,ZodEnum:Ht,ZodNativeEnum:Wn,ZodPromise:qr,ZodEffects:dt,ZodTransformer:dt,ZodOptional:xt,ZodNullable:Xt,ZodDefault:Un,ZodCatch:zn,ZodNaN:as,BRAND:J0,ZodBranded:Xa,ZodPipeline:Fn,ZodReadonly:Bn,custom:Ll,Schema:X,ZodSchema:X,late:Y0,get ZodFirstPartyTypeKind(){return F},coerce:Tx,any:nx,array:ox,bigint:H0,boolean:Ml,date:X0,discriminatedUnion:fx,effect:Xc,enum:xx,function:_x,instanceof:Q0,intersection:dx,lazy:vx,literal:yx,map:gx,nan:K0,nativeEnum:bx,never:sx,null:rx,nullable:Ax,number:Zl,object:ux,oboolean:Cx,onumber:Ex,optional:kx,ostring:Ix,pipeline:jx,preprocess:Sx,promise:wx,record:px,set:mx,strictObject:cx,string:Pl,symbol:ex,transformer:Xc,tuple:hx,undefined:tx,union:lx,unknown:ix,void:ax,NEVER:Nx,ZodIssueCode:E,quotelessJson:T0,ZodError:Je}),el=function(e,t,n){if(e&&"reportValidity"in e){var r=Da(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},$l=function(e,t){var n=function(n){var r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?el(r.ref,n,e):r.refs&&r.refs.forEach((function(t){return el(t,n,e)}))};for(var r in t.fields)n(r)},Ox=function(e,t){t.shouldUseNativeValidation&&$l(e,t);var n={};for(var r in e){var i=Da(t.fields,r),a=Object.assign(e[r]||{},{ref:i&&i.ref});if(Rx(t.names||Object.keys(e),r)){var s=Object.assign({},Da(n,r));Ta(s,"root",a),Ta(n,r,s)}else Ta(n,r,a)}return n},Rx=function(e,t){return e.some((function(e){return e.startsWith(t+".")}))},Lx=function(e,t){for(var n={};e.length;){var r=e[0],i=r.code,a=r.message,s=r.path.join(".");if(!n[s])if("unionErrors"in r){var o=r.unionErrors[0].errors[0];n[s]={message:o.message,type:o.code}}else n[s]={message:a,type:i};if("unionErrors"in r&&r.unionErrors.forEach((function(t){return t.errors.forEach((function(t){return e.push(t)}))})),t){var u=n[s].types,c=u&&u[r.code];n[s]=Xv(s,t,n,i,c?[].concat(c,r.message):r.message)}e.shift()}return n},Px=function(e,t,n){return void 0===n&&(n={}),function(r,i,a){try{return Promise.resolve(function(i,s){try{var o=Promise.resolve(e["sync"===n.mode?"parse":"parseAsync"](r,t)).then((function(e){return a.shouldUseNativeValidation&&$l({},a),{errors:{},values:n.raw?r:e}}))}catch(e){return s(e)}return o&&o.then?o.then(void 0,s):o}(0,(function(e){if(null!=e.errors)return{values:{},errors:Ox(Lx(e.errors,!a.shouldUseNativeValidation&&"all"===a.criteriaMode),a)};throw e})))}catch(e){return Promise.reject(e)}}},Dl=(e=>(e.header="header",e.avatar="avatar",e))(Dl||{});const Zx=({user:e,type:t})=>{var n,r,i,a;if(!e)return"";try{return("avatar"===t?null==(r=null==(n=e.avatar)?void 0:n.files[0])?void 0:r.uri:null==(a=null==(i=e.header)?void 0:i.files[0])?void 0:a.uri)||""}catch{return""}},Mx=e=>{const t=e.match(/^(.*?)(\d*)$/);if(t&&t[2]){const e=t[1]||"",n=t[2]||"0";return`${e}${parseInt(n,10)+1}`}return`${e}_1`},$x=()=>{const{data:e}=Iv({}),t=null==e?void 0:e.users[(null==e?void 0:e.users.length)-1||0];return{avatar:Zx({user:t,type:Dl.avatar}),displayName:null==t?void 0:t.displayName,username:(null==t?void 0:t.username)&&Mx(t.username)}},tl=({value:e,limit:t})=>j.jsxs("span",{children:[j.jsx("span",{className:gr("text-base font-semibold "+(null!=e&&e.length?"text-gray-900":"text-gray-400")),children:(null==e?void 0:e.length)||0}),j.jsxs("span",{className:"text-base font-semibold text-gray-400",children:["/",t]})]}),rl=e=>{e.preventDefault()},Dx=e=>e?{onOpenAutoFocus:rl,onCloseAutoFocus:rl}:{},Wx=({open:e,modal:t,children:n,onCloseModal:r,className:i,skipModalAutofocus:a=!1,...s})=>e?j.jsx(Zv,{open:e,modal:t,onOpenChange:e=>{e||null==r||r()},children:j.jsx(Mv,{className:gr(i),closeSize:"small",closeVariant:"insideCard",onCloseModal:r,...s,...Dx(a),childrenClassName:gr("overflow-auto",s.title?"max-h-[calc(90vh-65px)]":"max-h-[90vh]",s.childrenClassName),children:n})}):null,Wl=3,Ul=64,nl=5,il=2,zl=30,Ux=50,Bl=30,ls={short:"Too short",long:"Too long"},eo=new RegExp("\\p{Extended_Pictographic}","u"),Vl=({showInlineError:e=!0})=>ye.string().trim().min(1,e?"Username is required":"").min(2,e?"Must be at least 2 characters long":"").max(30,ls.long).regex(/^[0-9a-zA-Z_]+[0-9a-zA-Z_.]*$/,"Only latin letters, digits, _ and . allowed"),Fl=ye.string().trim().min(1,"Display name is required").max(50).regex(/^[^@]*$/,"@ is not allowed").superRefine(((e,t)=>{const n=eo.test(e),r=/[a-zA-Z0-9]/.test(e);n&&!r&&t.addIssue({code:ye.ZodIssueCode.custom,message:"Emojis alone are not allowed. Please add text"})})),zx=ye.string().max(1024,ls.long).optional(),ql=({minLength:e,minErrorMessage:t,maxLength:n,regexErrorMessage:r})=>ye.string().trim().min(e,t).max(n,ls.long).regex(/^[0-9a-zA-Z_]+[0-9a-zA-Z_.]*$/,r);ql({minLength:2,maxLength:30,regexErrorMessage:"Invalid characters. ex.: group_name_1"}),ql({minLength:2,minErrorMessage:ls.short,maxLength:30,regexErrorMessage:"Invalid characters. ex.: channel_name_1"}),ye.string().trim().min(1,"").regex(/^[0-9a-zA-Z_]+[0-9a-zA-Z_.]*$|^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{1,}$/,"Invalid characters");const Bx="Required: A-Z, a-z, 0-9, special character, min 3, max 64";ye.string().trim().superRefine(((e,t)=>{eo.test(e)&&t.addIssue({code:ye.ZodIssueCode.custom,message:"Emojis are not allowed"}),/[A-Z]/.test(e)&&/[a-z]/.test(e)&&/[0-9]/.test(e)&&/[^A-Za-z0-9]/.test(e)&&e.length>=3&&e.length<=64||t.addIssue({code:ye.ZodIssueCode.custom,message:Bx})})),ye.string().trim().min(5,"Must be at least 5 characters long").regex(/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/i,"Email format is not valid").refine((e=>!eo.test(e)),"Emojis are not allowed"),ye.object({bio:zx,username:Vl({showInlineError:!0}),displayName:Fl}),ye.object({show:ye.boolean(),dateOnly:ye.boolean(),date:ye.date().optional().nullable()}),ye.object({show:ye.boolean(),dateOnly:ye.boolean(),date:ye.date().optional().nullable()});const Vx=e=>{var t;const n=e,r=409===(null==n?void 0:n.status);return{message:"UserNameIsReserved"===(null==(t=null==n?void 0:n.data)?void 0:t.errorCode)?"Restricted words detected. Please, try alternatives":"Username already in use. Please, try another one",isError:r}},sl={displayName:56,username:30},Fx=ye.object({username:Vl({showInlineError:!1}),displayName:Fl}),O1=({isOpen:e,onAdd:t,onCancel:n})=>{const[r,i,a]=Il(),[s]=Ov(),{avatar:o,displayName:u,username:c}=$x(),[l,d]=hr(),f=ey({resolver:Px(Fx),defaultValues:{displayName:u,username:c}}),p=async({username:e,displayName:n})=>{try{i(),await s({userCreate:{displayName:n,username:e,actorType:"Service",avatarId:null,headerId:null}}),null==t||t(e)}catch(e){Ha.error("NewAppProfileModal submit error: ",e);const t=e,{isError:n,message:r}=Vx(t);n&&f.setError("username",{message:r})}finally{a()}},h=f.getFieldState("displayName").invalid||f.getFieldState("username").invalid||!f.getValues().displayName||!f.getValues().username;return j.jsxs(Wx,{open:e,onCloseModal:n,title:"Add an app",children:[j.jsx("p",{className:"mt-4 text-sm font-medium text-gray-500",children:"Create a new user name to join the APP NAME and with more text like so it is gonna work too"}),j.jsxs("div",{className:"my-4 flex items-center justify-between",children:[j.jsxs("div",{className:"flex items-center",children:[j.jsx(Ev,{size:96,name:f.getValues().displayName||"",imgUrl:o||(null==l?void 0:l.objectUrl)}),j.jsxs("div",{className:"ml-4 text-gray-700",children:[j.jsx("h4",{className:"mb-1 text-base font-semibold leading-[22px]",children:f.getValues().displayName}),f.getValues().username&&j.jsx("span",{className:"text-base font-semibold leading-[14px]",children:`@${f.getValues().username}`})]})]}),j.jsx(C0,{onChange:e=>d(e),className:"mr-2 cursor-pointer uppercase",children:"Change Photo"})]}),j.jsx($v,{...f,children:j.jsxs("form",{className:"even:*:my-5",onSubmit:(...e)=>{f.handleSubmit(p)(...e)},children:[j.jsx(Cc,{control:f.control,name:"displayName",render:({field:e})=>j.jsxs(Tc,{children:[j.jsxs("div",{className:"flex items-center justify-between",children:[j.jsx(Nc,{children:"Display Name"}),j.jsx(tl,{value:e.value,limit:sl.displayName})]}),j.jsx(Oc,{children:j.jsx(Rc,{...e})}),j.jsx(Lc,{})]})}),j.jsx(Cc,{control:f.control,name:"username",render:({field:e})=>j.jsxs(Tc,{className:"relative",children:[j.jsxs("div",{className:"flex items-center justify-between",children:[j.jsx(Nc,{children:"User name"}),j.jsx(tl,{value:e.value,limit:sl.username})]}),j.jsx("div",{className:"absolute left-3 top-[34px] text-sm text-gray-400",children:"@"}),j.jsx(Oc,{children:j.jsx(Rc,{className:"pl-7",...e})}),j.jsx(Lc,{})]})}),j.jsxs("div",{className:"flex w-full flex-row justify-end",children:[j.jsx(Fa,{variant:"tertiary",className:"mr-3 uppercase",onClick:n,children:"Cancel"}),j.jsx(qa,{size:"m",variant:"primary",type:"submit",className:"uppercase",disabled:h,isLoading:r,children:"Add"})]})]})})]})},qx=({code:e})=>{const{title:t,description:n}=ry(e);return j.jsxs("div",{className:"mt-10 flex w-[580px] flex-col items-center text-lg text-red-500",children:[j.jsx("h3",{className:"font-semibold",children:t}),j.jsx("p",{className:"text-sm",children:n})]})},Gl=(e,t)=>{const[n,r]=Qi.capitalize(e).split(" "),i=e=>{var t;return null==(t=e.at(0))?void 0:t.toUpperCase()};return t&&r?`${i(n)}${i(r)}`:n.slice(0,t?2:1)},Gx=({title:e,preview:t,description:n,onClick:r})=>j.jsxs("div",{className:"rounded-xs flex cursor-pointer flex-row bg-white p-2 hover:shadow-md",onClick:r,children:[j.jsxs(ll,{className:"rounded-xs mr-3 h-10 w-10",children:[j.jsx(fl,{className:"border-2 border-solid border-gray-900/20",src:t||"",alt:"app-avatar"}),j.jsx(dl,{children:Gl(e)})]}),j.jsxs("div",{className:"flex flex-col",children:[j.jsx("h4",{className:"text-sm font-semibold text-gray-800",children:e}),j.jsx("p",{className:"text-sm text-gray-600",children:n})]})]}),R1=({list:e,onClick:t})=>j.jsx("div",{className:"grid grid-cols-2 gap-4 pt-6",children:null==e?void 0:e.map((e=>j.jsx(Gx,{onClick:()=>t(e.id),...e},e.id)))}),L1=({title:e,hasBack:t=!1})=>{const n=ny();return j.jsxs("h1",{className:"mb-8 flex flex-row items-center text-lg font-semibold uppercase text-gray-700",children:[t&&j.jsx(ky,{className:"mr-4 cursor-pointer",onClick:()=>n(-1)}),e]})},P1=(e=[],t)=>e.find((e=>{var n,r;return+((null==(r=null==(n=e.split("/").pop())?void 0:n.match(/\d+/))?void 0:r[0])||0)===t}))||e[0],Z1="appId",Jx=()=>{const e=iy();return Rv({appId:e.appId},{skip:!e.appId})},M1=({children:e})=>j.jsx("div",{className:"pl-5 pr-5 *:mt-6 first:*:mt-0",children:e}),Yx=e=>{const[t,n]=hr(),[r,i]=hr(0),[a,s]=hr(),o=Array.from(Array(a).keys());return os((()=>{t&&(s(t.slideNodes().length),i(t.selectedScrollSnap()+1),t.on("select",(()=>{i(t.selectedScrollSnap()+1)})))}),[t]),[n,()=>o.length<2?null:j.jsx("ul",{className:"flex min-h-5 items-center justify-center",children:null==o?void 0:o.map(((e,n)=>j.jsx("li",{onClick:()=>null==t?void 0:t.scrollTo(n),className:gr("ml-0.5 size-1.5 cursor-pointer rounded-[10px] bg-gray-300 transition-[0.2s]",n+1===r&&"w-3 bg-gray-700")},n)))}),t,r]},$1=({previews:e})=>{const[t,n]=Yx();return j.jsxs(Dv,{setApi:t,className:"w-full overflow-hidden rounded-[6px]",children:[j.jsx(Wv,{children:e.map(((e,t)=>j.jsx(Uv,{className:"flex max-w-[100%] basis-[unset] items-center",children:j.jsx("img",{src:e,className:"h-[260px]"})},t)))}),j.jsx(zv,{}),j.jsx(Bv,{}),j.jsx(n,{})]})},D1=({children:e})=>{const{data:t,isSuccess:n,isLoading:r,isError:i,error:a}=Jx();return r?j.jsx(Xy,{}):i?j.jsx(qx,{code:a.status}):n?e(t):null},W1=({appId:e,canDelete:t,onDelete:n})=>{const[r,i]=hr(!1),[a,,,s]=Il(),[o,{isLoading:u,isSuccess:c}]=Ly();return os((()=>{c&&(null==n||n())}),[c,n]),j.jsxs("div",{className:"flex flex-col",children:[j.jsx(qa,{disabled:!t,className:gr("mb-2 mt-3 h-10 w-32 bg-red-500 uppercase",!t&&"bg-gray-500"),isLoading:u,onClick:()=>i(!0),children:"Delete App"}),j.jsx(Vv,{open:r,onOpenChange:i,children:j.jsxs(Fv,{children:[j.jsxs(qv,{children:[j.jsx(Gv,{children:"Are you absolutely sure?"}),j.jsx(Jv,{children:"This action cannot be undone. This will permanently delete your app and remove your data from our servers."})]}),j.jsxs(Yv,{children:[j.jsx(Qv,{children:"Cancel"}),j.jsx(Kv,{onClick:()=>{o({appId:e})},children:"Continue"})]})]})}),!t&&j.jsxs("div",{className:"text-sm font-medium text-gray-500",children:[j.jsxs("div",{className:"flex flex-row",children:[j.jsx("span",{children:"There are active users, you cannot delete this app. "}),j.jsxs(Fa,{size:"s",variant:"tertiary",className:"text-blue_100 ml-1 underline",onClick:s,children:["Read ",a?"less":"more"]})]}),a&&j.jsx("p",{children:"some description here"})]})]})},Qx=({preview:e,title:t,className:n})=>j.jsxs(ll,{className:gr("rounded-xs h-24 w-24",n),children:[j.jsx(fl,{className:"border-2 border-solid border-gray-900/20",src:e||"",alt:"app-avatar"}),j.jsx(dl,{className:"text-3xl font-semibold text-gray-700",children:Gl(t)})]}),U1=()=>null,z1=({children:e})=>j.jsx("p",{className:"w-full text-sm text-gray-900",children:e}),Kx=e=>`@${e.username}${e.local?"":`@${e.domain}`}`,Hx=e=>{try{const{type:t,payload:n}=e,r={type:t};return void 0!==n&&(r.payload=JSON.parse(JSON.stringify(n))),r}catch(t){return Ha.warn(`Could not serialize action type: ${e.type}`,t),{type:e.type,payload:`[Non-serializable payload for action: ${e.type}]`}}},Xx=e=>{const t=window.parent??window;if(t)try{const n=Hx(e);t.postMessage(n,"*")}catch(e){Ha.error("Failed to process or send message:",e)}},to="auth_token",Jl=()=>Vn.get(to)||void 0,e1=e=>Vn.set(to,e),t1=()=>Vn.remove(to),r1=()=>!!Jl(),n1={getToken:Jl,setToken:e1,removeToken:t1,hasToken:r1},al={forgotPasswordStep:"request",forgotPasswordFields:null,signupStep:"rules",signupFields:null,token:null,newEmail:null,isPending:!!n1.getToken(),isAuthenticated:!1,isAskLoginOpen:!1},i1=cl({name:"auth",initialState:al,reducers:{setAskLoginOpen:(e,t)=>{e.isAskLoginOpen=t.payload},login:(e,t)=>{e.isAuthenticated=!0,e.token=t.payload||null,e.isPending=!1},logout:()=>({...al,isPending:!1}),setNewEmail:(e,t)=>{e.newEmail=t.payload},setForgotPasswordStep:(e,t)=>{e.forgotPasswordStep=t.payload},updateForgotPasswordFields:(e,t)=>{e.forgotPasswordFields={...e.forgotPasswordFields,...t.payload}},resetForgotPasswordFields:e=>{e.forgotPasswordFields=null},setSignupStep:(e,t)=>{e.signupStep=t.payload},updateSignupFields:(e,t)=>{e.signupFields={...e.signupFields,...t.payload}},resetSignupFields:e=>{e.signupFields=null},setPending:(e,t)=>{e.isPending=t.payload}},selectors:{selectAskLoginOpen:e=>e.isAskLoginOpen,selectToken:e=>e.token,selectNewEmail:e=>e.newEmail,selectForgotPasswordStep:e=>e.forgotPasswordStep,selectForgotPasswordFields:e=>e.forgotPasswordFields,selectSignupStep:e=>e.signupStep,selectSignupFields:e=>e.signupFields,selectPending:e=>e.isPending,selectIsAuthenticated:e=>e.isAuthenticated}}),s1=()=>{window.parent===window?ty().dispatch(i1.actions.setAskLoginOpen(!0)):Xx(Uy())},a1=e=>{const t=Hi(yl.selectors.selectCurrentUser),n=Hi(Pv.selectors.selectIsAuthenticated),r="SUSPENDED"===(null==t?void 0:t.state),i=r;return{isDisabled:i,guardedAction:(e=()=>{})=>()=>{n?n&&!r&&e():s1()},ActionTooltipWrapper:({children:e,triggerClassname:n})=>i?j.jsx(Hv,{theme:"dark",tooltipText:`${Kx(t)} is suspended`,size:"default",triggerClassname:n,children:j.jsx("div",{className:"!pointer-events-auto w-full",children:e})}):j.jsx(j.Fragment,{children:e})}},o1=({title:e,developer:t,buttonName:n,isLoading:r=!1,renderButtons:i,onClick:a})=>{const{isDisabled:s,ActionTooltipWrapper:o}=a1();return j.jsxs("div",{className:"flex flex-col",children:[j.jsx("div",{className:"flex flex-row items-center text-3xl font-semibold uppercase leading-7 text-gray-700",children:j.jsx("span",{children:e})}),t&&j.jsx("div",{className:"text-blue_100 mt-1 text-sm",children:t}),j.jsx(o,{children:j.jsxs("div",{className:"mt-3 flex justify-center",children:[j.jsx(qa,{size:"m",variant:"primary",className:"uppercase",isLoading:r,onClick:a,disabled:s,children:n}),j.jsx("div",{className:"ml-2",children:null==i?void 0:i()})]})})]})},B1=({title:e,developer:t,preview:n,buttonName:r,isLoading:i,onClick:a,renderButtons:s})=>j.jsxs("div",{className:"flex items-center justify-between",children:[j.jsx(o1,{title:e,developer:t,buttonName:r,isLoading:i,onClick:a,renderButtons:s}),j.jsx(Qx,{preview:n,title:e})]}),V1=({group:e})=>{const{getLastAppLink:t}=Hy({entryPoint:"GROUP"}),[n,r]=hr(null);return os((()=>{const n=null==e?void 0:e.groupId,i=null==e?void 0:e.groupName;n&&i&&(async()=>{const e=await t({groupId:n,groupName:i});e&&r(e)})()}),[null==e?void 0:e.groupId,null==e?void 0:e.groupName,t]),n};export{D1 as AppData,W1 as AppDelete,z1 as AppDescription,N1 as AppInfo,$1 as AppPreviews,U1 as AppUsernames,M1 as AppViewContainer,qx as AppViewError,R1 as AppsList,L1 as Header,Xy as Loader,O1 as NewAppProfileModal,B1 as TitleAvatarBlock,Z1 as appIdParam,Ny as appsApi,P1 as getAppIcon,b1 as useAppRoute,$y as useDefaultChannelLink,Ly as useDeleteApiV1AppsByAppIdMutation,A1 as useDeleteApiV1AppsUserByAppIdMutation,E1 as useGetApiV1AppsInstalledQuery,j1 as useGetApiV1AppsQuery,I1 as useGetApiV1AppsUserQuery,k1 as useGetApiV1GroupsByGroupIdAppsQuery,Yy as useGetAppLink,V1 as useGroupLink,Zy as useLazyGetApiV1AppsQuery,Py as useLazyGetApiV1AppsUserQuery,Ry as useLazyGetApiV1GroupsByGroupIdAppsQuery,Oy as useLazyGetApiV1GroupsByGroupIdChannelsQuery,Hy as useOpenLastApp,Qy as usePersonalAppsList,C1 as usePostApiV1AppsMutation,S1 as usePutApiV1AppsUserByAppIdMutation,w1 as usePutApiV1GroupsByGroupIdAppsAndAppIdMutation,T1 as useSetLastApp};
|