PageSourceSearch

https://www.primalex.eu/chunk-IWMVMVCP.js

js primalex.eu collected 2026-10-09 17:09:32 UTC 154,947 bytes, 33 lines download raw bytes

1import{a as Vi,c as Hi,d as _o,e as Cr,f as $i,g as Sr,h as go,i as vr,j as yr,k as Dr,l as Ze}from"./chunk-2MN4SMA4.js";import{a as Ui}from"./chunk-QJJ7SIR7.js";import{a as gr}from"./chunk-Q22WCJC5.js";import{b as jn}from"./chunk-6UMFXTLI.js";import{f as Ie}from"./chunk-NENT3XC3.js";import{c as qn}from"./chunk-ZDRPI3JU.js";import{a as ki,b as _r}from"./chunk-XQYRSRZ6.js";import{a as hr}from"./chunk-4IVYZC6C.js";import{A as ho,B as Kn,Ba as ir,C as Je,Ca as or,D as He,Da as nr,E as xi,Eb as Xe,Ia as Nt,Ib as pr,Ja as Qe,Ka as Ni,Mb as Bi,Nb as ur,Ob as Lt,P as Yn,Sb as fr,Ua as Li,Y as zn,Z as Wn,_a as rr,ab as Fi,ba as Jn,ca as Qn,da as Xn,fa as bi,ha as Zn,hb as ar,ia as er,kb as oe,la as At,ma as Ii,na as Ei,nb as sr,p as Gn,pa as Ri,q as Rt,qb as lr,r as Pt,rb as ct,s as fo,sa as Pi,sb as wi,tb as cr,ub as dr,v as ce,w as Ve,wa as Ai,xa as tr,xb as mr,z as Ht,zb as Mi}from"./chunk-2EGU7YKH.js";import"./chunk-XXJ5KP6J.js";import{a as $n}from"./chunk-CAQC7JX5.js";import"./chunk-OQSEJWXG.js";import"./chunk-LB2SIPUX.js";import"./chunk-YU5IEYKE.js";import"./chunk-TNG3WTDY.js";import"./chunk-DBPN64ZI.js";import"./chunk-PXIE55XG.js";import{a as Vn,c as Hn}from"./chunk-QGBSX6B5.js";import"./chunk-XXVB45L4.js";import"./chunk-76J53O4D.js";import"./chunk-7IEHGNLB.js";import{a as me,d as Et,h as Ue,i as Bn,j as be,k as kn,m as P,r as Ti}from"./chunk-P5CCJ2SN.js";import{a as Un}from"./chunk-NEQO7ITA.js";import"./chunk-ILIGNJRC.js";import{a as Dt,c as gi,d as Ot,h as vi,m as bt}from"./chunk-FM5MQBX4.js";import"./chunk-KJ2DTZTE.js";import{a as It}from"./chunk-XJNXF36J.js";import"./chunk-OQWTUUQ3.js";import{a as G}from"./chunk-3RKFVFMW.js";import{a as Tn,o as xn,q as bn}from"./chunk-6LRNCJRQ.js";import"./chunk-BYUXZABT.js";import{Da as Pn,Ea as An,Eb as Mn,Ja as Nn,Va as Ln,_a as Fn,d as Tt,e as xt,h as Ci,i as gn,k as xe,m as Si,n as vn,o as yn,p as Dn,pb as Oi,q as On,qb as We,r as In,xb as wn,ya as En,za as Rn}from"./chunk-CSKO464Y.js";import{A as Di,m as yi,z as M}from"./chunk-RFZ65DFT.js";import{m as ke,o as mn,p as pn,q as _i}from"./chunk-ZAELU3GP.js";import{a as Xo,b as un,c as fn,d as hn,e as _n}from"./chunk-KCBWTIVH.js";import{a as hi,b as le,c as uo}from"./chunk-Q7LOV5U2.js";import"./chunk-GSJIPMUW.js";import"./chunk-2D6KGTZB.js";import"./chunk-ZS7OWNSY.js";import"./chunk-DIZWDXBB.js";import{E as fi,Q as Te,aa as Cn,ba as Sn}from"./chunk-Q4MTVQC2.js";import{b as Y}from"./chunk-RRAYDVNW.js";import{Cb as vt,Cd as ui,Ea as qe,Fc as De,Ia as nn,Id as cn,Md as yt,Na as C,Xd as Ye,Yd as ze,Zd as Be,a as te,b as pi,c as b,da as tn,hd as sn,ja as on,kc as rn,lc as Me,ma as q,nc as an,nd as ln,ne as lt,oe as dn,pe as Q,qe as ie,uc as ge,xe as Oe}from"./chunk-WGWIBZ2L.js";import{$ as Jt,$b as w,$c as _,Ac as J,Bc as U,Ca as Eo,Cc as li,D as x,E as $,Ec as je,Fa as A,Fc as j,Ga as N,Gb as Ee,Gc as Re,Ha as so,Hb as ti,Hc as ci,Ia as Ro,Ib as h,Ic as jo,Ja as fe,Jb as Mo,K as To,Ka as Po,Kb as _t,L as xo,La as Le,Lb as ii,Lc as qo,Mb as oi,Na as Ao,Ob as f,Oc as g,Oe as ye,Pa as Xt,Pc as v,Pe as en,Q as X,Qa as D,Qb as Fe,Qc as H,Rb as Se,Sb as ve,T as ue,Ta as ee,Tb as c,Tc as mo,Ub as d,Va as No,Vb as T,Wb as Ut,Xb as Vt,Yb as _e,Yc as st,Z,Zb as k,a as zt,ab as Zt,ac as s,ad as Yo,ca as $e,cb as kt,db as ae,dc as ni,dd as Ct,de as Zo,eb as Lo,ec as gt,fc as Bo,g as Wt,gc as co,gd as zo,gf as po,hb as a,hd as Wo,ib as ft,ic as ko,ja as bo,jc as Uo,kc as Vo,l as Ge,la as Io,lb as se,lc as ri,ld as di,ma as L,mc as Ho,md as St,nb as Fo,nc as ai,oc as at,pb as lo,pc as p,qa as ne,qb as wo,qc as O,qd as mi,rc as y,sc as si,tb as E,td as Jo,ua as W,ub as ei,ud as Qo,v as Do,va as Qt,vb as Ke,w as K,wc as $o,x as Oo,xb as ht,xc as Go,ya as l,yc as Ko,ye as we,zb as m,zc as re}from"./chunk-6LP6WHZQ.js";import{a as B,b as V,k as Yt}from"./chunk-5KTCK5IS.js";var Or={items:[],pageNumber:0,pageSize:0,pagesCount:0,totalItemsCount:0};var dt=(()=>{class t{constructor(){this.templateKey=D.required({alias:"ppgDynamicTableCellTemplate"}),this.template=l(ft)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=Ke({type:t,selectors:[["ng-template","ppgDynamicTableCellTemplate",""]],inputs:{templateKey:[1,"ppgDynamicTableCellTemplate","templateKey"]},standalone:!1})}}return t})();var mt=(()=>{class t{constructor(){this.template=l(ft)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=Ke({type:t,selectors:[["ng-template","ppgDynamicTableHeaderActions",""]],standalone:!1})}}return t})();var pt=(()=>{class t{constructor(){this.template=l(ft)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=Ke({type:t,selectors:[["ng-template","ppgDynamicTableHeaderFilters",""]],standalone:!1})}}return t})();var fa=(t,r,e,i)=>({cell:t,row:r,index:e,column:i}),ha=(t,r)=>r.id;function _a(t,r){t&1&&_e(0)}function ga(t,r){t&1&&(Ut(0,4),m(1,_a,1,0,"ng-container",6),Vt()),t&2&&(a(),h("ngTemplateOutlet",r.template))}function Ca(t,r){t&1&&_e(0)}function Sa(t,r){t&1&&(Ut(0,5),m(1,Ca,1,0,"ng-container",6),Vt()),t&2&&(a(),h("ngTemplateOutlet",r.template))}function va(t,r){if(t&1){let e=k();c(0,"ppg-table-header",3),w("searchChange",function(o){A(e),s();let n=U(2);return N(n==null||n.search==null?null:n.search.onSearch(o))}),m(1,ga,2,1,"ng-container",4)(2,Sa,2,1,"ng-container",5),d()}if(t&2){let e,i,o=s(),n=U(2);h("searchPlaceholder",n!=null&&n.search?o.resolveText(n==null||n.search==null?null:n.search.placeholder):void 0)("title",o.resolveText(n==null?null:n.title))("titleIcon",n==null?null:n.titleIcon),a(),f((e=o.headerFiltersTemplate())?1:-1,e),a(),f((i=o.headerActionsTemplate())?2:-1,i)}}function ya(t,r){if(t&1&&_e(0,8),t&2){let e=s(),i=e.cell,o=e.row,n=e.index,u=s(2).$implicit;h("ngTemplateOutlet",u.cellTemplate)("ngTemplateOutletContext",jo(2,fa,i,o,n,u))}}function Da(t,r){if(t&1&&(c(0,"div"),p(1),d()),t&2){let e=s().cell,i=s(2).$implicit;oi(i.cellClass),a(),O(e)}}function Oa(t,r){if(t&1&&m(0,ya,1,7,"ng-container",8)(1,Da,2,3,"div",9),t&2){let e=s(2).$implicit;f(e.cellTemplate?0:e.cellClass?1:-1)}}function Ta(t,r){t&1&&m(0,Oa,2,1,"ng-template",7)}function xa(t,r){if(t&1&&(c(0,"ppg-table-column",2),m(1,Ta,1,0,null,7),d()),t&2){let e,i,o=r.$implicit,n=s();h("title",n.resolveText(o.title))("field",o.field)("sortable",o.sortable)("showColumnTitleOnMobile",(e=o.showColumnTitleOnMobile)!==null&&e!==void 0?e:!0)("styleClass",(i=o.styleClass)!==null&&i!==void 0?i:null),a(),f(o.cellTemplate||o.cellClass?1:-1)}}var Gi=(()=>{class t{constructor(){this.config=D.required(),this.tableDataTestId=D(""),this.cellTemplates=wo(dt),this.headerFiltersTemplate=lo(pt),this.headerActionsTemplate=lo(mt),this.defaultPageSizes=[10,20,50,100],this.tableData=_(()=>this.config().data??Or),this.visibleColumns=_(()=>{let e=new Map(this.cellTemplates().map(i=>[i.templateKey(),i.template]));return this.config().columns.filter(i=>i.isVisible?.()??!0).map(i=>V(B({},i),{cellTemplate:i.templateKey?e.get(i.templateKey):void 0}))}),this.header=_(()=>this.config().header),this.hasHeader=_(()=>!!this.header()||!!this.headerFiltersTemplate()||!!this.headerActionsTemplate())}resolveText(e){if(e)return e.translate?lt(e.value):e.value}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["ppg-dynamic-table"]],contentQueries:function(i,o,n){i&1&&(ri(n,o.cellTemplates,dt,4),ri(n,o.headerFiltersTemplate,pt,5),ri(n,o.headerActionsTemplate,mt,5)),i&2&&ai(3)},inputs:{config:[1,"config"],tableDataTestId:[1,"tableDataTestId"]},standalone:!1,decls:7,vars:14,consts:[["behavior","card-to-table",3,"pageSizeChange","pageNumberChange","sortChange","paginatorPhoneVersion","data","loading","noRecordsMessage","showPaginator","pageSizes","forceMobileView","itemActivePredicate","tableStyleClass","styleClass"],[3,"searchPlaceholder","title","titleIcon"],[3,"title","field","sortable","showColumnTitleOnMobile","styleClass"],[3,"searchChange","searchPlaceholder","title","titleIcon"],["ngProjectAs","[tableHeaderFilters]",5,["","tableHeaderFilters",""]],["ngProjectAs","[tableHeaderActions]",5,["","tableHeaderActions",""]],[4,"ngTemplateOutlet"],["appColumnTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"class"]],template:function(i,o){if(i&1){let n=k();re(0)(1)(2),c(3,"ppg-table",0),w("pageSizeChange",function(S){A(n);let I=U(0);return N(I.onPageSizeChange(S))})("pageNumberChange",function(S){A(n);let I=U(0);return N(I.onPageNumberChange(S))})("sortChange",function(S){A(n);let I=U(0);return N(I.onSortChange(S))}),m(4,va,3,5,"ppg-table-header",1),Se(5,xa,2,6,"ppg-table-column",2,ha),d()}if(i&2){let n,u,S,I=J(o.config()),F=o.tableData();a(2),J(o.header()),a(),h("paginatorPhoneVersion",I.paginatorPhoneVersion)("data",F)("loading",I.loading)("noRecordsMessage",o.resolveText(I.noRecordsMessage))("showPaginator",(n=I.showPaginator)!==null&&n!==void 0?n:!0)("pageSizes",(u=I.pageSizes)!==null&&u!==void 0?u:o.defaultPageSizes)("forceMobileView",(S=I.forceMobileView)!==null&&S!==void 0?S:!1)("itemActivePredicate",I.itemActivePredicate)("tableStyleClass",I.tableStyleClass)("styleClass",I.styleClass),Ee("data-test-id",o.tableDataTestId()),a(),f(o.hasHeader()?4:-1),a(),ve(o.visibleColumns())}},dependencies:[di,mr,dr,pr,cr],encapsulation:2,changeDetection:0})}}return t})();function Ea(t,r){if(t&1&&(c(0,"h3",3),p(1),d()),t&2){let e=s().$implicit,i=s(2);a(),y(" ",i.isHomeDelivery()?e("DELIVERY_CONTACT"):e("PICK_UP_CONTACT")," ")}}function Ra(t,r){if(t&1&&(c(0,"p-card",0),m(1,Ea,2,1,"ng-template",2),c(2,"div"),p(3),d(),c(4,"div"),p(5),g(6,"digitsOnly"),g(7,"mask"),d(),c(8,"div"),p(9),d()()),t&2){let e=s(2);a(3),O(e.info().fulfillmentContactInfo.name),a(2),y(" ",H(7,5,v(6,3,e.info().fulfillmentContactInfo.phone),e.info().fulfillmentContactInfo.fieldAttributes.mask)," "),a(4),O(e.info().fulfillmentContactInfo.email)}}function Pa(t,r){t&1&&m(0,Ra,10,8,"p-card",1),t&2&&h("translocoRead","ORDERS.DETAILS")}var et=(()=>{class t{constructor(){this.info=D.required(),this.isHomeDelivery=_(()=>this.info().shippingMethodName===P.Delivery||this.info().shippingMethodName===P.NShift&&this.info().deliveryInfo?.type===Wn.Home)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["ppg-fulfillment-info-contact"]],inputs:{info:[1,"info"]},standalone:!1,decls:1,vars:1,consts:[["data-test-id","orderDetails.deliveryOrPickU
1pContact"],["data-test-id","orderDetails.deliveryOrPickUpContact",4,"transloco","translocoRead"],["pTemplate","title"],[1,"m-0","p-0","fulfillment-info-card-title"]],template:function(i,o){i&1&&m(0,Pa,1,1,"p-card",0),i&2&&f(o.info().displaySetting.showContactInfo?0:-1)},dependencies:[Q,q,M,Bi,vi],styles:[".fulfillment-info-card-title[_ngcontent-%COMP%]{font-size:var(--typography-font_size-20, 20px)}"]})}}return t})();var Aa=()=>({dateStyle:"medium"});function Na(t,r){if(t&1&&(c(0,"h3",7),p(1),g(2,"transloco"),d()),t&2){let e=s(3);a(),O(v(2,1,e.shippingMethodDateKey()))}}function La(t,r){if(t&1&&T(0,"app-time-slot",5),t&2){let e=s(3);h("timeSlot",e.info().fulfillmentTimeSlot)("zoneAbbreviation",e.info().timeZoneAbbreviation)}}function Fa(t,r){if(t&1&&T(0,"app-time-slot",6),t&2){let e=s(3);h("timeSlot",e.info().fulfillmentTimeSlot)}}function wa(t,r){if(t&1&&(c(0,"p-card",0),m(1,Na,3,3,"ng-template",2),c(2,"div",3),p(3),g(4,"fulfillmentDatePipe"),g(5,"translocoDate"),d(),c(6,"div",4),m(7,La,1,2,"app-time-slot",5)(8,Fa,1,1,"app-time-slot",6),d()()),t&2){let e=s(2);a(3),y(" ",H(5,4,v(4,2,e.info().fulfillmentDateTime),je(7,Aa))," "),a(4),f(e.info().showTimeZone?7:8)}}function Ma(t,r){t&1&&m(0,wa,9,8,"p-card",1),t&2&&h("translocoRead","ORDERS.DETAILS")}var Er={[P.Delivery]:"ORDERS.CREATE_ORDER.FORM.DELIVERY_DATE",[P.PickUp]:"ORDERS.CREATE_ORDER.FORM.PICKUP_DATE",[P.ParcelLocker]:"ORDERS.CREATE_ORDER.FORM.PARCEL_LOCKER_DATE"},ji=(()=>{class t{constructor(){this.info=D.required(),this.shippingMethodDateKey=_(()=>{let e=this.info().shippingMethodName;return Er[e]??Er[P.ParcelLocker]})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["ppg-fulfillment-info-date"]],inputs:{info:[1,"info"]},standalone:!1,decls:1,vars:1,consts:[["data-test-id","orderDetails.deliveryOrPickUpDate"],["data-test-id","orderDetails.deliveryOrPickUpDate",4,"transloco","translocoRead"],["pTemplate","title"],["data-test-id","orderDetails.order_details_Date"],["data-test-id","orderDetails.order_details_TimeRange"],[3,"timeSlot","zoneAbbreviation"],[3,"timeSlot"],[1,"m-0","p-0","fulfillment-info-card-title"]],template:function(i,o){i&1&&m(0,Ma,1,1,"p-card",0),i&2&&f(o.info().displaySetting.showContactInfo?0:-1)},dependencies:[Q,q,M,$i,ie,xt,Lt],styles:[".fulfillment-info-card-title[_ngcontent-%COMP%]{font-size:var(--typography-font_size-20, 20px)}"]})}}return t})();function ka(t,r){if(t&1&&(c(0,"h3",4),p(1),d()),t&2){let e=s().$implicit;a(),O(e("INVOICE_ADDRESS"))}}function Ua(t,r){if(t&1&&(c(0,"p-card",0),m(1,ka,2,1,"ng-template",2),T(2,"ppg-address-display",3),d()),t&2){let e=s(2);a(2),h("addressData",e.info().invoiceInfo.address)("addressDisplaySettings",e.info().invoiceInfo.displaySettings)("testIdPrefix","invoiceAddress")}}function Va(t,r){t&1&&m(0,Ua,3,3,"p-card",1),t&2&&h("translocoRead","ORDERS.DETAILS")}var qi=(()=>{class t{constructor(){this.info=D.required()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["ppg-fulfillment-info-invoice-address"]],inputs:{info:[1,"info"]},standalone:!1,decls:1,vars:1,consts:[["data-test-id","orderDetails.invoiceAddress"],["data-test-id","orderDetails.invoiceAddress",4,"transloco","translocoRead"],["pTemplate","title"],[3,"addressData","addressDisplaySettings","testIdPrefix"],[1,"m-0","p-0","fulfillment-info-card-title"]],template:function(i,o){i&1&&m(0,Va,1,1,"p-card",0),i&2&&f(o.info().displaySetting.showInvoiceAddress?0:-1)},dependencies:[Q,q,M,Hi],styles:[".fulfillment-info-card-title[_ngcontent-%COMP%]{font-size:var(--typography-font_size-20, 20px)}"]})}}return t})();function $a(t,r){if(t&1&&(c(0,"h3",4),p(1),d()),t&2){let e=s().$implicit,i=s();a(),O(e(i.shippingLocationKey()))}}function Ga(t,r){if(t&1&&T(0,"ppg-postnl-pickup-point",3),t&2){let e,i,o=s(2);h("parcelLockerPoint",o.info().fulfillmentLocation.parcelLockerAddress.pointInfo)("isLast",!0)("displayOpeningHours",!!((e=o.info().fulfillmentLocation.parcelLockerAddress.pointInfo)!=null&&e.openingHours))("readonlyMode",!0)("loadingMode",(i=o.info().fulfillmentLocation.parcelLockerAddress)==null?null:i.isLoading)}}function Ka(t,r){if(t&1&&(c(0,"div",5),p(1),d()),t&2){let e=s(3);a(),y(" ",e.info().fulfillmentLocation.standardFulfillmentAddress.address.name," ")}}function ja(t,r){if(t&1&&(c(0,"div",7),p(1),d()),t&2){let e=s(4);a(),y(" ",e.info().fulfillmentLocation.standardFulfillmentAddress.address.address1," ")}}function qa(t,r){if(t&1&&m(0,ja,2,1,"div",7),t&2){let e,i=s(3);f((e=i.info().fulfillmentLocation.standardFulfillmentAddress.address)!=null&&e.address1?0:-1)}}function Ya(t,r){if(t&1&&T(0,"ppg-address-display",6),t&2){let e=s(3);h("addressData",e.info().fulfillmentLocation.standardFulfillmentAddress.address)("addressDisplaySettings",e.info().fulfillmentLocation.standardFulfillmentAddress.displaySettings)("testIdPrefix","deliveryOrPickU
1pLocation")}}function za(t,r){if(t&1&&(c(0,"div",8)(1,"a",10),p(2),d()()),t&2){s();let e=U(0);a(),gt("href","tel:",e.phoneNumber,"",ae),a(),y(" ",e.phoneNumber," ")}}function Wa(t,r){if(t&1&&(c(0,"div")(1,"a",11),p(2),d()()),t&2){s();let e=U(0);a(),gt("href","mailto:",e.email,"",ae),a(),y(" ",e.email," ")}}function Ja(t,r){if(t&1&&(re(0),m(1,za,3,3,"div",8)(2,Wa,3,3,"div"),T(3,"ppg-store-address-opening-hours",9)),t&2){let e=s(3),i=J(e.info().fulfillmentLocation.standardFulfillmentAddress.pickUpAddressInfo);a(),f(i!=null&&i.phoneNumber?1:-1),a(),f(i!=null&&i.email?2:-1),a(),h("openingHours",e.info().openingHours)}}function Qa(t,r){if(t&1&&m(0,Ka,2,1,"div",5)(1,qa,1,1)(2,Ya,1,3,"ppg-address-display",6)(3,Ja,4,4),t&2){let e,i=s(2);f((i.info().shippingMethodName===i.shippingMethodNames.PickUp||i.info().shippingMethodName===i.shippingMethodNames.ReserveAndCollect)&&((e=i.info().fulfillmentLocation.standardFulfillmentAddress.address)!=null&&e.name)?0:-1),a(),f(i.info().shippingMethodName===i.shippingMethodNames.PickUp||i.info().shippingMethodName===i.shippingMethodNames.ReserveAndCollect?1:2),a(2),f(i.info().shippingMethodName===i.shippingMethodNames.PickUp||i.info().shippingMethodName===i.shippingMethodNames.ReserveAndCollect?3:-1)}}function Xa(t,r){if(t&1&&(c(0,"p-card",1),m(1,$a,2,1,"ng-template",2)(2,Ga,1,5,"ppg-postnl-pickup-point",3)(3,Qa,4,3),d()),t&2){let e=s();a(2),f(e.info().shippingMethodName===e.shippingMethodNames.ParcelLocker?2:3)}}var Yi={[P.Delivery]:"DELIVERY_LOCATION",[P.PickUp]:"PICK_UP_LOCATION",[P.ParcelLocker]:"PARCEL_LOCKER_LOCATION",[`${P.NShift}:{${oe.Home}}`]:"DELIVERY_LOCATION"},Ft=(()=>{class t{constructor(){this.info=D.required(),this.shippingMethodNames=P,this.shippingLocationKey=_(()=>{let e=this.info(),i=e.shippingMethodName,o=e.fulfillmentTypeDisplayInfo;return o?.deliveryType&&Yi[`${i}:{${o.deliveryType}}`]?Yi[`${i}:{${o.deliveryType}}`]:Yi[i]??Yi[P.ParcelLocker]})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["ppg-fulfillment-info-location"]],inputs:{info:[1,"info"]},standalone:!1,decls:1,vars:1,consts:[["data-test-id","orderDetails.deliveryOrPickUpLocation",4,"transloco","translocoRead"],["data-test-id","orderDetails.deliveryOrPickUpLocation"],["pTemplate","title"],["data-test-id","postnl.pickupPointLocation",3,"parcelLockerPoint","isLast","displayOpeningHours","readonlyMode","loadingMode"],[1,"m-0","p-0","fulfillment-info-card-title"],["data-test-id","deliveryOrPickUpLocation.storeName",1,"font-bold","mb-2"],[3,"addressData","addressDisplaySettings","testIdPrefix"],["data-test-id","deliveryOrPickUpLocation.address1"],[1,"mt-3"],["testIdPrefix","deliveryOrPickUpLocation",3,"openingHours"],["data-test-id","pickupLocationPhoneNumber",1,"p-button","p-button-link",3,"href"],["data-test-id","pickupLocationEmail",1,"p-button","p-button-link",3,"href"]],template:function(i,o){i&1&&m(0,Xa,4,1,"p-card",0),i&2&&h("translocoRead","ORDERS.DETAILS")},dependencies:[Q,q,M,Hi,Vi,bi],styles:[".fulfillment-info-card-title[_ngcontent-%COMP%]{font-size:var(--typography-font_size-20, 20px)}"]})}}return t})();function Za(t,r){if(t&1&&(c(0,"h3",3),p(1),d()),t&2){let e=s().$implicit;a(),O(e("ORDER_STATUS"))}}function es(t,r){if(t&1&&(p(0),g(1,"transloco")),t&2){let e,i=s(3);y(" ",v(1,1,"ORDERS.ORDER_STATUS."+((e=i.orderStatusMessagesKeyValue[i.info().orderStatus])!==null&&e!==void 0?e:"DEFAULT"))," ")}}function ts(t,r){if(t&1&&(c(0,"p-card",0),m(1,Za,2,1,"ng-template",2)(2,es,2,3),d()),t&2){let e=s(2);a(2),f(e.info().orderStatus?2:-1)}}function is(t,r){t&1&&m(0,ts,3,1,"p-card",1),t&2&&h("translocoRead","ORDERS.DETAILS")}var tt=(()=>{class t{constructor(){this.info=D.required(),this.orderStatusMessagesKeyValue=Ai}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["ppg-fulfillment-info-order-status"]],inputs:{info:[1,"info"]},standalone:!1,decls:1,vars:1,consts:[["data-test-id","orderDetails.orderStatus"],["data-test-id","orderDetails.orderStatus",4,"transloco","translocoRead"],["pTemplate","title"],[1,"m-0","p-0","fulfillment-info-card-title"]],template:function(i,o){i&1&&m(0,is,1,1,"p-card",0),i&2&&f(o.info().displaySetting.showOrderStatus?0:-1)},dependencies:[Q,q,M,ie],styles:[".fulfillment-info-card-title[_ngcontent-%COMP%]{font-size:var(--typography-font_size-20, 20px)}"]})}}return t})();var Pr={[oe.Home]:C.ORDER_DETAILS_DELIVERY_TYPE_HOME,[oe.Pickup]:C.ORDER_DETAILS_DELIVERY_TYPE_PICKUP,[oe.Store]:C.ORDER_DETAILS_DELIVERY_TYPE_STORE};function os(t,r){if(t&1&&(c(0,"h3",4),p(1),d()),t&2){let e=s().$implicit;a(),O(e("FULFILLMENT_TYPE"))}}function ns(t,r){if(t&1&&T(0,"img",8),t&2){let e=s(3);h("src",e.fulfillmentInfo().deliveryCarrierLogoUrl,ae)("alt",e.logoAltText()),Ee("data-test-id","deliveryInfo.carrierLogo")}}function rs(t,r){if(t&1&&(c(0,"div",3)(1,"div",5)(2,"span",6),p(3),d()(),c(4,"div",7),m(5,ns,1,3,"img",8),d()()),t&2){let e=s(2);a(3),y(" ",e.fulfillmentInfo().shippingMethodKey," "),a(2),f(e.showCarrierLogo()?5:-1)}}function as(t,r){if(t&1&&p(0),t&2){let e=s().$implicit,i=s();y(" ",e(i.fulfillmentTypeKey())," ")}}function ss(t,r){if(t&1&&(c(0,"p-card",1),m(1,os,2,1,"ng-template",2)(2,rs,6,2,"div",3)(3,as,1,1),d()),t&2){let e=s();a(2),f(e.fulfillmentInfo().useDeliveryType?2:3)}}var ls={[P.Delivery]:"DELIVERY",[P.PickUp]:"PICK_UP",[P.ParcelLocker]:"PARCEL_LOCKER",[P.ReserveAndCollect]:"RESERVE_AND_COLLECT",[P.NShift]:"NSHIFT"},it=(()=>{class t{constructor(){this.info=D.required(),this.#e=l(Y),this.shippingMethodNames=P,this.fulfillmentTypeKey=_(()=>{let e=this.info().shippingMethodName;return ls[e]??""}),this.fulfillmentInfo=_(()=>{let i=this.info().fulfillmentTypeDisplayInfo;return i?.useDeliveryType&&(i.shippingMethodKey=this.#e.getResourceByKey(Pr[i.deliveryType])),i}),this.showCarrierLogo=_(()=>{let e=this.fulfillmentInfo()?.deliveryType;return e===oe.Pickup||e===oe.Home}),this.logoAltText=_(()=>{let e=this.info().fulfillmentTypeDisplayInfo;return e?.useDeliveryType?e.deliveryCarrierLogoId+" "+this.#e.getResourceByKey(C.CHECKOUT_DELIVERY_LOGO):""})}#e;static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["ppg-fulfillment-info-order-type"]],inputs:{info:[1,"info"]},standalone:!1,decls:1,vars:1,consts:[["data-test-id","orderDetails.fulfillmentType",4,"transloco","translocoRead"],["data-test-id","orderDetails.fulfillmentType"],["pTemplate","title"],[1,"grid","h-full"],[1,"m-0","p-0","fulfillment-info-card-title"],[1,"col-6"],["data-test-id","orderDetails.deliveryType",1,"delivery-type"],[1,"col-6","text-right"],["width","96",3,"src","alt"]],template:function(i,o){i&1&&m(0,ss,4,1,"p-card",0),i&2&&h("translocoRead","ORDERS.DETAILS")},dependencies:[Q,q,M],styles:[".fulfillment-info-card-title[_ngcontent-%COMP%]{font-size:var(--typography-font_size-20, 20px)}"]})}}return t})();function cs(t,r){if(t&1&&(c(0,"h3",2),p(1),d()),t&2){let e=s(2);a(),O(e.header())}}function ds(t,r){if(t&1&&(c(0,"p-card",0),m(1,cs,2,1,"ng-template",1),c(2,"div"),p(3),d()()),t&2){let e=s();a(3),O(e.info().poNumber)}}var zi=(()=>{class t{constructor(){this.#e=l(Y),this.info=D.required(),this.header=_(()=>this.#e.getResourceByKey(C.ORDER_DETAILS_PO_NUMBER))}#e;static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["ppg-fulfillment-info-po-number"]],inputs:{info:[1,"info"]},standalone:!1,decls:1,vars:1,consts:[["data-test-id","orderDetails.poNumber"],["pTemplate","title"],[1,"m-0","p-0","fulfillment-info-card-title"]],template:function(i,o){i&1&&m(0,ds,4,1,"p-card",0),i&2&&f(o.info().displaySetting.showPoNumber?0:-1)},dependencies:[q,M],styles:[".fulfillment-info-card-title[_ngcontent-%COMP%]{font-size:var(--typography-font_size-20, 20px)}"]})}}return t})();function ms(t,r){if(t&1&&(c(0,"h3",3),p(1),d()),t&2){let e=s();a(),O(e.deliveryLocationHeader())}}
1function ps(t,r){t&1&&T(0,"ppg-location-details",2),t&2&&h("location",r)}var Co=(()=>{class t{constructor(){this.info=D.required(),this.#e=l(Y),this.deliveryLocationHeader=_(()=>{let e=this.info().deliveryInfo?.type===oe.Store?C.ORDER_DETAILS_AT_STORE_HEADER:C.ORDER_DETAILS_PICKUP_POINT_HEADER;return this.#e.getResourceByKey(e)}),this.#t=_(()=>({mon:this.#e.getResourceByKey(C.PICKUP_POINT_DAY_MON),tue:this.#e.getResourceByKey(C.PICKUP_POINT_DAY_TUE),wed:this.#e.getResourceByKey(C.PICKUP_POINT_DAY_WED),thu:this.#e.getResourceByKey(C.PICKUP_POINT_DAY_THU),fri:this.#e.getResourceByKey(C.PICKUP_POINT_DAY_FRI),sat:this.#e.getResourceByKey(C.PICKUP_POINT_DAY_SAT),sun:this.#e.getResourceByKey(C.PICKUP_POINT_DAY_SUN)})),this.#o=_(()=>this.#e.getResourceByKey(C.PICKUP_POINT_HOURS_CLOSED)),this.locationViewModel=_(()=>{let e=this.info(),i=e.fulfillmentLocation?.standardFulfillmentAddress?.address;if(!i)return null;let o=e.openingHours,n=e.deliveryInfo?.type===oe.Store?Qn(o,this.#t(),this.#o()):Jn(o,this.#t(),this.#o());return{key:"",pickupPointId:"",name:i.name??"",address1:i.address1??"",formattedPostalCode:i.postcode,city:i.city??"",formattedDistance:"",distanceValue:void 0,openingHoursDays:n,hasOpeningHours:!!o,raw:{}}})}#e;#t;#o;static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["ppg-fulfillment-info-delivery-location"]],inputs:{info:[1,"info"]},decls:3,vars:1,consts:[["data-test-id","fulfillmentInfo.deliveryLocation"],["pTemplate","title"],["data-test-id","fulfillmentInfo.deliveryLocationDetails",3,"location"],[1,"m-0","p-0","fulfillment-info-card-title"]],template:function(i,o){if(i&1&&(c(0,"p-card",0),m(1,ms,2,1,"ng-template",1)(2,ps,1,1,"ppg-location-details",2),d()),i&2){let n;a(2),f((n=o.locationViewModel())?2:-1,n)}},dependencies:[Di,M,q,Xn],styles:[".fulfillment-info-card-title[_ngcontent-%COMP%]{font-size:var(--typography-font_size-20, 20px)}"],changeDetection:0})}}return t})();function us(t,r){if(t&1&&(c(0,"h3",4),p(1),d()),t&2){let e=s();a(),O(e.trackingNumberHeader())}}function fs(t,r){if(t&1&&(c(0,"li",6)(1,"p",7)(2,"span",8),p(3),d()(),c(4,"p",7)(5,"span"),p(6),g(7,"trackingNumberFormat"),d()()()),t&2){let e=r.$implicit,i=r.$index,o=r.$count,n=s(2);_t("mb-4",i!==o-1),Ee("data-test-id","orderDetails.deliveryTrackingNumberItem-"+i),a(2),Ee("data-test-id","orderDetails.parcelLabel-"+i),a(),si("",n.parcelLabel()," ",i+1,""),a(2),Ee("data-test-id","orderDetails.deliveryTrackingNumber-"+i),a(),y(" ",v(7,8,e)," ")}}function hs(t,r){if(t&1&&(c(0,"ul",2),Se(1,fs,8,10,"li",5,Fe),d()),t&2){let e=s();a(),ve(e.deliveryTrackingNumbers())}}function _s(t,r){if(t&1&&(c(0,"span"),p(1),g(2,"trackingNumberFormat"),d()),t&2){let e=s();Ee("data-test-id","orderDetails.deliveryTrackingNumber-0"),a(),y(" ",v(2,2,e.deliveryTrackingNumbers()[0])," ")}}function gs(t,r){if(t&1&&(c(0,"span",3),p(1),d()),t&2){let e=s();a(),O(e.trackingNumberNotAvailable())}}var So=(()=>{class t{constructor(){this.info=D.required(),this.#e=l(Y),this.deliveryTrackingNumbers=_(()=>this.info().deliveryTrackingNumbers??[]),this.trackingNumberHeader=_(()=>this.#e.getResourceByKey(C.ORDER_DETAILS_TRACKING_NUMBER_HEADER)),this.parcelLabel=_(()=>this.#e.getResourceByKey(C.ORDER_DETAILS_TRACKING_NUMBER_PARCEL)),this.trackingNumberNotAvailable=_(()=>this.#e.getResourceByKey(C.ORDER_DETAILS_TRACKING_NUMBER_NOT_YET_AVAILABLE))}#e;static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["ppg-fulfillment-info-delivery-tracking-numbers"]],inputs:{info:[1,"info"]},decls:5,vars:1,consts:[["data-test-id","orderDetails.deliveryTrackingNumbers"],["pTemplate","title"],["role","list","data-test-id","orderDetails.deliveryTrackingNumbersList",1,"tracking-numbers-list"],["data-test-id","orderDetails.noTrackingNumber"],[1,"m-0","p-0","fulfillment-info-card-title"],[1,"tracking-numbers-parcel",3,"mb-4"],[1,"tracking-numbers-parcel"],[1,"m-0","p-0","u-break-word"],[1,"tracking-numbers-parcel-label"]],template:function(i,o){i&1&&(c(0,"p-card",0),m(1,us,2,1,"ng-template",1)(2,hs,3,0,"ul",2)(3,_s,3,4,"span")(4,gs,2,1,"span",3),d()),i&2&&(a(2),f(o.deliveryTrackingNumbers().length>1?2:o.deliveryTrackingNumbers().length===1?3:4))},dependencies:[Di,M,q,Mn],styles:[".fulfillment-info-card-title[_ngcontent-%COMP%]{font-size:var(--typography-font_size-20, 20px)}.tracking-numbers-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0}
1.tracking-numbers-parcel[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}.tracking-numbers-parcel-label[_ngcontent-%COMP%]{font-weight:var(--p-pds-typography-weight-medium)}"],changeDetection:0})}}return t})();function Cs(t,r){if(t&1&&(c(0,"h3",2),p(1),d()),t&2){let e=s(2);a(),y(" ",e.header()," ")}}function Ss(t,r){if(t&1&&(c(0,"p-card",0),m(1,Cs,2,1,"ng-template",1),c(2,"div"),p(3),d()()),t&2){let e=s();a(3),O(e.info().fulfillmentInstructions)}}var Wi=(()=>{class t{constructor(){this.#e=l(Y),this.info=D.required(),this.shippingMethodNames=P,this.header=_(()=>this.info().shippingMethodName===P.Delivery?this.#e.getResourceByKey(C.ORDER_DETAILS_DELIVERY_INSTRUCTIONS):this.#e.getResourceByKey(C.ORDER_DETAILS_PICK_UP_INSTRUCTIONS))}#e;static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["ppg-fulfillment-info-shipment-instructions"]],inputs:{info:[1,"info"]},standalone:!1,decls:1,vars:1,consts:[["data-test-id","orderDetails.deliveryOrPickUpInstructions"],["pTemplate","title"],[1,"m-0","p-0","fulfillment-info-card-title"]],template:function(i,o){i&1&&m(0,Ss,4,1,"p-card",0),i&2&&f(o.info().displaySetting.showShipmentInstructions?0:-1)},dependencies:[q,M],styles:[".fulfillment-info-card-title[_ngcontent-%COMP%]{font-size:var(--typography-font_size-20, 20px)}"]})}}return t})();function vs(t,r){if(t&1&&(c(0,"h3",6),p(1),d()),t&2){let e=s().$implicit;a(),O(e("ORDER_DELIVERED_FROM"))}}function ys(t,r){if(t&1&&(c(0,"div",4)(1,"a",7),p(2),d()()),t&2){let e=s(3);a(),gt("href","tel:",e.info().deliveredFromStoreInfo.phoneNumber,"",ae),a(),y(" ",e.info().deliveredFromStoreInfo.phoneNumber," ")}}function Ds(t,r){if(t&1&&(c(0,"div")(1,"a",7),p(2),d()()),t&2){let e=s(3);a(),gt("href","mailto:",e.info().deliveredFromStoreInfo.email,"",ae),a(),y(" ",e.info().deliveredFromStoreInfo.email," ")}}function Os(t,r){if(t&1&&(c(0,"p-card",0),m(1,vs,2,1,"ng-template",2),c(2,"div",3),p(3),d(),c(4,"div"),p(5),d(),m(6,ys,3,3,"div",4)(7,Ds,3,3,"div"),T(8,"ppg-store-address-opening-hours",5),d()),t&2){let e=s(2);a(3),O(e.info().deliveredFromStoreInfo.name),a(2),O(e.info().deliveredFromStoreInfo.address.address1),a(),f(e.info().deliveredFromStoreInfo.phoneNumber?6:-1),a(),f(e.info().deliveredFromStoreInfo.email?7:-1),a(),h("openingHours",e.info().openingHours)}}function Ts(t,r){t&1&&m(0,Os,9,5,"p-card",1),t&2&&h("translocoRead","ORDERS.DETAILS")}var Ar=(()=>{class t{constructor(){this.info=D.required()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["ppg-fulfillment-info-store-address"]],inputs:{info:[1,"info"]},standalone:!1,decls:1,vars:1,consts:[["data-test-id","orderDetails.orderDeliveredFrom"],["data-test-id","orderDetails.orderDeliveredFrom",4,"transloco","translocoRead"],["pTemplate","title"],[1,"font-bold","mb-2"],[1,"mt-3"],["testIdPrefix","orderDeliveredFrom",3,"openingHours"],[1,"m-0","p-0","fulfillment-info-card-title"],[1,"p-button","p-button-link",3,"href"]],template:function(i,o){i&1&&m(0,Ts,1,1,"p-card",0),i&2&&f(o.info().displaySetting.showStoreAddress?0:-1)},dependencies:[Q,q,M,bi],styles:[".fulfillment-info-card-title[_ngcontent-%COMP%]{font-size:var(--typography-font_size-20, 20px)}"]})}}return t})();function xs(t,r){if(t&1&&(c(0,"h3",2),p(1),d()),t&2){let e=s(2);a(),O(e.header())}}function bs(t,r){if(t&1&&(c(0,"p-card",0),m(1,xs,2,1,"ng-template",1),p(2),d()),t&2){let e=s();a(2),y(" ",e.option()," ")}}var Is={[uo.EARLY]:C.CHECKOUT_FULFILLMENT_URGENCY_OPTION_EARLY_LABEL,[uo.STANDARD]:C.CHECKOUT_FULFILLMENT_URGENCY_OPTION_STANDARD_LABEL},Nr=(()=>{class t{constructor(){this.#e=l(Y),this.info=D.required(),this.header=_(()=>this.#e.getResourceByKey(C.CHECKOUT_FULFILLMENT_URGENCY_OPTION_HEADLINE)),this.option=_(()=>{let e=this.info().fulfillmentUrgencyOption;return e?this.#e.getResourceByKey(Is[e]):""})}#e;static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["ppg-fulfillment-info-urgency-option"]],inputs:{info:[1,"info"]},standalone:!1,decls:1,vars:1,consts:[["data-test-id","orderDetails.fulfillmentUrgencyOption"],["pTemplate","title"],[1,"m-0","p-0","fulfillment-info-card-title"]],template:function(i,o){i&1&&m(0,bs,3,1,"p-card",0),i&2&&f(o.info().fulfillmentUrgencyOption?0:-1)},dependencies:[q,M],styles:[".fulfillment-info-card-title[_ngcontent-%COMP%]{font-size:var(--typography-font_size-20, 20px)}"]})}}return t})();var vo=[{ShippingMethod:P.Delivery,infoCards:[it,tt,zi,Wi,Nr,ji,Ft,Ar,et,qi]},{ShippingMethod:P.PickUp,infoCards:[it,tt,zi,Wi,ji,Ft,et,qi]},{ShippingMethod:P.ParcelLocker,infoCards:[it,tt,zi,Wi,ji,Ft,et,qi]},{ShippingMethod:P.ReserveAndCollect,infoCards:[it,tt,et,Ft]},{ShippingMethod:`${P.NShift}:${oe.Home}`,infoCards:[it,tt,So,Ft,et]},{ShippingMethod:`${P.NShift}:${oe.Store}`,infoCards:[it,tt,Co,et]},{ShippingMethod:`${P.NShift}:${oe.Pickup}`,infoCards:[it,tt,So,Co,et]}];var Es=t=>({info:t});function Rs(t,r){if(t&1&&(c(0,"div",2),_e(1,3),d()),t&2){let e=r.$implicit,i=s(3);a(),h("ngComponentOutlet",e)("ngComponentOutletInputs",j(2,Es,i.info()))}}function Ps(t,r){if(t&1&&(Ut(0),c(1,"div",1)(2,"h2"),p(3),d(),Se(4,Rs,2,4,"div",2,Fe),d(),Vt()),t&2){let e=r.$implicit,i=s(2);a(3),O(e("ORDER_DETAILS")),a(),ve(i.infoComponents())}}function As(t,r){t&1&&m(0,Ps,6,1,"ng-container",0),t&2&&h("translocoRead","ORDERS.DETAILS")}var Lr=(()=>{class t{constructor(){this.info=D.required(),this.infoComponents=_(()=>this.getInfoDisplaySettings()?.infoCards)}getInfoDisplaySettings(){let e=this.info();return e.shippingMethodName===P.NShift?vo.find(i=>i.ShippingMethod===`${e.shippingMethodName}:${e.fulfillmentTypeDisplayInfo?.deliveryType}`):vo.find(i=>i.ShippingMethod===e.shippingMethodName)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["ppg-fulfillment-info-section"]],inputs:{info:[1,"info"]},standalone:!1,decls:1,vars:1,consts:[[4,"transloco","translocoRead"],[1,"fulfillment-info-section","flex","flex-column"],[1,"card-container"],[3,"ngComponentOutlet","ngComponentOutletInputs"]],template:function(i,o){i&1&&m(0,As,1,1,"ng-container"),i&2&&f(o.info()?0:-1)},dependencies:[Wo,Q],styles:[".fulfillment-info-section[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:has(p-card){margin-top:1rem}"]})}}return t})();function Fr(t,r,e,i,o){let n=new Map,u=new Map,S=new Map;t.forEach(F=>
1{F.variants.results.forEach(z=>{n.set(z.sku,F),u.set(z.sku,z)}),e.lineItems.forEach(z=>{S.set(z.sku,z)})});let I=r.lineItems.map(F=>({job:e.job,quoteId:r.quoteId,quoteName:r.quoteName,productDetails:n.get(F.sku),sku:F.sku,variant:u.get(F.sku),tintingFeeSku:null,exportCatalogSku:u.get(F.sku).exportCatalogSku,lineItem:F,locale:o,quantity:F.quantity,countryCode:i,tintedProduct:F.tintedProduct,isSample:S.get(F.sku).isSample}));return{countryCode:i,cartItems:I}}var he=(function(t){return t.OrderHistory="orderHistory",t.OrderDetails="orderDetails",t})(he||{});var Ls=14,Fs={title:C.ORDERS_HISTORY_GET_DOCUMENTS_CONFIRMATION_TITLE,body:C.ORDERS_HISTORY_GET_DOCUMENTS_CONFIRMATION_MSG,acceptLabel:C.ORDERS_HISTORY_GET_DOCUMENTS_CONFIRMATION_CONFIRM,rejectLabel:C.ORDERS_HISTORY_GET_DOCUMENTS_CONFIRMATION_CANCEL,closeAriaLabel:C.A11Y_CLOSE};function wr(t,r){let e=B(V(B({},Fs),{body:r.resourceKeys?.body??Bs(r.variant)}),r.resourceKeys),i=ws(r);return{title:$t(t,e.title,i),body:$t(t,e.body,i),acceptLabel:$t(t,e.acceptLabel,i),rejectLabel:$t(t,e.rejectLabel,i),closeAriaLabel:$t(t,e.closeAriaLabel,i)}}function ws(t){return{email:t.placeholders.email,expiryDays:Ms(t.placeholders.expiryDays),orderCount:t.variant===he.OrderHistory?t.placeholders.orderCount:"",orderNumber:t.variant===he.OrderDetails?t.placeholders.orderNumber:""}}function Ms(t){return String(t??Ls)}function Bs(t){switch(t){case he.OrderHistory:return C.ORDERS_HISTORY_GET_DOCUMENTS_CONFIRMATION_MSG;case he.OrderDetails:return C.ORDER_DETAILS_GET_DOCUMENTS_CONFIRMATION_MSG}}function $t(t,r,e){return ks(t.getResourceByKey(r),e)}function ks(t,r){return Object.entries(r).reduce((e,[i,o])=>e.replaceAll(`{${i}}`,o),t)}function ot(t,r,e){let i=wr(r,e.dialogOptions),o=Us();t.open(Dn,{header:i.title,closeAriaLabel:i.closeAriaLabel,data:{body:i.body,cancelButtonText:i.rejectLabel,submitButtonText:i.acceptLabel},templates:{footer:On},width:Si.Medium,dismissableMask:!0,closable:!0,focusOnShow:!0,focusTrap:!0,modal:!0}).onClose.pipe(Z(1)).subscribe(u=>{if(o?.focus(),u===!0){e.accept();return}e.reject?.()})}function Us(){let t=globalThis.document?.activeElement;return t instanceof HTMLElement?t:null}var Ji=(()=>{class t{constructor(){this.#e=l(dn),this.#t=l(pn),this.#o=l(Oe),this.isLoaded=this.#t.formattingsLoaded}#e;#t;#o;getLocalOrderAddress(e,i){let o=this.getTranslationKey(),n=this.getOrderAddressModel(e,i);return{address1:this.#e.translate(`${o}.ADDRESS1`,n),address2:this.#e.translate(`${o}.ADDRESS2`,n),apartment:this.#e.translate(`${o}.APARTMENT`,n),details:this.#e.translate(`${o}.DETAILS`,n)}}getOrderAddressModel(e,i){return V(B({},e),{stateShortCode:i})}getTranslationKey(){this.#t.formattingsLoaded();let e=this.#o.countryCode(),i=`ADDRESS.${e}`;return this.#t.formattings().ADDRESS[e]?i:"ADDRESS.DEFAULT"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Mr=(()=>{class t{#e=l(Ji);#t=l(yr);getFulfillmentInfo(e,i,o,n,u){let S=vr(u);return{fulfillmentDateTime:this.#h(e),fulfillmentStateShortCode:this.#i(e.fulfillmentStoreAddress,i),shippingAddressStateShortCode:this.#i(e.shippingAddress,i),invoiceAddressStateShortCode:this.#i(e.invoiceAddress,i),fulfillmentTimeSlot:this.#u(e,n.fulfillmentCutOffEnabled),timeZoneAbbreviation:e.fulfillmentTimeZoneAbbreviation,showTimeZone:n.showTimeZone,orderStatus:e.currentStatus,shippingMethodName:e.shippingMethodName,poNumber:e.purchaseOrder,fulfillmentInstructions:e.fulfillmentInstructions,fulfillmentLocation:this.#p(e,i,S),deliveredFromStoreInfo:this.#a(e,i),fulfillmentContactInfo:this.#m(e,o),invoiceInfo:this.#g(e,i,S),displaySetting:this.#_(e,i,n),fulfillmentTypeDisplayInfo:this.#n(e),deliveryTrackingNumbers:this.#o(e),deliveryInfo:e.deliveryInfo,fulfillmentUrgencyOption:e.fulfillmentUrgencyOption,openingHours:e.openingHours??null}}#o(e){let i=e.deliveryInfo?.trackingNumbers;return i?i.split(",").map(o=>o.trim()).filter(o=>o.length>0):[]}#n(e){let i=e.deliveryInfo?.type?oe[e.deliveryInfo?.type]:null;return{deliveryType:i,deliveryCarrierLogoUrl:e.deliveryInfo?.carrierLogoUrl,deliveryCarrierLogoId:e.deliveryInfo?.carrierLogoId,useDeliveryType:!!i,shippingMethodKey:""}}#i(e,i){if(!e)return"";let o=i?.find(n=>n.code===e?.countryCode);return o?.isStateRequired?o.states?.find(n=>n.code===e?.state)?.shortCode??e?.state:""}#r(e,i,o){return V(B({},e.invoiceAddress),{stateShortCode:i??"",postcode:ui(e.invoiceAddress?.postcode,o)??""})}#s(e,i,o){return V(B({},e?.shippingAddress),{stateShortCode:i,postcode:ui(e?.shippingAddress?.postcode,o)??""})}
1#l(e,i){return!!(e.invoiceAddress?.name||e.invoiceAddress?.address1||e.invoiceAddress?.address2||e.invoiceAddress?.city||e.invoiceAddress?.postcode||this.#c(e,i)?.details)}#c(e,i){let o=e.invoiceAddress;if(!o||!this.#e.isLoaded())return null;let n=this.#i(e.fulfillmentStoreAddress,i)??"";return this.#e.getLocalOrderAddress(o,n)}#d(e,i){if(!e.shippingAddress)return null;let o=e.shippingAddress;return{address:V(B({},o),{cityName:o.city,houseNumber:Number(o.address2),houseNumberAddition:o.apartment,streetName:o.address1,postalCode:ui(o.postcode,i)??""}),name:o.name,openingHours:e.openingHours}}#f(e,i){return!e.fulfillmentStoreAddress||!this.#e.isLoaded()?null:this.#e.getLocalOrderAddress(e.fulfillmentStoreAddress,i)}#h(e){return{timeZoneId:e.fulfillmentStoreTimeZoneId,utcDateTime:e.fulfillmentDateTime}}#u(e,i){return new Cr(i&&e.fulfillmentTimeSlotStart?_o.Parse(e.fulfillmentTimeSlotStart):null,i&&e.fulfillmentTimeSlotEnd?_o.Parse(e.fulfillmentTimeSlotEnd):null)}#p(e,i,o){return{parcelLockerAddress:{pointInfo:this.#d(e,o),isLoading:!1},standardFulfillmentAddress:{address:this.#s(e,this.#i(e.fulfillmentStoreAddress,i),o),pickUpAddressInfo:e.shippingMethodName===P.PickUp?{phoneNumber:e.shippingAddress?.phoneNumber,email:e.shippingAddress?.email}:null,displaySettings:this.#t.getFormattedAddressSettings(go.DELIVERY_LOCATION)}}}#a(e,i){return e.fulfillmentStoreAddress?{name:e.fulfillmentStoreAddress.name,phoneNumber:e.fulfillmentStoreAddress.phoneNumber,email:e.fulfillmentStoreAddress.email,address:this.#f(e,this.#i(e.fulfillmentStoreAddress,i))}:null}#m(e,i){return{name:e.fulfillmentContactName,phone:e.fulfillmentContactPhone,email:e.fulfillmentContactEmail,fieldAttributes:i}}#g(e,i,o){return{address:this.#r(e,this.#i(e.fulfillmentStoreAddress,i),o),displaySettings:this.#t.getFormattedAddressSettings(go.INVOICE_ADDRESS)}}#_(e,i,o){return{showContactInfo:o.isB2BUser||o.deliveryContactEnabled,showDateTime:o.fulfillmentCutOffEnabled,showInvoiceAddress:this.#l(e,i),showOrderStatus:o.isShowOrderStatusEnabled,showPoNumber:o.isB2BUser,showStoreAddress:o.isB2BUser&&!!e.fulfillmentStoreAddress&&!o.deliveryFulfilmentFromWarehouseEnabled,showShipmentInstructions:o.isB2BUser}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Br=(()=>{class t extends Ye{constructor(){super(...arguments),this.document=ze`
2    mutation ($filter: OrderDocumentFilterInput!) {
3      requestOrderDocumentsByFilter(filter: $filter) {
4        requestId
5      }
6    }
7  `}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=fe(t)))(o||t)}})()}static{this.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var kr=(()=>{class t extends Ye{constructor(){super(...arguments),this.document=ze`
8    mutation ($orderNumber: NonEmptyString!) {
9      requestOrderDocumentsByOrderNumber(orderNumber: $orderNumber) {
10        requestId
11      }
12    }
13  `}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=fe(t)))(o||t)}})()}static{this.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Ur=(()=>{class t extends Ye{constructor(){super(...arguments),this.document=ze`
14    mutation ($transactionNumber: NonEmptyString!, $orderNumber: NonEmptyString!, $accountNumber: NonEmptyString!) {
15      requestOrderDocumentsForStoreOrder(
16        transactionNumber: $transactionNumber
17        orderNumber: $orderNumber
18        accountNumber: $accountNumber
19      ) {
20        requestId
21      }
22    }
23  `}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=fe(t)))(o||t)}})()}static{this.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Vr=(()=>{class t extends Ye{constructor(){super(...arguments),this.document=ze`
24    mutation ($filter: OrderDocumentFilterInput!, $marketKey: NonEmptyString!) {
25      requestStoreOrderDocumentsByFilter(filter: $filter, marketKey: $marketKey) {
26        requestId
27      }
28    }
29  `}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=fe(t)))(o||t)}})()}static{this.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var nt=(()=>{class t{#e=l(kr);#t=l(Ur);#o=l(Br);#n=l(Vr);getDocumentsByOrderNumber(e){return e?this.#e.mutate({variables:{orderNumber:e}}).pipe(x(i=>i.data?.requestOrderDocumentsByOrderNumber?.requestId)):Ge}getDocumentsByStoreOrder(e,i,o){return!e||!i?Ge:this.#t.mutate({variables:{transactionNumber:e,orderNumber:i,accountNumber:o}}).pipe(x(n=>n.data?.requestOrderDocumentsForStoreOrder?.requestId))}getDocumentsByFilter(e){return this.#o.mutate({variables:{filter:e}}).pipe(x(i=>i.data?.requestOrderDocumentsByFilter.requestId))}getDocumentsByStoreOrderFilter(e,i){return this.#n.mutate({variables:{filter:e,marketKey:i}}).pipe(x(o=>o.data?.requestStoreOrderDocumentsByFilter?.requestId))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Qi=(()=>{class t extends Hn{constructor(){super(...arguments),this.#e=l(It),this.indexTemplate=_(()=>this.#e.currentConfiguration().algolia?.productIndex??""),this.searchParameters=_(()=>({facets:["*"]}))}#e;fetchProductSlugs(e){return e.length===0?K(new Map):this.executeSearch("",this.#t(e)).pipe(x(i=>this.#o(i)))}#t(e){return{filters:e.map(o=>`${Vn}:${o}`).join(` ${"OR"} `),facets:["*"],hitsPerPage:e.length}}#o(e){let i=new Map;return e.forEach(o=>{o.objectID&&i.set(o.objectID,o.Slug??"")}),i}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=fe(t)))(o||t)}})()}static{this.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Hr=(()=>{class t{#e=l(le);#t=l(Tn);isBlocked$(e,i,o){return!!i||!!o?this.#e.quoteSelectionFeatureFlag$.pipe(Z(1),L(u=>u?this.#t.getJobWithQuotes(e).pipe(x(S=>this.#o(i,o,S.quotes??[])),ue(()=>K(!0))):K(!0))):K(!1)}#o(e,i,o){if(this.#n(e,i,o))return!1;let n=e?o.find(S=>S.id===e):void 0,u=i?o.find(S=>S.name===i):void 0;return!!(e&&!n||i&&!u||n&&u&&n.id!==u.id)}#n(e,i,o){return o.length>0&&!!i&&e==""}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var $r=t=>t.lineItems?.map(r=>({item_name:r.productNameInEnglish,index:null,item_brand:r.brand??"",item_category:r.sourceTopLevelCategory??"",item_list_id:Rt.OnlineOrderProductList,item_list_name:Pt.OnlineOrderProductList,affiliation:r.isInCatalogProduct?fo.ONLINE:fo.IN_STORE}))??[],Gt=(t,r)=>{let e=Date.parse(t);if(!e)return!0;let i=new Date(e);return i.setDate(i.getDate()+r),new Date>=i};function Gr(t,r){if(!t?.trim()||!r?.trim())return"";let e=t.toLowerCase();e=e.normalize("NFD"),e=e.replace(/[\u0300-\u036f]/g,"");let i=e.replace(/[^a-z0-9]+/g,"-");return i=i.replace(/-{2,}/g,"-"),i=i.replace(/^-+|-+$/g,""),`${i}/${r}`}var Ks=t=>({"card-image--active":t});function js(t,r){if(t&1){let e=k();c(0,"div",3)(1,"p-button",19),w("onClick",function(){A(e);let o=s(2);return N(o.favoriteIconClick(o.item))}),d()()}if(t&2){let e=s().$implicit,i=s();a(),h("icon",i.isFavorite()?i.PrimeIcons.HEART_FILL:i.PrimeIcons.HEART)("text",!0)("outlined",!0)("disabled",!i.isSameSiteOrder())("ariaLabel",e("ADD_TO_FAVORITES"))}}function qs(t,r){if(t&1&&(c(0,"div",10)(1,"span",20),p(2),d(),c(3,"span",21),p(4),d()()),t&2){let e=s().$implicit,i=s();a(2),y("",e("COLOR"),":"),a(2),O(i.item.colorDisplay)}}function Ys(t,r){if(t&1&&(c(0,"div",10)(1,"span",22),p(2),d(),c(3,"span",23),p(4),d()()),t&2){let e=s().$implicit,i=s();a(2),y("",e("SHEEN"),":"),a(2),O(i.item.sheen)}}function zs(t,r){if(t&1&&(c(0,"div",10)(1,"span",24),p(2),d(),c(3,"span",25),p(4),d()()),t&2){let e=s().$implicit,i=s();a(2),y("",e(i.item.isNonPaintItem?"OPTIONS":"SIZE"),": "),a(2),O(i.item.size)}}function Ws(t,r){if(t&1&&(c(0,"div",10)(1,"span",26),p(2),d(),c(3,"span",27),p(4),d()()),t&2){let e=s().$implicit,i=s();a(2),y("",e("BASE"),":"),a(2),O(i.item.tintBase)}}function Js(t,r){if(t&1&&(c(0,"div",10)(1,"span",28),p(2),d(),c(3,"span",29),p(4),d()()),t&2){let e=s().$implicit,i=s();a(2),y("",e("SKU"),":"),a(2),O(i.item.exportCatalogSku)}}function Qs(t,r){if(t&1&&(T(0,"ppg-price",32),g(1,"lineItemHasDiscount"),c(2,"div",33),T(3,"p-divider",34),d()),t&2){let e=s().$implicit,i=s(2);h("title",i.isB2BUser?e("USER_PRICE"):e("PER_UNIT"))("priceLoaded",!0)("currencyCode",i.unitPrice.currencyCode)("price",i.unitPrice.amount)("discountApplied",H(1,5,i.lineItem,i.pricingDisplaySetting()))}}function Xs(t,r){if(t&1&&(T(0,"ppg-price",31),g(1,"lineItemHasDiscount")),t&2){let e=s(3);h("title",e.translateBySiteType("SHARED.PRICE.TOTAL_PRICE"))("priceLoaded",!0)("currencyCode",e.totalCurrencyCode(e.lineItem))("price",e.totalPrice(e.lineItem))("showVolume",!1)("discountApplied",H(1,7,e.lineItem,e.pricingDisplaySetting()))("priceBeforeDiscount",e.beforeDiscountPrice(e.lineItem))}}function Zs(t,r){if(t&1&&(c(0,"div",33),T(1,"p-divider",34),d(),T(2,"ppg-price",35)),t&2){let e=s().$implicit,i=s(2);a(2),h("title",e("TOTAL_ECO_FEE"))("priceLoaded",!0)("currencyCode",i.lineItem.ecoFee.currencyCode)("price",i.lineItem.ecoFee.amount)("showVolume",!1)}}function el(t,r){if(t&1&&(c(0,"div",33),T(1,"p-divider",34),d(),T(2,"ppg-price",36)),t&2){let e=r,i=s(2).$implicit,o=s(2);a(2),h("title",i("TINTING_FEE")+":")("priceLoaded",!0)("currencyCode",o.tintingFeeCurrencyCode(e))("price",o.tintingFeePrice(e))("showVolume",!1)}}function tl(t,r){if(t&1&&m(0,el,3,5),t&2){let e,i=s(3);f((e=i.lineItem==null||i.lineItem.serviceItems==null?null:i.lineItem.serviceItems.tinting)?0:-1,e)}}function il(t,r){if(t&1&&(c(0,"div",30),m(1,Qs,4,8)(2,Xs,2,10,"ppg-price",31)(3,Zs,3,5)(4,tl,1,1),d()),t&2){let e=s(2);a(),f(e.unitPrice?1:-1),a(),f(e.totalPrice(e.lineItem)?2:-1),a(),f(e.showEcoFee&&e.lineItem.ecoFee?3:-1),a(),f(e.showTintingFee?4:-1)}}function ol(t,r){t&1&&(c(0,"p-message",15),T(1,"span",37),g(2,"transloco"),d()),t&2&&(a(),h("innerHTML",v(2,1,"ORDERS.POSSIBILITY_OF_REORDERING_INFO"),kt))}function nl(t,r){if(t&1){let e=k();c(0,"div",1)(1,"p-card",2),m(2,js,2,5,"div",3),c(3,"div",4)(4,"div",5)(5,"div",6),w("click",function(){A(e);let o=s();return N(o.openProduct("link",o.item))})("keydown.enter",function(){A(e);let o=s();return N(o.openProduct("link",o.item))}),T(6,"img",7),c(7,"h5",8),p(8),d()(),c(9,"div",9),m(10,qs,5,2,"div",10)(11,Ys,5,2,"div",10)(12,zs,5,2,"div",10),c(13,"div",10)(14,"span",11),p(15),d(),c(16,"span",12),p(17),d()(),m(18,Ws,5,2,"div",10)(19,Js,5,2,"div",10),d()(),m(20,il,5,4,"div",13),d(),c(21,"div",4)(22,"div",14),m(23,ol,3,3,"p-message",15),d(),c(24,"div",16)(25,"div",17)(26,"p-button",18),w("onClick",function(){A(e);let o=s();return N(o.openProduct("cta",o.item))}),d()()()()()()}if(t&2){let e,i=r.$implicit,o=s();a(2),f((e=o.globalSettings())!=null&&e.showFavorites&&o.isInCatalogProduct()?2:-1),a(3),h("ngClass",j(18,Ks,o.isActiveProduct())),Ee("tabindex",o.isActiveProduct()?0:null)("role",o.isActiveProduct()?"link":null),a(),ni("alt",o.item.name),h("src",o.item.frontImage,ae),a(2),O(o.item.name),a(2),f((o.item.isSample||!o.item.isNonPaintItem)&&o.item.colorDisplay?10:-1),a(),f(o.item.sheen&&o.sheenEnabled()?11:-1),a(),f(o.item.size?12:-1),a(3),y("",i("QUANTITY"),":"),a(2),O(o.item.quantity),a(),f(o.hasViewCustomColorTintBasePermission()&&o.item.tintBase?18:-1),a(),f(o.isB2BUser?19:-1),a(),h("translocoRead","SHARED.PRICE"),a(3),f(!o.isInCatalogProduct()&&o.reorderProductsNotInCatalogEnabled?23:-1),a(3),h("label",i(o.buttonLabel))("disabled",!(o.isInCatalogProduct()||o.reorderProductsNotInCatalogEnabled)||o.disabled()||!o.isSameSiteOrder()||o.isQuickAddBlockedByEcommerce())}}var Xi=(()=>{class t{#e;#t;#o;#n;#i;#r;#s;#l;#c;#d;#f;#h;#u;#p;#a;#m;get unitPrice(){return this.#t.getUnitPriceForLineItem(this.lineItem,this.pricingDisplaySetting())}get buttonLabel(){return this.isInCatalogProduct()?this.globalSettings()?.redirectToProductDetailsEnabled?"ADD_TO_CART":"QUICK_ADD":this.reorderProductsNotInCatalogEnabled?"REORDER_PRODUCTS_NOT_IN_CATALOG":"NOT_AVAILABLE"}constructor(){this.isInCatalogProduct=D(!0),this.reorderProductsNotInCatalogEnabled=!1,this.showEcoFee=!1,this.showTintingFee=!1,this.disabled=D(!1),this.isSameSiteOrder=D(!0),this.isStoreOrderView=!1,this.modalDialog=new Ao,this.PrimeIcons=on,this.Permissions=G,this.PricingDisplaySetting=me,this.#e=l(Fi),this.#t=l(Bn),this.#o=l(Nt),this.#n=l(Ue),this.#i=l(be),this.#r=l(De),this.#s=l(hi),this.#l=l(le),this.#c=l(Me),this.#d=l(Ve),this.#f=l(ye),this.#h=l(It),this.globalSettings=b(this.#s.globalSettings$),this.pricingDisplaySetting=b(this.#l.pricingDisplaySettings$),this.hasViewCustomColorTintBasePermission=b(this.#i.hasPermission(this.Permissions.VIEW_CUSTOM_COLOR_TINTBASE)),this.#u=ee(!1),this.isFavorite=this.#u.asReadonly(),this.isActiveProduct=_(()=>this.isInCatalogProduct()&&!this.disabled()&&this.isSameSiteOrder()&&!this.isQuickAddBlockedByEcommerce()),this.isQuickAddBlockedByEcommerce=_(()=>this.#p()||!this.globalSettings()?.redirectToProductDetailsEnabled&&!this.#c.isECommerceEnabled()),this.#p=ee(!1),this.#a=ee(!1),this.#m=_(()=>this.#r.getPathByAppRouteFeatureModule(ge.ProductJourneyDetails)),this.sheenEnabled=b(this.#l.paintProductsSupportSheenAttributeFeatureFlag$),this.#b=e=>e.customColorInformation?.product?this.#R(e.customColorInformation.product.masterVariant?.assets):e.frontImage,this.#R=e=>e[0]?.sources?.filter(i=>i.contentType==="Front")?.sort((i,o)=>o.dimensions.width-i.dimensions.width)[0]?.uri??e[0]?.sources?.filter(i=>i.contentType==="ProductFront")?.sort((i,o)=>o.dimensions.width-i.dimensions.width)[0]?.uri,this.#o.favoriteProductsGroupsIds$.pipe(te(),ne(()=>{this.#u.set(this.#T(this.item))})).subscribe()}ngOnInit(){this.item=this.#C(this.lineItem)}translateBySiteType(e,i){return this.#e.translateBySiteType(e,i)}totalCurrencyCode(e){return this.pricingDisplaySetting()===me.ShowNet?e?.totalPrice?.currencyCode:e?.externalGrossTotalPrice?.currencyCode}totalPrice(e){return this.pricingDisplaySetting()===me.ShowNet?e?.totalPrice?.amount:e?.externalGrossTotalPrice?.amount}beforeDiscountPrice(e){return this.pricingDisplaySetting()===me.ShowNet?e.externalTotalPriceBeforeDiscount?.amount:e.externalGrossPriceBeforeDiscount?.amount}tintingFeePrice(e){return this.pricingDisplaySetting()===me.ShowNet?e.totalNetPrice?.amount:e.totalGrossPrice?.amount}tintingFeeCurrencyCode(e){return this.pricingDisplaySetting()===me.ShowNet?e.totalNetPrice?.currencyCode:e.totalGrossPrice?.currencyCode}openProduct(e,i){return Yt(this,null,function*(){if((this.isInCatalogProduct()||this.reorderProductsNotInCatalogEnabled)&&!this.disabled()&&this.isSameSiteOrder()){if(this.globalSettings().redirectToProductDetailsEnabled){this.#_(i);return}if(!(this.isQuickAddBlockedByEcommerce()||this.#a())){this.#a.set(!0);
29try{let n=yield this.#h.checkEcommerceEnabledLive();if(n.status!=="enabled"){n.status==="disabled"&&this.#p.set(!0);return}if(this.isQuickAddBlockedByEcommerce()){this.#p.set(!0);return}this.#g(e,i)}finally{this.#a.set(!1)}}}})}#g(e,i){this.#d.configureGoogleAnalytics(e,this.lineItem.sku),this.modalDialog.emit({orderDetailsLineItem:i,isInCatalogProduct:this.isInCatalogProduct()})}#_(e){let i=e.slug||Gr(e.name,e.productGroupId),o=`${this.#m()}/${i}`,n={[En]:e.colorCode,[Rn]:e.colorPaletteCode,sku:e.exportCatalogSku,job:this.job?.key,[Pn]:this.quoteName??void 0,[An]:this.quoteId??void 0};this.#f.navigate([o],{queryParams:n})}#C(e){let i="ReadyMixed";if(e.isInCatalogProduct){if(e.isSample)return this.#x(e);if(e.tintedProduct)return this.#S(e);if(e.customColorInformation)return this.#y(e);if(e.productType==="Non Paint")return this.#D(e);if(e.itemTypes?.find(o=>o===i))return this.#O(e);{let o=V(B({},e),{customColorInformation:{}}),n=this.#y(o);return V(B({},n),{colorName:null,colorDisplay:null})}}else return e.tintedProduct?this.#S(e):e.customColorInformation?this.#y(e):e.itemTypes?.find(o=>o===i)?this.#O(e):this.#D(e)}#v(e){let i=e.tintedProduct.colorName?`${e.tintedProduct.colorName} ${e.tintedProduct.colorCode}`:`${e.tintedProduct.colorCode}`,o=e.color;return this.isStoreOrderView?o:i}#S(e){return{showSku:e.showSku,frontImage:this.#b(e),colorDisplay:this.#v(e),colorName:e.tintedProduct.colorName,colorHex:e.tintedProduct.hexColorCode,colorPaletteCode:e.tintedProduct.paletteCode,colorPaletteName:e.tintedProduct.paletteName,colorCode:e.tintedProduct.colorCode,colourbankProductCode:e.colourbankProductCode,netVolume:e.netVolume,volumeUOM:e.volumeUOM,size:e.size,name:e.productName,nameInEnglish:e.productNameInEnglish,sheen:e.finishTypeGlossGrade,quantity:e.quantity,sku:e.sku,exportCatalogSku:e.exportCatalogSku,productGroupId:e.productGroupId,isNonPaintItem:!1,isCustomColor:!1,slug:e.slug??null}}#y(e){let i=e.customColorInformation.product?{netVolume:e.customColorInformation.product.masterVariant.netVolume,volumeUOM:e.customColorInformation.product.masterVariant.volumeUOM,size:`${e.customColorInformation.product.masterVariant.netVolume} ${e.customColorInformation.product.masterVariant.volumeUOM}`,name:e.customColorInformation.product.name,nameInEnglish:e.customColorInformation.product.name,sheen:e.customColorInformation.product?.masterVariant.finishTypeGlossGrade,sku:e.customColorInformation.configurableMaterialSku,exportCatalogSku:e.exportCatalogSku,productGroupId:e.customColorInformation.product.masterVariant.productGroupID}:{netVolume:e.netVolume,volumeUOM:e.volumeUOM,size:e.netVolume!=null&&e.volumeUOM!=null?`${e.netVolume} ${e.volumeUOM}`:null,name:e.productName,nameInEnglish:e.productNameInEnglish,sheen:e.finishTypeGlossGrade,sku:e.sku,productGroupId:e.productGroupId};return V(B({showSku:e.showSku,frontImage:this.#b(e),colorDisplay:e.customColorInformation.description??lt("ORDERS.DETAILS.CUSTOM_COLOR"),colorName:e.customColorInformation.description??lt("ORDERS.DETAILS.CUSTOM_COLOR"),quantity:e.quantity},i),{exportCatalogSku:e.exportCatalogSku,isNonPaintItem:!1,isCustomColor:!0,tintBase:e.customColorInformation?.tintBase,slug:e.slug??null})}#D(e){return{showSku:e.showSku,frontImage:this.#b(e),colorDisplay:"",colorName:"",size:e.size,netVolume:null,volumeUOM:null,name:e.productName,nameInEnglish:e.productNameInEnglish,sheen:e.finishTypeGlossGrade,quantity:e.quantity,sku:e.sku,exportCatalogSku:e.exportCatalogSku,productGroupId:e.productGroupId,isNonPaintItem:!0,isCustomColor:!1,slug:e.slug??null}}#O(e){return!e.size&&e.netVolume!=null&&e.volumeUOM!=null&&(e.size=`${e.netVolume} ${e.volumeUOM}`),{showSku:e.showSku,frontImage:this.#b(e),colorDisplay:e.color,colorName:e.color,colorHex:e.colorHex,size:e.size,netVolume:null,volumeUOM:null,name:e.productName,nameInEnglish:e.productNameInEnglish,sheen:e.finishTypeGlossGrade,quantity:e.quantity,sku:e.sku,exportCatalogSku:e.exportCatalogSku,productGroupId:e.productGroupId,isNonPaintItem:!1,isCustomColor:!1,slug:e.slug??null}}#x(e){return{showSku:e.showSku,frontImage:this.#b(e),colorDisplay:e.tintedProduct?this.#v(e):e.color,colorName:e.tintedProduct?.colorName??e.color,colorHex:e.tintedProduct?.hexColorCode??e.colorHex,colorCode:e.tintedProduct?.colorCode,colorPaletteCode:e.tintedProduct?.paletteCode,colorPaletteName:e.tintedProduct?.paletteName,size:e.size,netVolume:null,volumeUOM:null,name:e.productName,nameInEnglish:e.productNameInEnglish,sheen:e.finishTypeGlossGrade,quantity:e.quantity,sku:e.sku,exportCatalogSku:e.exportCatalogSku,productGroupId:e.productGroupId,isNonPaintItem:e.productType==="Non Paint",isCustomColor:!1,isSample:!0,slug:e.slug??null}}#T(e){return this.#o.isProductInFavoriteProductsGroupsIds(e?.productGroupId)}
29favoriteIconClick(e){this.#T(e)?this.#E(e):this.#I(e)}#I(e){this.#o.addToFavorites(e.productGroupId).subscribe({complete:()=>{this.#u.set(!0),this.#n.success("FAVORITES.SAVED")},error:()=>{this.#n.error("NOTIFICATION.FAILURE.ADD_FAVORITE")}})}#E(e){this.#o.removeFromFavorites(e.productGroupId).subscribe({complete:()=>{this.#u.set(!1),this.#n.success("FAVORITES.REMOVED")},error:()=>{this.#n.error("NOTIFICATION.FAILURE.REMOVE_FAVORITE")}})}#b;#R;static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["ppg-order-product-card"]],inputs:{lineItem:"lineItem",isInCatalogProduct:[1,"isInCatalogProduct"],reorderProductsNotInCatalogEnabled:"reorderProductsNotInCatalogEnabled",showEcoFee:"showEcoFee",showTintingFee:"showTintingFee",locale:"locale",disabled:[1,"disabled"],isB2BUser:"isB2BUser",isSameSiteOrder:[1,"isSameSiteOrder"],job:"job",quoteId:"quoteId",quoteName:"quoteName",isStoreOrderView:"isStoreOrderView"},outputs:{modalDialog:"modalDialog"},standalone:!1,decls:1,vars:1,consts:[["id","order-product-card","class","h-full relative",4,"transloco","translocoRead"],["id","order-product-card",1,"h-full","relative"],["styleClass","h-full"],[1,"favorite-icon"],[1,"grid"],[1,"col-11","md:col-9","lg:col-11","flex-column","gap-3"],[1,"card-image","flex","gap-3",3,"click","keydown.enter","ngClass"],["data-test-id","product.image","fallbackImage","",3,"src","alt"],["data-test-id","product.title",1,"product-title","m-0"],[1,"flex","flex-column","gap-2","mt-3"],[1,"flex","gap-2"],["data-test-id","product.quantityLabel"],["data-test-id","product.quantity",1,"font-bold"],["class","col-12 md:col-3 lg:col-12 flex-column gap-3 align-content-end justify-content-start md:justify-content-end lg:justify-content-start",4,"transloco","translocoRead"],[1,"col-12","md:col-9","lg:col-12"],["data-test-id","product.reorderInfoMessage","severity","info","icon","pi pi-info-circle"],[1,"col-12","md:col-3","lg:col-12","flex"],[1,"w-full","align-content-end"],["data-test-id","product.quickAddButton","styleClass","w-full","outlined","true",1,"w-full",3,"onClick","label","disabled"],["data-test-id","product.favoriteButton","severity","contrast",3,"onClick","icon","text","outlined","disabled","ariaLabel"],["data-test-id","product.colorLabel"],["data-test-id","product.color",1,"font-bold"],["data-test-id","product.sheenLabel"],["data-test-id","product.sheen",1,"font-bold"],["data-test-id","product.sizeLabel"],["data-test-id","product.size",1,"font-bold"],["data-test-id","product.tintBaseLabel"],["data-test-id","product.tintBase",1,"font-bold"],["data-test-id","product.skuLabel"],["data-test-id","product.sku",1,"font-bold"],[1,"col-12","md:col-3","lg:col-12","flex-column","gap-3","align-content-end","justify-content-start","md:justify-content-end","lg:justify-content-start"],["styleClass","text-left md:text-right lg:text-left","data-test-id","product.totalPrice","size","large",3,"title","priceLoaded","currencyCode","price","showVolume","discountApplied","priceBeforeDiscount"],["styleClass","text-left md:text-right lg:text-left","data-test-id","product.userPrice","size","small",3,"title","priceLoaded","currencyCode","price","discountApplied"],[1,"flex","justify-content-start","md:justify-content-end","lg:justify-content-start","flex-wrap"],[1,"divider"],["styleClass","text-left md:text-right lg:text-left","data-test-id","product.ecoFeePrice","size","small",3,"title","priceLoaded","currencyCode","price","showVolume"],["styleClass","text-left md:text-right lg:text-left","size","small","data-test-id","product.tintingFeePrice",3,"title","priceLoaded","currencyCode","price","showVolume"],[3,"innerHTML"]],template:function(i,o){i&1&&m(0,nl,27,20,"div",0),i&2&&h("translocoRead","ORDERS.DETAILS")},dependencies:[zo,Q,or,ir,Te,M,In,fi,ie,hr],styles:["#order-product-card[_ngcontent-%COMP%]   .product-title[_ngcontent-%COMP%]{color:var(--p-pds-on-surface-primary-medium)}#order-product-card[_ngcontent-%COMP%]   .card-image[_ngcontent-%COMP%]{padding:0 .5rem .5rem}@media only screen and (max-width:576px){#order-product-card[_ngcontent-%COMP%]   .card-image[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:4rem;width:auto}}@media only screen and (min-width:576px){#order-product-card[_ngcontent-%COMP%]   .card-image[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:4rem;width:auto}}@media only screen and (min-width:768px){#order-product-card[_ngcontent-%COMP%]   .card-image[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:6.75rem;width:auto}}@media only screen and (min-width:1000px){#order-product-card[_ngcontent-%COMP%]   .card-image[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:4rem;width:auto}}#order-product-card[_ngcontent-%COMP%]   .card-image--active[_ngcontent-%COMP%]:hover{cursor:pointer}#order-product-card[_ngcontent-%COMP%]   .favorite-icon[_ngcontent-%COMP%]{position:absolute;top:1rem;right:1rem}#order-product-card[_ngcontent-%COMP%]   .card-image--active[_ngcontent-%COMP%]:focus-visible{outline:var(--spacing-3XS) solid var(--fg-brand-tertiary);outline-offset:var(--spacing-3XS);border-radius:var(--radius-2XS)}#order-product-card[_ngcontent-%COMP%]   .divider[_ngcontent-%COMP%]{display:block;max-width:5.75rem!important}"],changeDetection:0})}}return t})();var jt=t=>({price:t});function rl(t,r){t&1&&_e(0)}function al(t,r){if(t&1&&(c(0,"div",3)(1,"span",4),p(2),d()(),c(3,"div",5),m(4,rl,1,0,"ng-container",6),d()),t&2){let e=s(),i=at(10);a(2),y(" ",e.translateBySiteType("SHARED.PRICE.INITIAL_SUBTOTAL")," "),a(2),h("ngTemplateOutlet",i)("ngTemplateOutletContext",j(3,jt,e.initialSubtotalAmount()))}}function sl(t,r){t&1&&_e(0)}function ll(t,r){if(t&1&&(c(0,"div",7)(1,"span",8),p(2),d()(),c(3,"div",9),m(4,sl,1,0,"ng-container",6),d()),t&2){let e=s(),i=at(10);a(2),y(" ",e.translateBySiteType("SHARED.PRICE.SAVINGS")," "),a(2),h("ngTemplateOutlet",i)("ngTemplateOutletContext",j(3,jt,e.savingsAmount()))}}function cl(t,r){t&1&&_e(0)}function dl(t,r){if(t&1&&(c(0,"div",3)(1,"span",10),p(2),d()(),c(3,"div",11),m(4,cl,1,0,"ng-container",6),d()),t&2){let e=s(),i=at(10);a(2),y(" ",e.translateBySiteType("SHARED.PRICE.SUBTOTAL")," "),a(2),h("ngTemplateOutlet",i)("ngTemplateOutletContext",j(3,jt,e.subtotalAmount()))}}function ml(t,r){t&1&&_e(0)}function pl(t,r){if(t&1&&(c(0,"div",3)(1,"span",12),p(2),g(3,"transloco"),d()(),c(4,"div",13),m(5,ml,1,0,"ng-container",6),d()),t&2){let e=s(),i=at(10);a(2),y(" ",v(3,3,"SHARED.PRICE.TINTING_FEE")," "),a(3),h("ngTemplateOutlet",i)("ngTemplateOutletContext",j(5,jt,e.totalTintingFee()))}}function ul(t,r){t&1&&_e(0)}function fl(t,r){if(t&1&&m(0,ul,1,0,"ng-container",6),t&2){let e=s(2),i=at(10);h("ngTemplateOutlet",i)("ngTemplateOutletContext",j(2,jt,e.deliveryServiceFeeAmount()))}}function hl(t,r){t&1&&_e(0)}function _l(t,r){if(t&1&&m(0,hl,1,0,"ng-container",16),t&2){s(2);let e=at(12);h("ngTemplateOutlet",e)}}function gl(t,r){if(t&1&&(c(0,"div",14),p(1),d(),c(2,"div",15),m(3,fl,1,4,"ng-container")(4,_l,1,1,"ng-container"),d()),t&2){let e=s();a(),y(" ",e.deliveryServiceFeeLabel()," "),a(2),f(e.deliveryServiceFeeAmount()!==0?3:4)}}function Cl(t,r){if(t&1&&(T(0,"i",17),g(1,"transloco")),t&2){let e=s(3);ni("pTooltip",v(1,2,"SHARED.TAX.OTHER_TAXES_TOOLTIP")),h("tooltipEvent",e.isMobileDevice?"focus":"hover")}}function Sl(t,r){if(t&1&&(c(0,"div",3)(1,"span"),p(2),g(3,"transloco"),m(4,Cl,2,4,"i",17),d()(),c(5,"div",18)(6,"span"),p(7),g(8,"translocoCurrency"),d()()),t&2){let e=r.$implicit,i=s(2);a(),ti("data-field-description","tax-label-",e.name,""),ti("data-test-id","totalTaxPortion.",e.name,".label"),a(),y(" ",v(3,9,"SHARED.TAX.TAX_NAMES."+e.name)," "),a(2),f(e.name===i.otherTaxesName?4:-1),a(2),ti("data-test-id","totalTaxPortion.",e.name,".value"),a(),y(" ",H(8,11,e.amount,"symbol")," ")}}function vl(t,r){if(t&1&&Se(0,Sl,9,14,null,null,Fe),t&2){let e=s();ve(e.totalTaxPortions())}}function yl(t,r){if(t&1&&(c(0,"div",19)(1,"span",20),p(2),d()(),c(3,"div",21)(4,"span",22),p(5),g(6,"translocoCurrency"),d()()),t&2){let e,i,o=s();a(2),y(" ",(e=o.totalPriceLabel())!==null&&e!==void 0?e:o.translateBySiteType("SHARED.PRICE.TOTAL")," "),a(3),y(" ",H(6,2,(i=o.totalPrice())==null?null:i.amount,"symbol")," ")}}function Dl(t,r){if(t&1&&(T(0,"div",23),g(1,"translocoCurrency"),g(2,"transloco")),t&2){let e=r.price,i=r.priceTag;_t("p-hint-error",e==null),co("innerHTML","<",i||"span",` >
30      `,e!=null?H(1,6,e,"symbol"):v(2,9,"SHARED.UNAVAILABLE"),`
31      </`,i||"span",">",kt)}}function Ol(t,r){if(t&1&&T(0,"div",23),t&2){let e=r.priceTag,i=s();co("innerHTML","<",e||"span",` >
32        `,i.freeOfChargeLabel(),`
33      </`,e||"span",">",kt)}}var Zi=(()=>{class t{#e;#t;#o;#n;#i;#r;#s;constructor(){this.otherTaxesName="Other Taxes",this.cardInfoBackgroun
33d=Pi,this.#e=l(le),this.#t=l(Fi),this.subtotalPriceBeforeDiscount=D(null),this.grossPriceBeforeDiscount=D(null),this.subtotalDiscount=D(null),this.grossSavings=D(null),this.grossPrice=D(null),this.subTotalPrice=D(null),this.ecoFee=D(null),this.totalTax=D(null),this.totalPrice=D(null),this.totalPriceLabel=D(null),this.totalTaxPortions=D([]),this.pricingDisplaySetting=D(me.ShowNet),this.showEcoFee=D(!1),this.priceLoaded=D(!1),this.deliveryServiceFee=D(),this.showDeliveryServiceFee=D(!1),this.totalTintingFee=D(),this.showTintingFee=D(!1),this.subtractServiceItemsFeeFromSubtotal=D(!1),this.#o=ee(0),this.#n=l(Y),this.#i=l(ke),this.#r=l(Dr),this.#s=l(Me),this.deliveryServiceFeeLabel=_(()=>this.#n.getResourceByKey(C.REVIEW_ORDER_DELIVERY_FEE)),this.freeOfChargeLabel=_(()=>this.#n.getResourceByKey(C.REVIEW_ORDER_FREE_OF_CHARGE)),this.deliveryFeeEnabled=b(this.#e.deliveryFeeFeatureFlag$),this.initialSubtotalAmount=_(()=>{let e=this.pricingDisplaySetting()===me.ShowNet?this.subtotalPriceBeforeDiscount()?.amount:this.grossPriceBeforeDiscount()?.amount;return this.subtractServiceItemsFeeFromSubtotal()?e-this.#o():e}),this.savingsAmount=_(()=>this.pricingDisplaySetting()===me.ShowNet?this.subtotalDiscount()?.amount:this.grossSavings()?.amount),this.subtotalAmount=_(()=>{let e=this.pricingDisplaySetting()===me.ShowNet?this.subTotalPrice()?.amount:this.grossPrice()?.amount;return this.subtractServiceItemsFeeFromSubtotal()?e-this.#o():e}),this.deliveryServiceFeeAmount=_(()=>this.deliveryFeeEnabled()?(this.pricingDisplaySetting()===me.ShowNet?this.deliveryServiceFee()?.netPrice:this.deliveryServiceFee()?.grossPrice)?.amount:null),this.showTotalTaxPortions=_(()=>!this.#s.getSiteFlag(qe.OrderOverviewTaxInformationHidden)),this.isMobileDevice=this.#i.isMobileDevice(),Yo(()=>{this.#o.set(this.#r.getTotalServiceItemsFee([{serviceFeeTotalAmount:this.totalTintingFee(),isServiceFeeEnabled:this.showTintingFee()},{serviceFeeTotalAmount:this.deliveryServiceFeeAmount(),isServiceFeeEnabled:this.showDeliveryServiceFee()}]))},{allowSignalWrites:!0})}translateBySiteType(e,i){return this.#t.translateBySiteType(e,i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["ppg-order-details-summary"]],inputs:{subtotalPriceBeforeDiscount:[1,"subtotalPriceBeforeDiscount"],grossPriceBeforeDiscount:[1,"grossPriceBeforeDiscount"],subtotalDiscount:[1,"subtotalDiscount"],grossSavings:[1,"grossSavings"],grossPrice:[1,"grossPrice"],subTotalPrice:[1,"subTotalPrice"],ecoFee:[1,"ecoFee"],totalTax:[1,"totalTax"],totalPrice:[1,"totalPrice"],totalPriceLabel:[1,"totalPriceLabel"],totalTaxPortions:[1,"totalTaxPortions"],pricingDisplaySetting:[1,"pricingDisplaySetting"],showEcoFee:[1,"showEcoFee"],priceLoaded:[1,"priceLoaded"],deliveryServiceFee:[1,"deliveryServiceFee"],showDeliveryServiceFee:[1,"showDeliveryServiceFee"],totalTintingFee:[1,"totalTintingFee"],showTintingFee:[1,"showTintingFee"],subtractServiceItemsFeeFromSubtotal:[1,"subtractServiceItemsFeeFromSubtotal"]},standalone:!1,decls:13,vars:9,consts:[["priceTemplate",""],["freeOfChargeTemplate",""],[1,"grid","h-full"],[1,"col-6"],["data-test-id","orderDetailsSummary.initialSubtotalLabel"],["data-test-id","orderDetailsSummary.initialSubtotalValue",1,"col-6","font-bold","text-right","line-through"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"col-6","text-green-600"],["data-test-id","orderDetailsSummary.savingsLabel"],["data-test-id","orderDetailsSummary.savingsValue",1,"col-6","font-bold","text-right"],["data-test-id","orderDetailsSummary.subtotalLabel"],["data-test-id","orderDetailsSummary.subtotalValue",1,"col-6","font-bold","text-right"],["data-test-id","orderDetailsSummary.tintingFeeLabel"],["data-test-id","orderDetailsSummary.tintingFeeValue",1,"col-6","font-bold","text-right"],["data-test-id","deliveryFee.label","data-field-description","delivery-fee-label",1,"col-6","align-content-center"],["data-test-id","deliveryFee.amount","data-field-description","delivery-fee-value",1,"col-6","flex","align-content-center","justify-content-end","font-bold"],[4,"ngTemplateOutlet"],["tooltipPosition","top",1,"pi","pi-info-circle",2,"font-size","inherit","color","inherit",3,"pTooltip","tooltipEvent"],[1,"col-6","font-bold","text-right"],[1,"col-3","font-bold","text-xl","flex","align-items-center","mt-2"],["data-test-id","orderDetailsSummary.totalLabel",1,"flex","vertical-align-middle"],[1,"col-9","font-bold","text-3xl","text-right","mt-2"],["data-test-id","orderDetailsSummary.totalValue"],[3,"innerHTML"]],template:function(i,o){i&1&&(c(0,"p-card")(1,"div",2),m(2,al,5,5)(3,ll,5,5)(4,dl,5,5)(5,pl,6,7)(6,gl,5,2)(7,vl,2,0)(8,yl,7,5),d()(),m(9,Dl,3,11,"ng-template",null,0,mo)(11,Ol,1,4,"ng-template",null,1,mo)),i&2&&(ii(o.cardInfoBackgroun
33d),a(2),f(o.initialSubtotalAmount()&&o.savingsAmount()>0?2:-1),a(),f(o.savingsAmount()?3:-1),a(),f(o.subtotalAmount()!==null&&o.subtotalAmount()!==void 0?4:-1),a(),f(o.totalTintingFee()&&o.showTintingFee()?5:-1),a(),f(o.showDeliveryServiceFee()&&o.deliveryServiceFee()!==void 0&&o.deliveryServiceFee()!==null?6:-1),a(),f(o.showTotalTaxPortions()?7:-1),a(),f(o.totalPrice()!==null?8:-1))},dependencies:[di,M,Cn,ie,Tt],encapsulation:2})}}return t})();var bl=(t,r)=>({locale:t,cart:r}),Il=t=>({label:t,routerLink:"/",automationId:"orderDetails.home"}),El=(t,r)=>({label:t,routerLink:r,automationId:"orderDetails.orders"}),Rl=t=>({orderNumber:t}),Pl=t=>({label:t,automationId:"orderDetails.onlineOrders"}),Al=(t,r,e)=>[t,r,e];function Nl(t,r){if(t&1&&(T(0,"ppg-cdp-breadcrumbs",14),g(1,"transloco"),g(2,"transloco")),t&2){let e=s().$implicit,i=s(2);h("model",ci(14,Al,j(5,Il,v(1,1,"NAV.HOME")),Re(7,El,v(2,3,"NAV.ORDERS"),i.ordersListPageUrl()),j(12,Pl,e("ONLINE_ORDER",j(10,Rl,i.orderNumber)))))}}function Ll(t,r){if(t&1&&(c(0,"h1"),p(1),d()),t&2){let e=s(3);a(),y("#",e.orderNumber,"")}}function Fl(t,r){t&1&&T(0,"p-skeleton",6)}function wl(t,r){if(t&1&&(c(0,"div",7),p(1),g(2,"formatJobDisplay"),d()),t&2){let e=s(2),i=s();a(),si(" ",i.textResources().jobLabel,": ",v(2,2,e.job)," ")}}function Ml(t,r){if(t&1&&(c(0,"div",8),p(1),d()),t&2){let e=s(3);a(),y(" ",e.quoteInformation().quoteLabel," ")}}function Bl(t,r){if(t&1&&(c(0,"p-message",9),p(1),d()),t&2){let e,i=s(3);a(),y(" ",(e=i.textResources())==null?null:e.returnUnavailableMessage," ")}}function kl(t,r){if(t&1){let e=k();c(0,"p-button",19),g(1,"async"),g(2,"transloco"),w("onClick",function(){A(e);let o=s(3),n=s();return N(n.addAllItemsToCart(o.orderNumber))}),d()}if(t&2){let e=s(2).$implicit,i=s(2);h("disabled",v(1,2,i.addAllItemsDisabled$))("label",e(v(2,4,"ADD_ALL_ITEMS")))}}function Ul(t,r){if(t&1){let e=k();c(0,"p-button",20),w("onClick",function(){A(e);let o=s(3),n=s();return N(n.navigateToReturn(o.orderNumber,o.canBeReturned,o==null?null:o.returnActionUrl))}),d()}if(t&2){let e,i=s(3),o=U(0),n=s();h("outlined",o)("label",(e=n.textResources())==null?null:e.returnItemsButton)("disabled",!(i!=null&&i.canBeReturned)||!n.orderNumber)}}function Vl(t,r){if(t&1){let e=k();c(0,"ppg-get-documents-button",21),w("clicked",function(){A(e);let o=s(4);return N(o.onGetDocumentsClick())}),d()}if(t&2){s(3);let e=U(0),i=U(2),o=s();h("isLoading",o.getDocumentsInFlight())("isOutlined",e||i)}}function Hl(t,r){if(t&1&&(c(0,"a",18),g(1,"async"),T(2,"span",22),p(3),g(4,"transloco"),d()),t&2){let e=s(2).$implicit,i=s(2);h("href",v(1,2,i.invoiceBlobUri$),ae),a(3),y("",e(v(4,4,"VIEW_ORDER_INVOICE"))," ")}}function $l(t,r){if(t&1&&(c(0,"div",10),m(1,kl,3,6,"p-button",15)(2,Ul,1,3,"p-button",16)(3,Vl,1,2,"ppg-get-documents-button",17)(4,Hl,5,6,"a",18),d()),t&2){s(2);let e=U(0),i=U(2),o=U(4),n=U(5);a(),f(e?1:-1),a(),f(i?2:-1),a(),f(o?3:-1),a(),f(n?4:-1)}}function Gl(t,r){if(t&1){let e=k();c(0,"ppg-order-product-card",24),g(1,"async"),g(2,"async"),w("modalDialog",function(o){let n=A(e).$implicit,u=s(),S=s(2),I=s();return N(I.openProductDialog(o,n,S,u.locale,u.cart))}),d()}if(t&2){let e=r.$implicit,i=s(),o=s(2),n=s();h("locale",i.locale)("lineItem",e)("showEcoFee",v(1,11,n.showEcoFee$))("showTintingFee",n.showTintingFee())("isInCatalogProduct",e.isInCatalogProduct)("isB2BUser",n.isB2BUser)("reorderProductsNotInCatalogEnabled",v(2,13,n.reorderProductsNotInCatalogEnabled$))("isSameSiteOrder",o.isSameSiteOrder)("job",o.job)("quoteId",n.quoteProductCardInfo().quoteId)("quoteName",n.quoteProductCardInfo().quoteName)}}function Kl(t,r){if(t&1&&Se(0,Gl,3,15,"ppg-order-product-card",23,Fe),t&2){let e=s(2);ve(e.lineItems)}}function jl(t,r){if(t&1&&(c(0,"p-card",27)(1,"span",28),p(2),d()()),t&2){let e=s(3),i=s();ii(i.cardInfoBackground),h("header",i.textResources().paymentStatusHeader),a(2),y(" ",i.paymentStatusResources()[e.paymentStatus]," ")}}function ql(t,r){if(t&1&&(c(0,"h2"),p(1),d(),T(2,"ppg-order-details-summary",25),g(3,"async"),g(4,"async"),m(5,jl,3,4,"p-card",26),g(6,"async")),t&2){let e=s().$implicit,i=s(),o=s();a(),O(e("PRICE")),a(),h("subTotalPrice",i.subTotal)("subtotalPriceBeforeDiscount",i.totalPriceBeforeDiscount)("grossPriceBeforeDiscount",i.totalGrossPriceBeforeDiscount)("subtotalDiscount",i.totalDiscountAmount)("grossSavings",i.totalGrossDiscountAmount)("grossPrice",i==null?null:i.totalGross)("ecoFee",i.totalEcoFee)("showEcoFee",v(3,19,o.showEcoFee$))("showTintingFee",o.showTintingFee())("totalTintingFee",o.totalTintingFee())("totalTax",i.totalTax)("totalPrice",i.totalGross)("deliveryServiceFee",i.deliveryServiceFee)("showDeliveryServiceFee",o.showDeliveryFee())("totalTaxPortions",i.totalTaxPortions)("pricingDisplaySetting",v(4,21,o.pricingDisplaySetting$))("subtractServiceItemsFeeFromSubtotal",!0),a(3),f(i.paymentStatus&&(o.adyenPaymentEnabled()&&o.paymentSourceProvider()===o.PAYMENT_SOURCE_PROVIDER.Adyen||v(6,23,o.paymentCardsEnabled$)&&o.paymentSourceProvider()===o.PAYMENT_SOURCE_PROVIDER.CyberSource)?5:-1)}}function Yl(t,r){if(t&1&&(c(0,"div",0)(1,"div",2)(2,"div",3),m(3,Nl,3,18,"ppg-cdp-breadcrumbs",4),c(4,"div",5)(5,"h1"),p(6),d(),m(7,Ll,2,1,"h1")(8,Fl,1,0,"p-skeleton",6)(9,wl,3,4,"div",7)(10,Ml,2,1,"div",8)(11,Bl,2,1,"p-message",9)(12,$l,5,4,"div",10),d()(),c(13,"div",11)(14,"h2"),p(15),d(),m(16,Kl,2,0),g(17,"async"),g(18,"async"),d(),c(19,"div",12),T(20,"ppg-fulfillment-info-section",13),d(),c(21,"div",11),m(22,ql,7,25),g(23,"async"),d()()()),t&2){let e,i,o=r.$implicit,n=s(),u=U(2),S=U(6),I=s();a(6),O(o("ONLINE_ORDER_NO_TAG")),a(),f(I.orderNumber?7:I.showExternalOrderNumber&&n.paymentStatus!==I.PaymentStatus.Cancelled?8:-1),a(2),f(I.isB2BUser&&(n.job==null?null:n.job.name.length)>0?9:-1),a(),f(I.quoteInformation().showQuoteInformation?10:-1),a(),f(u&&!(n!=null&&n.canBeReturned)&&((e=I.textResources())!=null&&e.returnUnavailableMessage)?11:-1),a(),f(S?12:-1),a(3),O(o("PRODUCTS")),a(),f((i=Re(16,bl,v(17,10,I.locale$),v(18,12,I.cart$)))?16:-1,i),a(4),h("info",I.fulfillmentInfo()),a(2),f(v(23,14,I.showPrice$)?22:-1)}}function zl(t,r){if(t&1&&(re(0),g(1,"async"),re(2),g(3,"async"),re(4)(5)(6),m(7,Yl,24,19,"div",1)),t&2){let e=r,i=s(),o=J(v(1,1,i.reorderPreviousOrderEnabled$));a(2);let n=J(v(3,4,i.formStackReturnsEnabled$));a(2);let u=J(i.isAdvancedOrderHistoryVisible());a();let S=J(e.invoiceNumber!=null&&e.invoiceNumber!==""&&i.showInvoiceLink()&&
33!i.isInvoiceExpired());a(),J(o||n||u||S),a(),h("translocoRead","ORDERS.DETAILS")}}var zr=(()=>{class t{#e;#t;#o;#n;#i;#r;#s;#l;#c;#d;#f;#h;#u;#p;#a;#m;#g;#_;#C;#v;#S;#y;#D;#O;#x;#T;#I;#E;constructor(e,i,o,n,u,S,I,F,z,de,Bt,Ae,qt,ma,pa){this.orderService=e,this.activatedRoute=i,this.languageService=o,this.notificationService=n,this.router=u,this.cartService=S,this.marketBrandProviderService=I,this.countryStore=F,this.permissionService=z,this.favoritesService=de,this.mobileAppViewService=Bt,this.userInfoService=Ae,this.productVariantsService=qt,this.dialogService=ma,this.userService=pa,this.#e=l(De),this.#t=l(Y),this.#o=l(Le),this.#n=l(Me),this.#i=l(le),this.#r=l(hi),this.#s=l(Mr),this.#l=l(Oe),this.#c=l(nt),this.#d=l(Ve),this.#f=l(Qi),this.#h=l(Hr),this.#u=l(yi),this.#p=l(It),this.#a=ee(!1),this.#m=ee(!1),this.pricingDisplaySetting$=this.#i.pricingDisplaySettings$,this.#g=b(this.pricingDisplaySetting$),this.#_=_(()=>this.#u.getSiteFlag(qe.ProductIndexingEnabled)),this.isAdvancedOrderHistoryVisible=_(()=>this.orderService.isAdvancedOrderHistoryVisible()),this.textResources=_(()=>({returnItemsButton:this.#t.getResourceByKey(C.RETURN_ITEMS_BUTTON),returnUnavailableMessage:this.#t.getResourceByKey(C.RETURN_UNAVAILABLE_MESSAGE),paymentStatusHeader:this.#t.getResourceByKey(C.PAYMENT_STATUS_HEADER),projectLabel:this.#t.getResourceByKey(C.GENERIC_JOB_QUOTE_HEADER),noProject:this.#t.getResourceByKey(C.GENERIC_NO_QUOTE_OPTION),jobLabel:this.#t.getResourceByKey(C.GENERIC_JOB_HEADER)})),this.paymentStatusResources=_(()=>({[Je.Completed]:this.#t.getResourceByKey(C.PAYMENT_STATUS_COMPLETED),[Je.Refunded]:this.#t.getResourceByKey(C.PAYMENT_STATUS_REFUNDED),[Je.Cancelled]:this.#t.getResourceByKey(C.PAYMENT_STATUS_CANCELLED),[Je.Pending]:this.#t.getResourceByKey(C.PAYMENT_STATUS_PENDING),[Je.Expired]:this.#t.getResourceByKey(C.PAYMENT_STATUS_EXPIRED)})),this.ordersListPageUrl=_(()=>this.#e.getPathByAppRouteFeatureModule(ge.Order)),this.cart$=this.cartService.getCartJob(),this.mycart$=this.cartService.getMyCart(),this.locale$=this.languageService.currentLanguage$,this.#C=b(this.#i.deliveryContactFeatureFlag$),this.#v=b(this.#i.showOrderStatusFeatureFlag$),this.#S=this.#i.deliveryFulfilmentFromWarehouseFeatureFlag,this.showPrice$=this.permissionService.canViewPrices(),this.#y=b(this.showPrice$),this.showEcoFee$=this.#i.ecoFeeFeatureFlag$,this.showTintingFee=_(()=>this.#n.getSiteFlag(qe.ProductJourneyProductDetailsTintingFeeBreakdownIsEnabled)&&this.#y()),this.showDeliveryFee=b(this.#i.deliveryFeeFeatureFlag$),this.reorderProductsNotInCatalogEnabled$=this.#i.reorderProductsNotInCatalogFeatureFlag$,this.reorderPreviousOrderEnabled$=this.#i.reorderPreviousOrderFeatureFlag$,this.paymentCardsEnabled$=this.#i.creditCardsFeatureFlag$,this.formStackReturnsEnabled$=this.#i.formStackReturnsEnabledFeatureFlag$,this.orderStatusMessagesKeyValue=Ai,this.cardInfoBackground=Pi,this.adyenPaymentEnabled=b(this.#i.adyenPaymentFeatureFlag$),this.paymentSourceProvider=b(this.#r.paymentSettings$.pipe(te(this.#o),x(Ne=>Ne.paymentSourceProvider))),this.PAYMENT_SOURCE_PROVIDER=Sr,this.PaymentStatus=Je,this.#D=b($([this.#i.fulFillmentCutOffFeatureFlag$,this.#i.showStaticInformationFeatureFlag$]).pipe(x(([Ne,rt])=>Ne&&!rt))),this.order$=this.getOrder(),this.order=b(this.order$),this.totalTintingFee=_(()=>{let Ne=0;return this.order().lineItems.forEach(rt=>{rt.serviceItems?.tinting&&(Ne+=this.#g()===me.ShowNet?rt.serviceItems?.tinting.totalNetPrice?.amount:rt.serviceItems?.tinting.totalGrossPrice?.amount)}),Ne}),this.isB2BUser=this.userService.isB2BUser(),this.#O=_(()=>!this.#n.localizationTimeZoneHidden()),this.#x=l(_i).fieldAttributes,this.#T=b(this.countryStore.countries$),this.#I=b(this.#i.invoiceLocationSettings$),this.fulfillmentInfo=_(()=>this.#s.getFulfillmentInfo(this.order(),this.#T(),this.#x(),{showTimeZone:this.#O(),deliveryContactEnabled:this.#C(),fulfillmentCutOffEnabled:this.#D(),isShowOrderStatusEnabled:this.#v(),isB2BUser:this.userService.isB2BUser(),deliveryFulfilmentFromWarehouseEnabled:this.#S()},this.#I())),this.quoteReorderDisabled$=this.getQuoteReorderDisabled(),this.quoteReorderDisabled=b(this.quoteReorderDisabled$),this.quoteProductCardInfo=_(()=>({quoteId:this.quoteReorderDisabled()?void 0:this.order()?.quoteId,quoteName:this.quoteReorderDisabled()?void 0:this.order()?.quoteName})),this.quoteInformation=_(()=>{if(!this.order()?.quoteName)return{showQuoteInformation:!1,quoteLabel:null};let Ne=this.order()?.quoteName&&!this.order()?.quoteId?this.textResources().noProject:`${this.order()?.quoteName} - ${this.order()?.quoteId}`;return{showQuoteInformation:!0,quoteLabel:`${this.textResources().projectLabel}: ${Ne}`}}),this.addAllItemsDisabled$=this.getAddAllItemsDisabled(),this.getDocumentsIn
33Flight=ee(!1),this.documentLinkExpirationInDays=this.#i.documentLinkExpirationInDays,this.invoiceBlobUri$=this.getInvoiceUrl(),this.subscriptions=new zt,this.MASKS=jn,this.isInvoiceExpired=_(()=>Gt(this.order().orderDate,this.invoiceRetentionPeriodInDays())),this.#E=_(()=>this.userService.user()?.email??""),this.invoiceRetentionPeriodInDays=b(this.#i.invoiceRetentionPeriodInDays$),this.showInvoiceLink=b($([this.permissionService.hasPermission(G.VIEW_INVOICE),this.#i.onlineOrderInvoiceFeatureFlag$,this.mobileAppViewService.isMobileApplication()]).pipe(x(([Ne,rt,ua])=>Ne&&rt&&!ua))),this.loadFavorites(),this.loadOrderNumber()}openProductDialog(e,i,o,n,u){let S={product:{id:i.id,productGroupID:e.orderDetailsLineItem?.productGroupId,name:e.orderDetailsLineItem?.name,nameInEnglish:e.orderDetailsLineItem?.nameInEnglish,frontImage:e.orderDetailsLineItem?.frontImage,productType:i.productType,itemTypes:i.itemTypes,colourbankProductCode:e.orderDetailsLineItem?.colourbankProductCode,key:null,description:null,productSellable:!0},locale:n,init:{job:o.job,countryCode:o.country,jobSpecifiedItemName:null,sku:i.sku,exportCatalogSku:i.exportCatalogSku,color:this.mapColorData(e.orderDetailsLineItem,i,o.country),netVolume:e.orderDetailsLineItem?.netVolume,volumeUOM:e.orderDetailsLineItem?.volumeUOM,isCartEmpty:!u,quoteId:u?.quoteId??null,quoteName:u?.quoteName??null},openDialogTagData:{index:null,itemListId:Rt.OnlineOrderProductList,itemListName:Pt.OnlineOrderProductList},storeOrderNumber:i.storeOrderNumber,dialogView:Ni.ProductConfiguration},{index:I,itemListName:F,itemListId:z}=S.openDialogTagData;this.#d.openProductDialogGA(S.product.nameInEnglish,I,i,e.isInCatalogProduct,F,z),e.isInCatalogProduct?this.dialogService.open(Mi,{data:S,closable:!0}):this.dialogService.open(ki,{data:S,closable:!0})}addAllItemsToCart(e){return Yt(this,null,function*(){if(!this.#n.isECommerceEnabled()||this.#m())return;this.#m.set(!0);let i=yield this.#p.checkEcommerceEnabledLive();if(i.status!=="enabled"){i.status==="disabled"&&this.#a.set(!0),this.#m.set(!1);return}if(!this.#n.isECommerceEnabled()){this.#a.set(!0),this.#m.set(!1);return}(this.isB2BUser?this.cart$:this.mycart$).pipe(Z(1),L(o=>this.#b(o)),X(o=>o!==void 0),L(o=>this.#P(e,o).pipe(ue(n=>this.#R(n,e)))),ne(()=>this.#d.addToCartReorderAllGA()),L(o=>this.#F(o)),ne(({productsDetails:o,cartResponse:n,order:u,countryCode:S,locale:I})=>this.#w(o,n,u,S,I)),$e(()=>this.#m.set(!1))).subscribe()})}#b(e){return e?this.dialogService.open(Zn,{data:{translationPrefix:"ORDERS.CANCELED_ADD_ALL_PRODUCTS_WILL_CLEAR_CARD"},closable:!0}).onClose.pipe(Z(1)):K(!1)}#R(e,i){let o=e.errors?.[0]?.extensions?.code;return this.isB2BUser?o===Et.JobQuoteMismatch?this.#A(i):o===Et.BusinessLogicConflict?this.#N(i):Ge:Ge}#A(e){return $([this.cartService.getCartJob(),this.order$]).pipe(Z(1),L(([i,o])=>{let n=this.#t.getResourceSignal(C.GENERIC_ONE_JOB_QUOTE_MODAL_CONTENT,{cartJob:i?.job?.name??"",cartQuote:i?.quoteName??"",jobSelected:o.job?.name??"",quoteSelected:o.quoteName??""})();return this.#L(C.GENERIC_ONE_JOB_QUOTE_MODAL_HEADER,n)}),X(Boolean),L(()=>this.#P(e,!0)))}#N(e){return $([this.cart$,this.order$]).pipe(Z(1),L(([i,o])=>{let n=this.#t.getResourceSignal(C.GENERIC_ONLY_ONE_JOB_MODAL_CONTENT,{cartJob:i?.job?.name??"",jobSelected:o.job?.name??""})();return this.#L(C.GENERIC_ONLY_ONE_JOB_MODAL_HEADER,n)}),X(Boolean),L(()=>this.#P(e,!0)))}#P(e,i){return Do(this.#p.checkEcommerceEnabledLive()).pipe(ne(o=>{o.status==="disabled"&&this.#a.set(!0)}),X(o=>o.status==="enabled"),L(()=>this.cartService.addAllFromOrder(e,i)))}#L(e,i){return this.dialogService.open(wn,{header:this.#t.getResourceByKey(e),data:{bodyContent:i,cancelText:this.#t.getResourceByKey(C.GENERIC_CART_JOB_ERROR_MODAL_CANCEL),confirmText:this.#t.getResourceByKey(C.GENERIC_CART_JOB_ERROR_MODAL_CONFIRM)},width:Ht.Medium,modal:!0,focusOnShow:!0,closeOnEscape:!0,dismissableMask:!0,closable:!0}).onClose.pipe(Z(1))}#F(e){return $([this.#l.countryCode$,this.order$,this.languageService.currentLanguage$]).pipe(Z(1),L(([i,o,n])=>To(o.lineItems.map(u=>this.productVariantsService.getProductDetails({productGroupID:u.productGroupId},u.sku,i).pipe(Z(1)))).pipe(x(u=>({productsDetails:u,cartResponse:e,order:o,countryCode:i,locale:n})))))}#w(...e){let i=Fr(...e);this.dialogService.open(ar,{templates:{header:er},width:Ht.Large,dismissableMask:!0,closable:!0,data:{iconData:"pi-check-circle",translationPrefix:"SHARED.CONFIRMATION_MODAL",confirmationDialogInput:i}})}onGetDocumentsClick(){this.#d.advancedOrderHistoryGetDocumentsButtonClickGA(),ot(this.dialogService,this.#t,{dialogOptions:{variant:he.OrderDetails,placeholders:{orderNumber:this.orderNumber,email:this.#E(),expiryDays:this.documentLinkExpirationInDays()}},accept:()=>this.#M()})}
33#M(){this.getDocumentsInFlight()||(this.#d.advancedOrderHistorySendDocumentsButtonClickGA(),this.getDocumentsInFlight.set(!0),this.#c.getDocumentsByOrderNumber(this.orderNumber).pipe($e(()=>this.getDocumentsInFlight.set(!1)),te(this.#o)).subscribe({next:e=>{if(e){this.#d.advancedOrderHistoryGetDocumentsMessageSuccessGA(ce.AdvancedOrderHistoryOnlineOrderDetails),this.notificationService.successFromResources(C.ORDERS_HISTORY_GET_DOCUMENTS_SUCCESS_TITLE,C.ORDERS_HISTORY_GET_DOCUMENTS_SUCCESS_MSG);return}this.errorResultHandler()},error:()=>{this.errorResultHandler()}}))}errorResultHandler(){this.#d.advancedOrderHistoryGetDocumentsMessageErrorGA(ce.AdvancedOrderHistoryOnlineOrderDetails),this.notificationService.errorFromResources(C.ORDERS_HISTORY_GET_DOCUMENTS_ERROR_TITLE,C.ORDERS_HISTORY_GET_DOCUMENTS_ERROR_MSG)}navigateToReturn(e,i,o=null){let n=this.#e.getPathByAppRouteFeatureModule(ge.Order);n&&i&&this.router.navigateByUrl(`${n}/${Ie.OrdersOnline}/${e}/${Ie.OrdersReturn}`,{state:{returnUrl:o}})}ngOnDestroy(){this.subscriptions.unsubscribe()}getOrder(){let e=n=>{let S={[Et.Unauthorized]:"NOTIFICATION.FAILURE.UNAUTHORIZED",[Et.NotFound]:"NOTIFICATION.FAILURE.NOT_FOUND",[Et.NoOrderPermissionForJob]:"NOTIFICATION.FAILURE.NO_ORDER_PERMISSION_FOR_JOB"}[n?.errors?.[0]?.extensions?.code]??"NOTIFICATION.FAILURE.DEFAULT";return this.notificationService.error(S),this.router.navigateByUrl(this.ordersListPageUrl()),Oo(()=>n)},i=n=>{let u=$r(n);this.#d.pushViewItemListGA(u)},{orderKey:o}=this.activatedRoute.snapshot.params;return $([this.locale$,this.showPrice$]).pipe(L(([n,u])=>this.userService.isB2BUser()?this.orderService.getOrderByKey(o,n,u):this.orderService.getMyOrderByKey(o,n,u)),ue(e),x(n=>{let u=n?.data?.order;return u?V(B({},u),{paymentStatus:u.paymentStatus}):null}),L(n=>this.#B(n)),ne(i),bo(1))}#B(e){if(!this.#_())return K(e);if(!e?.lineItems?.length)return K(e);let i=this.#k(e.lineItems);return i.length===0?K(e):this.#f.fetchProductSlugs(i).pipe(x(o=>this.#U(e,o)),ue(()=>K(e)))}#k(e){return e.map(i=>i.productGroupId).filter(i=>!!i)}#U(e,i){let o=e.lineItems.map(n=>V(B({},n),{slug:i.get(n.productGroupId)||null}));return V(B({},e),{lineItems:o})}getAddAllItemsDisabled(){return $([this.order$,this.userInfoService.getUserInfo(),pi(this.#a),pi(this.#m),pi(this.#n.isECommerceEnabled)]).pipe(L(([e,i,o,n,u])=>{if(o||n||!u)return K(!0);let S=e.lineItems?.every(de=>de?.isInCatalogProduct),I=i.roleName===xi.PPG_MANAGER&&!rr(e.job,i),F=this.isB2BUser?e.job?.isActive:!0,z=!S||!F||I||!e.isSameSiteOrder;return this.quoteReorderDisabled$.pipe(x(de=>z||de))}))}getQuoteReorderDisabled(){return this.order$.pipe(L(e=>this.#h.isBlocked$(e.jobKey,e.quoteId,e.quoteName)))}mapColorData(e,i,o){let n={name:e.colorName,code:e.colorCode,hex:e.colorHex};return i.tintedProduct?{code:i.tintedProduct.colorCode,hex:i.tintedProduct.hexColorCode,name:i.tintedProduct.colorName,paletteCode:i.tintedProduct.paletteCode,paletteName:i.tintedProduct.paletteName,type:Qe.TintedColor}:i.customColorInformation?V(B({},n),{code:this.marketBrandProviderService.getMarketCustomColorFlow(o),hex:null,type:Qe.CustomColor}):V(B({},n),{type:Qe.ReadyMixedColor})}getInvoiceUrl(){return this.order$.pipe(L(e=>this.orderService.getOnlineOrderInvoiceByKey(e.orderNumber,e.invoiceNumber)),x(e=>{let i=e?.data?.onlineOrderInvoice?.invoiceUrl;return Xe(i)&&i!==""?i:(this.orderService.ShowUnexpectedDelayPopup(),"")}))}loadFavorites(){this.#i.showFavoritesFeatureFlag$.pipe(Z(1),X(Boolean),ne(()=>this.favoritesService.loadFavoriteProductsGroupsIds())).subscribe()}loadOrderNumber(){let{orderKey:e}=this.activatedRoute.snapshot.params;$([this.orderService.getOrder(e),this.#i.externalOrderIdSettings$]).pipe(te(this.#o),ue(()=>this.userService.isB2CUser()?this.#i.externalOrderIdSettings$.pipe(Z(1),ne(i=>{i.enabled&&this.addSubscription(i.retryDurationInMilliseconds,i.timeOutInMilliseconds,e)}),L(()=>Ge)):Ge)).subscribe(([i,o])=>{if(this.userService.isB2CUser()&&o.enabled){this.showExternalOrderNumber=o.enabled,i.externalOrderId!=null?this.orderNumber=i.externalOrderId:i.paymentStatus!==Je.Cancelled&&this.addSubscription(o.retryDurationInMilliseconds,o.timeOutInMilliseconds,e);return}this.orderNumber=i.orderNumber})}
33addSubscription(e,i,o){this.subscriptions.add(this.orderService.recursiveExternalIdCheck(e,i,o).subscribe(n=>{this.orderNumber=n.externalOrderId}))}static{this.\u0275fac=function(i){return new(i||t)(se(He),se(we),se(kn),se(Ue),se(ye),se(Ti),se(bt),se(Kn),se(be),se(Nt),se(ke),se(Ot),se(Li),se(xe),se(Be))}}static{this.\u0275cmp=E({type:t,selectors:[["ppg-order-details"]],standalone:!1,decls:2,vars:3,consts:[[1,"layout-container"],["class","layout-container",4,"transloco","translocoRead"],[1,"grid"],[1,"col-12","flex","flex-column","gap-3"],["data-test-id","orderDetails.breadcrumbs",3,"model",4,"ppgHideOnMobileAppView"],["data-test-id","orderDetails.title"],["height","2.5rem","width","12.5rem","styleClass","mb-2"],["data-test-id","orderDetails.jobDetails",1,"overflow-hidden","text-overflow-ellipsis"],["data-test-id","orderDetails.quoteDetails",1,"overflow-hidden","text-overflow-ellipsis"],["styleClass","w-full lg:w-auto mt-4","data-test-id","orderDetails.returnUnavailableMessage","icon","pi pi-times-circle","severity","error",1,"flex"],["data-test-id","orderDetails.actions",1,"mt-4","mb-2","flex","flex-column","lg:flex-row","flex-wrap","align-items-stretch","lg:align-items-center","gap-2"],[1,"col-12","lg:col-4","flex","flex-column","gap-3","mt-4"],[1,"col-12","lg:col-4","mt-4"],[3,"info"],["data-test-id","orderDetails.breadcrumbs",3,"model"],["data-test-id","orderDetails.addAllItemsButton","styleClass","w-full lg:w-auto",3,"disabled","label"],["data-test-id","orderDetails.returnItemsButton","styleClass","w-full lg:w-auto",3,"outlined","label","disabled"],[1,"w-full","lg:w-auto",3,"isLoading","isOutlined"],["target","_blank","rel","noopener noreferrer","data-test-id","orderDetails.viewInvoiceLink",1,"p-button","p-button-link","w-full","lg:w-auto","justify-content-start","lg:justify-content-center","px-0",3,"href"],["data-test-id","orderDetails.addAllItemsButton","styleClass","w-full lg:w-auto",3,"onClick","disabled","label"],["data-test-id","orderDetails.returnItemsButton","styleClass","w-full lg:w-auto",3,"onClick","outlined","label","disabled"],[1,"w-full","lg:w-auto",3,"clicked","isLoading","isOutlined"],[1,"mr-2","pi","pi-file-pdf"],[3,"locale","lineItem","showEcoFee","showTintingFee","isInCatalogProduct","isB2BUser","reorderProductsNotInCatalogEnabled","isSameSiteOrder","job","quoteId","quoteName"],[3,"modalDialog","locale","lineItem","showEcoFee","showTintingFee","isInCatalogProduct","isB2BUser","reorderProductsNotInCatalogEnabled","isSameSiteOrder","job","quoteId","quoteName"],[3,"subTotalPrice","subtotalPriceBeforeDiscount","grossPriceBeforeDiscount","subtotalDiscount","grossSavings","grossPrice","ecoFee","showEcoFee","showTintingFee","totalTintingFee","totalTax","totalPrice","deliveryServiceFee","showDeliveryServiceFee","totalTaxPortions","pricingDisplaySetting","subtractServiceItemsFeeFromSubtotal"],["data-test-id","orderDetails.paymentStatus",3,"style","header"],["data-test-id","orderDetails.paymentStatus",3,"header"],["data-test-id","orderDetails.spanWithPaymentStatus"]],template:function(i,o){if(i&1&&(m(0,zl,8,10,"div",0),g(1,"async")),i&2){let n;f((n=v(1,1,o.order$))?0:-1,n)}},dependencies:[Q,At,Te,M,fi,Nn,Dt,We,Xi,Zi,Lr,St,ie,ur],encapsulation:2})}}return t})();var Wl=(t,r)=>({number:t,name:r}),Jl=(t,r,e,i,o,n,u)=>({shippingAddressStateShortCode:t,fulfillmentStateShortCode:r,fulfillmentDateTime:e,locale:i,lineItems:o,reorderProductsNotInCatalogEnabled:n,productCardJobInfo:u}),Ql=t=>({label:t,routerLink:"/",automationId:"storeOrderDetails.breadcrumbHome"}),Xl=(t,r)=>({label:t,routerLink:r,automationId:"storeOrderDetails.breadcrumbOrders"}),Zl=t=>({orderNumber:t}),ec=t=>({label:t,automationId:"storeOrderDetails.breadcrumbStoreOrder"}),tc=(t,r,e)=>[t,r,e],ic=()=>({dateStyle:"medium"}),oc=t=>({storeNumber:t});function nc(t,r){if(t&1&&(T(0,"ppg-cdp-breadcrumbs",9),g(1,"transloco"),g(2,"transloco")),t&2){let e=s().$implicit,i=s(2);h("model",ci(14,tc,j(5,Ql,v(1,1,"NAV.HOME")),Re(7,Xl,v(2,3,"NAV.ORDERS"),i.ordersListPageUrl()),j(12,ec,e(i.showOrderNumber()?"ORDER":"STORE_ORDER",j(10,Zl,i.orderTag())))))}}function rc(t,r){if(t&1){let e=k();c(0,"ppg-get-documents-button",12),w("clicked",function(){A(e);let o=s(4);return N(o.onGetDocumentsClick())}),d()}if(t&2){let e=s(4);
33h("isLoading",e.getDocumentsInFlight())}}function ac(t,r){if(t&1){let e=k();c(0,"p-button",13),g(1,"transloco"),w("onClick",function(){A(e);let o=s(3),n=s();return N(n.viewInvoice(o.transactionNumber,o.invoiceNumber))}),d()}if(t&2){let e=s(2).$implicit;h("label",e(v(1,2,"VIEW_ORDER_INVOICE")))("text",!0)}}function sc(t,r){if(t&1&&(c(0,"div",8),m(1,rc,1,1,"ppg-get-documents-button",10)(2,ac,2,4,"p-button",11),d()),t&2){s(2);let e=U(0),i=U(1);a(),f(e?1:-1),a(),f(i?2:-1)}}function lc(t,r){if(t&1){let e=k();c(0,"ppg-order-product-card",23),w("modalDialog",function(o){let n=A(e).$implicit,u=s(4);return N(u.openProductDialog(o,n))}),d()}if(t&2){let e=r.$implicit,i=s(),o=s(3);h("locale",i.locale)("lineItem",e)("showTintingFee",o.showTintingFee())("isInCatalogProduct",e.isInCatalogProduct)("reorderProductsNotInCatalogEnabled",i.reorderProductsNotInCatalogEnabled)("isB2BUser",o.isB2BUser)("job",i.productCardJobInfo==null?null:i.productCardJobInfo.job)("quoteId",i.productCardJobInfo==null?null:i.productCardJobInfo.quoteId)("quoteName",i.productCardJobInfo==null?null:i.productCardJobInfo.quoteName)("isStoreOrderView",!0)}}function cc(t,r){if(t&1&&(c(0,"p-card",18),p(1),d()),t&2){let e=s(2).$implicit,i=s(),o=s();h("header",i.shippingMethodName===o.shippingMethodNames.Delivery?e("DELIVERY_NOTES"):e("PICK_UP_NOTES")),a(),y(" ",i.fulfillmentInstructions," ")}}function dc(t,r){if(t&1&&(c(0,"p-card",20)(1,"div"),p(2),d(),c(3,"div"),p(4),d(),c(5,"div"),p(6),d()()),t&2){let e,i,o,n=s(2).$implicit,u=s(2);h("header",n("DELIVERY_LOCATION")),a(2),O((e=u.shippingLocalAddress())==null?null:e.address1),a(2),O((i=u.shippingLocalAddress())==null?null:i.address2),a(2),O((o=u.shippingLocalAddress())==null?null:o.details)}}function mc(t,r){if(t&1&&(c(0,"div"),p(1),d()),t&2){let e=s(3).$implicit,i=s();a(),O(e("STORE_NUMBER",j(1,oc,i.fulfillmentStoreNumber)))}}function pc(t,r){if(t&1&&(c(0,"div"),p(1),d(),c(2,"div"),p(3),d(),c(4,"div"),p(5),d()),t&2){let e=s(5);a(),O(e.fulfillmentStoreLocalAddress().address1),a(2),O(e.fulfillmentStoreLocalAddress().address2),a(2),O(e.fulfillmentStoreLocalAddress().details)}}function uc(t,r){if(t&1&&(c(0,"p-card",21),m(1,mc,2,3,"div")(2,pc,6,3),d()),t&2){let e=s(2).$implicit,i=s(),o=s();h("header",e("PICK_UP_LOCATION")),a(),f(i.fulfillmentStoreNumber?1:-1),a(),f(o.fulfillmentStoreLocalAddress()?2:-1)}}function fc(t,r){if(t&1&&(c(0,"h2"),p(1),d(),T(2,"ppg-order-details-summary",24),g(3,"transloco")),t&2){let e=s(2).$implicit,i=s();a(),O(e("PRICE")),a(),h("totalPriceLabel",v(3,3,"SHARED.PRICE.TOTAL_NET"))("totalPrice",i.totalPrice)}}function hc(t,r){if(t&1&&(c(0,"div",14)(1,"h2"),p(2),d(),Se(3,lc,1,10,"ppg-order-product-card",15,Fe),d(),c(5,"div",14)(6,"h2"),p(7),d(),c(8,"p-card",16),p(9),d(),c(10,"p-card",17),p(11),d(),m(12,cc,2,2,"p-card",18),c(13,"p-card",19),g(14,"transloco"),p(15),g(16,"fulfillmentDatePipe"),g(17,"translocoDate"),d(),m(18,dc,7,4,"p-card",20)(19,uc,3,3,"p-card",21),c(20,"p-card",22)(21,"div"),p(22),d(),c(23,"div"),p(24),g(25,"digitsOnly"),g(26,"mask"),d(),c(27,"div"),p(28),d()()(),c(29,"div",14),m(30,fc,4,5),g(31,"async"),d()),t&2){let e=r,i=s().$implicit,o=s(),n=s();a(2),O(i("PRODUCTS")),a(),ve(e.lineItems),a(4),O(i("ORDER_DETAILS")),a(),h("header",i("FULFILLMENT_TYPE")),a(),y(" ",o.shippingMethodName===n.shippingMethodNames.Delivery?i("DELIVERY"):i("PICK_UP")," "),a(),h("header",n.resources().poNumber),a(),y(" ",o.purchaseOrder," "),a(),f(o.fulfillmentInstructions?12:-1),a(),h("header",v(14,16,o.shippingMethodName===n.shippingMethodNames.Delivery?"ORDERS.CREATE_ORDER.FORM.DELIVERY_DATE":"ORDERS.CREATE_ORDER.FORM.PICKUP_DATE")),a(2),y(" ",H(17,20,v(16,18,e.fulfillmentDateTime),je(30,ic))," "),a(3),f(o.shippingMethodName===n.shippingMethodNames.Delivery?18:-1),a(),f(o.shippingMethodName===n.shippingMethodNames.PickUp?19:-1),a(),h("header",o.shippingMethodName===n.shippingMethodNames.Delivery?i("DELIVERY_CONTACT"):i("PICK_UP_CONTACT")),a(2),O(o.fulfillmentContactName),a(2),O(H(26,25,v(25,23,o.fulfillmentContactPhone),n.fieldAttributes().mask)),a(4),O(o.fulfillmentContactEmail),a(2),f(v(31,28,n.includePrice$)?30:-1)}}function _c(t,r){if(t&1&&(c(0,"div",0)(1,"div",2)(2,"div",3),m(3,nc,3,18,"ppg-cdp-breadcrumbs",4),c(4,"div",5)(5,"h1",6),p(6),d(),c(7,"h1",7),p(8),d(),p(9),d(),m(10,sc,3,2,"div",8),d(),m(11,hc,32,31),g(12,"async"),g(13,"async"),g(14,"async"),g(15,"async"),g(16,"async"),g(17,"async"),g(18,"async"),d()()),t&2){let e,i=r.$implicit,o=s(),n=U(2),u=s();a(6),y(" ",i(u.showOrderNumber()?"ORDER_NO_TAG":"STORE_ORDER_NO_TAG")," "),a(2),O("#"+u.orderTag()),a(),y(" ",i("BILLED_TO",Re(19,Wl,o.accountNumber,o.jobName))," "),a(),f(n?10:-1),a(),f((e=qo(22,Jl,v(12,5,u.shippingAddressStateShortCode$),v(13,7,u.fulfillmentStateShortCode$),v(14,9,u.fulfillmentDateTime$),v(15,11,u.locale$),v(16,13,u.lineItems$),v(17,15,u.reorderProductsNotInCatalogEnabled$),v(18,17,u.productCardJobInfo$)))?11:-1,e)}}function gc(t,r){if(t&1&&(re(0)(1)(2),m(3,_c,19,30,"div",1)),t&2){let e=r,i=s(),o=J(i.isAdvancedOrderHistoryVisible());a();let n=J(e.invoiceNumber!=null&&e.invoiceNumber!==""&&i.showInvoiceLink());a(),J(o||n),a(),h("translocoRead","ORDERS.DETAILS")}}var Wr=(()=>{class t{#e;#t;#o;#n;#i;#r;#s;#l;#c;#d;#f;#h;#u;#p;#a;#m;#g;#_;#C;#v;#S;#y;#D;#O;#x;#T;#I;#E;#b;constructor(){this.#e=l(De),this.#t=l(Ve),this.#o=l(vt),this.#n=l(Ji),this.#i=l(Oe),this.#r=l(we),this.#s=l(ye),this.#l=l(Li),this.#c=l(He),this.#d=l(nt),this.#f=l(Ui),this.#h=l(Qi),this.#u=l(sr),this.#p=l(bt),this.#a=l(Ue),this.#m=l(le),this.#g=l(ke),this.#_=l(Y),this.#C=l(Ti),this.#v=l(mn),this.#S=l(Nt),this.#y=l(xe),this.#D=l(be),this.#O=l(Le),this.#x=l(Be),this.#T=l(Me),this.#I=l(yi),this.#E=_(()=>this.#I.getSiteFlag(qe.ProductIndexingEnabled)),this.isAdvancedOrderHistoryVisible=_(()=>this.#c.isAdvancedOrderHistoryVisible()),this.fieldAttributes=l(_i).fieldAttributes,this.shippingMethodNames=P,this.getDocumentsIn
33Flight=ee(!1),this.documentLinkExpirationInDays=this.#m.documentLinkExpirationInDays,this.#b=_(()=>this.#x.user()?.email??""),this.isB2BUser=this.#x.isB2BUser(),this.locale$=this.#i.language$,this.ordersListPageUrl=_(()=>this.#e.getPathByAppRouteFeatureModule(ge.Order)),this.showPrice=b(this.#D.canViewPrices()),this.showTintingFee=_(()=>this.#T.getSiteFlag(qe.ProductJourneyProductDetailsTintingFeeBreakdownIsEnabled)&&this.showPrice()),this.orderSub=new Wt(null),this.shippingAddressStateShortCodeSub=new Wt(null),this.fulfillmentStateShortSub=new Wt(null),this.subscriptions=new zt,this.includePrice$=this.#l.isPricingEnabled(),this.order=b(this.orderSub.asObservable(),{initialValue:void 0}),this.resources=_(()=>({poNumber:this.#_.getResourceByKey(C.ORDER_DETAILS_PO_NUMBER)})),this.#R=b(this.shippingAddressStateShortCodeSub.asObservable(),{initialValue:void 0}),this.#A=b(this.fulfillmentStateShortSub.asObservable(),{initialValue:void 0}),this.shippingLocalAddress=_(()=>{let i=this.order()?.shippingAddress,o=this.#R();return!i||!this.#N(o)||!this.#n.isLoaded()?null:this.#n.getLocalOrderAddress(i,o.code)}),this.fulfillmentStoreLocalAddress=_(()=>{let i=this.order()?.fulfillmentStoreAddress,o=this.#A();return!i||!this.#N(o)||!this.#n.isLoaded()?null:this.#n.getLocalOrderAddress(i,o.code)}),this.showInvoiceLink=b($([this.#D.hasPermission(G.VIEW_INVOICE),this.#m.inStoreOrderInvoiceFeatureFlag$,this.#g.isMobileApplication()]).pipe(x(([e,i,o])=>e&&i&&!o))),this.showOrderNumber=_(()=>this.#T.eCommerceOrderDetailsUsingOrderNumberEnabled()),this.orderTag=b(this.orderSub.asObservable().pipe(X(e=>!!e),x(e=>this.showOrderNumber()&&e.orderNumber?e.orderNumber:e.transactionNumber))),this.totalTintingFee=_(()=>{let e=0;return this.order().lineItems.forEach(i=>{i.serviceItems?.tinting&&(e+=i.serviceItems?.tinting.totalNetPrice?.amount)}),e})}#R;#A;#N(e){return e?e.isCodeRequired?!!e.code:!0:!1}ngOnInit(){let{orderKey:e}=this.#r.snapshot.params;this.reorderProductsNotInCatalogEnabled$=this.#m.reorderProductsNotInCatalogFeatureFlag$;let i=this.#i.countryCode$.pipe(X(n=>!!n),x(n=>this.#p.getMarket(n)),x(n=>n.key));this.order$=$([this.locale$,this.includePrice$,i]).pipe(L(([n,u,S])=>this.#f.getStoreOrderDetails(e,u,n,S)),ue(n=>{throw this.#a.error("NOTIFICATION.FAILURE.NOT_FOUND"),this.#s.navigateByUrl(this.ordersListPageUrl()),n}),ne(n=>{n.error||this.#t.storeOrderDetailsInitGA(n.data)}),x(n=>{let u=n.data.storeOrder,S=u.shippingMethodName==="PickUp"?this.shippingMethodNames.PickUp:u.shippingMethodName;return V(B({},u),{shippingMethodName:S})}),ne(n=>this.orderSub.next(n))),this.shippingAddressStateShortCode$=this.orderSub.pipe(X(n=>n!=null),L(n=>this.#c.getShortStateCode(n.shippingAddress)),ne(n=>this.shippingAddressStateShortCodeSub.next(n))),this.fulfillmentStateShortCode$=this.orderSub.pipe(X(n=>n?.fulfillmentStoreAddress!=null),L(n=>this.#c.getShortStateCode(n.shippingAddress)),ne(n=>this.fulfillmentStateShortSub.next(n))),this.fulfillmentDateTime$=this.orderSub.pipe(X(n=>n!=null),x(n=>({timeZoneId:n.fulfillmentStoreTimeZoneId,utcDateTime:n.fulfillmentDateTime}))),this.lineItems$=this.orderSub.pipe(X(n=>n!=null),x(n=>this.#f.mapToLineItemsWithAvailability(n.lineItems)),L(n=>this.#P(n))),this.cartJob$=this.#C.getCartJob(),this.mycart$=this.#C.getMyCart();let o=this.orderSub.pipe(X(n=>n!=null),L(n=>this.#u.getJobsByAccountNumber(n.accountNumber,1)),x(n=>n.totalCount===1?n.items[0]:null));this.productCardJobInfo$=$([o,this.cartJob$]).pipe(x(([n,u])=>({job:u?.job??n??void 0,quoteId:u?.quoteId??null,quoteName:u?.quoteName??null}))),this.areFavoritesEnabled$=this.#m.showFavoritesFeatureFlag$,this.subscriptions.add(this.areFavoritesEnabled$.pipe(ne(n=>{n&&this.#S.loadFavoriteProductsGroupsIds()})).subscribe())}openProductDialog(e,i){let{orderDetailsLineItem:o,isInCatalogProduct:n}=e,u=this.orderSub.pipe(L(S=>this.#u.getJobsByAccountNumber(S.accountNumber,1)),x(S=>S.totalCount===1?S.items[0]:null));$([this.locale$,u,this.order$,this.cartJob$]).pipe(Z(1)).subscribe(([S,I,F,z])=>{let de={product:{id:i.id,productGroupID:o.productGroupId,name:o.name,nameInEnglish:o.nameInEnglish,frontImage:o.frontImage,productType:i.productType,itemTypes:i.itemTypes,colourbankProductCode:o.colourbankProductCode,key:null,description:null,size:o.size,isNonPaintItem:o.isNonPaintItem,productSellable:!0},locale:S,init:{job:z?.job??I,quoteId:z?.quoteId??null,quoteName:z?.quoteName??null,countryCode:F.country,jobSpecifiedItemName:null,sku:i.sku,exportCatalogSku:i.exportCatalogSku,color:this.mapColorData(o,i),netVolume:o.netVolume,volumeUOM:o.volumeUOM,sheen:o.sheen,isCartEmpty:this.#v.cartItemsTotalQuantity()===0},openDialogTagData:{index:null,itemListName:Pt.AllOrderProductList,itemListId:Rt.AllOrderProductList},storeOrderNumber:F.orderNumber,dialogView:Ni.ProductConfiguration};this.#t.storeOrderOpenProductDailogGA(de,i),n?this.#y.open(Mi,{data:de,closable:!0}):this.#y.open(ki,{data:de,closable:!0})})}#P(e){if(!this.#E())return K(e);if(!e?.length)return K(e);let i=this.#L(e);return i.length===0?K(e):this.#h.fetchProductSlugs(i).pipe(x(o=>this.#F(e,o)),ue(()=>K(e)))}#L(e){return e.map(i=>i.productGroupId).filter(i=>!!i)}#F(e,i){return e.map(o=>V(B({},o),{slug:i.get(o.productGroupId)||null}))}mapColorData(e,i){let o={name:e.colorName,code:e.colorCode,hex:e.colorHex};return i.tintedProduct?V(B({},o),{paletteCode:e.colorPaletteCode,paletteName:e.colorPaletteName,type:Qe.TintedColor}):e.isCustomColor&&!e.colorName?null:i.customColorInformation?V(B({},o),{code:this.#p.getMarketCustomColorFlow(this.countryCode),hex:null,type:Qe.CustomColor}):V(B({},o),{type:Qe.ReadyMixedColor})}ngOnDestroy(){this.subscriptions.unsubscribe()}onGetDocumentsClick(){this.#t.advancedOrderHistoryGetDocumentsButtonClickGA(),ot(this.#y,this.#_,{dialogOptions:{variant:he.OrderDetails,placeholders:{orderNumber:this.orderTag()??"",email:this.#b(),expiryDays:this.documentLinkExpirationInDays()}},accept:()=>this.#w()})}
33#w(){if(this.getDocumentsInFlight())return;let e=this.order(),i=e?.orderNumber||e?.transactionNumber;e?.transactionNumber&&(this.#t.advancedOrderHistorySendDocumentsButtonClickGA(),this.getDocumentsInFlight.set(!0),this.#d.getDocumentsByStoreOrder(e.transactionNumber,i,e.accountNumber).pipe($e(()=>this.getDocumentsInFlight.set(!1)),te(this.#O)).subscribe({next:o=>{if(o){this.#t.advancedOrderHistoryGetDocumentsMessageSuccessGA(ce.AdvancedOrderHistoryStoreOrderDetails),this.#a.successFromResources(C.ORDERS_HISTORY_GET_DOCUMENTS_SUCCESS_TITLE,C.ORDERS_HISTORY_GET_DOCUMENTS_SUCCESS_MSG);return}this.errorResultHandler()},error:()=>{this.errorResultHandler()}}))}errorResultHandler(){this.#t.advancedOrderHistoryGetDocumentsMessageErrorGA(ce.AdvancedOrderHistoryStoreOrderDetails),this.#a.errorFromResources(C.ORDERS_HISTORY_GET_DOCUMENTS_ERROR_TITLE,C.ORDERS_HISTORY_GET_DOCUMENTS_ERROR_MSG)}viewInvoice(e,i){this.#c.getStoreOrderInvoiceByKey(e,i).pipe(te(this.#O)).subscribe(o=>{this.invoiceBlobUri=o?.data?.storeOrderInvoice?.invoiceUrl,Xe(this.invoiceBlobUri)&&this.invoiceBlobUri!==""?this.#o.open(this.invoiceBlobUri,"_blank"):this.#c.ShowUnexpectedDelayPopup()})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["app-store-order-details"]],standalone:!1,decls:2,vars:3,consts:[[1,"layout-container"],["class","layout-container",4,"transloco","translocoRead"],[1,"grid"],[1,"col-12","flex","flex-column","gap-5"],["data-test-id","storeOrderDetails.breadcrumbs",3,"model",4,"ppgHideOnMobileAppView"],["data-test-id","storeOrderDetails.title"],["data-test-id","storeOrderDetails.titlePrefix"],["data-test-id","storeOrderDetails.titleOrderValue"],["data-test-id","storeOrderDetails.actions",1,"mt-4","mb-2","flex","flex-column","lg:flex-row","flex-wrap","align-items-stretch","lg:align-items-center","gap-2"],["data-test-id","storeOrderDetails.breadcrumbs",3,"model"],[1,"w-full","lg:w-auto",3,"isLoading"],["icon","pi pi-file-pdf","styleClass","w-full lg:w-auto justify-content-start lg:justify-content-center p-0 text-left font-bold",3,"label","text"],[1,"w-full","lg:w-auto",3,"clicked","isLoading"],["icon","pi pi-file-pdf","styleClass","w-full lg:w-auto justify-content-start lg:justify-content-center p-0 text-left font-bold",3,"onClick","label","text"],[1,"col-12","lg:col-4","flex","flex-column","gap-3"],[3,"locale","lineItem","showTintingFee","isInCatalogProduct","reorderProductsNotInCatalogEnabled","isB2BUser","job","quoteId","quoteName","isStoreOrderView"],["data-test-id","storeOrderDetails.fulfillmentType",3,"header"],["data-test-id","storeOrderDetails.purchaseOrder",3,"header"],["data-test-id","storeOrderDetails.deliveryOrPickUpNotes",3,"header"],["data-test-id","storeOrderDetails.deliveryOrPickUpDate",3,"header"],["data-test-id","storeOrderDetails.deliveryLocation",3,"header"],["data-test-id","storeOrderDetails.pickUpLocation",3,"header"],["data-test-id","storeOrderDetails.deliveryOrPickUpContact",3,"header"],[3,"modalDialog","locale","lineItem","showTintingFee","isInCatalogProduct","reorderProductsNotInCatalogEnabled","isB2BUser","job","quoteId","quoteName","isStoreOrderView"],[3,"totalPriceLabel","totalPrice"]],template:function(i,o){if(i&1&&(m(0,gc,4,4,"div",0),g(1,"async")),i&2){let n;f((n=v(1,1,o.order$))?0:-1,n)}},dependencies:[Q,At,Te,M,Dt,We,Xi,Zi,St,ie,xt,Lt,Bi,vi],encapsulation:2})}}return t})();function Cc(t,r){if(t&1&&T(0,"ppg-iframe-widget",0),t&2){let e=s();h("content",e.content())}}var Jr=(()=>{class t{#e;constructor(){this.#e=l(Ci),this.content=ee(null)}ngOnInit(){this.content.set({iframeUrl:this.#e.data?.url,frameBorder:0,widthDesktop:"100%",heightDesktop:"500px",heightMobile:"400px",scrolling:!0})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["app-invoice-display-dialog"]],decls:1,vars:1,consts:[["data-test-id","invoice-iframe",3,"content"]],template:function(i,o){if(i&1&&m(0,Cc,1,1,"ppg-iframe-widget",0),i&2){let n;f((n=o.content())!=null&&n.iframeUrl?0:-1)}},dependencies:[Fn],encapsulation:2})}}return t})();var Qr=(()=>{class t{constructor(){this.ref=l(gn),this.config=l(Ci)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["ppg-confirmation-dialog-header"]],decls:7,vars:1,consts:[["data-test-id","invoice-dialog-header",1,"flex","justify-content-end","align-items-start","gap-2","text-xl","font-bold"],["data-test-id","invoice-dialog-download-button","target","_blank","rel","noopener noreferrer",1,"p-button","p-button-link",3,"href"],[1,"pds-icon"],["href","assets/pds-icons.svg#download-circle-outline"],["data-test-id","invoice-dialog-close-button","type","button",1,"dialog-icon-button",3,"click"],["href","assets/pds-icons.svg#close-outline"]],template:function(i,o){i&1&&(c(0,"div",0)(1,"a",1),so(),c(2,"svg",2),T(3,"use",3),d()(),Ro(),c(4,"button",4),w("click",function(){return o.ref.close()}),so(),c(5,"svg",2),T(6,"use",5),d()()()),i&2&&(a(),h("href",o.config.data==null?null:o.config.data.url,ae))},styles:["[_nghost-%COMP%]{width:100%}.dialog-icon-button[_ngcontent-%COMP%]{background:transparent;border:none;cursor:pointer;padding:var(--p-pds-unit-100);border-radius:var(--p-pds-radii-200);color:var(--p-pds-on-surface-neutral-ultra-strong)}"]})}}return t})();var eo=(()=>{class t{#e=l(Ct);#t=l(Xo);#o=l(xe);#n=l(vt);open(e,i){if(!e||typeof e!="string")throw new Error("Invalid URL provided");let o=["http:","https:"],n;try{n=new URL(e)}catch{throw new Error("Malformed URL provided")}if(!o.includes(n.protocol))throw new Error(`Unsafe URL protocol: ${n.protocol}`);if(i?.preferIosDialog&&this.#i()&&i.dialogComponent){this.#o.open(i.dialogComponent,{data:{url:e},header:"",width:i.dialogWidth,dismissableMask:!0,closable:!0,templates:i.dialogHeaderComponent?{header:i.dialogHeaderComponent}:void 0});return}let u=this.#e.createElement("a");u.href=e,u.target="_blank",u.rel="noopener",this.#e.body.appendChild(u),u.click(),this.#e.body.removeChild(u)}#i(){if(!this.#t.IOS)return!1;let e=this.#n.navigator.userAgent;return!/CriOS|FxiOS|OPiOS|EdgiOS/.test(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Xr(t){return[{id:"online-order-number",title:{value:"ORDERS.TABLE_COLUMN.ORDER_NUMBER",translate:!0},field:"orderNumber",sortable:!0,templateKey:"orderNumber"},{id:"online-order-date",title:{value:"ORDERS.TABLE_COLUMN.ORDER_DATE",translate:!0},field:"orderDate",sortable:!0,templateKey:"orderDate"},{id:"online-po-number",title:{value:"ORDERS.TABLE_COLUMN.PO_NUMBER",translate:!0},field:"pONumber",sortable:!0,cellClass:"u-overflow-wrap-anywhere",isVisible:()=>t.isB2BUser},{id:"online-customer-name",title:{value:"ORDERS.TABLE_COLUMN.CUSTOMER",translate:!0}
33,field:"customerName",sortable:!1,cellClass:"u-overflow-wrap-anywhere",isVisible:()=>t.isB2BUser},{id:"online-account-number",title:{value:"ORDERS.TABLE_COLUMN.ACCOUNT_NUMBER",translate:!0},field:"accountNumber",sortable:!1,isVisible:()=>t.isB2BUser},{id:"online-job-name",title:{value:"ORDERS.TABLE_COLUMN.JOB_NAME",translate:!0},field:"jobName",sortable:!1,cellClass:"u-overflow-wrap-anywhere",isVisible:()=>t.isB2BUser},{id:"online-order-total",title:{value:"ORDERS.TABLE_COLUMN.ORDER_TOTAL",translate:!0},field:"orderTotal",sortable:!1,templateKey:"orderTotal",isVisible:()=>t.canViewPrices},{id:"online-fulfillment-datetime",title:{value:"ORDERS.TABLE_COLUMN.FULFILLMENT_DATETIME",translate:!0},field:"fulfillmentDateTime",sortable:!0,templateKey:"fulfillmentDateTime"},{id:"online-order-status",title:{value:"ORDERS.TABLE_COLUMN.ORDER_STATUS",translate:!0},field:"currentStatus",sortable:!1,templateKey:"orderStatus",isVisible:()=>t.showOrderStatus}]}var to=class{constructor(r,e,i,o,n,u,S,I,F="-",z="-",de,Bt,Ae){this.orderNumber=r,this.externalOrderId=e,this.accountNumber=i,this.invoiceNumber=o,this.orderDate=n,this.jobName=u,this.orderTotal=S,this.currencyCode=I,this.customerName=F,this.pONumber=z,this.fulfillmentDateTime=de,this.currentStatus=Bt,this.currentStatusReason=Ae}};function io(t){return{search:{placeholder:{value:t.searchPlaceholder,translate:t.translateSearchPlaceholder??!0},onSearch:t.onSearch},title:t.title,titleIcon:t.titleIcon}}function Zr(t,r,e){return{tableData:b(r,{initialValue:null}),isTableLoading:b(e,{initialValue:!0}),currentDateRange:b(t.dateRange$,{initialValue:{from:null,to:null}})}}function ea(t,r){return{columns:t.columns,header:t.header,paginatorPhoneVersion:t.paginatorPhoneVersion,data:r.data,loading:r.loading,noRecordsMessage:t.noRecordsMessage,showPaginator:t.showPaginator,pageSizes:t.pageSizes,forceMobileView:t.forceMobileView,itemActivePredicate:t.itemActivePredicate,tableStyleClass:t.tableStyleClass,styleClass:t.styleClass,onPageSizeChange:r.onPageSizeChange,onPageNumberChange:r.onPageNumberChange,onSortChange:r.onSortChange}}function ta(t,r){t.updateSource(i=>r().loadData(i));let e=r().defaultSort;e&&t.updateSort(e)}var oo=(()=>{class t extends lr{#e;constructor(){super(l(ct)),this.tableDataFacade=l(ct),this.deviceService=l(gi),this.permissionsService=l(be),this.mobileAppViewService=l(ke),this.isMobile=b(this.deviceService.observePrimeNgBreakpoint(wi.Phone),{initialValue:!1}),this.#e=Zr(this.tableDataFacade,this.data$,this.loading$),this.tableData=this.#e.tableData,this.isTableLoading=this.#e.isTableLoading,this.currentDateRange=this.#e.currentDateRange,this.tableConfig=_(()=>ea(this.tableDefinition(),{data:this.tableData(),loading:this.isTableLoading(),onPageSizeChange:e=>this.pageSizeHandler(e),onPageNumberChange:e=>this.changePageHandler(e),onSortChange:e=>this.sortHandler(e)}))}ngOnInit(){ta(this.tableDataFacade,this.tableDefinition)}createPermissionSignal(e){return b(this.permissionsService.hasPermission(e),{initialValue:!1})}createInvoiceVisibilitySignal(e){return b($([this.permissionsService.hasPermission(G.VIEW_INVOICE),e,this.mobileAppViewService.isMobileApplication()]).pipe(x(([i,o,n])=>i&&o&&!n)),{initialValue:!1})}createPaginatedSourceAdapter(e){return i=>e.fetch(i).pipe(x(({items:o,totalItemsCount:n})=>{let u=e.normalizeTotalItemsCount?e.normalizeTotalItemsCount(n):n;return{items:o.map(S=>e.mapRow(S)),pageNumber:i.pageNumber,pageSize:i.pageSize,pagesCount:u>0?Math.ceil(u/i.pageSize):0,totalItemsCount:u}}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=Ke({type:t,features:[ht]})}}return t})();var wt=(()=>{class t{#e=l(Ze);#t=l(Po);#o=l(vt);#n=l(Ct);#i=b(this.#e.callOutMessages,{initialValue:[]});isOverLimitCalloutDisplayed(e){return this.#i().some(i=>i.type===Ii.WARNING&&i.errorCode===e)}showOverLimitCallout(e,i,o){this.#e.addMessages(this.#r(e,i)),o&&Eo(this.#t,()=>{Zt(()=>{let n=o();n&&this.#s(n)})})}clearOverLimitCallout(e){this.#e.removeMessage({type:Ii.WARNING,errorCode:e})}#r(e,i){return{type:Ii.WARNING,errorCode:e,resourceKey:C.ORDERS_HISTORY_GET_DOCUMENTS_LIMIT_REACHED_MSG,resourceReplacements:{limit:String(i??"")}}}#s(e){let i=e.nativeElement;!i||!this.#l(i)||(i.scrollIntoView({block:"nearest"}),i.focus())}#l(e){let i=e.getBoundingClientRect(),o=this.#o.innerHeight||this.#n.documentElement.clientHeight||0;return i.top<0||i.bottom>o}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=W({token:t,factory:t.\u0275fac})}}return t})();function Sc(t,r){if(t&1){let e=k();c(0,"ppg-date-range-picker",2),w("opened",function(){A(e);let o=s();return N(o.onDateFilterOpened())})("rangeChange",function(o){A(e);let n=s();return N(n.onDateRangeChange(o))}),d()}if(t&2){let e=s(),i=U(0);h("label",i.label)("placeholder",i.placeholder)("ariaLabel",i.ariaLabel)("dateFormat",i.dateFormat)("formatHint",i.formatHint)("pickerClearedAnnouncement",i.cleared)("resultsFoundAnnouncementTemplate",i.resultsFound)("noResultsAnnouncement",i.noResults)("numberOfMonths",e.dateFilterNumberOfMonths())("resultsCount",e.filteredResultsCount())("disabled",e.controlsDisabled())("dataTestIdPrefix",e.dateRangePickerTestIdPrefix())}}function vc(t,r){if(t&1){let e=k();c(0,"ppg-get-documents-button",3),w("clicked",function(){A(e);let o=s();return N(o.onGetDocumentsClick())}),d()}if(t&2){let e=s();h("isDisabled",e.getDocumentsDisabled())("isLoading",e.getDocumentsLoading())("showNoDocumentsTooltip",e.showGetDocumentsNoDocumentsTooltip())}}var Mt=(()=>{class t{constructor(){this.#e=l(gi),this.#t=l(Y),this.showDateFilter=D(!1,{transform:st}),this.showGetDocumentsButton=D(!1,{transform:st}),this.controlsDisabled=D(!1,{transform:st}),this.getDocumentsDisabled=D(!1,{transform:st}),this.getDocumentsLoading=D(!1,{transform:st}),this.showGetDocumentsNoDocumentsTooltip=D(!1,{transform:st}),this.filteredResultsCount=D(null),this.dateRangePickerTestIdPrefix=D("orders.dateRangePicker"),this.dateRangeChange=Xt(),this.dateFilterOpened=Xt(),this.getDocumentsClick=Xt(),this.dateRangeResources=_(()=>({placeholder:this.#t.getResourceByKey(C.ORDERS_HISTORY_FILTER_BY_DATE_PLACEHOLDER),ariaLabel:this.#t.getResourceByKey(C.ORDERS_HISTORY_FILTER_BY_DATE_ARIA_LABEL),dateFormat:this.#t.getResourceByKey(C.ORDERS_HISTORY_FILTER_BY_DATE_FORMAT),label:this.#t.getResourceByKey(C.ORDERS_HISTORY_FILTER_BY_DATE_LABEL),formatHint:this.#t.getResourceByKey(C.ORDERS_HISTORY_FILTER_BY_DATE_FORMAT_HINT),cleared:this.#t.getResourceByKey(C.ORDERS_HISTORY_FILTER_CLEARED),resultsFound:this.#t.getResourceByKey(C.ORDERS_HISTORY_FILTER_RESULTS_FOUND),noResults:this.#t.getResourceByKey(C.ORDERS_HISTORY_FILTER_NO_RESULTS)})),this.isMobile=b(this.#e.observePrimeNgBreakpoint(wi.Phone),{initialValue:!1}),this.dateFilterNumberOfMonths=_(()=>this.isMobile()?1:2)}#e;#t;onDateRangeChange(e){this.dateRangeChange.emit(e)}onDateFilterOpened(){this.dateFilterOpened.emit()}onGetDocumentsClick(){this.getDocumentsClick.emit()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["ppg-order-history-table-header"]],inputs:{showDateFilter:[1,"showDateFilter"],showGetDocumentsButton:[1,"showGetDocumentsButton"],controlsDisabled:[1,"controlsDisabled"],getDocumentsDisabled:[1,"getDocumentsDisabled"],getDocumentsLoading:[1,"getDocumentsLoading"],showGetDocumentsNoDocumentsTooltip:[1,"showGetDocumentsNoDocumentsTooltip"],filteredResultsCount:[1,"filteredResultsCount"],dateRangePickerTestIdPrefix:[1,"dateRangePickerTestIdPrefix"]},outputs:{dateRangeChange:"dateRangeChange",dateFilterOpened:"dateFilterOpened",getDocumentsClick:"getDocumentsClick"},decls:3,vars:3,consts:[["tableHeaderFilters","",3,"label","placeholder","ariaLabel","dateFormat","formatHint","pickerClearedAnnouncement","resultsFoundAnnouncementTemplate","noResultsAnnouncement","numberOfMonths","resultsCount","disabled","dataTestIdPrefix"],["tableHeaderActions","",1,"w-full",3,"isDisabled","isLoading","showNoDocumentsTooltip"],["tableHeaderFilters","",3,"opened","rangeChange","label","placeholder","ariaLabel","dateFormat","formatHint","pickerClearedAnnouncement","resultsFoundAnnouncementTemplate","noResultsAnnouncement","numberOfMonths","resultsCount","disabled","dataTestIdPrefix"],["tableHeaderActions","",1,"w-full",3,"clicked","isDisabled","isLoading","showNoDocumentsTooltip"]],template:function(i,o){i&1&&(re(0),m(1,Sc,1,12,"ppg-date-range-picker",0)(2,vc,1,3,"ppg-get-documents-button",1)),i&2&&(J(o.dateRangeResources()),a(),f(o.showDateFilter()?1:-1),a(),f(o.showGetDocumentsButton()?2:-1))},dependencies:[Oi,We],styles:["[_nghost-%COMP%]{width:100%}"],changeDetection:0})}}return t})();var Dc=["overLimitCalloutContainer"],Oc=(t,r)=>[t,r];function Tc(t,r){if(t&1&&(c(0,"div",1,0),T(2,"app-call-out",10),d()),t&2){let e=s();a(2),h("messageSource$",e.callOutMessages$)}}function xc(t,r){if(t&1){let e=k();c(0,"ppg-order-history-table-header",11),w("dateFilterOpened",function(){A(e);let o=s();return N(o.onDateFilterOpened())})("dateRangeChange",function(o){A(e);let n=s();return N(n.onDateRangeChange(o))}),d()}if(t&2){let e=s();h("showDateFilter",!0)("filteredResultsCount",e.filteredResultsCount())("controlsDisabled",e.isDocumentActionLoading())}}function bc(t,r){if(t&1){let e=k();c(0,"ppg-order-history-table-header",12),w("getDocumentsClick",function(){A(e);let o=s(2);return N(o.getDocuments())}),d()}if(t&2){let e=s(2);h("showGetDocumentsButton",!0)("getDocumentsDisabled",e.shouldDisableGetDocumentsButton()||e.isDocumentActionLoading())("getDocumentsLoading",e.isDocumentActionLoading())("showGetDocumentsNoDocumentsTooltip",e.totalOrdersCount()===0)}}function Ic(t,r){t&1&&m(0,bc,1,4,"ng-template",4)}function Ec(t,r){if(t&1&&p(0),t&2){let e=r.row,i=s();y(" ",i.showExternalOrderId()?e.externalOrderId:e.orderNumber," ")}}function Rc(t,r){if(t&1&&(c(0,"a",13),p(1),g(2,"transloco"),g(3,"date"),d()),t&2){let e=s().row,i=s();h("routerLink",Re(7,Oc,i.onlineOrdersBaseUrl(),e.orderNumber)),a(),y(" ",H(3,4,e.orderDate,v(2,2,"DATE_FORMAT"))," ")}}function Pc(t,r){if(t&1&&(p(0),g(1,"transloco"),g(2,"date")),t&2){let e=s().row;y(" ",H(2,3,e.orderDate,v(1,1,"DATE_FORMAT"))," ")}}function Ac(t,r){if(t&1&&m(0,Rc,4,10,"a",13)(1,Pc,3,6),t&2){let e=r.row;f(e.orderNumber?0:1)}}function Nc(t,r){if(t&1){let e=k();c(0,"p-button",15),g(1,"translocoCurrency"),w("onClick",function(){A(e);let o=s().row,n=s();return N(n.viewInvoice(o.orderNumber,o.invoiceNumber))}),d()}if(t&2){let e=s().row;h("link",!0)("label",H(1,2,e.orderTotal,"symbol"))}}function Lc(t,r){if(t&1&&(p(0),g(1,"translocoCurrency")),t&2){let e=s().row;y(" ",H(1,1,e.orderTotal,"symbol")," ")}}function Fc(t,r){if(t&1&&m(0,Nc,2,5,"p-button",14)(1,Lc,2,4),t&2){let e=r.row,i=s();f(i.isOrderInvoiceVisible(e)?0:1)}}function wc(t,r){if(t&1&&(p(0),g(1,"fulfillmentDatePipe"),g(2,"transloco"),g(3,"date")),t&2){let e=r.row;y(" ",H(3,5,v(1,1,e.fulfillmentDateTime),v(2,3,"DATE_FORMAT"))," ")}}function Mc(t,r){if(t&1&&T(0,"ppg-order-status-column-data",16),t&2){let e=r.row;h("currentStatus",e.currentStatus)("currentStatusReason",e.currentStatusReason)}}var no="ORDERS_OVER_LIMIT_CALLOUT",oa=(()=>{class t extends oo{constructor(){super(...arguments),this.#e=l(De),this.#t=l(He),this.#o=l(nt),this.#n=l(Ve),this.#i=l(we),this.#r=l(le),this.#s=l(Ze),this.#l=l(xe),this.#c=l(eo),this.#d=l(Le),this.#f=l(Y),this.#h=l(Be),this.#u=l(qn),this.#p=l(Ue),this.#a=l(wt),this.permissions=G,this.isB2BUser=this.#h.isB2BUser(),this.#m=b(this.#r.externalOrderIdSettings$),this.showExternalOrderId=_(()=>this.#h.isB2CUser()&&!!this.#m()?.enabled),this.isShowOrderStatusEnabled$=this.#r.showOrderStatusFeatureFlag$,this.callOutMessages$=this.#s.c
33allOutMessages,this.maxBulkOrders=this.#r.maxBulkOrders,this.showOrderStatusEnabled=b(this.isShowOrderStatusEnabled$,{initialValue:!1}),this.showInvoiceLink=this.createInvoiceVisibilitySignal(this.#r.onlineOrderInvoiceFeatureFlag$),this.canViewPrices=this.createPermissionSignal(G.VIEW_PRICES),this.isDocumentActionLoading=ee(!1),this.documentLinkExpirationInDays=this.#r.documentLinkExpirationInDays,this.isDocumentsProcessingTriggered=this.isDocumentActionLoading.asReadonly(),this.invoiceRetentionPeriodInDays=b(this.#r.invoiceRetentionPeriodInDays$),this.#g=b(this.callOutMessages$,{initialValue:[]}),this.#_=_(()=>this.#h.user()?.email??""),this.totalOrdersCount=b(this.tableDataFacade.paginatedResult$.pipe(x(e=>e?.totalItemsCount??0),Jt()),{initialValue:0}),this.isAdvancedOrderHistoryVisible=_(()=>this.#t.isAdvancedOrderHistoryVisible()),this.onlineOrdersBaseUrl=_(()=>`${this.#e.getPathByAppRouteFeatureModule(ge.Order)}/${Ie.OrdersOnline}`),this.shouldDisableGetDocumentsButton=_(()=>this.totalOrdersCount()===0||this.#a.isOverLimitCalloutDisplayed(no)),this.isOverDocumentRequestLimit=_(()=>{let e=this.maxBulkOrders();return!!e&&this.totalOrdersCount()>e}),this.hasCallOutMessages=_(()=>this.#g().length>0),this.filteredResultsCount=_(()=>{let e=this.currentDateRange();return e.from!==null||e.to!==null?this.totalOrdersCount():null}),this.#C=new Yn("orderDate",!0),this.#v=1e4,this.tableDefinition=_(()=>({columns:Xr({isB2BUser:this.isB2BUser,canViewPrices:this.canViewPrices(),showOrderStatus:this.showOrderStatusEnabled()}),paginatorPhoneVersion:this.isMobile(),loadData:this.getOrdersSource,defaultSort:this.#C,header:io({searchPlaceholder:this.isB2BUser?"ORDERS.SEARCH_PLACEHOLDER":"ORDERS.SEARCH_PLACEHOLDER_B2C",onSearch:e=>this.searchHandler(e),title:this.isB2BUser?{value:"ORDERS.ONLY_INCLUDES_ONLINE_ORDERS",translate:!0}:void 0,titleIcon:this.isB2BUser?"alert-circle-outline":void 0})})),this.getOrdersSource=this.createPaginatedSourceAdapter({fetch:e=>this.#O(e),mapRow:e=>new to(e.orderNumber,e.externalOrderId,e.accountNumber,e.invoiceNumber,e.createdAt,e.job?.name??"-",e.taxedPrice?.totalGross.amount,e.taxedPrice?.totalGross.currencyCode,e.job?.customer?.name??"-",e.purchaseOrder??"-",{utcDateTime:e.fulfillmentDateTime,timeZoneId:e.fulfillmentStoreTimeZoneId},e.currentStatus,e.currentStatusReason),normalizeTotalItemsCount:e=>Math.min(e,this.#v)})}#e;#t;#o;#n;#i;#r;#s;#l;#c;#d;#f;#h;#u;#p;#a;#m;#g;#_;#C;#v;#S;set showAll(e){this.#S=e,this.refresh()}refresh(){this.tableDataFacade.updatePageNumber(0),this.tableDataFacade.refreshSourceData()}onDateRangeChange(e){this.#a.clearOverLimitCallout(no),e.from!==null&&e.to!==null&&this.#n.advancedOrderHistoryDateFilterAppliedGA(ce.AdvancedOrderHistoryOnlineOrderHistory),this.dateRangeHandler(e)}onDateFilterOpened(){this.#n.advancedOrderHistoryDateFilterOpenGA(ce.AdvancedOrderHistoryOnlineOrderHistory)}searchHandler(e){this.#a.clearOverLimitCallout(no),super.searchHandler(e)}isOrderInvoiceVisible(e){return e.invoiceNumber!==null&&e.invoiceNumber!==""&&!!this.showInvoiceLink()&&!Gt(String(e.orderDate),this.invoiceRetentionPeriodInDays()??0)}getDocuments(){if(!(this.shouldDisableGetDocumentsButton()||this.isDocumentActionLoading())){if(this.isOverDocumentRequestLimit()){this.#n.advancedOrderHistoryDocumentsLimitExceededGA(this.totalOrdersCount(),this.maxBulkOrders()??0),this.#a.showOverLimitCallout(no,this.maxBulkOrders(),()=>this.overLimitCalloutContainer);return}this.#n.advancedOrderHistoryGetDocumentsButtonClickGA(this.totalOrdersCount()),this.#y()}}#y(){ot(this.#l,this.#f,{dialogOptions:{variant:he.OrderHistory,placeholders:{orderCount:String(this.totalOrdersCount()),email:this.#_(),expiryDays:this.documentLinkExpirationInDays()}},accept:()=>{this.#n.advancedOrderHistorySendDocumentsButtonClickGA(this.totalOrdersCount()),this.#D()}})}#D(){if(this.isDocumentsProcessingTriggered())return;let e=this.tableDataFacade.getRequestSnapshot();this.isDocumentActionLoading.set(!0),this.#o.getDocumentsByFilter({includeAll:this.#S,dateFrom:e.dateFrom||void 0,dateTo:e.dateTo||void 0,searchTerm:e.searchTerm||void 0,sort:[this.#E(e.s
33ortBy)]}).pipe(te(this.#d),$e(()=>this.isDocumentActionLoading.set(!1))).subscribe({next:()=>{this.#n.advancedOrderHistoryGetDocumentsMessageSuccessGA(ce.AdvancedOrderHistoryOnlineOrderHistory),this.#p.successFromResources(C.ORDERS_HISTORY_GET_DOCUMENTS_SUCCESS_TITLE,C.ORDERS_HISTORY_GET_DOCUMENTS_SUCCESS_MSG)},error:()=>{this.#n.advancedOrderHistoryGetDocumentsMessageErrorGA(ce.AdvancedOrderHistoryOnlineOrderHistory),this.#p.errorFromResources(C.ORDERS_HISTORY_GET_DOCUMENTS_ERROR_TITLE,C.ORDERS_HISTORY_GET_DOCUMENTS_ERROR_MSG)}})}viewInvoice(e,i){this.#t.getOnlineOrderInvoiceByKey(String(e),i).pipe(te(this.#d)).subscribe(o=>{let n=o?.data?.onlineOrderInvoice?.invoiceUrl;Xe(n)&&n!==""?this.#c.open(n,{preferIosDialog:!0,dialogComponent:Jr,dialogHeaderComponent:Qr,dialogWidth:Si.Large}):this.#t.ShowUnexpectedDelayPopup()})}#O(e){let{customerKey:i}=this.#i.snapshot.params;return this.permissionsService.hasPermission(G.VIEW_PRICES).pipe(L(o=>this.isB2BUser?this.#x(e,i,o):this.#I(e,o)))}#x(e,i,o){return this.#t.getOrders({paginatedListRequest:e,customerKey:i,includePrice:o,includeAll:this.#S}).pipe(L(n=>{let u=n.data.orders?.results??[],S=n.data.orders?.total??0,I=[...new Set(u.map(F=>F.job?.customerKey).filter(F=>!!F))];return I.length===0?K({items:u,totalItemsCount:S}):this.#T(u,S,I)}))}#T(e,i,o){return this.#u.getCustomersByKeys(o,!0).pipe(x(n=>{let u=new Map(n.map(S=>[S.key,S.name]));return{items:e.map(S=>V(B({},S),{job:V(B({},S.job),{customer:S.job?.customerKey?{key:S.job.customerKey,name:u.get(S.job.customerKey)??"-"}:void 0})})),totalItemsCount:i}}),ue(()=>K({items:e,totalItemsCount:i})))}#I(e,i){return this.#t.getMyOrders({paginatedListRequest:e,includePrice:i}).pipe(x(o=>({items:o.data.myorders?.results??[],totalItemsCount:o.data.myorders?.total??0})))}#E(e){let o={fulfillmentDateTime:"custom.fields.FulfillmentDateTime",orderDate:"createdAt",orderNumber:"orderNumber",orderTotal:"totalPrice.centAmount",pONumber:"custom.fields.PurchaseOrder"}[e.field]??"createdAt",n=e.descending?"desc":"asc";return`${o} ${n}`}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=fe(t)))(o||t)}})()}static{this.\u0275cmp=E({type:t,selectors:[["app-orders"]],viewQuery:function(i,o){if(i&1&&ko(Dc,5),i&2){let n;Uo(n=Vo())&&(o.overLimitCalloutContainer=n.first)}},inputs:{showAll:"showAll"},standalone:!1,features:[li([ct,Ze,wt]),ht],decls:9,vars:3,consts:[["overLimitCalloutContainer",""],["tabindex","-1","data-test-id","orders-callout-container",1,"orders-callout","mb-3"],["tableDataTestId","orders.table",3,"config"],["ppgDynamicTableHeaderFilters",""],["ppgDynamicTableHeaderActions",""],["ppgDynamicTableCellTemplate","orderNumber"],["ppgDynamicTableCellTemplate","orderDate"],["ppgDynamicTableCellTemplate","orderTotal"],["ppgDynamicTableCellTemplate","fulfillmentDateTime"],["ppgDynamicTableCellTemplate","orderStatus"],[3,"messageSource$"],[3,"dateFilterOpened","dateRangeChange","showDateFilter","filteredResultsCount","controlsDisabled"],[3,"getDocumentsClick","showGetDocumentsButton","getDocumentsDisabled","getDocumentsLoading","showGetDocumentsNoDocumentsTooltip"],["data-test-id","orders.openOrderDetailsButton","ppgGoogleTag","","dataT","link","dataD1","order history","dataD2","open order details",1,"p-button","p-button-link","border-noround","align-self-start",3,"routerLink"],["styleClass","border-noround","data-test-id","orders.orderTotalLinkButton",3,"link","label"],["styleClass","border-noround","data-test-id","orders.orderTotalLinkButton",3,"onClick","link","label"],[3,"currentStatus","currentStatusReason"]],template:function(i,o){i&1&&(m(0,Tc,3,1,"div",1),c(1,"ppg-dynamic-table",2),m(2,xc,1,3,"ng-template",3)(3,Ic,1,0,null,4)(4,Ec,1,1,"ng-template",5)(5,Ac,2,1,"ng-template",6)(6,Fc,2,1,"ng-template",7)(7,wc,4,8,"ng-template",8)(8,Mc,1,2,"ng-template",9),d()),i&2&&(f(o.hasCallOutMessages()?0:-1),a(),h("config",o.tableConfig()),a(2),f(o.isAdvancedOrderHistoryVisible()?3:-1))},dependencies:[en,Ei,tr,Te,nr,Mt,Gi,dt,mt,pt,mi,ie,Tt,Lt],styles:["[_nghost-%COMP%]{display:block;margin-top:var(--spacing-2XL)}.orders-callout[_ngcontent-%COMP%]{margin-bottom:var(--spacing-2XL)}.orders-callout[_ngcontent-%COMP%]   app-call-out[_ngcontent-%COMP%]{display:block;width:100%}@media all and (max-width:767px){ppg-order-history-table-header[_ngcontent-%COMP%]{width:100%}}"]})}}return t})();function na(t){return[{id:"store-order-number",title:{value:"ORDERS.TABLE_COLUMN.ORDER_NUMBER",translate:!0},field:"orderNumber",sortable:!1,templateKey:"orderNumber"},{id:"store-order-date",title:{value:"ORDERS.TABLE_COLUMN.ORDER_DATE",translate:!0},field:"orderDate",sortable:!1,templateKey:"orderDate"},{id:"store-po-number",title:{value:"ORDERS.TABLE_COLUMN.PO_NUMBER",translate:!0}
33,field:"purchaseOrder",sortable:!1,cellClass:"u-overflow-wrap-anywhere"},{id:"store-customer-name",title:{value:"ORDERS.TABLE_COLUMN.CUSTOMER",translate:!0},field:"customerName",sortable:!1,cellClass:"u-overflow-wrap-anywhere"},{id:"store-account-number",title:{value:"ORDERS.TABLE_COLUMN.ACCOUNT_NUMBER",translate:!0},field:"accountNumber",sortable:!1},{id:"store-job-name",title:{value:"ORDERS.TABLE_COLUMN.JOB_NAME",translate:!0},field:"jobName",sortable:!1,cellClass:"u-overflow-wrap-anywhere",isVisible:()=>!t.hideJobName},{id:"store-order-total",title:{value:"ORDERS.TABLE_COLUMN.ORDER_TOTAL",translate:!0},field:"orderTotal",sortable:!1,templateKey:"orderTotal",isVisible:()=>t.canViewPrices},{id:"store-fulfillment-datetime",title:{value:"ORDERS.TABLE_COLUMN.FULFILLMENT_DATETIME",translate:!0},field:"fulfillmentDateTime",sortable:!1,templateKey:"fulfillmentDateTime"}]}var ro=class{constructor(r,e,i,o,n,u,S,I,F,z,de){this.orderNumber=r,this.transactionNumber=e,this.accountNumber=i,this.invoiceNumber=o,this.orderDate=n,this.jobName=u,this.orderTotal=S,this.currencyCode=I,this.customerName=F,this.purchaseOrder=z,this.fulfillmentDateTime=de}};var kc=["overLimitCalloutContainer"],yo=()=>({dateStyle:"medium"});function Uc(t,r){if(t&1&&(c(0,"div",1,0),T(2,"app-call-out",9),d()),t&2){let e=s();a(2),h("messageSource$",e.callOutMessages$)}}function Vc(t,r){if(t&1){let e=k();c(0,"ppg-order-history-table-header",10),w("dateFilterOpened",function(){A(e);let o=s();return N(o.onDateFilterOpened())})("dateRangeChange",function(o){A(e);let n=s();return N(n.onDateRangeChange(o))}),d()}if(t&2){let e=s();h("showDateFilter",!0)("filteredResultsCount",e.filteredResultsCount())}}function Hc(t,r){if(t&1){let e=k();c(0,"ppg-order-history-table-header",11),w("getDocumentsClick",function(){A(e);let o=s(2);return N(o.getDocuments())}),d()}if(t&2){let e=s(2);h("showGetDocumentsButton",!0)("getDocumentsDisabled",e.shouldDisableGetDocumentsButton()||e.isDocumentActionLoading())("getDocumentsLoading",e.isDocumentActionLoading())("showGetDocumentsNoDocumentsTooltip",e.totalStoreOrdersCount()===0)}}function $c(t,r){t&1&&m(0,Hc,1,4,"ng-template",4)}function Gc(t,r){if(t&1&&(c(0,"a",12),p(1),g(2,"translocoDate"),d()),t&2){let e=s().row;Bo("href","",r,"/",e.transactionNumber,"",ae),a(),y(" ",H(2,4,e.orderDate,je(7,yo))," ")}}function Kc(t,r){if(t&1&&(p(0),g(1,"translocoDate")),t&2){let e=s().row;y(" ",H(1,1,e.orderDate,je(4,yo))," ")}}function jc(t,r){if(t&1&&m(0,Gc,3,8,"a",12)(1,Kc,2,5),t&2){let e,i=s();f((e=i.storeOrdersBaseUrl())?0:1,e)}}function qc(t,r){if(t&1&&p(0),t&2){let e=r.row;y(" ",e.orderNumber||e.transactionNumber," ")}}function Yc(t,r){if(t&1){let e=k();c(0,"p-button",14),g(1,"translocoCurrency"),w("onClick",function(){A(e);let o=s().row,n=s();return N(n.viewInvoice(o.orderNumber,o.invoiceNumber))}),d()}if(t&2){let e=s().row;h("link",!0)("label",H(1,2,e.orderTotal,"symbol"))}}function zc(t,r){if(t&1&&(p(0),g(1,"translocoCurrency")),t&2){let e=s().row;y(" ",H(1,1,e.orderTotal,"symbol")," ")}}function Wc(t,r){if(t&1&&m(0,Yc,2,5,"p-button",13)(1,zc,2,4),t&2){let e=r.row,i=s();f(i.isInvoiceVisible(e)?0:1)}}function Jc(t,r){if(t&1&&(p(0),g(1,"translocoDate")),t&2){let e=r.row;y(" ",H(1,1,e.fulfillmentDateTime,je(4,yo))," ")}}var ao="STORE_ORDERS_OVER_LIMIT_CALLOUT",ra=(()=>{class t extends oo{constructor(){super(...arguments),this.#e=l(De),this.#t=l(Ve),this.#o=l(He),this.#n=l(Ui),this.#i=l(Ot),this.#r=l(bt),this.#s=l(le),this.#l=l(Me),this.#c=l(Oe),this.#d=l(eo),this.#f=l(Y),this.#h=l(nt),this.#u=l(Ue),this.#p=l(Ze),this.destroyRef=l(Le),this.#a=l(wt),this.#m=l(xe),this.overLimitCalloutContainer=Fo("overLimitCalloutContainer"),this.permissions=G,this.storeOrdersBaseUrl=_(()=>`${this.#e.getPathByAppRouteFeatureModule(ge.Order)}/${Ie.OrdersStore}`),this.#g=_(()=>this.#r.getMarket(this.#c.countryCode()??"").key),this.#_=_(()=>this.#i.user()?.email??""),this.maxBulkOrders=this.#s.maxBulkOrders,this.isDocumentActionLoading=ee(!1),this.isAdvancedOrderHistoryVisible=_(()=>this.#o.isAdvancedOrderHistoryVisible()),this.#C=b(this.#p.callOutMessages,{initialValue:[]}),this.callOutMessages$=this.#p.callOutMessages,this.hasCallOutMessages=_(()=>this.#C().length>0),this.shouldDisableGetDocumentsButton=_(()=>this.totalStoreOrdersCount()===0||this.#a.isOverLimitCalloutDisplayed(ao)),this.isOverDocumentRequestLimit=_(()=>{let e=this.maxBulkOrders();return!!e&&this.totalStoreOrdersCount()>e}),this.showInvoiceLink=this.createInvoiceVisibilitySignal(this.#s.inStoreOrderInvoiceFeatureFlag$),this.canViewPrices=this.createPermissionSignal(G.VIEW_PRICES),this.hideJobName=_(()=>this.#l.eCommerceECommerceAllOrderHistoryHideJobNameEnabled()),this.totalStoreOrdersCount=b(this.tableDataFacade.paginatedResult$.pipe(x(e=>e?.totalItemsCount??0),Jt()),{initialValue:0}),this.filteredResultsCount=_(()=>{let e=this.currentDateRange();return e.from!==null&&e.to!==null?this.totalStoreOrdersCount():null}),this.tableDefinition=_(()=>({columns:na({hideJobName:this.hideJobName(),canViewPrices:this.canViewPrices()}),paginatorPhoneVersion:this.isMobile(),loadData:this.loadStoreOrdersSource,header:io({searchPlaceholder:this.#f.getResourceByKey(C.ORDERS_HISTORY_FILTER_BY_ORDER_NUMBER_PLACEHOLDER),translateSearchPlaceholder:!1,onSearch:e=>this.searchHandler(e)})})),this.loadStoreOrdersSource=this.createPaginatedSourceAdapter({fetch:e=>this.#v(e),mapRow:e=>new ro(e.orderNumber,e.transactionNumber,e.accountNumber,e.invoiceNumber,e.orderDate,e.jobName??"-",e.totalPrice?.amount,e.totalPrice?.currencyCode,e.customerName??"-",e.purchaseOrder??"-",e.fulfillmentDateTime)})}#e;#t;#o;#n;#i;#r;#s;#l;#c;#d;#f;#h;#u;#p;#a;#m;#g;#_;#C;searchHandler(e){this.#a.clearOverLimitCallout(ao),super.searchHandler(e)}isInvoiceVisible(e){return e.invoiceNumber!=null&&e.invoiceNumber!==""&&!!this.showInvoiceLink()}onDateFilterOpened(){this.#t.advancedOrderHistoryDateFilterOpenGA(ce.AdvancedOrderHistoryStoreOrderHistory)}onDateRangeChange(e){this.#a.clearOverLimitCallout(ao),e.from!==null&&e.to!==null&&this.#t.advancedOrderHistoryDateFilterAppliedGA(ce.AdvancedOrderHistoryStoreOrderHistory),this.dateRangeHandler(e)}viewInvoice(e,i){this.#o.getStoreOrderInvoiceByKey(e,i).pipe(te(this.destroyRef)).subscribe(o=>{let n=o?.data?.storeOrderInvoice?.invoiceUrl;Xe(n)&&n!==""?this.#d.open(n):this.#o.ShowUnexpectedDelayPopup()})}
33#v(e){return $([this.#S(),this.#y()]).pipe(L(([i,o])=>this.#D(e,i,o)),x(i=>this.#O(i.storeOrders)))}#S(){return this.#i.getUserInfo().pipe(x(e=>e.permissions.includes(this.permissions.VIEW_PRICES)))}#y(){return this.#c.countryCode$.pipe(X(e=>!!e),x(e=>this.#r.getMarket(e)),x(e=>e.key))}#D(e,i,o){return this.#n.getStoreOrders(e.pageSize,e.pageNumber*e.pageSize,null,i,o,e.searchTerm?.trim()||void 0,e.dateFrom||void 0,e.dateTo||void 0)}#O(e){return{items:e?.items??[],totalItemsCount:e?.totalCount??0}}getDocuments(){if(!(this.shouldDisableGetDocumentsButton()||this.isDocumentActionLoading())){if(this.isOverDocumentRequestLimit()){this.#t.advancedOrderHistoryDocumentsLimitExceededGA(this.totalStoreOrdersCount(),this.maxBulkOrders()??0),this.#a.showOverLimitCallout(ao,this.maxBulkOrders(),()=>this.overLimitCalloutContainer());return}this.#t.advancedOrderHistoryGetDocumentsButtonClickGA(this.totalStoreOrdersCount()),this.#x()}}#x(){ot(this.#m,this.#f,{dialogOptions:{variant:he.OrderHistory,placeholders:{orderCount:String(this.totalStoreOrdersCount()),email:this.#_(),expiryDays:this.#s.documentLinkExpirationInDays()}},accept:()=>{this.#t.advancedOrderHistorySendDocumentsButtonClickGA(this.totalStoreOrdersCount()),this.#T()}})}#T(){let e=this.tableDataFacade.getRequestSnapshot();this.isDocumentActionLoading.set(!0),this.#h.getDocumentsByStoreOrderFilter({searchTerm:e.searchTerm||void 0,dateFrom:e.dateFrom||void 0,dateTo:e.dateTo||void 0},this.#g()).pipe(te(this.destroyRef),$e(()=>this.isDocumentActionLoading.set(!1))).subscribe({next:()=>{this.#t.advancedOrderHistoryGetDocumentsMessageSuccessGA(ce.AdvancedOrderHistoryStoreOrderHistory),this.#u.successFromResources(C.ORDERS_HISTORY_GET_DOCUMENTS_SUCCESS_TITLE,C.ORDERS_HISTORY_GET_DOCUMENTS_SUCCESS_MSG)},error:()=>{this.#t.advancedOrderHistoryGetDocumentsMessageErrorGA(ce.AdvancedOrderHistoryStoreOrderHistory),this.#u.errorFromResources(C.ORDERS_HISTORY_GET_DOCUMENTS_ERROR_TITLE,C.ORDERS_HISTORY_GET_DOCUMENTS_ERROR_MSG)}})}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=fe(t)))(o||t)}})()}static{this.\u0275cmp=E({type:t,selectors:[["ppg-store-orders"]],viewQuery:function(i,o){i&1&&Ho(o.overLimitCalloutContainer,kc,5),i&2&&ai()},standalone:!1,features:[li([ct,Ze,wt]),ht],decls:8,vars:3,consts:[["overLimitCalloutContainer",""],["tabindex","-1","data-test-id","storeOrders.calloutContainer",1,"store-orders-callout"],["tableDataTestId","storeOrders.table",3,"config"],["ppgDynamicTableHeaderFilters",""],["ppgDynamicTableHeaderActions",""],["ppgDynamicTableCellTemplate","orderDate"],["ppgDynamicTableCellTemplate","orderNumber"],["ppgDynamicTableCellTemplate","orderTotal"],["ppgDynamicTableCellTemplate","fulfillmentDateTime"],[3,"messageSource$"],[3,"dateFilterOpened","dateRangeChange","showDateFilter","filteredResultsCount"],[3,"getDocumentsClick","showGetDocumentsButton","getDocumentsDisabled","getDocumentsLoading","showGetDocumentsNoDocumentsTooltip"],[1,"u-prevent-text-wrap",3,"href"],["styleClass","border-noround","data-test-id","storeOrders.orderTotalLinkButton",3,"link","label"],["styleClass","border-noround","data-test-id","storeOrders.orderTotalLinkButton",3,"onClick","link","label"]],template:function(i,o){i&1&&(m(0,Uc,3,1,"div",1),c(1,"ppg-dynamic-table",2),m(2,Vc,1,2,"ng-template",3)(3,$c,1,0,null,4)(4,jc,2,1,"ng-template",5)(5,qc,1,1,"ng-template",6)(6,Wc,2,1,"ng-template",7)(7,Jc,2,5,"ng-template",8),d()),i&2&&(f(o.hasCallOutMessages()?0:-1),a(),h("config",o.tableConfig()),a(2),f(o.isAdvancedOrderHistoryVisible()?3:-1))},dependencies:[Ei,Te,Mt,Gi,dt,mt,pt,Tt,xt],styles:["[_nghost-%COMP%]{display:block;margin-top:var(--spacing-2XL)}.store-orders-callout[_ngcontent-%COMP%]{margin-top:var(--spacing-2XL);margin-bottom:var(--spacing-2XL)}.store-orders-callout[_ngcontent-%COMP%]   app-call-out[_ngcontent-%COMP%]{display:block;width:100%}"]})}}return t})();var Xc=t=>({label:t,routerLink:"/",automationId:"ordersPage.home"}),Zc=t=>({label:t,automationId:"ordersPage.orders"}),aa=(t,r)=>[t,r],ed=t=>({label:t,value:!0,automationId:"ordersPage.orders",selected:!0}),td=t=>({label:t,value:!1,automationId:"ordersPage.storeOrders"});function id(t,r){t&1&&(T(0,"ppg-cdp-breadcrumbs",2),g(1,"transloco"),g(2,"transloco")),t&2&&h("model",Re(9,aa,j(5,Xc,v(1,1,"NAV.HOME")),j(7,Zc,v(2,3,"NAV.ORDERS"))))}function od(t,r){t&1&&m(0,id,3,12,"ppg-cdp-breadcrumbs",7)}
33function nd(t,r){if(t&1){let e=k();c(0,"p-selectButton",12),g(1,"transloco"),g(2,"transloco"),g(3,"transloco"),Ko("ngModelChange",function(o){A(e);let n=s(2);return Go(n.isOnlineOrderTabSelected,o)||(n.isOnlineOrderTabSelected=o),N(o)}),w("onChange",function(o){A(e);let n=s(2);return N(n.onSelectedTabChange(o))}),d()}if(t&2){let e=s(2);h("ariaLabelledBy",v(1,4,"ORDERS.ORDER_TYPE"))("options",Re(14,aa,j(10,ed,v(2,6,"ORDERS.ORDERS")),j(12,td,v(3,8,"ORDERS.STORE_ORDERS"))))("allowEmpty",!1),$o("ngModel",e.isOnlineOrderTabSelected)}}function rd(t,r){if(t&1){let e=k();c(0,"div",10)(1,"span",13),p(2),g(3,"transloco"),d(),c(4,"p-toggleswitch",14),w("onChange",function(o){A(e);let n=s(2);return N(n.showAll=o.checked)}),d()()}t&2&&(a(2),O(v(3,1,"ORDERS.SHOW_ALL_ORDERS")))}function ad(t,r){if(t&1){let e=k();c(0,"p-button",15),g(1,"transloco"),g(2,"async"),w("onClick",function(){A(e);let o=s(2);return N(o.openCalendar())}),d()}if(t&2){let e=s(2);h("label",v(1,5,"ORDERS.EXPORT_ORDER_HISTORY"))("icon","pi pi-file-import")("iconPos","left")("text",!0)("disabled",v(2,7,e.exportButtonDisabled$))}}function sd(t,r){if(t&1&&(c(0,"div"),m(1,nd,4,17,"p-selectButton",8),c(2,"div",9),m(3,rd,5,3,"div",10)(4,ad,3,9,"p-button",11),d()()),t&2){s();let e=U(0),i=U(2),o=U(4),n=U(8);oi(n),a(),f(e?1:-1),a(2),f(i?3:-1),a(),f(o?4:-1)}}function ld(t,r){if(t&1&&T(0,"app-orders",6),t&2){let e=s();h("showAll",e.showAll)}}function cd(t,r){t&1&&T(0,"ppg-store-orders")}var sa=(()=>{class t{constructor(){this.permissions=G,this.#e=l(be),this.#t=l(le),this.#o=l(Ot),this.#n=l(Gn),this.#i=l(we),this.#r=l(ke),this.#s=l(xe),this.#l=l(De),this.#c=l(ye),this.storeOrdersEnabled$=this.getStoreOrderEnabled(),this.showAllToggleVisible$=this.getShowAllToggleVisible(),this.exportOrderHistoryButtonVisible$=this.getExportOrderHistoryButtonVisible(),this.exportButtonDisabled$=this.getExportButtonDisabled(),this.customerKey=this.#i.snapshot.params.customerKey,this.exportModuleType=this.customerKey?ho.CUSTOMER:ho.ORDER}#e;#t;#o;#n;#i;#r;#s;#l;#c;ngOnInit(){this.isOnlineOrderTabSelected=!0,this.setShowAllDefaultValue(),this.showBreadCrumb=this.#c.url.startsWith(this.#l.getPathByAppRouteFeatureModule(ge.Order))}getExportButtonDisabled(){return this.#n.exportButtonStatus$.pipe(x(e=>e?.requestModel.exportType===this.exportModuleType?e.requestModel.isExportGoingOn:!1))}getExportOrderHistoryButtonVisible(){return $([this.#e.hasPermission(G.VIEW_EXPORT_ORDER_HISTORY),this.#r.isMobileApplication()]).pipe(x(([e,i])=>e&&!i))}getShowAllToggleVisible(){return this.#o.getUserInfo().pipe(x(({roleName:e})=>e===xi.PPG_MANAGER))}getStoreOrderEnabled(){return $([this.#e.hasPermission(G.VIEW_STORE_ORDERS),this.#t.canShowStoreOrdersFeatureFlag$]).pipe(x(([e,i])=>e&&i))}setShowAllDefaultValue(){this.showAllToggleVisible$.pipe(Z(1)).subscribe(e=>this.showAll=e?!1:null)}openCalendar(){this.#s.open(Ri,{header:lt("JOBS.EXPORT_MODAL.TAB_TITLE"),width:Ht.Medium,closable:!0,data:{key:this.customerKey,exportModuleType:this.exportModuleType}})}onSelectedTabChange(e){this.isOnlineOrderTabSelected=e.value}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["app-orders-page"]],standalone:!1,decls:20,vars:20,consts:[[1,"layout-container"],[1,"flex","flex-column"],["data-test-id","ordersPage.breadcrumbs",3,"model"],[1,"flex","justify-content-between","align-items-center","flex-wrap"],[1,"orders-page__title"],[3,"class"],[3,"showAll"],["data-test-id","ordersPage.breadcrumbs",3,"model",4,"ppgHideOnMobileAppView"],["optionLabel","label","optionValue","value",3,"ariaLabelledBy","options","allowEmpty","ngModel"],[1,"flex","w-full","md:w-max","justify-content-start","md:justify-content-end","flex-wrap","gap-4"],[1,"flex","align-items-center","gap-2"],["data-test-id","ordersPage.exportButton",1,"orders-page__export-button",3,"label","icon","iconPos","text","disabled"],["optionLabel","label","optionValue","value",3,"ngModelChange","onChange","ariaLabelledBy","options","allowEmpty","ngModel"],["id","orders-page-show-all-label"],["styleClass","flex align-items-center flex-row","ariaLabelledBy","orders-page-show-all-label",3,"onChange"],["data-test-id","ordersPage.exportButton",1,"orders-page__export-button",3,"onClick","label","icon","iconPos","text","disabled"]],template:function(i,o){if(i&1&&(re(0),g(1,"async"),re(2),g(3,"async"),re(4),g(5,"async"),re(6)(7)(8),c(9,"div",0)(10,"div",1),m(11,od,1,0,"ppg-cdp-breadcrumbs",2),c(12,"div",3)(13,"h1",4),p(14),g(15,"transloco"),d(),m(16,sd,5,5,"div",5),d(),c(17,"div"),m(18,ld,1,1,"app-orders",6)(19,cd,1,0,"ppg-store-orders"),d()()()),i&2){let n=J(v(1,8,o.storeOrdersEnabled$));a(2);let u=J(v(3,11,o.showAllToggleVisible$));a(2);let S=J(v(5,14,o.exportOrderHistoryButtonVisible$)&&o.isOnlineOrderTabSelected),I="min-w-full flex justify-content-between flex-wrap gap-4 mb-3",F="w-full md:w-max";a(4),J(n?I:F),a(3),f(o.showBreadCrumb?11:-1),a(2),_t("w-12",n)("w-max",!n),a(),y(" ",v(15,18,"DASHBOARD.ORDERS_TITLE")," "),a(2),f(n||u||S?16:-1),a(2),f(o.isOnlineOrderTabSelected?18:n?19:-1)}},dependencies:[sn,ln,At,Te,$n,Un,Dt,oa,ra,St,ie],styles:["@media all and (max-width:767px){.orders-page__title[_ngcontent-%COMP%]{margin-bottom:var(--spacing-2XL, 16px)}}@media all and (max-width:767px){.orders-page__export-button[_ngcontent-%COMP%]{margin-left:calc(var(--spacing-2XL, 16px) * -1);margin-bottom:var(--spacing-4XL, 24px)}}"]})}}return t})();function dd(t,r){if(t&1&&(T(0,"iframe",0),g(1,"safeUrl")),t&2){let e=s();h("src",v(1,1,e.returnUrl()),Lo)}}var la=(()=>{class t{#e;#t;#o;#n;#i;#r;#s;#l;#c;#d;constructor(){this.#e=l(Oe),this.#t=l(xn),this.#o=l(Be),this.#n=l(ye),this.#i=l(bn),this.#r=l(we),this.#s=l(_n),this.#l=l(Ct),this.#c=l(No),this.#d=l(Le),this.hostHeight=D("1200px"),this.returnUrl=b(this.#n.events.pipe(X(e=>e instanceof Zo),x(()=>this.#n.getCurrentNavigation()?.extras.state?.returnUrl||null),Io(null),L(e=>e?K(e):this.#S()))),this.#f()}ngOnInit(){this.#v()}#f(){Qo(this.#c)&&Zt(()=>{this.#h(),this.#u()})}#h(){xo(this.#l.defaultView,"message").pipe(X(e=>this.#m(e)),te(this.#d)).subscribe(()=>this.#C())}#u(){let e=!1,i=setInterval(()=>{let o=this.#p();o&&(this.#a(o,()=>{if(!e){e=!0;return}this.#C()}),clearInterval(i))},100);setTimeout(()=>clearInterval(i),1e4)}#p(){return this.#l.querySelector('iframe[title="formstack-page"]')}#a(e,i){e.addEventListener("load",i)}#m(e){return!e.data||typeof e.data!="object"?!1:this.#g(e.data)||this.#_(e.data)}#g(e){let i=e.event||e.type||"";return i.toLowerCase().includes("submit")||i.toLowerCase().includes("complete")}#_(e){let{formSubmitted:i,submitted:o}=e;return i===!0||o===!0}#C(){this.#l.defaultView?.scrollTo({top:0,behavior:"smooth"})}#v(){this.#s.pushTag({event:hn.CustomEvent,eventCategory:fn.Orders,eventAction:un.ReturnFormStart,eventLabel:"Return form start"})}#S(){let{orderKey:e}=this.#r.snapshot.params,i=this.#e.language$,o=this.#t.canViewPrices();return $([i,o]).pipe(L(([n,u])=>this.#o.isB2BUser()?this.#i.getOrderByKey(e,n,u):this.#i.getMyOrderByKey(e,n,u)),ue(()=>K(null)),x(n=>{let u=n?.data?.order?.returnActionUrl;return u||null}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["ppg-formstack-page"]],hostAttrs:[1,"flex","flex-column","align-items-start","m-0","p-0","w-full","overflow-hidden"],hostVars:2,hostBindings:function(i,o){i&2&&Mo("height",o.hostHeight())},inputs:{hostHeight:[1,"hostHeight"]},decls:1,vars:1,consts:[["title","formstack-page",1,"w-full","height-full","min-h-full","border-none",3,"src"]],template:function(i,o){i&1&&m(0,dd,2,3,"iframe",0),i&2&&f(o.returnUrl()?0:-1)},dependencies:[Ln],encapsulation:2,changeDetection:0})}}return t})();var ca=(t,r)=>{let e=l(Oe),i=l(Be),o=l(He),n=l(be),u=l(an),S=l(ye),F=l(rn).getLanguage(r.url),{orderKey:z}=t.params,de=e.language$,Bt=n.canViewPrices();return $([de,Bt]).pipe(L(([Ae,qt])=>i.isB2BUser()?o.getOrderByKey(z,Ae,qt):o.getMyOrderByKey(z,Ae,qt)),x(Ae=>Ae?.data?.order?.canBeReturned||!1),ne(Ae=>{Ae||S.navigateByUrl(u.buildPagePath(F||e.language(),nn.NOT_FOUND),{skipLocationChange:!0})}
33))};var md=[{path:"",component:sa,canActivate:[yt],data:{permissions:{only:[G.VIEW_ORDERS],redirectTo:"/"}}},{path:`${Ie.OrdersOnline}/:orderKey`,component:zr,canActivate:[yt],data:{permissions:{only:[G.VIEW_ORDERS],redirectTo:"/"},gtm:{getPageCategory:()=>"purchase"}}},{path:`${Ie.OrdersStore}/:orderKey`,component:Wr,canActivate:[yt],data:{permissions:{only:[G.VIEW_STORE_ORDER_DETAILS],redirectTo:"/"},gtm:{getPageCategory:()=>"purchase"}}},{path:`:${gr.ExportEntityKey}`,component:Ri,canActivate:[yt],data:{permissions:{only:[G.VIEW_EXPORT_ORDER_HISTORY],redirectTo:"/"},pathMatch:"full",gtm:{pageTitle:"Order Details"}}},{path:`${Ie.OrdersOnline}/:orderKey/${Ie.OrdersReturn}`,component:la,canActivate:[yt,ca],data:{permissions:{only:[G.VIEW_ORDERS],redirectTo:"/"},returnUrl:null}}],da=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=ei({type:t})}static{this.\u0275inj=Qt({imports:[po.forChild(cn(md)),po]})}}return t})();var Nv=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=ei({type:t})}static{this.\u0275inj=Qt({providers:[ie,mi,tn,vn],imports:[Jo,da,fr,_r,zn,$i,Vi,Sn,We,Oi,Mt,yn]})}}return t})();export{Nv as OrderModule};

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.