frontend-roadreport-main/frontend-roadreport-deploy/dist/road-report/641.81147924ef1f98a2.js
2024-12-31 10:28:36 +07:00

1 line
37 KiB
JavaScript

"use strict";(self.webpackChunkroad_report=self.webpackChunkroad_report||[]).push([[641],{6641:(kt,D,l)=>{l.r(D),l.d(D,{DetailModule:()=>Dt});var p=l(177),T=l(2665),w=l(6847),o=l(9417),c=l(6803),t=l(8699),S=l(6655),h=l(7110);const k=function(i){return{"is-invalid":i}};function $(i,r){if(1&i){const e=t.RV6();t.j41(0,"ngb-datepicker",24,25),t.bIt("dateSelect",function(s){t.eBV(e);const a=t.XpG();return t.Njj(a.onDateSelection(s))}),t.k0s()}if(2&i){const e=t.XpG(),n=t.sdS(21);t.Y8G("minDate",e.todayDate)("displayMonths",2)("dayTemplate",n)("weekdays",!1)("ngClass",t.eq3(5,k,e.helpers.isInvalid(e.form,"status")))}}function G(i,r){if(1&i){const e=t.RV6();t.j41(0,"span",26),t.bIt("mouseenter",function(){const a=t.eBV(e).$implicit,d=t.XpG();return t.Njj(d.hoveredDate=a)})("mouseleave",function(){t.eBV(e);const s=t.XpG();return t.Njj(s.hoveredDate=null)}),t.EFF(1),t.k0s()}if(2&i){const e=r.$implicit,n=r.focused,s=t.XpG();t.AVh("focused",n)("range",s.isRange(e))("faded",s.isHovered(e)||s.isInside(e)),t.Y8G("ngClass",t.eq3(8,k,s.helpers.isInvalid(s.form,"date_start"))),t.R7$(1),t.SpI(" ",e.day," ")}}function U(i,r){if(1&i&&(t.j41(0,"option",27),t.EFF(1),t.k0s()),2&i){const e=r.$implicit;t.Y8G("value",e.id),t.R7$(1),t.SpI(" ",e.fullname," ")}}let N=(()=>{class i{constructor(e,n,s,a,d){this.surveyor=n,this.activeModal=s,this.helpers=a,this.formBuilder=d,this.action="create",this.data={},this.form={},this.toDate=null,this.showDatePicker=!1,this.hoveredDate=null;const u=new Date;this.todayDate={year:u.getFullYear(),month:u.getMonth()+1,day:u.getDate()},this.surveyor.getAll({filter:{urole_id:{eq:"1b4701ab-da41-405b-9fe3-039a4daf0094"}},limit:10,sort:"-created_at"}).subscribe({next:({data:m})=>{this.dataSurveyor=m}}),this.fromDate=e.getToday(),this.toDate=e.getNext(e.getToday(),"d",1)}ngOnInit(){this.initForm()}initForm(){this.form=this.formBuilder.group({survey_start_date:[this.fromDate,o.k0.required],survey_end_date:[this.fromDate],assign_survey_to:[null,[o.k0.required]]})}formatDate(e){return`${e.year}-${e.month<10?"0"+e.month:e.month}-${e.day<10?"0"+e.day:e.day}`}formatAndPatchValues(){const e=this.formatDate(this.fromDate),n=this.toDate?this.formatDate(this.toDate):null;this.form.patchValue({survey_start_date:e,survey_end_date:n})}onSubmit(){this.formatAndPatchValues(),this.form.valid&&this.activeModal.close(this.form.value)}onSurveyorByChange(e){const n=this.form.get("assign_surveyor");n&&n.setValue(e.target.value)}toggleDatePicker(){this.showDatePicker=!this.showDatePicker}getFormattedDateRange(){if(this.fromDate){const e=`${this.fromDate.day}/${this.fromDate.month}/${this.fromDate.year}`;return this.toDate?`${e} - ${this.toDate.day}/${this.toDate.month}/${this.toDate.year}`:e}return""}onDateSelection(e){this.fromDate||this.toDate?this.fromDate&&!this.toDate&&e.after(this.fromDate)?this.toDate=e:(this.toDate=null,this.fromDate=e):this.fromDate=e}isHovered(e){return this.fromDate&&!this.toDate&&this.hoveredDate&&e.after(this.fromDate)&&e.before(this.hoveredDate)}isInside(e){return this.toDate&&e.after(this.fromDate)&&e.before(this.toDate)}isRange(e){return e.equals(this.fromDate)||this.toDate&&e.equals(this.toDate)||this.isInside(e)||this.isHovered(e)}static{this.\u0275fac=function(n){return new(n||i)(t.rXU(c.iF),t.rXU(S.D),t.rXU(c.Lw),t.rXU(h.V),t.rXU(o.ok))}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-modal-assign-surveyor"]],inputs:{action:"action",data:"data"},standalone:!0,features:[t.aNF],decls:34,vars:7,consts:[[1,"modal-header"],[1,"modal-title"],[1,"d-flex","align-items-center"],[1,"rounded-icon","d-inline-flex","align-items-center","justify-content-center","rounded-circle","w-25%","h-25%",2,"width","40px","height","40px","background-color","#eef0fd"],[2,"color","#3f4ec4",3,"ngClass"],[1,"ms-2","my-auto","fw-bolder"],["type","button","aria-label","Close",1,"btn-close",3,"click"],[1,"modal-body"],[3,"formGroup"],[1,"mb-3"],["for","tanggal",1,"form-label"],[1,"text-danger","ms-1"],[1,"input-group",3,"click"],["placeholder","dd/mm/yyyy","type","text",1,"form-control",3,"readonly","value"],[1,"input-group-text",2,"cursor","pointer"],[1,"bi","bi-calendar4"],["outsideDays","hidden",3,"minDate","displayMonths","dayTemplate","weekdays","ngClass","dateSelect",4,"ngIf"],["t",""],["for","surveyor",1,"form-label"],["id","surveyor","formControlName","assign_survey_to",1,"form-select",3,"change"],["selected","",3,"value",4,"ngFor","ngForOf"],[1,"d-flex","justify-content-end","mt-4"],["type","button",1,"btn","btn-primary","me-2",2,"background-color","#eef0fd","color","#586af5",3,"click"],["type","button",1,"btn","btn-primary",3,"disabled","click"],["outsideDays","hidden",3,"minDate","displayMonths","dayTemplate","weekdays","ngClass","dateSelect"],["dp",""],[1,"custom-day",3,"ngClass","mouseenter","mouseleave"],["selected","",3,"value"]],template:function(n,s){1&n&&(t.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),t.nrm(4,"i",4),t.k0s(),t.j41(5,"h5",5),t.EFF(6,"Tambah Surveyor"),t.k0s()()(),t.j41(7,"button",6),t.bIt("click",function(){return s.activeModal.dismiss("Cross click")}),t.k0s()(),t.j41(8,"div",7)(9,"form",8)(10,"div",9)(11,"label",10),t.EFF(12,"Tanggal"),t.j41(13,"span",11),t.EFF(14,"*"),t.k0s()(),t.j41(15,"div",12),t.bIt("click",function(){return s.toggleDatePicker()}),t.nrm(16,"input",13),t.j41(17,"span",14),t.nrm(18,"i",15),t.k0s()(),t.DNE(19,$,2,7,"ngb-datepicker",16),t.DNE(20,G,2,10,"ng-template",null,17,t.C5r),t.k0s(),t.j41(22,"div",9)(23,"label",18),t.EFF(24,"Survey"),t.j41(25,"span",11),t.EFF(26,"*"),t.k0s()(),t.j41(27,"select",19),t.bIt("change",function(d){return s.onSurveyorByChange(d)}),t.DNE(28,U,2,2,"option",20),t.k0s()()(),t.j41(29,"div",21)(30,"button",22),t.bIt("click",function(){return s.activeModal.close("Cancel")}),t.EFF(31," Batal "),t.k0s(),t.j41(32,"button",23),t.bIt("click",function(){return s.onSubmit()}),t.EFF(33," Simpan "),t.k0s()()()),2&n&&(t.R7$(4),t.Y8G("ngClass","create"===s.action?"bi bi-plus-circle":"bi bi-pencil-square"),t.R7$(5),t.Y8G("formGroup",s.form),t.R7$(7),t.Y8G("readonly",!0)("value",s.getFormattedDateRange()),t.R7$(3),t.Y8G("ngIf",s.showDatePicker),t.R7$(9),t.Y8G("ngForOf",s.dataSurveyor),t.R7$(4),t.Y8G("disabled",s.form.invalid))},dependencies:[p.MD,p.YU,p.Sq,p.bT,o.X1,o.qT,o.xH,o.y7,o.wz,o.BC,o.cb,o.j4,o.JD,c.yB,o.YN],styles:[".custom-day[_ngcontent-%COMP%]{text-align:center;padding:.185rem .25rem;display:inline-block;height:2rem;width:2rem}.custom-day.focused[_ngcontent-%COMP%]{background-color:#e6e6e6}.custom-day.range[_ngcontent-%COMP%], .custom-day[_ngcontent-%COMP%]:hover{background-color:#0275d8;color:#fff}.custom-day.faded[_ngcontent-%COMP%]{background-color:#d87f0280}"]})}}return i})();var y=l(1413),b=l(6977);let X=(()=>{class i{constructor(e,n,s){this.activeModal=e,this.formBuilder=n,this.helpers=s,this.message="",this.form={}}static{this.\u0275fac=function(n){return new(n||i)(t.rXU(c.Lw),t.rXU(o.ok),t.rXU(h.V))}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-alert"]],inputs:{message:"message"},standalone:!0,features:[t.aNF],decls:14,vars:0,consts:[[1,"modal-body","mx-auto"],[1,"icon-container","my-1","d-flex","justify-content-center"],[1,"bi","bi-exclamation-triangle","fs-3",2,"color","#ffab00"],[1,"text-center","px-5","my-3"],[1,"fw-bold","me-2"],[1,"d-flex","justify-content-center"],["type","button",1,"btn","btn-outline-primary","me-2",3,"click"]],template:function(n,s){1&n&&(t.j41(0,"div",0)(1,"div",1),t.nrm(2,"i",2),t.k0s(),t.j41(3,"div",3),t.EFF(4," Apakah anda yakin ingin melanjutkan ke bagian "),t.j41(5,"span",4),t.EFF(6,"Tindak Lanjuti"),t.k0s(),t.EFF(7,"? "),t.nrm(8,"br"),t.EFF(9," beberapa kondisi kerusakan jalan belum memiliki keterangan "),t.k0s(),t.j41(10,"div",5)(11,"button",6),t.bIt("click",function(){return s.activeModal.close(!1)}),t.EFF(12," Isi terlebih dulu "),t.k0s()()(),t.nrm(13,"p"))},dependencies:[p.MD,o.X1]})}}return i})();var f=l(1626),F=l(5471),v=l(8185),j=l(1991);let B=(()=>{class i extends j.G{constructor(e,n){super(e,n),this.http=e,this.helpers=n,this.endpoint="report-list/export"}static{this.\u0275fac=function(n){return new(n||i)(t.KVO(f.Qq),t.KVO(h.V))}}static{this.\u0275prov=t.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),L=(()=>{class i extends j.G{constructor(e,n){super(e,n),this.http=e,this.helpers=n,this.endpoint="rejected"}static{this.\u0275fac=function(n){return new(n||i)(t.KVO(f.Qq),t.KVO(h.V))}}static{this.\u0275prov=t.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var E=l(5211),x=l(2423);let M=(()=>{class i{constructor(e,n,s){this.activeModal=e,this.formBuilder=n,this.helpers=s,this.action="create",this.form={}}ngOnInit(){this.initForm()}initForm(){this.form=this.formBuilder.group({user_type:["Retak",[o.k0.required]],user_level:["Berat",[o.k0.required]]})}onSubmit(){this.form.valid&&this.activeModal.close(this.form.value)}onUserLevel(e){this.form.controls.user_level.patchValue(e.target.value)}onUserType(e){this.form.controls.user_type.patchValue(e.target.value)}static{this.\u0275fac=function(n){return new(n||i)(t.rXU(c.Lw),t.rXU(o.ok),t.rXU(h.V))}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-kerusakan"]],inputs:{action:"action",data:"data"},standalone:!0,features:[t.aNF],decls:39,vars:2,consts:[[1,"modal-body"],[1,"rounded-icon","d-inline-flex","align-items-center","justify-content-center","rounded-circle","w-25%","h-25%",2,"width","40px","height","40px","background-color","#eef0fd"],[1,"bi","bi-pencil-square",2,"color","#3f4ec4"],[3,"formGroup"],[1,"row","fw-medium","d-flex","align-items-center","mt-4"],[1,"col-md-4"],[1,"my-auto"],[1,"col-md-8"],["aria-label","Default select example",1,"form-select","fw-bolder",2,"background","#eef0fd","height","48px",3,"change"],[1,"bi","bi-chevron-down"],["value","Retak"],["value","Berlubang"],["value","Bergelombang"],["value","Terkelupas"],["value","PermukaanKasar"],["value","Berat"],["value","Sedang"],["value","Ringan"],[1,"d-flex","justify-content-end","mt-4"],["type","button",1,"btn","btn-outline-primary","me-2",3,"click"],["type","button",1,"btn","btn-primary",3,"disabled","click"]],template:function(n,s){1&n&&(t.j41(0,"div",0)(1,"div",1),t.nrm(2,"i",2),t.k0s(),t.j41(3,"form",3)(4,"div",4)(5,"div",5)(6,"p",6),t.EFF(7,"Jenis Kerusakan"),t.k0s()(),t.j41(8,"div",7)(9,"select",8),t.bIt("change",function(d){return s.onUserType(d)}),t.nrm(10,"i",9),t.j41(11,"option",10),t.EFF(12,"Retak"),t.k0s(),t.j41(13,"option",11),t.EFF(14,"Berlubang"),t.k0s(),t.j41(15,"option",12),t.EFF(16,"Bergelombang"),t.k0s(),t.j41(17,"option",13),t.EFF(18,"Terkelupas"),t.k0s(),t.j41(19,"option",14),t.EFF(20,"Permukaan Kasar"),t.k0s()()()(),t.j41(21,"div",4)(22,"div",5)(23,"p",6),t.EFF(24,"Tingkat Kerusakan"),t.k0s()(),t.j41(25,"div",7)(26,"select",8),t.bIt("change",function(d){return s.onUserLevel(d)}),t.nrm(27,"i",9),t.j41(28,"option",15),t.EFF(29,"Berat"),t.k0s(),t.j41(30,"option",16),t.EFF(31,"Sedang"),t.k0s(),t.j41(32,"option",17),t.EFF(33,"Ringan"),t.k0s()()()()(),t.j41(34,"div",18)(35,"button",19),t.bIt("click",function(){return s.activeModal.close(!1)}),t.EFF(36," Batal "),t.k0s(),t.j41(37,"button",20),t.bIt("click",function(){return s.onSubmit()}),t.EFF(38," Simpan "),t.k0s()()()),2&n&&(t.R7$(3),t.Y8G("formGroup",s.form),t.R7$(34),t.Y8G("disabled",s.form.invalid))},dependencies:[p.MD,c.zH,c._f,o.X1,o.qT,o.xH,o.y7,o.cb,o.j4]})}}return i})();var V=l(2257),_=l(7181),O=l(1985);let Y=(()=>{class i{constructor(e){this.http=e}static{this.\u0275fac=function(n){return new(n||i)(t.KVO(f.Qq))}}static{this.\u0275prov=t.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var P=l(1200);const A=["map"];function K(i,r){1&i&&(t.j41(0,"div",28)(1,"div",29)(2,"span",30),t.EFF(3,"Loading..."),t.k0s()(),t.j41(4,"div",31)(5,"h6",32),t.EFF(6," Proses validasi kerusakan... "),t.k0s(),t.j41(7,"p",33),t.EFF(8," Tunggu sebentar lagi, dalam proses validasi gambar kerusakan jalan. "),t.k0s()()())}function J(i,r){if(1&i&&(t.j41(0,"div",34)(1,"p",35),t.EFF(2," Jenis kerusakan dan tipe kerusakan berdasarkan gambar tersebut yang benar adalah : "),t.k0s(),t.j41(3,"div",36)(4,"span",21),t.EFF(5,"Jenis Kerusakan :\xa0"),t.k0s(),t.j41(6,"span",33),t.EFF(7),t.k0s()(),t.j41(8,"div",36)(9,"span",21),t.EFF(10,"Tingkat Kerusakan :\xa0"),t.k0s(),t.j41(11,"span",33),t.EFF(12),t.k0s()()()),2&i){const e=t.XpG(3);t.R7$(7),t.JRh(e.type_predict),t.R7$(5),t.JRh(e.level_predict)}}function H(i,r){if(1&i){const e=t.RV6();t.j41(0,"div",37)(1,"div",38),t.bIt("click",function(){t.eBV(e);const s=t.XpG(3);return t.Njj(s.changeDetailBasedOnRecommendation())}),t.EFF(2," Ganti Data Sekarang "),t.k0s(),t.j41(3,"div",39),t.bIt("click",function(){t.eBV(e);const s=t.XpG(3);return t.Njj(s.laterRecomend())}),t.EFF(4," Nanti "),t.k0s()()}}function Q(i,r){if(1&i){const e=t.RV6();t.j41(0,"div",18)(1,"div",19),t.nrm(2,"i",20),t.j41(3,"div",21),t.EFF(4,"Sistem Rekomendasi"),t.k0s()(),t.j41(5,"div",22)(6,"button",23),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.fetchImageAndDisplay())}),t.nrm(7,"i",24),t.EFF(8," Gunakan AI "),t.k0s(),t.DNE(9,K,9,0,"div",25),t.DNE(10,J,13,2,"div",26),t.k0s(),t.DNE(11,H,5,0,"div",27),t.k0s()}if(2&i){const e=t.XpG(2);t.R7$(6),t.Y8G("disabled",e.isLoading),t.R7$(3),t.Y8G("ngIf",e.isLoading),t.R7$(1),t.Y8G("ngIf",e.showRecommend),t.R7$(1),t.Y8G("ngIf",e.showRecommend)}}function q(i,r){if(1&i){const e=t.RV6();t.j41(0,"i",42),t.bIt("click",function(){t.eBV(e);const s=t.XpG(3);return t.Njj(s.onType(s.segmentData.id))}),t.k0s()}if(2&i){const e=t.XpG(3);t.Y8G("id","changeType"+e.index)}}function W(i,r){if(1&i&&(t.j41(0,"div",40),t.DNE(1,q,1,1,"i",41),t.k0s()),2&i){const e=t.XpG(2);t.R7$(1),t.Y8G("ngIf","PROG"===e.statusLaporan)}}function z(i,r){if(1&i&&(t.j41(0,"div"),t.nrm(1,"app-lightbox",43),t.k0s()),2&i){const e=r.$implicit;t.R7$(1),t.Y8G("data",e)}}function Z(i,r){if(1&i&&(t.j41(0,"div",6),t.DNE(1,Q,12,4,"div",7),t.j41(2,"div",8)(3,"div",9),t.EFF(4,"Jenis Kerusakan"),t.k0s(),t.j41(5,"div",10),t.EFF(6),t.k0s(),t.DNE(7,W,2,1,"div",11),t.k0s(),t.j41(8,"div",12)(9,"div",9),t.EFF(10,"Tingkat Kerusakan"),t.k0s(),t.j41(11,"div",13),t.EFF(12),t.k0s()(),t.j41(13,"div",12)(14,"div",9),t.EFF(15,"Nama"),t.k0s(),t.j41(16,"div",13),t.EFF(17),t.k0s()(),t.j41(18,"div",12)(19,"div",9),t.EFF(20," Latitude & Longitude "),t.k0s(),t.j41(21,"div",10)(22,"span"),t.EFF(23),t.k0s(),t.nrm(24,"br",14),t.j41(25,"span"),t.EFF(26),t.k0s()()(),t.j41(27,"div",12)(28,"div",9),t.EFF(29,"Panjang"),t.k0s(),t.j41(30,"div",13),t.EFF(31),t.nI1(32,"number"),t.k0s()(),t.j41(33,"div",12)(34,"div",9),t.EFF(35,"Foto"),t.k0s(),t.j41(36,"div",15),t.DNE(37,z,2,1,"div",16),t.k0s()(),t.j41(38,"div"),t.nrm(39,"app-map",17),t.k0s()()),2&i){const e=t.XpG();t.R7$(1),t.Y8G("ngIf",e.show&&"PROG"===e.statusLaporan),t.R7$(5),t.JRh(e.segmenType),t.R7$(1),t.Y8G("ngIf",e.isPNGL()),t.R7$(5),t.JRh(e.segmenLevel),t.R7$(5),t.JRh(null==e.segmentData||null==e.segmentData.segmen?null:e.segmentData.segmen.name),t.R7$(6),t.SpI(" [ ",e.coordinates[1]," ] , "),t.R7$(3),t.SpI(" [ ",e.coordinates[0]," ] "),t.R7$(5),t.SpI(" ",e.segmentData.segmen.length?t.i5U(32,13,e.segmentData.segmen.length,"1.2-2"):"-"," m "),t.R7$(6),t.Y8G("ngForOf",e.segmentData.photos),t.R7$(2),t.Y8G("allowDragging",!0)("showOption",!1)("showStatus",!1)("polylineData",e.segmentData)}}let R=(()=>{class i{constructor(e,n,s,a,d,u,m){this.loading=e,this.http=n,this.auth=s,this.machine=a,this.api=d,this.helpers=u,this.modal=m,this.show=!1,this.showRecommend=!1,this.isLoading=!1,this.coordinates=[],this.accordionData={},this.dataUpdateSubs$=new y.B,this.selectType="",this.selectLevel="",this.abs_pathUrl="",this.predict_road="",this.type_predict="",this.level_predict=""}laterRecomend(){this.show=!1}ngOnInit(){if(this.segmenType=this.segmentData.user_type,this.segmenLevel=this.segmentData.user_level,"-"===this.segmenType&&"-"===this.segmenLevel&&(this.show=!0),this.segmentData&&this.segmentData.photos){let n=this.segmentData.photos.map(s=>s.abs_path);this.abs_pathUrl=n[0]}const e=JSON.parse(this.segmentData.segmen.geojson);this.coordinates=e.coordinates}onType(e){const n=this.modal.open(M);n.componentInstance.data=e,n.result.then(s=>{s&&this.api.update(e,s).pipe((0,b.Q)(this.dataUpdateSubs$)).subscribe({next:()=>{this.helpers.toast("success","Data berhasil diubah"),this.api.getById(this.segmentData.id).pipe().subscribe({next:({data:a})=>{this.segmenLevel=a.user_level,this.segmenType=a.user_type}})},error:()=>{this.helpers.toast("error","Data gagal diubah")}})},s=>{})}fetchImageAndDisplay(){let e=this.abs_pathUrl;e=e.replace(/^https?:\/\/[^\/]+/,""),this.getBase64ImageFromURL(e).subscribe(n=>{const s=this.getMimeTypeFromUrl(e);this.base64Image=`data:${s};base64,${n}`;const a=this.base64ToFile(n,s,`image.${s.split("/")[1]}`);this.sendImageToEndpoint(a)},n=>{console.error("Error fetching image:",n)})}base64ToFile(e,n,s){const a=atob(e),d=new ArrayBuffer(a.length),u=new Uint8Array(d);for(let g=0;g<a.length;g++)u[g]=a.charCodeAt(g);const m=new Blob([d],{type:n});return new File([m],s,{type:n,lastModified:Date.now()})}getMimeTypeFromUrl(e){return"png"===e.split(".").pop()?.toLowerCase()?"image/png":"image/jpeg"}getBase64ImageFromURL(e){return new O.c(n=>{const s=new Image;s.crossOrigin="Anonymous",s.src=e,s.onload=()=>{const a=document.createElement("canvas");a.width=s.width,a.height=s.height;const d=a.getContext("2d");if(d){d.drawImage(s,0,0);const u=this.getMimeTypeFromUrl(e),m=a.toDataURL(u).replace(/^data:image\/(png|jpeg);base64,/,"");n.next(m),n.complete()}else n.error("Unable to get 2D context")},s.onerror=a=>n.error(a)})}onFileSelected(e){const n=e.target.files[0];n&&this.sendImageToEndpoint(n)}sendImageToEndpoint(e){this.isLoading=!0,this.showRecommend=!1;const s=new FormData;s.append("image",e),this.http.post("https://api-model.roadreport.id//predict-road",s).subscribe(a=>{this.predict_road=a.predicted_label;const d=this.predict_road.split(" ");2===d.length&&(this.type_predict=d[0],this.level_predict=d[1]),this.isLoading=!1,this.showRecommend=!0},a=>{})}changeDetailBasedOnRecommendation(){this.segmentData&&this.segmentData.photos&&this.segmentData.photos.map(n=>n.abs_path),this.api.update(this.segmentData.id,{user_type:this.type_predict,user_level:this.level_predict}).pipe((0,b.Q)(this.dataUpdateSubs$)).subscribe({next:()=>{this.api.getById(this.segmentData.id).pipe().subscribe({next:({data:e})=>{this.segmenLevel=e.user_level,this.segmenType=e.user_type}}),this.helpers.toast("success","Data berhasil diubah")},error:()=>{this.helpers.toast("error","Data gagal diubah")}})}onDetail(e){this.modal.open(_.$).componentInstance.data=e}isPNGL(){const e=this.auth.getLoggedUser();return!!e&&"SADM"===e.role.code}parsing(e){return JSON.parse(e).reverse().join(", ")}static{this.\u0275fac=function(n){return new(n||i)(t.rXU(x.U),t.rXU(f.Qq),t.rXU(F.u),t.rXU(Y),t.rXU(P.B),t.rXU(h.V),t.rXU(c.Bq))}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-segment"]],viewQuery:function(n,s){if(1&n&&t.GBs(A,5),2&n){let a;t.mGM(a=t.lsd())&&(s.Map=a.first)}},inputs:{segmentData:"segmentData",index:"index",statusLaporan:"statusLaporan"},standalone:!0,features:[t.aNF],decls:8,vars:3,consts:[["ngbAccordion","","id","changeType",1,"accordion","mb-3",3,"id"],["ngbAccordionItem","",1,"accordion-item","border-0",2,"background","#eef0fd",3,"collapsed"],["ngbAccordionHeader","",1,"accordion-header"],["ngbAccordionButton","",1,"accordion-button","fw-bolder",2,"background","#eef0fd"],["ngbAccordionCollapse","",1,"accordion-collapse","collapse","show"],["ngbAccordionBody","",1,"accordion-body"],[1,"data-pelapor"],["class","content bg-light px-4 py-3",4,"ngIf"],[1,"row","py-3","fw-medium","d-md-flex"],[1,"col-md-3","text-body-tertiary"],[1,"col-md-8"],["class","col-md-1",4,"ngIf"],[1,"row","py-3","fw-medium"],[1,"col-md-6"],[1,"d-lg-none","d-md-none","d-sm-none"],[1,"col-md-6","d-flex","gap-2"],[4,"ngFor","ngForOf"],[3,"allowDragging","showOption","showStatus","polylineData"],[1,"content","bg-light","px-4","py-3"],[1,"d-flex",2,"align-items","center"],[1,"bi","bi-gear","me-2"],[2,"color","#1b1d21"],[1,"ms-0","ms-lg-4","ms-md-4","mt-2"],[1,"btn","btn-outline-primary","my-2",3,"disabled","click"],[1,"bi","bi-lightbulb"],["class","my-3 d-lg-flex d-md-flex align-items-center",4,"ngIf"],["class","recomend",4,"ngIf"],["class","d-block d-lg-flex d-md-flex d-sm-flex ms-0 ms-lg-4 ms-md-4 my-3",4,"ngIf"],[1,"my-3","d-lg-flex","d-md-flex","align-items-center"],["role","status",1,"spinner-border","text-primary","me-3","py-auto"],[1,"visually-hidden"],[1,"loading-information"],[1,"font-weight-bold"],[1,"text-body-tertiary"],[1,"recomend"],[1,"text-body-tertiary","text-justify",2,"text-align","justify"],[1,"d-block","d-lg-flex","d-md-flex","d-sm-flex","mb-2","mb-lg-0","mb-md-0","mb-sm-0"],[1,"d-block","d-lg-flex","d-md-flex","d-sm-flex","ms-0","ms-lg-4","ms-md-4","my-3"],[1,"me-3","text-primary","fw-bolder","text-left",2,"cursor","pointer",3,"click"],[1,"secondary-text","fw-bolder","text-left",2,"cursor","pointer",3,"click"],[1,"col-md-1"],["id","changeType","class","bi bi-pencil-square","style","\n width: 24px;\n height: 24px;\n color: black;\n cursor: pointer;\n ",3,"id","click",4,"ngIf"],["id","changeType",1,"bi","bi-pencil-square",2,"width","24px","height","24px","color","black","cursor","pointer",3,"id","click"],[1,"d-flex","rounded-2","me-2",2,"cursor","pointer",3,"data"]],template:function(n,s){1&n&&(t.j41(0,"div",0)(1,"div",1)(2,"h2",2)(3,"button",3),t.EFF(4),t.k0s()(),t.j41(5,"div",4)(6,"div",5),t.DNE(7,Z,40,16,"ng-template"),t.k0s()()()()),2&n&&(t.Y8G("id","changeType"+s.index),t.R7$(1),t.Y8G("collapsed",!0),t.R7$(3),t.SpI(" Segmen Jalan ",s.index+1," "))},dependencies:[c._f,c.WP,c.r6,c.tW,c.x7,c.UA,c.$R,p.MD,p.Sq,p.bT,p.QX,V.i,_.$,o.YN,c.VR]})}}return i})();function tt(i,r){if(1&i){const e=t.RV6();t.j41(0,"button",22),t.bIt("click",function(){t.eBV(e);const s=t.XpG();return t.Njj(s.reportReject())}),t.EFF(1," Tolak Laporan "),t.k0s()}if(2&i){const e=t.XpG();t.Y8G("disabled","RJT"===(null==e.reportDetails||null==e.reportDetails.status_report?null:e.reportDetails.status_report.id)||"FOLUP"===(null==e.reportDetails||null==e.reportDetails.status_report?null:e.reportDetails.status_report.id)||"DONE"===(null==e.reportDetails||null==e.reportDetails.status_report?null:e.reportDetails.status_report.id)||"RPR"===(null==e.reportDetails||null==e.reportDetails.status_report?null:e.reportDetails.status_report.id)||"FIXED"===(null==e.reportDetails||null==e.reportDetails.status_report?null:e.reportDetails.status_report.id))}}function et(i,r){if(1&i){const e=t.RV6();t.j41(0,"button",24),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.goToFollowUp())}),t.EFF(1," Tindak Lanjuti "),t.k0s()}}function nt(i,r){if(1&i&&(t.j41(0,"div"),t.DNE(1,et,2,0,"button",23),t.k0s()),2&i){const e=t.XpG();t.R7$(1),t.Y8G("ngIf",e.isPNGL()&&e.showButtonCompleted)}}function st(i,r){if(1&i){const e=t.RV6();t.j41(0,"div",25)(1,"div",26),t.nrm(2,"i",27),t.j41(3,"div",28),t.EFF(4,"Survei"),t.k0s()(),t.j41(5,"div",29)(6,"div",30)(7,"p",31),t.EFF(8," Kondisi jalan membutuhkan survey untuk menindak lanjuti laporan, silahkan klik tombol survey untuk memberikan tugas kepada surveyor. "),t.k0s()()(),t.j41(9,"div",32)(10,"button",33),t.bIt("click",function(){t.eBV(e);const s=t.XpG();return t.Njj(s.onCreateSurveyor())}),t.EFF(11," Survei Sekarang "),t.k0s()()()}}function it(i,r){1&i&&(t.j41(0,"div",34)(1,"div",35),t.nrm(2,"i",27),t.j41(3,"div",36),t.EFF(4," Laporan "),t.j41(5,"span",28),t.EFF(6," sedang"),t.k0s(),t.EFF(7," disurvei "),t.k0s()()())}function at(i,r){if(1&i&&(t.j41(0,"div")(1,"div",46),t.nrm(2,"app-lightbox",47),t.k0s()()),2&i){const e=r.$implicit;t.R7$(2),t.Y8G("data",e)}}function rt(i,r){if(1&i&&(t.j41(0,"div"),t.DNE(1,at,3,1,"div",45),t.k0s()),2&i){const e=t.XpG(2);t.R7$(1),t.Y8G("ngForOf",null==e.reportDetails||null==e.reportDetails.survey?null:e.reportDetails.survey.photos)}}function ot(i,r){if(1&i){const e=t.RV6();t.j41(0,"div",37)(1,"div",35),t.nrm(2,"i",38),t.j41(3,"div",36),t.EFF(4," Laporan "),t.j41(5,"span",28),t.EFF(6," sudah"),t.k0s(),t.EFF(7," disurvei "),t.k0s()(),t.j41(8,"button",39),t.bIt("click",function(){t.eBV(e);const s=t.sdS(11);return t.Njj(s.toggle())}),t.EFF(9," Lihat hasil "),t.k0s(),t.j41(10,"div",40,41),t.bIt("ngbCollapseChange",function(s){t.eBV(e);const a=t.XpG();return t.Njj(a.isCollapsed=s)}),t.DNE(12,rt,2,1,"div",14),t.j41(13,"div",42)(14,"div",43),t.EFF(15,"Tingkat Kerusakan"),t.k0s(),t.j41(16,"div",44),t.EFF(17),t.k0s()(),t.j41(18,"div",42)(19,"div",43),t.EFF(20,"Tipe Kerusakan"),t.k0s(),t.j41(21,"div",44),t.EFF(22),t.k0s()(),t.j41(23,"div",42)(24,"div",43),t.EFF(25,"Kedalaman Lubang"),t.k0s(),t.j41(26,"div",44),t.EFF(27),t.k0s()(),t.j41(28,"div",42)(29,"div",43),t.EFF(30,"Panjang Kerusakan"),t.k0s(),t.j41(31,"div",44),t.EFF(32),t.j41(33,"span"),t.EFF(34,"m"),t.k0s()()(),t.j41(35,"div",42)(36,"div",43),t.EFF(37,"Lebar Kerusakan"),t.k0s(),t.j41(38,"div",44),t.EFF(39),t.j41(40,"span"),t.EFF(41,"m"),t.k0s()()(),t.j41(42,"div",42)(43,"div",43),t.EFF(44,"Estimasi Kebutuhan Material"),t.k0s(),t.j41(45,"div",44),t.EFF(46),t.k0s()(),t.j41(47,"div",42)(48,"div",43),t.EFF(49,"Keterangan Material"),t.k0s(),t.j41(50,"div",44),t.EFF(51),t.k0s()(),t.j41(52,"div",42)(53,"div",43),t.EFF(54,"Catatan"),t.k0s(),t.j41(55,"div",44),t.EFF(56),t.k0s()()()()}if(2&i){const e=t.XpG();t.R7$(8),t.BMQ("aria-expanded",!e.isCollapsed),t.R7$(2),t.Y8G("ngbCollapse",e.isCollapsed),t.R7$(2),t.Y8G("ngIf",null==e.reportDetails||null==e.reportDetails.survey?null:e.reportDetails.survey.photos),t.R7$(5),t.SpI(" ",null==e.reportDetails||null==e.reportDetails.survey?null:e.reportDetails.survey.tingkat_kerusakan," "),t.R7$(5),t.JRh(null==e.reportDetails||null==e.reportDetails.survey?null:e.reportDetails.survey.tipe_kerusakan),t.R7$(5),t.SpI(" ",null==e.reportDetails||null==e.reportDetails.survey?null:e.reportDetails.survey.kedalaman_lubang," "),t.R7$(5),t.SpI(" ",null==e.reportDetails||null==e.reportDetails.survey?null:e.reportDetails.survey.length," "),t.R7$(7),t.SpI(" ",null==e.reportDetails||null==e.reportDetails.survey?null:e.reportDetails.survey.width," "),t.R7$(7),t.JRh(null==e.reportDetails||null==e.reportDetails.survey?null:e.reportDetails.survey.jenis_material),t.R7$(5),t.SpI(" ",null!=e.reportDetails&&null!=e.reportDetails.survey&&e.reportDetails.survey.masukan_material?null==e.reportDetails||null==e.reportDetails.survey?null:e.reportDetails.survey.masukan_material:"-"," "),t.R7$(5),t.SpI(" ",null!=e.reportDetails&&null!=e.reportDetails.survey&&e.reportDetails.survey.note?null==e.reportDetails||null==e.reportDetails.survey?null:e.reportDetails.survey.note:"-"," ")}}const lt=function(i,r){return{"text-dark":i,"text-warning":r}};function dt(i,r){if(1&i&&(t.j41(0,"div"),t.nrm(1,"i",54),t.k0s()),2&i){const e=r.index,n=t.XpG(4);t.R7$(1),t.Y8G("ngClass",t.l_i(1,lt,e>=n.reportDetails.rating.rate,e<n.reportDetails.rating.rate))}}const ct=function(){return[1,2,3,4,5]};function pt(i,r){1&i&&(t.j41(0,"div",35),t.DNE(1,dt,2,4,"div",45),t.k0s()),2&i&&(t.R7$(1),t.Y8G("ngForOf",t.lJ4(1,ct)))}function ut(i,r){if(1&i&&(t.j41(0,"div",48)(1,"div",43),t.EFF(2,"Review"),t.k0s(),t.j41(3,"div",44),t.EFF(4),t.DNE(5,pt,2,2,"div",53),t.k0s()()),2&i){const e=t.XpG(2);t.R7$(4),t.SpI(" ",null!==e.reportDetails.rating&&""!==(null==e.reportDetails.rating?null:e.reportDetails.rating.comment)?null==e.reportDetails.rating?null:e.reportDetails.rating.comment:"-"," "),t.R7$(1),t.Y8G("ngIf",null!==e.reportDetails.rating)}}const mt=function(i,r,e,n,s,a){return{"bg-primary":i,"bg-warning":r,"bg-info":e,"bg-success":n,"bg-secondary":s,"bg-danger":a,"text-nowrap text-white rounded-2 px-2 py-1":!0}};function ht(i,r){if(1&i&&(t.j41(0,"div")(1,"h5",20),t.EFF(2,"Data Pelapor"),t.k0s(),t.j41(3,"div",48)(4,"div",43),t.EFF(5,"No. Tiket"),t.k0s(),t.j41(6,"div",44),t.EFF(7),t.k0s()(),t.j41(8,"div",48)(9,"div",43),t.EFF(10,"Nama"),t.k0s(),t.j41(11,"div",44),t.EFF(12),t.k0s()(),t.j41(13,"div",48)(14,"div",43),t.EFF(15,"Email"),t.k0s(),t.j41(16,"div",44),t.EFF(17),t.k0s()(),t.j41(18,"div",48)(19,"div",43),t.EFF(20,"No. HP"),t.k0s(),t.j41(21,"div",44),t.EFF(22),t.k0s()(),t.j41(23,"div",48)(24,"div",43),t.EFF(25,"Lokasi"),t.k0s(),t.j41(26,"div",44),t.EFF(27),t.k0s()(),t.j41(28,"div",48)(29,"div",43),t.EFF(30,"Keterangan"),t.k0s(),t.j41(31,"div",49),t.EFF(32),t.k0s()(),t.j41(33,"div",48)(34,"div",43),t.EFF(35,"Status Laporan"),t.k0s(),t.j41(36,"div",50)(37,"small",51),t.EFF(38),t.k0s()()(),t.j41(39,"div",48)(40,"div",43),t.EFF(41,"Tanggal Dilaporkan"),t.k0s(),t.j41(42,"div",44),t.EFF(43),t.nI1(44,"date"),t.k0s()(),t.DNE(45,ut,6,2,"div",52),t.k0s()),2&i){const e=t.XpG();t.R7$(7),t.JRh(e.reportDetails.no_ticket),t.R7$(5),t.JRh(e.reportDetails.user.fullname),t.R7$(5),t.JRh(e.reportDetails.user.email),t.R7$(5),t.JRh(e.reportDetails.user.phone),t.R7$(5),t.SpI(" ",e.reportDetails.segmens.length>0?e.reportDetails.segmens[e.reportDetails.segmens.length-1].segmen.name:"-"," "),t.R7$(5),t.SpI(" ",e.reportDetails.note," "),t.R7$(5),t.Y8G("ngClass",t.l4e(13,mt,"PROG"===e.reportDetails.status_report.id,"FOLUP"===e.reportDetails.status_report.id,"RPR"===e.reportDetails.status_report.id,"DONE"===e.reportDetails.status_report.id,"FIXED"===e.reportDetails.status_report.id,"RJT"===e.reportDetails.status_report.id)),t.R7$(1),t.SpI(" ","DONE"===e.reportDetails.status_report.id?"Selesai":e.reportDetails.status_report.name," "),t.R7$(5),t.SpI(" ",t.i5U(44,10,e.reportDetails.created_at,"dd/MM/yyyy")," "),t.R7$(2),t.Y8G("ngIf","DONE"===e.reportDetails.status_report.id)}}function gt(i,r){if(1&i&&(t.j41(0,"div",10),t.nrm(1,"app-segment",55),t.k0s()),2&i){const e=r.$implicit,n=r.index,s=t.XpG();t.R7$(1),t.Y8G("segmentData",e)("index",n)("statusLaporan",null==s.reportDetails||null==s.reportDetails.status_report?null:s.reportDetails.status_report.id)}}let ft=(()=>{class i extends T.v{constructor(e,n,s,a,d,u,m,g,C,I){super(C,I,m,g),this.http=e,this.auth=n,this.activatedRoute=s,this.router=a,this.download=d,this.rejected=u,this.api=m,this.modal=g,this.helpers=C,this.loading=I,this.dataInsertSubs$=new y.B,this.id="",this.showButtonCompleted=!0,this.isCollapsed=!0,this.queries={sort:"-updated_at",page:1,limit:10,embed:"status_report,user,segmens,segmens.segmen,segmens.photos,schedule,survey,survey.photos,rating"},this.api.endpoint="report-list"}ngOnInit(){this.id=this.activatedRoute.snapshot.params.id,this.loading.isLoading(),this.api.getById(this.id,this.queries).pipe().subscribe({next:({data:e})=>{this.reportDetails=e,this.segmens=e.segmens},error:()=>{this.helpers.toast("error","Data tidak ditemukan")}})}reportCompleted(){this.api.update(this.id,{status_id:"DONE"}).subscribe({next:()=>{this.helpers.toast("success","Data berhasil Diperbarui")},error:()=>{this.helpers.toast("error","Data gagal ditambahkan")}})}getData(){this.api.getById(this.id,this.queries).pipe().subscribe({next:({data:e})=>{this.reportDetails=e},error:()=>{this.helpers.toast("error","Data Gagal Diperbarui")}})}reportReject(){const e=this.modal.open(w.a);e.componentInstance.modalType=1,e.componentInstance.message="Ditolak",e.result.then(n=>{n&&(this.api.update(this.id,{status_id:"RJT"}).subscribe({next:()=>{this.getData(),this.helpers.toast("danger","Data berhasil Ditolak")},error:()=>{this.helpers.toast("error","Data gagal ditambahkan")}}),this.rejected.insert({report_id:this.id,note:n.note}).subscribe({}),this.showButtonCompleted=!1)},()=>{})}onCreateSurveyor(){const e=this.modal.open(N);e.componentInstance.action="update",e.result.then(n=>{n&&this.api.update(this.id,n).pipe((0,b.Q)(this.dataInsertSubs$)).subscribe({next:()=>{this.getData(),this.helpers.toast("success","Surveyor berhasil ditambahkan")},error:s=>{this.helpers.toast("error",`Surveyor gagal ditambahkan ${s.error.message}`)}})})}downloadFile(e){const n=new Blob([e],{type:"application/pdf"}),s=window.URL.createObjectURL(n),a=document.createElement("a");a.href=s,a.download=`laporan${this.id}.pdf`,document.body.appendChild(a),a.click(),document.body.removeChild(a)}onDownload(){this.loading.show(),this.download.getById(this.id).pipe().subscribe({next:({data:e})=>{this.loading.hide(),window.open(e.rel_path,"_blank")},error:e=>{}})}onBack(){this.router.navigate(["../"],{relativeTo:this.activatedRoute})}goToFollowUp(){this.api.getData(this.id,this.queries).subscribe({next:({data:e})=>{let n=!1;e.segmens.forEach(s=>{("-"===s.user_level.trim()||"-"===s.user_type.trim())&&(n=!0)}),n?this.modal.open(X):this.router.navigate(["tindak-lanjut"],{relativeTo:this.activatedRoute})}})}isPNGL(){const e=this.auth.getLoggedUser();return!!e&&"SADM"===e.role.code}static{this.\u0275fac=function(n){return new(n||i)(t.rXU(f.Qq),t.rXU(F.u),t.rXU(v.nX),t.rXU(v.Ix),t.rXU(B),t.rXU(L),t.rXU(E.Z),t.rXU(c.Bq),t.rXU(h.V),t.rXU(x.U))}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-detail"]],features:[t.Vt3],decls:30,vars:7,consts:[[1,"d-lg-flex","d-md-flex","d-sm-flex","align-items-start","justify-content-between","gap-3","mb-3"],[1,"d-flex","align-items-center","gap-2","mb-2"],["type","button",1,"btn","btn-sm","bg-transparent",3,"click"],[1,"bi","bi-arrow-left"],[1,"mb-0","fw-bold"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item","small"],["routerLink","../",1,"text-decoration-none"],["aria-current","page",1,"breadcrumb-item","active","small"],[1,""],[1,"text-right","d-flex","justify-content-end"],[1,"btn","btn-outline-primary","me-2","xs:text-wrap",3,"click"],["class","btn btn-danger me-2 xs:text-wrap","type","button",3,"disabled","click",4,"ngIf"],[4,"ngIf"],["class","px-4 py-3 rounded-3 mb-3","style","background-color: #dee1fd",4,"ngIf"],["class","alert alert-warning",4,"ngIf"],["class","alert alert-success",4,"ngIf"],[1,"p-4","rounded-3","bg-white"],[1,"mb-4","border-dark-subtle"],[1,"fw-semibold","mb-2"],["class","",4,"ngFor","ngForOf"],["type","button",1,"btn","btn-danger","me-2","xs:text-wrap",3,"disabled","click"],["style","max-width: fit-content","class","btn btn-primary text-right xs:text-wrap","type","button",3,"click",4,"ngIf"],["type","button",1,"btn","btn-primary","text-right","xs:text-wrap",2,"max-width","fit-content",3,"click"],[1,"px-4","py-3","rounded-3","mb-3",2,"background-color","#dee1fd"],[1,"d-flex",2,"align-items","center"],[1,"bi","bi-info-circle","me-2"],[1,"fw-bold"],[1,"ms-0","ms-lg-4","ms-md-4","mt-2"],[1,"recomend"],[1,"text-body-tertiary","text-justify",2,"text-align","justify"],[1,"d-block","d-lg-flex","d-md-flex","d-sm-flex","ms-0","ms-lg-4","ms-md-4"],[1,"btn","text-primary",2,"background-color","#eef0fd",3,"click"],[1,"alert","alert-warning"],[1,"d-flex"],[1,"alert-text"],[1,"alert","alert-success"],[1,"bi","bi-check2-all","me-2"],["type","button","aria-controls","collapseExample",1,"btn","btn-sm","btn-outline-info","mt-2",3,"click"],[3,"ngbCollapse","ngbCollapseChange"],["collapse","ngbCollapse"],[1,"row","py-1","fw-medium"],[1,"col-md-2","text-body-tertiary"],[1,"col-md-6"],[4,"ngFor","ngForOf"],[1,"my-2"],[2,"cursor","pointer","width","90px !important","height","90px !important",3,"data"],[1,"row","py-3","fw-medium"],[1,"col-md-10"],[1,"col-md-6","d-flex","align-items-center"],[2,"max-width","fit-content",3,"ngClass"],["class","row py-3 fw-medium",4,"ngIf"],["class","d-flex",4,"ngIf"],[1,"bi","bi-star-fill","mx-1",3,"ngClass"],[3,"segmentData","index","statusLaporan"]],template:function(n,s){1&n&&(t.j41(0,"div",0)(1,"div")(2,"div",1)(3,"button",2),t.bIt("click",function(){return s.onBack()}),t.nrm(4,"i",3),t.k0s(),t.j41(5,"h5",4),t.EFF(6,"Detail Laporan"),t.k0s()(),t.j41(7,"nav",5)(8,"ol",6)(9,"li",7)(10,"a",8),t.EFF(11,"Data Laporan"),t.k0s()(),t.j41(12,"li",9),t.EFF(13,"Detail"),t.k0s()()()(),t.j41(14,"div",10)(15,"div",11)(16,"button",12),t.bIt("click",function(){return s.onDownload()}),t.EFF(17," Export PDF "),t.k0s(),t.DNE(18,tt,2,1,"button",13),t.DNE(19,nt,2,1,"div",14),t.k0s()()(),t.DNE(20,st,12,0,"div",15),t.DNE(21,it,8,0,"div",16),t.DNE(22,ot,57,11,"div",17),t.j41(23,"div",18),t.DNE(24,ht,46,20,"div",14),t.nrm(25,"hr",19),t.j41(26,"h5",20),t.EFF(27,"Data Laporan"),t.k0s(),t.nrm(28,"hr",19),t.DNE(29,gt,2,3,"div",21),t.k0s()),2&n&&(t.R7$(18),t.Y8G("ngIf",s.isPNGL()),t.R7$(1),t.Y8G("ngIf","PROG"===(null==s.reportDetails||null==s.reportDetails.status_report?null:s.reportDetails.status_report.id)),t.R7$(1),t.Y8G("ngIf","PROG"===(null==s.reportDetails||null==s.reportDetails.status_report?null:s.reportDetails.status_report.id)&&!1===(null==s.reportDetails?null:s.reportDetails.survey_status)&&null===(null==s.reportDetails?null:s.reportDetails.assign_survey_to)),t.R7$(1),t.Y8G("ngIf",null===(null==s.reportDetails?null:s.reportDetails.survey)&&null!==(null==s.reportDetails?null:s.reportDetails.assign_survey_to)),t.R7$(1),t.Y8G("ngIf",!0===(null==s.reportDetails?null:s.reportDetails.survey_status)&&"PROG"===(null==s.reportDetails||null==s.reportDetails.status_report?null:s.reportDetails.status_report.id)),t.R7$(2),t.Y8G("ngIf",s.reportDetails),t.R7$(5),t.Y8G("ngForOf",null==s.reportDetails?null:s.reportDetails.segmens))},dependencies:[p.YU,p.Sq,p.bT,v.Wk,R,c.$G,_.$,p.vh],styles:[".tes[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:#fff}"]})}}return i})();var vt=l(5946);let _t=(()=>{class i{constructor(e,n){this.api=e,this.activatedRoute=n}resolve(e,n){throw new Error("Method not implemented.")}static{this.\u0275fac=function(n){return new(n||i)(t.KVO(E.Z),t.KVO(v.nX))}}static{this.\u0275prov=t.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();const bt=[{path:"",component:ft}];let Dt=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=t.$C({type:i})}static{this.\u0275inj=t.G2t({providers:[_t],imports:[p.MD,v.iI.forChild(bt),vt.gI,R,o.YN,c.oi,c.HC,_.$]})}}return i})()}}]);