isomorfeus-redux 4.1.2 → 4.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (225) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +27 -0
  3. data/lib/isomorfeus/execution_environment.rb +1 -0
  4. data/lib/isomorfeus/{redux_config.rb → redux/config.rb} +0 -0
  5. data/lib/isomorfeus/redux/imports.rb +17 -0
  6. data/lib/isomorfeus-redux.rb +7 -5
  7. data/lib/redux/version.rb +1 -1
  8. data/node_modules/.package-lock.json +31 -0
  9. data/node_modules/@babel/runtime/LICENSE +22 -0
  10. data/node_modules/@babel/runtime/README.md +19 -0
  11. data/node_modules/@babel/runtime/helpers/AsyncGenerator.js +99 -0
  12. data/node_modules/@babel/runtime/helpers/AwaitValue.js +6 -0
  13. data/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js +31 -0
  14. data/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +12 -0
  15. data/node_modules/@babel/runtime/helpers/arrayWithHoles.js +6 -0
  16. data/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js +8 -0
  17. data/node_modules/@babel/runtime/helpers/assertThisInitialized.js +10 -0
  18. data/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js +57 -0
  19. data/node_modules/@babel/runtime/helpers/asyncIterator.js +16 -0
  20. data/node_modules/@babel/runtime/helpers/asyncToGenerator.js +38 -0
  21. data/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js +8 -0
  22. data/node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.js +8 -0
  23. data/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js +23 -0
  24. data/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js +10 -0
  25. data/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js +14 -0
  26. data/node_modules/@babel/runtime/helpers/classCallCheck.js +8 -0
  27. data/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js +8 -0
  28. data/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js +8 -0
  29. data/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js +10 -0
  30. data/node_modules/@babel/runtime/helpers/classNameTDZError.js +6 -0
  31. data/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js +11 -0
  32. data/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js +11 -0
  33. data/node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.js +9 -0
  34. data/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js +10 -0
  35. data/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js +8 -0
  36. data/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js +12 -0
  37. data/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js +10 -0
  38. data/node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.js +9 -0
  39. data/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js +6 -0
  40. data/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js +14 -0
  41. data/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js +14 -0
  42. data/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js +15 -0
  43. data/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js +9 -0
  44. data/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js +6 -0
  45. data/node_modules/@babel/runtime/helpers/construct.js +26 -0
  46. data/node_modules/@babel/runtime/helpers/createClass.js +18 -0
  47. data/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js +61 -0
  48. data/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js +25 -0
  49. data/node_modules/@babel/runtime/helpers/createSuper.js +25 -0
  50. data/node_modules/@babel/runtime/helpers/decorate.js +401 -0
  51. data/node_modules/@babel/runtime/helpers/defaults.js +17 -0
  52. data/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js +25 -0
  53. data/node_modules/@babel/runtime/helpers/defineProperty.js +17 -0
  54. data/node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js +95 -0
  55. data/node_modules/@babel/runtime/helpers/esm/AwaitValue.js +3 -0
  56. data/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js +28 -0
  57. data/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +9 -0
  58. data/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +3 -0
  59. data/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +4 -0
  60. data/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +7 -0
  61. data/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js +54 -0
  62. data/node_modules/@babel/runtime/helpers/esm/asyncIterator.js +13 -0
  63. data/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +35 -0
  64. data/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js +4 -0
  65. data/node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js +5 -0
  66. data/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js +20 -0
  67. data/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js +7 -0
  68. data/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js +11 -0
  69. data/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +5 -0
  70. data/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js +5 -0
  71. data/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +5 -0
  72. data/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js +7 -0
  73. data/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js +3 -0
  74. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js +6 -0
  75. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js +6 -0
  76. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js +5 -0
  77. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js +7 -0
  78. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js +4 -0
  79. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js +7 -0
  80. data/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js +7 -0
  81. data/node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js +5 -0
  82. data/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js +3 -0
  83. data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js +8 -0
  84. data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js +8 -0
  85. data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js +9 -0
  86. data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js +5 -0
  87. data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js +3 -0
  88. data/node_modules/@babel/runtime/helpers/esm/construct.js +18 -0
  89. data/node_modules/@babel/runtime/helpers/esm/createClass.js +15 -0
  90. data/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js +57 -0
  91. data/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js +21 -0
  92. data/node_modules/@babel/runtime/helpers/esm/createSuper.js +19 -0
  93. data/node_modules/@babel/runtime/helpers/esm/decorate.js +396 -0
  94. data/node_modules/@babel/runtime/helpers/esm/defaults.js +14 -0
  95. data/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js +22 -0
  96. data/node_modules/@babel/runtime/helpers/esm/defineProperty.js +14 -0
  97. data/node_modules/@babel/runtime/helpers/esm/extends.js +17 -0
  98. data/node_modules/@babel/runtime/helpers/esm/get.js +20 -0
  99. data/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +6 -0
  100. data/node_modules/@babel/runtime/helpers/esm/inherits.js +15 -0
  101. data/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +6 -0
  102. data/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js +9 -0
  103. data/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js +3 -0
  104. data/node_modules/@babel/runtime/helpers/esm/instanceof.js +7 -0
  105. data/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js +5 -0
  106. data/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js +51 -0
  107. data/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js +3 -0
  108. data/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +12 -0
  109. data/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +3 -0
  110. data/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +29 -0
  111. data/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimitLoose.js +14 -0
  112. data/node_modules/@babel/runtime/helpers/esm/jsx.js +46 -0
  113. data/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js +9 -0
  114. data/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js +5 -0
  115. data/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +3 -0
  116. data/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +3 -0
  117. data/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js +3 -0
  118. data/node_modules/@babel/runtime/helpers/esm/objectSpread.js +19 -0
  119. data/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +39 -0
  120. data/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +19 -0
  121. data/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +14 -0
  122. data/node_modules/@babel/runtime/helpers/esm/package.json +3 -0
  123. data/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +11 -0
  124. data/node_modules/@babel/runtime/helpers/esm/readOnlyError.js +3 -0
  125. data/node_modules/@babel/runtime/helpers/esm/set.js +51 -0
  126. data/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +8 -0
  127. data/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js +7 -0
  128. data/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +7 -0
  129. data/node_modules/@babel/runtime/helpers/esm/slicedToArrayLoose.js +7 -0
  130. data/node_modules/@babel/runtime/helpers/esm/superPropBase.js +9 -0
  131. data/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +11 -0
  132. data/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js +8 -0
  133. data/node_modules/@babel/runtime/helpers/esm/tdz.js +3 -0
  134. data/node_modules/@babel/runtime/helpers/esm/temporalRef.js +5 -0
  135. data/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js +1 -0
  136. data/node_modules/@babel/runtime/helpers/esm/toArray.js +7 -0
  137. data/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +7 -0
  138. data/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +13 -0
  139. data/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +6 -0
  140. data/node_modules/@babel/runtime/helpers/esm/typeof.js +15 -0
  141. data/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +9 -0
  142. data/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js +6 -0
  143. data/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js +37 -0
  144. data/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js +65 -0
  145. data/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js +3 -0
  146. data/node_modules/@babel/runtime/helpers/extends.js +21 -0
  147. data/node_modules/@babel/runtime/helpers/get.js +27 -0
  148. data/node_modules/@babel/runtime/helpers/getPrototypeOf.js +10 -0
  149. data/node_modules/@babel/runtime/helpers/inherits.js +19 -0
  150. data/node_modules/@babel/runtime/helpers/inheritsLoose.js +10 -0
  151. data/node_modules/@babel/runtime/helpers/initializerDefineProperty.js +12 -0
  152. data/node_modules/@babel/runtime/helpers/initializerWarningHelper.js +6 -0
  153. data/node_modules/@babel/runtime/helpers/instanceof.js +10 -0
  154. data/node_modules/@babel/runtime/helpers/interopRequireDefault.js +8 -0
  155. data/node_modules/@babel/runtime/helpers/interopRequireWildcard.js +54 -0
  156. data/node_modules/@babel/runtime/helpers/isNativeFunction.js +6 -0
  157. data/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js +15 -0
  158. data/node_modules/@babel/runtime/helpers/iterableToArray.js +6 -0
  159. data/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +32 -0
  160. data/node_modules/@babel/runtime/helpers/iterableToArrayLimitLoose.js +17 -0
  161. data/node_modules/@babel/runtime/helpers/jsx.js +50 -0
  162. data/node_modules/@babel/runtime/helpers/maybeArrayLike.js +13 -0
  163. data/node_modules/@babel/runtime/helpers/newArrowCheck.js +8 -0
  164. data/node_modules/@babel/runtime/helpers/nonIterableRest.js +6 -0
  165. data/node_modules/@babel/runtime/helpers/nonIterableSpread.js +6 -0
  166. data/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js +6 -0
  167. data/node_modules/@babel/runtime/helpers/objectSpread.js +23 -0
  168. data/node_modules/@babel/runtime/helpers/objectSpread2.js +42 -0
  169. data/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +23 -0
  170. data/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +17 -0
  171. data/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js +16 -0
  172. data/node_modules/@babel/runtime/helpers/readOnlyError.js +6 -0
  173. data/node_modules/@babel/runtime/helpers/set.js +55 -0
  174. data/node_modules/@babel/runtime/helpers/setPrototypeOf.js +12 -0
  175. data/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js +10 -0
  176. data/node_modules/@babel/runtime/helpers/slicedToArray.js +14 -0
  177. data/node_modules/@babel/runtime/helpers/slicedToArrayLoose.js +14 -0
  178. data/node_modules/@babel/runtime/helpers/superPropBase.js +13 -0
  179. data/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js +14 -0
  180. data/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js +11 -0
  181. data/node_modules/@babel/runtime/helpers/tdz.js +6 -0
  182. data/node_modules/@babel/runtime/helpers/temporalRef.js +10 -0
  183. data/node_modules/@babel/runtime/helpers/temporalUndefined.js +4 -0
  184. data/node_modules/@babel/runtime/helpers/toArray.js +14 -0
  185. data/node_modules/@babel/runtime/helpers/toConsumableArray.js +14 -0
  186. data/node_modules/@babel/runtime/helpers/toPrimitive.js +17 -0
  187. data/node_modules/@babel/runtime/helpers/toPropertyKey.js +11 -0
  188. data/node_modules/@babel/runtime/helpers/typeof.js +22 -0
  189. data/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +13 -0
  190. data/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js +10 -0
  191. data/node_modules/@babel/runtime/helpers/wrapNativeSuper.js +45 -0
  192. data/node_modules/@babel/runtime/helpers/wrapRegExp.js +72 -0
  193. data/node_modules/@babel/runtime/helpers/writeOnlyError.js +6 -0
  194. data/node_modules/@babel/runtime/package.json +848 -0
  195. data/node_modules/@babel/runtime/regenerator/index.js +1 -0
  196. data/node_modules/redux/LICENSE.md +21 -0
  197. data/node_modules/redux/README.md +322 -0
  198. data/node_modules/redux/dist/redux.js +735 -0
  199. data/node_modules/redux/dist/redux.min.js +1 -0
  200. data/node_modules/redux/es/redux.js +684 -0
  201. data/node_modules/redux/es/redux.mjs +1 -0
  202. data/node_modules/redux/index.d.ts +676 -0
  203. data/node_modules/redux/lib/redux.js +697 -0
  204. data/node_modules/redux/package.json +108 -0
  205. data/node_modules/redux/src/applyMiddleware.js +41 -0
  206. data/node_modules/redux/src/bindActionCreators.js +52 -0
  207. data/node_modules/redux/src/combineReducers.js +175 -0
  208. data/node_modules/redux/src/compose.js +22 -0
  209. data/node_modules/redux/src/createStore.js +315 -0
  210. data/node_modules/redux/src/index.js +36 -0
  211. data/node_modules/redux/src/utils/actionTypes.js +17 -0
  212. data/node_modules/redux/src/utils/formatProdErrorMessage.js +15 -0
  213. data/node_modules/redux/src/utils/isPlainObject.js +14 -0
  214. data/node_modules/redux/src/utils/kindOf.js +70 -0
  215. data/node_modules/redux/src/utils/symbol-observable.js +3 -0
  216. data/node_modules/redux/src/utils/warning.js +19 -0
  217. data/node_modules/regenerator-runtime/LICENSE +21 -0
  218. data/node_modules/regenerator-runtime/README.md +31 -0
  219. data/node_modules/regenerator-runtime/package.json +19 -0
  220. data/node_modules/regenerator-runtime/path.js +11 -0
  221. data/node_modules/regenerator-runtime/runtime.js +754 -0
  222. data/package.json +6 -0
  223. metadata +234 -5
  224. data/README.md +0 -223
  225. data/lib/iso_opal.rb +0 -9
