PageSourceSearch

https://www.dasy.ai/assets/Login-DJIM5YMU.js

js dasy.ai collected 2026-10-05 11:57:23 UTC 15,290 bytes, 10 lines download raw bytes

1import{av as W,b0 as H,b1 as oe,b2 as q,b3 as re,b4 as ie,r as u,R as ne,am as le,j as e,k as ce,L as _,G as de}from"./index-BwTg1w4A.js";import{i as ge}from"./AuthContext-vypTrE7J.js";import{B as ue}from"./BrandButton-BjExqjIW.js";import{B as me}from"./BrandOutlinedButton-Ba4aC2nc.js";import{c as t}from"./theme-D-DqnDno.js";import{d as fe}from"./dasylogo-CbXhQNUr.js";import{o as he,M as xe,g as pe,a as A,G as ye,s as be,b as M,c as je}from"./MfaVerificationModal-BPVxBef4.js";import{s as we}from"./index-B4C0RYue.js";import{R as ve}from"./ArrowLeftOutlined-CjoAPPIs.js";import{A as ke}from"./index-B7uZUeKk.js";import{I as L}from"./index-CdT7OUwr.js";import{R as Se}from"./UserOutlined-BpyYT3T4.js";import{R as Fe}from"./LockOutlined-amj5zZPK.js";import{S as Ne}from"./index-BKMH-sCD.js";import{R as Ie}from"./SendOutlined-3KoG6CXC.js";import"./index-xsH4HHeE.js";import"./index-B2O9ifl6.js";import"./TextArea-ro4R_uEw.js";import"./SafetyCertificateOutlined-CLbH-5on.js";import"./AntdIcon-C6HBjhFJ.js";import"./index-B8x98xGB.js";import"./index-CbZJ16so.js";const x=(s,o)=>new W(s).setA(o).toRgbString(),w=(s,o)=>new W(s).lighten(o).toHexString(),Re=s=>{const o=H(s,{theme:"dark"});return{1:o[0],2:o[1],3:o[2],4:o[3],5:o[6],6:o[5],7:o[4],8:o[6],9:o[5],10:o[4]}},Ce=(s,o)=>{const n=s||"#000",r=o||"#fff";return{colorBgBase:n,colorTextBase:r,colorText:x(r,.85),colorTextSecondary:x(r,.65),colorTextTertiary:x(r,.45),colorTextQuaternary:x(r,.25),colorFill:x(r,.18),colorFillSecondary:x(r,.12),colorFillTertiary:x(r,.08),colorFillQuaternary:x(r,.04),colorBgSolid:x(r,.95),colorBgSolidHover:x(r,1),colorBgSolidActive:x(r,.9),colorBgElevated:w(n,12),colorBgContainer:w(n,8),colorBgLayout:w(n,0),colorBgSpotlight:w(n,26),colorBgBlur:x(r,.04),colorBorder:w(n,26),colorBorderSecondary:w(n,19)}},De=(s,o)=>{const n=Object.keys(oe).map(g=>{const d=H(s[g],{theme:"dark"});return Array.from({length:10},()=>1).reduce((a,b,p)=>(a[`${g}-${p+1}`]=d[p],a[`${g}${p+1}`]=d[p],a),{})}).reduce((g,d)=>(g=Object.assign(Object.assign({},g),d),g),{}),r=o??q(s);return Object.assign(Object.assign(Object.assign({},r),n),re(s,{generateColorPalettes:Re,generateNeutralColorPalettes:Ce}))},O={defaultSeed:ie.token,defaultAlgorithm:q,darkAlgorithm:De},G="'Playfair Display', Georgia, serif",V=()=>e.jsx("div",{style:{display:"flex",alignItems:"center"},children:e.jsx("img",{src:fe,alt:"Dasy AI knowledge base platform logo",width:"180",height:"50",loading:"eager",decoding:"async",style:{height:"50px",width:"auto"}})}),Be=()=>e.jsx("img",{src:"https://developers.google.com/identity/images/g-logo.png",alt:"Google authentication logo",width:"20",height:"20",loading:"lazy",decoding:"async",style:{height:"20px",marginRight:"8px"}}),_e=({isDarkMode:s})=>{const[o,n]=u.useState([{text:"Hi, I'm Dasy. I'm your AI process assistant. How can I help you?",sender:"bot"}]),[r,g]=u.useState(!1),[d,a]=u.useState(!1);return u.useEffect(()=>{const b=[{delay:1500,action:()=>n(h=>[...h,{text:"What is the next step in our process after we sign the contract?",sender:"user"}])},{delay:1500,action:()=>g(!0)},{delay:4e3,action:()=>g(!1)},{delay:4e3,action:()=>n(h=>[...h,{text:e.jsxs(e.Fragment,{children:[e.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[e.jsxs("li",{children:[e.jsx("span",{className:"font-semibold",children:"Step 1:"})," Onboarding Call Scheduled."]}),e.jsxs("li",{children:[e.jsx("span",{className:"font-semibold",children:"Step 2:"})," Submit Client Data Form."]})]}),"I've notified your account manager."]}),sender:"bot"}])},{delay:500,action:()=>g(!0)},{delay:2e3,action:()=>n(h=>[...h,{text:"Can you summarize the 'Verification Document'?",sender:"user"}])},{delay:2e3,action:()=>g(!0)},{delay:4500,action:()=>g(!1)},{delay:4500,action:()=>n(h=>[...h,{text:e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm flex items-center font-semibold",style:{color:t.textLight},children:"Summary:"}),e.jsxs("p",{className:"text-sm",style:{color:t.textLight},children:["Outlines the ",e.jsx("strong",{children:"three-phase security audit"})," (Data Integrity, Compliance, Pen-Testing Sign-off). Re-verification required annually."]})]}),sender:"bot"}])},{delay:500,action:()=>a(!0)}];let p=0;const v=b.map(({delay:h,action:R})=>(p+=h,setTimeout(R,p)));return()=>v.forEach(clearTimeout)},[]),e.jsxs("div",{className:"h-full flex flex-col p-6 rounded-2xl shadow-2xl animate-fade-in-up",style:{background:s?c(t.bgPanelDark,.05):`${t.grayLight}`,backdropFilter:"blur(10px)",border:`1px solid ${s?c(t.white,.06):"rgba(255,255,255,0.08)"}`,minHeight:600,minWidth:400,animationDelay:"0.2s",opacity:0,animationFillMode:"forwards"},children:[e.jsx("div",{className:"flex items-center text-lg font-bold mb-4 border-b pb-3",style:{color:t.textDark},children:e.jsx(V,{})}),e.jsxs("div",{className:"flex-grow overflow-y-auto space-y-4 pr-2",children:[o.map((b,p)=>e.jsx("div",{className:`flex ${b.sender==="user"?"justify-end":"justify-start"}`,children:e.jsx("div",{className:"max-w-[80%] p-3 rounded-xl shadow-sm",style:b.sender==="user"?{background:t.brand,color:t.white,borderRadius:"12px 12px 4px 12px"}:{background:t.white,color:t.textLight,border:"1px solid rgba(0,0,0,0.06)",borderRadius:"12px 12px 12px 4px"},children:b.text})},p)),r&&e.jsx("div",{className:"flex justify-start",children:e.jsx("div",{className:"max-w-[80%] p-3 rounded-xl",style:{background:t.white,color:t.textLight},children:e.jsxs("div",{className:"flex space-x-1",children:[e.jsx("span",{className:"w-2 h-2 rounded-full",style:{background:"rgba(107,114,128,1)",animation:"bounce 1s infinite .1s"}}),e.jsx("span",{className:"w-2 h-2 rounded-full",style:{background:"rgba(107,114,128,1)",animation:"bounce 1s infinite .2s"}}),e.jsx("span",{className:"w-2 h-2 rounded-full",style:{background:"rgba(107,114,128,1)",animation:"bounce 1s infinite .3s"}})]})})})]}),e.jsx("div",{className:"mt-6",children:e.jsxs("div",{className:`flex items-center p-3 rounded-full transition-opacity duration-500 ${d?"opacity-100":"opacity-0"}`,style:{background:s?"rgba(255,255,255,0.03)":"rgba(255,255,255,0.6)",border:s?"1px solid rgba(255,255,255,0.04)":"1px solid rgba(0,0,0,0.06)"},children:[e.jsx(L,{placeholder:"Type your question...",className:"flex-grow",disabled:!0,style:{background:"transparent",color:s?t.textDark:t.textLight,cursor:"default",border:"none"}}),e.jsx(de,{type:"primary",shape:"circle",icon:e.jsx(Ie,{}),disabled:!0,style:{backgroundColor:t.brand,borderColor:t.brand}})]})})]})};function tt(){const[s,o]=u.useState({identifier:"",password:""}),[n,r]=u.useState(""),[g,d]=u.useState(!1),[a,b]=u.useState(!1),[p,v]=u.useState("password"),[h,R]=u.useState(null),[U,$]=u.useState(!1),[k,Y]=u.useState(null),[J,T]=u.useState(!1),S=ne.useRef(!1),{login:Q,firebaseLogin:P,verifyMfa:X}=u.useContext(ge),C=le();u.useEffect(()=>{const l=localStorage.getItem("dasy_login_intent")==="true";let i=null;l&&(i=we.loading("Recovering Google session...",0),d(!0));let y=!1;const m=async(f,B)=>{var I,z;if(y||S.current){i&&i(),d(!1);return}y=!0,S.current=!0,localStorage.removeItem("dasy_login_intent"),v("social");try{const j=await M(f);R(j);const se=await P(j);D(se,j,"social")}catch(j){console.error(`[Auth] ❌ ${B} Error:`,j),r(((z=(I=j.response)==null?void 0:I.data)==null?void 0:z.detail)||"Social sign-in failed.")}finally{d(!1),i&&i(),y=!1}},F=async()=>{try{const f=await pe(A);f!=null&&f.user?await m(f.user,"Redirect"):l&&setTimeout(()=>{S.current||(i&&i(),d(!1),localStorage.removeItem("dasy_login_intent"))},6e3)}catch(f){console.error("[Redirect] ❌ Result Error:",f),localStorage.removeItem("dasy_login_intent"),i&&i(),d(!1)}},N=he(A,f=>{f&&(l||!S.current)&&m(f,"StateChange")});return F(),()=>N()},[]);const D=(l,i=null,y=null)=>{const m=y||p;if(l===!0)C("/chat");else if(l!=null&&l.multiStep){const{message:F,accounts:N,mfa_type:f,user_id:B}=l.data;if(F==="multiple_accounts"){const I={accounts:N||[],idToken:i||h,method:m,password:m==="password"?s.password:null};localStorage.setItem("dasy_acc_list",JSON.stringify(N||[])),localStorage.setItem("dasy_acc_token",i||h||""),localStorage.setItem("dasy_acc_method",m),localStorage.setItem("dasy_acc_pass",m==="password"?s.password:""),C("/select-account",{state:I})}else F==="mfa_required"&&(Y({user_id:B,mfa_type:f}),$(!0))}},Z=async l=>{T(!0);try{await X(k.user_id,l)===!0&&C("/chat")}catch(i){throw i}finally{T(!1)}},K=async l=>{var i,y;l.preventDefault(),r(""),d(!0),v("password");try{const m=await Q(s.identifier,s.password);D(m,null,"password")}catch(m){r(((y=(i=m.response)==null?void 0:i.data)==null?void 0:y.detail)||"Login failed. Please try again.")}d(!1)},ee=async l=>{d(!0),r(""),v("social");try{l instanceof ye&&l.setCustomParameters({prompt:"select_account"});const i=await be(A,l);if(i.user){const y=await M(i.user),m=await P(y);D(m,y,"social")}}catch(i){console.error("Popup login failed",i),r("Google login failed: "+(i.message||"Unknown error"))}finally{d(!1)}},E=l=>{o({...s,[l.target.name]:l.target.value})}
1,te=a?{color:t.textDark}:{color:t.textLight},ae={"--placeholder-color":a?t.textDark:"#9CA3AF"};return e.jsxs(ce,{theme:{algorithm:a?O.darkAlgorithm:O.defaultAlgorithm,token:{colorPrimary:t.brand,borderRadius:12}},children:[e.jsx("style",{children:`
2                @keyframes bounce { 0%, 100% { transform: translateY(-30%); } 50% { transform: translateY(0); } }
3                @keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
4                .animate-fade-in-up { animation: fadeInUp 0.6s ease-out forwards; }
5                .login-input { color: inherit !important; }
6                .login-input:focus, .login-input:focus-within {
7                    box-shadow: 0 0 0 2px rgba(120, 119, 230, 0.2) !important;
8                    border-color: #7877E6 !important;
9                }
10            `}),e.jsxs("div",{"data-dark":a?"true":"false",style:ae,className:"min-h-screen flex relative overflow-hidden transition-colors duration-500",children:[e.jsx(xe,{visible:U,mfaType:k==null?void 0:k.mfa_type,onVerify:Z,onCancel:()=>$(!1),loading:J}),e.jsxs("div",{className:"absolute -z-10 inset-0 pointer-events-none",children:[e.jsx("div",{style:{position:"absolute",top:"10%",right:"6%",width:360,height:360,borderRadius:"50%",filter:"blur(120px)",background:`${c(t.brand,.25)}`}}),e.jsx("div",{style:{position:"absolute",bottom:"5%",left:"6%",width:420,height:420,borderRadius:"50%",filter:"blur(150px)",background:`${c(t.brandDark,.2)}`}})]}),e.jsxs("div",{className:"w-full lg:w-1/2 flex items-center justify-center p-6 lg:p-16 relative z-20 transition-colors duration-500",style:{background:a?t.bgPanelDark:"transparent"},children:[e.jsx("div",{className:"absolute top-6 left-6 flex items-center gap-4",children:e.jsx(_,{to:"/",style:{textDecoration:"none"},children:e.jsx(V,{})})}),e.jsxs("div",{className:"relative w-full max-w-sm animate-fade-in-up",children:[e.jsx("div",{style:{position:"absolute",inset:0,borderRadius:24,background:`linear-gradient(135deg, ${c(t.brand,.35)}, ${c(t.brandDark,.18)})`,filter:"blur(20px)",opacity:.28}}),e.jsxs("div",{className:"relative p-10 rounded-3xl",style:{backdropFilter:"blur(10px)",background:a?c(t.bgPanelDark,.65):c(t.white,1),border:`1px solid ${c(t.white,a?.03:.8)}`,boxShadow:a?"0 10px 30px rgba(0,0,0,0.45)":"0 10px 30px rgba(16,24,40,0.08)"},children:[e.jsx("h2",{className:"text-4xl tracking-tight",style:{...te,fontFamily:G,fontWeight:700},children:"Welcome to Dasy"}),e.jsx("p",{style:{marginTop:12,color:a?t.textDark:"#6B7280"},children:"AI central brain for rapid file retrieval and process automation."}),e.jsx("div",{className:"mt-4",children:e.jsxs(_,{to:"/",className:"text-xs font-medium hover:underline transition-colors",style:{color:a?c(t.textDark,.9):"#6B7280"},children:[e.jsx(ve,{className:"mr-1"})," Back to Home"]})}),e.jsxs("form",{onSubmit:K,className:"mt-6 space-y-4",children:[n&&e.jsx(ke,{message:n,type:"error",showIcon:!0,style:{marginBottom:16,borderRadius:8}}),e.jsx(L,{name:"identifier",size:"large",placeholder:"Username or Email",prefix:e.jsx(Se,{style:{color:"#9CA3AF"}}),onChange:E,value:s.identifier,className:"login-input",style:{height:48,borderRadius:12,background:a?t.bgPanelDark:"#F9FAFB",color:a?t.textDark:t.textLight,border:`1px solid ${a?c("#000000",.25):"#E5E7EB"}`},required:!0}),e.jsx(L.Password,{name:"password",size:"large",placeholder:"Password",prefix:e.jsx(Fe,{style:{color:"#9CA3AF"}}),onChange:E,value:s.password,className:"login-input",style:{height:48,borderRadius:12,background:a?t.bgPanelDark:"#F9FAFB",color:a?t.textDark:t.textLight,border:`1px solid ${a?c("#000000",.25):"#E5E7EB"}`},required:!0}),e.jsx(ue,{htmlType:"submit",loading:g,size:"large",className:"w-full",style:{height:48,borderRadius:12,background:t.brand,borderColor:t.brand,color:t.white,fontWeight:700,boxShadow:`0 8px 30px ${c(t.brand,.18)}`,marginTop:"10px"},children:"Sign In"}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[e.jsx("div",{style:{height:1,flex:1,background:c(a?"#FFFFFF":"#000000",.06)}}),e.jsx("span",{style:{color:a?t.textDark:"#6B7280",fontSize:13},children:"OR"}),e.jsx("div",{style:{height:1,flex:1,background:c(a?"#FFFFFF":"#000000",.06)}})]}),e.jsx(Ne,{direction:"vertical",style:{width:"100%"},children:e.jsx(me,{size:"large",icon:e.jsx(Be,{}),onClick:()=>ee(je),className:"w-full",style:{height:48,borderRadius:12,background:a?c(t.white,.02):t.white,color:a?t.textDark:t.textLight,border:`1px solid ${a?c("#FFFFFF",.06):"rgba(0,0,0,0.08)"}`},children:"Sign in with Google"})}),e.jsxs("div",{className:"flex items-center justify-between mt-1",children:[e.jsx("div",{}),e.jsx(_,{to:"/forgot-password",size:"small",style:{color:a?t.brandDark:t.brand,fontSize:"13px",fontWeight:500},children:"Forgot Password?"})]})]})]})]})]}),e.jsx("div",{className:"hidden lg:flex lg:w-1/2 relative z-10 p-16",style:{background:"radial-gradient(circle at 10% 20%, rgb(111, 110, 219) 0%, rgb(92, 91, 199) 90.2%)",alignItems:"center",justifyContent:"center"},children:e.jsxs("div",{className:"max-w-full flex flex-col justify-between w-full h-full",children:[e.jsxs("div",{children:[e.jsx("h1",{style:{fontSize:36,fontWeight:700,fontFamily:G,color:t.white},children:"AI Revolutionizing the way you manage and understand company data."}),e.jsx("p",{style:{marginTop:12,color:c(t.textDark,.85)},children:"Save time digging for files, just ask Dasy. Dasy answers from your company's uploaded documents."})]}),e.jsx("div",{style:{flexGrow:1,marginTop:32,minHeight:600},children:e.jsx(_e,{isDarkMode:a})})]})})]}),window.location.hostname==="localhost"&&e.jsxs("div",{style:{position:"fixed",bottom:10,left:10,background:"rgba(0,0,0,0.7)",color:"#fff",padding:"8px 12px",borderRadius:8,fontSize:"10px",zIndex:9999,pointerEvents:"none",fontFamily:"monospace"},children:[e.jsxs("div",{children:["Intent: ",localStorage.getItem("dasy_login_intent")||"none"]}),e.jsxs("div",{children:["Token: ",localStorage.getItem("dasy_acc_token")?"YES":"NO"]}),e.jsxs("div",{children:["Accounts: ",JSON.parse(localStorage.getItem("dasy_acc_list")||"[]").length]})]})]})}function c(s,o=1){if(!s)return`rgba(0,0,0,${o})`;const n=s.replace("#",""),r=parseInt(n,16),g=r>>16&255,d=r>>8&255,a=r&255;return`rgba(${g}, ${d}, ${a}, ${o})`}export{tt 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.