@pisell/pisellos 2.3.144 → 2.3.145

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 (30) hide show
  1. package/dist/modules/BookingContext/utils/productExtend.d.ts +7 -0
  2. package/dist/modules/BookingContext/utils/productExtend.js +62 -18
  3. package/dist/modules/Order/index.d.ts +1 -0
  4. package/dist/modules/Order/index.js +380 -198
  5. package/dist/modules/Order/types.d.ts +9 -0
  6. package/dist/modules/ResourcePlanner/planner.d.ts +2 -0
  7. package/dist/modules/ResourcePlanner/planner.js +327 -22
  8. package/dist/modules/ResourcePlanner/types.d.ts +29 -0
  9. package/dist/solution/BookingByStep/index.d.ts +1 -1
  10. package/dist/solution/BookingTicket/utils/addProductDecision.d.ts +0 -1
  11. package/dist/solution/BookingTicket/utils/addProductDecision.js +1 -1
  12. package/dist/solution/UnifiedBookingSales/index.d.ts +3 -0
  13. package/dist/solution/UnifiedBookingSales/index.js +432 -163
  14. package/dist/solution/UnifiedBookingSales/types.d.ts +14 -2
  15. package/lib/model/strategy/adapter/promotion/index.js +46 -1
  16. package/lib/modules/BookingContext/utils/productExtend.d.ts +7 -0
  17. package/lib/modules/BookingContext/utils/productExtend.js +45 -2
  18. package/lib/modules/Order/index.d.ts +1 -0
  19. package/lib/modules/Order/index.js +92 -10
  20. package/lib/modules/Order/types.d.ts +9 -0
  21. package/lib/modules/ResourcePlanner/planner.d.ts +2 -0
  22. package/lib/modules/ResourcePlanner/planner.js +247 -7
  23. package/lib/modules/ResourcePlanner/types.d.ts +29 -0
  24. package/lib/solution/BookingByStep/index.d.ts +1 -1
  25. package/lib/solution/BookingTicket/utils/addProductDecision.d.ts +0 -1
  26. package/lib/solution/BookingTicket/utils/addProductDecision.js +1 -1
  27. package/lib/solution/UnifiedBookingSales/index.d.ts +3 -0
  28. package/lib/solution/UnifiedBookingSales/index.js +220 -27
  29. package/lib/solution/UnifiedBookingSales/types.d.ts +14 -2
  30. package/package.json +1 -1
@@ -55,7 +55,7 @@ import { RulesModule } from "../Rules";
55
55
  import { isEntitlementPass, isFullCoveragePass } from "../Discount/entitlementPass";
56
56
  import { UnavailableReason } from "../Rules/types";
57
57
  import Decimal from 'decimal.js';
