PageSourceSearch

https://stackswap.ai/_next/static/chunks/72501.aadd2d0ea04feeb3.js

js stackswap.ai collected 2026-10-05 12:43:06 UTC 10,888 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="341f1319-dc34-4162-bd97-a9707b3eb06c",e._sentryDebugIdIdentifier="sentry-dbid-341f1319-dc34-4162-bd97-a9707b3eb06c")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[72501],{72501:function(e,t,n){n.r(t),n.d(t,{default:function(){return p}});var o=n(85893),r=n(67294),a=n(9008),i=n.n(a),s=n(41664),l=n.n(s),d=n(58881),c=n(43397);function p(e){var t,n;let{reportId:a}=e,[s,p]=(0,r.useState)(null),[f,h]=(0,r.useState)(null),x=(0,r.useCallback)(async()=>{let e=a.trim();if(!e)return;let t=await fetch("/api/stackscan-gtm-system?reportId=".concat(encodeURIComponent(e))),n=await t.json();p(n.ok?n:null)},[a]);(0,r.useEffect)(()=>{x()},[x]);let b=(0,r.useCallback)(async e=>{let t=a.trim();if(!t)return;let n=(0,d.P)();await fetch("/api/stackscan-workspace?reportId=".concat(encodeURIComponent(t)),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reportId:t,sessionId:n,action:e.action,recommendationId:e.recommendationId,operatorState:e.operatorState})}),await x()},[x,a]);if(!(null==s?void 0:s.ok)||!s.commandCenter)return(0,o.jsx)("div",{style:{minHeight:"60vh",display:"flex",alignItems:"center",justifyContent:"center",padding:24,color:"#94a3b8",fontSize:15}
1,children:(null==s?void 0:s.degraded)?"System of record is unavailable. Open your StackScan report after a successful save.":"Loading command center..."});let y=s.commandCenter,j=y.wasteTrend.map(e=>Math.max(0,e.monthlyWasteUsd)),S=Math.max(1,...j),k="down"===y.trendDirection?"Waste trending down vs last lock":"up"===y.trendDirection?"Waste up vs last lock":"Flat vs last lock";return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i(),{children:(0,o.jsx)("title",{children:"GTM Command Center | StackScan"})}),(0,o.jsxs)("div",{style:{maxWidth:820,margin:"0 auto",padding:"28px 20px 48px",color:"#e2e8f0"},children:[(0,o.jsx)("p",{style:{margin:0,fontSize:11,fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",color:"#64748b"},children:"StackScan \xb7 GTM Command Center"}),(0,o.jsx)("h1",{style:{margin:"10px 0 6px",fontSize:"clamp(1.45rem, 4vw, 1.85rem)",fontWeight:850,letterSpacing:"-0.03em",color:"#f8fafc"},children:"Your operating layer"}),(0,o.jsx)("p",{style:{margin:"0 0 22px",fontSize:14,color:"#94a3b8",lineHeight:1.5},children:"Stack, actions, and proof in one place. Numbers come from locked snapshots and workspace history - not live rescans."}),(0,o.jsxs)("div",{style:{display:"inline-flex",alignItems:"center",gap:10,padding:"8px 14px",borderRadius:999,fontSize:13,fontWeight:800,marginBottom:22,...function(e){switch(e){case"drifting":return{color:"#fecaca",border:"1px solid rgba(248,113,113,0.5)",background:"rgba(127,29,29,0.35)"};case"needs_attention":return{color:"#fed7aa",border:"1px solid rgba(251,146,60,0.45)",background:"rgba(124,45,18,0.35)"};default:return{color:"#a7f3d0",border:"1px solid rgba(52,211,153,0.45)",background:"rgba(6,78,59,0.35)"}}}(y.systemStatus)},children:["System status: ",y.statusLabel]}),(0,o.jsxs)("section",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(140px, 1fr))",gap:12,marginBottom:28},children:[(0,o.jsx)(u,{label:"Current spend (modeled)",value:(0,c.Mj)(y.monthlySpendUsd),valueTitle:c.nV}),(0,o.jsx)(u,{label:"Waste detected",value:(0,c.Mj)(y.monthlyWasteUsd),valueTitle:c.nV}),(0,o.jsx)(u,{label:"Savings vs first lock",value:(0,c.Mj)(y.savedVsBaselineMonthlyUsd),valueTitle:c.nV}),(0,o.jsx)(u,{label:"Stack health",value:null!=y.stackHealthScore?"".concat(y.stackHealthScore,"/100"):"—"})]}),(null===(t=s.drift)||void 0===t?void 0:t.hasDrift)?(0,o.jsx)("div",{style:{marginBottom:20,padding:"12px 14px",borderRadius:10,border:"1px solid rgba(248,113,113,0.4)",background:"rgba(30,27,75,0.25)"},children:(0,o.jsxs)("p",{style:{margin:0,fontSize:13,fontWeight:700,color:"#fecaca"},children:["Drift is active vs your last locked scan."," ",(0,o.jsx)(l(),{href:"/stackscan?gtm_continue=1&from_report=".concat(encodeURIComponent(a)),style:{color:"#fde68a"},children:"Re-optimize"})]})}):null,(0,o.jsx)(g,{children:"This week"}),0===y.activeTasks.length?(0,o.jsx)("p",{style:{margin:"0 0 24px",fontSize:14,color:"#64748b"},children:"No open operator tasks. Recommendations refresh on load when the week rolls."}):(0,o.jsx)("ul",{style:{margin:"0 0 24px",padding:0,listStyle:"none"},children:y.activeTasks.map(e=>(0,o.jsxs)("li",{style:{padding:"12px 0",borderBottom:"1px solid rgba(51,65,85,0.45)"},children:[(0,o.jsxs)("p",{style:{margin:0,fontSize:14,fontWeight:700,color:"#f1f5f9"},children:["remove"===e.type?"Remove":"replace"===e.type?"Swap":"Consolidate"," → save ",e.impact]}),(0,o.jsx)("p",{style:{margin:"6px 0 8px",fontSize:13,color:"#94a3b8",lineHeight:1.45},children:e.title}),(0,o.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:8},children:[["not_started","in_progress","completed"].map(t=>(0,o.jsxs)("button",{type:"button",disabled:f===e.id,onClick:()=>{h(e.id),b({action:"operator_set_state",recommendationId:e.id,operatorState:t}).finally(()=>h(null))},style:m(e.state===t),children:["not_started"===t?"[ ]":"in_progress"===t?"[~]":"[✓]"," ",t]},t)),(0,o.jsx)("button",{type:"button",disabled:f===e.id,onClick:()=>{h(e.id),b({action:"operator_reject",recommendationId:e.id}).finally(()=>h(null))},style:m(!1,!0),children:"Reject"})]})]},e.id))}),(0,o.jsx)(g,{children:"Completed actions"}),0===y.completedTasks.length?(0,o.jsx)("p",{style:{margin:"0 0 24px",fontSize:14,color:"#64748b"},children:"Complete tasks above to build a trail of execution."}):(0,o.jsx)("ul",{style:{margin:"0 0 28px",padding:0,listStyle:"none"},children:y.completedTasks.map(e=>(0,o.jsxs)("li",{style:{fontSize:14,color:"#cbd5e1",padding:"8px 0",borderBottom:"1px solid rgba(51,65,85,0.35)"},children:[(0,o.jsx)("span",{style:{color:"#6ee7b7"},children:"✓"})," ",e.title," ",(0,o.jsxs)("span",{style:{color:"#64748b"},children:["(",e.impact,")"]})]},e.id))}),(0,o.jsx)(g,{children:"Stack snapshot"}),(0,o.jsx)("p",{style:{margin:"0 0 10px",fontSize:12,color:"#64748b",lineHeight:1.45},children:"Per-tool spend is an equal split of modeled stack spend (locked audit)-use for signal, not vendor invoices."}),(0,o.jsxs)("div",{style:{borderRadius:12,border:"1px solid rgba(51,65,85,0.55)",overflow:"hidden",marginBottom:28},children:[(0,o.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 100px 110px",gap:8,padding:"10px 14px",background:"rgba(15,23,42,0.85)",fontSize:11,fontWeight:800,letterSpacing:"0.04em",textTransform:"uppercase",color:"#64748b"},children:[(0,o.jsx)("span",{children:"Tool"}),(0,o.jsx)("span",{style:{textAlign:"right"},children:"~$/mo"}),(0,o.jsx)("span",{children:"Status"})]}),y.stackRows.map(e=>{var t;return(0,o.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 100px 110px",gap:8,padding:"10px 14px",borderTop:"1px solid rgba(51,65,85,0.4)",fontSize:14,alignItems:"center"},children:[(0,o.jsx)("span",{style:{color:"#f1f5f9"},children:e.tool}),(0,o.jsx)("span",{title:c.nV,style:{textAlign:"right",fontVariantNumeric:"tabular-nums",color:"#cbd5e1"},children:(0,c.gM)(e.modeledMonthlyCostUsd)}),(0,o.jsx)("span",{style:"redundant"===(t=e.status)?{color:"#fecaca",fontWeight:700,fontSize:12}:"underutilized"===t?{color:"#fde68a",fontWeight:650,fontSize:12}:{color:"#a7f3d0",fontWeight:650,fontSize:12},children:"optimal"===e.status?"Optimal":"redundant"===e.status?"Redundant":"Underutilized"})]},e.tool)})]}),(0,o.jsx)(g,{children:"Waste over time"}),(0,o.jsx)("p",{style:{margin:"0 0 8px",fontSize:13,color:"#94a3b8"},children:k}),(0,o.jsx)("div",{style:{display:"flex",alignItems:"flex-end",gap:6,height:52,marginBottom:28},children:j.map((e,t)=>(0,o.jsx)("div",{title:"".concat(c.nV," — ").concat((0,c.Mj)(e)),style:{flex:1,minWidth:8,maxWidth:28,height:"".concat(Math.max(6,Math.round(e/S*100)),"%"),background:t===j.length-1?"linear-gradient(180deg,#34d399,#10b981)":"rgba(51,65,85,0.85)",borderRadius:4}},t))}),(0,o.jsx)(g,{children:"Decision memory"}),(0,o.jsx)("p",{style:{margin:"0 0 10px",fontSize:13,color:"#94a3b8",lineHeight:1.5}
1,children:"Workspace decisions from your collaboration thread. Impact is captured on completed operator tasks above."}),0===y.decisionMemory.workspace.length?(0,o.jsx)("p",{style:{margin:0,fontSize:14,color:"#64748b"},children:"No logged decisions yet."}):(0,o.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:y.decisionMemory.workspace.slice(0,40).map(e=>(0,o.jsxs)("li",{style:{fontSize:14,padding:"10px 0",borderBottom:"1px solid rgba(51,65,85,0.35)",color:"#cbd5e1"},children:[(0,o.jsxs)("span",{style:{color:"#94a3b8",fontWeight:700},children:["[",e.status,"]"]})," ",e.label]},e.itemKey))}),(0,o.jsx)("p",{style:{margin:"36px 0 0",fontSize:13},children:(0,o.jsx)(l(),{href:(null===(n=s.shareUrl)||void 0===n?void 0:n.trim())?s.shareUrl:"/stackscan/results/".concat(a),style:{color:"#38bdf8"},children:"← Back to report"})})]})]})}function g(e){let{children:t}=e;return(0,o.jsx)("h2",{style:{margin:"0 0 12px",fontSize:13,fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",color:"#94a3b8"},children:t})}function u(e){let{label:t,value:n,valueTitle:r}=e;return(0,o.jsxs)("div",{style:{padding:"12px 14px",borderRadius:12,border:"1px solid rgba(51,65,85,0.5)",background:"rgba(15,23,42,0.72)"},children:[(0,o.jsx)("p",{style:{margin:0,fontSize:11,fontWeight:700,color:"#64748b"},children:t}),(0,o.jsx)("p",{title:r,style:{margin:"8px 0 0",fontSize:16,fontWeight:800,fontVariantNumeric:"tabular-nums",color:"#f8fafc"},children:n})]})}function m(e,t){return{fontSize:11,fontWeight:700,padding:"5px 10px",borderRadius:8,border:e?"1px solid rgba(56,189,248,0.6)":t?"1px solid rgba(248,113,113,0.45)":"1px solid rgba(71,85,105,0.55)",background:e?"rgba(14,165,233,0.2)":t?"rgba(127,29,29,0.25)":"rgba(15,23,42,0.55)",color:e?"#e0f2fe":t?"#fecaca":"#94a3b8",cursor:"pointer",fontFamily:"inherit"}}},58881:function(e,t,n){n.d(t,{P:function(){return r}});let o="stackscan_anon_v1";function r(){try{let e=sessionStorage.getItem(o);return e||(e="undefined"!=typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():"a_".concat(Date.now().toString(36),"_").concat(Math.random().toString(36).slice(2,11)),sessionStorage.setItem(o,e)),e}catch(e){return"anon_".concat(Date.now().toString(36))}}},43397:function(e,t,n){n.d(t,{Mj:function(){return i},gM:function(){return a},nV:function(){return o}});let o="Modeled waste from typical pricing, team size, overlap, unused seats, and swap economics — not a quote";function r(e){return Math.min(Math.round(Math.max(0,Number.isFinite(e)?e:0)),5e7).toLocaleString()}function a(e){return"~$".concat(r(e))}function i(e){return"~$".concat(r(e),"/mo")}}}]);

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.