scorm-again 3.0.3 → 3.0.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/esm/scorm-again.js +18 -1
- package/dist/esm/scorm-again.js.map +1 -1
- package/dist/esm/scorm-again.min.js +1 -1
- package/dist/esm/scorm-again.min.js.map +1 -1
- package/dist/esm/scorm12.js +3 -1
- package/dist/esm/scorm12.js.map +1 -1
- package/dist/esm/scorm12.min.js +1 -1
- package/dist/esm/scorm12.min.js.map +1 -1
- package/dist/esm/scorm2004.js +18 -1
- package/dist/esm/scorm2004.js.map +1 -1
- package/dist/esm/scorm2004.min.js +1 -1
- package/dist/esm/scorm2004.min.js.map +1 -1
- package/dist/scorm-again.js +159 -102
- package/dist/scorm-again.js.map +1 -1
- package/dist/scorm-again.min.js +1 -1
- package/dist/scorm-again.min.js.map +1 -1
- package/dist/scorm12.js +3 -2
- package/dist/scorm12.js.map +1 -1
- package/dist/scorm12.min.js +1 -1
- package/dist/scorm12.min.js.map +1 -1
- package/dist/scorm2004.js +159 -102
- package/dist/scorm2004.js.map +1 -1
- package/dist/scorm2004.min.js +1 -1
- package/dist/scorm2004.min.js.map +1 -1
- package/package.json +20 -20
package/dist/scorm2004.js
CHANGED
|
@@ -198,14 +198,14 @@ this.Scorm2004API = (function () {
|
|
|
198
198
|
};
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
var __defProp$
|
|
202
|
-
var __defNormalProp$
|
|
201
|
+
var __defProp$15 = Object.defineProperty;
|
|
202
|
+
var __defNormalProp$15 = (obj, key, value) => key in obj ? __defProp$15(obj, key, {
|
|
203
203
|
enumerable: true,
|
|
204
204
|
configurable: true,
|
|
205
205
|
writable: true,
|
|
206
206
|
value
|
|
207
207
|
}) : obj[key] = value;
|
|
208
|
-
var __publicField$
|
|
208
|
+
var __publicField$15 = (obj, key, value) => __defNormalProp$15(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
209
209
|
class BaseCMI {
|
|
210
210
|
/**
|
|
211
211
|
* Constructor for BaseCMI
|
|
@@ -217,9 +217,9 @@ this.Scorm2004API = (function () {
|
|
|
217
217
|
* When true, getters can be accessed before the API is initialized, which is necessary
|
|
218
218
|
* for serializing the CMI data structure to JSON format.
|
|
219
219
|
*/
|
|
220
|
-
__publicField$
|
|
221
|
-
__publicField$
|
|
222
|
-
__publicField$
|
|
220
|
+
__publicField$15(this, "jsonString", false);
|
|
221
|
+
__publicField$15(this, "_cmi_element");
|
|
222
|
+
__publicField$15(this, "_initialized", false);
|
|
223
223
|
this._cmi_element = cmi_element;
|
|
224
224
|
}
|
|
225
225
|
/**
|
|
@@ -239,7 +239,7 @@ this.Scorm2004API = (function () {
|
|
|
239
239
|
class BaseRootCMI extends BaseCMI {
|
|
240
240
|
constructor() {
|
|
241
241
|
super(...arguments);
|
|
242
|
-
__publicField$
|
|
242
|
+
__publicField$15(this, "_start_time");
|
|
243
243
|
}
|
|
244
244
|
/**
|
|
245
245
|
* Start time of the session
|
|
@@ -261,18 +261,18 @@ this.Scorm2004API = (function () {
|
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
-
var __defProp$
|
|
265
|
-
var __defNormalProp$
|
|
264
|
+
var __defProp$14 = Object.defineProperty;
|
|
265
|
+
var __defNormalProp$14 = (obj, key, value) => key in obj ? __defProp$14(obj, key, {
|
|
266
266
|
enumerable: true,
|
|
267
267
|
configurable: true,
|
|
268
268
|
writable: true,
|
|
269
269
|
value
|
|
270
270
|
}) : obj[key] = value;
|
|
271
|
-
var __publicField$
|
|
271
|
+
var __publicField$14 = (obj, key, value) => __defNormalProp$14(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
272
272
|
class BaseScormValidationError extends Error {
|
|
273
273
|
constructor(CMIElement, errorCode) {
|
|
274
274
|
super(`${CMIElement} : ${errorCode.toString()}`);
|
|
275
|
-
__publicField$
|
|
275
|
+
__publicField$14(this, "_errorCode");
|
|
276
276
|
this._errorCode = errorCode;
|
|
277
277
|
Object.setPrototypeOf(this, BaseScormValidationError.prototype);
|
|
278
278
|
}
|
|
@@ -294,8 +294,8 @@ this.Scorm2004API = (function () {
|
|
|
294
294
|
*/
|
|
295
295
|
constructor(CMIElement, errorCode, errorMessage, detailedMessage) {
|
|
296
296
|
super(CMIElement, errorCode);
|
|
297
|
-
__publicField$
|
|
298
|
-
__publicField$
|
|
297
|
+
__publicField$14(this, "_errorMessage");
|
|
298
|
+
__publicField$14(this, "_detailedMessage", "");
|
|
299
299
|
this.message = `${CMIElement} : ${errorMessage}`;
|
|
300
300
|
this._errorMessage = errorMessage;
|
|
301
301
|
if (detailedMessage) {
|
|
@@ -600,14 +600,14 @@ this.Scorm2004API = (function () {
|
|
|
600
600
|
DEPENDENCY_NOT_ESTABLISHED: 408
|
|
601
601
|
};
|
|
602
602
|
|
|
603
|
-
var __defProp$
|
|
604
|
-
var __defNormalProp$
|
|
603
|
+
var __defProp$13 = Object.defineProperty;
|
|
604
|
+
var __defNormalProp$13 = (obj, key, value) => key in obj ? __defProp$13(obj, key, {
|
|
605
605
|
enumerable: true,
|
|
606
606
|
configurable: true,
|
|
607
607
|
writable: true,
|
|
608
608
|
value
|
|
609
609
|
}) : obj[key] = value;
|
|
610
|
-
var __publicField$
|
|
610
|
+
var __publicField$13 = (obj, key, value) => __defNormalProp$13(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
611
611
|
class CMIArray extends BaseCMI {
|
|
612
612
|
/**
|
|
613
613
|
* Constructor cmi *.n arrays
|
|
@@ -615,10 +615,10 @@ this.Scorm2004API = (function () {
|
|
|
615
615
|
*/
|
|
616
616
|
constructor(params) {
|
|
617
617
|
super(params.CMIElement);
|
|
618
|
-
__publicField$
|
|
619
|
-
__publicField$
|
|
620
|
-
__publicField$
|
|
621
|
-
__publicField$
|
|
618
|
+
__publicField$13(this, "_errorCode");
|
|
619
|
+
__publicField$13(this, "_errorClass");
|
|
620
|
+
__publicField$13(this, "__children");
|
|
621
|
+
__publicField$13(this, "childArray");
|
|
622
622
|
this.__children = params.children;
|
|
623
623
|
this._errorCode = params.errorCode ?? scorm12_errors.GENERAL;
|
|
624
624
|
this._errorClass = params.errorClass || BaseScormValidationError;
|
|
@@ -1094,14 +1094,14 @@ this.Scorm2004API = (function () {
|
|
|
1094
1094
|
|
|
1095
1095
|
const ValidLanguages = ["aa", "ab", "ae", "af", "ak", "am", "an", "ar", "as", "av", "ay", "az", "ba", "be", "bg", "bh", "bi", "bm", "bn", "bo", "br", "bs", "ca", "ce", "ch", "co", "cr", "cs", "cu", "cv", "cy", "da", "de", "dv", "dz", "ee", "el", "en", "eo", "es", "et", "eu", "fa", "ff", "fi", "fj", "fo", "fr", "fy", "ga", "gd", "gl", "gn", "gu", "gv", "ha", "he", "hi", "ho", "hr", "ht", "hu", "hy", "hz", "ia", "id", "ie", "ig", "ii", "ik", "io", "is", "it", "iu", "ja", "jv", "ka", "kg", "ki", "kj", "kk", "kl", "km", "kn", "ko", "kr", "ks", "ku", "kv", "kw", "ky", "la", "lb", "lg", "li", "ln", "lo", "lt", "lu", "lv", "mg", "mh", "mi", "mk", "ml", "mn", "mo", "mr", "ms", "mt", "my", "na", "nb", "nd", "ne", "ng", "nl", "nn", "no", "nr", "nv", "ny", "oc", "oj", "om", "or", "os", "pa", "pi", "pl", "ps", "pt", "qu", "rm", "rn", "ro", "ru", "rw", "sa", "sc", "sd", "se", "sg", "sh", "si", "sk", "sl", "sm", "sn", "so", "sq", "sr", "ss", "st", "su", "sv", "sw", "ta", "te", "tg", "th", "ti", "tk", "tl", "tn", "to", "tr", "ts", "tt", "tw", "ty", "ug", "uk", "ur", "uz", "ve", "vi", "vo", "wa", "wo", "xh", "yi", "yo", "za", "zh", "zu", "aar", "abk", "ave", "afr", "aka", "amh", "arg", "ara", "asm", "ava", "aym", "aze", "bak", "bel", "bul", "bih", "bis", "bam", "ben", "tib", "bod", "bre", "bos", "cat", "che", "cha", "cos", "cre", "cze", "ces", "chu", "chv", "wel", "cym", "dan", "ger", "deu", "div", "dzo", "ewe", "gre", "ell", "eng", "epo", "spa", "est", "baq", "eus", "per", "fas", "ful", "fin", "fij", "fao", "fre", "fra", "fry", "gle", "gla", "glg", "grn", "guj", "glv", "hau", "heb", "hin", "hmo", "hrv", "hat", "hun", "arm", "hye", "her", "ina", "ind", "ile", "ibo", "iii", "ipk", "ido", "ice", "isl", "ita", "iku", "jpn", "jav", "geo", "kat", "kon", "kik", "kua", "kaz", "kal", "khm", "kan", "kor", "kau", "kas", "kur", "kom", "cor", "kir", "lat", "ltz", "lug", "lim", "lin", "lao", "lit", "lub", "lav", "mlg", "mah", "mao", "mri", "mac", "mkd", "mal", "mon", "mol", "mar", "may", "msa", "mlt", "bur", "mya", "nau", "nob", "nde", "nep", "ndo", "dut", "nld", "nno", "nor", "nbl", "nav", "nya", "oci", "oji", "orm", "ori", "oss", "pan", "pli", "pol", "pus", "por", "que", "roh", "run", "rum", "ron", "rus", "kin", "san", "srd", "snd", "sme", "sag", "slo", "sin", "slk", "slv", "smo", "sna", "som", "alb", "sqi", "srp", "ssw", "sot", "sun", "swe", "swa", "tam", "tel", "tgk", "tha", "tir", "tuk", "tgl", "tsn", "ton", "tur", "tso", "tat", "twi", "tah", "uig", "ukr", "urd", "uzb", "ven", "vie", "vol", "wln", "wol", "xho", "yid", "yor", "zha", "chi", "zho", "zul"];
|
|
1096
1096
|
|
|
1097
|
-
var __defProp$
|
|
1098
|
-
var __defNormalProp$
|
|
1097
|
+
var __defProp$12 = Object.defineProperty;
|
|
1098
|
+
var __defNormalProp$12 = (obj, key, value) => key in obj ? __defProp$12(obj, key, {
|
|
1099
1099
|
enumerable: true,
|
|
1100
1100
|
configurable: true,
|
|
1101
1101
|
writable: true,
|
|
1102
1102
|
value
|
|
1103
1103
|
}) : obj[key] = value;
|
|
1104
|
-
var __publicField$
|
|
1104
|
+
var __publicField$12 = (obj, key, value) => __defNormalProp$12(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1105
1105
|
class ScheduledCommit {
|
|
1106
1106
|
/**
|
|
1107
1107
|
* Constructor for ScheduledCommit
|
|
@@ -1110,10 +1110,10 @@ this.Scorm2004API = (function () {
|
|
|
1110
1110
|
* @param {string} callback
|
|
1111
1111
|
*/
|
|
1112
1112
|
constructor(API, when, callback) {
|
|
1113
|
-
__publicField$
|
|
1114
|
-
__publicField$
|
|
1115
|
-
__publicField$
|
|
1116
|
-
__publicField$
|
|
1113
|
+
__publicField$12(this, "_API");
|
|
1114
|
+
__publicField$12(this, "_cancelled", false);
|
|
1115
|
+
__publicField$12(this, "_timeout");
|
|
1116
|
+
__publicField$12(this, "_callback");
|
|
1117
1117
|
this._API = API;
|
|
1118
1118
|
this._timeout = setTimeout(this.wrapper.bind(this), when);
|
|
1119
1119
|
this._callback = callback;
|
|
@@ -1141,14 +1141,14 @@ this.Scorm2004API = (function () {
|
|
|
1141
1141
|
|
|
1142
1142
|
const HIDE_LMS_UI_TOKENS = ["continue", "previous", "exit", "exitAll", "abandon", "abandonAll", "suspendAll"];
|
|
1143
1143
|
|
|
1144
|
-
var __defProp$
|
|
1145
|
-
var __defNormalProp$
|
|
1144
|
+
var __defProp$11 = Object.defineProperty;
|
|
1145
|
+
var __defNormalProp$11 = (obj, key, value) => key in obj ? __defProp$11(obj, key, {
|
|
1146
1146
|
enumerable: true,
|
|
1147
1147
|
configurable: true,
|
|
1148
1148
|
writable: true,
|
|
1149
1149
|
value
|
|
1150
1150
|
}) : obj[key] = value;
|
|
1151
|
-
var __publicField$
|
|
1151
|
+
var __publicField$11 = (obj, key, value) => __defNormalProp$11(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1152
1152
|
var RuleConditionOperator = /* @__PURE__ */(RuleConditionOperator2 => {
|
|
1153
1153
|
RuleConditionOperator2["NOT"] = "not";
|
|
1154
1154
|
RuleConditionOperator2["AND"] = "and";
|
|
@@ -1181,10 +1181,10 @@ this.Scorm2004API = (function () {
|
|
|
1181
1181
|
let operator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
1182
1182
|
let parameters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : /* @__PURE__ */new Map();
|
|
1183
1183
|
super("ruleCondition");
|
|
1184
|
-
__publicField$
|
|
1185
|
-
__publicField$
|
|
1186
|
-
__publicField$
|
|
1187
|
-
__publicField$
|
|
1184
|
+
__publicField$11(this, "_condition", "always" /* ALWAYS */);
|
|
1185
|
+
__publicField$11(this, "_operator", null);
|
|
1186
|
+
__publicField$11(this, "_parameters", /* @__PURE__ */new Map());
|
|
1187
|
+
__publicField$11(this, "_referencedObjective", null);
|
|
1188
1188
|
this._condition = condition;
|
|
1189
1189
|
this._operator = operator;
|
|
1190
1190
|
this._parameters = parameters;
|
|
@@ -1455,9 +1455,9 @@ this.Scorm2004API = (function () {
|
|
|
1455
1455
|
}
|
|
1456
1456
|
};
|
|
1457
1457
|
// Optional, overridable provider for current time (LMS may set via SequencingService)
|
|
1458
|
-
__publicField$
|
|
1458
|
+
__publicField$11(_RuleCondition, "_now", () => /* @__PURE__ */new Date());
|
|
1459
1459
|
// Optional, overridable hook for getting elapsed seconds
|
|
1460
|
-
__publicField$
|
|
1460
|
+
__publicField$11(_RuleCondition, "_getElapsedSecondsHook");
|
|
1461
1461
|
let RuleCondition = _RuleCondition;
|
|
1462
1462
|
class SequencingRule extends BaseCMI {
|
|
1463
1463
|
/**
|
|
@@ -1469,9 +1469,9 @@ this.Scorm2004API = (function () {
|
|
|
1469
1469
|
let action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "skip";
|
|
1470
1470
|
let conditionCombination = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "and";
|
|
1471
1471
|
super("sequencingRule");
|
|
1472
|
-
__publicField$
|
|
1473
|
-
__publicField$
|
|
1474
|
-
__publicField$
|
|
1472
|
+
__publicField$11(this, "_conditions", []);
|
|
1473
|
+
__publicField$11(this, "_action", "skip" /* SKIP */);
|
|
1474
|
+
__publicField$11(this, "_conditionCombination", "and" /* AND */);
|
|
1475
1475
|
this._action = action;
|
|
1476
1476
|
this._conditionCombination = conditionCombination;
|
|
1477
1477
|
}
|
|
@@ -1584,9 +1584,9 @@ this.Scorm2004API = (function () {
|
|
|
1584
1584
|
*/
|
|
1585
1585
|
constructor() {
|
|
1586
1586
|
super("sequencingRules");
|
|
1587
|
-
__publicField$
|
|
1588
|
-
__publicField$
|
|
1589
|
-
__publicField$
|
|
1587
|
+
__publicField$11(this, "_preConditionRules", []);
|
|
1588
|
+
__publicField$11(this, "_exitConditionRules", []);
|
|
1589
|
+
__publicField$11(this, "_postConditionRules", []);
|
|
1590
1590
|
}
|
|
1591
1591
|
/**
|
|
1592
1592
|
* Called when the API needs to be reset
|
|
@@ -1703,9 +1703,17 @@ this.Scorm2004API = (function () {
|
|
|
1703
1703
|
}
|
|
1704
1704
|
}
|
|
1705
1705
|
|
|
1706
|
+
var __defProp$10 = Object.defineProperty;
|
|
1707
|
+
var __defNormalProp$10 = (obj, key, value) => key in obj ? __defProp$10(obj, key, {
|
|
1708
|
+
enumerable: true,
|
|
1709
|
+
configurable: true,
|
|
1710
|
+
writable: true,
|
|
1711
|
+
value
|
|
1712
|
+
}) : obj[key] = value;
|
|
1713
|
+
var __publicField$10 = (obj, key, value) => __defNormalProp$10(obj, key + "" , value);
|
|
1706
1714
|
class ActivityTreeQueries {
|
|
1707
1715
|
constructor(activityTree) {
|
|
1708
|
-
this
|
|
1716
|
+
__publicField$10(this, "activityTree", activityTree);
|
|
1709
1717
|
}
|
|
1710
1718
|
/**
|
|
1711
1719
|
* Check if activity is in the activity tree
|
|
@@ -1901,10 +1909,18 @@ this.Scorm2004API = (function () {
|
|
|
1901
1909
|
}
|
|
1902
1910
|
}
|
|
1903
1911
|
|
|
1912
|
+
var __defProp$$ = Object.defineProperty;
|
|
1913
|
+
var __defNormalProp$$ = (obj, key, value) => key in obj ? __defProp$$(obj, key, {
|
|
1914
|
+
enumerable: true,
|
|
1915
|
+
configurable: true,
|
|
1916
|
+
writable: true,
|
|
1917
|
+
value
|
|
1918
|
+
}) : obj[key] = value;
|
|
1919
|
+
var __publicField$$ = (obj, key, value) => __defNormalProp$$(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1904
1920
|
class ChoiceConstraintValidator {
|
|
1905
1921
|
constructor(activityTree, treeQueries) {
|
|
1906
|
-
this
|
|
1907
|
-
this
|
|
1922
|
+
__publicField$$(this, "activityTree", activityTree);
|
|
1923
|
+
__publicField$$(this, "treeQueries", treeQueries);
|
|
1908
1924
|
}
|
|
1909
1925
|
/**
|
|
1910
1926
|
* Main entry point - consolidates ALL constraint validation for choice navigation
|
|
@@ -2356,14 +2372,14 @@ this.Scorm2004API = (function () {
|
|
|
2356
2372
|
}
|
|
2357
2373
|
}
|
|
2358
2374
|
|
|
2359
|
-
var __defProp$
|
|
2360
|
-
var __defNormalProp$
|
|
2375
|
+
var __defProp$_ = Object.defineProperty;
|
|
2376
|
+
var __defNormalProp$_ = (obj, key, value) => key in obj ? __defProp$_(obj, key, {
|
|
2361
2377
|
enumerable: true,
|
|
2362
2378
|
configurable: true,
|
|
2363
2379
|
writable: true,
|
|
2364
2380
|
value
|
|
2365
2381
|
}) : obj[key] = value;
|
|
2366
|
-
var __publicField$
|
|
2382
|
+
var __publicField$_ = (obj, key, value) => __defNormalProp$_(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2367
2383
|
var SequencingRequestType = /* @__PURE__ */(SequencingRequestType2 => {
|
|
2368
2384
|
SequencingRequestType2["START"] = "start";
|
|
2369
2385
|
SequencingRequestType2["RESUME_ALL"] = "resumeAll";
|
|
@@ -2392,10 +2408,10 @@ this.Scorm2004API = (function () {
|
|
|
2392
2408
|
let targetActivity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
2393
2409
|
let exception = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
2394
2410
|
let endSequencingSession = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
2395
|
-
__publicField$
|
|
2396
|
-
__publicField$
|
|
2397
|
-
__publicField$
|
|
2398
|
-
__publicField$
|
|
2411
|
+
__publicField$_(this, "deliveryRequest");
|
|
2412
|
+
__publicField$_(this, "targetActivity");
|
|
2413
|
+
__publicField$_(this, "exception");
|
|
2414
|
+
__publicField$_(this, "endSequencingSession");
|
|
2399
2415
|
this.deliveryRequest = deliveryRequest;
|
|
2400
2416
|
this.targetActivity = targetActivity;
|
|
2401
2417
|
this.exception = exception;
|
|
@@ -2406,10 +2422,10 @@ this.Scorm2004API = (function () {
|
|
|
2406
2422
|
constructor(identifiedActivity, deliverable) {
|
|
2407
2423
|
let exception = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
2408
2424
|
let endSequencingSession = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
2409
|
-
__publicField$
|
|
2410
|
-
__publicField$
|
|
2411
|
-
__publicField$
|
|
2412
|
-
__publicField$
|
|
2425
|
+
__publicField$_(this, "identifiedActivity");
|
|
2426
|
+
__publicField$_(this, "deliverable");
|
|
2427
|
+
__publicField$_(this, "exception");
|
|
2428
|
+
__publicField$_(this, "endSequencingSession");
|
|
2413
2429
|
this.identifiedActivity = identifiedActivity;
|
|
2414
2430
|
this.deliverable = deliverable;
|
|
2415
2431
|
this.exception = exception;
|
|
@@ -2419,8 +2435,8 @@ this.Scorm2004API = (function () {
|
|
|
2419
2435
|
class ChoiceTraversalResult {
|
|
2420
2436
|
constructor(activity) {
|
|
2421
2437
|
let exception = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
2422
|
-
__publicField$
|
|
2423
|
-
__publicField$
|
|
2438
|
+
__publicField$_(this, "activity");
|
|
2439
|
+
__publicField$_(this, "exception");
|
|
2424
2440
|
this.activity = activity;
|
|
2425
2441
|
this.exception = exception;
|
|
2426
2442
|
}
|
|
@@ -2431,19 +2447,19 @@ this.Scorm2004API = (function () {
|
|
|
2431
2447
|
return FlowSubprocessMode2;
|
|
2432
2448
|
})(FlowSubprocessMode || {});
|
|
2433
2449
|
|
|
2434
|
-
var __defProp$
|
|
2435
|
-
var __defNormalProp$
|
|
2450
|
+
var __defProp$Z = Object.defineProperty;
|
|
2451
|
+
var __defNormalProp$Z = (obj, key, value) => key in obj ? __defProp$Z(obj, key, {
|
|
2436
2452
|
enumerable: true,
|
|
2437
2453
|
configurable: true,
|
|
2438
2454
|
writable: true,
|
|
2439
2455
|
value
|
|
2440
2456
|
}) : obj[key] = value;
|
|
2441
|
-
var __publicField$
|
|
2457
|
+
var __publicField$Z = (obj, key, value) => __defNormalProp$Z(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2442
2458
|
class RuleEvaluationEngine {
|
|
2443
2459
|
constructor() {
|
|
2444
2460
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2445
|
-
__publicField$
|
|
2446
|
-
__publicField$
|
|
2461
|
+
__publicField$Z(this, "now");
|
|
2462
|
+
__publicField$Z(this, "getAttemptElapsedSecondsHook");
|
|
2447
2463
|
this.now = options.now || (() => /* @__PURE__ */new Date());
|
|
2448
2464
|
this.getAttemptElapsedSecondsHook = options.getAttemptElapsedSecondsHook || null;
|
|
2449
2465
|
}
|
|
@@ -2714,14 +2730,14 @@ this.Scorm2004API = (function () {
|
|
|
2714
2730
|
}
|
|
2715
2731
|
}
|
|
2716
2732
|
|
|
2717
|
-
var __defProp$
|
|
2718
|
-
var __defNormalProp$
|
|
2733
|
+
var __defProp$Y = Object.defineProperty;
|
|
2734
|
+
var __defNormalProp$Y = (obj, key, value) => key in obj ? __defProp$Y(obj, key, {
|
|
2719
2735
|
enumerable: true,
|
|
2720
2736
|
configurable: true,
|
|
2721
2737
|
writable: true,
|
|
2722
2738
|
value
|
|
2723
2739
|
}) : obj[key] = value;
|
|
2724
|
-
var __publicField$
|
|
2740
|
+
var __publicField$Y = (obj, key, value) => __defNormalProp$Y(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2725
2741
|
var SelectionTiming = /* @__PURE__ */(SelectionTiming2 => {
|
|
2726
2742
|
SelectionTiming2["NEVER"] = "never";
|
|
2727
2743
|
SelectionTiming2["ONCE"] = "once";
|
|
@@ -2741,36 +2757,36 @@ this.Scorm2004API = (function () {
|
|
|
2741
2757
|
constructor() {
|
|
2742
2758
|
super("sequencingControls");
|
|
2743
2759
|
// Sequencing Control Modes
|
|
2744
|
-
__publicField$
|
|
2745
|
-
__publicField$
|
|
2746
|
-
__publicField$
|
|
2760
|
+
__publicField$Y(this, "_enabled", true);
|
|
2761
|
+
__publicField$Y(this, "_choice", true);
|
|
2762
|
+
__publicField$Y(this, "_choiceExit", true);
|
|
2747
2763
|
// Per SCORM 2004 Sequencing & Navigation, flow defaults to true
|
|
2748
|
-
__publicField$
|
|
2749
|
-
__publicField$
|
|
2750
|
-
__publicField$
|
|
2751
|
-
__publicField$
|
|
2764
|
+
__publicField$Y(this, "_flow", true);
|
|
2765
|
+
__publicField$Y(this, "_forwardOnly", false);
|
|
2766
|
+
__publicField$Y(this, "_useCurrentAttemptObjectiveInfo", true);
|
|
2767
|
+
__publicField$Y(this, "_useCurrentAttemptProgressInfo", true);
|
|
2752
2768
|
// Constrain Choice Controls
|
|
2753
|
-
__publicField$
|
|
2754
|
-
__publicField$
|
|
2769
|
+
__publicField$Y(this, "_preventActivation", false);
|
|
2770
|
+
__publicField$Y(this, "_constrainChoice", false);
|
|
2755
2771
|
// Rule-driven traversal limiter (e.g., post-condition stopForwardTraversal)
|
|
2756
|
-
__publicField$
|
|
2772
|
+
__publicField$Y(this, "_stopForwardTraversal", false);
|
|
2757
2773
|
// Rollup Controls
|
|
2758
|
-
__publicField$
|
|
2759
|
-
__publicField$
|
|
2760
|
-
__publicField$
|
|
2774
|
+
__publicField$Y(this, "_rollupObjectiveSatisfied", true);
|
|
2775
|
+
__publicField$Y(this, "_rollupProgressCompletion", true);
|
|
2776
|
+
__publicField$Y(this, "_objectiveMeasureWeight", 1);
|
|
2761
2777
|
// Selection Controls
|
|
2762
|
-
__publicField$
|
|
2763
|
-
__publicField$
|
|
2764
|
-
__publicField$
|
|
2765
|
-
__publicField$
|
|
2778
|
+
__publicField$Y(this, "_selectionTiming", "never" /* NEVER */);
|
|
2779
|
+
__publicField$Y(this, "_selectCount", null);
|
|
2780
|
+
__publicField$Y(this, "_selectionCountStatus", false);
|
|
2781
|
+
__publicField$Y(this, "_randomizeChildren", false);
|
|
2766
2782
|
// Randomization Controls
|
|
2767
|
-
__publicField$
|
|
2768
|
-
__publicField$
|
|
2783
|
+
__publicField$Y(this, "_randomizationTiming", "never" /* NEVER */);
|
|
2784
|
+
__publicField$Y(this, "_reorderChildren", false);
|
|
2769
2785
|
// Auto-completion/satisfaction controls
|
|
2770
|
-
__publicField$
|
|
2771
|
-
__publicField$
|
|
2786
|
+
__publicField$Y(this, "_completionSetByContent", false);
|
|
2787
|
+
__publicField$Y(this, "_objectiveSetByContent", false);
|
|
2772
2788
|
// Delivery Controls
|
|
2773
|
-
__publicField$
|
|
2789
|
+
__publicField$Y(this, "_tracked", true);
|
|
2774
2790
|
}
|
|
2775
2791
|
/**
|
|
2776
2792
|
* Reset the sequencing controls to their default values
|
|
@@ -3331,10 +3347,18 @@ this.Scorm2004API = (function () {
|
|
|
3331
3347
|
}
|
|
3332
3348
|
}
|
|
3333
3349
|
|
|
3350
|
+
var __defProp$X = Object.defineProperty;
|
|
3351
|
+
var __defNormalProp$X = (obj, key, value) => key in obj ? __defProp$X(obj, key, {
|
|
3352
|
+
enumerable: true,
|
|
3353
|
+
configurable: true,
|
|
3354
|
+
writable: true,
|
|
3355
|
+
value
|
|
3356
|
+
}) : obj[key] = value;
|
|
3357
|
+
var __publicField$X = (obj, key, value) => __defNormalProp$X(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3334
3358
|
class FlowTraversalService {
|
|
3335
3359
|
constructor(activityTree, ruleEngine) {
|
|
3336
|
-
this
|
|
3337
|
-
this
|
|
3360
|
+
__publicField$X(this, "activityTree", activityTree);
|
|
3361
|
+
__publicField$X(this, "ruleEngine", ruleEngine);
|
|
3338
3362
|
}
|
|
3339
3363
|
/**
|
|
3340
3364
|
* Flow Subprocess (SB.2.3)
|
|
@@ -3625,10 +3649,18 @@ this.Scorm2004API = (function () {
|
|
|
3625
3649
|
}
|
|
3626
3650
|
}
|
|
3627
3651
|
|
|
3652
|
+
var __defProp$W = Object.defineProperty;
|
|
3653
|
+
var __defNormalProp$W = (obj, key, value) => key in obj ? __defProp$W(obj, key, {
|
|
3654
|
+
enumerable: true,
|
|
3655
|
+
configurable: true,
|
|
3656
|
+
writable: true,
|
|
3657
|
+
value
|
|
3658
|
+
}) : obj[key] = value;
|
|
3659
|
+
var __publicField$W = (obj, key, value) => __defNormalProp$W(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3628
3660
|
class FlowRequestHandler {
|
|
3629
3661
|
constructor(activityTree, traversalService) {
|
|
3630
|
-
this
|
|
3631
|
-
this
|
|
3662
|
+
__publicField$W(this, "activityTree", activityTree);
|
|
3663
|
+
__publicField$W(this, "traversalService", traversalService);
|
|
3632
3664
|
}
|
|
3633
3665
|
/**
|
|
3634
3666
|
* Start Sequencing Request Process (SB.2.5)
|
|
@@ -3746,12 +3778,20 @@ this.Scorm2004API = (function () {
|
|
|
3746
3778
|
}
|
|
3747
3779
|
}
|
|
3748
3780
|
|
|
3781
|
+
var __defProp$V = Object.defineProperty;
|
|
3782
|
+
var __defNormalProp$V = (obj, key, value) => key in obj ? __defProp$V(obj, key, {
|
|
3783
|
+
enumerable: true,
|
|
3784
|
+
configurable: true,
|
|
3785
|
+
writable: true,
|
|
3786
|
+
value
|
|
3787
|
+
}) : obj[key] = value;
|
|
3788
|
+
var __publicField$V = (obj, key, value) => __defNormalProp$V(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3749
3789
|
class ChoiceRequestHandler {
|
|
3750
3790
|
constructor(activityTree, constraintValidator, traversalService, treeQueries) {
|
|
3751
|
-
this
|
|
3752
|
-
this
|
|
3753
|
-
this
|
|
3754
|
-
this
|
|
3791
|
+
__publicField$V(this, "activityTree", activityTree);
|
|
3792
|
+
__publicField$V(this, "constraintValidator", constraintValidator);
|
|
3793
|
+
__publicField$V(this, "traversalService", traversalService);
|
|
3794
|
+
__publicField$V(this, "treeQueries", treeQueries);
|
|
3755
3795
|
}
|
|
3756
3796
|
/**
|
|
3757
3797
|
* Choice Sequencing Request Process (SB.2.9)
|
|
@@ -3952,10 +3992,18 @@ this.Scorm2004API = (function () {
|
|
|
3952
3992
|
}
|
|
3953
3993
|
}
|
|
3954
3994
|
|
|
3995
|
+
var __defProp$U = Object.defineProperty;
|
|
3996
|
+
var __defNormalProp$U = (obj, key, value) => key in obj ? __defProp$U(obj, key, {
|
|
3997
|
+
enumerable: true,
|
|
3998
|
+
configurable: true,
|
|
3999
|
+
writable: true,
|
|
4000
|
+
value
|
|
4001
|
+
}) : obj[key] = value;
|
|
4002
|
+
var __publicField$U = (obj, key, value) => __defNormalProp$U(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3955
4003
|
class ExitRequestHandler {
|
|
3956
4004
|
constructor(activityTree, ruleEngine) {
|
|
3957
|
-
this
|
|
3958
|
-
this
|
|
4005
|
+
__publicField$U(this, "activityTree", activityTree);
|
|
4006
|
+
__publicField$U(this, "ruleEngine", ruleEngine);
|
|
3959
4007
|
}
|
|
3960
4008
|
/**
|
|
3961
4009
|
* Exit Sequencing Request Process (SB.2.11)
|
|
@@ -4068,10 +4116,18 @@ this.Scorm2004API = (function () {
|
|
|
4068
4116
|
}
|
|
4069
4117
|
}
|
|
4070
4118
|
|
|
4119
|
+
var __defProp$T = Object.defineProperty;
|
|
4120
|
+
var __defNormalProp$T = (obj, key, value) => key in obj ? __defProp$T(obj, key, {
|
|
4121
|
+
enumerable: true,
|
|
4122
|
+
configurable: true,
|
|
4123
|
+
writable: true,
|
|
4124
|
+
value
|
|
4125
|
+
}) : obj[key] = value;
|
|
4126
|
+
var __publicField$T = (obj, key, value) => __defNormalProp$T(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4071
4127
|
class RetryRequestHandler {
|
|
4072
4128
|
constructor(activityTree, traversalService) {
|
|
4073
|
-
this
|
|
4074
|
-
this
|
|
4129
|
+
__publicField$T(this, "activityTree", activityTree);
|
|
4130
|
+
__publicField$T(this, "traversalService", traversalService);
|
|
4075
4131
|
}
|
|
4076
4132
|
/**
|
|
4077
4133
|
* Retry Sequencing Request Process (SB.2.10)
|
|
@@ -5234,7 +5290,8 @@ this.Scorm2004API = (function () {
|
|
|
5234
5290
|
getNumericLevel(level) {
|
|
5235
5291
|
if (level === void 0) return LogLevelEnum.NONE;
|
|
5236
5292
|
if (typeof level === "number") return level;
|
|
5237
|
-
|
|
5293
|
+
const normalized = typeof level === "string" ? level.toUpperCase() : level;
|
|
5294
|
+
switch (normalized) {
|
|
5238
5295
|
case "1":
|
|
5239
5296
|
case "DEBUG":
|
|
5240
5297
|
return LogLevelEnum.DEBUG;
|
|
@@ -5615,7 +5672,7 @@ ${stackTrace}`);
|
|
|
5615
5672
|
* @param {Function} apiLog - The logging function
|
|
5616
5673
|
*/
|
|
5617
5674
|
constructor(settings, error_codes, apiLog) {
|
|
5618
|
-
this
|
|
5675
|
+
__publicField$L(this, "apiLog", apiLog);
|
|
5619
5676
|
__publicField$L(this, "settings");
|
|
5620
5677
|
__publicField$L(this, "error_codes");
|
|
5621
5678
|
__publicField$L(this, "storeName", "scorm_again_offline_data");
|