@pie-element/ebsr 10.6.8-next.5 → 10.6.8-next.74
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/configure/lib/main.js +1 -1
- package/configure/lib/main.js.map +1 -1
- package/configure/package.json +1 -1
- package/configure/src/__tests__/index.test.js +2 -2
- package/configure/src/main.jsx +1 -1
- package/controller/lib/index.js +2 -2
- package/controller/lib/index.js.map +1 -1
- package/controller/package.json +2 -1
- package/controller/src/index.js +2 -2
- package/lib/print.js +1 -1
- package/lib/print.js.map +1 -1
- package/module/configure.js +1 -6069
- package/module/controller.js +205 -549
- package/module/element.js +1 -13610
- package/module/manifest.json +4 -4
- package/module/print.js +1 -13612
- package/package.json +4 -4
- package/src/__tests__/index.test.js +1 -1
- package/src/print.js +1 -1
package/module/controller.js
CHANGED
|
@@ -24,40 +24,7 @@ var defaults = {
|
|
|
24
24
|
partB: partModel(),
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
function getDefaultExportFromCjs (x) {
|
|
30
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
var controllerUtils$1 = {};
|
|
34
|
-
|
|
35
|
-
var controllerUtils = {};
|
|
36
|
-
|
|
37
|
-
var _typeof$2 = {exports: {}};
|
|
38
|
-
|
|
39
|
-
(function (module) {
|
|
40
|
-
function _typeof(obj) {
|
|
41
|
-
"@babel/helpers - typeof";
|
|
42
|
-
|
|
43
|
-
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
44
|
-
return typeof obj;
|
|
45
|
-
} : function (obj) {
|
|
46
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
47
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
51
|
-
}(_typeof$2));
|
|
52
|
-
|
|
53
|
-
var partialScoring = {};
|
|
54
|
-
|
|
55
|
-
Object.defineProperty(partialScoring, "__esModule", {
|
|
56
|
-
value: true
|
|
57
|
-
});
|
|
58
|
-
partialScoring.enabled = void 0;
|
|
59
|
-
|
|
60
|
-
var enabled = function enabled(config, env, defaultValue) {
|
|
27
|
+
const enabled = (config, env, defaultValue) => {
|
|
61
28
|
// if model.partialScoring = false
|
|
62
29
|
// - if env.partialScoring = false || env.partialScoring = true => use dichotomous scoring
|
|
63
30
|
// else if model.partialScoring = true || undefined
|
|
@@ -77,21 +44,7 @@ var enabled = function enabled(config, env, defaultValue) {
|
|
|
77
44
|
return typeof defaultValue === 'boolean' ? defaultValue : true;
|
|
78
45
|
};
|
|
79
46
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
var persistence = {};
|
|
83
|
-
|
|
84
|
-
var interopRequireDefault = {exports: {}};
|
|
85
|
-
|
|
86
|
-
(function (module) {
|
|
87
|
-
function _interopRequireDefault(obj) {
|
|
88
|
-
return obj && obj.__esModule ? obj : {
|
|
89
|
-
"default": obj
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
94
|
-
}(interopRequireDefault));
|
|
47
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
95
48
|
|
|
96
49
|
/**
|
|
97
50
|
* Checks if `value` is classified as an `Array` object.
|
|
@@ -2157,15 +2110,15 @@ var getNative = _getNative,
|
|
|
2157
2110
|
root$1 = _root;
|
|
2158
2111
|
|
|
2159
2112
|
/* Built-in method references that are verified to be native. */
|
|
2160
|
-
var WeakMap$
|
|
2113
|
+
var WeakMap$1 = getNative(root$1, 'WeakMap');
|
|
2161
2114
|
|
|
2162
|
-
var _WeakMap = WeakMap$
|
|
2115
|
+
var _WeakMap = WeakMap$1;
|
|
2163
2116
|
|
|
2164
2117
|
var DataView = _DataView,
|
|
2165
2118
|
Map$1 = _Map,
|
|
2166
2119
|
Promise$1 = _Promise,
|
|
2167
2120
|
Set = _Set,
|
|
2168
|
-
WeakMap
|
|
2121
|
+
WeakMap = _WeakMap,
|
|
2169
2122
|
baseGetTag = _baseGetTag,
|
|
2170
2123
|
toSource = _toSource;
|
|
2171
2124
|
|
|
@@ -2183,7 +2136,7 @@ var dataViewCtorString = toSource(DataView),
|
|
|
2183
2136
|
mapCtorString = toSource(Map$1),
|
|
2184
2137
|
promiseCtorString = toSource(Promise$1),
|
|
2185
2138
|
setCtorString = toSource(Set),
|
|
2186
|
-
weakMapCtorString = toSource(WeakMap
|
|
2139
|
+
weakMapCtorString = toSource(WeakMap);
|
|
2187
2140
|
|
|
2188
2141
|
/**
|
|
2189
2142
|
* Gets the `toStringTag` of `value`.
|
|
@@ -2199,7 +2152,7 @@ if ((DataView && getTag$2(new DataView(new ArrayBuffer(1))) != dataViewTag$1) ||
|
|
|
2199
2152
|
(Map$1 && getTag$2(new Map$1) != mapTag$2) ||
|
|
2200
2153
|
(Promise$1 && getTag$2(Promise$1.resolve()) != promiseTag) ||
|
|
2201
2154
|
(Set && getTag$2(new Set) != setTag$2) ||
|
|
2202
|
-
(WeakMap
|
|
2155
|
+
(WeakMap && getTag$2(new WeakMap) != weakMapTag)) {
|
|
2203
2156
|
getTag$2 = function(value) {
|
|
2204
2157
|
var result = baseGetTag(value),
|
|
2205
2158
|
Ctor = result == objectTag$1 ? value.constructor : undefined,
|
|
@@ -2298,86 +2251,54 @@ function isEmpty(value) {
|
|
|
2298
2251
|
|
|
2299
2252
|
var isEmpty_1 = isEmpty;
|
|
2300
2253
|
|
|
2301
|
-
var _interopRequireDefault = interopRequireDefault.exports;
|
|
2302
|
-
|
|
2303
|
-
Object.defineProperty(persistence, "__esModule", {
|
|
2304
|
-
value: true
|
|
2305
|
-
});
|
|
2306
|
-
persistence.lockChoices = persistence.getShuffledChoices = persistence.compact = void 0;
|
|
2307
|
-
|
|
2308
|
-
var _typeof2 = _interopRequireDefault(_typeof$2.exports);
|
|
2309
|
-
|
|
2310
|
-
var _get = _interopRequireDefault(get_1);
|
|
2311
|
-
|
|
2312
|
-
var _shuffle = _interopRequireDefault(shuffle_1);
|
|
2313
|
-
|
|
2314
|
-
var _isEmpty = _interopRequireDefault(isEmpty_1);
|
|
2315
|
-
|
|
2316
2254
|
// eslint-disable-next-line no-console
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
var log = lg('log');
|
|
2323
|
-
var warn = lg('warn');
|
|
2324
|
-
var error = lg('error');
|
|
2255
|
+
const lg = (n) => console[n].bind(console, 'controller-utils:');
|
|
2256
|
+
const debug = lg('debug');
|
|
2257
|
+
const log = lg('log');
|
|
2258
|
+
const warn = lg('warn');
|
|
2259
|
+
const error = lg('error');
|
|
2325
2260
|
|
|
2326
|
-
|
|
2261
|
+
const compact = (arr) => {
|
|
2327
2262
|
if (Array.isArray(arr)) {
|
|
2328
|
-
return arr.filter(
|
|
2329
|
-
return v !== null && v !== undefined;
|
|
2330
|
-
});
|
|
2263
|
+
return arr.filter((v) => v !== null && v !== undefined);
|
|
2331
2264
|
}
|
|
2332
|
-
|
|
2333
2265
|
return arr;
|
|
2334
2266
|
};
|
|
2335
2267
|
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
return new Promise(function (resolve) {
|
|
2340
|
-
var _session$data;
|
|
2341
|
-
|
|
2342
|
-
log('updateSession type: ', (0, _typeof2["default"])(updateSession));
|
|
2268
|
+
const getShuffledChoices = (choices, session, updateSession, choiceKey) =>
|
|
2269
|
+
new Promise((resolve) => {
|
|
2270
|
+
log('updateSession type: ', typeof updateSession);
|
|
2343
2271
|
log('session: ', session);
|
|
2344
|
-
|
|
2272
|
+
|
|
2273
|
+
const currentShuffled = compact(session?.data?.shuffledValues || session?.shuffledValues || []);
|
|
2345
2274
|
|
|
2346
2275
|
if (!session) {
|
|
2347
2276
|
// eslint-disable-next-line quotes
|
|
2348
2277
|
warn("unable to save shuffled choices because there's no session.");
|
|
2349
2278
|
resolve(undefined);
|
|
2350
|
-
} else if (!(
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
debug('use shuffledValues to sort the choices...', (_session$data2 = session.data) === null || _session$data2 === void 0 ? void 0 : _session$data2.shuffledValues);
|
|
2354
|
-
resolve(compact(currentShuffled.map(function (v) {
|
|
2355
|
-
return choices.find(function (c) {
|
|
2356
|
-
return c[choiceKey] === v;
|
|
2357
|
-
});
|
|
2358
|
-
})));
|
|
2279
|
+
} else if (!isEmpty_1(currentShuffled)) {
|
|
2280
|
+
debug('use shuffledValues to sort the choices...', session.data?.shuffledValues);
|
|
2281
|
+
resolve(compact(currentShuffled.map((v) => choices.find((c) => c[choiceKey] === v))));
|
|
2359
2282
|
} else {
|
|
2360
|
-
|
|
2283
|
+
const shuffledChoices = shuffle_1(choices);
|
|
2361
2284
|
|
|
2362
2285
|
if (updateSession && typeof updateSession === 'function') {
|
|
2363
2286
|
try {
|
|
2364
2287
|
//Note: session.id refers to the id of the element within a session
|
|
2365
|
-
|
|
2366
|
-
return c[choiceKey];
|
|
2367
|
-
}));
|
|
2288
|
+
const shuffledValues = compact(shuffledChoices.map((c) => c[choiceKey]));
|
|
2368
2289
|
log('try to save shuffledValues to session...', shuffledValues);
|
|
2369
2290
|
log('call updateSession... ', session.id, session.element);
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2291
|
+
if (isEmpty_1(shuffledValues)) {
|
|
2292
|
+
error(
|
|
2293
|
+
`shuffledValues is an empty array? - refusing to call updateSession: shuffledChoices: ${JSON.stringify(
|
|
2294
|
+
shuffledChoices,
|
|
2295
|
+
)}, key: ${choiceKey}`,
|
|
2296
|
+
);
|
|
2373
2297
|
} else {
|
|
2374
|
-
updateSession(session.id, session.element, {
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
console.error('update session failed for: ', session.id, e)
|
|
2379
|
-
);
|
|
2380
|
-
});
|
|
2298
|
+
updateSession(session.id, session.element, { shuffledValues }).catch((e) =>
|
|
2299
|
+
// eslint-disable-next-line no-console
|
|
2300
|
+
console.error('update session failed for: ', session.id, e),
|
|
2301
|
+
);
|
|
2381
2302
|
}
|
|
2382
2303
|
} catch (e) {
|
|
2383
2304
|
warn('unable to save shuffled order for choices');
|
|
@@ -2385,13 +2306,12 @@ var getShuffledChoices = function getShuffledChoices(choices, session, updateSes
|
|
|
2385
2306
|
}
|
|
2386
2307
|
} else {
|
|
2387
2308
|
warn('unable to save shuffled choices, shuffle will happen every time.');
|
|
2388
|
-
}
|
|
2389
|
-
|
|
2390
|
-
|
|
2309
|
+
}
|
|
2310
|
+
//save this shuffle to the session for later retrieval
|
|
2391
2311
|
resolve(shuffledChoices);
|
|
2392
2312
|
}
|
|
2393
2313
|
});
|
|
2394
|
-
|
|
2314
|
+
|
|
2395
2315
|
/**
|
|
2396
2316
|
* If we return:
|
|
2397
2317
|
* - true - that means that the order of the choices will be ordinal (as is created in the configure item)
|
|
@@ -2402,101 +2322,35 @@ var getShuffledChoices = function getShuffledChoices(choices, session, updateSes
|
|
|
2402
2322
|
* @param env - env to check if we should lock order
|
|
2403
2323
|
* @returns {boolean}
|
|
2404
2324
|
*/
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
persistence.getShuffledChoices = getShuffledChoices;
|
|
2408
|
-
|
|
2409
|
-
var lockChoices = function lockChoices(model, session, env) {
|
|
2325
|
+
const lockChoices = (model, session, env) => {
|
|
2410
2326
|
if (model.lockChoiceOrder) {
|
|
2411
2327
|
return true;
|
|
2412
2328
|
}
|
|
2413
2329
|
|
|
2414
|
-
log('lockChoiceOrder: ', (
|
|
2330
|
+
log('lockChoiceOrder: ', get_1(env, ['@pie-element', 'lockChoiceOrder'], false));
|
|
2415
2331
|
|
|
2416
|
-
if ((
|
|
2332
|
+
if (get_1(env, ['@pie-element', 'lockChoiceOrder'], false)) {
|
|
2417
2333
|
return true;
|
|
2418
2334
|
}
|
|
2419
2335
|
|
|
2420
|
-
|
|
2336
|
+
const role = get_1(env, 'role', 'student');
|
|
2421
2337
|
|
|
2422
2338
|
if (role === 'instructor') {
|
|
2423
2339
|
// TODO: .. in the future the instructor can toggle between ordinal and shuffled here, so keeping this code until then
|
|
2424
|
-
|
|
2425
2340
|
/*const alreadyShuffled = hasShuffledValues(session);
|
|
2426
|
-
|
|
2341
|
+
|
|
2342
|
+
if (alreadyShuffled) {
|
|
2427
2343
|
return false;
|
|
2428
2344
|
}
|
|
2429
|
-
return true;*/
|
|
2430
|
-
return true;
|
|
2431
|
-
} // here it's a student, so don't lock and it will shuffle if needs be
|
|
2432
2345
|
|
|
2346
|
+
return true;*/
|
|
2347
|
+
return true;
|
|
2348
|
+
}
|
|
2433
2349
|
|
|
2350
|
+
// here it's a student, so don't lock and it will shuffle if needs be
|
|
2434
2351
|
return false;
|
|
2435
2352
|
};
|
|
2436
2353
|
|
|
2437
|
-
persistence.lockChoices = lockChoices;
|
|
2438
|
-
|
|
2439
|
-
(function (exports) {
|
|
2440
|
-
|
|
2441
|
-
var _typeof = _typeof$2.exports;
|
|
2442
|
-
|
|
2443
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2444
|
-
value: true
|
|
2445
|
-
});
|
|
2446
|
-
Object.defineProperty(exports, "getShuffledChoices", {
|
|
2447
|
-
enumerable: true,
|
|
2448
|
-
get: function get() {
|
|
2449
|
-
return _persistence.getShuffledChoices;
|
|
2450
|
-
}
|
|
2451
|
-
});
|
|
2452
|
-
Object.defineProperty(exports, "lockChoices", {
|
|
2453
|
-
enumerable: true,
|
|
2454
|
-
get: function get() {
|
|
2455
|
-
return _persistence.lockChoices;
|
|
2456
|
-
}
|
|
2457
|
-
});
|
|
2458
|
-
exports.partialScoring = void 0;
|
|
2459
|
-
|
|
2460
|
-
var partialScoring$1 = _interopRequireWildcard(partialScoring);
|
|
2461
|
-
|
|
2462
|
-
exports.partialScoring = partialScoring$1;
|
|
2463
|
-
|
|
2464
|
-
var _persistence = persistence;
|
|
2465
|
-
|
|
2466
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
2467
|
-
|
|
2468
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
2469
|
-
|
|
2470
|
-
}(controllerUtils));
|
|
2471
|
-
|
|
2472
|
-
(function (exports) {
|
|
2473
|
-
|
|
2474
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2475
|
-
value: true
|
|
2476
|
-
});
|
|
2477
|
-
Object.defineProperty(exports, "getShuffledChoices", {
|
|
2478
|
-
enumerable: true,
|
|
2479
|
-
get: function get() {
|
|
2480
|
-
return _controllerUtils.getShuffledChoices;
|
|
2481
|
-
}
|
|
2482
|
-
});
|
|
2483
|
-
Object.defineProperty(exports, "lockChoices", {
|
|
2484
|
-
enumerable: true,
|
|
2485
|
-
get: function get() {
|
|
2486
|
-
return _controllerUtils.lockChoices;
|
|
2487
|
-
}
|
|
2488
|
-
});
|
|
2489
|
-
Object.defineProperty(exports, "partialScoring", {
|
|
2490
|
-
enumerable: true,
|
|
2491
|
-
get: function get() {
|
|
2492
|
-
return _controllerUtils.partialScoring;
|
|
2493
|
-
}
|
|
2494
|
-
});
|
|
2495
|
-
|
|
2496
|
-
var _controllerUtils = controllerUtils;
|
|
2497
|
-
|
|
2498
|
-
}(controllerUtils$1));
|
|
2499
|
-
|
|
2500
2354
|
var ListCache$2 = _ListCache;
|
|
2501
2355
|
|
|
2502
2356
|
/**
|
|
@@ -3378,65 +3232,22 @@ const isResponseCorrect = (question, key, session) => {
|
|
|
3378
3232
|
return false;
|
|
3379
3233
|
};
|
|
3380
3234
|
|
|
3381
|
-
var translator$2 = {};
|
|
3382
|
-
|
|
3383
|
-
var translator$1 = {};
|
|
3384
|
-
|
|
3385
|
-
var defineProperty$1 = {exports: {}};
|
|
3386
|
-
|
|
3387
|
-
(function (module) {
|
|
3388
|
-
function _defineProperty(obj, key, value) {
|
|
3389
|
-
if (key in obj) {
|
|
3390
|
-
Object.defineProperty(obj, key, {
|
|
3391
|
-
value: value,
|
|
3392
|
-
enumerable: true,
|
|
3393
|
-
configurable: true,
|
|
3394
|
-
writable: true
|
|
3395
|
-
});
|
|
3396
|
-
} else {
|
|
3397
|
-
obj[key] = value;
|
|
3398
|
-
}
|
|
3399
|
-
|
|
3400
|
-
return obj;
|
|
3401
|
-
}
|
|
3402
|
-
|
|
3403
|
-
module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3404
|
-
}(defineProperty$1));
|
|
3405
|
-
|
|
3406
|
-
var _typeof$1 = {exports: {}};
|
|
3407
|
-
|
|
3408
|
-
(function (module) {
|
|
3409
3235
|
function _typeof(obj) {
|
|
3410
3236
|
"@babel/helpers - typeof";
|
|
3411
3237
|
|
|
3412
|
-
return
|
|
3238
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
3413
3239
|
return typeof obj;
|
|
3414
3240
|
} : function (obj) {
|
|
3415
3241
|
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
3416
|
-
},
|
|
3242
|
+
}, _typeof(obj);
|
|
3417
3243
|
}
|
|
3418
|
-
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3419
|
-
}(_typeof$1));
|
|
3420
|
-
|
|
3421
|
-
var classCallCheck = {exports: {}};
|
|
3422
3244
|
|
|
3423
|
-
(function (module) {
|
|
3424
3245
|
function _classCallCheck(instance, Constructor) {
|
|
3425
3246
|
if (!(instance instanceof Constructor)) {
|
|
3426
3247
|
throw new TypeError("Cannot call a class as a function");
|
|
3427
3248
|
}
|
|
3428
3249
|
}
|
|
3429
|
-
module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3430
|
-
}(classCallCheck));
|
|
3431
3250
|
|
|
3432
|
-
var createClass = {exports: {}};
|
|
3433
|
-
|
|
3434
|
-
var toPropertyKey = {exports: {}};
|
|
3435
|
-
|
|
3436
|
-
var toPrimitive = {exports: {}};
|
|
3437
|
-
|
|
3438
|
-
(function (module) {
|
|
3439
|
-
var _typeof = _typeof$1.exports["default"];
|
|
3440
3251
|
function _toPrimitive(input, hint) {
|
|
3441
3252
|
if (_typeof(input) !== "object" || input === null) return input;
|
|
3442
3253
|
var prim = input[Symbol.toPrimitive];
|
|
@@ -3447,28 +3258,19 @@ function _toPrimitive(input, hint) {
|
|
|
3447
3258
|
}
|
|
3448
3259
|
return (hint === "string" ? String : Number)(input);
|
|
3449
3260
|
}
|
|
3450
|
-
module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3451
|
-
}(toPrimitive));
|
|
3452
3261
|
|
|
3453
|
-
(function (module) {
|
|
3454
|
-
var _typeof = _typeof$1.exports["default"];
|
|
3455
|
-
var toPrimitive$1 = toPrimitive.exports;
|
|
3456
3262
|
function _toPropertyKey(arg) {
|
|
3457
|
-
var key =
|
|
3263
|
+
var key = _toPrimitive(arg, "string");
|
|
3458
3264
|
return _typeof(key) === "symbol" ? key : String(key);
|
|
3459
3265
|
}
|
|
3460
|
-
module.exports = _toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3461
|
-
}(toPropertyKey));
|
|
3462
3266
|
|
|
3463
|
-
(function (module) {
|
|
3464
|
-
var toPropertyKey$1 = toPropertyKey.exports;
|
|
3465
3267
|
function _defineProperties(target, props) {
|
|
3466
3268
|
for (var i = 0; i < props.length; i++) {
|
|
3467
3269
|
var descriptor = props[i];
|
|
3468
3270
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
3469
3271
|
descriptor.configurable = true;
|
|
3470
3272
|
if ("value" in descriptor) descriptor.writable = true;
|
|
3471
|
-
Object.defineProperty(target,
|
|
3273
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
3472
3274
|
}
|
|
3473
3275
|
}
|
|
3474
3276
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
@@ -3479,38 +3281,22 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
3479
3281
|
});
|
|
3480
3282
|
return Constructor;
|
|
3481
3283
|
}
|
|
3482
|
-
module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3483
|
-
}(createClass));
|
|
3484
3284
|
|
|
3485
|
-
var assertThisInitialized = {exports: {}};
|
|
3486
|
-
|
|
3487
|
-
(function (module) {
|
|
3488
3285
|
function _assertThisInitialized(self) {
|
|
3489
3286
|
if (self === void 0) {
|
|
3490
3287
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3491
3288
|
}
|
|
3492
3289
|
return self;
|
|
3493
3290
|
}
|
|
3494
|
-
module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3495
|
-
}(assertThisInitialized));
|
|
3496
|
-
|
|
3497
|
-
var inherits = {exports: {}};
|
|
3498
3291
|
|
|
3499
|
-
var setPrototypeOf = {exports: {}};
|
|
3500
|
-
|
|
3501
|
-
(function (module) {
|
|
3502
3292
|
function _setPrototypeOf(o, p) {
|
|
3503
|
-
|
|
3293
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
3504
3294
|
o.__proto__ = p;
|
|
3505
3295
|
return o;
|
|
3506
|
-
}
|
|
3296
|
+
};
|
|
3507
3297
|
return _setPrototypeOf(o, p);
|
|
3508
3298
|
}
|
|
3509
|
-
module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3510
|
-
}(setPrototypeOf));
|
|
3511
3299
|
|
|
3512
|
-
(function (module) {
|
|
3513
|
-
var setPrototypeOf$1 = setPrototypeOf.exports;
|
|
3514
3300
|
function _inherits(subClass, superClass) {
|
|
3515
3301
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
3516
3302
|
throw new TypeError("Super expression must either be null or a function");
|
|
@@ -3525,45 +3311,27 @@ function _inherits(subClass, superClass) {
|
|
|
3525
3311
|
Object.defineProperty(subClass, "prototype", {
|
|
3526
3312
|
writable: false
|
|
3527
3313
|
});
|
|
3528
|
-
if (superClass)
|
|
3314
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
3529
3315
|
}
|
|
3530
|
-
module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3531
|
-
}(inherits));
|
|
3532
|
-
|
|
3533
|
-
var possibleConstructorReturn = {exports: {}};
|
|
3534
3316
|
|
|
3535
|
-
(function (module) {
|
|
3536
|
-
var _typeof = _typeof$1.exports["default"];
|
|
3537
|
-
var assertThisInitialized$1 = assertThisInitialized.exports;
|
|
3538
3317
|
function _possibleConstructorReturn(self, call) {
|
|
3539
3318
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
3540
3319
|
return call;
|
|
3541
3320
|
} else if (call !== void 0) {
|
|
3542
3321
|
throw new TypeError("Derived constructors may only return object or undefined");
|
|
3543
3322
|
}
|
|
3544
|
-
return
|
|
3323
|
+
return _assertThisInitialized(self);
|
|
3545
3324
|
}
|
|
3546
|
-
module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3547
|
-
}(possibleConstructorReturn));
|
|
3548
3325
|
|
|
3549
|
-
var getPrototypeOf = {exports: {}};
|
|
3550
|
-
|
|
3551
|
-
(function (module) {
|
|
3552
3326
|
function _getPrototypeOf(o) {
|
|
3553
|
-
|
|
3327
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
3554
3328
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
3555
|
-
}
|
|
3329
|
+
};
|
|
3556
3330
|
return _getPrototypeOf(o);
|
|
3557
3331
|
}
|
|
3558
|
-
module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3559
|
-
}(getPrototypeOf));
|
|
3560
|
-
|
|
3561
|
-
var defineProperty = {exports: {}};
|
|
3562
3332
|
|
|
3563
|
-
(function (module) {
|
|
3564
|
-
var toPropertyKey$1 = toPropertyKey.exports;
|
|
3565
3333
|
function _defineProperty(obj, key, value) {
|
|
3566
|
-
key =
|
|
3334
|
+
key = _toPropertyKey(key);
|
|
3567
3335
|
if (key in obj) {
|
|
3568
3336
|
Object.defineProperty(obj, key, {
|
|
3569
3337
|
value: value,
|
|
@@ -3576,99 +3344,40 @@ function _defineProperty(obj, key, value) {
|
|
|
3576
3344
|
}
|
|
3577
3345
|
return obj;
|
|
3578
3346
|
}
|
|
3579
|
-
module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3580
|
-
}(defineProperty));
|
|
3581
3347
|
|
|
3582
|
-
var toArray = {exports: {}};
|
|
3583
|
-
|
|
3584
|
-
var arrayWithHoles = {exports: {}};
|
|
3585
|
-
|
|
3586
|
-
(function (module) {
|
|
3587
3348
|
function _arrayWithHoles(arr) {
|
|
3588
3349
|
if (Array.isArray(arr)) return arr;
|
|
3589
3350
|
}
|
|
3590
|
-
module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3591
|
-
}(arrayWithHoles));
|
|
3592
|
-
|
|
3593
|
-
var iterableToArray = {exports: {}};
|
|
3594
3351
|
|
|
3595
|
-
(function (module) {
|
|
3596
3352
|
function _iterableToArray(iter) {
|
|
3597
3353
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
3598
3354
|
}
|
|
3599
|
-
module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3600
|
-
}(iterableToArray));
|
|
3601
|
-
|
|
3602
|
-
var unsupportedIterableToArray = {exports: {}};
|
|
3603
|
-
|
|
3604
|
-
var arrayLikeToArray = {exports: {}};
|
|
3605
3355
|
|
|
3606
|
-
(function (module) {
|
|
3607
3356
|
function _arrayLikeToArray(arr, len) {
|
|
3608
3357
|
if (len == null || len > arr.length) len = arr.length;
|
|
3609
3358
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
3610
3359
|
return arr2;
|
|
3611
3360
|
}
|
|
3612
|
-
module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3613
|
-
}(arrayLikeToArray));
|
|
3614
3361
|
|
|
3615
|
-
(function (module) {
|
|
3616
|
-
var arrayLikeToArray$1 = arrayLikeToArray.exports;
|
|
3617
3362
|
function _unsupportedIterableToArray(o, minLen) {
|
|
3618
3363
|
if (!o) return;
|
|
3619
|
-
if (typeof o === "string") return
|
|
3364
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
3620
3365
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
3621
3366
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
3622
3367
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
3623
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return
|
|
3368
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
3624
3369
|
}
|
|
3625
|
-
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3626
|
-
}(unsupportedIterableToArray));
|
|
3627
3370
|
|
|
3628
|
-
var nonIterableRest = {exports: {}};
|
|
3629
|
-
|
|
3630
|
-
(function (module) {
|
|
3631
3371
|
function _nonIterableRest() {
|
|
3632
3372
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
3633
3373
|
}
|
|
3634
|
-
module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3635
|
-
}(nonIterableRest));
|
|
3636
3374
|
|
|
3637
|
-
(function (module) {
|
|
3638
|
-
var arrayWithHoles$1 = arrayWithHoles.exports;
|
|
3639
|
-
var iterableToArray$1 = iterableToArray.exports;
|
|
3640
|
-
var unsupportedIterableToArray$1 = unsupportedIterableToArray.exports;
|
|
3641
|
-
var nonIterableRest$1 = nonIterableRest.exports;
|
|
3642
3375
|
function _toArray(arr) {
|
|
3643
|
-
return
|
|
3644
|
-
}
|
|
3645
|
-
module.exports = _toArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3646
|
-
}(toArray));
|
|
3647
|
-
|
|
3648
|
-
var _typeof = _typeof$1.exports;
|
|
3649
|
-
var _classCallCheck = classCallCheck.exports;
|
|
3650
|
-
var _createClass = createClass.exports;
|
|
3651
|
-
var _assertThisInitialized = assertThisInitialized.exports;
|
|
3652
|
-
var _inherits = inherits.exports;
|
|
3653
|
-
var _possibleConstructorReturn = possibleConstructorReturn.exports;
|
|
3654
|
-
var _getPrototypeOf = getPrototypeOf.exports;
|
|
3655
|
-
var _defineProperty = defineProperty.exports;
|
|
3656
|
-
var _toArray = toArray.exports;
|
|
3657
|
-
|
|
3658
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
3659
|
-
|
|
3660
|
-
var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof);
|
|
3661
|
-
var _classCallCheck__default = /*#__PURE__*/_interopDefaultLegacy(_classCallCheck);
|
|
3662
|
-
var _createClass__default = /*#__PURE__*/_interopDefaultLegacy(_createClass);
|
|
3663
|
-
var _assertThisInitialized__default = /*#__PURE__*/_interopDefaultLegacy(_assertThisInitialized);
|
|
3664
|
-
var _inherits__default = /*#__PURE__*/_interopDefaultLegacy(_inherits);
|
|
3665
|
-
var _possibleConstructorReturn__default = /*#__PURE__*/_interopDefaultLegacy(_possibleConstructorReturn);
|
|
3666
|
-
var _getPrototypeOf__default = /*#__PURE__*/_interopDefaultLegacy(_getPrototypeOf);
|
|
3667
|
-
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
3668
|
-
var _toArray__default = /*#__PURE__*/_interopDefaultLegacy(_toArray);
|
|
3376
|
+
return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
|
|
3377
|
+
}
|
|
3669
3378
|
|
|
3670
3379
|
function ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3671
|
-
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$6(Object(source), !0).forEach(function (key) {
|
|
3380
|
+
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$6(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$6(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3672
3381
|
var consoleLogger = {
|
|
3673
3382
|
type: 'logger',
|
|
3674
3383
|
log: function log(args) {
|
|
@@ -3687,10 +3396,10 @@ var consoleLogger = {
|
|
|
3687
3396
|
var Logger = function () {
|
|
3688
3397
|
function Logger(concreteLogger) {
|
|
3689
3398
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
3690
|
-
|
|
3399
|
+
_classCallCheck(this, Logger);
|
|
3691
3400
|
this.init(concreteLogger, options);
|
|
3692
3401
|
}
|
|
3693
|
-
|
|
3402
|
+
_createClass(Logger, [{
|
|
3694
3403
|
key: "init",
|
|
3695
3404
|
value: function init(concreteLogger) {
|
|
3696
3405
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -3764,10 +3473,10 @@ var baseLogger = new Logger();
|
|
|
3764
3473
|
|
|
3765
3474
|
var EventEmitter = function () {
|
|
3766
3475
|
function EventEmitter() {
|
|
3767
|
-
|
|
3476
|
+
_classCallCheck(this, EventEmitter);
|
|
3768
3477
|
this.observers = {};
|
|
3769
3478
|
}
|
|
3770
|
-
|
|
3479
|
+
_createClass(EventEmitter, [{
|
|
3771
3480
|
key: "on",
|
|
3772
3481
|
value: function on(events, listener) {
|
|
3773
3482
|
var _this = this;
|
|
@@ -3976,11 +3685,11 @@ function deepFind(obj, path) {
|
|
|
3976
3685
|
}
|
|
3977
3686
|
|
|
3978
3687
|
function ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3979
|
-
function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$5(Object(source), !0).forEach(function (key) {
|
|
3980
|
-
function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super =
|
|
3688
|
+
function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$5(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3689
|
+
function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
3981
3690
|
function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
3982
3691
|
var ResourceStore = function (_EventEmitter) {
|
|
3983
|
-
|
|
3692
|
+
_inherits(ResourceStore, _EventEmitter);
|
|
3984
3693
|
var _super = _createSuper$3(ResourceStore);
|
|
3985
3694
|
function ResourceStore(data) {
|
|
3986
3695
|
var _this;
|
|
@@ -3988,10 +3697,10 @@ var ResourceStore = function (_EventEmitter) {
|
|
|
3988
3697
|
ns: ['translation'],
|
|
3989
3698
|
defaultNS: 'translation'
|
|
3990
3699
|
};
|
|
3991
|
-
|
|
3700
|
+
_classCallCheck(this, ResourceStore);
|
|
3992
3701
|
_this = _super.call(this);
|
|
3993
3702
|
if (isIE10) {
|
|
3994
|
-
EventEmitter.call(
|
|
3703
|
+
EventEmitter.call(_assertThisInitialized(_this));
|
|
3995
3704
|
}
|
|
3996
3705
|
_this.data = data || {};
|
|
3997
3706
|
_this.options = options;
|
|
@@ -4003,7 +3712,7 @@ var ResourceStore = function (_EventEmitter) {
|
|
|
4003
3712
|
}
|
|
4004
3713
|
return _this;
|
|
4005
3714
|
}
|
|
4006
|
-
|
|
3715
|
+
_createClass(ResourceStore, [{
|
|
4007
3716
|
key: "addNamespaces",
|
|
4008
3717
|
value: function addNamespaces(ns) {
|
|
4009
3718
|
if (this.options.ns.indexOf(ns) < 0) {
|
|
@@ -4148,22 +3857,22 @@ var postProcessor = {
|
|
|
4148
3857
|
};
|
|
4149
3858
|
|
|
4150
3859
|
function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4151
|
-
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$4(Object(source), !0).forEach(function (key) {
|
|
4152
|
-
function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super =
|
|
3860
|
+
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$4(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3861
|
+
function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
4153
3862
|
function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
4154
3863
|
var checkedLoadedFor = {};
|
|
4155
3864
|
var Translator$1 = function (_EventEmitter) {
|
|
4156
|
-
|
|
3865
|
+
_inherits(Translator, _EventEmitter);
|
|
4157
3866
|
var _super = _createSuper$2(Translator);
|
|
4158
3867
|
function Translator(services) {
|
|
4159
3868
|
var _this;
|
|
4160
3869
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
4161
|
-
|
|
3870
|
+
_classCallCheck(this, Translator);
|
|
4162
3871
|
_this = _super.call(this);
|
|
4163
3872
|
if (isIE10) {
|
|
4164
|
-
EventEmitter.call(
|
|
3873
|
+
EventEmitter.call(_assertThisInitialized(_this));
|
|
4165
3874
|
}
|
|
4166
|
-
copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services,
|
|
3875
|
+
copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, _assertThisInitialized(_this));
|
|
4167
3876
|
_this.options = options;
|
|
4168
3877
|
if (_this.options.keySeparator === undefined) {
|
|
4169
3878
|
_this.options.keySeparator = '.';
|
|
@@ -4171,7 +3880,7 @@ var Translator$1 = function (_EventEmitter) {
|
|
|
4171
3880
|
_this.logger = baseLogger.create('translator');
|
|
4172
3881
|
return _this;
|
|
4173
3882
|
}
|
|
4174
|
-
|
|
3883
|
+
_createClass(Translator, [{
|
|
4175
3884
|
key: "changeLanguage",
|
|
4176
3885
|
value: function changeLanguage(lng) {
|
|
4177
3886
|
if (lng) this.language = lng;
|
|
@@ -4219,10 +3928,10 @@ var Translator$1 = function (_EventEmitter) {
|
|
|
4219
3928
|
key: "translate",
|
|
4220
3929
|
value: function translate(keys, options, lastKey) {
|
|
4221
3930
|
var _this2 = this;
|
|
4222
|
-
if (
|
|
3931
|
+
if (_typeof(options) !== 'object' && this.options.overloadTranslationOptionHandler) {
|
|
4223
3932
|
options = this.options.overloadTranslationOptionHandler(arguments);
|
|
4224
3933
|
}
|
|
4225
|
-
if (
|
|
3934
|
+
if (_typeof(options) === 'object') options = _objectSpread$4({}, options);
|
|
4226
3935
|
if (!options) options = {};
|
|
4227
3936
|
if (keys === undefined || keys === null) return '';
|
|
4228
3937
|
if (!Array.isArray(keys)) keys = [String(keys)];
|
|
@@ -4529,12 +4238,12 @@ function capitalize(string) {
|
|
|
4529
4238
|
}
|
|
4530
4239
|
var LanguageUtil = function () {
|
|
4531
4240
|
function LanguageUtil(options) {
|
|
4532
|
-
|
|
4241
|
+
_classCallCheck(this, LanguageUtil);
|
|
4533
4242
|
this.options = options;
|
|
4534
4243
|
this.supportedLngs = this.options.supportedLngs || false;
|
|
4535
4244
|
this.logger = baseLogger.create('languageUtils');
|
|
4536
4245
|
}
|
|
4537
|
-
|
|
4246
|
+
_createClass(LanguageUtil, [{
|
|
4538
4247
|
key: "getScriptPartFromCode",
|
|
4539
4248
|
value: function getScriptPartFromCode(code) {
|
|
4540
4249
|
if (!code || code.indexOf('-') < 0) return null;
|
|
@@ -4840,7 +4549,7 @@ function createRules() {
|
|
|
4840
4549
|
var PluralResolver = function () {
|
|
4841
4550
|
function PluralResolver(languageUtils) {
|
|
4842
4551
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
4843
|
-
|
|
4552
|
+
_classCallCheck(this, PluralResolver);
|
|
4844
4553
|
this.languageUtils = languageUtils;
|
|
4845
4554
|
this.options = options;
|
|
4846
4555
|
this.logger = baseLogger.create('pluralResolver');
|
|
@@ -4850,7 +4559,7 @@ var PluralResolver = function () {
|
|
|
4850
4559
|
}
|
|
4851
4560
|
this.rules = createRules();
|
|
4852
4561
|
}
|
|
4853
|
-
|
|
4562
|
+
_createClass(PluralResolver, [{
|
|
4854
4563
|
key: "addRule",
|
|
4855
4564
|
value: function addRule(lng, obj) {
|
|
4856
4565
|
this.rules[lng] = obj;
|
|
@@ -4959,7 +4668,7 @@ var PluralResolver = function () {
|
|
|
4959
4668
|
}();
|
|
4960
4669
|
|
|
4961
4670
|
function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4962
|
-
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) {
|
|
4671
|
+
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4963
4672
|
function deepFindWithDefaults(data, defaultData, key) {
|
|
4964
4673
|
var keySeparator = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '.';
|
|
4965
4674
|
var ignoreJSONStructure = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
|
|
@@ -4973,7 +4682,7 @@ function deepFindWithDefaults(data, defaultData, key) {
|
|
|
4973
4682
|
var Interpolator = function () {
|
|
4974
4683
|
function Interpolator() {
|
|
4975
4684
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
4976
|
-
|
|
4685
|
+
_classCallCheck(this, Interpolator);
|
|
4977
4686
|
this.logger = baseLogger.create('interpolator');
|
|
4978
4687
|
this.options = options;
|
|
4979
4688
|
this.format = options.interpolation && options.interpolation.format || function (value) {
|
|
@@ -4981,7 +4690,7 @@ var Interpolator = function () {
|
|
|
4981
4690
|
};
|
|
4982
4691
|
this.init(options);
|
|
4983
4692
|
}
|
|
4984
|
-
|
|
4693
|
+
_createClass(Interpolator, [{
|
|
4985
4694
|
key: "init",
|
|
4986
4695
|
value: function init() {
|
|
4987
4696
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -5164,7 +4873,7 @@ var Interpolator = function () {
|
|
|
5164
4873
|
}();
|
|
5165
4874
|
|
|
5166
4875
|
function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5167
|
-
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) {
|
|
4876
|
+
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5168
4877
|
function parseFormatStr(formatStr) {
|
|
5169
4878
|
var formatName = formatStr.toLowerCase().trim();
|
|
5170
4879
|
var formatOptions = {};
|
|
@@ -5181,7 +4890,7 @@ function parseFormatStr(formatStr) {
|
|
|
5181
4890
|
opts.forEach(function (opt) {
|
|
5182
4891
|
if (!opt) return;
|
|
5183
4892
|
var _opt$split = opt.split(':'),
|
|
5184
|
-
_opt$split2 =
|
|
4893
|
+
_opt$split2 = _toArray(_opt$split),
|
|
5185
4894
|
key = _opt$split2[0],
|
|
5186
4895
|
rest = _opt$split2.slice(1);
|
|
5187
4896
|
var val = rest.join(':').trim().replace(/^'+|'+$/g, '');
|
|
@@ -5212,7 +4921,7 @@ function createCachedFormatter(fn) {
|
|
|
5212
4921
|
var Formatter = function () {
|
|
5213
4922
|
function Formatter() {
|
|
5214
4923
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5215
|
-
|
|
4924
|
+
_classCallCheck(this, Formatter);
|
|
5216
4925
|
this.logger = baseLogger.create('formatter');
|
|
5217
4926
|
this.options = options;
|
|
5218
4927
|
this.formats = {
|
|
@@ -5251,7 +4960,7 @@ var Formatter = function () {
|
|
|
5251
4960
|
};
|
|
5252
4961
|
this.init(options);
|
|
5253
4962
|
}
|
|
5254
|
-
|
|
4963
|
+
_createClass(Formatter, [{
|
|
5255
4964
|
key: "init",
|
|
5256
4965
|
value: function init(services) {
|
|
5257
4966
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
@@ -5302,8 +5011,8 @@ var Formatter = function () {
|
|
|
5302
5011
|
}();
|
|
5303
5012
|
|
|
5304
5013
|
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5305
|
-
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) {
|
|
5306
|
-
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super =
|
|
5014
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5015
|
+
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5307
5016
|
function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
5308
5017
|
function removePending(q, name) {
|
|
5309
5018
|
if (q.pending[name] !== undefined) {
|
|
@@ -5312,15 +5021,15 @@ function removePending(q, name) {
|
|
|
5312
5021
|
}
|
|
5313
5022
|
}
|
|
5314
5023
|
var Connector = function (_EventEmitter) {
|
|
5315
|
-
|
|
5024
|
+
_inherits(Connector, _EventEmitter);
|
|
5316
5025
|
var _super = _createSuper$1(Connector);
|
|
5317
5026
|
function Connector(backend, store, services) {
|
|
5318
5027
|
var _this;
|
|
5319
5028
|
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
5320
|
-
|
|
5029
|
+
_classCallCheck(this, Connector);
|
|
5321
5030
|
_this = _super.call(this);
|
|
5322
5031
|
if (isIE10) {
|
|
5323
|
-
EventEmitter.call(
|
|
5032
|
+
EventEmitter.call(_assertThisInitialized(_this));
|
|
5324
5033
|
}
|
|
5325
5034
|
_this.backend = backend;
|
|
5326
5035
|
_this.store = store;
|
|
@@ -5340,7 +5049,7 @@ var Connector = function (_EventEmitter) {
|
|
|
5340
5049
|
}
|
|
5341
5050
|
return _this;
|
|
5342
5051
|
}
|
|
5343
|
-
|
|
5052
|
+
_createClass(Connector, [{
|
|
5344
5053
|
key: "queueLoad",
|
|
5345
5054
|
value: function queueLoad(languages, namespaces, options, callback) {
|
|
5346
5055
|
var _this2 = this;
|
|
@@ -5600,10 +5309,10 @@ function get() {
|
|
|
5600
5309
|
appendNamespaceToCIMode: false,
|
|
5601
5310
|
overloadTranslationOptionHandler: function handle(args) {
|
|
5602
5311
|
var ret = {};
|
|
5603
|
-
if (
|
|
5312
|
+
if (_typeof(args[1]) === 'object') ret = args[1];
|
|
5604
5313
|
if (typeof args[1] === 'string') ret.defaultValue = args[1];
|
|
5605
5314
|
if (typeof args[2] === 'string') ret.tDescription = args[2];
|
|
5606
|
-
if (
|
|
5315
|
+
if (_typeof(args[2]) === 'object' || _typeof(args[3]) === 'object') {
|
|
5607
5316
|
var options = args[3] || args[2];
|
|
5608
5317
|
Object.keys(options).forEach(function (key) {
|
|
5609
5318
|
ret[key] = options[key];
|
|
@@ -5639,8 +5348,8 @@ function transformOptions(options) {
|
|
|
5639
5348
|
}
|
|
5640
5349
|
|
|
5641
5350
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5642
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
5643
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super =
|
|
5351
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5352
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5644
5353
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
5645
5354
|
function noop() {}
|
|
5646
5355
|
function bindMemberFunctions(inst) {
|
|
@@ -5652,16 +5361,16 @@ function bindMemberFunctions(inst) {
|
|
|
5652
5361
|
});
|
|
5653
5362
|
}
|
|
5654
5363
|
var I18n = function (_EventEmitter) {
|
|
5655
|
-
|
|
5364
|
+
_inherits(I18n, _EventEmitter);
|
|
5656
5365
|
var _super = _createSuper(I18n);
|
|
5657
5366
|
function I18n() {
|
|
5658
5367
|
var _this;
|
|
5659
5368
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5660
5369
|
var callback = arguments.length > 1 ? arguments[1] : undefined;
|
|
5661
|
-
|
|
5370
|
+
_classCallCheck(this, I18n);
|
|
5662
5371
|
_this = _super.call(this);
|
|
5663
5372
|
if (isIE10) {
|
|
5664
|
-
EventEmitter.call(
|
|
5373
|
+
EventEmitter.call(_assertThisInitialized(_this));
|
|
5665
5374
|
}
|
|
5666
5375
|
_this.options = transformOptions(options);
|
|
5667
5376
|
_this.services = {};
|
|
@@ -5669,11 +5378,11 @@ var I18n = function (_EventEmitter) {
|
|
|
5669
5378
|
_this.modules = {
|
|
5670
5379
|
external: []
|
|
5671
5380
|
};
|
|
5672
|
-
bindMemberFunctions(
|
|
5381
|
+
bindMemberFunctions(_assertThisInitialized(_this));
|
|
5673
5382
|
if (callback && !_this.isInitialized && !options.isClone) {
|
|
5674
5383
|
if (!_this.options.initImmediate) {
|
|
5675
5384
|
_this.init(options, callback);
|
|
5676
|
-
return
|
|
5385
|
+
return _possibleConstructorReturn(_this, _assertThisInitialized(_this));
|
|
5677
5386
|
}
|
|
5678
5387
|
setTimeout(function () {
|
|
5679
5388
|
_this.init(options, callback);
|
|
@@ -5681,7 +5390,7 @@ var I18n = function (_EventEmitter) {
|
|
|
5681
5390
|
}
|
|
5682
5391
|
return _this;
|
|
5683
5392
|
}
|
|
5684
|
-
|
|
5393
|
+
_createClass(I18n, [{
|
|
5685
5394
|
key: "init",
|
|
5686
5395
|
value: function init() {
|
|
5687
5396
|
var _this2 = this;
|
|
@@ -5973,7 +5682,7 @@ var I18n = function (_EventEmitter) {
|
|
|
5973
5682
|
var _this5 = this;
|
|
5974
5683
|
var fixedT = function fixedT(key, opts) {
|
|
5975
5684
|
var options;
|
|
5976
|
-
if (
|
|
5685
|
+
if (_typeof(opts) !== 'object') {
|
|
5977
5686
|
for (var _len3 = arguments.length, rest = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
|
|
5978
5687
|
rest[_key3 - 2] = arguments[_key3];
|
|
5979
5688
|
}
|
|
@@ -6149,7 +5858,7 @@ var I18n = function (_EventEmitter) {
|
|
|
6149
5858
|
}]);
|
|
6150
5859
|
return I18n;
|
|
6151
5860
|
}(EventEmitter);
|
|
6152
|
-
|
|
5861
|
+
_defineProperty(I18n, "createInstance", function () {
|
|
6153
5862
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
6154
5863
|
var callback = arguments.length > 1 ? arguments[1] : undefined;
|
|
6155
5864
|
return new I18n(options, callback);
|
|
@@ -6157,33 +5866,41 @@ _defineProperty__default["default"](I18n, "createInstance", function () {
|
|
|
6157
5866
|
var instance = I18n.createInstance();
|
|
6158
5867
|
instance.createInstance = I18n.createInstance;
|
|
6159
5868
|
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
5869
|
+
instance.createInstance;
|
|
5870
|
+
instance.dir;
|
|
5871
|
+
instance.init;
|
|
5872
|
+
instance.loadResources;
|
|
5873
|
+
instance.reloadResources;
|
|
5874
|
+
instance.use;
|
|
5875
|
+
instance.changeLanguage;
|
|
5876
|
+
instance.getFixedT;
|
|
5877
|
+
instance.t;
|
|
5878
|
+
instance.exists;
|
|
5879
|
+
instance.setDefaultNamespace;
|
|
5880
|
+
instance.hasLoadedNamespace;
|
|
5881
|
+
instance.loadNamespaces;
|
|
5882
|
+
instance.loadLanguages;
|
|
5883
|
+
|
|
5884
|
+
var en = {
|
|
6171
5885
|
translation: {
|
|
6172
5886
|
categorize: {
|
|
6173
|
-
limitMaxChoicesPerCategory:
|
|
6174
|
-
|
|
5887
|
+
limitMaxChoicesPerCategory:
|
|
5888
|
+
"You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.",
|
|
5889
|
+
maxChoicesPerCategoryRestriction:
|
|
5890
|
+
'To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s].',
|
|
6175
5891
|
},
|
|
6176
5892
|
ebsr: {
|
|
6177
|
-
part: 'Part {{index}}'
|
|
5893
|
+
part: 'Part {{index}}',
|
|
6178
5894
|
},
|
|
6179
5895
|
numberLine: {
|
|
6180
5896
|
addElementLimit_one: 'You can only add {{count}} element',
|
|
6181
5897
|
addElementLimit_other: 'You can only add {{count}} elements',
|
|
6182
|
-
clearAll: 'Clear all'
|
|
5898
|
+
clearAll: 'Clear all',
|
|
6183
5899
|
},
|
|
6184
5900
|
imageClozeAssociation: {
|
|
6185
|
-
reachedLimit_one:
|
|
6186
|
-
|
|
5901
|
+
reachedLimit_one:
|
|
5902
|
+
'You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.',
|
|
5903
|
+
reachedLimit_other: 'Full',
|
|
6187
5904
|
},
|
|
6188
5905
|
drawingResponse: {
|
|
6189
5906
|
fillColor: 'Fill color',
|
|
@@ -6199,20 +5916,20 @@ var _default = {
|
|
|
6199
5916
|
green: 'Green',
|
|
6200
5917
|
white: 'White',
|
|
6201
5918
|
black: 'Black',
|
|
6202
|
-
onDoubleClick: 'Double click to edit this text. Press Enter to submit.'
|
|
5919
|
+
onDoubleClick: 'Double click to edit this text. Press Enter to submit.',
|
|
6203
5920
|
},
|
|
6204
5921
|
charting: {
|
|
6205
5922
|
addCategory: 'Add category',
|
|
6206
5923
|
actions: 'Actions',
|
|
6207
5924
|
add: 'Add',
|
|
6208
|
-
|
|
5925
|
+
delete: 'Delete',
|
|
6209
5926
|
newLabel: 'New label',
|
|
6210
5927
|
reachedLimit_other: "There can't be more than {{count}} categories.",
|
|
6211
5928
|
keyLegend: {
|
|
6212
5929
|
incorrectAnswer: 'Student incorrect answer',
|
|
6213
5930
|
correctAnswer: 'Student correct answer',
|
|
6214
|
-
correctKeyAnswer: 'Answer key correct'
|
|
6215
|
-
}
|
|
5931
|
+
correctKeyAnswer: 'Answer key correct',
|
|
5932
|
+
},
|
|
6216
5933
|
},
|
|
6217
5934
|
graphing: {
|
|
6218
5935
|
point: 'Point',
|
|
@@ -6228,24 +5945,25 @@ var _default = {
|
|
|
6228
5945
|
vector: 'Vector',
|
|
6229
5946
|
label: 'Label',
|
|
6230
5947
|
redo: 'Redo',
|
|
6231
|
-
reset: 'Reset'
|
|
5948
|
+
reset: 'Reset',
|
|
6232
5949
|
},
|
|
6233
5950
|
mathInline: {
|
|
6234
|
-
primaryCorrectWithAlternates:
|
|
5951
|
+
primaryCorrectWithAlternates:
|
|
5952
|
+
'Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct.',
|
|
6235
5953
|
},
|
|
6236
5954
|
multipleChoice: {
|
|
6237
5955
|
minSelections: 'Select at least {{minSelections}}.',
|
|
6238
5956
|
maxSelections_one: 'Only {{maxSelections}} answer is allowed.',
|
|
6239
5957
|
maxSelections_other: 'Only {{maxSelections}} answers are allowed.',
|
|
6240
5958
|
minmaxSelections_equal: 'Select {{minSelections}}.',
|
|
6241
|
-
minmaxSelections_range: 'Select between {{minSelections}} and {{maxSelections}}.'
|
|
5959
|
+
minmaxSelections_range: 'Select between {{minSelections}} and {{maxSelections}}.',
|
|
6242
5960
|
},
|
|
6243
5961
|
selectText: {
|
|
6244
5962
|
correctAnswerSelected: 'Correct',
|
|
6245
5963
|
correctAnswerNotSelected: 'Correct Answer Not Selected',
|
|
6246
5964
|
incorrectSelection: 'Incorrect Selection',
|
|
6247
|
-
key: 'Key'
|
|
6248
|
-
}
|
|
5965
|
+
key: 'Key',
|
|
5966
|
+
},
|
|
6249
5967
|
},
|
|
6250
5968
|
common: {
|
|
6251
5969
|
undo: 'Undo',
|
|
@@ -6254,42 +5972,35 @@ var _default = {
|
|
|
6254
5972
|
incorrect: 'Incorrect',
|
|
6255
5973
|
showCorrectAnswer: 'Show correct answer',
|
|
6256
5974
|
hideCorrectAnswer: 'Hide correct answer',
|
|
6257
|
-
commonCorrectAnswerWithAlternates:
|
|
5975
|
+
commonCorrectAnswerWithAlternates:
|
|
5976
|
+
'Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.',
|
|
6258
5977
|
warning: 'Warning',
|
|
6259
5978
|
showNote: 'Show Note',
|
|
6260
5979
|
hideNote: 'Hide Note',
|
|
6261
|
-
cancel: 'Cancel'
|
|
6262
|
-
}
|
|
5980
|
+
cancel: 'Cancel',
|
|
5981
|
+
},
|
|
6263
5982
|
};
|
|
6264
|
-
exports["default"] = _default;
|
|
6265
|
-
|
|
6266
|
-
}(en));
|
|
6267
5983
|
|
|
6268
|
-
var es = {
|
|
6269
|
-
|
|
6270
|
-
(function (exports) {
|
|
6271
|
-
|
|
6272
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6273
|
-
value: true
|
|
6274
|
-
});
|
|
6275
|
-
exports["default"] = void 0;
|
|
6276
|
-
var _default = {
|
|
5984
|
+
var es = {
|
|
6277
5985
|
translation: {
|
|
6278
5986
|
categorize: {
|
|
6279
|
-
limitMaxChoicesPerCategory:
|
|
6280
|
-
|
|
5987
|
+
limitMaxChoicesPerCategory:
|
|
5988
|
+
'Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.',
|
|
5989
|
+
maxChoicesPerCategoryRestriction:
|
|
5990
|
+
'Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta',
|
|
6281
5991
|
},
|
|
6282
5992
|
ebsr: {
|
|
6283
|
-
part: 'Parte {{index}}'
|
|
5993
|
+
part: 'Parte {{index}}',
|
|
6284
5994
|
},
|
|
6285
5995
|
numberLine: {
|
|
6286
5996
|
addElementLimit_one: 'Solo puedes agregar {{count}} elemento',
|
|
6287
5997
|
addElementLimit_other: 'Solo puedes agregar {{count}} elementos',
|
|
6288
|
-
clearAll: 'Borrar todo'
|
|
5998
|
+
clearAll: 'Borrar todo',
|
|
6289
5999
|
},
|
|
6290
6000
|
imageClozeAssociation: {
|
|
6291
|
-
reachedLimit_one:
|
|
6292
|
-
|
|
6001
|
+
reachedLimit_one:
|
|
6002
|
+
'Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.',
|
|
6003
|
+
reachedLimit_other: 'Lleno',
|
|
6293
6004
|
},
|
|
6294
6005
|
drawingResponse: {
|
|
6295
6006
|
fillColor: 'Color de relleno',
|
|
@@ -6305,20 +6016,20 @@ var _default = {
|
|
|
6305
6016
|
green: 'Verde',
|
|
6306
6017
|
white: 'Blanco',
|
|
6307
6018
|
black: 'Negro',
|
|
6308
|
-
onDoubleClick: 'Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar'
|
|
6019
|
+
onDoubleClick: 'Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar',
|
|
6309
6020
|
},
|
|
6310
6021
|
charting: {
|
|
6311
6022
|
addCategory: 'Añadir categoría',
|
|
6312
6023
|
actions: 'Acciones',
|
|
6313
6024
|
add: 'Añadir',
|
|
6314
|
-
|
|
6025
|
+
delete: 'Eliminar',
|
|
6315
6026
|
newLabel: 'Nueva etiqueta',
|
|
6316
6027
|
reachedLimit_other: 'No puede haber más de {{count}} categorías.',
|
|
6317
6028
|
keyLegend: {
|
|
6318
6029
|
incorrectAnswer: 'Respuesta incorrecta del estudiante',
|
|
6319
6030
|
correctAnswer: 'Respuesta correcta del estudiante',
|
|
6320
|
-
correctKeyAnswer: 'Clave de respuesta correcta'
|
|
6321
|
-
}
|
|
6031
|
+
correctKeyAnswer: 'Clave de respuesta correcta',
|
|
6032
|
+
},
|
|
6322
6033
|
},
|
|
6323
6034
|
graphing: {
|
|
6324
6035
|
point: 'Punto',
|
|
@@ -6334,24 +6045,25 @@ var _default = {
|
|
|
6334
6045
|
vector: 'Vector',
|
|
6335
6046
|
label: 'Etiqueta',
|
|
6336
6047
|
redo: 'Rehacer',
|
|
6337
|
-
reset: 'Reiniciar'
|
|
6048
|
+
reset: 'Reiniciar',
|
|
6338
6049
|
},
|
|
6339
6050
|
mathInline: {
|
|
6340
|
-
primaryCorrectWithAlternates:
|
|
6051
|
+
primaryCorrectWithAlternates:
|
|
6052
|
+
'Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas.',
|
|
6341
6053
|
},
|
|
6342
6054
|
multipleChoice: {
|
|
6343
6055
|
minSelections: 'Seleccione al menos {{minSelections}}.',
|
|
6344
6056
|
maxSelections_one: 'Sólo se permite {{maxSelections}} respuesta.',
|
|
6345
6057
|
maxSelections_other: 'Sólo se permiten {{maxSelections}} respuestas.',
|
|
6346
6058
|
minmaxSelections_equal: 'Seleccione {{minSelections}}.',
|
|
6347
|
-
minmaxSelections_range: 'Seleccione entre {{minSelections}} y {{maxSelections}}.'
|
|
6059
|
+
minmaxSelections_range: 'Seleccione entre {{minSelections}} y {{maxSelections}}.',
|
|
6348
6060
|
},
|
|
6349
6061
|
selectText: {
|
|
6350
6062
|
correctAnswerSelected: 'Respuesta Correcta',
|
|
6351
6063
|
correctAnswerNotSelected: 'Respuesta Correcta No Seleccionada',
|
|
6352
6064
|
incorrectSelection: 'Selección Incorrecta',
|
|
6353
|
-
key: 'Clave'
|
|
6354
|
-
}
|
|
6065
|
+
key: 'Clave',
|
|
6066
|
+
},
|
|
6355
6067
|
},
|
|
6356
6068
|
common: {
|
|
6357
6069
|
undo: 'Deshacer',
|
|
@@ -6360,108 +6072,52 @@ var _default = {
|
|
|
6360
6072
|
incorrect: 'Incorrect',
|
|
6361
6073
|
showCorrectAnswer: 'Mostrar respuesta correcta',
|
|
6362
6074
|
hideCorrectAnswer: 'Ocultar respuesta correcta',
|
|
6363
|
-
commonCorrectAnswerWithAlternates:
|
|
6075
|
+
commonCorrectAnswerWithAlternates:
|
|
6076
|
+
'Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.',
|
|
6364
6077
|
warning: 'Advertencia',
|
|
6365
6078
|
showNote: 'Mostrar Nota',
|
|
6366
6079
|
hideNote: 'Ocultar Nota',
|
|
6367
|
-
cancel: 'Cancelar'
|
|
6368
|
-
}
|
|
6080
|
+
cancel: 'Cancelar',
|
|
6081
|
+
},
|
|
6369
6082
|
};
|
|
6370
|
-
exports["default"] = _default;
|
|
6371
|
-
|
|
6372
|
-
}(es));
|
|
6373
|
-
|
|
6374
|
-
(function (exports) {
|
|
6375
|
-
|
|
6376
|
-
var _interopRequireDefault = interopRequireDefault.exports;
|
|
6377
|
-
|
|
6378
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6379
|
-
value: true
|
|
6380
|
-
});
|
|
6381
|
-
exports["default"] = void 0;
|
|
6382
6083
|
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
var _en = _interopRequireDefault(en);
|
|
6388
|
-
|
|
6389
|
-
var _es = _interopRequireDefault(es);
|
|
6390
|
-
|
|
6391
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6392
|
-
|
|
6393
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6394
|
-
|
|
6395
|
-
_i18next["default"].init({
|
|
6396
|
-
fallbackLng: "en",
|
|
6397
|
-
lng: "en",
|
|
6084
|
+
instance.init({
|
|
6085
|
+
fallbackLng: 'en',
|
|
6086
|
+
lng: 'en',
|
|
6398
6087
|
debug: true,
|
|
6399
6088
|
resources: {
|
|
6400
|
-
en:
|
|
6401
|
-
es:
|
|
6402
|
-
}
|
|
6089
|
+
en: en,
|
|
6090
|
+
es: es,
|
|
6091
|
+
},
|
|
6403
6092
|
});
|
|
6404
6093
|
|
|
6405
|
-
var
|
|
6406
|
-
translator:
|
|
6407
|
-
|
|
6408
|
-
|
|
6094
|
+
var Translator = {
|
|
6095
|
+
translator: {
|
|
6096
|
+
...instance,
|
|
6097
|
+
t: (key, options) => {
|
|
6098
|
+
const { lng } = options;
|
|
6409
6099
|
|
|
6410
6100
|
switch (lng) {
|
|
6411
6101
|
// these keys don't work with plurals, don't know why, so I added a workaround to convert them to the correct lng
|
|
6412
|
-
case
|
|
6413
|
-
case
|
|
6414
|
-
options.lng =
|
|
6102
|
+
case 'en_US':
|
|
6103
|
+
case 'en-US':
|
|
6104
|
+
options.lng = 'en';
|
|
6415
6105
|
break;
|
|
6416
|
-
|
|
6417
|
-
case
|
|
6418
|
-
case
|
|
6419
|
-
case
|
|
6420
|
-
|
|
6421
|
-
options.lng = "es";
|
|
6106
|
+
case 'es_ES':
|
|
6107
|
+
case 'es-ES':
|
|
6108
|
+
case 'es_MX':
|
|
6109
|
+
case 'es-MX':
|
|
6110
|
+
options.lng = 'es';
|
|
6422
6111
|
break;
|
|
6423
6112
|
}
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
}
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
value: "en_US",
|
|
6432
|
-
label: "English (US)"
|
|
6433
|
-
}, {
|
|
6434
|
-
value: "es_ES",
|
|
6435
|
-
label: "Spanish"
|
|
6436
|
-
}]
|
|
6113
|
+
return instance.t(key, { lng, ...options });
|
|
6114
|
+
},
|
|
6115
|
+
},
|
|
6116
|
+
languageOptions: [
|
|
6117
|
+
{ value: 'en_US', label: 'English (US)' },
|
|
6118
|
+
{ value: 'es_ES', label: 'Spanish' },
|
|
6119
|
+
],
|
|
6437
6120
|
};
|
|
6438
|
-
exports["default"] = _default;
|
|
6439
|
-
|
|
6440
|
-
}(translator$1));
|
|
6441
|
-
|
|
6442
|
-
(function (exports) {
|
|
6443
|
-
|
|
6444
|
-
var _interopRequireDefault = interopRequireDefault.exports;
|
|
6445
|
-
|
|
6446
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6447
|
-
value: true
|
|
6448
|
-
});
|
|
6449
|
-
Object.defineProperty(exports, "Translator", {
|
|
6450
|
-
enumerable: true,
|
|
6451
|
-
get: function get() {
|
|
6452
|
-
return _translator["default"];
|
|
6453
|
-
}
|
|
6454
|
-
});
|
|
6455
|
-
exports["default"] = void 0;
|
|
6456
|
-
|
|
6457
|
-
var _translator = _interopRequireDefault(translator$1);
|
|
6458
|
-
|
|
6459
|
-
var _default = _translator["default"];
|
|
6460
|
-
exports["default"] = _default;
|
|
6461
|
-
|
|
6462
|
-
}(translator$2));
|
|
6463
|
-
|
|
6464
|
-
var Translator = /*@__PURE__*/getDefaultExportFromCjs(translator$2);
|
|
6465
6121
|
|
|
6466
6122
|
const { translator } = Translator;
|
|
6467
6123
|
|
|
@@ -6544,13 +6200,13 @@ async function model(question, session, env, updateSession) {
|
|
|
6544
6200
|
});
|
|
6545
6201
|
|
|
6546
6202
|
const partASession = get_1(session, 'value.partA');
|
|
6547
|
-
const partALockChoiceOrder =
|
|
6203
|
+
const partALockChoiceOrder = lockChoices(normalizedQuestion.partA, partASession, env);
|
|
6548
6204
|
|
|
6549
6205
|
const { choices: partAChoices } = partA || {};
|
|
6550
6206
|
const { choices: partBChoices } = partB || {};
|
|
6551
6207
|
|
|
6552
6208
|
if (!partALockChoiceOrder && partAChoices && partAChoices.length) {
|
|
6553
|
-
partA.choices = await
|
|
6209
|
+
partA.choices = await getShuffledChoices(
|
|
6554
6210
|
partAChoices,
|
|
6555
6211
|
{ shuffledValues: (session.shuffledValues || {}).partA },
|
|
6556
6212
|
us('partA'),
|
|
@@ -6559,10 +6215,10 @@ async function model(question, session, env, updateSession) {
|
|
|
6559
6215
|
}
|
|
6560
6216
|
|
|
6561
6217
|
const partBSession = get_1(session, 'value.partB');
|
|
6562
|
-
const partBLockChoiceOrder =
|
|
6218
|
+
const partBLockChoiceOrder = lockChoices(normalizedQuestion.partB, partBSession, env);
|
|
6563
6219
|
|
|
6564
6220
|
if (!partBLockChoiceOrder && partBChoices && partBChoices.length) {
|
|
6565
|
-
partB.choices = await
|
|
6221
|
+
partB.choices = await getShuffledChoices(
|
|
6566
6222
|
partBChoices,
|
|
6567
6223
|
{ shuffledValues: (session.shuffledValues || {}).partB },
|
|
6568
6224
|
us('partB'),
|
|
@@ -6667,7 +6323,7 @@ function outcome(config, session, env) {
|
|
|
6667
6323
|
if (value) {
|
|
6668
6324
|
const { partA, partB } = value || {};
|
|
6669
6325
|
|
|
6670
|
-
const partialScoringEnabled =
|
|
6326
|
+
const partialScoringEnabled = enabled(config, env);
|
|
6671
6327
|
|
|
6672
6328
|
const scoreA = getScore(config, partA, 'partA', partialScoringEnabled);
|
|
6673
6329
|
const scoreB = getScore(config, partB, 'partB', partialScoringEnabled);
|