PageSourceSearch

https://sociallab.sa/chunk-DnnfVSY3.js

js sociallab.sa collected 2026-09-24 13:29:17 UTC 61,957 bytes, 1 lines download raw bytes

1import {g as ge}from'./chunk-BfRcg2Fj.js';import'./chunk-BeDQ42vo.js';import {R as R$1}from'./chunk-D4qj5Z2t.js';import {Q as Qe$1}from'./chunk-DCCwYsIQ.js';import {S}from'./chunk-AvbB3w2y.js';import {UserPerformanceComponent as Cn$1}from'./chunk-CBxlqJo2.js';import {D as Dt}from'./chunk-DsrO9b08.js';import {FeedbackAnalyticsComponent as Li}from'./chunk-Cjczixzy.js';import'./chunk-DW9xlF4p.js';import'./chunk-DGpypiby.js';import'./chunk-D3crpTkA.js';import'./chunk-CjNSgPDz.js';import'./chunk-C2EVnWPI.js';import'./chunk-DrzP7OIb.js';import'./chunk-CC_dzDIF.js';import {c as ce}from'./chunk-Cha4_V9g.js';import'./chunk-yuXVPJRt.js';import {g,A as Ao,bQ as P,O,W,c8 as Xr,K as Kb,k as Kv,x as xM,i as ea,T as Tt,P as Pg,V as Vg,l as b0,L as L0,Y as Yx,m as dn$1,n as Vw,o as nk,t as td,p as tC,q as bC,s as sv,N as NC,X as XC,_ as _D,aO as oD,r as il,u as XD,v as rM,F as Fb,w as t1,y as A1,z as gS,B as Vs,C as zs,J as NS,Z as ZS,M as EI,Q as us,R as ms,S as HI,U as ZI,$ as Dn$1,a0 as kE,a1 as Jv,a2 as go,a3 as qd,av as on$1,a4 as YE,a5 as OT,a6 as lA,aM as ZM,a7 as mt,a8 as cy,aa as Xs,ac as V_,ae as fS,ad as hd,ab as my,a9 as qT,ai as ay,bC as tS,ag as _C,aj as ky,al as hS,ah as ZT,j as ai$1,cA as zM,aP as lD,cb as XI,aq as Dl,af as KT,ak as Dd,am as XT,aV as QT,aT as l_,aD as Fy,bf as Ty,aR as o_,aS as Pp,aU as Lp,bg as gS$1,cC as se,c2 as M,c9 as DD,cD as bt,a as G,an as x,ba as _y,bm as Vg$1}from'./main-CTPND76J.js';import {R}from'./chunk-CFAvsiDu.js';import {u as ue}from'./chunk-Cqar5kkp.js';import'./chunk-CAH8VGMK.js';var Le={GET_HOME_SUMMARY:"GetHomeSummary",GET_BADGES:"GetBadges"},Ne=(()=>{class e extends se{constructor(t,d,c){super(t,d,c,"Dashboard/");}getHomeSummary(t){return this.post(Le.GET_HOME_SUMMARY,{windowDays:t??null})}getBadges(){return this.get(Le.GET_BADGES)}static{this.\u0275fac=function(d){return new(d||e)(M(DD),M(bt),M(G))};}static{this.\u0275prov=x({token:e,factory:e.\u0275fac,providedIn:"root"});}}return e})();var We=()=>[1,2,3,4,5,6],Ge=(e,l)=>l.key;function Ke(e,l){e&1&&(Xs(0,"mat-card",5),cy(1,"app-skeleton-loader",6)(2,"div",7)(3,"app-skeleton-loader",8),hd()),e&2&&(_C(3),ay("lines",3));}function Ve(e,l){e&1&&(Xs(0,"div",3),KT(1,Ke,4,1,"mat-card",5,QT),hd()),e&2&&(_C(),XT(tS(0,We)));}function Ye(e,l){if(e&1){let t=o_();Xs(0,"mat-card",4)(1,"mat-icon",9),V_(2,"warning"),hd(),Xs(3,"p",10),V_(4),fS(5,"translate"),hd(),Xs(6,"button",11),my("click",function(){Pp(t);let c=l_();return Lp(c.fetch())}),V_(7),fS(8,"translate"),hd()();}e&2&&(_C(4),Dd(" ",hS(5,2,"These statistics couldn't be loaded. This is not a zero result \u2014 the figures are unavailable right now.")," "),_C(3),ky(hS(8,4,"Retry")));}function Ze(e,l){if(e&1&&(Xs(0,"div",34)(1,"mat-icon"),V_(2,"forum"),hd(),Xs(3,"span",37),V_(4),fS(5,"number"),hd(),Xs(6,"span",38),V_(7),fS(8,"translate"),hd()()),e&2){let t=l_(3);_C(4),ky(hS(5,2,t.summary.badges.unreadConversations)),_C(3),ky(hS(8,4,"Unread Conversations"));}}function Xe(e,l){if(e&1&&(Xs(0,"div",34)(1,"mat-icon"),V_(2,"notifications"),hd(),Xs(3,"span",37),V_(4),fS(5,"number"),hd(),Xs(6,"span",38),V_(7),fS(8,"translate"),hd()()),e&2){let t=l_(3);_C(4),ky(hS(5,2,t.summary.badges.unreadNotifications)),_C(3),ky(hS(8,4,"Unread Notifications"));}}function qe(e,l){if(e&1&&(Xs(0,"div",35)(1,"mat-icon"),V_(2,"phone_missed"),hd(),Xs(3,"span",37),V_(4),fS(5,"number"),hd(),Xs(6,"span",38),V_(7),fS(8,"translate"),hd()()),e&2){let t=l_(3);_C(4),ky(hS(5,2,t.summary.badges.missedCallsToday)),_C(3),ky(hS(8,4,"Missed Calls Today"));}}function Je(e,l){if(e&1&&(Xs(0,"div",34)(1,"mat-icon"),V_(2,"shopping_bag"),hd(),Xs(3,"span",37),V_(4),fS(5,"number"),hd(),Xs(6,"span",38),V_(7),fS(8,"translate"),hd()()),e&2){let t=l_(3);_C(4),ky(hS(5,2,t.summary.badges.newOrders)),_C(3),ky(hS(8,4,"New Orders"));}}function Qe(e,l){if(e&1&&(Xs(0,"div",34)(1,"mat-icon"),V_(2,"event"),hd(),Xs(3,"span",37),V_(4),fS(5,"number"),hd(),Xs(6,"span",38),V_(7),fS(8,"translate"),hd()()),e&2){let t=l_(3);_C(4),ky(hS(5,2,t.summary.badges.pendingBookings)),_C(3),ky(hS(8,4,"Pending Bookings"));}}function tn(e,l){if(e&1&&(Xs(0,"div",34)(1,"mat-icon"),V_(2,"confirmation_number"),hd(),Xs(3,"span",37),V_(4),fS(5,"number"),hd(),Xs(6,"span",38),V_(7),fS(8,"translate"),hd()()),e&2){let t=l_(3);_C(4),ky(hS(5,2,t.summary.badges.newTickets)),_C(3),ky(hS(8,4,"New Tickets"));}}function en(e,l){if(e&1&&(Xs(0,"a",36),fS(1,"translate"),Xs(2,"mat-icon"),V_(3,"alarm"),hd(),Xs(4,"span",37),V_(5),fS(6,"number"),hd(),Xs(7,"span",38),V_(8),fS(9,"translate"),hd()()),e&2){let t=l_(3);ay("matTooltip",hS(1,3,"Follow-up reminders assigned to you that are still open")),_C(5),ky(hS(6,5,t.summary.badges.pe
1ndingTasks)),_C(3),ky(hS(9,7,"Pending Follow-ups"));}}function nn(e,l){if(e&1&&(Xs(0,"div",12),qT(1,Ze,9,6,"div",34),qT(2,Xe,9,6,"div",34),qT(3,qe,9,6,"div",35),qT(4,Je,9,6,"div",34),qT(5,Qe,9,6,"div",34),qT(6,tn,9,6,"div",34),qT(7,en,10,9,"a",36),hd()),e&2){let t=l_(2);_C(),ZT(t.summary.badges.unreadConversations>0?1:-1),_C(),ZT(t.summary.badges.unreadNotifications>0?2:-1),_C(),ZT(t.summary.badges.missedCallsToday>0?3:-1),_C(),ZT(t.summary.badges.newOrders>0?4:-1),_C(),ZT(t.summary.badges.pendingBookings>0?5:-1),_C(),ZT(t.summary.badges.newTickets>0?6:-1),_C(),ZT(t.summary.badges.pendingTasks>0?7:-1);}}function an(e,l){if(e&1&&(Xs(0,"p",18),V_(1),fS(2,"translate"),hd()),e&2){let t=l_(2);_C(),ky(hS(2,1,t.aiStatusReasonKey));}}function on(e,l){e&1&&(Xs(0,"span"),V_(1," \xB7 "),hd());}function rn(e,l){if(e&1&&(Xs(0,"span"),V_(1),fS(2,"translate"),hd(),qT(3,on,2,0,"span")),e&2){let t=l.$implicit,d=l.$index,c=l.$count,C=l_(3);_C(),ky(hS(2,2,C.channelLabel(t))),_C(2),ZT(d!==c-1?3:-1);}}function sn(e,l){if(e&1&&(Xs(0,"p",19),V_(1),fS(2,"translate"),KT(3,rn,4,4,null,null,QT),hd()),e&2){let t=l_(2);_C(),Dd(" ",hS(2,1,"Replying on"),": "),_C(2),XT(t.summary.ai.status.activeChannels);}}function pn(e,l){if(e&1&&(Xs(0,"strong"),V_(1),fS(2,"number"),Xs(3,"span",39),V_(4),fS(5,"number"),hd()()),e&2){let t=l_(2);_C(),Dd("",gS$1(2,2,t.satisfactionOutOfFive,"1.1-1")," / 5 "),_C(3),Dd("(",hS(5,5,t.summary.ai.satisfactionResponses),")");}}function ln(e,l){e&1&&(Xs(0,"strong",26),V_(1,"\u2014"),hd());}function dn(e,l){if(e&1&&(Xs(0,"span",40)(1,"mat-icon"),V_(2),hd(),V_(3),fS(4,"number"),hd()),e&2){let t=l_(2);_y("up",t.messagesTrendPercent>=0)("down",t.messagesTrendPercent<0),_C(2),ky(t.messagesTrendPercent>=0?"trending_up":"trending_down"),_C(),Dd(" ",gS$1(4,6,t.messagesTrendPercent,"1.0-1"),"% ");}}function cn(e,l){if(e&1&&cy(0,"img",42),e&2){let t=l_().$implicit;ay("src","/assets/images/icons/"+l+".png",Vg$1)("alt",t.key);}}function mn(e,l){if(e&1&&(Xs(0,"div",29)(1,"span",41),qT(2,cn,1,2,"img",42),V_(3),fS(4,"translate"),hd(),Xs(5,"strong"),V_(6),fS(7,"number"),Xs(8,"span",39),V_(9),fS(10,"number"),hd()()()),e&2){let t,d=l.$implicit,c=l_(2);_C(2),ZT((t=c.channelIcon(d.key))?2:-1,t),_C(),Dd(" ",hS(4,4,c.channelLabel(d.key))," "),_C(3),Dd("",hS(7,6,d.currentMonth)," "),_C(3),Dd("(",hS(10,8,d.previousMonth),")");}}function gn(e,l){if(e&1&&(Xs(0,"mat-card",5)(1,"div",13)(2,"mat-icon",43),V_(3,"call"),hd(),Xs(4,"h4"),V_(5),fS(6,"translate"),hd()(),Xs(7,"div",17)(8,"div",20)(9,"span",21),V_(10),fS(11,"number"),hd(),Xs(12,"span",22),V_(13),fS(14,"translate"),hd()(),Xs(15,"div",23)(16,"div",24)(17,"span"),V_(18),fS(19,"translate"),hd(),Xs(20,"strong"),V_(21),fS(22,"number"),hd()(),Xs(23,"div",24)(24,"span"),V_(25),fS(26,"translate"),hd(),Xs(27,"strong"),V_(28),hd()(),Xs(29,"div",24)(30,"span"),V_(31),fS(32,"translate"),hd(),Xs(33,"strong"),V_(34),hd()()()()()),e&2){let t=l_(2);_C(5),ky(hS(6,9,"Calls")),_C(5),ky(hS(11,11,t.summary.calls.callsToday)),_C(3),ky(hS(14,13,"Calls today")),_C(5),ky(hS(19,15,"Calls yesterday")),_C(3),ky(hS(22,17,t.summary.calls.callsYesterday)),_C(4),ky(hS(26,19,"Total talk time today")),_C(3),ky(t.formatDuration(t.summary.calls.totalTalkSecondsToday)),_C(3),ky(hS(32,21,"Average call duration")),_C(3),ky(t.formatDuration(t.summary.calls.averageTalkSeconds));}}function un(e,l){if(e&1&&(Xs(0,"strong"),V_(1),fS(2,"date"),hd()),e&2){let t=l_(2);_C(),ky(gS$1(2,1,t.summary.tickets.oldestOpenSinceUtc,"medium"));}}function _n(e,l){e&1&&(Xs(0,"strong",26),V_(1,"\u2014"),hd());}function fn(e,l){if(e&1&&(Xs(0,"span",40)(1,"mat-icon"),V_(2),hd(),V_(3),fS(4,"number"),hd()),e&2){let t=l_(2);_y("up",t.campaignsTrendPercent>=0)("down",t.campaignsTrendPercent<0),_C(2),ky(t.campaignsTrendPercent>=0?"trending_up":"trending_down"),_C(),Dd(" ",gS$1(4,6,t.campaignsTrendPercent,"1.0-1"),"% ");}}function xn(e,l){if(e&1&&(Xs(0,"div",24)(1,"span"),V_(2),fS(3,"translate"),hd(),Xs(4,"strong"),V_(5),fS(6,"date"),hd()()),e&2){let t=l_(3);_C(2),ky(hS(3,2,"Next expiry")),_C(3),ky(gS$1(6,4,t.summary.points.nextExpiryDate,"mediumDate"));}}function hn(e,l){if(e&1&&(Xs(0,"div",23)(1,"div",24)(2,"span"),V_(3),fS(4,"translate"),hd(),Xs(5,"strong",44),
1V_(6),fS(7,"number"),hd()(),qT(8,xn,7,7,"div",24),hd()),e&2){let t=l_(2);_C(3),ky(hS(4,3,"Expiring soon")),_C(3),ky(gS$1(7,5,t.summary.points.expiringSoonPoints,"1.0-2")),_C(2),ZT(t.summary.points.nextExpiryDate?8:-1);}}function Cn(e,l){if(e&1&&(Xs(0,"mat-card",5)(1,"div",13)(2,"mat-icon",45),V_(3,"speed"),hd(),Xs(4,"h4"),V_(5),fS(6,"translate"),hd()(),Xs(7,"div",17)(8,"div",20)(9,"span",21),V_(10),fS(11,"number"),hd(),Xs(12,"span",22),V_(13),fS(14,"translate"),hd()(),Xs(15,"div",23)(16,"div",24)(17,"span"),V_(18),fS(19,"translate"),hd(),Xs(20,"strong"),V_(21),fS(22,"number"),hd()(),Xs(23,"div",24)(24,"span"),V_(25),fS(26,"translate"),hd(),Xs(27,"strong"),V_(28),fS(29,"number"),hd()()()()()),e&2){let t=l_(2);_C(5),ky(hS(6,7,"Performance")),_C(5),ky(gS$1(11,9,t.summary.performance.medianResponseMinutes,"1.0-1")),_C(3),ky(hS(14,12,"Typical reply time (minutes)")),_C(5),ky(hS(19,14,"Replies within an hour")),_C(3),Dd("",gS$1(22,16,t.summary.performance.responseWithin1HourPercent,"1.0-1"),"%"),_C(4),ky(hS(26,19,"Average active hours per day")),_C(3),ky(gS$1(29,21,t.averageActiveHoursPerDay,"1.1-1"));}}function Mn(e,l){if(e&1&&(qT(0,nn,8,7,"div",12),Xs(1,"div",3)(2,"mat-card",5)(3,"div",13)(4,"mat-icon",14),V_(5,"smart_toy"),hd(),Xs(6,"h4"),V_(7),fS(8,"translate"),hd(),Xs(9,"span",15),cy(10,"span",16),V_(11),fS(12,"translate"),hd()(),Xs(13,"div",17),qT(14,an,3,3,"p",18)(15,sn,5,3,"p",19),Xs(16,"div",20)(17,"span",21),V_(18),fS(19,"number"),hd(),Xs(20,"span",22),V_(21),fS(22,"translate"),hd()(),Xs(23,"div",23)(24,"div",24)(25,"span"),V_(26),fS(27,"translate"),hd(),Xs(28,"strong"),V_(29),fS(30,"number"),hd()(),Xs(31,"div",24)(32,"span"),V_(33),fS(34,"translate"),hd(),Xs(35,"strong"),V_(36),fS(37,"number"),hd()(),Xs(38,"div",24)(39,"span"),V_(40),fS(41,"translate"),Xs(42,"mat-icon",25),fS(43,"translate"),V_(44,"info"),hd()(),qT(45,pn,6,7,"strong")(46,ln,2,0,"strong",26),hd()()()(),Xs(47,"mat-card",5)(48,"div",13)(49,"mat-icon",27),V_(50,"chat"),hd(),Xs(51,"h4"),V_(52),fS(53,"translate"),hd()(),Xs(54,"div",17)(55,"div",20)(56,"span",21),V_(57),fS(58,"number"),hd(),Xs(59,"span",22),V_(60),fS(61,"translate"),hd(),qT(62,dn,5,9,"span",28),hd(),Xs(63,"div",23)(64,"div",24)(65,"span"),V_(66),fS(67,"translate"),hd(),Xs(68,"strong"),V_(69),fS(70,"number"),hd()(),KT(71,mn,11,10,"div",29,Ge),hd()()(),qT(73,gn,35,23,"mat-card",5),Xs(74,"mat-card",5)(75,"div",13)(76,"mat-icon",30),V_(77,"confirmation_number"),hd(),Xs(78,"h4"),V_(79),fS(80,"translate"),hd()(),Xs(81,"div",17)(82,"div",20)(83,"span",21),V_(84),fS(85,"number"),hd(),Xs(86,"span",22),V_(87),fS(88,"translate"),hd()(),Xs(89,"div",23)(90,"div",24)(91,"span"),V_(92),fS(93,"translate"),hd(),Xs(94,"strong"),V_(95),fS(96,"number"),hd()(),Xs(97,"div",24)(98,"span"),V_(99),fS(100,"translate"),hd(),qT(101,un,3,4,"strong")(102,_n,2,0,"strong",26),hd()()()(),Xs(103,"mat-card",5)(104,"div",13)(105,"mat-icon",31),V_(106,"event_available"),hd(),Xs(107,"h4"),V_(108),fS(109,"translate"),hd()(),Xs(110,"div",17)(111,"div",20)(112,"span",21),V_(113),fS(114,"number"),hd(),Xs(115,"span",22),V_(116),fS(117,"translate"),hd()(),Xs(118,"div",23)(119,"div",24)(120,"span"),V_(121),fS(122,"translate"),hd(),Xs(123,"strong"),V_(124),fS(125,"number"),hd()()()()(),Xs(126,"mat-card",5)(127,"div",13)(128,"mat-icon",32),V_(129,"campaign"),hd(),Xs(130,"h4"),V_(131),fS(132,"translate"),hd()(),Xs(133,"div",17)(134,"div",20)(135,"span",21),V_(136),fS(137,"number"),hd(),Xs(138,"span",22),V_(139),fS(140,"translate"),hd(),qT(141,fn,5,9,"span",28),hd(),Xs(142,"div",23)(143,"div",24)(144,"span"),V_(145),fS(146,"translate"),hd(),Xs(147,"strong"),V_(148),fS(149,"number"),hd()(),Xs(150,"div",24)(151,"span"),V_(152),fS(153,"translate"),hd(),Xs(154,"strong"),V_(155),fS(156,"number"),hd()(),Xs(157,"div",24)(158,"span"),V_(159),fS(160,"translate"),Xs(161,"mat-icon",25),fS(162,"translate"),V_(163,"info"),hd()(),Xs(164,"strong"),V_(165),fS(166,"number"),hd()()()()(),Xs(167,"mat-card",5)(168,"div",13)(169,"mat-icon",33),V_(170,"toll"),hd(),Xs(171,"h4"),V_(172),fS(173,"translate"),hd()(),Xs(174,"div",17)(175,"div",20)(176,"span",21),V_(177),fS(178,"number"),hd(),Xs(179,"span",22),V_(180),fS(181,"translate"),hd()(),qT(182,hn,9,8,"div",23),hd()(),qT(183,Cn,30,24,"mat-card",5),hd()),e&2){let t=l_();ZT(t.hasBadges?0:-1),_C(7),ky(hS(8,54,"AI Agent")),_C(2),_y("on",t.summary.ai.status.isWorkingNow)("off",!t.summary.ai.status.isWorkingNow),_C(2),Dd(" ",hS(12,56,t.summary.ai.status.isWorkingNow?"Working":"Not working")," "),_C(3),ZT(!t.summary.ai.status.isWorkingNow&&t.aiStatusReasonKey?14:t.summary.ai.status.activeChannels.length?15:-1),_C(4),ky(hS(19,58,t.summary.ai.conversationsAnsweredToday)),_C(3),ky(hS(22,60,"Conversations answered today")),_C(5),ky(hS(27,62,"Auto-resolution rate")),_C(3),Dd("",gS$1(30,64,t.summary.ai.automatedRatePercent,"1.0-1"),"%"),_C(4),ky(hS(34,67,"Handed to the team today")),_C(3),ky(hS(37,69,t.summary.ai.escalatedToTeamToday)),_C(4),Dd(" ",hS(41,71,"Customer Satisfaction")," "),_C(2),ay("matTooltip",hS(43,73,"Covers all conversations, handled by the AI or by an agent. Collected on a 1\u201310 scale and shown here out of 5.")),_C(3),ZT(t.satisfactionOutOfFive!==null?45:46),_C(7),ky(hS(53,75,"Messages")),_C(5),ky(hS(58,77,t.summary.messages.currentMonthTotal)),_C(3),ky(hS(61,79,"This month")),_C(2),ZT(t.messagesTrendPercent!==null?62:-1),_C(4),ky(hS(67,81,"Last month")),_C(3),ky(hS(70,83,t.summary.messages.previousMonthTotal)),_C(2),XT(t.
1summary.messages.channels),_C(2),ZT(t.summary.calls?73:-1),_C(6),ky(hS(80,85,"Tickets")),_C(5),ky(hS(85,87,t.summary.tickets.open)),_C(3),ky(hS(88,89,"Open tickets")),_C(5),ky(hS(93,91,"Urgent tickets")),_C(2),_y("ops-alert",t.summary.tickets.urgent>0),_C(),ky(hS(96,93,t.summary.tickets.urgent)),_C(4),ky(hS(100,95,"Oldest open ticket")),_C(2),ZT(t.summary.tickets.oldestOpenSinceUtc?101:102),_C(7),ky(hS(109,97,"Bookings")),_C(5),ky(hS(114,99,t.summary.bookings.active)),_C(3),ky(hS(117,101,"Active bookings")),_C(5),ky(hS(122,103,"Pending Bookings")),_C(3),ky(hS(125,105,t.summary.badges.pendingBookings)),_C(7),ky(hS(132,107,"Campaigns")),_C(5),ky(hS(137,109,t.summary.campaigns.last7Days)),_C(3),ky(hS(140,111,"Last 7 days")),_C(2),ZT(t.campaignsTrendPercent!==null?141:-1),_C(4),ky(hS(146,113,"Previous 7 days")),_C(3),ky(hS(149,115,t.summary.campaigns.previous7Days)),_C(4),ky(hS(153,117,"Messages sent (last 7 days)")),_C(3),ky(hS(156,119,t.summary.campaigns.sentLast7Days)),_C(4),Dd(" ",hS(160,121,"Messages delivered (last 7 days)")," "),_C(2),ay("matTooltip",hS(162,123,"Only WhatsApp confirms delivery back to us, so this can be lower than the number sent on other channels.")),_C(4),ky(hS(166,125,t.summary.campaigns.deliveredLast7Days)),_C(7),ky(hS(173,127,"Points")),_C(5),ky(gS$1(178,129,t.summary.points.balance,"1.0-2")),_C(3),ky(hS(181,132,"Points balance")),_C(2),ZT(t.summary.points.expiringSoonPoints>0?182:-1),_C(),ZT(t.summary.performance?183:-1);}}var je=(()=>{class e{constructor(){this.homeSummaryService=g(Ne),this.subscriptions=new W,this.loading=true,this.failed=false,this.summary=null;}ngOnInit(){this.fetch();}fetch(){this.loading=true,this.failed=false,this.subscriptions.add(this.homeSummaryService.getHomeSummary().subscribe({next:t=>{this.summary=t?.succeeded?t.data:null,this.failed=!t?.succeeded,this.loading=false;},error:()=>{this.summary=null,this.failed=true,this.loading=false;}}));}get satisfactionOutOfFive(){let t=this.summary?.ai;return !t||!t.satisfactionResponses||!t.satisfactionScale?null:t.satisfactionAverage/t.satisfactionScale*5}get aiStatusReasonKey(){let t=this.summary?.ai?.status?.inactiveReason;return t?{not_configured:"No AI agent is set up yet",disabled:"The AI agent is switched off",outside_active_hours:"Outside the AI agent's working hours"}[t]??"The AI agent is not replying right now":null}formatDuration(t){let d=Math.max(0,Math.floor(t||0)),c=Math.floor(d/3600),C=Math.floor(d%3600/60),bt=d%60;return c>0?`${c}h ${C}m`:C>0?`${C}m ${bt}s`:`${bt}s`}get averageActiveHoursPerDay(){return (this.summary?.performance?.averageActiveMinutesPerDay??0)/60}get messagesTrendPercent(){let t=this.summary?.messages;return !t||!t.previousMonthTotal?null:(t.currentMonthTotal-t.previousMonthTotal)/t.previousMonthTotal*100}get campaignsTrendPercent(){let t=this.summary?.campaigns;return !t||!t.previous7Days?null:(t.last7Days-t.previous7Days)/t.previous7Days*100}get hasBadges(){let t=this.summary?.badges;return t?t.unreadNotifications>0||t.unreadConversations>0||t.missedCallsToday>0||t.newOrders>0||t.pendingBookings>0||t.newTickets>0||t.pendingTasks>0:false}channelLabel(t){return {whatsapp:"WhatsApp",instagram:"Instagram",messenger:"Messenger",tiktok:"TikTok",twitter:"X (Twitter)",sms:"SMS",salla:"Salla",zid:"Zid",chatwidget:"Chat widget",voice:"Voice"}[t]??t}channelIcon(t){return {whatsapp:"whatsapp",tiktok:"tiktok",salla:"salla",instagram:"instagram",messenger:"messenger",zid:"zid",twitter:"x",sms:"sms",chatwidget:"chatwidget"}[t]??null}ngOnDestroy(){this.subscriptions.unsubscribe();}static{this.\u0275fac=function(d){return new(d||e)};}static{this.\u0275cmp=Kb({type:e,selectors:[["app-operations-snapshot"]],decls:11,vars:7,consts:[[1,"ops-snapshot"],[1,"ops-title"],[1,"ops-sub"],[1,"ops-grid"],[1,"ops-card","ops-error"],[1,"ops-card"],["type","custom","width","50%","height","14px"],[2,"height","14px"],["type","text",3,"lines"],[1,"ops-error-icon"],[1,"ops-error-text"],["type","button","mat-stroked-button","","color","primary",3,"click"],[1,"badge-strip"],[1,"ops-card__h"],[1,"ops-card__icon","ic-ai"],[1,"ai-status"],[1,"ai-dot"],[1,"ops-card__b"],[1,"ai-reason"],[1,"ai-reason","ai-reason--ok"],[1,"ops-hero"],[1,"ops-hero__v"],[1,"ops-hero__k"],[1,"ops-rows"],[1,"ops-row"],[1,"hint",3,"matTooltip"],[1,"ops-dash"],[1,"ops-card__icon","ic-msg"],[1,"ops-trend",3,"up","down"],[1,"ops-row","ops-row--channel"],[1,"ops-card__icon","ic-ticket"],[1,"ops-card__icon","ic-book"],[1,"ops-card__icon","ic-camp"],[1,"ops-card__icon","ic-points"],[1,"badge-chip"],[1,"badge-chip","badge-warn"],["routerLink","/apps/follow-up-reminders",1,"badge-chip","badge-chip--link",3,"matTooltip"],[1,"badge-n"],[1,"badge-k"],[1,"ops-note"],[1,"ops-trend"],[1,"ch-name"],[1,"ch-img",3,"src","alt"],[1,"ops-card__icon","ic-call"],[1,"ops-alert"],[1,"ops-card__icon","ic-perf"]],template:function(d,c){d&1&&(Xs(0,"div",0)(1,"div",1)(2,"h3"),V_(3),fS(4,"translate"),hd(),Xs(5,"span",2),V_(6),fS(7,"translate"),hd()(),qT(8,Ve,3,1,"div",3)(9,Ye,9,6,"mat-card",4)(10,Mn,184,134),hd()),d&2&&(_C(3),ky(hS(4,3,"Right Now")),_C(3),ky(hS(7,5,"Live figures \u2014 not affected by the selected period")),_C(2),ZT(c.loading?8:c.failed?9:c.summary?10:-1));},dependencies:[Kv,Tt,ai$1,S,Pg,Vg,b0,L0,Yx,dn$1,Vw,nk,td,tC,bC,sv,NC,XC,_D,oD,il,XD,rM,Fb,t1,A1,gS,Vs,zs,NS,ZS,EI,us,ms,HI,ZI,Dn$1,kE,Jv,go,qd,on$1,YE,OT,lA,ZM,zM,mt],styles:['@charset "UTF-8";
1.ops-snapshot[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px}.ops-snapshot[_ngcontent-%COMP%]   .ops-title[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}.ops-snapshot[_ngcontent-%COMP%]   .ops-title[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin:0;font-size:var(--font-size-lg);font-weight:800}.ops-snapshot[_ngcontent-%COMP%]   .ops-title[_ngcontent-%COMP%]   .ops-sub[_ngcontent-%COMP%]{color:#94a3b8;font-size:var(--font-size-sm);font-weight:600}.ops-snapshot[_ngcontent-%COMP%]   .badge-strip[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:10px}.ops-snapshot[_ngcontent-%COMP%]   .badge-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border-radius:var(--radius-xl);background:#f1f5f9;border:1px solid #e2e8f0}.ops-snapshot[_ngcontent-%COMP%]   .badge-chip[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;color:#64748b}.ops-snapshot[_ngcontent-%COMP%]   .badge-chip[_ngcontent-%COMP%]   .badge-n[_ngcontent-%COMP%]{font-weight:800;font-size:var(--font-size-base)}.ops-snapshot[_ngcontent-%COMP%]   .badge-chip[_ngcontent-%COMP%]   .badge-k[_ngcontent-%COMP%]{color:#64748b;font-size:var(--font-size-sm);font-weight:600}.ops-snapshot[_ngcontent-%COMP%]   .badge-chip.badge-warn[_ngcontent-%COMP%]{background:#fef2f2;border-color:#fecaca}.ops-snapshot[_ngcontent-%COMP%]   .badge-chip.badge-warn[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{color:#dc2626}.ops-snapshot[_ngcontent-%COMP%]   .badge-chip.badge-warn[_ngcontent-%COMP%]   .badge-n[_ngcontent-%COMP%]{color:#dc2626}.ops-snapshot[_ngcontent-%COMP%]   .badge-chip.badge-chip--link[_ngcontent-%COMP%]{text-decoration:none;color:inherit;cursor:pointer}.ops-snapshot[_ngcontent-%COMP%]   .badge-chip.badge-chip--link[_ngcontent-%COMP%]:hover{background:#e2e8f0}.ops-snapshot[_ngcontent-%COMP%]   .badge-chip.badge-chip--link[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--mat-sys-primary, #16a34a);outline-offset:2px}.ops-snapshot[_ngcontent-%COMP%]   .ops-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}@media(max-width:1200px){.ops-snapshot[_ngcontent-%COMP%]   .ops-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}@media(max-width:760px){.ops-snapshot[_ngcontent-%COMP%]   .ops-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}}.ops-snapshot[_ngcontent-%COMP%]   .ops-card[_ngcontent-%COMP%]{border-radius:var(--radius-xl);padding:0;overflow:hidden}.ops-snapshot[_ngcontent-%COMP%]   .ops-card__h[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;padding:14px 18px;border-bottom:1px solid #eef2f6}.ops-snapshot[_ngcontent-%COMP%]   .ops-card__h[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{margin:0;font-size:var(--font-size-base);font-weight:700}.ops-snapshot[_ngcontent-%COMP%]   .ops-card[_ngcontent-%COMP%]   .ai-status[_ngcontent-%COMP%]{margin-inline-start:auto;display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:var(--radius-xl);font-size:var(--font-size-xs);font-weight:700}.ops-snapshot[_ngcontent-%COMP%]   .ops-card[_ngcontent-%COMP%]   .ai-status[_ngcontent-%COMP%]   .ai-dot[_ngcontent-%COMP%]{width:7px;height:7px;border-radius:50%;background:currentColor}.ops-snapshot[_ngcontent-%COMP%]   .ops-card[_ngcontent-%COMP%]   .ai-status.on[_ngcontent-%COMP%]{color:#16a34a;background:#f0fdf4}.ops-snapshot[_ngcontent-%COMP%]   .ops-card[_ngcontent-%COMP%]   .ai-status.off[_ngcontent-%COMP%]{color:#b45309;background:#fffbeb}.ops-snapshot[_ngcontent-%COMP%]   .ops-card[_ngcontent-%COMP%]   .ai-reason[_ngcontent-%COMP%]{margin:0 0 12px;font-size:var(--font-size-sm);color:#b45309;font-weight:600}.ops-snapshot[_ngcontent-%COMP%]   .ops-card[_ngcontent-%COMP%]   .ai-reason--ok[_ngcontent-%COMP%]{color:#64748b}.ops-snapshot[_ngcontent-%COMP%]   .ops-card__icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.ops-snapshot[_ngcontent-%COMP%]   .ops-card__b[_ngcontent-%COMP%]{padding:16px 18px 18px}.ops-snapshot[_ngcontent-%COMP%]   .ic-ai[_ngcontent-%COMP%]{color:#7c3aed}
1.ops-snapshot[_ngcontent-%COMP%]   .ic-msg[_ngcontent-%COMP%]{color:var(--color-primary)}.ops-snapshot[_ngcontent-%COMP%]   .ic-call[_ngcontent-%COMP%]{color:#2563eb}.ops-snapshot[_ngcontent-%COMP%]   .ic-ticket[_ngcontent-%COMP%]{color:#f59e0b}.ops-snapshot[_ngcontent-%COMP%]   .ic-book[_ngcontent-%COMP%]{color:#06b6d4}.ops-snapshot[_ngcontent-%COMP%]   .ic-camp[_ngcontent-%COMP%]{color:#db2777}.ops-snapshot[_ngcontent-%COMP%]   .ic-points[_ngcontent-%COMP%]{color:#eab308}.ops-snapshot[_ngcontent-%COMP%]   .ic-perf[_ngcontent-%COMP%]{color:#0f172a}.ops-snapshot[_ngcontent-%COMP%]   .ops-hero[_ngcontent-%COMP%]{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px;margin-bottom:14px}.ops-snapshot[_ngcontent-%COMP%]   .ops-hero__v[_ngcontent-%COMP%]{font-size:var(--font-size-3xl);font-weight:800;letter-spacing:-.5px;line-height:1}.ops-snapshot[_ngcontent-%COMP%]   .ops-hero__k[_ngcontent-%COMP%]{color:#64748b;font-size:var(--font-size-sm);font-weight:600}.ops-snapshot[_ngcontent-%COMP%]   .ops-trend[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:2px;font-size:var(--font-size-sm);font-weight:700;padding:2px 8px;border-radius:var(--radius-xl)}.ops-snapshot[_ngcontent-%COMP%]   .ops-trend[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:15px;width:15px;height:15px}.ops-snapshot[_ngcontent-%COMP%]   .ops-trend.up[_ngcontent-%COMP%]{color:#16a34a;background:#f0fdf4}.ops-snapshot[_ngcontent-%COMP%]   .ops-trend.down[_ngcontent-%COMP%]{color:#dc2626;background:#fef2f2}.ops-snapshot[_ngcontent-%COMP%]   .ops-rows[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:9px}.ops-snapshot[_ngcontent-%COMP%]   .ops-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:var(--font-size-sm)}.ops-snapshot[_ngcontent-%COMP%]   .ops-row[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{color:#64748b;font-weight:600;display:inline-flex;align-items:center;gap:4px}.ops-snapshot[_ngcontent-%COMP%]   .ops-row[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{font-weight:700;white-space:nowrap}.ops-snapshot[_ngcontent-%COMP%]   .ops-row--channel[_ngcontent-%COMP%]   .ch-name[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:7px}.ops-snapshot[_ngcontent-%COMP%]   .ops-row[_ngcontent-%COMP%]   .ch-img[_ngcontent-%COMP%]{width:16px;height:16px;object-fit:contain}.ops-snapshot[_ngcontent-%COMP%]   .ops-note[_ngcontent-%COMP%]{color:#94a3b8;font-weight:600;font-size:var(--font-size-xs)}.ops-snapshot[_ngcontent-%COMP%]   .ops-dash[_ngcontent-%COMP%]{color:#94a3b8}.ops-snapshot[_ngcontent-%COMP%]   .ops-alert[_ngcontent-%COMP%]{color:#dc2626}.ops-snapshot[_ngcontent-%COMP%]   .hint[_ngcontent-%COMP%]{font-size:15px;width:15px;height:15px;color:#94a3b8;cursor:help}.ops-snapshot[_ngcontent-%COMP%]   .ops-error[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:10px;padding:26px;text-align:center}.ops-snapshot[_ngcontent-%COMP%]   .ops-error[_ngcontent-%COMP%]   .ops-error-icon[_ngcontent-%COMP%]{color:#f59e0b;font-size:30px;width:30px;height:30px}.ops-snapshot[_ngcontent-%COMP%]   .ops-error[_ngcontent-%COMP%]   .ops-error-text[_ngcontent-%COMP%]{margin:0;color:#64748b;font-size:var(--font-size-sm);max-width:460px}'],changeDetection:1});}}return e})();function vn(e,l){if(e&1&&(Xs(0,"span",3),V_(1),hd()),e&2){let t=l_();_C(),ky(t.stats.timeZoneNote);}}function bn(e,l){e&1&&cy(0,"app-skeleton-loader",4),e&2&&ay("rows",4);}function Sn(e,l){e&1&&(Xs(0,"p",5),V_(1),fS(2,"translate"),hd()),e&2&&(_C(),ky(hS(2,1,"Could not load send times.")));}function On(e,l){e&1&&(Xs(0,"p",5),V_(1),fS(2,"translate"),hd()),e&2&&(_C(),ky(hS(2,1,"No completed campaigns yet, so there is nothing to compare.")));}function Pn(e,l){if(e&1&&(Xs(0,"div",6)(1,"mat-icon"),V_(2,"schedule"),hd(),Xs(3,"span"),V_(4),fS(5,"translate"),Xs(6,"strong"),V_(7),fS(8,"translate"),hd()()()),e&2){let t=l_(2);_C(4),Dd(" ",hS(5,3,"Your campaigns do best around")," "),_C(3),Fy("",hS(8,5,t.bestDayKey)," ",t.bestHourLabel);}}function yn(e,l){e&1&&(V_(0),fS(1,"translate")),e&2&&Dd(" ",hS(1,1,"Not enough sends in any single hour yet to tell them apart.")," ");}function Tn(e,l){e&1&&(V_(0),fS(1,"translate")),e&2&&Dd(" ",hS(1,1,"No hour is clearly better than the others yet.")," ");}function wn(e,l){e&1&&(V_(0),fS(1,"translate")),e&2&&Dd(" ",hS(1,1,"Not enough data to pick a best time.")," ");}function En(e,l){if(e&1&&(Xs(0,"div",7)(1,"mat-icon"),V_(2,"info"),hd(),Xs(3,"span"),qT(4,yn,2,3)(5,Tn,2,3)(6,wn,2,3),hd()()),e&2){let t,d=l_(2);_C(4),ZT((t=d.stats.inconclusiveReason)==="not_enough_per_hour"?4:t==="too_close"?5:6);}}function kn(e,l){if(e&1&&(Xs(0,"th",10),V_(1),hd()),e&2){let t=l.$implicit;_C(),ky(t);}}function In(e,l){if(e&1&&(Xs(0,"td"),cy(1,"div",16),fS(2,"translate"),fS(3,"translate"),fS(4,"translate"),fS(5,"translate"),hd()),e&2){let t=l.$implicit,d=l_().$implicit,c=l_(2);_C(),_y("heat-0",c.heat(d,t)===0)("heat-1",c.heat(d,t)===1)("heat-2",c.heat(d,t)===2)("heat-3",c.heat(d,t)===3)("heat-4",c.heat(d,t)===4)("heat-thin",c.heat(d,t)===-1),ay("matTooltip",c.cell(d,t)?c.hasEnough(c.cell(d,t))?c.cell(d,t).sentCount+" "+hS(2,13,"sent")+" \xB7 "+c.cell(d,t).engagedRate+"% "+hS(3,15,"engaged"):c.cell(d,t).sentCount+" "+hS(4,17,"sent \u2014 too few to judge"):hS(5,19,"No campaigns sent in this hour"));}}function Bn(e,l){if(e&1&&(Xs(0,"tr")(1,"th",15),V_(2),fS(3,"translate"),hd(),KT(4,In,6,21,"td",null,QT),hd()),e&2){let t=l.$implicit,d=l_(2);_C(2),ky(hS(3,1,d.dayLabels[t])),_C(2),XT(d.hours);}}function zn(e,l){if(e&1&&(qT(0,Pn,9,7,"div",6)(1,En,7,1,"div",7),Xs(2,"div",8)(3,"table",9)(4,"thead")(5,"tr"),cy(6,"th"),KT(7,kn,2,1,"th",10,QT),hd()(),Xs(9,"tbody"),KT(10,Bn,6,3,"tr",null,QT),hd()()(),Xs(12,"div",11),cy(13,"span",12),Xs(14,"span"),V_(15),fS(16,"translate"),hd(),cy(17,"span",13),Xs(18,"span"),V_(19),fS(20,"translate"),hd(),cy(21,"span",14),Xs(22,"span"),V_(23),fS(24,"translate"),hd()()),e&2){let t=l_();ZT(t.bestDayKey?0:1),_C(7),XT(t.hours),_C(3),XT(t.days),_C(5),ky(hS(16,4,"Lower")),_C(4),ky(hS(20,6,"Higher")),_C(4),ky(hS(24,8,"Too few to judge"));}}var Ue=(()=>{class e{constructor(){this.promotionsService=g(R$1),this.subscriptions=new W,this.loading=true,this.failed=false,this.stats=null,this.days=[1,2,3,4,5,6,7],this.dayLabels={1:"Sunday",2:"Monday",3:"Tuesday",4:"Wednesday",5:"Thursday",6:"Friday",7:"Saturday"},this.hours=[8,9,10,11,12,13,14,15,16,17,18,19,20,21],this.byKey=new Map;}static{this.MIN_RECIPIENTS=50;}ngOnInit(){this.fetch();}fetch(){this.loading=true,this.failed=false,this.subscriptions.add(this.promotionsService.getCampaignSen
1dTimes().subscribe({next:t=>{this.loading=false,t?.succeeded&&t.data?(this.stats=t.data,this.byKey=new Map((this.stats.cells??[]).map(d=>[`${d.dayOfWeek}:${d.hourOfDay}`,d]))):this.failed=true;},error:()=>{this.loading=false,this.failed=true;}}));}cell(t,d){return this.byKey.get(`${t}:${d}`)}hasEnough(t){return !!t&&t.sentCount>=e.MIN_RECIPIENTS}heat(t,d){let c=this.cell(t,d);if(!c||c.sentCount===0)return 0;if(!this.hasEnough(c))return  -1;let C=c.engagedRate;return C>=30?4:C>=20?3:C>=10?2:1}get bestDayKey(){let t=this.stats?.best;return t?this.dayLabels[t.dayOfWeek]:null}get bestHourLabel(){let t=this.stats?.best;return t?`${this.pad(t.hourOfDay)}:00`:null}pad(t){return t<10?`0${t}`:`${t}`}ngOnDestroy(){this.subscriptions.unsubscribe();}static{this.\u0275fac=function(d){return new(d||e)};}static{this.\u0275cmp=Kb({type:e,selectors:[["app-send-times"]],decls:15,vars:8,consts:[[1,"cardWithShadow"],[1,"d-flex","align-items-center","justify-content-between","m-b-16"],[1,"mat-subtitle-1","f-w-600","m-0"],[1,"f-s-12","text-muted"],[3,"rows"],[1,"text-muted","m-0"],[1,"advice","advice--found"],[1,"advice","advice--none"],[1,"heat-scroll"],[1,"heat"],[1,"f-s-12"],[1,"legend","f-s-12","text-muted"],[1,"legend__box","heat-1"],[1,"legend__box","heat-4"],[1,"legend__box","heat-thin"],[1,"f-s-12","day"],[1,"heat__cell",3,"matTooltip"]],template:function(d,c){d&1&&(Xs(0,"mat-card",0)(1,"mat-card-content")(2,"div",1)(3,"div")(4,"h4",2),V_(5),fS(6,"translate"),hd(),Xs(7,"span",3),V_(8),fS(9,"translate"),hd()(),qT(10,vn,2,1,"span",3),hd(),qT(11,bn,1,1,"app-skeleton-loader",4)(12,Sn,3,3,"p",5)(13,On,3,3,"p",5)(14,zn,25,10),hd()()),d&2&&(_C(5),ky(hS(6,4,"Best Send Times")),_C(3),ky(hS(9,6,"Based on all your completed campaigns")),_C(2),ZT(c.stats?10:-1),_C(),ZT(c.loading?11:c.failed?12:!c.stats||c.stats.cells.length===0?13:14));},dependencies:[Kv,Tt,S,Pg,Vg,b0,L0,Yx,dn$1,Vw,nk,td,tC,bC,sv,NC,XC,_D,oD,lD,il,XD,rM,Fb,t1,A1,gS,Vs,NS,ZS,EI,us,ms,HI,ZI,Dn$1,kE,Jv,go,qd,on$1,YE,OT,lA,mt],styles:[".advice[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:10px 14px;border-radius:8px;margin-bottom:16px;font-size:.875rem}.advice[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.advice--found[_ngcontent-%COMP%]{background:#13deb91f}.advice--none[_ngcontent-%COMP%]{background:#5d87ff1a}.heat-scroll[_ngcontent-%COMP%]{overflow-x:auto}.heat[_ngcontent-%COMP%]{border-collapse:separate;border-spacing:3px}.heat[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{font-weight:500;text-align:center}.heat[_ngcontent-%COMP%]   th.day[_ngcontent-%COMP%]{text-align:start;padding-inline-end:8px;white-space:nowrap}.heat__cell[_ngcontent-%COMP%]{width:26px;height:22px;border-radius:4px;cursor:default}.heat-0[_ngcontent-%COMP%]{background:#0000000d}.heat-1[_ngcontent-%COMP%]{background:#5d87ff40}.heat-2[_ngcontent-%COMP%]{background:#5d87ff73}.heat-3[_ngcontent-%COMP%]{background:#5d87ffb3}.heat-4[_ngcontent-%COMP%]{background:#5d87fff2}.heat-thin[_ngcontent-%COMP%]{background:repeating-linear-gradient(45deg,#0000000d,#0000000d 3px,#0000001f 3px 6px)}.legend[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;margin-top:12px;flex-wrap:wrap}.legend__box[_ngcontent-%COMP%]{width:14px;height:14px;border-radius:3px;display:inline-block}.legend[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:not(.legend__box){margin-inline-end:10px}"],changeDetection:1});}}return e})();var Dn=(e,l)=>l.templateId;function Rn(e,l){if(e&1&&(Xs(0,"div",4),V_(1),hd()),e&2){let t=l_();_C(),ky(t.periodLabel);}}function Fn(e,l){if(e&1&&V_(0),e&2){let t=l_().$implicit;Dd(" ",t.name," ");}}function An(e,l){e&1&&(Xs(0,"span",12),V_(1),fS(2,"translate"),hd()),e&2&&(_C(),ky(hS(2,1,"Deleted template")));}function Ln(e,l){if(e&1&&(Xs(0,"div",6)(1,"div",9),V_(2),hd(),Xs(3,"div",10)(4,"div",11),fS(5,"translate"),qT(6,Fn,1,1)(7,An,3,3,"span",12),hd(),cy(8,"mat-progress-bar",13),hd(),Xs(9,"div",14),V_(10),fS(11,"number"),hd()()),e&2){let t=l.$implicit,d=l.$index,c=l_();_C(),_y("template-rank--top",d<3),_C(),Dd(" ",d+1," "),_C(2),ay("title",t.name||hS(5,7,"Deleted template")),_C(2),ZT(t.name?6:7),_C(2),ay("value",c.barWidth(t.count)),_C(2),Dd(" ",hS(11,9,t.count)," ");}}function Nn(e,l){if(e&1&&(Xs(0,"div",7)(1,"mat-icon",15),V_(2,"description"),hd(),Xs(3,"p",16),V_(4),fS(5,"translate"),hd()()),e&2){let t=l_();_C(4),ky(hS(5,1,t.periodLabel?"No templates sent in this period":"No templates sent yet"));}}function $n(e,l){if(e&1&&(Xs(0,"div",8)(1,"span",17),V_(2),fS(3,"translate"),hd(),Xs(4,"span",18),V_(5),fS(6,"number"),hd()()),e&2){let t=l_();_C(2),ky(hS(3,2,"Total templates sent")),_C(3),ky(hS(6,4,t.periodTotal));}}var He=(()=>{class e{constructor(){this.counters=[],this.barMax=1;}ngOnChanges(t){t.templateCount&&(this.counters=this.templateCount??[],this.barMax=this.counters.reduce((d,c)=>Math.max(d,c.count),1));}barWidth(t){return t/this.barMax*100}static{this.\u0275fac=function(d){return new(d||e)};}static{this.\u0275cmp=Kb({type:e,selectors:[["app-most-sent-templates"]],inputs:{templateCount:"templateCount",periodTotal:"periodTotal",periodLabel:"periodLabel"},features:[Dl],decls:13,vars:6,consts:[[1,"d-card"],[1,"d-card-header"],[1,"d-card-title"],[1,"bg-light-primary","text-primary","shadow-none","icon-27"],[1,"d-card-sub"],[1,"template-list"],[1,"template-item"],[1,"text-center","text-muted","p-24"],[1,"template-total"],[1,"template-rank"],[1,"template-info"],[1,"template-name",3,"title"],[1,"template-name--missing"],["mode","determinate",1,"template-bar",3,"value"],[1,"template-count"],[2,"font-size","40px","width","40px","height","40px","opacity","0.3"],[1,"m-t-8"],[1,"template-total-label"],[1,"template-total-value"]],template:function(d,c){d&1&&(Xs(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-icon",3),V_(4,"leaderboard"),hd(),V_(5),fS(6,"translate"),hd(),qT(7,Rn,2,1,"div",4),hd(),Xs(8,"div",5),KT(9,Ln,12,11,"div",6,Dn),qT(11,Nn,6,3,"div",7),hd(),qT(12,$n,7,
16,"div",8),hd()),d&2&&(_C(5),Dd(" ",hS(6,4,"Most sent templates")," "),_C(2),ZT(c.periodLabel?7:-1),_C(2),XT(c.counters),_C(2),ZT(c.counters.length===0?11:-1),_C(),ZT(c.periodTotal!==void 0&&c.periodTotal!==null&&c.counters.length>0?12:-1));},dependencies:[Kv,Tt,Pg,Vg,b0,L0,Yx,dn$1,Vw,nk,td,tC,bC,sv,NC,XC,_D,il,XD,rM,Fb,t1,A1,gS,Vs,NS,ZS,EI,us,ms,HI,ZI,XI,Dn$1,kE,Jv,go,qd,YE,OT,lA,ZM,mt],styles:['@charset "UTF-8";.template-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.template-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px;padding:12px 14px;border-radius:var(--radius-lg);background:#00000004;border:1px solid transparent;transition:all .2s ease}.template-item[_ngcontent-%COMP%]:hover{background:#1f9d4d0a;border-color:#1f9d4d14}.template-rank[_ngcontent-%COMP%]{width:30px;height:30px;border-radius:9px;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;flex-shrink:0;background:#0000000d;color:#00000073}.template-rank--top[_ngcontent-%COMP%]{background:linear-gradient(135deg,#1f9d4d,#19e3c2);color:#fff}.template-info[_ngcontent-%COMP%]{flex:1;min-width:0}
1.template-name[_ngcontent-%COMP%]{font-weight:600;font-size:var(--font-size-sm);margin-bottom:6px;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.template-bar[_ngcontent-%COMP%]{border-radius:var(--radius-card)!important;height:6px!important}.template-count[_ngcontent-%COMP%]{font-weight:700;font-size:var(--font-size-sm);color:var(--color-primary);padding:4px 12px;border-radius:var(--radius-card);background:#5d87ff14;white-space:nowrap;flex-shrink:0}.template-list[_ngcontent-%COMP%]{max-height:340px;overflow-y:auto;padding-inline-end:4px}.template-list[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.template-list[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#00000026;border-radius:3px}.template-name--missing[_ngcontent-%COMP%]{font-style:italic;color:var(--color-text-muted)}.template-total[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;padding-top:14px;border-top:1px solid var(--color-border)}.template-total-label[_ngcontent-%COMP%]{font-size:var(--font-size-sm);font-weight:600;color:var(--color-text-muted)}.template-total-value[_ngcontent-%COMP%]{font-size:1.125rem;font-weight:700;color:var(--color-primary)}.dark-theme[_nghost-%COMP%]   .template-list[_ngcontent-%COMP%]::-webkit-scrollbar-thumb, .dark-theme   [_nghost-%COMP%]   .template-list[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#fff3}.dark-theme[_nghost-%COMP%]   .template-item[_ngcontent-%COMP%], .dark-theme   [_nghost-%COMP%]   .template-item[_ngcontent-%COMP%]{background:#ffffff08}'],changeDetection:1});}}return e})();var jn=()=>["Pick the period at the top; everything below follows it.","Promotion statistics count completed campaigns only, so a campaign still sending is not included.","All campaign percentages are of messages sent, not of the group size."],Un=()=>[1,2,3,4],Hn=()=>[],Wn=(e,l)=>l.key;function Gn(e,l){e&1&&(Xs(0,"mat-card",11),cy(1,"app-skeleton-loader",15)(2,"div",16)(3,"app-skeleton-loader",17),hd());}function Kn(e,l){e&1&&(Xs(0,"div",4),KT(1,Gn,4,0,"mat-card",11,QT),hd(),Xs(3,"mat-card",5),cy(4,"app-skeleton-loader",12)(5,"div",13)(6,"app-skeleton-loader",14),hd()),e&2&&(_C(),XT(tS(1,Un)),_C(5),ay("lines",5));}function Vn(e,l){if(e&1&&(Xs(0,"div",20),V_(1),fS(2,"number"),hd()),e&2){let t=l_(2);_C(),Dd("",gS$1(2,1,t.summary.deliveryRate,"1.0-1"),"%");}}function Yn(e,l){e&1&&(Xs(0,"div",20),V_(1,"\u2014"),hd());}function Zn(e,l){if(e&1&&(Xs(0,"div",4)(1,"mat-card",18)(2,"div",19),V_(3),fS(4,"translate"),hd(),Xs(5,"div",20),V_(6),fS(7,"number"),hd()(),Xs(8,"mat-card",21)(9,"div",19),V_(10),fS(11,"translate"),hd(),Xs(12,"div",20),V_(13),fS(14,"number"),hd()(),Xs(15,"mat-card",22)(16,"div",19),V_(17),fS(18,"translate"),hd(),Xs(19,"div",20),V_(20),fS(21,"number"),hd()(),Xs(22,"mat-card",23)(23,"div",19),V_(24),fS(25,"translate"),hd(),qT(26,Vn,3,4,"div",20)(27,Yn,2,0,"div",20),hd()()),e&2){let t=l_();_C(3),ky(hS(4,8,"Messages Sent")),_C(3),ky(hS(7,10,t.kpiSent)),_C(4),ky(hS(11,12,"Messages Received")),_C(3),ky(hS(14,14,t.kpiReceived)),_C(4),ky(hS(18,16,"Active Customers")),_C(3),ky(hS(21,18,t.kpiCustomers)),_C(4),ky(hS(25,20,"Delivery Rate")),_C(2),ZT(t.summary&&t.summary.deliveryRate!==null&&t.summary.deliveryRate!==void 0?26:27);}}function Xn(e,l){if(e&1&&(Xs(0,"div",27)(1,"div",28),cy(2,"img",29),hd(),Xs(3,"div",30)(4,"div",31)(5,"span",32),V_(6),fS(7,"translate"),hd(),Xs(8,"span",33),V_(9),fS(10,"number"),hd()(),Xs(11,"div",34)(12,"div",35),cy(13,"div",36),hd(),Xs(14,"span",37),V_(15),fS(16,"number"),hd()()()()),e&2){let t=l.$implicit,d=l_(2);_C(),ay("ngClass",d.channelClass(t.key)+"-bg"),_C(),ay("src","/assets/images/icons/"+d.getChannelIcon(t.key)+".png",Vg$1)("alt",t.key),_C(4),ky(hS(7,9,d.channelLabelKey(t.key))),_C(3),ky(hS(10,11,t.count)),_C(4),Ty("width",t.percentage,"%"),ay("ngClass",d.channelClass(t.key)),_C(2),Dd("",gS$1(16,13,t.percentage,"1.0-0"),"%");}}function qn(e,l){if(e&1&&(Xs(0,"mat-card",5)(1,"div",24)(2,"h3",25),V_(3),fS(4,"translate"),hd()(),Xs(5,"div",26),KT(6,Xn,17,16,"div",27,Wn),hd()()),e&2){let t=l_();_C(3),ky(hS(4,1,"Channel Distribution")),_C(3),XT(t.summary.channels);}}function Jn(e,l){if(e&1&&cy(0,"app-response-time-indicator",6),e&2){let t=l_();ay("data",t.responseTimeData??tS(3,Hn))("overall",t.responseTimeOverall)("showMonthSelector",false);}}function Qn(e,l){e&1&&(Xs(0,"div",45),V_(1,"\u2014"),hd());}function ti(e,l){if(e&1&&(Xs(0,"div",51),V_(1),fS(2,"number"),fS(3,"number"),hd()),e&2){let t=l_(2);Ty("width",t.funnel.deliveredRate,"%"),_C(),Fy("",hS(2,4,t.funnel.delivered)," \xB7 ",gS$1(3,6,t.funnel.deliveredRate,"1.0-0"),"%");}}function ei(e,l){e&1&&(Xs(0,"div",45),V_(1,"\u2014"),hd());}function ni(e,l){if(e&1&&(Xs(0,"div",52),V_(1),fS(2,"number"),fS(3,"number"),hd()),e&2){let t=l_(2);Ty("width",t.funnel.readRate,"%"),_C(),Fy("",hS(2,4,t.funnel.read)," \xB7 ",gS$1(3,6,t.funnel.readRate,"1.0-0"),"%");}}function ii(e,l){e&1&&(Xs(0,"div",45),V_(1,"\u2014"),hd());}function ai(e,l){if(e&1&&(Xs(0,"div",53),V_(1),fS(2,"number"),fS(3,"number"),hd()),e&2){let t=l_(2);Ty("width",t.funnel.engagedRate,"%"),_C(),Fy("",hS(2,4,t.funnel.engaged)," \xB7 ",gS$1(3,6,t.funnel.engagedRate,"1.0-0"),"%");}}function oi(e,l){e&1&&(Xs(0,"p",49),V_(1),fS(2,"translate"),hd()),e&2&&(_C(),ky(hS(2,1,"Delivery, read and reply figures are only kept for 90 days, so they can no longer be shown for this month. Messages sent is unaffected.")));}function ri(e,l){e&1&&(Xs(0,"p",50),V_(1),fS(2,"translate"),hd()),e&2&&(_C(),ky(hS(2,1,"All percentages are of messages sent.")));}function si(e,l){if(e&1&&(Xs(0,"mat-card",7)(1,"div",38)(2,"h3"),V_(3),fS(4,"translate"),hd(),Xs(5,"span",39),V_(6),fS(7,"translate"),hd()(),Xs(8,"div",40)(9,"div",41)(10,"span",42),V_(11),fS(12,"translate"),Xs(13,"mat-icon",43),fS(14,"translate"),V_(15,"info"),hd()(),Xs(16,"div",44),V_(17),fS(18,"number"),hd()(),Xs(19,"div",41)(20,"span",42),V_(21),fS(22,"translate"),Xs(23,"mat-icon",43),fS(24,"translate"),V_(25,"info"),hd()(),qT(26,Qn,2,0,"div",45)(27,ti,4,9,"div",46),hd(),Xs(28,"div",41)(29,"span",42),V_(30),fS(31,"translate"),Xs(32,"mat-icon",43),fS(33,"translate"),V_(34,"info"),hd()(),qT(35,ei,2,0,"div",45)(36,ni,4,9,"div",47),hd(),Xs(37,"div",41)(38,"span",42),V_(39),fS(40,"translate"),Xs(41,"mat-icon",43),fS(42,"translate"),V_(43,"info"),hd()(),qT(44,ii,2,0,"div",45)(45,ai,4,9,"div",48),hd(),qT(46,oi,3,3,"p",49)(47,ri,3,3,"p",50),hd()()),e&2){let t=l_();_C(3),ky(hS(4,18,"Promotion Statistics")),_C(3),Fy("",t.periodLabel," \xB7 ",hS(7,20,"Completed campaigns only")),_C(5),Dd("",hS(12,22,"Sent")," "),_C(2),ay("matTooltip",hS(14,24,"Campaign messages successfully sent in this period.")),_C(3),Ty("width",100,"%"),_C(),ky(hS(18,26,t.funnel.sent)),_C(4),Dd("",hS(22,28,"Delivered")," "),_C(2),ay("matTooltip",hS(24,30,"Messages that reached the customer's device.")),_C(3),ZT(t.funnel.messageEvidenceExpired?26:27),_C(4),Dd("",hS(31,32,"Read")," "),_C(2),ay("matTooltip",hS(33,34,"Messages the customer opened. This can undercount, because some customers turn off read receipts.")),_C(3),ZT(t.funnel.messageEvidenceExpired?35:36),_C(4),Dd("",hS(40,36,"Engaged")," "),_C(2),ay("matTooltip",hS(42,38,"Campaign messages that got a reply within a day of being sent. Counts messages, not people \u2014 one customer replying to two campaigns counts twice. It can exceed Read, because a customer with read receipts off still shows as unread when they reply.")),_C(3),ZT(t.funnel.messageEvidenceExpired?44:45),_C(2),ZT(t.funnel.messageEvidenceExpired?46:47);}}
1function pi(e,l){if(e&1){let t=o_();Xs(0,"mat-card",7)(1,"div",38)(2,"h3"),V_(3),fS(4,"translate"),hd()(),Xs(5,"div",54)(6,"mat-icon",55),V_(7,"warning"),hd(),Xs(8,"p",56),V_(9),fS(10,"translate"),hd(),Xs(11,"button",57),my("click",function(){Pp(t);let c=l_();return Lp(c.retryStatistics())}),V_(12),fS(13,"translate"),hd()()();}e&2&&(_C(3),ky(hS(4,3,"Promotion Statistics")),_C(6),ky(hS(10,5,"These statistics couldn't be loaded. This is not a zero result \u2014 the figures are unavailable right now.")),_C(3),Dd(" ",hS(13,7,"Retry")," "));}function li(e,l){if(e&1&&cy(0,"app-most-sent-templates",9),e&2){let t=l_();ay("templateCount",t.summary.topTemplates)("periodTotal",t.summary.totalTemplatesSent)("periodLabel",t.periodLabel);}}function di(e,l){if(e&1&&cy(0,"app-templates-limit",10),e&2){let t=l_();ay("sent24h",t.dashboardNumbers.mainCounts&&t.dashboardNumbers.mainCounts.templatesSent24H||0)("dailyLimit",t.dashboardNumbers.mainCounts&&t.dashboardNumbers.mainCounts.templatesDailyLimit||0);}}function ci(e,l){if(e&1&&(Xs(0,"mat-card",7)(1,"div",38)(2,"h3"),V_(3),fS(4,"translate"),hd()(),Xs(5,"div",58)(6,"div",59)(7,"div",60),V_(8),fS(9,"number"),hd(),Xs(10,"div",61),V_(11),fS(12,"translate"),hd()(),Xs(13,"div",59)(14,"div",60),V_(15),fS(16,"number"),hd(),Xs(17,"div",61),V_(18),fS(19,"translate"),hd()()()()),e&2){let t=l_();_C(3),ky(hS(4,5,"AI Assistant Usage")),_C(5),ky(hS(9,7,t.summary.aiUsage.repliesGenerated)),_C(3),ky(hS(12,9,"Replies Generated")),_C(4),Dd("",gS$1(16,11,t.summary.aiUsage.acceptanceRate,"1.0-0"),"%"),_C(3),ky(hS(19,14,"Acceptance Rate"));}}function mi(e,l){e&1&&(Xs(0,"div",62),V_(1),fS(2,"translate"),hd(),cy(3,"app-feedback-analytics"),Xs(4,"div",62),V_(5),fS(6,"translate"),hd(),cy(7,"app-user-performance",63)),e&2&&(_C(),ky(hS(2,3,"Customer Satisfaction")),_C(4),ky(hS(6,5,"Team Performance")),_C(2),ay("showLeaderboard",false));}var _a=(()=>{class e{constructor(){this.messagesService=g(R),this.authService=g(Ao),this.loadingService=g(P),this.translate=g(O),this.subscriptions=new W,this.initialLoading=true,this.firstLoadDone=false,this.selectedMonth="",this.dashboardNumbers=null,this.summary=null,this.funnel=null,this.summaryFailed=false,this.funnelFailed=false,this.periodLabel="",this.responseTimeData=null,this.responseTimeOverall=null,this.canSeeResponseTime=false,this.canSeeTeamStats=false;}ngOnInit(){this.canSeeResponseTime=this.authService.hasPermission("Read_Users"),this.canSeeTeamStats=this.authService.hasPermission("Manage_Users"),this.selectedMonth=this.getDefaultMonth(),this.loadingService.beginSuppress(),this.subscriptions.add(this.messagesService.getDashboard().pipe(Xr(()=>this.markInitialLoaded())).subscribe(t=>this.dashboardNumbers=t)),this.fetchForMonth();}markInitialLoaded(){this.firstLoadDone||(this.firstLoadDone=true,this.initialLoading=false,this.loadingService.endSuppress());}onMonthChange(t){this.selectedMonth=t,this.fetchForMonth();}retryStatistics(){this.fetchForMonth();}fetchForMonth(){let{year:t,month:d}=this.parseMonth(this.selectedMonth);this.periodLabel=ue.buildOption(d,t,this.translate).label,this.summaryFailed=false,this.subscriptions.add(this.messagesService.getClientStatisticsSummary(t,d).pipe(Xr(()=>this.markInitialLoaded())).subscribe({next:c=>{this.summary=c?.succeeded?c.data:null,this.summaryFailed=!c?.succeeded;},error:()=>{this.summary=null,this.summaryFailed=true;}})),this.funnelFailed=false,this.subscriptions.add(this.messagesService.getClientCampaignFunnel(t,d).subscribe({next:c=>{this.funnel=c?.succeeded?c.data:null,this.funnelFailed=!c?.succeeded;},error:()=>{this.funnel=null,this.funnelFailed=true;}})),this.fetchResponseTime(t,d);}fetchResponseTime(t,d){if(!this.canSeeResponseTime){this.responseTimeData=null,this.responseTimeOverall=null;return}this.subscriptions.add(this.messagesService.getResponseTimeIndicator(null,d,t).subscribe({next:c=>{let C=c?.data?.byDate;c?.succeeded&&Array.isArray(C)&&C.length>0?(this.responseTimeData=C,this.responseTimeOverall=c.data.overall??null):(this.responseTimeData=null,this.responseTimeOverall=null);},error:()=>{this.responseTimeData=null,this.responseTimeOverall=null;}}
1));}get kpiSent(){return this.summary?.totalSent??this.dashboardNumbers?.mainCounts?.totalSent??0}get kpiReceived(){return this.summary?.totalReceived??this.dashboardNumbers?.mainCounts?.totalReceived??0}get kpiCustomers(){return this.summary?.activeCustomers??this.dashboardNumbers?.mainCounts?.customersCount??0}channelLabelKey(t){return {whatsapp:"WhatsApp",instagram:"Instagram",messenger:"Messenger",tiktok:"TikTok",salla:"Salla",zid:"Zid",x:"X (Twitter)"}[t]??t}channelClass(t){return "ch-"+t}getDefaultMonth(){let t=new Date;return `${t.getFullYear()}-${t.getMonth()+1}`}parseMonth(t){let[d,c]=t.split("-");return {year:parseInt(d,10),month:parseInt(c,10)}}ngOnDestroy(){this.subscriptions.unsubscribe();}getChannelIcon(t){return t&&{whatsapp:"whatsapp",tiktok:"tiktok",salla:"salla",instagram:"instagram",messenger:"messenger",zid:"zid",x:"x"}[t]||"default-channel"}static{this.\u0275fac=function(d){return new(d||e)};}static{this.\u0275cmp=Kb({type:e,selectors:[["app-statistics"]],decls:25,vars:18,consts:[["helpKey","statistics","intro","Your account's performance in one place \u2014 messaging, campaigns, AI and team, over the period you choose.",3,"steps"],[1,"stats-page"],[1,"stats-header"],[3,"selectedChange","count","selected"],[1,"kpi-grid"],[1,"stats-card"],[3,"data","overall","showMonthSelector"],[1,"card"],[1,"two-col"],[3,"templateCount","periodTotal","periodLabel"],[3,"sent24h","dailyLimit"],[1,"kpi"],["type","custom","width","40%","height","18px"],[2,"height","16px"],["type","text",3,"lines"],["type","custom","width","55%","height","14px"],[2,"height","12px"],["type","custom","width","70%","height","30px"],[1,"kpi","kpi-green"],[1,"kpi-label"],[1,"kpi-value"],[1,"kpi","kpi-blue"],[1,"kpi","kpi-cyan"],[1,"kpi","kpi-violet"],[1,"stats-card__header"],[1,"stats-card__title"],[1,"stats-card__body"],[1,"channel-row"],[1,"channel-row__icon-wrapper",3,"ngClass"],[1,"channel-row__image",3,"src","alt"],[1,"channel-row__content"],[1,"channel-row__info"],[1,"channel-row__name"],[1,"channel-row__count"],[1,"channel-row__progress-container"],[1,"channel-row__track"],[1,"channel-row__fill",3,"ngClass"],[1,"channel-row__percentage"],[1,"card-h"],[1,"card-sub"],[1,"card-b","funnel"],[1,"fstep"],[1,"lbl"],[1,"hint",3,"matTooltip"],[1,"fbar","f1"],[1,"fbar","fbar--unavailable"],[1,"fbar","f2",3,"width"],[1,"fbar","f3",3,"width"],[1,"fbar","f4",3,"width"],[1,"funnel-note","funnel-note--unavailable"],[1,"funnel-note"],[1,"fbar","f2"],[1,"fbar","f3"],[1,"fbar","f4"],[1,"card-b","stats-error"],[1,"stats-error-icon"],[1,"stats-error-text"],["type","button","mat-stroked-button","","color","primary",3,"click"],[1,"card-b","ai-grid"],[1,"ai-tile"],[1,"ai-v"],[1,"ai-k"],[1,"section-title"],[3,"showLeaderboard"]],template:function(d,c){d&1&&(cy(0,"app-page-help",0),Xs(1,"div",1)(2,"div",2)(3,"div")(4,"h1"),V_(5),fS(6,"translate"),hd(),Xs(7,"p"),V_(8),fS(9,"translate"),hd()(),Xs(10,"app-month-selector",3),my("selectedChange",function(bt){return c.onMonthChange(bt)}),hd()(),qT(11,Kn,7,2)(12,Zn,28,22,"div",4),cy(13,"app-operations-snapshot")(14,"app-message-counts-monthly")(15,"app-send-times"),qT(16,qn,8,3,"mat-card",5),qT(17,Jn,1,4,"app-response-time-indicator",6),qT(18,si,48,40,"mat-card",7)(19,pi,14,9,"mat-card",7),Xs(20,"div",8),qT(21,li,1,3,"app-most-sent-templates",9),qT(22,di,1,2,"app-templates-limit",10),hd(),qT(23,ci,20,16,"mat-card",7),qT(24,mi,8,7),hd()),d&2&&(ay("steps",tS(17,jn)),_C(5),ky(hS(6,13,"Statistics")),_C(3),ky(hS(9,15,"All your account performance metrics in one place")),_C(2),ay("count",3)("selected",c.selectedMonth),_C(),ZT(c.initialLoading?11:12),_C(5),ZT(c.summary&&c.summary.channels?.length?16:-1),_C(),ZT(c.canSeeResponseTime&&c.responseTimeData?.length?17:-1),_C(),ZT(c.funnel?18:c.funnelFailed?19:-1),_C(3),ZT(c.summary?21:-1),_C(),ZT(c.dashboardNumbers?22:-1),_C(),ZT(c.summary?.aiUsage?23:-1),_C(),ZT(c.canSeeTeamStats?24:-1));},dependencies:[ce,Kv,xM,ea,Tt,je,Ue,Dt,Qe$1,ge,He,Li,Cn$1,ue,S,Pg,Vg,b0,L0,Yx,dn$1,Vw,nk,td,tC,bC,sv,NC,XC,_D,oD,il,XD,rM,Fb,t1,A1,gS,Vs,zs,NS,ZS,EI,us,ms,HI,ZI,Dn$1,kE,Jv,go,qd,on$1,YE,OT,lA,ZM,mt],styles:['@charset "UTF-8";.stats-page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px;padding:4px}.stats-page[_ngcontent-%COMP%]   .stats-header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}.stats-page[_ngcontent-%COMP%]   .stats-header[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:var(--font-size-2xl);font-weight:800;margin:0}.stats-page[_ngcontent-%COMP%]   .stats-header[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface-variant, #64748b);margin:4px 0 0;font-size:var(--font-size-sm)}.stats-page[_ngcontent-%COMP%]   .stats-header[_ngcontent-%COMP%]   .month-select[_ngcontent-%COMP%]{width:200
1px}.stats-page[_ngcontent-%COMP%]   .kpi-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}@media(max-width:900px){.stats-page[_ngcontent-%COMP%]   .kpi-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}.stats-page[_ngcontent-%COMP%]   .kpi[_ngcontent-%COMP%]{padding:18px;border-radius:var(--radius-xl)}.stats-page[_ngcontent-%COMP%]   .kpi[_ngcontent-%COMP%]   .kpi-label[_ngcontent-%COMP%]{color:#64748b;font-size:var(--font-size-sm);font-weight:600}.stats-page[_ngcontent-%COMP%]   .kpi[_ngcontent-%COMP%]   .kpi-value[_ngcontent-%COMP%]{font-size:var(--font-size-3xl);font-weight:800;margin-top:8px;letter-spacing:-.5px}.stats-page[_ngcontent-%COMP%]   .kpi[_ngcontent-%COMP%]{border-inline-start:4px solid transparent}.stats-page[_ngcontent-%COMP%]   .kpi-green[_ngcontent-%COMP%]{border-inline-start-color:var(--color-primary)}.stats-page[_ngcontent-%COMP%]   .kpi-blue[_ngcontent-%COMP%]{border-inline-start-color:#2563eb}.stats-page[_ngcontent-%COMP%]   .kpi-cyan[_ngcontent-%COMP%]{border-inline-start-color:#06b6d4}.stats-page[_ngcontent-%COMP%]   .kpi-violet[_ngcontent-%COMP%]{border-inline-start-color:#7c3aed}.stats-page[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]{border-radius:var(--radius-xl)}.stats-page[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .card-h[_ngcontent-%COMP%]{padding:16px 20px;border-bottom:1px solid #eef2f6}.stats-page[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .card-h[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin:0;font-size:var(--font-size-lg);font-weight:700}.stats-page[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .card-b[_ngcontent-%COMP%]{padding:20px}.stats-page[_ngcontent-%COMP%]   .section-title[_ngcontent-%COMP%]{font-size:var(--font-size-sm);font-weight:800;color:#94a3b8;letter-spacing:.3px;margin:6px 2px -4px}.stats-page[_ngcontent-%COMP%]   .two-col[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:20px}@media(max-width:900px){.stats-page[_ngcontent-%COMP%]   .two-col[_ngcontent-%COMP%]{grid-template-columns:1fr}}.stats-page[_ngcontent-%COMP%]   .prow[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;margin-bottom:14px}.stats-page[_ngcontent-%COMP%]   .prow[_ngcontent-%COMP%]   .prow-t[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:var(--font-size-sm);font-weight:600}.stats-page[_ngcontent-%COMP%]   .prow[_ngcontent-%COMP%]   .muted[_ngcontent-%COMP%]{color:#64748b}.stats-page[_ngcontent-%COMP%]   .prow[_ngcontent-%COMP%]   .track[_ngcontent-%COMP%]{height:9px;background:#eef2f6;border-radius:var(--radius-card);overflow:hidden}.stats-page[_ngcontent-%COMP%]   .prow[_ngcontent-%COMP%]   .fill[_ngcontent-%COMP%]{height:100%;border-radius:var(--radius-card);background:var(--color-primary)}.stats-page[_ngcontent-%COMP%]   .prow[_ngcontent-%COMP%]   .ch-whatsapp[_ngcontent-%COMP%]{background:var(--color-primary)}.stats-page[_ngcontent-%COMP%]   .prow[_ngcontent-%COMP%]   .ch-instagram[_ngcontent-%COMP%]{background:#db2777}.stats-page[_ngcontent-%COMP%]   .prow[_ngcontent-%COMP%]   .ch-messenger[_ngcontent-%COMP%]{background:#2563eb}.stats-page[_ngcontent-%COMP%]   .prow[_ngcontent-%COMP%]   .ch-tiktok[_ngcontent-%COMP%]{background:#06b6d4}.stats-page[_ngcontent-%COMP%]   .prow[_ngcontent-%COMP%]   .ch-salla[_ngcontent-%COMP%], .stats-page[_ngcontent-%COMP%]   .prow[_ngcontent-%COMP%]   .ch-zid[_ngcontent-%COMP%]{background:#f59e0b}.stats-page[_ngcontent-%COMP%]   .prow[_ngcontent-%COMP%]   .ch-x[_ngcontent-%COMP%]{background:#0f172a}.stats-page[_ngcontent-%COMP%]   .funnel[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.stats-page[_ngcontent-%COMP%]   .funnel[_ngcontent-%COMP%]   .fstep[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px}.stats-page[_ngcontent-%COMP%]   .funnel[_ngcontent-%COMP%]   .lbl[_ngcontent-%COMP%]{width:100px;font-size:13px;font-weight:600;color:#475569}.stats-page[_ngcontent-%COMP%]   .funnel[_ngcontent-%COMP%]   .fbar[_ngcontent-%COMP%]{height:38px;border-radius:9px;display:flex;align-items:center;padding-inline-start:14px;color:#fff;font-weight:800;font-size:14px;min-width:60px}.stats-page[_ngcontent-%COMP%]   .funnel[_ngcontent-%COMP%]   .f1[_ngcontent-%COMP%], .stats-page[_ngcontent-%COMP%]   .funnel[_ngcontent-%COMP%]   .f2[_ngcontent-%COMP%], .stats-page[_ngcontent-%COMP%]   .funnel[_ngcontent-%COMP%]   .f3[_ngcontent-%COMP%], .stats-page[_ngcontent-%COMP%]   .funnel[_ngcontent-%COMP%]   .f4[_ngcontent-%COMP%]{background:var(--color-primary)}.stats-page[_ngcontent-%COMP%]   .funnel[_ngcontent-%COMP%]   .fbar--unavailable[_ngcontent-%COMP%]{background:transparent;border:1px dashed #cbd5e1;color:#94a3b8;justify-content:center;padding-inline-start:0;width:100%}.stats-page[_ngcontent-%COMP%]   .ai-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
1@media(max-width:900px){.stats-page[_ngcontent-%COMP%]   .ai-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}.stats-page[_ngcontent-%COMP%]   .ai-tile[_ngcontent-%COMP%]{background:#f8fafc;border:1px solid #eef2f6;border-radius:var(--radius-lg);padding:16px;text-align:center}.stats-page[_ngcontent-%COMP%]   .ai-tile[_ngcontent-%COMP%]   .ai-v[_ngcontent-%COMP%]{font-size:var(--font-size-2xl);font-weight:800}.stats-page[_ngcontent-%COMP%]   .ai-tile[_ngcontent-%COMP%]   .ai-k[_ngcontent-%COMP%]{font-size:var(--font-size-xs);color:#64748b;margin-top:4px}.stats-card[_ngcontent-%COMP%]{border-radius:var(--radius-xl);border:1px solid #edf2f7;box-shadow:var(--shadow-raised)}.stats-card__header[_ngcontent-%COMP%]{padding:18px 24px;border-bottom:1px solid #edf2f7}.stats-card__title[_ngcontent-%COMP%]{margin:0;font-size:var(--font-size-lg);font-weight:700;color:#0f172a}.stats-card__body[_ngcontent-%COMP%]{padding:24px;display:flex;flex-direction:column;gap:22px}.channel-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px}.channel-row__icon-wrapper[_ngcontent-%COMP%]{width:44px;height:44px;border-radius:var(--radius-lg);background-color:#f1f5f9;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden}.channel-row__image[_ngcontent-%COMP%]{width:24px;height:24px;object-fit:contain;display:block}.channel-row__content[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:8px}.channel-row__info[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.channel-row__name[_ngcontent-%COMP%]{font-size:var(--font-size-sm);font-weight:600;color:#334155}.channel-row__count[_ngcontent-%COMP%]{font-size:var(--font-size-sm);font-weight:500;color:#94a3b8}.channel-row__progress-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.channel-row__track[_ngcontent-%COMP%]{flex:1;height:8px;background-color:#f1f5f9;border-radius:var(--radius-card);overflow:hidden}.channel-row__fill[_ngcontent-%COMP%]{height:100%;border-radius:var(--radius-card);transition:width .8s cubic-bezier(.4,0,.2,1);background-color:var(--color-primary, #3b82f6)}.channel-row__percentage[_ngcontent-%COMP%]{font-size:var(--font-size-sm);font-weight:700;color:#0f172a;min-width:38px;text-align:right}.card-sub[_ngcontent-%COMP%]{display:block;margin-top:4px;font-size:12px;font-weight:500;color:#64748b}.lbl[_ngcontent-%COMP%]   .hint[_ngcontent-%COMP%]{font-size:14px;width:14px;height:14px;vertical-align:middle;margin-inline-start:4px;color:#94a3b8;cursor:help}.funnel-note[_ngcontent-%COMP%]{margin:10px 0 0;font-size:12px;color:#64748b}.stats-error[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:8px;padding:28px 20px;text-align:center}.stats-error[_ngcontent-%COMP%]   .stats-error-icon[_ngcontent-%COMP%]{color:#f59e0b;font-size:32px;width:32px;height:32px}.stats-error[_ngcontent-%COMP%]   .stats-error-text[_ngcontent-%COMP%]{margin:0;max-width:420px;font-size:13px;color:#475569}.funnel[_ngcontent-%COMP%]   .lbl[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;width:118px}'],changeDetection:1});}}return e})();export{_a as StatisticsComponent};

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.