PageSourceSearch

https://www.bosscoderacademy.com/_next/static/chunks/pages/admin/sales-analysis-524b4f83f5f77221.js

js bosscoderacademy.com collected 2026-09-29 10:47:30 UTC 44,062 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[64759],{27484:function(e){var t;t=function(){"use strict";var e="millisecond",t="second",s="minute",a="hour",n="week",r="month",l="quarter",i="year",c="date",d="Invalid Date",o=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u=function(e,t,s){var a=String(e);return!a||a.length>=t?e:""+Array(t+1-a.length).join(s)+e},m="en",h={};h[m]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],s=e%100;return"["+e+(t[(s-20)%10]||t[s]||"th")+"]"}};var p="$isDayjsObject",g=function(e){return e instanceof j||!(!e||!e[p])},f=function e(t,s,a){var n;if(!t)return m;if("string"==typeof t){var r=t.toLowerCase();h[r]&&(n=r),s&&(h[r]=s,n=r);var l=t.split("-");if(!n&&l.length>1)return e(l[0])}else{var i=t.name;h[i]=t,n=i}return!a&&n&&(m=n),n||!a&&m},y=function(e,t){if(g(e))return e.clone();var s="object"==typeof t?t:{};return s.date=e,s.args=arguments,new j(s)},v={s:u,z:function(e){var t=-e.utcOffset(),s=Math.abs(t);return(t<=0?"+":"-")+u(Math.floor(s/60),2,"0")+":"+u(s%60,2,"0")},m:function e(t,s){if(t.date()<s.date())return-e(s,t);var a=12*(s.year()-t.year())+(s.month()-t.month()),n=t.clone().add(a,r),l=s-n<0,i=t.clone().add(a+(l?-1:1),r);return+(-(a+(s-n)/(l?n-i:i-n))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(d){return({M:r,y:i,w:n,d:"day",D:c,h:a,m:s,s:t,ms:e,Q:l})[d]||String(d||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}};v.l=f,v.i=g,v.w=function(e,t){return y(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var j=function(){function u(e){this.$L=f(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[p]=!0}var m=u.prototype;return m.parse=function(e){this.$d=function(e){var t=e.date,s=e.utc;if(null===t)return new Date(NaN);if(v.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var a=t.match(o);if(a){var n=a[2]-1||0,r=(a[7]||"0").substring(0,3);return s?new Date(Date.UTC(a[1],n,a[3]||1,a[4]||0,a[5]||0,a[6]||0,r)):new Date(a[1],n,a[3]||1,a[4]||0,a[5]||0,a[6]||0,r)}}return new Date(t)}(e),this.init()},m.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},m.$utils=function(){return v},m.isValid=function(){return this.$d.toString()!==d},m.isSame=function(e,t){var s=y(e);return this.startOf(t)<=s&&s<=this.endOf(t)},m.isAfter=function(e,t){return y(e)<this.startOf(t)},m.isBefore=function(e,t){return this.endOf(t)<y(e)},m.$g=function(e,t,s){return v.u(e)?this[t]:this.set(s,e)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(e,l){var d=this,o=!!v.u(l)||l,x=v.p(e),u=function(e,t){var s=v.w(d.$u?Date.UTC(d.$y,t,e):new Date(d.$y,t,e),d);return o?s:s.endOf("day")},m=function(e,t){return v.w(d.toDate()[e].apply(d.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(t)),d)},h=this.$W,p=this.$M,g=this.$D,f="set"+(this.$u?"UTC":"");switch(x){case i:return o?u(1,0):u(31,11);case r:return o?u(1,p):u(0,p+1);case n:var y=this.$locale().weekStart||0,j=(h<y?h+7:h)-y;return u(o?g-j:g+(6-j),p);case"day":case c:return m(f+"Hours",0);case a:return m(f+"Minutes",1);case s:return m(f+"Seconds",2);case t:return m(f+"Milliseconds",3);default:return this.clone()}},m.endOf=function(e){return this.startOf(e,!1)},m.$set=function(n,l){var d,o=v.p(n),x="set"+(this.$u?"UTC":""),u=((d={}).day=x+"Date",d[c]=x+"Date",d[r]=x+"Month",d[i]=x+"FullYear",d[a]=x+"Hours",d[s]=x+"Minutes",d[t]=x+"Seconds",d[e]=x+"Milliseconds",d)[o],m="day"===o?this.$D+(l-this.$W):l;if(o===r||o===i){var h=this.clone().set(c,1);h.$d[u](m),h.init(),this.$d=h.set(c,Math.min(this.$D,h.daysInMonth())).$d}else u&&this.$d[u](m);return this.init(),this},m.set=function(e,t){return this.clone().$set(e,t)},m.get=function(e){return this[v.p(e)]()},m.add=function(e,l){var c,d=this;e=Number(e);var o=v.p(l),x=function(t){var s=y(d);return v.w(s.date(s.date()+Math.round(t*e)),d)};if(o===r)return this.set(r,this.$M+e);if(o===i)return this.set(i,this.$y+e);if("day"===o)return x(1);if(o===n)return x(7);var u=((c={})[s]=6e4,c[a]=36e5,c[t]=1e3,c)[o]||1,m=this.$d.getTime()+e*u;return v.w(m,this)},m.subtract=function(e,t){return this.add(-1*e,t)},m.format=function(e){var t=this,s=this.$locale();if(!this.isValid())return s.invalidDate||d;var a=e||"YYYY-MM-DDTHH:mm:ssZ",n=v.z(this),r=this.$H,l=this.$m,i=this.$M,c=s.weekdays,o=s.months,u=s.meridiem,m=function(e,s,n,r){return e&&(e[s]||e(t,a))||n[s].slice(0,r)},h=function(e){return v.s(r%12||12,e,"0")},p=u||function(e,t,s){var a=e<12?"AM":"PM";return s?a.toLowerCase():a};return a.replace(x,function(e,a){return a||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return v.s(t.$y,4,"0");case"M":return i+1;case"MM":return v.s(i+1,2,"0");case"MMM":return m(s.monthsShort,i,o,3);case"MMMM":return m(o,i);case"D":return t.$D;case"DD":return v.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return m(s.weekdaysMin,t.$W,c,2);case"ddd":return m(s.weekdaysShort,t.$W,c,3);case"dddd":return c[t.$W];case"H":return String(r);case"HH":return v.s(r,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return p(r,l,!0);case"A":return p(r,l,!1);case"m":return String(l);case"mm":return v.s(l,2,"0");case"s":return String(t.$s);case"ss":return v.s(t.$s,2,"0");case"SSS":return v.s(t.$ms,3,"0");case"Z":return n}return null}(e)||n.replace(":","")})},m.utcOffset=function(){return-(15*Math.round(this.$d.getTimezoneOffset()/15))},m.diff=function(e,c,d){var o,x=this,u=v.p(c),m=y(e),h=(m.utcOffset()-this.utcOffset())*6e4,p=this-m,g=function(){return v.m(x,m)};switch(u){case i:o=g()/12;break;case r:o=g();break;
1case l:o=g()/3;break;case n:o=(p-h)/6048e5;break;case"day":o=(p-h)/864e5;break;case a:o=p/36e5;break;case s:o=p/6e4;break;case t:o=p/1e3;break;default:o=p}return d?o:v.a(o)},m.daysInMonth=function(){return this.endOf(r).$D},m.$locale=function(){return h[this.$L]},m.locale=function(e,t){if(!e)return this.$L;var s=this.clone(),a=f(e,t,!0);return a&&(s.$L=a),s},m.clone=function(){return v.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},u}(),b=j.prototype;return y.prototype=b,[["$ms",e],["$s",t],["$m",s],["$H",a],["$W","day"],["$M",r],["$y",i],["$D",c]].forEach(function(e){b[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),y.extend=function(e,t){return e.$i||(e(t,j,y),e.$i=!0),y},y.locale=f,y.isDayjs=g,y.unix=function(e){return y(1e3*e)},y.en=h[m],y.Ls=h,y.p={},y},e.exports=t()},84110:function(e){var t;t=function(){return function(e,t,s){e=e||{};var a=t.prototype,n={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function r(e,t,s,n){return a.fromToBase(e,t,s,n)}s.en.relativeTime=n,a.fromToBase=function(t,a,r,l,i){for(var c,d,o,x=r.$locale().relativeTime||n,u=e.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],m=u.length,h=0;h<m;h+=1){var p=u[h];p.d&&(c=l?s(t).diff(r,p.d,!0):r.diff(t,p.d,!0));var g=(e.rounding||Math.round)(Math.abs(c));if(o=c>0,g<=p.r||!p.r){g<=1&&h>0&&(p=u[h-1]);var f=x[p.l];i&&(g=i(""+g)),d="string"==typeof f?f.replace("%d",g):f(g,a,p.l,o);break}}if(a)return d;var y=o?x.future:x.past;return"function"==typeof y?y(d):y.replace("%s",d)},a.to=function(e,t){return r(e,t,this,!0)},a.from=function(e,t){return r(e,t,this)};var l=function(e){return e.$u?s.utc():s()};a.toNow=function(e){return this.to(l(this),e)},a.fromNow=function(e){return this.from(l(this),e)}}},e.exports=t()},70340:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/sales-analysis",function(){return s(50182)}])},31134:function(e,t,s){"use strict";s.d(t,{Z:function(){return o}});var a=s(67294);let n=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),r=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,s)=>s?s.toUpperCase():t.toLowerCase()),l=e=>{let t=r(e);return t.charAt(0).toUpperCase()+t.slice(1)},i=function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return t.filter((e,t,s)=>!!e&&""!==e.trim()&&s.indexOf(e)===t).join(" ").trim()};var c={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 d=(0,a.forwardRef)((e,t)=>{let{color:s="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:l,className:d="",children:o,iconNode:x,...u}=e;return(0,a.createElement)("svg",{ref:t,...c,width:n,height:n,stroke:s,strokeWidth:l?24*Number(r)/Number(n):r,className:i("lucide",d),...u},[...x.map(e=>{let[t,s]=e;return(0,a.createElement)(t,s)}),...Array.isArray(o)?o:[o]])}),o=(e,t)=>{let s=(0,a.forwardRef)((s,r)=>{let{className:c,...o}=s;return(0,a.createElement)(d,{ref:r,iconNode:t,className:i("lucide-".concat(n(l(e))),"lucide-".concat(e),c),...o})});return s.displayName=l(e),s}},78497:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(31134).Z)("menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]])},21700:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(31134).Z)("phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]])},36127:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(31134).Z)("search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},14919:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(31134).Z)("sliders-horizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]])},62190:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(31134).Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
1],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},50182:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return Y}});var a=s(85893),n=s(14908),r=s.n(n),l=s(67294),i=s(97629),c=s(27484),d=s.n(c),o=s(84110),x=s.n(o);function u(e){let{sentiment:t,size:s="sm"}=e,n=(()=>{switch((t||"").toLowerCase()){case"positive":return"bg-green-50 text-green-700 ring-green-200";case"negative":return"bg-rose-50 text-rose-700 ring-rose-200";case"neutral":return"bg-gray-50 text-gray-700 ring-gray-200";default:return"bg-slate-50 text-slate-600 ring-slate-200"}})();return(0,a.jsx)("span",{className:"".concat("inline-flex items-center rounded-full ring font-medium capitalize"," ").concat("md"===s?"px-3 py-1 text-sm":"px-2 py-0.5 text-xs"," ").concat(n),children:t||"—"})}function m(e){let{score:t=0}=e,{fill:s,label:n}=t<=1?{fill:"bg-[#E24B4A]",label:"text-[#A32D2D]"}:t<=2?{fill:"bg-[#BA7517]",label:"text-[#854F0B]"}:t<=3?{fill:"bg-[#639922]",label:"text-[#3B6D11]"}:t<=4?{fill:"bg-[#378ADD]",label:"text-[#185FA5]"}:{fill:"bg-[#7F77DD]",label:"text-[#3C3489]"};return(0,a.jsxs)("div",{className:"flex gap-2.5 md:flex-col",children:[(0,a.jsx)("div",{className:"h-[5px] w-24 shrink-0 overflow-hidden rounded-full bg-[#E8E7E0]",children:(0,a.jsx)("div",{className:"h-full rounded-full transition-all ".concat(s),style:{width:"".concat(Math.max(0,Math.min(100,Math.round(t/5*100))),"%")}})}),(0,a.jsxs)("span",{className:"text-xs font-medium tabular-nums ".concat(n),children:[t.toFixed(1),"/5"]})]})}let h={accelerator:"Accelerator",transformer:"Transformer",evolve:"Evolve",data_science:"Data Science",data_analytics:"Data Analytics",genai_engineering:"GenAI "};function p(e){let{program:t,size:s="sm"}=e;return t&&t in h?(0,a.jsx)("span",{className:"inline-flex items-center whitespace-nowrap rounded-full font-medium ring-1 ".concat("md"===s?"px-3 py-1 text-sm":"px-2 py-0.5 text-xs"," ").concat(function(e){switch(e){case"accelerator":return"bg-blue-50 text-blue-700 ring-blue-200";case"transformer":return"bg-indigo-50 text-indigo-700 ring-indigo-200";case"evolve":return"bg-purple-50 text-purple-700 ring-purple-200";case"data_science":return"bg-emerald-50 text-emerald-700 ring-emerald-200";case"data_analytics":return"bg-cyan-50 text-cyan-700 ring-cyan-200";case"genai_engineering":return"bg-orange-50 text-orange-700 ring-orange-200";default:return"bg-gray-50 text-gray-600 ring-gray-200"}}(t)),children:h[t]}):(0,a.jsx)("span",{className:"text-xs text-gray-400",children:"—"})}function g(e){let{category:t}=e,s={highly_interested:{label:"Highly interested",dotClass:"bg-[#D85A30]",badgeClass:"bg-[#FAECE7] text-[#993C1D] border-[#F0997B]"},warm:{label:"Warm",dotClass:"bg-[#BA7517]",badgeClass:"bg-[#FAEEDA] text-[#854F0B] border-[#FAC775]"},neutral:{label:"Neutral",dotClass:"bg-[#888780]",badgeClass:"bg-[#F1EFE8] text-[#5F5E5A] border-[#D3D1C7]"},cold:{label:"Cold",dotClass:"bg-[#378ADD]",badgeClass:"bg-[#E6F1FB] text-[#185FA5] border-[#85B7EB]"},not_a_fit:{label:"Not a fit",dotClass:"bg-[#E24B4A]",badgeClass:"bg-[#FCEBEB] text-[#A32D2D] border-[#F09595]"}}[null!=t?t:""];return s?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 whitespace-nowrap rounded-full border px-2.5 py-0.5 text-xs font-medium ".concat(s.badgeClass," "),children:[(0,a.jsx)("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full ".concat(s.dotClass)}),s.label]}):(0,a.jsx)("span",{className:"text-xs text-gray-400",children:"—"})}function f(e){let{date:t}=e;return t?(0,a.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("span",{className:"text-[13px] font-medium text-dark-blue",children:d()(t).format("DD MMM YYYY")}),(0,a.jsx)("span",{className:"text-[11px] text-gray-500",children:d()(t).format("HH:mm")})]}),(0,a.jsx)("span",{className:"text-[11px] text-gray-400",children:d()(t).fromNow()})]}):(0,a.jsx)("span",{className:"text-[13px] text-gray-400",children:"—"})}function y(e){let{name:t,email:s,department:n}=e;return t?(0,a.jsx)("div",{className:"flex w-[150%] flex-col items-center gap-2",children:(0,a.jsxs)("div",{className:"flex flex-col items-center gap-0.5",children:[(0,a.jsx)("span",{className:"max-w-[80px] text-center text-[13px] font-medium leading-tight text-gray-900",children:t}),n&&(0,a.jsx)("span",{className:"text-[11px] leading-tight text-gray-400",children:n})]})}):(0,a.jsx)("span",{className:"text-[13px] text-gray-400",children:"—"})}d().extend(x());var v=s(21700);function j(e){let{phone:t}=e;return t?(0,a.jsxs)("a",{href:"tel:".concat(t),className:"group inline-flex items-center gap-1.5 font-mono text-[12px] font-medium text-gray-700 transition-colors hover:text-indigo-600",children:[(0,a.jsx)(v.Z,{size:12,className:"shrink-0 text-gray-400 transition-colors group-hover:text-indigo-500"}),t]}):(0,a.jsx)("span",{className:"text-[13px] text-gray-400",children:"—"})}function b(e){let{isBst:t,isBca:s}=e;return t||s?(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[t&&(0,a.jsx)("span",{className:"inline-flex items-center rounded-full border border-[#AFA9EC] bg-[#EEEDFE] px-2 py-0.5 text-[10px] font-medium text-[#3C3489]",children:"BST"}),s&&(0,a.jsx)("span",{className:"inline-flex items-center rounded-full border border-[#5DCAA5] bg-[#E1F5EE] px-2 py-0.5 text-[10px] font-medium text-[#085041]",children:"BCA"})]}):null}d().extend(x());let N=["bg-[#EEEDFE] text-[#3C3489]","bg-[#E1F5EE] text-[#085041]","bg-[#FAEEDA] text-[#633806]","bg-[#FAECE7] text-[#712B13]","bg-[#E6F1FB] text-[#0C447C]","bg-[#EAF3DE] text-[#27500A]"];function w(e){var t,s;let{name:n}=e,r=null!==(t=null==n?void 0:n.split(" ").map(e=>e[0]).slice(0,2).join("").toUpperCase())&&void 0!==t?t:"?",l=N[(null!==(s=null==n?void 0:n.charCodeAt(0))&&void 0!==s?s:0)%N.length];return(0,a.jsx)("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-[11px] font-semibold ".concat(l),children:r})}function D(e){let{showBrand:t}=e;return(0,a.jsxs)("tr",{className:"animate-pulse border-b border-gray-100",children:[(0,a.jsx)("td",{className:"px-4 py-3 text-center",children:(0,a.jsx)("div",{className:"mx-auto h-3 w-5 rounded bg-gray-100"})}),(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("div",{className:"h-8 w-8 shrink-0 rounded-full bg-gray-100"}),(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-28 rounded bg-gray-100"}),(0,a.jsx)("div",{className:"h-2.5 w-20 rounded bg-gray-100"})]})]})}),(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsx)("div",{className:"h-3 w-24 rounded bg-gray-100"})}),(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-24 rounded bg-gray-100"}),(0,a.jsx)("div",{className:"h-2.5 w-16 rounded bg-gray-100"})]})}),(0,a.jsx)("td",{className:"px-4 py-3 text-center",children:(0,a.jsx)("div",{className:"mx-auto h-6 w-6 rounded-full bg-gray-100"})}),(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsx)("div",{className:"h-3 w-20 rounded bg-gray-100"})}),(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsx)("div",{className:"h-5 w-20 rounded-full bg-gray-100"})}),(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsx)("div",{className:"h-5 w-16 rounded-full bg-gray-100"})}),(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsx)("div",{className:"h-5 w-20 rounded-full bg-gray-100"})}),t&&(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsx)("div",{className:"h-5 w-10 rounded-full bg-gray-100"})}),(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsx)("div",{className:"h-2 w-24 rounded-full bg-gray-100"})}),(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsx)("div",{className:"h-6 w-14 roun
1ded-lg bg-gray-100"})})]})}function C(e){var t,s,n,r,l,i,c,d,o,x;let{journey:h,index:v,onView:N,showBrand:D}=e,C=h.lead,$=function(e){if(!e)return null;if("function"==typeof(null==e?void 0:e.toDate))return e.toDate();if("object"==typeof e&&"number"==typeof e._seconds)return new Date(1e3*e._seconds);if(e instanceof Date)return e;let t=new Date(e);return isNaN(t.getTime())?null:t}(h.lastCallAt);return(0,a.jsxs)("tr",{className:"group border-b border-gray-100 transition-colors hover:bg-indigo-50/30 [&:hover>td:first-child]:border-l-[3px] [&:hover>td:first-child]:border-l-indigo-400 [&>td:first-child]:border-l-[3px] [&>td:first-child]:border-l-transparent",children:[(0,a.jsx)("td",{className:"w-[48px] px-4 py-3 text-center font-mono text-[11px] text-gray-300 transition-colors",children:v+1}),(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsxs)("div",{className:"group/tooltip relative flex min-w-[160px] gap-2.5 md:flex-col",children:[(0,a.jsx)(w,{name:null==C?void 0:C.name}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("div",{className:"max-w-[130px] truncate text-[13px] font-medium leading-tight text-gray-900",children:(null==C?void 0:C.name)||"Unknown Lead"}),(0,a.jsx)("div",{className:"mt-0.5 max-w-[130px] truncate text-[11px] text-gray-400",children:(null==C?void 0:C.email)||"—"})]}),(0,a.jsxs)("div",{className:"absolute bottom-full left-0 z-30 mb-2 hidden w-max max-w-[260px] flex-col gap-1 rounded-lg bg-gray-900 px-3 py-2.5 text-[11px] text-white shadow-xl group-hover/tooltip:flex",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-gray-400",children:"Name"})," \xa0",(null==C?void 0:C.name)||"—"]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-gray-400",children:"Email"})," \xa0",(null==C?void 0:C.email)||"—"]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-gray-400",children:"Phone"})," \xa0",h.leadPhoneNumber||"—"]})]})]})}),(0,a.jsx)("td",{className:"whitespace-nowrap px-4 py-3",children:(0,a.jsx)(j,{phone:h.leadPhoneNumber})}),(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsx)(y,{name:null===(t=h.salesRep)||void 0===t?void 0:t.name,email:null===(s=h.salesRep)||void 0===s?void 0:s.email,department:null===(n=h.salesRep)||void 0===n?void 0:n.department})}),(0,a.jsx)("td",{className:"px-4 py-3 text-center",children:(0,a.jsx)("span",{className:"inline-flex h-[22px] w-[22px] items-center justify-center rounded-full bg-gray-100 text-[11px] font-semibold text-gray-600",children:null!==(o=h.callCount)&&void 0!==o?o:0})}),(0,a.jsx)("td",{className:"whitespace-nowrap px-4 py-3",children:(0,a.jsx)(f,{date:$})}),(0,a.jsx)("td",{className:"whitespace-nowrap px-4 py-3",children:(0,a.jsx)(p,{program:null===(r=h.ai)||void 0===r?void 0:r.programCategory})}),(0,a.jsx)("td",{className:"whitespace-nowrap px-4 py-3",children:(0,a.jsx)(u,{sentiment:null===(l=h.ai)||void 0===l?void 0:l.sentiment})}),(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsxs)("div",{className:"flex flex-col items-start gap-1.5",children:[(0,a.jsx)(g,{category:null===(i=h.ai)||void 0===i?void 0:i.leadCategory}),(null===(c=h.ai)||void 0===c?void 0:c.pitchingWithoutDiscovery)&&(0,a.jsx)("span",{className:"inline-flex items-center gap-1 whitespace-nowrap rounded-full border border-red-200 bg-red-50 px-2 py-0.5 text-[10px] font-medium text-red-700",children:"⚠ No discovery"})]})}),D&&(0,a.jsx)("td",{className:"whitespace-nowrap px-4 py-3",children:(0,a.jsx)(b,{isBst:h.isBst,isBca:h.isBca})}),(0,a.jsx)("td",{className:"min-w-[140px] whitespace-nowrap px-4 py-3",children:(0,a.jsx)(m,{score:null!==(x=null===(d=h.ai)||void 0===d?void 0:d.overallScore)&&void 0!==x?x:0})}),(0,a.jsx)("td",{className:"whitespace-nowrap px-4 py-3",children:(0,a.jsx)("button",{onClick:N,className:"inline-flex items-center gap-1.5 rounded-lg border border-[#AFA9EC] bg-[#EEEDFE] px-3 py-1.5 text-[11px] font-medium text-[#534AB7] transition-colors hover:bg-[#CECBF6]",children:"View →"})})]})}function $(e){let{phases:t}=e;return(0,a.jsxs)("section",{className:"space-y-4 rounded-2xl border bg-white p-5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-lg text-indigo-600",children:"\uD83D\uDCCA"}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Phase-wise Call Breakdown"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:t.map(e=>{var t,s;return(0,a.jsxs)("div",{className:"rounded-xl border bg-gray-50 p-4",children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,a.jsx)("h4",{className:"text-sm font-medium",children:e.title}),(0,a.jsxs)("span",{className:"rounded-full bg-indigo-100 px-2 py-1 text-xs font-semibold text-indigo-700",children:[e.score,"/5"]})]}),(null===(t=e.positives)||void 0===t?void 0:t.length)>0&&(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("p",{className:"mb-1 text-xs font-medium text-green-700",children:"\uD83D\uDC4D What went well"}),(0,a.jsx)("ul",{className:"space-y-1 text-sm text-gray-800",children:e.positives.map((e,t)=>(0,a.jsxs)("li",{className:"flex gap-2",children:[(0,a.jsx)("span",{className:"text-green-500",children:"•"}),e]},t))})]}),(null===(s=e.gaps)||void 0===s?void 0:s.length)>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"mb-1 text-xs font-medium text-yellow-700",children:"⚠️ Gaps / Improvements"}),(0,a.jsx)("ul",{className:"space-y-1 text-sm text-gray-800",children:e.gaps.map((e,t)=>(0,a.jsxs)("li",{className:"flex gap-2",children:[(0,a.jsx)("span",{className:"text-yellow-500",children:"•"}),e]},t))})]})]},e.phase)})})]})}function S(e){if(!e)return null;if("function"==typeof(null==e?void 0:e.toDate))return e.toDate();if("object"==typeof e&&"number"==typeof e._seconds)return new Date(1e3*e._seconds);if(e instanceof Date)return e;let t=new Date(e);return isNaN(t.getTime())?null:t}function k(e){var t,s,n,r,i,c,o,x,u,m,h;let{journey:p,onClose:f,showBrand:y}=e,v=[...p.calls||[]].sort((e,t)=>
1{var s,a;return((null===(s=S(e.callAt))||void 0===s?void 0:s.getTime())||0)-((null===(a=S(t.callAt))||void 0===a?void 0:a.getTime())||0)}),j=S(p.lastCallAt);return(0,l.useEffect)(()=>{let e=e=>{"Escape"===e.key&&f()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[f]),(0,a.jsx)("div",{className:"p fixed inset-0 -top-10 z-50 flex items-start justify-center overflow-y-auto bg-black/40",onClick:f,children:(0,a.jsxs)("div",{onClick:e=>e.stopPropagation(),className:"mt-14 max-h-[92vh] w-full max-w-[1200px] animate-[fadeIn_0.15s_ease-out] overflow-hidden rounded-2xl bg-white shadow-2xl",children:[(0,a.jsxs)("div",{className:"sticky top-0 z-10 flex items-center justify-between border-b bg-white px-6 py-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Sales Journey"}),(0,a.jsxs)("p",{className:"mt-1 text-xs text-gray-500",children:["Calls: ",null!==(x=p.callCount)&&void 0!==x?x:v.length," \xb7 Last:"," ",j?d()(j).format("DD MMM YYYY, HH:mm"):"-"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(b,{isBst:p.isBst,isBca:p.isBca}),(0,a.jsx)("span",{className:"rounded-full px-3 py-1 text-xs font-medium ".concat("positive"===(h=null===(t=p.ai)||void 0===t?void 0:t.sentiment)?"bg-green-100 text-green-700":"negative"===h?"bg-rose-100 text-rose-700":"bg-gray-100 text-gray-700"),children:null!==(u=null===(s=p.ai)||void 0===s?void 0:s.sentiment)&&void 0!==u?u:"—"}),(0,a.jsxs)("span",{className:"text-sm font-semibold",children:[(null!==(m=null===(n=p.ai)||void 0===n?void 0:n.overallScore)&&void 0!==m?m:0).toFixed(1),"/5"]}),(0,a.jsx)("button",{onClick:f,className:"text-lg text-gray-400 hover:text-gray-800",children:"✕"})]})]}),(0,a.jsxs)("div",{className:"max-h-[calc(92vh-72px)] space-y-8 overflow-y-auto px-6 py-5",children:[p.ai&&(0,a.jsxs)("section",{className:"space-y-5 rounded-2xl border bg-white p-5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-lg text-indigo-600",children:"\uD83E\uDDE0"}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Journey Analysis"})]}),(0,a.jsxs)("div",{className:"rounded-xl border border-indigo-100 bg-indigo-50 p-4",children:[(0,a.jsx)("p",{className:"mb-1 text-xs font-medium text-indigo-600",children:"Journey Summary"}),(0,a.jsx)("p",{className:"text-sm leading-relaxed text-gray-800",children:p.ai.summary})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[(0,a.jsxs)("div",{className:"rounded-xl border bg-green-50/40 p-4",children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-green-600",children:"\uD83D\uDC4D"}),(0,a.jsx)("h4",{className:"text-sm font-medium",children:"What went well"})]}),(null===(r=p.ai.strengths)||void 0===r?void 0:r.length)>0?(0,a.jsx)("ul",{className:"space-y-1 text-sm text-gray-800",children:p.ai.strengths.map((e,t)=>(0,a.jsxs)("li",{className:"flex gap-2",children:[(0,a.jsx)("span",{className:"text-green-500",children:"•"}),e]},t))}):(0,a.jsx)("p",{className:"text-xs italic text-gray-400",children:"No strengths recorded"})]}),(0,a.jsxs)("div",{className:"rounded-xl border bg-yellow-50/40 p-4",children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-yellow-600",children:"⚠️"}),(0,a.jsx)("h4",{className:"text-sm font-medium",children:"Needs improvement"})]}),(null===(i=p.ai.improvements)||void 0===i?void 0:i.length)>0?(0,a.jsx)("ul",{className:"space-y-1 text-sm text-gray-800",children:p.ai.improvements.map((e,t)=>(0,a.jsxs)("li",{className:"flex gap-2",children:[(0,a.jsx)("span",{className:"text-yellow-500",children:"•"}),e]},t))}):(0,a.jsx)("p",{className:"text-xs italic text-gray-400",children:"No improvements recorded"})]})]}),(null===(c=p.ai.objections)||void 0===c?void 0:c.length)>0&&(0,a.jsxs)("div",{className:"rounded-xl border bg-rose-50/40 p-4",children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-rose-600",children:"\uD83D\uDEAB"}),(0,a.jsx)("h4",{className:"text-sm font-medium",children:"Customer objections"})]}),(0,a.jsx)("ul",{className:"space-y-1 text-sm text-gray-800",children:p.ai.objections.map((e,t)=>(0,a.jsxs)("li",{className:"flex gap-2",children:[(0,a.jsx)("span",{className:"text-rose-500",children:"•"}),e]},t))})]}),p.ai.sentimentReason&&(0,a.jsxs)("div",{className:"rounded-xl border p-4 ".concat("positive"===p.ai.sentiment?"bg-green-50/40":"negative"===p.ai.sentiment?"bg-rose-50/40":"bg-gray-50"),children:[(0,a.jsxs)("p",{className:"mb-1 text-xs font-medium text-gray-500",children:["Why ",p.ai.sentiment," sentiment?"]}),(0,a.jsx)("p",{className:"text-sm text-gray-800",children:p.ai.sentimentReason})]}),p.ai.leadCategory&&(0,a.jsxs)("div",{className:"rounded-xl border bg-indigo-50/40 p-4",children:[(0,a.jsx)("p",{className:"mb-1 text-xs font-medium text-indigo-600",children:"Lead Category"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(g,{c
1ategory:p.ai.leadCategory}),p.ai.leadCategoryReason&&(0,a.jsxs)("p",{className:"text-sm italic text-gray-700",children:['"',p.ai.leadCategoryReason,'"']})]})]}),p.ai.pitchingWithoutDiscovery&&(0,a.jsxs)("div",{className:"rounded-xl border border-red-200 bg-red-50 p-4",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-red-600",children:"⚠️"}),(0,a.jsx)("p",{className:"text-xs font-semibold text-red-700",children:"Pitched Without Discovery"})]}),(0,a.jsx)("p",{className:"text-sm text-gray-700",children:p.ai.pitchingWithoutDiscoveryReason})]})]}),(null===(o=p.ai.phaseAnalysis)||void 0===o?void 0:o.length)>0&&(0,a.jsx)($,{phases:p.ai.phaseAnalysis}),(0,a.jsxs)("section",{className:"space-y-4",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Call Timeline"}),v.map((e,t)=>{let s=S(e.callAt);return(0,a.jsxs)("div",{className:"space-y-3 rounded-xl border p-4 transition hover:bg-gray-50",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"font-medium",children:["Call ",t+1," \xb7"," ",s?d()(s).format("DD MMM YYYY, HH:mm"):"-"]}),(0,a.jsx)("div",{className:"text-xs text-gray-500",children:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return"".concat(Math.floor(e/60),":").concat(String(Math.floor(e%60)).padStart(2,"0"))}(e.duration)})]}),e.callRecordingUrl&&(0,a.jsx)("audio",{controls:!0,src:e.callRecordingUrl,className:"w-full"}),(0,a.jsxs)("details",{className:"mt-2",children:[(0,a.jsx)("summary",{className:"cursor-pointer text-sm text-indigo-700",children:"View Transcript"}),(0,a.jsx)("pre",{className:"mt-2 max-h-[260px] overflow-y-auto whitespace-pre-wrap rounded-lg bg-gray-100 p-3 text-sm",children:e.transcript||"No transcript"})]})]},e.callId)})]})]})]})})}var A=s(9008),M=s.n(A),E=s(14919),_=s(62190),B=s(36127);let F="\n  h-[34px] w-full border border-gray-200 rounded-lg px-3\n  text-[12px] text-gray-900 bg-white outline-none\n  focus:border-indigo-400 focus:ring-2 focus:ring-indigo-100\n  transition-all placeholder:text-gray-400\n",L="text-[11px] text-gray-500 mb-1 block",T="text-[11px] font-medium text-gray-400 uppercase tracking-wide mb-2.5";function O(e){var t,s;let{q:n,setQ:r,salesRepId:l,setSalesRepId:i,sentiment:c,setSentiment:d,program:o,setProgram:x,department:u,setDepartment:m,startDate:h,setStartDate:p,endDate:g,setEndDate:f,leadCategory:y,setLeadCategory:v,pitchingWithoutDiscovery:j,setPitchingWithoutDiscovery:b,brand:N,setBrand:w,salesReps:D}=e,C=u?D.filter(e=>e.department===u):D,$=!!(n||l||u||c||o||h||g||y||j||N),S=[n&&{key:"q",label:'Search: "'.concat(n,'"'),clear:()=>r("")},c&&{key:"sentiment",label:"Sentiment: ".concat(c),clear:()=>d("")},o&&{key:"program",label:"Program: ".concat(o.replace(/_/g," ")),clear:()=>x("")},y&&{key:"lc",label:"Category: ".concat(y.replace(/_/g," ")),clear:()=>v("")},u&&{key:"dept",label:"Dept: ".concat(u),clear:()=>m("")},l&&{key:"rep",label:"Rep: ".concat(null!==(s=null===(t=D.find(e=>e.id===l))||void 0===t?void 0:t.name)&&void 0!==s?s:l),clear:()=>i("")},j&&{key:"pwd",label:"true"===j?"No discovery: flagged":"Discovery: done",clear:()=>b("")},N&&{key:"brand",label:"Brand: ".concat(N.toUpperCase()),clear:()=>w("")},(h||g)&&{key:"dates",label:"".concat(h||"…"," → ").concat(g||"…"),clear:()=>{p(""),f("")}}].filter(Boolean);return(0,a.jsxs)("div",{className:"space-y-5 rounded-2xl border border-gray-200 bg-white p-5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(E.Z,{size:14,className:"text-gray-400"}),(0,a.jsx)("span",{className:"text-[13px] font-medium text-gray-900",children:"Filters"}),(0,a.jsx)("span",{className:"hidden text-[12px] text-gray-400 md:inline",children:"— refine by AI insights, rep, program & date"})]}),$&&(0,a.jsxs)("button",{onClick:()=>{r(""),i(""),m(""),d(""),x(""),p(""),f(""),v(""),b(""),w("")},className:"inline-flex items-center gap-1.5 rounded-full border border-gray-200 px-3 py-1 text-[11px] text-gray-500 transition-colors hover:bg-gray-50",children:[(0,a.jsx)(_.Z,{size:10}),"Reset all"]})]}),(0,a.jsx)("div",{className:"h-px bg-gray-100"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:T,children:"Search & people"}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-4",children:[(0,a.jsxs)("div",{className:"md:col-span-2",children:[(0,a.jsx)("label",{className:L,children:"Search"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(B.Z,{size:13,className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"}),(0,a.jsx)("input",{value:n,onChange:e=>r(e.target.value),placeholder:"Lead name, phone, AI summary…",className:"".concat(F," pl-8")})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:L,children:"Department"}),(0,a.jsxs)("select",{value:u,onChange:e=>{m(e.target.value),i("")},className:F,children:[(0,a.jsx)("option",{value:"",children:"All departments"}),(0,a.jsx)("option",{value:"Sales",children:"Sales"}),(0,a.jsx)("option",{value:"Onboarding",children:"Onboarding"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:L,children:"Sales rep"}
1),(0,a.jsxs)("select",{value:l,onChange:e=>i(e.target.value),className:F,disabled:!C.length,children:[(0,a.jsx)("option",{value:"",children:"All reps"}),C.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name},e.id))]})]})]})]}),(0,a.jsx)("div",{className:"h-px bg-gray-100"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:T,children:"AI insights"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3 md:grid-cols-5",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:L,children:"Program"}),(0,a.jsxs)("select",{value:o,onChange:e=>x(e.target.value),className:F,children:[(0,a.jsx)("option",{value:"",children:"All programs"}),(0,a.jsx)("option",{value:"accelerator",children:"Accelerator"}),(0,a.jsx)("option",{value:"transformer",children:"Transformer"}),(0,a.jsx)("option",{value:"evolve",children:"Evolve"}),(0,a.jsx)("option",{value:"data_science",children:"Data Science"}),(0,a.jsx)("option",{value:"data_analytics",children:"Data Analytics"}),(0,a.jsx)("option",{value:"genai_engineering",children:"GenAI Engineering"}),(0,a.jsx)("option",{value:"ml_engineering",children:"ML Engineering"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:L,children:"Lead category"}),(0,a.jsxs)("select",{value:y,onChange:e=>v(e.target.value),className:F,children:[(0,a.jsx)("option",{value:"",children:"All categories"}),(0,a.jsx)("option",{value:"highly_interested",children:"Highly interested"}),(0,a.jsx)("option",{value:"warm",children:"Warm"}),(0,a.jsx)("option",{value:"neutral",children:"Neutral"}),(0,a.jsx)("option",{value:"cold",children:"Cold"}),(0,a.jsx)("option",{value:"not_a_fit",children:"Not a fit"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:L,children:"Sentiment"}),(0,a.jsxs)("select",{value:c,onChange:e=>d(e.target.value),className:F,children:[(0,a.jsx)("option",{value:"",children:"All sentiments"}),(0,a.jsx)("option",{value:"positive",children:"Positive"}),(0,a.jsx)("option",{value:"neutral",children:"Neutral"}),(0,a.jsx)("option",{value:"negative",children:"Negative"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:L,children:"Brand"}),(0,a.jsxs)("select",{value:N,onChange:e=>w(e.target.value),className:F,children:[(0,a.jsx)("option",{value:"",children:"All brands"}),(0,a.jsx)("option",{value:"bst",children:"BST"}),(0,a.jsx)("option",{value:"bca",children:"BCA"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:L,children:"Pitched without discovery"}),(0,a.jsxs)("select",{value:j,onChange:e=>b(e.target.value),className:F,children:[(0,a.jsx)("option",{value:"",children:"All"}),(0,a.jsx)("option",{value:"true",children:"Flagged — yes"}),(0,a.jsx)("option",{value:"false",children:"Discovery done — no"})]})]})]})]}),(0,a.jsx)("div",{className:"h-px bg-gray-100"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:T,children:"Date range"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:L,children:"From"}),(0,a.jsx)("input",{type:"date",value:h,onChange:e=>p(e.target.value),className:F})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:L,children:"To"}),(0,a.jsx)("input",{type:"date",value:g,onChange:e=>f(e.target.value),className:F})]})]})]}),S.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"h-px bg-gray-100"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:S.map(e=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-indigo-200 bg-indigo-50 py-1 pl-2.5 pr-1.5 text-[11px] font-medium text-indigo-700",children:[e.label,(0,a.jsx)("button",{onClick:e.clear,className:"flex h-4 w-4 items-center justify-center rounded-full bg-indigo-200 leading-none text-indigo-800 transition-colors hover:bg-indigo-300",children:(0,a.jsx)(_.Z,{size:8})})]},e.key))})]})]})}function Y(){let[e,t]=(0,l.useState)(""),[s,n]=(0,l.useState)(""),[i,c]=(0,l.useState)(""),[d,o]=(0,l.useState)(""),[x]=(0,l.useState)("desc"),[u,m]=(0,l.useState)(""),[h,p]=(0,l.useState)(""),[g,f]=(0,l.useState)(""),[y,v]=(0,l.useState)(""),[j,b]=(0,l.useState)([]),[N,w]=(0,l.useState)(null),[$,S]=(0,l.useState)(!0),[A,E]=(0,l.useState)(!1),[_,B]=(0,l.useState)(null),[F,L]=(0,l.useState)(null),[T,Y]=(0,l.useState)([]),[W,Z]=(0,l.useState)(""),[H,I]=(0,l.useState)(""),z=j.some(e=>e.isBst||e.isBca);(0,l.useEffect)(()=>{fetch("/api/admin/sales-rep-fetch").then(e=>e.json()).then(e=>{Y(e.items||[])}).catch(()=>{})},[]);let R=async function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!A){E(!0),B(null);try{var a;let n=new URLSearchParams;n.set("pageSize",String(50)),n.set("order",x),!t&&N&&n.set("cursor",N),e&&n.set("q",e),s&&n.set("salesRepId",s),g&&n.set("department",g),i&&n.set("sentiment",i),d&&n.set("programCategory",d),u&&n.set("startDate",u),h&&n.set("endDate",h),W&&n.set("leadCategory",W),H&&n.set("pitchingWithoutDiscovery",H),y&&n.set("brand",y);let r=await fetch("/api/admin/sales-analysis-sales-journey?".concat(n.toString())),l=await r.json();if(!l.ok)throw Error("Failed to load journeys");b(e=>t?l.items:[...e,...l.items]),w(null!==(a=l.nextCursor)&&void 0!==a?a:null),S(!!l.hasMore)}catch(e){B(e.message||"Something went wrong")}finally{E(!1)}}};return(0,l.useEffect)(()=>{b([]),w(null),S(!0),R(!0)},[e,s,g,i,d,u,h,W,H,y]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(M(),{children:[(0,a.jsx)("title",{children:"Sales Journey Analysis | Bosscoder Admin"}),(0,a.jsx)("meta",{name:"description",content:"Analyze sales journeys with AI-powered insights, sentiment analysis, and phase-wise performance scoring."})]}),(0,a.jsxs)("div",{className:"space-y-6 p-6 ".concat(r().className),children:[(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("h1",{className:"text-[32px] font-semibold tracking-tight text-gray-900",children:"Sales Journey Analysis"}),(0,a.jsx)("p",{className:"text-[16px] text-gray-500",children:"AI-driven analysis of complete multi-call sales and onboarding journeys."})]}),(0,a.jsx)(O,{q:e,setQ:t,salesRepId:s,setSalesRepId:n,sentiment:i,setSentiment:c,program:d,setProgram:o,department:g,setDepartment:f,startDate:u,setStartDate:m,endDate:h,setEndDate:p,salesReps:T,leadCategory:W,setLeadCategory:Z,pitchingWithoutDiscovery:H,setPitchingWithoutDiscovery:I,brand:y,setBrand:v}),(0,a.jsx)("div",{className:"rounded-xl border bg-white",children:(0,a.jsx)("div",{className:"relative max-h-[70vh] overflow-x-auto overflow-y-auto",children:(0,a.jsxs)("table",{className:"w-full min-w-[1200px] table-fixed text-sm",children:[(0,a.jsx)("thead",{className:"sticky top-0 z-20 bg-gray-50",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"w-[60px] p-3 text-center",children:"#"}),(0,a.jsx)("th",{className:"p-3 text-left",children:"Lead"}),(0,a.jsx)("th",{className:"p-3 text-left",children:"Lead Number"}),(0,a.jsx)("th",{className:"p-3 text-left",children:"Sales Rep"}),(0,a.jsx)("th",{className:"p-3 text-center",children:"Calls"}),(0,a.jsx)("th",{className:"p-3 text-left",children:"Last Call"}),(0,a.jsx)("th",{className:"p-3 text-left",children:"Program"}),(0,a.jsx)("th",{className:"p-3 text-left",children:"Sentiment"}),(0,a.jsx)("th",{className:"p-3 text-left",children:"Lead Category"}),z&&(0,a.jsx)("th",{className:"p-3 text-left",children:"Brand"})," ",(0,a.jsx)("th",{className:"p-3 text-left",children:"Score"}),(0,a.jsx)("th",{className:"p-3 text-left",children:"Action"})]})}),(0,a.jsx)("tbody",{children:A&&0===j.length?Array.from({length:10}).map((e,t)=>(0,a.jsx)(D,{showBrand:z},t)):j.map((e,t)=>(0,a.jsx)(C,{journey:e,index:t,onView:()=>L(e),showBrand:z},e.id))})]})})}),$&&!A&&(0,a.jsx)("div",{className:"flex justify-center",children:(0,a.jsx)("button",{onClick:()=>R(!1),className:"rounded-lg border px-6 py-2 text-sm hover:bg-gray-50",children:"Load more"})}),A&&j.length>0&&(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-3 text-sm text-gray-400",children:[(0,a.jsxs)("svg",{className:"h-4 w-4 animate-spin text-indigo-400",fill:"none",viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}),"Loading more…"]}),F&&(0,a.jsx)(k,{journey:F,onClose:()=>L(null)})]})]})}Y.getLayout=e=>(0,a.jsx)(i.Z,{children:e})},14908:function(e){e.exports={style:{fontFamily:"'__Inter_f367f3', '__Inter_Fallback_f367f3'",fontStyle:"normal"},className:"__className_f367f3",variable:"__variable_f367f3"}}},function(e){e.O(0,[25675,97629,92888,49774,40179],function(){return e(e.s=70340)}),_N_E=e.O()}]);

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.