tods-competition-factory 0.70.3 → 0.72.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -249,7 +249,7 @@ const matchUpFormatCode = {
249
249
  };
250
250
 
251
251
  function factoryVersion() {
252
- return '0.70.3';
252
+ return '0.72.2';
253
253
  }
254
254
 
255
255
  const FORMAT_STANDARD = 'SET3-S:6/TB7'; // Best of 3 Tiebreak Sets to 6
@@ -294,6 +294,7 @@ const RETIRED = 'RETIRED';
294
294
  const SUSPENDED = 'SUSPENDED';
295
295
  const TO_BE_PLAYED = 'TO_BE_PLAYED';
296
296
  const WALKOVER$1 = 'WALKOVER';
297
+ const recoveryTimeRequiredMatchUpStatuses = [AWAITING_RESULT, COMPLETED, DEFAULTED, IN_PROGRESS, INCOMPLETE, RETIRED, SUSPENDED];
297
298
  const particicipantsRequiredMatchUpStatuses = [AWAITING_RESULT, COMPLETED, DEFAULTED, DOUBLE_WALKOVER, IN_PROGRESS, INCOMPLETE, RETIRED, SUSPENDED, WALKOVER$1];
298
299
  const validMatchUpStatuses = [ABANDONED, AWAITING_RESULT, BYE, CANCELLED, COMPLETED, DEAD_RUBBER, DEFAULTED, DOUBLE_WALKOVER, IN_PROGRESS, INCOMPLETE, NOT_PLAYED, RETIRED, SUSPENDED, TO_BE_PLAYED, WALKOVER$1];
299
300
  const directingMatchUpStatuses = [BYE, COMPLETED, DEFAULTED, DOUBLE_WALKOVER, RETIRED, WALKOVER$1];
