ordering-ui-external 2.2.0 → 2.2.2

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.
Files changed (29) hide show
  1. package/_bundles/0.ordering-ui.da916a51373ae7f6cfcc.js +1 -0
  2. package/_bundles/{1.ordering-ui.bdd6b221a4d558a752fc.js → 1.ordering-ui.da916a51373ae7f6cfcc.js} +1 -1
  3. package/_bundles/{2.ordering-ui.bdd6b221a4d558a752fc.js → 2.ordering-ui.da916a51373ae7f6cfcc.js} +1 -1
  4. package/_bundles/4.ordering-ui.da916a51373ae7f6cfcc.js +1 -0
  5. package/_bundles/{5.ordering-ui.bdd6b221a4d558a752fc.js → 5.ordering-ui.da916a51373ae7f6cfcc.js} +1 -1
  6. package/_bundles/{6.ordering-ui.bdd6b221a4d558a752fc.js → 6.ordering-ui.da916a51373ae7f6cfcc.js} +1 -1
  7. package/_bundles/{7.ordering-ui.bdd6b221a4d558a752fc.js → 7.ordering-ui.da916a51373ae7f6cfcc.js} +2 -2
  8. package/_bundles/{7.ordering-ui.bdd6b221a4d558a752fc.js.LICENSE.txt → 7.ordering-ui.da916a51373ae7f6cfcc.js.LICENSE.txt} +0 -0
  9. package/_bundles/{8.ordering-ui.bdd6b221a4d558a752fc.js → 8.ordering-ui.da916a51373ae7f6cfcc.js} +1 -1
  10. package/_bundles/{9.ordering-ui.bdd6b221a4d558a752fc.js → 9.ordering-ui.da916a51373ae7f6cfcc.js} +1 -1
  11. package/_bundles/{ordering-ui.bdd6b221a4d558a752fc.js → ordering-ui.da916a51373ae7f6cfcc.js} +2 -2
  12. package/_bundles/{ordering-ui.bdd6b221a4d558a752fc.js.LICENSE.txt → ordering-ui.da916a51373ae7f6cfcc.js.LICENSE.txt} +0 -0
  13. package/_modules/themes/callcenterOriginal/src/components/Header/index.js +1 -1
  14. package/_modules/themes/five/src/components/Cart/index.js +2 -1
  15. package/_modules/themes/five/src/components/Header/index.js +3 -3
  16. package/_modules/themes/five/src/components/MultiCheckout/index.js +20 -8
  17. package/_modules/themes/five/src/components/MultiCheckout/styles.js +15 -13
  18. package/_modules/themes/five/src/components/OrderProgress/index.js +4 -3
  19. package/_modules/themes/five/src/components/PaymentOptions/index.js +1 -1
  20. package/package.json +2 -2
  21. package/src/themes/callcenterOriginal/src/components/Header/index.js +1 -2
  22. package/src/themes/five/src/components/Cart/index.js +5 -1
  23. package/src/themes/five/src/components/Header/index.js +2 -2
  24. package/src/themes/five/src/components/MultiCheckout/index.js +22 -2
  25. package/src/themes/five/src/components/MultiCheckout/styles.js +9 -0
  26. package/src/themes/five/src/components/OrderProgress/index.js +8 -2
  27. package/src/themes/five/src/components/PaymentOptions/index.js +1 -1
  28. package/_bundles/0.ordering-ui.bdd6b221a4d558a752fc.js +0 -1
  29. package/_bundles/4.ordering-ui.bdd6b221a4d558a752fc.js +0 -1
@@ -250,7 +250,7 @@ var Header = function Header(props) {
250
250
  }
251
251
  }, /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("p", null, userCustomer === null || userCustomer === void 0 ? void 0 : userCustomer.name, " ", userCustomer === null || userCustomer === void 0 ? void 0 : userCustomer.lastname)), /*#__PURE__*/_react.default.createElement("span", {
252
252
  ref: clearCustomer
253
- }, /*#__PURE__*/_react.default.createElement(_AiOutlineClose.default, null))), /*#__PURE__*/_react.default.createElement(_styles.Divider, null), onlineStatus && windowSize.width > 820 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !isCustomerMode && (isPreOrderSetting || (configState === null || configState === void 0 ? void 0 : (_configState$configs4 = configState.configs) === null || _configState$configs4 === void 0 ? void 0 : (_configState$configs5 = _configState$configs4.preorder_status_enabled) === null || _configState$configs5 === void 0 ? void 0 : _configState$configs5.value) === undefined) && /*#__PURE__*/_react.default.createElement(_styles.MomentMenu, {
253
+ }, /*#__PURE__*/_react.default.createElement(_AiOutlineClose.default, null))), onlineStatus && windowSize.width > 820 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (isPreOrderSetting || (configState === null || configState === void 0 ? void 0 : (_configState$configs4 = configState.configs) === null || _configState$configs4 === void 0 ? void 0 : (_configState$configs5 = _configState$configs4.preorder_status_enabled) === null || _configState$configs5 === void 0 ? void 0 : _configState$configs5.value) === undefined) && /*#__PURE__*/_react.default.createElement(_styles.MomentMenu, {
254
254
  onClick: (configState === null || configState === void 0 ? void 0 : (_configState$configs6 = configState.configs) === null || _configState$configs6 === void 0 ? void 0 : (_configState$configs7 = _configState$configs6.max_days_preorder) === null || _configState$configs7 === void 0 ? void 0 : _configState$configs7.value) === -1 || (configState === null || configState === void 0 ? void 0 : (_configState$configs8 = configState.configs) === null || _configState$configs8 === void 0 ? void 0 : (_configState$configs9 = _configState$configs8.max_days_preorder) === null || _configState$configs9 === void 0 ? void 0 : _configState$configs9.value) === 0 ? null : function () {
255
255
  return openModal('moment');
256
256
  }
@@ -69,6 +69,7 @@ var CartUI = function CartUI(props) {
69
69
  cartMulticart = props.cart,
70
70
  hideDeliveryFee = props.hideDeliveryFee,
71
71
  hideDriverTip = props.hideDriverTip,
72
+ hideCouponInput = props.hideCouponInput,
72
73
  businessConfigs = props.businessConfigs;
73
74
  var theme = (0, _styledComponents.useTheme)();
74
75
  var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
@@ -484,7 +485,7 @@ var CartUI = function CartUI(props) {
484
485
  return onRemoveOffer(offer === null || offer === void 0 ? void 0 : offer.id);
485
486
  }
486
487
  }))), /*#__PURE__*/_react.default.createElement("td", null, "- ", parsePrice(offer === null || offer === void 0 ? void 0 : (_offer$summary3 = offer.summary) === null || _offer$summary3 === void 0 ? void 0 : _offer$summary3.discount)));
