1import{a as K}from"./chunk-MJO25K6H.js";import"./chunk-6AT5A2BN.js";import{j as G}from"./chunk-5VBVN4XO.js";import{f as H}from"./chunk-UYODVI7O.js";import"./chunk-MOXDLQT4.js";import"./chunk-VLJ55T5Q.js";import{a as j}from"./chunk-ZACTTJ4S.js";import{c as V,e as q}from"./chunk-EKU7OH35.js";import"./chunk-V2PPMFND.js";import{$a as v,Cb as A,Da as S,Db as O,Fb as B,Ha as D,Ib as _,Lb as b,Mb as M,Nb as o,Ob as i,Pb as h,Tb as z,Vb as k,Wb as s,ba as w,db as n,fc as a,gc as c,gd as F,hc as C,ic as y,jd as U,kd as $,ma as I,md as N,na as T,pb as E,pc as R,uc as d,vb as u,vc as m,wc as g}from"./chunk-5SAOKRHL.js";import{g as P}from"./chunk-NZN5XTIE.js";var L=t=>({ref:t}),Y=(t,r)=>r.description,J=(t,r)=>r.clave;function Q(t,r){t&1&&(o(0,"p"),a(1),d(2,"translate"),i()),t&2&&(n(),c(m(2,1,"account.loading")))}function W(t,r){t&1&&(o(0,"span",7),a(1),d(2,"translate"),i()),t&2&&(n(),c(m(2,1,"account.orders.shipment."+r)))}function X(t,r){if(t&1&&(o(0,"li",16),a(1),d(2,"translate"),i()),t&2){let e=r.$implicit;B("wr-aod__pickup-step--done",e.hecho)("wr-aod__pickup-step--now",e.actual),A("data-cy","pickup-step-"+e.clave),n(),C(" ",m(2,6,"account.orders.pickup."+e.clave)," ")}}function Z(t,r){if(t&1&&(o(0,"ol",8),b(1,X,3,8,"li",15,J),i()),t&2){let e=s(3);n(),M(e.hitosDeRecogida(r))}}function tt(t,r){if(t&1&&a(0),t&2){let e=s(2);C(" (",e.code,") ")}}function et(t,r){if(t&1&&(o(0,"a",17),a(1),d(2,"translate"),u(3,tt,1,1),i()),t&2){let e=s();O("href",e.url,v),n(),C(" ",e.carrier||m(2,3,"account.orders.trackIt")," "),n(2),_(e.code?3:-1)}}function nt(t,r){if(t&1&&(o(0,"strong"),a(1),i()),t&2){let e=s();n(),y("",e.carrier," ",e.code,"")}}function it(t,r){t&1&&(o(0,"div",9)(1,"span"),a(2),d(3,"translate"),i(),u(4,et,4,5,"a",17)(5,nt,2,2,"strong"),i()),t&2&&(n(2),c(m(3,2,"account.orders.tracking")),n(2),_(r.url?4:5))}function ot(t,r){if(t&1&&h(0,"img",18),t&2){let e=s().$implicit,p=s(3);O("src",p.imageUrl(e.imageResourceId),v)}}function at(t,r){t&1&&h(0,"span",19)}function rt(t,r){if(t&1&&(o(0,"li",11),u(1,ot,1,1,"img",18)(2,at,1,0,"span",19),o(3,"div",20)(4,"strong"),a(5),i(),o(6,"span"),a(7),d(8,"currency"),i()(),o(9,"span",21),a(10),d(11,"currency"),i()()),t&2){let e=r.$implicit,p=s();n(),_(e.imageResourceId?1:2),n(4),c(e.description),n(2),y("",e.quantity," \xD7 ",g(8,5,e.unitPrice,p.currency),""),n(3),c(g(11,8,e.lineTotal,p.currency))}}function dt(t,r){if(t&1&&(o(0,"div")(1,"dt"),a(2),d(3,"translate"),i(),o(4,"dd"),a(5),d(6,"currency"),i()()),t&2){let e=s();n(2),c(m(3,2,"account.orders.discount")),n(3),C("\u2212",g(6,4,e.discountTotal,e.currency),"")}}function ct(t,r){if(t&1&&(o(0,"div")(1,"dt"),a(2),d(3,"translate"),i(),o(4,"dd"),a(5),d(6,"currency"),i()()),t&2){let e=s();n(2),c(m(3,2,"account.orders.shipping")),n(3),c(g(6,4,e.shippingCost,e.currency))}}function lt(t,r){if(t&1&&(o(0,"div")(1,"dt"),a(2),d(3,"translate"),i(),o(4,"dd"),a(5),d(6,"currency"),i()(),o(7,"div",22)(8,"dt"),a(9),d(10,"translate"),i(),o(11,"dd"),a(12),d(13,"currency"),i()()),t&2){let e=s();n(2),c(m(3,4,"cart.serviceFee")),n(3),c(g(6,6,e.platformSurcharge,e.currency)),n(4),c(m(10,9,"cart.totalToPay")),n(3),c(g(13,11,e.chargedTotal,e.currency))}}function pt(t,r){if(t&1&&a(0),t&2){let e=s();C(", ",e.line2,"")}}function _t(t,r){if(t&1&&a(0),t&2){let e=s();C(", ",e.province,"")}}function st(t,r){if(t&1&&(o(0,"div",13)(1,"h3"),a(2),d(3,"translate"),i(),o(4,"p"),a(5),u(6,pt,1,1),h(7,"br"),a(8),u(9,_t,1,1),i()()),t&2){let e=r;n(2),c(m(3,6,"account.orders.shipTo")),n(3),C(" ",e.line1,""),n(),_(e.line2?6:-1),n(2),y(" ",e.postalCode," ",e.city,""),n(),_(e.province?9:-1)}}function mt(t,r){if(t&1){let e=z();o(0,"button",23),k("click",function(){I(e);let x=s(),f=s(2);return T(f.invoice(x))}),a(1),d(2,"translate"),i()}t&2&&(n(),C(" ",m(2,1,"account.orders.downloadInvoice")," "))}function xt(t,r){if(t&1&&(o(0,"header",3)(1,"div")(2,"h2"),a(3),d(4,"translate"),i(),o(5,"p",4),a(6),d(7,"date"),i()(),o(8,"div",5)(9,"span",6),a(10),d(11,"translate"),i(),u(12,W,3,3,"span",7),i()(),u(13,Z,3,0,"ol",8)(14,it,6,4,"div",9),o(15,"ul",10),b(16,rt,12,11,"li",11,Y),i(),o(18,"dl",12),u(19,dt,7,7,"div")(20,ct,7,7,"div"),o(21,"div")(22,"dt"),a(23),d(24,"translate"),i(),o(25,"dd"),a(26),d(27,"currency"),i()(),u(28,lt,14,14),i(),u(29,st,10,8,"div",13)(30,mt,3,3,"button",14)),t&2){let e,p,x,f,l=r;n(3),c(g(4,13,"account.orders.number",R(26,L,l.reference))),n(3),c(g(7,16,l.createdAt,"dd/MM/yyyy HH:mm")),n(4),c(m(11,19,"account.orders.status."+l.status)),n(2),_((e=l.shipmentStatus)?12:-1,e),n(),_((p=l.pickupProgress)?13:-1,p),n(),_((x=l.tracking)?14:-1,x),n(2),M(l.lines),n(3),_(l.discountTotal>0?19:-1),n(),_(l.shippingCost>0?20:-1),n(3),c(m(24,21,"cart.subtotal")),n(3),c(g(27,23,l.grandTotal,l.currency)),n(2),_(l.platformSurcharge>0?28:-1),n(),_((f=l.shippingAddress)?29:-1,f),n(),_(l.invoiceAvailable?30:-1)}}function ut(t,r){t&1&&(o(0,"p",2),a(1),d(2,"translate"),i()),t&2&&(n(),c(m(2,1,"account.orders.notFound")))}function Ct(t,r){if(t&1&&u(0,xt,31,28)(1,ut,3,3,"p",2),t&2){let e,p=s();_((e=p.order())?0:1,e)}}var Tt=(()=>{class t{constructor(){this.store=w(K),this.order=S(null),this.route=w(H),this.nav=w(G),this.platformId=w(D)}hitosDeRecogida(e){let p=["PREPARING","IN_TRANSIT_TO_STORE","READY_FOR_PICKUP"],x=p.indexOf(e);return p.map((f,l)=>({clave:f,hecho:x>=0&&l<x,actual:l===x}))}ngOnInit(){return P(this,null,function*(){if(!N(this.platformId))return;
1let e=this.route.snapshot.paramMap.get("id");e&&this.order.set(yield this.store.loadOrder(e))})}ordersHref(){return this.nav.href("/account/orders")}backToOrders(e){e.preventDefault(),this.nav.go("/account/orders")}imageUrl(e){return`${j.apiUrl}/api/app/resources/${e}/file`}invoice(e){return P(this,null,function*(){yield this.store.downloadInvoice(e.id)})}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275cmp=E({type:t,selectors:[["wr-account-order-detail"]],decls:6,vars:5,consts:[[1,"wr-aod"],[1,"wr-aod__back",3,"click","href"],[1,"wr-aod__empty"],[1,"wr-aod__head"],[1,"wr-aod__date"],[1,"wr-aod__states"],[1,"wr-aod__status"],[1,"wr-aod__shipment"],["data-cy","pickup-progress",1,"wr-aod__pickup"],[1,"wr-aod__tracking"],[1,"wr-aod__lines"],[1,"wr-aod__line"],[1,"wr-aod__totals"],[1,"wr-aod__block"],["type","button",1,"wr-aod__cta"],[1,"wr-aod__pickup-step",3,"wr-aod__pickup-step--done","wr-aod__pickup-step--now"],[1,"wr-aod__pickup-step"],["target","_blank","rel","noopener noreferrer",3,"href"],["alt","","loading","lazy",1,"wr-aod__thumb",3,"src"],["aria-hidden","true",1,"wr-aod__thumb","wr-aod__thumb--empty"],[1,"wr-aod__linetext"],[1,"wr-aod__linetotal"],[1,"wr-aod__grand"],["type","button",1,"wr-aod__cta",3,"click"]],template:function(p,x){p&1&&(o(0,"section",0)(1,"a",1),k("click",function(l){return x.backToOrders(l)}),a(2),d(3,"translate"),i(),u(4,Q,3,3,"p")(5,Ct,2,1),i()),p&2&&(n(),O("href",x.ordersHref(),v),n(),C(" \u2190 ",m(3,3,"account.tabs.orders")," "),n(2),_(x.store.busy()&&!x.order()?4:5))},dependencies:[$,U,F,q,V],styles:['@charset "UTF-8";.wr-aod[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;max-width:620px}.wr-aod__back[_ngcontent-%COMP%]{font-size:13px;color:inherit;opacity:.7;text-decoration:none;align-self:flex-start}.wr-aod__back[_ngcontent-%COMP%]:hover{opacity:1;text-decoration:underline}.wr-aod__empty[_ngcontent-%COMP%]{opacity:.7;margin:0}.wr-aod__head[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.wr-aod[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:18px;font-family:var(--wr-font-heading, inherit)}.wr-aod__date[_ngcontent-%COMP%]{margin:3px 0 0;font-size:13px;opacity:.65}.wr-aod__states[_ngcontent-%COMP%]{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.wr-aod__shipment[_ngcontent-%COMP%]{font-size:13px;font-weight:600;padding:2px 10px;border-radius:999px;background:color-mix(in srgb,var(--wr-primary, #004793) 14%,transparent)}.wr-aod__pickup[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem;list-style:none;margin:.75rem 0 0;padding:0}.wr-aod__pickup-step[_ngcontent-%COMP%]{padding:.25rem .625rem;border-radius:999px;border:1px solid currentColor;font-size:.8125rem;opacity:.45}.wr-aod__pickup-step--done[_ngcontent-%COMP%]{opacity:.8}.wr-aod__pickup-step--now[_ngcontent-%COMP%]{opacity:1;font-weight:700}.wr-aod__status[_ngcontent-%COMP%]{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.02em;background:color-mix(in srgb,currentColor 10%,transparent);border-radius:999px;padding:4px 11px;white-space:nowrap}.wr-aod__tracking[_ngcontent-%COMP%]{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:14px;background:color-mix(in srgb,var(--wr-primary, #004793) 8%,transparent);border-radius:10px;padding:11px 13px}.wr-aod__tracking[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--wr-primary, #004793);font-weight:600}.wr-aod__lines[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px}.wr-aod__line[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.wr-aod__thumb[_ngcontent-%COMP%]{width:52px;height:52px;border-radius:9px;object-fit:cover;flex:0 0 auto}.wr-aod__thumb--empty[_ngcontent-%COMP%]{background:color-mix(in srgb,currentColor 8%,transparent);display:block}.wr-aod__linetext[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:3px;font-size:14px}.wr-aod__linetext[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{opacity:.7;font-size:13px}.wr-aod__linetotal[_ngcontent-%COMP%]{font-size:14px;white-space:nowrap}.wr-aod__totals[_ngcontent-%COMP%]{margin:0;display:flex;flex-direction:column;gap:6px;font-size:14px}.wr-aod__totals[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:12px}.wr-aod__totals[_ngcontent-%COMP%] dt[_ngcontent-%COMP%], .wr-aod__totals[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0}.wr-aod__totals[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{opacity:.7}.wr-aod__grand[_ngcontent-%COMP%]{font-weight:700;border-top:1px solid color-mix(in srgb,currentColor 14%,transparent);padding-top:6px}.wr-aod__grand[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{opacity:1}.wr-aod__block[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 4px;font-size:14px}.wr-aod__block[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:14px;opacity:.8;line-height:1.45}.wr-aod__cta[_ngcontent-%COMP%]{align-self:flex-start;border:1px solid color-mix(in srgb,currentColor 22%,transparent);background:none;color:inherit;border-radius:10px;padding:10px 16px;font-family:inherit;font-size:14px;cursor:pointer}.wr-aod__cta[_ngcontent-%COMP%]:hover{background:color-mix(in srgb,currentColor 8%,transparent)}'],changeDetection:0})}}return t})();export{Tt as AccountOrderDetailComponent};
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.