1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[616],{7805:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/signup",function(){return r(1384)}])},6129:function(e,t,r){"use strict";r.d(t,{Z:function(){return BackButton}});var s=r(5893);r(7294);var a=r(1664),n=r.n(a);function BackButton(e){let{callbackUrl:t}=e;return t?(0,s.jsx)("div",{className:"absolute top-0 left-0 m-4 sm:m-6 z-20",children:(0,s.jsxs)(n(),{href:t,className:"inline-flex items-center gap-2 px-3.5 py-1.5 rounded-lg border border-border bg-card text-foreground text-xs font-semibold hover:bg-muted transition-colors shadow-xs",children:[(0,s.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,s.jsx)("line",{x1:"19",y1:"12",x2:"5",y2:"12"}),(0,s.jsx)("polyline",{points:"12 19 5 12 12 5"})]}),"Back"]})}):null}},1384:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return SignUp}});var s=r(5893),a=r(7294),n=r(1163),i=r(9008),l=r.n(i),o=r(1664),c=r.n(o),d=r(5675),m=r.n(d),u=r(1752),x=r.n(u),h=r(8917),p=r(6129),f=r(2965),g=r(7536);let{publicRuntimeConfig:b}=x()(),y=b.WR_IO_URL;function SignUp(){(0,n.useRouter)();let[e,t]=(0,a.useState)(!1),[r,i]=(0,a.useState)(""),[o,d]=(0,a.useState)(!1),[u,x]=(0,a.useState)(null),[b,j]=(0,a.useState)({minLength:!1,validChars:!1}),[v,N]=(0,a.useState)("");(0,a.useEffect)(()=>{let e=new URLSearchParams(window.location.search),t=e.get("callbackUrl");t&&N(decodeURIComponent(t))},[]);let{register:w,handleSubmit:k,watch:S,formState:{errors:_,isValid:C,touchedFields:I}}=(0,g.cI)({mode:"onTouched"}),E=S("name",""),U=function(e,t){let[r,s]=(0,a.useState)(e);return(0,a.useEffect)(()=>{let r=setTimeout(()=>{s(e)},t);return()=>{clearTimeout(r)}},[e,t]),r}(E,500);(0,a.useEffect)(()=>{j({minLength:E.length>=6,validChars:/^[a-z0-9-]*$/.test(E)})},[E]),(0,a.useEffect)(()=>{let checkName=async()=>{if(!U||U.length<6||!/^[a-z0-9-]+$/.test(U)){x(null);return}d(!0),x(null);try{let e=await fetch("/api/auth/check-name-availability?name=".concat(encodeURIComponent(U))),t=await e.json();x(t)}catch(e){x({available:!1,message:"Could not verify name. Please check your connection."})}finally{d(!1)}};checkName()},[U]);let onSubmit=async e=>{t(!0),i("");try{let t=await fetch("/api/auth/signup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),r=await t.json();if(t.ok){if(r.redirectUrl&&r.instance_id&&r.username){let e=v||"".concat(r.redirectUrl,"?instanceId=").concat(r.instance_id,"&username=").concat(r.username);window.location.href=e}else i("Registration succeeded, but critical data was missing from the response.")}else i(r.error||"An error occurred during registration")}catch(e){i("An error occurred during registration")}finally{t(!1)}},R=null===u||u.available;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(l(),{children:[(0,s.jsx)("title",{children:"Sign Up to WR.IO"}),(0,s.jsx)("meta",{name:"description",content:"Create a WR.IO account to start using AI-powered workflows and Sonar pings to get real answers from your communications."}),(0,s.jsx)("link",{rel:"canonical",href:"https://auth.wr.io/signup"})]}),e&&(0,s.jsx)(f.Z,{message:"Creating your account..."}),(0,s.jsxs)("div",{className:"min-h-screen flex flex-col justify-between bg-background text-foreground ".concat(e?"is-navigating":""),id:"kt_app_root",children:[(0,s.jsx)(p.Z,{callbackUrl:v}),(0,s.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center p-6 sm:p-10",children:[(0,s.jsx)("div",{className:"max-w-[480px] w-full bg-card border border-border rounded-xl shadow-lg p-6 sm:p-8",children:(0,s.jsxs)("form",{onSubmit:k(onSubmit),className:"flex flex-col gap-5",children:[(0,s.jsxs)("div",{className:"text-center mb-1",children:[(0,s.jsx)("h1",{className:"text-xl font-bold text-foreground mb-1.5",children:"Sign Up to WR.IO"}),(0,s.jsxs)("div",{className:"text-sm font-medium text-muted-foreground",children:["Already have an account? ",(0,s.jsx)(c(),{href:"/".concat(v?"?callbackUrl="+encodeURIComponent(v):""),className:"text-primary hover:underline font-semibold",children:"Sign In"})]})]}),(0,s.jsx)("div",{className:"p-4 rounded-xl border border-dashed border-info/40 bg-info/5 text-start",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("i",{className:"ki-filled ki-setting-4 text-info text-xl mt-0.5 shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("a",{href:"".concat(y,"/wrio/early-access"),className:"font-bold text-xs text-foreground hover:text-primary transition-colors",children:"Early Access Solution"}),(0,s.jsx)("p",{className:"text-[11px] text-muted-foreground mt-1 leading-relaxed",children:"Get instant access and start automating; get involved with this solution as it develops."}),(0,s.jsxs)("div",{className:"text-[11px] text-muted-foreground mt-1",children:[(0,s.jsx)("strong",{className:"text-foreground",children:"Note:"})," This solution is fully functional but not feature-complete and may change further."," ",(0,s.jsx)("a",{href:"".concat(y,"/wrio/early-access"),className:"text-primary font-semibold hover:underline",children:"Learn more"})]})]})]})}),(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsx)("label",{htmlFor:"name",className:"text-xs font-semibold text-foreground",children:"Name"}),(0,s.jsxs)("div",{className:"relative flex items-center",children:[(0,s.jsx)("input",{type:"text",id:"name",autoComplete:"off",className:"w-full bg-background border border-border focus:border-primary focus:ring-1 focus:ring-primary rounded-md px-3.5 py-2.5 text-sm text-foreground placeholder-muted-foreground outline-none transition-all",...w("name",{required:"Name is required",minLength:{value:6,message:"Name must be at least 6 characters long"},pattern:{value:/^[a-z0-9-]+$/,message:"Name can only contain lowercase letters, numbers, and hyphens."}})}),o&&(0,s.jsx)("span",{className:"absolute right-3",children:(0,s.jsx)("span",{className:"inline-block size-4 border-2 border-primary border-t-transparent roun
1ded-full animate-spin"})})]}),_.name&&(0,s.jsx)("div",{className:"text-destructive text-xs mt-1",children:_.name.message}),u&&!u.available&&!_.name&&(0,s.jsx)("div",{className:"text-destructive text-xs mt-1",children:u.message}),u&&u.available&&!_.name&&(0,s.jsx)("div",{className:"text-emerald-500 text-xs mt-1",children:u.message}),I.name&&(0,s.jsxs)("div",{className:"space-y-1 mt-1 text-xs",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 ".concat(b.minLength?"text-emerald-500":"text-destructive"),children:[(0,s.jsx)("i",{className:"ki-filled ".concat(b.minLength?"ki-check-circle text-emerald-500":"ki-cross-circle text-destructive"," text-sm")}),"At least 6 characters long"]}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5 ".concat(b.validChars?"text-emerald-500":"text-destructive"),children:[(0,s.jsx)("i",{className:"ki-filled ".concat(b.validChars?"ki-check-circle text-emerald-500":"ki-cross-circle text-destructive"," text-sm")}),"Only lowercase letters (a-z), numbers (0-9), and hyphens (-)"]})]}),E.length>=6&&!_.name&&(0,s.jsxs)("div",{className:"text-xs text-muted-foreground mt-1",children:["Your profile URL will be: ",(0,s.jsxs)("span",{className:"font-semibold text-foreground",children:[y,"/@",E]})]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsx)("label",{htmlFor:"email",className:"text-xs font-semibold text-foreground",children:"Email"}),(0,s.jsx)("input",{type:"email",id:"email",className:"w-full bg-background border border-border focus:border-primary focus:ring-1 focus:ring-primary rounded-md px-3.5 py-2.5 text-sm text-foreground placeholder-muted-foreground outline-none transition-all",...w("email",{required:"Email is required",pattern:{value:/^\S+@\S+$/i,message:"Please enter a valid email address"}})}),_.email&&(0,s.jsx)("div",{className:"text-destructive text-xs mt-1",children:_.email.message})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsx)("label",{htmlFor:"password",className:"text-xs font-semibold text-foreground",children:"Password"}),(0,s.jsx)("input",{type:"password",id:"password",className:"w-full bg-background border border-border focus:border-primary focus:ring-1 focus:ring-primary rounded-md px-3.5 py-2.5 text-sm text-foreground placeholder-muted-foreground outline-none transition-all",...w("password",{required:"Password is required",minLength:{value:8,message:"Password must be at least 8 characters long"}})}),_.password&&(0,s.jsx)("div",{className:"text-destructive text-xs mt-1",children:_.password.message})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsxs)("label",{className:"flex items-start gap-2.5 text-xs text-muted-foreground cursor-pointer select-none",children:[(0,s.jsx)("input",{type:"checkbox",id:"termsAccepted",className:"mt-0.5 rounded border-border text-primary focus:ring-primary size-4 shrink-0",...w("termsAccepted",{required:"You must agree to the Terms of Service and Privacy Policy to register."})}),(0,s.jsxs)("span",{children:["I agree to the ",(0,s.jsx)(c(),{href:"".concat(y,"/wrio/site/legal/terms"),target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline font-semibold",children:"Terms of Service"})," and ",(0,s.jsx)(c(),{href:"".concat(y,"/wrio/site/legal/privacy"),target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline font-semibold",children:"Privacy Policy"}),"."]})]}),_.termsAccepted&&(0,s.jsx)("div",{className:"text-destructive text-xs mt-1",children:_.termsAccepted.message})]}),r&&(0,s.jsx)("div",{className:"bg-destructive/10 border border-destructive/20 text-destructive py-2 px-3 text-xs rounded-md",children:r}),(0,s.jsx)("button",{type:"submit",className:"w-full py-2.5 rounded-md font-medium text-sm flex items-center justify-center transition-all bg-primary text-primary-foreground hover:opacity-90 disabled:opacity-50 cursor-pointer mt-2",disabled:e||!(C&&R&&!o),children:e?(0,s.jsxs)("span",{className:"flex items-center gap-2",children:["Please wait... ",(0,s.jsx)("span",{className:"inline-block size-4 border-2 border-current border-t-transparent roun
1ded-full animate-spin"})]}):(0,s.jsx)("span",{children:"Sign Up"})})]})}),(0,s.jsxs)("div",{className:"py-8 text-center",children:[(0,s.jsx)("h3",{className:"text-muted-foreground text-[10px] font-bold uppercase tracking-widest mb-4 px-4",children:"BACKED BY LEADING INNOVATION GRANTS"}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-6 opacity-60",children:[(0,s.jsx)("a",{href:"https://ec.europa.eu",target:"_blank",rel:"noreferrer",className:"hover:opacity-100 transition-opacity",children:(0,s.jsx)(m(),{src:"https://webrunes.com/assets/images/icons/partner1.png",alt:"European Commission",width:100,height:30,className:"h-6 w-auto grayscale",style:{filter:"grayscale(1)"}})}),(0,s.jsx)("a",{href:"https://fed4fire.eu",target:"_blank",rel:"noreferrer",className:"hover:opacity-100 transition-opacity",children:(0,s.jsx)(m(),{src:"https://webrunes.com/assets/images/icons/partner2.png",alt:"Fed4FIRE+",width:100,height:30,className:"h-6 w-auto grayscale",style:{filter:"grayscale(1)"}})}),(0,s.jsx)("a",{href:"http://imec.be",target:"_blank",rel:"noreferrer",className:"hover:opacity-100 transition-opacity",children:(0,s.jsx)(m(),{src:"https://webrunes.com/assets/images/icons/partner3.png",alt:"IMEC",width:100,height:30,className:"h-6 w-auto grayscale",style:{filter:"grayscale(1)"}})}),(0,s.jsx)("a",{href:"https://itea4.org/project/project-allegro.html",target:"_blank",rel:"noreferrer",className:"hover:opacity-100 transition-opacity",children:(0,s.jsx)(m(),{src:"".concat(y,"/assets/media/partners/ukri.png"),alt:"UKRI",width:100,height:30,className:"h-6 w-auto grayscale",style:{filter:"grayscale(1)"}})})]})]})]}),(0,s.jsx)(h.Z,{})]})]})}}},function(e){e.O(0,[91,664,472,917,774,888,179],function(){return e(e.s=7805)}),_N_E=e.O()}]);
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.