487
- })), (orderState === null || orderState === void 0 ? void 0 : (_orderState$options4 = orderState.options) === null || _orderState$options4 === void 0 ? void 0 : _orderState$options4.type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.delivery_price) > 0 && (cart === null || cart === void 0 ? void 0 : cart.delivery_price_with_discount) >= 0 && !hideDeliveryFee && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('DELIVERY_FEE_AFTER_DISCOUNT', 'Delivery Fee After Discount')), /*#__PURE__*/_react.default.createElement("td", null, parsePrice(cart === null || cart === void 0 ? void 0 : cart.delivery_price_with_discount))), (cart === null || cart === void 0 ? void 0 : cart.driver_tip) > 0 && !hideDriverTip && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('DRIVER_TIP', 'Driver tip'), ' ', (cart === null || cart === void 0 ? void 0 : cart.driver_tip_rate) > 0 && parseInt(configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_t = configs.driver_tip_type) === null || _configs$driver_tip_t === void 0 ? void 0 : _configs$driver_tip_t.value, 10) === 2 && !parseInt(configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_u = configs.driver_tip_use_custom) === null || _configs$driver_tip_u === void 0 ? void 0 : _configs$driver_tip_u.value, 10) && /*#__PURE__*/_react.default.createElement("span", null, "(".concat((0, _utils.verifyDecimals)(cart === null || cart === void 0 ? void 0 : cart.driver_tip_rate, parseNumber), "%)"))), /*#__PURE__*/_react.default.createElement("td", null, parsePrice(cart === null || cart === void 0 ? void 0 : cart.driver_tip))))), isCouponEnabled && !isCartPending && (isCheckout || isCartPopover || isMultiCheckout) && !(isCheckout && isCartPopover) && !hideCartDiscount && /*#__PURE__*/_react.default.createElement(_styles.CouponContainer, null, /*#__PURE__*/_react.default.createElement(_CouponControl.CouponControl, {
488
+ })), (orderState === null || orderState === void 0 ? void 0 : (_orderState$options4 = orderState.options) === null || _orderState$options4 === void 0 ? void 0 : _orderState$options4.type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.delivery_price) > 0 && (cart === null || cart === void 0 ? void 0 : cart.delivery_price_with_discount) >= 0 && !hideDeliveryFee && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('DELIVERY_FEE_AFTER_DISCOUNT', 'Delivery Fee After Discount')), /*#__PURE__*/_react.default.createElement("td", null, parsePrice(cart === null || cart === void 0 ? void 0 : cart.delivery_price_with_discount))), (cart === null || cart === void 0 ? void 0 : cart.driver_tip) > 0 && !hideDriverTip && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('DRIVER_TIP', 'Driver tip'), ' ', (cart === null || cart === void 0 ? void 0 : cart.driver_tip_rate) > 0 && parseInt(configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_t = configs.driver_tip_type) === null || _configs$driver_tip_t === void 0 ? void 0 : _configs$driver_tip_t.value, 10) === 2 && !parseInt(configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_u = configs.driver_tip_use_custom) === null || _configs$driver_tip_u === void 0 ? void 0 : _configs$driver_tip_u.value, 10) && /*#__PURE__*/_react.default.createElement("span", null, "(".concat((0, _utils.verifyDecimals)(cart === null || cart === void 0 ? void 0 : cart.driver_tip_rate, parseNumber), "%)"))), /*#__PURE__*/_react.default.createElement("td", null, parsePrice(cart === null || cart === void 0 ? void 0 : cart.driver_tip))))), isCouponEnabled && !isCartPending && (isCheckout || isCartPopover || isMultiCheckout) && !(isCheckout && isCartPopover) && !hideCartDiscount && !hideCouponInput && /*#__PURE__*/_react.default.createElement(_styles.CouponContainer, null, /*#__PURE__*/_react.default.createElement(_CouponControl.CouponControl, {
488
489
  businessId: cart === null || cart === void 0 ? void 0 : cart.business_id,
489
490
  price: cart === null || cart === void 0 ? void 0 : cart.total
490
491
  })), !isStore && !isMultiCheckout && cart && (cart === null || cart === void 0 ? void 0 : cart.business_id) && (orderState === null || orderState === void 0 ? void 0 : (_orderState$options5 = orderState.options) === null || _orderState$options5 === void 0 ? void 0 : _orderState$options5.type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie4 = validationFields.fields) === null || _validationFields$fie4 === void 0 ? void 0 : (_validationFields$fie5 = _validationFields$fie4.checkout) === null || _validationFields$fie5 === void 0 ? void 0 : (_validationFields$fie6 = _validationFields$fie5.driver_tip) === null || _validationFields$fie6 === void 0 ? void 0 : _validationFields$fie6.enabled) && driverTipsOptions.length > 0 && !useKioskApp && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.DriverTipContainer, null, /*#__PURE__*/_react.default.createElement("h1", null, t('DRIVER_TIPS', 'Driver Tips')), /*#__PURE__*/_react.default.createElement("p", null, t('100%_OF_THE_TIP_YOUR_DRIVER', '100% of the tip goes to your driver')), /*#__PURE__*/_react.default.createElement(_DriverTips.DriverTips, {
@@ -51,7 +51,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
51
51
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
52
52
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
53
53
  var Header = function Header(props) {
54
- var _configState$configs, _configState$configs$, _configState$configs2, _configState$configs3, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _theme$header, _theme$header$compone, _theme$header$compone2, _customerState$user, _orderState$options3, _orderState$options3$, _theme$images, _theme$images$logos, _orderingTheme$my_pro, _orderingTheme$my_pro2, _orderingTheme$my_pro3, _orderingTheme$my_pro4, _orderingTheme$my_pro5, _orderingTheme$my_pro6, _theme$images2, _theme$images2$logos, _theme$images3, _theme$images3$logos, _orderingTheme$my_pro7, _orderingTheme$my_pro8, _orderingTheme$my_pro9, _orderingTheme$my_pro10, _orderingTheme$my_pro11, _orderingTheme$my_pro12, _theme$images4, _theme$images4$logos, _theme$images5, _theme$images5$logos, _orderState$options5, _orderState$options5$, _orderState$options6, _orderState$options6$, _configState$configs4, _configState$configs5, _configState$configs6, _configState$configs7, _configState$configs8, _configState$configs9, _orderState$options7, _orderState$options8, _configState$configs10, _configState$configs11, _theme$defaultLanguag2, _theme$defaultLanguag3, _orderState$options9, _orderState$options9$, _configState$configs12, _configState$configs13, _orderState$options10, _configState$configs14, _configState$configs15, _configState$configs16, _configState$configs17, _orderState$options11, _orderState$options12, _configState$configs18, _configState$configs19, _orderState$options13, _configState$configs20, _configState$configs21, _configState$configs22, _configState$configs23, _orderState$options14, _orderState$options15, _customerState$user2, _customerState$user3, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _theme$defaultLanguag7, _theme$defaultLanguag8, _theme$defaultLanguag9;
54
+ var _configState$configs, _configState$configs$, _configState$configs2, _configState$configs3, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _theme$header, _theme$header$compone, _theme$header$compone2, _customerState$user, _orderState$options3, _orderState$options3$, _theme$images, _theme$images$logos, _orderingTheme$theme2, _orderingTheme$theme3, _orderingTheme$theme4, _orderingTheme$theme5, _orderingTheme$theme6, _orderingTheme$theme7, _orderingTheme$theme8, _theme$images2, _theme$images2$logos, _theme$images3, _theme$images3$logos, _orderingTheme$theme9, _orderingTheme$theme10, _orderingTheme$theme11, _orderingTheme$theme12, _orderingTheme$theme13, _orderingTheme$theme14, _orderingTheme$theme15, _theme$images4, _theme$images4$logos, _theme$images5, _theme$images5$logos, _orderState$options5, _orderState$options5$, _orderState$options6, _orderState$options6$, _configState$configs4, _configState$configs5, _configState$configs6, _configState$configs7, _configState$configs8, _configState$configs9, _orderState$options7, _orderState$options8, _configState$configs10, _configState$configs11, _theme$defaultLanguag2, _theme$defaultLanguag3, _orderState$options9, _orderState$options9$, _configState$configs12, _configState$configs13, _orderState$options10, _configState$configs14, _configState$configs15, _configState$configs16, _configState$configs17, _orderState$options11, _orderState$options12, _configState$configs18, _configState$configs19, _orderState$options13, _configState$configs20, _configState$configs21, _configState$configs22, _configState$configs23, _orderState$options14, _orderState$options15, _customerState$user2, _customerState$user3, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _theme$defaultLanguag7, _theme$defaultLanguag8, _theme$defaultLanguag9;
55
55
  var isHome = props.isHome,
56
56
  location = props.location,
57
57
  isShowOrderOptions = props.isShowOrderOptions,
@@ -278,13 +278,13 @@ var Header = function Header(props) {
278
278
  alt: "Logotype",
279
279
  width: "170px",
280
280
  height: isChew ? '35px' : '45px',
281
- src: isChew ? theme === null || theme === void 0 ? void 0 : (_theme$images = theme.images) === null || _theme$images === void 0 ? void 0 : (_theme$images$logos = _theme$images.logos) === null || _theme$images$logos === void 0 ? void 0 : _theme$images$logos.chewLogo : (orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$my_pro = orderingTheme.my_products) === null || _orderingTheme$my_pro === void 0 ? void 0 : (_orderingTheme$my_pro2 = _orderingTheme$my_pro.components) === null || _orderingTheme$my_pro2 === void 0 ? void 0 : (_orderingTheme$my_pro3 = _orderingTheme$my_pro2.images) === null || _orderingTheme$my_pro3 === void 0 ? void 0 : (_orderingTheme$my_pro4 = _orderingTheme$my_pro3.components) === null || _orderingTheme$my_pro4 === void 0 ? void 0 : (_orderingTheme$my_pro5 = _orderingTheme$my_pro4.logo) === null || _orderingTheme$my_pro5 === void 0 ? void 0 : (_orderingTheme$my_pro6 = _orderingTheme$my_pro5.components) === null || _orderingTheme$my_pro6 === void 0 ? void 0 : _orderingTheme$my_pro6.image) || (theme === null || theme === void 0 ? void 0 : (_theme$images2 = theme.images) === null || _theme$images2 === void 0 ? void 0 : (_theme$images2$logos = _theme$images2.logos) === null || _theme$images2$logos === void 0 ? void 0 : _theme$images2$logos.logotype),
281
+ src: isChew ? theme === null || theme === void 0 ? void 0 : (_theme$images = theme.images) === null || _theme$images === void 0 ? void 0 : (_theme$images$logos = _theme$images.logos) === null || _theme$images$logos === void 0 ? void 0 : _theme$images$logos.chewLogo : (orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme2 = orderingTheme.theme) === null || _orderingTheme$theme2 === void 0 ? void 0 : (_orderingTheme$theme3 = _orderingTheme$theme2.my_products) === null || _orderingTheme$theme3 === void 0 ? void 0 : (_orderingTheme$theme4 = _orderingTheme$theme3.components) === null || _orderingTheme$theme4 === void 0 ? void 0 : (_orderingTheme$theme5 = _orderingTheme$theme4.images) === null || _orderingTheme$theme5 === void 0 ? void 0 : (_orderingTheme$theme6 = _orderingTheme$theme5.components) === null || _orderingTheme$theme6 === void 0 ? void 0 : (_orderingTheme$theme7 = _orderingTheme$theme6.logo) === null || _orderingTheme$theme7 === void 0 ? void 0 : (_orderingTheme$theme8 = _orderingTheme$theme7.components) === null || _orderingTheme$theme8 === void 0 ? void 0 : _orderingTheme$theme8.image) || (theme === null || theme === void 0 ? void 0 : (_theme$images2 = theme.images) === null || _theme$images2 === void 0 ? void 0 : (_theme$images2$logos = _theme$images2.logos) === null || _theme$images2$logos === void 0 ? void 0 : _theme$images2$logos.logotype),
282
282
  loading: "lazy"
283
283
  }), /*#__PURE__*/_react.default.createElement("img", {
284
284
  alt: "Isotype",
285
285
  width: isChew ? '70px' : '35px',
286
286
  height: isChew ? '20px' : '45px',
287
- src: isChew ? theme === null || theme === void 0 ? void 0 : (_theme$images3 = theme.images) === null || _theme$images3 === void 0 ? void 0 : (_theme$images3$logos = _theme$images3.logos) === null || _theme$images3$logos === void 0 ? void 0 : _theme$images3$logos.chewLogo : (orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$my_pro7 = orderingTheme.my_products) === null || _orderingTheme$my_pro7 === void 0 ? void 0 : (_orderingTheme$my_pro8 = _orderingTheme$my_pro7.components) === null || _orderingTheme$my_pro8 === void 0 ? void 0 : (_orderingTheme$my_pro9 = _orderingTheme$my_pro8.images) === null || _orderingTheme$my_pro9 === void 0 ? void 0 : (_orderingTheme$my_pro10 = _orderingTheme$my_pro9.components) === null || _orderingTheme$my_pro10 === void 0 ? void 0 : (_orderingTheme$my_pro11 = _orderingTheme$my_pro10.logo) === null || _orderingTheme$my_pro11 === void 0 ? void 0 : (_orderingTheme$my_pro12 = _orderingTheme$my_pro11.components) === null || _orderingTheme$my_pro12 === void 0 ? void 0 : _orderingTheme$my_pro12.image) || (isHome ? theme === null || theme === void 0 ? void 0 : (_theme$images4 = theme.images) === null || _theme$images4 === void 0 ? void 0 : (_theme$images4$logos = _theme$images4.logos) === null || _theme$images4$logos === void 0 ? void 0 : _theme$images4$logos.isotypeInvert : theme === null || theme === void 0 ? void 0 : (_theme$images5 = theme.images) === null || _theme$images5 === void 0 ? void 0 : (_theme$images5$logos = _theme$images5.logos) === null || _theme$images5$logos === void 0 ? void 0 : _theme$images5$logos.isotype),
287
+ src: isChew ? theme === null || theme === void 0 ? void 0 : (_theme$images3 = theme.images) === null || _theme$images3 === void 0 ? void 0 : (_theme$images3$logos = _theme$images3.logos) === null || _theme$images3$logos === void 0 ? void 0 : _theme$images3$logos.chewLogo : (orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme9 = orderingTheme.theme) === null || _orderingTheme$theme9 === void 0 ? void 0 : (_orderingTheme$theme10 = _orderingTheme$theme9.my_products) === null || _orderingTheme$theme10 === void 0 ? void 0 : (_orderingTheme$theme11 = _orderingTheme$theme10.components) === null || _orderingTheme$theme11 === void 0 ? void 0 : (_orderingTheme$theme12 = _orderingTheme$theme11.images) === null || _orderingTheme$theme12 === void 0 ? void 0 : (_orderingTheme$theme13 = _orderingTheme$theme12.components) === null || _orderingTheme$theme13 === void 0 ? void 0 : (_orderingTheme$theme14 = _orderingTheme$theme13.logo) === null || _orderingTheme$theme14 === void 0 ? void 0 : (_orderingTheme$theme15 = _orderingTheme$theme14.components) === null || _orderingTheme$theme15 === void 0 ? void 0 : _orderingTheme$theme15.image) || (isHome ? theme === null || theme === void 0 ? void 0 : (_theme$images4 = theme.images) === null || _theme$images4 === void 0 ? void 0 : (_theme$images4$logos = _theme$images4.logos) === null || _theme$images4$logos === void 0 ? void 0 : _theme$images4$logos.isotypeInvert : theme === null || theme === void 0 ? void 0 : (_theme$images5 = theme.images) === null || _theme$images5 === void 0 ? void 0 : (_theme$images5$logos = _theme$images5.logos) === null || _theme$images5$logos === void 0 ? void 0 : _theme$images5$logos.isotype),
288
288
  loading: "lazy"
