1"use strict";(self.rspackChunknewapi_web=self.rspackChunknewapi_web||[]).push([[4358],{74657(e,t,s){s.d(t,{D:()=>l});var a=s(72361),n=s(3773),r=s(13260),i=s(14317);function o(e){let{className:t}=e;return(0,a.jsx)("svg",{"aria-hidden":!0,width:"13",height:"13",viewBox:"0 0 13 13",fill:"none",className:`text-primary pointer-events-none absolute z-10 ${t??""}`,children:(0,a.jsx)("path",{d:"M6.5 1v11M1 6.5h11",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})})}function l(e){let{children:t,contentClassName:s,hideBottomGuide:l=!1}=e,{lang:c,selectLanguage:d}=(0,i.B)(),u=(0,n.P)(c);return(0,a.jsxs)("div",{className:"xycai-auth bg-background relative min-h-svh",lang:"zh"===c?"zh-CN":"en",dir:"ltr",children:[(0,a.jsx)(r.X,{lang:c,onLangChange:d,solid:!0}),(0,a.jsxs)("div",{className:"auth-layout-body flex w-full",children:[(0,a.jsxs)("div",{className:"relative flex w-full flex-col lg:w-[520px] lg:shrink-0 xl:w-[560px]",children:[(0,a.jsx)("span",{"aria-hidden":!0,className:"bg-border pointer-events-none absolute top-6 bottom-6 left-7 hidden w-px lg:block"}),!l&&(0,a.jsx)("span",{"aria-hidden":!0,className:"bg-border pointer-events-none absolute right-0 bottom-24 left-3 hidden h-px lg:block"}),(0,a.jsx)(o,{className:"top-6 left-7 hidden -translate-x-1/2 -translate-y-1/2 lg:block"}),l?(0,a.jsx)(o,{className:"bottom-6 left-7 hidden -translate-x-1/2 translate-y-1/2 lg:block"}):(0,a.jsx)(o,{className:"bottom-24 left-7 hidden -translate-x-1/2 translate-y-1/2 lg:block"}),(0,a.jsx)("div",{className:"flex flex-1 flex-col justify-center px-6 py-10 sm:px-12",children:(0,a.jsx)("div",{className:s??"mx-auto w-full max-w-[360px] space-y-6",children:t})})]}),(0,a.jsxs)("div",{className:"border-border bg-background-secondary relative hidden flex-1 overflow-hidden border-l lg:block",children:[(0,a.jsxs)("div",{className:"relative z-10 max-w-[560px] px-14 pt-16",children:[(0,a.jsx)("h2",{className:"text-text-primary text-xl font-semibold",children:u.meta.title}),(0,a.jsx)("p",{className:"bg-primary text-primary-foreground mt-3 inline-block rounded-lg rounded-br-[14px] px-3.5 py-2 text-xs leading-relaxed font-medium [corner-shape:round_round_bevel_round]",children:u.hero.smartKeyBanner}),(0,a.jsx)("p",{className:"text-text-secondary mt-3 text-sm leading-relaxed",children:u.hero.description})]}),(0,a.jsxs)("div",{className:"auth-showcase-frame",children:[(0,a.jsxs)("div",{className:"auth-showcase-chrome",children:[(0,a.jsx)("span",{}),(0,a.jsx)("span",{}),(0,a.jsx)("span",{})]}),(0,a.jsx)("div",{className:"auth-showcase-body",style:{"--auth-showcase-image":"url('/auth-showcase-v2.png')"}})]}),(0,a.jsx)("p",{className:"text-text-tertiary absolute bottom-6 left-14 z-10 text-xs",children:"© 2025â2026 XycAi INC. ä¿çæææå©ã"})]})]})]})}},80869(e,t,s){s.r(t),s.d(t,{component:()=>b});var a=s(72361),n=s(68413),r=s(82799),i=s(17034),o=s(45064),l=s(19376),c=s(20598),d=s(20032),u=s(64577),h=s(6702),x=s(6433),m=s(61631),p=s(74657);let f={github:{label:"GitHub",Icon:e=>(0,a.jsx)(x.SrF,{className:e.className,focusable:"false"})},oidc:{label:"OIDC",Icon:m.ekZ},linuxdo:{label:"LinuxDO",Icon:e=>(0,a.jsx)(x.$XO,{className:e.className,focusable:"false"})},telegram:{label:"Telegram",Icon:m.Vnp},wechat:{label:"WeChat",Icon:e=>(0,a.jsx)(x.tnV,{className:e.className,focusable:"false"})}};function w(e){let{provider:t,mode:s}=e,{t:r}=(0,h.Bd)(),{label:i,Icon:o}=(0,n.useMemo)(()=>f[t?.toLowerCase()??""]||{label:"account",Icon:m.y1X},[t]),l=r(i),c="bind"===s,d=r(c?"Binding your {{provider}} account":"Signing you in with {{provider}}",{provider:l}),u=r(c?"Hang tight while we securely link this account to your profile.":"Hang tight while we finish connecting your account."),x=r(c?"You can close this tab once the binding completes or a success message appears in the original window.":"You'll be redirected automatically. You can return to the previous page if nothing happens after a few seconds.");return(0,a.jsx)(p.D,{children:(0,a.jsxs)("div",{className:"w-full space-y-8",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center space-y-4 text-center",children:[(0,a.jsx)("div",{className:"bg-muted flex h-16 w-16 items-center justify-center rounded-2xl",children:(0,a.jsx)(o,{className:"h-8 w-8"})}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("h2",{className:"text-center text-2xl font-semibold tracking-tight",children:d}),(0,a.jsx)("p",{className:"text-muted-foreground text-sm sm:text-base",children:u})]})]}),(0,a.jsxs)("div",{className:"space-y-4 text-center",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 text-sm font-medium",children:[(0,a.jsx)(m.krw,{className:"h-4 w-4 animate-spin"}),(0,a.jsx)("span",{children:r("Processing OAuth response...")})]}),(0,a.jsx)("p",{className:"text-muted-foreground text-sm",children:x}),(0,a.jsx)("p",{className:"text-muted-foreground text-xs",children:r("This may take a few moments while we validate the request and update your session.")})]})]})})}var g=s(88901);function b(){let e=(0,r.Z)(),{provider:t}=(0,i.g)({from:"/oauth/$provider"}),s=(0,o.S)({from:"/oauth/$provider"}
1),[h,x]=(0,n.useState)(()=>"u"<typeof window?"login":window.opener?"bind":"login");return(0,n.useEffect)(()=>{"u">typeof window&&x(window.opener?"bind":"login")},[]),(0,n.useEffect)(()=>{(async()=>{let a=t=>{e({to:t,replace:!0}),"u">typeof window&&setTimeout(()=>{let e=t.startsWith("/")?t:`/${t}`,s=window.location.pathname+window.location.search;s!==e&&s!==`${e}/`&&window.location.replace(t)},100)};if(!s?.code){c.oR.error(l.Ay.t("Missing code")),a("/sign-in");return}let n="u">typeof window?!!window.opener:"bind"===h;n&&"bind"!==h?x("bind"):n||"login"===h||x("login");let r=e=>{if("u">typeof window)try{window.localStorage.setItem(g.GC,JSON.stringify({provider:t,status:e,timestamp:Date.now()}))}catch(e){}},i=async()=>{try{let e=await (0,u.Ng)();if(e?.success&&e.data){d.n.getState().auth.setUser(e.data);try{"u">typeof window&&e.data?.id!=null&&window.localStorage.setItem("uid",String(e.data.id))}catch(e){}return!0}}catch(e){}return!1},o=e=>{a(e||s?.redirect||"/dashboard"),c.oR.success(l.Ay.t("Signed in successfully!"))},m=e=>{r("error"),c.oR.error(e)},p=async e=>{await i()?o():(c.oR.error(e),a("/sign-in"))};try{let e={params:{code:s.code,state:s.state},skipBusinessError:!0},h=await u.FH.get(`/api/oauth/${t}`,e);if(h?.data?.success){let{message:e}=h.data,t=h.data?.data??null;if("bind"===e){c.oR.success(l.Ay.t("Binding successful!")),r("success"),n?"u">typeof window&&(window.close(),setTimeout(()=>{window.closed||window.location.replace("/_authenticated/profile/")},200)):a("/_authenticated/profile/");return}if(t){d.n.getState().auth.setUser(t);try{"u">typeof window&&null!=t.id&&window.localStorage.setItem("uid",String(t.id))}catch(e){}o();return}if(await i())return void o();c.oR.error(h?.data?.message||l.Ay.t("OAuth failed")),a("/sign-in");return}let x=h?.data?.message||"OAuth failed";if(!h?.data?.success&&!n&&"该 GitHub è´¦æ·å·²è¢«ç»å®"===x&&await i())return void o();n?m(x):await p(x);return}catch(t){let e=(t&&"object"==typeof t&&"response"in t&&t.response?.data?.message)??(t instanceof Error?t.message:void 0)??"OAuth failed";if(n)return void m(e);await p(e);return}})()},[h,e,t,s]),(0,a.jsx)(w,{provider:t,mode:h})}}}]);
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.