@streamlayer/react 1.23.0 → 1.23.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/lib/app/pause-ad.d.ts +2 -4
  2. package/lib/app/polymarket.d.ts +7 -0
  3. package/lib/cjs/Question.js +1 -1
  4. package/lib/cjs/advertisement.js +28 -223
  5. package/lib/cjs/analytics.js +1 -1
  6. package/lib/cjs/auth.js +1 -1
  7. package/lib/cjs/bet-pack.js +1 -1
  8. package/lib/cjs/feature.js +1 -0
  9. package/lib/cjs/gamification-feature.js +1 -1
  10. package/lib/cjs/gamification-feature2.js +1 -1
  11. package/lib/cjs/hooks-WfHlJH12.js +1 -0
  12. package/lib/cjs/index-eShKGO10.js +1 -5
  13. package/lib/cjs/index.js +1 -1
  14. package/lib/cjs/index10.js +1 -4
  15. package/lib/cjs/index11.js +3 -1
  16. package/lib/cjs/index12.js +1 -1
  17. package/lib/cjs/index13.js +3 -1
  18. package/lib/cjs/index14.js +1 -1
  19. package/lib/cjs/index15.js +1 -5
  20. package/lib/cjs/index16.js +3 -0
  21. package/lib/cjs/index2.js +1 -1
  22. package/lib/cjs/index3.js +1 -1
  23. package/lib/cjs/index4.js +3 -5
  24. package/lib/cjs/index5.js +1 -1
  25. package/lib/cjs/index6.js +1 -1
  26. package/lib/cjs/index7.js +1 -1
  27. package/lib/cjs/index8.js +1 -1
  28. package/lib/cjs/index9.js +1 -1
  29. package/lib/cjs/insight.js +1 -1
  30. package/lib/cjs/masters.js +1 -1
  31. package/lib/cjs/masters2.js +1 -13
  32. package/lib/cjs/notification.js +1 -1
  33. package/lib/cjs/pause-ad.js +1 -1
  34. package/lib/cjs/points.js +1 -1
  35. package/lib/cjs/polymarket.js +9 -0
  36. package/lib/cjs/sl-types.js +1 -15
  37. package/lib/cjs/storage.js +1 -1
  38. package/lib/cjs/style.css +1 -0
  39. package/lib/cjs/theme.js +1 -17
  40. package/lib/cjs/useStreamLayerApp.js +1 -1
  41. package/lib/cjs/useStreamLayerApp2.js +3 -17
  42. package/lib/cjs/utils.js +1 -47
  43. package/lib/classic/app/pause-ad.d.ts +2 -4
  44. package/lib/classic/app/polymarket.d.ts +7 -0
  45. package/lib/classic/cjs/Question.js +1 -1
  46. package/lib/classic/cjs/advertisement.js +28 -223
  47. package/lib/classic/cjs/analytics.js +1 -1
  48. package/lib/classic/cjs/auth.js +1 -1
  49. package/lib/classic/cjs/bet-pack.js +3 -5
  50. package/lib/classic/cjs/feature.js +1 -0
  51. package/lib/classic/cjs/gamification-feature.js +1 -1
  52. package/lib/classic/cjs/hooks-WfHlJH12.js +1 -0
  53. package/lib/classic/cjs/index-eShKGO10.js +1 -5
  54. package/lib/classic/cjs/index.js +1 -1
  55. package/lib/classic/cjs/index10.js +1 -1
  56. package/lib/classic/cjs/index11.js +1 -1
  57. package/lib/classic/cjs/index12.js +1 -4
  58. package/lib/classic/cjs/index13.js +3 -0
  59. package/lib/classic/cjs/index2.js +3 -5
  60. package/lib/classic/cjs/index3.js +1 -1
  61. package/lib/classic/cjs/index4.js +1 -1
  62. package/lib/classic/cjs/index5.js +1 -1
  63. package/lib/classic/cjs/index6.js +1 -1
  64. package/lib/classic/cjs/index7.js +1 -1
  65. package/lib/classic/cjs/index8.js +1 -1
  66. package/lib/classic/cjs/index9.js +3 -1
  67. package/lib/classic/cjs/insight.js +1 -1
  68. package/lib/classic/cjs/notification.js +1 -1
  69. package/lib/classic/cjs/notification2.js +1 -1
  70. package/lib/classic/cjs/pause-ad.js +1 -1
  71. package/lib/classic/cjs/points.js +1 -1
  72. package/lib/classic/cjs/polymarket.js +9 -0
  73. package/lib/classic/cjs/sl-types.js +1 -15
  74. package/lib/classic/cjs/style.css +1 -0
  75. package/lib/classic/cjs/useStreamLayerApp.js +1 -1
  76. package/lib/classic/cjs/useStreamLayerApp2.js +3 -17
  77. package/lib/classic/cjs/utils.js +1 -47
  78. package/lib/classic/es/Question.js +277 -264
  79. package/lib/classic/es/advertisement.js +34990 -18881
  80. package/lib/classic/es/analytics.js +58 -56
  81. package/lib/classic/es/auth.js +14 -8
  82. package/lib/classic/es/bet-pack.js +2448 -2418
  83. package/lib/classic/es/feature.js +108 -0
  84. package/lib/classic/es/gamification-feature.js +2 -2
  85. package/lib/classic/es/hooks-WfHlJH12.js +98 -0
  86. package/lib/classic/es/index-eShKGO10.js +948 -948
  87. package/lib/classic/es/index.js +13 -13
  88. package/lib/classic/es/index10.js +83 -2295
  89. package/lib/classic/es/index11.js +3095 -179
  90. package/lib/classic/es/index12.js +174 -821
  91. package/lib/classic/es/index13.js +850 -0
  92. package/lib/classic/es/index2.js +2099 -1763
  93. package/lib/classic/es/index3.js +11 -11
  94. package/lib/classic/es/index4.js +127 -127
  95. package/lib/classic/es/index5.js +3 -5
  96. package/lib/classic/es/index6.js +10 -11
  97. package/lib/classic/es/index7.js +6 -62
  98. package/lib/classic/es/index8.js +9 -316
  99. package/lib/classic/es/index9.js +316 -82
  100. package/lib/classic/es/insight.js +58 -53
  101. package/lib/classic/es/notification.js +5 -5
  102. package/lib/classic/es/notification2.js +765 -722
  103. package/lib/classic/es/pause-ad.js +190 -167
  104. package/lib/classic/es/points.js +55 -47
  105. package/lib/classic/es/polymarket.js +6848 -0
  106. package/lib/classic/es/sl-types.js +193 -125
  107. package/lib/classic/es/useStreamLayerApp.js +2 -2
  108. package/lib/classic/es/useStreamLayerApp2.js +9727 -7592
  109. package/lib/classic/es/utils.js +28 -28
  110. package/lib/classic/index.d.ts +1 -0
  111. package/lib/classic/style.css +1 -0
  112. package/lib/dist/cjs/gamification-feature.js +1 -1
  113. package/lib/dist/cjs/index-eShKGO10.js +1 -5
  114. package/lib/dist/cjs/index.js +1 -1
  115. package/lib/dist/cjs/masters.js +3 -77
  116. package/lib/dist/es/gamification-feature.js +2 -2
  117. package/lib/dist/es/index-eShKGO10.js +948 -948
  118. package/lib/dist/es/index.js +7 -8
  119. package/lib/dist/es/masters.js +18212 -14741
  120. package/lib/dist/index.d.ts +29 -8
  121. package/lib/dist/style.css +1 -1
  122. package/lib/es/Question.js +108 -106
  123. package/lib/es/advertisement.js +34990 -18881
  124. package/lib/es/analytics.js +58 -56
  125. package/lib/es/auth.js +14 -8
  126. package/lib/es/bet-pack.js +29 -17
  127. package/lib/es/feature.js +108 -0
  128. package/lib/es/gamification-feature.js +2 -2
  129. package/lib/es/gamification-feature2.js +2 -2
  130. package/lib/es/hooks-WfHlJH12.js +98 -0
  131. package/lib/es/index-eShKGO10.js +948 -948
  132. package/lib/es/index.js +14 -13
  133. package/lib/es/index10.js +258 -816
  134. package/lib/es/index11.js +837 -170
  135. package/lib/es/index12.js +181 -312
  136. package/lib/es/index13.js +316 -82
  137. package/lib/es/index14.js +83 -2350
  138. package/lib/es/index15.js +3069 -1224
  139. package/lib/es/index16.js +1453 -0
  140. package/lib/es/index2.js +1118 -984
  141. package/lib/es/index3.js +3 -62
  142. package/lib/es/index4.js +2424 -2407
  143. package/lib/es/index5.js +11 -11
  144. package/lib/es/index6.js +127 -127
  145. package/lib/es/index7.js +10 -7
  146. package/lib/es/index8.js +5 -9
  147. package/lib/es/index9.js +10 -265
  148. package/lib/es/insight.js +58 -53
  149. package/lib/es/masters.js +6 -5
  150. package/lib/es/masters2.js +696 -558
  151. package/lib/es/notification.js +697 -655
  152. package/lib/es/pause-ad.js +190 -167
  153. package/lib/es/points.js +56 -48
  154. package/lib/es/polymarket.js +6848 -0
  155. package/lib/es/sl-types.js +200 -132
  156. package/lib/es/storage.js +75 -74
  157. package/lib/es/theme.js +177 -31
  158. package/lib/es/useStreamLayerApp.js +2 -2
  159. package/lib/es/useStreamLayerApp2.js +9727 -7592
  160. package/lib/es/utils.js +28 -28
  161. package/lib/index.d.ts +1 -0
  162. package/lib/style.css +1 -1
  163. package/package.json +33 -20
  164. package/lib/cjs/hooks-B0Qttldg.js +0 -1
  165. package/lib/classic/cjs/hooks-B0Qttldg.js +0 -1
  166. package/lib/classic/es/hooks-B0Qttldg.js +0 -98
  167. package/lib/es/hooks-B0Qttldg.js +0 -98
