PageSourceSearch

https://app.parler.com/assets/LoginPage-C-tJ6gUx.js

js parler.com collected 2026-09-24 08:27:09 UTC 4,567 bytes, 1 lines download raw bytes

1import{j as e,b_ as A}from"./vendor-data-eBPZki-Z.js";import{r as s,f as j,k as I}from"./vendor-react-BgtJhS2O.js";import{u as m,A as R,S as E,a as N,t as v,b as P,r as _,c as L,d as D,e as O}from"./index-DTQGL8n8.js";import{dK as C,dL as T,cE as U,ds as $}from"./vendor-zod-Bei2Z9MS.js";import{s as M,a as B,b as V}from"./safeRedirect-SyO-M7vx.js";import{u as F,S as G,p as Q,G as W}from"./parler-logo-DgTyOnQ1.js";import{S as X}from"./SignupFlow-B2bSANcR.js";import"./OtpInput-C1xRuUQ3.js";function Y(){const n=typeof crypto<"u"?crypto:null;if(n?.getRandomValues){const t=new Uint8Array(16);return n.getRandomValues(t),Array.from(t).map(o=>o.toString(16).padStart(2,"0")).join("")}return`${Date.now().toString(36)}${Math.random().toString(36).slice(2)}`}function z({onError:n,onSuccess:t}){const o=m(r=>r.loginWithSocial),[d,l]=s.useState(!1),c=F({scriptSelector:'script[src*="appleid.auth.js"]',globalCheck:s.useCallback(()=>!!window.AppleID?.auth,[])}),p=async()=>{if(!(!window.AppleID?.auth||d)){l(!0);try{const r=Y();window.AppleID.auth.init({clientId:R,scope:"name email",redirectURI:window.location.origin+"/login",usePopup:!0,nonce:r});const a=(await window.AppleID.auth.signIn({nonce:r}))?.authorization?.id_token;if(!a){n?.("Apple Sign-In failed — no ID token received.");return}await o(E.APPLE,a,{nonce:r}),t?.()}catch(r){if(r?.error==="popup_closed_by_user")return;n?.(A(r,"Apple Sign-In failed. Please try again."))}finally{l(!1)}}};return e.jsxs("button",{type:"button",onClick:p,disabled:!c||d,className:"flex items-center justify-center gap-2 w-full h-[40px] bg-white dark:bg-black text-black dark:text-white rounded-md text-sm font-medium border border-border-light dark:border-border-dark hover:bg-white/90 dark:hover:bg-black/90 disabled:opacity-60 disabled:cursor-not-allowed transition-colors",children:[e.jsx(G,{width:18,height:18}),e.jsx("span",{children:"Continue with Apple"})]})}function se({initialMethod:n="email"}){const t=j(),[o]=I(),d=N(),[l,c]=s.useState(""),p=m(i=>i.sessionExpiredNotice),r=m(i=>i.clearSessionExpiredNotice),x=s.useRef(!1);s.useEffect(()=>{if(!p){x.current=!1;return}x.current||(x.current=!0,r(),v.error(`${C}. ${T}`))},[p,r]);const a=o.get("next"),b=o.get("redirect"),u=s.useMemo(()=>M(a)??B(a),[a]),f=s.useMemo(()=>{if(u)return null;const i=typeof window<"u"?window.location.origin:"";return V(a??b,i)},[u,a,b]),h=P(o,!0),y=s.useMemo(()=>h||(_()?.deviceId??null),[h]),g=s.useCallback(i=>{d?.track(L.AUTH_LOGIN,{extra:{method:i}});const S=m.getState().user;if(S?.accountSetup===!1){t("/create-profile",{replace:!0});return}if(S?.acceptTermsOfService===!1){const k=u||f,w=k?`?next=${encodeURIComponent(k)}`:"";t(`/accept-terms${w}`,{replace:!0});return}D(O({nextUrl:u,returnPath:f}),t)},[d,t,u,f]);return e.jsx("div",{className:"min-h-dvh flex items-center justify-center bg-bg dark:bg-bg-dark px-4",children:e.jsxs("div",{className:"w-full max-w-[400px]",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("img",{src:Q,alt:"Parler",className:"h-10 mx-auto mb-6"}),e.jsx("p",{className:"text-sm text-text-secondary dark:text-text-secondary-dark",children:"Sign in with your Parler ID"})]}),e.jsxs("div",{className:"border border-border-light dark:border-border-dark rounded-lg p-8",children:[l&&e.jsx("p",{role:"alert",className:"mb-4 text-error text-sm text-center","data-testid":"social-error",children:l}),e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex justify-center mb-4",children:e.jsx(z,{onError:c,onSuccess:()=>{c(""),g("apple")}})}),e.jsx("div",{className:"flex justify-center mb-4",children:e.jsx(W,{onError:c,onSuccess:()=>{c(""),g("google")}})}),e.jsxs("div",{className:"flex items-center mb-6",children:[e.jsx("div",{className:"flex-1 border-t border-border-light dark:border-border-dark"}),e.jsx("span",{className:"px-4 text-sm text-text-secondary dark:text-text-secondary-dark",children:"or"}),e.jsx("div",{className:"flex-1 border-t border-border-light dark:border-border-dark"})]})]}),e.jsx(X,{variant:"login",initialMethod:n,referralDeviceId:y,onAuthSuccess:g})]}),e.jsxs("p",{className:"text-center text-xs text-text-secondary dark:text-text-secondary-dark mt-8",children:["By continuing, you agree to our"," ",e.jsx("a",{href:U,target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-text dark:hover:text-text-dark",children:"Terms of Service"})," ","and"," ",e.jsx("a",{href:$,target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-text dark:hover:text-text-dark",children:"Privacy Policy"}),"."]})]})})}export{se 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.