58
- import { cloneDeep } from 'lodash-es';
58
+ import { cloneDeep, isEqual } from 'lodash-es';
59
59
  function normalizeDiscountListSignature(discountList) {
60
60
  return (discountList || []).map(function (item) {
61
61
  var _item$type, _item$discount_id, _item$order_discount_;
@@ -1236,49 +1236,55 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
1236
1236
  }, {
1237
1237
  key: "evaluatePromotion",
1238
1238
  value: (function () {
1239
- var _evaluatePromotion = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
1239
+ var _evaluatePromotion = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(options) {
1240
1240
  var _this$promotionEvalua,
1241
1241
  _this$promotionEvalua2,
1242
1242
  _this6 = this;
1243
- var tempOrder, strategyConfigs, result, removeSet, _iterator3, _step3, reduce, _iterator6, _step6, _loop2, _iterator4, _step4, _loop, payload;
1243
+ var tempOrder, strategyConfigs, result, removeSet, _iterator3, _step3, reduce, _iterator6, _step6, _loop2, _iterator4, _step4, _loop, _ret, payload;
1244
1244
  return _regeneratorRuntime().wrap(function _callee7$(_context9) {
1245
1245
  while (1) switch (_context9.prev = _context9.next) {
1246
1246
  case 0:
1247
- if (!(this.isApplyingPromotion || this.isEmittingPromotionApplied)) {
1247
+ if (!(options !== null && options !== void 0 && options.isCurrentOrder && !options.isCurrentOrder())) {
1248
1248
  _context9.next = 2;
1249
1249
  break;
1250
1250
  }
1251
1251
  return _context9.abrupt("return", null);
1252
1252
  case 2:
1253
- if (this.promotionEvaluator) {
1253
+ if (!(this.isApplyingPromotion || this.isEmittingPromotionApplied)) {
1254
1254
  _context9.next = 4;
1255
1255
  break;
1256
1256
  }
1257
1257
  return _context9.abrupt("return", null);
1258
1258
  case 4:
1259
+ if (this.promotionEvaluator) {
1260
+ _context9.next = 6;
1261
+ break;
1262
+ }
1263
+ return _context9.abrupt("return", null);
1264
+ case 6:
1259
1265
  tempOrder = this.store.tempOrder;
1260
1266
  if (tempOrder) {
1261
- _context9.next = 7;
1267
+ _context9.next = 9;
1262
1268
  break;
1263
1269
  }
1264
1270
  return _context9.abrupt("return", null);
1265
- case 7:
1271
+ case 9:
1266
1272
  if (!this.isActiveVirtualSettlementOrder(tempOrder)) {
1267
- _context9.next = 10;
1273
+ _context9.next = 12;
1268
1274
  break;
1269
1275
  }
1270
1276
  tempOrder.products = normalizeVirtualSettlementProducts(tempOrder.products);
1271
1277
  return _context9.abrupt("return", null);
1272
- case 10:
1278
+ case 12:
1273
1279
  strategyConfigs = (_this$promotionEvalua = (_this$promotionEvalua2 = this.promotionEvaluator).getStrategyConfigs) === null || _this$promotionEvalua === void 0 ? void 0 : _this$promotionEvalua.call(_this$promotionEvalua2);
1274
1280
  if (!(Array.isArray(strategyConfigs) && strategyConfigs.length === 0)) {
1275
- _context9.next = 13;
1281
+ _context9.next = 15;
1276
1282
  break;
1277
1283
  }
1278
1284
  return _context9.abrupt("return", null);
1279
- case 13:
1285
+ case 15:
1280
1286
  this.isApplyingPromotion = true;
1281
- _context9.prev = 14;
1287
+ _context9.prev = 16;
1282
1288
  result = processCartPromotion(tempOrder.products, this.promotionEvaluator); // step 1: toRemove —— 直接过滤
1283
1289
  if (result.giftActions.toRemove.length > 0) {
1284
1290
  removeSet = new Set(result.giftActions.toRemove.map(String));
@@ -1290,16 +1296,16 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
1290
1296
 
1291
1297
  // step 2: toReduce —— 调整数量
1292
1298
  _iterator3 = _createForOfIteratorHelper(result.giftActions.toReduce);
1293
- _context9.prev = 18;
1299
+ _context9.prev = 20;
1294
1300
  _iterator3.s();
1295
- case 20:
1301
+ case 22:
1296
1302
  if ((_step3 = _iterator3.n()).done) {
1297
- _context9.next = 40;
1303
+ _context9.next = 42;
1298
1304
  break;
1299
1305
  }
1300
1306
  reduce = _step3.value;
1301
1307
  _iterator6 = _createForOfIteratorHelper(reduce.items);
1302
- _context9.prev = 23;
1308
+ _context9.prev = 25;
1303
1309
  _loop2 = /*#__PURE__*/_regeneratorRuntime().mark(function _loop2() {
1304
1310
  var item, product;
1305
1311
  return _regeneratorRuntime().wrap(function _loop2$(_context8) {
@@ -1319,47 +1325,47 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
1319
1325
  }, _loop2);
1320
1326
  });
1321
1327
  _iterator6.s();
1322
- case 26:
1328
+ case 28:
1323
1329
  if ((_step6 = _iterator6.n()).done) {
1324
- _context9.next = 30;
1330
+ _context9.next = 32;
1325
1331
  break;
1326
1332
  }
1327
- return _context9.delegateYield(_loop2(), "t0", 28);
1328
- case 28:
1329
- _context9.next = 26;
1330
- break;
1333
+ return _context9.delegateYield(_loop2(), "t0", 30);
1331
1334
  case 30:
1332
- _context9.next = 35;
1335
+ _context9.next = 28;
1333
1336
  break;
1334
1337
  case 32:
1335
- _context9.prev = 32;
1336
- _context9.t1 = _context9["catch"](23);
1338
+ _context9.next = 37;
1339
+ break;
1340
+ case 34:
1341
+ _context9.prev = 34;
1342
+ _context9.t1 = _context9["catch"](25);
1337
1343
  _iterator6.e(_context9.t1);
1338
- case 35:
1339
- _context9.prev = 35;
1344
+ case 37:
1345
+ _context9.prev = 37;
1340
1346
  _iterator6.f();
1341
- return _context9.finish(35);
1342
- case 38:
1343
- _context9.next = 20;
1344
- break;
1347
+ return _context9.finish(37);
1345
1348
  case 40:
1346
- _context9.next = 45;
1349
+ _context9.next = 22;
1347
1350
  break;
1348
1351
  case 42:
1349
- _context9.prev = 42;
1350
- _context9.t2 = _context9["catch"](18);
1352
+ _context9.next = 47;
1353
+ break;
1354
+ case 44:
1355
+ _context9.prev = 44;
1356
+ _context9.t2 = _context9["catch"](20);
1351
1357
  _iterator3.e(_context9.t2);
1352
- case 45:
1353
- _context9.prev = 45;
1358
+ case 47:
1359
+ _context9.prev = 47;
1354
1360
  _iterator3.f();
1355
- return _context9.finish(45);
1356
- case 48:
1361
+ return _context9.finish(47);
1362
+ case 50:
1357
1363
  if (!(result.giftActions.toAdd.length > 0)) {
1358
- _context9.next = 71;
1364
+ _context9.next = 76;
1359
1365
  break;
1360
1366
  }
1361
1367
  if (this.giftSelectResolver) {
1362
- _context9.next = 53;
1368
+ _context9.next = 55;
1363
1369
  break;
1364
1370
  }
1365
1371
  if (result.giftActions.toAdd.some(function (g) {
@@ -1370,13 +1376,13 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
1370
1376
  } else {
1371
1377
  console.warn('[OrderModule] giftSelectResolver not set, skip applying single-option gifts', result.giftActions.toAdd);
1372
1378
  }
1373
- _context9.next = 71;
1379
+ _context9.next = 76;
1374
1380
  break;
1375
- case 53:
1381
+ case 55:
1376
1382
  _iterator4 = _createForOfIteratorHelper(result.giftActions.toAdd);
1377
- _context9.prev = 54;
1383
+ _context9.prev = 56;
1378
1384
  _loop = /*#__PURE__*/_regeneratorRuntime().mark(function _loop() {
1379
- var addAction, _sameStrategy$metadat, sameStrategy, giftResult, giftProducts, giftBookings, _iterator5, _step5, _step5$value, index, gp, booking, linked;
1385
+ var addAction, _sameStrategy$metadat, sameStrategy, giftMutationBaseline, giftResult, giftProducts, giftBookings, _iterator5, _step5, _step5$value, index, gp, booking, linked;
1380
1386
  return _regeneratorRuntime().wrap(function _loop$(_context7) {
1381
1387
  while (1) switch (_context7.prev = _context7.next) {
1382
1388
  case 0:
@@ -1394,10 +1400,14 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
1394
1400
  break;
1395
1401
  }
1396
1402
  sameStrategy.num = (Number(sameStrategy.num) || 0) + (addAction.giftCount || 1);
1397
- return _context7.abrupt("return", 1);
1403
+ return _context7.abrupt("return", 0);
1398
1404
  case 6:
1399
- _context7.prev = 6;
1400
- _context7.next = 9;
1405
+ giftMutationBaseline = options !== null && options !== void 0 && options.isCurrentOrder ? cloneDeep({
1406
+ products: tempOrder.products,
1407
+ bookings: tempOrder.bookings
1408
+ }) : null;
1409
+ _context7.prev = 7;
1410
+ _context7.next = 10;
1401
1411
  return _this6.giftSelectResolver({
1402
1412
  strategyId: addAction.strategyId,
1403
1413
  strategyName: addAction.strategyName,
@@ -1405,32 +1415,51 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
1405
1415
  giftOptions: addAction.giftOptions,
1406
1416
  sourceProductIds: addAction.sourceProductIds
1407
1417
  });
1408
- case 9:
1418
+ case 10:
1409
1419
  giftResult = _context7.sent;
1420
+ if (!(options !== null && options !== void 0 && options.isCurrentOrder && !options.isCurrentOrder())) {
1421
+ _context7.next = 13;
1422
+ break;
1423
+ }
1424
+ return _context7.abrupt("return", {
1425
+ v: null
1426
+ });
1427
+ case 13:
1428
+ if (!(options !== null && options !== void 0 && options.isCurrentOrder && !isEqual({
1429
+ products: tempOrder.products,
1430
+ bookings: tempOrder.bookings
1431
+ }, giftMutationBaseline))) {
1432
+ _context7.next = 15;
1433
+ break;
1434
+ }
1435
+ return _context7.abrupt("return", {
1436
+ v: null
1437
+ });
1438
+ case 15:
1410
1439
  giftProducts = Array.isArray(giftResult) ? giftResult : giftResult === null || giftResult === void 0 ? void 0 : giftResult.products;
1411
1440
  giftBookings = Array.isArray(giftResult) ? [] : (giftResult === null || giftResult === void 0 ? void 0 : giftResult.bookings) || [];
1412
1441
  if (!(Array.isArray(giftProducts) && giftProducts.length > 0)) {
1413
- _context7.next = 37;
1442
+ _context7.next = 42;
1414
1443
  break;
1415
1444
  }
1416
1445
  _iterator5 = _createForOfIteratorHelper(giftProducts.entries());
1417
- _context7.prev = 14;
1446
+ _context7.prev = 19;
1418
1447
  _iterator5.s();
1419
- case 16:
1448
+ case 21:
1420
1449
  if ((_step5 = _iterator5.n()).done) {
1421
- _context7.next = 29;
1450
+ _context7.next = 34;
1422
1451
  break;
1423
1452
  }
1424
1453
  _step5$value = _slicedToArray(_step5.value, 2), index = _step5$value[0], gp = _step5$value[1];
1425
1454
  if (gp) {
1426
- _context7.next = 20;
1455
+ _context7.next = 25;
1427
1456
  break;
1428
1457
  }
1429
- return _context7.abrupt("continue", 27);
1430
- case 20:
1458
+ return _context7.abrupt("continue", 32);
1459
+ case 25:
1431
1460
  booking = giftBookings[index];
1432
1461
  if (!booking) {
1433
- _context7.next = 26;
1462
+ _context7.next = 31;
1434
1463
  break;
1435
1464
  }
1436
1465
  linked = _this6.createLinkedProductAndBooking({
@@ -1439,66 +1468,98 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
1439
1468
  });
1440
1469
  result.products.push(linked.product);
1441
1470
  tempOrder.bookings = [].concat(_toConsumableArray(tempOrder.bookings || []), [linked.booking]);
1442
- return _context7.abrupt("continue", 27);
1443
- case 26:
1471
+ return _context7.abrupt("continue", 32);
1472
+ case 31:
1444
1473
  // normalize 略过:调用方应保证返回完整 OrderProduct。
1445
1474
  result.products.push(gp);
1446
- case 27:
1447
- _context7.next = 16;
1448
- break;
1449
- case 29:
1450
- _context7.next = 34;
1475
+ case 32:
1476
+ _context7.next = 21;
1451
1477
  break;
1452
- case 31:
1453
- _context7.prev = 31;
1454
- _context7.t0 = _context7["catch"](14);
1455
- _iterator5.e(_context7.t0);
1456
1478
  case 34:
1457
- _context7.prev = 34;
1458
- _iterator5.f();
1459
- return _context7.finish(34);
1460
- case 37:
1461
- _context7.next = 42;
1479
+ _context7.next = 39;
1462
1480
  break;
1481
+ case 36:
1482
+ _context7.prev = 36;
1483
+ _context7.t0 = _context7["catch"](19);
1484
+ _iterator5.e(_context7.t0);
1463
1485
  case 39:
1464
1486
  _context7.prev = 39;
1465
- _context7.t1 = _context7["catch"](6);
1487
+ _iterator5.f();
1488
+ return _context7.finish(39);
1489
+ case 42:
1490
+ _context7.next = 51;
1491
+ break;
1492
+ case 44:
1493
+ _context7.prev = 44;
1494
+ _context7.t1 = _context7["catch"](7);
1495
+ if (!(options !== null && options !== void 0 && options.isCurrentOrder && !options.isCurrentOrder())) {
1496
+ _context7.next = 48;
1497
+ break;
1498
+ }
1499
+ return _context7.abrupt("return", {
1500
+ v: null
1501
+ });
1502
+ case 48:
1503
+ if (!(options !== null && options !== void 0 && options.isCurrentOrder && !isEqual({
1504
+ products: tempOrder.products,
1505
+ bookings: tempOrder.bookings
1506
+ }, giftMutationBaseline))) {
1507
+ _context7.next = 50;
1508
+ break;
1509
+ }
1510
+ return _context7.abrupt("return", {
1511
+ v: null
1512
+ });
1513
+ case 50:
1466
1514
  // 用户取消 / 选择失败 → 视为放弃本次新增
1467
1515
  console.warn('[OrderModule] giftSelectResolver rejected, skip add gift', addAction.strategyId, _context7.t1);
1468
- case 42:
1516
+ case 51:
1469
1517
  case "end":
1470
1518
  return _context7.stop();
1471
1519
  }
1472
- }, _loop, null, [[6, 39], [14, 31, 34, 37]]);
1520
+ }, _loop, null, [[7, 44], [19, 36, 39, 42]]);
1473
1521
  });
1474
1522
  _iterator4.s();
1475
- case 57:
1523
+ case 59:
1476
1524
  if ((_step4 = _iterator4.n()).done) {
1477
- _context9.next = 63;
1525
+ _context9.next = 68;
1478
1526
  break;
1479
1527
  }
1480
- return _context9.delegateYield(_loop(), "t3", 59);
1481
- case 59:
1482
- if (!_context9.t3) {
1483
- _context9.next = 61;
1528
+ return _context9.delegateYield(_loop(), "t3", 61);
1529
+ case 61:
1530
+ _ret = _context9.t3;
1531
+ if (!(_ret === 0)) {
1532
+ _context9.next = 64;
1484
1533
  break;
1485
1534
  }
1486
- return _context9.abrupt("continue", 61);
1487
- case 61:
1488
- _context9.next = 57;
1535
+ return _context9.abrupt("continue", 66);
1536
+ case 64:
1537
+ if (!_ret) {
1538
+ _context9.next = 66;
1539
+ break;
1540
+ }
1541
+ return _context9.abrupt("return", _ret.v);
1542
+ case 66:
1543
+ _context9.next = 59;
1489
1544
  break;
1490
- case 63:
1491
- _context9.next = 68;
1545
+ case 68:
1546
+ _context9.next = 73;
1492
1547
  break;
1493
- case 65:
1494
- _context9.prev = 65;
1495
- _context9.t4 = _context9["catch"](54);
1548
+ case 70:
1549
+ _context9.prev = 70;
1550
+ _context9.t4 = _context9["catch"](56);
1496
1551
  _iterator4.e(_context9.t4);
1497
- case 68:
1498
- _context9.prev = 68;
1552
+ case 73:
1553
+ _context9.prev = 73;
1499
1554
  _iterator4.f();
1500
- return _context9.finish(68);
1501
- case 71:
1555
+ return _context9.finish(73);
1556
+ case 76:
1557
+ if (!(options !== null && options !== void 0 && options.isCurrentOrder && !options.isCurrentOrder())) {
1558
+ _context9.next = 78;
1559
+ break;
1560
+ }
1561
+ return _context9.abrupt("return", null);
1562
+ case 78:
1502
1563
  tempOrder.products = result.products;
1503
1564
  this.lastUnfulfilledPromotions = result.unfulfilledPromotions;
1504
1565
  this.lastGiftActions = result.giftActions;
@@ -1516,22 +1577,22 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
1516
1577
  products: tempOrder.products
1517
1578
  };
1518
1579
  return _context9.abrupt("return", payload);
1519
- case 78:
1520
- _context9.prev = 78;
1521
- _context9.t5 = _context9["catch"](14);
1580
+ case 85:
1581
+ _context9.prev = 85;
1582
+ _context9.t5 = _context9["catch"](16);
1522
1583
  console.error('[OrderModule] applyPromotion failed', _context9.t5);
1523
1584
  return _context9.abrupt("return", null);
1524
- case 82:
1525
- _context9.prev = 82;
1585
+ case 89:
1586
+ _context9.prev = 89;
1526
1587
  this.isApplyingPromotion = false;
1527
- return _context9.finish(82);
1528
- case 85:
1588
+ return _context9.finish(89);
1589
+ case 92:
1529
1590
  case "end":
1530
1591
  return _context9.stop();
1531
1592
  }
1532
- }, _callee7, this, [[14, 78, 82, 85], [18, 42, 45, 48], [23, 32, 35, 38], [54, 65, 68, 71]]);
1593
+ }, _callee7, this, [[16, 85, 89, 92], [20, 44, 47, 50], [25, 34, 37, 40], [56, 70, 73, 76]]);
1533
1594
  }));
1534
- function evaluatePromotion() {
1595
+ function evaluatePromotion(_x8) {
1535
1596
  return _evaluatePromotion.apply(this, arguments);
1536
1597
  }
1537
1598
  return evaluatePromotion;
@@ -1949,7 +2010,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
1949
2010
  }
1950
2011
  }, _callee10, this);
1951
2012
  }));
