1import{a as Me,b as $t}from"./chunk-S35EVFJC.js";import{a as di}from"./chunk-DMSEVBHH.js";import{a as be}from"./chunk-QPPQJTBR.js";import{c as zt,d as jt}from"./chunk-V2RSMJSZ.js";import"./chunk-ZWOVA626.js";import{e as ui}from"./chunk-E42DAPVO.js";import{b as ci,c as mi,d as pi}from"./chunk-7K673RFE.js";import{a as Wt,b as Jt,c as ei,d as ti,e as ii,f as ni,g as oi,h as ai,i as li,j as ri,k as si}from"./chunk-QBJLCSQQ.js";import{b as Qt}from"./chunk-BAKXQT2K.js";import{b as U,c as Ot}from"./chunk-VEANMLQD.js";import{d as bt}from"./chunk-FECLWSX6.js";import{a as Yt,b as Zt,e as Xt,f as Kt}from"./chunk-R73VFEQV.js";import{a as Ie}from"./chunk-VZDVPWAR.js";import{a as Rt,b as At,c as kt}from"./chunk-7OHGX4YT.js";import{a as Bt,b as Lt}from"./chunk-V2VKNE47.js";import{d as Mt,f as Vt,g as Nt}from"./chunk-XQAQI4GV.js";import{b as Gt,d as Ut}from"./chunk-YAWL3YU4.js";import"./chunk-APD5DRQJ.js";import{c as Dt}from"./chunk-LI6DVMVJ.js";import{d as Q,f as rt,j as st,k as dt,l as ct,m as mt,n as pt,o as ut}from"./chunk-OZFNTYXG.js";import{$ as Ht,A as nt,M as ve,P as he,T as ge,U as xt,V as yt,W as Pt,X as St,Y as Et,Z as Ft,_ as Tt,b as ae,d as D,g as le,h as re,k as se,n as de,p as ce,q as me,t as pe,y as ue,z as it}from"./chunk-X7RKKGX5.js";import{$b as h,Bb as F,Cb as T,Cc as Qe,Cd as et,Ce as gt,Cf as qt,Db as H,De as Ct,E as Be,Ee as ft,F as $,H as E,Hb as ie,Hd as tt,Ib as Ue,Ic as Ye,Jb as ne,Je as He,Ka as r,Kc as oe,L as K,Lb as a,Mb as m,Mc as Ze,Nb as Ee,Ne as Ce,Oa as M,Ob as $e,Pd as ot,Pe as fe,Qd as at,Ra as L,Rd as R,Sa as ee,Sd as Fe,Va as Ne,Wa as P,Ya as ze,Z as W,a as k,b as Z,bf as wt,cb as je,da as Le,db as p,dc as x,ea as J,eb as u,fa as Pe,fb as Se,fc as y,gb as te,ha as B,hb as V,hf as xe,ib as N,j as q,jb as _,jc as G,k as X,ka as C,kb as i,ke as Te,la as f,lb as n,lf as we,mb as b,mf as It,nf as ye,oa as Ve,q as S,qb as z,rb as j,sb as Ge,tb as O,td as Xe,ud as Ke,vb as g,ve as _e,wd as We,we as lt,xb as c,xd as Je,xe as _t,ye as vt,ze as ht}from"./chunk-OAWJG2VB.js";function Hi(t){return t==="nela"?1:t==="cadastro"?2:null}function _i(t){switch(t){case"nela":return"Nela";case"cadastro":return"Cadastro";case"bloqueado":return"Bloqueio/Desbloqueio Operacional";case"isentado":return"Isentados";default:return""}}function vi(t){return t==="nela"||t==="cadastro"}function hi(t,s){let e=t!=null&&t!=="",o=typeof s=="string"?s.trim():"";return e&&o?`${t} - ${o}`:e?`${t}`:"-"}function gi(t){return{listType:Hi(t?.searchMode),startDate:t?.startDate,endDate:t?.endDate}}function Ci(t){return{bloqueado:t?.searchMode==="bloqueado",isentado:t?.searchMode==="isentado"}}function fi(t){let s=t?.searchMode;return!!((s==="nela"||s==="cadastro"||s==="bloqueado"||s==="isentado")&&t?.startDate&&t?.endDate)}function Y(t){if(t==null||t==="")return null;if(t instanceof Date)return Number.isNaN(t.getTime())?null:t;if(typeof t.toDate=="function"){let e=t.toDate();return e instanceof Date&&!Number.isNaN(e.getTime())?e:null}let s=new Date(t);return Number.isNaN(s.getTime())?null:s}function qe(t,s){let e=Y(t),o=Y(s);if(!e||!o)return!1;let l=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),d=Date.UTC(o.getFullYear(),o.getMonth(),o.getDate());return l>=d}function xi(t){return typeof t=="string"&&t.trim()?t:"-"}function yi(t){switch(t){case"DESBLOQUEADO":return"green";case"BLOQUEADO":return"red";case"CANCELADO":return"orange";default:return""}}function Ii(t,s){}var Mi="_mat-bottom-sheet-enter",bi="_mat-bottom-sheet-exit",qi=(()=>{class t extends _t{_breakpointSubscription;_animationsDisabled=Fe();_animationState="void";_animationStateChanged=new ze;_destroyed;constructor(){super();let e=B(at);this._breakpointSubscription=e.observe([R.Medium,R.Large,R.XLarge]).subscribe(()=>{let o=this._elementRef.nativeElement.classList;o.toggle("mat-bottom-sheet-container-medium",e.isMatched(R.Medium)),o.toggle("mat-bottom-sheet-container-large",e.isMatched(R.Large)),o.toggle("mat-bottom-sheet-container-xlarge",e.isMatched(R.XLarge))})}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._animationsDisabled&&this._simulateAnimation(Mi))}exit(){this._destroyed||(this._elementRef.nativeElement.setAttribute("mat-exit",""),this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._animationsDisabled&&this._simulateAnimation(bi))}ngOnDestroy(){super.ngOnDestroy(),this._breakpointSubscription.unsubscribe(),this._destroyed=!0}_simulateAnimation(e){this._ngZone.run(()=>{this._handleAnimationEvent(!0,e),setTimeout(()=>this._handleAnimationEvent(!1,e))})}_trapFocus(){super._trapFocus({preventScroll:!0})}_handleAnimationEvent(e,o){let l=o===Mi;(l||o===bi)&&this._animationStateChanged.emit({toState:l?"visible":"hidden",phase:e?"start":"done"})}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=L({type:t,selectors:[["mat-bottom-sheet-container"]],hostAttrs:["tabindex","-1",1,"mat-bottom-sheet-container"],hostVars:9,hostBindings:function(o,l){o&1&&g("animationstart",function(v){return l._handleAnimationEvent(!0,v.animationName)})("animationend",function(v){return l._handleAnimationEvent(!1,v.animationName)})("animationcancel",function(v){return l._handleAnimationEvent(!1,v.animationName)}),o&2&&(je("role",l._config.role)("aria-modal",l._config.ariaModal)("aria-label",l._config.ariaLabel),ne("mat-bottom-sheet-container-animations-enabled",!l._animationsDisabled)("mat-bottom-sheet-container-enter",l._animationState==="visible")("mat-bottom-sheet-container-exit",l._animationState==="hidden"))},features:[Ne],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(o,l){o&1&&P(0,Ii,0,0,"ng-template",0)},dependencies:[Xe],styles:[`@keyframes _mat-bottom-sheet-enter{from{transform:translateY(100%)}to{transform:none}}@keyframes _mat-bottom-sheet-exit{from{transform:none}to{transform:translateY(100%)}}.mat-bottom-sheet-container{box-shadow:0px 8px 10px -5px rgba(0, 0, 0, 0.2), 0px 16px 24px 2px rgba(0, 0, 0, 0.14), 0px 6px 30px 5px rgba(0, 0, 0, 0.12);padding:8px 16px;min-width:100vw;box-sizing:border-box;display:block;outline:0;max-height:80vh;overflow:auto;position:relative;background:var(--mat-bottom-sheet-container-background-color, var(--mat-sys-surface-container-low));color:var(--mat-bottom-sheet-container-text-color, var(--mat-sys-on-surface));font-family:var(--mat-bottom-sheet-container-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-bottom-sheet-container-text-size, var(--mat-sys-body-large-size));line-height:var(--mat-bottom-sheet-container-text-line-height, var(--mat-sys-body-large-line-height));font-weight:var(--mat-bottom-sheet-container-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-bottom-sheet-container-text-tracking, var(--mat-sys-body-large-tracking))}@media(forced-colors: active){.mat-bottom-sheet-container{outline:1px solid}}.mat-bottom-sheet-container-animations-enabled{transform:translateY(100%)}.mat-bottom-sheet-container-animations-enabled.mat-bottom-sheet-container-enter{animation:_mat-bottom-sheet-enter 195ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-bottom-sheet-container-animations-enabled.mat-bottom-sheet-container-exit{animation:_mat-bottom-sheet-exit 375ms cubic-bezier(0.4, 0, 1, 1) backwards}.mat-bottom-sheet-container-xlarge,.mat-bottom-sheet-container-large,.mat-bottom-sheet-container-medium{border-top-left-radius:var(--mat-bottom-sheet-container-shape, 28px);border-top-right-radius:var(--mat-bottom-sheet-container-shape, 28px)}.mat-bottom-sheet-container-medium{min-width:384px;max-width:calc(100vw - 128px)}.mat-bottom-sheet-container-large{min-width:512px;max-width:calc(100vw - 256px)}.mat-bottom-sheet-container-xlarge{min-width:576px;max-width:calc(100vw - 384px)} 2`],encapsulation:2})}return t}
2)(),Ri=new Pe("MatBottomSheetData"),Re=class{viewContainerRef;panelClass;direction;data=null;hasBackdrop=!0;backdropClass;disableClose=!1;ariaLabel=null;ariaModal=!1;closeOnNavigation=!0;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;height="";minHeight;maxHeight},De=class{_ref;get instance(){return this._ref.componentInstance}get componentRef(){return this._ref.componentRef}containerInstance;disableClose;_afterOpened=new q;_result;_closeFallbackTimeout;constructor(s,e,o){this._ref=s,this.containerInstance=o,this.disableClose=e.disableClose,o._animationStateChanged.pipe($(l=>l.phase==="done"&&l.toState==="visible"),K(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),o._animationStateChanged.pipe($(l=>l.phase==="done"&&l.toState==="hidden"),K(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._ref.close(this._result)}),s.overlayRef.detachments().subscribe(()=>{this._ref.close(this._result)}),Be(this.backdropClick(),this.keydownEvents().pipe($(l=>l.keyCode===27))).subscribe(l=>{!this.disableClose&&(l.type!=="keydown"||!We(l))&&(l.preventDefault(),this.dismiss())})}dismiss(s){this.containerInstance&&(this.containerInstance._animationStateChanged.pipe($(e=>e.phase==="start"),K(1)).subscribe(()=>{this._closeFallbackTimeout=setTimeout(()=>this._ref.close(this._result),500),this._ref.overlayRef.detachBackdrop()}),this._result=s,this.containerInstance.exit(),this.containerInstance=null)}afterDismissed(){return this._ref.closed}afterOpened(){return this._afterOpened}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}},Ai=new Pe("mat-bottom-sheet-default-options"),ke=(()=>{class t{_injector=B(Ve);_parentBottomSheet=B(t,{optional:!0,skipSelf:!0});_animationsDisabled=Fe();_defaultOptions=B(Ai,{optional:!0});_bottomSheetRefAtThisLevel=null;_dialog=B(vt);get _openedBottomSheetRef(){let e=this._parentBottomSheet;return e?e._openedBottomSheetRef:this._bottomSheetRefAtThisLevel}set _openedBottomSheetRef(e){this._parentBottomSheet?this._parentBottomSheet._openedBottomSheetRef=e:this._bottomSheetRefAtThisLevel=e}constructor(){}open(e,o){let l=k(k({},this._defaultOptions||new Re),o),d;return this._dialog.open(e,Z(k({},l),{disableClose:!0,closeOnOverlayDetachments:!1,maxWidth:"100%",container:qi,scrollStrategy:l.scrollStrategy||Je(this._injector),positionStrategy:et(this._injector).centerHorizontally().bottom("0"),disableAnimations:this._animationsDisabled,templateContext:()=>({bottomSheetRef:d}),providers:(v,A,Oe)=>(d=new De(v,l,Oe),[{provide:De,useValue:d},{provide:Ri,useValue:l.data}])})),d.afterDismissed().subscribe(()=>{this._openedBottomSheetRef===d&&(this._openedBottomSheetRef=null)}),this._openedBottomSheetRef?(this._openedBottomSheetRef.afterDismissed().subscribe(()=>d.containerInstance?.enter()),this._openedBottomSheetRef.dismiss()):d.containerInstance.enter(),this._openedBottomSheetRef=d,d}dismiss(e){this._openedBottomSheetRef&&this._openedBottomSheetRef.dismiss(e)}ngOnDestroy(){this._bottomSheetRefAtThisLevel&&this._bottomSheetRefAtThisLevel.dismiss()}static \u0275fac=function(o){return new(o||t)};static \u0275prov=Le({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Di=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=ee({type:t});static \u0275inj=J({providers:[ke],imports:[ht,Te,Ke,Te]})}return t})();var Qi=["dateFilterFormTemplate"],Yi=["filterFormTemplate"],Zi=["deviceHistoryDetailsTemplate"],Xi=["updateMsgTagTemplate"],Ki=["exemptionPeriodFilterTemplate"],Wi=()=>[1,3,5,9,15],w=()=>({border:!1}),I=()=>({border:!0}),Oi=()=>[25,50,100];function Ji(t,s){t&1&&Ge(0)}function en(t,s){if(t&1&&P(0,Ji,1,0,"ng-container",10),t&2){c();let e=ie(6);_("ngTemplateOutlet",e)}}function tn(t,s){t&1&&(i(0,"mat-icon",14),a(1,"cancel "),n())}function nn(t,s){if(t&1){let e=O();i(0,"mat-chip",13),g("removed",function(){let l=C(e).$implicit,d=c(2);return f(d.removeFilter(l.attribute))}),a(1),p(2,tn,2,0,"mat-icon",14),n()}if(t&2){let e=s.$implicit;_("value",e.attribute)("removable",e.attribute!="dateRange"),r(),Ee(" ",e.label," "),r(),u(e.attribute!="dateRange"?2:-1)}}function on(t,s){if(t&1&&(i(0,"div",8)(1,"mat-chip-listbox",11,5),V(3,nn,3,4,"mat-chip",12,te),n()()),t&2){let e=c();r(3),N(e.chips)}}function an(t,s){if(t&1){let e=O();i(0,"div",15)(1,"button",39),g("click",function(){C(e);let l=c(2);
2return f(l.openBottomSheetForm())}),a(2,"Nova pesquisa "),i(3,"mat-icon"),a(4,"search"),n()()()}}function ln(t,s){if(t&1){let e=O();i(0,"button",42),g("click",function(){C(e);let l=c(3);return f(l.updateMsgTag(l.deviceDetails.device.id))}),a(1," Atualizar Mensagem TAG "),n()}}function rn(t,s){if(t&1&&(i(0,"div",32)(1,"div",31),b(2,"div",30),i(3,"div",40),p(4,ln,2,0,"button",41),n()()()),t&2){let e=c(2);r(),_("ngClass.xs",h(3,w))("ngClass.gt-xs",h(4,I)),r(3),u(e.deviceDetails.device.tipoDispositivo==e.TIPO_DISP.STICKER||e.deviceDetails.device.tipoDispositivo==e.TIPO_DISP.TIV?4:-1)}}function sn(t,s){if(t&1){let e=O();i(0,"div",36)(1,"div",43)(2,"div",30),a(3,"Tipo de lista"),n(),i(4,"div",24),a(5),n()(),i(6,"div",43)(7,"div",30),a(8,"Per\xEDodo"),n(),i(9,"div",24),a(10),x(11,"date"),x(12,"date"),n()(),i(13,"div",44)(14,"button",39),g("click",function(){C(e);let l=c(2);return f(l.openModalFilters())}),a(15,"Alterar"),n()()()}if(t&2){let e=c(2);r(5),Ee("",e.searchModeLabel(e.deviceHistoryFiltersApplyed==null?null:e.deviceHistoryFiltersApplyed.searchMode)||((e.deviceHistoryFiltersApplyed==null?null:e.deviceHistoryFiltersApplyed.listType)==1?"Nela":"Cadastro")," "),r(5),$e("",y(11,3,e.deviceHistoryFiltersApplyed==null?null:e.deviceHistoryFiltersApplyed.startDate,"
2shortDate")," a ",y(12,6,e.deviceHistoryFiltersApplyed==null?null:e.deviceHistoryFiltersApplyed.endDate,"shortDate"))}}function dn(t,s){t&1&&(i(0,"p",37),a(1,"Consultando bloqueio..."),n())}function cn(t,s){if(t&1&&(i(0,"p",37),a(1),n()),t&2){let e=c(3);r(),m(e.bloqueioConsultError)}}function mn(t,s){if(t&1&&(i(0,"div",45)(1,"div",47)(2,"div",48)(3,"div",49)(4,"div",30),a(5,"Situa\xE7\xE3o"),n(),i(6,"div",50),a(7),n()()()()()),t&2){let e=c(3);r(6),_("ngClass",e.situacaoCssClass(e.bloqueioConsult.situacao)),r(),m(e.situacaoLabel(e.bloqueioConsult.situacao))}}function pn(t,s){t&1&&(i(0,"p",37),a(1,"Consultando hist\xF3rico..."),n())}function un(t,s){if(t&1&&(i(0,"p",37),a(1),n()),t&2){let e=c(3);r(),m(e.bloqueioHistoricoError)}}function _n(t,s){t&1&&(i(0,"p",37),a(1,"Nenhum hist\xF3rico de bloqueio encontrado para o identificador."),n())}function vn(t,s){if(t&1&&(i(0,"div",45)(1,"div",47)(2,"div",51)(3,"div",52)(4,"div",53)(5,"div",30),a(6,"Motivo"),n(),i(7,"div",24),a(8),n()()(),i(9,"div",52)(10,"div",53)(11,"div",30),a(12,"Data Bloqueio"),n(),i(13,"div",24),a(14),x(15,"date"),n()()()(),i(16,"div",51)(17,"div",52)(18,"div",53)(19,"div",30),a(20,"Data Desbloqueio"),n(),i(21,"div",24),a(22),x(23,"date"),n()()(),i(24,"div",52)(25,"div",54)(26,"div",30),a(27,"Opera\xE7\xE3o"),n(),i(28,"div",24),a(29),n()()()()(),i(30,"div",47)(31,"div",51)(32,"div",52)(33,"div",53)(34,"div",30),a(35,"Data Inclus\xE3o Nela"),n(),i(36,"div",24),a(37),x(38,"date"),n()()(),i(39,"div",52)(40,"div",53)(41,"div",30),a(42,"Data Exclus\xE3o Nela"),n(),i(43,"div",24),a(44),x(45,"date"),n()()()(),i(46,"div",51)(47,"div",52)(48,"div",53)(49,"div",30),a(50,"Motivo EDI"),n(),i(51,"div",24),a(52),n()()(),i(53,"div",52)(54,"div",54)(55,"div",30),a(56,"Motivo Mensageria"),n(),i(57,"div",24),a(58),n()()()()()()),t&2){let e=s.$implicit;r(8),m(e.motivo||"-"),r(6),m(e.dataBloqueio?y(15,12,e.dataBloqueio,"dd/MM/yyyy HH:mm:ss"):"-"),r(8),m(e.dataDesbloqueio?y(23,15,e.dataDesbloqueio,"dd/MM/yyyy HH:mm:ss"):"-"),r(3),_("ngClass.xs",h(24,I))("ngClass.gt-xs",h(25,w)),r(4),m(e.descricaoOperacao||"-"),r(8),m(e.dataInclusaoNela?y(38,18,e.dataInclusaoNela,"dd/MM/yyyy HH:mm:ss"):"-"),r(7),m(e.dataExclusaoNela?y(45,21,e.dataExclusaoNela,"dd/MM/yyyy HH:mm:ss"):"-"),r(8),m(e.motivoEdi||"-"),r(2),_("ngClass.xs",h(26,I))("ngClass.gt-xs",h(27,w)),r(4),m(e.motivoMensageria||"-")}}function hn(t,s){if(t&1){let e=O();i(0,"mat-paginator",55),g("page",function(l){C(e);let d=c(3);return f(d.onBloqueioHistoricoPage(l))}),n()}if(t&2){let e=c(3);_("length",e.bloqueioHistoricoTotal)("pageIndex",e.bloqueioHistoricoPage-1)("pageSize",e.bloqueioHistoricoPageSize)("pageSizeOptions",h(4,Oi))}}function gn(t,s){if(t&1&&(p(0,dn,2,0,"p",37),p(1,cn,2,1,"p",37),p(2,mn,8,2,"div",45),i(3,"div",45)(4,"div",30),a(5,"Hist\xF3rico de Bloqueio/Desbloqueio Operacional"),n()(),p(6,pn,2,0,"p",37),p(7,un,2,1,"p",37),p(8,_n,2,0,"p",37),V(9,vn,59,28,"div",45,Se),p(11,hn,1,5,"mat-paginator",46)),t&2){let e=c(2);u(e.bloqueioConsultLoading?0:-1),r(),u(!e.bloqueioConsultLoading&&e.bloqueioConsultError?1:-1),r(),u(!e.bloqueioConsultLoading&&!e.bloqueioConsultError&&e.bloqueioConsult?2:-1),r(4),u(e.bloqueioHistoricoLoading?6:-1),r(),u(!e.bloqueioHistoricoLoading&&e.bloqueioHistoricoError?7:-1),r(),u(!e.bloqueioHistoricoLoading&&!e.bloqueioHistoricoError&&e.bloqueioHistorico.length==0?8:-1),r(),N(e.bloqueioHistorico),r(2),u(!e.bloqueioHistoricoLoading&&e.bloqueioHistoricoTotal>0?11:-1)}}function Cn(t,s){t&1&&(i(0,"p",37),a(1,"Consultando isentados..."),n())}function fn(t,s){t&1&&(i(0,"p",37),a(1,"Consulta de isentados indispon\xEDvel no momento."),n())}function xn(t,s){t&1&&(i(0,"p",37),a(1,"Nenhum registro de isen\xE7\xE3o encontrado para os filtros informados."),n())}function yn(t,s){if(t&1&&(i(0,"div",45)(1,"div",51)(2,"div",56)(3,"div",53)(4,"div",30),a(5,"Tipo Isen\xE7\xE3o"),n(),i(6,"div",24),a(7),n()()(),i(8,"div",57)(9,"div",53)(10,"div",30),a(11,"Concession\xE1ria"),n(),i(12,"div",24),a(13),n()()(),i(14,"div",58)(15,"div",53)(16,"div",30),a(17,"C\xF3d. Pra\xE7a"),n(),i(18,"div",24),a(19),n()()(),i(20,"div",59)(21,"div",53)(22,"div",30),a(23,"Pra\xE7a"),n(),i(24,"div",60),a(25),n()()(),i(26,"div",61)(27,"div",54)(28,"div",30),a(29,"Situa\xE7\xE3o"),n(),i(30,"div",24),a(31),n()()()(),i(32,"div",47)(33,"div",51)(34,"div",52)(35,"div",53)(36,"div",30),a(37,"Data e hora da inclus\xE3o"),n(),i(38,"div",24),a(39),x(40,"date"),n()()(),i(41,"div",52)(42,"div",54)(43,"div",30),a(44,"Data e hora da exclus\xE3o"),n(),i(45,"div",24),a(46),x(47,"date"),n()()()()()()),t&2){let e=s.$implicit;r(7),m(e.tipoIsencao||"-"),r(6),m(e.codigo||e.credenciado||"-"),r(6),m(e.codigoPraca||"-"),r(6),m(e.praca||"-"),r(2),_("ngClass.xs",h(17,I))("ngClass.gt-xs",h(18,w)),r(4),m(e.situacao||"-"),r(8),m(e.dataInclusao?y(40,11,e.dataInclusao,"dd/MM/yyyy HH:mm:ss"):"-"),r(3),_("ngClass.xs",h(19,I))("ngClass.gt-xs",h(20,w)
2),r(4),m(e.dataExclusao?y(47,14,e.dataExclusao,"dd/MM/yyyy HH:mm:ss"):"-")}}function Mn(t,s){if(t&1){let e=O();i(0,"mat-paginator",55),g("page",function(l){C(e);let d=c(3);return f(d.onExemptionPage(l))}),n()}if(t&2){let e=c(3);_("length",e.exemptionTotal)("pageIndex",e.exemptionPage-1)("pageSize",e.exemptionPageSize)("pageSizeOptions",h(4,Oi))}}function bn(t,s){if(t&1&&(i(0,"div",45)(1,"div",30),a(2,"Hist\xF3rico de Isentado"),n()(),p(3,Cn,2,0,"p",37),p(4,fn,2,0,"p",37),p(5,xn,2,0,"p",37),V(6,yn,48,21,"div",45,Se),p(8,Mn,1,5,"mat-paginator",46)),t&2){let e=c(2);r(3),u(e.exemptionConsultLoaded?-1:3),r(),u(!e.exemptionConsultAvailable&&e.exemptionConsultLoaded?4:-1),r(),u(e.exemptionConsultAvailable&&e.exemptionConsultLoaded&&e.exemptionConsult.length==0?5:-1),r(),N(e.exemptionConsult),r(2),u(e.exemptionConsultAvailable&&e.exemptionConsultLoaded&&e.exemptionTotal>0?8:-1)}}function Dn(t,s){t&1&&(i(0,"p",37),a(1,"Nenhum hist\xF3rio encontrado. "),n())}function On(t,s){if(t&1){let e=O();i(0,"div",29)(1,"mat-icon",63),g("click",function(){C(e);let l=c().$implicit,d=c(3);return f(d.openDeviceHistoryDetails(l,1))}),a(2,"search"),n()()}}function Pn(t,s){if(t&1&&(i(0,"div",62)(1,"div",47)(2,"div",51)(3,"div",52)(4,"div",53)(5,"div",30),a(6,"Entrada"),n(),i(7,"div",24),a(8),x(9,"date"),n()()(),i(10,"div",52)(11,"div",53)(12,"div",30),a(13,"Sa\xEDda"),n(),i(14,"div",24),a(15),x(16,"date"),n()()()(),i(17,"div",51)(18,"div",52)(19,"div",53)(20,"div",30),a(21,"Opera\xE7\xE3o"),n(),i(22,"div",24),a(23),n()()(),i(24,"div",52)(25,"div",54)(26,"div",30),a(27,"Motivo"),n(),i(28,"div",24),a(29),n()()()(),p(30,On,3,0,"div",29),n()()),t&2){let e=s.$implicit,o=c(3);r(8),m(y(9,7,e.entrance,"shortDate")),r(7),m(y(16,10,e.exit,"shortDate")),r(8),m(e.operation),r(2),_("ngClass.xs",h(13,I))("ngClass.gt-xs",h(14,w)),r(4),m(e.reason),r(),u(o.filterForm.controls.accredited.value>0?30:-1)}}function Sn(t,s){if(t&1&&V(0,Pn,31,15,"div",62,te),t&2){let e=c(2);N(e.deviceHistory)}}function En(t,s){if(t&1){let e=O();i(0,"div",29)(1,"mat-icon",63),g("click",function(){C(e);let l=c().$implicit,d=c(3);return f(d.openDeviceHistoryDetails(l,2))}),a(2,"search"),n()()}}function Fn(t,s){if(t&1&&(i(0,"div",64)(1,"div",47)(2,"div",51)(3,"div",52)(4,"div",53)(5,"div",30),a(6,"Data da altera\xE7\xE3o"),n(),i(7,"div",24),a(8),x(9,"date"),n()()(),i(10,"div",52)(11,"div",53)(12,"div",30),a(13,"Opera\xE7\xE3o"),n(),i(14,"div",24),a(15),n()()()(),i(16,"div",51)(17,"div",52)(18,"div",53)(19,"div",30),a(20,"Categoria"),n(),i(21,"div",24),a(22),n()()(),i(23,"div",52)(24,"div",54)(25,"div",30),a(26,"Placa"),n(),i(27,"div",24),a(28),n()()()(),p(29,En,3,0,"div",29),n()()),t&2){let e=s.$implicit,o=c(3);r(8),m(y(9,7,e.updatedAt,"shortDate")),r(7),m(e.operation),r(7),m(e.category),r(2),_("ngClass.xs",h(10,I))("ngClass.gt-xs",h(11,w)),r(4),m(e.plate),r(),u(o.filterForm.controls.accredited.value>0?29:-1)}}function Tn(t,s){if(t&1&&V(0,Fn,30,12,"div",64,te),t&2){let e=c(2);N(e.deviceHistory)}}function Hn(t,s){if(t&1){let e=O();i(0,"div",9),p(1,an,5,0,"div",15),i(2,"div",16),b(3,"img",17)(4,"img",18)(5,"img",19),i(6,"div",20)(7,"div",21),a(8,"Dispositivo liberado:"),n(),i(9,"div",22),a(10,"Dispositivo bloqueado:"),n(),i(11,"div",23),a(12,"Dispositivo encerrado:"),n(),i(13,"div",24),a(14),n()()(),i(15,"div",25)(16,"div",26)(17,"div",27)(18,"div",28)(19,"div",29)(20,"mat-icon"),a(21,"time_to_leave"),n()(),i(22,"div",20)(23,"div",30),a(24,"Placa"),n(),i(25,"div",24),a(26),n()()()(),i(27,"div",27)(28,"div",31)(29,"div",30),a(30,"Tipo"),n(),i(31,"div",24),a(32),n()()()(),i(33,"div",32)(34,"div",33)(35,"div",30),a(36,"Modelo do ve\xEDculo"),n(),i(37,"div",24),a(38),n()()(),p(39,rn,5,5,"div",32),n(),i(40,"div",34)(41,"div",35),p(42,sn,16,9,"div",36),p(43,gn,12,7),p(44,bn,9,4),p(45,Dn,2,0,"p",37),p(46,Sn,2,0),p(47,Tn,2,0),n(),i(48,"div",38),g("click",function(){C(e);let l=c();return f(l.openModalFilters())}),i(49,"mat-icon"),a(50,"search"),n(),i(51,"span"),a(52,"Hist\xF3rico"),n()()()()}if(t&2){let e=c();r(),u(e.uiService.isMobile?1:-1),r(),ne("green",(e.deviceDetails.device==null?null:e.deviceDetails.device.status)=="LIBERADO")("red",(e.deviceDetails.device==null?null:e.deviceDetails.device.status)=="BLOQUEADO")("orange",(e.deviceDetails.device==null?null:e.deviceDetails.device.status)=="ENCERRADO"),r(12),m(e.deviceDetails.device.id),r(12),m(e.deviceDetails.velhice.plate),r(2),_("ngClass.xs",h(20,w)
2)("ngClass.gt-xs",h(21,I)),r(4),m(e.deviceDetails.velhice.type),r(6),m(e.deviceDetails.velhice.model),r(),u(e.filterForm.controls.useReason.value==e.RAZAO_USO.CONCESSIONARIA_GTO?39:-1),r(3),u(e.deviceHistoryFiltersApplyed?42:-1),r(),u(e.deviceHistoryFiltersApplyed!=null&&(e.deviceHistoryFiltersApplyed==null?null:e.deviceHistoryFiltersApplyed.searchMode)==="bloqueado"?43:-1),r(),u(e.deviceHistoryFiltersApplyed!=null&&(e.deviceHistoryFiltersApplyed==null?null:e.deviceHistoryFiltersApplyed.searchMode)==="isentado"?44:-1),r(),u(e.deviceHistoryFiltersApplyed!=null&&e.deviceHistory.length==0&&((e.deviceHistoryFiltersApplyed==null?null:e.deviceHistoryFiltersApplyed.searchMode)==="nela"||(e.deviceHistoryFiltersApplyed==null?null:e.deviceHistoryFiltersApplyed.searchMode)==="cadastro")?45:-1),r(),u((e.deviceHistoryFiltersApplyed==null?null:e.deviceHistoryFiltersApplyed.searchMode)==="nela"||(e.deviceHistoryFiltersApplyed==null?null:e.deviceHistoryFiltersApplyed.listType)==1?46:-1),r(),u((e.deviceHistoryFiltersApplyed==null?null:e.deviceHistoryFiltersApplyed.searchMode)==="cadastro"||(e.deviceHistoryFiltersApplyed==null?null:e.deviceHistoryFiltersApplyed.listType)==2?47:-1)}}function wn(t,s){if(t&1){let e=O();i(0,"form",65)(1,"div",66)(2,"div",67)(3,"div",68),a(4,"Placa ou dispositivo"),n(),i(5,"mat-form-field",69)(6,"mat-label"),a(7,"Placa ou dispositivo"),n(),b(8,"input",70),i(9,"mat-icon",71),a(10,"search"),n()()(),i(11,"div",72)(12,"div",68),a(13,"Credenciado"),n(),i(14,"div",73)(15,"div",74),b(16,"auto-complete",75),n(),i(17,"div",76)(18,"button",77),g("click",function(){C(e);let l=c();return f(l.applyFilters())}),a(19," Filtrar "),n()()()()()()}if(t&2){let e=c();_("formGroup",e.filterForm),r(8),Ue("text-transform","uppercase"),r(8),_("label","Credenciados "+(e.filterForm.controls.accredited.errors!=null&&e.filterForm.controls.accredited.errors.maxlength?"(Limite m\xE1x. de "+(e.filterForm.controls.accredited.errors==null?null:e.filterForm.controls.accredited.errors.maxlength.requiredLength)+" credenciado"+((e.filterForm.controls.accredited.errors==null?null:e.filterForm.controls.accredited.errors.maxlength.requiredLength)>1?"s":"")+")":""))("addTooltip",!1)("options",e.accrediteds)("multiple",!1),r(2),_("disabled",!e.filterForm.valid)}}function In(t,s){if(t&1){let e=O();i(0,"form",65)(1,"div",78)(2,"h1",79),a(3,"Selecione o intervalo de data do hist\xF3rico"),n(),i(4,"mat-calendar",80),g("selectedChange",function(l){C(e);let d=c();return f(d.selectedRangeChange(l))}),n(),i(5,"mat-radio-group",81)(6,"div",82)(7,"mat-radio-button",83)(8,"div"),a(9,"Lista Cadastro"),n()(),i(10,"mat-radio-button",84)(11,"div"),a(12,"Lista Nela"),n()()(),i(13,"div",82)(14,"mat-radio-button",85)(15,"div"),a(16,"Bloqueio/Desbloqueio Operacional"),n()(),i(17,"mat-radio-button",86)(18,"div"),a(19,"Isentados"),n()()()(),b(20,"mat-divider",87),i(21,"div",88)(22,"div")(23,"button",89),g("click",function(){C(e);let l=c();return f(l.applyModalFilters())}),a(24," Buscar "),i(25,"mat-icon"),a(26,"search"),n()()()()()()}if(t&2){let e=c();_("formGroup",e.modalForm),r(4),_("selected",e.selectedRangeValue)("maxRange",31),r(19),_("disabled",!e.isHistorySearchEnabled)}}function qn(t,s){t&1&&(i(0,"div",90)(1,"div",68),a(2,"Detalhes da atualiza\xE7\xE3o da TAG"),n(),i(3,"div")(4,"div",30),a(5,"Sensibiliza\xE7\xE3o realizada com sucesso! Em breve voc\xEA receber\xE1 a atualiza\xE7\xE3o na mensagem TAG. "),n()(),i(6,"div",91)(7,"button",92),a(8," Fechar "),n()()()),t&2&&(r(7),_("mat-dialog-close",!1))}function Rn(t,s){if(t&1&&(i(0,"div",94)(1,"div",30),a(2,"Data Ajustada: "),n(),i(3,"div",24),a(4),x(5,"date"),n()()),t&2){let e=c(3);r(4),m(y(5,1,e.deviceHistoryDetails.adjustedDate,"dd/MM/yyyy HH:mm:ss"))}}function An(t,s){if(t&1&&(i(0,"div",94)(1,"div",30),a(2,"Data de Origem: "),n(),i(3,"div",24),a(4),x(5,"date"),n()()),t&2){let e=c(3);r(4),m(y(5,1,e.deviceHistoryDetails.sourceDate,"dd/MM/yyyy HH:mm:ss"))}}function kn(t,s){if(t&1&&(p(0,Rn,6,4,"div",94),p(1,An,6,4,"div",94)),t&2){let e=c(2);u(e.deviceHistoryDetails!=null&&e.deviceHistoryDetails.adjustedDate?0:-1),r(),u(e.deviceHistoryDetails!=null&&e.deviceHistoryDetails.sourceDate?1:-1)}}function Bn(t,s){if(t&1&&(i(0,"div",94)(1,"div",30),a(2,"Data Pub. EDI: "),n(),i(3,"div",24),a(4),n()()),t&2){let e=c(2);r(4),m(e.deviceHistoryDetails.pubEDIDate)}}function Ln(t,s){if(t&1&&(i(0,"div",94)(1,"div",30),a(2,"Sequencial Lista: "),n(),i(3,"div",24),a(4),n()()),t&2){let e=c(2);r(4),m(e.deviceHistoryDetails.seqList)}}function Vn(t,s){if(t&1&&(i(0,"div",94)(1,"div",30),a(2,"Nome Lista: "),n(),i(3,"div",24),a(4),n()()),t&2){let e=c(2);r(4),m(e.deviceHistoryDetails.nmList)}}function Nn(t,s){if(t&1&&(i(0,"div",94)(1,"div",30),a(2,"Serie Mensagem: "),n(),i(3,"div",24),a(4),n()()),t&2){let e=c(2);r(4),m(e.deviceHistoryDetails.serieMessage)}}function zn(t,s){if(t&1&&(i(0,"div",94)(1,"div",30),a(2,"Seq. Mensagem: "),n(),i(3,"div",24),a(4),n()()),t&2){let e=c(2);r(4),m(e.deviceHistoryDetails.seqMessage)}}function jn(t,s){if(t&1&&(i(0,"div",94)(1,"div",30),a(2,"Id Mensagem: "),n(),i(3,"div",24),a(4),n()()),t&2){let e=c(2);r(4),m(e.deviceHistoryDetails.idMessage)}}function Gn(t,s){t&1&&(i(0,"div",94)(1,"div",30),a(2,"N\xE3o foi localizado nenhuma publica\xE7\xE3o. "),n()())}function Un(t,s){if(t&1&&(i(0,"div",93)(1,"div",68),a(2,"Detalhes do hist\xF3rico"),n(),p(3,kn,2,2),p(4,Bn,5,1,"div",94),p(5,Ln,5,1,"div",94),p(6,Vn,5,1,"div",94),p(7,Nn,5,1,"div",94),p(8,zn,5,1,"div",94),p(9,jn,5,1,"div",94),p(10,Gn,3,0,"div",94),i(11,"div",95)(12,"button",92),a(13," Fechar "),n()()()),t&2){let e=c();r(3),u(e.deviceHistoryDetails!=null&&e.deviceHistoryDetails.pubEDIDate||e.deviceHistoryDetails!=null&&e.deviceHistoryDetails.seqList||e.deviceHistoryDetails!=null&&e.deviceHistoryDetails.nmList||e.deviceHistoryDetails!=null&&e.deviceHistoryDetails.serieMessage||e.deviceHistoryDetails!=null&&e.deviceHistoryDetails.seqMessage||e.deviceHistoryDetails!=null&&e.deviceHistoryDetails.idMessage?3:-1),r(),u(e.deviceHistoryDetails!=null&&e.deviceHistoryDetails.pubEDIDate&&e.filterForm.controls.useReason.value==e.RAZAO_USO.CONCESSIONARIA_EDI?4:-1),r(),u(e.deviceHistoryDetails!=null&&e.deviceHistoryDetails.seqList?5:-1),r(),u(e.deviceHistoryDetails!=null&&e.deviceHistoryDetails.nmList?6:-1),r(),u(e.deviceHistoryDetails!=null&&e.deviceHistoryDetails.serieMessage?7:-1),r(),u(e.deviceHistoryDetails!=null&&e.deviceHistoryDetails.seqMessage?8:-1),r(),u(e.deviceHistoryDetails!=null&&e.deviceHistoryDetails.idMessage?9:-1),r(),u(!(e.deviceHistoryDetails!=null&&e.deviceHistoryDetails.pubEDIDate)&&!(e.deviceHistoryDetails!=null&&e.deviceHistoryDetails.seqList)&&!(e.deviceHistoryDetails!=null&&e.deviceHistoryDetails.nmList)&&!(e.deviceHistoryDetails!=null&&e.deviceHistoryDetails.serieMessage)&&!(e.deviceHistoryDetails!=null&&e.deviceHistoryDetails.seqMessage)&&!(e.deviceHistoryDetails!=null&&e.deviceHistoryDetails.idMessage)?10:-1),r(2),_("mat-dialog-close",!1)}}function $n(t,s){if(t&1){let e=O();i(0,"form",65)(1,"div",78)(2,"h1",79),a(3,"Selecione o per\xEDodo da consulta de isen\xE7\xE3o"),n(),i(4,"mat-calendar",80),g("selectedChange",function(l){C(e);let d=c();return f(d.selectedExemptionRangeChange(l))}),n(),b(5,"mat-divider",87),i(6,"div",88)(7,"button",96),g("click",function(){C(e);let l=c();return f(l.clearExemptionPeriod())}),a(8," Limpar "),n(),i(9,"button",97),g("click",function(){C(e);let l=c();return f(l.confirmExemptionPeriod())}),a(10," Confirmar "),n()()()()}if(t&2){let e=c();_("formGroup",e.exemptionFilterForm),r(4),_("selected",e.exemptionSelectedRangeValue)("maxRange",31)}}var Pi=(()=>{let s=class s{constructor(o,l,d,v,A,Oe,Ei,Fi,Ti){this.formBuilder=o,this.matBottomSheet=l,this.resourceService=d,this.deviceService=v,this.dialog=A,this.chatbotService=Oe,this.uiService=Ei,this.accountService=Fi,this.satisfactionSurveyService=Ti,this.deviceHistoryFiltersApplyed=null,this.deviceHistory=[],this.exemptionConsult=[],this.exemptionConsultLoaded=!1,this.exemptionConsultAvailable=!1,this.exemptionTotal=0,this.exemptionPage=1,this.exemptionPageSize=25,this.bloqueioConsult=null,this.bloqueioConsultLoading=!1,this.bloqueioConsultError=null,this.bloqueioHistorico=[],this.bloqueioHistoricoLoading=!1,this.bloqueioHistoricoError=null,this.bloqueioHistoricoTotal=0,this.bloqueioHistoricoPage=1,this.bloqueioHistoricoPageSize=25,this.exemptionDisplayedColumns=["tipoIsencao","codigo","codigoPraca","praca","situacao","dataInclusao","dataExclusao"],this.onDestroy$=new q,this.copySubject=ne
2w q,this.accrediteds=new X([]),this.RAZAO_USO=He.RAZAO_USO,this.TIPO_DISP=He.TIPO_DISP,this.chips=[],this.chipLabels={plateOrDevice:"Placa ou Dispositivo - {0}",accredited:"Credenciado - {0}"},this.uiService.setTitle("Consulta de Dispositivos")}ngOnInit(){this.useReasonControl=new se(null),this.filterForm=this.formBuilder.group({useReason:[null,[D.required]],plateOrDevice:[null,[D.required,D.minLength(7),D.maxLength(10)]],accredited:[null,[D.required,D.minLength(1)]]}),this.modalForm=this.formBuilder.group({searchMode:["nela",[D.required]],startDate:[null,[D.required]],endDate:[null,[D.required]]}),this.exemptionFilterForm=this.formBuilder.group({squareCode:[null,[D.maxLength(5),D.pattern(/^\d*$/)]],startDate:[null],endDate:[null]}),this.consultOptionsForm=this.formBuilder.group({bloqueado:[!1],isentado:[!1]}),this.deviceService.openComponent$.subscribe(o=>{this.openBottomSheetForm()}),this.copySubjectSubscription=this.uiService.isMobile$.subscribe(o=>{this.copySubject.next(o),o?this.openBottomSheetForm():this.matBottomSheet.dismiss()}),this.useReasonControl.valueChanges.subscribe(o=>{this.filterForm.reset(),this.modalForm.reset({searchMode:"nela",
2startDate:null,endDate:null}),this.selectedRangeValue=null,this.deviceDetails=null,this.deviceHistory=[],this.deviceHistoryDetails=null,this.resetExemptionConsult(),this.resetBloqueioConsult(),this.exemptionFilterForm.reset(),this.consultOptionsForm.reset({bloqueado:!1,isentado:!1}),this.filterForm.controls.useReason.setValue(o);let l=this.resourceService.getAccreditedsByUseReason(o);this.accountService.isInternalUser&&l.unshift({id:-1,label:"Todos",name:"Todos"}),l.length>0&&(this.filterForm.controls.accredited.enable(),this.accrediteds.next(l)),this.chatbotService.hideBotIcon(),this.updateChips()}),!this.uiService.isMobile&&this.matBottomSheetRef&&this.matBottomSheetRef.dismiss(),this.satisfactionSurveyService.start(14,{})}selectedRangeChange(o){Y(o)&&(this.selectedRangeValue&&this.selectedRangeValue.start&&!this.selectedRangeValue.end&&qe(o,this.selectedRangeValue.start)?(this.selectedRangeValue=new Q(this.selectedRangeValue.start,o),this.modalForm.controls.startDate.setValue(this.selectedRangeValue.start),this.modalForm.controls.endDate.setValue(o),this.modalForm.updateValueAndValidity()):(this.selectedRangeValue=new Q(o,null),this.modalForm.controls.startDate.setValue(o),this.modalForm.controls.endDate.setValue(null),this.modalForm.updateValueAndValidity()))}openBottomSheetForm(){this.uiService.isMobile&&(this.deviceDetails=null,this.deviceHistory=[],this.deviceHistoryDetails=null,this.resetExemptionConsult(),this.resetBloqueioConsult(),this.consultOptionsForm.reset({bloqueado:!1,isentado:!1}),this.matBottomSheetRef=this.matBottomSheet.open(this.filterFormTemplate,{hasBackdrop:!1}))}applyFilters(){this.updateChips(),this.deviceDetails=null,this.deviceHistory=[],this.deviceHistoryFiltersApplyed=null,this.resetExemptionConsult(),this.resetBloqueioConsult(),this.consultOptionsForm.reset({bloqueado:!1,isentado:!1}),this.modalForm.patchValue({searchMode:"nela"}),this.filterForm.valid&&this.deviceService.findBy(this.filterForm.value).pipe(E(o=>{let l=this.dialog.open(Ie,{disableClose:!0,data:{title:"Aten\xE7\xE3o",message:"Dispositivo/Placa n\xE3o encontrado.",confirmButtonText:"Fechar",confirmAction:()=>{this.openBottomSheetForm()}}});return S(null)})).subscribe(o=>{o&&(this.deviceDetails=o,this.deviceId=o.device?.id)}),this.matBottomSheetRef&&this.matBottomSheetRef.dismiss()}openModalFilters(){this.modalForm.controls.searchMode.value==null&&this.modalForm.controls.searchMode.setValue("nela"),this.matDialogRef=this.dialog.open(this.dateFilterFormTemplate,{disableClose:!1,hasBackdrop:!0}),this.matDialogRef.afterClosed().subscribe(o=>{})}get isHistorySearchEnabled(){return fi(this.modalForm?.value)}searchModeLabel(o){return _i(o)}codigoDescricaoLabel(o,l){return hi(o,l)}situacaoLabel(o){return xi(o)}situacaoCssClass(o){return yi(o)}openDeviceHistoryDetails(o,l){this.deviceService.openDeviceHistoryDetails(o,this.filterForm.controls.accredited.value,this.deviceId,l).subscribe(d=>{this.deviceHistoryDetails=d,this.matDialogRef=this.dialog.open(this.deviceHistoryDetailsTemplate,{disableClose:!1,hasBackdrop:!0}),this.matDialogRef.afterClosed().subscribe(v=>{})})}applyModalFilters(){this.deviceHistoryFiltersApplyed=null,this.deviceHistory=[],this.matDialogRef&&this.matDialogRef.close();let o=Z(k({},gi(this.modalForm.value)),{searchMode:this.modalForm.value.searchMode});this.deviceHistoryFiltersApplyed=o,this.consultOptionsForm.patchValue(Ci(this.modalForm.value)),this.consultOptionsForm.value.bloqueado?(this.loadBloqueioConsult(),this.loadBloqueioHistorico(1)):this.resetBloqueioConsult(),this.consultOptionsForm.value.isentado?(this.exemptionFilterForm.patchValue({startDate:this.modalForm.value.startDate,endDate:this.modalForm.value.endDate}),this.loadExemptionConsult(1)):this.resetExemptionConsult(),vi(this.modalForm.value.searchMode)&&this.deviceService.getHistory(o,this.deviceId,this.filterForm.controls.accredited.value).subscribe(l=>{l&&(this.deviceHistory=l)})}removeFilter(o){o!=""&&this.filterForm.controls[o].setValue(""),this.applyFilters()}updateChips(){this.chips=[];let o=Object.assign({},this.filterForm.value);if(o.plateOrDevice&&(o.plateOrDevice=o.plateOrDevice.toUpperCase()),o.accredited){let d=this.accrediteds.value.find(v=>v.id==o.accredited);o.accredited=null,d&&(o.accredited=d.name)}delete o.useReason;for(var l in o)if(o[l]){let d=new Gt().transform(this.chipLabels[l],o[l]);this.chips.push({attribute:l,label:d})}}isGtoUseReason(){return this.filterForm?.controls.useReason?.value==this.RAZAO_USO.CONCESSIONARIA_GTO}selectedExemptionRangeChange(o){Y(o)&&(this.exemptionSelectedRangeValue&&this.exemptionSelectedRangeValue.start&&!this.exemptionSelectedRangeValue.end&&qe(o,this.exemptionSelectedRangeValue.start)?(this.exemptionSelectedRangeValue=new Q(this.exemptionSelectedRangeValue.start,o),this.exemptionFilterForm.controls.startDate.setValue(this.exemptionSelectedRangeValue.start),this.exemptionFilterForm.controls.endDate.setValue(o)):(this.exemptionSelectedRangeValue=new Q(o,null),this.exemptionFilterForm.controls.startDate.setValue(o),this.exemptionFilterForm.controls.endDate.setValue(null)))}applyExemptionFilters(){this.loadExemptionConsult(1)}openExemptionPeriodFilters(){this.matDialogRef=this.dialog.open(this.exemptionPeriodFilterTemplate,{disableClose:!1,hasBackdrop:!0})}clearExemptionPeriod(){this.exemptionSelectedRangeValue=null,this.exemptionFilterForm.controls.startDate.setValue(null),this.exemptionFilterForm.controls.endDate.setValue(null),this.matDialogRef&&this.matDialogRef.close()}confirmExemptionPeriod(){this.matDialogRef&&this.matDialogRef.close()}resetExemptionConsult(){this.exemptionConsult=[],this.exemptionConsultLoaded=!1,this.exemptionConsultAvailable=!1,this.exemptionTotal=0,this.exemptionPage=1}resetBloqueioConsult(){this.bloqueioConsult=null,this.bloqueioConsultLoading=!1,this.bloqueioConsultError=null,this.bloqueioHistorico=[],this.bloqueioHistoricoLoading=!1,this.bloqueioHistoricoError=null,this.bloqueioHistoricoTotal=0,this.bloqueioHistoricoPage=1}
2loadBloqueioConsult(){if(this.resetBloqueioConsult(),!this.deviceId){this.bloqueioConsultError="Dispositivo n\xE3o encontrado para consulta.";return}this.bloqueioConsultLoading=!0,this.deviceService.getBloqueioConsult(this.deviceId).pipe(E(o=>(this.bloqueioConsult=null,this.bloqueioConsultLoading=!1,this.bloqueioConsultError=o?.error?.message||o?.message||"N\xE3o foi poss\xEDvel consultar o bloqueio do dispositivo.",S(null)))).subscribe(o=>{this.bloqueioConsultLoading=!1,o!=null&&(this.bloqueioConsult=o,this.bloqueioConsultError=null)})}onBloqueioHistoricoPage(o){this.bloqueioHistoricoPageSize=o.pageSize,this.loadBloqueioHistorico(o.pageIndex+1)}loadBloqueioHistorico(o=1){if(this.bloqueioHistorico=[],this.bloqueioHistoricoError=null,this.bloqueioHistoricoTotal=0,this.bloqueioHistoricoPage=o,!this.deviceId){this.bloqueioHistoricoError="Dispositivo n\xE3o encontrado para consulta.";return}this.bloqueioHistoricoLoading=!0,this.deviceService.getBloqueioHistorico({dispositivo:this.deviceId,codConveniado:this.filterForm.controls.accredited.value,dataInicialPeriodo:this.deviceHistoryFiltersApplyed?.startDate||this.modalForm?.value?.startDate,dataFinalPeriodo:this.deviceHistoryFiltersApplyed?.endDate||this.modalForm?.value?.endDate,numeroPagina:o,totalPagina:this.bloqueioHistoricoPageSize}).pipe(E(l=>(this.bloqueioHistorico=[],this.bloqueioHistoricoLoading=!1,this.bloqueioHistoricoError=l?.error?.message||l?.message||"N\xE3o foi poss\xEDvel consultar o hist\xF3rico de bloqueio.",S(null)))).subscribe(l=>{this.bloqueioHistoricoLoading=!1,l!=null&&(this.bloqueioHistorico=l.lista??[],this.bloqueioHistoricoTotal=Number(l.totalRegistros??0),this.bloqueioHistoricoError=null)})}onExemptionPage(o){this.exemptionPageSize=o.pageSize,this.loadExemptionConsult(o.pageIndex+1)}loadExemptionConsult(o=1){if(this.exemptionConsult=[],this.exemptionConsultLoaded=!1,this.exemptionConsultAvailable=!1,this.exemptionTotal=0,this.exemptionPage=o,!this.deviceId){this.exemptionConsultLoaded=!0;return}this.deviceService.getExemptionConsult({dispositivo:this.deviceId,codConveniado:this.filterForm.controls.accredited.value,codigoPraca:this.exemptionFilterForm.controls.squareCode.value,dataInicialPeriodo:this.exemptionFilterForm.controls.startDate.value,dataFinalPeriodo:this.exemptionFilterForm.controls.endDate.value,numeroPagina:o,totalPagina:this.exemptionPageSize}).pipe(E(l=>(this.exemptionConsult=[],this.exemptionConsultLoaded=!0,this.exemptionConsultAvailable=!1,this.exemptionTotal=0,S(null)))).subscribe(l=>{l!=null&&(this.exemptionConsult=l?.lista??[],this.exemptionTotal=Number(l?.totalRegistros??0),this.exemptionConsultLoaded=!0,this.exemptionConsultAvailable=!0)})}updateMsgTag(o){this.deviceService.updateMsgTag(o).pipe(E(l=>{let d=this.dialog.open(Ie,{disableClose:!0,data:{title:"Aten\xE7\xE3o",message:"Erro ao executar a sensibiliza\xE7\xE3o! Tente novamente mais tarde.",confirmButtonText:"Fechar",confirmAction:()=>{this.openBottomSheetForm()}}});return S(null)})).subscribe(l=>{l&&(this.matDialogRef=this.dialog.open(this.updateMsgTagTemplate,{disableClose:!1,hasBackdrop:!0}))})}ngOnDestroy(){this.chatbotService.showBotIcon(),this.matBottomSheet.dismiss();try{this.copySubjectSubscription?.unsubscribe()}catch{}}};s.\u0275fac=function(l){return new(l||s)(M(ue),M(ke),M(Ce),M(ye),M(gt),M(wt),M(xe),M(fe),M(qt))},s.\u0275cmp=L({type:s,selectors:[["app-devices"]],viewQuery:function(l,d){if(l&1&&(F(Qi,7),F(Yi,7),F(Zi,7),F(Xi,7),F(Ki,7)),l&2){let v;T(v=H())&&(d.dateFilterFormTemplate=v.first),T(v=H())&&(d.filterFormTemplate=v.first),T(v=H())&&(d.deviceHistoryDetailsTemplate=v.first),T(v=H())&&(d.updateMsgTagTemplate=v.first),T(v=H())&&(d.exemptionPeriodFilterTemplate=v.first)}},standalone:!1,decls:15,vars:7,consts:[["filterFormTemplate",""],["dateFilterFormTemplate",""],["updateMsgTagTemplate",""],["deviceHistoryDetailsTemplate",""],["exemptionPeriodFilterTemplate",""],["chipList",""],[3,"formControl","disabledFor","hideToll"],[1,"component-container","flex","flex-col","gap-3"],[1,"chips","flex","flex-row"],[1,"device-details","flex","flex-col"],[4,"ngTemplateOutlet"],["aria-label","Filtros selecionados"],[3,"value","removable"],[3,"removed","value","removable"],["matChipRemove",""],[1,"flex","flex-row","flex-1","justify-end","mb-3"],["fxLayout","row","fxLayoutGap","12px",1,"device-status"],["src","assets/icons/yes.svg","width","24","alt","",1,"ok"],["src","assets/icons/no.svg","width","24","alt","",1,"nok"],["src","assets/icons/no.svg","width","24","alt","",1,"eok"],[1,"flex","flex-col"],[1,"label","ok"],[1,"label","nok"],[1,"label","eok"],[1,"value"],["fxLayout","row","fxLayout.xs","column","fxLayoutGap","12px","fxFlex","",1,"summary"],["fxFlex","50","fxLayoutGap","12px"],["fxFlex","50"],["fxLayout","row","fxLayoutGap","12px",1,"summary-item","border"],["fxLayoutAlign","center center"],[1,"label"],[1,"summary-item","flex","flex-col",3,"ngClass.xs","ngClass.gt-xs"],["fxFlex","25"],[1,"summary-item","flex","flex-col"],[1,"history"],["fxLayout","column","fxFlex","",1,"history-items"],["fxLayout","row","fxFlex","","fxLayoutGap","12px",1,"selected-filters"],[1,"n
2o-results"],["fxLayout","row","fxLayoutAlign","center center","matRipple","","matRippleColor","white",1,"history-button",3,"click"],["mat-raised-button","",3,"click"],["fxLayoutAlign","end"],["mat-raised-button","","fxLayoutAlign","right"],["mat-raised-button","","fxLayoutAlign","right",3,"click"],["fxLayout","column","fxFlex","",1,"filter-detail"],["fxLayoutAlign","end center"],[1,"history-item"],[3,"length","pageIndex","pageSize","pageSizeOptions"],["fxFlex","","fxLayout","row"],["fxFlex",""],["fxLayout","column",1,"history-detail"],[1,"value","situacao",3,"ngClass"],["fxFlex","","fxLayout","row","fxLayout.xs","column"],["fxFlex","","fxFlex.xs","50"],["fxLayout","column",1,"history-detail","border"],["fxLayout","column",1,"history-detail",3,"ngClass.xs","ngClass.gt-xs"],[3,"page","length","pageIndex","pageSize","pageSizeOptions"],["fxFlex","15","fxFlex.xs","50"],["fxFlex","12","fxFlex.xs","50"],["fxFlex","10","fxFlex.xs","50"],["fxFlex","45","fxFlex.xs","100"],[1,"value","wrap"],["fxFlex","18","fxFlex.xs","50"],[1,"history-item","1"],[1,"button-link",3,"click"],[1,"history-item","2"],[1,"flex","flex-col",3,"formGroup"],[1,"filters","flex","flex-col","sm:flex-row","gap-3"],[1,"filter","flex","flex-col","basis-[22%]"],[1,"title"],["appearance","outline","floatLabel","always"],["type","text","formControlName","plateOrDevice","matInput","","placeholder",""],["matSuffix",""],[1,"filter","last","flex","flex-col","basis-[78%]"],[1,"flex","flex-col","gap-6","sm:flex-row","sm:gap-3","sm:flex-1"],[1,"stretch-fields","sm:basis-[40%]","basis-[100%]"],["formControlName","accredited","placeholder","Selecione","selectPlaceholder","Pesquisar...","multipleSelectionText","{0} credenciado(s) selecionado(s)","displayProperty","label","valueProperty","id",3,"label","addTooltip","options","multiple"],[1,"flex","flex-1"],["type","submit","color","primary","mat-raised-button","",1,"ml-auto",3,"click","disabled"],[1,"flex","flex-1","flex-col","gap-3","p-8"],[1,"text-lg","mb-2","font-medium","mt-0"],[3,"selectedChange","selected","maxRange"],["formControlName","searchMode",1,"yesno-radio-buttons","flex","flex-col","gap-3","items-center"],[1,"flex","flex-row","gap-6","justify-center","items-center"],["value","cadastro"],["value","nela"],["value","bloqueado"],["value","isentado"],[1,"!mb-3","!mt-6"],[1,"flex","flex-1","flex-row","gap-3","ml-auto"],["type","submit","color","primary","mat-raised-button","",3,"click","disabled"],[1,"update-msg-tag","flex","flex-col"],[1,"close-button","flex","flex-row","flex-1"],["type","submit","color","primary","mat-raised-button","",1,"ml-auto",3,"mat-dialog-close"],[1,"device-history-details","flex","flex-col"],[1,"flex","flex-row"],[1,"close-button","flex","flex-row"],["type","button","mat-stroked-button","",3,"click"],["type","button","color","primary","mat-raised-button","",3,"click"]],template:function(l,d){l&1&&(b(0,"app-use-reason-selector",6),i(1,"div",7),p(2,en,1,1,"ng-container"),p(3,on,5,0,"div",8),p(4,Hn,53,22,"div",9),n(),P(5,wn,20,8,"ng-template",null,0,G)(7,In,27,4,"ng-template",null,1,G)(9,qn,9,1,"ng-template",null,2,G)(11,Un,14,9,"ng-template",null,3,G)(13,$n,11,3,"ng-template",null,4,G)),l&2&&(_("formControl",d.useReasonControl)("disabledFor",h(6,Wi))("hideToll",!1),r(2),u(d.uiService.isMobile?-1:2),r(),u(d.uiService.isMobile?-1:3),r(),u(d.deviceDetails?4:-1))},dependencies:[Qe,Ye,de,ae,le,re,ce,me,pe,St,Et,Tt,Ft,Pt,xt,U,rt,ge,ve,he,Vt,_e,Zt,Xt,Yt,Rt,At,Ct,zt,Bt,Me,be,oe],styles:["[_nghost-%COMP%]{height:100%;display:flex;flex-direction:column}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%]{margin-right:12px}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .device-status[_ngcontent-%COMP%]{padding:16px;background-color:#fff;border-radius:20px 20px 0 0;color:#fff}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .device-status[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:invert(1);width:24px}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .device-status.green[_ngcontent-%COMP%]{background-color:#69a82f}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .device-status.green[_ngcontent-%COMP%] .ok[_ngcontent-%COMP%]{display:block}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .device-status.green[_ngcontent-%COMP%] .nok[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .device-status.green[_ngcontent-%COMP%] .eok[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .device-status.red[_ngcontent-%COMP%]{background-color:#db0100}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .device-status.red[_ngcontent-%COMP%] .ok[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .device-status.red[_ngcontent-%COMP%] .nok[_ngcontent-%COMP%]{display:block}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .device-status.red[_ngcontent-%COMP%] .eok[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .device-status.orange[_ngcontent-%COMP%]{background-color:#db5b00}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .device-status.orange[_ngcontent-%COMP%] .ok[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .device-status.orange[_ngcontent-%COMP%] .nok[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .device-status.orange[_ngcontent-%COMP%] .eok[_ngcontent-%COMP%]{display:block}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .summary[_ngcontent-%COMP%]{font-size:16px;padding:16px;background-color:#fff}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .summary[_ngcontent-%COMP%] .summary-item.border[_ngcontent-%COMP%]{border-right:solid 2px #eee}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .summary[_ngcontent-%COMP%] .summary-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:#8e8e93;font-size:12px;overflow:hidden;white-space:nowrap}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .summary[_ngcontent-%COMP%] .summary-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{color:#363636;overflow:hidden;white-space:nowrap}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .summary[_ngcontent-%COMP%] .summary-item[_ngcontent-%COMP%] .value.small[_ngcontent-%COMP%]{font-size:12px!important}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .consult-options[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:24px;align-items:center}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .bloqueio-consult[_ngcontent-%COMP%]{background-color:#fff;padding:16px;border-top:solid 1px #eee}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .bloqueio-consult[_ngcontent-%COMP%] .no-results[_ngcontent-%COMP%]{text-align:center;margin:0;color:#8e8e93}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .bloqueio-consult[_ngcontent-%COMP%] .bloqueio-summary[_ngcontent-%COMP%]{gap:12px}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .bloqueio-consult[_ngcontent-%COMP%] .bloqueio-item[_ngcontent-%COMP%]{min-width:140px}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .bloqueio-consult[_ngcontent-%COMP%] .bloqueio-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:#8e8e93;font-size:12px}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .bloqueio-consult[_ngcontent-%COMP%] .bloqueio-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{color:#363636;font-size:14px;font-weight:500}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .exemption-consult[_ngcontent-%COMP%]{background-color:#fff;padding:16px;border-top:solid 1px #eee}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .exemption-consult[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{color:#8e8e93;font-size:12px;margin-bottom:4px}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .exemption-consult[_ngcontent-%COMP%] .period-value[_ngcontent-%COMP%]{color:#363636;font-size:13px;margin-bottom:8px}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .exemption-consult[_ngcontent-%COMP%] .no-results[_ngcontent-%COMP%]{text-align:center;margin:12px 0 0;color:#8e8e93}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .exemption-consult[_ngcontent-%COMP%] .exemption-table-container[_ngcontent-%COMP%]{overflow-x:auto;margin-top:12px}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .exemption-consult[_ngcontent-%COMP%] .exemption-table[_ngcontent-%COMP%]{width:100%;min-width:900px}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .exemption-consult[_ngcontent-%COMP%] .exemption-table[_ngcontent-%COMP%] th.mat-mdc-header-cell[_ngcontent-%COMP%]{color:#8e8e93;font-size:12px;font-weight:500}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .exemption-consult[_ngcontent-%COMP%] .exemption-table[_ngcontent-%COMP%] td.mat-mdc-cell[_ngcontent-%COMP%]{color:#363636;font-size:13px;white-space:nowrap}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .history[_ngcontent-%COMP%]{background-color:transparent;box-shadow:0 2px 4px #184b4b14;border-radius:0 0 20px 20px;display:block!important}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .history[_ngcontent-%COMP%] .no-results[_ngcontent-%COMP%]{text-align:center;margin:12px 0}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .history[_ngcontent-%COMP%] .history-button[_ngcontent-%COMP%]{padding:16px;text-align:center;cursor:pointer;position:relative}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .history[_ngcontent-%COMP%] .history-items[_ngcontent-%COMP%] .selected-filters[_ngcontent-%COMP%]{margin:8px 16px}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .history[_ngcontent-%COMP%] .history-items[_ngcontent-%COMP%] .selected-filters[_ngcontent-%COMP%] .filter-detail[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:#8e8e93;font-size:12px;overflow:hidden;white-space:nowrap}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .history[_ngcontent-%COMP%] .history-items[_ngcontent-%COMP%] .selected-filters[_ngcontent-%COMP%] .filter-detail[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{color:#363636}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .history[_ngcontent-%COMP%] .history-items[_ngcontent-%COMP%] .selected-filters[_ngcontent-%COMP%] .filter-detail[_ngcontent-%COMP%] .value.small[_ngcontent-%COMP%]{font-size:12px!important}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .history[_ngcontent-%COMP%] .history-items[_ngcontent-%COMP%] .history-item[_ngcontent-%COMP%]{padding:8px;border-radius:8px;margin:0 8px 8px}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .history[_ngcontent-%COMP%] .history-items[_ngcontent-%COMP%] .history-item[_ngcontent-%COMP%] .button-link[_ngcontent-%COMP%]{cursor:pointer}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .history[_ngcontent-%COMP%] .history-items[_ngcontent-%COMP%] .history-item[_ngcontent-%COMP%] .border[_ngcontent-%COMP%]{margin-right:16px}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .history[_ngcontent-%COMP%] .history-items[_ngcontent-%COMP%] .history-item[_ngcontent-%COMP%]:last-child{margin-bottom:0}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .history[_ngcontent-%COMP%] .history-items[_ngcontent-%COMP%] .history-item[_ngcontent-%COMP%]:nth-child(2n){background-color:#eee}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .history[_ngcontent-%COMP%] .history-items[_ngcontent-%COMP%] .history-item[_ngcontent-%COMP%]:nth-child(2n) .border[_ngcontent-%COMP%]{border-right:solid 2px #fff}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .history[_ngcontent-%COMP%] .history-items[_ngcontent-%COMP%] .history-item[_ngcontent-%COMP%]:nth-child(odd){background-color:#fff}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .history[_ngcontent-%COMP%] .history-items[_ngcontent-%COMP%] .history-item[_ngcontent-%COMP%]:nth-child(odd) .border[_ngcontent-%COMP%]{border-right:solid 2px #eee}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .history[_ngcontent-%COMP%] .history-items[_ngcontent-%COMP%] .history-item[_ngcontent-%COMP%] .history-detail[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:#8e8e93;font-size:12px;overflow:hidden;white-space:nowrap}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .history[_ngcontent-%COMP%] .history-items[_ngcontent-%COMP%] .history-item[_ngcontent-%COMP%] .history-detail[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{color:#363636;overflow:hidden;white-space:nowrap}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .history[_ngcontent-%COMP%] .history-items[_ngcontent-%COMP%] .history-item[_ngcontent-%COMP%] .history-detail[_ngcontent-%COMP%] .value.wrap[_ngcontent-%COMP%]{white-space:normal;overflow:visible}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .history[_ngcontent-%COMP%] .history-items[_ngcontent-%COMP%] .history-item[_ngcontent-%COMP%] .history-detail[_ngcontent-%COMP%] .value.small[_ngcontent-%COMP%]{font-size:12px!important}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .history[_ngcontent-%COMP%] .history-items[_ngcontent-%COMP%] .history-item[_ngcontent-%COMP%] .history-detail[_ngcontent-%COMP%] .value.situacao[_ngcontent-%COMP%]{font-weight:600}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .history[_ngcontent-%COMP%] .history-items[_ngcontent-%COMP%] .history-item[_ngcontent-%COMP%] .history-detail[_ngcontent-%COMP%] .value.situacao.green[_ngcontent-%COMP%]{color:#69a82f}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .history[_ngcontent-%COMP%] .history-items[_ngcontent-%COMP%] .history-item[_ngcontent-%COMP%] .history-detail[_ngcontent-%COMP%] .value.situacao.red[_ngcontent-%COMP%]{color:#db0100}[_nghost-%COMP%] .device-details[_ngcontent-%COMP%] .history[_ngcontent-%COMP%] .history-items[_ngcontent-%COMP%] .history-item[_ngcontent-%COMP%] .history-detail[_ngcontent-%COMP%] .value.situacao.orange[_ngcontent-%COMP%]{color:#db5b00}.device-history-details[_ngcontent-%COMP%]{padding:16px}.device-history-details[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:16px;margin-bottom:16px}.device-history-details[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:14px;margin-right:6px}.device-history-details[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-size:14px;font-weight:700}.device-history-details[_ngcontent-%COMP%] .close-button[_ngcontent-%COMP%]{margin-top:16px}.update-msg-tag[_ngcontent-%COMP%]{padding:16px}.update-msg-tag[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:16px;margin-bottom:16px}.update-msg-tag[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:14px;margin-right:6px}.update-msg-tag[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-size:14px;font-weight:700}.update-msg-tag[_ngcontent-%COMP%] .close-button[_ngcontent-%COMP%]{margin-top:16px}"]});let t=s;return t})();var Qn=()=>[25,50,100];function Yn(t,s){t&1&&(i(0,"th",29),a(1,"Identificador"),n())}function Zn(t,s){if(t&1&&(i(0,"td",30),a(1),n()),t&2){let e=s.$implicit;r(),m(e.identificador||"-")}}function Xn(t,s){t&1&&(i(0,"th",29),a(1,"Motivo"),n())}function Kn(t,s){if(t&1&&(i(0,"td",30),a(1),n()),t&2){let e=s.$implicit;r(),m(e.motivo||"-")}}function Wn(t,s){t&1&&(i(0,"th",29),a(1,"Usu\xE1rio"),n())}function Jn(t,s){if(t&1&&(i(0,"td",30),a(1),n()),t&2){let e=s.$implicit;r(),m(e.usuario||"-")}}function eo(t,s){t&1&&(i(0,"th",29),a(1,"Data In\xEDcio Vig\xEAncia"),n())}function to(t,s){if(t&1&&(i(0,"td",30),a(1),x(2,"date"),n()),t&2){let e=s.$implicit;r(),m(e.dataInicioVigencia?y(2,1,e.dataInicioVigencia,"short"):"-")}}
2function io(t,s){t&1&&(i(0,"th",29),a(1,"Data Fim Vig\xEAncia"),n())}function no(t,s){if(t&1&&(i(0,"td",30),a(1),x(2,"date"),n()),t&2){let e=s.$implicit;r(),m(e.dataFimVigencia?y(2,1,e.dataFimVigencia,"short"):"-")}}function oo(t,s){t&1&&b(0,"tr",31)}function ao(t,s){t&1&&b(0,"tr",32)}var Si=(()=>{let s=class s{constructor(o,l,d,v,A){this.formBuilder=o,this.resourceService=l,this.deviceService=d,this.accountService=v,this.uiService=A,this.useReasonControl=new se(null),this.accrediteds=new X([]),this.datasource=new ci,this.resultsLength=0,this.displayedColumns=["identificador","motivo","usuario","dataInicioVigencia","dataFimVigencia"],this.onDestroy$=new q,this.uiService.setTitle("Consulta de Identificadores Isentados")}ngOnInit(){this.filterForm=this.formBuilder.group({accredited:[null,[D.required]],startDate:[null,[D.required]],endDate:[null,[D.required]]}),this.useReasonControl.valueChanges.pipe(W(this.onDestroy$)).subscribe(o=>{let l=this.resourceService.getAccreditedsByUseReason(o)||[];this.accountService.isInternalUser&&(l=[{id:-1,label:"Todos",name:"Todos"},...l]),this.accrediteds.next(l),this.filterForm.controls.accredited.setValue(null)})}ngAfterViewInit(){this.paginator.page.pipe(W(this.onDestroy$)).subscribe(()=>{this.loadPage()})}ngOnDestroy(){this.onDestroy$.next(),this.onDestroy$.complete()}canConsult(){return It(this.filterForm.value)}applyFilters(){this.canConsult()&&(this.paginator&&(this.paginator.pageIndex=0),this.loadPage())}clearFilters(){this.filterForm.reset(),this.resultsLength=0,this.datasource.data=[]}loadPage(){let o=this.filterForm.value;this.datasource.setLoading(),this.deviceService.getExemptionConsult({dispositivo:"",codConveniado:o.accredited,dataInicialPeriodo:we(o.startDate),dataFinalPeriodo:we(o.endDate),numeroPagina:(this.paginator?.pageIndex||0)+1,totalPagina:this.paginator?.pageSize||25}).pipe(E(()=>(this.datasource.setError(),this.resultsLength=0,S(null))),W(this.onDestroy$)).subscribe(l=>{if(l==null)return;let d=l?.lista??[];this.resultsLength=l?.totalRegistros??d.length,this.datasource.data=d})}};s.\u0275fac=function(l){return new(l||s)(M(ue),M(Ce),M(ye),M(fe),M(xe))},s.\u0275cmp=L({type:s,selectors:[["app-exempted-identifiers"]],viewQuery:function(l,d){if(l&1&&F(U,5),l&2){let v;T(v=H())&&(d.paginator=v.first)}},standalone:!1,decls:42,vars:15,consts:[["picker",""],[3,"formControl"],[1,"flex","flex-col","gap-3","component-container"],[1,"flex","flex-col","gap-3",3,"formGroup"],[1,"flex","flex-col","gap-3","filters","sm:flex-row"],[1,"filter","basis-[40%]","stretch-fields"],["formControlName","accredited","placeholder","Selecione","selectPlaceholder","Pesquisar...","label","Credenciado","displayProperty","label","valueProperty","id",1,"w-full",3,"options","multiple"],[1,"filter","basis-[40%]"],["appearance","outline","floatLabel","always",1,"w-full"],[3,"rangePicker"],["matStartDate","","formControlName","startDate","placeholder","Data in\xEDcio"],["matEndDate","","formControlName","endDate","placeholder","Data fim"],["matIconSuffix","",3,"for"],[1,"flex","items-center","gap-2"],["type","button","mat-stroked-button","",3,"click"],["type","button","color","primary","mat-raised-button","",3,"click","disabled"],[1,"overflow-auto"],["mat-table","",1,"w-full",3,"dataSource"],["matColumnDef","identificador"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","motivo"],["matColumnDef","usuario"],["matColumnDef","dataInicioVigencia"],["matColumnDef","dataFimVigencia"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[3,"datasource"],[3,"pageSize","pageSizeOptions","length"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(l,d){if(l&1){let v=O();b(0,"app-use-reason-selector",1),i(1,"div",2)(2,"form",3)(3,"div",4)(4,"div",5),b(5,"auto-complete",6),n(),i(6,"div",7)(7,"mat-form-field",8)(8,"mat-label"),a(9,"Per\xEDodo"),n(),i(10,"mat-date-range-input",9),b(11,"input",10)(12,"input",11),n(),b(13,"mat-datepicker-toggle",12)(14,"mat-date-range-picker",null,0),n()(),i(16,"div",13)(17,"button",14),g("click",function(){return C(v),f(d.clearFilters())}),a(18,"Limpar"),n(),i(19,"button",15),g("click",function(){return C(v),f(d.applyFilters())}),a(20," Consultar "),n()()()(),i(21,"div",16)(22,"table",17),z(23,18),P(24,Yn,2,0,"th",19)(25,Zn,2,1,"td",20),j(),z(26,21),P(27,Xn,2,0,"th",19)(28,Kn,2,1,"td",20),j(),z(29,22),P(30,Wn,2,0,"th",19)(31,Jn,2,1,"td",20),j(),z(32,23),P(33,eo,2,0,"th",19)(34,to,3,4,"td",20),j(),z(35,24),P(36,io,2,0,"th",19)(37,no,3,4,"td",20),j(),P(38,oo,1,0,"tr",25)(39,ao,1,0,"tr",26),n(),b(40,"app-status-grid",27)(41,"mat-paginator",28),n()()}if(l&2){let v=ie(15);_("formControl",d.useReasonControl),r(2),_("formGroup",d.filterForm),r(3),_("options",d.accrediteds)("multiple",!1),r(5),_("rangePicker",v),r(3),_("for",v),r(6),_("disabled",!d.canConsult()),r(3),_("dataSource",d.datasource),r(16),_("matHeaderRowDef",d.displayedColumns),r(),_("matRowDefColumns",d.displayedColumns),r(),_("datasource",d.datasource),r(),_("pageSize",25)("pageSizeOptions",h(14,Qn))("length",d.resultsLength)}},dependencies:[de,ae,le,re,ce,me,pe,Wt,ei,oi,ti,Jt,ai,ii,ni,li,ri,U,st,dt,ct,mt,pt,ge,ve,he,_e,Me,be,mi,oe],styles:[".component-container[_ngcontent-%COMP%]{padding:1rem}.filters[_ngcontent-%COMP%]{align-items:flex-end}table[_ngcontent-%COMP%]{width:100%}"]});let t=s;return t})();var lo=[{path:"",component:Pi},{path:"exempted-identifiers",component:Si}],Pa=(()=>{let s=class s{};s.\u0275fac=function(l){return new(l||s)},s.\u0275mod=ee({type:s}
2),s.\u0275inj=J({imports:[ot.forChild(lo),Ze,nt,Ht,yt,Dt,si,Ot,ut,it,Mt,Nt,bt,lt,Kt,kt,Qt,Ut,ft,jt,Lt,tt,$t,di,Di,ui,pi]});let t=s;return t})();export{Pa as DevicesModule};
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.