tods-competition-factory 1.6.11 → 1.6.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/forge/generate.mjs +80 -69
- package/dist/forge/generate.mjs.map +1 -1
- package/dist/forge/query.mjs +2 -2
- package/dist/forge/query.mjs.map +1 -1
- package/dist/forge/transform.mjs +79 -68
- package/dist/forge/transform.mjs.map +1 -1
- package/dist/index.mjs +88 -77
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.development.cjs.js +116 -104
- package/dist/tods-competition-factory.development.cjs.js.map +1 -1
- package/dist/tods-competition-factory.production.cjs.min.js +1 -1
- package/dist/tods-competition-factory.production.cjs.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -362,7 +362,7 @@ var matchUpFormatCode = {
|
|
|
362
362
|
};
|
|
363
363
|
|
|
364
364
|
function factoryVersion() {
|
|
365
|
-
return '1.6.
|
|
365
|
+
return '1.6.12';
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
/******************************************************************************
|
|
@@ -4078,7 +4078,7 @@ function getParticipantResults(_a) {
|
|
|
4078
4078
|
});
|
|
4079
4079
|
var winningParticipantId = winningSide && getWinningSideId(matchUp);
|
|
4080
4080
|
var losingParticipantId = winningSide && getLosingSideId(matchUp);
|
|
4081
|
-
if (!winningParticipantId
|
|
4081
|
+
if (!winningParticipantId && !losingParticipantId) {
|
|
4082
4082
|
if (completedMatchUpStatuses.includes(matchUpStatus)) {
|
|
4083
4083
|
var participantIdSide1 = getSideId(matchUp, 0);
|
|
4084
4084
|
var participantIdSide2 = getSideId(matchUp, 1);
|
|
@@ -4091,64 +4091,62 @@ function getParticipantResults(_a) {
|
|
|
4091
4091
|
participantResults[participantIdSide2].matchUpsCancelled += 1;
|
|
4092
4092
|
}
|
|
4093
4093
|
}
|
|
4094
|
-
else {
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
var
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
var
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
participantResults[tieLosingParticipantId].tieDoublesLost += 1;
|
|
4119
|
-
}
|
|
4094
|
+
else if (tieMatchUps === null || tieMatchUps === void 0 ? void 0 : tieMatchUps.length) {
|
|
4095
|
+
perPlayer = 0; // if any matchUps are matchUpType: TEAM don't calculate perPlayer
|
|
4096
|
+
var _loop_1 = function (tieMatchUp) {
|
|
4097
|
+
if (tieMatchUp.winningSide) {
|
|
4098
|
+
var tieWinningParticipantId = (_e = sides.find(function (_a) {
|
|
4099
|
+
var sideNumber = _a.sideNumber;
|
|
4100
|
+
return sideNumber === tieMatchUp.winningSide;
|
|
4101
|
+
})) === null || _e === void 0 ? void 0 : _e.participantId;
|
|
4102
|
+
var tieLosingParticipantId = (_f = sides.find(function (_a) {
|
|
4103
|
+
var sideNumber = _a.sideNumber;
|
|
4104
|
+
return sideNumber === tieMatchUp.winningSide;
|
|
4105
|
+
})) === null || _f === void 0 ? void 0 : _f.participantId;
|
|
4106
|
+
if (tieWinningParticipantId && tieLosingParticipantId) {
|
|
4107
|
+
checkInitializeParticipant(participantResults, tieWinningParticipantId);
|
|
4108
|
+
checkInitializeParticipant(participantResults, tieLosingParticipantId);
|
|
4109
|
+
participantResults[tieWinningParticipantId].tieMatchUpsWon += 1;
|
|
4110
|
+
participantResults[tieLosingParticipantId].tieMatchUpsLost += 1;
|
|
4111
|
+
if (tieMatchUp.matchUpType === SINGLES$1) {
|
|
4112
|
+
participantResults[tieWinningParticipantId].tieSinglesWon += 1;
|
|
4113
|
+
participantResults[tieLosingParticipantId].tieSinglesLost += 1;
|
|
4114
|
+
}
|
|
4115
|
+
else if (tieMatchUp.matchUpType === DOUBLES$1) {
|
|
4116
|
+
participantResults[tieWinningParticipantId].tieDoublesWon += 1;
|
|
4117
|
+
participantResults[tieLosingParticipantId].tieDoublesLost += 1;
|
|
4120
4118
|
}
|
|
4121
4119
|
}
|
|
4122
|
-
processScore({
|
|
4123
|
-
score: tieMatchUp.score,
|
|
4124
|
-
manualGamesOverride: manualGamesOverride,
|
|
4125
|
-
participantResults: participantResults,
|
|
4126
|
-
sides: sides,
|
|
4127
|
-
});
|
|
4128
|
-
};
|
|
4129
|
-
try {
|
|
4130
|
-
for (var tieMatchUps_1 = (e_2 = void 0, __values(tieMatchUps)), tieMatchUps_1_1 = tieMatchUps_1.next(); !tieMatchUps_1_1.done; tieMatchUps_1_1 = tieMatchUps_1.next()) {
|
|
4131
|
-
var tieMatchUp = tieMatchUps_1_1.value;
|
|
4132
|
-
_loop_1(tieMatchUp);
|
|
4133
|
-
}
|
|
4134
|
-
}
|
|
4135
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
4136
|
-
finally {
|
|
4137
|
-
try {
|
|
4138
|
-
if (tieMatchUps_1_1 && !tieMatchUps_1_1.done && (_c = tieMatchUps_1.return)) _c.call(tieMatchUps_1);
|
|
4139
|
-
}
|
|
4140
|
-
finally { if (e_2) throw e_2.error; }
|
|
4141
4120
|
}
|
|
4142
|
-
}
|
|
4143
|
-
else {
|
|
4144
4121
|
processScore({
|
|
4122
|
+
score: tieMatchUp.score,
|
|
4145
4123
|
manualGamesOverride: manualGamesOverride,
|
|
4146
4124
|
participantResults: participantResults,
|
|
4147
|
-
score: score,
|
|
4148
4125
|
sides: sides,
|
|
4149
4126
|
});
|
|
4127
|
+
};
|
|
4128
|
+
try {
|
|
4129
|
+
for (var tieMatchUps_1 = (e_2 = void 0, __values(tieMatchUps)), tieMatchUps_1_1 = tieMatchUps_1.next(); !tieMatchUps_1_1.done; tieMatchUps_1_1 = tieMatchUps_1.next()) {
|
|
4130
|
+
var tieMatchUp = tieMatchUps_1_1.value;
|
|
4131
|
+
_loop_1(tieMatchUp);
|
|
4132
|
+
}
|
|
4133
|
+
}
|
|
4134
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
4135
|
+
finally {
|
|
4136
|
+
try {
|
|
4137
|
+
if (tieMatchUps_1_1 && !tieMatchUps_1_1.done && (_c = tieMatchUps_1.return)) _c.call(tieMatchUps_1);
|
|
4138
|
+
}
|
|
4139
|
+
finally { if (e_2) throw e_2.error; }
|
|
4150
4140
|
}
|
|
4151
4141
|
}
|
|
4142
|
+
else {
|
|
4143
|
+
processScore({
|
|
4144
|
+
manualGamesOverride: manualGamesOverride,
|
|
4145
|
+
participantResults: participantResults,
|
|
4146
|
+
score: score,
|
|
4147
|
+
sides: sides,
|
|
4148
|
+
});
|
|
4149
|
+
}
|
|
4152
4150
|
}
|
|
4153
4151
|
else {
|
|
4154
4152
|
checkInitializeParticipant(participantResults, winningParticipantId);
|
|
@@ -11086,9 +11084,8 @@ function modifyMatchUpScore(_a) {
|
|
|
11086
11084
|
(matchUp = findResult.matchUp, structure = findResult.structure);
|
|
11087
11085
|
}
|
|
11088
11086
|
}
|
|
11089
|
-
else {
|
|
11090
|
-
|
|
11091
|
-
console.log('!!!!!');
|
|
11087
|
+
else if (matchUp.matchUpId !== matchUpId) {
|
|
11088
|
+
console.log('!!!!!');
|
|
11092
11089
|
}
|
|
11093
11090
|
if ((matchUpStatus && [WALKOVER$2, DOUBLE_WALKOVER].includes(matchUpStatus)) ||
|
|
11094
11091
|
removeScore) {
|
|
@@ -11136,37 +11133,50 @@ function modifyMatchUpScore(_a) {
|
|
|
11136
11133
|
defaultedProcessCodes =
|
|
11137
11134
|
(_g = (_f = appliedPolicies === null || appliedPolicies === void 0 ? void 0 : appliedPolicies[POLICY_TYPE_SCORING]) === null || _f === void 0 ? void 0 : _f.processCodes) === null || _g === void 0 ? void 0 : _g.incompleteAssignmentsOnDefault;
|
|
11138
11135
|
}
|
|
11139
|
-
|
|
11140
|
-
|
|
11141
|
-
|
|
11142
|
-
|
|
11143
|
-
|
|
11144
|
-
|
|
11145
|
-
|
|
11146
|
-
|
|
11147
|
-
|
|
11148
|
-
|
|
11149
|
-
|
|
11150
|
-
|
|
11151
|
-
|
|
11152
|
-
|
|
11153
|
-
|
|
11154
|
-
|
|
11155
|
-
|
|
11156
|
-
|
|
11157
|
-
|
|
11158
|
-
|
|
11159
|
-
|
|
11160
|
-
|
|
11161
|
-
|
|
11162
|
-
|
|
11163
|
-
|
|
11164
|
-
|
|
11165
|
-
|
|
11166
|
-
|
|
11167
|
-
|
|
11168
|
-
|
|
11169
|
-
|
|
11136
|
+
if (!matchUp.collectionId) {
|
|
11137
|
+
var isRoundRobin = (structure === null || structure === void 0 ? void 0 : structure.structureType) === CONTAINER;
|
|
11138
|
+
var isAdHocStructure_1 = isAdHoc({ drawDefinition: drawDefinition, structure: structure });
|
|
11139
|
+
if (isLucky({ drawDefinition: drawDefinition, structure: structure }) ||
|
|
11140
|
+
isAdHocStructure_1 ||
|
|
11141
|
+
isRoundRobin) {
|
|
11142
|
+
var updateTally = function (structure) {
|
|
11143
|
+
var _a, _b, _c;
|
|
11144
|
+
// matchUpFormat set here is only used in updateAssignmentParticipantResults
|
|
11145
|
+
matchUpFormat = isDualMatchUp
|
|
11146
|
+
? 'SET1-S:T100'
|
|
11147
|
+
: (_c = (_b = (_a = matchUpFormat !== null && matchUpFormat !== void 0 ? matchUpFormat : matchUp.matchUpFormat) !== null && _a !== void 0 ? _a : structure === null || structure === void 0 ? void 0 : structure.matchUpFormat) !== null && _b !== void 0 ? _b : drawDefinition === null || drawDefinition === void 0 ? void 0 : drawDefinition.matchUpFormat) !== null && _c !== void 0 ? _c : event === null || event === void 0 ? void 0 : event.matchUpFormat;
|
|
11148
|
+
var matchUpFilters = isDualMatchUp
|
|
11149
|
+
? { matchUpTypes: [TEAM$2] }
|
|
11150
|
+
: undefined;
|
|
11151
|
+
var matchUps = getAllStructureMatchUps({
|
|
11152
|
+
afterRecoveryTimes: false,
|
|
11153
|
+
inContext: true,
|
|
11154
|
+
matchUpFilters: matchUpFilters,
|
|
11155
|
+
structure: structure,
|
|
11156
|
+
event: event,
|
|
11157
|
+
}).matchUps;
|
|
11158
|
+
if (isAdHocStructure_1) {
|
|
11159
|
+
structure.positionAssignments = unique(matchUps
|
|
11160
|
+
.flatMap(function (matchUp) { var _a; return ((_a = matchUp.sides) !== null && _a !== void 0 ? _a : []).map(function (side) { return side.participantId; }); })
|
|
11161
|
+
.filter(Boolean)).map(function (participantId) { return ({ participantId: participantId }); });
|
|
11162
|
+
}
|
|
11163
|
+
return updateAssignmentParticipantResults({
|
|
11164
|
+
positionAssignments: structure.positionAssignments,
|
|
11165
|
+
tournamentRecord: tournamentRecord,
|
|
11166
|
+
drawDefinition: drawDefinition,
|
|
11167
|
+
matchUpFormat: matchUpFormat,
|
|
11168
|
+
matchUps: matchUps,
|
|
11169
|
+
event: event,
|
|
11170
|
+
});
|
|
11171
|
+
};
|
|
11172
|
+
var itemStructure = isRoundRobin &&
|
|
11173
|
+
structure.structures.find(function (itemStructure) {
|
|
11174
|
+
return itemStructure === null || itemStructure === void 0 ? void 0 : itemStructure.matchUps.find(function (matchUp) { return matchUp.matchUpId === matchUpId; });
|
|
11175
|
+
});
|
|
11176
|
+
var result = updateTally(itemStructure || structure);
|
|
11177
|
+
if (result.error)
|
|
11178
|
+
return decorateResult({ result: result, stack: stack });
|
|
11179
|
+
}
|
|
11170
11180
|
}
|
|
11171
11181
|
if (notes) {
|
|
11172
11182
|
var result = addNotes({ element: matchUp, notes: notes });
|
|
@@ -25042,7 +25052,7 @@ function getSeedingThresholds(_a) {
|
|
|
25042
25052
|
}
|
|
25043
25053
|
|
|
25044
25054
|
function getValidSeedBlocks(_a) {
|
|
25045
|
-
var _b;
|
|
25055
|
+
var _b, _c;
|
|
25046
25056
|
var provisionalPositioning = _a.provisionalPositioning, appliedPolicies = _a.appliedPolicies, drawDefinition = _a.drawDefinition, allPositions = _a.allPositions, structure = _a.structure;
|
|
25047
25057
|
var validSeedBlocks = [];
|
|
25048
25058
|
if (!structure)
|
|
@@ -25059,7 +25069,7 @@ function getValidSeedBlocks(_a) {
|
|
|
25059
25069
|
}).seedAssignments;
|
|
25060
25070
|
var positionAssignments = structureAssignedDrawPositions({ structure: structure }).positionAssignments;
|
|
25061
25071
|
var positionsCount = positionAssignments === null || positionAssignments === void 0 ? void 0 : positionAssignments.length;
|
|
25062
|
-
var seedsCount = (seedAssignments === null || seedAssignments === void 0 ? void 0 : seedAssignments.length)
|
|
25072
|
+
var seedsCount = (_b = seedAssignments === null || seedAssignments === void 0 ? void 0 : seedAssignments.length) !== null && _b !== void 0 ? _b : 0;
|
|
25063
25073
|
var allDrawPositions = [];
|
|
25064
25074
|
var roundNumbers = Object.keys(roundMatchUps)
|
|
25065
25075
|
.map(function (n) { return parseInt(n); })
|
|
@@ -25078,7 +25088,7 @@ function getValidSeedBlocks(_a) {
|
|
|
25078
25088
|
.reverse();
|
|
25079
25089
|
var firstRoundDrawPositions = uniqueDrawPositionsByRound.pop();
|
|
25080
25090
|
var firstRoundDrawPositionOffset = (firstRoundDrawPositions && Math.min.apply(Math, __spreadArray([], __read(firstRoundDrawPositions), false)) - 1) || 0;
|
|
25081
|
-
var seedingProfile = (
|
|
25091
|
+
var seedingProfile = (_c = appliedPolicies === null || appliedPolicies === void 0 ? void 0 : appliedPolicies.seeding) === null || _c === void 0 ? void 0 : _c.seedingProfile;
|
|
25082
25092
|
var baseDrawSize = (firstRoundDrawPositions === null || firstRoundDrawPositions === void 0 ? void 0 : firstRoundDrawPositions.length) || 0;
|
|
25083
25093
|
// firstRoundDrawPositions have been popped
|
|
25084
25094
|
// seedRangeDrawPositionBlocks determines FEED_IN
|
|
@@ -25291,7 +25301,7 @@ function isValidSeedPosition(_a) {
|
|
|
25291
25301
|
return validSeedPositions.includes(drawPosition);
|
|
25292
25302
|
}
|
|
25293
25303
|
function getNextSeedBlock(params) {
|
|
25294
|
-
var _a, _b;
|
|
25304
|
+
var _a, _b, _c;
|
|
25295
25305
|
var provisionalPositioning = params.provisionalPositioning, drawDefinition = params.drawDefinition, seedBlockInfo = params.seedBlockInfo, structureId = params.structureId, randomize = params.randomize;
|
|
25296
25306
|
var structure = findStructure({ drawDefinition: drawDefinition, structureId: structureId }).structure;
|
|
25297
25307
|
var seedAssignments = getStructureSeedAssignments({
|
|
@@ -25322,7 +25332,9 @@ function getNextSeedBlock(params) {
|
|
|
25322
25332
|
var unplacedSeedIds = assignedSeedParticipantIds === null || assignedSeedParticipantIds === void 0 ? void 0 : assignedSeedParticipantIds.filter(function (participantId) { return !(assignedPositionParticipantIds === null || assignedPositionParticipantIds === void 0 ? void 0 : assignedPositionParticipantIds.includes(participantId)); });
|
|
25323
25333
|
var unplacedSeedAssignments = seedAssignments === null || seedAssignments === void 0 ? void 0 : seedAssignments.filter(function (assignment) { return unplacedSeedIds === null || unplacedSeedIds === void 0 ? void 0 : unplacedSeedIds.includes(assignment.participantId); });
|
|
25324
25334
|
var seedsWithoutDrawPositions = seedAssignments === null || seedAssignments === void 0 ? void 0 : seedAssignments.filter(function (assignment) { return !assignment.participantId; });
|
|
25325
|
-
var seedsLeftToAssign = (unplacedSeedAssignments === null || unplacedSeedAssignments === void 0 ? void 0 : unplacedSeedAssignments.length)
|
|
25335
|
+
var seedsLeftToAssign = (unplacedSeedAssignments === null || unplacedSeedAssignments === void 0 ? void 0 : unplacedSeedAssignments.length) && unplacedSeedAssignments.length > 0
|
|
25336
|
+
? unplacedSeedAssignments.length
|
|
25337
|
+
: (_b = seedsWithoutDrawPositions === null || seedsWithoutDrawPositions === void 0 ? void 0 : seedsWithoutDrawPositions.length) !== null && _b !== void 0 ? _b : 0;
|
|
25326
25338
|
var unfilled = (seedsLeftToAssign &&
|
|
25327
25339
|
(nextSeedBlock === null || nextSeedBlock === void 0 ? void 0 : nextSeedBlock.drawPositions.filter(function (drawPosition) { return !(assignedDrawPositions === null || assignedDrawPositions === void 0 ? void 0 : assignedDrawPositions.includes(drawPosition)); }))) ||
|
|
25328
25340
|
[];
|
|
@@ -25347,7 +25359,7 @@ function getNextSeedBlock(params) {
|
|
|
25347
25359
|
var unplacedSeedNumberIds = seedAssignments === null || seedAssignments === void 0 ? void 0 : seedAssignments.filter(function (assignment) {
|
|
25348
25360
|
return unplacedSeedNumbers.includes(assignment.seedNumber);
|
|
25349
25361
|
}).map(function (assignment) { return assignment.participantId; });
|
|
25350
|
-
var duplicateSeedNumbers = (
|
|
25362
|
+
var duplicateSeedNumbers = (_c = appliedPolicies === null || appliedPolicies === void 0 ? void 0 : appliedPolicies.seeding) === null || _c === void 0 ? void 0 : _c.duplicateSeedNumbers;
|
|
25351
25363
|
var allowsDuplicateSeedNumbers = duplicateSeedNumbers !== undefined ? duplicateSeedNumbers : true;
|
|
25352
25364
|
var unplacedSeedParticipantIds = allowsDuplicateSeedNumbers
|
|
25353
25365
|
? randomlySelectedUnplacedSeedValueIds
|
|
@@ -30751,8 +30763,8 @@ function getParticipantEntries(params) {
|
|
|
30751
30763
|
// id is the pair, team or individual participant currently being processed
|
|
30752
30764
|
// whereas participantId is the id of the entry into the event
|
|
30753
30765
|
var addEventEntry = function (id) {
|
|
30754
|
-
var _a;
|
|
30755
|
-
if ((_a = participantMap[id]) === null || _a === void 0 ? void 0 : _a.events[eventId])
|
|
30766
|
+
var _a, _b;
|
|
30767
|
+
if ((_b = (_a = participantMap[id]) === null || _a === void 0 ? void 0 : _a.events) === null || _b === void 0 ? void 0 : _b[eventId])
|
|
30756
30768
|
return;
|
|
30757
30769
|
var participant = participantMap[id];
|
|
30758
30770
|
processEventEntry({
|
|
@@ -30855,7 +30867,7 @@ function getParticipantEntries(params) {
|
|
|
30855
30867
|
var participantId = _a.participantId;
|
|
30856
30868
|
return assignedParticipantIds.includes(participantId);
|
|
30857
30869
|
});
|
|
30858
|
-
var publishedSeeding_1 = (_d = eventsPublishStatuses[eventId]) === null || _d === void 0 ? void 0 : _d.publishedSeeding;
|
|
30870
|
+
var publishedSeeding_1 = (_d = eventsPublishStatuses === null || eventsPublishStatuses === void 0 ? void 0 : eventsPublishStatuses[eventId]) === null || _d === void 0 ? void 0 : _d.publishedSeeding;
|
|
30859
30871
|
var seedingPublished = !usePublishState ||
|
|
30860
30872
|
((publishedSeeding_1 === null || publishedSeeding_1 === void 0 ? void 0 : publishedSeeding_1.published) &&
|
|
30861
30873
|
(((_e = publishedSeeding_1 === null || publishedSeeding_1 === void 0 ? void 0 : publishedSeeding_1.drawIds) === null || _e === void 0 ? void 0 : _e.length) === 0 ||
|
|
@@ -30872,18 +30884,18 @@ function getParticipantEntries(params) {
|
|
|
30872
30884
|
// id is the pair, team or individual participant currently being processed
|
|
30873
30885
|
// whereas participantId is the id of the entry into the draw
|
|
30874
30886
|
var addDrawEntry = function (id) {
|
|
30875
|
-
var _a, _b, _c, _d, _e;
|
|
30876
|
-
if (participantMap[id].draws[drawId])
|
|
30887
|
+
var _a, _b, _c, _d, _e, _f;
|
|
30888
|
+
if ((_a = participantMap[id].draws) === null || _a === void 0 ? void 0 : _a[drawId])
|
|
30877
30889
|
return;
|
|
30878
30890
|
var includeSeeding = withSeeding && seedingPublished;
|
|
30879
30891
|
var seedAssignments = includeSeeding ? {} : undefined;
|
|
30880
30892
|
var mainSeeding = includeSeeding
|
|
30881
|
-
? ((
|
|
30882
|
-
((
|
|
30893
|
+
? ((_b = mainSeedingMap === null || mainSeedingMap === void 0 ? void 0 : mainSeedingMap[participantId]) === null || _b === void 0 ? void 0 : _b.seedValue) ||
|
|
30894
|
+
((_c = mainSeedingMap === null || mainSeedingMap === void 0 ? void 0 : mainSeedingMap[participantId]) === null || _c === void 0 ? void 0 : _c.seedNumber)
|
|
30883
30895
|
: undefined;
|
|
30884
30896
|
var qualifyingSeeding = includeSeeding
|
|
30885
|
-
? ((
|
|
30886
|
-
((
|
|
30897
|
+
? ((_d = qualifyingSeedingMap === null || qualifyingSeedingMap === void 0 ? void 0 : qualifyingSeedingMap[participantId]) === null || _d === void 0 ? void 0 : _d.seedValue) ||
|
|
30898
|
+
((_e = qualifyingSeedingMap === null || qualifyingSeedingMap === void 0 ? void 0 : qualifyingSeedingMap[participantId]) === null || _e === void 0 ? void 0 : _e.seedNumber)
|
|
30887
30899
|
: undefined;
|
|
30888
30900
|
if (seedAssignments && mainSeeding)
|
|
30889
30901
|
seedAssignments[MAIN] = mainSeeding;
|
|
@@ -30895,7 +30907,7 @@ function getParticipantEntries(params) {
|
|
|
30895
30907
|
participantMap[id].events[eventId].seedValue =
|
|
30896
30908
|
mainSeeding || qualifyingSeeding;
|
|
30897
30909
|
}
|
|
30898
|
-
else if ((
|
|
30910
|
+
else if ((_f = participantMap[id].events[eventId]) === null || _f === void 0 ? void 0 : _f.seedValue) {
|
|
30899
30911
|
// if seeding for specific drawIds is NOT published, remove from event
|
|
30900
30912
|
participantMap[id].events[eventId].seedValue = undefined;
|
|
30901
30913
|
}
|
|
@@ -31280,9 +31292,9 @@ function getParticipants$1(params) {
|
|
|
31280
31292
|
withIOC: withIOC,
|
|
31281
31293
|
}).participantMap;
|
|
31282
31294
|
var entriesResult = getParticipantEntries({
|
|
31283
|
-
withMatchUps: withMatchUps
|
|
31284
|
-
withEvents: withEvents
|
|
31285
|
-
withDraws: withDraws
|
|
31295
|
+
withMatchUps: withMatchUps !== null && withMatchUps !== void 0 ? withMatchUps : withRankingProfile,
|
|
31296
|
+
withEvents: withEvents !== null && withEvents !== void 0 ? withEvents : withRankingProfile,
|
|
31297
|
+
withDraws: withDraws !== null && withDraws !== void 0 ? withDraws : withRankingProfile,
|
|
31286
31298
|
withPotentialMatchUps: withPotentialMatchUps,
|
|
31287
31299
|
participantFilters: participantFilters,
|
|
31288
31300
|
withRankingProfile: withRankingProfile,
|
|
@@ -31302,7 +31314,7 @@ function getParticipants$1(params) {
|
|
|
31302
31314
|
var participantIdsWithConflicts = entriesResult.participantIdsWithConflicts, eventsPublishStatuses = entriesResult.eventsPublishStatuses, derivedEventInfo = entriesResult.derivedEventInfo, derivedDrawInfo = entriesResult.derivedDrawInfo, mappedMatchUps = entriesResult.mappedMatchUps;
|
|
31303
31315
|
var matchUps = entriesResult.matchUps;
|
|
31304
31316
|
participantMap = entriesResult.participantMap;
|
|
31305
|
-
var nextMatchUps = scheduleAnalysis
|
|
31317
|
+
var nextMatchUps = scheduleAnalysis !== null && scheduleAnalysis !== void 0 ? scheduleAnalysis : withPotentialMatchUps;
|
|
31306
31318
|
var processedParticipants = Object.values(participantMap).map(function (_a) {
|
|
31307
31319
|
var potentialMatchUps = _a.potentialMatchUps, scheduleConflicts = _a.scheduleConflicts, participant = _a.participant, statistics = _a.statistics, opponents = _a.opponents, matchUps = _a.matchUps, events = _a.events, draws = _a.draws;
|
|
31308
31320
|
var participantDraws = Object.values(draws);
|