PageSourceSearch

https://bizwax.ai/_next/static/chunks/4440-63c0693a68c6291c.js

js bizwax.ai collected 2026-10-05 15:18:41 UTC 21,733 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4440],{63:(e,t,n)=>{var s=n(7260);n.o(s,"usePathname")&&n.d(t,{usePathname:function(){return s.usePathname}}),n.o(s,"useRouter")&&n.d(t,{useRouter:function(){return s.useRouter}}),n.o(s,"useSearchParams")&&n.d(t,{useSearchParams:function(){return s.useSearchParams}})},667:(e,t,n)=>{n.d(t,{$:()=>l,V:()=>a});var s=n(5155),r=n(2821);function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"primary",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"md";return(0,r.A)("inline-flex items-center justify-center gap-2 rounded-full font-semibold transition-colors","focus:outline-none focus:ring-2 focus:ring-brand-500 focus:ring-offset-2","disabled:pointer-events-none disabled:opacity-50","sm"===t?"px-4 py-1.5 text-sm":"px-5 py-2 text-sm","primary"===e&&"bg-brand-500 text-white hover:bg-brand-600","secondary"===e&&"bg-white text-slate-900 ring-1 ring-slate-300 hover:bg-slate-50","danger"===e&&"bg-red-600 text-white hover:bg-red-700","ghost"===e&&"text-slate-600 hover:bg-slate-100")}function l(e){let{variant:t="primary",size:n="md",className:l,...i}=e;return(0,s.jsx)("button",{className:(0,r.A)(a(t,n),l),...i})}},1847:(e,t,n)=>{n.d(t,{A:()=>i});var s=n(2115);let r=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim()};var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let l=(0,s.forwardRef)((e,t)=>{let{color:n="currentColor",size:l=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:d="",children:c,iconNode:u,...h}=e;return(0,s.createElement)("svg",{ref:t,...a,width:l,height:l,stroke:n,strokeWidth:o?24*Number(i)/Number(l):i,className:r("lucide",d),...h},[...u.map(e=>{let[t,n]=e;return(0,s.createElement)(t,n)}),...Array.isArray(c)?c:[c]])}),i=(e,t)=>{let n=(0,s.forwardRef)((n,a)=>{let{className:i,...o}=n;return(0,s.createElement)(l,{ref:a,iconNode:t,className:r("lucide-".concat(e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),i),...o})});return n.displayName="".concat(e),n}},2528:(e,t,n)=>{n.d(t,{PublicNavAuth:()=>o});var s=n(5155),r=n(2115),a=n(2619),l=n.n(a),i=n(667);function o(e){let{signOn:t,goToApp:n,dashboardHref:a,signOnHref:o}=e,[d,c]=(0,r.useState)(null);return((0,r.useEffect)(()=>{let e=new AbortController;return fetch("/api/session/me",{signal:e.signal,cache:"no-store"}).then(e=>e.ok?e.json():{signedIn:!1}).then(e=>c(!!e.signedIn)).catch(()=>c(!1)),()=>e.abort()},[]),null===d)?(0,s.jsx)("span",{"aria-hidden":!0,className:"inline-block h-9 w-[104px]"}):d?(0,s.jsx)(l(),{href:a,className:(0,i.V)("primary"),children:n}):(0,s.jsx)(l(),{href:o,className:"".concat((0,i.V)("primary")," whitespace-nowrap"),children:t})}},2672:(e,t,n)=>{n.d(t,{LanguageSwitcher:()=>c});var s=n(5155),r=n(2115),a=n(63),l=n(5917),i=n(4033),o=n(7443);function d(e){let{region:t,className:n="h-3.5 w-5"}=e,r={viewBox:"0 0 20 14",className:n,role:"presentation","aria-hidden":!0};switch(t){case"US":return(0,s.jsxs)("svg",{...r,children:[(0,s.jsx)("rect",{width:"20",height:"14",fill:"#fff"}),[0,2,4,6,8,10,12].map(e=>(0,s.jsx)("rect",{y:e,width:"20",height:"1",fill:"#b22234"},e)),(0,s.jsx)("rect",{width:"9",height:"7",fill:"#3c3b6e"})]});case"ES":return(0,s.jsxs)("svg",{...r,children:[(0,s.jsx)("rect",{width:"20",height:"14",fill:"#aa151b"}),(0,s.jsx)("rect",{y:"3.5",width:"20",height:"7",fill:"#f1bf00"})]});case"FR":return(0,s.jsxs)("svg",{...r,children:[(0,s.jsx)("rect",{width:"20",height:"14",fill:"#fff"}),(0,s.jsx)("rect",{width:"6.67",height:"14",fill:"#002395"}),(0,s.jsx)("rect",{x:"13.33",width:"6.67",height:"14",fill:"#ed2939"})]});case"DE":return(0,s.jsxs)("svg",{...r,children:[(0,s.jsx)("rect",{width:"20",height:"14",fill:"#000"}),(0,s.jsx)("rect",{y:"4.67",width:"20",height:"4.67",fill:"#dd0000"}),(0,s.jsx)("rect",{y:"9.34",width:"20",height:"4.66",fill:"#ffce00"})]});case"CN":return(0,s.jsxs)("svg",{...r,children:[(0,s.jsx)("rect",{width:"20",height:"14",fill:"#de2910"}),(0,s.jsx)("path",{d:"M4 2.2 4.9 4.9 2.6 3.2h2.8L3.1 4.9z",fill:"#ffde00"})]});case"JP":return(0,s.jsxs)("svg",{...r,children:[(0,s.jsx)("rect",{width:"20",height:"14",fill:"#fff"}),(0,s.jsx)("circle",{cx:"10",cy:"7",r:"4",fill:"#bc002d"})]});case"AE":return(0,s.jsxs)("svg",{...r,children:[(0,s.jsx)("rect",{width:"20",height:"14",fill:"#fff"}),(0,s.jsx)("rect",{width:"20",height:"4.67",fill:"#00732f"}),(0,s.jsx)("rect",{y:"9.33",width:"20",height:"4.67",fill:"#000"}),(0,s.jsx)("rect",{width:"5",height:"14",fill:"#ff0000"})]});default:return null}}function c(e){let{locale:t,label:n,align:c="right",iconOnly:u=!1,variant:h="button"}=e,m=(0,a.useRouter)(),x=(0,a.usePathname)()||"/",[f,g]=(0,r.useState)(!1),p=(0,r.useRef)(null),b=(0,o.localeInfo)(t);(0,r.useEffect)(()=>
1{if(f)return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)};function e(e){p.current&&!p.current.contains(e.target)&&g(!1)}function t(e){"Escape"===e.key&&g(!1)}},[f]);let y=o.LOCALES.map(e=>(0,s.jsxs)("button",{type:"button",role:"menuitem",lang:e.code,dir:e.dir,onClick:()=>{var n;return n=e.code,void(g(!1),document.cookie="".concat(o.LOCALE_COOKIE,"=").concat(n,"; path=/; max-age=31536000; samesite=lax"),n!==t&&(m.push((0,o.localizedPath)(x,n)),m.refresh()))},className:"flex w-full items-center gap-2.5 px-3 py-2 text-start text-sm text-slate-700 hover:bg-slate-50",children:[(0,s.jsx)(d,{region:e.region}),(0,s.jsx)("span",{className:"flex-1 truncate",children:e.nativeName}),e.code===t?(0,s.jsx)(l.A,{className:"h-3.5 w-3.5 text-brand-600"}):null]},e.code));return"menu"===h?(0,s.jsxs)("div",{ref:p,children:[(0,s.jsxs)("button",{type:"button",onClick:()=>g(e=>!e),"aria-expanded":f,className:"flex w-full items-center justify-between gap-3 px-4 py-2 text-sm text-slate-600 hover:bg-slate-50",children:[(0,s.jsx)("span",{children:n}),(0,s.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,s.jsx)(d,{region:b.region}),(0,s.jsx)("span",{className:"text-slate-700",children:b.nativeName}),(0,s.jsx)(i.A,{className:"h-3.5 w-3.5 text-slate-400 transition-transform ".concat(f?"rotate-180":"")})]})]}),f?(0,s.jsx)("div",{role:"menu",className:"bg-slate-50/60 py-1 ps-3",children:y}):null]}):(0,s.jsxs)("div",{className:"relative",ref:p,children:[(0,s.jsxs)("button",{type:"button",onClick:()=>g(e=>!e),"aria-expanded":f,"aria-haspopup":"menu","aria-label":n,title:n,className:"flex items-center gap-1.5 rounded-lg px-2 py-2 text-sm font-medium text-slate-600 hover:bg-slate-100 hover:text-slate-900",children:[(0,s.jsx)(d,{region:b.region}),u?null:(0,s.jsx)("span",{className:"hidden sm:inline",children:b.nativeName}),(0,s.jsx)(i.A,{className:"h-3.5 w-3.5 text-slate-400"})]}),f?(0,s.jsx)("div",{role:"menu",className:"absolute z-50 mt-1 w-44 overflow-hidden rounded-xl bg-white py-1 shadow-lg ring-1 ring-slate-200 ".concat("right"===c?"right-0":"left-0"),children:y}):null]})}},2735:(e,t,n)=>{let s;n.d(t,{CookieBanner:()=>h,CookieSettingsButton:()=>m,UV:()=>u,YE:()=>d});var r=n(5155),a=n(2115),l=n(2619),i=n.n(l),o=n(7443);let d="bizwax:consent",c="bizwax:cookie-settings";function u(){return document.cookie.split("; ").some(e=>e.startsWith("".concat(o.CONSENT_COOKIE,"=")))}function h(e){let{text:t,accept:n,necessary:l,policyLabel:o,policyHref:h}=e,[m,x]=(0,a.useState)(!1),[f,g]=(0,a.useState)(!1);async function p(e){g(!0);try{await fetch("/api/consent",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({choice:e,ref:null!=s?s:void 0})})}catch(e){}g(!1),x(!1),window.dispatchEvent(new CustomEvent(d,{detail:{choice:e}}))}return((0,a.useEffect)(()=>{void 0===s&&(s=new URLSearchParams(window.location.search).get("ref")),u()||x(!0);let e=()=>x(!0);return window.addEventListener(c,e),()=>window.removeEventListener(c,e)},[]),m)?(0,r.jsxs)("div",{role:"dialog","aria-live":"polite","aria-label":o,className:"fixed bottom-5 left-5 right-24 z-[60] rounded-2xl bg-white p-4 shadow-2xl ring-1 ring-slate-200 sm:right-auto sm:max-w-md sm:p-5",children:[(0,r.jsxs)("p",{className:"text-sm leading-relaxed text-slate-600",children:[t," ",(0,r.jsx)(i(),{href:h,className:"font-medium text-brand-600 underline underline-offset-2 hover:text-brand-700",children:o})]}),(0,r.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[(0,r.jsx)("button",{type:"button",disabled:f,onClick:()=>p("all"),className:"flex-1 rounded-lg bg-slate-900 px-4 py-2 text-sm font-semibold text-white hover:bg-slate-700 disabled:opacity-60",children:n}),(0,r.jsx)("button",{type:"button",disabled:f,onClick:()=>p("necessary"),className:"flex-1 rounded-lg bg-white px-4 py-2 text-sm font-semibold text-slate-900 ring-1 ring-slate-300 hover:bg-slate-50 disabled:opacity-60",children:l})]})]}):null}function m(e){let{label:t,className:n}=e;return(0,r.jsx)("button",{type:"button",onClick:()=>window.dispatchEvent(new CustomEvent(c)),className:n,children:t})}},2767:(e,t,n)=>{n.d(t,{PageViewBeacon:()=>i});var s=n(2115),r=n(63),a=n(7443);function l(e){var t,n;if(function(){let e=navigator;return"1"===e.doNotTrack||!0===e.globalPrivacyControl||!0===e.webdriver}())return;let s=JSON.stringify(e),r=new Blob([s],{type:"application/json"});(null==(t=(n=navigator).sendBeacon)?void 0:t.call(n,"/api/track",r))||fetch("/api/track",{method:"POST",body:s,headers:{"Content-Type":"application/json"},keepalive:!0}
1).catch(()=>void 0)}function i(){let e=(0,r.usePathname)()||"/",t=(0,s.useRef)(!0);return(0,s.useEffect)(()=>{let n=new URLSearchParams(window.location.search),s=t.current?document.referrer:"";t.current=!1,l({type:"view",path:e,referrer:s,campaign:n.get("utm_source")})},[e]),(0,s.useEffect)(()=>{function e(e){var t,n;let s,r=null==(n=e.target)||null==(t=n.closest)?void 0:t.call(n,"a");if(r){try{s=new URL(r.href,window.location.href)}catch(e){return}s.origin===window.location.origin&&(0,a.splitLocalePath)(s.pathname).path===a.SIGNUP_CTA.href&&l({type:"event",event:"signup_click",path:window.location.pathname})}}return document.addEventListener("click",e,!0),()=>document.removeEventListener("click",e,!0)},[]),null}},2821:(e,t,n)=>{n.d(t,{A:()=>s});let s=function(){for(var e,t,n=0,s="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=function e(t){var n,s,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t)){var a=t.length;for(n=0;n<a;n++)t[n]&&(s=e(t[n]))&&(r&&(r+=" "),r+=s)}else for(s in t)t[s]&&(r&&(r+=" "),r+=s);return r}(e))&&(s&&(s+=" "),s+=t);return s}},2987:(e,t,n)=>{n.d(t,{A:()=>s});let s=(0,n(1847).A)("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},3842:(e,t,n)=>{n.d(t,{A:()=>s});let s=(0,n(1847).A)("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]])},4033:(e,t,n)=>{n.d(t,{A:()=>s});let s=(0,n(1847).A)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},5229:(e,t,n)=>{n.d(t,{A:()=>s});let s=(0,n(1847).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},5707:(e,t,n)=>{n.d(t,{ToolFinderWidget:()=>k});var s=n(5155),r=n(2115),a=n(2619),l=n.n(a),i=n(5229),o=n(1847);let d=(0,o.A)("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);var c=n(5740);let u=(0,o.A)("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);var h=n(2987),m=n(3842),x=n(8085),f=n(7443),g=n(2735);let p="bizwax.toolFinder.prompted";function b(){try{return"1"===window.sessionStorage.getItem(p)}catch(e){return!0}}function y(){try{window.sessionStorage.setItem(p,"1")}catch(e){}}let w="Hi! Tell me what you are trying to get done in your business and I will point you to the BizWax tool that fits, or tell you if we should build you one.",v="bizwax.toolFinder.chat.v1";function j(e){return!!e&&"string"==typeof e.slug&&"string"==typeof e.name&&"string"==typeof e.tagline}function N(e){return!!e&&("user"===e.role||"assistant"===e.role)&&"string"==typeof e.content&&(void 0===e.recommendations||Array.isArray(e.recommendations)&&e.recommendations.every(j))}function k(){let[e,t]=(0,r.useState)(!1),[n,a]=(0,r.useState)([{role:"assistant",content:w}]),[o,p]=(0,r.useState)(""),[j,k]=(0,r.useState)(!1),[A,E]=(0,r.useState)(null),[C,L]=(0,r.useState)(!1),[T,I]=(0,r.useState)(null),[P,O]=(0,r.useState)(!1),[z,M]=(0,r.useState)(!1),[R,F]=(0,r.useState)(null),[_,B]=(0,r.useState)(null),[D,U]=(0,r.useState)(!1),J=(0,r.useRef)(null);async function W(e){e.preventDefault();let t=o.trim();if(t&&!j&&!C){a(e=>[...e,{role:"user",content:t}]),p(""),k(!0),E(null),B(null),F(t);try{let e=await fetch("/api/tool-finder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:T,message:t})}),s=await e.json().catch(()=>({}));if(!e.ok){var n;throw Error(null!=(n=s.error)?n:"Something went wrong. Try again.")}s.sessionId&&I(s.sessionId),a(e=>{var t,n,r;return[...e,{role:"assistant",content:null!=(t=s.reply)?t:"",recommendations:null!=(n=s.recommendations)?n:[],suggestCustomTool:null!=(r=s.suggestCustomTool)&&r}]}),O(!!s.readyForEmail&&!z),s.endChat&&L(!0)}catch(e){E(e.message)}finally{k(!1),F(null)}}}return(0,r.useEffect)(()=>{let e=function(){try{let e=window.sessionStorage.getItem(v);if(!e)return null;let t=JSON.parse(e);if(!Array.isArray(t.turns)||0===t.turns.length||!t.turns.every(N))return null;return{turns:t.turns.slice(-80),sessionId:"string"==typeof t.sessionId?t.sessionId:null,ended:!0===t.ended,readyForEmail:!0===t.readyForEmail,emailSent:!0===t.emailSent,open:!0===t.open,draft:"string"==typeof t.draft?t.draft:"",pending:"string"==typeof t.pending?t.pending:null}}catch(e){return null}}();if(e){let n=e.turns,s=e.draft;if(e.pending){let t=n[n.length-1];t&&"user"===t.role&&t.content===e.pending&&(n=n.slice(0,-1)),s=e.pending,B("Your last message was interrupted 
1when the page changed. Press send to try it again.")}a(n),I(e.sessionId),L(e.ended),O(e.readyForEmail),M(e.emailSent),t(e.open),p(s)}U(!0)},[]),(0,r.useEffect)(()=>{if(D){var t={turns:n,sessionId:T,ended:C,readyForEmail:P,emailSent:z,open:e,draft:o,pending:R};try{window.sessionStorage.setItem(v,JSON.stringify({...t,turns:t.turns.slice(-80)}))}catch(e){}}},[D,n,T,C,P,z,e,o,R]),(0,r.useEffect)(()=>{let e;if(b())return;let n=()=>{e=window.setTimeout(()=>{b()||(y(),t(!0))},5e3)};return(0,g.UV)()?n():window.addEventListener(g.YE,n,{once:!0}),()=>{window.removeEventListener(g.YE,n),window.clearTimeout(e)}},[]),(0,r.useEffect)(()=>{var e;null==(e=J.current)||e.scrollTo({top:J.current.scrollHeight,behavior:"smooth"})},[n,P,z,e]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{type:"button",onClick:()=>{y(),t(e=>!e)},"aria-label":e?"Close the tool finder":"Find your tool",className:"fixed bottom-5 right-5 z-50 flex h-14 w-14 items-center justify-center rounded-full bg-brand-600 text-white shadow-lg ring-1 ring-brand-700/20 transition hover:bg-brand-700",children:e?(0,s.jsx)(i.A,{className:"h-6 w-6"}):(0,s.jsx)(d,{className:"h-6 w-6"})}),e?(0,s.jsxs)("div",{role:"dialog","aria-label":"Find your tool",className:"fixed bottom-24 right-5 z-50 flex h-[560px] max-h-[calc(100vh-8rem)] w-[calc(100vw-2.5rem)] max-w-sm flex-col overflow-hidden rounded-2xl bg-white shadow-2xl ring-1 ring-slate-200",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 border-b border-slate-100 bg-slate-50 px-4 py-3",children:[(0,s.jsx)(c.A,{className:"h-4 w-4 text-brand-600"}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("p",{className:"text-sm font-semibold text-slate-900",children:"Find your tool"}),(0,s.jsx)("p",{className:"text-xs text-slate-500",children:"Tell me what you need. It is free."})]}),n.length>1?(0,s.jsxs)("button",{type:"button",onClick:function(){try{window.sessionStorage.removeItem(v)}catch(e){}a([{role:"assistant",content:w}]),I(null),L(!1),O(!1),M(!1),p(""),F(null),B(null),E(null)},disabled:j,className:"inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs font-medium text-slate-500 hover:bg-slate-100 hover:text-slate-700 disabled:opacity-40",children:[(0,s.jsx)(u,{className:"h-3.5 w-3.5"}),"Start over"]}):null]}),(0,s.jsxs)("div",{ref:J,className:"flex-1 space-y-3 overflow-y-auto px-4 py-4",children:[n.map((e,t)=>(0,s.jsx)("div",{className:"user"===e.role?"flex justify-end":"flex justify-start",children:(0,s.jsxs)("div",{className:"max-w-[85%] space-y-2",children:[(0,s.jsx)("div",{className:"rounded-2xl px-3.5 py-2 text-sm ".concat("user"===e.role?"bg-brand-600 text-white":"bg-slate-100 text-slate-800"),children:e.content}),e.recommendations&&e.recommendations.length>0?(0,s.jsx)("div",{className:"space-y-2",children:e.recommendations.map(e=>(0,s.jsxs)(l(),{href:"/product/".concat(e.slug),className:"block rounded-xl border border-slate-200 bg-white p-3 transition hover:border-brand-300 hover:bg-brand-50",children:[(0,s.jsxs)("p",{className:"flex items-center gap-1 text-sm font-semibold text-slate-900",children:[e.name,(0,s.jsx)(h.A,{className:"h-3.5 w-3.5 text-brand-600"})]}),(0,s.jsx)("p",{className:"mt-0.5 text-xs text-slate-500",children:e.tagline})]},e.slug))}):null,e.suggestCustomTool?(0,s.jsxs)(l(),{href:"/custom-tool",className:"flex items-center gap-2 rounded-xl border border-brand-200 bg-brand-50 p-3 text-sm font-medium text-brand-800 transition hover:bg-brand-100",children:[(0,s.jsx)(m.A,{className:"h-4 w-4 shrink-0"}),"Ask us to build this for you"]}):null]})},t)),j?(0,s.jsx)("div",{className:"flex justify-start",children:(0,s.jsx)("div",{className:"rounded-2xl bg-slate-100 px-3.5 py-2 text-sm text-slate-400",children:"Thinking…"})}):null,P&&!z?(0,s.jsx)(S,{sessionId:T,onSent:()=>M(!0)}):null,z?(0,s.jsx)("p",{className:"rounded-lg bg-green-50 px-3 py-2 text-center text-xs text-green-700",children:"Sent. Check your inbox."}):null,_?(0,s.jsx)("p",{className:"rounded-lg bg-slate-100 px-3 py-2 text-center text-xs text-slate-600",children:_}):null,A?(0,s.jsx)("p",{className:"rounded-lg bg-red-50 px-3 py-2 text-center text-xs text-red-700",children:A}):null]}),(0,s.jsx)("form",{onSubmit:W,className:"border-t border-slate-100 p-3",children:(0,s.jsxs)("div",{className:"flex items-end gap-2",children:[(0,s.jsx)("textarea",{value:o,onChange:e=>p(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),W(e))},disabled:j||C,rows:1,maxLength:f.TOOL_FINDER_LIMITS.maxUserChars,placeholder:C?"Chat ended":"Describe what you need…",className:"max-h-28 flex-1 resize-none rounded-lg border border-slate-300 px-3 py-2 text-sm focus:border-brand-500 focus:outline-none focus:ring-1 focus:ring-brand-500 disabled:bg-slate-50"}),(0,s.jsx)("button",{type:"submit",disabled:j||C||!o.trim(),"aria-label":"Send",className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-brand-600 text-white transition hover:bg-brand-700 disabled:opacity-40",children:(0,s.jsx)(x.A,{className:"h-4 w-4"})})]})})]}):null]})}function S(e){let{sessionId:t,onSent:n}=e,[a,l]=(0,r.useState)(""),[i,o]=(0,r.useState)(""),[d,c]=(0,r.useState)(!1),[u,h]=(0,r.useState)(null);async function m(e){if(e.preventDefault(),a.trim()&&!d&&t){c(!0),h(null);try{let e=await fetch("/api/tool-finder/email",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:t,name:i,email:a})}),r=await e.json().catch(()=>({}));if(!e.ok){var s;throw Error(null!=(s=r.error)?s:"Could not send. Try again.")}n()}catch(e){h(e.message)}finally{c(!1)}}}return(0,s.jsxs)("form",{onSubmit:m,className:"rounded-xl border border-slate-200 bg-slate-50 p-3",children:[(0,s.jsx)("p",{className:"text-xs font-medium text-slate-700",children:"Want these emailed to you?"}),(0,s.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,s.jsx)("input",{type:"text",value:i,onChange:e=>o(e.target.value),placeholder:"Name (optional)",className:"w-full rounded-lg border border-slate-300 px-3 py-1.5 text-sm focus:border-brand-500 focus:outline-none focus:ring-1 focus:ring-brand-500"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("input",{type:"email",value:a,onChange:e=>l(e.target.value),placeholder:"[email protected]",className:"min-w-0 flex-1 rounded-lg border border-slate-300 px-3 py-1.5 text-sm focus:border-brand-500 focus:outline-none focus:ring-1 focus:ring-brand-500"}),(0,s.jsx)("button",{type:"submit",disabled:d||!a.trim(),className:"shrink-0 rounded-lg bg-brand-600 px-3 py-1.5 text-sm font-medium text-white transition hover:bg-brand-700 disabled:opacity-40",children:d?"…":"Send"})]})]}),u?(0,s.jsx)("p",{className:"mt-2 text-xs text-red-600",children:u}):null]})}},5740:(e,t,n)=>{n.d(t,{A:()=>s});let s=(0,n(1847).A)("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]])},5917:(e,t,n)=>{n.d(t,{A:()=>s});let s=(0,n(1847).A)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},8085:(e,t,n)=>{n.d(t,{A:()=>s});let s=(0,n(1847).A)("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])}}]);

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.