PageSourceSearch

https://bow-e.com/1199.1783a4bc6f7e93d3.js

js bow-e.com collected 2026-10-05 19:58:28 UTC 46,500 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkgd_web=self.webpackChunkgd_web||[]).push([[1199],{31199:(ft,A,c)=>{c.r(A),c.d(A,{RankeamentoEspecialistasComponent:()=>_t});var d=c(69808),P=c(53251),C=c(95698),_=c(28746),v=c(30251),t=c(5e3);function q(n,r){if(1&n&&(t.TgZ(0,"div",1)(1,"div",2)(2,"div",3)(3,"p"),t._uU(4,"Propostas"),t.qZA(),t._UZ(5,"i",4),t.qZA(),t.TgZ(6,"p",5),t._uU(7),t.qZA()(),t.TgZ(8,"div",6)(9,"div",3)(10,"p"),t._uU(11,"Consumo"),t.qZA(),t._UZ(12,"i",7),t.qZA(),t.TgZ(13,"p",5),t._uU(14),t.ALo(15,"number"),t.TgZ(16,"span",8),t._uU(17,"kWh"),t.qZA()()(),t.TgZ(18,"div",9)(19,"div",3)(20,"p"),t._uU(21,"Receita"),t.qZA(),t._UZ(22,"i",10),t.qZA(),t.TgZ(23,"p",5),t._uU(24),t.ALo(25,"currency"),t.qZA()()()),2&n){const a=t.oxw();let e,i,o;t.xp6(7),t.hij(" ",null!==(e=null==a.totalizador?null:a.totalizador.totalProposta)&&void 0!==e?e:0," "),t.xp6(7),t.hij(" ",t.Dn7(15,3,null!==(i=null==a.totalizador?null:a.totalizador.totalConsumo)&&void 0!==i?i:0,2,2)," "),t.xp6(10),t.hij(" ",t.xi3(25,7,null!==(o=null==a.totalizador?null:a.totalizador.totalPreco)&&void 0!==o?o:0,"BRL")," ")}}let z=(()=>{class n{constructor(){this.totalizador=null,this.totalEspecialistas=0,this.habilitados=0,this.treinamento=0}ngOnChanges(a){a.totalizador&&!a.totalizador.isFirstChange()&&(this.totalizador=a.totalizador.currentValue)}}return n.\u0275fac=function(a){return new(a||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-kpi-ranking-especialistas"]],inputs:{totalizador:"totalizador"},standalone:!0,features:[t.TTD,t.jDz],decls:1,vars:1,consts:[["class","kpis-row",4,"ngIf"],[1,"kpis-row"],[1,"kpi","kpi-ultra"],[1,"title"],[1,"fas","fa-users"],[1,"value"],[1,"kpi","kpi-capri"],[1,"fas","fa-bolt"],[1,"unidade"],[1,"kpi","kpi-orchid"],[1,"fas","fa-coins"]],template:function(a,e){1&a&&t.YNc(0,q,26,10,"div",0),2&a&&t.Q6J("ngIf",e.totalizador)},dependencies:[d.ez,d.O5,d.H9,v.$p],styles:[".kpis-row[_ngcontent-%COMP%]{display:flex;width:100%;margin:1rem 0;gap:10px}.kpis-row[_ngcontent-%COMP%]   .kpi[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;cursor:default;color:#fff;flex:1;padding:1rem 1rem .5rem;border-radius:8px;transition:transform .5s ease}.kpis-row[_ngcontent-%COMP%]   .kpi[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0}.kpis-row[_ngcontent-%COMP%]   .kpi[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;font-size:1.2rem;font-weight:600}.kpis-row[_ngcontent-%COMP%]   .kpi[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:.9rem}.kpis-row[_ngcontent-%COMP%]   .kpi[_ngcontent-%COMP%]   p.value[_ngcontent-%COMP%]{font-size:1.5rem;font-weight:700;color:#fff}.kpis-row[_ngcontent-%COMP%]   .kpi[_ngcontent-%COMP%]   span.unidade[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:500}.kpis-row[_ngcontent-%COMP%]   .kpi[_ngcontent-%COMP%]:hover{transform:scale(1.01)}.kpis-row[_ngcontent-%COMP%]   .kpi-ultra[_ngcontent-%COMP%]{background-color:#5a00c3;box-shadow:0 0 12px #5a00c380}.kpis-row[_ngcontent-%COMP%]   .kpi-orchid[_ngcontent-%COMP%]{background-color:#a01ef0;box-shadow:0 0 12px #a01ef080}.kpis-row[_ngcontent-%COMP%]   .kpi-capri[_ngcontent-%COMP%]{background-color:#008cf2;box-shadow:0 0 12px #008cf280}.kpis-row[_ngcontent-%COMP%]   .kpi-light-green[_ngcontent-%COMP%]{background-color:#17a2b8;box-shadow:0 0 12px #17a2b880}@media screen and (max-width: 480px){.kpis-row[_ngcontent-%COMP%]{flex-direction:column}}"]}),n})();var D=c(83136),w=c(38847),O=c(58525),S=c(46368),E=c(92957),J=c(35014);function Q(n,r){if(1&n){const a=t.EpF();t.TgZ(0,"button",6),t.NdJ("click",function(){t.CHM(a);const i=t.oxw();return t.KtG(i.downloadRelatorio())}),t._UZ(1,"i",7),t._uU(2," Download "),t.qZA()}if(2&n){const a=t.oxw();t.Q6J("disabled",a.downloadingRelatorio),t.xp6(1),t.Tol(a.downloadingRelatorio?"fa-spinner loading":"fa-download")}}function I(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"td")(2,"div",11)(3,"div",12)(4,"span"),t._uU(5),t.ALo(6,"initials"),t.qZA()(),t.TgZ(7,"div",13)(8,"p",14),t._uU(9),t.qZA(),t._UZ(10,"p"),t.qZA()()(),t.TgZ(11,"td"),t._uU(12),t.qZA(),t.TgZ(13,"td"),t._uU(14),t.ALo(15,"number"),t.qZA(),t.TgZ(16,"td"),t._uU(17),t.ALo(18,"currency"),t.qZA()()),2&n){const a=r.$implicit;let e,i,o,s;
1t.xp6(1),t.ekj("empty",!(null!=a&&a.nome)),t.xp6(4),t.Oqu(t.lcZ(6,8,null!==(e=null==a?null:a.nome)&&void 0!==e?e:"-----")),t.xp6(3),t.Q6J("title",null!==(i=null==a?null:a.nome)&&void 0!==i?i:""),t.xp6(1),t.hij(" ",null!==(o=null==a?null:a.nome)&&void 0!==o?o:"-----"," "),t.xp6(3),t.hij(" ",null!==(s=null==a?null:a.quantidadePropostas)&&void 0!==s?s:0," "),t.xp6(2),t.hij(" ",t.Dn7(15,10,a.consumo,2,2)," "),t.xp6(3),t.hij(" ",t.xi3(18,14,a.precoMedio,"BRL")," ")}}function V(n,r){if(1&n&&(t.ynx(0),t.TgZ(1,"tbody"),t.YNc(2,I,19,17,"tr",8),t.TgZ(3,"tr",9)(4,"td",10),t._uU(5,"TOTAL"),t.qZA(),t.TgZ(6,"td",10),t._uU(7),t.qZA(),t.TgZ(8,"td",10),t._uU(9),t.ALo(10,"number"),t.qZA(),t.TgZ(11,"td",10),t._uU(12),t.ALo(13,"currency"),t.qZA()()(),t.BQk()),2&n){const a=t.oxw();t.xp6(2),t.Q6J("ngForOf",a.content),t.xp6(5),t.Oqu(a.totalizador.totalProposta),t.xp6(2),t.Oqu(t.Dn7(10,4,a.totalizador.totalConsumo,2,2)),t.xp6(3),t.Oqu(t.xi3(13,8,a.totalizador.totalPreco,"BRL"))}}function L(n,r){if(1&n&&t._UZ(0,"app-ampere-table-handler",15),2&n){const a=t.oxw();t.Q6J("flag",a.loadingData)("filtro",null)}}let F=(()=>{class n{constructor(a,e){this._timeService=a,this._exportService=e,this.content=null,this.totalizador=null,this.loadingData=!1,this.downloadingRelatorio=!1}ngOnChanges(a){a.content&&a.content.currentValue&&(this.content=a.content.currentValue),a.totalizador&&a.totalizador.currentValue&&(this.totalizador=a.totalizador.currentValue)}downloadRelatorio(){this.downloadingRelatorio=!0,this.generateExcel()}generateExcel(){const e=this.getRowsFromTable(this.content),i=this._timeService.get();this._exportService.generateExcel(["Nome","Quantidade de Propostas","Consumo","Pre\xe7o M\xe9dio","Total de Propostas","Total de Consumo","Total de Pre\xe7o"],e,"Ranking de Especialistas",i),this.downloadingRelatorio=!1}getRowsFromTable(a){const e=a.map(i=>({values:[i.nome,i.quantidadePropostas,i.consumo,i.precoMedio]}));return e[0].values.push(this.totalizador.totalProposta,this.totalizador.totalConsumo,this.totalizador.totalPreco),e}}return n.\u0275fac=function(a){return new(a||n)(t.Y36(J.OY),t.Y36(v.ZB))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-tabela-ranking-especialista"]],inputs:{content:"content",totalizador:"totalizador",loadingData:"loadingData"},standalone:!0,features:[t.TTD,t.jDz],decls:17,vars:10,consts:[[1,"ampere-container"],[3,"title","subtitle","displayFilterBtn"],["class","ampere-btn ampere-primary-btn",3,"disabled","click",4,"ngIf"],[3,"customClass","hasPagination","pageResponse","pageRequest"],[4,"ngIf","ngIfElse"],["isLoading",""],[1,"ampere-btn","ampere-primary-btn",3,"disabled","click"],[1,"fas","me-1"],[4,"ngFor","ngForOf"],[1,"table-secondary","totalizador"],[1,"darker"],[1,"group-text"],[1,"image-container"],[1,"text-container"],[3,"title"],[3,"flag","filtro"]],template:function(a,e){if(1&a&&(t.TgZ(0,"div",0)(1,"app-table-header",1),t.YNc(2,Q,3,3,"button",2),t.qZA(),t.TgZ(3,"app-ampere-table",3)(4,"thead")(5,"tr")(6,"th"),t._uU(7,"Nome"),t.qZA(),t.TgZ(8,"th"),t._uU(9,"Quantidade de Propostas"),t.qZA(),t.TgZ(10,"th"),t._uU(11,"Consumo"),t.qZA(),t.TgZ(12,"th"),t._uU(13,"Pre\xe7o M\xe9dio"),t.qZA()()(),t.YNc(14,V,14,11,"ng-container",4),t.YNc(15,L,1,2,"ng-template",null,5,t.W1O),t.qZA()()),2&a){const i=t.MAs(16);
1t.xp6(1),t.Q6J("title","")("subtitle","Os dados listados abaixo, s\xe3o referentes \xe0 vendas realizadas pelos especialistas.")("displayFilterBtn",!1),t.xp6(1),t.Q6J("ngIf",e.content),t.xp6(1),t.Q6J("customClass","mt-3")("hasPagination",!1)("pageResponse",null)("pageRequest",null),t.xp6(11),t.Q6J("ngIf",e.content&&!e.loadingData)("ngIfElse",i)}},dependencies:[d.ez,d.sg,d.O5,d.H9,D.a,w.d,O.t,S.J,E.$],styles:["table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr.totalizador[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{color:#fff;font-weight:700}table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr.totalizador[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{background-color:#198754}table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr.totalizador[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:not(:first-child){background-color:#10b367}"]}),n})();var R=c(32368),g=c(80829),N=c(21013),j=c(1602),B=c(78240),f=c(81125),x=c(88241);const Y={responsive:!0,maintainAspectRatio:!1,scales:{y:{beginAtZero:!0}},plugins:{legend:{display:!1},datalabels:{align:"end",anchor:"end",backgroundColor:"rgba(255, 255, 255, 0.7)",borderRadius:4,color:"black",font:{weight:"bold",size:10},formatter:n=>n.toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2})}}},K={indexAxis:"y",responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},datalabels:{font:{weight:"bold",size:10},formatter:n=>0===n?null:n>1e3?n.toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2}):void 0}},scales:{x:{beginAtZero:!0}}},H={borderWidth:2,borderRadius:5,minBarLength:0,x:{barPercentage:.2,categoryPercentage:.5}};let $=(()=>{class n{constructor(){}get lineChartOptions(){return Y}get barChartOptions(){return K}get commonBorderOptions(){return H}getStatusColor(a){switch(a){case"CRIADO":case"ADICIONADO_UC":return"#F0F9FF";case"PLANO_SELECIONADO":return"#ffa50033";case"ENVIADO":return"#FFFAEB";case"CONTRATO_CRIADO":return"#9af1bd";case"CONTRATO_ENVIADO":return"#FDF2FA";case"CONTRATO_ASSINADO":return"#F4F3FF";case"CONTRATO_FINALIZADO":return"#ECFDF3";default:return"#FEF3F2"}}getBorderColor(a){switch(a){case"CRIADO":case"ADICIONADO_UC":return"#026AA2";case"PLANO_SELECIONADO":return"#ffa500";case"ENVIADO":return"#B54708";case"CONTRATO_CRIADO":return"#024e2f";case"CONTRATO_ENVIADO":return"#C11574";case"CONTRATO_ASSINADO":return"#5925DC";case"CONTRATO_FINALIZADO":return"#067647";default:return"#B42318"}}}return n.\u0275fac=function(a){return new(a||n)},n.\u0275prov=t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();var W=c(22203);function X(n,r){1&n&&t._UZ(0,"app-empty-table")}const m=function(n){return{display:n}};g.kL.register(...g.zX,N.Z);let G=(()=>{class n{constructor(a,e){this._especialistasChartService=a,this._utilService=e,this.content=null,this.vendasContent=null,this.propostaStatusData=null,this.loadingData=!1,this.type="especialista",this.selectedTabIndex=0,this.barChartPropostaStatus=null,this.chartPropostas=null,this.barChartVendasPropostas=null,this.barChartConsumo=null,this.barChartPrecoMedio=null,this.lineChartPropostas=null,this.lineChartVendasPropostas=null,this.lineChartConsumo=null,this.lineChartPrecoMedio=null,this.barConsumoSwitch=!0,this.colorConsumo=this.barConsumoSwitch?"accent":"primary",this.barPrecoMedioSwitch=!0,this.colorPrecoMedio=this.barPrecoMedioSwitch?"accent":"primary",this.barPropostasSwitch=!0,this.colorPropostas=this.barPropostasSwitch?"accent":"primary",this.barVendasPropostasSwitch=!0,this.colorVendasPropostas=this.barVendasPropostasSwitch?"accent":"primary"}ngOnChanges(a){if(a.propostaStatusData&&!a.propostaStatusData.firstChange&&(this.propostaStatusData=a.propostaStatusData.currentValue,this.createBarChartPropostaStatus()),a.content&&!a.content.firstChange){if(!this.content)return;return this.content=a.content.currentValue,void this.initCharts()}this.initCharts()}initCharts(){this.createBarChartPropostas(),this.createLineChartPropostas(),this.createBarChartVendasPropostas(),this.createLineChartVendasPropostas(),this.createLineChartConsumo(),this.createLineChartPrecoMedio(),this.createHorizontalBarChartConsumo(),this.createHorizontalBarChartPrecoMedio()}createBarChartPropostaStatus(){var a;if(!this.propostaStatusData)return;this.barChartPropostaStatus&&this.barChartPropostaStatus.destroy();const e=null===(a=document.getElementById("bar-chart-proposta-status"))||void 0===a?void 0:a.getContext("2d");if(!e)return;const i=this._especialistasChartService.barChartOptions,o=this.propostaStatusData.sort((l,h)=>h.quantidade-l.quantidade).slice(0,10),s=Object.values(x.Oy).map(l=>l.value);o.sort((l,h)=>s.indexOf(l.status)-s.indexOf(h.status));
1const p=o.map(l=>this._especialistasChartService.getStatusColor(l.status)),u=o.map(l=>this._especialistasChartService.getBorderColor(l.status));this.barChartPropostaStatus=new g.kL(e,{type:"bar",data:{labels:o.map(l=>this._utilService.toTitleCase(l.status)),datasets:[Object.assign({label:"Propostas por Status",data:o.map(l=>l.quantidade),backgroundColor:p,borderColor:u},this._especialistasChartService.commonBorderOptions)]},options:i})}createBarChartPropostas(){var a;if(!this.content)return;this.chartPropostas&&this.chartPropostas.destroy();const e=null===(a=document.getElementById(`bar-chart-propostas-${this.type}`))||void 0===a?void 0:a.getContext("2d");!e||("especialista"===this.type?this.createBarChartPropostasEspecialista(e):this.createBarChartPropostasConcessionarias(e))}createBarChartPropostasEspecialista(a){const e=Object.assign(Object.assign({},this._especialistasChartService.barChartOptions),{scales:{x:{stacked:!0,barPercentage:.2,categoryPercentage:.5},y:{stacked:!0}}}),i=this.content.sort((u,l)=>l.quantidadePropostas-u.quantidadePropostas).slice(0,10),o=Object.assign({label:"Quantidade Total de Propostas",data:i.map(u=>u.quantidadePropostas),backgroundColor:"#EEF4FF",borderColor:"#3538CD",stack:"Stack 0"},this._especialistasChartService.commonBorderOptions),s=[];i.forEach(u=>{u.statusProposta.forEach(l=>{let h=s.find(b=>b.label===l.status);h||(h=Object.assign({label:l.status,data:Array(i.length).fill(0),backgroundColor:this._especialistasChartService.getStatusColor(l.status),borderColor:this._especialistasChartService.getBorderColor(l.status),stack:"Stack 1"},this._especialistasChartService.commonBorderOptions),s.push(h)),h.data[i.indexOf(u)]=l.quantidade})});const p=Object.values(x.Oy).map(u=>u.value);s.sort((u,l)=>p.indexOf(u.label)-p.indexOf(l.label)),this.chartPropostas=new g.kL(a,{type:"bar",data:{labels:i.map(u=>u.nome),datasets:[o,...s]},options:e})}createBarChartPropostasConcessionarias(a){const e=this.content.sort((i,o)=>o.quantidadePropostas-i.quantidadePropostas).slice(0,10);this.chartPropostas=new g.kL(a,{type:"bar",data:{labels:e.map(i=>i.nome),datasets:[Object.assign({label:"Quantidade de Propostas",data:e.map(i=>i.quantidadePropostas),backgroundColor:"rgba(220, 0,150, 0.2)",borderColor:"rgba(220, 0,150, 1)"},this._especialistasChartService.commonBorderOptions)]},options:this._especialistasChartService.barChartOptions})}createBarChartVendasPropostas(){var a;if(!this.vendasContent)return;this.barChartVendasPropostas&&this.barChartVendasPropostas.destroy();const e=null===(a=document.getElementById("bar-chart-vendas-propostas-especialista"))||void 0===a?void 0:a.getContext("2d");if(!e)return;const i=this._especialistasChartService.barChartOptions,o=this.vendasContent.sort((s,p)=>p.quantidadePropostas-s.quantidadePropostas).slice(0,10);this.barChartVendasPropostas=new g.kL(e,{type:"bar",data:{labels:o.map(s=>s.nome),datasets:[Object.assign({label:"Quantidade de Vendas x Propostas",data:o.map(s=>s.quantidadePropostas),backgroundColor:"rgba(220, 0,150, 0.2)",borderColor:"rgba(220, 0,150, 1)"},this._especialistasChartService.commonBorderOptions)]},options:i})}createHorizontalBarChartConsumo(){var a,e;this.barChartConsumo&&this.barChartConsumo.destroy();const i=null===(a=document.getElementById(`horizontal-bar-chart-consumo-${this.type}`))||void 0===a?void 0:a.getContext("2d");if(!i)return;const o=null===(e=this.content)||void 0===e?void 0:e.sort((s,p)=>p.consumo-s.consumo).filter(s=>s.consumo>0);this.barChartConsumo=new g.kL(i,{type:"bar",data:{labels:null==o?void 0:o.map(s=>s.nome),datasets:[Object.assign({label:"Consumo",data:null==o?void 0:o.map(s=>s.consumo),backgroundColor:"rgba(54, 162, 235, 0.2)",borderColor:"rgba(54, 162, 235, 1)"},this._especialistasChartService.commonBorderOptions)]},options:this._especialistasChartService.barChartOptions})}createHorizontalBarChartPrecoMedio(){var a,e;this.barChartPrecoMedio&&this.barChartPrecoMedio.destroy();const i=null===(a=document.getElementById(`horizontal-bar-chart-preco-medio-${this.type}`))||void 0===a?void 0:a.getContext("2d");if(!i)return;const o=null===(e=this.content)||void 0===e?void 0:e.sort((s,p)=>p.precoMedio-s.precoMedio).filter(s=>s.precoMedio>0);this.barChartPrecoMedio=new g.kL(i,{type:"bar",data:{labels:null==o?void 0:o.map(s=>s.nome),datasets:[Object.assign({label:"Pre\xe7o M\xe9dio",data:null==o?void 0:o.map(s=>s.precoMedio),backgroundColor:"rgba(255, 206, 86, 0.2)",borderColor:"rgba(255, 206, 86, 1)"},this._especialistasChartService.commonBorderOptions)]},options:Object.assign(Object.assign({},this._especialistasChartService.barChartOptions),{plugins:Object.assign(Object.assign({},this._especialistasChartService.barChartOptions.plugins),{datalabels:Object.assign({},this._especialistasChartService.barChartOptions.plugins.datalabels)})})})}createLineChartPropostas(){var a,e;if(!this.content)return;this.lineChartPropostas&&this.lineChartPropostas.destroy();const i=null===(a=document.getElementById(`line-chart-propostas-${this.type}`))||void 0===a?void 0:a.getContext("2d");if(!i)return;const o=null===(e=this.content)||void 0===e?void 0:e.sort((s,p)=>p.quantidadePropostas-s.quantidadePropostas).slice(0,10);this.lineChartPropostas=new g.kL(i,{type:"line",data:{labels:null==o?void 0:o.map(s=>s.nome),datasets:[{label:"Quantidade de Propostas",data:null==o?void 0:o.map(s=>s.quantidadePropostas),backgroundColor:"rgba(220, 0,150, 0.2)",borderColor:"rgba(220, 0,150, 1)",borderWidth:1,fill:!0}]},options:this._especialistasChartService.lineChartOptions})}createLineChartVendasPropostas(){var a,e;if(!this.vendasContent)return;this.lineChartVendasPropostas&&this.lineChartVendasPropostas.destroy();const i=null===(a=document.getElementById("line-chart-vendas-propostas-especialista"))||void 0===a?void 0:a.getContext("2d");if(!i)return;const o=null===(e=this.vendasContent)||void 0===e?void 0:e.sort((s,p)=>p.quantidadePropostas-s.quantidadePropostas).slice(0,10);this.lineChartVendasPropostas=new g.kL(i,{type:"line",data:{labels:null==o?void 0:o.map(s=>s.nome),datasets:[{label:"Quantidade de Propostas",data:null==o?void 0:o.map(s=>s.quantidadePropostas),backgroundColor:"rgba(220, 0,150, 0.2)",borderColor:"rgba(220, 0,150, 1)",borderWidth:1,fill:!0}]},options:this._especialistasChartService.lineChartOptions})}createLineChartConsumo(){var a,e;this.lineChartConsumo&&this.lineChartConsumo.destroy();const i=null===(a=document.getElementById(`line-chart-consumo-${this.type}`))||void 0===a?void 0:a.getContext("2d");if(!i)return;const o=null===(e=this.content)||void 0===e?void 0:e.sort((s,p)=>p.consumo-s.consumo).filter(s=>s.consumo>0);this.lineChartConsumo=new g.kL(i,{type:"line",data:{labels:null==o?void 0:o.map(s=>s.nome),datasets:[{label:"Consumo",data:null==o?void 0:o.map(s=>s.consumo),backgroundColor:"rgba(54, 162, 235, 0.2)",borderColor:"rgba(54, 162, 235, 1)",borderWidth:1,fill:!0}]},options:this._especialistasChartService.lineChartOptions})}createLineChartPrecoMedio(){var a,e;this.lineChartPrecoMedio&&this.lineChartPrecoMedio.destroy();const i=null===(a=document.getElementById(`line-chart-preco-medio-${this.type}`))||void 0===a?void 0:a.getContext("2d");if(!i)return;const o=null===(e=this.content)||void 0===e?void 0:e.sort((s,p)=>p.precoMedio-s.precoMedio).filter(s=>s.precoMedio>0);this.lineChartPrecoMedio=new g.kL(i,{type:"line",data:{labels:null==o?void 0:o.map(s=>s.nome),datasets:[{label:"Pre\xe7o M\xe9dio",data:null==o?void 0:o.map(s=>s.precoMedio),backgroundColor:"rgba(255, 206, 86, 0.2)",borderColor:"rgba(255, 206, 86, 1)",borderWidth:1,fill:!0}]},options:this._especialistasChartService.lineChartOptions})}getSwitchOption(a,e){switch(e){case"consumo":this.barConsumoSwitch=a.checked;break;case"precoMedio":this.barPrecoMedioSwitch=a.checked;break;case"propostas":this.barPropostasSwitch=a.checked;break;case"vendas-propostas":this.barVendasPropostasSwitch=a.checked}}}return n.\u0275fac=function(a){return new(a||n)(t.Y36($),t.Y36(W.f))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-chart-ranking-propostas-especialista"]],inputs:{content:"content",vendasContent:"vendasContent",propostaStatusData:"propostaStatusData",loadingData:"loadingData",type:"type",selectedTabIndex:"selectedTabIndex"},standalone:!0,features:[t.TTD,t.jDz],decls:79,vars:103,consts:[[4,"ngIf"],[1,"chart-container"],[1,"box-chart"],["especialistaPropostasContainer",""],["multi","false"],[3,"expanded"],[1,"d-flex","justify-content-end","align-items-baseline","mx-3","w-100"],[3,"element","label"],[1,"border-toggle"],[1,"fas","type-chart"],["title","Alterar Tipo de Gr\xe1fico",3,"color","checked","change"],[1,"chart","w-100",3,"ngStyle"],[3,"id"],[1,"box-chart",3,"ngStyle"],["especialistaPropostaStatusContainer",""],[1,"chart","w-100"],["id","bar-chart-proposta-status"],[1,"chart-container",3,"ngStyle"],["especialistaVendasPropostasContainer",""],["id","bar-chart-vendas-propostas-especialista"],["id","line-chart-vendas-propostas-especialista"],[1,"chart-container","gap-2"],["especialistaConsumosContainer",""],["especialistaPrecoMedioContainer",""]],template:function(a,e){if(1&a&&(t.YNc(0,X,1,0,"app-empty-table",0),t.TgZ(1,"div",1)(2,"div",2,3)(4,"mat-accordion",4)(5,"mat-expansion-panel",5)(6,"mat-expansion-panel-header")(7,"mat-panel-title"),t._uU(8),t.qZA()(),t.TgZ(9,"div",6),t._UZ(10,"app-ch
1art-actions",7),t.TgZ(11,"div",8),t._UZ(12,"i",9),t.TgZ(13,"mat-slide-toggle",10),t.NdJ("change",function(o){return e.getSwitchOption(o,"propostas")}),t.qZA()()(),t.TgZ(14,"div",11),t._UZ(15,"canvas",12),t.qZA(),t.TgZ(16,"div",11),t._UZ(17,"canvas",12),t.qZA()()()(),t.TgZ(18,"div",13,14)(20,"mat-accordion",4)(21,"mat-expansion-panel",5)(22,"mat-expansion-panel-header")(23,"mat-panel-title"),t._uU(24," Propostas por Status "),t.qZA()(),t.TgZ(25,"div",6),t._UZ(26,"app-chart-actions",7),t.qZA(),t.TgZ(27,"div",15),t._UZ(28,"canvas",16),t.qZA()()()()(),t.TgZ(29,"div",17)(30,"div",2,18)(32,"mat-accordion",4)(33,"mat-expansion-panel",5)(34,"mat-expansion-panel-header")(35,"mat-panel-title"),t._uU(36," Especialista x Vendas (Top 10) "),t.qZA()(),t.TgZ(37,"div",6),t._UZ(38,"app-chart-actions",7),t.TgZ(39,"div",8),t._UZ(40,"i",9),t.TgZ(41,"mat-slide-toggle",10),t.NdJ("change",function(o){return e.getSwitchOption(o,"vendas-propostas")}),t.qZA()()(),t.TgZ(42,"div",11),t._UZ(43,"canvas",19),t.qZA(),t.TgZ(44,"div",11),t._UZ(45,"canvas",20),t.qZA()()()()(),t.TgZ(46,"div",21)(47,"div",2,22)(49,"mat-accordion",4)(50,"mat-expansion-panel",5)(51,"mat-expansion-panel-header")(52,"mat-panel-title"),t._uU(53),t.qZA()(),t.TgZ(54,"div",6),t._UZ(55,"app-chart-actions",7),t.TgZ(56,"div",8),t._UZ(57,"i",9),t.TgZ(58,"mat-slide-toggle",10),t.NdJ("change",function(o){return e.getSwitchOption(o,"consumo")}),t.qZA()()(),t.TgZ(59,"div",11),t._UZ(60,"canvas",12),t.qZA(),t.TgZ(61,"div",11),t._UZ(62,"canvas",12),t.qZA()()()(),t.TgZ(63,"div",2,23)(65,"mat-accordion",4)(66,"mat-expansion-panel",5)(67,"mat-expansion-panel-header")(68,"mat-panel-title"),t._uU(69),t.qZA()(),t.TgZ(70,"div",6),t._UZ(71,"app-chart-actions",7),t.TgZ(72,"div",8),t._UZ(73,"i",9),t.TgZ(74,"mat-slide-toggle",10),t.NdJ("change",function(o){return e.getSwitchOption(o,"precoMedio")}),t.qZA()()(),t.TgZ(75,"div",11),t._UZ(76,"canvas",12),t.qZA(),t.TgZ(77,"div",11),t._UZ(78,"canvas",12),t.qZA()()()()()),2&a){const i=t.MAs(3),o=t.MAs(19),s=t.MAs(31),p=t.MAs(48),u=t.MAs(64);t.Q6J("ngIf",!e.content),t.xp6(1),t.ekj("grouped-container","especialista"===e.type),t.xp6(4),t.Q6J("expanded",!0),t.xp6(1),t.Udp("margin","1rem 0 .5rem")("height","20px"),t.xp6(1),t.Udp("font-weight","600"),t.xp6(1),t.hij(" ","especialista"===e.type?"Especialistas":"Concession\xe1rias"," x Proposta (Top 10) "),t.xp6(2),t.Q6J("element",i)("label",("especialista"===e.type?"Especialistas":"Concession\xe1rias")+" x Proposta"),t.xp6(2),t.Tol(e.barPropostasSwitch?"fa-chart-bar type-chart-bar":"fa-chart-line type-chart-line"),t.xp6(1),t.Q6J("color",e.colorPropostas)("checked",e.barPropostasSwitch),t.xp6(1),t.Q6J("ngStyle",t.VKq(83,m,e.barPropostasSwitch?"":"none")),t.xp6(1),t.Q6J("id","bar-chart-propostas-"+e.type),t.xp6(1),t.Q6J("ngStyle",t.VKq(85,m,e.barPropostasSwitch?"none":"")),t.xp6(1),t.Q6J("id","line-chart-propostas-"+e.type),t.xp6(1),t.Q6J("ngStyle",t.VKq(87,m,"especialista"===e.type?"":"none")),t.xp6(3),t.Q6J("expanded",!0),t.xp6(1),t.Udp("margin","1rem 0 .5rem")("height","20px"),t.xp6(1),t.Udp("font-weight","600"),t.xp6(3),t.Q6J("element",o)("label","Propostas por Status"),t.xp6(3),t.Q6J("ngStyle",t.VKq(89,m,"especialista"===e.type&&e.vendasContent&&e.vendasContent.length>0?"":"none")),t.xp6(4),t.Q6J("expanded",!0),t.xp6(1),t.Udp("margin","1rem 0 .5rem")("height","20px"),t.xp6(1),t.Udp("font-weight","600"),t.xp6(3),t.Q6J("element",s)("label","Vendas Especialistas x Proposta"),t.xp6(2),t.Tol(e.barVendasPropostasSwitch?"fa-chart-bar type-chart-bar":"fa-chart-line type-chart-line"),t.xp6(1),t.Q6J("color",e.colorVendasPropostas)("checked",e.barVendasPropostasSwitch),t.xp6(1),t.Q6J("ngStyle",t.VKq(91,m,e.barVendasPropostasSwitch?"":"none")),t.xp6(2),t.Q6J("ngStyle",t.VKq(93,m,e.barVendasPropostasSwitch?"none":"")),t.xp6(6),t.Q6J("expanded",!0),t.xp6(1),t.Udp("margin","1rem 0 .5rem")("height","20px"),t.xp6(1),t.Udp("font-weight","600"),t.xp6(1),t.hij(" ","especialista"===e.type?"Especialistas":"Concession\xe1rias"," x Consumo "),t.xp6(2),t.Q6J("element",p)("label","especialista"===e.type?"Especialistas":"Concession\xe1rias x Consumo"),t.xp6(2),t.Tol(e.barC
1onsumoSwitch?"fa-chart-bar type-chart-bar":"fa-chart-line type-chart-line"),t.xp6(1),t.Q6J("color",e.colorConsumo)("checked",e.barConsumoSwitch),t.xp6(1),t.Q6J("ngStyle",t.VKq(95,m,e.barConsumoSwitch?"":"none")),t.xp6(1),t.Q6J("id","horizontal-bar-chart-consumo-"+e.type),t.xp6(1),t.Q6J("ngStyle",t.VKq(97,m,e.barConsumoSwitch?"none":"")),t.xp6(1),t.Q6J("id","line-chart-consumo-"+e.type),t.xp6(4),t.Q6J("expanded",!0),t.xp6(1),t.Udp("margin","1rem 0 .5rem")("height","20px"),t.xp6(1),t.Udp("font-weight","600"),t.xp6(1),t.hij(" ","especialista"===e.type?"Especialistas":"Concession\xe1rias"," x Pre\xe7o M\xe9dio "),t.xp6(2),t.Q6J("element",u)("label","especialista"===e.type?"Especialistas":"Concession\xe1rias x Pre\xe7o M\xe9dio"),t.xp6(2),t.Tol(e.barPrecoMedioSwitch?"fa-chart-bar type-chart-bar":"fa-chart-line type-chart-line"),t.xp6(1),t.Q6J("color",e.colorPrecoMedio)("checked",e.barPrecoMedioSwitch),t.xp6(1),t.Q6J("ngStyle",t.VKq(99,m,e.barPrecoMedioSwitch?"":"none")),t.xp6(1),t.Q6J("id","horizontal-bar-chart-preco-medio-"+e.type),t.xp6(1),t.Q6J("ngStyle",t.VKq(101,m,e.barPrecoMedioSwitch?"none":"")),t.xp6(1),t.Q6J("id","line-chart-preco-medio-"+e.type)}},dependencies:[d.ez,d.O5,d.PC,j.T,B.X,R.rP,R.Rr,f.To,f.pp,f.ib,f.yz,f.yK],styles:[".chart-container[_ngcontent-%COMP%]{display:flex;width:100%;margin:2rem 0;gap:10px}.chart-container[_ngcontent-%COMP%]   .box-chart[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;width:100%}.chart-container[_ngcontent-%COMP%]   .box-chart[_ngcontent-%COMP%]   .chart[_ngcontent-%COMP%]{display:block;height:100vh;padding:1rem}.chart-container[_ngcontent-%COMP%]   .box-chart[_ngcontent-%COMP%]   .border-toggle[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem;margin-left:.5rem;margin-right:.5rem;border-left:solid 1px #cecece}.chart-container[_ngcontent-%COMP%]   i.type-chart[_ngcontent-%COMP%]{margin-left:.5rem;border:solid 2px;padding:.3rem;border-radius:50%}.chart-container[_ngcontent-%COMP%]   i.type-chart-bar[_ngcontent-%COMP%]{border-color:#d6218f;color:#d6218f}.chart-container[_ngcontent-%COMP%]   i.type-chart-line[_ngcontent-%COMP%]{border-color:#3f51b5;color:#3f51b5}.grouped-container[_ngcontent-%COMP%]   .box-chart[_ngcontent-%COMP%]:first-child{width:60%}.grouped-container[_ngcontent-%COMP%]   .box-chart[_ngcontent-%COMP%]:last-child{width:40%}@media screen and (max-width: 1024px){.grouped-container[_ngcontent-%COMP%]{flex-direction:column}.grouped-container[_ngcontent-%COMP%]   .box-chart[_ngcontent-%COMP%]{width:100%!important}}"]}),n})();function tt(n,r){if(1&n&&(t.TgZ(0,"div",1)(1,"div",2)(2,"div",3)(3,"p"),t._uU(4,"Vendas"),t.qZA(),t._UZ(5,"i",4),t.qZA(),t.TgZ(6,"p",5),t._uU(7),t.qZA()(),t.TgZ(8,"div",6)(9,"div",3)(10,"p"),t._uU(11,"Consumo"),t.qZA(),t._UZ(12,"i",7),t.qZA(),t.TgZ(13,"p",5),t._uU(14),t.ALo(15,"number"),t.TgZ(16,"span",8),t._uU(17,"kWh"),t.qZA()()(),t.TgZ(18,"div",9)(19,"div",3)(20,"p"),t._uU(21,"Receita"),t.qZA(),t._UZ(22,"i",10),t.qZA(),t.TgZ(23,"p",5),t._uU(24),t.ALo(25,"currency"),t.qZA()()()),2&n){const a=t.oxw();let e,i,o;t.xp6(7),t.hij(" ",null!==(e=null==a.totalizador?null:a.totalizador.totalProposta)&&void 0!==e?e:0," "),t.xp6(7),t.hij(" ",t.Dn7(15,3,null!==(i=null==a.totalizador?null:a.totalizador.totalConsumo)&&void 0!==i?i:0,2,2)," "),t.xp6(10),t.hij(" ",t.xi3(25,7,null!==(o=null==a.totalizador?null:a.totalizador.totalPreco)&&void 0!==o?o:0,"BRL")," ")}}let at=(()=>{class n{constructor(){this.totalizador=null,this.totalVendasEspecialistas=0}ngOnChanges(a){a.totalizador&&!a.totalizador.isFirstChange()&&(this.totalizador=a.totalizador.currentValue)}}return n.\u0275fac=function(a){return new(a||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-kpi-ranking-vendas-especialistas"]],inputs:{totalizador:"totalizador"},standalone:!0,features:[t.TTD,t.jDz],decls:1,vars:1,consts:[["class","kpis-row",4,"ngIf"],[1,"kpis-row"],[1,"kpi","kpi-vendas"],[1,"title"],[1,"fas","fa-users"],[1,"value"],[1,"kpi","kpi-consumo"],[1,"fas","fa-bolt"],[1,"unidade"],[1,"kpi","kpi-receita"],[1,"fas","fa-coins"]],template:function(a,e){1&a&&t.YNc(0,tt,26,10,"div",0),2&a&&t.Q6J("ngIf",e.totalizador)},dependencies:[d.ez,d.O5,d.H9,v.$p],styles:[".kpis-row[_ngcontent-%COMP%]{display:flex;width:100%;margin:1rem 0;gap:10px}.kpis-row[_ngcontent-%COMP%]   .kpi[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;cursor:default;color:#fff;flex:1;padding:1rem 1rem .5rem;border-radius:8px;transition:transform .5s ease}.kpis-row[_ngcontent-%COMP%]   .kpi[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0}.kpis-row[_ngcontent-%COMP%]   .kpi[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;font-size:1.2rem;font-weight:600}.kpis-row[_ngcontent-%COMP%]   .kpi[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:.9rem}.kpis-row[_ngcontent-%COMP%]   .kpi[_ngcontent-%COMP%]   p.value[_ngcontent-%COMP%]{font-size:1.5rem;font-weight:700;color:#fff}.kpis-row[_ngcontent-%COMP%]   .kpi[_ngcontent-%COMP%]   span.unidade[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:500}.kpis-row[_ngcontent-%COMP%]   .kpi[_ngcontent-%COMP%]:hover{transform:scale(1.01)}.kpis-row[_ngcontent-%COMP%]   .kpi-vendas[_ngcontent-%COMP%]{background-color:#f5b97f;box-shadow:0 0 12px #f5b97f80}.kpis-row[_ngcontent-%COMP%]   .kpi-consumo[_ngcontent-%COMP%]{background-color:#7da3cc;box-shadow:0 0 12px #7da3cc80}.kpis-row[_ngcontent-%COMP%]   .kpi-receita[_ngcontent-%COMP%]{background-color:#80cbc4;box-shadow:0 0 12px #80cbc480}@media screen and (max-width: 480px){.kpis-row[_ngcontent-%COMP%]{flex-direction:column}}"]}),n})();var U=c(70443);function et(n,r){if(1&n){const a=t.EpF();t.TgZ(0,"button",7),t.NdJ("click",function(){t.CHM(a);const i=t.oxw();return t.KtG(i.downloadRelatorio())}),t._UZ(1,"i",8),t._uU(2," Download "),t.qZA()}if(2&n){const a=t.oxw();t.Q6J("disabled",a.downloadingRelatorio),t.xp6(1),t.Tol(a.downloadingRelatorio?"fa-spinner loading":"fa-download")}}function nt(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"td",10)(2,"a",11),t._uU(3),t.qZA()(),t.TgZ(4,"td")(5,"div",12)(6,"div",13)(7,"span"),t._uU(8),t.ALo(9,"initials"),t.qZA()(),t.TgZ(10,"div",14)(11,"p",15),t._uU(12),t.qZA(),t.TgZ(13,"p",15),t._uU(14),t.qZA()()()(),t.TgZ(15,"td")(16,"div",12)(17,"div",13)(18,"span"),t._uU(19),t.ALo(20,"initials"),t.qZA()(),t.TgZ(21,"div",14)(22,"p",15),t._uU(23),t.qZA(),t.TgZ(24,"p",15),t._uU(25),t.qZA()()()(),t.TgZ(26,"td")(27,"span",16),t._uU(28),t.qZA()(),t.TgZ(29,"td"),t._uU(30),t.ALo(31,"number"),t.qZA(),t.TgZ(32,"td"),t._uU(33),t.ALo(34,"currency"),t.qZA(),t.TgZ(35,"td"),t._uU(36),t.ALo(37,"currency"),t.qZA(),t.TgZ(38,"td"),t._uU(39),t.ALo(40,"date"),t.qZA()()),2&n){const a=r.$implicit;let e,i,o,s,p,u,l,h,b,T,k,y,M;
1t.xp6(2),t.Q6J("href","/comercial/propostas/"+a.guid,t.LSH),t.xp6(1),t.hij(" ",a.codigoProposta," "),t.xp6(1),t.ekj("empty",!(null!=a&&a.especialista)),t.xp6(4),t.Oqu(t.lcZ(9,31,null!==(e=null==a||null==a.especialista?null:a.especialista.nome)&&void 0!==e?e:"-----")),t.xp6(3),t.Q6J("title",null!==(i=null==a||null==a.especialista?null:a.especialista.nome)&&void 0!==i?i:""),t.xp6(1),t.hij(" ",null!==(o=null==a||null==a.especialista?null:a.especialista.nome)&&void 0!==o?o:"-----"," "),t.xp6(1),t.Q6J("title",null!==(s=null==a||null==a.especialista?null:a.especialista.email)&&void 0!==s?s:""),t.xp6(1),t.hij(" ",null!==(p=null==a||null==a.especialista?null:a.especialista.email)&&void 0!==p?p:""," "),t.xp6(1),t.ekj("empty",!(null!=a&&a.cliente)),t.xp6(4),t.Oqu(t.lcZ(20,33,null!==(u=null==a||null==a.cliente?null:a.cliente.nome)&&void 0!==u?u:"-----")),t.xp6(3),t.Q6J("title",null!==(l=null==a||null==a.cliente?null:a.cliente.nome)&&void 0!==l?l:""),t.xp6(1),t.hij(" ",null!==(h=null==a||null==a.cliente?null:a.cliente.nome)&&void 0!==h?h:"-----"," "),t.xp6(1),t.Q6J("title",null!==(b=null==a||null==a.cliente?null:a.cliente.email)&&void 0!==b?b:""),t.xp6(1),t.hij(" ",null!==(T=null==a||null==a.cliente?null:a.cliente.email)&&void 0!==T?T:""," "),t.xp6(2),t.Tol(null!==(k=null==a||null==a.status?null:a.status.ampereBadge)&&void 0!==k?k:"ampere-danger-badge"),t.xp6(1),t.hij(" ",null!==(y=null==a||null==a.status?null:a.status.descricao)&&void 0!==y?y:"Status Not Found"," "),t.xp6(1),t.ekj("empty",!(null!=a&&a.consumo)),t.xp6(1),t.hij(" ",t.Dn7(31,35,null!==(M=null==a?null:a.consumo)&&void 0!==M?M:0,0,0)," "),t.xp6(2),t.ekj("empty",!(null!=a&&a.valorMedioConta)),t.xp6(1),t.hij(" ",t.xi3(34,39,a.valorMedioConta,"BRL")," "),t.xp6(2),t.ekj("empty",!(null!=a&&a.valorProposta)),t.xp6(1),t.hij(" ",t.xi3(37,42,a.valorProposta,"BRL")," "),t.xp6(2),t.ekj("empty",!(null!=a&&a.finalizadoEm)),t.xp6(1),t.hij(" ",t.xi3(40,45,a.finalizadoEm,"dd/MM/yyyy HH:mm")," ")}}function ot(n,r){if(1&n&&(t.ynx(0),t.TgZ(1,"tbody"),t.YNc(2,nt,41,48,"tr",9),t.qZA(),t.BQk()),2&n){const a=t.oxw();t.xp6(2),t.Q6J("ngForOf",a.pageResponse.content)}}function it(n,r){if(1&n&&t._UZ(0,"app-ampere-table-handler",17),2&n){const a=t.oxw();t.Q6J("flag",a.loadingData)("filtro",null)}}let st=(()=>{class n{constructor(a){this._especialistasService=a,this.filtro=null,this.pageResponse=null,this.pageRequest=new x.lo(0,20,"createdAt,desc"),this.loadingData=!1,this.downloadingRelatorio=!1}ngOnChanges(a){a.filtro&&!a.filtro.firstChange&&this.getRankingDetalhesPropostas()}ngOnInit(){this.getRankingDetalhesPropostas()}getRankingDetalhesPropostas(){this.loadingData=!0,this._especialistasService.getRankingDetalhesPropostas(this.filtro,this.pageRequest).pipe((0,C.q)(1)).subscribe({next:a=>{a.content.forEach(e=>{e.status=x.Oy[e.status]}),this.pageResponse=a,this.loadingData=!1},error:()=>{this.pageResponse=null,this.loadingData=!1}})}downloadRelatorio(){this.downloadingRelatorio=!0,this._especialistasService.downloadRelatorioPropostasEspecialistas(this.filtro).pipe((0,C.q)(1),(0,_.x)(()=>{this.downloadingRelatorio=!1})).subscribe()}onPage(a){this.pageRequest=a,this.getRankingDetalhesPropostas()}}return n.\u0275fac=function(a){return new(a||n)(t.Y36(U.n))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-tabela-detalhamento-propostas"]],inputs:{filtro:"filtro"},standalone:!0,features:[t.TTD,t.jDz],decls:25,vars:9,consts:[[1,"ampere-container"],[3,"title","subtitle","displayFilterBtn"],["class","ampere-btn ampere-primary-btn",3,"disabled","click",4,"ngIf"],[3,"customClass","pageResponse","pageRequest","onPageChange"],[1,"align-left"],[4,"ngIf","ngIfElse"],["isLoading",""],[1,"ampere-btn","ampere-primary-btn",3,"disabled","click"],[1,"fas","me-1"],[4,"ngFor","ngForOf"],[1,"darker"],["target","_blank",3,"href"],[1,"group-text"],[1,"image-container"],[1,"text-container"],[3,"title"],[1,"ampere-badge-rounded"],[3,"flag","filtro"]],template:function(a,e){if(1&a&&(t.TgZ(0,"div",0)(1,"app-table-header",1),t.YNc(2,et,3,3,"button",2),t.qZA(),t.TgZ(3,"app-ampere-table",3),t.NdJ("onPageChange",function(o){return e.onPage(o)}),t.TgZ(4,"thead")(5,"tr")(6,"th"),t._uU(7,"C\xf3digo"),t.qZA(),t.TgZ(8,"th",4),t._uU(9,"Especialista"),t.qZA(),t.TgZ(10,"th",4),t._uU(11,"Cliente"),t.qZA(),t.TgZ(12,"th"),t._uU(13,"Status"),t.qZA(),t.TgZ(14,"th"),t._uU(15,"Consumo (kWh)"),t.qZA(),t.TgZ(16,"th"),t._uU(17,"Valor M\xe9dio Conta"),t.qZA(),t.TgZ(18,"th"),t._uU(19,"Valor Proposta"),t.qZA(),t.TgZ(20,"th"),t._uU(21,"Finalizado Em"),t.qZA()()(),t.YNc(22,ot,3,1,"ng-container",5),t.YNc(23,it,1,2,"ng-template",null,6,t.W1O),t.qZA()()),2&a){const i=t.MAs(24);t.xp6(1),t.Q6J("title","")("subtitle","As propostas listadas abaixo s\xe3o provenientes de vendas realizadas pelos especialistas.")("displayFilterBtn",!1),t.xp6(1),t.Q6J("ngIf",e.pageResponse),t.xp6(1),t.Q6J("customClass","mt-3")("pageResponse",e.pageResponse)("pageRequest",e.pageRequest),t.xp6(19),t.Q6J("ngIf",e.pageResponse&&!e.loadingData)("ngIfElse",i)}},dependencies:[d.ez,d.sg,d.O5,d.H9,d.uU,D.a,w.d,O.t,S.J,E.$]}),n})(),rt=(()=>{class n{transform(a,...e){const i=typeof a;return"object"===i?Object.values(a).some(o=>o):"boolean"===i?a:null}}return n.\u0275fac=function(a){return new(a||n)},n.\u0275pipe=t.Yjl({name:"isDataLoading",type:n,pure:!0,standalone:!0}),n})();var lt=c(7710),ct=c(68726);function pt(n,r){if(1&n&&(t.ynx(0),t.TgZ(1,"div",15)(2,"h5"),t._uU(3,"Total
1izador de Propostas"),t.qZA(),t._UZ(4,"app-kpi-ranking-especialistas",16),t.qZA(),t.BQk()),2&n){const a=t.oxw();t.xp6(4),t.Q6J("totalizador",a.totalizadorEspecialista)}}function dt(n,r){if(1&n&&(t.ynx(0),t.TgZ(1,"div",17)(2,"h5"),t._uU(3,"Totalizador de Vendas"),t.qZA(),t._UZ(4,"app-kpi-ranking-vendas-especialistas",16),t.qZA(),t.BQk()),2&n){const a=t.oxw();t.xp6(4),t.Q6J("totalizador",a.totalizadorVendasEspecialista)}}function ut(n,r){if(1&n&&(t._uU(0," Especialistas "),t._UZ(1,"i",18)),2&n){const a=t.oxw();t.xp6(1),t.Tol(0===a.selectedTabIndex?"color-cherry":"")}}function gt(n,r){if(1&n&&(t._uU(0," Concession\xe1rias "),t._UZ(1,"i",19)),2&n){const a=t.oxw();t.xp6(1),t.Tol(0===a.selectedTabIndex?"":"color-cherry")}}function ht(n,r){1&n&&t._uU(0," Totalizador ")}function mt(n,r){1&n&&t._uU(0," Detalhamento de Propostas ")}function Ct(n,r){if(1&n&&(t.TgZ(0,"mat-tab"),t.YNc(1,mt,1,0,"ng-template",5),t._UZ(2,"app-tabela-detalhamento-propostas",20),t.qZA()),2&n){const a=t.oxw();t.xp6(2),t.Q6J("filtro",a.filtro)}}const Z=function(n){return{display:n}};let _t=(()=>{class n{constructor(a,e){this._especialistasService=a,this._formService=e,this.rankingData=null,this.vendasEspacialistasData=null,this.concessionariasData=null,this.propostaStatusData=null,this.selectedTabIndex=0,this.dataUpdated=new Date,this.loadingData={especialistas:!1,vendasEspecialistas:!1,concessionarias:!1,propostaStatus:!1},this.totalizadorEspecialista=null,this.totalizadorVendasEspecialista=null,this.totalizadorConcessionaria=null,this.setPeriodoFinalizacaoDefault()}ngOnInit(){this.getRankingEspecialistas(),this.getRankingConcessionarias(),this.getRankingVendasEspecialistas(),this.getRankingPropostaStatus()}getRankingEspecialistas(){this.loadingData.especialistas=!0,this._especialistasService.getRankingEspecialistas(this.filtro).pipe((0,C.q)(1),(0,_.x)(()=>{this.loadingData.especialistas=!1,this.dataUpdated=new Date})).subscribe({next:a=>{this.rankingData=a,this.totalizadorEspecialista={totalProposta:a.totalProposta,totalConsumo:a.totalConsumo,totalPreco:a.totalPreco}},error:()=>{this.rankingData=null,this.totalizadorEspecialista=null}})}getRankingVendasEspecialistas(){this.loadingData.vendasEspecialistas=!0,this._especialistasService.getRankingVendasEspecialistas(this.filtro).pipe((0,C.q)(1),(0,_.x)(()=>{this.loadingData.vendasEspecialistas=!1,this.dataUpdated=new Date})).subscribe({next:a=>{this.vendasEspacialistasData=a,this.totalizadorVendasEspecialista={totalProposta:a.totalProposta,totalConsumo:a.totalConsumo,totalPreco:a.totalPreco}},error:()=>{this.vendasEspacialistasData=null,this.totalizadorVendasEspecialista=null}})}getRankingConcessionarias(){this.loadingData.concessionarias=!0,this._especialistasService.getRankingConcessionarias(this.filtro).pipe((0,C.q)(1),(0,_.x)(()=>{this.loadingData.concessionarias=!1,this.dataUpdated=new Date})).subscribe({next:a=>{this.concessionariasData=a,this.totalizadorConcessionaria={totalProposta:a.totalProposta,totalConsumo:a.totalConsumo,totalPreco:a.totalPreco}},error:()=>{this.concessionariasData=null,this.totalizadorConcessionaria=null}})}getRankingPropostaStatus(){this.loadingData.propostaStatus=!0,this._especialistasService.getRankingPropostaStatus(this.filtro).pipe((0,C.q)(1),(0,_.x)(()=>{this.loadingData.propostaStatus=!1,this.dataUpdated=new Date})).subscribe({next:a=>this.propostaStatusData=a,error:()=>this.propostaStatusData=null})}search(a){this.filtro=a,this.getRankingEspecialistas(),this.getRankingConcessionarias(),this.getRankingVendasEspecialistas(),this.getRankingPropostaStatus(),this.dataUpdated=new Date}onTabChange(a){this.selectedTabIndex=a.index}setPeriodoFinalizacaoDefault(){const a=new Date,e=new Date;e.setMonth(e.getMonth()-3),this.filtro={dataInicialFinalizacaoProposta:this._formService.formatDate(e),dataFinalFinalizacaoProposta:this._formService.formatDate(a)}}}return n.\u0275fac=function(a){return new(a||n)(t.Y36(U.n),t.Y36(ct.o))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-rankeamento-especialistas"]],standalone:!0,features:[t.jDz],decls:27,vars:42,consts:[[3,"isRankeamento","isDashboard","filtro","onSearch"],[1,"charts-container",3,"ngStyle"],[1,"totalizador-container"],[4,"ngIf"],["animationDuration","0ms","mat-align-tabs","center",3,"selectedTabChange"],["mat-tab-label",""],[1,"chart-row","mt-0","pt-0"],[1,"w-100",3,"vendasContent","content","loadingData","type","selectedTabIndex","propostaStatusData"],[1,"w-100",3,"content","loadingData","type","selectedTabIndex"],["animationDuration","0ms",3,"ngStyle"],[3,"content","totalizador","loadingData"],[1,"ampere-container","px-3",3,"ngStyle"],[1,"ampere-table-container","mt-0"],[1,"ampere-table"],[3,"flag","filtro"],[1,"kpi-especialistas"],[3,"totalizador"],[1,"kpi-vendas"],[1,"fas","fa-users","ms-2","tab-icon"],[1,"fas","fa-solar-panel","ms-2","tab-icon"],[3,"filtro"]],template:function(a,e){if(1&a&&(t.TgZ(0,"app-especialistas-filtro",0),t.NdJ("onSearch",function(o){return e.search(o)}),t.qZA(),t.TgZ(1,"div",1),t.ALo(2,"isDataLoading"),t.TgZ(3,"div",2),t.YNc(4,pt,5,1,"ng-container",3),t.YNc(5,dt,5,1,"ng-container",3),t.qZA(),t.TgZ(6,"mat-tab-group",4),t.NdJ("selectedTabChange",function(o){return e.onTabChange(o)}),t.TgZ(7,"mat-tab"),t.YNc(8,ut,2,2,"ng-template",5),t.TgZ(9,"div",6),t._UZ(10,"app-ch
1art-ranking-propostas-especialista",7),t.qZA()(),t.TgZ(11,"mat-tab"),t.YNc(12,gt,2,2,"ng-template",5),t.TgZ(13,"div",6),t._UZ(14,"app-chart-ranking-propostas-especialista",8),t.qZA()()()(),t.TgZ(15,"mat-tab-group",9),t.ALo(16,"isDataLoading"),t.TgZ(17,"mat-tab"),t.YNc(18,ht,1,0,"ng-template",5),t._UZ(19,"app-tabela-ranking-especialista",10),t.qZA(),t.YNc(20,Ct,3,1,"mat-tab",3),t.qZA(),t.TgZ(21,"div",11),t.ALo(22,"isDataLoading"),t.TgZ(23,"div",12)(24,"div",13),t._UZ(25,"app-ampere-table-handler",14),t.ALo(26,"isDataLoading"),t.qZA()()()),2&a){let i;t.Q6J("isRankeamento",!0)("isDashboard",!1)("filtro",e.filtro),t.xp6(1),t.Q6J("ngStyle",t.VKq(36,Z,t.xi3(2,24,e.loadingData,e.dataUpdated)?"none":"")),t.xp6(3),t.Q6J("ngIf",e.totalizadorEspecialista),t.xp6(1),t.Q6J("ngIf",e.totalizadorVendasEspecialista),t.xp6(5),t.Q6J("vendasContent",null==e.vendasEspacialistasData?null:e.vendasEspacialistasData.content)("content",null!==(i=null==e.rankingData?null:e.rankingData.content)&&void 0!==i?i:null)("loadingData",e.loadingData.especialistas)("type","especialista")("selectedTabIndex",e.selectedTabIndex)("propostaStatusData",e.propostaStatusData),t.xp6(4),t.Q6J("content",null==e.concessionariasData?null:e.concessionariasData.content)("loadingData",e.loadingData.concessionarias)("type","concessionarias")("selectedTabIndex",e.selectedTabIndex),t.xp6(1),t.Q6J("ngStyle",t.VKq(38,Z,t.xi3(16,27,e.loadingData,e.dataUpdated)?"none":"")),t.xp6(4),t.Q6J("content",0===e.selectedTabIndex?null==e.rankingData?null:e.rankingData.content:null==e.concessionariasData?null:e.concessionariasData.content)("totalizador",e.totalizadorEspecialista)("loadingData",e.loadingData.especialistas),t.xp6(1),t.Q6J("ngIf",0===e.selectedTabIndex),t.xp6(1),t.Q6J("ngStyle",t.VKq(40,Z,t.xi3(22,30,e.loadingData,e.dataUpdated)?"":"none")),t.xp6(4),t.Q6J("flag",t.xi3(26,33,e.loadingData,e.dataUpdated))("filtro",null)}},dependencies:[d.ez,d.O5,d.PC,z,lt.T,F,G,P.Nh,P.SP,P.uD,P.uX,at,st,O.t,rt],styles:[".charts-container[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column}.charts-container[_ngcontent-%COMP%]   .totalizador-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;gap:15px;margin:1rem 0;position:relative;min-height:20vh}.charts-container[_ngcontent-%COMP%]   .totalizador-container[_ngcontent-%COMP%]   .kpi-especialistas[_ngcontent-%COMP%], .charts-container[_ngcontent-%COMP%]   .totalizador-container[_ngcontent-%COMP%]   .kpi-vendas[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:0 1rem}.charts-container[_ngcontent-%COMP%]   .totalizador-container[_ngcontent-%COMP%]   .kpi-especialistas[_ngcontent-%COMP%]   h5[_ngcontent-%COMP%], .charts-container[_ngcontent-%COMP%]   .totalizador-container[_ngcontent-%COMP%]   .kpi-vendas[_ngcontent-%COMP%]   h5[_ngcontent-%COMP%]{margin:0}.charts-container[_ngcontent-%COMP%]   i.tab-icon[_ngcontent-%COMP%]{padding:.5rem;border:solid 2px;border-radius:50%;margin:0 .2rem;color:#939598}.charts-container[_ngcontent-%COMP%]   .chart-row[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;margin:1rem 0;padding:1rem}.charts-container[_ngcontent-%COMP%]   .chart-row[_ngcontent-%COMP%]   .chart[_ngcontent-%COMP%]{width:50%;padding:1rem;border-radius:4px;box-shadow:0 0 8px #0000004d}@media screen and (max-width: 768px){.charts-container[_ngcontent-%COMP%]   .chart-row[_ngcontent-%COMP%]   .chart[_ngcontent-%COMP%]{width:100%}}"]}),n})()}}]);

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.