@player-ui/reference-assets-plugin 0.14.0-next.0 → 0.14.0-next.2
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/ReferenceAssetsPlugin.native.js +143 -155
- package/dist/ReferenceAssetsPlugin.native.js.map +1 -1
- package/dist/xlr/ActionAsset.json +2 -2
- package/dist/xlr/ChatMessageAsset.json +1 -1
- package/dist/xlr/ChoiceAsset.json +5 -5
- package/dist/xlr/CollectionAsset.json +1 -1
- package/dist/xlr/ImageAsset.json +2 -2
- package/dist/xlr/InfoAsset.json +1 -1
- package/dist/xlr/InputAsset.json +2 -2
- package/dist/xlr/TextAsset.json +4 -4
- package/dist/xlr/send.json +1 -1
- package/package.json +7 -7
|
@@ -45,6 +45,10 @@ function _async_to_generator(fn) {
|
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
+
function _call_super(_this, derived, args) {
|
|
49
|
+
derived = _get_prototype_of(derived);
|
|
50
|
+
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
51
|
+
}
|
|
48
52
|
function _class_call_check(instance, Constructor) {
|
|
49
53
|
if (!(instance instanceof Constructor)) {
|
|
50
54
|
throw new TypeError("Cannot call a class as a function");
|
|
@@ -283,31 +287,15 @@ function _wrap_native_super(Class) {
|
|
|
283
287
|
return _wrap_native_super(Class);
|
|
284
288
|
}
|
|
285
289
|
function _is_native_reflect_construct() {
|
|
286
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
287
|
-
if (Reflect.construct.sham) return false;
|
|
288
|
-
if (typeof Proxy === "function") return true;
|
|
289
290
|
try {
|
|
290
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
return
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
function _create_super(Derived) {
|
|
297
|
-
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
298
|
-
return function _createSuperInternal() {
|
|
299
|
-
var Super = _get_prototype_of(Derived), result;
|
|
300
|
-
if (hasNativeReflectConstruct) {
|
|
301
|
-
var NewTarget = _get_prototype_of(this).constructor;
|
|
302
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
|
303
|
-
} else {
|
|
304
|
-
result = Super.apply(this, arguments);
|
|
305
|
-
}
|
|
306
|
-
return _possible_constructor_return(this, result);
|
|
307
|
-
};
|
|
291
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
292
|
+
} catch (_) {}
|
|
293
|
+
return (_is_native_reflect_construct = function() {
|
|
294
|
+
return !!result;
|
|
295
|
+
})();
|
|
308
296
|
}
|
|
309
297
|
function _ts_generator(thisArg, body) {
|
|
310
|
-
var f, y, t,
|
|
298
|
+
var f, y, t, _ = {
|
|
311
299
|
label: 0,
|
|
312
300
|
sent: function() {
|
|
313
301
|
if (t[0] & 1) throw t[1];
|
|
@@ -315,12 +303,8 @@ function _ts_generator(thisArg, body) {
|
|
|
315
303
|
},
|
|
316
304
|
trys: [],
|
|
317
305
|
ops: []
|
|
318
|
-
};
|
|
319
|
-
return g = {
|
|
320
|
-
next: verb(0),
|
|
321
|
-
"throw": verb(1),
|
|
322
|
-
"return": verb(2)
|
|
323
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
306
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
307
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
324
308
|
return this;
|
|
325
309
|
}), g;
|
|
326
310
|
function verb(n) {
|
|
@@ -333,7 +317,7 @@ function _ts_generator(thisArg, body) {
|
|
|
333
317
|
}
|
|
334
318
|
function step(op) {
|
|
335
319
|
if (f) throw new TypeError("Generator is already executing.");
|
|
336
|
-
while(_)try {
|
|
320
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
337
321
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
338
322
|
if (y = 0, t) op = [
|
|
339
323
|
op[0] & 2,
|
|
@@ -510,7 +494,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
510
494
|
};
|
|
511
495
|
};
|
|
512
496
|
var maybeCompose = function maybeCompose(maybeFn) {
|
|
513
|
-
if (typeof maybeFn === "object") {
|
|
497
|
+
if ((typeof maybeFn === "undefined" ? "undefined" : _type_of(maybeFn)) === "object") {
|
|
514
498
|
return maybeFn;
|
|
515
499
|
}
|
|
516
500
|
return compose(maybeFn);
|
|
@@ -597,7 +581,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
597
581
|
};
|
|
598
582
|
var findInArray = function findInArray(array, key, value) {
|
|
599
583
|
return array.findIndex(function(obj) {
|
|
600
|
-
if (obj && typeof obj === "object") {
|
|
584
|
+
if (obj && (typeof obj === "undefined" ? "undefined" : _type_of(obj)) === "object") {
|
|
601
585
|
return obj[key] == value;
|
|
602
586
|
}
|
|
603
587
|
return false;
|
|
@@ -691,7 +675,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
691
675
|
};
|
|
692
676
|
};
|
|
693
677
|
var isExpressionNode = function isExpressionNode(x) {
|
|
694
|
-
return typeof x === "object" && x !== null && !Array.isArray(x) && x.__id === ExpNodeOpaqueIdentifier;
|
|
678
|
+
return (typeof x === "undefined" ? "undefined" : _type_of(x)) === "object" && x !== null && !Array.isArray(x) && x.__id === ExpNodeOpaqueIdentifier;
|
|
695
679
|
};
|
|
696
680
|
var throwError = function throwError(message, index) {
|
|
697
681
|
var err = new Error("".concat(message, " at character ").concat(index));
|
|
@@ -1279,7 +1263,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
1279
1263
|
var isPromiseLike = function isPromiseLike(value) {
|
|
1280
1264
|
var // Check for standard Promise constructor name
|
|
1281
1265
|
_value_constructor;
|
|
1282
|
-
return value != null && typeof value === "object" && typeof value.then === "function" && // Additional safeguards against false positives
|
|
1266
|
+
return value != null && (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && typeof value.then === "function" && // Additional safeguards against false positives
|
|
1283
1267
|
(_instanceof(value, Promise) || ((_value_constructor = value.constructor) === null || _value_constructor === void 0 ? void 0 : _value_constructor.name) === "Promise" || // Verify it has other Promise-like methods to reduce false positives
|
|
1284
1268
|
typeof value.catch === "function" && typeof value.finally === "function");
|
|
1285
1269
|
};
|
|
@@ -1294,7 +1278,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
1294
1278
|
if (isExpressionNode(expr)) {
|
|
1295
1279
|
return false;
|
|
1296
1280
|
}
|
|
1297
|
-
return typeof expr === "object" && expr !== null && !Array.isArray(expr) && "value" in expr;
|
|
1281
|
+
return (typeof expr === "undefined" ? "undefined" : _type_of(expr)) === "object" && expr !== null && !Array.isArray(expr) && "value" in expr;
|
|
1298
1282
|
};
|
|
1299
1283
|
var makePromiseAwareBinaryOp = function makePromiseAwareBinaryOp(operation) {
|
|
1300
1284
|
return function(a, b, async) {
|
|
@@ -1511,7 +1495,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
1511
1495
|
if (!node) {
|
|
1512
1496
|
return;
|
|
1513
1497
|
}
|
|
1514
|
-
if ("value" in node &&
|
|
1498
|
+
if ("value" in node && _type_of(node.value) === "object" && typeof ((_node_value = node.value) === null || _node_value === void 0 ? void 0 : _node_value.id) === "string") {
|
|
1515
1499
|
return node.value.id;
|
|
1516
1500
|
}
|
|
1517
1501
|
};
|
|
@@ -1623,7 +1607,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
1623
1607
|
});
|
|
1624
1608
|
};
|
|
1625
1609
|
var __copyProps = function(to, from, except, desc) {
|
|
1626
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1610
|
+
if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
|
|
1627
1611
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1628
1612
|
try {
|
|
1629
1613
|
var _loop = function() {
|
|
@@ -1743,7 +1727,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
1743
1727
|
else return 0;
|
|
1744
1728
|
}
|
|
1745
1729
|
}();
|
|
1746
|
-
if (typeof module === "object") module.exports = SortedArray2;
|
|
1730
|
+
if ((typeof module === "undefined" ? "undefined" : _type_of(module)) === "object") module.exports = SortedArray2;
|
|
1747
1731
|
if (typeof define === "function" && define.amd) define(function() {
|
|
1748
1732
|
return SortedArray2;
|
|
1749
1733
|
});
|
|
@@ -1759,15 +1743,16 @@ var ReferenceAssetsPlugin = function() {
|
|
|
1759
1743
|
exports.toError = exports.NestedError = void 0;
|
|
1760
1744
|
var NestedError4 = /*#__PURE__*/ function(Error1) {
|
|
1761
1745
|
_inherits(_NestedError, Error1);
|
|
1762
|
-
var _super = _create_super(_NestedError);
|
|
1763
1746
|
function _NestedError(message) {
|
|
1764
1747
|
for(var _len = arguments.length, innerErrors = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
|
1765
1748
|
innerErrors[_key - 1] = arguments[_key];
|
|
1766
1749
|
}
|
|
1767
1750
|
_class_call_check(this, _NestedError);
|
|
1768
1751
|
var _this;
|
|
1769
|
-
_this =
|
|
1770
|
-
|
|
1752
|
+
_this = _call_super(this, _NestedError, [
|
|
1753
|
+
message
|
|
1754
|
+
]);
|
|
1755
|
+
var thisErrorReport = _NestedError.getErrorReport(_this);
|
|
1771
1756
|
if (innerErrors.length === 1) {
|
|
1772
1757
|
var innerError = toError(innerErrors[0]);
|
|
1773
1758
|
_this.innerErrors = [
|
|
@@ -1903,7 +1888,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
1903
1888
|
return out;
|
|
1904
1889
|
}
|
|
1905
1890
|
function isObject(o) {
|
|
1906
|
-
return o != null && typeof o === "object";
|
|
1891
|
+
return o != null && (typeof o === "undefined" ? "undefined" : _type_of(o)) === "object";
|
|
1907
1892
|
}
|
|
1908
1893
|
function addLast2(array, val) {
|
|
1909
1894
|
if (Array.isArray(val)) return array.concat(val);
|
|
@@ -2251,7 +2236,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
2251
2236
|
var nestedPath = _to_consumable_array(path).concat([
|
|
2252
2237
|
key
|
|
2253
2238
|
]);
|
|
2254
|
-
if (typeof val === "object") {
|
|
2239
|
+
if ((typeof val === "undefined" ? "undefined" : _type_of(val)) === "object") {
|
|
2255
2240
|
traverseObj(val, nestedPath, pairs);
|
|
2256
2241
|
} else {
|
|
2257
2242
|
pairs.set(nestedPath, val);
|
|
@@ -2292,7 +2277,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
2292
2277
|
{
|
|
2293
2278
|
/** Add match -> value mapping to the registry */ key: "set",
|
|
2294
2279
|
value: function set(match, value) {
|
|
2295
|
-
var matcher = typeof match === "object" ? createMatcher(match) : createBasicMatcher(match);
|
|
2280
|
+
var matcher = (typeof match === "undefined" ? "undefined" : _type_of(match)) === "object" ? createMatcher(match) : createBasicMatcher(match);
|
|
2296
2281
|
this.store.insert({
|
|
2297
2282
|
key: match,
|
|
2298
2283
|
value: value,
|
|
@@ -2695,10 +2680,9 @@ var ReferenceAssetsPlugin = function() {
|
|
|
2695
2680
|
}();
|
|
2696
2681
|
var SyncHook = /*#__PURE__*/ function(Hook) {
|
|
2697
2682
|
_inherits(SyncHook, Hook);
|
|
2698
|
-
var _super = _create_super(SyncHook);
|
|
2699
2683
|
function SyncHook() {
|
|
2700
2684
|
_class_call_check(this, SyncHook);
|
|
2701
|
-
return
|
|
2685
|
+
return _call_super(this, SyncHook, arguments);
|
|
2702
2686
|
}
|
|
2703
2687
|
_create_class(SyncHook, [
|
|
2704
2688
|
{
|
|
@@ -2731,10 +2715,9 @@ var ReferenceAssetsPlugin = function() {
|
|
|
2731
2715
|
}(Hook);
|
|
2732
2716
|
var SyncBailHook = /*#__PURE__*/ function(Hook) {
|
|
2733
2717
|
_inherits(SyncBailHook, Hook);
|
|
2734
|
-
var _super = _create_super(SyncBailHook);
|
|
2735
2718
|
function SyncBailHook() {
|
|
2736
2719
|
_class_call_check(this, SyncBailHook);
|
|
2737
|
-
return
|
|
2720
|
+
return _call_super(this, SyncBailHook, arguments);
|
|
2738
2721
|
}
|
|
2739
2722
|
_create_class(SyncBailHook, [
|
|
2740
2723
|
{
|
|
@@ -2766,10 +2749,9 @@ var ReferenceAssetsPlugin = function() {
|
|
|
2766
2749
|
}(Hook);
|
|
2767
2750
|
var SyncWaterfallHook = /*#__PURE__*/ function(Hook) {
|
|
2768
2751
|
_inherits(SyncWaterfallHook, Hook);
|
|
2769
|
-
var _super = _create_super(SyncWaterfallHook);
|
|
2770
2752
|
function SyncWaterfallHook() {
|
|
2771
2753
|
_class_call_check(this, SyncWaterfallHook);
|
|
2772
|
-
return
|
|
2754
|
+
return _call_super(this, SyncWaterfallHook, arguments);
|
|
2773
2755
|
}
|
|
2774
2756
|
_create_class(SyncWaterfallHook, [
|
|
2775
2757
|
{
|
|
@@ -2801,10 +2783,9 @@ var ReferenceAssetsPlugin = function() {
|
|
|
2801
2783
|
}(Hook);
|
|
2802
2784
|
var AsyncParallelBailHook = /*#__PURE__*/ function(Hook) {
|
|
2803
2785
|
_inherits(AsyncParallelBailHook, Hook);
|
|
2804
|
-
var _super = _create_super(AsyncParallelBailHook);
|
|
2805
2786
|
function AsyncParallelBailHook() {
|
|
2806
2787
|
_class_call_check(this, AsyncParallelBailHook);
|
|
2807
|
-
return
|
|
2788
|
+
return _call_super(this, AsyncParallelBailHook, arguments);
|
|
2808
2789
|
}
|
|
2809
2790
|
_create_class(AsyncParallelBailHook, [
|
|
2810
2791
|
{
|
|
@@ -2813,14 +2794,13 @@ var ReferenceAssetsPlugin = function() {
|
|
|
2813
2794
|
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
2814
2795
|
args[_key] = arguments[_key];
|
|
2815
2796
|
}
|
|
2816
|
-
var _this = this;
|
|
2817
2797
|
return _async_to_generator(function() {
|
|
2818
2798
|
var _this_interceptions, ctx, rtn, e;
|
|
2819
2799
|
return _ts_generator(this, function(_state) {
|
|
2820
2800
|
switch(_state.label){
|
|
2821
2801
|
case 0:
|
|
2822
2802
|
ctx = {};
|
|
2823
|
-
(_this_interceptions =
|
|
2803
|
+
(_this_interceptions = this.interceptions).call.apply(_this_interceptions, [
|
|
2824
2804
|
ctx
|
|
2825
2805
|
].concat(_to_consumable_array(args)));
|
|
2826
2806
|
_state.label = 1;
|
|
@@ -2833,20 +2813,20 @@ var ReferenceAssetsPlugin = function() {
|
|
|
2833
2813
|
]);
|
|
2834
2814
|
return [
|
|
2835
2815
|
4,
|
|
2836
|
-
Promise.race(
|
|
2816
|
+
Promise.race(this.taps.map(function(tap) {
|
|
2837
2817
|
return callTap(tap, args, ctx);
|
|
2838
2818
|
}))
|
|
2839
2819
|
];
|
|
2840
2820
|
case 2:
|
|
2841
2821
|
rtn = _state.sent();
|
|
2842
|
-
|
|
2822
|
+
this.interceptions.result(rtn);
|
|
2843
2823
|
return [
|
|
2844
2824
|
2,
|
|
2845
2825
|
rtn
|
|
2846
2826
|
];
|
|
2847
2827
|
case 3:
|
|
2848
2828
|
e = _state.sent();
|
|
2849
|
-
|
|
2829
|
+
this.interceptions.error(e);
|
|
2850
2830
|
throw e;
|
|
2851
2831
|
case 4:
|
|
2852
2832
|
return [
|
|
@@ -2854,7 +2834,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
2854
2834
|
];
|
|
2855
2835
|
}
|
|
2856
2836
|
});
|
|
2857
|
-
})();
|
|
2837
|
+
}).call(this);
|
|
2858
2838
|
}
|
|
2859
2839
|
}
|
|
2860
2840
|
]);
|
|
@@ -2891,7 +2871,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
2891
2871
|
for(var _iterator = foo[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
2892
2872
|
len = _step.value;
|
|
2893
2873
|
tmp = len;
|
|
2894
|
-
if (tmp && typeof tmp === "object") {
|
|
2874
|
+
if (tmp && (typeof tmp === "undefined" ? "undefined" : _type_of(tmp)) === "object") {
|
|
2895
2875
|
tmp = find(bar, tmp);
|
|
2896
2876
|
if (!tmp) return false;
|
|
2897
2877
|
}
|
|
@@ -2922,7 +2902,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
2922
2902
|
for(var _iterator1 = foo[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
2923
2903
|
len = _step1.value;
|
|
2924
2904
|
tmp = len[0];
|
|
2925
|
-
if (tmp && typeof tmp === "object") {
|
|
2905
|
+
if (tmp && (typeof tmp === "undefined" ? "undefined" : _type_of(tmp)) === "object") {
|
|
2926
2906
|
tmp = find(bar, tmp);
|
|
2927
2907
|
if (!tmp) return false;
|
|
2928
2908
|
}
|
|
@@ -2961,7 +2941,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
2961
2941
|
}
|
|
2962
2942
|
return len === -1;
|
|
2963
2943
|
}
|
|
2964
|
-
if (!ctor || typeof foo === "object") {
|
|
2944
|
+
if (!ctor || (typeof foo === "undefined" ? "undefined" : _type_of(foo)) === "object") {
|
|
2965
2945
|
len = 0;
|
|
2966
2946
|
for(ctor in foo){
|
|
2967
2947
|
if (has.call(foo, ctor) && ++len && !has.call(bar, ctor)) return false;
|
|
@@ -3446,7 +3426,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
3446
3426
|
var _this_parseCache_path;
|
|
3447
3427
|
var ast = (_this_parseCache_path = this.parseCache[path]) !== null && _this_parseCache_path !== void 0 ? _this_parseCache_path : parse(path);
|
|
3448
3428
|
this.parseCache[path] = ast;
|
|
3449
|
-
if (typeof ast !== "object" || !(ast === null || ast === void 0 ? void 0 : ast.status)) {
|
|
3429
|
+
if ((typeof ast === "undefined" ? "undefined" : _type_of(ast)) !== "object" || !(ast === null || ast === void 0 ? void 0 : ast.status)) {
|
|
3450
3430
|
var _ast_error;
|
|
3451
3431
|
throw new TypeError('Cannot normalize path "'.concat(path, '": ').concat((_ast_error = ast === null || ast === void 0 ? void 0 : ast.error) !== null && _ast_error !== void 0 ? _ast_error : "Unknown Error."));
|
|
3452
3432
|
}
|
|
@@ -3646,14 +3626,13 @@ var ReferenceAssetsPlugin = function() {
|
|
|
3646
3626
|
}();
|
|
3647
3627
|
var DependencyModel = /*#__PURE__*/ function(DependencyTracker) {
|
|
3648
3628
|
_inherits(DependencyModel, DependencyTracker);
|
|
3649
|
-
var _super = _create_super(DependencyModel);
|
|
3650
3629
|
function DependencyModel(rootModel) {
|
|
3651
3630
|
_class_call_check(this, DependencyModel);
|
|
3652
3631
|
var _this;
|
|
3653
|
-
_this =
|
|
3632
|
+
_this = _call_super(this, DependencyModel);
|
|
3654
3633
|
_this.rootModel = rootModel;
|
|
3655
|
-
_this.set = _this.set.bind(
|
|
3656
|
-
_this.get = _this.get.bind(
|
|
3634
|
+
_this.set = _this.set.bind(_this);
|
|
3635
|
+
_this.get = _this.get.bind(_this);
|
|
3657
3636
|
return _this;
|
|
3658
3637
|
}
|
|
3659
3638
|
_create_class(DependencyModel, [
|
|
@@ -4197,23 +4176,20 @@ var ReferenceAssetsPlugin = function() {
|
|
|
4197
4176
|
* @experimental These Player APIs are in active development and may change. Use with caution
|
|
4198
4177
|
*/ key: "evaluateAsync",
|
|
4199
4178
|
value: function evaluateAsync(expr, options) {
|
|
4179
|
+
var _this = this;
|
|
4200
4180
|
if (Array.isArray(expr)) {
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
var _ref = _async_to_generator(function(exp) {
|
|
4181
|
+
return collateAwaitable(expr.map(function(exp) {
|
|
4182
|
+
return _async_to_generator(function() {
|
|
4204
4183
|
return _ts_generator(this, function(_state) {
|
|
4205
4184
|
return [
|
|
4206
4185
|
2,
|
|
4207
|
-
|
|
4186
|
+
this.evaluate(exp, _object_spread_props(_object_spread({}, options), {
|
|
4208
4187
|
async: true
|
|
4209
4188
|
}))
|
|
4210
4189
|
];
|
|
4211
4190
|
});
|
|
4212
|
-
});
|
|
4213
|
-
|
|
4214
|
-
return _ref.apply(this, arguments);
|
|
4215
|
-
};
|
|
4216
|
-
}())).awaitableThen(function(values) {
|
|
4191
|
+
}).call(_this);
|
|
4192
|
+
})).awaitableThen(function(values) {
|
|
4217
4193
|
return values.pop();
|
|
4218
4194
|
});
|
|
4219
4195
|
} else {
|
|
@@ -4989,7 +4965,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
4989
4965
|
}
|
|
4990
4966
|
var parseLocalObject = function(currentValue, objToParse) {
|
|
4991
4967
|
var path = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
|
|
4992
|
-
if (typeof objToParse !== "object" || objToParse === null) {
|
|
4968
|
+
if ((typeof objToParse === "undefined" ? "undefined" : _type_of(objToParse)) !== "object" || objToParse === null) {
|
|
4993
4969
|
return {
|
|
4994
4970
|
value: objToParse,
|
|
4995
4971
|
children: []
|
|
@@ -5026,7 +5002,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
5026
5002
|
if (newChildren) {
|
|
5027
5003
|
var _children2;
|
|
5028
5004
|
(_children2 = children2).push.apply(_children2, _to_consumable_array(newChildren));
|
|
5029
|
-
} else if (localValue && typeof localValue === "object") {
|
|
5005
|
+
} else if (localValue && (typeof localValue === "undefined" ? "undefined" : _type_of(localValue)) === "object") {
|
|
5030
5006
|
var _children21;
|
|
5031
5007
|
var result = parseLocalObject(accumulation.value, localValue, _to_consumable_array(path).concat([
|
|
5032
5008
|
localKey
|
|
@@ -5184,7 +5160,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
5184
5160
|
Object.keys(clonedNode).forEach(function(key) {
|
|
5185
5161
|
if (key === "parent") return;
|
|
5186
5162
|
var value = clonedNode[key];
|
|
5187
|
-
if (typeof value === "object" && value !== null) {
|
|
5163
|
+
if ((typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && value !== null) {
|
|
5188
5164
|
clonedNode[key] = Array.isArray(value) ? _to_consumable_array(value) : _object_spread({}, value);
|
|
5189
5165
|
}
|
|
5190
5166
|
});
|
|
@@ -5664,7 +5640,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
5664
5640
|
for(var _iterator = templateSubstitutions[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
5665
5641
|
var _step_value = _step.value, expression = _step_value.expression, value = _step_value.value;
|
|
5666
5642
|
var flags = "g";
|
|
5667
|
-
if (typeof expression === "object") {
|
|
5643
|
+
if ((typeof expression === "undefined" ? "undefined" : _type_of(expression)) === "object") {
|
|
5668
5644
|
flags = "".concat(expression.flags).concat(expression.global ? "" : "g");
|
|
5669
5645
|
}
|
|
5670
5646
|
templateStr = templateStr.replace(new RegExp(expression, flags), value);
|
|
@@ -5813,7 +5789,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
5813
5789
|
var bindingResolveLookup = createPatternMatcher("{{", "}}");
|
|
5814
5790
|
var expressionResolveLookup = createPatternMatcher("@[", "]@");
|
|
5815
5791
|
function resolveAllRefs(node, resolveOptions, propertiesToSkip) {
|
|
5816
|
-
if (node === null || node === void 0 || typeof node !== "object" && typeof node !== "string") {
|
|
5792
|
+
if (node === null || node === void 0 || (typeof node === "undefined" ? "undefined" : _type_of(node)) !== "object" && typeof node !== "string") {
|
|
5817
5793
|
return node;
|
|
5818
5794
|
}
|
|
5819
5795
|
if (typeof node === "string") {
|
|
@@ -5826,7 +5802,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
5826
5802
|
}
|
|
5827
5803
|
var val = node[key];
|
|
5828
5804
|
var newVal = val;
|
|
5829
|
-
if (typeof val === "object") {
|
|
5805
|
+
if ((typeof val === "undefined" ? "undefined" : _type_of(val)) === "object") {
|
|
5830
5806
|
newVal = resolveAllRefs(val, resolveOptions, propertiesToSkip);
|
|
5831
5807
|
} else if (typeof val === "string") {
|
|
5832
5808
|
newVal = resolveString(val, resolveOptions);
|
|
@@ -6167,7 +6143,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
6167
6143
|
key: "applyParser",
|
|
6168
6144
|
value: function applyParser(parser) {
|
|
6169
6145
|
parser.hooks.parseNode.tap("asset", function(obj, nodeType, options, childOptions) {
|
|
6170
|
-
if ((childOptions === null || childOptions === void 0 ? void 0 : childOptions.key) === "asset" && typeof obj === "object") {
|
|
6146
|
+
if ((childOptions === null || childOptions === void 0 ? void 0 : childOptions.key) === "asset" && (typeof obj === "undefined" ? "undefined" : _type_of(obj)) === "object") {
|
|
6171
6147
|
var assetAST = parser.parseObject(obj, "asset", options);
|
|
6172
6148
|
if (!assetAST) {
|
|
6173
6149
|
return [];
|
|
@@ -6367,6 +6343,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
6367
6343
|
}();
|
|
6368
6344
|
var FlowInstance = /*#__PURE__*/ function() {
|
|
6369
6345
|
function FlowInstance(id, flow, options) {
|
|
6346
|
+
var _this = this;
|
|
6370
6347
|
_class_call_check(this, FlowInstance);
|
|
6371
6348
|
this.isTransitioning = false;
|
|
6372
6349
|
this.hooks = {
|
|
@@ -6383,60 +6360,55 @@ var ReferenceAssetsPlugin = function() {
|
|
|
6383
6360
|
this.flow = flow;
|
|
6384
6361
|
this.log = options === null || options === void 0 ? void 0 : options.logger;
|
|
6385
6362
|
this.history = [];
|
|
6386
|
-
|
|
6387
|
-
|
|
6388
|
-
var _ref = _async_to_generator(function(_oldState, nextState) {
|
|
6363
|
+
this.hooks.transition.tap("startPromise", function(_oldState, nextState) {
|
|
6364
|
+
return _async_to_generator(function() {
|
|
6389
6365
|
var newState;
|
|
6390
6366
|
return _ts_generator(this, function(_state) {
|
|
6391
6367
|
newState = nextState.value;
|
|
6392
|
-
if (
|
|
6393
|
-
|
|
6368
|
+
if (this.flowPromise && newState.state_type === "END") {
|
|
6369
|
+
this.flowPromise.resolve(newState);
|
|
6394
6370
|
}
|
|
6395
6371
|
return [
|
|
6396
6372
|
2
|
|
6397
6373
|
];
|
|
6398
6374
|
});
|
|
6399
|
-
});
|
|
6400
|
-
|
|
6401
|
-
return _ref.apply(this, arguments);
|
|
6402
|
-
};
|
|
6403
|
-
}());
|
|
6375
|
+
}).call(_this);
|
|
6376
|
+
});
|
|
6404
6377
|
}
|
|
6405
6378
|
_create_class(FlowInstance, [
|
|
6406
6379
|
{
|
|
6407
6380
|
key: "start",
|
|
6408
6381
|
value: /** Start the state machine */ function start() {
|
|
6409
|
-
var _this = this;
|
|
6410
6382
|
return _async_to_generator(function() {
|
|
6411
6383
|
var _this_log, initialState;
|
|
6412
6384
|
return _ts_generator(this, function(_state) {
|
|
6413
|
-
if (
|
|
6385
|
+
if (this.flowPromise) {
|
|
6414
6386
|
;
|
|
6415
|
-
(_this_log =
|
|
6387
|
+
(_this_log = this.log) === null || _this_log === void 0 ? void 0 : _this_log.warn("Already called start for flow");
|
|
6416
6388
|
return [
|
|
6417
6389
|
2,
|
|
6418
|
-
|
|
6390
|
+
this.flowPromise.promise
|
|
6419
6391
|
];
|
|
6420
6392
|
}
|
|
6421
|
-
|
|
6422
|
-
if (
|
|
6423
|
-
|
|
6393
|
+
this.flow = this.hooks.beforeStart.call(this.flow) || this.flow;
|
|
6394
|
+
if (this.flow.onStart) {
|
|
6395
|
+
this.hooks.onStart.call(this.flow.onStart);
|
|
6424
6396
|
}
|
|
6425
|
-
initialState =
|
|
6397
|
+
initialState = this.flow.startState;
|
|
6426
6398
|
if (!initialState) {
|
|
6427
6399
|
return [
|
|
6428
6400
|
2,
|
|
6429
6401
|
Promise.reject(new Error("No 'startState' defined for flow"))
|
|
6430
6402
|
];
|
|
6431
6403
|
}
|
|
6432
|
-
|
|
6433
|
-
|
|
6404
|
+
this.flowPromise = (0, import_p_defer2.default)();
|
|
6405
|
+
this.pushHistory(initialState);
|
|
6434
6406
|
return [
|
|
6435
6407
|
2,
|
|
6436
|
-
|
|
6408
|
+
this.flowPromise.promise
|
|
6437
6409
|
];
|
|
6438
6410
|
});
|
|
6439
|
-
})();
|
|
6411
|
+
}).call(this);
|
|
6440
6412
|
}
|
|
6441
6413
|
},
|
|
6442
6414
|
{
|
|
@@ -6488,7 +6460,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
6488
6460
|
throw new Error("No flow definition for: ".concat(stateName, " was found."));
|
|
6489
6461
|
}
|
|
6490
6462
|
var nextState = this.flow[stateName];
|
|
6491
|
-
if (!this.flow[stateName] || typeof nextState !== "object" || !("state_type" in nextState)) {
|
|
6463
|
+
if (!this.flow[stateName] || (typeof nextState === "undefined" ? "undefined" : _type_of(nextState)) !== "object" || !("state_type" in nextState)) {
|
|
6492
6464
|
var _this_log;
|
|
6493
6465
|
(_this_log = this.log) === null || _this_log === void 0 ? void 0 : _this_log.error("Flow doesn't contain any states named: ".concat(stateName));
|
|
6494
6466
|
return;
|
|
@@ -6548,30 +6520,30 @@ var ReferenceAssetsPlugin = function() {
|
|
|
6548
6520
|
{
|
|
6549
6521
|
key: "run",
|
|
6550
6522
|
value: function run(startState) {
|
|
6551
|
-
var _this = this;
|
|
6552
6523
|
return _async_to_generator(function() {
|
|
6553
|
-
var _this_log, startFlow, flow, end, firstItem;
|
|
6524
|
+
var _this, _this_log, startFlow, flow, end, firstItem;
|
|
6554
6525
|
return _ts_generator(this, function(_state) {
|
|
6555
6526
|
switch(_state.label){
|
|
6556
6527
|
case 0:
|
|
6557
|
-
|
|
6528
|
+
_this = this;
|
|
6529
|
+
if (!Object.prototype.hasOwnProperty.call(this.navigation, startState)) {
|
|
6558
6530
|
return [
|
|
6559
6531
|
2,
|
|
6560
6532
|
Promise.reject(new Error("No flow defined for: ".concat(startState)))
|
|
6561
6533
|
];
|
|
6562
6534
|
}
|
|
6563
|
-
startFlow =
|
|
6564
|
-
if (startFlow === null || typeof startFlow !== "object") {
|
|
6535
|
+
startFlow = this.navigation[startState];
|
|
6536
|
+
if (startFlow === null || (typeof startFlow === "undefined" ? "undefined" : _type_of(startFlow)) !== "object") {
|
|
6565
6537
|
return [
|
|
6566
6538
|
2,
|
|
6567
6539
|
Promise.reject(new Error("Flow: ".concat(startState, " needs to be an object")))
|
|
6568
6540
|
];
|
|
6569
6541
|
}
|
|
6570
|
-
(_this_log =
|
|
6542
|
+
(_this_log = this.log) === null || _this_log === void 0 ? void 0 : _this_log.debug("Starting flow: ".concat(startState));
|
|
6571
6543
|
flow = new FlowInstance(startState, startFlow, {
|
|
6572
|
-
logger:
|
|
6544
|
+
logger: this.log
|
|
6573
6545
|
});
|
|
6574
|
-
|
|
6546
|
+
this.addNewFlow(flow);
|
|
6575
6547
|
flow.hooks.afterTransition.tap("flow-controller", function(flowInstance) {
|
|
6576
6548
|
var _flowInstance_currentState;
|
|
6577
6549
|
if (((_flowInstance_currentState = flowInstance.currentState) === null || _flowInstance_currentState === void 0 ? void 0 : _flowInstance_currentState.value.state_type) === "FLOW") {
|
|
@@ -6591,10 +6563,10 @@ var ReferenceAssetsPlugin = function() {
|
|
|
6591
6563
|
];
|
|
6592
6564
|
case 1:
|
|
6593
6565
|
end = _state.sent();
|
|
6594
|
-
|
|
6595
|
-
if (
|
|
6566
|
+
this.navStack.pop();
|
|
6567
|
+
if (this.navStack.length > 0) {
|
|
6596
6568
|
firstItem = 0;
|
|
6597
|
-
|
|
6569
|
+
this.current = this.navStack[firstItem];
|
|
6598
6570
|
}
|
|
6599
6571
|
return [
|
|
6600
6572
|
2,
|
|
@@ -6602,16 +6574,15 @@ var ReferenceAssetsPlugin = function() {
|
|
|
6602
6574
|
];
|
|
6603
6575
|
}
|
|
6604
6576
|
});
|
|
6605
|
-
})();
|
|
6577
|
+
}).call(this);
|
|
6606
6578
|
}
|
|
6607
6579
|
},
|
|
6608
6580
|
{
|
|
6609
6581
|
key: "start",
|
|
6610
6582
|
value: function start() {
|
|
6611
|
-
var _this = this;
|
|
6612
6583
|
return _async_to_generator(function() {
|
|
6613
6584
|
return _ts_generator(this, function(_state) {
|
|
6614
|
-
if (!
|
|
6585
|
+
if (!this.navigation.BEGIN) {
|
|
6615
6586
|
return [
|
|
6616
6587
|
2,
|
|
6617
6588
|
Promise.reject(new Error("Must supply a BEGIN state"))
|
|
@@ -6619,10 +6590,10 @@ var ReferenceAssetsPlugin = function() {
|
|
|
6619
6590
|
}
|
|
6620
6591
|
return [
|
|
6621
6592
|
2,
|
|
6622
|
-
|
|
6593
|
+
this.run(this.navigation.BEGIN)
|
|
6623
6594
|
];
|
|
6624
6595
|
});
|
|
6625
|
-
})();
|
|
6596
|
+
}).call(this);
|
|
6626
6597
|
}
|
|
6627
6598
|
}
|
|
6628
6599
|
]);
|
|
@@ -7729,7 +7700,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
7729
7700
|
var parentBinding = resolved.parent();
|
|
7730
7701
|
var property = resolved.key();
|
|
7731
7702
|
var parentValue = this.get(parentBinding);
|
|
7732
|
-
var existedBeforeDelete = typeof parentValue === "object" && parentValue !== null && Object.prototype.hasOwnProperty.call(parentValue, property);
|
|
7703
|
+
var existedBeforeDelete = (typeof parentValue === "undefined" ? "undefined" : _type_of(parentValue)) === "object" && parentValue !== null && Object.prototype.hasOwnProperty.call(parentValue, property);
|
|
7733
7704
|
this.getModel().delete(resolved, options);
|
|
7734
7705
|
if (existedBeforeDelete && !this.get(resolved)) {
|
|
7735
7706
|
this.trash.add(resolved);
|
|
@@ -7830,7 +7801,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
7830
7801
|
var expressionEvaluator;
|
|
7831
7802
|
var handleEval = function(exp) {
|
|
7832
7803
|
if (exp) {
|
|
7833
|
-
if (typeof exp === "object" && "exp" in exp) {
|
|
7804
|
+
if ((typeof exp === "undefined" ? "undefined" : _type_of(exp)) === "object" && "exp" in exp) {
|
|
7834
7805
|
expressionEvaluator === null || expressionEvaluator === void 0 ? void 0 : expressionEvaluator.evaluate(exp.exp);
|
|
7835
7806
|
} else {
|
|
7836
7807
|
expressionEvaluator === null || expressionEvaluator === void 0 ? void 0 : expressionEvaluator.evaluate(exp);
|
|
@@ -8091,7 +8062,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
8091
8062
|
flow.hooks.beforeTransition.tap("player", function(state, transitionVal) {
|
|
8092
8063
|
var computedTransitionVal = state.transitions[transitionVal] ? transitionVal : "*";
|
|
8093
8064
|
if (state.onEnd && state.transitions[computedTransitionVal]) {
|
|
8094
|
-
if (
|
|
8065
|
+
if (_type_of(state.onEnd) === "object" && "exp" in state.onEnd) {
|
|
8095
8066
|
expressionEvaluator === null || expressionEvaluator === void 0 ? void 0 : expressionEvaluator.evaluate(state.onEnd.exp);
|
|
8096
8067
|
} else {
|
|
8097
8068
|
expressionEvaluator === null || expressionEvaluator === void 0 ? void 0 : expressionEvaluator.evaluate(state.onEnd);
|
|
@@ -8250,12 +8221,12 @@ var ReferenceAssetsPlugin = function() {
|
|
|
8250
8221
|
{
|
|
8251
8222
|
key: "start",
|
|
8252
8223
|
value: function start(payload) {
|
|
8253
|
-
var _this = this;
|
|
8254
8224
|
return _async_to_generator(function() {
|
|
8255
|
-
var _payload_id, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
|
|
8225
|
+
var _this, _payload_id, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
|
|
8256
8226
|
return _ts_generator(this, function(_state) {
|
|
8257
8227
|
switch(_state.label){
|
|
8258
8228
|
case 0:
|
|
8229
|
+
_this = this;
|
|
8259
8230
|
ref = Symbol((_payload_id = payload === null || payload === void 0 ? void 0 : payload.id) !== null && _payload_id !== void 0 ? _payload_id : "payload");
|
|
8260
8231
|
maybeUpdateState = function(newState) {
|
|
8261
8232
|
if (_this.state.ref !== ref) {
|
|
@@ -8265,7 +8236,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
8265
8236
|
_this.setState(newState);
|
|
8266
8237
|
return newState;
|
|
8267
8238
|
};
|
|
8268
|
-
|
|
8239
|
+
this.setState({
|
|
8269
8240
|
status: "not-started",
|
|
8270
8241
|
ref: ref
|
|
8271
8242
|
});
|
|
@@ -8277,8 +8248,8 @@ var ReferenceAssetsPlugin = function() {
|
|
|
8277
8248
|
,
|
|
8278
8249
|
4
|
|
8279
8250
|
]);
|
|
8280
|
-
_this_setupFlow =
|
|
8281
|
-
|
|
8251
|
+
_this_setupFlow = this.setupFlow(payload), state = _this_setupFlow.state, start = _this_setupFlow.start;
|
|
8252
|
+
this.setState(_object_spread({
|
|
8282
8253
|
ref: ref
|
|
8283
8254
|
}, state));
|
|
8284
8255
|
start();
|
|
@@ -8323,7 +8294,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
8323
8294
|
];
|
|
8324
8295
|
}
|
|
8325
8296
|
});
|
|
8326
|
-
})();
|
|
8297
|
+
}).call(this);
|
|
8327
8298
|
}
|
|
8328
8299
|
}
|
|
8329
8300
|
]);
|
|
@@ -8424,6 +8395,15 @@ var ReferenceAssetsPlugin = function() {
|
|
|
8424
8395
|
}
|
|
8425
8396
|
return child.value;
|
|
8426
8397
|
};
|
|
8398
|
+
var requiresAssetWrapper = function(node) {
|
|
8399
|
+
if (node.type === NodeType.Asset) {
|
|
8400
|
+
return true;
|
|
8401
|
+
}
|
|
8402
|
+
if (node.type !== NodeType.Applicability) {
|
|
8403
|
+
return false;
|
|
8404
|
+
}
|
|
8405
|
+
return node.value.type === NodeType.Asset;
|
|
8406
|
+
};
|
|
8427
8407
|
var defaultGetNodeId = function(node) {
|
|
8428
8408
|
return "async-".concat(node.value.id);
|
|
8429
8409
|
};
|
|
@@ -8450,8 +8430,17 @@ var ReferenceAssetsPlugin = function() {
|
|
|
8450
8430
|
var asyncNode = Builder.asyncNode(id, flatten2, replaceFunction);
|
|
8451
8431
|
var multiNode;
|
|
8452
8432
|
if (asset) {
|
|
8453
|
-
|
|
8454
|
-
|
|
8433
|
+
if (requiresAssetWrapper(asset)) {
|
|
8434
|
+
var assetWrappedNode = Builder.assetWrapper(asset);
|
|
8435
|
+
multiNode = Builder.multiNode(assetWrappedNode, asyncNode);
|
|
8436
|
+
} else if (asset.type === NodeType.MultiNode) {
|
|
8437
|
+
var _Builder;
|
|
8438
|
+
multiNode = (_Builder = Builder).multiNode.apply(_Builder, _to_consumable_array(asset.values).concat([
|
|
8439
|
+
asyncNode
|
|
8440
|
+
]));
|
|
8441
|
+
} else {
|
|
8442
|
+
multiNode = Builder.multiNode(asset, asyncNode);
|
|
8443
|
+
}
|
|
8455
8444
|
} else {
|
|
8456
8445
|
multiNode = Builder.multiNode(asyncNode);
|
|
8457
8446
|
}
|
|
@@ -8482,8 +8471,8 @@ var ReferenceAssetsPlugin = function() {
|
|
|
8482
8471
|
});
|
|
8483
8472
|
}
|
|
8484
8473
|
if (asyncHandler) {
|
|
8485
|
-
this.hooks.onAsyncNode.tap("async", function() {
|
|
8486
|
-
|
|
8474
|
+
this.hooks.onAsyncNode.tap("async", function(node, callback) {
|
|
8475
|
+
return _async_to_generator(function() {
|
|
8487
8476
|
return _ts_generator(this, function(_state) {
|
|
8488
8477
|
switch(_state.label){
|
|
8489
8478
|
case 0:
|
|
@@ -8498,11 +8487,8 @@ var ReferenceAssetsPlugin = function() {
|
|
|
8498
8487
|
];
|
|
8499
8488
|
}
|
|
8500
8489
|
});
|
|
8501
|
-
});
|
|
8502
|
-
|
|
8503
|
-
return _ref.apply(this, arguments);
|
|
8504
|
-
};
|
|
8505
|
-
}());
|
|
8490
|
+
})();
|
|
8491
|
+
});
|
|
8506
8492
|
}
|
|
8507
8493
|
}
|
|
8508
8494
|
_create_class(_AsyncNodePlugin2, [
|
|
@@ -8657,39 +8643,41 @@ var ReferenceAssetsPlugin = function() {
|
|
|
8657
8643
|
{
|
|
8658
8644
|
key: "runAsyncNode",
|
|
8659
8645
|
value: function runAsyncNode(node, context, options) {
|
|
8660
|
-
var _this = this;
|
|
8661
8646
|
return _async_to_generator(function() {
|
|
8662
|
-
var _this_basePlugin, result, e, _this_basePlugin1, _options_logger, error, result1, _this_basePlugin_getPlayerInstance, _this_basePlugin2, playerState;
|
|
8647
|
+
var _this, _this_basePlugin, result, e, _this_basePlugin1, _options_logger, error, result1, _this_basePlugin_getPlayerInstance, _this_basePlugin2, playerState;
|
|
8663
8648
|
return _ts_generator(this, function(_state) {
|
|
8664
8649
|
switch(_state.label){
|
|
8665
8650
|
case 0:
|
|
8651
|
+
_this = this;
|
|
8652
|
+
_state.label = 1;
|
|
8653
|
+
case 1:
|
|
8666
8654
|
_state.trys.push([
|
|
8667
|
-
|
|
8668
|
-
|
|
8655
|
+
1,
|
|
8656
|
+
3,
|
|
8669
8657
|
,
|
|
8670
|
-
|
|
8658
|
+
4
|
|
8671
8659
|
]);
|
|
8672
8660
|
return [
|
|
8673
8661
|
4,
|
|
8674
|
-
(_this_basePlugin =
|
|
8662
|
+
(_this_basePlugin = this.basePlugin) === null || _this_basePlugin === void 0 ? void 0 : _this_basePlugin.hooks.onAsyncNode.call(node, function(result2) {
|
|
8675
8663
|
_this.parseNodeAndUpdate(node, context, result2, options);
|
|
8676
8664
|
})
|
|
8677
8665
|
];
|
|
8678
|
-
case
|
|
8666
|
+
case 2:
|
|
8679
8667
|
result = _state.sent();
|
|
8680
8668
|
context.inProgressNodes.delete(node.id);
|
|
8681
|
-
|
|
8669
|
+
this.parseNodeAndUpdate(node, context, result, options);
|
|
8682
8670
|
return [
|
|
8683
8671
|
3,
|
|
8684
|
-
|
|
8672
|
+
4
|
|
8685
8673
|
];
|
|
8686
|
-
case
|
|
8674
|
+
case 3:
|
|
8687
8675
|
e = _state.sent();
|
|
8688
8676
|
error = _instanceof(e, Error) ? e : new Error(String(e));
|
|
8689
|
-
result1 = (_this_basePlugin1 =
|
|
8677
|
+
result1 = (_this_basePlugin1 = this.basePlugin) === null || _this_basePlugin1 === void 0 ? void 0 : _this_basePlugin1.hooks.onAsyncNodeError.call(error, node);
|
|
8690
8678
|
if (result1 === void 0) {
|
|
8691
8679
|
;
|
|
8692
|
-
playerState = (_this_basePlugin2 =
|
|
8680
|
+
playerState = (_this_basePlugin2 = this.basePlugin) === null || _this_basePlugin2 === void 0 ? void 0 : (_this_basePlugin_getPlayerInstance = _this_basePlugin2.getPlayerInstance()) === null || _this_basePlugin_getPlayerInstance === void 0 ? void 0 : _this_basePlugin_getPlayerInstance.getState();
|
|
8693
8681
|
if ((playerState === null || playerState === void 0 ? void 0 : playerState.status) === "in-progress") {
|
|
8694
8682
|
playerState.fail(error);
|
|
8695
8683
|
}
|
|
@@ -8699,18 +8687,18 @@ var ReferenceAssetsPlugin = function() {
|
|
|
8699
8687
|
}
|
|
8700
8688
|
(_options_logger = options.logger) === null || _options_logger === void 0 ? void 0 : _options_logger.error("Async node handling failed and resolved with a fallback. Error:", error);
|
|
8701
8689
|
context.inProgressNodes.delete(node.id);
|
|
8702
|
-
|
|
8690
|
+
this.parseNodeAndUpdate(node, context, result1, options);
|
|
8703
8691
|
return [
|
|
8704
8692
|
3,
|
|
8705
|
-
|
|
8693
|
+
4
|
|
8706
8694
|
];
|
|
8707
|
-
case
|
|
8695
|
+
case 4:
|
|
8708
8696
|
return [
|
|
8709
8697
|
2
|
|
8710
8698
|
];
|
|
8711
8699
|
}
|
|
8712
8700
|
});
|
|
8713
|
-
})();
|
|
8701
|
+
}).call(this);
|
|
8714
8702
|
}
|
|
8715
8703
|
},
|
|
8716
8704
|
{
|
|
@@ -8722,7 +8710,7 @@ var ReferenceAssetsPlugin = function() {
|
|
|
8722
8710
|
{
|
|
8723
8711
|
key: "isDeterminedAsync",
|
|
8724
8712
|
value: function isDeterminedAsync(obj) {
|
|
8725
|
-
return typeof obj === "object" && obj !== null && Object.prototype.hasOwnProperty.call(obj, "async");
|
|
8713
|
+
return (typeof obj === "undefined" ? "undefined" : _type_of(obj)) === "object" && obj !== null && Object.prototype.hasOwnProperty.call(obj, "async");
|
|
8726
8714
|
}
|
|
8727
8715
|
},
|
|
8728
8716
|
{
|