@@ -0,0 +1,36 @@
1
+ import createStore from './createStore'
2
+ import combineReducers from './combineReducers'
3
+ import bindActionCreators from './bindActionCreators'
4
+ import applyMiddleware from './applyMiddleware'
5
+ import compose from './compose'
6
+ import warning from './utils/warning'
7
+ import __DO_NOT_USE__ActionTypes from './utils/actionTypes'
8
+
9
+ /*
10
+ * This is a dummy function to check if the function name has been altered by minification.
11
+ * If the function has been minified and NODE_ENV !== 'production', warn the user.
12
+ */
13
+ function isCrushed() {}
14
+
15
+ if (
16
+ process.env.NODE_ENV !== 'production' &&
17
+ typeof isCrushed.name === 'string' &&
18
+ isCrushed.name !== 'isCrushed'
19
+ ) {
20
+ warning(
21
+ 'You are currently using minified code outside of NODE_ENV === "production". ' +
22
+ 'This means that you are running a slower development build of Redux. ' +
23
+ 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' +
24
+ 'or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) ' +
25
+ 'to ensure you have the correct code for your production build.'
26
+ )
27
+ }
28
+
29
+ export {
30
+ createStore,
31
+ combineReducers,
32
+ bindActionCreators,
33
+ applyMiddleware,
34
+ compose,
35
+ __DO_NOT_USE__ActionTypes,
36
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * These are private action types reserved by Redux.
3
+ * For any unknown actions, you must return the current state.
4
+ * If the current state is undefined, you must return the initial state.
5
+ * Do not reference these action types directly in your code.
6
+ */
7
+
8
+ const randomString = () =>
9
+ Math.random().toString(36).substring(7).split('').join('.')
10
+
11
+ const ActionTypes = {
12
+ INIT: `@@redux/INIT${randomString()}`,
13
+ REPLACE: `@@redux/REPLACE${randomString()}`,
14
+ PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${randomString()}`,
15
+ }
16
+
17
+ export default ActionTypes
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js
3
+ *
4
+ * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes
5
+ * during build.
6
+ * @param {number} code
7
+ */
8
+ function formatProdErrorMessage(code) {
9
+ return (
10
+ `Minified Redux error #${code}; visit https://redux.js.org/Errors?code=${code} for the full message or ` +
11
+ 'use the non-minified dev environment for full errors. '
12
+ )
13
+ }
14
+
15
+ export default formatProdErrorMessage
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @param {any} obj The object to inspect.
3
+ * @returns {boolean} True if the argument appears to be a plain object.
4
+ */
5
+ export default function isPlainObject(obj) {
6
+ if (typeof obj !== 'object' || obj === null) return false
7
+
8
+ let proto = obj
9
+ while (Object.getPrototypeOf(proto) !== null) {
10
+ proto = Object.getPrototypeOf(proto)
11
+ }
12
+
13
+ return Object.getPrototypeOf(obj) === proto
14
+ }
@@ -0,0 +1,70 @@
1
+ // Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of
2
+ function miniKindOf(val) {
3
+ if (val === void 0) return 'undefined'
4
+ if (val === null) return 'null'
5
+
6
+ const type = typeof val
7
+ switch (type) {
8
+ case 'boolean':
9
+ case 'string':
10
+ case 'number':
11
+ case 'symbol':
12
+ case 'function': {
13
+ return type
14
+ }
15
+ default:
16
+ break
17
+ }
18
+
19
+ if (Array.isArray(val)) return 'array'
20
+ if (isDate(val)) return 'date'
21
+ if (isError(val)) return 'error'
22
+
23
+ const constructorName = ctorName(val)
24
+ switch (constructorName) {
25
+ case 'Symbol':
26
+ case 'Promise':
27
+ case 'WeakMap':
28
+ case 'WeakSet':
29
+ case 'Map':
30
+ case 'Set':
31
+ return constructorName
32
+ default:
33
+ break
34
+ }
35
+
36
+ // other
37
+ return type.slice(8, -1).toLowerCase().replace(/\s/g, '')
38
+ }
39
+
40
+ function ctorName(val) {
41
+ return typeof val.constructor === 'function' ? val.constructor.name : null
42
+ }
43
+
44
+ function isError(val) {
45
+ return (
46
+ val instanceof Error ||
47
+ (typeof val.message === 'string' &&
48
+ val.constructor &&
49
+ typeof val.constructor.stackTraceLimit === 'number')
50
+ )
51
+ }
52
+
53
+ function isDate(val) {
54
+ if (val instanceof Date) return true
55
+ return (
56
+ typeof val.toDateString === 'function' &&
57
+ typeof val.getDate === 'function' &&
58
+ typeof val.setDate === 'function'
59
+ )
60
+ }
61
+
62
+ export function kindOf(val) {
63
+ let typeOfVal = typeof val
64
+
65
+ if (process.env.NODE_ENV !== 'production') {
66
+ typeOfVal = miniKindOf(val)
67
+ }
68
+
69
+ return typeOfVal
70
+ }
@@ -0,0 +1,3 @@
1
+ // Inlined version of the `symbol-observable` polyfill
2
+ export default (() =>
3
+ (typeof Symbol === 'function' && Symbol.observable) || '@@observable')()
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Prints a warning in the console if it exists.
3
+ *
4
+ * @param {String} message The warning message.
5
+ * @returns {void}
6
+ */
7
+ export default function warning(message) {
8
+ /* eslint-disable no-console */
9
+ if (typeof console !== 'undefined' && typeof console.error === 'function') {
10
+ console.error(message)
11
+ }
12
+ /* eslint-enable no-console */
13
+ try {
14
+ // This error was thrown as a convenience so that if you enable
15
+ // "break on all exceptions" in your console,
16
+ // it would pause the execution at this line.
17
+ throw new Error(message)
18
+ } catch (e) {} // eslint-disable-line no-empty
19
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2014-present, Facebook, Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,31 @@
1
+ # regenerator-runtime
2
+
3
+ Standalone runtime for
4
+ [Regenerator](https://github.com/facebook/regenerator)-compiled generator
5
+ and `async` functions.
6
+
7
+ To import the runtime as a module (recommended), either of the following
8
+ import styles will work:
9
+ ```js
10
+ // CommonJS
11
+ const regeneratorRuntime = require("regenerator-runtime");
12
+
13
+ // ECMAScript 2015
14
+ import regeneratorRuntime from "regenerator-runtime";
15
+ ```
16
+
17
+ To ensure that `regeneratorRuntime` is defined globally, either of the
18
+ following styles will work:
19
+ ```js
20
+ // CommonJS
21
+ require("regenerator-runtime/runtime");
22
+
23
+ // ECMAScript 2015
24
+ import "regenerator-runtime/runtime.js";
25
+ ```
26
+
27
+ To get the absolute file system path of `runtime.js`, evaluate the
28
+ following expression:
29
+ ```js
30
+ require("regenerator-runtime/path").path
31
+ ```
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "regenerator-runtime",
3
+ "author": "Ben Newman <bn@cs.stanford.edu>",
4
+ "description": "Runtime for Regenerator-compiled generator and async functions.",
5
+ "version": "0.13.9",
6
+ "main": "runtime.js",
7
+ "keywords": [
8
+ "regenerator",
9
+ "runtime",
10
+ "generator",
11
+ "async"
12
+ ],
13
+ "sideEffects": true,
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "https://github.com/facebook/regenerator/tree/master/packages/runtime"
17
+ },
18
+ "license": "MIT"
19
+ }
@@ -0,0 +1,11 @@
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
+ exports.path = require("path").join(
9
+ __dirname,
10
+ "runtime.js"
11
+ );
@@ -0,0 +1,754 @@
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
+ }