1import{a as he,b as _e,c as ve,d as Z}from"./chunk-4IXQOEUS.js";import"./chunk-QM3YT3DS.js";import"./chunk-L465UC57.js";import"./chunk-2USVT5FT.js";import{a as fe,d as Ce}from"./chunk-E4HC4I63.js";import"./chunk-6EFSS5SN.js";import{a as A}from"./chunk-4ECMMU3L.js";import"./chunk-4J6ZPIF3.js";import"./chunk-J5P3SQBH.js";import"./chunk-DOYC3VWX.js";import"./chunk-VQGXD6LA.js";import"./chunk-XMORBPBT.js";import"./chunk-PDHPWW54.js";import"./chunk-J4GZYN4M.js";import"./chunk-J7MJVDJV.js";import{b as O,c as ge}from"./chunk-KNEGGNPF.js";import"./chunk-BSLF2PSI.js";import"./chunk-L2W5KZ4M.js";import"./chunk-FK53DGED.js";import{b as L,c as le}from"./chunk-QSMLTAW2.js";import"./chunk-EWG4IKI7.js";import"./chunk-WWTA6R3M.js";import{p as N,q as ue}from"./chunk-HPYVQIGE.js";import"./chunk-OGQ3LRRZ.js";import"./chunk-MYMWSNFA.js";import"./chunk-T3B6BFCT.js";import"./chunk-QKKOPOLI.js";import"./chunk-CP2NJQOS.js";import"./chunk-JSENUMIW.js";import"./chunk-64C24FZ6.js";import"./chunk-CO6CFSIT.js";import{b as B,h as E}from"./chunk-ZYQ3KZBT.js";import{a as se,b as R,wa as de}from"./chunk-ZL2ZRVYG.js";import"./chunk-525ZZ4I4.js";import{Eb as ce,I as M,Q as V,ua as j,zb as me}from"./chunk-TLHOSSIT.js";import{$a as P,Ab as h,Ad as U,Bb as ee,Ca as D,Cb as te,Cd as T,Db as oe,Dc as ae,Ed as pe,Fb as _,Gb as v,Hb as n,J as k,Kc as b,N as y,Qb as ie,Qc as ne,Ra as f,Sa as a,Xa as I,Zc as w,_a as S,bc as H,cb as Y,db as $,ja as x,l as J,lb as l,lc as s,m as K,mc as p,rc as re,sa as X,ta as m,ua as c,v as F,vc as g,w as Q,zb as C}from"./chunk-ZBQIVAFP.js";import"./chunk-A6NAT7J4.js";import"./chunk-5Z4AYYDF.js";import"./chunk-KLBUMNC4.js";import"./chunk-S4NCJKJW.js";import"./chunk-SQFOS72N.js";import"./chunk-HEUNYMKC.js";import"./chunk-UJZYFSKP.js";import"./chunk-WTWECZY6.js";import"./chunk-7UHV3KU6.js";import"./chunk-XE6OGKVL.js";import"./chunk-B5PDLB3A.js";import"./chunk-ZEEPLCMG.js";import"./chunk-BNINSQUO.js";import"./chunk-B2IEJXTH.js";import"./chunk-UBSOUGXN.js";import"./chunk-I6H75TGI.js";import{h as z}from"./chunk-B4AJQJMI.js";function je(i,r){if(i&1){let e=_();C(0,"div",2)(1,"vip-compra-desktop",3),v("verProdutos",function(o){m(e);let d=n();return c(d.verProdutos.emit(o))})("responderPerguntas",function(o){m(e);let d=n();return c(d.responderPerguntas.emit(o))})("novaCompra",function(o){m(e);let d=n();return c(d.novaCompra.emit(o))}),h()()}if(i&2){let e=n();f(),l("compra",e.compra)("perguntas",e.perguntas)("resumoFinal",e.resumoFinal)("endereco",e.compra.tipo_entrega.retirada?e.compraEnderecoIsRetirada:e.compra.endereco)("perguntasRespondidas",e.perguntasRespondidas)("isDesktop",!0)("isLoading",e.isLoading)("temRespostas",e.temRespostas)("isRetirada",e.compra.tipo_entrega.retirada)("tipoEntrega",e.compra.tipo_entrega)}}var Re=(()=>{class i extends _e{constructor(e,t){super(),this.cd=e,this.changeDetector=t,this.logoSrc="",this.url_google="",this.steps=[{title:"Entrega",link:"",status:j.COMPLETED},{title:"Pagamento",link:"",status:j.COMPLETED},{title:"Revis\xE3o",link:"",status:j.ACTIVE}]}ngOnChanges(e){e.compra&&this.compra&&this.compra.tipo_entrega.retirada&&this.getCdIsRetirada(this.compra.centro_distribuicao_id)}getCdIsRetirada(e){return z(this,null,function*(){this.cd.getCentroDistribuicaoById(e).subscribe({next:t=>{this.compra&&(this.compraEnderecoIsRetirada={bairro:t.data.endereco.bairro,complemento:t.data.endereco.complemento,endereco_formatado:`${t.data.endereco.logradouro}, nr. ${t.data.endereco.numero} - ${t.data.endereco.bairro} - ${t.data.endereco.cidade}/${t.data.endereco.estado}`,id:t.data.id,logradouro:t.data.endereco.logradouro,numero:t.data.endereco.numero,titulo:t.data.nome},this.changeDetector.detectChanges())}})})}static{this.\u0275fac=function(t){return new(t||i)(a(de),a(g))}}static{this.\u0275cmp=S({type:i,selectors:[["vip-resumo-compra-desktop"]],inputs:{logoSrc:"logoSrc",url_google:"url_google",fallbackImageUrl:"fallbackImageUrl"},standalone:!1,features:[Y,X],decls:2,vars:6,consts:[[3,"logoSrc","fallbackImageUrl","steps","url_google","colorBackground"],["class","content-wrapper",4,"ngIf"],[1,"content-wrapper"],[3,"verProdutos","responderPerguntas","novaCompra","compra","perguntas","resumoFinal","endereco","perguntasRespondidas","isDesktop","isLoading","temRespostas","isRetirada","tipoEntrega"]],template:function(t,o){t&1&&(ee(0,"vip-stepper-desktop",0),$(1,je,2,10,"div",1)),t&2&&(l("logoSrc",o.logoSrc)("fallbackImageUrl",o.fallbackImageUrl)("steps",o.steps)("url_google",o.url_google)("colorBackgroun
1d",!0),f(),l("ngIf",o.compra))},dependencies:[b,ve,fe],styles:["[_nghost-%COMP%]{display:flex;height:100%;flex-direction:column}.content-wrapper[_ngcontent-%COMP%]{display:flex;flex-grow:1;padding-bottom:2.5rem;padding-top:calc(2.5rem + 75px)}"],changeDetection:0})}}return i})();var Fe=()=>[];function Te(i,r){if(i&1){let e=_();te(0),C(1,"vip-compra",2),s(2,"async"),s(3,"async"),s(4,"async"),v("verProdutos",function(){m(e);let o=n();return c(o.handleVerProdutos())})("novaCompra",function(){m(e);let o=n();return c(o.handleNovaCompra())})("responderPerguntas",function(){m(e);let o=n();return c(o.handleClickPerguntas())}),h(),oe()}if(i&2){let e=n();f(),l("compra",p(2,4,e.compra$))("resumoFinal",!0)("perguntas",p(3,6,e.perguntas$)||H(10,Fe))("temRespostas",p(4,8,e.temRespostasResumo$)||!1)}}function Be(i,r){if(i&1){let e=_();C(0,"vip-resumo-compra-desktop",3),s(1,"async"),s(2,"async"),s(3,"async"),s(4,"getURLGoogleSafe"),s(5,"async"),s(6,"async"),s(7,"async"),s(8,"async"),v("verProdutos",function(){m(e);let o=n();return c(o.handleVerProdutos())})("novaCompra",function(){m(e);let o=n();return c(o.handleNovaCompra())})("responderPerguntas",function(o){m(e);let d=n();return c(d.handleClickPerguntas(o))}),h()}if(i&2){let e,t=n();l("logoSrc",p(1,9,t.logo$)||"")("fallbackImageUrl",p(2,11,t.logoFallback$)||"")("url_google",p(4,15,(e=p(3,13,t.filial$))==null?null:e.site_url))("compra",p(5,17,t.compra$))("resumoFinal",!0)("perguntasRespondidas",t.perguntasRespondidas)("perguntas",p(6,19,t.perguntas$)||H(25,Fe))("temRespostas",p(7,21,t.temRespostasResumo$)||!1)("isLoading",p(8,23,t.isLoading$)||!1)}}var G=class W{constructor(r,e,t,o,d,ye,xe,De,Ie,Se,Pe,$e,be,we){this.compraFacade=r,this.activatedRoute=e,this.router=t,this.perguntasFacade=o,this.analyticsFacade=d,this.ngZone=ye,this.layoutUtilsService=xe,this.layoutStore=De,this.bucketsFacade=Ie,this.filialFacade=Se,this.headerUtilsService=Pe,this.changeDetector=$e,this.document=be,this._renderer2=we,this.filialId=0,this.filial$=this.filialFacade.filial$,this.compra$=this.compraFacade.compra$.pipe(F(u=>u||null)),this.taxaServico$=this.compraFacade.taxaServico$.pipe(F(u=>u||null)),this.perguntas$=this.perguntasFacade.perguntasDoResumo$,this.temRespostasResumo$=this.perguntasFacade.temRespostasResumo$,this.isLoading$=Q([this.compraFacade.loading$.pipe(y()),this.perguntasFacade.loading$.pipe(y())]).pipe(F(u=>u.some(Me=>Me))),this.taxaServico=null,this.isDesktop=this.layoutUtilsService.isDesktop(),this.logo$=this.headerUtilsService.getLogo(this.bucketsFacade.bucketS3$,this.filial$),this.logoFallback$=this.headerUtilsService.getLogoFallback(this.bucketsFacade.bucketS3$),this.perguntasRespondidas=!1,this.filial$.pipe(R(this)).subscribe(u=>{this.filialId=u.id}),this.trackOrder()}ngOnInit(){let r=this.activatedRoute.snapshot.params.compra;this.perguntas$.pipe(k(1),R(this)).subscribe(e=>{e.length==0?setTimeout(()=>{this.perguntasFacade.getPerguntas()},300):this.compraFacade.getPerguntasCompraComResposta(r)}),this.compraFacade.selectCompra(r),this.layoutStore.setHeaderVisibility(!1),this.compraFacade.compra$.pipe(y(),R(this)).subscribe(e=>{e?this.analyticsFacade.pagamento(e):this.compraFacade.getCompra(r)})}handleVerProdutos(){let r=this.activatedRoute.snapshot.params.compra;this.ngZone.run(()=>{this.router.navigateByUrl(`/minha-conta/detalhes-compra/${r}/itens`)})}handleNovaCompra(){this.ngZone.run(()=>{this.router.navigateByUrl("/loja"),this.perguntasFacade.limparRespostas()})}handleClickPerguntas(r){let e=this.activatedRoute.snapshot.params.compra;r?(this.perguntasFacade.responderPerguntasResumo(r,e),this.perguntasFacade.perguntasRespondidasSuccess$.pipe(k(1),R(this)).subscribe(()=>{this.perguntasRespondidas=!0,this.changeDetector.detectChanges()}),window.scrollTo({top:0,behavior:"smooth"})):this.ngZone.run(()=>{this.router.navigate(["/resumo-compra/perguntas/resumo"],{queryParams:{idCompra:e}})})}trackOrder(){!this.router.getCurrentNavigation()?.extras.state?.trackOrder||!this.isDesktop||this.filial$.pipe(k(1)).subscribe(t=>{this.applyConversion(t)})}applyConversion(r){if(r.id&&r.google_adwords){let e=this.document.querySelector("vip-compra-resumo-final-container"),t=this.document.createRange().createContextualFragment(r.google_adwords.replace("conversion.js","conversion_async.js"));this._renderer2.appendChild(e,t)}}static{this.\u0275fac=function(e){return new(e||W)(a(O),a(U),a(T),a(L),a(N),a(D),a(M),a(A),a(B),a(E),a(V),a(g),a(ae),a(I))}}static{this.\u0275cmp=S({type:W,selectors:[["vip-compra-resumo-final-container"]],standalone:!1,decls:3,vars:2,consts:[["desktopTemplate",""],[4,"ngIf","ngIfElse"],[1,"vip-page-content",3,"verProdutos","novaCompra","responderPerguntas","compra","resumoFinal","perguntas","temRespostas"],[3,"verProdutos","novaCompra","responderPerguntas","logoSrc","fallbackImageUrl","url_google","compra","resumoFinal","perguntasRespondidas","perguntas","temRespostas","isLoading"]],template:function(e,t){if(e&1&&$(0,Te,5,11,"ng-container",1)(1,Be,9,26,"ng-template",null,0,re),e&2){let o=ie(2);l("ngIf",!t.isDesktop)("ngIfElse",o)}},dependencies:[b,he,Re,ne,me],encapsulation:2,changeDetection:0})}};G=J([se(),K("design:paramtypes",[O,U,T,L,N,D,M,A,B,E,V,g,Document,I])],G);var ke=(()=>
1{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=P({type:i})}static{this.\u0275inj=x({imports:[w,Z,Ce]})}}return i})();var Bt=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=P({type:i})}static{this.\u0275inj=x({imports:[w,Z,ce,ge,ue,ke,le,pe.forChild([{path:"",component:G}])]})}}return i})();export{Bt as CompraResumoFinalContainerModule};
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.