tods-competition-factory 0.231.0 → 0.232.0
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/tods-competition-factory.development.cjs.js +51 -13
- 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/dist/tods-competition-factory.production.esm.min.js +1 -1
- package/dist/tods-competition-factory.production.esm.min.js.map +1 -1
- package/package.json +4 -4
|
@@ -249,7 +249,7 @@ const matchUpFormatCode = {
|
|
|
249
249
|
};
|
|
250
250
|
|
|
251
251
|
function factoryVersion() {
|
|
252
|
-
return '0.
|
|
252
|
+
return '0.232.0';
|
|
253
253
|
}
|
|
254
254
|
|
|
255
255
|
function decorateResult({
|
|
@@ -21878,7 +21878,8 @@ function conditionallyAdvanceDrawPosition(params) {
|
|
|
21878
21878
|
stack
|
|
21879
21879
|
});
|
|
21880
21880
|
const {
|
|
21881
|
-
pairedPreviousMatchUpIsDoubleExit
|
|
21881
|
+
pairedPreviousMatchUpIsDoubleExit,
|
|
21882
|
+
pairedPreviousMatchUp
|
|
21882
21883
|
} = getPairedPreviousMatchUpIsDoubleExit(params); // get the targets for the winnerMatchUp
|
|
21883
21884
|
|
|
21884
21885
|
const targetData = positionTargets({
|
|
@@ -21926,10 +21927,54 @@ function conditionallyAdvanceDrawPosition(params) {
|
|
|
21926
21927
|
const existingExit = [WALKOVER$2, DEFAULTED].includes(noContextWinnerMatchUp.matchUpStatus) && !drawPositions.length;
|
|
21927
21928
|
const isFinal = noContextWinnerMatchUp.finishingRound === 1;
|
|
21928
21929
|
const matchUpStatus = existingExit && !isFinal ? DOUBLE_EXIT : EXIT;
|
|
21930
|
+
const inContextPairedPreviousMatchUp = inContextDrawMatchUps.find(candidate => candidate.matchUpId === pairedPreviousMatchUp.matchUpId);
|
|
21931
|
+
let matchUpStatusCodes = [];
|
|
21932
|
+
let sourceSideNumber;
|
|
21933
|
+
|
|
21934
|
+
if (sourceMatchUp) {
|
|
21935
|
+
if ((sourceMatchUp === null || sourceMatchUp === void 0 ? void 0 : sourceMatchUp.structureId) === (inContextPairedPreviousMatchUp === null || inContextPairedPreviousMatchUp === void 0 ? void 0 : inContextPairedPreviousMatchUp.structureId)) {
|
|
21936
|
+
// if structureIds are equivalent then sideNumber is inferred from roundPositions
|
|
21937
|
+
if (sourceMatchUp.roundPosition < (pairedPreviousMatchUp === null || pairedPreviousMatchUp === void 0 ? void 0 : pairedPreviousMatchUp.roundPosition)) {
|
|
21938
|
+
sourceSideNumber = 1;
|
|
21939
|
+
} else {
|
|
21940
|
+
sourceSideNumber = 2;
|
|
21941
|
+
}
|
|
21942
|
+
} else {
|
|
21943
|
+
// if different structureIds then structureId that is not equivalent to noContextWinnerMatchUp.structureId is fed
|
|
21944
|
+
// ... and fed positions are always sideNumber 1
|
|
21945
|
+
if (sourceMatchUp.structureId === winnerMatchUp.structureId) {
|
|
21946
|
+
sourceSideNumber = 2;
|
|
21947
|
+
} else {
|
|
21948
|
+
sourceSideNumber = 1;
|
|
21949
|
+
}
|
|
21950
|
+
}
|
|
21951
|
+
}
|
|
21952
|
+
|
|
21953
|
+
const sourceMatchUpStatus = params.matchUpStatus;
|
|
21954
|
+
const pairedMatchUpStatus = pairedPreviousMatchUp === null || pairedPreviousMatchUp === void 0 ? void 0 : pairedPreviousMatchUp.matchUpStatus;
|
|
21955
|
+
|
|
21956
|
+
if (sourceSideNumber === 1) {
|
|
21957
|
+
matchUpStatusCodes = [{
|
|
21958
|
+
sideNumber: 1,
|
|
21959
|
+
previousMatchUpStatus: sourceMatchUpStatus
|
|
21960
|
+
}, {
|
|
21961
|
+
sideNumber: 2,
|
|
21962
|
+
previousMatchUpStatus: pairedMatchUpStatus
|
|
21963
|
+
}];
|
|
21964
|
+
} else if (sourceSideNumber === 2) {
|
|
21965
|
+
matchUpStatusCodes = [{
|
|
21966
|
+
sideNumber: 1,
|
|
21967
|
+
previousMatchUpStatus: pairedMatchUpStatus
|
|
21968
|
+
}, {
|
|
21969
|
+
sideNumber: 2,
|
|
21970
|
+
previousMatchUpStatus: sourceMatchUpStatus
|
|
21971
|
+
}];
|
|
21972
|
+
}
|
|
21973
|
+
|
|
21929
21974
|
const result = modifyMatchUpScore({ ...params,
|
|
21930
21975
|
matchUp: noContextWinnerMatchUp,
|
|
21931
21976
|
winningSide: walkoverWinningSide,
|
|
21932
|
-
matchUpStatusCodes
|
|
21977
|
+
matchUpStatusCodes,
|
|
21933
21978
|
matchUpStatus
|
|
21934
21979
|
});
|
|
21935
21980
|
if (result.error) return decorateResult({
|
|
@@ -21940,7 +21985,7 @@ function conditionallyAdvanceDrawPosition(params) {
|
|
|
21940
21985
|
|
|
21941
21986
|
if (existingExit) {
|
|
21942
21987
|
return doubleExitAdvancement({ ...params,
|
|
21943
|
-
|
|
21988
|
+
matchUpStatus,
|
|
21944
21989
|
targetData
|
|
21945
21990
|
});
|
|
21946
21991
|
}
|
|
@@ -22004,8 +22049,7 @@ function conditionallyAdvanceDrawPosition(params) {
|
|
|
22004
22049
|
// if the next winnerMatchUp is a double walkover or double default
|
|
22005
22050
|
const result = doubleExitAdvancement({ ...params,
|
|
22006
22051
|
matchUpId: noContextNextWinnerMatchUp.matchUpId,
|
|
22007
|
-
|
|
22008
|
-
// don't propagate matchUpStatusCodes
|
|
22052
|
+
matchUpStatus,
|
|
22009
22053
|
targetData
|
|
22010
22054
|
});
|
|
22011
22055
|
if (result.error) return decorateResult({
|
|
@@ -22045,11 +22089,6 @@ function conditionallyAdvanceDrawPosition(params) {
|
|
|
22045
22089
|
}
|
|
22046
22090
|
|
|
22047
22091
|
const matchUpStatus = [WALKOVER$2, DEFAULTED].includes(noContextNextWinnerMatchUp.matchUpStatus) ? EXIT : DOUBLE_EXIT;
|
|
22048
|
-
/*
|
|
22049
|
-
const matchUpStatus =
|
|
22050
|
-
noContextNextWinnerMatchUp.matchUpStatus === EXIT ? EXIT : DOUBLE_EXIT;
|
|
22051
|
-
*/
|
|
22052
|
-
|
|
22053
22092
|
const result = modifyMatchUpScore({
|
|
22054
22093
|
matchUpId: noContextNextWinnerMatchUp.matchUpId,
|
|
22055
22094
|
matchUp: noContextNextWinnerMatchUp,
|
|
@@ -22065,9 +22104,8 @@ function conditionallyAdvanceDrawPosition(params) {
|
|
|
22065
22104
|
|
|
22066
22105
|
if (matchUpStatus === DOUBLE_EXIT) {
|
|
22067
22106
|
const advancementResult = doubleExitAdvancement({ ...params,
|
|
22068
|
-
matchUpStatusCodes: [],
|
|
22069
|
-
// don't propagate matchUpStatusCodes
|
|
22070
22107
|
matchUpId: winnerMatchUp.matchUpId,
|
|
22108
|
+
matchUpStatus,
|
|
22071
22109
|
targetData
|
|
22072
22110
|
});
|
|
22073
22111
|
if (advancementResult.error) return advancementResult;
|