1952
- function hydrateTempOrderFromLocalRecord(_x8) {
2013
+ function hydrateTempOrderFromLocalRecord(_x9) {
1953
2014
  return _hydrateTempOrderFromLocalRecord.apply(this, arguments);
1954
2015
  }
1955
2016
  return hydrateTempOrderFromLocalRecord;
@@ -3022,7 +3083,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
3022
3083
  }
3023
3084
  }, _callee11, this);
3024
3085
  }));
3025
- function replaceTempOrder(_x9, _x10) {
3086
+ function replaceTempOrder(_x10, _x11) {
3026
3087
  return _replaceTempOrder.apply(this, arguments);
3027
3088
  }
3028
3089
  return replaceTempOrder;
@@ -3509,30 +3570,36 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
3509
3570
  value: function () {
3510
3571
  var _recalculateSummary = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(options) {
3511
3572
  var _this$otherParams3, _ref53, _salesSummaryResult$e;
3512
- var tempOrder, originalSnapshot, hasShopDiscountChanged, shouldReuseOriginalSnapshot, snapshotSummary, shouldFullRecalculateFromSnapshot, summaryProducts, salesSummary, existedSummary, totalRefundAmount, paidPaymentSummary, emptyBaseSummary, emptySummaryBase, emptySummaryWithDeposit, emptySummary, salesSummaryResult, roundingAmount, payServiceChargeAmount, hasSalesSummaryAmount, expectAmount, amountPaymentPatch, normalizedExpectAmountPatch, summaryForGap, summary;
3573
+ var tempOrder, originalSnapshot, hasShopDiscountChanged, shouldReuseOriginalSnapshot, snapshotSummary, shouldFullRecalculateFromSnapshot, summaryProducts, salesSummary, existedSummary, totalRefundAmount, paidPaymentSummary, emptyBaseSummary, emptySummaryBase, emptySummaryWithDeposit, emptySummary, summaryMutationBaseline, salesSummaryResult, roundingAmount, payServiceChargeAmount, hasSalesSummaryAmount, expectAmount, amountPaymentPatch, normalizedExpectAmountPatch, summaryForGap, summary;
3513
3574
  return _regeneratorRuntime().wrap(function _callee13$(_context15) {
3514
3575
  while (1) switch (_context15.prev = _context15.next) {
3515
3576
  case 0:
3577
+ if (!(options !== null && options !== void 0 && options.isCurrentOrder && !options.isCurrentOrder())) {
3578
+ _context15.next = 2;
3579
+ break;
3580
+ }
3581
+ return _context15.abrupt("return", null);
3582
+ case 2:
3516
3583
  tempOrder = options !== null && options !== void 0 && options.createIfMissing ? this.ensureTempOrder() : this.store.tempOrder;
3517
3584
  if (tempOrder) {
3518
- _context15.next = 3;
3585
+ _context15.next = 5;
3519
3586
  break;
3520
3587
  }
3521
3588
  return _context15.abrupt("return", null);
3522
- case 3:
3589
+ case 5:
3523
3590
  this.sanitizeTempOrderProducts(tempOrder);
3524
3591
  originalSnapshot = this.getOriginalSalesSnapshot(tempOrder);
3525
3592
  hasShopDiscountChanged = originalSnapshot ? this.hasShopDiscountChangedFromSnapshot(tempOrder, originalSnapshot) : false;
3526
3593
  shouldReuseOriginalSnapshot = originalSnapshot && !hasShopDiscountChanged;
3527
3594
  snapshotSummary = shouldReuseOriginalSnapshot ? this.restoreOriginalSnapshotIfProductsUnchanged(tempOrder, originalSnapshot) : null;
3528
3595
  if (!snapshotSummary) {
3529
- _context15.next = 10;
3596
+ _context15.next = 12;
3530
3597
  break;
3531
3598
  }
3532
3599
  return _context15.abrupt("return", snapshotSummary);
3533
- case 10:
3600
+ case 12:
3534
3601
  shouldFullRecalculateFromSnapshot = Boolean(originalSnapshot);
3535
- summaryProducts = shouldFullRecalculateFromSnapshot ? cloneDeep(tempOrder.products || []) : tempOrder.products;
3602
+ summaryProducts = shouldFullRecalculateFromSnapshot || options !== null && options !== void 0 && options.isCurrentOrder ? cloneDeep(tempOrder.products || []) : tempOrder.products;
3536
3603
  if (shouldFullRecalculateFromSnapshot) {
3537
3604
  this.clearPersistedAmountFieldsForFullRecalc(summaryProducts || []);
3538
3605
  }
@@ -3541,7 +3608,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
3541
3608
  totalRefundAmount = existedSummary.total_refund_amount || '0.00';
3542
3609
  paidPaymentSummary = this.calculatePaidPaymentSummary(tempOrder.payments || []);
3543
3610
  if (salesSummary) {
3544
- _context15.next = 26;
3611
+ _context15.next = 28;
3545
3612
  break;
3546
3613
  }
3547
3614
  emptyBaseSummary = _objectSpread(_objectSpread(_objectSpread({}, createEmptySummary()), existedSummary), {}, {
@@ -3568,8 +3635,12 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
3568
3635
  summary: emptySummary
3569
3636
  });
3570
3637
  return _context15.abrupt("return", this.store.summary);
3571
- case 26:
3572
- _context15.next = 28;
3638
+ case 28:
3639
+ summaryMutationBaseline = options !== null && options !== void 0 && options.isCurrentOrder ? cloneDeep({
3640
+ tempOrder: tempOrder,
3641
+ summary: this.store.summary
3642
+ }) : null;
3643
+ _context15.next = 31;
3573
3644
  return salesSummary.getSummary(_objectSpread({
3574
3645
  products: summaryProducts,
3575
3646
  isPriceIncludeTax: tempOrder.is_price_include_tax,
@@ -3578,9 +3649,24 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
3578
3649
  }, (_this$otherParams3 = this.otherParams) !== null && _this$otherParams3 !== void 0 && _this$otherParams3.channel ? {
3579
3650
  channel: this.otherParams.channel
3580
3651
  } : {}));
3581
- case 28:
3652
+ case 31:
3582
3653
  salesSummaryResult = _context15.sent;
3583
- if (shouldFullRecalculateFromSnapshot) {
3654
+ if (!(options !== null && options !== void 0 && options.isCurrentOrder && !options.isCurrentOrder())) {
3655
+ _context15.next = 34;
3656
+ break;
3657
+ }
3658
+ return _context15.abrupt("return", null);
3659
+ case 34:
3660
+ if (!(options !== null && options !== void 0 && options.isCurrentOrder && !isEqual({
3661
+ tempOrder: tempOrder,
3662
+ summary: this.store.summary
3663
+ }, summaryMutationBaseline))) {
3664
+ _context15.next = 36;
3665
+ break;
3666
+ }
3667
+ return _context15.abrupt("return", null);
3668
+ case 36:
3669
+ if (shouldFullRecalculateFromSnapshot || options !== null && options !== void 0 && options.isCurrentOrder) {
3584
3670
  tempOrder.products = summaryProducts;
3585
3671
  }
3586
3672
  this.syncSummaryProductMetadata(tempOrder.products || []);
@@ -3625,13 +3711,13 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
3625
3711
  summary: summary
3626
3712
  });
3627
3713
  return _context15.abrupt("return", this.store.summary);
3628
- case 46:
3714
+ case 53:
3629
3715
  case "end":
3630
3716
  return _context15.stop();
3631
3717
  }
3632
3718
  }, _callee13, this);
3633
3719
  }));
