playlight-sdk 0.3.7 → 0.3.8
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/playlight-sdk.es.js +71 -71
- package/dist/playlight-sdk.es.js.map +1 -1
- package/package.json +1 -1
package/dist/playlight-sdk.es.js
CHANGED
|
@@ -9,7 +9,7 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
|
|
|
9
9
|
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10
10
|
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
11
11
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
12
|
-
var _e3, _t2, _n2, _r, _s, _i, _o, _Batch_instances, a_fn, c_fn, l_fn, u_fn, _n3, _d2, _f, _p, _h, _g, __, _v, _m, _b2, _y, _w, _$, _x, _k, _S, _C, _Boundary_instances, I_fn, M_fn, E_fn, T_fn, O_fn, P_fn, _L, _D, _A,
|
|
12
|
+
var _e3, _t2, _n2, _r, _s, _i, _o, _Batch_instances, a_fn, c_fn, l_fn, u_fn, _n3, _d2, _f, _p, _h, _g, __, _v, _m, _b2, _y, _w, _$, _x, _k, _S, _C, _Boundary_instances, I_fn, M_fn, E_fn, T_fn, O_fn, P_fn, _L, _D, _A, _j, _u, _W, _B, _N, _ResizeObserverSingleton_instances, q_fn, _a, _z, _R, _b, _F, _G, _c, _H, _Y, _V, _d, _U, _PlayLightAPI_instances, K_fn, _e2;
|
|
13
13
|
const e = {
|
|
14
14
|
exitIntent: {
|
|
15
15
|
enabled: true,
|
|
@@ -82,17 +82,17 @@ function lifecycle_outside_component(e2) {
|
|
|
82
82
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
83
83
|
}
|
|
84
84
|
let A = false;
|
|
85
|
-
const
|
|
86
|
-
let
|
|
85
|
+
const j = Symbol();
|
|
86
|
+
let W = null;
|
|
87
87
|
function set_component_context(e2) {
|
|
88
|
-
|
|
88
|
+
W = e2;
|
|
89
89
|
}
|
|
90
90
|
function getContext(e2) {
|
|
91
91
|
return get_or_init_context_map().get(e2);
|
|
92
92
|
}
|
|
93
93
|
function push(e2, t2 = false, n2) {
|
|
94
|
-
|
|
95
|
-
p:
|
|
94
|
+
W = {
|
|
95
|
+
p: W,
|
|
96
96
|
c: null,
|
|
97
97
|
e: null,
|
|
98
98
|
s: e2,
|
|
@@ -107,17 +107,17 @@ function push(e2, t2 = false, n2) {
|
|
|
107
107
|
function pop(e2) {
|
|
108
108
|
var t2 = (
|
|
109
109
|
/** @type {ComponentContext} */
|
|
110
|
-
|
|
110
|
+
W
|
|
111
111
|
), n2 = t2.e;
|
|
112
112
|
if (null !== n2) for (var s2 of (t2.e = null, n2)) create_user_effect(s2);
|
|
113
|
-
return
|
|
113
|
+
return W = t2.p, /** @type {T} */
|
|
114
114
|
{};
|
|
115
115
|
}
|
|
116
116
|
function is_runes() {
|
|
117
|
-
return !A || null !==
|
|
117
|
+
return !A || null !== W && null === W.l;
|
|
118
118
|
}
|
|
119
119
|
function get_or_init_context_map(e2) {
|
|
120
|
-
return null ===
|
|
120
|
+
return null === W && lifecycle_outside_component(), W.c ?? (W.c = new Map(
|
|
121
121
|
/**
|
|
122
122
|
* @param {ComponentContext} component_context
|
|
123
123
|
* @returns {Map<unknown, unknown> | null}
|
|
@@ -130,7 +130,7 @@ function get_or_init_context_map(e2) {
|
|
|
130
130
|
t2 = t2.p;
|
|
131
131
|
}
|
|
132
132
|
return null;
|
|
133
|
-
})(
|
|
133
|
+
})(W) || void 0
|
|
134
134
|
));
|
|
135
135
|
}
|
|
136
136
|
let B = [];
|
|
@@ -194,10 +194,10 @@ function proxy(e2) {
|
|
|
194
194
|
var n2 = s2.get(t3);
|
|
195
195
|
if (void 0 === n2) {
|
|
196
196
|
if (t3 in e3) {
|
|
197
|
-
const e4 = with_parent(() => /* @__PURE__ */ state(
|
|
197
|
+
const e4 = with_parent(() => /* @__PURE__ */ state(j));
|
|
198
198
|
s2.set(t3, e4), increment(o2);
|
|
199
199
|
}
|
|
200
|
-
} else set(n2,
|
|
200
|
+
} else set(n2, j), increment(o2);
|
|
201
201
|
return true;
|
|
202
202
|
},
|
|
203
203
|
get(t3, n2, i3) {
|
|
@@ -206,10 +206,10 @@ function proxy(e2) {
|
|
|
206
206
|
var o3 = s2.get(n2), l3 = n2 in t3;
|
|
207
207
|
if (
|
|
208
208
|
// create a source, but only if it's an own property and not a prototype property
|
|
209
|
-
void 0 !== o3 || l3 && !((_a2 = a(t3, n2)) == null ? void 0 : _a2.writable) || (o3 = with_parent(() => /* @__PURE__ */ state(proxy(l3 ? t3[n2] :
|
|
209
|
+
void 0 !== o3 || l3 && !((_a2 = a(t3, n2)) == null ? void 0 : _a2.writable) || (o3 = with_parent(() => /* @__PURE__ */ state(proxy(l3 ? t3[n2] : j))), s2.set(n2, o3)), void 0 !== o3
|
|
210
210
|
) {
|
|
211
211
|
var c2 = get$1(o3);
|
|
212
|
-
return c2 ===
|
|
212
|
+
return c2 === j ? void 0 : c2;
|
|
213
213
|
}
|
|
214
214
|
return Reflect.get(t3, n2, i3);
|
|
215
215
|
},
|
|
@@ -220,7 +220,7 @@ function proxy(e2) {
|
|
|
220
220
|
i3 && (n2.value = get$1(i3));
|
|
221
221
|
} else if (void 0 === n2) {
|
|
222
222
|
var o3 = s2.get(t3), a2 = o3 == null ? void 0 : o3.v;
|
|
223
|
-
if (void 0 !== o3 && a2 !==
|
|
223
|
+
if (void 0 !== o3 && a2 !== j) return {
|
|
224
224
|
enumerable: true,
|
|
225
225
|
configurable: true,
|
|
226
226
|
value: a2,
|
|
@@ -232,8 +232,8 @@ function proxy(e2) {
|
|
|
232
232
|
has(e3, t3) {
|
|
233
233
|
var _a2;
|
|
234
234
|
if (t3 === T) return true;
|
|
235
|
-
var n2 = s2.get(t3), i3 = void 0 !== n2 && n2.v !==
|
|
236
|
-
if ((void 0 !== n2 || null !== ae && (!i3 || ((_a2 = a(e3, t3)) == null ? void 0 : _a2.writable))) && (void 0 === n2 && (n2 = with_parent(() => /* @__PURE__ */ state(i3 ? proxy(e3[t3]) :
|
|
235
|
+
var n2 = s2.get(t3), i3 = void 0 !== n2 && n2.v !== j || Reflect.has(e3, t3);
|
|
236
|
+
if ((void 0 !== n2 || null !== ae && (!i3 || ((_a2 = a(e3, t3)) == null ? void 0 : _a2.writable))) && (void 0 === n2 && (n2 = with_parent(() => /* @__PURE__ */ state(i3 ? proxy(e3[t3]) : j)), s2.set(t3, n2)), get$1(n2) === j)) return false;
|
|
237
237
|
return i3;
|
|
238
238
|
},
|
|
239
239
|
set(e3, t3, n2, l3) {
|
|
@@ -242,12 +242,12 @@ function proxy(e2) {
|
|
|
242
242
|
if (i2 && "length" === t3) for (var d2 = n2; d2 < /** @type {Source<number>} */
|
|
243
243
|
c2.v; d2 += 1) {
|
|
244
244
|
var f2 = s2.get(d2 + "");
|
|
245
|
-
void 0 !== f2 ? set(f2,
|
|
245
|
+
void 0 !== f2 ? set(f2, j) : d2 in e3 && // If the item exists in the original, we need to create a uninitialized source,
|
|
246
246
|
// else a later read of the property would result in a source being created with
|
|
247
247
|
// the value of the original item at that index.
|
|
248
|
-
(f2 = with_parent(() => /* @__PURE__ */ state(
|
|
248
|
+
(f2 = with_parent(() => /* @__PURE__ */ state(j)), s2.set(d2 + "", f2));
|
|
249
249
|
}
|
|
250
|
-
void 0 === c2 ? u2 && !((_a2 = a(e3, t3)) == null ? void 0 : _a2.writable) || (set(c2 = with_parent(() => /* @__PURE__ */ state(void 0)), proxy(n2)), s2.set(t3, c2)) : (u2 = c2.v !==
|
|
250
|
+
void 0 === c2 ? u2 && !((_a2 = a(e3, t3)) == null ? void 0 : _a2.writable) || (set(c2 = with_parent(() => /* @__PURE__ */ state(void 0)), proxy(n2)), s2.set(t3, c2)) : (u2 = c2.v !== j, set(c2, with_parent(() => proxy(n2))));
|
|
251
251
|
var p2 = Reflect.getOwnPropertyDescriptor(e3, t3);
|
|
252
252
|
if ((p2 == null ? void 0 : p2.set) && p2.set.call(l3, n2), !u2) {
|
|
253
253
|
if (i2 && "string" == typeof t3) {
|
|
@@ -265,9 +265,9 @@ function proxy(e2) {
|
|
|
265
265
|
get$1(o2);
|
|
266
266
|
var t3 = Reflect.ownKeys(e3).filter((e4) => {
|
|
267
267
|
var t4 = s2.get(e4);
|
|
268
|
-
return void 0 === t4 || t4.v !==
|
|
268
|
+
return void 0 === t4 || t4.v !== j;
|
|
269
269
|
});
|
|
270
|
-
for (var [n2, i3] of s2) i3.v ===
|
|
270
|
+
for (var [n2, i3] of s2) i3.v === j || n2 in e3 || t3.push(n2);
|
|
271
271
|
return t3;
|
|
272
272
|
},
|
|
273
273
|
setPrototypeOf() {
|
|
@@ -907,7 +907,7 @@ E_fn = function() {
|
|
|
907
907
|
* @param {() => Effect | null} fn
|
|
908
908
|
*/
|
|
909
909
|
T_fn = function(e2) {
|
|
910
|
-
var t2 = ae, n2 = ie, s2 =
|
|
910
|
+
var t2 = ae, n2 = ie, s2 = W;
|
|
911
911
|
set_active_effect(__privateGet(this, _g)), set_active_reaction(__privateGet(this, _g)), set_component_context(__privateGet(this, _g).ctx);
|
|
912
912
|
try {
|
|
913
913
|
return e2();
|
|
@@ -951,7 +951,7 @@ function flatten(e2, t2, n2) {
|
|
|
951
951
|
* causes `b` to be registered as a dependency).
|
|
952
952
|
*/
|
|
953
953
|
/* @__PURE__ */ (function capture() {
|
|
954
|
-
var e3 = ae, t3 = ie, n3 =
|
|
954
|
+
var e3 = ae, t3 = ie, n3 = W, s3 = H;
|
|
955
955
|
return function restore2() {
|
|
956
956
|
set_active_effect(e3), set_active_reaction(t3), set_component_context(n3), s3 == null ? void 0 : s3.activate();
|
|
957
957
|
};
|
|
@@ -981,7 +981,7 @@ function flatten(e2, t2, n2) {
|
|
|
981
981
|
void 0
|
|
982
982
|
), o3 = source(
|
|
983
983
|
/** @type {V} */
|
|
984
|
-
|
|
984
|
+
j
|
|
985
985
|
), a3 = !ie, l2 = /* @__PURE__ */ new Map();
|
|
986
986
|
return (function async_effect(e5) {
|
|
987
987
|
return create_effect(4718592, e5, true);
|
|
@@ -1064,7 +1064,7 @@ function derived(e2) {
|
|
|
1064
1064
|
ae.f |= S
|
|
1065
1065
|
);
|
|
1066
1066
|
return {
|
|
1067
|
-
ctx:
|
|
1067
|
+
ctx: W,
|
|
1068
1068
|
deps: null,
|
|
1069
1069
|
effects: null,
|
|
1070
1070
|
equals,
|
|
@@ -1074,7 +1074,7 @@ function derived(e2) {
|
|
|
1074
1074
|
rv: 0,
|
|
1075
1075
|
v: (
|
|
1076
1076
|
/** @type {V} */
|
|
1077
|
-
|
|
1077
|
+
j
|
|
1078
1078
|
),
|
|
1079
1079
|
wv: 0,
|
|
1080
1080
|
parent: n2 ?? ae,
|
|
@@ -1146,7 +1146,7 @@ function mutable_source(e2, t2 = false, n2 = true) {
|
|
|
1146
1146
|
const s2 = source(e2);
|
|
1147
1147
|
return t2 || (s2.equals = safe_equals), // bind the signal to the component context, in case we need to
|
|
1148
1148
|
// track updates to trigger beforeUpdate/afterUpdate callbacks
|
|
1149
|
-
A && n2 && null !==
|
|
1149
|
+
A && n2 && null !== W && null !== W.l && ((_a2 = W.l).s ?? (_a2.s = [])).push(s2), s2;
|
|
1150
1150
|
}
|
|
1151
1151
|
function set(e2, t2, n2 = false) {
|
|
1152
1152
|
return null !== ie && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
@@ -1319,7 +1319,7 @@ function schedule_possible_effect_self_invalidation(e2, t2, n2 = true) {
|
|
|
1319
1319
|
}
|
|
1320
1320
|
function update_reaction(e2) {
|
|
1321
1321
|
var _a2;
|
|
1322
|
-
var t2 = ce, n2 = ue, s2 = de, i2 = ie, o2 = ge, a2 = le, l2 =
|
|
1322
|
+
var t2 = ce, n2 = ue, s2 = de, i2 = ie, o2 = ge, a2 = le, l2 = W, c2 = oe, u2 = he, d2 = e2.f;
|
|
1323
1323
|
ce = /** @type {null | Value[]} */
|
|
1324
1324
|
null, ue = 0, de = null, ge = 0 !== (d2 & C) && (oe || !re || null === ie), ie = 96 & d2 ? null : e2, le = null, set_component_context(e2.ctx), oe = false, he = ++pe, null !== e2.ac && (without_reactive_context(() => {
|
|
1325
1325
|
e2.ac.abort(D);
|
|
@@ -1473,7 +1473,7 @@ function get$1(e2) {
|
|
|
1473
1473
|
return e2.v;
|
|
1474
1474
|
}
|
|
1475
1475
|
function depends_on_old_values(e2) {
|
|
1476
|
-
if (e2.v ===
|
|
1476
|
+
if (e2.v === j) return true;
|
|
1477
1477
|
if (null === e2.deps) return false;
|
|
1478
1478
|
for (const t2 of e2.deps) {
|
|
1479
1479
|
if (te.has(t2)) return true;
|
|
@@ -1518,7 +1518,7 @@ function create_effect(e2, t2, n2, s2 = true) {
|
|
|
1518
1518
|
var i2 = ae;
|
|
1519
1519
|
null !== i2 && 0 !== (i2.f & y) && (e2 |= y);
|
|
1520
1520
|
var o2 = {
|
|
1521
|
-
ctx:
|
|
1521
|
+
ctx: W,
|
|
1522
1522
|
deps: null,
|
|
1523
1523
|
nodes_start: null,
|
|
1524
1524
|
nodes_end: null,
|
|
@@ -1571,7 +1571,7 @@ function user_effect(e2) {
|
|
|
1571
1571
|
return create_user_effect(e2);
|
|
1572
1572
|
var n2 = (
|
|
1573
1573
|
/** @type {ComponentContext} */
|
|
1574
|
-
|
|
1574
|
+
W
|
|
1575
1575
|
);
|
|
1576
1576
|
(n2.e ?? (n2.e = [])).push(e2);
|
|
1577
1577
|
}
|
|
@@ -1973,7 +1973,7 @@ function mount(e2, t2) {
|
|
|
1973
1973
|
},
|
|
1974
1974
|
(t4) => {
|
|
1975
1975
|
l2 && (push({}), /** @type {ComponentContext} */
|
|
1976
|
-
|
|
1976
|
+
W.c = l2);
|
|
1977
1977
|
o2 && // We can't spread the object or else we'd lose the state proxy stuff, if it is one
|
|
1978
1978
|
/** @type {any} */
|
|
1979
1979
|
(s2.$$events = o2), xe = c2, // @ts-expect-error the public typings are not what the actual function looks like
|
|
@@ -2020,7 +2020,7 @@ class BranchManager {
|
|
|
2020
2020
|
* Whether to pause (i.e. outro) on change, or destroy immediately.
|
|
2021
2021
|
* This is necessary for `<svelte:element>`
|
|
2022
2022
|
*/
|
|
2023
|
-
__privateAdd(this,
|
|
2023
|
+
__privateAdd(this, _j, true);
|
|
2024
2024
|
__privateAdd(this, _u, () => {
|
|
2025
2025
|
var e2 = (
|
|
2026
2026
|
/** @type {Batch} */
|
|
@@ -2061,11 +2061,11 @@ class BranchManager {
|
|
|
2061
2061
|
} else destroy_effect(s3);
|
|
2062
2062
|
__privateGet(this, _D).delete(e3);
|
|
2063
2063
|
};
|
|
2064
|
-
__privateGet(this,
|
|
2064
|
+
__privateGet(this, _j) || !n2 ? pause_effect(s3, on_destroy, false) : on_destroy();
|
|
2065
2065
|
}
|
|
2066
2066
|
}
|
|
2067
2067
|
});
|
|
2068
|
-
this.anchor = e2, __privateSet(this,
|
|
2068
|
+
this.anchor = e2, __privateSet(this, _j, t2);
|
|
2069
2069
|
}
|
|
2070
2070
|
/**
|
|
2071
2071
|
*
|
|
@@ -2084,7 +2084,7 @@ class BranchManager {
|
|
|
2084
2084
|
_L = new WeakMap();
|
|
2085
2085
|
_D = new WeakMap();
|
|
2086
2086
|
_A = new WeakMap();
|
|
2087
|
-
|
|
2087
|
+
_j = new WeakMap();
|
|
2088
2088
|
_u = new WeakMap();
|
|
2089
2089
|
function if_block(e2, t2, n2 = false) {
|
|
2090
2090
|
var s2 = new BranchManager(e2);
|
|
@@ -2209,7 +2209,7 @@ function each(e2, t2, s2, o2, a2, l2 = null) {
|
|
|
2209
2209
|
var _a3;
|
|
2210
2210
|
if (void 0 !== f3) for (g3 of f3) (_a3 = g3.a) == null ? void 0 : _a3.apply();
|
|
2211
2211
|
});
|
|
2212
|
-
for (var
|
|
2212
|
+
for (var j2 of (e3.first = n2.first && n2.first.e, e3.last = k2 && k2.e, s3.values())) destroy_effect(j2.e);
|
|
2213
2213
|
s3.clear();
|
|
2214
2214
|
})(f2, d2, u2, g2, c2, a2, t2, o2, s2), null !== l2 && (0 === d2.length ? p2 ? resume_effect(p2) : p2 = branch(() => l2(c2)) : null !== p2 && pause_effect(p2, () => {
|
|
2215
2215
|
p2 = null;
|
|
@@ -2484,7 +2484,7 @@ function attribute_effect(e2, t2, n2 = [], s2 = [], i2, o2 = false, a2 = false)
|
|
|
2484
2484
|
if (null != y2 || l3 || m2) m2 || p3.includes(v2) && (l3 || "string" != typeof y2) ? (
|
|
2485
2485
|
// @ts-ignore
|
|
2486
2486
|
(e3[v2] = y2, // remove it from attributes's cache
|
|
2487
|
-
v2 in a3 && (a3[v2] =
|
|
2487
|
+
v2 in a3 && (a3[v2] = j))
|
|
2488
2488
|
) : "function" != typeof y2 && set_attribute(e3, v2, y2);
|
|
2489
2489
|
else if (a3[b2] = null, "value" === v2 || "checked" === v2) {
|
|
2490
2490
|
let k2 = (
|
|
@@ -2774,7 +2774,7 @@ const _ResizeObserverSingleton = class _ResizeObserverSingleton {
|
|
|
2774
2774
|
constructor(e2) {
|
|
2775
2775
|
__privateAdd(this, _ResizeObserverSingleton_instances);
|
|
2776
2776
|
/** */
|
|
2777
|
-
__privateAdd(this,
|
|
2777
|
+
__privateAdd(this, _W, /* @__PURE__ */ new WeakMap());
|
|
2778
2778
|
/** @type {ResizeObserver | undefined} */
|
|
2779
2779
|
__privateAdd(this, _B);
|
|
2780
2780
|
/** @type {ResizeObserverOptions} */
|
|
@@ -2786,15 +2786,15 @@ const _ResizeObserverSingleton = class _ResizeObserverSingleton {
|
|
|
2786
2786
|
* @param {(entry: ResizeObserverEntry) => any} listener
|
|
2787
2787
|
*/
|
|
2788
2788
|
observe(e2, t2) {
|
|
2789
|
-
var n2 = __privateGet(this,
|
|
2790
|
-
return n2.add(t2), __privateGet(this,
|
|
2791
|
-
var n3 = __privateGet(this,
|
|
2792
|
-
n3.delete(t2), 0 === n3.size && (__privateGet(this,
|
|
2789
|
+
var n2 = __privateGet(this, _W).get(e2) || /* @__PURE__ */ new Set();
|
|
2790
|
+
return n2.add(t2), __privateGet(this, _W).set(e2, n2), __privateMethod(this, _ResizeObserverSingleton_instances, q_fn).call(this).observe(e2, __privateGet(this, _N)), () => {
|
|
2791
|
+
var n3 = __privateGet(this, _W).get(e2);
|
|
2792
|
+
n3.delete(t2), 0 === n3.size && (__privateGet(this, _W).delete(e2), /** @type {ResizeObserver} */
|
|
2793
2793
|
__privateGet(this, _B).unobserve(e2));
|
|
2794
2794
|
};
|
|
2795
2795
|
}
|
|
2796
2796
|
};
|
|
2797
|
-
|
|
2797
|
+
_W = new WeakMap();
|
|
2798
2798
|
_B = new WeakMap();
|
|
2799
2799
|
_N = new WeakMap();
|
|
2800
2800
|
_ResizeObserverSingleton_instances = new WeakSet();
|
|
@@ -2802,7 +2802,7 @@ q_fn = function() {
|
|
|
2802
2802
|
return __privateGet(this, _B) ?? __privateSet(this, _B, new ResizeObserver(
|
|
2803
2803
|
/** @param {any} entries */
|
|
2804
2804
|
(e2) => {
|
|
2805
|
-
for (var t2 of e2) for (var n2 of (_ResizeObserverSingleton.entries.set(t2.target, t2), __privateGet(this,
|
|
2805
|
+
for (var t2 of e2) for (var n2 of (_ResizeObserverSingleton.entries.set(t2.target, t2), __privateGet(this, _W).get(t2.target) || [])) n2(t2);
|
|
2806
2806
|
}
|
|
2807
2807
|
));
|
|
2808
2808
|
};
|
|
@@ -2832,14 +2832,14 @@ function bind_this(e2 = {}, t2, n2, s2) {
|
|
|
2832
2832
|
};
|
|
2833
2833
|
}), e2;
|
|
2834
2834
|
}
|
|
2835
|
-
let Ae = false,
|
|
2835
|
+
let Ae = false, je = Symbol();
|
|
2836
2836
|
function store_get(e2, t2, n2) {
|
|
2837
2837
|
const s2 = n2[t2] ?? (n2[t2] = {
|
|
2838
2838
|
store: null,
|
|
2839
2839
|
source: /* @__PURE__ */ mutable_source(void 0),
|
|
2840
2840
|
unsubscribe: noop
|
|
2841
2841
|
});
|
|
2842
|
-
if (s2.store !== e2 && !(
|
|
2842
|
+
if (s2.store !== e2 && !(je in n2)) if (s2.unsubscribe(), s2.store = e2 ?? null, null == e2) s2.source.v = void 0, // see synchronous callback comment below
|
|
2843
2843
|
s2.unsubscribe = noop;
|
|
2844
2844
|
else {
|
|
2845
2845
|
var i2 = true;
|
|
@@ -2851,7 +2851,7 @@ function store_get(e2, t2, n2) {
|
|
|
2851
2851
|
) : set(s2.source, e3);
|
|
2852
2852
|
}), i2 = false;
|
|
2853
2853
|
}
|
|
2854
|
-
return e2 &&
|
|
2854
|
+
return e2 && je in n2 ? get(e2) : get$1(s2.source);
|
|
2855
2855
|
}
|
|
2856
2856
|
function store_set(e2, t2) {
|
|
2857
2857
|
return e2.set(t2), t2;
|
|
@@ -2863,14 +2863,14 @@ function setup_stores() {
|
|
|
2863
2863
|
for (var t2 in e2) {
|
|
2864
2864
|
e2[t2].unsubscribe();
|
|
2865
2865
|
}
|
|
2866
|
-
o(e2,
|
|
2866
|
+
o(e2, je, {
|
|
2867
2867
|
enumerable: false,
|
|
2868
2868
|
value: true
|
|
2869
2869
|
});
|
|
2870
2870
|
});
|
|
2871
2871
|
}];
|
|
2872
2872
|
}
|
|
2873
|
-
const
|
|
2873
|
+
const We = {
|
|
2874
2874
|
get(e2, t2) {
|
|
2875
2875
|
if (!e2.exclude.includes(t2)) return e2.props[t2];
|
|
2876
2876
|
},
|
|
@@ -2890,7 +2890,7 @@ function rest_props(e2, t2, n2) {
|
|
|
2890
2890
|
return new Proxy({
|
|
2891
2891
|
props: e2,
|
|
2892
2892
|
exclude: t2
|
|
2893
|
-
},
|
|
2893
|
+
}, We);
|
|
2894
2894
|
}
|
|
2895
2895
|
const Be = {
|
|
2896
2896
|
get(e2, t2) {
|
|
@@ -3018,7 +3018,7 @@ function prop(e2, t2, n2, s2) {
|
|
|
3018
3018
|
};
|
|
3019
3019
|
}
|
|
3020
3020
|
function onMount(e2) {
|
|
3021
|
-
null ===
|
|
3021
|
+
null === W && lifecycle_outside_component(), A && null !== W.l ? (
|
|
3022
3022
|
/**
|
|
3023
3023
|
* Legacy-mode: Init callbacks object for onMount/beforeUpdate/afterUpdate
|
|
3024
3024
|
* @param {ComponentContext} context
|
|
@@ -3033,7 +3033,7 @@ function onMount(e2) {
|
|
|
3033
3033
|
b: [],
|
|
3034
3034
|
m: []
|
|
3035
3035
|
});
|
|
3036
|
-
})(
|
|
3036
|
+
})(W).m.push(e2)
|
|
3037
3037
|
) : user_effect(() => {
|
|
3038
3038
|
const t2 = untrack(e2);
|
|
3039
3039
|
if ("function" == typeof t2) return t2;
|
|
@@ -3768,7 +3768,7 @@ function Toast(e2, t2) {
|
|
|
3768
3768
|
})(), L2 = user_derived(() => t2.toast.invert || t2.invert), D2 = user_derived(() => "loading" === get$1($2)), A2 = user_derived(() => ({
|
|
3769
3769
|
...l2,
|
|
3770
3770
|
...t2.classes
|
|
3771
|
-
})),
|
|
3771
|
+
})), j2 = user_derived(() => t2.toast.title), W2 = user_derived(() => t2.toast.description);
|
|
3772
3772
|
let B2 = /* @__PURE__ */ state(0), N2 = /* @__PURE__ */ state(0);
|
|
3773
3773
|
const q2 = user_derived(() => Math.round(14 * get$1(C2) + get$1(T2)));
|
|
3774
3774
|
function deleteToast() {
|
|
@@ -3780,7 +3780,7 @@ function Toast(e2, t2) {
|
|
|
3780
3780
|
let z2;
|
|
3781
3781
|
user_effect(() => {
|
|
3782
3782
|
let e3;
|
|
3783
|
-
get$1(
|
|
3783
|
+
get$1(j2), get$1(W2), e3 = t2.expanded || t2.expandByDefault ? 1 : 1 - 0.05 * t2.index;
|
|
3784
3784
|
const n3 = untrack(() => get$1(v2));
|
|
3785
3785
|
if (void 0 === n3) return;
|
|
3786
3786
|
n3.style.setProperty("height", "auto");
|
|
@@ -5197,7 +5197,7 @@ function restore(e2, t2, n2, s2, i2) {
|
|
|
5197
5197
|
});
|
|
5198
5198
|
}
|
|
5199
5199
|
delegate(["click"]);
|
|
5200
|
-
var At = /* @__PURE__ */ from_html('<div class="bg-background/85 fixed bottom-4 left-4 z-2 touch-none border p-4 shadow-lg backdrop-blur-xl max-sm:right-4 sm:w-72" role="button" tabindex="0"><!></div>'),
|
|
5200
|
+
var At = /* @__PURE__ */ from_html('<div class="bg-background/85 fixed bottom-4 left-4 z-2 touch-none border p-4 shadow-lg backdrop-blur-xl max-sm:right-4 sm:w-72" role="button" tabindex="0"><!></div>'), jt = /* @__PURE__ */ from_html('<div class="fixed bottom-0 z-3 shadow-xl max-sm:right-4 max-sm:left-4 sm:left-4 sm:w-72"><button class="bg-background/85 hover:bg-background/95 w-full rounded-t-md border border-b-0 px-4 py-2 backdrop-blur-sm transition" aria-label="Show game display"><div class="bg-muted-foreground mx-auto h-px w-16"></div></button></div>'), Wt = /* @__PURE__ */ from_html("<!> <!>", 1);
|
|
5201
5201
|
function DiscoveryDrawer(e2, t2) {
|
|
5202
5202
|
push(t2, true);
|
|
5203
5203
|
let n2 = /* @__PURE__ */ state(false), s2 = /* @__PURE__ */ state(0), i2 = /* @__PURE__ */ state(1), o2 = /* @__PURE__ */ state(false), a2 = 0;
|
|
@@ -5231,7 +5231,7 @@ function DiscoveryDrawer(e2, t2) {
|
|
|
5231
5231
|
}
|
|
5232
5232
|
}
|
|
5233
5233
|
onMount(() => animate2(250, (e3) => set(i2, e3, true)));
|
|
5234
|
-
var l2 =
|
|
5234
|
+
var l2 = Wt(), c2 = first_child(l2), consequent = (e3) => {
|
|
5235
5235
|
var n3 = At();
|
|
5236
5236
|
n3.__mousedown = startDrag, n3.__mousemove = drag, n3.__mouseup = endDrag, n3.__touchstart = startDrag, n3.__touchmove = drag, n3.__touchend = endDrag, CurrentGameDisplay(child(n3), {
|
|
5237
5237
|
get currentGame() {
|
|
@@ -5243,7 +5243,7 @@ function DiscoveryDrawer(e2, t2) {
|
|
|
5243
5243
|
t2.currentGame && !get$1(n2) && e3(consequent);
|
|
5244
5244
|
});
|
|
5245
5245
|
var u2 = sibling(c2, 2), consequent_1 = (e3) => {
|
|
5246
|
-
var t3 =
|
|
5246
|
+
var t3 = jt(), o3 = child(t3);
|
|
5247
5247
|
o3.__mousedown = [restore, n2, s2, i2, animate2], o3.__touchstart = [restore, n2, s2, i2, animate2], transition(3, o3, () => fly, () => ({
|
|
5248
5248
|
delay: 150,
|
|
5249
5249
|
y: 30
|
|
@@ -5556,7 +5556,7 @@ function App(e2) {
|
|
|
5556
5556
|
var o2 = sibling(i2, 2);
|
|
5557
5557
|
!(function ExitIntent(e3, t3) {
|
|
5558
5558
|
push(t3, true);
|
|
5559
|
-
const $config = () => store_get(
|
|
5559
|
+
const $config = () => store_get(Wn, "$config", n3), $discoveryOpen2 = () => store_get(Nn, "$discoveryOpen", n3), [n3, s3] = setup_stores();
|
|
5560
5560
|
let i3, o3 = /* @__PURE__ */ state(void 0), a3 = /* @__PURE__ */ state(void 0), l2 = /* @__PURE__ */ state(proxy([])), c2 = /* @__PURE__ */ state(false), u2 = /* @__PURE__ */ state(void 0);
|
|
5561
5561
|
function handleBarTrigger() {
|
|
5562
5562
|
setTimeout(async () => {
|
|
@@ -6071,11 +6071,11 @@ function activateCSSViewportOverride(e2) {
|
|
|
6071
6071
|
console.warn(`Playlight failed to process stylesheet ${e4.href || "inline"}:`, t4);
|
|
6072
6072
|
});
|
|
6073
6073
|
} else {
|
|
6074
|
-
const
|
|
6074
|
+
const o2 = i2.textContent.trim(), a2 = o2 || Array.from(e4.cssRules).map((e5) => e5.cssText).join("\n");
|
|
6075
6075
|
hn.set(i2, {
|
|
6076
|
-
originalCSS:
|
|
6076
|
+
originalCSS: a2,
|
|
6077
6077
|
originalElement: null
|
|
6078
|
-
}), transformStylesheet(i2,
|
|
6078
|
+
}), transformStylesheet(i2, a2, t3, n3, s2);
|
|
6079
6079
|
}
|
|
6080
6080
|
}
|
|
6081
6081
|
} catch (t4) {
|
|
@@ -6138,7 +6138,7 @@ function applyCSSOverrides(e2, t2, n2, s2) {
|
|
|
6138
6138
|
(e2 = e2.replace(/\(([\d.]+[a-z]+)\s*([<>=]+)\s*width\s*([<>=]+)\s*([\d.]+[a-z]+)\)/gi, (e3, t3, n3, i3, o3) => `(calc(${t3} + ${s2}px) ${n3} width ${i3} calc(${o3} + ${s2}px))`)).replace(/\(width\s*([<>=]+)\s*([\d.]+[a-z]+)\)/gi, (e3, t3, n3) => `(width ${t3} calc(${n3} + ${s2}px))`)).replace(/\(([\d.]+[a-z]+)\s*([<>=]+)\s*width\)/gi, (e3, t3, n3) => `(calc(${t3} + ${s2}px) ${n3} width)`)).replace(/\(\s*orientation:\s*portrait\s*\)/gi, `(max-width: ${o2}px)`)).replace(/\(\s*orientation:\s*landscape\s*\)/gi, `(min-width: ${o2 + 1}px)`)).replace(/\bbody\s*\{([^}]*)\}/gi, (e3, t3) => `.playlight-sdk-inner-wrapper {${t3.replace(/\s*!important\s*/gi, "")}}`);
|
|
6139
6139
|
}
|
|
6140
6140
|
let _n, vn = null, mn = null, bn = null, yn = null, wn = null, $n = null, xn = null, kn = null, Sn = null, Cn = null, En = /* @__PURE__ */ new Map();
|
|
6141
|
-
let On = null, In = null, Mn = null, Tn = false, Pn = false, Ln = [], Dn = null, An = null,
|
|
6141
|
+
let On = null, In = null, Mn = null, Tn = false, Pn = false, Ln = [], Dn = null, An = null, jn = null;
|
|
6142
6142
|
function mountPlaylight() {
|
|
6143
6143
|
try {
|
|
6144
6144
|
const e2 = document.createElement("div");
|
|
@@ -6146,7 +6146,7 @@ function mountPlaylight() {
|
|
|
6146
6146
|
const t2 = mount(App, {
|
|
6147
6147
|
target: e2
|
|
6148
6148
|
}), n2 = new MutationObserver(() => {
|
|
6149
|
-
document.body.contains(e2) || (clearTimeout(
|
|
6149
|
+
document.body.contains(e2) || (clearTimeout(jn), jn = setTimeout(() => {
|
|
6150
6150
|
document.body.contains(e2) || (console.warn("Re-mounting Playlight's main container as it was removed!"), n2.disconnect(), unmount(t2), mountPlaylight());
|
|
6151
6151
|
}, 0));
|
|
6152
6152
|
});
|
|
@@ -6170,10 +6170,10 @@ function setupSidebarLayout() {
|
|
|
6170
6170
|
return !["SCRIPT", "STYLE"].includes(e3.tagName) && !((_a3 = e3.id) == null ? void 0 : _a3.includes("playlight"));
|
|
6171
6171
|
}).forEach((e3) => t3.appendChild(e3)), e2.appendChild(t3), Pn = true, t3;
|
|
6172
6172
|
};
|
|
6173
|
-
if (false !== ((_b3 = (_a2 = get(
|
|
6173
|
+
if (false !== ((_b3 = (_a2 = get(Wn)) == null ? void 0 : _a2.sidebar) == null ? void 0 : _b3.hasFrameworkRoot) && s2.length > 0) {
|
|
6174
6174
|
if (1 === s2.length)
|
|
6175
6175
|
In = s2[0], Pn = false;
|
|
6176
|
-
else if (true === ((_d3 = (_c2 = get(
|
|
6176
|
+
else if (true === ((_d3 = (_c2 = get(Wn)) == null ? void 0 : _c2.sidebar) == null ? void 0 : _d3.hasFrameworkRoot)) {
|
|
6177
6177
|
const e3 = s2.map((e4) => e4.querySelectorAll("*").length), t3 = Math.max(...e3);
|
|
6178
6178
|
In = s2[e3.indexOf(t3)], Pn = false;
|
|
6179
6179
|
}
|
|
@@ -6304,7 +6304,7 @@ function removeSidebarLayout() {
|
|
|
6304
6304
|
console.error("Error during sidebar removal:", e2);
|
|
6305
6305
|
}
|
|
6306
6306
|
}
|
|
6307
|
-
const
|
|
6307
|
+
const Wn = writable(null), Bn = writable(false), Nn = writable(false), qn = writable(false), zn = writable(0), Rn = writable(false), Fn = writable(false), Gn = readable("https://sdk.playlight.dev"), Hn = readable("https://api.playlight.dev/platform");
|
|
6308
6308
|
let Yn;
|
|
6309
6309
|
Nn.subscribe((e2) => {
|
|
6310
6310
|
try {
|
|
@@ -6312,7 +6312,7 @@ Nn.subscribe((e2) => {
|
|
|
6312
6312
|
} catch (e3) {
|
|
6313
6313
|
console.error("Error in discoveryOpen store subscription:", e3);
|
|
6314
6314
|
}
|
|
6315
|
-
}),
|
|
6315
|
+
}), Wn.subscribe((e2) => {
|
|
6316
6316
|
var _a2;
|
|
6317
6317
|
((_a2 = e2 == null ? void 0 : e2.sidebar) == null ? void 0 : _a2.forceVisible) || get(Bn) ? Rn.set(true) : Rn.set(false);
|
|
6318
6318
|
}), Bn.subscribe((e2) => {
|
|
@@ -6619,7 +6619,7 @@ class PlaylightSDK {
|
|
|
6619
6619
|
* @param {object} [configParam] - Playlight configuration object
|
|
6620
6620
|
*/
|
|
6621
6621
|
setConfig(e2 = {}) {
|
|
6622
|
-
|
|
6622
|
+
Wn.set(createConfig(e2));
|
|
6623
6623
|
}
|
|
6624
6624
|
}();
|
|
6625
6625
|
"undefined" != typeof window && (window.playlightSDK = er);
|