PageSourceSearch

https://www.ybc.club/_nuxt/DrMVKOit.js

js ybc.club collected 2026-10-04 08:29:41 UTC 10,787 bytes, 1 lines download raw bytes

1import{e as J,A as n,I as W,B as $,c as _,o as P,b as p,w as A,a as e,h as t,t as l,g as j,J as q,R as B,O as L,S as O,F as G}from"./Ckz4BRok.js";import{u as K,g as Q,b as X}from"./AZWSRnYi.js";import{A as h}from"./IBKw_BKx.js";import{A as N}from"./DNVKs7I_.js";import{u as Z}from"./BsISMfOk.js";import"./DlAUqK2U.js";const ee={class:"grid grid-cols-[48px_1fr_48px] items-center md:hidden"},te=["aria-label"],oe={class:"flex justify-center"},ae={class:"hidden text-center text-[14px] font-semibold text-primary/90 md:block"},se=["aria-label"],le={class:"absolute left-7 top-8 hidden md:block"},ne={class:"flex justify-center"},re={class:"mx-auto mt-14 flex w-full flex-col text-center"},ie={class:"font-oswald text-[32px] font-bold uppercase leading-[1.05]"},de={class:"mx-auto flex w-full max-w-[398px] flex-col md:w-88"},ue={class:"mt-5 text-[18px] leading-[1.2] text-primary/90"},ce={class:"mx-auto mt-5 space-y-3 text-left text-[16px] leading-[1.25] text-primary/90"},pe={class:"flex gap-2"},me={class:"flex gap-2"},fe={class:"flex gap-2"},xe={class:"mt-4 text-left text-[14px] leading-[1.2] text-secondary"},ye={key:0,class:"mt-4 text-left text-[14px] font-medium leading-[1.35] text-accent"},be=["disabled"],he=["disabled"],ve={class:"grid grid-cols-[48px_1fr_48px] items-center md:hidden"},we=["aria-label"],ge={class:"flex justify-center"},ke={class:"hidden text-center text-[14px] font-semibold text-primary/90 md:block"},_e=["aria-label"],Pe={class:"absolute left-7 top-8 hidden md:block"},Ce={class:"mx-auto mt-14 flex w-full flex-col text-center"},Se={class:"font-oswald text-[32px] font-bold uppercase leading-[1.05]"},Me={class:"mx-auto max-w-[300px] text-[14px] leading-[1.25] text-secondary"},Ae={class:"mt-5 flex flex-col gap-3"},je=["placeholder"],Be=["placeholder"],Le={key:0,class:"mt-4 text-left text-[14px] font-medium leading-[1.35] text-accent"},Oe=["disabled"],Ne=J({__name:"AuthOnboardingHost",setup(Ve){const{user:s,fetchSession:V,registerPasskey:E,updateOnboarding:v,getStatusMessage:F}=K(),{pick:o}=Z(),r=n(null),y=n(!1),m=n(!1),b=n(!1),i=n(""),u=n(""),f=n(""),x=n(""),C=n(""),w=n(!1);async function U(){try{return(await $fetch("/api/account/passkeys")).passkeys.length>0}catch{return!1}}function H(d){return Q(d,o,"registration")}async function S(){s.value?.passkeyPromptSeen||await v({passkeyPromptSeen:!0})}async function D(){s.value?.profilePromptSeen||await v({profilePromptSeen:!0})}async function g(){if(!s.value||s.value.profilePromptSeen){r.value=null;return}f.value=s.value.name?.trim()||"",x.value=s.value.aboutMe?.trim()||"",u.value="",r.value="profile";try{await D()}catch{}}async function I(){if(!(y.value||!s.value)){y.value=!0;try{if(!s.value.passkeyPromptSeen&&await X()){if(!await U()){i.value="",r.value="passkey";try{await S()}catch{}return}await S()}await g()}finally{y.value=!1}}}async function R(){i.value="",m.value=!0;try{await E(),await g()}catch(d){i.value=H(d)}finally{m.value=!1}}async function T(){i.value="",await g()}async function Y(){u.value="",b.value=!0;try{await v({name:f.value,aboutMe:x.value,profilePromptSeen:!0}),r.value=null}catch(d){u.value=F(d,o("Не вдалося зберегти профіль. Спробуйте ще раз.","Failed to save your profile. Please try again."))}finally{b.value=!1}}function c(){r.value=null,i.value="",u.value=""}function z(){return!!(s.value&&(!s.value.passkeyPromptSeen||!s.value.profilePromptSeen))}async function M(){!s.value||r.value||y.value||!z()||C.value!==s.value.id&&(C.value=s.value.id,await I())}return W(()=>[s.value?.id,s.value?.passkeyPromptSeen,s.value?.profilePromptSeen],()=>{M()}),$(async()=>{if(!w.value){w.value=!0;try{s.value||await V(),await M()}finally{w.value=!1}}}),(d,a)=>(P(),_(G,null,[p(N,{open:t(r)==="passkey","panel-class":"flex h-[100svh] w-full flex-col overflow-y-auto overscroll-contain bg-surface px-5 pb-[calc(env(safe-area-inset-bottom)+1.5rem)] pt-[max(0.75rem,env(safe-area-inset-top))] text-primary [-webkit-overflow-scrolling:touch] md:h-auto md:min-h-0 md:max-h-[90vh] md:max-w-[804px] md:rounded-[40px] md:px-7 md:pb-11 md:pt-8",onClose:c},{default:A(()=>[e("div",ee,[e("button",{type:"button",class:"flex h-12 w-12 items-center justify-center rounded-full bg-primary/5 text-[#b7b7bc] transition-colors hover:bg-primary/8","aria-label":t(o)("Закрити модалку","Close dialog"),onClick:c},[...a[2]||(a[2]=[e("svg",{class:"h-6 w-6",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M14.5 5.5L8 12L14.5 18.5",stroke:"currentColor","stroke-width":"2.25","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,te),e("div",oe,[p(h,{location:"header",variant:"default",class:"text-primary"})]),a[3]||(a[3]=e("span",null,null,-1))]),e("p",ae,l(t(o)("Обліковий запис","Account")),1),e("button",{type:"button",class:"absolute right-4 top-4 hidden h-10 w-10 items-center justify-center rounded-full bg-primary/5 text-[#b7b7bc] transition-colors hover:bg-primary/8 md:flex","aria-label":t(o)("Закрити модалку","Close dialog"),onClick:c},[...a[4]||(a[4]=[e("svg",{class:"h-5 w-5",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M5 5L15 15",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"}),e("path",{d:"M15 5L5 15",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"})],-1)])],8,se),e("div",le,[e("div",ne,[p(h,{location:"header",variant:"default",class:"text-primary"})])]),e("div",re,[e("h2",ie,l(t(o)("Створити Passkey","Create a passkey")),1),e("div",de,[e("p",ue,l(t(o)("Passkeys — це швидкий і безпечний спосіб входу","Passkeys are a fast and secure way to log in")),1),e("ul",ce,[e("li",pe,[a[5]||(a[5]=e("span",{"aria-hidden":"true"},"•",-1)),e("span",null,l(t(o)("Вхід без пароля чи Ð
1ºÐ¾Ð´Ñƒ","Log in without a password or code")),1)]),e("li",me,[a[6]||(a[6]=e("span",{"aria-hidden":"true"},"•",-1)),e("span",null,l(t(o)("Зашифровано вашим пристроєм","Protected by your device")),1)]),e("li",fe,[a[7]||(a[7]=e("span",{"aria-hidden":"true"},"•",-1)),e("span",null,l(t(o)("Працює на всіх ваших пристроях","Works across your devices")),1)])]),e("p",xe,l(t(o)("Ваш поточний спосіб входу все ще працюватиме. Ви можете оновити методи входу в будь-який час.","Your current login method will continue to work. You can update your login methods at any time.")),1),t(i)?(P(),_("p",ye,l(t(i)),1)):j("",!0),e("button",{type:"button",disabled:t(m),class:"mt-5 flex h-14 w-full items-center justify-center rounded-2xl border-2 border-primary text-[18px] font-bold text-primary transition-colors hover:bg-primary hover:text-inverse disabled:cursor-not-allowed disabled:opacity-60",onClick:R},l(t(m)?t(o)("Зачекайте...","Please wait..."):t(o)("Далі","Continue")),9,be),e("button",{type:"button",disabled:t(m),class:"mt-3 inline-flex items-center justify-center self-center text-[16px] font-bold text-secondary transition-opacity hover:opacity-70 disabled:cursor-not-allowed disabled:opacity-60",onClick:T},l(t(o)("Не зараз","Not now")),9,he)])])]),_:1},8,["open"]),p(N,{open:t(r)==="profile","panel-class":"flex h-[100svh] w-full flex-col overflow-y-auto overscroll-contain bg-surface px-5 pb-[calc(env(safe-area-inset-bottom)+1.5rem)] pt-[max(0.75rem,env(safe-area-inset-top))] text-primary [-webkit-overflow-scrolling:touch] md:h-auto md:min-h-0 md:max-h-[90vh] md:max-w-[804px] md:rounded-[40px] md:px-7 md:pb-11 md:pt-8",onClose:c},{default:A(()=>[e("div",ve,[e("button",{type:"button",class:"flex h-12 w-12 items-center justify-center rounded-full bg-primary/5 text-[#b7b7bc] transition-colors hover:bg-primary/8","aria-label":t(o)("Закрити модалку","Close dialog"),onClick:c},[...a[8]||(a[8]=[e("svg",{class:"h-6 w-6",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M14.5 5.5L8 12L14.5 18.5",stroke:"currentColor","stroke-width":"2.25","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,we),e("div",ge,[p(h,{location:"header",variant:"default",class:"text-primary"})]),a[9]||(a[9]=e("span",null,null,-1))]),e("p",ke,l(t(o)("Обліковий запис","Account")),1),e("button",{type:"button",class:"absolute right-4 top-4 hidden h-10 w-10 items-center justify-center rounded-full bg-primary/5 text-[#b7b7bc] transition-colors hover:bg-primary/8 md:flex","aria-label":t(o)("Закрити модалку","Close dialog"),onClick:c},[...a[10]||(a[10]=[e("svg",{class:"h-5 w-5",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M5 5L15 15",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"}),e("path",{d:"M15 5L5 15",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"})],-1)])],8,_e),e("div",Pe,[p(h,{location:"header",variant:"default",class:"text-primary"})]),e("div",Ce,[e("h2",Se,l(t(o)("Заповніть свій профіль","Complete your profile")),1),e("form",{class:"mx-auto mt-8 w-full max-w-[398px] rounded-[24px] bg-[#f2f1f8] px-4 py-5 md:w-88",onSubmit:q(Y,["prevent"])},[e("p",Me,l(t(o)("Додайте своє імʼя та коротку інформацію, щоб вас можна було впізнати","Add your name and a short introduction so other members can recognize you.")),1),e("div",Ae,[B(e("input",{"onUpdate:modelValue":a[0]||(a[0]=k=>L(f)?f.value=k:null),type:"text",name:"name",autocomplete:"name",class:"h-12 w-full rounded-xl border border-border bg-white px-4 text-[16px] leading-[1.2] text-primary outline-none transition-colors placeholder:text-[#a8adb7] focus:border-primary/30",placeholder:t(o)("Імʼя та Прізвище","First and last name")},null,8,je),[[O,t(f)]]),B(e("input",{"onUpdate:modelValue":a[1]||(a[1]=k=>L(x)?x.value=k:null),type:"text",name:"about_me",class:"h-12 w-full rounded-xl border border-border bg-white px-4 text-[16px] leading-[1.2] text-primary outline-none transition-colors placeholder:text-[#a8adb7] focus:border-primary/30",placeholder:t(o)("Розкажіть трохи про себе","Tell us a little about yourself")}
1,null,8,Be),[[O,t(x)]])]),t(u)?(P(),_("p",Le,l(t(u)),1)):j("",!0),e("button",{type:"submit",disabled:t(b),class:"mt-6 flex h-14 w-full items-center justify-center rounded-2xl bg-primary text-[18px] font-bold text-inverse transition-opacity hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60"},l(t(b)?t(o)("Зберігаємо...","Saving..."):t(o)("Зареєструватися","Complete registration")),9,Oe)],32)])]),_:1},8,["open"])],64))}}),Re=Object.assign(Ne,{__name:"ModalsAuthOnboardingHost"});export{Re as default};

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.