3634
- function recalculateSummary(_x11) {
3720
+ function recalculateSummary(_x12) {
3635
3721
  return _recalculateSummary.apply(this, arguments);
3636
3722
  }
3637
3723
  return recalculateSummary;
@@ -3702,7 +3788,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
3702
3788
  }
3703
3789
  }, _callee15, this);
3704
3790
  }));
3705
- function syncTempOrderNoteToRemote(_x12, _x13) {
3791
+ function syncTempOrderNoteToRemote(_x13, _x14) {
3706
3792
  return _syncTempOrderNoteToRemote.apply(this, arguments);
3707
3793
  }
3708
3794
  return syncTempOrderNoteToRemote;
@@ -3918,7 +4004,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
3918
4004
  }
3919
4005
  }, _callee16, this);
3920
4006
  }));
3921
- function setSalesNote(_x14) {
4007
+ function setSalesNote(_x15) {
3922
4008
  return _setSalesNote.apply(this, arguments);
3923
4009
  }
3924
4010
  return setSalesNote;
@@ -3954,7 +4040,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
3954
4040
  }
3955
4041
  }, _callee17, this);
3956
4042
  }));
3957
- function removeSalesNote(_x15) {
4043
+ function removeSalesNote(_x16) {
3958
4044
  return _removeSalesNote.apply(this, arguments);
3959
4045
  }
3960
4046
  return removeSalesNote;
@@ -4413,7 +4499,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
4413
4499
  }