289
289
  }))), isShowOrderOptions && !props.isCustomLayout && windowSize.width >= 576 && /*#__PURE__*/_react.default.createElement(_styles.Menu, {
290
290
  id: "center-side",
@@ -17,6 +17,7 @@ var _Confirm = require("../Confirm");
17
17
  var _UserDetails = require("../UserDetails");
18
18
  var _AddressDetails = require("../AddressDetails");
19
19
  var _MultiCartsPaymethodsAndWallets = require("../MultiCartsPaymethodsAndWallets");
20
+ var _CouponControl = require("../../../../../components/CouponControl");
20
21
  var _styles = require("./styles");
21
22
  var _DriverTips = require("../DriverTips");
22
23
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -41,7 +42,7 @@ var mapConfigs = {
41
42
  }
42
43
  };
43
44
  var MultiCheckoutUI = function MultiCheckoutUI(props) {
44
- var _paymethodSelected$pa, _Object$values, _configs$checkout_mul, _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _configs$multi_busine, _configs$driver_tip_o4, _configs$driver_tip_o5, _configs$google_maps_, _customerState$user, _validationFields$fie9, _validationFields$fie10, _validationFields$fie11, _configs$driver_tip_t, _configs$driver_tip_u, _configs$driver_tip_t2, _openCarts$, _openCarts$2, _configs$multi_busine4, _configs$multi_busine5;
45
+ var _paymethodSelected$pa, _Object$values, _configs$checkout_mul, _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _configs$multi_busine, _configs$driver_tip_o4, _configs$driver_tip_o5, _configs$google_maps_, _customerState$user, _validationFields$fie9, _validationFields$fie10, _validationFields$fie11, _configs$multi_busine2, _validationFields$fie12, _validationFields$fie13, _validationFields$fie14, _configs$driver_tip_t, _configs$driver_tip_u, _configs$driver_tip_t2, _openCarts$, _openCarts$2, _configs$multi_busine6, _configs$multi_busine7;
45
46
  var placing = props.placing,
46
47
  isCustomerMode = props.isCustomerMode,
47
48
  openCarts = props.openCarts,
@@ -197,7 +198,17 @@ var MultiCheckoutUI = function MultiCheckoutUI(props) {
197
198
  handleSelectWallet: handleSelectWallet,
198
199
  handlePaymethodDataChange: handlePaymethodDataChange,
199
200
  cartUuid: cartUuid
200
- })), isMultiDriverTips && (orderState === null || orderState === void 0 ? void 0 : orderState.options.type) === 1 && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie9 = validationFields.fields) === null || _validationFields$fie9 === void 0 ? void 0 : (_validationFields$fie10 = _validationFields$fie9.checkout) === null || _validationFields$fie10 === void 0 ? void 0 : (_validationFields$fie11 = _validationFields$fie10.driver_tip) === null || _validationFields$fie11 === void 0 ? void 0 : _validationFields$fie11.enabled) && openCarts.every(function (cart) {
201
+ })), (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie9 = validationFields.fields) === null || _validationFields$fie9 === void 0 ? void 0 : (_validationFields$fie10 = _validationFields$fie9.checkout) === null || _validationFields$fie10 === void 0 ? void 0 : (_validationFields$fie11 = _validationFields$fie10.coupon) === null || _validationFields$fie11 === void 0 ? void 0 : _validationFields$fie11.enabled) && openCarts.every(function (cart) {
202
+ return cart.business_id && cart.status !== 2;
203
+ }) && (configs === null || configs === void 0 ? void 0 : (_configs$multi_busine2 = configs.multi_business_checkout_coupon_input_style) === null || _configs$multi_busine2 === void 0 ? void 0 : _configs$multi_busine2.value) === 'group' && /*#__PURE__*/_react.default.createElement(_styles.DriverTipContainer, null, /*#__PURE__*/_react.default.createElement("h1", null, t('DISCOUNT_COUPON', 'Discount coupon')), /*#__PURE__*/_react.default.createElement(_styles.CouponContainer, null, /*#__PURE__*/_react.default.createElement(_CouponControl.CouponControl, {
204
+ carts: openCarts,
205
+ businessIds: openCarts.map(function (cart) {
206
+ return cart.business_id;
207
+ }),
208
+ price: openCarts.reduce(function (total, cart) {
209
+ return total + cart.total;
210
+ }, 0)
211
+ }))), isMultiDriverTips && (orderState === null || orderState === void 0 ? void 0 : orderState.options.type) === 1 && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie12 = validationFields.fields) === null || _validationFields$fie12 === void 0 ? void 0 : (_validationFields$fie13 = _validationFields$fie12.checkout) === null || _validationFields$fie13 === void 0 ? void 0 : (_validationFields$fie14 = _validationFields$fie13.driver_tip) === null || _validationFields$fie14 === void 0 ? void 0 : _validationFields$fie14.enabled) && openCarts.every(function (cart) {
201
212
  return cart.business_id && cart.status !== 2;
202
213
  }) && driverTipsOptions.length > 0 && /*#__PURE__*/_react.default.createElement(_styles.DriverTipContainer, null, /*#__PURE__*/_react.default.createElement("h1", null, t('DRIVER_TIPS', 'Driver Tips')), /*#__PURE__*/_react.default.createElement("p", null, t('100%_OF_THE_TIP_YOUR_DRIVER', '100% of the tip goes to your driver')), /*#__PURE__*/_react.default.createElement(_DriverTips.DriverTips, {
203
214
  isMulti: true,
@@ -211,22 +222,23 @@ var MultiCheckoutUI = function MultiCheckoutUI(props) {
211
222
  driverTip: parseInt(configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_t2 = configs.driver_tip_type) === null || _configs$driver_tip_t2 === void 0 ? void 0 : _configs$driver_tip_t2.value, 10) === 1 ? (_openCarts$ = openCarts[0]) === null || _openCarts$ === void 0 ? void 0 : _openCarts$.driver_tip : (_openCarts$2 = openCarts[0]) === null || _openCarts$2 === void 0 ? void 0 : _openCarts$2.driver_tip_rate,
212
223
  useOrderContext: true
213
224
  })))), /*#__PURE__*/_react.default.createElement(_styles.WrapperRightContainer, null, /*#__PURE__*/_react.default.createElement(_styles.CartContainer, null, /*#__PURE__*/_react.default.createElement(_styles.CartHeader, null, /*#__PURE__*/_react.default.createElement("h1", null, t('MOBILE_FRONT_YOUR_ORDER', 'Your order'))), openCarts.map(function (cart) {
214
- var _cart$products2, _configs$multi_busine2, _configs$multi_busine3;
225
+ var _configs$multi_busine3, _cart$products2, _configs$multi_busine4, _configs$multi_busine5;
215
226
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
216
227
  key: cart.uuid
217
228
  }, /*#__PURE__*/_react.default.createElement(_Cart.Cart, {
218
- isCartPending: (cart === null || cart === void 0 ? void 0 : cart.status) === 2,
219
229
  cart: cart,
220
230
  isMultiCheckout: true,
231
+ isCartPending: (cart === null || cart === void 0 ? void 0 : cart.status) === 2,
232
+ hideCouponInput: (configs === null || configs === void 0 ? void 0 : (_configs$multi_busine3 = configs.multi_business_checkout_coupon_input_style) === null || _configs$multi_busine3 === void 0 ? void 0 : _configs$multi_busine3.value) === 'group',
221
233
  isProducts: (cart === null || cart === void 0 ? void 0 : (_cart$products2 = cart.products) === null || _cart$products2 === void 0 ? void 0 : _cart$products2.length) || 0,
222
- hideDeliveryFee: (configs === null || configs === void 0 ? void 0 : (_configs$multi_busine2 = configs.multi_business_checkout_show_combined_delivery_fee) === null || _configs$multi_busine2 === void 0 ? void 0 : _configs$multi_busine2.value) === '1',
223
- hideDriverTip: (configs === null || configs === void 0 ? void 0 : (_configs$multi_busine3 = configs.multi_business_checkout_show_combined_driver_tip) === null || _configs$multi_busine3 === void 0 ? void 0 : _configs$multi_busine3.value) === '1'
234
+ hideDeliveryFee: (configs === null || configs === void 0 ? void 0 : (_configs$multi_busine4 = configs.multi_business_checkout_show_combined_delivery_fee) === null || _configs$multi_busine4 === void 0 ? void 0 : _configs$multi_busine4.value) === '1',
235
+ hideDriverTip: (configs === null || configs === void 0 ? void 0 : (_configs$multi_busine5 = configs.multi_business_checkout_show_combined_driver_tip) === null || _configs$multi_busine5 === void 0 ? void 0 : _configs$multi_busine5.value) === '1'
224
236
  }), /*#__PURE__*/_react.default.createElement(_styles.DriverTipDivider, null));
225
237
  }), walletCarts.length > 0 && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('WARNING_PARTIAL_WALLET_CARTS', 'Important: One or more carts can`t be completed due a partial payment with cash/points wallet and requires to be paid individually')), openCarts.length > 0 && /*#__PURE__*/_react.default.createElement(_styles.MultiCartPriceContainer, {
226
238
  totalFeeEnabled: totalFeeEnabled
227
- }, !!totalCartsFee && (configs === null || configs === void 0 ? void 0 : (_configs$multi_busine4 = configs.multi_business_checkout_show_combined_delivery_fee) === null || _configs$multi_busine4 === void 0 ? void 0 : _configs$multi_busine4.value) === '1' && /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("p", null, t('TOTAL_DELIVERY_FEE', 'Total delivery fee')), /*#__PURE__*/_react.default.createElement("p", null, parsePrice(totalCartsFee))), openCarts.reduce(function (sum, cart) {
239
+ }, !!totalCartsFee && (configs === null || configs === void 0 ? void 0 : (_configs$multi_busine6 = configs.multi_business_checkout_show_combined_delivery_fee) === null || _configs$multi_busine6 === void 0 ? void 0 : _configs$multi_busine6.value) === '1' && /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("p", null, t('TOTAL_DELIVERY_FEE', 'Total delivery fee')), /*#__PURE__*/_react.default.createElement("p", null, parsePrice(totalCartsFee))), openCarts.reduce(function (sum, cart) {
228
240
  return sum + (cart === null || cart === void 0 ? void 0 : cart.driver_tip);
229
- }, 0) > 0 && (configs === null || configs === void 0 ? void 0 : (_configs$multi_busine5 = configs.multi_business_checkout_show_combined_driver_tip) === null || _configs$multi_busine5 === void 0 ? void 0 : _configs$multi_busine5.value) === '1' && /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("p", null, t('DRIVER_TIP', 'Driver tip')), /*#__PURE__*/_react.default.createElement("p", null, parsePrice(openCarts.reduce(function (sum, cart) {
241
+ }, 0) > 0 && (configs === null || configs === void 0 ? void 0 : (_configs$multi_busine7 = configs.multi_business_checkout_show_combined_driver_tip) === null || _configs$multi_busine7 === void 0 ? void 0 : _configs$multi_busine7.value) === '1' && /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("p", null, t('DRIVER_TIP', 'Driver tip')), /*#__PURE__*/_react.default.createElement("p", null, parsePrice(openCarts.reduce(function (sum, cart) {
230
242
  return sum + (cart === null || cart === void 0 ? void 0 : cart.driver_tip);
231
243
  }, 0)))), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h4", null, t('TOTAL_FOR_ALL_CARTS', 'Total for all Carts')), /*#__PURE__*/_react.default.createElement("h4", null, parsePrice(totalCartsPrice))), /*#__PURE__*/_react.default.createElement("p", null, t('MULTI_CHECKOUT_DESCRIPTION', 'You will receive a receipt for each business. The payment is not combined between multiple stores. Each payment is processed by the store')))), /*#__PURE__*/_react.default.createElement(_styles.WrapperPlaceOrderButton, null, /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
232
244
  color: "primary",
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.WrapperUserDetails = exports.WrapperRightContainer = exports.WrapperPlaceOrderButton = exports.WrapperLeftContent = exports.WrapperLeftContainer = exports.WarningText = exports.UserDetailsContainer = exports.PaymentMethodContainer = exports.MultiCartPriceContainer = exports.DriverTipDivider = exports.DriverTipContainer = exports.Container = exports.CartHeader = exports.CartContainer = void 0;
6
+ exports.WrapperUserDetails = exports.WrapperRightContainer = exports.WrapperPlaceOrderButton = exports.WrapperLeftContent = exports.WrapperLeftContainer = exports.WarningText = exports.UserDetailsContainer = exports.PaymentMethodContainer = exports.MultiCartPriceContainer = exports.DriverTipDivider = exports.DriverTipContainer = exports.CouponContainer = exports.Container = exports.CartHeader = exports.CartContainer = void 0;
7
7
  var _styledComponents = _interopRequireDefault(require("styled-components"));
8
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
8
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15;
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
10
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
11
11
  var Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n flex-direction: column;\n min-height: auto;\n @media (min-width: 769px) {\n flex-direction: row;\n }\n @media (min-width: 993px) {\n min-height: calc(100vh - 337px);\n box-sizing: border-box;\n }\n"])));
@@ -17,36 +17,38 @@ var WrapperLeftContent = _styledComponents.default.div(_templateObject3 || (_tem
17
17
  return (_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.colors.darkTextColor;
18
18
  });
19
19
  exports.WrapperLeftContent = WrapperLeftContent;
20
- var WrapperRightContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n background: #F8F9FA;\n box-sizing: border-box;\n padding: 40px 20px;\n @media (min-width: 769px) {\n width: 45%;\n padding: 55px 40px;\n }\n"])));
20
+ var CouponContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n\n input, button {\n border-radius: 7.6px;\n }\n"])));
21
+ exports.CouponContainer = CouponContainer;
22
+ var WrapperRightContainer = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: 100%;\n background: #F8F9FA;\n box-sizing: border-box;\n padding: 40px 20px;\n @media (min-width: 769px) {\n width: 45%;\n padding: 55px 40px;\n }\n"])));
21
23
  exports.WrapperRightContainer = WrapperRightContainer;
22
- var PaymentMethodContainer = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n margin: 20px 0px 0px;\n h1 {\n margin: 0px;\n font-weight: 500;\n font-size: 20px;\n color: ", ";\n }\n"])), function (props) {
24
+ var PaymentMethodContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n margin: 20px 0px 0px;\n h1 {\n margin: 0px;\n font-weight: 500;\n font-size: 20px;\n color: ", ";\n }\n"])), function (props) {
23
25
  return props.theme.colors.darkTextColor;
24
26
  });
