@valbuild/react 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/.babelrc.json +10 -0
  2. package/CHANGELOG.md +0 -0
  3. package/dist/declarations/src/ValApi.d.ts +12 -0
  4. package/dist/declarations/src/ValProvider.d.ts +15 -0
  5. package/dist/declarations/src/ValRichText.d.ts +5 -0
  6. package/dist/declarations/src/ValStore.d.ts +15 -0
  7. package/dist/declarations/src/hooks/useVal.d.ts +3 -0
  8. package/dist/declarations/src/index.d.ts +3 -0
  9. package/dist/declarations/src/jsx-dev-runtime.d.ts +2 -0
  10. package/dist/declarations/src/jsx-namespace.d.ts +46 -0
  11. package/dist/declarations/src/jsx-runtime.d.ts +1 -0
  12. package/dist/slicedToArray-0ead6329.cjs.dev.js +70 -0
  13. package/dist/slicedToArray-236143cd.browser.esm.js +66 -0
  14. package/dist/slicedToArray-390fde8c.esm.js +66 -0
  15. package/dist/slicedToArray-57b117df.cjs.prod.js +70 -0
  16. package/dist/slicedToArray-bf9b195a.worker.esm.js +66 -0
  17. package/dist/valbuild-react.browser.esm.js +1227 -0
  18. package/dist/valbuild-react.cjs.d.ts +2 -0
  19. package/dist/valbuild-react.cjs.d.ts.map +1 -0
  20. package/dist/valbuild-react.cjs.dev.js +1239 -0
  21. package/dist/valbuild-react.cjs.js +7 -0
  22. package/dist/valbuild-react.cjs.prod.js +1239 -0
  23. package/dist/valbuild-react.esm.js +1227 -0
  24. package/dist/valbuild-react.worker.esm.js +1227 -0
  25. package/jest-environment.mjs +17 -0
  26. package/jsx-dev-runtime/dist/valbuild-react-jsx-dev-runtime.browser.esm.js +41 -0
  27. package/jsx-dev-runtime/dist/valbuild-react-jsx-dev-runtime.cjs.d.ts +2 -0
  28. package/jsx-dev-runtime/dist/valbuild-react-jsx-dev-runtime.cjs.d.ts.map +1 -0
  29. package/jsx-dev-runtime/dist/valbuild-react-jsx-dev-runtime.cjs.dev.js +70 -0
  30. package/jsx-dev-runtime/dist/valbuild-react-jsx-dev-runtime.cjs.js +7 -0
  31. package/jsx-dev-runtime/dist/valbuild-react-jsx-dev-runtime.cjs.prod.js +70 -0
  32. package/jsx-dev-runtime/dist/valbuild-react-jsx-dev-runtime.esm.js +41 -0
  33. package/jsx-dev-runtime/dist/valbuild-react-jsx-dev-runtime.worker.esm.js +41 -0
  34. package/jsx-dev-runtime/package.json +8 -0
  35. package/jsx-runtime/dist/valbuild-react-jsx-runtime.browser.esm.js +50 -0
  36. package/jsx-runtime/dist/valbuild-react-jsx-runtime.cjs.d.ts +2 -0
  37. package/jsx-runtime/dist/valbuild-react-jsx-runtime.cjs.d.ts.map +1 -0
  38. package/jsx-runtime/dist/valbuild-react-jsx-runtime.cjs.dev.js +80 -0
  39. package/jsx-runtime/dist/valbuild-react-jsx-runtime.cjs.js +7 -0
  40. package/jsx-runtime/dist/valbuild-react-jsx-runtime.cjs.prod.js +80 -0
  41. package/jsx-runtime/dist/valbuild-react-jsx-runtime.esm.js +50 -0
  42. package/jsx-runtime/dist/valbuild-react-jsx-runtime.worker.esm.js +50 -0
  43. package/jsx-runtime/package.json +8 -0
  44. package/package.json +76 -0
  45. package/tsconfig.json +18 -0
