tods-competition-factory 2.0.6 → 2.0.7
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/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.d.ts +20 -2
- package/dist/tods-competition-factory.development.cjs.js +71 -20
- 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
|
@@ -3771,6 +3771,22 @@ declare function generateAdHocMatchUps(params: GenerateAdHocMatchUpsArgs): {
|
|
|
3771
3771
|
info?: any;
|
|
3772
3772
|
};
|
|
3773
3773
|
|
|
3774
|
+
type GenerateAdHocRoundsArgs = {
|
|
3775
|
+
drawDefinition: DrawDefinition;
|
|
3776
|
+
matchUpsCount?: number;
|
|
3777
|
+
matchUpIds?: string[];
|
|
3778
|
+
roundNumber?: number;
|
|
3779
|
+
structureId?: string;
|
|
3780
|
+
roundsCount: number;
|
|
3781
|
+
newRound?: boolean;
|
|
3782
|
+
idPrefix?: string;
|
|
3783
|
+
isMock?: boolean;
|
|
3784
|
+
event: Event$1;
|
|
3785
|
+
};
|
|
3786
|
+
declare function generateAdHocRounds({ roundsCount, drawDefinition, matchUpsCount, structureId, idPrefix, isMock, event, }: GenerateAdHocRoundsArgs): ResultType & {
|
|
3787
|
+
matchUps?: MatchUp[];
|
|
3788
|
+
};
|
|
3789
|
+
|
|
3774
3790
|
declare function drawMatic(params: DrawMaticArgs): ResultType & {
|
|
3775
3791
|
matchUps?: MatchUp[];
|
|
3776
3792
|
roundResults?: DrawMaticRoundResult[];
|
|
@@ -3797,6 +3813,7 @@ declare const index$j_checkValidEntries: typeof checkValidEntries;
|
|
|
3797
3813
|
declare const index$j_deleteAdHocMatchUps: typeof deleteAdHocMatchUps;
|
|
3798
3814
|
declare const index$j_drawMatic: typeof drawMatic;
|
|
3799
3815
|
declare const index$j_generateAdHocMatchUps: typeof generateAdHocMatchUps;
|
|
3816
|
+
declare const index$j_generateAdHocRounds: typeof generateAdHocRounds;
|
|
3800
3817
|
declare const index$j_generateAndPopulatePlayoffStructures: typeof generateAndPopulatePlayoffStructures;
|
|
3801
3818
|
declare const index$j_generateDrawDefinition: typeof generateDrawDefinition;
|
|
3802
3819
|
declare const index$j_generateDrawMaticRound: typeof generateDrawMaticRound;
|
|
@@ -3843,7 +3860,7 @@ declare const index$j_swapDrawPositionAssignments: typeof swapDrawPositionAssign
|
|
|
3843
3860
|
declare const index$j_updateTeamLineUp: typeof updateTeamLineUp;
|
|
3844
3861
|
declare const index$j_withdrawParticipantAtDrawPosition: typeof withdrawParticipantAtDrawPosition;
|
|
3845
3862
|
declare namespace index$j {
|
|
3846
|
-
export { index$j_addAdHocMatchUps as addAdHocMatchUps, index$j_addDrawDefinitionTimeItem as addDrawDefinitionTimeItem, index$j_addPlayoffStructures as addPlayoffStructures, index$j_addQualifyingStructure as addQualifyingStructure, index$j_addVoluntaryConsolationStage as addVoluntaryConsolationStage, index$j_addVoluntaryConsolationStructure as addVoluntaryConsolationStructure, index$j_allPlayoffPositionsFilled as allPlayoffPositionsFilled, index$j_alternateDrawPositionAssignment as alternateDrawPositionAssignment, index$j_assignDrawPosition as assignDrawPosition, index$j_assignDrawPositionBye as assignDrawPositionBye, index$j_attachConsolationStructures as attachConsolationStructures, index$j_attachPlayoffStructures as attachPlayoffStructures, index$j_attachQualifyingStructure as attachQualifyingStructure, index$j_attachStructures as attachStructures, index$j_autoSeeding as autoSeeding, index$j_automatedPlayoffPositioning as automatedPlayoffPositioning, index$j_automatedPositioning as automatedPositioning, index$j_checkValidEntries as checkValidEntries, index$j_deleteAdHocMatchUps as deleteAdHocMatchUps, index$j_drawMatic as drawMatic, publicFindDrawDefinition as findDrawDefinition, index$j_generateAdHocMatchUps as generateAdHocMatchUps, index$j_generateAndPopulatePlayoffStructures as generateAndPopulatePlayoffStructures, index$j_generateDrawDefinition as generateDrawDefinition, index$j_generateDrawMaticRound as generateDrawMaticRound, index$j_generateDrawStructuresAndLinks as generateDrawStructuresAndLinks, index$j_generateDrawTypeAndModifyDrawDefinition as generateDrawTypeAndModifyDrawDefinition, index$j_generateQualifyingStructure as generateQualifyingStructure, index$j_generateVoluntaryConsolation as generateVoluntaryConsolation, index$j_getAssignedParticipantIds as getAssignedParticipantIds, index$j_getAvailablePlayoffProfiles as getAvailablePlayoffProfiles, index$j_getDrawDefinitionTimeItem as getDrawDefinitionTimeItem, index$j_getDrawParticipantRepresentativeIds as getDrawParticipantRepresentativeIds, index$j_getDrawTypeCoercion as getDrawTypeCoercion, index$j_getEligibleVoluntaryConsolationParticipants as getEligibleVoluntaryConsolationParticipants, index$j_getParticipantIdFinishingPositions as getParticipantIdFinishingPositions, index$j_getPositionAssignments as getPositionAssignments, index$j_getPositionsPlayedOff as getPositionsPlayedOff, index$j_getSeedingThresholds as getSeedingThresholds, index$j_getSeedsCount as getSeedsCount, index$j_getStructureSeedAssignments as getStructureSeedAssignments, index$j_getTeamLineUp as getTeamLineUp, index$j_getValidGroupSizes as getValidGroupSizes, index$j_isAdHoc as isAdHoc, index$j_isCompletedStructure as isCompletedStructure, index$j_isValidForQualifying as isValidForQualifying, index$j_luckyLoserDrawPositionAssignment as luckyLoserDrawPositionAssignment, index$j_modifyDrawDefinition as modifyDrawDefinition, index$j_modifyDrawName as modifyDrawName, index$j_modifySeedAssignment as modifySeedAssignment, mutate$b as mutate, index$j_positionActions as positionActions, index$j_pruneDrawDefinition as pruneDrawDefinition, index$j_qualifierDrawPositionAssignment as qualifierDrawPositionAssignment, query$a as query, index$j_removeDrawPositionAssignment as removeDrawPositionAssignment, index$j_removeRoundMatchUps as removeRoundMatchUps, index$j_removeSeededParticipant as removeSeededParticipant, index$j_removeStructure as removeStructure, index$j_renameStructures as renameStructures, index$j_resetDrawDefinition as resetDrawDefinition, index$j_resetVoluntaryConsolationStructure as resetVoluntaryConsolationStructure, index$j_setDrawParticipantRepresentativeIds as setDrawParticipantRepresentativeIds, index$j_setPositionAssignments as setPositionAssignments, index$j_setStructureOrder as setStructureOrder, index$j_setSubOrder as setSubOrder, index$j_swapDrawPositionAssignments as swapDrawPositionAssignments, index$j_updateTeamLineUp as updateTeamLineUp, index$j_withdrawParticipantAtDrawPosition as withdrawParticipantAtDrawPosition };
|
|
3863
|
+
export { index$j_addAdHocMatchUps as addAdHocMatchUps, index$j_addDrawDefinitionTimeItem as addDrawDefinitionTimeItem, index$j_addPlayoffStructures as addPlayoffStructures, index$j_addQualifyingStructure as addQualifyingStructure, index$j_addVoluntaryConsolationStage as addVoluntaryConsolationStage, index$j_addVoluntaryConsolationStructure as addVoluntaryConsolationStructure, index$j_allPlayoffPositionsFilled as allPlayoffPositionsFilled, index$j_alternateDrawPositionAssignment as alternateDrawPositionAssignment, index$j_assignDrawPosition as assignDrawPosition, index$j_assignDrawPositionBye as assignDrawPositionBye, index$j_attachConsolationStructures as attachConsolationStructures, index$j_attachPlayoffStructures as attachPlayoffStructures, index$j_attachQualifyingStructure as attachQualifyingStructure, index$j_attachStructures as attachStructures, index$j_autoSeeding as autoSeeding, index$j_automatedPlayoffPositioning as automatedPlayoffPositioning, index$j_automatedPositioning as automatedPositioning, index$j_checkValidEntries as checkValidEntries, index$j_deleteAdHocMatchUps as deleteAdHocMatchUps, index$j_drawMatic as drawMatic, publicFindDrawDefinition as findDrawDefinition, index$j_generateAdHocMatchUps as generateAdHocMatchUps, index$j_generateAdHocRounds as generateAdHocRounds, index$j_generateAndPopulatePlayoffStructures as generateAndPopulatePlayoffStructures, index$j_generateDrawDefinition as generateDrawDefinition, index$j_generateDrawMaticRound as generateDrawMaticRound, index$j_generateDrawStructuresAndLinks as generateDrawStructuresAndLinks, index$j_generateDrawTypeAndModifyDrawDefinition as generateDrawTypeAndModifyDrawDefinition, index$j_generateQualifyingStructure as generateQualifyingStructure, index$j_generateVoluntaryConsolation as generateVoluntaryConsolation, index$j_getAssignedParticipantIds as getAssignedParticipantIds, index$j_getAvailablePlayoffProfiles as getAvailablePlayoffProfiles, index$j_getDrawDefinitionTimeItem as getDrawDefinitionTimeItem, index$j_getDrawParticipantRepresentativeIds as getDrawParticipantRepresentativeIds, index$j_getDrawTypeCoercion as getDrawTypeCoercion, index$j_getEligibleVoluntaryConsolationParticipants as getEligibleVoluntaryConsolationParticipants, index$j_getParticipantIdFinishingPositions as getParticipantIdFinishingPositions, index$j_getPositionAssignments as getPositionAssignments, index$j_getPositionsPlayedOff as getPositionsPlayedOff, index$j_getSeedingThresholds as getSeedingThresholds, index$j_getSeedsCount as getSeedsCount, index$j_getStructureSeedAssignments as getStructureSeedAssignments, index$j_getTeamLineUp as getTeamLineUp, index$j_getValidGroupSizes as getValidGroupSizes, index$j_isAdHoc as isAdHoc, index$j_isCompletedStructure as isCompletedStructure, index$j_isValidForQualifying as isValidForQualifying, index$j_luckyLoserDrawPositionAssignment as luckyLoserDrawPositionAssignment, index$j_modifyDrawDefinition as modifyDrawDefinition, index$j_modifyDrawName as modifyDrawName, index$j_modifySeedAssignment as modifySeedAssignment, mutate$b as mutate, index$j_positionActions as positionActions, index$j_pruneDrawDefinition as pruneDrawDefinition, index$j_qualifierDrawPositionAssignment as qualifierDrawPositionAssignment, query$a as query, index$j_removeDrawPositionAssignment as removeDrawPositionAssignment, index$j_removeRoundMatchUps as removeRoundMatchUps, index$j_removeSeededParticipant as removeSeededParticipant, index$j_removeStructure as removeStructure, index$j_renameStructures as renameStructures, index$j_resetDrawDefinition as resetDrawDefinition, index$j_resetVoluntaryConsolationStructure as resetVoluntaryConsolationStructure, index$j_setDrawParticipantRepresentativeIds as setDrawParticipantRepresentativeIds, index$j_setPositionAssignments as setPositionAssignments, index$j_setStructureOrder as setStructureOrder, index$j_setSubOrder as setSubOrder, index$j_swapDrawPositionAssignments as swapDrawPositionAssignments, index$j_updateTeamLineUp as updateTeamLineUp, index$j_withdrawParticipantAtDrawPosition as withdrawParticipantAtDrawPosition };
|
|
3847
3864
|
}
|
|
3848
3865
|
|
|
3849
3866
|
/**
|
|
@@ -5055,6 +5072,7 @@ declare namespace garman$1 {
|
|
|
5055
5072
|
|
|
5056
5073
|
declare const index$g_drawMatic: typeof drawMatic;
|
|
5057
5074
|
declare const index$g_generateAdHocMatchUps: typeof generateAdHocMatchUps;
|
|
5075
|
+
declare const index$g_generateAdHocRounds: typeof generateAdHocRounds;
|
|
5058
5076
|
declare const index$g_generateAndPopulatePlayoffStructures: typeof generateAndPopulatePlayoffStructures;
|
|
5059
5077
|
declare const index$g_generateCourts: typeof generateCourts;
|
|
5060
5078
|
declare const index$g_generateDrawDefinition: typeof generateDrawDefinition;
|
|
@@ -5068,7 +5086,7 @@ declare const index$g_generateSeedingScaleItems: typeof generateSeedingScaleItem
|
|
|
5068
5086
|
declare const index$g_generateVoluntaryConsolation: typeof generateVoluntaryConsolation;
|
|
5069
5087
|
declare const index$g_roundRobinGroups: typeof roundRobinGroups;
|
|
5070
5088
|
declare namespace index$g {
|
|
5071
|
-
export { index$g_drawMatic as drawMatic, garman$1 as garman, index$g_generateAdHocMatchUps as generateAdHocMatchUps, index$g_generateAndPopulatePlayoffStructures as generateAndPopulatePlayoffStructures, index$g_generateCourts as generateCourts, index$g_generateDrawDefinition as generateDrawDefinition, index$g_generateDrawMaticRound as generateDrawMaticRound, index$g_generateDrawStructuresAndLinks as generateDrawStructuresAndLinks, index$g_generateDrawTypeAndModifyDrawDefinition as generateDrawTypeAndModifyDrawDefinition, index$g_generateFlightProfile as generateFlightProfile, index$g_generateLineUps as generateLineUps, index$g_generateQualifyingStructure as generateQualifyingStructure, index$g_generateSeedingScaleItems as generateSeedingScaleItems, index$g_generateVoluntaryConsolation as generateVoluntaryConsolation, index$g_roundRobinGroups as roundRobinGroups };
|
|
5089
|
+
export { index$g_drawMatic as drawMatic, garman$1 as garman, index$g_generateAdHocMatchUps as generateAdHocMatchUps, index$g_generateAdHocRounds as generateAdHocRounds, index$g_generateAndPopulatePlayoffStructures as generateAndPopulatePlayoffStructures, index$g_generateCourts as generateCourts, index$g_generateDrawDefinition as generateDrawDefinition, index$g_generateDrawMaticRound as generateDrawMaticRound, index$g_generateDrawStructuresAndLinks as generateDrawStructuresAndLinks, index$g_generateDrawTypeAndModifyDrawDefinition as generateDrawTypeAndModifyDrawDefinition, index$g_generateFlightProfile as generateFlightProfile, index$g_generateLineUps as generateLineUps, index$g_generateQualifyingStructure as generateQualifyingStructure, index$g_generateSeedingScaleItems as generateSeedingScaleItems, index$g_generateVoluntaryConsolation as generateVoluntaryConsolation, index$g_roundRobinGroups as roundRobinGroups };
|
|
5072
5090
|
}
|
|
5073
5091
|
|
|
5074
5092
|
declare function isValidMatchUpFormat({ matchUpFormat }: {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
function factoryVersion() {
|
|
6
|
-
return '2.0.
|
|
6
|
+
return '2.0.7';
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
/******************************************************************************
|
|
@@ -36062,6 +36062,45 @@ function processQualifyingDetails(_a) {
|
|
|
36062
36062
|
return { error: undefined };
|
|
36063
36063
|
}
|
|
36064
36064
|
|
|
36065
|
+
function generateAdHocRounds(_a) {
|
|
36066
|
+
var e_1, _b;
|
|
36067
|
+
var _c, _d;
|
|
36068
|
+
var _e = _a.roundsCount, roundsCount = _e === void 0 ? 1 : _e, drawDefinition = _a.drawDefinition, matchUpsCount = _a.matchUpsCount, structureId = _a.structureId, idPrefix = _a.idPrefix, isMock = _a.isMock, event = _a.event;
|
|
36069
|
+
var matchUps = [];
|
|
36070
|
+
var roundNumber;
|
|
36071
|
+
try {
|
|
36072
|
+
for (var _f = __values(generateRange(1, roundsCount + 1)), _g = _f.next(); !_g.done; _g = _f.next()) {
|
|
36073
|
+
var iteration = _g.value;
|
|
36074
|
+
// on the first iteration roundNumber is undefined and generateAdHocMatchUps will infer the roundNumber from existing matchUps
|
|
36075
|
+
// on subsequent iterations roundNumber will be incremented and ignoreLastRoundNumber will be true to avoid inference error
|
|
36076
|
+
var genResult = generateAdHocMatchUps({
|
|
36077
|
+
ignoreLastRoundNumber: !!roundNumber,
|
|
36078
|
+
newRound: !roundNumber,
|
|
36079
|
+
drawDefinition: drawDefinition,
|
|
36080
|
+
matchUpsCount: matchUpsCount,
|
|
36081
|
+
structureId: structureId,
|
|
36082
|
+
roundNumber: roundNumber,
|
|
36083
|
+
idPrefix: idPrefix,
|
|
36084
|
+
isMock: isMock,
|
|
36085
|
+
event: event,
|
|
36086
|
+
});
|
|
36087
|
+
if (genResult.error)
|
|
36088
|
+
return decorateResult({ result: genResult, info: { iteration: iteration } });
|
|
36089
|
+
if ((_c = genResult.matchUps) === null || _c === void 0 ? void 0 : _c.length)
|
|
36090
|
+
matchUps.push.apply(matchUps, __spreadArray([], __read(genResult.matchUps), false));
|
|
36091
|
+
roundNumber = ((_d = genResult === null || genResult === void 0 ? void 0 : genResult.roundNumber) !== null && _d !== void 0 ? _d : 1) + 1;
|
|
36092
|
+
}
|
|
36093
|
+
}
|
|
36094
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
36095
|
+
finally {
|
|
36096
|
+
try {
|
|
36097
|
+
if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
|
|
36098
|
+
}
|
|
36099
|
+
finally { if (e_1) throw e_1.error; }
|
|
36100
|
+
}
|
|
36101
|
+
return { matchUps: matchUps };
|
|
36102
|
+
}
|
|
36103
|
+
|
|
36065
36104
|
function drawMatic(params) {
|
|
36066
36105
|
var e_1, _a;
|
|
36067
36106
|
var _b, _c, _d, _e, _f, _g;
|
|
@@ -36226,7 +36265,7 @@ function checkParams(params) {
|
|
|
36226
36265
|
}
|
|
36227
36266
|
|
|
36228
36267
|
function generateAdHoc(params) {
|
|
36229
|
-
var _a;
|
|
36268
|
+
var _a, _b;
|
|
36230
36269
|
var tournamentRecord = params.tournamentRecord, drawDefinition = params.drawDefinition, structureId = params.structureId, idPrefix = params.idPrefix, isMock = params.isMock, event = params.event;
|
|
36231
36270
|
var entries = (_a = event === null || event === void 0 ? void 0 : event.entries) === null || _a === void 0 ? void 0 : _a.filter(function (_a) {
|
|
36232
36271
|
var entryStage = _a.entryStage, entryStatus = _a.entryStatus;
|
|
@@ -36235,34 +36274,38 @@ function generateAdHoc(params) {
|
|
|
36235
36274
|
var participantIds = entries === null || entries === void 0 ? void 0 : entries.map(getParticipantId);
|
|
36236
36275
|
var matchUpsCount = entries ? Math.floor(entries.length / 2) : 0;
|
|
36237
36276
|
if (params.automated) {
|
|
36238
|
-
automateAdHoc(__assign(__assign({}, params), { participantIds: participantIds }));
|
|
36277
|
+
return automateAdHoc(__assign(__assign({}, params), { participantIds: participantIds }));
|
|
36239
36278
|
}
|
|
36240
36279
|
else {
|
|
36241
|
-
|
|
36242
|
-
|
|
36243
|
-
|
|
36280
|
+
var genResult = generateAdHocRounds({
|
|
36281
|
+
roundsCount: params.roundsCount,
|
|
36282
|
+
drawDefinition: drawDefinition,
|
|
36283
|
+
matchUpsCount: matchUpsCount,
|
|
36284
|
+
idPrefix: idPrefix,
|
|
36285
|
+
isMock: isMock,
|
|
36286
|
+
event: event,
|
|
36287
|
+
});
|
|
36288
|
+
if (genResult.error)
|
|
36289
|
+
return genResult;
|
|
36290
|
+
if ((_b = genResult.matchUps) === null || _b === void 0 ? void 0 : _b.length) {
|
|
36291
|
+
addAdHocMatchUps({
|
|
36292
|
+
matchUps: genResult.matchUps,
|
|
36293
|
+
suppressNotifications: true,
|
|
36294
|
+
tournamentRecord: tournamentRecord,
|
|
36244
36295
|
drawDefinition: drawDefinition,
|
|
36245
|
-
|
|
36246
|
-
idPrefix: idPrefix,
|
|
36247
|
-
isMock: isMock,
|
|
36296
|
+
structureId: structureId,
|
|
36248
36297
|
event: event,
|
|
36249
|
-
})
|
|
36250
|
-
|
|
36251
|
-
addAdHocMatchUps({
|
|
36252
|
-
suppressNotifications: true,
|
|
36253
|
-
tournamentRecord: tournamentRecord,
|
|
36254
|
-
drawDefinition: drawDefinition,
|
|
36255
|
-
structureId: structureId,
|
|
36256
|
-
matchUps: matchUps,
|
|
36257
|
-
event: event,
|
|
36258
|
-
});
|
|
36259
|
-
});
|
|
36298
|
+
});
|
|
36299
|
+
}
|
|
36260
36300
|
}
|
|
36301
|
+
return __assign({}, SUCCESS);
|
|
36261
36302
|
}
|
|
36262
36303
|
function automateAdHoc(params) {
|
|
36263
36304
|
var _a, _b, _c, _d;
|
|
36264
36305
|
var _e = (_a = params.drawMatic) !== null && _a !== void 0 ? _a : {}, restrictEntryStatus = _e.restrictEntryStatus, generateMatchUps = _e.generateMatchUps, structureId = _e.structureId, matchUpIds = _e.matchUpIds, scaleName = _e.scaleName;
|
|
36265
36306
|
var result = drawMatic(__assign(__assign({}, params), { eventType: (_c = (_b = params.drawMatic) === null || _b === void 0 ? void 0 : _b.eventType) !== null && _c !== void 0 ? _c : params.matchUpType, generateMatchUps: generateMatchUps !== null && generateMatchUps !== void 0 ? generateMatchUps : true, participantIds: params.participantIds, roundsCount: params.roundsCount, restrictEntryStatus: restrictEntryStatus, structureId: structureId, matchUpIds: matchUpIds, scaleName: scaleName }));
|
|
36307
|
+
if (result.error)
|
|
36308
|
+
return result;
|
|
36266
36309
|
((_d = result === null || result === void 0 ? void 0 : result.matchUps) === null || _d === void 0 ? void 0 : _d.length) &&
|
|
36267
36310
|
addAdHocMatchUps({
|
|
36268
36311
|
tournamentRecord: params.tournamentRecord,
|
|
@@ -36272,6 +36315,7 @@ function automateAdHoc(params) {
|
|
|
36272
36315
|
event: params.event,
|
|
36273
36316
|
structureId: structureId,
|
|
36274
36317
|
});
|
|
36318
|
+
return __assign({}, SUCCESS);
|
|
36275
36319
|
}
|
|
36276
36320
|
|
|
36277
36321
|
function initializeStructureSeedAssignments(_a) {
|
|
@@ -41930,6 +41974,7 @@ var index$d = {
|
|
|
41930
41974
|
drawMatic: drawMatic,
|
|
41931
41975
|
findDrawDefinition: publicFindDrawDefinition,
|
|
41932
41976
|
generateAdHocMatchUps: generateAdHocMatchUps,
|
|
41977
|
+
generateAdHocRounds: generateAdHocRounds,
|
|
41933
41978
|
generateAndPopulatePlayoffStructures: generateAndPopulatePlayoffStructures,
|
|
41934
41979
|
generateDrawDefinition: generateDrawDefinition,
|
|
41935
41980
|
generateDrawMaticRound: generateDrawMaticRound,
|
|
@@ -45601,6 +45646,7 @@ var index$a = {
|
|
|
45601
45646
|
drawMatic: drawMatic,
|
|
45602
45647
|
garman: garman$1,
|
|
45603
45648
|
generateAdHocMatchUps: generateAdHocMatchUps,
|
|
45649
|
+
generateAdHocRounds: generateAdHocRounds,
|
|
45604
45650
|
generateAndPopulatePlayoffStructures: generateAndPopulatePlayoffStructures,
|
|
45605
45651
|
generateCourts: generateCourts,
|
|
45606
45652
|
generateDrawDefinition: generateDrawDefinition,
|
|
@@ -56733,6 +56779,7 @@ function anonymizeTournamentRecord(_a) {
|
|
|
56733
56779
|
tournamentRecord.tournamentId = newTournamentId;
|
|
56734
56780
|
tournamentRecord.createdAt = new Date().toISOString();
|
|
56735
56781
|
tournamentRecord.tournamentName = tournamentName || "Anonymized: ".concat(formatDate(new Date()));
|
|
56782
|
+
tournamentRecord.isMock = true;
|
|
56736
56783
|
delete tournamentRecord.parentOrganisation;
|
|
56737
56784
|
try {
|
|
56738
56785
|
for (var _x = __values(tournamentRecord.participants || []), _y = _x.next(); !_y.done; _y = _x.next()) {
|
|
@@ -56774,6 +56821,7 @@ function anonymizeTournamentRecord(_a) {
|
|
|
56774
56821
|
venue.venueAbbreviation = "V".concat(venueIndex);
|
|
56775
56822
|
var newVenueId = UUID();
|
|
56776
56823
|
idMap[venue.venueId] = newVenueId;
|
|
56824
|
+
venue.isMock = true;
|
|
56777
56825
|
venueIndex += 1;
|
|
56778
56826
|
// venue.eventId = UUID(); eventIds can't be anonymized without updating schedulingProfiles
|
|
56779
56827
|
}
|
|
@@ -56790,6 +56838,7 @@ function anonymizeTournamentRecord(_a) {
|
|
|
56790
56838
|
for (var _3 = __values(tournamentRecord.events || []), _4 = _3.next(); !_4.done; _4 = _3.next()) {
|
|
56791
56839
|
var event_1 = _4.value;
|
|
56792
56840
|
event_1.extensions = filterExtensions(event_1);
|
|
56841
|
+
event_1.isMock = true;
|
|
56793
56842
|
var newEventId = UUID();
|
|
56794
56843
|
idMap[event_1.eventId] = newEventId;
|
|
56795
56844
|
event_1.eventId = newEventId;
|
|
@@ -56818,6 +56867,7 @@ function anonymizeTournamentRecord(_a) {
|
|
|
56818
56867
|
var newDrawId = UUID();
|
|
56819
56868
|
idMap[drawDefinition.drawId] = newDrawId;
|
|
56820
56869
|
drawDefinition.drawId = newDrawId;
|
|
56870
|
+
drawDefinition.isMock = true;
|
|
56821
56871
|
// update all drawDefinition entries
|
|
56822
56872
|
if (Array.isArray(drawDefinition.entries)) {
|
|
56823
56873
|
try {
|
|
@@ -56874,6 +56924,7 @@ function anonymizeTournamentRecord(_a) {
|
|
|
56874
56924
|
// update lineUps in each matchUp
|
|
56875
56925
|
for (var _j = (e_13 = void 0, __values(structure.matchUps || [])), _k = _j.next(); !_k.done; _k = _j.next()) {
|
|
56876
56926
|
var matchUp = _k.value;
|
|
56927
|
+
matchUp.isMock = true;
|
|
56877
56928
|
try {
|
|
56878
56929
|
for (var _l = (e_14 = void 0, __values(matchUp.sides || [])), _m = _l.next(); !_m.done; _m = _l.next()) {
|
|
56879
56930
|
var side = _m.value;
|