PageSourceSearch

https://www.speechtonote.com/_next/static/chunks/c8638fcbc9633dff.js

js speechtonote.com collected 2026-09-24 10:21:58 UTC 8,641 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,34329,e=>{"use strict";var s=e.i(43476),r=e.i(71645),a=e.i(48148),t=e.i(67881),n=e.i(54169);let l=["Just saying hi 👋","Report a bug 🐛","Feature request ⭐","Affiliate program information 🏆","Promotion opportunities 🚀","Need a student discount 👩‍🎓"];e.s(["ContactForm",0,()=>{let e=(0,a.useTranslations)("contactUs"),[i,o]=(0,r.useState)({name:"",email:"",reason:l[0],message:""}),[m,d]=(0,r.useState)({}),[c,u]=(0,r.useState)({name:!1,email:!1,message:!1}),[g,x]=(0,r.useState)(!1),[f,h]=(0,r.useState)(!1),[p,v]=(0,r.useState)(null),b=(s,r)=>{if("name"===s){if(!r.trim())return e("formNameError")}else if("email"===s){if(!r.trim())return e("formEmailError");if(!r.includes("@"))return"Email must include @";if(!r.includes("."))return"Email must include domain (.com, .net, etc.)";if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r))return e("formEmailInvalid")}else if("message"===s&&!r.trim())return e("formMessageError")},j=e=>{let{name:s,value:r}=e.target;if(o(e=>({...e,[s]:r})),m[s]&&d(e=>({...e,[s]:void 0})),c[s]){let e=b(s,r);d(r=>({...r,[s]:e}))}},N=e=>{u(s=>({...s,[e]:!0}));let s=i[e],r=b(e,s);d(s=>({...s,[e]:r}))},y=e=>c[e]&&!!i[e].trim()&&!m[e],w=async e=>{let s,r,a,t;if(e.preventDefault(),u({name:!0,email:!0,message:!0}),s={},r=b("name",i.name),a=b("email",i.email),t=b("message",i.message),r&&(s.name=r),a&&(s.email=a),t&&(s.message=t),d(s),0===Object.keys(s).length){h(!0),v(null);try{let e=await fetch("/api/contact",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),s=await e.json();if(!e.ok)throw Error(s.error||"Something went wrong.");x(!0)}catch(e){v(e instanceof Error?e.message:"Something went wrong. Please try again.")}finally{h(!1)}}};return g?(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center text-center py-16 gap-4",children:[(0,s.jsx)("div",{className:"size-14 rounded-full bg-green-100 flex items-center justify-center text-2xl",children:"✓"}),(0,s.jsx)("h2",{className:"text-2xl font-bold text-foreground",children:e("formSuccessTitle")}),(0,s.jsx)("p",{className:"text-muted-foreground max-w-sm",children:e("formSuccessBody",{email:i.email})}),(0,s.jsx)("button",{onClick:()=>{o({name:"",email:"",reason:l[0],message:""}),d({}),u({name:!1,email:!1,message:!1}),x(!1)},className:"text-sm text-primary underline-offset-4 hover:underline mt-2",children:e("formSendAnother")})]}):(0,s.jsxs)("form",{onSubmit:w,noValidate:!0,className:"flex flex-col gap-5",children:[(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-5",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsxs)("label",{htmlFor:"name",className:"text-sm font-medium text-foreground",children:[e("formName")," ",(0,s.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,s.jsx)("input",{id:"name",name:"name",type:"text",autoComplete:"name",placeholder:"Jane Smith",value:i.name,onChange:j,onBlur:()=>N("name"),"aria-invalid":!!m.name,"aria-describedby":m.name?"name-error":void 0,className:`h-11 rounded-lg border bg-background px-4 text-sm text-foreground placeholder:text-muted-foreground/60 outline-none transition-all focus:ring-2 ${m.name?"border-destructive focus:ring-destructive/30 focus:border-destructive":y("name")?"border-green-500 focus:ring-green-500/30 focus:border-green-500":"border-input focus:ring-ring/40 focus:border-ring"}`}),m.name&&(0,s.jsx)("p",{id:"name-error",role:"alert",className:"text-xs text-destructive",children:m.name}),y("name")&&(0,s.jsxs)("p",{className:"text-xs text-green-600 flex items-center gap-1",children:[(0,s.jsx)("svg",{className:"size-3",fill:"currentColor",viewBox:"0 0 20 20",children:(0,s.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),"Looks good!"]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsxs)("label",{htmlFor:"email",className:"text-sm font-medium text-foreground",children:[e("formEmail")," ",(0,s.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,s.jsx)("input",{id:"email",name:"email",type:"email",autoComplete:"email",placeholder:"[email protected]",value:i.email,onChange:j,onBlur:()=>N("email"),"aria-invalid":!!m.email,"aria-describedby":m.email?"email-error":void 0,className:`h-11 rounded-lg border bg-background px-4 text-sm text-foreground placeholder:text-muted-foreground
1/60 outline-none transition-all focus:ring-2 ${m.email?"border-destructive focus:ring-destructive/30 focus:border-destructive":y("email")?"border-green-500 focus:ring-green-500/30 focus:border-green-500":"border-input focus:ring-ring/40 focus:border-ring"}`}),m.email&&(0,s.jsx)("p",{id:"email-error",role:"alert",className:"text-xs text-destructive",children:m.email}),y("email")&&(0,s.jsxs)("p",{className:"text-xs text-green-600 flex items-center gap-1",children:[(0,s.jsx)("svg",{className:"size-3",fill:"currentColor",viewBox:"0 0 20 20",children:(0,s.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),"Looks good!"]})]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsx)("label",{htmlFor:"reason",className:"text-sm font-medium text-foreground",children:e("formReasonLabel")}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("select",{id:"reason",name:"reason",value:i.reason,onChange:j,className:"w-full h-11 rounded-lg border border-input bg-background px-4 pr-10 text-sm text-foreground outline-none appearance-none transition-shadow focus:ring-2 focus:ring-ring/40 focus:border-ring cursor-pointer",children:l.map(e=>(0,s.jsx)("option",{value:e,children:e},e))}),(0,s.jsx)("span",{className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:(0,s.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,s.jsx)("path",{d:"M4 6l4 4 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("label",{htmlFor:"message",className:"text-sm font-medium text-foreground",children:[e("formMessageLabel")," ",(0,s.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,s.jsxs)("span",{className:`text-xs tabular-nums ${i.message.length>900?"text-destructive":"text-muted-foreground"}`,children:[i.message.length,"/",1e3]})]}),(0,s.jsx)("textarea",{id:"message",name:"message",rows:5,maxLength:1e3,placeholder:"Your message...",value:i.message,onChange:j,onBlur:()=>N("message"),"aria-invalid":!!m.message,"aria-describedby":m.message?"message-error":void 0,className:`resize-none rounded-lg border bg-background px-4 py-3 text-sm text-foreground placeholder:text-muted-foreground/60 outline-none transition-all focus:ring-2 ${m.message?"border-destructive focus:ring-destructive/30 focus:border-destructive":y("message")?"border-green-500 focus:ring-green-500/30 focus:border-green-500":"border-input focus:ring-ring/40 focus:border-ring"}`}),m.message&&(0,s.jsx)("p",{id:"message-error",role:"alert",className:"text-xs text-destructive",children:m.message}),y("message")&&(0,s.jsxs)("p",{className:"text-xs text-green-600 flex items-center gap-1",children:[(0,s.jsx)("svg",{className:"size-3",fill:"currentColor",viewBox:"0 0 20 20",children:(0,s.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),"Looks good!"]})]}),p&&(0,s.jsx)("p",{role:"alert",className:"text-sm text-destructive text-center",children:p}),(0,s.jsx)(t.Button,{type:"submit",size:"lg",disabled:f,className:"w-full sm:w-auto sm:self-end rounded-lg font-semibold overflow-visible",children:f?(0,s.jsxs)("span",{className:"flex items-center gap-2",children:[(0,s.jsxs)("svg",{className:"animate-spin size-4",viewBox:"0 0 24 24",fill:"none",children:[(0,s.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,s.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}),e("formSending")]}):(0,s.jsxs)("span",{className:"flex items-center gap-2",children:[e("formSubmit"),(0,s.jsx)(n.ArrowRightIcon,{className:"size-4"})]})})]})}])}]);

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.