4414
4500
  }, _callee19, this);
4415
4501
  }));
4416
- function addOrderPaymentAsync(_x16) {
4502
+ function addOrderPaymentAsync(_x17) {
4417
4503
  return _addOrderPaymentAsync.apply(this, arguments);
4418
4504
  }
4419
4505
  return addOrderPaymentAsync;
@@ -4507,7 +4593,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
4507
4593
  }
4508
4594
  }, _callee20, this);
4509
4595
  }));
4510
- function updateOrderPayment(_x17, _x18) {
4596
+ function updateOrderPayment(_x18, _x19) {
4511
4597
  return _updateOrderPayment.apply(this, arguments);
4512
4598
  }
4513
4599
  return updateOrderPayment;
@@ -4734,7 +4820,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
4734
4820
  }
4735
4821
  }, _callee21, this);
4736
4822
  }));
4737
- function updateVoucherOrderPaymentsAsync(_x19, _x20) {
4823
+ function updateVoucherOrderPaymentsAsync(_x20, _x21) {
4738
4824
  return _updateVoucherOrderPaymentsAsync.apply(this, arguments);
4739
4825
  }
4740
4826
  return updateVoucherOrderPaymentsAsync;
@@ -4890,52 +4976,82 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
4890
4976
  key: "finalizeProductOrderMutation",
4891
4977
  value: function () {
4892
4978
  var _finalizeProductOrderMutation = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22(tempOrder, options) {
4893
- var isVirtualSettlement, promotionPayload;
4979
+ var isCurrentOrder, isVirtualSettlement, promotionPayload, summary;
4894
4980
  return _regeneratorRuntime().wrap(function _callee22$(_context24) {
4895
4981
  while (1) switch (_context24.prev = _context24.next) {
4896
4982
  case 0:
4983
+ isCurrentOrder = options === null || options === void 0 ? void 0 : options.isCurrentOrder;
4984
+ if (!(isCurrentOrder && !isCurrentOrder())) {
4985
+ _context24.next = 3;
4986
+ break;
4987
+ }
4988
+ return _context24.abrupt("return");
4989
+ case 3:
4897
4990
  this.syncTempOrderHolderFromBookings(tempOrder);
4898
4991
  this.prepareVirtualSettlementTempOrder(tempOrder);
4899
4992
  isVirtualSettlement = this.isActiveVirtualSettlementOrder(tempOrder);
4900
4993
  if (!(!(options !== null && options !== void 0 && options.skipEditDiscountConfigRefresh) && !isVirtualSettlement)) {
4901
- _context24.next = 6;
4994
+ _context24.next = 9;
4902
4995
  break;
4903
4996
  }
4904
- _context24.next = 6;
4997
+ _context24.next = 9;
4905
4998
  return this.ensureEditDiscountConfigForProductChange(tempOrder);
4906
- case 6:
4999
+ case 9:
5000
+ if (!(isCurrentOrder && !isCurrentOrder())) {
5001
+ _context24.next = 11;
5002
+ break;
5003
+ }
5004
+ return _context24.abrupt("return");
5005
+ case 11:
4907
5006
  if (!(!(options !== null && options !== void 0 && options.skipDiscountRecalculation) && !isVirtualSettlement)) {
4908
- _context24.next = 12;
5007
+ _context24.next = 17;
4909
5008
  break;
4910
5009
  }
4911
- _context24.next = 9;
4912
- return this.evaluatePromotion();
4913
- case 9:
5010
+ _context24.next = 14;
5011
+ return this.evaluatePromotion(isCurrentOrder ? {
5012
+ isCurrentOrder: isCurrentOrder
5013
+ } : undefined);
5014
+ case 14:
4914
5015
  _context24.t0 = _context24.sent;
4915
- _context24.next = 13;
5016
+ _context24.next = 18;
4916
5017
  break;
4917
- case 12:
5018
+ case 17:
4918
5019
  _context24.t0 = null;
4919
- case 13:
5020
+ case 18:
4920
5021
  promotionPayload = _context24.t0;
5022
+ if (!(isCurrentOrder && !isCurrentOrder())) {
5023
+ _context24.next = 21;
5024
+ break;
5025
+ }
5026
+ return _context24.abrupt("return");
5027
+ case 21:
4921
5028
  if (!(options !== null && options !== void 0 && options.skipDiscountRecalculation) && !isVirtualSettlement) {
4922
5029
  this.applyDiscount();
4923
5030
  }
4924
5031
  this.sanitizeTempOrderProducts(tempOrder);
4925
- _context24.next = 18;
4926
- return this.recalculateSummary({
5032
+ _context24.next = 25;
5033
+ return this.recalculateSummary(_objectSpread({
4927
5034
  createIfMissing: true
4928
- });
4929
- case 18:
5035
+ }, isCurrentOrder ? {
5036
+ isCurrentOrder: isCurrentOrder
5037
+ } : {}));
5038
+ case 25:
5039
+ summary = _context24.sent;
5040
+ if (!(isCurrentOrder && (!isCurrentOrder() || !summary))) {
5041
+ _context24.next = 28;
5042
+ break;
5043
+ }
5044
+ return _context24.abrupt("return");
5045
+ case 28:
4930
5046
  this.persistTempOrder();
4931
5047
  this.emitPromotionApplied(promotionPayload);
4932
- case 20:
5048
+ case 30:
4933
5049
  case "end":
4934
5050
  return _context24.stop();
4935
5051
  }
4936
5052
  }, _callee22, this);
4937
5053
  }));
