@picked/client 0.0.64-next.2 → 0.0.64-next.3
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-D_oIl-en.js → api-DF8BSFOG.js} +1 -1
- package/dist/{api-CuNQH20q.cjs → api-Dktr48v4.cjs} +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/esm/index.js +198 -184
- package/dist/esm/plugins/dynamic-experiences/index.js +2 -2
- package/dist/esm/server/index.js +33 -33
- package/dist/experience-instance-BT_H2Zln.cjs +1 -0
- package/dist/{experience-instance-D-VVuZr-.js → experience-instance-v635I4oP.js} +130 -110
- package/dist/{plugin-DenaSt69.js → plugin-BQiuKtPl.js} +1 -1
- package/dist/{plugin-D-NSmQA5.cjs → plugin-DbiThXW5.cjs} +1 -1
- package/dist/types/entities/condition/condition.d.ts +9 -0
- package/dist/types/entities/condition/condition.d.ts.map +1 -1
- package/dist/types/lifecycle/condition-selection.d.ts +24 -0
- package/dist/types/lifecycle/condition-selection.d.ts.map +1 -1
- package/dist/types/lifecycle/rules-logic.d.ts.map +1 -1
- package/dist/types/server/index.d.ts +1 -1
- package/dist/types/server/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/experience-instance-CmCEFEJe.cjs +0 -1
package/dist/esm/index.js
CHANGED
|
@@ -3,9 +3,9 @@ import { n as t, t as n } from "../rules-logic-D_CVBuv7.js";
|
|
|
3
3
|
import { t as r } from "../logger-6z_gb4rA.js";
|
|
4
4
|
import { a as i, c as a, d as o, f as s, i as c, l, m as u, n as d, o as f, r as p, s as m, t as h, u as g } from "../supports-BgjwyijI.js";
|
|
5
5
|
import { a as _, i as v, r as ee, s as y, t as b } from "../dom-DjfSrkpp.js";
|
|
6
|
-
import {
|
|
6
|
+
import { l as x, n as S, r as C, u as w } from "../experience-instance-v635I4oP.js";
|
|
7
7
|
import { i as T, n as E, r as D, t as O } from "../storage-hOHCCXvP.js";
|
|
8
|
-
import { n as te, r as ne } from "../api-
|
|
8
|
+
import { n as te, r as ne } from "../api-DF8BSFOG.js";
|
|
9
9
|
import { t as re } from "../id-n2yrHvNo.js";
|
|
10
10
|
import { attach as k, combine as A, createApi as j, createDomain as M, createEffect as N, createEvent as P, createStore as F, sample as I } from "effector";
|
|
11
11
|
import { createFactory as L, invoke as R } from "@withease/factories";
|
|
@@ -22,7 +22,7 @@ var z = M("experience"), ie = L(({ client: e, experience: r }) => {
|
|
|
22
22
|
targetSelectors: e.targets,
|
|
23
23
|
initializeOpenLogic: e.initializeOpen
|
|
24
24
|
})), s = A(i, e.components.listStore, (e, t) => (e.componentName ? t.find((t) => t.name === e.componentName) : void 0) || t.find((t) => t.name === `experience:${e.id}`) || t.find((e) => e.name === "experience"), { skipVoid: !1 }), c = A(i, e.steps.indexStore, e.conditions.indexStore, (e, t, n) => {
|
|
25
|
-
let r = e.nodes.filter(
|
|
25
|
+
let r = e.nodes.filter(w).map((e) => t[e.stepId]).filter((e) => e !== void 0), i = e.nodes.filter(x).map((e) => n[e.conditionId]).filter((e) => e !== void 0);
|
|
26
26
|
return {
|
|
27
27
|
steps: r,
|
|
28
28
|
nodes: e.nodes,
|
|
@@ -323,70 +323,70 @@ function V(e) {
|
|
|
323
323
|
function H(e) {
|
|
324
324
|
return Array.isArray(e);
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function U(e) {
|
|
327
327
|
return e instanceof Promise;
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function Ce(e) {
|
|
330
330
|
return typeof e == "object" && !!e && !Array.isArray(e) && Object.keys(e).length === 1;
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function W(e) {
|
|
333
333
|
if (Se(e)) return e;
|
|
334
334
|
let t = parseFloat(`${e}`);
|
|
335
335
|
return isNaN(t) ? 0 : t;
|
|
336
336
|
}
|
|
337
|
-
function
|
|
337
|
+
function G(e) {
|
|
338
338
|
return `${e}`;
|
|
339
339
|
}
|
|
340
|
-
var
|
|
340
|
+
var we = {
|
|
341
341
|
"==": (e, t) => e == t,
|
|
342
342
|
"===": (e, t) => e === t,
|
|
343
343
|
"!=": (e, t) => e != t,
|
|
344
344
|
"!==": (e, t) => e !== t,
|
|
345
|
-
">": (e, t) =>
|
|
346
|
-
">=": (e, t) =>
|
|
345
|
+
">": (e, t) => W(e) > W(t),
|
|
346
|
+
">=": (e, t) => W(e) >= W(t),
|
|
347
347
|
"<": (e, t, n) => {
|
|
348
|
-
let r =
|
|
348
|
+
let r = W(e), i = W(t);
|
|
349
349
|
if (n === void 0) return r < i;
|
|
350
|
-
let a =
|
|
350
|
+
let a = W(n);
|
|
351
351
|
return r < i && i < a;
|
|
352
352
|
},
|
|
353
353
|
"<=": (e, t, n) => {
|
|
354
|
-
let r =
|
|
354
|
+
let r = W(e), i = W(t);
|
|
355
355
|
if (n === void 0) return r <= i;
|
|
356
|
-
let a =
|
|
356
|
+
let a = W(n);
|
|
357
357
|
return r <= i && i <= a;
|
|
358
358
|
},
|
|
359
|
-
"!!": async (e) => await
|
|
360
|
-
"!": async (e) => !await
|
|
361
|
-
"%": (e, t) =>
|
|
359
|
+
"!!": async (e) => await q(e),
|
|
360
|
+
"!": async (e) => !await q(e),
|
|
361
|
+
"%": (e, t) => W(e) % W(t),
|
|
362
362
|
log: (e) => (console.log(e), e),
|
|
363
|
-
in: (e, t) => t ? V(t) ? t.indexOf(
|
|
364
|
-
cat: (...e) => e.map(
|
|
363
|
+
in: (e, t) => t ? V(t) ? t.indexOf(G(e)) !== -1 : H(t) ? t.includes(e) : !1 : !1,
|
|
364
|
+
cat: (...e) => e.map(G).join(""),
|
|
365
365
|
substr: (e, t, n) => {
|
|
366
|
-
let r =
|
|
366
|
+
let r = G(e), i = W(t);
|
|
367
367
|
if (n === void 0) return r.substr(i);
|
|
368
|
-
let a =
|
|
368
|
+
let a = W(n);
|
|
369
369
|
if (a < 0) {
|
|
370
370
|
let e = r.substr(i);
|
|
371
371
|
return e.substr(0, e.length + a);
|
|
372
372
|
}
|
|
373
373
|
return r.substr(i, a);
|
|
374
374
|
},
|
|
375
|
-
"+": (...e) => e.reduce((e, t) =>
|
|
376
|
-
"*": (...e) => e.reduce((e, t) =>
|
|
375
|
+
"+": (...e) => e.reduce((e, t) => W(e) + W(t), 0),
|
|
376
|
+
"*": (...e) => e.reduce((e, t) => W(e) * W(t), 1),
|
|
377
377
|
"-": (e, t) => {
|
|
378
|
-
let n =
|
|
379
|
-
return t === void 0 ? -n : n -
|
|
378
|
+
let n = W(e);
|
|
379
|
+
return t === void 0 ? -n : n - W(t);
|
|
380
380
|
},
|
|
381
|
-
"/": (e, t) =>
|
|
382
|
-
min: (...e) => Math.min(...e.map(
|
|
383
|
-
max: (...e) => Math.max(...e.map(
|
|
381
|
+
"/": (e, t) => W(e) / W(t),
|
|
382
|
+
min: (...e) => Math.min(...e.map(W)),
|
|
383
|
+
max: (...e) => Math.max(...e.map(W)),
|
|
384
384
|
merge: (...e) => e.reduce((e, t) => H(t) ? e.concat(t) : e.concat([t]), []),
|
|
385
385
|
var(e, t) {
|
|
386
386
|
let n = arguments.length > 1 ? t : null;
|
|
387
387
|
if (e === "" || e === "." || e == null) return this;
|
|
388
388
|
if (typeof e == "number" && Array.isArray(this)) return e >= 0 && e < this.length ? this[e] : n;
|
|
389
|
-
let r =
|
|
389
|
+
let r = G(e);
|
|
390
390
|
if (r === "" || r === ".") return this;
|
|
391
391
|
let i = r.split("."), a = this;
|
|
392
392
|
for (let e of i) {
|
|
@@ -401,16 +401,16 @@ var Te = {
|
|
|
401
401
|
async missing(...e) {
|
|
402
402
|
let t = H(e[0]) ? e[0] : e, n = [];
|
|
403
403
|
for (let e of t) {
|
|
404
|
-
let t = await
|
|
404
|
+
let t = await K({ var: e }, this);
|
|
405
405
|
(t === null || t === "") && n.push(`${e}`);
|
|
406
406
|
}
|
|
407
407
|
return n;
|
|
408
408
|
},
|
|
409
409
|
async missing_some(e, t) {
|
|
410
|
-
let n = await
|
|
410
|
+
let n = await K({ missing: t }, this);
|
|
411
411
|
if (!H(n) || !H(t)) return [];
|
|
412
412
|
let r = n.filter(V);
|
|
413
|
-
return t.filter(V).length - r.length >=
|
|
413
|
+
return t.filter(V).length - r.length >= W(e) ? [] : r;
|
|
414
414
|
},
|
|
415
415
|
invoke(...e) {
|
|
416
416
|
let [t, ...n] = e;
|
|
@@ -424,110 +424,120 @@ var Te = {
|
|
|
424
424
|
let [t, i] = e;
|
|
425
425
|
n = t, r = i;
|
|
426
426
|
}
|
|
427
|
-
return !V(n) || !V(r) ? !1 : new RegExp(n, r).test(
|
|
427
|
+
return !V(n) || !V(r) ? !1 : new RegExp(n, r).test(G(t));
|
|
428
428
|
},
|
|
429
429
|
throw(e) {
|
|
430
|
-
throw Error(
|
|
430
|
+
throw Error(G(e));
|
|
431
431
|
}
|
|
432
432
|
};
|
|
433
|
-
async function
|
|
433
|
+
async function K(e, t) {
|
|
434
434
|
if (!e) return e;
|
|
435
|
-
if (
|
|
436
|
-
if (H(e)) return Promise.all(e.map((e) =>
|
|
437
|
-
if (!
|
|
438
|
-
let n =
|
|
435
|
+
if (U(e)) return K(await e, t);
|
|
436
|
+
if (H(e)) return Promise.all(e.map((e) => K(e, t)));
|
|
437
|
+
if (!Ce(e)) return e;
|
|
438
|
+
let n = Te(e), r = n ? e[n] ?? [] : [];
|
|
439
439
|
switch (H(r) || (r = [r]), n) {
|
|
440
440
|
case "if":
|
|
441
441
|
case "?:":
|
|
442
|
-
for (let e = 0; e < r.length - 1; e += 2) if (await
|
|
443
|
-
return r.length % 2 == 1 ?
|
|
442
|
+
for (let e = 0; e < r.length - 1; e += 2) if (await q(await K(r[e], t))) return K(r[e + 1], t);
|
|
443
|
+
return r.length % 2 == 1 ? K(r[r.length - 1], t) : null;
|
|
444
444
|
case "and": {
|
|
445
445
|
let e = null;
|
|
446
|
-
for (let n of r) if (e = await
|
|
446
|
+
for (let n of r) if (e = await K(n, t), !await q(e)) return e;
|
|
447
447
|
return e;
|
|
448
448
|
}
|
|
449
449
|
case "or": {
|
|
450
450
|
let e = null;
|
|
451
|
-
for (let n of r) if (e = await
|
|
451
|
+
for (let n of r) if (e = await K(n, t), await q(e)) return e;
|
|
452
452
|
return e;
|
|
453
453
|
}
|
|
454
454
|
case "map": {
|
|
455
|
-
let e = await
|
|
456
|
-
return H(e) ? await Promise.all(e.map((e) =>
|
|
455
|
+
let e = await K(r[0], t);
|
|
456
|
+
return H(e) ? await Promise.all(e.map((e) => K(r[1], e))) : [];
|
|
457
457
|
}
|
|
458
458
|
case "filter": {
|
|
459
|
-
let e = await
|
|
459
|
+
let e = await K(r[0], t);
|
|
460
460
|
return H(e) ? (await Promise.all(e.map(async (e) => ({
|
|
461
461
|
item: e,
|
|
462
|
-
shouldInclude: await
|
|
462
|
+
shouldInclude: await q(await K(r[1], e))
|
|
463
463
|
})))).filter(({ shouldInclude: e }) => e).map(({ item: e }) => e) : [];
|
|
464
464
|
}
|
|
465
465
|
case "reduce": {
|
|
466
|
-
let e = await
|
|
467
|
-
if (!H(e)) return r.length > 2 ? await
|
|
468
|
-
let n = r[1], i = r.length > 2 ? await
|
|
469
|
-
for (let t of e) i = await
|
|
466
|
+
let e = await K(r[0], t);
|
|
467
|
+
if (!H(e)) return r.length > 2 ? await K(r[2], t) : null;
|
|
468
|
+
let n = r[1], i = r.length > 2 ? await K(r[2], t) : null;
|
|
469
|
+
for (let t of e) i = await K(n, {
|
|
470
470
|
current: t,
|
|
471
471
|
accumulator: i
|
|
472
472
|
});
|
|
473
473
|
return i;
|
|
474
474
|
}
|
|
475
475
|
case "all": {
|
|
476
|
-
let e = await
|
|
476
|
+
let e = await K(r[0], t);
|
|
477
477
|
if (!H(e) || e.length === 0) return !1;
|
|
478
|
-
for (let t of e) if (!await
|
|
478
|
+
for (let t of e) if (!await q(await K(r[1], t))) return !1;
|
|
479
479
|
return !0;
|
|
480
480
|
}
|
|
481
481
|
case "some": {
|
|
482
|
-
let e = await
|
|
482
|
+
let e = await K(r[0], t);
|
|
483
483
|
if (!H(e)) return !1;
|
|
484
|
-
for (let t of e) if (await
|
|
484
|
+
for (let t of e) if (await q(await K(r[1], t))) return !0;
|
|
485
485
|
return !1;
|
|
486
486
|
}
|
|
487
487
|
case "none": {
|
|
488
|
-
let e = await
|
|
488
|
+
let e = await K(r[0], t);
|
|
489
489
|
if (!H(e)) return !0;
|
|
490
|
-
for (let t of e) if (await
|
|
490
|
+
for (let t of e) if (await q(await K(r[1], t))) return !1;
|
|
491
491
|
return !0;
|
|
492
492
|
}
|
|
493
493
|
case "catch": try {
|
|
494
|
-
return await
|
|
494
|
+
return await K(r[0], t);
|
|
495
495
|
} catch (e) {
|
|
496
|
-
return
|
|
496
|
+
return Ce(e) ? await K(e, t) : r[1] ? await K(r[1], e) : e instanceof Error ? e.message : e;
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
|
-
let i = await Promise.all(r.map((e) =>
|
|
499
|
+
let i = await Promise.all(r.map((e) => K(e, t))), a = n ? we[n] : void 0;
|
|
500
500
|
if (!a) throw Error(`Unrecognized operation ${n}`);
|
|
501
501
|
return a.apply(t, i);
|
|
502
502
|
}
|
|
503
|
-
async function
|
|
504
|
-
return
|
|
503
|
+
async function q(e) {
|
|
504
|
+
return U(e) ? q(await e) : !(Array.isArray(e) && e.length === 0) && !!e;
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function Te(e) {
|
|
507
507
|
return Object.keys(e)[0];
|
|
508
508
|
}
|
|
509
509
|
//#endregion
|
|
510
510
|
//#region src/lifecycle/rules-logic.ts
|
|
511
|
+
function Ee(e, t, n) {
|
|
512
|
+
return new Proxy(Object.create(null), { get(r, i) {
|
|
513
|
+
if (typeof i != "string") return;
|
|
514
|
+
let a = e.find((e) => e.key === i);
|
|
515
|
+
if (a !== void 0) return async () => n.has(i) ? !1 : await K(a.logic, {
|
|
516
|
+
...t,
|
|
517
|
+
conditions: Ee(e, t, new Set(n).add(i))
|
|
518
|
+
}) === !0;
|
|
519
|
+
} });
|
|
520
|
+
}
|
|
511
521
|
var De = L(({ client: e }) => k({
|
|
512
522
|
source: {
|
|
513
523
|
stateSnapshot: e.stateSnapshotStore,
|
|
514
524
|
predicates: e.predicates.listStore,
|
|
515
525
|
actions: e.actions.listStore,
|
|
516
526
|
features: e.features.listStore,
|
|
517
|
-
responses: e.responses.getAllStore
|
|
527
|
+
responses: e.responses.getAllStore,
|
|
528
|
+
conditions: e.conditions.listStore
|
|
518
529
|
},
|
|
519
|
-
effect: async ({ stateSnapshot: e, predicates: t, actions: n, features: r, responses: i }, { rule:
|
|
520
|
-
let
|
|
530
|
+
effect: async ({ stateSnapshot: e, predicates: t, actions: n, features: r, responses: i, conditions: a }, { rule: o, context: s }) => {
|
|
531
|
+
let c = t.reduce((t, n) => (t[n.name] = async (...t) => await n.predicate({
|
|
521
532
|
...e,
|
|
522
533
|
args: t
|
|
523
|
-
}), t), {}),
|
|
534
|
+
}), t), {}), l = n.reduce((t, n) => (t[n.key] = async (...t) => await n.action({
|
|
524
535
|
...e,
|
|
525
536
|
args: t
|
|
526
|
-
}, null) ?? void 0, t), {}),
|
|
537
|
+
}, null) ?? void 0, t), {}), u = r.reduce((e, t) => (e[t.id] = async () => {
|
|
527
538
|
let { bucket: e } = await t.getBucket();
|
|
528
539
|
return e;
|
|
529
|
-
}, e), {})
|
|
530
|
-
return await G(a, {
|
|
540
|
+
}, e), {}), d = {
|
|
531
541
|
responses: i,
|
|
532
542
|
location: typeof e.location == "object" ? {
|
|
533
543
|
hash: e.location.hash,
|
|
@@ -540,10 +550,14 @@ var De = L(({ client: e }) => k({
|
|
|
540
550
|
protocol: e.location.protocol,
|
|
541
551
|
search: e.location.search
|
|
542
552
|
} : void 0,
|
|
543
|
-
predicates:
|
|
544
|
-
actions:
|
|
545
|
-
features:
|
|
546
|
-
...
|
|
553
|
+
predicates: c,
|
|
554
|
+
actions: l,
|
|
555
|
+
features: u,
|
|
556
|
+
...s
|
|
557
|
+
};
|
|
558
|
+
return await K(o, {
|
|
559
|
+
...d,
|
|
560
|
+
conditions: Ee(a, d, /* @__PURE__ */ new Set())
|
|
547
561
|
});
|
|
548
562
|
}
|
|
549
563
|
}));
|
|
@@ -566,19 +580,19 @@ var ke = 6e3, Ae = O("last_ping", "global"), je = async (e) => {
|
|
|
566
580
|
} catch {
|
|
567
581
|
return !1;
|
|
568
582
|
}
|
|
569
|
-
},
|
|
570
|
-
let t =
|
|
583
|
+
}, J = M("lifecycle"), Me = L(({ client: e }) => {
|
|
584
|
+
let t = J.store(!1), r = F(void 0, {
|
|
571
585
|
skipVoid: !1,
|
|
572
|
-
domain:
|
|
586
|
+
domain: J
|
|
573
587
|
}), i = F(void 0, {
|
|
574
588
|
skipVoid: !1,
|
|
575
|
-
domain:
|
|
576
|
-
}), a =
|
|
589
|
+
domain: J
|
|
590
|
+
}), a = J.store("idle"), o = J.store([]), s = F(void 0, {
|
|
577
591
|
skipVoid: !1,
|
|
578
|
-
domain:
|
|
592
|
+
domain: J
|
|
579
593
|
}), l = F(void 0, {
|
|
580
594
|
skipVoid: !1,
|
|
581
|
-
domain:
|
|
595
|
+
domain: J
|
|
582
596
|
}), u = P(), d = P(), f = P(), p = P(), m = P(), h = P();
|
|
583
597
|
o.on(p, (e, t) => [...e, t]), s.on(m, (e, t) => t), l.on(h, (e, t) => t), t.on(d, () => !0);
|
|
584
598
|
let g = N(() => {
|
|
@@ -783,8 +797,8 @@ var Le = (e, t, n) => {
|
|
|
783
797
|
name: e,
|
|
784
798
|
predicate: t
|
|
785
799
|
});
|
|
786
|
-
},
|
|
787
|
-
let t =
|
|
800
|
+
}, Re = M("feature"), ze = L(({ client: e }) => {
|
|
801
|
+
let t = Re.store({}), n = Re.store([]), i = j(t, { register(e, t) {
|
|
788
802
|
return {
|
|
789
803
|
...e,
|
|
790
804
|
[t.id]: t.feature
|
|
@@ -945,16 +959,16 @@ var Le = (e, t, n) => {
|
|
|
945
959
|
getEvokableFeature: p
|
|
946
960
|
};
|
|
947
961
|
});
|
|
948
|
-
function
|
|
949
|
-
return R(
|
|
962
|
+
function Be(e) {
|
|
963
|
+
return R(ze, e);
|
|
950
964
|
}
|
|
951
|
-
var
|
|
965
|
+
var Ve = (e, t, n) => {
|
|
952
966
|
n.register({
|
|
953
967
|
id: e,
|
|
954
968
|
feature: t
|
|
955
969
|
});
|
|
956
970
|
}, Y = M("history");
|
|
957
|
-
function
|
|
971
|
+
function He(e, t) {
|
|
958
972
|
return {
|
|
959
973
|
id: re(`history-entry-${Date.now()}-${Math.random()}}`),
|
|
960
974
|
node: t,
|
|
@@ -962,9 +976,9 @@ function Ve(e, t) {
|
|
|
962
976
|
experienceId: e
|
|
963
977
|
};
|
|
964
978
|
}
|
|
965
|
-
var
|
|
979
|
+
var Ue = L(() => {
|
|
966
980
|
let e = Y.store({ entries: [] }), t = Y.event(), n = Y.event(), r = Y.event(), i = Y.event();
|
|
967
|
-
e.on(t, (e, t) => ({ entries: [...e.entries,
|
|
981
|
+
e.on(t, (e, t) => ({ entries: [...e.entries, He(t.experienceId, t.node)] })), e.on(n, (e, t) => ({ entries: [...e.entries.slice(0, -1), He(t.experienceId, t.node)] })), e.on(i, (e, t) => t);
|
|
968
982
|
function a(e, t) {
|
|
969
983
|
let n = {
|
|
970
984
|
lastStepIndex: -1,
|
|
@@ -972,7 +986,7 @@ var He = L(() => {
|
|
|
972
986
|
};
|
|
973
987
|
for (let r = e.length - 1; r >= 0; r--) {
|
|
974
988
|
let i = e[r], a = i?.node;
|
|
975
|
-
if (!(!a || !
|
|
989
|
+
if (!(!a || !w(a)) && !(t && i.experienceId !== t)) if (n.lastStepIndex === -1) n.lastStepIndex = r;
|
|
976
990
|
else {
|
|
977
991
|
n.secondLastStepIndex = r;
|
|
978
992
|
break;
|
|
@@ -994,20 +1008,20 @@ var He = L(() => {
|
|
|
994
1008
|
entriesStore: e.map((e) => e.entries)
|
|
995
1009
|
};
|
|
996
1010
|
});
|
|
997
|
-
function
|
|
998
|
-
return R(
|
|
1011
|
+
function We() {
|
|
1012
|
+
return R(Ue);
|
|
999
1013
|
}
|
|
1000
1014
|
//#endregion
|
|
1001
1015
|
//#region src/utils/events.ts
|
|
1002
|
-
var
|
|
1016
|
+
var Ge = 0, Ke = (e) => {
|
|
1003
1017
|
let t = F([]);
|
|
1004
1018
|
return t.on(e, (e, t) => [...e, {
|
|
1005
|
-
id:
|
|
1019
|
+
id: Ge++,
|
|
1006
1020
|
at: /* @__PURE__ */ new Date(),
|
|
1007
1021
|
payload: t
|
|
1008
1022
|
}]), t;
|
|
1009
|
-
},
|
|
1010
|
-
let e =
|
|
1023
|
+
}, qe = M("field"), Je = L(() => {
|
|
1024
|
+
let e = qe.store({}), t = j(e, {
|
|
1011
1025
|
register(e, t) {
|
|
1012
1026
|
return {
|
|
1013
1027
|
...e,
|
|
@@ -1055,13 +1069,13 @@ var We = 0, Ge = (e) => {
|
|
|
1055
1069
|
getByName: c
|
|
1056
1070
|
};
|
|
1057
1071
|
});
|
|
1058
|
-
function
|
|
1059
|
-
return R(
|
|
1072
|
+
function Ye() {
|
|
1073
|
+
return R(Je);
|
|
1060
1074
|
}
|
|
1061
1075
|
//#endregion
|
|
1062
1076
|
//#region src/entities/step/step.ts
|
|
1063
|
-
var
|
|
1064
|
-
let e =
|
|
1077
|
+
var Xe = M("step"), Ze = L(() => {
|
|
1078
|
+
let e = Xe.store({}), t = j(e, { register(e, t) {
|
|
1065
1079
|
return {
|
|
1066
1080
|
...e,
|
|
1067
1081
|
[t.step.id]: t.step
|
|
@@ -1085,16 +1099,16 @@ var Ye = M("step"), Xe = L(() => {
|
|
|
1085
1099
|
indexStore: e
|
|
1086
1100
|
};
|
|
1087
1101
|
});
|
|
1088
|
-
function
|
|
1089
|
-
return R(
|
|
1102
|
+
function Qe() {
|
|
1103
|
+
return R(Ze);
|
|
1090
1104
|
}
|
|
1091
|
-
function
|
|
1105
|
+
function $e(e, t) {
|
|
1092
1106
|
t.register(e);
|
|
1093
1107
|
}
|
|
1094
1108
|
//#endregion
|
|
1095
1109
|
//#region src/entities/content/content.ts
|
|
1096
|
-
var
|
|
1097
|
-
let e =
|
|
1110
|
+
var et = M("content"), tt = L(() => {
|
|
1111
|
+
let e = et.store({}), t = j(e, { register(e, t) {
|
|
1098
1112
|
return {
|
|
1099
1113
|
...e,
|
|
1100
1114
|
[t.content.id]: t.content
|
|
@@ -1114,16 +1128,16 @@ var $e = M("content"), et = L(() => {
|
|
|
1114
1128
|
indexStore: e
|
|
1115
1129
|
};
|
|
1116
1130
|
});
|
|
1117
|
-
function
|
|
1118
|
-
return R(
|
|
1131
|
+
function nt() {
|
|
1132
|
+
return R(tt);
|
|
1119
1133
|
}
|
|
1120
|
-
function
|
|
1134
|
+
function rt(e, t) {
|
|
1121
1135
|
t.register(e);
|
|
1122
1136
|
}
|
|
1123
1137
|
//#endregion
|
|
1124
1138
|
//#region src/entities/action/action.ts
|
|
1125
|
-
var
|
|
1126
|
-
let t =
|
|
1139
|
+
var it = M("action"), at = L(({ client: e }) => {
|
|
1140
|
+
let t = it.store({}), n = j(t, { register(e, t) {
|
|
1127
1141
|
return {
|
|
1128
1142
|
...e,
|
|
1129
1143
|
[t.key]: {
|
|
@@ -1181,10 +1195,10 @@ var rt = M("action"), it = L(({ client: e }) => {
|
|
|
1181
1195
|
getEvokableAction: s
|
|
1182
1196
|
};
|
|
1183
1197
|
});
|
|
1184
|
-
function
|
|
1185
|
-
return R(
|
|
1198
|
+
function ot(e) {
|
|
1199
|
+
return R(at, e);
|
|
1186
1200
|
}
|
|
1187
|
-
var
|
|
1201
|
+
var st = (e, t, n) => {
|
|
1188
1202
|
n.register({
|
|
1189
1203
|
key: e,
|
|
1190
1204
|
action: t
|
|
@@ -1203,35 +1217,35 @@ function X(e, t, n, r) {
|
|
|
1203
1217
|
function Z(e) {
|
|
1204
1218
|
return e === null || e === "" || Array.isArray(e) && !e.length;
|
|
1205
1219
|
}
|
|
1206
|
-
function
|
|
1220
|
+
function ct(e) {
|
|
1207
1221
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null;
|
|
1208
1222
|
}
|
|
1209
|
-
function
|
|
1223
|
+
function lt(e) {
|
|
1210
1224
|
try {
|
|
1211
1225
|
return JSON.stringify(e), !0;
|
|
1212
1226
|
} catch {
|
|
1213
1227
|
return !1;
|
|
1214
1228
|
}
|
|
1215
1229
|
}
|
|
1216
|
-
function
|
|
1230
|
+
function ut(e, t) {
|
|
1217
1231
|
return t.find((t) => t.key === e) ?? null;
|
|
1218
1232
|
}
|
|
1219
|
-
function
|
|
1233
|
+
function dt(e, t) {
|
|
1220
1234
|
return e.multiple && (typeof t == "string" || typeof t == "number" || typeof t == "boolean") ? [t] : t;
|
|
1221
1235
|
}
|
|
1222
|
-
function
|
|
1236
|
+
function ft(e, t) {
|
|
1223
1237
|
if (e.type !== "object" || Z(t)) return null;
|
|
1224
1238
|
if (e.multiple) {
|
|
1225
1239
|
if (!Array.isArray(t)) return X(e, t, "This field expects multiple values", "Field expects an array of objects.");
|
|
1226
1240
|
for (let n of t) {
|
|
1227
1241
|
if (typeof n != "object" || !n) return X(e, t, "This field expects object values", "Field expects an array of objects, but received non-object value.");
|
|
1228
|
-
if (!
|
|
1242
|
+
if (!lt(n)) return X(e, t, "This field contains non-serializable data", "Field value contains non-JSON-serializable data (functions, circular references, etc.).");
|
|
1229
1243
|
}
|
|
1230
1244
|
return null;
|
|
1231
1245
|
}
|
|
1232
|
-
return Array.isArray(t) ? X(e, t, "This field expects a single value", "Field expects a single object, not an array.") : typeof t != "object" || !t ? X(e, t, "This field expects an object value", "Field expects an object value.") :
|
|
1246
|
+
return Array.isArray(t) ? X(e, t, "This field expects a single value", "Field expects a single object, not an array.") : typeof t != "object" || !t ? X(e, t, "This field expects an object value", "Field expects an object value.") : lt(t) ? null : X(e, t, "This field contains non-serializable data", "Field value contains non-JSON-serializable data (functions, circular references, etc.).");
|
|
1233
1247
|
}
|
|
1234
|
-
function
|
|
1248
|
+
function pt(e, t) {
|
|
1235
1249
|
if (Z(t) || !Array.isArray(e.options) || e.options.length === 0) return null;
|
|
1236
1250
|
let n = Array.isArray(t) ? t : [t];
|
|
1237
1251
|
if (e.type === "object") {
|
|
@@ -1239,9 +1253,9 @@ function ft(e, t) {
|
|
|
1239
1253
|
return n.every((e) => r.has(JSON.stringify(e))) ? null : X(e, t, "This field expects a valid option", "Field expects a valid option from the defined choices.");
|
|
1240
1254
|
}
|
|
1241
1255
|
let r = e.options.map((e) => e.value);
|
|
1242
|
-
return n.every((e) => !
|
|
1256
|
+
return n.every((e) => !ct(e) || e === null ? !1 : r.includes(e)) ? null : X(e, t, "This field expects a valid option", `Field expects a valid option. Valid options are: ${r.join(", ")}`);
|
|
1243
1257
|
}
|
|
1244
|
-
async function
|
|
1258
|
+
async function mt(t, n, r, i) {
|
|
1245
1259
|
if (n.validation && !e(n.validation) && !Z(r)) {
|
|
1246
1260
|
let e = i ? {
|
|
1247
1261
|
$input: r,
|
|
@@ -1254,8 +1268,8 @@ async function pt(t, n, r, i) {
|
|
|
1254
1268
|
}
|
|
1255
1269
|
//#endregion
|
|
1256
1270
|
//#region src/entities/response/response.ts
|
|
1257
|
-
var
|
|
1258
|
-
let t =
|
|
1271
|
+
var ht = M("response"), gt = L(({ client: e }) => {
|
|
1272
|
+
let t = ht.store({}), r = P(), i = P(), a = j(t, {
|
|
1259
1273
|
register(e, t) {
|
|
1260
1274
|
return {
|
|
1261
1275
|
...e,
|
|
@@ -1294,7 +1308,7 @@ var mt = M("response"), ht = L(({ client: e }) => {
|
|
|
1294
1308
|
...t,
|
|
1295
1309
|
...n
|
|
1296
1310
|
}, o = Object.entries(n), c = await Promise.allSettled(o.map(async ([t, n]) => {
|
|
1297
|
-
let o =
|
|
1311
|
+
let o = ut(t, e);
|
|
1298
1312
|
if (!o) {
|
|
1299
1313
|
r.push({
|
|
1300
1314
|
fieldKey: t,
|
|
@@ -1304,17 +1318,17 @@ var mt = M("response"), ht = L(({ client: e }) => {
|
|
|
1304
1318
|
});
|
|
1305
1319
|
return;
|
|
1306
1320
|
}
|
|
1307
|
-
let c =
|
|
1321
|
+
let c = dt(o, n), l = await mt(s, o, c, a);
|
|
1308
1322
|
if (l) {
|
|
1309
1323
|
r.push(l);
|
|
1310
1324
|
return;
|
|
1311
1325
|
}
|
|
1312
|
-
let u =
|
|
1326
|
+
let u = ft(o, c);
|
|
1313
1327
|
if (u) {
|
|
1314
1328
|
r.push(u);
|
|
1315
1329
|
return;
|
|
1316
1330
|
}
|
|
1317
|
-
let d =
|
|
1331
|
+
let d = pt(o, c);
|
|
1318
1332
|
if (d) {
|
|
1319
1333
|
r.push(d);
|
|
1320
1334
|
return;
|
|
@@ -1393,13 +1407,13 @@ var mt = M("response"), ht = L(({ client: e }) => {
|
|
|
1393
1407
|
getByFieldName: _
|
|
1394
1408
|
};
|
|
1395
1409
|
});
|
|
1396
|
-
function
|
|
1397
|
-
return R(
|
|
1410
|
+
function _t(e) {
|
|
1411
|
+
return R(gt, e);
|
|
1398
1412
|
}
|
|
1399
1413
|
//#endregion
|
|
1400
1414
|
//#region src/entities/condition/condition.ts
|
|
1401
|
-
var
|
|
1402
|
-
let e =
|
|
1415
|
+
var vt = M("condition"), yt = L(() => {
|
|
1416
|
+
let e = vt.store({}), t = j(e, { register(e, t) {
|
|
1403
1417
|
return {
|
|
1404
1418
|
...e,
|
|
1405
1419
|
[t.condition.id]: t.condition
|
|
@@ -1423,12 +1437,12 @@ var _t = M("condition"), vt = L(() => {
|
|
|
1423
1437
|
indexStore: e
|
|
1424
1438
|
};
|
|
1425
1439
|
});
|
|
1426
|
-
function
|
|
1427
|
-
return R(
|
|
1440
|
+
function bt() {
|
|
1441
|
+
return R(yt);
|
|
1428
1442
|
}
|
|
1429
1443
|
//#endregion
|
|
1430
1444
|
//#region src/utils/api-url.ts
|
|
1431
|
-
function
|
|
1445
|
+
function xt() {
|
|
1432
1446
|
if (c()) {
|
|
1433
1447
|
let e = [
|
|
1434
1448
|
document.currentScript,
|
|
@@ -1443,7 +1457,7 @@ function bt() {
|
|
|
1443
1457
|
}
|
|
1444
1458
|
//#endregion
|
|
1445
1459
|
//#region src/utils/search-params.ts
|
|
1446
|
-
function
|
|
1460
|
+
function St() {
|
|
1447
1461
|
if (!s()) return {};
|
|
1448
1462
|
let e = new URLSearchParams(window.location.search), t = {}, n = /* @__PURE__ */ new Set();
|
|
1449
1463
|
for (let [t] of e.entries()) t.startsWith("picked-") && n.add(t);
|
|
@@ -1461,13 +1475,13 @@ function xt() {
|
|
|
1461
1475
|
}
|
|
1462
1476
|
//#endregion
|
|
1463
1477
|
//#region src/entities/session/session.ts
|
|
1464
|
-
var
|
|
1465
|
-
function
|
|
1478
|
+
var Ct = O("session", "global");
|
|
1479
|
+
function wt() {
|
|
1466
1480
|
return p() ? crypto.randomUUID() : `${Date.now().toString(36)}-${Math.random().toString(36).substring(2, 15)}-${Math.random().toString(36).substring(2, 15)}-${Math.random().toString(36).substring(2, 15)}`;
|
|
1467
1481
|
}
|
|
1468
|
-
function
|
|
1482
|
+
function Tt() {
|
|
1469
1483
|
if (!m()) return null;
|
|
1470
|
-
let e = E.get(
|
|
1484
|
+
let e = E.get(Ct);
|
|
1471
1485
|
if (!e.isSet()) return null;
|
|
1472
1486
|
try {
|
|
1473
1487
|
return e.json();
|
|
@@ -1475,8 +1489,8 @@ function wt() {
|
|
|
1475
1489
|
return null;
|
|
1476
1490
|
}
|
|
1477
1491
|
}
|
|
1478
|
-
var
|
|
1479
|
-
let e =
|
|
1492
|
+
var Et = L(() => {
|
|
1493
|
+
let e = Tt(), t = { id: e?.id ?? wt() };
|
|
1480
1494
|
e?.isUser !== void 0 && (t.isUser = e.isUser), e?.identifiers && Object.keys(e.identifiers).length > 0 && (t.identifiers = e.identifiers);
|
|
1481
1495
|
let n = F(t), r = j(n, {
|
|
1482
1496
|
setIsUser: (e, t) => ({
|
|
@@ -1505,7 +1519,7 @@ var Tt = L(() => {
|
|
|
1505
1519
|
source: n,
|
|
1506
1520
|
effect: (e) => {
|
|
1507
1521
|
if (m()) try {
|
|
1508
|
-
E.get(
|
|
1522
|
+
E.get(Ct).set(e);
|
|
1509
1523
|
} catch {}
|
|
1510
1524
|
}
|
|
1511
1525
|
})
|
|
@@ -1516,27 +1530,27 @@ var Tt = L(() => {
|
|
|
1516
1530
|
removeIdentifier: r.removeIdentifier
|
|
1517
1531
|
};
|
|
1518
1532
|
});
|
|
1519
|
-
function
|
|
1520
|
-
return R(
|
|
1533
|
+
function Dt() {
|
|
1534
|
+
return R(Et, void 0);
|
|
1521
1535
|
}
|
|
1522
1536
|
//#endregion
|
|
1523
1537
|
//#region src/utils/picked-config.ts
|
|
1524
|
-
function Dt() {
|
|
1525
|
-
if (s()) return globalThis.window.pickedConfig;
|
|
1526
|
-
}
|
|
1527
1538
|
function Ot() {
|
|
1528
|
-
if (s()) return
|
|
1539
|
+
if (s()) return globalThis.window.pickedConfig;
|
|
1529
1540
|
}
|
|
1530
1541
|
function kt() {
|
|
1542
|
+
if (s()) return Ot()?.projectId;
|
|
1543
|
+
}
|
|
1544
|
+
function At() {
|
|
1531
1545
|
if (!c()) return;
|
|
1532
1546
|
let e = document.getElementById("picked_script") || document.querySelector("script#picked") || document.getElementById("cvly");
|
|
1533
1547
|
if (e) return e.dataset.projectid || e.getAttribute("project-id") || void 0;
|
|
1534
1548
|
}
|
|
1535
|
-
function
|
|
1549
|
+
function jt(e) {
|
|
1536
1550
|
if (e.projectId) return e.projectId;
|
|
1537
|
-
let t =
|
|
1551
|
+
let t = kt();
|
|
1538
1552
|
if (t) return t;
|
|
1539
|
-
let n =
|
|
1553
|
+
let n = At();
|
|
1540
1554
|
if (n) return n;
|
|
1541
1555
|
throw Error("projectId is required. You can provide it via one of:\n (1) createClient({ projectId }) options;\n (2) window.pickedConfig = { projectId };\n (3) a <script> tag with id 'picked_script', 'picked', or 'cvly' that includes a data-projectid (or project-id) attribute.");
|
|
1542
1556
|
}
|
|
@@ -1545,7 +1559,7 @@ function At(e) {
|
|
|
1545
1559
|
function Q(e) {
|
|
1546
1560
|
return e == null || e === "" || Number.isNaN(e);
|
|
1547
1561
|
}
|
|
1548
|
-
var
|
|
1562
|
+
var Mt = {
|
|
1549
1563
|
default: (e, t) => Q(e) ? String(t ?? "") : String(e),
|
|
1550
1564
|
append: (e, t) => t && !Q(e) ? `${e} ${t}` : e,
|
|
1551
1565
|
prepend: (e, t) => t && !Q(e) ? `${t} ${e}` : e,
|
|
@@ -1566,24 +1580,24 @@ var jt = {
|
|
|
1566
1580
|
return e instanceof Set ? t.format(Array.from(e).map(String)) : e;
|
|
1567
1581
|
}
|
|
1568
1582
|
};
|
|
1569
|
-
function
|
|
1583
|
+
function Nt(e) {
|
|
1570
1584
|
return typeof e == "object" && !!e;
|
|
1571
1585
|
}
|
|
1572
|
-
function
|
|
1586
|
+
function Pt(e, t) {
|
|
1573
1587
|
let n = t;
|
|
1574
|
-
for (let t of e.split(".")) if (
|
|
1588
|
+
for (let t of e.split(".")) if (Nt(n) && t in n) n = n[t];
|
|
1575
1589
|
else return;
|
|
1576
1590
|
return typeof n == "function" ? n() : n;
|
|
1577
1591
|
}
|
|
1578
|
-
function
|
|
1579
|
-
let n = e.split("|").map((e) => e.trim()), r =
|
|
1592
|
+
function Ft(e, t) {
|
|
1593
|
+
let n = e.split("|").map((e) => e.trim()), r = Pt(n.shift() ?? "", t);
|
|
1580
1594
|
for (let e of n) {
|
|
1581
|
-
let [t, ...n] = e.split(":"), i = t?.trim() ?? "", a = n.join(":").trim().replaceAll(/(?:^['"]|['"]$)/g, ""), o =
|
|
1595
|
+
let [t, ...n] = e.split(":"), i = t?.trim() ?? "", a = n.join(":").trim().replaceAll(/(?:^['"]|['"]$)/g, ""), o = Mt[i];
|
|
1582
1596
|
o && (r = o(r, a));
|
|
1583
1597
|
}
|
|
1584
1598
|
return Q(r) ? "" : typeof r == "object" ? JSON.stringify(r) : String(r);
|
|
1585
1599
|
}
|
|
1586
|
-
function
|
|
1600
|
+
function It(e, t) {
|
|
1587
1601
|
let n = "", r = 0;
|
|
1588
1602
|
for (; r < e.length;) if (e[r] === "{" && e[r + 1] === "{") {
|
|
1589
1603
|
r += 2;
|
|
@@ -1595,7 +1609,7 @@ function Ft(e, t) {
|
|
|
1595
1609
|
}
|
|
1596
1610
|
i += e[r++];
|
|
1597
1611
|
}
|
|
1598
|
-
n +=
|
|
1612
|
+
n += Ft(i.trim(), t);
|
|
1599
1613
|
} else n += e[r++];
|
|
1600
1614
|
return n;
|
|
1601
1615
|
}
|
|
@@ -1613,22 +1627,22 @@ var $ = class {
|
|
|
1613
1627
|
apiUrl;
|
|
1614
1628
|
dashboardUrl;
|
|
1615
1629
|
documentationSiteUrl;
|
|
1616
|
-
session =
|
|
1617
|
-
searchParams =
|
|
1618
|
-
history =
|
|
1630
|
+
session = Dt();
|
|
1631
|
+
searchParams = St();
|
|
1632
|
+
history = We();
|
|
1619
1633
|
components = he({ client: this });
|
|
1620
|
-
experienceInstances =
|
|
1634
|
+
experienceInstances = S({ client: this });
|
|
1621
1635
|
experiences = se({ client: this });
|
|
1622
1636
|
frameworks = ve({ client: this });
|
|
1623
1637
|
predicates = Ie({ client: this });
|
|
1624
|
-
features =
|
|
1625
|
-
conditions =
|
|
1626
|
-
fields =
|
|
1627
|
-
responses =
|
|
1628
|
-
steps =
|
|
1629
|
-
contents =
|
|
1630
|
-
actions =
|
|
1631
|
-
conditionResults =
|
|
1638
|
+
features = Be({ client: this });
|
|
1639
|
+
conditions = bt();
|
|
1640
|
+
fields = Ye();
|
|
1641
|
+
responses = _t({ client: this });
|
|
1642
|
+
steps = Qe();
|
|
1643
|
+
contents = nt();
|
|
1644
|
+
actions = ot({ client: this });
|
|
1645
|
+
conditionResults = C();
|
|
1632
1646
|
stateSnapshotStore = xe({ client: this });
|
|
1633
1647
|
evaluateRuleLogicFx = Oe({ client: this });
|
|
1634
1648
|
start;
|
|
@@ -1642,14 +1656,14 @@ var $ = class {
|
|
|
1642
1656
|
effect: (e, { template: t, context: n }) => {
|
|
1643
1657
|
let r = {};
|
|
1644
1658
|
for (let t of e) r[t.fieldKey] = t.value;
|
|
1645
|
-
return
|
|
1659
|
+
return It(t, {
|
|
1646
1660
|
...n,
|
|
1647
1661
|
responses: r
|
|
1648
1662
|
});
|
|
1649
1663
|
}
|
|
1650
1664
|
});
|
|
1651
1665
|
constructor(e) {
|
|
1652
|
-
this.events =
|
|
1666
|
+
this.events = Ke(this.eventBus), this.projectId = jt(e), this.options = Object.freeze(e), this.apiUrl = e.apiUrl || xt(), this.dashboardUrl = e.dashboardUrl ?? "https://dashboard.picked.app", this.documentationSiteUrl = e.documentationSiteUrl ?? "https://docs.picked.app", this.start = this.lifecycle.start, this.readyStore = this.lifecycle.readyStore, this.preconditionPassedStore = this.lifecycle.preconditionPassedStore, this.conditionPassedStore = this.lifecycle.conditionPassedStore, this.lifecycleStageStore = this.lifecycle.lifecycleStageStore, this.setupPlugins(), this.setupFeatures(), this.setupPredicates(), this.setupActions(), this.setupComponents(), this.lifecycle.setPrecondition(e.precondition), this.lifecycle.setCondition(e.condition), this.eventBus({
|
|
1653
1667
|
type: "load",
|
|
1654
1668
|
version: ne()
|
|
1655
1669
|
}), this.maybeStartPreviewBridge();
|
|
@@ -1669,7 +1683,7 @@ var $ = class {
|
|
|
1669
1683
|
t?.onStart && this.lifecycle.registerPluginStartHook(t.onStart);
|
|
1670
1684
|
};
|
|
1671
1685
|
registerFeature = (e, t) => {
|
|
1672
|
-
|
|
1686
|
+
Ve(e, t, this.features);
|
|
1673
1687
|
};
|
|
1674
1688
|
registerPredicate = (e, t) => {
|
|
1675
1689
|
Le(e, t, this.predicates);
|
|
@@ -1681,13 +1695,13 @@ var $ = class {
|
|
|
1681
1695
|
this.fields.register(e);
|
|
1682
1696
|
};
|
|
1683
1697
|
registerStep = (e) => {
|
|
1684
|
-
|
|
1698
|
+
$e(e, this.steps);
|
|
1685
1699
|
};
|
|
1686
1700
|
registerContent = (e) => {
|
|
1687
|
-
|
|
1701
|
+
rt(e, this.contents);
|
|
1688
1702
|
};
|
|
1689
1703
|
registerAction = (e, t) => {
|
|
1690
|
-
|
|
1704
|
+
st(e, t, this.actions);
|
|
1691
1705
|
};
|
|
1692
1706
|
registerExperience = (e) => {
|
|
1693
1707
|
e.component && B(`experience:${e.id}`, e.component, this.components), this.experiences.register(e);
|
|
@@ -1775,20 +1789,20 @@ var $ = class {
|
|
|
1775
1789
|
};
|
|
1776
1790
|
//#endregion
|
|
1777
1791
|
//#region src/entities/component/lazyComponent.ts
|
|
1778
|
-
function
|
|
1792
|
+
function Lt(e) {
|
|
1779
1793
|
return {
|
|
1780
1794
|
$$type: "lazy-component",
|
|
1781
1795
|
load: e
|
|
1782
1796
|
};
|
|
1783
1797
|
}
|
|
1784
|
-
function
|
|
1798
|
+
function Rt(e) {
|
|
1785
1799
|
return typeof e == "object" && !!e && "$$type" in e && e.$$type === "lazy-component";
|
|
1786
1800
|
}
|
|
1787
1801
|
//#endregion
|
|
1788
1802
|
//#region src/exports.ts
|
|
1789
|
-
var
|
|
1803
|
+
var zt = (e) => {
|
|
1790
1804
|
let t = new $(e);
|
|
1791
1805
|
return u(t), t;
|
|
1792
1806
|
};
|
|
1793
1807
|
//#endregion
|
|
1794
|
-
export { $ as Picked,
|
|
1808
|
+
export { $ as Picked, zt as createClient, le as createPluginEffect, O as createStorageKey, n as evaluateRuleLogic, Ot as getPickedConfig, h as isInsideIframe, Rt as isLazyLoader, _ as isPickedRoot, Lt as lazyComponent, E as localStore, D as sessionStore, T as subscribe, d as supportsCookies, p as supportsCryptoRandomUUID, c as supportsDocument, i as supportsHistory, f as supportsIntersectionObserver, m as supportsLocalStorage, a as supportsLocation, l as supportsSessionStorage, g as supportsShadowRoot, o as supportsWebComponents, s as supportsWindow };
|