@credenza3/passport-evm 0.2.19 → 0.2.20
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/{App-C9I9989L.js → App-CVL5rG_7.js} +405 -402
- package/dist/App-CVL5rG_7.js.map +1 -0
- package/dist/Button-DqEdQlgP.js +64 -0
- package/dist/{Button-D5CGIu8s.js.map → Button-DqEdQlgP.js.map} +1 -1
- package/dist/{ButtonBack-DiIG6luz.js → ButtonBack-vxTGGwU6.js} +4 -4
- package/dist/{ButtonBack-DiIG6luz.js.map → ButtonBack-vxTGGwU6.js.map} +1 -1
- package/dist/{ButtonLink-CujytEgB.js → ButtonLink-Dbc5ZFe5.js} +16 -17
- package/dist/{ButtonLink-CujytEgB.js.map → ButtonLink-Dbc5ZFe5.js.map} +1 -1
- package/dist/ConfirmAccount-CzJ-4HcH.js +210 -0
- package/dist/{ConfirmAccount-L4VSLm33.js.map → ConfirmAccount-CzJ-4HcH.js.map} +1 -1
- package/dist/{ContentHeader-DtB3AfgZ.js → ContentHeader-BL6VCaOC.js} +5 -5
- package/dist/{ContentHeader-DtB3AfgZ.js.map → ContentHeader-BL6VCaOC.js.map} +1 -1
- package/dist/{Error-4PRrZwmC.js → Error-cuDoKeUy.js} +113 -113
- package/dist/{Error-4PRrZwmC.js.map → Error-cuDoKeUy.js.map} +1 -1
- package/dist/{Input-B40ySJRz.js → Input-CwK6i9kK.js} +6 -10
- package/dist/{Input-B40ySJRz.js.map → Input-CwK6i9kK.js.map} +1 -1
- package/dist/{Label-CVUbL1bW.js → Label-DZWmB1jC.js} +5 -10
- package/dist/{Label-CVUbL1bW.js.map → Label-DZWmB1jC.js.map} +1 -1
- package/dist/{Loader-DWGzCX4y.js → Loader-CR_PsWeQ.js} +3 -3
- package/dist/{Loader-DWGzCX4y.js.map → Loader-CR_PsWeQ.js.map} +1 -1
- package/dist/Login-BLxKy2wr.js +281 -0
- package/dist/{Login-CAgCGqA-.js.map → Login-BLxKy2wr.js.map} +1 -1
- package/dist/Logout-DMSGdeJk.js +96 -0
- package/dist/{Logout-Cn-fwBb4.js.map → Logout-DMSGdeJk.js.map} +1 -1
- package/dist/Nav-WMkbBHYm.js +666 -0
- package/dist/{Nav-CuA2pLgM.js.map → Nav-WMkbBHYm.js.map} +1 -1
- package/dist/{PassportId-CSTvlPYW.js → PassportId-Drg1oJ8k.js} +91 -93
- package/dist/{PassportId-CSTvlPYW.js.map → PassportId-Drg1oJ8k.js.map} +1 -1
- package/dist/Payment-BGGkR1cJ.js +1030 -0
- package/dist/{Payment-DVlaKx-E.js.map → Payment-BGGkR1cJ.js.map} +1 -1
- package/dist/PaymentResult-Vxz68gmZ.js +256 -0
- package/dist/{PaymentResult-C5iwUhAQ.js.map → PaymentResult-Vxz68gmZ.js.map} +1 -1
- package/dist/{Profile-GkmykWQr.js → Profile-D5OVDyh3.js} +157 -165
- package/dist/{Profile-GkmykWQr.js.map → Profile-D5OVDyh3.js.map} +1 -1
- package/dist/ProgressVideo-htlN2ByZ.js +125 -0
- package/dist/{ProgressVideo-4SQjAnPJ.js.map → ProgressVideo-htlN2ByZ.js.map} +1 -1
- package/dist/RichAlert-DezBlHxy.js +111 -0
- package/dist/{RichAlert-DoQILIMV.js.map → RichAlert-DezBlHxy.js.map} +1 -1
- package/dist/Scanner-Cl31otyX.js +123 -0
- package/dist/{Scanner-BCw9U9L_.js.map → Scanner-Cl31otyX.js.map} +1 -1
- package/dist/SendTokens-BGGPj_e_.js +364 -0
- package/dist/{SendTokens-D3cXqMmt.js.map → SendTokens-BGGPj_e_.js.map} +1 -1
- package/dist/Sign-n6MGx-1d.js +109 -0
- package/dist/{Sign-IQLTbDiV.js.map → Sign-n6MGx-1d.js.map} +1 -1
- package/dist/Stripe.service-K8Nm72sZ.js +59 -0
- package/dist/{Stripe.service-GlcYQnp5.js.map → Stripe.service-K8Nm72sZ.js.map} +1 -1
- package/dist/UpdateProfile-BbMPWUyU.js +525 -0
- package/dist/{UpdateProfile-D4bg5GEF.js.map → UpdateProfile-BbMPWUyU.js.map} +1 -1
- package/dist/UserInfo-htUCiyHe.js +128 -0
- package/dist/{UserInfo-DwjE6Ph4.js.map → UserInfo-htUCiyHe.js.map} +1 -1
- package/dist/Wallet-BHxkNNa4.js +263 -0
- package/dist/{Wallet-BUV87MlV.js.map → Wallet-BHxkNNa4.js.map} +1 -1
- package/dist/abi-DIVtyi6o.js.map +1 -1
- package/dist/account-BPB9Ucub.js.map +1 -1
- package/dist/each-CxApMty7.js +266 -0
- package/dist/each-CxApMty7.js.map +1 -0
- package/dist/event-modifiers-D4czZCB6.js +13 -0
- package/dist/{event-modifiers-DpFXHa6q.js.map → event-modifiers-D4czZCB6.js.map} +1 -1
- package/dist/{html-a8zjkl0d.js → html-BynZ0QgP.js} +16 -16
- package/dist/html-BynZ0QgP.js.map +1 -0
- package/dist/{index-B0D9qQ_O.js → index-QYUycBJ8.js} +11779 -11229
- package/dist/index-QYUycBJ8.js.map +1 -0
- package/dist/index-client-BZifBt-8.js +25 -0
- package/dist/index-client-BZifBt-8.js.map +1 -0
- package/dist/input-2LrEHvzA.js +37 -0
- package/dist/input-2LrEHvzA.js.map +1 -0
- package/dist/legacy-ShShb87f.js +1025 -0
- package/dist/legacy-ShShb87f.js.map +1 -0
- package/dist/passport.es.js +1 -1
- package/dist/passport.umd.js +139 -138
- package/dist/passport.umd.js.map +1 -1
- package/dist/scanner-Bm3Pvpfs.js.map +1 -1
- package/dist/{scanner.es-cf-mCExK.js → scanner.es-DK9KxX60.js} +2 -2
- package/dist/{scanner.es-cf-mCExK.js.map → scanner.es-DK9KxX60.js.map} +1 -1
- package/dist/strings-B-rKL311.js.map +1 -1
- package/dist/svg-BwNV4pWZ.js.map +1 -1
- package/dist/validation-DaZvZUPL.js.map +1 -1
- package/package.json +20 -20
- package/dist/App-C9I9989L.js.map +0 -1
- package/dist/Button-D5CGIu8s.js +0 -69
- package/dist/ConfirmAccount-L4VSLm33.js +0 -210
- package/dist/Login-CAgCGqA-.js +0 -294
- package/dist/Logout-Cn-fwBb4.js +0 -96
- package/dist/Nav-CuA2pLgM.js +0 -688
- package/dist/Payment-DVlaKx-E.js +0 -1039
- package/dist/PaymentResult-C5iwUhAQ.js +0 -290
- package/dist/ProgressVideo-4SQjAnPJ.js +0 -121
- package/dist/RichAlert-DoQILIMV.js +0 -119
- package/dist/Scanner-BCw9U9L_.js +0 -126
- package/dist/SendTokens-D3cXqMmt.js +0 -363
- package/dist/Sign-IQLTbDiV.js +0 -107
- package/dist/Stripe.service-GlcYQnp5.js +0 -61
- package/dist/UpdateProfile-D4bg5GEF.js +0 -522
- package/dist/UserInfo-DwjE6Ph4.js +0 -151
- package/dist/Wallet-BUV87MlV.js +0 -260
- package/dist/each-tAR3XqEj.js +0 -202
- package/dist/each-tAR3XqEj.js.map +0 -1
- package/dist/event-modifiers-DpFXHa6q.js +0 -13
- package/dist/html-a8zjkl0d.js.map +0 -1
- package/dist/index-B0D9qQ_O.js.map +0 -1
- package/dist/index-client-z9rIkUyw.js +0 -28
- package/dist/index-client-z9rIkUyw.js.map +0 -1
- package/dist/input-b1D2_f8m.js +0 -30
- package/dist/input-b1D2_f8m.js.map +0 -1
- package/dist/legacy-C1UsO_tu.js +0 -1039
- package/dist/legacy-C1UsO_tu.js.map +0 -1
package/dist/Wallet-BUV87MlV.js
DELETED
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
import { c as A, p as B, h as W, f as I, k as re, r as H, e as J, b as P, i as L, d as $, u as G, v as ae, o as z, n as se } from "./legacy-C1UsO_tu.js";
|
|
2
|
-
import { v as K, m as E, B as k, E as T, C as y, D as R, I as U, K as n, G as ne, z as q, u as D, J as S, y as oe, w as Q, A as ce, x as X, L as ue, N as le, W as ie, a1 as de, R as Y, S as j, O as ve, b7 as fe } from "./index-B0D9qQ_O.js";
|
|
3
|
-
import { C as me } from "./ContentHeader-DtB3AfgZ.js";
|
|
4
|
-
import { B as F } from "./Button-D5CGIu8s.js";
|
|
5
|
-
import { e as pe, i as ge } from "./each-tAR3XqEj.js";
|
|
6
|
-
import { b as we } from "./input-b1D2_f8m.js";
|
|
7
|
-
var _e = I("<button> </button>"), he = I('<div class="crtw-text-xs crtw-text-gray-400 crtw-mt-1"> </div>'), Se = I('<input class="crtw-appearance-none focus:crtw-outline-0 crtw-w-full crtw-h-9 crtw-mt-4 crtw-px-5 crtw-text-base crtw-border crtw-border-gray-300 crtw-rounded focus:crtw-border-blue-800 hover:crtw-bg-gray-100" type="number" min="1" max="100"/> <!>', 1), xe = I('<div><div class="crtw-flex crtw-flex-col">Select amount <div class="crtw-inline-flex crtw-w-full" role="group"></div> <!></div></div>');
|
|
8
|
-
function Z(v, o) {
|
|
9
|
-
if (new.target) return A({ component: Z, ...v });
|
|
10
|
-
K(o, !1);
|
|
11
|
-
let s = B(o, "selected", 12, void 0), c = B(o, "minStoredValueToPurchase", 12, 0), u = B(o, "maxStoredValueToPurchase", 12, 100), f = E(!1), g = E(s());
|
|
12
|
-
const C = [
|
|
13
|
-
{ value: "10", name: "10" },
|
|
14
|
-
{ value: "25", name: "25" },
|
|
15
|
-
{ value: "50", name: "50" },
|
|
16
|
-
{ value: "CUSTOM", name: "Custom" }
|
|
17
|
-
], V = (e) => {
|
|
18
|
-
if (S(g, e), e === "CUSTOM") {
|
|
19
|
-
S(f, !0), s("");
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
S(f, !1), s(e);
|
|
23
|
-
}, w = (e) => {
|
|
24
|
-
const t = e.target;
|
|
25
|
-
if (t.value = t.value.replace(/[,.-]/g, ""), +t.value > u()) {
|
|
26
|
-
s(u().toString());
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
s(t.value);
|
|
30
|
-
};
|
|
31
|
-
W();
|
|
32
|
-
var i = xe(), m = k(i), d = T(k(m));
|
|
33
|
-
pe(d, 5, () => C, ge, (e, t) => {
|
|
34
|
-
var r = _e();
|
|
35
|
-
let a;
|
|
36
|
-
var _ = k(r, !0);
|
|
37
|
-
y(r), R(
|
|
38
|
-
(l) => {
|
|
39
|
-
a = re(r, 1, "crtw-w-full crtw-h-[30px] crtw-text-sm crtw-border hover:crtw-bg-gray-100 hover:crtw-text-blue-800 first:crtw-rounded-l last:crtw-rounded-r", null, a, l), H(_, (n(t), ne(() => n(t).name)));
|
|
40
|
-
},
|
|
41
|
-
[
|
|
42
|
-
() => ({
|
|
43
|
-
"crtw-border-blue-800": n(t).value === n(g),
|
|
44
|
-
"crtw-z-10": n(t).value === n(g)
|
|
45
|
-
})
|
|
46
|
-
],
|
|
47
|
-
U
|
|
48
|
-
), J("click", r, () => V(n(t).value)), P(e, r);
|
|
49
|
-
}), y(d);
|
|
50
|
-
var x = T(d, 2);
|
|
51
|
-
{
|
|
52
|
-
var b = (e) => {
|
|
53
|
-
var t = Se(), r = oe(t);
|
|
54
|
-
ae(r);
|
|
55
|
-
var a = T(r, 2);
|
|
56
|
-
{
|
|
57
|
-
var _ = (l) => {
|
|
58
|
-
var p = he(), O = k(p);
|
|
59
|
-
y(p), R(() => H(O, `Minimum purchase amount is ${c() ?? ""}`)), P(l, p);
|
|
60
|
-
};
|
|
61
|
-
L(a, (l) => {
|
|
62
|
-
c() && l(_);
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
we(r, s), J("input", r, w), P(e, t);
|
|
66
|
-
};
|
|
67
|
-
L(x, (e) => {
|
|
68
|
-
n(f) && e(b);
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
return y(m), y(i), P(v, i), q({
|
|
72
|
-
get selected() {
|
|
73
|
-
return s();
|
|
74
|
-
},
|
|
75
|
-
set selected(e) {
|
|
76
|
-
s(e), D();
|
|
77
|
-
},
|
|
78
|
-
get minStoredValueToPurchase() {
|
|
79
|
-
return c();
|
|
80
|
-
},
|
|
81
|
-
set minStoredValueToPurchase(e) {
|
|
82
|
-
c(e), D();
|
|
83
|
-
},
|
|
84
|
-
get maxStoredValueToPurchase() {
|
|
85
|
-
return u();
|
|
86
|
-
},
|
|
87
|
-
set maxStoredValueToPurchase(e) {
|
|
88
|
-
u(e), D();
|
|
89
|
-
},
|
|
90
|
-
$set: G,
|
|
91
|
-
$on: (e, t) => $(o, e, t)
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
var be = I('<div class="crtw-w-full crtw-px-2.5"><!> <!> <div class="crtw-h-4"></div> <!> <div class="crtw-m-3.5"></div> <!></div>');
|
|
95
|
-
function ee(v, o) {
|
|
96
|
-
if (new.target) return A({ component: ee, ...v });
|
|
97
|
-
K(o, !1);
|
|
98
|
-
const s = E();
|
|
99
|
-
let c = B(o, "selected", 12), u = B(o, "options", 12), {
|
|
100
|
-
title: f,
|
|
101
|
-
description: g,
|
|
102
|
-
onSendClick: C,
|
|
103
|
-
sendValueButtonText: V,
|
|
104
|
-
onPaymentClick: w,
|
|
105
|
-
minStoredValueToPurchase: i = 0,
|
|
106
|
-
maxStoredValueToPurchase: m = 100
|
|
107
|
-
} = u();
|
|
108
|
-
Q(() => ce(u()), () => {
|
|
109
|
-
S(s, u().isSendValueDisabled);
|
|
110
|
-
}), X(), W();
|
|
111
|
-
var d = be(), x = k(d);
|
|
112
|
-
me(x, {
|
|
113
|
-
get text() {
|
|
114
|
-
return f;
|
|
115
|
-
},
|
|
116
|
-
get description() {
|
|
117
|
-
return g;
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
var b = T(x, 2);
|
|
121
|
-
Z(b, {
|
|
122
|
-
get minStoredValueToPurchase() {
|
|
123
|
-
return i;
|
|
124
|
-
},
|
|
125
|
-
get maxStoredValueToPurchase() {
|
|
126
|
-
return m;
|
|
127
|
-
},
|
|
128
|
-
get selected() {
|
|
129
|
-
return c();
|
|
130
|
-
},
|
|
131
|
-
set selected(a) {
|
|
132
|
-
c(a);
|
|
133
|
-
},
|
|
134
|
-
$$legacy: !0
|
|
135
|
-
});
|
|
136
|
-
var e = T(b, 4);
|
|
137
|
-
const t = U(() => !c() || !!i && +c() < i);
|
|
138
|
-
F(e, {
|
|
139
|
-
text: "Confirm purchase",
|
|
140
|
-
get disabled() {
|
|
141
|
-
return n(t);
|
|
142
|
-
},
|
|
143
|
-
get onClick() {
|
|
144
|
-
return w;
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
var r = T(e, 4);
|
|
148
|
-
return F(r, {
|
|
149
|
-
get onClick() {
|
|
150
|
-
return C;
|
|
151
|
-
},
|
|
152
|
-
get text() {
|
|
153
|
-
return V;
|
|
154
|
-
},
|
|
155
|
-
get disabled() {
|
|
156
|
-
return n(s);
|
|
157
|
-
}
|
|
158
|
-
}), y(d), P(v, d), q({
|
|
159
|
-
get selected() {
|
|
160
|
-
return c();
|
|
161
|
-
},
|
|
162
|
-
set selected(a) {
|
|
163
|
-
c(a), D();
|
|
164
|
-
},
|
|
165
|
-
get options() {
|
|
166
|
-
return u();
|
|
167
|
-
},
|
|
168
|
-
set options(a) {
|
|
169
|
-
u(a), D();
|
|
170
|
-
},
|
|
171
|
-
$set: G,
|
|
172
|
-
$on: (a, _) => $(o, a, _)
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
function ye(v, o) {
|
|
176
|
-
if (new.target) return A({ component: ye, ...v });
|
|
177
|
-
K(o, !1);
|
|
178
|
-
const [s, c] = se(), u = () => z(ie, "$configStore", s), f = () => z(de, "$providerStore", s), g = () => z(fe, "$contractsStore", s);
|
|
179
|
-
var C = this && this.__awaiter || function(e, t, r, a) {
|
|
180
|
-
function _(l) {
|
|
181
|
-
return l instanceof r ? l : new r(function(p) {
|
|
182
|
-
p(l);
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
return new (r || (r = Promise))(function(l, p) {
|
|
186
|
-
function O(h) {
|
|
187
|
-
try {
|
|
188
|
-
M(a.next(h));
|
|
189
|
-
} catch (N) {
|
|
190
|
-
p(N);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
function te(h) {
|
|
194
|
-
try {
|
|
195
|
-
M(a.throw(h));
|
|
196
|
-
} catch (N) {
|
|
197
|
-
p(N);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
function M(h) {
|
|
201
|
-
h.done ? l(h.value) : _(h.value).then(O, te);
|
|
202
|
-
}
|
|
203
|
-
M((a = a.apply(e, t || [])).next());
|
|
204
|
-
});
|
|
205
|
-
};
|
|
206
|
-
const { getBalance: V } = ue(le);
|
|
207
|
-
let w = E("");
|
|
208
|
-
const i = () => C(void 0, void 0, void 0, function* () {
|
|
209
|
-
try {
|
|
210
|
-
S(w, yield V());
|
|
211
|
-
} catch {
|
|
212
|
-
S(w, "0");
|
|
213
|
-
}
|
|
214
|
-
});
|
|
215
|
-
let m = E("10");
|
|
216
|
-
const d = () => {
|
|
217
|
-
ve.set({
|
|
218
|
-
subtitle: "Purchase stored value",
|
|
219
|
-
payments: { credenzaStoredValue: { disabled: !0 } },
|
|
220
|
-
tokens: [
|
|
221
|
-
{
|
|
222
|
-
contractAddress: g().erc20Cred.address,
|
|
223
|
-
amount: +n(m)
|
|
224
|
-
}
|
|
225
|
-
]
|
|
226
|
-
}), Y.set(j.PAYMENT);
|
|
227
|
-
};
|
|
228
|
-
Q(() => (u(), f()), () => {
|
|
229
|
-
u().chainId && f() && i();
|
|
230
|
-
}), X(), W();
|
|
231
|
-
const x = U(() => ({
|
|
232
|
-
title: "buy stored value",
|
|
233
|
-
description: "Buy/Send stored value for purchases throughout this website.",
|
|
234
|
-
onSendClick: () => Y.set(j.SEND_TOKENS),
|
|
235
|
-
sendValueButtonText: "Send stored value",
|
|
236
|
-
isSendValueDisabled: !n(w),
|
|
237
|
-
onPaymentClick: d
|
|
238
|
-
}));
|
|
239
|
-
ee(v, {
|
|
240
|
-
get options() {
|
|
241
|
-
return n(x);
|
|
242
|
-
},
|
|
243
|
-
get selected() {
|
|
244
|
-
return n(m);
|
|
245
|
-
},
|
|
246
|
-
set selected(e) {
|
|
247
|
-
S(m, e);
|
|
248
|
-
},
|
|
249
|
-
$$legacy: !0
|
|
250
|
-
});
|
|
251
|
-
var b = q({
|
|
252
|
-
$set: G,
|
|
253
|
-
$on: (e, t) => $(o, e, t)
|
|
254
|
-
});
|
|
255
|
-
return c(), b;
|
|
256
|
-
}
|
|
257
|
-
export {
|
|
258
|
-
ye as default
|
|
259
|
-
};
|
|
260
|
-
//# sourceMappingURL=Wallet-BUV87MlV.js.map
|
package/dist/each-tAR3XqEj.js
DELETED
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
import { h as x, a as ee, b as ae, K, I as re, ar as ne, H as ie, r as U, s as R, d as S, g as H, ak as fe, o as J, p as P, t as le, ao as Q, aa as se, m as ue, f as X, bk as D, a7 as z, bl as M, e as F, bm as te, an as ve, bn as de, as as _e, bo as y, bp as oe, ai as ce, ab as he, ad as Ee, bq as W, q as pe, br as be } from "./index-B0D9qQ_O.js";
|
|
2
|
-
function xe(l, e) {
|
|
3
|
-
return e;
|
|
4
|
-
}
|
|
5
|
-
function Ae(l, e, a, u) {
|
|
6
|
-
for (var v = [], _ = e.length, t = 0; t < _; t++)
|
|
7
|
-
te(e[t].e, v, !0);
|
|
8
|
-
var o = _ > 0 && v.length === 0 && a !== null;
|
|
9
|
-
if (o) {
|
|
10
|
-
var b = (
|
|
11
|
-
/** @type {Element} */
|
|
12
|
-
/** @type {Element} */
|
|
13
|
-
a.parentNode
|
|
14
|
-
);
|
|
15
|
-
ve(b), b.append(
|
|
16
|
-
/** @type {Element} */
|
|
17
|
-
a
|
|
18
|
-
), u.clear(), m(l, e[0].prev, e[_ - 1].next);
|
|
19
|
-
}
|
|
20
|
-
de(v, () => {
|
|
21
|
-
for (var h = 0; h < _; h++) {
|
|
22
|
-
var d = e[h];
|
|
23
|
-
o || (u.delete(d.k), m(l, d.prev, d.next)), _e(d.e, !o);
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
function Ce(l, e, a, u, v, _ = null) {
|
|
28
|
-
var t = l, o = { flags: e, items: /* @__PURE__ */ new Map(), first: null }, b = (e & W) !== 0;
|
|
29
|
-
if (b) {
|
|
30
|
-
var h = (
|
|
31
|
-
/** @type {Element} */
|
|
32
|
-
l
|
|
33
|
-
);
|
|
34
|
-
t = x ? R(
|
|
35
|
-
/** @type {Comment | Text} */
|
|
36
|
-
he(h)
|
|
37
|
-
) : h.appendChild(Ee());
|
|
38
|
-
}
|
|
39
|
-
x && ee();
|
|
40
|
-
var d = null, C = !1, i = re(() => {
|
|
41
|
-
var s = a();
|
|
42
|
-
return se(s) ? s : s == null ? [] : Q(s);
|
|
43
|
-
});
|
|
44
|
-
ae(() => {
|
|
45
|
-
var s = K(i), r = s.length;
|
|
46
|
-
if (C && r === 0)
|
|
47
|
-
return;
|
|
48
|
-
C = r === 0;
|
|
49
|
-
let I = !1;
|
|
50
|
-
if (x) {
|
|
51
|
-
var E = ne(t) === ie;
|
|
52
|
-
E !== (r === 0) && (t = U(), R(t), S(!1), I = !0);
|
|
53
|
-
}
|
|
54
|
-
if (x) {
|
|
55
|
-
for (var p = null, A, c = 0; c < r; c++) {
|
|
56
|
-
if (H.nodeType === 8 && /** @type {Comment} */
|
|
57
|
-
H.data === fe) {
|
|
58
|
-
t = /** @type {Comment} */
|
|
59
|
-
H, I = !0, S(!1);
|
|
60
|
-
break;
|
|
61
|
-
}
|
|
62
|
-
var n = s[c], f = u(n, c);
|
|
63
|
-
A = Z(
|
|
64
|
-
H,
|
|
65
|
-
o,
|
|
66
|
-
p,
|
|
67
|
-
null,
|
|
68
|
-
n,
|
|
69
|
-
f,
|
|
70
|
-
c,
|
|
71
|
-
v,
|
|
72
|
-
e,
|
|
73
|
-
a
|
|
74
|
-
), o.items.set(f, A), p = A;
|
|
75
|
-
}
|
|
76
|
-
r > 0 && R(U());
|
|
77
|
-
}
|
|
78
|
-
x || Ie(s, o, t, v, e, u, a), _ !== null && (r === 0 ? d ? J(d) : d = P(() => _(t)) : d !== null && le(d, () => {
|
|
79
|
-
d = null;
|
|
80
|
-
})), I && S(!0), K(i);
|
|
81
|
-
}), x && (t = H);
|
|
82
|
-
}
|
|
83
|
-
function Ie(l, e, a, u, v, _, t) {
|
|
84
|
-
var L, O, V, Y;
|
|
85
|
-
var o = (v & be) !== 0, b = (v & (y | M)) !== 0, h = l.length, d = e.items, C = e.first, i = C, s, r = null, I, E = [], p = [], A, c, n, f;
|
|
86
|
-
if (o)
|
|
87
|
-
for (f = 0; f < h; f += 1)
|
|
88
|
-
A = l[f], c = _(A, f), n = d.get(c), n !== void 0 && ((L = n.a) == null || L.measure(), (I ?? (I = /* @__PURE__ */ new Set())).add(n));
|
|
89
|
-
for (f = 0; f < h; f += 1) {
|
|
90
|
-
if (A = l[f], c = _(A, f), n = d.get(c), n === void 0) {
|
|
91
|
-
var $ = i ? (
|
|
92
|
-
/** @type {TemplateNode} */
|
|
93
|
-
i.e.nodes_start
|
|
94
|
-
) : a;
|
|
95
|
-
r = Z(
|
|
96
|
-
$,
|
|
97
|
-
e,
|
|
98
|
-
r,
|
|
99
|
-
r === null ? e.first : r.next,
|
|
100
|
-
A,
|
|
101
|
-
c,
|
|
102
|
-
f,
|
|
103
|
-
u,
|
|
104
|
-
v,
|
|
105
|
-
t
|
|
106
|
-
), d.set(c, r), E = [], p = [], i = r.next;
|
|
107
|
-
continue;
|
|
108
|
-
}
|
|
109
|
-
if (b && Te(n, A, f, v), (n.e.f & D) !== 0 && (J(n.e), o && ((O = n.a) == null || O.unfix(), (I ?? (I = /* @__PURE__ */ new Set())).delete(n))), n !== i) {
|
|
110
|
-
if (s !== void 0 && s.has(n)) {
|
|
111
|
-
if (E.length < p.length) {
|
|
112
|
-
var N = p[0], T;
|
|
113
|
-
r = N.prev;
|
|
114
|
-
var q = E[0], g = E[E.length - 1];
|
|
115
|
-
for (T = 0; T < E.length; T += 1)
|
|
116
|
-
G(E[T], N, a);
|
|
117
|
-
for (T = 0; T < p.length; T += 1)
|
|
118
|
-
s.delete(p[T]);
|
|
119
|
-
m(e, q.prev, g.next), m(e, r, q), m(e, g, N), i = N, r = g, f -= 1, E = [], p = [];
|
|
120
|
-
} else
|
|
121
|
-
s.delete(n), G(n, i, a), m(e, n.prev, n.next), m(e, n, r === null ? e.first : r.next), m(e, r, n), r = n;
|
|
122
|
-
continue;
|
|
123
|
-
}
|
|
124
|
-
for (E = [], p = []; i !== null && i.k !== c; )
|
|
125
|
-
(i.e.f & D) === 0 && (s ?? (s = /* @__PURE__ */ new Set())).add(i), p.push(i), i = i.next;
|
|
126
|
-
if (i === null)
|
|
127
|
-
continue;
|
|
128
|
-
n = i;
|
|
129
|
-
}
|
|
130
|
-
E.push(n), r = n, i = n.next;
|
|
131
|
-
}
|
|
132
|
-
if (i !== null || s !== void 0) {
|
|
133
|
-
for (var w = s === void 0 ? [] : Q(s); i !== null; )
|
|
134
|
-
(i.e.f & D) === 0 && w.push(i), i = i.next;
|
|
135
|
-
var k = w.length;
|
|
136
|
-
if (k > 0) {
|
|
137
|
-
var j = (v & W) !== 0 && h === 0 ? a : null;
|
|
138
|
-
if (o) {
|
|
139
|
-
for (f = 0; f < k; f += 1)
|
|
140
|
-
(V = w[f].a) == null || V.measure();
|
|
141
|
-
for (f = 0; f < k; f += 1)
|
|
142
|
-
(Y = w[f].a) == null || Y.fix();
|
|
143
|
-
}
|
|
144
|
-
Ae(e, w, j, d);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
o && pe(() => {
|
|
148
|
-
var B;
|
|
149
|
-
if (I !== void 0)
|
|
150
|
-
for (n of I)
|
|
151
|
-
(B = n.a) == null || B.apply();
|
|
152
|
-
}), z.first = e.first && e.first.e, z.last = r && r.e;
|
|
153
|
-
}
|
|
154
|
-
function Te(l, e, a, u) {
|
|
155
|
-
(u & y) !== 0 && F(l.v, e), (u & M) !== 0 ? F(
|
|
156
|
-
/** @type {Value<number>} */
|
|
157
|
-
l.i,
|
|
158
|
-
a
|
|
159
|
-
) : l.i = a;
|
|
160
|
-
}
|
|
161
|
-
function Z(l, e, a, u, v, _, t, o, b, h) {
|
|
162
|
-
var d = (b & y) !== 0, C = (b & oe) === 0, i = d ? C ? ue(v, !1, !1) : X(v) : v, s = (b & M) === 0 ? t : X(t), r = {
|
|
163
|
-
i: s,
|
|
164
|
-
v: i,
|
|
165
|
-
k: _,
|
|
166
|
-
a: null,
|
|
167
|
-
// @ts-expect-error
|
|
168
|
-
e: null,
|
|
169
|
-
prev: a,
|
|
170
|
-
next: u
|
|
171
|
-
};
|
|
172
|
-
try {
|
|
173
|
-
return r.e = P(() => o(l, i, s, h), x), r.e.prev = a && a.e, r.e.next = u && u.e, a === null ? e.first = r : (a.next = r, a.e.next = r.e), u !== null && (u.prev = r, u.e.prev = r.e), r;
|
|
174
|
-
} finally {
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
function G(l, e, a) {
|
|
178
|
-
for (var u = l.next ? (
|
|
179
|
-
/** @type {TemplateNode} */
|
|
180
|
-
l.next.e.nodes_start
|
|
181
|
-
) : a, v = e ? (
|
|
182
|
-
/** @type {TemplateNode} */
|
|
183
|
-
e.e.nodes_start
|
|
184
|
-
) : a, _ = (
|
|
185
|
-
/** @type {TemplateNode} */
|
|
186
|
-
l.e.nodes_start
|
|
187
|
-
); _ !== u; ) {
|
|
188
|
-
var t = (
|
|
189
|
-
/** @type {TemplateNode} */
|
|
190
|
-
ce(_)
|
|
191
|
-
);
|
|
192
|
-
v.before(_), _ = t;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
function m(l, e, a) {
|
|
196
|
-
e === null ? l.first = a : (e.next = a, e.e.next = a && a.e), a !== null && (a.prev = e, a.e.prev = e && e.e);
|
|
197
|
-
}
|
|
198
|
-
export {
|
|
199
|
-
Ce as e,
|
|
200
|
-
xe as i
|
|
201
|
-
};
|
|
202
|
-
//# sourceMappingURL=each-tAR3XqEj.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"each-tAR3XqEj.js","sources":["../../../node_modules/.pnpm/svelte@5.34.7/node_modules/svelte/src/internal/client/dom/blocks/each.js"],"sourcesContent":["/** @import { EachItem, EachState, Effect, MaybeSource, Source, TemplateNode, TransitionManager, Value } from '#client' */\nimport {\n\tEACH_INDEX_REACTIVE,\n\tEACH_IS_ANIMATED,\n\tEACH_IS_CONTROLLED,\n\tEACH_ITEM_IMMUTABLE,\n\tEACH_ITEM_REACTIVE,\n\tHYDRATION_END,\n\tHYDRATION_START_ELSE\n} from '../../../../constants.js';\nimport {\n\thydrate_next,\n\thydrate_node,\n\thydrating,\n\tread_hydration_instruction,\n\tremove_nodes,\n\tset_hydrate_node,\n\tset_hydrating\n} from '../hydration.js';\nimport {\n\tclear_text_content,\n\tcreate_text,\n\tget_first_child,\n\tget_next_sibling\n} from '../operations.js';\nimport {\n\tblock,\n\tbranch,\n\tdestroy_effect,\n\trun_out_transitions,\n\tpause_children,\n\tpause_effect,\n\tresume_effect\n} from '../../reactivity/effects.js';\nimport { source, mutable_source, internal_set } from '../../reactivity/sources.js';\nimport { array_from, is_array } from '../../../shared/utils.js';\nimport { INERT } from '#client/constants';\nimport { queue_micro_task } from '../task.js';\nimport { active_effect, get } from '../../runtime.js';\nimport { DEV } from 'esm-env';\nimport { derived_safe_equal } from '../../reactivity/deriveds.js';\n\n/**\n * The row of a keyed each block that is currently updating. We track this\n * so that `animate:` directives have something to attach themselves to\n * @type {EachItem | null}\n */\nexport let current_each_item = null;\n\n/** @param {EachItem | null} item */\nexport function set_current_each_item(item) {\n\tcurrent_each_item = item;\n}\n\n/**\n * @param {any} _\n * @param {number} i\n */\nexport function index(_, i) {\n\treturn i;\n}\n\n/**\n * Pause multiple effects simultaneously, and coordinate their\n * subsequent destruction. Used in each blocks\n * @param {EachState} state\n * @param {EachItem[]} items\n * @param {null | Node} controlled_anchor\n * @param {Map<any, EachItem>} items_map\n */\nfunction pause_effects(state, items, controlled_anchor, items_map) {\n\t/** @type {TransitionManager[]} */\n\tvar transitions = [];\n\tvar length = items.length;\n\n\tfor (var i = 0; i < length; i++) {\n\t\tpause_children(items[i].e, transitions, true);\n\t}\n\n\tvar is_controlled = length > 0 && transitions.length === 0 && controlled_anchor !== null;\n\t// If we have a controlled anchor, it means that the each block is inside a single\n\t// DOM element, so we can apply a fast-path for clearing the contents of the element.\n\tif (is_controlled) {\n\t\tvar parent_node = /** @type {Element} */ (\n\t\t\t/** @type {Element} */ (controlled_anchor).parentNode\n\t\t);\n\t\tclear_text_content(parent_node);\n\t\tparent_node.append(/** @type {Element} */ (controlled_anchor));\n\t\titems_map.clear();\n\t\tlink(state, items[0].prev, items[length - 1].next);\n\t}\n\n\trun_out_transitions(transitions, () => {\n\t\tfor (var i = 0; i < length; i++) {\n\t\t\tvar item = items[i];\n\t\t\tif (!is_controlled) {\n\t\t\t\titems_map.delete(item.k);\n\t\t\t\tlink(state, item.prev, item.next);\n\t\t\t}\n\t\t\tdestroy_effect(item.e, !is_controlled);\n\t\t}\n\t});\n}\n\n/**\n * @template V\n * @param {Element | Comment} node The next sibling node, or the parent node if this is a 'controlled' block\n * @param {number} flags\n * @param {() => V[]} get_collection\n * @param {(value: V, index: number) => any} get_key\n * @param {(anchor: Node, item: MaybeSource<V>, index: MaybeSource<number>) => void} render_fn\n * @param {null | ((anchor: Node) => void)} fallback_fn\n * @returns {void}\n */\nexport function each(node, flags, get_collection, get_key, render_fn, fallback_fn = null) {\n\tvar anchor = node;\n\n\t/** @type {EachState} */\n\tvar state = { flags, items: new Map(), first: null };\n\n\tvar is_controlled = (flags & EACH_IS_CONTROLLED) !== 0;\n\n\tif (is_controlled) {\n\t\tvar parent_node = /** @type {Element} */ (node);\n\n\t\tanchor = hydrating\n\t\t\t? set_hydrate_node(/** @type {Comment | Text} */ (get_first_child(parent_node)))\n\t\t\t: parent_node.appendChild(create_text());\n\t}\n\n\tif (hydrating) {\n\t\thydrate_next();\n\t}\n\n\t/** @type {Effect | null} */\n\tvar fallback = null;\n\n\tvar was_empty = false;\n\n\t// TODO: ideally we could use derived for runes mode but because of the ability\n\t// to use a store which can be mutated, we can't do that here as mutating a store\n\t// will still result in the collection array being the same from the store\n\tvar each_array = derived_safe_equal(() => {\n\t\tvar collection = get_collection();\n\n\t\treturn is_array(collection) ? collection : collection == null ? [] : array_from(collection);\n\t});\n\n\tblock(() => {\n\t\tvar array = get(each_array);\n\t\tvar length = array.length;\n\n\t\tif (was_empty && length === 0) {\n\t\t\t// ignore updates if the array is empty,\n\t\t\t// and it already was empty on previous run\n\t\t\treturn;\n\t\t}\n\t\twas_empty = length === 0;\n\n\t\t/** `true` if there was a hydration mismatch. Needs to be a `let` or else it isn't treeshaken out */\n\t\tlet mismatch = false;\n\n\t\tif (hydrating) {\n\t\t\tvar is_else = read_hydration_instruction(anchor) === HYDRATION_START_ELSE;\n\n\t\t\tif (is_else !== (length === 0)) {\n\t\t\t\t// hydration mismatch — remove the server-rendered DOM and start over\n\t\t\t\tanchor = remove_nodes();\n\n\t\t\t\tset_hydrate_node(anchor);\n\t\t\t\tset_hydrating(false);\n\t\t\t\tmismatch = true;\n\t\t\t}\n\t\t}\n\n\t\t// this is separate to the previous block because `hydrating` might change\n\t\tif (hydrating) {\n\t\t\t/** @type {EachItem | null} */\n\t\t\tvar prev = null;\n\n\t\t\t/** @type {EachItem} */\n\t\t\tvar item;\n\n\t\t\tfor (var i = 0; i < length; i++) {\n\t\t\t\tif (\n\t\t\t\t\thydrate_node.nodeType === 8 &&\n\t\t\t\t\t/** @type {Comment} */ (hydrate_node).data === HYDRATION_END\n\t\t\t\t) {\n\t\t\t\t\t// The server rendered fewer items than expected,\n\t\t\t\t\t// so break out and continue appending non-hydrated items\n\t\t\t\t\tanchor = /** @type {Comment} */ (hydrate_node);\n\t\t\t\t\tmismatch = true;\n\t\t\t\t\tset_hydrating(false);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tvar value = array[i];\n\t\t\t\tvar key = get_key(value, i);\n\t\t\t\titem = create_item(\n\t\t\t\t\thydrate_node,\n\t\t\t\t\tstate,\n\t\t\t\t\tprev,\n\t\t\t\t\tnull,\n\t\t\t\t\tvalue,\n\t\t\t\t\tkey,\n\t\t\t\t\ti,\n\t\t\t\t\trender_fn,\n\t\t\t\t\tflags,\n\t\t\t\t\tget_collection\n\t\t\t\t);\n\t\t\t\tstate.items.set(key, item);\n\n\t\t\t\tprev = item;\n\t\t\t}\n\n\t\t\t// remove excess nodes\n\t\t\tif (length > 0) {\n\t\t\t\tset_hydrate_node(remove_nodes());\n\t\t\t}\n\t\t}\n\n\t\tif (!hydrating) {\n\t\t\treconcile(array, state, anchor, render_fn, flags, get_key, get_collection);\n\t\t}\n\n\t\tif (fallback_fn !== null) {\n\t\t\tif (length === 0) {\n\t\t\t\tif (fallback) {\n\t\t\t\t\tresume_effect(fallback);\n\t\t\t\t} else {\n\t\t\t\t\tfallback = branch(() => fallback_fn(anchor));\n\t\t\t\t}\n\t\t\t} else if (fallback !== null) {\n\t\t\t\tpause_effect(fallback, () => {\n\t\t\t\t\tfallback = null;\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif (mismatch) {\n\t\t\t// continue in hydration mode\n\t\t\tset_hydrating(true);\n\t\t}\n\n\t\t// When we mount the each block for the first time, the collection won't be\n\t\t// connected to this effect as the effect hasn't finished running yet and its deps\n\t\t// won't be assigned. However, it's possible that when reconciling the each block\n\t\t// that a mutation occurred and it's made the collection MAYBE_DIRTY, so reading the\n\t\t// collection again can provide consistency to the reactive graph again as the deriveds\n\t\t// will now be `CLEAN`.\n\t\tget(each_array);\n\t});\n\n\tif (hydrating) {\n\t\tanchor = hydrate_node;\n\t}\n}\n\n/**\n * Add, remove, or reorder items output by an each block as its input changes\n * @template V\n * @param {Array<V>} array\n * @param {EachState} state\n * @param {Element | Comment | Text} anchor\n * @param {(anchor: Node, item: MaybeSource<V>, index: number | Source<number>, collection: () => V[]) => void} render_fn\n * @param {number} flags\n * @param {(value: V, index: number) => any} get_key\n * @param {() => V[]} get_collection\n * @returns {void}\n */\nfunction reconcile(array, state, anchor, render_fn, flags, get_key, get_collection) {\n\tvar is_animated = (flags & EACH_IS_ANIMATED) !== 0;\n\tvar should_update = (flags & (EACH_ITEM_REACTIVE | EACH_INDEX_REACTIVE)) !== 0;\n\n\tvar length = array.length;\n\tvar items = state.items;\n\tvar first = state.first;\n\tvar current = first;\n\n\t/** @type {undefined | Set<EachItem>} */\n\tvar seen;\n\n\t/** @type {EachItem | null} */\n\tvar prev = null;\n\n\t/** @type {undefined | Set<EachItem>} */\n\tvar to_animate;\n\n\t/** @type {EachItem[]} */\n\tvar matched = [];\n\n\t/** @type {EachItem[]} */\n\tvar stashed = [];\n\n\t/** @type {V} */\n\tvar value;\n\n\t/** @type {any} */\n\tvar key;\n\n\t/** @type {EachItem | undefined} */\n\tvar item;\n\n\t/** @type {number} */\n\tvar i;\n\n\tif (is_animated) {\n\t\tfor (i = 0; i < length; i += 1) {\n\t\t\tvalue = array[i];\n\t\t\tkey = get_key(value, i);\n\t\t\titem = items.get(key);\n\n\t\t\tif (item !== undefined) {\n\t\t\t\titem.a?.measure();\n\t\t\t\t(to_animate ??= new Set()).add(item);\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (i = 0; i < length; i += 1) {\n\t\tvalue = array[i];\n\t\tkey = get_key(value, i);\n\t\titem = items.get(key);\n\n\t\tif (item === undefined) {\n\t\t\tvar child_anchor = current ? /** @type {TemplateNode} */ (current.e.nodes_start) : anchor;\n\n\t\t\tprev = create_item(\n\t\t\t\tchild_anchor,\n\t\t\t\tstate,\n\t\t\t\tprev,\n\t\t\t\tprev === null ? state.first : prev.next,\n\t\t\t\tvalue,\n\t\t\t\tkey,\n\t\t\t\ti,\n\t\t\t\trender_fn,\n\t\t\t\tflags,\n\t\t\t\tget_collection\n\t\t\t);\n\n\t\t\titems.set(key, prev);\n\n\t\t\tmatched = [];\n\t\t\tstashed = [];\n\n\t\t\tcurrent = prev.next;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (should_update) {\n\t\t\tupdate_item(item, value, i, flags);\n\t\t}\n\n\t\tif ((item.e.f & INERT) !== 0) {\n\t\t\tresume_effect(item.e);\n\t\t\tif (is_animated) {\n\t\t\t\titem.a?.unfix();\n\t\t\t\t(to_animate ??= new Set()).delete(item);\n\t\t\t}\n\t\t}\n\n\t\tif (item !== current) {\n\t\t\tif (seen !== undefined && seen.has(item)) {\n\t\t\t\tif (matched.length < stashed.length) {\n\t\t\t\t\t// more efficient to move later items to the front\n\t\t\t\t\tvar start = stashed[0];\n\t\t\t\t\tvar j;\n\n\t\t\t\t\tprev = start.prev;\n\n\t\t\t\t\tvar a = matched[0];\n\t\t\t\t\tvar b = matched[matched.length - 1];\n\n\t\t\t\t\tfor (j = 0; j < matched.length; j += 1) {\n\t\t\t\t\t\tmove(matched[j], start, anchor);\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (j = 0; j < stashed.length; j += 1) {\n\t\t\t\t\t\tseen.delete(stashed[j]);\n\t\t\t\t\t}\n\n\t\t\t\t\tlink(state, a.prev, b.next);\n\t\t\t\t\tlink(state, prev, a);\n\t\t\t\t\tlink(state, b, start);\n\n\t\t\t\t\tcurrent = start;\n\t\t\t\t\tprev = b;\n\t\t\t\t\ti -= 1;\n\n\t\t\t\t\tmatched = [];\n\t\t\t\t\tstashed = [];\n\t\t\t\t} else {\n\t\t\t\t\t// more efficient to move earlier items to the back\n\t\t\t\t\tseen.delete(item);\n\t\t\t\t\tmove(item, current, anchor);\n\n\t\t\t\t\tlink(state, item.prev, item.next);\n\t\t\t\t\tlink(state, item, prev === null ? state.first : prev.next);\n\t\t\t\t\tlink(state, prev, item);\n\n\t\t\t\t\tprev = item;\n\t\t\t\t}\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tmatched = [];\n\t\t\tstashed = [];\n\n\t\t\twhile (current !== null && current.k !== key) {\n\t\t\t\t// If the each block isn't inert and an item has an effect that is already inert,\n\t\t\t\t// skip over adding it to our seen Set as the item is already being handled\n\t\t\t\tif ((current.e.f & INERT) === 0) {\n\t\t\t\t\t(seen ??= new Set()).add(current);\n\t\t\t\t}\n\t\t\t\tstashed.push(current);\n\t\t\t\tcurrent = current.next;\n\t\t\t}\n\n\t\t\tif (current === null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\titem = current;\n\t\t}\n\n\t\tmatched.push(item);\n\t\tprev = item;\n\t\tcurrent = item.next;\n\t}\n\n\tif (current !== null || seen !== undefined) {\n\t\tvar to_destroy = seen === undefined ? [] : array_from(seen);\n\n\t\twhile (current !== null) {\n\t\t\t// If the each block isn't inert, then inert effects are currently outroing and will be removed once the transition is finished\n\t\t\tif ((current.e.f & INERT) === 0) {\n\t\t\t\tto_destroy.push(current);\n\t\t\t}\n\t\t\tcurrent = current.next;\n\t\t}\n\n\t\tvar destroy_length = to_destroy.length;\n\n\t\tif (destroy_length > 0) {\n\t\t\tvar controlled_anchor = (flags & EACH_IS_CONTROLLED) !== 0 && length === 0 ? anchor : null;\n\n\t\t\tif (is_animated) {\n\t\t\t\tfor (i = 0; i < destroy_length; i += 1) {\n\t\t\t\t\tto_destroy[i].a?.measure();\n\t\t\t\t}\n\n\t\t\t\tfor (i = 0; i < destroy_length; i += 1) {\n\t\t\t\t\tto_destroy[i].a?.fix();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpause_effects(state, to_destroy, controlled_anchor, items);\n\t\t}\n\t}\n\n\tif (is_animated) {\n\t\tqueue_micro_task(() => {\n\t\t\tif (to_animate === undefined) return;\n\t\t\tfor (item of to_animate) {\n\t\t\t\titem.a?.apply();\n\t\t\t}\n\t\t});\n\t}\n\n\t/** @type {Effect} */ (active_effect).first = state.first && state.first.e;\n\t/** @type {Effect} */ (active_effect).last = prev && prev.e;\n}\n\n/**\n * @param {EachItem} item\n * @param {any} value\n * @param {number} index\n * @param {number} type\n * @returns {void}\n */\nfunction update_item(item, value, index, type) {\n\tif ((type & EACH_ITEM_REACTIVE) !== 0) {\n\t\tinternal_set(item.v, value);\n\t}\n\n\tif ((type & EACH_INDEX_REACTIVE) !== 0) {\n\t\tinternal_set(/** @type {Value<number>} */ (item.i), index);\n\t} else {\n\t\titem.i = index;\n\t}\n}\n\n/**\n * @template V\n * @param {Node} anchor\n * @param {EachState} state\n * @param {EachItem | null} prev\n * @param {EachItem | null} next\n * @param {V} value\n * @param {unknown} key\n * @param {number} index\n * @param {(anchor: Node, item: V | Source<V>, index: number | Value<number>, collection: () => V[]) => void} render_fn\n * @param {number} flags\n * @param {() => V[]} get_collection\n * @returns {EachItem}\n */\nfunction create_item(\n\tanchor,\n\tstate,\n\tprev,\n\tnext,\n\tvalue,\n\tkey,\n\tindex,\n\trender_fn,\n\tflags,\n\tget_collection\n) {\n\tvar previous_each_item = current_each_item;\n\tvar reactive = (flags & EACH_ITEM_REACTIVE) !== 0;\n\tvar mutable = (flags & EACH_ITEM_IMMUTABLE) === 0;\n\n\tvar v = reactive ? (mutable ? mutable_source(value, false, false) : source(value)) : value;\n\tvar i = (flags & EACH_INDEX_REACTIVE) === 0 ? index : source(index);\n\n\tif (DEV && reactive) {\n\t\t// For tracing purposes, we need to link the source signal we create with the\n\t\t// collection + index so that tracing works as intended\n\t\t/** @type {Value} */ (v).trace = () => {\n\t\t\tvar collection_index = typeof i === 'number' ? index : i.v;\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unused-expressions\n\t\t\tget_collection()[collection_index];\n\t\t};\n\t}\n\n\t/** @type {EachItem} */\n\tvar item = {\n\t\ti,\n\t\tv,\n\t\tk: key,\n\t\ta: null,\n\t\t// @ts-expect-error\n\t\te: null,\n\t\tprev,\n\t\tnext\n\t};\n\n\tcurrent_each_item = item;\n\n\ttry {\n\t\titem.e = branch(() => render_fn(anchor, v, i, get_collection), hydrating);\n\n\t\titem.e.prev = prev && prev.e;\n\t\titem.e.next = next && next.e;\n\n\t\tif (prev === null) {\n\t\t\tstate.first = item;\n\t\t} else {\n\t\t\tprev.next = item;\n\t\t\tprev.e.next = item.e;\n\t\t}\n\n\t\tif (next !== null) {\n\t\t\tnext.prev = item;\n\t\t\tnext.e.prev = item.e;\n\t\t}\n\n\t\treturn item;\n\t} finally {\n\t\tcurrent_each_item = previous_each_item;\n\t}\n}\n\n/**\n * @param {EachItem} item\n * @param {EachItem | null} next\n * @param {Text | Element | Comment} anchor\n */\nfunction move(item, next, anchor) {\n\tvar end = item.next ? /** @type {TemplateNode} */ (item.next.e.nodes_start) : anchor;\n\n\tvar dest = next ? /** @type {TemplateNode} */ (next.e.nodes_start) : anchor;\n\tvar node = /** @type {TemplateNode} */ (item.e.nodes_start);\n\n\twhile (node !== end) {\n\t\tvar next_node = /** @type {TemplateNode} */ (get_next_sibling(node));\n\t\tdest.before(node);\n\t\tnode = next_node;\n\t}\n}\n\n/**\n * @param {EachState} state\n * @param {EachItem | null} prev\n * @param {EachItem | null} next\n */\nfunction link(state, prev, next) {\n\tif (prev === null) {\n\t\tstate.first = next;\n\t} else {\n\t\tprev.next = next;\n\t\tprev.e.next = next && next.e;\n\t}\n\n\tif (next !== null) {\n\t\tnext.prev = prev;\n\t\tnext.e.prev = prev && prev.e;\n\t}\n}\n"],"names":["index","_","i","pause_effects","state","items","controlled_anchor","items_map","transitions","length","pause_children","is_controlled","parent_node","clear_text_content","link","run_out_transitions","item","destroy_effect","each","node","flags","get_collection","get_key","render_fn","fallback_fn","anchor","EACH_IS_CONTROLLED","hydrating","set_hydrate_node","get_first_child","create_text","hydrate_next","fallback","was_empty","each_array","derived_safe_equal","collection","is_array","array_from","block","array","get","mismatch","is_else","read_hydration_instruction","HYDRATION_START_ELSE","remove_nodes","set_hydrating","prev","hydrate_node","HYDRATION_END","value","key","create_item","reconcile","resume_effect","branch","pause_effect","is_animated","EACH_IS_ANIMATED","should_update","EACH_ITEM_REACTIVE","EACH_INDEX_REACTIVE","first","current","seen","to_animate","matched","stashed","_a","child_anchor","update_item","INERT","_b","start","j","a","b","move","to_destroy","destroy_length","_c","_d","queue_micro_task","active_effect","type","internal_set","next","reactive","mutable","EACH_ITEM_IMMUTABLE","v","mutable_source","source","end","dest","next_node","get_next_sibling"],"mappings":";AA0DO,SAASA,GAAMC,GAAGC,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W;AAAA,EAEX;AACA;AAOA,SAAS8D,EAAK9D,GAAMuE,GAAM9D,GAAQ;AAMjC,WALIqE,IAAM9E,EAAK;AAAA;AAAA,IAAoCA,EAAK,KAAK,EAAE;AAAA,MAAeS,GAE1EsE,IAAOR;AAAA;AAAA,IAAoCA,EAAK,EAAE;AAAA,MAAe9D,GACjEN;AAAA;AAAA,IAAoCH,EAAK,EAAE;AAAA,KAExCG,MAAS2E,KAAK;AACpB,QAAIE;AAAA;AAAA,MAAyCC,GAAiB9E,CAAI;AAAA;AAClE,IAAA4E,EAAK,OAAO5E,CAAI,GAChBA,IAAO6E;AAAA,EACT;AACA;AAOA,SAASlF,EAAKV,GAAO4C,GAAMuC,GAAM;AAChC,EAAIvC,MAAS,OACZ5C,EAAM,QAAQmF,KAEdvC,EAAK,OAAOuC,GACZvC,EAAK,EAAE,OAAOuC,KAAQA,EAAK,IAGxBA,MAAS,SACZA,EAAK,OAAOvC,GACZuC,EAAK,EAAE,OAAOvC,KAAQA,EAAK;AAE7B;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"html-a8zjkl0d.js","sources":["../../../node_modules/.pnpm/svelte@5.34.7/node_modules/svelte/src/internal/client/dom/blocks/html.js"],"sourcesContent":["/** @import { Effect, TemplateNode } from '#client' */\nimport { FILENAME, HYDRATION_ERROR } from '../../../../constants.js';\nimport { remove_effect_dom, template_effect } from '../../reactivity/effects.js';\nimport { hydrate_next, hydrate_node, hydrating, set_hydrate_node } from '../hydration.js';\nimport { create_fragment_from_html } from '../reconciler.js';\nimport { assign_nodes } from '../template.js';\nimport * as w from '../../warnings.js';\nimport { hash, sanitize_location } from '../../../../utils.js';\nimport { DEV } from 'esm-env';\nimport { dev_current_component_function } from '../../context.js';\nimport { get_first_child, get_next_sibling } from '../operations.js';\nimport { active_effect } from '../../runtime.js';\n\n/**\n * @param {Element} element\n * @param {string | null} server_hash\n * @param {string} value\n */\nfunction check_hash(element, server_hash, value) {\n\tif (!server_hash || server_hash === hash(String(value ?? ''))) return;\n\n\tlet location;\n\n\t// @ts-expect-error\n\tconst loc = element.__svelte_meta?.loc;\n\tif (loc) {\n\t\tlocation = `near ${loc.file}:${loc.line}:${loc.column}`;\n\t} else if (dev_current_component_function?.[FILENAME]) {\n\t\tlocation = `in ${dev_current_component_function[FILENAME]}`;\n\t}\n\n\tw.hydration_html_changed(sanitize_location(location));\n}\n\n/**\n * @param {Element | Text | Comment} node\n * @param {() => string} get_value\n * @param {boolean} [svg]\n * @param {boolean} [mathml]\n * @param {boolean} [skip_warning]\n * @returns {void}\n */\nexport function html(node, get_value, svg = false, mathml = false, skip_warning = false) {\n\tvar anchor = node;\n\n\tvar value = '';\n\n\ttemplate_effect(() => {\n\t\tvar effect = /** @type {Effect} */ (active_effect);\n\n\t\tif (value === (value = get_value() ?? '')) {\n\t\t\tif (hydrating) hydrate_next();\n\t\t\treturn;\n\t\t}\n\n\t\tif (effect.nodes_start !== null) {\n\t\t\tremove_effect_dom(effect.nodes_start, /** @type {TemplateNode} */ (effect.nodes_end));\n\t\t\teffect.nodes_start = effect.nodes_end = null;\n\t\t}\n\n\t\tif (value === '') return;\n\n\t\tif (hydrating) {\n\t\t\t// We're deliberately not trying to repair mismatches between server and client,\n\t\t\t// as it's costly and error-prone (and it's an edge case to have a mismatch anyway)\n\t\t\tvar hash = /** @type {Comment} */ (hydrate_node).data;\n\t\t\tvar next = hydrate_next();\n\t\t\tvar last = next;\n\n\t\t\twhile (next !== null && (next.nodeType !== 8 || /** @type {Comment} */ (next).data !== '')) {\n\t\t\t\tlast = next;\n\t\t\t\tnext = /** @type {TemplateNode} */ (get_next_sibling(next));\n\t\t\t}\n\n\t\t\tif (next === null) {\n\t\t\t\tw.hydration_mismatch();\n\t\t\t\tthrow HYDRATION_ERROR;\n\t\t\t}\n\n\t\t\tif (DEV && !skip_warning) {\n\t\t\t\tcheck_hash(/** @type {Element} */ (next.parentNode), hash, value);\n\t\t\t}\n\n\t\t\tassign_nodes(hydrate_node, last);\n\t\t\tanchor = set_hydrate_node(next);\n\t\t\treturn;\n\t\t}\n\n\t\tvar html = value + '';\n\t\tif (svg) html = `<svg>${html}</svg>`;\n\t\telse if (mathml) html = `<math>${html}</math>`;\n\n\t\t// Don't use create_fragment_with_script_from_html here because that would mean script tags are executed.\n\t\t// @html is basically `.innerHTML = ...` and that doesn't execute scripts either due to security reasons.\n\t\t/** @type {DocumentFragment | Element} */\n\t\tvar node = create_fragment_from_html(html);\n\n\t\tif (svg || mathml) {\n\t\t\tnode = /** @type {Element} */ (get_first_child(node));\n\t\t}\n\n\t\tassign_nodes(\n\t\t\t/** @type {TemplateNode} */ (get_first_child(node)),\n\t\t\t/** @type {TemplateNode} */ (node.lastChild)\n\t\t);\n\n\t\tif (svg || mathml) {\n\t\t\twhile (get_first_child(node)) {\n\t\t\t\tanchor.before(/** @type {Node} */ (get_first_child(node)));\n\t\t\t}\n\t\t} else {\n\t\t\tanchor.before(node);\n\t\t}\n\t});\n}\n"],"names":["html","node","get_value","svg","mathml","skip_warning","anchor","value","template_effect","effect","active_effect","hydrating","hydrate_next","remove_effect_dom","hydrate_node","next","last","get_next_sibling","w.hydration_mismatch","HYDRATION_ERROR","assign_nodes","set_hydrate_node","create_fragment_from_html","get_first_child"],"mappings":";;AA0CO,SAASA,EAAKC,GAAMC,GAAWC,IAAM,IAAOC,IAAS,IAAOC,IAAe,IAAO;AACxF,MAAIC,IAASL,GAETM,IAAQ;AAEZ,EAAAC,EAAgB,MAAM;AACrB,QAAIC;AAAA;AAAA,MAAgCC;AAAA;AAEpC,QAAIH,OAAWA,IAAQL,EAAW,KAAI,KAAK;AAC1C,MAAIS,KAAWC,EAAc;AAC7B;AAAA,IACH;AAOE,QALIH,EAAO,gBAAgB,SAC1BI;AAAA,MAAkBJ,EAAO;AAAA;AAAA,MAA0CA,EAAO;AAAA,IAAW,GACrFA,EAAO,cAAcA,EAAO,YAAY,OAGrCF,MAAU,IAEd;AAAA,UAAII,G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