@pisell/pisellos 2.1.172 → 2.1.174

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 (238) hide show
  1. package/dist/apis/picoding.d.ts +0 -0
  2. package/dist/apis/picoding.js +1 -0
  3. package/dist/index.d.ts +0 -1
  4. package/dist/index.js +0 -1
  5. package/dist/model/strategy/adapter/promotion/evaluator.js +26 -99
  6. package/dist/model/strategy/adapter/promotion/index.js +9 -0
  7. package/dist/model/strategy/adapter/walletPass/evaluator.d.ts +2 -2
  8. package/dist/model/strategy/adapter/walletPass/evaluator.js +12 -63
  9. package/dist/model/strategy/adapter/walletPass/locales.js +3 -12
  10. package/dist/model/strategy/engine.d.ts +5 -18
  11. package/dist/model/strategy/engine.js +45 -145
  12. package/dist/model/strategy/type.d.ts +0 -17
  13. package/dist/model/strategy/type.js +0 -4
  14. package/dist/modules/Cart/types.d.ts +0 -2
  15. package/dist/modules/Cart/utils/cartProduct.js +25 -56
  16. package/dist/modules/Cart/utils/changePrice.js +16 -9
  17. package/dist/modules/Discount/availability.d.ts +7 -0
  18. package/dist/modules/Discount/availability.js +52 -0
  19. package/dist/modules/Discount/entitlementPass.d.ts +34 -0
  20. package/dist/modules/Discount/entitlementPass.js +147 -0
  21. package/dist/modules/Discount/entitlementState.d.ts +8 -0
  22. package/dist/modules/Discount/entitlementState.js +205 -0
  23. package/dist/modules/Discount/index.d.ts +12 -3
  24. package/dist/modules/Discount/index.js +211 -17
  25. package/dist/modules/Discount/types.d.ts +42 -22
  26. package/dist/modules/Holder/index.d.ts +48 -0
  27. package/dist/modules/Holder/index.js +640 -0
  28. package/dist/modules/Holder/types.d.ts +123 -0
  29. package/dist/modules/Holder/types.js +1 -0
  30. package/dist/modules/Holder/utils.d.ts +13 -0
  31. package/dist/modules/Holder/utils.js +34 -0
  32. package/dist/modules/OpenData/index.d.ts +24 -0
  33. package/dist/modules/OpenData/index.js +173 -0
  34. package/dist/modules/OpenData/types.d.ts +73 -0
  35. package/dist/modules/OpenData/types.js +1 -0
  36. package/dist/modules/OpenData/utils.d.ts +2 -0
  37. package/dist/modules/OpenData/utils.js +75 -0
  38. package/dist/modules/Order/index.d.ts +67 -1
  39. package/dist/modules/Order/index.js +923 -30
  40. package/dist/modules/Order/types.d.ts +176 -12
  41. package/dist/modules/Order/types.js +2 -0
  42. package/dist/modules/Order/utils.d.ts +128 -0
  43. package/dist/modules/Order/utils.js +621 -5
  44. package/dist/modules/Payment/index.d.ts +1 -2
  45. package/dist/modules/Payment/index.js +7 -10
  46. package/dist/modules/Payment/utils.js +0 -3
  47. package/dist/modules/Payment/walletpass.d.ts +0 -23
  48. package/dist/modules/Payment/walletpass.js +95 -191
  49. package/dist/modules/Product/types.d.ts +7 -0
  50. package/dist/modules/Product/utils.js +2 -2
  51. package/dist/modules/ProductList/index.d.ts +1 -1
  52. package/dist/modules/ProductList/index.js +4 -3
  53. package/dist/modules/Quotation/index.d.ts +48 -0
  54. package/dist/modules/Quotation/index.js +248 -0
  55. package/dist/modules/Quotation/types.d.ts +42 -0
  56. package/dist/modules/Quotation/types.js +1 -0
  57. package/dist/modules/Rules/entitlementLines.d.ts +8 -0
  58. package/dist/modules/Rules/entitlementLines.js +157 -0
  59. package/dist/modules/Rules/index.d.ts +17 -11
  60. package/dist/modules/Rules/index.js +495 -726
  61. package/dist/modules/Rules/types.d.ts +2 -4
  62. package/dist/modules/SalesSummary/index.d.ts +63 -0
  63. package/dist/modules/SalesSummary/index.js +174 -0
  64. package/dist/modules/SalesSummary/types.d.ts +60 -0
  65. package/dist/modules/SalesSummary/types.js +1 -0
  66. package/dist/modules/SalesSummary/utils.d.ts +30 -0
  67. package/dist/modules/SalesSummary/utils.js +480 -0
  68. package/dist/modules/ScanOrderLogger/index.d.ts +23 -0
  69. package/dist/modules/ScanOrderLogger/index.js +174 -0
  70. package/dist/modules/ScanOrderLogger/providers/feishu.d.ts +2 -0
  71. package/dist/modules/ScanOrderLogger/providers/feishu.js +221 -0
  72. package/dist/modules/ScanOrderLogger/providers/grafana.d.ts +2 -0
  73. package/dist/modules/ScanOrderLogger/providers/grafana.js +50 -0
  74. package/dist/modules/ScanOrderLogger/types.d.ts +53 -0
  75. package/dist/modules/ScanOrderLogger/types.js +1 -0
  76. package/dist/modules/Schedule/getDateIsInSchedule.js +11 -18
  77. package/dist/modules/Schedule/utils.d.ts +1 -1
  78. package/dist/modules/Summary/types.d.ts +0 -2
  79. package/dist/modules/Summary/utils.d.ts +3 -9
  80. package/dist/modules/Summary/utils.js +67 -57
  81. package/dist/modules/index.d.ts +5 -0
  82. package/dist/modules/index.js +6 -1
  83. package/dist/plugins/window.d.ts +3 -2
  84. package/dist/solution/BookingByStep/index.d.ts +17 -3
  85. package/dist/solution/BookingByStep/index.js +322 -247
  86. package/dist/solution/BookingByStep/types.d.ts +4 -1
  87. package/dist/solution/BookingByStep/types.js +7 -1
  88. package/dist/solution/BookingByStep/utils/timeslots.d.ts +3 -1
  89. package/dist/solution/BookingByStep/utils/timeslots.js +19 -12
  90. package/dist/solution/Checkout/index.js +0 -2
  91. package/dist/solution/ScanOrder/index.d.ts +158 -0
  92. package/dist/solution/ScanOrder/index.js +3474 -0
  93. package/dist/solution/ScanOrder/types.d.ts +307 -0
  94. package/dist/solution/ScanOrder/types.js +35 -0
  95. package/dist/solution/ScanOrder/utils.d.ts +172 -0
  96. package/dist/solution/ScanOrder/utils.js +796 -0
  97. package/dist/solution/ShopDiscount/index.d.ts +6 -2
  98. package/dist/solution/ShopDiscount/index.js +194 -110
  99. package/dist/solution/ShopDiscount/types.d.ts +1 -1
  100. package/dist/solution/ShopDiscount/types.js +1 -2
  101. package/dist/solution/ShopDiscount/utils.d.ts +1 -0
  102. package/dist/solution/ShopDiscount/utils.js +52 -27
  103. package/dist/solution/VenueBooking/index.d.ts +225 -0
  104. package/dist/solution/VenueBooking/index.js +3749 -0
  105. package/dist/solution/VenueBooking/sales-section-4-annotated.json +343 -0
  106. package/dist/solution/VenueBooking/types.d.ts +156 -0
  107. package/dist/solution/VenueBooking/types.js +21 -0
  108. package/dist/solution/VenueBooking/utils/dateSummary.d.ts +11 -0
  109. package/dist/solution/VenueBooking/utils/dateSummary.js +104 -0
  110. package/dist/solution/VenueBooking/utils/resource.d.ts +14 -0
  111. package/dist/solution/VenueBooking/utils/resource.js +131 -0
  112. package/dist/solution/VenueBooking/utils/slotMerge.d.ts +38 -0
  113. package/dist/solution/VenueBooking/utils/slotMerge.js +239 -0
  114. package/dist/solution/VenueBooking/utils/timeSlot.d.ts +32 -0
  115. package/dist/solution/VenueBooking/utils/timeSlot.js +453 -0
  116. package/dist/solution/VenueBooking/utils.d.ts +1 -0
  117. package/dist/solution/VenueBooking/utils.js +1 -0
  118. package/dist/solution/index.d.ts +2 -0
  119. package/dist/solution/index.js +3 -1
  120. package/dist/types/index.d.ts +1 -0
  121. package/lib/apis/picoding.d.ts +0 -0
  122. package/lib/apis/picoding.js +0 -0
  123. package/lib/index.d.ts +0 -1
  124. package/lib/index.js +1 -3
  125. package/lib/model/strategy/adapter/promotion/evaluator.js +8 -57
  126. package/lib/model/strategy/adapter/promotion/index.js +49 -0
  127. package/lib/model/strategy/adapter/walletPass/evaluator.d.ts +2 -2
  128. package/lib/model/strategy/adapter/walletPass/evaluator.js +7 -36
  129. package/lib/model/strategy/adapter/walletPass/locales.js +3 -12
  130. package/lib/model/strategy/engine.d.ts +5 -18
  131. package/lib/model/strategy/engine.js +21 -85
  132. package/lib/model/strategy/type.d.ts +0 -17
  133. package/lib/modules/Cart/types.d.ts +0 -2
  134. package/lib/modules/Cart/utils/cartProduct.js +12 -39
  135. package/lib/modules/Cart/utils/changePrice.js +13 -9
  136. package/lib/modules/Discount/availability.d.ts +7 -0
  137. package/lib/modules/Discount/availability.js +91 -0
  138. package/lib/modules/Discount/entitlementPass.d.ts +34 -0
  139. package/lib/modules/Discount/entitlementPass.js +184 -0
  140. package/lib/modules/Discount/entitlementState.d.ts +8 -0
  141. package/lib/modules/Discount/entitlementState.js +206 -0
  142. package/lib/modules/Discount/index.d.ts +12 -3
  143. package/lib/modules/Discount/index.js +123 -12
  144. package/lib/modules/Discount/types.d.ts +42 -22
  145. package/lib/modules/Holder/index.d.ts +48 -0
  146. package/lib/modules/Holder/index.js +402 -0
  147. package/lib/modules/Holder/types.d.ts +123 -0
  148. package/lib/modules/Holder/types.js +17 -0
  149. package/lib/modules/Holder/utils.d.ts +13 -0
  150. package/lib/modules/Holder/utils.js +71 -0
  151. package/lib/modules/OpenData/index.d.ts +24 -0
  152. package/lib/modules/OpenData/index.js +119 -0
  153. package/lib/modules/OpenData/types.d.ts +73 -0
  154. package/lib/modules/OpenData/types.js +17 -0
  155. package/lib/modules/OpenData/utils.d.ts +2 -0
  156. package/lib/modules/OpenData/utils.js +111 -0
  157. package/lib/modules/Order/index.d.ts +67 -1
  158. package/lib/modules/Order/index.js +529 -1
  159. package/lib/modules/Order/types.d.ts +176 -12
  160. package/lib/modules/Order/utils.d.ts +128 -0
  161. package/lib/modules/Order/utils.js +514 -2
  162. package/lib/modules/Payment/index.d.ts +1 -2
  163. package/lib/modules/Payment/index.js +0 -1
  164. package/lib/modules/Payment/utils.js +0 -3
  165. package/lib/modules/Payment/walletpass.d.ts +0 -23
  166. package/lib/modules/Payment/walletpass.js +17 -94
  167. package/lib/modules/Product/types.d.ts +7 -0
  168. package/lib/modules/Product/utils.js +2 -2
  169. package/lib/modules/ProductList/index.d.ts +1 -1
  170. package/lib/modules/ProductList/index.js +5 -4
  171. package/lib/modules/Quotation/index.d.ts +48 -0
  172. package/lib/modules/Quotation/index.js +152 -0
  173. package/lib/modules/Quotation/types.d.ts +42 -0
  174. package/lib/modules/Quotation/types.js +17 -0
  175. package/lib/modules/Rules/entitlementLines.d.ts +8 -0
  176. package/lib/modules/Rules/entitlementLines.js +158 -0
  177. package/lib/modules/Rules/index.d.ts +17 -11
  178. package/lib/modules/Rules/index.js +548 -798
  179. package/lib/modules/Rules/types.d.ts +2 -4
  180. package/lib/modules/SalesSummary/index.d.ts +63 -0
  181. package/lib/modules/SalesSummary/index.js +105 -0
  182. package/lib/modules/SalesSummary/types.d.ts +60 -0
  183. package/lib/modules/SalesSummary/types.js +17 -0
  184. package/lib/modules/SalesSummary/utils.d.ts +30 -0
  185. package/lib/modules/SalesSummary/utils.js +420 -0
  186. package/lib/modules/ScanOrderLogger/index.d.ts +23 -0
  187. package/lib/modules/ScanOrderLogger/index.js +147 -0
  188. package/lib/modules/ScanOrderLogger/providers/feishu.d.ts +2 -0
  189. package/lib/modules/ScanOrderLogger/providers/feishu.js +157 -0
  190. package/lib/modules/ScanOrderLogger/providers/grafana.d.ts +2 -0
  191. package/lib/modules/ScanOrderLogger/providers/grafana.js +52 -0
  192. package/lib/modules/ScanOrderLogger/types.d.ts +53 -0
  193. package/lib/modules/ScanOrderLogger/types.js +17 -0
  194. package/lib/modules/Schedule/getDateIsInSchedule.js +9 -11
  195. package/lib/modules/Schedule/utils.d.ts +1 -1
  196. package/lib/modules/Summary/types.d.ts +0 -2
  197. package/lib/modules/Summary/utils.d.ts +3 -9
  198. package/lib/modules/Summary/utils.js +45 -34
  199. package/lib/modules/index.d.ts +5 -0
  200. package/lib/modules/index.js +11 -1
  201. package/lib/plugins/window.d.ts +3 -2
  202. package/lib/solution/BookingByStep/index.d.ts +17 -3
  203. package/lib/solution/BookingByStep/index.js +45 -4
  204. package/lib/solution/BookingByStep/types.d.ts +4 -1
  205. package/lib/solution/BookingByStep/types.js +15 -0
  206. package/lib/solution/BookingByStep/utils/timeslots.d.ts +3 -1
  207. package/lib/solution/BookingByStep/utils/timeslots.js +19 -11
  208. package/lib/solution/Checkout/index.js +0 -2
  209. package/lib/solution/ScanOrder/index.d.ts +158 -0
  210. package/lib/solution/ScanOrder/index.js +2135 -0
  211. package/lib/solution/ScanOrder/types.d.ts +307 -0
  212. package/lib/solution/ScanOrder/types.js +36 -0
  213. package/lib/solution/ScanOrder/utils.d.ts +172 -0
  214. package/lib/solution/ScanOrder/utils.js +658 -0
  215. package/lib/solution/ShopDiscount/index.d.ts +6 -2
  216. package/lib/solution/ShopDiscount/index.js +94 -50
  217. package/lib/solution/ShopDiscount/types.d.ts +1 -1
  218. package/lib/solution/ShopDiscount/utils.d.ts +1 -0
  219. package/lib/solution/ShopDiscount/utils.js +48 -11
  220. package/lib/solution/VenueBooking/index.d.ts +225 -0
  221. package/lib/solution/VenueBooking/index.js +2073 -0
  222. package/lib/solution/VenueBooking/sales-section-4-annotated.json +343 -0
  223. package/lib/solution/VenueBooking/types.d.ts +156 -0
  224. package/lib/solution/VenueBooking/types.js +44 -0
  225. package/lib/solution/VenueBooking/utils/dateSummary.d.ts +11 -0
  226. package/lib/solution/VenueBooking/utils/dateSummary.js +110 -0
  227. package/lib/solution/VenueBooking/utils/resource.d.ts +14 -0
  228. package/lib/solution/VenueBooking/utils/resource.js +92 -0
  229. package/lib/solution/VenueBooking/utils/slotMerge.d.ts +38 -0
  230. package/lib/solution/VenueBooking/utils/slotMerge.js +237 -0
  231. package/lib/solution/VenueBooking/utils/timeSlot.d.ts +32 -0
  232. package/lib/solution/VenueBooking/utils/timeSlot.js +339 -0
  233. package/lib/solution/VenueBooking/utils.d.ts +1 -0
  234. package/lib/solution/VenueBooking/utils.js +69 -0
  235. package/lib/solution/index.d.ts +2 -0
  236. package/lib/solution/index.js +5 -1
  237. package/lib/types/index.d.ts +1 -0
  238. package/package.json +1 -1
