tods-competition-factory 1.7.11 → 1.7.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/index.mjs +21 -12
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.development.cjs.js +22 -10
- 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
package/dist/index.mjs
CHANGED
|
@@ -333,7 +333,7 @@ const matchUpFormatCode = {
|
|
|
333
333
|
};
|
|
334
334
|
|
|
335
335
|
function factoryVersion() {
|
|
336
|
-
return "1.7.
|
|
336
|
+
return "1.7.12";
|
|
337
337
|
}
|
|
338
338
|
|
|
339
339
|
function getObjectTieFormat(obj) {
|
|
@@ -16620,7 +16620,6 @@ function compareTieFormats({
|
|
|
16620
16620
|
);
|
|
16621
16621
|
const nameDifference = !!(considerations?.collectionName && descendant.collectionDefinitions.map(({ collectionName }) => collectionName).join("|") !== ancestor.collectionDefinitions.map(({ collectionName }) => collectionName).join("|"));
|
|
16622
16622
|
const orderDifference = !!(considerations?.collectionOrder && descendant.collectionDefinitions.map(({ collectionOrder }) => collectionOrder).join("|") !== ancestor.collectionDefinitions.map(({ collectionOrder }) => collectionOrder).join("|"));
|
|
16623
|
-
const different = nameDifference || orderDifference || ancestorDesc !== descendantDesc;
|
|
16624
16623
|
const descendantCollectionDefinitions = Object.assign(
|
|
16625
16624
|
{},
|
|
16626
16625
|
...(descendant?.collectionDefinitions || []).map(
|
|
@@ -16644,17 +16643,16 @@ function compareTieFormats({
|
|
|
16644
16643
|
Object.keys(descendantCollectionDefinitions)
|
|
16645
16644
|
);
|
|
16646
16645
|
descendantDifferences.collectionsValue = getCollectionsValue(
|
|
16647
|
-
descendantCollectionDefinitions
|
|
16648
|
-
descendantDifferences
|
|
16646
|
+
descendantCollectionDefinitions
|
|
16649
16647
|
);
|
|
16650
16648
|
ancestorDifferences.collectionsValue = getCollectionsValue(
|
|
16651
|
-
ancestorCollectionDefinitions
|
|
16652
|
-
ancestorDifferences
|
|
16649
|
+
ancestorCollectionDefinitions
|
|
16653
16650
|
);
|
|
16654
16651
|
descendantDifferences.groupsCount = ancestor?.collectionGroups?.length ?? (0 - (descendant?.collectionGroups?.length ?? 0) || 0);
|
|
16655
16652
|
ancestorDifferences.groupsCount = descendantDifferences.groupsCount ? -1 * descendantDifferences.groupsCount : 0;
|
|
16656
16653
|
const valueDifference = descendantDifferences.collectionsValue.totalValue - ancestorDifferences.collectionsValue.totalValue;
|
|
16657
16654
|
const matchUpCountDifference = descendantDifferences.collectionsValue.totalMatchUps - ancestorDifferences.collectionsValue.totalMatchUps;
|
|
16655
|
+
const different = nameDifference || orderDifference || ancestorDesc !== descendantDesc || valueDifference !== 0;
|
|
16658
16656
|
return {
|
|
16659
16657
|
matchUpFormatDifferences,
|
|
16660
16658
|
matchUpCountDifference,
|
|
@@ -16669,15 +16667,18 @@ function compareTieFormats({
|
|
|
16669
16667
|
different
|
|
16670
16668
|
};
|
|
16671
16669
|
}
|
|
16672
|
-
function getCollectionsValue(definitions
|
|
16670
|
+
function getCollectionsValue(definitions) {
|
|
16673
16671
|
let totalMatchUps = 0;
|
|
16674
|
-
const
|
|
16672
|
+
const collectionIds = Object.keys(definitions);
|
|
16673
|
+
const totalValue = collectionIds.reduce((total, collectionId) => {
|
|
16675
16674
|
const collectionDefinition = definitions[collectionId];
|
|
16676
16675
|
const {
|
|
16677
16676
|
collectionValueProfiles,
|
|
16678
16677
|
collectionValue,
|
|
16679
16678
|
matchUpCount,
|
|
16680
|
-
matchUpValue
|
|
16679
|
+
matchUpValue,
|
|
16680
|
+
scoreValue,
|
|
16681
|
+
setValue
|
|
16681
16682
|
} = collectionDefinition;
|
|
16682
16683
|
totalMatchUps += matchUpCount;
|
|
16683
16684
|
if (collectionValueProfiles)
|
|
@@ -16685,9 +16686,16 @@ function getCollectionsValue(definitions, aggregator) {
|
|
|
16685
16686
|
(total2, profile) => total2 + profile.value,
|
|
16686
16687
|
0
|
|
16687
16688
|
);
|
|
16688
|
-
if (
|
|
16689
|
-
|
|
16690
|
-
|
|
16689
|
+
if (matchUpCount) {
|
|
16690
|
+
if (isConvertableInteger(matchUpValue))
|
|
16691
|
+
return total + matchUpValue * matchUpCount;
|
|
16692
|
+
if (isConvertableInteger(scoreValue))
|
|
16693
|
+
return total + scoreValue * matchUpCount;
|
|
16694
|
+
if (isConvertableInteger(setValue))
|
|
16695
|
+
return total + setValue * matchUpCount;
|
|
16696
|
+
return total + collectionValue;
|
|
16697
|
+
}
|
|
16698
|
+
return total;
|
|
16691
16699
|
}, 0);
|
|
16692
16700
|
return { totalValue, totalMatchUps };
|
|
16693
16701
|
}
|
|
@@ -60246,6 +60254,7 @@ var lastNames = [
|
|
|
60246
60254
|
"Dallas",
|
|
60247
60255
|
"Diamond",
|
|
60248
60256
|
"Deckard",
|
|
60257
|
+
"Dunbar",
|
|
60249
60258
|
"Earhart",
|
|
60250
60259
|
"Eisenstein",
|
|
60251
60260
|
"Eldritch",
|