isomorfeus-redux 4.2.0 → 22.9.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (236) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +176 -0
  3. data/lib/app_state.rb +25 -0
  4. data/lib/isomorfeus/browser_store_api.rb +0 -16
  5. data/lib/isomorfeus/redux/config.rb +97 -14
  6. data/lib/isomorfeus/redux/handler.rb +35 -0
  7. data/lib/isomorfeus/redux/version.rb +5 -0
  8. data/lib/isomorfeus/redux_imports.rb +14 -0
  9. data/lib/{redux/reducers.rb → isomorfeus/redux_reducers.rb} +15 -13
  10. data/lib/isomorfeus-redux.rb +18 -30
  11. data/lib/local_store.rb +27 -30
  12. data/lib/redux/store.rb +156 -120
  13. data/lib/session_store.rb +28 -30
  14. metadata +24 -247
  15. data/lib/app_store.rb +0 -42
  16. data/lib/isomorfeus/core_ext/hash/deep_merge.rb +0 -34
  17. data/lib/isomorfeus/core_ext/kernel.rb +0 -30
  18. data/lib/isomorfeus/execution_environment.rb +0 -67
  19. data/lib/isomorfeus/redux/imports.rb +0 -17
  20. data/lib/redux/version.rb +0 -3
  21. data/lib/redux.rb +0 -118
  22. data/node_modules/.package-lock.json +0 -31
  23. data/node_modules/@babel/runtime/LICENSE +0 -22
  24. data/node_modules/@babel/runtime/README.md +0 -19
  25. data/node_modules/@babel/runtime/helpers/AsyncGenerator.js +0 -99
  26. data/node_modules/@babel/runtime/helpers/AwaitValue.js +0 -6
  27. data/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js +0 -31
  28. data/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +0 -12
  29. data/node_modules/@babel/runtime/helpers/arrayWithHoles.js +0 -6
  30. data/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js +0 -8
  31. data/node_modules/@babel/runtime/helpers/assertThisInitialized.js +0 -10
  32. data/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js +0 -57
  33. data/node_modules/@babel/runtime/helpers/asyncIterator.js +0 -16
  34. data/node_modules/@babel/runtime/helpers/asyncToGenerator.js +0 -38
  35. data/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js +0 -8
  36. data/node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.js +0 -8
  37. data/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js +0 -23
  38. data/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js +0 -10
  39. data/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js +0 -14
  40. data/node_modules/@babel/runtime/helpers/classCallCheck.js +0 -8
  41. data/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js +0 -8
  42. data/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js +0 -8
  43. data/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js +0 -10
  44. data/node_modules/@babel/runtime/helpers/classNameTDZError.js +0 -6
  45. data/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js +0 -11
  46. data/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js +0 -11
  47. data/node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.js +0 -9
  48. data/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js +0 -10
  49. data/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js +0 -8
  50. data/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js +0 -12
  51. data/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js +0 -10
  52. data/node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.js +0 -9
  53. data/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js +0 -6
  54. data/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js +0 -14
  55. data/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js +0 -14
  56. data/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js +0 -15
  57. data/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js +0 -9
  58. data/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js +0 -6
  59. data/node_modules/@babel/runtime/helpers/construct.js +0 -26
  60. data/node_modules/@babel/runtime/helpers/createClass.js +0 -18
  61. data/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js +0 -61
  62. data/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js +0 -25
  63. data/node_modules/@babel/runtime/helpers/createSuper.js +0 -25
  64. data/node_modules/@babel/runtime/helpers/decorate.js +0 -401
  65. data/node_modules/@babel/runtime/helpers/defaults.js +0 -17
  66. data/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js +0 -25
  67. data/node_modules/@babel/runtime/helpers/defineProperty.js +0 -17
  68. data/node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js +0 -95
  69. data/node_modules/@babel/runtime/helpers/esm/AwaitValue.js +0 -3
  70. data/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js +0 -28
  71. data/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +0 -9
  72. data/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +0 -3
  73. data/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +0 -4
  74. data/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -7
  75. data/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js +0 -54
  76. data/node_modules/@babel/runtime/helpers/esm/asyncIterator.js +0 -13
  77. data/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +0 -35
  78. data/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js +0 -4
  79. data/node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js +0 -5
  80. data/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js +0 -20
  81. data/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js +0 -7
  82. data/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js +0 -11
  83. data/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +0 -5
  84. data/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js +0 -5
  85. data/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +0 -5
  86. data/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js +0 -7
  87. data/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js +0 -3
  88. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js +0 -6
  89. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js +0 -6
  90. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js +0 -5
  91. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js +0 -7
  92. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js +0 -4
  93. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js +0 -7
  94. data/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js +0 -7
  95. data/node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js +0 -5
  96. data/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js +0 -3
  97. data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js +0 -8
  98. data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js +0 -8
  99. data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js +0 -9
  100. data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js +0 -5
  101. data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js +0 -3
  102. data/node_modules/@babel/runtime/helpers/esm/construct.js +0 -18
  103. data/node_modules/@babel/runtime/helpers/esm/createClass.js +0 -15
  104. data/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js +0 -57
  105. data/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js +0 -21
  106. data/node_modules/@babel/runtime/helpers/esm/createSuper.js +0 -19
  107. data/node_modules/@babel/runtime/helpers/esm/decorate.js +0 -396
  108. data/node_modules/@babel/runtime/helpers/esm/defaults.js +0 -14
  109. data/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js +0 -22
  110. data/node_modules/@babel/runtime/helpers/esm/defineProperty.js +0 -14
  111. data/node_modules/@babel/runtime/helpers/esm/extends.js +0 -17
  112. data/node_modules/@babel/runtime/helpers/esm/get.js +0 -20
  113. data/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +0 -6
  114. data/node_modules/@babel/runtime/helpers/esm/inherits.js +0 -15
  115. data/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +0 -6
  116. data/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js +0 -9
  117. data/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js +0 -3
  118. data/node_modules/@babel/runtime/helpers/esm/instanceof.js +0 -7
  119. data/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js +0 -5
  120. data/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js +0 -51
  121. data/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js +0 -3
  122. data/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +0 -12
  123. data/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +0 -3
  124. data/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +0 -29
  125. data/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimitLoose.js +0 -14
  126. data/node_modules/@babel/runtime/helpers/esm/jsx.js +0 -46
  127. data/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js +0 -9
  128. data/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js +0 -5
  129. data/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +0 -3
  130. data/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +0 -3
  131. data/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js +0 -3
  132. data/node_modules/@babel/runtime/helpers/esm/objectSpread.js +0 -19
  133. data/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +0 -39
  134. data/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +0 -19
  135. data/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -14
  136. data/node_modules/@babel/runtime/helpers/esm/package.json +0 -3
  137. data/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +0 -11
  138. data/node_modules/@babel/runtime/helpers/esm/readOnlyError.js +0 -3
  139. data/node_modules/@babel/runtime/helpers/esm/set.js +0 -51
  140. data/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -8
  141. data/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js +0 -7
  142. data/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +0 -7
  143. data/node_modules/@babel/runtime/helpers/esm/slicedToArrayLoose.js +0 -7
  144. data/node_modules/@babel/runtime/helpers/esm/superPropBase.js +0 -9
  145. data/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +0 -11
  146. data/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js +0 -8
  147. data/node_modules/@babel/runtime/helpers/esm/tdz.js +0 -3
  148. data/node_modules/@babel/runtime/helpers/esm/temporalRef.js +0 -5
  149. data/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js +0 -1
  150. data/node_modules/@babel/runtime/helpers/esm/toArray.js +0 -7
  151. data/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +0 -7
  152. data/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +0 -13
  153. data/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +0 -6
  154. data/node_modules/@babel/runtime/helpers/esm/typeof.js +0 -15
  155. data/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +0 -9
  156. data/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js +0 -6
  157. data/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js +0 -37
  158. data/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js +0 -65
  159. data/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js +0 -3
  160. data/node_modules/@babel/runtime/helpers/extends.js +0 -21
  161. data/node_modules/@babel/runtime/helpers/get.js +0 -27
  162. data/node_modules/@babel/runtime/helpers/getPrototypeOf.js +0 -10
  163. data/node_modules/@babel/runtime/helpers/inherits.js +0 -19
  164. data/node_modules/@babel/runtime/helpers/inheritsLoose.js +0 -10
  165. data/node_modules/@babel/runtime/helpers/initializerDefineProperty.js +0 -12
  166. data/node_modules/@babel/runtime/helpers/initializerWarningHelper.js +0 -6
  167. data/node_modules/@babel/runtime/helpers/instanceof.js +0 -10
  168. data/node_modules/@babel/runtime/helpers/interopRequireDefault.js +0 -8
  169. data/node_modules/@babel/runtime/helpers/interopRequireWildcard.js +0 -54
  170. data/node_modules/@babel/runtime/helpers/isNativeFunction.js +0 -6
  171. data/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js +0 -15
  172. data/node_modules/@babel/runtime/helpers/iterableToArray.js +0 -6
  173. data/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +0 -32
  174. data/node_modules/@babel/runtime/helpers/iterableToArrayLimitLoose.js +0 -17
  175. data/node_modules/@babel/runtime/helpers/jsx.js +0 -50
  176. data/node_modules/@babel/runtime/helpers/maybeArrayLike.js +0 -13
  177. data/node_modules/@babel/runtime/helpers/newArrowCheck.js +0 -8
  178. data/node_modules/@babel/runtime/helpers/nonIterableRest.js +0 -6
  179. data/node_modules/@babel/runtime/helpers/nonIterableSpread.js +0 -6
  180. data/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js +0 -6
  181. data/node_modules/@babel/runtime/helpers/objectSpread.js +0 -23
  182. data/node_modules/@babel/runtime/helpers/objectSpread2.js +0 -42
  183. data/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +0 -23
  184. data/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +0 -17
  185. data/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js +0 -16
  186. data/node_modules/@babel/runtime/helpers/readOnlyError.js +0 -6
  187. data/node_modules/@babel/runtime/helpers/set.js +0 -55
  188. data/node_modules/@babel/runtime/helpers/setPrototypeOf.js +0 -12
  189. data/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js +0 -10
  190. data/node_modules/@babel/runtime/helpers/slicedToArray.js +0 -14
  191. data/node_modules/@babel/runtime/helpers/slicedToArrayLoose.js +0 -14
  192. data/node_modules/@babel/runtime/helpers/superPropBase.js +0 -13
  193. data/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js +0 -14
  194. data/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js +0 -11
  195. data/node_modules/@babel/runtime/helpers/tdz.js +0 -6
  196. data/node_modules/@babel/runtime/helpers/temporalRef.js +0 -10
  197. data/node_modules/@babel/runtime/helpers/temporalUndefined.js +0 -4
  198. data/node_modules/@babel/runtime/helpers/toArray.js +0 -14
  199. data/node_modules/@babel/runtime/helpers/toConsumableArray.js +0 -14
  200. data/node_modules/@babel/runtime/helpers/toPrimitive.js +0 -17
  201. data/node_modules/@babel/runtime/helpers/toPropertyKey.js +0 -11
  202. data/node_modules/@babel/runtime/helpers/typeof.js +0 -22
  203. data/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +0 -13
  204. data/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js +0 -10
  205. data/node_modules/@babel/runtime/helpers/wrapNativeSuper.js +0 -45
  206. data/node_modules/@babel/runtime/helpers/wrapRegExp.js +0 -72
  207. data/node_modules/@babel/runtime/helpers/writeOnlyError.js +0 -6
  208. data/node_modules/@babel/runtime/package.json +0 -848
  209. data/node_modules/@babel/runtime/regenerator/index.js +0 -1
  210. data/node_modules/redux/LICENSE.md +0 -21
  211. data/node_modules/redux/README.md +0 -322
  212. data/node_modules/redux/dist/redux.js +0 -768
  213. data/node_modules/redux/dist/redux.min.js +0 -1
  214. data/node_modules/redux/es/redux.js +0 -716
  215. data/node_modules/redux/es/redux.mjs +0 -1
  216. data/node_modules/redux/index.d.ts +0 -776
  217. data/node_modules/redux/lib/redux.js +0 -730
  218. data/node_modules/redux/package.json +0 -108
  219. data/node_modules/redux/src/applyMiddleware.js +0 -41
  220. data/node_modules/redux/src/bindActionCreators.js +0 -52
  221. data/node_modules/redux/src/combineReducers.js +0 -175
  222. data/node_modules/redux/src/compose.js +0 -22
  223. data/node_modules/redux/src/createStore.js +0 -347
  224. data/node_modules/redux/src/index.js +0 -37
  225. data/node_modules/redux/src/utils/actionTypes.js +0 -17
  226. data/node_modules/redux/src/utils/formatProdErrorMessage.js +0 -15
  227. data/node_modules/redux/src/utils/isPlainObject.js +0 -14
  228. data/node_modules/redux/src/utils/kindOf.js +0 -70
  229. data/node_modules/redux/src/utils/symbol-observable.js +0 -3
  230. data/node_modules/redux/src/utils/warning.js +0 -19
  231. data/node_modules/regenerator-runtime/LICENSE +0 -21
  232. data/node_modules/regenerator-runtime/README.md +0 -31
  233. data/node_modules/regenerator-runtime/package.json +0 -19
  234. data/node_modules/regenerator-runtime/path.js +0 -11
  235. data/node_modules/regenerator-runtime/runtime.js +0 -754
  236. data/package.json +0 -6
