@mateosuarezdev/flash 0.0.6 → 0.0.10
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/index.cjs +1 -1
- package/dist/index.d.ts +10 -9
- package/dist/index.js +165 -157
- package/dist/server-context-BA2xc7wp.js +47 -0
- package/dist/server-context-BPTFSl-d.cjs +11 -0
- package/dist/server.cjs +5 -5
- package/dist/server.js +99 -92
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8,18 +8,19 @@
|
|
|
8
8
|
* See LICENSE file for full terms.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import { n as
|
|
12
|
-
import { F as
|
|
13
|
-
|
|
11
|
+
import { n as H, s as w, g as I, c as m } from "./jsx-dev-runtime-dAReTOgq.js";
|
|
12
|
+
import { F as Re } from "./jsx-dev-runtime-dAReTOgq.js";
|
|
13
|
+
import { p as q, a as Z } from "./server-context-BA2xc7wp.js";
|
|
14
|
+
var J = Symbol.for("preact-signals");
|
|
14
15
|
function T() {
|
|
15
16
|
if (p > 1)
|
|
16
17
|
p--;
|
|
17
18
|
else {
|
|
18
19
|
for (var t, e = !1; S !== void 0; ) {
|
|
19
20
|
var i = S;
|
|
20
|
-
for (S = void 0,
|
|
21
|
+
for (S = void 0, M++; i !== void 0; ) {
|
|
21
22
|
var n = i.o;
|
|
22
|
-
if (i.o = void 0, i.f &= -3, !(8 & i.f) &&
|
|
23
|
+
if (i.o = void 0, i.f &= -3, !(8 & i.f) && j(i)) try {
|
|
23
24
|
i.c();
|
|
24
25
|
} catch (r) {
|
|
25
26
|
e || (t = r, e = !0);
|
|
@@ -27,10 +28,10 @@ function T() {
|
|
|
27
28
|
i = n;
|
|
28
29
|
}
|
|
29
30
|
}
|
|
30
|
-
if (
|
|
31
|
+
if (M = 0, p--, e) throw t;
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
|
-
function
|
|
34
|
+
function Ne(t) {
|
|
34
35
|
if (p > 0) return t();
|
|
35
36
|
p++;
|
|
36
37
|
try {
|
|
@@ -40,7 +41,7 @@ function Ce(t) {
|
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
var c = void 0;
|
|
43
|
-
function
|
|
44
|
+
function K(t) {
|
|
44
45
|
var e = c;
|
|
45
46
|
c = void 0;
|
|
46
47
|
try {
|
|
@@ -49,8 +50,8 @@ function I(t) {
|
|
|
49
50
|
c = e;
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
|
-
var S = void 0, p = 0,
|
|
53
|
-
function
|
|
53
|
+
var S = void 0, p = 0, M = 0, E = 0;
|
|
54
|
+
function G(t) {
|
|
54
55
|
if (c !== void 0) {
|
|
55
56
|
var e = t.n;
|
|
56
57
|
if (e === void 0 || e.t !== c)
|
|
@@ -62,13 +63,13 @@ function K(t) {
|
|
|
62
63
|
function u(t, e) {
|
|
63
64
|
this.v = t, this.i = 0, this.n = void 0, this.t = void 0, this.W = e?.watched, this.Z = e?.unwatched, this.name = e?.name;
|
|
64
65
|
}
|
|
65
|
-
u.prototype.brand =
|
|
66
|
+
u.prototype.brand = J;
|
|
66
67
|
u.prototype.h = function() {
|
|
67
68
|
return !0;
|
|
68
69
|
};
|
|
69
70
|
u.prototype.S = function(t) {
|
|
70
71
|
var e = this, i = this.t;
|
|
71
|
-
i !== t && t.e === void 0 && (t.x = i, this.t = t, i !== void 0 ? i.e = t :
|
|
72
|
+
i !== t && t.e === void 0 && (t.x = i, this.t = t, i !== void 0 ? i.e = t : K(function() {
|
|
72
73
|
var n;
|
|
73
74
|
(n = e.W) == null || n.call(e);
|
|
74
75
|
}));
|
|
@@ -77,7 +78,7 @@ u.prototype.U = function(t) {
|
|
|
77
78
|
var e = this;
|
|
78
79
|
if (this.t !== void 0) {
|
|
79
80
|
var i = t.e, n = t.x;
|
|
80
|
-
i !== void 0 && (i.x = n, t.e = void 0), n !== void 0 && (n.e = i, t.x = void 0), t === this.t && (this.t = n, n === void 0 &&
|
|
81
|
+
i !== void 0 && (i.x = n, t.e = void 0), n !== void 0 && (n.e = i, t.x = void 0), t === this.t && (this.t = n, n === void 0 && K(function() {
|
|
81
82
|
var r;
|
|
82
83
|
(r = e.Z) == null || r.call(e);
|
|
83
84
|
}));
|
|
@@ -114,11 +115,11 @@ u.prototype.peek = function() {
|
|
|
114
115
|
}
|
|
115
116
|
};
|
|
116
117
|
Object.defineProperty(u.prototype, "value", { get: function() {
|
|
117
|
-
var t =
|
|
118
|
+
var t = G(this);
|
|
118
119
|
return t !== void 0 && (t.i = this.i), this.v;
|
|
119
120
|
}, set: function(t) {
|
|
120
121
|
if (t !== this.v) {
|
|
121
|
-
if (
|
|
122
|
+
if (M > 100) throw new Error("Cycle detected");
|
|
122
123
|
this.v = t, this.i++, E++, p++;
|
|
123
124
|
try {
|
|
124
125
|
for (var e = this.t; e !== void 0; e = e.x) e.t.N();
|
|
@@ -127,14 +128,14 @@ Object.defineProperty(u.prototype, "value", { get: function() {
|
|
|
127
128
|
}
|
|
128
129
|
}
|
|
129
130
|
} });
|
|
130
|
-
function
|
|
131
|
+
function Ae(t, e) {
|
|
131
132
|
return new u(t, e);
|
|
132
133
|
}
|
|
133
|
-
function
|
|
134
|
+
function j(t) {
|
|
134
135
|
for (var e = t.s; e !== void 0; e = e.n) if (e.S.i !== e.i || !e.S.h() || e.S.i !== e.i) return !0;
|
|
135
136
|
return !1;
|
|
136
137
|
}
|
|
137
|
-
function
|
|
138
|
+
function X(t) {
|
|
138
139
|
for (var e = t.s; e !== void 0; e = e.n) {
|
|
139
140
|
var i = e.S.n;
|
|
140
141
|
if (i !== void 0 && (e.r = i), e.S.n = e, e.i = -1, e.n === void 0) {
|
|
@@ -143,7 +144,7 @@ function j(t) {
|
|
|
143
144
|
}
|
|
144
145
|
}
|
|
145
146
|
}
|
|
146
|
-
function
|
|
147
|
+
function Y(t) {
|
|
147
148
|
for (var e = t.s, i = void 0; e !== void 0; ) {
|
|
148
149
|
var n = e.p;
|
|
149
150
|
e.i === -1 ? (e.S.U(e), n !== void 0 && (n.n = e.n), e.n !== void 0 && (e.n.p = n)) : i = e, e.S.n = e.r, e.r !== void 0 && (e.r = void 0), e = n;
|
|
@@ -157,17 +158,17 @@ y.prototype = new u();
|
|
|
157
158
|
y.prototype.h = function() {
|
|
158
159
|
if (this.f &= -3, 1 & this.f) return !1;
|
|
159
160
|
if ((36 & this.f) == 32 || (this.f &= -5, this.g === E)) return !0;
|
|
160
|
-
if (this.g = E, this.f |= 1, this.i > 0 && !
|
|
161
|
+
if (this.g = E, this.f |= 1, this.i > 0 && !j(this))
|
|
161
162
|
return this.f &= -2, !0;
|
|
162
163
|
var t = c;
|
|
163
164
|
try {
|
|
164
|
-
|
|
165
|
+
X(this), c = this;
|
|
165
166
|
var e = this.x();
|
|
166
167
|
(16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++);
|
|
167
168
|
} catch (i) {
|
|
168
169
|
this.v = i, this.f |= 16, this.i++;
|
|
169
170
|
}
|
|
170
|
-
return c = t,
|
|
171
|
+
return c = t, Y(this), this.f &= -2, !0;
|
|
171
172
|
};
|
|
172
173
|
y.prototype.S = function(t) {
|
|
173
174
|
if (this.t === void 0) {
|
|
@@ -190,14 +191,14 @@ y.prototype.N = function() {
|
|
|
190
191
|
};
|
|
191
192
|
Object.defineProperty(y.prototype, "value", { get: function() {
|
|
192
193
|
if (1 & this.f) throw new Error("Cycle detected");
|
|
193
|
-
var t =
|
|
194
|
+
var t = G(this);
|
|
194
195
|
if (this.h(), t !== void 0 && (t.i = this.i), 16 & this.f) throw this.v;
|
|
195
196
|
return this.v;
|
|
196
197
|
} });
|
|
197
|
-
function
|
|
198
|
+
function Me(t, e) {
|
|
198
199
|
return new y(t, e);
|
|
199
200
|
}
|
|
200
|
-
function
|
|
201
|
+
function V(t) {
|
|
201
202
|
var e = t.u;
|
|
202
203
|
if (t.u = void 0, typeof e == "function") {
|
|
203
204
|
p++;
|
|
@@ -206,19 +207,19 @@ function Y(t) {
|
|
|
206
207
|
try {
|
|
207
208
|
e();
|
|
208
209
|
} catch (n) {
|
|
209
|
-
throw t.f &= -2, t.f |= 8,
|
|
210
|
+
throw t.f &= -2, t.f |= 8, x(t), n;
|
|
210
211
|
} finally {
|
|
211
212
|
c = i, T();
|
|
212
213
|
}
|
|
213
214
|
}
|
|
214
215
|
}
|
|
215
|
-
function
|
|
216
|
+
function x(t) {
|
|
216
217
|
for (var e = t.s; e !== void 0; e = e.n) e.S.U(e);
|
|
217
|
-
t.x = void 0, t.s = void 0,
|
|
218
|
+
t.x = void 0, t.s = void 0, V(t);
|
|
218
219
|
}
|
|
219
|
-
function
|
|
220
|
+
function Q(t) {
|
|
220
221
|
if (c !== this) throw new Error("Out-of-order effect");
|
|
221
|
-
|
|
222
|
+
Y(this), c = t, this.f &= -2, 8 & this.f && x(this), T();
|
|
222
223
|
}
|
|
223
224
|
function g(t, e) {
|
|
224
225
|
this.x = t, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32, this.name = e?.name;
|
|
@@ -235,15 +236,15 @@ g.prototype.c = function() {
|
|
|
235
236
|
};
|
|
236
237
|
g.prototype.S = function() {
|
|
237
238
|
if (1 & this.f) throw new Error("Cycle detected");
|
|
238
|
-
this.f |= 1, this.f &= -9,
|
|
239
|
+
this.f |= 1, this.f &= -9, V(this), X(this), p++;
|
|
239
240
|
var t = c;
|
|
240
|
-
return c = this,
|
|
241
|
+
return c = this, Q.bind(this, t);
|
|
241
242
|
};
|
|
242
243
|
g.prototype.N = function() {
|
|
243
244
|
2 & this.f || (this.f |= 2, this.o = S, S = this);
|
|
244
245
|
};
|
|
245
246
|
g.prototype.d = function() {
|
|
246
|
-
this.f |= 8, 1 & this.f ||
|
|
247
|
+
this.f |= 8, 1 & this.f || x(this);
|
|
247
248
|
};
|
|
248
249
|
g.prototype.dispose = function() {
|
|
249
250
|
this.d();
|
|
@@ -258,35 +259,35 @@ function v(t, e) {
|
|
|
258
259
|
var n = i.d.bind(i);
|
|
259
260
|
return n[Symbol.dispose] = n, n;
|
|
260
261
|
}
|
|
261
|
-
function
|
|
262
|
+
function xe(t) {
|
|
262
263
|
return t instanceof u ? t.peek() : t;
|
|
263
264
|
}
|
|
264
|
-
function
|
|
265
|
+
function Oe(t) {
|
|
265
266
|
return t instanceof u ? t.value : t;
|
|
266
267
|
}
|
|
267
|
-
function
|
|
268
|
+
function Pe(t, e) {
|
|
268
269
|
typeof e == "function" ? t.value = e() : t.value = e;
|
|
269
270
|
}
|
|
270
|
-
function
|
|
271
|
+
function De(t) {
|
|
271
272
|
return t instanceof u ? () => t.value : t;
|
|
272
273
|
}
|
|
273
|
-
function
|
|
274
|
+
function ee(t, e, i = !1) {
|
|
274
275
|
const n = [];
|
|
275
276
|
for (const [r, s] of Object.entries(e))
|
|
276
277
|
if (s != null && !(r === "children" || r === "key" || r === "autoanimate" || r === "innerHTML")) {
|
|
277
278
|
if (typeof s == "function" && r !== "ref" && !r.startsWith("on") && r !== "viewTransitionName") {
|
|
278
279
|
const o = v(() => {
|
|
279
280
|
const a = s();
|
|
280
|
-
|
|
281
|
+
F(t, r, a, i);
|
|
281
282
|
});
|
|
282
283
|
n.push(o);
|
|
283
284
|
continue;
|
|
284
285
|
}
|
|
285
|
-
|
|
286
|
+
F(t, r, s, i);
|
|
286
287
|
}
|
|
287
288
|
return () => n.forEach((r) => r());
|
|
288
289
|
}
|
|
289
|
-
function
|
|
290
|
+
function F(t, e, i, n) {
|
|
290
291
|
if (e === "ref" && typeof i == "function") {
|
|
291
292
|
i(t);
|
|
292
293
|
return;
|
|
@@ -315,16 +316,16 @@ function D(t, e, i, n) {
|
|
|
315
316
|
}
|
|
316
317
|
t.setAttribute(e, String(i));
|
|
317
318
|
}
|
|
318
|
-
function
|
|
319
|
+
function te(t, e) {
|
|
319
320
|
const i = document.createTextNode(String(e));
|
|
320
321
|
t.appendChild(i);
|
|
321
322
|
}
|
|
322
|
-
function
|
|
323
|
+
function U(t) {
|
|
323
324
|
return {
|
|
324
325
|
type: "reactive",
|
|
325
326
|
kind: "ReactiveVNode",
|
|
326
327
|
fn: t,
|
|
327
|
-
_id:
|
|
328
|
+
_id: H(),
|
|
328
329
|
_dispose: null,
|
|
329
330
|
_currentChild: null,
|
|
330
331
|
_currentDom: null,
|
|
@@ -348,7 +349,7 @@ function k(t, e) {
|
|
|
348
349
|
}
|
|
349
350
|
return { vnode: null, dom: null };
|
|
350
351
|
}
|
|
351
|
-
class
|
|
352
|
+
class O {
|
|
352
353
|
_cancelled = !1;
|
|
353
354
|
_cancelCallbacks = [];
|
|
354
355
|
get cancelled() {
|
|
@@ -371,9 +372,9 @@ class x {
|
|
|
371
372
|
throw new Error("Operation cancelled");
|
|
372
373
|
}
|
|
373
374
|
}
|
|
374
|
-
async function
|
|
375
|
+
async function $(t, e) {
|
|
375
376
|
if (!t) return;
|
|
376
|
-
const i = t, n = e || new
|
|
377
|
+
const i = t, n = e || new O();
|
|
377
378
|
if ("_onBeforeExitCallbacks" in i && i._onBeforeExitCallbacks.length > 0)
|
|
378
379
|
for (const r of i._onBeforeExitCallbacks)
|
|
379
380
|
try {
|
|
@@ -394,12 +395,12 @@ async function U(t, e) {
|
|
|
394
395
|
r._dispose && (r._dispose(), r._dispose = null);
|
|
395
396
|
}
|
|
396
397
|
"_renderedChildren" in i && i._renderedChildren.forEach((r) => {
|
|
397
|
-
|
|
398
|
+
B(r);
|
|
398
399
|
});
|
|
399
400
|
}
|
|
400
|
-
function
|
|
401
|
+
function B(t) {
|
|
401
402
|
if (!t) return;
|
|
402
|
-
const e = t, i = new
|
|
403
|
+
const e = t, i = new O();
|
|
403
404
|
if (i.cancel(), "_onBeforeExitCallbacks" in e && e._onBeforeExitCallbacks.length > 0 && e._onBeforeExitCallbacks.forEach((n) => {
|
|
404
405
|
try {
|
|
405
406
|
const r = n(i);
|
|
@@ -418,16 +419,16 @@ function $(t) {
|
|
|
418
419
|
n._dispose && (n._dispose(), n._dispose = null);
|
|
419
420
|
}
|
|
420
421
|
"_renderedChildren" in e && e._renderedChildren.forEach((n) => {
|
|
421
|
-
|
|
422
|
+
B(n);
|
|
422
423
|
});
|
|
423
424
|
}
|
|
424
|
-
let
|
|
425
|
+
let ie = 0;
|
|
425
426
|
const h = /* @__PURE__ */ new WeakMap();
|
|
426
|
-
async function
|
|
427
|
+
async function P(t, e, i) {
|
|
427
428
|
const n = t._placeholder;
|
|
428
429
|
if (!n?.parentNode) return;
|
|
429
430
|
const r = t._currentChild, s = t._currentDom;
|
|
430
|
-
if (
|
|
431
|
+
if (ne(r, e)) {
|
|
431
432
|
const f = h.get(t);
|
|
432
433
|
f && (f.token.cancel(), h.delete(t)), r && "_lifecycleState" in r && (r._lifecycleState = "mounted");
|
|
433
434
|
return;
|
|
@@ -436,12 +437,12 @@ async function O(t, e, i) {
|
|
|
436
437
|
s.nodeValue !== i.nodeValue && (s.nodeValue = i.nodeValue), t._currentDom = s, t._currentChild = e, e && "_lifecycleState" in e && (e._lifecycleState = "mounted"), h.delete(t);
|
|
437
438
|
return;
|
|
438
439
|
}
|
|
439
|
-
const o = ++
|
|
440
|
+
const o = ++ie, a = h.get(t);
|
|
440
441
|
a && a.token.cancel();
|
|
441
|
-
const l = new
|
|
442
|
+
const l = new O();
|
|
442
443
|
if (h.set(t, { id: o, token: l }), r && "_lifecycleState" in r && (r._lifecycleState = "exiting"), r)
|
|
443
444
|
try {
|
|
444
|
-
await
|
|
445
|
+
await $(r, l);
|
|
445
446
|
} catch (f) {
|
|
446
447
|
console.error(`ReactiveVNode ${t._id}: Unmount threw:`, f);
|
|
447
448
|
}
|
|
@@ -454,7 +455,7 @@ async function O(t, e, i) {
|
|
|
454
455
|
r && "_lifecycleState" in r && (r._lifecycleState = "exited"), s && s.remove(), i && n.parentNode.insertBefore(i, n.nextSibling), e && "_lifecycleState" in e && (e._lifecycleState = "mounted"), t._currentChild = e, t._currentDom = i, h.delete(t);
|
|
455
456
|
}
|
|
456
457
|
}
|
|
457
|
-
function
|
|
458
|
+
function ne(t, e) {
|
|
458
459
|
if (!t || !e || typeof t != "object" || typeof e != "object" || !("type" in t) || !("type" in e)) return !1;
|
|
459
460
|
if (typeof t.type == "function" && typeof e.type == "function") {
|
|
460
461
|
if (t.type !== e.type) return !1;
|
|
@@ -465,21 +466,21 @@ function ee(t, e) {
|
|
|
465
466
|
const i = "props" in t ? t.props?.key : void 0, n = "props" in e ? e.props?.key : void 0;
|
|
466
467
|
return i !== n ? !1 : "_lifecycleState" in t && t._lifecycleState === "exiting";
|
|
467
468
|
}
|
|
468
|
-
function
|
|
469
|
+
function re(t, e) {
|
|
469
470
|
const i = t._listState;
|
|
470
|
-
i ?
|
|
471
|
+
i ? oe(t, e, i) : se(t, e);
|
|
471
472
|
}
|
|
472
|
-
function
|
|
473
|
+
function se(t, e) {
|
|
473
474
|
const i = t._placeholder;
|
|
474
475
|
if (!i?.parentNode) return;
|
|
475
476
|
const n = [];
|
|
476
477
|
for (let r = 0; r < e.length; r++) {
|
|
477
|
-
const s = e[r], o =
|
|
478
|
+
const s = e[r], o = D(s, r), { vnode: a, dom: l } = k(s, t);
|
|
478
479
|
l && i.parentNode.appendChild(l), n.push({ key: o, vnode: a, dom: l });
|
|
479
480
|
}
|
|
480
481
|
t._listState = { items: n };
|
|
481
482
|
}
|
|
482
|
-
function
|
|
483
|
+
function oe(t, e, i) {
|
|
483
484
|
const n = t._placeholder;
|
|
484
485
|
if (!n?.parentNode) return;
|
|
485
486
|
const r = /* @__PURE__ */ new Map();
|
|
@@ -487,49 +488,49 @@ function ne(t, e, i) {
|
|
|
487
488
|
r.set(a.key, a);
|
|
488
489
|
const s = /* @__PURE__ */ new Set(), o = [];
|
|
489
490
|
for (let a = 0; a < e.length; a++) {
|
|
490
|
-
const l = e[a], d =
|
|
491
|
+
const l = e[a], d = D(l, a);
|
|
491
492
|
s.add(d);
|
|
492
493
|
const f = r.get(d);
|
|
493
|
-
f ? (o.push(f), r.delete(d)) :
|
|
494
|
+
f ? (o.push(f), r.delete(d)) : ae(t, l, o);
|
|
494
495
|
}
|
|
495
|
-
r.size > 0 &&
|
|
496
|
+
r.size > 0 && le(r), ce(n, o), t._listState = { items: o };
|
|
496
497
|
}
|
|
497
|
-
function
|
|
498
|
-
const n =
|
|
498
|
+
function ae(t, e, i) {
|
|
499
|
+
const n = D(e, i.length), { vnode: r, dom: s } = k(e, t);
|
|
499
500
|
i.push({ key: n, vnode: r, dom: s });
|
|
500
501
|
}
|
|
501
|
-
function
|
|
502
|
+
function le(t) {
|
|
502
503
|
for (const [e, i] of t)
|
|
503
|
-
i.vnode &&
|
|
504
|
+
i.vnode && $(i.vnode), i.dom?.parentNode && i.dom.parentNode.removeChild(i.dom);
|
|
504
505
|
}
|
|
505
|
-
function
|
|
506
|
+
function ce(t, e) {
|
|
506
507
|
const i = t.parentNode;
|
|
507
508
|
if (!i) return;
|
|
508
509
|
let n = t;
|
|
509
510
|
for (const r of e)
|
|
510
511
|
r.dom && (n.nextSibling !== r.dom && i.insertBefore(r.dom, n.nextSibling), n = r.dom);
|
|
511
512
|
}
|
|
512
|
-
function
|
|
513
|
+
function D(t, e) {
|
|
513
514
|
return t && typeof t == "object" && "key" in t ? t.key ?? e : e;
|
|
514
515
|
}
|
|
515
|
-
function
|
|
516
|
+
function W(t, e, i = null, n = !1) {
|
|
516
517
|
if (!e) return;
|
|
517
518
|
(Array.isArray(e) ? e : [e]).forEach((s) => {
|
|
518
519
|
if (s) {
|
|
519
|
-
if (Array.isArray(s) &&
|
|
520
|
-
|
|
520
|
+
if (Array.isArray(s) && W(t, s, i, n), typeof s == "string" || typeof s == "number")
|
|
521
|
+
te(t, s);
|
|
521
522
|
else if (typeof s == "function") {
|
|
522
|
-
const o =
|
|
523
|
+
const o = U(s);
|
|
523
524
|
o._parent = i, i && i._renderedChildren.push(o);
|
|
524
525
|
const a = document.createComment("reactive");
|
|
525
526
|
t.appendChild(a), o._placeholder = a;
|
|
526
527
|
const l = v(() => {
|
|
527
528
|
const d = s();
|
|
528
529
|
if (Array.isArray(d))
|
|
529
|
-
|
|
530
|
+
re(o, d);
|
|
530
531
|
else {
|
|
531
532
|
const { vnode: f, dom: N } = k(d, o);
|
|
532
|
-
|
|
533
|
+
P(o, f, N);
|
|
533
534
|
}
|
|
534
535
|
});
|
|
535
536
|
o._dispose = l;
|
|
@@ -544,18 +545,18 @@ function B(t, e, i = null, n = !1) {
|
|
|
544
545
|
}
|
|
545
546
|
});
|
|
546
547
|
}
|
|
547
|
-
const
|
|
548
|
-
function
|
|
548
|
+
const ue = "http://www.w3.org/2000/svg";
|
|
549
|
+
function z(t, e = !1) {
|
|
549
550
|
if (t._dom)
|
|
550
551
|
return t._dom;
|
|
551
|
-
const i = e || t.type === "svg", n = i ? document.createElementNS(
|
|
552
|
-
return t._onUnmountCallbacks.push(r), t.props.innerHTML !== void 0 ? n.innerHTML = typeof t.props.innerHTML == "object" ? JSON.stringify(t.props.innerHTML) : t.props.innerHTML : t.props.children &&
|
|
552
|
+
const i = e || t.type === "svg", n = i ? document.createElementNS(ue, t.type) : document.createElement(t.type), r = ee(n, t.props, i);
|
|
553
|
+
return t._onUnmountCallbacks.push(r), t.props.innerHTML !== void 0 ? n.innerHTML = typeof t.props.innerHTML == "object" ? JSON.stringify(t.props.innerHTML) : t.props.innerHTML : t.props.children && W(n, t.props.children, t, i), t._dom = n, t._lifecycleState = "mounted", t._onMountCallbacks.length > 0 && t._onMountCallbacks.forEach((s) => s()), n;
|
|
553
554
|
}
|
|
554
555
|
function _(t, e = !1) {
|
|
555
556
|
if ("type" in t && t.type === "reactive")
|
|
556
557
|
return t._placeholder;
|
|
557
558
|
if (typeof t.type == "string")
|
|
558
|
-
return
|
|
559
|
+
return z(t, e);
|
|
559
560
|
const i = t;
|
|
560
561
|
w(i);
|
|
561
562
|
const n = i.type(i.props);
|
|
@@ -575,25 +576,25 @@ function _(t, e = !1) {
|
|
|
575
576
|
s();
|
|
576
577
|
}), r && (i._lifecycleState = "mounted"), r;
|
|
577
578
|
}
|
|
578
|
-
function
|
|
579
|
+
function Fe(t, e) {
|
|
579
580
|
const i = t instanceof Node ? t : _(t);
|
|
580
581
|
i && e.append(i);
|
|
581
582
|
}
|
|
582
|
-
function
|
|
583
|
+
function fe(t) {
|
|
583
584
|
return document.createTreeWalker(
|
|
584
585
|
t,
|
|
585
586
|
NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT,
|
|
586
587
|
null
|
|
587
588
|
);
|
|
588
589
|
}
|
|
589
|
-
function
|
|
590
|
-
const i =
|
|
590
|
+
function de(t, e = "self") {
|
|
591
|
+
const i = fe(t);
|
|
591
592
|
return e === "children" && i.firstChild(), {
|
|
592
593
|
walker: i,
|
|
593
594
|
isSVG: !1
|
|
594
595
|
};
|
|
595
596
|
}
|
|
596
|
-
function
|
|
597
|
+
function he(t, e, i, n) {
|
|
597
598
|
if (e === "class" || e === "className") {
|
|
598
599
|
const r = typeof i == "string" ? i : Array.isArray(i) ? i.filter(Boolean).join(" ") : typeof i == "object" ? Object.entries(i).filter(([s, o]) => o).map(([s]) => s).join(" ") : "";
|
|
599
600
|
n ? t.setAttribute("class", r) : t.className = r;
|
|
@@ -613,7 +614,7 @@ function ue(t, e, i, n) {
|
|
|
613
614
|
}
|
|
614
615
|
t.setAttribute(e, String(i));
|
|
615
616
|
}
|
|
616
|
-
function
|
|
617
|
+
function pe(t, e, i = !1, n) {
|
|
617
618
|
const r = [];
|
|
618
619
|
for (const [s, o] of Object.entries(e))
|
|
619
620
|
if (o != null && !(s === "children" || s === "key" || s === "autoanimate")) {
|
|
@@ -630,7 +631,7 @@ function fe(t, e, i = !1, n) {
|
|
|
630
631
|
n && console.log(`→ Reactive prop: ${s}`);
|
|
631
632
|
const a = v(() => {
|
|
632
633
|
const l = o();
|
|
633
|
-
|
|
634
|
+
he(t, s, l, i);
|
|
634
635
|
});
|
|
635
636
|
r.push(a);
|
|
636
637
|
continue;
|
|
@@ -638,7 +639,7 @@ function fe(t, e, i = !1, n) {
|
|
|
638
639
|
}
|
|
639
640
|
return () => r.forEach((s) => s());
|
|
640
641
|
}
|
|
641
|
-
function
|
|
642
|
+
function ye(t, e, i = null, n) {
|
|
642
643
|
if (!e) return;
|
|
643
644
|
const r = Array.isArray(e) ? e : [e];
|
|
644
645
|
if (!n.walker.firstChild() && r.length > 0) {
|
|
@@ -646,10 +647,10 @@ function de(t, e, i = null, n) {
|
|
|
646
647
|
return;
|
|
647
648
|
}
|
|
648
649
|
for (const o of r)
|
|
649
|
-
!o && o !== 0 ||
|
|
650
|
+
!o && o !== 0 || me(o, t, i, n);
|
|
650
651
|
n.walker.parentNode();
|
|
651
652
|
}
|
|
652
|
-
function
|
|
653
|
+
function me(t, e, i, n) {
|
|
653
654
|
if (!(!t && t !== 0)) {
|
|
654
655
|
if (typeof t == "string" || typeof t == "number" || typeof t == "boolean") {
|
|
655
656
|
const r = n.walker.currentNode;
|
|
@@ -660,7 +661,7 @@ function he(t, e, i, n) {
|
|
|
660
661
|
}
|
|
661
662
|
if (typeof t == "function") {
|
|
662
663
|
n.debug && console.log("→ Hydrating reactive child");
|
|
663
|
-
const r =
|
|
664
|
+
const r = U(t);
|
|
664
665
|
r._parent = i, i && i._renderedChildren.push(r);
|
|
665
666
|
const s = n.walker.currentNode, o = t();
|
|
666
667
|
if (o && typeof o == "object" && "type" in o) {
|
|
@@ -679,8 +680,8 @@ function he(t, e, i, n) {
|
|
|
679
680
|
l = !1;
|
|
680
681
|
return;
|
|
681
682
|
}
|
|
682
|
-
const { vnode: N, dom:
|
|
683
|
-
|
|
683
|
+
const { vnode: N, dom: R } = k(f, r);
|
|
684
|
+
P(r, N, R);
|
|
684
685
|
});
|
|
685
686
|
r._dispose = d;
|
|
686
687
|
return;
|
|
@@ -695,42 +696,42 @@ function he(t, e, i, n) {
|
|
|
695
696
|
}
|
|
696
697
|
}
|
|
697
698
|
}
|
|
698
|
-
function
|
|
699
|
+
function be(t, e) {
|
|
699
700
|
const i = e.walker.currentNode;
|
|
700
701
|
if (i.nodeType !== Node.ELEMENT_NODE)
|
|
701
702
|
return console.warn(
|
|
702
703
|
`Hydration mismatch: expected element <${t.type}> but found ${i.nodeName}`
|
|
703
|
-
),
|
|
704
|
+
), L(t, i, e);
|
|
704
705
|
const n = i, r = n.tagName.toLowerCase();
|
|
705
706
|
if (r !== t.type.toLowerCase())
|
|
706
707
|
return console.warn(
|
|
707
708
|
`Hydration mismatch: expected <${t.type}> but found <${r}>`
|
|
708
|
-
),
|
|
709
|
+
), L(t, i, e);
|
|
709
710
|
const s = e.isSVG || t.type === "svg", o = e.isSVG;
|
|
710
711
|
e.isSVG = s, t._dom = n, e.debug && console.log(`→ Attached existing <${t.type}> DOM`);
|
|
711
|
-
const a =
|
|
712
|
-
return t._onUnmountCallbacks.push(a), t.props.children &&
|
|
712
|
+
const a = pe(n, t.props, s, e.debug);
|
|
713
|
+
return t._onUnmountCallbacks.push(a), t.props.children && ye(n, t.props.children, t, e), t._lifecycleState = "mounted", t._onMountCallbacks.length > 0 && t._onMountCallbacks.forEach((l) => l()), e.isSVG = o, e.walker.nextSibling(), n;
|
|
713
714
|
}
|
|
714
|
-
function
|
|
715
|
+
function L(t, e, i) {
|
|
715
716
|
i.debug && console.log(`→ Fallback: rendering <${t.type}> fresh`);
|
|
716
717
|
const n = e.parentNode, r = e.nextSibling;
|
|
717
718
|
n?.removeChild(e);
|
|
718
|
-
const s =
|
|
719
|
+
const s = z(t, i.isSVG);
|
|
719
720
|
return n && (r ? n.insertBefore(s, r) : n.appendChild(s)), i.walker.nextSibling(), s;
|
|
720
721
|
}
|
|
721
722
|
function b(t, e) {
|
|
722
723
|
if ("type" in t && t.type === "reactive")
|
|
723
|
-
return e.debug && console.log(`Hydrating ReactiveVNode #${t._id}`),
|
|
724
|
+
return e.debug && console.log(`Hydrating ReactiveVNode #${t._id}`), ve(t, e);
|
|
724
725
|
if ("type" in t && t.type === "suspended")
|
|
725
726
|
return e.debug && console.log(
|
|
726
727
|
`Hydrating SuspendedVNode: ${t._componentName}`
|
|
727
|
-
),
|
|
728
|
+
), _e(t, e);
|
|
728
729
|
if (typeof t.type == "string")
|
|
729
|
-
return e.debug && console.log(`Hydrating <${t.type}>`),
|
|
730
|
+
return e.debug && console.log(`Hydrating <${t.type}>`), be(t, e);
|
|
730
731
|
const i = t.type.name || "Anonymous";
|
|
731
|
-
return e.debug && console.log(`Hydrating Component: ${i}`),
|
|
732
|
+
return e.debug && console.log(`Hydrating Component: ${i}`), ge(t, e);
|
|
732
733
|
}
|
|
733
|
-
function
|
|
734
|
+
function ge(t, e) {
|
|
734
735
|
w(t);
|
|
735
736
|
const i = t.type(t.props);
|
|
736
737
|
if (w(null), !i) return null;
|
|
@@ -752,7 +753,7 @@ function ye(t, e) {
|
|
|
752
753
|
`→ Firing ${t._onMountCallbacks.length} onMount callback(s)`
|
|
753
754
|
), t._onMountCallbacks.forEach((r) => r())), n && (t._lifecycleState = "mounted"), n;
|
|
754
755
|
}
|
|
755
|
-
function
|
|
756
|
+
function ve(t, e) {
|
|
756
757
|
const i = t.fn(), n = e.walker.currentNode, r = document.createComment("reactive");
|
|
757
758
|
if (n.parentNode?.insertBefore(r, n), t._placeholder = r, i && typeof i == "object" && "type" in i) {
|
|
758
759
|
const a = i;
|
|
@@ -766,11 +767,11 @@ function me(t, e) {
|
|
|
766
767
|
return;
|
|
767
768
|
}
|
|
768
769
|
const { vnode: l, dom: d } = k(a, t);
|
|
769
|
-
|
|
770
|
+
P(t, l, d);
|
|
770
771
|
});
|
|
771
772
|
return t._dispose = o, t._currentDom;
|
|
772
773
|
}
|
|
773
|
-
function
|
|
774
|
+
function _e(t, e) {
|
|
774
775
|
const i = e.walker.currentNode;
|
|
775
776
|
if (i.nodeType === Node.ELEMENT_NODE && i.hasAttribute("data-suspended")) {
|
|
776
777
|
const r = i;
|
|
@@ -806,18 +807,18 @@ function C(t, e) {
|
|
|
806
807
|
e
|
|
807
808
|
) : typeof t == "function" ? C(t(), e) : null;
|
|
808
809
|
}
|
|
809
|
-
function
|
|
810
|
-
const n =
|
|
810
|
+
function Le(t, e, i = "self") {
|
|
811
|
+
const n = de(e, i);
|
|
811
812
|
b(t, n);
|
|
812
813
|
}
|
|
813
|
-
function
|
|
814
|
+
function He(t, e = "Loading...", i = "Error") {
|
|
814
815
|
return (n) => ({
|
|
815
816
|
type: "suspended",
|
|
816
817
|
kind: "SuspendedVNode",
|
|
817
818
|
promise: t(n),
|
|
818
819
|
fallback: e,
|
|
819
820
|
errorFallback: i,
|
|
820
|
-
_id:
|
|
821
|
+
_id: H(),
|
|
821
822
|
_componentName: t.name || "AsyncComponent",
|
|
822
823
|
_parent: null,
|
|
823
824
|
_renderedChildren: [],
|
|
@@ -825,23 +826,27 @@ function Pe(t, e = "Loading...", i = "Error") {
|
|
|
825
826
|
_state: "pending"
|
|
826
827
|
});
|
|
827
828
|
}
|
|
828
|
-
function
|
|
829
|
+
function Ie(t) {
|
|
829
830
|
const e = Symbol("context");
|
|
830
831
|
return {
|
|
831
832
|
_id: e,
|
|
832
833
|
_defaultValue: t,
|
|
833
834
|
provide(i) {
|
|
834
|
-
if (typeof document > "u")
|
|
835
|
-
|
|
835
|
+
if (typeof document > "u") {
|
|
836
|
+
q(e, i);
|
|
837
|
+
return;
|
|
838
|
+
}
|
|
839
|
+
const n = I();
|
|
836
840
|
if (!n)
|
|
837
841
|
throw new Error("context.provide() called outside of component render");
|
|
838
842
|
n._contextMap || (n._contextMap = /* @__PURE__ */ new Map()), n._contextMap.set(e, i);
|
|
839
843
|
}
|
|
840
844
|
};
|
|
841
845
|
}
|
|
842
|
-
function
|
|
843
|
-
if (typeof document > "u")
|
|
844
|
-
|
|
846
|
+
function Ke(t) {
|
|
847
|
+
if (typeof document > "u")
|
|
848
|
+
return Z(t._id, t._defaultValue);
|
|
849
|
+
const e = I();
|
|
845
850
|
if (!e)
|
|
846
851
|
throw new Error("useContext called outside of component render");
|
|
847
852
|
let i = e;
|
|
@@ -852,14 +857,14 @@ function Fe(t) {
|
|
|
852
857
|
}
|
|
853
858
|
return t._defaultValue;
|
|
854
859
|
}
|
|
855
|
-
function
|
|
860
|
+
function Ge(t) {
|
|
856
861
|
if (!(typeof document > "u")) {
|
|
857
862
|
if (m === null)
|
|
858
863
|
throw new Error("onMount must be called inside a component during render");
|
|
859
864
|
m._onMountCallbacks.push(t);
|
|
860
865
|
}
|
|
861
866
|
}
|
|
862
|
-
function
|
|
867
|
+
function je(t) {
|
|
863
868
|
if (!(typeof document > "u")) {
|
|
864
869
|
if (m === null)
|
|
865
870
|
throw new Error(
|
|
@@ -868,7 +873,7 @@ function He(t) {
|
|
|
868
873
|
m._onUnmountCallbacks.push(t);
|
|
869
874
|
}
|
|
870
875
|
}
|
|
871
|
-
function
|
|
876
|
+
function Xe(t) {
|
|
872
877
|
if (!(typeof document > "u")) {
|
|
873
878
|
if (m === null)
|
|
874
879
|
throw new Error(
|
|
@@ -877,7 +882,7 @@ function Ie(t) {
|
|
|
877
882
|
m._onBeforeExitCallbacks.push(t);
|
|
878
883
|
}
|
|
879
884
|
}
|
|
880
|
-
function
|
|
885
|
+
function Ye(t) {
|
|
881
886
|
if (!(typeof document > "u"))
|
|
882
887
|
try {
|
|
883
888
|
t();
|
|
@@ -885,7 +890,7 @@ function Ke(t) {
|
|
|
885
890
|
console.error(e);
|
|
886
891
|
}
|
|
887
892
|
}
|
|
888
|
-
class
|
|
893
|
+
class Ve {
|
|
889
894
|
// One-time callbacks
|
|
890
895
|
readCallbacks = /* @__PURE__ */ new Set();
|
|
891
896
|
updateCallbacks = /* @__PURE__ */ new Set();
|
|
@@ -1066,7 +1071,7 @@ class Ge {
|
|
|
1066
1071
|
return e === this.readKeepAlive || e === this.updateKeepAlive || e === this.renderKeepAlive;
|
|
1067
1072
|
}
|
|
1068
1073
|
}
|
|
1069
|
-
class
|
|
1074
|
+
class Se {
|
|
1070
1075
|
gestureId = 0;
|
|
1071
1076
|
activeGestures = /* @__PURE__ */ new Map();
|
|
1072
1077
|
disabledGestures = /* @__PURE__ */ new Map();
|
|
@@ -1135,11 +1140,10 @@ class ge {
|
|
|
1135
1140
|
*/
|
|
1136
1141
|
createGesture(e, i) {
|
|
1137
1142
|
const n = this.newId(), r = i.name || "gesture-" + n, s = i.priority ?? 0;
|
|
1138
|
-
return new
|
|
1143
|
+
return new ke(this, n, e, r, s, i);
|
|
1139
1144
|
}
|
|
1140
1145
|
}
|
|
1141
|
-
|
|
1142
|
-
class _e {
|
|
1146
|
+
class ke {
|
|
1143
1147
|
// Private members
|
|
1144
1148
|
el;
|
|
1145
1149
|
options;
|
|
@@ -1275,14 +1279,18 @@ class _e {
|
|
|
1275
1279
|
this.el && (this.el.removeEventListener("touchstart", this.boundOnStart), document.removeEventListener("touchmove", this.boundOnMove), document.removeEventListener("touchend", this.boundOnEnd), document.removeEventListener("touchcancel", this.boundOnEnd), this.el.removeEventListener("mousedown", this.boundOnStart), document.removeEventListener("mousemove", this.boundOnMove), document.removeEventListener("mouseup", this.boundOnEnd), document.removeEventListener("mouseleave", this.boundOnEnd), this.controller.release(this.id));
|
|
1276
1280
|
}
|
|
1277
1281
|
}
|
|
1278
|
-
|
|
1279
|
-
|
|
1282
|
+
let A;
|
|
1283
|
+
function Ce() {
|
|
1284
|
+
return A || (A = new Se()), A;
|
|
1280
1285
|
}
|
|
1281
|
-
function
|
|
1286
|
+
function Ue(t, e) {
|
|
1287
|
+
return Ce().createGesture(t, e);
|
|
1288
|
+
}
|
|
1289
|
+
function $e(t) {
|
|
1282
1290
|
typeof document > "u" || (document.startViewTransition ? document.startViewTransition(t) : t());
|
|
1283
1291
|
}
|
|
1284
|
-
let
|
|
1285
|
-
function
|
|
1292
|
+
let we = 0;
|
|
1293
|
+
function Be(t, e = [], i = {
|
|
1286
1294
|
duration: 500,
|
|
1287
1295
|
namePrefix: "vt"
|
|
1288
1296
|
}) {
|
|
@@ -1291,7 +1299,7 @@ function Ye(t, e = [], i = {
|
|
|
1291
1299
|
return;
|
|
1292
1300
|
}
|
|
1293
1301
|
const n = e.map(
|
|
1294
|
-
(s, o) => `${i.namePrefix}-${++
|
|
1302
|
+
(s, o) => `${i.namePrefix}-${++we}-${o}`
|
|
1295
1303
|
);
|
|
1296
1304
|
e.forEach((s, o) => {
|
|
1297
1305
|
s.style.viewTransitionName = n[o];
|
|
@@ -1309,27 +1317,27 @@ function Ye(t, e = [], i = {
|
|
|
1309
1317
|
export {
|
|
1310
1318
|
y as Computed,
|
|
1311
1319
|
g as Effect,
|
|
1312
|
-
|
|
1313
|
-
|
|
1320
|
+
Re as Fragment,
|
|
1321
|
+
Ve as FrameScheduler,
|
|
1314
1322
|
u as Signal,
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1323
|
+
Ne as batch,
|
|
1324
|
+
Me as computed,
|
|
1325
|
+
Ie as createContext,
|
|
1326
|
+
Ue as createGesture,
|
|
1319
1327
|
v as effect,
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1328
|
+
Oe as get,
|
|
1329
|
+
Le as hydrate,
|
|
1330
|
+
De as link,
|
|
1331
|
+
Xe as onBeforeExit,
|
|
1332
|
+
Ge as onMount,
|
|
1333
|
+
Ye as onPageLoad,
|
|
1334
|
+
je as onUnmount,
|
|
1335
|
+
xe as peek,
|
|
1336
|
+
Fe as render,
|
|
1337
|
+
Pe as set,
|
|
1338
|
+
Ae as signal,
|
|
1339
|
+
$e as startViewTransition,
|
|
1340
|
+
He as suspend,
|
|
1341
|
+
Ke as useContext,
|
|
1342
|
+
Be as withViewTransition
|
|
1335
1343
|
};
|