1"use strict";(self.webpackChunkaisbackend=self.webpackChunkaisbackend||[]).push([[207],{80207:(zs,ve,v)=>{v.r(ve),v.d(ve,{ReportsModule:()=>Ys});var g=v(69808),M=v(81810),u=v(49671),h=v(76704),p=v(15439);class V{constructor(){this.pageurl="",this.searchby="",this.customerid="",this.studentid="",this.schoolid="",this.pageno=1,this.itemperpage=10,this.pagename="",this.searchbytype="",this.fromdate="",this.todate="",this.fromtime="00:00:00",this.totime="20:59:59",this.pdfexcel=""}}class Pe{constructor(){this.searchby="",this.searchbytype="",this.datefilter="",this.fromdate="",this.todate="",this.itemperpage=10,this.vehicleid="",this.fromtime="",this.totime="",this.pageno=1,this.pageurl="/",this.pdfexcel="",this.pagename=""}}class te{constructor(){this.pageno=1,this.itemperpage=10,this.searchby="",this.searchbytype="",this.vehicleid="",this.alertid="",this.fromdate="",this.todate="",this.fromtime="",this.totime="",this.pagename="",this.pageurl="",this.pdfexcel=""}}class Te{constructor(){this.pageurl="",this.searchby="",this.studentid="",this.schoolid="",this.pageno=1,this.itemperpage=10,this.pagename="",this.searchbytype="",this.fromdate="",this.todate="",this.fromtime="00:00:00",this.totime="20:59:59",this.pdfexcel=""}}class G{constructor(){this.searchby="",this.searchbytype="",this.itemperpage=10,this.pageno=1,this.pagename="",this.pageurl="",this.pdfexcel="",this.vehicleid="",this.customerid="",this.fromdate="",this.todate="",this.fromtime="",this.totime=""}}class Ze{constructor(){this.searchby="",this.searchbytype="",this.fromdate="",this.todate="",this.fromtime="",this.totime="",this.vehicleid="",this.itemperpage="10",this.pageno="1",this.pagename="",this.pageurl="",this.instancetime=5,this.pdfexcel="",this.vehicleno=""}}class xe{constructor(){this.pagename="",this.pageurl="/report/apilogreport",this.searchby="",this.searchbytype="",this.pageno=1,this.itemperpage=10,this.fromdate="",this.todate="",this.fromtime="",this.totime="",this.roleid="",this.userid="",this.pdfexcel="",this.pageid=""}}class ye{constructor(){this.pageurl="",this.searchby="",this.customerid="",this.pageno=1,this.itemperpage=10,this.pagename="",this.searchbytype="",this.vehicleidList=[],this.fromdate="",this.todate="",this.fromtime="00:00:00",this.totime="20:59:59",this.pdfexcel=""}}class W{constructor(){this.vehicleid="",this.vehicleno="",this.deviceimeino="",this.gpsfromdate="",this.gpstodate="",this.gpsdistance="",this.flocation="",this.tlocation="",this.duration="",this.gpscount="",this.idletime="",this.workingtime="",this.stoppagetime="",this.maxspeed="",this.avgspeed="",this.customerid="",this.customername="",this.rowno=""}}class Qe{constructor(){this.vehicleid="",this.vehicleno="",this.deviceimeino="",this.gpsfromdate="",this.gpstodate="",this.gpsdistance="",this.maxspeed="",this.workingtime="",this.idletime="",this.stoppagetime="",this.flocation="",this.tlocation="",this.duration="",this.rowno=""}}class Ve{constructor(){this.rowno="",this.vehicleid="",this.vehicleno="",this.poiid="",this.poiname="",this.intime="",this.isout="",this.outtime="",this.slatitude="",this.slongitude="",this.elatitude="",this.elongitude="",this.deviceimeino=""}}class Ce{constructor(){this.vehicleid="",this.vehicleno="",this.deviceimeino="",this.latitude="",this.longitude="",this.speed="",this.location="",this.rowno="",this.starttime="",this.endtime="",this.duration="",this.imeino=""}}class Ee{constructor(){this.vehicleid="",this.vehicleno="",this.rowno="",this.startdate="",this.enddate="",this.startlocation="",this.endlocation="",this.distance="",this.maxspeed="",this.track="",this.runningtime="",this.idletime="",this.stoppagetime=""}}class Ae{constructor(){this.rowno="",this.tripid="",this.tripname="",this.vehicleid="",this.vehicleno="",this.startpoiid="",this.startpoint="",this.endpoiid="",this.endpoint="",this.starttime="",this.endtime="",this.tripdistance="",this.stoppagedetails=[],this.deviceimeino="",this.routeid=""}}var y=v(74888),e=v(5e3),S=v(85307),U=v(80062),N=v(57087),F=v(82849),D=v(82499),J=v(95734),c=v(52382),A=v(28788),C=v(96638),Y=v(78483);const ze=["reportForm"];function He(n,a){if(1&n&&(e.TgZ(0,"ng-option",97),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function $e(n,a){1&n&&(e.TgZ(0,"span",100),e._uU(1,"Filter type is mandatory"),e.qZA())}function Be(n,a){if(1&n&&(e.TgZ(0,"span",98),e.YNc(1,$e,2,0,"span",99),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}const oe=function(n,a){return{"is-valid":n,"ng-error":a}};function Ge(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",12)(1,"div",13)(2,"label",14),e._uU(3,"Filter Type "),e.TgZ(4,"span",93),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",94,95),e.NdJ("ngModelChange",function(i){return e.CHM(t),e.oxw().roleTypeObj=i})("change",function(){return e.CHM(t),e.oxw().onChangeCustomerType()}),e.YNc(8,He,2,2,"ng-option",18),e.qZA(),e.YNc(9,Be,2,1,"span",96
1),e.qZA()()}if(2&n){const t=e.MAs(7),o=e.oxw(),i=e.MAs(13);e.xp6(6),e.Q6J("ngClass",e.WLB(6,oe,t.valid,t.invalid&&i.submitted))("ngModel",o.roleTypeObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",o.roleList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||i.submitted))}}function We(n,a){if(1&n&&(e.TgZ(0,"ng-option",97),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function Ke(n,a){if(1&n&&(e.TgZ(0,"span",100),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.hij("",t.customerTypeName," name is mandatory")}}function Xe(n,a){if(1&n&&(e.TgZ(0,"span",98),e.YNc(1,Ke,2,1,"span",99),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function et(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",12)(1,"div",13)(2,"label",101),e._uU(3),e.TgZ(4,"span",93),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",102,103),e.NdJ("ngModelChange",function(i){return e.CHM(t),e.oxw().customerNameObj=i})("change",function(){return e.CHM(t),e.oxw().onChangeCustomerList()}),e.YNc(8,We,2,2,"ng-option",18),e.qZA(),e.YNc(9,Xe,2,1,"span",96),e.qZA()()}if(2&n){const t=e.MAs(7),o=e.oxw(),i=e.MAs(13);e.xp6(3),e.hij("",o.customerTypeName," List"),e.xp6(3),e.MGl("placeholder","Select ",o.customerTypeName," "),e.Q6J("ngClass",e.WLB(8,oe,t.valid,t.invalid&&i.submitted))("ngModel",o.customerNameObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",o.customerList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||i.submitted))}}function tt(n,a){if(1&n&&(e.TgZ(0,"ng-option",97),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function ot(n,a){1&n&&(e.TgZ(0,"span",106),e._uU(1,"Vehicle is mandatory"),e.qZA())}function nt(n,a){if(1&n&&(e.TgZ(0,"span",104),e.YNc(1,ot,2,0,"span",105),e.qZA()),2&n){e.oxw();const t=e.MAs(24);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function it(n,a){if(1&n&&(e.TgZ(0,"div",20)(1,"span",37),e._uU(2,"Vehicle :"),e.qZA(),e.TgZ(3,"span",38),e._uU(4),e.qZA(),e._UZ(5,"br"),e.TgZ(6,"span",107),e._uU(7),e.qZA()()),2&n){const t=e.oxw();e.xp6(4),e.hij(" ",t.busNumber,""),e.xp6(3),e.Oqu(t.customerName)}}function rt(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.lnq("Showing ",t.recordFrom," To ",t.recordTo," (Out Of ",t.totalCount,")Entries")}}function at(n,a){1&n&&(e.TgZ(0,"option",108),e._uU(1,"20"),e.qZA())}function st(n,a){1&n&&(e.TgZ(0,"option",109),e._uU(1,"50"),e.qZA())}function lt(n,a){1&n&&(e.TgZ(0,"option",110),e._uU(1,"100"),e.qZA())}function ct(n,a){if(1&n&&(e.TgZ(0,"option",97),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.Q6J("value",t.totalCount),e.xp6(1),e.hij(" ",t.totalCount," ")}}function pt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",67),e.NdJ("click",function(i){return e.CHM(t),e.oxw().sorting(i,"vehicleno")}),e._uU(1,"Vehicle No."),e._UZ(2,"i",68),e.qZA()}}function mt(n,a){1&n&&(e.TgZ(0,"tbody")(1,"tr")(2,"td",111)(3,"div",112),e._uU(4,"No Record Found"),e.qZA()()()())}function dt(n,a){if(1&n&&(e.TgZ(0,"td"),e._uU(1),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(""==t.vehicleno?"Not Found":t.vehicleno)}}function ut(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"tr")(1,"td",114),e._uU(2),e.qZA(),e.YNc(3,dt,2,1,"td",45),e.TgZ(4,"td"),e._uU(5),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.qZA(),e.TgZ(10,"td"),e._uU(11),e.qZA(),e.TgZ(12,"td"),e._uU(13),e.qZA(),e.TgZ(14,"td",115)(15,"span",116),e._uU(16),e.qZA()(),e.TgZ(17,"td",115)(18,"span",117),e._uU(19),e.qZA()(),e.TgZ(20,"td",118)(21,"span",119),e._uU(22),e.qZA()(),e.TgZ(23,"td",115),e._uU(24),e.qZA(),e.TgZ(25,"td")(26,"button",120),e.NdJ("click",function(){const r=e.CHM(t).$implicit;return e.oxw(2).trackVehicle(r)}),e._UZ(27,"i",121),e.qZA()()()}if(2&n){const t=a.$implicit,o=e.oxw(2);e.xp6(2),e.Oqu(t.rowno),e.xp6(1),e.Q6J("ngIf",""==o.busNumber),e.xp6(2),e.Oqu(""==t.deviceimeino?"Not Found":t.deviceimeino),e.xp6(2),e.Oqu(""==t.gpsfromdate?"Not Found":t.gpsfromdate),e.xp6(2),e.Oqu(""==t.gpstodate?"Not Found":t.gpstodate),e.xp6(2),e.Oqu(""==t.flocation?"Not Found":t.flocation),e.xp6(2),e.Oqu(""==t.tlocation?"Not Found":t.tlocation),e.xp6(3),e.hij(" ",""==t.
1idletime?"Not Found":t.idletime," "),e.xp6(3),e.hij(" ",""==t.stoppagetime?"Not Found":t.stoppagetime," "),e.xp6(3),e.hij(" ",""==t.workingtime?"Not Found":t.workingtime," "),e.xp6(2),e.Oqu(""==t.maxspeed?"Not Found":t.maxspeed)}}function gt(n,a){if(1&n&&(e.TgZ(0,"tbody"),e.YNc(1,ut,28,11,"tr",113),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.detailData)}}function ht(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",122)(1,"ngb-pagination",123),e.NdJ("pageChange",function(i){return e.CHM(t),e.oxw().reportFormRequest.pageno=i})("pageChange",function(){return e.CHM(t),e.oxw().details("pagination")}),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("collectionSize",t.totalCount)("page",t.reportFormRequest.pageno)("maxSize",3)("pageSize",t.reportFormRequest.itemperpage)}}function _t(n,a){1&n&&(e.TgZ(0,"span"),e._UZ(1,"img",126),e.qZA())}function ft(n,a){1&n&&e._UZ(0,"img",127)}function bt(n,a){if(1&n&&(e.TgZ(0,"div")(1,"p",85),e._uU(2),e.qZA(),e.TgZ(3,"p",85),e._uU(4," Ignition : "),e.YNc(5,_t,2,0,"span",45),e.YNc(6,ft,1,0,"img",124),e._uU(7),e.ALo(8,"uppercase"),e.qZA(),e.TgZ(9,"p",85),e._uU(10),e.qZA(),e.TgZ(11,"p",125),e._uU(12),e.qZA()()),2&n){const t=e.oxw();e.xp6(2),e.hij(" Last Polling Time : ",t.mapService.historyVehicleData.pollingdatatime," "),e.xp6(3),e.Q6J("ngIf","on"==t.mapService.historyVehicleData.ignitionstatus.toLowerCase()),e.xp6(1),e.Q6J("ngIf","off"==t.mapService.historyVehicleData.ignitionstatus.toLowerCase()),e.xp6(1),e.hij(" ",e.lcZ(8,6,t.mapService.historyVehicleData.ignitionstatus)," "),e.xp6(3),e.hij("Speed : ",t.mapService.historyVehicleData.speed," Km/hr"),e.xp6(2),e.hij("Location : ",t.mapService.historyVehicleData.location," ")}}function vt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",128),e.NdJ("click",function(){return e.CHM(t),e.oxw().mapService.changeAnimation("play")}),e._uU(1," Play "),e.qZA()}}function Tt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",129),e.NdJ("click",function(){return e.CHM(t),e.oxw().mapService.changeAnimation("pause")}),e._uU(1," Pause "),e.qZA()}}function Zt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",130),e.NdJ("click",function(){return e.CHM(t),e.oxw().mapService.changeAnimation("stop")}),e._uU(1," Stop "),e.qZA()}}const qe=function(n){return{display:n}};let xt=(()=>{class n{constructor(t,o,i,r,s,l,d,m){this.cv=t,this.cs=o,this.loader=i,this.route=r,this.es=s,this.listService=l,this.mapService=d,this.datePipe=m,this.loginRoleId=sessionStorage.getItem("loginroleid"),this.dateObj="",this.reportFormRequest=new V,this.detailData=[],this.apiname="",this.formsection=!0,this.loadersection=!1,this.detailsection=!1,this.pageHeading="Vehicle Summary Report",this.busNumber="",this.dateRange="",this.allVehicleObject={id:"",name:"All"},this.selectedBusList=[],this.roleList=[],this.customerTypeName="",this.customerList=[],this.filterForObj="asondate",this.sortDir=1,this.mapVehicleDetails=new Qe}ngOnInit(){$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"}),this.getDate(),"101"==this.loginRoleId||"600"==this.loginRoleId?this.getRoleList():this.getVehicleList()}getRoleList(){var t=this;return(0,u.Z)(function*(){t.roleList=[],t.roleList=yield t.listService.getRoleList(new h.nO),t.roleList.push({id:"3",name:"vehicle"}),t.roleList=t.roleList.filter(o=>"school"==o.name||"customer"==o.name||"vehicle"==o.name)})()}onChangeCustomerType(){this.roleTypeObj&&(this.vehicleList=[],this.customerTypeName="","school"==this.roleTypeObj.name||"customer"==this.roleTypeObj.name?(this.customerTypeName=this.roleTypeObj.name,this.getCustomerList()):"vehicle"==this.roleTypeObj.name&&this.getVehicleList())}getCustomerList(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;o.filter1=t.roleTypeObj.id,t.customerList=yield t.listService.getCustomerList(o)})()}onChangeCustomerList(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;t.customerNameObj&&("school"==t.roleTypeObj.name?o.filter1=t.customerNameObj.id:"customer"==t.roleTypeObj.name&&(o.filter2=t.customerNameObj.id)),t.vehicleList=yield t.listService.getVehicleList(o)})()}getVehicleList(){var t=this;return(0,u.Z)(function*(){t.vehicleList=yield t.listService.getVehicleList(new h.nO)})()}getDate(){$(()=>{$('input[name="date"]').daterangepicker({showDropdowns:!0,startDate:p().startOf("day").format("DD-MMM-YYYY"),endDate:p().endOf("day").format("DD-MMM-YYYY"),opens:"center",drops:"down",maxSpan:{days:30},locale:{format:"DD-MMM-YYYY"},maxDate:new Date,minYear:2022,maxYear:parseInt(p().format("YYYY"),10),function(t,o){$("#datepicker").html(t.format("DD-MMM-YYYY")+" : "+o.format("DD-MMM-YYYY"))}}),$('input[name="date"]').on("hide.daterangepicker",(t,o)=>{try{this.dateObj=t.target.value}catch(i){}}),this.dateObj=document.getElementById("datepicker").value})}onChangeSchool(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;o.schoolid=t.schoolObj.id,t.vehicleList=yield t.listService.getVehicleList(o)})()}checkAllBus(){this.busNumber="All"==this.busNoObj.name?"":this.busNoObj.name}validateForm(){if(this.reportForm.valid){this.formsection=!1,this.loadersection=!0,this.customerName=this.customerNameObj?this.customerNameObj.name:"",this.reportFormRequest.schoolid=this.customerNameObj?this.customerNameObj.id:"",this.busNoObj&&("All"==this.busNoObj.name?(this.customerName="All",this.reportFormRequest.vehicleid="all"):(this.customerName=this.busNoObj.customername,this.reportFormRequest.vehicleid=this.busNoObj?this.busNoObj.id:""));let t=this.dateObj.split(" - ");this.reportFormRequest.fromdate=t[0],this.reportFormRequest.todate=t[1],this.reportFormRequest.fromtime=document.getElementById("fromtime").value.replace(" ","").replace(" ",""),this.reportFormRequest.totime=document.getElementById("totime").value.replace(" ","").replace(" ",""),this.dateRange=this.reportFormRequest.fromdate+" "+this.reportFormRequest.fromtime+" To "+this.reportFormRequest.todate+" "+this.reportFormRequest.totime,this.details("refresh")}}details(t){try{this.loader.loaderOff()}catch(o){}"showrow"==t&&(this.reportFormRequest.pageno=1),"search"==t&&(this.reportFormRequest.pageno=1),"refresh"==t&&(this.reportFormRequest.searchby="",this.reportFormRequest.pageno=1,this.reportFormRequest.itemperpage=10),this.reportFormRequest.searchby=this.reportFormRequest.searchby.trim(),this.formsection=!1,this.loadersection=!0;try{this.loader.loaderOn()}catch(o){}this.es.apiCall(this.reportFormRequest,"vehiclesummary").subscribe(o=>{try{this.loader.loaderOff()}catch(i){}200==o.statusCode?(this.detailData=o.entity.vehiclesummaryreport,this.customerName=o.entity.customername?o.entity.customername:"",this.totalCount=+o.entity.totalrecord,this.recordFrom=this.detailData[0].rowno,this.recordTo=this.detailData[this.detailData.length-1].rowno,this.loadersection=!1,this.formsection=!1,this.detailsection=!0):(this.detailData=[],this.recordTo=0,this.recordFrom=0,this.totalCount=0,this.reportFormRequest.searchby="",this.detailsection=!0,this.formsection=!1,this.loadersection=!1),this.es.pageDataInfo("",this.reportFormRequest,"Vehicle Summary Report","Details method","Called Function",o.message)},o=>{})}redirectToForm(){this.formsection=!0,this.loadersection=!1,this.detailsection=!1}ResetForm(){this.reportForm.resetForm(),this.formsection=!0,this.detailsection=!1,this.getDate(),setTimeout(()=>{$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"})},1500),this.getRoleList(),this.roleTypeObj=null,this.customerNameObj=null,this.schoolObj=null,this.busNoObj=null,this.vehicleList=[]}sorting(t,o){try{let r=t.currentTarget.childNodes[1].classList;try{r.contains("fa-sort-amount-desc")?(r.remove("fa-sort-amount-desc"),r.add("fa-sort-amount-asc")):(r.remove("fa-sort-amount-asc"),r.add("fa-sort-amount-desc"))}catch(s){console.log("e "+s)}this.sortDir=1==this.sortDir?-1:1;try{this.detailData.length>0&&this.detailData.sort((s,l)=>(s=s[o].toLowerCase(),l=l[o].toLowerCase(),s.localeCompare(l)*this.sortDir))}catch(s){console.log("e "+s)}}catch(i){}}trackVehicle(t){this.mapVehicleDetails=t;let o=new y.rn;o.imeino=t.deviceimeino,o.vehicleid=t.vehicleid,o.fromdate=this.datePipe.transform(t.gpsfromdate,"dd-MMM-yyyy"),o.fromtime=this.datePipe.transform(t.gpsfromdate,"hh:mm:ss a"),o.todate=this.datePipe.transform(t.gpstodate,"dd-MMM-yyyy"),o.totime=this.datePipe.transform(t.gpstodate,"hh:mm:ss a"),this.mapService.trackHistoryVehicle(o.imeino,o.fromdate,o.fromtime,o.todate,o.totime,o.vehicleid,"",!1,!1,new y.Us)}downloadDoc(t){let o=new V;o.pdfexcel=t,o.itemperpage="",o.pageno="",o.vehicleid=this.reportFormRequest.vehicleid,o.fromdate=this.reportFormRequest.fromdate,o.todate=this.reportFormRequest.todate,o.searchby=this.reportFormRequest.searchby.trim();try{this.loader.loaderOn()}catch(i){}this.es.apiCall(o,"vehiclesummary").subscribe(i=>{try{this.loader.loaderOff()}catch(r){}"200"==i.statusCode&&(this.filePath=i.message,this.es.commonFileDownload(this.filePath)),o.pdfexcel="",this.es.pageDataInfo("",this.reportFormRequest,"Vehicle Summary Report","Download PDF/Excel method","Called Function",i.message)})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(S.R),e.Y36(U.v),e.Y36(N.D),e.Y36(M.F0),e.Y36(F.P),e.Y36(D.X),e.Y36(J.S),e.Y36(g.uU))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-vehicle-summary-report"]],viewQuery:function(t,o){if(1&t&&e.Gf(ze,5),2&t){let i;e.iGM(i=e.CRH())&&(o.reportForm=i.first)}},decls:175,vars:49,consts:[[1,"report-form-container","p-1"],[1,"d-flex","align-items-center","mb-3"],[1,"me-3"],["aria-hidden","true",1,"fa","fa-car","fa-1x","text-primary"],[1,"mb-0","fw-bold","rptheadertext"],[1,"text-muted"],[1,"container-fluid",3,"ngStyle"],[1,"row"],[1,"col-md-12"],["novalidate","","id","form_id","autocomplete","off",1,"needs-validation"],["reportForm","ngForm"],["class","col-md-2",4,"ngIf"],[1,"col-md-2"],[1,"form-group"],[1,"mb-0","label"],[1,"starvalid"],["name","vehicleNumber","placeholder","Select Vehicle","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["busNoCtrl","ngModel"],[3,"value",4,"ngFor","ngForOf"],["class","form-control-feedback text-danger",4,"ngIf"],[1,"col-md-4"],[1,"d-flex","justify-content-between"],[1,"report-label","mb-0"],["type","text","name","date","id","datepicker","required","","placeholder","Select Date",1,"form-control","form-control-sm"],[1,"form-group","mb-0",2,"width","86px","float","left"],[1,"mb-0"],["type","text","name","timepicker","id","fromtime",1,"fromTime","form-control","form-control-sm","text-center"],[1,"form-group",2,"width","85px","float","left"],["type","text","name","timepicker","id","totime",1,"toTime","form-control","form-control-sm","text-center"],[1,"col","mt-3"],["type","submit",1,"custom-btn","btn-13","float-right","Show","mb-3",3,"click"],["type","button",1,"custom-btn","btn-10","float-right","mr-2",3,"click"],[1,"report-form-container"],[1,"row","grid-section",3,"ngStyle"],[1,"row","py-2","report-summary"],["class","col-md-4",4,"ngIf"],[1,"col-md-5"],[1,"fw-bolder","text-small","text-uppercase","outputlabel"],[1,"text-uppercase","text-small","outputlabel"],[1,"col","text-end"],["ngbTooltip","Back",1,"backbtnbackground",3,"click"],["aria-hidden","true",1,"fa","fa-arrow-circle-o-left","outputlabel"],[1,"col-md-12","px-0"],[1,"table-head","d-flex","justify-content-between"],["id","tickets-table_info","role","status","aria-live","polite",1,"col-auto","mt-2","text-center","fw-bold","total-record-label"],[4,"ngIf"],[1,"mt-1"],[1,"itemsperpage-style",2,"margin-right","10px"],[1,"d-inline-flex","align-items-center"],["name","table_length","aria-controls","table","name","pageSize",3,"ngModel","ngModelChange","change"],["value","10","selected",""],["value","20",4,"ngIf"],["value","50",4,"ngIf"],["value","100",4,"ngIf"],[3,"value",4,"ngIf"],["type","button",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"click"],["aria-hidden","true",1,"fa","fa-refresh"],["type","button","ngbTooltip","Download Pdf","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-pdf-o","pdf-btn"],["type","button","ngbTooltip","Download Excel","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-excel-o","excel-btn"],["type","text","name","searchTerm","autocomplete","off","aria-controls","tickets-table","placeholder","Search here....","autocomplete","off",1,"form-control","form-control-sm","ms-2","searchinput",2,"width","165px",3,"ngModel","ngModelChange"],["type","button",1,"btn","search-btn",3,"click"],[1,"fa","fa-search"],[1,"scroll-tbl"],[1,"table","table-striped","table-style",2,"overflow-y","auto","overflow-x","auto"],[3,"click",4,"ngIf"],[3,"click"],[1,"fa","fa-sort-amount-desc"],[2,"width","126px",3,"click"],[2,"width","129px",3,"click"],[2,"width","170px",3,"click"],[1,"fa","fa-map-marker","fa-2x"],[1,"row","justify-content-md-between","align-items-md-center","mt-2"],["class","float-end text-start",4,"ngIf"],["id","exampleModal","tabindex","-1","data-bs-backdrop","static","data-bs-keyboard","false","aria-labelledby","exampleModalLabel","aria-hidden","true",1,"modal","fade"],[1,"modal-dialog","modal
1-xl"],[1,"modal-content"],[1,"modal-header","bg-white"],["id","exampleModalLabel",1,"modal-title"],["type","button","data-bs-dismiss","modal","aria-label","Close",1,"btn-close",3,"click"],[1,"modal-body","p-0"],[2,"width","100%","height","500px"],[1,"current-vehicle-section"],[1,"p-1",2,"max-width","250px","font-size","12px"],[1,"m-0"],["role","group",1,"btn-group"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click"],["type","button","class","btn btn-sm btn-outline-primary","ngbTooltip","Play",3,"click",4,"ngIf"],["type","button","class","btn btn-sm btn-outline-primary","ngbTooltip","Pause",3,"click",4,"ngIf"],["type","button","class","btn btn-sm btn-outline-primary","ngbTooltip","Stop",3,"click",4,"ngIf"],[1,"col-12"],["type","range","min","1000","max","20000",1,"form-range","form-control","form-control-sm",3,"ngModel","change","ngModelChange"],[1,"text-danger"],["name","roletype","placeholder","Select Filter Type ","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["roleTypeCtrl","ngModel"],["class","form-control-feedback text-danger text-danger",4,"ngIf"],[3,"value"],[1,"form-control-feedback","text-danger","text-danger"],["class","text-small",4,"ngIf"],[1,"text-small"],[1,"mb-0","text-capitalize"],["name","customertype","required","",1,"text-capitalize",3,"ngClass","ngModel","multiple","placeholder","closeOnSelect","ngModelChange","change"],["customerNameCtrl","ngModel"],[1,"form-control-feedback","text-danger"],["class","text-small","style"," font-size: 10px;",4,"ngIf"],[1,"text-small",2,"font-size","10px"],[1,"customerNameForSummary"],["value","20"],["value","50"],["value","100"],["colspan","15"],[1,"text-center"],[4,"ngFor","ngForOf"],[1,"srnotd"],[1,"text-end"],[1,"float-end","idle"],[1,"float-end","stop"],[1,"text-end","running"],[1,"float-end","running"],["title","Track Vehicle Distance","data-bs-toggle","modal","data-bs-target","#exampleModal",1,"btn","btn-sm","btn-dark","p-1",3,"click"],[1,"fa","fa-map-marker"],[1,"float-end","text-start"],["size","sm",1,"d-flex","mt-2","justify-content-end","pagination-rounded","pagination","pagination-info",3,"collectionSize","page","maxSize","pageSize","pageChange"],["src","assets/school-management/images/poweroff.png","style","width: 20px;height: 20px;",4,"ngIf"],[1,"m-0",2,"word-wrap","break-word"],["src","assets/school-management/images/poweron.png",2,"width","20px","height","20px"],["src","assets/school-management/images/poweroff.png",2,"width","20px","height","20px"],["type","button","ngbTooltip","Play",1,"btn","btn-sm","btn-outline-primary",3,"click"],["type","button","ngbTooltip","Pause",1,"btn","btn-sm","btn-outline-primary",3,"click"],["type","button","ngbTooltip","Stop",1,"btn","btn-sm","btn-outline-primary",3,"click"]],template:function(t,o){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2),e._UZ(3,"i",3),e.qZA(),e.TgZ(4,"div")(5,"h5",4),e._uU(6,"Vehicle Summary Report"),e.qZA(),e.TgZ(7,"small",5),e._uU(8,"Get a detailed summary of vehicle activity"),e.qZA()()(),e.TgZ(9,"div",6)(10,"div",7)(11,"div",8)(12,"form",9,10)(14,"div",7),e.YNc(15,Ge,10,9,"div",11),e.YNc(16,et,10,11,"div",11),e.TgZ(17,"div",12)(18,"div",13)(19,"label",14),e._uU(20,"Vehicle Number "),e.TgZ(21,"span",15),e._uU(22,"*"),e.qZA()(),e.TgZ(23,"ng-select",16,17),e.NdJ("ngModelChange",function(r){return o.busNoObj=r})("change",function(){return o.checkAllBus()}),e.YNc(25,tt,2,2,"ng-option",18),e.qZA(),e.YNc(26,nt,2,1,"span",19),e.qZA()(),e.TgZ(27,"div",20)(28,"div",21)(29,"div",13)(30,"label",22),e._uU(31,"Date Range:"),e.qZA(),e._UZ(32,"input",23),e.qZA(),e.TgZ(33,"div",24)(34,"label",25),e._uU(35,"Time "),e.qZA(),e._UZ(36,"input",26),e.qZA(),e._uU(37," \xa0\xa0\xa0 "),e.TgZ(38,"div",27),e._UZ(39,"label",25)(40,"input",28),e.qZA()()(),e.TgZ(41,"div",29)(42,"button",30),e.NdJ("click",function(){return o.validateForm()}),e._uU(43,"Generate"),e.qZA(),e._uU(44," \xa0 "),e.TgZ(45,"button",31),e.NdJ("click",function(){return o.ResetForm()}),e._uU(46,"Reset"),e.qZA()()()()()()(),e.TgZ(47,"div",32)(48,"div",33)(49,"div",8)(50,"div",34),e.YNc(51,it,8,2,"div",35),e.TgZ(52,"div",36)(53,"span",37),e._uU(54,"Date :"),e.qZA(),e.TgZ(55,"span",38),e._uU(56),e.qZA()(),e.TgZ(57,"div",39)(58,"button",40),e.NdJ("click",function(){return o.redirectToForm()}),e._UZ(59,"i",41),e.qZA()()()(),e.TgZ(60,"div",42)(61,"div",43)(62,"div",44),e.YNc(63,rt,2,3,"span",45),e.qZA(),e.TgZ(64,"div",46)(65,"span",47)(66,"label",48),e._uU(67,"Show "),e.TgZ(68,"select",49),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.itemperpage=r})("change",function(){return o.details("showrow")}),e.TgZ(69,"option",50),e._uU(70," 10"),e.qZA(),e.YNc(71,at,2,0,"option",51),e.YNc(72,st,2,0,"option",52),e.YNc(73,lt,2,0,"option",53),e.YNc(74,ct,2,2,"option",54),e.qZA(),e._uU(75," entries"),e.qZA()(),e.TgZ(76,"span")(77,"button",55),e.NdJ("click",function(){return o.details("refresh")}),e._UZ(78,"i",56),e.qZA()(),e.TgZ(79,"span")(80,"button",57),e.NdJ("click",function(){return o.downloadDoc("pdf")}
1),e._UZ(81,"i",58),e.qZA(),e.TgZ(82,"button",59),e.NdJ("click",function(){return o.downloadDoc("excel")}),e._UZ(83,"i",60),e.qZA()(),e.TgZ(84,"label")(85,"input",61),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.searchby=r}),e.qZA()(),e.TgZ(86,"button",62),e.NdJ("click",function(){return o.details("search")}),e._UZ(87,"span",63),e.qZA()()(),e.TgZ(88,"div",64)(89,"table",65)(90,"thead")(91,"tr")(92,"th"),e._uU(93,"#"),e.qZA(),e.YNc(94,pt,3,0,"th",66),e.TgZ(95,"th",67),e.NdJ("click",function(r){return o.sorting(r,"vehicleno")}),e._uU(96,"IMEI No."),e._UZ(97,"i",68),e.qZA(),e.TgZ(98,"th",69),e.NdJ("click",function(r){return o.sorting(r,"vehicleno")}),e._uU(99,"From Date"),e._UZ(100,"i",68),e.qZA(),e.TgZ(101,"th",70),e.NdJ("click",function(r){return o.sorting(r,"vehicleno")}),e._uU(102,"To Date"),e._UZ(103,"i",68),e.qZA(),e.TgZ(104,"th",71),e.NdJ("click",function(r){return o.sorting(r,"vehicleno")}),e._uU(105,"From Location"),e._UZ(106,"i",68),e.qZA(),e.TgZ(107,"th",71),e.NdJ("click",function(r){return o.sorting(r,"vehicleno")}),e._uU(108,"To Location"),e._UZ(109,"i",68),e.qZA(),e.TgZ(110,"th",67),e.NdJ("click",function(r){return o.sorting(r,"vehicleno")}),e._uU(111,"Idle Time(MIN)"),e._UZ(112,"i",68),e.qZA(),e.TgZ(113,"th",67),e.NdJ("click",function(r){return o.sorting(r,"vehicleno")}),e._uU(114,"Stop Time(MIN)"),e._UZ(115,"i",68),e.qZA(),e.TgZ(116,"th",67),e.NdJ("click",function(r){return o.sorting(r,"vehicleno")}),e._uU(117,"Run Time(MIN)"),e._UZ(118,"i",68),e.qZA(),e.TgZ(119,"th",67),e.NdJ("click",function(r){return o.sorting(r,"vehicleno")}),e._uU(120,"Max Speed(KM/HR)"),e._UZ(121,"i",68),e.qZA(),e.TgZ(122,"th"),e._UZ(123,"i",72),e.qZA()()(),e.YNc(124,mt,5,0,"tbody",45),e.YNc(125,gt,2,1,"tbody",45),e.qZA()(),e.TgZ(126,"div",73),e.YNc(127,ht,2,4,"div",74),e.qZA()()()(),e.TgZ(128,"div",75)(129,"div",76)(130,"div",77)(131,"div",78)(132,"h5",79)(133,"u"),e._uU(134," Vehicle Summary"),e.qZA(),e._uU(135," of "),e.TgZ(136,"b"),e._uU(137),e.qZA(),e._uU(138," from "),e.TgZ(139,"b"),e._uU(140),e.qZA(),e._uU(141," to "),e.TgZ(142,"b"),e._uU(143),e.qZA()(),e.TgZ(144,"button",80),e.NdJ("click",function(){return o.mapService.clearAllLayers()}),e.qZA()(),e.TgZ(145,"div",81)(146,"div",82),e._UZ(147,"app-helper-map"),e.TgZ(148,"div",83)(149,"div",84),e.YNc(150,bt,13,8,"div",45),e.TgZ(151,"p",85),e._uU(152),e.qZA(),e.TgZ(153,"p",85),e._uU(154),e.qZA(),e.TgZ(155,"p",85),e._uU(156),e.qZA(),e.TgZ(157,"p",85),e._uU(158),e.qZA(),e.TgZ(159,"p",85),e._uU(160),e.qZA(),e.TgZ(161,"p",85),e._uU(162),e.qZA(),e.TgZ(163,"p",85),e._uU(164),e.qZA(),e.TgZ(165,"p",85),e._uU(166),e.qZA(),e.TgZ(167,"div",86)(168,"button",87),e.NdJ("click",function(){return o.mapService.changeAnimation("restart")}),e._uU(169," Start "),e.qZA(),e.YNc(170,vt,2,0,"button",88),e.YNc(171,Tt,2,0,"button",89),e.YNc(172,Zt,2,0,"button",90),e.qZA(),e.TgZ(173,"div",91)(174,"input",92),e.NdJ("change",function(){return o.mapService.changeAnimation("speedchange")})("ngModelChange",function(r){return o.mapService.historySpeed=r}),e.qZA()()()()()()()()()()),2&t){const i=e.MAs(13),r=e.MAs(24);e.xp6(9),e.Q6J("ngStyle",e.VKq(42,qe,o.formsection?"":"none")),e.xp6(6),e.Q6J("ngIf","101"==o.loginRoleId||"600"==o.loginRoleId),e.xp6(1),e.Q6J("ngIf",!("101"!=o.loginRoleId&&"600"!=o.loginRoleId||"school"!=o.customerTypeName&&"customer"!=o.customerTypeName)),e.xp6(7),e.Q6J("ngClass",e.WLB(44,oe,r.valid,r.invalid&&i.submitted))("ngModel",o.busNoObj)("multiple",!1)("closeOnSelect",!1)("closeOnSelect",!1),e.xp6(2),e.Q6J("ngForOf",o.vehicleList),e.xp6(1),e.Q6J("ngIf",r.errors&&(r.dirty||r.touched||i.submitted)),e.xp6(22),e.Q6J("ngStyle",e.VKq(47,qe,o.detailsection?"":"none")),e.xp6(3),e.Q6J("ngIf",""!=o.busNumber),e.xp6(5),e.hij(" ",o.dateRange,""),e.xp6(7),e.Q6J("ngIf",0!=o.totalCount),e.xp6(5),e.Q6J("ngModel",o.reportFormRequest.itemperpage),e.xp6(3),e.Q6J("ngIf",o.totalCount>20),e.xp6(1),e.Q6J("ngIf",o.totalCount>50),e.xp6(1),e.Q6J("ngIf",o.totalCount>100),e.xp6(1),e.Q6J("ngIf",o.totalCount<100&&o.totalCount>10),e.xp6(6),e.Q6J("disabled","0"==o.totalCount),e.xp6(2),e.Q6J("disabled","0"==o.totalCount),e.xp6(3),e.Q6J("ngModel",o.reportFormRequest.searchby),e.xp6(9),e.Q6J("ngIf",""==o.busNumber),e.xp6(30),e.Q6J("ngIf",0==o.totalCount),e.xp6(1),e.Q6J("ngIf",0!=o.totalCount),e.xp6(2),e.Q6J("ngIf",o.totalCount>o.reportFormRequest.itemperpage),e.xp6(10),e.hij("",o.mapVehicleDetails.vehicleno," "),e.xp6(3),e.hij(" ",o.mapVehicleDetails.gpsfromdate,""),e.xp6(3),e.hij("",o.mapVehicleDetails.gpstodate," "),e.xp6(7),e.Q6J("ngIf",o.mapService.historyVehicleData.pollingdatatime),e.xp6(2),e.hij("Start Date : ",o.mapVehicleDetails.gpsfromdate,""),e.xp6(2),e.hij("End Date : ",o.mapVehicleDetails.gpstodate,""),e.xp6(2),e.hij("Total Distance : ",o.mapVehicleDetails.gpsdistance," km"),e.xp6(2),e.hij("Duration : ",o.mapVehicleDetails.duration," "),e.xp6(2),e.hij("Max Speed : ",o.mapVehicleDetails.maxspeed," Km/hr"),e.xp6(2),e.hij("Stop Time : ",o.mapVehicleDetails.stoppagetime," min"),e.xp6(2),e.hij("Idle Time : ",o.mapVehicleDetails.idletime," min"),e.xp6(2),e.hij("Running Time : ",o.mapVehicleDetails.workingtime," min"),e.xp6(4),e.Q6J("ngIf","running"!=o.mapService.animationStatus&&"paused"==o.mapService.animationStatus),e.xp6(1),e.Q6J("ngIf","running"==o.mapService.animationStatus),e.xp6(1),e.Q6J("ngIf","stopped"!=o.mapService.animationStatus),e.xp6(2),e.Q6J("ngModel",o.mapService.historySpeed)}},directives:[g.PC,c._Y,c.JL,c.F,g.O5,A.w9,c.Q7,g.mk,c.JJ,c.On,g.sg,A.xv,C._L,c.EJ,c.YN,c.Kr,c.Fj,C.N9,Y.F,c.eT],pipes:[g.gd],styles:[".ng-select.ng-select-single .ng-select-container .ng-value-container{font-size:12px!important} .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{font-size:12px!important;text-transform:capitalize}ng-select.ng-select-single[_ngcontent-%COMP%] .ng-select-container{min-height:26px;max-height:26px;height:26px}.form-control[_ngcontent-%COMP%]{height:calc(1.45rem + 2px)}.invalid-feedback[_ngcontent-%COMP%]{font-size:11px;color:#dc3545}input[_ngcontent-%COMP%]{font-size:12px}.starvalid[_ngcontent-%COMP%]{color:#ff0040!important}.validationmsg[_ngcontent-%COMP%]{--bs-text-opacity: 1;color:#ff0040!important;font-weight:600}.shimmerBG[_ngcontent-%COMP%]{animation-duration:2.2s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:shimmer;animation-timing-function:linear;background:#E5F0FB;background:linear-gradient(to right,#cfeeeb 4%,#9ac9c6 25%,#d5f0f0 36%);background-size:1100px 100%}@keyframes shimmer{0%{background-position:-1200px 0}to{background-position:1200px 0}}.media[_ngcontent-%COMP%]{height:110px}.p-32[_ngcontent-%COMP%]{padding:32px}.title-line[_ngcontent-%COMP%]{height:24px;width:100%;margin-bottom:12px;border-radius:20px}.content-line[_ngcontent-%COMP%]{height:8px;width:100%;margin-bottom:16px;border-radius:8px}.end[_ngcontent-%COMP%]{width:40%}.m-t-24[_ngcontent-%COMP%]{margin-top:24px}.rptheadertext[_ngcontent-%COMP%]{text-decoration:underline}.rptlabel[_ngcontent-%COMP%]{color:#000}.outputlabel[_ngcontent-%COMP%]{color:#003c75}.backbtn[_ngcontent-%COMP%]{float:right;margin-left:25%!important;margin-top:0%!important}.srnotd[_ngcontent-%COMP%]{background-color:#f2f2f2}.form-group[_ngcontent-%COMP%]{margin-bottom:.2rem}.running[_ngcontent-%COMP%]{color:green;font-weight:700}.stop[_ngcontent-%COMP%]{color:#00f;font-weight:700}.non-polling[_ngcontent-%COMP%]{color:gray;font-weight:700}
1.idle[_ngcontent-%COMP%]{color:#ff5e00;font-weight:700}"]}),n})();const yt=["reportForm"];function Ct(n,a){if(1&n&&(e.TgZ(0,"ng-option",18),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function At(n,a){1&n&&(e.TgZ(0,"span",32),e._uU(1,"School is mandatory"),e.qZA())}function qt(n,a){if(1&n&&(e.TgZ(0,"span",30),e.YNc(1,At,2,0,"span",31),e.qZA()),2&n){e.oxw();const t=e.MAs(19);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function Ot(n,a){if(1&n&&(e.TgZ(0,"ng-option",18),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function Rt(n,a){1&n&&(e.TgZ(0,"span",32),e._uU(1,"Vehicle is mandatory"),e.qZA())}function kt(n,a){if(1&n&&(e.TgZ(0,"span",30),e.YNc(1,Rt,2,0,"span",31),e.qZA()),2&n){e.oxw();const t=e.MAs(29);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function wt(n,a){if(1&n&&(e.TgZ(0,"div",71)(1,"span",36),e._uU(2,"Vehicle :"),e.qZA(),e.TgZ(3,"span",37),e._uU(4),e.qZA()()),2&n){const t=e.oxw(2);e.xp6(4),e.hij(" ",t.busNumber,"")}}function Mt(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.lnq("Showing ",t.recordFrom," To ",t.recordTo," (Out Of ",t.totalCount,")Entries")}}function Nt(n,a){1&n&&(e.TgZ(0,"option",72),e._uU(1,"20"),e.qZA())}function Ft(n,a){1&n&&(e.TgZ(0,"option",73),e._uU(1,"50"),e.qZA())}function St(n,a){1&n&&(e.TgZ(0,"option",74),e._uU(1,"100"),e.qZA())}function Ut(n,a){if(1&n&&(e.TgZ(0,"option",18),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.Q6J("value",t.totalCount),e.xp6(1),e.hij(" ",t.totalCount," ")}}function Dt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",67),e.NdJ("click",function(i){return e.CHM(t),e.oxw(2).sorting(i,"vehicleno")}),e._uU(1,"Vehicle No."),e._UZ(2,"i",68),e.qZA()}}function It(n,a){1&n&&(e.TgZ(0,"tbody")(1,"tr")(2,"td",75)(3,"div",76),e._uU(4,"No Record Found"),e.qZA()()()())}function Jt(n,a){if(1&n&&(e.TgZ(0,"td"),e._uU(1),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(""==t.vehicleno?"Not Found":t.vehicleno)}}function Lt(n,a){if(1&n&&(e.TgZ(0,"tr")(1,"td",78),e._uU(2),e.qZA(),e.YNc(3,Jt,2,1,"td",45),e.TgZ(4,"td"),e._uU(5),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.qZA(),e.TgZ(10,"td"),e._uU(11),e.qZA()()),2&n){const t=a.$implicit,o=e.oxw(3);e.xp6(2),e.Oqu(t.rowno),e.xp6(1),e.Q6J("ngIf",""==o.busNumber),e.xp6(2),e.Oqu(""==t.imeino?"Not Found":t.imeino),e.xp6(2),e.Oqu(""==t.starttime?"Not Found":t.starttime),e.xp6(2),e.Oqu(""==t.endtime?"Not Found":t.endtime),e.xp6(2),e.Oqu(""==t.duration?"Not Found":t.duration)}}function Yt(n,a){if(1&n&&(e.TgZ(0,"tbody"),e.YNc(1,Lt,12,6,"tr",77),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t.detailData)}}function jt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",79)(1,"ngb-pagination",80),e.NdJ("pageChange",function(i){return e.CHM(t),e.oxw(2).reportFormRequest.pageno=i})("pageChange",function(){return e.CHM(t),e.oxw(2).details("")}),e.qZA()()}if(2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("collectionSize",t.totalCount)("page",t.reportFormRequest.pageno)("maxSize",3)("pageSize",t.reportFormRequest.itemperpage)}}function Pt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",33)(1,"div",5)(2,"div",34)(3,"div",35)(4,"span",36),e._uU(5,"School :"),e.qZA(),e.TgZ(6,"span",37),e._uU(7),e.qZA()(),e.YNc(8,wt,5,1,"div",38),e.TgZ(9,"div",35)(10,"span",36),e._uU(11,"Date :"),e.qZA(),e.TgZ(12,"span",37),e._uU(13),e.qZA()(),e.TgZ(14,"div",39)(15,"button",40),e.NdJ("click",function(){return e.CHM(t),e.oxw().redirectToForm()}),e._UZ(16,"i",41),e.qZA()()()(),e.TgZ(17,"div",42)(18,"div",43)(19,"div",44),e.YNc(20,Mt,2,3,"span",45),e.qZA(),e.TgZ(21,"div",46)(22,"span",47)(23,"label",48),e._uU(24,"Show "),e.TgZ(25,"select",49),e.NdJ("ngModelChange",function(i){return e.CHM(t),e.oxw().reportFormRequest.itemperpage=i})("change",function(){return e.CHM(t),e.oxw().details("showrow")}),e.TgZ(26,"option",50),e._uU(27," 10"),e.qZA(),e.YNc(28,Nt,2,0,"option",51),e.YNc(29,Ft,2,0,"option",52),e.YNc(30,St,2,0,"option",53),e.YNc(31,Ut,2,2,"option",54),e.qZA(),e._uU(32," entries"),e.qZA()(),e.TgZ(33,"span")(34,"button",55),e.NdJ("click",function(){return e.CHM(t),e.oxw().details("refresh")}),e._UZ(35,"i",56),e.qZA()(),e.TgZ(36,"span")(37,"button",57),e.NdJ("click",function(){return e.CHM(t),e.oxw().downloadDoc("pdf")}
1),e._UZ(38,"i",58),e.qZA(),e.TgZ(39,"button",59),e.NdJ("click",function(){return e.CHM(t),e.oxw().downloadDoc("excel")}),e._UZ(40,"i",60),e.qZA()(),e.TgZ(41,"label")(42,"input",61),e.NdJ("ngModelChange",function(i){return e.CHM(t),e.oxw().reportFormRequest.searchby=i}),e.qZA()(),e.TgZ(43,"button",62),e.NdJ("click",function(){return e.CHM(t),e.oxw().details("search")}),e._UZ(44,"span",63),e.qZA()()(),e.TgZ(45,"div",64)(46,"table",65)(47,"thead")(48,"tr")(49,"th"),e._uU(50,"#"),e.qZA(),e.YNc(51,Dt,3,0,"th",66),e.TgZ(52,"th",67),e.NdJ("click",function(i){return e.CHM(t),e.oxw().sorting(i,"imeino")}),e._uU(53,"IMEI No."),e._UZ(54,"i",68),e.qZA(),e.TgZ(55,"th",67),e.NdJ("click",function(i){return e.CHM(t),e.oxw().sorting(i,"starttime")}),e._uU(56,"Ignition ON At"),e._UZ(57,"i",68),e.qZA(),e.TgZ(58,"th",67),e.NdJ("click",function(i){return e.CHM(t),e.oxw().sorting(i,"endtime")}),e._uU(59,"Ignition OFF At"),e._UZ(60,"i",68),e.qZA(),e.TgZ(61,"th",67),e.NdJ("click",function(i){return e.CHM(t),e.oxw().sorting(i,"duration")}),e._uU(62,"Duration"),e._UZ(63,"i",68),e.qZA()()(),e.YNc(64,It,5,0,"tbody",45),e.YNc(65,Yt,2,1,"tbody",45),e.qZA()(),e.TgZ(66,"div",69),e.YNc(67,jt,2,4,"div",70),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(7),e.hij(" ",t.schoolName,""),e.xp6(1),e.Q6J("ngIf",""!=t.busNumber),e.xp6(5),e.hij(" ",t.dateRange,""),e.xp6(7),e.Q6J("ngIf",0!=t.totalCount),e.xp6(5),e.Q6J("ngModel",t.reportFormRequest.itemperpage),e.xp6(3),e.Q6J("ngIf",t.totalCount>20),e.xp6(1),e.Q6J("ngIf",t.totalCount>50),e.xp6(1),e.Q6J("ngIf",t.totalCount>100),e.xp6(1),e.Q6J("ngIf",t.totalCount<100&&t.totalCount>10),e.xp6(6),e.Q6J("disabled","0"==t.totalCount),e.xp6(2),e.Q6J("disabled","0"==t.totalCount),e.xp6(3),e.Q6J("ngModel",t.reportFormRequest.searchby),e.xp6(9),e.Q6J("ngIf",""==t.busNumber),e.xp6(13),e.Q6J("ngIf",0==t.totalCount),e.xp6(1),e.Q6J("ngIf",0!=t.totalCount),e.xp6(2),e.Q6J("ngIf",t.totalCount>t.reportFormRequest.itemperpage)}}const Oe=function(n,a){return{"is-valid":n,"ng-error":a}};let Qt=(()=>{class n{constructor(t,o,i,r,s,l){this.cv=t,this.cs=o,this.loader=i,this.route=r,this.es=s,this.listService=l,this.dateObj="",this.reportFormRequest=new Te,this.detailData=[],this.apiname="",this.formsection=!1,this.pageHeading="Ignition Status Report",this.busNumber="",this.dateRange="",this.allVehicleObject={id:"",name:"All"},this.selectedBusList=[],this.loadersection=!0,this.sortDir=1}ngOnInit(){$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"}
1),this.getSchoolList(),this.getDate()}getSchoolList(){var t=this;return(0,u.Z)(function*(){t.schoolList=yield t.listService.getSchoolList(new h.nO)})()}getDate(){$(()=>{$('input[name="date"]').daterangepicker({showDropdowns:!0,startDate:p().startOf("day").format("DD-MMM-YYYY"),endDate:p().endOf("day").format("DD-MMM-YYYY"),opens:"center",drops:"down",maxSpan:{days:30},locale:{format:"DD-MMM-YYYY"},ranges:{Today:[p(),p()],Yesterday:[p().subtract(1,"days"),p().subtract(1,"days")],"This Week":[p().startOf("week"),p().endOf("week")],"This Month":[p().startOf("month"),p().endOf("day")]},maxDate:new Date,minYear:2022,maxYear:parseInt(p().format("YYYY"),10),function(t,o){$("#datepicker").html(t.format("DD-MMM-YYYY")+" : "+o.format("DD-MMM-YYYY"))}}),$('input[name="date"]').on("hide.daterangepicker",(t,o)=>{try{this.dateObj=t.target.value}catch(i){}}),this.dateObj=document.getElementById("datepicker").value})}onChangeSchool(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;o.schoolid=t.schoolObj.id,t.vehicleList=yield t.listService.getVehicleList(o)})()}checkAllBus(){this.busNumber="All"==this.busNoObj.name?"":this.busNoObj.name}validateForm(){if(this.reportForm.valid){this.schoolName=this.schoolObj?this.schoolObj.name:"",this.reportFormRequest.schoolid=this.schoolObj?this.schoolObj.id:"",this.busNoObj&&(this.reportFormRequest.vehicleid="All"==this.busNoObj.name?"all":this.busNoObj?this.busNoObj.id:"");let t=this.dateObj.split(" - ");this.reportFormRequest.fromdate=t[0],this.reportFormRequest.todate=t[1],this.reportFormRequest.fromtime=document.getElementById("fromtime").value.replace(" ","").replace(" ",""),this.reportFormRequest.totime=document.getElementById("totime").value.replace(" ","").replace(" ",""),this.dateRange=this.reportFormRequest.fromdate+" "+this.reportFormRequest.fromtime+" To "+this.reportFormRequest.todate+" "+this.reportFormRequest.totime,this.details("refresh")}}details(t){try{this.loader.loaderOff()}catch(o){}"showrow"==t&&(this.reportFormRequest.pageno=1),"search"==t&&(this.reportFormRequest.pageno=1),"refresh"==t&&(this.reportFormRequest.searchby="",this.reportFormRequest.pageno=1,this.reportFormRequest.itemperpage=10),this.reportFormRequest.searchby=this.reportFormRequest.searchby.trim(),this.formsection=!1;try{this.loader.loaderOn()}catch(o){}this.es.apiCall(this.reportFormRequest,"ignitionreport").subscribe(o=>{try{this.loader.loaderOff()}catch(i){}200==o.statusCode?(this.detailData=o.entity.ignitionreport,this.totalCount=+o.entity.totalrecord,this.recordFrom=this.detailData[0].rowno,this.recordTo=this.detailData[this.detailData.length-1].rowno,this.formsection=!0,this.loadersection=!1):(this.detailData=[],this.recordTo=0,this.recordFrom=0,this.totalCount=0,this.reportFormRequest.searchby="",this.formsection=!1,this.loadersection=!0),this.es.pageDataInfo("",this.reportFormRequest,"Ignition On/Off Report","Details method","Called Function",o.message)},o=>{this.loader.loaderOff()})}redirectToForm(){this.reportForm.resetForm(),this.formsection=!1,this.loadersection=!0,this.getDate(),$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"}
1),this.getSchoolList(),this.schoolObj=null,this.vehicleList=[]}ResetForm(){this.reportForm.resetForm(),this.formsection=!0,this.getDate(),setTimeout(()=>{$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"})},1500),this.getSchoolList(),this.schoolObj=null,this.busNoObj=null,this.vehicleList=[]}sorting(t,o){try{let r=t.currentTarget.childNodes[1].classList;try{r.contains("fa-sort-amount-desc")?(r.remove("fa-sort-amount-desc"),r.add("fa-sort-amount-asc")):(r.remove("fa-sort-amount-asc"),r.add("fa-sort-amount-desc"))}catch(s){console.log("e "+s)}this.sortDir=1==this.sortDir?-1:1;try{this.detailData.length>0&&this.detailData.sort((s,l)=>(s=s[o].toLowerCase(),l=l[o].toLowerCase(),s.localeCompare(l)*this.sortDir))}catch(s){console.log("e "+s)}}catch(i){}}downloadDoc(t){let o=new Te;o.pdfexcel=t,o.itemperpage="",o.pageno="",o.vehicleid=this.reportFormRequest.vehicleid,o.fromdate=this.reportFormRequest.fromdate,o.todate=this.reportFormRequest.todate,o.fromtime=this.reportFormRequest.fromtime,o.totime=this.reportFormRequest.totime;try{this.loader.loaderOn()}catch(i){}this.es.apiCall(o,"ignitionreport").subscribe(i=>{try{this.loader.loaderOff()}catch(r){}"200"==i.statusCode&&(this.filePath=i.message,this.es.commonFileDownload(this.filePath)),o.pdfexcel="",this.es.pageDataInfo("",o,"Ignition ON/OFF Report","Download Excel/PDF method","Called Function",i.message)})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(S.R),e.Y36(U.v),e.Y36(N.D),e.Y36(M.F0),e.Y36(F.P),e.Y36(D.X))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-ignition-on-off-report"]],viewQuery:function(t,o){if(1&t&&e.Gf(yt,5),2&t){let i;e.iGM(i=e.CRH())&&(o.reportForm=i.first)}},decls:56,vars:22,consts:[[1,"container-fluid","report-form-container"],[1,"reportheader"],["aria-hidden","true",1,"fa","fa-credit-card"],[1,"rptheadertext"],[1,"row"],[1,"col-md-12"],["novalidate","","id","form_id","autocomplete","off",1,"needs-validation"],["reportForm","ngForm"],[1,"col-md-2"],[1,"form-group"],[1,"mb-0","label"],[1,"text-danger"],["name","school","placeholder","Select School ","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["schoolCtrl","ngModel"],[3,"value",4,"ngFor","ngForOf"],["class","form-control-feedback text-danger validationmsg",4,"ngIf"],["name","busNo","placeholder","Select Vehicle ","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["busNoCtrl","ngModel"],[3,"value"],[1,"col"],[1,"report-label","mb-0"],["type","text","name","date","id","datepicker","required","","placeholder","Select Date",1,"form-control","form-control-sm"],[1,"form-group",2,"width","85px","float","left"],[1,"mb-0"],["type","text","name","timepicker","id","fromtime",1,"fromTime","form-control","form-control-sm","text-center"],["type","text","name","timepicker","id","totime",1,"toTime","form-control","form-control-sm","text-center"],[1,"col","mt-3"],[1,"custom-btn","btn-13","btn-sm","float-right",3,"click"],["type","button",1,"custom-btn","btn-10","btn-sm","float-right","mr-2",3,"click"],["class","row grid-section container-fluid ",4,"ngIf"],[1,"form-control-feedback","text-danger","validationmsg"],["class","text-small","style"," font-size: 10px;",4,"ngIf"],[1,"text-small",2,"font-size","10px"],[1,"row","grid-section","container-fluid"],[1,"row","py-2","report-summary"],[1,"col-md-4"],[1,"fw-bolder","text-small","text-uppercase","outputlabel"],[1,"text-uppercase","text-small","outputlabel"],["class","col-md-3",4,"ngIf"],[1,"col-md-1","backbtn"],["ngbTooltip","Back",1,"backbtnbackground",3,"click"],["aria-hidden","true",1,"fa","fa-arrow-circle-o-left","outputlabel"],[1,"col-md-12","px-0"],[1,"table-head","d-flex","justify-content-between"],["id","tickets-table_info","role","status","aria-live","polite",1,"col-auto","mt-2","text-center","fw-bold","total-record-label"],[4,"ngIf"],[1,"mt-1"],[1,"itemsperpage-style",2,"margin-right","10px"],[1,"d-inline-flex","align-items-center"],["name","table_length","aria-controls","table","name","pageSize",3,"ngModel","ngModelChange","change"],["value","10","selected",""],["value","20",4,"ngIf"],["value","50",4,"ngIf"],["value","100",4,"ngIf"],[3,"value",4,"ngIf"],["type","button",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"click"],["aria-hidden","true",1,"fa","fa-refresh"],["type","button","ngbTooltip","Download Pdf","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-pdf-o","pdf-btn"],["type","button","ngbTooltip","Download Excel","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-excel-o","excel-btn"],["type","text","name","searchTerm","autocomplete","off","aria-controls","tickets-table","placeholder","Search here....","autocomplete","off",1,"form-control","form-control-sm","ms-2","searchinput",2,"width","165px",3,"ngModel","ngModelChange"],["type","button",1,"btn","search-btn",3,"click"],[1,"fa","fa-search"],[1,"scroll-tbl"],[1,"table","table-striped","table-style",2,"overflow-y","auto","overflow-x","auto"],[3,"click",4,"ngIf"],[3,"click"],[1,"fa","fa-sort-amount-desc"],[1,"row","justify-content-md-between","align-items-md-center","mt-2"],["class","float-end text-start",4,"ngIf"],[1,"col-md-3"],["value","20"],["value","50"],["value","100"],["colspan","9"],[1,"text-center"],[4,"ngFor","ngForOf"],[1,"srnotd"],[1,"float-end","text-start"],["size","sm",1,"d-flex","mt-2","justify-content-end","pagination-rounded","pagination","pagination-info",3,"collectionSize","page","maxSize","pageSize","pageChange"]],template:function(t,o){if(1&t&&(e.TgZ(0,"div",0)(1,"div")(2,"h5",1),e._UZ(3,"i",2),e._uU(4,"\xa0\xa0\xa0"),e.TgZ(5,"span",3),e._uU(6,"IGNITION STATUS REPORT"),e.qZA()()(),e.TgZ(7,"div",4)(8,"div",5)(9,"form",6,7)(11,"div",4)(12,"div",8)(13,"div",9)(14,"label",10),e._uU(15,"School "),e.TgZ(16,"span",11),e._uU(17,"*"),e.qZA()(),e.TgZ(18,"ng-select",12,13),e.NdJ("ngModelChange",function(r){return o.schoolObj=r})("change",function(){return o.onChangeSchool()}),e.YNc(20,Ct,2,2,"ng-option",14),e.qZA(),e.YNc(21,qt,2,1,"span",15),e.qZA()(),e.TgZ(22,"div",8)(23,"div",9)(24,"label",10),e._uU(25,"Vehicle Number "),e.TgZ(26,"span",11),e._uU(27,"*"),e.qZA()(),e.TgZ(28,"ng-select",16,17),e.NdJ("ngModelChange",function(r){return o.busNoObj=r})("change",function(){return o.checkAllBus()}),e.TgZ(30,"ng-option",18),e._uU(31),e.qZA(),e.YNc(32,Ot,2,2,"ng-option",14),e.qZA(),e.YNc(33,kt,2,1,"span",15),e.qZA()(),e.TgZ(34,"div",19)(35,"div",9)(36,"label",20),e._uU(37,"Date Range:"),e.qZA(),e._UZ(38,"input",21),e.qZA()(),e.TgZ(39,"div",19)(40,"div",22)(41,"label",23),e._uU(42,"Time "),e.qZA(),e._UZ(43,"input",24),e.qZA(),e._uU(44," \xa0\xa0\xa0 "),e.TgZ(45,"div",22),e._UZ(46,"label",23)(47,"input",25),e.qZA()(),e.TgZ(48,"div",26)(49,"button",27),e.NdJ("click",function(){return o.validateForm()}),e._uU(50,"Generate"),e.qZA(),e._uU(51," \xa0 "),e.TgZ(52,"button",28),e.NdJ("click",function(){return o.ResetForm()}),e._uU(53,"Reset"),e.qZA()()()()()()(),e.TgZ(54,"div",0),e.YNc(55,Pt,68,16,"div",29),e.qZA()),2&t){const i=e.MAs(10),r=e.MAs(19),s=e.MAs(29);e.xp6(18),e.Q6J("ngClass",e.WLB(16,Oe,r.valid,r.invalid&&i.submitted))("ngModel",o.schoolObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",o.schoolList),e.xp6(1),e.Q6J("ngIf",r.errors&&(r.dirty||r.touched||i.submitted)),e.xp6(7),e.Q6J("ngClass",e.WLB(19,Oe,s.valid,s.invalid&&i.submitted))("ngModel",o.busNoObj)("multiple",!1)("closeOnSelect",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("value",o.allVehicleObject),e.xp6(1),e.hij("",o.allVehicleObject.name," "),e.xp6(1),e.Q6J("ngForOf",o.vehicleList),e.xp6(1),e.Q6J("ngIf",s.errors&&(s.dirty||s.touched||i.submitted)),e.xp6(22),e.Q6J("ngIf",o.formsection)}},directives:[c._Y,c.JL,c.F,A.w9,c.Q7,g.mk,c.JJ,c.On,g.sg,A.xv,g.O5,C._L,c.EJ,c.YN,c.Kr,c.Fj,C.N9],styles:[".ng-select.ng-select-single .ng-select-container .ng-value-container{font-size:12px!important} .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{font-size:12px!important;text-transform:capitalize}ng-select.ng-select-single[_ngcontent-%COMP%] .ng-select-container{min-height:26px;max-height:26px;height:26px}.form-control[_ngcontent-%COMP%]{height:calc(1.45rem + 2px)}.invalid-feedback[_ngcontent-%COMP%]{font-size:11px;color:#dc3545}input[_ngcontent-%COMP%]{font-size:12px}.starvalid[_ngcontent-%COMP%]{color:#ff0040!important}.validationmsg[_ngcontent-%COMP%]{--bs-text-opacity: 1;color:#ff0040!important;font-weight:600}.card-shimmer[_ngcontent-%COMP%]{position:relative;box-shadow:0 6px 8px #0000001a;background-color:#fff;border-radius:6px;height:290px;overflow:hidden;margin:40px auto}.shimmerBG[_ngcontent-%COMP%]{animation-duration:2.2s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:shimmer;animation-timing-function:linear;background:#E5F0FB;background:linear-gradient(to right,#cfeeeb 4%,#9ac9c6 25%,#d5f0f0 36%);background-size:1100px 100%}@keyframes shimmer{0%{background-position:-1200px 0}to{background-position:1200px 0}}.media[_ngcontent-%COMP%]{height:110px}.p-32[_ngcontent-%COMP%]{padding:32px}.title-line[_ngcontent-%COMP%]{height:24px;width:100%;margin-bottom:12px;border-radius:20px}.content-line[_ngcontent-%COMP%]{height:8px;width:100%;margin-bottom:16px;border-radius:8px}.end[_ngcontent-%COMP%]{width:40%}.m-t-24[_ngcontent-%COMP%]{margin-top:24px}.rptheadertext[_ngcontent-%COMP%]{text-decoration:underline}.rptlabel[_ngcontent-%COMP%]{color:#000}.outputlabel[_ngcontent-%COMP%]{color:#fff}.backbtn[_ngcontent-%COMP%]{float:right;margin-left:25%!important;margin-top:-1%!important}.srnotd[_ngcontent-%COMP%]{background-color:#809b92}.form-group[_ngcontent-%COMP%]{margin-bottom:.2rem}"]}),n})();var P=v(23171),E=v(60187),j=v(36003),z=v(94761);const Vt=["reportForm"];function Et(n,a){if(1&n&&(e.TgZ(0,"ng-option",87),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function zt(n,a){1&n&&(e.TgZ(0,"span",90),e._uU(1,"Filter type is mandatory"),e.qZA())}function Ht(n,a){if(1&n&&(e.TgZ(0,"span",88),e.YNc(1,zt,2,0,"span",89),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}const ne=function(n,a){return{"is-valid":n,"ng-error":a}};function $t(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",10)(1,"div",11)(2,"label",12),e._uU(3,"Filter Type "),e.TgZ(4,"span",83),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",84,85),e.NdJ("ngModelChange",function(i){return e.CHM(t),e.oxw().roleTypeObj=i})("change",function(){return e.CHM(t),e.oxw().onChangeCustomerType()}),e.YNc(8,Et,2,2,"ng-option",16),e.qZA(),e.YNc(9,Ht,2,1,"span",86),e.qZA()()}if(2&n){const t=e.MAs(7),o=e.oxw(),i=e.MAs(10);e.xp6(6),e.Q6J("ngClass",e.WLB(6,ne,t.valid,t.invalid&&i.submitted))("ngModel",o.roleTypeObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",o.roleList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||i.submitted))}}function Bt(n,a){if(1&n&&(e.TgZ(0,"ng-option",87),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function Gt(n,a){if(1&n&&(e.TgZ(0,"span",90),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.hij("",t.customerTypeName," Name is mandatory")}}function Wt(n,a){if(1&n&&(e.TgZ(0,"span",88),e.YNc(1,Gt,2,1,"span",89),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function Kt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",10)(1,"div",11)(2,"label",91),e._uU(3),e.TgZ(4,"span",83),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",92,93),e.NdJ("ngModelChange",function(i){return e.CHM(t),e.oxw().customerNameObj=i})("change",function(){return e.CHM(t),e.oxw().onChangeCustomerList()}),e.YNc(8,Bt,2,2,"ng-option",16),e.qZA(),e.YNc(9,Wt,2,1,"span",86),e.qZA()()}if(2&n){const t=e.MAs(7),o=e.oxw(),i=e.MAs(10);e.xp6(3),e.hij("",o.customerTypeName," List"),e.xp6(3),e.MGl("placeholder","Select ",o.customerTypeName," "),e.Q6J("ngClass",e.WLB(8,ne,t.valid,t.invalid&&i.submitted))("ngModel",o.customerNameObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",o.customerList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||i.submitted))}}function Xt(n,a){if(1&n&&(e.TgZ(0,"ng-option",87),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function eo(n,a){1&n&&(e.TgZ(0,"span",90),e._uU(1,"Vehicle is mandatory"),e.qZA())}function to(n,a){if(1&n&&(e.TgZ(0,"span",94),e.YNc(1,eo,2,0,"span",89),e.qZA()),2&n){e.oxw();const t=e.MAs(21);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function oo(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.lnq("Showing ",t.recordFrom," To ",t.recordTo," (Out Of ",t.totalCount,")Entries")}}function no(n,a){1&n&&(e.TgZ(0,"option",95),e._uU(1,"20"),e.qZA())}
1function io(n,a){1&n&&(e.TgZ(0,"option",96),e._uU(1,"50"),e.qZA())}function ro(n,a){1&n&&(e.TgZ(0,"option",97),e._uU(1,"100"),e.qZA())}function ao(n,a){if(1&n&&(e.TgZ(0,"option",87),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.Q6J("value",t.totalCount),e.xp6(1),e.hij(" ",t.totalCount," ")}}function so(n,a){1&n&&(e.TgZ(0,"tbody")(1,"tr")(2,"td",98)(3,"div",99),e._uU(4,"No Record Found"),e.qZA()()()())}function lo(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"tr")(1,"td",101),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA(),e.TgZ(11,"td")(12,"button",102),e.NdJ("click",function(){const r=e.CHM(t).$implicit;return e.oxw(2).trackVehicle(r)}),e._UZ(13,"i",69),e.qZA()()()}if(2&n){const t=a.$implicit;e.xp6(2),e.Oqu(t.row_number),e.xp6(2),e.Oqu(""==t.datatimestamp?"Not Found":t.datatimestamp),e.xp6(2),e.Oqu(""==t.enddatatimestamp?"Not Found":t.enddatatimestamp),e.xp6(2),e.Oqu(""==t.location?"Not Found":t.location),e.xp6(2),e.Oqu(""==t.duration?"Not Found":t.duration)}}function co(n,a){if(1&n&&(e.TgZ(0,"tbody"),e.YNc(1,lo,14,5,"tr",100),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.detailData)}}function po(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",103)(1,"ngb-pagination",104),e.NdJ("pageChange",function(i){return e.CHM(t),e.oxw().reportFormRequest.pageno=i})("pageChange",function(){return e.CHM(t),e.oxw().details("")}),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("collectionSize",t.totalCount)("page",t.reportFormRequest.pageno)("maxSize",3)("pageSize",t.reportFormRequest.itemperpage)}}const Re=function(n){return{display:n}};let mo=(()=>{class n{constructor(t,o,i,r,s,l,d,m){this.cv=t,this.cs=o,this.loader=i,this.route=r,this.es=s,this.mapService=l,this.listService=d,this.apiService=m,this.dateObj="",this.formsection=!0,this.loadersection=!1,this.detailsection=!1,this.loginRoleId=sessionStorage.getItem("loginroleid"),this.reportFormRequest=new h.UJ,this.apiname="",this.detailData=[],this.pageHeading="Stoppage Report",this.busNumber="",this.dateRange="",this.allVehicleObject={id:"",name:"All"},this.selectedBusList=[],this.roleList=[],this.customerTypeName="",this.customerList=[],this.sortDir=1,this.mapVehicleDetails=new y.TA}ngOnInit(){$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"}),this.getDate(),"101"==this.loginRoleId||"600"==this.loginRoleId?this.getRoleList():this.getVehicleList()}getRoleList(){var t=this;return(0,u.Z)(function*(){t.roleList=[],t.roleList=yield t.listService.getRoleList(new h.nO),t.roleList.push({id:"3",name:"vehicle"}),t.roleList=t.roleList.filter(o=>"school"==o.name||"customer"==o.name||"vehicle"==o.name)})()}onChangeCustomerType(){this.roleTypeObj&&(this.vehicleList=[],this.customerTypeName="","school"==this.roleTypeObj.name||"customer"==this.roleTypeObj.name?(this.customerTypeName=this.roleTypeObj.name,this.getCustomerList()):"vehicle"==this.roleTypeObj.name&&this.getVehicleList())}getCustomerList(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;o.filter1=t.roleTypeObj.id,t.customerList=yield t.listService.getCustomerList(o)})()}getVehicleList(){var t=this;return(0,u.Z)(function*(){t.vehicleList=yield t.listService.getVehicleList(new h.nO)})()}onChangeCustomerList(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;o.filter2=t.customerNameObj.id,t.schoolName=t.customerNameObj.name,t.vehicleList=yield t.listService.getVehicleList(o)})()}getDate(){$(()=>{$('input[name="date"]').daterangepicker({showDropdowns:!0,startDate:p().startOf("day").format("DD-MMM-YYYY"),endDate:p().endOf("day").format("DD-MMM-YYYY"),opens:"center",drops:"down",maxSpan:{days:30},locale:{format:"DD-MMM-YYYY"},ranges:{Today:[p(),p()],Yesterday:[p().subtract(1,"days"),p().subtract(1,"days")],"This Week":[p().startOf("week"),p().endOf("week")],"This Month":[p().startOf("month"),p().endOf("day")]},maxDate:new Date,minYear:2022,maxYear:parseInt(p().format("YYYY"),10),function(t,o){$("#datepicker").html(t.format("DD-MMM-YYYY")+" : "+o.format("DD-MMM-YYYY"))}}),$('input[name="date"]').on("hide.daterangepicker",(t,o)=>{try{this.dateObj=t.target.value}catch(i){}}),this.dateObj=document.getElementById("datepicker").value})}onChangeSchool(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;o.schoolid=t.schoolObj.id,t.vehicleList=yield t.listService.getVehicleList(o)})()}checkAllBus(){this.busNumber="All"==this.busNoObj.name?"":this.busNoObj.name}validateForm(){if(this.reportForm.valid){this.formsection=!1,this.schoolName=this.schoolObj?this.schoolObj.name:"",this.customerName=this.customerNameObj?this.customerNameObj.name:"",this.busNoObj&&("All"==this.busNoObj.name?(this.customerName="",this.reportFormRequest.vehicleid="all"):(this.customerName=this.busNoObj.customername,this.reportFormRequest.vehicleid=this.busNoObj?this.busNoObj.id:"",this.reportFormRequest.vehicleno=this.busNoObj?this.busNoObj.name:"",this.reportFormRequest.imeino=this.busNoObj?this.busNoObj.imeino:"")),"school"==this.customerTypeName&&(this.customerName=this.customerNameObj.name),"customer"==this.customerTypeName&&(this.customerName=this.customerNameObj.name);let t=this.dateObj.split(" - ");this.reportFormRequest.fromdate=t[0],this.reportFormRequest.todate=t[1],this.reportFormRequest.fromtime=document.getElementById("fromtime").value.replace(" ","").replace(" ",""),this.reportFormRequest.totime=document.getElementById("totime").value.replace(" ","").replace(" ",""),this.dateRange=this.reportFormRequest.fromdate+" "+this.reportFormRequest.fromtime+" To "+this.reportFormRequest.todate+" "+this.reportFormRequest.totime,this.details("refresh")}}details(t){"showrow"==t&&(this.reportFormRequest.pageno=1),"search"==t&&(this.reportFormRequest.pageno=1),"refresh"==t&&(this.reportFormRequest.searchby="",this.reportFormRequest.pageno=1,this.reportFormRequest.itemperpage=10),this.reportFormRequest.searchby=this.reportFormRequest.searchby.trim(),this.detailsection=!0,this.formsection=!1,this.loadersection=!1;try{this.loader.loaderOn()}catch(o){}this.es.apiCall(this.reportFormRequest,"idlereportonruntime").subscribe(o=>{try{this.loader.loaderOff()}catch(i){}this.detailsection=!0,this.loadersection=!1,200==o.statusCode?(this.formsection=!1,this.detailData=o.entity.historytrackdetails,this.totalCount=+o.entity.totalrecord,this.recordFrom=this.detailData[0].row_number,this.recordTo=this.detailData[this.detailData.length-1].row_number):(this.detailData=[],this.recordTo=0,this.recordFrom=0,this.totalCount=0,this.reportFormRequest.searchby=""),this.es.pageDataInfo("",this.reportFormRequest,"Stoppage Report","Details method","Called Function",o.message)},o=>{this.loader.loaderOff()})}redirectToForm(){var t=this;return(0,u.Z)(function*(){t.formsection=!0,t.detailsection=!1})()}ResetForm(){this.reportForm.resetForm(),this.formsection=!0,this.getDate(),setTimeout(()=>{$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"})},1500),this.getRoleList(),this.schoolObj=null,this.busNoObj=null,this.vehicleList=[]}sorting(t,o){try{let r=t.currentTarget.childNodes[1].classList;try{r.contains("fa-sort-amount-desc")?(r.remove("fa-sort-amount-desc"),r.add("fa-sort-amount-asc")):(r.remove("fa-sort-amount-asc"),r.add("fa-sort-amount-desc"))}catch(s){console.log("e "+s)}this.sortDir=1==this.sortDir?-1:1;try{this.detailData.length>0&&this.detailData.sort((s,l)=>(s=s[o].toLowerCase(),l=l[o].toLowerCase(),s.localeCompare(l)*this.sortDir))}catch(s){console.log("e "+s)}}catch(i){}}downloadDoc(t){let o=new V;o.pdfexcel=t,o.itemperpage="",o.pageno="",o.vehicleid=this.reportFormRequest.vehicleid,o.fromdate=this.reportFormRequest.fromdate,o.todate=this.reportFormRequest.todate,o.fromtime=this.reportFormRequest.fromtime,o.totime=this.reportFormRequest.totime,o.searchby=this.reportFormRequest.searchby.trim();try{this.loader.loaderOn()}catch(i){}this.es.apiCall(o,"idlereportonruntime").subscribe(i=>{try{this.loader.loaderOff()}catch(r){}"200"==i.statusCode&&(this.filePath=i.message,this.es.commonFileDownload(this.filePath)),o.pdfexcel="",this.es.pageDataInfo("",o,"Stoppage Report","Download Excel/PDF method","Called Function",i.message)})}trackVehicle(t){var o=this;return(0,u.Z)(function*(){var i,r;o.mapVehicleDetails=t;let s=new h.qm;s.vehicleid=o.busNoObj?o.busNoObj.id:"";
1let l=yield o.es.apiCall(s,"vehicledetails").toPromise(),d=new y.Us,m=l.entity.vehicledetails[0];d.vehicleno=m.vehicleno,d.customername=m.customername,d.vehicleclassname=m.classname,d.speed=t.speed,d.location=t.location,d.gpsstatus=t.status,d.pollingdatatime=t.datatimestamp,d.latitude=t.latitude,d.longitude=t.longitude,$("#exampleModal").modal("show"),null===(i=o.mapService.poiLayer.getSource())||void 0===i||i.clear();let _=[],b=new P.Z({geometry:new E.Z(j.mi([+t.longitude,+t.latitude]))});b.setStyle(o.mapService.vehicleStopStyleFunction),b.setProperties({properties:d}),_.push(b),null===(r=o.mapService.historyDirectionIconLayer.getSource())||void 0===r||r.addFeatures(_),o.mapService.map.getView().animate({center:j.mi([+t.longitude,+t.latitude]),zoom:17})})()}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(S.R),e.Y36(U.v),e.Y36(N.D),e.Y36(M.F0),e.Y36(F.P),e.Y36(J.S),e.Y36(D.X),e.Y36(z.s))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-stoppage-report"]],viewQuery:function(t,o){if(1&t&&e.Gf(Vt,5),2&t){let i;e.iGM(i=e.CRH())&&(o.reportForm=i.first)}},decls:141,vars:39,consts:[[1,"container-fluid","report-form-container"],[1,"reportheader"],["aria-hidden","true",1,"fa","fa-credit-card"],[1,"rptheadertext"],[1,"row",3,"ngStyle"],[1,"col-md-12"],["novalidate","","id","form_id","autocomplete","off",1,"needs-validation"],["reportForm","ngForm"],[1,"row"],["class","col-md-2",4,"ngIf"],[1,"col-md-2"],[1,"form-group"],[1,"mb-0","label"],[1,"starvalid"],["name","vehicleNumber","placeholder","Select Vehicle","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["busNoCtrl","ngModel"],[3,"value",4,"ngFor","ngForOf"],["class","form-control-feedback text-danger",4,"ngIf"],[1,"col-md-4"],[1,"d-flex","justify-content-between"],[1,"report-label","mb-0"],["type","text","name","date","id","datepicker","required","","placeholder","Select Date",1,"form-control","form-control-sm"],[1,"form-group","mb-0",2,"width","85px","float","left"],[1,"mb-0"],["type","text","name","timepicker","id","fromtime",1,"fromTime","form-control","form-control-sm","text-center"],[1,"form-group",2,"width","85px","float","left"],["type","text","name","timepicker","id","totime",1,"toTime","form-control","form-control-sm","text-center"],[1,"col","mt-3"],["type","submit",1,"custom-btn","btn-13","float-right","Show","mb-3",3,"click"],["type","button",1,"custom-btn","btn-10","float-right","mr-2",3,"click"],[1,"report-form-container"],[1,"row","grid-section",3,"ngStyle"],[1,"col-md-12",2,"background-color","white"],[1,"row","py-2","report-summary"],[1,"col-md-3"],[1,"fw-bolder","text-small","text-uppercase","outputlabel"],[1,"text-uppercase","text-small","outputlabel"],[1,"customerNameForSummary"],[1,"col-md-6"],[1,"col","text-end","float-end"],["ngbTooltip","Back",1,"backbtnbackground",3,"click"],["aria-hidden","true",1,"fa","fa-arrow-circle-o-left","outputlabel"],[1,"col-md-12","px-0",2,"background-color","white"],[1,"table-head","d-flex","justify-content-between"],["id","tickets-table_info","role","status","aria-live","polite",1,"col-auto","mt-2","text-center","fw-bold","total-record-label"],[4,"ngIf"],[1,"mt-1"],[1,"itemsperpage-style",2,"margin-right","10px"],[1,"d-inline-flex","align-items-center"],["name","table_length","aria-controls","table","name","pageSize",3,"ngModel","ngModelChange","change"],["value","10","selected",""],["value","20",4,"ngIf"],["value","50",4,"ngIf"],["value","100",4,"ngIf"],[3,"value",4,"ngIf"],["type","button",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"click"],["aria-hidden","true",1,"fa","fa-refresh"],["type","button","ngbTooltip","Download Pdf","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-pdf-o","pdf-btn"],["type","button","ngbTooltip","Download Excel","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-excel-o","excel-btn"],["type","text","name","searchTerm","autocomplete","off","aria-controls","tickets-table","placeholder","Search here....","autocomplete","off",1,"form-control","form-control-sm","ms-2","searchinput",2,"width","165px",3,"ngModel","ngModelChange"],["type","button",1,"btn","search-btn",3,"click"],[1,"fa","fa-search"],[1,"scroll-tbl"],[1,"table","table-striped","table-style",2,"overflow-y","auto","overflow-x","auto"],[2,"width","40px",3,"click"],[1,"fa","fa-sort-amount-desc"],[3,"click"],[1,"fa","fa-map-marker"],[1,"row","justify-content-md-between","align-items-md-center","mt-2"],["class","float-end text-start",4,"ngIf"],["id","exampleModal","tabindex","-1","aria-labelledby","exampleModalLabel","data-bs-backdrop","static","data-bs-keyboard","false","aria-hidden","true",1,"modal","fade"],[1,"modal-dialog","modal
1-xl"],[1,"modal-content"],[1,"modal-header","bg-white"],["id","exampleModalLabel",1,"modal-title"],["type","button","data-bs-dismiss","modal","aria-label","Close",1,"btn-close",3,"click"],[1,"modal-body","p-0"],[2,"width","100%","height","500px"],[1,"current-vehicle-section"],[1,"p-1",2,"max-width","250px","font-size","12px"],[1,"m-0"],[1,"text-danger"],["name","roletype","placeholder","Select Filter Type","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["roleTypeCtrl","ngModel"],["class","form-control-feedback text-danger text-danger",4,"ngIf"],[3,"value"],[1,"form-control-feedback","text-danger","text-danger"],["class","text-small",4,"ngIf"],[1,"text-small"],[1,"mb-0","text-capitalize"],["name","customertype","required","",1,"text-capitalize",3,"ngClass","ngModel","multiple","placeholder","closeOnSelect","ngModelChange","change"],["customerNameCtrl","ngModel"],[1,"form-control-feedback","text-danger"],["value","20"],["value","50"],["value","100"],["colspan","9"],[1,"text-center"],[4,"ngFor","ngForOf"],[1,"srnotd"],["title","Track Stoppage","data-bs-toggle","modal","data-bs-target","#exampleModal",1,"btn","btn-sm","btn-dark","p-1",3,"click"],[1,"float-end","text-start"],["size","sm",1,"d-flex","mt-2","justify-content-end","pagination-rounded","pagination","pagination-info",3,"collectionSize","page","maxSize","pageSize","pageChange"]],template:function(t,o){if(1&t&&(e.TgZ(0,"div",0)(1,"div")(2,"h5",1),e._UZ(3,"i",2),e._uU(4,"\xa0\xa0\xa0"),e.TgZ(5,"span",3),e._uU(6,"Stoppage Report"),e.qZA()()(),e.TgZ(7,"div",4)(8,"div",5)(9,"form",6,7)(11,"div",8),e.YNc(12,$t,10,9,"div",9),e.YNc(13,Kt,10,11,"div",9),e.TgZ(14,"div",10)(15,"div",11)(16,"label",12),e._uU(17,"Vehicle Number "),e.TgZ(18,"span",13),e._uU(19,"*"),e.qZA()(),e.TgZ(20,"ng-select",14,15),e.NdJ("ngModelChange",function(r){return o.busNoObj=r})("change",function(){return o.checkAllBus()}),e.YNc(22,Xt,2,2,"ng-option",16),e.qZA(),e.YNc(23,to,2,1,"span",17),e.qZA()(),e.TgZ(24,"div",18)(25,"div",19)(26,"div",11)(27,"label",20),e._uU(28,"Date Range:"),e.qZA(),e._UZ(29,"input",21),e.qZA(),e.TgZ(30,"div",22)(31,"label",23),e._uU(32,"Time "),e.qZA(),e._UZ(33,"input",24),e.qZA(),e._uU(34," \xa0\xa0\xa0 "),e.TgZ(35,"div",25),e._UZ(36,"label",23)(37,"input",26),e.qZA()()(),e.TgZ(38,"div",27)(39,"button",28),e.NdJ("click",function(){return o.validateForm()}),e._uU(40,"Generate"),e.qZA(),e._uU(41," \xa0 "),e.TgZ(42,"button",29),e.NdJ("click",function(){return o.ResetForm()}),e._uU(43,"Reset"),e.qZA()()()()()()(),e.TgZ(44,"div",30)(45,"div",31)(46,"div",32)(47,"div",33)(48,"div",34)(49,"span",35),e._uU(50,"Vehicle :"),e.qZA(),e.TgZ(51,"span",36),e._uU(52),e.qZA(),e._UZ(53,"br"),e.TgZ(54,"span",37),e._uU(55),e.qZA()(),e.TgZ(56,"div",38)(57,"span",35),e._uU(58,"Date:"),e.qZA(),e.TgZ(59,"span",36),e._uU(60),e.qZA()(),e.TgZ(61,"div",39)(62,"button",40),e.NdJ("click",function(){return o.redirectToForm()}),e._UZ(63,"i",41),e.qZA()()()(),e.TgZ(64,"div",42)(65,"div",43)(66,"div",44),e.YNc(67,oo,2,3,"span",45),e.qZA(),e.TgZ(68,"div",46)(69,"span",47)(70,"label",48),e._uU(71,"Show "),e.TgZ(72,"select",49),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.itemperpage=r})("change",function(){return o.details("showrow")}),e.TgZ(73,"option",50),e._uU(74," 10"),e.qZA(),e.YNc(75,no,2,0,"option",51),e.YNc(76,io,2,0,"option",52),e.YNc(77,ro,2,0,"option",53),e.YNc(78,ao,2,2,"option",54),e.qZA(),e._uU(79," entries"),e.qZA()(),e.TgZ(80,"span")(81,"button",55),e.NdJ("click",function(){return o.details("refresh")}),e._UZ(82,"i",56),e.qZA()(),e.TgZ(83,"span")(84,"button",57),e.NdJ("click",function(){return o.downloadDoc("pdf")}),e._UZ(85,"i",58),e.qZA(),e.TgZ(86,"button",59),e.NdJ("click",function(){return o.downloadDoc("excel")}),e._UZ(87,"i",60),e.qZA()(),e.TgZ(88,"label")(89,"input",61),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.searchby=r}),e.qZA()(),e.TgZ(90,"button",62),e.NdJ("click",function(){return o.details("search")}),e._UZ(91,"span",63),e.qZA()()(),e.TgZ(92,"div",64)(93,"table",65)(94,"thead")(95,"tr")(96,"th",66),e.NdJ("click",function(r){return o.sorting(r,"rowno")}),e._uU(97,"#"),e._UZ(98,"i",67),e.qZA(),e.TgZ(99,"th",68),e.NdJ("click",function(r){return o.sorting(r,"gpsfromdate")}),e._uU(100,"Stoppage Time"),e.qZA(),e.TgZ(101,"th",68),e.NdJ("click",function(r){return o.sorting(r,"gpstodate")}),e._uU(102,"Stoppage End Date"),e.qZA(),e.TgZ(103,"th",68),e.NdJ("click",function(r){return o.sorting(r,"flocation")}),e._uU(104,"Location"),e.qZA(),e.TgZ(105,"th",68),e.NdJ("click",function(r){return o.sorting(r,"duration")}),e._uU(106,"Duration"),e.qZA(),e.TgZ(107,"th"),e._UZ(108,"i",69),e.qZA()()(),e.YNc(109,so,5,0,"tbody",45),e.YNc(110,co,2,1,"tbody",45),e.qZA()(),e.TgZ(111,"div",70),e.YNc(112,po,2,4,"div",71),e.qZA()()()(),e.TgZ(113,"div",72)(114,"div",73)(115,"div",74)(116,"div",75)(117,"h4",76)(118,"u"),e._uU(119," Stoppage Summary"),e.qZA(),e._uU(120," of "),e.TgZ(121,"b"),e._uU(122),e.qZA(),e._uU(123," from "),e.TgZ(124,"b"),e._uU(125),e.qZA(),e._uU(126," to "),e.TgZ(127,"b"),e._uU(128),e.qZA()(),e.TgZ(129,"button",77),e.NdJ("click",function(){return o.mapService.clearAllLayers()}),e.qZA()(),e.TgZ(130,"div",78)(131,"div",79),e._UZ(132,"app-helper-map"),e.TgZ(133,"div",80)(134,"div",81)(135,"p",82),e._uU(136),e.qZA(),e.TgZ(137,"p",82),e._uU(138),e.qZA(),e.TgZ(139,"p",82),e._uU(140),e.qZA()()()()()()()()),2&t){const i=e.MAs(10),r=e.MAs(21);e.xp6(7),e.Q6J("ngStyle",e.VKq(32,Re,o.formsection?"":"none")),e.xp6(
15),e.Q6J("ngIf","101"==o.loginRoleId||"600"==o.loginRoleId),e.xp6(1),e.Q6J("ngIf",("101"==o.loginRoleId||"600"==o.loginRoleId)&&"school"==o.customerTypeName||"customer"==o.customerTypeName),e.xp6(7),e.Q6J("ngClass",e.WLB(34,ne,r.valid,r.invalid&&i.submitted))("ngModel",o.busNoObj)("multiple",!1)("closeOnSelect",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",o.vehicleList),e.xp6(1),e.Q6J("ngIf",r.errors&&(r.dirty||r.touched||i.submitted)),e.xp6(22),e.Q6J("ngStyle",e.VKq(37,Re,o.detailsection?"":"none")),e.xp6(7),e.hij(" ",o.busNumber,""),e.xp6(3),e.Oqu(o.customerName),e.xp6(5),e.hij(" ",o.dateRange,""),e.xp6(7),e.Q6J("ngIf",0!=o.totalCount),e.xp6(5),e.Q6J("ngModel",o.reportFormRequest.itemperpage),e.xp6(3),e.Q6J("ngIf",o.totalCount>20),e.xp6(1),e.Q6J("ngIf",o.totalCount>50),e.xp6(1),e.Q6J("ngIf",o.totalCount>100),e.xp6(1),e.Q6J("ngIf",o.totalCount<100&&o.totalCount>10),e.xp6(6),e.Q6J("disabled","0"==o.totalCount),e.xp6(2),e.Q6J("disabled","0"==o.totalCount),e.xp6(3),e.Q6J("ngModel",o.reportFormRequest.searchby),e.xp6(20),e.Q6J("ngIf",0==o.totalCount),e.xp6(1),e.Q6J("ngIf",0!=o.totalCount),e.xp6(2),e.Q6J("ngIf",o.totalCount>o.reportFormRequest.itemperpage),e.xp6(10),e.hij("",o.busNumber," "),e.xp6(3),e.hij(" ",o.mapVehicleDetails.datatimestamp,""),e.xp6(3),e.hij("",o.mapVehicleDetails.enddatatimestamp," "),e.xp6(8),e.hij("Start Date : ",o.mapVehicleDetails.datatimestamp,""),e.xp6(2),e.hij("End Date : ",o.mapVehicleDetails.enddatatimestamp,""),e.xp6(2),e.hij("Duration : ",o.mapVehicleDetails.duration,"")}},directives:[g.PC,c._Y,c.JL,c.F,g.O5,A.w9,c.Q7,g.mk,c.JJ,c.On,g.sg,A.xv,C._L,c.EJ,c.YN,c.Kr,c.Fj,C.N9,Y.F],styles:[".ng-select.ng-select-single .ng-select-container .ng-value-container{font-size:12px!important} .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{font-size:12px!important;text-transform:capitalize}ng-select.ng-select-single[_ngcontent-%COMP%] .ng-select-container{min-height:26px;max-height:26px;height:26px}.form-control[_ngcontent-%COMP%]{height:calc(1.45rem + 2px)}.invalid-feedback[_ngcontent-%COMP%]{font-size:11px;color:#dc3545}input[_ngcontent-%COMP%]{font-size:12px}.starvalid[_ngcontent-%COMP%]{color:#ff0040!important}.validationmsg[_ngcontent-%COMP%]{--bs-text-opacity: 1;color:#ff0040!important;font-weight:600}.card-shimmer[_ngcontent-%COMP%]{position:relative;box-shadow:0 6px 8px #0000001a;background-color:#fff;border-radius:6px;height:290px;overflow:hidden;margin:40px auto}.shimmerBG[_ngcontent-%COMP%]{animation-duration:2.2s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:shimmer;animation-timing-function:linear;background:#E5F0FB;background:linear-gradient(to right,#cfeeeb 4%,#9ac9c6 25%,#d5f0f0 36%);background-size:1100px 100%}@keyframes shimmer{0%{background-position:-1200px 0}to{background-position:1200px 0}}.media[_ngcontent-%COMP%]{height:110px}.p-32[_ngcontent-%COMP%]{padding:32px}.title-line[_ngcontent-%COMP%]{height:24px;width:100%;margin-bottom:12px;border-radius:20px}.content-line[_ngcontent-%COMP%]{height:8px;width:100%;margin-bottom:16px;border-radius:8px}.end[_ngcontent-%COMP%]{width:40%}.m-t-24[_ngcontent-%COMP%]{margin-top:24px}.rptheadertext[_ngcontent-%COMP%]{text-decoration:underline}.rptlabel[_ngcontent-%COMP%]{color:#000}.form-group[_ngcontent-%COMP%]{margin-bottom:.2rem}"]}),n})();const uo=["reportForm"];function go(n,a){if(1&n&&(e.TgZ(0,"ng-option",86),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function ho(n,a){1&n&&(e.TgZ(0,"span",89),e._uU(1,"Filter type is mandatory"),e.qZA())}function _o(n,a){if(1&n&&(e.TgZ(0,"span",87),e.YNc(1,ho,2,0,"span",88),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}const ie=function(n,a){return{"is-valid":n,"ng-error":a}};function fo(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",10)(1,"div",11)(2,"label",12),e._uU(3,"Filter Type "),e.TgZ(4,"span",82),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",83,84),e.NdJ("ngModelChange",function(i){return e.CHM(t),e.oxw().roleTypeObj=i})("change",function(){return e.CHM(t),e.oxw().onChangeCustomerType()}),e.YNc(8,go,2,2,"ng-option",16),e.qZA(),e.YNc(9,_o,2,1,"span",85),e.qZA()()}if(2&n){const t=e.MAs(7),o=e.oxw(),i=e.MAs(11);e.xp6(6),e.Q6J("ngClass",e.WLB(6,ie,t.valid,t.invalid&&i.submitted))("ngModel",o.roleTypeObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",o.roleList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||i.submitted))}}function bo(n,a){if(1&n&&(e.TgZ(0,"ng-option",86),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function vo(n,a){if(1&n&&(e.TgZ(0,"span",89),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.hij("",t.customerTypeName," Name is mandatory")}}function To(n,a){if(1&n&&(e.TgZ(0,"span",87),e.YNc(1,vo,2,1,"span",88),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function Zo(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",10)(1,"div",11)(2,"label",90),e._uU(3),e.TgZ(4,"span",82),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",91,92),e.NdJ("ngModelChange",function(i){return e.CHM(t),e.oxw().customerNameObj=i})("change",function(){return e.CHM(t),e.oxw().onChangeCustomerList()}),e.YNc(8,bo,2,2,"ng-option",16),e.qZA(),e.YNc(9,To,2,1,"span",85),e.qZA()()}if(2&n){const t=e.MAs(7),o=e.oxw(),i=e.MAs(11);e.xp6(3),e.hij("",o.customerTypeName," List"),e.xp6(3),e.MGl("placeholder","Select ",o.customerTypeName," "),e.Q6J("ngClass",e.WLB(8,ie,t.valid,t.invalid&&i.submitted))("ngModel",o.customerNameObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",o.customerList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||i.submitted))}}function xo(n,a){if(1&n&&(e.TgZ(0,"ng-option",86),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function yo(n,a){1&n&&(e.TgZ(0,"span",89),e._uU(1,"Vehicle is mandatory"),e.qZA())}function Co(n,a){if(1&n&&(e.TgZ(0,"span",93),e.YNc(1,yo,2,0,"span",88),e.qZA()),2&n){e.oxw();const t=e.MAs(22);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function Ao(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.lnq("Showing ",t.recordFrom," To ",t.recordTo," (Out Of ",t.totalCount,")Entries")}}function qo(n,a){1&n&&(e.TgZ(0,"option",94),e._uU(1,"20"),e.qZA())}function Oo(n,a){1&n&&(e.TgZ(0,"option",95),e._uU(1,"50"),e.qZA())}
1function Ro(n,a){1&n&&(e.TgZ(0,"option",96),e._uU(1,"100"),e.qZA())}function ko(n,a){if(1&n&&(e.TgZ(0,"option",86),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.Q6J("value",t.totalCount),e.xp6(1),e.hij(" ",t.totalCount," ")}}function wo(n,a){1&n&&(e.TgZ(0,"tbody")(1,"tr")(2,"td",97)(3,"div",98),e._uU(4,"No Record Found"),e.qZA()()()())}function Mo(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"tr")(1,"td",100),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.qZA(),e.TgZ(13,"td")(14,"button",101),e.NdJ("click",function(){const r=e.CHM(t).$implicit;return e.oxw(2).trackVehicle(r)}),e._UZ(15,"i",68),e.qZA()()()}if(2&n){const t=a.$implicit,o=e.oxw(2);e.xp6(2),e.Oqu(t.row_number),e.xp6(2),e.Oqu(""==o.busNumber?"Not Found":o.busNumber),e.xp6(2),e.Oqu(""==t.datatimestamp?"Not Found":t.datatimestamp),e.xp6(2),e.Oqu(""==t.enddatatimestamp?"Not Found":t.enddatatimestamp),e.xp6(2),e.Oqu(""==t.location?"Not Found":t.location),e.xp6(2),e.Oqu(""==t.duration?"Not Found":t.duration)}}function No(n,a){if(1&n&&(e.TgZ(0,"tbody"),e.YNc(1,Mo,16,6,"tr",99),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.detailData)}}function Fo(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",102)(1,"ngb-pagination",103),e.NdJ("pageChange",function(i){return e.CHM(t),e.oxw().reportFormRequest.pageno=i})("pageChange",function(){return e.CHM(t),e.oxw().details("")}),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("collectionSize",t.totalCount)("page",t.reportFormRequest.pageno)("maxSize",3)("pageSize",t.reportFormRequest.itemperpage)}}const ke=function(n){return{display:n}};let So=(()=>{class n{constructor(t,o,i,r,s,l,d,m){this.cv=t,this.cs=o,this.loader=i,this.route=r,this.es=s,this.mapService=l,this.listService=d,this.apiService=m,this.dateObj="",this.formsection=!0,this.loadersection=!1,this.detailsection=!1,this.loginRoleId=sessionStorage.getItem("loginroleid"),this.reportFormRequest=new h.UJ,this.apiname="",this.detailData=[],this.pageHeading="Idle Report",this.busNumber="",this.dateRange="",this.allVehicleObject={id:"",name:"All"},this.selectedBusList=[],this.roleList=[],this.customerTypeName="",this.customerList=[],this.sortDir=1,this.mapVehicleDetails=new y.TA}ngOnInit(){$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"}),this.getDate(),"101"==this.loginRoleId||"600"==this.loginRoleId?this.getRoleList():this.getVehicleList()}getRoleList(){var t=this;return(0,u.Z)(function*(){t.roleList=[],t.roleList=yield t.listService.getRoleList(new h.nO),t.roleList.push({id:"3",name:"vehicle"}),t.roleList=t.roleList.filter(o=>"school"==o.name||"customer"==o.name||"vehicle"==o.name)})()}onChangeCustomerType(){this.roleTypeObj&&(this.vehicleList=[],this.customerTypeName="","school"==this.roleTypeObj.name||"customer"==this.roleTypeObj.name?(this.customerTypeName=this.roleTypeObj.name,this.getCustomerList()):"vehicle"==this.roleTypeObj.name&&this.getVehicleList())}getCustomerList(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;o.filter1=t.roleTypeObj.id,t.customerList=yield t.listService.getCustomerList(o)})()}getVehicleList(){var t=this;return(0,u.Z)(function*(){t.vehicleList=yield t.listService.getVehicleList(new h.nO)})()}onChangeCustomerList(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;o.filter2=t.customerNameObj.id,t.schoolName=t.customerNameObj.name,t.vehicleList=yield t.listService.getVehicleList(o)})()}getDate(){$(()=>{$('input[name="date"]').daterangepicker({showDropdowns:!0,startDate:p().startOf("day").format("DD-MMM-YYYY"),endDate:p().endOf("day").format("DD-MMM-YYYY"),opens:"center",drops:"down",maxSpan:{days:30},locale:{format:"DD-MMM-YYYY"},ranges:{Today:[p(),p()],Yesterday:[p().subtract(1,"days"),p().subtract(1,"days")],"This Week":[p().startOf("week"),p().endOf("week")],"This Month":[p().startOf("month"),p().endOf("day")]},maxDate:new Date,minYear:2022,maxYear:parseInt(p().format("YYYY"),10),function(t,o){$("#datepicker").html(t.format("DD-MMM-YYYY")+" : "+o.format("DD-MMM-YYYY"))}}),$('input[name="date"]').on("hide.daterangepicker",(t,o)=>{try{this.dateObj=t.target.value}catch(i){}}),this.dateObj=document.getElementById("datepicker").value})}onChangeSchool(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;o.schoolid=t.schoolObj.id,t.vehicleList=yield t.listService.getVehicleList(o)})()}checkAllBus(){this.busNumber="All"==this.busNoObj.name?"":this.busNoObj.name}validateForm(){if(this.reportForm.valid){this.formsection=!1,this.schoolName=this.schoolObj?this.schoolObj.name:"",this.customerName=this.customerNameObj?this.customerNameObj.name:"",this.busNoObj&&("All"==this.busNoObj.name?(this.customerName="All",this.reportFormRequest.vehicleid="all"):(this.customerName=this.busNoObj.customername,this.reportFormRequest.vehicleid=this.busNoObj?this.busNoObj.id:"",this.reportFormRequest.vehicleno=this.busNoObj?this.busNoObj.name:"",this.reportFormRequest.imeino=this.busNoObj?this.busNoObj.imeino:"")),"school"==this.customerTypeName&&(this.customerName=this.customerNameObj.name),"customer"==this.customerTypeName&&(this.customerName=this.customerNameObj.name),this.reportFormRequest.customername=this.customerName;let t=this.dateObj.split(" - ");this.reportFormRequest.fromdate=t[0],this.reportFormRequest.todate=t[1],this.reportFormRequest.fromtime=document.getElementById("fromtime").value.replace(" ","").replace(" ",""),this.reportFormRequest.totime=document.getElementById("totime").value.replace(" ","").replace(" ",""),this.dateRange=this.reportFormRequest.fromdate+" "+this.reportFormRequest.fromtime+" To "+this.reportFormRequest.todate+" "+this.reportFormRequest.totime,this.details("refresh")}}details(t){"showrow"==t&&(this.reportFormRequest.pageno=1),"search"==t&&(this.reportFormRequest.pageno=1),"refresh"==t&&(this.reportFormRequest.searchby="",this.reportFormRequest.pageno=1,this.reportFormRequest.itemperpage=10),this.reportFormRequest.searchby=this.reportFormRequest.searchby.trim(),this.detailsection=!0,this.formsection=!1,this.loadersection=!1;try{this.loader.loaderOn()}catch(o){}this.es.apiCall(this.reportFormRequest,"idlereportonruntime").subscribe(o=>{try{this.loader.loaderOff()}catch(i){}this.detailsection=!0,this.loadersection=!1,200==o.statusCode?(this.formsection=!1,this.detailData=o.entity.historytrackdetails,this.totalCount=Number(o.entity.totalrecord),this.recordFrom=Number(this.detailData[0].row_number),this.recordTo=Number(this.detailData[this.detailData.length-1].row_number)):(this.detailData=[],this.recordTo=0,this.recordFrom=0,this.totalCount=0,this.reportFormRequest.searchby=""),this.es.pageDataInfo("",this.reportFormRequest,"Idle Report","Details method","Called Function",o.massage)},o=>{this.loader.loaderOff()})}redirectToForm(){var t=this;return(0,u.Z)(function*(){t.reportForm.resetForm(),t.formsection=!0,t.detailsection=!1,t.getDate(),$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"}),yield t.getRoleList(),yield t.getVehicleList(),t.schoolObj=null,t.busNoObj=null,t.vehicleList=[]})()}ResetForm(){this.reportForm.resetForm(),this.formsection=!0,this.getDate(),setTimeout(()=>{$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"})},1500),this.getRoleList(),this.schoolObj=null,this.busNoObj=null,this.vehicleList=[]}sorting(t,o){try{let r=t.currentTarget.childNodes[1].classList;try{r.contains("fa-sort-amount-desc")?(r.remove("fa-sort-amount-desc"),r.add("fa-sort-amount-asc")):(r.remove("fa-sort-amount-asc"),r.add("fa-sort-amount-desc"))}catch(s){console.log("e "+s)}this.sortDir=1==this.sortDir?-1:1;try{this.detailData.length>0&&this.detailData.sort((s,l)=>(s=s[o].toLowerCase(),l=l[o].toLowerCase(),s.localeCompare(l)*this.sortDir))}catch(s){console.log("e "+s)}}catch(i){}}downloadDoc(t){let o=new h.UJ;o.pdfexcel=t,o.itemperpage="",o.pageno="",o.imeino=this.reportFormRequest.imeino,o.vehicleid=this.reportFormRequest.vehicleid,o.fromdate=this.reportFormRequest.fromdate,o.todate=this.reportFormRequest.todate,o.fromtime=this.reportFormRequest.fromtime,o.totime=this.reportFormRequest.totime,o.searchby=this.reportFormRequest.searchby.trim();try{this.loader.loaderOn()}catch(i){}this.es.apiCall(o,"idlereportonruntime").subscribe(i=>{try{this.loader.loaderOff()}catch(r){}"200"==i.statusCode&&(this.filePath=i.message,this.es.commonFileDownload(this.filePath)),o.pdfexcel="",this.es.pageDataInfo("",this.reportFormRequest,"Idle Report","Download Excel / PDF method","Called Function",i.message)})}trackVehicle(t){var o=this;return(0,u.Z)(function*(){var i,r;o.mapVehicleDetails=t;let s=new h.qm;s.vehicleid=o.busNoObj?o.busNoObj.id:"";
1let l=yield o.es.apiCall(s,"vehicledetails").toPromise(),d=new y.Us;if(200==l.statusCode){let b=l.entity.vehicledetails[0];d.vehicleno=b.vehicleno,d.customername=b.customername,d.vehicleclassname=b.classname,d.speed=t.speed,d.location=t.location,d.gpsstatus=t.status,d.pollingdatatime=t.datatimestamp,d.latitude=t.latitude,d.longitude=t.longitude}o.es.pageDataInfo("",o.reportFormRequest,"Idle Report","Track Vehicle method","Called Function",l.message),$("#exampleModal").modal("show"),null===(i=o.mapService.poiLayer.getSource())||void 0===i||i.clear();let m=[],_=new P.Z({geometry:new E.Z(j.mi([+t.longitude,+t.latitude]))});_.setStyle(o.mapService.vehicleIdleStyleFunction),_.setProperties({properties:d}),m.push(_),null===(r=o.mapService.historyDirectionIconLayer.getSource())||void 0===r||r.addFeatures(m),o.mapService.map.getView().animate({center:j.mi([+t.longitude,+t.latitude]),zoom:17})})()}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(S.R),e.Y36(U.v),e.Y36(N.D),e.Y36(M.F0),e.Y36(F.P),e.Y36(J.S),e.Y36(D.X),e.Y36(z.s))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-idlereport"]],viewQuery:function(t,o){if(1&t&&e.Gf(uo,5),2&t){let i;e.iGM(i=e.CRH())&&(o.reportForm=i.first)}},decls:144,vars:39,consts:[[1,"container-fluid","report-form-container"],[1,"reportheader"],["aria-hidden","true",1,"fa","fa-credit-card"],[1,"rptheadertext"],[1,"row",3,"ngStyle"],[1,"col-md-12"],["novalidate","","id","form_id","autocomplete","off",1,"needs-validation"],["reportForm","ngForm"],[1,"row"],["class","col-md-2",4,"ngIf"],[1,"col-md-2"],[1,"form-group"],[1,"mb-0","label"],[1,"starvalid"],["name","vehicleNumber","placeholder","Select Vehicle","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["busNoCtrl","ngModel"],[3,"value",4,"ngFor","ngForOf"],["class","form-control-feedback text-danger",4,"ngIf"],[1,"col-md-4"],[1,"d-flex","justify-content-between"],[1,"report-label","mb-0"],["type","text","name","date","id","datepicker","required","","placeholder","Select Date",1,"form-control","form-control-sm"],[1,"form-group","mb-0",2,"width","85px","float","left"],[1,"mb-0"],["type","text","name","timepicker","id","fromtime",1,"fromTime","form-control","form-control-sm","text-center"],[1,"form-group",2,"width","85px","float","left"],["type","text","name","timepicker","id","totime",1,"toTime","form-control","form-control-sm","text-center"],[1,"col","mt-3"],["type","submit",1,"custom-btn","btn-13","float-right","Show","mb-3",3,"click"],["type","button",1,"custom-btn","btn-10","float-right","mr-2",3,"click"],[1,"report-form-container"],[1,"row","grid-section",3,"ngStyle"],[1,"col-md-12",2,"background-color","white"],[1,"row","py-2","report-summary"],[1,"col-md-3"],[1,"fw-bolder","text-small","text-uppercase","outputlabel"],[1,"text-uppercase","text-small","outputlabel"],[1,"customerNameForSummary"],[1,"col-md-6"],[1,"col","text-end","float-end"],["ngbTooltip","Back",1,"backbtnbackground",3,"click"],["aria-hidden","true",1,"fa","fa-arrow-circle-o-left","outputlabel"],[1,"col-md-12","px-0",2,"background-color","white"],[1,"table-head","d-flex","justify-content-between"],["id","tickets-table_info","role","status","aria-live","polite",1,"col-auto","mt-2","text-center","fw-bold","total-record-label"],[4,"ngIf"],[1,"mt-1"],[1,"itemsperpage-style",2,"margin-right","10px"],[1,"d-inline-flex","align-items-center"],["name","table_length","aria-controls","table","name","pageSize",3,"ngModel","ngModelChange","change"],["value","10","selected",""],["value","20",4,"ngIf"],["value","50",4,"ngIf"],["value","100",4,"ngIf"],[3,"value",4,"ngIf"],["type","button",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"click"],["aria-hidden","true",1,"fa","fa-refresh"],["type","button","ngbTooltip","Download Pdf","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-pdf-o","pdf-btn"],["type","button","ngbTooltip","Download Excel","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-excel-o","excel-btn"],["type","text","name","searchTerm","autocomplete","off","aria-controls","tickets-table","placeholder","Search here....","autocomplete","off",1,"form-control","form-control-sm","ms-2","searchinput",2,"width","165px",3,"ngModel","ngModelChange"],["type","button",1,"btn","search-btn",3,"click"],[1,"fa","fa-search"],[1,"scroll-tbl"],[1,"table","table-striped","table-style",2,"overflow-y","auto","overflow-x","auto"],[2,"width","40px",3,"click"],[1,"fa","fa-sort-amount-desc"],[1,"fa","fa-map-marker"],[1,"row","justify-content-md-between","align-items-md-center","mt-2"],["class","float-end text-start",4,"ngIf"],["id","exampleModal","tabindex","-1","aria-labelledby","exampleModalLabel","data-bs-backdrop","static","data-bs-keyboard","false","aria-hidden","true",1,"modal","fade"],[1,"modal-dialog","modal
1-xl"],[1,"modal-content"],[1,"modal-header","bg-white"],["id","exampleModalLabel",1,"modal-title"],["type","button","data-bs-dismiss","modal","aria-label","Close",1,"btn-close",3,"click"],[1,"modal-body","p-0"],[2,"width","100%","height","500px"],[1,"current-vehicle-section"],[1,"p-1",2,"max-width","250px","font-size","12px"],[1,"m-0"],[1,"text-danger"],["name","roletype","placeholder","Select Filter Type ","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["roleTypeCtrl","ngModel"],["class","form-control-feedback text-danger text-danger",4,"ngIf"],[3,"value"],[1,"form-control-feedback","text-danger","text-danger"],["class","text-small",4,"ngIf"],[1,"text-small"],[1,"mb-0","text-capitalize"],["name","customertype","required","",1,"text-capitalize",3,"ngClass","ngModel","multiple","placeholder","closeOnSelect","ngModelChange","change"],["customerNameCtrl","ngModel"],[1,"form-control-feedback","text-danger"],["value","20"],["value","50"],["value","100"],["colspan","9"],[1,"text-center"],[4,"ngFor","ngForOf"],[1,"srnotd"],["title","Track Idle","data-bs-toggle","modal","data-bs-target","#exampleModal",1,"btn","btn-sm","btn-dark","p-1",3,"click"],[1,"float-end","text-start"],["size","sm",1,"d-flex","mt-2","justify-content-end","pagination-rounded","pagination","pagination-info",3,"collectionSize","page","maxSize","pageSize","pageChange"]],template:function(t,o){if(1&t&&(e.TgZ(0,"div",0)(1,"div")(2,"h5",1),e._UZ(3,"i",2),e._uU(4,"\xa0\xa0\xa0"),e.TgZ(5,"span",3),e._uU(6,"Idle Report"),e.qZA()(),e._UZ(7,"hr"),e.qZA(),e.TgZ(8,"div",4)(9,"div",5)(10,"form",6,7)(12,"div",8),e.YNc(13,fo,10,9,"div",9),e.YNc(14,Zo,10,11,"div",9),e.TgZ(15,"div",10)(16,"div",11)(17,"label",12),e._uU(18,"Vehicle Number "),e.TgZ(19,"span",13),e._uU(20,"*"),e.qZA()(),e.TgZ(21,"ng-select",14,15),e.NdJ("ngModelChange",function(r){return o.busNoObj=r})("change",function(){return o.checkAllBus()}),e.YNc(23,xo,2,2,"ng-option",16),e.qZA(),e.YNc(24,Co,2,1,"span",17),e.qZA()(),e.TgZ(25,"div",18)(26,"div",19)(27,"div",11)(28,"label",20),e._uU(29,"Date Range:"),e.qZA(),e._UZ(30,"input",21),e.qZA(),e.TgZ(31,"div",22)(32,"label",23),e._uU(33,"Time "),e.qZA(),e._UZ(34,"input",24),e.qZA(),e._uU(35," \xa0\xa0\xa0 "),e.TgZ(36,"div",25),e._UZ(37,"label",23)(38,"input",26),e.qZA()()(),e.TgZ(39,"div",27)(40,"button",28),e.NdJ("click",function(){return o.validateForm()}),e._uU(41,"Generate"),e.qZA(),e._uU(42," \xa0 "),e.TgZ(43,"button",29),e.NdJ("click",function(){return o.ResetForm()}),e._uU(44,"Reset"),e.qZA()()()()()()(),e.TgZ(45,"div",30)(46,"div",31)(47,"div",32)(48,"div",33)(49,"div",34)(50,"span",35),e._uU(51,"Vehicle :"),e.qZA(),e.TgZ(52,"span",36),e._uU(53),e.qZA(),e._UZ(54,"br"),e.TgZ(55,"span",37),e._uU(56),e.qZA()(),e.TgZ(57,"div",38)(58,"span",35),e._uU(59,"Date :"),e.qZA(),e.TgZ(60,"span",36),e._uU(61),e.qZA()(),e.TgZ(62,"div",39)(63,"button",40),e.NdJ("click",function(){return o.redirectToForm()}),e._UZ(64,"i",41),e.qZA()()()(),e.TgZ(65,"div",42)(66,"div",43)(67,"div",44),e.YNc(68,Ao,2,3,"span",45),e.qZA(),e.TgZ(69,"div",46)(70,"span",47)(71,"label",48),e._uU(72,"Show "),e.TgZ(73,"select",49),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.itemperpage=r})("change",function(){return o.details("showrow")}),e.TgZ(74,"option",50),e._uU(75," 10"),e.qZA(),e.YNc(76,qo,2,0,"option",51),e.YNc(77,Oo,2,0,"option",52),e.YNc(78,Ro,2,0,"option",53),e.YNc(79,ko,2,2,"option",54),e.qZA(),e._uU(80," entries"),e.qZA()(),e.TgZ(81,"span")(82,"button",55),e.NdJ("click",function(){return o.details("refresh")}),e._UZ(83,"i",56),e.qZA()(),e.TgZ(84,"span")(85,"button",57),e.NdJ("click",function(){return o.downloadDoc("pdf")}),e._UZ(86,"i",58),e.qZA(),e.TgZ(87,"button",59),e.NdJ("click",function(){return o.downloadDoc("excel")}),e._UZ(88,"i",60),e.qZA()(),e.TgZ(89,"label")(90,"input",61),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.searchby=r}),e.qZA()(),e.TgZ(91,"button",62),e.NdJ("click",function(){return o.details("search")}),e._UZ(92,"span",63),e.qZA()()(),e.TgZ(93,"div",64)(94,"table",65)(95,"thead")(96,"tr")(97,"th",66),e.NdJ("click",function(r){return o.sorting(r,"rowno")}),e._uU(98,"#"),e._UZ(99,"i",67),e.qZA(),e.TgZ(100,"th"),e._uU(101,"Vehicle No."),e.qZA(),e.TgZ(102,"th"),e._uU(103,"Idle Time"),e.qZA(),e.TgZ(104,"th"),e._uU(105,"Idle End Date"),e.qZA(),e.TgZ(106,"th"),e._uU(107,"Location"),e.qZA(),e.TgZ(108,"th"),e._uU(109,"Duration"),e.qZA(),e.TgZ(110,"th"),e._UZ(111,"i",68),e.qZA()()(),e.YNc(112,wo,5,0,"tbody",45),e.YNc(113,No,2,1,"tbody",45),e.qZA()(),e.TgZ(114,"div",69),e.YNc(115,Fo,2,4,"div",70),e.qZA()()()(),e.TgZ(116,"div",71)(117,"div",72)(118,"div",73)(119,"div",74)(120,"h4",75)(121,"u"),e._uU(122," Idle Summary"),e.qZA(),e._uU(123," of "),e.TgZ(124,"b"),e._uU(125),e.qZA(),e._uU(126," from "),e.TgZ(127,"b"),e._uU(128),e.qZA(),e._uU(129," to "),e.TgZ(130,"b"),e._uU(131),e.qZA()(),e.TgZ(132,"button",76),e.NdJ("click",function(){return o.mapService.clearAllLayers()}),e.qZA()(),e.TgZ(133,"div",77)(134,"div",78),e._UZ(135,"app-helper-map"),e.TgZ(136,"div",79)(137,"div",80)(138,"p",81),e._uU(139),e.qZA(),e.TgZ(140,"p",81),e._uU(141),e.qZA(),e.TgZ(142,"p",81),e._uU(143),e.qZA()()()()()()()()),2&t){const i=e.MAs(11),r=e.MAs(22);e.xp6(8),e.Q6J("ngStyle",e.VKq(32,ke,o.formsection?"":"none")),e.xp6(
15),e.Q6J("ngIf","101"==o.loginRoleId||"600"==o.loginRoleId),e.xp6(1),e.Q6J("ngIf",("101"==o.loginRoleId||"600"==o.loginRoleId)&&"school"==o.customerTypeName||"customer"==o.customerTypeName),e.xp6(7),e.Q6J("ngClass",e.WLB(34,ie,r.valid,r.invalid&&i.submitted))("ngModel",o.busNoObj)("multiple",!1)("closeOnSelect",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",o.vehicleList),e.xp6(1),e.Q6J("ngIf",r.errors&&(r.dirty||r.touched||i.submitted)),e.xp6(22),e.Q6J("ngStyle",e.VKq(37,ke,o.detailsection?"":"none")),e.xp6(7),e.hij(" ",o.busNumber,""),e.xp6(3),e.Oqu(o.customerName),e.xp6(5),e.hij(" ",o.dateRange,""),e.xp6(7),e.Q6J("ngIf",0!=o.totalCount),e.xp6(5),e.Q6J("ngModel",o.reportFormRequest.itemperpage),e.xp6(3),e.Q6J("ngIf",o.totalCount>20),e.xp6(1),e.Q6J("ngIf",o.totalCount>50),e.xp6(1),e.Q6J("ngIf",o.totalCount>100),e.xp6(1),e.Q6J("ngIf",o.totalCount<100&&o.totalCount>10),e.xp6(6),e.Q6J("disabled","0"==o.totalCount),e.xp6(2),e.Q6J("disabled","0"==o.totalCount),e.xp6(3),e.Q6J("ngModel",o.reportFormRequest.searchby),e.xp6(22),e.Q6J("ngIf",0==o.totalCount),e.xp6(1),e.Q6J("ngIf",0!=o.totalCount),e.xp6(2),e.Q6J("ngIf",o.totalCount>o.reportFormRequest.itemperpage),e.xp6(10),e.hij("",o.busNumber," "),e.xp6(3),e.hij(" ",o.mapVehicleDetails.datatimestamp,""),e.xp6(3),e.hij("",o.mapVehicleDetails.enddatatimestamp," "),e.xp6(8),e.hij("Start Date : ",o.mapVehicleDetails.datatimestamp,""),e.xp6(2),e.hij("End Date : ",o.mapVehicleDetails.enddatatimestamp,""),e.xp6(2),e.hij("Duration : ",o.mapVehicleDetails.duration,"")}},directives:[g.PC,c._Y,c.JL,c.F,g.O5,A.w9,c.Q7,g.mk,c.JJ,c.On,g.sg,A.xv,C._L,c.EJ,c.YN,c.Kr,c.Fj,C.N9,Y.F],styles:[".ng-select.ng-select-single .ng-select-container .ng-value-container{font-size:12px!important} .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{font-size:12px!important;text-transform:capitalize}ng-select.ng-select-single[_ngcontent-%COMP%] .ng-select-container{min-height:26px;max-height:26px;height:26px}.form-control[_ngcontent-%COMP%]{height:calc(1.45rem + 2px)}.invalid-feedback[_ngcontent-%COMP%]{font-size:11px;color:#dc3545}input[_ngcontent-%COMP%]{font-size:12px}.starvalid[_ngcontent-%COMP%]{color:#ff0040!important}.validationmsg[_ngcontent-%COMP%]{--bs-text-opacity: 1;color:#ff0040!important;font-weight:600}.card-shimmer[_ngcontent-%COMP%]{position:relative;box-shadow:0 6px 8px #0000001a;background-color:#fff;border-radius:6px;height:290px;overflow:hidden;margin:40px auto}.shimmerBG[_ngcontent-%COMP%]{animation-duration:2.2s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:shimmer;animation-timing-function:linear;background:#E5F0FB;background:linear-gradient(to right,#cfeeeb 4%,#9ac9c6 25%,#d5f0f0 36%);background-size:1100px 100%}@keyframes shimmer{0%{background-position:-1200px 0}to{background-position:1200px 0}}.media[_ngcontent-%COMP%]{height:110px}.p-32[_ngcontent-%COMP%]{padding:32px}.title-line[_ngcontent-%COMP%]{height:24px;width:100%;margin-bottom:12px;border-radius:20px}.content-line[_ngcontent-%COMP%]{height:8px;width:100%;margin-bottom:16px;border-radius:8px}.end[_ngcontent-%COMP%]{width:40%}.m-t-24[_ngcontent-%COMP%]{margin-top:24px}.rptheadertext[_ngcontent-%COMP%]{text-decoration:underline}.rptlabel[_ngcontent-%COMP%]{color:#000}.form-group[_ngcontent-%COMP%]{margin-bottom:.2rem}"]}),n})();var f=v(98407),we=(v(69529),v(17845),v(17445)),Uo=v(63900),Do=v(95969);let Me=(()=>{class n{constructor(t,o,i,r){this.eventService=t,this.apiService=o,this.loader=i,this.datePipe=r,this.liveVehicleTrailCoords=[],this.liveDirectionMarkers=[],this.clusterVehicleData=[],this.clusterIntervalFlag=!1,this.historyDirectionMarkers=[],this.filteredHistoryData=[],this.historyCurrentIndex=0,this.animationStatus="stopped",this.animationSpeed=2e3,this.currentVehicleData={},this.refreshInterval=1e4,this.currentVehicleId="",this.currentDeviceImei="",this.view={center:[20.5937,78.9629],maxBounds:[[6.5,67],[37.1,97.5]],zoom:5,minZoom:4.4,maxZoom:25,zoomControl:!1,attributionControl:!1,scrollWheelZoom:!0,preferCanvas:!0,zoomAnimation:!0,fadeAnimation:!0,markerZoomAnimation:!0},this.isPlaying=!1,this.isPaused=!1,this.currentSpeed=1,this.currentIndex=0}updateHistoryVehicleMarker(){const t=this.filteredHistoryData[this.historyCurrentIndex];if(!t)return;
1const o=f.icon({iconUrl:"assets/map/green.png",iconSize:[18,32],iconAnchor:[16,16],popupAnchor:[0,-16]}),i=parseFloat(t.latitude),r=parseFloat(t.longitude),s=parseFloat(t.vehicledirection||t.heading||"0");if(this.historyVehicleMarker){const l=this.historyVehicleMarker.getLatLng();this.animateMarkerToPosition(this.historyVehicleMarker,l,[i,r],this.animationSpeed)}else this.historyVehicleMarker=f.marker([i,r],{icon:o}).addTo(this.map);this.historyVehicleMarker.setRotationAngle&&(this.historyVehicleMarker.setRotationAngle(s),this.historyVehicleMarker.setRotationOrigin("center")),this.historyVehicleMarker.bindPopup(this.createPopupContent(t)),this.updateCurrentHistoryArrow()}animateMarkerToPosition(t,o,i,r){const s=o,l=Array.isArray(i)?f.latLng(i[0],i[1]):i,m=r/30;let _=0;const b=(l.lat-s.lat)/30,x=(l.lng-s.lng)/30,T=()=>{_++;const Z=s.lat+b*_,I=s.lng+x*_;t.setLatLng([Z,I]);const R=this.calculateLeafletBearing(f.latLng(s.lat,s.lng),f.latLng(Z,I));t.setRotationAngle&&(t.setRotationAngle(R),t.setRotationOrigin("center")),_<30?setTimeout(T,m):t.setLatLng([l.lat,l.lng])};T()}updateCurrentHistoryArrow(){if(this.historyDirectionMarkers.forEach(t=>{this.map.removeLayer(t)}),this.historyDirectionMarkers=[],this.filteredHistoryData.length>1){const t=this.filteredHistoryData.map(i=>f.latLng(parseFloat(i.latitude),parseFloat(i.longitude))),o=Math.max(1,Math.floor(t.length/15));for(let i=o;i<t.length;i+=o){const r=t[i-1],s=t[i],l=this.calculateLeafletBearing(r,s),d=f.divIcon({html:`<div class="history-arrow" style="transform: rotate(${l}deg); color: #33cc33; font-size: 20px;">\u27a4</div>`,className:"direction-arrow animated-arrow",iconSize:[20,20],iconAnchor:[10,10]}),b=f.marker([(r.lat+s.lat)/2,(r.lng+s.lng)/2],{icon:d,interactive:!1}).addTo(this.map);this.historyDirectionMarkers.push(b)}}}startHistoryAnimation(){0!==this.filteredHistoryData.length&&(this.animationStatus="playing",this.clearHistoryInterval(),this.updateCurrentHistoryArrow(),this.historyAnimationInterval=setInterval(()=>{this.animateHistoryStep()},this.animationSpeed))}resumeHistoryAnimation(){0!==this.filteredHistoryData.length&&(this.animationStatus="playing",this.clearHistoryInterval(),this.historyAnimationInterval=setInterval(()=>{this.animateHistoryStep()},this.animationSpeed))}pauseHistoryAnimation(){this.animationStatus="paused",this.clearHistoryInterval()}stopHistoryAnimation(){this.animationStatus="stopped",this.clearHistoryInterval(),this.historyCurrentIndex=0}restartHistoryAnimation(){this.stopHistoryAnimation(),this.historyCurrentIndex=0,this.updateHistoryVehicleMarker(),setTimeout(()=>{this.startHistoryAnimation()},50)}setAnimationSpeed(t){this.animationSpeed=t,"playing"===this.animationStatus&&(this.clearHistoryInterval(),this.historyAnimationInterval=setInterval(()=>{this.animateHistoryStep()},this.animationSpeed))}clearHistoryInterval(){this.historyAnimationInterval&&(clearInterval(this.historyAnimationInterval),this.historyAnimationInterval=void 0)}animateHistoryStep(){0!==this.filteredHistoryData.length&&(this.historyCurrentIndex<this.filteredHistoryData.length-1?(this.historyCurrentIndex++,this.updateHistoryVehicleMarker()):(this.updateHistoryVehicleMarker(),this.stopHistoryAnimation()))}clearAllLayers(){this.map&&this.map.eachLayer&&this.map.eachLayer(t=>{(t instanceof f.Marker||t instanceof f.Circle||t instanceof f.Polyline||t instanceof f.LayerGroup)&&this.map.removeLayer(t)})}trackOverspeedHistory(t,o,i,r,s,l,d){var m=this;return(0,u.Z)(function*(){var _,b,x,T,Z,I;try{m.clearHistoryTracking(),null===(b=null===(_=m.loader)||void 0===_?void 0:_.loaderOn)||void 0===b||b.call(_);const R=new y.rn;R.imeino=t,R.vehicleid=l,R.fromdate=o,R.fromtime=i,R.todate=r,R.totime=s,R.searchbytype="overspeed";const k=yield m.apiService.historytrack(R);if(null===(T=null===(x=m.loader)||void 0===x?void 0:x.loaderOff)||void 0===T||T.call(x),"200"==k.statusCode&&1==k.status&&k.entity.historytrackdetails.length>0){m.filteredHistoryData=[];const O=k.entity.historytrackdetails;for(let q=0;q<O.length;q++){let w=new y.Us;w.pollingdatatime=O[q].datatimestamp,w.ignitionstatus=O[q].ignitionstatus,w.speed=O[q].speed,w.latitude=O[q].latitude,w.longitude=O[q].longitude,w.heading=O[q].heading,w.vehicledirection=O[q].heading,w.rowno=O[q].row_number,w.location=O[q].location,w.gpsstatus=O[q].status,w.commutedistance=O[q].commutedistance,w.vehicleno=(null==d?void 0:d.vehicleno)||"",w.deviceimeino=t,w.trackingtype="overspeed",m.filteredHistoryData.push(w)}m.plotHistoryRoute()}else m.filteredHistoryData=[],m.loader&&(m.loader.responseMessage="Overspeed History Not Found",m.loader.failedNotification&&m.loader.failedNotification())}catch(R){console.error("[OverspeedTrack] Error:",R),null===(I=null===(Z=m.loader)||void 0===Z?void 0:Z.loaderOff)||void 0===I||I.call(Z),m.loader&&(m.loader.responseMessage="Error fetching overspeed history",m.loader.failedNotification&&m.loader.failedNotification())}})()}configureBaseLayers(){this.baselayer={OpenStreetMap:f.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{id:"OpenStreetMap"}),satelliteLayer:f.tileLayer("https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",{attribution:"Tiles © Esri",id:"satelliteLayer"})}}initMap(){try{if(!document.getElementById("reportTrackingMap"))return void console.error('Map container with i
1d "reportTrackingMap" not found');this.map&&this.map.remove(),this.map=f.map("reportTrackingMap",this.view),f.control.zoom({position:"topright"}).addTo(this.map),this.configureBaseLayers(),this.baselayer.OpenStreetMap.addTo(this.map),f.control.layers(this.baselayer,{},{position:"topright"}).addTo(this.map),console.log("Live tracking map initialized successfully")}catch(t){console.error("Error initializing live tracking map:",t)}}trackLiveVehicle(t){try{this.currentVehicleData=t,this.currentVehicleId=t.vehicleid||"",this.currentDeviceImei=t.deviceimeino||"",this.clearLiveTracking();const o=parseFloat(t.latitude),i=parseFloat(t.longitude);if(isNaN(o)||isNaN(i))return void console.error("Invalid coordinates");const r=[o,i],s=this.getVehicleIcon(t),l=f.icon({iconUrl:s,iconSize:[16,28],iconAnchor:[8,14],popupAnchor:[0,-14]});this.liveVehicleMarker=f.marker(r,{icon:l}),t.vehicledirection&&(this.liveVehicleMarker.setRotationAngle(parseFloat(t.vehicledirection)),this.liveVehicleMarker.setRotationOrigin("center"));const d=this.createPopupContent(t);this.liveVehicleMarker.bindPopup(d).openPopup(),this.liveVehicleMarker.addTo(this.map),this.liveVehicleTrailCoords=[r],this.liveVehicleTrail=f.polyline(this.liveVehicleTrailCoords,{color:"#FF5733",weight:4,opacity:.8,smoothFactor:1}).addTo(this.map),this.addArrowDecorator(this.liveVehicleTrail),this.map.setView(r,16),this.startAutoRefreshWithAPI()}catch(o){console.error("Error tracking live vehicle:",o)}}addArrowDecorator(t){try{this.addDirectionArrows(t)}catch(o){console.log("Arrow decorator error:",o)}}addDirectionArrows(t){this.liveDirectionMarkers.forEach(r=>{this.map.removeLayer(r)}),this.liveDirectionMarkers=[];const o=t.getLatLngs();if(o.length<2)return;const i=Math.max(1,Math.floor(o.length/10));for(let r=i;r<o.length;r+=i){const s=o[r-1],l=o[r],d=this.calculateBearing(s,l),m=f.divIcon({html:`<div style="transform: rotate(${d}deg); color: #FF5733; font-size: 20px;">\u27a4</div>`,className:"direction-arrow",iconSize:[20,20],iconAnchor:[10,10]}),x=f.marker([(s.lat+l.lat)/2,(s.lng+l.lng)/2],{icon:m,interactive:!1}).addTo(this.map);this.liveDirectionMarkers.push(x)}}calculateBearing(t,o){const i=t.lat*Math.PI/180,r=t.lng*Math.PI/180,s=o.lat*Math.PI/180,d=o.lng*Math.PI/180-r,m=Math.sin(d)*Math.cos(s),_=Math.cos(i)*Math.sin(s)-Math.sin(i)*Math.cos(s)*Math.cos(d);return(180*Math.atan2(m,_)/Math.PI+360)%360}getVehicleIcon(t){var o,i;null===(o=t.ignitionstatus)||void 0===o||o.toLowerCase();const s=null===(i=t.pollingstatus)||void 0===i?void 0:i.toLowerCase();return"running"===s?"assets/map/green.png":"idle"===s?"assets/map/yellow.png":"stop"===s?"assets/map/blue.png":"assets/map/red.png"}createPopupContent(t){var o,i;const r=(null===(o=t.pollingstatus)||void 0===o?void 0:o.toLowerCase())||"";let s="status-badge ";return"running"===r?s+="status-running":"stop"===r?s+="status-stop":"idle"===r&&(s+="status-idle"),`\n <div class="vehicle-popup small-popup">\n <table class="popup-table">\n <tr>\n <th colspan="3" class="popup-title" style="background-color: #283d55;\n color: white; text-align: center;" >\u{1f690} ${t.vehicleno||"N/A"}</th>\n </tr>\n <tr>\n <td>\u{1f4f1} IMEI</td>\n <td>${t.deviceimeino||"N/A"}</td>\n </tr>\n <tr>\n <td>\u26a1 Speed</td>\n <td style="font-weight: 700; color: ${parseFloat(t.speed||"0")>40?"#dc3545":"#28a745"};">\n ${t.speed||0} km/h\n </td>\n </tr>\n <tr>\n <td>\u{1f4ca} Status</td>\n <td><span class="${s}">${t.pollingstatus||"N/A"}</span></td>\n </tr>\n <tr>\n <td>\u{1f511} Ignition</td>\n <td style="font-weight: 600; color: ${"on"===(null===(i=t.ignitionstatus)||void 0===i?void 0:i.toLowerCase())?"#28a745":"#6c757d"};">\n ${t.ignitionstatus||"N/A"}\n </td>\n </tr>\n <tr>\n <td>\u{1f550} Time</td>\n <td>${t.pollingdatatime||"N/A"}</td>\n </tr>\n <tr>\n <td>\u{1f4cd} Location</td>\n <td>${t.location||"N/A"}</td>\n </tr>\n </table>\n </div>\n `}updateVehiclePosition(t){try{const o=parseFloat(t.latitude),i=parseFloat(t.longitude);if(isNaN(o)||isNaN(i))return;const r=[o,i];if(this.liveVehicleMarker){const s=this.liveVehicleMarker.getLatLng();this.animateMarkerToPosition(this.liveVehicleMarker,s,r,1e3),t.vehicledirection&&this.liveVehicleMarker.setRotationAngle(parseFloat(t.vehicledirection));const l=this.getVehicleIcon(t),d=f.icon({iconUrl:l,iconSize:[24,24],iconAnchor:[12,12],popupAnchor:[0,-12]});this.liveVehicleMarker.setIcon(d);const m=this.createPopupContent(t);this.liveVehicleMarker.setPopupContent(m)}this.liveVehicleCircle&&this.liveVehicleCircle.setLatLng(r),this.liveVehicleTrailCo
1ords.push(r),this.liveVehicleTrail&&(this.liveVehicleTrail.setLatLngs(this.liveVehicleTrailCoords),this.addDirectionArrows(this.liveVehicleTrail)),this.currentVehicleData=t,this.map.panTo(r,{animate:!0,duration:1,easeLinearity:.25})}catch(o){console.error("Error updating vehicle position:",o)}}startAutoRefreshWithAPI(){this.stopAutoRefresh(),this.refreshSubscription=(0,we.F)(this.refreshInterval).pipe((0,Uo.w)(()=>this.eventService.apiCall({vehicleid:this.currentVehicleId,deviceimeino:this.currentDeviceImei},"map/getliveposition"))).subscribe({next:t=>{200===t.statusCode&&t.entity&&this.updateVehiclePosition(t.entity)},error:t=>{console.error("Error fetching live vehicle data:",t)}})}startAutoRefresh(){this.stopAutoRefresh(),this.refreshSubscription=(0,we.F)(this.refreshInterval).subscribe(()=>{console.log("Auto-refresh triggered at",(new Date).toLocaleTimeString())})}stopAutoRefresh(){this.refreshSubscription&&(this.refreshSubscription.unsubscribe(),this.refreshSubscription=void 0)}clearLiveTracking(){this.liveVehicleMarker&&(this.map.removeLayer(this.liveVehicleMarker),this.liveVehicleMarker=void 0),this.liveVehicleTrail&&(this.map.removeLayer(this.liveVehicleTrail),this.liveVehicleTrail=void 0),this.liveVehicleCircle&&(this.map.removeLayer(this.liveVehicleCircle),this.liveVehicleCircle=void 0),this.liveDirectionMarkers.forEach(t=>{this.map.removeLayer(t)}),this.liveDirectionMarkers=[],this.liveVehicleTrailCoords=[],this.stopAutoRefresh()}destroy(){this.clearLiveTracking(),this.clearClusterTracking(),this.clearHistoryTracking(),this.map&&this.map.remove()}initializeClusterGroup(){console.log("\u{1f4cd} Initializing cluster group"),this.map?(this.clusterMarkerGroup=f.markerClusterGroup({spiderfyOnMaxZoom:!0,showCoverageOnHover:!1,zoomToBoundsOnClick:!0,maxClusterRadius:80,animate:!0,animateAddingMarkers:!0,disableClusteringAtZoom:18,spiderfyDistanceMultiplier:1.5,chunkedLoading:!0,removeOutsideVisibleBounds:!0,iconCreateFunction:function(t){var o=t.getChildCount(),i=" marker-cluster-";return f.divIcon({html:"<div><span>"+o+"</span></div>",className:"marker-cluster"+(i+=o<10?"small":o<100?"medium":"large"),iconSize:f.point(40,40)})}}),this.map&&(this.map.addLayer(this.clusterMarkerGroup),console.log("\u{1f4cd} Cluster group added to map successfully with animations enabled"))):console.error("\u{1f4cd} Cannot initialize cluster group - map not found!")}getClusterData(){var t=this;return(0,u.Z)(function*(){console.log("\u{1f4cd} getClusterData called");let o=new Do.e;o.pageno="",o.itemperpage="",t.clusterapi&&t.clusterapi.unsubscribe();try{const i=yield t.apiService.clusteronmap(o).toPromise();if(console.log("\u{1f4cd} Cluster API Response:",i),200==i.statusCode&&i.entity&&i.entity.details){if(t.clusterVehicleData=i.entity.details,console.log("\u{1f4cd} Cluster Vehicle Data:",t.clusterVehicleData.length,"vehicles"),t.clusterMarkerGroup?(t.clusterMarkerGroup.clearLayers(),console.log("\u{1f4cd} Cleared existing cluster markers")):t.initializeClusterGroup(),console.log("\u{1f4cd} About to plot",t.clusterVehicleData.length,"vehicles"),t.plotClusterMarkers(t.clusterVehicleData),!t.clusterIntervalFlag&&t.clusterVehicleData.length>0){const r=f.latLngBounds(t.clusterVehicleData.map(s=>[parseFloat(s.latitude),parseFloat(s.longitude)]));t.map.fitBounds(r,{padding:[50,50]})}}else console.error("\u{1f4cd} No vehicles found or invalid response"),t.loader.responseMessage="Vehicles Not Found",t.loader.failedNotification();t.clusterTimeout=setTimeout(()=>{t.clusterIntervalFlag=!0,t.getClusterData()},3e4)}catch(i){console.error("\u{1f4cd} Error fetching cluster data:",i)}})()}plotClusterMarkers(t){console.log("\u{1f4cd} plotClusterMarkers called with",t.length,"vehicles");try{if(!this.clusterMarkerGroup)return void console.error("\u{1f4cd} Cluster marker group not initialized!");this.clusterMarkerGroup.clearLayers(),console.log("\u{1f4cd} Cleared existing cluster markers");const o={"Non Polling":"./assets/map/redcar.png",Running:"./assets/map/greencar.png",Idle:"./assets/map/bluecar.png",Stop:"./assets/map/bluecar.png",Polling:"./assets/map/yellowcar.png"},i=[];for(const r of t){const s=parseFloat(r.latitude),l=parseFloat(r.longitude);if(isNaN(s)||isNaN(l))continue;const m=o[r.pollingstatus||""]||o["Non Polling"],_=f.point(16,28),b=f.icon({iconUrl:m,iconSize:_,iconAnchor:[_.x/2,_.y-7],popupAnchor:[0,7-_.y]}),x=parseFloat(r.vehicledirection)||0,T=this.createClusterPopupContent(r),Z=f.marker([s,l],{title:r.vehicleno||"",icon:b,rotationAngle:x,rotationOrigin:"center center"});Z.bindPopup(T),i.push(Z)}this.clusterMarkerGroup.addLayers(i),console.log(`\u{1f4cd} Added ${i.length} markers to cluster group (bulk)`),console.log("\u{1f4cd} Cluster group layer count:",this.clusterMarkerGroup.getLayers().length)}catch(o){console.error("\u{1f4cd} Error plotting cluster markers:",o)}}createClusterPopupContent(t){var o,i;const r=(null===(o=t.pollingstatus)||void 0===o?void 0:o.toLowerCase())||"";let s="status-badge ";return"running"===r?s+="status-running":"stop"===r?s+="status-stop":"idle"===r&&(s+="status-idle"),`\n <div class="vehicle-popup small-popup">\n <table class="popup-table">\n <tr>\n <th colspan="3" class="popup-title" style="background-color: #283d55;\n color: white; text-align: center;" >\u{1f690} ${t.vehicleno||"N/A"}</th>\n </tr>\n <tr>\n <td>\u{1f4f1} IMEI</td>\n <td>${t.deviceimeino||"N/A"}</td>\n </tr>\n <tr>\n <td>\u26a1 Speed</td>\n <td style="font-weight: 700; color: ${parseFloat(t.speed||"0")>40?"#dc3545":"#28a745"};">\n ${t.speed||0} km/h\n </td>\n </tr>\n <tr>\n <td>\u{1f4ca} Status</td>\n <td><span class="${s}">${t.pollingstatus||"N/A"}</span></td>\n </tr>\n <tr>\n <td>\u{1f511} Ignition</td>\n <td style="font-weight: 600; color: ${"on"===(null===(i=t.ignitionstatus)||void 0===i?void 0:i.toLowerCase())?"#28a745":"#6c757d"};">\n ${t.ignitionstatus||"N/A"}\n </td>\n </tr>\n <tr>\n <td>\u{1f550} Time</td>\n <td>${t.pollingdatatime||"N/A"}</td>\n </tr>\n <tr>\n <td>\u{1f4cd} Location</td>\n <td>${t.location||"N/A"}</td>\n </tr>\n </table>\n </div>\n \n \n \n \n \n \n `}clearClusterTracking(){if(console.log("\u{1f4cd} Clearing cluster tracking"),this.clusterMarkerGroup&&this.map){try{this.map.removeLayer(this.clusterMarkerGroup),console.log("\u{1f4cd} Removed cluster marker group from map")}catch(t){console.log("\u{1f4cd} Error removing cluster group:",t)}this.clusterMarkerGroup=void 0}this.clusterTimeout&&(clearTimeout(this.clusterTimeout),this.clusterTimeout=void 0),this.clusterapi&&this.clusterapi.unsubscribe(),this.clusterIntervalFlag=!1}trackHistoryVehicle(t,o,i,r,s,l,d){var m=this;return(0,u.Z)(function*(){try{m.clearHistoryTracking(),m.loader.loaderOn();const _=new y.rn;_.imeino=t,_.vehicleid=l,_.fromdate=o,_.fromtime=i,_.todate=r,_.totime=s,_.searchbytype="";const b=yield m.apiService.historytrack(_);if(m.loader.loaderOff(),"200"==b.statusCode&&1==b.status&&b.entity.historytrackdetails.length>0){m.filteredHistoryData=[];const x=b.entity.historytrackdetails;console.log("[HistoryTrack] Received",x.length,"points from API");for(let T=0;T<x.length;T++){let Z=new y.Us;Z.pollingdatatime=x[T].datatimestamp,Z.ignitionstatus=x[T].ignitionstatus,Z.speed=x[T].speed,Z.latitude=x[T].latitude,Z.longitude=x[T].longitude,Z.heading=x[T].heading,Z.vehicledirection=x[T].heading,Z.rowno=x[T].row_number,Z.location=x[T].location,Z.gpsstatus=x[T].status,Z.commutedistance=x[T].commutedistance,Z.vehicleno=(null==d?void 0:d.vehicleno)||"",Z.deviceimeino=t,Z.trackingtype="history",m.filteredHistoryData.push(Z)}console.log("[HistoryTrack] Populated filteredHistoryData:",m.filteredHistoryData),m.plotHistoryRoute()}else m.filteredHistoryData=[],m.loader.responseMessage="History Not Found",m.loader.failedNotification()}catch(_){console.error("Error tracking history vehicle:",_),m.loader.loaderOff(),m.loader.responseMessage="Error fetching history data",m.loader.failedNotification()}})()}plotHistoryRoute(){try{if(0===this.filteredHistoryData.length)return void console.warn("[HistoryTrack] No history data to plot.");const t=this.filteredHistoryData.map(_=>[parseFloat(_.latitude),parseFloat(_.longitude)]);console.log("[HistoryTrack] Plotting polyline with coords:",t),this.historyTrail=f.polyline(t,{color:"#33cc33",weight:4,opacity:.8}).addTo(this.map),this.addHistoryDirectionArrows(this.historyTrail);const o=this.filteredHistoryData[0],i=f.icon({iconUrl:"assets/school-management/images/start.png",iconSize:[32,32],iconAnchor:[16,32],popupAnchor:[0,-32]});this.historyStartMarker=f.marker([parseFloat(o.latitude),parseFloat(o.longitude)],{icon:i}).addTo(this.map);const r=this.createPopupContent(o);this.historyStartMarker.bindPopup(r);const s=this.filteredHistoryData[this.filteredHistoryData.length-1],l=f.icon({iconUrl:"assets/school-management/images/end.png",iconSize:[32,32],iconAnchor:[16,32],popupAnchor:[0,-32]});this.historyEndMarker=f.marker([parseFloat(s.latitude),parseFloat(s.longitude)],{icon:l}).addTo(this.map);const d=this.createPopupContent(s);this.historyEndMarker.bindPopup(d);const m=f.latLngBounds(t);this.map.fitBounds(m,{padding:[50,50]}),console.log("[HistoryTrack] Finished plotting route and markers.")}catch(t){console.error("[HistoryTrack] Error plotting history route:",t)}}addHistoryDirectionArrows(t){this.historyDirectionMarkers.forEac
1h(r=>{this.map.removeLayer(r)}),this.historyDirectionMarkers=[];const o=t.getLatLngs();if(o.length<2)return;const i=Math.max(1,Math.floor(o.length/15));for(let r=i;r<o.length;r+=i){const s=o[r-1],l=o[r],d=this.calculateLeafletBearing(s,l),m=f.divIcon({html:`<div class="history-arrow" style="transform: rotate(${d}deg); color: #33cc33; font-size: 20px;">\u27a4</div>`,className:"direction-arrow animated-arrow",iconSize:[20,20],iconAnchor:[10,10]}),x=f.marker([(s.lat+l.lat)/2,(s.lng+l.lng)/2],{icon:m,interactive:!1}).addTo(this.map);this.historyDirectionMarkers.push(x)}}clearHistoryTracking(){this.historyTrail&&(this.map.removeLayer(this.historyTrail),this.historyTrail=void 0),this.historyStartMarker&&(this.map.removeLayer(this.historyStartMarker),this.historyStartMarker=void 0),this.historyEndMarker&&(this.map.removeLayer(this.historyEndMarker),this.historyEndMarker=void 0),this.historyDirectionMarkers.forEach(t=>{this.map.removeLayer(t)}),this.historyDirectionMarkers=[],this.filteredHistoryData=[],this.historyCurrentIndex=0}calculateLeafletBearing(t,o){const i=t.lat*Math.PI/180,r=o.lat*Math.PI/180,s=(o.lng-t.lng)*Math.PI/180,l=Math.sin(s)*Math.cos(r),d=Math.cos(i)*Math.sin(r)-Math.sin(i)*Math.cos(r)*Math.cos(s);let m=180*Math.atan2(l,d)/Math.PI;return m=(m+360)%360,m}playAnimation(){this.isPlaying&&!this.isPaused||(this.isPlaying=!0,this.isPaused=!1,this.animationInterval=setInterval(()=>{!this.isPaused&&this.currentIndex<this.filteredHistoryData.length&&(this.updateMarkerPosition(this.currentIndex),this.updateCurrentHistoryArrow(),this.currentIndex++)},1e3/this.currentSpeed))}updateMarkerPosition(t){if(!this.filteredHistoryData||!this.map)return;const o=this.filteredHistoryData[t];if(!o)return;const i=parseFloat(o.vehicledirection||o.heading||"0"),r=f.divIcon({className:"vehicle-marker",html:`<img src='assets/map/green.png' style='width:32px; height:32px; transform: rotate(${i}deg); transition: transform 0.2s;'>`,iconSize:[15,28],iconAnchor:[16,32]});this.historyVehicleMarker?(this.historyVehicleMarker.setLatLng([parseFloat(o.latitude),parseFloat(o.longitude)]),this.historyVehicleMarker.setIcon(r)):this.historyVehicleMarker=f.marker([parseFloat(o.latitude),parseFloat(o.longitude)],{icon:r}).addTo(this.map);const s=this.createPopupContent(o);this.historyVehicleMarker.bindPopup(s)}pauseAnimation(){this.isPaused=!0}resumeAnimation(){this.isPaused=!1}stopAnimation(){this.isPlaying=!1,this.isPaused=!1,this.currentIndex=0,this.animationInterval&&(clearInterval(this.animationInterval),this.animationInterval=null)}refreshAnimation(){this.stopAnimation(),this.currentIndex=0}setSpeed(t){this.currentSpeed=t,this.isPlaying&&(this.stopAnimation(),this.playAnimation())}}return n.\u0275fac=function(t){return new(t||n)(e.LFG(F.P),e.LFG
1(z.s),e.LFG(N.D),e.LFG(g.uU))},n.\u0275prov=e.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Io=["reportForm"];function Jo(n,a){if(1&n&&(e.TgZ(0,"ng-option",16),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function Lo(n,a){1&n&&(e.TgZ(0,"span",98),e._uU(1,"Filter type is mandatory"),e.qZA())}function Yo(n,a){if(1&n&&(e.TgZ(0,"span",96),e.YNc(1,Lo,2,0,"span",97),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}const re=function(n,a){return{"is-valid":n,"ng-error":a}};function jo(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",10)(1,"div",11)(2,"label",12),e._uU(3,"Filter Type "),e.TgZ(4,"span",92),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",93,94),e.NdJ("ngModelChange",function(i){return e.CHM(t),e.oxw().roleTypeObj=i})("change",function(){return e.CHM(t),e.oxw().onChangeCustomerType()}),e.YNc(8,Jo,2,2,"ng-option",17),e.qZA(),e.YNc(9,Yo,2,1,"span",95),e.qZA()()}if(2&n){const t=e.MAs(7),o=e.oxw(),i=e.MAs(11);e.xp6(6),e.Q6J("ngClass",e.WLB(6,re,t.valid,t.invalid&&i.submitted))("ngModel",o.roleTypeObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",o.roleList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||i.submitted))}}function Po(n,a){if(1&n&&(e.TgZ(0,"ng-option",16),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function Qo(n,a){if(1&n&&(e.TgZ(0,"span",98),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.hij("",t.customerTypeName," name is mandatory")}}function Vo(n,a){if(1&n&&(e.TgZ(0,"span",96),e.YNc(1,Qo,2,1,"span",97),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function Eo(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",10)(1,"div",11)(2,"label",99),e._uU(3),e.TgZ(4,"span",92),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",100,101),e.NdJ("ngModelChange",function(i){return e.CHM(t),e.oxw().customerNameObj=i})("change",function(){return e.CHM(t),e.oxw().onChangeCustomerList()}),e.YNc(8,Po,2,2,"ng-option",17),e.qZA(),e.YNc(9,Vo,2,1,"span",95),e.qZA()()}if(2&n){const t=e.MAs(7),o=e.oxw(),i=e.MAs(11);e.xp6(3),e.hij("",o.customerTypeName," List"),e.xp6(3),e.MGl("placeholder","Select ",o.customerTypeName," "),e.Q6J("ngClass",e.WLB(8,re,t.valid,t.invalid&&i.submitted))("ngModel",o.customerNameObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",o.customerList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||i.submitted))}}function zo(n,a){if(1&n&&(e.TgZ(0,"ng-option",16),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function Ho(n,a){1&n&&(e.TgZ(0,"span",104),e._uU(1,"Vehicle is mandatory"),e.qZA())}function $o(n,a){if(1&n&&(e.TgZ(0,"span",102),e.YNc(1,Ho,2,0,"span",103),e.qZA()),2&n){e.oxw();const t=e.MAs(22);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function Bo(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.lnq("Showing ",t.recordFrom," To ",t.recordTo," (Out Of ",t.totalCount,")Entries")}}function Go(n,a){1&n&&(e.TgZ(0,"option",105),e._uU(1,"20"),e.qZA())}function Wo(n,a){1&n&&(e.TgZ(0,"option",106),e._uU(1,"50"),e.qZA())}function Ko(n,a){1&n&&(e.TgZ(0,"option",107),e._uU(1,"100"),e.qZA())}function Xo(n,a){if(1&n&&(e.TgZ(0,"option",16),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.Q6J("value",t.totalCount),e.xp6(1),e.hij(" ",t.totalCount," ")}}function en(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",68),e.NdJ("click",function(i){return e.CHM(t),e.oxw().sorting(i,"vehicleno")}),e._uU(1," Vehicle No. "),e._UZ(2,"i",66),e.qZA()}}function tn(n,a){1&n&&(e.TgZ(0,"tbody")(1,"tr")(2,"td",108)(3,"div",109),e._uU(4,"No Record Found"),e.qZA()()()())}function on(n,a){if(1&n&&(e.TgZ(0,"td"),e._uU(1),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(""==t.vehicleno?"Not Found":t.vehicleno)}}const nn=function(n,a){return{"text-danger":n,"fw-bolder":a}};function rn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.YNc(3,on,2,1,"td",44),e.TgZ(4,"td",70),e._uU(5),e.qZA(),e.TgZ(6,"td",70),e._uU(7),e.qZA(),e.TgZ(8,"td",70),e._uU(9),e.qZA(),e.TgZ(10,"td")(11,"div",111),e._uU(12),e.qZA()(),e.TgZ(13,"td"),e._uU(14),e.qZA(),e.TgZ(15,"td")(16,"button",112),e.NdJ("click",function(){const r=e.CHM(t).$implicit;return e.oxw(2).trackVehicle(r)}),e._UZ(17,"i",113),e.qZA()()()}if(2&n){const t=a.$implicit,o=e.oxw(2);e.xp6(2),e.Oqu(t.rowno),e.xp6(1),e.Q6J("ngIf",""==o.busNumber),e.xp6(2),e.hij("",""==t.starttime?"Not Found":t.starttime," "),e.xp6(2),e.Oqu(""==t.endtime?"Not Found":t.endtime),e.xp6(2),e.Oqu(""==t.duration?"Not Found":t.duration),e.xp6(2),e.Q6J("ngClass",e.WLB(8,nn,t.speed>=60,t.speed>=60)),e.xp6(1),e.hij(" ",""==t.speed?"Not Found":t.speed," "),e.xp6(2),e.Oqu(""==t.location?"Not Found":t.location)}}function an(n,a){if(1&n&&(e.TgZ(0,"tbody"),e.YNc(1,rn,18,11,"tr",110),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.detailData)}}function sn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",114)(1,"ngb-pagination",115),e.NdJ("pageChange",function(i){return e.CHM(t),e.oxw().reportFormRequest.pageno=i})("pageChange",function(){return e.CHM(t),e.oxw().details("")}),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("collectionSize",t.totalCount)("page",t.reportFormRequest.pageno)("maxSize",3)("pageSize",t.reportFormRequest.itemperpage)}}function ln(n,a){1&n&&e._UZ(0,"img",121)}function cn(n,a){1&n&&e._UZ(0,"img",122)}const Ne=function(n,a){return{"text-success":n,"text-danger":a}};function pn(n,a){if(1&n&&(e.TgZ(0,"div")(1,"p",116)(2,"strong"),e._uU(3,"\u{1f4f1} IMEI:"),e.qZA(),e._uU(4),e.qZA(),e.TgZ(5,"p",116)(6,"strong"),e._uU(7,"\u{1f550}
1 Last Update:"),e.qZA(),e._uU(8),e.ALo(9,"date"),e.qZA(),e.TgZ(10,"p",116)(11,"strong"),e._uU(12,"\u{1f4cf} Distance:"),e.qZA(),e._uU(13),e.qZA(),e.TgZ(14,"p",116)(15,"strong"),e._uU(16,"\u26a1 Speed:"),e.qZA(),e.TgZ(17,"span",117),e._uU(18),e.qZA(),e.YNc(19,ln,1,0,"img",118),e.YNc(20,cn,1,0,"img",119),e.qZA(),e.TgZ(21,"p",120)(22,"strong"),e._uU(23,"\u{1f4cd} Location:"),e.qZA(),e._uU(24),e.qZA()()),2&n){const t=e.oxw();e.xp6(4),e.hij(" ",t.liveTrackingService.currentVehicleData.deviceimeino||"N/A"," "),e.xp6(4),e.hij(" ",e.xi3(9,8,t.liveTrackingService.currentVehicleData.pollingdatatime,"dd-MMM-yyyy hh:mm:ss a")," "),e.xp6(5),e.hij(" ",t.liveTrackingService.currentVehicleData.todaydistance||"0"," km "),e.xp6(4),e.Q6J("ngClass",e.WLB(11,Ne,+t.liveTrackingService.currentVehicleData.speed<=40,+t.liveTrackingService.currentVehicleData.speed>40)),e.xp6(1),e.hij(" ",t.liveTrackingService.currentVehicleData.speed||"0"," km/h "),e.xp6(1),e.Q6J("ngIf","off"==t.liveTrackingService.currentVehicleData.ignitionstatus.toLowerCase()),e.xp6(1),e.Q6J("ngIf","on"==t.liveTrackingService.currentVehicleData.ignitionstatus.toLowerCase()),e.xp6(4),e.hij(" ",t.liveTrackingService.currentVehicleData.location||"N/A"," ")}}function mn(n,a){1&n&&e._UZ(0,"img",121)}function dn(n,a){1&n&&e._UZ(0,"img",122)}function un(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",135),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).playHistoryAnimation()}),e._UZ(1,"i",136),e._uU(2," Play "),e.qZA()}}function gn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",137),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).pauseHistoryAnimation()}),e._UZ(1,"i",138),e._uU(2," Pause "),e.qZA()}}function hn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",139),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).stopHistoryAnimation()}),e._UZ(1,"i",140),e._uU(2," Stop "),e.qZA()}}function _n(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"p",116)(2,"strong"),e._uU(3,"\u{1f4f1} IMEI:"),e.qZA(),e._uU(4),e.qZA(),e.TgZ(5,"p",116)(6,"strong"),e._uU(7,"\u{1f550} Time:"),e.qZA(),e._uU(8),e.ALo(9,"date"),e.qZA(),e.TgZ(10,"p",116)(11,"strong"),e._uU(12,"\u{1f4cf} Distance:"),e.qZA(),e._uU(13),e.qZA(),e.TgZ(14,"p",116)(15,"strong"),e._uU(16,"\u26a1 Speed:"),e.qZA(),e.TgZ(17,"span",117),e._uU(18),e.qZA(),e.YNc(19,mn,1,0,"img",118),e.YNc(20,dn,1,0,"img",119),e.qZA(),e.TgZ(21,"p",123)(22,"strong"),e._uU(23,"\u{1f4cd} Location:"),e.qZA(),e._uU(24),e.qZA(),e.TgZ(25,"div",124)(26,"button",125),e.NdJ("click",function(){return e.CHM(t),e.oxw().restartHistoryAnimation()}),e._UZ(27,"i",126),e._uU(28," Restart "),e.qZA(),e.YNc(29,un,3,0,"button",127),e.YNc(30,gn,3,0,"button",128),e.YNc(31,hn,3,0,"button",129),e.qZA(),e.TgZ(32,"div",130)(33,"label",131),e._UZ(34,"i",132),e._uU(35," Animation Speed "),e.qZA(),e.TgZ(36,"input",133),e.NdJ("ngModelChange",function(i){return e.CHM(t),e.oxw().liveTrackingService.animationSpeed=i})("input",function(i){return e.CHM(t),e.oxw().changeHistoryAnimationSpeed(i)}),e.qZA(),e.TgZ(37,"small",134),e._uU(38),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(4),e.hij(" ",t.liveTrackingService.filteredHistoryData[0].deviceimeino||"N/A"," "),e.xp6(4),e.hij(" ",e.xi3(9,13,null==t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex]?null:t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex].pollingdatatime,"dd-MMM-yyyy hh:mm:ss a")," "),e.xp6(5),e.hij(" ",(null==t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex]?null:t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex].commutedistance)||"0"," km "),e.xp6(4),e.Q6J("ngClass",e.WLB(16,Ne,+((null==t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex]?null:t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex].speed)||0)<=40,+((null==t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex]?null:t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex].speed)||0)>40)),e.xp6(1),e.hij(" ",(null==t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex]?null:t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex].speed)||"0"," km/h "),e.xp6(1),e.Q6J("ngIf","off"==(null==t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex]||null==t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex].ignitionstatus?null:t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex].ignitionstatus.toLowerCase())),e.xp6(1),e.Q6J("ngIf","on"==(null==t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex]||null==t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex].ignitionstatus?null:t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex].ignitionstatus.toLowerCase())),e.xp6(4),e.hij(" ",(null==t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex]?null:t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex].location)||"N/A"," "),e.xp6(5),e.Q6J("ngIf","playing"!==t.liveTrackingService.animationStatus),e.xp6(1),e.Q6J("ngIf","playing"===t.liveTrackingService.animationStatus),e.xp6(1),e.Q6J("ngIf","stopped"!==t.liveTrackingService.animationStatus),e.xp6(
15),e.Q6J("ngModel",t.liveTrackingService.animationSpeed),e.xp6(2),e.hij("",t.liveTrackingService.animationSpeed," ms")}}const ae=function(n){return{display:n}};let fn=(()=>{class n{constructor(t,o,i,r,s,l,d,m){this.cv=t,this.cs=o,this.loader=i,this.route=r,this.es=s,this.listService=l,this.liveTrackingService=d,this.datePipe=m,this.dateObj="",this.formsection=!0,this.loadersection=!1,this.detailsection=!1,this.loginRoleId=sessionStorage.getItem("loginroleid"),this.reportFormRequest=new G,this.detailData=[],this.totalCount=0,this.recordFrom=0,this.pageHeading="Overspeed Report",this.busNumber="",this.dateRange="",this.allVehicleObject={id:"",name:"All"},this.selectedBusList=[],this.roleList=[],this.customerTypeName="",this.customerList=[],this.sortDir=1,this.mapVehicleDetails=new Ce}ngAfterViewInit(){const t=document.getElementById("exampleModal");t&&t.addEventListener("shown.bs.modal",()=>{this.liveTrackingService.initMap()})}ngOnInit(){$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"}),this.getDate(),"101"==this.loginRoleId||"600"==this.loginRoleId?this.getRoleList():this.getVehicleList()}getRoleList(){var t=this;return(0,u.Z)(function*(){t.roleList=[],t.roleList=yield t.listService.getRoleList(new h.nO),t.roleList.push({id:"3",name:"vehicle"}),t.roleList=t.roleList.filter(o=>"school"==o.name||"customer"==o.name||"vehicle"==o.name)})()}onChangeCustomerType(){this.roleTypeObj&&(this.vehicleList=[],this.customerTypeName="","school"==this.roleTypeObj.name||"customer"==this.roleTypeObj.name?(this.customerTypeName=this.roleTypeObj.name,this.getCustomerList()):"vehicle"==this.roleTypeObj.name&&this.getVehicleList())}getCustomerList(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;o.filter1=t.roleTypeObj.id,t.customerList=yield t.listService.getCustomerList(o)})()}onChangeCustomerList(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;t.customerNameObj&&("school"==t.roleTypeObj.name?o.filter1=t.customerNameObj.id:"customer"==t.roleTypeObj.name&&(o.filter2=t.customerNameObj.id)),t.vehicleList=yield t.listService.getVehicleList(o)})()}getVehicleList(){var t=this;return(0,u.Z)(function*(){t.vehicleList=yield t.listService.getVehicleList(new h.nO)})()}getDate(){$(()=>{$('input[name="date"]').daterangepicker({showDropdowns:!0,startDate:p().startOf("day").format("DD-MMM-YYYY"),endDate:p().endOf("day").format("DD-MMM-YYYY"),opens:"center",drops:"down",maxSpan:{days:30},locale:{format:"DD-MMM-YYYY"},maxDate:new Date,minYear:2022,maxYear:parseInt(p().format("YYYY"),10),function(t,o){$("#datepicker").html(t.format("DD-MMM-YYYY")+" : "+o.format("DD-MMM-YYYY"))}}),$('input[name="date"]').on("hide.daterangepicker",(t,o)=>{try{this.dateObj=t.target.value}catch(i){}}),this.dateObj=document.getElementById("datepicker").value})}onChangeSchool(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;o.schoolid=t.schoolObj.id,t.vehicleList=yield t.listService.getVehicleList(o)})()}checkAllBus(){this.busNumber="All"==this.busNoObj.name?"All":this.busNoObj.name}validateForm(){if(this.reportForm.valid){this.formsection=!1,this.loadersection=!0,this.customerName=this.customerNameObj?this.customerNameObj.name:"",this.reportFormRequest.customerid=this.customerNameObj?this.customerNameObj.id:"",this.busNoObj&&("All"==this.busNoObj.name?(this.customerName="",this.reportFormRequest.vehicleid="all"):(this.customerName=this.busNoObj.customername,this.reportFormRequest.vehicleid=this.busNoObj?this.busNoObj.id:""));let t=this.dateObj.split(" - ");this.reportFormRequest.fromdate=t[0],this.reportFormRequest.todate=t[1],this.reportFormRequest.fromtime=document.getElementById("fromtime").value.replace(" ","").replace(" ",""),this.reportFormRequest.totime=document.getElementById("totime").value.replace(" ","").replace(" ",""),this.dateRange=this.reportFormRequest.fromdate+" "+this.reportFormRequest.fromtime+" To "+this.reportFormRequest.todate+" "+this.reportFormRequest.totime,this.details("refresh")}}details(t){var o=this;return(0,u.Z)(function*(){try{o.loader.loaderOff()}catch(i){}"showrow"==t&&(o.reportFormRequest.pageno=1),"search"==t&&(o.reportFormRequest.pageno=1),"refresh"==t&&(o.reportFormRequest.searchby="",o.reportFormRequest.pageno=1,o.reportFormRequest.itemperpage=10),o.reportFormRequest.searchby=o.reportFormRequest.searchby.trim(),o.formsection=!1,o.loadersection=!0;try{o.loader.loaderOn()}catch(i){}o.es.apiCall(o.reportFormRequest,"report/overspeedreport").subscribe(i=>{try{o.loader.loaderOff()}catch(r){}200==i.statusCode?(o.detailData=i.entity.overspeedreportdetails,o.totalCount=+i.entity.totalrecord,o.recordFrom=o.detailData[0].rowno,o.recordTo=o.detailData[o.detailData.length-1].rowno,o.loadersection=!1,o.formsection=!1,o.detailsection=!0):(o.detailData=[],o.recordTo=0,o.recordFrom=0,o.totalCount=0,o.reportFormRequest.searchby="",o.detailsection=!0,o.formsection=!1,o.loadersection=!1),o.es.pageDataInfo("",o.reportFormRequest,"Overspeed Report","Details method","Called Function",i.message)},i=>{o.loader.logout()})})()}redirectToForm(){this.formsection=!0,this.loadersection=!1,this.detailsection=!1}ResetForm(){this.reportForm.resetForm(),this.formsection=!0,this.detailsection=!1,this.getDate(),setTimeout(()=>{$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"})},1500),this.getRoleList(),this.roleTypeObj=null,this.customerNameObj=null,this.schoolObj=null,this.busNoObj=null,this.vehicleList=[]}sorting(t,o){try{let r=t.currentTarget.childNodes[1].classList;try{r.contains("fa-sort-amount-desc")?(r.remove("fa-sort-amount-desc"),r.add("fa-sort-amount-asc")):(r.remove("fa-sort-amount-asc"),r.add("fa-sort-amount-desc"))}catch(s){console.log("e "+s)}this.sortDir=1==this.sortDir?-1:1;try{this.detailData.length>0&&this.detailData.sort((s,l)=>(s=s[o].toLowerCase(),l=l[o].toLowerCase(),s.localeCompare(l)*this.sortDir))}catch(s){console.log("e "+s)}}catch(i){}}trackVehicle(t){var o=this;return(0,u.Z)(function*(){console.log("distance on arrival response",o.mapVehicleDetails),o.mapVehicleDetails=t,$("#exampleModal").modal("show");let i=new y.rn;i.vehicleid=t.vehicleid,i.imeino=t.imeino,i.fromdate=o.datePipe.transform(t.starttime,"dd-MMM-yyyy"),i.fromtime=o.datePipe.transform(t.starttime,"hh:mm:ss a"),i.todate=o.datePipe.transform(t.endtime,"dd-MMM-yyyy"),i.totime=o.datePipe.transform(t.endtime,"hh:mm:ss a"),yield o.liveTrackingService.trackHistoryVehicle(i.imeino,i.fromdate,i.fromtime,i.todate,i.totime,i.vehicleid,new y.Us)})()}playHistoryAnimation(){"paused"===this.liveTrackingService.animationStatus?this.liveTrackingService.resumeHistoryAnimation():this.liveTrackingService.startHistoryAnimation()}pauseHistoryAnimation(){this.liveTrackingService.pauseHistoryAnimation()}stopHistoryAnimation(){this.liveTrackingService.stopHistoryAnimation()}restartHistoryAnimation(){this.liveTrackingService.restartHistoryAnimation()}changeHistoryAnimationSpeed(t){const o=Number(t.target.value);this.liveTrackingService.setAnimationSpeed(o)}
1downloadDoc(t){let o=new G;if(o.pdfexcel=t,o.itemperpage="",o.pageno="",this.reportFormRequest&&(o.customerid=this.reportFormRequest.customerid||"",o.vehicleid=this.reportFormRequest.vehicleid||"",o.fromdate=this.reportFormRequest.fromdate||"",o.todate=this.reportFormRequest.todate||"",o.fromtime=this.reportFormRequest.fromtime||"",o.totime=this.reportFormRequest.totime||"",o.searchby=(this.reportFormRequest.searchby||"").trim()),this.loader&&"function"==typeof this.loader.loaderOn)try{this.loader.loaderOn()}catch(i){}this.es&&"function"==typeof this.es.apiCall&&this.es.apiCall(o,"overspeedreport").subscribe(i=>{if(this.loader&&"function"==typeof this.loader.loaderOff)try{this.loader.loaderOff()}catch(r){}i&&"200"==i.statusCode&&(this.filePath=i.message,this.es&&"function"==typeof this.es.commonFileDownload&&this.es.commonFileDownload(this.filePath)),o.pdfexcel="","function"==typeof this.es.pageDataInfo&&this.es.pageDataInfo("",this.reportFormRequest,"Overspeed Report","Download Excel/PDF method","Called Function",i.message)})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(S.R),e.Y36(U.v),e.Y36(N.D),e.Y36(M.F0),e.Y36(F.P),e.Y36(D.X),e.Y36(Me),e.Y36(g.uU))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-overspeed-report"]],viewQuery:function(t,o){if(1&t&&e.Gf(Io,5),2&t){let i;e.iGM(i=e.CRH())&&(o.reportForm=i.first)}},decls:159,vars:47,consts:[[1,"report-form-container","p-1"],[1,"reportheader"],["aria-hidden","true",1,"fa","fa-credit-card"],[1,"rptheadertext"],[1,"container-fluid",3,"ngStyle"],[1,"row"],[1,"col-md-12"],["novalidate","","id","form_id","autocomplete","off",1,"needs-validation"],["reportForm","ngForm"],["class","col-md-2",4,"ngIf"],[1,"col-md-2"],[1,"form-group"],[1,"mb-0","label"],[1,"starvalid"],["name","vehicleNumber","placeholder","Select Vehicle","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["busNoCtrl","ngModel"],[3,"value"],[3,"value",4,"ngFor","ngForOf"],["class","form-control-feedback text-danger",4,"ngIf"],[1,"col-md-3"],[1,"report-label","mb-0"],["type","text","name","date","id","datepicker","required","","placeholder","Select Date",1,"form-control","form-control-sm",2,"padding","4px","width","170px"],[1,"d-flex","justify-content-between"],[1,"form-group","mb-0",2,"width","210px","float","left"],[1,"mb-0"],["type","text","name","timepicker","id","fromtime",1,"fromTime","form-control","form-control-sm","text-center"],[1,"form-group",2,"width","210px","float","left"],["type","text","name","timepicker","id","totime",1,"toTime","form-control","form-control-sm","text-center"],[1,"col-md-2","mt-3"],["type","submit",1,"custom-btn","btn-13","float-right","Show","mb-3",3,"click"],["type","button",1,"custom-btn","btn-10","float-right","mr-2",3,"click"],[1,"report-form-container"],[1,"row","grid-section",3,"ngStyle"],[1,"row","py-2","report-summary"],[1,"fw-bolder","text-small","text-uppercase","outputlabel"],[1,"text-uppercase","text-small","outputlabel"],[1,"customerNameForSummary"],[1,"col-md-5"],[1,"col","backbtn","text-end"],["ngbTooltip","Back",1,"backbtnbackground",3,"click"],["aria-hidden","true",1,"fa","fa-arrow-circle-o-left","outputlabel"],[1,"col-md-12","px-0"],[1,"table-head","d-flex","justify-content-between"],["id","tickets-table_info","role","status","aria-live","polite",1,"col-auto","mt-2","text-center","fw-bold","total-record-label"],[4,"ngIf"],[1,"mt-1"],[1,"itemsperpage-style",2,"margin-right","10px"],[1,"d-inline-flex","align-items-center"],["name","table_length","aria-controls","table","name","pageSize",3,"ngModel","ngModelChange","change"],["value","10","selected",""],["value","20",4,"ngIf"],["value","50",4,"ngIf"],["value","100",4,"ngIf"],[3,"value",4,"ngIf"],["type","button",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"click"],["aria-hidden","true",1,"fa","fa-refresh"],["type","button","ngbTooltip","Download Pdf","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-pdf-o","pdf-btn"],["type","button","ngbTooltip","Download Excel","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-excel-o","excel-btn"],["type","text","name","searchTerm","autocomplete","off","aria-controls","tickets-table","placeholder","Search here....","autocomplete","off",1,"form-control","form-control-sm","ms-2","searchinput",2,"width","165px",3,"ngModel","ngModelChange"],["type","button",1,"btn","search-btn",3,"click"],[1,"fa","fa-search"],[1,"scroll-tbl"],[1,"table","table-striped","table-style",2,"overflow-y","auto","overflow-x","auto"],[2,"width","50px","text-align","center",3,"click"],[1,"fa","fa-sort-amount-desc"],["style"," text-align: center;",3,"click",4,"ngIf"],[2,"text-align","center",3,"click"],[1,"text-end",2,"text-align","center",3,"click"],[2,"text-align","center"],[1,"fa","fa-map-marker","fa-1x"],[1,"row","justify-content-md-between","align-items-md-center","mt-2"],["class","float-end text-start",4,"ngIf"],["id","exampleModal","tabindex","-1","data-bs-backdrop","static","data-bs-keyboard","false","aria-labelledby","exampleModalLabel","aria-hidden","true",1,"modal","fade","p-0"],[1,"modal-dialog","modal
1-xl"],[1,"modal-content","ani"],[1,"modal-header",2,"background-color","#014b5b !important","color","white"],["id","exampleModalLabel",1,"modal-title"],["type","button","data-bs-dismiss","modal","aria-label","Close",3,"click"],["aria-hidden","true",1,"fa","fa-times","text-danger"],[1,"modal-body","p-0"],[2,"width","100%","height","500px"],["id","reportTrackingMap",2,"height","76vh","width","100%","position","relative"],[1,"current-vehicle-section"],["id","accordionExample",1,"accordion",3,"ngStyle"],[1,"accordion-item"],["id","headingOne",1,"accordion-header"],["type","button","data-bs-toggle","collapse","data-bs-target","#collapseOne","aria-expanded","true","aria-controls","collapseOne",1,"accordion-button","p-1","fw-bold","text-white","small",2,"background","#00366b","font-size","12px"],[1,"fa","fa-car","me-1"],["id","collapseOne","aria-labelledby","headingOne","data-bs-parent","#accordionExample",1,"accordion-collapse","collapse","show"],[1,"accordion-body","p-2","small"],[1,"text-danger"],["name","roletype","placeholder","Select Filter Type ","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["roleTypeCtrl","ngModel"],["class","form-control-feedback text-danger text-danger",4,"ngIf"],[1,"form-control-feedback","text-danger","text-danger"],["class","text-small",4,"ngIf"],[1,"text-small"],[1,"mb-0","text-capitalize"],["name","customertype","required","",1,"text-capitalize",3,"ngClass","ngModel","multiple","placeholder","closeOnSelect","ngModelChange","change"],["customerNameCtrl","ngModel"],[1,"form-control-feedback","text-danger"],["class","text-small","style"," font-size: 10px;",4,"ngIf"],[1,"text-small",2,"font-size","10px"],["value","20"],["value","50"],["value","100"],["colspan","15"],[1,"text-center"],[4,"ngFor","ngForOf"],[1,"text-center",3,"ngClass"],["title","Track Overspeed","data-bs-toggle","modal","data-bs-target","#exampleModal",1,"btn","btn-sm","btn-dark","p-1",3,"click"],[1,"fa","fa-map-marker",2,"font-size","10px"],[1,"float-end","text-start"],["size","sm",1,"d-flex","mt-2","justify-content-end","pagination-rounded","pagination","pagination-info",3,"collectionSize","page","maxSize","pageSize","pageChange"],[1,"small","m-0","mb-1"],[3,"ngClass"],["src","assets/school-management/images/poweroff.png","style","width: 16px;height: 16px; margin-left: 5px;",4,"ngIf"],["src","assets/school-management/images/poweron.png","style","width: 16px;height: 16px; margin-left: 5px;",4,"ngIf"],[1,"small","m-0"],["src","assets/school-management/images/poweroff.png",2,"width","16px","height","16px","margin-left","5px"],["src","assets/school-management/images/poweron.png",2,"width","16px","height","16px","margin-left","5px"],[1,"small","m-0","mb-2"],["role","group",1,"btn-group","w-100","mb-2"],["type","button","ngbTooltip","Re
1start Animation",1,"btn","btn-sm","btn-outline-primary","py-1",3,"click"],[1,"fa","fa-sync"],["type","button","class","btn btn-sm btn-outline-primary py-1","ngbTooltip","Play",3,"click",4,"ngIf"],["type","button","class","btn btn-sm btn-outline-primary py-1","ngbTooltip","Pause",3,"click",4,"ngIf"],["type","button","class","btn btn-sm btn-outline-primary py-1","ngbTooltip","Stop",3,"click",4,"ngIf"],[1,"mb-2"],[1,"form-label","small","mb-1"],[1,"fa","fa-tachometer"],["type","range","min","10","max","2000","step","10",3,"ngModel","ngModelChange","input"],[1,"text-muted"],["type","button","ngbTooltip","Play",1,"btn","btn-sm","btn-outline-primary","py-1",3,"click"],[1,"fa","fa-play"],["type","button","ngbTooltip","Pause",1,"btn","btn-sm","btn-outline-primary","py-1",3,"click"],[1,"fa","fa-pause"],["type","button","ngbTooltip","Stop",1,"btn","btn-sm","btn-outline-primary","py-1",3,"click"],[1,"fa","fa-stop"]],template:function(t,o){if(1&t&&(e.TgZ(0,"div",0)(1,"div")(2,"h5",1),e._UZ(3,"i",2),e._uU(4,"\xa0\xa0\xa0"),e.TgZ(5,"span",3),e._uU(6,"Overspeed Report"),e.qZA()()(),e.TgZ(7,"div",4)(8,"div",5)(9,"div",6)(10,"form",7,8)(12,"div",5),e.YNc(13,jo,10,9,"div",9),e.YNc(14,Eo,10,11,"div",9),e.TgZ(15,"div",10)(16,"div",11)(17,"label",12),e._uU(18,"Vehicle Number "),e.TgZ(19,"span",13),e._uU(20,"*"),e.qZA()(),e.TgZ(21,"ng-select",14,15),e.NdJ("ngModelChange",function(r){return o.busNoObj=r})("change",function(){return o.checkAllBus()}),e.TgZ(23,"ng-option",16),e._uU(24),e.qZA(),e.YNc(25,zo,2,2,"ng-option",17),e.qZA(),e.YNc(26,$o,2,1,"span",18),e.qZA()(),e.TgZ(27,"div",19)(28,"div",11)(29,"label",20),e._uU(30,"Date :"),e.qZA(),e._UZ(31,"input",21),e.qZA()(),e.TgZ(32,"div",19)(33,"div",22)(34,"div",23)(35,"label",24),e._uU(36,"Time "),e.qZA(),e._UZ(37,"input",25),e.qZA(),e._uU(38," \xa0\xa0\xa0 "),e.TgZ(39,"div",26),e._UZ(40,"label",24)(41,"input",27),e.qZA()()(),e.TgZ(42,"div",28)(43,"button",29),e.NdJ("click",function(){return o.validateForm()}),e._uU(44,"Generate"),e.qZA(),e._uU(45," \xa0 "),e.TgZ(46,"button",30),e.NdJ("click",function(){return o.ResetForm()}),e._uU(47,"Reset"),e.qZA()()()()()()(),e.TgZ(48,"div",31)(49,"div",32)(50,"div",6)(51,"div",33)(52,"div",19)(53,"span",34),e._uU(54,"Vehicle :"),e.qZA(),e.TgZ(55,"span",35),e._uU(56),e.qZA(),e._UZ(57,"br"),e.TgZ(58,"span",36),e._uU(59),e.qZA()(),e.TgZ(60,"div",37)(61,"span",34),e._uU(62,"Date :"),e.qZA(),e.TgZ(63,"span",35),e._uU(64),e.qZA()(),e.TgZ(65,"div",38)(66,"button",39),e.NdJ("click",function(){return o.redirectToForm()}),e._UZ(67,"i",40),e.qZA()()()(),e.TgZ(68,"div",41)(69,"div",42)(70,"div",43),e.YNc(71,Bo,2,3,"span",44),e.qZA(),e.TgZ(72,"div",45)(73,"span",46)(74,"label",47),e._uU(75,"Show "),e.TgZ(76,"select",48),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.itemperpage=r})("change",function(){return o.details("showrow")}),e.TgZ(77,"option",49),e._uU(78," 10"),e.qZA(),e.YNc(79,Go,2,0,"option",50),e.YNc(80,Wo,2,0,"option",51),e.YNc(81,Ko,2,0,"option",52),e.YNc(82,Xo,2,2,"option",53),e.qZA(),e._uU(83," entries"),e.qZA()(),e.TgZ(84,"span")(85,"button",54),e.NdJ("click",function(){return o.details("refresh")}),e._UZ(86,"i",55),e.qZA()(),e.TgZ(87,"span")(88,"button",56),e.NdJ("click",function(){return o.downloadDoc("pdf")}),e._UZ(89,"i",57),e.qZA(),e.TgZ(90,"button",58),e.NdJ("click",function(){return o.downloadDoc("excel")}),e._UZ(91,"i",59),e.qZA()(),e.TgZ(92,"label")(93,"input",60),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.searchby=r}),e.qZA()(),e.TgZ(94,"button",61),e.NdJ("click",function(){return o.details("search")}),e._UZ(95,"span",62),e.qZA()()(),e.TgZ(96,"div",63)(97,"table",64)(98,"thead")(99,"tr")(100,"th",65),e.NdJ("click",function(r){return o.sorting(r,"rowno")}),e._uU(101,"#"),e._UZ(102,"i",66),e.qZA(),e.YNc(103,en,3,0,"th",67),e.TgZ(104,"th",68),e.NdJ("click",function(r){return o.sorting(r,"starttime")}),e._uU(105,"Start Time "),e._UZ(106,"i",66),e.qZA(),e.TgZ(107,"th",68),e.NdJ("click",function(r){return o.sorting(r,"endtime")}),e._uU(108,"End Time "),e._UZ(109,"i",66),e.qZA(),e.TgZ(110,"th",68),e.NdJ("click",function(r){return o.sorting(r,"duration")}),e._uU(111,"Duration (hh:mm:ss) "),e._UZ(112,"i",66),e.qZA(),e.TgZ(113,"th",69),e.NdJ("click",function(r){return o.sorting(r,"
1speed")}),e._uU(114," Speed (Km/hr) "),e._UZ(115,"i",66),e.qZA(),e.TgZ(116,"th",68),e.NdJ("click",function(r){return o.sorting(r,"location")}),e._uU(117,"Location "),e._UZ(118,"i",66),e.qZA(),e.TgZ(119,"th",70),e._UZ(120,"i",71),e.qZA()()(),e.YNc(121,tn,5,0,"tbody",44),e.YNc(122,an,2,1,"tbody",44),e.qZA()(),e.TgZ(123,"div",72),e.YNc(124,sn,2,4,"div",73),e.qZA()()()(),e.TgZ(125,"div",74)(126,"div",75)(127,"div",76)(128,"div",77)(129,"h5",78)(130,"u"),e._uU(131," Overspeed Summary"),e.qZA(),e._uU(132," of "),e.TgZ(133,"b"),e._uU(134),e.qZA(),e._uU(135," from "),e.TgZ(136,"b"),e._uU(137),e.qZA(),e._uU(138," to "),e.TgZ(139,"b"),e._uU(140),e.qZA()(),e.TgZ(141,"button",79),e.NdJ("click",function(){return o.liveTrackingService.clearAllLayers()}),e._UZ(142,"i",80),e.qZA()(),e.TgZ(143,"div",81)(144,"div",82)(145,"div",82),e._UZ(146,"div",83),e.TgZ(147,"div",84)(148,"div",85)(149,"div",86)(150,"h2",87)(151,"button",88),e._UZ(152,"i",89),e._uU(153),e.ALo(154,"uppercase"),e.qZA()(),e.TgZ(155,"div",90)(156,"div",91),e.YNc(157,pn,25,14,"div",44),e.YNc(158,_n,39,19,"div",44),e.qZA()()()()()()()()()()()()),2&t){const i=e.MAs(11),r=e.MAs(22);e.xp6(7),e.Q6J("ngStyle",e.VKq(38,ae,o.formsection?"":"none")),e.xp6(6),e.Q6J("ngIf","101"==o.loginRoleId||"600"==o.loginRoleId),e.xp6(1),e.Q6J("ngIf",("101"==o.loginRoleId||"600"==o.loginRoleId)&&"school"==o.customerTypeName||"customer"==o.customerTypeName),e.xp6(7),e.Q6J("ngClass",e.WLB(40,re,r.valid,r.invalid&&i.submitted))("ngModel",o.busNoObj)("multiple",!1)("closeOnSelect",!1)("closeOnSelect",!1),e.xp6(2),e.Q6J("value",o.allVehicleObject),e.xp6(1),e.hij("",o.allVehicleObject.name," "),e.xp6(1),e.Q6J("ngForOf",o.vehicleList),e.xp6(1),e.Q6J("ngIf",r.errors&&(r.dirty||r.touched||i.submitted)),e.xp6(23),e.Q6J("ngStyle",e.VKq(43,ae,o.detailsection?"":"none")),e.xp6(7),e.hij(" ",o.busNumber,""),e.xp6(3),e.Oqu(o.customerName),e.xp6(5),e.hij(" ",o.dateRange,""),e.xp6(7),e.Q6J("ngIf",0!=o.totalCount),e.xp6(5),e.Q6J("ngModel",o.reportFormRequest.itemperpage),e.xp6(3),e.Q6J("ngIf",o.totalCount>20),e.xp6(1),e.Q6J("ngIf",o.totalCount>50),e.xp6(1),e.Q6J("ngIf",o.totalCount>100),e.xp6(1),e.Q6J("ngIf",o.totalCount<100&&o.totalCount>10),e.xp6(6),e.Q6J("disabled","0"==o.totalCount),e.xp6(2),e.Q6J("disabled","0"==o.totalCount),e.xp6(3),e.Q6J("ngModel",o.reportFormRequest.searchby),e.xp6(10),e.Q6J("ngIf",""==o.busNumber),e.xp6(18),e.Q6J("ngIf",0==o.totalCount),e.xp6(1),e.Q6J("ngIf",0!=o.totalCount),e.xp6(2),e.Q6J("ngIf",o.totalCount>o.reportFormRequest.itemperpage),e.xp6(10),e.hij("\xa0\xa0",o.mapVehicleDetails.vehicleno,"\xa0\xa0 "),e.xp6(3),e.hij(" \xa0\xa0",o.mapVehicleDetails.starttime,""),e.xp6(3),e.hij("",o.mapVehicleDetails.starttime," "),e.xp6(8),e.Q6J("ngStyle",e.VKq(45,ae,o.liveTrackingService.currentVehicleData.vehicleno||o.liveTrackingService.filteredHistoryData.length>0?"":"none")),e.xp6(5),e.hij(" ",e.lcZ(154,36,o.liveTrackingService.currentVehicleData.vehicleno||(o.liveTrackingService.filteredHistoryData.length>0?o.liveTrackingService.filteredHistoryData[0].vehicleno:""))," "),e.xp6(4),e.Q6J("ngIf",o.liveTrackingService.currentVehicleData.vehicleno&&0==o.liveTrackingService.filteredHistoryData.length),e.xp6(1),e.Q6J("ngIf",o.liveTrackingService.filteredHistoryData.length>0)}},directives:[g.PC,c._Y,c.JL,c.F,g.O5,A.w9,c.Q7,g.mk,c.JJ,c.On,g.sg,A.xv,C._L,c.EJ,c.YN,c.Kr,c.Fj,C.N9,c.eT],pipes:[g.gd,g.uU],styles:[".ng-select.ng-select-single .ng-select-container .ng-value-container{font-size:12px!important} .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{font-size:12px!important;text-transform:capitalize}ng-select.ng-select-single[_ngcontent-%COMP%] .ng-select-container{min-height:26px;max-height:26px;height:26px}.form-control[_ngcontent-%COMP%]{height:calc(1.45rem + 2px)}.invalid-feedback[_ngcontent-%COMP%]{font-size:11px;color:#dc3545}input[_ngcontent-%COMP%]{font-size:12px}.starvalid[_ngcontent-%COMP%]{color:#ff0040!important}.validationmsg[_ngcontent-%COMP%]{--bs-text-opacity: 1;color:#ff0040!important;font-weight:600}.shimmerBG[_ngcontent-%COMP%]{animation-duration:2.2s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:shimmer;animation-timing-function:linear;background:#E5F0FB;background:linear-gradient(to right,#cfeeeb 4%,#9ac9c6 25%,#d5f0f0 36%);background-size:1100px 100%}@keyframes shimmer{0%{background-position:-1200px 0}to{background-position:1200px 0}}.media[_ngcontent-%COMP%]{height:110px}.p-32[_ngcontent-%COMP%]{padding:32px}.title-line[_ngcontent-%COMP%]{height:24px;width:100%;margin-bottom:12px;border-radius:20px}.content-line[_ngcontent-%COMP%]{height:8px;width:100%;margin-bottom:16px;border-radius:8px}.end[_ngcontent-%COMP%]{width:40%}.m-t-24[_ngcontent-%COMP%]{margin-top:24px}.rptheadertext[_ngcontent-%COMP%]{text-decoration:underline}.rptlabel[_ngcontent-%COMP%]{color:#000}.outputlabel[_ngcontent-%COMP%]{color:#003c75}.backbtn[_ngcontent-%COMP%]{float:right;margin-left:25%!important;margin-top:0%!important}.srnotd[_ngcontent-%COMP%]{background-color:#f2f2f2}.form-group[_ngcontent-%COMP%]{margin-bottom:.2rem}.grid-section[_ngcontent-%COMP%], .ani[_ngcontent-%COMP%], .entrydiv[_ngcontent-%COMP%]{animation:fadeInUp .8s ease-out}@keyframes fadeInUp{0%{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}"]}),n})();const bn=["reportForm"];function vn(n,a){if(1&n&&(e.TgZ(0,"ng-option",16),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function Tn(n,a){1&n&&(e.TgZ(0,"span",94),e._uU(1,"Filter type is mandatory"),e.qZA())}function Zn(n,a){if(1&n&&(e.TgZ(0,"span",92),e.YNc(1,Tn,2,0,"span",93),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}const se=function(n,a){return{"is-valid":n,"ng-error":a}};function xn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",10)(1,"div",11)(2,"label",12),e._uU(3,"Filter Type "),e.TgZ(4,"span",13),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",89,90),e.NdJ("ngModelChange",function(i){return e.CHM(t),e.oxw().roleTypeObj=i})("change",function(){return e.CHM(t),e.oxw().onChangeCustomerType()}),e.YNc(8,vn,2,2,"ng-option",17),e.qZA(),e.YNc(9,Zn,2,1,"span",91),e.qZA()()}if(2&n){const t=e.MAs(7),o=e.oxw(),i=e.MAs(11);e.xp6(6),e.Q6J("ngClass",e.WLB(6,se,t.valid,t.invalid&&i.submitted))("ngModel",o.roleTypeObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",o.roleList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||i.submitted))}}function yn(n,a){if(1&n&&(e.TgZ(0,"ng-option",16),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function Cn(n,a){1&n&&(e.TgZ(0,"span",94),e._uU(1,"Filter type name is mandatory"),e.qZA())}function An(n,a){if(1&n&&(e.TgZ(0,"span",92),e.YNc(1,Cn,2,0,"span",93),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function qn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",10)(1,"div",11)(2,"label",95),e._uU(3),e.TgZ(4,"span",13),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",96,97),e.NdJ("ngModelChange",function(i){return e.CHM(t),e.oxw().customerNameObj=i})("change",function(){return e.CHM(t),e.oxw().onChangeCustomerList()}),e.YNc(8,yn,2,2,"ng-option",17),e.qZA(),e.YNc(9,An,2,1,"span",91),e.qZA()()}if(2&n){const t=e.MAs(7),o=e.oxw(),i=e.MAs(11);e.xp6(3),e.hij("",o.customerTypeName," List"),e.xp6(3),e.MGl("placeholder","Select ",o.customerTypeName," "),e.Q6J("ngClass",e.WLB(8,se,t.valid,t.invalid&&i.submitted))("ngModel",o.customerNameObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",o.customerList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||i.submitted))}}function On(n,a){if(1&n&&(e.TgZ(0,"ng-option",16),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function Rn(n,a){1&n&&(e.TgZ(0,"span",100),e._uU(1,"Vehicle is mandatory"),e.qZA())}function kn(n,a){if(1&n&&(e.TgZ(0,"span",98),e.YNc(1,Rn,2,0,"span",99),e.qZA()),2&n){e.oxw();const t=e.MAs(22);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function wn(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.lnq("Showing ",t.recordFrom," To ",t.recordTo," ( Out Of ",t.totalCount," )
1Entries")}}function Mn(n,a){1&n&&(e.TgZ(0,"option",101),e._uU(1,"20"),e.qZA())}function Nn(n,a){1&n&&(e.TgZ(0,"option",102),e._uU(1,"50"),e.qZA())}function Fn(n,a){1&n&&(e.TgZ(0,"option",103),e._uU(1,"100"),e.qZA())}function Sn(n,a){if(1&n&&(e.TgZ(0,"option",16),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.Q6J("value",t.totalCount),e.xp6(1),e.hij(" ",t.totalCount," ")}}function Un(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",66),e.NdJ("click",function(i){return e.CHM(t),e.oxw().sorting(i,"vehicleno")}),e._uU(1,"Vehicle No."),e._UZ(2,"i",67),e.qZA()}}function Dn(n,a){1&n&&(e.TgZ(0,"tbody")(1,"tr")(2,"td",104)(3,"div",105),e._uU(4,"No Record Found"),e.qZA()()()())}function In(n,a){if(1&n&&(e.TgZ(0,"td"),e._uU(1),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(""==t.vehicleno?"Not Found":t.vehicleno)}}function Jn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"tr")(1,"td",107),e._uU(2),e.qZA(),e.YNc(3,In,2,1,"td",44),e.TgZ(4,"td"),e._uU(5),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.qZA(),e.TgZ(10,"td"),e._uU(11),e.qZA(),e.TgZ(12,"td")(13,"button",108),e.NdJ("click",function(){const r=e.CHM(t).$implicit;return e.oxw(2).trackVehicle(r)}),e._UZ(14,"i",68),e.qZA()()()}if(2&n){const t=a.$implicit,o=e.oxw(2);e.xp6(2),e.Oqu(t.rowno),e.xp6(1),e.Q6J("ngIf",""==o.busNumber),e.xp6(2),e.Oqu(""==t.deviceimeino?"Not Found":t.deviceimeino),e.xp6(2),e.Oqu(""==t.poiname?"Not Found":t.poiname),e.xp6(2),e.Oqu(""==t.intime?"Not Found":t.intime),e.xp6(2),e.Oqu(""==t.outtime?"Not Found":t.outtime)}}function Ln(n,a){if(1&n&&(e.TgZ(0,"tbody"),e.YNc(1,Jn,15,6,"tr",106),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.detailData)}}function Yn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",109)(1,"ngb-pagination",110),e.NdJ("pageChange",function(i){return e.CHM(t),e.oxw().reportFormRequest.pageno=i})("pageChange",function(){return e.CHM(t),e.oxw().details("")}),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("collectionSize",t.totalCount)("page",t.reportFormRequest.pageno)("maxSize",3)("pageSize",t.reportFormRequest.itemperpage)}}function jn(n,a){1&n&&(e.TgZ(0,"span"),e._UZ(1,"img",113),e.qZA())}function Pn(n,a){1&n&&e._UZ(0,"img",114)}function Qn(n,a){if(1&n&&(e.TgZ(0,"div")(1,"p",81),e._uU(2),e.qZA(),e.TgZ(3,"p",81),e._uU(4," Ignition : "),e.YNc(5,jn,2,0,"span",44),e.YNc(6,Pn,1,0,"img",111),e._uU(7),e.ALo(8,"uppercase"),e.qZA(),e.TgZ(9,"p",81),e._uU(10),e.qZA(),e.TgZ(11,"p",112),e._uU(12),e.qZA(),e._UZ(13,"br"),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.hij(" Last Polling Time : ",t.mapService.historyVehicleData.pollingdatatime," "),e.xp6(3),e.Q6J("ngIf","on"==t.mapService.historyVehicleData.ignitionstatus.toLowerCase()),e.xp6(1),e.Q6J("ngIf","off"==t.mapService.historyVehicleData.ignitionstatus.toLowerCase()),e.xp6(1),e.hij(" ",e.lcZ(8,6,t.mapService.historyVehicleData.ignitionstatus)," "),e.xp6(3),e.hij("Speed : ",t.mapService.historyVehicleData.speed," Km/hr"),e.xp6(2),e.hij("Location : ",t.mapService.historyVehicleData.location," ")}}function Vn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",115),e.NdJ("click",function(){return e.CHM(t),e.oxw().mapService.changeAnimation("play")}),e._uU(1," Play "),e.qZA()}}function En(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",116),e.NdJ("click",function(){return e.CHM(t),e.oxw().mapService.changeAnimation("pause")}),e._uU(1," Pause "),e.qZA()}}function zn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",117),e.NdJ("click",function(){return e.CHM(t),e.oxw().mapService.changeAnimation("stop")}),e._uU(1," Stop "),e.qZA()}}const Fe=function(n){return{display:n}};let Hn=(()=>{class n{constructor(t,o,i,r,s,l,d,m,_){this.cv=t,this.cs=o,this.loader=i,this.route=r,this.es=s,this.listService=l,this.mapService=d,this.datePipe=m,this.apiService=_,this.dateObj="",this.formsection=!0,this.loadersection=!1,this.detailsection=!1,this.reportFormRequest=new V,this.loginRoleId=sessionStorage.getItem("loginroleid"),this.customerTypeName="",this.detailData=[],this.apiname="",this.pageHeading="Geofence In Out Report",this.busNumber="",this.dateRange="",this.allVehicleObject={id:"",name:"All"},this.selectedBusList=[],this.roleList=[],this.customerList=[],this.sortDir=1,this.mapVehicleDetails=new Ve}
1ngOnInit(){var t=this;return(0,u.Z)(function*(){$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"}),t.getSchoolList(),t.getDate(),"101"==t.loginRoleId||"600"==t.loginRoleId?yield t.getRoleList():yield t.getVehicleList()})()}getVehicleList(){var t=this;return(0,u.Z)(function*(){t.vehicleList=yield t.listService.getVehicleList(new h.nO)})()}getRoleList(){var t=this;return(0,u.Z)(function*(){t.roleList=[],t.roleList=yield t.listService.getRoleList(new h.nO),t.roleList.push({id:"3",name:"vehicle"}),t.roleList=t.roleList.filter(o=>"school"==o.name||"customer"==o.name||"vehicle"==o.name)})()}onChangeCustomerType(){this.roleTypeObj&&(this.vehicleList=[],this.customerTypeName="","school"==this.roleTypeObj.name||"customer"==this.roleTypeObj.name?(this.customerTypeName=this.roleTypeObj.name,this.getCustomerList()):"vehicle"==this.roleTypeObj.name&&this.getVehicleList())}getSchoolList(){var t=this;return(0,u.Z)(function*(){t.schoolList=yield t.listService.getSchoolList(new h.nO)})()}getCustomerList(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;o.filter1=t.roleTypeObj.id,t.customerList=yield t.listService.getCustomerList(o)})()}onChangeCustomerList(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;o.filter2=t.customerNameObj?t.customerNameObj.id:"",t.vehicleList=yield t.listService.getVehicleList(o)})()}getDate(){$(()=>{$('input[name="date"]').daterangepicker({showDropdowns:!0,startDate:p().startOf("day").format("DD-MMM-YYYY"),endDate:p().endOf("day").format("DD-MMM-YYYY"),opens:"center",drops:"down",maxSpan:{days:30},locale:{format:"DD-MMM-YYYY"},ranges:{Today:[p(),p()],Yesterday:[p().subtract(1,"days"),p().subtract(1,"days")],"This Week":[p().startOf("week"),p().endOf("week")],"This Month":[p().startOf("month"),p().endOf("day")]},maxDate:new Date,minYear:2022,maxYear:parseInt(p().format("YYYY"),10),function(t,o){$("#datepicker").html(t.format("DD-MMM-YYYY")+" : "+o.format("DD-MMM-YYYY"))}}),$('input[name="date"]').on("hide.daterangepicker",(t,o)=>{try{this.dateObj=t.target.value}catch(i){}}),this.dateObj=document.getElementById("datepicker").value})}onChangeSchool(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;o.schoolid=t.schoolObj.id,t.vehicleList=yield t.listService.getVehicleList(o)})()}checkAllBus(){this.busNumber="All"==this.busNoObj.name?"All":this.busNoObj.name}validateForm(){if(this.reportForm.valid){this.formsection=!1,this.loadersection=!0,this.customerName=this.customerNameObj?this.customerNameObj.name:"",this.busNoObj&&("All"==this.busNoObj.name?(this.customerName="All",this.reportFormRequest.vehicleid="all"):(this.customerName=this.busNoObj.customername,this.reportFormRequest.vehicleid=this.busNoObj?this.busNoObj.id:"")),"school"==this.customerTypeName&&(this.reportFormRequest.schoolid=this.customerNameObj?this.customerNameObj.id:"",this.customerName=this.customerNameObj.name),"customer"==this.customerTypeName&&(this.reportFormRequest.customerid=this.customerNameObj?this.customerNameObj.id:"",this.customerName=this.customerNameObj.name);let t=this.dateObj.split(" - ");this.reportFormRequest.fromdate=t[0],this.reportFormRequest.todate=t[1],this.reportFormRequest.fromtime=document.getElementById("fromtime").value.replace(" ","").replace(" ",""),this.reportFormRequest.totime=document.getElementById("totime").value.replace(" ","").replace(" ",""),this.dateRange=this.reportFormRequest.fromdate+" "+this.reportFormRequest.fromtime+" To "+this.reportFormRequest.todate+" "+this.reportFormRequest.totime,this.details("refresh")}}details(t){"showrow"==t&&(this.reportFormRequest.pageno=1),"search"==t&&(this.reportFormRequest.pageno=1),"refresh"==t&&(this.reportFormRequest.searchby="",this.reportFormRequest.pageno=1,this.reportFormRequest.itemperpage=10),this.reportFormRequest.searchby=this.reportFormRequest.searchby.trim();try{this.loader.loaderOn()}catch(o){}this.formsection=!1,this.loadersection=!0,this.es.apiCall(this.reportFormRequest,"stopinout").subscribe(o=>{try{this.loader.loaderOff()}catch(i){}200==o.statusCode?(this.detailData=o.entity.stoppagereport,this.totalCount=+o.entity.totalrecord,this.recordFrom=this.detailData[0].rowno,this.recordTo=this.detailData[this.detailData.length-1].rowno,this.loadersection=!1,this.detailsection=!0,this.formsection=!1):(this.detailData=[],this.recordTo=0,this.recordFrom=0,this.totalCount=0,this.reportFormRequest.searchby="",this.loadersection=!1,this.detailsection=!0,this.formsection=!1),this.es.pageDataInfo("",this.reportFormRequest,"Geofence In-Out Report","Details method","Called Function",o.message)},o=>{this.loader.loaderOff()})}redirectToForm(){this.formsection=!0,this.loadersection=!1,this.detailsection=!1}ResetForm(){this.reportForm.resetForm(),this.loadersection=!1,this.formsection=!0,this.getDate(),setTimeout(()=>{$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"})},1500),this.schoolObj=null,this.roleTypeObj=null,this.customerNameObj=null,this.busNoObj=[],this.vehicleList=[]}sorting(t,o){try{let r=t.currentTarget.childNodes[1].classList;try{r.contains("fa-sort-amount-desc")?(r.remove("fa-sort-amount-desc"),r.add("fa-sort-amount-asc")):(r.remove("fa-sort-amount-asc"),r.add("fa-sort-amount-desc"))}catch(s){console.error("e "+s)}this.sortDir=1==this.sortDir?-1:1;try{this.detailData.length>0&&this.detailData.sort((s,l)=>(s=s[o].toLowerCase(),l=l[o].toLowerCase(),s.localeCompare(l)*this.sortDir))}catch(s){console.error("e "+s)}}catch(i){}}trackVehicle(t){var o=this;return(0,u.Z)(function*(){var i,r,s;null===(i=o.mapService.poiLayer.getSource())||void 0===i||i.clear(),o.mapVehicleDetails=t;let l=new y.rn;l.fromdate=o.datePipe.transform(p(t.intime).subtract(5,"minute").toString(),"dd-MMM-yyyy"),l.fromtime=o.datePipe.transform(p(t.intime).subtract(5,"minute").toString(),"hh:mm:ss a"),"0"==t.isout?(l.todate=o.datePipe.transform(p(t.intime).add(5,"minute").toString(),"dd-MMM-yyyy"),l.totime=o.datePipe.transform(p(t.intime).add(5,"minute").toString(),"hh:mm:ss a")):(l.todate=o.datePipe.transform(p(t.outt
1ime).add(5,"minute").toString(),"dd-MMM-yyyy"),l.totime=o.datePipe.transform(p(t.outtime).add(5,"minutes").toString(),"hh:mm:ss a")),l.vehicleid=t.vehicleid,l.imeino=t.deviceimeino,yield o.mapService.trackHistoryVehicle(l.imeino,l.fromdate,l.fromtime,l.todate,l.totime,l.vehicleid,"",!0,!0,new y.Us);let d=new y.Hs;d.itemperpage="",d.pageno="",d.searchby=t.poiname.trim();let m=yield o.apiService.geomdetails(d);o.es.pageDataInfo("",d,"Geofence In-Out Report","Track Vehicle method","Called Function",m.massage);let _=m.entity.geomdetails[0],b=[];null===(r=o.mapService.poiLayer.getSource())||void 0===r||r.clear();let x=JSON.parse(_.geomjson).geometry.coordinates,T=new P.Z({geometry:new E.Z(j.mi(x))});T.setStyle(o.mapService.poiStyleFunction),T.setProperties({properties:_}),b.push(T),null===(s=o.mapService.poiLayer.getSource())||void 0===s||s.addFeatures(b)})()}downloadDoc(t){let o=new V;o.pdfexcel=t,o.itemperpage="",o.pageno="",o.customerid=this.reportFormRequest.customerid,o.vehicleid=this.reportFormRequest.vehicleid,o.fromdate=this.reportFormRequest.fromdate,o.todate=this.reportFormRequest.todate,o.fromtime=this.reportFormRequest.fromtime,o.totime=this.reportFormRequest.totime;try{this.loader.loaderOn()}catch(i){}this.es.apiCall(o,"stopinout").subscribe(i=>{try{this.loader.loaderOff()}catch(r){}"200"==i.statusCode&&(this.filePath=i.message,this.es.commonFileDownload(this.filePath)),o.pdfexcel="",this.es.pageDataInfo("",o,"Geofence In-Out Report","Download Excel/PDF method","Called Function",i.message)})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(S.R),e.Y36(U.v),e.Y36(N.D),e.Y36(M.F0),e.Y36(F.P),e.Y36(D.X),e.Y36(J.S),e.Y36(g.uU),e.Y36(z.s))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-geofence-in-out-report"]],viewQuery:function(t,o){if(1&t&&e.Gf(bn,5),2&t){let i;e.iGM(i=e.CRH())&&(o.reportForm=i.first)}},decls:150,vars:45,consts:[[1,"container-fluid","report-form-container"],[1,"reportheader"],["aria-hidden","true",1,"fa","fa-credit-card"],[1,"rptheadertext"],[1,"row",3,"ngStyle"],[1,"col-md-12"],["novalidate","","id","form_id","autocomplete","off",1,"needs-validation"],["reportForm","ngForm"],[1,"row"],["class","col-md-2",4,"ngIf"],[1,"col-md-2"],[1,"form-group"],[1,"mb-0","label"],[1,"text-danger"],["name","busNo","placeholder","Select Vehicle ","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["busNoCtrl","ngModel"],[3,"value"],[3,"value",4,"ngFor","ngForOf"],["class","form-control-feedback text-danger validationmsg",4,"ngIf"],[1,"col-md-4"],[1,"d-flex","justify-content-between"],[1,"report-label","mb-0"],["type","text","name","date","id","datepicker","required","","placeholder","Select Date",1,"form-control","form-control-sm"],[1,"form-group",2,"width","85px","float","left"],[1,"mb-0"],["type","text","name","timepicker","id","fromtime",1,"fromTime","form-control","form-control-sm","text-center"],["type","text","name","timepicker","id","totime",1,"toTime","form-control","form-control-sm","text-center"],[1,"col","mt-3"],["type","button",1,"custom-btn","btn-10","float-end","me-2",3,"click"],["type","submit",1,"custom-btn","btn-13","float-end","Show",3,"click"],[1,"row","grid-section",3,"ngStyle"],[1,"col-md-12",2,"background-color","white"],[1,"row","py-2","report-summary"],[1,"col-md-3"],[1,"fw-bolder","text-small","text-uppercase","outputlabel"],[1,"text-uppercase","text-small","outputlabel"],[1,"customerNameForSummary"],[1,"col-md-5"],[1,"col-md-1","backbtn","text-end","float-end"],["ngbTooltip","Back",1,"backbtnbackground",3,"click"],["aria-hidden","true",1,"fa","fa-arrow-circle-o-left","outputlabel"],[1,"col-md-12","px-0",2,"background-color","white"],[1,"table-head","d-flex","justify-content-between"],["id","tickets-table_info","role","status","aria-live","polite",1,"col-auto","mt-2","text-center","fw-bold","total-record-label"],[4,"ngIf"],[1,"mt-1"],[1,"itemsperpage-style",2,"margin-right","10px"],[1,"d-inline-flex","align-items-center"],["name","table_length","aria-controls","table","name","pageSize",3,"ngModel","ngModelChange","change"],["value","10","selected",""],["value","20",4,"ngIf"],["value","50",4,"ngIf"],["value","100",4,"ngIf"],[3,"value",4,"ngIf"],["type","button",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"click"],["aria-hidden","true",1,"fa","fa-refresh"],["type","button","ngbTooltip","Download Pdf","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-pdf-o","pdf-btn"],["type","button","ngbTooltip","Download Excel","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-excel-o","excel-btn"],["type","text","name","searchTerm","autocomplete","off","aria-controls","tickets-table","placeholder","Search here....","autocomplete","off",1,"form-control","form-control-sm","ms-2","searchinput",2,"width","165px",3,"ngModel","ngModelChange"],["type","button",1,"btn","search-btn",3,"click"],[1,"fa","fa-search"],[1,"scroll-tbl"],[1,"table","table-striped","table-style",2,"overflow-y","auto","overflow-x","auto"],[3,"click",4,"ngIf"],[3,"click"],[1,"fa","fa-sort-amount-desc"],[1,"fa","fa-map-marker"],[1,"row","justify-content-md-between","align-items-md-center","mt-2"],["class","float-end text-start",4,"ngIf"],["id","exampleModal","tabindex","-1","aria-labelledby","exampleModalLabel","data-bs-backdrop","static","data-bs-keyboard","false","aria-hidden","true",1,"modal","fade"],[1,"modal-dialog","modal
1-xl"],[1,"modal-content"],[1,"modal-header","bg-white"],["id","exampleModalLabel",1,"modal-title"],["type","button","data-bs-dismiss","modal","aria-label","Close",1,"btn-close",3,"click"],[1,"modal-body","p-0"],[2,"width","100%","height","500px"],[1,"current-vehicle-section"],[1,"p-1",2,"max-width","250px","font-size","12px"],[1,"m-0"],["role","group",1,"btn-group"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click"],["type","button","class","btn btn-sm btn-outline-primary","ngbTooltip","Play",3,"click",4,"ngIf"],["type","button","class","btn btn-sm btn-outline-primary","ngbTooltip","Pause",3,"click",4,"ngIf"],["type","button","class","btn btn-sm btn-outline-primary","ngbTooltip","Stop",3,"click",4,"ngIf"],[1,"col-12"],["type","range","min","1000","max","20000",1,"form-range","form-control","form-control-sm",3,"ngModel","change","ngModelChange"],["name","roletype","placeholder","Select Filter Type ","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["roleTypeCtrl","ngModel"],["class","form-control-feedback text-danger text-danger",4,"ngIf"],[1,"form-control-feedback","text-danger","text-danger"],["class","text-small",4,"ngIf"],[1,"text-small"],[1,"mb-0","text-capitalize"],["name","customertype","required","",1,"text-capitalize",3,"ngClass","ngModel","multiple","placeholder","closeOnSelect","ngModelChange","change"],["customerNameCtrl","ngModel"],[1,"form-control-feedback","text-danger","validationmsg"],["class","text-small","style"," font-size: 10px;",4,"ngIf"],[1,"text-small",2,"font-size","10px"],["value","20"],["value","50"],["value","100"],["colspan","9"],[1,"text-center"],[4,"ngFor","ngForOf"],[1,"srnotd"],["title","Track Stoppage","data-bs-toggle","modal","data-bs-target","#exampleModal",1,"btn","btn-sm","btn-dark","p-1",3,"click"],[1,"float-end","text-start"],["size","sm",1,"d-flex","mt-2","justify-content-end","pagination-rounded","pagination","pagination-info",3,"collectionSize","page","maxSize","pageSize","pageChange"],["src","assets/school-management/images/poweroff.png","style","width: 20px;height: 20px;",4,"ngIf"],[1,"m-0",2,"word-wrap","break-word"],["src","assets/school-management/images/poweron.png",2,"width","20px","height","20px"],["src","assets/school-management/images/poweroff.png",2,"width","20px","height","20px"],["type","button","ngbTooltip","Play",1,"btn","btn-sm","btn-outline-primary",3,"click"],["type","button","ngbTooltip","Pause",1,"btn","btn-sm","btn-outline-primary",3,"click"],["type","button","ngbTooltip","Stop",1,"btn","btn-sm","btn-outline-primary",3,"click"]],template:function(t,o){if(1&t&&(e.TgZ(0,"div",0)(1,"div")(2,"h5",1),e._UZ(3,"i",2),e._uU(4,"\xa0\xa0\xa0"),e.TgZ(5,"span",3),e._uU(6,"GEOFENCE IN OUT REPORT"),e.qZA()(),e._UZ(7,"hr"),e.qZA(),e.TgZ(8,"div",4)(9,"div",5)(10,"form",6,7)(12,"div",8),e.YNc(13,xn,10,9,"div",9),e.YNc(14,qn,10,11,"div",9),e.TgZ(15,"div",10)(16,"div",11)(17,"label",12),e._uU(18,"Vehicle Number "),e.TgZ(19,"span",13),e._uU(20,"*"),e.qZA()(),e.TgZ(21,"ng-select",14,15),e.NdJ("ngModelChange",function(r){return o.busNoObj=r})("change",function(){return o.checkAllBus()}),e.TgZ(23,"ng-option",16),e._uU(24),e.qZA(),e.YNc(25,On,2,2,"ng-option",17),e.qZA(),e.YNc(26,kn,2,1,"span",18),e.qZA()(),e.TgZ(27,"div",19)(28,"div",20)(29,"div",11)(30,"label",21),e._uU(31,"Date Range:"),e.qZA(),e._UZ(32,"input",22),e.qZA(),e.TgZ(33,"div",23)(34,"label",24),e._uU(35,"Time "),e.qZA(),e._UZ(36,"input",25),e.qZA(),e._uU(37," \xa0\xa0\xa0 "),e.TgZ(38,"div",23),e._UZ(39,"label",24)(40,"input",26),e.qZA()()(),e.TgZ(41,"div",27)(42,"button",28),e.NdJ("click",function(){return o.ResetForm()}),e._uU(43,"Reset"),e.qZA(),e.TgZ(44,"button",29),e.NdJ("click",function(){return o.validateForm()}),e._uU(45,"Generate"),e.qZA()()()()()()(),e.TgZ(46,"div",0)(47,"div",30)(48,"div",31)(49,"div",32)(50,"div",33)(51,"span",34),e._uU(52,"Vehicle :"),e.qZA(),e.TgZ(53,"span",35),e._uU(54),e.qZA(),e._UZ(55,"br"),e.TgZ(56,"span",36),e._uU(57),e.qZA()(),e.TgZ(58,"div",37)(59,"span",34),e._uU(60,"Date :"),e.qZA(),e.TgZ(61,"span",35),e._uU(62),e.qZA()(),e.TgZ(63,"div",38)(64,"button",39),e.NdJ("click",function(){return o.redirectToForm()}),e._UZ(65,"i",40),e.qZA()()()(),e.TgZ(66,"div",41)(67,"div",42)(68,"div",43),e.YNc(69,wn,2,3,"span",44),e.qZA(),e.TgZ(70,"div",45)(71,"span",46)(72,"label",47),e._uU(73,"Show "),e.TgZ(74,"select",48),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.itemperpage=r})("change",function(){return o.details("showrow")}),e.TgZ(75,"option",49),e._uU(76," 10"),e.qZA(),e.YNc(77,Mn,2,0,"option",50),e.YNc(78,Nn,2,0,"option",51),e.YNc(79,Fn,2,0,"option",52),e.YNc(80,Sn,2,2,"option",53),e.qZA(),e._uU(81," entries"),e.qZA()(),e.TgZ(82,"span")(83,"button",54),e.NdJ("click",function(){return o.details("refresh")}),e._UZ(84,"i",55),e.qZA()(),e.TgZ(85,"span")(86,"button",56),e.NdJ("click",function(){return o.downloadDoc("pdf")}
1),e._UZ(87,"i",57),e.qZA(),e.TgZ(88,"button",58),e.NdJ("click",function(){return o.downloadDoc("excel")}),e._UZ(89,"i",59),e.qZA()(),e.TgZ(90,"label")(91,"input",60),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.searchby=r}),e.qZA()(),e.TgZ(92,"button",61),e.NdJ("click",function(){return o.details("search")}),e._UZ(93,"span",62),e.qZA()()(),e.TgZ(94,"div",63)(95,"table",64)(96,"thead")(97,"tr")(98,"th"),e._uU(99,"#"),e.qZA(),e.YNc(100,Un,3,0,"th",65),e.TgZ(101,"th",66),e.NdJ("click",function(r){return o.sorting(r,"deviceimeino")}),e._uU(102,"IMEI Number"),e._UZ(103,"i",67),e.qZA(),e.TgZ(104,"th",66),e.NdJ("click",function(r){return o.sorting(r,"poiname")}),e._uU(105,"Geofence Name"),e._UZ(106,"i",67),e.qZA(),e.TgZ(107,"th",66),e.NdJ("click",function(r){return o.sorting(r,"intime")}),e._uU(108,"Start Time"),e._UZ(109,"i",67),e.qZA(),e.TgZ(110,"th",66),e.NdJ("click",function(r){return o.sorting(r,"outtime")}),e._uU(111,"End Time"),e._UZ(112,"i",67),e.qZA(),e.TgZ(113,"th"),e._UZ(114,"i",68),e.qZA()()(),e.YNc(115,Dn,5,0,"tbody",44),e.YNc(116,Ln,2,1,"tbody",44),e.qZA()(),e.TgZ(117,"div",69),e.YNc(118,Yn,2,4,"div",70),e.qZA()()()(),e.TgZ(119,"div",71)(120,"div",72)(121,"div",73)(122,"div",74)(123,"h4",75)(124,"u"),e._uU(125," Geofence Details "),e.qZA(),e._uU(126," of "),e.TgZ(127,"b"),e._uU(128),e.qZA()(),e.TgZ(129,"button",76),e.NdJ("click",function(){return o.mapService.clearAllLayers()}),e.qZA()(),e.TgZ(130,"div",77)(131,"div",78),e._UZ(132,"app-helper-map"),e.TgZ(133,"div",79)(134,"div",80),e.YNc(135,Qn,14,8,"div",44),e.TgZ(136,"p",81),e._uU(137),e.qZA(),e.TgZ(138,"p",81),e._uU(139),e.qZA(),e.TgZ(140,"p",81),e._uU(141),e.qZA(),e.TgZ(142,"div",82)(143,"button",83),e.NdJ("click",function(){return o.mapService.changeAnimation("restart")}),e._uU(144," Start "),e.qZA(),e.YNc(145,Vn,2,0,"button",84),e.YNc(146,En,2,0,"button",85),e.YNc(147,zn,2,0,"button",86),e.qZA(),e.TgZ(148,"div",87)(149,"input",88),e.NdJ("change",function(){return o.mapService.changeAnimation("speedchange")})("ngModelChange",function(r){return o.mapService.historySpeed=r}),e.qZA()()()()()()()()()),2&t){const i=e.MAs(11),r=e.MAs(22);e.xp6(8),e.Q6J("ngStyle",e.VKq(38,Fe,o.formsection?"":"none")),e.xp6(5),e.Q6J("ngIf","101"==o.loginRoleId||"600"==o.loginRoleId),e.xp6(1),e.Q6J("ngIf",("101"==o.loginRoleId||"600"==o.loginRoleId)&&"school"==o.customerTypeName||"customer"==o.customerTypeName),e.xp6(7),e.Q6J("ngClass",e.WLB(40,se,r.valid,r.invalid&&i.submitted))("ngModel",o.busNoObj)("multiple",!1)("closeOnSelect",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("value",o.allVehicleObject),e.xp6(1),e.hij("",o.allVehicleObject.name," "),e.xp6(1),e.Q6J("ngForOf",o.vehicleList),e.xp6(1),e.Q6J("ngIf",r.errors&&(r.dirty||r.touched||i.submitted)),e.xp6(21),e.Q6J("ngStyle",e.VKq(43,Fe,o.detailsection?"":"none")),e.xp6(7),e.hij(" ",o.busNumber,""),e.xp6(3),e.Oqu(o.customerName),e.xp6(5),e.hij(" ",o.dateRange,""),e.xp6(7),e.Q6J("ngIf",0!=o.totalCount),e.xp6(5),e.Q6J("ngModel",o.reportFormRequest.itemperpage),e.xp6(3),e.Q6J("ngIf",o.totalCount>20),e.xp6(1),e.Q6J("ngIf",o.totalCount>50),e.xp6(1),e.Q6J("ngIf",o.totalCount>100),e.xp6(1),e.Q6J("ngIf",o.totalCount<100&&o.totalCount>10),e.xp6(6),e.Q6J("disabled","0"==o.totalCount),e.xp6(2),e.Q6J("disabled","0"==o.totalCount),e.xp6(3),e.Q6J("ngModel",o.reportFormRequest.searchby),e.xp6(9),e.Q6J("ngIf",""==o.busNumber),e.xp6(15),e.Q6J("ngIf",0==o.totalCount),e.xp6(1),e.Q6J("ngIf",0!=o.totalCount),e.xp6(2),e.Q6J("ngIf",o.totalCount>o.reportFormRequest.itemperpage),e.xp6(10),e.hij("",o.mapVehicleDetails.vehicleno," "),e.xp6(7),e.Q6J("ngIf",o.mapService.historyVehicleData.pollingdatatime),e.xp6(2),e.hij("In Time : ",o.mapVehicleDetails.intime,""),e.xp6(2),e.hij("Out Time : ",o.mapVehicleDetails.outtime,""),e.xp6(2),e.hij("Stop Point Name : ",o.mapVehicleDetails.poiname," km"),e.xp6(4),e.Q6J("ngIf","running"!=o.mapService.animationStatus&&"paused"==o.mapService.animationStatus),e.xp6(1),e.Q6J("ngIf","running"==o.mapService.animationStatus),e.xp6(1),e.Q6J("ngIf","stopped"!=o.mapService.animationStatus),e.xp6(2),e.Q6J("ngModel",o.mapService.historySpeed)}},directives:[g.PC,c._Y,c.JL,c.F,g.O5,A.w9,c.Q7,g.mk,c.JJ,c.On,g.sg,A.xv,C._L,c.EJ,c.YN,c.Kr,c.Fj,C.N9,Y.F,c.eT],pipes:[g.gd],styles:[".ng-select.ng-select-single .ng-select-container .ng-value-container{font-size:12px!important} .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{font-size:12px!important;text-transform:capitalize}ng-select.ng-select-single[_ngcontent-%COMP%] .ng-select-container{min-height:26px;max-height:26px;height:26px}.form-control[_ngcontent-%COMP%]{height:calc(1.45rem + 2px)}.invalid-feedback[_ngcontent-%COMP%]{font-size:11px;color:#dc3545}input[_ngcontent-%COMP%]{font-size:12px}.starvalid[_ngcontent-%COMP%]{color:#ff0040!important}.validationmsg[_ngcontent-%COMP%]{--bs-text-opacity: 1;color:#ff0040!important;font-weight:600}.shimmerBG[_ngcontent-%COMP%]{animation-duration:2.2s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:shimmer;animation-timing-function:linear;background:#E5F0FB;background:linear-gradient(to right,#cfeeeb 4%,#9ac9c6 25%,#d5f0f0 36%);background-size:1100px 100%}@keyframes shimmer{0%{background-position:-1200px 0}to{background-position:1200px 0}}.media[_ngcontent-%COMP%]{height:110px}.p-32[_ngcontent-%COMP%]{padding:32px}.title-line[_ngcontent-%COMP%]{height:24px;width:100%;margin-bottom:12px;border-radius:20px}.content-line[_ngcontent-%COMP%]{height:8px;width:100%;margin-bottom:16px;border-radius:8px}.end[_ngcontent-%COMP%]{width:40%}.m-t-24[_ngcontent-%COMP%]{margin-top:24px}.rptheadertext[_ngcontent-%COMP%]{text-decoration:underline}.rptlabel[_ngcontent-%COMP%]{color:#000}.outputlabel[_ngcontent-%COMP%]{color:#003c75}.backbtn[_ngcontent-%COMP%]{float:right;margin-left:25%!important;margin-top:0%!important}.srnotd[_ngcontent-%COMP%]{background-color:#f2f2f2}.form-group[_ngcontent-%COMP%]{margin-bottom:.2rem}"]}),n})();const $n=["reportForm"];function Bn(n,a){if(1&n&&(e.TgZ(0,"ng-option",16),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}
1function Gn(n,a){1&n&&(e.TgZ(0,"span",96),e._uU(1,"Filter type is mandatory"),e.qZA())}function Wn(n,a){if(1&n&&(e.TgZ(0,"span",94),e.YNc(1,Gn,2,0,"span",95),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}const le=function(n,a){return{"is-valid":n,"ng-error":a}};function Kn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",10)(1,"div",11)(2,"label",12),e._uU(3,"Filter Type "),e.TgZ(4,"span",90),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",91,92),e.NdJ("ngModelChange",function(i){return e.CHM(t),e.oxw().roleTypeObj=i})("change",function(){return e.CHM(t),e.oxw().onChangeCustomerType()}),e.YNc(8,Bn,2,2,"ng-option",17),e.qZA(),e.YNc(9,Wn,2,1,"span",93),e.qZA()()}if(2&n){const t=e.MAs(7),o=e.oxw(),i=e.MAs(11);e.xp6(6),e.Q6J("ngClass",e.WLB(6,le,t.valid,t.invalid&&i.submitted))("ngModel",o.roleTypeObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",o.roleList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||i.submitted))}}function Xn(n,a){if(1&n&&(e.TgZ(0,"ng-option",16),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function ei(n,a){if(1&n&&(e.TgZ(0,"span",96),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.hij("",t.customerTypeName," name is mandatory")}}function ti(n,a){if(1&n&&(e.TgZ(0,"span",94),e.YNc(1,ei,2,1,"span",95),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function oi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",10)(1,"div",11)(2,"label",97),e._uU(3),e.TgZ(4,"span",90),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",98,99),e.NdJ("ngModelChange",function(i){return e.CHM(t),e.oxw().customerNameObj=i})("change",function(){return e.CHM(t),e.oxw().onChangeCustomerList()}),e.YNc(8,Xn,2,2,"ng-option",17),e.qZA(),e.YNc(9,ti,2,1,"span",93),e.qZA()()}if(2&n){const t=e.MAs(7),o=e.oxw(),i=e.MAs(11);e.xp6(3),e.hij("",o.customerTypeName," List"),e.xp6(3),e.MGl("placeholder","Select ",o.customerTypeName," "),e.Q6J("ngClass",e.WLB(8,le,t.valid,t.invalid&&i.submitted))("ngModel",o.customerNameObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",o.customerList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||i.submitted))}}function ni(n,a){if(1&n&&(e.TgZ(0,"ng-option",16),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function ii(n,a){1&n&&(e.TgZ(0,"span",102),e._uU(1,"Vehicle is mandatory"),e.qZA())}function ri(n,a){if(1&n&&(e.TgZ(0,"span",100),e.YNc(1,ii,2,0,"span",101),e.qZA()),2&n){e.oxw();const t=e.MAs(22);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function ai(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.lnq("Showing ",t.recordFrom," To ",t.recordTo," (Out Of ",t.totalCount,")Entries")}}function si(n,a){1&n&&(e.TgZ(0,"option",103),e._uU(1,"20"),e.qZA())}function li(n,a){1&n&&(e.TgZ(0,"option",104),e._uU(1,"50"),e.qZA())}function ci(n,a){1&n&&(e.TgZ(0,"option",105),e._uU(1,"100"),e.qZA())}function pi(n,a){if(1&n&&(e.TgZ(0,"option",16),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.Q6J("value",t.totalCount),e.xp6(1),e.hij(" ",t.totalCount," ")}}function mi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",69),e.NdJ("click",function(i){return e.CHM(t),e.oxw().sorting(i,"vehicleno")}),e._uU(1," Vehicle No. "),e._UZ(2,"i",67),e.qZA()}}function di(n,a){1&n&&(e.TgZ(0,"tbody")(1,"tr")(2,"td",106)(3,"div",107),e._uU(4,"No Record Found"),e.qZA()()()())}function ui(n,a){if(1&n&&(e.TgZ(0,"td"),e._uU(1),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(""==t.vehicleno?"Not Found":t.vehicleno)}}function gi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"tr")(1,"td",109),e._uU(2),e.qZA(),e.YNc(3,ui,2,1,"td",45),e.TgZ(4,"td"),e._uU(5),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td")(9,"button",110),e.NdJ("click",function(){const r=e.CHM(t).$implicit;return e.oxw(2).trackVehicle(r)}),e._UZ(10,"i",111),e.qZA()()()}if(2&n){const t=a.$implicit,o=e.oxw(2);e.xp6(2),e.Oqu(t.rowno),e.xp6(1),e.Q6J("ngIf",""==o.busNumber),e.xp6(2),e.Oqu(""==t.starttime?"Not Found":t.starttime),e.xp6(2),e.Oqu(""==t.location?"Not Found":t.location)}}function hi(n,a){if(1&n&&(e.TgZ(0,"tbody"),e.YNc(1,gi,11,4,"tr",108),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.detailData)}}function _i(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",112)(1,"ngb-pagination",113),e.NdJ("pageChange",function(i){return e.CHM(t),e.oxw().reportFormRequest.pageno=i})("pageChange",function(){return e.CHM(t),e.oxw().details("")}),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("collectionSize",t.totalCount)("page",t.reportFormRequest.pageno)("maxSize",3)("pageSize",t.reportFormRequest.itemperpage)}}function fi(n,a){1&n&&(e.TgZ(0,"span"),e._UZ(1,"img",117),e.qZA())}function bi(n,a){1&n&&e._UZ(0,"img",118)}function vi(n,a){if(1&n&&(e.TgZ(0,"div")(1,"p",114),e._uU(2),e.qZA(),e.TgZ(3,"p",114),e._uU(4," Ignition : "),e.YNc(5,fi,2,0,"span",45),e.YNc(6,bi,1,0,"img",115),e._uU(7),e.ALo(8,"uppercase"),e.qZA(),e.TgZ(9,"p",114),e._uU(10),e.qZA(),e.TgZ(11,"p",116),e._uU(12),e.qZA()()),2&n){const t=e.oxw();e.xp6(2),e.hij(" Last Polling Time : ",t.mapService.historyVehicleData.pollingdatatime," "),e.xp6(3),e.Q6J("ngIf","on"==t.mapService.historyVehicleData.ignitionstatus.toLowerCase()),e.xp6(1),e.Q6J("ngIf","off"==t.mapService.historyVehicleData.ignitionstatus.toLowerCase()),e.xp6(1),e.hij(" ",e.lcZ(8,6,t.mapService.historyVehicleData.ignitionstatus)," "),e.xp6(3),e.hij("Speed : ",t.mapService.historyVehicleData.speed," Km/hr"),e.xp6(2),e.hij("Location : ",t.mapService.historyVehicleData.location," ")}}function Ti(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",119),e.NdJ("click",function(){return e.CHM(t),e.oxw().mapService.changeAnimation("play")}),e._uU(1," Play "),e.qZA()}}function Zi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",120),e.NdJ("click",function(){return e.CHM(t),e.oxw().mapService.changeAnimation("pause")}),e._uU(1," Pause "),e.qZA()}}function xi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",121),e.NdJ("click",function(){return e.CHM(t),e.oxw().mapService.changeAnimation("stop")}),e._uU(1," Stop "),e.qZA()}}const Se=function(n){return{display:n}};let yi=(()=>{class n{constructor(t,o,i,r,s,l,d,m){this.cv=t,this.cs=o,this.loader=i,this.route=r,this.es=s,this.listService=l,this.mapService=d,this.datePipe=m,this.dateObj="",this.formsection=!0,this.loadersection=!1,this.detailsection=!1,this.loginRoleId=sessionStorage.getItem("loginroleid"),this.reportFormRequest=new G,this.detailData=[],this.pageHeading="SOS Report",this.busNumber="",this.dateRange="",this.allVehicleObject={id:"",name:"All"},this.selectedBusList=[],this.roleList=[],this.customerTypeName="",this.customerList=[],this.sortDir=1,this.mapVehicleDetails=new Ce}ngOnInit(){$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"}),this.getDate(),"101"==this.loginRoleId||"600"==this.loginRoleId?this.getRoleList():this.getVehicleList()}getRoleList(){var t=this;return(0,u.Z)(function*(){t.roleList=[],t.roleList=yield t.listService.getRoleList(new h.nO),t.roleList.push({id:"3",name:"vehicle"}),t.roleList=t.roleList.filter(o=>"school"==o.name||"customer"==o.name||"vehicle"==o.name)})()}onChangeCustomerType(){this.roleTypeObj&&(this.vehicleList=[],this.customerTypeName="","school"==this.roleTypeObj.name||"customer"==this.roleTypeObj.name?(this.customerTypeName=this.roleTypeObj.name,this.getCustomerList()):"vehicle"==this.roleTypeObj.name&&this.getVehicleList())}getCustomerList(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;o.filter1=t.roleTypeObj.id,t.customerList=yield t.listService.getCustomerList(o)})()}onChangeCustomerList(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;t.customerNameObj&&("school"==t.roleTypeObj.name?o.filter1=t.customerNameObj.id:"customer"==t.roleTypeObj.name&&(o.filter2=t.customerNameObj.id)),t.vehicleList=yield t.listService.getVehicleList(o)})()}getVehicleList(){var t=this;return(0,u.Z)(function*(){t.vehicleList=yield t.listService.getVehicleList(new h.nO)})()}getDate(){$(()=>{$('input[name="date"]').daterangepicker({showDropdowns:!0,startDate:p().startOf("day").format("DD-MMM-YYYY"),endDate:p().endOf("day").format("DD-MMM-YYYY"),opens:"center",drops:"down",maxSpan:{days:30},locale:{format:"DD-MMM-YYYY"},ranges:{Today:[p(),p()],Yesterday:[p().subtract(1,"days"),p().subtract(1,"days")],"This Week":[p().startOf("week"),p().endOf("week")],"This Month":[p().startOf("month"),p().endOf("day")]},maxDate:new Date,minYear:2022,maxYear:parseInt(p().format("YYYY"),10),function(t,o){$("#datepicker").html(t.format("DD-MMM-YYYY")+" : "+o.format("DD-MMM-YYYY"))}}),$('input[name="date"]').on("hide.daterangepicker",(t,o)=>{try{this.dateObj=t.target.value}catch(i){}}),this.dateObj=document.getElementById("datepicker").value})}onChangeSchool(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;o.schoolid=t.schoolObj.id,t.vehicleList=yield t.listService.getVehicleList(o)})()}checkAllBus(){this.busNumber="All"==this.busNoObj.name?"All":this.busNoObj.name}validateForm(){if(this.reportForm.valid){this.formsection=!1,this.loadersection=!0,this.customerName=this.customerNameObj?this.customerNameObj.name:"",this.reportFormRequest.customerid=this.customerNameObj?this.customerNameObj.id:"",this.busNoObj&&("All"==this.busNoObj.name?(this.customerName=this.busNoObj.customername,this.reportFormRequest.vehicleid="all"):(this.customerName=this.busNoObj.customername,this.reportFormRequest.vehicleid=this.busNoObj?this.busNoObj.id:"")),"school"==this.customerTypeName&&(this.customerName=this.customerNameObj.name),"customer"==this.customerTypeName&&(this.customerName=this.customerNameObj.name);let t=this.dateObj.split(" - ");this.reportFormRequest.fromdate=t[0],this.reportFormRequest.todate=t[1],this.reportFormRequest.fromtime=document.getElementById("fromtime").value.replace(" ","").replace(" ",""),this.reportFormRequest.totime=document.getElementById("totime").value.replace(" ","").replace(" ",""),this.dateRange=this.reportFormRequest.fromdate+" "+this.reportFormRequest.fromtime+" To "+this.reportFormRequest.todate+" "+this.reportFormRequest.totime,this.details("refresh")}}details(t){try{this.loader.loaderOff()}catch(o){}"showrow"==t&&(this.reportFormRequest.pageno=1),"search"==t&&(this.reportFormRequest.pageno=1),"refresh"==t&&(this.reportFormRequest.searchby="",this.reportFormRequest.pageno=1,this.reportFormRequest.itemperpage=10),this.reportFormRequest.searchby=this.reportFormRequest.searchby.trim(),this.formsection=!1,this.loadersection=!0;try{this.loader.loaderOn()}catch(o){}this.es.apiCall(this.reportFormRequest,"sosreport").subscribe(o=>{try{this.loader.loaderOff()}catch(i){}200==o.statusCode?(this.detailData=o.entity.sosreport,this.totalCount=+o.entity.totalrecord,this.recordFrom=this.detailData[0].rowno,this.recordTo=this.detailData[this.detailData.length-1].rowno,this.loadersection=!1,this.formsection=!1,this.detailsection=!0):(this.detailData=[],this.recordTo=0,this.recordFrom=0,this.totalCount=0,this.reportFormRequest.searchby="",this.detailsection=!0,this.formsection=!1,this.loadersection=!1),this.es.pageDataInfo("",this.reportFormRequest,"SOS Alert Report","Details method","Called Function",o.message)},o=>{this.loader.logout()})}redirectToForm(){this.formsection=!0,this.loadersection=!1,this.detailsection=!1}ResetForm(){this.reportForm.resetForm(),this.formsection=!0,this.detailsection=!1,this.getDate(),setTimeout(()=>{$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"})},1500),this.getRoleList(),this.roleTypeObj=null,this.customerNameObj=null,this.schoolObj=null,this.busNoObj=null,this.vehicleList=[]}sorting(t,o){try{let r=t.currentTarget.childNodes[1].classList;try{r.contains("fa-sort-amount-desc")?(r.remove("fa-sort-amount-desc"),r.add("fa-sort-amount-asc")):(r.remove("fa-sort-amount-asc"),r.add("fa-sort-amount-desc"))}catch(s){console.log("e "+s)}this.sortDir=1==this.sortDir?-1:1;try{this.detailData.length>0&&this.detailData.sort((s,l)=>(s=s[o].toLowerCase(),l=l[o].toLowerCase(),s.localeCompare(l)*this.sortDir))}catch(s){console.log("e "+s)}}catch(i){}}trackVehicle(t){var o=this;return(0,u.Z)(function*(){var i,r;console.log(t),o.mapService.clearAllLayers(),o.mapVehicleDetails=t;let s=new y.rn;s.fromdate=o.datePipe.transform(p(t.starttime).subtract(5,"minutes").toString(),"dd-MMM-yyyy"),s.fromtime=o.datePipe.transform(p(t.starttime).subtract(5,"minutes").toString(),"hh:mm:ss a"),s.todate=o.datePipe.transform(p(t.starttime).add(5,"minutes").toString(),"dd-MMM-yyyy"),s.totime=o.datePipe.transform(p(t.starttime).add(5,"minutes").toString(),"hh:mm:ss a"),s.vehicleid=t.vehicleid,yield o.mapService.trackHistoryVehicle(s.imeino,s.fromdate,
1s.fromtime,s.todate,s.totime,s.vehicleid,"",!1,!1,new y.Us),null===(i=o.mapService.alertLayer.getSource())||void 0===i||i.clear();let l=[],d=new P.Z({geometry:new E.Z(j.mi([+t.longitude,+t.latitude]))}),m=new h.dM;m.latitude=t.latitude,m.location=t.latitude,m.packetdate=t.starttime,m.speed=t.speed,m.vehicleid=t.vehicleid,m.vehicleno=t.vehicleno,d.setProperties({properties:m}),d.setStyle(o.mapService.alertStyleFunction),l.push(d),null===(r=o.mapService.alertLayer.getSource())||void 0===r||r.addFeatures(l),o.mapService.map.getView().animate({center:j.mi([+t.longitude,+t.latitude]),zoom:17})})()}downloadDoc(t){let o=new G;o.pdfexcel=t,o.itemperpage="",o.pageno="",o.customerid=this.reportFormRequest.customerid,o.vehicleid=this.reportFormRequest.vehicleid,o.fromdate=this.reportFormRequest.fromdate,o.todate=this.reportFormRequest.todate,o.fromtime=this.reportFormRequest.fromtime,o.totime=this.reportFormRequest.totime,o.searchby=this.reportFormRequest.searchby.trim();try{this.loader.loaderOn()}catch(i){}this.es.apiCall(o,"sosreport").subscribe(i=>{try{this.loader.loaderOff()}catch(r){}"200"==i.statusCode&&(this.filePath=i.message,this.es.commonFileDownload(this.filePath)),o.pdfexcel="",this.es.pageDataInfo("",this.reportFormRequest,"SOS Alert Report","Download Excel/PDF method","Called Function",i.message)})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(S.R),e.Y36(U.v),e.Y36(N.D),e.Y36(M.F0),e.Y36(F.P),e.Y36(D.X),e.Y36(J.S),e.Y36(g.uU))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-sos-alert-report"]],viewQuery:function(t,o){if(1&t&&e.Gf($n,5),2&t){let i;e.iGM(i=e.CRH())&&(o.reportForm=i.first)}},decls:143,vars:42,consts:[[1,"report-form-container","p-1"],[1,"reportheader"],["aria-hidden","true",1,"fa","fa-credit-card"],[1,"rptheadertext"],[1,"container-fluid",3,"ngStyle"],[1,"row"],[1,"col-md-12"],["novalidate","","id","form_id","autocomplete","off",1,"needs-validation"],["reportForm","ngForm"],["class","col-md-2",4,"ngIf"],[1,"col-md-2"],[1,"form-group"],[1,"mb-0","label"],[1,"starvalid"],["name","vehicleNumber","placeholder","Select Vehicle","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["busNoCtrl","ngModel"],[3,"value"],[3,"value",4,"ngFor","ngForOf"],["class","form-control-feedback text-danger",4,"ngIf"],[1,"col-md-4"],[1,"d-flex","justify-content-between"],[1,"report-label","mb-0"],["type","text","name","date","id","datepicker","required","","placeholder","Select Date",1,"form-control","form-control-sm"],[1,"form-group","mb-0",2,"width","85px","float","left"],[1,"mb-0"],["type","text","name","timepicker","id","fromtime",1,"fromTime","form-control","form-control-sm","text-center"],[1,"form-group",2,"width","85px","float","left"],["type","text","name","timepicker","id","totime",1,"toTime","form-control","form-control-sm","text-center"],[1,"col","mt-3"],["type","submit",1,"custom-btn","btn-13","float-right","Show","mb-3",3,"click"],["type","button",1,"custom-btn","btn-10","float-right","mr-2",3,"click"],[1,"report-form-container"],[1,"row","grid-section",3,"ngStyle"],[1,"row","py-2","report-summary"],[1,"col-md-3"],[1,"fw-bolder","text-small","text-uppercase","outputlabel"],[1,"text-uppercase","text-small","outputlabel"],[1,"customerNameForSummary"],[1,"col-md-8"],[1,"col","text-end","float-end"],["ngbTooltip","Back",1,"backbtnbackground",3,"click"],["aria-hidden","true",1,"fa","fa-arrow-circle-o-left","outputlabel"],[1,"col-md-12","px-0"],[1,"table-head","d-flex","justify-content-between"],["id","tickets-table_info","role","status","aria-live","polite",1,"col-auto","mt-2","text-center","fw-bold","total-record-label"],[4,"ngIf"],[1,"mt-1"],[1,"itemsperpage-style",2,"margin-right","10px"],[1,"d-inline-flex","align-items-center"],["name","table_length","aria-controls","table","name","pageSize",3,"ngModel","ngModelChange","change"],["value","10","selected",""],["value","20",4,"ngIf"],["value","50",4,"ngIf"],["value","100",4,"ngIf"],[3,"value",4,"ngIf"],["type","button",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"click"],["aria-hidden","true",1,"fa","fa-refresh"],["type","button","ngbTooltip","Download Pdf","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-pdf-o","pdf-btn"],["type","button","ngbTooltip","Download Excel","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-excel-o","excel-btn"],["type","text","name","searchTerm","autocomplete","off","aria-controls","tickets-table","placeholder","Search here....","autocomplete","off",1,"form-control","form-control-sm","ms-2","searchinput",2,"width","165px",3,"ngModel","ngModelChange"],["type","button",1,"btn","search-btn",3,"click"],[1,"fa","fa-search"],[1,"scroll-tbl"],[1,"table","table-striped","table-style",2,"overflow-y","auto","overflow-x","auto"],[2,"width","40px",3,"click"],[1,"fa","fa-sort-amount-desc"],[3,"click",4,"ngIf"],[3,"click"],[1,"fa","fa-map-marker","fa-2x"],[1,"row","justify-content-md-between","align-items-md-center","mt-2"],["class","float-end text-start",4,"ngIf"],["id","exampleModal","tabindex","-1","data-bs-backdrop","static","data-bs-keyboard","false","aria-labelledby","exampleModalLabel","aria-hidden","true",1,"modal","fade"],[1,"modal-dialog","modal
1-xl"],[1,"modal-content"],[1,"modal-header","bg-white"],["id","exampleModalLabel",1,"modal-title"],["type","button","data-bs-dismiss","modal","aria-label","Close",1,"btn-close",3,"click"],[1,"modal-body","p-0"],[2,"width","100%","height","500px"],[1,"current-vehicle-section"],[1,"p-1",2,"max-width","250px","font-size","12px"],["role","group",1,"btn-group"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click"],["type","button","class","btn btn-sm btn-outline-primary","ngbTooltip","Play",3,"click",4,"ngIf"],["type","button","class","btn btn-sm btn-outline-primary","ngbTooltip","Pause",3,"click",4,"ngIf"],["type","button","class","btn btn-sm btn-outline-primary","ngbTooltip","Stop",3,"click",4,"ngIf"],[1,"col-12"],["type","range","min","1000","max","20000",1,"form-range","form-control","form-control-sm",3,"ngModel","change","ngModelChange"],[1,"text-danger"],["name","roletype","placeholder","Select Filter Type ","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["roleTypeCtrl","ngModel"],["class","form-control-feedback text-danger text-danger",4,"ngIf"],[1,"form-control-feedback","text-danger","text-danger"],["class","text-small",4,"ngIf"],[1,"text-small"],[1,"mb-0","text-capitalize"],["name","customertype","required","",1,"text-capitalize",3,"ngClass","ngModel","multiple","placeholder","closeOnSelect","ngModelChange","change"],["customerNameCtrl","ngModel"],[1,"form-control-feedback","text-danger"],["class","text-small","style"," font-size: 10px;",4,"ngIf"],[1,"text-small",2,"font-size","10px"],["value","20"],["value","50"],["value","100"],["colspan","15"],[1,"text-center"],[4,"ngFor","ngForOf"],[1,"srnotd"],["title","Track SOS Alert","data-bs-toggle","modal","data-bs-target","#exampleModal",1,"btn","btn-sm","btn-dark","p-1",3,"click"],[1,"fa","fa-map-marker"],[1,"float-end","text-start"],["size","sm",1,"d-flex","mt-2","justify-content-end","pagination-rounded","pagination","pagination-info",3,"collectionSize","page","maxSize","pageSize","pageChange"],[1,"m-0"],["src","assets/school-management/images/poweroff.png","style","width: 20px;height: 20px;",4,"ngIf"],[1,"m-0",2,"word-wrap","break-word"],["src","assets/school-management/images/poweron.png",2,"width","20px","height","20px"],["src","assets/school-management/images/poweroff.png",2,"width","20px","height","20px"],["type","button","ngbTooltip","Play",1,"btn","btn-sm","btn-outline-primary",3,"click"],["type","button","ngbTooltip","Pause",1,"btn","btn-sm","btn-outline-primary",3,"click"],["type","button","ngbTooltip","Stop",1,"btn","btn-sm","btn-outline-primary",3,"click"]],template:function(t,o){if(1&t&&(e.TgZ(0,"div",0)(1,"div")(2,"h5",1),e._UZ(3,"i",2),e._uU(4,"\xa0\xa0\xa0"),e.TgZ(5,"span",3),e._uU(6,"SOS Alert Report"),e.qZA()()(),e.TgZ(7,"div",4)(8,"div",5)(9,"div",6)(10,"form",7,8)(12,"div",5),e.YNc(13,Kn,10,9,"div",9),e.YNc(14,oi,10,11,"div",9),e.TgZ(15,"div",10)(16,"div",11)(17,"label",12),e._uU(18,"Vehicle Number "),e.TgZ(19,"span",13),e._uU(20,"*"),e.qZA()(),e.TgZ(21,"ng-select",14,15),e.NdJ("ngModelChange",function(r){return o.busNoObj=r})("change",function(){return o.checkAllBus()}),e.TgZ(23,"ng-option",16),e._uU(24),e.qZA(),e.YNc(25,ni,2,2,"ng-option",17),e.qZA(),e.YNc(26,ri,2,1,"span",18),e.qZA()(),e.TgZ(27,"div",19)(28,"div",20)(29,"div",11)(30,"label",21),e._uU(31,"Date Range:"),e.qZA(),e._UZ(32,"input",22),e.qZA(),e.TgZ(33,"div",23)(34,"label",24),e._uU(35,"Time "),e.qZA(),e._UZ(36,"input",25),e.qZA(),e._uU(37," \xa0\xa0\xa0 "),e.TgZ(38,"div",26),e._UZ(39,"label",24)(40,"input",27),e.qZA()()(),e.TgZ(41,"div",28)(42,"button",29),e.NdJ("click",function(){return o.validateForm()}),e._uU(43,"Generate"),e.qZA(),e._uU(44," \xa0 "),e.TgZ(45,"button",30),e.NdJ("click",function(){return o.ResetForm()}),e._uU(46,"Reset"),e.qZA()()()()()()(),e.TgZ(47,"div",31)(48,"div",32)(49,"div",6)(50,"div",33)(51,"div",34)(52,"span",35),e._uU(53,"Vehicle :"),e.qZA(),e.TgZ(54,"span",36),e._uU(55),e.qZA(),e._UZ(56,"br"),e.TgZ(57,"span",37),e._uU(58),e.qZA()(),e.TgZ(59,"div",38)(60,"span",35),e._uU(61,"Date :"),e.qZA(),e.TgZ(62,"span",36),e._uU(63),e.qZA()(),e.TgZ(64,"div",39)(65,"button",40),e.NdJ("click",function(){return o.redirectToForm()}),e._UZ(66,"i",41),e.qZA()()()(),e.TgZ(67,"div",42)(68,"div",43)(69,"div",44),e.YNc(70,ai,2,3,"span",45),e.qZA(),e.TgZ(71,"div",46)(72,"span",47)(73,"label",48),e._uU(74,"Show "),e.TgZ(75,"select",49),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.itemperpage=r})("change",function(){return o.details("showrow")}),e.TgZ(76,"option",50),e._uU(77," 10"),e.qZA(),e.YNc(78,si,2,0,"option",51),e.YNc(79,li,2,0,"option",52),e.YNc(80,ci,2,0,"option",53),e.YNc(81,pi,2,2,"option",54),e.qZA(),e._uU(82," entries"),e.qZA()(),e.TgZ(83,"span")(84,"button",55),e.NdJ("click",function(){return o.details("refresh")}),e._UZ(85,"i",56),e.qZA()(),e.TgZ(86,"span")(87,"button",57),e.NdJ("click",function(){return o.downloadDoc("pdf")}
1),e._UZ(88,"i",58),e.qZA(),e.TgZ(89,"button",59),e.NdJ("click",function(){return o.downloadDoc("excel")}),e._UZ(90,"i",60),e.qZA()(),e.TgZ(91,"label")(92,"input",61),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.searchby=r}),e.qZA()(),e.TgZ(93,"button",62),e.NdJ("click",function(){return o.details("")}),e._UZ(94,"span",63),e.qZA()()(),e.TgZ(95,"div",64)(96,"table",65)(97,"thead")(98,"tr")(99,"th",66),e.NdJ("click",function(r){return o.sorting(r,"rowno")}),e._uU(100,"#"),e._UZ(101,"i",67),e.qZA(),e.YNc(102,mi,3,0,"th",68),e.TgZ(103,"th",69),e.NdJ("click",function(r){return o.sorting(r,"vehicleno")}),e._uU(104," IMEI No. "),e._UZ(105,"i",67),e.qZA(),e.TgZ(106,"th",69),e.NdJ("click",function(r){return o.sorting(r,"speed")}),e._uU(107,"Event Time "),e._UZ(108,"i",67),e.qZA(),e.TgZ(109,"th",69),e.NdJ("click",function(r){return o.sorting(r,"flocation")}),e._uU(110,"Location "),e._UZ(111,"i",67),e.qZA(),e.TgZ(112,"th"),e._UZ(113,"i",70),e.qZA()()(),e.YNc(114,di,5,0,"tbody",45),e.YNc(115,hi,2,1,"tbody",45),e.qZA()(),e.TgZ(116,"div",71),e.YNc(117,_i,2,4,"div",72),e.qZA()()()(),e.TgZ(118,"div",73)(119,"div",74)(120,"div",75)(121,"div",76)(122,"h5",77)(123,"u"),e._uU(124," SOS Alert Summary"),e.qZA(),e._uU(125," of "),e.TgZ(126,"b"),e._uU(127),e.qZA()(),e.TgZ(128,"button",78),e.NdJ("click",function(){return o.mapService.clearAllLayers()}),e.qZA()(),e.TgZ(129,"div",79)(130,"div",80),e._UZ(131,"app-helper-map"),e.TgZ(132,"div",81)(133,"div",82),e.YNc(134,vi,13,8,"div",45),e.TgZ(135,"div",83)(136,"button",84),e.NdJ("click",function(){return o.mapService.changeAnimation("restart")}),e._uU(137," Start "),e.qZA(),e.YNc(138,Ti,2,0,"button",85),e.YNc(139,Zi,2,0,"button",86),e.YNc(140,xi,2,0,"button",87),e.qZA(),e.TgZ(141,"div",88)(142,"input",89),e.NdJ("change",function(){return o.mapService.changeAnimation("speedchange")})("ngModelChange",function(r){return o.mapService.historySpeed=r}),e.qZA()()()()()()()()()()),2&t){const i=e.MAs(11),r=e.MAs(22);e.xp6(7),e.Q6J("ngStyle",e.VKq(35,Se,o.formsection?"":"none")),e.xp6(6),e.Q6J("ngIf","101"==o.loginRoleId||"600"==o.loginRoleId),e.xp6(1),e.Q6J("ngIf",("101"==o.loginRoleId||"600"==o.loginRoleId)&&"school"==o.customerTypeName||"customer"==o.customerTypeName),e.xp6(7),e.Q6J("ngClass",e.WLB(37,le,r.valid,r.invalid&&i.submitted))("ngModel",o.busNoObj)("multiple",!1)("closeOnSelect",!1)("closeOnSelect",!1),e.xp6(2),e.Q6J("value",o.allVehicleObject),e.xp6(1),e.hij("",o.allVehicleObject.name," "),e.xp6(1),e.Q6J("ngForOf",o.vehicleList),e.xp6(1),e.Q6J("ngIf",r.errors&&(r.dirty||r.touched||i.submitted)),e.xp6(22),e.Q6J("ngStyle",e.VKq(40,Se,o.detailsection?"":"none")),e.xp6(7),e.hij(" ",o.busNumber,""),e.xp6(3),e.Oqu(o.customerName),e.xp6(5),e.hij(" ",o.dateRange,""),e.xp6(7),e.Q6J("ngIf",0!=o.totalCount),e.xp6(5),e.Q6J("ngModel",o.reportFormRequest.itemperpage),e.xp6(3),e.Q6J("ngIf",o.totalCount>20),e.xp6(1),e.Q6J("ngIf",o.totalCount>50),e.xp6(1),e.Q6J("ngIf",o.totalCount>100),e.xp6(1),e.Q6J("ngIf",o.totalCount<100&&o.totalCount>10),e.xp6(6),e.Q6J("disabled","0"==o.totalCount),e.xp6(2),e.Q6J("disabled","0"==o.totalCount),e.xp6(3),e.Q6J("ngModel",o.reportFormRequest.searchby),e.xp6(10),e.Q6J("ngIf",""==o.busNumber),e.xp6(12),e.Q6J("ngIf",0==o.totalCount),e.xp6(1),e.Q6J("ngIf",0!=o.totalCount),e.xp6(2),e.Q6J("ngIf",o.totalCount>o.reportFormRequest.itemperpage),e.xp6(10),e.hij("",o.mapVehicleDetails.vehicleno," "),e.xp6(7),e.Q6J("ngIf",o.mapService.historyVehicleData.pollingdatatime),e.xp6(4),e.Q6J("ngIf","running"!=o.mapService.animationStatus&&"paused"==o.mapService.animationStatus),e.xp6(1),e.Q6J("ngIf","running"==o.mapService.animationStatus),e.xp6(1),e.Q6J("ngIf","stopped"!=o.mapService.animationStatus),e.xp6(2),e.Q6J("ngModel",o.mapService.historySpeed)}},directives:[g.PC,c._Y,c.JL,c.F,g.O5,A.w9,c.Q7,g.mk,c.JJ,c.On,g.sg,A.xv,C._L,c.EJ,c.YN,c.Kr,c.Fj,C.N9,Y.F,c.eT],pipes:[g.gd],styles:[".ng-select.ng-select-single .ng-select-container .ng-value-container{font-size:12px!important} .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{font-size:12px!important;text-transform:capitalize}ng-select.ng-select-single[_ngcontent-%COMP%] .ng-select-container{min-height:26px;max-height:26px;height:26px}.form-control[_ngcontent-%COMP%]{height:calc(1.45rem + 2px)}.invalid-feedback[_ngcontent-%COMP%]{font-size:11px;color:#dc3545}input[_ngcontent-%COMP%]{font-size:12px}.starvalid[_ngcontent-%COMP%]{color:#ff0040!important}.validationmsg[_ngcontent-%COMP%]{--bs-text-opacity: 1;color:#ff0040!important;font-weight:600}.shimmerBG[_ngcontent-%COMP%]{animation-duration:2.2s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:shimmer;animation-timing-function:linear;background:#E5F0FB;background:linear-gradient(to right,#cfeeeb 4%,#9ac9c6 25%,#d5f0f0 36%);background-size:1100px 100%}@keyframes shimmer{0%{background-position:-1200px 0}to{background-position:1200px 0}}.media[_ngcontent-%COMP%]{height:110px}.p-32[_ngcontent-%COMP%]{padding:32px}.title-line[_ngcontent-%COMP%]{height:24px;width:100%;margin-bottom:12px;border-radius:20px}.content-line[_ngcontent-%COMP%]{height:8px;width:100%;margin-bottom:16px;border-radius:8px}.end[_ngcontent-%COMP%]{width:40%}.m-t-24[_ngcontent-%COMP%]{margin-top:24px}.rptheadertext[_ngcontent-%COMP%]{text-decoration:underline}.rptlabel[_ngcontent-%COMP%]{color:#000}.outputlabel[_ngcontent-%COMP%]{color:#003c75}.backbtn[_ngcontent-%COMP%]{float:right;margin-left:25%!important;margin-top:-1%!important}.srnotd[_ngcontent-%COMP%]{background-color:#f2f2f2}.form-group[_ngcontent-%COMP%]{margin-bottom:.2rem}"]}),n})(),ce=(()=>{class n{constructor(t){this.mapService=t,this.vehicleNo=""}
1ngOnInit(){}trackHistoryVehicle(t){this.mapService.trackHistoryVehicle(t.imeino,t.fromdate,t.fromtime,t.todate,t.totime,t.vehicleid,"",!1,!1,new y.Us)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(J.S))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-report-map"]],decls:10,vars:0,consts:[["id","exampleModal","tabindex","-1","aria-labelledby","exampleModalLabel","aria-hidden","true",1,"modal","fade"],[1,"modal-dialog","modal-lg"],[1,"modal-content"],[1,"modal-header","p-1"],["id","exampleModalLabel",1,"modal-title"],["type","button","data-bs-dismiss","modal","aria-label","Close",1,"btn-close"],[1,"modal-body","p-0"],[2,"width","100%","height","400px"]],template:function(t,o){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h5",4),e._uU(5,"Modal title"),e.qZA(),e._UZ(6,"button",5),e.qZA(),e.TgZ(7,"div",6)(8,"div",7),e._UZ(9,"app-helper-map"),e.qZA()()()()())},directives:[Y.F],styles:[""]}),n})();const Ci=["reportForm"];function Ai(n,a){if(1&n&&(e.TgZ(0,"ng-option",97),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function qi(n,a){1&n&&(e.TgZ(0,"span",100),e._uU(1,"Vehicle is mandatory"),e.qZA())}function Oi(n,a){if(1&n&&(e.TgZ(0,"span",98),e.YNc(1,qi,2,0,"span",99),e.qZA()),2&n){e.oxw();const t=e.MAs(19);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function Ri(n,a){1&n&&(e.TgZ(0,"span",103),e._uU(1,"Filter is mandatory"),e.qZA())}function ki(n,a){if(1&n&&(e.TgZ(0,"span",101),e.YNc(1,Ri,2,0,"span",102),e.qZA()),2&n){e.oxw();const t=e.MAs(29);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function wi(n,a){if(1&n&&(e.TgZ(0,"ng-option",97),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function Mi(n,a){if(1&n&&(e.TgZ(0,"span",103),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.hij("",t.customerTypeName," name is mandatory")}}function Ni(n,a){if(1&n&&(e.TgZ(0,"span",101),e.YNc(1,Mi,2,1,"span",102),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}const pe=function(n,a){return{"is-valid":n,"ng-error":a}};function Fi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",9)(1,"div",10)(2,"label",104),e._uU(3),e.TgZ(4,"span",17),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",105,106),e.NdJ("ngModelChange",function(i){return e.CHM(t),e.oxw().customerNameObj=i})("change",function(){return e.CHM(t),e.oxw().onChangeCustomerList()}),e.YNc(8,wi,2,2,"ng-option",15),e.qZA(),e.YNc(9,Ni,2,1,"span",22),e.qZA()()}if(2&n){const t=e.MAs(7),o=e.oxw(),i=e.MAs(10);e.xp6(3),e.hij("",o.customerTypeName," List"),e.xp6(3),e.MGl("placeholder","Select ",o.customerTypeName," "),e.Q6J("ngClass",e.WLB(8,pe,t.valid,t.invalid&&i.submitted))("ngModel",o.customerNameObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",o.customerList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||i.submitted))}}function Si(n,a){if(1&n&&(e.TgZ(0,"div",9)(1,"span",42),e._uU(2,"Vehicle :"),e.qZA(),e.TgZ(3,"span",43),e._uU(4),e.qZA(),e._UZ(5,"br"),e.TgZ(6,"span",107),e._uU(7),e.qZA()()),2&n){const t=e.oxw();e.xp6(4),e.hij(" ",t.busNumber," "),e.xp6(3),e.Oqu(t.customerName)}}function Ui(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.lnq("Showing ",t.recordFrom," To ",t.recordTo," ( Out Of ",t.totalCount," ) Entries")}}function Di(n,a){1&n&&(e.TgZ(0,"option",108),e._uU(1,"20"),e.qZA())}function Ii(n,a){1&n&&(e.TgZ(0,"option",109),e._uU(1,"50"),e.qZA())}function Ji(n,a){1&n&&(e.TgZ(0,"option",110),e._uU(1,"100"),e.qZA())}function Li(n,a){if(1&n&&(e.TgZ(0,"option",97),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.Q6J("value",t.totalCount),e.xp6(1),e.hij(" ",t.totalCount," ")}}function Yi(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1,"Vehicle No."),e.qZA())}function ji(n,a){1&n&&(e.TgZ(0,"tbody")(1,"tr")(2,"td",111)(3,"div",112),e._uU(4,"No Record Found"),e.qZA()()()())}function Pi(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(t.vehicleno?t.vehicleno:"-")}}function Qi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"tr")(1,"td",112),e._uU(2),e.qZA(),e.TgZ(3,"td",112),e.YNc(4,Pi,2,1,"span",50),e._UZ(5,"br"),e._uU(6),e.qZA(),e.TgZ(7,"td",112),e._uU(8),e.qZA(),e.TgZ(9,"td",112),e._uU(10),e.qZA(),e.TgZ(11,"td",112),e._uU(12),e.qZA(),e.TgZ(13,"td",114),e._uU(14),e.qZA(),e.TgZ(15,"td",115),e._uU(16),e.qZA(),e.TgZ(17,"td",116),e._uU(18),e.qZA(),e.TgZ(19,"td",117),e._uU(20),e.qZA(),e.TgZ(21,"td")(22,"button",118),e.NdJ("click",function(){const r=e.CHM(t).$implicit;return e.oxw(2).trackVehicle(r)}),e._UZ(23,"i",76),e.qZA()()()}if(2&n){const t=a.$implicit,o=e.oxw(2);e.xp6(2),e.Oqu(t.rowno),e.xp6(2),e.Q6J("ngIf",""==o.busNumber),e.xp6(2),e.hij("",t.distance?t.distance:"-"," "),e.xp6(2),e.hij(" ",t.startdate?t.startdate:"-"," "),e.xp6(2),e.hij(" ",t.startdate?t.startdate:"-"," "),e.xp6(2),e.hij(" ",t.distance?t.distance:"-"," "),e.xp6(2),e.hij(" ",t.maxspeed?t.maxspeed:"-"," "),e.xp6(2),e.hij(" ",t.stoppagetime?t.stoppagetime:"-"," "),e.xp6(2),e.hij(" ",t.runningtime?t.runningtime:"-"," "),e.xp6(2),e.hij(" ",t.idletime?t.idletime:"-","")}}function Vi(n,a){if(1&n&&(e.TgZ(0,"tbody"),e.YNc(1,Qi,24,10,"tr",113),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.detailData)}}function Ei(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",119)(1,"ngb-pagination",120),e.NdJ("pageChange",function(i){return e.CHM(t),e.oxw().reportFormRequest.pageno=i})("pageChange",function(){return e.CHM(t),e.oxw().details("pagination")}),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("collectionSize",t.totalCount)("page",t.reportFormRequest.pageno)("maxSize",3)("pageSize",t.reportFormRequest.itemperpage)}}function zi(n,a){1&n&&e._UZ(0,"img",125)}function Hi(n,a){1&n&&e._UZ(0,"img",126)}const Ue=function(n,a){return{"text-success":n,"text-danger":a}};function $i(n,a){if(1&n&&(e.TgZ(0,"div")(1,"p",121)(2,"strong"),e._uU(3,"\u{1f4f1} IMEI:"),e.qZA(),e._uU(4),e.qZA(),e.TgZ(5,"p",121)(6,"strong"),e._uU(7,"\u{1f550}
1 Last Update:"),e.qZA(),e._uU(8),e.qZA(),e.TgZ(9,"p",121)(10,"strong"),e._uU(11,"\u{1f4cf} Distance:"),e.qZA(),e._uU(12),e.qZA(),e.TgZ(13,"p",121)(14,"strong"),e._uU(15,"\u26a1 Speed:"),e.qZA(),e.TgZ(16,"span",24),e._uU(17),e.qZA(),e.YNc(18,zi,1,0,"img",122),e.YNc(19,Hi,1,0,"img",123),e.qZA(),e.TgZ(20,"p",124)(21,"strong"),e._uU(22,"\u{1f4cd} Location:"),e.qZA(),e._uU(23),e.qZA()()),2&n){const t=e.oxw();e.xp6(4),e.hij(" ",t.mapService.currentVehicleData.deviceimeino||"N/A"," "),e.xp6(4),e.hij(" ",t.mapService.currentVehicleData.pollingdatatime||"N/A"," "),e.xp6(4),e.hij(" ",t.mapService.currentVehicleData.todaydistance||"0"," km "),e.xp6(4),e.Q6J("ngClass",e.WLB(8,Ue,+t.mapService.currentVehicleData.speed<=40,+t.mapService.currentVehicleData.speed>40)),e.xp6(1),e.hij(" ",t.mapService.currentVehicleData.speed||"0"," km/h "),e.xp6(1),e.Q6J("ngIf","off"==t.mapService.currentVehicleData.ignitionstatus.toLowerCase()),e.xp6(1),e.Q6J("ngIf","on"==t.mapService.currentVehicleData.ignitionstatus.toLowerCase()),e.xp6(4),e.hij(" ",t.mapService.currentVehicleData.location||"N/A"," ")}}function Bi(n,a){1&n&&e._UZ(0,"img",125)}function Gi(n,a){1&n&&e._UZ(0,"img",126)}function Wi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",143),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).playHistoryAnimation()}),e._UZ(1,"i",144),e.qZA()}}function Ki(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",145),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).pauseHistoryAnimation()}),e._UZ(1,"i",146),e.qZA()}}function Xi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",147),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).stopHistoryAnimation()}),e._UZ(1,"i",148),e.qZA()}}function er(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"p",121)(2,"strong"),e._uU(3,"\u{1f4f1} IMEI:"),e.qZA(),e._uU(4),e.qZA(),e.TgZ(5,"p",121)(6,"strong"),e._uU(7,"\u{1f550} Time:"),e.qZA(),e._uU(8),e.qZA(),e.TgZ(9,"p",121)(10,"strong"),e._uU(11,"\u{1f4cf} Distance:"),e.qZA(),e._uU(12),e.qZA(),e.TgZ(13,"p",121)(14,"strong"),e._uU(15,"\u26a1 Speed:"),e.qZA(),e.TgZ(16,"span",24),e._uU(17),e.qZA(),e.YNc(18,Bi,1,0,"img",122),e.YNc(19,Gi,1,0,"img",123),e.qZA(),e.TgZ(20,"p",127)(21,"strong"),e._uU(22,"\u{1f4cd} Location:"),e.qZA(),e._uU(23),e.qZA(),e.TgZ(24,"div",128)(25,"button",129),e.NdJ("click",function(){return e.CHM(t),e.oxw().restartHistoryAnimation()}),e._UZ(26,"i",130),e._uU(27," Start "),e.qZA(),e.YNc(28,Wi,2,0,"button",131),e.YNc(29,Ki,2,0,"button",132),e.YNc(30,Xi,2,0,"button",133),e.qZA(),e.TgZ(31,"div",134)(32,"label",135),e._UZ(33,"i",136),e._uU(34," Animation Speed "),e.qZA(),e.TgZ(35,"input",137),e.NdJ("change",function(i){return e.CHM(t),e.oxw().changeHistoryAnimationSpeed(i)})("ngModelChange",function(i){return e.CHM(t),e.oxw().mapService.animationSpeed=i}),e.qZA(),e.TgZ(36,"small",138),e._uU(37),e.qZA()(),e.TgZ(38,"div",139)(39,"input",140),e.NdJ("ngModelChange",function(i){return e.CHM(t),e.oxw().saveRouteRequest.geomname=i}),e.qZA(),e.TgZ(40,"button",141),e.NdJ("click",function(){return e.CHM(t),e.oxw().saveRoute()}),e._UZ(41,"i",142),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(4),e.hij(" ",t.mapService.filteredHistoryData[0].deviceimeino||"N/A"," "),e.xp6(4),e.hij(" ",(null==t.mapService.filteredHistoryData[t.mapService.historyCurrentIndex]?null:t.mapService.filteredHistoryData[t.mapService.historyCurrentIndex].pollingdatatime)||"N/A"," "),e.xp6(4),e.hij(" ",(null==t.mapService.filteredHistoryData[t.mapService.historyCurrentIndex]?null:t.mapService.filteredHistoryData[t.mapService.historyCurrentIndex].commutedistance)||"0"," km "),e.xp6(4),e.Q6J("ngClass",e.WLB(14,Ue,+((null==t.mapService.filteredHistoryData[t.mapService.historyCurrentIndex]?null:t.mapService.filteredHistoryData[t.mapService.historyCurrentIndex].speed)||0)<=40,+((null==t.mapService.filteredHistoryData[t.mapService.historyCurrentIndex]?null:t.mapService.filteredHistoryData[t.mapService.historyCurrentIndex].speed)||0)>40)),e.xp6(1),e.hij(" ",(null==t.mapService.filteredHistoryData[t.mapService.historyCurrentIndex]?null:t.mapService.filteredHistoryData[t.mapService.historyCurrentIndex].speed)||"0"," km/h "),e.xp6(1),e.Q6J("ngIf","off"==(null==t.mapService.filteredHistoryData[t.mapService.historyCurrentIndex]||null==t.mapService.filteredHistoryData[t.mapService.historyCurrentIndex].ignitionstatus?null:t.mapService.filteredHistoryData[t.mapService.historyCurrentIndex].ignitionstatus.toLowerCase())),e.xp6(1),e.Q6J("ngIf","on"==(null==t.mapService.filteredHistoryData[t.mapService.historyCurrentIndex]||null==t.mapService.filteredHistoryData[t.mapService.historyCurrentIndex].ignitionstatus?null:t.mapService.filteredHistoryData[t.mapService.historyCurrentIndex].ignitionstatus.toLowerCase())),e.xp6(4),e.hij(" ",(null==t.mapService.filteredHistoryData[t.mapService.historyCurrentIndex]?null:t.mapService.filteredHistoryData[t.mapService.historyCurrentIndex].location)||"N/A"," "),e.xp6(5),e.Q6J("ngIf","playing"!=t.mapService.animationStatus&&"paused"==t.mapService.animationStatus),e.xp6(1),e.Q6J("ngIf","playing"==t.mapService.animationStatus),e.xp6(1),e.Q6J("ngIf","stopped"!=t.mapService.animationStatus),e.xp6(
15),e.Q6J("ngModel",t.mapService.animationSpeed),e.xp6(2),e.hij("",t.mapService.animationSpeed,"ms"),e.xp6(2),e.Q6J("ngModel",t.saveRouteRequest.geomname)}}const K=function(n){return{display:n}},tr=function(n,a){return{"col-md-5":n,"col-md-2":a}};let or=(()=>{class n{constructor(t,o,i,r,s,l,d,m,_){this.cv=t,this.cs=o,this.loader=i,this.route=r,this.es=s,this.listService=l,this.datePipe=d,this.mapService=m,this.apiService=_,this.dateObj="",this.formsection=!0,this.loadersection=!1,this.detailsection=!1,this.loginRoleId=sessionStorage.getItem("loginroleid"),this.reportFormRequest=new Ze,this.detailData=[],this.pageHeading="Distance Travel Report",this.busNumber="",this.dateRange="",this.allVehicleObject={id:"",name:"All"},this.selectedBusList=[],this.roleList=[],this.customerTypeName="",this.customerList=[],this.saveRouteRequest=new h.Ku,this.sortDir=1,this.mapVehicleDetails=new Ee}ngOnInit(){var t=this;return(0,u.Z)(function*(){$(()=>{$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"})}),t.getDate(),t.vehicleList=yield t.listService.getVehicleList(new h.nO)})()}getRoleList(){var t=this;return(0,u.Z)(function*(){t.roleList=[],t.roleList=yield t.listService.getRoleList(new h.nO),t.roleList.push({id:"3",name:"vehicle"}),t.roleList=t.roleList.filter(o=>"school"==o.name||"customer"==o.name||"vehicle"==o.name)})()}getCustomerList(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;o.filter1=t.roleTypeObj.id,t.customerList=yield t.listService.getCustomerList(o)})()}onChangeCustomerList(){var t=this;return(0,u.Z)(function*(){t.busNoObj=null,t.vehicleList=[];let o=new h.nO;"school"==t.customerTypeName?o.filter1=t.customerNameObj.id:o.filter2=t.customerNameObj.id,t.vehicleList=yield t.listService.getVehicleList(o)})()}getVehicleList(){var t=this;return(0,u.Z)(function*(){t.vehicleList=yield t.listService.getVehicleList(new h.nO)})()}getDate(){$(()=>{$('input[name="date"]').daterangepicker({showDropdowns:!0,startDate:p().startOf("day").format("DD-MMM-YYYY"),endDate:p().endOf("day").format("DD-MMM-YYYY"),opens:"center",drops:"down",maxSpan:{days:30},locale:{format:"DD-MMM-YYYY"},maxDate:new Date,minYear:2022,maxYear:parseInt(p().format("YYYY"),10),function(t,o){$("#datepicker").html(t.format("DD-MMM-YYYY")+" : "+o.format("DD-MMM-YYYY"))}}),$('input[name="date"]').on("hide.daterangepicker",(t,o)=>{try{this.dateObj=t.target.value}catch(i){}}),this.dateObj=document.getElementById("datepicker").value})}onChangeSchool(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;o.schoolid=t.schoolObj.id,t.vehicleList=yield t.listService.getVehicleList(o)})()}checkAllBus(){this.busNumber="All"==this.busNoObj.name?"":this.busNoObj.name}validateForm(){if(this.reportForm.valid){this.schoolName=this.schoolObj?this.schoolObj.name:"",this.busNoObj&&(this.customerName=this.busNoObj.customername,this.reportFormRequest.vehicleid=this.busNoObj?this.busNoObj.id:"",this.reportFormRequest.vehicleno=this.busNoObj?this.busNoObj.name:"");let t=this.dateObj.split(" - ");this.reportFormRequest.fromdate=t[0],this.reportFormRequest.todate=t[1],this.reportFormRequest.instancetime=Number(this.interval),"timeduration"==this.filterForObj?(this.reportFormRequest.fromtime=document.getElementById("fromtime").value.replace(" ","").replace(" ",""),this.reportFormRequest.totime=document.getElementById("totime").value.replace(" ","").replace(" ",""),this.reportFormRequest.fromtime=p(this.reportFormRequest.fromtime,["h:mm A"]).format("hh:mm:ss A"),this.reportFormRequest.totime=p(this.reportFormRequest.totime,["h:mm A"]).format("hh:mm:ss A"),this.dateRange=this.reportFormRequest.fromdate+" "+this.reportFormRequest.fromtime+" To "+this.reportFormRequest.todate+" "+this.reportFormRequest.totime):(this.reportFormRequest.fromdate=t[0],this.reportFormRequest.todate=t[1],this.reportFormRequest.fromtime="00:00:00 AM",this.reportFormRequest.totime="11:59:59 PM",this.dateRange=this.reportFormRequest.fromdate+" "+this.reportFormRequest.fromtime+" To "+this.reportFormRequest.todate+" "+this.reportFormRequest.totime),this.details("refresh")}}details(t){var o=this;return(0,u.Z)(function*(){"showrow"==t&&(o.reportFormRequest.pageno=1),"search"==t&&(o.reportFormRequest.pageno=1),"refresh"==t&&(o.reportFormRequest.searchby="",o.reportFormRequest.pageno=1,o.reportFormRequest.itemperpage=10),o.reportFormRequest.searchby=o.reportFormRequest.searchby.trim(),o.loadersection=!0;try{o.loader.loaderOn()}catch(r){}o.reportFormRequest.vehicleid=o.busNoObj.id;let i=yield o.apiService.distance_on_arrival(o.reportFormRequest);o.formsection=!1,o.detailsection=!0;try{o.loader.loaderOff()}catch(r){}"200"==i.statusCode?(o.formsection=!1,o.loadersection=!1,o.detailsection=!0,o.detailData=i.entity.distancetraveldetails,o.customerName=i.entity.customername,o.totalDistance=i.entity.totalcommuteddistance,o.totalCount=+i.entity.totalrecord,o.recordFrom=o.detailData[0].rowno,o.recordTo=o.detailData[o.detailData.length-1].rowno):(o.detailData=[],o.recordTo=0,o.recordFrom=0,o.totalCount=0,o.reportFormRequest.searchby="",o.formsection=!1,o.loadersection=!1,o.detailsection=!0),o.es.pageDataInfo("",o.reportFormRequest,"Distance On Arrival Report","details method","Called Function",i.message)})()}redirectToForm(){var t=this;return(0,u.Z)(function*(){t.formsection=!0,t.loadersection=!1,t.detailsection=!1,t.getDate(),$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"}),yield t.getRoleList(),"101"==t.loginRoleId||"600"==t.loginRoleId?yield t.getRoleList():t.vehicleList=yield t.listService.getVehicleList(new h.nO)})()}ResetForm(){this.reportForm.resetForm(),this.formsection=!0,this.loadersection=!1,this.detailsection=!1,this.getDate(),setTimeout(()=>{$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"})},1500),this.getRoleList(),this.schoolObj=null,this.busNoObj=null,this.vehicleList=[]}sorting(t,o){try{let r=t.currentTarget.childNodes[1].classList;try{r.contains("fa-sort-amount-desc")?(r.remove("fa-sort-amount-desc"),r.add("fa-sort-amount-asc")):(r.remove("fa-sort-amount-asc"),r.add("fa-sort-amount-desc"))}catch(s){console.log("e "+s)}this.sortDir=1==this.sortDir?-1:1;try{this.detailData.length>0&&this.detailData.sort((s,l)=>(s=s[o].toLowerCase(),l=l[o].toLowerCase(),s.localeCompare(l)*this.sortDir))}catch(s){console.log("e "+s)}}catch(i){}}trackVehicle(t){var o=this;return(0,u.Z)(function*(){o.mapVehicleDetails=t,o.loadersection=!1,$("#exampleModal").modal("show"),setTimeout((0,u.Z)(function*(){o.mapService.initMap();let i=new y.rn;i.vehicleid=o.busNoObj.id,i.imeino=o.busNoObj.imeino,i.fromdate=o.datePipe.transform(t.startdate,"dd-MMM-yyyy"),i.fromtime=o.datePipe.transform(t.startdate,"hh:mm:ss a"),i.todate=o.datePipe.transform(t.enddate,"dd-MMM-yyyy"),i.totime=o.datePipe.transform(t.enddate,"hh:mm:ss a");const r=new y.Us;r.vehicleno=o.busNoObj.name||"",r.deviceimeino=o.busNoObj.imeino||"",r.vehicleid=o.busNoObj.id||"",r.drivername=o.busNoObj.drivername||"",r.drivermobileno=o.busNoObj.drivermobileno||"",yield o.mapService.trackHistoryVehicle(i.imeino,i.fromdate,i.fromtime,i.todate,i.totime,i.vehicleid,r),o.loadersection=!1}),300)})()}downloadDoc(t){let o=new Ze;o.pdfexcel=t,o.itemperpage="",o.pageno="",o.vehicleid=this.reportFormRequest.vehicleid,o.vehicleno=this.reportFormRequest.vehicleno,o.fromdate=this.reportFormRequest.fromdate,o.todate=this.reportFormRequest.todate,o.fromtime=this.reportFormRequest.fromtime,o.totime=this.reportFormRequest.totime;try{this.loader.loaderOn()}catch(i){}this.es.apiCall(o,"distanceonarrival").subscribe(i=>{try{this.loader.loaderOff()}catch(r){}"200"==i.statusCode&&(this.filePath=i.message,this.es.commonFileDownload(this.filePath)),o.pdfexcel="",this.es.pageDataInfo("",o,"Distance On Arrival Report","Download Excel/PDF method","Called Function",i.message)})}saveRoute(){var t=this;return(0,u.Z)(function*(){let i={type:"Feature",geometry:{type:"LineString",coordinates:t.mapService.filteredHistoryData.map(s=>[+s.longitude,+s.latitude])}};t.saveRouteRequest.geomtypeid="222",t.saveRouteRequest.routecolor="#000000",t.saveRouteRequest.geomjson=JSON.stringify(i),t.loader.loaderOn();let r=yield t.apiService.insertgeom(t.saveRouteRequest);t.loader.loaderOff(),t.loader.responseMessage=r.entity,"200"==r.statusCode?(t.loader.successNotification(),t.saveRouteRequest=new h.Ku):t.loader.failedNotification()})()}playHistoryAnimation(){"stopped"===this.mapService.animationStatus?this.mapService.startHistoryAnimation():"paused"===this.mapService.animationStatus&&this.mapService.resumeHistoryAnimation()}pauseHistoryAnimation(){this.mapService.pauseHistoryAnimation()}stopHistoryAnimation(){this.mapService.stopHistoryAnimation()}restartHistoryAnimation(){this.mapService.restartHistoryAnimation()}changeHistoryAnimationSpeed(t){const o=parseInt(t.target.value);this.mapService.setAnimationSpeed(o)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(S.R),e.Y36(U.v),e.Y36(N.D),e.Y36(M.F0),e.Y36(F.P),e.Y36(D.X),e.Y36(g.uU),e.Y36(Me),e.Y36(z.s))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-distance-on-arrival"]],viewQuery:function(t,o){if(1&t&&(e.Gf(Ci,5),e.Gf(ce,5)),2&t){let i;e.iGM(i=e.CRH())&&(o.reportForm=i.first),e.iGM(i=e.CRH())&&(o.reportMapComponent=i.first)}},decls:172,vars:56,consts:[[1,"container-fluid","report-form-container"],[1,"reportheader"],["aria-hidden","true",1,"fa","fa-credit-card"],[1,"rptheadertext"],[1,"row","mt-4",3,"ngStyle"],[1,"col-md-12"],["novalidate","","id","form_id","autocomplete","off",1,"needs-validation"],["reportForm","ngForm"],[1,"row"],[1,"col-md-2"],[1,"form-group"],[1,"mb-0","label"],[1,"starvalid"],["name","vehicleNumber","placeholder","Select Vehicle","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["busNoCtrl","ngModel"],[3,"value",4,"ngFor","ngForOf"],["class","form-control-feedback text-danger",4,"ngIf"],[1,"text-danger"],["name","filterfor","placeholder","Select Filter","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange"],["filterForCtrl","ngModel"],["value","wholeday"],["value","timeduration"],["class","form-control-feedback text-danger text-danger",4,"ngIf"],["class","col-md-2",4,"ngIf"],[3,"ngClass"],[1,"d-flex","justify-content-between"],[1,"report-label","mb-0"],["type","text","name","date","id","datepicker","required","","placeholder","Select Date",1,"form-control","form-control-sm",2,"padding","4px","width","190px"],[3,"ngStyle"],[1,"form-group","mb-0",2,"width","85px","float","left"],[1,"mb-0"],["type","text","name","timepicker","id","fromtime",1,"p-0","fromTime","form-control","form-control-sm","text-center"],[1,"form-group",2,"width","85px","float","left"],["type","text","name","timepicker","id","totime",1,"p-0","toTime","form-control","form-control-sm","text-center"],[1,"col","mt-3","text-end","float-end"],[1,"d-flex","justify-content-end"],["type","submit",1,"custom-btn","btn-13","Show","mb-3",3,"click"],["type","button",1,"custom-btn","btn-10","mr-2",3,"click"],[1,"report-form-container"],[1,"grid-section",3,"ngStyle"],[1,"p-2","report-summary","row","
1justify-content-between",2,"margin","1px 1px"],[1,"col-md-7"],[1,"fw-bolder","text-small","text-uppercase","outputlabel"],[1,"text-uppercase","text-small","outputlabel"],[1,"col-md-1"],["ngbTooltip","Back",1,"float-end","backbtnbackground",3,"click"],["aria-hidden","true",1,"fa","fa-arrow-circle-o-left","outputlabel"],[1,"col-md-12","px-0"],[1,"table-head","d-flex","justify-content-between"],["id","tickets-table_info","role","status","aria-live","polite",1,"col-auto","mt-2","text-center","fw-bold","total-record-label"],[4,"ngIf"],[1,"mt-1"],[1,"itemsperpage-style",2,"margin-right","10px"],[1,"d-inline-flex","align-items-center"],["name","table_length","aria-controls","table","name","pageSize",3,"ngModel","ngModelChange","change"],["value","10","selected",""],["value","20",4,"ngIf"],["value","50",4,"ngIf"],["value","100",4,"ngIf"],[3,"value",4,"ngIf"],["type","button",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"click"],["aria-hidden","true",1,"fa","fa-refresh"],["type","button","ngbTooltip","Download Pdf","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-pdf-o","pdf-btn"],["type","button","ngbTooltip","Download Excel","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-excel-o","excel-btn"],["type","text","name","searchTerm","autocomplete","off","aria-controls","tickets-table","placeholder","Search here....","autocomplete","off",1,"form-control","form-control-sm","ms-2","searchinput",2,"width","165px",3,"ngModel","ngModelChange"],["type","button",1,"btn","search-btn",3,"click"],[1,"fa","fa-search"],[1,"scroll-tbl"],[1,"table","table-striped","table-style",2,"overflow-y","auto","overflow-x","auto"],[1,"text-center",2,"width","40px",3,"click"],[1,"fa","fa-sort-amount-desc"],[1,"text-center",3,"click"],[1,"text-center",2,"width","110px",3,"click"],[1,"text-end",2,"width","110px",3,"click"],[1,"fa","fa-map-marker",2,"font-size","10px"],[1,"row","justify-content-md-between","align-items-md-center","mt-2"],["class","float-end text-start",4,"ngIf"],["id","exampleModal","tabindex","-1","aria-labelledby","exampleModalLabel","data-bs-backdrop","static","data-bs-keyboard","false","aria-hidden","true",1,"modal","fade","p-0"],[1,"modal-dialog","modal
1-xl"],[1,"modal-content","ani"],[1,"modal-header",2,"background-color","#014b5b !important","color","white"],["id","exampleModalLabel",1,"modal-title",2,"font-size","13px"],["type","button","data-bs-dismiss","modal","aria-label","Close",3,"click"],["aria-hidden","true",1,"fa","fa-times","text-danger"],[1,"modal-body","p-0"],[1,"modal-loader-container",2,"width","100%","height","465px","position","relative"],["id","reportTrackingMap",2,"height","71vh","width","100%","position","relative","z-index","1"],[1,"current-vehicle-section"],["id","accordionExample",1,"accordion",3,"ngStyle"],[1,"accordion-item"],["id","headingOne",1,"accordion-header"],["type","button","data-bs-toggle","collapse","data-bs-target","#collapseOne","aria-expanded","true","aria-controls","collapseOne",1,"accordion-button","p-1","fw-bold","text-white","small",2,"background","#00366b","font-size","12px"],[1,"fa","fa-car","me-1"],["id","collapseOne","aria-labelledby","headingOne","data-bs-parent","#accordionExample",1,"accordion-collapse","collapse","show"],[1,"accordion-body","p-2","small"],[3,"value"],[1,"form-control-feedback","text-danger"],["class","text-small","style"," font-size: 10px;",4,"ngIf"],[1,"text-small",2,"font-size","10px"],[1,"form-control-feedback","text-danger","text-danger"],["class","text-small",4,"ngIf"],[1,"text-small"],[1,"mb-0","text-capitalize"],["name","customertype","required","",1,"text-capitalize",3,"ngClass","ngModel","multiple","placeholder","closeOnSelect","ngModelChange","change"],["customerNameCtrl","ngModel"],[1,"customerNameForSummary"],["value","20"],["value","50"],["value","100"],["colspan","9"],[1,"text-center"],[4,"ngFor","ngForOf"],[1,"text-center","fw-bolder",2,"color","#e90a3a"],[1,"text-center","fw-bolder",2,"color","#33443d"],[1,"text-center","fw-bolder",2,"color","#02ad66"],[1,"text-center","fw-bolder",2,"color","#d7ae00"],["title","Track Vehicle Distance","data-bs-toggle","modal","data-bs-target","#exampleModal",1,"btn","btn-sm","btn-dark","p-1",3,"click"],[1,"float-end","text-start"],["size","sm",1,"d-flex","mt-2","justify-content-end","pagination-rounded","pagination","pagination-info",3,"collectionSize","page","maxSize","pageSize","pageChange"],[1,"small","m-0","mb-1"],["src","assets/school-management/images/poweroff.png","style","width: 16px;height: 16px; margin-left: 5px;",4,"ngIf"],["src","assets/school-management/images/poweron.png","style","width: 16px;height: 16px; margin-left: 5px;",4,"ngIf"],[1,"small","m-0"],["src","assets/school-management/images/poweroff.png",2,"width","16px","height","16px","margin-left","5px"],["src","assets/school-management/images/poweron.png",2,"width","16px","height","16px","margin-left","5px"],[1,"small","m-0","mb-2"],["role","group",1,"btn-group","w-100","mb-2"],["type","button","ngbTooltip","Start Animation",1,"btn","btn-sm","btn-outline-primary","py-1",3,"click"],[1,"fa","fa-play-circle"],["type","button","class","btn btn-sm btn-outline-primary py-1","ngbTooltip","Play",3,"click",4,"ngIf"],["type","button","class","btn btn-sm btn-outline-primary py-1","ngbTooltip","Pause",3,"click",4,"ngIf"],["type","button","class","btn btn-sm btn-outline-primary py-1","ngbTooltip","Stop",3,"click",4,"ngIf"],[1,"mb-2"],[1,"form-label","small","mb-1"],[1,"fa","fa-tachometer"],["type","range","min","500","max","3000","step","100",1,"form-range",3,"ngModel","change","ngModelChange"],[1,"text-muted"],[1,"input-group","input-group-sm"],["type","text","placeholder","Route Name",1,"form-control","form-control-sm",3,"ngModel","ngModelChange"],["type","button","ngbTooltip","Save Route",1,"btn","btn-sm","btn-success",3,"click"],[1,"fa","fa-save"],["type","button","ngbTooltip","Play",1,"btn","btn-sm","btn-outline-primary","py-1",3,"click"],[1,"fa","fa-play"],["type","button","ngbTooltip","Pause",1,"btn","btn-sm","btn-outline-primary","py-1",3,"click"],[1,"fa","fa-pause"],["type","button","ngbTooltip","Stop",1,"btn","btn-sm","btn-outline-primary","py-1",3,"click"],[1,"fa","fa-stop"]],template:function(t,o){if(1&t&&(e.TgZ(0,"div",0)(1,"div")(2,"h5",1),e._UZ(3,"i",2),e._uU(4,"\xa0\xa0\xa0"),e.TgZ(5,"span",3),e._uU(6,"Distance Travel Report"),e.qZA()()(),e.TgZ(7,"div",4)(8,"div",5)(9,"form",6,7)(11,"div",8)(12,"div",9)(13,"div",10)(14,"label",11),e._uU(15,"Vehicle Number "),e.TgZ(16,"span",12),e._uU(17,"*"),e.qZA()(),e.TgZ(18,"ng-select",13,14),e.NdJ("ngModelChange",function(r){return o.busNoObj=r})("change",function(){return o.checkAllBus()}),e.YNc(20,Ai,2,2,"ng-option",15),e.qZA(),e.YNc(21,Oi,2,1,"span",16),e.qZA()(),e.TgZ(22,"div",9)(23,"div",10)(24,"label",11),e._uU(25,"Filter For"),e.TgZ(26,"span",17),e._uU(27,"*"),e.qZA()(),e.TgZ(28,"ng-select",18,19),e.NdJ("ngModelChange",function(r){return o.filterForObj=r}),e.TgZ(30,"ng-option",20),e._uU(31,"Whole Day"),e.qZA(),e.TgZ(32,"ng-option",21),e._uU(33,"Time Duration"),e.qZA()(),e.YNc(34,ki,2,1,"span",22),e.qZA()(),e.YNc(35,Fi,10,11,"div",23),e.TgZ(36,"div",24)(37,"div",25)(38,"div",10)(39,"label",26),e._uU(40,"Date :"),e.qZA(),e._UZ(41,"input",27),e.qZA(),e.TgZ(42,"div",28)(43,"div",29)(44,"label",30),e._uU(45,"Time "),e.qZA(),e._UZ(46,"input",31),e.qZA(),e._uU(47," \xa0\xa0\xa0 "),e.TgZ(48,"div",32),e._UZ(49,"label",30)(50,"input",33),e.qZA()()()(),e.TgZ(51,"div",34)(52,"div",35)(53,"div")(54,"button",36),e.NdJ("click",function(){return o.validateForm()}),e._uU(55,"Generate"),e.qZA(),e._uU(56," \xa0 "),e.qZA(),e.TgZ(57,"div")(58,"button",37),e.NdJ("click",function(){return o.ResetForm()}),e._uU(59,"Reset"),e.qZA()()()()()()()()(),e.TgZ(60,"div",38)(61,"div",39)(62,"div",40),e.YNc(63,Si,8,2,"div",23),e.TgZ(64,"div",41)(65,"div",25)(66,"div")(67,"span",42),e._uU(68,"Date :"),e.qZA(),e.TgZ(69,"span",43),e._uU(70),e.qZA()()()(),e.TgZ(71,"div",44)(72,"div")(73,"button",45),e.NdJ("click",function(){return o.redirectToForm()}),e._UZ(74,"i",46),e.qZA()()()(),e.TgZ(75,"div",47)(76,"div",48)(77,"div",49),e.YNc(78,Ui,2,3,"span",50),e.qZA(),e.TgZ(79,"div",51)(80,"span",52)(81,"label",53),e._uU(82,"Show "),e.TgZ(83,"select",54),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.itemperpage=r})("change",function(){return o.details("showrow")}
1),e.TgZ(84,"option",55),e._uU(85," 10"),e.qZA(),e.YNc(86,Di,2,0,"option",56),e.YNc(87,Ii,2,0,"option",57),e.YNc(88,Ji,2,0,"option",58),e.YNc(89,Li,2,2,"option",59),e.qZA(),e._uU(90," entries"),e.qZA()(),e.TgZ(91,"span")(92,"button",60),e.NdJ("click",function(){return o.details("refresh")}),e._UZ(93,"i",61),e.qZA()(),e.TgZ(94,"span")(95,"button",62),e.NdJ("click",function(){return o.downloadDoc("pdf")}),e._UZ(96,"i",63),e.qZA(),e.TgZ(97,"button",64),e.NdJ("click",function(){return o.downloadDoc("excel")}),e._UZ(98,"i",65),e.qZA()(),e.TgZ(99,"label")(100,"input",66),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.searchby=r}),e.qZA()(),e.TgZ(101,"button",67),e.NdJ("click",function(){return o.details("search")}),e._UZ(102,"span",68),e.qZA()()(),e.TgZ(103,"div",69)(104,"table",70)(105,"thead")(106,"tr")(107,"th",71),e.NdJ("click",function(r){return o.sorting(r,"rowno")}),e._uU(108,"#"),e._UZ(109,"i",72),e.qZA(),e.TgZ(110,"th",73),e.NdJ("click",function(r){return o.sorting(r,"vehicleno")}),e.YNc(111,Yi,2,0,"span",50),e._UZ(112,"br"),e.TgZ(113,"small"),e._uU(114,"Total Distance(km)"),e.qZA(),e._UZ(115,"i",72),e.qZA(),e.TgZ(116,"th",74),e.NdJ("click",function(r){return o.sorting(r,"startdate")}),e._uU(117," Date "),e._UZ(118,"i",72),e.qZA(),e.TgZ(119,"th",74),e.NdJ("click",function(r){return o.sorting(r,"duration")}),e._uU(120,"Time-Range "),e._UZ(121,"i",72),e.qZA(),e.TgZ(122,"th",75),e.NdJ("click",function(r){return o.sorting(r,"maxspeed")}),e._uU(123,"Max Speed (Km/hr) "),e._UZ(124,"i",72),e.qZA(),e.TgZ(125,"th",74),e.NdJ("click",function(r){return o.sorting(r,"distance")}),e._uU(126,"Distance "),e.TgZ(127,"small"),e._uU(128,"(Km)"),e.qZA()(),e.TgZ(129,"th",74),e.NdJ("click",function(r){return o.sorting(r,"stoppagetime")}),e._uU(130," Stoppage "),e.TgZ(131,"small"),e._uU(132,"(hh:mm)"),e.qZA()(),e.TgZ(133,"th",74),e.NdJ("click",function(r){return o.sorting(r,"runningtime")}),e._uU(134," Running "),e.TgZ(135,"small"),e._uU(136,"(hh:mm)"),e.qZA()(),e.TgZ(137,"th",74),e.NdJ("click",function(r){return o.sorting(r,"idletime")}),e._uU(138,"Idle "),e.TgZ(139,"small"),e._uU(140,"(hh:mm)"),e.qZA()(),e.TgZ(141,"th"),e._UZ(142,"i",76),e.qZA()()(),e.YNc(143,ji,5,0,"tbody",50),e.YNc(144,Vi,2,1,"tbody",50),e.qZA()(),e.TgZ(145,"div",77),e.YNc(146,Ei,2,4,"div",78),e.qZA()()()(),e.TgZ(147,"div",79)(148,"div",80)(149,"div",81)(150,"div",82)(151,"h4",83)(152,"u"),e._uU(153," Distance Travelled Summary"),e.qZA(),e._uU(154),e.qZA(),e.TgZ(155,"button",84),e.NdJ("click",function(){return o.mapService.clearAllLayers()}),e._UZ(156,"i",85),e.qZA()(),e.TgZ(157,"div",86)(158,"div",87),e._UZ(159,"div",88),e.TgZ(160,"div",89)(161,"div",90)(162,"div",91)(163,"h2",92)(164,"button",93),e._UZ(165,"i",94),e._uU(166),e.ALo(167,"uppercase"),e.qZA()(),e.TgZ(168,"div",95)(169,"div",96),e.YNc(170,$i,24,11,"div",50),e.YNc(171,er,42,17,"div",50),e.qZA()()()()()()()()()()),2&t){const i=e.MAs(10),r=e.MAs(19),s=e.MAs(29);e.xp6(7),e.Q6J("ngStyle",e.VKq(39,K,o.formsection?"":"none")),e.xp6(11),e.Q6J("ngClass",e.WLB(41,pe,r.valid,r.invalid&&i.submitted))("ngModel",o.busNoObj)("multiple",!1)("closeOnSelect",!1)("closeOnSelect",!1),e.xp6(2),e.Q6J("ngForOf",o.vehicleList),e.xp6(1),e.Q6J("ngIf",r.errors&&(r.dirty||r.touched||i.submitted)),e.xp6(7),e.Q6J("ngClass",e.WLB(44,pe,s.valid,s.invalid&&i.submitted))("ngModel",o.filterForObj)("multiple",!1)("closeOnSelect",!0),e.xp6(6),e.Q6J("ngIf",s.errors&&(s.dirty||s.touched||i.submitted)),e.xp6(1),e.Q6J("ngIf",("100"==o.loginRoleId||"600"==o.loginRoleId)&&"school"==o.customerTypeName||"customer"==o.customerTypeName),e.xp6(1),e.Q6J("ngClass",e.WLB(47,tr,"timeduration"==o.filterForObj,"timeduration"!=o.filterForObj)),e.xp6(6),e.Q6J("ngStyle",e.VKq(50,K,"timeduration"==o.filterForObj?"":"none")),e.xp6(19),e.Q6J("ngStyle",e.VKq(52,K,o.detailsection?"":"none")),e.xp6(2),e.Q6J("ngIf",""!=o.busNumber),e.xp6(7),e.hij(" ",o.dateRange,""),e.xp6(8),e.Q6J("ngIf",0!=o.totalCount),e.xp6(5),e.Q6J("ngModel",o.reportFormRequest.itemperpage),e.xp6(3),e.Q6J("ngIf",o.totalCount>20),e.xp6(1),e.Q6J("ngIf",o.totalCount>50),e.xp6(1),e.Q6J("ngIf",o.totalCount>100),e.xp6(1),e.Q6J("ngIf",o.totalCount<100&&o.totalCount>10),e.xp6(6),e.Q6J("disabled",0==o.totalCount),e.xp6(2),e.Q6J("disabled",0==o.totalCount),e.xp6(3),e.Q6J("ngModel",o.reportFormRequest.searchby),e.xp6(11),e.Q6J("ngIf",""==o.busNumber),e.xp6(32),e.Q6J("ngIf",0==o.totalCount),e.xp6(1),e.Q6J("ngIf",0!=o.totalCount),e.xp6(2),e.Q6J("ngIf",o.totalCount>o.reportFormRequest.itemperpage),e.xp6(8),e.hij("\xa0\xa0of\xa0\xa0\xa0",o.busNumber," "),e.xp6(7),e.Q6J("ngStyle",e.VKq(54,K,o.mapService.currentVehicleData.vehicleno||o.mapService.filteredHistoryData.length>
10?"":"none")),e.xp6(5),e.hij(" ",e.lcZ(167,37,o.mapService.currentVehicleData.vehicleno||(o.mapService.filteredHistoryData.length>0?o.mapService.filteredHistoryData[0].vehicleno:""))," "),e.xp6(4),e.Q6J("ngIf",o.mapService.currentVehicleData.vehicleno&&0==o.mapService.filteredHistoryData.length),e.xp6(1),e.Q6J("ngIf",o.mapService.filteredHistoryData.length>0)}},directives:[g.PC,c._Y,c.JL,c.F,A.w9,c.Q7,g.mk,c.JJ,c.On,g.sg,A.xv,g.O5,C._L,c.EJ,c.YN,c.Kr,c.Fj,C.N9,c.eT],pipes:[g.gd],styles:[".ng-select.ng-select-single .ng-select-container .ng-value-container{font-size:12px!important} .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{font-size:12px!important;text-transform:capitalize}ng-select.ng-select-single[_ngcontent-%COMP%] .ng-select-container{min-height:26px;max-height:26px;height:26px}.form-control[_ngcontent-%COMP%]{height:calc(1.45rem + 2px)}.invalid-feedback[_ngcontent-%COMP%]{font-size:11px;color:#dc3545}input[_ngcontent-%COMP%]{font-size:12px}.starvalid[_ngcontent-%COMP%]{color:#ff0040!important}.validationmsg[_ngcontent-%COMP%]{--bs-text-opacity: 1;color:#ff0040!important;font-weight:600}.media[_ngcontent-%COMP%]{height:110px}.p-32[_ngcontent-%COMP%]{padding:32px}.title-line[_ngcontent-%COMP%]{height:24px;width:100%;margin-bottom:12px;border-radius:20px}.content-line[_ngcontent-%COMP%]{height:8px;width:100%;margin-bottom:16px;border-radius:8px}.end[_ngcontent-%COMP%]{width:40%}.m-t-24[_ngcontent-%COMP%]{margin-top:24px}.mapdiv[_ngcontent-%COMP%]{height:calc(100dvh - 150px);width:100%;min-height:300px;position:relative}.map-section[_ngcontent-%COMP%]{position:absolute;top:9%;left:10px;z-index:999;width:31%}.vehicle-panel[_ngcontent-%COMP%]{background:rgba(255,255,255,.98)!important;box-shadow:0 4px 12px #0003;border-radius:6px;max-width:400px}.toggle-panel-btn[_ngcontent-%COMP%]{box-shadow:0 2px 6px #00000026;font-weight:600}.liveheader[_ngcontent-%COMP%]{color:#0100ca}.srnotd[_ngcontent-%COMP%]{background-color:#809b92}.current-vehicle-section[_ngcontent-%COMP%]{position:absolute;bottom:0;right:0;width:280px;z-index:998}.current-vehicle-section[_ngcontent-%COMP%] .accordion-item[_ngcontent-%COMP%]{background:rgba(255,255,255,.98);box-shadow:0 4px 12px #0003;border-radius:6px 6px 0 0}.map-icon[_ngcontent-%COMP%]{animation:rotate-animation 10s infinite linear}@keyframes rotate-animation{0%{transform:rotate(0)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}.direction-arrow[_ngcontent-%COMP%]{animation:pulse-arrow 2s ease-in-out infinite;filter:drop-shadow(0 2px 4px rgba(0,0,0,.3))}@keyframes pulse-arrow{0%,to{opacity:1;transform:scale(1)}50%{opacity:.7;transform:scale(1.1)}}.history-arrow[_ngcontent-%COMP%]{animation:slide-arrow 3s ease-in-out infinite}@keyframes slide-arrow{0%,to{opacity:.8}50%{opacity:1}}.leaflet-marker-icon[_ngcontent-%COMP%]{transition:all .5s cubic-bezier(.4,0,.2,1)!important}.vehicle-row[_ngcontent-%COMP%]:hover{background-color:#f8f9fa!important;cursor:pointer;transform:translate(2px);transition:all .2s ease}.vehicle-row[_ngcontent-%COMP%] .vehicle-name[_ngcontent-%COMP%]{transition:all .3s ease}.vehicle-row[_ngcontent-%COMP%]:hover .vehicle-name[_ngcontent-%COMP%]{box-shadow:0 2px 8px #00000026}.action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{transition:all .2s ease}.action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{transform:scale(1.05)}.history-selector-row[_ngcontent-%COMP%]{background-color:#f0f8ff!important;animation:slideDown .3s ease-out}@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.history-row[_ngcontent-%COMP%]{background-color:#f0f8ff!important;animation:slideDown .3s ease-out}.table_title[_ngcontent-%COMP%]{border-bottom:2px solid #ff701d} .ng-select.ng-select-single .ng-select-container .ng-value-container{font-size:12px!important} .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{font-size:12px!important;text-transform:capitalize}ng-select.ng-select-single[_ngcontent-%COMP%] .ng-select-container{min-height:26px;max-height:26px;height:26px}.form-control[_ngcontent-%COMP%]{height:calc(1.45rem + 2px)}.invalid-feedback[_ngcontent-%COMP%]{font-size:11px;color:#dc3545}input[_ngcontent-%COMP%]{font-size:12px}.starvalid[_ngcontent-%COMP%]{color:#ff0040!important}.validationmsg[_ngcontent-%COMP%]{--bs-text-opacity: 1;color:#ff0040!important;font-weight:600}.rotate[_ngcontent-%COMP%]{animation:rotation 2s;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(359deg)}}.green[_ngcontent-%COMP%]{color:green;font-weight:700}.stop[_ngcontent-%COMP%]{color:#00f;font-weight:700}.gray[_ngcontent-%COMP%]{color:gray;font-weight:700}.yellow[_ngcontent-%COMP%]{color:#ffae00;font-weight:700}.vehicle-list-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], .vehicle-list-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:12px}.vehicle-list-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{border:none!important}.vehicle-list-table[_ngcontent-%COMP%] .vehicle-row[_ngcontent-%COMP%]{border-bottom:1px solid #dee2e6}.vehicle-popup[_ngcontent-%COMP%]{font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;padding:8px;min-width:250px}.vehicle-popup[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{margin:0 0 8px;padding:4px 0;border-bottom:2px solid #007bff;color:#333;font-weight:600}.vehicle-popup[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:4px 0;font-size:12px;line-height:1.4}.vehicle-popup[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:#555;font-weight:600}.status-badge[_ngcontent-%COMP%]{display:inline-block;padding:2px 8px;border-radius:12px;font-size:11px;font-weight:600;text-transform:uppercase}.status-running[_ngcontent-%COMP%]{background-color:#28a745;color:#fff}.status-stop[_ngcontent-%COMP%]{background-color:#007bff;color:#fff}.status-idle[_ngcontent-%COMP%]{background-color:#ffc107;color:#333}.status-non-polling[_ngcontent-%COMP%]{background-color:#dc3545;color:#fff}#liveTrackingMap[_ngcontent-%COMP%]{z-index:1}.leaflet-marker-icon[_ngcontent-%COMP%]{transition:transform .3s ease-out!important}.leaflet-marker-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{transition:all 1s ease-in-out!important}.leaflet-container[_ngcontent-%COMP%]{font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif}.leaflet-popup-content-wrapper[_ngcontent-%COMP%]{border-radius:8px;box-shadow:0 4px 12px #00000026}.leaflet-popup-content[_ngcontent-%COMP%]{margin:0;padding:0}.leaflet-popup-tip[_ngcontent-%COMP%]{box-shadow:0 2px 4px #0000001a}.small-popup[_ngcontent-%COMP%]{font-size:11px;width:220px;padding:4px!important}.popup-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:11px}.popup-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-align:center;font-size:12px;padding:4px;background:#f1f1f1;border-bottom:1px solid #ccc}.popup-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:3px 4px;vertical-align:top;border-bottom:1px solid #eee}.status-badge[_ngcontent-%COMP%]{padding:1px 4px;border-radius:4px;font-size:10px;font-weight:600;color:#fff}.status-running[_ngcontent-%COMP%]{background:#28a745}.status-stop[_ngcontent-%COMP%]{background:#dc3545}.status-idle[_ngcontent-%COMP%]{background:#ffc107;color:#000}.leaflet-popup-content-wrapper[_ngcontent-%COMP%]{border-radius:6px!important;padding:4px!important}.leaflet-popup-content[_ngcontent-%COMP%]{margin:0!important}.vehicle-panel[_ngcontent-%COMP%] [_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.vehicle-panel[_ngcontent-%COMP%] [_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#f1f1f1;border-radius:3px}.vehicle-panel[_ngcontent-%COMP%] [_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#888;border-radius:3px}.vehicle-panel[_ngcontent-%COMP%] [_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#555}@keyframes dash{to{stroke-dashoffset:-20}}@keyframes pulse-marker{0%,to{opacity:.3;transform:scale(1)}50%{opacity:.1;transform:scale(1.3)}}.leaflet-pulsing-icon[_ngcontent-%COMP%]{border-radius:50%;animation:pulse-marker 2s ease-out infinite} .leaflet-touch .leaflet-control-layers-toggle{width:30px;height:30px}.rptheadertext[_ngcontent-%COMP%]{text-decoration:underline}.rptlabel[_ngcontent-%COMP%]{color:#000}.outputlabel[_ngcontent-%COMP%]{color:#083873}.backbtn[_ngcontent-%COMP%]{float:right;margin-left:25%!important;margin-top:-1%!important}.srnotd[_ngcontent-%COMP%]{background-color:#809b92}.form-group[_ngcontent-%COMP%]{margin-bottom:.2rem}.grid-section[_ngcontent-%COMP%], .ani[_ngcontent-%COMP%], .entrydiv[_ngcontent-%COMP%]{animation:fadeInUp .8s ease-out}@keyframes fadeInUp{0%{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}"]}),n})();var nr=v(50949),ir=v(45494);const rr=["reportForm"];function ar(n,a){if(1&n&&(e.TgZ(0,"ng-option",75),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function sr(n,a){1&n&&(e.TgZ(0,"span",78),e._uU(1,"Role type is mandatory"),e.qZA())}function lr(n,a){if(1&n&&(e.TgZ(0,"span",76),e.YNc(1,sr,2,0,"span",77),e.qZA()),2&n){e.oxw();const t=e.MAs(20);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function cr(n,a){if(1&n&&(e.TgZ(0,"ng-option",75),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function pr(n,a){if(1&n&&(e.TgZ(0,"span",78),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.hij("",t.roleTypeName," name is mandatory")}}function mr(n,a){if(1&n&&(e.TgZ(0,"span",76),e.YNc(1,pr,2,1,"span",77),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}const me=function(n,a){return{"is-valid":n,"ng-error":a}};function dr(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",9)(1,"div",10)(2,"label",79),e._uU(3),e.TgZ(4,"span",12),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",80,81),e.NdJ("ngModelChange",function(i){return e.CHM(t),e.oxw().customerNameObj=i})("change",function(){return e.CHM(t),e.oxw().onChangeCustomerList()}),e.YNc(8,cr,2,2,"ng-option",15),e.qZA(),e.YNc(9,mr,2,1,"span",16),e.qZA()()}if(2&n){const t=e.MAs(7),o=e.oxw(),i=e.MAs(11);e.xp6(3),e.hij("",o.roleTypeName," List"),e.xp6(3),e.MGl("placeholder","Select ",o.roleTypeName," "),e.Q6J("ngClass",e.WLB(8,me,t.valid,t.invalid&&i.submitted))("ngModel",o.customerNameObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",o.customerList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||i.submitted))}}function ur(n,a){if(1&n&&(e.TgZ(0,"ng-option",75),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function gr(n,a){1&n&&(e.TgZ(0,"span",78),e._uU(1,"User is mandatory"),e.qZA())}function hr(n,a){if(1&n&&(e.TgZ(0,"span",76),e.YNc(1,gr,2,0,"span",77),e.qZA()),2&n){e.oxw();const t=e.MAs(31);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function _r(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.lnq("Showing ",t.recordFrom," To ",t.recordTo," (Out Of ",t.totalCount,")Entries")}}function fr(n,a){1&n&&(e.TgZ(0,"option",82),e._uU(1,"20"),e.qZA())}function br(n,a){1&n&&(e.TgZ(0,"option",83),e._uU(1,"50"),e.qZA())}function vr(n,a){1&n&&(e.TgZ(0,"option",84),e._uU(1,"100"),e.qZA())}function Tr(n,a){if(1&n&&(e.TgZ(0,"option",75),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.Q6J("value",t.totalCount),e.xp6(1),e.hij(" ",t.totalCount," ")}}function Zr(n,a){1&n&&(e.TgZ(0,"tbody")(1,"tr")(2,"td",85)(3,"div",86),e._uU(4,"No Record Found"),e.qZA()()()())}function xr(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"tr")(1,"td",73),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td",88)(6,"button",89),e.NdJ("click",function(){const r=e.CHM(t).$implicit;return e.oxw(2).onClickEventCount(r)}),e._uU(7),e.qZA()()()}if(2&n){const t=a.$implicit;e.xp6(2),e.Oqu(t.rowno),e.xp6(2),e.Oqu(t.pagename?t.pagename:"Not Found"),e.xp6(3),e.Oqu(t.eventcount)}}function yr(n,a){if(1&n&&(e.TgZ(0,"tbody"),e.YNc(1,xr,8,3,"tr",87),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.detailData)}}function Cr(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",90)(1,"ngb-pagination",91),e.NdJ("pageChange",function(i){return e.CHM(t),e.oxw().reportFormRequest.pageno=i}),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("collectionSize",t.totalCount)("page",t.reportFormRequest.pageno)("maxSize",3)("pageSize",t.reportFormRequest.itemperpage)}}function Ar(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.lnq("Showing ",t.eventrecordFrom," To ",t.eventrecordTo," (Out Of ",t.eventtotalCount,")Entries")}}function qr(n,a){1&n&&(e.TgZ(0,"option",82),e._uU(1,"20"),e.qZA())}function Or(n,a){1&n&&(e.TgZ(0,"option",83),e._uU(1,"50"),e.qZA())}function Rr(n,a){1&n&&(e.TgZ(0,"option",84),e._uU(1,"100"),e.qZA())}function kr(n,a){if(1&n&&(e.TgZ(0,"option",75),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.Q6J("value",t.eventtotalCount),e.xp6(1),e.hij(" ",t.eventtotalCount," ")}}function wr(n,a){1&n&&(e.TgZ(0,"tbody")(1,"tr")(2,"td",85)(3,"div",86),e._uU(4,"No Record Found"),e.qZA()()()())}function Mr(n,a){if(1&n&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td",92),e._uU(8),e.qZA(),e.TgZ(9,"td",92),e._uU(10),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.qZA(),e.TgZ(13,"td"),e._uU(14),e.qZA(),e.TgZ(15,"td"),e._uU(16),e.qZA()()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(t.rowno),e.xp6(2),e.Oqu(t.pagename?t.pagename:"Not Found"),e.xp6(2),e.Oqu(t.pageevent?t.pageevent:"Not Found"),e.xp6(2),e.Oqu(t.pagevalue_new?t.pagevalue_new:"Not Found"),e.xp6(2),e.Oqu(t.pagevalue?t.pagevalue:"Not Found"),e.xp6(2),e.Oqu(t.pageactivity?t.pageactivity:"Not Found"),e.xp6(2),e.Oqu(t.eventtime?t.eventtime:"Not Found"),e.xp6(2),e.Oqu(t.ipaddress?t.ipaddress:"Not Found")}}function Nr(n,a){if(1&n&&(e.TgZ(0,"tbody"),e.YNc(1,Mr,17,8,"tr",87),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.eventDetailsData)}}function Fr(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",90)(1,"ngb-pagination",91),e.NdJ("pageChange",function(i){return e.CHM(t),e.oxw().reportFormRequest.pageno=i})("pageChange",function(){return e.CHM(t),e.oxw().showEventdetails("")}),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("collectionSize",t.eventtotalCount)("page",t.reportFormRequest.pageno)("maxSize",3)("pageSize",t.reportFormRequest.itemperpage)}}const de=function(n){return{display:n}};let Sr=(()=>{class n{constructor(t,o,i,r,s,l,d,m,_){this.cv=t,this.cs=o,this.loader=i,this.route=r,this.es=s,this.listService=l,this.mapService=d,this.datePipe=m,this.menuAPIService=_,this.loginRoleId=sessionStorage.getItem("loginroleid"),this.dateObj="",this.reportFormRequest=new h.c1,this.detailData=[],this.eventDetailsData=[],this.roleWiseDetailsRequest=new nr.iN,this.rolewiseuserRequest=new h.nO,this.apiname="",this.formsection=!0,this.loadersection=!1,this.detailsection=!1,this.eventdetailsection=!1,this.eventrecordTo=0,this.eventrecordFrom=0,this.eventtotalCount=0,this.pageHeading="Event Log Report",this.dateRange="",this.roleList=[],this.roleWiseUserList=[],this.filePath="",this.customerList=[],this.pageName="",this.sortDir=1}ngOnInit(){$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"}),this.getDate(),this.getRolelist()}getRolelist(){var t=this;return(0,u.Z)(function*(){t.roleList=yield t.listService.getRoleList(new h.nO),t.roleList=t.roleList.filter(o=>"customer"==o.name.toLowerCase()||"company"==o.name.toLowerCase()||"company"==o.name.toLowerCase()||"school"==o.name.toLowerCase()),t.roleWiseUserObj=null})()}onChangeRoleType(){var t=this;return(0,u.Z)(function*(){t.customerNameObj=null,t.roleWiseUserObj=null,t.roleObj&&(t.roleTypeName=t.roleObj.name,"school"==t.roleTypeName.toLowerCase()||"customer"==t.roleTypeName?t.getCustomerList():"company"==t.roleTypeName.toLowerCase()&&(t.rolewiseuserRequest.filter1=t.roleObj?t.roleObj.id:"",t.roleWiseUserList=yield t.listService.getRoleWiseUserList(t.rolewiseuserRequest)))})()}getCustomerList(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;o.filter1=t.roleObj.id,t.customerList=yield t.listService.getCustomerList(o)})()}onChangeCustomerList(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;t.customerNameObj&&(o.filter1=t.customerNameObj.id),t.roleWiseUserList=yield t.listService.getRoleWiseUserList(o)})()}getDate(){$(()=>{$('input[name="date"]').daterangepicker
1({showDropdowns:!0,startDate:p().startOf("day").format("DD-MMM-YYYY"),endDate:p().endOf("day").format("DD-MMM-YYYY"),opens:"center",drops:"down",maxSpan:{days:30},locale:{format:"DD-MMM-YYYY"},ranges:{Today:[p(),p()],Yesterday:[p().subtract(1,"days"),p().subtract(1,"days")],"This Week":[p().startOf("week"),p().endOf("week")],"This Month":[p().startOf("month"),p().endOf("day")]},maxDate:new Date,minYear:2022,maxYear:parseInt(p().format("YYYY"),10),function(t,o){$("#datepicker").html(t.format("DD-MMM-YYYY")+" : "+o.format("DD-MMM-YYYY"))}}),$('input[name="date"]').on("hide.daterangepicker",(t,o)=>{try{this.dateObj=t.target.value}catch(i){}}),this.dateObj=document.getElementById("datepicker").value})}validateForm(){if(this.reportForm.valid){this.formsection=!1,this.loadersection=!0;let t=this.dateObj.split(" - ");this.reportFormRequest.fromdate=t[0],this.reportFormRequest.todate=t[1],this.reportFormRequest.roleid=this.roleObj.id,this.reportFormRequest.userid=this.roleWiseUserObj.id,this.reportFormRequest.fromtime=document.getElementById("fromtime").value.replace(" ","").replace(" ",""),this.reportFormRequest.totime=document.getElementById("totime").value.replace(" ","").replace(" ",""),this.dateRange=this.reportFormRequest.fromdate+" "+this.reportFormRequest.fromtime+" To "+this.reportFormRequest.todate+" "+this.reportFormRequest.totime,this.userName=this.roleWiseUserObj.name,this.details("refresh")}}details(t){try{this.loader.loaderOff()}catch(o){}"showrow"==t&&(this.reportFormRequest.pageno=1),"search"==t&&(this.reportFormRequest.pageno=1),"refresh"==t&&(this.reportFormRequest.searchby="",this.reportFormRequest.pageno=1,this.reportFormRequest.itemperpage=10),this.reportFormRequest.searchby=this.reportFormRequest.searchby.trim(),this.formsection=!1,this.loadersection=!0;try{this.loader.loaderOn()}catch(o){}this.es.apiCall(this.reportFormRequest,"pagereport").subscribe(o=>{try{this.loader.loaderOff()}catch(i){}200==o.statusCode?(this.detailData=o.entity.pagereport,this.totalCount=+o.entity.totalrecord,this.recordFrom=this.detailData[0].rowno,this.recordTo=this.detailData[this.detailData.length-1].rowno,this.loadersection=!1,this.formsection=!1,this.detailsection=!0):(this.detailData=[],this.recordTo=0,this.recordFrom=0,this.totalCount=0,this.reportFormRequest.searchby="",this.detailsection=!0,this.formsection=!1,this.loadersection=!1)},o=>{this.loader.logout()})}redirectToForm(){this.formsection=!0,this.loadersection=!1,this.detailsection=!1,this.getDate(),$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"}),this.reportForm.resetForm()}redirectToCountDetails(){this.formsection=!1,this.loadersection=!1,this.eventdetailsection=!1,this.detailsection=!0}showEventDetailsReport(t){t.eventcount>0&&(this.reportFormRequest.pagename=t.pagename,console.log(this.reportFormRequest.pagename),this.showEventdetails("refresh"))}showEventdetails(t){try{this.loader.loaderOff()}catch(o){}"showrow"==t&&(this.reportFormRequest.pageno=1),"search"==t&&(this.reportFormRequest.pageno=1),"refresh"==t&&(this.reportFormRequest.searchby="",this.reportFormRequest.pageno=1,this.reportFormRequest.itemperpage=10),console.log("44",this.reportFormRequest),this.reportFormRequest.searchby=this.reportFormRequest.searchby.trim(),this.formsection=!1,this.loadersection=!1,this.eventdetailsection=!0,this.detailsection=!1;try{this.loader.loaderOn()}catch(o){}this.es.apiCall(this.reportFormRequest,"pagereportdetail").subscribe(o=>{try{this.loader.loaderOff()}catch(i){}200==o.statusCode?(this.eventDetailsData=o.entity.pagereportdetails,this.eventtotalCount=Number(o.entity.totalrecord),this.eventrecordFrom=+this.eventDetailsData[0].rowno,this.eventrecordTo=+this.eventDetailsData[this.eventDetailsData.length-1].rowno,this.loadersection=!1,this.formsection=!1,this.detailsection=!1):(this.eventDetailsData=[],this.eventrecordTo=0,this.eventrecordFrom=0,this.eventtotalCount=0,this.reportFormRequest.searchby="",this.detailsection=!1,this.formsection=!1,this.loadersection=!1,this.eventdetailsection=!0)},o=>{this.loader.logout()})}onClickEventCount(t){this.eventdetailsection=!0,this.detailsection=!1,this.pageName=t.pagename,this.userName=this.roleWiseUserObj.name,this.reportFormRequest.pagename=t.pagename,this.showEventdetails("")}ResetForm(){this.reportForm.resetForm(),this.formsection=!0,this.detailsection=!1,this.getDate(),setTimeout(()=>{$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"})},1500)}sorting(t,o){try{let r=t.currentTarget.childNodes[1].classList;try{r.contains("fa-sort-amount-desc")?(r.remove("fa-sort-amount-desc"),r.add("fa-sort-amount-asc")):(r.remove("fa-sort-amount-asc"),r.add("fa-sort-amount-desc"))}catch(s){console.log("e "+s)}this.sortDir=1==this.sortDir?-1:1;try{this.detailData.length>0&&this.detailData.sort((s,l)=>(s=s[o].toLowerCase(),l=l[o].toLowerCase(),s.localeCompare(l)*this.sortDir))}catch(s){console.log("e "+s)}}catch(i){}}downloadDoc(t){let o=new h.c1;o.pdfexcel=t,o.itemperpage="",o.pageno="",o.userid=this.reportFormRequest.userid,o.roleid=this.reportFormRequest.roleid;let i="";this.eventdetailsection?(o.pageid=this.reportFormRequest.pageid,i="pagereportdetail"):(o.pageid="",i="pagereport"),o.fromdate=this.reportFormRequest.fromdate,o.todate=this.reportFormRequest.todate,o.searchby=this.reportFormRequest.searchby.trim();try{this.loader.loaderOn()}catch(r){}this.es.apiCall(o,i).subscribe(r=>{try{this.loader.loaderOff()}catch(s){}"200"==r.statusCode&&(this.filePath=r.message,this.es.commonFileDownload(this.filePath)),o.pdfexcel=""})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(S.R),e.Y36(U.v),e.Y36(N.D),e.Y36(M.F0),e.Y36(F.P),e.Y36(D.X),e.Y36(J.S),e.Y36(g.uU),e.Y36(ir.D))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-page-log-report"]],viewQuery:function(t,o){if(1&t&&e.Gf(rr,5),2&t){let i;e.iGM(i=e.CRH())&&(o.reportForm=i.first)}},decls:196,vars:57,consts:[[1,"report-form-container"],[1,"reportheader"],["aria-hidden","true",1,"fa","fa-credit-card"],[1,"rptheadertext"],[1,"container-fluid",3,"ngStyle"],[1,"row"],[1,"col-md-12"],["novalidate","","id","form_id","autocomplete","off",1,"needs-validation"],["reportForm","ngForm"],[1,"col-md-2"],[1,"form-group"],[1,"mb-0","label"],[1,"text-danger"],["name","roletype","placeholder","Select Role Type","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["roleTypeCtrl","ngModel"],[3,"value",4,"ngFor","ngForOf"],["class","form-control-feedback text-danger text-danger",4,"ngIf"],["class","col-md-2",4,"ngIf"],["name","user","placeholder","Select User","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange"],["rolwWiseUserCtrl","ngModel"],[1,"col-md-4"],[1,"d-flex","justify-content-end"],[1,"report-label","mb-0"],["type","text","name","date","id","datepicker","required","","placeholder","Select Date",1,"form-control","form-control-sm"],[1,"form-group","mb-0",2,"width","85px","float","left"],[1,"mb-0"],["type","text","name","timepicker","id","fromtime",1,"fromTime","form-control","form-control-sm","text-center"],[1,"form-group",2,"width","85px","float","left"],["type","text","name","timepicker","id","totime",1,"toTime","form-control","form-control-sm","text-center"],[1,"col","mt-3"],["type","submit",1,"custom-btn","btn-13","float-right","Show","mb-3",3,"click"],["type","button",1,"custom-btn","btn-10","float-right","mr-2",3,"click"],[1,"row","grid-section",3,"ngStyle"],[1,"row","py-2","report-summary"],[1,"fw-bolder","text-small","text-uppercase","outputlabel"],[1,"text-uppercase","text-small","outputlabel"],[1,"col-md-7"],[1,"col-md-1","text-end","float-end"],["ngbTooltip","Back",1,"backbtnbackground",3,"click"],["aria-hidden","true",1,"fa","fa-arrow-circle-o-left","outputlabel"],[1,"col-md-12","px-0"],[1,"table-head","d-flex","justify-content-between"],["id","tickets-table_info","role","status","aria-live","polite",1,"col-auto","mt-2","text-center","fw-bold","total-record-label"],[4,"ngIf"],[1,"mt-1"],[1,"itemsperpage-style",2,"margin-right","10px"],[1,"d-inline-flex","align-items-center"],["name","table_length","aria-controls","table","name","pageSize",3,"ngModel","ngModelChange","change"],["value","10","selected",""],["value","20",4,"ngIf"],["value","50",4,"ngIf"],["value","100",4,"ngIf"],[3,"value",4,"ngIf"],["type","button",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"click"],["aria-hidden","true",1,"fa","fa-refresh"],["type","button","ngbTooltip","Download Pdf","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-pdf-o","pdf-btn"],["type","button","ngbTooltip","Download Excel","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-excel-o","excel-btn"],["type","text","name","searchTerm","autocomplete","off","aria-controls","tickets-table","placeholder","Search here....","autocomplete","off",1,"form-control","form-control-sm","ms-2","searchinput",2,"width","165px",3,"ngModel","ngModelChange"],["type","button",1,"btn","search-btn",3,"click"],[1,"fa","fa-search"],[1,"scroll-tbl"],[1,"table","table-striped","table-style",2,"overflow-y","auto","overflow-x","auto"],[2,"width","40px"],[3,"click"],[1,"fa","fa-sort-amount-desc"],[1,"text-end",2,"width","126px",3,"click"],[1,"row","justify-content-md-between","align-items-md-center","mt-2"],["class","float-end text-start",4,"ngIf"],[1,"report-details-container"],[1,"col","backbtn","text-end"],["ngbTooltip","Back",1,"btn","btn-sm","mt-2",3,"click"],[1,"srnotd"],[1,"text-end",3,"click"],[3,"value"],[1,"form-control-feedback","text-danger","text-danger"],["class","text-small",4,"ngIf"],[1,"text-small"],[1,"mb-0","text-capitalize"],["name","customertype","required","",1,"text-capitalize",3,"ngClass","ngModel","multiple","placeholder","closeOnSelect","ngModelChange","change"],["customerNameCtrl","ngModel"],["value","20"],["value","50"],["value","100"],["colspan","15"],[1,"text-center"],[4,"ngFor","ngForOf"],[1,"text-end"],[1,"btn","px-2","py-1","btn-outline-primary","bg-light",3,"click"],[1,"float-end","text-start"],["size","sm",1,"d-flex","mt-2","justify-content-end","pagination-rounded","pagination","pagination-info",3,"collectionSize","page","maxSize","pageSize","pageChange"],[2,"word-break","break-all"]],template:function(t,o){if(1&t&&(e.TgZ(0,"div",0)(1,"div")(2,"h5",1),e._UZ(3,"i",2),e._uU(4,"\xa0\xa0\xa0"),e.TgZ(5,"span",3),e._uU(6,"Event Log Report"),e.qZA()()(),e.TgZ(7,"div",4)(8,"div",5)(9,"div",6)(10,"form",7,8)(12,"div",5)(13,"div",9)(14,"div",10)(15,"label",11),e._uU(16,"Role Type "),e.TgZ(17,"span",12),e._uU(18,"*"),e.qZA()(),e.TgZ(19,"ng-select",13,14),e.NdJ("ngModelChange",function(r){return o.roleObj=r})("change",function(){return o.onChangeRoleType()}),e.YNc(21,ar,2,2,"ng-option",15),e.qZA(),e.YNc(22,lr,2,1,"span",16),e.qZA()(),e.YNc(23,dr,10,11,"div",17),e.TgZ(24,"div",9)(25,"div",10)(26,"label",11),e._uU(27,"User"),e.TgZ(28,"span",12),e._uU(29,"*"),e.qZA()(),e.TgZ(30,"ng-select",18,19),e.NdJ("ngModelChange",function(r){return o.roleWiseUserObj=r}),e.YNc(32,ur,2,2,"ng-option",15),e.qZA(),e.YNc(33,hr,2,1,"span",16),e.qZA()(),e.TgZ(34,"div",20)(35,"div",21)(36,"div",10)(37,"label",22),e._uU(38,"Date Range:"),e.qZA(),e._UZ(39,"input",23),e.qZA(),e.TgZ(40,"div",24)(41,"label",25),e._uU(42,"Time "),e.qZA(),e._UZ(43,"input",26),e.qZA(),e._uU(44," \xa0\xa0\xa0 "),e.TgZ(45,"div",27),e._UZ(46,"label",25)(47,"input",28),e.qZA()()(),e.TgZ(48,"div",29)(49,"button",30),e.NdJ("click",function(){return o.validateForm()}),e._uU(50,"Generate"),e.qZA(),e._uU(51," \xa0 "),e.TgZ(52,"button",31),e.NdJ("click",function(){return o.ResetForm()}),e._uU(53,"Reset"),e.qZA()()()()()()(),e.TgZ(54,"div",0)(55,"div",32)(56,"div",6)(57,"div",33)(58,"div",20)(59,"span",34),e._uU(60,"User:"),e.qZA(),e.TgZ(61,"span",35),e._uU(62),e.qZA()(),e.TgZ(63,"div",36)(64,"span",34),e._uU(65,"Date :"),e.qZA(),e.TgZ(66,"span",35),e._uU(67),e.qZA()(),e.TgZ(68,"div",37)(69,"button",38),e.NdJ("click",function(){return o.redirectToForm()}),e._UZ(70,"i",39),e.qZA()()()(),e.TgZ(71,"div",40)(72,"div",41)(73,"div",42),e.YNc(74,_r,2,3,"span",43),e.qZA(),e.TgZ(75,"div",44)(76,"span",45)(77,"label",46),e._uU(78,"Show "),e.TgZ(79,"select",47),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.itemperpage=r})("change",function(){return o.details("")}),e.TgZ(80,"option",48),e._uU(81," 10"),e.qZA(),e.YNc(82,fr,2,0,"option",49),e.YNc(83,br,2,0,"option",50),e.YNc(84,vr,2,0,"option",51),e.YNc(85,Tr,2,2,"option",52),e.qZA(),e._uU(86," entries"),e.qZA()(),e.TgZ(87,"span")(88,"button",53),e.NdJ("click",function(){return o.details("refresh")}),e._UZ(89,"i",54),e.qZA()(),e.TgZ(90,"span")(91,"button",55),e.NdJ("click",function(){return o.downloadDoc("pdf")}
1),e._UZ(92,"i",56),e.qZA(),e.TgZ(93,"button",57),e.NdJ("click",function(){return o.downloadDoc("excel")}),e._UZ(94,"i",58),e.qZA()(),e.TgZ(95,"label")(96,"input",59),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.searchby=r}),e.qZA()(),e.TgZ(97,"button",60),e.NdJ("click",function(){return o.details("search")}),e._UZ(98,"span",61),e.qZA()()(),e.TgZ(99,"div",62)(100,"table",63)(101,"thead")(102,"tr")(103,"th",64),e._uU(104,"#"),e.qZA(),e.TgZ(105,"th",65),e.NdJ("click",function(r){return o.sorting(r,"pagename")}),e._uU(106,"Page Name"),e._UZ(107,"i",66),e.qZA(),e.TgZ(108,"th",67),e.NdJ("click",function(r){return o.sorting(r,"eventcount")}),e._uU(109,"Number Of Events"),e._UZ(110,"i",66),e.qZA()()(),e.YNc(111,Zr,5,0,"tbody",43),e.YNc(112,yr,2,1,"tbody",43),e.qZA()(),e.TgZ(113,"div",68),e.YNc(114,Cr,2,4,"div",69),e.qZA()()()(),e.TgZ(115,"div",70)(116,"div",32)(117,"div",6)(118,"div",33)(119,"div",20)(120,"span",34),e._uU(121,"Date :"),e.qZA(),e.TgZ(122,"span",35),e._uU(123),e.qZA()(),e.TgZ(124,"div",9)(125,"span",34),e._uU(126,"User:"),e.qZA(),e.TgZ(127,"span",35),e._uU(128),e.qZA()(),e.TgZ(129,"div",9)(130,"span",34),e._uU(131,"Page Name:"),e.qZA(),e.TgZ(132,"span",35),e._uU(133),e.qZA()(),e.TgZ(134,"div",71)(135,"button",72),e.NdJ("click",function(){return o.redirectToCountDetails()}),e._UZ(136,"i",39),e.qZA()()()(),e.TgZ(137,"div",40)(138,"div",41)(139,"div",42),e.YNc(140,Ar,2,3,"span",43),e.qZA(),e.TgZ(141,"div",44)(142,"span",45)(143,"label",46),e._uU(144,"Show "),e.TgZ(145,"select",47),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.itemperpage=r})("change",function(){return o.showEventdetails("")}),e.TgZ(146,"option",48),e._uU(147," 10"),e.qZA(),e.YNc(148,qr,2,0,"option",49),e.YNc(149,Or,2,0,"option",50),e.YNc(150,Rr,2,0,"option",51),e.YNc(151,kr,2,2,"option",52),e.qZA(),e._uU(152," entries"),e.qZA()(),e.TgZ(153,"span")(154,"button",53),e.NdJ("click",function(){return o.showEventdetails("refresh")}),e._UZ(155,"i",54),e.qZA()(),e.TgZ(156,"span")(157,"button",55),e.NdJ("click",function(){return o.downloadDoc("pdf")}),e._UZ(158,"i",56),e.qZA(),e.TgZ(159,"button",57),e.NdJ("click",function(){return o.downloadDoc("excel")}),e._UZ(160,"i",58),e.qZA()(),e.TgZ(161,"label")(162,"input",59),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.searchby=r}),e.qZA()(),e.TgZ(163,"button",60),e.NdJ("click",function(){return o.showEventdetails("search")}),e._UZ(164,"span",61),e.qZA()()(),e.TgZ(165,"div",62)(166,"table",63)(167,"thead")(168,"tr")(169,"th",73),e._uU(170,"#"),e.qZA(),e.TgZ(171,"th",65),e.NdJ("click",function(r){return o.sorting(r,"pagename")}),e._uU(172,"Page Name"),e._UZ(173,"i",66),e.qZA(),e.TgZ(174,"th",65),e.NdJ("click",function(r){return o.sorting(r,"pageevent")}),e._uU(175,"Page Event"),e._UZ(176,"i",66),e.qZA(),e.TgZ(177,"th",74),e.NdJ("click",function(r){return o.sorting(r,"pagevalue_new")}),e._uU(178,"Page New Value"),e._UZ(179,"i",66),e.qZA(),e.TgZ(180,"th",74),e.NdJ("click",function(r){return o.sorting(r,"pagevalue")}),e._uU(181,"Page Old Value"),e._UZ(182,"i",66),e.qZA(),e.TgZ(183,"th",74),e.NdJ("click",function(r){return o.sorting(r,"pageactivity")}),e._uU(184,"Page Activity"),e._UZ(185,"i",66),e.qZA(),e.TgZ(186,"th",74),e.NdJ("click",function(r){return o.sorting(r,"pageevent")}),e._uU(187,"Event Time"),e._UZ(188,"i",66),e.qZA(),e.TgZ(189,"th",74),e.NdJ("click",function(r){return o.sorting(r,"pageactivity")}),e._uU(190,"IP Address"),e._UZ(191,"i",66),e.qZA()()(),e.YNc(192,wr,5,0,"tbody",43),e.YNc(193,Nr,2,1,"tbody",43),e.qZA()(),e.TgZ(194,"div",68),e.YNc(195,Fr,2,4,"div",69),e.qZA()()()()()),2&t){const i=e.MAs(11),r=e.MAs(20),s=e.MAs(31);e.xp6(7),e.Q6J("ngStyle",e.VKq(45,de,o.formsection?"":"none")),e.xp6(12),e.Q6J("ngClass",e.WLB(47,me,r.valid,r.invalid&&i.submitted))("ngModel",o.roleObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",o.roleList),e.xp6(1),e.Q6J("ngIf",r.errors&&(r.dirty||r.touched||i.submitted)),e.xp6(1),e.Q6J("ngIf",o.roleObj),e.xp6(7),e.Q6J("ngClass",e.WLB(50,me,s.valid,s.invalid&&i.submitted))("ngModel",o.roleWiseUserObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",o.roleWiseUserList),e.xp6(1),e.Q6J("ngIf",s.errors&&(s.dirty||s.touched||i.submitted)),e.xp6(22),e.Q6J("ngStyle",e.VKq(53,de,o.detailsection?"":"none")),e.xp6(7),e.hij(" ",o.userName,""),e.xp6(5),e.hij(" ",o.dateRange,""),e.xp6(7),e.Q6J("ngIf",0!=o.totalCount),e.xp6(5),e.Q6J("ngModel",o.reportFormRequest.itemperpage),e.xp6(3),e.Q6J("ngIf",o.totalCount>20),e.xp6(1),e.Q6J("ngIf",o.totalCount>50),e.xp6(1),e.Q6J("ngIf",o.totalCount>100),e.xp6(1),e.Q6J("ngIf",o.totalCount<100&&o.totalCount>10),e.xp6(6),e.Q6J("disabled","0"==o.totalCount),e.xp6(2),e.Q6J("disabled","0"==o.totalCount),e.xp6(3),e.Q6J("ngModel",o.reportFormRequest.searchby),e.xp6(15),e.Q6J("ngIf",0==o.totalCount),e.xp6(1),e.Q6J("ngIf",0!=o.totalCount),e.xp6(2),e.Q6J("ngIf",o.totalCount>o.reportFormRequest.itemperpage),e.xp6(2),e.Q6J("ngStyle",e.VKq(55,de,o.eventdetailsection?"":"none")),e.xp6(7),e.hij(" ",o.dateRange,""),e.xp6(5),e.hij(" ",o.userName,""),e.xp6(5),e.hij(" ",o.pageName,""),e.xp6(7),e.Q6J("ngIf",0!=o.eventtotalCount),e.xp6(5),e.Q6J("ngModel",o.reportFormRequest.itemperpage),e.xp6(3),e.Q6J("ngIf",o.eventtotalCount>20),e.xp6(1),e.Q6J("ngIf",o.eventtotalCount>50),e.xp6(1),e.Q6J("ngIf",o.eventtotalCount>100),e.xp6(1),e.Q6J("ngIf",o.eventtotalCount<100&&o.eventtotalCount>10),e.xp6(6),e.Q6J("disabled",0==o.eventtotalCount),e.xp6(2),e.Q6J("disabled",0==o.eventtotalCount),e.xp6(3),e.Q6J("ngModel",o.reportFormRequest.searchby),e.xp6(30),e.Q6J("ngIf",0==o.eventtotalCount),e.xp6(1),e.Q6J("ngIf",0!=o.eventtotalCount),e.xp6(2),e.Q6J("ngIf",o.eventtotalCount>o.reportFormRequest.itemperpage)}},directives:[g.PC,c._Y,c.JL,c.F,A.w9,c.Q7,g.mk,c.JJ,c.On,g.sg,A.xv,g.O5,C._L,c.EJ,c.YN,c.Kr,c.Fj,C.N9],styles:[".ng-select.ng-select-single .ng-select-container .ng-value-container{font-size:12px!important} .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{font-size:12px!important;text-transform:capitalize}ng-select.ng-select-single[_ngcontent-%COMP%] .ng-select-container{min-height:26px;max-height:26px;height:26px}.form-control[_ngcontent-%COMP%]{height:calc(1.45rem + 2px)}.invalid-feedback[_ngcontent-%COMP%]{font-size:11px;color:#dc3545}input[_ngcontent-%COMP%]{font-size:12px}.starvalid[_ngcontent-%COMP%]{color:#ff0040!important}.validationmsg[_ngcontent-%COMP%]{--bs-text-opacity: 1;color:#ff0040!important;font-weight:600}.shimmerBG[_ngcontent-%COMP%]{animation-duration:2.2s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:shimmer;animation-timing-function:linear;background:#E5F0FB;background:linear-gradient(to right,#cfeeeb 4%,#9ac9c6 25%,#d5f0f0 36%);background-size:1100px 100%}@keyframes shimmer{0%{background-position:-1200px 0}to{background-position:1200px 0}}.media[_ngcontent-%COMP%]{height:110px}.p-32[_ngcontent-%COMP%]{padding:32px}.title-line[_ngcontent-%COMP%]{height:24px;width:100%;margin-bottom:12px;border-radius:20px}.content-line[_ngcontent-%COMP%]{height:8px;width:100%;margin-bottom:16px;border-radius:8px}.end[_ngcontent-%COMP%]{width:40%}.m-t-24[_ngcontent-%COMP%]{margin-top:24px}.rptheadertext[_ngcontent-%COMP%]{text-decoration:underline}.rptlabel[_ngcontent-%COMP%]{color:#000}.outputlabel[_ngcontent-%COMP%]{color:#fff}.backbtn[_ngcontent-%COMP%]{float:right;margin-left:25%!important;margin-top:-1%!important}.srnotd[_ngcontent-%COMP%]{background-color:#809b92}.form-group[_ngcontent-%COMP%]{margin-bottom:.2rem}"]}),n})();const Ur=["reportForm"];function Dr(n,a){if(1&n&&(e.TgZ(0,"ng-option",73),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function Ir(n,a){1&n&&(e.TgZ(0,"span",76),e._uU(1,"Role is mandatory"),e.qZA())}function Jr(n,a){if(1&n&&(e.TgZ(0,"span",74),e.YNc(1,Ir,2,0,"span",75),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}const De=function(n,a){return{"is-valid":n,"ng-error":a}};function Lr(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",10)(1,"div",11)(2,"label",70),e._uU(3,"Select Role "),e.TgZ(4,"span",13),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",71,72),e.NdJ("ngModelChange",function(i){return e.CHM(t),e.oxw().roleObj=i})("change",function(){return e.CHM(t),e.oxw().onChangeRoleType()}),e.YNc(8,Dr,2,2,"ng-option",16),e.qZA(),e.YNc(9,Jr,2,1,"span",17),e.qZA()()}if(2&n){const t=e.MAs(7),o=e.oxw(),i=e.MAs(11);e.xp6(6),e.Q6J("ngClass",e.WLB(6,De,t.valid,t.invalid&&i.submitted))("ngModel",o.roleObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",o.roleList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||i.submitted))}}function Yr(n,a){if(1&n&&(e.TgZ(0,"ng-option",73),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function jr(n,a){1&n&&(e.TgZ(0,"span",76),e._uU(1,"Username is mandatory"),e.qZA())}function Pr(n,a){if(1&n&&(e.TgZ(0,"span",74),e.YNc(1,jr,2,0,"span",75),e.qZA()),2&n){e.oxw();const t=e.MAs(21);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function Qr(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.lnq("Showing ",t.recordFrom," To ",t.recordTo," (Out Of ",t.totalCount,")Entries")}}function Vr(n,a){1&n&&(e.TgZ(0,"option",77),e._uU(1,"20"),e.qZA())}function Er(n,a){1&n&&(e.TgZ(0,"option",78),e._uU(1,"50"),e.qZA())}function zr(n,a){1&n&&(e.TgZ(0,"option",79),e._uU(1,"100"),e.qZA())}function Hr(n,a){if(1&n&&(e.TgZ(0,"option",73),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.Q6J("value",t.totalCount),e.xp6(1),e.hij(" ",t.totalCount," ")}}function $r(n,a){1&n&&(e.TgZ(0,"tbody")(1,"tr")(2,"td",80)(3,"div",81),e._uU(4,"No Record Found"),e.qZA()()()())}function Br(n,a){if(1&n&&(e.TgZ(0,"tr")(1,"td",83),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.qZA(),e.TgZ(13,"td"),e._uU(14),e.qZA(),e.TgZ(15,"td"),e._uU(16),e.qZA(),e.TgZ(17,"td"),e._uU(18),e.qZA()()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(t.rowno),e.xp6(2),e.Oqu(""==t.apiname?"Not Found":t.apiname),e.xp6(2),e.Oqu(""==t.apitype?"Not Found":t.apitype),e.xp6(2),e.Oqu(""==t.pagename?"Not Found":t.pagename),e.xp6(2),e.Oqu(""==t.pageurl?"Not Found":t.pageurl),e.xp6(2),e.Oqu(""==t.requestbody?"Not Found":t.requestbody),e.xp6(2),e.Oqu(""==t.apirespo?"Not Found":t.apirespo),e.xp6(2),e.Oqu(""==t.status?"Not Found":t.status),e.xp6(2),e.Oqu(""==t.eventtiime?"Not Found":t.eventtiime)}}function Gr(n,a){if(1&n&&(e.TgZ(0,"tbody"),e.YNc(1,Br,19,9,"tr",82),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.detailData)}}function Wr(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",84)(1,"ngb-pagination",85),e.NdJ("pageChange",function(i){return e.CHM(t),e.oxw().reportFormRequest.pageno=i})("pageChange",function(){return e.CHM(t),e.oxw().details("")}),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("collectionSize",t.totalCount)("page",t.reportFormRequest.pageno)("maxSize",3)("pageSize",t.reportFormRequest.itemperpage)}}const Ie=function(n){return{display:n}};let Kr=(()=>{class n{constructor(t,o,i,r,s,l,d,m){this.cv=t,this.cs=o,this.loader=i,this.route=r,this.es=s,this.listService=l,this.mapService=d,this.datePipe=m,this.dateObj="",this.formsection=!0,this.loadersection=!1,this.detailsection=!1,this.loginRoleId=sessionStorage.getItem("loginroleid"),this.reportFormRequest=new xe,this.detailData=[],this.totalCount=0,this.recordFrom=0,this.pageHeading="Overspeed Report",this.busNumber="",this.dateRange="",this.allVehicleObject={id:"",name:"All"},this.selectedBusList=[],this.roleList=[],this.customerTypeName="",this.customerList=[],this.userloginList=[],this.sortDir=1}ngOnInit(){$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"}),this.getDate(),this.getRoleList()}getRoleList(){var t=this;return(0,u.Z)(function*(){t.roleList=yield t.listService.getRoleList(new h.nO),t.roleList=t.roleList.filter(o=>"school"==o.name||"customer"==o.name||"company"==o.name)})()}onChangeRoleType(){var t=this;return(0,u.Z)(function*(){if(t.roleObj&&(t.customerTypeName=t.roleObj.name,"school"==t.customerTypeName||"customer"==t.customerTypeName||"company"==t.customerTypeName)){let o=new h.nO;o.filter1=t.roleObj.id,t.customerList=yield t.listService.getCustomerList(o)}})()}getDate(){$(()=>{$('input[name="date"]').daterangepicker({showDropdowns:!0,startDate:p().startOf("day").format("DD-MMM-YYYY"),endDate:p().endOf("day").format("DD-MMM-YYYY"),opens:"center",drops:"down",maxSpan:{days:30},locale:{format:"DD-MMM-YYYY"},ranges:{Today:[p(),p()],Yesterday:[p().subtract(1,"days"),p().subtract(1,"days")],"This Week":[p().startOf("week"),p().endOf("week")],"This Month":[p().startOf("month"),p().endOf("month")]},maxDate:new Date,minYear:2022,maxYear:parseInt(p().format("YYYY"),10),function(t,o){$("#datepicker").html(t.format("DD-MMM-YYYY")+" : "+o.format("DD-MMM-YYYY"))}}),$('input[name="date"]').on("hide.daterangepicker",(t,o)=>{try{this.dateObj=t.target.value}catch(i){}}),this.dateObj=document.getElementById("datepicker").value})}onChangeSchool(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;o.schoolid=t.schoolObj.id,t.vehicleList=yield t.listService.getVehicleList(o)})()}validateForm(){if(this.reportForm.valid){this.formsection=!1,this.loadersection=!0,this.customerName=this.userObj?this.userObj.name:"",this.reportFormRequest.userid=this.userObj?this.userObj.id:"",this.reportFormRequest.roleid=this.roleObj?this.roleObj.id:"";let t=this.dateObj.split(" - ");this.reportFormRequest.fromdate=t[0],this.reportFormRequest.todate=t[1],this.reportFormRequest.fromtime=document.getElementById("fromtime").value.replace(" ","").replace(" ",""),this.reportFormRequest.totime=document.getElementById("totime").value.replace(" ","").replace(" ",""),this.dateRange=this.reportFormRequest.fromdate+" "+this.reportFormRequest.fromtime+" To "+this.reportFormRequest.todate+" "+this.reportFormRequest.totime,this.details("refresh")}}details(t){var o=this;return(0,u.Z)(function*(){try{o.loader.loaderOff()}catch(i){}"showrow"==t&&(o.reportFormRequest.pageno=1),"search"==t&&(o.reportFormRequest.pageno=1),"refresh"==t&&(o.reportFormRequest.searchby="",o.reportFormRequest.pageno=1,o.reportFormRequest.itemperpage=10),o.reportFormRequest.searchby=o.reportFormRequest.searchby.trim(),o.reportFormRequest.userid=o.userObj?o.userObj.id:"",o.reportFormRequest.roleid=o.roleObj?o.roleObj.id:"",o.formsection=!1,o.loadersection=!0;try{o.loader.loaderOn()}catch(i){}o.es.apiCall(o.reportFormRequest,"apilogreport").subscribe(i=>{try{o.loader.loaderOff()}catch(r){}200==i.statusCode?(o.detailData=i.entity.apilogreportdetails,o.totalCount=+i.entity.totalrecord,o.recordFrom=o.detailData[0].rowno,o.recordTo=o.detailData[o.detailData.length-1].rowno,o.loadersection=!1,o.formsection=!1,o.detailsection=!0):(o.detailData=[],o.recordTo=0,o.recordFrom=0,o.totalCount=0,o.reportFormRequest.searchby="",o.detailsection=!0,o.formsection=!1,o.loadersection=!1),o.es.pageDataInfo("",o.reportFormRequest,"API Log Report","Details method","Called Function",i.message)},i=>{o.loader.logout()})})()}redirectToForm(){this.formsection=!0,this.loadersection=!1,this.detailsection=!1,this.getDate(),$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"}),this.roleObj=null,this.customerNameObj=null,this.schoolObj=null,this.busNoObj=null,this.vehicleList=[],this.reportForm.resetForm()}ResetForm(){this.reportForm.resetForm(),this.formsection=!0,this.detailsection=!1,this.getDate(),setTimeout(()=>{$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"})},1500),this.getRoleList(),this.roleObj=null,this.customerNameObj=null,this.schoolObj=null,this.busNoObj=null,this.vehicleList=[]}sorting(t,o){try{let r=t.currentTarget.childNodes[1].classList;try{r.contains("fa-sort-amount-desc")?(r.remove("fa-sort-amount-desc"),r.add("fa-sort-amount-asc")):(r.remove("fa-sort-amount-asc"),r.add("fa-sort-amount-desc"))}catch(s){console.log("e "+s)}this.sortDir=1==this.sortDir?-1:1;try{this.detailData.length>0&&this.detailData.sort((s,l)=>(s=s[o].toLowerCase(),l=l[o].toLowerCase(),s.localeCompare(l)*this.sortDir))}catch(s){console.log("e "+s)}}catch(i){}}downloadDoc(t){let o=new xe;o.pdfexce
1l=t,o.itemperpage="",o.pageno="",o.roleid=this.roleObj.id,o.userid=this.usernameObj.customerid,o.fromdate=this.reportFormRequest.fromdate,o.todate=this.reportFormRequest.todate,o.fromtime=this.reportFormRequest.fromtime,o.totime=this.reportFormRequest.totime,o.searchby=this.reportFormRequest.searchby.trim();try{this.loader.loaderOn()}catch(i){}this.es.apiCall(o,"apilogreport").subscribe(i=>{try{this.loader.loaderOff()}catch(r){}"200"==i.statusCode&&(this.filePath=i.message,this.es.commonFileDownload(this.filePath)),o.pdfexcel=""})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(S.R),e.Y36(U.v),e.Y36(N.D),e.Y36(M.F0),e.Y36(F.P),e.Y36(D.X),e.Y36(J.S),e.Y36(g.uU))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-api-log-report"]],viewQuery:function(t,o){if(1&t&&e.Gf(Ur,5),2&t){let i;e.iGM(i=e.CRH())&&(o.reportForm=i.first)}},decls:124,vars:31,consts:[[1,"report-form-container","p-1"],[1,"reportheader"],["aria-hidden","true",1,"fa","fa-credit-card"],[1,"rptheadertext"],[1,"container-fluid",3,"ngStyle"],[1,"row"],[1,"col-md-12"],["novalidate","","id","form_id","autocomplete","off",1,"needs-validation"],["reportForm","ngForm"],["class","col-md-2",4,"ngIf"],[1,"col-md-2"],[1,"form-group"],[1,"mb-0","text-capitalize"],[1,"text-danger"],["name","username","placeholder","Select User","required","",1,"text-capitalize",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange"],["usernameCtrl","ngModel"],[3,"value",4,"ngFor","ngForOf"],["class","form-control-feedback text-danger text-danger",4,"ngIf"],[1,"col-md-3"],[1,"report-label","mb-0"],["type","text","name","date","id","datepicker","required","","placeholder","Select Date",1,"form-control","form-control-sm"],[1,"col"],[1,"form-group","mb-0",2,"width","85px","float","left"],[1,"mb-0"],["type","text","name","timepicker","id","fromtime",1,"fromTime","form-control","form-control-sm","text-center"],[1,"form-group",2,"width","85px","float","left"],["type","text","name","timepicker","id","totime",1,"toTime","form-control","form-control-sm","text-center"],[1,"col","mt-3"],["type","submit",1,"custom-btn","btn-13","float-right","Show","mb-3",3,"click"],["type","button",1,"custom-btn","btn-10","float-right","mr-2",3,"click"],[1,"report-form-container"],[1,"row","grid-section",3,"ngStyle"],[1,"row","py-2","report-summary"],[1,"col-md-5"],[1,"fw-bolder","text-small","text-uppercase","outputlabel"],[1,"text-uppercase","text-small","outputlabel"],[1,"col-md-6"],[1,"col-md-1","text-end","float-end"],["ngbTooltip","Back",1,"backbtnbackground",3,"click"],["aria-hidden","true",1,"fa","fa-arrow-circle-o-left","outputlabel"],[1,"col-md-12","px-0"],[1,"table-head","d-flex","justify-content-between"],["id","tickets-table_info","role","status","aria-live","polite",1,"col-auto","mt-2","text-center","fw-bold","total-record-label"],[4,"ngIf"],[1,"mt-1"],[1,"itemsperpage-style",2,"margin-right","10px"],[1,"d-inline-flex","align-items-center"],["name","table_length","aria-controls","table","name","pageSize",3,"ngModel","ngModelChange","change"],["value","10","selected",""],["value","20",4,"ngIf"],["value","50",4,"ngIf"],["value","100",4,"ngIf"],[3,"value",4,"ngIf"],["type","button",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"click"],["aria-hidden","true",1,"fa","fa-refresh"],["type","button","ngbTooltip","Download Pdf","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-pdf-o","pdf-btn"],["type","button","ngbTooltip","Download Excel","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-excel-o","excel-btn"],["type","text","name","searchTerm","autocomplete","off","aria-controls","tickets-table","placeholder","Search here....","autocomplete","off",1,"form-control","form-control-sm","ms-2","searchinput",2,"width","165px",3,"ngModel","ngModelChange"],["type","button",1,"btn","search-btn",3,"click"],[1,"fa","fa-search"],[1,"scroll-tbl"],[1,"table","table-striped","table-style",2,"overflow-y","auto","overflow-x","auto"],[2,"width","40px",3,"click"],[1,"fa","fa-sort-amount-desc"],[3,"click"],[1,"text-end",3,"click"],[1,"row","justify-content-md-between","align-items-md-center","mt-2"],["class","float-end text-start",4,"ngIf"],[1,"mb-0","label"],["name","role","placeholder","Select Role","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["roleCtrl","ngModel"],[3,"value"],[1,"form-control-feedback","text-danger","text-danger"],["class","text-small",4,"ngIf"],[1,"text-small"],["value","20"],["value","50"],["value","100"],["colspan","15"],[1,"text-center"],[4,"ngFor","ngForOf"],[1,"srnotd"],[1,"float-end","text-start"],["size","sm",1,"d-flex","mt-2","justify-content-end","pagination-rounded","pagination","pagination-info",3,"collectionSize","page","maxSize","pageSize","pageChange"]],template:function(t,o){if(1&t&&(e.TgZ(0,"div",0)(1,"div")(2,"h5",1),e._UZ(3,"i",2),e._uU(4,"\xa0\xa0\xa0"),e.TgZ(5,"span",3),e._uU(6,"API Log Report"),e.qZA()()(),e.TgZ(7,"div",4)(8,"div",5)(9,"div",6)(10,"form",7,8)(12,"div",5),e.YNc(13,Lr,10,9,"div",9),e.TgZ(14,"div",10)(15,"div",11)(16,"label",12),e._uU(17,"User List"),e.TgZ(18,"span",13),e._uU(19,"*"),e.qZA()(),e.TgZ(20,"ng-select",14,15),e.NdJ("ngModelChange",function(r){return o.userObj=r}),e.YNc(22,Yr,2,2,"ng-option",16),e.qZA(),e.YNc(23,Pr,2,1,"span",17),e.qZA()(),e.TgZ(24,"div",18)(25,"div",11)(26,"label",19),e._uU(27,"Date Range:"),e.qZA(),e._UZ(28,"input",20),e.qZA()(),e.TgZ(29,"div",21)(30,"div",22)(31,"label",23),e._uU(32,"Time "),e.qZA(),e._UZ(33,"input",24),e.qZA(),e._uU(34," \xa0\xa0\xa0 "),e.TgZ(35,"div",25),e._UZ(36,"label",23)(37,"input",26),e.qZA()(),e.TgZ(38,"div",27)(39,"button",28),e.NdJ("click",function(){return o.validateForm()}),e._uU(40,"Generate"),e.qZA(),e._uU(41," \xa0 "),e.TgZ(42,"button",29),e.NdJ("click",function(){return o.ResetForm()}),e._uU(43,"Reset"),e.qZA()()()()()()(),e.TgZ(44,"div",30)(45,"div",31)(46,"div",6)(47,"div",32)(48,"div",33)(49,"span",34),e._uU(50),e.qZA(),e.TgZ(51,"span",35),e._uU(52),e.qZA()(),e.TgZ(53,"div",36)(54,"span",34),e._uU(55,"Date :"),e.qZA(),e.TgZ(56,"span",35),e._uU(57),e.qZA()(),e.TgZ(58,"div",37)(59,"button",38),e.NdJ("click",function(){return o.redirectToForm()}),e._UZ(60,"i",39),e.qZA()()()(),e.TgZ(61,"div",40)(62,"div",41)(63,"div",42),e.YNc(64,Qr,2,3,"span",43),e.qZA(),e.TgZ(65,"div",44)(66,"span",45)(67,"label",46),e._uU(68,"Show "),e.TgZ(69,"select",47),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.itemperpage=r})("change",function(){return o.details("showrow")}),e.TgZ(70,"option",48),e._uU(71," 10"),e.qZA(),e.YNc(72,Vr,2,0,"option",49),e.YNc(73,Er,2,0,"option",50),e.YNc(74,zr,2,0,"option",51),e.YNc(75,Hr,2,2,"option",52),e.qZA(),e._uU(76," entries"),e.qZA()(),e.TgZ(77,"span")(78,"button",53),e.NdJ("click",function(){return o.details("refresh")}),e._UZ(79,"i",54),e.qZA()(),e.TgZ(80,"span")(81,"button",55),e.NdJ("click",function(){return o.downloadDoc("pdf")}
1),e._UZ(82,"i",56),e.qZA(),e.TgZ(83,"button",57),e.NdJ("click",function(){return o.downloadDoc("excel")}),e._UZ(84,"i",58),e.qZA()(),e.TgZ(85,"label")(86,"input",59),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.searchby=r}),e.qZA()(),e.TgZ(87,"button",60),e.NdJ("click",function(){return o.details("search")}),e._UZ(88,"span",61),e.qZA()()(),e.TgZ(89,"div",62)(90,"table",63)(91,"thead")(92,"tr")(93,"th",64),e.NdJ("click",function(r){return o.sorting(r,"rowno")}),e._uU(94,"#"),e._UZ(95,"i",65),e.qZA(),e.TgZ(96,"th",66),e.NdJ("click",function(r){return o.sorting(r,"apiname")}),e._uU(97,"API Name "),e._UZ(98,"i",65),e.qZA(),e.TgZ(99,"th",66),e.NdJ("click",function(r){return o.sorting(r,"apitype")}),e._uU(100,"API Type "),e._UZ(101,"i",65),e.qZA(),e.TgZ(102,"th",67),e.NdJ("click",function(r){return o.sorting(r,"pagename")}),e._uU(103,"Page Name "),e._UZ(104,"i",65),e.qZA(),e.TgZ(105,"th",66),e.NdJ("click",function(r){return o.sorting(r,"pageurl")}),e._uU(106,"Page URL "),e._UZ(107,"i",65),e.qZA(),e.TgZ(108,"th",66),e.NdJ("click",function(r){return o.sorting(r,"requestbody")}),e._uU(109,"Request Body "),e._UZ(110,"i",65),e.qZA(),e.TgZ(111,"th",66),e.NdJ("click",function(r){return o.sorting(r,"apirespo")}),e._uU(112,"API Response "),e._UZ(113,"i",65),e.qZA(),e.TgZ(114,"th",66),e.NdJ("click",function(r){return o.sorting(r,"status")}),e._uU(115,"Status "),e._UZ(116,"i",65),e.qZA(),e.TgZ(117,"th",66),e.NdJ("click",function(r){return o.sorting(r,"eventtiime")}),e._uU(118,"Event Time "),e._UZ(119,"i",65),e.qZA()()(),e.YNc(120,$r,5,0,"tbody",43),e.YNc(121,Gr,2,1,"tbody",43),e.qZA()(),e.TgZ(122,"div",68),e.YNc(123,Wr,2,4,"div",69),e.qZA()()()()()),2&t){const i=e.MAs(11),r=e.MAs(21);e.xp6(7),e.Q6J("ngStyle",e.VKq(24,Ie,o.formsection?"":"none")),e.xp6(6),e.Q6J("ngIf","101"==o.loginRoleId||"600"==o.loginRoleId),e.xp6(7),e.Q6J("ngClass",e.WLB(26,De,r.valid,r.invalid&&i.submitted))("ngModel",o.userObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",o.customerList),e.xp6(1),e.Q6J("ngIf",r.errors&&(r.dirty||r.touched||i.submitted)),e.xp6(22),e.Q6J("ngStyle",e.VKq(29,Ie,o.detailsection?"":"none")),e.xp6(5),e.hij("",o.customerTypeName," :"),e.xp6(2),e.hij(" ",o.customerName,""),e.xp6(5),e.hij(" ",o.dateRange,""),e.xp6(7),e.Q6J("ngIf",0!=o.totalCount),e.xp6(5),e.Q6J("ngModel",o.reportFormRequest.itemperpage),e.xp6(3),e.Q6J("ngIf",o.totalCount>20),e.xp6(1),e.Q6J("ngIf",o.totalCount>50),e.xp6(1),e.Q6J("ngIf",o.totalCount>100),e.xp6(1),e.Q6J("ngIf",o.totalCount<100&&o.totalCount>10),e.xp6(6),e.Q6J("disabled","0"==o.totalCount),e.xp6(2),e.Q6J("disabled","0"==o.totalCount),e.xp6(3),e.Q6J("ngModel",o.reportFormRequest.searchby),e.xp6(34),e.Q6J("ngIf",0==o.totalCount),e.xp6(1),e.Q6J("ngIf",0!=o.totalCount),e.xp6(2),e.Q6J("ngIf",o.totalCount>o.reportFormRequest.itemperpage)}},directives:[g.PC,c._Y,c.JL,c.F,g.O5,A.w9,c.Q7,g.mk,c.JJ,c.On,g.sg,A.xv,C._L,c.EJ,c.YN,c.Kr,c.Fj,C.N9],styles:[".ng-select.ng-select-single .ng-select-container .ng-value-container{font-size:12px!important} .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{font-size:12px!important;text-transform:capitalize}ng-select.ng-select-single[_ngcontent-%COMP%] .ng-select-container{min-height:26px;max-height:26px;height:26px}.form-control[_ngcontent-%COMP%]{height:calc(1.45rem + 2px)}.invalid-feedback[_ngcontent-%COMP%]{font-size:11px;color:#dc3545}input[_ngcontent-%COMP%]{font-size:12px}.starvalid[_ngcontent-%COMP%]{color:#ff0040!important}.validationmsg[_ngcontent-%COMP%]{--bs-text-opacity: 1;color:#ff0040!important;font-weight:600}.shimmerBG[_ngcontent-%COMP%]{animation-duration:2.2s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:shimmer;animation-timing-function:linear;background:#E5F0FB;background:linear-gradient(to right,#cfeeeb 4%,#9ac9c6 25%,#d5f0f0 36%);background-size:1100px 100%}@keyframes shimmer{0%{background-position:-1200px 0}to{background-position:1200px 0}}.media[_ngcontent-%COMP%]{height:110px}.p-32[_ngcontent-%COMP%]{padding:32px}.title-line[_ngcontent-%COMP%]{height:24px;width:100%;margin-bottom:12px;border-radius:20px}.content-line[_ngcontent-%COMP%]{height:8px;width:100%;margin-bottom:16px;border-radius:8px}.end[_ngcontent-%COMP%]{width:40%}.m-t-24[_ngcontent-%COMP%]{margin-top:24px}.rptheadertext[_ngcontent-%COMP%]{text-decoration:underline}.rptlabel[_ngcontent-%COMP%]{color:#000}.outputlabel[_ngcontent-%COMP%]{color:#fff}.backbtn[_ngcontent-%COMP%]{float:right;margin-left:25%!important;margin-top:-1%!important}.srnotd[_ngcontent-%COMP%]{background-color:#809b92}.form-group[_ngcontent-%COMP%]{margin-bottom:.2rem}"]}),n})();var Je=v(76527),Xr=v(109),ea=v(75044),ta=v(76785),oa=v(90760);const na=["reportForm"];function ia(n,a){if(1&n&&(e.TgZ(0,"ng-option",16),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function ra(n,a){1&n&&(e.TgZ(0,"span",110),e._uU(1,"Filter type is mandatory"),e.qZA())}function aa(n,a){if(1&n&&(e.TgZ(0,"span",108),e.YNc(1,ra,2,0,"span",109),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}const ue=function(n,a){return{"is-valid":n,"ng-error":a}};function sa(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",10)(1,"div",11)(2,"label",12),e._uU(3,"Filter Type "),e.TgZ(4,"span",104),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",105,106),e.NdJ("ngModelChange",function(i){return e.CHM(t),e.oxw().roleTypeObj=i})("change",function(){return e.CHM(t),e.oxw().onChangeCustomerType()}),e.YNc(8,ia,2,2,"ng-option",17),e.qZA(),e.YNc(9,aa,2,1,"span",107),e.qZA()()}if(2&n){const t=e.MAs(7),o=e.oxw(),i=e.MAs(11);e.xp6(6),e.Q6J("ngClass",e.WLB(6,ue,t.valid,t.invalid&&i.submitted))("ngModel",o.roleTypeObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",o.roleList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||i.submitted))}}function la(n,a){if(1&n&&(e.TgZ(0,"ng-option",16),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function ca(n,a){if(1&n&&(e.TgZ(0,"span",110),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.hij("",t.customerTypeName," name is mandatory")}}function pa(n,a){if(1&n&&(e.TgZ(0,"span",108),e.YNc(1,ca,2,1,"span",109),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function ma(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",10)(1,"div",11)(2,"label",111),e._uU(3),e.TgZ(4,"span",104),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",112,113),e.NdJ("ngModelChange",function(i){return e.CHM(t),e.oxw().customerNameObj=i})("change",function(){return e.CHM(t),e.oxw().onChangeCustomerList()}),e.YNc(8,la,2,2,"ng-option",17),e.qZA(),e.YNc(9,pa,2,1,"span",107),e.qZA()()}if(2&n){const t=e.MAs(7),o=e.oxw(),i=e.MAs(11);e.xp6(3),e.hij("",o.customerTypeName," List"),e.xp6(3),e.MGl("placeholder","Select ",o.customerTypeName," "),e.Q6J("ngClass",e.WLB(8,ue,t.valid,t.invalid&&i.submitted))("ngModel",o.customerNameObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",o.customerList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||i.submitted))}}function da(n,a){if(1&n&&(e.TgZ(0,"ng-option",16),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(t.name)}}function ua(n,a){1&n&&(e.TgZ(0,"span",116),e._uU(1,"Vehicle is mandatory"),e.qZA())}function ga(n,a){if(1&n&&(e.TgZ(0,"span",114),e.YNc(1,ua,2,0,"span",115),e.qZA()),2&n){e.oxw();const t=e.MAs(22);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function ha(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.lnq("Showing ",t.recordFrom," To ",t.recordTo," (Out Of ",t.totalCount,")Entries")}}function _a(n,a){1&n&&(e.TgZ(0,"option",117),e._uU(1,"20"),e.qZA())}function fa(n,a){1&n&&(e.TgZ(0,"option",118),e._uU(1,"50"),e.qZA())}function ba(n,a){1&n&&(e.TgZ(0,"option",119),e._uU(1,"100"),e.qZA())}function va(n,a){if(1&n&&(e.TgZ(0,"option",16),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.Q6J("value",t.totalCount),e.xp6(1),e.hij(" ",t.totalCount," ")}}function Ta(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",66),e.NdJ("click",function(i){return e.CHM(t),e.oxw().sorting(i,"vehicleno")}),e._uU(1,"Vehicle No."),e._UZ(2,"i",67),e.qZA()}}function Za(n,a){1&n&&(e.TgZ(0,"tbody")(1,"tr")(2,"td",120)(3,"div",71),e._uU(4,"No Record Found"),e.qZA()()()())}function xa(n,a){if(1&n&&(e.TgZ(0,"td"),e._uU(1),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(""==t.vehicleno?"Not Found":t.vehicleno)}}function ya(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"tr")(1,"td",121),e._uU(2),e.qZA(),e.YNc(3,xa,2,1,"td",44),e.TgZ(4,"td"),e._uU(5),e.qZA(),e.TgZ(6,"td")(7,"span",122),e._uU(8),e.qZA(),e._UZ(9,"br"),e._uU(10),e.qZA(),e.TgZ(11,"td")(12,"span",122),e._uU(13),e.qZA(),e._UZ(14,"br"),e._uU(15),e.qZA(),e.TgZ(16,"td",72),e._uU(17),e.qZA(),e.TgZ(18,"td")(19,"button",123),e.NdJ("click",function(){const r=e.CHM(t).$implicit;return e.oxw(2).openStoppagesModal(r)}),e._uU(20,"View Stoppages"),e.qZA()(),e.TgZ(21,"td",72)(22,"button",124),e.NdJ("click",function(){const r=e.CHM(t).$implicit;return e.oxw(2).trackVehicle(r)}),e._UZ(23,"i",125),e.qZA()()()}if(2&n){const t=a.$implicit,o=e.oxw(2);e.xp6(2),e.Oqu(t.rowno),e.xp6(1),e.Q6J("ngIf",""==o.busNumber),e.xp6(2),e.Oqu(""==t.tripname?"Not Found":t.tripname),e.xp6(3),e.Oqu(""==t.startpoint?"Not Found":t.startpoint),e.xp6(2),e.hij(" ",""==t.starttime?"Not Found":t.starttime," "),e.xp6(3),e.Oqu(""==t.endpoint?"Not Found":t.endpoint),e.xp6(2),e.hij(" ",""==t.endtime?"Not Found":t.endtime,""),e.xp6(2),e.Oqu(""==t.tripdistance?"Not Found":t.tripdistance),e.xp6(2),e.Q6J("disabled",0==t.stoppagedetails.length)}}function Ca(n,a){if(1&n&&(e.TgZ(0,"tbody"),e.YNc(1,ya,24,9,"tr",83),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.detailData)}}function Aa(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",126)(1,"ngb-pagination",127),e.NdJ("pageChange",function(i){return e.CHM(t),e.oxw().reportFormRequest.pageno=i})("pageChange",function(){return e.CHM(t),e.oxw().details("pagination")}),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("collectionSize",t.totalCount)("page",t.reportFormRequest.pageno)("maxSize",3)("pageSize",t.reportFormRequest.itemperpage)}}function qa(n,a){if(1&n&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA()()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(t.stoppagesequence),e.xp6(2),e.Oqu(t.stoppagename),e.xp6(2),e.Oqu(t.arrivaltime),e.xp6(2),e.Oqu(t.departuretime),e.xp6(2),e.Oqu(t.duration)}}function Oa(n,a){if(1&n&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA()()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(t.stoppagesequence),e.xp6(2),e.Oqu(t.stoppagename),e.xp6(2),e.Oqu(t.arrivaltime),e.xp6(2),e.Oqu(t.departuretime),e.xp6(2),e.Oqu(t.duration)}}function Ra(n,a){1&n&&(e.TgZ(0,"span"),e._UZ(1,"img",130),e.qZA())}function ka(n,a){1&n&&e._UZ(0,"img",131)}function wa(n,a){if(1&n&&(e.TgZ(0,"div")(1,"p",96),e._uU(2),e.qZA(),e.TgZ(3,"p",96
1),e._uU(4," Ignition : "),e.YNc(5,Ra,2,0,"span",44),e.YNc(6,ka,1,0,"img",128),e._uU(7),e.ALo(8,"uppercase"),e.qZA(),e.TgZ(9,"p",96),e._uU(10),e.qZA(),e.TgZ(11,"p",129),e._uU(12),e.qZA()()),2&n){const t=e.oxw();e.xp6(2),e.hij(" Last Polling Time : ",t.mapService.historyVehicleData.pollingdatatime," "),e.xp6(3),e.Q6J("ngIf","on"==t.mapService.historyVehicleData.ignitionstatus.toLowerCase()),e.xp6(1),e.Q6J("ngIf","off"==t.mapService.historyVehicleData.ignitionstatus.toLowerCase()),e.xp6(1),e.hij(" ",e.lcZ(8,6,t.mapService.historyVehicleData.ignitionstatus)," "),e.xp6(3),e.hij("Speed : ",t.mapService.historyVehicleData.speed," Km/hr"),e.xp6(2),e.hij("Location : ",t.mapService.historyVehicleData.location," ")}}function Ma(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",132),e.NdJ("click",function(){return e.CHM(t),e.oxw().mapService.changeAnimation("play")}),e._uU(1," Play "),e.qZA()}}function Na(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",133),e.NdJ("click",function(){return e.CHM(t),e.oxw().mapService.changeAnimation("pause")}),e._uU(1," Pause "),e.qZA()}}function Fa(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",134),e.NdJ("click",function(){return e.CHM(t),e.oxw().mapService.changeAnimation("stop")}),e._uU(1," Stop "),e.qZA()}}const ge=function(n){return{display:n}};let Sa=(()=>{class n{constructor(t,o,i,r,s,l,d,m,_){var b=this;this.cv=t,this.cs=o,this.loader=i,this.route=r,this.es=s,this.listService=l,this.apiService=d,this.mapService=m,this.datePipe=_,this.loginRoleId=sessionStorage.getItem("loginroleid"),this.dateObj="",this.reportFormRequest=new ye,this.detailData=[],this.apiname="",this.formsection=!0,this.loadersection=!1,this.detailsection=!1,this.pageHeading="Trip Report",this.busNumber="",this.dateRange="",this.geomDetails=new h.LX,this.allVehicleObject={imeino:"",id:"all",name:"All",driverid:"",conductorid:""},this.selectedBusList=[],this.roleList=[],this.customerTypeName="",this.customerList=[],this.sortDir=1,this.tripData=new Ae,this.plotTripMap=function(){var x=(0,u.Z)(function*(T){var Z,I,R,k,O,q;null===(Z=b.mapService.routeLayer.getSource())||void 0===Z||Z.clear(),null===(I=b.mapService.poiLayer.getSource())||void 0===I||I.clear();let w=[],H=[],fe=T.routeid,js=(yield b.getGeomDetails(fe)).entity.geomdetails[0],Ps=JSON.parse(js.geomjson).geometry.coordinates;var Ye=new Je.Z(Ps);Ye.transform("EPSG:4326","EPSG:3857");var Qs=new Xr.ZP({fill:new ea.Z({color:"#000000"}),stroke:new ta.Z({color:"#00000",width:3})});let je=new P.Z({geometry:Ye});je.setStyle(Qs),w.push(je),null===(R=b.mapService.routeLayer.getSource())||void 0===R||R.clear(),null===(k=b.mapService.routeLayer.getSource())||void 0===k||k.addFeatures(w);let X=new y.Hs;X.pageno="",X.itemperpage="",X.geomtypeid="111",b.geomDetails=yield b.apiService.geomdetails(X);for(let ee=0;ee<T.stoppagedetails.length;ee++)for(let B=0;B<b.geomDetails.entity.geomdetails.length;B++)if(T.stoppagedetails[ee].stoppagename==b.geomDetails.entity.geomdetails[B].geomname){let Vs=JSON.parse(b.geomDetails.entity.geomdetails[B].geomjson).geometry.coordinates,be=new P.Z({geometry:new E.Z(j.mi(Vs))});be.setStyle(b.mapService.poiStyleFunction);let Es=Object.assign(b.geomDetails.entity.geomdetails[B],T.stoppagedetails[ee]);be.setProperties({properties:Es}),H.push(be)}null===(O=b.mapService.poiLayer.getSource())||void 0===O||O.clear(),null===(q=b.mapService.poiLayer.getSource())||void 0===q||q.addFeatures(H)});return function(T){return x.apply(this,arguments)}}(),this.getGeomDetails=function(){var x=(0,u.Z)(function*(T){let Z=new y.Hs;return Z.geomid=T,yield b.apiService.geomdetails(Z)});return function(T){return x.apply(this,arguments)}}(),this.mapVehicleDetails=new Ae}ngOnInit(){$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"}),this.getDate(),"101"==this.loginRoleId||"600"==this.loginRoleId?this.getRoleList():this.getVehicleList()}getRoleList(){var t=this;return(0,u.Z)(function*(){t.roleList=[],t.roleList=yield t.listService.getRoleList(new h.nO),t.roleList.push({id:"3",name:"vehicle"}),t.roleList=t.roleList.filter(o=>"school"==o.name||"customer"==o.name||"vehicle"==o.name)})()}onChangeCustomerType(){this.roleTypeObj&&(this.vehicleList=[],this.customerTypeName="","school"==this.roleTypeObj.name||"customer"==this.roleTypeObj.name?(this.customerTypeName=this.roleTypeObj.name,this.getCustomerList()):"vehicle"==this.roleTypeObj.name&&this.getVehicleList())}getCustomerList(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;o.filter1=t.roleTypeObj.id,t.customerList=yield t.listService.getCustomerList(o)})()}onChangeCustomerList(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;t.customerNameObj&&("school"==t.roleTypeObj.name?o.filter1=t.customerNameObj.id:"customer"==t.roleTypeObj.name&&(o.filter2=t.customerNameObj.id)),t.vehicleList=yield t.listService.getVehicleList(o)})()}getVehicleList(){var t=this;return(0,u.Z)(function*(){t.vehicleList=yield t.listService.getVehicleList(new h.nO)})()}getDate(){$(()=>{$('input[name="date"]').daterangepicker({showDropdowns:!0,startDate:p().startOf("day").format("DD-MMM-YYYY"),endDate:p().endOf("day").format("DD-MMM-YYYY"),opens:"center",drops:"down",maxSpan:{days:30},locale:{format:"DD-MMM-YYYY"},ranges:{Today:[p(),p()],Yesterday:[p().subtract(1,"days"),p().subtract(1,"days")],"This Week":[p().startOf("week"),p().endOf("week")],"This Month":[p().startOf("month"),p().endOf("day")]},maxDate:new Date,minYear:2022,maxYear:parseInt(p().format("YYYY"),10),function(t,o){$("#datepicker").html(t.format("DD-MMM-YYYY")+" : "+o.format("DD-MMM-YYYY"))}}),$('input[name="date"]').on("hide.daterangepicker",(t,o)=>{try{this.dateObj=t.target.value}catch(i){}}),this.dateObj=document.getElementById("datepicker").value})}onChangeSchool(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;o.schoolid=t.schoolObj.id,t.vehicleList=yield t.listService.getVehicleList(o)})()}checkAllBus(){-1!=this.selectedBusList.findIndex(t=>"all"==t.id.toLowerCase())&&(this.selectedBusList="all"==this.selectedBusList[this.selectedBusList.length-1].id.toLowerCase()?this.selectedBusList.filter(t=>"all"==t.id.toLowerCase()):this.selectedBusList.filter(t=>"all"!=t.id.toLowerCase())),this.busNumber=1==this.selectedBusList.length&&"All"!=this.selectedBusList[0].name?this.selectedBusList[0].name:""}
1validateForm(){if(this.reportForm.valid){if(this.formsection=!1,this.loadersection=!0,this.customerName=this.customerNameObj?this.customerNameObj.name:"",this.reportFormRequest.customerid=this.customerNameObj?this.customerNameObj.id:"",this.selectedBusList.length>0){this.customerName=this.selectedBusList[0].customername;let o=[];this.selectedBusList.forEach(i=>{o.push(i.name)}),this.busNumber=o.toString(),console.log(this.busNumber)}"school"==this.customerTypeName&&(this.customerName=this.customerNameObj.name),"customer"==this.customerTypeName&&(this.customerName=this.customerNameObj.name),this.reportFormRequest.vehicleidList=this.selectedBusList.map(o=>o.id);let t=this.dateObj.split(" - ");this.reportFormRequest.fromdate=t[0],this.reportFormRequest.todate=t[1],this.reportFormRequest.fromtime=document.getElementById("fromtime").value.replace(" ","").replace(" ",""),this.reportFormRequest.totime=document.getElementById("totime").value.replace(" ","").replace(" ",""),this.dateRange=this.reportFormRequest.fromdate+" "+this.reportFormRequest.fromtime+" To "+this.reportFormRequest.todate+" "+this.reportFormRequest.totime,this.details("refresh")}}details(t){try{this.loader.loaderOff()}catch(o){}"showrow"==t&&(this.reportFormRequest.pageno=1),"search"==t&&(this.reportFormRequest.pageno=1),"refresh"==t&&(this.reportFormRequest.searchby="",this.reportFormRequest.pageno=1,this.reportFormRequest.itemperpage=10),this.reportFormRequest.searchby=this.reportFormRequest.searchby.trim(),this.formsection=!1,this.loadersection=!0;try{this.loader.loaderOn()}catch(o){}this.es.apiCall(this.reportFormRequest,"tripreport").subscribe(o=>{try{this.loader.loaderOff()}catch(i){}200==o.statusCode?(this.detailData=o.entity.tripreortdetail,this.totalCount=+o.entity.totalrecord,this.recordFrom=this.detailData[0].rowno,this.recordTo=this.detailData[this.detailData.length-1].rowno,this.loadersection=!1,this.formsection=!1,this.detailsection=!0):(this.detailData=[],this.recordTo=0,this.recordFrom=0,this.totalCount=0,this.reportFormRequest.searchby="",this.detailsection=!0,this.formsection=!1,this.loadersection=!1),this.es.pageDataInfo("",this.reportFormRequest,"Trip Report","Details method","Called Function",o.message)},o=>{this.loader.logout()})}redirectToForm(){this.formsection=!0,this.loadersection=!1,this.detailsection=!1}ResetForm(){this.reportForm.resetForm(),this.formsection=!0,this.detailsection=!1,this.getDate(),setTimeout(()=>{$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"})},1500),this.getRoleList(),this.roleTypeObj=null,this.customerNameObj=null,this.schoolObj=null,this.busNoObj=null,this.vehicleList=[]}sorting(t,o){try{let r=t.currentTarget.childNodes[1].classList;try{r.contains("fa-sort-amount-desc")?(r.remove("fa-sort-amount-desc"),r.add("fa-sort-amount-asc")):(r.remove("fa-sort-amount-asc"),r.add("fa-sort-amount-desc"))}catch(s){console.log("e "+s)}this.sortDir=1==this.sortDir?-1:1;try{this.detailData.length>0&&this.detailData.sort((s,l)=>(s=s[o].toLowerCase(),l=l[o].toLowerCase(),s.localeCompare(l)*this.sortDir))}catch(s){console.log("e "+s)}}catch(i){}}downloadDoc(t){let o=new ye;o.pdfexcel=t,o.itemperpage="",o.pageno="",o.vehicleidList=this.reportFormRequest.vehicleidList,o.fromdate=this.reportFormRequest.fromdate,o.todate=this.reportFormRequest.todate,o.searchby=this.reportFormRequest.searchby.trim();try{this.loader.loaderOn()}catch(i){}this.es.apiCall(o,"tripreport").subscribe(i=>{try{this.loader.loaderOff()}catch(r){}"200"==i.statusCode&&(this.filePath=i.message,this.es.commonFileDownload(this.filePath)),o.pdfexcel="",this.es.pageDataInfo("",this.reportFormRequest,"Trip Report","Download PDF/Excel method","Called Function",i.message)})}openStoppagesModal(t){$("#stoppagesModal").modal("show"),this.tripData=t}trackVehicle(t){var o=this;return(0,u.Z)(function*(){var i,r,s,l;o.mapService.clearAllLayers();let d=[],m=[];o.tripData=t,console.log(o.tripData);let b=(yield o.getGeomDetails(t.routeid)).entity.geomdetails[0],x=JSON.parse(b.geomjson).geometry.coordinates;var T=new Je.Z(x);T.transform("EPSG:4326","EPSG:3857");let Z=new P.Z({geometry:T});Z.setStyle(o.mapService.geomRouteStyle),d.push(Z),null===(i=o.mapService.routeLayer.getSource())||void 0===i||i.clear(),null===(r=o.mapService.routeLayer.getSource())||void 0===r||r.addFeatures(d);const I=(0,oa.hI)(T.getCoordinates());try{o.mapService.map.getView().fit(I,{duration:1e3,padding:[100,100,100,100]})}catch(O){}let R=new y.Hs;R.pageno="",R.itemperpage="",R.geomtypeid="111",o.geomDetails=yield o.apiService.geomdetails(R);for(let O=0;O<t.stoppagedetails.length;O++)for(let q=0;q<o.geomDetails.entity.geomdetails.length;q++)if(t.stoppagedetails[O].stoppagename==o.geomDetails.entity.geomdetails[q].geomname){let w=JSON.parse(o.geomDetails.entity.geomdetails[q].geomjson).geometry.coordinates,H=new P.Z({geometry:new E.Z(j.mi(w))});H.setStyle(o.mapService.poiStyleFunction);let fe=Object.assign(o.geomDetails.entity.geomdetails[q],t.stoppagedetails[O]);H.setProperties({properties:fe}),m.push(H)}null===(s=o.mapService.poiLayer.getSource())||void 0===s||s.clear(),null===(l=o.mapService.poiLayer.getSource())||void 0===l||l.addFeatures(m),o.mapVehicleDetails=t;let k=new y.rn;k.imeino=t.deviceimeino,k.vehicleid=t.vehicleid,k.fromdate=o.datePipe.transform(t.starttime,"dd-MMM-yyyy"),k.fromtime=o.datePipe.transform(t.starttime,"hh:mm:ss a"),k.todate=o.datePipe.transform(t.endtime,"dd-MMM-yyyy"),k.totime=o.datePipe.transform(t.endtime,"hh:mm:ss a"),yield o.mapService.trackHistoryVehicle(k.imeino,k.fromdate,k.fromtime,k.todate,k.totime,k.vehicleid,"",!1,!1,new y.Us)})()}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(S.R),e.Y36(U.v),e.Y36(N.D),e.Y36(M.F0),e.Y36(F.P),e.Y36(D.X),e.Y36(z.s),e.Y36(J.S),e.Y36(g.uU))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-trip-report"]],viewQuery:function(t,o){if(1&t&&e.Gf(na,5),2&t){let i;e.iGM(i=e.CRH())&&(o.reportForm=i.first)}},decls:212,vars:54,consts:[[1,"report-form-container"],[1,"reportheader"],["aria-hidden","true",1,"fa","fa-credit-card"],[1,"rptheadertext"],[1,"container-fluid",3,"ngStyle"],[1,"row"],[1,"col-md-12"],["novalidate","","id","form_id","autocomplete","off",1,"needs-validation"],["reportForm","ngForm"],["class","col-md-2",4,"ngIf"],[1,"col-md-2"],[1,"form-group"],[1,"mb-0","label"],[1,"starvalid"],["name","vehicleNumber","placeholder","Select Vehicle","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["busNoCtrl","ngModel"],[3,"value"],[3,"value",4,"ngFor","ngForOf"],["class","form-control-feedback text-danger",4,"ngIf"],[1,"col-md-4"],[1,"d-flex","justify-content-between"],[1,"report-label","mb-0"],["type","text","name","date","id","datepicker","required","","placeholder","Select Date",1,"form-control","form-control-sm"],[1,"form-group","mb-0",2,"width","86px","float","left"],[1,"mb-0"],["type","text","name","timepicker","id","fromtime",1,"fromTime","form-control","form-control-sm","text-center"],[1,"form-group",2,"width","85px","float","left"],["type","text","name","timepicker","id","totime",1,"toTime","form-control","form-control-sm","text-center"],[1,"col","mt-3"],["type","submit",1,"custom-btn","btn-13","float-right","Show","mb-3",3,"click"],["type","button",1,"custom-btn","btn-10","float-right","mr-2",3,"click"],[1,"row","grid-section",3,"ngStyle"],[1,"row","py-2","report-summary"],[1,"col-md-3",3,"ngStyle"],[1,"fw-bolder","text-small","text-uppercase","outputlabel"],[1,"text-uppercase","text-small","outputlabel"],[1,"customerNameForSummary"],[1,"col-md-5"],[1,"col"],["ngbTooltip","Back",1,"backbtnbackground","float-end",3,"click"],["aria-hidden","true",1,"fa","fa-arrow-circle-o-left","outputlabel"],[1,"col-md-12","px-0"],[1,"table-head","d-flex","justify-content-between"],["id","tickets-table_info","role","status","aria-live","polite",1,"col-auto","mt-2","text-center","fw-bold","total-record-label"],[4,"ngIf"],[1,"mt-1"],[1,"itemsperpage-style",2,"margin-right","10px"],[1,"d-inline-flex","align-items-center"],["name","table_length","aria-controls","table","name","pageSize",3,"ngModel","ngModelChange","change"],["value","10","selected",""],["value","20",4,"ngIf"],["value","50",4,"ngIf"],["value","100",4,"ngIf"],[3,"value",4,"ngIf"],["type","button",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"click"],["aria-hidden","true",1,"fa","fa-refresh"],["type","button","ngbTooltip","Download Pdf","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-pdf-o","pdf-btn"],["type","button","ngbTooltip","Download Excel","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-excel-o","excel-btn"],["type","text","name","searchTerm","autocomplete","off","aria-controls","tickets-table","placeholder","Search here....","autocomplete","off",1,"form-control","form-control-sm","ms-2","searchinput",2,"width","165px",3,"ngModel","ngModelChange"],["type","button",1,"btn","search-btn",3,"click"],[1,"fa","fa-search"],[1,"scroll-tbl"],[1,"table","table-striped","table-style",2,"overflow-y","auto","overflow-x","auto"],[3,"click",4,"ngIf"],[3,"click"],[1,"fa","fa-sort-amount-desc"],[2,"width","126px",3,"click"],[2,"width","115px",3,"click"],[1,"text-end",2,"width","170px",3,"click"],[1,"text-center"],[1,"text-end"],[1,"fa","fa-map-marker","fa-2x"],[1,"row","justify-content-md-between","align-items-md-center","mt-2"],["class","float-end text-start",4,"ngIf"],["id","stoppagesModal","data-bs-backdrop","static","data-bs-keyboard","false","aria-labelledby","stoppagesModalLabel","aria-hidden","true",1,"modal","fade"],[1,"modal-dialog","modal
1-lg"],[1,"modal-content"],[1,"modal-header","bg-white"],["id","exampleModalLabel",1,"modal-title"],["type","button","data-bs-dismiss","modal","aria-label","Close",1,"btn-close",3,"click"],[1,"modal-body","p-0"],[4,"ngFor","ngForOf"],["id","exampleModal","tabindex","-1","data-bs-backdrop","static","data-bs-keyboard","false","aria-labelledby","exampleModalLabel","aria-hidden","true",1,"modal","fade"],[1,"modal-dialog","modal-xl"],[1,"modal-header","bg-white","px-1"],[2,"width","100%","height","500px"],[2,"position","absolute","top","0","left","0"],["ngbTooltip","View Stoppages","placement","bottom","data-bs-toggle","collapse","href","#collapse-1","aria-expanded","true","aria-controls","collapse-1",1,"btn","btn-sm","btn-primary","px-2","py-0","fw-bolder"],["id","collapse-1","role","tabpanel","aria-labelledby","heading-1","data-bs-parent","#accordion",1,"collapse","bg-white"],[1,"card-body","p-1"],[1,"table","table-striped","table-style"],[2,"width","100px"],[1,"current-vehicle-section"],[1,"p-1",2,"max-width","250px","font-size","12px"],[1,"m-0"],["role","group",1,"btn-group"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click"],["type","button","class","btn btn-sm btn-outline-primary","ngbTooltip","Play",3,"click",4,"ngIf"],["type","button","class","btn btn-sm btn-outline-primary","ngbTooltip","Pause",3,"click",4,"ngIf"],["type","button","class","btn btn-sm btn-outline-primary","ngbTooltip","Stop",3,"click",4,"ngIf"],[1,"col-12"],["type","range","min","1000","max","20000",1,"form-range","form-control","form-control-sm",3,"ngModel","change","ngModelChange"],[1,"text-danger"],["name","roletype","placeholder","Select Filter Type ","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["roleTypeCtrl","ngModel"],["class","form-control-feedback text-danger text-danger",4,"ngIf"],[1,"form-control-feedback","text-danger","text-danger"],["class","text-small",4,"ngIf"],[1,"text-small"],[1,"mb-0","text-capitalize"],["name","customertype","required","",1,"text-capitalize",3,"ngClass","ngModel","multiple","placeholder","closeOnSelect","ngModelChange","change"],["customerNameCtrl","ngModel"],[1,"form-control-feedback","text-danger"],["class","text-small","style","font-size: 10px;",4,"ngIf"],[1,"text-small",2,"font-size","10px"],["value","20"],["value","50"],["value","100"],["colspan","15"],[1,"srnotd"],[1,"fw-bold"],[1,"btn","btn-transparent","text-center","fw-bolder","text-primary",2,"cursor","pointer",3,"disabled","click"],["title","Track Vehicle Distance","data-bs-toggle","modal","data-bs-target","#exampleModal",1,"btn","btn-sm","btn-dark","p-1",3,"click"],[1,"fa","fa-map-marker"],[1,"float-end","text-start"],["size","sm",1,"d-flex","mt-2","justify-content-end","pagination-rounded","pagination","pagination-info",3,"collectionSize","page","maxSize","pageSize","pageChange"],["src","assets/school-management/images/poweroff.png","style","width: 20px;height: 20px;",4,"ngIf"],[1,"m-0",2,"word-wrap","break-word"],["src","assets/school-management/images/poweron.png",2,"width","20px","height","20px"],["src","assets/school-management/images/poweroff.png",2,"width","20px","height","20px"],["type","button","ngbTooltip","Play",1,"btn","btn-sm","btn-outline-primary",3,"click"],["type","button","ngbTooltip","Pause",1,"btn","btn-sm","btn-outline-primary",3,"click"],["type","button","ngbTooltip","Stop",1,"btn","btn-sm","btn-outline-primary",3,"click"]],template:function(t,o){if(1&t&&(e.TgZ(0,"div",0)(1,"div")(2,"h5",1),e._UZ(3,"i",2),e._uU(4,"\xa0\xa0\xa0"),e.TgZ(5,"span",3),e._uU(6,"Trip Report"),e.qZA()()(),e.TgZ(7,"div",4)(8,"div",5)(9,"div",6)(10,"form",7,8)(12,"div",5),e.YNc(13,sa,10,9,"div",9),e.YNc(14,ma,10,11,"div",9),e.TgZ(15,"div",10)(16,"div",11)(17,"label",12),e._uU(18,"Vehicle Number "),e.TgZ(19,"span",13),e._uU(20,"*"),e.qZA()(),e.TgZ(21,"ng-select",14,15),e.NdJ("ngModelChange",function(r){return o.selectedBusList=r})("change",function(){return o.checkAllBus()}),e.TgZ(23,"ng-option",16),e._uU(24),e.qZA(),e.YNc(25,da,2,2,"ng-option",17),e.qZA(),e.YNc(26,ga,2,1,"span",18),e.qZA()(),e.TgZ(27,"div",19)(28,"div",20)(29,"div",11)(30,"label",21),e._uU(31,"Date Range:"),e.qZA(),e._UZ(32,"input",22),e.qZA(),e.TgZ(33,"div",23)(34,"label",24),e._uU(35,"Time "),e.qZA(),e._UZ(36,"input",25),e.qZA(),e._uU(37," \xa0\xa0\xa0 "),e.TgZ(38,"div",26),e._UZ(39,"label",24)(40,"input",27),e.qZA()()(),e.TgZ(41,"div",28)(42,"button",29),e.NdJ("click",function(){return o.validateForm()}),e._uU(43,"Generate"),e.qZA(),e._uU(44," \xa0 "),e.TgZ(45,"button",30),e.NdJ("click",function(){return o.ResetForm()}),e._uU(46,"Reset"),e.qZA()()()()()()(),e.TgZ(47,"div",0)(48,"div",31)(49,"div",6)(50,"div",32)(51,"div",33)(52,"span",34),e._uU(53,"Vehicle :"),e.qZA(),e.TgZ(54,"span",35),e._uU(55),e.qZA(),e._UZ(56,"br"),e.TgZ(57,"span",36),e._uU(58),e.qZA()(),e.TgZ(59,"div",37)(60,"span",34),e._uU(61,"Date :"),e.qZA(),e.TgZ(62,"span",35),e._uU(63),e.qZA()(),e.TgZ(64,"div",38)(65,"button",39),e.NdJ("click",function(){return o.redirectToForm()}),e._UZ(66,"i",40),e.qZA()()()(),e.TgZ(67,"div",41)(68,"div",42)(69,"div",43),e.YNc(70,ha,2,3,"span",44),e.qZA(),e.TgZ(71,"div",45)(72,"span",46)(73,"label",47),e._uU(74,"Show "),e.TgZ(75,"select",48),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.itemperpage=r})("change",function(){return o.details("showrow")}),e.TgZ(76,"option",49),e._uU(77," 10"),e.qZA(),e.YNc(78,_a,2,0,"option",50),e.YNc(79,fa,2,0,"option",51),e.YNc(80,ba,2,0,"option",52),e.YNc(81,va,2,2,"option",53),e.qZA(),e._uU(82," entries"),e.qZA()(),e.TgZ(83,"span")(84,"button",54),e.NdJ("click",function(){return o.details("refresh")}),e._UZ(85,"i",55),e.qZA()(),e.TgZ(86,"span")(87,"button",56),e.NdJ("click",function(){return o.downloadDoc("pdf")}
1),e._UZ(88,"i",57),e.qZA(),e.TgZ(89,"button",58),e.NdJ("click",function(){return o.downloadDoc("excel")}),e._UZ(90,"i",59),e.qZA()(),e.TgZ(91,"label")(92,"input",60),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.searchby=r}),e.qZA()(),e.TgZ(93,"button",61),e.NdJ("click",function(){return o.details("search")}),e._UZ(94,"span",62),e.qZA()()(),e.TgZ(95,"div",63)(96,"table",64)(97,"thead")(98,"tr")(99,"th"),e._uU(100,"#"),e.qZA(),e.YNc(101,Ta,3,0,"th",65),e.TgZ(102,"th",66),e.NdJ("click",function(r){return o.sorting(r,"tripname")}),e._uU(103,"Trip Name"),e._UZ(104,"i",67),e.qZA(),e.TgZ(105,"th",68),e.NdJ("click",function(r){return o.sorting(r,"startpoint")}),e._uU(106,"Start Point"),e._UZ(107,"i",67),e.qZA(),e.TgZ(108,"th",69),e.NdJ("click",function(r){return o.sorting(r,"endpoint")}),e._uU(109,"End Point"),e._UZ(110,"i",67),e.qZA(),e.TgZ(111,"th",70),e.NdJ("click",function(r){return o.sorting(r,"tripdistance")}),e._uU(112,"Trip Distance (Km)"),e._UZ(113,"i",67),e.qZA(),e.TgZ(114,"th",71),e._uU(115,"Stoppages"),e.qZA(),e.TgZ(116,"th",72),e._UZ(117,"i",73),e.qZA()()(),e.YNc(118,Za,5,0,"tbody",44),e.YNc(119,Ca,2,1,"tbody",44),e.qZA()(),e.TgZ(120,"div",74),e.YNc(121,Aa,2,4,"div",75),e.qZA()()()(),e.TgZ(122,"div",76)(123,"div",77)(124,"div",78)(125,"div",79)(126,"h5",80)(127,"u"),e._uU(128," Trip Stoppages"),e.qZA(),e._uU(129," of "),e.TgZ(130,"b"),e._uU(131),e.qZA(),e._uU(132," from "),e.TgZ(133,"b"),e._uU(134),e.qZA(),e._uU(135," to "),e.TgZ(136,"b"),e._uU(137),e.qZA()(),e.TgZ(138,"button",81),e.NdJ("click",function(){return o.mapService.clearAllLayers()}),e.qZA()(),e.TgZ(139,"div",82)(140,"table",64)(141,"thead")(142,"tr")(143,"th"),e._uU(144,"#"),e.qZA(),e.TgZ(145,"th"),e._uU(146,"Stoppage Name"),e.qZA(),e.TgZ(147,"th"),e._uU(148,"Actual Arrival"),e.qZA(),e.TgZ(149,"th"),e._uU(150,"Actual Departure"),e.qZA(),e.TgZ(151,"th"),e._uU(152,"Duration"),e.qZA()()(),e.TgZ(153,"tbody"),e.YNc(154,qa,11,5,"tr",83),e.qZA()()()()()(),e.TgZ(155,"div",84)(156,"div",85)(157,"div",78)(158,"div",86)(159,"h5",80)(160,"u"),e._uU(161," Trip"),e.qZA(),e._uU(162," of "),e.TgZ(163,"b"),e._uU(164),e.qZA(),e._uU(165," from "),e.TgZ(166,"b"),e._uU(167),e.qZA(),e._uU(168," to "),e.TgZ(169,"b"),e._uU(170),e.qZA()(),e.TgZ(171,"button",81),e.NdJ("click",function(){return o.mapService.clearAllLayers()}),e.qZA()(),e.TgZ(172,"div",82)(173,"div",87),e._UZ(174,"app-helper-map"),e.TgZ(175,"div",88)(176,"button",89),e._uU(177," STOPPAGES "),e.qZA(),e.TgZ(178,"div",90)(179,"div",91)(180,"table",92)(181,"thead")(182,"tr")(183,"th"),e._uU(184,"#"),e.qZA(),e.TgZ(185,"th"),e._uU(186,"Stoppage"),e.qZA(),e.TgZ(187,"th",93),e._uU(188,"Actual Arrival"),e.qZA(),e.TgZ(189,"th",93),e._uU(190,"Actual Departure"),e.qZA(),e.TgZ(191,"th"),e._uU(192,"Duration"),e.qZA()()(),e.TgZ(193,"tbody"),e.YNc(194,Oa,11,5,"tr",83),e.qZA()()()()()(),e.TgZ(195,"div",94)(196,"div",95),e.YNc(197,wa,13,8,"div",44),e.TgZ(198,"p",96),e._uU(199),e.qZA(),e.TgZ(200,"p",96),e._uU(201),e.qZA(),e.TgZ(202,"p",96),e._uU(203),e.qZA(),e.TgZ(204,"div",97)(205,"button",98),e.NdJ("click",function(){return o.mapService.changeAnimation("restart")}),e._uU(206," Start "),e.qZA(),e.YNc(207,Ma,2,0,"button",99),e.YNc(208,Na,2,0,"button",100),e.YNc(209,Fa,2,0,"button",101),e.qZA(),e.TgZ(210,"div",102)(211,"input",103),e.NdJ("change",function(){return o.mapService.changeAnimation("speedchange")})("ngModelChange",function(r){return o.mapService.historySpeed=r}),e.qZA()()()()()()()()()),2&t){const i=e.MAs(11),r=e.MAs(22);e.xp6(7),e.Q6J("ngStyle",e.VKq(45,ge,o.formsection?"":"none")),e.xp6(6),e.Q6J("ngIf","101"==o.loginRoleId||"600"==o.loginRoleId),e.xp6(1),e.Q6J("ngIf",("101"==o.loginRoleId||"600"==o.loginRoleId)&&"school"==o.customerTypeName||"customer"==o.customerTypeName),e.xp6(7),e.Q6J("ngClass",e.WLB(47,ue,r.valid,r.invalid&&i.submitted))("ngModel",o.selectedBusList)("multiple",!0)("closeOnSelect",!1),e.xp6(2),e.Q6J("value",o.allVehicleObject),e.xp6(1),e.hij("",o.allVehicleObject.name," "),e.xp6(1),e.Q6J("ngForOf",o.vehicleList),e.xp6(1),e.Q6J("ngIf",r.errors&&(r.dirty||r.touched||i.submitted)),e.xp6(22),e.Q6J("ngStyle",e.VKq(50,ge,o.detailsection?"":"none")),e.xp6(3),e.Q6J("ngStyle",e.VKq(52,ge,null!=o.selectedBusList&&o.selectedBusList.length>0&&""!=o.busNumber?"":"none")),e.xp6(4),e.hij(" ",o.busNumber,""),e.xp6(3),e.Oqu(o.customerName),e.xp6(5),e.hij(" ",o.dateRange,""),e.xp6(7),e.Q6J("ngIf",0!=o.totalCount),e.xp6(5),e.Q6J("ngModel",o.reportFormRequest.itemperpage),e.xp6(3),e.Q6J("ngIf",o.totalCount>20),e.xp6(1),e.Q6J("ngIf",o.totalCount>50),e.xp6(1),e.Q6J("ngIf",o.totalCount>100),e.xp6(1),e.Q6J("ngIf",o.totalCount<100&&o.totalCount>10),e.xp6(6),e.Q6J("disabled","0"==o.totalCount),e.xp6(2),e.Q6J("disabled","0"==o.totalCount),e.xp6(3),e.Q6J("ngModel",o.reportFormRequest.searchby),e.xp6(9),e.Q6J("ngIf",""==o.busNumber),e.xp6(17),e.Q6J("ngIf",0==o.totalCount),e.xp6(1),e.Q6J("ngIf",0!=o.totalCount),e.xp6(2),e.Q6J("ngIf",o.totalCount>o.reportFormRequest.itemperpage),e.xp6(10),e.hij("",o.tripData.vehicleno," "),e.xp6(3),e.hij(" ",o.tripData.starttime," "),e.xp6(3),e.Oqu(o.tripData.endtime),e.xp6(17),e.Q6J("ngForOf",o.tripData.stoppagedetails),e.xp6(10),e.hij("",o.mapVehicleDetails.vehicleno," "),e.xp6(3),e.hij(" ",o.mapVehicleDetails.starttime,""),e.xp6(3),e.hij("",o.mapVehicleDetails.endtime," "),e.xp6(24),e.Q6J("ngForOf",o.tripData.stoppagedetails),e.xp6(3),e.Q6J("ngIf",o.mapService.historyVehicleData.pollingdatatime),e.xp6(2),e.hij("Start Date : ",o.mapVehicleDetails.starttime,""),e.xp6(2),e.hij("End Date : ",o.mapVehicleDetails.endtime,""),e.xp6(2),e.hij("Total Distance : ",o.mapVehicleDetails.tripdistance," km"),e.xp6(4),e.Q6J("ngIf","running"!=o.mapService.animationStatus&&"paused"==o.mapService.animationStatus),e.xp6(1),e.Q6J("ngIf","running"==o.mapService.animationStatus),e.xp6(1),e.Q6J("ngIf","stopped"!=o.mapService.animationStatus),e.xp6(2),e.Q6J("ngModel",o.mapService.historySpeed)}},directives:[g.PC,c._Y,c.JL,c.F,g.O5,A.w9,c.Q7,g.mk,c.JJ,c.On,g.sg,A.xv,C._L,c.EJ,c.YN,c.Kr,c.Fj,C.N9,Y.F,c.eT],pipes:[g.gd],styles:[".ng-select.ng-select-single .ng-select-container .ng-value-container{font-size:12px!important} .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{font-size:12px!important;text-transform:capitalize}ng-select.ng-select-single[_ngcontent-%COMP%] .ng-select-container{min-height:26px;max-height:26px;height:26px}ng-select.ng-select-multiple[_ngcontent-%COMP%] .ng-select-container{font-size:12px;min-height:26px;max-height:26px;height:26px}.form-control[_ngcontent-%COMP%]{height:calc(1.45rem + 2px)}.invalid-feedback[_ngcontent-%COMP%]{font-size:11px;color:#dc3545}input[_ngcontent-%COMP%]{font-size:12px}.starvalid[_ngcontent-%COMP%]{color:#ff0040!important}.validationmsg[_ngcontent-%COMP%]{--bs-text-opacity: 1;color:#ff0040!important;font-weight:600}.shimmerBG[_ngcontent-%COMP%]{animation-duration:2.2s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:shimmer;animation-timing-function:linear;background:#E5F0FB;background:linear-gradient(to right,#cfeeeb 4%,#9ac9c6 25%,#d5f0f0 36%);background-size:1100px 100%}@keyframes shimmer{0%{background-position:-1200px 0}to{background-position:1200px 0}}.media[_ngcontent-%COMP%]{height:110px}.p-32[_ngcontent-%COMP%]{padding:32px}.title-line[_ngcontent-%COMP%]{height:24px;width:100%;margin-bottom:12px;border-radius:20px}.content-line[_ngcontent-%COMP%]{height:8px;width:100%;margin-bottom:16px;border-radius:8px}.end[_ngcontent-%COMP%]{width:40%}.m-t-24[_ngcontent-%COMP%]{margin-top:24px}.rptheadertext[_ngcontent-%COMP%]{text-decoration:underline}.rptlabel[_ngcontent-%COMP%]{color:#000}.outputlabel[_ngcontent-%COMP%]{color:#fff}.backbtn[_ngcontent-%COMP%]{float:right;margin-left:25%!important;margin-top:0%!important}.srnotd[_ngcontent-%COMP%]{background-color:#809b92}.form-group[_ngcontent-%COMP%]{margin-bottom:.2rem}"]}),n})(),Ua=(()=>{class n{constructor(){this.currentAlertData=[],this.selectedAlert=null,this.currentLayerName="osm",this.baseLayers={osm:f.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{maxZoom:19}),satellite:f.tileLayer("https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",{maxZoom:19}),streets:f.tileLayer("https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png",{maxZoom:19})}}renderAlertMap(t){try{this.map=f.map(t,{center:[20.5937,78.9629],zoom:5,zoomControl:!0,attributionControl:!0}),this.baseLayers.osm.addTo(this.map),this.markersLayer=f.layerGroup().addTo(this.map),f.control.scale({position:"bottomleft"}).addTo(this.map)}catch(o){console.error("Error rendering alert map:",o)}}switchLayer(t){this.currentLayerName&&this.baseLayers[this.currentLayerName]&&this.map.removeLayer(this.baseLayers[this.currentLayerName]),this.baseLayers[t]&&(this.baseLayers[t].addTo(this.map),this.currentLayerName=t)}getAlertIcon(t){const o=t.toLowerCase();let i="assets/school-management/alerts/tamper.png";return o.includes("over speed")||o.includes("overspeed")?i="assets/school-management/alerts/overspeed.png":o.includes("ignition on")?i="assets/school-management/alerts/ignitionOn.png":o.includes("geo-fence entry")||o.includes("geofence entry")?i="assets/school-management/alerts/geofencein.png":o.includes("ignition off")?i="assets/school-management/alerts/ignitionOff.png":o.includes("battery disconnect")?i="assets/school-management/alerts/batterydisconnect.png":o.includes("battery reconnect")?i=
1"assets/school-management/alerts/batteryreconnect.png":(o.includes("sos")||o.includes("emergency"))
1&&(i="assets/school-management/alerts/sos.png"),f.icon({iconUrl:i,iconSize:[32,32],iconAnchor:[16,32],popupAnchor:[0,-32]})}createPopupContent(t,o){return`\n <div class="alert-popup" style="min-width: 300px; font-family: Arial, sans-serif;">\n <div style="border-bottom: 2px solid #dc3545; padding-bottom: 10px; margin-bottom: 12px;">\n <h6 style="margin: 0; color: #dc3545; font-weight: 600; font-size: 15px;">\n <i class="fa fa-exclamation-triangle"></i> ${t.alertname}\n </h6>\n </div>\n <table style="width: 100%; border-collapse: collapse; font-size: 13px;">\n <tbody>\n <tr style="border-bottom: 1px solid #e9ecef;">\n <td style="padding: 0px 4px!important; font-weight: 600; color: #555; width: 35%;">Vehicle</td>\n <td style="padding: 0px 4px!important; color: #2c3e50; font-weight: 500;">${t.vehicleno}</td>\n </tr>\n <tr style="border-bottom: 1px solid #e9ecef;">\n <td style="padding: 0px 4px!important; font-weight: 600; color: #555;">Time</td>\n <td style="padding: 0px 4px!important; color: #2c3e50;">${t.alerttime}</td>\n </tr>\n <tr style="border-bottom: 1px solid #e9ecef;">\n <td style="padding: 0px 4px!important; font-weight: 600; color: #555;">Location</td>\n <td style="padding: 0px 4px!important; color: #2c3e50; font-size: 11px;">${t.latitude}, ${t.longitude}</td>\n </tr>\n <tr>\n <td style="padding: 0px 4px!important; font-weight: 600; color: #555;">Alert #</td>\n <td style="padding: 0px 4px!important; color: #2c3e50;">${o}</td>\n </tr>\n </tbody>\n </table>\n </div>\n `}plotAlertMarkers(t){try{if(this.markersLayer.clearLayers(),this.currentAlertData=t,!t||0===t.length)return void console.warn("No alert data to plot");const o=f.latLngBounds([]);t.forEach((i,r)=>{const s=parseFloat(i.latitude),l=parseFloat(i.longitude);if(isNaN(s)||isNaN(l))return void console.warn("Invalid coordinates for alert:",i);const d=f.marker([s,l],{icon:this.getAlertIcon(i.alertname),title:i.vehicleno}),m=this.createPopupContent(i,r+1);d.bindPopup(m,{maxWidth:300,className:"alert-marker-popup"}),d.on("click",()=>{this.selectedAlert=i}),this.markersLayer.addLayer(d),o.extend([s,l])}),o.isValid()&&this.map.fitBounds(o,{padding:[50,50],maxZoom:15})}catch(o){console.error("Error plotting alert markers:",o)}}fitMapToMarkers(){try{if(0===this.currentAlertData.length)return;const t=f.latLngBounds([]);this.currentAlertData.forEach(o=>{const i=parseFloat(o.latitude),r=parseFloat(o.longitude);!isNaN(i)&&!isNaN(r)&&t.extend([i,r])}),t.isValid()&&this.map.fitBounds(t,{padding:[50,50],maxZoom:15})}catch(t){console.error("Error fitting map to markers:",t)}}clearAlertMarkers(){try{this.markersLayer&&this.markersLayer.clearLayers(),this.currentAlertData=[],this.selectedAlert=null}catch(t){console.error("Error clearing alert markers:",t)}}zoomToAlert(t){try{const o=parseFloat(t.latitude),i=parseFloat(t.longitude);if(isNaN(o)||isNaN(i))return void console.warn("Invalid coordinates for alert");this.map.setView([o,i],16,{animate:!0,duration:.5}),this.selectedAlert=t}catch(o){console.error("Error zooming to alert:",o)}}resetView(){this.fitMapToMarkers()}destroyMap(){try{this.map&&(this.map.remove(),this.map=null),this.currentAlertData=[],this.selectedAlert=null}catch(t){console.error("Error destroying map:",t)}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=e.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Da=["reportForm"];function Ia(n,a){if(1&n&&(e.TgZ(0,"ng-option",15),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function Ja(n,a){1&n&&(e.TgZ(0,"span",107),e._uU(1,"Vehicle is mandatory"),e.qZA())}function La(n,a){if(1&n&&(e.TgZ(0,"span",105),e.YNc(1,Ja,2,0,"span",106),e.qZA()),2&n){e.oxw();const t=e.MAs(19);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function Ya(n,a){if(1&n&&(e.TgZ(0,"ng-option",15),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function ja(n,a){1&n&&(e.TgZ(0,"span",107),e._uU(1,"Alert Event is mandatory"),e.qZA())}function Pa(n,a){if(1&n&&(e.TgZ(0,"span",105),e.YNc(1,ja,2,0,"span",106),e.qZA()),2&n){e.oxw();const t=e.MAs(31);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function Qa(n,a){if(1&n&&(e.TgZ(0,"div",20)(1,"span",38),e._uU(2,"Vehicle :"),e.qZA(),e.TgZ(3,"span",39),e._uU(4),e.qZA()()),2&n){const t=e.oxw();e.xp6(4),e.hij(" ",t.busNumber,"")}}function Va(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.lnq("Showing ",t.recordFrom," To ",t.recordTo," ( Out Of ",t.totalCount," )
1Entries")}}function Ea(n,a){1&n&&(e.TgZ(0,"option",108),e._uU(1,"20"),e.qZA())}function za(n,a){1&n&&(e.TgZ(0,"option",109),e._uU(1,"50"),e.qZA())}function Ha(n,a){1&n&&(e.TgZ(0,"option",110),e._uU(1,"100"),e.qZA())}function $a(n,a){if(1&n&&(e.TgZ(0,"option",15),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.Q6J("value",t.totalCount),e.xp6(1),e.hij(" ",t.totalCount," ")}}function Ba(n,a){1&n&&(e.TgZ(0,"tbody")(1,"tr")(2,"td",111)(3,"div",112),e._uU(4,"No Record Found"),e.qZA()()()())}function Ga(n,a){if(1&n&&(e.TgZ(0,"td",117),e._uU(1),e.qZA()),2&n){const t=e.oxw(2),i=t.index;e.uIk("rowspan",t.$implicit.items.length),e.xp6(1),e.hij(" ",i+1,"")}}function Wa(n,a){if(1&n&&(e.TgZ(0,"td"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2).$implicit;e.uIk("rowspan",t.items.length),e.xp6(1),e.Oqu(""==t.vehicleno?"Not Found":t.vehicleno)}}function Ka(n,a){if(1&n&&(e.TgZ(0,"td"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2).$implicit;e.uIk("rowspan",t.items.length),e.xp6(1),e.Oqu(""==t.alertname?"Not Found":t.alertname)}}function Xa(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"tr"),e.YNc(1,Ga,2,2,"td",114),e.YNc(2,Wa,2,2,"td",46),e.YNc(3,Ka,2,2,"td",46),e.TgZ(4,"td"),e._uU(5),e.qZA(),e.TgZ(6,"td")(7,"button",115),e.NdJ("click",function(){const r=e.CHM(t).$implicit;return e.oxw(3).viewSingleAlertOnMap(r)}),e._UZ(8,"i",116),e.qZA()()()}if(2&n){const t=a.$implicit,o=a.index;e.xp6(1),e.Q6J("ngIf",0===o),e.xp6(1),e.Q6J("ngIf",0===o),e.xp6(1),e.Q6J("ngIf",0===o),e.xp6(2),e.Oqu(""==t.alerttime?"Not Found":t.alerttime)}}function es(n,a){if(1&n&&(e.ynx(0),e.YNc(1,Xa,9,4,"tr",113),e.BQk()),2&n){const t=a.$implicit;e.xp6(1),e.Q6J("ngForOf",t.items)}}function ts(n,a){if(1&n&&(e.TgZ(0,"tbody"),e.YNc(1,es,2,1,"ng-container",113),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.groupedData)}}function os(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",118)(1,"ngb-pagination",119),e.NdJ("pageChange",function(i){return e.CHM(t),e.oxw().reportFormRequest.pageno=i})("pageChange",function(){return e.CHM(t),e.oxw().details("pagination")}),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("collectionSize",t.totalCount)("page",t.reportFormRequest.pageno)("maxSize",3)("pageSize",t.reportFormRequest.itemperpage)}}function ns(n,a){1&n&&(e.TgZ(0,"span"),e._UZ(1,"img",123),e.qZA())}function is(n,a){1&n&&e._UZ(0,"img",124)}function rs(n,a){if(1&n&&(e.TgZ(0,"div")(1,"p",120),e._uU(2," Ignition : "),e.YNc(3,ns,2,0,"span",46),e.YNc(4,is,1,0,"img",121),e._uU(5),e.ALo(6,"uppercase"),e.qZA(),e.TgZ(7,"p",86),e._uU(8),e.qZA(),e.TgZ(9,"p",122),e._uU(10),e.qZA(),e._UZ(11,"br"),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Gre("m-0 > Last Polling Time :\n ",t.mapService.historyVehicleData.pollingdatatime,"\n <p class="),e.xp6(2),e.Q6J("ngIf","on"==t.mapService.historyVehicleData.ignitionstatus.toLowerCase()),e.xp6(1),e.Q6J("ngIf","off"==t.mapService.historyVehicleData.ignitionstatus.toLowerCase()),e.xp6(1),e.hij(" ",e.lcZ(6,8,t.mapService.historyVehicleData.ignitionstatus)," "),e.xp6(3),e.hij("Speed : ",t.mapService.historyVehicleData.speed," Km/hr"),e.xp6(2),e.hij("Location : ",t.mapService.historyVehicleData.location," ")}}function as(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",125),e.NdJ("click",function(){return e.CHM(t),e.oxw().mapService.changeAnimation("play")}),e._uU(1," Play "),e.qZA()}}function ss(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",126),e.NdJ("click",function(){return e.CHM(t),e.oxw().mapService.changeAnimation("pause")}),e._uU(1," Pause "),e.qZA()}}function ls(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",127),e.NdJ("click",function(){return e.CHM(t),e.oxw().mapService.changeAnimation("stop")}),e._uU(1," Stop "),e.qZA()}}function cs(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij(" - ",t.selectedAlertForMap.vehicleno,"")}}function ps(n,a){if(1&n&&(e.TgZ(0,"div",128)(1,"div",129)(2,"h6",130),e._UZ(3,"i",131),e._uU(4," Alert Details"),e.qZA()(),e.TgZ(5,"div",132)(6,"div",133)(7,"div",92)(8,"div",134)(9,"strong",135)(10,"b"),e._uU(11,"Vehicle:"),e.qZA()(),e.TgZ(12,"span",136),e._uU(13),e.qZA()()(),e.TgZ(14,"div",92)(15,"div",134)(16,"strong",135)(17,"b"),e._uU(18,"Alert:"),e.qZA()(),e.TgZ(19,"span",137),e._uU(20),e.qZA()()(),e.TgZ(21,"div",92)(22,"div",134)(23,"strong",135)(24,"b"),e._uU(25,"Time:"),e.qZA()(),e.TgZ(26,"span",135),e._uU(27),e.qZA()()(),e.TgZ(28,"div",92)(29,"div",134)(30,"strong",135)(31,"b"),e._uU(32,"Location:"),e.qZA()(),e.TgZ(33,"span",138),e._uU(34),e.qZA()()()()()()),2&n){const t=e.oxw();e.xp6(13),e.Oqu(t.selectedAlertForMap.vehicleno),e.xp6(7),e.Oqu(t.selectedAlertForMap.alertname),e.xp6(7),e.Oqu(t.selectedAlertForMap.alerttime),e.xp6(6),e.s9C("title",t.selectedAlertForMap.location),e.xp6(1),e.Oqu(t.selectedAlertForMap.location)}}const he=function(n){return{display:n}},Le=function(n,a){return{"is-valid":n,"ng-error":a}};let ms=(()=>{class n{constructor(t,o,i,r,s,l,d,m,_){this.cv=t,this.cs=o,this.loader=i,this.route=r,this.es=s,this.listService=l,this.datePipe=d,this.mapService=m,this.alertMapService=_,this.dateObj="",this.formsection=!0,this.loadersection=!1,this.detailsection=!1,this.loginRoleId=sessionStorage.getItem("loginroleid"),this.reportFormRequest=new te,this.detailData=[],this.pageHeading="Alert Event Report",this.busNumber="",this.dateRange="",this.allVehicleObject={id:"",name:"All"},this.allAlertObject={id:"",name:"All"},this.selectedBusList=[],this.roleList=[],this.alertList=[],this.alertlistResponse=[],this.groupedData=[],this.customerTypeName="",this.customerList=[],this.sortDir=1,this.mapVehicleDetails=new W,this.alertMarkers=[],this.selectedAlertForMap=null,this.mapInitialized=!1}ngOnInit(){var t=this;return(0,u.Z)(function*(){$(()=>{$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"})}),t.getDate(),yield t.getAlertList(),"101"==t.loginRoleId||"600"==t.loginRoleId?yield t.getRoleList():yield t.getVehicleList()})()}getAlertList(){var t=this;return(0,u.Z)(function*(){let o={searchBy:"",pageurl:"",pagename:""};try{t.alertlistResponse=yield new Promise((i,r)=>{t.es.apiCall(o,"list/alertlist").subscribe(s=>i(s.entity.listdetail),s=>r(s))})}catch(i){console.error("Error fetching alert list:",i)}})()}getRoleList(){var t=this;return(0,u.Z)(function*(){t.roleList=yield t.listService.getRoleList(new h.nO),t.roleList=t.roleList.filter(o=>"school"==o.name||"customer"==o.name)})()}getVehicleList(){var t=this;return(0,u.Z)(function*(){t.vehicleList=yield t.listService.getVehicleList(new h.nO)})()}getDate(){$(()=>{$('input[name="date"]').daterangepicker({showDropdowns:!0,startDate:p().startOf("day").format("DD-MMM-YYYY"),endDate:p().endOf("day").format("DD-MMM-YYYY"),opens:"center",drops:"down",maxSpan:{days:30},locale:{format:"DD-MMM-YYYY"},maxDate:new Date,minYear:2022,maxYear:parseInt(p().format("YYYY"),10),function(t,o){$("#datepicker").html(t.format("DD-MMM-YYYY")+" : "+o.format("DD-MMM-YYYY"))}}),$('input[name="date"]').on("hide.daterangepicker",(t,o)=>{try{this.dateObj=t.target.value}catch(i){}}),this.dateObj=document.getElementById("datepicker").value})}checkAllBus(){this.busNumber="All"==this.busNoObj.name?"":this.busNoObj.name}validateForm(){if(this.reportForm.valid){this.formsection=!1,this.busNoObj&&(this.reportFormRequest.vehicleid="All"==this.busNoObj.name?"":this.busNoObj?this.busNoObj.id:""),this.alertEventObj&&(this.reportFormRequest.alertid="All"==this.alertEventObj.name?"":this.alertEventObj?this.alertEventObj.id:"");let t=this.dateObj.split(" - ");this.reportFormRequest.fromdate=t[0],this.reportFormRequest.todate=t[1],"timeduration"==this.filterForObj?(this.reportFormRequest.fromtime=document.getElementById("fromtime").value.replace(" ","").replace(" ",""),this.reportFormRequest.totime=document.getElementById("totime").value.replace(" ","").replace(" ",""),this.dateRange=this.reportFormRequest.fromdate+" "+this.reportFormRequest.fromtime+" To "+this.reportFormRequest.todate+" "+this.reportFormRequest.totime):(this.reportFormRequest.fromdate=t[0],this.reportFormRequest.todate=t[1],this.reportFormRequest.fromtime="12:00 AM",this.reportFormRequest.totime="11:59 PM",this.dateRange=this.reportFormRequest.fromdate+" "+this.reportFormRequest.fromtime+" To "+this.reportFormRequest.todate+" "+this.reportFormRequest.totime),this.details("refresh")}}details(t){"showrow"==t&&(this.reportFormRequest.pageno=1),"search"==t&&(this.reportFormRequest.pageno=1),"refresh"==t&&(this.reportFormRequest.searchby="",this.reportFormRequest.pageno=1,this.reportFormRequest.itemperpage=10),this.reportFormRequest.searchby=this.reportFormRequest.searchby.trim(),this.loadersection=!0,this.detailsection=!1;try{this.loader.loaderOn()}catch(i){}let o=new te;
1o.vehicleid=this.busNoObj.id,o.alertid=this.alertEventObj.id,o.fromdate=this.reportFormRequest.fromdate,o.fromtime=this.reportFormRequest.fromtime,o.todate=this.reportFormRequest.todate,o.totime=this.reportFormRequest.totime,o.totime=this.interval,this.es.apiCall(o,"report/alerteventreport").subscribe(i=>{try{this.loader.loaderOff()}catch(r){}200==i.statusCode?(this.formsection=!1,this.loadersection=!1,this.detailsection=!0,this.detailData=i.entity.details,this.totalCount=+i.entity.totalrecord,this.recordFrom=this.detailData[0].rowno,this.recordTo=this.detailData[this.detailData.length-1].rowno,this.sortAndGroupData()):(this.detailData=[],this.recordTo=0,this.recordFrom=0,this.totalCount=0,this.reportFormRequest.searchby="",this.formsection=!1,this.loadersection=!1,this.detailsection=!0),this.es.pageDataInfo("",o,"Alert Event Report","Details method","Called Function",i.message)},i=>{})}redirectToForm(){var t=this;return(0,u.Z)(function*(){try{t.reportForm.resetForm()}catch(o){}t.formsection=!0,t.loadersection=!1,t.detailsection=!1,t.getDate(),$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"}),yield t.getRoleList(),t.schoolObj=null,t.busNoObj=null,t.vehicleList=[]})()}ResetForm(){this.reportForm.resetForm(),this.formsection=!0,this.loadersection=!1,this.detailsection=!1,this.getDate(),setTimeout(()=>{$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"})},1500),this.getRoleList(),this.schoolObj=null,this.busNoObj=null,this.vehicleList=[]}sorting(t,o){try{let r=t.currentTarget.childNodes[1].classList;try{r.contains("fa-sort-amount-desc")?(r.remove("fa-sort-amount-desc"),r.add("fa-sort-amount-asc")):(r.remove("fa-sort-amount-asc"),r.add("fa-sort-amount-desc"))}catch(s){console.log("e "+s)}this.sortDir=1==this.sortDir?-1:1;try{this.detailData.length>0&&this.detailData.sort((s,l)=>(s=s[o].toLowerCase(),l=l[o].toLowerCase(),s.localeCompare(l)*this.sortDir))}catch(s){console.log("e "+s)}}catch(i){}}trackVehicle(t){var o=this;return(0,u.Z)(function*(){console.log("distance on arrival response",W),o.mapVehicleDetails=t,$("#exampleModal").modal("show");let i=new y.rn;i.vehicleid=t.vehicleid,i.imeino=t.deviceimeino,i.fromdate=o.datePipe.transform(t.gpsfromdate,"dd-MMM-yyyy"),i.fromtime=o.datePipe.transform(t.gpsfromdate,"hh:mm:ss a"),i.todate=o.datePipe.transform(t.gpstodate,"dd-MMM-yyyy"),i.totime=o.datePipe.transform(t.gpstodate,"hh:mm:ss a"),yield o.mapService.trackHistoryVehicle(i.imeino,i.fromdate,i.fromtime,i.todate,i.totime,i.vehicleid,"",!1,!1,new y.Us)})()}sortAndGroupData(){const t={};this.detailData.forEach(o=>{const i=`${o.vehicleno}_${o.alertname}`;t[i]||(t[i]={vehicleno:o.vehicleno,alertname:o.alertname,items:[]}),t[i].items.push(o)}),this.groupedData=Object.values(t)}downloadDoc(t){let o=new te;o.pdfexcel=t,o.itemperpage="",o.pageno="",o.vehicleid=this.reportFormRequest.vehicleid,this.alertEventObj&&(o.alertid="All"==this.alertEventObj.name?"all":this.alertEventObj?this.alertEventObj.id:""),o.fromdate=this.reportFormRequest.fromdate,o.todate=this.reportFormRequest.todate,o.fromtime=this.reportFormRequest.fromtime,o.totime=this.reportFormRequest.totime;try{this.loader.loaderOn()}catch(i){}this.es.apiCall(o,"alerteventreport").subscribe(i=>{try{this.loader.loaderOff()}catch(r){}"200"==i.statusCode&&(this.filePath=i.message,this.es.commonFileDownload(this.filePath)),o.pdfexcel="",this.es.pageDataInfo("",o,"Alert Event Report","Download Excel/PDF method","Called Function",i.message)})}viewAllAlertsOnMap(){var t=this;return(0,u.Z)(function*(){var o;if(!t.detailData||0===t.detailData.length)return t.loader.responseMessage="No alert data to display on map",void t.loader.failedNotification();t.alertMarkers=t.detailData.map(i=>Object.assign(Object.assign({},i),{lat:parseFloat(i.latitude),lng:parseFloat(i.longitude)})),t.selectedAlertForMap={vehicleno:t.busNumber||"All Vehicles",alertname:(null===(o=t.alertEventObj)||void 0===o?void 0:o.name)||"All Alerts",fromdate:t.reportFormRequest.fromdate,todate:t.reportFormRequest.todate,totalAlerts:t.totalCount},$("#alertMapModal").modal("show"),setTimeout(()=>{t.mapInitialized||(t.alertMapService.renderAlertMap("alertMapContainer"),t.mapInitialized=!0),t.alertMapService.plotAlertMarkers(t.alertMarkers)},500)})()}viewSingleAlertOnMap(t){var o=this;return(0,u.Z)(function*(){if(!t||!t.latitude||!t.longitude)return o.loader.responseMessage="Invalid alert data",void o.loader.failedNotification();o.alertMarkers=[Object.assign(Object.assign({},t),{lat:parseFloat(t.latitude),lng:parseFloat(t.longitude)})],o.selectedAlertForMap={vehicleno:t.vehicleno,alertname:t.alertname,alerttime:t.alerttime,totalAlerts:1},$("#alertMapModal").modal("show"),setTimeout(()=>{o.mapInitialized||(o.alertMapService.renderAlertMap("alertMapContainer"),o.mapInitialized=!0),o.alertMapService.plotAlertMarkers(o.alertMarkers)},500)})()}resetMapView(){this.mapInitialized&&this.alertMapService.resetView()}switchMapLayer(t){this.mapInitialized&&this.alertMapService.switchLayer(t)}closeAlertMapModal(){$("#alertMapModal").modal("hide"),this.alertMarkers=[],this.selectedAlertForMap=null}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(S.R),e.Y36(U.v),e.Y36(N.D),e.Y36(M.F0),e.Y36(F.P),e.Y36(D.X),e.Y36(g.uU),e.Y36(J.S),e.Y36(Ua)
1)},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-alert-event"]],viewQuery:function(t,o){if(1&t&&(e.Gf(Da,5),e.Gf(ce,5)),2&t){let i;e.iGM(i=e.CRH())&&(o.reportForm=i.first),e.iGM(i=e.CRH())&&(o.reportMapComponent=i.first)}},decls:189,vars:64,consts:[[1,"container-fluid","report-form-container"],[1,"reportheader"],["aria-hidden","true",1,"fa","fa-credit-card"],[1,"rptheadertext"],[1,"row","mt-4",3,"ngStyle"],[1,"col-md-12"],["novalidate","","id","form_id","autocomplete","off",1,"needs-validation"],["reportForm","ngForm"],[1,"row"],[1,"col-md-2"],[1,"form-group"],[1,"mb-0","label"],[1,"starvalid"],["name","vehicleNumber","placeholder","Select Vehicle","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["busNoCtrl","ngModel"],[3,"value"],[3,"value",4,"ngFor","ngForOf"],["class","form-control-feedback text-danger",4,"ngIf"],["name","alertEvent","placeholder","Select Alert Event","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange"],["alertEventCtrl","ngModel"],[1,"col-md-3"],[1,"report-label","mb-0"],["type","text","name","date","id","datepicker","required","","placeholder","Select Date",1,"form-control","form-control-sm"],[1,"col"],[1,"form-group","mb-0",2,"width","85px","float","left"],[1,"mb-0"],["type","text","name","timepicker","id","fromtime",1,"fromTime","form-control","form-control-sm","text-center"],[1,"form-group",2,"width","85px","float","left"],["type","text","name","timepicker","id","totime",1,"toTime","form-control","form-control-sm","text-center"],[1,"col",3,"ngStyle"],[1,"col","mt-3"],["type","submit",1,"custom-btn","btn-13","float-right","Show","mb-3",3,"click"],["type","button",1,"custom-btn","btn-10","float-right","mr-2",3,"click"],[1,"report-form-container"],[1,"grid-section",3,"ngStyle"],[1,"p-2","report-summary","row","justify-content-between"],["class","col-md-3",4,"ngIf"],[1,"col-md-8"],[1,"fw-bolder","text-small","text-uppercase","outputlabel"],[1,"text-uppercase","text-small","outputlabel"],[1,"col-md-1"],["ngbTooltip","Back",1,"backbtnbackground","float-end",3,"click"],["aria-hidden","true",1,"fa","fa-arrow-circle-o-left","outputlabel"],[1,"col-md-12","px-0",2,"background-color","white"],[1,"table-head","d-flex","justify-content-between"],["id","tickets-table_info","role","status","aria-live","polite",1,"col-auto","mt-2","text-center","fw-bold","total-record-label"],[4,"ngIf"],[1,"mt-1"],[1,"itemsperpage-style",2,"margin-right","10px"],[1,"d-inline-flex","align-items-center"],["name","table_length","aria-controls","table","name","pageSize",3,"ngModel","ngModelChange","change"],["value","10","selected",""],["value","20",4,"ngIf"],["value","50",4,"ngIf"],["value","100",4,"ngIf"],[3,"value",4,"ngIf"],["type","button","ngbTooltip","View All Alerts on Map","placement","bottom",1,"btn","btn-sm","btn-info","mx-1",2,"padding","2px 6px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-map-marker"],["type","button",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"click"],["aria-hidden","true",1,"fa","fa-refresh"],["type","button","ngbTooltip","Download Pdf","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-pdf-o","pdf-btn"],["type","button","ngbTooltip","Download Excel","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-excel-o","excel-btn"],["type","text","name","searchTerm","autocomplete","off","aria-controls","tickets-table","placeholder","Search here....","autocomplete","off",1,"form-control","form-control-sm","ms-2","searchinput",2,"width","165px",3,"ngModel","ngModelChange"],["type","button",1,"btn","search-btn",3,"click"],[1,"fa","fa-search"],[1,"scroll-tbl"],[1,"table","table-striped","table-style",2,"overflow-y","auto","overflow-x","auto"],[2,"width","60px",3,"click"],[1,"fa","fa-sort-amount-desc"],[2,"width","200px",3,"click"],[2,"width","30px"],[1,"fa","fa-map-marker"],[1,"row","justify-content-md-between","align-items-md-center","mt-2"],["class","float-end text-start",4,"ngIf"],["id","exampleModal","tabindex","-1","aria-labelledby","exampleModalLabel","data-bs-backdrop","static","data-bs-keyboard","false","aria-hidden","true",1,"modal","fade"],[1,"modal-dialog","modal
1-xl"],[1,"modal-content"],[1,"modal-header","bg-white"],["id","exampleModalLabel",1,"modal-title"],["type","button","data-bs-dismiss","modal","aria-label","Close",1,"btn-close",3,"click"],[1,"modal-body","p-0"],[2,"width","100%","height","500px"],[1,"current-vehicle-section"],[1,"p-1",2,"max-width","250px","font-size","12px"],[1,"m-0"],["role","group",1,"btn-group"],["type","button",1,"btn","btn-sm","btn-outline-primary","py-1",3,"click"],["type","button","class","btn btn-sm btn-outline-primary py-1","ngbTooltip","Play",3,"click",4,"ngIf"],["type","button","class","btn btn-sm btn-outline-primary py-1","ngbTooltip","Pause",3,"click",4,"ngIf"],["type","button","class","btn btn-sm btn-outline-primary py-1","ngbTooltip","Stop",3,"click",4,"ngIf"],[1,"col-12"],["type","range","min","1000","max","20000",1,"form-range","form-control","form-control-sm",3,"ngModel","change","ngModelChange"],["id","alertMapModal","tabindex","-1","role","dialog","aria-labelledby","alertMapModalLabel","aria-hidden","true",1,"modal","fade","p-0"],["role","document",1,"modal-dialog","modal
1-lg"],[1,"modal-content","ani"],[1,"modal-header","bg-danger","text-white"],["id","alertMapModalLabel",1,"modal-title"],["type","button","data-dismiss","modal","aria-label","Close",1,"close","text-white",2,"outline","none","opacity","1",3,"click"],["aria-hidden","true"],[1,"modal-body","p-0",2,"height","50vh"],[2,"position","absolute","z-index","9999","right","1%","top","10%","width","280px"],["class","card alert-map-info shadow-sm",4,"ngIf"],["id","alertMapContainer",2,"width","100%","height","calc(75vh - 80px)","background","#f5f5f5"],[1,"form-control-feedback","text-danger"],["class","text-small","style"," font-size: 10px;",4,"ngIf"],[1,"text-small",2,"font-size","10px"],["value","20"],["value","50"],["value","100"],["colspan","9"],[1,"text-center"],[4,"ngFor","ngForOf"],["class","srnotd",4,"ngIf"],["ngbTooltip","View Alert on Map",1,"btn","btn-sm","btn-primary","p-1",3,"click"],[1,"fa","fa-map-marker",2,"font-size","11px"],[1,"srnotd"],[1,"float-end","text-start"],["size","sm",1,"d-flex","mt-2","justify-content-end","pagination-rounded","pagination","pagination-info",3,"collectionSize","page","maxSize","pageSize","pageChange"],["m-0",""],["src","assets/school-management/images/poweroff.png","style","width: 20px;height: 20px;",4,"ngIf"],[1,"m-0",2,"word-wrap","break-word"],["src","assets/school-management/images/poweron.png",2,"width","20px","height","20px"],["src","assets/school-management/images/poweroff.png",2,"width","20px","height","20px"],["type","button","ngbTooltip","Play",1,"btn","btn-sm","btn-outline-primary","py-1",3,"click"],["type","button","ngbTooltip","Pause",1,"btn","btn-sm","btn-outline-primary","py-1",3,"click"],["type","button","ngbTooltip","Stop",1,"btn","btn-sm","btn-outline-primary","py-1",3,"click"],[1,"card","alert-map-info","shadow-sm"],[1,"card-header","text-white","py-1",2,"background-color","#e2e2e2"],[1,"card-title","mb-0","small"],[1,"fa","fa-info-circle"],[1,"card-body","p-2"],[1,"row","g-1"],[1,"d-flex","justify-content-between","align-items-center"],[1,"small"],[1,"badge","bg-secondary","small"],[1,"text-danger","small"],[1,"small","text-truncate",3,"title"]],template:function(t,o){if(1&t&&(e.TgZ(0,"div",0)(1,"div")(2,"h5",1),e._UZ(3,"i",2),e._uU(4,"\xa0\xa0\xa0"),e.TgZ(5,"span",3),e._uU(6,"Alert Event Report"),e.qZA()()(),e.TgZ(7,"div",4)(8,"div",5)(9,"form",6,7)(11,"div",8)(12,"div",9)(13,"div",10)(14,"label",11),e._uU(15,"Vehicle Number "),e.TgZ(16,"span",12),e._uU(17,"*"),e.qZA()(),e.TgZ(18,"ng-select",13,14),e.NdJ("ngModelChange",function(r){return o.busNoObj=r})("change",function(){return o.checkAllBus()}),e.TgZ(20,"ng-option",15),e._uU(21),e.qZA(),e.YNc(22,Ia,2,2,"ng-option",16),e.qZA(),e.YNc(23,La,2,1,"span",17),e.qZA()(),e.TgZ(24,"div",9)(25,"div",10)(26,"label",11),e._uU(27,"Alert Event "),e.TgZ(28,"span",12),e._uU(29,"*"),e.qZA()(),e.TgZ(30,"ng-select",18,19),e.NdJ("ngModelChange",function(r){return o.alertEventObj=r}),e.TgZ(32,"ng-option",15),e._uU(33),e.qZA(),e.YNc(34,Ya,2,2,"ng-option",16),e.qZA(),e.YNc(35,Pa,2,1,"span",17),e.qZA()(),e.TgZ(36,"div",20)(37,"div",10)(38,"label",21),e._uU(39,"Date :"),e.qZA(),e._UZ(40,"input",22),e.qZA()(),e.TgZ(41,"div",23)(42,"div",24)(43,"label",25),e._uU(44,"Time "),e.qZA(),e._UZ(45,"input",26),e.qZA(),e._uU(46," \xa0\xa0\xa0 "),e.TgZ(47,"div",27),e._UZ(48,"label",25)(49,"input",28),e.qZA()(),e.TgZ(50,"div",29)(51,"div",24)(52,"label",25),e._uU(53,"Time "),e.qZA(),e._UZ(54,"input",26),e.qZA(),e._uU(55," \xa0\xa0\xa0 "),e.TgZ(56,"div",27),e._UZ(57,"label",25)(58,"input",28),e.qZA()(),e.TgZ(59,"div",30)(60,"button",31),e.NdJ("click",function(){return o.validateForm()}),e._uU(61,"Generate"),e.qZA(),e._uU(62," \xa0 "),e.TgZ(63,"button",32),e.NdJ("click",function(){return o.ResetForm()}),e._uU(64,"Reset"),e.qZA()()()()()()(),e.TgZ(65,"div",33)(66,"div",34)(67,"div",35),e.YNc(68,Qa,5,1,"div",36),e.TgZ(69,"div",37)(70,"span",38),e._uU(71,"Date :"),e.qZA(),e.TgZ(72,"span",39),e._uU(73),e.qZA()(),e.TgZ(74,"div",40)(75,"button",41),e.NdJ("click",function(){return o.redirectToForm()}),e._UZ(76,"i",42),e.qZA()()(),e.TgZ(77,"div",43)(78,"div",44)(79,"div",45),e.YNc(80,Va,2,3,"span",46),e.qZA(),e.TgZ(81,"div",47)(82,"span",48)(83,"label",49),e._uU(84,"Show "),e.TgZ(85,"select",50),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.itemperpage=r})("change",function(){return o.details("showrow")}),e.TgZ(86,"option",51),e._uU(87," 10"),e.qZA(),e.YNc(88,Ea,2,0,"option",52),e.YNc(89,za,2,0,"option",53),e.YNc(90,Ha,2,0,"option",54),e.YNc(91,$a,2,2,"option",55),e.qZA(),e._uU(92," entries"),e.qZA()(),e.TgZ(93,"span")(94,"button",56),e.NdJ("click",function(){return o.viewAllAlertsOnMap()}),e._UZ(95,"i",57),e._uU(96," Map "),e.qZA()(),e.TgZ(97,"span")(98,"button",58),e.NdJ("click",function(){return o.details("refresh")}),e._UZ(99,"i",59),e.qZA()(),e.TgZ(100,"span")(101,"button",60),e.NdJ("click",function(){return o.downloadDoc("pdf")}
1),e._UZ(102,"i",61),e.qZA(),e.TgZ(103,"button",62),e.NdJ("click",function(){return o.downloadDoc("excel")}),e._UZ(104,"i",63),e.qZA()(),e.TgZ(105,"label")(106,"input",64),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.searchby=r}),e.qZA()(),e.TgZ(107,"button",65),e.NdJ("click",function(){return o.details("search")}),e._UZ(108,"span",66),e.qZA()()(),e.TgZ(109,"div",67)(110,"table",68)(111,"thead")(112,"tr")(113,"th",69),e.NdJ("click",function(r){return o.sorting(r,"rowno")}),e._uU(114,"#"),e._UZ(115,"i",70),e.qZA(),e.TgZ(116,"th",71),e.NdJ("click",function(r){return o.sorting(r,"vehicleno")}),e._uU(117," Vehicle No. "),e._UZ(118,"i",70),e.qZA(),e.TgZ(119,"th",71),e.NdJ("click",function(r){return o.sorting(r,"alertname")}),e._uU(120,"Alert Name "),e._UZ(121,"i",70),e.qZA(),e.TgZ(122,"th",71),e.NdJ("click",function(r){return o.sorting(r,"alerttime")}),e._uU(123,"Alert Time "),e._UZ(124,"i",70),e.qZA(),e.TgZ(125,"th",72),e._UZ(126,"i",73),e.qZA()()(),e.YNc(127,Ba,5,0,"tbody",46),e.YNc(128,ts,2,1,"tbody",46),e.qZA()(),e.TgZ(129,"div",74),e.YNc(130,os,2,4,"div",75),e.qZA()()()(),e.TgZ(131,"div",76)(132,"div",77)(133,"div",78)(134,"div",79)(135,"h4",80)(136,"u"),e._uU(137," Distance Travelled Summary"),e.qZA(),e._uU(138," of "),e.TgZ(139,"b"),e._uU(140),e.qZA(),e._uU(141," from "),e.TgZ(142,"b"),e._uU(143),e.qZA(),e._uU(144," to "),e.TgZ(145,"b"),e._uU(146),e.qZA()(),e.TgZ(147,"button",81),e.NdJ("click",function(){return o.mapService.clearAllLayers()}),e.qZA()(),e.TgZ(148,"div",82)(149,"div",83),e._UZ(150,"app-helper-map"),e.TgZ(151,"div",84)(152,"div",85),e.YNc(153,rs,12,10,"div",46),e.TgZ(154,"p",86),e._uU(155),e.qZA(),e.TgZ(156,"p",86),e._uU(157),e.qZA(),e.TgZ(158,"p",86),e._uU(159),e.qZA(),e.TgZ(160,"p",86),e._uU(161),e.qZA(),e.TgZ(162,"p",86),e._uU(163),e.qZA(),e.TgZ(164,"p",86),e._uU(165),e.qZA(),e.TgZ(166,"div",87)(167,"button",88),e.NdJ("click",function(){return o.mapService.changeAnimation("restart")}),e._uU(168," Start "),e.qZA(),e.YNc(169,as,2,0,"button",89),e.YNc(170,ss,2,0,"button",90),e.YNc(171,ls,2,0,"button",91),e.qZA(),e.TgZ(172,"div",92)(173,"input",93),e.NdJ("change",function(){return o.mapService.changeAnimation("speedchange")})("ngModelChange",function(r){return o.mapService.historySpeed=r}),e.qZA()()()()()()()()(),e.TgZ(174,"div",94)(175,"div",95)(176,"div",96)(177,"div",97)(178,"h5",98),e._UZ(179,"i",73),e._uU(180," Alert Location Map "),e.YNc(181,cs,2,1,"span",46),e.qZA(),e.TgZ(182,"button",99),e.NdJ("click",function(){return o.closeAlertMapModal()}),e.TgZ(183,"span",100),e._uU(184,"\xd7"),e.qZA()()(),e.TgZ(185,"div",101)(186,"div",102),e.YNc(187,ps,35,5,"div",103),e.qZA(),e._UZ(188,"div",104),e.qZA()()()()),2&t){const i=e.MAs(10),r=e.MAs(19),s=e.MAs(31);e.xp6(7),e.Q6J("ngStyle",e.VKq(52,he,o.formsection?"":"none")),e.xp6(11),e.Q6J("ngClass",e.WLB(54,Le,r.valid,r.invalid&&i.submitted))("ngModel",o.busNoObj)("multiple",!1)("closeOnSelect",!1)("closeOnSelect",!1),e.xp6(2),e.Q6J("value",o.allVehicleObject),e.xp6(1),e.hij("",o.allVehicleObject.name," "),e.xp6(1),e.Q6J("ngForOf",o.vehicleList),e.xp6(1),e.Q6J("ngIf",r.errors&&(r.dirty||r.touched||i.submitted)),e.xp6(7),e.Q6J("ngClass",e.WLB(57,Le,s.valid,s.invalid&&i.submitted))("ngModel",o.alertEventObj)("multiple",!1)("closeOnSelect",!1)("closeOnSelect",!1),e.xp6(2),e.Q6J("value",o.allAlertObject),e.xp6(1),e.Oqu(o.allAlertObject.name),e.xp6(1),e.Q6J("ngForOf",o.alertlistResponse),e.xp6(1),e.Q6J("ngIf",s.errors&&(s.dirty||s.touched||i.submitted)),e.xp6(15),e.Q6J("ngStyle",e.VKq(60,he,"timeduration"==o.filterForObj?"":"none")),e.xp6(16),e.Q6J("ngStyle",e.VKq(62,he,o.detailsection?"":"none")),e.xp6(2),e.Q6J("ngIf",""!=o.busNumber),e.xp6(5),e.hij(" ",o.dateRange,""),e.xp6(7),e.Q6J("ngIf",0!=o.totalCount),e.xp6(5),e.Q6J("ngModel",o.reportFormRequest.itemperpage),e.xp6(3),e.Q6J("ngIf",o.totalCount>20),e.xp6(1),e.Q6J("ngIf",o.totalCount>50),e.xp6(1),e.Q6J("ngIf",o.totalCount>100),e.xp6(1),e.Q6J("ngIf",o.totalCount<100&&o.totalCount>10),e.xp6(3),e.Q6J("disabled","0"==o.totalCount),e.xp6(7),e.Q6J("disabled","0"==o.totalCount),e.xp6(2),e.Q6J("disabled","0"==o.totalCount),e.xp6(3),e.Q6J("ngModel",o.reportFormRequest.searchby),e.xp6(21),e.Q6J("ngIf",0==o.totalCount),e.xp6(1),e.Q6J("ngIf",0!=o.totalCount),e.xp6(2),e.Q6J("ngIf",o.totalCount>o.reportFormRequest.itemperpage),e.xp6(10),e.hij("",o.mapVehicleDetails.vehicleno," "),e.xp6(3),e.hij(" ",o.mapVehicleDetails.gpsfromdate,""),e.xp6(3),e.hij("",o.mapVehicleDetails.gpstodate," "),e.xp6(7),e.Q6J("ngIf",o.mapService.historyVehicleData.pollingdatatime),e.xp6(2),e.hij("Start Date : ",o.mapVehicleDetails.gpsfromdate,""),e.xp6(2),e.hij("End Date : ",o.mapVehicleDetails.gpstodate,""),e.xp6(2),e.hij("Total Distance : ",o.mapVehicleDetails.gpsdistance," km"),e.xp6(2),e.hij("Duration : ",o.mapVehicleDetails.duration,""),e.xp6(2),e.hij("Max Speed : ",o.mapVehicleDetails.maxspeed," Km/hr"),e.xp6(2),e.hij("Running Time : ",o.mapVehicleDetails.workingtime," min"),e.xp6(4),e.Q6J("ngIf","running"!=o.mapService.animationStatus&&"paused"==o.mapService.animationStatus),e.xp6(1),e.Q6J("ngIf","running"==o.mapService.animationStatus),e.xp6(1),e.Q6J("ngIf","stopped"!=o.mapService.animationStatus),e.xp6(2),e.Q6J("ngModel",o.mapService.historySpeed),e.xp6(8),e.Q6J("ngIf",o.selectedAlertForMap),e.xp6(6),e.Q6J("ngIf",o.selectedAlertForMap)}},directives:[g.PC,c._Y,c.JL,c.F,A.w9,c.Q7,g.mk,c.JJ,c.On,A.xv,g.sg,g.O5,C._L,c.EJ,c.YN,c.Kr,c.Fj,C.N9,Y.F,c.eT],pipes:[g.gd],styles:[".ng-select.ng-select-single .ng-select-container .ng-value-container{font-size:12px!important} .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{font-size:12px!important;text-transform:capitalize}ng-select.ng-select-single[_ngcontent-%COMP%] .ng-select-container{min-height:26px;max-height:26px;height:26px}.form-control[_ngcontent-%COMP%]{height:calc(1.45rem + 2px)}.invalid-feedback[_ngcontent-%COMP%]{font-size:11px;color:#dc3545}input[_ngcontent-%COMP%]{font-size:12px}.starvalid[_ngcontent-%COMP%]{color:#ff0040!important}.validationmsg[_ngcontent-%COMP%]{--bs-text-opacity: 1;color:#ff0040!important;font-weight:600}.shimmerBG[_ngcontent-%COMP%]{animation-duration:2.2s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:shimmer;animation-timing-function:linear;background:#E5F0FB;background:linear-gradient(to right,#cfeeeb 4%,#9ac9c6 25%,#d5f0f0 36%);background-size:1100px 100%}@keyframes shimmer{0%{background-position:-1200px 0}to{background-position:1200px 0}}.media[_ngcontent-%COMP%]{height:110px}.p-32[_ngcontent-%COMP%]{padding:32px}.title-line[_ngcontent-%COMP%]{height:24px;width:100%;margin-bottom:12px;border-radius:20px}.content-line[_ngcontent-%COMP%]{height:8px;width:100%;margin-bottom:16px;border-radius:8px}.end[_ngcontent-%COMP%]{width:40%}.m-t-24[_ngcontent-%COMP%]{margin-top:24px}.rptheadertext[_ngcontent-%COMP%]{text-decoration:underline}.rptlabel[_ngcontent-%COMP%]{color:#000}.outputlabel[_ngcontent-%COMP%]{color:#003c75}.backbtn[_ngcontent-%COMP%]{float:right;margin-left:25%!important;margin-top:-1%!important}.srnotd[_ngcontent-%COMP%]{background-color:#f2f2f2}.form-group[_ngcontent-%COMP%]{margin-bottom:.2rem} .leaflet-popup-content-wrapper{border-radius:8px;box-shadow:0 3px 14px #0006;padding:3%} .leaflet-popup-content{margin:0;padding:0} .alert-marker-popup .leaflet-popup-content-wrapper{padding:0} .leaflet-container a.leaflet-popup-close-button{color:#dc3545;font-size:24px;font-weight:700;padding:4px 8px} .leaflet-container a.leaflet-popup-close-button:hover{color:#a71d2a}#alertMapContainer[_ngcontent-%COMP%]{border-top:1px solid #dee2e6}.btn-group[_ngcontent-%COMP%] .btn.active[_ngcontent-%COMP%]{background-color:#007bff!important;color:#fff!important;border-color:#007bff!important}.grid-section[_ngcontent-%COMP%], .ani[_ngcontent-%COMP%], .entrydiv[_ngcontent-%COMP%]{animation:fadeInUp .8s ease-out}@keyframes fadeInUp{0%{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}"]}),n})();var Q=v(48240),L=v(42853);const ds=["reportForm"];function us(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.lnq("Showing ",t.recordFrom," To ",t.recordTo," ( Out Of ",t.totalCount," )
1Entries")}}function gs(n,a){1&n&&(e.TgZ(0,"option",116),e._uU(1,"20"),e.qZA())}function hs(n,a){1&n&&(e.TgZ(0,"option",117),e._uU(1,"50"),e.qZA())}function _s(n,a){1&n&&(e.TgZ(0,"option",118),e._uU(1,"100"),e.qZA())}function fs(n,a){if(1&n&&(e.TgZ(0,"option",119),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.Q6J("value",t.totalCount),e.xp6(1),e.hij(" ",t.totalCount," ")}}function bs(n,a){if(1&n&&(e.TgZ(0,"div",14)(1,"span",86),e._uU(2,"Vehicle :"),e.qZA(),e.TgZ(3,"span",87),e._uU(4),e.qZA()()),2&n){const t=e.oxw();e.xp6(4),e.hij(" ",t.busNumber,"")}}function vs(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.lnq("Showing ",t.recordFrom," To ",t.recordTo," ( Out Of ",t.totalCount," ) Entries")}}function Ts(n,a){1&n&&(e.TgZ(0,"option",116),e._uU(1,"20"),e.qZA())}function Zs(n,a){1&n&&(e.TgZ(0,"option",117),e._uU(1,"50"),e.qZA())}function xs(n,a){1&n&&(e.TgZ(0,"option",118),e._uU(1,"100"),e.qZA())}function ys(n,a){if(1&n&&(e.TgZ(0,"option",119),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.Q6J("value",t.totalCount),e.xp6(1),e.hij(" ",t.totalCount," ")}}function Cs(n,a){1&n&&(e.TgZ(0,"tbody")(1,"tr")(2,"td",120)(3,"div",121),e._uU(4,"No Record Found"),e.qZA()()()())}function As(n,a){if(1&n&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA(),e.TgZ(11,"td")(12,"span",123),e._uU(13),e.qZA()(),e.TgZ(14,"td")(15,"span",124),e._uU(16),e.qZA()(),e.TgZ(17,"td")(18,"span",124),e._uU(19),e.qZA()(),e.TgZ(20,"td")(21,"span",124),e._uU(22),e.qZA()(),e.TgZ(23,"td")(24,"span",124),e._uU(25),e.qZA()(),e.TgZ(26,"td")(27,"span",124),e._uU(28),e.qZA()()()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(t.rowno),e.xp6(2),e.Oqu(""==t.vehicleno?"Not Found":t.vehicleno),e.xp6(2),e.Oqu(""==t.vehiclemakename?"Not Found":t.vehiclemakename),e.xp6(2),e.Oqu(""==t.vehiclemodelname?"Not Found":t.vehiclemodelname),e.xp6(2),e.Oqu(""==t.panic?"Not Found":t.panic),e.xp6(3),e.hij(" ",""==t.status?"Not Found":t.status," "),e.xp6(3),e.hij(" ",""==t.devicetype?"Not Found":t.devicetype," "),e.xp6(3),e.hij(" ",""==t.m2mprovidername?"Not Found":t.m2mprovidername," "),e.xp6(3),e.hij(" ",""==t.iccidno?"Not Found":t.iccidno," "),e.xp6(3),e.hij(" ",""==t.primarynetworkname?"Not Found":t.primarynetworkname," "),e.xp6(3),e.hij(" ",""==t.secondarynetworkname?"Not Found":t.secondarynetworkname," ")}}function qs(n,a){if(1&n&&(e.TgZ(0,"tbody"),e.YNc(1,As,29,11,"tr",122),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.detailData)}}function Os(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",125)(1,"ngb-pagination",126),e.NdJ("pageChange",function(i){return e.CHM(t),e.oxw().reportFormRequest.pageno=i})("pageChange",function(){return e.CHM(t),e.oxw().details("pagination")}),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("collectionSize",t.totalCount)("page",t.reportFormRequest.pageno)("maxSize",3)("pageSize",t.reportFormRequest.itemperpage)}}function Rs(n,a){1&n&&(e.TgZ(0,"span"),e._UZ(1,"img",130),e.qZA())}function ks(n,a){1&n&&e._UZ(0,"img",131)}function ws(n,a){if(1&n&&(e.TgZ(0,"div")(1,"p",127),e._uU(2," Ignition : "),e.YNc(3,Rs,2,0,"span",57),e.YNc(4,ks,1,0,"img",128),e._uU(5),e.ALo(6,"uppercase"),e.qZA(),e.TgZ(7,"p",108),e._uU(8),e.qZA(),e.TgZ(9,"p",129),e._uU(10),e.qZA(),e._UZ(11,"br"),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Gre("m-0 > Last Polling Time :\n ",t.mapService.historyVehicleData.pollingdatatime,"\n <p class="),e.xp6(2),e.Q6J("ngIf","on"==t.mapService.historyVehicleData.ignitionstatus.toLowerCase()),e.xp6(1),e.Q6J("ngIf","off"==t.mapService.historyVehicleData.ignitionstatus.toLowerCase()),e.xp6(1),e.hij(" ",e.lcZ(6,8,t.mapService.historyVehicleData.ignitionstatus)," "),e.xp6(3),e.hij("Speed : ",t.mapService.historyVehicleData.speed," Km/hr"),e.xp6(2),e.hij("Location : ",t.mapService.historyVehicleData.location," ")}}function Ms(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",132),e.NdJ("click",function(){return e.CHM(t),e.oxw().mapService.changeAnimation("play")}),e._uU(1," Play "),e.qZA()}}function Ns(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",133),e.NdJ("click",function(){return e.CHM(t),e.oxw().mapService.changeAnimation("pause")}),e._uU(1," Pause "),e.qZA()}}function Fs(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",134),e.NdJ("click",function(){return e.CHM(t),e.oxw().mapService.changeAnimation("stop")}),e._uU(1," Stop "),e.qZA()}}const _e=function(n){return{display:n}};let Ss=(()=>{class n{constructor(t,o,i,r,s,l,d,m){this.cv=t,this.cs=o,this.loader=i,this.route=r,this.es=s,this.listService=l,this.datePipe=d,this.mapService=m,this.showChart=!0,this.showtable=!1,this.selectedRTO="",this.rtoList=[],this.detailData=[{rowno:1,vehicleno:"MP02AA1234",vehiclemakename:"Tata",vehiclemodelname:"Ace",panic:"No",status:"Active",devicetype:"TypeA",m2mprovidername:"Airtel",iccidno:"8986001234567890123",primarynetworkname:"Airtel",secondarynetworkname:"Jio"},{rowno:2,vehicleno:"MP03BB5678",vehiclemakename:"Mahindra",vehiclemodelname:"Bolero",panic:"Yes",status:"Inactive",devicetype:"TypeB",m2mprovidername:"Jio",iccidno:"8986009876543210987",primarynetworkname:"Jio",secondarynetworkname:"Airtel"},{rowno:3,vehicleno:"MP04CC9101",vehiclemakename:"Ashok Leyland",vehiclemodelname:"Dost",panic:"No",status:"Active",devicetype:"TypeA",m2mprovidername:"Vodafone",iccidno:"8986001122334455667",primarynetworkname:"Vodafone",secondarynetworkname:"Airtel"}],this.totalCount=3,this.recordFrom=1,this.recordTo=3,this.dateRange="01/11/2025 - 28/11/2025",this.busNumber="",this.loginRoleId=sessionStorage.getItem("loginroleid"),this.reportFormRequest=new Pe,this.dateObj="",this.formsection=!0,this.loadersection=!1,this.detailsection=!1,this.allVehicleObject={id:"",name:"All"},this.selectedBusList=[],this.roleList=[],this.customerTypeName="",this.customerList=[],this.filterForObj="asondate",this.sortDir=1,this.mapVehicleDetails=new W}ngOnInit(){var t=this;return(0,u.Z)(function*(){setTimeout(()=>{t.renderStackedColumnChart(),t.renderVendorWiseDevicesChart()}
1,0),t.rtoList=yield t.listService.getRtoList(new h.nO),t.getDate()})()}ShowChartDiv(){this.showChart=!0,this.showtable=!1,setTimeout(()=>{this.renderStackedColumnChart(),this.renderVendorWiseDevicesChart()},0)}renderVendorWiseDevicesChart(){window.am4VendorChart&&window.am4VendorChart.dispose();let t=Q.Ue8("vendorWiseDevicesChart",L.zO);window.am4VendorChart=t,t.paddingLeft=0,t.data=[{vendor:"Vendor A",devices:15e3},{vendor:"Vendor B",devices:22e3},{vendor:"Vendor C",devices:18500},{vendor:"Vendor D",devices:12e3},{vendor:"Vendor E",devices:9500}];let o=t.xAxes.push(new L.$l);o.dataFields.category="vendor",o.title.text="Vendors",o.renderer.grid.template.location=0,o.renderer.minGridDistance=20,o.renderer.labels.template.fontSize=10;let i=t.yAxes.push(new L.mn);i.min=0,i.title.text="Activated Devices",i.renderer.labels.template.fontSize=10;let r=t.series.push(new L.dX);r.dataFields.valueY="devices",r.dataFields.categoryX="vendor",r.name="Devices",r.columns.template.tooltipText="{categoryX}: [bold]{valueY}[/]",r.columns.template.fillOpacity=.8;let s=new Q.oas;s.addColor(Q.$_Y("#667eea")),s.addColor(Q.$_Y("#764ba2")),r.columns.template.fill=s,r.columns.template.stroke=Q.$_Y("#667eea");let l=r.bullets.push(new L.KC);l.label.text="{valueY}",l.label.fontSize=9,l.label.verticalCenter="bottom",l.label.dy=-5,t.logo&&(t.logo.disabled=!0),t.invalidateRawData()}renderStackedColumnChart(){window.am4RTOChart&&window.am4RTOChart.dispose();let t=Q.Ue8("rtoActivatedStackedColumnChart",L.zO);window.am4RTOChart=t,t.paddingLeft=0,t.data=[{rto:"MP-02",truck:2,car:3,bus:1,bike:1},{rto:"MP-03",truck:4,car:5,bus:2,bike:1},{rto:"MP-04",truck:3e3,car:5e3,bus:2e3,bike:1913},{rto:"MP-05",truck:200,car:400,bus:150,bike:187},{rto:"MP-06",truck:300,car:600,bus:200,bike:235},{rto:"MP-07",truck:800,car:1200,bus:600,bike:762},{rto:"MP-08",truck:100,car:200,bus:80,bike:87},{rto:"MP-09",truck:4e3,car:7e3,bus:2500,bike:2289},{rto:"MP-10",truck:500,car:900,bus:300,bike:188},{rto:"MP-11",truck:400,car:800,bus:300,bike:242},{rto:"MP-12",truck:150,car:300,bus:100,bike:129},{rto:"MP-13",truck:800,car:1600,bus:600,bike:937}];let o=t.xAxes.push(new L.$l);o.dataFields.category="rto",o.title.text="RTO",o.renderer.grid.template.location=0;let i=t.yAxes.push(new L.mn);function r(s,l,d){let m=t.series.push(new L.dX);m.dataFields.valueY=s,m.dataFields.categoryX="rto",m.name=l,m.stacked=!0,m.columns.template.tooltipText="{name}, {categoryX}: {valueY}",m.columns.template.fill=Q.$_Y(d),m.columns.template.stroke=Q.$_Y(d),m.columns.template.adapter.add("fillOpacity",function(){return 1})}i.min=0,i.title.text="Devices",t.legend=new L.De,t.legend.position="top",r("truck","Truck","#2196f3"),r("car","Car","#ff9800"),r("bus","Bus","#34d6a3ff"),r("bike","Bike","#ffe607ff"),t.logo&&(t.logo.disabled=!0),t.invalidateRawData()}getRoleList(){var t=this;return(0,u.Z)(function*(){t.roleList=yield t.listService.getRoleList(new h.nO),t.roleList=t.roleList.filter(o=>"school"==o.name||"customer"==o.name)})()}onChangeCustomerType(){var t=this;return(0,u.Z)(function*(){"asondate"==t.filterForObj?($("#asondate").show(),$("#daterange").hide()):"daterange"==t.filterForObj&&($("#asondate").hide(),$("#daterange").show())})()}getCustomerList(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;o.filter1=t.roleTypeObj.id,t.customerList=yield t.listService.getCustomerList(o)})()}onChangeCustomerList(){var t=this;return(0,u.Z)(function*(){t.busNoObj=null,t.vehicleList=[];let o=new h.nO;"school"==t.customerTypeName?o.filter1=t.customerNameObj.id:o.filter2=t.customerNameObj.id,t.vehicleList=yield t.listService.getVehicleList(o)})()}getVehicleList(){var t=this;return(0,u.Z)(function*(){t.vehicleList=yield t.listService.getVehicleList(new h.nO)})()}getDate(){$(()=>{$('input[name="asondate"]').daterangepicker({showDropdowns:!0,startDate:p().startOf("day").format("DD-MMM-YYYY"),endDate:p().endOf("day").format("DD-MMM-YYYY"),opens:"center",drops:"down",maxSpan:{days:30},locale:{format:"DD-MMM-YYYY"},maxDate:new Date,minYear:2022,maxYear:parseInt(p().format("YYYY"),10),function(t,o){$("#datepicker").html(t.format("DD-MMM-YYYY")+" : "+o.format("DD-MMM-YYYY"))}}),$('input[name="date"]').on("hide.daterangepicker",(t,o)=>{try{this.dateObj=t.target.value}catch(i){}}),this.dateObj=document.getElementById("datepicker").value})}getASONDate(){$(()=>{$('input[name="asondate"]').daterangepicker({showDropdowns:!0,startDate:p().startOf("day").format("DD-MMM-YYYY"),endDate:p().endOf("day").format("DD-MMM-YYYY"),opens:"center",drops:"down",maxSpan:{days:30},locale:{format:"DD-MMM-YYYY"},singleDatePicker:!0,maxDate:new Date,minYear:2022,maxYear:parseInt(p().format("YYYY"),10),function(t,o){$("#datepicker").html(t.format("DD-MMM-YYYY")+" : "+o.format("DD-MMM-YYYY"))}}),$('input[name="asondate"]').on("hide.daterangepicker",(t,o)=>{try{this.dateObj=t.target.value}catch(i){}}),this.dateObj=document.getElementById("asondatedatepicker").value})}onChangeSchool(){var t=this;return(0,u.Z)(function*(){let o=new h.nO;o.schoolid=t.schoolObj.id,t.vehicleList=yield t.listService.getVehicleList(o)})()}checkAllBus(){this.busNumber="All"==this.busNoObj.name?"":this.busNoObj.name}validateForm(){if(this.reportForm.valid){this.formsection=!1;let t=this.dateObj.split(" - ");this.reportFormRequest.fromdate=t[0],this.reportFormRequest.todate=t[1],"timeduration"==this.filterForObj?(this.reportFormRequest.fromtime=document.getElementById("fromtime").value.replace(" ","").replace(" ",""),this.reportFormRequest.totime=document.getElementById("totime").value.replace(" ","").replace(" ",""),this.dateRange=this.reportFormRequest.fromdate+" "+this.reportFormRequest.fromtime+" To "+this.reportFormRequest.todate+" "+this.reportFormRequest.totime):(this.reportFormRequest.fromdate=t[0],this.reportFormRequest.todate=t[1],this.reportFormRequest.fromtime="12:00 AM",this.reportFormRequest.totime="11:59 PM",this.dateRange=this.reportFormRequest.fromdate+" "+this.reportFormRequest.fromtime+" To "+this.reportFormRequest.todate+" "+this.reportFormRequest.totime),this.details("refresh")}}details(t){"showrow"==t&&(this.reportFormRequest.pageno=1),"search"==t&&(this.reportFormRequest.pageno=1),"refresh"==t&&(this.reportFormRequest.searchby="",this.reportFormRequest.pageno=1,this.reportFormRequest.itemperpage=10),this.reportFormRequest.searchby=this.reportFormRequest.searchby.trim(),this.loadersection=!0,this.detailsection=!1;try{this.loader.loaderOn()}catch(o){}this.es.apiCall(this.reportFormRequest,"report/vehicleinstallationreport").subscribe(o=>{try{this.loader.loaderOff()}catch(i){}200==o.statusCode?(this.formsection=!1,this.loadersection=!1,this.detailsection=!0,this.detailData=o.entity.vehicleinstallationdetails,this.totalCount=+o.entity.totalrecord,this.recordFrom=this.detailData[0].rowno,this.recordTo=this.detailData[this.detailData.length-1].rowno):(this.detailData=[],this.recordTo=0,this.recordFrom=0,this.totalCount=0,this.reportFormRequest.searchby="",this.formsection=!1,this.loadersection=!1,this.detailsection=!0),this.es.pageDataInfo("",this.reportFormRequest,"Vehicle Installation Report","Details method","Called Function",o.message)},o=>{this.loader.logout()})}redirectToForm(){var t=this;return(0,u.Z)(function*(){try{t.reportForm.resetForm()}catch(o){}t.formsection=!0,t.loadersection=!1,t.detailsection=!1,t.getDate(),$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"}),yield t.getRoleList(),t.schoolObj=null,t.busNoObj=null,t.vehicleList=[]})()}ResetForm(){this.reportForm.resetForm(),this.formsection=!0,this.loadersection=!1,this.detailsection=!1,this.getDate(),setTimeout(()=>{$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"})},1500),this.getRoleList(),this.schoolObj=null,this.busNoObj=null,this.vehicleList=[]}sorting(t,o){try{let r=t.currentTarget.childNodes[1].classList;try{r.contains("fa-sort-amount-desc")?(r.remove("fa-sort-amount-desc"),r.add("fa-sort-amount-asc")):(r.remove("fa-sort-amount-asc"),r.add("fa-sort-amount-desc"))}catch(s){console.log("e "+s)}this.sortDir=1==this.sortDir?-1:1;try{this.detailData.length>0&&this.detailData.sort((s,l)=>(s=s[o].toLowerCase(),l=l[o].toLowerCase(),s.localeCompare(l)*this.sortDir))}catch(s){console.log("e "+s)}}catch(i){}}trackVehicle(t){var o=this;return(0,u.Z)(function*(){console.log("distance on arrival response",W),o.mapVehicleDetails=t,$("#exampleModal").modal("show");let i=new y.rn;i.vehicleid=t.vehicleid,i.imeino=t.deviceimeino,i.fromdate=o.datePipe.transform(t.gpsfromdate,"dd-MMM-yyyy"),i.fromtime=o.datePipe.transform(t.gpsfromdate,"hh:mm:ss a"),i.todate=o.datePipe.transform(t.gpstodate,"dd-MMM-yyyy"),i.totime=o.datePipe.transform(t.gpstodate,"hh:mm:ss a"),yield o.mapService.trackHistoryVehicle(i.imeino,i.fromdate,i.fromtime,i.todate,i.totime,i.vehicleid,"",!1,!1,new y.Us)})()}downloadDoc(t){let o=new V;o.pdfexcel=t,o.itemperpage="",o.pageno="",o.fromdate=this.reportFormRequest.fromdate,o.todate=this.reportFormRequest.todate,o.fromtime=this.reportFormRequest.fromtime,o.totime=this.reportFormRequest.totime;try{this.loader.loaderOn()}catch(i){}this.es.apiCall(o,"distancereport").subscribe(i=>{try{this.loader.loaderOff()}catch(r){}"200"==i.statusCode&&(this.filePath=i.message,this.es.commonFileDownload(this.filePath)),o.pdfexcel="",this.es.pageDataInfo("",o,"Distance Travel Report","Download Excel/PDF method","Called Function",i.message)})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(S.R),e.Y36(U.v),e.Y36(N.D),e.Y36(M.F0),e.Y36(F.P),e.Y36(D.X),e.Y36(g.uU),e.Y36(J.S))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-rtowise-report"]],viewQuery:function(t,o){if(1&t&&(e.Gf(ds,5),e.Gf(ce,5)),2&t){let i;e.iGM(i=e.CRH())&&(o.reportForm=i.first),e.iGM(i=e.CRH())&&(o.reportMapComponent=i.first)}},decls:329,vars:54,consts:[[1,"container-fluid","report-form-container"],[1,"reportheader"],["aria-hidden","true",1,"fa","fa-credit-card"],[1,"rptheadertext"],[1,"row","mt-4",3,"ngStyle"],[1,"col-md-12"],["novalidate","","id","form_id","autocomplete","off",1,"needs-validation"],["reportForm","ngForm"],[1,"row"],[1,"col-md-2"],[1,"form-group"],[1,"mb-0","label"],[1,"text-danger"],["bindLabel","name","bindValue","code","name","rtoDropdown","placeholder","Select RTO","required","",3,"ngModel","items","multiple","ngModelChange"],[1,"col-md-3"],[1,"report-label","mb-0"],["
1id","asondate"],["type","text","name","asondate","id","asondatedatepicker","required","","placeholder","Select Date",1,"form-control","form-control-sm"],["id","daterange",2,"display","none"],["type","text","name","date","id","datepicker","required","","placeholder","Select Date",1,"form-control","form-control-sm"],[1,"col","mt-3"],["type","submit",1,"custom-btn","btn-13","float-right","Show","mb-3",3,"click"],["type","button",1,"custom-btn","btn-10","float-right","mr-2",3,"click"],[1,"report-form-container",3,"ngStyle"],[1,"col-md-12","text-end"],["ngbTooltip","Back",1,"backbtnbackground",3,"click"],["aria-hidden","true",1,"fa","fa-arrow-circle-o-left","outputlabel"],[1,"row","mb-2"],[1,"col-md-12","p-2"],[1,"row","align-items-center","mb-3"],[1,"col-md-4"],[1,"card","mb-0","ani",2,"border","1px solid #dee2e6"],[1,"card-header","p-2","mb-4",2,"background-color","#f8f9fa"],[1,"fw-bold","mb-0","text-center","mb-1",2,"font-size","12px"],[1,"card-body","p-2"],[1,"mb-3"],[1,"fw-bolder","text-small","text-uppercase",2,"font-size","10px"],[1,"text-uppercase","text-small","ms-1",2,"font-size","10px"],[1,"table","table-bordered","table-summary","mb-3",2,"background","#fff"],[2,"text-align","center"],[2,"background","linear-gradient(135deg, #cbd7e0 60%, #a8c6cd 100%)","color","#000","font-size","9px","padding","0.4rem 0.3rem","white-space","nowrap"],[1,"fa","fa-plug"],[2,"background","linear-gradient(135deg, #dbcfc5 60%, #d7c6b0 100%)","color","#000","font-size","9px","padding","0.4rem 0.3rem","white-space","nowrap"],[1,"fa","fa-chain-broken"],[2,"background","linear-gradient(135deg, #cec7b2 60%, #dad7b9 100%)","color","#000","font-size","9px","padding","0.4rem 0.3rem","white-space","nowrap"],[1,"fa","fa-clock-o"],[2,"background","linear-gradient(135deg, #cae1da 60%, #c2cdcc 100%)","color","#000","font-size","9px","padding","0.4rem 0.3rem","white-space","nowrap"],[1,"fa","fa-check-circle"],[2,"text-align","center","font-weight","700","font-size","0.75rem","background-color","#eceae5"],[2,"padding","0.4rem 0.3rem"],[1,"card-header","p-2",2,"background-color","#f8f9fa"],[1,"fw-bold","mb-0","text-center",2,"font-size","12px"],["id","rtoActivatedStackedColumnChart",2,"font-size","11px","height","150px","width","100%"],["id","vendorWiseDevicesChart",2,"font-size","11px","height","150px","width","100%"],[1,"col-md-12","text-end","ani"],[1,"table-head","d-flex","justify-content-between"],["id","tickets-table_info","role","status","aria-live","polite",1,"col-auto","mt-2","text-center","fw-bold","total-record-label"],[4,"ngIf"],[1,"mt-1"],[1,"itemsperpage-style",2,"margin-right","10px"],[1,"d-inline-flex","align-items-center"],["name","table_length","aria-controls","table","name","pageSize",3,"ngModel","ngModelChange","change"],["value","10","selected",""],["value","20",4,"ngIf"],["value","50",4,"ngIf"],["value","100",4,"ngIf"],[3,"value",4,"ngIf"],["type","button",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"click"],["aria-hidden","true",1,"fa","fa-refresh"],["type","button","ngbTooltip","Download Pdf","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-pdf-o","pdf-btn"],["type","button","ngbTooltip","Download Excel","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-excel-o","excel-btn"],["type","text","name","searchTerm","autocomplete","off","aria-controls","tickets-table","placeholder","Search here....","autocomplete","off",1,"form-control","form-control-sm","ms-2","searchinput",2,"width","165px",3,"ngModel","ngModelChange"],["type","button",1,"btn","search-btn",3,"click"],[1,"fa","fa-search"],[1,"rtowise-table"],[1,"total-row"],["rowspan","2",2,"vertical-align","middle"],["colspan","2",2,"text-align","center"],[1,"digital-number","digital-glow"],[2,"font-size","10px !important"],[1,"grid-section",3,"ngStyle"],[1,"p-2","report-summary","row","justify-content-between"],["class","col-md-3",4,"ngIf"],[1,"col-md-8"],[1,"fw-bolder","text-small","text-uppercase","outputlabel"],[1,"text-uppercase","text-small","outputlabel"],[1,"col-md-1"],["ngbTooltip","Back",1,"backbtnbackground","float-end",3,"click"],[1,"col-md-12","px-0",2,"background-color","white"],[1,"scroll-tbl"],[1,"table","table-hover","table-bordered","table-style","animate__animated","animate__fadeIn",2,"overflow-y","auto","overflow-x","auto"],[2,"width","50px","text-align","center",3,"click"],[2,"text-align","center",3,"click"],[1,"fa","fa-sort-amount-desc","tablesortico"],[1,"row","justify-content-md-between","align-items-md-center","mt-2"],["class","float-end text-start",4,"ngIf"],["id","exampleModal","tabindex","-1","aria-labelledby","exampleModalLabel","data-bs-backdrop","static","data-bs-keyboard","false","aria-hidden","true",1,"modal","fade"],[1,"modal-dialog","modal
1-xl"],[1,"modal-content"],[1,"modal-header","bg-white"],["id","exampleModalLabel",1,"modal-title"],["type","button","data-bs-dismiss","modal","aria-label","Close",1,"btn-close",3,"click"],[1,"modal-body","p-0"],[2,"width","100%","height","500px"],[1,"current-vehicle-section"],[1,"p-1",2,"max-width","250px","font-size","12px"],[1,"m-0"],["role","group",1,"btn-group"],["type","button",1,"btn","btn-sm","btn-outline-primary","py-1",3,"click"],["type","button","class","btn btn-sm btn-outline-primary py-1","ngbTooltip","Play",3,"click",4,"ngIf"],["type","button","class","btn btn-sm btn-outline-primary py-1","ngbTooltip","Pause",3,"click",4,"ngIf"],["type","button","class","btn btn-sm btn-outline-primary py-1","ngbTooltip","Stop",3,"click",4,"ngIf"],[1,"col-12"],["type","range","min","1000","max","20000",1,"form-range","form-control","form-control-sm",3,"ngModel","change","ngModelChange"],["value","20"],["value","50"],["value","100"],[3,"value"],["colspan","11"],[1,"text-center","text-danger","fw-bold"],[4,"ngFor","ngForOf"],[1,"float-end"],[1,"float-end","fw-bold"],[1,"float-end","text-start"],["size","sm",1,"d-flex","mt-2","justify-content-end","pagination-rounded","pagination","pagination-info",3,"collectionSize","page","maxSize","pageSize","pageChange"],["m-0",""],["src","assets/school-management/images/poweroff.png","style","width: 20px;height: 20px;",4,"ngIf"],[1,"m-0",2,"word-wrap","break-word"],["src","assets/school-management/images/poweron.png",2,"width","20px","height","20px"],["src","assets/school-management/images/poweroff.png",2,"width","20px","height","20px"],["type","button","ngbTooltip","Play",1,"btn","btn-sm","btn-outline-primary","py-1",3,"click"],["type","button","ngbTooltip","Pause",1,"btn","btn-sm","btn-outline-primary","py-1",3,"click"],["type","button","ngbTooltip","Stop",1,"btn","btn-sm","btn-outline-primary","py-1",3,"click"]],template:function(t,o){1&t&&(e.TgZ(0,"div",0)(1,"div")(2,"h5",1),e._UZ(3,"i",2),e._uU(4,"\xa0\xa0\xa0"),e.TgZ(5,"span",3),e._uU(6,"RTO Wise Device Report"),e.qZA()()(),e.TgZ(7,"div",4)(8,"div",5)(9,"form",6,7)(11,"div",8)(12,"div",9)(13,"div",10)(14,"label",11),e._uU(15,"RTO"),e.TgZ(16,"span",12),e._uU(17,"*"),e.qZA()(),e.TgZ(18,"ng-select",13),e.NdJ("ngModelChange",function(r){return o.selectedRTO=r}),e.qZA()()(),e.TgZ(19,"div",14)(20,"div",10)(21,"label",15),e._uU(22,"Date Range:"),e.qZA(),e.TgZ(23,"div",16),e._UZ(24,"input",17),e.qZA(),e.TgZ(25,"div",18),e._UZ(26,"input",19),e.qZA()()(),e.TgZ(27,"div",20)(28,"button",21),e.NdJ("click",function(){return o.validateForm()}),e._uU(29,"Generate"),e.qZA(),e._uU(30," \xa0 "),e.TgZ(31,"button",22),e.NdJ("click",function(){return o.ResetForm()}),e._uU(32,"Reset"),e.qZA()()()()()()(),e.TgZ(33,"div",23)(34,"div",8)(35,"div",24)(36,"button",25),e.NdJ("click",function(){return o.redirectToForm()}),e._UZ(37,"i",26),e._uU(38," Back "),e.qZA()()(),e.TgZ(39,"div",27)(40,"div",28)(41,"div",29)(42,"div",30)(43,"div",31)(44,"div",32)(45,"h6",33),e._uU(46,"Report Summary"),e.qZA()(),e.TgZ(47,"div",34)(48,"div",35)(49,"div")(50,"span",36),e._uU(51,"RTO:"),e.qZA(),e.TgZ(52,"span",37),e._uU(53),e.qZA()(),e.TgZ(54,"div")(55,"span",36),e._uU(56,"Date:"),e.qZA(),e.TgZ(57,"span",37),e._uU(58),e.qZA()()(),e.TgZ(59,"table",38)(60,"thead")(61,"tr",39)(62,"th",40),e._UZ(63,"i",41),e._uU(64," Connected "),e.qZA(),e.TgZ(65,"th",42),e._UZ(66,"i",43),e._uU(67," Not Connected "),e.qZA(),e.TgZ(68,"th",44),e._UZ(69,"i",45),e._uU(70," Class Wise "),e.qZA(),e.TgZ(71,"th",46),e._UZ(72,"i",47),e._uU(73," Vendor Wise "),e.qZA()()(),e.TgZ(74,"tbody")(75,"tr",48)(76,"td",49),e._uU(77),e.qZA(),e.TgZ(78,"td",49),e._uU(79),e.qZA(),e.TgZ(80,"td",49),e._uU(81,"1"),e.qZA(),e.TgZ(82,"td",49),e._uU(83),e.qZA()()()()()()(),e.TgZ(84,"div",30)(85,"div",31)(86,"div",50)(87,"h6",51),e._uU(88,"Category Wise RTO Activated Devices"),e.qZA()(),e.TgZ(89,"div",34),e._UZ(90,"div",52),e.qZA()()(),e.TgZ(91,"div",30)(92,"div",31)(93,"div",50)(94,"h6",51),e._uU(95,"Vendor Wise Activated Devices "),e.qZA()(),e.TgZ(96,"div",34),e._UZ(97,"div",53),e.qZA()()()()(),e.TgZ(98,"div",28)(99,"div",27)(100,"div",54)(101,"div",55)(102,"div",56),e.YNc(103,us,2,3,"span",57),e.qZA(),e.TgZ(104,"div",58)(105,"span",59)(106,"label",60),e._uU(107,"Show "),e.TgZ(108,"select",61),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.itemperpage=r})("change",function(){return o.details("showrow")}
1),e.TgZ(109,"option",62),e._uU(110," 10"),e.qZA(),e.YNc(111,gs,2,0,"option",63),e.YNc(112,hs,2,0,"option",64),e.YNc(113,_s,2,0,"option",65),e.YNc(114,fs,2,2,"option",66),e.qZA(),e._uU(115," entries"),e.qZA()(),e.TgZ(116,"span")(117,"button",67),e.NdJ("click",function(){return o.details("refresh")}),e._UZ(118,"i",68),e.qZA()(),e.TgZ(119,"span")(120,"button",69),e.NdJ("click",function(){return o.downloadDoc("pdf")}),e._UZ(121,"i",70),e.qZA(),e.TgZ(122,"button",71),e.NdJ("click",function(){return o.downloadDoc("excel")}),e._UZ(123,"i",72),e.qZA()(),e.TgZ(124,"label")(125,"input",73),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.searchby=r}),e.qZA()(),e.TgZ(126,"button",74),e.NdJ("click",function(){return o.details("search")}),e._UZ(127,"span",75),e.qZA()()(),e.TgZ(128,"table",76)(129,"thead")(130,"tr",77)(131,"th",78),e._uU(132,"#"),e.qZA(),e.TgZ(133,"th",78),e._uU(134,"RTO NAME"),e.qZA(),e.TgZ(135,"th",78),e._uU(136,"RTO CODE"),e.qZA(),e.TgZ(137,"th",79)(138,"span",80),e._uU(139,"ACTIVATED TOTAL"),e.qZA()()(),e.TgZ(140,"tr",77)(141,"th",81),e._uU(142,"CONNECTED"),e.qZA(),e.TgZ(143,"th",81),e._uU(144,"NOT CONNECTED"),e.qZA()()(),e.TgZ(145,"tbody")(146,"tr")(147,"td"),e._uU(148,"1"),e.qZA(),e.TgZ(149,"td"),e._uU(150,"MP-02-MP GOVERNMENT VEHICLE"),e.qZA(),e.TgZ(151,"td"),e._uU(152,"MP-02"),e.qZA(),e.TgZ(153,"td"),e._uU(154,"7"),e.qZA(),e.TgZ(155,"td"),e._uU(156,"6"),e.qZA()(),e.TgZ(157,"tr")(158,"td"),e._uU(159,"2"),e.qZA(),e.TgZ(160,"td"),e._uU(161,"MP-03-MP POLICE VEHICLE"),e.qZA(),e.TgZ(162,"td"),e._uU(163,"MP-03"),e.qZA(),e.TgZ(164,"td"),e._uU(165,"12"),e.qZA(),e.TgZ(166,"td"),e._uU(167,"12"),e.qZA()(),e.TgZ(168,"tr")(169,"td"),e._uU(170,"3"),e.qZA(),e.TgZ(171,"td"),e._uU(172,"MP-04-BHOPAL"),e.qZA(),e.TgZ(173,"td"),e._uU(174,"MP-04"),e.qZA(),e.TgZ(175,"td"),e._uU(176,"12001"),e.qZA(),e.TgZ(177,"td"),e._uU(178,"11913"),e.qZA()(),e.TgZ(179,"tr")(180,"td"),e._uU(181,"4"),e.qZA(),e.TgZ(182,"td"),e._uU(183,"MP-05-NARMADAPURAM"),e.qZA(),e.TgZ(184,"td"),e._uU(185,"MP-05"),e.qZA(),e.TgZ(186,"td"),e._uU(187,"937"),e.qZA(),e.TgZ(188,"td"),e._uU(189,"934"),e.qZA()(),e.TgZ(190,"tr")(191,"td"),e._uU(192,"5"),e.qZA(),e.TgZ(193,"td"),e._uU(194,"MP-06-MORENA"),e.qZA(),e.TgZ(195,"td"),e._uU(196,"MP-06"),e.qZA(),e.TgZ(197,"td"),e._uU(198,"1341"),e.qZA(),e.TgZ(199,"td"),e._uU(200,"1335"),e.qZA()(),e.TgZ(201,"tr")(202,"td"),e._uU(203,"6"),e.qZA(),e.TgZ(204,"td"),e._uU(205,"MP-07-GWALIOR"),e.qZA(),e.TgZ(206,"td"),e._uU(207,"MP-07"),e.qZA(),e.TgZ(208,"td"),e._uU(209,"3362"),e.qZA(),e.TgZ(210,"td"),e._uU(211,"3362"),e.qZA()()()()()(),e.TgZ(212,"div",82)(213,"div",83),e.YNc(214,bs,5,1,"div",84),e.TgZ(215,"div",85)(216,"span",86),e._uU(217,"Date :"),e.qZA(),e.TgZ(218,"span",87),e._uU(219),e.qZA()(),e.TgZ(220,"div",88)(221,"button",89),e.NdJ("click",function(){return o.redirectToForm()}),e._UZ(222,"i",26),e.qZA()()(),e.TgZ(223,"div",90)(224,"div",55)(225,"div",56),e.YNc(226,vs,2,3,"span",57),e.qZA(),e.TgZ(227,"div",58)(228,"span",59)(229,"label",60),e._uU(230,"Show "),e.TgZ(231,"select",61),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.itemperpage=r})("change",function(){return o.details("showrow")}),e.TgZ(232,"option",62),e._uU(233," 10"),e.qZA(),e.YNc(234,Ts,2,0,"option",63),e.YNc(235,Zs,2,0,"option",64),e.YNc(236,xs,2,0,"option",65),e.YNc(237,ys,2,2,"option",66),e.qZA(),e._uU(238," entries"),e.qZA()(),e.TgZ(239,"span")(240,"button",67),e.NdJ("click",function(){return o.details("refresh")}),e._UZ(241,"i",68),e.qZA()(),e.TgZ(242,"span")(243,"button",69),e.NdJ("click",function(){return o.downloadDoc("pdf")}),e._UZ(244,"i",70),e.qZA(),e.TgZ(245,"button",71),e.NdJ("click",function(){return o.downloadDoc("excel")}),e._UZ(246,"i",72),e.qZA()(),e.TgZ(247,"label")(248,"input",73),e.NdJ("ngModelChange",function(r){return o.reportFormRequest.searchby=r}),e.qZA()(),e.TgZ(249,"button",74),e.NdJ("click",function(){return o.details("search")}),e._UZ(250,"span",75),e.qZA()()(),e.TgZ(251,"div",91)(252,"table",92)(253,"thead")(254,"tr")(255,"th",93),e.NdJ("click",function(r){return o.sorting(r,"rowno")}),e._uU(256,"# "),e.qZA(),e.TgZ(257,"th",94),e.NdJ("click",function(r){return o.sorting(r,"vehicleno")}),e._uU(258,"VEHICLE NO "),e._UZ(259,"i",95),e.qZA(),e.TgZ(260,"th",94),e.NdJ("click",function(r){return o.sorting(r,"vehiclemakename")}),e._uU(261," VEHICLE MAKE "),e._UZ(262,"i",95),e.qZA(),e.TgZ(263,"th",94),e.NdJ("click",function(r){return o.sorting(r,"vehiclemodelname")}
1),e._uU(264," VEHICLE MODEL "),e._UZ(265,"i",95),e.qZA(),e.TgZ(266,"th",94),e.NdJ("click",function(r){return o.sorting(r,"panic")}),e._uU(267,"PANIC "),e._UZ(268,"i",95),e.qZA(),e.TgZ(269,"th",94),e.NdJ("click",function(r){return o.sorting(r,"status")}),e._uU(270,"STATUS "),e._UZ(271,"i",95),e.qZA(),e.TgZ(272,"th",94),e.NdJ("click",function(r){return o.sorting(r,"devicetype")}),e._uU(273,"DEVICE TYPE"),e.qZA(),e.TgZ(274,"th",94),e.NdJ("click",function(r){return o.sorting(r,"m2mprovidername")}),e._uU(275,"M2M PROVIDER"),e.qZA(),e.TgZ(276,"th",94),e.NdJ("click",function(r){return o.sorting(r,"iccidno")}),e._uU(277,"ICCID NO. "),e.qZA(),e.TgZ(278,"th",94),e.NdJ("click",function(r){return o.sorting(r,"primarynetworkname")}),e._uU(279," PRIMARY NETWORK"),e.qZA(),e.TgZ(280,"th",94),e.NdJ("click",function(r){return o.sorting(r,"secondarynetworkname")}),e._uU(281," SECONDARY NETWORK"),e.qZA()()(),e.YNc(282,Cs,5,0,"tbody",57),e.YNc(283,qs,2,1,"tbody",57),e.qZA()(),e.TgZ(284,"div",96),e.YNc(285,Os,2,4,"div",97),e.qZA()()()()()(),e.TgZ(286,"div",98)(287,"div",99)(288,"div",100)(289,"div",101)(290,"h4",102)(291,"u"),e._uU(292," Distance Travelled Summary"),e.qZA(),e._uU(293," of "),e.TgZ(294,"b"),e._uU(295),e.qZA(),e._uU(296," from "),e.TgZ(297,"b"),e._uU(298),e.qZA(),e._uU(299," to "),e.TgZ(300,"b"),e._uU(301),e.qZA()(),e.TgZ(302,"button",103),e.NdJ("click",function(){return o.mapService.clearAllLayers()}),e.qZA()(),e.TgZ(303,"div",104)(304,"div",105),e._UZ(305,"app-helper-map"),e.TgZ(306,"div",106)(307,"div",107),e.YNc(308,ws,12,10,"div",57),e.TgZ(309,"p",108),e._uU(310),e.qZA(),e.TgZ(311,"p",108),e._uU(312),e.qZA(),e.TgZ(313,"p",108),e._uU(314),e.qZA(),e.TgZ(315,"p",108),e._uU(316),e.qZA(),e.TgZ(317,"p",108),e._uU(318),e.qZA(),e.TgZ(319,"p",108),e._uU(320),e.qZA(),e.TgZ(321,"div",109)(322,"button",110),e.NdJ("click",function(){return o.mapService.changeAnimation("restart")}),e._uU(323," Start "),e.qZA(),e.YNc(324,Ms,2,0,"button",111),e.YNc(325,Ns,2,0,"button",112),e.YNc(326,Fs,2,0,"button",113),e.qZA(),e.TgZ(327,"div",114)(328,"input",115),e.NdJ("change",function(){return o.mapService.changeAnimation("speedchange")})("ngModelChange",function(r){return o.mapService.historySpeed=r}),e.qZA()()()()()()()()()),2&t&&(e.xp6(7),e.Q6J("ngStyle",e.VKq(48,_e,o.formsection?"":"none")),e.xp6(11),e.Q6J("ngModel",o.selectedRTO)("items",o.rtoList)("multiple",!1),e.xp6(15),e.Q6J("ngStyle",e.VKq(50,_e,o.detailsection?"":"none")),e.xp6(20),e.Oqu(o.busNumber),e.xp6(5),e.Oqu(o.dateRange),e.xp6(19),e.Oqu(o.totalCount),e.xp6(2),e.Oqu(o.detailData.length),e.xp6(4),e.Oqu(o.detailData.length),e.xp6(20),e.Q6J("ngIf",0!=o.totalCount),e.xp6(5),e.Q6J("ngModel",o.reportFormRequest.itemperpage),e.xp6(3),e.Q6J("ngIf",o.totalCount>20),e.xp6(1),e.Q6J("ngIf",o.totalCount>50),e.xp6(1),e.Q6J("ngIf",o.totalCount>100),e.xp6(1),e.Q6J("ngIf",o.totalCount<100&&o.totalCount>10),e.xp6(6),e.Q6J("disabled","0"==o.totalCount),e.xp6(2),e.Q6J("disabled","0"==o.totalCount),e.xp6(3),e.Q6J("ngModel",o.reportFormRequest.searchby),e.xp6(87),e.Q6J("ngStyle",e.VKq(52,_e,o.detailsection?"":"none")),e.xp6(2),e.Q6J("ngIf",""!=o.busNumber),e.xp6(5),e.hij(" ",o.dateRange,""),e.xp6(7),e.Q6J("ngIf",0!=o.totalCount),e.xp6(5),e.Q6J("ngModel",o.reportFormRequest.itemperpage),e.xp6(3),e.Q6J("ngIf",o.totalCount>20),e.xp6(1),e.Q6J("ngIf",o.totalCount>50),e.xp6(1),e.Q6J("ngIf",o.totalCount>100),e.xp6(1),e.Q6J("ngIf",o.totalCount<100&&o.totalCount>10),e.xp6(6),e.Q6J("disabled",0===o.totalCount),e.xp6(2),e.Q6J("disabled",0===o.totalCount),e.xp6(3),e.Q6J("ngModel",o.reportFormRequest.searchby),e.xp6(34),e.Q6J("ngIf",0==o.totalCount),e.xp6(1),e.Q6J("ngIf",0!=o.totalCount),e.xp6(2),e.Q6J("ngIf",o.totalCount>o.reportFormRequest.itemperpage),e.xp6(10),e.hij("",o.mapVehicleDetails.vehicleno," "),e.xp6(3),e.hij(" ",o.mapVehicleDetails.gpsfromdate,""),e.xp6(3),e.hij("",o.mapVehicleDetails.gpstodate," "),e.xp6(7),e.Q6J("ngIf",o.mapService.historyVehicleData.pollingdatatime),e.xp6(2),e.hij("Start Date : ",o.mapVehicleDetails.gpsfromdate,""),e.xp6(2),e.hij("End Date : ",o.mapVehicleDetails.gpstodate,""),e.xp6(2),e.hij("Total Distance : ",o.mapVehicleDetails.gpsdistance," km"),e.xp6(2),e.hij("Duration : ",o.mapVehicleDetails.duration,""),e.xp6(2),e.hij("Max Speed : ",o.mapVehicleDetails.maxspeed," Km/hr"),e.xp6(2),e.hij("Running Time : ",o.mapVehicleDetails.workingtime," min"),e.xp6(4),e.Q6J("ngIf","running"!=o.mapService.animationStatus&&"paused"==o.mapService.animationStatus),e.xp6(1),e.Q6J("ngIf","running"==o.mapService.animationStatus),e.xp6(1),e.Q6J("ngIf","stopped"!=o.mapService.animationStatus),e.xp6(2),e.Q6J("ngModel",o.mapService.historySpeed))},directives:[g.PC,c._Y,c.JL,c.F,A.w9,c.Q7,c.JJ,c.On,C._L,g.O5,c.EJ,c.YN,c.Kr,c.Fj,g.sg,C.N9,Y.F,c.eT],pipes:[g.gd],styles:[".ng-select.ng-select-single .ng-select-container .ng-value-container{font-size:12px!important} .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{font-size:12px!important;text-transform:capitalize}ng-select.ng-select-single[_ngcontent-%COMP%] .ng-select-container{min-height:26px;max-height:26px;height:26px}.form-control[_ngcontent-%COMP%]{height:calc(1.45rem + 2px)}.invalid-feedback[_ngcontent-%COMP%]{font-size:11px;color:#dc3545}input[_ngcontent-%COMP%]{font-size:12px}.starvalid[_ngcontent-%COMP%]{color:#ff0040!important}.validationmsg[_ngcontent-%COMP%]{--bs-text-opacity: 1;color:#ff0040!important;font-weight:600}.card-header[_ngcontent-%COMP%]{padding:.1rem 1rem;margin-bottom:0;background-color:#00000008;border-bottom:1px solid #e7eaed}.rptheadertext[_ngcontent-%COMP%]{text-decoration:underline}.rptlabel[_ngcontent-%COMP%]{color:#000}.outputlabel[_ngcontent-%COMP%]{color:#003c75}.backbtn[_ngcontent-%COMP%]{float:right;margin-left:25%!important;margin-top:-1%!important}.srnotd[_ngcontent-%COMP%]{background-color:#f2f2f2}.form-group[_ngcontent-%COMP%]{margin-bottom:.2rem}.rtowise-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-family:Arial;background:#fff;box-shadow:0 2px 8px #0000000d}.rtowise-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .rtowise-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:1px solid #e0e0e0;padding:4px 7px;text-align:center;font-size:11px}.rtowise-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background:#b1c5d5;color:#00121b;font-size:11px;font-weight:600;position:sticky;top:0;z-index:2}.rtowise-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(even){background:#f5f8fa}.rtowise-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:#e3f2fd;transition:background .2s}.rtowise-table[_ngcontent-%COMP%] .total-row[_ngcontent-%COMP%]{background:#b1c5d5;color:#00121b;font-weight:700}.btn-outline-secondary[_ngcontent-%COMP%]:hover, .editable-container.editable-inline[_ngcontent-%COMP%] .editableform[_ngcontent-%COMP%] .control-group[_ngcontent-%COMP%] .editable-buttons[_ngcontent-%COMP%] .editable-cancel[_ngcontent-%COMP%]:hover{background:#4b555a;color:#fff}.grid-section[_ngcontent-%COMP%], .ani[_ngcontent-%COMP%], .entrydiv[_ngcontent-%COMP%]{animation:fadeInUp .8s ease-out}@keyframes fadeInUp{0%{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}"]}),n})();const Ds=[{path:"vehiclesummary",component:xt},{path:"ignitiononoff",component:Qt},{path:"geofenceinout",component:Hn},{path:"idlereport",component:So},{path:"stoppagereport",component:mo},{path:"overspeedreport",component:fn},{path:"sosalertreport",component:yi},{path:"distancetravel",component:or},{path:"eventlogreport",component:Sr},{path:"apilogreport",component:Kr},{path:"tripreport",component:Sa},{path:"alerteventreport",component:ms},{path:"vehicleinstallationreport",component:v(63507).l},{path:"rtowisereport",component:Ss}];let Is=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n}),n.\u0275inj=e.cJS({imports:[[M.Bz.forChild(Ds)],M.Bz]}),n})();var Js=v(44466),Ls=v(64813);let Ys=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n}),n.\u0275inj=e.cJS({providers:[g.uU],imports:[[g.ez,Is,Js.m,Ls.MapModule]]}),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.