@@ -1,754 +0,0 @@
1
- /**
2
- * Copyright (c) 2014-present, Facebook, Inc.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- var runtime = (function (exports) {
9
- "use strict";
10
-
11
- var Op = Object.prototype;
12
- var hasOwn = Op.hasOwnProperty;
13
- var undefined; // More compressible than void 0.
14
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
15
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
16
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
17
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
18
-
19
- function define(obj, key, value) {
20
- Object.defineProperty(obj, key, {
21
- value: value,
22
- enumerable: true,
23
- configurable: true,
24
- writable: true
25
- });
26
- return obj[key];
27
- }
28
- try {
29
- // IE 8 has a broken Object.defineProperty that only works on DOM objects.
30
- define({}, "");
31
- } catch (err) {
32
- define = function(obj, key, value) {
33
- return obj[key] = value;
34
- };
35
- }
36
-
37
- function wrap(innerFn, outerFn, self, tryLocsList) {
38
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
39
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
40
- var generator = Object.create(protoGenerator.prototype);
41
- var context = new Context(tryLocsList || []);
42
-
43
- // The ._invoke method unifies the implementations of the .next,
44
- // .throw, and .return methods.
45
- generator._invoke = makeInvokeMethod(innerFn, self, context);
46
-
47
- return generator;
48
- }
49
- exports.wrap = wrap;
50
-
51
- // Try/catch helper to minimize deoptimizations. Returns a completion
52
- // record like context.tryEntries[i].completion. This interface could
53
- // have been (and was previously) designed to take a closure to be
54
- // invoked without arguments, but in all the cases we care about we
55
- // already have an existing method we want to call, so there's no need
56
- // to create a new function object. We can even get away with assuming
57
- // the method takes exactly one argument, since that happens to be true
58
- // in every case, so we don't have to touch the arguments object. The
59
- // only additional allocation required is the completion record, which
60
- // has a stable shape and so hopefully should be cheap to allocate.
61
- function tryCatch(fn, obj, arg) {
62
- try {
63
- return { type: "normal", arg: fn.call(obj, arg) };
64
- } catch (err) {
65
- return { type: "throw", arg: err };
66
- }
67
- }
68
-
69
- var GenStateSuspendedStart = "suspendedStart";
70
- var GenStateSuspendedYield = "suspendedYield";
71
- var GenStateExecuting = "executing";
72
- var GenStateCompleted = "completed";
73
-
74
- // Returning this object from the innerFn has the same effect as
75
- // breaking out of the dispatch switch statement.
76
- var ContinueSentinel = {};
77
-
78
- // Dummy constructor functions that we use as the .constructor and
79
- // .constructor.prototype properties for functions that return Generator
80
- // objects. For full spec compliance, you may wish to configure your
81
- // minifier not to mangle the names of these two functions.
82
- function Generator() {}
83
- function GeneratorFunction() {}
84
- function GeneratorFunctionPrototype() {}
85
-
86
- // This is a polyfill for %IteratorPrototype% for environments that
87
- // don't natively support it.
88
- var IteratorPrototype = {};
89
- define(IteratorPrototype, iteratorSymbol, function () {
90
- return this;
91
- });
92
-
93
- var getProto = Object.getPrototypeOf;
94
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
95
- if (NativeIteratorPrototype &&
96
- NativeIteratorPrototype !== Op &&
97
- hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
98
- // This environment has a native %IteratorPrototype%; use it instead
99
- // of the polyfill.
100
- IteratorPrototype = NativeIteratorPrototype;
101
- }
102
-
103
- var Gp = GeneratorFunctionPrototype.prototype =
104
- Generator.prototype = Object.create(IteratorPrototype);
105
- GeneratorFunction.prototype = GeneratorFunctionPrototype;
106
- define(Gp, "constructor", GeneratorFunctionPrototype);
107
- define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
108
- GeneratorFunction.displayName = define(
109
- GeneratorFunctionPrototype,
110
- toStringTagSymbol,
111
- "GeneratorFunction"
112
- );
113
-
114
- // Helper for defining the .next, .throw, and .return methods of the
115
- // Iterator interface in terms of a single ._invoke method.
116
- function defineIteratorMethods(prototype) {
117
- ["next", "throw", "return"].forEach(function(method) {
118
- define(prototype, method, function(arg) {
119
- return this._invoke(method, arg);
120
- });
121
- });
122
- }
123
-
124
- exports.isGeneratorFunction = function(genFun) {
125
- var ctor = typeof genFun === "function" && genFun.constructor;
126
- return ctor
127
- ? ctor === GeneratorFunction ||
128
- // For the native GeneratorFunction constructor, the best we can
129
- // do is to check its .name property.
130
- (ctor.displayName || ctor.name) === "GeneratorFunction"
131
- : false;
132
- };
133
-
134
- exports.mark = function(genFun) {
135
- if (Object.setPrototypeOf) {
136
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
137
- } else {
138
- genFun.__proto__ = GeneratorFunctionPrototype;
139
- define(genFun, toStringTagSymbol, "GeneratorFunction");
140
- }
141
- genFun.prototype = Object.create(Gp);
142
- return genFun;
143
- };
144
-
145
- // Within the body of any async function, `await x` is transformed to
146
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
147
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
148
- // meant to be awaited.
149
- exports.awrap = function(arg) {
150
- return { __await: arg };
151
- };
152
-
153
- function AsyncIterator(generator, PromiseImpl) {
154
- function invoke(method, arg, resolve, reject) {
155
- var record = tryCatch(generator[method], generator, arg);
156
- if (record.type === "throw") {
157
- reject(record.arg);
158
- } else {
159
- var result = record.arg;
160
- var value = result.value;
161
- if (value &&
162
- typeof value === "object" &&
163
- hasOwn.call(value, "__await")) {
164
- return PromiseImpl.resolve(value.__await).then(function(value) {
165
- invoke("next", value, resolve, reject);
166
- }, function(err) {
167
- invoke("throw", err, resolve, reject);
168
- });
169
- }
170
-
171
- return PromiseImpl.resolve(value).then(function(unwrapped) {
172
- // When a yielded Promise is resolved, its final value becomes
173
- // the .value of the Promise<{value,done}> result for the
174
- // current iteration.
175
- result.value = unwrapped;
176
- resolve(result);
177
- }, function(error) {
178
- // If a rejected Promise was yielded, throw the rejection back
179
- // into the async generator function so it can be handled there.
180
- return invoke("throw", error, resolve, reject);
181
- });
182
- }
183
- }
184
-
185
- var previousPromise;
186
-
187
- function enqueue(method, arg) {
188
- function callInvokeWithMethodAndArg() {
189
- return new PromiseImpl(function(resolve, reject) {
190
- invoke(method, arg, resolve, reject);
191
- });
192
- }
193
-
194
- return previousPromise =
195
- // If enqueue has been called before, then we want to wait until
196
- // all previous Promises have been resolved before calling invoke,
197
- // so that results are always delivered in the correct order. If
198
- // enqueue has not been called before, then it is important to
199
- // call invoke immediately, without waiting on a callback to fire,
200
- // so that the async generator function has the opportunity to do
201
- // any necessary setup in a predictable way. This predictability
202
- // is why the Promise constructor synchronously invokes its
203
- // executor callback, and why async functions synchronously
204
- // execute code before the first await. Since we implement simple
205
- // async functions in terms of async generators, it is especially
206
- // important to get this right, even though it requires care.
207
- previousPromise ? previousPromise.then(
208
- callInvokeWithMethodAndArg,
209
- // Avoid propagating failures to Promises returned by later
210
- // invocations of the iterator.
211
- callInvokeWithMethodAndArg
212
- ) : callInvokeWithMethodAndArg();
213
- }
214
-
215
- // Define the unified helper method that is used to implement .next,
216
- // .throw, and .return (see defineIteratorMethods).
217
- this._invoke = enqueue;
218
- }
219
-
220
- defineIteratorMethods(AsyncIterator.prototype);
221
- define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
222
- return this;
223
- });
224
- exports.AsyncIterator = AsyncIterator;
225
-
226
- // Note that simple async functions are implemented on top of
227
- // AsyncIterator objects; they just return a Promise for the value of
228
- // the final result produced by the iterator.
229
- exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
230
- if (PromiseImpl === void 0) PromiseImpl = Promise;
231
-
232
- var iter = new AsyncIterator(
233
- wrap(innerFn, outerFn, self, tryLocsList),
234
- PromiseImpl
235
- );
236
-
237
- return exports.isGeneratorFunction(outerFn)
238
- ? iter // If outerFn is a generator, return the full iterator.
239
- : iter.next().then(function(result) {
240
- return result.done ? result.value : iter.next();
241
- });
242
- };
243
-
244
- function makeInvokeMethod(innerFn, self, context) {
245
- var state = GenStateSuspendedStart;
246
-
247
- return function invoke(method, arg) {
248
- if (state === GenStateExecuting) {
249
- throw new Error("Generator is already running");
250
- }
251
-
252
- if (state === GenStateCompleted) {
253
- if (method === "throw") {
254
- throw arg;
255
- }
256
-
257
- // Be forgiving, per 25.3.3.3.3 of the spec:
258
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
259
- return doneResult();
260
- }
261
-
262
- context.method = method;
263
- context.arg = arg;
264
-
265
- while (true) {
266
- var delegate = context.delegate;
267
- if (delegate) {
268
- var delegateResult = maybeInvokeDelegate(delegate, context);
269
- if (delegateResult) {
270
- if (delegateResult === ContinueSentinel) continue;
271
- return delegateResult;
272
- }
273
- }
274
-
275
- if (context.method === "next") {
276
- // Setting context._sent for legacy support of Babel's
277
- // function.sent implementation.
278
- context.sent = context._sent = context.arg;
279
-
280
- } else if (context.method === "throw") {
281
- if (state === GenStateSuspendedStart) {
282
- state = GenStateCompleted;
283
- throw context.arg;
284
- }
285
-
286
- context.dispatchException(context.arg);
287
-
288
- } else if (context.method === "return") {
289
- context.abrupt("return", context.arg);
290
- }
291
-
292
- state = GenStateExecuting;
293
-
294
- var record = tryCatch(innerFn, self, context);
295
- if (record.type === "normal") {
296
- // If an exception is thrown from innerFn, we leave state ===
297
- // GenStateExecuting and loop back for another invocation.
298
- state = context.done
299
- ? GenStateCompleted
300
- : GenStateSuspendedYield;
301
-
302
- if (record.arg === ContinueSentinel) {
303
- continue;
304
- }
305
-
306
- return {
307
- value: record.arg,
308
- done: context.done
309
- };
310
-
311
- } else if (record.type === "throw") {
312
- state = GenStateCompleted;
313
- // Dispatch the exception by looping back around to the
314
- // context.dispatchException(context.arg) call above.
315
- context.method = "throw";
316
- context.arg = record.arg;
317
- }
318
- }
319
- };
320
- }
321
-
322
- // Call delegate.iterator[context.method](context.arg) and handle the
323
- // result, either by returning a { value, done } result from the
324
- // delegate iterator, or by modifying context.method and context.arg,
325
- // setting context.delegate to null, and returning the ContinueSentinel.
326
- function maybeInvokeDelegate(delegate, context) {
327
- var method = delegate.iterator[context.method];
328
- if (method === undefined) {
329
- // A .throw or .return when the delegate iterator has no .throw
330
- // method always terminates the yield* loop.
331
- context.delegate = null;
332
-
333
- if (context.method === "throw") {
334
- // Note: ["return"] must be used for ES3 parsing compatibility.
335
- if (delegate.iterator["return"]) {
336
- // If the delegate iterator has a return method, give it a
337
- // chance to clean up.
338
- context.method = "return";
339
- context.arg = undefined;
340
- maybeInvokeDelegate(delegate, context);
341
-
342
- if (context.method === "throw") {
343
- // If maybeInvokeDelegate(context) changed context.method from
344
- // "return" to "throw", let that override the TypeError below.
345
- return ContinueSentinel;
346
- }
347
- }
348
-
349
- context.method = "throw";
350
- context.arg = new TypeError(
351
- "The iterator does not provide a 'throw' method");
352
- }
353
-
354
- return ContinueSentinel;
355
- }
356
-
357
- var record = tryCatch(method, delegate.iterator, context.arg);
358
-
359
- if (record.type === "throw") {
360
- context.method = "throw";
361
- context.arg = record.arg;
362
- context.delegate = null;
363
- return ContinueSentinel;
364
- }
365
-
366
- var info = record.arg;
367
-
368
- if (! info) {
369
- context.method = "throw";
370
- context.arg = new TypeError("iterator result is not an object");
371
- context.delegate = null;
372
- return ContinueSentinel;
373
- }
374
-
375
- if (info.done) {
376
- // Assign the result of the finished delegate to the temporary
377
- // variable specified by delegate.resultName (see delegateYield).
378
- context[delegate.resultName] = info.value;
379
-
380
- // Resume execution at the desired location (see delegateYield).
381
- context.next = delegate.nextLoc;
382
-
383
- // If context.method was "throw" but the delegate handled the
384
- // exception, let the outer generator proceed normally. If
385
- // context.method was "next", forget context.arg since it has been
386
- // "consumed" by the delegate iterator. If context.method was
387
- // "return", allow the original .return call to continue in the
388
- // outer generator.
389
- if (context.method !== "return") {
390
- context.method = "next";
391
- context.arg = undefined;
392
- }
393
-
394
- } else {
395
- // Re-yield the result returned by the delegate method.
396
- return info;
397
- }
398
-
399
- // The delegate iterator is finished, so forget it and continue with
400
- // the outer generator.
401
- context.delegate = null;
402
- return ContinueSentinel;
403
- }
404
-
405
- // Define Generator.prototype.{next,throw,return} in terms of the
406
- // unified ._invoke helper method.
407
- defineIteratorMethods(Gp);
408
-
409
- define(Gp, toStringTagSymbol, "Generator");
410
-
411
- // A Generator should always return itself as the iterator object when the
412
- // @@iterator function is called on it. Some browsers' implementations of the
413
- // iterator prototype chain incorrectly implement this, causing the Generator
414
- // object to not be returned from this call. This ensures that doesn't happen.
415
- // See https://github.com/facebook/regenerator/issues/274 for more details.
416
- define(Gp, iteratorSymbol, function() {
417
- return this;
418
- });
419
-
420
- define(Gp, "toString", function() {
421
- return "[object Generator]";
422
- });
423
-
424
- function pushTryEntry(locs) {
425
- var entry = { tryLoc: locs[0] };
426
-
427
- if (1 in locs) {
428
- entry.catchLoc = locs[1];
429
- }
430
-
431
- if (2 in locs) {
432
- entry.finallyLoc = locs[2];
433
- entry.afterLoc = locs[3];
434
- }
435
-
436
- this.tryEntries.push(entry);
437
- }
438
-
439
- function resetTryEntry(entry) {
440
- var record = entry.completion || {};
441
- record.type = "normal";
442
- delete record.arg;
443
- entry.completion = record;
444
- }
445
-
446
- function Context(tryLocsList) {
447
- // The root entry object (effectively a try statement without a catch
448
- // or a finally block) gives us a place to store values thrown from
449
- // locations where there is no enclosing try statement.
450
- this.tryEntries = [{ tryLoc: "root" }];
451
- tryLocsList.forEach(pushTryEntry, this);
452
- this.reset(true);
453
- }
454
-
455
- exports.keys = function(object) {
456
- var keys = [];
457
- for (var key in object) {
458
- keys.push(key);
459
- }
460
- keys.reverse();
461
-
462
- // Rather than returning an object with a next method, we keep
463
- // things simple and return the next function itself.
464
- return function next() {
465
- while (keys.length) {
466
- var key = keys.pop();
467
- if (key in object) {
468
- next.value = key;
469
- next.done = false;
470
- return next;
471
- }
472
- }
473
-
474
- // To avoid creating an additional object, we just hang the .value
475
- // and .done properties off the next function object itself. This
476
- // also ensures that the minifier will not anonymize the function.
477
- next.done = true;
478
- return next;
479
- };
480
- };
481
-
482
- function values(iterable) {
483
- if (iterable) {
484
- var iteratorMethod = iterable[iteratorSymbol];
485
- if (iteratorMethod) {
486
- return iteratorMethod.call(iterable);
487
- }
488
-
489
- if (typeof iterable.next === "function") {
490
- return iterable;
491
- }
492
-
493
- if (!isNaN(iterable.length)) {
494
- var i = -1, next = function next() {
495
- while (++i < iterable.length) {
496
- if (hasOwn.call(iterable, i)) {
497
- next.value = iterable[i];
498
- next.done = false;
499
- return next;
500
- }
501
- }
502
-
503
- next.value = undefined;
504
- next.done = true;
505
-
506
- return next;
507
- };
508
-
509
- return next.next = next;
510
- }
511
- }
512
-
513
- // Return an iterator with no values.
514
- return { next: doneResult };
515
- }
516
- exports.values = values;
517
-
518
- function doneResult() {
519
- return { value: undefined, done: true };
520
- }
521
-
522
- Context.prototype = {
523
- constructor: Context,
524
-
525
- reset: function(skipTempReset) {
526
- this.prev = 0;
527
- this.next = 0;
528
- // Resetting context._sent for legacy support of Babel's
529
- // function.sent implementation.
530
- this.sent = this._sent = undefined;
531
- this.done = false;
532
- this.delegate = null;
533
-
534
- this.method = "next";
535
- this.arg = undefined;
536
-
537
- this.tryEntries.forEach(resetTryEntry);
538
-
539
- if (!skipTempReset) {
540
- for (var name in this) {
541
- // Not sure about the optimal order of these conditions:
542
- if (name.charAt(0) === "t" &&
543
- hasOwn.call(this, name) &&
544
- !isNaN(+name.slice(1))) {
545
- this[name] = undefined;
546
- }
547
- }
548
- }
549
- },
550
-
551
- stop: function() {
552
- this.done = true;
553
-
554
- var rootEntry = this.tryEntries[0];
555
- var rootRecord = rootEntry.completion;
556
- if (rootRecord.type === "throw") {
557
- throw rootRecord.arg;
558
- }
559
-
560
- return this.rval;
561
- },
562
-
563
- dispatchException: function(exception) {
564
- if (this.done) {
565
- throw exception;
566
- }
567
-
568
- var context = this;
569
- function handle(loc, caught) {
570
- record.type = "throw";
571
- record.arg = exception;
572
- context.next = loc;
573
-
574
- if (caught) {
575
- // If the dispatched exception was caught by a catch block,
576
- // then let that catch block handle the exception normally.
577
- context.method = "next";
578
- context.arg = undefined;
579
- }
580
-
581
- return !! caught;
582
- }
583
-
584
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
585
- var entry = this.tryEntries[i];
586
- var record = entry.completion;
587
-
588
- if (entry.tryLoc === "root") {
589
- // Exception thrown outside of any try block that could handle
590
- // it, so set the completion value of the entire function to
591
- // throw the exception.
592
- return handle("end");
593
- }
594
-
595
- if (entry.tryLoc <= this.prev) {
596
- var hasCatch = hasOwn.call(entry, "catchLoc");
597
- var hasFinally = hasOwn.call(entry, "finallyLoc");
598
-
599
- if (hasCatch && hasFinally) {
600
- if (this.prev < entry.catchLoc) {
601
- return handle(entry.catchLoc, true);
602
- } else if (this.prev < entry.finallyLoc) {
603
- return handle(entry.finallyLoc);
604
- }
605
-
606
- } else if (hasCatch) {
607
- if (this.prev < entry.catchLoc) {
608
- return handle(entry.catchLoc, true);
609
- }
610
-
611
- } else if (hasFinally) {
612
- if (this.prev < entry.finallyLoc) {
613
- return handle(entry.finallyLoc);
614
- }
615
-
616
- } else {
617
- throw new Error("try statement without catch or finally");
618
- }
619
- }
620
- }
621
- },
622
-
623
- abrupt: function(type, arg) {
624
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
625
- var entry = this.tryEntries[i];
626
- if (entry.tryLoc <= this.prev &&
627
- hasOwn.call(entry, "finallyLoc") &&
628
- this.prev < entry.finallyLoc) {
629
- var finallyEntry = entry;
630
- break;
631
- }
632
- }
633
-
634
- if (finallyEntry &&
635
- (type === "break" ||
636
- type === "continue") &&
637
- finallyEntry.tryLoc <= arg &&
638
- arg <= finallyEntry.finallyLoc) {
639
- // Ignore the finally entry if control is not jumping to a
640
- // location outside the try/catch block.
641
- finallyEntry = null;
642
- }
643
-
644
- var record = finallyEntry ? finallyEntry.completion : {};
645
- record.type = type;
646
- record.arg = arg;
647
-
648
- if (finallyEntry) {
649
- this.method = "next";
650
- this.next = finallyEntry.finallyLoc;
651
- return ContinueSentinel;
652
- }
653
-
654
- return this.complete(record);
655
- },
656
-
657
- complete: function(record, afterLoc) {
658
- if (record.type === "throw") {
659
- throw record.arg;
660
- }
661
-
662
- if (record.type === "break" ||
663
- record.type === "continue") {
664
- this.next = record.arg;
665
- } else if (record.type === "return") {
666
- this.rval = this.arg = record.arg;
667
- this.method = "return";
668
- this.next = "end";
669
- } else if (record.type === "normal" && afterLoc) {
670
- this.next = afterLoc;
671
- }
672
-
673
- return ContinueSentinel;
674
- },
675
-
676
- finish: function(finallyLoc) {
677
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
678
- var entry = this.tryEntries[i];
679
- if (entry.finallyLoc === finallyLoc) {
680
- this.complete(entry.completion, entry.afterLoc);
681
- resetTryEntry(entry);
682
- return ContinueSentinel;
683
- }
684
- }
685
- },
686
-
687
- "catch": function(tryLoc) {
688
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
689
- var entry = this.tryEntries[i];
690
- if (entry.tryLoc === tryLoc) {
691
- var record = entry.completion;
692
- if (record.type === "throw") {
693
- var thrown = record.arg;
694
- resetTryEntry(entry);
695
- }
696
- return thrown;
697
- }
698
- }
699
-
700
- // The context.catch method must only be called with a location
701
- // argument that corresponds to a known catch block.
702
- throw new Error("illegal catch attempt");
703
- },
704
-
705
- delegateYield: function(iterable, resultName, nextLoc) {
706
- this.delegate = {
707
- iterator: values(iterable),
708
- resultName: resultName,
709
- nextLoc: nextLoc
710
- };
711
-
712
- if (this.method === "next") {
713
- // Deliberately forget the last sent value so that we don't
714
- // accidentally pass it on to the delegate.
715
- this.arg = undefined;
716
- }
717
-
718
- return ContinueSentinel;
719
- }
720
- };
721
-
722
- // Regardless of whether this script is executing as a CommonJS module
723
- // or not, return the runtime object so that we can declare the variable
724
- // regeneratorRuntime in the outer scope, which allows this module to be
725
- // injected easily by `bin/regenerator --include-runtime script.js`.
726
- return exports;
727
-
728
- }(
729
- // If this script is executing as a CommonJS module, use module.exports
730
- // as the regeneratorRuntime namespace. Otherwise create a new empty
731
- // object. Either way, the resulting object will be used to initialize
732
- // the regeneratorRuntime variable at the top of this file.
733
- typeof module === "object" ? module.exports : {}
734
- ));
735
-
736
- try {
737
- regeneratorRuntime = runtime;
738
- } catch (accidentalStrictMode) {
739
- // This module should not be running in strict mode, so the above
740
- // assignment should always work unless something is misconfigured. Just
741
- // in case runtime.js accidentally runs in strict mode, in modern engines
742
- // we can explicitly access globalThis. In older engines we can escape
743
- // strict mode using a global Function call. This could conceivably fail
744
- // if a Content Security Policy forbids using Function, but in that case
745
- // the proper solution is to fix the accidental strict mode problem. If
746
- // you've misconfigured your bundler to force strict mode and applied a
747
- // CSP to forbid Function, and you're not willing to fix either of those
748
- // problems, please detail your unique predicament in a GitHub issue.
749
- if (typeof globalThis === "object") {
750
- globalThis.regeneratorRuntime = runtime;
751
- } else {
752
- Function("r", "regeneratorRuntime = r")(runtime);
753
- }
754
- }