25
27
  exports.PaymentMethodContainer = PaymentMethodContainer;
26
- var DriverTipContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n flex-direction: column;\n margin: 20px 0px 0px;\n h1 {\n margin: 0px;\n font-weight: 500;\n font-size: 20px;\n color: ", ";\n }\n > p {\n margin: 0;\n font-size: 16px;\n color: #909BA9;\n }\n"])), function (props) {
28
+ var DriverTipContainer = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n flex-direction: column;\n margin: 20px 0px 0px;\n h1 {\n margin: 0px;\n font-weight: 500;\n font-size: 20px;\n color: ", ";\n }\n > p {\n margin: 0;\n font-size: 16px;\n color: #909BA9;\n }\n"])), function (props) {
27
29
  return props.theme.colors.darkTextColor;
28
30
  });
29
31
  exports.DriverTipContainer = DriverTipContainer;
30
- var CartContainer = (0, _styledComponents.default)(PaymentMethodContainer)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-bottom: 20px;\n"])));
32
+ var CartContainer = (0, _styledComponents.default)(PaymentMethodContainer)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin-bottom: 20px;\n"])));
31
33
  exports.CartContainer = CartContainer;
32
- var CartHeader = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n flex-direction: column;\n h1 {\n font-weight: 600;\n font-size: 20px;\n line-height: 30px;\n }\n h1 {\n margin: 5px 0px;\n }\n @media (min-width: 300px) {\n flex-direction: row;\n align-items: center;\n }\n"])));
34
+ var CartHeader = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n flex-direction: column;\n h1 {\n font-weight: 600;\n font-size: 20px;\n line-height: 30px;\n }\n h1 {\n margin: 5px 0px;\n }\n @media (min-width: 300px) {\n flex-direction: row;\n align-items: center;\n }\n"])));
33
35
  exports.CartHeader = CartHeader;
