1import{a as ar,b as dr,f as ur,g as lr,h as Se,i as pr,j as hr,k as Rr,p as G,q as ee,r as ke,s as qe,t as Er,u as me,v as gr,w as Or,x as Sr,y as $e}from"./chunk-F4HIK37E.js";import{m as cr}from"./chunk-IZDLYJRE.js";import{h as ir}from"./chunk-D3VLNOII.js";import{B as Oe,N as je,x as or}from"./chunk-CDH54WDO.js";import{nb as nr}from"./chunk-ROAQJP46.js";import{$f as L,Ae as b,Af as we,Bf as Pe,Da as W,Gd as N,H as he,Hd as E,I as Ne,Id as p,If as _,J as Ue,Jd as Wt,Jf as k,K as g,Kd as Jt,Ke as I,N as Yt,Na as Kt,Nd as C,Od as U,Oe as rr,Pd as D,Qd as Xt,R as B,Xe as Re,bf as J,d as Qt,df as X,dh as Ee,eh as ge,gh as Me,hg as q,i as Vt,if as j,jd as zt,jh as Fe,ka as m,lh as sr,me as er,na as T,nd as y,p as f,pa as Zt,pf as S,sa as l,sd as A,ta as z,ua as Y,ue as a,v as u,va as c,ve as tr,w as x,wa as O,we as F,yf as be}from"./chunk-ADQO3XXX.js";import{a as R,b as w}from"./chunk-3JMZ37NM.js";var te=class{},V=(()=>{let e=class e{constructor(r){this.adapter=r}get(r,t){return this.adapter.load(r,t)}getHistory(r,t,n,i){return this.adapter.loadHistory(r,t,n,i)}getConsignmentTracking(r,t,n){return this.adapter.getConsignmentTracking(r,t,n)}cancel(r,t,n){return this.adapter.cancel(r,t,n)}return(r,t){return this.adapter.createReturnRequest(r,t)}getReturnRequestDetail(r,t){return this.adapter.loadReturnRequestDetail(r,t)}getReturnRequestList(r,t,n,i){return this.adapter.loadReturnRequestList(r,t,n,i)}cancelReturnRequest(r,t,n){return this.adapter.cancelReturnRequest(r,t,n)}};e.\u0275fac=function(t){return new(t||e)(c(te))},e.\u0275prov=l({token:e,factory:e.\u0275fac});let s=e;return s})(),re=class{},yr=(()=>{let e=class e{constructor(r){this.adapter=r}placeOrder(r,t,n){return this.adapter.placeOrder(r,t,n)}};e.\u0275fac=function(t){return new(t||e)(c(re))},e.\u0275prov=l({token:e,factory:e.\u0275fac});let s=e;return s})(),se=class{},_r=(()=>{let e=class e{constructor(r){this.adapter=r}reorder(r,t){return this.adapter.reorder(r,t)}};e.\u0275fac=function(t){return new(t||e)(c(se))},e.\u0275prov=l({token:e,factory:e.\u0275fac});let s=e;return s})(),ne=class{},ve=(()=>{let e=class e{constructor(r){this.adapter=r}load(r,t){return this.adapter.load(r,t)}loadReplenishmentDetailsHistory(r,t,n,i,o){return this.adapter.loadReplenishmentDetailsHistory(r,t,n,i,o)}cancelReplenishmentOrder(r,t){return this.adapter.cancelReplenishmentOrder(r,t)}loadHistory(r,t,n,i){return this.adapter.loadHistory(r,t,n,i)}};e.\u0275fac=function(t){return new(t||e)(c(ne))},e.\u0275prov=l({token:e,factory:e.\u0275fac});let s=e;return s})(),ie=class{},Tr=(()=>{let e=class e{constructor(r){this.adapter=r}scheduleReplenishmentOrder(r,t,n,i){return this.adapter.scheduleReplenishmentOrder(r,t,n,i)}};e.\u0275fac=function(t){return new(t||e)(c(ie))},e.\u0275prov=l({token:e,factory:e.\u0275fac});let s=e;return s})(),Ar="[Order] Load Consignment Tracking",ds="[Order] Load Consignment Tracking Fail",Nr="[Order] Load Consignment Tracking Success",Ur="[Order] Clear Consignment Tracking",Qe=class{constructor(e){this.payload=e,this.type=Ar}},Ve=class{constructor(e){this.payload=e,this.type=ds}},Ye=class{constructor(e){this.payload=e,this.type=Nr}},Ze=class{constructor(){this.type=Ur}},br="order",Z="cancelOrder",K="cancelReturn",Q="cancelReplenishmentOrder",ce="[Order] User Orders",ae="[Order] Order Return Requests",$="[Order] Return Request Details",de="[Order] User Order Details",ue="[Order] User Replenishment Orders",le="[Order] User Replenishment Order Details",Ie="consignment-tracking-by-id-entities",ye="order-by-id-entities";function _e(s,e){return`${s},${e}`}var wr="[Order] Load Order Details",us="[Order] Load Order Details Fail",Pr="[Order] Load Order Details Success",ls="[Order] Clear Order Details",Mr="[Order] Cancel Order",ps="[Order] Cancel Order Fail",hs="[Order] Cancel Order Success",Rs="[Order] Reset Cancel Order Process",Ke=class extends a.LoaderLoadAction{constructor(e){super(de),this.payload=e,this.type=wr}},fe=class extends a.LoaderFailAction{constructor(e){super(de,e),this.payload=e,this.type=us}},Ce=class extends a.LoaderSuccessAction{constructor(e){super(de),this.payload=e,this.type=Pr}},ze=class extends a.LoaderResetAction{constructor(){super(de),this.type=ls}},We=class extends a.EntityLoadAction{constructor(e){super(_,Z),this.payload=e,this.type=Mr}},Je=class extends a.EntityFailAction{constructor(e){super(_,Z,e),this.payload=e,this.type=ps}},Xe=class extends a.EntitySuccessAction{constructor(){super(_,Z),this.type=hs}},et=class extends a.EntityLoaderResetAction{constructor(){super(_,Z),this.type=Rs}},Fr="[Order] Create Order Return Request",Es="[Order] Create Order Return Request Fail",gs="[Order] Create Order Return Request Success",jr="[Order] Load Order Return Request details",Os="[Order] Load Order Return Request details Fail",Ss="[Order] Load Order Return Request details Success",kr="[Order] Cancel Order Return Request",ms="[Order] Cancel Order Return Request Fail",fs="[Order] Cancel Order Return Request Success",qr="[Order] Load User Order Return Request List",Cs="[Order] Load User Order Return Request List Fail",$r="[Order] Load User Order Return Request List Success",Ds="[Order] Clear Order Return Request Details",Ls="[Order] Clear Order Return Request List",vs="[Order] Reset Cancel Return Request Process",tt=class extends a.LoaderLoadAction{constructor(e){super($),this.payload=e,this.type=Fr}},rt=class extends a.LoaderFailAction{constructor(e){super($,e),this.payload=e,this.type=Es}},st=class extends a.LoaderSuccessAction{constructor(e){super($),this.payload=e,this.type=gs}},nt=class extends a.LoaderLoadAction{constructor(e){super($),this.payload=e,this.type=jr}},it=class extends a.LoaderFailAction{constructor(e){super($,e),this.payload=e,this.type=Os}},ot=class extends a.LoaderSuccessAction{constructor(e){super($),this.payload=e,this.type=Ss}},ct=class extends a.EntityLoadAction{constructor(e){super(_,K),this.payload=e,this.type=kr}},at=class extends a.EntityFailAction{constructor(e){super(_,K,e),this.payload=e,this.type=ms}},dt=class extends a.EntitySuccessAction{constructor(){super(_,K),this.type=fs}},ut=class extends a.LoaderLoadAction{constructor(e){super(ae),this.payload=e,this.type=qr}},lt=class extends a.LoaderFailAction{constructor(e){super(ae,e),this.payload=e,this.type=Cs}},pt=class extends a.LoaderSuccessAction{constructor(e){super(ae),this.payload=e,this.type=$r}},ht=class extends a.LoaderResetAction{constructor(){super($),this.type=Ds}},Rt=class extends a.LoaderResetAction{constructor(){super(ae),this.type=Ls}},Et=class extends a.EntityLoaderResetAction{constructor(){super(_,K),this.type=vs}},Hr="[Order] Load User Orders",xr="[Order] Load User Orders Fail",Br="[Order] Load User Orders Success",Is="[Order] Clear User Orders",gt=class extends a.LoaderLoadAction{constructor(e){super(ce),this.payload=e,this.type=Hr}},Ot=class extends a.LoaderFailAction{constructor(e){super(ce,e),this.payload=e,this.type=xr}},St=class extends a.LoaderSuccessAction{constructor(e){super(ce),this.payload=e,this.type=Br}},De=class extends a.LoaderResetAction{constructor(){super(ce),this.type=Is}},Gr="[Order] Load Replenishment Order Details",Qr="[Order] Load Replenishment Order Details Success",ys="[Order] Load Replenishment Order Details Fail",_s="[Order] Clear Replenishment Order Details",Vr="[Order] Cancel Replenishment Order",qt="[Order] Cancel Replenishment Order Success",Ts="[Order] Cancel Replenishment Order Fail",As="[Order] Clear
1Cancel Replenishment Order",mt=class extends a.LoaderLoadAction{constructor(e){super(le),this.payload=e,this.type=Gr}},ft=class extends a.LoaderSuccessAction{constructor(e){super(le),this.payload=e,this.type=Qr}},Ct=class extends a.LoaderFailAction{constructor(e){super(le,e),this.payload=e,this.type=ys}},Dt=class extends a.LoaderResetAction{constructor(){super(le),this.type=_s}},Lt=class extends a.EntityLoadAction{constructor(e){super(_,Q),this.payload=e,this.type=Vr}},vt=class extends a.EntitySuccessAction{constructor(e){super(_,Q),this.payload=e,this.type=qt}},It=class extends a.EntityFailAction{constructor(e){super(_,Q,e),this.payload=e,this.type=Ts}},yt=class extends a.EntityLoaderResetAction{constructor(){super(_,Q),this.type=As}},Yr="[Order] Load User Replenishment Orders",Ns="[Order] Load User Replenishment Orders Fail",Zr="[Order] Load User Replenishment Orders Success",Us="[Order] Clear User Replenishment Orders",_t=class extends a.LoaderLoadAction{constructor(e){super(ue),this.payload=e,this.type=Yr}},Tt=class extends a.LoaderFailAction{constructor(e){super(ue,e),this.payload=e,this.type=Ns}},At=class extends a.LoaderSuccessAction{constructor(e){super(ue),this.payload=e,this.type=Zr}},Nt=class extends a.LoaderResetAction{constructor(){super(ue),this.type=Us}},Kr="[Order] Load Consignment Tracking By ID Data",zr="[Order] Load Consignment Tracking By ID Data Fail",Wr="[Order] Load Consignment Tracking By ID Data Success",Ut=class extends a.EntityLoadAction{constructor(e){super(Ie,_e(e.orderCode,e.consignmentCode)),this.payload=e,this.type=Kr}},bt=class extends a.EntityFailAction{constructor(e){super(Ie,_e(e.orderCode,e.consignmentCode),e.error),this.payload=e,this.type=zr}},wt=class extends a.EntitySuccessAction{constructor(e){super(Ie,_e(e.orderCode,e.consignmentCode)),this.payload=e,this.type=Wr}},Jr="[Order] Load Order By ID Data",Xr="[Order] Load Order By ID Data Fail",es="[Order] Load Order By ID Data Success",Pt=class extends a.EntityLoadAction{constructor(e){super(ye,e.code),this.payload=e,this.type=Jr}},Mt=class extends a.EntityFailAction{constructor(e){super(ye,e.code,e.error),this.payload=e,this.type=Xr}},Ft=class extends a.EntitySuccessAction{constructor(e){super(ye,e.code??""),this.payload=e,this.type=es}};var P=Wt(br),bs=p(P,s=>s.consignmentTracking),ws=p(bs,s=>s.tracking),ts=p(P,s=>s.orderDetail),Ps=p(ts,s=>a.loaderValueSelector(s)),Ms=p(ts,s=>a.loaderLoadingSelector(s)),$t=p(P,s=>s.orderReturn),Fs=p($t,s=>a.loaderValueSelector(s)),js=p($t,s=>a.loaderLoadingSelector(s)),ks=p($t,s=>a.loaderSuccessSelector(s)&&!a.loaderLoadingSelector(s)),rs=p(P,s=>s.orderReturnList),Vn=p(rs,s=>a.loaderValueSelector(s)),Ht=p(P,s=>s.orders),qs=p(Ht,s=>a.loaderSuccessSelector(s)),Yn=p(Ht,s=>a.loaderValueSelector(s)),Te=p(P,s=>s.replenishmentOrder),$s=p(Te,s=>a.loaderValueSelector(s)),Hs=p(Te,s=>a.loaderLoadingSelector(s)),xs=p(Te,s=>a.loaderSuccessSelector(s)),Bs=p(Te,s=>a.loaderErrorSelector(s)),pe=p(P,s=>s.replenishmentOrders),Zn=p(pe,s=>a.loaderValueSelector(s)),Gs=p(pe,s=>a.loaderLoadingSelector(s)),Qs=p(pe,s=>a.loaderErrorSelector(s)),Vs=p(pe,s=>a.loaderSuccessSelector(s)),Ys=p(P,s=>s.consignmentTrackingById),ss=(s,e)=>p(Ys,M=>a.entityLoaderStateSelector(M,_e(s,e))),Zs=(s,e)=>p(ss(s,e),M=>a.loaderValueSelector(M));var Ks=p(P,s=>s.orderById),ns=s=>p(Ks,e=>a.entityLoaderStateSelector(e,s)),zs=s=>p(ns(s),e=>a.loaderValueSelector(e));var jt=(()=>{let e=class e{constructor(r,t,n,i){this.store=r,this.processStateStore=t,this.userIdService=n,this.routingService=i}getOrderDetails(){return this.store.pipe(E(Ps))}loadOrderDetails(r){this.userIdService.takeUserId().subscribe(t=>{this.store.dispatch(new Ke({userId:t,orderCode:r}))})}clearOrderDetails(){this.store.dispatch(new ze)}getOrderHistoryList(r){return this.store.pipe(E(Ht),T(t=>{t.loading||t.success||t.error||this.loadOrderList(r)}),u(t=>t.value))}getOrderHistoryListLoaded(){return this.store.pipe(E(qs))}loadOrderList(r,t,n){this.userIdService.takeUserId(!0).subscribe({next:i=>{let o;this.routingService.getRouterState().pipe(B(1)).subscribe(d=>{o=d?.state?.params?.replenishmentOrderCode}).unsubscribe(),this.store.dispatch(new gt({userId:i,pageSize:r,currentPage:t,sort:n,replenishmentOrderCode:o}))},error:()=>{}})}clearOrderList(){this.store.dispatch(new De)}getConsignmentTracking(){return this.store.pipe(E(ws))}loadConsignmentTracking(r,t){this.userIdService.takeUserId().subscribe(n=>
1{this.store.dispatch(new Qe({userId:n,orderCode:r,consignmentCode:t}))})}clearConsignmentTracking(){this.store.dispatch(new Ze)}cancelOrder(r,t){this.userIdService.takeUserId().subscribe(n=>{this.store.dispatch(new We({userId:n,orderCode:r,cancelRequestInput:t}))})}getCancelOrderLoading(){return this.processStateStore.pipe(E(k.getProcessLoadingFactory(Z)))}getCancelOrderSuccess(){return this.processStateStore.pipe(E(k.getProcessSuccessFactory(Z)))}resetCancelOrderProcessState(){return this.store.dispatch(new et)}getOrderDetailsLoading(){return this.store.pipe(E(Ms))}};e.\u0275fac=function(t){return new(t||e)(c(N),c(N),c(b),c(rr))},e.\u0275prov=l({token:e,factory:e.\u0275fac});let s=e;return s})(),kt=(()=>{let e=class e{constructor(r,t,n){this.store=r,this.processStateStore=t,this.userIdService=n}createOrderReturnRequest(r){this.userIdService.takeUserId().subscribe(t=>{this.store.dispatch(new tt({userId:t,returnRequestInput:r}))})}getOrderReturnRequest(){return this.store.pipe(E(Fs))}getOrderReturnRequestList(r){return this.store.pipe(E(rs),T(t=>{t.loading||t.success||t.error||this.loadOrderReturnRequestList(r)}),u(t=>t.value))}loadOrderReturnRequestDetail(r){this.userIdService.takeUserId().subscribe(t=>{this.store.dispatch(new nt({userId:t,returnRequestCode:r}))})}loadOrderReturnRequestList(r,t,n){this.userIdService.takeUserId(!0).subscribe({next:i=>{this.store.dispatch(new ut({userId:i,pageSize:r,currentPage:t,sort:n}))},error:()=>{}})}clearOrderReturnRequestList(){this.store.dispatch(new Rt)}getReturnRequestLoading(){return this.store.pipe(E(js))}getReturnRequestSuccess(){return this.store.pipe(E(ks))}clearOrderReturnRequestDetail(){this.store.dispatch(new ht)}cancelOrderReturnRequest(r,t){this.userIdService.takeUserId().subscribe(n=>{this.store.dispatch(new ct({userId:n,returnRequestCode:r,returnRequestModification:t}))})}getCancelReturnRequestLoading(){return this.processStateStore.pipe(E(k.getProcessLoadingFactory(K)))}getCancelReturnRequestSuccess(){return this.processStateStore.pipe(E(k.getProcessSuccessFactory(K)))}resetCancelReturnRequestProcessState(){return this.store.dispatch(new Et)}};e.\u0275fac=function(t){return new(t||e)(c(N),c(N),c(b))},e.\u0275prov=l({token:e,factory:e.\u0275fac});let s=e;return s})(),mr=(()=>{let e=class e{constructor(r,t,n,i,o){this.activeCartFacade=r,this.userIdService=t,this.commandService=n,this.orderConnector=i,this.eventService=o,this.placedOrder$=new Qt(void 0),this.placeOrderCommand=this.commandService.create(d=>this.checkoutPreconditions().pipe(m(([h,v])=>this.orderConnector.placeOrder(h,v,d).pipe(T(H=>{this.placedOrder$.next(H),this.eventService.dispatch({userId:h,cartId:v,cartCode:v,order:H},ar)})))),{strategy:Ee.CancelPrevious})}checkoutPreconditions(){return x([this.userIdService.takeUserId(),this.activeCartFacade.takeActiveCartId(),this.activeCartFacade.isGuestCart()]).pipe(B(1),u(([r,t,n])=>{if(!r||!t||r===F&&!n)throw new Error("Checkout conditions not met");return[r,t]}))}placeOrder(r){return this.placeOrderCommand.execute(r)}getOrderDetails(){return this.placedOrder$.asObservable()}clearPlacedOrder(){this.placedOrder$.next(void 0)}setPlacedOrder(r){this.placedOrder$.next(r)}getPickupEntries(){return this.getOrderDetails().pipe(u(r=>r?.entries?.filter(t=>t.deliveryPointOfService!==void 0)||[]))}getDeliveryEntries(){return this.getOrderDetails().pipe(u(r=>r?.entries?.filter(t=>t.deliveryPointOfService===void 0)||[]))}};e.\u0275fac=function(t){return new(t||e)(c(Oe),c(b),c(ge),c(yr),c(be))},e.\u0275prov=l({token:e,factory:e.\u0275fac});let s=e;return s})(),fr=(()=>{let e=class e{constructor(r,t,n,i,o){this.commandService=r,this.reorderOrderConnector=t,this.userIdService=n,this.activeCartFacade=i,this.multiCartFacade=o,this.reorderCommand=this.commandService.create(({orderId:d})=>this.reorderPreconditions().pipe(m(h=>this.reorderOrderConnector.reorder(d,h))),{strategy:Ee.CancelPrevious})}reorder(r){return this.reorderCommand.execute({orderId:r})}reorderPreconditions(){return x([this.userIdService.takeUserId(),this.activeCartFacade.getActiveCartId()]).pipe(B(1),u(([r,t])=>
1{if(!r)throw new Error("Must be logged in to reorder");return t&&this.multiCartFacade.deleteCart(t,r),r}))}};e.\u0275fac=function(t){return new(t||e)(c(ge),c(_r),c(b),c(Oe),c(or))},e.\u0275prov=l({token:e,factory:e.\u0275fac});let s=e;return s})(),Cr=(()=>{let e=class e{constructor(r,t,n){this.store=r,this.processStateStore=t,this.userIdService=n}loadReplenishmentOrderDetails(r){this.userIdService.takeUserId(!0).subscribe({next:t=>{this.store.dispatch(new mt({userId:t,replenishmentOrderCode:r}))},error:()=>{}})}getReplenishmentOrderDetails(){return this.store.pipe(E($s))}getReplenishmentOrderDetailsLoading(){return this.store.pipe(E(Hs))}getReplenishmentOrderDetailsSuccess(){return this.store.pipe(E(xs))}getReplenishmentOrderDetailsError(){return this.store.pipe(E(Bs))}clearReplenishmentOrderDetails(){this.store.dispatch(new Dt)}cancelReplenishmentOrder(r){this.userIdService.takeUserId(!0).subscribe({next:t=>{this.store.dispatch(new Lt({userId:t,replenishmentOrderCode:r}))},error:()=>{}})}getCancelReplenishmentOrderLoading(){return this.processStateStore.pipe(E(k.getProcessLoadingFactory(Q)))}getCancelReplenishmentOrderSuccess(){return this.processStateStore.pipe(E(k.getProcessSuccessFactory(Q)))}getCancelReplenishmentOrderError(){return this.processStateStore.pipe(E(k.getProcessErrorFactory(Q)))}clearCancelReplenishmentOrderProcessState(){this.store.dispatch(new yt)}getReplenishmentOrderHistoryList(r){return this.store.pipe(E(pe),T(t=>{t.loading||t.success||t.error||this.loadReplenishmentOrderList(r)}),u(t=>t.value))}getReplenishmentOrderHistoryListLoading(){return this.store.pipe(E(Gs))}getReplenishmentOrderHistoryListError(){return this.store.pipe(E(Qs))}getReplenishmentOrderHistoryListSuccess(){return this.store.pipe(E(Vs))}loadReplenishmentOrderList(r,t,n){this.userIdService.takeUserId(!0).subscribe({next:i=>{this.store.dispatch(new _t({userId:i,pageSize:r,currentPage:t,sort:n}))},error:()=>{}})}clearReplenishmentOrderList(){this.store.dispatch(new Nt)}};e.\u0275fac=function(t){return new(t||e)(c(N),c(N),c(b))},e.\u0275prov=l({token:e,factory:e.\u0275fac});let s=e;return s})(),Dr=(()=>{let e=class e{constructor(r,t,n,i,o,d){this.activeCartFacade=r,this.userIdService=t,this.commandService=n,this.scheduledReplenishmentOrderConnector=i,this.eventService=o,this.orderFacade=d,this.scheduleReplenishmentOrderCommand=this.commandService.create(({form:h,termsChecked:v})=>this.checkoutPreconditions().pipe(m(([H,Ae])=>this.scheduledReplenishmentOrderConnector.scheduleReplenishmentOrder(Ae,h,v,H).pipe(T(Gt=>{this.orderFacade.setPlacedOrder(Gt),this.eventService.dispatch({userId:H,cartId:Ae,cartCode:Ae,replenishmentOrder:Gt},dr)})))),{strategy:Ee.CancelPrevious})}checkoutPreconditions(){return x([this.userIdService.takeUserId(),this.activeCartFacade.takeActiveCartId(),this.activeCartFacade.isGuestCart()]).pipe(B(1),u(([r,t,n])=>{if(!r||!t||r===F&&!n)throw new Error("Order conditions not met");return[r,t]}))}scheduleReplenishmentOrder(r,t){return this.scheduleReplenishmentOrderCommand.execute({termsChecked:t,form:r})}};e.\u0275fac=function(t){return new(t||e)(c(Oe),c(b),c(ge),c(Tr),c(be),c(Se))},e.\u0275prov=l({token:e,factory:e.\u0275fac});let s=e;return s})(),Ws=(()=>{let e=class e{constructor(){this.logger=O(I),this.actions$=O(U),this.orderConnector=O(V),this.loadConsignmentTrackingById$=C(()=>this.actions$.pipe(D(Kr),u(r=>r.payload),m(r=>this.orderConnector.getConsignmentTracking(r.orderCode,r.consignmentCode,r.userId).pipe(u(t=>new wt({orderCode:r.orderCode,consignmentCode:r.consignmentCode,consignmentTracking:t})),g(t=>f(new bt({orderCode:r.orderCode,consignmentCode:r.consignmentCode,error:S(t,this.logger)})))))))}};e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=l({token:e,factory:e.\u0275fac});let s=e;return s})(),Js=(()=>{let e=class e{constructor(r,t){this.actions$=r,this.orderConnector=t,this.logger=O(I),this.loadConsignmentTracking$=C(()=>this.actions$.pipe(D(Ar),u(n=>n.payload),m(n=>this.orderConnector.getConsignmentTracking(n.orderCode,n.consignmentCode,n.userId).pipe(u(i=>new Ye(i)),g(i=>f(new Ve(S(i,this.logger))))))))}};e.\u0275fac=function(t){return new(t||e)(c(U),c(V))},e.\u0275prov=l({token:e,factory:e.\u0275fac});let s=e;return s})(),Xs=(()=>{let e=class e{constructor(){this.logger=O(I),this.actions$=O(U),this.orderConnector=O(V),this.loadOrderById$=C(()=>this.actions$.pipe(D(Jr),u(r=>r.payload),Yt(({userId:r,code:t})=>this.orderConnector.get(r,t).pipe(u(n=>new Ft(n)),g(n=>f(new Mt({code:t,error:S(n,this.logger)})))))))}};e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=l({token:e,factory:e.\u0275fac});let s=e;return s})(),en=(()=>{let e=class e{constructor(r,t,n,i,o){this.actions$=r,this.orderConnector=t,this.globalMessageService=n,this.userIdService=i,this.store=o,this.logger=O(I),this.loadOrderDetails$=C(()=>this.actions$.pipe(D(wr),u(d=>d.payload),m(d=>this.orderConnector.get(d.userId,d.orderCode).pipe(u(h=>new Ce(h)),g(h=>f(new fe(S(h,this.logger)))))))),this.cancelOrder$=C(()=>this.actions$.pipe(D(Mr),u(d=>d.payload),m(d=>this.orderConnector.cancel(d.userId,d.orderCode,d.cancelRequestInput).pipe(u(()=>new Xe),g(h=>
1(h.error?.errors.forEach(v=>this.globalMessageService.add(v.message,we.MSG_TYPE_ERROR)),f(new Je(S(h,this.logger))))))))),this.resetOrderDetails$=C(()=>this.actions$.pipe(D(Re.LANGUAGE_CHANGE,Re.CURRENCY_CHANGE),Zt(this.userIdService.getUserId(),this.store.pipe(he(d=>!!d.order?.orderDetail),u(d=>d.order.orderDetail.value?.code))),m(([,d,h])=>h?this.orderConnector.get(d,h).pipe(u(v=>new Ce(v)),g(v=>f(new fe(S(v,this.logger))))):Vt)))}};e.\u0275fac=function(t){return new(t||e)(c(U),c(V),c(Pe),c(b),c(N))},e.\u0275prov=l({token:e,factory:e.\u0275fac});let s=e;return s})(),tn=(()=>{let e=class e{constructor(r,t){this.actions$=r,this.orderConnector=t,this.logger=O(I),this.createReturnRequest$=C(()=>this.actions$.pipe(D(Fr),u(n=>n.payload),m(n=>this.orderConnector.return(n.userId,n.returnRequestInput).pipe(u(i=>new st(i)),g(i=>f(new rt(S(i,this.logger)))))))),this.loadReturnRequest$=C(()=>this.actions$.pipe(D(jr),u(n=>n.payload),m(n=>this.orderConnector.getReturnRequestDetail(n.userId,n.returnRequestCode).pipe(u(i=>new ot(i)),g(i=>f(new it(S(i,this.logger)))))))),this.cancelReturnRequest$=C(()=>this.actions$.pipe(D(kr),u(n=>n.payload),m(n=>this.orderConnector.cancelReturnRequest(n.userId,n.returnRequestCode,n.returnRequestModification).pipe(u(()=>new dt),g(i=>f(new at(S(i,this.logger)))))))),this.loadReturnRequestList$=C(()=>this.actions$.pipe(D(qr),u(n=>n.payload),m(n=>this.orderConnector.getReturnRequestList(n.userId,n.pageSize,n.currentPage,n.sort).pipe(u(i=>new pt(i)),g(i=>f(new lt(S(i,this.logger))))))))}};e.\u0275fac=function(t){return new(t||e)(c(U),c(V))},e.\u0275prov=l({token:e,factory:e.\u0275fac});let s=e;return s})(),rn=(()=>{let e=class e{constructor(r,t,n){this.actions$=r,this.orderConnector=t,this.replenishmentOrderConnector=n,this.logger=O(I),this.loadUserOrders$=C(()=>this.actions$.pipe(D(Hr),u(i=>i.payload),m(i=>(i.replenishmentOrderCode?this.replenishmentOrderConnector.loadReplenishmentDetailsHistory(i.userId,i.replenishmentOrderCode??"",i.pageSize,i.currentPage,i.sort):this.orderConnector.getHistory(i.userId,i.pageSize,i.currentPage,i.sort)).pipe(u(o=>new St(o)),g(o=>f(new Ot(S(o,this.logger)))))))),this.resetUserOrders$=C(()=>this.actions$.pipe(D(Re.LANGUAGE_CHANGE),u(()=>new De)))}};e.\u0275fac=function(t){return new(t||e)(c(U),c(V),c(ve))},e.\u0275prov=l({token:e,factory:e.\u0275fac});let s=e;return s})(),sn=(()=>{let e=class e{constructor(r,t,n){this.actions$=r,this.replenishmentOrderConnector=t,this.globalMessageService=n,this.logger=O(I),this.loadReplenishmentOrderDetails$=C(()=>this.actions$.pipe(D(Gr),u(i=>i.payload),m(i=>this.replenishmentOrderConnector.load(i.userId,i.replenishmentOrderCode).pipe(u(o=>new ft(o)),g(o=>f(new Ct(S(o,this.logger)))))))),this.cancelReplenishmentOrder$=C(()=>this.actions$.pipe(D(Vr),u(i=>i.payload),m(i=>this.replenishmentOrderConnector.cancelReplenishmentOrder(i.userId,i.replenishmentOrderCode).pipe(u(o=>new vt(o)),g(o=>(o?.error?.errors.forEach(d=>this.globalMessageService.add(d.message,we.MSG_TYPE_ERROR)),f(new It(S(o,this.logger)))))))))}};e.\u0275fac=function(t){return new(t||e)(c(U),c(ve),c(Pe))},e.\u0275prov=l({token:e,factory:e.\u0275fac});let s=e;return s})(),nn=(()=>{let e=class e{constructor(r,t){this.actions$=r,this.replenishmentOrderConnector=t,this.logger=O(I),this.loadUserReplenishmentOrders$=C(()=>this.actions$.pipe(D(Yr),u(n=>n.payload),m(n=>this.replenishmentOrderConnector.loadHistory(n.userId,n.pageSize,n.currentPage,n.sort).pipe(u(i=>new At(i)),g(i=>f(new Tt(S(i,this.logger))))))))}};e.\u0275fac=function(t){return new(t||e)(c(U),c(ve))},e.\u0275prov=l({token:e,factory:e.\u0275fac});let s=e;return s})(),on=[rn,en,Js,tn,sn,nn,Ws,Xs],He=void 0;function cn(s=He,e){switch(e.type){case Wr:return e.payload.consignmentTracking?e.payload.consignmentTracking:He;case zr:return He}return s}var xe=void 0;function an(s=xe,e){switch(e.type){case es:return e.payload?e.payload:xe;case Xr:return xe}return s}var Lr={tracking:{}};function dn(s=Lr,e){switch(e.type){case Nr:return{tracking:e.payload};case Ur:return Lr}return s}var un={};function ln(s=un,e){switch(e.type){case Pr:return e.payload}return s}var vr={returnRequests:[],pagination:{},sorts:[]};function pn(s=vr,e){switch(e.type){case $r:return e.payload?e.payload:vr}return s}var Be={orders:[],pagination:{},sorts:[]};function hn(s=Be,e){switch(e.type){case Br:return e.payload?e.payload:Be;case xr:return Be}return s}var Ir={};function Rn(s=Ir,e){switch(e.type){case Qr:case qt:return e.payload?e.payload:Ir;default:return s}}var Ge={replenishmentOrders:[],pagination:{},sorts:[]};function En(s=Ge,e){switch(e.type){case Zr:return e.payload?e.payload:Ge;case qt:{let M=e.payload,r=[...s.replenishmentOrders??[]],t=r.findIndex(n=>n.replenishmentOrderCode===M.replenishmentOrderCode);return t===-1?Ge:(r[t]=R({},M),w(R({},s),{replenishmentOrders:r}))}}return s}
1function gn(){return{orders:a.loaderReducer(ce,hn),orderDetail:a.loaderReducer(de,ln),replenishmentOrders:a.loaderReducer(ue,En),orderReturn:a.loaderReducer($),orderReturnList:a.loaderReducer(ae,pn),consignmentTracking:dn,replenishmentOrder:a.loaderReducer(le,Rn),orderById:a.entityLoaderReducer(ye,an),consignmentTrackingById:a.entityLoaderReducer(Ie,cn)}}var is=new Y("OrderReducers"),On={provide:is,useFactory:gn},Sn=(()=>{let e=class e{constructor(){this.orderReturnRequestService=O(kt),this.store=O(N),this.userIdService=O(b),this.orderHistoryService=O(jt)}clearOrderList(){this.orderHistoryService.clearOrderList()}getOrderDetailsWithTracking(r){return this.getOrderDetails(r).pipe(m(t=>{let n=R({},t);n.consignments=[];let i=(t.consignments??[]).map(o=>{let d=R({},o);return o.code&&o.trackingID?this.getConsignmentTracking(t?.code??"",o.code).pipe(u(h=>(d.consignmentTracking=h,n.consignments?.push(d),n))):(n.consignments?.push(d),f(n))});return i===void 0||i.length<1?f(n):x(i).pipe(m(o=>o!==void 0?f(o[0]):f(t)))}))}getOrderHistoryListWithDetails(r){let t={};return this.orderHistoryService.getOrderHistoryList(r).pipe(m(n=>{t.pagination=n?.pagination,t.sorts=n?.sorts,t.orders=[];let i=(n?.orders??[]).map(o=>{let d=R({},o);return this.getOrderDetailsWithTracking(o?.code??"").pipe(u(h=>(d.returnable=h?.returnable,d.totalItems=h?.totalItems,d.entries=h?.entries,d.consignments=h?.consignments,d.unconsignedEntries=h?.unconsignedEntries,d.returnRequests=[],t.orders?.push(d),t)))});return i.length===0&&i.push(f(t)),x(i)}),u(n=>n!==void 0?n[0]:{}))}getOrderHistoryList(r){let t=this.getOrderHistoryListWithDetails(r),n=this.orderReturnRequestService.getOrderReturnRequestList();return x([t,n]).pipe(m(i=>{let o=i?.[1]?.returnRequests,d=i?.[0];return o&&d?.orders?d.pagination?.totalResults===0?f(d):d.orders.map(h=>{let v=o?.filter(H=>H.order?.code===h.code);return v&&(h.returnRequests=v),d}):f(d)}
1))}getOrderDetailsValue(r){return this.store.select(zs(r)).pipe(he(t=>!!t))}getOrderDetailsState(r){return this.store.select(ns(r))}loadOrderDetails(r){this.userIdService.takeUserId(!0).subscribe({next:t=>this.store.dispatch(new Pt({userId:t,code:r}))})}getOrderDetails(r){let t=this.getOrderDetailsState(r).pipe(Ue(0),T(n=>{n.loading||n.success||n.error||this.loadOrderDetails(r)}));return Ne(()=>t.subscribe(),()=>this.getOrderDetailsValue(r))}getConsignmentTrackingValue(r,t){return this.store.select(Zs(r,t)).pipe(he(n=>!!n))}getConsignmentTrackingState(r,t){return this.store.select(ss(r,t))}loadConsignmentTracking(r,t){this.userIdService.takeUserId(!0).subscribe({next:n=>this.store.dispatch(new Ut({orderCode:r,consignmentCode:t,userId:n}))})}getConsignmentTracking(r,t){let n=this.getConsignmentTrackingState(r,t).pipe(Ue(0),T(i=>{i.loading||i.success||i.error||this.loadConsignmentTracking(r,t)}));return Ne(()=>n.subscribe(),()=>this.getConsignmentTrackingValue(r,t))}};e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=l({token:e,factory:e.\u0275fac});let s=e;return s})(),mn=[kt,{provide:lr,useExisting:kt},Sn,jt,{provide:ur,useExisting:jt},Cr,{provide:hr,useExisting:Cr},Dr,{provide:Rr,useExisting:Dr},mr,{provide:Se,useExisting:mr},fr,{provide:pr,useExisting:fr}],fn=(()=>{let e=class e{};e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=W({type:e}),e.\u0275inj=z({providers:[On],imports:[Xt.forFeature(on),Jt.forFeature(br,is)]});let s=e;return s})(),Kn=(()=>{let e=class e{};e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=W({type:e}),e.\u0275inj=z({providers:[...mn,V,ve,yr,Tr,_r],imports:[fn]});let s=e;return s})();var Dn=(()=>{let e=class e{constructor(r){this.converter=r}convert(r,t){return t===void 0&&(t=R({},r)),r.entries&&(t.entries=r.entries.map(n=>this.convertOrderEntry(n,r.code,r.appliedProductPromotions))),r.consignments&&(t.consignments=r.consignments.map(n=>w(R({},n),{entries:n.entries?.map(i=>w(R({},i),{orderEntry:this.convertOrderEntry(i.orderEntry,r.code,r.appliedProductPromotions)}))}))),r.unconsignedEntries&&(t.unconsignedEntries=r.unconsignedEntries.map(n=>this.convertOrderEntry(n,r.code,r.appliedProductPromotions))),t}convertOrderEntry(r,t,n){return w(R({},r),{product:this.converter.convert(r?.product,q),orderCode:t,promotions:this.converter.convert({item:r,promotions:n},je)})}};e.\u0275fac=function(t){return new(t||e)(c(L))},e.\u0275prov=l({token:e,factory:e.\u0275fac,providedIn:"root"});let s=e;return s})(),Ln=(()=>{let e=class e{constructor(r){this.converter=r}convert(r,t){return t===void 0&&(t=R({},r)),r.entries&&(t.entries=r.entries.map(n=>w(R({},n),{product:this.converter.convert(n.product,q),promotions:this.converter.convert({item:n,promotions:r.appliedProductPromotions},je)}))),t}};e.\u0275fac=function(t){return new(t||e)(c(L))},e.\u0275prov=l({token:e,factory:e.\u0275fac,providedIn:"root"});let s=e;return s})(),vn=(()=>{let e=class e{constructor(r){this.converter=r}convert(r,t){return t===void 0&&(t=R({},r)),r.returnEntries&&(t.returnEntries=r.returnEntries.map(n=>w(R({},n),{orderEntry:this.convertOrderEntry(n.orderEntry)}))),t}convertOrderEntry(r){return w(R({},r),{product:this.converter.convert(r?.product,q)})}};e.\u0275fac=function(t){return new(t||e)(c(L))},e.\u0275prov=l({token:e,factory:e.\u0275fac,providedIn:"root"});let s=e;return s})(),In=(()=>{let e=class e{convert(r,t){return t===void 0&&(t=R({},r)),r.replenishmentStartDate&&(t.replenishmentStartDate=this.convertDate(r.replenishmentStartDate)),t}convertDate(r){let t=new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hourCycle:"h23"});return`${r}T${t}:00${sr.getLocalTimezoneOffset()}`}};e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=l({token:e,factory:e.\u0275fac,providedIn:"root"});let s=e;return s})(),xt={"Content-Type":"application/json"},Bt=(()=>{let e=class e{constructor(r,t,n){this.http=r,this.occEndpoints=t,this.converter=n,this.logger=O(I)}load(r,t){let n=this.occEndpoints.buildUrl("orderDetail",{urlParams:{userId:r,orderId:t}}),i=new y;return r===F&&(i=X.createHeader(J,!0,i)),this.http.get(n,{headers:i}).pipe(this.converter.pipeable(G))}loadHistory(r,t,n,i){let o={};
1t&&(o.pageSize=t.toString()),n&&(o.currentPage=n.toString()),i&&(o.sort=i.toString());let d=this.occEndpoints.buildUrl("orderHistory",{urlParams:{userId:r},queryParams:o});return this.http.get(d).pipe(this.converter.pipeable(qe))}getConsignmentTracking(r,t,n=tr){let i=this.occEndpoints.buildUrl("consignmentTracking",{urlParams:{userId:n,orderCode:r,consignmentCode:t}});return this.http.get(i).pipe(this.converter.pipeable(Er))}cancel(r,t,n){let i=this.occEndpoints.buildUrl("cancelOrder",{urlParams:{userId:r,orderId:t}}),o=new y(R({},xt));return this.http.post(i,n,{headers:o}).pipe(g(d=>{throw S(d,this.logger)}))}createReturnRequest(r,t){let n=this.occEndpoints.buildUrl("returnOrder",{urlParams:{userId:r}}),i=new y(R({},xt));return t=this.converter.convert(t,gr),this.http.post(n,t,{headers:i}).pipe(g(o=>{throw S(o,this.logger)}),this.converter.pipeable(me))}loadReturnRequestList(r,t,n,i){let o={};t&&(o.pageSize=t.toString()),n&&(o.currentPage=n.toString()),i&&(o.sort=i.toString());let d=this.occEndpoints.buildUrl("orderReturns",{urlParams:{userId:r},queryParams:o});return this.http.get(d).pipe(this.converter.pipeable(Or))}loadReturnRequestDetail(r,t){let n=this.occEndpoints.buildUrl("orderReturnDetail",{urlParams:{userId:r,returnRequestCode:t}});return this.http.get(n).pipe(this.converter.pipeable(me))}cancelReturnRequest(r,t,n){let i=this.occEndpoints.buildUrl("cancelReturn",{urlParams:{userId:r,returnRequestCode:t}}),o=new y(R({},xt));return this.http.patch(i,n,{headers:o}).pipe(g(d=>{throw S(d,this.logger)}))}};e.\u0275fac=function(t){return new(t||e)(c(A),c(j),c(L))},e.\u0275prov=l({token:e,factory:e.\u0275fac});let s=e;return s})(),yn=(()=>{let e=class e{constructor(r,t,n){this.http=r,this.occEndpoints=t,this.converter=n,this.logger=O(I)}placeOrder(r,t,n){let i=new y({"Content-Type":"application/x-www-form-urlencoded"});return r===F&&(i=X.createHeader(J,!0,i)),this.http.post(this.getPlaceOrderEndpoint(r,t,n.toString()),{},{headers:i}).pipe(g(o=>{throw S(o,this.logger)}),Fe({shouldRetry:Me}),this.converter.pipeable(G))}getPlaceOrderEndpoint(r,t,n){return this.occEndpoints.buildUrl("placeOrder",{urlParams:{userId:r},queryParams:{cartId:t,termsChecked:n}})}};e.\u0275fac=function(t){return new(t||e)(c(A),c(j),c(L))},e.\u0275prov=l({token:e,factory:e.\u0275fac});let s=e;return s})(),_n=(()=>{let e=class e{constructor(r,t,n){this.http=r,this.occEndpoints=t,this.converter=n}load(r,t){return this.http.get(this.occEndpoints.buildUrl("replenishmentOrderDetails",{urlParams:{userId:r,replenishmentOrderCode:t}})).pipe(this.converter.pipeable(ee))}loadReplenishmentDetailsHistory(r,t,n,i,o){let d={};return n&&(d.pageSize=n.toString()),i&&(d.currentPage=i.toString()),o&&(d.sort=o.toString()),this.http.get(this.occEndpoints.buildUrl("replenishmentOrderDetailsHistory",{urlParams:{userId:r,replenishmentOrderCode:t},queryParams:d})).pipe(this.converter.pipeable(qe))}cancelReplenishmentOrder(r,t){let n=new y().set("Content-Type","application/json");return this.http.patch(this.occEndpoints.buildUrl("cancelReplenishmentOrder",{urlParams:{userId:r,replenishmentOrderCode:t}}),{},{headers:n}).pipe(this.converter.pipeable(ee))}loadHistory(r,t,n,i){let o={};t&&(o.pageSize=t.toString()),n&&(o.currentPage=n.toString()),i&&(o.sort=i.toString());let d=this.occEndpoints.buildUrl("replenishmentOrderHistory",{urlParams:{userId:r},queryParams:o});return this.http.get(d).pipe(this.converter.pipeable(Sr))}};e.\u0275fac=function(t){return new(t||e)(c(A),c(j),c(L))},e.\u0275prov=l({token:e,factory:e.\u0275fac});let s=e;return s})(),Tn=(()=>{let e=class e{constructor(r,t,n){this.http=r,this.occEndpoints=t,this.converter=n,this.logger=O(I)}scheduleReplenishmentOrder(r,t,n,i){t=this.converter.convert(t,$e);let o=new y().set("Content-Type","application/json");return this.http.post(this.getScheduleReplenishmentOrderEndpoint(i,r,n.toString()),t,{headers:o}).pipe(g(d=>{throw S(d,this.logger)}),Fe({shouldRetry:Me}),this.converter.pipeable(ee))}getScheduleReplenishmentOrderEndpoint(r,t,n){return this.occEndpoints.buildUrl("scheduleReplenishmentOrder",{urlParams:{userId:r},queryParams:{cartId:t,termsChecked:n}})}};e.\u0275fac=function(t){return new(t||e)(c(A),c(j),c(L))},e.\u0275prov=l({token:e,factory:e.\u0275fac});let s=e;return s})(),An=(()=>{let e=class e{convert(r,t){return t===void 0&&(t=R({},r)),t}};e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=l({token:e,factory:e.\u0275fac,providedIn:"root"});let s=e;return s})(),Nn=(()=>{let e=class e{constructor(r,t,n){this.http=r,this.occEndpoints=t,this.converter=n,this.logger=O(I)}reorder(r,t){let n=new y().set("Content-Type","application/json");return this.http.post(this.getReorderOrderEndpoint(r,t),{},{headers:n}).pipe(g(i=>{throw S(i,this.logger)}),this.converter.pipeable(ke))}getReorderOrderEndpoint(r,t){return this.occEndpoints.buildUrl("reorder",{urlParam
1s:{userId:t},queryParams:{orderCode:r}})}};e.\u0275fac=function(t){return new(t||e)(c(A),c(j),c(L))},e.\u0275prov=l({token:e,factory:e.\u0275fac});let s=e;return s})(),Un={backend:{occ:{endpoints:{orderHistory:"users/${userId}/orders",orderDetail:"users/${userId}/orders/${orderId}?fields=FULL",consignmentTracking:"users/${userId}/orders/${orderCode}/consignments/${consignmentCode}/tracking",cancelOrder:"users/${userId}/orders/${orderId}/cancellation",returnOrder:"users/${userId}/orderReturns?fields=BASIC,returnEntries(BASIC,refundAmount(formattedValue),orderEntry(basePrice(formattedValue),product(name,code,baseOptions,images(DEFAULT,galleryIndex)))),deliveryCost(formattedValue),totalPrice(formattedValue),subTotal(formattedValue)",orderReturns:"users/${userId}/orderReturns?fields=BASIC",orderReturnDetail:"users/${userId}/orderReturns/${returnRequestCode}?fields=BASIC,returnEntries(BASIC,refundAmount(formattedValue),orderEntry(basePrice(formattedValue),product(name,code,baseOptions,images(DEFAULT,galleryIndex)))),deliveryCost(formattedValue),totalPrice(formattedValue),subTotal(formattedValue)",cancelReturn:"users/${userId}/orderReturns/${returnRequestCode}",replenishmentOrderDetails:"users/${userId}/replenishmentOrders/${replenishmentOrderCode}?fields=FULL,costCenter(FULL),purchaseOrderNumber,paymentType,user",replenishmentOrderDetailsHistory:"users/${userId}/replenishmentOrders/${replenishmentOrderCode}/orders",cancelReplenishmentOrder:"users/${userId}/replenishmentOrders/${replenishmentOrderCode}?fields=FULL,costCenter(FULL),purchaseOrderNumber,paymentType,user",replenishmentOrderHistory:"users/${userId}/replenishmentOrders?fields=FULL,replenishmentOrders(FULL, purchaseOrderNumber)",placeOrder:"users/${userId}/orders?fields=FULL"}}}},ai=(()=>{let e=class e{};e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=W({type:e}),e.\u0275inj=z({providers:[er(Un),{provide:te,useClass:Bt},{provide:ne,useClass:_n},{provide:re,useClass:yn},{provide:ie,useClass:Tn},{provide:se,useClass:Nn},{provide:me,useExisting:vn,multi:!0},{provide:G,useExisting:Dn,multi:!0},{provide:ee,useExisting:Ln,multi:!0},{provide:$e,useExisting:In,multi:!0},{provide:ke,useExisting:An,multi:!0}],imports:[zt]});let s=e;return s})();var os=(()=>{let e=class e extends nr{constructor(){super(...arguments),this.httpClient=O(A)}getFilenameFromHeaders(r){return r.get("Content-Disposition").split(";").find(n=>n.trim().startsWith("filename"))?.split("=")?.[1]}download(r,t,n){if(!n)return super.download(r,t);let i=new y({"Content-Type":"application/octet-stream"});this.httpClient.get(r,{headers:i,responseType:"blob",observe:"response"}).pipe(T(o=>{let d=t||this.getFilenameFromHeaders(o.headers),h=URL.createObjectURL(o.body);super.download(h,d)}),B(1)).subscribe()}};e.\u0275fac=(()=>{let r;return function(n){return(r||(r=Kt(e)))(n||e)}})(),e.\u0275prov=l({token:e,factory:e.\u0275fac,providedIn:"root"});let s=e;return s})();var cs=new Y("OrderCancellationNormalizer"),mi=(()=>{let e=class e{constructor(r){this.converterService=r}convert(r,t){return t=R({},r),t.orderEntries.forEach(n=>{n.product&&(n.product=this.converterService.convert(n.product,q))}),t}};e.\u0275fac=function(t){return new(t||e)(c(L))},e.\u0275prov=l({token:e,factory:e.\u0275fac,providedIn:"root"});let s=e;return s})();var as=new Y("UserOrderNormalizer"),Ii=(()=>{let e=class e{constructor(r){this.converterService=r}convert(r,t){return t=R({},r),t.orders.forEach(n=>{if(!n.products){n.products=[];return}n.products=n.products.map(i=>this.converterService.convert(i,q))}),t}};e.\u0275fac=function(t){return new(t||e)(c(L))},e.\u0275prov=l({token:e,factory:e.\u0275fac,providedIn:"root"});let s=e;return s})();var ji=(()=>{let e=class e extends Bt{constructor(r,t,n,i,o){super(r,t,n),this.http=r,this.occEndpoints=t,this.converter=n,this.fileDownloadService=i,this.siteConfigService=o,this.DEFAULT_ORDERS_PAGE_SIZE=5,this.CART_ID_CURRENT="current"}reorder(r,t,n){t||(t=this.CART_ID_CURRENT);let i=this.occEndpoints.buildUrl("reorder",{urlParams:{userId:r,cartId:t}}),o=new y;return r===F&&(o=X.createHeader(J,!0,o)),this.http.post(i,{orderEntries:n},{headers:o}).pipe(this.converter.pipeable(cr))}getUserOrderDetails(r,t){let n=this.occEndpoints.buildUrl("order",{urlParam
1s:{userId:r,orderId:t}});return this.http.get(n).pipe(this.converter.pipeable(G))}getUserOrders(r,t=0,n){let i=this.occEndpoints.buildUrl("orders",{urlParams:{userId:r}});return this.siteConfigService.getConfig("myaccount.orders.page.size",this.DEFAULT_ORDERS_PAGE_SIZE).pipe(u(parseInt),m(o=>this.http.get(i,{params:{currentPage:String(t),pageSize:String(n||o)}}).pipe(this.converter.pipeable(as))))}getBulkOrderTemplate(r){let t=this.occEndpoints.buildUrl("bulkTemplate",{urlParams:{userId:r}});return this.http.get(t)}validateBulkOrderFile(r,t){let n=this.occEndpoints.buildUrl("bulkValidate",{urlParams:{userId:r}}),i=new FormData;return i.set("file",t),this.http.post(n,i)}submitBulkOrder(r,t="",n){let i=this.occEndpoints.buildUrl("bulkSubmit",{urlParams:{userId:r},queryParams:{cartId:t}});return this.http.post(i,n)}generateInvoice(r,t,n=!1){let i=this.occEndpoints.buildUrl("generateInvoice",{urlParams:{userId:r,code:t},queryParams:{refundInvoice:n}});return this.http.post(i,{}).pipe(u(o=>o?.consignmentsInvoices??[]))}getInvoiceEligibility(r,t,n=!1){let i=this.occEndpoints.buildUrl("invoiceEligibility",{urlParams:{userId:r,code:t},queryParams:{refundInvoice:n}});return this.http.get(i).pipe(u(o=>o?.eligible??!1))}downloadInvoice(r,t,n){let i=this.occEndpoints.buildUrl("downloadInvoice",{urlParams:{userId:r,code:t},queryParams:{invoiceNumber:n}});return this.fileDownloadService.download(i,"",!0)}downloadDropOffLabel(r,t,n){let i=this.occEndpoints.buildUrl("dropOffLabel",{urlParams:{userId:r,code:t,rmaNumber:n}});return this.fileDownloadService.download(i,"",!0)}downloadDropOffConsignmentLabel(r,t,n){let i=this.occEndpoints.buildUrl("dropOffLabelConsignment",{urlParams:{userId:r,code:t,consignmentCode:n}});return this.fileDownloadService.download(i,"",!0)}cancel(r,t){let n=this.occEndpoints.buildUrl("cancelOrder",{urlParams:{userId:r},queryParams:{orderCode:t}});return this.http.post(n,{}).pipe(g(i=>{throw S(i,this.logger)}))}getAllowedAttributesForOrderEdit(r){let t=this.occEndpoints.buildUrl("allowedAttributesForOrderEdit",{urlParams:{code:r}});return this.http.get(t)}getEditOrder(r,t){let n=this.occEndpoints.buildUrl("editOrder",{urlParams:{userId:r,code:t}});return this.http.get(n)}updateOrder(r,t){let n=this.occEndpoints.buildUrl("orderUpdate",{urlParams:{userId:r}});return this.http.post(n,t).pipe(u(i=>i?.modifications??[]))}getReturnDetails(r,t,n=[]){let i=this.occEndpoints.buildUrl("entryDetailsForReturn",{urlParams:{userId:r,code:t},queryParams:{entryNumbers:n}});return this.http.get(i)}getDeliveryOptionsForReturn(r,t,n=[]){let i=this.occEndpoints.buildUrl("deliveryOptionsForReturn",{urlParams:{userId:r,code:t}});return this.http.post(i,n.map(o=>({entry:{orderCode:t,entryNumber:o.entry.entryNumber,quantity:o.entry.quantity,product:{code:o.entry.product.code}},amount:+o.amount})))}processReturn(r,t,n){let i=this.occEndpoints.buildUrl("returnOrder",{urlParams:{userId:r,code:t}});return this.http.post(i,n)}reviewReturn(r,t,n){let i=this.occEndpoints.buildUrl("reviewReturnOrder",{urlParams:{userId:r,code:t,rmaNumber:n}});return this.http.get(i).pipe(this.converter.pipeable(G))}getCancelDetails(r,t,n){let i=this.occEndpoints.buildUrl("entryDetailsForCancellation",{urlParams:{userId:r,code:t},queryParams:{entryNumbers:n}});return this.http.get(i)}processCancellation(r,t,n){let i=this.occEndpoints.buildUrl("orderCancellations",{urlParams:{userId:r,code:t}});return this.http.post(i,n)}reviewCancellation(r,t){let n=this.occEndpoints.buildUrl("orderCancellationEntries",{urlParams:{userId:r,code:t}});return this.http.get(n).pipe(this.converter.pipeable(cs))}sendDigitalProductConfirmationEmail(r,t,n,i){let o=this.occEndpoints.buildUrl("sendDigitalProductConfirmationEmail",{urlParams:{userId:r,code:t},queryParams:{entry:n,recipient:i}});return this.http.post(o,{})}};e.\u0275fac=function(t){return new(t||e)(c(A),c(j),c(L),c(os),c(ir))},e.\u0275prov=l({token:e,factory:e.\u0275fac,providedIn:"root"});let s=e;return s})();export{br as a,jt as b,Sn as c,Kn as d,Bt as e,ai as f,cs as g,mi as h,as as i,Ii as j,os as k,ji as l};
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.