@paroicms/content-loading-plugin 0.1.1 → 0.2.0
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.
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
const
|
|
2
|
-
equals:
|
|
1
|
+
const yt = (e, t) => e === t, me = Symbol("solid-proxy"), z = {
|
|
2
|
+
equals: yt
|
|
3
3
|
};
|
|
4
|
-
let
|
|
5
|
-
const T = 1,
|
|
4
|
+
let Be = Qe;
|
|
5
|
+
const T = 1, ee = 2, Me = {
|
|
6
6
|
owned: null,
|
|
7
7
|
cleanups: null,
|
|
8
8
|
context: null,
|
|
9
9
|
owner: null
|
|
10
10
|
};
|
|
11
11
|
var w = null;
|
|
12
|
-
let
|
|
13
|
-
function
|
|
14
|
-
const n = b, r = w, o = e.length === 0, i = t === void 0 ? r : t, a = o ?
|
|
12
|
+
let fe = null, wt = null, b = null, R = null, k = null, oe = 0;
|
|
13
|
+
function De(e, t) {
|
|
14
|
+
const n = b, r = w, o = e.length === 0, i = t === void 0 ? r : t, a = o ? Me : {
|
|
15
15
|
owned: null,
|
|
16
16
|
cleanups: null,
|
|
17
17
|
context: i ? i.context : null,
|
|
18
18
|
owner: i
|
|
19
|
-
}, s = o ? e : () => e(() => I(() =>
|
|
19
|
+
}, s = o ? e : () => e(() => I(() => se(a)));
|
|
20
20
|
w = a, b = null;
|
|
21
21
|
try {
|
|
22
22
|
return N(s, !0);
|
|
@@ -25,35 +25,34 @@ function Be(e, t) {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
function x(e, t) {
|
|
28
|
-
t = t ? Object.assign({},
|
|
28
|
+
t = t ? Object.assign({}, z, t) : z;
|
|
29
29
|
const n = {
|
|
30
30
|
value: e,
|
|
31
31
|
observers: null,
|
|
32
32
|
observerSlots: null,
|
|
33
33
|
comparator: t.equals || void 0
|
|
34
|
-
}, r = (o) => (typeof o == "function" && (o = o(n.value)),
|
|
35
|
-
return [
|
|
34
|
+
}, r = (o) => (typeof o == "function" && (o = o(n.value)), Xe(n, o));
|
|
35
|
+
return [He.bind(n), r];
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
const r =
|
|
37
|
+
function _(e, t, n) {
|
|
38
|
+
const r = Ae(e, t, !1, T);
|
|
39
39
|
H(r);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
|
|
43
|
-
const r =
|
|
41
|
+
function Se(e, t, n) {
|
|
42
|
+
Be = At;
|
|
43
|
+
const r = Ae(e, t, !1, T);
|
|
44
44
|
r.user = !0, k ? k.push(r) : H(r);
|
|
45
45
|
}
|
|
46
46
|
function E(e, t, n) {
|
|
47
|
-
n = n ? Object.assign({},
|
|
48
|
-
const r =
|
|
49
|
-
return r.observers = null, r.observerSlots = null, r.comparator = n.equals || void 0, H(r),
|
|
47
|
+
n = n ? Object.assign({}, z, n) : z;
|
|
48
|
+
const r = Ae(e, t, !0, 0);
|
|
49
|
+
return r.observers = null, r.observerSlots = null, r.comparator = n.equals || void 0, H(r), He.bind(r);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function vt(e) {
|
|
52
52
|
return N(e, !1);
|
|
53
53
|
}
|
|
54
54
|
function I(e) {
|
|
55
|
-
if (b === null)
|
|
56
|
-
return e();
|
|
55
|
+
if (b === null) return e();
|
|
57
56
|
const t = b;
|
|
58
57
|
b = null;
|
|
59
58
|
try {
|
|
@@ -69,34 +68,32 @@ function K(e, t, n) {
|
|
|
69
68
|
let s;
|
|
70
69
|
if (r) {
|
|
71
70
|
s = Array(e.length);
|
|
72
|
-
for (let l = 0; l < e.length; l++)
|
|
73
|
-
|
|
74
|
-
} else
|
|
75
|
-
s = e();
|
|
71
|
+
for (let l = 0; l < e.length; l++) s[l] = e[l]();
|
|
72
|
+
} else s = e();
|
|
76
73
|
if (i)
|
|
77
74
|
return i = !1, a;
|
|
78
75
|
const c = I(() => t(s, o, a));
|
|
79
76
|
return o = s, c;
|
|
80
77
|
};
|
|
81
78
|
}
|
|
82
|
-
function
|
|
79
|
+
function qe(e) {
|
|
83
80
|
return w === null || (w.cleanups === null ? w.cleanups = [e] : w.cleanups.push(e)), e;
|
|
84
81
|
}
|
|
85
|
-
function
|
|
82
|
+
function Ve() {
|
|
86
83
|
return w;
|
|
87
84
|
}
|
|
88
|
-
function
|
|
85
|
+
function We(e, t) {
|
|
89
86
|
const n = w, r = b;
|
|
90
87
|
w = e, b = null;
|
|
91
88
|
try {
|
|
92
89
|
return N(t, !0);
|
|
93
90
|
} catch (o) {
|
|
94
|
-
|
|
91
|
+
Ee(o);
|
|
95
92
|
} finally {
|
|
96
93
|
w = n, b = r;
|
|
97
94
|
}
|
|
98
95
|
}
|
|
99
|
-
function
|
|
96
|
+
function bt(e) {
|
|
100
97
|
const t = b, n = w;
|
|
101
98
|
return Promise.resolve().then(() => {
|
|
102
99
|
b = t, w = n;
|
|
@@ -104,32 +101,31 @@ function wt(e) {
|
|
|
104
101
|
return N(e, !1), b = w = null, r ? r.done : void 0;
|
|
105
102
|
});
|
|
106
103
|
}
|
|
107
|
-
function
|
|
104
|
+
function Ge(e, t) {
|
|
108
105
|
const n = Symbol("context");
|
|
109
106
|
return {
|
|
110
107
|
id: n,
|
|
111
|
-
Provider:
|
|
108
|
+
Provider: Rt(n),
|
|
112
109
|
defaultValue: e
|
|
113
110
|
};
|
|
114
111
|
}
|
|
115
|
-
function
|
|
112
|
+
function Ke(e) {
|
|
116
113
|
let t;
|
|
117
114
|
return w && w.context && (t = w.context[e.id]) !== void 0 ? t : e.defaultValue;
|
|
118
115
|
}
|
|
119
|
-
function
|
|
120
|
-
const t = E(e), n = E(() =>
|
|
116
|
+
function $e(e) {
|
|
117
|
+
const t = E(e), n = E(() => ye(t()));
|
|
121
118
|
return n.toArray = () => {
|
|
122
119
|
const r = n();
|
|
123
120
|
return Array.isArray(r) ? r : r != null ? [r] : [];
|
|
124
121
|
}, n;
|
|
125
122
|
}
|
|
126
|
-
function
|
|
123
|
+
function He() {
|
|
127
124
|
if (this.sources && this.state)
|
|
128
|
-
if (this.state === T)
|
|
129
|
-
H(this);
|
|
125
|
+
if (this.state === T) H(this);
|
|
130
126
|
else {
|
|
131
127
|
const e = R;
|
|
132
|
-
R = null, N(() =>
|
|
128
|
+
R = null, N(() => ne(this), !1), R = e;
|
|
133
129
|
}
|
|
134
130
|
if (b) {
|
|
135
131
|
const e = this.observers ? this.observers.length : 0;
|
|
@@ -137,38 +133,41 @@ function Ge() {
|
|
|
137
133
|
}
|
|
138
134
|
return this.value;
|
|
139
135
|
}
|
|
140
|
-
function
|
|
136
|
+
function Xe(e, t, n) {
|
|
141
137
|
let r = e.value;
|
|
142
138
|
return (!e.comparator || !e.comparator(r, t)) && (e.value = t, e.observers && e.observers.length && N(() => {
|
|
143
139
|
for (let o = 0; o < e.observers.length; o += 1) {
|
|
144
|
-
const i = e.observers[o], a =
|
|
145
|
-
a &&
|
|
140
|
+
const i = e.observers[o], a = fe && fe.running;
|
|
141
|
+
a && fe.disposed.has(i), (a ? !i.tState : !i.state) && (i.pure ? R.push(i) : k.push(i), i.observers && Je(i)), a || (i.state = T);
|
|
146
142
|
}
|
|
147
143
|
if (R.length > 1e6)
|
|
148
144
|
throw R = [], new Error();
|
|
149
145
|
}, !1)), t;
|
|
150
146
|
}
|
|
151
147
|
function H(e) {
|
|
152
|
-
if (!e.fn)
|
|
153
|
-
|
|
154
|
-
oe
|
|
155
|
-
|
|
156
|
-
|
|
148
|
+
if (!e.fn) return;
|
|
149
|
+
se(e);
|
|
150
|
+
const t = oe;
|
|
151
|
+
St(
|
|
152
|
+
e,
|
|
153
|
+
e.value,
|
|
154
|
+
t
|
|
155
|
+
);
|
|
157
156
|
}
|
|
158
|
-
function
|
|
157
|
+
function St(e, t, n) {
|
|
159
158
|
let r;
|
|
160
159
|
const o = w, i = b;
|
|
161
160
|
b = w = e;
|
|
162
161
|
try {
|
|
163
162
|
r = e.fn(t);
|
|
164
163
|
} catch (a) {
|
|
165
|
-
return e.pure && (e.state = T, e.owned && e.owned.forEach(
|
|
164
|
+
return e.pure && (e.state = T, e.owned && e.owned.forEach(se), e.owned = null), e.updatedAt = n + 1, Ee(a);
|
|
166
165
|
} finally {
|
|
167
166
|
b = i, w = o;
|
|
168
167
|
}
|
|
169
|
-
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ?
|
|
168
|
+
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? Xe(e, r) : e.value = r, e.updatedAt = n);
|
|
170
169
|
}
|
|
171
|
-
function
|
|
170
|
+
function Ae(e, t, n, r = T, o) {
|
|
172
171
|
const i = {
|
|
173
172
|
fn: e,
|
|
174
173
|
state: r,
|
|
@@ -182,74 +181,67 @@ function $e(e, t, n, r = T, o) {
|
|
|
182
181
|
context: w ? w.context : null,
|
|
183
182
|
pure: n
|
|
184
183
|
};
|
|
185
|
-
return w === null || w !==
|
|
184
|
+
return w === null || w !== Me && (w.owned ? w.owned.push(i) : w.owned = [i]), i;
|
|
186
185
|
}
|
|
187
|
-
function
|
|
188
|
-
if (e.state === 0)
|
|
189
|
-
|
|
190
|
-
if (e.
|
|
191
|
-
return te(e);
|
|
192
|
-
if (e.suspense && I(e.suspense.inFallback))
|
|
193
|
-
return e.suspense.effects.push(e);
|
|
186
|
+
function te(e) {
|
|
187
|
+
if (e.state === 0) return;
|
|
188
|
+
if (e.state === ee) return ne(e);
|
|
189
|
+
if (e.suspense && I(e.suspense.inFallback)) return e.suspense.effects.push(e);
|
|
194
190
|
const t = [e];
|
|
195
|
-
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt <
|
|
191
|
+
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < oe); )
|
|
196
192
|
e.state && t.push(e);
|
|
197
193
|
for (let n = t.length - 1; n >= 0; n--)
|
|
198
194
|
if (e = t[n], e.state === T)
|
|
199
195
|
H(e);
|
|
200
|
-
else if (e.state ===
|
|
196
|
+
else if (e.state === ee) {
|
|
201
197
|
const r = R;
|
|
202
|
-
R = null, N(() =>
|
|
198
|
+
R = null, N(() => ne(e, t[0]), !1), R = r;
|
|
203
199
|
}
|
|
204
200
|
}
|
|
205
201
|
function N(e, t) {
|
|
206
|
-
if (R)
|
|
207
|
-
return e();
|
|
202
|
+
if (R) return e();
|
|
208
203
|
let n = !1;
|
|
209
|
-
t || (R = []), k ? n = !0 : k = [],
|
|
204
|
+
t || (R = []), k ? n = !0 : k = [], oe++;
|
|
210
205
|
try {
|
|
211
206
|
const r = e();
|
|
212
|
-
return
|
|
207
|
+
return $t(n), r;
|
|
213
208
|
} catch (r) {
|
|
214
|
-
n || (k = null), R = null,
|
|
209
|
+
n || (k = null), R = null, Ee(r);
|
|
215
210
|
}
|
|
216
211
|
}
|
|
217
|
-
function
|
|
218
|
-
if (R && (
|
|
219
|
-
return;
|
|
212
|
+
function $t(e) {
|
|
213
|
+
if (R && (Qe(R), R = null), e) return;
|
|
220
214
|
const t = k;
|
|
221
|
-
k = null, t.length && N(() =>
|
|
215
|
+
k = null, t.length && N(() => Be(t), !1);
|
|
222
216
|
}
|
|
223
|
-
function
|
|
224
|
-
for (let t = 0; t < e.length; t++)
|
|
225
|
-
ee(e[t]);
|
|
217
|
+
function Qe(e) {
|
|
218
|
+
for (let t = 0; t < e.length; t++) te(e[t]);
|
|
226
219
|
}
|
|
227
|
-
function
|
|
220
|
+
function At(e) {
|
|
228
221
|
let t, n = 0;
|
|
229
222
|
for (t = 0; t < e.length; t++) {
|
|
230
223
|
const r = e[t];
|
|
231
|
-
r.user ? e[n++] = r :
|
|
224
|
+
r.user ? e[n++] = r : te(r);
|
|
232
225
|
}
|
|
233
|
-
for (t = 0; t < n; t++)
|
|
234
|
-
ee(e[t]);
|
|
226
|
+
for (t = 0; t < n; t++) te(e[t]);
|
|
235
227
|
}
|
|
236
|
-
function
|
|
228
|
+
function ne(e, t) {
|
|
237
229
|
e.state = 0;
|
|
238
230
|
for (let n = 0; n < e.sources.length; n += 1) {
|
|
239
231
|
const r = e.sources[n];
|
|
240
232
|
if (r.sources) {
|
|
241
233
|
const o = r.state;
|
|
242
|
-
o === T ? r !== t && (!r.updatedAt || r.updatedAt <
|
|
234
|
+
o === T ? r !== t && (!r.updatedAt || r.updatedAt < oe) && te(r) : o === ee && ne(r, t);
|
|
243
235
|
}
|
|
244
236
|
}
|
|
245
237
|
}
|
|
246
|
-
function
|
|
238
|
+
function Je(e) {
|
|
247
239
|
for (let t = 0; t < e.observers.length; t += 1) {
|
|
248
240
|
const n = e.observers[t];
|
|
249
|
-
n.state || (n.state =
|
|
241
|
+
n.state || (n.state = ee, n.pure ? R.push(n) : k.push(n), n.observers && Je(n));
|
|
250
242
|
}
|
|
251
243
|
}
|
|
252
|
-
function
|
|
244
|
+
function se(e) {
|
|
253
245
|
let t;
|
|
254
246
|
if (e.sources)
|
|
255
247
|
for (; e.sources.length; ) {
|
|
@@ -260,62 +252,62 @@ function oe(e) {
|
|
|
260
252
|
}
|
|
261
253
|
}
|
|
262
254
|
if (e.owned) {
|
|
263
|
-
for (t = e.owned.length - 1; t >= 0; t--)
|
|
264
|
-
oe(e.owned[t]);
|
|
255
|
+
for (t = e.owned.length - 1; t >= 0; t--) se(e.owned[t]);
|
|
265
256
|
e.owned = null;
|
|
266
257
|
}
|
|
267
258
|
if (e.cleanups) {
|
|
268
|
-
for (t = e.cleanups.length - 1; t >= 0; t--)
|
|
269
|
-
e.cleanups[t]();
|
|
259
|
+
for (t = e.cleanups.length - 1; t >= 0; t--) e.cleanups[t]();
|
|
270
260
|
e.cleanups = null;
|
|
271
261
|
}
|
|
272
262
|
e.state = 0;
|
|
273
263
|
}
|
|
274
|
-
function
|
|
264
|
+
function Et(e) {
|
|
275
265
|
return e instanceof Error ? e : new Error(typeof e == "string" ? e : "Unknown error", {
|
|
276
266
|
cause: e
|
|
277
267
|
});
|
|
278
268
|
}
|
|
279
|
-
function
|
|
280
|
-
throw
|
|
269
|
+
function Ee(e, t = w) {
|
|
270
|
+
throw Et(e);
|
|
281
271
|
}
|
|
282
|
-
function
|
|
283
|
-
if (typeof e == "function" && !e.length)
|
|
284
|
-
return me(e());
|
|
272
|
+
function ye(e) {
|
|
273
|
+
if (typeof e == "function" && !e.length) return ye(e());
|
|
285
274
|
if (Array.isArray(e)) {
|
|
286
275
|
const t = [];
|
|
287
276
|
for (let n = 0; n < e.length; n++) {
|
|
288
|
-
const r =
|
|
277
|
+
const r = ye(e[n]);
|
|
289
278
|
Array.isArray(r) ? t.push.apply(t, r) : t.push(r);
|
|
290
279
|
}
|
|
291
280
|
return t;
|
|
292
281
|
}
|
|
293
282
|
return e;
|
|
294
283
|
}
|
|
295
|
-
function
|
|
284
|
+
function Rt(e, t) {
|
|
296
285
|
return function(r) {
|
|
297
286
|
let o;
|
|
298
|
-
return
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
287
|
+
return _(
|
|
288
|
+
() => o = I(() => (w.context = {
|
|
289
|
+
...w.context,
|
|
290
|
+
[e]: r.value
|
|
291
|
+
}, $e(() => r.children))),
|
|
292
|
+
void 0
|
|
293
|
+
), o;
|
|
302
294
|
};
|
|
303
295
|
}
|
|
304
296
|
function A(e, t) {
|
|
305
297
|
return I(() => e(t || {}));
|
|
306
298
|
}
|
|
307
|
-
function
|
|
299
|
+
function J() {
|
|
308
300
|
return !0;
|
|
309
301
|
}
|
|
310
|
-
const
|
|
302
|
+
const Ct = {
|
|
311
303
|
get(e, t, n) {
|
|
312
|
-
return t ===
|
|
304
|
+
return t === me ? n : e.get(t);
|
|
313
305
|
},
|
|
314
306
|
has(e, t) {
|
|
315
|
-
return t ===
|
|
307
|
+
return t === me ? !0 : e.has(t);
|
|
316
308
|
},
|
|
317
|
-
set:
|
|
318
|
-
deleteProperty:
|
|
309
|
+
set: J,
|
|
310
|
+
deleteProperty: J,
|
|
319
311
|
getOwnPropertyDescriptor(e, t) {
|
|
320
312
|
return {
|
|
321
313
|
configurable: !0,
|
|
@@ -323,68 +315,66 @@ const Et = {
|
|
|
323
315
|
get() {
|
|
324
316
|
return e.get(t);
|
|
325
317
|
},
|
|
326
|
-
set:
|
|
327
|
-
deleteProperty:
|
|
318
|
+
set: J,
|
|
319
|
+
deleteProperty: J
|
|
328
320
|
};
|
|
329
321
|
},
|
|
330
322
|
ownKeys(e) {
|
|
331
323
|
return e.keys();
|
|
332
324
|
}
|
|
333
325
|
};
|
|
334
|
-
function
|
|
326
|
+
function he(e) {
|
|
335
327
|
return (e = typeof e == "function" ? e() : e) ? e : {};
|
|
336
328
|
}
|
|
337
|
-
function
|
|
329
|
+
function Lt() {
|
|
338
330
|
for (let e = 0, t = this.length; e < t; ++e) {
|
|
339
331
|
const n = this[e]();
|
|
340
|
-
if (n !== void 0)
|
|
341
|
-
return n;
|
|
332
|
+
if (n !== void 0) return n;
|
|
342
333
|
}
|
|
343
334
|
}
|
|
344
|
-
function
|
|
335
|
+
function Pt(...e) {
|
|
345
336
|
let t = !1;
|
|
346
337
|
for (let a = 0; a < e.length; a++) {
|
|
347
338
|
const s = e[a];
|
|
348
|
-
t = t || !!s &&
|
|
339
|
+
t = t || !!s && me in s, e[a] = typeof s == "function" ? (t = !0, E(s)) : s;
|
|
349
340
|
}
|
|
350
341
|
if (t)
|
|
351
|
-
return new Proxy(
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
return c;
|
|
342
|
+
return new Proxy(
|
|
343
|
+
{
|
|
344
|
+
get(a) {
|
|
345
|
+
for (let s = e.length - 1; s >= 0; s--) {
|
|
346
|
+
const c = he(e[s])[a];
|
|
347
|
+
if (c !== void 0) return c;
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
has(a) {
|
|
351
|
+
for (let s = e.length - 1; s >= 0; s--)
|
|
352
|
+
if (a in he(e[s])) return !0;
|
|
353
|
+
return !1;
|
|
354
|
+
},
|
|
355
|
+
keys() {
|
|
356
|
+
const a = [];
|
|
357
|
+
for (let s = 0; s < e.length; s++)
|
|
358
|
+
a.push(...Object.keys(he(e[s])));
|
|
359
|
+
return [...new Set(a)];
|
|
357
360
|
}
|
|
358
361
|
},
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
if (a in fe(e[s]))
|
|
362
|
-
return !0;
|
|
363
|
-
return !1;
|
|
364
|
-
},
|
|
365
|
-
keys() {
|
|
366
|
-
const a = [];
|
|
367
|
-
for (let s = 0; s < e.length; s++)
|
|
368
|
-
a.push(...Object.keys(fe(e[s])));
|
|
369
|
-
return [...new Set(a)];
|
|
370
|
-
}
|
|
371
|
-
}, Et);
|
|
362
|
+
Ct
|
|
363
|
+
);
|
|
372
364
|
const n = {}, r = /* @__PURE__ */ Object.create(null);
|
|
373
365
|
for (let a = e.length - 1; a >= 0; a--) {
|
|
374
366
|
const s = e[a];
|
|
375
|
-
if (!s)
|
|
376
|
-
continue;
|
|
367
|
+
if (!s) continue;
|
|
377
368
|
const c = Object.getOwnPropertyNames(s);
|
|
378
369
|
for (let l = c.length - 1; l >= 0; l--) {
|
|
379
370
|
const u = c[l];
|
|
380
|
-
if (u === "__proto__" || u === "constructor")
|
|
381
|
-
continue;
|
|
371
|
+
if (u === "__proto__" || u === "constructor") continue;
|
|
382
372
|
const h = Object.getOwnPropertyDescriptor(s, u);
|
|
383
373
|
if (!r[u])
|
|
384
374
|
r[u] = h.get ? {
|
|
385
375
|
enumerable: !0,
|
|
386
376
|
configurable: !0,
|
|
387
|
-
get:
|
|
377
|
+
get: Lt.bind(n[u] = [h.get.bind(s)])
|
|
388
378
|
} : h.value !== void 0 ? h : void 0;
|
|
389
379
|
else {
|
|
390
380
|
const p = n[u];
|
|
@@ -399,25 +389,32 @@ function Ct(...e) {
|
|
|
399
389
|
}
|
|
400
390
|
return o;
|
|
401
391
|
}
|
|
402
|
-
const
|
|
403
|
-
function
|
|
392
|
+
const xt = (e) => `Stale read from <${e}>.`;
|
|
393
|
+
function D(e) {
|
|
404
394
|
const t = e.keyed, n = E(() => e.when, void 0, {
|
|
405
395
|
equals: (r, o) => t ? r === o : !r == !o
|
|
406
396
|
});
|
|
407
|
-
return E(
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
397
|
+
return E(
|
|
398
|
+
() => {
|
|
399
|
+
const r = n();
|
|
400
|
+
if (r) {
|
|
401
|
+
const o = e.children;
|
|
402
|
+
return typeof o == "function" && o.length > 0 ? I(
|
|
403
|
+
() => o(
|
|
404
|
+
t ? r : () => {
|
|
405
|
+
if (!I(n)) throw xt("Show");
|
|
406
|
+
return e.when;
|
|
407
|
+
}
|
|
408
|
+
)
|
|
409
|
+
) : o;
|
|
410
|
+
}
|
|
411
|
+
return e.fallback;
|
|
412
|
+
},
|
|
413
|
+
void 0,
|
|
414
|
+
void 0
|
|
415
|
+
);
|
|
419
416
|
}
|
|
420
|
-
function
|
|
417
|
+
function Ot(e, t, n) {
|
|
421
418
|
let r = n.length, o = t.length, i = r, a = 0, s = 0, c = t[o - 1].nextSibling, l = null;
|
|
422
419
|
for (; a < o || s < i; ) {
|
|
423
420
|
if (t[a] === n[s]) {
|
|
@@ -428,8 +425,7 @@ function Lt(e, t, n) {
|
|
|
428
425
|
o--, i--;
|
|
429
426
|
if (o === a) {
|
|
430
427
|
const u = i < r ? s ? n[s - 1].nextSibling : n[i - s] : c;
|
|
431
|
-
for (; s < i; )
|
|
432
|
-
e.insertBefore(n[s++], u);
|
|
428
|
+
for (; s < i; ) e.insertBefore(n[s++], u);
|
|
433
429
|
} else if (i === s)
|
|
434
430
|
for (; a < o; )
|
|
435
431
|
(!l || !l.has(t[a])) && t[a].remove(), a++;
|
|
@@ -440,8 +436,7 @@ function Lt(e, t, n) {
|
|
|
440
436
|
if (!l) {
|
|
441
437
|
l = /* @__PURE__ */ new Map();
|
|
442
438
|
let h = s;
|
|
443
|
-
for (; h < i; )
|
|
444
|
-
l.set(n[h], h++);
|
|
439
|
+
for (; h < i; ) l.set(n[h], h++);
|
|
445
440
|
}
|
|
446
441
|
const u = l.get(t[a]);
|
|
447
442
|
if (u != null)
|
|
@@ -451,22 +446,18 @@ function Lt(e, t, n) {
|
|
|
451
446
|
p++;
|
|
452
447
|
if (p > u - s) {
|
|
453
448
|
const y = t[a];
|
|
454
|
-
for (; s < u; )
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
} else
|
|
459
|
-
a++;
|
|
460
|
-
else
|
|
461
|
-
t[a++].remove();
|
|
449
|
+
for (; s < u; ) e.insertBefore(n[s++], y);
|
|
450
|
+
} else e.replaceChild(n[s++], t[a++]);
|
|
451
|
+
} else a++;
|
|
452
|
+
else t[a++].remove();
|
|
462
453
|
}
|
|
463
454
|
}
|
|
464
455
|
}
|
|
465
|
-
const
|
|
466
|
-
function
|
|
456
|
+
const _e = "_$DX_DELEGATE";
|
|
457
|
+
function Re(e, t, n, r = {}) {
|
|
467
458
|
let o;
|
|
468
|
-
return
|
|
469
|
-
o = i, t === document ? e() :
|
|
459
|
+
return De((i) => {
|
|
460
|
+
o = i, t === document ? e() : P(t, e(), t.firstChild ? null : void 0, n);
|
|
470
461
|
}, r.owner), () => {
|
|
471
462
|
o(), t.textContent = "";
|
|
472
463
|
};
|
|
@@ -479,28 +470,27 @@ function C(e, t, n) {
|
|
|
479
470
|
}, i = () => (r || (r = o())).cloneNode(!0);
|
|
480
471
|
return i.cloneNode = i, i;
|
|
481
472
|
}
|
|
482
|
-
function
|
|
483
|
-
const n = t[
|
|
473
|
+
function ie(e, t = window.document) {
|
|
474
|
+
const n = t[_e] || (t[_e] = /* @__PURE__ */ new Set());
|
|
484
475
|
for (let r = 0, o = e.length; r < o; r++) {
|
|
485
476
|
const i = e[r];
|
|
486
|
-
n.has(i) || (n.add(i), t.addEventListener(i,
|
|
477
|
+
n.has(i) || (n.add(i), t.addEventListener(i, It));
|
|
487
478
|
}
|
|
488
479
|
}
|
|
489
|
-
function
|
|
480
|
+
function ae(e, t, n) {
|
|
490
481
|
n == null ? e.removeAttribute(t) : e.setAttribute(t, n);
|
|
491
482
|
}
|
|
492
|
-
function
|
|
483
|
+
function Ye(e, t) {
|
|
493
484
|
t == null ? e.removeAttribute("class") : e.className = t;
|
|
494
485
|
}
|
|
495
|
-
function
|
|
486
|
+
function _t(e, t, n) {
|
|
496
487
|
return I(() => e(t, n));
|
|
497
488
|
}
|
|
498
|
-
function
|
|
499
|
-
if (n !== void 0 && !r && (r = []), typeof t != "function")
|
|
500
|
-
|
|
501
|
-
O((o) => ne(e, t(), o, n), r);
|
|
489
|
+
function P(e, t, n, r) {
|
|
490
|
+
if (n !== void 0 && !r && (r = []), typeof t != "function") return re(e, t, r, n);
|
|
491
|
+
_((o) => re(e, t(), o, n), r);
|
|
502
492
|
}
|
|
503
|
-
function
|
|
493
|
+
function It(e) {
|
|
504
494
|
const t = `$$${e.type}`;
|
|
505
495
|
let n = e.composedPath && e.composedPath()[0] || e.target;
|
|
506
496
|
for (e.target !== n && Object.defineProperty(e, "target", {
|
|
@@ -515,88 +505,80 @@ function _t(e) {
|
|
|
515
505
|
const r = n[t];
|
|
516
506
|
if (r && !n.disabled) {
|
|
517
507
|
const o = n[`${t}Data`];
|
|
518
|
-
if (o !== void 0 ? r.call(n, o, e) : r.call(n, e), e.cancelBubble)
|
|
519
|
-
return;
|
|
508
|
+
if (o !== void 0 ? r.call(n, o, e) : r.call(n, e), e.cancelBubble) return;
|
|
520
509
|
}
|
|
521
510
|
n = n._$host || n.parentNode || n.host;
|
|
522
511
|
}
|
|
523
512
|
}
|
|
524
|
-
function
|
|
525
|
-
for (; typeof n == "function"; )
|
|
526
|
-
|
|
527
|
-
if (t === n)
|
|
528
|
-
return n;
|
|
513
|
+
function re(e, t, n, r, o) {
|
|
514
|
+
for (; typeof n == "function"; ) n = n();
|
|
515
|
+
if (t === n) return n;
|
|
529
516
|
const i = typeof t, a = r !== void 0;
|
|
530
517
|
if (e = a && n[0] && n[0].parentNode || e, i === "string" || i === "number") {
|
|
531
518
|
if (i === "number" && (t = t.toString(), t === n))
|
|
532
519
|
return n;
|
|
533
520
|
if (a) {
|
|
534
521
|
let s = n[0];
|
|
535
|
-
s && s.nodeType === 3 ? s.data !== t && (s.data = t) : s = document.createTextNode(t), n =
|
|
522
|
+
s && s.nodeType === 3 ? s.data !== t && (s.data = t) : s = document.createTextNode(t), n = M(e, n, r, s);
|
|
536
523
|
} else
|
|
537
524
|
n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
|
|
538
525
|
} else if (t == null || i === "boolean")
|
|
539
|
-
n =
|
|
526
|
+
n = M(e, n, r);
|
|
540
527
|
else {
|
|
541
528
|
if (i === "function")
|
|
542
|
-
return
|
|
529
|
+
return _(() => {
|
|
543
530
|
let s = t();
|
|
544
|
-
for (; typeof s == "function"; )
|
|
545
|
-
|
|
546
|
-
n = ne(e, s, n, r);
|
|
531
|
+
for (; typeof s == "function"; ) s = s();
|
|
532
|
+
n = re(e, s, n, r);
|
|
547
533
|
}), () => n;
|
|
548
534
|
if (Array.isArray(t)) {
|
|
549
535
|
const s = [], c = n && Array.isArray(n);
|
|
550
|
-
if (
|
|
551
|
-
return
|
|
536
|
+
if (we(s, t, n, o))
|
|
537
|
+
return _(() => n = re(e, s, n, r, !0)), () => n;
|
|
552
538
|
if (s.length === 0) {
|
|
553
|
-
if (n =
|
|
554
|
-
|
|
555
|
-
} else
|
|
556
|
-
c ? n.length === 0 ? _e(e, s, r) : Lt(e, n, s) : (n && j(e), _e(e, s));
|
|
539
|
+
if (n = M(e, n, r), a) return n;
|
|
540
|
+
} else c ? n.length === 0 ? Ie(e, s, r) : Ot(e, n, s) : (n && M(e), Ie(e, s));
|
|
557
541
|
n = s;
|
|
558
542
|
} else if (t.nodeType) {
|
|
559
543
|
if (Array.isArray(n)) {
|
|
560
|
-
if (a)
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
} else
|
|
564
|
-
n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
|
|
544
|
+
if (a) return n = M(e, n, r, t);
|
|
545
|
+
M(e, n, null, t);
|
|
546
|
+
} else n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
|
|
565
547
|
n = t;
|
|
566
548
|
}
|
|
567
549
|
}
|
|
568
550
|
return n;
|
|
569
551
|
}
|
|
570
|
-
function
|
|
552
|
+
function we(e, t, n, r) {
|
|
571
553
|
let o = !1;
|
|
572
554
|
for (let i = 0, a = t.length; i < a; i++) {
|
|
573
555
|
let s = t[i], c = n && n[e.length], l;
|
|
574
|
-
if (!(s == null || s === !0 || s === !1))
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
else
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
556
|
+
if (!(s == null || s === !0 || s === !1)) if ((l = typeof s) == "object" && s.nodeType)
|
|
557
|
+
e.push(s);
|
|
558
|
+
else if (Array.isArray(s))
|
|
559
|
+
o = we(e, s, c) || o;
|
|
560
|
+
else if (l === "function")
|
|
561
|
+
if (r) {
|
|
562
|
+
for (; typeof s == "function"; ) s = s();
|
|
563
|
+
o = we(
|
|
564
|
+
e,
|
|
565
|
+
Array.isArray(s) ? s : [s],
|
|
566
|
+
Array.isArray(c) ? c : [c]
|
|
567
|
+
) || o;
|
|
568
|
+
} else
|
|
569
|
+
e.push(s), o = !0;
|
|
570
|
+
else {
|
|
571
|
+
const u = String(s);
|
|
572
|
+
c && c.nodeType === 3 && c.data === u ? e.push(c) : e.push(document.createTextNode(u));
|
|
573
|
+
}
|
|
590
574
|
}
|
|
591
575
|
return o;
|
|
592
576
|
}
|
|
593
|
-
function
|
|
594
|
-
for (let r = 0, o = t.length; r < o; r++)
|
|
595
|
-
e.insertBefore(t[r], n);
|
|
577
|
+
function Ie(e, t, n = null) {
|
|
578
|
+
for (let r = 0, o = t.length; r < o; r++) e.insertBefore(t[r], n);
|
|
596
579
|
}
|
|
597
|
-
function
|
|
598
|
-
if (n === void 0)
|
|
599
|
-
return e.textContent = "";
|
|
580
|
+
function M(e, t, n, r) {
|
|
581
|
+
if (n === void 0) return e.textContent = "";
|
|
600
582
|
const o = r || document.createTextNode("");
|
|
601
583
|
if (t.length) {
|
|
602
584
|
let i = !1;
|
|
@@ -605,71 +587,67 @@ function j(e, t, n, r) {
|
|
|
605
587
|
if (o !== s) {
|
|
606
588
|
const c = s.parentNode === e;
|
|
607
589
|
!i && !a ? c ? e.replaceChild(o, s) : e.insertBefore(o, n) : c && s.remove();
|
|
608
|
-
} else
|
|
609
|
-
i = !0;
|
|
590
|
+
} else i = !0;
|
|
610
591
|
}
|
|
611
|
-
} else
|
|
612
|
-
e.insertBefore(o, n);
|
|
592
|
+
} else e.insertBefore(o, n);
|
|
613
593
|
return [o];
|
|
614
594
|
}
|
|
615
|
-
const
|
|
616
|
-
function
|
|
595
|
+
const Ut = !1;
|
|
596
|
+
function ve(e) {
|
|
617
597
|
return e.varName ? ` for '${e.varName}'` : "";
|
|
618
598
|
}
|
|
619
|
-
function
|
|
599
|
+
function kt(e) {
|
|
620
600
|
return (
|
|
621
601
|
// use type coercion to parse the _entirety_ of the string (`parseFloat` alone does not do this)...
|
|
622
602
|
!isNaN(e) && !isNaN(parseFloat(e))
|
|
623
603
|
);
|
|
624
604
|
}
|
|
625
|
-
function
|
|
605
|
+
function Tt(e, t = {}) {
|
|
626
606
|
if (e == null || e === "" && !t.allowEmpty)
|
|
627
|
-
throw new Error(`Missing string value${
|
|
607
|
+
throw new Error(`Missing string value${ve(t)}`);
|
|
628
608
|
return typeof e == "string" ? e : e.toString();
|
|
629
609
|
}
|
|
630
610
|
function W(e, t = {}) {
|
|
631
|
-
return e == null || e === "" && !t.allowEmpty ? void 0 :
|
|
611
|
+
return e == null || e === "" && !t.allowEmpty ? void 0 : Tt(e, t);
|
|
632
612
|
}
|
|
633
|
-
function
|
|
613
|
+
function Nt(e, t = {}) {
|
|
634
614
|
if (typeof e == "number")
|
|
635
615
|
return e;
|
|
636
616
|
if (e == null)
|
|
637
|
-
throw new Error(`Missing number value${
|
|
638
|
-
if (typeof e == "string" &&
|
|
617
|
+
throw new Error(`Missing number value${ve(t)}`);
|
|
618
|
+
if (typeof e == "string" && kt(e))
|
|
639
619
|
return Number(e);
|
|
640
|
-
throw new Error(`Cannot convert to number the value of type '${typeof e}'${
|
|
620
|
+
throw new Error(`Cannot convert to number the value of type '${typeof e}'${ve(t)}`);
|
|
641
621
|
}
|
|
642
|
-
function
|
|
643
|
-
return e == null ? void 0 :
|
|
622
|
+
function Y(e, t = {}) {
|
|
623
|
+
return e == null ? void 0 : Nt(e, t);
|
|
644
624
|
}
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
if (n.status !== 200)
|
|
650
|
-
throw new Error(`api error ${n.status}`);
|
|
625
|
+
const Ue = W(void 0, { varName: "VITE_API_PORT" }), Ze = Ue ? `//${document.location.hostname}:${Ue}/api/plugin/content-loading` : `//${document.location.host}/api/plugin/content-loading`, ze = "/assets/plugin/content-loading/0.1.2";
|
|
626
|
+
async function Ft(e) {
|
|
627
|
+
const t = `${Ze}${e}`, n = await fetch(t);
|
|
628
|
+
if (n.status !== 200) throw new Error(`api error ${n.status}`);
|
|
651
629
|
return await n.text();
|
|
652
630
|
}
|
|
653
|
-
var
|
|
654
|
-
function
|
|
631
|
+
var et = (e) => e != null && (e = Object.getPrototypeOf(e), e === Array.prototype || e === Object.prototype);
|
|
632
|
+
function tt(e, t, n) {
|
|
655
633
|
for (const [r, o] of Object.entries(t)) {
|
|
656
634
|
const i = `${n}.${r}`;
|
|
657
|
-
e[i] = o,
|
|
635
|
+
e[i] = o, et(o) && tt(e, o, i);
|
|
658
636
|
}
|
|
659
637
|
}
|
|
660
|
-
function
|
|
638
|
+
function jt(e) {
|
|
661
639
|
const t = { ...e };
|
|
662
640
|
for (const [n, r] of Object.entries(e))
|
|
663
|
-
|
|
641
|
+
et(r) && tt(t, r, n);
|
|
664
642
|
return t;
|
|
665
643
|
}
|
|
666
|
-
var
|
|
644
|
+
var Bt = (e, t) => {
|
|
667
645
|
if (t)
|
|
668
646
|
for (const [n, r] of Object.entries(t))
|
|
669
647
|
e = e.replace(new RegExp(`{{\\s*${n}\\s*}}`, "g"), r);
|
|
670
648
|
return e;
|
|
671
|
-
},
|
|
672
|
-
function
|
|
649
|
+
}, Mt = (e) => e;
|
|
650
|
+
function Dt(e, t = Mt) {
|
|
673
651
|
return (n, ...r) => {
|
|
674
652
|
n[0] === "." && (n = n.slice(1));
|
|
675
653
|
const o = e()?.[n];
|
|
@@ -683,39 +661,38 @@ function Mt(e, t = Bt) {
|
|
|
683
661
|
}
|
|
684
662
|
};
|
|
685
663
|
}
|
|
686
|
-
const
|
|
664
|
+
const qt = {
|
|
687
665
|
nothingGet: "No results found for",
|
|
688
666
|
search: "Search"
|
|
689
|
-
}, qt = {
|
|
690
|
-
loadMore: "Load more"
|
|
691
667
|
}, Vt = {
|
|
692
|
-
|
|
693
|
-
infiniteLoading: qt
|
|
668
|
+
loadMore: "Load more"
|
|
694
669
|
}, Wt = {
|
|
670
|
+
searchApp: qt,
|
|
671
|
+
infiniteLoading: Vt
|
|
672
|
+
}, Gt = {
|
|
695
673
|
nothingGet: "Aucun résultat trouvé pour",
|
|
696
674
|
search: "Rechercher"
|
|
697
|
-
}, Gt = {
|
|
698
|
-
loadMore: "Charger la suite"
|
|
699
675
|
}, Kt = {
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
676
|
+
loadMore: "Charger la suite"
|
|
677
|
+
}, Ht = {
|
|
678
|
+
searchApp: Gt,
|
|
679
|
+
infiniteLoading: Kt
|
|
680
|
+
}, ke = { en: Wt, fr: Ht };
|
|
681
|
+
function le(e) {
|
|
704
682
|
const t = E(() => {
|
|
705
|
-
const r = e in
|
|
706
|
-
return
|
|
683
|
+
const r = e in ke ? e : "en";
|
|
684
|
+
return jt(ke[r]);
|
|
707
685
|
});
|
|
708
|
-
return { t:
|
|
686
|
+
return { t: Dt(t, Bt) };
|
|
709
687
|
}
|
|
710
|
-
var
|
|
711
|
-
function
|
|
688
|
+
var Xt = /* @__PURE__ */ C("<button class=InfiniteLoading-btn type=button>"), Qt = /* @__PURE__ */ C("<div class=InfiniteLoading-actionArea>"), Jt = /* @__PURE__ */ C("<img class=InfiniteLoading-spinner width=50 height=50 alt=…>");
|
|
689
|
+
function Yt(e, {
|
|
712
690
|
language: t
|
|
713
691
|
}) {
|
|
714
|
-
const n =
|
|
692
|
+
const n = Y(e.dataset.start), r = Y(e.dataset.total), o = Y(e.dataset.limit), i = W(e.dataset.parentId), a = W(e.dataset.template), s = W(e.dataset.labeledById);
|
|
715
693
|
if (!(n === void 0 || r === void 0 || i === void 0 || o === void 0 || a === void 0)) {
|
|
716
|
-
if (!t)
|
|
717
|
-
|
|
718
|
-
Yt({
|
|
694
|
+
if (!t) throw new Error("Missing language");
|
|
695
|
+
Zt({
|
|
719
696
|
language: t,
|
|
720
697
|
limit: o,
|
|
721
698
|
parentId: i,
|
|
@@ -727,7 +704,7 @@ function Jt(e, {
|
|
|
727
704
|
});
|
|
728
705
|
}
|
|
729
706
|
}
|
|
730
|
-
function
|
|
707
|
+
function Zt({
|
|
731
708
|
language: e,
|
|
732
709
|
limit: t,
|
|
733
710
|
root: n,
|
|
@@ -739,24 +716,23 @@ function Yt({
|
|
|
739
716
|
}) {
|
|
740
717
|
const {
|
|
741
718
|
t: c
|
|
742
|
-
} =
|
|
719
|
+
} = le(e);
|
|
743
720
|
let l = r;
|
|
744
|
-
if (l >= o)
|
|
745
|
-
return;
|
|
721
|
+
if (l >= o) return;
|
|
746
722
|
const u = (() => {
|
|
747
|
-
var y = Ht();
|
|
748
|
-
return y.$$click = m, L(y, () => c("infiniteLoading.loadMore")), y;
|
|
749
|
-
})(), h = (() => {
|
|
750
723
|
var y = Xt();
|
|
751
|
-
return
|
|
752
|
-
})(),
|
|
724
|
+
return y.$$click = m, P(y, () => c("infiniteLoading.loadMore")), y;
|
|
725
|
+
})(), h = (() => {
|
|
753
726
|
var y = Qt();
|
|
754
|
-
return
|
|
727
|
+
return P(y, u), y;
|
|
728
|
+
})(), p = (() => {
|
|
729
|
+
var y = Jt();
|
|
730
|
+
return ae(y, "src", `${ze}/spinner.svg`), y;
|
|
755
731
|
})();
|
|
756
732
|
n.appendChild(h);
|
|
757
733
|
async function m() {
|
|
758
734
|
n.appendChild(p);
|
|
759
|
-
const y = await
|
|
735
|
+
const y = await zt({
|
|
760
736
|
limit: t,
|
|
761
737
|
newStart: l,
|
|
762
738
|
parentId: i,
|
|
@@ -768,18 +744,18 @@ function Yt({
|
|
|
768
744
|
l += t, l >= o && h.remove(), p.remove();
|
|
769
745
|
}
|
|
770
746
|
}
|
|
771
|
-
async function
|
|
747
|
+
async function zt({
|
|
772
748
|
limit: e,
|
|
773
749
|
newStart: t,
|
|
774
750
|
parentId: n,
|
|
775
751
|
templateName: r,
|
|
776
752
|
labeledById: o
|
|
777
753
|
}) {
|
|
778
|
-
const i = o ? `?labeled=${encodeURIComponent(o)}` : "", a = `/partials?templateName=${encodeURIComponent(r)}&children-of=${encodeURIComponent(n)}&start=${encodeURIComponent(t)}&limit=${encodeURIComponent(e)}${i}`, s = await
|
|
754
|
+
const i = o ? `?labeled=${encodeURIComponent(o)}` : "", a = `/partials?templateName=${encodeURIComponent(r)}&children-of=${encodeURIComponent(n)}&start=${encodeURIComponent(t)}&limit=${encodeURIComponent(e)}${i}`, s = await Ft(a), c = document.createElement("div");
|
|
779
755
|
return c.innerHTML = s, [...c.children];
|
|
780
756
|
}
|
|
781
|
-
|
|
782
|
-
function
|
|
757
|
+
ie(["click"]);
|
|
758
|
+
function nt() {
|
|
783
759
|
let e = /* @__PURE__ */ new Set();
|
|
784
760
|
function t(o) {
|
|
785
761
|
return e.add(o), () => e.delete(o);
|
|
@@ -809,23 +785,23 @@ function et() {
|
|
|
809
785
|
confirm: r
|
|
810
786
|
};
|
|
811
787
|
}
|
|
812
|
-
let
|
|
813
|
-
function
|
|
814
|
-
(!window.history.state || window.history.state._depth == null) && window.history.replaceState({ ...window.history.state, _depth: window.history.length - 1 }, ""),
|
|
788
|
+
let be;
|
|
789
|
+
function Ce() {
|
|
790
|
+
(!window.history.state || window.history.state._depth == null) && window.history.replaceState({ ...window.history.state, _depth: window.history.length - 1 }, ""), be = window.history.state._depth;
|
|
815
791
|
}
|
|
816
|
-
|
|
817
|
-
function
|
|
792
|
+
Ce();
|
|
793
|
+
function en(e) {
|
|
818
794
|
return {
|
|
819
795
|
...e,
|
|
820
796
|
_depth: window.history.state && window.history.state._depth
|
|
821
797
|
};
|
|
822
798
|
}
|
|
823
|
-
function
|
|
799
|
+
function tn(e, t) {
|
|
824
800
|
let n = !1;
|
|
825
801
|
return () => {
|
|
826
|
-
const r =
|
|
827
|
-
|
|
828
|
-
const o = r == null ? null :
|
|
802
|
+
const r = be;
|
|
803
|
+
Ce();
|
|
804
|
+
const o = r == null ? null : be - r;
|
|
829
805
|
if (n) {
|
|
830
806
|
n = !1;
|
|
831
807
|
return;
|
|
@@ -833,33 +809,33 @@ function en(e, t) {
|
|
|
833
809
|
o && t(o) ? (n = !0, window.history.go(-o)) : e();
|
|
834
810
|
};
|
|
835
811
|
}
|
|
836
|
-
const
|
|
812
|
+
const nn = /^(?:[a-z0-9]+:)?\/\//i, rn = /^\/+|(\/)\/+$/g, rt = "http://sr";
|
|
837
813
|
function G(e, t = !1) {
|
|
838
|
-
const n = e.replace(
|
|
814
|
+
const n = e.replace(rn, "$1");
|
|
839
815
|
return n ? t || /^[?#]/.test(n) ? n : "/" + n : "";
|
|
840
816
|
}
|
|
841
|
-
function
|
|
842
|
-
if (
|
|
817
|
+
function Z(e, t, n) {
|
|
818
|
+
if (nn.test(t))
|
|
843
819
|
return;
|
|
844
820
|
const r = G(e), o = n && G(n);
|
|
845
821
|
let i = "";
|
|
846
822
|
return !o || t.startsWith("/") ? i = r : o.toLowerCase().indexOf(r.toLowerCase()) !== 0 ? i = r + o : i = o, (i || "/") + G(t, !i);
|
|
847
823
|
}
|
|
848
|
-
function
|
|
824
|
+
function on(e, t) {
|
|
849
825
|
if (e == null)
|
|
850
826
|
throw new Error(t);
|
|
851
827
|
return e;
|
|
852
828
|
}
|
|
853
|
-
function
|
|
829
|
+
function sn(e, t) {
|
|
854
830
|
return G(e).replace(/\/*(\*.*)?$/g, "") + G(t);
|
|
855
831
|
}
|
|
856
|
-
function
|
|
832
|
+
function ot(e) {
|
|
857
833
|
const t = {};
|
|
858
834
|
return e.searchParams.forEach((n, r) => {
|
|
859
835
|
t[r] = n;
|
|
860
836
|
}), t;
|
|
861
837
|
}
|
|
862
|
-
function
|
|
838
|
+
function an(e, t, n) {
|
|
863
839
|
const [r, o] = e.split("/*", 2), i = r.split("/").filter(Boolean), a = i.length;
|
|
864
840
|
return (s) => {
|
|
865
841
|
const c = s.split("/").filter(Boolean), l = c.length - a;
|
|
@@ -871,15 +847,15 @@ function sn(e, t, n) {
|
|
|
871
847
|
}, h = (p) => n === void 0 ? void 0 : n[p];
|
|
872
848
|
for (let p = 0; p < a; p++) {
|
|
873
849
|
const m = i[p], y = c[p], f = m[0] === ":", d = f ? m.slice(1) : m;
|
|
874
|
-
if (f &&
|
|
850
|
+
if (f && de(y, h(d)))
|
|
875
851
|
u.params[d] = y;
|
|
876
|
-
else if (f || !
|
|
852
|
+
else if (f || !de(y, m))
|
|
877
853
|
return null;
|
|
878
854
|
u.path += `/${y}`;
|
|
879
855
|
}
|
|
880
856
|
if (o) {
|
|
881
857
|
const p = l ? c.slice(-l).join("/") : "";
|
|
882
|
-
if (
|
|
858
|
+
if (de(p, h(o)))
|
|
883
859
|
u.params[o] = p;
|
|
884
860
|
else
|
|
885
861
|
return null;
|
|
@@ -887,19 +863,19 @@ function sn(e, t, n) {
|
|
|
887
863
|
return u;
|
|
888
864
|
};
|
|
889
865
|
}
|
|
890
|
-
function
|
|
866
|
+
function de(e, t) {
|
|
891
867
|
const n = (r) => r.localeCompare(e, void 0, { sensitivity: "base" }) === 0;
|
|
892
868
|
return t === void 0 ? !0 : typeof t == "string" ? n(t) : typeof t == "function" ? t(e) : Array.isArray(t) ? t.some(n) : t instanceof RegExp ? t.test(e) : !1;
|
|
893
869
|
}
|
|
894
|
-
function
|
|
870
|
+
function ln(e) {
|
|
895
871
|
const [t, n] = e.pattern.split("/*", 2), r = t.split("/").filter(Boolean);
|
|
896
872
|
return r.reduce((o, i) => o + (i.startsWith(":") ? 2 : 3), r.length - (n === void 0 ? 0 : 1));
|
|
897
873
|
}
|
|
898
|
-
function
|
|
899
|
-
const t = /* @__PURE__ */ new Map(), n =
|
|
874
|
+
function st(e) {
|
|
875
|
+
const t = /* @__PURE__ */ new Map(), n = Ve();
|
|
900
876
|
return new Proxy({}, {
|
|
901
877
|
get(r, o) {
|
|
902
|
-
return t.has(o) ||
|
|
878
|
+
return t.has(o) || We(n, () => t.set(o, E(() => e()[o]))), t.get(o)();
|
|
903
879
|
},
|
|
904
880
|
getOwnPropertyDescriptor() {
|
|
905
881
|
return {
|
|
@@ -912,7 +888,7 @@ function rt(e) {
|
|
|
912
888
|
}
|
|
913
889
|
});
|
|
914
890
|
}
|
|
915
|
-
function
|
|
891
|
+
function it(e) {
|
|
916
892
|
let t = /(\/?\:[^\/]+)\?/.exec(e);
|
|
917
893
|
if (!t)
|
|
918
894
|
return [e];
|
|
@@ -920,34 +896,34 @@ function ot(e) {
|
|
|
920
896
|
const o = [n, n += t[1]];
|
|
921
897
|
for (; t = /^(\/\:[^\/]+)\?/.exec(r); )
|
|
922
898
|
o.push(n += t[1]), r = r.slice(t[0].length);
|
|
923
|
-
return
|
|
899
|
+
return it(r).reduce((i, a) => [...i, ...o.map((s) => s + a)], []);
|
|
924
900
|
}
|
|
925
|
-
const
|
|
926
|
-
function
|
|
901
|
+
const cn = 100, at = Ge(), lt = Ge(), Le = () => on(Ke(at), "<A> and 'use' router primitives can be only used inside a Route."), ct = () => Le().navigatorFactory(), un = () => Le().location, fn = () => Le().params;
|
|
902
|
+
function hn(e, t = "") {
|
|
927
903
|
const { component: n, preload: r, load: o, children: i, info: a } = e, s = !i || Array.isArray(i) && !i.length, c = {
|
|
928
904
|
key: e,
|
|
929
905
|
component: n,
|
|
930
906
|
preload: r || o,
|
|
931
907
|
info: a
|
|
932
908
|
};
|
|
933
|
-
return
|
|
934
|
-
for (const h of
|
|
935
|
-
const p =
|
|
909
|
+
return ut(e.path).reduce((l, u) => {
|
|
910
|
+
for (const h of it(u)) {
|
|
911
|
+
const p = sn(t, h);
|
|
936
912
|
let m = s ? p : p.split("/*", 1)[0];
|
|
937
913
|
m = m.split("/").map((y) => y.startsWith(":") || y.startsWith("*") ? y : encodeURIComponent(y)).join("/"), l.push({
|
|
938
914
|
...c,
|
|
939
915
|
originalPath: u,
|
|
940
916
|
pattern: m,
|
|
941
|
-
matcher:
|
|
917
|
+
matcher: an(m, !s, e.matchFilters)
|
|
942
918
|
});
|
|
943
919
|
}
|
|
944
920
|
return l;
|
|
945
921
|
}, []);
|
|
946
922
|
}
|
|
947
|
-
function
|
|
923
|
+
function dn(e, t = 0) {
|
|
948
924
|
return {
|
|
949
925
|
routes: e,
|
|
950
|
-
score:
|
|
926
|
+
score: ln(e[e.length - 1]) * 1e4 - t,
|
|
951
927
|
matcher(n) {
|
|
952
928
|
const r = [];
|
|
953
929
|
for (let o = e.length - 1; o >= 0; o--) {
|
|
@@ -963,23 +939,23 @@ function hn(e, t = 0) {
|
|
|
963
939
|
}
|
|
964
940
|
};
|
|
965
941
|
}
|
|
966
|
-
function
|
|
942
|
+
function ut(e) {
|
|
967
943
|
return Array.isArray(e) ? e : [e];
|
|
968
944
|
}
|
|
969
|
-
function
|
|
970
|
-
const o =
|
|
945
|
+
function ft(e, t = "", n = [], r = []) {
|
|
946
|
+
const o = ut(e);
|
|
971
947
|
for (let i = 0, a = o.length; i < a; i++) {
|
|
972
948
|
const s = o[i];
|
|
973
949
|
if (s && typeof s == "object") {
|
|
974
950
|
s.hasOwnProperty("path") || (s.path = "");
|
|
975
|
-
const c =
|
|
951
|
+
const c = hn(s, t);
|
|
976
952
|
for (const l of c) {
|
|
977
953
|
n.push(l);
|
|
978
954
|
const u = Array.isArray(s.children) && s.children.length === 0;
|
|
979
955
|
if (s.children && !u)
|
|
980
|
-
|
|
956
|
+
ft(s.children, l.pattern, n, r);
|
|
981
957
|
else {
|
|
982
|
-
const h =
|
|
958
|
+
const h = dn([...n], r.length);
|
|
983
959
|
r.push(h);
|
|
984
960
|
}
|
|
985
961
|
n.pop();
|
|
@@ -988,7 +964,7 @@ function ct(e, t = "", n = [], r = []) {
|
|
|
988
964
|
}
|
|
989
965
|
return n.length ? r : r.sort((i, a) => a.score - i.score);
|
|
990
966
|
}
|
|
991
|
-
function
|
|
967
|
+
function pe(e, t) {
|
|
992
968
|
for (let n = 0, r = e.length; n < r; n++) {
|
|
993
969
|
const o = e[n].matcher(t);
|
|
994
970
|
if (o)
|
|
@@ -996,8 +972,8 @@ function de(e, t) {
|
|
|
996
972
|
}
|
|
997
973
|
return [];
|
|
998
974
|
}
|
|
999
|
-
function
|
|
1000
|
-
const n = new URL(
|
|
975
|
+
function pn(e, t) {
|
|
976
|
+
const n = new URL(rt), r = E((c) => {
|
|
1001
977
|
const l = e();
|
|
1002
978
|
try {
|
|
1003
979
|
return new URL(l, n);
|
|
@@ -1023,116 +999,118 @@ function dn(e, t) {
|
|
|
1023
999
|
get key() {
|
|
1024
1000
|
return s();
|
|
1025
1001
|
},
|
|
1026
|
-
query:
|
|
1002
|
+
query: st(K(i, () => ot(r())))
|
|
1027
1003
|
};
|
|
1028
1004
|
}
|
|
1029
|
-
let
|
|
1030
|
-
function
|
|
1031
|
-
return
|
|
1005
|
+
let j;
|
|
1006
|
+
function gn() {
|
|
1007
|
+
return j;
|
|
1032
1008
|
}
|
|
1033
|
-
function
|
|
1034
|
-
const { signal: [o, i], utils: a = {} } = e, s = a.parsePath || ((v) => v), c = a.renderPath || ((v) => v), l = a.beforeLeave ||
|
|
1009
|
+
function mn(e, t, n, r = {}) {
|
|
1010
|
+
const { signal: [o, i], utils: a = {} } = e, s = a.parsePath || ((v) => v), c = a.renderPath || ((v) => v), l = a.beforeLeave || nt(), u = Z("", r.base || "");
|
|
1035
1011
|
if (u === void 0)
|
|
1036
1012
|
throw new Error(`${u} is not a valid base path`);
|
|
1037
1013
|
u && !o().value && i({ value: u, replace: !0, scroll: !1 });
|
|
1038
1014
|
const [h, p] = x(!1);
|
|
1039
1015
|
let m;
|
|
1040
1016
|
const y = (v, $) => {
|
|
1041
|
-
$.value === f() && $.state === S() || (m === void 0 && p(!0),
|
|
1017
|
+
$.value === f() && $.state === S() || (m === void 0 && p(!0), j = v, m = $, bt(() => {
|
|
1042
1018
|
m === $ && (d(m.value), g(m.state), F[1]([]));
|
|
1043
1019
|
}).finally(() => {
|
|
1044
|
-
m === $ &&
|
|
1045
|
-
|
|
1020
|
+
m === $ && vt(() => {
|
|
1021
|
+
j = void 0, v === "navigate" && gt(m), p(!1), m = void 0;
|
|
1046
1022
|
});
|
|
1047
1023
|
}));
|
|
1048
|
-
}, [f, d] = x(o().value), [S, g] = x(o().state), U =
|
|
1049
|
-
const v =
|
|
1050
|
-
for (let
|
|
1051
|
-
Object.assign($, v[
|
|
1024
|
+
}, [f, d] = x(o().value), [S, g] = x(o().state), U = pn(f, S), L = [], F = x([]), q = E(() => typeof r.transformUrl == "function" ? pe(t(), r.transformUrl(U.pathname)) : pe(t(), U.pathname)), ht = st(() => {
|
|
1025
|
+
const v = q(), $ = {};
|
|
1026
|
+
for (let O = 0; O < v.length; O++)
|
|
1027
|
+
Object.assign($, v[O].params);
|
|
1052
1028
|
return $;
|
|
1053
1029
|
}), Pe = {
|
|
1054
1030
|
pattern: u,
|
|
1055
1031
|
path: () => u,
|
|
1056
1032
|
outlet: () => null,
|
|
1057
1033
|
resolvePath(v) {
|
|
1058
|
-
return
|
|
1034
|
+
return Z(u, v);
|
|
1059
1035
|
}
|
|
1060
1036
|
};
|
|
1061
|
-
return
|
|
1037
|
+
return _(K(o, (v) => y("native", v), { defer: !0 })), {
|
|
1062
1038
|
base: Pe,
|
|
1063
1039
|
location: U,
|
|
1064
|
-
params:
|
|
1040
|
+
params: ht,
|
|
1065
1041
|
isRouting: h,
|
|
1066
1042
|
renderPath: c,
|
|
1067
1043
|
parsePath: s,
|
|
1068
|
-
navigatorFactory:
|
|
1069
|
-
matches:
|
|
1044
|
+
navigatorFactory: pt,
|
|
1045
|
+
matches: q,
|
|
1070
1046
|
beforeLeave: l,
|
|
1071
|
-
preloadRoute:
|
|
1047
|
+
preloadRoute: mt,
|
|
1072
1048
|
singleFlight: r.singleFlight === void 0 ? !0 : r.singleFlight,
|
|
1073
1049
|
submissions: F
|
|
1074
1050
|
};
|
|
1075
|
-
function
|
|
1051
|
+
function dt(v, $, O) {
|
|
1076
1052
|
I(() => {
|
|
1077
1053
|
if (typeof $ == "number") {
|
|
1078
1054
|
$ && (a.go ? a.go($) : console.warn("Router integration does not support relative routing"));
|
|
1079
1055
|
return;
|
|
1080
1056
|
}
|
|
1081
|
-
const { replace:
|
|
1057
|
+
const X = !$ || $[0] === "?", { replace: ce, resolve: B, scroll: ue, state: V } = {
|
|
1082
1058
|
replace: !1,
|
|
1083
|
-
resolve: !
|
|
1059
|
+
resolve: !X,
|
|
1084
1060
|
scroll: !0,
|
|
1085
|
-
...
|
|
1086
|
-
}
|
|
1087
|
-
|
|
1061
|
+
...O
|
|
1062
|
+
};
|
|
1063
|
+
let xe;
|
|
1064
|
+
const Q = B ? v.resolvePath($) : Z(X && (xe = o().value) && xe.split("?")[0] || "", $);
|
|
1065
|
+
if (Q === void 0)
|
|
1088
1066
|
throw new Error(`Path '${$}' is not a routable path`);
|
|
1089
|
-
if (
|
|
1067
|
+
if (L.length >= cn)
|
|
1090
1068
|
throw new Error("Too many redirects");
|
|
1091
|
-
const
|
|
1092
|
-
(
|
|
1093
|
-
value:
|
|
1094
|
-
state:
|
|
1069
|
+
const Oe = f();
|
|
1070
|
+
(Q !== Oe || V !== S()) && (Ut || l.confirm(Q, O) && (L.push({ value: Oe, replace: ce, scroll: ue, state: S() }), y("navigate", {
|
|
1071
|
+
value: Q,
|
|
1072
|
+
state: V
|
|
1095
1073
|
})));
|
|
1096
1074
|
});
|
|
1097
1075
|
}
|
|
1098
|
-
function
|
|
1099
|
-
return v = v ||
|
|
1076
|
+
function pt(v) {
|
|
1077
|
+
return v = v || Ke(lt) || Pe, ($, O) => dt(v, $, O);
|
|
1100
1078
|
}
|
|
1101
|
-
function
|
|
1102
|
-
const $ =
|
|
1079
|
+
function gt(v) {
|
|
1080
|
+
const $ = L[0];
|
|
1103
1081
|
$ && (i({
|
|
1104
1082
|
...v,
|
|
1105
1083
|
replace: $.replace,
|
|
1106
1084
|
scroll: $.scroll
|
|
1107
|
-
}),
|
|
1085
|
+
}), L.length = 0);
|
|
1108
1086
|
}
|
|
1109
|
-
function
|
|
1110
|
-
const
|
|
1111
|
-
|
|
1112
|
-
for (let ce in
|
|
1113
|
-
const { route:
|
|
1114
|
-
|
|
1115
|
-
const { preload:
|
|
1116
|
-
$.preloadData &&
|
|
1117
|
-
params:
|
|
1087
|
+
function mt(v, $ = {}) {
|
|
1088
|
+
const O = pe(t(), v.pathname), X = j;
|
|
1089
|
+
j = "preload";
|
|
1090
|
+
for (let ce in O) {
|
|
1091
|
+
const { route: B, params: ue } = O[ce];
|
|
1092
|
+
B.component && B.component.preload && B.component.preload();
|
|
1093
|
+
const { preload: V } = B;
|
|
1094
|
+
$.preloadData && V && We(n(), () => V({
|
|
1095
|
+
params: ue,
|
|
1118
1096
|
location: {
|
|
1119
1097
|
pathname: v.pathname,
|
|
1120
1098
|
search: v.search,
|
|
1121
1099
|
hash: v.hash,
|
|
1122
|
-
query:
|
|
1100
|
+
query: ot(v),
|
|
1123
1101
|
state: null,
|
|
1124
1102
|
key: ""
|
|
1125
1103
|
},
|
|
1126
1104
|
intent: "preload"
|
|
1127
1105
|
}));
|
|
1128
1106
|
}
|
|
1129
|
-
|
|
1107
|
+
j = X;
|
|
1130
1108
|
}
|
|
1131
1109
|
}
|
|
1132
|
-
function
|
|
1110
|
+
function yn(e, t, n, r) {
|
|
1133
1111
|
const { base: o, location: i, params: a } = e, { pattern: s, component: c, preload: l } = r().route, u = E(() => r().path);
|
|
1134
1112
|
c && c.preload && c.preload();
|
|
1135
|
-
const h = l ? l({ params: a, location: i, intent:
|
|
1113
|
+
const h = l ? l({ params: a, location: i, intent: j || "initial" }) : void 0;
|
|
1136
1114
|
return {
|
|
1137
1115
|
parent: t,
|
|
1138
1116
|
pattern: s,
|
|
@@ -1146,24 +1124,24 @@ function mn(e, t, n, r) {
|
|
|
1146
1124
|
}
|
|
1147
1125
|
}) : n(),
|
|
1148
1126
|
resolvePath(m) {
|
|
1149
|
-
return
|
|
1127
|
+
return Z(o.path(), m, u());
|
|
1150
1128
|
}
|
|
1151
1129
|
};
|
|
1152
1130
|
}
|
|
1153
|
-
const
|
|
1131
|
+
const wn = (e) => (t) => {
|
|
1154
1132
|
const {
|
|
1155
1133
|
base: n
|
|
1156
|
-
} = t, r =
|
|
1134
|
+
} = t, r = $e(() => t.children), o = E(() => ft(r(), t.base || ""));
|
|
1157
1135
|
let i;
|
|
1158
|
-
const a =
|
|
1136
|
+
const a = mn(e, o, () => i, {
|
|
1159
1137
|
base: n,
|
|
1160
1138
|
singleFlight: t.singleFlight,
|
|
1161
1139
|
transformUrl: t.transformUrl
|
|
1162
1140
|
});
|
|
1163
|
-
return e.create && e.create(a), A(
|
|
1141
|
+
return e.create && e.create(a), A(at.Provider, {
|
|
1164
1142
|
value: a,
|
|
1165
1143
|
get children() {
|
|
1166
|
-
return A(
|
|
1144
|
+
return A(vn, {
|
|
1167
1145
|
routerState: a,
|
|
1168
1146
|
get root() {
|
|
1169
1147
|
return t.root;
|
|
@@ -1172,7 +1150,7 @@ const yn = (e) => (t) => {
|
|
|
1172
1150
|
return t.rootPreload || t.rootLoad;
|
|
1173
1151
|
},
|
|
1174
1152
|
get children() {
|
|
1175
|
-
return [E(() => (i =
|
|
1153
|
+
return [E(() => (i = Ve()) && null), A(bn, {
|
|
1176
1154
|
routerState: a,
|
|
1177
1155
|
get branches() {
|
|
1178
1156
|
return o();
|
|
@@ -1183,15 +1161,15 @@ const yn = (e) => (t) => {
|
|
|
1183
1161
|
}
|
|
1184
1162
|
});
|
|
1185
1163
|
};
|
|
1186
|
-
function
|
|
1164
|
+
function vn(e) {
|
|
1187
1165
|
const t = e.routerState.location, n = e.routerState.params, r = E(() => e.preload && I(() => {
|
|
1188
1166
|
e.preload({
|
|
1189
1167
|
params: n,
|
|
1190
1168
|
location: t,
|
|
1191
|
-
intent:
|
|
1169
|
+
intent: gn() || "initial"
|
|
1192
1170
|
});
|
|
1193
1171
|
}));
|
|
1194
|
-
return A(
|
|
1172
|
+
return A(D, {
|
|
1195
1173
|
get when() {
|
|
1196
1174
|
return e.root;
|
|
1197
1175
|
},
|
|
@@ -1211,7 +1189,7 @@ function wn(e) {
|
|
|
1211
1189
|
})
|
|
1212
1190
|
});
|
|
1213
1191
|
}
|
|
1214
|
-
function
|
|
1192
|
+
function bn(e) {
|
|
1215
1193
|
const t = [];
|
|
1216
1194
|
let n;
|
|
1217
1195
|
const r = E(K(e.routerState.matches, (o, i, a) => {
|
|
@@ -1219,37 +1197,37 @@ function vn(e) {
|
|
|
1219
1197
|
const c = [];
|
|
1220
1198
|
for (let l = 0, u = o.length; l < u; l++) {
|
|
1221
1199
|
const h = i && i[l], p = o[l];
|
|
1222
|
-
a && h && p.route.key === h.route.key ? c[l] = a[l] : (s = !1, t[l] && t[l](),
|
|
1223
|
-
t[l] = m, c[l] =
|
|
1200
|
+
a && h && p.route.key === h.route.key ? c[l] = a[l] : (s = !1, t[l] && t[l](), De((m) => {
|
|
1201
|
+
t[l] = m, c[l] = yn(e.routerState, c[l - 1] || e.routerState.base, Te(() => r()[l + 1]), () => e.routerState.matches()[l]);
|
|
1224
1202
|
}));
|
|
1225
1203
|
}
|
|
1226
1204
|
return t.splice(o.length).forEach((l) => l()), a && s ? a : (n = c[0], c);
|
|
1227
1205
|
}));
|
|
1228
|
-
return
|
|
1206
|
+
return Te(() => r() && n)();
|
|
1229
1207
|
}
|
|
1230
|
-
const
|
|
1208
|
+
const Te = (e) => () => A(D, {
|
|
1231
1209
|
get when() {
|
|
1232
1210
|
return e();
|
|
1233
1211
|
},
|
|
1234
1212
|
keyed: !0,
|
|
1235
|
-
children: (t) => A(
|
|
1213
|
+
children: (t) => A(lt.Provider, {
|
|
1236
1214
|
value: t,
|
|
1237
1215
|
get children() {
|
|
1238
1216
|
return t.outlet();
|
|
1239
1217
|
}
|
|
1240
1218
|
})
|
|
1241
|
-
}),
|
|
1242
|
-
const t =
|
|
1243
|
-
return
|
|
1219
|
+
}), ge = (e) => {
|
|
1220
|
+
const t = $e(() => e.children);
|
|
1221
|
+
return Pt(e, {
|
|
1244
1222
|
get children() {
|
|
1245
1223
|
return t();
|
|
1246
1224
|
}
|
|
1247
1225
|
});
|
|
1248
1226
|
};
|
|
1249
|
-
function
|
|
1227
|
+
function Sn([e, t], n, r) {
|
|
1250
1228
|
return [e, r ? (o) => t(r(o)) : t];
|
|
1251
1229
|
}
|
|
1252
|
-
function
|
|
1230
|
+
function $n(e) {
|
|
1253
1231
|
if (e === "#")
|
|
1254
1232
|
return null;
|
|
1255
1233
|
try {
|
|
@@ -1258,28 +1236,28 @@ function Sn(e) {
|
|
|
1258
1236
|
return null;
|
|
1259
1237
|
}
|
|
1260
1238
|
}
|
|
1261
|
-
function
|
|
1239
|
+
function An(e) {
|
|
1262
1240
|
let t = !1;
|
|
1263
|
-
const n = (o) => typeof o == "string" ? { value: o } : o, r =
|
|
1241
|
+
const n = (o) => typeof o == "string" ? { value: o } : o, r = Sn(x(n(e.get()), {
|
|
1264
1242
|
equals: (o, i) => o.value === i.value && o.state === i.state
|
|
1265
1243
|
}), void 0, (o) => (!t && e.set(o), o));
|
|
1266
|
-
return e.init &&
|
|
1244
|
+
return e.init && qe(e.init((o = e.get()) => {
|
|
1267
1245
|
t = !0, r[1](n(o)), t = !1;
|
|
1268
|
-
})),
|
|
1246
|
+
})), wn({
|
|
1269
1247
|
signal: r,
|
|
1270
1248
|
create: e.create,
|
|
1271
1249
|
utils: e.utils
|
|
1272
1250
|
});
|
|
1273
1251
|
}
|
|
1274
|
-
function
|
|
1252
|
+
function En(e, t, n) {
|
|
1275
1253
|
return e.addEventListener(t, n), () => e.removeEventListener(t, n);
|
|
1276
1254
|
}
|
|
1277
|
-
function
|
|
1278
|
-
const n =
|
|
1255
|
+
function Rn(e, t) {
|
|
1256
|
+
const n = $n(`#${e}`);
|
|
1279
1257
|
n ? n.scrollIntoView() : t && window.scrollTo(0, 0);
|
|
1280
1258
|
}
|
|
1281
|
-
const
|
|
1282
|
-
function
|
|
1259
|
+
const Cn = /* @__PURE__ */ new Map();
|
|
1260
|
+
function Ln(e = !0, t = !1, n = "/_server", r) {
|
|
1283
1261
|
return (o) => {
|
|
1284
1262
|
const i = o.base.path(), a = o.navigatorFactory(o.base);
|
|
1285
1263
|
let s = {};
|
|
@@ -1289,14 +1267,14 @@ function Cn(e = !0, t = !1, n = "/_server", r) {
|
|
|
1289
1267
|
function l(f) {
|
|
1290
1268
|
if (f.defaultPrevented || f.button !== 0 || f.metaKey || f.altKey || f.ctrlKey || f.shiftKey)
|
|
1291
1269
|
return;
|
|
1292
|
-
const d = f.composedPath().find((
|
|
1270
|
+
const d = f.composedPath().find((q) => q instanceof Node && q.nodeName.toUpperCase() === "A");
|
|
1293
1271
|
if (!d || t && !d.hasAttribute("link"))
|
|
1294
1272
|
return;
|
|
1295
1273
|
const S = c(d), g = S ? d.href.baseVal : d.href;
|
|
1296
1274
|
if ((S ? d.target.baseVal : d.target) || !g && !d.hasAttribute("state"))
|
|
1297
1275
|
return;
|
|
1298
|
-
const
|
|
1299
|
-
if (d.hasAttribute("download") ||
|
|
1276
|
+
const L = (d.getAttribute("rel") || "").split(/\s+/);
|
|
1277
|
+
if (d.hasAttribute("download") || L && L.includes("external"))
|
|
1300
1278
|
return;
|
|
1301
1279
|
const F = S ? new URL(g, document.baseURI) : new URL(g);
|
|
1302
1280
|
if (!(F.origin !== window.location.origin || i && F.pathname && !F.pathname.toLowerCase().startsWith(i.toLowerCase())))
|
|
@@ -1306,12 +1284,12 @@ function Cn(e = !0, t = !1, n = "/_server", r) {
|
|
|
1306
1284
|
const d = l(f);
|
|
1307
1285
|
if (!d)
|
|
1308
1286
|
return;
|
|
1309
|
-
const [S, g] = d, U = o.parsePath(g.pathname + g.search + g.hash),
|
|
1287
|
+
const [S, g] = d, U = o.parsePath(g.pathname + g.search + g.hash), L = S.getAttribute("state");
|
|
1310
1288
|
f.preventDefault(), a(U, {
|
|
1311
1289
|
resolve: !1,
|
|
1312
1290
|
replace: S.hasAttribute("replace"),
|
|
1313
1291
|
scroll: !S.hasAttribute("noscroll"),
|
|
1314
|
-
state:
|
|
1292
|
+
state: L && JSON.parse(L)
|
|
1315
1293
|
});
|
|
1316
1294
|
}
|
|
1317
1295
|
function h(f) {
|
|
@@ -1344,20 +1322,20 @@ function Cn(e = !0, t = !1, n = "/_server", r) {
|
|
|
1344
1322
|
if (!d)
|
|
1345
1323
|
return;
|
|
1346
1324
|
if (!d.startsWith("https://action/")) {
|
|
1347
|
-
const g = new URL(d,
|
|
1325
|
+
const g = new URL(d, rt);
|
|
1348
1326
|
if (d = o.parsePath(g.pathname + g.search), !d.startsWith(n))
|
|
1349
1327
|
return;
|
|
1350
1328
|
}
|
|
1351
1329
|
if (f.target.method.toUpperCase() !== "POST")
|
|
1352
1330
|
throw new Error("Only POST forms are supported for Actions");
|
|
1353
|
-
const S =
|
|
1331
|
+
const S = Cn.get(d);
|
|
1354
1332
|
if (S) {
|
|
1355
1333
|
f.preventDefault();
|
|
1356
1334
|
const g = new FormData(f.target, f.submitter);
|
|
1357
1335
|
S.call({ r: o, f: f.target }, f.target.enctype === "multipart/form-data" ? g : new URLSearchParams(g));
|
|
1358
1336
|
}
|
|
1359
1337
|
}
|
|
1360
|
-
|
|
1338
|
+
ie(["click", "submit"]), document.addEventListener("click", u), e && (document.addEventListener("mouseover", p), document.addEventListener("mouseout", m), document.addEventListener("focusin", h), document.addEventListener("touchstart", h)), document.addEventListener("submit", y), qe(() => {
|
|
1361
1339
|
document.removeEventListener("click", u), e && (document.removeEventListener("mouseover", p), document.removeEventListener("mouseout", m), document.removeEventListener("focusin", h), document.removeEventListener("touchstart", h)), document.removeEventListener("submit", y);
|
|
1362
1340
|
});
|
|
1363
1341
|
};
|
|
@@ -1370,17 +1348,17 @@ function Pn(e) {
|
|
|
1370
1348
|
}
|
|
1371
1349
|
return t;
|
|
1372
1350
|
}
|
|
1373
|
-
function
|
|
1374
|
-
const t = () => window.location.hash.slice(1), n =
|
|
1375
|
-
return
|
|
1351
|
+
function xn(e) {
|
|
1352
|
+
const t = () => window.location.hash.slice(1), n = nt();
|
|
1353
|
+
return An({
|
|
1376
1354
|
get: t,
|
|
1377
1355
|
set({ value: r, replace: o, scroll: i, state: a }) {
|
|
1378
|
-
o ? window.history.replaceState(
|
|
1356
|
+
o ? window.history.replaceState(en(a), "", "#" + r) : window.history.pushState(a, "", "#" + r);
|
|
1379
1357
|
const s = r.indexOf("#"), c = s >= 0 ? r.slice(s + 1) : "";
|
|
1380
|
-
|
|
1358
|
+
Rn(c, i), Ce();
|
|
1381
1359
|
},
|
|
1382
|
-
init: (r) =>
|
|
1383
|
-
create:
|
|
1360
|
+
init: (r) => En(window, "hashchange", tn(r, (o) => !n.confirm(o && o < 0 ? o : t()))),
|
|
1361
|
+
create: Ln(e.preload, e.explicitLinks, e.actionBase),
|
|
1384
1362
|
utils: {
|
|
1385
1363
|
go: (r) => window.history.go(r),
|
|
1386
1364
|
renderPath: (r) => `#${r}`,
|
|
@@ -1389,8 +1367,8 @@ function Ln(e) {
|
|
|
1389
1367
|
}
|
|
1390
1368
|
})(e);
|
|
1391
1369
|
}
|
|
1392
|
-
function
|
|
1393
|
-
const t =
|
|
1370
|
+
function On(e) {
|
|
1371
|
+
const t = ct(), n = un(), {
|
|
1394
1372
|
href: r,
|
|
1395
1373
|
state: o
|
|
1396
1374
|
} = e, i = typeof r == "function" ? r({
|
|
@@ -1403,14 +1381,14 @@ function xn(e) {
|
|
|
1403
1381
|
}), null;
|
|
1404
1382
|
}
|
|
1405
1383
|
const _n = {};
|
|
1406
|
-
async function
|
|
1384
|
+
async function Ne({
|
|
1407
1385
|
language: e,
|
|
1408
1386
|
text: t,
|
|
1409
1387
|
limit: n,
|
|
1410
1388
|
start: r,
|
|
1411
1389
|
templateName: o
|
|
1412
1390
|
}) {
|
|
1413
|
-
const i = `${
|
|
1391
|
+
const i = `${Ze}/search?language=${encodeURIComponent(
|
|
1414
1392
|
e
|
|
1415
1393
|
)}&q=${encodeURIComponent(t)}&limit=${encodeURIComponent(
|
|
1416
1394
|
n
|
|
@@ -1423,53 +1401,52 @@ async function ke({
|
|
|
1423
1401
|
}
|
|
1424
1402
|
return await a.json();
|
|
1425
1403
|
}
|
|
1426
|
-
const
|
|
1427
|
-
SearchForm:
|
|
1404
|
+
const In = "_SearchForm_1a5n6_1", Un = {
|
|
1405
|
+
SearchForm: In
|
|
1428
1406
|
};
|
|
1429
|
-
var
|
|
1430
|
-
const
|
|
1431
|
-
const t =
|
|
1407
|
+
var kn = /* @__PURE__ */ C("<form><input type=search><button type=submit>");
|
|
1408
|
+
const Tn = (e) => {
|
|
1409
|
+
const t = ct(), [n, r] = x(e.value ?? ""), {
|
|
1432
1410
|
t: o
|
|
1433
|
-
} =
|
|
1434
|
-
|
|
1411
|
+
} = le(e.language);
|
|
1412
|
+
Se(K(() => e.value, () => r(e.value ?? "")));
|
|
1435
1413
|
const i = async (a) => {
|
|
1436
1414
|
a.preventDefault(), t(`/q/${encodeURIComponent(n())}`);
|
|
1437
1415
|
};
|
|
1438
1416
|
return (() => {
|
|
1439
|
-
var a =
|
|
1440
|
-
return a.addEventListener("submit", i), s.addEventListener("change", (l) => r(l.currentTarget.value)),
|
|
1441
|
-
var u =
|
|
1442
|
-
return u !== l.e &&
|
|
1417
|
+
var a = kn(), s = a.firstChild, c = s.nextSibling;
|
|
1418
|
+
return a.addEventListener("submit", i), s.addEventListener("change", (l) => r(l.currentTarget.value)), P(c, () => o("searchApp.search")), _((l) => {
|
|
1419
|
+
var u = Un.SearchForm, h = o("searchApp.search");
|
|
1420
|
+
return u !== l.e && Ye(a, l.e = u), h !== l.t && ae(s, "placeholder", l.t = h), l;
|
|
1443
1421
|
}, {
|
|
1444
1422
|
e: void 0,
|
|
1445
1423
|
t: void 0
|
|
1446
|
-
}),
|
|
1424
|
+
}), _(() => s.value = n()), a;
|
|
1447
1425
|
})();
|
|
1448
1426
|
};
|
|
1449
|
-
var
|
|
1450
|
-
function
|
|
1427
|
+
var Nn = /* @__PURE__ */ C("<div class=SearchPageResponse>"), Fe = /* @__PURE__ */ C("<div>"), Fn = /* @__PURE__ */ C("<img class=SearchPageResponse-spinner width=80 height=80 alt=…>"), jn = /* @__PURE__ */ C("<button type=button>"), Bn = /* @__PURE__ */ C("<div class=SearchPageResponse-noResultMessage> <span>");
|
|
1428
|
+
function je({
|
|
1451
1429
|
language: e,
|
|
1452
1430
|
limit: t,
|
|
1453
1431
|
templateName: n
|
|
1454
1432
|
}) {
|
|
1455
1433
|
const {
|
|
1456
1434
|
t: r
|
|
1457
|
-
} =
|
|
1458
|
-
|
|
1435
|
+
} = le(e), o = fn(), [i, a] = x(""), [s, c] = x(0), [l, u] = x(0), [h, p] = x(!1);
|
|
1436
|
+
Se(K(() => o.searchString, m));
|
|
1459
1437
|
async function m() {
|
|
1460
1438
|
if (o.searchString) {
|
|
1461
1439
|
p(!0);
|
|
1462
1440
|
try {
|
|
1463
1441
|
a(""), u(0);
|
|
1464
|
-
const f = await
|
|
1442
|
+
const f = await Ne({
|
|
1465
1443
|
language: e,
|
|
1466
1444
|
text: decodeURIComponent(o.searchString),
|
|
1467
1445
|
limit: t,
|
|
1468
1446
|
start: l(),
|
|
1469
1447
|
templateName: n
|
|
1470
1448
|
});
|
|
1471
|
-
if (c(f.total), u(l() + t), !f.html)
|
|
1472
|
-
return;
|
|
1449
|
+
if (c(f.total), u(l() + t), !f.html) return;
|
|
1473
1450
|
a(f.html);
|
|
1474
1451
|
} finally {
|
|
1475
1452
|
p(!1);
|
|
@@ -1477,12 +1454,10 @@ function Ne({
|
|
|
1477
1454
|
}
|
|
1478
1455
|
}
|
|
1479
1456
|
async function y() {
|
|
1480
|
-
if (!o.searchString)
|
|
1481
|
-
return;
|
|
1457
|
+
if (!o.searchString) return;
|
|
1482
1458
|
const f = s();
|
|
1483
|
-
if (f === void 0 || l() >= f)
|
|
1484
|
-
|
|
1485
|
-
const d = await ke({
|
|
1459
|
+
if (f === void 0 || l() >= f) return;
|
|
1460
|
+
const d = await Ne({
|
|
1486
1461
|
language: e,
|
|
1487
1462
|
text: decodeURIComponent(o.searchString),
|
|
1488
1463
|
limit: t,
|
|
@@ -1492,78 +1467,77 @@ function Ne({
|
|
|
1492
1467
|
d.html && (a(`${i()}${d.html}`), u(l() + t));
|
|
1493
1468
|
}
|
|
1494
1469
|
return (() => {
|
|
1495
|
-
var f =
|
|
1496
|
-
return
|
|
1470
|
+
var f = Fe();
|
|
1471
|
+
return P(f, A(Tn, {
|
|
1497
1472
|
language: e,
|
|
1498
1473
|
get value() {
|
|
1499
1474
|
return E(() => !!o.searchString)() ? decodeURIComponent(o.searchString) : void 0;
|
|
1500
1475
|
}
|
|
1501
|
-
}), null),
|
|
1476
|
+
}), null), P(f, A(D, {
|
|
1502
1477
|
get when() {
|
|
1503
1478
|
return o.searchString;
|
|
1504
1479
|
},
|
|
1505
1480
|
get children() {
|
|
1506
|
-
var d =
|
|
1507
|
-
return
|
|
1481
|
+
var d = Nn();
|
|
1482
|
+
return P(d, (() => {
|
|
1508
1483
|
var S = E(() => !!h());
|
|
1509
1484
|
return () => S() ? (() => {
|
|
1510
|
-
var g =
|
|
1511
|
-
return
|
|
1512
|
-
})() : A(
|
|
1485
|
+
var g = Fn();
|
|
1486
|
+
return ae(g, "src", `${ze}/spinner.svg`), g;
|
|
1487
|
+
})() : A(D, {
|
|
1513
1488
|
get when() {
|
|
1514
1489
|
return i();
|
|
1515
1490
|
},
|
|
1516
1491
|
get fallback() {
|
|
1517
1492
|
return (() => {
|
|
1518
|
-
var g =
|
|
1519
|
-
return
|
|
1493
|
+
var g = Bn(), U = g.firstChild, L = U.nextSibling;
|
|
1494
|
+
return P(g, () => r("searchApp.nothingGet"), U), P(L, () => o.searchString), g;
|
|
1520
1495
|
})();
|
|
1521
1496
|
},
|
|
1522
1497
|
get children() {
|
|
1523
1498
|
return [(() => {
|
|
1524
|
-
var g =
|
|
1525
|
-
return
|
|
1526
|
-
})(), A(
|
|
1499
|
+
var g = Fe();
|
|
1500
|
+
return _(() => g.innerHTML = i()), g;
|
|
1501
|
+
})(), A(D, {
|
|
1527
1502
|
get when() {
|
|
1528
1503
|
return l() < s();
|
|
1529
1504
|
},
|
|
1530
1505
|
get children() {
|
|
1531
|
-
var g =
|
|
1532
|
-
return g.$$click = y,
|
|
1506
|
+
var g = jn();
|
|
1507
|
+
return g.$$click = y, P(g, () => r("infiniteLoading.loadMore")), g;
|
|
1533
1508
|
}
|
|
1534
1509
|
})];
|
|
1535
1510
|
}
|
|
1536
1511
|
});
|
|
1537
1512
|
})()), d;
|
|
1538
1513
|
}
|
|
1539
|
-
}), null),
|
|
1514
|
+
}), null), _(() => Ye(f, _n.SiteApp)), f;
|
|
1540
1515
|
})();
|
|
1541
1516
|
}
|
|
1542
|
-
|
|
1543
|
-
function
|
|
1517
|
+
ie(["click"]);
|
|
1518
|
+
function Mn(e, {
|
|
1544
1519
|
language: t
|
|
1545
1520
|
}) {
|
|
1546
|
-
if (!t)
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
n === void 0 || r === void 0 || Ee(() => A(Ln, {
|
|
1521
|
+
if (!t) throw new Error("Missing language");
|
|
1522
|
+
const n = Y(e.dataset.limit), r = W(e.dataset.template);
|
|
1523
|
+
n === void 0 || r === void 0 || Re(() => A(xn, {
|
|
1550
1524
|
explicitLinks: !0,
|
|
1551
1525
|
get children() {
|
|
1552
|
-
return [A(
|
|
1526
|
+
return [A(ge, {
|
|
1553
1527
|
path: "/",
|
|
1554
|
-
component: () => A(
|
|
1528
|
+
component: () => A(On, {
|
|
1555
1529
|
href: "/q"
|
|
1556
1530
|
})
|
|
1557
|
-
}), A(
|
|
1531
|
+
}), A(ge, {
|
|
1558
1532
|
path: "/q",
|
|
1559
|
-
component: () => A(
|
|
1533
|
+
component: () => A(je, {
|
|
1560
1534
|
language: t,
|
|
1561
1535
|
templateName: r,
|
|
1562
1536
|
limit: n
|
|
1563
1537
|
})
|
|
1564
|
-
}), A(
|
|
1538
|
+
}), A(ge, {
|
|
1565
1539
|
path: "/q/:searchString",
|
|
1566
|
-
component: () => A(
|
|
1540
|
+
component: () => A(je, {
|
|
1567
1541
|
language: t,
|
|
1568
1542
|
templateName: r,
|
|
1569
1543
|
limit: n
|
|
@@ -1572,8 +1546,8 @@ function Bn(e, {
|
|
|
1572
1546
|
}
|
|
1573
1547
|
}), e);
|
|
1574
1548
|
}
|
|
1575
|
-
var
|
|
1576
|
-
function
|
|
1549
|
+
var Dn = /* @__PURE__ */ C("<input class=SearchOpenerOverlay-input type=search required>"), qn = /* @__PURE__ */ C("<div class=SearchOpenerOverlay><form class=SearchOpenerOverlay-form><button class=SearchOpenerOverlay-btn type=submit>");
|
|
1550
|
+
function Vn({
|
|
1577
1551
|
searchURL: e,
|
|
1578
1552
|
language: t,
|
|
1579
1553
|
setSearchFormOverlayIsOpen: n
|
|
@@ -1581,40 +1555,40 @@ function qn({
|
|
|
1581
1555
|
let r;
|
|
1582
1556
|
const [o, i] = x(""), {
|
|
1583
1557
|
t: a
|
|
1584
|
-
} =
|
|
1585
|
-
var l =
|
|
1586
|
-
return l.addEventListener("change", (u) => i(u.currentTarget.value)),
|
|
1558
|
+
} = le(t), s = (() => {
|
|
1559
|
+
var l = Dn();
|
|
1560
|
+
return l.addEventListener("change", (u) => i(u.currentTarget.value)), _(() => ae(l, "placeholder", a("searchApp.search"))), _(() => l.value = o()), l;
|
|
1587
1561
|
})(), c = (l) => {
|
|
1588
1562
|
l.preventDefault(), window.location.href = `${e}#/q/${encodeURIComponent(o())}`, n(!1);
|
|
1589
1563
|
};
|
|
1590
|
-
return
|
|
1564
|
+
return Se(() => {
|
|
1591
1565
|
s.focus();
|
|
1592
1566
|
}), (() => {
|
|
1593
|
-
var l =
|
|
1567
|
+
var l = qn(), u = l.firstChild, h = u.firstChild;
|
|
1594
1568
|
l.$$click = (m) => {
|
|
1595
1569
|
m.target === r && n(!1);
|
|
1596
1570
|
};
|
|
1597
1571
|
var p = r;
|
|
1598
|
-
return typeof p == "function" ?
|
|
1572
|
+
return typeof p == "function" ? _t(p, l) : r = l, u.addEventListener("submit", c), P(u, s, h), P(h, () => a("searchApp.search")), l;
|
|
1599
1573
|
})();
|
|
1600
1574
|
}
|
|
1601
|
-
|
|
1602
|
-
var
|
|
1603
|
-
function
|
|
1575
|
+
ie(["click"]);
|
|
1576
|
+
var Wn = /* @__PURE__ */ C('<button type=button class=SearchOpenerBtn><svg class=SearchOpenerBtn-svg width=20 height=20 version=1.1 id=Capa_1 xmlns=http://www.w3.org/2000/svg viewBox="0 0 490.4 490.4"><title>Search Icon</title><g id=SVGRepo_bgCarrier stroke-width=0></g><g id=SVGRepo_tracerCarrier stroke-linecap=round stroke-linejoin=round></g><g id=SVGRepo_iconCarrier><g><path d="M484.1,454.796l-110.5-110.6c29.8-36.3,47.6-82.8,47.6-133.4c0-116.3-94.3-210.6-210.6-210.6S0,94.496,0,210.796 s94.3,210.6,210.6,210.6c50.8,0,97.4-18,133.8-48l110.5,110.5c12.9,11.8,25,4.2,29.2,0C492.5,475.596,492.5,463.096,484.1,454.796z M41.1,210.796c0-93.6,75.9-169.5,169.5-169.5s169.6,75.9,169.6,169.5s-75.9,169.5-169.5,169.5S41.1,304.396,41.1,210.796z"></path> '), Gn = /* @__PURE__ */ C("<div>");
|
|
1577
|
+
function Kn({
|
|
1604
1578
|
searchIconColor: e,
|
|
1605
1579
|
language: t,
|
|
1606
1580
|
searchURL: n
|
|
1607
1581
|
}) {
|
|
1608
1582
|
const [r, o] = x(!1), i = (() => {
|
|
1609
|
-
var s =
|
|
1583
|
+
var s = Wn(), c = s.firstChild;
|
|
1610
1584
|
return e != null ? c.style.setProperty("fill", e) : c.style.removeProperty("fill"), s;
|
|
1611
|
-
})(), a =
|
|
1612
|
-
return document.body.appendChild(a), i.addEventListener("click", () => o(!0)),
|
|
1585
|
+
})(), a = Gn();
|
|
1586
|
+
return document.body.appendChild(a), i.addEventListener("click", () => o(!0)), Re(() => A(D, {
|
|
1613
1587
|
get when() {
|
|
1614
1588
|
return r();
|
|
1615
1589
|
},
|
|
1616
1590
|
get children() {
|
|
1617
|
-
return A(
|
|
1591
|
+
return A(Vn, {
|
|
1618
1592
|
searchURL: n,
|
|
1619
1593
|
language: t,
|
|
1620
1594
|
setSearchFormOverlayIsOpen: o
|
|
@@ -1622,15 +1596,13 @@ function Gn({
|
|
|
1622
1596
|
}
|
|
1623
1597
|
}), a), i;
|
|
1624
1598
|
}
|
|
1625
|
-
function
|
|
1599
|
+
function Hn(e, {
|
|
1626
1600
|
language: t
|
|
1627
1601
|
}) {
|
|
1628
1602
|
const n = e.dataset.searchUrl, r = e.dataset.iconColor;
|
|
1629
|
-
if (!t)
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
throw new Error("Missing search url");
|
|
1633
|
-
Ee(() => A(Gn, {
|
|
1603
|
+
if (!t) throw new Error("Missing language");
|
|
1604
|
+
if (!n) throw new Error("Missing search url");
|
|
1605
|
+
Re(() => A(Kn, {
|
|
1634
1606
|
language: t,
|
|
1635
1607
|
searchURL: n,
|
|
1636
1608
|
searchIconColor: r
|
|
@@ -1638,14 +1610,13 @@ function Kn(e, {
|
|
|
1638
1610
|
}
|
|
1639
1611
|
document.addEventListener("DOMContentLoaded", () => {
|
|
1640
1612
|
const e = document.documentElement.lang, t = {
|
|
1641
|
-
searchOpener:
|
|
1642
|
-
searchForm:
|
|
1643
|
-
infiniteLoading:
|
|
1613
|
+
searchOpener: Hn,
|
|
1614
|
+
searchForm: Mn,
|
|
1615
|
+
infiniteLoading: Yt
|
|
1644
1616
|
}, n = document.querySelectorAll("[data-effect]");
|
|
1645
1617
|
for (const r of n) {
|
|
1646
1618
|
const o = r.dataset.effect;
|
|
1647
|
-
if (!o)
|
|
1648
|
-
continue;
|
|
1619
|
+
if (!o) continue;
|
|
1649
1620
|
const i = t[o];
|
|
1650
1621
|
i && i(r, {
|
|
1651
1622
|
language: e
|