@@ -11560,6 +11561,8 @@ function getAllStructureMatchUps({
11560
11561
 
11561
11562
  if (tournamentParticipants && matchUpWithContext.sides) {
11562
11563
  matchUpWithContext.sides.filter(Boolean).forEach(side => {
11564
+ var _side$participant;
11565
+
11563
11566
  if (side.participantId) {
11564
11567
  const participant = findParticipant({
11565
11568
  policyDefinitions: appliedPolicies,
@@ -11574,7 +11577,7 @@ function getAllStructureMatchUps({
11574
11577
  }
11575
11578
  }
11576
11579
 
11577
- if (side.participant && side.participant.individualParticipantIds) {
11580
+ if (side !== null && side !== void 0 && (_side$participant = side.participant) !== null && _side$participant !== void 0 && _side$participant.individualParticipantIds) {
11578
11581
  const individualParticipants = side.participant.individualParticipantIds.map(participantId => {
11579
11582
  return findParticipant({
11580
11583
  policyDefinitions: appliedPolicies,
@@ -16878,14 +16881,6 @@ function getPairedPreviousMatchUpIsWOWO(params) {
16878
16881
  roundNumber,
16879
16882
  roundPosition
16880
16883
  }) => roundNumber === previousRoundNumber && roundPosition === pairedRoundPosition);
16881
- /*
16882
- const { pairedPreviousMatchUp } = getPairedPreviousMatchUp({
16883
- matchUp: sourceMatchUp,
16884
- structureId: structure.structureId,
16885
- matchUpsMap,
16886
- });
16887
- */
16888
-
16889
16884
  const pairedPreviousMatchUpStatus = pairedPreviousMatchUp === null || pairedPreviousMatchUp === void 0 ? void 0 : pairedPreviousMatchUp.matchUpStatus;
16890
16885
  const pairedPreviousMatchUpisWOWO = [DOUBLE_WALKOVER].includes(pairedPreviousMatchUpStatus);
16891
16886
  return {
@@ -17439,12 +17434,12 @@ function getWalkoverWinningSide({
17439
17434
  }
17440
17435
 
17441
17436
  function assignMatchUpDrawPosition({
17437
+ inContextDrawMatchUps,
17442
17438
  drawDefinition,
17443
- matchUpId,
17444
17439
  matchUpStatus,
17445
17440
  drawPosition,
17446
17441
  matchUpsMap,
17447
- inContextDrawMatchUps
17442
+ matchUpId
17448
17443
  }) {
17449
17444
  var _drawDefinition$struc, _matchUpsMap, _matchUpsMap$drawMatc;
17450
17445
 
@@ -17519,10 +17514,10 @@ function assignMatchUpDrawPosition({
17519
17514
  }
17520
17515
 
17521
17516
  const targetData = positionTargets({
17522
- matchUpId,
17523
- drawDefinition,
17524
17517
  inContextDrawMatchUps,
17525
- inContextMatchUp
17518
+ inContextMatchUp,
17519
+ drawDefinition,
17520
+ matchUpId
17526
17521
  });
17527
17522
  const {
17528
17523
  targetMatchUps: {
@@ -17543,12 +17538,12 @@ function assignMatchUpDrawPosition({
17543
17538
  if (winnerMatchUp) {
17544
17539
  if ([BYE, DOUBLE_WALKOVER].includes(matchUpStatus)) {
17545
17540
  const result = assignMatchUpDrawPosition({
17546
- drawDefinition,
17547
- drawPosition,
17548
17541
  matchUpId: winnerMatchUp.matchUpId,
17549
17542
  iterative: 'brightmagenta',
17550
- matchUpsMap,
17551
- inContextDrawMatchUps
17543
+ inContextDrawMatchUps,
17544
+ drawDefinition,
17545
+ drawPosition,
17546
+ matchUpsMap
17552
17547
  });
17553
17548
  if (result.error) return result;
17554
17549
  } else {
@@ -17561,24 +17556,24 @@ function assignMatchUpDrawPosition({
17561
17556
  }
17562
17557
  }
17563
17558
  }
17564
- } else {
17559
+ } else if (winnerMatchUp && !inContextMatchUp.feedRound) {
17565
17560
  const {
17566
17561
  pairedPreviousMatchUpisWOWO
17567
17562
  } = getPairedPreviousMatchUpIsWOWO({
17568
17563
  winnerMatchUp: matchUp,
17569
17564
  drawPosition,
17570
- structure,
17571
- matchUpsMap
17565
+ matchUpsMap,
17566
+ structure
17572
17567
  });
17573
17568
 
17574
- if (pairedPreviousMatchUpisWOWO && winnerMatchUp) {
17569
+ if (pairedPreviousMatchUpisWOWO) {
17575
17570
  const result = assignMatchUpDrawPosition({
17576
- drawDefinition,
17577
- drawPosition,
17578
17571
  matchUpId: winnerMatchUp.matchUpId,
17579
17572
  iterative: 'brightred',
17580
- matchUpsMap,
17581
- inContextDrawMatchUps
17573
+ inContextDrawMatchUps,
17574
+ drawDefinition,
17575
+ drawPosition,
17576
+ matchUpsMap
17582
17577
  });
17583
17578
  if (result.error) return result;
17584
17579
  }
@@ -19581,9 +19576,9 @@ function attemptToSetWinningSide(params) {
19581
19576
  }
19582
19577
 
19583
19578
  function getPairedPreviousMatchUp({
19584
- matchUp,
19585
19579
  structureId,
19586
- matchUpsMap
19580
+ matchUpsMap,
19581
+ matchUp
19587
19582
  }) {
19588
19583
  const sourceRoundPosition = matchUp === null || matchUp === void 0 ? void 0 : matchUp.roundPosition;
19589
19584
  const offset = sourceRoundPosition % 2 ? 1 : -1;
@@ -19603,12 +19598,12 @@ function getPairedPreviousMatchUp({
19603
19598
 
19604
19599
  function removeDoubleWalkover(params) {
19605
19600
  const {
19601
+ inContextDrawMatchUps,
19606
19602
  drawDefinition,
19603
+ matchUpsMap,
19607
19604
  targetData,
19608
19605
  structure,
19609
- matchUp,
19610
- matchUpsMap,
19611
- inContextDrawMatchUps
19606
+ matchUp
19612
19607
  } = params;
19613
19608
  const {
19614
19609
  targetLinks: {
@@ -19634,29 +19629,40 @@ function removeDoubleWalkover(params) {
19634
19629
 
19635
19630
 
19636
19631
  if (winnerMatchUp) {
19637
- var _pairedPreviousMatchU;
19638
-
19639
- const noContextWinnerMatchUp = matchUpsMap === null || matchUpsMap === void 0 ? void 0 : matchUpsMap.drawMatchUps.find(matchUp => matchUp.matchUpId === winnerMatchUp.matchUpId);
19640
- const {
19641
- pairedPreviousMatchUp
19642
- } = getPairedPreviousMatchUp({
19643
- matchUp,
19644
- structureId: structure.structureId,
19645
- matchUpsMap
19646
- });
19647
- const pairedPreviousWOWO = (pairedPreviousMatchUp === null || pairedPreviousMatchUp === void 0 ? void 0 : pairedPreviousMatchUp.matchUpStatus) === DOUBLE_WALKOVER;
19648
- const pairedPreviousDrawPositions = (pairedPreviousMatchUp === null || pairedPreviousMatchUp === void 0 ? void 0 : (_pairedPreviousMatchU = pairedPreviousMatchUp.drawPositions) === null || _pairedPreviousMatchU === void 0 ? void 0 : _pairedPreviousMatchU.filter(Boolean)) || [];
19649
- const pairedPreviousMatchUpComplete = [...completedMatchUpStatuses, BYE].includes(pairedPreviousMatchUp === null || pairedPreviousMatchUp === void 0 ? void 0 : pairedPreviousMatchUp.matchUpStatus) || (pairedPreviousMatchUp === null || pairedPreviousMatchUp === void 0 ? void 0 : pairedPreviousMatchUp.winningSide);
19650
19632
  const nextTargetData = positionTargets({
19651
19633
  matchUpId: winnerMatchUp.matchUpId,
19652
- drawDefinition,
19653
- inContextDrawMatchUps
19634
+ inContextDrawMatchUps,
19635
+ drawDefinition
19654
19636
  });
19655
19637
  const {
19656
19638
  targetMatchUps: {
19657
19639
  winnerMatchUp: nextWinnerMatchUp
19658
19640
  }
19659
19641
  } = nextTargetData;
19642
+ const noContextWinnerMatchUp = matchUpsMap === null || matchUpsMap === void 0 ? void 0 : matchUpsMap.drawMatchUps.find(matchUp => matchUp.matchUpId === winnerMatchUp.matchUpId);
19643
+ let pairedPreviousDrawPositions = [];
19644
+ let pairedPreviousMatchUpComplete;
19645
+ let pairedPreviousWOWO; // winnerMatchUp has context
19646
+
19647
+ if (winnerMatchUp.feedRound) {
19648
+ var _nextWinnerMatchUp$dr;
19649
+
19650
+ pairedPreviousDrawPositions = nextWinnerMatchUp === null || nextWinnerMatchUp === void 0 ? void 0 : (_nextWinnerMatchUp$dr = nextWinnerMatchUp.drawPositions) === null || _nextWinnerMatchUp$dr === void 0 ? void 0 : _nextWinnerMatchUp$dr.filter(Boolean);
19651
+ pairedPreviousMatchUpComplete = true;
19652
+ } else {
19653
+ var _pairedPreviousMatchU;
19654
+
19655
+ const {
19656
+ pairedPreviousMatchUp
19657
+ } = getPairedPreviousMatchUp({
19658
+ structureId: structure.structureId,
19659
+ matchUpsMap,
19660
+ matchUp
19661
+ });
19662
+ pairedPreviousWOWO = (pairedPreviousMatchUp === null || pairedPreviousMatchUp === void 0 ? void 0 : pairedPreviousMatchUp.matchUpStatus) === DOUBLE_WALKOVER;
19663
+ pairedPreviousDrawPositions = (pairedPreviousMatchUp === null || pairedPreviousMatchUp === void 0 ? void 0 : (_pairedPreviousMatchU = pairedPreviousMatchUp.drawPositions) === null || _pairedPreviousMatchU === void 0 ? void 0 : _pairedPreviousMatchU.filter(Boolean)) || [];
19664
+ pairedPreviousMatchUpComplete = [...completedMatchUpStatuses, BYE].includes(pairedPreviousMatchUp === null || pairedPreviousMatchUp === void 0 ? void 0 : pairedPreviousMatchUp.matchUpStatus) || (pairedPreviousMatchUp === null || pairedPreviousMatchUp === void 0 ? void 0 : pairedPreviousMatchUp.winningSide);
19665
+ }
19660
19666
 
19661
19667
  if (pairedPreviousMatchUpComplete) {
19662
19668
  const sourceDrawPositions = matchUp.drawPositions || [];
@@ -19671,23 +19677,23 @@ function removeDoubleWalkover(params) {
19671
19677
 
19672
19678
  if (nextWinnerMatchUp && drawPositionToRemove) {
19673
19679
  const result = removeDirectedWinner({
19680
+ winningDrawPosition: drawPositionToRemove,
19674
19681
  winnerMatchUp: nextWinnerMatchUp,
19682
+ inContextDrawMatchUps,
19675
19683
  drawDefinition,
19676
- winningDrawPosition: drawPositionToRemove,
19677
- matchUpsMap,
19678
- inContextDrawMatchUps
19684
+ matchUpsMap
19679
19685
  });
19680
19686
  if (result.error) return result;
19681
19687
  }
19682
19688
  }
19683
19689
 
19684
19690
  removeDoubleWalkover({
19685
- drawDefinition,
19686
19691
  targetData: nextTargetData,
19687
- structure,
19688
19692
  matchUp: winnerMatchUp,
19693
+ inContextDrawMatchUps,
19694
+ drawDefinition,
19689
19695
  matchUpsMap,
19690
- inContextDrawMatchUps
19696
+ structure
19691
19697
  });
19692
19698
  let matchUpStatus = [WALKOVER$1, DOUBLE_WALKOVER].includes(noContextWinnerMatchUp === null || noContextWinnerMatchUp === void 0 ? void 0 : noContextWinnerMatchUp.matchUpStatus) && pairedPreviousWOWO ? WALKOVER$1 : TO_BE_PLAYED;
19693
19699
  const removeScore = !pairedPreviousWOWO;
@@ -20452,17 +20458,17 @@ function setMatchUpStatus$1(params) {
20452
20458
  }
20453
20459
 
20454
20460
  return setMatchUpStatus$2({
20455
- tournamentRecord,
20456
- drawDefinition,
20457
- event,
20458
20461
  matchUpStatusCodes: outcome === null || outcome === void 0 ? void 0 : outcome.matchUpStatusCodes,
20459
20462
  matchUpStatus: outcome === null || outcome === void 0 ? void 0 : outcome.matchUpStatus,
20460
- matchUpFormat,
20461
- matchUpId,
20462
20463
  winningSide: outcome === null || outcome === void 0 ? void 0 : outcome.winningSide,
20463
20464
  allowChangePropagation,
20464
20465
  score: outcome === null || outcome === void 0 ? void 0 : outcome.score,
20466
+ tournamentRecord,
20467
+ drawDefinition,
20468
+ matchUpFormat,
20469
+ matchUpId,
20465
20470
  schedule,
20471
+ event,
20466
20472
  notes
20467
20473
  });
20468
20474
  }
@@ -22316,7 +22322,7 @@ function addParticipantContext(params) {
22316
22322
  var _participant$individu;
22317
22323
 
22318
22324
  const groupParticipantId = participant.participantId;
22319
- (_participant$individu = participant.individualParticipantIds) === null || _participant$individu === void 0 ? void 0 : _participant$individu.forEach(participantId => {
22325
+ participant === null || participant === void 0 ? void 0 : (_participant$individu = participant.individualParticipantIds) === null || _participant$individu === void 0 ? void 0 : _participant$individu.forEach(participantId => {
22320
22326
  if (!participantIdMap[participantId].groupParticipantIds.includes(groupParticipantId)) {
22321
22327
  participantIdMap[participantId].groupParticipantIds.push(groupParticipantId);
22322
22328
  participantIdMap[participantId].groups.push({
@@ -22333,7 +22339,7 @@ function addParticipantContext(params) {
22333
22339
  var _participant$individu2;
22334
22340
 
22335
22341
  const teamParticipantId = participant.participantId;
22336
- (_participant$individu2 = participant.individualParticipantIds) === null || _participant$individu2 === void 0 ? void 0 : _participant$individu2.forEach(participantId => {
22342
+ participant === null || participant === void 0 ? void 0 : (_participant$individu2 = participant.individualParticipantIds) === null || _participant$individu2 === void 0 ? void 0 : _participant$individu2.forEach(participantId => {
22337
22343
  if (!participantIdMap[participantId].teamParticipantIds.includes(teamParticipantId)) {
22338
22344
  participantIdMap[participantId].teamParticipantIds.push(teamParticipantId);
22339
22345
  participantIdMap[participantId].teams.push({
@@ -22351,7 +22357,7 @@ function addParticipantContext(params) {
22351
22357
  var _participant$individu3;
22352
22358
 
22353
22359
  const pairParticipantId = participant.participantId;
22354
- (_participant$individu3 = participant.individualParticipantIds) === null || _participant$individu3 === void 0 ? void 0 : _participant$individu3.forEach(participantId => {
22360
+ participant === null || participant === void 0 ? void 0 : (_participant$individu3 = participant.individualParticipantIds) === null || _participant$individu3 === void 0 ? void 0 : _participant$individu3.forEach(participantId => {
22355
22361
  if (!participantIdMap[participantId].pairParticipantIds.includes(pairParticipantId)) {
22356
22362
  participantIdMap[participantId].pairParticipantIds.push(pairParticipantId);
22357
22363
  }
@@ -30625,7 +30631,7 @@ function getOrderedByePositions({
30625
30631
  // In CONTAINER/ROUND_ROBIN structures drawPositions are duplicated
30626
30632
  // and therefore must placed in drawOrder within Groups
30627
30633
  const matchUpDrawPositionPairs = relevantMatchUps.map(matchUp => matchUp.drawPositions);
30628
- const consideredDrawPositionPairs = matchUpDrawPositionPairs.map(pair => pair.sort((a, b) => a - b)).filter(pair => pair[0] + 1 === pair[1]); // sort seededMatchUps so that pairedPositions represent seed order
30634
+ const consideredDrawPositionPairs = matchUpDrawPositionPairs.map(pair => pair === null || pair === void 0 ? void 0 : pair.sort((a, b) => a - b)).filter(pair => (pair === null || pair === void 0 ? void 0 : pair[0]) + 1 === (pair === null || pair === void 0 ? void 0 : pair[1])); // sort seededMatchUps so that pairedPositions represent seed order
30629
30635
 
30630
30636
  const seedOrderSortedDrawPositionPairs = orderedSeedDrawPositions.map(drawPosition => consideredDrawPositionPairs.find(drawPositions => drawPositions === null || drawPositions === void 0 ? void 0 : drawPositions.includes(drawPosition))).filter(Boolean);
30631
30637
  const orderedByePositions = seedOrderSortedDrawPositionPairs.map(drawPositions => {
@@ -30755,7 +30761,7 @@ function getUnseededByePositions({
30755
30761
  } // for Round Robins pairs need to be reduced to pairs in drawPosition order
30756
30762
 
30757
30763
 
30758
- const matchUpPairedDrawPositions = relevantMatchUps.map(matchUp => matchUp.drawPositions).map(pair => pair.sort((a, b) => a - b)).filter(pair => pair[0] + 1 === pair[1]);
30764
+ const matchUpPairedDrawPositions = relevantMatchUps.map(matchUp => matchUp.drawPositions).map(pair => pair === null || pair === void 0 ? void 0 : pair.sort((a, b) => a - b)).filter(pair => (pair === null || pair === void 0 ? void 0 : pair[0]) + 1 === (pair === null || pair === void 0 ? void 0 : pair[1]));
30759
30765
 
30760
30766
  const findDrawPositionPair = drawPosition => {
30761
30767
  return matchUpPairedDrawPositions.reduce((pair, candidate) => {
@@ -36033,14 +36039,14 @@ function addEventEntries(params) {
36033
36039
  var _tournamentRecord$par;
36034
36040
 
36035
36041
  const {
36042
+ entryStatus = DIRECT_ACCEPTANCE,
36043
+ autoEntryPositions = true,
36044
+ participantIds = [],
36045
+ entryStage = MAIN,
36036
36046
  tournamentRecord,
36037
36047
  drawDefinition,
36038
36048
  drawId,
36039
- event,
36040
- participantIds = [],
36041
- entryStatus = DIRECT_ACCEPTANCE,
36042
- entryStage = MAIN,
36043
- autoEntryPositions = true
36049
+ event
36044
36050
  } = params;
36045
36051
  if (!event) return {
36046
36052
  error: MISSING_EVENT
@@ -36068,7 +36074,7 @@ function addEventEntries(params) {
36068
36074
  return true;
36069
36075
  }
36070
36076
 
36071
- if (event.eventType === TEAM$1 && participant.participantType === TEAM$1) {
36077
+ if (event.eventType === TEAM$1 && (participant.participantType === TEAM$1 || entryStatus === UNGROUPED && participant.participantType === INDIVIDUAL$1)) {
36072
36078
  return true;
36073
36079
  }
36074
36080
 
@@ -36088,7 +36094,7 @@ function addEventEntries(params) {
36088
36094
  });
36089
36095
  let message;
36090
36096
 
36091
- if (drawId) {
36097
+ if (drawId && !isUngrouped(entryStage)) {
36092
36098
  const result = addDrawEntries({
36093
36099
  participantIds: validParticipantIds,
36094
36100
  autoEntryPositions,
@@ -36981,7 +36987,7 @@ function generateDrawMaticRound({
36981
36987
  if (teamParticipants) {
36982
36988
  // add SAME_TEAM_VALUE for participants who appear on the same team
36983
36989
  for (const teamParticipant of teamParticipants) {
36984
- const participantIds = teamParticipant.individualParticipantIds;
36990
+ const participantIds = teamParticipant.individualParticipantIds || [];
36985
36991
  const {
36986
36992
  uniquePairings
36987
36993
  } = getPairingsData({
@@ -40531,6 +40537,44 @@ function addPersons({
40531
40537
  };
40532
40538
  }
40533
40539
 
40540
+ /**
40541
+ * function called internally to cleanup event entries when individuals have been added to team events
40542
+ */
40543
+
40544
+ function updateTeamEventEntries({
40545
+ individualParticipantIds,
40546
+ groupingParticipantId,
40547
+ tournamentRecord
40548
+ }) {
40549
+ const relevantEvents = (tournamentRecord.events || []).filter(event => {
40550
+ var _event$entries;
40551
+
40552
+ return (event === null || event === void 0 ? void 0 : event.eventType) === TEAM$2 && (event === null || event === void 0 ? void 0 : (_event$entries = event.entries) === null || _event$entries === void 0 ? void 0 : _event$entries.some(entry => entry.participantId === groupingParticipantId));
40553
+ });
40554
+
40555
+ const filterEntry = entry => !individualParticipantIds.includes(entry.participantId);
40556
+
40557
+ for (const event of relevantEvents) {
40558
+ var _flightProfile$flight, _event$drawDefinition;
40559
+
40560
+ event.entries = (event.entries || []).filter(filterEntry);
40561
+ const {
40562
+ flightProfile
40563
+ } = getFlightProfile({
40564
+ event
40565
+ });
40566
+ flightProfile === null || flightProfile === void 0 ? void 0 : (_flightProfile$flight = flightProfile.flights) === null || _flightProfile$flight === void 0 ? void 0 : _flightProfile$flight.forEach(flight => {
40567
+ flight.drawEntries = (flight.drawEntries || []).filter(filterEntry);
40568
+ });
40569
+ event === null || event === void 0 ? void 0 : (_event$drawDefinition = event.drawDefinitions) === null || _event$drawDefinition === void 0 ? void 0 : _event$drawDefinition.forEach(drawDefinition => {
40570
+ drawDefinition.entries = (drawDefinition.entries || []).filter(filterEntry);
40571
+ });
40572
+ }
40573
+
40574
+ return { ...SUCCESS
40575
+ };
40576
+ }
40577
+
40534
40578
  /**
40535
40579
  *
40536
40580
  * @param {object} tournamentRecord - passed in automatically by tournamentEngine
@@ -40541,10 +40585,10 @@ function addPersons({
40541
40585
  */
40542
40586
 
40543
40587
  function addIndividualParticipantIds({
40544
- tournamentRecord,
40545
- groupingParticipantId,
40546
40588
  individualParticipantIds,
40547
- removeFromOtherTeams
40589
+ groupingParticipantId,
40590
+ removeFromOtherTeams,
40591
+ tournamentRecord
40548
40592
  }) {
40549
40593
  if (!tournamentRecord) return {
40550
40594
  error: MISSING_TOURNAMENT_RECORD
@@ -40608,9 +40652,15 @@ function addIndividualParticipantIds({
40608
40652
  });
40609
40653
  }
40610
40654
 
40611
- return { ...SUCCESS,
40655
+ updateTeamEventEntries({
40656
+ individualParticipantIds,
40657
+ groupingParticipantId,
40658
+ tournamentRecord
40659
+ });
40660
+ return {
40612
40661
  groupingParticipant: makeDeepCopy(groupingParticipant),
40613
- added: participantIdsToAdd.length
40662
+ added: participantIdsToAdd.length,
40663
+ ...SUCCESS
40614
40664
  };
40615
40665
  }
40616
40666
 
@@ -50704,6 +50754,7 @@ function completeDrawMatchUps({
50704
50754
  };
50705
50755
  }
50706
50756
  function completeDrawMatchUp({
50757
+ matchUpStatusCodes,
50707
50758
  drawDefinition,
50708
50759
  targetMatchUp,
50709
50760
  matchUpStatus,
@@ -50725,6 +50776,7 @@ function completeDrawMatchUp({
50725
50776
  scoreString,
50726
50777
  winningSide
50727
50778
  });
50779
+ if (matchUpStatusCodes) outcome.matchUpStatusCodes = matchUpStatusCodes;
50728
50780
  return setMatchUpStatus$1({
50729
50781
  drawDefinition,
50730
50782
  matchUpFormat,
@@ -52143,6 +52195,7 @@ function generateEventWithDraw({
52143
52195
  matchUpFormat,
52144
52196
  stageSequence = 1,
52145
52197
  matchUpStatus = COMPLETED,
52198
+ matchUpStatusCodes,
52146
52199
  matchUpIndex = 0,
52147
52200
  structureOrder // like a group number; for RR = the order of the structureType: ITEM within structureType: CONTAINER
52148
52201
 
@@ -52170,6 +52223,7 @@ function generateEventWithDraw({
52170
52223
 
52171
52224
  const targetMatchUp = targetMatchUps[matchUpIndex];
52172
52225
  const result = completeDrawMatchUp({
52226
+ matchUpStatusCodes,
52173
52227
  drawDefinition,
52174
52228
  targetMatchUp,
52175
52229
  matchUpFormat,
@@ -52958,7 +53012,9 @@ const venueConstants = {
52958
53012
  };
52959
53013
 
52960
53014
  const factoryConstants = {
53015
+ activeMatchUpStatuses,
52961
53016
  auditConstants,
53017
+ directingMatchUpStatuses,
52962
53018
  drawDefinitionConstants,
52963
53019
  entryStatusConstants,
52964
53020
  errorConditionConstants,
@@ -52970,13 +53026,16 @@ const factoryConstants = {
52970
53026
  matchUpActionConstants,
52971
53027
  matchUpStatusConstants,
52972
53028
  matchUpTypes,
53029
+ nonDirectingMatchUpStatuses,
52973
53030
  participantConstants,
52974
53031
  participantRoles,
53032
+ particicipantsRequiredMatchUpStatuses,
52975
53033
  participantTypes,
52976
53034
  penaltyConstants,
52977
53035
  policyConstants,
52978
53036
  positionActionConstants,
52979
53037
  ratingConstants,
53038
+ recoveryTimeRequiredMatchUpStatuses,
52980
53039
  requestConstants,
52981
53040
  resultConstants,
52982
53041
  scaleConstants,
@@ -52985,6 +53044,8 @@ const factoryConstants = {
52985
53044
  tieFormatConstants,
52986
53045
  timeItemConstants,
52987
53046
  topicConstants,
53047
+ upcomingMatchUpStatuses,
53048
+ validMatchUpStatuses,
52988
53049
  venueConstants
52989
53050
  };
52990
53051