PageSourceSearch

https://bags.fm/_next/static/chunks/4197.a21798507e414c13.js

js bags.fm collected 2026-09-25 19:10:55 UTC 14,533 bytes, 97 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4197],{6865:(e,n,t)=>{t.d(n,{A:()=>r});var o=t(12115);let r=o.forwardRef(function(e,n){let{title:t,titleId:r,...l}=e;return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":r},l),t?o.createElement("title",{id:r},t):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))})},61924:(e,n,t)=>{t.d(n,{C:()=>m});var o=t(95155),r=t(12115),l=t(43262),a=t(75564),i=t(25124),s=t(56186),c=t(19042),d=t(24816),u=t(97627);let h=({value:e,onChange:n})=>(0,o.jsx)("select",{value:e,onChange:n,children:a.QN.map(e=>(0,o.jsxs)("option",{value:e.code,children:[e.code," +",e.callCode]},e.code))}),m=(0,r.forwardRef)((e,n)=>{let t=(0,s.u)(),[l,m]=(0,r.useState)(!1),{accountType:f}=(0,c.h)(),[y,j]=(0,r.useState)(""),[g,v]=(0,r.useState)(e.defaultCountry??t?.intl.defaultCountry??"US"),w=(0,a.Q7)(y,g),b=(0,a.qi)(g),C=(0,a.jZ)(g),k=(0,i.K)(g),S=!w,[M,E]=(0,r.useState)(!1),F=k.length,P=n=>{let t=n.target.value;v(t),j(""),e.onChange&&e.onChange({rawPhoneNumber:y,qualifiedPhoneNumber:(0,a.n4)(y,t),countryCode:t,isValid:(0,a.Q7)(y,g)})},R=(n,t)=>{try{let o=n.replace(/\D/g,"")===y.replace(/\D/g,"")?n:b.input(n);j(o),e.onChange&&e.onChange({rawPhoneNumber:o,qualifiedPhoneNumber:(0,a.n4)(n,t),countryCode:t,isValid:(0,a.Q7)(n,t)})}catch(e){console.error("Error processing phone number:",e)}},T=()=>{E(!0);let n=(0,a.n4)(y,g);e.onSubmit({rawPhoneNumber:y,qualifiedPhoneNumber:n,countryCode:g,isValid:(0,a.Q7)(y,g)}).finally(()=>E(!1))};return(0,r.useEffect)(()=>{if(e.defaultValue){let n=(0,a.oj)(e.defaultValue);b.reset(),P({target:{value:n.countryCode}}),R(n.phone,n.countryCode)}},[e.defaultValue]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x,{children:(0,o.jsxs)(p,{$callingCodeLength:F,$stacked:e.stacked,children:[(0,o.jsx)(h,{value:g,onChange:P}),(0,o.jsx)("input",{ref:n,id:"phone-number-input",className:"login-method-button",type:"tel",placeholder:C,onFocus:()=>m(!0),onChange:e=>{R(e.target.value,g)},onKeyUp:e=>{"Enter"===e.key&&T()},value:y,autoComplete:"tel"}),"phone"!==f||l||e.hideRecent?e.stacked||e.noIncludeSubmitButton?(0,o.jsx)("span",{}):(0,o.jsx)(d.E,{isSubmitting:M,onClick:T,disabled:S,children:"Submit"}):(0,o.jsx)(u.C,{color:"gray",children:"Recent"})]})}),e.stacked&&!e.noIncludeSubmitButton?(0,o.jsx)(d.P,{loading:M,loadingText:null,onClick:T,disabled:S,children:"Submit"}):null]})}),x=l.I4.div`
2  width: 100%;
3`,p=l.I4.label`
4  --country-code-dropdown-width: calc(54px + calc(12 * ${e=>e.$callingCodeLength}px));
5  --phone-input-extra-padding-left: calc(12px + calc(3 * ${e=>e.$callingCodeLength}px));
6  display: block;
7  position: relative;
8  width: 100%;
9
10  /* Tablet and Up */
11  @media (min-width: 441px) {
12    --country-code-dropdown-width: calc(52px + calc(10 * ${e=>e.$callingCodeLength}px));
13  }
14
15  && > select {
16    font-size: 16px;
17    height: 24px;
18    position: absolute;
19    margin: 13px calc(var(--country-code-dropdown-width) / 4);
20    line-height: 24px;
21    width: var(--country-code-dropdown-width);
22    background-color: var(--privy-color-background);
23    background-size: auto;
24    background-position-x: right;
25    cursor: pointer;
26
27    /* Tablet and Up */
28    @media (min-width: 441px) {
29      font-size: 14px;
30      width: var(--country-code-dropdown-width);
31    }
32
33    :focus {
34      outline: none;
35      box-shadow: none;
36    }
37  }
38
39  && > input {
40    font-size: 16px;
41    line-height: 24px;
42    color: var(--privy-color-foreground);
43
44    overflow: hidden;
45    white-space: nowrap;
46    text-overflow: ellipsis;
47
48    width: calc(100% - var(--country-code-dropdown-width));
49
50    padding: 12px 88px 12px
51      calc(var(--country-code-dropdown-width) + var(--phone-input-extra-padding-left));
52    padding-right: ${e=>e.$stacked?"16px":"88px"};
53    flex-grow: 1;
54    background: var(--privy-color-background);
55    border: 1px solid var(--privy-color-foreground-4);
56    border-radius: var(--privy-border-radius-md);
57    width: 100%;
58
59    :focus {
60      outline: none;
61      border-color: var(--privy-color-accent);
62    }
63
64    :autofill,
65    :-webkit-autofill {
66      background: var(--privy-color-background);
67    }
68
69    /* Tablet and Up */
70    @media (min-width: 441px) {
71      font-size: 14px;
72      padding-right: 78px;
73    }
74  }
75
76  && > :last-child {
77    right: 16px;
78    position: absolute;
79    top: 50%;
80    transform: translate(0, -50%);
81  }
82
83  && > button:last-child {
84    right: 0px;
85    line-height: 24px;
86    padding: 13px 17px;
87
88    :focus {
89      outline: none;
90      border-color: var(--privy-color-accent);
91    }
92  }
93
94  && > input::placeholder {
95    color: var(--privy-color-foreground-3);
96  }
97`},84197:(e,n,t)=>{t.r(n),t.d(n,{MfaEnrollmentFlowScreen:()=>S,default:()=>S});var o=t(95155),r=t(50008),l=t(8246),a=t(12115);let i=a.forwardRef(function(e,n){let{title:t,titleId:o,...r}=e;return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
97currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":o},r),t?a.createElement("title",{id:o},t):null,a.createElement("path",{fillRule:"evenodd",d:"M8.603 3.799A4.49 4.49 0 0 1 12 2.25c1.357 0 2.573.6 3.397 1.549a4.49 4.49 0 0 1 3.498 1.307 4.491 4.491 0 0 1 1.307 3.497A4.49 4.49 0 0 1 21.75 12a4.49 4.49 0 0 1-1.549 3.397 4.491 4.491 0 0 1-1.307 3.497 4.491 4.491 0 0 1-3.497 1.307A4.49 4.49 0 0 1 12 21.75a4.49 4.49 0 0 1-3.397-1.549 4.49 4.49 0 0 1-3.498-1.306 4.491 4.491 0 0 1-1.307-3.498A4.49 4.49 0 0 1 2.25 12c0-1.357.6-2.573 1.549-3.397a4.49 4.49 0 0 1 1.307-3.497 4.49 4.49 0 0 1 3.497-1.307Zm7.007 6.387a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))}),s=a.forwardRef(function(e,n){let{title:t,titleId:o,...r}=e;return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":o},r),t?a.createElement("title",{id:o},t):null,a.createElement("path",{fillRule:"evenodd",d:"M4.5 3.75a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3V6.75a3 3 0 0 0-3-3h-15Zm4.125 3a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5Zm-3.873 8.703a4.126 4.126 0 0 1 7.746 0 .75.75 0 0 1-.351.92 7.47 7.47 0 0 1-3.522.877 7.47 7.47 0 0 1-3.522-.877.75.75 0 0 1-.351-.92ZM15 8.25a.75.75 0 0 0 0 1.5h3.75a.75.75 0 0 0 0-1.5H15ZM14.25 12a.75.75 0 0 1 .75-.75h3.75a.75.75 0 0 1 0 1.5H15a.75.75 0 0 1-.75-.75Zm.75 2.25a.75.75 0 0 0 0 1.5h3.75a.75.75 0 0 0 0-1.5H15Z",clipRule:"evenodd"}))});var c=t(24816),d=t(69829),u=t(61665),h=t(56186),m=t(46462),x=t(45944),p=t(69489),f=t(28072),y=t(57378),j=t(6865),g=t(74633),v=t(75564),w=t(61924),b=t(41156),C=t(30026);t(15822),t(65884),t(55702),t(3282),t(5506);let k=({appName:e,onComplete:n,onReset:t,onClose:r})=>{let[l,i]=(0,a.useState)(""),[s,d]=(0,a.useState)(!1),[m,p]=(0,a.useState)(null),[y,k]=(0,a.useState)("enroll"),{initEnrollmentWithSms:S,submitEnrollmentWithSms:M}=(0,f.h)(),{data:E}=(0,x.u)(),F=(0,h.u)();function P(){E?.mfaEnrollmentFlow?.onSuccess(),n()}return m?(0,o.jsx)(C.ErrorScreenView,{allowlistConfig:F.allowlistConfig,error:m,onBack:()=>p(null),onRetry:()=>p(null)}):(0,o.jsxs)(o.Fragment,"enroll"===y?{children:[(0,o.jsx)(c.M,{backFn:t,onClose:r},"header"),(0,o.jsx)(b.I,{style:{marginBottom:"1.5rem"},children:(0,o.jsx)(g.A,{})}),(0,o.jsx)(b.T,{children:"Set up SMS verification"}),(0,o.jsxs)(b.S,{children:["We'll text a verification code to this mobile device whenever you use your ",e," ","wallet."]}),(0,o.jsxs)(b.C,{children:[(0,o.jsx)(w.C,{onSubmit:async function({qualifiedPhoneNumber:e}){try{await S({phoneNumber:e}),i(e),k("verify")}catch(e){p(e)}},hideRecent:!0}),(0,o.jsxs)(b.c,{children:["By providing your mobile number, you agree to receive text messages from ",F?.name,". Some carrier charges may apply"]})]}),(0,o.jsx)(u.M,{})]}:s?{children:[(0,o.jsx)(c.M,{onClose:P},"header"),(0,o.jsx)(b.I,{style:{marginBottom:"1.5rem"},children:(0,o.jsx)(j.A,{})}),(0,o.jsx)(b.T,{children:"SMS verification added"}),(0,o.jsxs)(b.S,{children:["From now on, you'll enter the verification code sent to your mobile device whenever you use your ",e," wallet."]}),(0,o.jsx)(b.B,{children:(0,o.jsx)(c.P,{onClick:P,children:"Done"})}),(0,o.jsx)(u.M,{})]}:{children:[(0,o.jsx)(c.M,{backFn:function(){"verify"===y?k("enroll"):t()},onClose:r},"header"),(0,o.jsx)(b.I,{style:{marginBottom:"1.5rem"},children:(0,o.jsx)(g.A,{})}),(0,o.jsx)(b.T,{children:"Enter enrollment code"}),(0,o.jsxs)(b.C,{children:[(0,o.jsx)(b.N,{onChange:async function(e){try{if(!e)return;await M({phoneNumber:l,mfaCode:e}),d(!0)}catch(e){if((0,f.i)(e))throw Error("You have exceeded the maximum number of attempts. Please close this window and try again in 10 seconds.");if((0,f.d)(e))throw Error("The code you entered is not valid");if((0,f.f)(e))throw Error("You have exceeded the time limit for code entry. Please try again in 30 seconds.");throw(0,f.j)(e)?Error("Verification canceled"):Error("Unknown error")}}}),(0,o.jsxs)(b.S,{children:["To continue, enter the 6-digit code sent to ",(0,o.jsx)("strong",{children:(0,v.Ds)(l)})]})]}),(0,o.jsx)(u.M,{})]})},S={component:()=>{let{user:e,enrollInMfa:n,ready:t}=(0,p.u)(),[j,g]=(0,a.useState)(null),{unenrollWithSms:v,unenrollWithTotp:w,unenrollWithPasskey:C,submitEnrollmentWithTotp:S,initEnrollmentWithPasskey:M,submitEnrollmentWithPasskey:E,initEnrollmentWithTotp:F}=(0,f.h)(),{data:P,onUserCloseViaDialogOrKeybindRef:R}=(0,x.u)(),T=(0,h.u)(),{closePrivyModal:A}=(0,m.u)(),{promptMfa:B}=(0,f.u)(),[N,I]=(0,a.useState)(!1),[L,U]=(0,a.useState)(null),[W,$]=(0,a.useState)(null),V=()=>{A({shouldCallAuthOnSuccess:!0}),n(!1),setTimeout(()=>{g(null),U(null)},500)},[Z,O]=(0,a.useState)(!1),[q,z]=(0,a.useState)();R.current=V;let D=e?.mfaMethods.includes("sms"),Q=!!e?.phone,H=e?.mfaMethods.includes("totp"),_=e?.mfaMethods.includes("passkey"),K=D||H||_,Y=e?.linkedAccounts.filter(e=>"passkey"===e.type).map(e=>e.credentialId)??[];function G(){g(null),U(null)}async function J(e=Y){O(!0);try{return await M(),await E({credentialIds:e},{removeForLogin:P?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa}),P?.mfaEnrollmentFlow?.onSuccess(),V()}catch(e){z(e)}finally{O(!1)}}if((0,a.useEffect)(()=>{K&&I(!0)},[K]),!t||!e||!T)return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.M,{onClose:V},"header"),(0,o.jsx)(b.A,{children:(0,o.jsx)(y.M,{})}),(0,o.jsx)(b.C,{children:(0,o.jsx)(d.L,{})}),(0,o.jsx)(u.M,{})]});if("sms"===j)return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.M,{backFn:G,onClose:V},"header"),(0,o.jsx)(b.I,{style:{marginBottom:"1.5rem"},children:(0,o.jsx)(r.A,{})}),(0,o.jsx)(b.T,{children:"Remove SMS verification?"}),(0,o.jsxs)(b.S,{children:["MFA adds an extra layer of security to your ",T?.name," account. Make sure you have other methods to secure your account."]}),(0,o.jsx)(b.B,{children:(0,o.jsx)(c.P,{$warn:!0,onClick:async function(){g(null);try{await v()}catch(e){g(null)}},children:"Remove"})}),(0,o.jsx)(u.M,{})]});if("totp"===j)return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.M,{backFn:G,onClose:V},"header"),(0,o.jsx)(b.I,{style:{marginBottom:"1.5rem"},children:(0,o.jsx)(r.A,{})}),(0,o.jsx)(b.T,{children:"Remove authenticator app verification?"}),(0,o.jsxs)(b.S,{children:["MFA adds an extra layer of security to your ",T?.name," account. Make sure you have other methods to secure your account."]}),(0,o.jsx)(b.B,{children:(0,o.jsx)(c.P,{$warn:!0,onClick:async function(){g(null);try{await w()}catch(e){g(null)}},children:"Remove"})}),(0,o.jsx)(u.M,{})]});if("passkey"===j){let e=P?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa??!0;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.M,{backFn:G,onClose:V},"header"),(0,o.jsx)(b.I,{style:{marginBottom:"1.5rem"},children:(0,o.jsx)(r.A,{})}),(0,o.jsx)(b.T,{children:"Are you sure you want to remove this passkey?"}),(0,o.jsx)(b.S,{children:e?"Removing your passkey will remove as both a verification method and a login method.":"Removing your passkey will remove as a verification method."}),(0,o.jsx)(b.B,{children:(0,o.jsx)(c.P,{$warn:!0,onClick:async function(){g(null);try{await C({removeForLogin:P?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa})}catch(e){g(null)}},children:"Remove"})}),(0,o.jsx)(u.M,{})]})}if(0===P.mfaEnrollmentFlow.mfaMethods.length&&!K)return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.M,{onClose:V},"header"),(0,o.jsx)(b.I,{style:{marginBottom:"1.5rem"},children:(0,o.jsx)(l.A,{})}),(0,o.jsx)(b.T,{children:"Add more security"}),(0,o.jsxs)(b.S,{children:[T?.name," does not have any verification methods enabled."]}),(0,o.jsx)(b.B,{children:(0,o.jsx)(c.P,{onClick:V,children:"Close"})}),(0,o.jsx)(u.M,{})]});let X=!K&&!N;return X?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.M,{onClose:V},"header"),(0,o.jsx)(b.I,{style:{marginBottom:"1.5rem"},children:(0,o.jsx)(l.A,{})}),(0,o.jsx)(b.T,{children:"Transaction Protection"}),(0,o.jsx)(b.S,{children:"Set up transaction protection to add an extra layer of security to your account"}),(0,o.jsxs)(b.L,{children:[(0,o.jsxs)(b.a,{children:[(0,o.jsx)(b.b,{children:(0,o.jsx)(i,{})}),"Enable 2-Step verification for your ",T?.name," wallet."]}
97),(0,o.jsxs)(b.a,{children:[(0,o.jsx)(b.b,{children:(0,o.jsx)(s,{})}),"You'll be prompted to authenticate to complete transactions."]})]}),(0,o.jsxs)(b.B,{children:[(0,o.jsx)(c.P,{onClick:()=>I(!0),children:"Continue"}),(0,o.jsx)(c.S,{onClick:V,children:"Not now"})]}),(0,o.jsx)(u.M,{})]}):"sms"===L?(0,o.jsx)(k,{appName:T?.name||"Privy",onComplete:V,onReset:G,onClose:V}):"totp"===L&&W?(0,o.jsx)(y.E,{onClose:V,onReset:G,submitEnrollmentWithTotp:({mfaCode:e})=>(async function(e){try{return z(void 0),await S({mfaCode:e}),P?.mfaEnrollmentFlow?.onSuccess(),V()}catch(e){z(e)}finally{g(null)}})(e),totpInfo:{...W,appName:T?.name||"Privy"}}):"passkey"===L?(0,o.jsx)(y.a,{onReset:G,onClose:V,submitEnrollmentWithPasskey:J}):(0,o.jsx)(y.b,{showIntro:X,userMfaMethods:e.mfaMethods,appMfaMethods:T.mfa.methods,userHasAuthSms:Q,backFn:function(){I(!1)},handleSelectMethod:async function(e){try{await B()}catch(e){return void z(e)}return"totp"===e?(U(e),$(null),void F().then(e=>{$(e)}).catch(()=>{$(null),G()})):"passkey"===e&&1===Y.length?await J():void U(e)},isTotpLoading:"totp"===L&&!W,isPasskeyLoading:Z,error:q,onClose:V,setRemovingMfaMethod:async e=>{try{await B()}catch(e){return void z(e)}g(e)}})}}}}]);

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.