dara-core 1.16.17__py3-none-any.whl → 1.16.19__py3-none-any.whl
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.
- dara/core/interactivity/derived_variable.py +8 -2
- dara/core/interactivity/plain_variable.py +4 -3
- dara/core/internal/routing.py +6 -1
- dara/core/persistence.py +127 -18
- dara/core/umd/dara.core.umd.js +800 -75
- {dara_core-1.16.17.dist-info → dara_core-1.16.19.dist-info}/METADATA +11 -10
- {dara_core-1.16.17.dist-info → dara_core-1.16.19.dist-info}/RECORD +10 -10
- {dara_core-1.16.17.dist-info → dara_core-1.16.19.dist-info}/LICENSE +0 -0
- {dara_core-1.16.17.dist-info → dara_core-1.16.19.dist-info}/WHEEL +0 -0
- {dara_core-1.16.17.dist-info → dara_core-1.16.19.dist-info}/entry_points.txt +0 -0
dara/core/umd/dara.core.umd.js
CHANGED
|
@@ -14335,7 +14335,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
14335
14335
|
disabled = false;
|
|
14336
14336
|
}
|
|
14337
14337
|
var mo = null;
|
|
14338
|
-
function observe(options) {
|
|
14338
|
+
function observe$1(options) {
|
|
14339
14339
|
if (!MUTATION_OBSERVER) {
|
|
14340
14340
|
return;
|
|
14341
14341
|
}
|
|
@@ -14967,7 +14967,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
14967
14967
|
hooks: function hooks() {
|
|
14968
14968
|
return {
|
|
14969
14969
|
bootstrap: function bootstrap() {
|
|
14970
|
-
observe(chainHooks("mutationObserverCallbacks", {}));
|
|
14970
|
+
observe$1(chainHooks("mutationObserverCallbacks", {}));
|
|
14971
14971
|
},
|
|
14972
14972
|
noAuto: function noAuto2() {
|
|
14973
14973
|
disconnect();
|
|
@@ -14977,7 +14977,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
14977
14977
|
if (_unwatched) {
|
|
14978
14978
|
enableObservation();
|
|
14979
14979
|
} else {
|
|
14980
|
-
observe(chainHooks("mutationObserverCallbacks", {
|
|
14980
|
+
observe$1(chainHooks("mutationObserverCallbacks", {
|
|
14981
14981
|
observeMutationsRoot
|
|
14982
14982
|
}));
|
|
14983
14983
|
}
|
|
@@ -16149,11 +16149,11 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
16149
16149
|
var _Symbol = Symbol$6;
|
|
16150
16150
|
var Symbol$5 = _Symbol;
|
|
16151
16151
|
var objectProto$g = Object.prototype;
|
|
16152
|
-
var hasOwnProperty$
|
|
16152
|
+
var hasOwnProperty$e = objectProto$g.hasOwnProperty;
|
|
16153
16153
|
var nativeObjectToString$1 = objectProto$g.toString;
|
|
16154
16154
|
var symToStringTag$1 = Symbol$5 ? Symbol$5.toStringTag : void 0;
|
|
16155
16155
|
function getRawTag$1(value) {
|
|
16156
|
-
var isOwn = hasOwnProperty$
|
|
16156
|
+
var isOwn = hasOwnProperty$e.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
16157
16157
|
try {
|
|
16158
16158
|
value[symToStringTag$1] = void 0;
|
|
16159
16159
|
var unmasked = true;
|
|
@@ -16234,9 +16234,9 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
16234
16234
|
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
16235
16235
|
var funcProto = Function.prototype, objectProto$e = Object.prototype;
|
|
16236
16236
|
var funcToString = funcProto.toString;
|
|
16237
|
-
var hasOwnProperty$
|
|
16237
|
+
var hasOwnProperty$d = objectProto$e.hasOwnProperty;
|
|
16238
16238
|
var reIsNative = RegExp(
|
|
16239
|
-
"^" + funcToString.call(hasOwnProperty$
|
|
16239
|
+
"^" + funcToString.call(hasOwnProperty$d).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
16240
16240
|
);
|
|
16241
16241
|
function baseIsNative$1(value) {
|
|
16242
16242
|
if (!isObject$9(value) || isMasked(value)) {
|
|
@@ -16277,22 +16277,22 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
16277
16277
|
var nativeCreate$2 = _nativeCreate;
|
|
16278
16278
|
var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
|
|
16279
16279
|
var objectProto$d = Object.prototype;
|
|
16280
|
-
var hasOwnProperty$
|
|
16280
|
+
var hasOwnProperty$c = objectProto$d.hasOwnProperty;
|
|
16281
16281
|
function hashGet$1(key) {
|
|
16282
16282
|
var data = this.__data__;
|
|
16283
16283
|
if (nativeCreate$2) {
|
|
16284
16284
|
var result = data[key];
|
|
16285
16285
|
return result === HASH_UNDEFINED$2 ? void 0 : result;
|
|
16286
16286
|
}
|
|
16287
|
-
return hasOwnProperty$
|
|
16287
|
+
return hasOwnProperty$c.call(data, key) ? data[key] : void 0;
|
|
16288
16288
|
}
|
|
16289
16289
|
var _hashGet = hashGet$1;
|
|
16290
16290
|
var nativeCreate$1 = _nativeCreate;
|
|
16291
16291
|
var objectProto$c = Object.prototype;
|
|
16292
|
-
var hasOwnProperty$
|
|
16292
|
+
var hasOwnProperty$b = objectProto$c.hasOwnProperty;
|
|
16293
16293
|
function hashHas$1(key) {
|
|
16294
16294
|
var data = this.__data__;
|
|
16295
|
-
return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$
|
|
16295
|
+
return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$b.call(data, key);
|
|
16296
16296
|
}
|
|
16297
16297
|
var _hashHas = hashHas$1;
|
|
16298
16298
|
var nativeCreate = _nativeCreate;
|
|
@@ -16626,12 +16626,12 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
16626
16626
|
var _baseIsArguments = baseIsArguments$1;
|
|
16627
16627
|
var baseIsArguments = _baseIsArguments, isObjectLike$6 = isObjectLike_1;
|
|
16628
16628
|
var objectProto$a = Object.prototype;
|
|
16629
|
-
var hasOwnProperty$
|
|
16629
|
+
var hasOwnProperty$a = objectProto$a.hasOwnProperty;
|
|
16630
16630
|
var propertyIsEnumerable = objectProto$a.propertyIsEnumerable;
|
|
16631
16631
|
var isArguments$2 = baseIsArguments(function() {
|
|
16632
16632
|
return arguments;
|
|
16633
16633
|
}()) ? baseIsArguments : function(value) {
|
|
16634
|
-
return isObjectLike$6(value) && hasOwnProperty$
|
|
16634
|
+
return isObjectLike$6(value) && hasOwnProperty$a.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
|
|
16635
16635
|
};
|
|
16636
16636
|
var isArguments_1 = isArguments$2;
|
|
16637
16637
|
var isBuffer$3 = { exports: {} };
|
|
@@ -16703,11 +16703,11 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
16703
16703
|
var isTypedArray_1 = isTypedArray$2;
|
|
16704
16704
|
var baseTimes = _baseTimes, isArguments$1 = isArguments_1, isArray$8 = isArray_1, isBuffer$2 = isBuffer$3.exports, isIndex$3 = _isIndex, isTypedArray$1 = isTypedArray_1;
|
|
16705
16705
|
var objectProto$9 = Object.prototype;
|
|
16706
|
-
var hasOwnProperty$
|
|
16706
|
+
var hasOwnProperty$9 = objectProto$9.hasOwnProperty;
|
|
16707
16707
|
function arrayLikeKeys$2(value, inherited) {
|
|
16708
16708
|
var isArr = isArray$8(value), isArg = !isArr && isArguments$1(value), isBuff = !isArr && !isArg && isBuffer$2(value), isType = !isArr && !isArg && !isBuff && isTypedArray$1(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
|
|
16709
16709
|
for (var key in value) {
|
|
16710
|
-
if ((inherited || hasOwnProperty$
|
|
16710
|
+
if ((inherited || hasOwnProperty$9.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex$3(key, length)))) {
|
|
16711
16711
|
result.push(key);
|
|
16712
16712
|
}
|
|
16713
16713
|
}
|
|
@@ -16731,14 +16731,14 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
16731
16731
|
var _nativeKeys = nativeKeys$1;
|
|
16732
16732
|
var isPrototype$2 = _isPrototype, nativeKeys = _nativeKeys;
|
|
16733
16733
|
var objectProto$7 = Object.prototype;
|
|
16734
|
-
var hasOwnProperty$
|
|
16734
|
+
var hasOwnProperty$8 = objectProto$7.hasOwnProperty;
|
|
16735
16735
|
function baseKeys$1(object2) {
|
|
16736
16736
|
if (!isPrototype$2(object2)) {
|
|
16737
16737
|
return nativeKeys(object2);
|
|
16738
16738
|
}
|
|
16739
16739
|
var result = [];
|
|
16740
16740
|
for (var key in Object(object2)) {
|
|
16741
|
-
if (hasOwnProperty$
|
|
16741
|
+
if (hasOwnProperty$8.call(object2, key) && key != "constructor") {
|
|
16742
16742
|
result.push(key);
|
|
16743
16743
|
}
|
|
16744
16744
|
}
|
|
@@ -16763,7 +16763,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
16763
16763
|
var getAllKeys$1 = _getAllKeys;
|
|
16764
16764
|
var COMPARE_PARTIAL_FLAG$3 = 1;
|
|
16765
16765
|
var objectProto$6 = Object.prototype;
|
|
16766
|
-
var hasOwnProperty$
|
|
16766
|
+
var hasOwnProperty$7 = objectProto$6.hasOwnProperty;
|
|
16767
16767
|
function equalObjects$1(object2, other, bitmask, customizer, equalFunc, stack) {
|
|
16768
16768
|
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, objProps = getAllKeys$1(object2), objLength = objProps.length, othProps = getAllKeys$1(other), othLength = othProps.length;
|
|
16769
16769
|
if (objLength != othLength && !isPartial) {
|
|
@@ -16772,7 +16772,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
16772
16772
|
var index2 = objLength;
|
|
16773
16773
|
while (index2--) {
|
|
16774
16774
|
var key = objProps[index2];
|
|
16775
|
-
if (!(isPartial ? key in other : hasOwnProperty$
|
|
16775
|
+
if (!(isPartial ? key in other : hasOwnProperty$7.call(other, key))) {
|
|
16776
16776
|
return false;
|
|
16777
16777
|
}
|
|
16778
16778
|
}
|
|
@@ -16850,7 +16850,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
16850
16850
|
var COMPARE_PARTIAL_FLAG$2 = 1;
|
|
16851
16851
|
var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", objectTag$1 = "[object Object]";
|
|
16852
16852
|
var objectProto$5 = Object.prototype;
|
|
16853
|
-
var hasOwnProperty$
|
|
16853
|
+
var hasOwnProperty$6 = objectProto$5.hasOwnProperty;
|
|
16854
16854
|
function baseIsEqualDeep$1(object2, other, bitmask, customizer, equalFunc, stack) {
|
|
16855
16855
|
var objIsArr = isArray$7(object2), othIsArr = isArray$7(other), objTag = objIsArr ? arrayTag$1 : getTag$3(object2), othTag = othIsArr ? arrayTag$1 : getTag$3(other);
|
|
16856
16856
|
objTag = objTag == argsTag$1 ? objectTag$1 : objTag;
|
|
@@ -16868,7 +16868,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
16868
16868
|
return objIsArr || isTypedArray(object2) ? equalArrays(object2, other, bitmask, customizer, equalFunc, stack) : equalByTag(object2, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
16869
16869
|
}
|
|
16870
16870
|
if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
|
|
16871
|
-
var objIsWrapped = objIsObj && hasOwnProperty$
|
|
16871
|
+
var objIsWrapped = objIsObj && hasOwnProperty$6.call(object2, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$6.call(other, "__wrapped__");
|
|
16872
16872
|
if (objIsWrapped || othIsWrapped) {
|
|
16873
16873
|
var objUnwrapped = objIsWrapped ? object2.value() : object2, othUnwrapped = othIsWrapped ? other.value() : other;
|
|
16874
16874
|
stack || (stack = new Stack$2());
|
|
@@ -21143,7 +21143,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
21143
21143
|
var tag = baseGetTag2(value);
|
|
21144
21144
|
return tag == funcTag2 || tag == genTag2 || tag == asyncTag2 || tag == proxyTag2;
|
|
21145
21145
|
}
|
|
21146
|
-
function
|
|
21146
|
+
function isInteger2(value) {
|
|
21147
21147
|
return typeof value == "number" && value == toInteger2(value);
|
|
21148
21148
|
}
|
|
21149
21149
|
function isLength2(value) {
|
|
@@ -21195,7 +21195,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
21195
21195
|
}
|
|
21196
21196
|
var isRegExp = nodeIsRegExp ? baseUnary2(nodeIsRegExp) : baseIsRegExp;
|
|
21197
21197
|
function isSafeInteger(value) {
|
|
21198
|
-
return
|
|
21198
|
+
return isInteger2(value) && value >= -MAX_SAFE_INTEGER2 && value <= MAX_SAFE_INTEGER2;
|
|
21199
21199
|
}
|
|
21200
21200
|
var isSet2 = nodeIsSet2 ? baseUnary2(nodeIsSet2) : baseIsSet2;
|
|
21201
21201
|
function isString(value) {
|
|
@@ -22236,7 +22236,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
22236
22236
|
lodash2.isError = isError2;
|
|
22237
22237
|
lodash2.isFinite = isFinite2;
|
|
22238
22238
|
lodash2.isFunction = isFunction2;
|
|
22239
|
-
lodash2.isInteger =
|
|
22239
|
+
lodash2.isInteger = isInteger2;
|
|
22240
22240
|
lodash2.isLength = isLength2;
|
|
22241
22241
|
lodash2.isMap = isMap2;
|
|
22242
22242
|
lodash2.isMatch = isMatch;
|
|
@@ -31833,7 +31833,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
31833
31833
|
};
|
|
31834
31834
|
return extendStatics(d2, b2);
|
|
31835
31835
|
};
|
|
31836
|
-
function __extends(d2, b2) {
|
|
31836
|
+
function __extends$1(d2, b2) {
|
|
31837
31837
|
if (typeof b2 !== "function" && b2 !== null)
|
|
31838
31838
|
throw new TypeError("Class extends value " + String(b2) + " is not a constructor or null");
|
|
31839
31839
|
extendStatics(d2, b2);
|
|
@@ -36090,7 +36090,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
36090
36090
|
}
|
|
36091
36091
|
_createClass(Setter2, [{
|
|
36092
36092
|
key: "validate",
|
|
36093
|
-
value: function
|
|
36093
|
+
value: function validate2(_utcDate, _options) {
|
|
36094
36094
|
return true;
|
|
36095
36095
|
}
|
|
36096
36096
|
}]);
|
|
@@ -36114,7 +36114,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
36114
36114
|
}
|
|
36115
36115
|
_createClass(ValueSetter2, [{
|
|
36116
36116
|
key: "validate",
|
|
36117
|
-
value: function
|
|
36117
|
+
value: function validate2(utcDate, options) {
|
|
36118
36118
|
return this.validateValue(utcDate, this.value, options);
|
|
36119
36119
|
}
|
|
36120
36120
|
}, {
|
|
@@ -36174,7 +36174,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
36174
36174
|
}
|
|
36175
36175
|
}, {
|
|
36176
36176
|
key: "validate",
|
|
36177
|
-
value: function
|
|
36177
|
+
value: function validate2(_utcDate, _value, _options) {
|
|
36178
36178
|
return true;
|
|
36179
36179
|
}
|
|
36180
36180
|
}]);
|
|
@@ -36403,7 +36403,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
36403
36403
|
}
|
|
36404
36404
|
}, {
|
|
36405
36405
|
key: "validate",
|
|
36406
|
-
value: function
|
|
36406
|
+
value: function validate2(_date, value) {
|
|
36407
36407
|
return value.isTwoDigitYear || value.year > 0;
|
|
36408
36408
|
}
|
|
36409
36409
|
}, {
|
|
@@ -36460,7 +36460,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
36460
36460
|
}
|
|
36461
36461
|
}, {
|
|
36462
36462
|
key: "validate",
|
|
36463
|
-
value: function
|
|
36463
|
+
value: function validate2(_date, value) {
|
|
36464
36464
|
return value.isTwoDigitYear || value.year > 0;
|
|
36465
36465
|
}
|
|
36466
36466
|
}, {
|
|
@@ -36600,7 +36600,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
36600
36600
|
}
|
|
36601
36601
|
}, {
|
|
36602
36602
|
key: "validate",
|
|
36603
|
-
value: function
|
|
36603
|
+
value: function validate2(_date, value) {
|
|
36604
36604
|
return value >= 1 && value <= 4;
|
|
36605
36605
|
}
|
|
36606
36606
|
}, {
|
|
@@ -36667,7 +36667,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
36667
36667
|
}
|
|
36668
36668
|
}, {
|
|
36669
36669
|
key: "validate",
|
|
36670
|
-
value: function
|
|
36670
|
+
value: function validate2(_date, value) {
|
|
36671
36671
|
return value >= 1 && value <= 4;
|
|
36672
36672
|
}
|
|
36673
36673
|
}, {
|
|
@@ -36738,7 +36738,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
36738
36738
|
}
|
|
36739
36739
|
}, {
|
|
36740
36740
|
key: "validate",
|
|
36741
|
-
value: function
|
|
36741
|
+
value: function validate2(_date, value) {
|
|
36742
36742
|
return value >= 0 && value <= 11;
|
|
36743
36743
|
}
|
|
36744
36744
|
}, {
|
|
@@ -36809,7 +36809,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
36809
36809
|
}
|
|
36810
36810
|
}, {
|
|
36811
36811
|
key: "validate",
|
|
36812
|
-
value: function
|
|
36812
|
+
value: function validate2(_date, value) {
|
|
36813
36813
|
return value >= 0 && value <= 11;
|
|
36814
36814
|
}
|
|
36815
36815
|
}, {
|
|
@@ -36860,7 +36860,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
36860
36860
|
}
|
|
36861
36861
|
}, {
|
|
36862
36862
|
key: "validate",
|
|
36863
|
-
value: function
|
|
36863
|
+
value: function validate2(_date, value) {
|
|
36864
36864
|
return value >= 1 && value <= 53;
|
|
36865
36865
|
}
|
|
36866
36866
|
}, {
|
|
@@ -36909,7 +36909,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
36909
36909
|
}
|
|
36910
36910
|
}, {
|
|
36911
36911
|
key: "validate",
|
|
36912
|
-
value: function
|
|
36912
|
+
value: function validate2(_date, value) {
|
|
36913
36913
|
return value >= 1 && value <= 53;
|
|
36914
36914
|
}
|
|
36915
36915
|
}, {
|
|
@@ -36953,7 +36953,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
36953
36953
|
}
|
|
36954
36954
|
}, {
|
|
36955
36955
|
key: "validate",
|
|
36956
|
-
value: function
|
|
36956
|
+
value: function validate2(date2, value) {
|
|
36957
36957
|
var year = date2.getUTCFullYear();
|
|
36958
36958
|
var isLeapYear = isLeapYearIndex$1(year);
|
|
36959
36959
|
var month = date2.getUTCMonth();
|
|
@@ -37005,7 +37005,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
37005
37005
|
}
|
|
37006
37006
|
}, {
|
|
37007
37007
|
key: "validate",
|
|
37008
|
-
value: function
|
|
37008
|
+
value: function validate2(date2, value) {
|
|
37009
37009
|
var year = date2.getUTCFullYear();
|
|
37010
37010
|
var isLeapYear = isLeapYearIndex$1(year);
|
|
37011
37011
|
if (isLeapYear) {
|
|
@@ -37104,7 +37104,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
37104
37104
|
}
|
|
37105
37105
|
}, {
|
|
37106
37106
|
key: "validate",
|
|
37107
|
-
value: function
|
|
37107
|
+
value: function validate2(_date, value) {
|
|
37108
37108
|
return value >= 0 && value <= 6;
|
|
37109
37109
|
}
|
|
37110
37110
|
}, {
|
|
@@ -37189,7 +37189,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
37189
37189
|
}
|
|
37190
37190
|
}, {
|
|
37191
37191
|
key: "validate",
|
|
37192
|
-
value: function
|
|
37192
|
+
value: function validate2(_date, value) {
|
|
37193
37193
|
return value >= 0 && value <= 6;
|
|
37194
37194
|
}
|
|
37195
37195
|
}, {
|
|
@@ -37274,7 +37274,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
37274
37274
|
}
|
|
37275
37275
|
}, {
|
|
37276
37276
|
key: "validate",
|
|
37277
|
-
value: function
|
|
37277
|
+
value: function validate2(_date, value) {
|
|
37278
37278
|
return value >= 0 && value <= 6;
|
|
37279
37279
|
}
|
|
37280
37280
|
}, {
|
|
@@ -37376,7 +37376,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
37376
37376
|
}
|
|
37377
37377
|
}, {
|
|
37378
37378
|
key: "validate",
|
|
37379
|
-
value: function
|
|
37379
|
+
value: function validate2(_date, value) {
|
|
37380
37380
|
return value >= 1 && value <= 7;
|
|
37381
37381
|
}
|
|
37382
37382
|
}, {
|
|
@@ -37587,7 +37587,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
37587
37587
|
}
|
|
37588
37588
|
}, {
|
|
37589
37589
|
key: "validate",
|
|
37590
|
-
value: function
|
|
37590
|
+
value: function validate2(_date, value) {
|
|
37591
37591
|
return value >= 1 && value <= 12;
|
|
37592
37592
|
}
|
|
37593
37593
|
}, {
|
|
@@ -37636,7 +37636,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
37636
37636
|
}
|
|
37637
37637
|
}, {
|
|
37638
37638
|
key: "validate",
|
|
37639
|
-
value: function
|
|
37639
|
+
value: function validate2(_date, value) {
|
|
37640
37640
|
return value >= 0 && value <= 23;
|
|
37641
37641
|
}
|
|
37642
37642
|
}, {
|
|
@@ -37678,7 +37678,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
37678
37678
|
}
|
|
37679
37679
|
}, {
|
|
37680
37680
|
key: "validate",
|
|
37681
|
-
value: function
|
|
37681
|
+
value: function validate2(_date, value) {
|
|
37682
37682
|
return value >= 0 && value <= 11;
|
|
37683
37683
|
}
|
|
37684
37684
|
}, {
|
|
@@ -37725,7 +37725,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
37725
37725
|
}
|
|
37726
37726
|
}, {
|
|
37727
37727
|
key: "validate",
|
|
37728
|
-
value: function
|
|
37728
|
+
value: function validate2(_date, value) {
|
|
37729
37729
|
return value >= 1 && value <= 24;
|
|
37730
37730
|
}
|
|
37731
37731
|
}, {
|
|
@@ -37768,7 +37768,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
37768
37768
|
}
|
|
37769
37769
|
}, {
|
|
37770
37770
|
key: "validate",
|
|
37771
|
-
value: function
|
|
37771
|
+
value: function validate2(_date, value) {
|
|
37772
37772
|
return value >= 0 && value <= 59;
|
|
37773
37773
|
}
|
|
37774
37774
|
}, {
|
|
@@ -37810,7 +37810,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
37810
37810
|
}
|
|
37811
37811
|
}, {
|
|
37812
37812
|
key: "validate",
|
|
37813
|
-
value: function
|
|
37813
|
+
value: function validate2(_date, value) {
|
|
37814
37814
|
return value >= 0 && value <= 59;
|
|
37815
37815
|
}
|
|
37816
37816
|
}, {
|
|
@@ -51391,7 +51391,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
51391
51391
|
}
|
|
51392
51392
|
}
|
|
51393
51393
|
var Subscriber = function(_super) {
|
|
51394
|
-
__extends(Subscriber2, _super);
|
|
51394
|
+
__extends$1(Subscriber2, _super);
|
|
51395
51395
|
function Subscriber2(destination) {
|
|
51396
51396
|
var _this = _super.call(this) || this;
|
|
51397
51397
|
_this.isStopped = false;
|
|
@@ -51500,7 +51500,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
51500
51500
|
return ConsumerObserver2;
|
|
51501
51501
|
}();
|
|
51502
51502
|
var SafeSubscriber = function(_super) {
|
|
51503
|
-
__extends(SafeSubscriber2, _super);
|
|
51503
|
+
__extends$1(SafeSubscriber2, _super);
|
|
51504
51504
|
function SafeSubscriber2(observerOrNext, error, complete) {
|
|
51505
51505
|
var _this = _super.call(this) || this;
|
|
51506
51506
|
var partialObserver;
|
|
@@ -51675,7 +51675,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
51675
51675
|
return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);
|
|
51676
51676
|
}
|
|
51677
51677
|
var OperatorSubscriber = function(_super) {
|
|
51678
|
-
__extends(OperatorSubscriber2, _super);
|
|
51678
|
+
__extends$1(OperatorSubscriber2, _super);
|
|
51679
51679
|
function OperatorSubscriber2(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {
|
|
51680
51680
|
var _this = _super.call(this, destination) || this;
|
|
51681
51681
|
_this.onFinalize = onFinalize;
|
|
@@ -51725,7 +51725,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
51725
51725
|
};
|
|
51726
51726
|
});
|
|
51727
51727
|
var Subject = function(_super) {
|
|
51728
|
-
__extends(Subject2, _super);
|
|
51728
|
+
__extends$1(Subject2, _super);
|
|
51729
51729
|
function Subject2() {
|
|
51730
51730
|
var _this = _super.call(this) || this;
|
|
51731
51731
|
_this.closed = false;
|
|
@@ -51854,7 +51854,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
51854
51854
|
return Subject2;
|
|
51855
51855
|
}(Observable);
|
|
51856
51856
|
var AnonymousSubject = function(_super) {
|
|
51857
|
-
__extends(AnonymousSubject2, _super);
|
|
51857
|
+
__extends$1(AnonymousSubject2, _super);
|
|
51858
51858
|
function AnonymousSubject2(destination, source) {
|
|
51859
51859
|
var _this = _super.call(this) || this;
|
|
51860
51860
|
_this.destination = destination;
|
|
@@ -51880,7 +51880,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
51880
51880
|
return AnonymousSubject2;
|
|
51881
51881
|
}(Subject);
|
|
51882
51882
|
var BehaviorSubject = function(_super) {
|
|
51883
|
-
__extends(BehaviorSubject2, _super);
|
|
51883
|
+
__extends$1(BehaviorSubject2, _super);
|
|
51884
51884
|
function BehaviorSubject2(_value) {
|
|
51885
51885
|
var _this = _super.call(this) || this;
|
|
51886
51886
|
_this._value = _value;
|
|
@@ -51918,7 +51918,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
51918
51918
|
delegate: void 0
|
|
51919
51919
|
};
|
|
51920
51920
|
var Action = function(_super) {
|
|
51921
|
-
__extends(Action2, _super);
|
|
51921
|
+
__extends$1(Action2, _super);
|
|
51922
51922
|
function Action2(scheduler, work) {
|
|
51923
51923
|
return _super.call(this) || this;
|
|
51924
51924
|
}
|
|
@@ -51946,7 +51946,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
51946
51946
|
delegate: void 0
|
|
51947
51947
|
};
|
|
51948
51948
|
var AsyncAction = function(_super) {
|
|
51949
|
-
__extends(AsyncAction2, _super);
|
|
51949
|
+
__extends$1(AsyncAction2, _super);
|
|
51950
51950
|
function AsyncAction2(scheduler, work) {
|
|
51951
51951
|
var _this = _super.call(this, scheduler, work) || this;
|
|
51952
51952
|
_this.scheduler = scheduler;
|
|
@@ -52051,7 +52051,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
52051
52051
|
return Scheduler2;
|
|
52052
52052
|
}();
|
|
52053
52053
|
var AsyncScheduler = function(_super) {
|
|
52054
|
-
__extends(AsyncScheduler2, _super);
|
|
52054
|
+
__extends$1(AsyncScheduler2, _super);
|
|
52055
52055
|
function AsyncScheduler2(SchedulerAction, now2) {
|
|
52056
52056
|
if (now2 === void 0) {
|
|
52057
52057
|
now2 = Scheduler.now;
|
|
@@ -53695,9 +53695,9 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
53695
53695
|
var _realNames = realNames$1;
|
|
53696
53696
|
var realNames = _realNames;
|
|
53697
53697
|
var objectProto$4 = Object.prototype;
|
|
53698
|
-
var hasOwnProperty$
|
|
53698
|
+
var hasOwnProperty$5 = objectProto$4.hasOwnProperty;
|
|
53699
53699
|
function getFuncName$1(func) {
|
|
53700
|
-
var result = func.name + "", array2 = realNames[result], length = hasOwnProperty$
|
|
53700
|
+
var result = func.name + "", array2 = realNames[result], length = hasOwnProperty$5.call(realNames, result) ? array2.length : 0;
|
|
53701
53701
|
while (length--) {
|
|
53702
53702
|
var data = array2[length], otherFunc = data.func;
|
|
53703
53703
|
if (otherFunc == null || otherFunc == func) {
|
|
@@ -53741,13 +53741,13 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
53741
53741
|
var _wrapperClone = wrapperClone$1;
|
|
53742
53742
|
var LazyWrapper$1 = _LazyWrapper, LodashWrapper = _LodashWrapper, baseLodash = _baseLodash, isArray$5 = isArray_1, isObjectLike$2 = isObjectLike_1, wrapperClone = _wrapperClone;
|
|
53743
53743
|
var objectProto$3 = Object.prototype;
|
|
53744
|
-
var hasOwnProperty$
|
|
53744
|
+
var hasOwnProperty$4 = objectProto$3.hasOwnProperty;
|
|
53745
53745
|
function lodash$1(value) {
|
|
53746
53746
|
if (isObjectLike$2(value) && !isArray$5(value) && !(value instanceof LazyWrapper$1)) {
|
|
53747
53747
|
if (value instanceof LodashWrapper) {
|
|
53748
53748
|
return value;
|
|
53749
53749
|
}
|
|
53750
|
-
if (hasOwnProperty$
|
|
53750
|
+
if (hasOwnProperty$4.call(value, "__wrapped__")) {
|
|
53751
53751
|
return wrapperClone(value);
|
|
53752
53752
|
}
|
|
53753
53753
|
}
|
|
@@ -54567,10 +54567,10 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
54567
54567
|
var _baseAssignValue = baseAssignValue$2;
|
|
54568
54568
|
var baseAssignValue$1 = _baseAssignValue, eq = eq_1;
|
|
54569
54569
|
var objectProto$2 = Object.prototype;
|
|
54570
|
-
var hasOwnProperty$
|
|
54570
|
+
var hasOwnProperty$3 = objectProto$2.hasOwnProperty;
|
|
54571
54571
|
function assignValue$3(object2, key, value) {
|
|
54572
54572
|
var objValue = object2[key];
|
|
54573
|
-
if (!(hasOwnProperty$
|
|
54573
|
+
if (!(hasOwnProperty$3.call(object2, key) && eq(objValue, value)) || value === void 0 && !(key in object2)) {
|
|
54574
54574
|
baseAssignValue$1(object2, key, value);
|
|
54575
54575
|
}
|
|
54576
54576
|
}
|
|
@@ -54638,14 +54638,14 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
54638
54638
|
var _nativeKeysIn = nativeKeysIn$1;
|
|
54639
54639
|
var isObject$1 = isObject_1, isPrototype$1 = _isPrototype, nativeKeysIn = _nativeKeysIn;
|
|
54640
54640
|
var objectProto$1 = Object.prototype;
|
|
54641
|
-
var hasOwnProperty$
|
|
54641
|
+
var hasOwnProperty$2 = objectProto$1.hasOwnProperty;
|
|
54642
54642
|
function baseKeysIn$1(object2) {
|
|
54643
54643
|
if (!isObject$1(object2)) {
|
|
54644
54644
|
return nativeKeysIn(object2);
|
|
54645
54645
|
}
|
|
54646
54646
|
var isProto = isPrototype$1(object2), result = [];
|
|
54647
54647
|
for (var key in object2) {
|
|
54648
|
-
if (!(key == "constructor" && (isProto || !hasOwnProperty$
|
|
54648
|
+
if (!(key == "constructor" && (isProto || !hasOwnProperty$2.call(object2, key)))) {
|
|
54649
54649
|
result.push(key);
|
|
54650
54650
|
}
|
|
54651
54651
|
}
|
|
@@ -54771,10 +54771,10 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
54771
54771
|
}
|
|
54772
54772
|
var _copySymbolsIn = copySymbolsIn$1;
|
|
54773
54773
|
var objectProto = Object.prototype;
|
|
54774
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
54774
|
+
var hasOwnProperty$1 = objectProto.hasOwnProperty;
|
|
54775
54775
|
function initCloneArray$1(array2) {
|
|
54776
54776
|
var length = array2.length, result = new array2.constructor(length);
|
|
54777
|
-
if (length && typeof array2[0] == "string" && hasOwnProperty.call(array2, "index")) {
|
|
54777
|
+
if (length && typeof array2[0] == "string" && hasOwnProperty$1.call(array2, "index")) {
|
|
54778
54778
|
result.index = array2.index;
|
|
54779
54779
|
result.input = array2.input;
|
|
54780
54780
|
}
|
|
@@ -57118,7 +57118,10 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
57118
57118
|
return message.type === "message" && "action" in message.message;
|
|
57119
57119
|
}
|
|
57120
57120
|
function isBackendStoreMessage(message) {
|
|
57121
|
-
return message.type === "message" && "store_uid" in message.message;
|
|
57121
|
+
return message.type === "message" && "store_uid" in message.message && "value" in message.message;
|
|
57122
|
+
}
|
|
57123
|
+
function isBackendStorePatchMessage(message) {
|
|
57124
|
+
return message.type === "message" && "store_uid" in message.message && "patches" in message.message;
|
|
57122
57125
|
}
|
|
57123
57126
|
function isCustomMessage(message) {
|
|
57124
57127
|
return message.type === "custom";
|
|
@@ -57219,6 +57222,12 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
57219
57222
|
map$2((msg) => msg.message)
|
|
57220
57223
|
);
|
|
57221
57224
|
}
|
|
57225
|
+
backendStorePatchMessages$() {
|
|
57226
|
+
return this.messages$.pipe(
|
|
57227
|
+
filter(isBackendStorePatchMessage),
|
|
57228
|
+
map$2((msg) => msg.message)
|
|
57229
|
+
);
|
|
57230
|
+
}
|
|
57222
57231
|
channel$() {
|
|
57223
57232
|
return this.messages$.pipe(
|
|
57224
57233
|
filter((msg) => isInitMessage(msg)),
|
|
@@ -57963,6 +57972,633 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
57963
57972
|
}
|
|
57964
57973
|
return resolver(getOrRegisterPlainVariable(variable, client, taskContext, extras));
|
|
57965
57974
|
}
|
|
57975
|
+
/*!
|
|
57976
|
+
* https://github.com/Starcounter-Jack/JSON-Patch
|
|
57977
|
+
* (c) 2017-2022 Joachim Wester
|
|
57978
|
+
* MIT licensed
|
|
57979
|
+
*/
|
|
57980
|
+
var __extends = globalThis && globalThis.__extends || function() {
|
|
57981
|
+
var extendStatics2 = function(d2, b2) {
|
|
57982
|
+
extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
|
|
57983
|
+
d3.__proto__ = b3;
|
|
57984
|
+
} || function(d3, b3) {
|
|
57985
|
+
for (var p2 in b3)
|
|
57986
|
+
if (b3.hasOwnProperty(p2))
|
|
57987
|
+
d3[p2] = b3[p2];
|
|
57988
|
+
};
|
|
57989
|
+
return extendStatics2(d2, b2);
|
|
57990
|
+
};
|
|
57991
|
+
return function(d2, b2) {
|
|
57992
|
+
extendStatics2(d2, b2);
|
|
57993
|
+
function __() {
|
|
57994
|
+
this.constructor = d2;
|
|
57995
|
+
}
|
|
57996
|
+
d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __());
|
|
57997
|
+
};
|
|
57998
|
+
}();
|
|
57999
|
+
var _hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
58000
|
+
function hasOwnProperty(obj, key) {
|
|
58001
|
+
return _hasOwnProperty.call(obj, key);
|
|
58002
|
+
}
|
|
58003
|
+
function _objectKeys(obj) {
|
|
58004
|
+
if (Array.isArray(obj)) {
|
|
58005
|
+
var keys_12 = new Array(obj.length);
|
|
58006
|
+
for (var k2 = 0; k2 < keys_12.length; k2++) {
|
|
58007
|
+
keys_12[k2] = "" + k2;
|
|
58008
|
+
}
|
|
58009
|
+
return keys_12;
|
|
58010
|
+
}
|
|
58011
|
+
if (Object.keys) {
|
|
58012
|
+
return Object.keys(obj);
|
|
58013
|
+
}
|
|
58014
|
+
var keys2 = [];
|
|
58015
|
+
for (var i2 in obj) {
|
|
58016
|
+
if (hasOwnProperty(obj, i2)) {
|
|
58017
|
+
keys2.push(i2);
|
|
58018
|
+
}
|
|
58019
|
+
}
|
|
58020
|
+
return keys2;
|
|
58021
|
+
}
|
|
58022
|
+
function _deepClone(obj) {
|
|
58023
|
+
switch (typeof obj) {
|
|
58024
|
+
case "object":
|
|
58025
|
+
return JSON.parse(JSON.stringify(obj));
|
|
58026
|
+
case "undefined":
|
|
58027
|
+
return null;
|
|
58028
|
+
default:
|
|
58029
|
+
return obj;
|
|
58030
|
+
}
|
|
58031
|
+
}
|
|
58032
|
+
function isInteger(str) {
|
|
58033
|
+
var i2 = 0;
|
|
58034
|
+
var len = str.length;
|
|
58035
|
+
var charCode;
|
|
58036
|
+
while (i2 < len) {
|
|
58037
|
+
charCode = str.charCodeAt(i2);
|
|
58038
|
+
if (charCode >= 48 && charCode <= 57) {
|
|
58039
|
+
i2++;
|
|
58040
|
+
continue;
|
|
58041
|
+
}
|
|
58042
|
+
return false;
|
|
58043
|
+
}
|
|
58044
|
+
return true;
|
|
58045
|
+
}
|
|
58046
|
+
function escapePathComponent(path) {
|
|
58047
|
+
if (path.indexOf("/") === -1 && path.indexOf("~") === -1)
|
|
58048
|
+
return path;
|
|
58049
|
+
return path.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
58050
|
+
}
|
|
58051
|
+
function unescapePathComponent(path) {
|
|
58052
|
+
return path.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
58053
|
+
}
|
|
58054
|
+
function hasUndefined(obj) {
|
|
58055
|
+
if (obj === void 0) {
|
|
58056
|
+
return true;
|
|
58057
|
+
}
|
|
58058
|
+
if (obj) {
|
|
58059
|
+
if (Array.isArray(obj)) {
|
|
58060
|
+
for (var i_1 = 0, len = obj.length; i_1 < len; i_1++) {
|
|
58061
|
+
if (hasUndefined(obj[i_1])) {
|
|
58062
|
+
return true;
|
|
58063
|
+
}
|
|
58064
|
+
}
|
|
58065
|
+
} else if (typeof obj === "object") {
|
|
58066
|
+
var objKeys = _objectKeys(obj);
|
|
58067
|
+
var objKeysLength = objKeys.length;
|
|
58068
|
+
for (var i2 = 0; i2 < objKeysLength; i2++) {
|
|
58069
|
+
if (hasUndefined(obj[objKeys[i2]])) {
|
|
58070
|
+
return true;
|
|
58071
|
+
}
|
|
58072
|
+
}
|
|
58073
|
+
}
|
|
58074
|
+
}
|
|
58075
|
+
return false;
|
|
58076
|
+
}
|
|
58077
|
+
function patchErrorMessageFormatter(message, args) {
|
|
58078
|
+
var messageParts = [message];
|
|
58079
|
+
for (var key in args) {
|
|
58080
|
+
var value = typeof args[key] === "object" ? JSON.stringify(args[key], null, 2) : args[key];
|
|
58081
|
+
if (typeof value !== "undefined") {
|
|
58082
|
+
messageParts.push(key + ": " + value);
|
|
58083
|
+
}
|
|
58084
|
+
}
|
|
58085
|
+
return messageParts.join("\n");
|
|
58086
|
+
}
|
|
58087
|
+
var PatchError = function(_super) {
|
|
58088
|
+
__extends(PatchError2, _super);
|
|
58089
|
+
function PatchError2(message, name, index2, operation, tree) {
|
|
58090
|
+
var _newTarget = this.constructor;
|
|
58091
|
+
var _this = _super.call(this, patchErrorMessageFormatter(message, { name, index: index2, operation, tree })) || this;
|
|
58092
|
+
_this.name = name;
|
|
58093
|
+
_this.index = index2;
|
|
58094
|
+
_this.operation = operation;
|
|
58095
|
+
_this.tree = tree;
|
|
58096
|
+
Object.setPrototypeOf(_this, _newTarget.prototype);
|
|
58097
|
+
_this.message = patchErrorMessageFormatter(message, { name, index: index2, operation, tree });
|
|
58098
|
+
return _this;
|
|
58099
|
+
}
|
|
58100
|
+
return PatchError2;
|
|
58101
|
+
}(Error);
|
|
58102
|
+
var JsonPatchError = PatchError;
|
|
58103
|
+
var deepClone = _deepClone;
|
|
58104
|
+
var objOps = {
|
|
58105
|
+
add: function(obj, key, document2) {
|
|
58106
|
+
obj[key] = this.value;
|
|
58107
|
+
return { newDocument: document2 };
|
|
58108
|
+
},
|
|
58109
|
+
remove: function(obj, key, document2) {
|
|
58110
|
+
var removed = obj[key];
|
|
58111
|
+
delete obj[key];
|
|
58112
|
+
return { newDocument: document2, removed };
|
|
58113
|
+
},
|
|
58114
|
+
replace: function(obj, key, document2) {
|
|
58115
|
+
var removed = obj[key];
|
|
58116
|
+
obj[key] = this.value;
|
|
58117
|
+
return { newDocument: document2, removed };
|
|
58118
|
+
},
|
|
58119
|
+
move: function(obj, key, document2) {
|
|
58120
|
+
var removed = getValueByPointer(document2, this.path);
|
|
58121
|
+
if (removed) {
|
|
58122
|
+
removed = _deepClone(removed);
|
|
58123
|
+
}
|
|
58124
|
+
var originalValue = applyOperation(document2, { op: "remove", path: this.from }).removed;
|
|
58125
|
+
applyOperation(document2, { op: "add", path: this.path, value: originalValue });
|
|
58126
|
+
return { newDocument: document2, removed };
|
|
58127
|
+
},
|
|
58128
|
+
copy: function(obj, key, document2) {
|
|
58129
|
+
var valueToCopy = getValueByPointer(document2, this.from);
|
|
58130
|
+
applyOperation(document2, { op: "add", path: this.path, value: _deepClone(valueToCopy) });
|
|
58131
|
+
return { newDocument: document2 };
|
|
58132
|
+
},
|
|
58133
|
+
test: function(obj, key, document2) {
|
|
58134
|
+
return { newDocument: document2, test: _areEquals(obj[key], this.value) };
|
|
58135
|
+
},
|
|
58136
|
+
_get: function(obj, key, document2) {
|
|
58137
|
+
this.value = obj[key];
|
|
58138
|
+
return { newDocument: document2 };
|
|
58139
|
+
}
|
|
58140
|
+
};
|
|
58141
|
+
var arrOps = {
|
|
58142
|
+
add: function(arr, i2, document2) {
|
|
58143
|
+
if (isInteger(i2)) {
|
|
58144
|
+
arr.splice(i2, 0, this.value);
|
|
58145
|
+
} else {
|
|
58146
|
+
arr[i2] = this.value;
|
|
58147
|
+
}
|
|
58148
|
+
return { newDocument: document2, index: i2 };
|
|
58149
|
+
},
|
|
58150
|
+
remove: function(arr, i2, document2) {
|
|
58151
|
+
var removedList = arr.splice(i2, 1);
|
|
58152
|
+
return { newDocument: document2, removed: removedList[0] };
|
|
58153
|
+
},
|
|
58154
|
+
replace: function(arr, i2, document2) {
|
|
58155
|
+
var removed = arr[i2];
|
|
58156
|
+
arr[i2] = this.value;
|
|
58157
|
+
return { newDocument: document2, removed };
|
|
58158
|
+
},
|
|
58159
|
+
move: objOps.move,
|
|
58160
|
+
copy: objOps.copy,
|
|
58161
|
+
test: objOps.test,
|
|
58162
|
+
_get: objOps._get
|
|
58163
|
+
};
|
|
58164
|
+
function getValueByPointer(document2, pointer) {
|
|
58165
|
+
if (pointer == "") {
|
|
58166
|
+
return document2;
|
|
58167
|
+
}
|
|
58168
|
+
var getOriginalDestination = { op: "_get", path: pointer };
|
|
58169
|
+
applyOperation(document2, getOriginalDestination);
|
|
58170
|
+
return getOriginalDestination.value;
|
|
58171
|
+
}
|
|
58172
|
+
function applyOperation(document2, operation, validateOperation, mutateDocument, banPrototypeModifications, index2) {
|
|
58173
|
+
if (validateOperation === void 0) {
|
|
58174
|
+
validateOperation = false;
|
|
58175
|
+
}
|
|
58176
|
+
if (mutateDocument === void 0) {
|
|
58177
|
+
mutateDocument = true;
|
|
58178
|
+
}
|
|
58179
|
+
if (banPrototypeModifications === void 0) {
|
|
58180
|
+
banPrototypeModifications = true;
|
|
58181
|
+
}
|
|
58182
|
+
if (index2 === void 0) {
|
|
58183
|
+
index2 = 0;
|
|
58184
|
+
}
|
|
58185
|
+
if (validateOperation) {
|
|
58186
|
+
if (typeof validateOperation == "function") {
|
|
58187
|
+
validateOperation(operation, 0, document2, operation.path);
|
|
58188
|
+
} else {
|
|
58189
|
+
validator(operation, 0);
|
|
58190
|
+
}
|
|
58191
|
+
}
|
|
58192
|
+
if (operation.path === "") {
|
|
58193
|
+
var returnValue = { newDocument: document2 };
|
|
58194
|
+
if (operation.op === "add") {
|
|
58195
|
+
returnValue.newDocument = operation.value;
|
|
58196
|
+
return returnValue;
|
|
58197
|
+
} else if (operation.op === "replace") {
|
|
58198
|
+
returnValue.newDocument = operation.value;
|
|
58199
|
+
returnValue.removed = document2;
|
|
58200
|
+
return returnValue;
|
|
58201
|
+
} else if (operation.op === "move" || operation.op === "copy") {
|
|
58202
|
+
returnValue.newDocument = getValueByPointer(document2, operation.from);
|
|
58203
|
+
if (operation.op === "move") {
|
|
58204
|
+
returnValue.removed = document2;
|
|
58205
|
+
}
|
|
58206
|
+
return returnValue;
|
|
58207
|
+
} else if (operation.op === "test") {
|
|
58208
|
+
returnValue.test = _areEquals(document2, operation.value);
|
|
58209
|
+
if (returnValue.test === false) {
|
|
58210
|
+
throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED", index2, operation, document2);
|
|
58211
|
+
}
|
|
58212
|
+
returnValue.newDocument = document2;
|
|
58213
|
+
return returnValue;
|
|
58214
|
+
} else if (operation.op === "remove") {
|
|
58215
|
+
returnValue.removed = document2;
|
|
58216
|
+
returnValue.newDocument = null;
|
|
58217
|
+
return returnValue;
|
|
58218
|
+
} else if (operation.op === "_get") {
|
|
58219
|
+
operation.value = document2;
|
|
58220
|
+
return returnValue;
|
|
58221
|
+
} else {
|
|
58222
|
+
if (validateOperation) {
|
|
58223
|
+
throw new JsonPatchError("Operation `op` property is not one of operations defined in RFC-6902", "OPERATION_OP_INVALID", index2, operation, document2);
|
|
58224
|
+
} else {
|
|
58225
|
+
return returnValue;
|
|
58226
|
+
}
|
|
58227
|
+
}
|
|
58228
|
+
} else {
|
|
58229
|
+
if (!mutateDocument) {
|
|
58230
|
+
document2 = _deepClone(document2);
|
|
58231
|
+
}
|
|
58232
|
+
var path = operation.path || "";
|
|
58233
|
+
var keys2 = path.split("/");
|
|
58234
|
+
var obj = document2;
|
|
58235
|
+
var t2 = 1;
|
|
58236
|
+
var len = keys2.length;
|
|
58237
|
+
var existingPathFragment = void 0;
|
|
58238
|
+
var key = void 0;
|
|
58239
|
+
var validateFunction = void 0;
|
|
58240
|
+
if (typeof validateOperation == "function") {
|
|
58241
|
+
validateFunction = validateOperation;
|
|
58242
|
+
} else {
|
|
58243
|
+
validateFunction = validator;
|
|
58244
|
+
}
|
|
58245
|
+
while (true) {
|
|
58246
|
+
key = keys2[t2];
|
|
58247
|
+
if (key && key.indexOf("~") != -1) {
|
|
58248
|
+
key = unescapePathComponent(key);
|
|
58249
|
+
}
|
|
58250
|
+
if (banPrototypeModifications && (key == "__proto__" || key == "prototype" && t2 > 0 && keys2[t2 - 1] == "constructor")) {
|
|
58251
|
+
throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");
|
|
58252
|
+
}
|
|
58253
|
+
if (validateOperation) {
|
|
58254
|
+
if (existingPathFragment === void 0) {
|
|
58255
|
+
if (obj[key] === void 0) {
|
|
58256
|
+
existingPathFragment = keys2.slice(0, t2).join("/");
|
|
58257
|
+
} else if (t2 == len - 1) {
|
|
58258
|
+
existingPathFragment = operation.path;
|
|
58259
|
+
}
|
|
58260
|
+
if (existingPathFragment !== void 0) {
|
|
58261
|
+
validateFunction(operation, 0, document2, existingPathFragment);
|
|
58262
|
+
}
|
|
58263
|
+
}
|
|
58264
|
+
}
|
|
58265
|
+
t2++;
|
|
58266
|
+
if (Array.isArray(obj)) {
|
|
58267
|
+
if (key === "-") {
|
|
58268
|
+
key = obj.length;
|
|
58269
|
+
} else {
|
|
58270
|
+
if (validateOperation && !isInteger(key)) {
|
|
58271
|
+
throw new JsonPatchError("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index", "OPERATION_PATH_ILLEGAL_ARRAY_INDEX", index2, operation, document2);
|
|
58272
|
+
} else if (isInteger(key)) {
|
|
58273
|
+
key = ~~key;
|
|
58274
|
+
}
|
|
58275
|
+
}
|
|
58276
|
+
if (t2 >= len) {
|
|
58277
|
+
if (validateOperation && operation.op === "add" && key > obj.length) {
|
|
58278
|
+
throw new JsonPatchError("The specified index MUST NOT be greater than the number of elements in the array", "OPERATION_VALUE_OUT_OF_BOUNDS", index2, operation, document2);
|
|
58279
|
+
}
|
|
58280
|
+
var returnValue = arrOps[operation.op].call(operation, obj, key, document2);
|
|
58281
|
+
if (returnValue.test === false) {
|
|
58282
|
+
throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED", index2, operation, document2);
|
|
58283
|
+
}
|
|
58284
|
+
return returnValue;
|
|
58285
|
+
}
|
|
58286
|
+
} else {
|
|
58287
|
+
if (t2 >= len) {
|
|
58288
|
+
var returnValue = objOps[operation.op].call(operation, obj, key, document2);
|
|
58289
|
+
if (returnValue.test === false) {
|
|
58290
|
+
throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED", index2, operation, document2);
|
|
58291
|
+
}
|
|
58292
|
+
return returnValue;
|
|
58293
|
+
}
|
|
58294
|
+
}
|
|
58295
|
+
obj = obj[key];
|
|
58296
|
+
if (validateOperation && t2 < len && (!obj || typeof obj !== "object")) {
|
|
58297
|
+
throw new JsonPatchError("Cannot perform operation at the desired path", "OPERATION_PATH_UNRESOLVABLE", index2, operation, document2);
|
|
58298
|
+
}
|
|
58299
|
+
}
|
|
58300
|
+
}
|
|
58301
|
+
}
|
|
58302
|
+
function applyPatch(document2, patch, validateOperation, mutateDocument, banPrototypeModifications) {
|
|
58303
|
+
if (mutateDocument === void 0) {
|
|
58304
|
+
mutateDocument = true;
|
|
58305
|
+
}
|
|
58306
|
+
if (banPrototypeModifications === void 0) {
|
|
58307
|
+
banPrototypeModifications = true;
|
|
58308
|
+
}
|
|
58309
|
+
if (validateOperation) {
|
|
58310
|
+
if (!Array.isArray(patch)) {
|
|
58311
|
+
throw new JsonPatchError("Patch sequence must be an array", "SEQUENCE_NOT_AN_ARRAY");
|
|
58312
|
+
}
|
|
58313
|
+
}
|
|
58314
|
+
if (!mutateDocument) {
|
|
58315
|
+
document2 = _deepClone(document2);
|
|
58316
|
+
}
|
|
58317
|
+
var results = new Array(patch.length);
|
|
58318
|
+
for (var i2 = 0, length_1 = patch.length; i2 < length_1; i2++) {
|
|
58319
|
+
results[i2] = applyOperation(document2, patch[i2], validateOperation, true, banPrototypeModifications, i2);
|
|
58320
|
+
document2 = results[i2].newDocument;
|
|
58321
|
+
}
|
|
58322
|
+
results.newDocument = document2;
|
|
58323
|
+
return results;
|
|
58324
|
+
}
|
|
58325
|
+
function applyReducer(document2, operation, index2) {
|
|
58326
|
+
var operationResult = applyOperation(document2, operation);
|
|
58327
|
+
if (operationResult.test === false) {
|
|
58328
|
+
throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED", index2, operation, document2);
|
|
58329
|
+
}
|
|
58330
|
+
return operationResult.newDocument;
|
|
58331
|
+
}
|
|
58332
|
+
function validator(operation, index2, document2, existingPathFragment) {
|
|
58333
|
+
if (typeof operation !== "object" || operation === null || Array.isArray(operation)) {
|
|
58334
|
+
throw new JsonPatchError("Operation is not an object", "OPERATION_NOT_AN_OBJECT", index2, operation, document2);
|
|
58335
|
+
} else if (!objOps[operation.op]) {
|
|
58336
|
+
throw new JsonPatchError("Operation `op` property is not one of operations defined in RFC-6902", "OPERATION_OP_INVALID", index2, operation, document2);
|
|
58337
|
+
} else if (typeof operation.path !== "string") {
|
|
58338
|
+
throw new JsonPatchError("Operation `path` property is not a string", "OPERATION_PATH_INVALID", index2, operation, document2);
|
|
58339
|
+
} else if (operation.path.indexOf("/") !== 0 && operation.path.length > 0) {
|
|
58340
|
+
throw new JsonPatchError('Operation `path` property must start with "/"', "OPERATION_PATH_INVALID", index2, operation, document2);
|
|
58341
|
+
} else if ((operation.op === "move" || operation.op === "copy") && typeof operation.from !== "string") {
|
|
58342
|
+
throw new JsonPatchError("Operation `from` property is not present (applicable in `move` and `copy` operations)", "OPERATION_FROM_REQUIRED", index2, operation, document2);
|
|
58343
|
+
} else if ((operation.op === "add" || operation.op === "replace" || operation.op === "test") && operation.value === void 0) {
|
|
58344
|
+
throw new JsonPatchError("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)", "OPERATION_VALUE_REQUIRED", index2, operation, document2);
|
|
58345
|
+
} else if ((operation.op === "add" || operation.op === "replace" || operation.op === "test") && hasUndefined(operation.value)) {
|
|
58346
|
+
throw new JsonPatchError("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)", "OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED", index2, operation, document2);
|
|
58347
|
+
} else if (document2) {
|
|
58348
|
+
if (operation.op == "add") {
|
|
58349
|
+
var pathLen = operation.path.split("/").length;
|
|
58350
|
+
var existingPathLen = existingPathFragment.split("/").length;
|
|
58351
|
+
if (pathLen !== existingPathLen + 1 && pathLen !== existingPathLen) {
|
|
58352
|
+
throw new JsonPatchError("Cannot perform an `add` operation at the desired path", "OPERATION_PATH_CANNOT_ADD", index2, operation, document2);
|
|
58353
|
+
}
|
|
58354
|
+
} else if (operation.op === "replace" || operation.op === "remove" || operation.op === "_get") {
|
|
58355
|
+
if (operation.path !== existingPathFragment) {
|
|
58356
|
+
throw new JsonPatchError("Cannot perform the operation at a path that does not exist", "OPERATION_PATH_UNRESOLVABLE", index2, operation, document2);
|
|
58357
|
+
}
|
|
58358
|
+
} else if (operation.op === "move" || operation.op === "copy") {
|
|
58359
|
+
var existingValue = { op: "_get", path: operation.from, value: void 0 };
|
|
58360
|
+
var error = validate([existingValue], document2);
|
|
58361
|
+
if (error && error.name === "OPERATION_PATH_UNRESOLVABLE") {
|
|
58362
|
+
throw new JsonPatchError("Cannot perform the operation from a path that does not exist", "OPERATION_FROM_UNRESOLVABLE", index2, operation, document2);
|
|
58363
|
+
}
|
|
58364
|
+
}
|
|
58365
|
+
}
|
|
58366
|
+
}
|
|
58367
|
+
function validate(sequence, document2, externalValidator) {
|
|
58368
|
+
try {
|
|
58369
|
+
if (!Array.isArray(sequence)) {
|
|
58370
|
+
throw new JsonPatchError("Patch sequence must be an array", "SEQUENCE_NOT_AN_ARRAY");
|
|
58371
|
+
}
|
|
58372
|
+
if (document2) {
|
|
58373
|
+
applyPatch(_deepClone(document2), _deepClone(sequence), externalValidator || true);
|
|
58374
|
+
} else {
|
|
58375
|
+
externalValidator = externalValidator || validator;
|
|
58376
|
+
for (var i2 = 0; i2 < sequence.length; i2++) {
|
|
58377
|
+
externalValidator(sequence[i2], i2, document2, void 0);
|
|
58378
|
+
}
|
|
58379
|
+
}
|
|
58380
|
+
} catch (e2) {
|
|
58381
|
+
if (e2 instanceof JsonPatchError) {
|
|
58382
|
+
return e2;
|
|
58383
|
+
} else {
|
|
58384
|
+
throw e2;
|
|
58385
|
+
}
|
|
58386
|
+
}
|
|
58387
|
+
}
|
|
58388
|
+
function _areEquals(a2, b2) {
|
|
58389
|
+
if (a2 === b2)
|
|
58390
|
+
return true;
|
|
58391
|
+
if (a2 && b2 && typeof a2 == "object" && typeof b2 == "object") {
|
|
58392
|
+
var arrA = Array.isArray(a2), arrB = Array.isArray(b2), i2, length, key;
|
|
58393
|
+
if (arrA && arrB) {
|
|
58394
|
+
length = a2.length;
|
|
58395
|
+
if (length != b2.length)
|
|
58396
|
+
return false;
|
|
58397
|
+
for (i2 = length; i2-- !== 0; )
|
|
58398
|
+
if (!_areEquals(a2[i2], b2[i2]))
|
|
58399
|
+
return false;
|
|
58400
|
+
return true;
|
|
58401
|
+
}
|
|
58402
|
+
if (arrA != arrB)
|
|
58403
|
+
return false;
|
|
58404
|
+
var keys2 = Object.keys(a2);
|
|
58405
|
+
length = keys2.length;
|
|
58406
|
+
if (length !== Object.keys(b2).length)
|
|
58407
|
+
return false;
|
|
58408
|
+
for (i2 = length; i2-- !== 0; )
|
|
58409
|
+
if (!b2.hasOwnProperty(keys2[i2]))
|
|
58410
|
+
return false;
|
|
58411
|
+
for (i2 = length; i2-- !== 0; ) {
|
|
58412
|
+
key = keys2[i2];
|
|
58413
|
+
if (!_areEquals(a2[key], b2[key]))
|
|
58414
|
+
return false;
|
|
58415
|
+
}
|
|
58416
|
+
return true;
|
|
58417
|
+
}
|
|
58418
|
+
return a2 !== a2 && b2 !== b2;
|
|
58419
|
+
}
|
|
58420
|
+
const core = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
58421
|
+
__proto__: null,
|
|
58422
|
+
JsonPatchError,
|
|
58423
|
+
deepClone,
|
|
58424
|
+
getValueByPointer,
|
|
58425
|
+
applyOperation,
|
|
58426
|
+
applyPatch,
|
|
58427
|
+
applyReducer,
|
|
58428
|
+
validator,
|
|
58429
|
+
validate,
|
|
58430
|
+
_areEquals
|
|
58431
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
58432
|
+
/*!
|
|
58433
|
+
* https://github.com/Starcounter-Jack/JSON-Patch
|
|
58434
|
+
* (c) 2017-2021 Joachim Wester
|
|
58435
|
+
* MIT license
|
|
58436
|
+
*/
|
|
58437
|
+
var beforeDict = /* @__PURE__ */ new WeakMap();
|
|
58438
|
+
var Mirror = function() {
|
|
58439
|
+
function Mirror2(obj) {
|
|
58440
|
+
this.observers = /* @__PURE__ */ new Map();
|
|
58441
|
+
this.obj = obj;
|
|
58442
|
+
}
|
|
58443
|
+
return Mirror2;
|
|
58444
|
+
}();
|
|
58445
|
+
var ObserverInfo = function() {
|
|
58446
|
+
function ObserverInfo2(callback, observer) {
|
|
58447
|
+
this.callback = callback;
|
|
58448
|
+
this.observer = observer;
|
|
58449
|
+
}
|
|
58450
|
+
return ObserverInfo2;
|
|
58451
|
+
}();
|
|
58452
|
+
function getMirror(obj) {
|
|
58453
|
+
return beforeDict.get(obj);
|
|
58454
|
+
}
|
|
58455
|
+
function getObserverFromMirror(mirror, callback) {
|
|
58456
|
+
return mirror.observers.get(callback);
|
|
58457
|
+
}
|
|
58458
|
+
function removeObserverFromMirror(mirror, observer) {
|
|
58459
|
+
mirror.observers.delete(observer.callback);
|
|
58460
|
+
}
|
|
58461
|
+
function unobserve(root2, observer) {
|
|
58462
|
+
observer.unobserve();
|
|
58463
|
+
}
|
|
58464
|
+
function observe(obj, callback) {
|
|
58465
|
+
var patches = [];
|
|
58466
|
+
var observer;
|
|
58467
|
+
var mirror = getMirror(obj);
|
|
58468
|
+
if (!mirror) {
|
|
58469
|
+
mirror = new Mirror(obj);
|
|
58470
|
+
beforeDict.set(obj, mirror);
|
|
58471
|
+
} else {
|
|
58472
|
+
var observerInfo = getObserverFromMirror(mirror, callback);
|
|
58473
|
+
observer = observerInfo && observerInfo.observer;
|
|
58474
|
+
}
|
|
58475
|
+
if (observer) {
|
|
58476
|
+
return observer;
|
|
58477
|
+
}
|
|
58478
|
+
observer = {};
|
|
58479
|
+
mirror.value = _deepClone(obj);
|
|
58480
|
+
if (callback) {
|
|
58481
|
+
observer.callback = callback;
|
|
58482
|
+
observer.next = null;
|
|
58483
|
+
var dirtyCheck = function() {
|
|
58484
|
+
generate(observer);
|
|
58485
|
+
};
|
|
58486
|
+
var fastCheck = function() {
|
|
58487
|
+
clearTimeout(observer.next);
|
|
58488
|
+
observer.next = setTimeout(dirtyCheck);
|
|
58489
|
+
};
|
|
58490
|
+
if (typeof window !== "undefined") {
|
|
58491
|
+
window.addEventListener("mouseup", fastCheck);
|
|
58492
|
+
window.addEventListener("keyup", fastCheck);
|
|
58493
|
+
window.addEventListener("mousedown", fastCheck);
|
|
58494
|
+
window.addEventListener("keydown", fastCheck);
|
|
58495
|
+
window.addEventListener("change", fastCheck);
|
|
58496
|
+
}
|
|
58497
|
+
}
|
|
58498
|
+
observer.patches = patches;
|
|
58499
|
+
observer.object = obj;
|
|
58500
|
+
observer.unobserve = function() {
|
|
58501
|
+
generate(observer);
|
|
58502
|
+
clearTimeout(observer.next);
|
|
58503
|
+
removeObserverFromMirror(mirror, observer);
|
|
58504
|
+
if (typeof window !== "undefined") {
|
|
58505
|
+
window.removeEventListener("mouseup", fastCheck);
|
|
58506
|
+
window.removeEventListener("keyup", fastCheck);
|
|
58507
|
+
window.removeEventListener("mousedown", fastCheck);
|
|
58508
|
+
window.removeEventListener("keydown", fastCheck);
|
|
58509
|
+
window.removeEventListener("change", fastCheck);
|
|
58510
|
+
}
|
|
58511
|
+
};
|
|
58512
|
+
mirror.observers.set(callback, new ObserverInfo(callback, observer));
|
|
58513
|
+
return observer;
|
|
58514
|
+
}
|
|
58515
|
+
function generate(observer, invertible) {
|
|
58516
|
+
if (invertible === void 0) {
|
|
58517
|
+
invertible = false;
|
|
58518
|
+
}
|
|
58519
|
+
var mirror = beforeDict.get(observer.object);
|
|
58520
|
+
_generate(mirror.value, observer.object, observer.patches, "", invertible);
|
|
58521
|
+
if (observer.patches.length) {
|
|
58522
|
+
applyPatch(mirror.value, observer.patches);
|
|
58523
|
+
}
|
|
58524
|
+
var temp = observer.patches;
|
|
58525
|
+
if (temp.length > 0) {
|
|
58526
|
+
observer.patches = [];
|
|
58527
|
+
if (observer.callback) {
|
|
58528
|
+
observer.callback(temp);
|
|
58529
|
+
}
|
|
58530
|
+
}
|
|
58531
|
+
return temp;
|
|
58532
|
+
}
|
|
58533
|
+
function _generate(mirror, obj, patches, path, invertible) {
|
|
58534
|
+
if (obj === mirror) {
|
|
58535
|
+
return;
|
|
58536
|
+
}
|
|
58537
|
+
if (typeof obj.toJSON === "function") {
|
|
58538
|
+
obj = obj.toJSON();
|
|
58539
|
+
}
|
|
58540
|
+
var newKeys = _objectKeys(obj);
|
|
58541
|
+
var oldKeys = _objectKeys(mirror);
|
|
58542
|
+
var deleted = false;
|
|
58543
|
+
for (var t2 = oldKeys.length - 1; t2 >= 0; t2--) {
|
|
58544
|
+
var key = oldKeys[t2];
|
|
58545
|
+
var oldVal = mirror[key];
|
|
58546
|
+
if (hasOwnProperty(obj, key) && !(obj[key] === void 0 && oldVal !== void 0 && Array.isArray(obj) === false)) {
|
|
58547
|
+
var newVal = obj[key];
|
|
58548
|
+
if (typeof oldVal == "object" && oldVal != null && typeof newVal == "object" && newVal != null && Array.isArray(oldVal) === Array.isArray(newVal)) {
|
|
58549
|
+
_generate(oldVal, newVal, patches, path + "/" + escapePathComponent(key), invertible);
|
|
58550
|
+
} else {
|
|
58551
|
+
if (oldVal !== newVal) {
|
|
58552
|
+
if (invertible) {
|
|
58553
|
+
patches.push({ op: "test", path: path + "/" + escapePathComponent(key), value: _deepClone(oldVal) });
|
|
58554
|
+
}
|
|
58555
|
+
patches.push({ op: "replace", path: path + "/" + escapePathComponent(key), value: _deepClone(newVal) });
|
|
58556
|
+
}
|
|
58557
|
+
}
|
|
58558
|
+
} else if (Array.isArray(mirror) === Array.isArray(obj)) {
|
|
58559
|
+
if (invertible) {
|
|
58560
|
+
patches.push({ op: "test", path: path + "/" + escapePathComponent(key), value: _deepClone(oldVal) });
|
|
58561
|
+
}
|
|
58562
|
+
patches.push({ op: "remove", path: path + "/" + escapePathComponent(key) });
|
|
58563
|
+
deleted = true;
|
|
58564
|
+
} else {
|
|
58565
|
+
if (invertible) {
|
|
58566
|
+
patches.push({ op: "test", path, value: mirror });
|
|
58567
|
+
}
|
|
58568
|
+
patches.push({ op: "replace", path, value: obj });
|
|
58569
|
+
}
|
|
58570
|
+
}
|
|
58571
|
+
if (!deleted && newKeys.length == oldKeys.length) {
|
|
58572
|
+
return;
|
|
58573
|
+
}
|
|
58574
|
+
for (var t2 = 0; t2 < newKeys.length; t2++) {
|
|
58575
|
+
var key = newKeys[t2];
|
|
58576
|
+
if (!hasOwnProperty(mirror, key) && obj[key] !== void 0) {
|
|
58577
|
+
patches.push({ op: "add", path: path + "/" + escapePathComponent(key), value: _deepClone(obj[key]) });
|
|
58578
|
+
}
|
|
58579
|
+
}
|
|
58580
|
+
}
|
|
58581
|
+
function compare(tree1, tree2, invertible) {
|
|
58582
|
+
if (invertible === void 0) {
|
|
58583
|
+
invertible = false;
|
|
58584
|
+
}
|
|
58585
|
+
var patches = [];
|
|
58586
|
+
_generate(tree1, tree2, patches, "", invertible);
|
|
58587
|
+
return patches;
|
|
58588
|
+
}
|
|
58589
|
+
const duplex = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
58590
|
+
__proto__: null,
|
|
58591
|
+
unobserve,
|
|
58592
|
+
observe,
|
|
58593
|
+
generate,
|
|
58594
|
+
compare
|
|
58595
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
58596
|
+
Object.assign({}, core, duplex, {
|
|
58597
|
+
JsonPatchError: PatchError,
|
|
58598
|
+
deepClone: _deepClone,
|
|
58599
|
+
escapePathComponent,
|
|
58600
|
+
unescapePathComponent
|
|
58601
|
+
});
|
|
57966
58602
|
function onTokenChange(cb) {
|
|
57967
58603
|
return store.subscribe(getTokenKey(), cb);
|
|
57968
58604
|
}
|
|
@@ -57976,6 +58612,9 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
57976
58612
|
return React__namespace.useSyncExternalStore(onTokenChange, getSessionToken);
|
|
57977
58613
|
}
|
|
57978
58614
|
const STORE_EXTRAS_MAP = /* @__PURE__ */ new Map();
|
|
58615
|
+
const STORE_VARIABLE_MAP = /* @__PURE__ */ new Map();
|
|
58616
|
+
const STORE_SEQUENCE_MAP = /* @__PURE__ */ new Map();
|
|
58617
|
+
const STORE_LATEST_VALUE_MAP = /* @__PURE__ */ new Map();
|
|
57979
58618
|
function BackendStoreSync({ children }) {
|
|
57980
58619
|
const { client } = React__namespace.useContext(websocketCtx);
|
|
57981
58620
|
const getStoreValue = React__namespace.useCallback(async (itemKey) => {
|
|
@@ -57983,19 +58622,23 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
57983
58622
|
const response = await request(`/api/core/store/${itemKey}`, {}, serializableExtras.extras);
|
|
57984
58623
|
await handleAuthErrors(response, true);
|
|
57985
58624
|
await validateResponse(response, `Failed to fetch the store value for key: ${itemKey}`);
|
|
57986
|
-
const
|
|
57987
|
-
|
|
58625
|
+
const { value, sequence_number } = await response.json();
|
|
58626
|
+
STORE_SEQUENCE_MAP.set(itemKey, sequence_number);
|
|
58627
|
+
return value;
|
|
57988
58628
|
}, []);
|
|
57989
58629
|
const syncStoreValues = React__namespace.useCallback(
|
|
57990
58630
|
async ({ diff }) => {
|
|
57991
58631
|
const extrasMap = /* @__PURE__ */ new Map();
|
|
57992
|
-
|
|
58632
|
+
Array.from(diff.entries()).filter(
|
|
58633
|
+
([itemKey, value]) => !STORE_LATEST_VALUE_MAP.has(itemKey) || STORE_LATEST_VALUE_MAP.get(itemKey) !== value
|
|
58634
|
+
).forEach(([itemKey, value]) => {
|
|
58635
|
+
STORE_LATEST_VALUE_MAP.set(itemKey, value);
|
|
57993
58636
|
const extras = STORE_EXTRAS_MAP.get(itemKey);
|
|
57994
58637
|
if (!extrasMap.has(extras)) {
|
|
57995
58638
|
extrasMap.set(extras, {});
|
|
57996
58639
|
}
|
|
57997
58640
|
extrasMap.get(extras)[itemKey] = value;
|
|
57998
|
-
}
|
|
58641
|
+
});
|
|
57999
58642
|
async function sendRequest(serializableExtras, storeDiff) {
|
|
58000
58643
|
const response = await request(
|
|
58001
58644
|
`/api/core/store`,
|
|
@@ -58019,22 +58662,104 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
58019
58662
|
},
|
|
58020
58663
|
[client]
|
|
58021
58664
|
);
|
|
58665
|
+
const applyPatchesToAtoms = Recoil_index_31(
|
|
58666
|
+
({ snapshot, set: set2 }) => async (storeUid, patches, sequenceNumber) => {
|
|
58667
|
+
const expectedSequence = STORE_SEQUENCE_MAP.get(storeUid) || 0;
|
|
58668
|
+
if (sequenceNumber !== expectedSequence + 1) {
|
|
58669
|
+
console.warn(
|
|
58670
|
+
`Sequence number mismatch for store ${storeUid}. Expected: ${expectedSequence + 1}, Got: ${sequenceNumber}. Rejecting patch.`
|
|
58671
|
+
);
|
|
58672
|
+
return;
|
|
58673
|
+
}
|
|
58674
|
+
STORE_SEQUENCE_MAP.set(storeUid, sequenceNumber);
|
|
58675
|
+
const variableUids = STORE_VARIABLE_MAP.get(storeUid);
|
|
58676
|
+
if (!variableUids) {
|
|
58677
|
+
return;
|
|
58678
|
+
}
|
|
58679
|
+
const atomsToUpdate = [];
|
|
58680
|
+
for (const variableUid of variableUids) {
|
|
58681
|
+
const directAtom = atomRegistry.get(variableUid);
|
|
58682
|
+
if (directAtom) {
|
|
58683
|
+
atomsToUpdate.push({ atom: directAtom, variableUid });
|
|
58684
|
+
continue;
|
|
58685
|
+
}
|
|
58686
|
+
const atomFamily2 = atomFamilyRegistry.get(variableUid);
|
|
58687
|
+
if (atomFamily2) {
|
|
58688
|
+
const familyMembers = atomFamilyMembersRegistry.get(atomFamily2);
|
|
58689
|
+
if (familyMembers) {
|
|
58690
|
+
for (const [, atomInstance] of familyMembers) {
|
|
58691
|
+
atomsToUpdate.push({ atom: atomInstance, variableUid });
|
|
58692
|
+
}
|
|
58693
|
+
}
|
|
58694
|
+
}
|
|
58695
|
+
}
|
|
58696
|
+
const currentValues = await Promise.all(
|
|
58697
|
+
atomsToUpdate.map(async ({ atom: atom2, variableUid }) => {
|
|
58698
|
+
try {
|
|
58699
|
+
return {
|
|
58700
|
+
atom: atom2,
|
|
58701
|
+
variableUid,
|
|
58702
|
+
currentValue: await snapshot.getPromise(atom2),
|
|
58703
|
+
error: null
|
|
58704
|
+
};
|
|
58705
|
+
} catch (error) {
|
|
58706
|
+
return {
|
|
58707
|
+
atom: atom2,
|
|
58708
|
+
variableUid,
|
|
58709
|
+
currentValue: null,
|
|
58710
|
+
error
|
|
58711
|
+
};
|
|
58712
|
+
}
|
|
58713
|
+
})
|
|
58714
|
+
);
|
|
58715
|
+
const applyPatchToValue = (currentValue, variableUid) => {
|
|
58716
|
+
try {
|
|
58717
|
+
return applyPatch(currentValue, patches, false, false).newDocument;
|
|
58718
|
+
} catch (error) {
|
|
58719
|
+
console.warn(`Failed to apply patch to atom ${variableUid}:`, error);
|
|
58720
|
+
return currentValue;
|
|
58721
|
+
}
|
|
58722
|
+
};
|
|
58723
|
+
currentValues.forEach(({ atom: atom2, variableUid, currentValue, error }) => {
|
|
58724
|
+
if (error) {
|
|
58725
|
+
console.warn(`Failed to read current value for atom ${variableUid}:`, error);
|
|
58726
|
+
return;
|
|
58727
|
+
}
|
|
58728
|
+
const patchedValue = applyPatchToValue(currentValue, variableUid);
|
|
58729
|
+
set2(atom2, patchedValue);
|
|
58730
|
+
STORE_LATEST_VALUE_MAP.set(storeUid, patchedValue);
|
|
58731
|
+
});
|
|
58732
|
+
},
|
|
58733
|
+
[]
|
|
58734
|
+
);
|
|
58022
58735
|
const listenToStoreChanges = React__namespace.useCallback(
|
|
58023
58736
|
({ updateItem }) => {
|
|
58024
58737
|
if (!client) {
|
|
58025
58738
|
return;
|
|
58026
58739
|
}
|
|
58027
|
-
const
|
|
58740
|
+
const valueSub = client.backendStoreMessages$().subscribe((message) => {
|
|
58741
|
+
STORE_SEQUENCE_MAP.set(message.store_uid, message.sequence_number);
|
|
58028
58742
|
updateItem(message.store_uid, message.value);
|
|
58743
|
+
STORE_LATEST_VALUE_MAP.set(message.store_uid, message.value);
|
|
58029
58744
|
});
|
|
58030
|
-
|
|
58745
|
+
const patchSub = client.backendStorePatchMessages$().subscribe((message) => {
|
|
58746
|
+
applyPatchesToAtoms(message.store_uid, message.patches, message.sequence_number);
|
|
58747
|
+
});
|
|
58748
|
+
return () => {
|
|
58749
|
+
valueSub.unsubscribe();
|
|
58750
|
+
patchSub.unsubscribe();
|
|
58751
|
+
};
|
|
58031
58752
|
},
|
|
58032
|
-
[client]
|
|
58753
|
+
[client, applyPatchesToAtoms]
|
|
58033
58754
|
);
|
|
58034
58755
|
return /* @__PURE__ */ React__namespace.createElement(RecoilSync_index_1, { listen: listenToStoreChanges, read: getStoreValue, storeKey: "BackendStore", write: syncStoreValues }, children);
|
|
58035
58756
|
}
|
|
58036
58757
|
function backendStoreEffect(variable, requestExtras) {
|
|
58037
58758
|
STORE_EXTRAS_MAP.set(variable.store.uid, requestExtras);
|
|
58759
|
+
if (!STORE_VARIABLE_MAP.has(variable.store.uid)) {
|
|
58760
|
+
STORE_VARIABLE_MAP.set(variable.store.uid, /* @__PURE__ */ new Set());
|
|
58761
|
+
}
|
|
58762
|
+
STORE_VARIABLE_MAP.get(variable.store.uid).add(variable.uid);
|
|
58038
58763
|
return RecoilSync_index_2({
|
|
58039
58764
|
itemKey: variable.store.uid,
|
|
58040
58765
|
refine: Refine_index_6(),
|