package/.babelrc.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "presets": [
3
+ [
4
+ "@babel/preset-react",
5
+ {
6
+ "runtime": "automatic"
7
+ }
8
+ ]
9
+ ]
10
+ }
package/CHANGELOG.md ADDED
File without changes
@@ -0,0 +1,12 @@
1
+ import { SerializedModule } from "@valbuild/core";
2
+ import { PatchJSON } from "@valbuild/core/patch";
3
+ export declare class ValApi {
4
+ readonly host: string;
5
+ constructor(host: string);
6
+ getModule(sourcePath: string): Promise<SerializedModule>;
7
+ patchModuleContent(moduleId: string, patch: PatchJSON): Promise<SerializedModule>;
8
+ commit(): Promise<void>;
9
+ getSession(): Promise<Response>;
10
+ loginUrl(): string;
11
+ logout(): Promise<Response>;
12
+ }
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { ValApi } from "./ValApi";
3
+ import { ValStore } from "./ValStore";
4
+ export declare function useValStore(): ValStore;
5
+ export declare function useValApi(): ValApi;
6
+ export type ValContext = {
7
+ readonly valStore: ValStore;
8
+ readonly valApi: ValApi;
9
+ };
10
+ export declare const ValContext: React.Context<ValContext>;
11
+ export type ValProviderProps = {
12
+ host?: string;
13
+ children?: React.ReactNode;
14
+ };
15
+ export declare function ValProvider({ host, children }: ValProviderProps): JSX.Element;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { RichText, Val } from "@valbuild/core";
3
+ export declare function ValRichText({ children }: {
4
+ children: Val<RichText>;
5
+ }): JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { ValModule, SelectorSource } from "@valbuild/core";
2
+ import { ValApi } from "./ValApi";
3
+ export declare class ValStore {
4
+ private readonly api;
5
+ private readonly vals;
6
+ private readonly listeners;
7
+ constructor(api: ValApi);
8
+ updateAll(): Promise<void>;
9
+ subscribe: (moduleId: string) => (listener: () => void) => () => void;
10
+ set(moduleId: string, val: ValModule<SelectorSource>): void;
11
+ get(moduleId: string): ValModule<SelectorSource> | undefined;
12
+ emitChange(moduleId: string): void;
13
+ getSnapshot: (moduleId: string) => () => ValModule<SelectorSource> | undefined;
14
+ getServerSnapshot: (moduleId: string) => () => ValModule<SelectorSource> | undefined;
15
+ }
@@ -0,0 +1,3 @@
1
+ import { SelectorSource, SelectorOf, GenericSelector, Val } from "@valbuild/core";
2
+ import { JsonOfSource } from "@valbuild/core/src/val";
3
+ export declare function useVal<T extends SelectorSource>(selector: T, locale?: string): SelectorOf<T> extends GenericSelector<infer S> ? Val<JsonOfSource<S>> : never;
@@ -0,0 +1,3 @@
1
+ export { ValProvider } from "./ValProvider";
2
+ export { useVal } from "./hooks/useVal";
3
+ export { ValRichText } from "./ValRichText";
@@ -0,0 +1,2 @@
1
+ export function jsxDEV(type: any, props: any, key: any, isStaticChildren: any, source: any, self: any): any;
2
+ export * from "react/jsx-dev-runtime";
@@ -0,0 +1,46 @@
1
+ import { Source, Val } from "@valbuild/core";
2
+
3
+ // unpack all here to avoid infinite self-referencing when defining our own JSX namespace
4
+ type ReactJSXElement = JSX.Element;
5
+ type ReactJSXElementClass = JSX.ElementClass;
6
+ type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty;
7
+ type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute;
8
+ type ReactJSXLibraryManagedAttributes<C, P> = JSX.LibraryManagedAttributes<
9
+ C,
10
+ P
11
+ >;
12
+ type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes;
13
+ type ReactJSXIntrinsicClassAttributes<T> = JSX.IntrinsicClassAttributes<T>;
14
+ type ReactJSXIntrinsicElements = JSX.IntrinsicElements;
15
+
16
+ type MaybeVal<T> = T extends Source ? Val<T> | T : T;
17
+ type WithVal<T extends object> = {
18
+ [K in keyof T]: K extends "key" | "ref" | "className"
19
+ ? T[K]
20
+ : K extends "style"
21
+ ? WithVal<React.CSSProperties>
22
+ : T[K] extends object
23
+ ? T[K]
24
+ : MaybeVal<T[K]>;
25
+ };
26
+
27
+ export namespace ValJSX {
28
+ export type Element = ReactJSXElement;
29
+ export type ElementClass = ReactJSXElementClass;
30
+ export type ElementAttributesProperty = ReactJSXElementAttributesProperty;
31
+ export type ElementChildrenAttribute = ReactJSXElementChildrenAttribute;
32
+
33
+ export type LibraryManagedAttributes<C, P> = ReactJSXLibraryManagedAttributes<
34
+ C,
35
+ P
36
+ >;
37
+
38
+ export type IntrinsicAttributes = ReactJSXIntrinsicAttributes;
39
+ export type IntrinsicClassAttributes<T> = ReactJSXIntrinsicClassAttributes<T>;
40
+
41
+ export type IntrinsicElements = {
42
+ [K in keyof ReactJSXIntrinsicElements]: WithVal<
43
+ ReactJSXIntrinsicElements[K]
44
+ >;
45
+ };
46
+ }
@@ -0,0 +1 @@
1
+ export { ValJSX as JSX } from "./jsx-namespace";
@@ -0,0 +1,70 @@
1
+ 'use strict';
2
+
3
+ function _typeof(obj) {
4
+ "@babel/helpers - typeof";
5
+
6
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
7
+ return typeof obj;
8
+ } : function (obj) {
9
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
10
+ }, _typeof(obj);
11
+ }
12
+
13
+ function _arrayLikeToArray(arr, len) {
14
+ if (len == null || len > arr.length) len = arr.length;
15
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
16
+ return arr2;
17
+ }
18
+
19
+ function _unsupportedIterableToArray(o, minLen) {
20
+ if (!o) return;
21
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
22
+ var n = Object.prototype.toString.call(o).slice(8, -1);
23
+ if (n === "Object" && o.constructor) n = o.constructor.name;
24
+ if (n === "Map" || n === "Set") return Array.from(o);
25
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
26
+ }
27
+
28
+ function _arrayWithHoles(arr) {
29
+ if (Array.isArray(arr)) return arr;
30
+ }
31
+
32
+ function _iterableToArrayLimit(arr, i) {
33
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
34
+ if (null != _i) {
35
+ var _s,
36
+ _e,
37
+ _x,
38
+ _r,
39
+ _arr = [],
40
+ _n = !0,
41
+ _d = !1;
42
+ try {
43
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
44
+ if (Object(_i) !== _i) return;
45
+ _n = !1;
46
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
47
+ } catch (err) {
48
+ _d = !0, _e = err;
49
+ } finally {
50
+ try {
51
+ if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
52
+ } finally {
53
+ if (_d) throw _e;
54
+ }
55
+ }
56
+ return _arr;
57
+ }
58
+ }
59
+
60
+ function _nonIterableRest() {
61
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
62
+ }
63
+
64
+ function _slicedToArray(arr, i) {
65
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
66
+ }
67
+
68
+ exports._slicedToArray = _slicedToArray;
69
+ exports._typeof = _typeof;
70
+ exports._unsupportedIterableToArray = _unsupportedIterableToArray;
@@ -0,0 +1,66 @@
1
+ function _typeof(obj) {
2
+ "@babel/helpers - typeof";
3
+
4
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
5
+ return typeof obj;
6
+ } : function (obj) {
7
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
8
+ }, _typeof(obj);
9
+ }
10
+
11
+ function _arrayLikeToArray(arr, len) {
12
+ if (len == null || len > arr.length) len = arr.length;
13
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
14
+ return arr2;
15
+ }
16
+
17
+ function _unsupportedIterableToArray(o, minLen) {
18
+ if (!o) return;
19
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
20
+ var n = Object.prototype.toString.call(o).slice(8, -1);
21
+ if (n === "Object" && o.constructor) n = o.constructor.name;
22
+ if (n === "Map" || n === "Set") return Array.from(o);
23
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
24
+ }
25
+
26
+ function _arrayWithHoles(arr) {
27
+ if (Array.isArray(arr)) return arr;
28
+ }
29
+
30
+ function _iterableToArrayLimit(arr, i) {
31
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
32
+ if (null != _i) {
33
+ var _s,
34
+ _e,
35
+ _x,
36
+ _r,
37
+ _arr = [],
38
+ _n = !0,
39
+ _d = !1;
40
+ try {
41
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
42
+ if (Object(_i) !== _i) return;
43
+ _n = !1;
44
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
45
+ } catch (err) {
46
+ _d = !0, _e = err;
47
+ } finally {
48
+ try {
49
+ if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
50
+ } finally {
51
+ if (_d) throw _e;
52
+ }
53
+ }
54
+ return _arr;
55
+ }
56
+ }
57
+
58
+ function _nonIterableRest() {
59
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
60
+ }
61
+
62
+ function _slicedToArray(arr, i) {
63
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
64
+ }
65
+
66
+ export { _unsupportedIterableToArray as _, _slicedToArray as a, _typeof as b };
@@ -0,0 +1,66 @@
1
+ function _typeof(obj) {
2
+ "@babel/helpers - typeof";
3
+
4
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
5
+ return typeof obj;
6
+ } : function (obj) {
7
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
8
+ }, _typeof(obj);
9
+ }
10
+
11
+ function _arrayLikeToArray(arr, len) {
12
+ if (len == null || len > arr.length) len = arr.length;
13
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
14
+ return arr2;
15
+ }
16
+
17
+ function _unsupportedIterableToArray(o, minLen) {
18
+ if (!o) return;
19
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
20
+ var n = Object.prototype.toString.call(o).slice(8, -1);
21
+ if (n === "Object" && o.constructor) n = o.constructor.name;
22
+ if (n === "Map" || n === "Set") return Array.from(o);
23
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
24
+ }
25
+
26
+ function _arrayWithHoles(arr) {
27
+ if (Array.isArray(arr)) return arr;
28
+ }
29
+
30
+ function _iterableToArrayLimit(arr, i) {
31
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
32
+ if (null != _i) {
33
+ var _s,
34
+ _e,
35
+ _x,
36
+ _r,
37
+ _arr = [],
38
+ _n = !0,
39
+ _d = !1;
40
+ try {
41
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
42
+ if (Object(_i) !== _i) return;
43
+ _n = !1;
44
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
45
+ } catch (err) {
46
+ _d = !0, _e = err;
47
+ } finally {
48
+ try {
49
+ if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
50
+ } finally {
51
+ if (_d) throw _e;
52
+ }
53
+ }
54
+ return _arr;
55
+ }
56
+ }
57
+
58
+ function _nonIterableRest() {
59
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
60
+ }
61
+
62
+ function _slicedToArray(arr, i) {
63
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
64
+ }
65
+
66
+ export { _unsupportedIterableToArray as _, _slicedToArray as a, _typeof as b };
@@ -0,0 +1,70 @@
1
+ 'use strict';
2
+
3
+ function _typeof(obj) {
4
+ "@babel/helpers - typeof";
5
+
6
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
7
+ return typeof obj;
8
+ } : function (obj) {
9
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
10
+ }, _typeof(obj);
11
+ }
12
+
13
+ function _arrayLikeToArray(arr, len) {
14
+ if (len == null || len > arr.length) len = arr.length;
15
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
16
+ return arr2;
17
+ }
18
+
19
+ function _unsupportedIterableToArray(o, minLen) {
20
+ if (!o) return;
21
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
22
+ var n = Object.prototype.toString.call(o).slice(8, -1);
23
+ if (n === "Object" && o.constructor) n = o.constructor.name;
24
+ if (n === "Map" || n === "Set") return Array.from(o);
25
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
26
+ }
27
+
28
+ function _arrayWithHoles(arr) {
29
+ if (Array.isArray(arr)) return arr;
30
+ }
31
+
32
+ function _iterableToArrayLimit(arr, i) {
33
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
34
+ if (null != _i) {
35
+ var _s,
36
+ _e,
37
+ _x,
38
+ _r,
39
+ _arr = [],
40
+ _n = !0,
41
+ _d = !1;
42
+ try {
43
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
44
+ if (Object(_i) !== _i) return;
45
+ _n = !1;
46
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
47
+ } catch (err) {
48
+ _d = !0, _e = err;
49
+ } finally {
50
+ try {
51
+ if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
52
+ } finally {
53
+ if (_d) throw _e;
54
+ }
55
+ }
56
+ return _arr;
57
+ }
58
+ }
59
+
60
+ function _nonIterableRest() {
61
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
62
+ }
63
+
64
+ function _slicedToArray(arr, i) {
65
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
66
+ }
67
+
68
+ exports._slicedToArray = _slicedToArray;
69
+ exports._typeof = _typeof;
70
+ exports._unsupportedIterableToArray = _unsupportedIterableToArray;
@@ -0,0 +1,66 @@
1
+ function _typeof(obj) {
2
+ "@babel/helpers - typeof";
3
+
4
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
5
+ return typeof obj;
6
+ } : function (obj) {
7
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
8
+ }, _typeof(obj);
9
+ }
10
+
11
+ function _arrayLikeToArray(arr, len) {
12
+ if (len == null || len > arr.length) len = arr.length;
13
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
14
+ return arr2;
15
+ }
16
+
17
+ function _unsupportedIterableToArray(o, minLen) {
18
+ if (!o) return;
19
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
20
+ var n = Object.prototype.toString.call(o).slice(8, -1);
21
+ if (n === "Object" && o.constructor) n = o.constructor.name;
22
+ if (n === "Map" || n === "Set") return Array.from(o);
23
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
24
+ }
25
+
26
+ function _arrayWithHoles(arr) {
27
+ if (Array.isArray(arr)) return arr;
28
+ }
29
+
30
+ function _iterableToArrayLimit(arr, i) {
31
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
32
+ if (null != _i) {
33
+ var _s,
34
+ _e,
35
+ _x,
36
+ _r,
37
+ _arr = [],
38
+ _n = !0,
39
+ _d = !1;
40
+ try {
41
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
42
+ if (Object(_i) !== _i) return;
43
+ _n = !1;
44
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
45
+ } catch (err) {
46
+ _d = !0, _e = err;
47
+ } finally {
48
+ try {
49
+ if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
50
+ } finally {
51
+ if (_d) throw _e;
52
+ }
53
+ }
54
+ return _arr;
55
+ }
56
+ }
57
+
58
+ function _nonIterableRest() {
59
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
60
+ }
61
+
62
+ function _slicedToArray(arr, i) {
63
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
64
+ }
65
+
66
+ export { _unsupportedIterableToArray as _, _slicedToArray as a, _typeof as b };