@daffodil/cart 0.39.6 → 0.39.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/daffodil-cart-driver-magento-testing.umd.js +2 -2
- package/bundles/daffodil-cart-driver-magento-testing.umd.js.map +1 -1
- package/bundles/daffodil-cart-driver-magento-testing.umd.min.js +2 -2
- package/bundles/daffodil-cart-driver-magento-testing.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-driver-magento.umd.js +88 -34
- package/bundles/daffodil-cart-driver-magento.umd.js.map +1 -1
- package/bundles/daffodil-cart-driver-magento.umd.min.js +1 -1
- package/bundles/daffodil-cart-driver-magento.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-driver-testing.umd.js +2 -2
- package/bundles/daffodil-cart-driver-testing.umd.js.map +1 -1
- package/bundles/daffodil-cart-driver-testing.umd.min.js +1 -1
- package/bundles/daffodil-cart-driver-testing.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-driver.umd.js +34 -1
- package/bundles/daffodil-cart-driver.umd.js.map +1 -1
- package/bundles/daffodil-cart-driver.umd.min.js +2 -2
- package/bundles/daffodil-cart-driver.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-routing.umd.js +43 -0
- package/bundles/daffodil-cart-routing.umd.js.map +1 -1
- package/bundles/daffodil-cart-routing.umd.min.js +1 -1
- package/bundles/daffodil-cart-routing.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-state-testing.umd.js +12 -2
- package/bundles/daffodil-cart-state-testing.umd.js.map +1 -1
- package/bundles/daffodil-cart-state-testing.umd.min.js +2 -2
- package/bundles/daffodil-cart-state-testing.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-state.umd.js +39 -7
- package/bundles/daffodil-cart-state.umd.js.map +1 -1
- package/bundles/daffodil-cart-state.umd.min.js +1 -1
- package/bundles/daffodil-cart-state.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-testing.umd.js +3 -3
- package/bundles/daffodil-cart-testing.umd.js.map +1 -1
- package/bundles/daffodil-cart-testing.umd.min.js +2 -2
- package/bundles/daffodil-cart-testing.umd.min.js.map +1 -1
- package/driver/daffodil-cart-driver.metadata.json +1 -1
- package/driver/errors/codes.enum.d.ts +3 -1
- package/driver/errors/invalid-email.d.ts +8 -0
- package/driver/errors/item-exceeds-max-qty.d.ts +9 -0
- package/driver/errors/map.d.ts +4 -0
- package/driver/errors/product-out-of-stock.d.ts +1 -1
- package/driver/errors/public_api.d.ts +2 -0
- package/driver/magento/cart-item.service.d.ts +3 -1
- package/driver/magento/daffodil-cart-driver-magento.metadata.json +1 -1
- package/driver/magento/errors/map.d.ts +2 -0
- package/driver/magento/injection-tokens/public_api.d.ts +1 -0
- package/driver/magento/injection-tokens/transforms/cart-item/token.d.ts +22 -0
- package/driver/magento/interfaces/cart-item-transform.type.d.ts +3 -0
- package/driver/magento/interfaces/public_api.d.ts +1 -0
- package/driver/magento/public_api.d.ts +1 -0
- package/driver/magento/transforms/outputs/cart-coupon-response.service.d.ts +3 -0
- package/driver/magento/transforms/outputs/cart-item/cart-item-transformer.d.ts +7 -4
- package/driver/magento/transforms/outputs/cart.service.d.ts +3 -1
- package/esm2015/driver/errors/codes.enum.js +3 -1
- package/esm2015/driver/errors/invalid-email.js +12 -0
- package/esm2015/driver/errors/item-exceeds-max-qty.js +13 -0
- package/esm2015/driver/errors/map.js +5 -1
- package/esm2015/driver/errors/product-out-of-stock.js +2 -2
- package/esm2015/driver/errors/public_api.js +3 -1
- package/esm2015/driver/magento/cart-item.service.js +11 -8
- package/esm2015/driver/magento/errors/map.js +4 -2
- package/esm2015/driver/magento/injection-tokens/public_api.js +2 -1
- package/esm2015/driver/magento/injection-tokens/transforms/cart-item/token.js +27 -0
- package/esm2015/driver/magento/interfaces/cart-item-transform.type.js +2 -0
- package/esm2015/driver/magento/interfaces/public_api.js +2 -0
- package/esm2015/driver/magento/public_api.js +2 -1
- package/esm2015/driver/magento/testing/factories/cart-address-input.factory.js +2 -2
- package/esm2015/driver/magento/testing/factories/cart-address.factory.js +2 -2
- package/esm2015/driver/magento/testing/factories/cart-coupon.factory.js +2 -2
- package/esm2015/driver/magento/testing/factories/cart-item/bundle-cart-item.factory.js +2 -2
- package/esm2015/driver/magento/testing/factories/cart-item/cart-item.factory.js +2 -2
- package/esm2015/driver/magento/testing/factories/cart-item/configurable-cart-item.factory.js +1 -1
- package/esm2015/driver/magento/testing/factories/cart-payment-method.factory.js +2 -2
- package/esm2015/driver/magento/testing/factories/cart-shipping-method.factory.js +2 -2
- package/esm2015/driver/magento/testing/factories/cart.factory.js +2 -2
- package/esm2015/driver/magento/transforms/outputs/cart-coupon-response.service.js +15 -5
- package/esm2015/driver/magento/transforms/outputs/cart-item/bundle-cart-item-transformer.js +2 -2
- package/esm2015/driver/magento/transforms/outputs/cart-item/cart-item-transformer.js +9 -6
- package/esm2015/driver/magento/transforms/outputs/cart-item/configurable-cart-item-transformer.js +2 -2
- package/esm2015/driver/magento/transforms/outputs/cart-item/simple-cart-item-transformer.js +3 -3
- package/esm2015/driver/magento/transforms/outputs/cart.service.js +12 -7
- package/esm2015/driver/testing/drivers/cart-order/cart-order.service.js +2 -2
- package/esm2015/routing/guards/in-stock-items/in-stock-items-guard-redirect.token.js +6 -0
- package/esm2015/routing/guards/in-stock-items/in-stock-items.guard.js +43 -0
- package/esm2015/routing/guards/public_api.js +3 -1
- package/esm2015/state/actions/cart-coupon.actions.js +10 -1
- package/esm2015/state/effects/cart-resolver.effects.js +5 -2
- package/esm2015/state/facades/cart/cart-facade.interface.js +1 -1
- package/esm2015/state/facades/cart/cart.facade.js +9 -2
- package/esm2015/state/models/stateful-cart-item.js +1 -1
- package/esm2015/state/reducers/cart-coupon/cart-coupon.reducer.js +3 -1
- package/esm2015/state/reducers/cart-item/cart-item.reducer.js +3 -1
- package/esm2015/state/reducers/cart-item-entities/cart-item-entities.reducer.js +8 -7
- package/esm2015/state/selectors/cart-item-entities/cart-item-entities.selectors.js +7 -1
- package/esm2015/state/testing/factories/stateful-cart-item.factory.js +2 -1
- package/esm2015/state/testing/factories/stateful-composite-cart-item.factory.js +5 -1
- package/esm2015/state/testing/factories/stateful-configurable-cart-item.factory.js +5 -1
- package/esm2015/state/testing/mock-cart-facade.js +6 -1
- package/esm2015/testing/factories/cart-address.factory.js +2 -2
- package/esm2015/testing/factories/cart-coupon.factory.js +2 -2
- package/esm2015/testing/factories/cart-item/cart-item.factory.js +3 -3
- package/esm2015/testing/factories/cart-item/composite-cart-item.factory.js +2 -2
- package/esm2015/testing/factories/cart-item/configurable-cart-item.factory.js +1 -1
- package/esm2015/testing/factories/cart-shipping-rate.factory.js +2 -2
- package/esm2015/testing/factories/cart.factory.js +2 -2
- package/fesm2015/daffodil-cart-driver-magento-testing.js +1 -1
- package/fesm2015/daffodil-cart-driver-magento-testing.js.map +1 -1
- package/fesm2015/daffodil-cart-driver-magento.js +79 -35
- package/fesm2015/daffodil-cart-driver-magento.js.map +1 -1
- package/fesm2015/daffodil-cart-driver-testing.js +1 -1
- package/fesm2015/daffodil-cart-driver-testing.js.map +1 -1
- package/fesm2015/daffodil-cart-driver.js +27 -2
- package/fesm2015/daffodil-cart-driver.js.map +1 -1
- package/fesm2015/daffodil-cart-routing.js +40 -1
- package/fesm2015/daffodil-cart-routing.js.map +1 -1
- package/fesm2015/daffodil-cart-state-testing.js +14 -0
- package/fesm2015/daffodil-cart-state-testing.js.map +1 -1
- package/fesm2015/daffodil-cart-state.js +39 -9
- package/fesm2015/daffodil-cart-state.js.map +1 -1
- package/fesm2015/daffodil-cart-testing.js +2 -2
- package/fesm2015/daffodil-cart-testing.js.map +1 -1
- package/package.json +6 -6
- package/routing/daffodil-cart-routing.metadata.json +1 -1
- package/routing/guards/in-stock-items/in-stock-items-guard-redirect.token.d.ts +5 -0
- package/routing/guards/in-stock-items/in-stock-items.guard.d.ts +17 -0
- package/routing/guards/public_api.d.ts +2 -0
- package/state/actions/cart-coupon.actions.d.ts +9 -2
- package/state/daffodil-cart-state.metadata.json +1 -1
- package/state/facades/cart/cart-facade.interface.d.ts +12 -0
- package/state/facades/cart/cart.facade.d.ts +4 -0
- package/state/models/stateful-cart-item.d.ts +5 -0
- package/state/selectors/cart-item-entities/cart-item-entities.selectors.d.ts +13 -0
- package/state/testing/daffodil-cart-state-testing.metadata.json +1 -1
- package/state/testing/factories/stateful-cart-item.factory.d.ts +1 -0
- package/state/testing/factories/stateful-composite-cart-item.factory.d.ts +1 -0
- package/state/testing/factories/stateful-configurable-cart-item.factory.d.ts +1 -0
- package/state/testing/mock-cart-facade.d.ts +3 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@ngrx/store"),require("@ngrx/entity"),require("@daffodil/core/state"),require("@angular/core"),require("@daffodil/cart"),require("@daffodil/core"),require("@daffodil/geography"),require("@ngrx/effects"),require("rxjs"),require("rxjs/operators"),require("@daffodil/cart/driver")):"function"==typeof define&&define.amd?define("@daffodil/cart/state",["exports","@ngrx/store","@ngrx/entity","@daffodil/core/state","@angular/core","@daffodil/cart","@daffodil/core","@daffodil/geography","@ngrx/effects","rxjs","rxjs/operators","@daffodil/cart/driver"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).daffodil=t.daffodil||{},t.daffodil.cart=t.daffodil.cart||{},t.daffodil.cart.state={}),t.i1,t.entity,t.state,t.ng.core,t.daffodil.cart,t.core,t.geography,t.effects,t.rxjs,t.rxjs.operators,t.daffodil.cart.driver)}(this,(function(t,e,a,r,i,n,o,s,c,p,f,d){"use strict";var u;(u=t.DaffCartActionTypes||(t.DaffCartActionTypes={})).CartStorageFailureAction="[DaffCart] Cart Storage Failure Action",u.CartLoadAction="[DaffCart] Cart Load Action",u.CartLoadSuccessAction="[DaffCart] Cart Load Success Action",u.CartLoadFailureAction="[DaffCart] Cart Load Failure Action",u.CartCreateAction="[DaffCart] Cart Create Action",u.CartCreateSuccessAction="[DaffCart] Cart Create Success Action",u.CartCreateFailureAction="[DaffCart] Cart Create Failure Action",u.AddToCartAction="[DaffCart] Cart Add To Cart Action",u.AddToCartSuccessAction="[DaffCart] Cart Add to Cart Success Action",u.AddToCartFailureAction="[DaffCart] Cart Add to Cart Failure Action",u.CartClearAction="[DaffCart] Cart Reset Action",u.CartClearSuccessAction="[DaffCart] Cart Reset Success Action",u.CartClearFailureAction="[DaffCart] Cart Reset Failure Action",u.ResolveCartAction="[DaffCart] Resolve Cart Action",u.ResolveCartSuccessAction="[DaffCart] Resolve Cart Success Action",u.ResolveCartServerSideAction="[DaffCart] Resolve Cart Server Side Action",u.ResolveCartFailureAction="[DaffCart] Resolve Cart Failure Action";var l,C=function(e){this.payload=e,this.type=t.DaffCartActionTypes.CartStorageFailureAction},h=function(){this.type=t.DaffCartActionTypes.CartLoadAction},A=function(e){this.payload=e,this.type=t.DaffCartActionTypes.CartLoadSuccessAction},y=function(e){this.payload=e,this.type=t.DaffCartActionTypes.CartLoadFailureAction},g=function(){this.type=t.DaffCartActionTypes.CartCreateAction},m=function(e){this.payload=e,this.type=t.DaffCartActionTypes.CartCreateSuccessAction},D=function(e){this.payload=e,this.type=t.DaffCartActionTypes.CartCreateFailureAction},S=function(e){this.payload=e,this.type=t.DaffCartActionTypes.AddToCartAction},T=function(e){this.payload=e,this.type=t.DaffCartActionTypes.AddToCartSuccessAction},I=function(e){this.payload=e,this.type=t.DaffCartActionTypes.AddToCartFailureAction},v=function(){this.type=t.DaffCartActionTypes.CartClearAction},O=function(e){this.payload=e,this.type=t.DaffCartActionTypes.CartClearSuccessAction},b=function(e){this.payload=e,this.type=t.DaffCartActionTypes.CartClearFailureAction},j=function(){this.type=t.DaffCartActionTypes.ResolveCartAction},M=function(e){this.payload=e,this.type=t.DaffCartActionTypes.ResolveCartSuccessAction},R=function(e){this.payload=e,this.type=t.DaffCartActionTypes.ResolveCartFailureAction},P=function(e){this.payload=e,this.type=t.DaffCartActionTypes.ResolveCartServerSideAction};(l=t.DaffCartItemActionTypes||(t.DaffCartItemActionTypes={})).CartItemListAction="[DaffCart] Cart Items List Action",l.CartItemListSuccessAction="[DaffCart] Cart Items List Success Action",l.CartItemListFailureAction="[DaffCart] Cart Items List Failure Action",l.CartItemLoadAction="[DaffCart] Cart Item Load Action",l.CartItemLoadSuccessAction="[DaffCart] Cart Item Load Success Action",l.CartItemLoadFailureAction="[DaffCart] Cart Item Load Failure Action",l.CartItemUpdateAction="[DaffCart] Cart Item Update Action",l.CartItemUpdateSuccessAction="[DaffCart] Cart Item Update Success Action",l.CartItemUpdateFailureAction="[DaffCart] Cart Item Update Failure Action",l.CartItemAddAction="[DaffCart] Cart Item Add Action",l.CartItemAddSuccessAction="[DaffCart] Cart Item Add Success Action",l.CartItemAddFailureAction="[DaffCart] Cart Item Add Failure Action",l.CartItemDeleteAction="[DaffCart] Cart Item Remove Action",l.CartItemDeleteSuccessAction="[DaffCart] Cart Item Remove Success Action",l.CartItemDeleteFailureAction="[DaffCart] Cart Item Remove Failure Action",l.CartItemStateResetAction="[DaffCart] Cart Item State Reset Action";var F,L=function(){this.type=t.DaffCartItemActionTypes.CartItemListAction},E=function(e){this.payload=e,this.type=t.DaffCartItemActionTypes.CartItemListSuccessAction},$=function(e){this.payload=e,this.type=t.DaffCartItemActionTypes.CartItemListFailureAction},w=function(e){this.itemId=e,this.type=t.DaffCartItemActionTypes.CartItemLoadAction},U=function(e){this.payload=e,this.type=t.DaffCartItemActionTypes.CartItemLoadSuccessAction},B=function(e,a){this.payload=e,this.itemId=a,this.type=t.DaffCartItemActionTypes.CartItemLoadFailureAction},_=function(e,a){this.itemId=e,this.changes=a,this.type=t.DaffCartItemActionTypes.CartItemUpdateAction},x=function(e,a){this.payload=e,this.itemId=a,this.type=t.DaffCartItemActionTypes.CartItemUpdateSuccessAction},W=function(e,a){this.payload=e,this.itemId=a,this.type=t.DaffCartItemActionTypes.CartItemUpdateFailureAction},H=function(e){this.input=e,this.type=t.DaffCartItemActionTypes.CartItemAddAction},z=function(e){this.payload=e,this.type=t.DaffCartItemActionTypes.CartItemAddSuccessAction},q=function(e){this.payload=e,this.type=t.DaffCartItemActionTypes.CartItemAddFailureAction},k=function(e){this.itemId=e,this.type=t.DaffCartItemActionTypes.CartItemDeleteAction},N=function(e){this.payload=e,this.type=t.DaffCartItemActionTypes.CartItemDeleteSuccessAction},V=function(e,a){this.payload=e,this.itemId=a,this.type=t.DaffCartItemActionTypes.CartItemDeleteFailureAction},Q=function(){this.type=t.DaffCartItemActionTypes.CartItemStateResetAction};(F=t.DaffCartBillingAddressActionTypes||(t.DaffCartBillingAddressActionTypes={})).CartBillingAddressLoadAction="[DaffCart] Billing Address Load Action",F.CartBillingAddressLoadSuccessAction="[DaffCart] Billing Address Load Success Action",F.CartBillingAddressLoadFailureAction="[DaffCart] Billing Address Load Failure Action",F.CartBillingAddressUpdateAction="[DaffCart] Billing Address Update Action",F.CartBillingAddressUpdateSuccessAction="[DaffCart] Billing Address Update Success Action",F.CartBillingAddressUpdateFailureAction="[DaffCart] Billing Address Update Failure Action";var G,X=function(){this.type=t.DaffCartBillingAddressActionTypes.CartBillingAddressLoadAction},Y=function(e){this.payload=e,this.type=t.DaffCartBillingAddressActionTypes.CartBillingAddressLoadSuccessAction},K=function(e){this.payload=e,this.type=t.DaffCartBillingAddressActionTypes.CartBillingAddressLoadFailureAction},J=function(e){this.payload=e,this.type=t.DaffCartBillingAddressActionTypes.CartBillingAddressUpdateAction},Z=function(e){this.payload=e,this.type=t.DaffCartBillingAddressActionTypes.CartBillingAddressUpdateSuccessAction},tt=function(e){this.payload=e,this.type=t.DaffCartBillingAddressActionTypes.CartBillingAddressUpdateFailureAction};(G=t.DaffCartShippingAddressActionTypes||(t.DaffCartShippingAddressActionTypes={})).CartShippingAddressLoadAction="[DaffCart] Shipping Address Load Action",G.CartShippingAddressLoadSuccessAction="[DaffCart] Shipping Address Load Success Action",G.CartShippingAddressLoadFailureAction="[DaffCart] Shipping Address Load Failure Action",G.CartShippingAddressUpdateAction="[DaffCart] Shipping Address Update Action",G.CartShippingAddressUpdateSuccessAction="[DaffCart] Shipping Address Update Success Action",G.CartShippingAddressUpdateFailureAction="[DaffCart] Shipping Address Update Failure Action";var et,at=function(){this.type=t.DaffCartShippingAddressActionTypes.CartShippingAddressLoadAction},rt=function(e){this.payload=e,this.type=t.DaffCartShippingAddressActionTypes.CartShippingAddressLoadSuccessAction},it=function(e){this.payload=e,this.type=t.DaffCartShippingAddressActionTypes.CartShippingAddressLoadFailureAction},nt=function(e){this.payload=e,this.type=t.DaffCartShippingAddressActionTypes.CartShippingAddressUpdateAction},ot=function(e){this.payload=e,this.type=t.DaffCartShippingAddressActionTypes.CartShippingAddressUpdateSuccessAction},st=function(e){this.payload=e,this.type=t.DaffCartShippingAddressActionTypes.CartShippingAddressUpdateFailureAction};(et=t.DaffCartAddressActionTypes||(t.DaffCartAddressActionTypes={})).CartAddressUpdateAction="[DaffCart] Cart Address Update Action",et.CartAddressUpdateSuccessAction="[DaffCart] Cart Address Update Success Action",et.CartAddressUpdateFailureAction="[DaffCart] Cart Address Update Failure Action";var ct,pt=function(e){this.payload=e,this.type=t.DaffCartAddressActionTypes.CartAddressUpdateAction},ft=function(e){this.payload=e,this.type=t.DaffCartAddressActionTypes.CartAddressUpdateSuccessAction},dt=function(e){this.payload=e,this.type=t.DaffCartAddressActionTypes.CartAddressUpdateFailureAction};(ct=t.DaffCartShippingInformationActionTypes||(t.DaffCartShippingInformationActionTypes={})).CartShippingInformationLoadAction="[DaffCart] Shipping Information Load Action",ct.CartShippingInformationLoadSuccessAction="[DaffCart] Shipping Information Load Success Action",ct.CartShippingInformationLoadFailureAction="[DaffCart] Shipping Information Load Failure Action",ct.CartShippingInformationUpdateAction="[DaffCart] Shipping Information Update Action",ct.CartShippingInformationUpdateSuccessAction="[DaffCart] Shipping Information Update Success Action",ct.CartShippingInformationUpdateFailureAction="[DaffCart] Shipping Information Update Failure Action",ct.CartShippingInformationDeleteAction="[DaffCart] Shipping Information Remove Action",ct.CartShippingInformationDeleteSuccessAction="[DaffCart] Shipping Information Remove Success Action",ct.CartShippingInformationDeleteFailureAction="[DaffCart] Shipping Information Remove Failure Action";var ut,lt=function(){this.type=t.DaffCartShippingInformationActionTypes.CartShippingInformationLoadAction},Ct=function(e){this.payload=e,this.type=t.DaffCartShippingInformationActionTypes.CartShippingInformationLoadSuccessAction},ht=function(e){this.payload=e,this.type=t.DaffCartShippingInformationActionTypes.CartShippingInformationLoadFailureAction},At=function(e){this.payload=e,this.type=t.DaffCartShippingInformationActionTypes.CartShippingInformationUpdateAction},yt=function(e){this.payload=e,this.type=t.DaffCartShippingInformationActionTypes.CartShippingInformationUpdateSuccessAction},gt=function(e){this.payload=e,this.type=t.DaffCartShippingInformationActionTypes.CartShippingInformationUpdateFailureAction},mt=function(e){this.id=e,this.type=t.DaffCartShippingInformationActionTypes.CartShippingInformationDeleteAction},Dt=function(e){this.payload=e,this.type=t.DaffCartShippingInformationActionTypes.CartShippingInformationDeleteSuccessAction},St=function(e){this.payload=e,this.type=t.DaffCartShippingInformationActionTypes.CartShippingInformationDeleteFailureAction};(ut=t.DaffCartShippingMethodsActionTypes||(t.DaffCartShippingMethodsActionTypes={})).CartShippingMethodsLoadAction="[DaffCart] Shipping Methods Load Action",ut.CartShippingMethodsLoadSuccessAction="[DaffCart] Shipping Methods Load Success Action",ut.CartShippingMethodsLoadFailureAction="[DaffCart] Shipping Methods Load Failure Action";var Tt,It=function(){this.type=t.DaffCartShippingMethodsActionTypes.CartShippingMethodsLoadAction},vt=function(e){this.payload=e,this.type=t.DaffCartShippingMethodsActionTypes.CartShippingMethodsLoadSuccessAction},Ot=function(e){this.payload=e,this.type=t.DaffCartShippingMethodsActionTypes.CartShippingMethodsLoadFailureAction};(Tt=t.DaffCartPaymentActionTypes||(t.DaffCartPaymentActionTypes={})).CartPaymentLoadAction="[DaffCart] Payment Load Action",Tt.CartPaymentLoadSuccessAction="[DaffCart] Payment Load Success Action",Tt.CartPaymentLoadFailureAction="[DaffCart] Payment Load Failure Action",Tt.CartPaymentUpdateAction="[DaffCart] Payment Update Action",Tt.CartPaymentUpdateSuccessAction="[DaffCart] Payment Update Success Action",Tt.CartPaymentUpdateFailureAction="[DaffCart] Payment Update Failure Action",Tt.CartPaymentUpdateWithBillingAction="[DaffCart] Payment Update With Billing Action",Tt.CartPaymentUpdateWithBillingSuccessAction="[DaffCart] Payment Update With Billing Success Action",Tt.CartPaymentUpdateWithBillingFailureAction="[DaffCart] Payment Update With Billing Failure Action",Tt.CartPaymentRemoveAction="[DaffCart] Payment Remove Action",Tt.CartPaymentRemoveSuccessAction="[DaffCart] Payment Remove Success Action",Tt.CartPaymentRemoveFailureAction="[DaffCart] Payment Remove Failure Action",Tt.CartPaymentMethodAddAction="[DaffCart] Payment Method Add Action";var bt,jt=function(){this.type=t.DaffCartPaymentActionTypes.CartPaymentLoadAction},Mt=function(e){this.payload=e,this.type=t.DaffCartPaymentActionTypes.CartPaymentLoadSuccessAction},Rt=function(e){this.payload=e,this.type=t.DaffCartPaymentActionTypes.CartPaymentLoadFailureAction},Pt=function(e){this.payload=e,this.type=t.DaffCartPaymentActionTypes.CartPaymentUpdateAction},Ft=function(e){this.payload=e,this.type=t.DaffCartPaymentActionTypes.CartPaymentUpdateSuccessAction},Lt=function(e){this.payload=e,this.type=t.DaffCartPaymentActionTypes.CartPaymentUpdateFailureAction},Et=function(e,a){this.payment=e,this.address=a,this.type=t.DaffCartPaymentActionTypes.CartPaymentUpdateWithBillingAction},$t=function(e){this.payload=e,this.type=t.DaffCartPaymentActionTypes.CartPaymentUpdateWithBillingSuccessAction},wt=function(e){this.payload=e,this.type=t.DaffCartPaymentActionTypes.CartPaymentUpdateWithBillingFailureAction},Ut=function(){this.type=t.DaffCartPaymentActionTypes.CartPaymentRemoveAction},Bt=function(){this.type=t.DaffCartPaymentActionTypes.CartPaymentRemoveSuccessAction},_t=function(e){this.payload=e,this.type=t.DaffCartPaymentActionTypes.CartPaymentRemoveFailureAction},xt=function(e){this.payload=e,this.type=t.DaffCartPaymentActionTypes.CartPaymentMethodAddAction};(bt=t.DaffCartPaymentMethodsActionTypes||(t.DaffCartPaymentMethodsActionTypes={})).CartPaymentMethodsLoadAction="[DaffCart] Payment Methods Load Action",bt.CartPaymentMethodsLoadSuccessAction="[DaffCart] Payment Methods Load Success Action",bt.CartPaymentMethodsLoadFailureAction="[DaffCart] Payment Methods Load Failure Action";var Wt,Ht=function(){this.type=t.DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadAction},zt=function(e){this.payload=e,this.type=t.DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadSuccessAction},qt=function(e){this.payload=e,this.type=t.DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadFailureAction};(Wt=t.DaffCartOrderActionTypes||(t.DaffCartOrderActionTypes={})).CartPlaceOrderAction="[DaffCart] Cart Place Order Action",Wt.CartPlaceOrderSuccessAction="[DaffCart] Cart Place Order Success Action",Wt.CartPlaceOrderFailureAction="[DaffCart] Cart Place Order Failure Action";var kt,Nt=function(e){this.payload=e,this.type=t.DaffCartOrderActionTypes.CartPlaceOrderAction},Vt=function(e){this.payload=e,this.type=t.DaffCartOrderActionTypes.CartPlaceOrderSuccessAction},Qt=function(e){this.payload=e,this.type=t.DaffCartOrderActionTypes.CartPlaceOrderFailureAction};(kt=t.DaffCartCouponActionTypes||(t.DaffCartCouponActionTypes={})).CartCouponApplyAction="[DaffCart] Cart Coupon Apply Action",kt.CartCouponApplySuccessAction="[DaffCart] Cart Coupon Apply Success Action",kt.CartCouponApplyFailureAction="[DaffCart] Cart Coupon Apply Failure Action",kt.CartCouponListAction="[DaffCart] Cart Coupon List Action",kt.CartCouponListSuccessAction="[DaffCart] Cart Coupon List Success Action",kt.CartCouponListFailureAction="[DaffCart] Cart Coupon List Failure Action",kt.CartCouponRemoveAction="[DaffCart] Cart Coupon Remove Action",kt.CartCouponRemoveSuccessAction="[DaffCart] Cart Coupon Remove Success Action",kt.CartCouponRemoveFailureAction="[DaffCart] Cart Coupon Remove Failure Action",kt.CartCouponRemoveAllAction="[DaffCart] Cart Coupon Remove All Action",kt.CartCouponRemoveAllSuccessAction="[DaffCart] Cart Coupon Remove All Success Action",kt.CartCouponRemoveAllFailureAction="[DaffCart] Cart Coupon Remove All Failure Action";var Gt,Xt=function(e){this.payload=e,this.type=t.DaffCartCouponActionTypes.CartCouponApplyAction},Yt=function(e){this.payload=e,this.type=t.DaffCartCouponActionTypes.CartCouponApplySuccessAction},Kt=function(e){this.payload=e,this.type=t.DaffCartCouponActionTypes.CartCouponApplyFailureAction},Jt=function(){this.type=t.DaffCartCouponActionTypes.CartCouponListAction},Zt=function(e){this.payload=e,this.type=t.DaffCartCouponActionTypes.CartCouponListSuccessAction},te=function(e){this.payload=e,this.type=t.DaffCartCouponActionTypes.CartCouponListFailureAction},ee=function(e){this.payload=e,this.type=t.DaffCartCouponActionTypes.CartCouponRemoveAction},ae=function(e){this.payload=e,this.type=t.DaffCartCouponActionTypes.CartCouponRemoveSuccessAction},re=function(e){this.payload=e,this.type=t.DaffCartCouponActionTypes.CartCouponRemoveFailureAction},ie=function(){this.type=t.DaffCartCouponActionTypes.CartCouponRemoveAllAction},ne=function(e){this.payload=e,this.type=t.DaffCartCouponActionTypes.CartCouponRemoveAllSuccessAction},oe=function(e){this.payload=e,this.type=t.DaffCartCouponActionTypes.CartCouponRemoveAllFailureAction};(Gt=t.DaffCartItemStateEnum||(t.DaffCartItemStateEnum={})).New="new",Gt.Updated="updated",Gt.Mutating="mutating",Gt.Error="error",Gt.Default="default";var se,ce=function(){return se=se||a.createEntityAdapter({selectId:function(t){return t.id}})};function pe(e,a){void 0===e&&(e=ce().getInitialState());var r,i,n,o,s=ce();switch(a.type){case t.DaffCartItemActionTypes.CartItemListSuccessAction:return s.setAll(a.payload.map((function(a){return Object.assign(Object.assign({},a),{daffState:fe(e.entities[a.id])||t.DaffCartItemStateEnum.Default})})),e);case t.DaffCartItemActionTypes.CartItemLoadSuccessAction:return s.upsertOne(Object.assign(Object.assign({},a.payload),{daffState:fe(e.entities[a.payload.id])||t.DaffCartItemStateEnum.Default}),e);case t.DaffCartItemActionTypes.CartItemAddSuccessAction:return s.setAll((o=e.entities,a.payload.items.map((function(e){var a=o[e.id];switch(!0){case!a:return Object.assign(Object.assign({},e),{daffState:t.DaffCartItemStateEnum.New});case(null==a?void 0:a.qty)!==e.qty:return Object.assign(Object.assign({},e),{daffState:t.DaffCartItemStateEnum.Updated});default:return e}}))),e);case t.DaffCartItemActionTypes.CartItemUpdateSuccessAction:return s.setAll((r=a.payload.items,i=e.entities,n=a.itemId,r.map((function(e){return e.id===n?Object.assign(Object.assign({},e),{daffState:t.DaffCartItemStateEnum.Updated}):Object.assign(Object.assign({},e),{daffState:fe(i[e.id])||t.DaffCartItemStateEnum.Default})}))),e);case t.DaffCartItemActionTypes.CartItemDeleteFailureAction:case t.DaffCartItemActionTypes.CartItemLoadFailureAction:case t.DaffCartItemActionTypes.CartItemUpdateFailureAction:return s.upsertOne(Object.assign(Object.assign({},e.entities[a.itemId]),{daffState:t.DaffCartItemStateEnum.Error}),e);case t.DaffCartItemActionTypes.CartItemDeleteSuccessAction:case t.DaffCartActionTypes.CartLoadSuccessAction:case t.DaffCartActionTypes.ResolveCartSuccessAction:case t.DaffCartActionTypes.CartClearSuccessAction:return s.setAll(a.payload.items.map((function(a){return Object.assign(Object.assign({},a),{daffState:fe(e.entities[a.id])||t.DaffCartItemStateEnum.Default})})),e);case t.DaffCartItemActionTypes.CartItemStateResetAction:return s.setAll(Object.keys(e.entities).map((function(a){return Object.assign(Object.assign({},e.entities[a]),{daffState:t.DaffCartItemStateEnum.Default})})),e);case t.DaffCartItemActionTypes.CartItemUpdateAction:case t.DaffCartItemActionTypes.CartItemDeleteAction:return s.upsertOne(Object.assign(Object.assign({},e.entities[a.itemId]),{daffState:t.DaffCartItemStateEnum.Mutating}),e);case t.DaffCartActionTypes.CartCreateSuccessAction:return s.removeAll(e);default:return e}}function fe(t){return null==t?void 0:t.daffState}function de(t,e,a,r){var i,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,a):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,a,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(o=(n<3?i(o):n>3?i(e,a,o):i(e,a))||o);return n>3&&o&&Object.defineProperty(e,a,o),o}function ue(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}Object.create;function le(t,e){var a="function"==typeof Symbol&&t[Symbol.iterator];if(!a)return t;var r,i,n=a.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=n.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(a=n.return)&&a.call(n)}finally{if(i)throw i.error}}return o}function Ce(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(le(arguments[e]));return t}Object.create;var he,Ae,ye,ge,me={cartOrderResult:{id:null,orderId:null,cartId:null},loading:"Stable",errors:[]};function De(e,a){switch(void 0===e&&(e=me),a.type){case t.DaffCartOrderActionTypes.CartPlaceOrderAction:return Object.assign(Object.assign({},e),{loading:"Mutating"});case t.DaffCartOrderActionTypes.CartPlaceOrderSuccessAction:return Object.assign(Object.assign({},e),{errors:[],loading:"Stable",cartOrderResult:a.payload});case t.DaffCartOrderActionTypes.CartPlaceOrderFailureAction:return Object.assign(Object.assign({},e),{loading:"Stable",errors:Ce(e.errors,[a.payload])});default:return e}}(he=t.DaffCartOperationType||(t.DaffCartOperationType={})).Cart="Cart",he.Item="Item",he.BillingAddress="Billing Address",he.ShippingAddress="Shipping Address",he.Payment="Payment",he.PaymentMethods="Payment Methods",he.ShippingInformation="Shipping Information",he.ShippingMethods="Shipping Methods",he.Coupon="Coupon",(Ae=t.DaffCartResolveState||(t.DaffCartResolveState={})).Default="default",Ae.Resolving="resolving",Ae.Succeeded="succeeded",Ae.Failed="failed",Ae.ServerSide="server";var Se=Object.freeze({cart:{id:null,subtotal:null,grand_total:null,coupons:[],items:[],billing_address:null,shipping_address:null,payment:null,totals:[],shipping_information:null,available_shipping_methods:[],available_payment_methods:[]},loading:(ye={},ye[t.DaffCartOperationType.Cart]="Stable",ye[t.DaffCartOperationType.Item]="Stable",ye[t.DaffCartOperationType.ShippingAddress]="Stable",ye[t.DaffCartOperationType.BillingAddress]="Stable",ye[t.DaffCartOperationType.ShippingInformation]="Stable",ye[t.DaffCartOperationType.ShippingMethods]="Stable",ye[t.DaffCartOperationType.Payment]="Stable",ye[t.DaffCartOperationType.PaymentMethods]="Stable",ye[t.DaffCartOperationType.Coupon]="Stable",ye),errors:(ge={},ge[t.DaffCartOperationType.Cart]=[],ge[t.DaffCartOperationType.Item]=[],ge[t.DaffCartOperationType.ShippingAddress]=[],ge[t.DaffCartOperationType.BillingAddress]=[],ge[t.DaffCartOperationType.ShippingInformation]=[],ge[t.DaffCartOperationType.ShippingMethods]=[],ge[t.DaffCartOperationType.Payment]=[],ge[t.DaffCartOperationType.PaymentMethods]=[],ge[t.DaffCartOperationType.Coupon]=[],ge),resolved:t.DaffCartResolveState.Default}),Te=function(t){return function(e,a){var r;return{errors:Object.assign(Object.assign({},e),(r={},r[t]=e[t].concat(new Array(a)),r))}}},Ie=function(t){return function(e){var a;return{errors:Object.assign(Object.assign({},e),(a={},a[t]=[],a))}}},ve=function(t){return function(e,a){var r;return{loading:Object.assign(Object.assign({},e),(r={},r[t]=a,r))}}},Oe=Te(t.DaffCartOperationType.BillingAddress),be=Ie(t.DaffCartOperationType.BillingAddress),je=ve(t.DaffCartOperationType.BillingAddress);function Me(e,a){switch(void 0===e&&(e=Se),a.type){case t.DaffCartBillingAddressActionTypes.CartBillingAddressLoadAction:return Object.assign(Object.assign({},e),je(e.loading,"Resolving"));case t.DaffCartBillingAddressActionTypes.CartBillingAddressUpdateAction:case t.DaffCartAddressActionTypes.CartAddressUpdateAction:return Object.assign(Object.assign({},e),je(e.loading,"Mutating"));case t.DaffCartBillingAddressActionTypes.CartBillingAddressLoadSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),be(e.errors)),{cart:Object.assign(Object.assign({},e.cart),{billing_address:a.payload})}),je(e.loading,"Stable"));case t.DaffCartBillingAddressActionTypes.CartBillingAddressUpdateSuccessAction:case t.DaffCartAddressActionTypes.CartAddressUpdateSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),be(e.errors)),{cart:Object.assign(Object.assign({},e.cart),a.payload)}),je(e.loading,"Stable"));case t.DaffCartBillingAddressActionTypes.CartBillingAddressLoadFailureAction:case t.DaffCartBillingAddressActionTypes.CartBillingAddressUpdateFailureAction:case t.DaffCartAddressActionTypes.CartAddressUpdateFailureAction:return Object.assign(Object.assign(Object.assign({},e),Oe(e.errors,a.payload)),je(e.loading,"Stable"));default:return e}}var Re=Te(t.DaffCartOperationType.Coupon),Pe=Ie(t.DaffCartOperationType.Coupon),Fe=ve(t.DaffCartOperationType.Coupon);function Le(e,a){switch(void 0===e&&(e=Se),a.type){case t.DaffCartCouponActionTypes.CartCouponListAction:return Object.assign(Object.assign({},e),Fe(e.loading,"Resolving"));case t.DaffCartCouponActionTypes.CartCouponApplyAction:case t.DaffCartCouponActionTypes.CartCouponRemoveAction:case t.DaffCartCouponActionTypes.CartCouponRemoveAllAction:return Object.assign(Object.assign({},e),Fe(e.loading,"Mutating"));case t.DaffCartCouponActionTypes.CartCouponApplySuccessAction:case t.DaffCartCouponActionTypes.CartCouponRemoveSuccessAction:case t.DaffCartCouponActionTypes.CartCouponRemoveAllSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),Pe(e.errors)),{cart:Object.assign(Object.assign({},e.cart),a.payload)}),Fe(e.loading,"Stable"));case t.DaffCartCouponActionTypes.CartCouponListSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),Pe(e.errors)),{cart:Object.assign(Object.assign({},e.cart),{coupons:a.payload})}),Fe(e.loading,"Stable"));case t.DaffCartCouponActionTypes.CartCouponApplyFailureAction:case t.DaffCartCouponActionTypes.CartCouponListFailureAction:case t.DaffCartCouponActionTypes.CartCouponRemoveAllFailureAction:case t.DaffCartCouponActionTypes.CartCouponRemoveFailureAction:return Object.assign(Object.assign(Object.assign({},e),Re(e.errors,a.payload)),Fe(e.loading,"Stable"));default:return e}}var Ee=Te(t.DaffCartOperationType.Item),$e=Ie(t.DaffCartOperationType.Item),we=ve(t.DaffCartOperationType.Item);function Ue(e,a){switch(void 0===e&&(e=Se),a.type){case t.DaffCartItemActionTypes.CartItemListAction:case t.DaffCartItemActionTypes.CartItemLoadAction:return Object.assign(Object.assign({},e),we(e.loading,"Resolving"));case t.DaffCartItemActionTypes.CartItemAddAction:return Object.assign(Object.assign({},e),we(e.loading,"Adding"));case t.DaffCartItemActionTypes.CartItemListSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),$e(e.errors)),{cart:Object.assign(Object.assign({},e.cart),{items:a.payload})}),we(e.loading,"Stable"));case t.DaffCartItemActionTypes.CartItemLoadSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),$e(e.errors)),{cart:Object.assign(Object.assign({},e.cart),{items:e.cart.items.map((function(t){return t.id===a.payload.id?a.payload:t}))})}),we(e.loading,"Stable"));case t.DaffCartItemActionTypes.CartItemUpdateSuccessAction:case t.DaffCartItemActionTypes.CartItemAddSuccessAction:case t.DaffCartItemActionTypes.CartItemDeleteSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),$e(e.errors)),{cart:Object.assign(Object.assign({},e.cart),a.payload)}),we(e.loading,"Stable"));case t.DaffCartItemActionTypes.CartItemListFailureAction:case t.DaffCartItemActionTypes.CartItemLoadFailureAction:case t.DaffCartItemActionTypes.CartItemUpdateFailureAction:case t.DaffCartItemActionTypes.CartItemAddFailureAction:case t.DaffCartItemActionTypes.CartItemDeleteFailureAction:return Object.assign(Object.assign(Object.assign({},e),Ee(e.errors,a.payload)),we(e.loading,"Stable"));default:return e}}var Be=Te(t.DaffCartOperationType.PaymentMethods),_e=Ie(t.DaffCartOperationType.PaymentMethods),xe=ve(t.DaffCartOperationType.PaymentMethods);function We(e,a){switch(void 0===e&&(e=Se),a.type){case t.DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadAction:return Object.assign(Object.assign({},e),xe(e.loading,"Resolving"));case t.DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),_e(e.errors)),{cart:Object.assign(Object.assign({},e.cart),{available_payment_methods:a.payload})}),xe(e.loading,"Stable"));case t.DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadFailureAction:return Object.assign(Object.assign(Object.assign({},e),Be(e.errors,a.payload)),xe(e.loading,"Stable"));default:return e}}var He=Te(t.DaffCartOperationType.Payment),ze=Ie(t.DaffCartOperationType.Payment),qe=ve(t.DaffCartOperationType.Payment);function ke(e,a){switch(void 0===e&&(e=Se),a.type){case t.DaffCartPaymentActionTypes.CartPaymentLoadAction:return Object.assign(Object.assign({},e),qe(e.loading,"Resolving"));case t.DaffCartPaymentActionTypes.CartPaymentUpdateAction:case t.DaffCartPaymentActionTypes.CartPaymentUpdateWithBillingAction:case t.DaffCartPaymentActionTypes.CartPaymentRemoveAction:return Object.assign(Object.assign({},e),qe(e.loading,"Mutating"));case t.DaffCartPaymentActionTypes.CartPaymentLoadSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),ze(e.errors)),{cart:Object.assign(Object.assign({},e.cart),{payment:a.payload})}),qe(e.loading,"Stable"));case t.DaffCartPaymentActionTypes.CartPaymentRemoveSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),ze(e.errors)),{cart:Object.assign(Object.assign({},e.cart),{payment:null})}),qe(e.loading,"Stable"));case t.DaffCartPaymentActionTypes.CartPaymentUpdateSuccessAction:case t.DaffCartPaymentActionTypes.CartPaymentUpdateWithBillingSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),ze(e.errors)),{cart:Object.assign(Object.assign({},e.cart),a.payload)}),qe(e.loading,"Stable"));case t.DaffCartPaymentActionTypes.CartPaymentLoadFailureAction:case t.DaffCartPaymentActionTypes.CartPaymentUpdateFailureAction:case t.DaffCartPaymentActionTypes.CartPaymentUpdateWithBillingFailureAction:case t.DaffCartPaymentActionTypes.CartPaymentRemoveFailureAction:return Object.assign(Object.assign(Object.assign({},e),He(e.errors,a.payload)),qe(e.loading,"Stable"));case t.DaffCartPaymentActionTypes.CartPaymentMethodAddAction:return Object.assign(Object.assign({},e),{cart:Object.assign(Object.assign({},e.cart),{payment:Object.assign({},a.payload)})});default:return e}}function Ne(e,a){switch(void 0===e&&(e=Se),a.type){case t.DaffCartActionTypes.ResolveCartAction:return Object.assign(Object.assign({},e),{resolved:t.DaffCartResolveState.Resolving});case t.DaffCartActionTypes.ResolveCartServerSideAction:return Object.assign(Object.assign({},e),{resolved:t.DaffCartResolveState.ServerSide});case t.DaffCartActionTypes.ResolveCartSuccessAction:return Object.assign(Object.assign({},e),{resolved:t.DaffCartResolveState.Succeeded});case t.DaffCartActionTypes.ResolveCartFailureAction:return Object.assign(Object.assign({},e),{resolved:t.DaffCartResolveState.Failed});default:return e}}var Ve=Te(t.DaffCartOperationType.ShippingAddress),Qe=Ie(t.DaffCartOperationType.ShippingAddress),Ge=ve(t.DaffCartOperationType.ShippingAddress);function Xe(e,a){switch(void 0===e&&(e=Se),a.type){case t.DaffCartShippingAddressActionTypes.CartShippingAddressLoadAction:return Object.assign(Object.assign({},e),Ge(e.loading,"Resolving"));case t.DaffCartShippingAddressActionTypes.CartShippingAddressUpdateAction:case t.DaffCartAddressActionTypes.CartAddressUpdateAction:return Object.assign(Object.assign({},e),Ge(e.loading,"Mutating"));case t.DaffCartShippingAddressActionTypes.CartShippingAddressLoadSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),Qe(e.errors)),{cart:Object.assign(Object.assign({},e.cart),{shipping_address:a.payload})}),Ge(e.loading,"Stable"));case t.DaffCartShippingAddressActionTypes.CartShippingAddressUpdateSuccessAction:case t.DaffCartAddressActionTypes.CartAddressUpdateSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),Qe(e.errors)),{cart:Object.assign(Object.assign({},e.cart),a.payload)}),Ge(e.loading,"Stable"));case t.DaffCartShippingAddressActionTypes.CartShippingAddressLoadFailureAction:case t.DaffCartShippingAddressActionTypes.CartShippingAddressUpdateFailureAction:case t.DaffCartAddressActionTypes.CartAddressUpdateFailureAction:return Object.assign(Object.assign(Object.assign({},e),Ve(e.errors,a.payload)),Ge(e.loading,"Stable"));default:return e}}var Ye=Te(t.DaffCartOperationType.ShippingInformation),Ke=Ie(t.DaffCartOperationType.ShippingInformation),Je=ve(t.DaffCartOperationType.ShippingInformation);function Ze(e,a){switch(void 0===e&&(e=Se),a.type){case t.DaffCartShippingInformationActionTypes.CartShippingInformationLoadAction:return Object.assign(Object.assign({},e),Je(e.loading,"Resolving"));case t.DaffCartShippingInformationActionTypes.CartShippingInformationUpdateAction:case t.DaffCartShippingInformationActionTypes.CartShippingInformationDeleteAction:return Object.assign(Object.assign({},e),Je(e.loading,"Mutating"));case t.DaffCartShippingInformationActionTypes.CartShippingInformationLoadSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),Ke(e.errors)),{cart:Object.assign(Object.assign({},e.cart),{shipping_information:Object.assign(Object.assign({},a.payload),{address_id:null})})}),Je(e.loading,"Stable"));case t.DaffCartShippingInformationActionTypes.CartShippingInformationUpdateSuccessAction:case t.DaffCartShippingInformationActionTypes.CartShippingInformationDeleteSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),Ke(e.errors)),{cart:Object.assign(Object.assign(Object.assign({},e.cart),{shipping_information:null}),a.payload)}),Je(e.loading,"Stable"));case t.DaffCartShippingInformationActionTypes.CartShippingInformationLoadFailureAction:case t.DaffCartShippingInformationActionTypes.CartShippingInformationUpdateFailureAction:case t.DaffCartShippingInformationActionTypes.CartShippingInformationDeleteFailureAction:return Object.assign(Object.assign(Object.assign({},e),Ye(e.errors,a.payload)),Je(e.loading,"Stable"));default:return e}}var ta=Te(t.DaffCartOperationType.ShippingMethods),ea=Ie(t.DaffCartOperationType.ShippingMethods),aa=ve(t.DaffCartOperationType.ShippingMethods);function ra(e,a){switch(void 0===e&&(e=Se),a.type){case t.DaffCartShippingMethodsActionTypes.CartShippingMethodsLoadAction:return Object.assign(Object.assign({},e),aa(e.loading,"Resolving"));case t.DaffCartShippingMethodsActionTypes.CartShippingMethodsLoadSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),ea(e.errors)),{cart:Object.assign(Object.assign({},e.cart),{available_shipping_methods:a.payload})}),aa(e.loading,"Stable"));case t.DaffCartShippingMethodsActionTypes.CartShippingMethodsLoadFailureAction:return Object.assign(Object.assign(Object.assign({},e),ta(e.errors,a.payload)),aa(e.loading,"Stable"));default:return e}}var ia=Te(t.DaffCartOperationType.Cart),na=Ie(t.DaffCartOperationType.Cart),oa=ve(t.DaffCartOperationType.Cart);function sa(e,a){switch(void 0===e&&(e=Se),a.type){case t.DaffCartActionTypes.ResolveCartAction:case t.DaffCartActionTypes.CartLoadAction:return Object.assign(Object.assign({},e),oa(e.loading,"Resolving"));case t.DaffCartActionTypes.CartClearAction:case t.DaffCartActionTypes.AddToCartAction:case t.DaffCartActionTypes.CartCreateAction:return Object.assign(Object.assign({},e),oa(e.loading,"Mutating"));case t.DaffCartActionTypes.CartLoadSuccessAction:case t.DaffCartActionTypes.CartClearSuccessAction:case t.DaffCartActionTypes.AddToCartSuccessAction:case t.DaffCartActionTypes.CartCreateSuccessAction:case t.DaffCartActionTypes.ResolveCartSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),na(e.errors)),{cart:Object.assign(Object.assign({},e.cart),a.payload)}),oa(e.loading,"Stable"));case t.DaffCartActionTypes.CartCreateSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),na(e.errors)),{cart:Object.assign(Object.assign({},Se.cart),a.payload)}),oa(e.loading,"Stable"));case t.DaffCartActionTypes.CartLoadFailureAction:case t.DaffCartActionTypes.CartClearFailureAction:case t.DaffCartActionTypes.AddToCartFailureAction:case t.DaffCartActionTypes.CartCreateFailureAction:case t.DaffCartActionTypes.CartStorageFailureAction:case t.DaffCartActionTypes.ResolveCartFailureAction:case t.DaffCartActionTypes.ResolveCartServerSideAction:return Object.assign(Object.assign(Object.assign({},e),ia(e.errors,a.payload)),oa(e.loading,"Stable"));default:return e}}var ca=r.daffComposeReducers([sa,Ue,Me,Xe,ra,Ze,ke,We,Le,Ne]);function pa(t,e){return void 0===t&&(t=Se),ca(t,e)}var fa={cart:pa,cartItems:pe,order:De},da="daffCart",ua=new i.InjectionToken("DAFF_CART_EXTRA_REDUCERS",{factory:function(){return[]}});var la=function(){var t;return function(){return t=t||{selectCartFeatureState:e.createFeatureSelector(da)}}}(),Ca=function(){var a=la().selectCartFeatureState,r=ce().getSelectors(),i=e.createSelector(a,(function(t){return t.cartItems})),s=e.createSelector(i,r.selectIds),c=e.createSelector(i,r.selectEntities),p=e.createSelector(i,r.selectAll),f=e.createSelector(i,r.selectTotal),d=e.defaultMemoize((function(t){return e.createSelector(c,(function(e){return e[t]}))})).memoized,u=e.createSelector(p,(function(t){return t.reduce((function(t,e){return t+e.qty}),0)})),l=e.defaultMemoize((function(t){return e.createSelector(d(t),(function(t){return t.type!==n.DaffCartItemInputType.Configurable?null:t.attributes}))})).memoized,C=e.defaultMemoize((function(t){return e.createSelector(d(t),(function(t){return t.type!==n.DaffCartItemInputType.Composite?null:t.options}))})).memoized,h=e.defaultMemoize((function(t){return e.createSelector(d(t),(function(t){return t?!t.in_stock:null}))})).memoized,A=e.createSelector(p,(function(e){return null==e?void 0:e.reduce((function(e,a){return e||a.daffState===t.DaffCartItemStateEnum.Mutating}),!1)})),y=e.defaultMemoize((function(t){return e.createSelector(d(t),(function(t){return(null==t?void 0:t.daffState)||null}))})).memoized,g=e.defaultMemoize((function(t){return e.createSelector(d(t),(function(t){return(null==t?void 0:t.qty)||0}))})).memoized,m=e.defaultMemoize((function(t){return e.createSelector(d(t),(function(t){return(null==t?void 0:t.row_total)||0}))})).memoized,D=e.defaultMemoize((function(t){return e.createSelector(d(t),(function(t){return(null==t?void 0:t.price)||0}))})).memoized,S=e.defaultMemoize((function(t){return e.createSelector(d(t),(function(t){return(null==t?void 0:t.discounts)||[]}))})).memoized,T=e.defaultMemoize((function(t){return e.createSelector(S(t),(function(t){return(null==t?void 0:t.reduce((function(t,e){var a=e.amount;return o.daffAdd(t,a)}),0))||0}))})).memoized;return{selectCartItemEntitiesState:i,selectCartItemIds:s,selectCartItemEntities:c,selectAllCartItems:p,selectCartItemTotal:f,selectCartItem:d,selectTotalNumberOfCartItems:u,selectCartItemConfiguredAttributes:l,selectCartItemCompositeOptions:C,selectIsCartItemOutOfStock:h,selectCartItemMutating:A,selectCartItemState:y,selectCartItemPrice:D,selectCartItemRowTotal:m,selectCartItemQuantity:g,selectCartItemDiscounts:S,selectCartItemTotalDiscount:T}},ha=function(){var t;return function(){return t=t||Ca()}}(),Aa=function(){var t=la().selectCartFeatureState,a=e.createSelector(t,(function(t){return t.order})),r=e.createSelector(a,(function(t){return t.cartOrderResult})),i=e.createSelector(r,(function(t){return t.orderId})),n=e.createSelector(r,(function(t){return t.cartId}));return{selectCartOrderState:a,selectCartOrderLoading:e.createSelector(a,(function(t){return"Stable"!==t.loading})),selectCartOrderMutating:e.createSelector(a,(function(t){return"Mutating"===t.loading})),selectCartOrderErrors:e.createSelector(a,(function(t){return t.errors})),selectCartOrderValue:r,selectCartOrderId:i,selectCartOrderCartId:n,selectHasOrderResult:e.createSelector(r,(function(t){return!!(t&&t.orderId&&t.cartId)}))}},ya=function(){var t;return function(){return t=t||Aa()}}(),ga=function(){var a=la().selectCartFeatureState,r=ha().selectCartItemMutating,i=e.createSelector(a,(function(t){return t.cart})),o=e.createSelector(i,(function(t){return t.cart})),c=e.createSelector(i,(function(t){return t.resolved})),p=e.createSelector(i,(function(t){return t.loading})),f=e.createSelector(p,(function(e){return"Stable"!==e[t.DaffCartOperationType.Cart]})),d=e.createSelector(p,(function(e){return"Resolving"===e[t.DaffCartOperationType.Cart]})),u=e.createSelector(p,(function(e){return"Mutating"===e[t.DaffCartOperationType.Cart]})),l=e.createSelector(p,(function(e){return"Stable"!==e[t.DaffCartOperationType.BillingAddress]})),C=e.createSelector(p,(function(e){return"Resolving"===e[t.DaffCartOperationType.BillingAddress]})),h=e.createSelector(p,(function(e){return"Mutating"===e[t.DaffCartOperationType.BillingAddress]})),A=e.createSelector(p,(function(e){return"Stable"!==e[t.DaffCartOperationType.ShippingAddress]})),y=e.createSelector(p,(function(e){return"Resolving"===e[t.DaffCartOperationType.ShippingAddress]})),g=e.createSelector(p,(function(e){return"Mutating"===e[t.DaffCartOperationType.ShippingAddress]})),m=e.createSelector(p,(function(e){return"Stable"!==e[t.DaffCartOperationType.ShippingInformation]})),D=e.createSelector(p,(function(e){return"Resolving"===e[t.DaffCartOperationType.ShippingInformation]})),S=e.createSelector(p,(function(e){return"Mutating"===e[t.DaffCartOperationType.ShippingInformation]})),T=e.createSelector(p,(function(e){return"Stable"!==e[t.DaffCartOperationType.ShippingMethods]})),I=e.createSelector(p,(function(e){return"Resolving"===e[t.DaffCartOperationType.ShippingMethods]})),v=e.createSelector(p,(function(e){return"Stable"!==e[t.DaffCartOperationType.Payment]})),O=e.createSelector(p,(function(e){return"Resolving"===e[t.DaffCartOperationType.Payment]})),b=e.createSelector(p,(function(e){return"Mutating"===e[t.DaffCartOperationType.Payment]})),j=e.createSelector(p,(function(e){return"Stable"!==e[t.DaffCartOperationType.PaymentMethods]})),M=e.createSelector(p,(function(e){return"Resolving"===e[t.DaffCartOperationType.PaymentMethods]})),R=e.createSelector(p,(function(e){return"Stable"!==e[t.DaffCartOperationType.Item]})),P=e.createSelector(p,(function(e){return"Adding"===e[t.DaffCartOperationType.Item]})),F=e.createSelector(p,(function(e){return"Resolving"===e[t.DaffCartOperationType.Item]})),L=e.createSelector(p,(function(e){return"Stable"!==e[t.DaffCartOperationType.Coupon]})),E=e.createSelector(p,(function(e){return"Resolving"===e[t.DaffCartOperationType.Coupon]})),$=e.createSelector(p,(function(e){return"Mutating"===e[t.DaffCartOperationType.Coupon]})),w=e.createSelector(p,(function(t){return[f,l,A,m,T,v,j,L,R].map((function(e){return e.projector(t)})).reduce((function(t,e){return t||e}),!1)})),U=e.createSelector(p,(function(t){return[d,C,y,D,I,O,M,E,F].map((function(e){return e.projector(t)})).reduce((function(t,e){return t||e}),!1)})),B=e.createSelector(p,r,(function(t,e){return[u,h,g,S,b,$,P].map((function(e){return e.projector(t)})).reduce((function(t,e){return t||e}),!1)||e})),_=e.createSelector(i,(function(t){return t.errors})),x=e.createSelector(_,(function(e){return e[t.DaffCartOperationType.Cart]})),W=e.createSelector(_,(function(e){return e[t.DaffCartOperationType.BillingAddress]})),H=e.createSelector(_,(function(e){return e[t.DaffCartOperationType.ShippingAddress]})),z=e.createSelector(_,(function(e){return e[t.DaffCartOperationType.ShippingInformation]})),q=e.createSelector(_,(function(e){return e[t.DaffCartOperationType.ShippingMethods]})),k=e.createSelector(_,(function(e){return e[t.DaffCartOperationType.Payment]})),N=e.createSelector(_,(function(e){return e[t.DaffCartOperationType.PaymentMethods]})),V=e.createSelector(_,(function(e){return e[t.DaffCartOperationType.Item]})),Q=e.createSelector(_,(function(e){return e[t.DaffCartOperationType.Coupon]})),G=e.createSelector(o,(function(t){return t.id})),X=e.createSelector(o,(function(t){var e=t.totals.find((function(t){return t.name===n.DaffCartTotalTypeEnum.subtotalExcludingTax}));return e?e.value:null})),Y=e.createSelector(o,(function(t){var e=t.totals.find((function(t){return t.name===n.DaffCartTotalTypeEnum.grandTotal}));return e?e.value:null})),K=e.createSelector(o,(function(t){var e=t.totals.find((function(t){return t.name===n.DaffCartTotalTypeEnum.subtotalExcludingTax}));return e?e.value:null})),J=e.createSelector(o,(function(t){var e=t.totals.find((function(t){return t.name===n.DaffCartTotalTypeEnum.subtotalIncludingTax}));return e?e.value:null})),Z=e.createSelector(o,(function(t){var e=t.totals.find((function(t){return t.name===n.DaffCartTotalTypeEnum.subtotalWithDiscountExcludingTax}));return e?e.value:null})),tt=e.createSelector(o,(function(t){var e=t.totals.find((function(t){return t.name===n.DaffCartTotalTypeEnum.subtotalWithDiscountIncludingTax}));return e?e.value:null})),et=e.createSelector(o,(function(t){var e=t.totals.find((function(t){return t.name===n.DaffCartTotalTypeEnum.tax}));return e?e.value:null})),at=e.createSelector(o,(function(t){var e=t.totals.filter((function(t){return t.name===n.DaffCartTotalTypeEnum.discount}));return e||[]})),rt=e.createSelector(o,(function(t){var e=t.totals.find((function(t){return t.name===n.DaffCartTotalTypeEnum.shipping}));return e?e.value:null})),it=e.createSelector(o,(function(t){return t.coupons})),nt=e.createSelector(o,(function(t){return t.items})),ot=e.createSelector(o,(function(t){return t.items.reduce((function(t,e){return t||!e.in_stock}),!1)})),st=e.createSelector(o,(function(t){return t.billing_address})),ct=e.createSelector(o,(function(t){return t.shipping_address})),pt=e.createSelector(o,(function(t){return t.payment})),ft=e.createSelector(o,(function(t){return t.totals})),dt=e.createSelector(o,(function(t){return t.shipping_information})),ut=e.createSelector(o,(function(t){return t.available_shipping_methods})),lt=e.createSelector(o,(function(t){return t.available_payment_methods})),Ct=e.createSelector(o,(function(t){return!t||!t.items||0===t.items.length})),ht=e.createSelector(ct,st,(function(t,e){return s.daffComparePersonalAddresses(t,e)})),At=e.createSelector(st,(function(t){return!!t})),yt=e.createSelector(ct,(function(t){return!!t})),gt=e.createSelector(dt,(function(t){return!!t})),mt=e.createSelector(pt,(function(t){return!!t&&""!==t.method})),Dt=e.createSelector(Ct,At,yt,gt,mt,(function(t,e,a,r,i){return!t&&e&&a&&r&&i}));return{selectCartState:i,selectCartValue:o,selectCartResolved:c,selectCartLoadingObject:p,selectCartFeatureLoading:w,selectCartFeatureResolving:U,selectCartFeatureMutating:B,selectCartLoading:f,selectCartResolving:d,selectCartMutating:u,selectBillingAddressLoading:l,selectBillingAddressResolving:C,selectBillingAddressMutating:h,selectShippingAddressLoading:A,selectShippingAddressResolving:y,selectShippingAddressMutating:g,selectShippingInformationLoading:m,selectShippingInformationResolving:D,selectShippingInformationMutating:S,selectShippingMethodsLoading:T,selectShippingMethodsResolving:I,selectPaymentLoading:v,selectPaymentResolving:O,selectPaymentMutating:b,selectPaymentMethodsLoading:j,selectPaymentMethodsResolving:M,selectCouponLoading:L,selectCouponResolving:E,selectCouponMutating:$,selectItemLoading:R,selectItemAdding:P,selectItemResolving:F,selectCartErrorsObject:_,selectCartErrors:x,selectBillingAddressErrors:W,selectShippingAddressErrors:H,selectShippingInformationErrors:z,selectShippingMethodsErrors:q,selectPaymentErrors:k,selectPaymentMethodsErrors:N,selectItemErrors:V,selectCouponErrors:Q,selectCartId:G,selectCartSubtotal:X,selectCartGrandTotal:Y,selectCartSubtotalExcludingTax:K,selectCartSubtotalIncludingTax:J,selectCartSubtotalWithDiscountExcludingTax:Z,selectCartSubtotalWithDiscountIncludingTax:tt,selectCartDiscountTotals:at,selectCartTotalTax:et,selectCartShippingTotal:rt,selectCartCoupons:it,selectCartItems:nt,selectCartHasOutOfStockItems:ot,selectCartBillingAddress:st,selectCartShippingAddress:ct,selectCartPayment:pt,selectCartTotals:ft,selectCartShippingInformation:dt,selectCartAvailableShippingMethods:ut,selectCartAvailablePaymentMethods:lt,selectIsCartEmpty:Ct,selectIsBillingSameAsShipping:ht,selectHasBillingAddress:At,selectHasShippingAddress:yt,selectHasShippingMethod:gt,selectHasPaymentMethod:mt,selectCanPlaceOrder:Dt}},ma=function(){var t;return function(){return t=t||ga()}}(),Da=function(){return Object.assign(Object.assign(Object.assign(Object.assign({},la()),ya()),ma()),ha())},Sa=Da,Ta=function(){var t;return function(){return t=t||Da()}},Ia=Ta(),va=new i.InjectionToken("DaffCartItemStateDebounceTime"),Oa=function(e,a,r,i){var n=this;this.actions$=e,this.errorMatcher=a,this.driver=r,this.storage=i,this.update$=this.actions$.pipe(c.ofType(t.DaffCartAddressActionTypes.CartAddressUpdateAction),f.switchMap((function(t){return p.of(null).pipe(f.map((function(){return n.storage.getCartId()})),f.switchMap((function(e){return n.driver.update(e,t.payload)})),f.map((function(t){return new ft(t)})),f.catchError((function(t){return p.of(t instanceof o.DaffStorageServiceError?new C(n.errorMatcher(t)):new dt(n.errorMatcher(t)))})))})))};Oa.decorators=[{type:i.Injectable}],Oa.ctorParameters=function(){return[{type:c.Actions},{type:void 0,decorators:[{type:i.Inject,args:[n.DAFF_CART_ERROR_MATCHER]}]},{type:void 0,decorators:[{type:i.Inject,args:[d.DaffCartAddressDriver]}]},{type:n.DaffCartStorageService}]},de([c.Effect(),ue("design:type",Object)],Oa.prototype,"update$",void 0);var ba=function(e,a,r,i){var n=this;this.actions$=e,this.errorMatcher=a,this.driver=r,this.storage=i,this.get$=this.actions$.pipe(c.ofType(t.DaffCartBillingAddressActionTypes.CartBillingAddressLoadAction),f.switchMap((function(t){return n.driver.get(n.storage.getCartId()).pipe(f.map((function(t){return new Y(t)})),f.catchError((function(t){return p.of(new K(n.errorMatcher(t)))})))}))),this.update$=this.actions$.pipe(c.ofType(t.DaffCartBillingAddressActionTypes.CartBillingAddressUpdateAction),f.switchMap((function(t){return n.driver.update(n.storage.getCartId(),t.payload).pipe(f.map((function(t){return new Z(t)})),f.catchError((function(t){return p.of(new tt(n.errorMatcher(t)))})))})))};ba.decorators=[{type:i.Injectable}],ba.ctorParameters=function(){return[{type:c.Actions},{type:void 0,decorators:[{type:i.Inject,args:[n.DAFF_CART_ERROR_MATCHER]}]},{type:void 0,decorators:[{type:i.Inject,args:[d.DaffCartBillingAddressDriver]}]},{type:n.DaffCartStorageService}]},de([c.Effect(),ue("design:type",Object)],ba.prototype,"get$",void 0),de([c.Effect(),ue("design:type",Object)],ba.prototype,"update$",void 0);var ja=function(e,a,r,i){var n=this;this.actions$=e,this.errorMatcher=a,this.driver=r,this.storage=i,this.apply$=this.actions$.pipe(c.ofType(t.DaffCartCouponActionTypes.CartCouponApplyAction),f.switchMap((function(t){return p.of(null).pipe(f.map((function(){return n.storage.getCartId()})),f.switchMap((function(e){return n.driver.apply(e,t.payload)})),f.map((function(t){return new Yt(t)})),f.catchError((function(t){return p.of(t instanceof o.DaffStorageServiceError?new C(n.errorMatcher(t)):new Kt(n.errorMatcher(t)))})))}))),this.list$=this.actions$.pipe(c.ofType(t.DaffCartCouponActionTypes.CartCouponListAction),f.switchMap((function(t){return p.of(null).pipe(f.map((function(){return n.storage.getCartId()})),f.switchMap((function(t){return n.driver.list(t)})),f.map((function(t){return new Zt(t)})),f.catchError((function(t){return p.of(t instanceof o.DaffStorageServiceError?new C(n.errorMatcher(t)):new te(n.errorMatcher(t)))})))}))),this.remove$=this.actions$.pipe(c.ofType(t.DaffCartCouponActionTypes.CartCouponRemoveAction),f.switchMap((function(t){return p.of(null).pipe(f.map((function(){return n.storage.getCartId()})),f.switchMap((function(e){return n.driver.remove(e,t.payload)})),f.map((function(t){return new ae(t)})),f.catchError((function(t){return p.of(t instanceof o.DaffStorageServiceError?new C(n.errorMatcher(t)):new re(n.errorMatcher(t)))})))}))),this.removeAll$=this.actions$.pipe(c.ofType(t.DaffCartCouponActionTypes.CartCouponRemoveAllAction),f.switchMap((function(t){return p.of(null).pipe(f.map((function(){return n.storage.getCartId()})),f.switchMap((function(t){return n.driver.removeAll(t)})),f.map((function(t){return new ne(t)})),f.catchError((function(t){return p.of(t instanceof o.DaffStorageServiceError?new C(n.errorMatcher(t)):new oe(n.errorMatcher(t)))})))})))};ja.decorators=[{type:i.Injectable}],ja.ctorParameters=function(){return[{type:c.Actions},{type:void 0,decorators:[{type:i.Inject,args:[n.DAFF_CART_ERROR_MATCHER]}]},{type:void 0,decorators:[{type:i.Inject,args:[d.DaffCartCouponDriver]}]},{type:n.DaffCartStorageService}]},de([c.Effect(),ue("design:type",Object)],ja.prototype,"apply$",void 0),de([c.Effect(),ue("design:type",Object)],ja.prototype,"list$",void 0),de([c.Effect(),ue("design:type",Object)],ja.prototype,"remove$",void 0),de([c.Effect(),ue("design:type",Object)],ja.prototype,"removeAll$",void 0);var Ma=function(e,a,r,i,n){var o=this;this.actions$=e,this.errorMatcher=a,this.driver=r,this.storage=i,this.cartItemStateDebounceTime=n,this.list$=this.actions$.pipe(c.ofType(t.DaffCartItemActionTypes.CartItemListAction),f.switchMap((function(t){return o.driver.list(o.storage.getCartId()).pipe(f.map((function(t){return new E(t)})),f.catchError((function(t){return p.of(new $(o.errorMatcher(t)))})))}))),this.get$=this.actions$.pipe(c.ofType(t.DaffCartItemActionTypes.CartItemLoadAction),f.switchMap((function(t){return o.driver.get(o.storage.getCartId(),t.itemId).pipe(f.map((function(t){return new U(t)})),f.catchError((function(e){return p.of(new B(o.errorMatcher(e),t.itemId))})))}))),this.add$=this.actions$.pipe(c.ofType(t.DaffCartItemActionTypes.CartItemAddAction),f.switchMap((function(t){return o.driver.add(o.storage.getCartId(),t.input).pipe(f.map((function(t){return new z(t)})),f.catchError((function(t){return p.of(new q(o.errorMatcher(t)))})))}))),this.update$=this.actions$.pipe(c.ofType(t.DaffCartItemActionTypes.CartItemUpdateAction),f.mergeMap((function(t){return o.driver.update(o.storage.getCartId(),t.itemId,t.changes).pipe(f.map((function(e){return new x(e,t.itemId)})),f.catchError((function(e){return p.of(new W(o.errorMatcher(e),t.itemId))})))}))),this.resetCartItemStateAfterChange$=this.actions$.pipe(c.ofType(t.DaffCartItemActionTypes.CartItemAddSuccessAction,t.DaffCartItemActionTypes.CartItemUpdateSuccessAction,t.DaffCartItemActionTypes.CartItemUpdateAction),f.debounceTime(this.cartItemStateDebounceTime),c.ofType(t.DaffCartItemActionTypes.CartItemAddSuccessAction,t.DaffCartItemActionTypes.CartItemUpdateSuccessAction),f.mapTo(new Q)),this.delete$=this.actions$.pipe(c.ofType(t.DaffCartItemActionTypes.CartItemDeleteAction),f.mergeMap((function(t){return o.driver.delete(o.storage.getCartId(),t.itemId).pipe(f.map((function(t){return new N(t)})),f.catchError((function(e){return p.of(new V(o.errorMatcher(e),t.itemId))})))})))};Ma.decorators=[{type:i.Injectable}],Ma.ctorParameters=function(){return[{type:c.Actions},{type:void 0,decorators:[{type:i.Inject,args:[n.DAFF_CART_ERROR_MATCHER]}]},{type:void 0,decorators:[{type:i.Inject,args:[d.DaffCartItemDriver]}]},{type:n.DaffCartStorageService},{type:Number,decorators:[{type:i.Inject,args:[va]}]}]},de([c.Effect(),ue("design:type",Object)],Ma.prototype,"list$",void 0),de([c.Effect(),ue("design:type",Object)],Ma.prototype,"get$",void 0),de([c.Effect(),ue("design:type",Object)],Ma.prototype,"add$",void 0),de([c.Effect(),ue("design:type",Object)],Ma.prototype,"update$",void 0),de([c.Effect(),ue("design:type",Object)],Ma.prototype,"resetCartItemStateAfterChange$",void 0),de([c.Effect(),ue("design:type",Object)],Ma.prototype,"delete$",void 0);var Ra=function(e,a,r,i){var n=this;this.actions$=e,this.errorMatcher=a,this.driver=r,this.storage=i,this.placeOrder$=this.actions$.pipe(c.ofType(t.DaffCartOrderActionTypes.CartPlaceOrderAction),f.switchMap((function(t){return p.of(null).pipe(f.map((function(){return n.storage.getCartId()})),f.switchMap((function(e){return n.driver.placeOrder(e,t.payload)})),f.map((function(t){return new Vt(t)})),f.catchError((function(t){return p.of(t instanceof o.DaffStorageServiceError?new C(n.errorMatcher(t)):new Qt(n.errorMatcher(t)))})))}))),this.resetCart$=this.actions$.pipe(c.ofType(t.DaffCartOrderActionTypes.CartPlaceOrderSuccessAction),f.mapTo(new g))};Ra.decorators=[{type:i.Injectable}],Ra.ctorParameters=function(){return[{type:c.Actions},{type:void 0,decorators:[{type:i.Inject,args:[n.DAFF_CART_ERROR_MATCHER]}]},{type:void 0,decorators:[{type:i.Inject,args:[d.DaffCartOrderDriver]}]},{type:n.DaffCartStorageService}]},de([c.Effect(),ue("design:type",Object)],Ra.prototype,"placeOrder$",void 0),de([c.Effect(),ue("design:type",Object)],Ra.prototype,"resetCart$",void 0);var Pa=function(e,a,r,i){var n=this;this.actions$=e,this.errorMatcher=a,this.driver=r,this.storage=i,this.list$=this.actions$.pipe(c.ofType(t.DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadAction),f.switchMap((function(t){return n.driver.list(n.storage.getCartId()).pipe(f.map((function(t){return new zt(t)})),f.catchError((function(t){return p.of(new qt(n.errorMatcher(t)))})))})))};Pa.decorators=[{type:i.Injectable}],Pa.ctorParameters=function(){return[{type:c.Actions},{type:void 0,decorators:[{type:i.Inject,args:[n.DAFF_CART_ERROR_MATCHER]}]},{type:void 0,decorators:[{type:i.Inject,args:[d.DaffCartPaymentMethodsDriver]}]},{type:n.DaffCartStorageService}]},de([c.Effect(),ue("design:type",Object)],Pa.prototype,"list$",void 0);var Fa=function(e,a,r,i){var n=this;this.actions$=e,this.errorMatcher=a,this.driver=r,this.storage=i,this.get$=this.actions$.pipe(c.ofType(t.DaffCartPaymentActionTypes.CartPaymentLoadAction),f.switchMap((function(t){return n.driver.get(n.storage.getCartId()).pipe(f.map((function(t){return new Mt(t)})),f.catchError((function(t){return p.of(new Rt(n.errorMatcher(t)))})))}))),this.update$=this.actions$.pipe(c.ofType(t.DaffCartPaymentActionTypes.CartPaymentUpdateAction),f.switchMap((function(t){return n.driver.update(n.storage.getCartId(),t.payload).pipe(f.map((function(t){return new Ft(t)})),f.catchError((function(t){return p.of(new Lt(n.errorMatcher(t)))})))}))),this.updateWithBilling$=this.actions$.pipe(c.ofType(t.DaffCartPaymentActionTypes.CartPaymentUpdateWithBillingAction),f.switchMap((function(t){return n.driver.updateWithBilling(n.storage.getCartId(),t.payment,t.address).pipe(f.map((function(t){return new $t(t)})),f.catchError((function(t){return p.of(new wt(n.errorMatcher(t)))})))}))),this.remove$=this.actions$.pipe(c.ofType(t.DaffCartPaymentActionTypes.CartPaymentRemoveAction),f.switchMap((function(t){return n.driver.remove(n.storage.getCartId()).pipe(f.mapTo(new Bt),f.catchError((function(t){return p.of(new _t(n.errorMatcher(t)))})))})))};Fa.decorators=[{type:i.Injectable}],Fa.ctorParameters=function(){return[{type:c.Actions},{type:void 0,decorators:[{type:i.Inject,args:[n.DAFF_CART_ERROR_MATCHER]}]},{type:void 0,decorators:[{type:i.Inject,args:[d.DaffCartPaymentDriver]}]},{type:n.DaffCartStorageService}]},de([c.Effect(),ue("design:type",Object)],Fa.prototype,"get$",void 0),de([c.Effect(),ue("design:type",Object)],Fa.prototype,"update$",void 0),de([c.Effect(),ue("design:type",Object)],Fa.prototype,"updateWithBilling$",void 0),de([c.Effect(),ue("design:type",Object)],Fa.prototype,"remove$",void 0);var La=function(){function e(e,a,r,i){var s=this;this.actions$=e,this.errorMatcher=a,this.cartStorage=r,this.driver=i,this.onResolveCart=function(){return s.actions$.pipe(c.ofType(t.DaffCartActionTypes.ResolveCartAction),f.switchMap((function(){return p.of(null).pipe(f.map((function(){return s.cartStorage.getCartId()})),f.switchMap((function(t){return t?p.of({id:t}):s.driver.create()})),f.switchMap((function(t){var e=t.id;return s.driver.get(e)})),f.map((function(t){return new M(t)})),f.catchError((function(t){switch(!0){case t instanceof o.DaffServerSideStorageError:return p.of(new P(s.errorMatcher(new n.DaffCartServerSideResolutionError(t.message))));case t instanceof o.DaffStorageServiceError:return p.of(new R(s.errorMatcher(new n.DaffCartStorageResolutionError(t.message))));case t instanceof d.DaffCartNotFoundError:return s.driver.create().pipe(f.switchMap((function(t){var e=t.id;return s.driver.get(e)})),f.map((function(t){return new M(t)})),f.catchError((function(t){return p.of(new R(s.errorMatcher(new n.DaffCartNotFoundOrCreatedResolutionError(t.message))))})));default:return p.of(new R(s.errorMatcher(new n.DaffCartResolutionError(t.message))))}})))})))}}return e.prototype.ngrxOnInitEffects=function(){return new j},e}();La.decorators=[{type:i.Injectable}],La.ctorParameters=function(){return[{type:c.Actions},{type:void 0,decorators:[{type:i.Inject,args:[n.DAFF_CART_ERROR_MATCHER]}]},{type:n.DaffCartStorageService},{type:void 0,decorators:[{type:i.Inject,args:[d.DaffCartDriver]}]}]},de([c.Effect(),ue("design:type",Object)],La.prototype,"onResolveCart",void 0);var Ea=function(e,a,r,i){var n=this;this.actions$=e,this.errorMatcher=a,this.driver=r,this.storage=i,this.get$=this.actions$.pipe(c.ofType(t.DaffCartShippingAddressActionTypes.CartShippingAddressLoadAction),f.switchMap((function(t){return n.driver.get(n.storage.getCartId()).pipe(f.map((function(t){return new rt(t)})),f.catchError((function(t){return p.of(new it(n.errorMatcher(t)))})))}))),this.update$=this.actions$.pipe(c.ofType(t.DaffCartShippingAddressActionTypes.CartShippingAddressUpdateAction),f.switchMap((function(t){return n.driver.update(n.storage.getCartId(),t.payload).pipe(f.map((function(t){return new ot(t)})),f.catchError((function(t){return p.of(new st(n.errorMatcher(t)))})))})))};Ea.decorators=[{type:i.Injectable}],Ea.ctorParameters=function(){return[{type:c.Actions},{type:void 0,decorators:[{type:i.Inject,args:[n.DAFF_CART_ERROR_MATCHER]}]},{type:void 0,decorators:[{type:i.Inject,args:[d.DaffCartShippingAddressDriver]}]},{type:n.DaffCartStorageService}]},de([c.Effect(),ue("design:type",Object)],Ea.prototype,"get$",void 0),de([c.Effect(),ue("design:type",Object)],Ea.prototype,"update$",void 0);var $a=function(e,a,r,i){var n=this;this.actions$=e,this.errorMatcher=a,this.driver=r,this.storage=i,this.get$=this.actions$.pipe(c.ofType(t.DaffCartShippingInformationActionTypes.CartShippingInformationLoadAction),f.switchMap((function(t){return n.driver.get(n.storage.getCartId()).pipe(f.map((function(t){return new Ct(t)})),f.catchError((function(t){return p.of(new ht(n.errorMatcher(t)))})))}))),this.update$=this.actions$.pipe(c.ofType(t.DaffCartShippingInformationActionTypes.CartShippingInformationUpdateAction),f.switchMap((function(t){return n.driver.update(n.storage.getCartId(),t.payload).pipe(f.map((function(t){return new yt(t)})),f.catchError((function(t){return p.of(new gt(n.errorMatcher(t)))})))}))),this.delete$=this.actions$.pipe(c.ofType(t.DaffCartShippingInformationActionTypes.CartShippingInformationDeleteAction),f.switchMap((function(t){return n.driver.delete(n.storage.getCartId()).pipe(f.map((function(t){return new Dt(t)})),f.catchError((function(t){return p.of(new St(n.errorMatcher(t)))})))})))};$a.decorators=[{type:i.Injectable}],$a.ctorParameters=function(){return[{type:c.Actions},{type:void 0,decorators:[{type:i.Inject,args:[n.DAFF_CART_ERROR_MATCHER]}]},{type:void 0,decorators:[{type:i.Inject,args:[d.DaffCartShippingInformationDriver]}]},{type:n.DaffCartStorageService}]},de([c.Effect(),ue("design:type",Object)],$a.prototype,"get$",void 0),de([c.Effect(),ue("design:type",Object)],$a.prototype,"update$",void 0),de([c.Effect(),ue("design:type",Object)],$a.prototype,"delete$",void 0);var wa=function(e,a,r,i){var n=this;this.actions$=e,this.errorMatcher=a,this.driver=r,this.storage=i,this.list$=this.actions$.pipe(c.ofType(t.DaffCartShippingMethodsActionTypes.CartShippingMethodsLoadAction),f.switchMap((function(t){return n.driver.list(n.storage.getCartId()).pipe(f.map((function(t){return new vt(t)})),f.catchError((function(t){return p.of(new Ot(n.errorMatcher(t)))})))})))};wa.decorators=[{type:i.Injectable}],wa.ctorParameters=function(){return[{type:c.Actions},{type:void 0,decorators:[{type:i.Inject,args:[n.DAFF_CART_ERROR_MATCHER]}]},{type:void 0,decorators:[{type:i.Inject,args:[d.DaffCartShippingMethodsDriver]}]},{type:n.DaffCartStorageService}]},de([c.Effect(),ue("design:type",Object)],wa.prototype,"list$",void 0);var Ua=function(e,a,r,i){var n=this;this.actions$=e,this.errorMatcher=a,this.driver=r,this.storage=i,this.create$=this.actions$.pipe(c.ofType(t.DaffCartActionTypes.CartCreateAction),f.switchMap((function(t){return n.driver.create().pipe(f.map((function(t){return new m(t)})),f.catchError((function(t){return p.of(new D(n.errorMatcher(t)))})))}))),this.storeId$=this.actions$.pipe(c.ofType(t.DaffCartActionTypes.CartCreateSuccessAction,t.DaffCartActionTypes.ResolveCartSuccessAction),f.switchMap((function(t){return p.of(null).pipe(f.tap((function(){n.storage.setCartId(t.payload.id)})),f.switchMapTo(p.EMPTY),f.catchError((function(t){return p.of(new C(n.errorMatcher(t)))})))}))),this.get$=this.actions$.pipe(c.ofType(t.DaffCartActionTypes.CartLoadAction),f.switchMap((function(t){return p.of(null).pipe(f.map((function(){return n.storage.getCartId()})),f.switchMap((function(t){return n.driver.get(t)})),f.map((function(t){return new A(t)})),f.catchError((function(t){return p.of(t instanceof o.DaffStorageServiceError?new C(n.errorMatcher(t)):new y(n.errorMatcher(t)))})))}))),this.addToCart$=this.actions$.pipe(c.ofType(t.DaffCartActionTypes.AddToCartAction),f.switchMap((function(t){return n.driver.addToCart(t.payload.productId,t.payload.qty).pipe(f.map((function(t){return new T(t)})),f.catchError((function(t){return p.of(new I(n.errorMatcher(t)))})))}))),this.clear$=this.actions$.pipe(c.ofType(t.DaffCartActionTypes.CartClearAction),f.switchMap((function(t){return p.of(null).pipe(f.map((function(){return n.storage.getCartId()})),f.switchMap((function(t){return n.driver.clear(t)})),f.map((function(t){return new O(t)})),f.catchError((function(t){return p.of(t instanceof o.DaffStorageServiceError?new C(n.errorMatcher(t)):new b(n.errorMatcher(t)))})))})))};Ua.decorators=[{type:i.Injectable}],Ua.ctorParameters=function(){return[{type:c.Actions},{type:void 0,decorators:[{type:i.Inject,args:[n.DAFF_CART_ERROR_MATCHER]}]},{type:void 0,decorators:[{type:i.Inject,args:[d.DaffCartDriver]}]},{type:n.DaffCartStorageService}]},de([c.Effect(),ue("design:type",Object)],Ua.prototype,"create$",void 0),de([c.Effect(),ue("design:type",Object)],Ua.prototype,"storeId$",void 0),de([c.Effect(),ue("design:type",Object)],Ua.prototype,"get$",void 0),de([c.Effect(),ue("design:type",Object)],Ua.prototype,"addToCart$",void 0),de([c.Effect(),ue("design:type",Object)],Ua.prototype,"clear$",void 0);var Ba=new i.InjectionToken("DAFF_CART_REDUCERS",{factory:function(){return r.daffComposeReducers(Ce([e.combineReducers(fa)],i.inject(ua)))}}),_a=function(){};_a.decorators=[{type:i.NgModule,args:[{imports:[e.StoreModule.forFeature(da,Ba),c.EffectsModule.forFeature([Ua,Ma,ba,Ea,Oa,$a,wa,Fa,Pa,Ra,ja,La])],providers:[{provide:va,useValue:4e3}]}]}];var xa=function(){function t(t,a){var r=this;this.store=t,this.paymentMethodMap=a;var i=Ia(),n=i.selectCartValue,o=i.selectCartResolved,s=i.selectCartLoadingObject,c=i.selectCartFeatureLoading,p=i.selectCartFeatureResolving,d=i.selectCartFeatureMutating,u=i.selectCartLoading,l=i.selectCartResolving,C=i.selectCartMutating,h=i.selectBillingAddressLoading,A=i.selectBillingAddressResolving,y=i.selectBillingAddressMutating,g=i.selectShippingAddressLoading,m=i.selectShippingAddressResolving,D=i.selectShippingAddressMutating,S=i.selectShippingInformationLoading,T=i.selectShippingInformationResolving,I=i.selectShippingInformationMutating,v=i.selectShippingMethodsLoading,O=i.selectShippingMethodsResolving,b=i.selectPaymentLoading,j=i.selectPaymentResolving,M=i.selectPaymentMutating,R=i.selectPaymentMethodsLoading,P=i.selectPaymentMethodsResolving,F=i.selectCouponLoading,L=i.selectCouponResolving,E=i.selectCouponMutating,$=i.selectItemLoading,w=i.selectItemAdding,U=i.selectItemResolving,B=i.selectCartItemMutating,_=i.selectCartErrorsObject,x=i.selectCartErrors,W=i.selectItemErrors,H=i.selectBillingAddressErrors,z=i.selectShippingAddressErrors,q=i.selectShippingInformationErrors,k=i.selectShippingMethodsErrors,N=i.selectPaymentErrors,V=i.selectPaymentMethodsErrors,Q=i.selectCouponErrors,G=i.selectCartId,X=i.selectCartSubtotal,Y=i.selectCartGrandTotal,K=i.selectCartSubtotalExcludingTax,J=i.selectCartSubtotalIncludingTax,Z=i.selectCartSubtotalWithDiscountExcludingTax,tt=i.selectCartSubtotalWithDiscountIncludingTax,et=i.selectCartDiscountTotals,at=i.selectCartTotalTax,rt=i.selectCartShippingTotal,it=i.selectCartCoupons,nt=i.selectCartItems,ot=i.selectCartHasOutOfStockItems,st=i.selectCartItemEntities,ct=i.selectTotalNumberOfCartItems,pt=i.selectCartItemConfiguredAttributes,ft=i.selectCartItemCompositeOptions,dt=i.selectCartBillingAddress,ut=i.selectCartShippingAddress,lt=i.selectCartPayment,Ct=i.selectCartTotals,ht=i.selectCartShippingInformation,At=i.selectCartAvailableShippingMethods,yt=i.selectCartAvailablePaymentMethods,gt=i.selectIsCartEmpty,mt=i.selectIsBillingSameAsShipping,Dt=i.selectCartOrderLoading,St=i.selectCartOrderErrors,Tt=i.selectCartOrderValue,It=i.selectCartOrderId,vt=i.selectCartOrderCartId,Ot=i.selectHasOrderResult,bt=i.selectIsCartItemOutOfStock,jt=i.selectCartItemState,Mt=i.selectHasBillingAddress,Rt=i.selectHasShippingAddress,Pt=i.selectHasShippingMethod,Ft=i.selectHasPaymentMethod,Lt=i.selectCanPlaceOrder,Et=i.selectCartItemPrice,$t=i.selectCartItemRowTotal,wt=i.selectCartItemQuantity,Ut=i.selectCartItemDiscounts,Bt=i.selectCartItemTotalDiscount;this._selectCartItemConfiguredAttributes=pt,this._selectCartItemCompositeOptions=ft,this._selectIsCartItemOutOfStock=bt,this._selectCartItemState=jt,this._selectCartItemPrice=Et,this._selectCartItemQuantity=wt,this._selectCartItemRowTotal=$t,this._selectCartItemDiscounts=Ut,this._selectCartItemTotalDiscount=Bt,this.cart$=this.store.pipe(e.select(n)),this.resolved$=this.store.pipe(e.select(o)),this.loadingObject$=this.store.pipe(e.select(s)),this.featureLoading$=this.store.pipe(e.select(c)),this.featureResolving$=this.store.pipe(e.select(p)),this.featureMutating$=this.store.pipe(e.select(d)),this.loading$=this.store.pipe(e.select(u)),this.resolving$=this.store.pipe(e.select(l)),this.mutating$=this.store.pipe(e.select(C)),this.billingAddressLoading$=this.store.pipe(e.select(h)),this.billingAddressResolving$=this.store.pipe(e.select(A)),this.billingAddressMutating$=this.store.pipe(e.select(y)),this.shippingAddressLoading$=this.store.pipe(e.select(g)),this.shippingAddressResolving$=this.store.pipe(e.select(m)),this.shippingAddressMutating$=this.store.pipe(e.select(D)),this.shippingInformationLoading$=this.store.pipe(e.select(S)),this.shippingInformationResolving$=this.store.pipe(e.select(T)),this.shippingInformationMutating$=this.store.pipe(e.select(I)),this.shippingMethodsLoading$=this.store.pipe(e.select(v)),this.shippingMethodsResolving$=this.store.pipe(e.select(O)),this.paymentLoading$=this.store.pipe(e.select(b)),this.paymentResolving$=this.store.pipe(e.select(j)),this.paymentMutating$=this.store.pipe(e.select(M)),this.paymentMethodsLoading$=this.store.pipe(e.select(R)),this.paymentMethodsResolving$=this.store.pipe(e.select(P)),this.couponLoading$=this.store.pipe(e.select(F)),this.couponResolving$=this.store.pipe(e.select(L)),this.couponMutating$=this.store.pipe(e.select(E)),this.itemLoading$=this.store.pipe(e.select($)),this.itemAdding$=this.store.pipe(e.select(w)),this.itemResolving$=this.store.pipe(e.select(U)),this.itemMutating$=this.store.pipe(e.select(B)),this.errors$=this.store.pipe(e.select(_)),this.cartErrors$=this.store.pipe(e.select(x)),this.itemErrors$=this.store.pipe(e.select(W)),this.billingAddressErrors$=this.store.pipe(e.select(H)),this.shippingAddressErrors$=this.store.pipe(e.select(z)),this.shippingInformationErrors$=this.store.pipe(e.select(q)),this.shippingMethodsErrors$=this.store.pipe(e.select(k)),this.paymentErrors$=this.store.pipe(e.select(N)),this.paymentMethodsErrors$=this.store.pipe(e.select(V)),this.couponErrors$=this.store.pipe(e.select(Q)),this.id$=this.store.pipe(e.select(G)),this.subtotal$=this.store.pipe(e.select(X)),this.grandTotal$=this.store.pipe(e.select(Y)),this.subtotalExcludingTax$=this.store.pipe(e.select(K)),this.subtotalIncludingTax$=this.store.pipe(e.select(J)),this.subtotalWithDiscountExcludingTax$=this.store.pipe(e.select(Z)),this.subtotalWithDiscountIncludingTax$=this.store.pipe(e.select(tt)),this.discountTotals$=this.store.pipe(e.select(et)),this.totalTax$=this.store.pipe(e.select(at)),this.shippingTotal$=this.store.pipe(e.select(rt)),this.coupons$=this.store.pipe(e.select(it)),this.items$=this.store.pipe(e.select(nt)),this.totalItems$=this.store.pipe(e.select(ct)),this.hasOutOfStockItems$=this.store.pipe(e.select(ot)),this.itemDictionary$=this.store.pipe(e.select(st)),this.billingAddress$=this.store.pipe(e.select(dt)),this.shippingAddress$=this.store.pipe(e.select(ut)),this.payment$=this.store.pipe(e.select(lt)),this.totals$=this.store.pipe(e.select(Ct)),this.shippingInformation$=this.store.pipe(e.select(ht)),this.availableShippingMethods$=this.store.pipe(e.select(At)),this.availablePaymentMethods$=this.store.pipe(e.select(yt)),this.paymentId$=this.payment$.pipe(f.map((function(t){return t&&t.method?r.paymentMethodMap[t.method]:null}))),this.isCartEmpty$=this.store.pipe(e.select(gt)),this.isBillingSameAsShipping$=this.store.pipe(e.select(mt)),this.hasBillingAddress$=this.store.pipe(e.select(Mt)),this.hasShippingAddress$=this.store.pipe(e.select(Rt)),this.hasShippingMethod$=this.store.pipe(e.select(Pt)),this.hasPaymentMethod$=this.store.pipe(e.select(Ft)),this.canPlaceOrder$=this.store.pipe(e.select(Lt)),this.orderResultLoading$=this.store.pipe(e.select(Dt)),this.orderResultErrors$=this.store.pipe(e.select(St)),this.orderResult$=this.store.pipe(e.select(Tt)),this.orderResultId$=this.store.pipe(e.select(It)),this.orderResultCartId$=this.store.pipe(e.select(vt)),this.hasOrderResult$=this.store.pipe(e.select(Ot))}return t.prototype.getConfiguredCartItemAttributes=function(t){return this.store.pipe(e.select(this._selectCartItemConfiguredAttributes(t)))},t.prototype.getCompositeCartItemOptions=function(t){return this.store.pipe(e.select(this._selectCartItemCompositeOptions(t)))},t.prototype.isCartItemOutOfStock=function(t){return this.store.pipe(e.select(this._selectIsCartItemOutOfStock(t)))},t.prototype.getCartItemState=function(t){return this.store.pipe(e.select(this._selectCartItemState(t)))},t.prototype.getCartItemPrice=function(t){return this.store.pipe(e.select(this._selectCartItemPrice(t)))},t.prototype.getCartItemQuantity=function(t){return this.store.pipe(e.select(this._selectCartItemQuantity(t)))},t.prototype.getCartItemRowTotal=function(t){return this.store.pipe(e.select(this._selectCartItemRowTotal(t)))},t.prototype.getCartItemDiscounts=function(t){return this.store.pipe(e.select(this._selectCartItemDiscounts(t)))},t.prototype.getCartItemTotalDiscount=function(t){return this.store.pipe(e.select(this._selectCartItemTotalDiscount(t)))},t.prototype.dispatch=function(t){this.store.dispatch(t)},t}();xa.ɵprov=i.ɵɵdefineInjectable({factory:function(){return new xa(i.ɵɵinject(e.Store),i.ɵɵinject(n.DaffCartPaymentMethodIdMap))},token:xa,providedIn:"root"}),xa.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],xa.ctorParameters=function(){return[{type:e.Store},{type:Object,decorators:[{type:i.Inject,args:[n.DaffCartPaymentMethodIdMap]}]}]},t.DAFF_CART_EXTRA_REDUCERS=ua,t.DAFF_CART_STORE_FEATURE_KEY=da,t.DaffAddToCart=S,t.DaffAddToCartFailure=I,t.DaffAddToCartSuccess=T,t.DaffCartAddressUpdate=pt,t.DaffCartAddressUpdateFailure=dt,t.DaffCartAddressUpdateSuccess=ft,t.DaffCartBillingAddressLoad=X,t.DaffCartBillingAddressLoadFailure=K,t.DaffCartBillingAddressLoadSuccess=Y,t.DaffCartBillingAddressUpdate=J,t.DaffCartBillingAddressUpdateFailure=tt,t.DaffCartBillingAddressUpdateSuccess=Z,t.DaffCartClear=v,t.DaffCartClearFailure=b,t.DaffCartClearSuccess=O,t.DaffCartCouponApply=Xt,t.DaffCartCouponApplyFailure=Kt,t.DaffCartCouponApplySuccess=Yt,t.DaffCartCouponList=Jt,t.DaffCartCouponListFailure=te,t.DaffCartCouponListSuccess=Zt,t.DaffCartCouponRemove=ee,t.DaffCartCouponRemoveAll=ie,t.DaffCartCouponRemoveAllFailure=oe,t.DaffCartCouponRemoveAllSuccess=ne,t.DaffCartCouponRemoveFailure=re,t.DaffCartCouponRemoveSuccess=ae,t.DaffCartCreate=g,t.DaffCartCreateFailure=D,t.DaffCartCreateSuccess=m,t.DaffCartFacade=xa,t.DaffCartItemAdd=H,t.DaffCartItemAddFailure=q,t.DaffCartItemAddSuccess=z,t.DaffCartItemDelete=k,t.DaffCartItemDeleteFailure=V,t.DaffCartItemDeleteSuccess=N,t.DaffCartItemList=L,t.DaffCartItemListFailure=$,t.DaffCartItemListSuccess=E,t.DaffCartItemLoad=w,t.DaffCartItemLoadFailure=B,t.DaffCartItemLoadSuccess=U,t.DaffCartItemStateDebounceTime=va,t.DaffCartItemStateReset=Q,t.DaffCartItemUpdate=_,t.DaffCartItemUpdateFailure=W,t.DaffCartItemUpdateSuccess=x,t.DaffCartLoad=h,t.DaffCartLoadFailure=y,t.DaffCartLoadSuccess=A,t.DaffCartPaymentLoad=jt,t.DaffCartPaymentLoadFailure=Rt,t.DaffCartPaymentLoadSuccess=Mt,t.DaffCartPaymentMethodAdd=xt,t.DaffCartPaymentMethodsLoad=Ht,t.DaffCartPaymentMethodsLoadFailure=qt,t.DaffCartPaymentMethodsLoadSuccess=zt,t.DaffCartPaymentRemove=Ut,t.DaffCartPaymentRemoveFailure=_t,t.DaffCartPaymentRemoveSuccess=Bt,t.DaffCartPaymentUpdate=Pt,t.DaffCartPaymentUpdateFailure=Lt,t.DaffCartPaymentUpdateSuccess=Ft,t.DaffCartPaymentUpdateWithBilling=Et,t.DaffCartPaymentUpdateWithBillingFailure=wt,t.DaffCartPaymentUpdateWithBillingSuccess=$t,t.DaffCartPlaceOrder=Nt,t.DaffCartPlaceOrderFailure=Qt,t.DaffCartPlaceOrderSuccess=Vt,t.DaffCartShippingAddressLoad=at,t.DaffCartShippingAddressLoadFailure=it,t.DaffCartShippingAddressLoadSuccess=rt,t.DaffCartShippingAddressUpdate=nt,t.DaffCartShippingAddressUpdateFailure=st,t.DaffCartShippingAddressUpdateSuccess=ot,t.DaffCartShippingInformationDelete=mt,t.DaffCartShippingInformationDeleteFailure=St,t.DaffCartShippingInformationDeleteSuccess=Dt,t.DaffCartShippingInformationLoad=lt,t.DaffCartShippingInformationLoadFailure=ht,t.DaffCartShippingInformationLoadSuccess=Ct,t.DaffCartShippingInformationUpdate=At,t.DaffCartShippingInformationUpdateFailure=gt,t.DaffCartShippingInformationUpdateSuccess=yt,t.DaffCartShippingMethodsLoad=It,t.DaffCartShippingMethodsLoadFailure=Ot,t.DaffCartShippingMethodsLoadSuccess=vt,t.DaffCartStateModule=_a,t.DaffCartStorageFailure=C,t.DaffResolveCart=j,t.DaffResolveCartFailure=R,t.DaffResolveCartServerSide=P,t.DaffResolveCartSuccess=M,t.daffCartOrderInitialState=me,t.daffCartOrderReducer=De,t.daffCartProvideExtraReducers=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.map((function(t){return{provide:ua,useValue:t,multi:!0}}))},t.daffCartReducer=pa,t.daffCartReducers=fa,t.getDaffCartSelectors=Ia,t.initialState=Se,t.initializeLoadingSetter=ve,t.ɵ0=Sa,t.ɵ1=Ta,t.ɵa=sa,t.ɵb=Ue,t.ɵc=Me,t.ɵd=Xe,t.ɵe=ra,t.ɵf=Ze,t.ɵg=ke,t.ɵh=We,t.ɵi=Le,t.ɵj=Ne,t.ɵk=pe,t.ɵl=Ba,t.ɵm=Ua,t.ɵn=Ma,t.ɵo=ba,t.ɵp=Ea,t.ɵq=Oa,t.ɵr=$a,t.ɵs=wa,t.ɵt=Fa,t.ɵu=Pa,t.ɵv=Ra,t.ɵw=ja,t.ɵx=La,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@ngrx/store"),require("@ngrx/entity"),require("@daffodil/core/state"),require("@angular/core"),require("@daffodil/cart"),require("@daffodil/core"),require("@daffodil/geography"),require("@ngrx/effects"),require("rxjs"),require("rxjs/operators"),require("@daffodil/cart/driver")):"function"==typeof define&&define.amd?define("@daffodil/cart/state",["exports","@ngrx/store","@ngrx/entity","@daffodil/core/state","@angular/core","@daffodil/cart","@daffodil/core","@daffodil/geography","@ngrx/effects","rxjs","rxjs/operators","@daffodil/cart/driver"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).daffodil=t.daffodil||{},t.daffodil.cart=t.daffodil.cart||{},t.daffodil.cart.state={}),t.i1,t.entity,t.state,t.ng.core,t.daffodil.cart,t.core,t.geography,t.effects,t.rxjs,t.rxjs.operators,t.daffodil.cart.driver)}(this,(function(t,e,a,r,i,n,o,s,c,p,f,d){"use strict";var u;(u=t.DaffCartActionTypes||(t.DaffCartActionTypes={})).CartStorageFailureAction="[DaffCart] Cart Storage Failure Action",u.CartLoadAction="[DaffCart] Cart Load Action",u.CartLoadSuccessAction="[DaffCart] Cart Load Success Action",u.CartLoadFailureAction="[DaffCart] Cart Load Failure Action",u.CartCreateAction="[DaffCart] Cart Create Action",u.CartCreateSuccessAction="[DaffCart] Cart Create Success Action",u.CartCreateFailureAction="[DaffCart] Cart Create Failure Action",u.AddToCartAction="[DaffCart] Cart Add To Cart Action",u.AddToCartSuccessAction="[DaffCart] Cart Add to Cart Success Action",u.AddToCartFailureAction="[DaffCart] Cart Add to Cart Failure Action",u.CartClearAction="[DaffCart] Cart Reset Action",u.CartClearSuccessAction="[DaffCart] Cart Reset Success Action",u.CartClearFailureAction="[DaffCart] Cart Reset Failure Action",u.ResolveCartAction="[DaffCart] Resolve Cart Action",u.ResolveCartSuccessAction="[DaffCart] Resolve Cart Success Action",u.ResolveCartServerSideAction="[DaffCart] Resolve Cart Server Side Action",u.ResolveCartFailureAction="[DaffCart] Resolve Cart Failure Action";var l,C=function(e){this.payload=e,this.type=t.DaffCartActionTypes.CartStorageFailureAction},h=function(){this.type=t.DaffCartActionTypes.CartLoadAction},A=function(e){this.payload=e,this.type=t.DaffCartActionTypes.CartLoadSuccessAction},y=function(e){this.payload=e,this.type=t.DaffCartActionTypes.CartLoadFailureAction},g=function(){this.type=t.DaffCartActionTypes.CartCreateAction},m=function(e){this.payload=e,this.type=t.DaffCartActionTypes.CartCreateSuccessAction},S=function(e){this.payload=e,this.type=t.DaffCartActionTypes.CartCreateFailureAction},D=function(e){this.payload=e,this.type=t.DaffCartActionTypes.AddToCartAction},T=function(e){this.payload=e,this.type=t.DaffCartActionTypes.AddToCartSuccessAction},I=function(e){this.payload=e,this.type=t.DaffCartActionTypes.AddToCartFailureAction},v=function(){this.type=t.DaffCartActionTypes.CartClearAction},O=function(e){this.payload=e,this.type=t.DaffCartActionTypes.CartClearSuccessAction},b=function(e){this.payload=e,this.type=t.DaffCartActionTypes.CartClearFailureAction},j=function(){this.type=t.DaffCartActionTypes.ResolveCartAction},M=function(e){this.payload=e,this.type=t.DaffCartActionTypes.ResolveCartSuccessAction},R=function(e){this.payload=e,this.type=t.DaffCartActionTypes.ResolveCartFailureAction},P=function(e){this.payload=e,this.type=t.DaffCartActionTypes.ResolveCartServerSideAction};(l=t.DaffCartItemActionTypes||(t.DaffCartItemActionTypes={})).CartItemListAction="[DaffCart] Cart Items List Action",l.CartItemListSuccessAction="[DaffCart] Cart Items List Success Action",l.CartItemListFailureAction="[DaffCart] Cart Items List Failure Action",l.CartItemLoadAction="[DaffCart] Cart Item Load Action",l.CartItemLoadSuccessAction="[DaffCart] Cart Item Load Success Action",l.CartItemLoadFailureAction="[DaffCart] Cart Item Load Failure Action",l.CartItemUpdateAction="[DaffCart] Cart Item Update Action",l.CartItemUpdateSuccessAction="[DaffCart] Cart Item Update Success Action",l.CartItemUpdateFailureAction="[DaffCart] Cart Item Update Failure Action",l.CartItemAddAction="[DaffCart] Cart Item Add Action",l.CartItemAddSuccessAction="[DaffCart] Cart Item Add Success Action",l.CartItemAddFailureAction="[DaffCart] Cart Item Add Failure Action",l.CartItemDeleteAction="[DaffCart] Cart Item Remove Action",l.CartItemDeleteSuccessAction="[DaffCart] Cart Item Remove Success Action",l.CartItemDeleteFailureAction="[DaffCart] Cart Item Remove Failure Action",l.CartItemStateResetAction="[DaffCart] Cart Item State Reset Action";var F,E=function(){this.type=t.DaffCartItemActionTypes.CartItemListAction},L=function(e){this.payload=e,this.type=t.DaffCartItemActionTypes.CartItemListSuccessAction},$=function(e){this.payload=e,this.type=t.DaffCartItemActionTypes.CartItemListFailureAction},w=function(e){this.itemId=e,this.type=t.DaffCartItemActionTypes.CartItemLoadAction},U=function(e){this.payload=e,this.type=t.DaffCartItemActionTypes.CartItemLoadSuccessAction},_=function(e,a){this.payload=e,this.itemId=a,this.type=t.DaffCartItemActionTypes.CartItemLoadFailureAction},B=function(e,a){this.itemId=e,this.changes=a,this.type=t.DaffCartItemActionTypes.CartItemUpdateAction},x=function(e,a){this.payload=e,this.itemId=a,this.type=t.DaffCartItemActionTypes.CartItemUpdateSuccessAction},W=function(e,a){this.payload=e,this.itemId=a,this.type=t.DaffCartItemActionTypes.CartItemUpdateFailureAction},k=function(e){this.input=e,this.type=t.DaffCartItemActionTypes.CartItemAddAction},z=function(e){this.payload=e,this.type=t.DaffCartItemActionTypes.CartItemAddSuccessAction},H=function(e){this.payload=e,this.type=t.DaffCartItemActionTypes.CartItemAddFailureAction},q=function(e){this.itemId=e,this.type=t.DaffCartItemActionTypes.CartItemDeleteAction},N=function(e){this.payload=e,this.type=t.DaffCartItemActionTypes.CartItemDeleteSuccessAction},V=function(e,a){this.payload=e,this.itemId=a,this.type=t.DaffCartItemActionTypes.CartItemDeleteFailureAction},Q=function(){this.type=t.DaffCartItemActionTypes.CartItemStateResetAction};(F=t.DaffCartBillingAddressActionTypes||(t.DaffCartBillingAddressActionTypes={})).CartBillingAddressLoadAction="[DaffCart] Billing Address Load Action",F.CartBillingAddressLoadSuccessAction="[DaffCart] Billing Address Load Success Action",F.CartBillingAddressLoadFailureAction="[DaffCart] Billing Address Load Failure Action",F.CartBillingAddressUpdateAction="[DaffCart] Billing Address Update Action",F.CartBillingAddressUpdateSuccessAction="[DaffCart] Billing Address Update Success Action",F.CartBillingAddressUpdateFailureAction="[DaffCart] Billing Address Update Failure Action";var G,X=function(){this.type=t.DaffCartBillingAddressActionTypes.CartBillingAddressLoadAction},Y=function(e){this.payload=e,this.type=t.DaffCartBillingAddressActionTypes.CartBillingAddressLoadSuccessAction},K=function(e){this.payload=e,this.type=t.DaffCartBillingAddressActionTypes.CartBillingAddressLoadFailureAction},J=function(e){this.payload=e,this.type=t.DaffCartBillingAddressActionTypes.CartBillingAddressUpdateAction},Z=function(e){this.payload=e,this.type=t.DaffCartBillingAddressActionTypes.CartBillingAddressUpdateSuccessAction},tt=function(e){this.payload=e,this.type=t.DaffCartBillingAddressActionTypes.CartBillingAddressUpdateFailureAction};(G=t.DaffCartShippingAddressActionTypes||(t.DaffCartShippingAddressActionTypes={})).CartShippingAddressLoadAction="[DaffCart] Shipping Address Load Action",G.CartShippingAddressLoadSuccessAction="[DaffCart] Shipping Address Load Success Action",G.CartShippingAddressLoadFailureAction="[DaffCart] Shipping Address Load Failure Action",G.CartShippingAddressUpdateAction="[DaffCart] Shipping Address Update Action",G.CartShippingAddressUpdateSuccessAction="[DaffCart] Shipping Address Update Success Action",G.CartShippingAddressUpdateFailureAction="[DaffCart] Shipping Address Update Failure Action";var et,at=function(){this.type=t.DaffCartShippingAddressActionTypes.CartShippingAddressLoadAction},rt=function(e){this.payload=e,this.type=t.DaffCartShippingAddressActionTypes.CartShippingAddressLoadSuccessAction},it=function(e){this.payload=e,this.type=t.DaffCartShippingAddressActionTypes.CartShippingAddressLoadFailureAction},nt=function(e){this.payload=e,this.type=t.DaffCartShippingAddressActionTypes.CartShippingAddressUpdateAction},ot=function(e){this.payload=e,this.type=t.DaffCartShippingAddressActionTypes.CartShippingAddressUpdateSuccessAction},st=function(e){this.payload=e,this.type=t.DaffCartShippingAddressActionTypes.CartShippingAddressUpdateFailureAction};(et=t.DaffCartAddressActionTypes||(t.DaffCartAddressActionTypes={})).CartAddressUpdateAction="[DaffCart] Cart Address Update Action",et.CartAddressUpdateSuccessAction="[DaffCart] Cart Address Update Success Action",et.CartAddressUpdateFailureAction="[DaffCart] Cart Address Update Failure Action";var ct,pt=function(e){this.payload=e,this.type=t.DaffCartAddressActionTypes.CartAddressUpdateAction},ft=function(e){this.payload=e,this.type=t.DaffCartAddressActionTypes.CartAddressUpdateSuccessAction},dt=function(e){this.payload=e,this.type=t.DaffCartAddressActionTypes.CartAddressUpdateFailureAction};(ct=t.DaffCartShippingInformationActionTypes||(t.DaffCartShippingInformationActionTypes={})).CartShippingInformationLoadAction="[DaffCart] Shipping Information Load Action",ct.CartShippingInformationLoadSuccessAction="[DaffCart] Shipping Information Load Success Action",ct.CartShippingInformationLoadFailureAction="[DaffCart] Shipping Information Load Failure Action",ct.CartShippingInformationUpdateAction="[DaffCart] Shipping Information Update Action",ct.CartShippingInformationUpdateSuccessAction="[DaffCart] Shipping Information Update Success Action",ct.CartShippingInformationUpdateFailureAction="[DaffCart] Shipping Information Update Failure Action",ct.CartShippingInformationDeleteAction="[DaffCart] Shipping Information Remove Action",ct.CartShippingInformationDeleteSuccessAction="[DaffCart] Shipping Information Remove Success Action",ct.CartShippingInformationDeleteFailureAction="[DaffCart] Shipping Information Remove Failure Action";var ut,lt=function(){this.type=t.DaffCartShippingInformationActionTypes.CartShippingInformationLoadAction},Ct=function(e){this.payload=e,this.type=t.DaffCartShippingInformationActionTypes.CartShippingInformationLoadSuccessAction},ht=function(e){this.payload=e,this.type=t.DaffCartShippingInformationActionTypes.CartShippingInformationLoadFailureAction},At=function(e){this.payload=e,this.type=t.DaffCartShippingInformationActionTypes.CartShippingInformationUpdateAction},yt=function(e){this.payload=e,this.type=t.DaffCartShippingInformationActionTypes.CartShippingInformationUpdateSuccessAction},gt=function(e){this.payload=e,this.type=t.DaffCartShippingInformationActionTypes.CartShippingInformationUpdateFailureAction},mt=function(e){this.id=e,this.type=t.DaffCartShippingInformationActionTypes.CartShippingInformationDeleteAction},St=function(e){this.payload=e,this.type=t.DaffCartShippingInformationActionTypes.CartShippingInformationDeleteSuccessAction},Dt=function(e){this.payload=e,this.type=t.DaffCartShippingInformationActionTypes.CartShippingInformationDeleteFailureAction};(ut=t.DaffCartShippingMethodsActionTypes||(t.DaffCartShippingMethodsActionTypes={})).CartShippingMethodsLoadAction="[DaffCart] Shipping Methods Load Action",ut.CartShippingMethodsLoadSuccessAction="[DaffCart] Shipping Methods Load Success Action",ut.CartShippingMethodsLoadFailureAction="[DaffCart] Shipping Methods Load Failure Action";var Tt,It=function(){this.type=t.DaffCartShippingMethodsActionTypes.CartShippingMethodsLoadAction},vt=function(e){this.payload=e,this.type=t.DaffCartShippingMethodsActionTypes.CartShippingMethodsLoadSuccessAction},Ot=function(e){this.payload=e,this.type=t.DaffCartShippingMethodsActionTypes.CartShippingMethodsLoadFailureAction};(Tt=t.DaffCartPaymentActionTypes||(t.DaffCartPaymentActionTypes={})).CartPaymentLoadAction="[DaffCart] Payment Load Action",Tt.CartPaymentLoadSuccessAction="[DaffCart] Payment Load Success Action",Tt.CartPaymentLoadFailureAction="[DaffCart] Payment Load Failure Action",Tt.CartPaymentUpdateAction="[DaffCart] Payment Update Action",Tt.CartPaymentUpdateSuccessAction="[DaffCart] Payment Update Success Action",Tt.CartPaymentUpdateFailureAction="[DaffCart] Payment Update Failure Action",Tt.CartPaymentUpdateWithBillingAction="[DaffCart] Payment Update With Billing Action",Tt.CartPaymentUpdateWithBillingSuccessAction="[DaffCart] Payment Update With Billing Success Action",Tt.CartPaymentUpdateWithBillingFailureAction="[DaffCart] Payment Update With Billing Failure Action",Tt.CartPaymentRemoveAction="[DaffCart] Payment Remove Action",Tt.CartPaymentRemoveSuccessAction="[DaffCart] Payment Remove Success Action",Tt.CartPaymentRemoveFailureAction="[DaffCart] Payment Remove Failure Action",Tt.CartPaymentMethodAddAction="[DaffCart] Payment Method Add Action";var bt,jt=function(){this.type=t.DaffCartPaymentActionTypes.CartPaymentLoadAction},Mt=function(e){this.payload=e,this.type=t.DaffCartPaymentActionTypes.CartPaymentLoadSuccessAction},Rt=function(e){this.payload=e,this.type=t.DaffCartPaymentActionTypes.CartPaymentLoadFailureAction},Pt=function(e){this.payload=e,this.type=t.DaffCartPaymentActionTypes.CartPaymentUpdateAction},Ft=function(e){this.payload=e,this.type=t.DaffCartPaymentActionTypes.CartPaymentUpdateSuccessAction},Et=function(e){this.payload=e,this.type=t.DaffCartPaymentActionTypes.CartPaymentUpdateFailureAction},Lt=function(e,a){this.payment=e,this.address=a,this.type=t.DaffCartPaymentActionTypes.CartPaymentUpdateWithBillingAction},$t=function(e){this.payload=e,this.type=t.DaffCartPaymentActionTypes.CartPaymentUpdateWithBillingSuccessAction},wt=function(e){this.payload=e,this.type=t.DaffCartPaymentActionTypes.CartPaymentUpdateWithBillingFailureAction},Ut=function(){this.type=t.DaffCartPaymentActionTypes.CartPaymentRemoveAction},_t=function(){this.type=t.DaffCartPaymentActionTypes.CartPaymentRemoveSuccessAction},Bt=function(e){this.payload=e,this.type=t.DaffCartPaymentActionTypes.CartPaymentRemoveFailureAction},xt=function(e){this.payload=e,this.type=t.DaffCartPaymentActionTypes.CartPaymentMethodAddAction};(bt=t.DaffCartPaymentMethodsActionTypes||(t.DaffCartPaymentMethodsActionTypes={})).CartPaymentMethodsLoadAction="[DaffCart] Payment Methods Load Action",bt.CartPaymentMethodsLoadSuccessAction="[DaffCart] Payment Methods Load Success Action",bt.CartPaymentMethodsLoadFailureAction="[DaffCart] Payment Methods Load Failure Action";var Wt,kt=function(){this.type=t.DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadAction},zt=function(e){this.payload=e,this.type=t.DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadSuccessAction},Ht=function(e){this.payload=e,this.type=t.DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadFailureAction};(Wt=t.DaffCartOrderActionTypes||(t.DaffCartOrderActionTypes={})).CartPlaceOrderAction="[DaffCart] Cart Place Order Action",Wt.CartPlaceOrderSuccessAction="[DaffCart] Cart Place Order Success Action",Wt.CartPlaceOrderFailureAction="[DaffCart] Cart Place Order Failure Action";var qt,Nt=function(e){this.payload=e,this.type=t.DaffCartOrderActionTypes.CartPlaceOrderAction},Vt=function(e){this.payload=e,this.type=t.DaffCartOrderActionTypes.CartPlaceOrderSuccessAction},Qt=function(e){this.payload=e,this.type=t.DaffCartOrderActionTypes.CartPlaceOrderFailureAction};(qt=t.DaffCartCouponActionTypes||(t.DaffCartCouponActionTypes={})).CartCouponApplyAction="[DaffCart] Cart Coupon Apply Action",qt.CartCouponApplySuccessAction="[DaffCart] Cart Coupon Apply Success Action",qt.CartCouponApplyFailureAction="[DaffCart] Cart Coupon Apply Failure Action",qt.CartCouponListAction="[DaffCart] Cart Coupon List Action",qt.CartCouponListSuccessAction="[DaffCart] Cart Coupon List Success Action",qt.CartCouponListFailureAction="[DaffCart] Cart Coupon List Failure Action",qt.CartCouponRemoveAction="[DaffCart] Cart Coupon Remove Action",qt.CartCouponRemoveSuccessAction="[DaffCart] Cart Coupon Remove Success Action",qt.CartCouponRemoveFailureAction="[DaffCart] Cart Coupon Remove Failure Action",qt.CartCouponRemoveAllAction="[DaffCart] Cart Coupon Remove All Action",qt.CartCouponRemoveAllSuccessAction="[DaffCart] Cart Coupon Remove All Success Action",qt.CartCouponRemoveAllFailureAction="[DaffCart] Cart Coupon Remove All Failure Action",qt.CartCouponClearErrorsAction="[DaffCart] Cart Coupon Clear Errors Action";var Gt,Xt=function(e){this.payload=e,this.type=t.DaffCartCouponActionTypes.CartCouponApplyAction},Yt=function(e){this.payload=e,this.type=t.DaffCartCouponActionTypes.CartCouponApplySuccessAction},Kt=function(e){this.payload=e,this.type=t.DaffCartCouponActionTypes.CartCouponApplyFailureAction},Jt=function(){this.type=t.DaffCartCouponActionTypes.CartCouponListAction},Zt=function(e){this.payload=e,this.type=t.DaffCartCouponActionTypes.CartCouponListSuccessAction},te=function(e){this.payload=e,this.type=t.DaffCartCouponActionTypes.CartCouponListFailureAction},ee=function(e){this.payload=e,this.type=t.DaffCartCouponActionTypes.CartCouponRemoveAction},ae=function(e){this.payload=e,this.type=t.DaffCartCouponActionTypes.CartCouponRemoveSuccessAction},re=function(e){this.payload=e,this.type=t.DaffCartCouponActionTypes.CartCouponRemoveFailureAction},ie=function(){this.type=t.DaffCartCouponActionTypes.CartCouponRemoveAllAction},ne=function(e){this.payload=e,this.type=t.DaffCartCouponActionTypes.CartCouponRemoveAllSuccessAction},oe=function(e){this.payload=e,this.type=t.DaffCartCouponActionTypes.CartCouponRemoveAllFailureAction},se=function(){this.type=t.DaffCartCouponActionTypes.CartCouponClearErrorsAction};(Gt=t.DaffCartItemStateEnum||(t.DaffCartItemStateEnum={})).New="new",Gt.Updated="updated",Gt.Mutating="mutating",Gt.Error="error",Gt.Default="default";var ce,pe=function(){return ce=ce||a.createEntityAdapter({selectId:function(t){return t.id}})};function fe(e,a){var r,i;void 0===e&&(e=pe().getInitialState());var n,o,s,c,p=pe();switch(a.type){case t.DaffCartItemActionTypes.CartItemListSuccessAction:return p.setAll(a.payload.map((function(a){return Object.assign(Object.assign({},a),{daffState:de(e.entities[a.id])||t.DaffCartItemStateEnum.Default,errors:[]})})),e);case t.DaffCartItemActionTypes.CartItemLoadSuccessAction:return p.upsertOne(Object.assign(Object.assign({},a.payload),{daffState:de(e.entities[a.payload.id])||t.DaffCartItemStateEnum.Default,errors:[]}),e);case t.DaffCartItemActionTypes.CartItemAddSuccessAction:return p.setAll((c=e.entities,a.payload.items.map((function(e){var a=c[e.id];switch(!0){case!a:return Object.assign(Object.assign({},e),{daffState:t.DaffCartItemStateEnum.New,errors:[]});case(null==a?void 0:a.qty)!==e.qty:return Object.assign(Object.assign({},e),{daffState:t.DaffCartItemStateEnum.Updated,errors:[]});default:return e}}))),e);case t.DaffCartItemActionTypes.CartItemUpdateSuccessAction:return p.setAll((n=a.payload.items,o=e.entities,s=a.itemId,n.map((function(e){return e.id===s?Object.assign(Object.assign({},e),{daffState:t.DaffCartItemStateEnum.Updated,errors:[]}):Object.assign(Object.assign({},e),{daffState:de(o[e.id])||t.DaffCartItemStateEnum.Default})}))),e);case t.DaffCartItemActionTypes.CartItemDeleteFailureAction:case t.DaffCartItemActionTypes.CartItemLoadFailureAction:case t.DaffCartItemActionTypes.CartItemUpdateFailureAction:return p.upsertOne(Object.assign(Object.assign({},e.entities[a.itemId]),{daffState:t.DaffCartItemStateEnum.Error,errors:(null===(i=null===(r=e.entities[a.itemId])||void 0===r?void 0:r.errors)||void 0===i?void 0:i.concat(a.payload))||[a.payload]}),e);case t.DaffCartItemActionTypes.CartItemDeleteSuccessAction:case t.DaffCartActionTypes.CartLoadSuccessAction:case t.DaffCartActionTypes.ResolveCartSuccessAction:case t.DaffCartActionTypes.CartClearSuccessAction:return p.setAll(a.payload.items.map((function(a){return Object.assign(Object.assign({},a),{daffState:de(e.entities[a.id])||t.DaffCartItemStateEnum.Default})})),e);case t.DaffCartItemActionTypes.CartItemStateResetAction:return p.setAll(Object.keys(e.entities).map((function(a){return Object.assign(Object.assign({},e.entities[a]),{daffState:t.DaffCartItemStateEnum.Default})})),e);case t.DaffCartItemActionTypes.CartItemUpdateAction:case t.DaffCartItemActionTypes.CartItemDeleteAction:return p.upsertOne(Object.assign(Object.assign({},e.entities[a.itemId]),{daffState:t.DaffCartItemStateEnum.Mutating}),e);case t.DaffCartActionTypes.CartCreateSuccessAction:return p.removeAll(e);default:return e}}function de(t){return null==t?void 0:t.daffState}function ue(t,e,a,r){var i,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,a):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,a,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(o=(n<3?i(o):n>3?i(e,a,o):i(e,a))||o);return n>3&&o&&Object.defineProperty(e,a,o),o}function le(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}Object.create;function Ce(t,e){var a="function"==typeof Symbol&&t[Symbol.iterator];if(!a)return t;var r,i,n=a.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=n.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(a=n.return)&&a.call(n)}finally{if(i)throw i.error}}return o}function he(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Ce(arguments[e]));return t}Object.create;var Ae,ye,ge,me,Se={cartOrderResult:{id:null,orderId:null,cartId:null},loading:"Stable",errors:[]};function De(e,a){switch(void 0===e&&(e=Se),a.type){case t.DaffCartOrderActionTypes.CartPlaceOrderAction:return Object.assign(Object.assign({},e),{loading:"Mutating"});case t.DaffCartOrderActionTypes.CartPlaceOrderSuccessAction:return Object.assign(Object.assign({},e),{errors:[],loading:"Stable",cartOrderResult:a.payload});case t.DaffCartOrderActionTypes.CartPlaceOrderFailureAction:return Object.assign(Object.assign({},e),{loading:"Stable",errors:he(e.errors,[a.payload])});default:return e}}(Ae=t.DaffCartOperationType||(t.DaffCartOperationType={})).Cart="Cart",Ae.Item="Item",Ae.BillingAddress="Billing Address",Ae.ShippingAddress="Shipping Address",Ae.Payment="Payment",Ae.PaymentMethods="Payment Methods",Ae.ShippingInformation="Shipping Information",Ae.ShippingMethods="Shipping Methods",Ae.Coupon="Coupon",(ye=t.DaffCartResolveState||(t.DaffCartResolveState={})).Default="default",ye.Resolving="resolving",ye.Succeeded="succeeded",ye.Failed="failed",ye.ServerSide="server";var Te=Object.freeze({cart:{id:null,subtotal:null,grand_total:null,coupons:[],items:[],billing_address:null,shipping_address:null,payment:null,totals:[],shipping_information:null,available_shipping_methods:[],available_payment_methods:[]},loading:(ge={},ge[t.DaffCartOperationType.Cart]="Stable",ge[t.DaffCartOperationType.Item]="Stable",ge[t.DaffCartOperationType.ShippingAddress]="Stable",ge[t.DaffCartOperationType.BillingAddress]="Stable",ge[t.DaffCartOperationType.ShippingInformation]="Stable",ge[t.DaffCartOperationType.ShippingMethods]="Stable",ge[t.DaffCartOperationType.Payment]="Stable",ge[t.DaffCartOperationType.PaymentMethods]="Stable",ge[t.DaffCartOperationType.Coupon]="Stable",ge),errors:(me={},me[t.DaffCartOperationType.Cart]=[],me[t.DaffCartOperationType.Item]=[],me[t.DaffCartOperationType.ShippingAddress]=[],me[t.DaffCartOperationType.BillingAddress]=[],me[t.DaffCartOperationType.ShippingInformation]=[],me[t.DaffCartOperationType.ShippingMethods]=[],me[t.DaffCartOperationType.Payment]=[],me[t.DaffCartOperationType.PaymentMethods]=[],me[t.DaffCartOperationType.Coupon]=[],me),resolved:t.DaffCartResolveState.Default}),Ie=function(t){return function(e,a){var r;return{errors:Object.assign(Object.assign({},e),(r={},r[t]=e[t].concat(new Array(a)),r))}}},ve=function(t){return function(e){var a;return{errors:Object.assign(Object.assign({},e),(a={},a[t]=[],a))}}},Oe=function(t){return function(e,a){var r;return{loading:Object.assign(Object.assign({},e),(r={},r[t]=a,r))}}},be=Ie(t.DaffCartOperationType.BillingAddress),je=ve(t.DaffCartOperationType.BillingAddress),Me=Oe(t.DaffCartOperationType.BillingAddress);function Re(e,a){switch(void 0===e&&(e=Te),a.type){case t.DaffCartBillingAddressActionTypes.CartBillingAddressLoadAction:return Object.assign(Object.assign({},e),Me(e.loading,"Resolving"));case t.DaffCartBillingAddressActionTypes.CartBillingAddressUpdateAction:case t.DaffCartAddressActionTypes.CartAddressUpdateAction:return Object.assign(Object.assign({},e),Me(e.loading,"Mutating"));case t.DaffCartBillingAddressActionTypes.CartBillingAddressLoadSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),je(e.errors)),{cart:Object.assign(Object.assign({},e.cart),{billing_address:a.payload})}),Me(e.loading,"Stable"));case t.DaffCartBillingAddressActionTypes.CartBillingAddressUpdateSuccessAction:case t.DaffCartAddressActionTypes.CartAddressUpdateSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),je(e.errors)),{cart:Object.assign(Object.assign({},e.cart),a.payload)}),Me(e.loading,"Stable"));case t.DaffCartBillingAddressActionTypes.CartBillingAddressLoadFailureAction:case t.DaffCartBillingAddressActionTypes.CartBillingAddressUpdateFailureAction:case t.DaffCartAddressActionTypes.CartAddressUpdateFailureAction:return Object.assign(Object.assign(Object.assign({},e),be(e.errors,a.payload)),Me(e.loading,"Stable"));default:return e}}var Pe=Ie(t.DaffCartOperationType.Coupon),Fe=ve(t.DaffCartOperationType.Coupon),Ee=Oe(t.DaffCartOperationType.Coupon);function Le(e,a){switch(void 0===e&&(e=Te),a.type){case t.DaffCartCouponActionTypes.CartCouponListAction:return Object.assign(Object.assign({},e),Ee(e.loading,"Resolving"));case t.DaffCartCouponActionTypes.CartCouponApplyAction:case t.DaffCartCouponActionTypes.CartCouponRemoveAction:case t.DaffCartCouponActionTypes.CartCouponRemoveAllAction:return Object.assign(Object.assign({},e),Ee(e.loading,"Mutating"));case t.DaffCartCouponActionTypes.CartCouponApplySuccessAction:case t.DaffCartCouponActionTypes.CartCouponRemoveSuccessAction:case t.DaffCartCouponActionTypes.CartCouponRemoveAllSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),Fe(e.errors)),{cart:Object.assign(Object.assign({},e.cart),a.payload)}),Ee(e.loading,"Stable"));case t.DaffCartCouponActionTypes.CartCouponClearErrorsAction:return Object.assign(Object.assign({},e),Fe(e.errors));case t.DaffCartCouponActionTypes.CartCouponListSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),Fe(e.errors)),{cart:Object.assign(Object.assign({},e.cart),{coupons:a.payload})}),Ee(e.loading,"Stable"));case t.DaffCartCouponActionTypes.CartCouponApplyFailureAction:case t.DaffCartCouponActionTypes.CartCouponListFailureAction:case t.DaffCartCouponActionTypes.CartCouponRemoveAllFailureAction:case t.DaffCartCouponActionTypes.CartCouponRemoveFailureAction:return Object.assign(Object.assign(Object.assign({},e),Pe(e.errors,a.payload)),Ee(e.loading,"Stable"));default:return e}}var $e=Ie(t.DaffCartOperationType.Item),we=ve(t.DaffCartOperationType.Item),Ue=Oe(t.DaffCartOperationType.Item);function _e(e,a){switch(void 0===e&&(e=Te),a.type){case t.DaffCartItemActionTypes.CartItemListAction:case t.DaffCartItemActionTypes.CartItemLoadAction:return Object.assign(Object.assign({},e),Ue(e.loading,"Resolving"));case t.DaffCartItemActionTypes.CartItemAddAction:return Object.assign(Object.assign({},e),Ue(e.loading,"Adding"));case t.DaffCartItemActionTypes.CartItemListSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),we(e.errors)),{cart:Object.assign(Object.assign({},e.cart),{items:a.payload})}),Ue(e.loading,"Stable"));case t.DaffCartItemActionTypes.CartItemLoadSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),we(e.errors)),{cart:Object.assign(Object.assign({},e.cart),{items:e.cart.items.map((function(t){return t.id===a.payload.id?a.payload:t}))})}),Ue(e.loading,"Stable"));case t.DaffCartItemActionTypes.CartItemUpdateSuccessAction:case t.DaffCartItemActionTypes.CartItemAddSuccessAction:case t.DaffCartItemActionTypes.CartItemDeleteSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),we(e.errors)),{cart:Object.assign(Object.assign({},e.cart),a.payload)}),Ue(e.loading,"Stable"));case t.DaffCartItemActionTypes.CartItemListFailureAction:case t.DaffCartItemActionTypes.CartItemLoadFailureAction:case t.DaffCartItemActionTypes.CartItemUpdateFailureAction:case t.DaffCartItemActionTypes.CartItemAddFailureAction:case t.DaffCartItemActionTypes.CartItemDeleteFailureAction:return Object.assign(Object.assign(Object.assign({},e),$e(e.errors,a.payload)),Ue(e.loading,"Stable"));case t.DaffCartItemActionTypes.CartItemUpdateFailureAction:return Object.assign(Object.assign({},e),Ue(e.loading,"Stable"));default:return e}}var Be=Ie(t.DaffCartOperationType.PaymentMethods),xe=ve(t.DaffCartOperationType.PaymentMethods),We=Oe(t.DaffCartOperationType.PaymentMethods);function ke(e,a){switch(void 0===e&&(e=Te),a.type){case t.DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadAction:return Object.assign(Object.assign({},e),We(e.loading,"Resolving"));case t.DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),xe(e.errors)),{cart:Object.assign(Object.assign({},e.cart),{available_payment_methods:a.payload})}),We(e.loading,"Stable"));case t.DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadFailureAction:return Object.assign(Object.assign(Object.assign({},e),Be(e.errors,a.payload)),We(e.loading,"Stable"));default:return e}}var ze=Ie(t.DaffCartOperationType.Payment),He=ve(t.DaffCartOperationType.Payment),qe=Oe(t.DaffCartOperationType.Payment);function Ne(e,a){switch(void 0===e&&(e=Te),a.type){case t.DaffCartPaymentActionTypes.CartPaymentLoadAction:return Object.assign(Object.assign({},e),qe(e.loading,"Resolving"));case t.DaffCartPaymentActionTypes.CartPaymentUpdateAction:case t.DaffCartPaymentActionTypes.CartPaymentUpdateWithBillingAction:case t.DaffCartPaymentActionTypes.CartPaymentRemoveAction:return Object.assign(Object.assign({},e),qe(e.loading,"Mutating"));case t.DaffCartPaymentActionTypes.CartPaymentLoadSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),He(e.errors)),{cart:Object.assign(Object.assign({},e.cart),{payment:a.payload})}),qe(e.loading,"Stable"));case t.DaffCartPaymentActionTypes.CartPaymentRemoveSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),He(e.errors)),{cart:Object.assign(Object.assign({},e.cart),{payment:null})}),qe(e.loading,"Stable"));case t.DaffCartPaymentActionTypes.CartPaymentUpdateSuccessAction:case t.DaffCartPaymentActionTypes.CartPaymentUpdateWithBillingSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),He(e.errors)),{cart:Object.assign(Object.assign({},e.cart),a.payload)}),qe(e.loading,"Stable"));case t.DaffCartPaymentActionTypes.CartPaymentLoadFailureAction:case t.DaffCartPaymentActionTypes.CartPaymentUpdateFailureAction:case t.DaffCartPaymentActionTypes.CartPaymentUpdateWithBillingFailureAction:case t.DaffCartPaymentActionTypes.CartPaymentRemoveFailureAction:return Object.assign(Object.assign(Object.assign({},e),ze(e.errors,a.payload)),qe(e.loading,"Stable"));case t.DaffCartPaymentActionTypes.CartPaymentMethodAddAction:return Object.assign(Object.assign({},e),{cart:Object.assign(Object.assign({},e.cart),{payment:Object.assign({},a.payload)})});default:return e}}function Ve(e,a){switch(void 0===e&&(e=Te),a.type){case t.DaffCartActionTypes.ResolveCartAction:return Object.assign(Object.assign({},e),{resolved:t.DaffCartResolveState.Resolving});case t.DaffCartActionTypes.ResolveCartServerSideAction:return Object.assign(Object.assign({},e),{resolved:t.DaffCartResolveState.ServerSide});case t.DaffCartActionTypes.ResolveCartSuccessAction:return Object.assign(Object.assign({},e),{resolved:t.DaffCartResolveState.Succeeded});case t.DaffCartActionTypes.ResolveCartFailureAction:return Object.assign(Object.assign({},e),{resolved:t.DaffCartResolveState.Failed});default:return e}}var Qe=Ie(t.DaffCartOperationType.ShippingAddress),Ge=ve(t.DaffCartOperationType.ShippingAddress),Xe=Oe(t.DaffCartOperationType.ShippingAddress);function Ye(e,a){switch(void 0===e&&(e=Te),a.type){case t.DaffCartShippingAddressActionTypes.CartShippingAddressLoadAction:return Object.assign(Object.assign({},e),Xe(e.loading,"Resolving"));case t.DaffCartShippingAddressActionTypes.CartShippingAddressUpdateAction:case t.DaffCartAddressActionTypes.CartAddressUpdateAction:return Object.assign(Object.assign({},e),Xe(e.loading,"Mutating"));case t.DaffCartShippingAddressActionTypes.CartShippingAddressLoadSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),Ge(e.errors)),{cart:Object.assign(Object.assign({},e.cart),{shipping_address:a.payload})}),Xe(e.loading,"Stable"));case t.DaffCartShippingAddressActionTypes.CartShippingAddressUpdateSuccessAction:case t.DaffCartAddressActionTypes.CartAddressUpdateSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),Ge(e.errors)),{cart:Object.assign(Object.assign({},e.cart),a.payload)}),Xe(e.loading,"Stable"));case t.DaffCartShippingAddressActionTypes.CartShippingAddressLoadFailureAction:case t.DaffCartShippingAddressActionTypes.CartShippingAddressUpdateFailureAction:case t.DaffCartAddressActionTypes.CartAddressUpdateFailureAction:return Object.assign(Object.assign(Object.assign({},e),Qe(e.errors,a.payload)),Xe(e.loading,"Stable"));default:return e}}var Ke=Ie(t.DaffCartOperationType.ShippingInformation),Je=ve(t.DaffCartOperationType.ShippingInformation),Ze=Oe(t.DaffCartOperationType.ShippingInformation);function ta(e,a){switch(void 0===e&&(e=Te),a.type){case t.DaffCartShippingInformationActionTypes.CartShippingInformationLoadAction:return Object.assign(Object.assign({},e),Ze(e.loading,"Resolving"));case t.DaffCartShippingInformationActionTypes.CartShippingInformationUpdateAction:case t.DaffCartShippingInformationActionTypes.CartShippingInformationDeleteAction:return Object.assign(Object.assign({},e),Ze(e.loading,"Mutating"));case t.DaffCartShippingInformationActionTypes.CartShippingInformationLoadSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),Je(e.errors)),{cart:Object.assign(Object.assign({},e.cart),{shipping_information:Object.assign(Object.assign({},a.payload),{address_id:null})})}),Ze(e.loading,"Stable"));case t.DaffCartShippingInformationActionTypes.CartShippingInformationUpdateSuccessAction:case t.DaffCartShippingInformationActionTypes.CartShippingInformationDeleteSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),Je(e.errors)),{cart:Object.assign(Object.assign(Object.assign({},e.cart),{shipping_information:null}),a.payload)}),Ze(e.loading,"Stable"));case t.DaffCartShippingInformationActionTypes.CartShippingInformationLoadFailureAction:case t.DaffCartShippingInformationActionTypes.CartShippingInformationUpdateFailureAction:case t.DaffCartShippingInformationActionTypes.CartShippingInformationDeleteFailureAction:return Object.assign(Object.assign(Object.assign({},e),Ke(e.errors,a.payload)),Ze(e.loading,"Stable"));default:return e}}var ea=Ie(t.DaffCartOperationType.ShippingMethods),aa=ve(t.DaffCartOperationType.ShippingMethods),ra=Oe(t.DaffCartOperationType.ShippingMethods);function ia(e,a){switch(void 0===e&&(e=Te),a.type){case t.DaffCartShippingMethodsActionTypes.CartShippingMethodsLoadAction:return Object.assign(Object.assign({},e),ra(e.loading,"Resolving"));case t.DaffCartShippingMethodsActionTypes.CartShippingMethodsLoadSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),aa(e.errors)),{cart:Object.assign(Object.assign({},e.cart),{available_shipping_methods:a.payload})}),ra(e.loading,"Stable"));case t.DaffCartShippingMethodsActionTypes.CartShippingMethodsLoadFailureAction:return Object.assign(Object.assign(Object.assign({},e),ea(e.errors,a.payload)),ra(e.loading,"Stable"));default:return e}}var na=Ie(t.DaffCartOperationType.Cart),oa=ve(t.DaffCartOperationType.Cart),sa=Oe(t.DaffCartOperationType.Cart);function ca(e,a){switch(void 0===e&&(e=Te),a.type){case t.DaffCartActionTypes.ResolveCartAction:case t.DaffCartActionTypes.CartLoadAction:return Object.assign(Object.assign({},e),sa(e.loading,"Resolving"));case t.DaffCartActionTypes.CartClearAction:case t.DaffCartActionTypes.AddToCartAction:case t.DaffCartActionTypes.CartCreateAction:return Object.assign(Object.assign({},e),sa(e.loading,"Mutating"));case t.DaffCartActionTypes.CartLoadSuccessAction:case t.DaffCartActionTypes.CartClearSuccessAction:case t.DaffCartActionTypes.AddToCartSuccessAction:case t.DaffCartActionTypes.CartCreateSuccessAction:case t.DaffCartActionTypes.ResolveCartSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),oa(e.errors)),{cart:Object.assign(Object.assign({},e.cart),a.payload)}),sa(e.loading,"Stable"));case t.DaffCartActionTypes.CartCreateSuccessAction:return Object.assign(Object.assign(Object.assign(Object.assign({},e),oa(e.errors)),{cart:Object.assign(Object.assign({},Te.cart),a.payload)}),sa(e.loading,"Stable"));case t.DaffCartActionTypes.CartLoadFailureAction:case t.DaffCartActionTypes.CartClearFailureAction:case t.DaffCartActionTypes.AddToCartFailureAction:case t.DaffCartActionTypes.CartCreateFailureAction:case t.DaffCartActionTypes.CartStorageFailureAction:case t.DaffCartActionTypes.ResolveCartFailureAction:case t.DaffCartActionTypes.ResolveCartServerSideAction:return Object.assign(Object.assign(Object.assign({},e),na(e.errors,a.payload)),sa(e.loading,"Stable"));default:return e}}var pa=r.daffComposeReducers([ca,_e,Re,Ye,ia,ta,Ne,ke,Le,Ve]);function fa(t,e){return void 0===t&&(t=Te),pa(t,e)}var da={cart:fa,cartItems:fe,order:De},ua="daffCart",la=new i.InjectionToken("DAFF_CART_EXTRA_REDUCERS",{factory:function(){return[]}});var Ca=function(){var t;return function(){return t=t||{selectCartFeatureState:e.createFeatureSelector(ua)}}}(),ha=function(){var a=Ca().selectCartFeatureState,r=pe().getSelectors(),i=e.createSelector(a,(function(t){return t.cartItems})),s=e.createSelector(i,r.selectIds),c=e.createSelector(i,r.selectEntities),p=e.createSelector(i,r.selectAll),f=e.createSelector(i,r.selectTotal),d=e.defaultMemoize((function(t){return e.createSelector(c,(function(e){return e[t]}))})).memoized,u=e.createSelector(p,(function(t){return t.reduce((function(t,e){return t+e.qty}),0)})),l=e.defaultMemoize((function(t){return e.createSelector(d(t),(function(t){return t.type!==n.DaffCartItemInputType.Configurable?null:t.attributes}))})).memoized,C=e.defaultMemoize((function(t){return e.createSelector(d(t),(function(t){return t.type!==n.DaffCartItemInputType.Composite?null:t.options}))})).memoized,h=e.defaultMemoize((function(t){return e.createSelector(d(t),(function(t){return t?!t.in_stock:null}))})).memoized,A=e.createSelector(p,(function(t){return t.filter((function(t){return!t.in_stock}))})),y=e.createSelector(p,(function(t){return t.filter((function(t){return t.in_stock}))})),g=e.createSelector(p,(function(e){return null==e?void 0:e.reduce((function(e,a){return e||a.daffState===t.DaffCartItemStateEnum.Mutating}),!1)})),m=e.defaultMemoize((function(t){return e.createSelector(d(t),(function(t){return(null==t?void 0:t.daffState)||null}))})).memoized,S=e.defaultMemoize((function(t){return e.createSelector(d(t),(function(t){return(null==t?void 0:t.qty)||0}))})).memoized,D=e.defaultMemoize((function(t){return e.createSelector(d(t),(function(t){return(null==t?void 0:t.row_total)||0}))})).memoized,T=e.defaultMemoize((function(t){return e.createSelector(d(t),(function(t){return(null==t?void 0:t.price)||0}))})).memoized,I=e.defaultMemoize((function(t){return e.createSelector(d(t),(function(t){return(null==t?void 0:t.discounts)||[]}))})).memoized,v=e.defaultMemoize((function(t){return e.createSelector(I(t),(function(t){return(null==t?void 0:t.reduce((function(t,e){var a=e.amount;return o.daffAdd(t,a)}),0))||0}))})).memoized,O=e.defaultMemoize((function(t){return e.createSelector(d(t),(function(t){return(null==t?void 0:t.errors)||[]}))})).memoized;return{selectCartItemEntitiesState:i,selectCartItemIds:s,selectCartItemEntities:c,selectAllCartItems:p,selectCartItemTotal:f,selectCartItem:d,selectTotalNumberOfCartItems:u,selectCartItemConfiguredAttributes:l,selectCartItemCompositeOptions:C,selectIsCartItemOutOfStock:h,selectInStockCartItems:y,selectOutOfStockCartItems:A,selectCartItemMutating:g,selectCartItemState:m,selectCartItemPrice:T,selectCartItemRowTotal:D,selectCartItemQuantity:S,selectCartItemDiscounts:I,selectCartItemTotalDiscount:v,selectCartItemErrors:O}},Aa=function(){var t;return function(){return t=t||ha()}}(),ya=function(){var t=Ca().selectCartFeatureState,a=e.createSelector(t,(function(t){return t.order})),r=e.createSelector(a,(function(t){return t.cartOrderResult})),i=e.createSelector(r,(function(t){return t.orderId})),n=e.createSelector(r,(function(t){return t.cartId}));return{selectCartOrderState:a,selectCartOrderLoading:e.createSelector(a,(function(t){return"Stable"!==t.loading})),selectCartOrderMutating:e.createSelector(a,(function(t){return"Mutating"===t.loading})),selectCartOrderErrors:e.createSelector(a,(function(t){return t.errors})),selectCartOrderValue:r,selectCartOrderId:i,selectCartOrderCartId:n,selectHasOrderResult:e.createSelector(r,(function(t){return!!(t&&t.orderId&&t.cartId)}))}},ga=function(){var t;return function(){return t=t||ya()}}(),ma=function(){var a=Ca().selectCartFeatureState,r=Aa().selectCartItemMutating,i=e.createSelector(a,(function(t){return t.cart})),o=e.createSelector(i,(function(t){return t.cart})),c=e.createSelector(i,(function(t){return t.resolved})),p=e.createSelector(i,(function(t){return t.loading})),f=e.createSelector(p,(function(e){return"Stable"!==e[t.DaffCartOperationType.Cart]})),d=e.createSelector(p,(function(e){return"Resolving"===e[t.DaffCartOperationType.Cart]})),u=e.createSelector(p,(function(e){return"Mutating"===e[t.DaffCartOperationType.Cart]})),l=e.createSelector(p,(function(e){return"Stable"!==e[t.DaffCartOperationType.BillingAddress]})),C=e.createSelector(p,(function(e){return"Resolving"===e[t.DaffCartOperationType.BillingAddress]})),h=e.createSelector(p,(function(e){return"Mutating"===e[t.DaffCartOperationType.BillingAddress]})),A=e.createSelector(p,(function(e){return"Stable"!==e[t.DaffCartOperationType.ShippingAddress]})),y=e.createSelector(p,(function(e){return"Resolving"===e[t.DaffCartOperationType.ShippingAddress]})),g=e.createSelector(p,(function(e){return"Mutating"===e[t.DaffCartOperationType.ShippingAddress]})),m=e.createSelector(p,(function(e){return"Stable"!==e[t.DaffCartOperationType.ShippingInformation]})),S=e.createSelector(p,(function(e){return"Resolving"===e[t.DaffCartOperationType.ShippingInformation]})),D=e.createSelector(p,(function(e){return"Mutating"===e[t.DaffCartOperationType.ShippingInformation]})),T=e.createSelector(p,(function(e){return"Stable"!==e[t.DaffCartOperationType.ShippingMethods]})),I=e.createSelector(p,(function(e){return"Resolving"===e[t.DaffCartOperationType.ShippingMethods]})),v=e.createSelector(p,(function(e){return"Stable"!==e[t.DaffCartOperationType.Payment]})),O=e.createSelector(p,(function(e){return"Resolving"===e[t.DaffCartOperationType.Payment]})),b=e.createSelector(p,(function(e){return"Mutating"===e[t.DaffCartOperationType.Payment]})),j=e.createSelector(p,(function(e){return"Stable"!==e[t.DaffCartOperationType.PaymentMethods]})),M=e.createSelector(p,(function(e){return"Resolving"===e[t.DaffCartOperationType.PaymentMethods]})),R=e.createSelector(p,(function(e){return"Stable"!==e[t.DaffCartOperationType.Item]})),P=e.createSelector(p,(function(e){return"Adding"===e[t.DaffCartOperationType.Item]})),F=e.createSelector(p,(function(e){return"Resolving"===e[t.DaffCartOperationType.Item]})),E=e.createSelector(p,(function(e){return"Stable"!==e[t.DaffCartOperationType.Coupon]})),L=e.createSelector(p,(function(e){return"Resolving"===e[t.DaffCartOperationType.Coupon]})),$=e.createSelector(p,(function(e){return"Mutating"===e[t.DaffCartOperationType.Coupon]})),w=e.createSelector(p,(function(t){return[f,l,A,m,T,v,j,E,R].map((function(e){return e.projector(t)})).reduce((function(t,e){return t||e}),!1)})),U=e.createSelector(p,(function(t){return[d,C,y,S,I,O,M,L,F].map((function(e){return e.projector(t)})).reduce((function(t,e){return t||e}),!1)})),_=e.createSelector(p,r,(function(t,e){return[u,h,g,D,b,$,P].map((function(e){return e.projector(t)})).reduce((function(t,e){return t||e}),!1)||e})),B=e.createSelector(i,(function(t){return t.errors})),x=e.createSelector(B,(function(e){return e[t.DaffCartOperationType.Cart]})),W=e.createSelector(B,(function(e){return e[t.DaffCartOperationType.BillingAddress]})),k=e.createSelector(B,(function(e){return e[t.DaffCartOperationType.ShippingAddress]})),z=e.createSelector(B,(function(e){return e[t.DaffCartOperationType.ShippingInformation]})),H=e.createSelector(B,(function(e){return e[t.DaffCartOperationType.ShippingMethods]})),q=e.createSelector(B,(function(e){return e[t.DaffCartOperationType.Payment]})),N=e.createSelector(B,(function(e){return e[t.DaffCartOperationType.PaymentMethods]})),V=e.createSelector(B,(function(e){return e[t.DaffCartOperationType.Item]})),Q=e.createSelector(B,(function(e){return e[t.DaffCartOperationType.Coupon]})),G=e.createSelector(o,(function(t){return t.id})),X=e.createSelector(o,(function(t){var e=t.totals.find((function(t){return t.name===n.DaffCartTotalTypeEnum.subtotalExcludingTax}));return e?e.value:null})),Y=e.createSelector(o,(function(t){var e=t.totals.find((function(t){return t.name===n.DaffCartTotalTypeEnum.grandTotal}));return e?e.value:null})),K=e.createSelector(o,(function(t){var e=t.totals.find((function(t){return t.name===n.DaffCartTotalTypeEnum.subtotalExcludingTax}));return e?e.value:null})),J=e.createSelector(o,(function(t){var e=t.totals.find((function(t){return t.name===n.DaffCartTotalTypeEnum.subtotalIncludingTax}));return e?e.value:null})),Z=e.createSelector(o,(function(t){var e=t.totals.find((function(t){return t.name===n.DaffCartTotalTypeEnum.subtotalWithDiscountExcludingTax}));return e?e.value:null})),tt=e.createSelector(o,(function(t){var e=t.totals.find((function(t){return t.name===n.DaffCartTotalTypeEnum.subtotalWithDiscountIncludingTax}));return e?e.value:null})),et=e.createSelector(o,(function(t){var e=t.totals.find((function(t){return t.name===n.DaffCartTotalTypeEnum.tax}));return e?e.value:null})),at=e.createSelector(o,(function(t){var e=t.totals.filter((function(t){return t.name===n.DaffCartTotalTypeEnum.discount}));return e||[]})),rt=e.createSelector(o,(function(t){var e=t.totals.find((function(t){return t.name===n.DaffCartTotalTypeEnum.shipping}));return e?e.value:null})),it=e.createSelector(o,(function(t){return t.coupons})),nt=e.createSelector(o,(function(t){return t.items})),ot=e.createSelector(o,(function(t){return t.items.reduce((function(t,e){return t||!e.in_stock}),!1)})),st=e.createSelector(o,(function(t){return t.billing_address})),ct=e.createSelector(o,(function(t){return t.shipping_address})),pt=e.createSelector(o,(function(t){return t.payment})),ft=e.createSelector(o,(function(t){return t.totals})),dt=e.createSelector(o,(function(t){return t.shipping_information})),ut=e.createSelector(o,(function(t){return t.available_shipping_methods})),lt=e.createSelector(o,(function(t){return t.available_payment_methods})),Ct=e.createSelector(o,(function(t){return!t||!t.items||0===t.items.length})),ht=e.createSelector(ct,st,(function(t,e){return s.daffComparePersonalAddresses(t,e)})),At=e.createSelector(st,(function(t){return!!t})),yt=e.createSelector(ct,(function(t){return!!t})),gt=e.createSelector(dt,(function(t){return!!t})),mt=e.createSelector(pt,(function(t){return!!t&&""!==t.method})),St=e.createSelector(Ct,At,yt,gt,mt,(function(t,e,a,r,i){return!t&&e&&a&&r&&i}));return{selectCartState:i,selectCartValue:o,selectCartResolved:c,selectCartLoadingObject:p,selectCartFeatureLoading:w,selectCartFeatureResolving:U,selectCartFeatureMutating:_,selectCartLoading:f,selectCartResolving:d,selectCartMutating:u,selectBillingAddressLoading:l,selectBillingAddressResolving:C,selectBillingAddressMutating:h,selectShippingAddressLoading:A,selectShippingAddressResolving:y,selectShippingAddressMutating:g,selectShippingInformationLoading:m,selectShippingInformationResolving:S,selectShippingInformationMutating:D,selectShippingMethodsLoading:T,selectShippingMethodsResolving:I,selectPaymentLoading:v,selectPaymentResolving:O,selectPaymentMutating:b,selectPaymentMethodsLoading:j,selectPaymentMethodsResolving:M,selectCouponLoading:E,selectCouponResolving:L,selectCouponMutating:$,selectItemLoading:R,selectItemAdding:P,selectItemResolving:F,selectCartErrorsObject:B,selectCartErrors:x,selectBillingAddressErrors:W,selectShippingAddressErrors:k,selectShippingInformationErrors:z,selectShippingMethodsErrors:H,selectPaymentErrors:q,selectPaymentMethodsErrors:N,selectItemErrors:V,selectCouponErrors:Q,selectCartId:G,selectCartSubtotal:X,selectCartGrandTotal:Y,selectCartSubtotalExcludingTax:K,selectCartSubtotalIncludingTax:J,selectCartSubtotalWithDiscountExcludingTax:Z,selectCartSubtotalWithDiscountIncludingTax:tt,selectCartDiscountTotals:at,selectCartTotalTax:et,selectCartShippingTotal:rt,selectCartCoupons:it,selectCartItems:nt,selectCartHasOutOfStockItems:ot,selectCartBillingAddress:st,selectCartShippingAddress:ct,selectCartPayment:pt,selectCartTotals:ft,selectCartShippingInformation:dt,selectCartAvailableShippingMethods:ut,selectCartAvailablePaymentMethods:lt,selectIsCartEmpty:Ct,selectIsBillingSameAsShipping:ht,selectHasBillingAddress:At,selectHasShippingAddress:yt,selectHasShippingMethod:gt,selectHasPaymentMethod:mt,selectCanPlaceOrder:St}},Sa=function(){var t;return function(){return t=t||ma()}}(),Da=function(){return Object.assign(Object.assign(Object.assign(Object.assign({},Ca()),ga()),Sa()),Aa())},Ta=Da,Ia=function(){var t;return function(){return t=t||Da()}},va=Ia(),Oa=new i.InjectionToken("DaffCartItemStateDebounceTime"),ba=function(e,a,r,i){var n=this;this.actions$=e,this.errorMatcher=a,this.driver=r,this.storage=i,this.update$=this.actions$.pipe(c.ofType(t.DaffCartAddressActionTypes.CartAddressUpdateAction),f.switchMap((function(t){return p.of(null).pipe(f.map((function(){return n.storage.getCartId()})),f.switchMap((function(e){return n.driver.update(e,t.payload)})),f.map((function(t){return new ft(t)})),f.catchError((function(t){return p.of(t instanceof o.DaffStorageServiceError?new C(n.errorMatcher(t)):new dt(n.errorMatcher(t)))})))})))};ba.decorators=[{type:i.Injectable}],ba.ctorParameters=function(){return[{type:c.Actions},{type:void 0,decorators:[{type:i.Inject,args:[n.DAFF_CART_ERROR_MATCHER]}]},{type:void 0,decorators:[{type:i.Inject,args:[d.DaffCartAddressDriver]}]},{type:n.DaffCartStorageService}]},ue([c.Effect(),le("design:type",Object)],ba.prototype,"update$",void 0);var ja=function(e,a,r,i){var n=this;this.actions$=e,this.errorMatcher=a,this.driver=r,this.storage=i,this.get$=this.actions$.pipe(c.ofType(t.DaffCartBillingAddressActionTypes.CartBillingAddressLoadAction),f.switchMap((function(t){return n.driver.get(n.storage.getCartId()).pipe(f.map((function(t){return new Y(t)})),f.catchError((function(t){return p.of(new K(n.errorMatcher(t)))})))}))),this.update$=this.actions$.pipe(c.ofType(t.DaffCartBillingAddressActionTypes.CartBillingAddressUpdateAction),f.switchMap((function(t){return n.driver.update(n.storage.getCartId(),t.payload).pipe(f.map((function(t){return new Z(t)})),f.catchError((function(t){return p.of(new tt(n.errorMatcher(t)))})))})))};ja.decorators=[{type:i.Injectable}],ja.ctorParameters=function(){return[{type:c.Actions},{type:void 0,decorators:[{type:i.Inject,args:[n.DAFF_CART_ERROR_MATCHER]}]},{type:void 0,decorators:[{type:i.Inject,args:[d.DaffCartBillingAddressDriver]}]},{type:n.DaffCartStorageService}]},ue([c.Effect(),le("design:type",Object)],ja.prototype,"get$",void 0),ue([c.Effect(),le("design:type",Object)],ja.prototype,"update$",void 0);var Ma=function(e,a,r,i){var n=this;this.actions$=e,this.errorMatcher=a,this.driver=r,this.storage=i,this.apply$=this.actions$.pipe(c.ofType(t.DaffCartCouponActionTypes.CartCouponApplyAction),f.switchMap((function(t){return p.of(null).pipe(f.map((function(){return n.storage.getCartId()})),f.switchMap((function(e){return n.driver.apply(e,t.payload)})),f.map((function(t){return new Yt(t)})),f.catchError((function(t){return p.of(t instanceof o.DaffStorageServiceError?new C(n.errorMatcher(t)):new Kt(n.errorMatcher(t)))})))}))),this.list$=this.actions$.pipe(c.ofType(t.DaffCartCouponActionTypes.CartCouponListAction),f.switchMap((function(t){return p.of(null).pipe(f.map((function(){return n.storage.getCartId()})),f.switchMap((function(t){return n.driver.list(t)})),f.map((function(t){return new Zt(t)})),f.catchError((function(t){return p.of(t instanceof o.DaffStorageServiceError?new C(n.errorMatcher(t)):new te(n.errorMatcher(t)))})))}))),this.remove$=this.actions$.pipe(c.ofType(t.DaffCartCouponActionTypes.CartCouponRemoveAction),f.switchMap((function(t){return p.of(null).pipe(f.map((function(){return n.storage.getCartId()})),f.switchMap((function(e){return n.driver.remove(e,t.payload)})),f.map((function(t){return new ae(t)})),f.catchError((function(t){return p.of(t instanceof o.DaffStorageServiceError?new C(n.errorMatcher(t)):new re(n.errorMatcher(t)))})))}))),this.removeAll$=this.actions$.pipe(c.ofType(t.DaffCartCouponActionTypes.CartCouponRemoveAllAction),f.switchMap((function(t){return p.of(null).pipe(f.map((function(){return n.storage.getCartId()})),f.switchMap((function(t){return n.driver.removeAll(t)})),f.map((function(t){return new ne(t)})),f.catchError((function(t){return p.of(t instanceof o.DaffStorageServiceError?new C(n.errorMatcher(t)):new oe(n.errorMatcher(t)))})))})))};Ma.decorators=[{type:i.Injectable}],Ma.ctorParameters=function(){return[{type:c.Actions},{type:void 0,decorators:[{type:i.Inject,args:[n.DAFF_CART_ERROR_MATCHER]}]},{type:void 0,decorators:[{type:i.Inject,args:[d.DaffCartCouponDriver]}]},{type:n.DaffCartStorageService}]},ue([c.Effect(),le("design:type",Object)],Ma.prototype,"apply$",void 0),ue([c.Effect(),le("design:type",Object)],Ma.prototype,"list$",void 0),ue([c.Effect(),le("design:type",Object)],Ma.prototype,"remove$",void 0),ue([c.Effect(),le("design:type",Object)],Ma.prototype,"removeAll$",void 0);var Ra=function(e,a,r,i,n){var o=this;this.actions$=e,this.errorMatcher=a,this.driver=r,this.storage=i,this.cartItemStateDebounceTime=n,this.list$=this.actions$.pipe(c.ofType(t.DaffCartItemActionTypes.CartItemListAction),f.switchMap((function(t){return o.driver.list(o.storage.getCartId()).pipe(f.map((function(t){return new L(t)})),f.catchError((function(t){return p.of(new $(o.errorMatcher(t)))})))}))),this.get$=this.actions$.pipe(c.ofType(t.DaffCartItemActionTypes.CartItemLoadAction),f.switchMap((function(t){return o.driver.get(o.storage.getCartId(),t.itemId).pipe(f.map((function(t){return new U(t)})),f.catchError((function(e){return p.of(new _(o.errorMatcher(e),t.itemId))})))}))),this.add$=this.actions$.pipe(c.ofType(t.DaffCartItemActionTypes.CartItemAddAction),f.switchMap((function(t){return o.driver.add(o.storage.getCartId(),t.input).pipe(f.map((function(t){return new z(t)})),f.catchError((function(t){return p.of(new H(o.errorMatcher(t)))})))}))),this.update$=this.actions$.pipe(c.ofType(t.DaffCartItemActionTypes.CartItemUpdateAction),f.mergeMap((function(t){return o.driver.update(o.storage.getCartId(),t.itemId,t.changes).pipe(f.map((function(e){return new x(e,t.itemId)})),f.catchError((function(e){return p.of(new W(o.errorMatcher(e),t.itemId))})))}))),this.resetCartItemStateAfterChange$=this.actions$.pipe(c.ofType(t.DaffCartItemActionTypes.CartItemAddSuccessAction,t.DaffCartItemActionTypes.CartItemUpdateSuccessAction,t.DaffCartItemActionTypes.CartItemUpdateAction),f.debounceTime(this.cartItemStateDebounceTime),c.ofType(t.DaffCartItemActionTypes.CartItemAddSuccessAction,t.DaffCartItemActionTypes.CartItemUpdateSuccessAction),f.mapTo(new Q)),this.delete$=this.actions$.pipe(c.ofType(t.DaffCartItemActionTypes.CartItemDeleteAction),f.mergeMap((function(t){return o.driver.delete(o.storage.getCartId(),t.itemId).pipe(f.map((function(t){return new N(t)})),f.catchError((function(e){return p.of(new V(o.errorMatcher(e),t.itemId))})))})))};Ra.decorators=[{type:i.Injectable}],Ra.ctorParameters=function(){return[{type:c.Actions},{type:void 0,decorators:[{type:i.Inject,args:[n.DAFF_CART_ERROR_MATCHER]}]},{type:void 0,decorators:[{type:i.Inject,args:[d.DaffCartItemDriver]}]},{type:n.DaffCartStorageService},{type:Number,decorators:[{type:i.Inject,args:[Oa]}]}]},ue([c.Effect(),le("design:type",Object)],Ra.prototype,"list$",void 0),ue([c.Effect(),le("design:type",Object)],Ra.prototype,"get$",void 0),ue([c.Effect(),le("design:type",Object)],Ra.prototype,"add$",void 0),ue([c.Effect(),le("design:type",Object)],Ra.prototype,"update$",void 0),ue([c.Effect(),le("design:type",Object)],Ra.prototype,"resetCartItemStateAfterChange$",void 0),ue([c.Effect(),le("design:type",Object)],Ra.prototype,"delete$",void 0);var Pa=function(e,a,r,i){var n=this;this.actions$=e,this.errorMatcher=a,this.driver=r,this.storage=i,this.placeOrder$=this.actions$.pipe(c.ofType(t.DaffCartOrderActionTypes.CartPlaceOrderAction),f.switchMap((function(t){return p.of(null).pipe(f.map((function(){return n.storage.getCartId()})),f.switchMap((function(e){return n.driver.placeOrder(e,t.payload)})),f.map((function(t){return new Vt(t)})),f.catchError((function(t){return p.of(t instanceof o.DaffStorageServiceError?new C(n.errorMatcher(t)):new Qt(n.errorMatcher(t)))})))}))),this.resetCart$=this.actions$.pipe(c.ofType(t.DaffCartOrderActionTypes.CartPlaceOrderSuccessAction),f.mapTo(new g))};Pa.decorators=[{type:i.Injectable}],Pa.ctorParameters=function(){return[{type:c.Actions},{type:void 0,decorators:[{type:i.Inject,args:[n.DAFF_CART_ERROR_MATCHER]}]},{type:void 0,decorators:[{type:i.Inject,args:[d.DaffCartOrderDriver]}]},{type:n.DaffCartStorageService}]},ue([c.Effect(),le("design:type",Object)],Pa.prototype,"placeOrder$",void 0),ue([c.Effect(),le("design:type",Object)],Pa.prototype,"resetCart$",void 0);var Fa=function(e,a,r,i){var n=this;this.actions$=e,this.errorMatcher=a,this.driver=r,this.storage=i,this.list$=this.actions$.pipe(c.ofType(t.DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadAction),f.switchMap((function(t){return n.driver.list(n.storage.getCartId()).pipe(f.map((function(t){return new zt(t)})),f.catchError((function(t){return p.of(new Ht(n.errorMatcher(t)))})))})))};Fa.decorators=[{type:i.Injectable}],Fa.ctorParameters=function(){return[{type:c.Actions},{type:void 0,decorators:[{type:i.Inject,args:[n.DAFF_CART_ERROR_MATCHER]}]},{type:void 0,decorators:[{type:i.Inject,args:[d.DaffCartPaymentMethodsDriver]}]},{type:n.DaffCartStorageService}]},ue([c.Effect(),le("design:type",Object)],Fa.prototype,"list$",void 0);var Ea=function(e,a,r,i){var n=this;this.actions$=e,this.errorMatcher=a,this.driver=r,this.storage=i,this.get$=this.actions$.pipe(c.ofType(t.DaffCartPaymentActionTypes.CartPaymentLoadAction),f.switchMap((function(t){return n.driver.get(n.storage.getCartId()).pipe(f.map((function(t){return new Mt(t)})),f.catchError((function(t){return p.of(new Rt(n.errorMatcher(t)))})))}))),this.update$=this.actions$.pipe(c.ofType(t.DaffCartPaymentActionTypes.CartPaymentUpdateAction),f.switchMap((function(t){return n.driver.update(n.storage.getCartId(),t.payload).pipe(f.map((function(t){return new Ft(t)})),f.catchError((function(t){return p.of(new Et(n.errorMatcher(t)))})))}))),this.updateWithBilling$=this.actions$.pipe(c.ofType(t.DaffCartPaymentActionTypes.CartPaymentUpdateWithBillingAction),f.switchMap((function(t){return n.driver.updateWithBilling(n.storage.getCartId(),t.payment,t.address).pipe(f.map((function(t){return new $t(t)})),f.catchError((function(t){return p.of(new wt(n.errorMatcher(t)))})))}))),this.remove$=this.actions$.pipe(c.ofType(t.DaffCartPaymentActionTypes.CartPaymentRemoveAction),f.switchMap((function(t){return n.driver.remove(n.storage.getCartId()).pipe(f.mapTo(new _t),f.catchError((function(t){return p.of(new Bt(n.errorMatcher(t)))})))})))};Ea.decorators=[{type:i.Injectable}],Ea.ctorParameters=function(){return[{type:c.Actions},{type:void 0,decorators:[{type:i.Inject,args:[n.DAFF_CART_ERROR_MATCHER]}]},{type:void 0,decorators:[{type:i.Inject,args:[d.DaffCartPaymentDriver]}]},{type:n.DaffCartStorageService}]},ue([c.Effect(),le("design:type",Object)],Ea.prototype,"get$",void 0),ue([c.Effect(),le("design:type",Object)],Ea.prototype,"update$",void 0),ue([c.Effect(),le("design:type",Object)],Ea.prototype,"updateWithBilling$",void 0),ue([c.Effect(),le("design:type",Object)],Ea.prototype,"remove$",void 0);var La=function(){function e(e,a,r,i){var s=this;this.actions$=e,this.errorMatcher=a,this.cartStorage=r,this.driver=i,this.onResolveCart=function(){return s.actions$.pipe(c.ofType(t.DaffCartActionTypes.ResolveCartAction),f.switchMap((function(){return p.of(null).pipe(f.map((function(){return s.cartStorage.getCartId()})),f.switchMap((function(t){return t?p.of({id:t}):s.driver.create()})),f.switchMap((function(t){var e=t.id;return s.driver.get(e)})),f.map((function(t){return new M(t)})),f.catchError((function(t){switch(!0){case t instanceof o.DaffServerSideStorageError:return p.of(new P(s.errorMatcher(new n.DaffCartServerSideResolutionError(t.message))));case t instanceof o.DaffStorageServiceError:return p.of(new R(s.errorMatcher(new n.DaffCartStorageResolutionError(t.message))));case t instanceof d.DaffCartNotFoundError:return s.driver.create().pipe(f.switchMap((function(t){var e=t.id;return s.driver.get(e)})),f.map((function(t){return new M(t)})),f.catchError((function(t){return p.of(new R(s.errorMatcher(new n.DaffCartNotFoundOrCreatedResolutionError(t.message))))})));case t instanceof o.DaffInheritableError||!!t.code:return p.of(new R(s.errorMatcher(t)));default:return p.of(new R(s.errorMatcher(new n.DaffCartResolutionError(t.message))))}})))})))}}return e.prototype.ngrxOnInitEffects=function(){return new j},e}();La.decorators=[{type:i.Injectable}],La.ctorParameters=function(){return[{type:c.Actions},{type:void 0,decorators:[{type:i.Inject,args:[n.DAFF_CART_ERROR_MATCHER]}]},{type:n.DaffCartStorageService},{type:void 0,decorators:[{type:i.Inject,args:[d.DaffCartDriver]}]}]},ue([c.Effect(),le("design:type",Object)],La.prototype,"onResolveCart",void 0);var $a=function(e,a,r,i){var n=this;this.actions$=e,this.errorMatcher=a,this.driver=r,this.storage=i,this.get$=this.actions$.pipe(c.ofType(t.DaffCartShippingAddressActionTypes.CartShippingAddressLoadAction),f.switchMap((function(t){return n.driver.get(n.storage.getCartId()).pipe(f.map((function(t){return new rt(t)})),f.catchError((function(t){return p.of(new it(n.errorMatcher(t)))})))}))),this.update$=this.actions$.pipe(c.ofType(t.DaffCartShippingAddressActionTypes.CartShippingAddressUpdateAction),f.switchMap((function(t){return n.driver.update(n.storage.getCartId(),t.payload).pipe(f.map((function(t){return new ot(t)})),f.catchError((function(t){return p.of(new st(n.errorMatcher(t)))})))})))};$a.decorators=[{type:i.Injectable}],$a.ctorParameters=function(){return[{type:c.Actions},{type:void 0,decorators:[{type:i.Inject,args:[n.DAFF_CART_ERROR_MATCHER]}]},{type:void 0,decorators:[{type:i.Inject,args:[d.DaffCartShippingAddressDriver]}]},{type:n.DaffCartStorageService}]},ue([c.Effect(),le("design:type",Object)],$a.prototype,"get$",void 0),ue([c.Effect(),le("design:type",Object)],$a.prototype,"update$",void 0);var wa=function(e,a,r,i){var n=this;this.actions$=e,this.errorMatcher=a,this.driver=r,this.storage=i,this.get$=this.actions$.pipe(c.ofType(t.DaffCartShippingInformationActionTypes.CartShippingInformationLoadAction),f.switchMap((function(t){return n.driver.get(n.storage.getCartId()).pipe(f.map((function(t){return new Ct(t)})),f.catchError((function(t){return p.of(new ht(n.errorMatcher(t)))})))}))),this.update$=this.actions$.pipe(c.ofType(t.DaffCartShippingInformationActionTypes.CartShippingInformationUpdateAction),f.switchMap((function(t){return n.driver.update(n.storage.getCartId(),t.payload).pipe(f.map((function(t){return new yt(t)})),f.catchError((function(t){return p.of(new gt(n.errorMatcher(t)))})))}))),this.delete$=this.actions$.pipe(c.ofType(t.DaffCartShippingInformationActionTypes.CartShippingInformationDeleteAction),f.switchMap((function(t){return n.driver.delete(n.storage.getCartId()).pipe(f.map((function(t){return new St(t)})),f.catchError((function(t){return p.of(new Dt(n.errorMatcher(t)))})))})))};wa.decorators=[{type:i.Injectable}],wa.ctorParameters=function(){return[{type:c.Actions},{type:void 0,decorators:[{type:i.Inject,args:[n.DAFF_CART_ERROR_MATCHER]}]},{type:void 0,decorators:[{type:i.Inject,args:[d.DaffCartShippingInformationDriver]}]},{type:n.DaffCartStorageService}]},ue([c.Effect(),le("design:type",Object)],wa.prototype,"get$",void 0),ue([c.Effect(),le("design:type",Object)],wa.prototype,"update$",void 0),ue([c.Effect(),le("design:type",Object)],wa.prototype,"delete$",void 0);var Ua=function(e,a,r,i){var n=this;this.actions$=e,this.errorMatcher=a,this.driver=r,this.storage=i,this.list$=this.actions$.pipe(c.ofType(t.DaffCartShippingMethodsActionTypes.CartShippingMethodsLoadAction),f.switchMap((function(t){return n.driver.list(n.storage.getCartId()).pipe(f.map((function(t){return new vt(t)})),f.catchError((function(t){return p.of(new Ot(n.errorMatcher(t)))})))})))};Ua.decorators=[{type:i.Injectable}],Ua.ctorParameters=function(){return[{type:c.Actions},{type:void 0,decorators:[{type:i.Inject,args:[n.DAFF_CART_ERROR_MATCHER]}]},{type:void 0,decorators:[{type:i.Inject,args:[d.DaffCartShippingMethodsDriver]}]},{type:n.DaffCartStorageService}]},ue([c.Effect(),le("design:type",Object)],Ua.prototype,"list$",void 0);var _a=function(e,a,r,i){var n=this;this.actions$=e,this.errorMatcher=a,this.driver=r,this.storage=i,this.create$=this.actions$.pipe(c.ofType(t.DaffCartActionTypes.CartCreateAction),f.switchMap((function(t){return n.driver.create().pipe(f.map((function(t){return new m(t)})),f.catchError((function(t){return p.of(new S(n.errorMatcher(t)))})))}))),this.storeId$=this.actions$.pipe(c.ofType(t.DaffCartActionTypes.CartCreateSuccessAction,t.DaffCartActionTypes.ResolveCartSuccessAction),f.switchMap((function(t){return p.of(null).pipe(f.tap((function(){n.storage.setCartId(t.payload.id)})),f.switchMapTo(p.EMPTY),f.catchError((function(t){return p.of(new C(n.errorMatcher(t)))})))}))),this.get$=this.actions$.pipe(c.ofType(t.DaffCartActionTypes.CartLoadAction),f.switchMap((function(t){return p.of(null).pipe(f.map((function(){return n.storage.getCartId()})),f.switchMap((function(t){return n.driver.get(t)})),f.map((function(t){return new A(t)})),f.catchError((function(t){return p.of(t instanceof o.DaffStorageServiceError?new C(n.errorMatcher(t)):new y(n.errorMatcher(t)))})))}))),this.addToCart$=this.actions$.pipe(c.ofType(t.DaffCartActionTypes.AddToCartAction),f.switchMap((function(t){return n.driver.addToCart(t.payload.productId,t.payload.qty).pipe(f.map((function(t){return new T(t)})),f.catchError((function(t){return p.of(new I(n.errorMatcher(t)))})))}))),this.clear$=this.actions$.pipe(c.ofType(t.DaffCartActionTypes.CartClearAction),f.switchMap((function(t){return p.of(null).pipe(f.map((function(){return n.storage.getCartId()})),f.switchMap((function(t){return n.driver.clear(t)})),f.map((function(t){return new O(t)})),f.catchError((function(t){return p.of(t instanceof o.DaffStorageServiceError?new C(n.errorMatcher(t)):new b(n.errorMatcher(t)))})))})))};_a.decorators=[{type:i.Injectable}],_a.ctorParameters=function(){return[{type:c.Actions},{type:void 0,decorators:[{type:i.Inject,args:[n.DAFF_CART_ERROR_MATCHER]}]},{type:void 0,decorators:[{type:i.Inject,args:[d.DaffCartDriver]}]},{type:n.DaffCartStorageService}]},ue([c.Effect(),le("design:type",Object)],_a.prototype,"create$",void 0),ue([c.Effect(),le("design:type",Object)],_a.prototype,"storeId$",void 0),ue([c.Effect(),le("design:type",Object)],_a.prototype,"get$",void 0),ue([c.Effect(),le("design:type",Object)],_a.prototype,"addToCart$",void 0),ue([c.Effect(),le("design:type",Object)],_a.prototype,"clear$",void 0);var Ba=new i.InjectionToken("DAFF_CART_REDUCERS",{factory:function(){return r.daffComposeReducers(he([e.combineReducers(da)],i.inject(la)))}}),xa=function(){};xa.decorators=[{type:i.NgModule,args:[{imports:[e.StoreModule.forFeature(ua,Ba),c.EffectsModule.forFeature([_a,Ra,ja,$a,ba,wa,Ua,Ea,Fa,Pa,Ma,La])],providers:[{provide:Oa,useValue:4e3}]}]}];var Wa=function(){function t(t,a){var r=this;this.store=t,this.paymentMethodMap=a;var i=va(),n=i.selectCartValue,o=i.selectCartResolved,s=i.selectCartLoadingObject,c=i.selectCartFeatureLoading,p=i.selectCartFeatureResolving,d=i.selectCartFeatureMutating,u=i.selectCartLoading,l=i.selectCartResolving,C=i.selectCartMutating,h=i.selectBillingAddressLoading,A=i.selectBillingAddressResolving,y=i.selectBillingAddressMutating,g=i.selectShippingAddressLoading,m=i.selectShippingAddressResolving,S=i.selectShippingAddressMutating,D=i.selectShippingInformationLoading,T=i.selectShippingInformationResolving,I=i.selectShippingInformationMutating,v=i.selectShippingMethodsLoading,O=i.selectShippingMethodsResolving,b=i.selectPaymentLoading,j=i.selectPaymentResolving,M=i.selectPaymentMutating,R=i.selectPaymentMethodsLoading,P=i.selectPaymentMethodsResolving,F=i.selectCouponLoading,E=i.selectCouponResolving,L=i.selectCouponMutating,$=i.selectItemLoading,w=i.selectItemAdding,U=i.selectItemResolving,_=i.selectCartItemMutating,B=i.selectCartErrorsObject,x=i.selectCartErrors,W=i.selectItemErrors,k=i.selectBillingAddressErrors,z=i.selectShippingAddressErrors,H=i.selectShippingInformationErrors,q=i.selectShippingMethodsErrors,N=i.selectPaymentErrors,V=i.selectPaymentMethodsErrors,Q=i.selectCouponErrors,G=i.selectCartId,X=i.selectCartSubtotal,Y=i.selectCartGrandTotal,K=i.selectCartSubtotalExcludingTax,J=i.selectCartSubtotalIncludingTax,Z=i.selectCartSubtotalWithDiscountExcludingTax,tt=i.selectCartSubtotalWithDiscountIncludingTax,et=i.selectCartDiscountTotals,at=i.selectCartTotalTax,rt=i.selectCartShippingTotal,it=i.selectCartCoupons,nt=i.selectCartItems,ot=i.selectCartHasOutOfStockItems,st=i.selectOutOfStockCartItems,ct=i.selectInStockCartItems,pt=i.selectCartItemEntities,ft=i.selectTotalNumberOfCartItems,dt=i.selectCartItemConfiguredAttributes,ut=i.selectCartItemCompositeOptions,lt=i.selectCartBillingAddress,Ct=i.selectCartShippingAddress,ht=i.selectCartPayment,At=i.selectCartTotals,yt=i.selectCartShippingInformation,gt=i.selectCartAvailableShippingMethods,mt=i.selectCartAvailablePaymentMethods,St=i.selectIsCartEmpty,Dt=i.selectIsBillingSameAsShipping,Tt=i.selectCartOrderLoading,It=i.selectCartOrderErrors,vt=i.selectCartOrderValue,Ot=i.selectCartOrderId,bt=i.selectCartOrderCartId,jt=i.selectHasOrderResult,Mt=i.selectIsCartItemOutOfStock,Rt=i.selectCartItemState,Pt=i.selectHasBillingAddress,Ft=i.selectHasShippingAddress,Et=i.selectHasShippingMethod,Lt=i.selectHasPaymentMethod,$t=i.selectCanPlaceOrder,wt=i.selectCartItemPrice,Ut=i.selectCartItemRowTotal,_t=i.selectCartItemQuantity,Bt=i.selectCartItemDiscounts,xt=i.selectCartItemTotalDiscount,Wt=i.selectCartItemErrors;this._selectCartItemConfiguredAttributes=dt,this._selectCartItemCompositeOptions=ut,this._selectIsCartItemOutOfStock=Mt,this._selectCartItemState=Rt,this._selectCartItemPrice=wt,this._selectCartItemQuantity=_t,this._selectCartItemRowTotal=Ut,this._selectCartItemDiscounts=Bt,this._selectCartItemTotalDiscount=xt,this._selectCartItemErrors=Wt,this.cart$=this.store.pipe(e.select(n)),this.resolved$=this.store.pipe(e.select(o)),this.loadingObject$=this.store.pipe(e.select(s)),this.featureLoading$=this.store.pipe(e.select(c)),this.featureResolving$=this.store.pipe(e.select(p)),this.featureMutating$=this.store.pipe(e.select(d)),this.loading$=this.store.pipe(e.select(u)),this.resolving$=this.store.pipe(e.select(l)),this.mutating$=this.store.pipe(e.select(C)),this.billingAddressLoading$=this.store.pipe(e.select(h)),this.billingAddressResolving$=this.store.pipe(e.select(A)),this.billingAddressMutating$=this.store.pipe(e.select(y)),this.shippingAddressLoading$=this.store.pipe(e.select(g)),this.shippingAddressResolving$=this.store.pipe(e.select(m)),this.shippingAddressMutating$=this.store.pipe(e.select(S)),this.shippingInformationLoading$=this.store.pipe(e.select(D)),this.shippingInformationResolving$=this.store.pipe(e.select(T)),this.shippingInformationMutating$=this.store.pipe(e.select(I)),this.shippingMethodsLoading$=this.store.pipe(e.select(v)),this.shippingMethodsResolving$=this.store.pipe(e.select(O)),this.paymentLoading$=this.store.pipe(e.select(b)),this.paymentResolving$=this.store.pipe(e.select(j)),this.paymentMutating$=this.store.pipe(e.select(M)),this.paymentMethodsLoading$=this.store.pipe(e.select(R)),this.paymentMethodsResolving$=this.store.pipe(e.select(P)),this.couponLoading$=this.store.pipe(e.select(F)),this.couponResolving$=this.store.pipe(e.select(E)),this.couponMutating$=this.store.pipe(e.select(L)),this.itemLoading$=this.store.pipe(e.select($)),this.itemAdding$=this.store.pipe(e.select(w)),this.itemResolving$=this.store.pipe(e.select(U)),this.itemMutating$=this.store.pipe(e.select(_)),this.errors$=this.store.pipe(e.select(B)),this.cartErrors$=this.store.pipe(e.select(x)),this.itemErrors$=this.store.pipe(e.select(W)),this.billingAddressErrors$=this.store.pipe(e.select(k)),this.shippingAddressErrors$=this.store.pipe(e.select(z)),this.shippingInformationErrors$=this.store.pipe(e.select(H)),this.shippingMethodsErrors$=this.store.pipe(e.select(q)),this.paymentErrors$=this.store.pipe(e.select(N)),this.paymentMethodsErrors$=this.store.pipe(e.select(V)),this.couponErrors$=this.store.pipe(e.select(Q)),this.id$=this.store.pipe(e.select(G)),this.subtotal$=this.store.pipe(e.select(X)),this.grandTotal$=this.store.pipe(e.select(Y)),this.subtotalExcludingTax$=this.store.pipe(e.select(K)),this.subtotalIncludingTax$=this.store.pipe(e.select(J)),this.subtotalWithDiscountExcludingTax$=this.store.pipe(e.select(Z)),this.subtotalWithDiscountIncludingTax$=this.store.pipe(e.select(tt)),this.discountTotals$=this.store.pipe(e.select(et)),this.totalTax$=this.store.pipe(e.select(at)),this.shippingTotal$=this.store.pipe(e.select(rt)),this.coupons$=this.store.pipe(e.select(it)),this.items$=this.store.pipe(e.select(nt)),this.totalItems$=this.store.pipe(e.select(ft)),this.hasOutOfStockItems$=this.store.pipe(e.select(ot)),this.outOfStockItems$=this.store.pipe(e.select(st)),this.inStockItems$=this.store.pipe(e.select(ct)),this.itemDictionary$=this.store.pipe(e.select(pt)),this.billingAddress$=this.store.pipe(e.select(lt)),this.shippingAddress$=this.store.pipe(e.select(Ct)),this.payment$=this.store.pipe(e.select(ht)),this.totals$=this.store.pipe(e.select(At)),this.shippingInformation$=this.store.pipe(e.select(yt)),this.availableShippingMethods$=this.store.pipe(e.select(gt)),this.availablePaymentMethods$=this.store.pipe(e.select(mt)),this.paymentId$=this.payment$.pipe(f.map((function(t){return t&&t.method?r.paymentMethodMap[t.method]:null}))),this.isCartEmpty$=this.store.pipe(e.select(St)),this.isBillingSameAsShipping$=this.store.pipe(e.select(Dt)),this.hasBillingAddress$=this.store.pipe(e.select(Pt)),this.hasShippingAddress$=this.store.pipe(e.select(Ft)),this.hasShippingMethod$=this.store.pipe(e.select(Et)),this.hasPaymentMethod$=this.store.pipe(e.select(Lt)),this.canPlaceOrder$=this.store.pipe(e.select($t)),this.orderResultLoading$=this.store.pipe(e.select(Tt)),this.orderResultErrors$=this.store.pipe(e.select(It)),this.orderResult$=this.store.pipe(e.select(vt)),this.orderResultId$=this.store.pipe(e.select(Ot)),this.orderResultCartId$=this.store.pipe(e.select(bt)),this.hasOrderResult$=this.store.pipe(e.select(jt))}return t.prototype.getConfiguredCartItemAttributes=function(t){return this.store.pipe(e.select(this._selectCartItemConfiguredAttributes(t)))},t.prototype.getCompositeCartItemOptions=function(t){return this.store.pipe(e.select(this._selectCartItemCompositeOptions(t)))},t.prototype.isCartItemOutOfStock=function(t){return this.store.pipe(e.select(this._selectIsCartItemOutOfStock(t)))},t.prototype.getCartItemState=function(t){return this.store.pipe(e.select(this._selectCartItemState(t)))},t.prototype.getCartItemPrice=function(t){return this.store.pipe(e.select(this._selectCartItemPrice(t)))},t.prototype.getCartItemQuantity=function(t){return this.store.pipe(e.select(this._selectCartItemQuantity(t)))},t.prototype.getCartItemRowTotal=function(t){return this.store.pipe(e.select(this._selectCartItemRowTotal(t)))},t.prototype.getCartItemDiscounts=function(t){return this.store.pipe(e.select(this._selectCartItemDiscounts(t)))},t.prototype.getCartItemTotalDiscount=function(t){return this.store.pipe(e.select(this._selectCartItemTotalDiscount(t)))},t.prototype.getCartItemErrors=function(t){return this.store.pipe(e.select(this._selectCartItemErrors(t)))},t.prototype.dispatch=function(t){this.store.dispatch(t)},t}();Wa.ɵprov=i.ɵɵdefineInjectable({factory:function(){return new Wa(i.ɵɵinject(e.Store),i.ɵɵinject(n.DaffCartPaymentMethodIdMap))},token:Wa,providedIn:"root"}),Wa.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],Wa.ctorParameters=function(){return[{type:e.Store},{type:Object,decorators:[{type:i.Inject,args:[n.DaffCartPaymentMethodIdMap]}]}]},t.DAFF_CART_EXTRA_REDUCERS=la,t.DAFF_CART_STORE_FEATURE_KEY=ua,t.DaffAddToCart=D,t.DaffAddToCartFailure=I,t.DaffAddToCartSuccess=T,t.DaffCartAddressUpdate=pt,t.DaffCartAddressUpdateFailure=dt,t.DaffCartAddressUpdateSuccess=ft,t.DaffCartBillingAddressLoad=X,t.DaffCartBillingAddressLoadFailure=K,t.DaffCartBillingAddressLoadSuccess=Y,t.DaffCartBillingAddressUpdate=J,t.DaffCartBillingAddressUpdateFailure=tt,t.DaffCartBillingAddressUpdateSuccess=Z,t.DaffCartClear=v,t.DaffCartClearFailure=b,t.DaffCartClearSuccess=O,t.DaffCartCouponApply=Xt,t.DaffCartCouponApplyFailure=Kt,t.DaffCartCouponApplySuccess=Yt,t.DaffCartCouponClearErrors=se,t.DaffCartCouponList=Jt,t.DaffCartCouponListFailure=te,t.DaffCartCouponListSuccess=Zt,t.DaffCartCouponRemove=ee,t.DaffCartCouponRemoveAll=ie,t.DaffCartCouponRemoveAllFailure=oe,t.DaffCartCouponRemoveAllSuccess=ne,t.DaffCartCouponRemoveFailure=re,t.DaffCartCouponRemoveSuccess=ae,t.DaffCartCreate=g,t.DaffCartCreateFailure=S,t.DaffCartCreateSuccess=m,t.DaffCartFacade=Wa,t.DaffCartItemAdd=k,t.DaffCartItemAddFailure=H,t.DaffCartItemAddSuccess=z,t.DaffCartItemDelete=q,t.DaffCartItemDeleteFailure=V,t.DaffCartItemDeleteSuccess=N,t.DaffCartItemList=E,t.DaffCartItemListFailure=$,t.DaffCartItemListSuccess=L,t.DaffCartItemLoad=w,t.DaffCartItemLoadFailure=_,t.DaffCartItemLoadSuccess=U,t.DaffCartItemStateDebounceTime=Oa,t.DaffCartItemStateReset=Q,t.DaffCartItemUpdate=B,t.DaffCartItemUpdateFailure=W,t.DaffCartItemUpdateSuccess=x,t.DaffCartLoad=h,t.DaffCartLoadFailure=y,t.DaffCartLoadSuccess=A,t.DaffCartPaymentLoad=jt,t.DaffCartPaymentLoadFailure=Rt,t.DaffCartPaymentLoadSuccess=Mt,t.DaffCartPaymentMethodAdd=xt,t.DaffCartPaymentMethodsLoad=kt,t.DaffCartPaymentMethodsLoadFailure=Ht,t.DaffCartPaymentMethodsLoadSuccess=zt,t.DaffCartPaymentRemove=Ut,t.DaffCartPaymentRemoveFailure=Bt,t.DaffCartPaymentRemoveSuccess=_t,t.DaffCartPaymentUpdate=Pt,t.DaffCartPaymentUpdateFailure=Et,t.DaffCartPaymentUpdateSuccess=Ft,t.DaffCartPaymentUpdateWithBilling=Lt,t.DaffCartPaymentUpdateWithBillingFailure=wt,t.DaffCartPaymentUpdateWithBillingSuccess=$t,t.DaffCartPlaceOrder=Nt,t.DaffCartPlaceOrderFailure=Qt,t.DaffCartPlaceOrderSuccess=Vt,t.DaffCartShippingAddressLoad=at,t.DaffCartShippingAddressLoadFailure=it,t.DaffCartShippingAddressLoadSuccess=rt,t.DaffCartShippingAddressUpdate=nt,t.DaffCartShippingAddressUpdateFailure=st,t.DaffCartShippingAddressUpdateSuccess=ot,t.DaffCartShippingInformationDelete=mt,t.DaffCartShippingInformationDeleteFailure=Dt,t.DaffCartShippingInformationDeleteSuccess=St,t.DaffCartShippingInformationLoad=lt,t.DaffCartShippingInformationLoadFailure=ht,t.DaffCartShippingInformationLoadSuccess=Ct,t.DaffCartShippingInformationUpdate=At,t.DaffCartShippingInformationUpdateFailure=gt,t.DaffCartShippingInformationUpdateSuccess=yt,t.DaffCartShippingMethodsLoad=It,t.DaffCartShippingMethodsLoadFailure=Ot,t.DaffCartShippingMethodsLoadSuccess=vt,t.DaffCartStateModule=xa,t.DaffCartStorageFailure=C,t.DaffResolveCart=j,t.DaffResolveCartFailure=R,t.DaffResolveCartServerSide=P,t.DaffResolveCartSuccess=M,t.daffCartOrderInitialState=Se,t.daffCartOrderReducer=De,t.daffCartProvideExtraReducers=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.map((function(t){return{provide:la,useValue:t,multi:!0}}))},t.daffCartReducer=fa,t.daffCartReducers=da,t.getDaffCartSelectors=va,t.initialState=Te,t.initializeLoadingSetter=Oe,t.ɵ0=Ta,t.ɵ1=Ia,t.ɵa=ca,t.ɵb=_e,t.ɵc=Re,t.ɵd=Ye,t.ɵe=ia,t.ɵf=ta,t.ɵg=Ne,t.ɵh=ke,t.ɵi=Le,t.ɵj=Ve,t.ɵk=fe,t.ɵl=Ba,t.ɵm=_a,t.ɵn=Ra,t.ɵo=ja,t.ɵp=$a,t.ɵq=ba,t.ɵr=wa,t.ɵs=Ua,t.ɵt=Ea,t.ɵu=Fa,t.ɵv=Pa,t.ɵw=Ma,t.ɵx=La,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=daffodil-cart-state.umd.min.js.map
|