4938
- function finalizeProductOrderMutation(_x21, _x22) {
5054
+ function finalizeProductOrderMutation(_x22, _x23) {
4939
5055
  return _finalizeProductOrderMutation.apply(this, arguments);
4940
5056
  }
4941
5057
  return finalizeProductOrderMutation;
@@ -5181,12 +5297,23 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
5181
5297
  value: (function () {
5182
5298
  var _addProductToOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23(product, booking, options) {
5183
5299
  var _this34 = this;
5184
- var tempOrder, beforeCommit, salesNoteDrafts, mutationSnapshot, attachSalesNoteDrafts, rollbackProductAndNotesMutation, insertAfterProductUid, anchorIndex, insertAtIndex, _ref71, _productRecord$num, productRecord, splitCount, i, splitLine, committedProduct, _committedProduct, _committedProduct2;
5300
+ var availabilityCommitGuard, liveTempOrder, beforeCommit, tempOrder, guardedMutationFields, readGuardedMutationFields, guardedMutationBaseline, salesNoteDrafts, mutationSnapshot, attachSalesNoteDrafts, rollbackProductAndNotesMutation, insertAfterProductUid, anchorIndex, insertAtIndex, _ref71, _productRecord$num, productRecord, splitCount, i, splitLine, committedProduct, _committedProduct, _committedProduct2, committedIdentity, isCurrentOrder;
5185
5301
  return _regeneratorRuntime().wrap(function _callee23$(_context25) {
5186
5302
  while (1) switch (_context25.prev = _context25.next) {
5187
5303
  case 0:
5188
- tempOrder = this.ensureTempOrder();
5189
- beforeCommit = this.createCartIntentCommitGuard('add_product', tempOrder);
5304
+ availabilityCommitGuard = options === null || options === void 0 ? void 0 : options.availabilityCommitGuard;
5305
+ availabilityCommitGuard === null || availabilityCommitGuard === void 0 || availabilityCommitGuard();
5306
+ liveTempOrder = this.ensureTempOrder();
5307
+ beforeCommit = this.createCartIntentCommitGuard('add_product', liveTempOrder); // 自动预约在草稿上准备完整批次,避免拆票期间暴露半成品,或在失败时
5308
+ // 用整单快照回滚而抹掉其他入口的并发修改。人工路径保持原有写入行为。
5309
+ tempOrder = availabilityCommitGuard ? cloneDeep(liveTempOrder) : liveTempOrder;
5310
+ guardedMutationFields = ['products', 'bookings', 'notes', '_extend', 'metadata', 'currency_code', 'currency_symbol', 'currency_format'];
5311
+ readGuardedMutationFields = function readGuardedMutationFields(order) {
5312
+ return Object.fromEntries(guardedMutationFields.map(function (key) {
5313
+ return [key, order[key]];
5314
+ }));
5315
+ };
5316
+ guardedMutationBaseline = availabilityCommitGuard ? cloneDeep(readGuardedMutationFields(liveTempOrder)) : null;
5190
5317
  salesNoteDrafts = ((options === null || options === void 0 ? void 0 : options.salesNotes) || []).map(function (draft) {
5191
5318
  return {
5192
5319
  note_type: String(draft.note_type || '').trim(),
@@ -5234,21 +5361,21 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
5234
5361
  return uid !== undefined && uid !== null && String(uid) === String(insertAfterProductUid);
5235
5362
  }) : -1;
5236
5363
  insertAtIndex = anchorIndex >= 0 ? anchorIndex + 1 : undefined;
5237
- _context25.prev = 9;
5364
+ _context25.prev = 15;
5238
5365
  if (!booking) {
5239
- _context25.next = 34;
5366
+ _context25.next = 42;
5240
5367
  break;
5241
5368
  }
5242
5369
  productRecord = product;
5243
5370
  splitCount = getSafeProductNum((_ref71 = (_productRecord$num = productRecord.num) !== null && _productRecord$num !== void 0 ? _productRecord$num : productRecord.product_quantity) !== null && _ref71 !== void 0 ? _ref71 : 1);
5244
5371
  if (!(splitCount > 1)) {
5245
- _context25.next = 28;
5372
+ _context25.next = 35;
5246
5373
  break;
5247
5374
  }
5248
5375
  i = 0;
5249
- case 15:
5376
+ case 21:
5250
5377
  if (!(i < splitCount)) {
5251
- _context25.next = 26;
5378
+ _context25.next = 33;
5252
5379
  break;
5253
5380
  }
5254
5381
  splitLine = this.createSplitBookingLine(productRecord, booking, i, splitCount);
@@ -5266,70 +5393,125 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
5266
5393
  delete splitLine.booking.metadata.unique_identification_number;
5267
5394
  }
5268
5395
  }
5269
- _context25.next = 20;
5396
+ _context25.next = 26;
5270
5397
  return this.appendProductLineToTempOrder(tempOrder, splitLine.product, splitLine.booking, {
5271
5398
  insertAtIndex: insertAtIndex,
5272
5399
  disableMerge: options === null || options === void 0 ? void 0 : options.disableMerge,
5273
5400
  beforeCommit: beforeCommit
5274
5401
  });
5275
- case 20:
5402
+ case 26:
5276
5403
  committedProduct = _context25.sent;
5404
+ availabilityCommitGuard === null || availabilityCommitGuard === void 0 || availabilityCommitGuard();
5277
5405
  attachSalesNoteDrafts(committedProduct);
5278
5406
  if (insertAtIndex !== undefined) insertAtIndex += 1;
5279
- case 23:
5407
+ case 30:
5280
5408
  i += 1;
5281
- _context25.next = 15;
5409
+ _context25.next = 21;
5282
5410
  break;
5283
- case 26:
5284
- _context25.next = 32;
5411
+ case 33:
5412
+ _context25.next = 40;
5285
5413
  break;
5286
- case 28:
5287
- _context25.next = 30;
5414
+ case 35:
5415
+ _context25.next = 37;
5288
5416
  return this.appendProductLineToTempOrder(tempOrder, product, cloneDeep(booking), {
5289
5417
  insertAtIndex: insertAtIndex,
5290
5418
  disableMerge: options === null || options === void 0 ? void 0 : options.disableMerge,
5291
5419
  beforeCommit: beforeCommit
5292
5420
  });
5293
- case 30:
5421
+ case 37:
5294
5422
  _committedProduct = _context25.sent;
5423
+ availabilityCommitGuard === null || availabilityCommitGuard === void 0 || availabilityCommitGuard();
5295
5424
  attachSalesNoteDrafts(_committedProduct);
5296
- case 32:
5297
- _context25.next = 38;
5425
+ case 40:
5426
+ _context25.next = 47;
5298
5427
  break;
5299
- case 34:
5300
- _context25.next = 36;
5428
+ case 42:
5429
+ _context25.next = 44;
5301
5430
  return this.appendProductLineToTempOrder(tempOrder, product, undefined, {
5302
5431
  insertAtIndex: insertAtIndex,
5303
5432
  disableMerge: options === null || options === void 0 ? void 0 : options.disableMerge,
5304
5433
  beforeCommit: beforeCommit
5305
5434
  });
5306
- case 36:
5435
+ case 44:
5307
5436
  _committedProduct2 = _context25.sent;
5437
+ availabilityCommitGuard === null || availabilityCommitGuard === void 0 || availabilityCommitGuard();
5308
5438
  attachSalesNoteDrafts(_committedProduct2);
5309
- case 38:
5310
- _context25.next = 44;
5439
+ case 47:
5440
+ if (!availabilityCommitGuard) {
5441
+ _context25.next = 53;
5442
+ break;
5443
+ }
5444
+ availabilityCommitGuard();
5445
+ beforeCommit();
5446
+ // 调用方的结构 revision 可能不包括备注、价格或结算元数据。
5447
+ // 本次会覆盖的字段也要保持原值,不能让草稿覆盖并发编辑。
5448
+ if (isEqual(readGuardedMutationFields(liveTempOrder), guardedMutationBaseline)) {
5449
+ _context25.next = 52;
5450
+ break;
5451
+ }
5452
+ throw Object.assign(new Error('预约加购期间订单已变化,请重新选择'), {
5453
+ code: 'AVAILABILITY_SELECTION_STALE'
5454
+ });
5455
+ case 52:
5456
+ // 从最后一次门禁到真正新增之间不再 await。只发布本次新增会改写的
5457
+ // 字段;其余订单字段继续使用 live 对象,外部持有的订单引用也不变。
5458
+ Object.assign(liveTempOrder, readGuardedMutationFields(tempOrder));
5459
+ case 53:
5460
+ _context25.next = 59;
5311
5461
  break;
5312
- case 40:
5313
- _context25.prev = 40;
5314
- _context25.t0 = _context25["catch"](9);
5462
+ case 55:
5463
+ _context25.prev = 55;
5464
+ _context25.t0 = _context25["catch"](15);
5315
5465
  rollbackProductAndNotesMutation();
5316
5466
  throw _context25.t0;
5317
- case 44:
5318
- _context25.next = 46;
5319
- return this.finalizeProductOrderMutation(tempOrder);
5320
- case 46:
5467
+ case 59:
5468
+ if (!availabilityCommitGuard) {
5469
+ _context25.next = 73;
5470
+ break;
5471
+ }
5472
+ committedIdentity = [liveTempOrder.order_id, liveTempOrder.external_sale_number];
5473
+ isCurrentOrder = function isCurrentOrder() {
5474
+ var _options$availability, _options$availability2;
5475
+ return _this34.store.tempOrder === liveTempOrder && liveTempOrder.order_id === committedIdentity[0] && liveTempOrder.external_sale_number === committedIdentity[1] && ((_options$availability = options === null || options === void 0 || (_options$availability2 = options.availabilityCommitTargetGuard) === null || _options$availability2 === void 0 ? void 0 : _options$availability2.call(options)) !== null && _options$availability !== void 0 ? _options$availability : true);
5476
+ };
5477
+ _context25.prev = 62;
5478
+ // 新增已发布,即使后续报价/促销收尾失败,也不能向调用方报告未加购。
5479
+ // 先保存已提交行;异步结果只允许写回仍属于本次提交的订单。
5480
+ if (isCurrentOrder()) this.persistTempOrder();
5481
+ _context25.next = 66;
5482
+ return this.finalizeProductOrderMutation(liveTempOrder, {
5483
+ isCurrentOrder: isCurrentOrder
5484
+ });
5485
+ case 66:
5486
+ _context25.next = 71;
5487
+ break;
5488
+ case 68:
5489
+ _context25.prev = 68;
5490
+ _context25.t1 = _context25["catch"](62);
5491
+ this.logWarning('addProductToOrder committed; finalization failed', {
5492
+ product_id: product.product_id,
5493
+ committed: true,
5494
+ error: _context25.t1 instanceof Error ? _context25.t1.message : String(_context25.t1)
5495
+ });
5496
+ case 71:
5497
+ _context25.next = 75;
5498
+ break;
5499
+ case 73:
5500
+ _context25.next = 75;
5501
+ return this.finalizeProductOrderMutation(liveTempOrder);
5502
+ case 75:
5321
5503
  this.logInfo('addProductToOrder success', {
5322
5504
  product_id: product.product_id,
5323
5505
  with_booking: !!booking
5324
5506
  });
5325
- return _context25.abrupt("return", tempOrder.products);
5326
- case 48:
5507
+ return _context25.abrupt("return", liveTempOrder.products);
5508
+ case 77:
5327
5509
  case "end":
5328
5510
  return _context25.stop();
5329
5511
  }
5330
- }, _callee23, this, [[9, 40]]);
5512
+ }, _callee23, this, [[15, 55], [62, 68]]);
5331
5513
  }));
