@mjhls/mjh-framework 1.0.238 → 1.0.240
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/README.md +1 -1
- package/dist/cjs/AdSlot-c472fff6.js +1192 -0
- package/dist/cjs/DeckContent.js +6 -5
- package/dist/cjs/DeckQueue.js +5 -5
- package/dist/cjs/{Dfp-045b016b.js → Dfp-7a5533f9.js} +1 -1
- package/dist/cjs/{GridContent-53e78cbf.js → GridContent-f9e3fff5.js} +7 -7
- package/dist/cjs/GridContent.js +8 -7
- package/dist/cjs/MasterDeck.js +331 -13
- package/dist/cjs/{Normal-a94a1ec8.js → Normal-0497eb61.js} +5 -5
- package/dist/cjs/QueueDeckExpanded.js +2 -2
- package/dist/cjs/TemplateNormal.js +6 -5
- package/dist/cjs/VideoSeriesListing.js +2 -2
- package/dist/cjs/{debounce-bbca43c4.js → debounce-783eb233.js} +3 -0
- package/dist/cjs/{get-af2516a4.js → get-1f91592f.js} +1 -1
- package/dist/cjs/index.js +118 -842
- package/dist/cjs/{inherits-5b5ca8db.js → inherits-9898af5a.js} +2 -4
- package/dist/cjs/{main-d9a1b014.js → main-0ea1b808.js} +51 -0
- package/dist/cjs/{MasterDeck-91c6ad85.js → promise-b96c61f8.js} +7 -340
- package/dist/cjs/{toConsumableArray-7e4caf3c.js → toConsumableArray-f05a306f.js} +5 -52
- package/dist/esm/AdSlot-bdd7a629.js +1183 -0
- package/dist/esm/DeckContent.js +11 -10
- package/dist/esm/DeckQueue.js +9 -9
- package/dist/esm/{Dfp-01f14ae3.js → Dfp-71879c9d.js} +5 -5
- package/dist/esm/{GridContent-f5bc4d75.js → GridContent-d4f5457e.js} +8 -8
- package/dist/esm/GridContent.js +13 -12
- package/dist/esm/MasterDeck.js +333 -15
- package/dist/esm/{Normal-357f00d1.js → Normal-e1855047.js} +6 -6
- package/dist/esm/QueueDeckExpanded.js +7 -7
- package/dist/esm/{TaxonomyCard-f74512cb.js → TaxonomyCard-ee1a22ae.js} +1 -1
- package/dist/esm/TaxonomyCard.js +3 -3
- package/dist/esm/TemplateNormal.js +10 -9
- package/dist/esm/{Ustream-62a07a32.js → Ustream-d51b9b11.js} +1 -1
- package/dist/esm/Ustream.js +5 -5
- package/dist/esm/VideoSeriesListing.js +5 -5
- package/dist/esm/{_to-object-86553f76.js → _to-object-b9b796ec.js} +1 -1
- package/dist/esm/{core.get-iterator-method-709061dc.js → core.get-iterator-method-31c1fb1a.js} +2 -2
- package/dist/esm/{debounce-fa7fbf11.js → debounce-806f886b.js} +3 -1
- package/dist/esm/{extends-7f88fa22.js → extends-dbbe308d.js} +1 -1
- package/dist/esm/{get-8d382479.js → get-b2201dc8.js} +1 -1
- package/dist/esm/index.js +124 -850
- package/dist/esm/{inherits-a82a4471.js → inherits-a75c8a1c.js} +5 -6
- package/dist/esm/{main-eecf7b27.js → main-155ec04f.js} +48 -1
- package/dist/esm/{MasterDeck-5dd97a66.js → promise-683a9c54.js} +6 -335
- package/dist/esm/{slicedToArray-eb7eca9e.js → slicedToArray-d0a9593a.js} +3 -3
- package/dist/esm/{toConsumableArray-08d50169.js → toConsumableArray-eb308ede.js} +5 -49
- package/dist/esm/{web.dom.iterable-f05d2f57.js → web.dom.iterable-3be50d6c.js} +2 -2
- package/package.json +3 -2
- package/dist/cjs/AdSlot-1fe1c231.js +0 -69
- package/dist/esm/AdSlot-017b8051.js +0 -64
package/dist/cjs/index.js
CHANGED
|
@@ -7,10 +7,12 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
|
|
|
7
7
|
var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
|
|
8
8
|
var _toObject = require('./_to-object-329a650b.js');
|
|
9
9
|
require('./web.dom.iterable-0998bdc3.js');
|
|
10
|
-
var
|
|
11
|
-
var
|
|
10
|
+
var debounce = require('./debounce-783eb233.js');
|
|
11
|
+
var main = require('./main-0ea1b808.js');
|
|
12
|
+
var toConsumableArray = require('./toConsumableArray-f05a306f.js');
|
|
12
13
|
require('./core.get-iterator-method-e049ca4a.js');
|
|
13
14
|
var _extends$2 = require('./extends-e94dbea5.js');
|
|
15
|
+
var inherits$2 = require('./inherits-9898af5a.js');
|
|
14
16
|
var React = require('react');
|
|
15
17
|
var React__default = _interopDefault(React);
|
|
16
18
|
var index = require('./index-fa3cec70.js');
|
|
@@ -23,17 +25,16 @@ var visibilitySensor = require('./visibility-sensor-b72d9527.js');
|
|
|
23
25
|
var Link = _interopDefault(require('next/link'));
|
|
24
26
|
var Router = require('next/router');
|
|
25
27
|
var Router__default = _interopDefault(Router);
|
|
26
|
-
var debounce = require('./debounce-bbca43c4.js');
|
|
27
28
|
require('react-dom');
|
|
28
29
|
var index$1 = require('./index-39beccb3.js');
|
|
29
30
|
require('./index-fa0fb52c.js');
|
|
30
|
-
var main = require('./main-d9a1b014.js');
|
|
31
31
|
var entities = require('./entities-310b46ee.js');
|
|
32
32
|
var slicedToArray = require('./slicedToArray-e38fb29d.js');
|
|
33
|
-
var AdSlot = require('./AdSlot-
|
|
33
|
+
var AdSlot = require('./AdSlot-c472fff6.js');
|
|
34
|
+
require('./promise-b96c61f8.js');
|
|
34
35
|
var DeckContent = require('./DeckContent.js');
|
|
35
|
-
require('./get-
|
|
36
|
-
var GridContent = require('./GridContent-
|
|
36
|
+
require('./get-1f91592f.js');
|
|
37
|
+
var GridContent = require('./GridContent-f9e3fff5.js');
|
|
37
38
|
var DeckQueue = require('./DeckQueue.js');
|
|
38
39
|
require('react-bootstrap/Media');
|
|
39
40
|
var ThumbnailCard = require('./ThumbnailCard.js');
|
|
@@ -44,14 +45,14 @@ var reactBootstrap = require('react-bootstrap');
|
|
|
44
45
|
var QueueDeckExpanded = require('./QueueDeckExpanded.js');
|
|
45
46
|
var index_esm = require('./index.esm-340d3792.js');
|
|
46
47
|
var VideoSeriesListing = require('./VideoSeriesListing.js');
|
|
47
|
-
var MasterDeck = require('./MasterDeck
|
|
48
|
+
var MasterDeck = require('./MasterDeck.js');
|
|
48
49
|
var Button = _interopDefault(require('react-bootstrap/Button'));
|
|
49
50
|
var PublicationDeck = require('./PublicationDeck.js');
|
|
50
51
|
var IssueDeck = require('./IssueDeck.js');
|
|
51
52
|
require('react-bootstrap/Badge');
|
|
52
53
|
var IssueContentDeck = require('./IssueContentDeck.js');
|
|
53
54
|
var Spinner = _interopDefault(require('react-bootstrap/Spinner'));
|
|
54
|
-
var TemplateNormal = require('./Normal-
|
|
55
|
+
var TemplateNormal = require('./Normal-0497eb61.js');
|
|
55
56
|
require('react-bootstrap/ListGroup');
|
|
56
57
|
var Head = _interopDefault(require('next/head'));
|
|
57
58
|
var Accordion = _interopDefault(require('react-bootstrap/Accordion'));
|
|
@@ -69,17 +70,6 @@ var DropdownButton = _interopDefault(require('react-bootstrap/DropdownButton'));
|
|
|
69
70
|
var Dropdown = _interopDefault(require('react-bootstrap/Dropdown'));
|
|
70
71
|
var Ustream = require('./Ustream-85b14a8d.js');
|
|
71
72
|
|
|
72
|
-
var $JSON = _toObject._core.JSON || (_toObject._core.JSON = { stringify: JSON.stringify });
|
|
73
|
-
var stringify = function stringify(it) { // eslint-disable-line no-unused-vars
|
|
74
|
-
return $JSON.stringify.apply($JSON, arguments);
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
var stringify$1 = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
78
|
-
module.exports = { "default": stringify, __esModule: true };
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
var _JSON$stringify = _commonjsHelpers.unwrapExports(stringify$1);
|
|
82
|
-
|
|
83
73
|
var momentTimezone = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
84
74
|
//! moment-timezone.js
|
|
85
75
|
//! version : 0.5.31
|
|
@@ -1631,12 +1621,12 @@ var latest = {
|
|
|
1631
1621
|
};
|
|
1632
1622
|
|
|
1633
1623
|
var latest$1 = /*#__PURE__*/Object.freeze({
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1624
|
+
__proto__: null,
|
|
1625
|
+
version: version,
|
|
1626
|
+
zones: zones,
|
|
1627
|
+
links: links,
|
|
1628
|
+
countries: countries,
|
|
1629
|
+
'default': latest
|
|
1640
1630
|
});
|
|
1641
1631
|
|
|
1642
1632
|
var require$$1 = _commonjsHelpers.getCjsExportFromNamespace(latest$1);
|
|
@@ -1707,7 +1697,7 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
1707
1697
|
'x-api-key': clientId,
|
|
1708
1698
|
Authorization: 'Bearer ' + accessToken
|
|
1709
1699
|
},
|
|
1710
|
-
body: _JSON$stringify({ filter: filter }),
|
|
1700
|
+
body: AdSlot._JSON$stringify({ filter: filter }),
|
|
1711
1701
|
method: 'POST'
|
|
1712
1702
|
}).then(function (response) {
|
|
1713
1703
|
return response.json();
|
|
@@ -1787,7 +1777,7 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
1787
1777
|
'x-api-key': clientId,
|
|
1788
1778
|
Authorization: 'Bearer ' + accessToken
|
|
1789
1779
|
},
|
|
1790
|
-
body: _JSON$stringify({ filter: filter }),
|
|
1780
|
+
body: AdSlot._JSON$stringify({ filter: filter }),
|
|
1791
1781
|
method: 'POST'
|
|
1792
1782
|
}).then(function (response) {
|
|
1793
1783
|
return response.json();
|
|
@@ -2089,821 +2079,14 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
2089
2079
|
}
|
|
2090
2080
|
};
|
|
2091
2081
|
|
|
2092
|
-
var runtime = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
2093
|
-
/**
|
|
2094
|
-
* Copyright (c) 2014-present, Facebook, Inc.
|
|
2095
|
-
*
|
|
2096
|
-
* This source code is licensed under the MIT license found in the
|
|
2097
|
-
* LICENSE file in the root directory of this source tree.
|
|
2098
|
-
*/
|
|
2099
|
-
|
|
2100
|
-
!(function(global) {
|
|
2101
|
-
|
|
2102
|
-
var Op = Object.prototype;
|
|
2103
|
-
var hasOwn = Op.hasOwnProperty;
|
|
2104
|
-
var undefined$1; // More compressible than void 0.
|
|
2105
|
-
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
2106
|
-
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
2107
|
-
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
2108
|
-
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
2109
|
-
var runtime = global.regeneratorRuntime;
|
|
2110
|
-
if (runtime) {
|
|
2111
|
-
{
|
|
2112
|
-
// If regeneratorRuntime is defined globally and we're in a module,
|
|
2113
|
-
// make the exports object identical to regeneratorRuntime.
|
|
2114
|
-
module.exports = runtime;
|
|
2115
|
-
}
|
|
2116
|
-
// Don't bother evaluating the rest of this file if the runtime was
|
|
2117
|
-
// already defined globally.
|
|
2118
|
-
return;
|
|
2119
|
-
}
|
|
2120
|
-
|
|
2121
|
-
// Define the runtime globally (as expected by generated code) as either
|
|
2122
|
-
// module.exports (if we're in a module) or a new, empty object.
|
|
2123
|
-
runtime = global.regeneratorRuntime = module.exports ;
|
|
2124
|
-
|
|
2125
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
2126
|
-
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
2127
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
2128
|
-
var generator = Object.create(protoGenerator.prototype);
|
|
2129
|
-
var context = new Context(tryLocsList || []);
|
|
2130
|
-
|
|
2131
|
-
// The ._invoke method unifies the implementations of the .next,
|
|
2132
|
-
// .throw, and .return methods.
|
|
2133
|
-
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
2134
|
-
|
|
2135
|
-
return generator;
|
|
2136
|
-
}
|
|
2137
|
-
runtime.wrap = wrap;
|
|
2138
|
-
|
|
2139
|
-
// Try/catch helper to minimize deoptimizations. Returns a completion
|
|
2140
|
-
// record like context.tryEntries[i].completion. This interface could
|
|
2141
|
-
// have been (and was previously) designed to take a closure to be
|
|
2142
|
-
// invoked without arguments, but in all the cases we care about we
|
|
2143
|
-
// already have an existing method we want to call, so there's no need
|
|
2144
|
-
// to create a new function object. We can even get away with assuming
|
|
2145
|
-
// the method takes exactly one argument, since that happens to be true
|
|
2146
|
-
// in every case, so we don't have to touch the arguments object. The
|
|
2147
|
-
// only additional allocation required is the completion record, which
|
|
2148
|
-
// has a stable shape and so hopefully should be cheap to allocate.
|
|
2149
|
-
function tryCatch(fn, obj, arg) {
|
|
2150
|
-
try {
|
|
2151
|
-
return { type: "normal", arg: fn.call(obj, arg) };
|
|
2152
|
-
} catch (err) {
|
|
2153
|
-
return { type: "throw", arg: err };
|
|
2154
|
-
}
|
|
2155
|
-
}
|
|
2156
|
-
|
|
2157
|
-
var GenStateSuspendedStart = "suspendedStart";
|
|
2158
|
-
var GenStateSuspendedYield = "suspendedYield";
|
|
2159
|
-
var GenStateExecuting = "executing";
|
|
2160
|
-
var GenStateCompleted = "completed";
|
|
2161
|
-
|
|
2162
|
-
// Returning this object from the innerFn has the same effect as
|
|
2163
|
-
// breaking out of the dispatch switch statement.
|
|
2164
|
-
var ContinueSentinel = {};
|
|
2165
|
-
|
|
2166
|
-
// Dummy constructor functions that we use as the .constructor and
|
|
2167
|
-
// .constructor.prototype properties for functions that return Generator
|
|
2168
|
-
// objects. For full spec compliance, you may wish to configure your
|
|
2169
|
-
// minifier not to mangle the names of these two functions.
|
|
2170
|
-
function Generator() {}
|
|
2171
|
-
function GeneratorFunction() {}
|
|
2172
|
-
function GeneratorFunctionPrototype() {}
|
|
2173
|
-
|
|
2174
|
-
// This is a polyfill for %IteratorPrototype% for environments that
|
|
2175
|
-
// don't natively support it.
|
|
2176
|
-
var IteratorPrototype = {};
|
|
2177
|
-
IteratorPrototype[iteratorSymbol] = function () {
|
|
2178
|
-
return this;
|
|
2179
|
-
};
|
|
2180
|
-
|
|
2181
|
-
var getProto = Object.getPrototypeOf;
|
|
2182
|
-
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
2183
|
-
if (NativeIteratorPrototype &&
|
|
2184
|
-
NativeIteratorPrototype !== Op &&
|
|
2185
|
-
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
2186
|
-
// This environment has a native %IteratorPrototype%; use it instead
|
|
2187
|
-
// of the polyfill.
|
|
2188
|
-
IteratorPrototype = NativeIteratorPrototype;
|
|
2189
|
-
}
|
|
2190
|
-
|
|
2191
|
-
var Gp = GeneratorFunctionPrototype.prototype =
|
|
2192
|
-
Generator.prototype = Object.create(IteratorPrototype);
|
|
2193
|
-
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
|
|
2194
|
-
GeneratorFunctionPrototype.constructor = GeneratorFunction;
|
|
2195
|
-
GeneratorFunctionPrototype[toStringTagSymbol] =
|
|
2196
|
-
GeneratorFunction.displayName = "GeneratorFunction";
|
|
2197
|
-
|
|
2198
|
-
// Helper for defining the .next, .throw, and .return methods of the
|
|
2199
|
-
// Iterator interface in terms of a single ._invoke method.
|
|
2200
|
-
function defineIteratorMethods(prototype) {
|
|
2201
|
-
["next", "throw", "return"].forEach(function(method) {
|
|
2202
|
-
prototype[method] = function(arg) {
|
|
2203
|
-
return this._invoke(method, arg);
|
|
2204
|
-
};
|
|
2205
|
-
});
|
|
2206
|
-
}
|
|
2207
|
-
|
|
2208
|
-
runtime.isGeneratorFunction = function(genFun) {
|
|
2209
|
-
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
2210
|
-
return ctor
|
|
2211
|
-
? ctor === GeneratorFunction ||
|
|
2212
|
-
// For the native GeneratorFunction constructor, the best we can
|
|
2213
|
-
// do is to check its .name property.
|
|
2214
|
-
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
|
2215
|
-
: false;
|
|
2216
|
-
};
|
|
2217
|
-
|
|
2218
|
-
runtime.mark = function(genFun) {
|
|
2219
|
-
if (Object.setPrototypeOf) {
|
|
2220
|
-
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
2221
|
-
} else {
|
|
2222
|
-
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
2223
|
-
if (!(toStringTagSymbol in genFun)) {
|
|
2224
|
-
genFun[toStringTagSymbol] = "GeneratorFunction";
|
|
2225
|
-
}
|
|
2226
|
-
}
|
|
2227
|
-
genFun.prototype = Object.create(Gp);
|
|
2228
|
-
return genFun;
|
|
2229
|
-
};
|
|
2230
|
-
|
|
2231
|
-
// Within the body of any async function, `await x` is transformed to
|
|
2232
|
-
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
2233
|
-
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
2234
|
-
// meant to be awaited.
|
|
2235
|
-
runtime.awrap = function(arg) {
|
|
2236
|
-
return { __await: arg };
|
|
2237
|
-
};
|
|
2238
|
-
|
|
2239
|
-
function AsyncIterator(generator) {
|
|
2240
|
-
function invoke(method, arg, resolve, reject) {
|
|
2241
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
2242
|
-
if (record.type === "throw") {
|
|
2243
|
-
reject(record.arg);
|
|
2244
|
-
} else {
|
|
2245
|
-
var result = record.arg;
|
|
2246
|
-
var value = result.value;
|
|
2247
|
-
if (value &&
|
|
2248
|
-
typeof value === "object" &&
|
|
2249
|
-
hasOwn.call(value, "__await")) {
|
|
2250
|
-
return Promise.resolve(value.__await).then(function(value) {
|
|
2251
|
-
invoke("next", value, resolve, reject);
|
|
2252
|
-
}, function(err) {
|
|
2253
|
-
invoke("throw", err, resolve, reject);
|
|
2254
|
-
});
|
|
2255
|
-
}
|
|
2256
|
-
|
|
2257
|
-
return Promise.resolve(value).then(function(unwrapped) {
|
|
2258
|
-
// When a yielded Promise is resolved, its final value becomes
|
|
2259
|
-
// the .value of the Promise<{value,done}> result for the
|
|
2260
|
-
// current iteration. If the Promise is rejected, however, the
|
|
2261
|
-
// result for this iteration will be rejected with the same
|
|
2262
|
-
// reason. Note that rejections of yielded Promises are not
|
|
2263
|
-
// thrown back into the generator function, as is the case
|
|
2264
|
-
// when an awaited Promise is rejected. This difference in
|
|
2265
|
-
// behavior between yield and await is important, because it
|
|
2266
|
-
// allows the consumer to decide what to do with the yielded
|
|
2267
|
-
// rejection (swallow it and continue, manually .throw it back
|
|
2268
|
-
// into the generator, abandon iteration, whatever). With
|
|
2269
|
-
// await, by contrast, there is no opportunity to examine the
|
|
2270
|
-
// rejection reason outside the generator function, so the
|
|
2271
|
-
// only option is to throw it from the await expression, and
|
|
2272
|
-
// let the generator function handle the exception.
|
|
2273
|
-
result.value = unwrapped;
|
|
2274
|
-
resolve(result);
|
|
2275
|
-
}, reject);
|
|
2276
|
-
}
|
|
2277
|
-
}
|
|
2278
|
-
|
|
2279
|
-
var previousPromise;
|
|
2280
|
-
|
|
2281
|
-
function enqueue(method, arg) {
|
|
2282
|
-
function callInvokeWithMethodAndArg() {
|
|
2283
|
-
return new Promise(function(resolve, reject) {
|
|
2284
|
-
invoke(method, arg, resolve, reject);
|
|
2285
|
-
});
|
|
2286
|
-
}
|
|
2287
|
-
|
|
2288
|
-
return previousPromise =
|
|
2289
|
-
// If enqueue has been called before, then we want to wait until
|
|
2290
|
-
// all previous Promises have been resolved before calling invoke,
|
|
2291
|
-
// so that results are always delivered in the correct order. If
|
|
2292
|
-
// enqueue has not been called before, then it is important to
|
|
2293
|
-
// call invoke immediately, without waiting on a callback to fire,
|
|
2294
|
-
// so that the async generator function has the opportunity to do
|
|
2295
|
-
// any necessary setup in a predictable way. This predictability
|
|
2296
|
-
// is why the Promise constructor synchronously invokes its
|
|
2297
|
-
// executor callback, and why async functions synchronously
|
|
2298
|
-
// execute code before the first await. Since we implement simple
|
|
2299
|
-
// async functions in terms of async generators, it is especially
|
|
2300
|
-
// important to get this right, even though it requires care.
|
|
2301
|
-
previousPromise ? previousPromise.then(
|
|
2302
|
-
callInvokeWithMethodAndArg,
|
|
2303
|
-
// Avoid propagating failures to Promises returned by later
|
|
2304
|
-
// invocations of the iterator.
|
|
2305
|
-
callInvokeWithMethodAndArg
|
|
2306
|
-
) : callInvokeWithMethodAndArg();
|
|
2307
|
-
}
|
|
2308
|
-
|
|
2309
|
-
// Define the unified helper method that is used to implement .next,
|
|
2310
|
-
// .throw, and .return (see defineIteratorMethods).
|
|
2311
|
-
this._invoke = enqueue;
|
|
2312
|
-
}
|
|
2313
|
-
|
|
2314
|
-
defineIteratorMethods(AsyncIterator.prototype);
|
|
2315
|
-
AsyncIterator.prototype[asyncIteratorSymbol] = function () {
|
|
2316
|
-
return this;
|
|
2317
|
-
};
|
|
2318
|
-
runtime.AsyncIterator = AsyncIterator;
|
|
2319
|
-
|
|
2320
|
-
// Note that simple async functions are implemented on top of
|
|
2321
|
-
// AsyncIterator objects; they just return a Promise for the value of
|
|
2322
|
-
// the final result produced by the iterator.
|
|
2323
|
-
runtime.async = function(innerFn, outerFn, self, tryLocsList) {
|
|
2324
|
-
var iter = new AsyncIterator(
|
|
2325
|
-
wrap(innerFn, outerFn, self, tryLocsList)
|
|
2326
|
-
);
|
|
2327
|
-
|
|
2328
|
-
return runtime.isGeneratorFunction(outerFn)
|
|
2329
|
-
? iter // If outerFn is a generator, return the full iterator.
|
|
2330
|
-
: iter.next().then(function(result) {
|
|
2331
|
-
return result.done ? result.value : iter.next();
|
|
2332
|
-
});
|
|
2333
|
-
};
|
|
2334
|
-
|
|
2335
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
2336
|
-
var state = GenStateSuspendedStart;
|
|
2337
|
-
|
|
2338
|
-
return function invoke(method, arg) {
|
|
2339
|
-
if (state === GenStateExecuting) {
|
|
2340
|
-
throw new Error("Generator is already running");
|
|
2341
|
-
}
|
|
2342
|
-
|
|
2343
|
-
if (state === GenStateCompleted) {
|
|
2344
|
-
if (method === "throw") {
|
|
2345
|
-
throw arg;
|
|
2346
|
-
}
|
|
2347
|
-
|
|
2348
|
-
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
2349
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
2350
|
-
return doneResult();
|
|
2351
|
-
}
|
|
2352
|
-
|
|
2353
|
-
context.method = method;
|
|
2354
|
-
context.arg = arg;
|
|
2355
|
-
|
|
2356
|
-
while (true) {
|
|
2357
|
-
var delegate = context.delegate;
|
|
2358
|
-
if (delegate) {
|
|
2359
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
2360
|
-
if (delegateResult) {
|
|
2361
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
2362
|
-
return delegateResult;
|
|
2363
|
-
}
|
|
2364
|
-
}
|
|
2365
|
-
|
|
2366
|
-
if (context.method === "next") {
|
|
2367
|
-
// Setting context._sent for legacy support of Babel's
|
|
2368
|
-
// function.sent implementation.
|
|
2369
|
-
context.sent = context._sent = context.arg;
|
|
2370
|
-
|
|
2371
|
-
} else if (context.method === "throw") {
|
|
2372
|
-
if (state === GenStateSuspendedStart) {
|
|
2373
|
-
state = GenStateCompleted;
|
|
2374
|
-
throw context.arg;
|
|
2375
|
-
}
|
|
2376
|
-
|
|
2377
|
-
context.dispatchException(context.arg);
|
|
2378
|
-
|
|
2379
|
-
} else if (context.method === "return") {
|
|
2380
|
-
context.abrupt("return", context.arg);
|
|
2381
|
-
}
|
|
2382
|
-
|
|
2383
|
-
state = GenStateExecuting;
|
|
2384
|
-
|
|
2385
|
-
var record = tryCatch(innerFn, self, context);
|
|
2386
|
-
if (record.type === "normal") {
|
|
2387
|
-
// If an exception is thrown from innerFn, we leave state ===
|
|
2388
|
-
// GenStateExecuting and loop back for another invocation.
|
|
2389
|
-
state = context.done
|
|
2390
|
-
? GenStateCompleted
|
|
2391
|
-
: GenStateSuspendedYield;
|
|
2392
|
-
|
|
2393
|
-
if (record.arg === ContinueSentinel) {
|
|
2394
|
-
continue;
|
|
2395
|
-
}
|
|
2396
|
-
|
|
2397
|
-
return {
|
|
2398
|
-
value: record.arg,
|
|
2399
|
-
done: context.done
|
|
2400
|
-
};
|
|
2401
|
-
|
|
2402
|
-
} else if (record.type === "throw") {
|
|
2403
|
-
state = GenStateCompleted;
|
|
2404
|
-
// Dispatch the exception by looping back around to the
|
|
2405
|
-
// context.dispatchException(context.arg) call above.
|
|
2406
|
-
context.method = "throw";
|
|
2407
|
-
context.arg = record.arg;
|
|
2408
|
-
}
|
|
2409
|
-
}
|
|
2410
|
-
};
|
|
2411
|
-
}
|
|
2412
|
-
|
|
2413
|
-
// Call delegate.iterator[context.method](context.arg) and handle the
|
|
2414
|
-
// result, either by returning a { value, done } result from the
|
|
2415
|
-
// delegate iterator, or by modifying context.method and context.arg,
|
|
2416
|
-
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
2417
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
2418
|
-
var method = delegate.iterator[context.method];
|
|
2419
|
-
if (method === undefined$1) {
|
|
2420
|
-
// A .throw or .return when the delegate iterator has no .throw
|
|
2421
|
-
// method always terminates the yield* loop.
|
|
2422
|
-
context.delegate = null;
|
|
2423
|
-
|
|
2424
|
-
if (context.method === "throw") {
|
|
2425
|
-
if (delegate.iterator.return) {
|
|
2426
|
-
// If the delegate iterator has a return method, give it a
|
|
2427
|
-
// chance to clean up.
|
|
2428
|
-
context.method = "return";
|
|
2429
|
-
context.arg = undefined$1;
|
|
2430
|
-
maybeInvokeDelegate(delegate, context);
|
|
2431
|
-
|
|
2432
|
-
if (context.method === "throw") {
|
|
2433
|
-
// If maybeInvokeDelegate(context) changed context.method from
|
|
2434
|
-
// "return" to "throw", let that override the TypeError below.
|
|
2435
|
-
return ContinueSentinel;
|
|
2436
|
-
}
|
|
2437
|
-
}
|
|
2438
|
-
|
|
2439
|
-
context.method = "throw";
|
|
2440
|
-
context.arg = new TypeError(
|
|
2441
|
-
"The iterator does not provide a 'throw' method");
|
|
2442
|
-
}
|
|
2443
|
-
|
|
2444
|
-
return ContinueSentinel;
|
|
2445
|
-
}
|
|
2446
|
-
|
|
2447
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
2448
|
-
|
|
2449
|
-
if (record.type === "throw") {
|
|
2450
|
-
context.method = "throw";
|
|
2451
|
-
context.arg = record.arg;
|
|
2452
|
-
context.delegate = null;
|
|
2453
|
-
return ContinueSentinel;
|
|
2454
|
-
}
|
|
2455
|
-
|
|
2456
|
-
var info = record.arg;
|
|
2457
|
-
|
|
2458
|
-
if (! info) {
|
|
2459
|
-
context.method = "throw";
|
|
2460
|
-
context.arg = new TypeError("iterator result is not an object");
|
|
2461
|
-
context.delegate = null;
|
|
2462
|
-
return ContinueSentinel;
|
|
2463
|
-
}
|
|
2464
|
-
|
|
2465
|
-
if (info.done) {
|
|
2466
|
-
// Assign the result of the finished delegate to the temporary
|
|
2467
|
-
// variable specified by delegate.resultName (see delegateYield).
|
|
2468
|
-
context[delegate.resultName] = info.value;
|
|
2469
|
-
|
|
2470
|
-
// Resume execution at the desired location (see delegateYield).
|
|
2471
|
-
context.next = delegate.nextLoc;
|
|
2472
|
-
|
|
2473
|
-
// If context.method was "throw" but the delegate handled the
|
|
2474
|
-
// exception, let the outer generator proceed normally. If
|
|
2475
|
-
// context.method was "next", forget context.arg since it has been
|
|
2476
|
-
// "consumed" by the delegate iterator. If context.method was
|
|
2477
|
-
// "return", allow the original .return call to continue in the
|
|
2478
|
-
// outer generator.
|
|
2479
|
-
if (context.method !== "return") {
|
|
2480
|
-
context.method = "next";
|
|
2481
|
-
context.arg = undefined$1;
|
|
2482
|
-
}
|
|
2483
|
-
|
|
2484
|
-
} else {
|
|
2485
|
-
// Re-yield the result returned by the delegate method.
|
|
2486
|
-
return info;
|
|
2487
|
-
}
|
|
2488
|
-
|
|
2489
|
-
// The delegate iterator is finished, so forget it and continue with
|
|
2490
|
-
// the outer generator.
|
|
2491
|
-
context.delegate = null;
|
|
2492
|
-
return ContinueSentinel;
|
|
2493
|
-
}
|
|
2494
|
-
|
|
2495
|
-
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
2496
|
-
// unified ._invoke helper method.
|
|
2497
|
-
defineIteratorMethods(Gp);
|
|
2498
|
-
|
|
2499
|
-
Gp[toStringTagSymbol] = "Generator";
|
|
2500
|
-
|
|
2501
|
-
// A Generator should always return itself as the iterator object when the
|
|
2502
|
-
// @@iterator function is called on it. Some browsers' implementations of the
|
|
2503
|
-
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
2504
|
-
// object to not be returned from this call. This ensures that doesn't happen.
|
|
2505
|
-
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
2506
|
-
Gp[iteratorSymbol] = function() {
|
|
2507
|
-
return this;
|
|
2508
|
-
};
|
|
2509
|
-
|
|
2510
|
-
Gp.toString = function() {
|
|
2511
|
-
return "[object Generator]";
|
|
2512
|
-
};
|
|
2513
|
-
|
|
2514
|
-
function pushTryEntry(locs) {
|
|
2515
|
-
var entry = { tryLoc: locs[0] };
|
|
2516
|
-
|
|
2517
|
-
if (1 in locs) {
|
|
2518
|
-
entry.catchLoc = locs[1];
|
|
2519
|
-
}
|
|
2520
|
-
|
|
2521
|
-
if (2 in locs) {
|
|
2522
|
-
entry.finallyLoc = locs[2];
|
|
2523
|
-
entry.afterLoc = locs[3];
|
|
2524
|
-
}
|
|
2525
|
-
|
|
2526
|
-
this.tryEntries.push(entry);
|
|
2527
|
-
}
|
|
2528
|
-
|
|
2529
|
-
function resetTryEntry(entry) {
|
|
2530
|
-
var record = entry.completion || {};
|
|
2531
|
-
record.type = "normal";
|
|
2532
|
-
delete record.arg;
|
|
2533
|
-
entry.completion = record;
|
|
2534
|
-
}
|
|
2535
|
-
|
|
2536
|
-
function Context(tryLocsList) {
|
|
2537
|
-
// The root entry object (effectively a try statement without a catch
|
|
2538
|
-
// or a finally block) gives us a place to store values thrown from
|
|
2539
|
-
// locations where there is no enclosing try statement.
|
|
2540
|
-
this.tryEntries = [{ tryLoc: "root" }];
|
|
2541
|
-
tryLocsList.forEach(pushTryEntry, this);
|
|
2542
|
-
this.reset(true);
|
|
2543
|
-
}
|
|
2544
|
-
|
|
2545
|
-
runtime.keys = function(object) {
|
|
2546
|
-
var keys = [];
|
|
2547
|
-
for (var key in object) {
|
|
2548
|
-
keys.push(key);
|
|
2549
|
-
}
|
|
2550
|
-
keys.reverse();
|
|
2551
|
-
|
|
2552
|
-
// Rather than returning an object with a next method, we keep
|
|
2553
|
-
// things simple and return the next function itself.
|
|
2554
|
-
return function next() {
|
|
2555
|
-
while (keys.length) {
|
|
2556
|
-
var key = keys.pop();
|
|
2557
|
-
if (key in object) {
|
|
2558
|
-
next.value = key;
|
|
2559
|
-
next.done = false;
|
|
2560
|
-
return next;
|
|
2561
|
-
}
|
|
2562
|
-
}
|
|
2563
|
-
|
|
2564
|
-
// To avoid creating an additional object, we just hang the .value
|
|
2565
|
-
// and .done properties off the next function object itself. This
|
|
2566
|
-
// also ensures that the minifier will not anonymize the function.
|
|
2567
|
-
next.done = true;
|
|
2568
|
-
return next;
|
|
2569
|
-
};
|
|
2570
|
-
};
|
|
2571
|
-
|
|
2572
|
-
function values(iterable) {
|
|
2573
|
-
if (iterable) {
|
|
2574
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
2575
|
-
if (iteratorMethod) {
|
|
2576
|
-
return iteratorMethod.call(iterable);
|
|
2577
|
-
}
|
|
2578
|
-
|
|
2579
|
-
if (typeof iterable.next === "function") {
|
|
2580
|
-
return iterable;
|
|
2581
|
-
}
|
|
2582
|
-
|
|
2583
|
-
if (!isNaN(iterable.length)) {
|
|
2584
|
-
var i = -1, next = function next() {
|
|
2585
|
-
while (++i < iterable.length) {
|
|
2586
|
-
if (hasOwn.call(iterable, i)) {
|
|
2587
|
-
next.value = iterable[i];
|
|
2588
|
-
next.done = false;
|
|
2589
|
-
return next;
|
|
2590
|
-
}
|
|
2591
|
-
}
|
|
2592
|
-
|
|
2593
|
-
next.value = undefined$1;
|
|
2594
|
-
next.done = true;
|
|
2595
|
-
|
|
2596
|
-
return next;
|
|
2597
|
-
};
|
|
2598
|
-
|
|
2599
|
-
return next.next = next;
|
|
2600
|
-
}
|
|
2601
|
-
}
|
|
2602
|
-
|
|
2603
|
-
// Return an iterator with no values.
|
|
2604
|
-
return { next: doneResult };
|
|
2605
|
-
}
|
|
2606
|
-
runtime.values = values;
|
|
2607
|
-
|
|
2608
|
-
function doneResult() {
|
|
2609
|
-
return { value: undefined$1, done: true };
|
|
2610
|
-
}
|
|
2611
|
-
|
|
2612
|
-
Context.prototype = {
|
|
2613
|
-
constructor: Context,
|
|
2614
|
-
|
|
2615
|
-
reset: function(skipTempReset) {
|
|
2616
|
-
this.prev = 0;
|
|
2617
|
-
this.next = 0;
|
|
2618
|
-
// Resetting context._sent for legacy support of Babel's
|
|
2619
|
-
// function.sent implementation.
|
|
2620
|
-
this.sent = this._sent = undefined$1;
|
|
2621
|
-
this.done = false;
|
|
2622
|
-
this.delegate = null;
|
|
2623
|
-
|
|
2624
|
-
this.method = "next";
|
|
2625
|
-
this.arg = undefined$1;
|
|
2626
|
-
|
|
2627
|
-
this.tryEntries.forEach(resetTryEntry);
|
|
2628
|
-
|
|
2629
|
-
if (!skipTempReset) {
|
|
2630
|
-
for (var name in this) {
|
|
2631
|
-
// Not sure about the optimal order of these conditions:
|
|
2632
|
-
if (name.charAt(0) === "t" &&
|
|
2633
|
-
hasOwn.call(this, name) &&
|
|
2634
|
-
!isNaN(+name.slice(1))) {
|
|
2635
|
-
this[name] = undefined$1;
|
|
2636
|
-
}
|
|
2637
|
-
}
|
|
2638
|
-
}
|
|
2639
|
-
},
|
|
2640
|
-
|
|
2641
|
-
stop: function() {
|
|
2642
|
-
this.done = true;
|
|
2643
|
-
|
|
2644
|
-
var rootEntry = this.tryEntries[0];
|
|
2645
|
-
var rootRecord = rootEntry.completion;
|
|
2646
|
-
if (rootRecord.type === "throw") {
|
|
2647
|
-
throw rootRecord.arg;
|
|
2648
|
-
}
|
|
2649
|
-
|
|
2650
|
-
return this.rval;
|
|
2651
|
-
},
|
|
2652
|
-
|
|
2653
|
-
dispatchException: function(exception) {
|
|
2654
|
-
if (this.done) {
|
|
2655
|
-
throw exception;
|
|
2656
|
-
}
|
|
2657
|
-
|
|
2658
|
-
var context = this;
|
|
2659
|
-
function handle(loc, caught) {
|
|
2660
|
-
record.type = "throw";
|
|
2661
|
-
record.arg = exception;
|
|
2662
|
-
context.next = loc;
|
|
2663
|
-
|
|
2664
|
-
if (caught) {
|
|
2665
|
-
// If the dispatched exception was caught by a catch block,
|
|
2666
|
-
// then let that catch block handle the exception normally.
|
|
2667
|
-
context.method = "next";
|
|
2668
|
-
context.arg = undefined$1;
|
|
2669
|
-
}
|
|
2670
|
-
|
|
2671
|
-
return !! caught;
|
|
2672
|
-
}
|
|
2673
|
-
|
|
2674
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2675
|
-
var entry = this.tryEntries[i];
|
|
2676
|
-
var record = entry.completion;
|
|
2677
|
-
|
|
2678
|
-
if (entry.tryLoc === "root") {
|
|
2679
|
-
// Exception thrown outside of any try block that could handle
|
|
2680
|
-
// it, so set the completion value of the entire function to
|
|
2681
|
-
// throw the exception.
|
|
2682
|
-
return handle("end");
|
|
2683
|
-
}
|
|
2684
|
-
|
|
2685
|
-
if (entry.tryLoc <= this.prev) {
|
|
2686
|
-
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
2687
|
-
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
2688
|
-
|
|
2689
|
-
if (hasCatch && hasFinally) {
|
|
2690
|
-
if (this.prev < entry.catchLoc) {
|
|
2691
|
-
return handle(entry.catchLoc, true);
|
|
2692
|
-
} else if (this.prev < entry.finallyLoc) {
|
|
2693
|
-
return handle(entry.finallyLoc);
|
|
2694
|
-
}
|
|
2695
|
-
|
|
2696
|
-
} else if (hasCatch) {
|
|
2697
|
-
if (this.prev < entry.catchLoc) {
|
|
2698
|
-
return handle(entry.catchLoc, true);
|
|
2699
|
-
}
|
|
2700
|
-
|
|
2701
|
-
} else if (hasFinally) {
|
|
2702
|
-
if (this.prev < entry.finallyLoc) {
|
|
2703
|
-
return handle(entry.finallyLoc);
|
|
2704
|
-
}
|
|
2705
|
-
|
|
2706
|
-
} else {
|
|
2707
|
-
throw new Error("try statement without catch or finally");
|
|
2708
|
-
}
|
|
2709
|
-
}
|
|
2710
|
-
}
|
|
2711
|
-
},
|
|
2712
|
-
|
|
2713
|
-
abrupt: function(type, arg) {
|
|
2714
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2715
|
-
var entry = this.tryEntries[i];
|
|
2716
|
-
if (entry.tryLoc <= this.prev &&
|
|
2717
|
-
hasOwn.call(entry, "finallyLoc") &&
|
|
2718
|
-
this.prev < entry.finallyLoc) {
|
|
2719
|
-
var finallyEntry = entry;
|
|
2720
|
-
break;
|
|
2721
|
-
}
|
|
2722
|
-
}
|
|
2723
|
-
|
|
2724
|
-
if (finallyEntry &&
|
|
2725
|
-
(type === "break" ||
|
|
2726
|
-
type === "continue") &&
|
|
2727
|
-
finallyEntry.tryLoc <= arg &&
|
|
2728
|
-
arg <= finallyEntry.finallyLoc) {
|
|
2729
|
-
// Ignore the finally entry if control is not jumping to a
|
|
2730
|
-
// location outside the try/catch block.
|
|
2731
|
-
finallyEntry = null;
|
|
2732
|
-
}
|
|
2733
|
-
|
|
2734
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
2735
|
-
record.type = type;
|
|
2736
|
-
record.arg = arg;
|
|
2737
|
-
|
|
2738
|
-
if (finallyEntry) {
|
|
2739
|
-
this.method = "next";
|
|
2740
|
-
this.next = finallyEntry.finallyLoc;
|
|
2741
|
-
return ContinueSentinel;
|
|
2742
|
-
}
|
|
2743
|
-
|
|
2744
|
-
return this.complete(record);
|
|
2745
|
-
},
|
|
2746
|
-
|
|
2747
|
-
complete: function(record, afterLoc) {
|
|
2748
|
-
if (record.type === "throw") {
|
|
2749
|
-
throw record.arg;
|
|
2750
|
-
}
|
|
2751
|
-
|
|
2752
|
-
if (record.type === "break" ||
|
|
2753
|
-
record.type === "continue") {
|
|
2754
|
-
this.next = record.arg;
|
|
2755
|
-
} else if (record.type === "return") {
|
|
2756
|
-
this.rval = this.arg = record.arg;
|
|
2757
|
-
this.method = "return";
|
|
2758
|
-
this.next = "end";
|
|
2759
|
-
} else if (record.type === "normal" && afterLoc) {
|
|
2760
|
-
this.next = afterLoc;
|
|
2761
|
-
}
|
|
2762
|
-
|
|
2763
|
-
return ContinueSentinel;
|
|
2764
|
-
},
|
|
2765
|
-
|
|
2766
|
-
finish: function(finallyLoc) {
|
|
2767
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2768
|
-
var entry = this.tryEntries[i];
|
|
2769
|
-
if (entry.finallyLoc === finallyLoc) {
|
|
2770
|
-
this.complete(entry.completion, entry.afterLoc);
|
|
2771
|
-
resetTryEntry(entry);
|
|
2772
|
-
return ContinueSentinel;
|
|
2773
|
-
}
|
|
2774
|
-
}
|
|
2775
|
-
},
|
|
2776
|
-
|
|
2777
|
-
"catch": function(tryLoc) {
|
|
2778
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2779
|
-
var entry = this.tryEntries[i];
|
|
2780
|
-
if (entry.tryLoc === tryLoc) {
|
|
2781
|
-
var record = entry.completion;
|
|
2782
|
-
if (record.type === "throw") {
|
|
2783
|
-
var thrown = record.arg;
|
|
2784
|
-
resetTryEntry(entry);
|
|
2785
|
-
}
|
|
2786
|
-
return thrown;
|
|
2787
|
-
}
|
|
2788
|
-
}
|
|
2789
|
-
|
|
2790
|
-
// The context.catch method must only be called with a location
|
|
2791
|
-
// argument that corresponds to a known catch block.
|
|
2792
|
-
throw new Error("illegal catch attempt");
|
|
2793
|
-
},
|
|
2794
|
-
|
|
2795
|
-
delegateYield: function(iterable, resultName, nextLoc) {
|
|
2796
|
-
this.delegate = {
|
|
2797
|
-
iterator: values(iterable),
|
|
2798
|
-
resultName: resultName,
|
|
2799
|
-
nextLoc: nextLoc
|
|
2800
|
-
};
|
|
2801
|
-
|
|
2802
|
-
if (this.method === "next") {
|
|
2803
|
-
// Deliberately forget the last sent value so that we don't
|
|
2804
|
-
// accidentally pass it on to the delegate.
|
|
2805
|
-
this.arg = undefined$1;
|
|
2806
|
-
}
|
|
2807
|
-
|
|
2808
|
-
return ContinueSentinel;
|
|
2809
|
-
}
|
|
2810
|
-
};
|
|
2811
|
-
})(
|
|
2812
|
-
// In sloppy mode, unbound `this` refers to the global object, fallback to
|
|
2813
|
-
// Function constructor if we're in global strict mode. That is sadly a form
|
|
2814
|
-
// of indirect eval which violates Content Security Policy.
|
|
2815
|
-
(function() { return this })() || Function("return this")()
|
|
2816
|
-
);
|
|
2817
|
-
});
|
|
2818
|
-
|
|
2819
|
-
/**
|
|
2820
|
-
* Copyright (c) 2014-present, Facebook, Inc.
|
|
2821
|
-
*
|
|
2822
|
-
* This source code is licensed under the MIT license found in the
|
|
2823
|
-
* LICENSE file in the root directory of this source tree.
|
|
2824
|
-
*/
|
|
2825
|
-
|
|
2826
|
-
// This method of obtaining a reference to the global object needs to be
|
|
2827
|
-
// kept identical to the way it is obtained in runtime.js
|
|
2828
|
-
var g = (function() { return this })() || Function("return this")();
|
|
2829
|
-
|
|
2830
|
-
// Use `getOwnPropertyNames` because not all browsers support calling
|
|
2831
|
-
// `hasOwnProperty` on the global `self` object in a worker. See #183.
|
|
2832
|
-
var hadRuntime = g.regeneratorRuntime &&
|
|
2833
|
-
Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
|
|
2834
|
-
|
|
2835
|
-
// Save the old regeneratorRuntime in case it needs to be restored later.
|
|
2836
|
-
var oldRuntime = hadRuntime && g.regeneratorRuntime;
|
|
2837
|
-
|
|
2838
|
-
// Force reevalutation of runtime.js.
|
|
2839
|
-
g.regeneratorRuntime = undefined;
|
|
2840
|
-
|
|
2841
|
-
var runtimeModule = runtime;
|
|
2842
|
-
|
|
2843
|
-
if (hadRuntime) {
|
|
2844
|
-
// Restore the original runtime.
|
|
2845
|
-
g.regeneratorRuntime = oldRuntime;
|
|
2846
|
-
} else {
|
|
2847
|
-
// Remove the global property added by runtime.js.
|
|
2848
|
-
try {
|
|
2849
|
-
delete g.regeneratorRuntime;
|
|
2850
|
-
} catch(e) {
|
|
2851
|
-
g.regeneratorRuntime = undefined;
|
|
2852
|
-
}
|
|
2853
|
-
}
|
|
2854
|
-
|
|
2855
|
-
var regenerator = runtimeModule;
|
|
2856
|
-
|
|
2857
|
-
var asyncToGenerator = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
2858
|
-
|
|
2859
|
-
exports.__esModule = true;
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
var _promise2 = _interopRequireDefault(MasterDeck.promise);
|
|
2864
|
-
|
|
2865
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2866
|
-
|
|
2867
|
-
exports.default = function (fn) {
|
|
2868
|
-
return function () {
|
|
2869
|
-
var gen = fn.apply(this, arguments);
|
|
2870
|
-
return new _promise2.default(function (resolve, reject) {
|
|
2871
|
-
function step(key, arg) {
|
|
2872
|
-
try {
|
|
2873
|
-
var info = gen[key](arg);
|
|
2874
|
-
var value = info.value;
|
|
2875
|
-
} catch (error) {
|
|
2876
|
-
reject(error);
|
|
2877
|
-
return;
|
|
2878
|
-
}
|
|
2879
|
-
|
|
2880
|
-
if (info.done) {
|
|
2881
|
-
resolve(value);
|
|
2882
|
-
} else {
|
|
2883
|
-
return _promise2.default.resolve(value).then(function (value) {
|
|
2884
|
-
step("next", value);
|
|
2885
|
-
}, function (err) {
|
|
2886
|
-
step("throw", err);
|
|
2887
|
-
});
|
|
2888
|
-
}
|
|
2889
|
-
}
|
|
2890
|
-
|
|
2891
|
-
return step("next");
|
|
2892
|
-
});
|
|
2893
|
-
};
|
|
2894
|
-
};
|
|
2895
|
-
});
|
|
2896
|
-
|
|
2897
|
-
var _asyncToGenerator = _commonjsHelpers.unwrapExports(asyncToGenerator);
|
|
2898
|
-
|
|
2899
2082
|
var corsProxy$1 = 'https://cors-anywhere.herokuapp.com/';
|
|
2900
2083
|
var itemsPerPage = 10;
|
|
2901
2084
|
|
|
2902
2085
|
var CMEDeck = function CMEDeck(_ref) {
|
|
2903
2086
|
var getData = function () {
|
|
2904
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(params) {
|
|
2087
|
+
var _ref2 = AdSlot._asyncToGenerator( /*#__PURE__*/AdSlot.regenerator.mark(function _callee(params) {
|
|
2905
2088
|
var form, response, result, regex, newData;
|
|
2906
|
-
return regenerator.wrap(function _callee$(_context) {
|
|
2089
|
+
return AdSlot.regenerator.wrap(function _callee$(_context) {
|
|
2907
2090
|
while (1) {
|
|
2908
2091
|
switch (_context.prev = _context.next) {
|
|
2909
2092
|
case 0:
|
|
@@ -6099,6 +5282,28 @@ var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
|
6099
5282
|
|
|
6100
5283
|
var id = YoutubeGroup.getYoutubeId(url);
|
|
6101
5284
|
|
|
5285
|
+
var _useState = React.useState(false),
|
|
5286
|
+
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
5287
|
+
playReported = _useState2[0],
|
|
5288
|
+
setPlayReported = _useState2[1];
|
|
5289
|
+
|
|
5290
|
+
var _useState3 = React.useState(false),
|
|
5291
|
+
_useState4 = slicedToArray._slicedToArray(_useState3, 2),
|
|
5292
|
+
endReported = _useState4[0],
|
|
5293
|
+
setEndReported = _useState4[1];
|
|
5294
|
+
|
|
5295
|
+
var _useState5 = React.useState(null),
|
|
5296
|
+
_useState6 = slicedToArray._slicedToArray(_useState5, 2),
|
|
5297
|
+
intervalID = _useState6[0],
|
|
5298
|
+
setIntervalID = _useState6[1];
|
|
5299
|
+
|
|
5300
|
+
var _useState7 = React.useState(null),
|
|
5301
|
+
_useState8 = slicedToArray._slicedToArray(_useState7, 2),
|
|
5302
|
+
segmentData = _useState8[0],
|
|
5303
|
+
setSegemntData = _useState8[1];
|
|
5304
|
+
|
|
5305
|
+
var queueProgress = [];
|
|
5306
|
+
|
|
6102
5307
|
var opts = {
|
|
6103
5308
|
width: '100%',
|
|
6104
5309
|
playerVars: {
|
|
@@ -6106,7 +5311,77 @@ var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
|
6106
5311
|
}
|
|
6107
5312
|
};
|
|
6108
5313
|
|
|
6109
|
-
|
|
5314
|
+
React.useEffect(function () {
|
|
5315
|
+
if (segmentData) {
|
|
5316
|
+
console.log('Video Segment', segmentData);
|
|
5317
|
+
AdSlot.Beam.report_beam_video('Segment', main.main_16, segmentData.duration, segmentData.current, segmentData.segment);
|
|
5318
|
+
}
|
|
5319
|
+
}, [segmentData]);
|
|
5320
|
+
|
|
5321
|
+
var handlePlayPercent = function handlePlayPercent(player) {
|
|
5322
|
+
var current = player.getCurrentTime();
|
|
5323
|
+
var duration = player.getDuration();
|
|
5324
|
+
var queue = Math.floor(duration / 10);
|
|
5325
|
+
var segment = Math.floor(current / queue);
|
|
5326
|
+
|
|
5327
|
+
if (!queueProgress.includes(segment)) {
|
|
5328
|
+
setSegemntData({
|
|
5329
|
+
current: current,
|
|
5330
|
+
duration: duration,
|
|
5331
|
+
queue: queue,
|
|
5332
|
+
segment: segment
|
|
5333
|
+
});
|
|
5334
|
+
queueProgress.push(segment);
|
|
5335
|
+
}
|
|
5336
|
+
};
|
|
5337
|
+
|
|
5338
|
+
var handleOnPlay = function handleOnPlay(event) {
|
|
5339
|
+
// report play
|
|
5340
|
+
if (!playReported) {
|
|
5341
|
+
console.log('Video Play', event);
|
|
5342
|
+
|
|
5343
|
+
var player = event.target;
|
|
5344
|
+
var current = player.getCurrentTime();
|
|
5345
|
+
var duration = player.getDuration();
|
|
5346
|
+
var queue = Math.floor(duration / 10);
|
|
5347
|
+
var segment = Math.floor(current / queue);
|
|
5348
|
+
|
|
5349
|
+
AdSlot.Beam.report_beam_video('Play', main.main_16, duration, current, segment);
|
|
5350
|
+
setPlayReported(true);
|
|
5351
|
+
var _intervalID = setInterval(function () {
|
|
5352
|
+
handlePlayPercent(event.target);
|
|
5353
|
+
}, 1000);
|
|
5354
|
+
setIntervalID(_intervalID);
|
|
5355
|
+
}
|
|
5356
|
+
};
|
|
5357
|
+
|
|
5358
|
+
var handleOnEnd = function handleOnEnd(event) {
|
|
5359
|
+
if (!endReported) {
|
|
5360
|
+
console.log('Video End', event);
|
|
5361
|
+
var player = event.target;
|
|
5362
|
+
var current = player.getCurrentTime();
|
|
5363
|
+
var duration = player.getDuration();
|
|
5364
|
+
var queue = Math.floor(duration / 10);
|
|
5365
|
+
var segment = Math.floor(current / queue);
|
|
5366
|
+
|
|
5367
|
+
AdSlot.Beam.report_beam_video('End', main.main_16, duration, current, segment);
|
|
5368
|
+
setEndReported(true);
|
|
5369
|
+
clearInterval(intervalID);
|
|
5370
|
+
}
|
|
5371
|
+
};
|
|
5372
|
+
|
|
5373
|
+
var handleOnPause = function handleOnPause(event) {
|
|
5374
|
+
console.log('Video Pause');
|
|
5375
|
+
var player = event.target;
|
|
5376
|
+
var current = player.getCurrentTime();
|
|
5377
|
+
var duration = player.getDuration();
|
|
5378
|
+
var queue = Math.floor(duration / 10);
|
|
5379
|
+
var segment = Math.floor(current / queue);
|
|
5380
|
+
|
|
5381
|
+
AdSlot.Beam.report_beam_video('Pause', main.main_16, duration, current, segment);
|
|
5382
|
+
};
|
|
5383
|
+
|
|
5384
|
+
return React__default.createElement(YouTube, { videoId: id, opts: opts, onPlay: handleOnPlay, onPause: handleOnPause, onEnd: handleOnEnd });
|
|
6110
5385
|
};
|
|
6111
5386
|
|
|
6112
5387
|
var Sidebar = function Sidebar(_ref) {
|
|
@@ -6631,10 +5906,10 @@ function datasetify(elem) {
|
|
|
6631
5906
|
props.push({ name: "data-" + key, value: ds[key] });
|
|
6632
5907
|
}
|
|
6633
5908
|
|
|
6634
|
-
return props.length ? stringify
|
|
5909
|
+
return props.length ? stringify(props) : ""
|
|
6635
5910
|
}
|
|
6636
5911
|
|
|
6637
|
-
function stringify
|
|
5912
|
+
function stringify(list) {
|
|
6638
5913
|
var attributes = [];
|
|
6639
5914
|
list.forEach(function (tuple) {
|
|
6640
5915
|
var name = tuple.name;
|
|
@@ -6670,7 +5945,7 @@ function properties(elem) {
|
|
|
6670
5945
|
props.push({ name: "class", value: elem.className });
|
|
6671
5946
|
}
|
|
6672
5947
|
|
|
6673
|
-
return props.length ? stringify
|
|
5948
|
+
return props.length ? stringify(props) : ""
|
|
6674
5949
|
}
|
|
6675
5950
|
|
|
6676
5951
|
function escapeText(s) {
|
|
@@ -15940,6 +15215,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
15940
15215
|
};
|
|
15941
15216
|
|
|
15942
15217
|
exports.AdSlot = AdSlot.DFPAdSlot;
|
|
15218
|
+
exports.Beam = AdSlot.Beam;
|
|
15943
15219
|
exports.DeckContent = DeckContent;
|
|
15944
15220
|
exports.AD = GridContent.AD;
|
|
15945
15221
|
exports.GridContent = GridContent.GridContent;
|
|
@@ -15950,7 +15226,7 @@ exports.GroupDeck = GroupDeck;
|
|
|
15950
15226
|
exports.YoutubeGroup = YoutubeGroup.YoutubeGroup;
|
|
15951
15227
|
exports.QueueDeckExpanded = QueueDeckExpanded;
|
|
15952
15228
|
exports.VideoSeriesListing = VideoSeriesListing;
|
|
15953
|
-
exports.MasterDeck = MasterDeck
|
|
15229
|
+
exports.MasterDeck = MasterDeck;
|
|
15954
15230
|
exports.PublicationDeck = PublicationDeck;
|
|
15955
15231
|
exports.IssueDeck = IssueDeck;
|
|
15956
15232
|
exports.IssueContentDeck = IssueContentDeck;
|