1"use strict";(globalThis.webpackChunkninjapipe=globalThis.webpackChunkninjapipe||[]).push([[76615],{76615(v,d,o){o.r(d),o.d(d,{default:()=>L});var r=o(51477),m=o(40259),s=o(50388),n=o(6227),y=o(23970),A=o(91960),k=o(34198),E=o(17573),S=o(38754),g=o(2775),P=o(95910),W=o(42727),z=o(88133),e=o(70481);const C=(0,z.A)((0,e.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25"}),"Help");var T=o(19335),D=o(7323),w=o(67763),I=o(88715),H=o(77020),B=o(93078);function L(){const{user:M,userId:K}=(0,m.A)(),{t}=(0,B.Bd)(),[c,R]=r.useState(""),[b,l]=r.useState(""),[F,j]=r.useState(!1),[f,x]=r.useState(null),u=(0,I.Zp)();r.useEffect(()=>{(async()=>{const a=M,p=H.A.get("sb-workspace"),{data:h}=await w.ND.auth.getUser();if(a||h!=null&&h.user){u(p?"/dashboard":"/workspaces");return}})()},[u]);const U=i=>{R(i.target.value),l(""),x(null)},V=async i=>{if(!i){x(null);return}j(!0);try{const a=i.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/^-+|-+$/g,""),{data:p,error:h}=await w.ND.from("workspaces").select("id, name, slug").eq("slug",a).limit(1);h?(console.error("Error checking workspace:",h),x(!1),l(t("workspaceEntryPage.errors.checkWorkspace"))):p&&p.length>0?(x(!0),l("")):(x(!1),l(t("workspaceEntryPage.errors.notFound")))}catch(a){console.error("Validation error:",a),x(!1),l(t("workspaceEntryPage.errors.validateError"))}finally{j(!1)}};r.useEffect(()=>{const i=setTimeout(()=>{c&&V(c)},500);return()=>clearTimeout(i)},[c]);const O=async i=>{if(i.preventDefault(),!c){l(t("workspaceEntryPage.errors.enterName"));return}if(f!==!0){l(t("workspaceEntryPage.errors.enterValid"));return}const a=c.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/^-+|-+$/g,"");window.location.hostname.includes("localhost")?window.location.href=`/login?workspace=${a}`:window.location.href=`https://${a}.ninjapipe.app/login`};return(0,e.jsxs)(s.A,{sx:{bgcolor:"#181a20",height:"100vh",width:"100%",maxWidth:"none",display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"stretch",justifyContent:"stretch",overflow:"hidden",p:0,m:0},children:[(0,e.jsxs)(s.A,{sx:{flexBasis:{xs:0,md:"50%"},flexGrow:0,height:"100vh",display:{xs:"none",md:"flex"},width:{xs:0,md:"50%"},flexDirection:"column",justifyContent:"flex-start",p:{xs:3,md:10},background:"radial-gradient(ellipse at 60% 0%, #a78bfa 0%, #23232b 80%)",backgroundSize:"200% 200%",animation:"gradientMove 5s ease-in-out infinite",boxShadow:{md:"0 8px 32px 0 #0008"},width:"100%",overflow:"hidden","@keyframes gradientMove":{"0%":{backgroundPosition:"60% 0%"},"25%":{backgroundPosition:"80% 40%"},"50%":{backgroundPosition:"40% 80%"},"75%":{backgroundPosition:"0% 40%"},"100%":{backgroundPosition:"60% 0%"}}},children:[(0,e.jsxs)(s.A,{sx:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:3},children:[(0,e.jsx)(s.A,{sx:{mt:0,mb:2},children:(0,e.jsx)("img",{src:"/branding/ninjapipe-logo-fullwhite.png",alt:t("workspaceEntryPage.logoAlt"),style:{height:36,objectFit:"contain",borderRadius:8}})}),(0,e.jsxs)(s.A,{children:[(0,e.jsxs)(n.A,{sx:{color:"#fff",fontWeight:900,fontSize:38,lineHeight:1.1,mb:2,letterSpacing:-1},children:[t("workspaceEntryPage.marketingTitle")," ",(0,e.jsxs)("span",{style:{position:"relative",display:"inline-block"},children:[t("workspaceEntryPage.marketingHighlight"),(0,e.jsx)("svg",{viewBox:"0 0 100 18",width:"100",height:"18",style:{position:"absolute",left:0,bottom:-12,width:"100%",height:18,pointerEvents:"none"},children:(0,e.jsx)("path",{d:"M2 12 Q 20 18, 35 10 Q 50 2, 65 10 Q 80 18, 98 6",stroke:"#a78bfa",strokeWidth:"3",fill:"none",strokeLinecap:"round"})})]})," ",t("workspaceEntryPage.marketingTitleSuffix")]}),(0,e.jsx)(n.A,{sx:{color:"#e5e5e5",fontSize:17,fontWeight:400,maxWidth:420},children:t("workspaceEntryPage.marketingSubtitle")})]})]}),(0,e.jsx)(s.A,{sx:{flex:1,display:"flex",alignItems:"flex-end",justifyContent:"flex-end",width:"100%"},children:(0,e.jsx)("img",{src:"/landing.png",alt:t("workspaceEntryPage.screenshotAlt"),style:{width:1e3,height:"auto",borderRadius:12,boxShadow:"0 4px 24px #0008",marginBottom:16,marginRight:-450}})})]}),(0,e.jsxs)(s.A,{sx:{flexBasis:{xs:"100%",md:"50%"},flexGrow:{xs:1,md:0},width:{xs:"100%",md:"50%"},maxWidth:{xs:"100vw",md:"50%"},bgcolor:"#181a20",display:"flex",flexDirection:"column",alignItems:"stretch",justifyContent:{xs:"flex-start",md:"center"},minHeight:"100vh",height:{xs:"100vh",md:"100vh"},px:{xs:2,sm:3,md:4},py:{xs:3,md:0},overflow:{xs:"auto",md:"hidden"},overflowX:"hidden",position:"relative",boxSizing:"border-box"},children:[(0,e.jsx)(s.A,{sx:{display:{xs:"flex",md:"none"},justifyContent:"center",alignItems:"center",mb:{xs:4,sm:6},mt:{xs:2,sm:3},opacity:.5,width:"100%",px:{xs:2,sm:0},boxSizing:"border-box"},children:(0,e.jsx)("img",{src:"/logo.png",alt:t("workspaceEntryPage.logoAlt"),style:{height:28,objectFit:"contain",borderRadius:8,maxWidth:"100%"}})}),(0,e.jsx)(s.A,{sx:{width:"100%",maxWidth:{xs:"100%",sm:420,md:420},mx:"auto",my:{xs:"auto",md:0},p:{xs:0,md:4},boxSizing:"border-box",display:"flex",flexDirection:"column",justifyContent:"center",overflow:"hidden"},children:(0,e.jsxs)(y.A,{elevation:0,sx:{bgcolor:"transparent",boxShadow:"none",p:0,mb:0,width:"100%",maxWidth:"100%",borderRadius:{xs:0,md:2},boxSizing:"border-box",overflow:"hidden"},children:[(0,e.jsx)(n.A,{variant:"h4",sx:{fontWeight:800,color:"#fff",mb:1,textAlign:"center",letterSpacing:-.5,fontSize:{xs:24,sm:28,md:32},px:{xs:0,sm:0},wordWrap:"break-word"},children:t("workspaceEntryPage.enterWorkspaceTitle")}),(0,e.jsx)(n.A,{sx:{color:"#a1a1aa",mb:{xs:2.5,md:2},fontSize:{xs:14,sm:15,md:16},fontWeight:500,textAlign:"center",px:{xs:0,sm:0},wordWrap:"break-word"},children:t("workspaceEntryPage.enterWorkspaceSubtitle")}),(0,e.jsx)(s.A,{sx:{display:"flex",justifyContent:"center",mb:{xs:3,md:4},px:{xs:0,sm:0}},children:(0,e.jsx)(A.A,{title:(0,e.jsxs)(s.A,{sx:{p:1},children:[(0,e.jsx)(n.A,{sx:{color:"#fff",fontSize:{xs:13,md:14},fontWeight:600,mb:1},children:t("workspaceEntryPage.tooltipHowToTitle")}),(0,e.jsx)(n.A,{sx:{color:"#e5e5e5",fontSize:{xs:12,md:13},mb:1},children:t("workspaceEntryPage.tooltipBulletWelcomeEmail")}),(0,e.jsx)(n.A,{sx:{color:"#e5e5e5",fontSize:{xs:12,md:13}},children:t("workspaceEntryPage.tooltipBulletV3")})]}),placement:"top",arrow:!0,componentsProps:{tooltip:{sx:{bgcolor:"#1f2937",border:"1px solid #374151",borderRadius:2,maxWidth:{xs:260,md:280},boxShadow:"0 4px 12px rgba(0, 0, 0, 0.3)"}}},children:(0,e.jsxs)(k.A,{component:"button",variant:"body2",sx:{color:"#0084ff",textDecoration:"none",fontSize:{xs:13,md:14},fontWeight:500,display:"flex",alignItems:"center",gap:.5,cursor:"pointer",minHeight:44,"&:hover":{color:"#006cd1",textDecoration:"underline"}},children:[(0,e.jsx)(C,{sx:{fontSize:{xs:14,md:16}}}),t("workspaceEntryPage.howDoIFindThis")]})})}),(0,e.jsx)("form",{style:{width:"100%",maxWidth:"100%",boxSizing:"border-box"},onSubmit:O,children:(0,e.jsxs)(E.A,{spacing:3,sx:{width:"100%",maxWidth:"100%"},children:[(0,e.jsx)(S.A,{label:t("workspaceEntryPage.workspaceNameLabel"),name:"workspace",value:c,onChange:U,placeholder:t("workspaceEntryPage.workspacePlaceholder"),variant:"filled",InputProps:{style:{background:"#23232b",color:"#fff",borderRadius:8,fontWeight:500,border:"none",fontSize:{xs:16,md:"inherit"}},startAdornment:(0,e.jsx)(g.A,{position:"start",children:(0,e.jsx)(T.A,{sx:{color:"#a1a1aa",fontSize:{xs:20,md:24}}})}),endAdornment:F?(0,e.jsx)(g.A,{position:"end",children:(0,e.jsx)(P.A,{size:20,sx:{color:"#0084ff"}})}):f===!0?(0,e.jsx)(g.A,{position:"end",children:(0,e.jsx)(n.A,{sx:{color:"#10b981",fontSize:{xs:13,md:14}},children:"\u2713"})}):f===!1?(0,e.jsx)(g.A,{position:"end",children:(0,e.jsx)(n.A,{sx:{color:"#f87171",fontSize:{xs:13,md:14}},children:"\u2717"})}):null},InputLabelProps:{style:{color:"#a1a1aa",fontSize:{xs:14,md:"inherit"}}},fullWidth:!0,autoFocus:!0}),b&&(0,e.jsx)(n.A,{sx:{color:"#f87171",fontWeight:600,fontSize:{xs:13,md:14},mt:-1,px:{xs:.5,sm:0}},children:b}),f===!0&&(0,e.jsx)(n.A,{sx:{color:"#10b981",fontWeight:600,fontSize:{xs:13,md:14},mt:-1,px:{xs:.5,sm:0}},children:t("workspaceEntryPage.workspaceFoundMessage")}),(0,e.jsx)(W.A,{type:"submit",variant:"contained",endIcon:(0,e.jsx)(D.A,{}),sx:{bgcolor:"#0084ff",color:"#fff",borderRadius:2,px:3,py:{xs:1.75,md:1.5},fontWeight:800,fontSize:{xs:16,md:17},boxShadow:"0 2px 8px #0084ff33",mt:2,textTransform:"none",minHeight:48,"&:hover":{bgcolor:"#006cd1",color:"#ffffff"},"&.Mui-disabled":{bgcolor:"#23232b",color:"#a1a1aa",boxShadow:"none",opacity:1,cursor:"not-allowed"}},fullWidth:!0,disabled:f!==!0,children:t("workspaceEntryPage.continueToSignIn")})]})}),(0,e.jsxs)(n.A,{sx:{color:"#a1a1aa",mt:{xs:3,md:4},textAlign:"center",fontSize:{xs:13,md:15},px:{xs:1,sm:0}},children:[t("workspaceEntryPage.footerNoAccount")," ",(0,e.jsx)("a",{href:"/signup",style:{color:"#fff",textDecoration:"underline",fontWeight:600},children:t("workspaceEntryPage.footerSignUp")})]})]})})]})]})}},7323(v,d,o){o.d(d,{A:()=>s});var r=o(88133),m=o(70481);const s=(0,r.A)((0,m.jsx)("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward")},19335(v,d,o){o.d(d,{A:()=>s});var r=o(88133),m=o(70481);const s=(0,r.A)((0,m.jsx)("path",{d:"M12 7V3H2v18h20V7zM6 19H4v-2h2zm0-4H4v-2h2zm0-4H4V9h2zm0-4H4V5h2zm4 12H8v-2h2zm0-4H8v-2h2zm0-4H8V9h2zm0-4H8V5h2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8zm-2-8h-2v2h2zm0 4h-2v2h2z"}),"Business")}}]);
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.