5332
- function addProductToOrder(_x23, _x24, _x25) {
5514
+ function addProductToOrder(_x24, _x25, _x26) {
5333
5515
  return _addProductToOrder.apply(this, arguments);
5334
5516
  }
5335
5517
  return addProductToOrder;
@@ -5446,7 +5628,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
5446
5628
  }
5447
5629
  }, _callee24, this, [[5, 35, 38, 41]]);
5448
5630
  }));
5449
- function addProductsToOrder(_x26, _x27) {
5631
+ function addProductsToOrder(_x27, _x28) {
5450
5632
  return _addProductsToOrder.apply(this, arguments);
5451
5633
  }
5452
5634
  return addProductsToOrder;
@@ -5852,7 +6034,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
5852
6034
  }
5853
6035
  }, _callee25, this);
5854
6036
  }));
5855
- function updateOrderProduct(_x28) {
6037
+ function updateOrderProduct(_x29) {
5856
6038
  return _updateOrderProduct.apply(this, arguments);
5857
6039
  }
5858
6040
  return updateOrderProduct;
@@ -5903,7 +6085,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
5903
6085
  }
5904
6086
  }, _callee26, this);
5905
6087
  }));
5906
- function updateOrderProducts(_x29) {
6088
+ function updateOrderProducts(_x30) {
5907
6089
  return _updateOrderProducts.apply(this, arguments);
5908
6090
  }
5909
6091
  return updateOrderProducts;
@@ -6027,7 +6209,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
6027
6209
  }
6028
6210
  }, _callee27, this);
6029
6211
  }));
6030
- function updateOrderProductQuantity(_x30) {
6212
+ function updateOrderProductQuantity(_x31) {
6031
6213
  return _updateOrderProductQuantity.apply(this, arguments);
6032
6214
  }
6033
6215
  return updateOrderProductQuantity;
@@ -6096,7 +6278,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
6096
6278
  }
6097
6279
  }, _callee28, this);
6098
6280
  }));
