PageSourceSearch

https://dmystapp.com/assets/login-DuW9teMH.js

js dmystapp.com collected 2026-10-09 01:18:14 UTC 4,859 bytes, 1 lines download raw bytes

1import{j as e,m as u,A as h,F as b,b as G,e as N,C as j,D as L,s as v,E as _,M as A,G as U,H as W,q as R,L as I,R as x,B as E,o as T}from"./index-DeHSVeOk.js";import{r as y}from"./react-vendor-O4qKiryC.js";import{a as D}from"./app_logo-CUUZ7bpX.js";import{a as B,p as F}from"./play_store_icon-C_2GP4PI.js";import{u as f}from"./i18n-ka0c0WbP.js";import{F as H}from"./dashboardRoot-DovywXRQ.js";import"./firebase-BsxLp04Z.js";import"./useTheme-CftgTo7B.js";import"./index-BK57a5Si.js";const M="/assets/google_icon-C85wm3ZR.png",q="/assets/apple_icon-BKvScdb8.png",z=s=>{const{t}=f();return e.jsx("div",{className:"px-10 py-3 rounded-md cursor-pointer relative menuBgColor border border-gray-500 border-solid hover:bg-cellHoverColor dark:hover:bg-cellHoverColor-dark",onClick:s.onClick,children:e.jsxs("div",{className:"flex items-center justify-center gap-3",children:[e.jsx("div",{children:e.jsx("img",{src:M,width:24,height:24,alt:""})}),e.jsx("div",{className:"textColor text-base font-medium",children:t("login_google")})]})})},K=s=>{const{t}=f();return e.jsx("div",{className:"px-10 py-3 rounded-md cursor-pointer relative bg-black border border-gray-500 border-solid hover:bg-cellHoverColor dark:hover:bg-cellHoverColor-dark",onClick:s.onClick,children:e.jsxs("div",{className:"flex items-center justify-center gap-3",children:[e.jsx("div",{children:e.jsx("img",{src:q,width:24,height:24,alt:""})}),e.jsx("div",{className:"text-white text-base font-medium",children:t("login_apple")})]})})},V=()=>{const s=u.resolve(h),t=u.resolve(b),{setGroups:p}=G(),{setSelectedGroup:a}=N();return{setup:async()=>{const o=s.user;if(o==null)return;const l=await t.query(j.Groups,"owner",o.uid);p(l);const n=_(),g=L();g==null&&v(n.uid);const r=l.find(c=>c.uid==g);if(g===n.uid)a(n);else if(r!=null)a(r);else if(l.length>0){const c=l[0];v(c.uid),a(c)}else a(n);await t.updateLastLogin()}}},P=()=>{const s=u.resolve(h),t=u.resolve(b),{createUser:p,createGroup:a}=U(),{setup:i}=V(),o=async()=>{const r=s.user;if(r==null)throw new A;if(!await t.doesUserExist(r.uid)){const m=p(r.uid,r.email??"",s.name,null,null);await t.add(j.Users,m.uid,m)}await i()};return{loginWithGoogle:async()=>{await s.loginWithGoogle(),await o()},loginWithApple:async()=>{await s.loginWithApple(),await o()},loginWithCustomToken:async r=>{await s.loginWithCustomToken(r),await o()},finalizeLogin:o}},te=()=>{const{t:s}=f(),t=u.resolve(W),p=u.resolve(h),[a,i]=y.useState(!0),o=R(d=>d.setRootDisplayType),{loginWithGoogle:l,loginWithApple:n,finalizeLogin:g}=P(),{delay:r}=T(),c=async()=>{try{t.log("Start restore login"),await r(1e3),t.log("Awaiting auth state"),await p.auth.authStateReady(),p.user==null?i(!1):(await g(),o(x.dashboard))}catch(d){t.error("Restore login error",d),i(!1)}};y.useEffect(()=>{c()},[]);const m=async()=>{i(!0);try{await l(),o(x.dashboard)}catch(d){t.error("Google login error",d),i(!1)}},w=async()=>{i(!0);try{await n(),o(x.dashboard)}catch(d){t.error("Apple login error",d),i(!1)}},k=()=>{window.open("https://play.google.com/store/apps/details?id=com.cmak.dmyst","_blank")},C=()=>{window.open("https://apps.apple.com/us/app/dmyst/id1508792094","_blank")},S=()=>e.jsxs("div",{className:"min-h-screen flex flex-col md:flex-row",children:[e.jsx("div",{className:"flex-1 flex justify-center",style:{background:"linear-gradient(to bottom right, rgba(62,140,255,1) 0%, rgba(129,49,244,1) 70%, rgba(129,49,244,1) 100%)"},children:e.jsxs("div",{className:"m-24 flex flex-col items-center gap-4",children:[e.jsx("div",{className:"block pb-2",children:e.jsx("img",{src:D,width:80,height:80,alt:""})}),e.jsx("div",{className:"text-5xl text-white",style:{fontFamily:"Sansation"},children:"Dmyst"}),e.jsx("div",{className:"text-xl text-white text-center pt-10",children:s("login_sub_text")}),e.jsx("a",{className:"text-white text-base pt-32",href:"../terms.html",target:"_blank",children:s("login_terms")}),e.jsx("a",{className:"text-white text-base",href:"../privacy.html",target:"_blank",children:s("login_privacy")})]})}),e.jsx("div",{className:"flex-1 flex justify-center menuBgColor",children:e.jsxs("div",{className:"mt-40 flex flex-col items-center gap-4",children:[e.jsx("div",{className:"text-3xl textColor mb-4",children:"Get Started"}),e.jsx(z,{onClick:m}),e.jsx(K,{onClick:w}),e.jsxs("div",{className:"pt-12 pb-12 flex flex-col items-center gap-5",children:[e.jsx("div",{className:"text-xl textColor",children:s(E?"login_apps_mobile_message":"login_apps_desktop_message")}),e.jsxs("div",{className:"flex flex-row items-center justify-center gap-[30px]",children:[e.jsx("img",{onClick:C,src:B,className:"w-[60px] h-[60px] cursor-pointer",alt:""}),e.jsx("img",{onClick:k,src:F,className:"w-[60px] h-[60px] cursor-pointer",alt:""})]})]})]})})]});return e.jsxs("div",{children:[a&&e.jsx(H,{title:`${s("general_loading")}...`,type:I.Login}),!a&&S()]})};export{te 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.