1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="fba6cb4c-bf10-432d-9683-a6f87acd79d8",e._sentryDebugIdIdentifier="sentry-dbid-fba6cb4c-bf10-432d-9683-a6f87acd79d8")}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9843],{41138:function(e,t,n){n.d(t,{j:function(){return o}});var i=n(14922),r=n.n(i);function o(e,t){return r()(e,{require_protocol:!0,protocols:["https"],disallow_auth:!0,...t})}},80261:function(e,t,n){n.d(t,{o:function(){return r}});var i=n(44309);function r(e,t){return(0,i.o)(e,t)}},69843:function(e,t,n){n.d(t,{_:function(){return r},Z:function(){return q}});var i,r,o=n(52322),a=n(2784),s=n(55028),l=n(28021),d=n(14533),c=n(12866),p=n(46448),u=n(64827),g=n(16005),m=n(93338),f=n(77430),h=n(80261),w=n(56312),x=n(74134),y=n(91882),_=n(47042),b=n(78882),v=n(73259),I=n(93102),P=n(87422),j=n(88414),T=n(74769),S=n(63556);let E=c.ZP.div.withConfig({displayName:"password__PasswordLabelWrapper",componentId:"sc-27c841ce-0"})(["display:flex;justify-content:space-between;align-items:end;gap:",";"],e=>{let{theme:t}=e;return t.spacing[4]}),Z=c.ZP.div.withConfig({displayName:"password__ResetPasswordWrapper",componentId:"sc-27c841ce-1"})(["display:flex;flex-direction:column-reverse;align-items:end;"]),R="login-with-email-and-password-password-id";function C(e){let{error:t,sendMagicLinkProps:n,...i}=e,{t:r}=(0,w.$G)(),l=(0,a.useRef)(null);return(0,a.useEffect)(()=>{setTimeout(()=>{var e;null===(e=l.current)||void 0===e||e.focus()},500)},[]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(E,{children:[(0,o.jsx)(s.Z,{htmlFor:R,variant:t?"DANGER":void 0,marginBottom:1,required:!0,children:r("password")}),n&&(0,o.jsx)(Z,{children:(0,o.jsx)(S.Z,{...n,showOnlyButton:!0,variant:"RESET_PASSWORD"})})]}),(0,o.jsx)(d.Z,{id:R,placeholder:r("settings_delete_account_passwordPlaceholder"),ref:l,autoComplete:"current-password",required:!0,...i,valid:!t,outerWrapperProps:{marginBottom:1},...(0,h.o)("login-password")}),t&&(0,o.jsx)(T.X,{restError:t})]})}var N=n(16997);function O(){(0,N.L)({category:"Login",action:"Password login result",name:"Success"})}function A(){(0,N.L)({category:"Login",action:"Password login result",name:"Error"})}function L(){(0,N.L)({category:"Login",action:"Reset password clicked"})}function U(){(0,N.L)({category:"Login",action:"OTP requested"})}let D=c.ZP.div.withConfig({displayName:"login-with-email-and-password__EmailInputWrapper",componentId:"sc-fc2a0d8d-0"})(["display:none;"]),k=c.ZP.div.withConfig({displayName:"login-with-email-and-password__InputWrapper",componentId:"sc-fc2a0d8d-1"})(["margin-bottom:",";"],e=>{let{theme:t}=e;return t.spacing[4]}),W=(0,c.ZP)(p.ZP).withConfig({displayName:"login-with-email-and-password__FullWidthButton",componentId:"sc-fc2a0d8d-2"})(["width:100%;text-align:center;"]),F=(0,c.ZP)(v.Z).withConfig({displayName:"login-with-email-and-password__SendOTPMail",componentId:"sc-fc2a0d8d-3"})(["width:100%;text-align:center;"]),M=c.ZP.div.withConfig({displayName:"login-with-email-and-password__DividerWrapper",componentId:"sc-fc2a0d8d-4"})(["display:flex;justify-content:center;align-items:center;gap:",";margin:"," 0;span{font-size:12px;line-height:150%;color:",";}"],e=>{let{theme:t}=e;return t.spacing[4]},e=>{let{theme:t}=e;return t.spacing[6]},e=>{let{theme:t}=e;return t.colors.surface.on}),B=c.ZP.div.withConfig({displayName:"login-with-email-and-password__OtpMailWrapper",componentId:"sc-fc2a0d8d-5"})(["display:flex;flex-direction:column;align-items:flex-start;gap:",";p{text-align:start;}*{margin:0;}"],e=>{let{theme:t}=e;return t.spacing[4]});(i=r||(r={})).DEFAULT="DEFAULT",i.REGISTRATION="REGISTRATION",i.WITHOUT_PASSWORD="WITHOUT_PASSWORD";let G="login-with-email-and-password-email-id";var q=function(e){let{email:t,onBack:n,onLoginCompleted:i=()=>{},onSendMagicLinkCompleted:r=()=>{},getMagicLinkTargetUrl:c,variant:v="DEFAULT",onTOTPRequired:T=()=>{},onOTPMailSent:S=()=>{},origin:E}=e,{t:Z}=(0,w.$G)(),R=(0,j.P)("remove-otp-in-studio"),N="studio"===E&&R,{colors:q}=(0,m.Fg)(),[z,{loading:H,error:K}]=(0,b.f0)({onLoginCompleted:e=>{i(e),O()},onTOTPRequired:e=>{T(e),O()},onOTPRequired:()=>{O(),S()},onError:A}),[$,J]=(0,a.useState)(null),{sendOTPMail:X,loading:Q,error:V}=(0,P.i)({onOTPMailSent:e=>{J(e),S()}}),Y=(0,d.J)();async function ee(){Y.value&&await z({type:"EMAIL_AND_PASSWORD",email:t,password:Y.value})}return((0,a.useEffect)(()=>{"WITHOUT_PASSWORD"===v&&X(t)},[t,v]),"WITHOUT_PASSWORD"===v)?Q&&!$?(0,o.jsx)(g.Z,{color:q.tertiary.base}):V&&!$?(0,o.jsx)(f.ZP,{severity:"ERROR",children:V}):$?(0,o.jsx)(B,{children:(0,o.jsx)(I.Z,{email:t,otpKey:$,onTOTPRequired:T,onLoginCompleted:i,variant:"REGISTRATION"})}):null:"REGISTRATION"===v?$?(0,o.jsx)(B,{children:(0,o.jsx)(I.Z,{email:t,otpKey:$,onTOTPRequired:T,onLoginCompleted:i,variant:"REGISTRATION"})}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(k,{children:(0,o.jsx)(C,{...Y,error:K,onKeyDown:e=>"Enter"!==e.key||(e.preventDefault(),e.stopPropagation(),ee(),!1),sendMagicLinkProps:{email:t,onSendMagicLinkCompleted:()=>{r(),L()},getMagicLinkTargetUrl:c},required:!1})}),(0,o.jsxs)(p.W4,{marginTop:6,align:"END",children:[(0,o.jsx)(F,{variant:"OUTLINED",email:t,onOTPMailSent:e=>{J(e),U(),S()},children:Z("login.send-one-time-code")}),(0,o.jsx)(p.ZP,{form:"login-form",type:"button",disabled:!Y.value,loading:H,...(0,h.o)("login-password-submit"),onClick:ee,children:Z("login.login-with-password")})]})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(y.xE,{onBack:n}),(0,o.jsxs)("form",{onSubmit:e=>{e.preventDefault(),e.stopPropagation(),ee()},id:"login-form",children:[(0,o.jsx)(_.D,{children:Z("login.it-s-a-pleasure-to-see-you-again")}),(0,o.jsx)(x.d,{...(0,h.o)("login-password-modal-subtitle"),children:Z(N?"login.enter-your-password":"login.enter-you-password-or-get-otp-code",{email:t})}),(0,o.jsxs)(D,{children:[(0,o.jsx)(s.Z,{htmlFor:G,children:Z("join_event_email_label")}),(0,o.jsx)(l.ZP,{disabled:!0,value:t,type:"email",id:G,autoComplete:"email",required:!0,placeholder:Z("join_event_email_placeholder")})]}),(0,o.jsx)(C,{...Y,error:K,sendMagicLinkProps:{email:t,onSendMagicLinkCompleted:()=>{r(),L()},getMagicLinkTargetUrl:c}}),(0,o.jsx)(W,{marginTop:6,type:"submit",disabled:!Y.value,loading:H,...(0,h.o)("login-password-submit"),children:Z("login.login-with-password")})]}),!N&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(M,{children:[(0,o.jsx)(u.Z,{}),(0,o.jsx)("span",{children:Z("or")}),(0,o.jsx)(u.Z,{})]}),(0,o.jsx)(F,{variant:"OUTLINED",email:t,onOTPMailSent:()=>{U(),S()},children:Z("login.send-one-time-code")})]})]})}},80549:function(e,t,n){n.d(t,{i:function(){return d}});var i=n(2784),r=n(41138),o=n(63079),a=n(74769);let s={loading:!1,error:void 0};function l(e,t){switch(t.type){case"START_SUBMIT":return{...s,loading:!0};case"SUBMIT_SUCCESS":return{...e,loading:!1};case"SUBMIT_FAILURE":return{...e,loading:!1,error:t.error};default:throw Error()}}function d(e){let{onCompleted:t,onError:n=()=>void 0}=e,[{loading:d,error:c},p]=(0,i.useReducer)(l,s),u=(0,o.KH)(),{translateError:g,fallbackErrorMessage:m}=(0,a.x)();return[(0,i.useCallback)(async(e,i)=>{p({type:"START_SUBMIT"});try{var o,a;let s=await u.sendMagicLinkMail(e,i&&(0,r.j)(i)?i:void 0),l=await s.json();200===s.status?(t(),p({type:"SUBMIT_SUCCESS"})):l.error?(n(null!==(o=g(l.error))&&void 0!==o?o:m),p({type:"SUBMIT_FAILURE",error:l.error})):(n(null!==(a=g(l.message))&&void 0!==a?a:m),p({type:"SUBMIT_FAILURE",error:l.message}))}catch(e){n(e),p({type:"SUBMIT_FAILURE",error:e})}},[t,u]),{loading:d,error:c}]}},63556:function(e,t,n){var i=n(52322),r=n(46448),o=n(12866),a=n(76505),s=n(56312),l=n(74769),d=n(80549);let c=(0,o.ZP)(a.Z).withConfig({displayName:"send-magic-link__Description",componentId:"sc-68b20db0-0"})(["display:inline-block;margin-inline-end:",";"],e=>{let{theme:t}=e;return t.spacing[1]});t.Z=function(e){let{email:t,onSendMagicLinkCompleted:n=()=>void 0,getMagicLinkTargetUrl:o=()=>void 0,showOnlyButton:a,variant:p="DEFAULT"}=e,{t:u}=(0,s.$G)(),[g,{loading:m,error:f}]=(0,d.i)({onCompleted:n});return(0,i.jsxs)(i.Fragment,{children:[!a&&(0,i.jsx)(c,{children:u("TOTP"===p?"mfa.totp.unable-to-generate-code":"login.password-forgotten")}),(0,i.jsx)(r.ZP,{variant:"LINK",size:"SMALL",loading:m,onClick:()=>{g(t,o())},children:u("RESET_PASSWORD"===p?"login.reset-password":"login.send-me-a-magic-link-button-content")}),f&&(0,i.jsx)(l.X,{restError:f})]})}},88414:function(e,t,n){n.d(t,{P:function(){return r}});var i=n(52862);function r(e){return(0,i.P5)(e)}},77430:function(e,t,n){n.d(t,{T2:function(){return x},Cd:function(){return P},ZP:function(){return T}});var i=n(52322),r=n(12866),o=n(31383),a=n(82599),s=n(1425),l=n(31476);let d=(0,r.ZP)(function(e){return(0,i.jsx)(l.Z,{...e,url:"https://static.swapcard.com/public/images/b281eb148b5a4e1aaa4be3066d3c6749.svg"})}).withConfig({displayName:"check-circle__StyledIcon",componentId:"sc-ff4a2de2-0"})([""]);var c=n(93338),p=n(5648),u=n(83106),g=n(46448),m=n(8626),f=n(84537);let h={ERROR:(0,i.jsx)(a.Z,{}),WARNING:(0,i.jsx)(s.Z,{}),INFO:(0,i.jsx)(s.Z,{}),DEFAULT:(0,i.jsx)(s.Z,{}),SUCCESS:(0,i.jsx)(d,{})};function w(e){let{severity:t,theme:n}=e;switch(t){case"ERROR":return(0,f.U)({type:f.a.ERROR,theme:n});case"WARNING":return(0,f.U)({type:f.a.WARNING,theme:n});case"SUCCESS":return(0,f.U)({type:f.a.SUCCESS,theme:n});case"INFO":return(0,f.U)({type:f.a.INFO,theme:n});default:return(0,f.U)({type:f.a.DEFAULT,theme:n})}}let x=(0,r.ZP)(g.ZP).attrs({variant:"GHOST"}).withConfig({displayName:"alert__AlertButton",componentId:"sc-7615d01b-0"})(["font-weight:500;"]),y=(0,r.ZP)(g.ZP).attrs({variant:"LINK"}).withConfig({displayName:"alert__AlertLink",componentId:"sc-7615d01b-1"})(["text-decoration:underline;"]),_=r.ZP.div.withConfig({displayName:"alert__Wrapper",componentId:"sc-7615d01b-2"})(["border-radius:",";background:",";padding:",";color:",";display:inline-block;","{color:",";&:hover{background-color:",";}}","{color:",";&:hover{color:",";}}svg,","{color:",";}"," ",""],e=>{let{theme:t}=e;return t.radius.md},e=>{let{severity:t,theme:n}=e;return w({severity:t,theme:n}).lowEmphasis},e=>{let{theme:{spacing:t}}=e;return"".concat(t[2]," ").concat(t[4])},e=>{let{severity:t,theme:n}=e;return w({severity:t,theme:n}).highEmphasis},x,e=>{let{severity:t,theme:n}=e;return w({severity:t,theme:n}).highEmphasis},e=>{let{severity:t,theme:n}=e;return(0,u.Z)(w({severity:t,theme:n}).highEmphasis,.04)},y,e=>{let{severity:t,theme:n}=e;return(0,u.Z)(w({severity:t,theme:n}).highEmphasis,.8)},e=>{let{severity:t,theme:n}=e;return w({severity:t,theme:n}).highEmphasis},l.Z,e=>{let{severity:t,theme:n}=e;return w({severity:t,theme:n}).highEmphasis},e=>{let{variant:t}=e;return"WIDE"===t&&(0,o.iv)(["border-radius:0px;box-sizing:border-box;display:flex;justify-content:center;@media screen and (min-width:","px){padding:",";}"],e=>{let{theme:t}=e;return t.breakPoints.sm},e=>{let{theme:t}=e;return t.spacing[6]})},m.F),b=(e,t)=>e?t?(0,o.iv)(["grid-template-columns:auto 1fr auto;"]):(0,o.iv)(["grid-template-columns:1fr auto;"]):t?(0,o.iv)(["grid-template-columns:auto 1fr;"]):(0,o.iv)(["grid-template-columns:auto;"]),v=r.ZP.div.withConfig({displayName:"alert__Grid",componentId:"sc-7615d01b-3"})(["display:grid;grid-gap:",";align-items:center;"," ",""],e=>{let{theme:t}=e;return t.spacing[2]},e=>{let{withAction:t,withIcon:n}=e;return b(t,n)},e=>{let{variant:t,$maxWidth:n,withAction:i,withIcon:r}=e;return"WIDE"===t&&(0,o.iv)(["width:100%;max-width:",";grid-template-columns:1fr;text-align:center;justify-items:center;svg,","{font-size:24px;align-self:start;top:2px;}@media screen and (min-width:","px){"," text-align:start;justify-items:start;}"],n,l.Z,e=>{let{theme:t}=e;return t.breakPoints.sm},b(i,r))}),I=r.ZP.div.withConfig({displayName:"alert__Text",componentId:"sc-7615d01b-4"})(["font-size:14px;min-width:100px;max-width:800px;line-height:21px;
1"]),P=r.ZP.strong.withConfig({displayName:"alert__AlertTitle",componentId:"sc-7615d01b-5"})(["display:block;font-size:16px;font-weight:600;line-height:24px;"]),j=r.ZP.div.withConfig({displayName:"alert__Action",componentId:"sc-7615d01b-6"})(["",""],e=>{let{theme:t}=e;return"rtl"===t.dir?(0,o.iv)(["margin-right:",";"],e=>{let{theme:t}=e;return t.spacing[1]}):(0,o.iv)(["margin-left:",";"],e=>{let{theme:t}=e;return t.spacing[1]})});function T(e){let{children:t,severity:n="DEFAULT",action:r,withIcon:o=!0,customIcon:a,variant:s="NORMAL",innerMaxWidth:l,...d}=e,{breakPoints:u}=(0,c.Fg)(),g=(0,p.ZP)({maxWidth:u.xs})&&r?"WIDE":s;return(0,i.jsx)(_,{variant:g,severity:n,...d,children:(0,i.jsxs)(v,{variant:g,$maxWidth:l,withAction:!!r,withIcon:o||!!a,children:[null!=a?a:o&&h[n],(0,i.jsx)(I,{children:t}),r&&(0,i.jsx)(j,{children:r})]})})}},14533:function(e,t,n){n.d(t,{Z:function(){return w},J:function(){return f}});var i=n(52322),r=n(2784),o=n(28021),a=n(15375),s=n(12866),l=n(31476);let d=(0,s.ZP)(function(e){return(0,i.jsx)(l.Z,{...e,url:"https://static.swapcard.com/public/images/abc5f309b2984755a2113dac8335cc18.svg"})}).withConfig({displayName:"eye__StyledIcon",componentId:"sc-7b482a46-0"})([""]),c=(0,s.ZP)(function(e){return(0,i.jsx)(l.Z,{...e,url:"https://static.swapcard.com/public/images/db5b55eeef7a4930a46d895c47a4a187.svg"})}).withConfig({displayName:"eye-off__StyledIcon",componentId:"sc-7d354f84-0"})([""]),p=(0,s.ZP)(d).withConfig({displayName:"eyes__Eye",componentId:"sc-8471efe-0"})(["color:",";"],e=>{let{theme:{colors:t}}=e;return t.text.base}),u=(0,s.ZP)(c).withConfig({displayName:"eyes__EyeOff",componentId:"sc-8471efe-1"})(["color:",";"],e=>{let{theme:{colors:t}}=e;return t.text.base});var g=function(e){let{type:t}=e;switch(t){case"password":return(0,i.jsx)(p,{});case"text":return(0,i.jsx)(u,{});default:return null}};let m=s.ZP.button.attrs({type:"button"}).withConfig({displayName:"button__Button",componentId:"sc-ec8db3a5-0"})(["background:none;border:none;position:relative;top:2px;outline:0;cursor:pointer;"]);function f(){let{isValid:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,o.Gl)({isValid:e}),[n,i]=(0,r.useState)("password"),a=(0,r.useCallback)(()=>{i(e=>"password"===e?"text":"password")},[i]);return{...t,type:n,onToggleType:a}}let h=(0,r.forwardRef)((e,t)=>{let{onToggleType:n,...r}=e,s=(0,a.T_)();return(0,i.jsx)(o.ZP,{...r,ref:t,right:(0,i.jsx)(m,{onClick:n,"aria-label":"password"===r.type?s.hidePassword:s.showPassword,children:(0,i.jsx)(g,{type:r.type})})})});h.displayName="InputPassword";var w=h}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.