6099
- function finalizeAfterProductsMutation(_x31, _x32) {
6281
+ function finalizeAfterProductsMutation(_x32, _x33) {
6100
6282
  return _finalizeAfterProductsMutation.apply(this, arguments);
6101
6283
  }
6102
6284
  return finalizeAfterProductsMutation;
@@ -6256,7 +6438,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
6256
6438
  }
6257
6439
  }, _callee29, this, [[16, 27, 30, 33]]);
6258
6440
  }));
6259
- function removeProductsFromOrder(_x33, _x34) {
6441
+ function removeProductsFromOrder(_x34, _x35) {
6260
6442
  return _removeProductsFromOrder.apply(this, arguments);
6261
6443
  }
6262
6444
  return removeProductsFromOrder;
@@ -6275,7 +6457,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
6275
6457
  }
6276
6458
  }, _callee30, this);
6277
6459
  }));
6278
- function removeProductFromOrder(_x35, _x36) {
6460
+ function removeProductFromOrder(_x36, _x37) {
6279
6461
  return _removeProductFromOrder.apply(this, arguments);
6280
6462
  }
6281
6463
  return removeProductFromOrder;
@@ -6450,7 +6632,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
6450
6632
  }
6451
6633
  }, _callee33, this);
6452
6634
  }));
6453
- function applyLocalPrintOrderNumbers(_x37) {
6635
+ function applyLocalPrintOrderNumbers(_x38) {
6454
6636
  return _applyLocalPrintOrderNumbers.apply(this, arguments);
6455
6637
  }
6456
6638
  return applyLocalPrintOrderNumbers;
@@ -6517,7 +6699,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
6517
6699
  }
6518
6700
  }, _callee34, this);
6519
6701
  }));
6520
- function saveTempOrderAsDraft(_x38) {
6702
+ function saveTempOrderAsDraft(_x39) {
6521
6703
  return _saveTempOrderAsDraft.apply(this, arguments);
6522
6704
  }
6523
6705
  return saveTempOrderAsDraft;
@@ -6542,7 +6724,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
6542
6724
  }
6543
6725
  }, _callee35, this);
6544
6726
  }));
6545
- function submitTempOrder(_x39) {
6727
+ function submitTempOrder(_x40) {
6546
6728
  return _submitTempOrder.apply(this, arguments);
6547
6729
  }
6548
6730
  return submitTempOrder;
@@ -6563,7 +6745,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
6563
6745
  }
6564
6746
  }, _callee36, this);
6565
6747
  }));
6566
- function submitTempOrderAsync(_x40) {
6748
+ function submitTempOrderAsync(_x41) {
6567
6749
  return _submitTempOrderAsync.apply(this, arguments);
6568
6750
  }
6569
6751
  return submitTempOrderAsync;
@@ -6739,7 +6921,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
6739
6921
  }
6740
6922
  }, _callee37, this, [[28, 35]]);
6741
6923
  }));
6742
- function runSubmitTempOrder(_x41) {
6924
+ function runSubmitTempOrder(_x42) {
6743
6925
  return _runSubmitTempOrder.apply(this, arguments);
6744
6926
  }
6745
6927
  return runSubmitTempOrder;
@@ -6766,7 +6948,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
6766
6948
  }
6767
6949
  }, _callee38, this);
6768
6950
  }));
6769
- function markLocalOrderSynced(_x42, _x43) {
6951
+ function markLocalOrderSynced(_x43, _x44) {
6770
6952
  return _markLocalOrderSynced.apply(this, arguments);
6771
6953
  }
6772
6954
  return markLocalOrderSynced;
@@ -6936,7 +7118,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
6936
7118
  }
6937
7119
  }, _callee39, this);
6938
7120
  }));
6939
- function syncPaymentsToOrder(_x44) {
7121
+ function syncPaymentsToOrder(_x45) {
6940
7122
  return _syncPaymentsToOrder.apply(this, arguments);
6941
7123
  }
6942
7124
  return syncPaymentsToOrder;
@@ -7064,7 +7246,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
7064
7246
  }
7065
7247
  }, _callee40, this);
7066
7248
  }));
7067
- function submitOrder(_x45) {
7249
+ function submitOrder(_x46) {
7068
7250
  return _submitOrder.apply(this, arguments);
7069
7251
  }
7070
7252
  return submitOrder;
@@ -7103,7 +7285,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
7103
7285
  }
7104
7286
  }, _callee41, this);
7105
7287
  }));
7106
- function cancelOrder(_x46) {
7288
+ function cancelOrder(_x47) {
7107
7289
  return _cancelOrder.apply(this, arguments);
7108
7290
  }
7109
7291
  return cancelOrder;
@@ -7147,7 +7329,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
7147
7329
  }
7148
7330
  }, _callee42, this);
7149
7331
  }));
7150
- function changeBookingStatus(_x47) {
7332
+ function changeBookingStatus(_x48) {
7151
7333
  return _changeBookingStatus.apply(this, arguments);
7152
7334
  }
7153
7335
  return changeBookingStatus;
@@ -7267,7 +7449,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
7267
7449
  }
7268
7450
  }, _callee43, this, [[3, 15]]);
7269
7451
  }));
7270
- function createOrderByCheckout(_x48) {
7452
+ function createOrderByCheckout(_x49) {
7271
7453
  return _createOrderByCheckout.apply(this, arguments);
7272
7454
  }
7273
7455
  return createOrderByCheckout;
@@ -7293,7 +7475,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
7293
7475
  }
7294
7476
  }, _callee44, this);
7295
7477
  }));
7296
- function submitSalesOrder(_x49) {
7478
+ function submitSalesOrder(_x50) {
7297
7479
  return _submitSalesOrder.apply(this, arguments);
7298
7480
  }
7299
7481
  return submitSalesOrder;
@@ -7350,7 +7532,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
7350
7532
  }
7351
7533
  }, _callee45, this);
7352
7534
  }));
7353
- function sendCustomerPayLink(_x50) {
7535
+ function sendCustomerPayLink(_x51) {
7354
7536
  return _sendCustomerPayLink.apply(this, arguments);
7355
7537
  }
7356
7538
  return sendCustomerPayLink;
@@ -7392,7 +7574,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
7392
7574
  }
7393
7575
  }, _callee46, this);
7394
7576
  }));
7395
- function getSalesOrderByLookup(_x51) {
7577
+ function getSalesOrderByLookup(_x52) {
7396
7578
  return _getSalesOrderByLookup.apply(this, arguments);
7397
7579
  }
7398
7580
  return getSalesOrderByLookup;
@@ -7563,7 +7745,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
7563
7745
  }
7564
7746
  }, _callee47, this);
7565
7747
  }));
7566
- function hydrateTempOrderFromRecord(_x52, _x53) {
7748
+ function hydrateTempOrderFromRecord(_x53, _x54) {
7567
7749
  return _hydrateTempOrderFromRecord.apply(this, arguments);
7568
7750
  }
7569
7751
  return hydrateTempOrderFromRecord;
@@ -8002,7 +8184,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
8002
8184
  }
8003
8185
  }, _callee48, this);
8004
8186
  }));
8005
- function getOrderInfo(_x54) {
8187
+ function getOrderInfo(_x55) {
8006
8188
  return _getOrderInfo.apply(this, arguments);
8007
8189
  }
8008
8190
  return getOrderInfo;