(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[235],{63618:function(){},73804:function(){},69547:function(e,r,t){Promise.resolve().then(t.bind(t,22148))},22148:function(e,r,t){"use strict";t.r(r);var n=t(8643),i=t(59198),a=t(73184),s=t(96151),o=t(71229),d=t(50615);r.default=()=>{let[e,r]=(0,i.useState)(!1),{address:t,isConnected:l}=(0,s.mA)(),{signMessageAsync:u}=(0,s.QW)(),[c,f]=(0,i.useState)(!1);if((0,i.useEffect)(()=>r(!0),[]),!e)return(0,n.jsx)(n.Fragment,{});let g=async()=>{l||open();try{let e=new a.SiweMessage({domain:window.location.host,uri:window.location.origin,version:"1",address:t,statement:"Login",nonce:await (0,o.getCsrfToken)()}),r=await u({message:e.prepareMessage()});f(!0);let n=await (0,o.signIn)("eth",{message:JSON.stringify(e),signature:r,redirect:!0,callbackUrl:"/"});(null==n?void 0:n.error)&&console.log("Error occured:",n.error)}catch(e){console.log("Error Occured",e)}};return(0,n.jsxs)("main",{className:"flex min-h-screen flex-col items-center justify-center",children:[!l&&(0,n.jsx)(n.Fragment,{children:t}),l&&!c&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(d.zx,{onClick:g,children:"Sign Message to Login"})}),l&&c&&(0,n.jsx)("p",{children:"You are being authenticated. Please wait..."})]})}},50615:function(e,r,t){"use strict";t.d(r,{zx:function(){return m}});var n=t(8643),i=t(59198),a=t(60465),s=t(98370),o=t(48817);function d(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return(0,o.m)((0,s.W)(r))}let l=(0,a.j)("relative w-full rounded-lg border p-4 [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),u=i.forwardRef((e,r)=>{let{className:t,variant:i,...a}=e;return(0,n.jsx)("div",{ref:r,role:"alert",className:d(l({variant:i}),t),...a})});u.displayName="Alert";let c=i.forwardRef((e,r)=>{let{className:t,...i}=e;return(0,n.jsx)("h5",{ref:r,className:d("mb-1 font-medium leading-none tracking-tight",t),...i})});c.displayName="AlertTitle";let f=i.forwardRef((e,r)=>{let{className:t,...i}=e;return(0,n.jsx)("div",{ref:r,className:d("text-sm [&_p]:leading-relaxed",t),...i})});f.displayName="AlertDescription";var g=t(77933);let v=(0,a.j)("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),m=i.forwardRef((e,r)=>{let{className:t,variant:i,size:a,asChild:s=!1,...o}=e,l=s?g.g7:"button";return(0,n.jsx)(l,{className:d(v({variant:i,size:a,className:t})),ref:r,...o})});m.displayName="Button"}},function(e){e.O(0,[961,358,658,123,69,744],function(){return e(e.s=69547)}),_N_E=e.O()}]);