@picked/client 0.0.1-dev.1777601813342 → 0.0.1-dev.1777611471601
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-BAOO2VZv.cjs → api-CP_eIRW2.cjs} +1 -1
- package/dist/{api-CiR56vZg.js → api-UYfzBUGT.js} +1 -1
- package/dist/cjs/form/index.js +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/plugins/create-experience/index.js +1 -1
- package/dist/cjs/plugins/dom-observer/index.js +1 -0
- package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
- package/dist/cjs/plugins/experience-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/history-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/responses-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/responses-indexeddb/index.js +1 -1
- package/dist/cjs/plugins/single-page-app/index.js +1 -1
- package/dist/cjs/plugins/web-components/index.js +1 -1
- package/dist/cjs/plugins/window-object/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/esm/form/index.js +1 -1
- package/dist/esm/index.js +178 -177
- package/dist/esm/plugins/create-experience/index.js +1 -1
- package/dist/esm/plugins/dom-observer/index.js +58 -0
- package/dist/esm/plugins/dynamic-experiences/index.js +2 -2
- package/dist/esm/plugins/experience-browser-storage/index.js +3 -3
- package/dist/esm/plugins/history-browser-storage/index.js +2 -2
- package/dist/esm/plugins/responses-browser-storage/index.js +2 -2
- package/dist/esm/plugins/responses-indexeddb/index.js +1 -1
- package/dist/esm/plugins/single-page-app/index.js +25 -93
- package/dist/esm/plugins/web-components/index.js +2 -2
- package/dist/esm/plugins/window-object/index.js +1 -1
- package/dist/esm/server/index.js +1 -1
- package/dist/{experience-DOWnsvA1.cjs → experience-BhteyYBl.cjs} +1 -1
- package/dist/{experience-CR19HpPg.js → experience-CoMdlvyn.js} +3 -3
- package/dist/{experience-instance-C2jZU8ho.cjs → experience-instance-CZDcicPj.cjs} +1 -1
- package/dist/{experience-instance-CGLdwg--.js → experience-instance-IkIw31Cg.js} +15 -28
- package/dist/{nodes-Bmzx3TP_.js → nodes-ChVU1VZO.js} +7 -7
- package/dist/{nodes-Dx9bxj35.cjs → nodes-DDDs-rC2.cjs} +1 -1
- package/dist/object-C82v79xc.js +25 -0
- package/dist/object-CUJOjanb.cjs +1 -0
- package/dist/rules-logic-BTIxfrJJ.js +240 -0
- package/dist/rules-logic-DNLOv90w.cjs +1 -0
- package/dist/{supports-DUJbucFW.js → supports-0XIfd4-R.js} +9 -18
- package/dist/supports-Dsjg-82e.cjs +1 -0
- package/dist/types/entities/experience-instance/experience-instance.d.ts.map +1 -1
- package/dist/types/entities/framework/framework.d.ts +0 -12
- package/dist/types/entities/framework/framework.d.ts.map +1 -1
- package/dist/types/plugins/dom-observer/index.d.ts +3 -0
- package/dist/types/plugins/dom-observer/index.d.ts.map +1 -0
- package/dist/types/plugins/dom-observer/plugin.d.ts +37 -0
- package/dist/types/plugins/dom-observer/plugin.d.ts.map +1 -0
- package/dist/types/plugins/single-page-app/index.d.ts +1 -2
- package/dist/types/plugins/single-page-app/index.d.ts.map +1 -1
- package/dist/types/plugins/single-page-app/plugin.d.ts +9 -92
- package/dist/types/plugins/single-page-app/plugin.d.ts.map +1 -1
- package/dist/types/utils/global-obj.d.ts +0 -5
- package/dist/types/utils/global-obj.d.ts.map +1 -1
- package/dist/types/utils/supports.d.ts +0 -113
- package/dist/types/utils/supports.d.ts.map +1 -1
- package/package.json +11 -1
- package/dist/rules-logic-CvILqbhz.js +0 -266
- package/dist/rules-logic-DV5SUr5M.cjs +0 -1
- package/dist/supports-DFDQ6eJO.cjs +0 -1
- /package/dist/{id-n2yrHvNo.js → id-B-N2zNbS.js} +0 -0
- /package/dist/{id-Cg7fVl1O.cjs → id-Bbodazn8.cjs} +0 -0
- /package/dist/{logger-C44jSdYl.js → logger-6z_gb4rA.js} +0 -0
- /package/dist/{logger-CJUj90QX.cjs → logger-fbvQC40v.cjs} +0 -0
- /package/dist/{storage-B6lQtc4-.cjs → storage-BXSlLTRa.cjs} +0 -0
- /package/dist/{storage-6Xk0uAxB.js → storage-hOHCCXvP.js} +0 -0
package/dist/esm/index.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t
|
|
3
|
-
import {
|
|
4
|
-
import { a as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { n as
|
|
8
|
-
import { n as re } from "../
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
1
|
+
import { t as e } from "../rules-logic-BTIxfrJJ.js";
|
|
2
|
+
import { t } from "../object-C82v79xc.js";
|
|
3
|
+
import { t as n } from "../logger-6z_gb4rA.js";
|
|
4
|
+
import { a as r, c as i, d as a, i as o, l as s, n as c, o as l, p as u, r as d, s as f, t as p, u as m } from "../supports-0XIfd4-R.js";
|
|
5
|
+
import { a as h, c as g, u as _ } from "../nodes-ChVU1VZO.js";
|
|
6
|
+
import { n as v, t as ee } from "../experience-CoMdlvyn.js";
|
|
7
|
+
import { i as te, n as y, r as b, t as x } from "../storage-hOHCCXvP.js";
|
|
8
|
+
import { n as ne, r as re } from "../api-UYfzBUGT.js";
|
|
9
|
+
import { n as ie } from "../experience-instance-IkIw31Cg.js";
|
|
10
|
+
import { t as S } from "../id-B-N2zNbS.js";
|
|
11
|
+
import { attach as C, combine as w, createApi as T, createDomain as E, createEffect as D, createEvent as O, createStore as k, sample as A } from "effector";
|
|
12
|
+
import { createFactory as j, invoke as M } from "@withease/factories";
|
|
12
13
|
//#region src/entities/plugin/plugin.ts
|
|
13
14
|
var ae = (e, t, n) => {
|
|
14
15
|
let r = t.name, i = t.setup(e);
|
|
@@ -19,16 +20,16 @@ var ae = (e, t, n) => {
|
|
|
19
20
|
...i
|
|
20
21
|
});
|
|
21
22
|
}
|
|
22
|
-
}, oe =
|
|
23
|
+
}, oe = E("component"), se = j(({ client: e, component: t, name: n }) => ({
|
|
23
24
|
name: n,
|
|
24
25
|
component: t,
|
|
25
26
|
frameworkStore: e.frameworks.getByName(t.frameworkName)
|
|
26
27
|
}));
|
|
27
28
|
function ce(e) {
|
|
28
|
-
return
|
|
29
|
+
return M(se, e);
|
|
29
30
|
}
|
|
30
|
-
var le =
|
|
31
|
-
let t = oe.store({}), n =
|
|
31
|
+
var le = j(({ client: e }) => {
|
|
32
|
+
let t = oe.store({}), n = T(t, { register(e, t) {
|
|
32
33
|
return {
|
|
33
34
|
...e,
|
|
34
35
|
[t.name]: t
|
|
@@ -54,12 +55,12 @@ var le = M(({ client: e }) => {
|
|
|
54
55
|
};
|
|
55
56
|
});
|
|
56
57
|
function ue(e) {
|
|
57
|
-
return
|
|
58
|
+
return M(le, e);
|
|
58
59
|
}
|
|
59
|
-
var
|
|
60
|
+
var N = (e, t, n) => {
|
|
60
61
|
n.register(e, t);
|
|
61
|
-
},
|
|
62
|
-
let t =
|
|
62
|
+
}, P = E("framework"), F = j(({ client: e }) => {
|
|
63
|
+
let t = P.store({}), n = T(t, { register(e, t) {
|
|
63
64
|
return {
|
|
64
65
|
...e,
|
|
65
66
|
[t.name]: t.framework
|
|
@@ -81,21 +82,21 @@ var P = (e, t, n) => {
|
|
|
81
82
|
listStore: i
|
|
82
83
|
};
|
|
83
84
|
});
|
|
84
|
-
function
|
|
85
|
-
return
|
|
85
|
+
function I(e) {
|
|
86
|
+
return M(F, e);
|
|
86
87
|
}
|
|
87
|
-
var
|
|
88
|
+
var L = (e, t) => {
|
|
88
89
|
t.register(e.name, e);
|
|
89
|
-
},
|
|
90
|
+
}, R = 6e3, z = x("last_ping", "global"), B = async (e) => {
|
|
90
91
|
try {
|
|
91
|
-
let t = Date.now(), n = y.get(
|
|
92
|
-
if (n.isSet() && (r = n.json() ?? 0), r && t - r <
|
|
92
|
+
let t = Date.now(), n = y.get(z), r = 0;
|
|
93
|
+
if (n.isSet() && (r = n.json() ?? 0), r && t - r < R) return !0;
|
|
93
94
|
let i = {
|
|
94
95
|
projectId: e.projectId,
|
|
95
96
|
path: window.location.pathname
|
|
96
97
|
}, a = {}, o = document.getElementById("picked_script")?.dataset.verceltoken;
|
|
97
98
|
o && (a["x-vercel-protection-bypass"] = o);
|
|
98
|
-
let s = (await
|
|
99
|
+
let s = (await ne(e.apiUrl, "ping", i, a)).ok;
|
|
99
100
|
return s && n.set(t), s;
|
|
100
101
|
} catch {
|
|
101
102
|
return !1;
|
|
@@ -103,7 +104,7 @@ var R = (e, t) => {
|
|
|
103
104
|
};
|
|
104
105
|
//#endregion
|
|
105
106
|
//#region src/utils/state-snaphot.ts
|
|
106
|
-
function
|
|
107
|
+
function V(e) {
|
|
107
108
|
let t = typeof window < "u", n = {
|
|
108
109
|
client: e,
|
|
109
110
|
responses: e.responses.listStore.getState(),
|
|
@@ -117,8 +118,8 @@ function H(e) {
|
|
|
117
118
|
}
|
|
118
119
|
//#endregion
|
|
119
120
|
//#region src/entities/predicate/predicate.ts
|
|
120
|
-
var
|
|
121
|
-
let t =
|
|
121
|
+
var H = E("predicate"), U = j(({ client: e }) => {
|
|
122
|
+
let t = H.store({}), n = T(t, { register(e, t) {
|
|
122
123
|
return {
|
|
123
124
|
...e,
|
|
124
125
|
[t.name]: {
|
|
@@ -138,22 +139,22 @@ var U = D("predicate"), de = M(({ client: e }) => {
|
|
|
138
139
|
return t.map((t) => t[e]?.predicate, { skipVoid: !1 });
|
|
139
140
|
}
|
|
140
141
|
function o(t) {
|
|
141
|
-
let n =
|
|
142
|
+
let n = k(() => void 0, { skipVoid: !1 }), r = D(async () => {
|
|
142
143
|
let n = a(t).getState();
|
|
143
144
|
if (!n) return;
|
|
144
|
-
let r =
|
|
145
|
+
let r = V(e);
|
|
145
146
|
return (...e) => n({
|
|
146
147
|
...r,
|
|
147
148
|
args: e
|
|
148
149
|
});
|
|
149
150
|
});
|
|
150
|
-
return
|
|
151
|
+
return A({
|
|
151
152
|
source: {
|
|
152
153
|
responses: e.responses.listStore,
|
|
153
154
|
fields: e.fields.listStore
|
|
154
155
|
},
|
|
155
156
|
target: r
|
|
156
|
-
}),
|
|
157
|
+
}), A({
|
|
157
158
|
clock: r.doneData,
|
|
158
159
|
filter: (e) => e !== void 0,
|
|
159
160
|
target: n
|
|
@@ -166,13 +167,13 @@ var U = D("predicate"), de = M(({ client: e }) => {
|
|
|
166
167
|
getEvokablePredicate: o
|
|
167
168
|
};
|
|
168
169
|
});
|
|
169
|
-
function
|
|
170
|
-
return
|
|
170
|
+
function de(e) {
|
|
171
|
+
return M(U, e);
|
|
171
172
|
}
|
|
172
|
-
var
|
|
173
|
+
var fe = (e, t, n) => {
|
|
173
174
|
n.register(e, t);
|
|
174
|
-
}, W =
|
|
175
|
-
let t = W.store({}), n = W.store([]), r =
|
|
175
|
+
}, W = E("feature"), pe = j(({ client: e }) => {
|
|
176
|
+
let t = W.store({}), n = W.store([]), r = T(t, { register(e, t) {
|
|
176
177
|
return {
|
|
177
178
|
...e,
|
|
178
179
|
[t.id]: t.feature
|
|
@@ -192,7 +193,7 @@ var pe = (e, t, n) => {
|
|
|
192
193
|
feature: i
|
|
193
194
|
}));
|
|
194
195
|
}
|
|
195
|
-
let a =
|
|
196
|
+
let a = D(async ({ id: e, key: t, storage: n = "local" }) => {
|
|
196
197
|
let r = x(`feature:${e}:${t}`, "global"), i = (n === "session" ? b : y).get(r).boolean();
|
|
197
198
|
return i === null ? null : {
|
|
198
199
|
id: e,
|
|
@@ -200,11 +201,11 @@ var pe = (e, t, n) => {
|
|
|
200
201
|
bucket: i,
|
|
201
202
|
storage: n
|
|
202
203
|
};
|
|
203
|
-
}), o =
|
|
204
|
+
}), o = D((e) => {
|
|
204
205
|
if (!e) return null;
|
|
205
206
|
let t = x(`feature:${e.id}:${e.key}`, "global");
|
|
206
207
|
(e.storage === "session" ? b : y).set(t, e.bucket);
|
|
207
|
-
}), s = /* @__PURE__ */ new Map(), c =
|
|
208
|
+
}), s = /* @__PURE__ */ new Map(), c = C({
|
|
208
209
|
source: {
|
|
209
210
|
allFeaturesStore: t,
|
|
210
211
|
resolvedFeaturesStore: n
|
|
@@ -235,7 +236,7 @@ var pe = (e, t, n) => {
|
|
|
235
236
|
};
|
|
236
237
|
}
|
|
237
238
|
});
|
|
238
|
-
|
|
239
|
+
A({
|
|
239
240
|
clock: r.register,
|
|
240
241
|
fn: (e) => {
|
|
241
242
|
let { id: t, feature: n } = e;
|
|
@@ -246,7 +247,7 @@ var pe = (e, t, n) => {
|
|
|
246
247
|
};
|
|
247
248
|
},
|
|
248
249
|
target: a
|
|
249
|
-
}),
|
|
250
|
+
}), A({
|
|
250
251
|
source: t,
|
|
251
252
|
clock: c.doneData,
|
|
252
253
|
fn: (e, t) => {
|
|
@@ -260,7 +261,7 @@ var pe = (e, t, n) => {
|
|
|
260
261
|
},
|
|
261
262
|
target: o
|
|
262
263
|
});
|
|
263
|
-
let l =
|
|
264
|
+
let l = w({
|
|
264
265
|
allFeaturesStore: t,
|
|
265
266
|
resolvedFeaturesStore: n
|
|
266
267
|
}).map(({ allFeaturesStore: e, resolvedFeaturesStore: t }) => Object.values(e).map((e) => {
|
|
@@ -282,7 +283,7 @@ var pe = (e, t, n) => {
|
|
|
282
283
|
isResolved: !1
|
|
283
284
|
};
|
|
284
285
|
}));
|
|
285
|
-
|
|
286
|
+
A({
|
|
286
287
|
clock: c.doneData,
|
|
287
288
|
source: { resolvedFeatures: n },
|
|
288
289
|
filter: ({ resolvedFeatures: e }, { id: t, key: n }) => !e.some((e) => e.id === t && e.key === n),
|
|
@@ -291,7 +292,7 @@ var pe = (e, t, n) => {
|
|
|
291
292
|
type: "feature_decide",
|
|
292
293
|
feature: e
|
|
293
294
|
}))
|
|
294
|
-
}),
|
|
295
|
+
}), A({
|
|
295
296
|
clock: [a.doneData, c.doneData],
|
|
296
297
|
source: n,
|
|
297
298
|
fn: (e, t) => !t || e.some((e) => e.id === t.id && e.key === t.key) ? e : [...e, t],
|
|
@@ -304,15 +305,15 @@ var pe = (e, t, n) => {
|
|
|
304
305
|
return t.map((t) => t[e], { skipVoid: !1 });
|
|
305
306
|
}
|
|
306
307
|
function f(e) {
|
|
307
|
-
let t =
|
|
308
|
+
let t = k(async () => void 0, { skipVoid: !1 }), r = D(async () => {
|
|
308
309
|
let t = u(e).getState();
|
|
309
310
|
if (t) return async () => (await t.getBucket()).bucket;
|
|
310
311
|
});
|
|
311
|
-
return
|
|
312
|
+
return A({
|
|
312
313
|
source: n,
|
|
313
314
|
filter: (t) => t.some((t) => t.id === e),
|
|
314
315
|
target: r
|
|
315
|
-
}),
|
|
316
|
+
}), A({
|
|
316
317
|
clock: r.doneData,
|
|
317
318
|
filter: (e) => e !== void 0,
|
|
318
319
|
target: t
|
|
@@ -326,21 +327,21 @@ var pe = (e, t, n) => {
|
|
|
326
327
|
getEvokableFeature: f
|
|
327
328
|
};
|
|
328
329
|
});
|
|
329
|
-
function
|
|
330
|
-
return
|
|
330
|
+
function me(e) {
|
|
331
|
+
return M(pe, e);
|
|
331
332
|
}
|
|
332
|
-
var
|
|
333
|
+
var he = (e, t, n) => {
|
|
333
334
|
n.register(e, t);
|
|
334
|
-
}, G =
|
|
335
|
+
}, G = E("history");
|
|
335
336
|
function K(e, t) {
|
|
336
337
|
return {
|
|
337
|
-
id:
|
|
338
|
+
id: S(`history-entry-${Date.now()}-${Math.random()}}`),
|
|
338
339
|
node: t,
|
|
339
340
|
at: Date.now(),
|
|
340
341
|
experienceId: e
|
|
341
342
|
};
|
|
342
343
|
}
|
|
343
|
-
var
|
|
344
|
+
var ge = j(() => {
|
|
344
345
|
let e = G.store({ entries: [] }), t = G.event(), n = G.event(), r = G.event(), i = G.event();
|
|
345
346
|
e.on(t, (e, t) => ({ entries: [...e.entries, K(t.experienceId, t.node)] })), e.on(n, (e, t) => ({ entries: [...e.entries.slice(0, -1), K(t.experienceId, t.node)] })), e.on(i, (e, t) => t);
|
|
346
347
|
function a(e, t) {
|
|
@@ -350,7 +351,7 @@ var _e = M(() => {
|
|
|
350
351
|
};
|
|
351
352
|
for (let r = e.length - 1; r >= 0; r--) {
|
|
352
353
|
let i = e[r], a = i?.node;
|
|
353
|
-
if (!(!a || !
|
|
354
|
+
if (!(!a || !h(a)) && !(t && i.experienceId !== t)) if (n.lastStepIndex === -1) n.lastStepIndex = r;
|
|
354
355
|
else {
|
|
355
356
|
n.secondLastStepIndex = r;
|
|
356
357
|
break;
|
|
@@ -372,25 +373,25 @@ var _e = M(() => {
|
|
|
372
373
|
entriesStore: e.map((e) => e.entries)
|
|
373
374
|
};
|
|
374
375
|
});
|
|
375
|
-
function
|
|
376
|
-
return
|
|
376
|
+
function _e() {
|
|
377
|
+
return M(ge);
|
|
377
378
|
}
|
|
378
379
|
//#endregion
|
|
379
380
|
//#region src/utils/events.ts
|
|
380
|
-
var
|
|
381
|
-
let t =
|
|
382
|
-
return
|
|
381
|
+
var ve = 0, ye = (e) => {
|
|
382
|
+
let t = k([]);
|
|
383
|
+
return A({
|
|
383
384
|
clock: e,
|
|
384
385
|
source: t,
|
|
385
386
|
fn: (e, t) => [...e, {
|
|
386
|
-
id:
|
|
387
|
+
id: ve++,
|
|
387
388
|
at: /* @__PURE__ */ new Date(),
|
|
388
389
|
payload: t
|
|
389
390
|
}],
|
|
390
391
|
target: t
|
|
391
392
|
}), t;
|
|
392
|
-
},
|
|
393
|
-
let e =
|
|
393
|
+
}, be = E("field"), xe = j(() => {
|
|
394
|
+
let e = be.store({}), t = T(e, {
|
|
394
395
|
register(e, t) {
|
|
395
396
|
return {
|
|
396
397
|
...e,
|
|
@@ -434,13 +435,13 @@ var ye = 0, be = (e) => {
|
|
|
434
435
|
getByName: s
|
|
435
436
|
};
|
|
436
437
|
});
|
|
437
|
-
function
|
|
438
|
-
return
|
|
438
|
+
function Se() {
|
|
439
|
+
return M(xe);
|
|
439
440
|
}
|
|
440
441
|
//#endregion
|
|
441
442
|
//#region src/entities/step/step.ts
|
|
442
|
-
var
|
|
443
|
-
let e =
|
|
443
|
+
var Ce = E("step"), we = j(() => {
|
|
444
|
+
let e = Ce.store({}), t = T(e, { register(e, t) {
|
|
444
445
|
return {
|
|
445
446
|
...e,
|
|
446
447
|
[t.step.id]: t.step
|
|
@@ -464,16 +465,16 @@ var we = D("step"), Te = M(() => {
|
|
|
464
465
|
indexStore: e
|
|
465
466
|
};
|
|
466
467
|
});
|
|
467
|
-
function
|
|
468
|
-
return
|
|
468
|
+
function Te() {
|
|
469
|
+
return M(we);
|
|
469
470
|
}
|
|
470
|
-
function
|
|
471
|
+
function Ee(e, t) {
|
|
471
472
|
t.register(e);
|
|
472
473
|
}
|
|
473
474
|
//#endregion
|
|
474
475
|
//#region src/entities/action/action.ts
|
|
475
|
-
var
|
|
476
|
-
let t =
|
|
476
|
+
var De = E("action"), Oe = j(({ client: e }) => {
|
|
477
|
+
let t = De.store({}), n = T(t, { register(e, t) {
|
|
477
478
|
return {
|
|
478
479
|
...e,
|
|
479
480
|
[t.key]: {
|
|
@@ -493,22 +494,22 @@ var Oe = D("action"), ke = M(({ client: e }) => {
|
|
|
493
494
|
return t.map((t) => t[e]?.action, { skipVoid: !1 });
|
|
494
495
|
}
|
|
495
496
|
function o(t, n) {
|
|
496
|
-
let r =
|
|
497
|
+
let r = k(() => void 0, { skipVoid: !1 }), i = n ? { experience: n.experience } : null, o = D(async () => {
|
|
497
498
|
let n = a(t).getState();
|
|
498
499
|
if (!n) return;
|
|
499
|
-
let r =
|
|
500
|
+
let r = V(e);
|
|
500
501
|
return (...e) => n({
|
|
501
502
|
...r,
|
|
502
503
|
args: e
|
|
503
504
|
}, i);
|
|
504
505
|
});
|
|
505
|
-
return
|
|
506
|
+
return A({
|
|
506
507
|
source: {
|
|
507
508
|
responses: e.responses.listStore,
|
|
508
509
|
fields: e.fields.listStore
|
|
509
510
|
},
|
|
510
511
|
target: o
|
|
511
|
-
}),
|
|
512
|
+
}), A({
|
|
512
513
|
clock: o.doneData,
|
|
513
514
|
filter: (e) => e !== void 0,
|
|
514
515
|
target: r
|
|
@@ -521,10 +522,10 @@ var Oe = D("action"), ke = M(({ client: e }) => {
|
|
|
521
522
|
getEvokableAction: o
|
|
522
523
|
};
|
|
523
524
|
});
|
|
524
|
-
function
|
|
525
|
-
return
|
|
525
|
+
function ke(e) {
|
|
526
|
+
return M(Oe, e);
|
|
526
527
|
}
|
|
527
|
-
var
|
|
528
|
+
var Ae = (e, t, n) => {
|
|
528
529
|
n.register(e, t);
|
|
529
530
|
};
|
|
530
531
|
//#endregion
|
|
@@ -540,7 +541,7 @@ function q(e, t, n, r) {
|
|
|
540
541
|
function J(e) {
|
|
541
542
|
return e === null || e === "" || Array.isArray(e) && !e.length;
|
|
542
543
|
}
|
|
543
|
-
function
|
|
544
|
+
function je(e) {
|
|
544
545
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null;
|
|
545
546
|
}
|
|
546
547
|
function Y(e) {
|
|
@@ -550,13 +551,13 @@ function Y(e) {
|
|
|
550
551
|
return !1;
|
|
551
552
|
}
|
|
552
553
|
}
|
|
553
|
-
function
|
|
554
|
+
function Me(e, t) {
|
|
554
555
|
return t.find((t) => t.key === e) ?? null;
|
|
555
556
|
}
|
|
556
|
-
function
|
|
557
|
+
function Ne(e, t) {
|
|
557
558
|
return e.multiple && (typeof t == "string" || typeof t == "number" || typeof t == "boolean") ? [t] : t;
|
|
558
559
|
}
|
|
559
|
-
function
|
|
560
|
+
function Pe(e, t) {
|
|
560
561
|
if (e.type !== "object" || J(t)) return null;
|
|
561
562
|
if (e.multiple) {
|
|
562
563
|
if (!Array.isArray(t)) return q(e, t, "This field expects multiple values", "Field expects an array of objects.");
|
|
@@ -568,7 +569,7 @@ function Fe(e, t) {
|
|
|
568
569
|
}
|
|
569
570
|
return Array.isArray(t) ? q(e, t, "This field expects a single value", "Field expects a single object, not an array.") : typeof t != "object" || !t ? q(e, t, "This field expects an object value", "Field expects an object value.") : Y(t) ? null : q(e, t, "This field contains non-serializable data", "Field value contains non-JSON-serializable data (functions, circular references, etc.).");
|
|
570
571
|
}
|
|
571
|
-
function
|
|
572
|
+
function Fe(e, t) {
|
|
572
573
|
if (J(t) || !Array.isArray(e.options) || e.options.length === 0) return null;
|
|
573
574
|
let n = Array.isArray(t) ? t : [t];
|
|
574
575
|
if (e.type === "object") {
|
|
@@ -576,14 +577,14 @@ function Ie(e, t) {
|
|
|
576
577
|
return n.every((e) => r.has(JSON.stringify(e))) ? null : q(e, t, "This field expects a valid option", "Field expects a valid option from the defined choices.");
|
|
577
578
|
}
|
|
578
579
|
let r = e.options.map((e) => e.value);
|
|
579
|
-
return n.every((e) => !
|
|
580
|
+
return n.every((e) => !je(e) || e === null ? !1 : r.includes(e)) ? null : q(e, t, "This field expects a valid option", `Field expects a valid option. Valid options are: ${r.join(", ")}`);
|
|
580
581
|
}
|
|
581
|
-
async function
|
|
582
|
-
if (n.validation && !
|
|
583
|
-
let
|
|
582
|
+
async function Ie(e, n, r, i) {
|
|
583
|
+
if (n.validation && !t(n.validation) && !J(r)) {
|
|
584
|
+
let t = i ? {
|
|
584
585
|
$input: r,
|
|
585
586
|
responses: i
|
|
586
|
-
} : { $input: r }, a = await
|
|
587
|
+
} : { $input: r }, a = await e(n.validation, t);
|
|
587
588
|
if (typeof a == "string") return q(n, r, a, `Field validation resulted in an error: ${a}.`);
|
|
588
589
|
if (a === !1) return q(n, r, "This field is invalid", "Field validation resulted in an unspecified error.");
|
|
589
590
|
}
|
|
@@ -591,8 +592,8 @@ async function Le(t, n, r, i) {
|
|
|
591
592
|
}
|
|
592
593
|
//#endregion
|
|
593
594
|
//#region src/entities/response/response.ts
|
|
594
|
-
var
|
|
595
|
-
let n =
|
|
595
|
+
var Le = E("response"), Re = j(({ client: t }) => {
|
|
596
|
+
let n = Le.store({}), r = O(), i = O(), a = T(n, {
|
|
596
597
|
register(e, t) {
|
|
597
598
|
return {
|
|
598
599
|
...e,
|
|
@@ -621,9 +622,9 @@ var Re = D("response"), ze = M(({ client: e }) => {
|
|
|
621
622
|
});
|
|
622
623
|
} else a.registerBatch(e);
|
|
623
624
|
}
|
|
624
|
-
let s = (n, r) => t
|
|
625
|
+
let s = (n, r) => e(t, n, r), c = C({
|
|
625
626
|
source: {
|
|
626
|
-
allFields:
|
|
627
|
+
allFields: t.fields.listStore,
|
|
627
628
|
existingResponses: n
|
|
628
629
|
},
|
|
629
630
|
effect: async ({ allFields: e, existingResponses: t }, n) => {
|
|
@@ -631,7 +632,7 @@ var Re = D("response"), ze = M(({ client: e }) => {
|
|
|
631
632
|
...t,
|
|
632
633
|
...n
|
|
633
634
|
}, o = Object.entries(n), c = await Promise.allSettled(o.map(async ([t, n]) => {
|
|
634
|
-
let o =
|
|
635
|
+
let o = Me(t, e);
|
|
635
636
|
if (!o) {
|
|
636
637
|
r.push({
|
|
637
638
|
fieldKey: t,
|
|
@@ -641,17 +642,17 @@ var Re = D("response"), ze = M(({ client: e }) => {
|
|
|
641
642
|
});
|
|
642
643
|
return;
|
|
643
644
|
}
|
|
644
|
-
let c =
|
|
645
|
+
let c = Ne(o, n), l = await Ie(s, o, c, a);
|
|
645
646
|
if (l) {
|
|
646
647
|
r.push(l);
|
|
647
648
|
return;
|
|
648
649
|
}
|
|
649
|
-
let u =
|
|
650
|
+
let u = Pe(o, c);
|
|
650
651
|
if (u) {
|
|
651
652
|
r.push(u);
|
|
652
653
|
return;
|
|
653
654
|
}
|
|
654
|
-
let d =
|
|
655
|
+
let d = Fe(o, c);
|
|
655
656
|
if (d) {
|
|
656
657
|
r.push(d);
|
|
657
658
|
return;
|
|
@@ -679,7 +680,7 @@ var Re = D("response"), ze = M(({ client: e }) => {
|
|
|
679
680
|
async function l(e) {
|
|
680
681
|
return c(e);
|
|
681
682
|
}
|
|
682
|
-
let u =
|
|
683
|
+
let u = C({
|
|
683
684
|
source: n,
|
|
684
685
|
effect: async (e, t) => {
|
|
685
686
|
let { responsesToCommit: n, validationErrors: r } = await c(t);
|
|
@@ -694,7 +695,7 @@ var Re = D("response"), ze = M(({ client: e }) => {
|
|
|
694
695
|
value: t
|
|
695
696
|
})));
|
|
696
697
|
function m(e) {
|
|
697
|
-
return
|
|
698
|
+
return w({
|
|
698
699
|
f: e,
|
|
699
700
|
s: n
|
|
700
701
|
}, ({ f: e, s: t }) => {
|
|
@@ -702,19 +703,19 @@ var Re = D("response"), ze = M(({ client: e }) => {
|
|
|
702
703
|
return n === null ? e?.defaultValue !== void 0 && e.defaultValue !== null ? e.defaultValue : null : n;
|
|
703
704
|
});
|
|
704
705
|
}
|
|
705
|
-
function h(
|
|
706
|
-
return m(
|
|
706
|
+
function h(e) {
|
|
707
|
+
return m(t.fields.getById(e));
|
|
707
708
|
}
|
|
708
|
-
function g(
|
|
709
|
-
return m(
|
|
709
|
+
function g(e) {
|
|
710
|
+
return m(t.fields.getByKey(e));
|
|
710
711
|
}
|
|
711
|
-
function _(
|
|
712
|
-
return m(
|
|
712
|
+
function _(e) {
|
|
713
|
+
return m(t.fields.getByName(e));
|
|
713
714
|
}
|
|
714
|
-
return
|
|
715
|
+
return A({
|
|
715
716
|
clock: r,
|
|
716
717
|
target: a.clearAll
|
|
717
|
-
}),
|
|
718
|
+
}), A({
|
|
718
719
|
clock: i,
|
|
719
720
|
target: a.clear
|
|
720
721
|
}), {
|
|
@@ -730,13 +731,13 @@ var Re = D("response"), ze = M(({ client: e }) => {
|
|
|
730
731
|
getByFieldName: _
|
|
731
732
|
};
|
|
732
733
|
});
|
|
733
|
-
function
|
|
734
|
-
return
|
|
734
|
+
function ze(e) {
|
|
735
|
+
return M(Re, e);
|
|
735
736
|
}
|
|
736
737
|
//#endregion
|
|
737
738
|
//#region src/entities/condition/condition.ts
|
|
738
|
-
var
|
|
739
|
-
let e =
|
|
739
|
+
var Be = E("condition"), Ve = j(() => {
|
|
740
|
+
let e = Be.store({}), t = T(e, { register(e, t) {
|
|
740
741
|
return {
|
|
741
742
|
...e,
|
|
742
743
|
[t.condition.id]: t.condition
|
|
@@ -760,13 +761,13 @@ var Ve = D("condition"), He = M(() => {
|
|
|
760
761
|
indexStore: e
|
|
761
762
|
};
|
|
762
763
|
});
|
|
763
|
-
function
|
|
764
|
-
return
|
|
764
|
+
function He() {
|
|
765
|
+
return M(Ve);
|
|
765
766
|
}
|
|
766
767
|
//#endregion
|
|
767
768
|
//#region src/utils/api-url.ts
|
|
768
|
-
function
|
|
769
|
-
if (
|
|
769
|
+
function Ue() {
|
|
770
|
+
if (d()) {
|
|
770
771
|
let e = [
|
|
771
772
|
document.currentScript,
|
|
772
773
|
document.getElementById("picked_script"),
|
|
@@ -780,8 +781,8 @@ function We() {
|
|
|
780
781
|
}
|
|
781
782
|
//#endregion
|
|
782
783
|
//#region src/utils/search-params.ts
|
|
783
|
-
function
|
|
784
|
-
if (!
|
|
784
|
+
function We() {
|
|
785
|
+
if (!a()) return {};
|
|
785
786
|
let e = new URLSearchParams(window.location.search), t = {}, n = /* @__PURE__ */ new Set();
|
|
786
787
|
for (let [t] of e.entries()) t.startsWith("picked-") && n.add(t);
|
|
787
788
|
for (let r of n) {
|
|
@@ -798,18 +799,18 @@ function Ge() {
|
|
|
798
799
|
}
|
|
799
800
|
//#endregion
|
|
800
801
|
//#region src/utils/user-session.ts
|
|
801
|
-
function
|
|
802
|
-
return
|
|
802
|
+
function Ge() {
|
|
803
|
+
return c() ? 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)}`;
|
|
803
804
|
}
|
|
804
|
-
var
|
|
805
|
-
let e = y.get(
|
|
805
|
+
var Ke = x("session", "global"), qe = () => {
|
|
806
|
+
let e = y.get(Ke), t;
|
|
806
807
|
e.isSet() && (t = e.json());
|
|
807
808
|
let n = (t) => e.set({
|
|
808
809
|
id: t.id,
|
|
809
810
|
isUser: t.isUser,
|
|
810
811
|
identifiers: t.identifiers
|
|
811
812
|
}), r = {
|
|
812
|
-
id: t?.id ??
|
|
813
|
+
id: t?.id ?? Ge(),
|
|
813
814
|
isUser: t?.isUser ?? void 0,
|
|
814
815
|
identifiers: t?.identifiers ?? void 0,
|
|
815
816
|
setIsUser(e) {
|
|
@@ -826,22 +827,22 @@ var qe = x("session", "global"), Je = () => {
|
|
|
826
827
|
}
|
|
827
828
|
};
|
|
828
829
|
return n(r), r;
|
|
829
|
-
},
|
|
830
|
+
}, Je = () => l() ? qe() : null;
|
|
830
831
|
//#endregion
|
|
831
832
|
//#region src/utils/picked-config.ts
|
|
832
833
|
function X() {
|
|
833
|
-
if (
|
|
834
|
+
if (a()) return globalThis.window.pickedConfig;
|
|
834
835
|
}
|
|
835
|
-
function
|
|
836
|
-
if (!
|
|
836
|
+
function Ye() {
|
|
837
|
+
if (!a()) return;
|
|
837
838
|
let e = X(), t = e?.organizationId, n = e?.projectId;
|
|
838
839
|
return t && n ? {
|
|
839
840
|
organizationId: t,
|
|
840
841
|
projectId: n
|
|
841
842
|
} : void 0;
|
|
842
843
|
}
|
|
843
|
-
function
|
|
844
|
-
if (!
|
|
844
|
+
function Xe() {
|
|
845
|
+
if (!d()) return;
|
|
845
846
|
let e = document.getElementById("picked_script") || document.querySelector("script#picked") || document.getElementById("cvly");
|
|
846
847
|
if (!e) return;
|
|
847
848
|
let t = e.dataset.organizationid || e.getAttribute("organization-id"), n = e.dataset.projectid || e.getAttribute("project-id");
|
|
@@ -850,15 +851,15 @@ function Z() {
|
|
|
850
851
|
projectId: n
|
|
851
852
|
} : void 0;
|
|
852
853
|
}
|
|
853
|
-
function
|
|
854
|
+
function Z(e) {
|
|
854
855
|
let { organizationId: t, projectId: n } = e;
|
|
855
856
|
if (t && n) return {
|
|
856
857
|
organizationId: t,
|
|
857
858
|
projectId: n
|
|
858
859
|
};
|
|
859
|
-
let r =
|
|
860
|
+
let r = Ye();
|
|
860
861
|
if (r) return r;
|
|
861
|
-
let i =
|
|
862
|
+
let i = Xe();
|
|
862
863
|
if (i) return i;
|
|
863
864
|
throw Error("organizationId and projectId are required. You can provide them via one of:\n (1) createClient({ organizationId, projectId }) options;\n (2) window.pickedConfig = { organizationId, projectId };\n (3) a <script> tag with id 'picked_script', 'picked', or 'cvly' that includes data-organizationid/data-projectid (or organization-id/project-id) attributes.");
|
|
864
865
|
}
|
|
@@ -867,7 +868,7 @@ function Ze(e) {
|
|
|
867
868
|
function Q(e) {
|
|
868
869
|
return e == null || e === "" || Number.isNaN(e);
|
|
869
870
|
}
|
|
870
|
-
var
|
|
871
|
+
var Ze = {
|
|
871
872
|
default: (e, t) => Q(e) ? String(t ?? "") : String(e),
|
|
872
873
|
append: (e, t) => t && !Q(e) ? `${e} ${t}` : e,
|
|
873
874
|
prepend: (e, t) => t && !Q(e) ? `${t} ${e}` : e,
|
|
@@ -888,24 +889,24 @@ var Qe = {
|
|
|
888
889
|
return e instanceof Set ? t.format(Array.from(e).map(String)) : e;
|
|
889
890
|
}
|
|
890
891
|
};
|
|
891
|
-
function
|
|
892
|
+
function Qe(e) {
|
|
892
893
|
return typeof e == "object" && !!e;
|
|
893
894
|
}
|
|
894
|
-
function
|
|
895
|
+
function $e(e, t) {
|
|
895
896
|
let n = t;
|
|
896
|
-
for (let t of e.split(".")) if (
|
|
897
|
+
for (let t of e.split(".")) if (Qe(n) && t in n) n = n[t];
|
|
897
898
|
else return;
|
|
898
899
|
return typeof n == "function" ? n() : n;
|
|
899
900
|
}
|
|
900
|
-
function
|
|
901
|
-
let n = e.split("|").map((e) => e.trim()), r =
|
|
901
|
+
function et(e, t) {
|
|
902
|
+
let n = e.split("|").map((e) => e.trim()), r = $e(n.shift() ?? "", t);
|
|
902
903
|
for (let e of n) {
|
|
903
|
-
let [t, ...n] = e.split(":"), i = t?.trim() ?? "", a = n.join(":").trim().replaceAll(/(?:^['"]|['"]$)/g, ""), o =
|
|
904
|
+
let [t, ...n] = e.split(":"), i = t?.trim() ?? "", a = n.join(":").trim().replaceAll(/(?:^['"]|['"]$)/g, ""), o = Ze[i];
|
|
904
905
|
o && (r = o(r, a));
|
|
905
906
|
}
|
|
906
907
|
return Q(r) ? "" : typeof r == "object" ? JSON.stringify(r) : String(r);
|
|
907
908
|
}
|
|
908
|
-
function
|
|
909
|
+
function tt(e, t) {
|
|
909
910
|
let n = "", r = 0;
|
|
910
911
|
for (; r < e.length;) if (e[r] === "{" && e[r + 1] === "{") {
|
|
911
912
|
r += 2;
|
|
@@ -917,7 +918,7 @@ function nt(e, t) {
|
|
|
917
918
|
}
|
|
918
919
|
i += e[r++];
|
|
919
920
|
}
|
|
920
|
-
n +=
|
|
921
|
+
n += et(i.trim(), t);
|
|
921
922
|
} else n += e[r++];
|
|
922
923
|
return n;
|
|
923
924
|
}
|
|
@@ -929,7 +930,7 @@ var $ = class {
|
|
|
929
930
|
isReady = !1;
|
|
930
931
|
plugins = {};
|
|
931
932
|
pluginStartHooks = [];
|
|
932
|
-
eventBus =
|
|
933
|
+
eventBus = O();
|
|
933
934
|
events;
|
|
934
935
|
organizationId;
|
|
935
936
|
projectId;
|
|
@@ -940,30 +941,30 @@ var $ = class {
|
|
|
940
941
|
precondition;
|
|
941
942
|
condition;
|
|
942
943
|
preconditionPassed;
|
|
943
|
-
searchParams =
|
|
944
|
-
history =
|
|
944
|
+
searchParams = We();
|
|
945
|
+
history = _e();
|
|
945
946
|
components = ue({ client: this });
|
|
946
|
-
experienceInstances =
|
|
947
|
-
experiences =
|
|
948
|
-
frameworks =
|
|
949
|
-
predicates =
|
|
950
|
-
features =
|
|
951
|
-
conditions =
|
|
952
|
-
fields =
|
|
953
|
-
responses =
|
|
954
|
-
steps =
|
|
955
|
-
actions =
|
|
947
|
+
experienceInstances = ie({ client: this });
|
|
948
|
+
experiences = ee({ client: this });
|
|
949
|
+
frameworks = I({ client: this });
|
|
950
|
+
predicates = de({ client: this });
|
|
951
|
+
features = me({ client: this });
|
|
952
|
+
conditions = He();
|
|
953
|
+
fields = Se();
|
|
954
|
+
responses = ze({ client: this });
|
|
955
|
+
steps = Te();
|
|
956
|
+
actions = ke({ client: this });
|
|
956
957
|
constructor(e) {
|
|
957
|
-
this.events =
|
|
958
|
-
let { organizationId: t, projectId: n } =
|
|
959
|
-
this.organizationId = t, this.projectId = n, this.options = Object.freeze(e), this.apiUrl = e.apiUrl ||
|
|
958
|
+
this.events = ye(this.eventBus);
|
|
959
|
+
let { organizationId: t, projectId: n } = Z(e);
|
|
960
|
+
this.organizationId = t, this.projectId = n, this.options = Object.freeze(e), this.apiUrl = e.apiUrl || Ue(), this.dashboardUrl = e.dashboardUrl ?? "https://dashboard.picked.app", this.documentationSiteUrl = e.documentationSiteUrl ?? "https://docs.picked.app", this.session = Je(), this.setupPlugins(), this.setupFeatures(), this.setupPredicates(), this.setupActions(), this.setupComponents(), this.precondition = e.precondition, this.condition = e.condition, this.eventBus({
|
|
960
961
|
type: "load",
|
|
961
|
-
version:
|
|
962
|
+
version: re()
|
|
962
963
|
});
|
|
963
964
|
}
|
|
964
965
|
start = () => {
|
|
965
|
-
|
|
966
|
-
if (!
|
|
966
|
+
B(this), (async () => {
|
|
967
|
+
if (!d()) return;
|
|
967
968
|
await this.runPluginStartHooks();
|
|
968
969
|
let e = await this.evaluateGate(this.precondition);
|
|
969
970
|
this.preconditionPassed = e;
|
|
@@ -977,7 +978,7 @@ var $ = class {
|
|
|
977
978
|
value: e
|
|
978
979
|
});
|
|
979
980
|
}
|
|
980
|
-
if (this.eventBus({ type: "initialize" }), n && v(this), await
|
|
981
|
+
if (this.eventBus({ type: "initialize" }), n && v(this), await g(), n && v(this), this.eventBus({ type: "ready" }), this.isReady = !0, this.session) {
|
|
981
982
|
let { id: e, isUser: t, identifiers: n } = this.session;
|
|
982
983
|
this.eventBus({
|
|
983
984
|
type: "session",
|
|
@@ -989,10 +990,10 @@ var $ = class {
|
|
|
989
990
|
})();
|
|
990
991
|
};
|
|
991
992
|
registerFramework = (e) => {
|
|
992
|
-
|
|
993
|
+
L(e, this.frameworks);
|
|
993
994
|
};
|
|
994
995
|
registerComponent = (e, t) => {
|
|
995
|
-
|
|
996
|
+
N(e, t, this.components);
|
|
996
997
|
};
|
|
997
998
|
registerPlugin = (e) => {
|
|
998
999
|
ae(this, e, this.plugins);
|
|
@@ -1000,10 +1001,10 @@ var $ = class {
|
|
|
1000
1001
|
t?.onStart && this.pluginStartHooks.push(t.onStart);
|
|
1001
1002
|
};
|
|
1002
1003
|
registerFeature = (e, t) => {
|
|
1003
|
-
|
|
1004
|
+
he(e, t, this.features);
|
|
1004
1005
|
};
|
|
1005
1006
|
registerPredicate = (e, t) => {
|
|
1006
|
-
|
|
1007
|
+
fe(e, t, this.predicates);
|
|
1007
1008
|
};
|
|
1008
1009
|
registerCondition = (e) => {
|
|
1009
1010
|
this.conditions.register(e);
|
|
@@ -1012,15 +1013,15 @@ var $ = class {
|
|
|
1012
1013
|
this.fields.register(e);
|
|
1013
1014
|
};
|
|
1014
1015
|
registerStep = (e) => {
|
|
1015
|
-
|
|
1016
|
+
Ee(e, this.steps);
|
|
1016
1017
|
};
|
|
1017
1018
|
registerAction = (e, t) => {
|
|
1018
|
-
|
|
1019
|
+
Ae(e, t, this.actions);
|
|
1019
1020
|
};
|
|
1020
1021
|
registerExperience = (e) => {
|
|
1021
|
-
e.component &&
|
|
1022
|
+
e.component && N(`experience:${e.id}`, e.component, this.components), this.experiences.register(e);
|
|
1022
1023
|
};
|
|
1023
|
-
getStateSnapshot = () =>
|
|
1024
|
+
getStateSnapshot = () => V(this);
|
|
1024
1025
|
launchExperienceById = async (e, t) => {
|
|
1025
1026
|
this.experiences.launch({
|
|
1026
1027
|
id: e,
|
|
@@ -1042,8 +1043,8 @@ var $ = class {
|
|
|
1042
1043
|
async runPluginStartHooks() {
|
|
1043
1044
|
for (let e of this.pluginStartHooks) await e();
|
|
1044
1045
|
}
|
|
1045
|
-
async evaluateGate(
|
|
1046
|
-
return
|
|
1046
|
+
async evaluateGate(t) {
|
|
1047
|
+
return t === void 0 ? !0 : typeof t == "boolean" ? t : await e(this, t) === !0;
|
|
1047
1048
|
}
|
|
1048
1049
|
setupPlugins() {
|
|
1049
1050
|
this.options.plugins?.forEach((e) => {
|
|
@@ -1109,7 +1110,7 @@ var $ = class {
|
|
|
1109
1110
|
getPluginConfig = (e) => this.plugins[e] ?? {};
|
|
1110
1111
|
renderString = (e, t) => {
|
|
1111
1112
|
let n = this.responses.listStore.getState().reduce((e, t) => (e[t.fieldKey] = t.value, e), {});
|
|
1112
|
-
return
|
|
1113
|
+
return tt(e, {
|
|
1113
1114
|
...t,
|
|
1114
1115
|
responses: n
|
|
1115
1116
|
});
|
|
@@ -1117,20 +1118,20 @@ var $ = class {
|
|
|
1117
1118
|
};
|
|
1118
1119
|
//#endregion
|
|
1119
1120
|
//#region src/entities/component/lazyComponent.ts
|
|
1120
|
-
function
|
|
1121
|
+
function nt(e) {
|
|
1121
1122
|
return {
|
|
1122
1123
|
$$type: "lazy-component",
|
|
1123
1124
|
load: e
|
|
1124
1125
|
};
|
|
1125
1126
|
}
|
|
1126
|
-
function
|
|
1127
|
+
function rt(e) {
|
|
1127
1128
|
return typeof e == "object" && !!e && "$$type" in e && e.$$type === "lazy-component";
|
|
1128
1129
|
}
|
|
1129
1130
|
//#endregion
|
|
1130
1131
|
//#region src/exports.ts
|
|
1131
|
-
var
|
|
1132
|
+
var it = (e) => {
|
|
1132
1133
|
let t = new $(e);
|
|
1133
|
-
return
|
|
1134
|
+
return u(t), t;
|
|
1134
1135
|
};
|
|
1135
1136
|
//#endregion
|
|
1136
|
-
export { $ as Picked,
|
|
1137
|
+
export { $ as Picked, it as createClient, x as createStorageKey, e as evaluateRuleLogic, X as getPickedConfig, rt as isLazyLoader, _ as isPickedRoot, nt as lazyComponent, y as localStore, b as sessionStore, te as subscribe, p as supportsCookies, c as supportsCryptoRandomUUID, d as supportsDocument, o as supportsHistory, r as supportsIntersectionObserver, l as supportsLocalStorage, f as supportsLocation, i as supportsSessionStorage, s as supportsShadowRoot, m as supportsWebComponents, a as supportsWindow };
|