PageSourceSearch

https://www.chiho.ai/_next/static/chunks/883.df000a5d365a994e.js

js chiho.ai collected 2026-10-05 15:31:30 UTC 17,011 bytes, 381 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[883],{4903:(e,r,i)=>{i.d(r,{C:()=>h});var o=i(26514),n=i(75834),t=i(51807),a=i(65601),l=i(72831),c=i(40175),d=i(32279),s=i(58156),u=i(55247);let p=({value:e,onChange:r})=>(0,o.jsx)("select",{value:e,onChange:r,children:a.QN.map(e=>(0,o.jsxs)("option",{value:e.code,children:[e.code," +",e.callCode]},e.code))}),h=(0,n.forwardRef)((e,r)=>{let i=(0,c.u)(),[t,h]=(0,n.useState)(!1),{accountType:x}=(0,d.h)(),[b,f]=(0,n.useState)(""),[m,y]=(0,n.useState)(e.defaultCountry??i?.intl.defaultCountry??"US"),w=(0,a.Q7)(b,m),j=(0,a.qi)(m),k=(0,a.jZ)(m),S=(0,l.K)(m),C=!w,[$,I]=(0,n.useState)(!1),z=S.length,E=r=>{let i=r.target.value;y(i),f(""),e.onChange&&e.onChange({rawPhoneNumber:b,qualifiedPhoneNumber:(0,a.n4)(b,i),countryCode:i,isValid:(0,a.Q7)(b,m)})},N=(r,i)=>{try{let o=r.replace(/\D/g,"")===b.replace(/\D/g,"")?r:j.input(r);f(o),e.onChange&&e.onChange({rawPhoneNumber:o,qualifiedPhoneNumber:(0,a.n4)(r,i),countryCode:i,isValid:(0,a.Q7)(r,i)})}catch(e){console.error("Error processing phone number:",e)}},L=()=>{I(!0);let r=(0,a.n4)(b,m);e.onSubmit({rawPhoneNumber:b,qualifiedPhoneNumber:r,countryCode:m,isValid:(0,a.Q7)(b,m)}).finally(()=>I(!1))};return(0,n.useEffect)(()=>{if(e.defaultValue){let r=(0,a.oj)(e.defaultValue);j.reset(),E({target:{value:r.countryCode}}),N(r.phone,r.countryCode)}},[e.defaultValue]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(g,{children:(0,o.jsxs)(v,{$callingCodeLength:z,$stacked:e.stacked,children:[(0,o.jsx)(p,{value:m,onChange:E}),(0,o.jsx)("input",{ref:r,id:"phone-number-input",className:"login-method-button",type:"tel",placeholder:k,onFocus:()=>h(!0),onChange:e=>{N(e.target.value,m)},onKeyUp:e=>{"Enter"===e.key&&L()},value:b,autoComplete:"tel"}),"phone"!==x||t||e.hideRecent?e.stacked||e.noIncludeSubmitButton?(0,o.jsx)("span",{}):(0,o.jsx)(s.E,{isSubmitting:$,onClick:L,disabled:C,children:"Submit"}):(0,o.jsx)(u.C,{color:"gray",children:"Recent"})]})}),e.stacked&&!e.noIncludeSubmitButton?(0,o.jsx)(s.P,{loading:$,loadingText:null,onClick:L,disabled:C,children:"Submit"}):null]})}),g=t.I4.div`
2  width: 100%;
3`,v=t.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`},34375:(e,r,i)=>{i.d(r,{L:()=>t});var o=i(51807);let n=(0,o.i7)`
98  from, to {
99    background: var(--privy-color-foreground-4);
100    color: var(--privy-color-foreground-4);
101  }
102
103  50% {
104    background: var(--privy-color-foreground-accent);
105    color: var(--privy-color-foreground-accent);
106  }
107`,t=(0,o.AH)`
108  ${e=>e.$isLoading?(0,o.AH)`
109          width: 35%;
110          animation: ${n} 2s linear infinite;
111          border-radius: var(--privy-border-radius-sm);
112        `:""}
113`},50230:(e,r,i)=>{i.d(r,{A:()=>n});var o=i(75834);let n=o.forwardRef(function({title:e,titleId:r,...i},n){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},i),e?o.createElement("title",{id:r},e):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 0 0 2.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 0 1-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 0 0-1.091-.852H4.5A2.25 2.25 0 0 0 2.25 4.5v2.25Z"}))})}
113,52082:(e,r,i)=>{i.d(r,{S:()=>a});var o=i(26514),n=i(58156),t=i(69038);let a=({primaryCta:e,secondaryCta:r,helpText:i,footerText:a,watermark:l=!0,children:c,...d})=>{let s=e||r?(0,o.jsxs)(o.Fragment,{children:[e&&(()=>{let{label:r,...i}=e,t=i.variant||"primary";return(0,o.jsx)(n.a,{...i,variant:t,style:{width:"100%",...i.style},children:r})})(),r&&(()=>{let{label:e,...i}=r,t=i.variant||"secondary";return(0,o.jsx)(n.a,{...i,variant:t,style:{width:"100%",...i.style},children:e})})()]}):null;return(0,o.jsxs)(t.S,{id:d.id,className:d.className,children:[(0,o.jsx)(t.S.Header,{...d}),c?(0,o.jsx)(t.S.Body,{children:c}):null,i||s||l?(0,o.jsxs)(t.S.Footer,{children:[i?(0,o.jsx)(t.S.HelpText,{children:i}):null,s?(0,o.jsx)(t.S.Actions,{children:s}):null,l?(0,o.jsx)(t.S.Watermark,{}):null]}):null,a?(0,o.jsx)(t.S.FooterText,{children:a}):null]})}},55247:(e,r,i)=>{i.d(r,{C:()=>a});var o=i(26514),n=i(51807),t=i(34375);let a=({children:e,color:r,isLoading:i,isPulsing:n,...t})=>(0,o.jsx)(l,{$color:r,$isLoading:i,$isPulsing:n,...t,children:e}),l=n.I4.span`
114  padding: 0.25rem;
115  font-size: 0.75rem;
116  font-weight: 500;
117  line-height: 1rem; /* 150% */
118  border-radius: var(--privy-border-radius-xs);
119  display: flex;
120  align-items: center;
121  ${e=>{let r,i;"green"===e.$color&&(r="var(--privy-color-success-dark)",i="var(--privy-color-success-light)"),"red"===e.$color&&(r="var(--privy-color-error)",i="var(--privy-color-error-light)"),"gray"===e.$color&&(r="var(--privy-color-foreground-2)",i="var(--privy-color-background-2)");let o=(0,n.i7)`
122      from, to {
123        background-color: ${i};
124      }
125
126      50% {
127        background-color: rgba(${i}, 0.8);
128      }
129    `;return(0,n.AH)`
130      color: ${r};
131      background-color: ${i};
132      ${e.$isPulsing&&(0,n.AH)`
133        animation: ${o} 3s linear infinite;
134      `};
135    `}}
136
137  ${t.L}
138`},69038:(e,r,i)=>{i.d(r,{S:()=>j});var o=i(26514),n=i(75834),t=i(51807),a=i(32279),l=i(58156),c=i(91012);let d=t.I4.div`
139  /* spacing tokens */
140  --screen-space: 16px; /* base 1x = 16 */
141  --screen-space-lg: calc(var(--screen-space) * 1.5); /* 24px */
142
143  position: relative;
144  overflow: hidden;
145  margin: 0 calc(-1 * var(--screen-space)); /* extends over modal padding */
146  height: 100%;
147  border-radius: var(--privy-border-radius-lg);
148`,s=t.I4.div`
149  display: flex;
150  flex-direction: column;
151  gap: calc(var(--screen-space) * 1.5);
152  width: 100%;
153  background: var(--privy-color-background);
154  padding: 0 var(--screen-space-lg) var(--screen-space);
155  height: 100%;
156  border-radius: var(--privy-border-radius-lg);
157`,u=t.I4.div`
158  position: relative;
159  display: flex;
160  flex-direction: column;
161`,p=(0,t.I4)(l.M)`
162  margin: 0 -8px;
163`,h=t.I4.div`
164  flex: 1 1 auto;
165  display: flex;
166  flex-direction: column;
167
168  /* Enable scrolling */
169  overflow-y: auto;
170
171  /* Hide scrollbar but keep functionality when scrollable */
172  /* Add padding for focus outline space, offset with negative margin */
173  padding: 3px;
174  margin: -3px;
175
176  &::-webkit-scrollbar {
177    display: none;
178  }
179  scrollbar-gutter: stable both-edges;
180  scrollbar-width: none;
181  -ms-overflow-style: none;
182
183  /* Gradient effect for scroll indication */
184  ${({$colorScheme:e})=>"light"===e?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.06)) bottom;":"dark"===e?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.06)) bottom;":void 0}
185
186  background-repeat: no-repeat;
187  background-size:
188    100% 32px,
189    100% 16px;
190  background-attachment: local, scroll;
191`,g=t.I4.div`
192  display: flex;
193  flex-direction: column;
194  gap: var(--screen-space-lg);
195  margin-top: 1.5rem;
196`,v=t.I4.div`
197  text-align: center;
198  display: flex;
199  flex-direction: column;
200  align-items: center;
201  gap: var(--screen-space);
202`,x=t.I4.div`
203  display: flex;
204  flex-direction: column;
205  gap: 4px;
206`,b=t.I4.h3`
207  && {
208    font-size: 20px;
209    line-height: 32px;
210    font-weight: 500;
211    color: var(--privy-color-foreground);
212    margin: 0;
213  }
214`,f=t.I4.p`
215  && {
216    margin: 0;
217    font-size: 16px;
218    font-weight: 300;
219    line-height: 24px;
220    color: var(--privy-color-foreground);
221  }
222`,m=t.I4.div`
223  background: ${({$variant:e})=>{switch(e){case"success":return"var(--privy-color-success-bg, #EAFCEF)";case"warning":return"var(--privy-color-warn, #FEF3C7)";case"error":return"var(--privy-color-error-bg, #FEE2E2)";case"loading":case"logo":return"transparent";default:return"var(--privy-color-background-2)"}}};
224
225  border-radius: 50%;
226  width: 64px;
227  height: 64px;
228  display: flex;
229  align-items: center;
230  justify-content: center;
231`,y=t.I4.div`
232  display: flex;
233  align-items: center;
234  justify-content: center;
235
236  img,
237  svg {
238    max-height: 90px;
239    max-width: 180px;
240  }
241`,w=t.I4.div`
242  display: flex;
243  flex-direction: column;
244  justify-content: center;
245  align-items: center;
246  width: 100%;
247  height: 82px;
248
249  > div {
250    position: relative;
251  }
252
253  > div > :first-child {
254    position: relative;
255  }
256
257  > div > :last-child {
258    position: absolute;
259    left: 50%;
260    top: 50%;
261    transform: translate(-50%, -50%);
262  }
263`,j=({children:e,...r})=>(0,o.jsx)(d,{children:(0,o.jsx)(s,{...r,children:e})}),k=t.I4.div`
264  position: absolute;
265  top: 0;
266  left: calc(-1 * var(--screen-space-lg));
267  width: calc(100% + calc(var(--screen-space-lg) * 2));
268  height: 4px;
269  background: var(--privy-color-background-2);
270  border-top-left-radius: inherit;
271  border-top-right-radius: inherit;
272  overflow: hidden;
273`,S=(0,t.I4)(l.B)`
274  padding: 0;
275  && a {
276    padding: 0;
277    color: var(--privy-color-foreground-3);
278  }
279`,C=t.I4.div`
280  height: 100%;
281  width: ${({pct:e})=>e}%;
282  background: var(--privy-color-foreground-3);
283  border-radius: 2px;
284  transition: width 300ms ease-in-out;
285`,$=({step:e})=>e?(0,o.jsx)(k,{children:(0,o.jsx)(C,{pct:Math.min(100,e.current/e.total*100)})}):null;j.Header=({title:e,subtitle:r,icon:i,iconVariant:n,iconLoadingStatus:t,showBack:a,onBack:l,showInfo:c,onInfo:d,showClose:s,onClose:h,step:g,headerTitle:m,eyebrow:y,...w})=>(0,o.jsxs)(u,{...w,children:[(0,o.jsx)(p,{backFn:a?l:void 0,infoFn:c?d:void 0,onClose:s?h:void 0,title:m,eyebrow:y,closeable:s}),(i||n||e||r)&&(0,o.jsxs)(v,{children:[i||n?(0,o.jsx)(j.Icon,{icon:i,variant:n,loadingStatus:t}):null,!(!e&&!r)&&(0,o.jsxs)(x,{children:[e&&(0,o.jsx)(b,{children:e}),r&&(0,o.jsx)(f,{children:r})]})]}),g&&(0,o.jsx)($,{step:g})]}),(j.Body=n.forwardRef(({children:e,...r},i)=>(0,o.jsx)(h,{ref:i,...r,children:e}))).displayName="Screen.Body",j.Footer=({children:e,...r})=>(0,o.jsx)(g,{id:"privy-content-footer-container",...r,children:e}),j.Actions=({children:e,...r})=>(0,o.jsx)(I,{...r,children:e}),j.HelpText=({children:e,...r})=>(0,o.jsx)(z,{...r,children:e}),j.FooterText=({children:e,...r})=>(0,o.jsx)(E,{...r,children:e}),j.Watermark=()=>(0,o.jsx)(S,{}),j.Icon=({icon:e,variant:r="subtle",loadingStatus:i})=>"logo"===r&&e?(0,o.jsx)(y,"string"==typeof e?{children:(0,o.jsx)("img",{src:e,alt:""})}:n.isValidElement(e)?{children:e}:{children:n.createElement(e)}):"loading"===r?e?(0,o.jsx)(w,{children:(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,o.jsx)(a.C,{success:i?.success,fail:i?.fail}),"string"==typeof e?(0,o.jsx)("span",{style:{background:`url('${e}') 0 0 / contain`,height:"38px",width:"38px",borderRadius:"6px",margin:"auto",backgroundSize:"contain"}}):n.isValidElement(e)?n.cloneElement(e,{style:{width:"38px",height:"38px"}}):n.createElement(e,{style:{width:"38px",height:"38px"}})]})}):(0,o.jsx)(m,{$variant:r,children:(0,o.jsx)(c.N,{size:"64px"})}):(0,o.jsx)(m,{$variant:r,children:e&&("string"==typeof e?(0,o.jsx)("img",{src:e,alt:"",style:{width:"32px",height:"32px",borderRadius:"6px"}}):n.isValidElement(e)?e:n.createElement(e,{width:32,height:32,stroke:(()=>{switch(r){case"success":return"var(--privy-color-icon-success)";case"warning":return"var(--privy-color-icon-warning)";case"error":return"var(--privy-color-icon-error)";default:return"var(--privy-color-icon-muted)"}})(),strokeWidth:2}))});let I=t.I4.div`
286  width: 100%;
287  display: flex;
288  flex-direction: column;
289  gap: calc(var(--screen-space) / 2);
290`,z=t.I4.div`
291  && {
292    margin: 0;
293    width: 100%;
294    text-align: center;
295    color: var(--privy-color-foreground-2);
296    font-size: 13px;
297    line-height: 20px;
298
299    & a {
300      text-decoration: underline;
301    }
302  }
303`,E=t.I4.div`
304  && {
305    margin-top: -1rem;
306    width: 100%;
307    text-align: center;
308    color: var(--privy-color-foreground-2);
309    font-size: 0.6875rem; // 11px
310    line-height: 1rem; // 16px
311  }
312`},90883:(e,r,i)=>{i.r(r),i.d(r,{LinkPhoneScreen:()=>p,LinkPhoneScreenView:()=>u,default:()=>p});var o=i(26514),n=i(50230),t=i(75834),a=i(4903),l=i(40175),c=i(86253),d=i(37503),s=i(52082);i(13799),i(7287),i(66239);let u=({title:e="Connect your phone",subtitle:r="Add your number to your account",onSubmit:i,isSubmitting:l=!1})=>{let[c,d]=(0,t.useState)(null),u=async()=>{c?.qualifiedPhoneNumber&&await i(c)};
312return(0,o.jsx)(s.S,{title:e,subtitle:r,icon:n.A,primaryCta:{label:l?"Submitting":"Submit",onClick:u,disabled:!c?.isValid||l},watermark:!0,children:(0,o.jsx)(a.C,{onChange:e=>{d(e)},onSubmit:u,noIncludeSubmitButton:!0,hideRecent:!0})})},p={component:()=>{let{currentScreen:e,data:r,navigate:i,setModalData:n}=(0,d.u)(),a=(0,l.u)(),{initLoginWithSms:s}=(0,c.u)(),[p,h]=(0,t.useState)(!1);return(0,o.jsx)(u,{subtitle:`Add your number to your ${a?.name} account`,onSubmit:async o=>{h(!0);try{await s({phoneNumber:o.qualifiedPhoneNumber,withPrivyUi:!0}),i("AwaitingPasswordlessCodeScreen")}catch(o){n({errorModalData:{error:o,previousScreen:r?.errorModalData?.previousScreen||e||"LinkPhoneScreen"}}),i("ErrorScreen")}finally{h(!1)}},isSubmitting:p})}}},91012:(e,r,i)=>{i.d(r,{N:()=>t});var o=i(26514),n=i(51807);let t=({size:e,centerIcon:r})=>(0,o.jsx)(a,{$size:e,children:(0,o.jsxs)(l,{children:[(0,o.jsx)(d,{}),(0,o.jsx)(s,{}),r?(0,o.jsx)(c,{children:r}):null]})}),a=n.I4.div`
313  --spinner-size: ${e=>e.$size?e.$size:"96px"};
314
315  display: inline-flex;
316  justify-content: center;
317  align-items: center;
318
319  @media all and (display-mode: standalone) {
320    margin-bottom: 30px;
321  }
322`,l=n.I4.div`
323  position: relative;
324  height: var(--spinner-size);
325  width: var(--spinner-size);
326
327  opacity: 1;
328  animation: fadein 200ms ease;
329`,c=n.I4.div`
330  position: absolute;
331  top: 0;
332  right: 0;
333  bottom: 0;
334  left: 0;
335  display: flex;
336  align-items: center;
337  justify-content: center;
338  svg,
339  img {
340    width: calc(var(--spinner-size) * 0.4);
341    height: calc(var(--spinner-size) * 0.4);
342    border-radius: var(--privy-border-radius-full);
343  }
344`,d=n.I4.div`
345  position: absolute;
346  top: 0;
347  right: 0;
348  bottom: 0;
349  left: 0;
350  width: var(--spinner-size);
351  height: var(--spinner-size);
352
353  && {
354    border: 4px solid var(--privy-color-border-default);
355    border-radius: 50%;
356  }
357`,s=n.I4.div`
358  position: absolute;
359  top: 0;
360  right: 0;
361  bottom: 0;
362  left: 0;
363  width: var(--spinner-size);
364  height: var(--spinner-size);
365  animation: spin 1200ms linear infinite;
366
367  && {
368    border: 4px solid;
369    border-color: var(--privy-color-icon-subtle) transparent transparent transparent;
370    border-radius: 50%;
371  }
372
373  @keyframes spin {
374    from {
375      transform: rotate(0deg);
376    }
377    to {
378      transform: rotate(360deg);
379    }
380  }
381`}}]);

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.