tods-competition-factory 0.53.3 → 0.53.4
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.cjs.development.js +116 -109
- package/dist/tods-competition-factory.cjs.development.js.map +1 -1
- package/dist/tods-competition-factory.esm.js +116 -109
- package/dist/tods-competition-factory.esm.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
|
@@ -27483,7 +27483,7 @@ const scheduleGovernor$1 = {
|
|
|
27483
27483
|
};
|
|
27484
27484
|
|
|
27485
27485
|
function factoryVersion() {
|
|
27486
|
-
return '0.53.
|
|
27486
|
+
return '0.53.4';
|
|
27487
27487
|
}
|
|
27488
27488
|
|
|
27489
27489
|
function attachPolicies$2({
|
|
@@ -31273,6 +31273,117 @@ const policyGovernor$1 = {
|
|
|
31273
31273
|
getEventAppliedPolicies
|
|
31274
31274
|
};
|
|
31275
31275
|
|
|
31276
|
+
const COLLEGE_DEFAULT = 'COLLEGE_DEFAULT';
|
|
31277
|
+
const COLLEGE_JUCO = 'COLLEGE_JUCO';
|
|
31278
|
+
const COLLEGE_D3 = 'COLLEGE_D3';
|
|
31279
|
+
const DOMINANT_DUO = 'DOMINANT_DUO';
|
|
31280
|
+
const LAVER_CUP = 'LAVER_CUP';
|
|
31281
|
+
const tieFormatConstants = {
|
|
31282
|
+
COLLEGE_D3,
|
|
31283
|
+
COLLEGE_DEFAULT,
|
|
31284
|
+
COLLEGE_JUCO,
|
|
31285
|
+
DOMINANT_DUO,
|
|
31286
|
+
LAVER_CUP
|
|
31287
|
+
};
|
|
31288
|
+
|
|
31289
|
+
const namedFormats = {
|
|
31290
|
+
STANDARD: {
|
|
31291
|
+
hydrate: true,
|
|
31292
|
+
doubles: {
|
|
31293
|
+
matchUpCount: 3,
|
|
31294
|
+
matchUpValue: 1
|
|
31295
|
+
},
|
|
31296
|
+
singles: {
|
|
31297
|
+
matchUpCount: 6,
|
|
31298
|
+
matchUpValue: 1
|
|
31299
|
+
},
|
|
31300
|
+
valueGoal: 5
|
|
31301
|
+
},
|
|
31302
|
+
[COLLEGE_D3]: {
|
|
31303
|
+
hydrate: true,
|
|
31304
|
+
doubles: {
|
|
31305
|
+
matchUpCount: 3,
|
|
31306
|
+
matchUpValue: 1,
|
|
31307
|
+
matchUpFormat: 'SET1-S:8/TB7@7'
|
|
31308
|
+
},
|
|
31309
|
+
singles: {
|
|
31310
|
+
matchUpCount: 6,
|
|
31311
|
+
matchUpValue: 1,
|
|
31312
|
+
matchUpFormat: 'SET3-S:6/TB7'
|
|
31313
|
+
},
|
|
31314
|
+
tieFormatName: 'COLLEGE_D3',
|
|
31315
|
+
valueGoal: 5
|
|
31316
|
+
},
|
|
31317
|
+
[COLLEGE_DEFAULT]: {
|
|
31318
|
+
hydrate: true,
|
|
31319
|
+
doubles: {
|
|
31320
|
+
matchUpCount: 3,
|
|
31321
|
+
collectionValue: 1,
|
|
31322
|
+
matchUpFormat: 'SET1-S:6NOAD/TB7'
|
|
31323
|
+
},
|
|
31324
|
+
singles: {
|
|
31325
|
+
matchUpCount: 6,
|
|
31326
|
+
matchUpValue: 1,
|
|
31327
|
+
matchUpFormat: 'SET3-S:6NOAD/TB7'
|
|
31328
|
+
},
|
|
31329
|
+
tieFormatName: 'COLLEGE_DEFAULT',
|
|
31330
|
+
valueGoal: 4
|
|
31331
|
+
},
|
|
31332
|
+
[COLLEGE_JUCO]: {
|
|
31333
|
+
hydrate: true,
|
|
31334
|
+
doubles: {
|
|
31335
|
+
matchUpCount: 3,
|
|
31336
|
+
matchUpValue: 1,
|
|
31337
|
+
matchUpFormat: 'SET1-S:8/TB7'
|
|
31338
|
+
},
|
|
31339
|
+
singles: {
|
|
31340
|
+
matchUpCount: 6,
|
|
31341
|
+
matchUpValue: 1,
|
|
31342
|
+
matchUpFormat: 'SET3-S:6/TB7'
|
|
31343
|
+
},
|
|
31344
|
+
tieFormatName: 'COLLEGE_JUCO',
|
|
31345
|
+
valueGoal: 5
|
|
31346
|
+
},
|
|
31347
|
+
[LAVER_CUP]: LAVER_CUP_TIE_FORMAT,
|
|
31348
|
+
[DOMINANT_DUO]: DOMINANT_DUO_TIE_FORMAT
|
|
31349
|
+
};
|
|
31350
|
+
const tieFormatDefaults = ({
|
|
31351
|
+
namedFormat,
|
|
31352
|
+
uuids = []
|
|
31353
|
+
} = {}) => {
|
|
31354
|
+
var _uuids, _uuids2;
|
|
31355
|
+
|
|
31356
|
+
if (!Object.keys(namedFormats).includes(namedFormat)) namedFormat = 'STANDARD';
|
|
31357
|
+
if (!Array.isArray(uuids)) uuids = [];
|
|
31358
|
+
const template = namedFormats[namedFormat];
|
|
31359
|
+
|
|
31360
|
+
if (!template.hydrate) {
|
|
31361
|
+
template.collectionDefinitions.forEach(collectionDefinition => collectionDefinition.collectionId = UUID());
|
|
31362
|
+
return template;
|
|
31363
|
+
}
|
|
31364
|
+
|
|
31365
|
+
const tieFormat = {
|
|
31366
|
+
winCriteria: {
|
|
31367
|
+
valueGoal: template.valueGoal
|
|
31368
|
+
},
|
|
31369
|
+
collectionDefinitions: [{
|
|
31370
|
+
collectionId: ((_uuids = uuids) === null || _uuids === void 0 ? void 0 : _uuids.pop()) || UUID(),
|
|
31371
|
+
collectionName: 'Doubles',
|
|
31372
|
+
matchUpType: DOUBLES$1,
|
|
31373
|
+
matchUpFormat: 'SET3-S:6/TB7-F:TB10',
|
|
31374
|
+
...template.doubles
|
|
31375
|
+
}, {
|
|
31376
|
+
collectionId: ((_uuids2 = uuids) === null || _uuids2 === void 0 ? void 0 : _uuids2.pop()) || UUID(),
|
|
31377
|
+
collectionName: 'Singles',
|
|
31378
|
+
matchUpType: SINGLES$1,
|
|
31379
|
+
matchUpFormat: 'SET3-S:6/TB7',
|
|
31380
|
+
...template.singles
|
|
31381
|
+
}]
|
|
31382
|
+
};
|
|
31383
|
+
if (template.tieFormatName) tieFormat.tieFormatName = template.tieFormatName;
|
|
31384
|
+
return tieFormat;
|
|
31385
|
+
};
|
|
31386
|
+
|
|
31276
31387
|
function addEvent({
|
|
31277
31388
|
tournamentRecord,
|
|
31278
31389
|
event
|
|
@@ -31292,8 +31403,10 @@ function addEvent({
|
|
|
31292
31403
|
eventType: SINGLES
|
|
31293
31404
|
}, event);
|
|
31294
31405
|
|
|
31295
|
-
if (event.tieFormatName && tieFormats[event.tieFormatName]) {
|
|
31296
|
-
eventRecord.tieFormat =
|
|
31406
|
+
if (event.eventType === TEAM$2 && event.tieFormatName && tieFormats[event.tieFormatName]) {
|
|
31407
|
+
eventRecord.tieFormat = tieFormatDefaults({
|
|
31408
|
+
namedFormat: event.tieFormatName
|
|
31409
|
+
});
|
|
31297
31410
|
}
|
|
31298
31411
|
|
|
31299
31412
|
if (!eventRecord.eventId) eventRecord.eventId = UUID();
|
|
@@ -37906,112 +38019,6 @@ function newDrawDefinition({
|
|
|
37906
38019
|
});
|
|
37907
38020
|
}
|
|
37908
38021
|
|
|
37909
|
-
const COLLEGE_DEFAULT = 'COLLEGE_DEFAULT';
|
|
37910
|
-
const COLLEGE_JUCO = 'COLLEGE_JUCO';
|
|
37911
|
-
const COLLEGE_D3 = 'COLLEGE_D3';
|
|
37912
|
-
const DOMINANT_DUO = 'DOMINANT_DUO';
|
|
37913
|
-
const LAVER_CUP = 'LAVER_CUP';
|
|
37914
|
-
const tieFormatConstants = {
|
|
37915
|
-
COLLEGE_D3,
|
|
37916
|
-
COLLEGE_DEFAULT,
|
|
37917
|
-
COLLEGE_JUCO,
|
|
37918
|
-
DOMINANT_DUO,
|
|
37919
|
-
LAVER_CUP
|
|
37920
|
-
};
|
|
37921
|
-
|
|
37922
|
-
const namedFormats = {
|
|
37923
|
-
STANDARD: {
|
|
37924
|
-
hydrate: true,
|
|
37925
|
-
doubles: {
|
|
37926
|
-
matchUpCount: 3,
|
|
37927
|
-
matchUpValue: 1
|
|
37928
|
-
},
|
|
37929
|
-
singles: {
|
|
37930
|
-
matchUpCount: 6,
|
|
37931
|
-
matchUpValue: 1
|
|
37932
|
-
},
|
|
37933
|
-
valueGoal: 5
|
|
37934
|
-
},
|
|
37935
|
-
[COLLEGE_D3]: {
|
|
37936
|
-
hydrate: true,
|
|
37937
|
-
doubles: {
|
|
37938
|
-
matchUpCount: 3,
|
|
37939
|
-
matchUpValue: 1,
|
|
37940
|
-
matchUpFormat: 'SET1-S:8/TB7@7'
|
|
37941
|
-
},
|
|
37942
|
-
singles: {
|
|
37943
|
-
matchUpCount: 6,
|
|
37944
|
-
matchUpValue: 1,
|
|
37945
|
-
matchUpFormat: 'SET3-S:6/TB7'
|
|
37946
|
-
},
|
|
37947
|
-
tieFormatName: 'COLLEGE_D3',
|
|
37948
|
-
valueGoal: 5
|
|
37949
|
-
},
|
|
37950
|
-
[COLLEGE_DEFAULT]: {
|
|
37951
|
-
hydrate: true,
|
|
37952
|
-
doubles: {
|
|
37953
|
-
matchUpCount: 3,
|
|
37954
|
-
collectionValue: 1,
|
|
37955
|
-
matchUpFormat: 'SET1-S:6NOAD/TB7'
|
|
37956
|
-
},
|
|
37957
|
-
singles: {
|
|
37958
|
-
matchUpCount: 6,
|
|
37959
|
-
matchUpValue: 1,
|
|
37960
|
-
matchUpFormat: 'SET3-S:6NOAD/TB7'
|
|
37961
|
-
},
|
|
37962
|
-
tieFormatName: 'COLLEGE_DEFAULT',
|
|
37963
|
-
valueGoal: 4
|
|
37964
|
-
},
|
|
37965
|
-
[COLLEGE_JUCO]: {
|
|
37966
|
-
hydrate: true,
|
|
37967
|
-
doubles: {
|
|
37968
|
-
matchUpCount: 3,
|
|
37969
|
-
matchUpValue: 1,
|
|
37970
|
-
matchUpFormat: 'SET1-S:8/TB7'
|
|
37971
|
-
},
|
|
37972
|
-
singles: {
|
|
37973
|
-
matchUpCount: 6,
|
|
37974
|
-
matchUpValue: 1,
|
|
37975
|
-
matchUpFormat: 'SET3-S:6/TB7'
|
|
37976
|
-
},
|
|
37977
|
-
tieFormatName: 'COLLEGE_JUCO',
|
|
37978
|
-
valueGoal: 5
|
|
37979
|
-
},
|
|
37980
|
-
[LAVER_CUP]: LAVER_CUP_TIE_FORMAT,
|
|
37981
|
-
[DOMINANT_DUO]: DOMINANT_DUO_TIE_FORMAT
|
|
37982
|
-
};
|
|
37983
|
-
const tieFormatDefaults = ({
|
|
37984
|
-
namedFormat,
|
|
37985
|
-
uuids = []
|
|
37986
|
-
} = {}) => {
|
|
37987
|
-
var _uuids, _uuids2;
|
|
37988
|
-
|
|
37989
|
-
if (!Object.keys(namedFormats).includes(namedFormat)) namedFormat = 'STANDARD';
|
|
37990
|
-
if (!Array.isArray(uuids)) uuids = [];
|
|
37991
|
-
const template = namedFormats[namedFormat];
|
|
37992
|
-
if (!template.hydrate) return template;
|
|
37993
|
-
const tieFormat = {
|
|
37994
|
-
winCriteria: {
|
|
37995
|
-
valueGoal: template.valueGoal
|
|
37996
|
-
},
|
|
37997
|
-
collectionDefinitions: [{
|
|
37998
|
-
collectionId: ((_uuids = uuids) === null || _uuids === void 0 ? void 0 : _uuids.pop()) || UUID(),
|
|
37999
|
-
collectionName: 'Doubles',
|
|
38000
|
-
matchUpType: DOUBLES$1,
|
|
38001
|
-
matchUpFormat: 'SET3-S:6/TB7-F:TB10',
|
|
38002
|
-
...template.doubles
|
|
38003
|
-
}, {
|
|
38004
|
-
collectionId: ((_uuids2 = uuids) === null || _uuids2 === void 0 ? void 0 : _uuids2.pop()) || UUID(),
|
|
38005
|
-
collectionName: 'Singles',
|
|
38006
|
-
matchUpType: SINGLES$1,
|
|
38007
|
-
matchUpFormat: 'SET3-S:6/TB7',
|
|
38008
|
-
...template.singles
|
|
38009
|
-
}]
|
|
38010
|
-
};
|
|
38011
|
-
if (template.tieFormatName) tieFormat.tieFormatName = template.tieFormatName;
|
|
38012
|
-
return tieFormat;
|
|
38013
|
-
};
|
|
38014
|
-
|
|
38015
38022
|
/**
|
|
38016
38023
|
* automated = true, // can be true/false or "truthy" { seedsOnly: true }
|
|
38017
38024
|
*/
|