@@ -118,7 +118,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
118
118
  this.otherData = ((_data$this$otherParam = data[this.otherParams.cacheId]) === null || _data$this$otherParam === void 0 || (_data$this$otherParam = _data$this$otherParam[this.name]) === null || _data$this$otherParam === void 0 ? void 0 : _data$this$otherParam['otherData']) || {};
119
119
  }
120
120
  }
121
- moduleArr = ['accountList', 'cart', 'schedule', 'summary', 'step', 'products', 'date', 'order'];
121
+ moduleArr = ['accountList', 'holder', 'cart', 'schedule', 'summary', 'step', 'products', 'date', 'order'];
122
122
  moduleArr.forEach(function (step) {
123
123
  var targetModule = createModule(step, _this2.name);
124
124
  if (targetModule) {
@@ -644,14 +644,59 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
644
644
  return _fetchHolderAccountsAsync.apply(this, arguments);
645
645
  }
646
646
  return fetchHolderAccountsAsync;
647
- }() // 设置日期范围,注入到日期模块中
647
+ }()
648
+ /**
649
+ * 获取 holder 表单 map
650
+ */
648
651
  )
649
652
  }, {
650
- key: "setDateRange",
651
- value: function () {
652
- var _setDateRange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(dateRange) {
653
+ key: "getHolderFormMap",
654
+ value: function getHolderFormMap() {
655
+ return this.store.holder.getHolderFormMap();
656
+ }
657
+
658
+ /**
659
+ * 登录后或外部触发时,按当前 holderMap 批量刷新所有表单的 records
660
+ */
661
+ }, {
662
+ key: "refreshAllHolderFormRecords",
663
+ value: (function () {
664
+ var _refreshAllHolderFormRecords = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(params) {
653
665
  return _regeneratorRuntime().wrap(function _callee10$(_context10) {
654
666
  while (1) switch (_context10.prev = _context10.next) {
667
+ case 0:
668
+ return _context10.abrupt("return", this.store.holder.refreshAllFormRecords({
669
+ customer_id: params === null || params === void 0 ? void 0 : params.customer_id,
670
+ useCache: false
671
+ }));
672
+ case 1:
673
+ case "end":
674
+ return _context10.stop();
675
+ }
676
+ }, _callee10, this);
677
+ }));
678
+ function refreshAllHolderFormRecords(_x12) {
679
+ return _refreshAllHolderFormRecords.apply(this, arguments);
680
+ }
681
+ return refreshAllHolderFormRecords;
682
+ }()
683
+ /**
684
+ * 添加表单记录
685
+ */
686
+ )
687
+ }, {
688
+ key: "appendFormRecord",
689
+ value: function appendFormRecord(params) {
690
+ return this.store.holder.appendFormRecord(params);
691
+ }
692
+
693
+ // 设置日期范围,注入到日期模块中
694
+ }, {
695
+ key: "setDateRange",
696
+ value: function () {
697
+ var _setDateRange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(dateRange) {
698
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
699
+ while (1) switch (_context11.prev = _context11.next) {
655
700
  case 0:
656
701
  this.store.date.setDateRange(dateRange);
657
702
  // 日期数据变更后,如果购物车里有数据,需要更新购物车里的报价单的价格
@@ -660,11 +705,11 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
660
705
  }
661
706
  case 2:
662
707
  case "end":
663
- return _context10.stop();
708
+ return _context11.stop();
664
709
  }
665
- }, _callee10, this);
710
+ }, _callee11, this);
666
711
  }));
667
- function setDateRange(_x12) {
712
+ function setDateRange(_x13) {
668
713
  return _setDateRange.apply(this, arguments);
669
714
  }
670
715
  return setDateRange;
@@ -679,16 +724,16 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
679
724
  }, {
680
725
  key: "getDateRange",
681
726
  value: function () {
682
- var _getDateRange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
683
- return _regeneratorRuntime().wrap(function _callee11$(_context11) {
684
- while (1) switch (_context11.prev = _context11.next) {
727
+ var _getDateRange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
728
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
729
+ while (1) switch (_context12.prev = _context12.next) {
685
730
  case 0:
686
- return _context11.abrupt("return", this.store.date.getDateRange());
731
+ return _context12.abrupt("return", this.store.date.getDateRange());
687
732
  case 1:
688
733
  case "end":
689
- return _context11.stop();
734
+ return _context12.stop();
690
735
  }
691
- }, _callee11, this);
736
+ }, _callee12, this);
692
737
  }));
693
738
  function getDateRange() {
694
739
  return _getDateRange.apply(this, arguments);
@@ -705,7 +750,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
705
750
  }, {
706
751
  key: "getAvailableDate",
707
752
  value: function () {
708
- var _getAvailableDate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
753
+ var _getAvailableDate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
709
754
  var _this4 = this,
710
755
  _dateRange$,
711
756
  _dateRange$2,
@@ -727,11 +772,11 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
727
772
  rules,
728
773
  resourcesMap,
729
774
  res,
730
- _args12 = arguments;
731
- return _regeneratorRuntime().wrap(function _callee12$(_context12) {
732
- while (1) switch (_context12.prev = _context12.next) {
775
+ _args13 = arguments;
776
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
777
+ while (1) switch (_context13.prev = _context13.next) {
733
778
  case 0:
734
- params = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {};
779
+ params = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
735
780
  // 开始日期如果小于今天,直接以今天当做开始日期
736
781
  products = params.products, startDate = params.startDate, endDate = params.endDate, type = params.type, _params$useCache = params.useCache, useCache = _params$useCache === void 0 ? true : _params$useCache; // 前端传递的 startDate,可能是今天之前的,如果 startDate 小于今天 且 endDate 小于或等于今天,需要把 startDate 置为今天
737
782
  if (dayjs(startDate).isBefore(dayjs(), 'day') && (dayjs(endDate).isAfter(dayjs(), 'day') || dayjs(endDate).isSame(dayjs(), 'day'))) {
@@ -758,15 +803,15 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
758
803
  tempStartDate = startDate || (dateRange === null || dateRange === void 0 || (_dateRange$ = dateRange[0]) === null || _dateRange$ === void 0 ? void 0 : _dateRange$.date);
759
804
  tempEndDate = endDate || (dateRange === null || dateRange === void 0 || (_dateRange$2 = dateRange[1]) === null || _dateRange$2 === void 0 ? void 0 : _dateRange$2.date) || (dateRange === null || dateRange === void 0 || (_dateRange$3 = dateRange[0]) === null || _dateRange$3 === void 0 ? void 0 : _dateRange$3.date);
760
805
  if (tempProducts.length) {
761
- _context12.next = 11;
806
+ _context13.next = 11;
762
807
  break;
763
808
  }
764
- return _context12.abrupt("return", []);
809
+ return _context13.abrupt("return", []);
765
810
  case 11:
766
811
  // 在这里需要把能收集到的数据都收集上来,拼装好给 date 模块去查询
767
812
  _ref4 = getAvailableProductResources(tempProducts) || {}, resourceIds = _ref4.resourceIds, rules = _ref4.rules, resourcesMap = _ref4.resourcesMap;
768
813
  this.otherParams.currentResourcesMap = resourcesMap;
769
- _context12.next = 15;
814
+ _context13.next = 15;
770
815
  return this.store.date.getResourceDates({
771
816
  url: params.url,
772
817
  query: {
@@ -779,13 +824,13 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
779
824
  useCache: useCache
780
825
  });
781
826
  case 15:
782
- res = _context12.sent;
783
- return _context12.abrupt("return", res);
827
+ res = _context13.sent;
828
+ return _context13.abrupt("return", res);
784
829
  case 17:
785
830
  case "end":
786
- return _context12.stop();
831
+ return _context13.stop();
787
832
  }
788
- }, _callee12, this);
833
+ }, _callee13, this);
789
834
  }));
