@tko/build.knockout 4.0.0-beta1.7 → 4.0.1
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/browser.js +455 -281
- package/dist/browser.js.map +4 -4
- package/dist/browser.min.js +9 -9
- package/dist/browser.min.js.map +4 -4
- package/dist/common.js +1 -1
- package/dist/index.cjs +41 -8514
- package/dist/index.cjs.map +4 -4
- package/dist/index.js +6 -15
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +6 -15
- package/dist/index.mjs.map +2 -2
- package/package.json +25 -30
- package/helpers/jasmine.extensions.js +0 -209
package/dist/browser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @tko/build.knockout 🥊 4.0.
|
|
1
|
+
// @tko/build.knockout 🥊 4.0.1 IIFE
|
|
2
2
|
"use strict";
|
|
3
3
|
var ko = (() => {
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -10,6 +10,7 @@ var ko = (() => {
|
|
|
10
10
|
throw TypeError(msg);
|
|
11
11
|
};
|
|
12
12
|
var __pow = Math.pow;
|
|
13
|
+
var __defNormalProp = (obj, key, value2) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value2 }) : obj[key] = value2;
|
|
13
14
|
var __export = (target, all) => {
|
|
14
15
|
for (var name in all)
|
|
15
16
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -23,6 +24,7 @@ var ko = (() => {
|
|
|
23
24
|
return to;
|
|
24
25
|
};
|
|
25
26
|
var __toCommonJS = (mod2) => __copyProps(__defProp({}, "__esModule", { value: true }), mod2);
|
|
27
|
+
var __publicField = (obj, key, value2) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value2);
|
|
26
28
|
var __accessCheck = (obj, member2, msg) => member2.has(obj) || __typeError("Cannot " + msg);
|
|
27
29
|
var __privateGet = (obj, member2, getter) => (__accessCheck(obj, member2, "read from private field"), getter ? getter.call(obj) : member2.get(obj));
|
|
28
30
|
var __privateAdd = (obj, member2, value2) => member2.has(obj) ? __typeError("Cannot add the same private member more than once") : member2 instanceof WeakSet ? member2.add(obj) : member2.set(obj, value2);
|
|
@@ -86,7 +88,7 @@ var ko = (() => {
|
|
|
86
88
|
default: () => index_default
|
|
87
89
|
});
|
|
88
90
|
|
|
89
|
-
// ../../packages/utils/
|
|
91
|
+
// ../../packages/utils/src/array.ts
|
|
90
92
|
var { isArray } = Array;
|
|
91
93
|
function arrayForEach(array, action, actionOwner) {
|
|
92
94
|
if (arguments.length > 2) {
|
|
@@ -246,35 +248,61 @@ var ko = (() => {
|
|
|
246
248
|
return editScript.reverse();
|
|
247
249
|
}
|
|
248
250
|
|
|
249
|
-
// ../../packages/utils/
|
|
251
|
+
// ../../packages/utils/src/options.ts
|
|
250
252
|
var Options = class {
|
|
251
253
|
constructor() {
|
|
252
|
-
|
|
253
|
-
this
|
|
254
|
-
|
|
255
|
-
this
|
|
256
|
-
this
|
|
257
|
-
this
|
|
258
|
-
this
|
|
259
|
-
|
|
260
|
-
this
|
|
261
|
-
this
|
|
262
|
-
|
|
263
|
-
this
|
|
264
|
-
|
|
265
|
-
this
|
|
266
|
-
|
|
267
|
-
this
|
|
268
|
-
|
|
269
|
-
this
|
|
270
|
-
|
|
271
|
-
this
|
|
272
|
-
|
|
273
|
-
|
|
254
|
+
// The following options can be set on ko.options to make a function rewriting or something similar.
|
|
255
|
+
__publicField(this, "bindingStringPreparsers", []);
|
|
256
|
+
// Reference to the own knockout instance
|
|
257
|
+
__publicField(this, "knockoutInstance", null);
|
|
258
|
+
__publicField(this, "deferUpdates", false);
|
|
259
|
+
// Don't set this false, with jquery 3.7+
|
|
260
|
+
__publicField(this, "useOnlyNativeEvents", true);
|
|
261
|
+
// Use HTML5 <template> tags if is supported
|
|
262
|
+
__publicField(this, "useTemplateTag", true);
|
|
263
|
+
__publicField(this, "protoProperty", "__ko_proto__");
|
|
264
|
+
// Modify the default attribute from `data-bind`.
|
|
265
|
+
__publicField(this, "defaultBindingAttribute", "data-bind");
|
|
266
|
+
// Enable/disable <!-- ko binding: ... -> style bindings
|
|
267
|
+
__publicField(this, "allowVirtualElements", true);
|
|
268
|
+
// Global variables that can be accessed from bindings.
|
|
269
|
+
__publicField(this, "bindingGlobals", /* @__PURE__ */ Object.create(null));
|
|
270
|
+
// An instance of the binding provider.
|
|
271
|
+
__publicField(this, "bindingProviderInstance");
|
|
272
|
+
// Whether the `with` binding creates a child context when used with `as`.
|
|
273
|
+
__publicField(this, "createChildContextWithAs", false);
|
|
274
|
+
// jQuery will be automatically set to globalThis.jQuery in applyBindings
|
|
275
|
+
// if it is (strictly equal to) undefined. Set it to true to
|
|
276
|
+
// disable automatically setting jQuery.
|
|
277
|
+
__publicField(this, "disableJQueryUsage", false);
|
|
278
|
+
__publicField(this, "_jQuery");
|
|
279
|
+
__publicField(this, "Promise", globalThis.Promise);
|
|
280
|
+
__publicField(this, "taskScheduler", null);
|
|
281
|
+
__publicField(this, "debug", false);
|
|
282
|
+
/**
|
|
283
|
+
* The maximum size of template to parse.
|
|
284
|
+
* Set to 0 to disable the limit.
|
|
285
|
+
*/
|
|
286
|
+
__publicField(this, "templateSizeLimit", 4096);
|
|
287
|
+
/**
|
|
288
|
+
* Whether or not to allow script tags in templates.
|
|
289
|
+
* If false, an error will be thrown if a script tag is detected in the template.
|
|
290
|
+
* It is not recommended to set this to true.
|
|
291
|
+
*/
|
|
292
|
+
__publicField(this, "allowScriptTagsInTemplates", false);
|
|
293
|
+
__publicField(this, "_sanitizeWarningLogged", false);
|
|
294
|
+
__publicField(this, "global", globalThis);
|
|
295
|
+
__publicField(this, "document", globalThis.document);
|
|
296
|
+
// Filters for bindings
|
|
297
|
+
// data-bind="expression | filter_1 | filter_2"
|
|
298
|
+
__publicField(this, "filters", {});
|
|
299
|
+
// Used by the template binding.
|
|
300
|
+
__publicField(this, "includeDestroyed", false);
|
|
301
|
+
__publicField(this, "foreachHidesDestroyed", false);
|
|
274
302
|
}
|
|
275
303
|
get jQuery() {
|
|
276
304
|
var _a;
|
|
277
|
-
if (this.disableJQueryUsage) return;
|
|
305
|
+
if (this.disableJQueryUsage) return void 0;
|
|
278
306
|
return (_a = this._jQuery) != null ? _a : globalThis.jQuery;
|
|
279
307
|
}
|
|
280
308
|
/**
|
|
@@ -320,9 +348,26 @@ var ko = (() => {
|
|
|
320
348
|
}
|
|
321
349
|
};
|
|
322
350
|
var options = new Options();
|
|
351
|
+
function defineOption(name, config) {
|
|
352
|
+
var _a;
|
|
353
|
+
let _value = config.default;
|
|
354
|
+
Object.defineProperty(options, name, {
|
|
355
|
+
get() {
|
|
356
|
+
return _value;
|
|
357
|
+
},
|
|
358
|
+
set(value2) {
|
|
359
|
+
var _a2;
|
|
360
|
+
_value = value2;
|
|
361
|
+
(_a2 = config.set) == null ? void 0 : _a2.call(config, value2);
|
|
362
|
+
},
|
|
363
|
+
enumerable: true,
|
|
364
|
+
configurable: true
|
|
365
|
+
});
|
|
366
|
+
(_a = config.set) == null ? void 0 : _a.call(config, _value);
|
|
367
|
+
}
|
|
323
368
|
var options_default = options;
|
|
324
369
|
|
|
325
|
-
// ../../packages/utils/
|
|
370
|
+
// ../../packages/utils/src/error.ts
|
|
326
371
|
function catchFunctionErrors(delegate) {
|
|
327
372
|
if (!options_default.onError) {
|
|
328
373
|
return delegate;
|
|
@@ -344,7 +389,7 @@ var ko = (() => {
|
|
|
344
389
|
return setTimeout(catchFunctionErrors(handler), timeout);
|
|
345
390
|
}
|
|
346
391
|
|
|
347
|
-
// ../../packages/utils/
|
|
392
|
+
// ../../packages/utils/src/async.ts
|
|
348
393
|
function throttle(callback, timeout) {
|
|
349
394
|
let timeoutInstance;
|
|
350
395
|
return function(...args) {
|
|
@@ -364,7 +409,7 @@ var ko = (() => {
|
|
|
364
409
|
};
|
|
365
410
|
}
|
|
366
411
|
|
|
367
|
-
// ../../packages/utils/
|
|
412
|
+
// ../../packages/utils/src/object.ts
|
|
368
413
|
function hasOwnProperty(obj, propName) {
|
|
369
414
|
return Object.prototype.hasOwnProperty.call(obj, propName);
|
|
370
415
|
}
|
|
@@ -442,7 +487,7 @@ var ko = (() => {
|
|
|
442
487
|
return isObjectLike(object) && typeof object.then === "function";
|
|
443
488
|
}
|
|
444
489
|
|
|
445
|
-
// ../../packages/utils/
|
|
490
|
+
// ../../packages/utils/src/function.ts
|
|
446
491
|
function testOverwrite() {
|
|
447
492
|
try {
|
|
448
493
|
Object.defineProperty(function x() {
|
|
@@ -459,7 +504,7 @@ var ko = (() => {
|
|
|
459
504
|
}
|
|
460
505
|
}
|
|
461
506
|
|
|
462
|
-
// ../../packages/utils/
|
|
507
|
+
// ../../packages/utils/src/string.ts
|
|
463
508
|
function stringTrim(string) {
|
|
464
509
|
return string === null || string === void 0 ? "" : string.trim ? string.trim() : string.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g, "");
|
|
465
510
|
}
|
|
@@ -480,13 +525,13 @@ var ko = (() => {
|
|
|
480
525
|
return null;
|
|
481
526
|
}
|
|
482
527
|
|
|
483
|
-
// ../../packages/utils/
|
|
528
|
+
// ../../packages/utils/src/symbol.ts
|
|
484
529
|
var useSymbols = typeof Symbol === "function";
|
|
485
530
|
function createSymbolOrString(identifier) {
|
|
486
531
|
return useSymbols ? Symbol(identifier) : identifier;
|
|
487
532
|
}
|
|
488
533
|
|
|
489
|
-
// ../../packages/utils/
|
|
534
|
+
// ../../packages/utils/src/css.ts
|
|
490
535
|
var cssClassNameRegex = /\S+/g;
|
|
491
536
|
function toggleDomNodeCssClass(node, classNames, shouldHaveClass) {
|
|
492
537
|
let addOrRemoveFn;
|
|
@@ -512,7 +557,7 @@ var ko = (() => {
|
|
|
512
557
|
obj[prop] = currentClassNames.join(" ");
|
|
513
558
|
}
|
|
514
559
|
|
|
515
|
-
// ../../packages/utils/
|
|
560
|
+
// ../../packages/utils/src/dom/info.ts
|
|
516
561
|
function domNodeIsContainedBy(node, containedByNode) {
|
|
517
562
|
if (node === containedByNode) {
|
|
518
563
|
return true;
|
|
@@ -556,7 +601,7 @@ var ko = (() => {
|
|
|
556
601
|
}
|
|
557
602
|
}
|
|
558
603
|
|
|
559
|
-
// ../../packages/utils/
|
|
604
|
+
// ../../packages/utils/src/dom/event.ts
|
|
560
605
|
var knownEvents = {};
|
|
561
606
|
var knownEventTypesByEventName = {};
|
|
562
607
|
knownEvents["UIEvents"] = ["keyup", "keydown", "keypress"];
|
|
@@ -638,7 +683,7 @@ var ko = (() => {
|
|
|
638
683
|
}
|
|
639
684
|
}
|
|
640
685
|
|
|
641
|
-
// ../../packages/utils/
|
|
686
|
+
// ../../packages/utils/src/dom/data.ts
|
|
642
687
|
var data_exports = {};
|
|
643
688
|
__export(data_exports, {
|
|
644
689
|
clear: () => clear,
|
|
@@ -697,7 +742,7 @@ var ko = (() => {
|
|
|
697
742
|
return dataForNode[key] || (dataForNode[key] = value2);
|
|
698
743
|
}
|
|
699
744
|
|
|
700
|
-
// ../../packages/utils/
|
|
745
|
+
// ../../packages/utils/src/dom/disposal.ts
|
|
701
746
|
var domDataKey = nextKey();
|
|
702
747
|
var cleanableNodeTypes = { 1: true, 8: true, 9: true };
|
|
703
748
|
var cleanableNodeTypesWithDescendants = { 1: true, 9: true };
|
|
@@ -799,7 +844,7 @@ var ko = (() => {
|
|
|
799
844
|
}
|
|
800
845
|
otherNodeCleanerFunctions.push(cleanjQueryData);
|
|
801
846
|
|
|
802
|
-
// ../../packages/utils/
|
|
847
|
+
// ../../packages/utils/src/dom/manipulation.ts
|
|
803
848
|
function moveCleanedNodesToContainerElement(nodes) {
|
|
804
849
|
const nodesArray = makeArray(nodes);
|
|
805
850
|
const templateDocument = nodesArray[0] && nodesArray[0].ownerDocument || document;
|
|
@@ -844,7 +889,7 @@ var ko = (() => {
|
|
|
844
889
|
}
|
|
845
890
|
}
|
|
846
891
|
|
|
847
|
-
// ../../packages/utils/
|
|
892
|
+
// ../../packages/utils/src/dom/fixes.ts
|
|
848
893
|
function fixUpContinuousNodeArray(continuousNodeArray, parentNode) {
|
|
849
894
|
if (continuousNodeArray.length) {
|
|
850
895
|
parentNode = parentNode.nodeType === Node.COMMENT_NODE && parentNode.parentNode || parentNode;
|
|
@@ -870,7 +915,7 @@ var ko = (() => {
|
|
|
870
915
|
optionNode.selected = isSelected;
|
|
871
916
|
}
|
|
872
917
|
|
|
873
|
-
// ../../packages/utils/
|
|
918
|
+
// ../../packages/utils/src/dom/virtualElements.ts
|
|
874
919
|
var virtualElements_exports = {};
|
|
875
920
|
__export(virtualElements_exports, {
|
|
876
921
|
allowedBindings: () => allowedBindings,
|
|
@@ -1099,7 +1144,7 @@ var ko = (() => {
|
|
|
1099
1144
|
}
|
|
1100
1145
|
}
|
|
1101
1146
|
|
|
1102
|
-
// ../../packages/utils/
|
|
1147
|
+
// ../../packages/utils/src/dom/html.ts
|
|
1103
1148
|
var supportsTemplateTag = options_default.useTemplateTag && options_default.document && "content" in options_default.document.createElement("template");
|
|
1104
1149
|
function simpleHtmlParse(html2, documentContext) {
|
|
1105
1150
|
if (!documentContext) {
|
|
@@ -1195,7 +1240,7 @@ var ko = (() => {
|
|
|
1195
1240
|
}
|
|
1196
1241
|
}
|
|
1197
1242
|
|
|
1198
|
-
// ../../packages/utils/
|
|
1243
|
+
// ../../packages/utils/src/dom/selectExtensions.ts
|
|
1199
1244
|
var hasDomDataExpandoProperty = /* @__PURE__ */ Symbol("Knockout selectExtensions hasDomDataProperty");
|
|
1200
1245
|
var selectExtensions = {
|
|
1201
1246
|
optionValueDomDataKey: nextKey(),
|
|
@@ -1241,10 +1286,10 @@ var ko = (() => {
|
|
|
1241
1286
|
const selectElement = element;
|
|
1242
1287
|
for (let i = 0, n = selectElement.options.length, optionValue; i < n; ++i) {
|
|
1243
1288
|
optionValue = selectExtensions.readValue(selectElement.options[i]);
|
|
1244
|
-
const
|
|
1289
|
+
const strictEqual2 = optionValue === value2;
|
|
1245
1290
|
const blankEqual = optionValue === "" && value2 === void 0;
|
|
1246
1291
|
const numericEqual = typeof value2 === "number" && Number(optionValue) === value2;
|
|
1247
|
-
if (
|
|
1292
|
+
if (strictEqual2 || blankEqual || numericEqual) {
|
|
1248
1293
|
selection = i;
|
|
1249
1294
|
break;
|
|
1250
1295
|
}
|
|
@@ -1265,7 +1310,7 @@ var ko = (() => {
|
|
|
1265
1310
|
}
|
|
1266
1311
|
};
|
|
1267
1312
|
|
|
1268
|
-
// ../../packages/utils/
|
|
1313
|
+
// ../../packages/utils/src/memoization.ts
|
|
1269
1314
|
var memoization_exports = {};
|
|
1270
1315
|
__export(memoization_exports, {
|
|
1271
1316
|
memoize: () => memoize,
|
|
@@ -1340,7 +1385,7 @@ var ko = (() => {
|
|
|
1340
1385
|
return match ? match[1] : null;
|
|
1341
1386
|
}
|
|
1342
1387
|
|
|
1343
|
-
// ../../packages/utils/
|
|
1388
|
+
// ../../packages/utils/src/tasks.ts
|
|
1344
1389
|
var tasks_exports = {};
|
|
1345
1390
|
__export(tasks_exports, {
|
|
1346
1391
|
cancel: () => cancel,
|
|
@@ -1352,19 +1397,27 @@ var ko = (() => {
|
|
|
1352
1397
|
var taskQueueLength = 0;
|
|
1353
1398
|
var nextHandle = 1;
|
|
1354
1399
|
var nextIndexToProcess = 0;
|
|
1355
|
-
var
|
|
1356
|
-
if (
|
|
1357
|
-
options_default.taskScheduler = (
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1400
|
+
var schedulerGlobal = options_default.global;
|
|
1401
|
+
if (schedulerGlobal && typeof schedulerGlobal.queueMicrotask === "function") {
|
|
1402
|
+
options_default.taskScheduler = (callback) => schedulerGlobal.queueMicrotask(callback);
|
|
1403
|
+
} else if (schedulerGlobal && schedulerGlobal.MutationObserver && schedulerGlobal.document && !(schedulerGlobal.navigator && schedulerGlobal.navigator.standalone)) {
|
|
1404
|
+
options_default.taskScheduler = (function() {
|
|
1405
|
+
let scheduledCallback = null;
|
|
1406
|
+
let toggle = false;
|
|
1407
|
+
const div2 = schedulerGlobal.document.createElement("div");
|
|
1408
|
+
new schedulerGlobal.MutationObserver(function() {
|
|
1409
|
+
const callback = scheduledCallback;
|
|
1410
|
+
scheduledCallback = null;
|
|
1411
|
+
callback == null ? void 0 : callback();
|
|
1412
|
+
}).observe(div2, { attributes: true });
|
|
1413
|
+
return function(callback) {
|
|
1414
|
+
scheduledCallback = callback;
|
|
1415
|
+
toggle = !toggle;
|
|
1416
|
+
div2.setAttribute("data-task-scheduler", toggle ? "1" : "0");
|
|
1362
1417
|
};
|
|
1363
|
-
})(
|
|
1418
|
+
})();
|
|
1364
1419
|
} else {
|
|
1365
|
-
options_default.taskScheduler =
|
|
1366
|
-
setTimeout(callback, 0);
|
|
1367
|
-
};
|
|
1420
|
+
options_default.taskScheduler = (callback) => setTimeout(callback, 0);
|
|
1368
1421
|
}
|
|
1369
1422
|
function processTasks() {
|
|
1370
1423
|
if (taskQueueLength) {
|
|
@@ -1414,7 +1467,7 @@ var ko = (() => {
|
|
|
1414
1467
|
return length;
|
|
1415
1468
|
}
|
|
1416
1469
|
|
|
1417
|
-
// ../../packages/observable/
|
|
1470
|
+
// ../../packages/observable/src/dependencyDetection.ts
|
|
1418
1471
|
var dependencyDetection_exports = {};
|
|
1419
1472
|
__export(dependencyDetection_exports, {
|
|
1420
1473
|
begin: () => begin,
|
|
@@ -1427,13 +1480,13 @@ var ko = (() => {
|
|
|
1427
1480
|
registerDependency: () => registerDependency
|
|
1428
1481
|
});
|
|
1429
1482
|
|
|
1430
|
-
// ../../packages/observable/
|
|
1483
|
+
// ../../packages/observable/src/subscribableSymbol.ts
|
|
1431
1484
|
var SUBSCRIBABLE_SYM = /* @__PURE__ */ Symbol("Knockout Subscribable");
|
|
1432
1485
|
function isSubscribable(instance) {
|
|
1433
1486
|
return instance && instance[SUBSCRIBABLE_SYM] || false;
|
|
1434
1487
|
}
|
|
1435
1488
|
|
|
1436
|
-
// ../../packages/observable/
|
|
1489
|
+
// ../../packages/observable/src/dependencyDetection.ts
|
|
1437
1490
|
var outerFrames = new Array();
|
|
1438
1491
|
var currentFrame;
|
|
1439
1492
|
var lastId = 0;
|
|
@@ -1486,7 +1539,7 @@ var ko = (() => {
|
|
|
1486
1539
|
return void 0;
|
|
1487
1540
|
}
|
|
1488
1541
|
|
|
1489
|
-
// ../../packages/observable/
|
|
1542
|
+
// ../../packages/observable/src/defer.ts
|
|
1490
1543
|
function deferUpdates(target) {
|
|
1491
1544
|
if (target._deferUpdates) {
|
|
1492
1545
|
return;
|
|
@@ -1510,9 +1563,15 @@ var ko = (() => {
|
|
|
1510
1563
|
});
|
|
1511
1564
|
}
|
|
1512
1565
|
|
|
1513
|
-
// ../../packages/observable/
|
|
1566
|
+
// ../../packages/observable/src/Subscription.ts
|
|
1514
1567
|
var Subscription = class {
|
|
1515
1568
|
constructor(target, observer, disposeCallback) {
|
|
1569
|
+
__publicField(this, "_disposeCallback");
|
|
1570
|
+
__publicField(this, "_target");
|
|
1571
|
+
__publicField(this, "_callback");
|
|
1572
|
+
__publicField(this, "_isDisposed");
|
|
1573
|
+
__publicField(this, "_domNodeDisposalCallback");
|
|
1574
|
+
__publicField(this, "_node");
|
|
1516
1575
|
this._target = target;
|
|
1517
1576
|
this._callback = observer.next;
|
|
1518
1577
|
this._disposeCallback = disposeCallback;
|
|
@@ -1539,7 +1598,7 @@ var ko = (() => {
|
|
|
1539
1598
|
}
|
|
1540
1599
|
};
|
|
1541
1600
|
|
|
1542
|
-
// ../../packages/observable/
|
|
1601
|
+
// ../../packages/observable/src/extenders.ts
|
|
1543
1602
|
var primitiveTypes = { undefined: 1, boolean: 1, number: 1, string: 1 };
|
|
1544
1603
|
function valuesArePrimitiveAndEqual(a, b) {
|
|
1545
1604
|
const oldValueIsPrimitive = a === null || typeof a in primitiveTypes;
|
|
@@ -1570,13 +1629,13 @@ var ko = (() => {
|
|
|
1570
1629
|
}
|
|
1571
1630
|
deferUpdates(target);
|
|
1572
1631
|
}
|
|
1573
|
-
function rateLimit(target,
|
|
1632
|
+
function rateLimit(target, options3) {
|
|
1574
1633
|
let timeout, method, limitFunction;
|
|
1575
|
-
if (typeof
|
|
1576
|
-
timeout =
|
|
1634
|
+
if (typeof options3 === "number") {
|
|
1635
|
+
timeout = options3;
|
|
1577
1636
|
} else {
|
|
1578
|
-
timeout =
|
|
1579
|
-
method =
|
|
1637
|
+
timeout = options3.timeout;
|
|
1638
|
+
method = options3.method;
|
|
1580
1639
|
}
|
|
1581
1640
|
target._deferUpdates = false;
|
|
1582
1641
|
limitFunction = method === "notifyWhenChangesStop" ? debounce : throttle;
|
|
@@ -1586,7 +1645,7 @@ var ko = (() => {
|
|
|
1586
1645
|
}
|
|
1587
1646
|
var extenders = { notify, deferred, rateLimit };
|
|
1588
1647
|
|
|
1589
|
-
// ../../packages/observable/
|
|
1648
|
+
// ../../packages/observable/src/subscribable.ts
|
|
1590
1649
|
var LATEST_VALUE = /* @__PURE__ */ Symbol("Knockout latest value");
|
|
1591
1650
|
if (!Symbol.observable) {
|
|
1592
1651
|
Symbol.observable = /* @__PURE__ */ Symbol.for("@tko/Symbol.observable");
|
|
@@ -1712,7 +1771,7 @@ var ko = (() => {
|
|
|
1712
1771
|
Object.setPrototypeOf(ko_subscribable_fn, Function.prototype);
|
|
1713
1772
|
subscribable.fn = ko_subscribable_fn;
|
|
1714
1773
|
|
|
1715
|
-
// ../../packages/observable/
|
|
1774
|
+
// ../../packages/observable/src/observable.ts
|
|
1716
1775
|
function observable(initialValue) {
|
|
1717
1776
|
function Observable() {
|
|
1718
1777
|
if (arguments.length > 0) {
|
|
@@ -1771,8 +1830,8 @@ var ko = (() => {
|
|
|
1771
1830
|
* @param peek Whether to use the current value without creating a dependency.
|
|
1772
1831
|
* @returns The modified observable.
|
|
1773
1832
|
*/
|
|
1774
|
-
modify(fn,
|
|
1775
|
-
this(fn(
|
|
1833
|
+
modify(fn, peek3 = true) {
|
|
1834
|
+
this(fn(peek3 ? this.peek() : this()));
|
|
1776
1835
|
},
|
|
1777
1836
|
// Some observables may not always be writeable, notably computeds.
|
|
1778
1837
|
isWriteable: true
|
|
@@ -1856,7 +1915,7 @@ var ko = (() => {
|
|
|
1856
1915
|
return isObservable(instance) && instance.isWriteable;
|
|
1857
1916
|
}
|
|
1858
1917
|
|
|
1859
|
-
// ../../packages/observable/
|
|
1918
|
+
// ../../packages/observable/src/observableArray.changeTracking.ts
|
|
1860
1919
|
var arrayChangeEventName = "arrayChange";
|
|
1861
1920
|
function trackArrayChanges(target, options3) {
|
|
1862
1921
|
target.compareArrayOptions = {};
|
|
@@ -1941,6 +2000,7 @@ var ko = (() => {
|
|
|
1941
2000
|
return diff[diff.length] = { status, value: value2, index };
|
|
1942
2001
|
}
|
|
1943
2002
|
switch (operationName) {
|
|
2003
|
+
// biome-ignore lint/suspicious/noFallthroughSwitchClause: push sets offset then falls through to unshift
|
|
1944
2004
|
case "push":
|
|
1945
2005
|
offset = arrayLength;
|
|
1946
2006
|
case "unshift":
|
|
@@ -1948,6 +2008,7 @@ var ko = (() => {
|
|
|
1948
2008
|
pushDiff("added", args[index], offset + index);
|
|
1949
2009
|
}
|
|
1950
2010
|
break;
|
|
2011
|
+
// biome-ignore lint/suspicious/noFallthroughSwitchClause: pop sets offset then falls through to shift
|
|
1951
2012
|
case "pop":
|
|
1952
2013
|
offset = arrayLength - 1;
|
|
1953
2014
|
case "shift":
|
|
@@ -1978,7 +2039,7 @@ var ko = (() => {
|
|
|
1978
2039
|
trackArrayChanges.compareArrays = compareArrays;
|
|
1979
2040
|
extenders.trackArrayChanges = trackArrayChanges;
|
|
1980
2041
|
|
|
1981
|
-
// ../../packages/observable/
|
|
2042
|
+
// ../../packages/observable/src/observableArray.ts
|
|
1982
2043
|
function observableArray(initialValues) {
|
|
1983
2044
|
initialValues = initialValues || [];
|
|
1984
2045
|
if (typeof initialValues !== "object" || !("length" in initialValues)) {
|
|
@@ -2106,7 +2167,7 @@ var ko = (() => {
|
|
|
2106
2167
|
});
|
|
2107
2168
|
observableArray.trackArrayChanges = trackArrayChanges;
|
|
2108
2169
|
|
|
2109
|
-
// ../../packages/observable/
|
|
2170
|
+
// ../../packages/observable/src/mappingHelpers.ts
|
|
2110
2171
|
var maxNestedObservableDepth = 10;
|
|
2111
2172
|
function toJS(rootObject) {
|
|
2112
2173
|
if (arguments.length == 0) {
|
|
@@ -2166,7 +2227,7 @@ var ko = (() => {
|
|
|
2166
2227
|
}
|
|
2167
2228
|
}
|
|
2168
2229
|
|
|
2169
|
-
// ../../packages/utils.parser/
|
|
2230
|
+
// ../../packages/utils.parser/src/operators.ts
|
|
2170
2231
|
function LAMBDA() {
|
|
2171
2232
|
}
|
|
2172
2233
|
function unwrapOrCall(a, b) {
|
|
@@ -2175,6 +2236,22 @@ var ko = (() => {
|
|
|
2175
2236
|
}
|
|
2176
2237
|
return b;
|
|
2177
2238
|
}
|
|
2239
|
+
function looseEqual(a, b) {
|
|
2240
|
+
return a == b;
|
|
2241
|
+
}
|
|
2242
|
+
looseEqual.precedence = 10;
|
|
2243
|
+
function looseNotEqual(a, b) {
|
|
2244
|
+
return a != b;
|
|
2245
|
+
}
|
|
2246
|
+
looseNotEqual.precedence = 10;
|
|
2247
|
+
function strictEqual(a, b) {
|
|
2248
|
+
return a === b;
|
|
2249
|
+
}
|
|
2250
|
+
strictEqual.precedence = 10;
|
|
2251
|
+
function strictNotEqual(a, b) {
|
|
2252
|
+
return a !== b;
|
|
2253
|
+
}
|
|
2254
|
+
strictNotEqual.precedence = 10;
|
|
2178
2255
|
var operators = {
|
|
2179
2256
|
// unary
|
|
2180
2257
|
"@": unwrapOrCall,
|
|
@@ -2234,19 +2311,11 @@ var ko = (() => {
|
|
|
2234
2311
|
// TODO: 'in': function (a, b) { return a in b; },
|
|
2235
2312
|
// TODO: 'instanceof': function (a, b) { return a instanceof b; },
|
|
2236
2313
|
// TODO: 'typeof': function (a, b) { return typeof b; },
|
|
2237
|
-
// equality
|
|
2238
|
-
"==":
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
"
|
|
2242
|
-
return a != b;
|
|
2243
|
-
},
|
|
2244
|
-
"===": function sequal(a, b) {
|
|
2245
|
-
return a === b;
|
|
2246
|
-
},
|
|
2247
|
-
"!==": function sne(a, b) {
|
|
2248
|
-
return a !== b;
|
|
2249
|
-
},
|
|
2314
|
+
// equality — default loose; set options.strictEquality = true for === behavior
|
|
2315
|
+
"==": looseEqual,
|
|
2316
|
+
"!=": looseNotEqual,
|
|
2317
|
+
"===": strictEqual,
|
|
2318
|
+
"!==": strictNotEqual,
|
|
2250
2319
|
// bitwise
|
|
2251
2320
|
"&": function bitAnd(a, b) {
|
|
2252
2321
|
return a & b;
|
|
@@ -2323,11 +2392,21 @@ var ko = (() => {
|
|
|
2323
2392
|
operators[","].precedence = 2;
|
|
2324
2393
|
operators["call"].precedence = 1;
|
|
2325
2394
|
operators["=>"].precedence = 1;
|
|
2395
|
+
defineOption("strictEquality", {
|
|
2396
|
+
default: false,
|
|
2397
|
+
set(strict) {
|
|
2398
|
+
operators["=="] = strict ? strictEqual : looseEqual;
|
|
2399
|
+
operators["!="] = strict ? strictNotEqual : looseNotEqual;
|
|
2400
|
+
}
|
|
2401
|
+
});
|
|
2326
2402
|
|
|
2327
|
-
// ../../packages/utils.parser/
|
|
2403
|
+
// ../../packages/utils.parser/src/Node.ts
|
|
2328
2404
|
var IS_EXPR_OR_IDENT = /* @__PURE__ */ Symbol("Node - Is Expression Or Identifier");
|
|
2329
2405
|
var Node2 = class _Node {
|
|
2330
2406
|
constructor(lhs, op, rhs) {
|
|
2407
|
+
__publicField(this, "lhs");
|
|
2408
|
+
__publicField(this, "op");
|
|
2409
|
+
__publicField(this, "rhs");
|
|
2331
2410
|
this.lhs = lhs;
|
|
2332
2411
|
this.op = op;
|
|
2333
2412
|
this.rhs = rhs;
|
|
@@ -2357,23 +2436,22 @@ var ko = (() => {
|
|
|
2357
2436
|
* the lambda is called.
|
|
2358
2437
|
*/
|
|
2359
2438
|
get_value(notused, context, globals, node) {
|
|
2360
|
-
|
|
2361
|
-
if (node.op === LAMBDA) {
|
|
2439
|
+
if (this.op === LAMBDA) {
|
|
2362
2440
|
return (...args) => {
|
|
2363
2441
|
let lambdaContext = context;
|
|
2364
|
-
if (
|
|
2365
|
-
lambdaContext =
|
|
2442
|
+
if (this.lhs) {
|
|
2443
|
+
lambdaContext = this.lhs.extendContext(context, args);
|
|
2366
2444
|
}
|
|
2367
|
-
return
|
|
2445
|
+
return this.get_leaf_value(this.rhs, lambdaContext, globals, this);
|
|
2368
2446
|
};
|
|
2369
2447
|
}
|
|
2370
|
-
const lhv =
|
|
2371
|
-
const earlyOut =
|
|
2448
|
+
const lhv = this.get_leaf_value(this.lhs, context, globals, this);
|
|
2449
|
+
const earlyOut = this.op.earlyOut;
|
|
2372
2450
|
if (earlyOut && earlyOut(lhv)) {
|
|
2373
2451
|
return lhv;
|
|
2374
2452
|
}
|
|
2375
|
-
const rhv =
|
|
2376
|
-
return
|
|
2453
|
+
const rhv = this.get_leaf_value(this.rhs, context, globals, this);
|
|
2454
|
+
return this.op(lhv, rhv, context, globals);
|
|
2377
2455
|
}
|
|
2378
2456
|
//
|
|
2379
2457
|
// Class variables.
|
|
@@ -2421,9 +2499,11 @@ var ko = (() => {
|
|
|
2421
2499
|
};
|
|
2422
2500
|
operators["?"].precedence = 4;
|
|
2423
2501
|
|
|
2424
|
-
// ../../packages/utils.parser/
|
|
2502
|
+
// ../../packages/utils.parser/src/Expression.ts
|
|
2425
2503
|
var Expression = class {
|
|
2426
2504
|
constructor(nodes) {
|
|
2505
|
+
__publicField(this, "nodes");
|
|
2506
|
+
__publicField(this, "root");
|
|
2427
2507
|
this.nodes = nodes;
|
|
2428
2508
|
this.root = Node2.create_root(nodes);
|
|
2429
2509
|
}
|
|
@@ -2439,9 +2519,11 @@ var ko = (() => {
|
|
|
2439
2519
|
};
|
|
2440
2520
|
Expression.prototype[Node2.isExpressionOrIdentifierSymbol] = true;
|
|
2441
2521
|
|
|
2442
|
-
// ../../packages/utils.parser/
|
|
2522
|
+
// ../../packages/utils.parser/src/Arguments.ts
|
|
2443
2523
|
var Arguments = class {
|
|
2444
2524
|
constructor(parser, args) {
|
|
2525
|
+
__publicField(this, "parser");
|
|
2526
|
+
__publicField(this, "args");
|
|
2445
2527
|
this.parser = parser;
|
|
2446
2528
|
this.args = args;
|
|
2447
2529
|
}
|
|
@@ -2457,13 +2539,16 @@ var ko = (() => {
|
|
|
2457
2539
|
}
|
|
2458
2540
|
};
|
|
2459
2541
|
|
|
2460
|
-
// ../../packages/utils.parser/
|
|
2542
|
+
// ../../packages/utils.parser/src/identifierExpressions.ts
|
|
2461
2543
|
var IDStart = /[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/;
|
|
2462
2544
|
var IDContinue = /[\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/;
|
|
2463
2545
|
|
|
2464
|
-
// ../../packages/utils.parser/
|
|
2546
|
+
// ../../packages/utils.parser/src/Identifier.ts
|
|
2465
2547
|
var Identifier = class _Identifier {
|
|
2466
2548
|
constructor(parser, token, dereferences) {
|
|
2549
|
+
__publicField(this, "token");
|
|
2550
|
+
__publicField(this, "dereferences");
|
|
2551
|
+
__publicField(this, "parser");
|
|
2467
2552
|
this.token = token;
|
|
2468
2553
|
this.dereferences = dereferences;
|
|
2469
2554
|
this.parser = parser;
|
|
@@ -2601,7 +2686,7 @@ var ko = (() => {
|
|
|
2601
2686
|
}
|
|
2602
2687
|
};
|
|
2603
2688
|
|
|
2604
|
-
// ../../packages/utils.parser/
|
|
2689
|
+
// ../../packages/utils.parser/src/Parameters.ts
|
|
2605
2690
|
var _names;
|
|
2606
2691
|
var _Parameters = class _Parameters {
|
|
2607
2692
|
constructor(parser, node) {
|
|
@@ -2654,9 +2739,11 @@ var ko = (() => {
|
|
|
2654
2739
|
_names = new WeakMap();
|
|
2655
2740
|
var Parameters = _Parameters;
|
|
2656
2741
|
|
|
2657
|
-
// ../../packages/utils.parser/
|
|
2742
|
+
// ../../packages/utils.parser/src/Ternary.ts
|
|
2658
2743
|
var Ternary = class {
|
|
2659
2744
|
constructor(yes, no) {
|
|
2745
|
+
__publicField(this, "yes");
|
|
2746
|
+
__publicField(this, "no");
|
|
2660
2747
|
Object.assign(this, { yes, no });
|
|
2661
2748
|
}
|
|
2662
2749
|
get_value() {
|
|
@@ -2667,7 +2754,7 @@ var ko = (() => {
|
|
|
2667
2754
|
}
|
|
2668
2755
|
};
|
|
2669
2756
|
|
|
2670
|
-
// ../../packages/utils.parser/
|
|
2757
|
+
// ../../packages/utils.parser/src/Parser.ts
|
|
2671
2758
|
var escapee = {
|
|
2672
2759
|
"'": "'",
|
|
2673
2760
|
'"': '"',
|
|
@@ -2682,6 +2769,12 @@ var ko = (() => {
|
|
|
2682
2769
|
t: " "
|
|
2683
2770
|
};
|
|
2684
2771
|
var Parser = class {
|
|
2772
|
+
constructor() {
|
|
2773
|
+
__publicField(this, "ch");
|
|
2774
|
+
__publicField(this, "at");
|
|
2775
|
+
__publicField(this, "text");
|
|
2776
|
+
__publicField(this, "currentContextGlobals");
|
|
2777
|
+
}
|
|
2685
2778
|
white() {
|
|
2686
2779
|
let ch = this.ch;
|
|
2687
2780
|
while (ch && ch <= " ") {
|
|
@@ -3150,7 +3243,7 @@ ${name} ${msg} of ${this.text}
|
|
|
3150
3243
|
}
|
|
3151
3244
|
/**
|
|
3152
3245
|
* Use this method to parse expressions that can be followed by additional markup
|
|
3153
|
-
*
|
|
3246
|
+
* separated by a comma, such as in bindings strings.
|
|
3154
3247
|
*
|
|
3155
3248
|
* @returns an expression that cannot contain multiple values separated by commas.
|
|
3156
3249
|
* @see {@link Parser.expression}
|
|
@@ -3351,13 +3444,13 @@ ${name} ${msg} of ${this.text}
|
|
|
3351
3444
|
objectForEach(result, (name, value2) => {
|
|
3352
3445
|
if (value2 instanceof Identifier) {
|
|
3353
3446
|
Object.defineProperty(result, name, {
|
|
3354
|
-
value: function(optionalValue,
|
|
3447
|
+
value: function(optionalValue, options3) {
|
|
3355
3448
|
const currentValue = value2.get_value(void 0, context, globals, node);
|
|
3356
3449
|
if (arguments.length === 0) {
|
|
3357
3450
|
return currentValue;
|
|
3358
3451
|
}
|
|
3359
3452
|
const unchanged = optionalValue === currentValue;
|
|
3360
|
-
if (
|
|
3453
|
+
if (options3 && options3.onlyIfChanged && unchanged) {
|
|
3361
3454
|
return;
|
|
3362
3455
|
}
|
|
3363
3456
|
return value2.set_value(optionalValue, context, globals);
|
|
@@ -3416,7 +3509,7 @@ ${name} ${msg} of ${this.text}
|
|
|
3416
3509
|
}
|
|
3417
3510
|
};
|
|
3418
3511
|
|
|
3419
|
-
// ../../packages/utils.parser/
|
|
3512
|
+
// ../../packages/utils.parser/src/preparse.ts
|
|
3420
3513
|
var specials = ",\"'`{}()/:[\\]";
|
|
3421
3514
|
var bindingToken = RegExp(
|
|
3422
3515
|
[
|
|
@@ -3492,7 +3585,7 @@ ${name} ${msg} of ${this.text}
|
|
|
3492
3585
|
return result;
|
|
3493
3586
|
}
|
|
3494
3587
|
|
|
3495
|
-
// ../../packages/computed/
|
|
3588
|
+
// ../../packages/computed/src/computed.ts
|
|
3496
3589
|
var computedState = createSymbolOrString("_state");
|
|
3497
3590
|
var DISPOSED_STATE = {
|
|
3498
3591
|
dependencyTracking: null,
|
|
@@ -3505,19 +3598,19 @@ ${name} ${msg} of ${this.text}
|
|
|
3505
3598
|
readFunction: null,
|
|
3506
3599
|
_options: null
|
|
3507
3600
|
};
|
|
3508
|
-
function computed(evaluatorFunctionOrOptions, evaluatorFunctionTarget,
|
|
3601
|
+
function computed(evaluatorFunctionOrOptions, evaluatorFunctionTarget, options3) {
|
|
3509
3602
|
if (typeof evaluatorFunctionOrOptions === "object") {
|
|
3510
|
-
|
|
3603
|
+
options3 = evaluatorFunctionOrOptions;
|
|
3511
3604
|
} else {
|
|
3512
|
-
|
|
3605
|
+
options3 = options3 || {};
|
|
3513
3606
|
if (evaluatorFunctionOrOptions) {
|
|
3514
|
-
|
|
3607
|
+
options3.read = evaluatorFunctionOrOptions;
|
|
3515
3608
|
}
|
|
3516
3609
|
}
|
|
3517
|
-
if (typeof (
|
|
3610
|
+
if (typeof (options3 == null ? void 0 : options3.read) !== "function") {
|
|
3518
3611
|
throw Error("Pass a function that returns the value of the computed");
|
|
3519
3612
|
}
|
|
3520
|
-
const writeFunction =
|
|
3613
|
+
const writeFunction = options3.write;
|
|
3521
3614
|
const state = {
|
|
3522
3615
|
latestValue: void 0,
|
|
3523
3616
|
isStale: true,
|
|
@@ -3527,10 +3620,10 @@ ${name} ${msg} of ${this.text}
|
|
|
3527
3620
|
isDisposed: false,
|
|
3528
3621
|
pure: false,
|
|
3529
3622
|
isSleeping: false,
|
|
3530
|
-
readFunction:
|
|
3531
|
-
evaluatorFunctionTarget: evaluatorFunctionTarget ||
|
|
3532
|
-
disposeWhenNodeIsRemoved:
|
|
3533
|
-
disposeWhen:
|
|
3623
|
+
readFunction: options3.read,
|
|
3624
|
+
evaluatorFunctionTarget: evaluatorFunctionTarget || options3.owner,
|
|
3625
|
+
disposeWhenNodeIsRemoved: options3.disposeWhenNodeIsRemoved || null,
|
|
3626
|
+
disposeWhen: options3.disposeWhen,
|
|
3534
3627
|
domNodeDisposalCallback: null,
|
|
3535
3628
|
dependencyTracking: {},
|
|
3536
3629
|
dependenciesCount: 0,
|
|
@@ -3561,18 +3654,18 @@ ${name} ${msg} of ${this.text}
|
|
|
3561
3654
|
computedObservable.isWriteable = typeof writeFunction === "function";
|
|
3562
3655
|
subscribable.fn.init(computedObservable);
|
|
3563
3656
|
Object.setPrototypeOf(computedObservable, computed.fn);
|
|
3564
|
-
if (
|
|
3657
|
+
if (options3.pure) {
|
|
3565
3658
|
state.pure = true;
|
|
3566
3659
|
state.isSleeping = true;
|
|
3567
3660
|
extend(computedObservable, pureComputedOverrides);
|
|
3568
|
-
} else if (
|
|
3661
|
+
} else if (options3.deferEvaluation) {
|
|
3569
3662
|
extend(computedObservable, deferEvaluationOverrides);
|
|
3570
3663
|
}
|
|
3571
3664
|
if (options_default.deferUpdates) {
|
|
3572
3665
|
extenders.deferred(computedObservable, true);
|
|
3573
3666
|
}
|
|
3574
3667
|
if (options_default.debug) {
|
|
3575
|
-
computedObservable._options =
|
|
3668
|
+
computedObservable._options = options3;
|
|
3576
3669
|
}
|
|
3577
3670
|
if (state.disposeWhenNodeIsRemoved) {
|
|
3578
3671
|
state.suppressDisposalUntilDisposeWhenReturnsFalse = true;
|
|
@@ -3580,7 +3673,7 @@ ${name} ${msg} of ${this.text}
|
|
|
3580
3673
|
state.disposeWhenNodeIsRemoved = null;
|
|
3581
3674
|
}
|
|
3582
3675
|
}
|
|
3583
|
-
if (!state.isSleeping && !
|
|
3676
|
+
if (!state.isSleeping && !options3.deferEvaluation) {
|
|
3584
3677
|
;
|
|
3585
3678
|
computedObservable.evaluateImmediate();
|
|
3586
3679
|
}
|
|
@@ -3708,7 +3801,7 @@ ${name} ${msg} of ${this.text}
|
|
|
3708
3801
|
}
|
|
3709
3802
|
},
|
|
3710
3803
|
evaluateImmediate(notifyChange) {
|
|
3711
|
-
let
|
|
3804
|
+
let state = this[computedState], disposeWhen = state.disposeWhen, changed = false;
|
|
3712
3805
|
if (state.isBeingEvaluated) {
|
|
3713
3806
|
return;
|
|
3714
3807
|
}
|
|
@@ -3717,7 +3810,7 @@ ${name} ${msg} of ${this.text}
|
|
|
3717
3810
|
}
|
|
3718
3811
|
if (state.disposeWhenNodeIsRemoved && !domNodeIsAttachedToDocument(state.disposeWhenNodeIsRemoved) || disposeWhen && disposeWhen()) {
|
|
3719
3812
|
if (!state.suppressDisposalUntilDisposeWhenReturnsFalse) {
|
|
3720
|
-
|
|
3813
|
+
this.dispose();
|
|
3721
3814
|
return;
|
|
3722
3815
|
}
|
|
3723
3816
|
} else {
|
|
@@ -3732,47 +3825,47 @@ ${name} ${msg} of ${this.text}
|
|
|
3732
3825
|
return changed;
|
|
3733
3826
|
},
|
|
3734
3827
|
evaluateImmediate_CallReadWithDependencyDetection(notifyChange) {
|
|
3735
|
-
let
|
|
3828
|
+
let state = this[computedState], changed = false;
|
|
3736
3829
|
const isInitial2 = state.pure ? void 0 : !state.dependenciesCount, dependencyDetectionContext = {
|
|
3737
|
-
computedObservable,
|
|
3830
|
+
computedObservable: this,
|
|
3738
3831
|
disposalCandidates: state.dependencyTracking,
|
|
3739
3832
|
disposalCount: state.dependenciesCount
|
|
3740
3833
|
};
|
|
3741
3834
|
dependencyDetection_exports.begin({
|
|
3742
3835
|
callbackTarget: dependencyDetectionContext,
|
|
3743
3836
|
callback: computedBeginDependencyDetectionCallback,
|
|
3744
|
-
computed:
|
|
3837
|
+
computed: this,
|
|
3745
3838
|
isInitial: isInitial2
|
|
3746
3839
|
});
|
|
3747
3840
|
state.dependencyTracking = {};
|
|
3748
3841
|
state.dependenciesCount = 0;
|
|
3749
3842
|
const newValue = this.evaluateImmediate_CallReadThenEndDependencyDetection(state, dependencyDetectionContext);
|
|
3750
3843
|
if (!state.dependenciesCount) {
|
|
3751
|
-
|
|
3844
|
+
this.dispose();
|
|
3752
3845
|
changed = true;
|
|
3753
3846
|
} else {
|
|
3754
|
-
changed =
|
|
3847
|
+
changed = this.isDifferent(state.latestValue, newValue);
|
|
3755
3848
|
}
|
|
3756
3849
|
if (changed) {
|
|
3757
3850
|
if (!state.isSleeping) {
|
|
3758
|
-
|
|
3851
|
+
this.notifySubscribers(state.latestValue, "beforeChange");
|
|
3759
3852
|
} else {
|
|
3760
|
-
|
|
3853
|
+
this.updateVersion();
|
|
3761
3854
|
}
|
|
3762
3855
|
state.latestValue = newValue;
|
|
3763
3856
|
if (options_default.debug) {
|
|
3764
|
-
|
|
3857
|
+
this._latestValue = newValue;
|
|
3765
3858
|
}
|
|
3766
|
-
|
|
3859
|
+
this.notifySubscribers(state.latestValue, "spectate");
|
|
3767
3860
|
if (!state.isSleeping && notifyChange) {
|
|
3768
|
-
|
|
3861
|
+
this.notifySubscribers(state.latestValue);
|
|
3769
3862
|
}
|
|
3770
|
-
if (
|
|
3771
|
-
|
|
3863
|
+
if (this._recordUpdate) {
|
|
3864
|
+
this._recordUpdate();
|
|
3772
3865
|
}
|
|
3773
3866
|
}
|
|
3774
3867
|
if (isInitial2) {
|
|
3775
|
-
|
|
3868
|
+
this.notifySubscribers(state.latestValue, "awake");
|
|
3776
3869
|
}
|
|
3777
3870
|
return changed;
|
|
3778
3871
|
},
|
|
@@ -3921,17 +4014,17 @@ ${name} ${msg} of ${this.text}
|
|
|
3921
4014
|
const evaluator = evaluatorFunctionOrOptions;
|
|
3922
4015
|
return computed(evaluator, evaluatorFunctionTarget, { pure: true });
|
|
3923
4016
|
} else {
|
|
3924
|
-
let
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
return computed(
|
|
4017
|
+
let options3 = evaluatorFunctionOrOptions;
|
|
4018
|
+
options3 = extend({}, options3);
|
|
4019
|
+
options3.pure = true;
|
|
4020
|
+
return computed(options3, evaluatorFunctionTarget);
|
|
3928
4021
|
}
|
|
3929
4022
|
}
|
|
3930
4023
|
|
|
3931
|
-
// ../../packages/computed/
|
|
4024
|
+
// ../../packages/computed/src/throttleExtender.ts
|
|
3932
4025
|
function throttleExtender(target, timeout) {
|
|
3933
4026
|
target.throttleEvaluation = timeout;
|
|
3934
|
-
let writeTimeoutInstance
|
|
4027
|
+
let writeTimeoutInstance;
|
|
3935
4028
|
return computed({
|
|
3936
4029
|
read: target,
|
|
3937
4030
|
write: function(value2) {
|
|
@@ -3945,7 +4038,7 @@ ${name} ${msg} of ${this.text}
|
|
|
3945
4038
|
var extenders2 = extenders;
|
|
3946
4039
|
extenders2.throttle = throttleExtender;
|
|
3947
4040
|
|
|
3948
|
-
// ../../packages/computed/
|
|
4041
|
+
// ../../packages/computed/src/proxy.ts
|
|
3949
4042
|
var PROXY_SYM = /* @__PURE__ */ Symbol("Knockout Proxied Object");
|
|
3950
4043
|
var MIRROR_SYM = /* @__PURE__ */ Symbol("Knockout Proxied Observables");
|
|
3951
4044
|
function makeComputed(proxy2, fn) {
|
|
@@ -4031,7 +4124,7 @@ ${name} ${msg} of ${this.text}
|
|
|
4031
4124
|
}
|
|
4032
4125
|
Object.assign(proxy, { getObservable, peek: peek2, isProxied });
|
|
4033
4126
|
|
|
4034
|
-
// ../../packages/computed/
|
|
4127
|
+
// ../../packages/computed/src/when.ts
|
|
4035
4128
|
function kowhen(predicate, context, resolve) {
|
|
4036
4129
|
const observable2 = pureComputed(predicate, context).extend({ notify: "always" });
|
|
4037
4130
|
const subscription = observable2.subscribe((value2) => {
|
|
@@ -4048,7 +4141,7 @@ ${name} ${msg} of ${this.text}
|
|
|
4048
4141
|
return callback ? whenFn(callback.bind(context)) : new Promise(whenFn);
|
|
4049
4142
|
}
|
|
4050
4143
|
|
|
4051
|
-
// ../../packages/lifecycle/
|
|
4144
|
+
// ../../packages/lifecycle/src/LifeCycle.ts
|
|
4052
4145
|
var SUBSCRIPTIONS = createSymbolOrString("LifeCycle Subscriptions List");
|
|
4053
4146
|
var ANCHOR_NODE = createSymbolOrString("LifeCycle Anchor Node");
|
|
4054
4147
|
var LifeCycle = class _LifeCycle {
|
|
@@ -4139,7 +4232,7 @@ ${name} ${msg} of ${this.text}
|
|
|
4139
4232
|
}
|
|
4140
4233
|
};
|
|
4141
4234
|
|
|
4142
|
-
// ../../packages/bind/
|
|
4235
|
+
// ../../packages/bind/src/bindingEvent.ts
|
|
4143
4236
|
var contextAncestorBindingInfo = /* @__PURE__ */ Symbol("_ancestorBindingInfo");
|
|
4144
4237
|
var boundElementDomDataKey = data_exports.nextKey();
|
|
4145
4238
|
var bindingEvent = {
|
|
@@ -4164,7 +4257,7 @@ ${name} ${msg} of ${this.text}
|
|
|
4164
4257
|
}
|
|
4165
4258
|
};
|
|
4166
4259
|
|
|
4167
|
-
// ../../packages/bind/
|
|
4260
|
+
// ../../packages/bind/src/bindingContext.ts
|
|
4168
4261
|
var boundElementDomDataKey2 = data_exports.nextKey();
|
|
4169
4262
|
var contextSubscribeSymbol = /* @__PURE__ */ Symbol("Knockout Context Subscription");
|
|
4170
4263
|
var inheritParentIndicator = /* @__PURE__ */ Symbol("Knockout Parent Indicator");
|
|
@@ -4290,9 +4383,14 @@ ${name} ${msg} of ${this.text}
|
|
|
4290
4383
|
return context ? context.$data : void 0;
|
|
4291
4384
|
}
|
|
4292
4385
|
|
|
4293
|
-
// ../../packages/bind/
|
|
4386
|
+
// ../../packages/bind/src/BindingResult.ts
|
|
4294
4387
|
var BindingResult = class {
|
|
4295
4388
|
constructor({ asyncBindingsApplied, rootNode, bindingContext: bindingContext2 }) {
|
|
4389
|
+
__publicField(this, "isSync");
|
|
4390
|
+
__publicField(this, "isComplete");
|
|
4391
|
+
__publicField(this, "completionPromise");
|
|
4392
|
+
__publicField(this, "rootNode");
|
|
4393
|
+
__publicField(this, "bindingContext");
|
|
4296
4394
|
this.rootNode = rootNode;
|
|
4297
4395
|
this.bindingContext = bindingContext2;
|
|
4298
4396
|
this.isSync = asyncBindingsApplied.size === 0;
|
|
@@ -4310,10 +4408,23 @@ ${name} ${msg} of ${this.text}
|
|
|
4310
4408
|
}
|
|
4311
4409
|
};
|
|
4312
4410
|
|
|
4313
|
-
// ../../packages/bind/
|
|
4411
|
+
// ../../packages/bind/src/BindingHandler.ts
|
|
4314
4412
|
var BindingHandler = class extends LifeCycle {
|
|
4315
4413
|
constructor(params) {
|
|
4316
4414
|
super();
|
|
4415
|
+
__publicField(this, "after");
|
|
4416
|
+
__publicField(this, "init");
|
|
4417
|
+
__publicField(this, "update");
|
|
4418
|
+
__publicField(this, "options");
|
|
4419
|
+
__publicField(this, "preprocess");
|
|
4420
|
+
__publicField(this, "$context");
|
|
4421
|
+
// most likly BindingContext but params must be typed first
|
|
4422
|
+
__publicField(this, "$element");
|
|
4423
|
+
__publicField(this, "$data");
|
|
4424
|
+
__publicField(this, "bindingCompletion");
|
|
4425
|
+
__publicField(this, "valueAccessor");
|
|
4426
|
+
__publicField(this, "completeBinding");
|
|
4427
|
+
__publicField(this, "allBindings");
|
|
4317
4428
|
const { $element, valueAccessor, allBindings, $context } = params;
|
|
4318
4429
|
this.$element = $element;
|
|
4319
4430
|
this.valueAccessor = valueAccessor;
|
|
@@ -4372,15 +4483,14 @@ ${name} ${msg} of ${this.text}
|
|
|
4372
4483
|
}
|
|
4373
4484
|
};
|
|
4374
4485
|
|
|
4375
|
-
// ../../packages/bind/
|
|
4486
|
+
// ../../packages/bind/src/LegacyBindingHandler.ts
|
|
4376
4487
|
var PossibleWeakMap = options_default.global.WeakMap || Map;
|
|
4377
4488
|
var legacyBindingMap = new PossibleWeakMap();
|
|
4378
4489
|
var LegacyBindingHandler = class _LegacyBindingHandler extends BindingHandler {
|
|
4379
|
-
get handler() {
|
|
4380
|
-
return void 0;
|
|
4381
|
-
}
|
|
4382
4490
|
constructor(params) {
|
|
4383
4491
|
super(params);
|
|
4492
|
+
__publicField(this, "initReturn");
|
|
4493
|
+
__publicField(this, "onError");
|
|
4384
4494
|
const handler = this.handler;
|
|
4385
4495
|
this.onError = params.onError;
|
|
4386
4496
|
if (typeof handler.dispose === "function") {
|
|
@@ -4392,6 +4502,9 @@ ${name} ${msg} of ${this.text}
|
|
|
4392
4502
|
params.onError("init", e);
|
|
4393
4503
|
}
|
|
4394
4504
|
}
|
|
4505
|
+
get handler() {
|
|
4506
|
+
return void 0;
|
|
4507
|
+
}
|
|
4395
4508
|
onValueChange() {
|
|
4396
4509
|
const handler = this.handler;
|
|
4397
4510
|
if (typeof handler.update !== "function") {
|
|
@@ -4461,7 +4574,7 @@ ${name} ${msg} of ${this.text}
|
|
|
4461
4574
|
}
|
|
4462
4575
|
};
|
|
4463
4576
|
|
|
4464
|
-
// ../../packages/bind/
|
|
4577
|
+
// ../../packages/bind/src/applyBindings.ts
|
|
4465
4578
|
var bindingDoesNotRecurseIntoElementTypes = {
|
|
4466
4579
|
// Don't want bindings that operate on text nodes to mutate <script> and <textarea> contents,
|
|
4467
4580
|
// because it's unexpected and a potential XSS issue.
|
|
@@ -4531,7 +4644,8 @@ ${name} ${msg} of ${this.text}
|
|
|
4531
4644
|
if (isElement) {
|
|
4532
4645
|
virtualElements_exports.normaliseVirtualElementDomStructure(nodeVerified);
|
|
4533
4646
|
}
|
|
4534
|
-
const shouldApplyBindings = isElement ||
|
|
4647
|
+
const shouldApplyBindings = isElement || // Case (1)
|
|
4648
|
+
hasBindings(nodeVerified);
|
|
4535
4649
|
const { shouldBindDescendants } = shouldApplyBindings ? applyBindingsToNodeInternal(nodeVerified, null, bindingContext2, asyncBindingsApplied) : { shouldBindDescendants: true };
|
|
4536
4650
|
if (shouldBindDescendants && !bindingDoesNotRecurseIntoElementTypes[tagNameLower(nodeVerified)]) {
|
|
4537
4651
|
applyBindingsToDescendantsInternal(bindingContext2, nodeVerified, asyncBindingsApplied);
|
|
@@ -4790,7 +4904,7 @@ ${name} ${msg} of ${this.text}
|
|
|
4790
4904
|
options_default.onError(error);
|
|
4791
4905
|
}
|
|
4792
4906
|
|
|
4793
|
-
// ../../packages/bind/
|
|
4907
|
+
// ../../packages/bind/src/arrayToDomNodeChildren.ts
|
|
4794
4908
|
function mapNodeAndRefreshWhenChanged(containerNode, mapping, valueToMap, callbackAfterAddingNodes, index) {
|
|
4795
4909
|
const mappedNodes = [];
|
|
4796
4910
|
const dependentObservable = computed(
|
|
@@ -4958,7 +5072,7 @@ ${name} ${msg} of ${this.text}
|
|
|
4958
5072
|
callCallback(options3.afterAdd, itemsForAfterAddCallbacks);
|
|
4959
5073
|
}
|
|
4960
5074
|
|
|
4961
|
-
// ../../packages/bind/
|
|
5075
|
+
// ../../packages/bind/src/DescendantBindingHandler.ts
|
|
4962
5076
|
var DescendantBindingHandler = class extends AsyncBindingHandler {
|
|
4963
5077
|
get controlsDescendants() {
|
|
4964
5078
|
return true;
|
|
@@ -4979,7 +5093,7 @@ ${name} ${msg} of ${this.text}
|
|
|
4979
5093
|
}
|
|
4980
5094
|
};
|
|
4981
5095
|
|
|
4982
|
-
// ../../packages/binding.template/
|
|
5096
|
+
// ../../packages/binding.template/src/templateSources.ts
|
|
4983
5097
|
var templateScript = 1;
|
|
4984
5098
|
var templateTextArea = 2;
|
|
4985
5099
|
var templateTemplate = 3;
|
|
@@ -4995,6 +5109,8 @@ ${name} ${msg} of ${this.text}
|
|
|
4995
5109
|
}
|
|
4996
5110
|
var domElement = class {
|
|
4997
5111
|
constructor(element) {
|
|
5112
|
+
__publicField(this, "domElement");
|
|
5113
|
+
__publicField(this, "templateType");
|
|
4998
5114
|
this.domElement = element;
|
|
4999
5115
|
if (element.nodeType === Node.COMMENT_NODE) {
|
|
5000
5116
|
this.templateType = templateElement;
|
|
@@ -5063,12 +5179,12 @@ ${name} ${msg} of ${this.text}
|
|
|
5063
5179
|
}
|
|
5064
5180
|
};
|
|
5065
5181
|
|
|
5066
|
-
// ../../packages/binding.template/
|
|
5182
|
+
// ../../packages/binding.template/src/templateEngine.ts
|
|
5067
5183
|
function templateEngine() {
|
|
5068
5184
|
}
|
|
5069
5185
|
extend(templateEngine.prototype, {
|
|
5070
|
-
renderTemplateSource(templateSource, bindingContext2,
|
|
5071
|
-
|
|
5186
|
+
renderTemplateSource(templateSource, bindingContext2, options3, templateDocument) {
|
|
5187
|
+
options3.onError("Override renderTemplateSource");
|
|
5072
5188
|
},
|
|
5073
5189
|
createJavaScriptEvaluatorBlock(script) {
|
|
5074
5190
|
options_default.onError(new Error("Override createJavaScriptEvaluatorBlock"));
|
|
@@ -5089,13 +5205,13 @@ ${name} ${msg} of ${this.text}
|
|
|
5089
5205
|
throw options_default.onError(new Error("Unknown template type: " + template), false);
|
|
5090
5206
|
}
|
|
5091
5207
|
},
|
|
5092
|
-
renderTemplate(template, bindingContext2,
|
|
5208
|
+
renderTemplate(template, bindingContext2, options3, templateDocument) {
|
|
5093
5209
|
const templateSource = this.makeTemplateSource(template, templateDocument);
|
|
5094
|
-
return this.renderTemplateSource(templateSource, bindingContext2,
|
|
5210
|
+
return this.renderTemplateSource(templateSource, bindingContext2, options3, templateDocument);
|
|
5095
5211
|
}
|
|
5096
5212
|
});
|
|
5097
5213
|
|
|
5098
|
-
// ../../packages/binding.template/
|
|
5214
|
+
// ../../packages/binding.template/src/templating.ts
|
|
5099
5215
|
var _templateEngine;
|
|
5100
5216
|
var cleanContainerDomDataKey = data_exports.nextKey();
|
|
5101
5217
|
function setTemplateEngine(tEngine) {
|
|
@@ -5430,7 +5546,7 @@ ${name} ${msg} of ${this.text}
|
|
|
5430
5546
|
}
|
|
5431
5547
|
};
|
|
5432
5548
|
|
|
5433
|
-
// ../../packages/binding.template/
|
|
5549
|
+
// ../../packages/binding.template/src/nativeTemplateEngine.ts
|
|
5434
5550
|
function nativeTemplateEngine() {
|
|
5435
5551
|
}
|
|
5436
5552
|
nativeTemplateEngine.prototype = new templateEngine();
|
|
@@ -5447,7 +5563,7 @@ ${name} ${msg} of ${this.text}
|
|
|
5447
5563
|
nativeTemplateEngine.instance = new nativeTemplateEngine();
|
|
5448
5564
|
setTemplateEngine(nativeTemplateEngine.instance);
|
|
5449
5565
|
|
|
5450
|
-
// ../../packages/binding.template/
|
|
5566
|
+
// ../../packages/binding.template/src/foreach.ts
|
|
5451
5567
|
var TemplateForEachBindingHandler = class extends TemplateBindingHandler {
|
|
5452
5568
|
get value() {
|
|
5453
5569
|
const modelValue = this.valueAccessor();
|
|
@@ -5470,10 +5586,10 @@ ${name} ${msg} of ${this.text}
|
|
|
5470
5586
|
}
|
|
5471
5587
|
};
|
|
5472
5588
|
|
|
5473
|
-
// ../../packages/binding.template/
|
|
5589
|
+
// ../../packages/binding.template/src/index.ts
|
|
5474
5590
|
var bindings = { foreach: TemplateForEachBindingHandler, template: TemplateBindingHandler };
|
|
5475
5591
|
|
|
5476
|
-
// ../../packages/builder/
|
|
5592
|
+
// ../../packages/builder/src/Builder.ts
|
|
5477
5593
|
var domNodeDisposal = {
|
|
5478
5594
|
addDisposeCallback,
|
|
5479
5595
|
removeDisposeCallback,
|
|
@@ -5574,8 +5690,9 @@ ${name} ${msg} of ${this.text}
|
|
|
5574
5690
|
bindingEvent
|
|
5575
5691
|
};
|
|
5576
5692
|
var Builder = class {
|
|
5577
|
-
constructor({ provider: provider2, bindings: bindings6, extenders: extenders3, filters: filters2, options:
|
|
5578
|
-
|
|
5693
|
+
constructor({ provider: provider2, bindings: bindings6, extenders: extenders3, filters: filters2, options: options3 }) {
|
|
5694
|
+
__publicField(this, "providedProperties");
|
|
5695
|
+
Object.assign(knockout.options, options3, { filters: filters2, bindingProviderInstance: provider2 });
|
|
5579
5696
|
provider2.setGlobals(knockout.options.bindingGlobals);
|
|
5580
5697
|
if (Array.isArray(bindings6)) {
|
|
5581
5698
|
for (const bindingsObject of bindings6) {
|
|
@@ -5613,7 +5730,7 @@ ${name} ${msg} of ${this.text}
|
|
|
5613
5730
|
}
|
|
5614
5731
|
};
|
|
5615
5732
|
|
|
5616
|
-
// ../../packages/provider/
|
|
5733
|
+
// ../../packages/provider/src/BindingHandlerObject.ts
|
|
5617
5734
|
var BindingHandlerObject = class {
|
|
5618
5735
|
set(nameOrObject, value2) {
|
|
5619
5736
|
if (typeof nameOrObject === "string") {
|
|
@@ -5641,9 +5758,12 @@ ${name} ${msg} of ${this.text}
|
|
|
5641
5758
|
}
|
|
5642
5759
|
};
|
|
5643
5760
|
|
|
5644
|
-
// ../../packages/provider/
|
|
5761
|
+
// ../../packages/provider/src/Provider.ts
|
|
5645
5762
|
var Provider = class _Provider {
|
|
5646
5763
|
constructor(params) {
|
|
5764
|
+
__publicField(this, "bindingHandlers");
|
|
5765
|
+
__publicField(this, "globals");
|
|
5766
|
+
__publicField(this, "_overloadInstance");
|
|
5647
5767
|
if (this.constructor === _Provider) {
|
|
5648
5768
|
throw new Error("Provider is an abstract base class.");
|
|
5649
5769
|
}
|
|
@@ -5712,14 +5832,15 @@ ${name} ${msg} of ${this.text}
|
|
|
5712
5832
|
}
|
|
5713
5833
|
};
|
|
5714
5834
|
var LegacyProvider = class extends Provider {
|
|
5715
|
-
get FOR_NODE_TYPES() {
|
|
5716
|
-
return [Node.ELEMENT_NODE, Node.TEXT_NODE, Node.COMMENT_NODE];
|
|
5717
|
-
}
|
|
5718
5835
|
constructor(providerObject, parentProvider) {
|
|
5719
5836
|
super();
|
|
5837
|
+
__publicField(this, "providerObject");
|
|
5720
5838
|
Object.assign(this, { providerObject });
|
|
5721
5839
|
this.bindingHandlers = providerObject.bindingHandlers || parentProvider.bindingHandlers;
|
|
5722
5840
|
}
|
|
5841
|
+
get FOR_NODE_TYPES() {
|
|
5842
|
+
return [Node.ELEMENT_NODE, Node.TEXT_NODE, Node.COMMENT_NODE];
|
|
5843
|
+
}
|
|
5723
5844
|
// This function is used if the binding provider doesn't include a getBindingAccessors function.
|
|
5724
5845
|
// It must be called with 'this' set to the provider instance.
|
|
5725
5846
|
getBindingsAndMakeAccessors(node, context) {
|
|
@@ -5740,7 +5861,7 @@ ${name} ${msg} of ${this.text}
|
|
|
5740
5861
|
}
|
|
5741
5862
|
};
|
|
5742
5863
|
|
|
5743
|
-
// ../../packages/provider.bindingstring/
|
|
5864
|
+
// ../../packages/provider.bindingstring/src/BindingStringProvider.ts
|
|
5744
5865
|
var BindingStringProvider = class extends Provider {
|
|
5745
5866
|
/** Call bindingHandler.preprocess on each respective binding string.
|
|
5746
5867
|
*
|
|
@@ -5754,8 +5875,8 @@ ${name} ${msg} of ${this.text}
|
|
|
5754
5875
|
const bindingsAddedByHandler = new Array();
|
|
5755
5876
|
const chainFn = (...args) => bindingsAddedByHandler.push(args);
|
|
5756
5877
|
value2 = handler.preprocess(value2, key, chainFn);
|
|
5757
|
-
for (const [key2,
|
|
5758
|
-
yield* __yieldStar(this.processBinding(key2,
|
|
5878
|
+
for (const [key2, value3] of bindingsAddedByHandler) {
|
|
5879
|
+
yield* __yieldStar(this.processBinding(key2, value3));
|
|
5759
5880
|
}
|
|
5760
5881
|
} else if (property) {
|
|
5761
5882
|
value2 = `{${property}:${value2}}`;
|
|
@@ -5784,7 +5905,7 @@ ${name} ${msg} of ${this.text}
|
|
|
5784
5905
|
}
|
|
5785
5906
|
};
|
|
5786
5907
|
|
|
5787
|
-
// ../../packages/provider.virtual/
|
|
5908
|
+
// ../../packages/provider.virtual/src/VirtualProvider.ts
|
|
5788
5909
|
var VirtualProvider = class extends BindingStringProvider {
|
|
5789
5910
|
get FOR_NODE_TYPES() {
|
|
5790
5911
|
return [Node.ELEMENT_NODE, Node.COMMENT_NODE];
|
|
@@ -5829,7 +5950,7 @@ ${name} ${msg} of ${this.text}
|
|
|
5829
5950
|
}
|
|
5830
5951
|
};
|
|
5831
5952
|
|
|
5832
|
-
// ../../packages/provider.databind/
|
|
5953
|
+
// ../../packages/provider.databind/src/DataBindProvider.ts
|
|
5833
5954
|
var DataBindProvider = class extends BindingStringProvider {
|
|
5834
5955
|
get FOR_NODE_TYPES() {
|
|
5835
5956
|
return [Node.ELEMENT_NODE];
|
|
@@ -5851,7 +5972,7 @@ ${name} ${msg} of ${this.text}
|
|
|
5851
5972
|
}
|
|
5852
5973
|
};
|
|
5853
5974
|
|
|
5854
|
-
// ../../packages/utils.component/
|
|
5975
|
+
// ../../packages/utils.component/src/registry.ts
|
|
5855
5976
|
var loadingSubscribablesCache = {};
|
|
5856
5977
|
var loadedDefinitionsCache = {};
|
|
5857
5978
|
function loadComponentAndNotify(componentName, callback) {
|
|
@@ -5946,7 +6067,7 @@ ${name} ${msg} of ${this.text}
|
|
|
5946
6067
|
loaders: new Array()
|
|
5947
6068
|
};
|
|
5948
6069
|
|
|
5949
|
-
// ../../packages/utils.component/
|
|
6070
|
+
// ../../packages/utils.component/src/loaders.ts
|
|
5950
6071
|
var defaultConfigRegistry = {};
|
|
5951
6072
|
var VIEW_MODEL_FACTORY = /* @__PURE__ */ Symbol("Knockout View Model ViewModel factory");
|
|
5952
6073
|
function register(componentName, config) {
|
|
@@ -6099,7 +6220,7 @@ ${name} ${msg} of ${this.text}
|
|
|
6099
6220
|
}
|
|
6100
6221
|
registry.loaders.push(defaultLoader);
|
|
6101
6222
|
|
|
6102
|
-
// ../../packages/utils.component/
|
|
6223
|
+
// ../../packages/utils.component/src/ComponentABC.ts
|
|
6103
6224
|
var ComponentABC = class extends LifeCycle {
|
|
6104
6225
|
/**
|
|
6105
6226
|
* The tag name of the custom element. For example 'my-component'.
|
|
@@ -6119,7 +6240,7 @@ ${name} ${msg} of ${this.text}
|
|
|
6119
6240
|
*/
|
|
6120
6241
|
static get template() {
|
|
6121
6242
|
if ("template" in this.prototype) {
|
|
6122
|
-
return;
|
|
6243
|
+
return void 0;
|
|
6123
6244
|
}
|
|
6124
6245
|
return { element: this.element };
|
|
6125
6246
|
}
|
|
@@ -6155,8 +6276,8 @@ ${name} ${msg} of ${this.text}
|
|
|
6155
6276
|
}
|
|
6156
6277
|
};
|
|
6157
6278
|
|
|
6158
|
-
// ../../packages/utils.component/
|
|
6159
|
-
var
|
|
6279
|
+
// ../../packages/utils.component/src/index.ts
|
|
6280
|
+
var src_default = {
|
|
6160
6281
|
ComponentABC,
|
|
6161
6282
|
// -- Registry --
|
|
6162
6283
|
get: registry.get,
|
|
@@ -6176,7 +6297,7 @@ ${name} ${msg} of ${this.text}
|
|
|
6176
6297
|
}
|
|
6177
6298
|
};
|
|
6178
6299
|
|
|
6179
|
-
// ../../packages/provider.component/
|
|
6300
|
+
// ../../packages/provider.component/src/ComponentProvider.ts
|
|
6180
6301
|
var ComponentProvider = class extends Provider {
|
|
6181
6302
|
get FOR_NODE_TYPES() {
|
|
6182
6303
|
return [Node.ELEMENT_NODE];
|
|
@@ -6217,7 +6338,7 @@ ${name} ${msg} of ${this.text}
|
|
|
6217
6338
|
return null;
|
|
6218
6339
|
}
|
|
6219
6340
|
const tagName = tagNameLower(node);
|
|
6220
|
-
if (
|
|
6341
|
+
if (src_default.isRegistered(tagName)) {
|
|
6221
6342
|
const hasDash = tagName.includes("-");
|
|
6222
6343
|
const isUnknownEntity = "" + node === "[object HTMLUnknownElement]";
|
|
6223
6344
|
if (hasDash || isUnknownEntity) {
|
|
@@ -6254,7 +6375,7 @@ ${name} ${msg} of ${this.text}
|
|
|
6254
6375
|
}
|
|
6255
6376
|
};
|
|
6256
6377
|
|
|
6257
|
-
// ../../packages/provider.attr/
|
|
6378
|
+
// ../../packages/provider.attr/src/AttributeProvider.ts
|
|
6258
6379
|
var AttrProvider = class extends Provider {
|
|
6259
6380
|
get FOR_NODE_TYPES() {
|
|
6260
6381
|
return [Node.ELEMENT_NODE];
|
|
@@ -6306,23 +6427,26 @@ ${name} ${msg} of ${this.text}
|
|
|
6306
6427
|
if (token in this.globals) {
|
|
6307
6428
|
return this.globals[token];
|
|
6308
6429
|
}
|
|
6309
|
-
throw new Error(`The variable '${token} not found.`);
|
|
6430
|
+
throw new Error(`The variable '${token}' not found.`);
|
|
6310
6431
|
}
|
|
6311
6432
|
};
|
|
6312
6433
|
|
|
6313
|
-
// ../../packages/provider.multi/
|
|
6434
|
+
// ../../packages/provider.multi/src/MultiProvider.ts
|
|
6314
6435
|
var MultiProvider = class extends Provider {
|
|
6315
|
-
get FOR_NODE_TYPES() {
|
|
6316
|
-
return this.nodeTypes;
|
|
6317
|
-
}
|
|
6318
6436
|
constructor(params) {
|
|
6319
6437
|
super(params);
|
|
6438
|
+
__publicField(this, "nodeTypes");
|
|
6439
|
+
__publicField(this, "nodeTypeMap");
|
|
6440
|
+
__publicField(this, "providers");
|
|
6320
6441
|
const providers = (params == null ? void 0 : params.providers) || [];
|
|
6321
6442
|
this.nodeTypeMap = {};
|
|
6322
6443
|
this.nodeTypes = [];
|
|
6323
6444
|
this.providers = [];
|
|
6324
6445
|
providers.forEach((p) => this.addProvider(p));
|
|
6325
6446
|
}
|
|
6447
|
+
get FOR_NODE_TYPES() {
|
|
6448
|
+
return this.nodeTypes;
|
|
6449
|
+
}
|
|
6326
6450
|
setGlobals(globals) {
|
|
6327
6451
|
;
|
|
6328
6452
|
[this, ...this.providers].forEach((p) => p.globals = globals);
|
|
@@ -6379,7 +6503,7 @@ ${name} ${msg} of ${this.text}
|
|
|
6379
6503
|
}
|
|
6380
6504
|
};
|
|
6381
6505
|
|
|
6382
|
-
// ../../packages/binding.core/
|
|
6506
|
+
// ../../packages/binding.core/src/attr.ts
|
|
6383
6507
|
var attr = {
|
|
6384
6508
|
update: function(element, valueAccessor, _allBindings) {
|
|
6385
6509
|
const value2 = unwrap(valueAccessor()) || {};
|
|
@@ -6409,7 +6533,7 @@ ${name} ${msg} of ${this.text}
|
|
|
6409
6533
|
}
|
|
6410
6534
|
};
|
|
6411
6535
|
|
|
6412
|
-
// ../../packages/binding.core/
|
|
6536
|
+
// ../../packages/binding.core/src/checked.ts
|
|
6413
6537
|
var checked = {
|
|
6414
6538
|
after: ["value", "attr"],
|
|
6415
6539
|
init: function(element, valueAccessor, allBindings) {
|
|
@@ -6491,7 +6615,7 @@ ${name} ${msg} of ${this.text}
|
|
|
6491
6615
|
}
|
|
6492
6616
|
};
|
|
6493
6617
|
|
|
6494
|
-
// ../../packages/binding.core/
|
|
6618
|
+
// ../../packages/binding.core/src/event.ts
|
|
6495
6619
|
function makeEventHandlerShortcut(eventName) {
|
|
6496
6620
|
return {
|
|
6497
6621
|
init: function(element, valueAccessor, allBindings, viewModel, bindingContext2) {
|
|
@@ -6558,10 +6682,10 @@ ${name} ${msg} of ${this.text}
|
|
|
6558
6682
|
}
|
|
6559
6683
|
};
|
|
6560
6684
|
|
|
6561
|
-
// ../../packages/binding.core/
|
|
6685
|
+
// ../../packages/binding.core/src/click.ts
|
|
6562
6686
|
var click = makeEventHandlerShortcut("click");
|
|
6563
6687
|
|
|
6564
|
-
// ../../packages/binding.core/
|
|
6688
|
+
// ../../packages/binding.core/src/css.ts
|
|
6565
6689
|
var css = {
|
|
6566
6690
|
aliases: ["class"],
|
|
6567
6691
|
update: function(element, valueAccessor) {
|
|
@@ -6581,7 +6705,7 @@ ${name} ${msg} of ${this.text}
|
|
|
6581
6705
|
classesWrittenByBindingKey: createSymbolOrString("__ko__cssValue")
|
|
6582
6706
|
};
|
|
6583
6707
|
|
|
6584
|
-
// ../../packages/binding.core/
|
|
6708
|
+
// ../../packages/binding.core/src/descendantsComplete.ts
|
|
6585
6709
|
var DescendantsCompleteHandler = class extends BindingHandler {
|
|
6586
6710
|
onDescendantsComplete() {
|
|
6587
6711
|
if (typeof this.value === "function") {
|
|
@@ -6593,7 +6717,7 @@ ${name} ${msg} of ${this.text}
|
|
|
6593
6717
|
}
|
|
6594
6718
|
};
|
|
6595
6719
|
|
|
6596
|
-
// ../../packages/binding.core/
|
|
6720
|
+
// ../../packages/binding.core/src/enableDisable.ts
|
|
6597
6721
|
var enable = {
|
|
6598
6722
|
update: function(element, valueAccessor) {
|
|
6599
6723
|
const value2 = unwrap(valueAccessor());
|
|
@@ -6612,7 +6736,7 @@ ${name} ${msg} of ${this.text}
|
|
|
6612
6736
|
}
|
|
6613
6737
|
};
|
|
6614
6738
|
|
|
6615
|
-
// ../../packages/binding.core/
|
|
6739
|
+
// ../../packages/binding.core/src/hasfocus.ts
|
|
6616
6740
|
var hasfocusUpdatingProperty = createSymbolOrString("__ko_hasfocusUpdating");
|
|
6617
6741
|
var hasfocusLastValue = createSymbolOrString("__ko_hasfocusLastValue");
|
|
6618
6742
|
var hasfocus = {
|
|
@@ -6659,7 +6783,7 @@ ${name} ${msg} of ${this.text}
|
|
|
6659
6783
|
}
|
|
6660
6784
|
};
|
|
6661
6785
|
|
|
6662
|
-
// ../../packages/binding.core/
|
|
6786
|
+
// ../../packages/binding.core/src/html.ts
|
|
6663
6787
|
var html = {
|
|
6664
6788
|
init: function() {
|
|
6665
6789
|
return { controlsDescendantBindings: true };
|
|
@@ -6673,7 +6797,7 @@ ${name} ${msg} of ${this.text}
|
|
|
6673
6797
|
allowVirtualElements: true
|
|
6674
6798
|
};
|
|
6675
6799
|
|
|
6676
|
-
// ../../packages/binding.core/
|
|
6800
|
+
// ../../packages/binding.core/src/let.ts
|
|
6677
6801
|
var let_default = {
|
|
6678
6802
|
init: function(element, valueAccessor, _allBindings, _viewModel, bindingContext2) {
|
|
6679
6803
|
const innerContext = bindingContext2["extend"](valueAccessor);
|
|
@@ -6683,7 +6807,7 @@ ${name} ${msg} of ${this.text}
|
|
|
6683
6807
|
allowVirtualElements: true
|
|
6684
6808
|
};
|
|
6685
6809
|
|
|
6686
|
-
// ../../packages/binding.core/
|
|
6810
|
+
// ../../packages/binding.core/src/options.ts
|
|
6687
6811
|
var captionPlaceholder = {};
|
|
6688
6812
|
var options2 = {
|
|
6689
6813
|
init: function(element) {
|
|
@@ -6814,7 +6938,7 @@ ${name} ${msg} of ${this.text}
|
|
|
6814
6938
|
}
|
|
6815
6939
|
};
|
|
6816
6940
|
|
|
6817
|
-
// ../../packages/binding.core/
|
|
6941
|
+
// ../../packages/binding.core/src/selectedOptions.ts
|
|
6818
6942
|
var selectedOptions = {
|
|
6819
6943
|
after: ["options", "foreach"],
|
|
6820
6944
|
init: function(element, valueAccessor, _allBindings) {
|
|
@@ -6845,7 +6969,7 @@ ${name} ${msg} of ${this.text}
|
|
|
6845
6969
|
}
|
|
6846
6970
|
};
|
|
6847
6971
|
|
|
6848
|
-
// ../../packages/binding.core/
|
|
6972
|
+
// ../../packages/binding.core/src/style.ts
|
|
6849
6973
|
var style = {
|
|
6850
6974
|
update: function(element, valueAccessor) {
|
|
6851
6975
|
const value2 = unwrap(valueAccessor() || {});
|
|
@@ -6868,7 +6992,7 @@ ${name} ${msg} of ${this.text}
|
|
|
6868
6992
|
}
|
|
6869
6993
|
};
|
|
6870
6994
|
|
|
6871
|
-
// ../../packages/binding.core/
|
|
6995
|
+
// ../../packages/binding.core/src/submit.ts
|
|
6872
6996
|
var submit = {
|
|
6873
6997
|
init: function(element, valueAccessor, _allBindings, _viewModel, bindingContext2) {
|
|
6874
6998
|
if (typeof valueAccessor() !== "function") {
|
|
@@ -6892,7 +7016,7 @@ ${name} ${msg} of ${this.text}
|
|
|
6892
7016
|
}
|
|
6893
7017
|
};
|
|
6894
7018
|
|
|
6895
|
-
// ../../packages/binding.core/
|
|
7019
|
+
// ../../packages/binding.core/src/text.ts
|
|
6896
7020
|
var text = {
|
|
6897
7021
|
init: function() {
|
|
6898
7022
|
return { controlsDescendantBindings: true };
|
|
@@ -6903,19 +7027,19 @@ ${name} ${msg} of ${this.text}
|
|
|
6903
7027
|
allowVirtualElements: true
|
|
6904
7028
|
};
|
|
6905
7029
|
|
|
6906
|
-
// ../../packages/binding.core/
|
|
7030
|
+
// ../../packages/binding.core/src/textInput.ts
|
|
6907
7031
|
var MSIE_REGEX = /MSIE ([^ ;]+)|rv:([^ )]+)/;
|
|
6908
7032
|
var operaVersion;
|
|
6909
7033
|
var safariVersion;
|
|
6910
7034
|
var firefoxVersion;
|
|
6911
7035
|
var ieVersion;
|
|
6912
7036
|
var TextInput = class extends BindingHandler {
|
|
6913
|
-
get aliases() {
|
|
6914
|
-
return "textinput";
|
|
6915
|
-
}
|
|
6916
7037
|
constructor(...args) {
|
|
6917
7038
|
super(...args);
|
|
6918
|
-
this
|
|
7039
|
+
__publicField(this, "previousElementValue");
|
|
7040
|
+
__publicField(this, "elementValueBeforeEvent");
|
|
7041
|
+
__publicField(this, "timeoutHandle");
|
|
7042
|
+
this.previousElementValue = this.$inputElement.value;
|
|
6919
7043
|
if (options_default.debug && this.constructor._forceUpdateOn) {
|
|
6920
7044
|
arrayForEach(this.constructor._forceUpdateOn, (eventName) => {
|
|
6921
7045
|
if (eventName.slice(0, 5) === "after") {
|
|
@@ -6933,6 +7057,12 @@ ${name} ${msg} of ${this.text}
|
|
|
6933
7057
|
}
|
|
6934
7058
|
this.computed("updateView");
|
|
6935
7059
|
}
|
|
7060
|
+
get aliases() {
|
|
7061
|
+
return "textinput";
|
|
7062
|
+
}
|
|
7063
|
+
get $inputElement() {
|
|
7064
|
+
return this.$element;
|
|
7065
|
+
}
|
|
6936
7066
|
eventsIndicatingSyncValueChange() {
|
|
6937
7067
|
return ["input", "change", "blur"];
|
|
6938
7068
|
}
|
|
@@ -6940,7 +7070,7 @@ ${name} ${msg} of ${this.text}
|
|
|
6940
7070
|
return [];
|
|
6941
7071
|
}
|
|
6942
7072
|
updateModel(event) {
|
|
6943
|
-
const element = this.$
|
|
7073
|
+
const element = this.$inputElement;
|
|
6944
7074
|
clearTimeout(this.timeoutHandle);
|
|
6945
7075
|
this.elementValueBeforeEvent = this.timeoutHandle = void 0;
|
|
6946
7076
|
const elementValue = element.value;
|
|
@@ -6954,7 +7084,7 @@ ${name} ${msg} of ${this.text}
|
|
|
6954
7084
|
}
|
|
6955
7085
|
}
|
|
6956
7086
|
deferUpdateModel(event) {
|
|
6957
|
-
const element = this.$
|
|
7087
|
+
const element = this.$inputElement;
|
|
6958
7088
|
if (!this.timeoutHandle) {
|
|
6959
7089
|
this.elementValueBeforeEvent = element.value;
|
|
6960
7090
|
const handler = options_default.debug ? this.updateModel.bind(this, { type: event.type }) : this.updateModel;
|
|
@@ -6968,10 +7098,10 @@ ${name} ${msg} of ${this.text}
|
|
|
6968
7098
|
}
|
|
6969
7099
|
if (this.elementValueBeforeEvent !== void 0 && modelValue === this.elementValueBeforeEvent) {
|
|
6970
7100
|
setTimeout(this.updateView.bind(this), 4);
|
|
6971
|
-
} else if (this.$
|
|
7101
|
+
} else if (this.$inputElement.value !== modelValue) {
|
|
6972
7102
|
this.previousElementValue = modelValue;
|
|
6973
|
-
this.$
|
|
6974
|
-
this.previousElementValue = this.$
|
|
7103
|
+
this.$inputElement.value = modelValue;
|
|
7104
|
+
this.previousElementValue = this.$inputElement.value;
|
|
6975
7105
|
}
|
|
6976
7106
|
}
|
|
6977
7107
|
};
|
|
@@ -7004,13 +7134,13 @@ ${name} ${msg} of ${this.text}
|
|
|
7004
7134
|
];
|
|
7005
7135
|
}
|
|
7006
7136
|
};
|
|
7007
|
-
var
|
|
7008
|
-
if (
|
|
7137
|
+
var w = options_default.global;
|
|
7138
|
+
if (w.navigator) {
|
|
7009
7139
|
const parseVersion = (matches) => matches && parseFloat(matches[1]);
|
|
7010
|
-
const userAgent =
|
|
7140
|
+
const userAgent = w.navigator.userAgent;
|
|
7011
7141
|
const isChrome = userAgent.match(/Chrome\/([^ ]+)/);
|
|
7012
7142
|
if (!isChrome) {
|
|
7013
|
-
operaVersion =
|
|
7143
|
+
operaVersion = w.opera && w.opera.version && parseInt(w.opera.version());
|
|
7014
7144
|
safariVersion = parseVersion(userAgent.match(/Version\/([^ ]+) Safari/));
|
|
7015
7145
|
firefoxVersion = parseVersion(userAgent.match(/Firefox\/([^ ]*)/));
|
|
7016
7146
|
const ieMatch = userAgent.match(MSIE_REGEX);
|
|
@@ -7019,7 +7149,7 @@ ${name} ${msg} of ${this.text}
|
|
|
7019
7149
|
}
|
|
7020
7150
|
var textInput = ieVersion && ieVersion <= 11 ? TextInputIE : safariVersion && safariVersion < 5 ? TextInputLegacySafari : operaVersion && operaVersion < 11 ? TextInputLegacyOpera : firefoxVersion && firefoxVersion < 4 ? TextInputLegacyFirefox : TextInput;
|
|
7021
7151
|
|
|
7022
|
-
// ../../packages/binding.core/
|
|
7152
|
+
// ../../packages/binding.core/src/uniqueName.ts
|
|
7023
7153
|
var uniqueName = {
|
|
7024
7154
|
init: function(element, valueAccessor) {
|
|
7025
7155
|
if (valueAccessor()) {
|
|
@@ -7030,13 +7160,13 @@ ${name} ${msg} of ${this.text}
|
|
|
7030
7160
|
currentIndex: 0
|
|
7031
7161
|
};
|
|
7032
7162
|
|
|
7033
|
-
// ../../packages/binding.core/
|
|
7163
|
+
// ../../packages/binding.core/src/value.ts
|
|
7034
7164
|
var value = class extends BindingHandler {
|
|
7035
|
-
static get after() {
|
|
7036
|
-
return ["options", "foreach", "template"];
|
|
7037
|
-
}
|
|
7038
7165
|
constructor(...args) {
|
|
7039
7166
|
super(...args);
|
|
7167
|
+
__publicField(this, "elementValueBeforeEvent");
|
|
7168
|
+
__publicField(this, "propertyChangedFired");
|
|
7169
|
+
__publicField(this, "updateFromModel");
|
|
7040
7170
|
if (this.isCheckboxOrRadio) {
|
|
7041
7171
|
applyBindingAccessorsToNode(this.$element, { checkedValue: this.valueAccessor });
|
|
7042
7172
|
return;
|
|
@@ -7046,32 +7176,35 @@ ${name} ${msg} of ${this.text}
|
|
|
7046
7176
|
if (this.ieAutoCompleteHackNeeded) {
|
|
7047
7177
|
this.addEventListener("propertyChange", () => this.propertyChangedFired = true);
|
|
7048
7178
|
this.addEventListener("focus", () => this.propertyChangedFired = false);
|
|
7049
|
-
this.addEventListener("blur", () => this.
|
|
7179
|
+
this.addEventListener("blur", () => this.propertyChangedFired && this.valueUpdateHandler());
|
|
7050
7180
|
}
|
|
7051
7181
|
arrayForEach(this.eventsToCatch, (eventName) => this.registerEvent(eventName));
|
|
7052
|
-
if (this.isInput && this.$element.type === "file") {
|
|
7182
|
+
if (this.isInput(this.$element) && this.$element.type === "file") {
|
|
7053
7183
|
this.updateFromModel = this.updateFromModelForFile;
|
|
7054
7184
|
} else {
|
|
7055
7185
|
this.updateFromModel = this.updateFromModelForValue;
|
|
7056
7186
|
}
|
|
7057
7187
|
this.computed("updateFromModel");
|
|
7058
7188
|
}
|
|
7189
|
+
static get after() {
|
|
7190
|
+
return ["options", "foreach", "template"];
|
|
7191
|
+
}
|
|
7059
7192
|
get eventsToCatch() {
|
|
7060
7193
|
const requestedEventsToCatch = this.allBindings.get("valueUpdate");
|
|
7061
7194
|
const requestedEventsArray = typeof requestedEventsToCatch === "string" ? [requestedEventsToCatch] : requestedEventsToCatch || [];
|
|
7062
7195
|
return [.../* @__PURE__ */ new Set(["change", ...requestedEventsArray])];
|
|
7063
7196
|
}
|
|
7064
|
-
|
|
7197
|
+
isInput(element) {
|
|
7065
7198
|
return tagNameLower(this.$element) === "input";
|
|
7066
7199
|
}
|
|
7067
7200
|
get isCheckboxOrRadio() {
|
|
7068
7201
|
const e = this.$element;
|
|
7069
|
-
return this.isInput && (e.type == "checkbox" || e.type == "radio");
|
|
7202
|
+
return this.isInput(e) && (e.type == "checkbox" || e.type == "radio");
|
|
7070
7203
|
}
|
|
7071
7204
|
// Workaround for https://github.com/SteveSanderson/knockout/issues/122
|
|
7072
7205
|
// IE doesn't fire "change" events on textboxes if the user selects a value from its autocomplete list
|
|
7073
7206
|
get ieAutoCompleteHackNeeded() {
|
|
7074
|
-
return this.isInput && this.$element.type == "text" && this.$element.autocomplete != "off" && (!this.$element.form || this.$element.form.autocomplete != "off") && MSIE_REGEX.test(window.navigator.userAgent);
|
|
7207
|
+
return this.isInput(this.$element) && this.$element.type == "text" && this.$element.autocomplete != "off" && (!this.$element.form || this.$element.form.autocomplete != "off") && MSIE_REGEX.test(window.navigator.userAgent);
|
|
7075
7208
|
}
|
|
7076
7209
|
valueUpdateHandler() {
|
|
7077
7210
|
this.elementValueBeforeEvent = null;
|
|
@@ -7095,6 +7228,7 @@ ${name} ${msg} of ${this.text}
|
|
|
7095
7228
|
updateFromModelForFile() {
|
|
7096
7229
|
const newValue = unwrap(this.value);
|
|
7097
7230
|
if (newValue === null || newValue === void 0 || newValue === "") {
|
|
7231
|
+
;
|
|
7098
7232
|
this.$element.value = "";
|
|
7099
7233
|
} else {
|
|
7100
7234
|
dependencyDetection_exports.ignore(this.valueUpdateHandler, this);
|
|
@@ -7123,7 +7257,7 @@ ${name} ${msg} of ${this.text}
|
|
|
7123
7257
|
}
|
|
7124
7258
|
};
|
|
7125
7259
|
|
|
7126
|
-
// ../../packages/binding.core/
|
|
7260
|
+
// ../../packages/binding.core/src/visible.ts
|
|
7127
7261
|
var visible = {
|
|
7128
7262
|
update: function(element, valueAccessor) {
|
|
7129
7263
|
const value2 = unwrap(valueAccessor());
|
|
@@ -7141,7 +7275,7 @@ ${name} ${msg} of ${this.text}
|
|
|
7141
7275
|
}
|
|
7142
7276
|
};
|
|
7143
7277
|
|
|
7144
|
-
// ../../packages/binding.core/
|
|
7278
|
+
// ../../packages/binding.core/src/using.ts
|
|
7145
7279
|
var using = {
|
|
7146
7280
|
init: function(element, valueAccessor, _allBindings, _viewModel, bindingContext2) {
|
|
7147
7281
|
const innerContext = bindingContext2.createChildContext(valueAccessor);
|
|
@@ -7151,7 +7285,7 @@ ${name} ${msg} of ${this.text}
|
|
|
7151
7285
|
allowVirtualElements: true
|
|
7152
7286
|
};
|
|
7153
7287
|
|
|
7154
|
-
// ../../packages/binding.core/
|
|
7288
|
+
// ../../packages/binding.core/src/index.ts
|
|
7155
7289
|
var bindings2 = {
|
|
7156
7290
|
attr,
|
|
7157
7291
|
checked,
|
|
@@ -7182,17 +7316,20 @@ ${name} ${msg} of ${this.text}
|
|
|
7182
7316
|
visible
|
|
7183
7317
|
};
|
|
7184
7318
|
|
|
7185
|
-
// ../../packages/binding.if/
|
|
7319
|
+
// ../../packages/binding.if/src/ConditionalBindingHandler.ts
|
|
7186
7320
|
var ConditionalBindingHandler = class extends AsyncBindingHandler {
|
|
7187
|
-
get bindingContext() {
|
|
7188
|
-
throw new Error("bindingContext() must be implemented in the child class");
|
|
7189
|
-
}
|
|
7190
7321
|
constructor(params) {
|
|
7191
7322
|
super(params);
|
|
7323
|
+
__publicField(this, "completesElseChain");
|
|
7324
|
+
__publicField(this, "hasElse");
|
|
7325
|
+
__publicField(this, "ifElseNodes");
|
|
7192
7326
|
this.hasElse = this.detectElse(this.$element);
|
|
7193
7327
|
const elseChainSatisfied = this.completesElseChain = observable();
|
|
7194
7328
|
data_exports.set(this.$element, "conditional", { elseChainSatisfied });
|
|
7195
7329
|
}
|
|
7330
|
+
get bindingContext() {
|
|
7331
|
+
throw new Error("bindingContext() must be implemented in the child class");
|
|
7332
|
+
}
|
|
7196
7333
|
getIfElseNodes() {
|
|
7197
7334
|
if (this.ifElseNodes) {
|
|
7198
7335
|
return this.ifElseNodes;
|
|
@@ -7280,10 +7417,11 @@ ${name} ${msg} of ${this.text}
|
|
|
7280
7417
|
}
|
|
7281
7418
|
};
|
|
7282
7419
|
|
|
7283
|
-
// ../../packages/binding.if/
|
|
7420
|
+
// ../../packages/binding.if/src/ifUnless.ts
|
|
7284
7421
|
var IfBindingHandler = class extends ConditionalBindingHandler {
|
|
7285
7422
|
constructor(...args) {
|
|
7286
7423
|
super(...args);
|
|
7424
|
+
__publicField(this, "ifCondition");
|
|
7287
7425
|
this.ifCondition = this.computed(() => !!unwrap(this.value));
|
|
7288
7426
|
this.computed("render");
|
|
7289
7427
|
}
|
|
@@ -7313,10 +7451,12 @@ ${name} ${msg} of ${this.text}
|
|
|
7313
7451
|
}
|
|
7314
7452
|
};
|
|
7315
7453
|
|
|
7316
|
-
// ../../packages/binding.if/
|
|
7454
|
+
// ../../packages/binding.if/src/with.ts
|
|
7317
7455
|
var WithBindingHandler = class extends ConditionalBindingHandler {
|
|
7318
7456
|
constructor(...args) {
|
|
7319
7457
|
super(...args);
|
|
7458
|
+
__publicField(this, "asOption");
|
|
7459
|
+
__publicField(this, "conditional");
|
|
7320
7460
|
this.asOption = this.allBindings.get("as");
|
|
7321
7461
|
const conditionalFn = this.asOption && !options_default.createChildContextWithAs ? () => Boolean(unwrap(this.value)) : () => unwrap(this.value);
|
|
7322
7462
|
this.conditional = this.computed(conditionalFn);
|
|
@@ -7334,8 +7474,12 @@ ${name} ${msg} of ${this.text}
|
|
|
7334
7474
|
}
|
|
7335
7475
|
};
|
|
7336
7476
|
|
|
7337
|
-
// ../../packages/binding.if/
|
|
7477
|
+
// ../../packages/binding.if/src/else.ts
|
|
7338
7478
|
var ElseBindingHandler = class extends IfBindingHandler {
|
|
7479
|
+
constructor() {
|
|
7480
|
+
super(...arguments);
|
|
7481
|
+
__publicField(this, "_elseChain");
|
|
7482
|
+
}
|
|
7339
7483
|
shouldDisplayIf() {
|
|
7340
7484
|
return super.shouldDisplayIf() || this.value === void 0;
|
|
7341
7485
|
}
|
|
@@ -7364,7 +7508,7 @@ ${name} ${msg} of ${this.text}
|
|
|
7364
7508
|
}
|
|
7365
7509
|
};
|
|
7366
7510
|
|
|
7367
|
-
// ../../packages/binding.if/
|
|
7511
|
+
// ../../packages/binding.if/src/index.ts
|
|
7368
7512
|
var bindings3 = {
|
|
7369
7513
|
if: IfBindingHandler,
|
|
7370
7514
|
with: WithBindingHandler,
|
|
@@ -7374,7 +7518,7 @@ ${name} ${msg} of ${this.text}
|
|
|
7374
7518
|
elseif: ElseBindingHandler
|
|
7375
7519
|
};
|
|
7376
7520
|
|
|
7377
|
-
// ../../packages/binding.foreach/
|
|
7521
|
+
// ../../packages/binding.foreach/src/foreach.ts
|
|
7378
7522
|
var MAX_LIST_SIZE = 9007199254740991;
|
|
7379
7523
|
function isPlainObject(o) {
|
|
7380
7524
|
return !!o && typeof o === "object" && o.constructor === Object;
|
|
@@ -7402,10 +7546,33 @@ ${name} ${msg} of ${this.text}
|
|
|
7402
7546
|
return { status: "added", value: value2, index };
|
|
7403
7547
|
}
|
|
7404
7548
|
var PENDING_DELETE_INDEX_SYM = createSymbolOrString("_ko_ffe_pending_delete_index");
|
|
7405
|
-
var
|
|
7549
|
+
var _ForEachBinding = class _ForEachBinding extends AsyncBindingHandler {
|
|
7406
7550
|
constructor(params) {
|
|
7407
7551
|
var _a;
|
|
7408
7552
|
super(params);
|
|
7553
|
+
// NOTE: valid valueAccessors include:
|
|
7554
|
+
// []
|
|
7555
|
+
// observable([])
|
|
7556
|
+
// observableArray([])
|
|
7557
|
+
// computed
|
|
7558
|
+
// {data: array, name: string, as: string}
|
|
7559
|
+
__publicField(this, "afterAdd");
|
|
7560
|
+
__publicField(this, "as");
|
|
7561
|
+
__publicField(this, "beforeRemove");
|
|
7562
|
+
__publicField(this, "container");
|
|
7563
|
+
__publicField(this, "changeSubs");
|
|
7564
|
+
__publicField(this, "data");
|
|
7565
|
+
__publicField(this, "generateContext");
|
|
7566
|
+
__publicField(this, "$indexHasBeenRequested");
|
|
7567
|
+
__publicField(this, "templateNode");
|
|
7568
|
+
__publicField(this, "changeQueue");
|
|
7569
|
+
__publicField(this, "firstLastNodesList");
|
|
7570
|
+
__publicField(this, "indexesToDelete");
|
|
7571
|
+
__publicField(this, "isNotEmpty");
|
|
7572
|
+
__publicField(this, "rendering_queued");
|
|
7573
|
+
__publicField(this, "pendingDeletes");
|
|
7574
|
+
__publicField(this, "afterQueueFlush");
|
|
7575
|
+
__publicField(this, "beforeQueueFlush");
|
|
7409
7576
|
const settings = {};
|
|
7410
7577
|
if (isPlainObject(this.value)) {
|
|
7411
7578
|
Object.assign(settings, this.value);
|
|
@@ -7759,14 +7926,14 @@ ${name} ${msg} of ${this.text}
|
|
|
7759
7926
|
* Useful during testing.
|
|
7760
7927
|
*/
|
|
7761
7928
|
static setSync(toggle) {
|
|
7762
|
-
const
|
|
7929
|
+
const w2 = options_default.global;
|
|
7763
7930
|
if (toggle) {
|
|
7764
7931
|
_ForEachBinding.animateFrame = function(frame) {
|
|
7765
7932
|
frame();
|
|
7766
7933
|
};
|
|
7767
7934
|
} else {
|
|
7768
|
-
_ForEachBinding.animateFrame =
|
|
7769
|
-
return
|
|
7935
|
+
_ForEachBinding.animateFrame = w2.requestAnimationFrame || w2.webkitRequestAnimationFrame || w2.mozRequestAnimationFrame || w2.msRequestAnimationFrame || function(cb) {
|
|
7936
|
+
return w2.setTimeout(cb, 1e3 / 60);
|
|
7770
7937
|
};
|
|
7771
7938
|
}
|
|
7772
7939
|
}
|
|
@@ -7784,12 +7951,14 @@ ${name} ${msg} of ${this.text}
|
|
|
7784
7951
|
return PENDING_DELETE_INDEX_SYM;
|
|
7785
7952
|
}
|
|
7786
7953
|
};
|
|
7954
|
+
__publicField(_ForEachBinding, "animateFrame");
|
|
7955
|
+
var ForEachBinding = _ForEachBinding;
|
|
7787
7956
|
|
|
7788
|
-
// ../../packages/binding.foreach/
|
|
7957
|
+
// ../../packages/binding.foreach/src/index.ts
|
|
7789
7958
|
var bindings4 = { foreach: ForEachBinding };
|
|
7790
7959
|
ForEachBinding.setSync(false);
|
|
7791
7960
|
|
|
7792
|
-
// ../../packages/provider.native/
|
|
7961
|
+
// ../../packages/provider.native/src/NativeProvider.ts
|
|
7793
7962
|
var NATIVE_BINDINGS = /* @__PURE__ */ Symbol("Knockout native bindings");
|
|
7794
7963
|
var NativeProvider = class extends Provider {
|
|
7795
7964
|
get FOR_NODE_TYPES() {
|
|
@@ -7850,7 +8019,7 @@ ${name} ${msg} of ${this.text}
|
|
|
7850
8019
|
}
|
|
7851
8020
|
};
|
|
7852
8021
|
|
|
7853
|
-
// ../../packages/utils.jsx/
|
|
8022
|
+
// ../../packages/utils.jsx/src/jsxClean.ts
|
|
7854
8023
|
var DELAY_MS = 25;
|
|
7855
8024
|
var MAX_CLEAN_AT_ONCE = 1e3;
|
|
7856
8025
|
var cleanNodeQueue = new Array();
|
|
@@ -7873,7 +8042,7 @@ ${name} ${msg} of ${this.text}
|
|
|
7873
8042
|
triggerCleanTimeout();
|
|
7874
8043
|
}
|
|
7875
8044
|
|
|
7876
|
-
// ../../packages/utils.jsx/
|
|
8045
|
+
// ../../packages/utils.jsx/src/JsxObserver.ts
|
|
7877
8046
|
var ORIGINAL_JSX_SYM = /* @__PURE__ */ Symbol("Knockout - Original JSX");
|
|
7878
8047
|
var NAMESPACES = {
|
|
7879
8048
|
svg: "http://www.w3.org/2000/svg",
|
|
@@ -7891,6 +8060,14 @@ ${name} ${msg} of ${this.text}
|
|
|
7891
8060
|
*/
|
|
7892
8061
|
constructor(jsxOrObservable, parentNode, insertBefore = null, xmlns, noInitialBinding) {
|
|
7893
8062
|
super();
|
|
8063
|
+
__publicField(this, "adoptedInsertBefore");
|
|
8064
|
+
__publicField(this, "noInitialBinding");
|
|
8065
|
+
__publicField(this, "insertBefore");
|
|
8066
|
+
__publicField(this, "parentNode");
|
|
8067
|
+
__publicField(this, "parentNodeTarget");
|
|
8068
|
+
__publicField(this, "subscriptionsForNode");
|
|
8069
|
+
__publicField(this, "nodeArrayOrObservableAtIndex");
|
|
8070
|
+
__publicField(this, "xmlns");
|
|
7894
8071
|
const parentNodeIsComment = parentNode.nodeType === Node.COMMENT_NODE;
|
|
7895
8072
|
const parentNodeTarget = this.getParentTarget(parentNode);
|
|
7896
8073
|
if (isObservable(jsxOrObservable)) {
|
|
@@ -8228,7 +8405,7 @@ ${name} ${msg} of ${this.text}
|
|
|
8228
8405
|
};
|
|
8229
8406
|
var JsxObserver_default = JsxObserver;
|
|
8230
8407
|
|
|
8231
|
-
// ../../packages/utils.jsx/
|
|
8408
|
+
// ../../packages/utils.jsx/src/jsx.ts
|
|
8232
8409
|
function maybeJsx(possibleJsx) {
|
|
8233
8410
|
if (isObservable(possibleJsx)) {
|
|
8234
8411
|
return true;
|
|
@@ -8252,11 +8429,17 @@ ${name} ${msg} of ${this.text}
|
|
|
8252
8429
|
return node[ORIGINAL_JSX_SYM];
|
|
8253
8430
|
}
|
|
8254
8431
|
|
|
8255
|
-
// ../../packages/binding.component/
|
|
8432
|
+
// ../../packages/binding.component/src/componentBinding.ts
|
|
8256
8433
|
var componentLoadingOperationUniqueId = 0;
|
|
8257
8434
|
var ComponentBinding = class extends DescendantBindingHandler {
|
|
8258
8435
|
constructor(params) {
|
|
8259
8436
|
super(params);
|
|
8437
|
+
__publicField(this, "childBindingContext");
|
|
8438
|
+
__publicField(this, "currentLoadingOperationId");
|
|
8439
|
+
__publicField(this, "currentViewModel");
|
|
8440
|
+
__publicField(this, "latestComponentName");
|
|
8441
|
+
__publicField(this, "loadingOperationId");
|
|
8442
|
+
__publicField(this, "originalChildNodes");
|
|
8260
8443
|
this.originalChildNodes = makeArray(virtualElements_exports.childNodes(this.$element));
|
|
8261
8444
|
this.computed("computeApplyComponent");
|
|
8262
8445
|
}
|
|
@@ -8318,7 +8501,7 @@ ${name} ${msg} of ${this.text}
|
|
|
8318
8501
|
throw new Error("No component name specified");
|
|
8319
8502
|
}
|
|
8320
8503
|
this.loadingOperationId = this.currentLoadingOperationId = ++componentLoadingOperationUniqueId;
|
|
8321
|
-
|
|
8504
|
+
src_default.get(componentName, (defn) => this.applyComponentDefinition(componentName, componentParams, defn));
|
|
8322
8505
|
}
|
|
8323
8506
|
makeChildBindingContext($component) {
|
|
8324
8507
|
const ctxExtender = (ctx) => Object.assign(ctx, {
|
|
@@ -8388,7 +8571,7 @@ ${name} ${msg} of ${this.text}
|
|
|
8388
8571
|
}
|
|
8389
8572
|
};
|
|
8390
8573
|
|
|
8391
|
-
// ../../packages/binding.component/
|
|
8574
|
+
// ../../packages/binding.component/src/slotBinding.ts
|
|
8392
8575
|
var SlotBinding = class extends DescendantBindingHandler {
|
|
8393
8576
|
constructor(params) {
|
|
8394
8577
|
super(params);
|
|
@@ -8435,10 +8618,10 @@ ${name} ${msg} of ${this.text}
|
|
|
8435
8618
|
}
|
|
8436
8619
|
};
|
|
8437
8620
|
|
|
8438
|
-
// ../../packages/binding.component/
|
|
8621
|
+
// ../../packages/binding.component/src/index.ts
|
|
8439
8622
|
var bindings5 = { component: ComponentBinding, slot: SlotBinding };
|
|
8440
8623
|
|
|
8441
|
-
// ../../packages/filter.punches/
|
|
8624
|
+
// ../../packages/filter.punches/src/index.ts
|
|
8442
8625
|
var sproto = String.prototype;
|
|
8443
8626
|
var filters = {
|
|
8444
8627
|
// Convert value to uppercase
|
|
@@ -8494,7 +8677,7 @@ ${name} ${msg} of ${this.text}
|
|
|
8494
8677
|
}
|
|
8495
8678
|
};
|
|
8496
8679
|
|
|
8497
|
-
// ../../packages/utils.functionrewrite/
|
|
8680
|
+
// ../../packages/utils.functionrewrite/src/functionRewrite.ts
|
|
8498
8681
|
var FUNCTION_REX = /\bfunction\s*\(([^)]*)\)\s*\{\s*(?:(return\s)?([^}]+?)[;\s]*)?\}/g;
|
|
8499
8682
|
function functionRewrite(bindingString) {
|
|
8500
8683
|
return bindingString.replace(FUNCTION_REX, (match, args, returnKeyword, rv) => {
|
|
@@ -8515,21 +8698,12 @@ ${name} ${msg} of ${this.text}
|
|
|
8515
8698
|
var expressionRewriting = {
|
|
8516
8699
|
preProcessBindings: (s) => dataBindProvider.preProcessBindings(s)
|
|
8517
8700
|
};
|
|
8518
|
-
var provider = new MultiProvider({
|
|
8519
|
-
new ComponentProvider(),
|
|
8520
|
-
|
|
8521
|
-
new VirtualProvider(),
|
|
8522
|
-
new AttrProvider()
|
|
8523
|
-
] });
|
|
8701
|
+
var provider = new MultiProvider({
|
|
8702
|
+
providers: [new ComponentProvider(), dataBindProvider, new VirtualProvider(), new AttrProvider()]
|
|
8703
|
+
});
|
|
8524
8704
|
var builder = new Builder({
|
|
8525
8705
|
provider,
|
|
8526
|
-
bindings: [
|
|
8527
|
-
bindings2,
|
|
8528
|
-
bindings,
|
|
8529
|
-
bindings3,
|
|
8530
|
-
bindings5,
|
|
8531
|
-
{ each: bindings4.foreach }
|
|
8532
|
-
],
|
|
8706
|
+
bindings: [bindings2, bindings, bindings3, bindings5, { each: bindings4.foreach }],
|
|
8533
8707
|
extenders: {},
|
|
8534
8708
|
filters,
|
|
8535
8709
|
options: {
|
|
@@ -8537,13 +8711,13 @@ ${name} ${msg} of ${this.text}
|
|
|
8537
8711
|
bindingStringPreparsers: [functionRewrite]
|
|
8538
8712
|
}
|
|
8539
8713
|
});
|
|
8540
|
-
var version = "4.0.
|
|
8714
|
+
var version = "4.0.1";
|
|
8541
8715
|
var index_default = builder.create({
|
|
8542
8716
|
version,
|
|
8543
|
-
components:
|
|
8544
|
-
Component:
|
|
8717
|
+
components: src_default,
|
|
8718
|
+
Component: src_default.ComponentABC,
|
|
8545
8719
|
expressionRewriting
|
|
8546
8720
|
});
|
|
8547
8721
|
return __toCommonJS(index_exports);
|
|
8548
8722
|
})();
|
|
8549
|
-
(typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global).ko = ko.default
|
|
8723
|
+
(typeof globalThis !== 'undefined' ? globalThis : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global).ko = ko.default
|