@picked/client 0.0.12-next.12 → 0.0.12-next.14
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 +1 -1
- package/dist/cjs/plugins/shopify/index.js +1 -1
- package/dist/esm/index.js +150 -754
- package/dist/esm/plugins/shopify/index.js +68 -36
- package/dist/esm/plugins/single-page-app/index.js +3 -3
- package/dist/esm/plugins/web-components/index.js +1 -1
- package/dist/esm/plugins/window-object/index.js +1 -1
- package/dist/esm/server/index.js +7 -7
- package/dist/{experience-instance-QtGs0N3g.js → experience-instance-CeuHLrdL.js} +7 -7
- package/dist/{supports-BjhuLJ8z.js → supports-DBMT17KZ.js} +10 -10
- package/dist/types/plugins/shopify/{utils.d.ts → global-obj.d.ts} +8 -1
- package/dist/types/plugins/shopify/global-obj.d.ts.map +1 -0
- package/dist/types/plugins/shopify/index.d.ts +2 -0
- package/dist/types/plugins/shopify/index.d.ts.map +1 -1
- package/dist/types/plugins/shopify/picked-config.d.ts +96 -0
- package/dist/types/plugins/shopify/picked-config.d.ts.map +1 -0
- package/dist/types/plugins/shopify/{shopify.d.ts → predicates.d.ts} +20 -6
- package/dist/types/plugins/shopify/predicates.d.ts.map +1 -0
- package/dist/user-session-D-l-VMTb.cjs +1 -0
- package/dist/user-session-Ht0ayuo5.js +632 -0
- package/package.json +1 -1
- package/dist/types/plugins/shopify/shopify.d.ts.map +0 -1
- package/dist/types/plugins/shopify/utils.d.ts.map +0 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,737 +1,133 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
merge(l, h) {
|
|
19
|
-
return {
|
|
20
|
-
...l,
|
|
21
|
-
...h.experience
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
}), c = r.map((l) => ({
|
|
25
|
-
name: l.name,
|
|
26
|
-
decisionLogic: l.decide,
|
|
27
|
-
targetSelectors: l.targets,
|
|
28
|
-
initializeOpenLogic: e.initializeOpen
|
|
29
|
-
})), u = t.components.listStore.map(
|
|
30
|
-
(l) => l.find((h) => h.name === `experience:${e.id}`) || l.find((h) => h.name === "experience"),
|
|
31
|
-
{ skipVoid: !1 }
|
|
32
|
-
), s = r.map((l) => ({
|
|
33
|
-
steps: l.steps,
|
|
34
|
-
nodes: l.nodes,
|
|
35
|
-
edges: l.edges,
|
|
36
|
-
conditionals: l.conditionals
|
|
37
|
-
})), o = e.actions ?? [];
|
|
38
|
-
return {
|
|
39
|
-
id: e.id,
|
|
40
|
-
configStore: c,
|
|
41
|
-
treeStore: s,
|
|
42
|
-
componentStore: u,
|
|
43
|
-
actions: o,
|
|
44
|
-
merge: n.merge
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
);
|
|
48
|
-
function le(t) {
|
|
49
|
-
return k(ue, t);
|
|
50
|
-
}
|
|
51
|
-
const de = w(({ client: t }) => {
|
|
52
|
-
const e = H.store({}), r = x(e, {
|
|
53
|
-
register(s, o) {
|
|
54
|
-
return {
|
|
55
|
-
...s,
|
|
56
|
-
[o.id]: o
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
function n(s) {
|
|
61
|
-
const o = e.getState()[s.id];
|
|
62
|
-
if (o) {
|
|
63
|
-
o.merge({ experience: s, strategy: "override" });
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
const l = le({ client: t, experience: s });
|
|
67
|
-
r.register(l);
|
|
68
|
-
}
|
|
69
|
-
const c = e.map((s) => Object.values(s));
|
|
70
|
-
function u(s) {
|
|
71
|
-
return e.map((o) => o[s], { skipVoid: !1 });
|
|
72
|
-
}
|
|
73
|
-
return {
|
|
74
|
-
register: n,
|
|
75
|
-
getById: u,
|
|
76
|
-
listStore: c
|
|
77
|
-
};
|
|
78
|
-
});
|
|
79
|
-
function pe(t) {
|
|
80
|
-
return k(de, t);
|
|
81
|
-
}
|
|
82
|
-
const ge = (t, e) => {
|
|
83
|
-
e.register(t);
|
|
84
|
-
}, K = (t, e) => {
|
|
85
|
-
const { targetSelectors: r } = e.configStore.getState(), n = U(r, e.id);
|
|
86
|
-
n.forEach(
|
|
87
|
-
({ elements: u }) => u.forEach((s) => Q(s, e.id))
|
|
88
|
-
), X(n, e.id).forEach((u) => {
|
|
89
|
-
t.experienceInstances.spawn(e, u);
|
|
90
|
-
});
|
|
91
|
-
}, T = async (t) => {
|
|
92
|
-
await Promise.all(
|
|
93
|
-
t.experiences.listStore.getState().map(async (e) => {
|
|
94
|
-
await fe(t, e) && K(t, e);
|
|
95
|
-
})
|
|
96
|
-
);
|
|
97
|
-
}, fe = async (t, e) => {
|
|
98
|
-
const { decisionLogic: r, targetSelectors: n } = e.configStore.getState();
|
|
99
|
-
return U(n, e.id).length < 1 || n.length === 0 ? !1 : r && Z(r) ? await A(t, r) === !0 : !0;
|
|
100
|
-
}, me = (t, e, r) => {
|
|
101
|
-
const n = e.name, c = e.setup(t);
|
|
102
|
-
if (c) {
|
|
103
|
-
const u = r[n] ?? {};
|
|
104
|
-
r[n] = Object.freeze({ ...u, ...c });
|
|
105
|
-
}
|
|
106
|
-
}, he = I("component"), ye = w(
|
|
107
|
-
({ client: t, component: e, name: r }) => {
|
|
108
|
-
const n = t.frameworks.getByName(e.frameworkName);
|
|
109
|
-
return {
|
|
110
|
-
name: r,
|
|
111
|
-
component: e,
|
|
112
|
-
frameworkStore: n
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
);
|
|
116
|
-
function Se(t) {
|
|
117
|
-
return k(ye, t);
|
|
118
|
-
}
|
|
119
|
-
const ve = w(({ client: t }) => {
|
|
120
|
-
const e = he.store({}), r = x(e, {
|
|
121
|
-
register(s, o) {
|
|
122
|
-
return {
|
|
123
|
-
...s,
|
|
124
|
-
[o.name]: o
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
function n(s, o) {
|
|
129
|
-
e.getState()[s] && v(
|
|
130
|
-
"warn",
|
|
131
|
-
`Component '${s}' already registered. Registering again will override the previous registration.`
|
|
132
|
-
);
|
|
133
|
-
const h = Se({ client: t, name: s, component: o });
|
|
134
|
-
r.register(h);
|
|
135
|
-
}
|
|
136
|
-
const c = e.map((s) => Object.values(s));
|
|
137
|
-
function u(s) {
|
|
138
|
-
return e.map((o) => o[s], { skipVoid: !1 });
|
|
139
|
-
}
|
|
140
|
-
return {
|
|
141
|
-
register: n,
|
|
142
|
-
getByName: u,
|
|
143
|
-
listStore: c
|
|
144
|
-
};
|
|
145
|
-
});
|
|
146
|
-
function we(t) {
|
|
147
|
-
return k(ve, t);
|
|
148
|
-
}
|
|
149
|
-
const V = (t, e, r) => {
|
|
150
|
-
r.register(t, e);
|
|
151
|
-
}, ke = I("framework"), be = w(({ client: t }) => {
|
|
152
|
-
const e = ke.store({}), r = x(e, {
|
|
153
|
-
register(s, o) {
|
|
154
|
-
return {
|
|
155
|
-
...s,
|
|
156
|
-
[o.name]: o.framework
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
function n(s, o) {
|
|
161
|
-
e.getState()[s] && v(
|
|
162
|
-
"warn",
|
|
163
|
-
`Framework '${s}' already registered. Registering again will override the previous registration.`
|
|
164
|
-
), r.register({ name: s, framework: o });
|
|
165
|
-
}
|
|
166
|
-
const c = e.map((s) => Object.values(s));
|
|
167
|
-
function u(s) {
|
|
168
|
-
return e.map((o) => o[s], { skipVoid: !1 });
|
|
169
|
-
}
|
|
170
|
-
return {
|
|
171
|
-
register: n,
|
|
172
|
-
getByName: u,
|
|
173
|
-
listStore: c
|
|
174
|
-
};
|
|
175
|
-
});
|
|
176
|
-
function Ie(t) {
|
|
177
|
-
return k(be, t);
|
|
178
|
-
}
|
|
179
|
-
const xe = (t, e) => {
|
|
180
|
-
e.register(t.name, t);
|
|
181
|
-
}, Fe = 6e3, N = B("last_ping", "global"), Ee = (t) => `${t}/api/v1/ping`, Pe = async (t) => {
|
|
182
|
-
try {
|
|
183
|
-
const e = Date.now(), r = localStorage.getItem(N);
|
|
184
|
-
if (r && e - parseInt(r) < Fe)
|
|
185
|
-
return !0;
|
|
186
|
-
const n = Ee(t.apiUrl), c = {
|
|
187
|
-
projectId: t.projectId,
|
|
188
|
-
path: window.location.pathname
|
|
189
|
-
}, u = JSON.stringify(c), s = {
|
|
190
|
-
"Content-Type": "application/json"
|
|
191
|
-
}, o = document.getElementById("picked_script"), l = o == null ? void 0 : o.dataset.verceltoken;
|
|
192
|
-
l && (s["x-vercel-protection-bypass"] = l);
|
|
193
|
-
const S = (await fetch(n, {
|
|
194
|
-
method: "POST",
|
|
195
|
-
headers: s,
|
|
196
|
-
body: u
|
|
197
|
-
})).ok;
|
|
198
|
-
return S && localStorage.setItem(N, e.toString()), S;
|
|
199
|
-
} catch (e) {
|
|
200
|
-
return v("error", e), !1;
|
|
1
|
+
var y = Object.defineProperty;
|
|
2
|
+
var w = (i, e, t) => e in i ? y(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
3
|
+
var n = (i, e, t) => w(i, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { c as S, a as x, b as I, d as P, e as k, f as v, g as E, h as F, i as b, j as C, p as A, s as R, k as u, l as j, m as B, n as z, o as U, q as O, r as $, t as d } from "../user-session-Ht0ayuo5.js";
|
|
5
|
+
import { l as c } from "../logger-C9a75KZn.js";
|
|
6
|
+
import { c as K, d as L, e as l } from "../experience-instance-CeuHLrdL.js";
|
|
7
|
+
import { i as pe } from "../experience-instance-CeuHLrdL.js";
|
|
8
|
+
import { createEvent as W } from "effector";
|
|
9
|
+
import { s as h, a as _, b as D } from "../supports-DBMT17KZ.js";
|
|
10
|
+
import { g as de, k as le, d as fe, i as he, e as ge, c as me, f as ye, h as we, j as Se } from "../supports-DBMT17KZ.js";
|
|
11
|
+
import { c as H, s as f } from "../storage-Cb_71y48.js";
|
|
12
|
+
import { l as Ie, a as Pe } from "../storage-Cb_71y48.js";
|
|
13
|
+
const q = (i, e, t) => {
|
|
14
|
+
const s = e.name, r = e.setup(i);
|
|
15
|
+
if (r) {
|
|
16
|
+
const o = t[s] ?? {};
|
|
17
|
+
t[s] = Object.freeze({ ...o, ...r });
|
|
201
18
|
}
|
|
202
19
|
};
|
|
203
|
-
function
|
|
204
|
-
const e = typeof window < "u",
|
|
205
|
-
client:
|
|
206
|
-
responses:
|
|
207
|
-
fields:
|
|
20
|
+
function N(i) {
|
|
21
|
+
const e = typeof window < "u", t = {
|
|
22
|
+
client: i,
|
|
23
|
+
responses: i.responses.listStore.getState(),
|
|
24
|
+
fields: i.fields.listStore.getState(),
|
|
208
25
|
location: e ? window.location : void 0,
|
|
209
26
|
document: e ? window.document : void 0,
|
|
210
27
|
sessionStorage: e ? window.sessionStorage : void 0,
|
|
211
28
|
localStorage: e ? window.localStorage : void 0
|
|
212
29
|
};
|
|
213
|
-
return Object.freeze(
|
|
214
|
-
}
|
|
215
|
-
const Re = I("predicate"), Ae = w(({ client: t }) => {
|
|
216
|
-
const e = Re.store({}), r = x(e, {
|
|
217
|
-
register(s, o) {
|
|
218
|
-
return {
|
|
219
|
-
...s,
|
|
220
|
-
[o.name]: {
|
|
221
|
-
name: o.name,
|
|
222
|
-
predicate: o.predicate
|
|
223
|
-
}
|
|
224
|
-
};
|
|
225
|
-
}
|
|
226
|
-
});
|
|
227
|
-
function n(s, o) {
|
|
228
|
-
e.getState()[s] && v(
|
|
229
|
-
"warn",
|
|
230
|
-
`Predicate '${s}' already registered. Registering again will override the previous registration.`
|
|
231
|
-
), r.register(Object.freeze({ name: s, predicate: o }));
|
|
232
|
-
}
|
|
233
|
-
const c = e.map((s) => Object.values(s));
|
|
234
|
-
function u(s) {
|
|
235
|
-
return e.map((o) => o[s], { skipVoid: !1 });
|
|
236
|
-
}
|
|
237
|
-
return {
|
|
238
|
-
register: n,
|
|
239
|
-
getByName: u,
|
|
240
|
-
listStore: c
|
|
241
|
-
};
|
|
242
|
-
});
|
|
243
|
-
function $e(t) {
|
|
244
|
-
return k(Ae, t);
|
|
245
|
-
}
|
|
246
|
-
const je = (t, e, r) => {
|
|
247
|
-
r.register(t, e);
|
|
248
|
-
}, z = I("feature"), Oe = w(({ client: t }) => {
|
|
249
|
-
const e = z.store({}), r = z.store([]), n = x(e, {
|
|
250
|
-
register(d, a) {
|
|
251
|
-
return {
|
|
252
|
-
...d,
|
|
253
|
-
[a.id]: a.feature
|
|
254
|
-
};
|
|
255
|
-
}
|
|
256
|
-
});
|
|
257
|
-
function c(d, a) {
|
|
258
|
-
e.getState()[d] && v(
|
|
259
|
-
"warn",
|
|
260
|
-
`Feature '${d}' already registered. Registering again will override the previous registration.`
|
|
261
|
-
);
|
|
262
|
-
const g = {
|
|
263
|
-
id: d,
|
|
264
|
-
feature: {
|
|
265
|
-
...a,
|
|
266
|
-
id: d
|
|
267
|
-
}
|
|
268
|
-
};
|
|
269
|
-
n.register(
|
|
270
|
-
Object.freeze({
|
|
271
|
-
id: d,
|
|
272
|
-
feature: g
|
|
273
|
-
})
|
|
274
|
-
);
|
|
275
|
-
}
|
|
276
|
-
const u = M(
|
|
277
|
-
async ({
|
|
278
|
-
id: d,
|
|
279
|
-
key: a,
|
|
280
|
-
storage: i = "local"
|
|
281
|
-
}) => {
|
|
282
|
-
const g = B(`feature:${d}:${a}`, "global"), p = (i === "session" ? $ : D).get(g).boolean();
|
|
283
|
-
return p === null ? null : { id: d, key: a, bucket: p };
|
|
284
|
-
}
|
|
285
|
-
), s = M((d) => {
|
|
286
|
-
if (!d)
|
|
287
|
-
return null;
|
|
288
|
-
const a = B(`feature:${d.id}:${d.key}`, "global");
|
|
289
|
-
(d.storage === "session" ? $ : D).set(a, d.bucket);
|
|
290
|
-
}), o = /* @__PURE__ */ new Map(), l = J({
|
|
291
|
-
source: { allFeaturesStore: e, resolvedFeaturesStore: r },
|
|
292
|
-
effect: async ({ allFeaturesStore: d, resolvedFeaturesStore: a }, { id: i, decide: g, key: f }) => {
|
|
293
|
-
const p = a.find((j) => j.id === i);
|
|
294
|
-
if (p)
|
|
295
|
-
return p;
|
|
296
|
-
const y = d[i];
|
|
297
|
-
if (!y)
|
|
298
|
-
throw new Error(`Feature with id '${i}' not found`);
|
|
299
|
-
const b = o.get(`${i}:${f}`);
|
|
300
|
-
if (b !== void 0) {
|
|
301
|
-
const j = await b;
|
|
302
|
-
return { id: y.id, bucket: j, key: f, storage: y.feature.storage };
|
|
303
|
-
}
|
|
304
|
-
const R = g();
|
|
305
|
-
o.set(`${i}:${f}`, R);
|
|
306
|
-
const E = await R;
|
|
307
|
-
return { id: y.id, bucket: E, key: f, storage: y.feature.storage };
|
|
308
|
-
}
|
|
309
|
-
});
|
|
310
|
-
F({
|
|
311
|
-
clock: n.register,
|
|
312
|
-
fn: (d) => {
|
|
313
|
-
const { id: a, feature: i } = d;
|
|
314
|
-
return { id: a, key: i.feature.key, storage: i.feature.storage };
|
|
315
|
-
},
|
|
316
|
-
target: u
|
|
317
|
-
}), F({
|
|
318
|
-
source: e,
|
|
319
|
-
clock: l.doneData,
|
|
320
|
-
fn: (d, a) => {
|
|
321
|
-
var y;
|
|
322
|
-
const { id: i, bucket: g, storage: f } = a, p = (y = d[i]) == null ? void 0 : y.feature.key;
|
|
323
|
-
return p ? { key: p, id: i, bucket: g, storage: f } : null;
|
|
324
|
-
},
|
|
325
|
-
target: s
|
|
326
|
-
});
|
|
327
|
-
const h = O({ allFeaturesStore: e, resolvedFeaturesStore: r }).map(
|
|
328
|
-
({
|
|
329
|
-
allFeaturesStore: d,
|
|
330
|
-
resolvedFeaturesStore: a
|
|
331
|
-
}) => Object.values(d).map((i) => {
|
|
332
|
-
const g = a.find((f) => f.id === i.id);
|
|
333
|
-
return g ? {
|
|
334
|
-
id: i.id,
|
|
335
|
-
name: i.feature.name,
|
|
336
|
-
key: i.feature.key,
|
|
337
|
-
getBucket: () => ({ id: i.id, bucket: g.bucket }),
|
|
338
|
-
isResolved: !0
|
|
339
|
-
} : {
|
|
340
|
-
id: i.id,
|
|
341
|
-
name: i.feature.name,
|
|
342
|
-
key: i.feature.key,
|
|
343
|
-
getBucket: async () => await l(i.feature),
|
|
344
|
-
isResolved: !1
|
|
345
|
-
};
|
|
346
|
-
})
|
|
347
|
-
);
|
|
348
|
-
F({
|
|
349
|
-
clock: l.doneData,
|
|
350
|
-
source: { resolvedFeatures: r },
|
|
351
|
-
filter: ({ resolvedFeatures: d }, { id: a }) => !d.some((i) => i.id === a),
|
|
352
|
-
fn: (d, a) => a,
|
|
353
|
-
target: t.eventBus.prepend((d) => ({
|
|
354
|
-
type: "feature_decide",
|
|
355
|
-
feature: d
|
|
356
|
-
}))
|
|
357
|
-
}), F({
|
|
358
|
-
clock: [u.doneData, l.doneData],
|
|
359
|
-
source: r,
|
|
360
|
-
fn: (d, a) => !a || d.some((i) => i.id === a.id) ? d : [...d, a],
|
|
361
|
-
target: r
|
|
362
|
-
});
|
|
363
|
-
function S(d) {
|
|
364
|
-
return e.map((a) => a[d], { skipVoid: !1 });
|
|
365
|
-
}
|
|
366
|
-
return {
|
|
367
|
-
register: c,
|
|
368
|
-
getByName: S,
|
|
369
|
-
listStore: h
|
|
370
|
-
};
|
|
371
|
-
});
|
|
372
|
-
function Ce(t) {
|
|
373
|
-
return k(Oe, t);
|
|
374
|
-
}
|
|
375
|
-
const De = (t, e, r) => {
|
|
376
|
-
r.register(t, e);
|
|
377
|
-
}, P = I("history");
|
|
378
|
-
function L(t, e) {
|
|
379
|
-
return {
|
|
380
|
-
// eslint-disable-next-line sonarjs/pseudo-random
|
|
381
|
-
id: se(`history-entry-${Date.now()}-${Math.random()}}`),
|
|
382
|
-
node: e,
|
|
383
|
-
at: Date.now(),
|
|
384
|
-
experienceId: t
|
|
385
|
-
};
|
|
386
|
-
}
|
|
387
|
-
const Me = w(() => {
|
|
388
|
-
const t = P.store({ entries: [] }), e = P.event(), r = P.event(), n = P.event(), c = P.event();
|
|
389
|
-
t.on(e, (s, o) => ({
|
|
390
|
-
entries: [...s.entries, L(o.experienceId, o.node)]
|
|
391
|
-
})), t.on(r, (s, o) => ({
|
|
392
|
-
entries: [
|
|
393
|
-
...s.entries.slice(0, -1),
|
|
394
|
-
L(o.experienceId, o.node)
|
|
395
|
-
]
|
|
396
|
-
})), t.on(c, (s, o) => o);
|
|
397
|
-
function u(s, o) {
|
|
398
|
-
const l = { lastStepIndex: -1, secondLastStepIndex: -1 };
|
|
399
|
-
for (let h = s.length - 1; h >= 0; h--) {
|
|
400
|
-
const S = s[h], d = S == null ? void 0 : S.node;
|
|
401
|
-
if (!(!d || !ee(d)) && !(o && (S == null ? void 0 : S.experienceId) !== o))
|
|
402
|
-
if (l.lastStepIndex === -1)
|
|
403
|
-
l.lastStepIndex = h;
|
|
404
|
-
else {
|
|
405
|
-
l.secondLastStepIndex = h;
|
|
406
|
-
break;
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
return l;
|
|
410
|
-
}
|
|
411
|
-
return t.on(n, (s, o) => {
|
|
412
|
-
const { secondLastStepIndex: l } = u(s.entries, o.experienceId), h = l !== -1 ? s.entries.slice(0, l + 1) : s.entries;
|
|
413
|
-
return {
|
|
414
|
-
...s,
|
|
415
|
-
entries: h
|
|
416
|
-
};
|
|
417
|
-
}), {
|
|
418
|
-
push: e,
|
|
419
|
-
replace: r,
|
|
420
|
-
back: n,
|
|
421
|
-
restore: c,
|
|
422
|
-
entriesStore: t.map((s) => s.entries)
|
|
423
|
-
};
|
|
424
|
-
});
|
|
425
|
-
function Te() {
|
|
426
|
-
return k(Me);
|
|
30
|
+
return Object.freeze(t);
|
|
427
31
|
}
|
|
428
|
-
const
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
...s,
|
|
433
|
-
[o.field.id]: o.field
|
|
434
|
-
};
|
|
435
|
-
}
|
|
436
|
-
});
|
|
437
|
-
function r(s) {
|
|
438
|
-
e.register({ field: s });
|
|
439
|
-
}
|
|
440
|
-
const n = t.map((s) => Object.values(s));
|
|
441
|
-
function c(s) {
|
|
442
|
-
return t.map((o) => o[s] || null);
|
|
443
|
-
}
|
|
444
|
-
function u(s) {
|
|
445
|
-
return t.map((o) => Object.values(o).find((l) => l.name === s) || null);
|
|
446
|
-
}
|
|
447
|
-
return {
|
|
448
|
-
register: r,
|
|
449
|
-
getById: c,
|
|
450
|
-
listStore: n,
|
|
451
|
-
getByName: u
|
|
452
|
-
};
|
|
453
|
-
});
|
|
454
|
-
function Le() {
|
|
455
|
-
return k(ze);
|
|
456
|
-
}
|
|
457
|
-
const Ue = (t, e) => {
|
|
458
|
-
e.register(t);
|
|
459
|
-
}, _e = I("action"), He = w(() => {
|
|
460
|
-
const t = _e.store({}), e = x(t, {
|
|
461
|
-
register(u, s) {
|
|
462
|
-
return {
|
|
463
|
-
...u,
|
|
464
|
-
[s.name]: {
|
|
465
|
-
name: s.name,
|
|
466
|
-
action: s.action
|
|
467
|
-
}
|
|
468
|
-
};
|
|
469
|
-
}
|
|
470
|
-
});
|
|
471
|
-
function r(u, s) {
|
|
472
|
-
e.register({ name: u, action: s });
|
|
473
|
-
}
|
|
474
|
-
const n = t.map((u) => Object.values(u));
|
|
475
|
-
function c(u) {
|
|
476
|
-
return t.map((s) => s[u], { skipVoid: !1 });
|
|
477
|
-
}
|
|
478
|
-
return {
|
|
479
|
-
register: r,
|
|
480
|
-
getByName: c,
|
|
481
|
-
listStore: n
|
|
482
|
-
};
|
|
483
|
-
});
|
|
484
|
-
function Ke() {
|
|
485
|
-
return k(He);
|
|
486
|
-
}
|
|
487
|
-
const qe = (t, e, r) => {
|
|
488
|
-
r.register(t, e);
|
|
489
|
-
}, Ge = I("response"), We = w(({ client: t }) => {
|
|
490
|
-
const e = Ge.store({}), r = C(), n = C(), c = x(e, {
|
|
491
|
-
register(a, i) {
|
|
492
|
-
return {
|
|
493
|
-
...a,
|
|
494
|
-
[i.fieldId]: i.response
|
|
495
|
-
};
|
|
496
|
-
},
|
|
497
|
-
registerBatch(a, i) {
|
|
498
|
-
return {
|
|
499
|
-
...a,
|
|
500
|
-
...i
|
|
501
|
-
};
|
|
502
|
-
},
|
|
503
|
-
clear(a, i) {
|
|
504
|
-
const { [i]: g, ...f } = a;
|
|
505
|
-
return f;
|
|
506
|
-
},
|
|
507
|
-
clearAll() {
|
|
508
|
-
return {};
|
|
509
|
-
}
|
|
510
|
-
});
|
|
511
|
-
function u(a, i) {
|
|
512
|
-
c.register({ fieldId: a, response: i });
|
|
513
|
-
}
|
|
514
|
-
async function s(a) {
|
|
515
|
-
const i = [];
|
|
516
|
-
return await Promise.allSettled(
|
|
517
|
-
Object.entries(a).map(async ([g, f]) => {
|
|
518
|
-
let p = f;
|
|
519
|
-
const y = t.fields.getById(g).getState();
|
|
520
|
-
if (!y) {
|
|
521
|
-
i.push({
|
|
522
|
-
fieldId: g,
|
|
523
|
-
userMessage: `Field '${g}' not found`,
|
|
524
|
-
systemMessage: `No field with ID '${g}' exists. Available field IDs are: ${Object.keys(t.fields.listStore.getState()).join(",")}.`,
|
|
525
|
-
value: p
|
|
526
|
-
});
|
|
527
|
-
return;
|
|
528
|
-
}
|
|
529
|
-
if (y.multiple && (typeof p == "string" || typeof p == "number" || typeof p == "boolean") && (p = [p]), y.validation && !ne(y.validation)) {
|
|
530
|
-
const b = await A(t, y.validation, {
|
|
531
|
-
$input: p
|
|
532
|
-
});
|
|
533
|
-
if (typeof b == "string") {
|
|
534
|
-
i.push({
|
|
535
|
-
fieldId: g,
|
|
536
|
-
userMessage: b,
|
|
537
|
-
systemMessage: `Field validation resulted in an error: ${b}.`,
|
|
538
|
-
value: p
|
|
539
|
-
});
|
|
540
|
-
return;
|
|
541
|
-
}
|
|
542
|
-
if (b === !1) {
|
|
543
|
-
i.push({
|
|
544
|
-
fieldId: g,
|
|
545
|
-
userMessage: "This field is invalid",
|
|
546
|
-
systemMessage: "Field validation resulted in an unspecified error.",
|
|
547
|
-
value: p
|
|
548
|
-
});
|
|
549
|
-
return;
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
if (y.required && (typeof p > "u" || p === null || p === "" || Array.isArray(p) && !p.length)) {
|
|
553
|
-
i.push({
|
|
554
|
-
fieldId: g,
|
|
555
|
-
userMessage: "This field is required",
|
|
556
|
-
systemMessage: "Field is required.",
|
|
557
|
-
value: p
|
|
558
|
-
});
|
|
559
|
-
return;
|
|
560
|
-
}
|
|
561
|
-
if (!y.multiple && Array.isArray(p) && p.length > 1) {
|
|
562
|
-
i.push({
|
|
563
|
-
fieldId: g,
|
|
564
|
-
userMessage: "This field expects a single response",
|
|
565
|
-
systemMessage: "Field expects a single response.",
|
|
566
|
-
value: p
|
|
567
|
-
});
|
|
568
|
-
return;
|
|
569
|
-
}
|
|
570
|
-
if (y.options) {
|
|
571
|
-
const b = y.options.map((E) => E.value), R = Array.isArray(p) ? p : [p];
|
|
572
|
-
Array.isArray(p) && (R.every((E) => b.includes(E)) || i.push({
|
|
573
|
-
fieldId: g,
|
|
574
|
-
userMessage: "This field expects a valid option",
|
|
575
|
-
systemMessage: `Field expects a valid option. Valid options are: ${b.join(", ")}`,
|
|
576
|
-
value: p
|
|
577
|
-
}));
|
|
578
|
-
}
|
|
579
|
-
})
|
|
580
|
-
), { responsesToCommit: a, validationErrors: i };
|
|
581
|
-
}
|
|
582
|
-
async function o(a) {
|
|
583
|
-
const { responsesToCommit: i, validationErrors: g } = await s(a);
|
|
584
|
-
return g.length ? { errors: g } : (c.registerBatch(i), { errors: [] });
|
|
585
|
-
}
|
|
586
|
-
const l = e.map((a) => a), h = e.map((a) => Object.keys(a).map((g) => ({
|
|
587
|
-
fieldId: g,
|
|
588
|
-
value: a[g]
|
|
589
|
-
})));
|
|
590
|
-
function S(a) {
|
|
591
|
-
const i = t.fields.getById(a), g = e.map((f) => f[a] || null);
|
|
592
|
-
return O({ f: i, r: g }, ({ f, r: p }) => p || (f != null && f.defaultValue ? f.defaultValue : null));
|
|
593
|
-
}
|
|
594
|
-
function d(a) {
|
|
595
|
-
const i = t.fields.getByName(a);
|
|
596
|
-
return O({ f: i, s: e }, ({ f: g, s: f }) => {
|
|
597
|
-
const p = g && f[g.id] || null;
|
|
598
|
-
return p || (g != null && g.defaultValue ? g.defaultValue : null);
|
|
599
|
-
});
|
|
600
|
-
}
|
|
601
|
-
return F({
|
|
602
|
-
clock: r,
|
|
603
|
-
target: c.clearAll
|
|
604
|
-
}), F({
|
|
605
|
-
clock: n,
|
|
606
|
-
target: c.clear
|
|
607
|
-
}), {
|
|
608
|
-
register: u,
|
|
609
|
-
clearAll: r,
|
|
610
|
-
clear: n,
|
|
611
|
-
commit: o,
|
|
612
|
-
getResponsesToCommit: s,
|
|
613
|
-
listStore: h,
|
|
614
|
-
getAllStore: l,
|
|
615
|
-
getByFieldId: S,
|
|
616
|
-
getByFieldName: d
|
|
617
|
-
};
|
|
618
|
-
});
|
|
619
|
-
function Ye(t) {
|
|
620
|
-
return k(We, t);
|
|
621
|
-
}
|
|
622
|
-
const Je = () => "0.0.12-next.12";
|
|
623
|
-
function Qe() {
|
|
624
|
-
if (_()) {
|
|
625
|
-
const t = [
|
|
32
|
+
const T = () => W(), V = () => "0.0.12-next.14";
|
|
33
|
+
function G() {
|
|
34
|
+
if (h()) {
|
|
35
|
+
const i = [
|
|
626
36
|
document.currentScript,
|
|
627
37
|
document.getElementById("picked_script"),
|
|
628
38
|
document.getElementById("picked"),
|
|
629
39
|
document.getElementById("cvly"),
|
|
630
40
|
document.getElementById("cvly-x")
|
|
631
41
|
];
|
|
632
|
-
for (const e of
|
|
42
|
+
for (const e of i)
|
|
633
43
|
if (e != null && e.dataset.api)
|
|
634
44
|
return e.dataset.api;
|
|
635
45
|
}
|
|
636
46
|
return "https://api.picked.app";
|
|
637
47
|
}
|
|
638
|
-
function
|
|
639
|
-
if (!
|
|
48
|
+
function J() {
|
|
49
|
+
if (!_())
|
|
640
50
|
return {};
|
|
641
|
-
const
|
|
642
|
-
for (const [
|
|
643
|
-
|
|
644
|
-
for (const
|
|
645
|
-
const
|
|
646
|
-
e[
|
|
647
|
-
}
|
|
648
|
-
const
|
|
649
|
-
if (
|
|
650
|
-
|
|
51
|
+
const i = new URLSearchParams(window.location.search), e = {}, t = /* @__PURE__ */ new Set();
|
|
52
|
+
for (const [r] of i.entries())
|
|
53
|
+
r.startsWith("picked-") && t.add(r);
|
|
54
|
+
for (const r of t) {
|
|
55
|
+
const o = r.replace("picked-", "");
|
|
56
|
+
e[o] = i.getAll(r);
|
|
57
|
+
}
|
|
58
|
+
const s = H("s");
|
|
59
|
+
if (t.size > 0)
|
|
60
|
+
f.set(s, e);
|
|
651
61
|
else {
|
|
652
|
-
const
|
|
653
|
-
if (
|
|
654
|
-
return
|
|
62
|
+
const r = f.get(s);
|
|
63
|
+
if (r)
|
|
64
|
+
return r.json() || {};
|
|
655
65
|
}
|
|
656
66
|
return e;
|
|
657
67
|
}
|
|
658
|
-
|
|
659
|
-
if (ae())
|
|
660
|
-
return crypto.randomUUID();
|
|
661
|
-
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);
|
|
662
|
-
return `${t}-${e}-${r}-${n}`;
|
|
663
|
-
}
|
|
664
|
-
const et = () => ({
|
|
665
|
-
id: Ze()
|
|
666
|
-
}), tt = B("session", "global"), rt = () => {
|
|
667
|
-
if (!ie()) return null;
|
|
668
|
-
const t = D.get(tt);
|
|
669
|
-
let e = t.isSet() ? t.json() : null;
|
|
670
|
-
return e || (e = et(), t.set(e)), e;
|
|
671
|
-
}, st = () => rt();
|
|
672
|
-
class q {
|
|
68
|
+
class g {
|
|
673
69
|
constructor(e) {
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
70
|
+
n(this, "options");
|
|
71
|
+
n(this, "isReady", !1);
|
|
72
|
+
n(this, "project");
|
|
73
|
+
n(this, "plugins", {});
|
|
74
|
+
n(this, "eventBus", T());
|
|
75
|
+
n(this, "organizationId");
|
|
76
|
+
n(this, "projectId");
|
|
77
|
+
n(this, "apiUrl");
|
|
78
|
+
n(this, "session");
|
|
79
|
+
n(this, "searchParams", J());
|
|
80
|
+
n(this, "history", S());
|
|
81
|
+
n(this, "components", x({ client: this }));
|
|
82
|
+
n(this, "experienceInstances", K({ client: this }));
|
|
83
|
+
n(this, "experiences", I({ client: this }));
|
|
84
|
+
n(this, "frameworks", P({ client: this }));
|
|
85
|
+
n(this, "predicates", k({ client: this }));
|
|
86
|
+
n(this, "features", v({ client: this }));
|
|
87
|
+
n(this, "responses", E({ client: this }));
|
|
88
|
+
n(this, "fields", F());
|
|
89
|
+
n(this, "actions", b());
|
|
90
|
+
c("info", "Picked client initializing."), this.organizationId = e.organizationId, this.projectId = e.projectId, this.options = Object.freeze(e), this.apiUrl = e.apiUrl || G(), this.session = C(), this.setupPlugins(), this.setupFeatures(), this.setupPredicates(), this.setupActions(), this.eventBus({ type: "initialized", version: V() }), c("info", "Picked client initialized.");
|
|
695
91
|
}
|
|
696
92
|
start() {
|
|
697
|
-
|
|
698
|
-
|
|
93
|
+
A(this), (async () => {
|
|
94
|
+
h() && (document.body && d(this), await L(), await d(this), this.eventBus({ type: "ready" }), this.isReady = !0, this.session && this.eventBus({ type: "session", ...this.session }));
|
|
699
95
|
})();
|
|
700
96
|
}
|
|
701
97
|
registerFramework(e) {
|
|
702
|
-
|
|
98
|
+
R(e, this.frameworks);
|
|
703
99
|
}
|
|
704
|
-
registerComponent(e,
|
|
705
|
-
|
|
100
|
+
registerComponent(e, t) {
|
|
101
|
+
u(e, t, this.components);
|
|
706
102
|
}
|
|
707
103
|
registerPlugin(e) {
|
|
708
|
-
|
|
104
|
+
q(this, e, this.plugins);
|
|
709
105
|
}
|
|
710
|
-
registerFeature(e,
|
|
711
|
-
|
|
106
|
+
registerFeature(e, t) {
|
|
107
|
+
j(e, t, this.features);
|
|
712
108
|
}
|
|
713
|
-
registerPredicate(e,
|
|
714
|
-
|
|
109
|
+
registerPredicate(e, t) {
|
|
110
|
+
B(e, t, this.predicates);
|
|
715
111
|
}
|
|
716
112
|
registerField(e) {
|
|
717
|
-
|
|
113
|
+
z(e, this.fields);
|
|
718
114
|
}
|
|
719
|
-
registerAction(e,
|
|
720
|
-
|
|
115
|
+
registerAction(e, t) {
|
|
116
|
+
U(e, t, this.actions);
|
|
721
117
|
}
|
|
722
118
|
registerExperience(e) {
|
|
723
|
-
e.component &&
|
|
119
|
+
e.component && u(`experience:${e.id}`, e.component, this.components), O(e, this.experiences);
|
|
724
120
|
}
|
|
725
121
|
getStateSnapshot() {
|
|
726
|
-
return
|
|
122
|
+
return N(this);
|
|
727
123
|
}
|
|
728
124
|
async launchExperienceById(e) {
|
|
729
|
-
const
|
|
730
|
-
if (!
|
|
731
|
-
|
|
125
|
+
const t = this.experiences.getById(e).getState();
|
|
126
|
+
if (!t) {
|
|
127
|
+
c("warn", `Experience with id '${e}' not found.`);
|
|
732
128
|
return;
|
|
733
129
|
}
|
|
734
|
-
|
|
130
|
+
$(this, t);
|
|
735
131
|
}
|
|
736
132
|
// private async fetchProject() {
|
|
737
133
|
// if (this.project) {
|
|
@@ -744,38 +140,38 @@ class q {
|
|
|
744
140
|
// }
|
|
745
141
|
setupPlugins() {
|
|
746
142
|
var e;
|
|
747
|
-
(e = this.options.plugins) == null || e.forEach((
|
|
748
|
-
if (Array.isArray(
|
|
749
|
-
|
|
750
|
-
this.registerPlugin(
|
|
143
|
+
(e = this.options.plugins) == null || e.forEach((t) => {
|
|
144
|
+
if (Array.isArray(t)) {
|
|
145
|
+
t.forEach((r) => {
|
|
146
|
+
this.registerPlugin(r);
|
|
751
147
|
});
|
|
752
148
|
return;
|
|
753
149
|
}
|
|
754
|
-
const
|
|
755
|
-
if (Array.isArray(
|
|
756
|
-
|
|
150
|
+
const s = typeof t == "function" ? t() : t;
|
|
151
|
+
if (Array.isArray(s)) {
|
|
152
|
+
s.forEach((r) => this.registerPlugin(r));
|
|
757
153
|
return;
|
|
758
154
|
}
|
|
759
|
-
this.registerPlugin(
|
|
155
|
+
this.registerPlugin(s);
|
|
760
156
|
});
|
|
761
157
|
}
|
|
762
158
|
setupFeatures() {
|
|
763
159
|
const e = this.options.features;
|
|
764
|
-
e && (Object.entries(e).forEach(([
|
|
765
|
-
const
|
|
766
|
-
this.registerFeature(
|
|
767
|
-
}), this.searchParams.feature && this.searchParams.feature.forEach((
|
|
160
|
+
e && (Object.entries(e).forEach(([t, s]) => {
|
|
161
|
+
const r = typeof s == "function" ? s() : s;
|
|
162
|
+
this.registerFeature(t, r);
|
|
163
|
+
}), this.searchParams.feature && this.searchParams.feature.forEach((t) => {
|
|
768
164
|
try {
|
|
769
|
-
const [
|
|
770
|
-
if (!
|
|
165
|
+
const [s, r] = t.split(":");
|
|
166
|
+
if (!s || !r)
|
|
771
167
|
return;
|
|
772
|
-
let
|
|
773
|
-
|
|
774
|
-
key: `${
|
|
168
|
+
let o = r;
|
|
169
|
+
o === "true" && (o = !0), o === "false" && (o = !1), this.registerFeature(s, {
|
|
170
|
+
key: `${o}`,
|
|
775
171
|
// use the assigned bucket value as the key
|
|
776
|
-
name:
|
|
172
|
+
name: s,
|
|
777
173
|
// eslint-disable-next-line sonarjs/function-return-type
|
|
778
|
-
decide: () =>
|
|
174
|
+
decide: () => o,
|
|
779
175
|
storage: "session"
|
|
780
176
|
});
|
|
781
177
|
} catch {
|
|
@@ -784,73 +180,73 @@ class q {
|
|
|
784
180
|
}
|
|
785
181
|
setupPredicates() {
|
|
786
182
|
const e = this.options.predicates;
|
|
787
|
-
e && Object.entries(e).forEach(([
|
|
788
|
-
if (typeof
|
|
789
|
-
|
|
183
|
+
e && Object.entries(e).forEach(([t, s]) => {
|
|
184
|
+
if (typeof s != "function") {
|
|
185
|
+
c("warn", `Predicate "${t}" is not a function.`);
|
|
790
186
|
return;
|
|
791
187
|
}
|
|
792
|
-
this.registerPredicate(
|
|
188
|
+
this.registerPredicate(t, s);
|
|
793
189
|
});
|
|
794
190
|
}
|
|
795
191
|
setupActions() {
|
|
796
192
|
const e = this.options.actions;
|
|
797
|
-
e && Object.entries(e).forEach(([
|
|
798
|
-
if (typeof
|
|
799
|
-
|
|
193
|
+
e && Object.entries(e).forEach(([t, s]) => {
|
|
194
|
+
if (typeof s != "function") {
|
|
195
|
+
c("warn", `Action "${t}" is not a function.`);
|
|
800
196
|
return;
|
|
801
197
|
}
|
|
802
|
-
this.registerAction(
|
|
198
|
+
this.registerAction(t, s);
|
|
803
199
|
});
|
|
804
200
|
}
|
|
805
201
|
getPluginConfig(e) {
|
|
806
202
|
return this.plugins[e] ?? {};
|
|
807
203
|
}
|
|
808
204
|
}
|
|
809
|
-
|
|
810
|
-
function
|
|
205
|
+
n(g, "logger", c);
|
|
206
|
+
function m(i) {
|
|
811
207
|
var e;
|
|
812
|
-
return ((e =
|
|
208
|
+
return ((e = i.options) == null ? void 0 : e.some((t) => "condition" in t)) ?? !1;
|
|
813
209
|
}
|
|
814
|
-
function
|
|
815
|
-
return
|
|
210
|
+
function M(i) {
|
|
211
|
+
return i.some((e) => e.condition || m(e));
|
|
816
212
|
}
|
|
817
|
-
async function
|
|
818
|
-
return e.length === 0 || !
|
|
819
|
-
e.map(async (
|
|
820
|
-
if (!(
|
|
213
|
+
async function re(i, e) {
|
|
214
|
+
return e.length === 0 || !M(e) ? e : (await Promise.all(
|
|
215
|
+
e.map(async (s) => {
|
|
216
|
+
if (!(s.condition ? await l(i, s.condition) : !0))
|
|
821
217
|
return null;
|
|
822
|
-
if (!
|
|
823
|
-
return
|
|
824
|
-
const
|
|
825
|
-
|
|
826
|
-
)).filter((
|
|
827
|
-
return
|
|
218
|
+
if (!s.options || !m(s))
|
|
219
|
+
return s;
|
|
220
|
+
const p = (await Promise.all(
|
|
221
|
+
s.options.map(async (a) => a.condition ? await l(i, a.condition) ? a : null : a)
|
|
222
|
+
)).filter((a) => a !== null);
|
|
223
|
+
return p.length === s.options.length ? s : p.length === 0 ? null : { ...s, options: p };
|
|
828
224
|
})
|
|
829
|
-
)).filter((
|
|
225
|
+
)).filter((s) => s !== null);
|
|
830
226
|
}
|
|
831
|
-
const
|
|
832
|
-
const e = new
|
|
833
|
-
return
|
|
227
|
+
const oe = (i) => {
|
|
228
|
+
const e = new g(i);
|
|
229
|
+
return D(e), e;
|
|
834
230
|
};
|
|
835
231
|
export {
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
232
|
+
g as Picked,
|
|
233
|
+
oe as createClient,
|
|
234
|
+
H as createStorageKey,
|
|
235
|
+
l as evaluateRuleLogic,
|
|
236
|
+
re as getStepFields,
|
|
237
|
+
pe as isPickedRoot,
|
|
238
|
+
Ie as localStore,
|
|
239
|
+
f as sessionStore,
|
|
240
|
+
Pe as subscribe,
|
|
241
|
+
de as supportsCookies,
|
|
242
|
+
le as supportsCryptoRandomUUID,
|
|
243
|
+
h as supportsDocument,
|
|
244
|
+
fe as supportsHistory,
|
|
245
|
+
he as supportsIntersectionObserver,
|
|
246
|
+
ge as supportsLocalStorage,
|
|
247
|
+
me as supportsLocation,
|
|
248
|
+
ye as supportsSessionStorage,
|
|
249
|
+
we as supportsShadowRoot,
|
|
250
|
+
Se as supportsWebComponents,
|
|
251
|
+
_ as supportsWindow
|
|
856
252
|
};
|