790
835
  function getAvailableDate() {
791
836
  return _getAvailableDate.apply(this, arguments);
@@ -798,22 +843,22 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
798
843
  }, {
799
844
  key: "getSummary",
800
845
  value: (function () {
801
- var _getSummary = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
846
+ var _getSummary = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
802
847
  var cartItems, summary;
803
- return _regeneratorRuntime().wrap(function _callee13$(_context13) {
804
- while (1) switch (_context13.prev = _context13.next) {
848
+ return _regeneratorRuntime().wrap(function _callee14$(_context14) {
849
+ while (1) switch (_context14.prev = _context14.next) {
805
850
  case 0:
806
851
  cartItems = this.store.cart.getItems();
807
- _context13.next = 3;
852
+ _context14.next = 3;
808
853
  return this.store.summary.getSummary(cartItems);
809
854
  case 3:
810
- summary = _context13.sent;
811
- return _context13.abrupt("return", summary);
855
+ summary = _context14.sent;
856
+ return _context14.abrupt("return", summary);
812
857
  case 5:
813
858
  case "end":
814
- return _context13.stop();
859
+ return _context14.stop();
815
860
  }
816
- }, _callee13, this);
861
+ }, _callee14, this);
817
862
  }));
818
863
  function getSummary() {
819
864
  return _getSummary.apply(this, arguments);
@@ -827,18 +872,18 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
827
872
  }, {
828
873
  key: "getProtocol",
829
874
  value: (function () {
830
- var _getProtocol = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(protocolId) {
831
- return _regeneratorRuntime().wrap(function _callee14$(_context14) {
832
- while (1) switch (_context14.prev = _context14.next) {
875
+ var _getProtocol = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(protocolId) {
876
+ return _regeneratorRuntime().wrap(function _callee15$(_context15) {
877
+ while (1) switch (_context15.prev = _context15.next) {
833
878
  case 0:
834
- return _context14.abrupt("return", this.store.summary.getProtocol(protocolId));
879
+ return _context15.abrupt("return", this.store.summary.getProtocol(protocolId));
835
880
  case 1:
836
881
  case "end":
837
- return _context14.stop();
882
+ return _context15.stop();
838
883
  }
839
- }, _callee14, this);
884
+ }, _callee15, this);
840
885
  }));
841
- function getProtocol(_x13) {
886
+ function getProtocol(_x14) {
842
887
  return _getProtocol.apply(this, arguments);
843
888
  }
844
889
  return getProtocol;
@@ -847,16 +892,16 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
847
892
  }, {
848
893
  key: "getProducts",
849
894
  value: function () {
850
- var _getProducts = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
851
- return _regeneratorRuntime().wrap(function _callee15$(_context15) {
852
- while (1) switch (_context15.prev = _context15.next) {
895
+ var _getProducts = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
896
+ return _regeneratorRuntime().wrap(function _callee16$(_context16) {
897
+ while (1) switch (_context16.prev = _context16.next) {
853
898
  case 0:
854
- return _context15.abrupt("return", this.store.products.getProducts());
899
+ return _context16.abrupt("return", this.store.products.getProducts());
855
900
  case 1:
856
901
  case "end":
857
- return _context15.stop();
902
+ return _context16.stop();
858
903
  }
859
- }, _callee15, this);
904
+ }, _callee16, this);
860
905
  }));
861
906
  function getProducts() {
862
907
  return _getProducts.apply(this, arguments);
@@ -866,15 +911,15 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
866
911
  }, {
867
912
  key: "setLoginAccount",
868
913
  value: function () {
869
- var _setLoginAccount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(accountId, accountInfo) {
914
+ var _setLoginAccount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(accountId, accountInfo) {
870
915
  var _this5 = this;
871
- var account, stateAccountId, cartItems, _this$store$date$getD2, date, normalProductCartItem;
872
- return _regeneratorRuntime().wrap(function _callee16$(_context16) {
873
- while (1) switch (_context16.prev = _context16.next) {
916
+ var account, stateAccountId, cartItems, _this$store$date$getD2, date, normalProductCartItem, customerId;
917
+ return _regeneratorRuntime().wrap(function _callee17$(_context17) {
918
+ while (1) switch (_context17.prev = _context17.next) {
874
919
  case 0:
875
920
  account = this.store.accountList.getAccount(accountId);
876
921
  if (!account) {
877
- _context16.next = 11;
922
+ _context17.next = 23;
878
923
  break;
879
924
  }
880
925
  stateAccountId = account.getId();
@@ -891,29 +936,47 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
891
936
  }
892
937
  });
893
938
  this.store.accountList.updateAccountListById(stateAccountId, accountInfo);
894
- if (cartItems.length) {
895
- date = (_this$store$date$getD2 = this.store.date.getDateRange()) === null || _this$store$date$getD2 === void 0 || (_this$store$date$getD2 = _this$store$date$getD2[0]) === null || _this$store$date$getD2 === void 0 ? void 0 : _this$store$date$getD2.date;
896
- if (!date) {
897
- // 如果没有日期,则应该是 session 类先选商品的流程,直接从购物车里拿 start_date
898
- // 不能从购物车里第一个找时间,而是找到购物车里第一个有 start_date 的时间
899
- normalProductCartItem = cartItems.find(function (n) {
900
- return !isNormalProduct(n._productOrigin);
901
- });
902
- date = (normalProductCartItem === null || normalProductCartItem === void 0 ? void 0 : normalProductCartItem.start_date) || '';
903
- }
904
- this.updateQuotationPriceAndCart(date);
939
+ if (!cartItems.length) {
940
+ _context17.next = 21;
941
+ break;
905
942
  }
906
- _context16.next = 12;
943
+ date = (_this$store$date$getD2 = this.store.date.getDateRange()) === null || _this$store$date$getD2 === void 0 || (_this$store$date$getD2 = _this$store$date$getD2[0]) === null || _this$store$date$getD2 === void 0 ? void 0 : _this$store$date$getD2.date;
944
+ if (!date) {
945
+ // 如果没有日期,则应该是 session 类先选商品的流程,直接从购物车里拿 start_date
946
+ // 不能从购物车里第一个找时间,而是找到购物车里第一个有 start_date 的时间
947
+ normalProductCartItem = cartItems.find(function (n) {
948
+ return !isNormalProduct(n._productOrigin);
949
+ });
950
+ date = (normalProductCartItem === null || normalProductCartItem === void 0 ? void 0 : normalProductCartItem.start_date) || '';
951
+ }
952
+ this.updateQuotationPriceAndCart(date);
953
+
954
+ // 登录后刷新 holder 表单
955
+ _context17.prev = 12;
956
+ customerId = Number(accountInfo.id);
957
+ _context17.next = 16;
958
+ return this.refreshAllHolderFormRecords({
959
+ customer_id: customerId
960
+ });
961
+ case 16:
962
+ _context17.next = 21;
907
963
  break;
908
- case 11:
964
+ case 18:
965
+ _context17.prev = 18;
966
+ _context17.t0 = _context17["catch"](12);
967
+ console.error('[BookingByStep] 登录后刷新 holder 表单失败', _context17.t0);
968
+ case 21:
969
+ _context17.next = 24;
970
+ break;
971
+ case 23:
909
972
  throw new Error("\u6CA1\u6709\u627E\u5230".concat(accountId, "\u8D26\u6237"));
910
- case 12:
973
+ case 24:
911
974
  case "end":
912
- return _context16.stop();
975
+ return _context17.stop();
913
976
  }
914
- }, _callee16, this);
977
+ }, _callee17, this, [[12, 18]]);
915
978
  }));
916
- function setLoginAccount(_x14, _x15) {
979
+ function setLoginAccount(_x15, _x16) {
917
980
  return _setLoginAccount.apply(this, arguments);
918
981
  }
919
982
  return setLoginAccount;
@@ -921,14 +984,14 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
921
984
  }, {
922
985
  key: "generateCartData",
923
986
  value: function () {
924
- var _generateCartData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
925
- return _regeneratorRuntime().wrap(function _callee17$(_context17) {
926
- while (1) switch (_context17.prev = _context17.next) {
987
+ var _generateCartData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
988
+ return _regeneratorRuntime().wrap(function _callee18$(_context18) {
989
+ while (1) switch (_context18.prev = _context18.next) {
927
990
  case 0:
928
991
  case "end":
929
- return _context17.stop();
992
+ return _context18.stop();
930
993
  }
931
- }, _callee17);
994
+ }, _callee18);
932
995
  }));
933
996
  function generateCartData() {
934
997
  return _generateCartData.apply(this, arguments);
@@ -938,23 +1001,23 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
938
1001
  }, {
939
1002
  key: "getFreeProduct",
940
1003
  value: function () {
941
- var _getFreeProduct = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(id) {
1004
+ var _getFreeProduct = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(id) {
942
1005
  var res;
943
- return _regeneratorRuntime().wrap(function _callee18$(_context18) {
944
- while (1) switch (_context18.prev = _context18.next) {
1006
+ return _regeneratorRuntime().wrap(function _callee19$(_context19) {
1007
+ while (1) switch (_context19.prev = _context19.next) {
945
1008
  case 0:
946
- _context18.next = 2;
1009
+ _context19.next = 2;
947
1010
  return this.request.post("/pay/order/free-pay/".concat(id));
948
1011
  case 2:
949
- res = _context18.sent;
950
- return _context18.abrupt("return", res);
1012
+ res = _context19.sent;
1013
+ return _context19.abrupt("return", res);
951
1014
  case 4:
952
1015
  case "end":
953
- return _context18.stop();
1016
+ return _context19.stop();
954
1017
  }
955
- }, _callee18, this);
1018
+ }, _callee19, this);
956
1019
  }));
957
- function getFreeProduct(_x16) {
1020
+ function getFreeProduct(_x17) {
958
1021
  return _getFreeProduct.apply(this, arguments);
959
1022
  }
960
1023
  return getFreeProduct;
@@ -977,11 +1040,11 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
977
1040
  }, {
978
1041
  key: "submitOrder",
979
1042
  value: function () {
980
- var _submitOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(extraData) {
1043
+ var _submitOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(extraData) {
981
1044
  var _this$otherParams4;
982
1045
  var cartItems, newCartItems, type;
983
- return _regeneratorRuntime().wrap(function _callee19$(_context19) {
984
- while (1) switch (_context19.prev = _context19.next) {
1046
+ return _regeneratorRuntime().wrap(function _callee20$(_context20) {
1047
+ while (1) switch (_context20.prev = _context20.next) {
985
1048
  case 0:
986
1049
  cartItems = this.store.cart.getItems();
987
1050
  newCartItems = cloneDeep(cartItems); // 先整个临时的逻辑,把购物车里所有商品的资源给他格式化一下
@@ -1011,7 +1074,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
1011
1074
  }))) {
1012
1075
  type = 'virtual';
1013
1076
  }
1014
- return _context19.abrupt("return", this.store.order.submitOrder({
1077
+ return _context20.abrupt("return", this.store.order.submitOrder({
1015
1078
  query: {
1016
1079
  cartItems: newCartItems,
1017
1080
  type: type,
@@ -1022,11 +1085,11 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
1022
1085
  }));
1023
1086
  case 6:
1024
1087
  case "end":
1025
- return _context19.stop();
1088
+ return _context20.stop();
1026
1089
  }
1027
- }, _callee19, this);
1090
+ }, _callee20, this);
1028
1091
  }));
1029
- function submitOrder(_x17) {
1092
+ function submitOrder(_x18) {
1030
1093
  return _submitOrder.apply(this, arguments);
1031
1094
  }
1032
1095
  return submitOrder;
@@ -1034,14 +1097,14 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
1034
1097
  }, {
1035
1098
  key: "pay",
1036
1099
  value: function () {
1037
- var _pay = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20() {
1038
- return _regeneratorRuntime().wrap(function _callee20$(_context20) {
1039
- while (1) switch (_context20.prev = _context20.next) {
1100
+ var _pay = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21() {
1101
+ return _regeneratorRuntime().wrap(function _callee21$(_context21) {
1102
+ while (1) switch (_context21.prev = _context21.next) {
1040
1103
  case 0:
1041
1104
  case "end":
1042
- return _context20.stop();
1105
+ return _context21.stop();
1043
1106
  }
1044
- }, _callee20);
1107
+ }, _callee21);
1045
1108
  }));
1046
1109
  function pay() {
1047
1110
  return _pay.apply(this, arguments);
@@ -1051,14 +1114,14 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
1051
1114
  }, {
1052
1115
  key: "getPayInfo",
1053
1116
  value: function () {
1054
- var _getPayInfo = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21() {
1055
- return _regeneratorRuntime().wrap(function _callee21$(_context21) {
1056
- while (1) switch (_context21.prev = _context21.next) {
1117
+ var _getPayInfo = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22() {
1118
+ return _regeneratorRuntime().wrap(function _callee22$(_context22) {
1119
+ while (1) switch (_context22.prev = _context22.next) {
1057
1120
  case 0:
1058
1121
  case "end":
1059
- return _context21.stop();
1122
+ return _context22.stop();
1060
1123
  }
1061
- }, _callee21);
1124
+ }, _callee22);
1062
1125
  }));
1063
1126
  function getPayInfo() {
1064
1127
  return _getPayInfo.apply(this, arguments);
@@ -1068,15 +1131,15 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
1068
1131
  }, {
1069
1132
  key: "setOtherParams",
1070
1133
  value: function () {
1071
- var _setOtherParams = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22(params) {
1134
+ var _setOtherParams = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23(params) {
1072
1135
  var _ref5,
1073
1136
  _ref5$cover,
1074
1137
  cover,
1075
- _args22 = arguments;
1076
- return _regeneratorRuntime().wrap(function _callee22$(_context22) {
1077
- while (1) switch (_context22.prev = _context22.next) {
1138
+ _args23 = arguments;
1139
+ return _regeneratorRuntime().wrap(function _callee23$(_context23) {
1140
+ while (1) switch (_context23.prev = _context23.next) {
1078
1141
  case 0:
1079
- _ref5 = _args22.length > 1 && _args22[1] !== undefined ? _args22[1] : {}, _ref5$cover = _ref5.cover, cover = _ref5$cover === void 0 ? false : _ref5$cover;
1142
+ _ref5 = _args23.length > 1 && _args23[1] !== undefined ? _args23[1] : {}, _ref5$cover = _ref5.cover, cover = _ref5$cover === void 0 ? false : _ref5$cover;
1080
1143
  if (cover) {
1081
1144
  this.otherParams = params;
1082
1145
  } else {
@@ -1084,11 +1147,11 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
1084
1147
  }
1085
1148
  case 2:
1086
1149
  case "end":
1087
- return _context22.stop();
1150
+ return _context23.stop();
1088
1151
  }
1089
- }, _callee22, this);
1152
+ }, _callee23, this);
1090
1153
  }));
1091
- function setOtherParams(_x18) {
1154
+ function setOtherParams(_x19) {
1092
1155
  return _setOtherParams.apply(this, arguments);
1093
1156
  }
1094
1157
  return setOtherParams;
@@ -1096,16 +1159,16 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
1096
1159
  }, {
1097
1160
  key: "getOtherParams",
1098
1161
  value: function () {
1099
- var _getOtherParams = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23() {
1100
- return _regeneratorRuntime().wrap(function _callee23$(_context23) {
1101
- while (1) switch (_context23.prev = _context23.next) {
1162
+ var _getOtherParams = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24() {
1163
+ return _regeneratorRuntime().wrap(function _callee24$(_context24) {
1164
+ while (1) switch (_context24.prev = _context24.next) {
1102
1165
  case 0:
1103
- return _context23.abrupt("return", this.otherParams);
1166
+ return _context24.abrupt("return", this.otherParams);
1104
1167
  case 1:
1105
1168
  case "end":
1106
- return _context23.stop();
1169
+ return _context24.stop();
1107
1170
  }
1108
- }, _callee23, this);
1171
+ }, _callee24, this);
1109
1172
  }));
1110
1173
  function getOtherParams() {
1111
1174
  return _getOtherParams.apply(this, arguments);
@@ -1194,6 +1257,15 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
1194
1257
  account = activeAccount;
1195
1258
  }
1196
1259
  }
1260
+ try {
1261
+ this.store.holder.ensureFormByProduct({
1262
+ product: productData,
1263
+ shop_id: (productData === null || productData === void 0 ? void 0 : productData.shop_id) || '',
1264
+ useCache: true
1265
+ });
1266
+ } catch (error) {
1267
+ console.error('[BookingByStep] 加载 holder 表单失败', error);
1268
+ }
1197
1269
  var flag = this.store.cart.mergeCartItemByRowKey({
1198
1270
  rowKey: rowKey,
1199
1271
  quantity: quantity,
@@ -2008,7 +2080,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2008
2080
  return n.code === resources_code;
2009
2081
  })) === null || _productResources$fin === void 0 ? void 0 : _productResources$fin.renderList;
2010
2082
  if (targetRenderList && targetRenderList.length > 0) {
2011
- var _item$_origin$resourc2;
2083
+ var _item$_origin$resourc2, _dateRange$5, _item$duration2, _item$_productOrigin6;
2012
2084
  // 如果购物车里已经有同类型的 form_id 的资源了,则不处理
2013
2085
  if ((_item$_origin$resourc2 = item._origin.resources) !== null && _item$_origin$resourc2 !== void 0 && _item$_origin$resourc2.some(function (n) {
2014
2086
  return n.form_id === targetRenderList[0].form_id;
@@ -2018,7 +2090,9 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2018
2090
  var fastestResource = findFastestAvailableResource({
2019
2091
  resources: targetRenderList,
2020
2092
  currentCapacity: currentCapacity,
2021
- countMap: selectResourcesMap
2093
+ countMap: selectResourcesMap,
2094
+ targetDate: dateRange === null || dateRange === void 0 || (_dateRange$5 = dateRange[0]) === null || _dateRange$5 === void 0 ? void 0 : _dateRange$5.date,
2095
+ durationMinutes: (item === null || item === void 0 || (_item$duration2 = item.duration) === null || _item$duration2 === void 0 ? void 0 : _item$duration2.value) || (item === null || item === void 0 || (_item$_productOrigin6 = item._productOrigin) === null || _item$_productOrigin6 === void 0 || (_item$_productOrigin6 = _item$_productOrigin6.duration) === null || _item$_productOrigin6 === void 0 ? void 0 : _item$_productOrigin6.value) || 10
2022
2096
  });
2023
2097
  var targetResource = fastestResource || targetRenderList[0];
2024
2098
  targetResource.capacity = currentCapacity;
@@ -2069,6 +2143,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2069
2143
  _cartItems$,
2070
2144
  _cartItems$2,
2071
2145
  _this$shopStore$get;
2146
+ var split = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
2072
2147
  var dateRange = this.store.date.getDateRange();
2073
2148
  // 取出购物车中所有一已选择的第一步资源
2074
2149
  var resources = [];
@@ -2084,8 +2159,8 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2084
2159
  var maxCutOffTime = undefined;
2085
2160
  var maxCutOffTimeValue = dayjs();
2086
2161
  cartItems.forEach(function (item) {
2087
- var _item$_productOrigin6, _item$_productOrigin7, _item$_productOrigin8, _item$_productOrigin9;
2088
- (_item$_productOrigin6 = item._productOrigin) === null || _item$_productOrigin6 === void 0 || (_item$_productOrigin6 = _item$_productOrigin6.product_resource) === null || _item$_productOrigin6 === void 0 || (_item$_productOrigin6 = _item$_productOrigin6.resources) === null || _item$_productOrigin6 === void 0 || _item$_productOrigin6.forEach(function (n) {
2162
+ var _item$_productOrigin7, _item$_productOrigin8, _item$_productOrigin9, _item$_productOrigin10;
2163
+ (_item$_productOrigin7 = item._productOrigin) === null || _item$_productOrigin7 === void 0 || (_item$_productOrigin7 = _item$_productOrigin7.product_resource) === null || _item$_productOrigin7 === void 0 || (_item$_productOrigin7 = _item$_productOrigin7.resources) === null || _item$_productOrigin7 === void 0 || _item$_productOrigin7.forEach(function (n) {
2089
2164
  // TODO: 少了个 status 的判断
2090
2165
  if (n.code === resources_code) {
2091
2166
  resources.push.apply(resources, _toConsumableArray(n.renderList || []));
@@ -2098,10 +2173,10 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2098
2173
  if (item.resource_id && !resourceIds.includes(item.resource_id)) {
2099
2174
  resourceIds.push(item.resource_id);
2100
2175
  }
2101
- resourcesTypeId = item === null || item === void 0 || (_item$_productOrigin7 = item._productOrigin) === null || _item$_productOrigin7 === void 0 || (_item$_productOrigin7 = _item$_productOrigin7.product_resource) === null || _item$_productOrigin7 === void 0 || (_item$_productOrigin7 = _item$_productOrigin7.resources) === null || _item$_productOrigin7 === void 0 || (_item$_productOrigin7 = _item$_productOrigin7.find(function (n) {
2176
+ resourcesTypeId = item === null || item === void 0 || (_item$_productOrigin8 = item._productOrigin) === null || _item$_productOrigin8 === void 0 || (_item$_productOrigin8 = _item$_productOrigin8.product_resource) === null || _item$_productOrigin8 === void 0 || (_item$_productOrigin8 = _item$_productOrigin8.resources) === null || _item$_productOrigin8 === void 0 || (_item$_productOrigin8 = _item$_productOrigin8.find(function (n) {
2102
2177
  return n.code === resources_code;
2103
- })) === null || _item$_productOrigin7 === void 0 ? void 0 : _item$_productOrigin7.id;
2104
- if ((_item$_productOrigin8 = item._productOrigin) !== null && _item$_productOrigin8 !== void 0 && _item$_productOrigin8.cut_off_time && ((_item$_productOrigin9 = item._productOrigin) === null || _item$_productOrigin9 === void 0 ? void 0 : _item$_productOrigin9.cut_off_time.type) === 'advance') {
2178
+ })) === null || _item$_productOrigin8 === void 0 ? void 0 : _item$_productOrigin8.id;
2179
+ if ((_item$_productOrigin9 = item._productOrigin) !== null && _item$_productOrigin9 !== void 0 && _item$_productOrigin9.cut_off_time && ((_item$_productOrigin10 = item._productOrigin) === null || _item$_productOrigin10 === void 0 ? void 0 : _item$_productOrigin10.cut_off_time.type) === 'advance') {
2105
2180
  var currentCutOffTime = dayjs().add(item._productOrigin.cut_off_time.unit, item._productOrigin.cut_off_time.unit_type);
2106
2181
  if (currentCutOffTime.isAfter(maxCutOffTimeValue, 'minute')) {
2107
2182
  maxCutOffTimeValue = currentCutOffTime;
@@ -2151,13 +2226,13 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2151
2226
  cartItems.forEach(function (item) {
2152
2227
  // 单个预约累加账号 多个预约取最大值
2153
2228
  if (isSingleResource) {
2154
- var _item$_productOrigin10;
2155
- accountDuration += ((_item$_productOrigin10 = item._productOrigin) === null || _item$_productOrigin10 === void 0 || (_item$_productOrigin10 = _item$_productOrigin10.duration) === null || _item$_productOrigin10 === void 0 ? void 0 : _item$_productOrigin10.value) || 10;
2156
- } else {
2157
2229
  var _item$_productOrigin11;
2158
- if (accountDuration < (((_item$_productOrigin11 = item._productOrigin) === null || _item$_productOrigin11 === void 0 || (_item$_productOrigin11 = _item$_productOrigin11.duration) === null || _item$_productOrigin11 === void 0 ? void 0 : _item$_productOrigin11.value) || 10)) {
2159
- var _item$_productOrigin12;
2160
- accountDuration = ((_item$_productOrigin12 = item._productOrigin) === null || _item$_productOrigin12 === void 0 || (_item$_productOrigin12 = _item$_productOrigin12.duration) === null || _item$_productOrigin12 === void 0 ? void 0 : _item$_productOrigin12.value) || 10;
2230
+ accountDuration += ((_item$_productOrigin11 = item._productOrigin) === null || _item$_productOrigin11 === void 0 || (_item$_productOrigin11 = _item$_productOrigin11.duration) === null || _item$_productOrigin11 === void 0 ? void 0 : _item$_productOrigin11.value) || 10;
2231
+ } else {
2232
+ var _item$_productOrigin12;
2233
+ if (accountDuration < (((_item$_productOrigin12 = item._productOrigin) === null || _item$_productOrigin12 === void 0 || (_item$_productOrigin12 = _item$_productOrigin12.duration) === null || _item$_productOrigin12 === void 0 ? void 0 : _item$_productOrigin12.value) || 10)) {
2234
+ var _item$_productOrigin13;
2235
+ accountDuration = ((_item$_productOrigin13 = item._productOrigin) === null || _item$_productOrigin13 === void 0 || (_item$_productOrigin13 = _item$_productOrigin13.duration) === null || _item$_productOrigin13 === void 0 ? void 0 : _item$_productOrigin13.value) || 10;
2161
2236
  }
2162
2237
  }
2163
2238
  });
@@ -2194,8 +2269,8 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2194
2269
  }
2195
2270
  var resourcesUseableMap = {};
2196
2271
  var hasFlexibleDuration = cartItems.some(function (item) {
2197
- var _item$_productOrigin13;
2198
- return ((_item$_productOrigin13 = item._productOrigin) === null || _item$_productOrigin13 === void 0 || (_item$_productOrigin13 = _item$_productOrigin13.duration) === null || _item$_productOrigin13 === void 0 ? void 0 : _item$_productOrigin13.type) === 'flexible';
2272
+ var _item$_productOrigin14;
2273
+ return ((_item$_productOrigin14 = item._productOrigin) === null || _item$_productOrigin14 === void 0 || (_item$_productOrigin14 = _item$_productOrigin14.duration) === null || _item$_productOrigin14 === void 0 ? void 0 : _item$_productOrigin14.type) === 'flexible';
2199
2274
  });
2200
2275
  var operating_day_boundary = (_this$shopStore$get = this.shopStore.get('core')) === null || _this$shopStore$get === void 0 || (_this$shopStore$get = _this$shopStore$get.core) === null || _this$shopStore$get === void 0 ? void 0 : _this$shopStore$get.operating_day_boundary;
2201
2276
 
@@ -2203,11 +2278,11 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2203
2278
  var maxBlockThreshold = 0;
2204
2279
  if (hasFlexibleDuration) {
2205
2280
  maxBlockThreshold = cartItems.reduce(function (max, item) {
2206
- var _item$_productOrigin14;
2281
+ var _item$_productOrigin15;
2207
2282
  // 如果开启了灵活时长商品配置,则取 block_threshold 的值
2208
- if ((_item$_productOrigin14 = item._productOrigin) !== null && _item$_productOrigin14 !== void 0 && (_item$_productOrigin14 = _item$_productOrigin14.duration) !== null && _item$_productOrigin14 !== void 0 && (_item$_productOrigin14 = _item$_productOrigin14.flexible_config) !== null && _item$_productOrigin14 !== void 0 && _item$_productOrigin14.is_enable_minimum_duration) {
2209
- var _item$_productOrigin15;
2210
- return Math.max(max, ((_item$_productOrigin15 = item._productOrigin) === null || _item$_productOrigin15 === void 0 || (_item$_productOrigin15 = _item$_productOrigin15.duration) === null || _item$_productOrigin15 === void 0 || (_item$_productOrigin15 = _item$_productOrigin15.flexible_config) === null || _item$_productOrigin15 === void 0 ? void 0 : _item$_productOrigin15.block_threshold) || 0);
2283
+ if ((_item$_productOrigin15 = item._productOrigin) !== null && _item$_productOrigin15 !== void 0 && (_item$_productOrigin15 = _item$_productOrigin15.duration) !== null && _item$_productOrigin15 !== void 0 && (_item$_productOrigin15 = _item$_productOrigin15.flexible_config) !== null && _item$_productOrigin15 !== void 0 && _item$_productOrigin15.is_enable_minimum_duration) {
2284
+ var _item$_productOrigin16;
2285
+ return Math.max(max, ((_item$_productOrigin16 = item._productOrigin) === null || _item$_productOrigin16 === void 0 || (_item$_productOrigin16 = _item$_productOrigin16.duration) === null || _item$_productOrigin16 === void 0 || (_item$_productOrigin16 = _item$_productOrigin16.flexible_config) === null || _item$_productOrigin16 === void 0 ? void 0 : _item$_productOrigin16.block_threshold) || 0);
2211
2286
  }
2212
2287
  return 0;
2213
2288
  }, 0);
@@ -2252,7 +2327,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2252
2327
  resourcesMap: resourcesMap,
2253
2328
  duration: duration,
2254
2329
  currentDate: dateRange[0].date,
2255
- split: 10,
2330
+ split: split,
2256
2331
  resourcesUseableMap: resourcesUseableMap,
2257
2332
  capacity: maxCapacity,
2258
2333
  cut_off_time: maxCutOffTime,
@@ -2266,14 +2341,14 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2266
2341
  }, {
2267
2342
  key: "getTimeSlotByAllResourcesForDate",
2268
2343
  value: function () {
2269
- var _getTimeSlotByAllResourcesForDate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24(_ref10) {
2344
+ var _getTimeSlotByAllResourcesForDate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25(_ref10) {
2270
2345
  var _this13 = this,
2271
2346
  _cartItems$5,
2272
2347
  _cartItems$6,
2273
2348
  _this$shopStore$get2;
2274
2349
  var resources_code, startDate, endDate, resources, cartItems, resourceIds, resourcesTypeId, isSingleResource, maxCutOffTime, maxCutOffTimeValue, duration, accountList, checkDuration, resourcesUseableMap, hasFlexibleDuration, operating_day_boundary, maxBlockThreshold, calculateCapacityFromCartItems, maxCapacity, arr, today, _loop2, i;
2275
- return _regeneratorRuntime().wrap(function _callee24$(_context25) {
2276
- while (1) switch (_context25.prev = _context25.next) {
2350
+ return _regeneratorRuntime().wrap(function _callee25$(_context26) {
2351
+ while (1) switch (_context26.prev = _context26.next) {
2277
2352
  case 0:
2278
2353
  resources_code = _ref10.resources_code, startDate = _ref10.startDate, endDate = _ref10.endDate;
2279
2354
  // 如果 end_date 距离start_date小于 30 天,自动追加 end_date 为今天往后的 30 天
@@ -2281,7 +2356,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2281
2356
  endDate = dayjs(startDate).add(30, 'day').format('YYYY-MM-DD');
2282
2357
  }
2283
2358
  // 预请求资源数据,防止日期超过之前选择的范围
2284
- _context25.next = 4;
2359
+ _context26.next = 4;
2285
2360
  return this.getAvailableDate({
2286
2361
  startDate: startDate,
2287
2362
  endDate: endDate,
@@ -2299,8 +2374,8 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2299
2374
  maxCutOffTime = undefined;
2300
2375
  maxCutOffTimeValue = dayjs();
2301
2376
  cartItems.forEach(function (item) {
2302
- var _item$_productOrigin16, _item$_productOrigin17, _item$_productOrigin18, _item$_productOrigin19;
2303
- (_item$_productOrigin16 = item._productOrigin) === null || _item$_productOrigin16 === void 0 || (_item$_productOrigin16 = _item$_productOrigin16.product_resource) === null || _item$_productOrigin16 === void 0 || (_item$_productOrigin16 = _item$_productOrigin16.resources) === null || _item$_productOrigin16 === void 0 || _item$_productOrigin16.forEach(function (n) {
2377
+ var _item$_productOrigin17, _item$_productOrigin18, _item$_productOrigin19, _item$_productOrigin20;
2378
+ (_item$_productOrigin17 = item._productOrigin) === null || _item$_productOrigin17 === void 0 || (_item$_productOrigin17 = _item$_productOrigin17.product_resource) === null || _item$_productOrigin17 === void 0 || (_item$_productOrigin17 = _item$_productOrigin17.resources) === null || _item$_productOrigin17 === void 0 || _item$_productOrigin17.forEach(function (n) {
2304
2379
  // TODO: 少了个 status 的判断
2305
2380
  if (n.code === resources_code) {
2306
2381
  resources.push.apply(resources, _toConsumableArray(n.renderList || []));
@@ -2313,10 +2388,10 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2313
2388
  if (item.resource_id && !resourceIds.includes(item.resource_id)) {
2314
2389
  resourceIds.push(item.resource_id);
2315
2390
  }
2316
- resourcesTypeId = item === null || item === void 0 || (_item$_productOrigin17 = item._productOrigin) === null || _item$_productOrigin17 === void 0 || (_item$_productOrigin17 = _item$_productOrigin17.product_resource) === null || _item$_productOrigin17 === void 0 || (_item$_productOrigin17 = _item$_productOrigin17.resources) === null || _item$_productOrigin17 === void 0 || (_item$_productOrigin17 = _item$_productOrigin17.find(function (n) {
2391
+ resourcesTypeId = item === null || item === void 0 || (_item$_productOrigin18 = item._productOrigin) === null || _item$_productOrigin18 === void 0 || (_item$_productOrigin18 = _item$_productOrigin18.product_resource) === null || _item$_productOrigin18 === void 0 || (_item$_productOrigin18 = _item$_productOrigin18.resources) === null || _item$_productOrigin18 === void 0 || (_item$_productOrigin18 = _item$_productOrigin18.find(function (n) {
2317
2392
  return n.code === resources_code;
2318
- })) === null || _item$_productOrigin17 === void 0 ? void 0 : _item$_productOrigin17.id;
2319
- if ((_item$_productOrigin18 = item._productOrigin) !== null && _item$_productOrigin18 !== void 0 && _item$_productOrigin18.cut_off_time && ((_item$_productOrigin19 = item._productOrigin) === null || _item$_productOrigin19 === void 0 ? void 0 : _item$_productOrigin19.cut_off_time.type) === 'advance') {
2393
+ })) === null || _item$_productOrigin18 === void 0 ? void 0 : _item$_productOrigin18.id;
2394
+ if ((_item$_productOrigin19 = item._productOrigin) !== null && _item$_productOrigin19 !== void 0 && _item$_productOrigin19.cut_off_time && ((_item$_productOrigin20 = item._productOrigin) === null || _item$_productOrigin20 === void 0 ? void 0 : _item$_productOrigin20.cut_off_time.type) === 'advance') {
2320
2395
  var currentCutOffTime = dayjs().add(item._productOrigin.cut_off_time.unit, item._productOrigin.cut_off_time.unit_type);
2321
2396
  if (currentCutOffTime.isAfter(maxCutOffTimeValue, 'minute')) {
2322
2397
  maxCutOffTimeValue = currentCutOffTime;
@@ -2327,10 +2402,10 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2327
2402
 
2328
2403
  // 保护: 如果 resources 为空则直接 return
2329
2404
  if (resources.length) {
2330
- _context25.next = 14;
2405
+ _context26.next = 14;
2331
2406
  break;
2332
2407
  }
2333
- return _context25.abrupt("return", []);
2408
+ return _context26.abrupt("return", []);
2334
2409
  case 14:
2335
2410
  duration = 0; // duration = 不同账号的最长时间
2336
2411
  accountList = this.store.accountList.getAccounts();
@@ -2339,13 +2414,13 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2339
2414
  cartItems.forEach(function (item) {
2340
2415
  // 单个预约累加账号 多个预约取最大值
2341
2416
  if (isSingleResource) {
2342
- var _item$_productOrigin20;
2343
- accountDuration += ((_item$_productOrigin20 = item._productOrigin) === null || _item$_productOrigin20 === void 0 || (_item$_productOrigin20 = _item$_productOrigin20.duration) === null || _item$_productOrigin20 === void 0 ? void 0 : _item$_productOrigin20.value) || 10;
2344
- } else {
2345
2417
  var _item$_productOrigin21;
2346
- if (accountDuration < (((_item$_productOrigin21 = item._productOrigin) === null || _item$_productOrigin21 === void 0 || (_item$_productOrigin21 = _item$_productOrigin21.duration) === null || _item$_productOrigin21 === void 0 ? void 0 : _item$_productOrigin21.value) || 10)) {
2347
- var _item$_productOrigin22;
2348
- accountDuration = ((_item$_productOrigin22 = item._productOrigin) === null || _item$_productOrigin22 === void 0 || (_item$_productOrigin22 = _item$_productOrigin22.duration) === null || _item$_productOrigin22 === void 0 ? void 0 : _item$_productOrigin22.value) || 10;
2418
+ accountDuration += ((_item$_productOrigin21 = item._productOrigin) === null || _item$_productOrigin21 === void 0 || (_item$_productOrigin21 = _item$_productOrigin21.duration) === null || _item$_productOrigin21 === void 0 ? void 0 : _item$_productOrigin21.value) || 10;
2419
+ } else {
2420
+ var _item$_productOrigin22;
2421
+ if (accountDuration < (((_item$_productOrigin22 = item._productOrigin) === null || _item$_productOrigin22 === void 0 || (_item$_productOrigin22 = _item$_productOrigin22.duration) === null || _item$_productOrigin22 === void 0 ? void 0 : _item$_productOrigin22.value) || 10)) {
2422
+ var _item$_productOrigin23;
2423
+ accountDuration = ((_item$_productOrigin23 = item._productOrigin) === null || _item$_productOrigin23 === void 0 || (_item$_productOrigin23 = _item$_productOrigin23.duration) === null || _item$_productOrigin23 === void 0 ? void 0 : _item$_productOrigin23.value) || 10;
2349
2424
  }
2350
2425
  }
2351
2426
  });
@@ -2364,25 +2439,25 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2364
2439
  // 如果 cartItem 上既没有时间,也没有资源,认为外部属于异常调用,直接丢一个空数组出去
2365
2440
  // 同时 session 类商品的流程也不应该调用这个方法
2366
2441
  if (!(!(cartItems !== null && cartItems !== void 0 && (_cartItems$5 = cartItems[0]) !== null && _cartItems$5 !== void 0 && _cartItems$5.start_date) && !(cartItems !== null && cartItems !== void 0 && (_cartItems$6 = cartItems[0]) !== null && _cartItems$6 !== void 0 && _cartItems$6.resource_id) || !(cartItems !== null && cartItems !== void 0 && cartItems[0].duration))) {
2367
- _context25.next = 20;
2442
+ _context26.next = 20;
2368
2443
  break;
2369
2444
  }
2370
- return _context25.abrupt("return", []);
2445
+ return _context26.abrupt("return", []);
2371
2446
  case 20:
2372
2447
  resourcesUseableMap = {};
2373
2448
  hasFlexibleDuration = cartItems.some(function (item) {
2374
- var _item$_productOrigin23;
2375
- return ((_item$_productOrigin23 = item._productOrigin) === null || _item$_productOrigin23 === void 0 || (_item$_productOrigin23 = _item$_productOrigin23.duration) === null || _item$_productOrigin23 === void 0 ? void 0 : _item$_productOrigin23.type) === 'flexible';
2449
+ var _item$_productOrigin24;
2450
+ return ((_item$_productOrigin24 = item._productOrigin) === null || _item$_productOrigin24 === void 0 || (_item$_productOrigin24 = _item$_productOrigin24.duration) === null || _item$_productOrigin24 === void 0 ? void 0 : _item$_productOrigin24.type) === 'flexible';
2376
2451
  });
2377
2452
  operating_day_boundary = (_this$shopStore$get2 = this.shopStore.get('core')) === null || _this$shopStore$get2 === void 0 || (_this$shopStore$get2 = _this$shopStore$get2.core) === null || _this$shopStore$get2 === void 0 ? void 0 : _this$shopStore$get2.operating_day_boundary; // 如果有 hasFlexibleDuration,需要把动态时长商品(可能是多个,取最长的那个最低禁止购买时长)的最低禁止购买时长作为 split 的值
2378
2453
  maxBlockThreshold = 0;
2379
2454
  if (hasFlexibleDuration) {
2380
2455
  maxBlockThreshold = cartItems.reduce(function (max, item) {
2381
- var _item$_productOrigin24;
2456
+ var _item$_productOrigin25;
2382
2457
  // 如果开启了灵活时长商品配置,则取 block_threshold 的值
2383
- if ((_item$_productOrigin24 = item._productOrigin) !== null && _item$_productOrigin24 !== void 0 && (_item$_productOrigin24 = _item$_productOrigin24.duration) !== null && _item$_productOrigin24 !== void 0 && (_item$_productOrigin24 = _item$_productOrigin24.flexible_config) !== null && _item$_productOrigin24 !== void 0 && _item$_productOrigin24.is_enable_minimum_duration) {
2384
- var _item$_productOrigin25;
2385
- return Math.max(max, ((_item$_productOrigin25 = item._productOrigin) === null || _item$_productOrigin25 === void 0 || (_item$_productOrigin25 = _item$_productOrigin25.duration) === null || _item$_productOrigin25 === void 0 || (_item$_productOrigin25 = _item$_productOrigin25.flexible_config) === null || _item$_productOrigin25 === void 0 ? void 0 : _item$_productOrigin25.block_threshold) || 0);
2458
+ if ((_item$_productOrigin25 = item._productOrigin) !== null && _item$_productOrigin25 !== void 0 && (_item$_productOrigin25 = _item$_productOrigin25.duration) !== null && _item$_productOrigin25 !== void 0 && (_item$_productOrigin25 = _item$_productOrigin25.flexible_config) !== null && _item$_productOrigin25 !== void 0 && _item$_productOrigin25.is_enable_minimum_duration) {
2459
+ var _item$_productOrigin26;
2460
+ return Math.max(max, ((_item$_productOrigin26 = item._productOrigin) === null || _item$_productOrigin26 === void 0 || (_item$_productOrigin26 = _item$_productOrigin26.duration) === null || _item$_productOrigin26 === void 0 || (_item$_productOrigin26 = _item$_productOrigin26.flexible_config) === null || _item$_productOrigin26 === void 0 ? void 0 : _item$_productOrigin26.block_threshold) || 0);
2386
2461
  }
2387
2462
  return 0;
2388
2463
  }, 0);
@@ -2421,8 +2496,8 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2421
2496
  today = dayjs().startOf('day'); // 计算 start_date 到 end_date 之间的所有日期,遍历他们并且计算每一天的可用
2422
2497
  _loop2 = /*#__PURE__*/_regeneratorRuntime().mark(function _loop2() {
2423
2498
  var currentDate, theDateResources, resourcesMap, timeSlots;
2424
- return _regeneratorRuntime().wrap(function _loop2$(_context24) {
2425
- while (1) switch (_context24.prev = _context24.next) {
2499
+ return _regeneratorRuntime().wrap(function _loop2$(_context25) {
2500
+ while (1) switch (_context25.prev = _context25.next) {
2426
2501
  case 0:
2427
2502
  currentDate = i.format('YYYY-MM-DD');
2428
2503
  theDateResources = _this13.store.date.getResourcesListByDate(currentDate);
@@ -2434,7 +2509,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2434
2509
  });
2435
2510
  resourcesMap = getResourcesMap(resources); // 如果日期已经过期则直接标记为不可用
2436
2511
  if (!i.isBefore(today)) {
2437
- _context24.next = 7;
2512
+ _context25.next = 7;
2438
2513
  break;
2439
2514
  }
2440
2515
  arr.push({
@@ -2443,7 +2518,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2443
2518
  week: i.format('ddd'),
2444
2519
  weekNum: i.day()
2445
2520
  });
2446
- return _context24.abrupt("return", 1);
2521
+ return _context25.abrupt("return", 1);
2447
2522
  case 7:
2448
2523
  timeSlots = getTimeSlicesByResources({
2449
2524
  resourceIds: resourceIds,
@@ -2475,36 +2550,36 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2475
2550
  }
2476
2551
  case 9:
2477
2552
  case "end":
2478
- return _context24.stop();
2553
+ return _context25.stop();
2479
2554
  }
2480
2555
  }, _loop2);
2481
2556
  });
2482
2557
  i = dayjs(startDate);
2483
2558
  case 32:
2484
2559
  if (!i.isBefore(dayjs(endDate))) {
2485
- _context25.next = 39;
2560
+ _context26.next = 39;
2486
2561
  break;
2487
2562
  }
2488
- return _context25.delegateYield(_loop2(), "t0", 34);
2563
+ return _context26.delegateYield(_loop2(), "t0", 34);
2489
2564
  case 34:
2490
- if (!_context25.t0) {
2491
- _context25.next = 36;
2565
+ if (!_context26.t0) {
2566
+ _context26.next = 36;
2492
2567
  break;
2493
2568
  }
2494
- return _context25.abrupt("continue", 36);
2569
+ return _context26.abrupt("continue", 36);
2495
2570
  case 36:
2496
2571
  i = i.add(1, 'day');
2497
- _context25.next = 32;
2572
+ _context26.next = 32;
2498
2573
  break;
2499
2574
  case 39:
2500
- return _context25.abrupt("return", arr);
2575
+ return _context26.abrupt("return", arr);
2501
2576
  case 40:
2502
2577
  case "end":
2503
- return _context25.stop();
2578
+ return _context26.stop();
2504
2579
  }
2505
- }, _callee24, this);
2580
+ }, _callee25, this);
2506
2581
  }));
2507
- function getTimeSlotByAllResourcesForDate(_x19) {
2582
+ function getTimeSlotByAllResourcesForDate(_x20) {
2508
2583
  return _getTimeSlotByAllResourcesForDate.apply(this, arguments);
2509
2584
  }
2510
2585
  return getTimeSlotByAllResourcesForDate;
@@ -2543,10 +2618,10 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2543
2618
  var osWarnTips = [];
2544
2619
  var newResources = cloneDeep(item._origin.resources);
2545
2620
  newResources.forEach(function (resource) {
2546
- var _item$_productOrigin26;
2621
+ var _item$_productOrigin27;
2547
2622
  // 如果商品配置的是灵活时长,开始时间设置为提交的时间,结束时间从资源的可用最晚时间和店铺营业结束时间里取一个最早的
2548
- if (((_item$_productOrigin26 = item._productOrigin) === null || _item$_productOrigin26 === void 0 || (_item$_productOrigin26 = _item$_productOrigin26.duration) === null || _item$_productOrigin26 === void 0 ? void 0 : _item$_productOrigin26.type) === 'flexible') {
2549
- var _allResources$find, _item$_productOrigin27, _item$_productOrigin28;
2623
+ if (((_item$_productOrigin27 = item._productOrigin) === null || _item$_productOrigin27 === void 0 || (_item$_productOrigin27 = _item$_productOrigin27.duration) === null || _item$_productOrigin27 === void 0 ? void 0 : _item$_productOrigin27.type) === 'flexible') {
2624
+ var _allResources$find, _item$_productOrigin28, _item$_productOrigin29;
2550
2625
  item.duration = {
2551
2626
  type: 'minutes',
2552
2627
  value: 10
@@ -2629,15 +2704,15 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2629
2704
  resource.endTime = formattedEndTime.format('YYYY-MM-DD HH:mm');
2630
2705
  // 如果是动态时长商品,并且当前选择的时间的结束时间小于了最低提示时长(warningThreshold),则追加一个提示
2631
2706
  // 如果currentStartTime + warningThreshold 大于 currentEndTime,且 osWarnTips 没有pisell2.product.card.closing-soon.warning 这一项,则加入这一项
2632
- if ((_item$_productOrigin27 = item._productOrigin) !== null && _item$_productOrigin27 !== void 0 && (_item$_productOrigin27 = _item$_productOrigin27.duration) !== null && _item$_productOrigin27 !== void 0 && (_item$_productOrigin27 = _item$_productOrigin27.flexible_config) !== null && _item$_productOrigin27 !== void 0 && _item$_productOrigin27.is_enable_minimum_duration && dayjs(currentStartTime).add(((_item$_productOrigin28 = item._productOrigin) === null || _item$_productOrigin28 === void 0 || (_item$_productOrigin28 = _item$_productOrigin28.duration) === null || _item$_productOrigin28 === void 0 || (_item$_productOrigin28 = _item$_productOrigin28.flexible_config) === null || _item$_productOrigin28 === void 0 ? void 0 : _item$_productOrigin28.warning_threshold) || 0, 'minutes').isAfter(dayjs(formattedEndTime))) {
2707
+ if ((_item$_productOrigin28 = item._productOrigin) !== null && _item$_productOrigin28 !== void 0 && (_item$_productOrigin28 = _item$_productOrigin28.duration) !== null && _item$_productOrigin28 !== void 0 && (_item$_productOrigin28 = _item$_productOrigin28.flexible_config) !== null && _item$_productOrigin28 !== void 0 && _item$_productOrigin28.is_enable_minimum_duration && dayjs(currentStartTime).add(((_item$_productOrigin29 = item._productOrigin) === null || _item$_productOrigin29 === void 0 || (_item$_productOrigin29 = _item$_productOrigin29.duration) === null || _item$_productOrigin29 === void 0 || (_item$_productOrigin29 = _item$_productOrigin29.flexible_config) === null || _item$_productOrigin29 === void 0 ? void 0 : _item$_productOrigin29.warning_threshold) || 0, 'minutes').isAfter(dayjs(formattedEndTime))) {
2633
2708
  if (!osWarnTips.includes('pisell2.product.card.closing-soon.warning')) {
2634
2709
  osWarnTips.push('pisell2.product.card.closing-soon.warning');
2635
2710
  }
2636
2711
  }
2637
2712
  } else {
2638
- var _item$_productOrigin29;
2713
+ var _item$_productOrigin30;
2639
2714
  resource.startTime = currentStartTime;
2640
- resource.endTime = dayjs(currentStartTime).add(((_item$_productOrigin29 = item._productOrigin) === null || _item$_productOrigin29 === void 0 || (_item$_productOrigin29 = _item$_productOrigin29.duration) === null || _item$_productOrigin29 === void 0 ? void 0 : _item$_productOrigin29.value) || 10, 'minutes').format('YYYY-MM-DD HH:mm');
2715
+ resource.endTime = dayjs(currentStartTime).add(((_item$_productOrigin30 = item._productOrigin) === null || _item$_productOrigin30 === void 0 || (_item$_productOrigin30 = _item$_productOrigin30.duration) === null || _item$_productOrigin30 === void 0 ? void 0 : _item$_productOrigin30.value) || 10, 'minutes').format('YYYY-MM-DD HH:mm');
2641
2716
  }
2642
2717
  // delete resource.times;
2643
2718
  });
@@ -2685,42 +2760,42 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2685
2760
  }, {
2686
2761
  key: "openProductDetail",
2687
2762
  value: function () {
2688
- var _openProductDetail = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25(productId) {
2763
+ var _openProductDetail = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26(productId) {
2689
2764
  var targetProductData, newScheduleArr, dateRange;
2690
- return _regeneratorRuntime().wrap(function _callee25$(_context26) {
2691
- while (1) switch (_context26.prev = _context26.next) {
2765
+ return _regeneratorRuntime().wrap(function _callee26$(_context27) {
2766
+ while (1) switch (_context27.prev = _context27.next) {
2692
2767
  case 0:
2693
- _context26.next = 2;
2768
+ _context27.next = 2;
2694
2769
  return this.store.products.getProduct(productId);
2695
2770
  case 2:
2696
- targetProductData = _context26.sent;
2771
+ targetProductData = _context27.sent;
2697
2772
  if (!targetProductData) {
2698
- _context26.next = 17;
2773
+ _context27.next = 17;
2699
2774
  break;
2700
2775
  }
2701
2776
  this.store.currentProduct = targetProductData;
2702
2777
  this.store.currentProductMeta = {};
2703
2778
  // 资源预加载,如果是 duration 类型的商品,且是先选日期的流程,在这里预拉取资源数据
2704
2779
  if (!targetProductData['schedule.ids']) {
2705
- _context26.next = 12;
2780
+ _context27.next = 12;
2706
2781
  break;
2707
2782
  }
2708
2783
  newScheduleArr = this.getScheduleDataByIds(targetProductData['schedule.ids']);
2709
2784
  if (!this.store.currentProductMeta) this.store.currentProductMeta = {};
2710
2785
  this.store.currentProductMeta.schedule = newScheduleArr;
2711
- _context26.next = 17;
2786
+ _context27.next = 17;
2712
2787
  break;
2713
2788
  case 12:
2714
2789
  if (!targetProductData.duration) {
2715
- _context26.next = 17;
2790
+ _context27.next = 17;
2716
2791
  break;
2717
2792
  }
2718
2793
  dateRange = this.store.date.getDateRange(); // 如果不是先选日期的流程 duration 商品就啥也不做
2719
2794
  if (dateRange !== null && dateRange !== void 0 && dateRange.length) {
2720
- _context26.next = 16;
2795
+ _context27.next = 16;
2721
2796
  break;
2722
2797
  }
2723
- return _context26.abrupt("return");
2798
+ return _context27.abrupt("return");
2724
2799
  case 16:
2725
2800
  // this.store.date.getResourceDates({
2726
2801
  // query: {
@@ -2736,11 +2811,11 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2736
2811
  });
2737
2812
  case 17:
2738
2813
  case "end":
2739
- return _context26.stop();
2814
+ return _context27.stop();
2740
2815
  }
2741
- }, _callee25, this);
2816
+ }, _callee26, this);
2742
2817
  }));
2743
- function openProductDetail(_x20) {
2818
+ function openProductDetail(_x21) {
2744
2819
  return _openProductDetail.apply(this, arguments);
2745
2820
  }
2746
2821
  return openProductDetail;
@@ -3991,41 +4066,41 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
3991
4066
  }, {
3992
4067
  key: "getProductTypeById",
3993
4068
  value: function () {
3994
- var _getProductTypeById = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26(id) {
4069
+ var _getProductTypeById = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27(id) {
3995
4070
  var productData, _productData$schedule;
3996
- return _regeneratorRuntime().wrap(function _callee26$(_context27) {
3997
- while (1) switch (_context27.prev = _context27.next) {
4071
+ return _regeneratorRuntime().wrap(function _callee27$(_context28) {
4072
+ while (1) switch (_context28.prev = _context28.next) {
3998
4073
  case 0:
3999
- _context27.next = 2;
4074
+ _context28.next = 2;
4000
4075
  return this.store.products.getProduct(id);
4001
4076
  case 2:
4002
- productData = _context27.sent;
4077
+ productData = _context28.sent;
4003
4078
  if (!productData) {
4004
- _context27.next = 9;
4079
+ _context28.next = 9;
4005
4080
  break;
4006
4081
  }
4007
4082
  if (!productData.duration) {
4008
- _context27.next = 6;
4083
+ _context28.next = 6;
4009
4084
  break;
4010
4085
  }
4011
- return _context27.abrupt("return", 'duration');
4086
+ return _context28.abrupt("return", 'duration');
4012
4087
  case 6:
4013
4088
  if (!((_productData$schedule = productData['schedule.ids']) !== null && _productData$schedule !== void 0 && _productData$schedule.length)) {
4014
- _context27.next = 8;
4089
+ _context28.next = 8;
4015
4090
  break;
4016
4091
  }
4017
- return _context27.abrupt("return", 'session');
4092
+ return _context28.abrupt("return", 'session');
4018
4093
  case 8:
4019
- return _context27.abrupt("return", 'normal');
4094
+ return _context28.abrupt("return", 'normal');
4020
4095
  case 9:
4021
- return _context27.abrupt("return", 'normal');
4096
+ return _context28.abrupt("return", 'normal');
4022
4097
  case 10:
4023
4098
  case "end":
4024
- return _context27.stop();
4099
+ return _context28.stop();
4025
4100
  }
4026
- }, _callee26, this);
4101
+ }, _callee27, this);
4027
4102
  }));
4028
- function getProductTypeById(_x21) {
4103
+ function getProductTypeById(_x22) {
4029
4104
  return _getProductTypeById.apply(this, arguments);
4030
4105
  }
4031
4106
  return getProductTypeById;
@@ -4145,10 +4220,10 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
4145
4220
  }, {
4146
4221
  key: "getTimeslotsScheduleByDateRange",
4147
4222
  value: (function () {
4148
- var _getTimeslotsScheduleByDateRange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27(_ref16) {
4223
+ var _getTimeslotsScheduleByDateRange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28(_ref16) {
4149
4224
  var startDate, endDate, scheduleIds, resources, dates, currentDate, end, results, _i5, _dates, date;
4150
- return _regeneratorRuntime().wrap(function _callee27$(_context28) {
4151
- while (1) switch (_context28.prev = _context28.next) {
4225
+ return _regeneratorRuntime().wrap(function _callee28$(_context29) {
4226
+ while (1) switch (_context29.prev = _context29.next) {
4152
4227
  case 0:
4153
4228
  startDate = _ref16.startDate, endDate = _ref16.endDate, scheduleIds = _ref16.scheduleIds, resources = _ref16.resources;
4154
4229
  console.log('appoimentBooking-session-date-getTimeslotsScheduleByDateRange', {
@@ -4175,14 +4250,14 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
4175
4250
  resources: resources
4176
4251
  });
4177
4252
  }
4178
- return _context28.abrupt("return", results);
4253
+ return _context29.abrupt("return", results);
4179
4254
  case 9:
4180
4255
  case "end":
4181
- return _context28.stop();
4256
+ return _context29.stop();
4182
4257
  }
4183
- }, _callee27, this);
4258
+ }, _callee28, this);
4184
4259
  }));
4185
- function getTimeslotsScheduleByDateRange(_x22) {
4260
+ function getTimeslotsScheduleByDateRange(_x23) {
4186
4261
  return _getTimeslotsScheduleByDateRange.apply(this, arguments);
4187
4262
  }
4188
4263
  return getTimeslotsScheduleByDateRange;
@@ -4190,7 +4265,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
4190
4265
  }, {
4191
4266
  key: "getAvailableDateForSessionOptimize",
4192
4267
  value: function () {
4193
- var _getAvailableDateForSessionOptimize = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28() {
4268
+ var _getAvailableDateForSessionOptimize = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29() {
4194
4269
  var _this$store$currentPr3, _this$store$currentPr4, _tempProducts;
4195
4270
  var params,
4196
4271
  startDate,
@@ -4210,11 +4285,11 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
4210
4285
  allProductResources,
4211
4286
  targetSchedules,
4212
4287
  _loop8,
4213
- _args30 = arguments;
4214
- return _regeneratorRuntime().wrap(function _callee28$(_context30) {
4215
- while (1) switch (_context30.prev = _context30.next) {
4288
+ _args31 = arguments;
4289
+ return _regeneratorRuntime().wrap(function _callee29$(_context31) {
4290
+ while (1) switch (_context31.prev = _context31.next) {
4216
4291
  case 0:
4217
- params = _args30.length > 0 && _args30[0] !== undefined ? _args30[0] : {};
4292
+ params = _args31.length > 0 && _args31[0] !== undefined ? _args31[0] : {};
4218
4293
  // 开始日期如果小于今天,直接以今天当做开始日期
4219
4294
  startDate = params.startDate, endDate = params.endDate; // 前端传递的 startDate,可能是今天之前的,如果 startDate 小于今天 且 endDate 小于或等于今天,需要把 startDate 置为今天
4220
4295
  if (dayjs(startDate).isBefore(dayjs(), 'day') && (dayjs(endDate).isAfter(dayjs(), 'day') || dayjs(endDate).isSame(dayjs(), 'day'))) {
@@ -4239,15 +4314,15 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
4239
4314
  // 先去读缓存结果,因为正常 UI 调用的是 7 天,而下面我会直接计算 30 天(最少也是 14 天),所以先去读缓存结果,如果缓存结果存在,则直接返回
4240
4315
  cache = (_this$store$currentPr3 = this.store.currentProductMeta) === null || _this$store$currentPr3 === void 0 ? void 0 : _this$store$currentPr3['timeSlotBySchedule'];
4241
4316
  if (!cache) {
4242
- _context30.next = 13;
4317
+ _context31.next = 13;
4243
4318
  break;
4244
4319
  }
4245
4320
  if (!(dayjs(params.startDate).isSameOrAfter(dayjs(cache.startDate), 'day') && dayjs(params.endDate).isSameOrBefore(dayjs(cache.endDate), 'day'))) {
4246
- _context30.next = 13;
4321
+ _context31.next = 13;
4247
4322
  break;
4248
4323
  }
4249
4324
  this.store.date.setDateList(cache.dateList);
4250
- return _context30.abrupt("return", {
4325
+ return _context31.abrupt("return", {
4251
4326
  dateList: cache.dateList,
4252
4327
  firstAvailableDate: cache.firstAvailableDate
4253
4328
  });
@@ -4257,7 +4332,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
4257
4332
  schedule = (_this$store$currentPr4 = this.store.currentProductMeta) === null || _this$store$currentPr4 === void 0 ? void 0 : _this$store$currentPr4['schedule'];
4258
4333
  filteredSchedule = filterScheduleByDateRange(schedule, startDate || '', endDate || ''); // 1.后端返回的数据,确定资源在每一天的可用和使用情况
4259
4334
  tempResourceIds = getResourcesIdsByProduct(tempProducts);
4260
- _context30.next = 19;
4335
+ _context31.next = 19;
4261
4336
  return this.store.date.fetchResourceDates({
4262
4337
  query: {
4263
4338
  start_date: startDate || '',
@@ -4266,7 +4341,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
4266
4341
  }
4267
4342
  });
4268
4343
  case 19:
4269
- res = _context30.sent;
4344
+ res = _context31.sent;
4270
4345
  // 2. 商品 schedule 数据,确定日程在每一天的时间片
4271
4346
  // 3. 把后端返回的和 schedule 的数据进行合并,确定每一天的可用和使用情况
4272
4347
  dates = [];
@@ -4288,8 +4363,8 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
4288
4363
  targetSchedules = this.store.schedule.getScheduleListByIds(tempProducts['schedule.ids']);
4289
4364
  _loop8 = /*#__PURE__*/_regeneratorRuntime().mark(function _loop8() {
4290
4365
  var currentDateStr, status, summaryCount, availableCount, _checkSessionProductL, latestStartDate, earliestEndDate, scheduleByDate, minTimeMaxTime, scheduleTimeSlots, timesSlotCanUse, dateStatus, usageRatio;
4291
- return _regeneratorRuntime().wrap(function _loop8$(_context29) {
4292
- while (1) switch (_context29.prev = _context29.next) {
4366
+ return _regeneratorRuntime().wrap(function _loop8$(_context30) {
4367
+ while (1) switch (_context30.prev = _context30.next) {
4293
4368
  case 0:
4294
4369
  currentDateStr = currentDate.format('YYYY-MM-DD');
4295
4370
  status = 'available';
@@ -4448,32 +4523,32 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
4448
4523
 
4449
4524
  // 如果 firstAvailableDate 距离 startDate 大于 14 天了,则后面就不需要再找了,也是一种性能保护
4450
4525
  if (!(firstAvailableDate && dayjs(currentDate).diff(dayjs(startDate), 'day') > 31)) {
4451
- _context29.next = 12;
4526
+ _context30.next = 12;
4452
4527
  break;
4453
4528
  }
4454
- return _context29.abrupt("return", 1);
4529
+ return _context30.abrupt("return", 1);
4455
4530
  case 12:
4456
4531
  currentDate = dayjs(currentDate).add(1, 'day');
4457
4532
  case 13:
4458
4533
  case "end":
4459
- return _context29.stop();
4534
+ return _context30.stop();
4460
4535
  }
4461
4536
  }, _loop8);
4462
4537
  });
4463
4538
  case 28:
4464
4539
  if (!(dayjs(currentDate).isBefore(dayjs(endDate), 'day') || dayjs(currentDate).isSame(dayjs(endDate), 'day'))) {
4465
- _context30.next = 34;
4540
+ _context31.next = 34;
4466
4541
  break;
4467
4542
  }
4468
- return _context30.delegateYield(_loop8(), "t0", 30);
4543
+ return _context31.delegateYield(_loop8(), "t0", 30);
4469
4544
  case 30:
4470
- if (!_context30.t0) {
4471
- _context30.next = 32;
4545
+ if (!_context31.t0) {
4546
+ _context31.next = 32;
4472
4547
  break;
4473
4548
  }
4474
- return _context30.abrupt("break", 34);
4549
+ return _context31.abrupt("break", 34);
4475
4550
  case 32:
4476
- _context30.next = 28;
4551
+ _context31.next = 28;
4477
4552
  break;
4478
4553
  case 34:
4479
4554
  // 最终把资源数据也加到日期内
@@ -4488,15 +4563,15 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
4488
4563
  startDate: startDate,
4489
4564
  endDate: dayjs(currentDate).format('YYYY-MM-DD')
4490
4565
  };
4491
- return _context30.abrupt("return", {
4566
+ return _context31.abrupt("return", {
4492
4567
  dateList: dates,
4493
4568
  firstAvailableDate: firstAvailableDate
4494
4569
  });
4495
4570
  case 39:
4496
4571
  case "end":
4497
- return _context30.stop();
4572
+ return _context31.stop();
4498
4573
  }
4499
- }, _callee28, this);
4574
+ }, _callee29, this);
4500
4575
  }));
4501
4576
  function getAvailableDateForSessionOptimize() {
4502
4577
  return _getAvailableDateForSessionOptimize.apply(this, arguments);
@@ -4543,18 +4618,18 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
4543
4618
  }, {
4544
4619
  key: "getContactInfo",
4545
4620
  value: (function () {
4546
- var _getContactInfo = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29(params) {
4547
- return _regeneratorRuntime().wrap(function _callee29$(_context31) {
4548
- while (1) switch (_context31.prev = _context31.next) {
4621
+ var _getContactInfo = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee30(params) {
4622
+ return _regeneratorRuntime().wrap(function _callee30$(_context32) {
4623
+ while (1) switch (_context32.prev = _context32.next) {
4549
4624
  case 0:
4550
- return _context31.abrupt("return", this.request.get('/customer/metadata', params));
4625
+ return _context32.abrupt("return", this.request.get('/customer/metadata', params));
4551
4626
  case 1:
4552
4627
  case "end":
4553
- return _context31.stop();
4628
+ return _context32.stop();
4554
4629
  }
4555
- }, _callee29, this);
4630
+ }, _callee30, this);
4556
4631
  }));
4557
- function getContactInfo(_x23) {
4632
+ function getContactInfo(_x24) {
4558
4633
  return _getContactInfo.apply(this, arguments);
4559
4634
  }
4560
4635
  return getContactInfo;