PageSourceSearch

https://app.slatex.ai/_next/static/chunks/0261bd35f41r4.js

js slatex.ai collected 2026-10-05 13:50:56 UTC 18,437 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},18967,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return k},MissingStaticPage:function(){return v},NormalizeError:function(){return x},PageNotFoundError:function(){return b},SP:function(){return m},ST:function(){return g},WEB_VITALS:function(){return s},execOnce:function(){return o},getDisplayName:function(){return d},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return f},loadGetInitialProps:function(){return h},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return w}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let s=["CLS","FCP","FID","INP","LCP","TTFB"];function o(e){let t,r=!1;return(...a)=>(r||(r=!0,t=e(...a)),t)}let i=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>i.test(e);function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=u();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function h(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await h(t.Component,t.ctx)}:{};let a=await e.getInitialProps(t);if(r&&f(r))return a;if(!a)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${a}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return a}let m="u">typeof performance,g=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class x extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class v extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class k extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function w(e){return JSON.stringify({message:e.message,stack:e.stack})}},98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={assign:function(){return l},searchParamsToUrlQuery:function(){return s},urlQueryToSearchParams:function(){return i}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});function s(e){let t={};for(let[r,a]of e.entries()){let e=t[r];void 0===e?t[r]=a:Array.isArray(e)?e.push(a):t[r]=[e,a]}return t}function o(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function i(e){let t=new URLSearchParams;for(let[r,a]of Object.entries(e))if(Array.isArray(a))for(let e of a)t.append(r,o(e));else t.set(r,o(a));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,a]of r.entries())e.append(t,a)}return e}},43985,e=>{"use strict";e.s(["mergeClasses",0,(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()])},23846,81996,e=>{"use strict";e.s(["default",0,{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"}],23846),e.s(["hasA11yProp",0,e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1}],81996)},58541,e=>{"use strict";var t=e.i(71645),r=e.i(23846),a=e.i(81996),n=e.i(43985);let s=(0,t.createContext)({}),o=(0,t.forwardRef)(({color:e,size:o,strokeWidth:i,absoluteStrokeWidth:l,className:u="",children:c,iconNode:d,...f},p)=>
1{let{size:h=24,strokeWidth:m=2,absoluteStrokeWidth:g=!1,color:y="currentColor",className:x=""}=(0,t.useContext)(s)??{},b=l??g?24*Number(i??m)/Number(o??h):i??m;return(0,t.createElement)("svg",{ref:p,...r.default,width:o??h??r.default.width,height:o??h??r.default.height,stroke:e??y,strokeWidth:b,className:(0,n.mergeClasses)("lucide",x,u),...!c&&!(0,a.hasA11yProp)(f)&&{"aria-hidden":"true"},...f},[...d.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(c)?c:[c]])});e.s(["default",0,o],58541)},75254,e=>{"use strict";var t=e.i(71645),r=e.i(43985);let a=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var n=e.i(58541);e.s(["default",0,(e,s)=>{let o=(0,t.forwardRef)(({className:o,...i},l)=>(0,t.createElement)(n.default,{ref:l,iconNode:s,className:(0,r.mergeClasses)(`lucide-${a(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,o),...i}));return o.displayName=a(e),o}],75254)},37727,e=>{"use strict";let t=(0,e.i(75254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",0,t],37727)},95468,e=>{"use strict";let t=(0,e.i(75254).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["CheckCircle2",0,t],95468)},14764,e=>{"use strict";let t=(0,e.i(75254).default)("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"}]]);e.s(["Send",0,t],14764)},31245,e=>{"use strict";let t=(0,e.i(75254).default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);e.s(["Bot",0,t],31245)},44075,e=>{"use strict";let t=[],r=new Set,a=1;function n(){for(let e of r)e(t)}function s(e,r,o=4e3){let i=a++;t=[...t,{id:i,message:e,variant:r}],n(),setTimeout(()=>{t=t.filter(e=>e.id!==i),n()},o)}e.s(["toast",0,{info:e=>s(e,"info"),error:e=>s(e,"error",6e3),success:e=>s(e,"success"),dismiss:e=>{t=t.filter(t=>t.id!==e),n()},subscribe:e=>(r.add(e),e(t),()=>{r.delete(e)})}])},78894,e=>{"use strict";let t=(0,e.i(75254).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["AlertTriangle",0,t],78894)},63209,e=>{"use strict";let t=(0,e.i(75254).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",0,t],63209)},10289,49328,e=>{"use strict";let t=(0,e.i(75254).default)("bug",[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]);e.s(["Bug",0,t],10289),e.i(47167);let r="https://app.slatex.ai",a=null;function n(){let e=localStorage.getItem("slatex.session.token");return{"Content-Type":"application/json",...e?{Authorization:`Bearer ${e}`}:{"X-User-Id":"demo-user-001"}}}async function s(e){let t=await fetch(`${r}/api/bug-report`,{method:"POST",headers:n(),body:JSON.stringify({conversationId:e.conversationId??null,snapshot:e})});if(!t.ok)throw Error(`bug report failed: HTTP ${t.status}`);return t.json()}async function o(e,t,a){let s=await fetch(`${r}/api/bug-report/${e}/chat`,{method:"POST",headers:n(),body:JSON.stringify({message:t})});if(!s.ok||!s.body)throw Error(`John chat failed: HTTP ${s.status}`);let o=s.body.getReader(),i=new TextDecoder,l="",u="",c=!1;for(;;){let{done:e,value:t}=await o.read();if(e)break;let r=(l+=i.decode(t,{stream:!0})).split("\n");for(let e of(l=r.pop()||"",r))if(!e.startsWith(":")&&e.startsWith("data: "))try{let t=JSON.parse(e.slice(6));if("delta"===t.type&&t.text&&a(t.text),"done"===t.type&&(u=t.text??u,c=!!t.escalated),"error"===t.type)throw Error(t.message||"support chat error")}catch{}}return{text:u,escalated:c}}async function i(e){await fetch(`${r}/api/bug-report/${e}/escalate`,{method:"POST",headers:n(),body:JSON.stringify({reason:"User requested human supp
1ort"})})}e.s(["captureBugSnapshot",0,function(e){let t=a?.()??{messages:[]};return{...t,note:e??t.note??null,url:window.location.href,userAgent:"u">typeof navigator?navigator.userAgent:null}},"escalateBugReport",0,i,"registerBugSnapshotProvider",0,function(e){a=e},"streamJohnReply",0,o,"submitBugReport",0,s],49328)},34863,e=>{"use strict";var t=e.i(18050),r=e.i(71645),a=e.i(63209),n=e.i(95468);let s=(0,e.i(75254).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var o=e.i(37727),i=e.i(44075),l=e.i(47163);e.s(["Toaster",0,function(){let[e,u]=(0,r.useState)([]);return((0,r.useEffect)(()=>i.toast.subscribe(u),[]),0===e.length)?null:(0,t.jsx)("div",{className:"pointer-events-none fixed right-4 bottom-4 z-50 flex w-80 flex-col gap-2",children:e.map(e=>(0,t.jsxs)("div",{className:(0,l.cn)("pointer-events-auto flex items-start gap-2 rounded-lg border px-3 py-2.5 text-sm shadow-lg backdrop-blur-sm slate-toast-in","error"===e.variant&&"border-red-500/40 bg-red-500/15 text-red-100","success"===e.variant&&"border-emerald-500/40 bg-emerald-500/15 text-emerald-100","info"===e.variant&&"border-border bg-muted/90 text-foreground"),children:[(0,t.jsx)("span",{className:"mt-0.5 shrink-0",children:"error"===e.variant?(0,t.jsx)(a.AlertCircle,{size:16}):"success"===e.variant?(0,t.jsx)(n.CheckCircle2,{size:16}):(0,t.jsx)(s,{size:16})}),(0,t.jsx)("span",{className:"flex-1 leading-snug",children:e.message}),(0,t.jsx)("button",{onClick:()=>i.toast.dismiss(e.id),className:"shrink-0 opacity-60 hover:opacity-100",children:(0,t.jsx)(o.X,{size:14})})]},e.id))})}],34863)},71759,e=>{"use strict";var t=e.i(18050),r=e.i(71645);let a=(0,e.i(75254).default)("wifi-off",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);var n=e.i(44075);e.s(["NetworkMonitor",0,function(){let[e,s]=(0,r.useState)(!0);return((0,r.useEffect)(()=>{if("u"<typeof navigator)return;s(navigator.onLine);let e=()=>{s(!0),n.toast.success("Back online")},t=()=>{s(!1),n.toast.error("You're offline — requests will fail until you reconnect")};return window.addEventListener("online",e),window.addEventListener("offline",t),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",t)}},[]),e)?null:(0,t.jsxs)("div",{role:"status","aria-live":"polite",className:"fixed top-3 left-1/2 z-[60] -translate-x-1/2 flex items-center gap-2 rounded-full border border-red-500/40 bg-red-500/15 px-3 py-1.5 text-xs text-red-100 shadow-lg backdrop-blur-sm",children:[(0,t.jsx)(a,{size:12}),"Offline"]})}],71759)},99105,e=>{"use strict";var t=e.i(18050),r=e.i(71645),a=e.i(78894);e.s(["ServiceStatusBanner",0,function(){let[e,n]=(0,r.useState)(null);return((0,r.useEffect)(()=>{let e=!1,t=async()=>{try{let t=await fetch("https://app.slatex.ai/health/status",{cache:"no-store"});if(!t.ok)return;let r=await t.json();if(e)return;n(r.paused?r.message||"You've reached your usage limit for now. Please try again later.":null)}catch{}};t();let r=setInterval(t,6e4);return()=>{e=!0,clearInterval(r)}},[]),e)?(0,t.jsxs)("div",{role:"status","aria-live":"polite",className:"fixed top-0 inset-x-0 z-[70] flex items-center justify-center gap-2 border-b border-amber-500/40 bg-amber-500/15 px-4 py-2 text-center text-xs font-medium text-amber-100 backdrop-blur-sm sm:text-sm",children:[(0,t.jsx)(a.AlertTriangle,{className:"size-4 shrink-0"}),(0,t.jsx)("span",{children:e})]}):null}])},22474,e=>{"use strict";var t=e.i(18050),r=e.i(71645),a=e.i(10289),n=e.i(31245),s=e.i(14764),o=e.i(37727);let i=(0,e.i(75254).default)("life-buoy",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]);var l=e.i(49328),u=e.i(47163);e.s(["ReportBugWidget",0,function(){let[e,c]=(0,r.useState)(!1),[d,f]=(0,r.useState)(null),[p,h]=(0,r.useState)([]),[m,g]=(0,r.useState)(""),[y,x]=(0,r.useState)(!1),[b,v]=(0,r.useState)(!1),[k,w]=(0,r.useState)(null),[j,N]=(0,r.useState)(!1),S=(0,r.useRef)(null);if((0,r.useEffect)(()=>{let e=!!localStorage.getItem("slatex.session.token"),t=window.location.pathname,r="/"===t||t.startsWith("/login")||t.startsWith("/register")||t.startsWith("/magic");N(e&&!r)},[]),(0,r.useEffect)(()=>{S.current&&(S.current.scrollTop=S.current.scrollHeight)},[p,y]),!j)return null;
1async function E(){if(e||(c(!0),h([{role:"john",content:"Hi, I'm John 👋 I'm here to help. I can already see what you were working on — what seems to be the issue?"}]),w(null),d))return;let t=(0,l.captureBugSnapshot)();if(!(!t.conversationId&&0===t.messages.length&&!t.note))try{let{reportId:e}=await (0,l.submitBugReport)(t);f(e)}catch(e){w(e instanceof Error?e.message:"Couldn't save your report.")}}async function C(){let e=m.trim();if(!e||y)return;g(""),w(null),h(t=>[...t,{role:"user",content:e}]),x(!0);let t=d;if(!t)try{t=(await (0,l.submitBugReport)((0,l.captureBugSnapshot)(e))).reportId,f(t)}catch(e){w(e instanceof Error?e.message:"Support is unavailable."),x(!1);return}h(e=>[...e,{role:"john",content:""}]);try{let{escalated:r}=await (0,l.streamJohnReply)(t,e,e=>{h(t=>{let r=[...t],a=r[r.length-1];return a&&"john"===a.role&&(r[r.length-1]={...a,content:a.content+e}),r})});r&&v(!0)}catch(e){w(e instanceof Error?e.message:"John couldn't reply just now.")}finally{x(!1)}}async function z(){if(d&&!b){x(!0);try{await (0,l.escalateBugReport)(d),v(!0),h(e=>[...e,{role:"john",content:"Got it — I've sent everything you were doing to our developer team. They'll follow up. Thanks for your patience! 🙏"}])}catch(e){w(e instanceof Error?e.message:"Couldn't reach the team.")}finally{x(!1)}}}return e?(0,t.jsxs)("div",{className:"fixed bottom-4 right-4 z-50 flex h-[30rem] w-[22rem] max-w-[calc(100vw-2rem)] flex-col overflow-hidden rounded-2xl border border-border/70 bg-background/98 shadow-2xl backdrop-blur",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 border-b border-border/60 bg-brand/10 px-4 py-3",children:[(0,t.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-gradient-to-br from-brand to-brand/60 text-white",children:(0,t.jsx)(n.Bot,{size:18})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"text-sm font-semibold tracking-tight text-foreground",children:"John · Support"}),(0,t.jsx)("div",{className:"text-[11px] text-muted-foreground",children:b?"Sent to the dev team":"Usually replies instantly"})]}),(0,t.jsx)("button",{onClick:function(){c(!1)},"aria-label":"Close support chat",className:"rounded-md p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:(0,t.jsx)(o.X,{size:16})})]}),(0,t.jsxs)("div",{ref:S,className:"flex-1 space-y-3 overflow-y-auto px-4 py-3",children:[p.map((e,r)=>(0,t.jsx)("div",{className:(0,u.cn)("flex","user"===e.role?"justify-end":"justify-start"),children:(0,t.jsx)("div",{className:(0,u.cn)("max-w-[85%] whitespace-pre-wrap rounded-2xl px-3 py-2 text-sm leading-relaxed","user"===e.role?"rounded-br-sm bg-brand text-white":"rounded-bl-sm bg-muted text-foreground"),children:e.content||(0,t.jsxs)("span",{className:"inline-flex gap-1 text-muted-foreground",children:[(0,t.jsx)("span",{className:"animate-pulse",children:"●"}),(0,t.jsx)("span",{className:"animate-pulse [animation-delay:150ms]",children:"●"}),(0,t.jsx)("span",{className:"animate-pulse [animation-delay:300ms]",children:"●"})]})})},r)),k&&(0,t.jsx)("div",{className:"rounded-lg bg-destructive/10 px-3 py-2 text-xs text-destructive",children:k})]}),!b&&(0,t.jsxs)("button",{onClick:z,disabled:y,className:"flex items-center justify-center gap-1.5 border-t border-border/60 py-2 text-[11px] font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:opacity-50",children:[(0,t.jsx)(i,{size:12}),"Talk to a human instead"]}),(0,t.jsxs)("div",{className:"flex items-end gap-2 border-t border-border/60 p-3",children:[(0,t.jsx)("textarea",{value:m,onChange:e=>g(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),C())},rows:1,placeholder:"Describe the issue…",className:"max-h-24 flex-1 resize-none rounded-xl border border-border/70 bg-background px-3 py-2 text-sm text-foreground outline-none focus:border-brand/60"}),(0,t.jsx)("button",{onClick:()=>void C(),disabled:y||!m.trim(),"aria-label":"Send",className:"flex size-9 items-center justify-center rounded-xl bg-brand text-white transition-opacity disabled:opacity-40",children:(0,t.jsx)(s.Send,{size:16})})]})]}):(0,t.jsxs)("button",{onClick:E,"aria-label":"Report a bug",className:"fixed right-3 top-28 z-50 flex h-10 w-10 items-center justify-center gap-2 rounded-full border border-brand/40 bg-background/95 text-sm font-semibold text-foreground shadow-2xl backdrop-blur transition-transform hover:-translate-y-0.5 hover:border-brand/70 md:bottom-4 md:right-4 md:top-auto md:h-auto md:w-auto md:px-4 md:py-2.5",children:[(0,t.jsx)(a.Bug,{size:16,className:"text-brand"}),(0,t.jsx)("span",{className:"hidden md:inline",children:"Report a Bug"})]})}],22474)}]);

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.