@picked/client 0.0.1-dev.1767670478319 → 0.0.1-dev.1767836126674
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/cjs/index.js +2 -2
- package/dist/cjs/plugins/responses-browser-storage/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/esm/index.js +518 -582
- package/dist/esm/plugins/responses-browser-storage/index.js +22 -23
- package/dist/esm/server/index.js +1 -1
- package/dist/experience-instance-Dn8Wxj2o.cjs +1 -0
- package/dist/{experience-instance-BmL4VkmP.js → experience-instance-Du9HFg3P.js} +100 -88
- package/dist/types/entities/action/action.d.ts +3 -5
- package/dist/types/entities/action/action.d.ts.map +1 -1
- package/dist/types/entities/feature/feature.d.ts +3 -6
- package/dist/types/entities/feature/feature.d.ts.map +1 -1
- package/dist/types/entities/predicate/predicate.d.ts +8 -5
- package/dist/types/entities/predicate/predicate.d.ts.map +1 -1
- package/dist/types/entities/response/response.d.ts +1 -4
- 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.map +1 -1
- package/dist/types/picked.d.ts +7 -11
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/experience-instance-IpJwvfUH.cjs +0 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,109 +1,109 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var h = (t, e, r) =>
|
|
4
|
-
import { createDomain as
|
|
1
|
+
var J = Object.defineProperty;
|
|
2
|
+
var Q = (t, e, r) => e in t ? J(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var h = (t, e, r) => Q(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
import { createDomain as b, createApi as F, createEffect as N, attach as X, sample as x, combine as z, createEvent as D } from "effector";
|
|
5
5
|
import { createFactory as w, invoke as I } from "@withease/factories";
|
|
6
|
-
import { g as
|
|
7
|
-
import { f as
|
|
8
|
-
import { l as
|
|
9
|
-
import { c as
|
|
10
|
-
import { a as
|
|
11
|
-
import { g as
|
|
12
|
-
import { i as
|
|
13
|
-
import { s as
|
|
14
|
-
import { h as
|
|
15
|
-
const
|
|
6
|
+
import { g as H, t as Z, c as ee, i as te, e as j, a as re, b as ne, d as se } from "../experience-instance-Du9HFg3P.js";
|
|
7
|
+
import { f as Pt } from "../experience-instance-Du9HFg3P.js";
|
|
8
|
+
import { l as k } from "../logger-C9a75KZn.js";
|
|
9
|
+
import { c as A, l as O, s as C } from "../storage-BLmAhfhl.js";
|
|
10
|
+
import { a as Rt } from "../storage-BLmAhfhl.js";
|
|
11
|
+
import { g as ie } from "../id-BW-g3y32.js";
|
|
12
|
+
import { i as oe } from "../object-JwZ58NOH.js";
|
|
13
|
+
import { s as U, a as M, b as ae, c as ce, d as ue } from "../supports-BjhuLJ8z.js";
|
|
14
|
+
import { h as Bt, f as Ot, j as Ct, e as zt, g as Dt, i as Ut, k as Mt } from "../supports-BjhuLJ8z.js";
|
|
15
|
+
const q = b("experience"), de = w(
|
|
16
16
|
({ client: t, experience: e }) => {
|
|
17
|
-
const r =
|
|
18
|
-
merge(
|
|
17
|
+
const r = q.store(e), n = F(r, {
|
|
18
|
+
merge(c, g) {
|
|
19
19
|
return {
|
|
20
|
-
...
|
|
21
|
-
...
|
|
20
|
+
...c,
|
|
21
|
+
...g.experience
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
}),
|
|
25
|
-
name:
|
|
26
|
-
decisionLogic:
|
|
27
|
-
targetSelectors:
|
|
24
|
+
}), i = r.map((c) => ({
|
|
25
|
+
name: c.name,
|
|
26
|
+
decisionLogic: c.condition ?? c.decide,
|
|
27
|
+
targetSelectors: c.targets,
|
|
28
28
|
initializeOpenLogic: e.initializeOpen
|
|
29
|
-
})),
|
|
30
|
-
(
|
|
29
|
+
})), a = t.components.listStore.map(
|
|
30
|
+
(c) => c.find((g) => g.name === `experience:${e.id}`) || c.find((g) => g.name === "experience"),
|
|
31
31
|
{ skipVoid: !1 }
|
|
32
|
-
),
|
|
33
|
-
steps:
|
|
34
|
-
nodes:
|
|
35
|
-
edges:
|
|
36
|
-
conditionals:
|
|
37
|
-
})),
|
|
32
|
+
), s = r.map((c) => ({
|
|
33
|
+
steps: c.steps,
|
|
34
|
+
nodes: c.nodes,
|
|
35
|
+
edges: c.edges,
|
|
36
|
+
conditionals: c.conditionals
|
|
37
|
+
})), o = e.actions ?? [];
|
|
38
38
|
return {
|
|
39
39
|
id: e.id,
|
|
40
|
-
configStore:
|
|
41
|
-
treeStore:
|
|
42
|
-
componentStore:
|
|
43
|
-
actions:
|
|
40
|
+
configStore: i,
|
|
41
|
+
treeStore: s,
|
|
42
|
+
componentStore: a,
|
|
43
|
+
actions: o,
|
|
44
44
|
merge: n.merge
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
);
|
|
48
|
-
function
|
|
49
|
-
return I(
|
|
48
|
+
function le(t) {
|
|
49
|
+
return I(de, t);
|
|
50
50
|
}
|
|
51
|
-
const
|
|
52
|
-
const e =
|
|
53
|
-
register(
|
|
51
|
+
const pe = w(({ client: t }) => {
|
|
52
|
+
const e = q.store({}), r = F(e, {
|
|
53
|
+
register(s, o) {
|
|
54
54
|
return {
|
|
55
|
-
...
|
|
56
|
-
[
|
|
55
|
+
...s,
|
|
56
|
+
[o.id]: o
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
|
-
function n(
|
|
61
|
-
const
|
|
62
|
-
if (
|
|
63
|
-
|
|
60
|
+
function n(s) {
|
|
61
|
+
const o = e.getState()[s.id];
|
|
62
|
+
if (o) {
|
|
63
|
+
o.merge({ experience: s, strategy: "override" });
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
|
-
const
|
|
67
|
-
r.register(
|
|
66
|
+
const c = le({ client: t, experience: s });
|
|
67
|
+
r.register(c);
|
|
68
68
|
}
|
|
69
|
-
const
|
|
70
|
-
function
|
|
71
|
-
return e.map((
|
|
69
|
+
const i = e.map((s) => Object.values(s));
|
|
70
|
+
function a(s) {
|
|
71
|
+
return e.map((o) => o[s], { skipVoid: !1 });
|
|
72
72
|
}
|
|
73
73
|
return {
|
|
74
74
|
register: n,
|
|
75
|
-
getById:
|
|
76
|
-
listStore:
|
|
75
|
+
getById: a,
|
|
76
|
+
listStore: i
|
|
77
77
|
};
|
|
78
78
|
});
|
|
79
|
-
function
|
|
80
|
-
return I(
|
|
79
|
+
function fe(t) {
|
|
80
|
+
return I(pe, t);
|
|
81
81
|
}
|
|
82
|
-
const
|
|
82
|
+
const ge = (t, e) => {
|
|
83
83
|
e.register(t);
|
|
84
|
-
},
|
|
85
|
-
const { targetSelectors: r } = e.configStore.getState(), n =
|
|
84
|
+
}, K = (t, e) => {
|
|
85
|
+
const { targetSelectors: r } = e.configStore.getState(), n = H(r, e.id);
|
|
86
86
|
n.forEach(
|
|
87
|
-
({ elements:
|
|
88
|
-
),
|
|
89
|
-
t.experienceInstances.spawn(e,
|
|
87
|
+
({ elements: a }) => a.forEach((s) => Z(s, e.id))
|
|
88
|
+
), ee(n, e.id).forEach((a) => {
|
|
89
|
+
t.experienceInstances.spawn(e, a);
|
|
90
90
|
});
|
|
91
|
-
},
|
|
91
|
+
}, V = async (t) => {
|
|
92
92
|
await Promise.all(
|
|
93
93
|
t.experiences.listStore.getState().map(async (e) => {
|
|
94
|
-
await
|
|
94
|
+
await me(t, e) && K(t, e);
|
|
95
95
|
})
|
|
96
96
|
);
|
|
97
|
-
},
|
|
97
|
+
}, me = async (t, e) => {
|
|
98
98
|
const { decisionLogic: r, targetSelectors: n } = e.configStore.getState();
|
|
99
|
-
return
|
|
100
|
-
},
|
|
101
|
-
const n = e.name,
|
|
102
|
-
if (
|
|
103
|
-
const
|
|
104
|
-
r[n] = Object.freeze({ ...
|
|
99
|
+
return H(n, e.id).length < 1 || n.length === 0 ? !1 : r && te(r) ? await j(t, r) === !0 : !0;
|
|
100
|
+
}, he = (t, e, r) => {
|
|
101
|
+
const n = e.name, i = e.setup(t);
|
|
102
|
+
if (i) {
|
|
103
|
+
const a = r[n] ?? {};
|
|
104
|
+
r[n] = Object.freeze({ ...a, ...i });
|
|
105
105
|
}
|
|
106
|
-
},
|
|
106
|
+
}, ye = b("component"), Se = w(
|
|
107
107
|
({ client: t, component: e, name: r }) => {
|
|
108
108
|
const n = t.frameworks.getByName(e.frameworkName);
|
|
109
109
|
return {
|
|
@@ -113,95 +113,95 @@ const Se = (t, e) => {
|
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
115
|
);
|
|
116
|
-
function
|
|
117
|
-
return I(
|
|
116
|
+
function ke(t) {
|
|
117
|
+
return I(Se, t);
|
|
118
118
|
}
|
|
119
|
-
const
|
|
120
|
-
const e =
|
|
121
|
-
register(
|
|
119
|
+
const we = w(({ client: t }) => {
|
|
120
|
+
const e = ye.store({}), r = F(e, {
|
|
121
|
+
register(s, o) {
|
|
122
122
|
return {
|
|
123
|
-
...
|
|
124
|
-
[
|
|
123
|
+
...s,
|
|
124
|
+
[o.name]: o
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
127
|
});
|
|
128
|
-
function n(
|
|
129
|
-
e.getState()[
|
|
128
|
+
function n(s, o) {
|
|
129
|
+
e.getState()[s] && k(
|
|
130
130
|
"warn",
|
|
131
|
-
`Component '${
|
|
131
|
+
`Component '${s}' already registered. Registering again will override the previous registration.`
|
|
132
132
|
);
|
|
133
|
-
const
|
|
134
|
-
r.register(
|
|
133
|
+
const g = ke({ client: t, name: s, component: o });
|
|
134
|
+
r.register(g);
|
|
135
135
|
}
|
|
136
|
-
const
|
|
137
|
-
function
|
|
138
|
-
return e.map((
|
|
136
|
+
const i = e.map((s) => Object.values(s));
|
|
137
|
+
function a(s) {
|
|
138
|
+
return e.map((o) => o[s], { skipVoid: !1 });
|
|
139
139
|
}
|
|
140
140
|
return {
|
|
141
141
|
register: n,
|
|
142
|
-
getByName:
|
|
143
|
-
listStore:
|
|
142
|
+
getByName: a,
|
|
143
|
+
listStore: i
|
|
144
144
|
};
|
|
145
145
|
});
|
|
146
|
-
function
|
|
147
|
-
return I(
|
|
146
|
+
function Ie(t) {
|
|
147
|
+
return I(we, t);
|
|
148
148
|
}
|
|
149
|
-
const
|
|
149
|
+
const T = (t, e, r) => {
|
|
150
150
|
r.register(t, e);
|
|
151
|
-
},
|
|
152
|
-
const e =
|
|
153
|
-
register(
|
|
151
|
+
}, ve = b("framework"), be = w(({ client: t }) => {
|
|
152
|
+
const e = ve.store({}), r = F(e, {
|
|
153
|
+
register(s, o) {
|
|
154
154
|
return {
|
|
155
|
-
...
|
|
156
|
-
[
|
|
155
|
+
...s,
|
|
156
|
+
[o.name]: o.framework
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
159
|
});
|
|
160
|
-
function n(
|
|
161
|
-
e.getState()[
|
|
160
|
+
function n(s, o) {
|
|
161
|
+
e.getState()[s] && k(
|
|
162
162
|
"warn",
|
|
163
|
-
`Framework '${
|
|
164
|
-
), r.register({ name:
|
|
163
|
+
`Framework '${s}' already registered. Registering again will override the previous registration.`
|
|
164
|
+
), r.register({ name: s, framework: o });
|
|
165
165
|
}
|
|
166
|
-
const
|
|
167
|
-
function
|
|
168
|
-
return e.map((
|
|
166
|
+
const i = e.map((s) => Object.values(s));
|
|
167
|
+
function a(s) {
|
|
168
|
+
return e.map((o) => o[s], { skipVoid: !1 });
|
|
169
169
|
}
|
|
170
170
|
return {
|
|
171
171
|
register: n,
|
|
172
|
-
getByName:
|
|
173
|
-
listStore:
|
|
172
|
+
getByName: a,
|
|
173
|
+
listStore: i
|
|
174
174
|
};
|
|
175
175
|
});
|
|
176
|
-
function
|
|
177
|
-
return I(
|
|
176
|
+
function Fe(t) {
|
|
177
|
+
return I(be, t);
|
|
178
178
|
}
|
|
179
|
-
const
|
|
179
|
+
const xe = (t, e) => {
|
|
180
180
|
e.register(t.name, t);
|
|
181
|
-
},
|
|
181
|
+
}, je = 6e3, Ee = A("last_ping", "global"), Pe = (t) => `${t}/api/v1/ping`, Ae = async (t) => {
|
|
182
182
|
try {
|
|
183
|
-
const e = Date.now(), r =
|
|
183
|
+
const e = Date.now(), r = O.get(Ee);
|
|
184
184
|
let n = 0;
|
|
185
|
-
if (r.isSet() && (n = r.json() ?? 0), n && e - n <
|
|
185
|
+
if (r.isSet() && (n = r.json() ?? 0), n && e - n < je)
|
|
186
186
|
return !0;
|
|
187
|
-
const
|
|
187
|
+
const i = Pe(t.apiUrl), a = {
|
|
188
188
|
projectId: t.projectId,
|
|
189
189
|
path: window.location.pathname
|
|
190
|
-
},
|
|
190
|
+
}, s = JSON.stringify(a), o = {
|
|
191
191
|
"Content-Type": "application/json"
|
|
192
|
-
},
|
|
193
|
-
|
|
194
|
-
const
|
|
192
|
+
}, c = document.getElementById("picked_script"), g = c == null ? void 0 : c.dataset.verceltoken;
|
|
193
|
+
g && (o["x-vercel-protection-bypass"] = g);
|
|
194
|
+
const l = (await fetch(i, {
|
|
195
195
|
method: "POST",
|
|
196
|
-
headers:
|
|
197
|
-
body:
|
|
196
|
+
headers: o,
|
|
197
|
+
body: s
|
|
198
198
|
})).ok;
|
|
199
|
-
return
|
|
199
|
+
return l && r.set(e), l;
|
|
200
200
|
} catch (e) {
|
|
201
|
-
return
|
|
201
|
+
return k("error", e), !1;
|
|
202
202
|
}
|
|
203
203
|
};
|
|
204
|
-
function
|
|
204
|
+
function Re(t) {
|
|
205
205
|
const e = typeof window < "u", r = {
|
|
206
206
|
client: t,
|
|
207
207
|
responses: t.responses.listStore.getState(),
|
|
@@ -213,502 +213,438 @@ function J(t) {
|
|
|
213
213
|
};
|
|
214
214
|
return Object.freeze(r);
|
|
215
215
|
}
|
|
216
|
-
const
|
|
217
|
-
const e =
|
|
218
|
-
register(
|
|
216
|
+
const $e = b("predicate"), Be = w(({ client: t }) => {
|
|
217
|
+
const e = $e.store({}), r = F(e, {
|
|
218
|
+
register(s, o) {
|
|
219
219
|
return {
|
|
220
|
-
...
|
|
221
|
-
[
|
|
222
|
-
name:
|
|
223
|
-
predicate:
|
|
220
|
+
...s,
|
|
221
|
+
[o.name]: {
|
|
222
|
+
name: o.name,
|
|
223
|
+
predicate: o.predicate
|
|
224
224
|
}
|
|
225
225
|
};
|
|
226
226
|
}
|
|
227
227
|
});
|
|
228
|
-
function n(
|
|
229
|
-
e.getState()[
|
|
228
|
+
function n(s, o) {
|
|
229
|
+
e.getState()[s] && k(
|
|
230
230
|
"warn",
|
|
231
|
-
`Predicate '${
|
|
232
|
-
), r.register(Object.freeze({ name:
|
|
231
|
+
`Predicate '${s}' already registered. Registering again will override the previous registration.`
|
|
232
|
+
), r.register(Object.freeze({ name: s, predicate: o }));
|
|
233
233
|
}
|
|
234
|
-
const
|
|
235
|
-
function
|
|
236
|
-
return e.map((
|
|
237
|
-
var f;
|
|
238
|
-
return (f = a[i]) == null ? void 0 : f.predicate;
|
|
239
|
-
}, { skipVoid: !1 });
|
|
240
|
-
}
|
|
241
|
-
function o(i) {
|
|
242
|
-
const a = q(() => {
|
|
243
|
-
}, {
|
|
244
|
-
skipVoid: !1
|
|
245
|
-
}), f = $(async () => {
|
|
246
|
-
const y = d(i).getState();
|
|
247
|
-
if (!y)
|
|
248
|
-
return;
|
|
249
|
-
const k = J(t);
|
|
250
|
-
return () => y(k);
|
|
251
|
-
});
|
|
252
|
-
return F({
|
|
253
|
-
source: { responses: t.responses.listStore, fields: t.fields.listStore },
|
|
254
|
-
target: f
|
|
255
|
-
}), F({
|
|
256
|
-
clock: f.doneData,
|
|
257
|
-
filter: (y) => y !== void 0,
|
|
258
|
-
target: a
|
|
259
|
-
}), f(), a;
|
|
234
|
+
const i = e.map((s) => Object.values(s));
|
|
235
|
+
function a(s) {
|
|
236
|
+
return e.map((o) => o[s], { skipVoid: !1 });
|
|
260
237
|
}
|
|
261
238
|
return {
|
|
262
239
|
register: n,
|
|
263
|
-
getByName:
|
|
264
|
-
listStore:
|
|
265
|
-
getEvokablePredicate: o
|
|
240
|
+
getByName: a,
|
|
241
|
+
listStore: i
|
|
266
242
|
};
|
|
267
243
|
});
|
|
268
|
-
function
|
|
269
|
-
return I(
|
|
244
|
+
function Oe(t) {
|
|
245
|
+
return I(Be, t);
|
|
270
246
|
}
|
|
271
|
-
const
|
|
247
|
+
const Ce = (t, e, r) => {
|
|
272
248
|
r.register(t, e);
|
|
273
|
-
},
|
|
274
|
-
const e =
|
|
275
|
-
register(
|
|
249
|
+
}, _ = b("feature"), ze = w(({ client: t }) => {
|
|
250
|
+
const e = _.store({}), r = _.store([]), n = F(e, {
|
|
251
|
+
register(l, d) {
|
|
276
252
|
return {
|
|
277
|
-
...
|
|
278
|
-
[
|
|
253
|
+
...l,
|
|
254
|
+
[d.id]: d.feature
|
|
279
255
|
};
|
|
280
256
|
}
|
|
281
257
|
});
|
|
282
|
-
function
|
|
283
|
-
e.getState()[
|
|
258
|
+
function i(l, d) {
|
|
259
|
+
e.getState()[l] && k(
|
|
284
260
|
"warn",
|
|
285
|
-
`Feature '${
|
|
261
|
+
`Feature '${l}' already registered. Registering again will override the previous registration.`
|
|
286
262
|
);
|
|
287
263
|
const p = {
|
|
288
|
-
id:
|
|
264
|
+
id: l,
|
|
289
265
|
feature: {
|
|
290
|
-
...
|
|
291
|
-
id:
|
|
266
|
+
...d,
|
|
267
|
+
id: l
|
|
292
268
|
}
|
|
293
269
|
};
|
|
294
270
|
n.register(
|
|
295
271
|
Object.freeze({
|
|
296
|
-
id:
|
|
272
|
+
id: l,
|
|
297
273
|
feature: p
|
|
298
274
|
})
|
|
299
275
|
);
|
|
300
276
|
}
|
|
301
|
-
const
|
|
277
|
+
const a = N(
|
|
302
278
|
async ({
|
|
303
|
-
id:
|
|
304
|
-
key:
|
|
305
|
-
storage:
|
|
279
|
+
id: l,
|
|
280
|
+
key: d,
|
|
281
|
+
storage: u = "local"
|
|
306
282
|
}) => {
|
|
307
|
-
const p =
|
|
308
|
-
return
|
|
283
|
+
const p = A(`feature:${l}:${d}`, "global"), f = (u === "session" ? C : O).get(p).boolean();
|
|
284
|
+
return f === null ? null : { id: l, key: d, bucket: f, storage: u };
|
|
309
285
|
}
|
|
310
|
-
),
|
|
311
|
-
if (!
|
|
286
|
+
), s = N((l) => {
|
|
287
|
+
if (!l)
|
|
312
288
|
return null;
|
|
313
|
-
const
|
|
314
|
-
(
|
|
315
|
-
}),
|
|
289
|
+
const d = A(`feature:${l.id}:${l.key}`, "global");
|
|
290
|
+
(l.storage === "session" ? C : O).set(d, l.bucket);
|
|
291
|
+
}), o = /* @__PURE__ */ new Map(), c = X({
|
|
316
292
|
source: { allFeaturesStore: e, resolvedFeaturesStore: r },
|
|
317
|
-
effect: async ({ allFeaturesStore:
|
|
318
|
-
const
|
|
319
|
-
(
|
|
293
|
+
effect: async ({ allFeaturesStore: l, resolvedFeaturesStore: d }, { id: u, decide: p, key: m }) => {
|
|
294
|
+
const f = d.find(
|
|
295
|
+
($) => $.id === u && $.key === m
|
|
320
296
|
);
|
|
321
|
-
if (
|
|
322
|
-
return
|
|
323
|
-
const
|
|
324
|
-
if (!
|
|
325
|
-
throw new Error(`Feature with id '${
|
|
326
|
-
const
|
|
327
|
-
if (
|
|
328
|
-
const
|
|
329
|
-
return { id:
|
|
297
|
+
if (f)
|
|
298
|
+
return f;
|
|
299
|
+
const y = l[u];
|
|
300
|
+
if (!y)
|
|
301
|
+
throw new Error(`Feature with id '${u}' not found`);
|
|
302
|
+
const v = o.get(`${u}:${m}`);
|
|
303
|
+
if (v !== void 0) {
|
|
304
|
+
const $ = await v;
|
|
305
|
+
return { id: y.id, bucket: $, key: m, storage: y.feature.storage };
|
|
330
306
|
}
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
const
|
|
334
|
-
return { id:
|
|
307
|
+
const R = p();
|
|
308
|
+
o.set(`${u}:${m}`, R);
|
|
309
|
+
const E = await R;
|
|
310
|
+
return { id: y.id, bucket: E, key: m, storage: y.feature.storage };
|
|
335
311
|
}
|
|
336
312
|
});
|
|
337
|
-
|
|
313
|
+
x({
|
|
338
314
|
clock: n.register,
|
|
339
|
-
fn: (
|
|
340
|
-
const { id:
|
|
341
|
-
return { id:
|
|
315
|
+
fn: (l) => {
|
|
316
|
+
const { id: d, feature: u } = l;
|
|
317
|
+
return { id: d, key: u.feature.key, storage: u.feature.storage };
|
|
342
318
|
},
|
|
343
|
-
target:
|
|
344
|
-
}),
|
|
319
|
+
target: a
|
|
320
|
+
}), x({
|
|
345
321
|
source: e,
|
|
346
|
-
clock:
|
|
347
|
-
fn: (
|
|
348
|
-
var
|
|
349
|
-
const { id:
|
|
350
|
-
return
|
|
322
|
+
clock: c.doneData,
|
|
323
|
+
fn: (l, d) => {
|
|
324
|
+
var y;
|
|
325
|
+
const { id: u, bucket: p, storage: m } = d, f = (y = l[u]) == null ? void 0 : y.feature.key;
|
|
326
|
+
return f ? { key: f, id: u, bucket: p, storage: m } : null;
|
|
351
327
|
},
|
|
352
|
-
target:
|
|
328
|
+
target: s
|
|
353
329
|
});
|
|
354
|
-
const
|
|
330
|
+
const g = z({ allFeaturesStore: e, resolvedFeaturesStore: r }).map(
|
|
355
331
|
({
|
|
356
|
-
allFeaturesStore:
|
|
357
|
-
resolvedFeaturesStore:
|
|
358
|
-
}) => Object.values(
|
|
359
|
-
const p =
|
|
360
|
-
(
|
|
332
|
+
allFeaturesStore: l,
|
|
333
|
+
resolvedFeaturesStore: d
|
|
334
|
+
}) => Object.values(l).map((u) => {
|
|
335
|
+
const p = d.find(
|
|
336
|
+
(m) => m.id === u.id && m.key === u.feature.key
|
|
361
337
|
);
|
|
362
338
|
return p ? {
|
|
363
|
-
id:
|
|
364
|
-
name:
|
|
365
|
-
key:
|
|
366
|
-
getBucket: () => ({ id:
|
|
339
|
+
id: u.id,
|
|
340
|
+
name: u.feature.name,
|
|
341
|
+
key: u.feature.key,
|
|
342
|
+
getBucket: () => ({ id: u.id, bucket: p.bucket }),
|
|
367
343
|
isResolved: !0
|
|
368
344
|
} : {
|
|
369
|
-
id:
|
|
370
|
-
name:
|
|
371
|
-
key:
|
|
372
|
-
getBucket: async () => await
|
|
345
|
+
id: u.id,
|
|
346
|
+
name: u.feature.name,
|
|
347
|
+
key: u.feature.key,
|
|
348
|
+
getBucket: async () => await c(u.feature),
|
|
373
349
|
isResolved: !1
|
|
374
350
|
};
|
|
375
351
|
})
|
|
376
352
|
);
|
|
377
|
-
|
|
378
|
-
clock:
|
|
353
|
+
x({
|
|
354
|
+
clock: c.doneData,
|
|
379
355
|
source: { resolvedFeatures: r },
|
|
380
|
-
filter: ({ resolvedFeatures:
|
|
381
|
-
(
|
|
356
|
+
filter: ({ resolvedFeatures: l }, { id: d, key: u }) => !l.some(
|
|
357
|
+
(m) => m.id === d && m.key === u
|
|
382
358
|
),
|
|
383
|
-
fn: (
|
|
384
|
-
target: t.eventBus.prepend((
|
|
359
|
+
fn: (l, d) => d,
|
|
360
|
+
target: t.eventBus.prepend((l) => ({
|
|
385
361
|
type: "feature_decide",
|
|
386
|
-
feature:
|
|
362
|
+
feature: l
|
|
387
363
|
}))
|
|
388
|
-
}),
|
|
389
|
-
clock: [
|
|
364
|
+
}), x({
|
|
365
|
+
clock: [a.doneData, c.doneData],
|
|
390
366
|
source: r,
|
|
391
|
-
fn: (
|
|
392
|
-
(p) => p.id ===
|
|
393
|
-
) ?
|
|
367
|
+
fn: (l, d) => !d || l.some(
|
|
368
|
+
(p) => p.id === d.id && p.key === d.key
|
|
369
|
+
) ? l : [...l, d],
|
|
394
370
|
target: r
|
|
395
371
|
});
|
|
396
|
-
function
|
|
397
|
-
return
|
|
398
|
-
}
|
|
399
|
-
function k(c) {
|
|
400
|
-
return e.map((u) => u[c], { skipVoid: !1 });
|
|
401
|
-
}
|
|
402
|
-
function m(c) {
|
|
403
|
-
const u = q(
|
|
404
|
-
async () => {
|
|
405
|
-
},
|
|
406
|
-
{ skipVoid: !1 }
|
|
407
|
-
), l = $(async () => {
|
|
408
|
-
const p = y(c).getState();
|
|
409
|
-
if (p)
|
|
410
|
-
return async () => (await p.getBucket()).bucket;
|
|
411
|
-
});
|
|
412
|
-
return F({
|
|
413
|
-
source: r,
|
|
414
|
-
filter: (p) => p.some((g) => g.id === c),
|
|
415
|
-
target: l
|
|
416
|
-
}), F({
|
|
417
|
-
clock: l.doneData,
|
|
418
|
-
filter: (p) => p !== void 0,
|
|
419
|
-
target: u
|
|
420
|
-
}), l(), u;
|
|
372
|
+
function S(l) {
|
|
373
|
+
return e.map((d) => d[l], { skipVoid: !1 });
|
|
421
374
|
}
|
|
422
375
|
return {
|
|
423
|
-
register:
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
listStore: f,
|
|
427
|
-
getEvokableFeature: m
|
|
376
|
+
register: i,
|
|
377
|
+
getByName: S,
|
|
378
|
+
listStore: g
|
|
428
379
|
};
|
|
429
380
|
});
|
|
430
|
-
function
|
|
431
|
-
return I(
|
|
381
|
+
function De(t) {
|
|
382
|
+
return I(ze, t);
|
|
432
383
|
}
|
|
433
|
-
const
|
|
384
|
+
const Ue = (t, e, r) => {
|
|
434
385
|
r.register(t, e);
|
|
435
|
-
},
|
|
436
|
-
function
|
|
386
|
+
}, P = b("history");
|
|
387
|
+
function L(t, e) {
|
|
437
388
|
return {
|
|
438
389
|
// eslint-disable-next-line sonarjs/pseudo-random
|
|
439
|
-
id:
|
|
390
|
+
id: ie(`history-entry-${Date.now()}-${Math.random()}}`),
|
|
440
391
|
node: e,
|
|
441
392
|
at: Date.now(),
|
|
442
393
|
experienceId: t
|
|
443
394
|
};
|
|
444
395
|
}
|
|
445
|
-
const
|
|
446
|
-
const t =
|
|
447
|
-
t.on(e, (
|
|
448
|
-
entries: [...
|
|
449
|
-
})), t.on(r, (
|
|
396
|
+
const Me = w(() => {
|
|
397
|
+
const t = P.store({ entries: [] }), e = P.event(), r = P.event(), n = P.event(), i = P.event();
|
|
398
|
+
t.on(e, (s, o) => ({
|
|
399
|
+
entries: [...s.entries, L(o.experienceId, o.node)]
|
|
400
|
+
})), t.on(r, (s, o) => ({
|
|
450
401
|
entries: [
|
|
451
|
-
...
|
|
452
|
-
|
|
402
|
+
...s.entries.slice(0, -1),
|
|
403
|
+
L(o.experienceId, o.node)
|
|
453
404
|
]
|
|
454
|
-
})), t.on(
|
|
455
|
-
function
|
|
456
|
-
const
|
|
457
|
-
for (let
|
|
458
|
-
const
|
|
459
|
-
if (!(!
|
|
460
|
-
if (
|
|
461
|
-
|
|
405
|
+
})), t.on(i, (s, o) => o);
|
|
406
|
+
function a(s, o) {
|
|
407
|
+
const c = { lastStepIndex: -1, secondLastStepIndex: -1 };
|
|
408
|
+
for (let g = s.length - 1; g >= 0; g--) {
|
|
409
|
+
const S = s[g], l = S == null ? void 0 : S.node;
|
|
410
|
+
if (!(!l || !re(l)) && !(o && (S == null ? void 0 : S.experienceId) !== o))
|
|
411
|
+
if (c.lastStepIndex === -1)
|
|
412
|
+
c.lastStepIndex = g;
|
|
462
413
|
else {
|
|
463
|
-
|
|
414
|
+
c.secondLastStepIndex = g;
|
|
464
415
|
break;
|
|
465
416
|
}
|
|
466
417
|
}
|
|
467
|
-
return
|
|
418
|
+
return c;
|
|
468
419
|
}
|
|
469
|
-
return t.on(n, (
|
|
470
|
-
const { secondLastStepIndex:
|
|
420
|
+
return t.on(n, (s, o) => {
|
|
421
|
+
const { secondLastStepIndex: c } = a(s.entries, o.experienceId), g = c !== -1 ? s.entries.slice(0, c + 1) : s.entries;
|
|
471
422
|
return {
|
|
472
|
-
...
|
|
473
|
-
entries:
|
|
423
|
+
...s,
|
|
424
|
+
entries: g
|
|
474
425
|
};
|
|
475
426
|
}), {
|
|
476
427
|
push: e,
|
|
477
428
|
replace: r,
|
|
478
429
|
back: n,
|
|
479
|
-
restore:
|
|
480
|
-
entriesStore: t.map((
|
|
430
|
+
restore: i,
|
|
431
|
+
entriesStore: t.map((s) => s.entries)
|
|
481
432
|
};
|
|
482
433
|
});
|
|
483
|
-
function
|
|
484
|
-
return I(
|
|
434
|
+
function Ne() {
|
|
435
|
+
return I(Me);
|
|
485
436
|
}
|
|
486
|
-
const
|
|
487
|
-
const t =
|
|
488
|
-
register(
|
|
437
|
+
const Ve = () => D(), Te = b("field"), _e = w(() => {
|
|
438
|
+
const t = Te.store({}), e = F(t, {
|
|
439
|
+
register(o, c) {
|
|
489
440
|
return {
|
|
490
|
-
...
|
|
491
|
-
[
|
|
441
|
+
...o,
|
|
442
|
+
[c.field.id]: c.field
|
|
492
443
|
};
|
|
493
444
|
}
|
|
494
445
|
});
|
|
495
|
-
function r(
|
|
496
|
-
e.register({ field:
|
|
446
|
+
function r(o) {
|
|
447
|
+
e.register({ field: o });
|
|
497
448
|
}
|
|
498
|
-
function n(
|
|
499
|
-
const
|
|
500
|
-
if (!
|
|
449
|
+
function n(o, c) {
|
|
450
|
+
const g = a(o).getState();
|
|
451
|
+
if (!g)
|
|
501
452
|
return;
|
|
502
|
-
const
|
|
503
|
-
...
|
|
453
|
+
const S = Object.assign({}, g, {
|
|
454
|
+
...c
|
|
504
455
|
});
|
|
505
|
-
e.register({ field: { ...
|
|
456
|
+
e.register({ field: { ...S } });
|
|
506
457
|
}
|
|
507
|
-
const
|
|
508
|
-
function
|
|
509
|
-
return t.map((
|
|
458
|
+
const i = t.map((o) => Object.values(o));
|
|
459
|
+
function a(o) {
|
|
460
|
+
return t.map((c) => c[o] || null);
|
|
510
461
|
}
|
|
511
|
-
function o
|
|
512
|
-
return t.map((
|
|
462
|
+
function s(o) {
|
|
463
|
+
return t.map((c) => Object.values(c).find((g) => g.name === o) || null);
|
|
513
464
|
}
|
|
514
465
|
return {
|
|
515
466
|
register: r,
|
|
516
467
|
update: n,
|
|
517
|
-
getById:
|
|
518
|
-
listStore:
|
|
519
|
-
getByName:
|
|
468
|
+
getById: a,
|
|
469
|
+
listStore: i,
|
|
470
|
+
getByName: s
|
|
520
471
|
};
|
|
521
472
|
});
|
|
522
|
-
function
|
|
523
|
-
return I(
|
|
473
|
+
function Le() {
|
|
474
|
+
return I(_e);
|
|
524
475
|
}
|
|
525
|
-
const
|
|
476
|
+
const Ge = (t, e) => {
|
|
526
477
|
e.register(t);
|
|
527
|
-
},
|
|
528
|
-
const t =
|
|
529
|
-
register(
|
|
478
|
+
}, He = b("action"), qe = w(() => {
|
|
479
|
+
const t = He.store({}), e = F(t, {
|
|
480
|
+
register(a, s) {
|
|
530
481
|
return {
|
|
531
|
-
...
|
|
532
|
-
[
|
|
533
|
-
name:
|
|
534
|
-
action:
|
|
482
|
+
...a,
|
|
483
|
+
[s.name]: {
|
|
484
|
+
name: s.name,
|
|
485
|
+
action: s.action
|
|
535
486
|
}
|
|
536
487
|
};
|
|
537
488
|
}
|
|
538
489
|
});
|
|
539
|
-
function r(
|
|
540
|
-
e.register({ name:
|
|
541
|
-
}
|
|
542
|
-
const n = t.map((o) => Object.values(o));
|
|
543
|
-
function s(o) {
|
|
544
|
-
return t.map((i) => i[o], { skipVoid: !1 });
|
|
490
|
+
function r(a, s) {
|
|
491
|
+
e.register({ name: a, action: s });
|
|
545
492
|
}
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
const a = i[o];
|
|
550
|
-
return a ? a.action : void 0;
|
|
551
|
-
},
|
|
552
|
-
{ skipVoid: !1 }
|
|
553
|
-
);
|
|
493
|
+
const n = t.map((a) => Object.values(a));
|
|
494
|
+
function i(a) {
|
|
495
|
+
return t.map((s) => s[a], { skipVoid: !1 });
|
|
554
496
|
}
|
|
555
497
|
return {
|
|
556
498
|
register: r,
|
|
557
|
-
getByName:
|
|
558
|
-
listStore: n
|
|
559
|
-
getEvokableAction: d
|
|
499
|
+
getByName: i,
|
|
500
|
+
listStore: n
|
|
560
501
|
};
|
|
561
502
|
});
|
|
562
|
-
function
|
|
563
|
-
return I(
|
|
503
|
+
function Ke() {
|
|
504
|
+
return I(qe);
|
|
564
505
|
}
|
|
565
|
-
const
|
|
506
|
+
const We = (t, e, r) => {
|
|
566
507
|
r.register(t, e);
|
|
567
508
|
};
|
|
568
|
-
function
|
|
509
|
+
function G(t) {
|
|
569
510
|
return typeof t > "u" || t === null || t === "" || Array.isArray(t) && !t.length;
|
|
570
511
|
}
|
|
571
|
-
const
|
|
572
|
-
const e =
|
|
573
|
-
register(
|
|
512
|
+
const Ye = b("response"), Je = w(({ client: t }) => {
|
|
513
|
+
const e = Ye.store({}), r = D(), n = D(), i = F(e, {
|
|
514
|
+
register(d, u) {
|
|
574
515
|
return {
|
|
575
|
-
...
|
|
576
|
-
[
|
|
516
|
+
...d,
|
|
517
|
+
[u.fieldId]: u.response
|
|
577
518
|
};
|
|
578
519
|
},
|
|
579
|
-
registerBatch(
|
|
520
|
+
registerBatch(d, u) {
|
|
580
521
|
return {
|
|
581
|
-
...
|
|
582
|
-
...
|
|
522
|
+
...d,
|
|
523
|
+
...u
|
|
583
524
|
};
|
|
584
525
|
},
|
|
585
|
-
clear(
|
|
586
|
-
const { [
|
|
587
|
-
return
|
|
526
|
+
clear(d, u) {
|
|
527
|
+
const { [u]: p, ...m } = d;
|
|
528
|
+
return m;
|
|
588
529
|
},
|
|
589
530
|
clearAll() {
|
|
590
531
|
return {};
|
|
591
532
|
}
|
|
592
533
|
});
|
|
593
|
-
function d
|
|
594
|
-
|
|
595
|
-
if (c === void 0)
|
|
596
|
-
throw new Error("Response is required when registering a single field");
|
|
597
|
-
s.register({ fieldId: m, response: c });
|
|
598
|
-
} else
|
|
599
|
-
s.registerBatch(m);
|
|
534
|
+
function a(d, u) {
|
|
535
|
+
i.register({ fieldId: d, response: u });
|
|
600
536
|
}
|
|
601
|
-
async function
|
|
602
|
-
const
|
|
537
|
+
async function s(d) {
|
|
538
|
+
const u = [];
|
|
603
539
|
return await Promise.allSettled(
|
|
604
|
-
Object.entries(
|
|
605
|
-
let
|
|
606
|
-
const
|
|
607
|
-
if (!
|
|
608
|
-
|
|
609
|
-
fieldId:
|
|
610
|
-
userMessage: `Field '${
|
|
611
|
-
systemMessage: `No field with ID '${
|
|
612
|
-
value:
|
|
540
|
+
Object.entries(d).map(async ([p, m]) => {
|
|
541
|
+
let f = m;
|
|
542
|
+
const y = t.fields.getById(p).getState();
|
|
543
|
+
if (!y) {
|
|
544
|
+
u.push({
|
|
545
|
+
fieldId: p,
|
|
546
|
+
userMessage: `Field '${p}' not found`,
|
|
547
|
+
systemMessage: `No field with ID '${p}' exists. Available field IDs are: ${Object.keys(t.fields.listStore.getState()).join(",")}.`,
|
|
548
|
+
value: f
|
|
613
549
|
});
|
|
614
550
|
return;
|
|
615
551
|
}
|
|
616
|
-
if (
|
|
617
|
-
const
|
|
618
|
-
$input:
|
|
552
|
+
if (y.multiple && (typeof f == "string" || typeof f == "number" || typeof f == "boolean") && (f = [f]), y.validation && !oe(y.validation) && !G(f)) {
|
|
553
|
+
const v = await j(t, y.validation, {
|
|
554
|
+
$input: f
|
|
619
555
|
});
|
|
620
|
-
if (typeof
|
|
621
|
-
|
|
622
|
-
fieldId:
|
|
623
|
-
userMessage:
|
|
624
|
-
systemMessage: `Field validation resulted in an error: ${
|
|
625
|
-
value:
|
|
556
|
+
if (typeof v == "string") {
|
|
557
|
+
u.push({
|
|
558
|
+
fieldId: p,
|
|
559
|
+
userMessage: v,
|
|
560
|
+
systemMessage: `Field validation resulted in an error: ${v}.`,
|
|
561
|
+
value: f
|
|
626
562
|
});
|
|
627
563
|
return;
|
|
628
564
|
}
|
|
629
|
-
if (
|
|
630
|
-
|
|
631
|
-
fieldId:
|
|
565
|
+
if (v === !1) {
|
|
566
|
+
u.push({
|
|
567
|
+
fieldId: p,
|
|
632
568
|
userMessage: "This field is invalid",
|
|
633
569
|
systemMessage: "Field validation resulted in an unspecified error.",
|
|
634
|
-
value:
|
|
570
|
+
value: f
|
|
635
571
|
});
|
|
636
572
|
return;
|
|
637
573
|
}
|
|
638
574
|
}
|
|
639
|
-
if (
|
|
640
|
-
|
|
641
|
-
fieldId:
|
|
575
|
+
if (y.required && G(f)) {
|
|
576
|
+
u.push({
|
|
577
|
+
fieldId: p,
|
|
642
578
|
userMessage: "This field is required",
|
|
643
579
|
systemMessage: "Field is required.",
|
|
644
|
-
value:
|
|
580
|
+
value: f
|
|
645
581
|
});
|
|
646
582
|
return;
|
|
647
583
|
}
|
|
648
|
-
if (!
|
|
649
|
-
|
|
650
|
-
fieldId:
|
|
584
|
+
if (!y.multiple && Array.isArray(f) && f.length > 1) {
|
|
585
|
+
u.push({
|
|
586
|
+
fieldId: p,
|
|
651
587
|
userMessage: "This field expects a single response",
|
|
652
588
|
systemMessage: "Field expects a single response.",
|
|
653
|
-
value:
|
|
589
|
+
value: f
|
|
654
590
|
});
|
|
655
591
|
return;
|
|
656
592
|
}
|
|
657
|
-
if (
|
|
658
|
-
const
|
|
659
|
-
Array.isArray(
|
|
660
|
-
fieldId:
|
|
593
|
+
if (y.options) {
|
|
594
|
+
const v = y.options.map((E) => E.value), R = Array.isArray(f) ? f : [f];
|
|
595
|
+
Array.isArray(f) && (R.every((E) => v.includes(E)) || u.push({
|
|
596
|
+
fieldId: p,
|
|
661
597
|
userMessage: "This field expects a valid option",
|
|
662
|
-
systemMessage: `Field expects a valid option. Valid options are: ${
|
|
663
|
-
value:
|
|
598
|
+
systemMessage: `Field expects a valid option. Valid options are: ${v.join(", ")}`,
|
|
599
|
+
value: f
|
|
664
600
|
}));
|
|
665
601
|
}
|
|
666
602
|
})
|
|
667
|
-
), { responsesToCommit:
|
|
603
|
+
), { responsesToCommit: d, validationErrors: u };
|
|
668
604
|
}
|
|
669
|
-
async function
|
|
670
|
-
const { responsesToCommit:
|
|
671
|
-
return
|
|
605
|
+
async function o(d) {
|
|
606
|
+
const { responsesToCommit: u, validationErrors: p } = await s(d);
|
|
607
|
+
return p.length ? { errors: p } : (i.registerBatch(u), { errors: [] });
|
|
672
608
|
}
|
|
673
|
-
const
|
|
674
|
-
fieldId:
|
|
675
|
-
value:
|
|
609
|
+
const c = e.map((d) => d), g = e.map((d) => Object.keys(d).map((p) => ({
|
|
610
|
+
fieldId: p,
|
|
611
|
+
value: d[p]
|
|
676
612
|
})));
|
|
677
|
-
function
|
|
678
|
-
const
|
|
679
|
-
return
|
|
613
|
+
function S(d) {
|
|
614
|
+
const u = t.fields.getById(d), p = e.map((m) => m[d] || null);
|
|
615
|
+
return z({ f: u, r: p }, ({ f: m, r: f }) => f || (m != null && m.defaultValue ? m.defaultValue : null));
|
|
680
616
|
}
|
|
681
|
-
function
|
|
682
|
-
const
|
|
683
|
-
return
|
|
684
|
-
const
|
|
685
|
-
return
|
|
617
|
+
function l(d) {
|
|
618
|
+
const u = t.fields.getByName(d);
|
|
619
|
+
return z({ f: u, s: e }, ({ f: p, s: m }) => {
|
|
620
|
+
const f = p && m[p.id] || null;
|
|
621
|
+
return f || (p != null && p.defaultValue ? p.defaultValue : null);
|
|
686
622
|
});
|
|
687
623
|
}
|
|
688
|
-
return
|
|
624
|
+
return x({
|
|
689
625
|
clock: r,
|
|
690
|
-
target:
|
|
691
|
-
}),
|
|
626
|
+
target: i.clearAll
|
|
627
|
+
}), x({
|
|
692
628
|
clock: n,
|
|
693
|
-
target:
|
|
629
|
+
target: i.clear
|
|
694
630
|
}), {
|
|
695
|
-
register:
|
|
631
|
+
register: a,
|
|
696
632
|
clearAll: r,
|
|
697
633
|
clear: n,
|
|
698
|
-
commit:
|
|
699
|
-
getResponsesToCommit:
|
|
700
|
-
listStore:
|
|
701
|
-
getAllStore:
|
|
702
|
-
getByFieldId:
|
|
703
|
-
getByFieldName:
|
|
634
|
+
commit: o,
|
|
635
|
+
getResponsesToCommit: s,
|
|
636
|
+
listStore: g,
|
|
637
|
+
getAllStore: c,
|
|
638
|
+
getByFieldId: S,
|
|
639
|
+
getByFieldName: l
|
|
704
640
|
};
|
|
705
641
|
});
|
|
706
|
-
function
|
|
707
|
-
return I(
|
|
642
|
+
function Qe(t) {
|
|
643
|
+
return I(Je, t);
|
|
708
644
|
}
|
|
709
|
-
const
|
|
710
|
-
function
|
|
711
|
-
if (
|
|
645
|
+
const Xe = () => "0.0.1-dev.1767836126674";
|
|
646
|
+
function Ze() {
|
|
647
|
+
if (U()) {
|
|
712
648
|
const t = [
|
|
713
649
|
document.currentScript,
|
|
714
650
|
document.getElementById("picked_script"),
|
|
@@ -722,70 +658,70 @@ function rt() {
|
|
|
722
658
|
}
|
|
723
659
|
return "https://api.picked.app";
|
|
724
660
|
}
|
|
725
|
-
function
|
|
661
|
+
function et() {
|
|
726
662
|
if (!M())
|
|
727
663
|
return {};
|
|
728
664
|
const t = new URLSearchParams(window.location.search), e = {}, r = /* @__PURE__ */ new Set();
|
|
729
|
-
for (const [
|
|
730
|
-
|
|
731
|
-
for (const
|
|
732
|
-
const
|
|
733
|
-
e[
|
|
665
|
+
for (const [i] of t.entries())
|
|
666
|
+
i.startsWith("picked-") && r.add(i);
|
|
667
|
+
for (const i of r) {
|
|
668
|
+
const a = i.replace("picked-", "");
|
|
669
|
+
e[a] = t.getAll(i);
|
|
734
670
|
}
|
|
735
|
-
const n =
|
|
671
|
+
const n = A("s");
|
|
736
672
|
if (r.size > 0)
|
|
737
|
-
|
|
673
|
+
C.set(n, e);
|
|
738
674
|
else {
|
|
739
|
-
const
|
|
740
|
-
if (
|
|
741
|
-
return
|
|
675
|
+
const i = C.get(n);
|
|
676
|
+
if (i)
|
|
677
|
+
return i.json() || {};
|
|
742
678
|
}
|
|
743
679
|
return e;
|
|
744
680
|
}
|
|
745
|
-
function
|
|
746
|
-
if (
|
|
681
|
+
function tt() {
|
|
682
|
+
if (ce())
|
|
747
683
|
return crypto.randomUUID();
|
|
748
684
|
const t = Date.now().toString(36), e = Math.random().toString(36).substring(2, 15), r = Math.random().toString(36).substring(2, 15), n = Math.random().toString(36).substring(2, 15);
|
|
749
685
|
return `${t}-${e}-${r}-${n}`;
|
|
750
686
|
}
|
|
751
|
-
const
|
|
752
|
-
const t =
|
|
687
|
+
const rt = A("session", "global"), nt = () => {
|
|
688
|
+
const t = O.get(rt);
|
|
753
689
|
let e;
|
|
754
690
|
t.isSet() && (e = t.json());
|
|
755
|
-
const r = (
|
|
756
|
-
id:
|
|
757
|
-
isUser:
|
|
758
|
-
identifiers:
|
|
691
|
+
const r = (i) => t.set({
|
|
692
|
+
id: i.id,
|
|
693
|
+
isUser: i.isUser,
|
|
694
|
+
identifiers: i.identifiers
|
|
759
695
|
}), n = {
|
|
760
|
-
id: (e == null ? void 0 : e.id) ??
|
|
696
|
+
id: (e == null ? void 0 : e.id) ?? tt(),
|
|
761
697
|
isUser: (e == null ? void 0 : e.isUser) ?? void 0,
|
|
762
698
|
identifiers: (e == null ? void 0 : e.identifiers) ?? void 0,
|
|
763
|
-
setIsUser(
|
|
764
|
-
this.isUser =
|
|
699
|
+
setIsUser(i) {
|
|
700
|
+
this.isUser = i, r(this);
|
|
765
701
|
},
|
|
766
|
-
setIdentifier(
|
|
767
|
-
this.identifiers = { ...this.identifiers, [
|
|
702
|
+
setIdentifier(i, a) {
|
|
703
|
+
this.identifiers = { ...this.identifiers, [i]: a }, r(this);
|
|
768
704
|
},
|
|
769
|
-
removeIdentifier(
|
|
705
|
+
removeIdentifier(i) {
|
|
770
706
|
this.identifiers && (this.identifiers = Object.fromEntries(
|
|
771
|
-
Object.entries(this.identifiers).filter(([
|
|
707
|
+
Object.entries(this.identifiers).filter(([a]) => a !== i)
|
|
772
708
|
), this.identifiers = Object.keys(this.identifiers).length ? this.identifiers : void 0, r(this));
|
|
773
709
|
}
|
|
774
710
|
};
|
|
775
711
|
return r(n), n;
|
|
776
|
-
},
|
|
777
|
-
function
|
|
712
|
+
}, st = () => ae() ? nt() : null;
|
|
713
|
+
function it() {
|
|
778
714
|
if (M())
|
|
779
715
|
return globalThis.window.pickedConfig;
|
|
780
716
|
}
|
|
781
|
-
function
|
|
717
|
+
function ot() {
|
|
782
718
|
if (!M())
|
|
783
719
|
return;
|
|
784
|
-
const t =
|
|
720
|
+
const t = it(), e = t == null ? void 0 : t.organizationId, r = t == null ? void 0 : t.projectId;
|
|
785
721
|
return e && r ? { organizationId: e, projectId: r } : void 0;
|
|
786
722
|
}
|
|
787
|
-
function
|
|
788
|
-
if (!
|
|
723
|
+
function at() {
|
|
724
|
+
if (!U())
|
|
789
725
|
return;
|
|
790
726
|
const t = document.getElementById("picked_script") || document.querySelector("script#picked") || // legacy support for 'cvly' script tag
|
|
791
727
|
document.getElementById("cvly");
|
|
@@ -794,16 +730,16 @@ function dt() {
|
|
|
794
730
|
const e = t.dataset.organizationid || t.getAttribute("organization-id"), r = t.dataset.projectid || t.getAttribute("project-id");
|
|
795
731
|
return e && r ? { organizationId: e, projectId: r } : void 0;
|
|
796
732
|
}
|
|
797
|
-
function
|
|
733
|
+
function ct(t) {
|
|
798
734
|
const { organizationId: e, projectId: r } = t;
|
|
799
735
|
if (e && r)
|
|
800
736
|
return { organizationId: e, projectId: r };
|
|
801
|
-
const n =
|
|
737
|
+
const n = ot();
|
|
802
738
|
if (n)
|
|
803
739
|
return n;
|
|
804
|
-
const
|
|
805
|
-
if (
|
|
806
|
-
return
|
|
740
|
+
const i = at();
|
|
741
|
+
if (i)
|
|
742
|
+
return i;
|
|
807
743
|
throw new Error(
|
|
808
744
|
`organizationId and projectId are required. You can provide them via one of:
|
|
809
745
|
(1) createClient({ organizationId, projectId }) options;
|
|
@@ -811,13 +747,13 @@ function lt(t) {
|
|
|
811
747
|
(3) a <script> tag with id 'picked_script', 'picked', or 'cvly' that includes data-organizationid/data-projectid (or organization-id/project-id) attributes.`
|
|
812
748
|
);
|
|
813
749
|
}
|
|
814
|
-
function
|
|
750
|
+
function B(t) {
|
|
815
751
|
return t == null || t === "" || Number.isNaN(t);
|
|
816
752
|
}
|
|
817
|
-
const
|
|
818
|
-
default: (t, e) =>
|
|
819
|
-
append: (t, e) => e && !
|
|
820
|
-
prepend: (t, e) => e && !
|
|
753
|
+
const ut = {
|
|
754
|
+
default: (t, e) => B(t) ? String(e ?? "") : String(t),
|
|
755
|
+
append: (t, e) => e && !B(t) ? `${t} ${e}` : t,
|
|
756
|
+
prepend: (t, e) => e && !B(t) ? `${e} ${t}` : t,
|
|
821
757
|
upper: (t) => typeof t == "string" ? t.toUpperCase() : t,
|
|
822
758
|
lower: (t) => typeof t == "string" ? t.toLowerCase() : t,
|
|
823
759
|
capitalize: (t) => typeof t == "string" ? t.charAt(0).toUpperCase() + t.slice(1) : t,
|
|
@@ -828,75 +764,75 @@ const pt = {
|
|
|
828
764
|
if (Array.isArray(t))
|
|
829
765
|
return e.format(t.map(String));
|
|
830
766
|
if (t instanceof Map) {
|
|
831
|
-
const r = Array.from(t.entries()).map(([n,
|
|
767
|
+
const r = Array.from(t.entries()).map(([n, i]) => `${n}: ${i}`);
|
|
832
768
|
return e.format(r);
|
|
833
769
|
}
|
|
834
770
|
return t instanceof Set ? e.format(Array.from(t).map(String)) : t;
|
|
835
771
|
}
|
|
836
772
|
};
|
|
837
|
-
function
|
|
773
|
+
function dt(t) {
|
|
838
774
|
return typeof t == "object" && t !== null;
|
|
839
775
|
}
|
|
840
|
-
function
|
|
776
|
+
function lt(t, e) {
|
|
841
777
|
let r = e;
|
|
842
778
|
for (const n of t.split("."))
|
|
843
|
-
if (
|
|
779
|
+
if (dt(r) && n in r)
|
|
844
780
|
r = r[n];
|
|
845
781
|
else
|
|
846
782
|
return;
|
|
847
783
|
return typeof r == "function" ? r() : r;
|
|
848
784
|
}
|
|
849
|
-
function
|
|
850
|
-
const r = t.split("|").map((
|
|
851
|
-
let
|
|
852
|
-
for (const
|
|
853
|
-
const [
|
|
854
|
-
|
|
785
|
+
function pt(t, e) {
|
|
786
|
+
const r = t.split("|").map((a) => a.trim()), n = r.shift() ?? "";
|
|
787
|
+
let i = lt(n, e);
|
|
788
|
+
for (const a of r) {
|
|
789
|
+
const [s, ...o] = a.split(":"), c = (s == null ? void 0 : s.trim()) ?? "", g = o.join(":").trim().replaceAll(/(?:^['"]|['"]$)/g, ""), S = ut[c];
|
|
790
|
+
S && (i = S(i, g));
|
|
855
791
|
}
|
|
856
|
-
return
|
|
792
|
+
return B(i) ? "" : typeof i == "object" ? JSON.stringify(i) : String(i);
|
|
857
793
|
}
|
|
858
|
-
function
|
|
794
|
+
function ft(t, e) {
|
|
859
795
|
let r = "", n = 0;
|
|
860
796
|
for (; n < t.length; )
|
|
861
797
|
if (t[n] === "{" && t[n + 1] === "{") {
|
|
862
798
|
n += 2;
|
|
863
|
-
let
|
|
799
|
+
let i = "";
|
|
864
800
|
for (; n < t.length; ) {
|
|
865
801
|
if (t[n] === "}" && t[n + 1] === "}") {
|
|
866
802
|
n += 2;
|
|
867
803
|
break;
|
|
868
804
|
}
|
|
869
|
-
|
|
805
|
+
i += t[n++];
|
|
870
806
|
}
|
|
871
|
-
r +=
|
|
807
|
+
r += pt(i.trim(), e);
|
|
872
808
|
} else
|
|
873
809
|
r += t[n++];
|
|
874
810
|
return r;
|
|
875
811
|
}
|
|
876
|
-
class
|
|
812
|
+
class W {
|
|
877
813
|
constructor(e) {
|
|
878
814
|
h(this, "options");
|
|
879
815
|
h(this, "isReady", !1);
|
|
880
816
|
h(this, "project");
|
|
881
817
|
h(this, "plugins", {});
|
|
882
|
-
h(this, "eventBus",
|
|
818
|
+
h(this, "eventBus", Ve());
|
|
883
819
|
h(this, "organizationId");
|
|
884
820
|
h(this, "projectId");
|
|
885
821
|
h(this, "apiUrl");
|
|
886
822
|
h(this, "session");
|
|
887
823
|
h(this, "precondition");
|
|
888
824
|
h(this, "condition");
|
|
889
|
-
h(this, "searchParams",
|
|
890
|
-
h(this, "history",
|
|
891
|
-
h(this, "components",
|
|
892
|
-
h(this, "experienceInstances",
|
|
893
|
-
h(this, "experiences",
|
|
894
|
-
h(this, "frameworks",
|
|
895
|
-
h(this, "predicates",
|
|
896
|
-
h(this, "features",
|
|
897
|
-
h(this, "responses",
|
|
898
|
-
h(this, "fields",
|
|
899
|
-
h(this, "actions",
|
|
825
|
+
h(this, "searchParams", et());
|
|
826
|
+
h(this, "history", Ne());
|
|
827
|
+
h(this, "components", Ie({ client: this }));
|
|
828
|
+
h(this, "experienceInstances", ne({ client: this }));
|
|
829
|
+
h(this, "experiences", fe({ client: this }));
|
|
830
|
+
h(this, "frameworks", Fe({ client: this }));
|
|
831
|
+
h(this, "predicates", Oe({ client: this }));
|
|
832
|
+
h(this, "features", De({ client: this }));
|
|
833
|
+
h(this, "responses", Qe({ client: this }));
|
|
834
|
+
h(this, "fields", Le());
|
|
835
|
+
h(this, "actions", Ke());
|
|
900
836
|
/**
|
|
901
837
|
* Interpolates a template string using values from the client's response store and/or a provided context.
|
|
902
838
|
* Supports dot-notation, modifiers, and executing functions found in the context.
|
|
@@ -940,66 +876,66 @@ class Q {
|
|
|
940
876
|
* // => "Fruits: apple, banana, and cherry"
|
|
941
877
|
*/
|
|
942
878
|
h(this, "renderString", (e, r) => {
|
|
943
|
-
const n = this.responses.listStore.getState().reduce((
|
|
944
|
-
return
|
|
879
|
+
const n = this.responses.listStore.getState().reduce((i, a) => (i[a.fieldId] = a.value, i), {});
|
|
880
|
+
return ft(e, {
|
|
945
881
|
...r,
|
|
946
882
|
responses: n
|
|
947
883
|
});
|
|
948
884
|
});
|
|
949
|
-
|
|
950
|
-
const { organizationId: r, projectId: n } =
|
|
951
|
-
this.organizationId = r, this.projectId = n, this.options = Object.freeze(e), this.apiUrl = e.apiUrl ||
|
|
885
|
+
k("info", "Picked client initializing.");
|
|
886
|
+
const { organizationId: r, projectId: n } = ct(e);
|
|
887
|
+
this.organizationId = r, this.projectId = n, this.options = Object.freeze(e), this.apiUrl = e.apiUrl || Ze(), this.session = st(), this.setupPlugins(), this.setupFeatures(), this.setupPredicates(), this.setupActions(), this.precondition = e.precondition, this.condition = e.condition, this.eventBus({ type: "load", version: Xe() }), k("info", "Picked client initialized.");
|
|
952
888
|
}
|
|
953
889
|
start() {
|
|
954
|
-
|
|
955
|
-
if (!
|
|
890
|
+
Ae(this), (async () => {
|
|
891
|
+
if (!U())
|
|
956
892
|
return;
|
|
957
893
|
let r;
|
|
958
|
-
typeof this.precondition > "u" ? r = !0 : typeof this.precondition == "boolean" ? r = this.precondition : r = await
|
|
894
|
+
typeof this.precondition > "u" ? r = !0 : typeof this.precondition == "boolean" ? r = this.precondition : r = await j(this, this.precondition) === !0;
|
|
959
895
|
let n;
|
|
960
|
-
r && (this.condition === void 0 ? n = !0 : typeof this.condition == "boolean" ? n = this.condition : n = await
|
|
961
|
-
const
|
|
896
|
+
r && (this.condition === void 0 ? n = !0 : typeof this.condition == "boolean" ? n = this.condition : n = await j(this, this.condition) === !0);
|
|
897
|
+
const i = r && n === !0;
|
|
962
898
|
if (typeof n == "boolean" && this.session) {
|
|
963
|
-
const
|
|
964
|
-
this.session.setIsUser(
|
|
899
|
+
const a = n;
|
|
900
|
+
this.session.setIsUser(a), this.eventBus({ type: "user_decide", value: a });
|
|
965
901
|
}
|
|
966
|
-
this.eventBus({ type: "initialize" }), document.body &&
|
|
902
|
+
this.eventBus({ type: "initialize" }), document.body && i && V(this), await se(), i && V(this), this.eventBus({ type: "ready" }), this.isReady = !0, this.session && this.eventBus({ type: "session", ...this.session });
|
|
967
903
|
})();
|
|
968
904
|
}
|
|
969
905
|
registerFramework(e) {
|
|
970
|
-
|
|
906
|
+
xe(e, this.frameworks);
|
|
971
907
|
}
|
|
972
908
|
registerComponent(e, r) {
|
|
973
|
-
|
|
909
|
+
T(e, r, this.components);
|
|
974
910
|
}
|
|
975
911
|
registerPlugin(e) {
|
|
976
|
-
|
|
912
|
+
he(this, e, this.plugins);
|
|
977
913
|
}
|
|
978
914
|
registerFeature(e, r) {
|
|
979
|
-
|
|
915
|
+
Ue(e, r, this.features);
|
|
980
916
|
}
|
|
981
917
|
registerPredicate(e, r) {
|
|
982
|
-
|
|
918
|
+
Ce(e, r, this.predicates);
|
|
983
919
|
}
|
|
984
920
|
registerField(e) {
|
|
985
|
-
|
|
921
|
+
Ge(e, this.fields);
|
|
986
922
|
}
|
|
987
923
|
registerAction(e, r) {
|
|
988
|
-
|
|
924
|
+
We(e, r, this.actions);
|
|
989
925
|
}
|
|
990
926
|
registerExperience(e) {
|
|
991
|
-
e.component &&
|
|
927
|
+
e.component && T(`experience:${e.id}`, e.component, this.components), ge(e, this.experiences);
|
|
992
928
|
}
|
|
993
929
|
getStateSnapshot() {
|
|
994
|
-
return
|
|
930
|
+
return Re(this);
|
|
995
931
|
}
|
|
996
932
|
async launchExperienceById(e) {
|
|
997
933
|
const r = this.experiences.getById(e).getState();
|
|
998
934
|
if (!r) {
|
|
999
|
-
|
|
935
|
+
k("warn", `Experience with id '${e}' not found.`);
|
|
1000
936
|
return;
|
|
1001
937
|
}
|
|
1002
|
-
|
|
938
|
+
K(this, r);
|
|
1003
939
|
}
|
|
1004
940
|
// private async fetchProject() {
|
|
1005
941
|
// if (this.project) {
|
|
@@ -1014,14 +950,14 @@ class Q {
|
|
|
1014
950
|
var e;
|
|
1015
951
|
(e = this.options.plugins) == null || e.forEach((r) => {
|
|
1016
952
|
if (Array.isArray(r)) {
|
|
1017
|
-
r.forEach((
|
|
1018
|
-
this.registerPlugin(
|
|
953
|
+
r.forEach((i) => {
|
|
954
|
+
this.registerPlugin(i);
|
|
1019
955
|
});
|
|
1020
956
|
return;
|
|
1021
957
|
}
|
|
1022
958
|
const n = typeof r == "function" ? r() : r;
|
|
1023
959
|
if (Array.isArray(n)) {
|
|
1024
|
-
n.forEach((
|
|
960
|
+
n.forEach((i) => this.registerPlugin(i));
|
|
1025
961
|
return;
|
|
1026
962
|
}
|
|
1027
963
|
this.registerPlugin(n);
|
|
@@ -1030,20 +966,20 @@ class Q {
|
|
|
1030
966
|
setupFeatures() {
|
|
1031
967
|
const e = this.options.features;
|
|
1032
968
|
e && (Object.entries(e).forEach(([r, n]) => {
|
|
1033
|
-
const
|
|
1034
|
-
this.registerFeature(r,
|
|
969
|
+
const i = typeof n == "function" ? n() : n;
|
|
970
|
+
this.registerFeature(r, i);
|
|
1035
971
|
}), this.searchParams.feature && this.searchParams.feature.forEach((r) => {
|
|
1036
972
|
try {
|
|
1037
|
-
const [n,
|
|
1038
|
-
if (!n || !
|
|
973
|
+
const [n, i] = r.split(":");
|
|
974
|
+
if (!n || !i)
|
|
1039
975
|
return;
|
|
1040
|
-
let
|
|
1041
|
-
|
|
1042
|
-
key: `${
|
|
976
|
+
let a = i;
|
|
977
|
+
a === "true" && (a = !0), a === "false" && (a = !1), this.registerFeature(n, {
|
|
978
|
+
key: `${a}`,
|
|
1043
979
|
// use the assigned bucket value as the key
|
|
1044
980
|
name: n,
|
|
1045
981
|
// eslint-disable-next-line sonarjs/function-return-type
|
|
1046
|
-
decide: () =>
|
|
982
|
+
decide: () => a,
|
|
1047
983
|
storage: "session"
|
|
1048
984
|
});
|
|
1049
985
|
} catch {
|
|
@@ -1054,7 +990,7 @@ class Q {
|
|
|
1054
990
|
const e = this.options.predicates;
|
|
1055
991
|
e && Object.entries(e).forEach(([r, n]) => {
|
|
1056
992
|
if (typeof n != "function") {
|
|
1057
|
-
|
|
993
|
+
k("warn", `Predicate "${r}" is not a function.`);
|
|
1058
994
|
return;
|
|
1059
995
|
}
|
|
1060
996
|
this.registerPredicate(r, n);
|
|
@@ -1064,7 +1000,7 @@ class Q {
|
|
|
1064
1000
|
const e = this.options.actions;
|
|
1065
1001
|
e && Object.entries(e).forEach(([r, n]) => {
|
|
1066
1002
|
if (typeof n != "function") {
|
|
1067
|
-
|
|
1003
|
+
k("warn", `Action "${r}" is not a function.`);
|
|
1068
1004
|
return;
|
|
1069
1005
|
}
|
|
1070
1006
|
this.registerAction(r, n);
|
|
@@ -1074,52 +1010,52 @@ class Q {
|
|
|
1074
1010
|
return this.plugins[e] ?? {};
|
|
1075
1011
|
}
|
|
1076
1012
|
}
|
|
1077
|
-
h(
|
|
1078
|
-
function
|
|
1013
|
+
h(W, "logger", k);
|
|
1014
|
+
function Y(t) {
|
|
1079
1015
|
var e;
|
|
1080
1016
|
return ((e = t.options) == null ? void 0 : e.some((r) => "condition" in r)) ?? !1;
|
|
1081
1017
|
}
|
|
1082
|
-
function
|
|
1083
|
-
return t.some((e) => e.condition ||
|
|
1018
|
+
function gt(t) {
|
|
1019
|
+
return t.some((e) => e.condition || Y(e));
|
|
1084
1020
|
}
|
|
1085
|
-
async function
|
|
1086
|
-
return e.length === 0 || !
|
|
1021
|
+
async function Ft(t, e) {
|
|
1022
|
+
return e.length === 0 || !gt(e) ? e : (await Promise.all(
|
|
1087
1023
|
e.map(async (n) => {
|
|
1088
|
-
if (!(n.condition ? await
|
|
1024
|
+
if (!(n.condition ? await j(t, n.condition) : !0))
|
|
1089
1025
|
return null;
|
|
1090
|
-
if (!n.options || !
|
|
1026
|
+
if (!n.options || !Y(n))
|
|
1091
1027
|
return n;
|
|
1092
|
-
const
|
|
1093
|
-
n.options.map(async (
|
|
1094
|
-
)).filter((
|
|
1095
|
-
return
|
|
1028
|
+
const s = (await Promise.all(
|
|
1029
|
+
n.options.map(async (c) => c.condition ? await j(t, c.condition) ? c : null : c)
|
|
1030
|
+
)).filter((c) => c !== null);
|
|
1031
|
+
return s.length === n.options.length ? n : s.length === 0 ? null : { ...n, options: s };
|
|
1096
1032
|
})
|
|
1097
1033
|
)).filter((n) => n !== null);
|
|
1098
1034
|
}
|
|
1099
|
-
const
|
|
1100
|
-
const e = new
|
|
1101
|
-
return
|
|
1035
|
+
const xt = (t) => {
|
|
1036
|
+
const e = new W(t);
|
|
1037
|
+
return ue(e), e;
|
|
1102
1038
|
};
|
|
1103
1039
|
export {
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1040
|
+
W as Picked,
|
|
1041
|
+
xt as createClient,
|
|
1042
|
+
A as createStorageKey,
|
|
1043
|
+
j as evaluateRuleLogic,
|
|
1044
|
+
it as getPickedConfig,
|
|
1045
|
+
Ft as getStepFields,
|
|
1046
|
+
Pt as isPickedRoot,
|
|
1047
|
+
O as localStore,
|
|
1048
|
+
C as sessionStore,
|
|
1049
|
+
Rt as subscribe,
|
|
1050
|
+
Bt as supportsCookies,
|
|
1051
|
+
ce as supportsCryptoRandomUUID,
|
|
1052
|
+
U as supportsDocument,
|
|
1053
|
+
Ot as supportsHistory,
|
|
1054
|
+
Ct as supportsIntersectionObserver,
|
|
1055
|
+
ae as supportsLocalStorage,
|
|
1056
|
+
zt as supportsLocation,
|
|
1057
|
+
Dt as supportsSessionStorage,
|
|
1058
|
+
Ut as supportsShadowRoot,
|
|
1059
|
+
Mt as supportsWebComponents,
|
|
1124
1060
|
M as supportsWindow
|
|
1125
1061
|
};
|