34
- var DriverTipDivider = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n height: 8px;\n width: calc(100% + 40px);\n margin-left: -20px;\n background: #E9ECEF;\n @media(min-width: 769px) {\n width: calc(100% + 80px);\n margin-left: -40px;\n }\n"])));
36
+ var DriverTipDivider = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n height: 8px;\n width: calc(100% + 40px);\n margin-left: -20px;\n background: #E9ECEF;\n @media(min-width: 769px) {\n width: calc(100% + 80px);\n margin-left: -40px;\n }\n"])));
35
37
  exports.DriverTipDivider = DriverTipDivider;
36
- var MultiCartPriceContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n margin-top: 38px;\n > div {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-top: ", ";\n margin-bottom: 5px;\n > h4 {\n font-size: 18px;\n margin: 0;\n }\n }\n > span {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 5px;\n }\n p {\n font-size: 14px;\n color: ", ";\n margin: 0;\n }\n"])), function (_ref) {
38
+ var MultiCartPriceContainer = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-top: 38px;\n > div {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-top: ", ";\n margin-bottom: 5px;\n > h4 {\n font-size: 18px;\n margin: 0;\n }\n }\n > span {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 5px;\n }\n p {\n font-size: 14px;\n color: ", ";\n margin: 0;\n }\n"])), function (_ref) {
37
39
  var totalFeeEnabled = _ref.totalFeeEnabled;
38
40
  return totalFeeEnabled ? '5px' : '38px';
39
41
  }, function (props) {
40
42
  return props.theme.colors.darkGray;
41
43
  });
42
44
  exports.MultiCartPriceContainer = MultiCartPriceContainer;
43
- var WrapperUserDetails = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n width: 100%;\n"])));
45
+ var WrapperUserDetails = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n width: 100%;\n"])));
44
46
  exports.WrapperUserDetails = WrapperUserDetails;
45
- var UserDetailsContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n margin-top: 25px;\n flex-wrap: wrap;\n padding-bottom: 20px;\n border-bottom: 1px solid #E9ECEF;\n"])));
47
+ var UserDetailsContainer = _styledComponents.default.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n margin-top: 25px;\n flex-wrap: wrap;\n padding-bottom: 20px;\n border-bottom: 1px solid #E9ECEF;\n"])));
46
48
  exports.UserDetailsContainer = UserDetailsContainer;
47
- var WrapperPlaceOrderButton = _styledComponents.default.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n justify-content: center;\n button {\n width: 100%;\n padding: 5px 20px;\n cursor: pointer;\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n }\n"])));
49
+ var WrapperPlaceOrderButton = _styledComponents.default.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n justify-content: center;\n button {\n width: 100%;\n padding: 5px 20px;\n cursor: pointer;\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n }\n"])));
48
50
  exports.WrapperPlaceOrderButton = WrapperPlaceOrderButton;
49
- var WarningText = _styledComponents.default.p(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n margin: 10px auto;\n text-align: center;\n color: ", ";\n font-size: 14px;\n"])), function (props) {
51
+ var WarningText = _styledComponents.default.p(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n margin: 10px auto;\n text-align: center;\n color: ", ";\n font-size: 14px;\n"])), function (props) {
50
52
  return props.theme.colors.danger500;
51
53
  });
52
54
  exports.WarningText = WarningText;
