PageSourceSearch

https://www.summitxadvisors.com/_next/static/chunks/6920-af9f59d55…?dpl=dpl_Cgywy6k7uuy84SKUStLdHe98M8J9

js summitxadvisors.com collected 2026-10-08 21:23:53 UTC 8,447 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6920],{6920:function(e,t,r){r.d(t,{default:function(){return o}});var s=r(7842),a=r(1990),n=r(2589),i=r(7662),l=r(3245);function o(e){let{agentId:t="summit-guide",title:r="Summit X Advisor",subtitle:o="Ask about costs, benefits, or strategy.",initialMessage:d="Hi there - what brought you to Summit X today?",embedMode:c=!1}=e,[u,m]=(0,a.useState)(c),[x,h]=(0,a.useState)([{id:"init",role:"assistant",content:d}]),[f,g]=(0,a.useState)(""),[p,b]=(0,a.useState)(!1),y=(0,a.useRef)(null),w=(0,a.useRef)(null);(0,a.useEffect)(()=>{var e;null===(e=w.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})},[x]);let j=async e=>{if(e.preventDefault(),!f.trim()||p)return;let r={id:crypto.randomUUID(),role:"user",content:f.trim()};h(e=>[...e,r]),g(""),b(!0);try{var s;let e=await fetch("/api/agents",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentId:t,messages:[...x,r].map(e=>({role:e.role,content:e.content})),context:{url:window.location.href,agentId:t}})});if(!e.ok)throw Error("Request failed");let a=await e.json(),n=null!==(s=a.reply)&&void 0!==s?s:"Sorry, something went wrong.",i={id:crypto.randomUUID(),role:"assistant",content:n};h(e=>[...e,i])}catch(t){console.error("AgentChatWidget error:",t);
1let e={id:crypto.randomUUID(),role:"assistant",content:"I hit a snag reaching the Summit X AI service. Please try again in a moment."};h(t=>[...t,e])}finally{b(!1),y.current&&y.current.focus()}};return c?(0,s.jsx)("div",{className:"fixed inset-0 flex items-center justify-center bg-gray-100/50",children:(0,s.jsxs)("div",{className:"w-full max-w-md h-[80vh] bg-white shadow-2xl rounded-2xl flex flex-col border border-gray-200 overflow-hidden",children:[(0,s.jsxs)("div",{className:"bg-gradient-to-r from-[#0b1220] to-[#1a2940] px-4 py-4",children:[(0,s.jsx)("div",{className:"text-base font-semibold text-white",children:r}),(0,s.jsx)("div",{className:"text-xs text-gray-300",children:o})]}),(0,s.jsxs)("div",{className:"flex-1 overflow-y-auto px-4 py-4 space-y-3 bg-gray-50",children:[x.map(e=>(0,s.jsx)("div",{className:"flex ".concat("user"===e.role?"justify-end":"justify-start"),children:(0,s.jsx)("div",{className:"max-w-[85%] rounded-2xl px-4 py-2.5 text-sm leading-relaxed ".concat("user"===e.role?"bg-[#00a884] text-white":"bg-white text-gray-900 border border-gray-200 shadow-sm"),children:e.content})},e.id)),p&&(0,s.jsx)("div",{className:"flex justify-start",children:(0,s.jsx)("div",{className:"max-w-[85%] rounded-2xl px-4 py-2.5 text-sm text-gray-500 bg-white border border-gray-200 shadow-sm",children:(0,s.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"animate-pulse",children:"Thinking"}),(0,s.jsx)("span",{className:"animate-bounce",children:"..."})]})})}),(0,s.jsx)("div",{ref:w})]}),(0,s.jsxs)("form",{onSubmit:j,className:"border-t border-gray-200 px-4 py-3 flex items-center gap-3 bg-white",children:[(0,s.jsx)("input",{ref:y,type:"text",value:f,onChange:e=>g(e.target.value),className:"flex-1 text-sm rounded-full border border-gray-300 px-4 py-2.5 focus:outline-none focus:ring-2 focus:ring-[#00a884] focus:border-transparent",placeholder:"Ask a question…",disabled:p}),(0,s.jsx)("button",{type:"submit",disabled:p||!f.trim(),className:"flex items-center justify-center w-10 h-10 rounded-full bg-[#00a884] text-white hover:bg-[#008f6f] disabled:opacity-50 disabled:cursor-not-allowed transition-colors","aria-label":"Send message",children:(0,s.jsx)(n.Z,{className:"w-4 h-4"})})]})]})}):(0,s.jsxs)(s.Fragment,{children:[!u&&(0,s.jsxs)("button",{type:"button",onClick:()=>m(!0),className:"fixed bottom-4 right-4 sm:bottom-6 sm:right-6 z-50 flex items-center gap-2 rounded-full bg-[#00a884] px-5 py-3 text-sm font-semibold text-white shadow-lg hover:bg-[#008f6f] focus:outline-none focus:ring-2 focus:ring-[#00a884] focus:ring-offset-2 transition-all hover:scale-105","aria-label":"Open chat",children:[(0,s.jsx)(i.Z,{className:"w-5 h-5"}),(0,s.jsx)("span",{children:"Chat with Summit X"})]}),u&&(0,s.jsx)("div",{className:"fixed bottom-4 right-4 sm:bottom-6 sm:right-6 z-50",children:(0,s.jsxs)("div",{className:"w-[calc(100vw-2rem)] sm:w-[360px] h-[500px] bg-white shadow-2xl rounded-2xl flex flex-col border border-gray-200 overflow-hidden",children:[(0,s.jsxs)("div",{className:"bg-gradient-to-r from-[#0b1220] to-[#1a2940] px-4 py-3 flex items-start justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-semibold text-white",children:r}),(0,s.jsx)("div",{className:"text-xs text-gray-300",children:o})]}),(0,s.jsx)("button",{type:"button",onClick:()=>m(!1),className:"text-gray-300 hover:text-white transition-colors p-1","aria-label":"Close chat",children:(0,s.jsx)(l.Z,{className:"w-5 h-5"})})]}),(0,s.jsxs)("div",{className:"flex-1 overflow-y-auto px-3 py-3 space-y-2.5 bg-gray-50",children:[x.map(e=>(0,s.jsx)("div",{className:"flex ".concat("user"===e.role?"justify-end":"justify-start"),children:(0,s.jsx)("div",{className:"max-w-[85%] rounded-2xl px-3.5 py-2 text-sm leading-relaxed ".concat("user"===e.role?"bg-[#00a884] text-white":"bg-white text-gray-900 border border-gray-200 shadow-sm"),children:e.content})},e.id)),p&&(0,s.jsx)("div",{className:"flex justify-start",children:(0,s.jsx)("div",{className:"max-w-[85%] rounded-2xl px-3.5 py-2 text-sm text-gray-500 bg-white border border-gray-200 shadow-sm",children:(0,s.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"animate-pulse",children:"Thinking"}),(0,s.jsx)("span",{className:"animate-bounce",children:"..."})]})})}),(0,s.jsx)("div",{ref:w})]}),(0,s.jsxs)("form",{onSubmit:j,className:"border-t border-gray-200 px-3 py-2.5 flex items-center gap-2 bg-white",children:[(0,s.jsx)("input",{ref:y,type:"text",value:f,onChange:e=>g(e.target.value),className:"flex-1 text-base sm:text-sm rounded-full border border-gray-300 px-3.5 py-2 focus:outline-none focus:ring-2 focus:ring-[#00a884] focus:border-transparent",placeholder:"Ask a question…",disabled:p}),(0,s.jsx)("button",{type:"submit",disabled:p||!f.trim(),className:"flex items-center justify-center w-9 h-9 rounded-full bg-[#00a884] text-white hover:bg-[#008f6f] disabled:opacity-50 disabled:cursor-not-allowed transition-colors","aria-label":"Send message",children:(0,s.jsx)(n.Z,{className:"w-4 h-4"})})]})]})})]})}},6280:function(e,t,r){r.d(t,{Z:function(){return u}});var s=r(1990);let a=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),n=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase()),i=e=>{let t=n(e);return t.charAt(0).toUpperCase()+t.slice(1)},l=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()},o=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};var d={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 c=(0,s.forwardRef)((e,t)=>{let{color:r="currentColor",size:a=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:c="",children:u,iconNode:m,...x}=e;return(0,s.createElement)("svg",{ref:t,...d,width:a,height:a,stroke:r,strokeWidth:i?24*Number(n)/Number(a):n,className:l("lucide",c),...!u&&!o(x)&&{"aria-hidden":"true"},...x},[...m.map(e=>{let[t,r]=e;return(0,s.createElement)(t,r)}),...Array.isArray(u)?u:[u]])}),u=(e,t)=>
1{let r=(0,s.forwardRef)((r,n)=>{let{className:o,...d}=r;return(0,s.createElement)(c,{ref:n,iconNode:t,className:l("lucide-".concat(a(i(e))),"lucide-".concat(e),o),...d})});return r.displayName=i(e),r}},7662:function(e,t,r){r.d(t,{Z:function(){return s}});let s=(0,r(6280).Z)("message-circle",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]])},2589:function(e,t,r){r.d(t,{Z:function(){return s}});let s=(0,r(6280).Z)("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"}]])},3245:function(e,t,r){r.d(t,{Z:function(){return s}});let s=(0,r(6280).Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])}}]);

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.