1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,928115,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(117927),i=e.i(247047),n=e.i(674997),l=e.i(364640);let o=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;e.s(["CourseSignup",0,function({source:e="work_with_us",className:s,align:u="center"}){let[d,c]=(0,r.useState)(""),[m,g]=(0,r.useState)("idle"),[h,p]=(0,r.useState)(!1),[f,b]=(0,r.useState)(null),[y,w]=(0,r.useState)(null),v=(0,r.useRef)(null),S=(0,r.useCallback)(e=>{let t=e.trim().toLowerCase();if(!o.test(t))return b("Please enter a valid email address."),g("error"),Promise.resolve(!1);if(t===y)return Promise.resolve(!0);if(v.current?.email===t)return v.current.promise;g("validating"),b(null);let r=(async()=>{try{let e=await (0,a.getSupabase)(),{data:r,error:i}=await e.functions.invoke("validate-email",{body:{email:t}});if(i)return w(t),g("idle"),!0;if(r?.valid)return w(t),b(null),g("idle"),!0;let n=r?.reason||"This email address appears to be invalid.";return r?.suggestion&&(n+=` Did you mean ${r.suggestion}?`),b(n),g("error"),!1}catch{return w(t),g("idle"),!0}finally{v.current?.email===t&&(v.current=null)}})();return v.current={email:t,promise:r},r},[y]),k=async t=>{if(t.preventDefault(),"loading"!==m&&!h){p(!0);try{let t,r,l=d.trim().toLowerCase();if(!await S(d))return;g("loading");let o=await fetch("https://api.encharge.io/v1/hooks/a939cd9f-ad64-41a2-8a7d-bedf3b6a1895",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:l,source:e})});if(!o.ok)throw Error(`Encharge responded ${o.status}`);t="u">typeof crypto&&crypto.randomUUID?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`,r=(0,i.getExternalId)(),(0,i.persistEmail)(l),(0,n.setUserEmail)(l),(0,n.setExternalId)(r),(0,n.trackLead)({eventId:t,email:l}),(0,n.trackLinkedInCourseLead)(),(0,a.getSupabase)().then(e=>e.functions.invoke("send-lead-capi",{body:{event_id:t,email:l,fbp:(0,i.getFbp)(),fbc:(0,i.getFbc)(),user_agent:(0,i.getUserAgent)(),external_id:r,source_url:window.location.href}})).catch(e=>console.error("send-lead-capi failed:",e)),g("done"),c("")}catch(e){console.error("course signup failed:",e),b("Something went wrong. Please try again."),g("error")}finally{p(!1)}}},C=!!y&&d.trim().toLowerCase()===y;return(0,t.jsx)(l.ConicEmailField,{email:d,onChange:e=>{(0,a.preloadSupabase)(),c(e),f&&b(null),"error"===m&&g("idle"),e.trim().toLowerCase()!==y&&w(null)},onBlur:()=>{let e=d.trim();e&&o.test(e)&&S(d)},onSubmit:k,busy:h,buttonLabel:"validating"===m?"Checkingâ¦":"loading"===m?"Sendingâ¦":"Get the course",done:"done"===m,doneLabel:"You're in â check your inbox for lesson one.",error:"error"===m?f:null,hint:"idle"===m&&C&&!f?"Email verified â you're all set":null,align:u,className:s})}])},731002,e=>{e.v(t=>Promise.all(["static/chunks/0mjwy61w80o6u.js","static/chunks/1hxh8_0sn8gzk.js"].map(t=>e.l(t))).then(()=>t(626852)))}]);
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.