@@ -29,7 +29,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
29
29
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
30
30
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
31
31
  var OrderProgressUI = function OrderProgressUI(props) {
32
- var _orderList$orders, _lastOrder$business, _theme$images, _theme$images$dummies, _getOrderStatus, _getOrderStatus2;
32
+ var _theme$header, _theme$header$compone, _theme$header$compone2, _theme$header$compone3, _orderList$orders, _lastOrder$business, _theme$images, _theme$images$dummies, _getOrderStatus, _getOrderStatus2;
33
33
  var orderList = props.orderList,
34
34
  isCustomerMode = props.isCustomerMode;
35
35
  var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
@@ -48,6 +48,7 @@ var OrderProgressUI = function OrderProgressUI(props) {
48
48
  _useState2 = _slicedToArray(_useState, 2),
49
49
  lastOrder = _useState2[0],
50
50
  setLastOrder = _useState2[1];
51
+ var isChew = (theme === null || theme === void 0 ? void 0 : (_theme$header = theme.header) === null || _theme$header === void 0 ? void 0 : (_theme$header$compone = _theme$header.components) === null || _theme$header$compone === void 0 ? void 0 : (_theme$header$compone2 = _theme$header$compone.layout) === null || _theme$header$compone2 === void 0 ? void 0 : (_theme$header$compone3 = _theme$header$compone2.type) === null || _theme$header$compone3 === void 0 ? void 0 : _theme$header$compone3.toLowerCase()) === 'chew';
51
52
  var handleGoToPage = function handleGoToPage(index) {
52
53
  events.emit('go_to_page', {
53
54
  page: index,
@@ -71,7 +72,7 @@ var OrderProgressUI = function OrderProgressUI(props) {
71
72
  })), !(orderList !== null && orderList !== void 0 && orderList.loading) && (orderList === null || orderList === void 0 ? void 0 : (_orderList$orders = orderList.orders) === null || _orderList$orders === void 0 ? void 0 : _orderList$orders.length) > 0 && lastOrder && /*#__PURE__*/_react.default.createElement(_styles.OrderProgressWrapper, {
72
73
  isChew: props.isChew
73
74
  }, /*#__PURE__*/_react.default.createElement(_styles.OrderProgressContainer, null, /*#__PURE__*/_react.default.createElement(_styles.OrderInfoWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.ProgressLogo, {
74
- bgimage: optimizeImage((lastOrder === null || lastOrder === void 0 ? void 0 : (_lastOrder$business = lastOrder.business) === null || _lastOrder$business === void 0 ? void 0 : _lastOrder$business.logo) || ((_theme$images = theme.images) === null || _theme$images === void 0 ? void 0 : (_theme$images$dummies = _theme$images.dummies) === null || _theme$images$dummies === void 0 ? void 0 : _theme$images$dummies.businessLogo), 'h_91,c_limit')
75
+ bgimage: (orderList === null || orderList === void 0 ? void 0 : orderList.orders.length) === 1 ? optimizeImage((lastOrder === null || lastOrder === void 0 ? void 0 : (_lastOrder$business = lastOrder.business) === null || _lastOrder$business === void 0 ? void 0 : _lastOrder$business.logo) || ((_theme$images = theme.images) === null || _theme$images === void 0 ? void 0 : (_theme$images$dummies = _theme$images.dummies) === null || _theme$images$dummies === void 0 ? void 0 : _theme$images$dummies.businessLogo), 'h_91,c_limit') : isChew ? theme.images.logos.chewLogoReverse : theme.images.logos.logotype
75
76
  }), /*#__PURE__*/_react.default.createElement(_styles.ProgressDescriptionWrapper, null, /*#__PURE__*/_react.default.createElement("h2", null, t('ORDER_IN_PROGRESS', 'Order in progress')), /*#__PURE__*/_react.default.createElement("p", null, t('RESTAURANT_PREPARING_YOUR_ORDER', 'The restaurant is preparing your order')), /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
76
77
  color: "primaryContrast",
77
78
  naked: true,
@@ -98,7 +99,7 @@ var OrderProgress = function OrderProgress(props) {
98
99
  useDefualtSessionManager: true,
99
100
  paginationSettings: {
100
101
  initialPage: 1,
101
- pageSize: 1,
102
+ pageSize: 10,
102
103
  controlType: 'infinity'
103
104
  }
104
105
  });
@@ -64,7 +64,7 @@ var getPayIcon = function getPayIcon(method) {
64
64
  case 1:
65
65
  return /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Cash, null);
66
66
  case 22:
67
- return /*#__PURE__*/_react.default.createElement(_BilStripe.default, null);
67
+ return /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.CreditCard, null);
68
68
  case 28:
69
69
  return /*#__PURE__*/_react.default.createElement(_FaCcStripe.default, null);
70
70
  case 31:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-external",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "description": "Ordering UI Components",
5
5
  "main": "./_modules/index.js",
6
6
  "exports": {
@@ -86,7 +86,7 @@
86
86
  "libphonenumber-js": "^1.9.4",
87
87
  "lodash": "^4.17.19",
88
88
  "moment": "^2.29.4",
89
- "ordering-components-external": "2.1.0",
89
+ "ordering-components-external": "2.1.1",
90
90
  "polished": "^3.6.6",
91
91
  "react-bootstrap-icons": "^1.7.2",
92
92
  "react-calendar": "^3.3.1",
@@ -213,10 +213,9 @@ export const Header = (props) => {
213
213
  </span>
214
214
  </CustomerInfo>
215
215
  )}
216
- <Divider />
217
216
  {onlineStatus && windowSize.width > 820 && (
218
217
  <>
219
- {!isCustomerMode && (isPreOrderSetting || configState?.configs?.preorder_status_enabled?.value === undefined) && (
218
+ {(isPreOrderSetting || configState?.configs?.preorder_status_enabled?.value === undefined) && (
220
219
  <MomentMenu
221
220
  onClick={configState?.configs?.max_days_preorder?.value === -1 || configState?.configs?.max_days_preorder?.value === 0
222
221
  ? null
@@ -70,6 +70,7 @@ const CartUI = (props) => {
70
70
  cart: cartMulticart,
71
71
  hideDeliveryFee,
72
72
  hideDriverTip,
73
+ hideCouponInput,
73
74
  businessConfigs
74
75
  } = props
75
76
 
@@ -467,7 +468,10 @@ const CartUI = (props) => {
467
468
  )}
468
469
  </tbody>
469
470
  </table>
470
- {isCouponEnabled && !isCartPending && ((isCheckout || isCartPopover || isMultiCheckout) && !(isCheckout && isCartPopover)) && !hideCartDiscount && (
471
+ {isCouponEnabled && !isCartPending &&
472
+ ((isCheckout || isCartPopover || isMultiCheckout) &&
473
+ !(isCheckout && isCartPopover)) && !hideCartDiscount && !hideCouponInput &&
474
+ (
471
475
  <CouponContainer>
472
476
  <CouponControl
473
477
  businessId={cart?.business_id}
@@ -224,8 +224,8 @@ export const Header = (props) => {
224
224
  onClick={() => handleGoToPage({ page: orderState?.options?.address?.location && !isCustomerMode ? 'search' : 'home' })}
225
225
  isChew={isChew}
226
226
  >
227
- <img alt='Logotype' width='170px' height={isChew ? '35px' : '45px'} src={isChew ? theme?.images?.logos?.chewLogo : orderingTheme?.my_products?.components?.images?.components?.logo?.components?.image || theme?.images?.logos?.logotype} loading='lazy' />
228
- <img alt='Isotype' width={isChew ? '70px' : '35px'} height={isChew ? '20px' : '45px'} src={isChew ? theme?.images?.logos?.chewLogo : orderingTheme?.my_products?.components?.images?.components?.logo?.components?.image || (isHome ? theme?.images?.logos?.isotypeInvert : theme?.images?.logos?.isotype)} loading='lazy' />
227
+ <img alt='Logotype' width='170px' height={isChew ? '35px' : '45px'} src={isChew ? theme?.images?.logos?.chewLogo : orderingTheme?.theme?.my_products?.components?.images?.components?.logo?.components?.image || theme?.images?.logos?.logotype} loading='lazy' />
228
+ <img alt='Isotype' width={isChew ? '70px' : '35px'} height={isChew ? '20px' : '45px'} src={isChew ? theme?.images?.logos?.chewLogo : orderingTheme?.theme?.my_products?.components?.images?.components?.logo?.components?.image || (isHome ? theme?.images?.logos?.isotypeInvert : theme?.images?.logos?.isotype)} loading='lazy' />
229
229
  </LogoHeader>
230
230
  </LeftHeader>
231
231
  {isShowOrderOptions && !props.isCustomLayout && windowSize.width >= 576 && (
@@ -20,6 +20,7 @@ import { Alert } from '../Confirm'
20
20
  import { UserDetails } from '../UserDetails'
21
21
  import { AddressDetails } from '../AddressDetails'
22
22
  import { MultiCartsPaymethodsAndWallets } from '../MultiCartsPaymethodsAndWallets'
23
+ import { CouponControl } from '../../../../../components/CouponControl'
23
24
 
24
25
  import {
25
26
  Container,
@@ -35,7 +36,8 @@ import {
35
36
  PaymentMethodContainer,
36
37
  WrapperPlaceOrderButton,
37
38
  WarningText,
38
- DriverTipContainer
39
+ DriverTipContainer,
40
+ CouponContainer
39
41
  } from './styles'
40
42
  import { DriverTips } from '../DriverTips'
41
43
 
@@ -209,6 +211,23 @@ const MultiCheckoutUI = (props) => {
209
211
  />
210
212
  </PaymentMethodContainer>
211
213
 
214
+ {
215
+ validationFields?.fields?.checkout?.coupon?.enabled &&
216
+ openCarts.every(cart => cart.business_id && cart.status !== 2) &&
217
+ configs?.multi_business_checkout_coupon_input_style?.value === 'group' && (
218
+ <DriverTipContainer>
219
+ <h1>{t('DISCOUNT_COUPON', 'Discount coupon')}</h1>
220
+ <CouponContainer>
221
+ <CouponControl
222
+ carts={openCarts}
223
+ businessIds={openCarts.map(cart => cart.business_id)}
224
+ price={openCarts.reduce((total, cart) => total + cart.total, 0)}
225
+ />
226
+ </CouponContainer>
227
+ </DriverTipContainer>
228
+ )
229
+ }
230
+
212
231
  {
213
232
  isMultiDriverTips &&
214
233
  orderState?.options.type === 1 &&
@@ -244,9 +263,10 @@ const MultiCheckoutUI = (props) => {
244
263
  {openCarts.map(cart => (
245
264
  <React.Fragment key={cart.uuid}>
246
265
  <Cart
247
- isCartPending={cart?.status === 2}
248
266
  cart={cart}
249
267
  isMultiCheckout
268
+ isCartPending={cart?.status === 2}
269
+ hideCouponInput={configs?.multi_business_checkout_coupon_input_style?.value === 'group'}
250
270
  isProducts={cart?.products?.length || 0}
251
271
  hideDeliveryFee={configs?.multi_business_checkout_show_combined_delivery_fee?.value === '1'}
252
272
  hideDriverTip={configs?.multi_business_checkout_show_combined_driver_tip?.value === '1'}
@@ -36,6 +36,15 @@ export const WrapperLeftContent = styled.div`
36
36
  margin-bottom: 5px;
37
37
  }
38
38
  `
39
+
40
+ export const CouponContainer = styled.div`
41
+ width: 100%;
42
+
43
+ input, button {
44
+ border-radius: 7.6px;
45
+ }
46
+ `
47
+
39
48
  export const WrapperRightContainer = styled.div`
40
49
  width: 100%;
41
50
  background: #F8F9FA;
@@ -36,6 +36,8 @@ const OrderProgressUI = (props) => {
36
36
  const [events] = useEvent()
37
37
  const [lastOrder, setLastOrder] = useState(null)
38
38
 
39
+ const isChew = theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
40
+
39
41
  const handleGoToPage = (index) => {
40
42
  events.emit('go_to_page', { page: index, params: { orderId: lastOrder?.uuid } })
41
43
  }
@@ -58,7 +60,11 @@ const OrderProgressUI = (props) => {
58
60
  <OrderProgressWrapper isChew={props.isChew}>
59
61
  <OrderProgressContainer>
60
62
  <OrderInfoWrapper>
61
- <ProgressLogo bgimage={optimizeImage(lastOrder?.business?.logo || theme.images?.dummies?.businessLogo, 'h_91,c_limit')} />
63
+ <ProgressLogo
64
+ bgimage={orderList?.orders.length === 1
65
+ ? optimizeImage(lastOrder?.business?.logo || theme.images?.dummies?.businessLogo, 'h_91,c_limit')
66
+ : isChew ? theme.images.logos.chewLogoReverse : theme.images.logos.logotype}
67
+ />
62
68
  <ProgressDescriptionWrapper>
63
69
  <h2>{t('ORDER_IN_PROGRESS', 'Order in progress')}</h2>
64
70
  <p>{t('RESTAURANT_PREPARING_YOUR_ORDER', 'The restaurant is preparing your order')}</p>
@@ -114,7 +120,7 @@ export const OrderProgress = (props) => {
114
120
  useDefualtSessionManager: true,
115
121
  paginationSettings: {
116
122
  initialPage: 1,
117
- pageSize: 1,
123
+ pageSize: 10,
118
124
  controlType: 'infinity'
119
125
  }
120
126
  }
@@ -48,7 +48,7 @@ const getPayIcon = (method) => {
48
48
  case 1:
49
49
  return <Cash />
50
50
  case 22:
51
- return <BilStripe />
51
+ return <CreditCard />
52
52
  case 28:
53
53
  return <FaCcStripe />
54
54
  case 31:
@@ -1 +0,0 @@
1
- (window.webpackJsonpOrderingUI=window.webpackJsonpOrderingUI||[]).push([[0],{630:function(t,n,e){"use strict";function i(t,n){var e,i;return"boolean"==typeof(null==n?void 0:n.enabled)?n.enabled:null===(i=null===(e=null==t?void 0:t.__default)||void 0===e?void 0:e.enabled)||void 0===i||i}e.d(n,"a",(function(){return i}))},734:function(t,n,e){"use strict";e.r(n),e.d(n,"LegacyDestination",(function(){return I})),e.d(n,"ajsDestinations",(function(){return S}));var i=e(4),r=e(57),o=e(65),a=e(29),s=e(37),c=e(106),u=e(98),d=e(630),l=e(198),h=e(203),v=e(182),f=e(72),b=e(199),p=e(88),g=e(111);function y(t){return t.toLowerCase().replace(".","").replace(/\s+/g,"-")}function j(t,n){return void 0===n&&(n=!1),n?btoa(t).replace(/=/g,""):void 0}function O(t,n,e,r){return Object(i.b)(this,void 0,void 0,(function(){var o,a,s,c,u,d;return Object(i.d)(this,(function(l){switch(l.label){case 0:o=y(n),a=j(o,r),s=Object(p.b)(),c="".concat(s,"/integrations/").concat(null!=a?a:o,"/").concat(e,"/").concat(null!=a?a:o,".dynamic.js.gz"),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,Object(g.a)(c)];case 2:return l.sent(),function(t,n,e){var r,o;try{var a=(null!==(o=null===(r=null===window||void 0===window?void 0:window.performance)||void 0===r?void 0:r.getEntriesByName(t,"resource"))&&void 0!==o?o:[])[0];a&&n.stats.gauge("legacy_destination_time",Math.round(a.duration),Object(i.f)([e],a.duration<100?["cached"]:[],!0))}catch(t){}}(c,t,n),[3,4];case 3:throw u=l.sent(),t.stats.gauge("legacy_destination_time",-1,["plugin:".concat(n),"failed"]),u;case 4:return d=window["".concat(o,"Deps")],[4,Promise.all(d.map((function(t){return Object(g.a)(s+t+".gz")})))];case 5:return l.sent(),window["".concat(o,"Loader")](),[2,window["".concat(o,"Integration")]]}}))}))}function m(t){return"object"===Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}var w=function(t,n){var e,i=n.type,r=n.bundlingStatus,o=n.versionSettings,a="unbundled"!==r&&("browser"===i||(null===(e=null==o?void 0:o.componentTypes)||void 0===e?void 0:e.includes("browser")));return!t.startsWith("Segment")&&"Iterable"!==t&&a},_=function(t,n){var e=!1===n.All&&void 0===n[t];return!1===n[t]||e};function k(t,n){return Object(i.b)(this,void 0,void 0,(function(){var e,r=this;return Object(i.d)(this,(function(s){switch(s.label){case 0:return e=[],Object(o.a)()?[2,n]:[4,Object(h.a)((function(){return n.length>0&&Object(o.b)()}),(function(){return Object(i.b)(r,void 0,void 0,(function(){var r,o;return Object(i.d)(this,(function(i){switch(i.label){case 0:return(r=n.pop())?[4,Object(u.a)(r,t)]:[2];case 1:return o=i.sent(),o instanceof a.a||e.push(r),[2]}}))}))}))];case 1:return s.sent(),e.map((function(t){return n.pushWithBackoff(t)})),[2,n]}}))}))}var I=function(){function t(t,n,e,r,o){void 0===e&&(e={}),this.options={},this.type="destination",this.middleware=[],this._ready=!1,this._initialized=!1,this.flushing=!1,this.name=t,this.version=n,this.settings=Object(i.a)({},e),this.disableAutoISOConversion=r.disableAutoISOConversion||!1,this.integrationSource=o,this.settings.type&&"browser"===this.settings.type&&delete this.settings.type,this.options=r,this.buffer=r.disableClientPersistence?new v.b(4,[]):new f.a(4,"dest-".concat(t)),this.scheduleFlush()}return t.prototype.isLoaded=function(){return this._ready},t.prototype.ready=function(){var t;return null!==(t=this.onReady)&&void 0!==t?t:Promise.resolve()},t.prototype.load=function(t,n){var e;return Object(i.b)(this,void 0,void 0,(function(){var r,o,a=this;return Object(i.d)(this,(function(i){switch(i.label){case 0:return this._ready||void 0!==this.onReady?[2]:null===(e=this.integrationSource)||void 0===e?[3,1]:(o=e,[3,3]);case 1:return[4,O(t,this.name,this.version,this.options.obfuscate)];case 2:o=i.sent(),i.label=3;case 3:r=o,this.integration=function(t,n,e){var i;"Integration"in t?(t({user:function(){return e.user()},addIntegration:function(){}}),i=t.Integration):i=t;var r=new i(n);return r.analytics=e,r}(r,this.settings,n),this.onReady=new Promise((function(t){a.integration.once("ready",(function(){a._ready=!0,t(!0)}))})),this.onInitialize=new Promise((function(t){a.integration.on("initialize",(function(){a._initialized=!0,t(!0)}))}));try{t.stats.increment("analytics_js.integration.invoke",1,["method:initialize","integration_name:".concat(this.name)]),this.integration.initialize()}catch(n){throw t.stats.increment("analytics_js.integration.invoke.error",1,["method:initialize","integration_name:".concat(this.name)]),n}return[2]}}))}))},t.prototype.unload=function(t,n){return function(t,n,e){return Object(i.b)(this,void 0,void 0,(function(){var r,o,a,s;return Object(i.d)(this,(function(i){return r=Object(p.b)(),o=y(t),a=j(t,e),s="".concat(r,"/integrations/").concat(null!=a?a:o,"/").concat(n,"/").concat(null!=a?a:o,".dynamic.js.gz"),[2,Object(g.b)(s)]}))}))}(this.name,this.version,this.options.obfuscate)},t.prototype.addMiddleware=function(){for(var t,n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];this.middleware=(t=this.middleware).concat.apply(t,n)},t.prototype.shouldBuffer=function(t){return"page"!==t.event.type&&(Object(o.a)()||!1===this._ready||!1===this._initialized)},t.prototype.send=function(t,n,e){var r,o;return Object(i.b)(this,void 0,void 0,(function(){var a,c,u,l,h,v;return Object(i.d)(this,(function(f){switch(f.label){case 0:if(this.shouldBuffer(t))return this.buffer.push(t),this.scheduleFlush(),[2,t];if(a=null===(o=null===(r=this.options)||void 0===r?void 0:r.plan)||void 0===o?void 0:o.track,c=t.event.event,a&&c&&"Segment.io"!==this.name){if(u=a[c],!Object(d.a)(a,u))return t.updateEvent("integrations",Object(i.a)(Object(i.a)({},t.event.integrations),{All:!1,"Segment.io":!0})),t.cancel(new s.a({retry:!1,reason:"Event ".concat(c," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"})),[2,t];if(t.updateEvent("integrations",Object(i.a)(Object(i.a)({},t.event.integrations),null==u?void 0:u.integrations)),(null==u?void 0:u.enabled)&&!1===(null==u?void 0:u.integrations[this.name]))return t.cancel(new s.a({retry:!1,reason:"Event ".concat(c," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"})),[2,t]}return[4,Object(b.applyDestinationMiddleware)(this.name,t.event,this.middleware)];case 1:if(null===(l=f.sent()))return[2,t];h=new n(l,{traverse:!this.disableAutoISOConversion}),t.stats.increment("analytics_js.integration.invoke",1,["method:".concat(e),"integration_name:".concat(this.name)]),f.label=2;case 2:return f.trys.push([2,5,,6]),this.integration?[4,this.integration.invoke.call(this.integration,e,h)]:[3,4];case 3:f.sent(),f.label=4;case 4:return[3,6];case 5:throw v=f.sent(),t.stats.increment("analytics_js.integration.invoke.error",1,["method:".concat(e),"integration_name:".concat(this.name)]),v;case 6:return[2,t]}}))}))},t.prototype.track=function(t){return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(n){return[2,this.send(t,r.Track,"track")]}))}))},t.prototype.page=function(t){var n;return Object(i.b)(this,void 0,void 0,(function(){var e=this;return Object(i.d)(this,(function(i){return(null===(n=this.integration)||void 0===n?void 0:n._assumesPageview)&&!this._initialized&&this.integration.initialize(),[2,this.onInitialize.then((function(){return e.send(t,r.Page,"page")}))]}))}))},t.prototype.identify=function(t){return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(n){return[2,this.send(t,r.Identify,"identify")]}))}))},t.prototype.alias=function(t){return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(n){return[2,this.send(t,r.Alias,"alias")]}))}))},t.prototype.group=function(t){return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(n){return[2,this.send(t,r.Group,"group")]}))}))},t.prototype.scheduleFlush=function(){var t=this;this.flushing||setTimeout((function(){return Object(i.b)(t,void 0,void 0,(function(){var t;return Object(i.d)(this,(function(n){switch(n.label){case 0:return this.flushing=!0,t=this,[4,k(this,this.buffer)];case 1:return t.buffer=n.sent(),this.flushing=!1,this.buffer.todo>0&&this.scheduleFlush(),[2]}}))}))}),5e3*Math.random())},t}();function S(t,n,e,r,o){var a,s;if(void 0===n&&(n={}),void 0===e&&(e={}),Object(c.b)())return[];t.plan&&((e=null!=e?e:{}).plan=t.plan);var u=null!==(s=null===(a=t.middlewareSettings)||void 0===a?void 0:a.routingRules)&&void 0!==s?s:[],d=t.integrations,h=e.integrations,v=Object(l.a)(t,null!=e?e:{}),f=null==o?void 0:o.reduce((function(t,n){var e;return Object(i.a)(Object(i.a)({},t),((e={})[function(t){return("Integration"in t?t.Integration:t).prototype.name}(n)]=n,e))}),{}),b=new Set(Object(i.f)(Object(i.f)([],Object.keys(d).filter((function(t){return w(t,d[t])})),!0),Object.keys(f||{}).filter((function(t){return m(d[t])||m(null==h?void 0:h[t])})),!0));return Array.from(b).filter((function(t){return!_(t,n)})).map((function(t){var n=function(t){var n,e,i,r;return null!==(r=null!==(e=null===(n=null==t?void 0:t.versionSettings)||void 0===n?void 0:n.override)&&void 0!==e?e:null===(i=null==t?void 0:t.versionSettings)||void 0===i?void 0:i.version)&&void 0!==r?r:"latest"}(d[t]),i=new I(t,n,v[t],e,null==f?void 0:f[t]);return u.filter((function(n){return n.destinationName===t})).length>0&&r&&i.addMiddleware(r),i}))}}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonpOrderingUI=window.webpackJsonpOrderingUI||[]).push([[4],{735:function(r,a,e){"use strict";function s(r,a){return Object.keys(a).reduce((function(e,s){s.startsWith(r)&&(e[s.substr(r.length)]=a[s]);return e}),{})}e.r(a),e.d(a,"queryString",(function(){return i}));var t=e(197);function i(r,a){var e=document.createElement("a");e.href=a;var i=e.search.slice(1).split("&").reduce((function(r,a){var e=a.split("="),s=e[0],i=e[1];return r[s]=Object(t.a)(i),r}),{}),n=[],u=i.ajs_uid,c=i.ajs_event;if(i.ajs_aid){var d=Array.isArray(i.ajs_aid)?i.ajs_aid[0]:i.ajs_aid;r.setAnonymousId(d)}if(u){var j=Array.isArray(i.ajs_uid)?i.ajs_uid[0]:i.ajs_uid,_=s("ajs_trait_",i);n.push(r.identify(j,_))}if(c){var o=Array.isArray(i.ajs_event)?i.ajs_event[0]:i.ajs_event,f=s("ajs_prop_",i);n.push(r.track(o,f))}return Promise.all(n)}}}]);