@picked/client 0.0.1-dev.1772412203098 → 0.0.1-dev.1773363643396
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-C7ddxkUx.cjs +1 -0
- package/dist/api-CQ_YBH_c.js +32 -0
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/plugins/create-experience/index.js +1 -1
- package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
- package/dist/cjs/plugins/experience-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/history-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/responses-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/responses-indexeddb/index.js +1 -1
- package/dist/cjs/plugins/single-page-app/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/esm/index.js +602 -687
- package/dist/esm/plugins/create-experience/index.js +237 -213
- package/dist/esm/plugins/dynamic-experiences/index.js +65 -43
- package/dist/esm/plugins/experience-browser-storage/index.js +1 -1
- package/dist/esm/plugins/history-browser-storage/index.js +1 -1
- package/dist/esm/plugins/responses-browser-storage/index.js +18 -17
- package/dist/esm/plugins/responses-indexeddb/index.js +46 -51
- package/dist/esm/plugins/single-page-app/index.js +24 -24
- package/dist/esm/server/index.js +1 -1
- package/dist/experience-instance-BsXG5XJ4.cjs +1 -0
- package/dist/{experience-instance-DTyL1fNb.js → experience-instance-fvSEb72i.js} +199 -205
- package/dist/object-BbFTsGh3.cjs +1 -0
- package/dist/{object-CJssU1Pm.js → object-JwZ58NOH.js} +1 -1
- package/dist/storage-Be5xWNPC.cjs +1 -0
- package/dist/{storage-B2d81EOI.js → storage-Co_LbKr_.js} +30 -35
- package/dist/to-kebab-case-BPnCZjhB.js +6 -0
- package/dist/to-kebab-case-BsOQ8CON.cjs +1 -0
- package/dist/types/client.d.ts +13 -0
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/entities/action/action.d.ts +2 -5
- package/dist/types/entities/action/action.d.ts.map +1 -1
- package/dist/types/entities/experience/experience.d.ts +31 -17
- package/dist/types/entities/experience/experience.d.ts.map +1 -1
- package/dist/types/entities/experience-instance/experience-instance.d.ts.map +1 -1
- package/dist/types/entities/feature/feature.d.ts.map +1 -1
- package/dist/types/entities/field/field.d.ts +21 -52
- package/dist/types/entities/field/field.d.ts.map +1 -1
- package/dist/types/entities/history/history.d.ts.map +1 -1
- package/dist/types/entities/project/project.d.ts.map +1 -1
- package/dist/types/entities/response/response.d.ts +6 -6
- package/dist/types/entities/response/response.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/logic-engine.d.ts +8 -2
- package/dist/types/logic-engine.d.ts.map +1 -1
- package/dist/types/picked.d.ts +17 -23
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/create-experience.d.ts +28 -33
- package/dist/types/plugins/create-experience/create-experience.d.ts.map +1 -1
- package/dist/types/plugins/dynamic-experiences/index.d.ts +1 -0
- package/dist/types/plugins/dynamic-experiences/index.d.ts.map +1 -1
- package/dist/types/plugins/dynamic-experiences/plugin.d.ts +2 -2
- package/dist/types/plugins/dynamic-experiences/plugin.d.ts.map +1 -1
- package/dist/types/plugins/dynamic-experiences/types.d.ts +7 -1
- package/dist/types/plugins/dynamic-experiences/types.d.ts.map +1 -1
- package/dist/types/plugins/experience-browser-storage/plugin.d.ts +1 -2
- package/dist/types/plugins/experience-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/history-browser-storage/plugin.d.ts +1 -2
- package/dist/types/plugins/history-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts +1 -2
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/responses-indexeddb/plugin.d.ts.map +1 -1
- package/dist/types/plugins/single-page-app/plugin.d.ts +1 -1
- package/dist/types/plugins/single-page-app/plugin.d.ts.map +1 -1
- package/dist/types/utils/api.d.ts +1 -1
- package/dist/types/utils/api.d.ts.map +1 -1
- package/dist/types/utils/client-headers.d.ts +2 -0
- package/dist/types/utils/client-headers.d.ts.map +1 -0
- package/dist/types/utils/dom.d.ts +3 -0
- package/dist/types/utils/dom.d.ts.map +1 -1
- package/dist/types/utils/events.d.ts +1 -1
- package/dist/types/utils/events.d.ts.map +1 -1
- package/dist/types/utils/get-step-fields.d.ts +1 -2
- package/dist/types/utils/get-step-fields.d.ts.map +1 -1
- package/dist/types/utils/global-obj.d.ts +1 -0
- package/dist/types/utils/global-obj.d.ts.map +1 -1
- package/dist/types/utils/indexed-db.d.ts +1 -2
- package/dist/types/utils/indexed-db.d.ts.map +1 -1
- package/dist/types/utils/logger.d.ts.map +1 -1
- package/dist/types/utils/node-tree/min-max-steps-to-leaf.d.ts.map +1 -1
- package/dist/types/utils/node-tree/min-max-steps-to-origin.d.ts.map +1 -1
- package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts.map +1 -1
- package/dist/types/utils/object.d.ts +8 -0
- package/dist/types/utils/object.d.ts.map +1 -1
- package/dist/types/utils/picked-config.d.ts +1 -1
- package/dist/types/utils/picked-config.d.ts.map +1 -1
- package/dist/types/utils/rules-logic.d.ts.map +1 -1
- package/dist/types/utils/search-params.d.ts.map +1 -1
- package/dist/types/utils/storage.d.ts.map +1 -1
- package/dist/types/utils/to-kebab-case.d.ts +9 -0
- package/dist/types/utils/to-kebab-case.d.ts.map +1 -0
- package/package.json +59 -8
- package/dist/api-CbXfbi_s.js +0 -19
- package/dist/api-DzSCgBQ2.cjs +0 -1
- package/dist/experience-instance-BX0aqKsC.cjs +0 -1
- package/dist/object-mwaxtjLG.cjs +0 -1
- package/dist/storage-58NoTSsc.cjs +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { createDomain as kt, createEvent as
|
|
1
|
+
import { createDomain as kt, createEvent as k, combine as D, createApi as lt, createEffect as _, attach as O, sample as m, split as bt } from "effector";
|
|
2
2
|
import { createFactory as dt, invoke as pt } from "@withease/factories";
|
|
3
3
|
import { a as vt, s as gt, j as At } from "./supports-8YT4QKI7.js";
|
|
4
4
|
import { l as I } from "./logger-C9a75KZn.js";
|
|
5
|
-
import { i as Ot } from "./object-
|
|
5
|
+
import { i as Ot } from "./object-JwZ58NOH.js";
|
|
6
6
|
function Ft(t) {
|
|
7
7
|
return typeof t == "number" && !isNaN(t);
|
|
8
8
|
}
|
|
9
9
|
function j(t) {
|
|
10
10
|
return typeof t == "string";
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function N(t) {
|
|
13
13
|
return Array.isArray(t);
|
|
14
14
|
}
|
|
15
15
|
function mt(t) {
|
|
@@ -18,7 +18,7 @@ function mt(t) {
|
|
|
18
18
|
function st(t) {
|
|
19
19
|
return typeof t == "object" && t !== null && !Array.isArray(t) && Object.keys(t).length === 1;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function g(t) {
|
|
22
22
|
if (Ft(t)) return t;
|
|
23
23
|
const e = parseFloat(`${t}`);
|
|
24
24
|
return isNaN(e) ? 0 : e;
|
|
@@ -26,39 +26,39 @@ function m(t) {
|
|
|
26
26
|
function R(t) {
|
|
27
27
|
return `${t}`;
|
|
28
28
|
}
|
|
29
|
-
const
|
|
29
|
+
const Bt = {
|
|
30
30
|
// eslint-disable-next-line eqeqeq
|
|
31
31
|
"==": (t, e) => t == e,
|
|
32
32
|
"===": (t, e) => t === e,
|
|
33
33
|
// eslint-disable-next-line eqeqeq
|
|
34
34
|
"!=": (t, e) => t != e,
|
|
35
35
|
"!==": (t, e) => t !== e,
|
|
36
|
-
">": (t, e) =>
|
|
37
|
-
">=": (t, e) =>
|
|
36
|
+
">": (t, e) => g(t) > g(e),
|
|
37
|
+
">=": (t, e) => g(t) >= g(e),
|
|
38
38
|
"<": (t, e, r) => {
|
|
39
|
-
const n =
|
|
39
|
+
const n = g(t), s = g(e);
|
|
40
40
|
if (r === void 0) return n < s;
|
|
41
|
-
const a =
|
|
41
|
+
const a = g(r);
|
|
42
42
|
return n < s && s < a;
|
|
43
43
|
},
|
|
44
44
|
"<=": (t, e, r) => {
|
|
45
|
-
const n =
|
|
45
|
+
const n = g(t), s = g(e);
|
|
46
46
|
if (r === void 0) return n <= s;
|
|
47
|
-
const a =
|
|
47
|
+
const a = g(r);
|
|
48
48
|
return n <= s && s <= a;
|
|
49
49
|
},
|
|
50
50
|
"!!": async (t) => await v(t),
|
|
51
51
|
"!": async (t) => !await v(t),
|
|
52
|
-
"%": (t, e) =>
|
|
52
|
+
"%": (t, e) => g(t) % g(e),
|
|
53
53
|
// eslint-disable-next-line sonarjs/function-return-type
|
|
54
54
|
log: (t) => (console.log(t), t),
|
|
55
|
-
in: (t, e) => e ? j(e) ? e.indexOf(R(t)) !== -1 :
|
|
55
|
+
in: (t, e) => e ? j(e) ? e.indexOf(R(t)) !== -1 : N(e) ? e.includes(t) : !1 : !1,
|
|
56
56
|
cat: (...t) => t.map(R).join(""),
|
|
57
57
|
/* eslint-disable sonarjs/deprecation */
|
|
58
58
|
substr: (t, e, r) => {
|
|
59
|
-
const n = R(t), s =
|
|
59
|
+
const n = R(t), s = g(e);
|
|
60
60
|
if (r === void 0) return n.substr(s);
|
|
61
|
-
const a =
|
|
61
|
+
const a = g(r);
|
|
62
62
|
if (a < 0) {
|
|
63
63
|
const o = n.substr(s);
|
|
64
64
|
return o.substr(0, o.length + a);
|
|
@@ -66,17 +66,16 @@ const _t = {
|
|
|
66
66
|
return n.substr(s, a);
|
|
67
67
|
},
|
|
68
68
|
/* eslint-enable sonarjs/deprecation */
|
|
69
|
-
"+": (...t) => t.reduce((e, r) =>
|
|
70
|
-
"*": (...t) => t.reduce((e, r) =>
|
|
69
|
+
"+": (...t) => t.reduce((e, r) => g(e) + g(r), 0),
|
|
70
|
+
"*": (...t) => t.reduce((e, r) => g(e) * g(r), 1),
|
|
71
71
|
"-": (t, e) => {
|
|
72
|
-
const r =
|
|
73
|
-
return e === void 0 ? -r : r -
|
|
72
|
+
const r = g(t);
|
|
73
|
+
return e === void 0 ? -r : r - g(e);
|
|
74
74
|
},
|
|
75
|
-
"/": (t, e) =>
|
|
76
|
-
min: (...t) => Math.min(...t.map(
|
|
77
|
-
max: (...t) => Math.max(...t.map(
|
|
78
|
-
merge: (...t) => t.reduce((e, r) =>
|
|
79
|
-
// eslint-disable-next-line sonarjs/cognitive-complexity -- JSONLogic var operator requires complex path traversal logic
|
|
75
|
+
"/": (t, e) => g(t) / g(e),
|
|
76
|
+
min: (...t) => Math.min(...t.map(g)),
|
|
77
|
+
max: (...t) => Math.max(...t.map(g)),
|
|
78
|
+
merge: (...t) => t.reduce((e, r) => N(r) ? e.concat(r) : e.concat([r]), []),
|
|
80
79
|
var(t, e) {
|
|
81
80
|
const r = arguments.length > 1 ? e : null;
|
|
82
81
|
if (t === "" || t === "." || t === null || t === void 0)
|
|
@@ -92,15 +91,15 @@ const _t = {
|
|
|
92
91
|
if (a == null)
|
|
93
92
|
return r;
|
|
94
93
|
if (Array.isArray(a)) {
|
|
95
|
-
const
|
|
96
|
-
isNaN(
|
|
94
|
+
const u = parseInt(o, 10);
|
|
95
|
+
isNaN(u) ? a = a[o] : a = a[u];
|
|
97
96
|
} else
|
|
98
97
|
a = a[o];
|
|
99
98
|
}
|
|
100
99
|
return a !== void 0 ? a : r;
|
|
101
100
|
},
|
|
102
101
|
async missing(...t) {
|
|
103
|
-
const e =
|
|
102
|
+
const e = N(t[0]) ? t[0] : t, r = [];
|
|
104
103
|
for (const n of e) {
|
|
105
104
|
const s = await p({ var: n }, this);
|
|
106
105
|
(s === null || s === "") && r.push(`${n}`);
|
|
@@ -109,9 +108,9 @@ const _t = {
|
|
|
109
108
|
},
|
|
110
109
|
async missing_some(t, e) {
|
|
111
110
|
const r = await p({ missing: e }, this);
|
|
112
|
-
if (!
|
|
111
|
+
if (!N(r) || !N(e)) return [];
|
|
113
112
|
const n = r.filter(j);
|
|
114
|
-
return e.filter(j).length - n.length >=
|
|
113
|
+
return e.filter(j).length - n.length >= g(t) ? [] : n;
|
|
115
114
|
},
|
|
116
115
|
/**
|
|
117
116
|
* Invoke operator - executes a function with optional arguments
|
|
@@ -131,7 +130,7 @@ const _t = {
|
|
|
131
130
|
},
|
|
132
131
|
regexp_matches(t, e) {
|
|
133
132
|
let r = t, n = "";
|
|
134
|
-
if (
|
|
133
|
+
if (N(t)) {
|
|
135
134
|
const [a, o] = t;
|
|
136
135
|
r = a, n = o;
|
|
137
136
|
}
|
|
@@ -145,12 +144,12 @@ async function p(t, e) {
|
|
|
145
144
|
if (!t) return t;
|
|
146
145
|
if (mt(t))
|
|
147
146
|
return p(await t, e);
|
|
148
|
-
if (
|
|
147
|
+
if (N(t))
|
|
149
148
|
return Promise.all(t.map((o) => p(o, e)));
|
|
150
149
|
if (!st(t)) return t;
|
|
151
|
-
const r =
|
|
150
|
+
const r = _t(t);
|
|
152
151
|
let n = r ? t[r] ?? [] : [];
|
|
153
|
-
switch (
|
|
152
|
+
switch (N(n) || (n = [n]), r) {
|
|
154
153
|
case "if":
|
|
155
154
|
case "?:":
|
|
156
155
|
for (let o = 0; o < n.length - 1; o += 2)
|
|
@@ -159,59 +158,59 @@ async function p(t, e) {
|
|
|
159
158
|
return n.length % 2 === 1 ? p(n[n.length - 1], e) : null;
|
|
160
159
|
case "and": {
|
|
161
160
|
let o = null;
|
|
162
|
-
for (const
|
|
163
|
-
if (o = await p(
|
|
161
|
+
for (const u of n)
|
|
162
|
+
if (o = await p(u, e), !await v(o))
|
|
164
163
|
return o;
|
|
165
164
|
return o;
|
|
166
165
|
}
|
|
167
166
|
case "or": {
|
|
168
167
|
let o = null;
|
|
169
|
-
for (const
|
|
170
|
-
if (o = await p(
|
|
168
|
+
for (const u of n)
|
|
169
|
+
if (o = await p(u, e), await v(o)) return o;
|
|
171
170
|
return o;
|
|
172
171
|
}
|
|
173
172
|
case "map": {
|
|
174
173
|
const o = await p(n[0], e);
|
|
175
|
-
return
|
|
174
|
+
return N(o) ? await Promise.all(o.map((u) => p(n[1], u))) : [];
|
|
176
175
|
}
|
|
177
176
|
case "filter": {
|
|
178
177
|
const o = await p(n[0], e);
|
|
179
|
-
return
|
|
178
|
+
return N(o) ? (await Promise.all(
|
|
180
179
|
o.map(async (d) => {
|
|
181
|
-
const
|
|
182
|
-
return { item: d, shouldInclude:
|
|
180
|
+
const y = await v(await p(n[1], d));
|
|
181
|
+
return { item: d, shouldInclude: y };
|
|
183
182
|
})
|
|
184
183
|
)).filter(({ shouldInclude: d }) => d).map(({ item: d }) => d) : [];
|
|
185
184
|
}
|
|
186
185
|
case "reduce": {
|
|
187
186
|
const o = await p(n[0], e);
|
|
188
|
-
if (!
|
|
187
|
+
if (!N(o))
|
|
189
188
|
return n.length > 2 ? await p(n[2], e) : null;
|
|
190
|
-
const
|
|
191
|
-
let
|
|
192
|
-
for (const
|
|
193
|
-
|
|
194
|
-
return
|
|
189
|
+
const u = n[1];
|
|
190
|
+
let y = n.length > 2 ? await p(n[2], e) : null;
|
|
191
|
+
for (const b of o)
|
|
192
|
+
y = await p(u, { current: b, accumulator: y });
|
|
193
|
+
return y;
|
|
195
194
|
}
|
|
196
195
|
case "all": {
|
|
197
196
|
const o = await p(n[0], e);
|
|
198
|
-
if (!
|
|
199
|
-
for (const
|
|
200
|
-
if (!await v(await p(n[1],
|
|
197
|
+
if (!N(o) || o.length === 0) return !1;
|
|
198
|
+
for (const u of o)
|
|
199
|
+
if (!await v(await p(n[1], u))) return !1;
|
|
201
200
|
return !0;
|
|
202
201
|
}
|
|
203
202
|
case "some": {
|
|
204
203
|
const o = await p(n[0], e);
|
|
205
|
-
if (!
|
|
206
|
-
for (const
|
|
207
|
-
if (await v(await p(n[1],
|
|
204
|
+
if (!N(o)) return !1;
|
|
205
|
+
for (const u of o)
|
|
206
|
+
if (await v(await p(n[1], u))) return !0;
|
|
208
207
|
return !1;
|
|
209
208
|
}
|
|
210
209
|
case "none": {
|
|
211
210
|
const o = await p(n[0], e);
|
|
212
|
-
if (!
|
|
213
|
-
for (const
|
|
214
|
-
if (await v(await p(n[1],
|
|
211
|
+
if (!N(o)) return !0;
|
|
212
|
+
for (const u of o)
|
|
213
|
+
if (await v(await p(n[1], u))) return !1;
|
|
215
214
|
return !0;
|
|
216
215
|
}
|
|
217
216
|
case "catch":
|
|
@@ -221,33 +220,31 @@ async function p(t, e) {
|
|
|
221
220
|
return st(o) ? await p(o, e) : n[1] ? await p(n[1], o) : o instanceof Error ? o.message : o;
|
|
222
221
|
}
|
|
223
222
|
}
|
|
224
|
-
const s = await Promise.all(n.map((o) => p(o, e))), a = r ?
|
|
223
|
+
const s = await Promise.all(n.map((o) => p(o, e))), a = r ? Bt[r] : void 0;
|
|
225
224
|
if (!a) throw new Error(`Unrecognized operation ${r}`);
|
|
226
225
|
return a.apply(e, s);
|
|
227
226
|
}
|
|
228
227
|
async function v(t) {
|
|
229
228
|
return mt(t) ? v(await t) : !(Array.isArray(t) && t.length === 0) && !!t;
|
|
230
229
|
}
|
|
231
|
-
function
|
|
230
|
+
function _t(t) {
|
|
232
231
|
return Object.keys(t)[0];
|
|
233
232
|
}
|
|
234
233
|
function $t(t) {
|
|
235
234
|
return !Ot(t);
|
|
236
235
|
}
|
|
237
236
|
async function at(t, e, r) {
|
|
238
|
-
const n = t.getStateSnapshot(), s = t.predicates.listStore.getState().reduce((
|
|
239
|
-
...
|
|
240
|
-
[
|
|
241
|
-
}), {}), a = t.features.listStore.getState().reduce((
|
|
242
|
-
...
|
|
243
|
-
[
|
|
244
|
-
const { bucket:
|
|
245
|
-
return
|
|
237
|
+
const n = t.getStateSnapshot(), s = t.predicates.listStore.getState().reduce((u, d) => ({
|
|
238
|
+
...u,
|
|
239
|
+
[d.name]: (...y) => d.predicate({ ...n, args: y })
|
|
240
|
+
}), {}), a = t.features.listStore.getState().reduce((u, d) => ({
|
|
241
|
+
...u,
|
|
242
|
+
[d.id]: async () => {
|
|
243
|
+
const { bucket: y } = await d.getBucket();
|
|
244
|
+
return y;
|
|
246
245
|
}
|
|
247
|
-
}), {}), o =
|
|
248
|
-
...
|
|
249
|
-
[g.name]: (x) => g.action(x)
|
|
250
|
-
}), {}), f = {
|
|
246
|
+
}), {}), o = {
|
|
247
|
+
...r,
|
|
251
248
|
responses: t.responses.getAllStore.getState(),
|
|
252
249
|
location: typeof n.location == "object" ? {
|
|
253
250
|
hash: n.location.hash,
|
|
@@ -261,11 +258,9 @@ async function at(t, e, r) {
|
|
|
261
258
|
search: n.location.search
|
|
262
259
|
} : void 0,
|
|
263
260
|
predicates: s,
|
|
264
|
-
features: a
|
|
265
|
-
actions: o,
|
|
266
|
-
...r
|
|
261
|
+
features: a
|
|
267
262
|
};
|
|
268
|
-
return await p(e,
|
|
263
|
+
return await p(e, o);
|
|
269
264
|
}
|
|
270
265
|
function Mt(t) {
|
|
271
266
|
return !vt() || !gt() ? [] : Array.from(window.document.querySelectorAll(t)).filter(
|
|
@@ -347,7 +342,7 @@ function jt(t, e, r) {
|
|
|
347
342
|
case "prepend":
|
|
348
343
|
t.prepend(s);
|
|
349
344
|
break;
|
|
350
|
-
|
|
345
|
+
default:
|
|
351
346
|
t.append(s);
|
|
352
347
|
break;
|
|
353
348
|
}
|
|
@@ -371,43 +366,43 @@ function ft(t) {
|
|
|
371
366
|
return t.type === "action";
|
|
372
367
|
}
|
|
373
368
|
const St = (t, e, r, n, s = /* @__PURE__ */ new Set()) => s.has(r.id) ? [] : (s.add(r.id), P(r) && !n ? [r] : e.filter((o) => o.sourceNodeId === r.id).flatMap((o) => {
|
|
374
|
-
const
|
|
375
|
-
return
|
|
369
|
+
const u = t.find((d) => d.id === o.destinationNodeId);
|
|
370
|
+
return u ? St(t, e, u, !1, s) : [];
|
|
376
371
|
})), Ut = (t, e, r) => St(t, e, r, !0, /* @__PURE__ */ new Set()), yt = (t, e, r, n, s = /* @__PURE__ */ new Set()) => {
|
|
377
372
|
if (s.has(r.id)) return [-1, -1];
|
|
378
373
|
s.add(r.id);
|
|
379
374
|
const a = e.filter((d) => d.sourceNodeId === r.id);
|
|
380
375
|
if (a.length === 0) return [0, 0];
|
|
381
|
-
let o = 1 / 0,
|
|
376
|
+
let o = 1 / 0, u = -1 / 0;
|
|
382
377
|
for (const d of a) {
|
|
383
|
-
const
|
|
384
|
-
if (!
|
|
385
|
-
const [
|
|
378
|
+
const y = t.find((M) => M.id === d.destinationNodeId);
|
|
379
|
+
if (!y) continue;
|
|
380
|
+
const [b, F] = yt(
|
|
386
381
|
t,
|
|
387
382
|
e,
|
|
388
|
-
|
|
383
|
+
y,
|
|
389
384
|
!1,
|
|
390
385
|
new Set(s)
|
|
391
386
|
);
|
|
392
|
-
|
|
387
|
+
b !== -1 && (o = Math.min(o, b + 1), u = Math.max(u, F + 1));
|
|
393
388
|
}
|
|
394
|
-
return o === 1 / 0 ? [-1, -1] : [o,
|
|
389
|
+
return o === 1 / 0 ? [-1, -1] : [o, u];
|
|
395
390
|
}, Wt = (t, e, r) => yt(t, e, r, !0, /* @__PURE__ */ new Set()), ht = (t, e, r, n = /* @__PURE__ */ new Set()) => {
|
|
396
391
|
if (n.has(r.id)) return [-1, -1];
|
|
397
392
|
if (n.add(r.id), r.type === "origin") return [0, 0];
|
|
398
|
-
const s = e.filter((
|
|
393
|
+
const s = e.filter((u) => u.destinationNodeId === r.id);
|
|
399
394
|
if (s.length === 0) return [-1, -1];
|
|
400
395
|
let a = 1 / 0, o = -1 / 0;
|
|
401
|
-
for (const
|
|
402
|
-
const d = t.find((F) => F.id ===
|
|
396
|
+
for (const u of s) {
|
|
397
|
+
const d = t.find((F) => F.id === u.sourceNodeId);
|
|
403
398
|
if (!d) continue;
|
|
404
|
-
const [
|
|
399
|
+
const [y, b] = ht(
|
|
405
400
|
t,
|
|
406
401
|
e,
|
|
407
402
|
d,
|
|
408
403
|
new Set(n)
|
|
409
404
|
);
|
|
410
|
-
|
|
405
|
+
y !== -1 && (a = Math.min(a, y + 1), o = Math.max(o, b + 1));
|
|
411
406
|
}
|
|
412
407
|
return a === 1 / 0 ? [-1, -1] : [a, o];
|
|
413
408
|
}, Gt = (t, e, r) => ht(t, e, r, /* @__PURE__ */ new Set()), wt = (t) => t.find((r) => r.type === "origin") || null, Z = (t, e, r) => {
|
|
@@ -432,44 +427,44 @@ const tt = kt("experience-instance"), Vt = dt(
|
|
|
432
427
|
target: r,
|
|
433
428
|
options: n
|
|
434
429
|
}) => {
|
|
435
|
-
const s =
|
|
430
|
+
const s = k(), a = k(), o = k(), u = k(), d = k(), y = k(), b = e.componentStore, F = tt.store("transitioning"), M = t.history.entriesStore.map((i) => i.filter((l) => l.experienceId === e.id)), U = M.map((i) => i.filter((l) => P(l.node))), c = M.map((i) => i.at(-1)?.node || null), S = D(
|
|
436
431
|
e.treeStore,
|
|
437
432
|
c,
|
|
438
|
-
({ steps: i }, l) => i.find((
|
|
439
|
-
),
|
|
433
|
+
({ steps: i }, l) => i.find((f) => l && P(l) && f.id === l.stepId) || null
|
|
434
|
+
), x = D(
|
|
440
435
|
e.treeStore,
|
|
441
436
|
U,
|
|
442
437
|
({ steps: i }, l) => {
|
|
443
|
-
const
|
|
444
|
-
if (!
|
|
438
|
+
const f = l.at(-2);
|
|
439
|
+
if (!f || !P(f.node))
|
|
445
440
|
return null;
|
|
446
|
-
const h =
|
|
447
|
-
return i.find((
|
|
441
|
+
const h = f.node;
|
|
442
|
+
return i.find((B) => B.id === h.stepId) || null;
|
|
448
443
|
}
|
|
449
444
|
), T = D(
|
|
450
445
|
e.treeStore,
|
|
451
446
|
c,
|
|
452
|
-
({ nodes: i, edges: l },
|
|
447
|
+
({ nodes: i, edges: l }, f) => f ? Ut(i, l, f) : []
|
|
453
448
|
), C = D(
|
|
454
449
|
e.treeStore,
|
|
455
450
|
c,
|
|
456
|
-
({ nodes: i, edges: l },
|
|
451
|
+
({ nodes: i, edges: l }, f) => f ? Gt(i, l, f) : [-1, -1]
|
|
457
452
|
), q = D(
|
|
458
453
|
e.treeStore,
|
|
459
454
|
c,
|
|
460
|
-
({ nodes: i, edges: l },
|
|
455
|
+
({ nodes: i, edges: l }, f) => f ? Wt(i, l, f) : [-1, -1]
|
|
461
456
|
), L = tt.store(!1), W = lt(L, {
|
|
462
457
|
open: () => !0,
|
|
463
458
|
close: () => !1,
|
|
464
459
|
toggle: (i) => !i,
|
|
465
460
|
set: (i, l) => l
|
|
466
|
-
}), xt =
|
|
461
|
+
}), xt = _(async () => {
|
|
467
462
|
t.history.back({ experienceId: e.id });
|
|
468
463
|
}), Nt = O({
|
|
469
464
|
source: e.treeStore,
|
|
470
465
|
effect: async (i, l) => {
|
|
471
|
-
const
|
|
472
|
-
|
|
466
|
+
const f = i.nodes.find((h) => P(h) && h.stepId === l);
|
|
467
|
+
f && t.history.push({ experienceId: e.id, node: f });
|
|
473
468
|
}
|
|
474
469
|
}), et = O({
|
|
475
470
|
source: c,
|
|
@@ -480,87 +475,86 @@ const tt = kt("experience-instance"), Vt = dt(
|
|
|
480
475
|
effect: async ({ nodes: i }) => wt(i)
|
|
481
476
|
}), X = O({
|
|
482
477
|
source: e.treeStore,
|
|
483
|
-
effect: async ({ nodes: i, edges: l },
|
|
484
|
-
if (Y(
|
|
485
|
-
return Z(
|
|
478
|
+
effect: async ({ nodes: i, edges: l }, f) => {
|
|
479
|
+
if (Y(f))
|
|
480
|
+
return Z(f, i, l);
|
|
486
481
|
}
|
|
487
482
|
}), J = O({
|
|
488
483
|
source: e.treeStore,
|
|
489
|
-
effect: async ({ nodes: i, edges: l, conditionals:
|
|
484
|
+
effect: async ({ nodes: i, edges: l, conditionals: f }, h) => {
|
|
490
485
|
if (!ct(h))
|
|
491
486
|
return;
|
|
492
|
-
const
|
|
493
|
-
if (!
|
|
487
|
+
const B = f.find((A) => A.id === h.conditionalId);
|
|
488
|
+
if (!B)
|
|
494
489
|
return;
|
|
495
|
-
const
|
|
496
|
-
return Kt(!!w,
|
|
490
|
+
const E = h.id, w = await at(t, B.condition);
|
|
491
|
+
return Kt(!!w, E, i, l);
|
|
497
492
|
}
|
|
498
493
|
}), nt = O({
|
|
499
494
|
source: e.treeStore,
|
|
500
|
-
effect: async ({ nodes: i, edges: l },
|
|
501
|
-
if (!ft(
|
|
495
|
+
effect: async ({ nodes: i, edges: l }, f) => {
|
|
496
|
+
if (!ft(f))
|
|
502
497
|
return;
|
|
503
|
-
const h =
|
|
498
|
+
const h = f.action;
|
|
504
499
|
if (!h) {
|
|
505
|
-
I("warn", `Action node ${
|
|
500
|
+
I("warn", `Action node ${f.id} has no action name`);
|
|
506
501
|
return;
|
|
507
502
|
}
|
|
508
|
-
const
|
|
509
|
-
if (!
|
|
503
|
+
const B = t.actions.getByName(h).getState();
|
|
504
|
+
if (!B) {
|
|
510
505
|
I("warn", `Action '${h}' not registered on client`);
|
|
511
|
-
const
|
|
512
|
-
(w) => w.sourceNodeId ===
|
|
506
|
+
const E = l.find(
|
|
507
|
+
(w) => w.sourceNodeId === f.id && w.sourceNodeHandle === "false"
|
|
513
508
|
);
|
|
514
|
-
return
|
|
509
|
+
return E ? i.find((w) => w.id === E.destinationNodeId) : null;
|
|
515
510
|
}
|
|
516
|
-
if (typeof
|
|
511
|
+
if (typeof B.action != "function") {
|
|
517
512
|
I("warn", `Action '${h}' is not a function`);
|
|
518
|
-
const
|
|
519
|
-
(w) => w.sourceNodeId ===
|
|
513
|
+
const E = l.find(
|
|
514
|
+
(w) => w.sourceNodeId === f.id && w.sourceNodeHandle === "false"
|
|
520
515
|
);
|
|
521
|
-
return
|
|
516
|
+
return E ? i.find((w) => w.id === E.destinationNodeId) : null;
|
|
522
517
|
}
|
|
523
518
|
try {
|
|
524
|
-
I("info", `Executing action: ${h}`), await
|
|
525
|
-
const
|
|
526
|
-
(A) => A.sourceNodeId ===
|
|
519
|
+
I("info", `Executing action: ${h}`), await B.action(h);
|
|
520
|
+
const E = l.find(
|
|
521
|
+
(A) => A.sourceNodeId === f.id && A.sourceNodeHandle === "true"
|
|
527
522
|
);
|
|
528
|
-
if (!
|
|
529
|
-
return I("warn", `No 'true' edge found for action node ${
|
|
530
|
-
const w = i.find((A) => A.id ===
|
|
523
|
+
if (!E)
|
|
524
|
+
return I("warn", `No 'true' edge found for action node ${f.id}`), null;
|
|
525
|
+
const w = i.find((A) => A.id === E.destinationNodeId);
|
|
531
526
|
return I("info", `Action '${h}' succeeded, moving to node ${w?.id}`), w || null;
|
|
532
|
-
} catch (
|
|
533
|
-
I("warn", `Action '${h}' failed:`,
|
|
527
|
+
} catch (E) {
|
|
528
|
+
I("warn", `Action '${h}' failed:`, E);
|
|
534
529
|
const w = l.find(
|
|
535
|
-
(G) => G.sourceNodeId ===
|
|
530
|
+
(G) => G.sourceNodeId === f.id && G.sourceNodeHandle === "false"
|
|
536
531
|
);
|
|
537
532
|
if (!w)
|
|
538
|
-
return I("warn", `No 'false' edge found for action node ${
|
|
533
|
+
return I("warn", `No 'false' edge found for action node ${f.id}`), null;
|
|
539
534
|
const A = i.find((G) => G.id === w.destinationNodeId);
|
|
540
535
|
return I("info", `Action '${h}' failed, moving to node ${A?.id}`), A || null;
|
|
541
536
|
}
|
|
542
537
|
}
|
|
543
|
-
}),
|
|
538
|
+
}), It = _((i) => {
|
|
544
539
|
ut(i) && t.experiences.launch({ id: i.experienceId });
|
|
545
540
|
}), rt = O({
|
|
546
541
|
source: [c, e.treeStore],
|
|
547
|
-
effect: async ([i, { nodes: l, edges:
|
|
542
|
+
effect: async ([i, { nodes: l, edges: f }]) => Z(i, l, f)
|
|
548
543
|
}), H = O({
|
|
549
544
|
source: [c, e.treeStore],
|
|
550
|
-
effect: async ([i, { nodes: l, edges:
|
|
551
|
-
}),
|
|
545
|
+
effect: async ([i, { nodes: l, edges: f }]) => Z(i, l, f)
|
|
546
|
+
}), Et = _((i) => {
|
|
552
547
|
t.history.push({ experienceId: e.id, node: i });
|
|
553
548
|
}), ot = O({
|
|
554
549
|
source: e.configStore,
|
|
555
550
|
effect: async ({ initializeOpenLogic: i }) => n?.initialiseOpen !== void 0 ? n.initialiseOpen : $t(i) ? !!await at(t, i) : i ?? !1
|
|
556
551
|
}), $ = Object.freeze({
|
|
557
|
-
// eslint-disable-next-line sonarjs/pseudo-random -- non-security use: generating a unique runtime ID for UI tracking
|
|
558
552
|
id: Math.random().toString(36).substring(7),
|
|
559
553
|
// config
|
|
560
554
|
experienceId: e.id,
|
|
561
555
|
configStore: e.configStore,
|
|
562
556
|
target: r,
|
|
563
|
-
componentStore:
|
|
557
|
+
componentStore: b,
|
|
564
558
|
// state
|
|
565
559
|
stateStore: F,
|
|
566
560
|
// open close
|
|
@@ -573,25 +567,25 @@ const tt = kt("experience-instance"), Vt = dt(
|
|
|
573
567
|
treeStore: e.treeStore,
|
|
574
568
|
fieldsStore: e.fieldsStore,
|
|
575
569
|
currentNodeStore: c,
|
|
576
|
-
currentStepStore:
|
|
577
|
-
previousStepStore:
|
|
570
|
+
currentStepStore: S,
|
|
571
|
+
previousStepStore: x,
|
|
578
572
|
nextReachableStepNodesStore: T,
|
|
579
573
|
stepsToOriginStore: C,
|
|
580
574
|
stepsToLeafStore: q,
|
|
581
575
|
// history
|
|
582
576
|
goToNextStep: a,
|
|
583
577
|
goToPreviousStep: o,
|
|
584
|
-
goToStepById:
|
|
578
|
+
goToStepById: u,
|
|
585
579
|
stepsHistoryStore: U
|
|
586
|
-
}), Q =
|
|
587
|
-
return
|
|
580
|
+
}), Q = k(), it = k();
|
|
581
|
+
return m({
|
|
588
582
|
source: c,
|
|
589
583
|
target: Q
|
|
590
|
-
}),
|
|
584
|
+
}), m({
|
|
591
585
|
clock: Q,
|
|
592
586
|
filter: (i) => i === null,
|
|
593
587
|
target: z
|
|
594
|
-
}),
|
|
588
|
+
}), m({
|
|
595
589
|
clock: Q,
|
|
596
590
|
filter: (i) => i !== null,
|
|
597
591
|
target: it
|
|
@@ -602,11 +596,11 @@ const tt = kt("experience-instance"), Vt = dt(
|
|
|
602
596
|
origin: X,
|
|
603
597
|
condition: J,
|
|
604
598
|
step: et,
|
|
605
|
-
launchExperience:
|
|
599
|
+
launchExperience: It,
|
|
606
600
|
action: nt,
|
|
607
|
-
__:
|
|
601
|
+
__: k()
|
|
608
602
|
}
|
|
609
|
-
}),
|
|
603
|
+
}), m({
|
|
610
604
|
clock: [
|
|
611
605
|
J.doneData,
|
|
612
606
|
X.doneData,
|
|
@@ -616,41 +610,41 @@ const tt = kt("experience-instance"), Vt = dt(
|
|
|
616
610
|
nt.doneData
|
|
617
611
|
],
|
|
618
612
|
filter: Boolean,
|
|
619
|
-
target:
|
|
620
|
-
}),
|
|
613
|
+
target: Et
|
|
614
|
+
}), m({
|
|
621
615
|
clock: a,
|
|
622
616
|
target: H
|
|
623
|
-
}),
|
|
617
|
+
}), m({
|
|
624
618
|
clock: a,
|
|
625
|
-
source:
|
|
619
|
+
source: S,
|
|
626
620
|
filter: Boolean,
|
|
627
621
|
target: t.eventBus.prepend((i) => ({
|
|
628
622
|
type: "step_submit",
|
|
629
623
|
step: i,
|
|
630
624
|
experience: $
|
|
631
625
|
}))
|
|
632
|
-
}),
|
|
626
|
+
}), m({
|
|
633
627
|
clock: H.done,
|
|
634
|
-
source:
|
|
628
|
+
source: S,
|
|
635
629
|
filter: Boolean,
|
|
636
630
|
target: t.eventBus.prepend((i) => ({
|
|
637
631
|
type: "step_submit_success",
|
|
638
632
|
step: i,
|
|
639
633
|
experience: $
|
|
640
634
|
}))
|
|
641
|
-
}),
|
|
635
|
+
}), m({
|
|
642
636
|
clock: H.fail,
|
|
643
|
-
source:
|
|
637
|
+
source: S,
|
|
644
638
|
filter: Boolean,
|
|
645
639
|
target: t.eventBus.prepend((i) => ({
|
|
646
640
|
type: "step_submit_error",
|
|
647
641
|
step: i,
|
|
648
642
|
experience: $
|
|
649
643
|
}))
|
|
650
|
-
}),
|
|
644
|
+
}), m({
|
|
651
645
|
clock: o,
|
|
652
646
|
target: xt
|
|
653
|
-
}),
|
|
647
|
+
}), m({ clock: u, target: Nt }), m({
|
|
654
648
|
source: D([
|
|
655
649
|
J.pending,
|
|
656
650
|
X.pending,
|
|
@@ -659,48 +653,48 @@ const tt = kt("experience-instance"), Vt = dt(
|
|
|
659
653
|
]),
|
|
660
654
|
fn: (i) => i.some(Boolean) ? "transitioning" : "ready",
|
|
661
655
|
target: F
|
|
662
|
-
}),
|
|
656
|
+
}), m({
|
|
663
657
|
clock: et.doneData,
|
|
664
|
-
source:
|
|
658
|
+
source: S,
|
|
665
659
|
filter: Boolean,
|
|
666
660
|
target: t.eventBus.prepend((i) => ({
|
|
667
661
|
type: "step_enter",
|
|
668
662
|
step: i,
|
|
669
663
|
experience: $
|
|
670
664
|
}))
|
|
671
|
-
}),
|
|
672
|
-
clock:
|
|
665
|
+
}), m({
|
|
666
|
+
clock: y,
|
|
673
667
|
target: ot
|
|
674
|
-
}),
|
|
668
|
+
}), m({
|
|
675
669
|
source: ot.doneData,
|
|
676
670
|
fn: Boolean,
|
|
677
671
|
target: L
|
|
678
|
-
}),
|
|
672
|
+
}), m({
|
|
679
673
|
source: c,
|
|
680
674
|
clock: s,
|
|
681
675
|
filter: (i) => i ? Y(i) : !0,
|
|
682
676
|
target: rt
|
|
683
|
-
}),
|
|
677
|
+
}), m({
|
|
684
678
|
source: L,
|
|
685
679
|
filter: Boolean,
|
|
686
680
|
target: s
|
|
687
|
-
}),
|
|
681
|
+
}), m({
|
|
688
682
|
source: L,
|
|
689
683
|
filter: Boolean,
|
|
690
684
|
target: t.eventBus.prepend(() => ({
|
|
691
685
|
type: "experience_open",
|
|
692
686
|
experience: $
|
|
693
687
|
}))
|
|
694
|
-
}),
|
|
688
|
+
}), m({
|
|
695
689
|
source: L,
|
|
696
690
|
filter: (i) => !i,
|
|
697
691
|
target: t.eventBus.prepend(() => ({
|
|
698
692
|
type: "experience_close",
|
|
699
693
|
experience: $
|
|
700
694
|
}))
|
|
701
|
-
}),
|
|
695
|
+
}), m({
|
|
702
696
|
clock: d,
|
|
703
|
-
target: [
|
|
697
|
+
target: [y]
|
|
704
698
|
}), d(), $;
|
|
705
699
|
}
|
|
706
700
|
);
|
|
@@ -708,52 +702,52 @@ function qt(t) {
|
|
|
708
702
|
return pt(Vt, t);
|
|
709
703
|
}
|
|
710
704
|
const zt = dt(({ client: t }) => {
|
|
711
|
-
const e = tt.store({}), r =
|
|
712
|
-
register(c,
|
|
713
|
-
const
|
|
714
|
-
...c[
|
|
705
|
+
const e = tt.store({}), r = k(), n = k(), s = k(), a = lt(e, {
|
|
706
|
+
register(c, S) {
|
|
707
|
+
const x = [
|
|
708
|
+
...c[S.experienceId] ?? []
|
|
715
709
|
];
|
|
716
|
-
return
|
|
710
|
+
return x.push(S), {
|
|
717
711
|
...c,
|
|
718
|
-
[
|
|
712
|
+
[S.experienceId]: x
|
|
719
713
|
};
|
|
720
714
|
},
|
|
721
|
-
unregister(c,
|
|
722
|
-
const
|
|
723
|
-
(C) => C !==
|
|
715
|
+
unregister(c, S) {
|
|
716
|
+
const x = S.experienceId, T = c[x]?.filter(
|
|
717
|
+
(C) => C !== S
|
|
724
718
|
);
|
|
725
719
|
return {
|
|
726
720
|
...c,
|
|
727
|
-
[
|
|
721
|
+
[x]: T ?? []
|
|
728
722
|
};
|
|
729
723
|
}
|
|
730
|
-
}), o =
|
|
724
|
+
}), o = _(
|
|
731
725
|
({
|
|
732
726
|
experience: c,
|
|
733
|
-
target:
|
|
734
|
-
options:
|
|
735
|
-
}) => qt({ client: t, experience: c, target:
|
|
736
|
-
),
|
|
727
|
+
target: S,
|
|
728
|
+
options: x
|
|
729
|
+
}) => qt({ client: t, experience: c, target: S, options: x })
|
|
730
|
+
), u = _((c) => {
|
|
737
731
|
a.register(c);
|
|
738
|
-
}), d =
|
|
732
|
+
}), d = _(
|
|
739
733
|
(c) => {
|
|
740
734
|
c.target && Dt(c.target, () => {
|
|
741
735
|
s(c);
|
|
742
736
|
});
|
|
743
737
|
}
|
|
744
|
-
),
|
|
738
|
+
), y = _((c) => {
|
|
745
739
|
a.unregister(c);
|
|
746
|
-
}),
|
|
747
|
-
const
|
|
748
|
-
if (!
|
|
740
|
+
}), b = _((c) => {
|
|
741
|
+
const S = c.componentStore.getState();
|
|
742
|
+
if (!S) {
|
|
749
743
|
I("warn", "No app component registered. Skipping init.");
|
|
750
744
|
return;
|
|
751
745
|
}
|
|
752
|
-
const
|
|
753
|
-
if (!
|
|
746
|
+
const x = S.frameworkStore.getState();
|
|
747
|
+
if (!x) {
|
|
754
748
|
I(
|
|
755
749
|
"error",
|
|
756
|
-
`No framework registered for component '${
|
|
750
|
+
`No framework registered for component '${S.name}'. Skipping rendering.`
|
|
757
751
|
);
|
|
758
752
|
return;
|
|
759
753
|
}
|
|
@@ -767,40 +761,40 @@ const zt = dt(({ client: t }) => {
|
|
|
767
761
|
}
|
|
768
762
|
const C = Lt(T);
|
|
769
763
|
try {
|
|
770
|
-
|
|
764
|
+
x.render(C, S.component, t, c);
|
|
771
765
|
} catch (q) {
|
|
772
766
|
I("error", q);
|
|
773
767
|
}
|
|
774
768
|
});
|
|
775
|
-
|
|
769
|
+
m({
|
|
776
770
|
clock: r,
|
|
777
771
|
target: o
|
|
778
|
-
}),
|
|
772
|
+
}), m({
|
|
779
773
|
clock: s,
|
|
780
|
-
target:
|
|
781
|
-
}),
|
|
774
|
+
target: y
|
|
775
|
+
}), m({
|
|
782
776
|
clock: o.doneData,
|
|
783
777
|
target: [
|
|
784
|
-
|
|
778
|
+
u,
|
|
785
779
|
d,
|
|
786
780
|
n
|
|
787
781
|
]
|
|
788
|
-
}),
|
|
782
|
+
}), m({
|
|
789
783
|
clock: o.doneData,
|
|
790
784
|
target: t.eventBus.prepend((c) => ({
|
|
791
785
|
type: "experience_initialize",
|
|
792
786
|
experience: c
|
|
793
787
|
}))
|
|
794
|
-
}),
|
|
788
|
+
}), m({
|
|
795
789
|
clock: n,
|
|
796
|
-
target:
|
|
790
|
+
target: b
|
|
797
791
|
});
|
|
798
|
-
function F(c,
|
|
799
|
-
r({ experience: c, target:
|
|
792
|
+
function F(c, S, x) {
|
|
793
|
+
r({ experience: c, target: S, options: x });
|
|
800
794
|
}
|
|
801
795
|
const M = e.map((c) => Object.values(c).flat());
|
|
802
796
|
function U(c) {
|
|
803
|
-
return e.map((
|
|
797
|
+
return e.map((S) => S[c] || [], { skipVoid: !1 });
|
|
804
798
|
}
|
|
805
799
|
return {
|
|
806
800
|
spawn: F,
|