@@ -1,183 +1,3099 @@
1
- import { s } from "./sl-types.js";
2
- import { Q as n } from "./useStreamLayerApp2.js";
3
- import { jsxs as a, jsx as i, Fragment as O } from "react/jsx-runtime";
4
- import { memo as b, useMemo as x } from "react";
5
- import { E as C } from "./index8.js";
6
- import { B as H } from "./index4.js";
7
- const ae = {
8
- [n.TWEET]: { label: "Insight", iconName: "icon-insight" },
9
- [n.PROMOTION]: { label: "Insight", iconName: "icon-insight" },
10
- [n.UNSET]: void 0,
11
- [n.FACTOID]: { label: "Insight", iconName: "icon-insight" },
12
- [n.POLL]: { label: "Poll", iconName: "icon-poll" },
13
- [n.TRIVIA]: { label: "Trivia", iconName: "icon-trivia" },
14
- [n.PREDICTION]: { label: "Prediction", iconName: "icon-prediction" }
15
- }, ne = {
16
- [n.TWEET]: "Learn more",
17
- [n.FACTOID]: "Learn more",
18
- [n.POLL]: "Answer",
19
- [n.TRIVIA]: "Answer",
20
- [n.PREDICTION]: "Answer",
21
- [n.PROMOTION]: "",
22
- [n.UNSET]: ""
23
- }, le = (t) => t.split(/\s+/).map((l) => l[0]).join("").toUpperCase(), oe = (t) => t ? t.toLocaleString("en-US") : "0", P = (t) => {
24
- const l = new Date(t);
25
- if (!l)
26
- return "";
27
- const m = /* @__PURE__ */ new Date(), o = Math.floor(m.getTime() - l.getTime());
28
- return o < 6e4 ? `${Math.floor(o / 1e3)}s` : o < 36e5 ? `${Math.floor(o / 6e4)}m` : o < 864e5 ? `${Math.floor(o / 36e5)}h` : l.getFullYear() === m.getFullYear() ? `${l.toLocaleDateString("en-US", {
29
- month: "short",
30
- day: "numeric"
31
- })}` : `${l.toLocaleDateString("en-US", {
32
- month: "2-digit",
33
- day: "2-digit",
34
- year: "2-digit"
35
- })}`;
36
- }, M = /* @__PURE__ */ s("div")({
37
- name: "Container",
38
- class: "cjq447q",
39
- propsAsIs: !1
40
- }), R = /* @__PURE__ */ s("div")({
41
- name: "ImageContainer",
42
- class: "i14egogb",
43
- propsAsIs: !1
44
- }), F = /* @__PURE__ */ s("img")({
45
- name: "Image",
46
- class: "i2g9g4l",
47
- propsAsIs: !1
48
- }), j = () => H, V = /* @__PURE__ */ s(j())({
49
- name: "TwitterIcon",
50
- class: "t1c454nm",
51
- propsAsIs: !0
52
- }), _ = /* @__PURE__ */ s("div")({
53
- name: "Details",
54
- class: "d11nigc3",
55
- propsAsIs: !1
56
- }), z = /* @__PURE__ */ s("div")({
57
- name: "Name",
58
- class: "nrxa4k8",
59
- propsAsIs: !1
60
- }), B = /* @__PURE__ */ s("div")({
61
- name: "UserNameAndDate",
62
- class: "u1p051g3",
63
- propsAsIs: !1
64
- }), k = ({ image: t, name: l, userName: m, verified: o, createdTweet: p }) => {
65
- const r = p && P(p);
66
- return /* @__PURE__ */ a(M, { children: [
67
- t && /* @__PURE__ */ a(R, { children: [
68
- /* @__PURE__ */ i(F, { className: "SL_AccountImage", src: t }),
69
- /* @__PURE__ */ i(V, { name: "twitter" })
70
- ] }),
71
- /* @__PURE__ */ a(_, { children: [
72
- l && /* @__PURE__ */ a(z, { className: "SL_TweetAccountName", children: [
73
- l,
74
- " ",
75
- o && /* @__PURE__ */ i(H, { name: "icon-twitter-verified" })
76
- ] }),
77
- m && /* @__PURE__ */ a(B, { className: "SL_TweetAccountUserName", children: [
78
- "@",
79
- m,
80
- " ",
81
- r && `・ ${r}`
82
- ] })
83
- ] })
84
- ] });
85
- }, q = /* @__PURE__ */ s("div")({
86
- name: "Container",
87
- class: "c1kzqw87",
88
- propsAsIs: !1
89
- }), Q = /* @__PURE__ */ s("div")({
90
- name: "Details",
91
- class: "d9r1hf9",
92
- propsAsIs: !1
93
- }), W = /* @__PURE__ */ s("div")({
94
- name: "Body",
95
- class: "bezygt5",
96
- propsAsIs: !1
97
- }), d = /* @__PURE__ */ s("div")({
98
- name: "ImagesContainer",
99
- class: "i1y8f7ym",
100
- propsAsIs: !1
101
- }), v = /* @__PURE__ */ s("div")({
102
- name: "ImagesBlock",
103
- class: "i18gwonx",
104
- propsAsIs: !1
105
- }), L = /* @__PURE__ */ s("img")({
106
- name: "Image",
107
- class: "i3g0xjd",
108
- propsAsIs: !1
109
- }), Y = () => L, c = /* @__PURE__ */ s(Y())({
110
- name: "ImageFullSize",
111
- class: "io8rt7p",
112
- propsAsIs: !0
113
- }), G = () => L, I = /* @__PURE__ */ s(G())({
114
- name: "ImageHalfSize",
115
- class: "i4hn3ox",
116
- propsAsIs: !0
117
- }), J = new RegExp("\\s?https?://t.co[^\\s]+(\\s+)?$"), K = (t) => t == null ? void 0 : t.replace(J, ""), re = b(
118
- ({ image: t, body: l, muted: m, account: o, accountVerified: p, tweet: r, isDetail: h, controlVideo: S }) => {
119
- var A, f, T, N, U;
120
- const e = (f = (A = r == null ? void 0 : r.meta) == null ? void 0 : A.extendedEntities) == null ? void 0 : f.media, g = e == null ? void 0 : e.find(({ type: u }) => u === "photo"), $ = x(() => {
121
- var u, w, D, y;
122
- return (y = (D = (w = (u = e == null ? void 0 : e[0]) == null ? void 0 : u.videoInfo) == null ? void 0 : w.variants) == null ? void 0 : D.findLast(({ contentType: E }) => E === "video/mp4")) == null ? void 0 : y.url;
123
- }, [e]);
124
- return /* @__PURE__ */ a(q, { children: [
125
- /* @__PURE__ */ a(Q, { children: [
126
- /* @__PURE__ */ i(
127
- k,
128
- {
129
- image: t,
130
- name: (T = r == null ? void 0 : r.meta) == null ? void 0 : T.accountName,
131
- userName: o,
132
- verified: p,
133
- createdTweet: r == null ? void 0 : r.date
134
- }
135
- ),
136
- /* @__PURE__ */ i(W, { children: K(l) }),
137
- !h && g && /* @__PURE__ */ i(d, { children: /* @__PURE__ */ i(c, { src: e == null ? void 0 : e[0].mediaUrlHttps }) }),
138
- h && g && /* @__PURE__ */ a(O, { children: [
139
- (e == null ? void 0 : e.length) === 1 && /* @__PURE__ */ i(d, { children: /* @__PURE__ */ i(c, { src: e[0].mediaUrlHttps }) }),
140
- (e == null ? void 0 : e.length) === 2 && /* @__PURE__ */ a(d, { children: [
141
- /* @__PURE__ */ i(I, { src: e[0].mediaUrlHttps }),
142
- /* @__PURE__ */ i(I, { src: e[1].mediaUrlHttps })
143
- ] }),
144
- (e == null ? void 0 : e.length) === 3 && /* @__PURE__ */ a(d, { children: [
145
- /* @__PURE__ */ i(I, { src: e[0].mediaUrlHttps }),
146
- /* @__PURE__ */ a(v, { children: [
147
- /* @__PURE__ */ i(c, { src: e[1].mediaUrlHttps }),
148
- /* @__PURE__ */ i(c, { src: e[2].mediaUrlHttps })
149
- ] })
150
- ] }),
151
- (e == null ? void 0 : e.length) === 4 && /* @__PURE__ */ a(d, { children: [
152
- /* @__PURE__ */ a(v, { children: [
153
- /* @__PURE__ */ i(c, { src: e[0].mediaUrlHttps }),
154
- /* @__PURE__ */ i(c, { src: e[1].mediaUrlHttps })
155
- ] }),
156
- /* @__PURE__ */ a(v, { children: [
157
- /* @__PURE__ */ i(c, { src: e[2].mediaUrlHttps }),
158
- /* @__PURE__ */ i(c, { src: e[3].mediaUrlHttps })
159
- ] })
160
- ] })
161
- ] })
162
- ] }),
163
- !g && (((N = e == null ? void 0 : e[0]) == null ? void 0 : N.type) === "video" || ((U = e == null ? void 0 : e[0]) == null ? void 0 : U.type) === "animated_gif") && $ && /* @__PURE__ */ i(
164
- C,
165
- {
166
- muted: m,
167
- source: $,
168
- poster: e[0].mediaUrlHttps,
169
- controlVideo: S
170
- }
171
- )
172
- ] });
1
+ import React36__default from "react";
2
+ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
3
+ function getDefaultExportFromCjs(x) {
4
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
5
+ }
6
+ function getAugmentedNamespace(n) {
7
+ if (n.__esModule) return n;
8
+ var f = n.default;
9
+ if (typeof f == "function") {
10
+ var a = function a2() {
11
+ if (this instanceof a2) {
12
+ return Reflect.construct(f, arguments, this.constructor);
13
+ }
14
+ return f.apply(this, arguments);
15
+ };
16
+ a.prototype = f.prototype;
17
+ } else a = {};
18
+ Object.defineProperty(a, "__esModule", { value: true });
19
+ Object.keys(n).forEach(function(k) {
20
+ var d = Object.getOwnPropertyDescriptor(n, k);
21
+ Object.defineProperty(a, k, d.get ? d : {
22
+ enumerable: true,
23
+ get: function() {
24
+ return n[k];
25
+ }
26
+ });
27
+ });
28
+ return a;
29
+ }
30
+ var dist = { exports: {} };
31
+ var isObject_1;
32
+ var hasRequiredIsObject;
33
+ function requireIsObject() {
34
+ if (hasRequiredIsObject) return isObject_1;
35
+ hasRequiredIsObject = 1;
36
+ function isObject2(value) {
37
+ var type = typeof value;
38
+ return value != null && (type == "object" || type == "function");
39
+ }
40
+ isObject_1 = isObject2;
41
+ return isObject_1;
42
+ }
43
+ var _freeGlobal;
44
+ var hasRequired_freeGlobal;
45
+ function require_freeGlobal() {
46
+ if (hasRequired_freeGlobal) return _freeGlobal;
47
+ hasRequired_freeGlobal = 1;
48
+ var freeGlobal = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
49
+ _freeGlobal = freeGlobal;
50
+ return _freeGlobal;
51
+ }
52
+ var _root;
53
+ var hasRequired_root;
54
+ function require_root() {
55
+ if (hasRequired_root) return _root;
56
+ hasRequired_root = 1;
57
+ var freeGlobal = require_freeGlobal();
58
+ var freeSelf = typeof self == "object" && self && self.Object === Object && self;
59
+ var root2 = freeGlobal || freeSelf || Function("return this")();
60
+ _root = root2;
61
+ return _root;
62
+ }
63
+ var now_1;
64
+ var hasRequiredNow;
65
+ function requireNow() {
66
+ if (hasRequiredNow) return now_1;
67
+ hasRequiredNow = 1;
68
+ var root2 = require_root();
69
+ var now = function() {
70
+ return root2.Date.now();
71
+ };
72
+ now_1 = now;
73
+ return now_1;
74
+ }
75
+ var _trimmedEndIndex;
76
+ var hasRequired_trimmedEndIndex;
77
+ function require_trimmedEndIndex() {
78
+ if (hasRequired_trimmedEndIndex) return _trimmedEndIndex;
79
+ hasRequired_trimmedEndIndex = 1;
80
+ var reWhitespace = /\s/;
81
+ function trimmedEndIndex(string) {
82
+ var index = string.length;
83
+ while (index-- && reWhitespace.test(string.charAt(index))) {
84
+ }
85
+ return index;
86
+ }
87
+ _trimmedEndIndex = trimmedEndIndex;
88
+ return _trimmedEndIndex;
89
+ }
90
+ var _baseTrim;
91
+ var hasRequired_baseTrim;
92
+ function require_baseTrim() {
93
+ if (hasRequired_baseTrim) return _baseTrim;
94
+ hasRequired_baseTrim = 1;
95
+ var trimmedEndIndex = require_trimmedEndIndex();
96
+ var reTrimStart = /^\s+/;
97
+ function baseTrim(string) {
98
+ return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
99
+ }
100
+ _baseTrim = baseTrim;
101
+ return _baseTrim;
102
+ }
103
+ var _Symbol;
104
+ var hasRequired_Symbol;
105
+ function require_Symbol() {
106
+ if (hasRequired_Symbol) return _Symbol;
107
+ hasRequired_Symbol = 1;
108
+ var root2 = require_root();
109
+ var Symbol = root2.Symbol;
110
+ _Symbol = Symbol;
111
+ return _Symbol;
112
+ }
113
+ var _getRawTag;
114
+ var hasRequired_getRawTag;
115
+ function require_getRawTag() {
116
+ if (hasRequired_getRawTag) return _getRawTag;
117
+ hasRequired_getRawTag = 1;
118
+ var Symbol = require_Symbol();
119
+ var objectProto2 = Object.prototype;
120
+ var hasOwnProperty2 = objectProto2.hasOwnProperty;
121
+ var nativeObjectToString = objectProto2.toString;
122
+ var symToStringTag = Symbol ? Symbol.toStringTag : void 0;
123
+ function getRawTag(value) {
124
+ var isOwn = hasOwnProperty2.call(value, symToStringTag), tag = value[symToStringTag];
125
+ try {
126
+ value[symToStringTag] = void 0;
127
+ var unmasked = true;
128
+ } catch (e) {
129
+ }
130
+ var result = nativeObjectToString.call(value);
131
+ if (unmasked) {
132
+ if (isOwn) {
133
+ value[symToStringTag] = tag;
134
+ } else {
135
+ delete value[symToStringTag];
136
+ }
137
+ }
138
+ return result;
139
+ }
140
+ _getRawTag = getRawTag;
141
+ return _getRawTag;
142
+ }
143
+ var _objectToString;
144
+ var hasRequired_objectToString;
145
+ function require_objectToString() {
146
+ if (hasRequired_objectToString) return _objectToString;
147
+ hasRequired_objectToString = 1;
148
+ var objectProto2 = Object.prototype;
149
+ var nativeObjectToString = objectProto2.toString;
150
+ function objectToString(value) {
151
+ return nativeObjectToString.call(value);
152
+ }
153
+ _objectToString = objectToString;
154
+ return _objectToString;
155
+ }
156
+ var _baseGetTag;
157
+ var hasRequired_baseGetTag;
158
+ function require_baseGetTag() {
159
+ if (hasRequired_baseGetTag) return _baseGetTag;
160
+ hasRequired_baseGetTag = 1;
161
+ var Symbol = require_Symbol(), getRawTag = require_getRawTag(), objectToString = require_objectToString();
162
+ var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
163
+ var symToStringTag = Symbol ? Symbol.toStringTag : void 0;
164
+ function baseGetTag2(value) {
165
+ if (value == null) {
166
+ return value === void 0 ? undefinedTag : nullTag;
167
+ }
168
+ return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
169
+ }
170
+ _baseGetTag = baseGetTag2;
171
+ return _baseGetTag;
172
+ }
173
+ var isObjectLike_1;
174
+ var hasRequiredIsObjectLike;
175
+ function requireIsObjectLike() {
176
+ if (hasRequiredIsObjectLike) return isObjectLike_1;
177
+ hasRequiredIsObjectLike = 1;
178
+ function isObjectLike(value) {
179
+ return value != null && typeof value == "object";
180
+ }
181
+ isObjectLike_1 = isObjectLike;
182
+ return isObjectLike_1;
183
+ }
184
+ var isSymbol_1;
185
+ var hasRequiredIsSymbol;
186
+ function requireIsSymbol() {
187
+ if (hasRequiredIsSymbol) return isSymbol_1;
188
+ hasRequiredIsSymbol = 1;
189
+ var baseGetTag2 = require_baseGetTag(), isObjectLike = requireIsObjectLike();
190
+ var symbolTag = "[object Symbol]";
191
+ function isSymbol(value) {
192
+ return typeof value == "symbol" || isObjectLike(value) && baseGetTag2(value) == symbolTag;
193
+ }
194
+ isSymbol_1 = isSymbol;
195
+ return isSymbol_1;
196
+ }
197
+ var toNumber_1;
198
+ var hasRequiredToNumber;
199
+ function requireToNumber() {
200
+ if (hasRequiredToNumber) return toNumber_1;
201
+ hasRequiredToNumber = 1;
202
+ var baseTrim = require_baseTrim(), isObject2 = requireIsObject(), isSymbol = requireIsSymbol();
203
+ var NAN = 0 / 0;
204
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
205
+ var reIsBinary = /^0b[01]+$/i;
206
+ var reIsOctal = /^0o[0-7]+$/i;
207
+ var freeParseInt = parseInt;
208
+ function toNumber(value) {
209
+ if (typeof value == "number") {
210
+ return value;
211
+ }
212
+ if (isSymbol(value)) {
213
+ return NAN;
214
+ }
215
+ if (isObject2(value)) {
216
+ var other = typeof value.valueOf == "function" ? value.valueOf() : value;
217
+ value = isObject2(other) ? other + "" : other;
218
+ }
219
+ if (typeof value != "string") {
220
+ return value === 0 ? value : +value;
221
+ }
222
+ value = baseTrim(value);
223
+ var isBinary = reIsBinary.test(value);
224
+ return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
173
225
  }
226
+ toNumber_1 = toNumber;
227
+ return toNumber_1;
228
+ }
229
+ var debounce_1;
230
+ var hasRequiredDebounce;
231
+ function requireDebounce() {
232
+ if (hasRequiredDebounce) return debounce_1;
233
+ hasRequiredDebounce = 1;
234
+ var isObject2 = requireIsObject(), now = requireNow(), toNumber = requireToNumber();
235
+ var FUNC_ERROR_TEXT2 = "Expected a function";
236
+ var nativeMax = Math.max, nativeMin = Math.min;
237
+ function debounce(func, wait, options) {
238
+ var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
239
+ if (typeof func != "function") {
240
+ throw new TypeError(FUNC_ERROR_TEXT2);
241
+ }
242
+ wait = toNumber(wait) || 0;
243
+ if (isObject2(options)) {
244
+ leading = !!options.leading;
245
+ maxing = "maxWait" in options;
246
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
247
+ trailing = "trailing" in options ? !!options.trailing : trailing;
248
+ }
249
+ function invokeFunc(time) {
250
+ var args = lastArgs, thisArg = lastThis;
251
+ lastArgs = lastThis = void 0;
252
+ lastInvokeTime = time;
253
+ result = func.apply(thisArg, args);
254
+ return result;
255
+ }
256
+ function leadingEdge(time) {
257
+ lastInvokeTime = time;
258
+ timerId = setTimeout(timerExpired, wait);
259
+ return leading ? invokeFunc(time) : result;
260
+ }
261
+ function remainingWait(time) {
262
+ var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
263
+ return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
264
+ }
265
+ function shouldInvoke(time) {
266
+ var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
267
+ return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
268
+ }
269
+ function timerExpired() {
270
+ var time = now();
271
+ if (shouldInvoke(time)) {
272
+ return trailingEdge(time);
273
+ }
274
+ timerId = setTimeout(timerExpired, remainingWait(time));
275
+ }
276
+ function trailingEdge(time) {
277
+ timerId = void 0;
278
+ if (trailing && lastArgs) {
279
+ return invokeFunc(time);
280
+ }
281
+ lastArgs = lastThis = void 0;
282
+ return result;
283
+ }
284
+ function cancel() {
285
+ if (timerId !== void 0) {
286
+ clearTimeout(timerId);
287
+ }
288
+ lastInvokeTime = 0;
289
+ lastArgs = lastCallTime = lastThis = timerId = void 0;
290
+ }
291
+ function flush() {
292
+ return timerId === void 0 ? result : trailingEdge(now());
293
+ }
294
+ function debounced() {
295
+ var time = now(), isInvoking = shouldInvoke(time);
296
+ lastArgs = arguments;
297
+ lastThis = this;
298
+ lastCallTime = time;
299
+ if (isInvoking) {
300
+ if (timerId === void 0) {
301
+ return leadingEdge(lastCallTime);
302
+ }
303
+ if (maxing) {
304
+ clearTimeout(timerId);
305
+ timerId = setTimeout(timerExpired, wait);
306
+ return invokeFunc(lastCallTime);
307
+ }
308
+ }
309
+ if (timerId === void 0) {
310
+ timerId = setTimeout(timerExpired, wait);
311
+ }
312
+ return result;
313
+ }
314
+ debounced.cancel = cancel;
315
+ debounced.flush = flush;
316
+ return debounced;
317
+ }
318
+ debounce_1 = debounce;
319
+ return debounce_1;
320
+ }
321
+ var isFunction_1;
322
+ var hasRequiredIsFunction;
323
+ function requireIsFunction() {
324
+ if (hasRequiredIsFunction) return isFunction_1;
325
+ hasRequiredIsFunction = 1;
326
+ var baseGetTag2 = require_baseGetTag(), isObject2 = requireIsObject();
327
+ var asyncTag = "[object AsyncFunction]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
328
+ function isFunction2(value) {
329
+ if (!isObject2(value)) {
330
+ return false;
331
+ }
332
+ var tag = baseGetTag2(value);
333
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
334
+ }
335
+ isFunction_1 = isFunction2;
336
+ return isFunction_1;
337
+ }
338
+ var root$6 = require_root();
339
+ var coreJsData$1 = root$6["__core-js_shared__"];
340
+ var _coreJsData = coreJsData$1;
341
+ var coreJsData = _coreJsData;
342
+ var maskSrcKey = function() {
343
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
344
+ return uid ? "Symbol(src)_1." + uid : "";
345
+ }();
346
+ function isMasked$1(func) {
347
+ return !!maskSrcKey && maskSrcKey in func;
348
+ }
349
+ var _isMasked = isMasked$1;
350
+ var funcProto$1 = Function.prototype;
351
+ var funcToString$1 = funcProto$1.toString;
352
+ function toSource$2(func) {
353
+ if (func != null) {
354
+ try {
355
+ return funcToString$1.call(func);
356
+ } catch (e) {
357
+ }
358
+ try {
359
+ return func + "";
360
+ } catch (e) {
361
+ }
362
+ }
363
+ return "";
364
+ }
365
+ var _toSource = toSource$2;
366
+ var isFunction = requireIsFunction(), isMasked = _isMasked, isObject = requireIsObject(), toSource$1 = _toSource;
367
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
368
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
369
+ var funcProto = Function.prototype, objectProto$2 = Object.prototype;
370
+ var funcToString = funcProto.toString;
371
+ var hasOwnProperty = objectProto$2.hasOwnProperty;
372
+ var reIsNative = RegExp(
373
+ "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
174
374
  );
375
+ function baseIsNative$1(value) {
376
+ if (!isObject(value) || isMasked(value)) {
377
+ return false;
378
+ }
379
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
380
+ return pattern.test(toSource$1(value));
381
+ }
382
+ var _baseIsNative = baseIsNative$1;
383
+ function getValue$1(object, key) {
384
+ return object == null ? void 0 : object[key];
385
+ }
386
+ var _getValue = getValue$1;
387
+ var baseIsNative = _baseIsNative, getValue = _getValue;
388
+ function getNative$5(object, key) {
389
+ var value = getValue(object, key);
390
+ return baseIsNative(value) ? value : void 0;
391
+ }
392
+ var _getNative = getNative$5;
393
+ var _nativeCreate;
394
+ var hasRequired_nativeCreate;
395
+ function require_nativeCreate() {
396
+ if (hasRequired_nativeCreate) return _nativeCreate;
397
+ hasRequired_nativeCreate = 1;
398
+ var getNative2 = _getNative;
399
+ var nativeCreate = getNative2(Object, "create");
400
+ _nativeCreate = nativeCreate;
401
+ return _nativeCreate;
402
+ }
403
+ var _hashClear;
404
+ var hasRequired_hashClear;
405
+ function require_hashClear() {
406
+ if (hasRequired_hashClear) return _hashClear;
407
+ hasRequired_hashClear = 1;
408
+ var nativeCreate = require_nativeCreate();
409
+ function hashClear() {
410
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
411
+ this.size = 0;
412
+ }
413
+ _hashClear = hashClear;
414
+ return _hashClear;
415
+ }
416
+ var _hashDelete;
417
+ var hasRequired_hashDelete;
418
+ function require_hashDelete() {
419
+ if (hasRequired_hashDelete) return _hashDelete;
420
+ hasRequired_hashDelete = 1;
421
+ function hashDelete(key) {
422
+ var result = this.has(key) && delete this.__data__[key];
423
+ this.size -= result ? 1 : 0;
424
+ return result;
425
+ }
426
+ _hashDelete = hashDelete;
427
+ return _hashDelete;
428
+ }
429
+ var _hashGet;
430
+ var hasRequired_hashGet;
431
+ function require_hashGet() {
432
+ if (hasRequired_hashGet) return _hashGet;
433
+ hasRequired_hashGet = 1;
434
+ var nativeCreate = require_nativeCreate();
435
+ var HASH_UNDEFINED = "__lodash_hash_undefined__";
436
+ var objectProto2 = Object.prototype;
437
+ var hasOwnProperty2 = objectProto2.hasOwnProperty;
438
+ function hashGet(key) {
439
+ var data = this.__data__;
440
+ if (nativeCreate) {
441
+ var result = data[key];
442
+ return result === HASH_UNDEFINED ? void 0 : result;
443
+ }
444
+ return hasOwnProperty2.call(data, key) ? data[key] : void 0;
445
+ }
446
+ _hashGet = hashGet;
447
+ return _hashGet;
448
+ }
449
+ var _hashHas;
450
+ var hasRequired_hashHas;
451
+ function require_hashHas() {
452
+ if (hasRequired_hashHas) return _hashHas;
453
+ hasRequired_hashHas = 1;
454
+ var nativeCreate = require_nativeCreate();
455
+ var objectProto2 = Object.prototype;
456
+ var hasOwnProperty2 = objectProto2.hasOwnProperty;
457
+ function hashHas(key) {
458
+ var data = this.__data__;
459
+ return nativeCreate ? data[key] !== void 0 : hasOwnProperty2.call(data, key);
460
+ }
461
+ _hashHas = hashHas;
462
+ return _hashHas;
463
+ }
464
+ var _hashSet;
465
+ var hasRequired_hashSet;
466
+ function require_hashSet() {
467
+ if (hasRequired_hashSet) return _hashSet;
468
+ hasRequired_hashSet = 1;
469
+ var nativeCreate = require_nativeCreate();
470
+ var HASH_UNDEFINED = "__lodash_hash_undefined__";
471
+ function hashSet(key, value) {
472
+ var data = this.__data__;
473
+ this.size += this.has(key) ? 0 : 1;
474
+ data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
475
+ return this;
476
+ }
477
+ _hashSet = hashSet;
478
+ return _hashSet;
479
+ }
480
+ var _Hash;
481
+ var hasRequired_Hash;
482
+ function require_Hash() {
483
+ if (hasRequired_Hash) return _Hash;
484
+ hasRequired_Hash = 1;
485
+ var hashClear = require_hashClear(), hashDelete = require_hashDelete(), hashGet = require_hashGet(), hashHas = require_hashHas(), hashSet = require_hashSet();
486
+ function Hash(entries) {
487
+ var index = -1, length = entries == null ? 0 : entries.length;
488
+ this.clear();
489
+ while (++index < length) {
490
+ var entry = entries[index];
491
+ this.set(entry[0], entry[1]);
492
+ }
493
+ }
494
+ Hash.prototype.clear = hashClear;
495
+ Hash.prototype["delete"] = hashDelete;
496
+ Hash.prototype.get = hashGet;
497
+ Hash.prototype.has = hashHas;
498
+ Hash.prototype.set = hashSet;
499
+ _Hash = Hash;
500
+ return _Hash;
501
+ }
502
+ function listCacheClear$1() {
503
+ this.__data__ = [];
504
+ this.size = 0;
505
+ }
506
+ var _listCacheClear = listCacheClear$1;
507
+ var eq_1;
508
+ var hasRequiredEq;
509
+ function requireEq() {
510
+ if (hasRequiredEq) return eq_1;
511
+ hasRequiredEq = 1;
512
+ function eq2(value, other) {
513
+ return value === other || value !== value && other !== other;
514
+ }
515
+ eq_1 = eq2;
516
+ return eq_1;
517
+ }
518
+ var eq = requireEq();
519
+ function assocIndexOf$4(array, key) {
520
+ var length = array.length;
521
+ while (length--) {
522
+ if (eq(array[length][0], key)) {
523
+ return length;
524
+ }
525
+ }
526
+ return -1;
527
+ }
528
+ var _assocIndexOf = assocIndexOf$4;
529
+ var assocIndexOf$3 = _assocIndexOf;
530
+ var arrayProto = Array.prototype;
531
+ var splice = arrayProto.splice;
532
+ function listCacheDelete$1(key) {
533
+ var data = this.__data__, index = assocIndexOf$3(data, key);
534
+ if (index < 0) {
535
+ return false;
536
+ }
537
+ var lastIndex = data.length - 1;
538
+ if (index == lastIndex) {
539
+ data.pop();
540
+ } else {
541
+ splice.call(data, index, 1);
542
+ }
543
+ --this.size;
544
+ return true;
545
+ }
546
+ var _listCacheDelete = listCacheDelete$1;
547
+ var assocIndexOf$2 = _assocIndexOf;
548
+ function listCacheGet$1(key) {
549
+ var data = this.__data__, index = assocIndexOf$2(data, key);
550
+ return index < 0 ? void 0 : data[index][1];
551
+ }
552
+ var _listCacheGet = listCacheGet$1;
553
+ var assocIndexOf$1 = _assocIndexOf;
554
+ function listCacheHas$1(key) {
555
+ return assocIndexOf$1(this.__data__, key) > -1;
556
+ }
557
+ var _listCacheHas = listCacheHas$1;
558
+ var assocIndexOf = _assocIndexOf;
559
+ function listCacheSet$1(key, value) {
560
+ var data = this.__data__, index = assocIndexOf(data, key);
561
+ if (index < 0) {
562
+ ++this.size;
563
+ data.push([key, value]);
564
+ } else {
565
+ data[index][1] = value;
566
+ }
567
+ return this;
568
+ }
569
+ var _listCacheSet = listCacheSet$1;
570
+ var listCacheClear = _listCacheClear, listCacheDelete = _listCacheDelete, listCacheGet = _listCacheGet, listCacheHas = _listCacheHas, listCacheSet = _listCacheSet;
571
+ function ListCache$3(entries) {
572
+ var index = -1, length = entries == null ? 0 : entries.length;
573
+ this.clear();
574
+ while (++index < length) {
575
+ var entry = entries[index];
576
+ this.set(entry[0], entry[1]);
577
+ }
578
+ }
579
+ ListCache$3.prototype.clear = listCacheClear;
580
+ ListCache$3.prototype["delete"] = listCacheDelete;
581
+ ListCache$3.prototype.get = listCacheGet;
582
+ ListCache$3.prototype.has = listCacheHas;
583
+ ListCache$3.prototype.set = listCacheSet;
584
+ var _ListCache = ListCache$3;
585
+ var getNative$4 = _getNative, root$5 = require_root();
586
+ var Map$2 = getNative$4(root$5, "Map");
587
+ var _Map = Map$2;
588
+ var _mapCacheClear;
589
+ var hasRequired_mapCacheClear;
590
+ function require_mapCacheClear() {
591
+ if (hasRequired_mapCacheClear) return _mapCacheClear;
592
+ hasRequired_mapCacheClear = 1;
593
+ var Hash = require_Hash(), ListCache2 = _ListCache, Map2 = _Map;
594
+ function mapCacheClear() {
595
+ this.size = 0;
596
+ this.__data__ = {
597
+ "hash": new Hash(),
598
+ "map": new (Map2 || ListCache2)(),
599
+ "string": new Hash()
600
+ };
601
+ }
602
+ _mapCacheClear = mapCacheClear;
603
+ return _mapCacheClear;
604
+ }
605
+ var _isKeyable;
606
+ var hasRequired_isKeyable;
607
+ function require_isKeyable() {
608
+ if (hasRequired_isKeyable) return _isKeyable;
609
+ hasRequired_isKeyable = 1;
610
+ function isKeyable(value) {
611
+ var type = typeof value;
612
+ return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
613
+ }
614
+ _isKeyable = isKeyable;
615
+ return _isKeyable;
616
+ }
617
+ var _getMapData;
618
+ var hasRequired_getMapData;
619
+ function require_getMapData() {
620
+ if (hasRequired_getMapData) return _getMapData;
621
+ hasRequired_getMapData = 1;
622
+ var isKeyable = require_isKeyable();
623
+ function getMapData(map, key) {
624
+ var data = map.__data__;
625
+ return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
626
+ }
627
+ _getMapData = getMapData;
628
+ return _getMapData;
629
+ }
630
+ var _mapCacheDelete;
631
+ var hasRequired_mapCacheDelete;
632
+ function require_mapCacheDelete() {
633
+ if (hasRequired_mapCacheDelete) return _mapCacheDelete;
634
+ hasRequired_mapCacheDelete = 1;
635
+ var getMapData = require_getMapData();
636
+ function mapCacheDelete(key) {
637
+ var result = getMapData(this, key)["delete"](key);
638
+ this.size -= result ? 1 : 0;
639
+ return result;
640
+ }
641
+ _mapCacheDelete = mapCacheDelete;
642
+ return _mapCacheDelete;
643
+ }
644
+ var _mapCacheGet;
645
+ var hasRequired_mapCacheGet;
646
+ function require_mapCacheGet() {
647
+ if (hasRequired_mapCacheGet) return _mapCacheGet;
648
+ hasRequired_mapCacheGet = 1;
649
+ var getMapData = require_getMapData();
650
+ function mapCacheGet(key) {
651
+ return getMapData(this, key).get(key);
652
+ }
653
+ _mapCacheGet = mapCacheGet;
654
+ return _mapCacheGet;
655
+ }
656
+ var _mapCacheHas;
657
+ var hasRequired_mapCacheHas;
658
+ function require_mapCacheHas() {
659
+ if (hasRequired_mapCacheHas) return _mapCacheHas;
660
+ hasRequired_mapCacheHas = 1;
661
+ var getMapData = require_getMapData();
662
+ function mapCacheHas(key) {
663
+ return getMapData(this, key).has(key);
664
+ }
665
+ _mapCacheHas = mapCacheHas;
666
+ return _mapCacheHas;
667
+ }
668
+ var _mapCacheSet;
669
+ var hasRequired_mapCacheSet;
670
+ function require_mapCacheSet() {
671
+ if (hasRequired_mapCacheSet) return _mapCacheSet;
672
+ hasRequired_mapCacheSet = 1;
673
+ var getMapData = require_getMapData();
674
+ function mapCacheSet(key, value) {
675
+ var data = getMapData(this, key), size = data.size;
676
+ data.set(key, value);
677
+ this.size += data.size == size ? 0 : 1;
678
+ return this;
679
+ }
680
+ _mapCacheSet = mapCacheSet;
681
+ return _mapCacheSet;
682
+ }
683
+ var _MapCache;
684
+ var hasRequired_MapCache;
685
+ function require_MapCache() {
686
+ if (hasRequired_MapCache) return _MapCache;
687
+ hasRequired_MapCache = 1;
688
+ var mapCacheClear = require_mapCacheClear(), mapCacheDelete = require_mapCacheDelete(), mapCacheGet = require_mapCacheGet(), mapCacheHas = require_mapCacheHas(), mapCacheSet = require_mapCacheSet();
689
+ function MapCache2(entries) {
690
+ var index = -1, length = entries == null ? 0 : entries.length;
691
+ this.clear();
692
+ while (++index < length) {
693
+ var entry = entries[index];
694
+ this.set(entry[0], entry[1]);
695
+ }
696
+ }
697
+ MapCache2.prototype.clear = mapCacheClear;
698
+ MapCache2.prototype["delete"] = mapCacheDelete;
699
+ MapCache2.prototype.get = mapCacheGet;
700
+ MapCache2.prototype.has = mapCacheHas;
701
+ MapCache2.prototype.set = mapCacheSet;
702
+ _MapCache = MapCache2;
703
+ return _MapCache;
704
+ }
705
+ var _setCacheAdd;
706
+ var hasRequired_setCacheAdd;
707
+ function require_setCacheAdd() {
708
+ if (hasRequired_setCacheAdd) return _setCacheAdd;
709
+ hasRequired_setCacheAdd = 1;
710
+ var HASH_UNDEFINED = "__lodash_hash_undefined__";
711
+ function setCacheAdd(value) {
712
+ this.__data__.set(value, HASH_UNDEFINED);
713
+ return this;
714
+ }
715
+ _setCacheAdd = setCacheAdd;
716
+ return _setCacheAdd;
717
+ }
718
+ var _setCacheHas;
719
+ var hasRequired_setCacheHas;
720
+ function require_setCacheHas() {
721
+ if (hasRequired_setCacheHas) return _setCacheHas;
722
+ hasRequired_setCacheHas = 1;
723
+ function setCacheHas(value) {
724
+ return this.__data__.has(value);
725
+ }
726
+ _setCacheHas = setCacheHas;
727
+ return _setCacheHas;
728
+ }
729
+ var _SetCache;
730
+ var hasRequired_SetCache;
731
+ function require_SetCache() {
732
+ if (hasRequired_SetCache) return _SetCache;
733
+ hasRequired_SetCache = 1;
734
+ var MapCache2 = require_MapCache(), setCacheAdd = require_setCacheAdd(), setCacheHas = require_setCacheHas();
735
+ function SetCache(values) {
736
+ var index = -1, length = values == null ? 0 : values.length;
737
+ this.__data__ = new MapCache2();
738
+ while (++index < length) {
739
+ this.add(values[index]);
740
+ }
741
+ }
742
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
743
+ SetCache.prototype.has = setCacheHas;
744
+ _SetCache = SetCache;
745
+ return _SetCache;
746
+ }
747
+ var _baseFindIndex;
748
+ var hasRequired_baseFindIndex;
749
+ function require_baseFindIndex() {
750
+ if (hasRequired_baseFindIndex) return _baseFindIndex;
751
+ hasRequired_baseFindIndex = 1;
752
+ function baseFindIndex(array, predicate, fromIndex, fromRight) {
753
+ var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
754
+ while (fromRight ? index-- : ++index < length) {
755
+ if (predicate(array[index], index, array)) {
756
+ return index;
757
+ }
758
+ }
759
+ return -1;
760
+ }
761
+ _baseFindIndex = baseFindIndex;
762
+ return _baseFindIndex;
763
+ }
764
+ var _baseIsNaN;
765
+ var hasRequired_baseIsNaN;
766
+ function require_baseIsNaN() {
767
+ if (hasRequired_baseIsNaN) return _baseIsNaN;
768
+ hasRequired_baseIsNaN = 1;
769
+ function baseIsNaN(value) {
770
+ return value !== value;
771
+ }
772
+ _baseIsNaN = baseIsNaN;
773
+ return _baseIsNaN;
774
+ }
775
+ var _strictIndexOf;
776
+ var hasRequired_strictIndexOf;
777
+ function require_strictIndexOf() {
778
+ if (hasRequired_strictIndexOf) return _strictIndexOf;
779
+ hasRequired_strictIndexOf = 1;
780
+ function strictIndexOf(array, value, fromIndex) {
781
+ var index = fromIndex - 1, length = array.length;
782
+ while (++index < length) {
783
+ if (array[index] === value) {
784
+ return index;
785
+ }
786
+ }
787
+ return -1;
788
+ }
789
+ _strictIndexOf = strictIndexOf;
790
+ return _strictIndexOf;
791
+ }
792
+ var _baseIndexOf;
793
+ var hasRequired_baseIndexOf;
794
+ function require_baseIndexOf() {
795
+ if (hasRequired_baseIndexOf) return _baseIndexOf;
796
+ hasRequired_baseIndexOf = 1;
797
+ var baseFindIndex = require_baseFindIndex(), baseIsNaN = require_baseIsNaN(), strictIndexOf = require_strictIndexOf();
798
+ function baseIndexOf(array, value, fromIndex) {
799
+ return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
800
+ }
801
+ _baseIndexOf = baseIndexOf;
802
+ return _baseIndexOf;
803
+ }
804
+ var _arrayIncludes;
805
+ var hasRequired_arrayIncludes;
806
+ function require_arrayIncludes() {
807
+ if (hasRequired_arrayIncludes) return _arrayIncludes;
808
+ hasRequired_arrayIncludes = 1;
809
+ var baseIndexOf = require_baseIndexOf();
810
+ function arrayIncludes(array, value) {
811
+ var length = array == null ? 0 : array.length;
812
+ return !!length && baseIndexOf(array, value, 0) > -1;
813
+ }
814
+ _arrayIncludes = arrayIncludes;
815
+ return _arrayIncludes;
816
+ }
817
+ var _arrayIncludesWith;
818
+ var hasRequired_arrayIncludesWith;
819
+ function require_arrayIncludesWith() {
820
+ if (hasRequired_arrayIncludesWith) return _arrayIncludesWith;
821
+ hasRequired_arrayIncludesWith = 1;
822
+ function arrayIncludesWith(array, value, comparator) {
823
+ var index = -1, length = array == null ? 0 : array.length;
824
+ while (++index < length) {
825
+ if (comparator(value, array[index])) {
826
+ return true;
827
+ }
828
+ }
829
+ return false;
830
+ }
831
+ _arrayIncludesWith = arrayIncludesWith;
832
+ return _arrayIncludesWith;
833
+ }
834
+ function arrayMap(array, iteratee) {
835
+ var index = -1, length = array == null ? 0 : array.length, result = Array(length);
836
+ while (++index < length) {
837
+ result[index] = iteratee(array[index], index, array);
838
+ }
839
+ return result;
840
+ }
841
+ var _arrayMap = arrayMap;
842
+ var _baseUnary;
843
+ var hasRequired_baseUnary;
844
+ function require_baseUnary() {
845
+ if (hasRequired_baseUnary) return _baseUnary;
846
+ hasRequired_baseUnary = 1;
847
+ function baseUnary(func) {
848
+ return function(value) {
849
+ return func(value);
850
+ };
851
+ }
852
+ _baseUnary = baseUnary;
853
+ return _baseUnary;
854
+ }
855
+ var _cacheHas;
856
+ var hasRequired_cacheHas;
857
+ function require_cacheHas() {
858
+ if (hasRequired_cacheHas) return _cacheHas;
859
+ hasRequired_cacheHas = 1;
860
+ function cacheHas(cache, key) {
861
+ return cache.has(key);
862
+ }
863
+ _cacheHas = cacheHas;
864
+ return _cacheHas;
865
+ }
866
+ var _baseDifference;
867
+ var hasRequired_baseDifference;
868
+ function require_baseDifference() {
869
+ if (hasRequired_baseDifference) return _baseDifference;
870
+ hasRequired_baseDifference = 1;
871
+ var SetCache = require_SetCache(), arrayIncludes = require_arrayIncludes(), arrayIncludesWith = require_arrayIncludesWith(), arrayMap2 = _arrayMap, baseUnary = require_baseUnary(), cacheHas = require_cacheHas();
872
+ var LARGE_ARRAY_SIZE2 = 200;
873
+ function baseDifference(array, values, iteratee, comparator) {
874
+ var index = -1, includes = arrayIncludes, isCommon = true, length = array.length, result = [], valuesLength = values.length;
875
+ if (!length) {
876
+ return result;
877
+ }
878
+ if (iteratee) {
879
+ values = arrayMap2(values, baseUnary(iteratee));
880
+ }
881
+ if (comparator) {
882
+ includes = arrayIncludesWith;
883
+ isCommon = false;
884
+ } else if (values.length >= LARGE_ARRAY_SIZE2) {
885
+ includes = cacheHas;
886
+ isCommon = false;
887
+ values = new SetCache(values);
888
+ }
889
+ outer:
890
+ while (++index < length) {
891
+ var value = array[index], computed = iteratee == null ? value : iteratee(value);
892
+ value = comparator || value !== 0 ? value : 0;
893
+ if (isCommon && computed === computed) {
894
+ var valuesIndex = valuesLength;
895
+ while (valuesIndex--) {
896
+ if (values[valuesIndex] === computed) {
897
+ continue outer;
898
+ }
899
+ }
900
+ result.push(value);
901
+ } else if (!includes(values, computed, comparator)) {
902
+ result.push(value);
903
+ }
904
+ }
905
+ return result;
906
+ }
907
+ _baseDifference = baseDifference;
908
+ return _baseDifference;
909
+ }
910
+ var _arrayPush;
911
+ var hasRequired_arrayPush;
912
+ function require_arrayPush() {
913
+ if (hasRequired_arrayPush) return _arrayPush;
914
+ hasRequired_arrayPush = 1;
915
+ function arrayPush2(array, values) {
916
+ var index = -1, length = values.length, offset = array.length;
917
+ while (++index < length) {
918
+ array[offset + index] = values[index];
919
+ }
920
+ return array;
921
+ }
922
+ _arrayPush = arrayPush2;
923
+ return _arrayPush;
924
+ }
925
+ var _baseIsArguments;
926
+ var hasRequired_baseIsArguments;
927
+ function require_baseIsArguments() {
928
+ if (hasRequired_baseIsArguments) return _baseIsArguments;
929
+ hasRequired_baseIsArguments = 1;
930
+ var baseGetTag2 = require_baseGetTag(), isObjectLike = requireIsObjectLike();
931
+ var argsTag = "[object Arguments]";
932
+ function baseIsArguments(value) {
933
+ return isObjectLike(value) && baseGetTag2(value) == argsTag;
934
+ }
935
+ _baseIsArguments = baseIsArguments;
936
+ return _baseIsArguments;
937
+ }
938
+ var isArguments_1;
939
+ var hasRequiredIsArguments;
940
+ function requireIsArguments() {
941
+ if (hasRequiredIsArguments) return isArguments_1;
942
+ hasRequiredIsArguments = 1;
943
+ var baseIsArguments = require_baseIsArguments(), isObjectLike = requireIsObjectLike();
944
+ var objectProto2 = Object.prototype;
945
+ var hasOwnProperty2 = objectProto2.hasOwnProperty;
946
+ var propertyIsEnumerable2 = objectProto2.propertyIsEnumerable;
947
+ var isArguments = baseIsArguments(/* @__PURE__ */ function() {
948
+ return arguments;
949
+ }()) ? baseIsArguments : function(value) {
950
+ return isObjectLike(value) && hasOwnProperty2.call(value, "callee") && !propertyIsEnumerable2.call(value, "callee");
951
+ };
952
+ isArguments_1 = isArguments;
953
+ return isArguments_1;
954
+ }
955
+ var isArray_1;
956
+ var hasRequiredIsArray;
957
+ function requireIsArray() {
958
+ if (hasRequiredIsArray) return isArray_1;
959
+ hasRequiredIsArray = 1;
960
+ var isArray2 = Array.isArray;
961
+ isArray_1 = isArray2;
962
+ return isArray_1;
963
+ }
964
+ var _isFlattenable;
965
+ var hasRequired_isFlattenable;
966
+ function require_isFlattenable() {
967
+ if (hasRequired_isFlattenable) return _isFlattenable;
968
+ hasRequired_isFlattenable = 1;
969
+ var Symbol = require_Symbol(), isArguments = requireIsArguments(), isArray2 = requireIsArray();
970
+ var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : void 0;
971
+ function isFlattenable(value) {
972
+ return isArray2(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
973
+ }
974
+ _isFlattenable = isFlattenable;
975
+ return _isFlattenable;
976
+ }
977
+ var _baseFlatten;
978
+ var hasRequired_baseFlatten;
979
+ function require_baseFlatten() {
980
+ if (hasRequired_baseFlatten) return _baseFlatten;
981
+ hasRequired_baseFlatten = 1;
982
+ var arrayPush2 = require_arrayPush(), isFlattenable = require_isFlattenable();
983
+ function baseFlatten(array, depth, predicate, isStrict, result) {
984
+ var index = -1, length = array.length;
985
+ predicate || (predicate = isFlattenable);
986
+ result || (result = []);
987
+ while (++index < length) {
988
+ var value = array[index];
989
+ if (depth > 0 && predicate(value)) {
990
+ if (depth > 1) {
991
+ baseFlatten(value, depth - 1, predicate, isStrict, result);
992
+ } else {
993
+ arrayPush2(result, value);
994
+ }
995
+ } else if (!isStrict) {
996
+ result[result.length] = value;
997
+ }
998
+ }
999
+ return result;
1000
+ }
1001
+ _baseFlatten = baseFlatten;
1002
+ return _baseFlatten;
1003
+ }
1004
+ var identity_1;
1005
+ var hasRequiredIdentity;
1006
+ function requireIdentity() {
1007
+ if (hasRequiredIdentity) return identity_1;
1008
+ hasRequiredIdentity = 1;
1009
+ function identity(value) {
1010
+ return value;
1011
+ }
1012
+ identity_1 = identity;
1013
+ return identity_1;
1014
+ }
1015
+ var _apply;
1016
+ var hasRequired_apply;
1017
+ function require_apply() {
1018
+ if (hasRequired_apply) return _apply;
1019
+ hasRequired_apply = 1;
1020
+ function apply(func, thisArg, args) {
1021
+ switch (args.length) {
1022
+ case 0:
1023
+ return func.call(thisArg);
1024
+ case 1:
1025
+ return func.call(thisArg, args[0]);
1026
+ case 2:
1027
+ return func.call(thisArg, args[0], args[1]);
1028
+ case 3:
1029
+ return func.call(thisArg, args[0], args[1], args[2]);
1030
+ }
1031
+ return func.apply(thisArg, args);
1032
+ }
1033
+ _apply = apply;
1034
+ return _apply;
1035
+ }
1036
+ var _overRest;
1037
+ var hasRequired_overRest;
1038
+ function require_overRest() {
1039
+ if (hasRequired_overRest) return _overRest;
1040
+ hasRequired_overRest = 1;
1041
+ var apply = require_apply();
1042
+ var nativeMax = Math.max;
1043
+ function overRest(func, start, transform) {
1044
+ start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
1045
+ return function() {
1046
+ var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
1047
+ while (++index < length) {
1048
+ array[index] = args[start + index];
1049
+ }
1050
+ index = -1;
1051
+ var otherArgs = Array(start + 1);
1052
+ while (++index < start) {
1053
+ otherArgs[index] = args[index];
1054
+ }
1055
+ otherArgs[start] = transform(array);
1056
+ return apply(func, this, otherArgs);
1057
+ };
1058
+ }
1059
+ _overRest = overRest;
1060
+ return _overRest;
1061
+ }
1062
+ var constant_1;
1063
+ var hasRequiredConstant;
1064
+ function requireConstant() {
1065
+ if (hasRequiredConstant) return constant_1;
1066
+ hasRequiredConstant = 1;
1067
+ function constant(value) {
1068
+ return function() {
1069
+ return value;
1070
+ };
1071
+ }
1072
+ constant_1 = constant;
1073
+ return constant_1;
1074
+ }
1075
+ var _defineProperty;
1076
+ var hasRequired_defineProperty;
1077
+ function require_defineProperty() {
1078
+ if (hasRequired_defineProperty) return _defineProperty;
1079
+ hasRequired_defineProperty = 1;
1080
+ var getNative2 = _getNative;
1081
+ var defineProperty = function() {
1082
+ try {
1083
+ var func = getNative2(Object, "defineProperty");
1084
+ func({}, "", {});
1085
+ return func;
1086
+ } catch (e) {
1087
+ }
1088
+ }();
1089
+ _defineProperty = defineProperty;
1090
+ return _defineProperty;
1091
+ }
1092
+ var _baseSetToString;
1093
+ var hasRequired_baseSetToString;
1094
+ function require_baseSetToString() {
1095
+ if (hasRequired_baseSetToString) return _baseSetToString;
1096
+ hasRequired_baseSetToString = 1;
1097
+ var constant = requireConstant(), defineProperty = require_defineProperty(), identity = requireIdentity();
1098
+ var baseSetToString = !defineProperty ? identity : function(func, string) {
1099
+ return defineProperty(func, "toString", {
1100
+ "configurable": true,
1101
+ "enumerable": false,
1102
+ "value": constant(string),
1103
+ "writable": true
1104
+ });
1105
+ };
1106
+ _baseSetToString = baseSetToString;
1107
+ return _baseSetToString;
1108
+ }
1109
+ var _shortOut;
1110
+ var hasRequired_shortOut;
1111
+ function require_shortOut() {
1112
+ if (hasRequired_shortOut) return _shortOut;
1113
+ hasRequired_shortOut = 1;
1114
+ var HOT_COUNT = 800, HOT_SPAN = 16;
1115
+ var nativeNow = Date.now;
1116
+ function shortOut(func) {
1117
+ var count = 0, lastCalled = 0;
1118
+ return function() {
1119
+ var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
1120
+ lastCalled = stamp;
1121
+ if (remaining > 0) {
1122
+ if (++count >= HOT_COUNT) {
1123
+ return arguments[0];
1124
+ }
1125
+ } else {
1126
+ count = 0;
1127
+ }
1128
+ return func.apply(void 0, arguments);
1129
+ };
1130
+ }
1131
+ _shortOut = shortOut;
1132
+ return _shortOut;
1133
+ }
1134
+ var _setToString;
1135
+ var hasRequired_setToString;
1136
+ function require_setToString() {
1137
+ if (hasRequired_setToString) return _setToString;
1138
+ hasRequired_setToString = 1;
1139
+ var baseSetToString = require_baseSetToString(), shortOut = require_shortOut();
1140
+ var setToString = shortOut(baseSetToString);
1141
+ _setToString = setToString;
1142
+ return _setToString;
1143
+ }
1144
+ var _baseRest;
1145
+ var hasRequired_baseRest;
1146
+ function require_baseRest() {
1147
+ if (hasRequired_baseRest) return _baseRest;
1148
+ hasRequired_baseRest = 1;
1149
+ var identity = requireIdentity(), overRest = require_overRest(), setToString = require_setToString();
1150
+ function baseRest(func, start) {
1151
+ return setToString(overRest(func, start, identity), func + "");
1152
+ }
1153
+ _baseRest = baseRest;
1154
+ return _baseRest;
1155
+ }
1156
+ var isLength_1;
1157
+ var hasRequiredIsLength;
1158
+ function requireIsLength() {
1159
+ if (hasRequiredIsLength) return isLength_1;
1160
+ hasRequiredIsLength = 1;
1161
+ var MAX_SAFE_INTEGER = 9007199254740991;
1162
+ function isLength(value) {
1163
+ return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
1164
+ }
1165
+ isLength_1 = isLength;
1166
+ return isLength_1;
1167
+ }
1168
+ var isArrayLike_1;
1169
+ var hasRequiredIsArrayLike;
1170
+ function requireIsArrayLike() {
1171
+ if (hasRequiredIsArrayLike) return isArrayLike_1;
1172
+ hasRequiredIsArrayLike = 1;
1173
+ var isFunction2 = requireIsFunction(), isLength = requireIsLength();
1174
+ function isArrayLike(value) {
1175
+ return value != null && isLength(value.length) && !isFunction2(value);
1176
+ }
1177
+ isArrayLike_1 = isArrayLike;
1178
+ return isArrayLike_1;
1179
+ }
1180
+ var isArrayLikeObject_1;
1181
+ var hasRequiredIsArrayLikeObject;
1182
+ function requireIsArrayLikeObject() {
1183
+ if (hasRequiredIsArrayLikeObject) return isArrayLikeObject_1;
1184
+ hasRequiredIsArrayLikeObject = 1;
1185
+ var isArrayLike = requireIsArrayLike(), isObjectLike = requireIsObjectLike();
1186
+ function isArrayLikeObject(value) {
1187
+ return isObjectLike(value) && isArrayLike(value);
1188
+ }
1189
+ isArrayLikeObject_1 = isArrayLikeObject;
1190
+ return isArrayLikeObject_1;
1191
+ }
1192
+ var difference_1;
1193
+ var hasRequiredDifference;
1194
+ function requireDifference() {
1195
+ if (hasRequiredDifference) return difference_1;
1196
+ hasRequiredDifference = 1;
1197
+ var baseDifference = require_baseDifference(), baseFlatten = require_baseFlatten(), baseRest = require_baseRest(), isArrayLikeObject = requireIsArrayLikeObject();
1198
+ var difference = baseRest(function(array, values) {
1199
+ return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) : [];
1200
+ });
1201
+ difference_1 = difference;
1202
+ return difference_1;
1203
+ }
1204
+ var _arrayFilter;
1205
+ var hasRequired_arrayFilter;
1206
+ function require_arrayFilter() {
1207
+ if (hasRequired_arrayFilter) return _arrayFilter;
1208
+ hasRequired_arrayFilter = 1;
1209
+ function arrayFilter2(array, predicate) {
1210
+ var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
1211
+ while (++index < length) {
1212
+ var value = array[index];
1213
+ if (predicate(value, index, array)) {
1214
+ result[resIndex++] = value;
1215
+ }
1216
+ }
1217
+ return result;
1218
+ }
1219
+ _arrayFilter = arrayFilter2;
1220
+ return _arrayFilter;
1221
+ }
1222
+ var _createBaseFor;
1223
+ var hasRequired_createBaseFor;
1224
+ function require_createBaseFor() {
1225
+ if (hasRequired_createBaseFor) return _createBaseFor;
1226
+ hasRequired_createBaseFor = 1;
1227
+ function createBaseFor(fromRight) {
1228
+ return function(object, iteratee, keysFunc) {
1229
+ var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
1230
+ while (length--) {
1231
+ var key = props[fromRight ? length : ++index];
1232
+ if (iteratee(iterable[key], key, iterable) === false) {
1233
+ break;
1234
+ }
1235
+ }
1236
+ return object;
1237
+ };
1238
+ }
1239
+ _createBaseFor = createBaseFor;
1240
+ return _createBaseFor;
1241
+ }
1242
+ var _baseFor;
1243
+ var hasRequired_baseFor;
1244
+ function require_baseFor() {
1245
+ if (hasRequired_baseFor) return _baseFor;
1246
+ hasRequired_baseFor = 1;
1247
+ var createBaseFor = require_createBaseFor();
1248
+ var baseFor = createBaseFor();
1249
+ _baseFor = baseFor;
1250
+ return _baseFor;
1251
+ }
1252
+ var _baseTimes;
1253
+ var hasRequired_baseTimes;
1254
+ function require_baseTimes() {
1255
+ if (hasRequired_baseTimes) return _baseTimes;
1256
+ hasRequired_baseTimes = 1;
1257
+ function baseTimes(n, iteratee) {
1258
+ var index = -1, result = Array(n);
1259
+ while (++index < n) {
1260
+ result[index] = iteratee(index);
1261
+ }
1262
+ return result;
1263
+ }
1264
+ _baseTimes = baseTimes;
1265
+ return _baseTimes;
1266
+ }
1267
+ var isBuffer = { exports: {} };
1268
+ function stubFalse() {
1269
+ return false;
1270
+ }
1271
+ var stubFalse_1 = stubFalse;
1272
+ isBuffer.exports;
1273
+ (function(module, exports) {
1274
+ var root2 = require_root(), stubFalse2 = stubFalse_1;
1275
+ var freeExports = exports && !exports.nodeType && exports;
1276
+ var freeModule = freeExports && true && module && !module.nodeType && module;
1277
+ var moduleExports = freeModule && freeModule.exports === freeExports;
1278
+ var Buffer = moduleExports ? root2.Buffer : void 0;
1279
+ var nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0;
1280
+ var isBuffer2 = nativeIsBuffer || stubFalse2;
1281
+ module.exports = isBuffer2;
1282
+ })(isBuffer, isBuffer.exports);
1283
+ var isBufferExports = isBuffer.exports;
1284
+ var _isIndex;
1285
+ var hasRequired_isIndex;
1286
+ function require_isIndex() {
1287
+ if (hasRequired_isIndex) return _isIndex;
1288
+ hasRequired_isIndex = 1;
1289
+ var MAX_SAFE_INTEGER = 9007199254740991;
1290
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
1291
+ function isIndex(value, length) {
1292
+ var type = typeof value;
1293
+ length = length == null ? MAX_SAFE_INTEGER : length;
1294
+ return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
1295
+ }
1296
+ _isIndex = isIndex;
1297
+ return _isIndex;
1298
+ }
1299
+ var _baseIsTypedArray;
1300
+ var hasRequired_baseIsTypedArray;
1301
+ function require_baseIsTypedArray() {
1302
+ if (hasRequired_baseIsTypedArray) return _baseIsTypedArray;
1303
+ hasRequired_baseIsTypedArray = 1;
1304
+ var baseGetTag2 = require_baseGetTag(), isLength = requireIsLength(), isObjectLike = requireIsObjectLike();
1305
+ var argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", mapTag2 = "[object Map]", numberTag = "[object Number]", objectTag2 = "[object Object]", regexpTag = "[object RegExp]", setTag2 = "[object Set]", stringTag = "[object String]", weakMapTag2 = "[object WeakMap]";
1306
+ var arrayBufferTag = "[object ArrayBuffer]", dataViewTag2 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
1307
+ var typedArrayTags = {};
1308
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
1309
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag2] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag2] = typedArrayTags[numberTag] = typedArrayTags[objectTag2] = typedArrayTags[regexpTag] = typedArrayTags[setTag2] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag2] = false;
1310
+ function baseIsTypedArray(value) {
1311
+ return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag2(value)];
1312
+ }
1313
+ _baseIsTypedArray = baseIsTypedArray;
1314
+ return _baseIsTypedArray;
1315
+ }
1316
+ var _nodeUtil = { exports: {} };
1317
+ _nodeUtil.exports;
1318
+ (function(module, exports) {
1319
+ var freeGlobal = require_freeGlobal();
1320
+ var freeExports = exports && !exports.nodeType && exports;
1321
+ var freeModule = freeExports && true && module && !module.nodeType && module;
1322
+ var moduleExports = freeModule && freeModule.exports === freeExports;
1323
+ var freeProcess = moduleExports && freeGlobal.process;
1324
+ var nodeUtil = function() {
1325
+ try {
1326
+ var types = freeModule && freeModule.require && freeModule.require("util").types;
1327
+ if (types) {
1328
+ return types;
1329
+ }
1330
+ return freeProcess && freeProcess.binding && freeProcess.binding("util");
1331
+ } catch (e) {
1332
+ }
1333
+ }();
1334
+ module.exports = nodeUtil;
1335
+ })(_nodeUtil, _nodeUtil.exports);
1336
+ var _nodeUtilExports = _nodeUtil.exports;
1337
+ var isTypedArray_1;
1338
+ var hasRequiredIsTypedArray;
1339
+ function requireIsTypedArray() {
1340
+ if (hasRequiredIsTypedArray) return isTypedArray_1;
1341
+ hasRequiredIsTypedArray = 1;
1342
+ var baseIsTypedArray = require_baseIsTypedArray(), baseUnary = require_baseUnary(), nodeUtil = _nodeUtilExports;
1343
+ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
1344
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
1345
+ isTypedArray_1 = isTypedArray;
1346
+ return isTypedArray_1;
1347
+ }
1348
+ var _arrayLikeKeys;
1349
+ var hasRequired_arrayLikeKeys;
1350
+ function require_arrayLikeKeys() {
1351
+ if (hasRequired_arrayLikeKeys) return _arrayLikeKeys;
1352
+ hasRequired_arrayLikeKeys = 1;
1353
+ var baseTimes = require_baseTimes(), isArguments = requireIsArguments(), isArray2 = requireIsArray(), isBuffer2 = isBufferExports, isIndex = require_isIndex(), isTypedArray = requireIsTypedArray();
1354
+ var objectProto2 = Object.prototype;
1355
+ var hasOwnProperty2 = objectProto2.hasOwnProperty;
1356
+ function arrayLikeKeys(value, inherited) {
1357
+ var isArr = isArray2(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer2(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
1358
+ for (var key in value) {
1359
+ if ((inherited || hasOwnProperty2.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
1360
+ (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
1361
+ isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
1362
+ isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
1363
+ isIndex(key, length)))) {
1364
+ result.push(key);
1365
+ }
1366
+ }
1367
+ return result;
1368
+ }
1369
+ _arrayLikeKeys = arrayLikeKeys;
1370
+ return _arrayLikeKeys;
1371
+ }
1372
+ var objectProto$1 = Object.prototype;
1373
+ function isPrototype(value) {
1374
+ var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$1;
1375
+ return value === proto;
1376
+ }
1377
+ var _isPrototype = isPrototype;
1378
+ function overArg(func, transform) {
1379
+ return function(arg) {
1380
+ return func(transform(arg));
1381
+ };
1382
+ }
1383
+ var _overArg = overArg;
1384
+ var _nativeKeys;
1385
+ var hasRequired_nativeKeys;
1386
+ function require_nativeKeys() {
1387
+ if (hasRequired_nativeKeys) return _nativeKeys;
1388
+ hasRequired_nativeKeys = 1;
1389
+ var overArg2 = _overArg;
1390
+ var nativeKeys = overArg2(Object.keys, Object);
1391
+ _nativeKeys = nativeKeys;
1392
+ return _nativeKeys;
1393
+ }
1394
+ var _baseKeys;
1395
+ var hasRequired_baseKeys;
1396
+ function require_baseKeys() {
1397
+ if (hasRequired_baseKeys) return _baseKeys;
1398
+ hasRequired_baseKeys = 1;
1399
+ var isPrototype2 = _isPrototype, nativeKeys = require_nativeKeys();
1400
+ var objectProto2 = Object.prototype;
1401
+ var hasOwnProperty2 = objectProto2.hasOwnProperty;
1402
+ function baseKeys(object) {
1403
+ if (!isPrototype2(object)) {
1404
+ return nativeKeys(object);
1405
+ }
1406
+ var result = [];
1407
+ for (var key in Object(object)) {
1408
+ if (hasOwnProperty2.call(object, key) && key != "constructor") {
1409
+ result.push(key);
1410
+ }
1411
+ }
1412
+ return result;
1413
+ }
1414
+ _baseKeys = baseKeys;
1415
+ return _baseKeys;
1416
+ }
1417
+ var keys_1;
1418
+ var hasRequiredKeys;
1419
+ function requireKeys() {
1420
+ if (hasRequiredKeys) return keys_1;
1421
+ hasRequiredKeys = 1;
1422
+ var arrayLikeKeys = require_arrayLikeKeys(), baseKeys = require_baseKeys(), isArrayLike = requireIsArrayLike();
1423
+ function keys2(object) {
1424
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
1425
+ }
1426
+ keys_1 = keys2;
1427
+ return keys_1;
1428
+ }
1429
+ var _baseForOwn;
1430
+ var hasRequired_baseForOwn;
1431
+ function require_baseForOwn() {
1432
+ if (hasRequired_baseForOwn) return _baseForOwn;
1433
+ hasRequired_baseForOwn = 1;
1434
+ var baseFor = require_baseFor(), keys2 = requireKeys();
1435
+ function baseForOwn(object, iteratee) {
1436
+ return object && baseFor(object, iteratee, keys2);
1437
+ }
1438
+ _baseForOwn = baseForOwn;
1439
+ return _baseForOwn;
1440
+ }
1441
+ var _createBaseEach;
1442
+ var hasRequired_createBaseEach;
1443
+ function require_createBaseEach() {
1444
+ if (hasRequired_createBaseEach) return _createBaseEach;
1445
+ hasRequired_createBaseEach = 1;
1446
+ var isArrayLike = requireIsArrayLike();
1447
+ function createBaseEach(eachFunc, fromRight) {
1448
+ return function(collection, iteratee) {
1449
+ if (collection == null) {
1450
+ return collection;
1451
+ }
1452
+ if (!isArrayLike(collection)) {
1453
+ return eachFunc(collection, iteratee);
1454
+ }
1455
+ var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection);
1456
+ while (fromRight ? index-- : ++index < length) {
1457
+ if (iteratee(iterable[index], index, iterable) === false) {
1458
+ break;
1459
+ }
1460
+ }
1461
+ return collection;
1462
+ };
1463
+ }
1464
+ _createBaseEach = createBaseEach;
1465
+ return _createBaseEach;
1466
+ }
1467
+ var _baseEach;
1468
+ var hasRequired_baseEach;
1469
+ function require_baseEach() {
1470
+ if (hasRequired_baseEach) return _baseEach;
1471
+ hasRequired_baseEach = 1;
1472
+ var baseForOwn = require_baseForOwn(), createBaseEach = require_createBaseEach();
1473
+ var baseEach = createBaseEach(baseForOwn);
1474
+ _baseEach = baseEach;
1475
+ return _baseEach;
1476
+ }
1477
+ var _baseFilter;
1478
+ var hasRequired_baseFilter;
1479
+ function require_baseFilter() {
1480
+ if (hasRequired_baseFilter) return _baseFilter;
1481
+ hasRequired_baseFilter = 1;
1482
+ var baseEach = require_baseEach();
1483
+ function baseFilter(collection, predicate) {
1484
+ var result = [];
1485
+ baseEach(collection, function(value, index, collection2) {
1486
+ if (predicate(value, index, collection2)) {
1487
+ result.push(value);
1488
+ }
1489
+ });
1490
+ return result;
1491
+ }
1492
+ _baseFilter = baseFilter;
1493
+ return _baseFilter;
1494
+ }
1495
+ var ListCache$2 = _ListCache;
1496
+ function stackClear$1() {
1497
+ this.__data__ = new ListCache$2();
1498
+ this.size = 0;
1499
+ }
1500
+ var _stackClear = stackClear$1;
1501
+ function stackDelete$1(key) {
1502
+ var data = this.__data__, result = data["delete"](key);
1503
+ this.size = data.size;
1504
+ return result;
1505
+ }
1506
+ var _stackDelete = stackDelete$1;
1507
+ function stackGet$1(key) {
1508
+ return this.__data__.get(key);
1509
+ }
1510
+ var _stackGet = stackGet$1;
1511
+ function stackHas$1(key) {
1512
+ return this.__data__.has(key);
1513
+ }
1514
+ var _stackHas = stackHas$1;
1515
+ var ListCache$1 = _ListCache, Map$1 = _Map, MapCache$1 = require_MapCache();
1516
+ var LARGE_ARRAY_SIZE = 200;
1517
+ function stackSet$1(key, value) {
1518
+ var data = this.__data__;
1519
+ if (data instanceof ListCache$1) {
1520
+ var pairs = data.__data__;
1521
+ if (!Map$1 || pairs.length < LARGE_ARRAY_SIZE - 1) {
1522
+ pairs.push([key, value]);
1523
+ this.size = ++data.size;
1524
+ return this;
1525
+ }
1526
+ data = this.__data__ = new MapCache$1(pairs);
1527
+ }
1528
+ data.set(key, value);
1529
+ this.size = data.size;
1530
+ return this;
1531
+ }
1532
+ var _stackSet = stackSet$1;
1533
+ var ListCache = _ListCache, stackClear = _stackClear, stackDelete = _stackDelete, stackGet = _stackGet, stackHas = _stackHas, stackSet = _stackSet;
1534
+ function Stack(entries) {
1535
+ var data = this.__data__ = new ListCache(entries);
1536
+ this.size = data.size;
1537
+ }
1538
+ Stack.prototype.clear = stackClear;
1539
+ Stack.prototype["delete"] = stackDelete;
1540
+ Stack.prototype.get = stackGet;
1541
+ Stack.prototype.has = stackHas;
1542
+ Stack.prototype.set = stackSet;
1543
+ var _Stack = Stack;
1544
+ var _arraySome;
1545
+ var hasRequired_arraySome;
1546
+ function require_arraySome() {
1547
+ if (hasRequired_arraySome) return _arraySome;
1548
+ hasRequired_arraySome = 1;
1549
+ function arraySome(array, predicate) {
1550
+ var index = -1, length = array == null ? 0 : array.length;
1551
+ while (++index < length) {
1552
+ if (predicate(array[index], index, array)) {
1553
+ return true;
1554
+ }
1555
+ }
1556
+ return false;
1557
+ }
1558
+ _arraySome = arraySome;
1559
+ return _arraySome;
1560
+ }
1561
+ var _equalArrays;
1562
+ var hasRequired_equalArrays;
1563
+ function require_equalArrays() {
1564
+ if (hasRequired_equalArrays) return _equalArrays;
1565
+ hasRequired_equalArrays = 1;
1566
+ var SetCache = require_SetCache(), arraySome = require_arraySome(), cacheHas = require_cacheHas();
1567
+ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
1568
+ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
1569
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length;
1570
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
1571
+ return false;
1572
+ }
1573
+ var arrStacked = stack.get(array);
1574
+ var othStacked = stack.get(other);
1575
+ if (arrStacked && othStacked) {
1576
+ return arrStacked == other && othStacked == array;
1577
+ }
1578
+ var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : void 0;
1579
+ stack.set(array, other);
1580
+ stack.set(other, array);
1581
+ while (++index < arrLength) {
1582
+ var arrValue = array[index], othValue = other[index];
1583
+ if (customizer) {
1584
+ var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
1585
+ }
1586
+ if (compared !== void 0) {
1587
+ if (compared) {
1588
+ continue;
1589
+ }
1590
+ result = false;
1591
+ break;
1592
+ }
1593
+ if (seen) {
1594
+ if (!arraySome(other, function(othValue2, othIndex) {
1595
+ if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
1596
+ return seen.push(othIndex);
1597
+ }
1598
+ })) {
1599
+ result = false;
1600
+ break;
1601
+ }
1602
+ } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
1603
+ result = false;
1604
+ break;
1605
+ }
1606
+ }
1607
+ stack["delete"](array);
1608
+ stack["delete"](other);
1609
+ return result;
1610
+ }
1611
+ _equalArrays = equalArrays;
1612
+ return _equalArrays;
1613
+ }
1614
+ var root$4 = require_root();
1615
+ var Uint8Array = root$4.Uint8Array;
1616
+ var _Uint8Array = Uint8Array;
1617
+ var _mapToArray;
1618
+ var hasRequired_mapToArray;
1619
+ function require_mapToArray() {
1620
+ if (hasRequired_mapToArray) return _mapToArray;
1621
+ hasRequired_mapToArray = 1;
1622
+ function mapToArray(map) {
1623
+ var index = -1, result = Array(map.size);
1624
+ map.forEach(function(value, key) {
1625
+ result[++index] = [key, value];
1626
+ });
1627
+ return result;
1628
+ }
1629
+ _mapToArray = mapToArray;
1630
+ return _mapToArray;
1631
+ }
1632
+ function setToArray(set) {
1633
+ var index = -1, result = Array(set.size);
1634
+ set.forEach(function(value) {
1635
+ result[++index] = value;
1636
+ });
1637
+ return result;
1638
+ }
1639
+ var _setToArray = setToArray;
1640
+ var _equalByTag;
1641
+ var hasRequired_equalByTag;
1642
+ function require_equalByTag() {
1643
+ if (hasRequired_equalByTag) return _equalByTag;
1644
+ hasRequired_equalByTag = 1;
1645
+ var Symbol = require_Symbol(), Uint8Array2 = _Uint8Array, eq2 = requireEq(), equalArrays = require_equalArrays(), mapToArray = require_mapToArray(), setToArray2 = _setToArray;
1646
+ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
1647
+ var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag2 = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag2 = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]";
1648
+ var arrayBufferTag = "[object ArrayBuffer]", dataViewTag2 = "[object DataView]";
1649
+ var symbolProto = Symbol ? Symbol.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
1650
+ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
1651
+ switch (tag) {
1652
+ case dataViewTag2:
1653
+ if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
1654
+ return false;
1655
+ }
1656
+ object = object.buffer;
1657
+ other = other.buffer;
1658
+ case arrayBufferTag:
1659
+ if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) {
1660
+ return false;
1661
+ }
1662
+ return true;
1663
+ case boolTag:
1664
+ case dateTag:
1665
+ case numberTag:
1666
+ return eq2(+object, +other);
1667
+ case errorTag:
1668
+ return object.name == other.name && object.message == other.message;
1669
+ case regexpTag:
1670
+ case stringTag:
1671
+ return object == other + "";
1672
+ case mapTag2:
1673
+ var convert = mapToArray;
1674
+ case setTag2:
1675
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
1676
+ convert || (convert = setToArray2);
1677
+ if (object.size != other.size && !isPartial) {
1678
+ return false;
1679
+ }
1680
+ var stacked = stack.get(object);
1681
+ if (stacked) {
1682
+ return stacked == other;
1683
+ }
1684
+ bitmask |= COMPARE_UNORDERED_FLAG;
1685
+ stack.set(object, other);
1686
+ var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
1687
+ stack["delete"](object);
1688
+ return result;
1689
+ case symbolTag:
1690
+ if (symbolValueOf) {
1691
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
1692
+ }
1693
+ }
1694
+ return false;
1695
+ }
1696
+ _equalByTag = equalByTag;
1697
+ return _equalByTag;
1698
+ }
1699
+ var arrayPush = require_arrayPush(), isArray$1 = requireIsArray();
1700
+ function baseGetAllKeys$1(object, keysFunc, symbolsFunc) {
1701
+ var result = keysFunc(object);
1702
+ return isArray$1(object) ? result : arrayPush(result, symbolsFunc(object));
1703
+ }
1704
+ var _baseGetAllKeys = baseGetAllKeys$1;
1705
+ function stubArray$1() {
1706
+ return [];
1707
+ }
1708
+ var stubArray_1 = stubArray$1;
1709
+ var arrayFilter = require_arrayFilter(), stubArray = stubArray_1;
1710
+ var objectProto = Object.prototype;
1711
+ var propertyIsEnumerable = objectProto.propertyIsEnumerable;
1712
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
1713
+ var getSymbols$1 = !nativeGetSymbols ? stubArray : function(object) {
1714
+ if (object == null) {
1715
+ return [];
1716
+ }
1717
+ object = Object(object);
1718
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
1719
+ return propertyIsEnumerable.call(object, symbol);
1720
+ });
1721
+ };
1722
+ var _getSymbols = getSymbols$1;
1723
+ var baseGetAllKeys = _baseGetAllKeys, getSymbols = _getSymbols, keys = requireKeys();
1724
+ function getAllKeys(object) {
1725
+ return baseGetAllKeys(object, keys, getSymbols);
1726
+ }
1727
+ var _getAllKeys = getAllKeys;
1728
+ var _equalObjects;
1729
+ var hasRequired_equalObjects;
1730
+ function require_equalObjects() {
1731
+ if (hasRequired_equalObjects) return _equalObjects;
1732
+ hasRequired_equalObjects = 1;
1733
+ var getAllKeys2 = _getAllKeys;
1734
+ var COMPARE_PARTIAL_FLAG = 1;
1735
+ var objectProto2 = Object.prototype;
1736
+ var hasOwnProperty2 = objectProto2.hasOwnProperty;
1737
+ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
1738
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys2(object), objLength = objProps.length, othProps = getAllKeys2(other), othLength = othProps.length;
1739
+ if (objLength != othLength && !isPartial) {
1740
+ return false;
1741
+ }
1742
+ var index = objLength;
1743
+ while (index--) {
1744
+ var key = objProps[index];
1745
+ if (!(isPartial ? key in other : hasOwnProperty2.call(other, key))) {
1746
+ return false;
1747
+ }
1748
+ }
1749
+ var objStacked = stack.get(object);
1750
+ var othStacked = stack.get(other);
1751
+ if (objStacked && othStacked) {
1752
+ return objStacked == other && othStacked == object;
1753
+ }
1754
+ var result = true;
1755
+ stack.set(object, other);
1756
+ stack.set(other, object);
1757
+ var skipCtor = isPartial;
1758
+ while (++index < objLength) {
1759
+ key = objProps[index];
1760
+ var objValue = object[key], othValue = other[key];
1761
+ if (customizer) {
1762
+ var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
1763
+ }
1764
+ if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
1765
+ result = false;
1766
+ break;
1767
+ }
1768
+ skipCtor || (skipCtor = key == "constructor");
1769
+ }
1770
+ if (result && !skipCtor) {
1771
+ var objCtor = object.constructor, othCtor = other.constructor;
1772
+ if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
1773
+ result = false;
1774
+ }
1775
+ }
1776
+ stack["delete"](object);
1777
+ stack["delete"](other);
1778
+ return result;
1779
+ }
1780
+ _equalObjects = equalObjects;
1781
+ return _equalObjects;
1782
+ }
1783
+ var getNative$3 = _getNative, root$3 = require_root();
1784
+ var DataView$1 = getNative$3(root$3, "DataView");
1785
+ var _DataView = DataView$1;
1786
+ var getNative$2 = _getNative, root$2 = require_root();
1787
+ var Promise$2 = getNative$2(root$2, "Promise");
1788
+ var _Promise = Promise$2;
1789
+ var getNative$1 = _getNative, root$1 = require_root();
1790
+ var Set$1 = getNative$1(root$1, "Set");
1791
+ var _Set = Set$1;
1792
+ var getNative = _getNative, root = require_root();
1793
+ var WeakMap$1 = getNative(root, "WeakMap");
1794
+ var _WeakMap = WeakMap$1;
1795
+ var DataView = _DataView, Map = _Map, Promise$1 = _Promise, Set = _Set, WeakMap = _WeakMap, baseGetTag = require_baseGetTag(), toSource = _toSource;
1796
+ var mapTag = "[object Map]", objectTag = "[object Object]", promiseTag = "[object Promise]", setTag = "[object Set]", weakMapTag = "[object WeakMap]";
1797
+ var dataViewTag = "[object DataView]";
1798
+ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap);
1799
+ var getTag = baseGetTag;
1800
+ if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise$1 && getTag(Promise$1.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
1801
+ getTag = function(value) {
1802
+ var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
1803
+ if (ctorString) {
1804
+ switch (ctorString) {
1805
+ case dataViewCtorString:
1806
+ return dataViewTag;
1807
+ case mapCtorString:
1808
+ return mapTag;
1809
+ case promiseCtorString:
1810
+ return promiseTag;
1811
+ case setCtorString:
1812
+ return setTag;
1813
+ case weakMapCtorString:
1814
+ return weakMapTag;
1815
+ }
1816
+ }
1817
+ return result;
1818
+ };
1819
+ }
1820
+ var _getTag = getTag;
1821
+ var _baseIsEqualDeep;
1822
+ var hasRequired_baseIsEqualDeep;
1823
+ function require_baseIsEqualDeep() {
1824
+ if (hasRequired_baseIsEqualDeep) return _baseIsEqualDeep;
1825
+ hasRequired_baseIsEqualDeep = 1;
1826
+ var Stack2 = _Stack, equalArrays = require_equalArrays(), equalByTag = require_equalByTag(), equalObjects = require_equalObjects(), getTag2 = _getTag, isArray2 = requireIsArray(), isBuffer2 = isBufferExports, isTypedArray = requireIsTypedArray();
1827
+ var COMPARE_PARTIAL_FLAG = 1;
1828
+ var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag2 = "[object Object]";
1829
+ var objectProto2 = Object.prototype;
1830
+ var hasOwnProperty2 = objectProto2.hasOwnProperty;
1831
+ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
1832
+ var objIsArr = isArray2(object), othIsArr = isArray2(other), objTag = objIsArr ? arrayTag : getTag2(object), othTag = othIsArr ? arrayTag : getTag2(other);
1833
+ objTag = objTag == argsTag ? objectTag2 : objTag;
1834
+ othTag = othTag == argsTag ? objectTag2 : othTag;
1835
+ var objIsObj = objTag == objectTag2, othIsObj = othTag == objectTag2, isSameTag = objTag == othTag;
1836
+ if (isSameTag && isBuffer2(object)) {
1837
+ if (!isBuffer2(other)) {
1838
+ return false;
1839
+ }
1840
+ objIsArr = true;
1841
+ objIsObj = false;
1842
+ }
1843
+ if (isSameTag && !objIsObj) {
1844
+ stack || (stack = new Stack2());
1845
+ return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
1846
+ }
1847
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
1848
+ var objIsWrapped = objIsObj && hasOwnProperty2.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty2.call(other, "__wrapped__");
1849
+ if (objIsWrapped || othIsWrapped) {
1850
+ var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
1851
+ stack || (stack = new Stack2());
1852
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
1853
+ }
1854
+ }
1855
+ if (!isSameTag) {
1856
+ return false;
1857
+ }
1858
+ stack || (stack = new Stack2());
1859
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
1860
+ }
1861
+ _baseIsEqualDeep = baseIsEqualDeep;
1862
+ return _baseIsEqualDeep;
1863
+ }
1864
+ var _baseIsEqual;
1865
+ var hasRequired_baseIsEqual;
1866
+ function require_baseIsEqual() {
1867
+ if (hasRequired_baseIsEqual) return _baseIsEqual;
1868
+ hasRequired_baseIsEqual = 1;
1869
+ var baseIsEqualDeep = require_baseIsEqualDeep(), isObjectLike = requireIsObjectLike();
1870
+ function baseIsEqual(value, other, bitmask, customizer, stack) {
1871
+ if (value === other) {
1872
+ return true;
1873
+ }
1874
+ if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
1875
+ return value !== value && other !== other;
1876
+ }
1877
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
1878
+ }
1879
+ _baseIsEqual = baseIsEqual;
1880
+ return _baseIsEqual;
1881
+ }
1882
+ var _baseIsMatch;
1883
+ var hasRequired_baseIsMatch;
1884
+ function require_baseIsMatch() {
1885
+ if (hasRequired_baseIsMatch) return _baseIsMatch;
1886
+ hasRequired_baseIsMatch = 1;
1887
+ var Stack2 = _Stack, baseIsEqual = require_baseIsEqual();
1888
+ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
1889
+ function baseIsMatch(object, source, matchData, customizer) {
1890
+ var index = matchData.length, length = index, noCustomizer = !customizer;
1891
+ if (object == null) {
1892
+ return !length;
1893
+ }
1894
+ object = Object(object);
1895
+ while (index--) {
1896
+ var data = matchData[index];
1897
+ if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
1898
+ return false;
1899
+ }
1900
+ }
1901
+ while (++index < length) {
1902
+ data = matchData[index];
1903
+ var key = data[0], objValue = object[key], srcValue = data[1];
1904
+ if (noCustomizer && data[2]) {
1905
+ if (objValue === void 0 && !(key in object)) {
1906
+ return false;
1907
+ }
1908
+ } else {
1909
+ var stack = new Stack2();
1910
+ if (customizer) {
1911
+ var result = customizer(objValue, srcValue, key, object, source, stack);
1912
+ }
1913
+ if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result)) {
1914
+ return false;
1915
+ }
1916
+ }
1917
+ }
1918
+ return true;
1919
+ }
1920
+ _baseIsMatch = baseIsMatch;
1921
+ return _baseIsMatch;
1922
+ }
1923
+ var _isStrictComparable;
1924
+ var hasRequired_isStrictComparable;
1925
+ function require_isStrictComparable() {
1926
+ if (hasRequired_isStrictComparable) return _isStrictComparable;
1927
+ hasRequired_isStrictComparable = 1;
1928
+ var isObject2 = requireIsObject();
1929
+ function isStrictComparable(value) {
1930
+ return value === value && !isObject2(value);
1931
+ }
1932
+ _isStrictComparable = isStrictComparable;
1933
+ return _isStrictComparable;
1934
+ }
1935
+ var _getMatchData;
1936
+ var hasRequired_getMatchData;
1937
+ function require_getMatchData() {
1938
+ if (hasRequired_getMatchData) return _getMatchData;
1939
+ hasRequired_getMatchData = 1;
1940
+ var isStrictComparable = require_isStrictComparable(), keys2 = requireKeys();
1941
+ function getMatchData(object) {
1942
+ var result = keys2(object), length = result.length;
1943
+ while (length--) {
1944
+ var key = result[length], value = object[key];
1945
+ result[length] = [key, value, isStrictComparable(value)];
1946
+ }
1947
+ return result;
1948
+ }
1949
+ _getMatchData = getMatchData;
1950
+ return _getMatchData;
1951
+ }
1952
+ var _matchesStrictComparable;
1953
+ var hasRequired_matchesStrictComparable;
1954
+ function require_matchesStrictComparable() {
1955
+ if (hasRequired_matchesStrictComparable) return _matchesStrictComparable;
1956
+ hasRequired_matchesStrictComparable = 1;
1957
+ function matchesStrictComparable(key, srcValue) {
1958
+ return function(object) {
1959
+ if (object == null) {
1960
+ return false;
1961
+ }
1962
+ return object[key] === srcValue && (srcValue !== void 0 || key in Object(object));
1963
+ };
1964
+ }
1965
+ _matchesStrictComparable = matchesStrictComparable;
1966
+ return _matchesStrictComparable;
1967
+ }
1968
+ var _baseMatches;
1969
+ var hasRequired_baseMatches;
1970
+ function require_baseMatches() {
1971
+ if (hasRequired_baseMatches) return _baseMatches;
1972
+ hasRequired_baseMatches = 1;
1973
+ var baseIsMatch = require_baseIsMatch(), getMatchData = require_getMatchData(), matchesStrictComparable = require_matchesStrictComparable();
1974
+ function baseMatches(source) {
1975
+ var matchData = getMatchData(source);
1976
+ if (matchData.length == 1 && matchData[0][2]) {
1977
+ return matchesStrictComparable(matchData[0][0], matchData[0][1]);
1978
+ }
1979
+ return function(object) {
1980
+ return object === source || baseIsMatch(object, source, matchData);
1981
+ };
1982
+ }
1983
+ _baseMatches = baseMatches;
1984
+ return _baseMatches;
1985
+ }
1986
+ var _isKey;
1987
+ var hasRequired_isKey;
1988
+ function require_isKey() {
1989
+ if (hasRequired_isKey) return _isKey;
1990
+ hasRequired_isKey = 1;
1991
+ var isArray2 = requireIsArray(), isSymbol = requireIsSymbol();
1992
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
1993
+ function isKey2(value, object) {
1994
+ if (isArray2(value)) {
1995
+ return false;
1996
+ }
1997
+ var type = typeof value;
1998
+ if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
1999
+ return true;
2000
+ }
2001
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
2002
+ }
2003
+ _isKey = isKey2;
2004
+ return _isKey;
2005
+ }
2006
+ var MapCache = require_MapCache();
2007
+ var FUNC_ERROR_TEXT = "Expected a function";
2008
+ function memoize$1(func, resolver) {
2009
+ if (typeof func != "function" || resolver != null && typeof resolver != "function") {
2010
+ throw new TypeError(FUNC_ERROR_TEXT);
2011
+ }
2012
+ var memoized = function() {
2013
+ var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
2014
+ if (cache.has(key)) {
2015
+ return cache.get(key);
2016
+ }
2017
+ var result = func.apply(this, args);
2018
+ memoized.cache = cache.set(key, result) || cache;
2019
+ return result;
2020
+ };
2021
+ memoized.cache = new (memoize$1.Cache || MapCache)();
2022
+ return memoized;
2023
+ }
2024
+ memoize$1.Cache = MapCache;
2025
+ var memoize_1 = memoize$1;
2026
+ var memoize = memoize_1;
2027
+ var MAX_MEMOIZE_SIZE = 500;
2028
+ function memoizeCapped$1(func) {
2029
+ var result = memoize(func, function(key) {
2030
+ if (cache.size === MAX_MEMOIZE_SIZE) {
2031
+ cache.clear();
2032
+ }
2033
+ return key;
2034
+ });
2035
+ var cache = result.cache;
2036
+ return result;
2037
+ }
2038
+ var _memoizeCapped = memoizeCapped$1;
2039
+ var memoizeCapped = _memoizeCapped;
2040
+ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
2041
+ var reEscapeChar = /\\(\\)?/g;
2042
+ var stringToPath$1 = memoizeCapped(function(string) {
2043
+ var result = [];
2044
+ if (string.charCodeAt(0) === 46) {
2045
+ result.push("");
2046
+ }
2047
+ string.replace(rePropName, function(match, number, quote, subString) {
2048
+ result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
2049
+ });
2050
+ return result;
2051
+ });
2052
+ var _stringToPath = stringToPath$1;
2053
+ var _baseToString;
2054
+ var hasRequired_baseToString;
2055
+ function require_baseToString() {
2056
+ if (hasRequired_baseToString) return _baseToString;
2057
+ hasRequired_baseToString = 1;
2058
+ var Symbol = require_Symbol(), arrayMap2 = _arrayMap, isArray2 = requireIsArray(), isSymbol = requireIsSymbol();
2059
+ var INFINITY = 1 / 0;
2060
+ var symbolProto = Symbol ? Symbol.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
2061
+ function baseToString(value) {
2062
+ if (typeof value == "string") {
2063
+ return value;
2064
+ }
2065
+ if (isArray2(value)) {
2066
+ return arrayMap2(value, baseToString) + "";
2067
+ }
2068
+ if (isSymbol(value)) {
2069
+ return symbolToString ? symbolToString.call(value) : "";
2070
+ }
2071
+ var result = value + "";
2072
+ return result == "0" && 1 / value == -INFINITY ? "-0" : result;
2073
+ }
2074
+ _baseToString = baseToString;
2075
+ return _baseToString;
2076
+ }
2077
+ var toString_1;
2078
+ var hasRequiredToString;
2079
+ function requireToString() {
2080
+ if (hasRequiredToString) return toString_1;
2081
+ hasRequiredToString = 1;
2082
+ var baseToString = require_baseToString();
2083
+ function toString2(value) {
2084
+ return value == null ? "" : baseToString(value);
2085
+ }
2086
+ toString_1 = toString2;
2087
+ return toString_1;
2088
+ }
2089
+ var isArray = requireIsArray(), isKey = require_isKey(), stringToPath = _stringToPath, toString = requireToString();
2090
+ function castPath(value, object) {
2091
+ if (isArray(value)) {
2092
+ return value;
2093
+ }
2094
+ return isKey(value, object) ? [value] : stringToPath(toString(value));
2095
+ }
2096
+ var _castPath = castPath;
2097
+ var _toKey;
2098
+ var hasRequired_toKey;
2099
+ function require_toKey() {
2100
+ if (hasRequired_toKey) return _toKey;
2101
+ hasRequired_toKey = 1;
2102
+ var isSymbol = requireIsSymbol();
2103
+ var INFINITY = 1 / 0;
2104
+ function toKey(value) {
2105
+ if (typeof value == "string" || isSymbol(value)) {
2106
+ return value;
2107
+ }
2108
+ var result = value + "";
2109
+ return result == "0" && 1 / value == -INFINITY ? "-0" : result;
2110
+ }
2111
+ _toKey = toKey;
2112
+ return _toKey;
2113
+ }
2114
+ var _baseGet;
2115
+ var hasRequired_baseGet;
2116
+ function require_baseGet() {
2117
+ if (hasRequired_baseGet) return _baseGet;
2118
+ hasRequired_baseGet = 1;
2119
+ var castPath2 = _castPath, toKey = require_toKey();
2120
+ function baseGet(object, path) {
2121
+ path = castPath2(path, object);
2122
+ var index = 0, length = path.length;
2123
+ while (object != null && index < length) {
2124
+ object = object[toKey(path[index++])];
2125
+ }
2126
+ return index && index == length ? object : void 0;
2127
+ }
2128
+ _baseGet = baseGet;
2129
+ return _baseGet;
2130
+ }
2131
+ var get_1;
2132
+ var hasRequiredGet;
2133
+ function requireGet() {
2134
+ if (hasRequiredGet) return get_1;
2135
+ hasRequiredGet = 1;
2136
+ var baseGet = require_baseGet();
2137
+ function get(object, path, defaultValue) {
2138
+ var result = object == null ? void 0 : baseGet(object, path);
2139
+ return result === void 0 ? defaultValue : result;
2140
+ }
2141
+ get_1 = get;
2142
+ return get_1;
2143
+ }
2144
+ var _baseHasIn;
2145
+ var hasRequired_baseHasIn;
2146
+ function require_baseHasIn() {
2147
+ if (hasRequired_baseHasIn) return _baseHasIn;
2148
+ hasRequired_baseHasIn = 1;
2149
+ function baseHasIn(object, key) {
2150
+ return object != null && key in Object(object);
2151
+ }
2152
+ _baseHasIn = baseHasIn;
2153
+ return _baseHasIn;
2154
+ }
2155
+ var _hasPath;
2156
+ var hasRequired_hasPath;
2157
+ function require_hasPath() {
2158
+ if (hasRequired_hasPath) return _hasPath;
2159
+ hasRequired_hasPath = 1;
2160
+ var castPath2 = _castPath, isArguments = requireIsArguments(), isArray2 = requireIsArray(), isIndex = require_isIndex(), isLength = requireIsLength(), toKey = require_toKey();
2161
+ function hasPath(object, path, hasFunc) {
2162
+ path = castPath2(path, object);
2163
+ var index = -1, length = path.length, result = false;
2164
+ while (++index < length) {
2165
+ var key = toKey(path[index]);
2166
+ if (!(result = object != null && hasFunc(object, key))) {
2167
+ break;
2168
+ }
2169
+ object = object[key];
2170
+ }
2171
+ if (result || ++index != length) {
2172
+ return result;
2173
+ }
2174
+ length = object == null ? 0 : object.length;
2175
+ return !!length && isLength(length) && isIndex(key, length) && (isArray2(object) || isArguments(object));
2176
+ }
2177
+ _hasPath = hasPath;
2178
+ return _hasPath;
2179
+ }
2180
+ var hasIn_1;
2181
+ var hasRequiredHasIn;
2182
+ function requireHasIn() {
2183
+ if (hasRequiredHasIn) return hasIn_1;
2184
+ hasRequiredHasIn = 1;
2185
+ var baseHasIn = require_baseHasIn(), hasPath = require_hasPath();
2186
+ function hasIn(object, path) {
2187
+ return object != null && hasPath(object, path, baseHasIn);
2188
+ }
2189
+ hasIn_1 = hasIn;
2190
+ return hasIn_1;
2191
+ }
2192
+ var _baseMatchesProperty;
2193
+ var hasRequired_baseMatchesProperty;
2194
+ function require_baseMatchesProperty() {
2195
+ if (hasRequired_baseMatchesProperty) return _baseMatchesProperty;
2196
+ hasRequired_baseMatchesProperty = 1;
2197
+ var baseIsEqual = require_baseIsEqual(), get = requireGet(), hasIn = requireHasIn(), isKey2 = require_isKey(), isStrictComparable = require_isStrictComparable(), matchesStrictComparable = require_matchesStrictComparable(), toKey = require_toKey();
2198
+ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
2199
+ function baseMatchesProperty(path, srcValue) {
2200
+ if (isKey2(path) && isStrictComparable(srcValue)) {
2201
+ return matchesStrictComparable(toKey(path), srcValue);
2202
+ }
2203
+ return function(object) {
2204
+ var objValue = get(object, path);
2205
+ return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
2206
+ };
2207
+ }
2208
+ _baseMatchesProperty = baseMatchesProperty;
2209
+ return _baseMatchesProperty;
2210
+ }
2211
+ var _baseProperty;
2212
+ var hasRequired_baseProperty;
2213
+ function require_baseProperty() {
2214
+ if (hasRequired_baseProperty) return _baseProperty;
2215
+ hasRequired_baseProperty = 1;
2216
+ function baseProperty(key) {
2217
+ return function(object) {
2218
+ return object == null ? void 0 : object[key];
2219
+ };
2220
+ }
2221
+ _baseProperty = baseProperty;
2222
+ return _baseProperty;
2223
+ }
2224
+ var _basePropertyDeep;
2225
+ var hasRequired_basePropertyDeep;
2226
+ function require_basePropertyDeep() {
2227
+ if (hasRequired_basePropertyDeep) return _basePropertyDeep;
2228
+ hasRequired_basePropertyDeep = 1;
2229
+ var baseGet = require_baseGet();
2230
+ function basePropertyDeep(path) {
2231
+ return function(object) {
2232
+ return baseGet(object, path);
2233
+ };
2234
+ }
2235
+ _basePropertyDeep = basePropertyDeep;
2236
+ return _basePropertyDeep;
2237
+ }
2238
+ var property_1;
2239
+ var hasRequiredProperty;
2240
+ function requireProperty() {
2241
+ if (hasRequiredProperty) return property_1;
2242
+ hasRequiredProperty = 1;
2243
+ var baseProperty = require_baseProperty(), basePropertyDeep = require_basePropertyDeep(), isKey2 = require_isKey(), toKey = require_toKey();
2244
+ function property(path) {
2245
+ return isKey2(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
2246
+ }
2247
+ property_1 = property;
2248
+ return property_1;
2249
+ }
2250
+ var _baseIteratee;
2251
+ var hasRequired_baseIteratee;
2252
+ function require_baseIteratee() {
2253
+ if (hasRequired_baseIteratee) return _baseIteratee;
2254
+ hasRequired_baseIteratee = 1;
2255
+ var baseMatches = require_baseMatches(), baseMatchesProperty = require_baseMatchesProperty(), identity = requireIdentity(), isArray2 = requireIsArray(), property = requireProperty();
2256
+ function baseIteratee(value) {
2257
+ if (typeof value == "function") {
2258
+ return value;
2259
+ }
2260
+ if (value == null) {
2261
+ return identity;
2262
+ }
2263
+ if (typeof value == "object") {
2264
+ return isArray2(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
2265
+ }
2266
+ return property(value);
2267
+ }
2268
+ _baseIteratee = baseIteratee;
2269
+ return _baseIteratee;
2270
+ }
2271
+ var filter_1;
2272
+ var hasRequiredFilter;
2273
+ function requireFilter() {
2274
+ if (hasRequiredFilter) return filter_1;
2275
+ hasRequiredFilter = 1;
2276
+ var arrayFilter2 = require_arrayFilter(), baseFilter = require_baseFilter(), baseIteratee = require_baseIteratee(), isArray2 = requireIsArray();
2277
+ function filter(collection, predicate) {
2278
+ var func = isArray2(collection) ? arrayFilter2 : baseFilter;
2279
+ return func(collection, baseIteratee(predicate, 3));
2280
+ }
2281
+ filter_1 = filter;
2282
+ return filter_1;
2283
+ }
2284
+ var _baseFindKey;
2285
+ var hasRequired_baseFindKey;
2286
+ function require_baseFindKey() {
2287
+ if (hasRequired_baseFindKey) return _baseFindKey;
2288
+ hasRequired_baseFindKey = 1;
2289
+ function baseFindKey(collection, predicate, eachFunc) {
2290
+ var result;
2291
+ eachFunc(collection, function(value, key, collection2) {
2292
+ if (predicate(value, key, collection2)) {
2293
+ result = key;
2294
+ return false;
2295
+ }
2296
+ });
2297
+ return result;
2298
+ }
2299
+ _baseFindKey = baseFindKey;
2300
+ return _baseFindKey;
2301
+ }
2302
+ var findKey_1;
2303
+ var hasRequiredFindKey;
2304
+ function requireFindKey() {
2305
+ if (hasRequiredFindKey) return findKey_1;
2306
+ hasRequiredFindKey = 1;
2307
+ var baseFindKey = require_baseFindKey(), baseForOwn = require_baseForOwn(), baseIteratee = require_baseIteratee();
2308
+ function findKey(object, predicate) {
2309
+ return baseFindKey(object, baseIteratee(predicate, 3), baseForOwn);
2310
+ }
2311
+ findKey_1 = findKey;
2312
+ return findKey_1;
2313
+ }
2314
+ var head_1;
2315
+ var hasRequiredHead;
2316
+ function requireHead() {
2317
+ if (hasRequiredHead) return head_1;
2318
+ hasRequiredHead = 1;
2319
+ function head(array) {
2320
+ return array && array.length ? array[0] : void 0;
2321
+ }
2322
+ head_1 = head;
2323
+ return head_1;
2324
+ }
2325
+ var first;
2326
+ var hasRequiredFirst;
2327
+ function requireFirst() {
2328
+ if (hasRequiredFirst) return first;
2329
+ hasRequiredFirst = 1;
2330
+ first = requireHead();
2331
+ return first;
2332
+ }
2333
+ var _arrayEach;
2334
+ var hasRequired_arrayEach;
2335
+ function require_arrayEach() {
2336
+ if (hasRequired_arrayEach) return _arrayEach;
2337
+ hasRequired_arrayEach = 1;
2338
+ function arrayEach(array, iteratee) {
2339
+ var index = -1, length = array == null ? 0 : array.length;
2340
+ while (++index < length) {
2341
+ if (iteratee(array[index], index, array) === false) {
2342
+ break;
2343
+ }
2344
+ }
2345
+ return array;
2346
+ }
2347
+ _arrayEach = arrayEach;
2348
+ return _arrayEach;
2349
+ }
2350
+ var _castFunction;
2351
+ var hasRequired_castFunction;
2352
+ function require_castFunction() {
2353
+ if (hasRequired_castFunction) return _castFunction;
2354
+ hasRequired_castFunction = 1;
2355
+ var identity = requireIdentity();
2356
+ function castFunction(value) {
2357
+ return typeof value == "function" ? value : identity;
2358
+ }
2359
+ _castFunction = castFunction;
2360
+ return _castFunction;
2361
+ }
2362
+ var forEach_1;
2363
+ var hasRequiredForEach;
2364
+ function requireForEach() {
2365
+ if (hasRequiredForEach) return forEach_1;
2366
+ hasRequiredForEach = 1;
2367
+ var arrayEach = require_arrayEach(), baseEach = require_baseEach(), castFunction = require_castFunction(), isArray2 = requireIsArray();
2368
+ function forEach(collection, iteratee) {
2369
+ var func = isArray2(collection) ? arrayEach : baseEach;
2370
+ return func(collection, castFunction(iteratee));
2371
+ }
2372
+ forEach_1 = forEach;
2373
+ return forEach_1;
2374
+ }
2375
+ var forOwn_1;
2376
+ var hasRequiredForOwn;
2377
+ function requireForOwn() {
2378
+ if (hasRequiredForOwn) return forOwn_1;
2379
+ hasRequiredForOwn = 1;
2380
+ var baseForOwn = require_baseForOwn(), castFunction = require_castFunction();
2381
+ function forOwn(object, iteratee) {
2382
+ return object && baseForOwn(object, castFunction(iteratee));
2383
+ }
2384
+ forOwn_1 = forOwn;
2385
+ return forOwn_1;
2386
+ }
2387
+ var noop_1;
2388
+ var hasRequiredNoop;
2389
+ function requireNoop() {
2390
+ if (hasRequiredNoop) return noop_1;
2391
+ hasRequiredNoop = 1;
2392
+ function noop() {
2393
+ }
2394
+ noop_1 = noop;
2395
+ return noop_1;
2396
+ }
2397
+ var _baseMap;
2398
+ var hasRequired_baseMap;
2399
+ function require_baseMap() {
2400
+ if (hasRequired_baseMap) return _baseMap;
2401
+ hasRequired_baseMap = 1;
2402
+ var baseEach = require_baseEach(), isArrayLike = requireIsArrayLike();
2403
+ function baseMap(collection, iteratee) {
2404
+ var index = -1, result = isArrayLike(collection) ? Array(collection.length) : [];
2405
+ baseEach(collection, function(value, key, collection2) {
2406
+ result[++index] = iteratee(value, key, collection2);
2407
+ });
2408
+ return result;
2409
+ }
2410
+ _baseMap = baseMap;
2411
+ return _baseMap;
2412
+ }
2413
+ var _baseSortBy;
2414
+ var hasRequired_baseSortBy;
2415
+ function require_baseSortBy() {
2416
+ if (hasRequired_baseSortBy) return _baseSortBy;
2417
+ hasRequired_baseSortBy = 1;
2418
+ function baseSortBy(array, comparer) {
2419
+ var length = array.length;
2420
+ array.sort(comparer);
2421
+ while (length--) {
2422
+ array[length] = array[length].value;
2423
+ }
2424
+ return array;
2425
+ }
2426
+ _baseSortBy = baseSortBy;
2427
+ return _baseSortBy;
2428
+ }
2429
+ var _compareAscending;
2430
+ var hasRequired_compareAscending;
2431
+ function require_compareAscending() {
2432
+ if (hasRequired_compareAscending) return _compareAscending;
2433
+ hasRequired_compareAscending = 1;
2434
+ var isSymbol = requireIsSymbol();
2435
+ function compareAscending(value, other) {
2436
+ if (value !== other) {
2437
+ var valIsDefined = value !== void 0, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value);
2438
+ var othIsDefined = other !== void 0, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other);
2439
+ if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) {
2440
+ return 1;
2441
+ }
2442
+ if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) {
2443
+ return -1;
2444
+ }
2445
+ }
2446
+ return 0;
2447
+ }
2448
+ _compareAscending = compareAscending;
2449
+ return _compareAscending;
2450
+ }
2451
+ var _compareMultiple;
2452
+ var hasRequired_compareMultiple;
2453
+ function require_compareMultiple() {
2454
+ if (hasRequired_compareMultiple) return _compareMultiple;
2455
+ hasRequired_compareMultiple = 1;
2456
+ var compareAscending = require_compareAscending();
2457
+ function compareMultiple(object, other, orders) {
2458
+ var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length;
2459
+ while (++index < length) {
2460
+ var result = compareAscending(objCriteria[index], othCriteria[index]);
2461
+ if (result) {
2462
+ if (index >= ordersLength) {
2463
+ return result;
2464
+ }
2465
+ var order = orders[index];
2466
+ return result * (order == "desc" ? -1 : 1);
2467
+ }
2468
+ }
2469
+ return object.index - other.index;
2470
+ }
2471
+ _compareMultiple = compareMultiple;
2472
+ return _compareMultiple;
2473
+ }
2474
+ var _baseOrderBy;
2475
+ var hasRequired_baseOrderBy;
2476
+ function require_baseOrderBy() {
2477
+ if (hasRequired_baseOrderBy) return _baseOrderBy;
2478
+ hasRequired_baseOrderBy = 1;
2479
+ var arrayMap2 = _arrayMap, baseGet = require_baseGet(), baseIteratee = require_baseIteratee(), baseMap = require_baseMap(), baseSortBy = require_baseSortBy(), baseUnary = require_baseUnary(), compareMultiple = require_compareMultiple(), identity = requireIdentity(), isArray2 = requireIsArray();
2480
+ function baseOrderBy(collection, iteratees, orders) {
2481
+ if (iteratees.length) {
2482
+ iteratees = arrayMap2(iteratees, function(iteratee) {
2483
+ if (isArray2(iteratee)) {
2484
+ return function(value) {
2485
+ return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
2486
+ };
2487
+ }
2488
+ return iteratee;
2489
+ });
2490
+ } else {
2491
+ iteratees = [identity];
2492
+ }
2493
+ var index = -1;
2494
+ iteratees = arrayMap2(iteratees, baseUnary(baseIteratee));
2495
+ var result = baseMap(collection, function(value, key, collection2) {
2496
+ var criteria = arrayMap2(iteratees, function(iteratee) {
2497
+ return iteratee(value);
2498
+ });
2499
+ return { "criteria": criteria, "index": ++index, "value": value };
2500
+ });
2501
+ return baseSortBy(result, function(object, other) {
2502
+ return compareMultiple(object, other, orders);
2503
+ });
2504
+ }
2505
+ _baseOrderBy = baseOrderBy;
2506
+ return _baseOrderBy;
2507
+ }
2508
+ var _isIterateeCall;
2509
+ var hasRequired_isIterateeCall;
2510
+ function require_isIterateeCall() {
2511
+ if (hasRequired_isIterateeCall) return _isIterateeCall;
2512
+ hasRequired_isIterateeCall = 1;
2513
+ var eq2 = requireEq(), isArrayLike = requireIsArrayLike(), isIndex = require_isIndex(), isObject2 = requireIsObject();
2514
+ function isIterateeCall(value, index, object) {
2515
+ if (!isObject2(object)) {
2516
+ return false;
2517
+ }
2518
+ var type = typeof index;
2519
+ if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) {
2520
+ return eq2(object[index], value);
2521
+ }
2522
+ return false;
2523
+ }
2524
+ _isIterateeCall = isIterateeCall;
2525
+ return _isIterateeCall;
2526
+ }
2527
+ var sortBy_1;
2528
+ var hasRequiredSortBy;
2529
+ function requireSortBy() {
2530
+ if (hasRequiredSortBy) return sortBy_1;
2531
+ hasRequiredSortBy = 1;
2532
+ var baseFlatten = require_baseFlatten(), baseOrderBy = require_baseOrderBy(), baseRest = require_baseRest(), isIterateeCall = require_isIterateeCall();
2533
+ var sortBy = baseRest(function(collection, iteratees) {
2534
+ if (collection == null) {
2535
+ return [];
2536
+ }
2537
+ var length = iteratees.length;
2538
+ if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
2539
+ iteratees = [];
2540
+ } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
2541
+ iteratees = [iteratees[0]];
2542
+ }
2543
+ return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
2544
+ });
2545
+ sortBy_1 = sortBy;
2546
+ return sortBy_1;
2547
+ }
2548
+ var throttle_1;
2549
+ var hasRequiredThrottle;
2550
+ function requireThrottle() {
2551
+ if (hasRequiredThrottle) return throttle_1;
2552
+ hasRequiredThrottle = 1;
2553
+ var debounce = requireDebounce(), isObject2 = requireIsObject();
2554
+ var FUNC_ERROR_TEXT2 = "Expected a function";
2555
+ function throttle(func, wait, options) {
2556
+ var leading = true, trailing = true;
2557
+ if (typeof func != "function") {
2558
+ throw new TypeError(FUNC_ERROR_TEXT2);
2559
+ }
2560
+ if (isObject2(options)) {
2561
+ leading = "leading" in options ? !!options.leading : leading;
2562
+ trailing = "trailing" in options ? !!options.trailing : trailing;
2563
+ }
2564
+ return debounce(func, wait, {
2565
+ "leading": leading,
2566
+ "maxWait": wait,
2567
+ "trailing": trailing
2568
+ });
2569
+ }
2570
+ throttle_1 = throttle;
2571
+ return throttle_1;
2572
+ }
2573
+ var uniqueId_1;
2574
+ var hasRequiredUniqueId;
2575
+ function requireUniqueId() {
2576
+ if (hasRequiredUniqueId) return uniqueId_1;
2577
+ hasRequiredUniqueId = 1;
2578
+ var toString2 = requireToString();
2579
+ var idCounter = 0;
2580
+ function uniqueId(prefix) {
2581
+ var id = ++idCounter;
2582
+ return toString2(prefix) + id;
2583
+ }
2584
+ uniqueId_1 = uniqueId;
2585
+ return uniqueId_1;
2586
+ }
2587
+ (function(module, exports) {
2588
+ !function(e, t) {
2589
+ module.exports = t(requireDebounce(), requireDifference(), requireFilter(), requireFindKey(), requireFirst(), requireForEach(), requireForOwn(), requireNoop(), requireSortBy(), requireThrottle(), requireUniqueId(), React36__default);
2590
+ }(commonjsGlobal, function(e, t, o, s, i, n, r, a, u, c, l, d) {
2591
+ return function() {
2592
+ var h = { 654: function(e2, t2, o2) {
2593
+ var s2, i2 = this && this.__assign || function() {
2594
+ return i2 = Object.assign || function(e3) {
2595
+ for (var t3, o3 = 1, s3 = arguments.length; o3 < s3; o3++) for (var i3 in t3 = arguments[o3]) Object.prototype.hasOwnProperty.call(t3, i3) && (e3[i3] = t3[i3]);
2596
+ return e3;
2597
+ }, i2.apply(this, arguments);
2598
+ }, n2 = this && this.__createBinding || (Object.create ? function(e3, t3, o3, s3) {
2599
+ void 0 === s3 && (s3 = o3);
2600
+ var i3 = Object.getOwnPropertyDescriptor(t3, o3);
2601
+ i3 && !("get" in i3 ? !t3.__esModule : i3.writable || i3.configurable) || (i3 = { enumerable: true, get: function() {
2602
+ return t3[o3];
2603
+ } }), Object.defineProperty(e3, s3, i3);
2604
+ } : function(e3, t3, o3, s3) {
2605
+ void 0 === s3 && (s3 = o3), e3[s3] = t3[o3];
2606
+ }), r2 = this && this.__setModuleDefault || (Object.create ? function(e3, t3) {
2607
+ Object.defineProperty(e3, "default", { enumerable: true, value: t3 });
2608
+ } : function(e3, t3) {
2609
+ e3.default = t3;
2610
+ }), a2 = this && this.__importStar || function(e3) {
2611
+ if (e3 && e3.__esModule) return e3;
2612
+ var t3 = {};
2613
+ if (null != e3) for (var o3 in e3) "default" !== o3 && Object.prototype.hasOwnProperty.call(e3, o3) && n2(t3, e3, o3);
2614
+ return r2(t3, e3), t3;
2615
+ }, u2 = this && this.__spreadArray || function(e3, t3, o3) {
2616
+ if (o3 || 2 === arguments.length) for (var s3, i3 = 0, n3 = t3.length; i3 < n3; i3++) !s3 && i3 in t3 || (s3 || (s3 = Array.prototype.slice.call(t3, 0, i3)), s3[i3] = t3[i3]);
2617
+ return e3.concat(s3 || Array.prototype.slice.call(t3));
2618
+ }, c2 = this && this.__importDefault || function(e3) {
2619
+ return e3 && e3.__esModule ? e3 : { default: e3 };
2620
+ };
2621
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.updateRtl = t2.doesFocusableExist = t2.getCurrentFocusKey = t2.updateAllLayouts = t2.resume = t2.pause = t2.navigateByDirection = t2.setFocus = t2.setKeyMap = t2.destroy = t2.setThrottle = t2.init = t2.SpatialNavigation = t2.ROOT_FOCUS_KEY = void 0;
2622
+ var l2 = c2(o2(150)), d2 = c2(o2(117)), h2 = c2(o2(747)), f2 = c2(o2(23)), p = c2(o2(842)), y = c2(o2(682)), v = c2(o2(784)), g = c2(o2(432)), b = c2(o2(67)), F = c2(o2(35)), C = c2(o2(119)), m = a2(o2(964)), K = "left", w = "right", x = "up", E = "down", D = "enter", L = ((s2 = {}).left = [37, "ArrowLeft"], s2.up = [38, "ArrowUp"], s2.right = [39, "ArrowRight"], s2.down = [40, "ArrowDown"], s2.enter = [13, "Enter"], s2);
2623
+ t2.ROOT_FOCUS_KEY = "SN:ROOT";
2624
+ var M = ["#0FF", "#FF0", "#F0F"], R = { leading: true, trailing: false }, N = function() {
2625
+ function e3() {
2626
+ this.focusableComponents = {}, this.focusKey = null, this.parentsHavingFocusedChild = [], this.domNodeFocusOptions = {}, this.enabled = false, this.nativeMode = false, this.throttle = 0, this.throttleKeypresses = false, this.useGetBoundingClientRect = false, this.shouldFocusDOMNode = false, this.shouldUseNativeEvents = false, this.writingDirection = C.default.LTR, this.pressedKeys = {}, this.paused = false, this.keyDownEventListener = null, this.keyUpEventListener = null, this.keyMap = L, this.pause = this.pause.bind(this), this.resume = this.resume.bind(this), this.setFocus = this.setFocus.bind(this), this.updateAllLayouts = this.updateAllLayouts.bind(this), this.navigateByDirection = this.navigateByDirection.bind(this), this.init = this.init.bind(this), this.setThrottle = this.setThrottle.bind(this), this.destroy = this.destroy.bind(this), this.setKeyMap = this.setKeyMap.bind(this), this.getCurrentFocusKey = this.getCurrentFocusKey.bind(this), this.doesFocusableExist = this.doesFocusableExist.bind(this), this.updateRtl = this.updateRtl.bind(this), this.setFocusDebounced = (0, l2.default)(this.setFocus, 300, { leading: false, trailing: true }), this.debug = false, this.visualDebugger = null, this.logIndex = 0, this.distanceCalculationMethod = "corners";
2627
+ }
2628
+ return e3.getCutoffCoordinate = function(e4, t3, o3, s3, i3) {
2629
+ var n3 = e4 ? s3.top : i3 === C.default.LTR ? s3.left : s3.right, r3 = e4 ? s3.bottom : i3 === C.default.LTR ? s3.right : s3.left;
2630
+ return t3 ? o3 ? n3 : r3 : o3 ? r3 : n3;
2631
+ }, e3.getRefCorners = function(e4, t3, o3) {
2632
+ var s3 = { a: { x: 0, y: 0 }, b: { x: 0, y: 0 } };
2633
+ switch (e4) {
2634
+ case x:
2635
+ var i3 = t3 ? o3.bottom : o3.top;
2636
+ s3.a = { x: o3.left, y: i3 }, s3.b = { x: o3.right, y: i3 };
2637
+ break;
2638
+ case E:
2639
+ i3 = t3 ? o3.top : o3.bottom, s3.a = { x: o3.left, y: i3 }, s3.b = { x: o3.right, y: i3 };
2640
+ break;
2641
+ case K:
2642
+ var n3 = t3 ? o3.right : o3.left;
2643
+ s3.a = { x: n3, y: o3.top }, s3.b = { x: n3, y: o3.bottom };
2644
+ break;
2645
+ case w:
2646
+ n3 = t3 ? o3.left : o3.right, s3.a = { x: n3, y: o3.top }, s3.b = { x: n3, y: o3.bottom };
2647
+ }
2648
+ return s3;
2649
+ }, e3.isAdjacentSlice = function(e4, t3, o3) {
2650
+ var s3 = e4.a, i3 = e4.b, n3 = t3.a, r3 = t3.b, a3 = o3 ? "x" : "y", u3 = s3[a3], c3 = i3[a3], l3 = n3[a3], d3 = r3[a3], h3 = 0.2 * (c3 - u3);
2651
+ return Math.max(0, Math.min(c3, d3) - Math.max(u3, l3)) >= h3;
2652
+ }, e3.getPrimaryAxisDistance = function(e4, t3, o3) {
2653
+ var s3 = e4.a, i3 = t3.a, n3 = o3 ? "y" : "x";
2654
+ return Math.abs(i3[n3] - s3[n3]);
2655
+ }, e3.getSecondaryAxisDistance = function(e4, t3, o3, s3, i3) {
2656
+ if (i3) return i3(e4, t3, o3, s3);
2657
+ var n3 = e4.a, r3 = e4.b, a3 = t3.a, u3 = t3.b, c3 = o3 ? "x" : "y", l3 = n3[c3], d3 = r3[c3], h3 = a3[c3], f3 = u3[c3];
2658
+ if ("center" === s3) {
2659
+ var p2 = (l3 + d3) / 2, y2 = (h3 + f3) / 2;
2660
+ return Math.abs(p2 - y2);
2661
+ }
2662
+ if ("edges" === s3) {
2663
+ var v2 = Math.min(l3, d3), g2 = Math.min(h3, f3), b2 = Math.max(l3, d3), F2 = Math.max(h3, f3), C2 = Math.abs(v2 - g2), m2 = Math.abs(b2 - F2);
2664
+ return Math.min(C2, m2);
2665
+ }
2666
+ var K2 = [Math.abs(h3 - l3), Math.abs(h3 - d3), Math.abs(f3 - l3), Math.abs(f3 - d3)];
2667
+ return Math.min.apply(Math, K2);
2668
+ }, e3.prototype.sortSiblingsByPriority = function(t3, o3, s3, i3) {
2669
+ var n3 = this, r3 = s3 === E || s3 === x, a3 = e3.getRefCorners(s3, false, o3);
2670
+ return (0, g.default)(t3, function(t4) {
2671
+ var o4 = e3.getRefCorners(s3, true, t4.layout), u3 = e3.isAdjacentSlice(a3, o4, r3), c3 = u3 ? e3.getPrimaryAxisDistance : e3.getSecondaryAxisDistance, l3 = u3 ? e3.getSecondaryAxisDistance : e3.getPrimaryAxisDistance, d3 = c3(a3, o4, r3, n3.distanceCalculationMethod, n3.customDistanceCalculationFunction), h3 = l3(a3, o4, r3, n3.distanceCalculationMethod, n3.customDistanceCalculationFunction), f3 = 5 * d3 + h3, p2 = (f3 + 1) / (u3 ? 5 : 1);
2672
+ return n3.log("smartNavigate", "distance (primary, secondary, total weighted) for ".concat(t4.focusKey, " relative to ").concat(i3, " is"), d3, h3, f3), n3.log("smartNavigate", "priority for ".concat(t4.focusKey, " relative to ").concat(i3, " is"), p2), n3.visualDebugger && (n3.visualDebugger.drawPoint(o4.a.x, o4.a.y, "yellow", 6), n3.visualDebugger.drawPoint(o4.b.x, o4.b.y, "yellow", 6)), p2;
2673
+ });
2674
+ }, e3.prototype.init = function(e4) {
2675
+ var t3 = this, o3 = void 0 === e4 ? {} : e4, s3 = o3.debug, i3 = void 0 !== s3 && s3, n3 = o3.visualDebug, r3 = void 0 !== n3 && n3, a3 = o3.nativeMode, u3 = void 0 !== a3 && a3, c3 = o3.throttle, l3 = void 0 === c3 ? 0 : c3, d3 = o3.throttleKeypresses, h3 = void 0 !== d3 && d3, f3 = o3.useGetBoundingClientRect, p2 = void 0 !== f3 && f3, y2 = o3.shouldFocusDOMNode, g2 = void 0 !== y2 && y2, b2 = o3.domNodeFocusOptions, m2 = void 0 === b2 ? {} : b2, K2 = o3.shouldUseNativeEvents, w2 = void 0 !== K2 && K2, x2 = o3.rtl, E2 = void 0 !== x2 && x2, D2 = o3.distanceCalculationMethod, L2 = void 0 === D2 ? "corners" : D2, M2 = o3.customDistanceCalculationFunction, R2 = void 0 === M2 ? void 0 : M2;
2676
+ if (!this.enabled && (this.domNodeFocusOptions = m2, this.enabled = true, this.nativeMode = u3, this.throttleKeypresses = h3, this.useGetBoundingClientRect = p2, this.shouldFocusDOMNode = g2 && !u3, this.shouldUseNativeEvents = w2, this.writingDirection = E2 ? C.default.RTL : C.default.LTR, this.distanceCalculationMethod = L2, this.customDistanceCalculationFunction = R2, this.debug = i3, !this.nativeMode && (Number.isInteger(l3) && l3 > 0 && (this.throttle = l3), this.bindEventHandlers(), r3))) {
2677
+ this.visualDebugger = new F.default(this.writingDirection);
2678
+ var N2 = function() {
2679
+ requestAnimationFrame(function() {
2680
+ t3.visualDebugger.clearLayouts(), (0, v.default)(t3.focusableComponents, function(e5, o4) {
2681
+ t3.visualDebugger.drawLayout(e5.layout, o4, e5.parentFocusKey);
2682
+ }), N2();
2683
+ });
2684
+ };
2685
+ N2();
2686
+ }
2687
+ }, e3.prototype.setThrottle = function(e4) {
2688
+ var t3 = void 0 === e4 ? {} : e4, o3 = t3.throttle, s3 = void 0 === o3 ? 0 : o3, i3 = t3.throttleKeypresses, n3 = void 0 !== i3 && i3;
2689
+ this.throttleKeypresses = n3, this.nativeMode || (this.unbindEventHandlers(), Number.isInteger(s3) && (this.throttle = s3), this.bindEventHandlers());
2690
+ }, e3.prototype.destroy = function() {
2691
+ this.enabled && (this.enabled = false, this.nativeMode = false, this.throttle = 0, this.throttleKeypresses = false, this.focusKey = null, this.parentsHavingFocusedChild = [], this.focusableComponents = {}, this.paused = false, this.keyMap = L, this.unbindEventHandlers());
2692
+ }, e3.prototype.getEventType = function(e4) {
2693
+ return (0, f2.default)(this.getKeyMap(), function(t3) {
2694
+ return t3.includes(e4);
2695
+ });
2696
+ }, e3.getKeyCode = function(e4) {
2697
+ return e4.keyCode || e4.code || e4.key;
2698
+ }, e3.prototype.bindEventHandlers = function() {
2699
+ var t3 = this;
2700
+ "undefined" != typeof window && window.addEventListener && (this.keyDownEventListener = function(o3) {
2701
+ if (true !== t3.paused) {
2702
+ t3.debug && (t3.logIndex += 1);
2703
+ var s3 = e3.getKeyCode(o3), i3 = t3.getEventType(s3);
2704
+ if (i3) {
2705
+ t3.pressedKeys[i3] = t3.pressedKeys[i3] ? t3.pressedKeys[i3] + 1 : 1, t3.shouldUseNativeEvents || (o3.preventDefault(), o3.stopPropagation());
2706
+ var n3 = { pressedKeys: t3.pressedKeys };
2707
+ if (i3 === D && t3.focusKey) t3.onEnterPress(n3);
2708
+ else {
2709
+ var r3 = false === t3.onArrowPress(i3, n3);
2710
+ if (t3.visualDebugger && t3.visualDebugger.clear(), r3) t3.log("keyDownEventListener", "default navigation prevented");
2711
+ else {
2712
+ var a3 = (0, f2.default)(t3.getKeyMap(), function(e4) {
2713
+ return e4.includes(s3);
2714
+ });
2715
+ t3.smartNavigate(a3, null, { event: o3 });
2716
+ }
2717
+ }
2718
+ }
2719
+ }
2720
+ }, this.throttle && (this.keyDownEventListenerThrottled = (0, b.default)(this.keyDownEventListener.bind(this), this.throttle, R)), this.keyUpEventListener = function(o3) {
2721
+ var s3 = e3.getKeyCode(o3), i3 = t3.getEventType(s3);
2722
+ delete t3.pressedKeys[i3], t3.throttle && !t3.throttleKeypresses && t3.keyDownEventListenerThrottled.cancel(), i3 === D && t3.focusKey && t3.onEnterRelease(), !t3.focusKey || i3 !== K && i3 !== w && i3 !== x && i3 !== E || t3.onArrowRelease(i3);
2723
+ }, window.addEventListener("keyup", this.keyUpEventListener), window.addEventListener("keydown", this.throttle ? this.keyDownEventListenerThrottled : this.keyDownEventListener));
2724
+ }, e3.prototype.unbindEventHandlers = function() {
2725
+ if ("undefined" != typeof window && window.removeEventListener) {
2726
+ window.removeEventListener("keyup", this.keyUpEventListener), this.keyUpEventListener = null;
2727
+ var e4 = this.throttle ? this.keyDownEventListenerThrottled : this.keyDownEventListener;
2728
+ window.removeEventListener("keydown", e4), this.keyDownEventListener = null;
2729
+ }
2730
+ }, e3.prototype.onEnterPress = function(e4) {
2731
+ var t3 = this.focusableComponents[this.focusKey];
2732
+ t3 ? t3.focusable ? t3.onEnterPress && t3.onEnterPress(e4) : this.log("onEnterPress", "componentNotFocusable") : this.log("onEnterPress", "noComponent");
2733
+ }, e3.prototype.onEnterRelease = function() {
2734
+ var e4 = this.focusableComponents[this.focusKey];
2735
+ e4 ? e4.focusable ? e4.onEnterRelease && e4.onEnterRelease() : this.log("onEnterRelease", "componentNotFocusable") : this.log("onEnterRelease", "noComponent");
2736
+ }, e3.prototype.onArrowPress = function(e4, t3) {
2737
+ var o3 = this.focusableComponents[this.focusKey];
2738
+ if (o3) return o3 && o3.onArrowPress && o3.onArrowPress(e4, t3);
2739
+ this.log("onArrowPress", "noComponent");
2740
+ }, e3.prototype.onArrowRelease = function(e4) {
2741
+ var t3 = this.focusableComponents[this.focusKey];
2742
+ t3 ? t3.focusable ? t3.onArrowRelease && t3.onArrowRelease(e4) : this.log("onArrowRelease", "componentNotFocusable") : this.log("onArrowRelease", "noComponent");
2743
+ }, e3.prototype.navigateByDirection = function(e4, t3) {
2744
+ if (true !== this.paused && this.enabled && !this.nativeMode) {
2745
+ var o3 = [E, x, K, w];
2746
+ o3.includes(e4) ? (this.log("navigateByDirection", "direction", e4), this.smartNavigate(e4, null, t3)) : this.log("navigateByDirection", "Invalid direction. You passed: `".concat(e4, "`, but you can use only these: "), o3);
2747
+ }
2748
+ }, e3.prototype.smartNavigate = function(t3, o3, s3) {
2749
+ var i3 = this;
2750
+ if (!this.nativeMode) {
2751
+ var n3 = t3 === E || t3 === x, r3 = t3 === E || (this.writingDirection === C.default.LTR ? t3 === w : t3 === K);
2752
+ this.log("smartNavigate", "direction", t3), this.log("smartNavigate", "fromParentFocusKey", o3), this.log("smartNavigate", "this.focusKey", this.focusKey), o3 || (0, v.default)(this.focusableComponents, function(e4) {
2753
+ e4.layoutUpdated = false;
2754
+ });
2755
+ var a3 = this.focusableComponents[o3 || this.focusKey];
2756
+ if (o3 || a3) {
2757
+ if (this.log("smartNavigate", "currentComponent", a3 ? a3.focusKey : void 0, a3 ? a3.node : void 0, a3), a3) {
2758
+ this.updateLayout(a3.focusKey);
2759
+ var u3 = a3.parentFocusKey, c3 = a3.focusKey, l3 = a3.layout, d3 = e3.getCutoffCoordinate(n3, r3, false, l3, this.writingDirection), f3 = (0, h2.default)(this.focusableComponents, function(t4) {
2760
+ if (t4.parentFocusKey === u3 && t4.focusable) {
2761
+ i3.updateLayout(t4.focusKey);
2762
+ var o4 = e3.getCutoffCoordinate(n3, r3, true, t4.layout, i3.writingDirection);
2763
+ return n3 || i3.writingDirection === C.default.LTR ? r3 ? o4 >= d3 : o4 <= d3 : r3 ? o4 <= d3 : o4 >= d3;
2764
+ }
2765
+ return false;
2766
+ });
2767
+ if (this.debug && (this.log("smartNavigate", "currentCutoffCoordinate", d3), this.log("smartNavigate", "siblings", "".concat(f3.length, " elements:"), f3.map(function(e4) {
2768
+ return e4.focusKey;
2769
+ }).join(", "), f3.map(function(e4) {
2770
+ return e4.node;
2771
+ }), f3.map(function(e4) {
2772
+ return e4;
2773
+ }))), this.visualDebugger) {
2774
+ var y2 = e3.getRefCorners(t3, false, l3);
2775
+ this.visualDebugger.drawPoint(y2.a.x, y2.a.y), this.visualDebugger.drawPoint(y2.b.x, y2.b.y);
2776
+ }
2777
+ var g2 = this.sortSiblingsByPriority(f3, l3, t3, c3), b2 = (0, p.default)(g2);
2778
+ if (this.log("smartNavigate", "nextComponent", b2 ? b2.focusKey : void 0, b2 ? b2.node : void 0, b2), b2) this.setFocus(b2.focusKey, s3);
2779
+ else {
2780
+ var F2 = this.focusableComponents[u3], m2 = (null == F2 ? void 0 : F2.isFocusBoundary) ? F2.focusBoundaryDirections || [t3] : [];
2781
+ F2 && m2.includes(t3) || this.smartNavigate(t3, u3, s3);
2782
+ }
2783
+ }
2784
+ } else this.setFocus(this.getForcedFocusKey());
2785
+ }
2786
+ }, e3.prototype.saveLastFocusedChildKey = function(e4, t3) {
2787
+ e4 && (this.log("saveLastFocusedChildKey", "".concat(e4.focusKey, " lastFocusedChildKey set"), t3), e4.lastFocusedChildKey = t3);
2788
+ }, e3.prototype.log = function(e4, t3) {
2789
+ for (var o3 = [], s3 = 2; s3 < arguments.length; s3++) o3[s3 - 2] = arguments[s3];
2790
+ this.debug && console.log.apply(console, u2(["%c".concat(e4, "%c").concat(t3), "background: ".concat(M[this.logIndex % M.length], "; color: black; padding: 1px 5px;"), "background: #333; color: #BADA55; padding: 1px 5px;"], o3, false));
2791
+ }, e3.prototype.getCurrentFocusKey = function() {
2792
+ return this.focusKey;
2793
+ }, e3.prototype.getForcedFocusKey = function() {
2794
+ var e4, o3 = (0, h2.default)(this.focusableComponents, function(e5) {
2795
+ return e5.focusable && e5.forceFocus;
2796
+ }), s3 = this.sortSiblingsByPriority(o3, { x: 0, y: 0, width: 0, height: 0, left: 0, top: 0, right: 0, bottom: 0, node: null }, "down", t2.ROOT_FOCUS_KEY);
2797
+ return null === (e4 = (0, p.default)(s3)) || void 0 === e4 ? void 0 : e4.focusKey;
2798
+ }, e3.prototype.getNextFocusKey = function(e4) {
2799
+ var t3 = this, o3 = this.focusableComponents[e4];
2800
+ if (!o3 || this.nativeMode) return e4;
2801
+ var s3 = (0, h2.default)(this.focusableComponents, function(t4) {
2802
+ return t4.parentFocusKey === e4 && t4.focusable;
2803
+ });
2804
+ if (s3.length > 0) {
2805
+ var i3 = o3.lastFocusedChildKey, n3 = o3.preferredChildFocusKey;
2806
+ if (this.log("getNextFocusKey", "lastFocusedChildKey is", i3), this.log("getNextFocusKey", "preferredChildFocusKey is", n3), i3 && o3.saveLastFocusedChild && this.isParticipatingFocusableComponent(i3)) return this.log("getNextFocusKey", "lastFocusedChildKey will be focused", i3), this.getNextFocusKey(i3);
2807
+ if (n3 && this.isParticipatingFocusableComponent(n3)) return this.log("getNextFocusKey", "preferredChildFocusKey will be focused", n3), this.getNextFocusKey(n3);
2808
+ s3.forEach(function(e5) {
2809
+ return t3.updateLayout(e5.focusKey);
2810
+ });
2811
+ var r3 = function(e5, t4) {
2812
+ var o4 = t4 === C.default.LTR ? function(e6) {
2813
+ var t5 = e6.layout;
2814
+ return Math.abs(t5.left) + Math.abs(t5.top);
2815
+ } : function(e6) {
2816
+ var t5 = e6.layout;
2817
+ return Math.abs(window.innerWidth - t5.right) + Math.abs(t5.top);
2818
+ }, s4 = (0, g.default)(e5, o4);
2819
+ return (0, p.default)(s4);
2820
+ }(s3, this.writingDirection).focusKey;
2821
+ return this.log("getNextFocusKey", "childKey will be focused", r3), this.getNextFocusKey(r3);
2822
+ }
2823
+ return this.log("getNextFocusKey", "targetFocusKey", e4), e4;
2824
+ }, e3.prototype.addFocusable = function(e4) {
2825
+ var t3 = e4.focusKey, o3 = e4.node, s3 = e4.parentFocusKey, i3 = e4.onEnterPress, n3 = e4.onEnterRelease, r3 = e4.onArrowPress, a3 = e4.onArrowRelease, u3 = e4.onFocus, c3 = e4.onBlur, l3 = e4.saveLastFocusedChild, d3 = e4.trackChildren, h3 = e4.onUpdateFocus, f3 = e4.onUpdateHasFocusedChild, p2 = e4.preferredChildFocusKey, y2 = e4.autoRestoreFocus, v2 = e4.forceFocus, g2 = e4.focusable, b2 = e4.isFocusBoundary, F2 = e4.focusBoundaryDirections;
2826
+ if (this.focusableComponents[t3] = { focusKey: t3, node: o3, parentFocusKey: s3, onEnterPress: i3, onEnterRelease: n3, onArrowPress: r3, onArrowRelease: a3, onFocus: u3, onBlur: c3, onUpdateFocus: h3, onUpdateHasFocusedChild: f3, saveLastFocusedChild: l3, trackChildren: d3, preferredChildFocusKey: p2, focusable: g2, isFocusBoundary: b2, focusBoundaryDirections: F2, autoRestoreFocus: y2, forceFocus: v2, lastFocusedChildKey: null, layout: { x: 0, y: 0, width: 0, height: 0, left: 0, top: 0, right: 0, bottom: 0, node: o3 }, layoutUpdated: false }, o3 || console.warn('Component added without a node reference. This will result in its coordinates being empty and may cause lost focus. Check the "ref" passed to "useFocusable": ', this.focusableComponents[t3]), !this.nativeMode) {
2827
+ this.updateLayout(t3), this.log("addFocusable", "Component added: ", this.focusableComponents[t3]), t3 === this.focusKey && this.setFocus(p2 || t3);
2828
+ for (var C2 = this.focusableComponents[this.focusKey]; C2; ) {
2829
+ if (C2.parentFocusKey === t3) {
2830
+ this.updateParentsHasFocusedChild(this.focusKey, {}), this.updateParentsLastFocusedChild(this.focusKey);
2831
+ break;
2832
+ }
2833
+ C2 = this.focusableComponents[C2.parentFocusKey];
2834
+ }
2835
+ }
2836
+ }, e3.prototype.removeFocusable = function(e4) {
2837
+ var t3 = e4.focusKey, o3 = this.focusableComponents[t3];
2838
+ if (o3) {
2839
+ var s3 = o3.parentFocusKey;
2840
+ (0, o3.onUpdateFocus)(false), this.log("removeFocusable", "Component removed: ", o3), delete this.focusableComponents[t3];
2841
+ var i3 = this.parentsHavingFocusedChild.includes(t3);
2842
+ this.parentsHavingFocusedChild = this.parentsHavingFocusedChild.filter(function(e5) {
2843
+ return e5 !== t3;
2844
+ });
2845
+ var n3 = this.focusableComponents[s3], r3 = t3 === this.focusKey;
2846
+ if (n3 && n3.lastFocusedChildKey === t3 && (n3.lastFocusedChildKey = null), this.nativeMode) return;
2847
+ (r3 || i3) && n3 && n3.autoRestoreFocus && (this.log("removeFocusable", "Component removed: ", r3 ? "Leaf component" : "Container component", "Auto restoring focus to: ", s3), this.setFocusDebounced(s3));
2848
+ }
2849
+ }, e3.prototype.getNodeLayoutByFocusKey = function(e4) {
2850
+ var t3 = this.focusableComponents[e4];
2851
+ return t3 ? (this.updateLayout(t3.focusKey), t3.layout) : null;
2852
+ }, e3.prototype.setCurrentFocusedKey = function(e4, t3) {
2853
+ var o3, s3, i3, n3;
2854
+ if (this.isFocusableComponent(this.focusKey) && e4 !== this.focusKey) {
2855
+ var r3 = this.focusableComponents[this.focusKey];
2856
+ r3.onUpdateFocus(false), r3.onBlur(this.getNodeLayoutByFocusKey(this.focusKey), t3), null === (s3 = null === (o3 = r3.node) || void 0 === o3 ? void 0 : o3.removeAttribute) || void 0 === s3 || s3.call(o3, "data-focused"), this.log("setCurrentFocusedKey", "onBlur", r3);
2857
+ }
2858
+ if (this.focusKey = e4, this.isFocusableComponent(this.focusKey)) {
2859
+ var a3 = this.focusableComponents[this.focusKey];
2860
+ this.shouldFocusDOMNode && a3.node && a3.node.focus(this.domNodeFocusOptions), null === (n3 = null === (i3 = a3.node) || void 0 === i3 ? void 0 : i3.setAttribute) || void 0 === n3 || n3.call(i3, "data-focused", "true"), a3.onUpdateFocus(true), a3.onFocus(this.getNodeLayoutByFocusKey(this.focusKey), t3), this.log("setCurrentFocusedKey", "onFocus", a3);
2861
+ }
2862
+ }, e3.prototype.updateParentsHasFocusedChild = function(e4, t3) {
2863
+ for (var o3 = this, s3 = [], i3 = this.focusableComponents[e4]; i3; ) {
2864
+ var n3 = i3.parentFocusKey, r3 = this.focusableComponents[n3];
2865
+ if (r3) {
2866
+ var a3 = r3.focusKey;
2867
+ s3.push(a3);
2868
+ }
2869
+ i3 = r3;
2870
+ }
2871
+ var u3 = (0, d2.default)(this.parentsHavingFocusedChild, s3), c3 = (0, d2.default)(s3, this.parentsHavingFocusedChild);
2872
+ (0, y.default)(u3, function(e5) {
2873
+ var s4 = o3.focusableComponents[e5];
2874
+ s4 && s4.trackChildren && s4.onUpdateHasFocusedChild(false), o3.onIntermediateNodeBecameBlurred(e5, t3);
2875
+ }), (0, y.default)(c3, function(e5) {
2876
+ var s4 = o3.focusableComponents[e5];
2877
+ s4 && s4.trackChildren && s4.onUpdateHasFocusedChild(true), o3.onIntermediateNodeBecameFocused(e5, t3);
2878
+ }), this.parentsHavingFocusedChild = s3;
2879
+ }, e3.prototype.updateParentsLastFocusedChild = function(e4) {
2880
+ for (var t3 = this.focusableComponents[e4]; t3; ) {
2881
+ var o3 = t3.parentFocusKey, s3 = this.focusableComponents[o3];
2882
+ s3 && this.saveLastFocusedChildKey(s3, t3.focusKey), t3 = s3;
2883
+ }
2884
+ }, e3.prototype.getKeyMap = function() {
2885
+ return this.keyMap;
2886
+ }, e3.prototype.setKeyMap = function(e4) {
2887
+ this.keyMap = i2(i2({}, this.getKeyMap()), function(e5) {
2888
+ var t3 = {};
2889
+ return Object.entries(e5).forEach(function(e6) {
2890
+ var o3 = e6[0], s3 = e6[1];
2891
+ t3[o3] = Array.isArray(s3) ? s3 : [s3];
2892
+ }), t3;
2893
+ }(e4));
2894
+ }, e3.prototype.isFocusableComponent = function(e4) {
2895
+ return !!this.focusableComponents[e4];
2896
+ }, e3.prototype.isParticipatingFocusableComponent = function(e4) {
2897
+ return this.isFocusableComponent(e4) && this.focusableComponents[e4].focusable;
2898
+ }, e3.prototype.onIntermediateNodeBecameFocused = function(e4, t3) {
2899
+ this.isParticipatingFocusableComponent(e4) && this.focusableComponents[e4].onFocus(this.getNodeLayoutByFocusKey(e4), t3);
2900
+ }, e3.prototype.onIntermediateNodeBecameBlurred = function(e4, t3) {
2901
+ this.isParticipatingFocusableComponent(e4) && this.focusableComponents[e4].onBlur(this.getNodeLayoutByFocusKey(e4), t3);
2902
+ }, e3.prototype.pause = function() {
2903
+ this.paused = true;
2904
+ }, e3.prototype.resume = function() {
2905
+ this.paused = false;
2906
+ }, e3.prototype.setFocus = function(e4, o3) {
2907
+ if (void 0 === o3 && (o3 = {}), this.setFocusDebounced.cancel(), this.enabled) {
2908
+ this.log("setFocus", "focusKey", e4), e4 && e4 !== t2.ROOT_FOCUS_KEY || (e4 = this.getForcedFocusKey());
2909
+ var s3 = this.getNextFocusKey(e4);
2910
+ this.log("setFocus", "newFocusKey", s3), this.setCurrentFocusedKey(s3, o3), this.updateParentsHasFocusedChild(s3, o3), this.updateParentsLastFocusedChild(s3);
2911
+ }
2912
+ }, e3.prototype.updateAllLayouts = function() {
2913
+ var e4 = this;
2914
+ this.enabled && !this.nativeMode && (0, v.default)(this.focusableComponents, function(t3, o3) {
2915
+ e4.updateLayout(o3);
2916
+ });
2917
+ }, e3.prototype.updateLayout = function(e4) {
2918
+ var t3 = this.focusableComponents[e4];
2919
+ if (t3 && !this.nativeMode && !t3.layoutUpdated) {
2920
+ var o3 = t3.node, s3 = this.useGetBoundingClientRect ? (0, m.getBoundingClientRect)(o3) : (0, m.default)(o3);
2921
+ t3.layout = i2(i2({}, s3), { node: o3 });
2922
+ }
2923
+ }, e3.prototype.updateFocusable = function(e4, t3) {
2924
+ var o3 = t3.node, s3 = t3.preferredChildFocusKey, i3 = t3.focusable, n3 = t3.isFocusBoundary, r3 = t3.focusBoundaryDirections, a3 = t3.onEnterPress, u3 = t3.onEnterRelease, c3 = t3.onArrowPress, l3 = t3.onFocus, d3 = t3.onBlur;
2925
+ if (!this.nativeMode) {
2926
+ var h3 = this.focusableComponents[e4];
2927
+ h3 && (h3.preferredChildFocusKey = s3, h3.focusable = i3, h3.isFocusBoundary = n3, h3.focusBoundaryDirections = r3, h3.onEnterPress = a3, h3.onEnterRelease = u3, h3.onArrowPress = c3, h3.onFocus = l3, h3.onBlur = d3, o3 && (h3.node = o3));
2928
+ }
2929
+ }, e3.prototype.isNativeMode = function() {
2930
+ return this.nativeMode;
2931
+ }, e3.prototype.doesFocusableExist = function(e4) {
2932
+ return !!this.focusableComponents[e4];
2933
+ }, e3.prototype.updateRtl = function(e4) {
2934
+ this.writingDirection = e4 ? C.default.RTL : C.default.LTR;
2935
+ }, e3;
2936
+ }();
2937
+ t2.SpatialNavigation = new N(), t2.init = t2.SpatialNavigation.init, t2.setThrottle = t2.SpatialNavigation.setThrottle, t2.destroy = t2.SpatialNavigation.destroy, t2.setKeyMap = t2.SpatialNavigation.setKeyMap, t2.setFocus = t2.SpatialNavigation.setFocus, t2.navigateByDirection = t2.SpatialNavigation.navigateByDirection, t2.pause = t2.SpatialNavigation.pause, t2.resume = t2.SpatialNavigation.resume, t2.updateAllLayouts = t2.SpatialNavigation.updateAllLayouts, t2.getCurrentFocusKey = t2.SpatialNavigation.getCurrentFocusKey, t2.doesFocusableExist = t2.SpatialNavigation.doesFocusableExist, t2.updateRtl = t2.SpatialNavigation.updateRtl;
2938
+ }, 35: function(e2, t2, o2) {
2939
+ var s2 = this && this.__importDefault || function(e3) {
2940
+ return e3 && e3.__esModule ? e3 : { default: e3 };
2941
+ };
2942
+ Object.defineProperty(t2, "__esModule", { value: true });
2943
+ var i2 = s2(o2(119)), n2 = "undefined" != typeof window && window.document, r2 = n2 ? window.innerWidth : 0, a2 = n2 ? window.innerHeight : 0, u2 = function() {
2944
+ function e3(t3) {
2945
+ n2 && (this.debugCtx = e3.createCanvas("sn-debug", "1010", t3), this.layoutsCtx = e3.createCanvas("sn-layouts", "1000", t3), this.writingDirection = t3);
2946
+ }
2947
+ return e3.createCanvas = function(e4, t3, o3) {
2948
+ var s3 = document.querySelector("#".concat(e4)) || document.createElement("canvas");
2949
+ s3.setAttribute("id", e4), s3.setAttribute("dir", o3 === i2.default.LTR ? "ltr" : "rtl");
2950
+ var n3 = s3.getContext("2d");
2951
+ return s3.style.zIndex = t3, s3.style.position = "fixed", s3.style.top = "0", s3.style.left = "0", document.body.appendChild(s3), s3.width = r2, s3.height = a2, n3;
2952
+ }, e3.prototype.clear = function() {
2953
+ n2 && this.debugCtx.clearRect(0, 0, r2, a2);
2954
+ }, e3.prototype.clearLayouts = function() {
2955
+ n2 && this.layoutsCtx.clearRect(0, 0, r2, a2);
2956
+ }, e3.prototype.drawLayout = function(e4, t3, o3) {
2957
+ if (n2) {
2958
+ this.layoutsCtx.strokeStyle = "green", this.layoutsCtx.strokeRect(e4.left, e4.top, e4.width, e4.height), this.layoutsCtx.font = "8px monospace", this.layoutsCtx.fillStyle = "red";
2959
+ var s3 = this.writingDirection === i2.default.LTR ? "left" : "right", r3 = e4[s3];
2960
+ this.layoutsCtx.fillText(t3, r3, e4.top + 10), this.layoutsCtx.fillText(o3, r3, e4.top + 25), this.layoutsCtx.fillText("".concat(s3, ": ").concat(r3), r3, e4.top + 40), this.layoutsCtx.fillText("top: ".concat(e4.top), r3, e4.top + 55);
2961
+ }
2962
+ }, e3.prototype.drawPoint = function(e4, t3, o3, s3) {
2963
+ void 0 === o3 && (o3 = "blue"), void 0 === s3 && (s3 = 10), n2 && (this.debugCtx.strokeStyle = o3, this.debugCtx.lineWidth = 3, this.debugCtx.strokeRect(e4 - s3 / 2, t3 - s3 / 2, s3, s3));
2964
+ }, e3;
2965
+ }();
2966
+ t2.default = u2;
2967
+ }, 119: function(e2, t2) {
2968
+ var o2;
2969
+ Object.defineProperty(t2, "__esModule", { value: true }), function(e3) {
2970
+ e3[e3.LTR = 0] = "LTR", e3[e3.RTL = 1] = "RTL";
2971
+ }(o2 || (o2 = {})), t2.default = o2;
2972
+ }, 607: function(e2, t2, o2) {
2973
+ var s2 = this && this.__createBinding || (Object.create ? function(e3, t3, o3, s3) {
2974
+ void 0 === s3 && (s3 = o3);
2975
+ var i3 = Object.getOwnPropertyDescriptor(t3, o3);
2976
+ i3 && !("get" in i3 ? !t3.__esModule : i3.writable || i3.configurable) || (i3 = { enumerable: true, get: function() {
2977
+ return t3[o3];
2978
+ } }), Object.defineProperty(e3, s3, i3);
2979
+ } : function(e3, t3, o3, s3) {
2980
+ void 0 === s3 && (s3 = o3), e3[s3] = t3[o3];
2981
+ }), i2 = this && this.__exportStar || function(e3, t3) {
2982
+ for (var o3 in e3) "default" === o3 || Object.prototype.hasOwnProperty.call(t3, o3) || s2(t3, e3, o3);
2983
+ };
2984
+ Object.defineProperty(t2, "__esModule", { value: true }), i2(o2(79), t2), i2(o2(445), t2), i2(o2(654), t2);
2985
+ }, 964: function(e2, t2) {
2986
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.getBoundingClientRect = void 0;
2987
+ var o2 = function(e3) {
2988
+ for (var t3 = e3.offsetParent, o3 = e3.offsetHeight, s2 = e3.offsetWidth, i2 = e3.offsetLeft, n2 = e3.offsetTop; t3 && 1 === t3.nodeType; ) i2 += t3.offsetLeft - t3.scrollLeft, n2 += t3.offsetTop - t3.scrollTop, t3 = t3.offsetParent;
2989
+ return { height: o3, left: i2, top: n2, width: s2 };
2990
+ };
2991
+ t2.default = function(e3) {
2992
+ var t3 = e3 && e3.parentElement;
2993
+ if (e3 && t3) {
2994
+ var s2 = o2(t3), i2 = o2(e3), n2 = i2.height, r2 = i2.left, a2 = i2.top, u2 = i2.width;
2995
+ return { x: r2 - s2.left, y: a2 - s2.top, width: u2, height: n2, left: r2, top: a2, get right() {
2996
+ return this.left + this.width;
2997
+ }, get bottom() {
2998
+ return this.top + this.height;
2999
+ } };
3000
+ }
3001
+ return { x: 0, y: 0, width: 0, height: 0, left: 0, top: 0, right: 0, bottom: 0 };
3002
+ }, t2.getBoundingClientRect = function(e3) {
3003
+ if (e3 && e3.getBoundingClientRect) {
3004
+ var t3 = e3.getBoundingClientRect();
3005
+ return { x: t3.x, y: t3.y, width: t3.width, height: t3.height, left: t3.left, top: t3.top, get right() {
3006
+ return this.left + this.width;
3007
+ }, get bottom() {
3008
+ return this.top + this.height;
3009
+ } };
3010
+ }
3011
+ return { x: 0, y: 0, width: 0, height: 0, left: 0, top: 0, right: 0, bottom: 0 };
3012
+ };
3013
+ }, 445: function(e2, t2, o2) {
3014
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.useFocusContext = t2.FocusContext = void 0;
3015
+ var s2 = o2(156), i2 = o2(654);
3016
+ t2.FocusContext = (0, s2.createContext)(i2.ROOT_FOCUS_KEY), t2.FocusContext.displayName = "FocusContext", t2.useFocusContext = function() {
3017
+ return (0, s2.useContext)(t2.FocusContext);
3018
+ };
3019
+ }, 79: function(e2, t2, o2) {
3020
+ var s2 = this && this.__importDefault || function(e3) {
3021
+ return e3 && e3.__esModule ? e3 : { default: e3 };
3022
+ };
3023
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.useFocusable = void 0;
3024
+ var i2 = o2(156), n2 = s2(o2(604)), r2 = s2(o2(461)), a2 = o2(654), u2 = o2(445);
3025
+ t2.useFocusable = function(e3) {
3026
+ var t3 = void 0 === e3 ? {} : e3, o3 = t3.focusable, s3 = void 0 === o3 || o3, c2 = t3.saveLastFocusedChild, l2 = void 0 === c2 || c2, d2 = t3.trackChildren, h2 = void 0 !== d2 && d2, f2 = t3.autoRestoreFocus, p = void 0 === f2 || f2, y = t3.forceFocus, v = void 0 !== y && y, g = t3.isFocusBoundary, b = void 0 !== g && g, F = t3.focusBoundaryDirections, C = t3.focusKey, m = t3.preferredChildFocusKey, K = t3.onEnterPress, w = void 0 === K ? n2.default : K, x = t3.onEnterRelease, E = void 0 === x ? n2.default : x, D = t3.onArrowPress, L = void 0 === D ? function() {
3027
+ return true;
3028
+ } : D, M = t3.onArrowRelease, R = void 0 === M ? n2.default : M, N = t3.onFocus, P = void 0 === N ? n2.default : N, B = t3.onBlur, _ = void 0 === B ? n2.default : B, A = t3.extraProps, O = (0, i2.useCallback)(function(e4) {
3029
+ w(A, e4);
3030
+ }, [w, A]), k = (0, i2.useCallback)(function() {
3031
+ E(A);
3032
+ }, [E, A]), T = (0, i2.useCallback)(function(e4, t4) {
3033
+ return L(e4, A, t4);
3034
+ }, [A, L]), S = (0, i2.useCallback)(function(e4) {
3035
+ R(e4, A);
3036
+ }, [R, A]), q = (0, i2.useCallback)(function(e4, t4) {
3037
+ P(e4, A, t4);
3038
+ }, [A, P]), U = (0, i2.useCallback)(function(e4, t4) {
3039
+ _(e4, A, t4);
3040
+ }, [A, _]), j = (0, i2.useRef)(null), H = (0, i2.useState)(false), I = H[0], Y = H[1], G = (0, i2.useState)(false), W = G[0], z = G[1], J = (0, u2.useFocusContext)(), Q = (0, i2.useMemo)(function() {
3041
+ return C || (0, r2.default)("sn:focusable-item-");
3042
+ }, [C]), V = (0, i2.useCallback)(function(e4) {
3043
+ void 0 === e4 && (e4 = {}), a2.SpatialNavigation.setFocus(Q, e4);
3044
+ }, [Q]);
3045
+ return (0, i2.useEffect)(function() {
3046
+ var e4 = j.current;
3047
+ return a2.SpatialNavigation.addFocusable({ focusKey: Q, node: e4, parentFocusKey: J, preferredChildFocusKey: m, onEnterPress: O, onEnterRelease: k, onArrowPress: T, onArrowRelease: S, onFocus: q, onBlur: U, onUpdateFocus: function(e5) {
3048
+ return void 0 === e5 && (e5 = false), Y(e5);
3049
+ }, onUpdateHasFocusedChild: function(e5) {
3050
+ return void 0 === e5 && (e5 = false), z(e5);
3051
+ }, saveLastFocusedChild: l2, trackChildren: h2, isFocusBoundary: b, focusBoundaryDirections: F, autoRestoreFocus: p, forceFocus: v, focusable: s3 }), function() {
3052
+ a2.SpatialNavigation.removeFocusable({ focusKey: Q });
3053
+ };
3054
+ }, []), (0, i2.useEffect)(function() {
3055
+ var e4 = j.current;
3056
+ a2.SpatialNavigation.updateFocusable(Q, { node: e4, preferredChildFocusKey: m, focusable: s3, isFocusBoundary: b, focusBoundaryDirections: F, onEnterPress: O, onEnterRelease: k, onArrowPress: T, onArrowRelease: S, onFocus: q, onBlur: U });
3057
+ }, [Q, m, s3, b, F, O, k, T, S, q, U]), { ref: j, focusSelf: V, focused: I, hasFocusedChild: W, focusKey: Q };
3058
+ };
3059
+ }, 150: function(t2) {
3060
+ t2.exports = e;
3061
+ }, 117: function(e2) {
3062
+ e2.exports = t;
3063
+ }, 747: function(e2) {
3064
+ e2.exports = o;
3065
+ }, 23: function(e2) {
3066
+ e2.exports = s;
3067
+ }, 842: function(e2) {
3068
+ e2.exports = i;
3069
+ }, 682: function(e2) {
3070
+ e2.exports = n;
3071
+ }, 784: function(e2) {
3072
+ e2.exports = r;
3073
+ }, 604: function(e2) {
3074
+ e2.exports = a;
3075
+ }, 432: function(e2) {
3076
+ e2.exports = u;
3077
+ }, 67: function(e2) {
3078
+ e2.exports = c;
3079
+ }, 461: function(e2) {
3080
+ e2.exports = l;
3081
+ }, 156: function(e2) {
3082
+ e2.exports = d;
3083
+ } }, f = {};
3084
+ return function e2(t2) {
3085
+ var o2 = f[t2];
3086
+ if (void 0 !== o2) return o2.exports;
3087
+ var s2 = f[t2] = { exports: {} };
3088
+ return h[t2].call(s2.exports, s2, s2.exports, e2), s2.exports;
3089
+ }(607);
3090
+ }();
3091
+ });
3092
+ })(dist);
3093
+ var distExports = dist.exports;
175
3094
  export {
176
- k as D,
177
- le as I,
178
- K as a,
179
- re as b,
180
- ae as e,
181
- ne as o,
182
- oe as s
3095
+ getAugmentedNamespace as a,
3096
+ commonjsGlobal as c,
3097
+ distExports as d,
3098
+ getDefaultExportFromCjs as g
183
3099
  };