@noego/forge 0.1.10 → 0.1.13
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/client.cjs +3 -3
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.mjs +404 -683
- package/dist/client.mjs.map +1 -1
- package/package.json +1 -1
package/dist/client.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { p as
|
|
2
|
-
import { s as
|
|
3
|
-
import * as
|
|
4
|
-
import { hydrate as
|
|
5
|
-
import
|
|
6
|
-
function
|
|
7
|
-
const r = new
|
|
1
|
+
import { p as Et, a as b } from "./page.svelte-Bq1Q01H0.js";
|
|
2
|
+
import { s as Se } from "./page.svelte-Bq1Q01H0.js";
|
|
3
|
+
import * as et from "svelte/internal/client";
|
|
4
|
+
import { hydrate as Ot } from "svelte";
|
|
5
|
+
import Pt from "../src/components/RecursiveRender.svelte";
|
|
6
|
+
function xt(t) {
|
|
7
|
+
const r = new Et(t);
|
|
8
8
|
return (e) => {
|
|
9
9
|
const n = r.match(e);
|
|
10
10
|
if (!n) return null;
|
|
@@ -14,262 +14,56 @@ function Wt(t) {
|
|
|
14
14
|
return o;
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function It(t) {
|
|
18
18
|
return t.map((r) => {
|
|
19
|
-
const e = r.path, n =
|
|
19
|
+
const e = r.path, n = xt(e);
|
|
20
20
|
return { pattern: e, parser: n };
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
return
|
|
25
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
26
|
-
var e = arguments[r];
|
|
27
|
-
for (var n in e) ({}).hasOwnProperty.call(e, n) && (t[n] = e[n]);
|
|
28
|
-
}
|
|
29
|
-
return t;
|
|
30
|
-
}, W.apply(null, arguments);
|
|
31
|
-
}
|
|
32
|
-
var j;
|
|
33
|
-
(function(t) {
|
|
34
|
-
t.Pop = "POP", t.Push = "PUSH", t.Replace = "REPLACE";
|
|
35
|
-
})(j || (j = {}));
|
|
36
|
-
var ut = process.env.NODE_ENV !== "production" ? function(t) {
|
|
37
|
-
return Object.freeze(t);
|
|
38
|
-
} : function(t) {
|
|
39
|
-
return t;
|
|
40
|
-
};
|
|
41
|
-
function Yt(t, r) {
|
|
42
|
-
{
|
|
43
|
-
typeof console < "u" && console.warn(r);
|
|
44
|
-
try {
|
|
45
|
-
throw new Error(r);
|
|
46
|
-
} catch {
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
var lt = "beforeunload", Bt = "popstate";
|
|
51
|
-
function Xt(t) {
|
|
52
|
-
t === void 0 && (t = {});
|
|
53
|
-
var r = t, e = r.window, n = e === void 0 ? document.defaultView : e, o = n.history;
|
|
54
|
-
function i() {
|
|
55
|
-
var p = n.location, m = p.pathname, _ = p.search, A = p.hash, O = o.state || {};
|
|
56
|
-
return [O.idx, ut({
|
|
57
|
-
pathname: m,
|
|
58
|
-
search: _,
|
|
59
|
-
hash: A,
|
|
60
|
-
state: O.usr || null,
|
|
61
|
-
key: O.key || "default"
|
|
62
|
-
})];
|
|
63
|
-
}
|
|
64
|
-
var a = null;
|
|
65
|
-
function u() {
|
|
66
|
-
if (a)
|
|
67
|
-
f.call(a), a = null;
|
|
68
|
-
else {
|
|
69
|
-
var p = j.Pop, m = i(), _ = m[0], A = m[1];
|
|
70
|
-
if (f.length)
|
|
71
|
-
if (_ != null) {
|
|
72
|
-
var O = l - _;
|
|
73
|
-
O && (a = {
|
|
74
|
-
action: p,
|
|
75
|
-
location: A,
|
|
76
|
-
retry: function() {
|
|
77
|
-
U(O * -1);
|
|
78
|
-
}
|
|
79
|
-
}, U(O));
|
|
80
|
-
} else
|
|
81
|
-
process.env.NODE_ENV !== "production" && Yt(
|
|
82
|
-
!1,
|
|
83
|
-
// TODO: Write up a doc that explains our blocking strategy in
|
|
84
|
-
// detail and link to it here so people can understand better what
|
|
85
|
-
// is going on and how to avoid it.
|
|
86
|
-
"You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation."
|
|
87
|
-
);
|
|
88
|
-
else
|
|
89
|
-
y(p);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
n.addEventListener(Bt, u);
|
|
93
|
-
var s = j.Pop, c = i(), l = c[0], h = c[1], d = dt(), f = dt();
|
|
94
|
-
l == null && (l = 0, o.replaceState(W({}, o.state, {
|
|
95
|
-
idx: l
|
|
96
|
-
}), ""));
|
|
97
|
-
function v(p) {
|
|
98
|
-
return typeof p == "string" ? p : Kt(p);
|
|
99
|
-
}
|
|
100
|
-
function w(p, m) {
|
|
101
|
-
return m === void 0 && (m = null), ut(W({
|
|
102
|
-
pathname: h.pathname,
|
|
103
|
-
hash: "",
|
|
104
|
-
search: ""
|
|
105
|
-
}, typeof p == "string" ? Qt(p) : p, {
|
|
106
|
-
state: m,
|
|
107
|
-
key: Jt()
|
|
108
|
-
}));
|
|
109
|
-
}
|
|
110
|
-
function I(p, m) {
|
|
111
|
-
return [{
|
|
112
|
-
usr: p.state,
|
|
113
|
-
key: p.key,
|
|
114
|
-
idx: m
|
|
115
|
-
}, v(p)];
|
|
116
|
-
}
|
|
117
|
-
function S(p, m, _) {
|
|
118
|
-
return !f.length || (f.call({
|
|
119
|
-
action: p,
|
|
120
|
-
location: m,
|
|
121
|
-
retry: _
|
|
122
|
-
}), !1);
|
|
123
|
-
}
|
|
124
|
-
function y(p) {
|
|
125
|
-
s = p;
|
|
126
|
-
var m = i();
|
|
127
|
-
l = m[0], h = m[1], d.call({
|
|
128
|
-
action: s,
|
|
129
|
-
location: h
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
function st(p, m) {
|
|
133
|
-
var _ = j.Push, A = w(p, m);
|
|
134
|
-
function O() {
|
|
135
|
-
st(p, m);
|
|
136
|
-
}
|
|
137
|
-
if (S(_, A, O)) {
|
|
138
|
-
var T = I(A, l + 1), X = T[0], q = T[1];
|
|
139
|
-
try {
|
|
140
|
-
o.pushState(X, "", q);
|
|
141
|
-
} catch {
|
|
142
|
-
n.location.assign(q);
|
|
143
|
-
}
|
|
144
|
-
y(_);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
function ct(p, m) {
|
|
148
|
-
var _ = j.Replace, A = w(p, m);
|
|
149
|
-
function O() {
|
|
150
|
-
ct(p, m);
|
|
151
|
-
}
|
|
152
|
-
if (S(_, A, O)) {
|
|
153
|
-
var T = I(A, l), X = T[0], q = T[1];
|
|
154
|
-
o.replaceState(X, "", q), y(_);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
function U(p) {
|
|
158
|
-
o.go(p);
|
|
159
|
-
}
|
|
160
|
-
var $t = {
|
|
161
|
-
get action() {
|
|
162
|
-
return s;
|
|
163
|
-
},
|
|
164
|
-
get location() {
|
|
165
|
-
return h;
|
|
166
|
-
},
|
|
167
|
-
createHref: v,
|
|
168
|
-
push: st,
|
|
169
|
-
replace: ct,
|
|
170
|
-
go: U,
|
|
171
|
-
back: function() {
|
|
172
|
-
U(-1);
|
|
173
|
-
},
|
|
174
|
-
forward: function() {
|
|
175
|
-
U(1);
|
|
176
|
-
},
|
|
177
|
-
listen: function(m) {
|
|
178
|
-
return d.push(m);
|
|
179
|
-
},
|
|
180
|
-
block: function(m) {
|
|
181
|
-
var _ = f.push(m);
|
|
182
|
-
return f.length === 1 && n.addEventListener(lt, ft), function() {
|
|
183
|
-
_(), f.length || n.removeEventListener(lt, ft);
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
};
|
|
187
|
-
return $t;
|
|
188
|
-
}
|
|
189
|
-
function ft(t) {
|
|
190
|
-
t.preventDefault(), t.returnValue = "";
|
|
191
|
-
}
|
|
192
|
-
function dt() {
|
|
193
|
-
var t = [];
|
|
194
|
-
return {
|
|
195
|
-
get length() {
|
|
196
|
-
return t.length;
|
|
197
|
-
},
|
|
198
|
-
push: function(e) {
|
|
199
|
-
return t.push(e), function() {
|
|
200
|
-
t = t.filter(function(n) {
|
|
201
|
-
return n !== e;
|
|
202
|
-
});
|
|
203
|
-
};
|
|
204
|
-
},
|
|
205
|
-
call: function(e) {
|
|
206
|
-
t.forEach(function(n) {
|
|
207
|
-
return n && n(e);
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
function Jt() {
|
|
213
|
-
return Math.random().toString(36).substr(2, 8);
|
|
214
|
-
}
|
|
215
|
-
function Kt(t) {
|
|
216
|
-
var r = t.pathname, e = r === void 0 ? "/" : r, n = t.search, o = n === void 0 ? "" : n, i = t.hash, a = i === void 0 ? "" : i;
|
|
217
|
-
return o && o !== "?" && (e += o.charAt(0) === "?" ? o : "?" + o), a && a !== "#" && (e += a.charAt(0) === "#" ? a : "#" + a), e;
|
|
218
|
-
}
|
|
219
|
-
function Qt(t) {
|
|
220
|
-
var r = {};
|
|
221
|
-
if (t) {
|
|
222
|
-
var e = t.indexOf("#");
|
|
223
|
-
e >= 0 && (r.hash = t.substr(e), t = t.substr(0, e));
|
|
224
|
-
var n = t.indexOf("?");
|
|
225
|
-
n >= 0 && (r.search = t.substr(n), t = t.substr(0, n)), t && (r.pathname = t);
|
|
226
|
-
}
|
|
227
|
-
return r;
|
|
228
|
-
}
|
|
229
|
-
var Z = function(t, r) {
|
|
230
|
-
return Z = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, n) {
|
|
23
|
+
var D = function(t, r) {
|
|
24
|
+
return D = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, n) {
|
|
231
25
|
e.__proto__ = n;
|
|
232
26
|
} || function(e, n) {
|
|
233
27
|
for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
|
|
234
|
-
},
|
|
28
|
+
}, D(t, r);
|
|
235
29
|
};
|
|
236
|
-
function
|
|
30
|
+
function I(t, r) {
|
|
237
31
|
if (typeof r != "function" && r !== null)
|
|
238
32
|
throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
|
|
239
|
-
|
|
33
|
+
D(t, r);
|
|
240
34
|
function e() {
|
|
241
35
|
this.constructor = t;
|
|
242
36
|
}
|
|
243
37
|
t.prototype = r === null ? Object.create(r) : (e.prototype = r.prototype, new e());
|
|
244
38
|
}
|
|
245
|
-
function
|
|
39
|
+
function At(t, r, e, n) {
|
|
246
40
|
function o(i) {
|
|
247
41
|
return i instanceof e ? i : new e(function(a) {
|
|
248
42
|
a(i);
|
|
249
43
|
});
|
|
250
44
|
}
|
|
251
45
|
return new (e || (e = Promise))(function(i, a) {
|
|
252
|
-
function u(
|
|
46
|
+
function u(f) {
|
|
253
47
|
try {
|
|
254
|
-
c(n.next(
|
|
255
|
-
} catch (
|
|
256
|
-
a(
|
|
48
|
+
c(n.next(f));
|
|
49
|
+
} catch (d) {
|
|
50
|
+
a(d);
|
|
257
51
|
}
|
|
258
52
|
}
|
|
259
|
-
function s(
|
|
53
|
+
function s(f) {
|
|
260
54
|
try {
|
|
261
|
-
c(n.throw(
|
|
262
|
-
} catch (
|
|
263
|
-
a(
|
|
55
|
+
c(n.throw(f));
|
|
56
|
+
} catch (d) {
|
|
57
|
+
a(d);
|
|
264
58
|
}
|
|
265
59
|
}
|
|
266
|
-
function c(
|
|
267
|
-
|
|
60
|
+
function c(f) {
|
|
61
|
+
f.done ? i(f.value) : o(f.value).then(u, s);
|
|
268
62
|
}
|
|
269
63
|
c((n = n.apply(t, r || [])).next());
|
|
270
64
|
});
|
|
271
65
|
}
|
|
272
|
-
function
|
|
66
|
+
function rt(t, r) {
|
|
273
67
|
var e = { label: 0, sent: function() {
|
|
274
68
|
if (i[0] & 1) throw i[1];
|
|
275
69
|
return i[1];
|
|
@@ -278,8 +72,8 @@ function mt(t, r) {
|
|
|
278
72
|
return this;
|
|
279
73
|
}), a;
|
|
280
74
|
function u(c) {
|
|
281
|
-
return function(
|
|
282
|
-
return s([c,
|
|
75
|
+
return function(f) {
|
|
76
|
+
return s([c, f]);
|
|
283
77
|
};
|
|
284
78
|
}
|
|
285
79
|
function s(c) {
|
|
@@ -320,8 +114,8 @@ function mt(t, r) {
|
|
|
320
114
|
continue;
|
|
321
115
|
}
|
|
322
116
|
c = r.call(t, e);
|
|
323
|
-
} catch (
|
|
324
|
-
c = [6,
|
|
117
|
+
} catch (f) {
|
|
118
|
+
c = [6, f], o = 0;
|
|
325
119
|
} finally {
|
|
326
120
|
n = i = 0;
|
|
327
121
|
}
|
|
@@ -329,7 +123,7 @@ function mt(t, r) {
|
|
|
329
123
|
return { value: c[0] ? c[1] : void 0, done: !0 };
|
|
330
124
|
}
|
|
331
125
|
}
|
|
332
|
-
function
|
|
126
|
+
function P(t) {
|
|
333
127
|
var r = typeof Symbol == "function" && Symbol.iterator, e = r && t[r], n = 0;
|
|
334
128
|
if (e) return e.call(t);
|
|
335
129
|
if (t && typeof t.length == "number") return {
|
|
@@ -339,7 +133,7 @@ function k(t) {
|
|
|
339
133
|
};
|
|
340
134
|
throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
341
135
|
}
|
|
342
|
-
function
|
|
136
|
+
function W(t, r) {
|
|
343
137
|
var e = typeof Symbol == "function" && t[Symbol.iterator];
|
|
344
138
|
if (!e) return t;
|
|
345
139
|
var n = e.call(t), o, i = [], a;
|
|
@@ -356,56 +150,56 @@ function tt(t, r) {
|
|
|
356
150
|
}
|
|
357
151
|
return i;
|
|
358
152
|
}
|
|
359
|
-
function
|
|
153
|
+
function G(t, r, e) {
|
|
360
154
|
if (e || arguments.length === 2) for (var n = 0, o = r.length, i; n < o; n++)
|
|
361
155
|
(i || !(n in r)) && (i || (i = Array.prototype.slice.call(r, 0, n)), i[n] = r[n]);
|
|
362
156
|
return t.concat(i || Array.prototype.slice.call(r));
|
|
363
157
|
}
|
|
364
|
-
function
|
|
365
|
-
return this instanceof
|
|
158
|
+
function O(t) {
|
|
159
|
+
return this instanceof O ? (this.v = t, this) : new O(t);
|
|
366
160
|
}
|
|
367
|
-
function
|
|
161
|
+
function Rt(t, r, e) {
|
|
368
162
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
369
163
|
var n = e.apply(t, r || []), o, i = [];
|
|
370
164
|
return o = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), u("next"), u("throw"), u("return", a), o[Symbol.asyncIterator] = function() {
|
|
371
165
|
return this;
|
|
372
166
|
}, o;
|
|
373
|
-
function a(
|
|
167
|
+
function a(l) {
|
|
374
168
|
return function(v) {
|
|
375
|
-
return Promise.resolve(v).then(
|
|
169
|
+
return Promise.resolve(v).then(l, d);
|
|
376
170
|
};
|
|
377
171
|
}
|
|
378
|
-
function u(
|
|
379
|
-
n[
|
|
380
|
-
return new Promise(function(
|
|
381
|
-
i.push([
|
|
172
|
+
function u(l, v) {
|
|
173
|
+
n[l] && (o[l] = function(p) {
|
|
174
|
+
return new Promise(function(g, x) {
|
|
175
|
+
i.push([l, p, g, x]) > 1 || s(l, p);
|
|
382
176
|
});
|
|
383
|
-
}, v && (o[
|
|
177
|
+
}, v && (o[l] = v(o[l])));
|
|
384
178
|
}
|
|
385
|
-
function s(
|
|
179
|
+
function s(l, v) {
|
|
386
180
|
try {
|
|
387
|
-
c(n[
|
|
388
|
-
} catch (
|
|
389
|
-
|
|
181
|
+
c(n[l](v));
|
|
182
|
+
} catch (p) {
|
|
183
|
+
h(i[0][3], p);
|
|
390
184
|
}
|
|
391
185
|
}
|
|
392
|
-
function c(
|
|
393
|
-
|
|
186
|
+
function c(l) {
|
|
187
|
+
l.value instanceof O ? Promise.resolve(l.value.v).then(f, d) : h(i[0][2], l);
|
|
394
188
|
}
|
|
395
|
-
function l
|
|
396
|
-
s("next",
|
|
189
|
+
function f(l) {
|
|
190
|
+
s("next", l);
|
|
397
191
|
}
|
|
398
|
-
function
|
|
399
|
-
s("throw",
|
|
192
|
+
function d(l) {
|
|
193
|
+
s("throw", l);
|
|
400
194
|
}
|
|
401
|
-
function
|
|
402
|
-
|
|
195
|
+
function h(l, v) {
|
|
196
|
+
l(v), i.shift(), i.length && s(i[0][0], i[0][1]);
|
|
403
197
|
}
|
|
404
198
|
}
|
|
405
|
-
function
|
|
199
|
+
function Tt(t) {
|
|
406
200
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
407
201
|
var r = t[Symbol.asyncIterator], e;
|
|
408
|
-
return r ? r.call(t) : (t = typeof
|
|
202
|
+
return r ? r.call(t) : (t = typeof P == "function" ? P(t) : t[Symbol.iterator](), e = {}, n("next"), n("throw"), n("return"), e[Symbol.asyncIterator] = function() {
|
|
409
203
|
return this;
|
|
410
204
|
}, e);
|
|
411
205
|
function n(i) {
|
|
@@ -421,16 +215,16 @@ function ee(t) {
|
|
|
421
215
|
}, a);
|
|
422
216
|
}
|
|
423
217
|
}
|
|
424
|
-
function
|
|
218
|
+
function m(t) {
|
|
425
219
|
return typeof t == "function";
|
|
426
220
|
}
|
|
427
|
-
function
|
|
221
|
+
function nt(t) {
|
|
428
222
|
var r = function(n) {
|
|
429
223
|
Error.call(n), n.stack = new Error().stack;
|
|
430
224
|
}, e = t(r);
|
|
431
225
|
return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
|
|
432
226
|
}
|
|
433
|
-
var
|
|
227
|
+
var q = nt(function(t) {
|
|
434
228
|
return function(e) {
|
|
435
229
|
t(this), this.message = e ? e.length + ` errors occurred during unsubscription:
|
|
436
230
|
` + e.map(function(n, o) {
|
|
@@ -439,13 +233,13 @@ var J = bt(function(t) {
|
|
|
439
233
|
`) : "", this.name = "UnsubscriptionError", this.errors = e;
|
|
440
234
|
};
|
|
441
235
|
});
|
|
442
|
-
function
|
|
236
|
+
function H(t, r) {
|
|
443
237
|
if (t) {
|
|
444
238
|
var e = t.indexOf(r);
|
|
445
239
|
0 <= e && t.splice(e, 1);
|
|
446
240
|
}
|
|
447
241
|
}
|
|
448
|
-
var
|
|
242
|
+
var L = (function() {
|
|
449
243
|
function t(r) {
|
|
450
244
|
this.initialTeardown = r, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
451
245
|
}
|
|
@@ -457,12 +251,12 @@ var Y = (function() {
|
|
|
457
251
|
if (a)
|
|
458
252
|
if (this._parentage = null, Array.isArray(a))
|
|
459
253
|
try {
|
|
460
|
-
for (var u =
|
|
254
|
+
for (var u = P(a), s = u.next(); !s.done; s = u.next()) {
|
|
461
255
|
var c = s.value;
|
|
462
256
|
c.remove(this);
|
|
463
257
|
}
|
|
464
|
-
} catch (
|
|
465
|
-
r = { error:
|
|
258
|
+
} catch (p) {
|
|
259
|
+
r = { error: p };
|
|
466
260
|
} finally {
|
|
467
261
|
try {
|
|
468
262
|
s && !s.done && (e = u.return) && e.call(u);
|
|
@@ -472,43 +266,43 @@ var Y = (function() {
|
|
|
472
266
|
}
|
|
473
267
|
else
|
|
474
268
|
a.remove(this);
|
|
475
|
-
var
|
|
476
|
-
if (
|
|
269
|
+
var f = this.initialTeardown;
|
|
270
|
+
if (m(f))
|
|
477
271
|
try {
|
|
478
|
-
|
|
479
|
-
} catch (
|
|
480
|
-
i =
|
|
272
|
+
f();
|
|
273
|
+
} catch (p) {
|
|
274
|
+
i = p instanceof q ? p.errors : [p];
|
|
481
275
|
}
|
|
482
|
-
var
|
|
483
|
-
if (
|
|
276
|
+
var d = this._finalizers;
|
|
277
|
+
if (d) {
|
|
484
278
|
this._finalizers = null;
|
|
485
279
|
try {
|
|
486
|
-
for (var
|
|
487
|
-
var v =
|
|
280
|
+
for (var h = P(d), l = h.next(); !l.done; l = h.next()) {
|
|
281
|
+
var v = l.value;
|
|
488
282
|
try {
|
|
489
|
-
|
|
490
|
-
} catch (
|
|
491
|
-
i = i ?? [],
|
|
283
|
+
K(v);
|
|
284
|
+
} catch (p) {
|
|
285
|
+
i = i ?? [], p instanceof q ? i = G(G([], W(i)), W(p.errors)) : i.push(p);
|
|
492
286
|
}
|
|
493
287
|
}
|
|
494
|
-
} catch (
|
|
495
|
-
n = { error:
|
|
288
|
+
} catch (p) {
|
|
289
|
+
n = { error: p };
|
|
496
290
|
} finally {
|
|
497
291
|
try {
|
|
498
|
-
|
|
292
|
+
l && !l.done && (o = h.return) && o.call(h);
|
|
499
293
|
} finally {
|
|
500
294
|
if (n) throw n.error;
|
|
501
295
|
}
|
|
502
296
|
}
|
|
503
297
|
}
|
|
504
298
|
if (i)
|
|
505
|
-
throw new
|
|
299
|
+
throw new q(i);
|
|
506
300
|
}
|
|
507
301
|
}, t.prototype.add = function(r) {
|
|
508
302
|
var e;
|
|
509
303
|
if (r && r !== this)
|
|
510
304
|
if (this.closed)
|
|
511
|
-
|
|
305
|
+
K(r);
|
|
512
306
|
else {
|
|
513
307
|
if (r instanceof t) {
|
|
514
308
|
if (r.closed || r._hasParent(this))
|
|
@@ -525,52 +319,52 @@ var Y = (function() {
|
|
|
525
319
|
this._parentage = Array.isArray(e) ? (e.push(r), e) : e ? [e, r] : r;
|
|
526
320
|
}, t.prototype._removeParent = function(r) {
|
|
527
321
|
var e = this._parentage;
|
|
528
|
-
e === r ? this._parentage = null : Array.isArray(e) &&
|
|
322
|
+
e === r ? this._parentage = null : Array.isArray(e) && H(e, r);
|
|
529
323
|
}, t.prototype.remove = function(r) {
|
|
530
324
|
var e = this._finalizers;
|
|
531
|
-
e &&
|
|
325
|
+
e && H(e, r), r instanceof t && r._removeParent(this);
|
|
532
326
|
}, t.EMPTY = (function() {
|
|
533
327
|
var r = new t();
|
|
534
328
|
return r.closed = !0, r;
|
|
535
329
|
})(), t;
|
|
536
|
-
})(),
|
|
537
|
-
function
|
|
538
|
-
return t instanceof
|
|
330
|
+
})(), ot = L.EMPTY;
|
|
331
|
+
function it(t) {
|
|
332
|
+
return t instanceof L || t && "closed" in t && m(t.remove) && m(t.add) && m(t.unsubscribe);
|
|
539
333
|
}
|
|
540
|
-
function
|
|
541
|
-
|
|
334
|
+
function K(t) {
|
|
335
|
+
m(t) ? t() : t.unsubscribe();
|
|
542
336
|
}
|
|
543
|
-
var
|
|
337
|
+
var jt = {
|
|
544
338
|
Promise: void 0
|
|
545
|
-
},
|
|
339
|
+
}, Ut = {
|
|
546
340
|
setTimeout: function(t, r) {
|
|
547
341
|
for (var e = [], n = 2; n < arguments.length; n++)
|
|
548
342
|
e[n - 2] = arguments[n];
|
|
549
|
-
return setTimeout.apply(void 0,
|
|
343
|
+
return setTimeout.apply(void 0, G([t, r], W(e)));
|
|
550
344
|
},
|
|
551
345
|
clearTimeout: function(t) {
|
|
552
346
|
return clearTimeout(t);
|
|
553
347
|
},
|
|
554
348
|
delegate: void 0
|
|
555
349
|
};
|
|
556
|
-
function
|
|
557
|
-
|
|
350
|
+
function at(t) {
|
|
351
|
+
Ut.setTimeout(function() {
|
|
558
352
|
throw t;
|
|
559
353
|
});
|
|
560
354
|
}
|
|
561
|
-
function
|
|
355
|
+
function Q() {
|
|
562
356
|
}
|
|
563
|
-
function
|
|
357
|
+
function T(t) {
|
|
564
358
|
t();
|
|
565
359
|
}
|
|
566
|
-
var
|
|
567
|
-
|
|
360
|
+
var X = (function(t) {
|
|
361
|
+
I(r, t);
|
|
568
362
|
function r(e) {
|
|
569
363
|
var n = t.call(this) || this;
|
|
570
|
-
return n.isStopped = !1, e ? (n.destination = e,
|
|
364
|
+
return n.isStopped = !1, e ? (n.destination = e, it(e) && e.add(n)) : n.destination = Nt, n;
|
|
571
365
|
}
|
|
572
366
|
return r.create = function(e, n, o) {
|
|
573
|
-
return new
|
|
367
|
+
return new z(e, n, o);
|
|
574
368
|
}, r.prototype.next = function(e) {
|
|
575
369
|
this.isStopped || this._next(e);
|
|
576
370
|
}, r.prototype.error = function(e) {
|
|
@@ -594,7 +388,7 @@ var ot = (function(t) {
|
|
|
594
388
|
this.unsubscribe();
|
|
595
389
|
}
|
|
596
390
|
}, r;
|
|
597
|
-
})(
|
|
391
|
+
})(L), kt = (function() {
|
|
598
392
|
function t(r) {
|
|
599
393
|
this.partialObserver = r;
|
|
600
394
|
}
|
|
@@ -604,7 +398,7 @@ var ot = (function(t) {
|
|
|
604
398
|
try {
|
|
605
399
|
e.next(r);
|
|
606
400
|
} catch (n) {
|
|
607
|
-
|
|
401
|
+
R(n);
|
|
608
402
|
}
|
|
609
403
|
}, t.prototype.error = function(r) {
|
|
610
404
|
var e = this.partialObserver;
|
|
@@ -612,56 +406,56 @@ var ot = (function(t) {
|
|
|
612
406
|
try {
|
|
613
407
|
e.error(r);
|
|
614
408
|
} catch (n) {
|
|
615
|
-
|
|
409
|
+
R(n);
|
|
616
410
|
}
|
|
617
411
|
else
|
|
618
|
-
|
|
412
|
+
R(r);
|
|
619
413
|
}, t.prototype.complete = function() {
|
|
620
414
|
var r = this.partialObserver;
|
|
621
415
|
if (r.complete)
|
|
622
416
|
try {
|
|
623
417
|
r.complete();
|
|
624
418
|
} catch (e) {
|
|
625
|
-
|
|
419
|
+
R(e);
|
|
626
420
|
}
|
|
627
421
|
}, t;
|
|
628
|
-
})(),
|
|
629
|
-
|
|
422
|
+
})(), z = (function(t) {
|
|
423
|
+
I(r, t);
|
|
630
424
|
function r(e, n, o) {
|
|
631
425
|
var i = t.call(this) || this, a;
|
|
632
|
-
return
|
|
426
|
+
return m(e) || !e ? a = {
|
|
633
427
|
next: e ?? void 0,
|
|
634
428
|
error: n ?? void 0,
|
|
635
429
|
complete: o ?? void 0
|
|
636
|
-
} : a = e, i.destination = new
|
|
430
|
+
} : a = e, i.destination = new kt(a), i;
|
|
637
431
|
}
|
|
638
432
|
return r;
|
|
639
|
-
})(
|
|
640
|
-
function
|
|
641
|
-
|
|
433
|
+
})(X);
|
|
434
|
+
function R(t) {
|
|
435
|
+
at(t);
|
|
642
436
|
}
|
|
643
|
-
function
|
|
437
|
+
function Ct(t) {
|
|
644
438
|
throw t;
|
|
645
439
|
}
|
|
646
|
-
var
|
|
440
|
+
var Nt = {
|
|
647
441
|
closed: !0,
|
|
648
|
-
next:
|
|
649
|
-
error:
|
|
650
|
-
complete:
|
|
651
|
-
},
|
|
442
|
+
next: Q,
|
|
443
|
+
error: Ct,
|
|
444
|
+
complete: Q
|
|
445
|
+
}, B = (function() {
|
|
652
446
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
653
447
|
})();
|
|
654
|
-
function
|
|
448
|
+
function Lt(t) {
|
|
655
449
|
return t;
|
|
656
450
|
}
|
|
657
|
-
function
|
|
658
|
-
return t.length === 0 ?
|
|
451
|
+
function Ft(t) {
|
|
452
|
+
return t.length === 0 ? Lt : t.length === 1 ? t[0] : function(e) {
|
|
659
453
|
return t.reduce(function(n, o) {
|
|
660
454
|
return o(n);
|
|
661
455
|
}, e);
|
|
662
456
|
};
|
|
663
457
|
}
|
|
664
|
-
var
|
|
458
|
+
var S = (function() {
|
|
665
459
|
function t(r) {
|
|
666
460
|
r && (this._subscribe = r);
|
|
667
461
|
}
|
|
@@ -669,8 +463,8 @@ var P = (function() {
|
|
|
669
463
|
var e = new t();
|
|
670
464
|
return e.source = this, e.operator = r, e;
|
|
671
465
|
}, t.prototype.subscribe = function(r, e, n) {
|
|
672
|
-
var o = this, i =
|
|
673
|
-
return
|
|
466
|
+
var o = this, i = Vt(r) ? r : new z(r, e, n);
|
|
467
|
+
return T(function() {
|
|
674
468
|
var a = o, u = a.operator, s = a.source;
|
|
675
469
|
i.add(u ? u.call(i, s) : s ? o._subscribe(i) : o._trySubscribe(i));
|
|
676
470
|
}), i;
|
|
@@ -682,8 +476,8 @@ var P = (function() {
|
|
|
682
476
|
}
|
|
683
477
|
}, t.prototype.forEach = function(r, e) {
|
|
684
478
|
var n = this;
|
|
685
|
-
return e =
|
|
686
|
-
var a = new
|
|
479
|
+
return e = Z(e), new e(function(o, i) {
|
|
480
|
+
var a = new z({
|
|
687
481
|
next: function(u) {
|
|
688
482
|
try {
|
|
689
483
|
r(u);
|
|
@@ -699,15 +493,15 @@ var P = (function() {
|
|
|
699
493
|
}, t.prototype._subscribe = function(r) {
|
|
700
494
|
var e;
|
|
701
495
|
return (e = this.source) === null || e === void 0 ? void 0 : e.subscribe(r);
|
|
702
|
-
}, t.prototype[
|
|
496
|
+
}, t.prototype[B] = function() {
|
|
703
497
|
return this;
|
|
704
498
|
}, t.prototype.pipe = function() {
|
|
705
499
|
for (var r = [], e = 0; e < arguments.length; e++)
|
|
706
500
|
r[e] = arguments[e];
|
|
707
|
-
return
|
|
501
|
+
return Ft(r)(this);
|
|
708
502
|
}, t.prototype.toPromise = function(r) {
|
|
709
503
|
var e = this;
|
|
710
|
-
return r =
|
|
504
|
+
return r = Z(r), new r(function(n, o) {
|
|
711
505
|
var i;
|
|
712
506
|
e.subscribe(function(a) {
|
|
713
507
|
return i = a;
|
|
@@ -721,22 +515,22 @@ var P = (function() {
|
|
|
721
515
|
return new t(r);
|
|
722
516
|
}, t;
|
|
723
517
|
})();
|
|
724
|
-
function
|
|
518
|
+
function Z(t) {
|
|
725
519
|
var r;
|
|
726
|
-
return (r = t ??
|
|
520
|
+
return (r = t ?? jt.Promise) !== null && r !== void 0 ? r : Promise;
|
|
727
521
|
}
|
|
728
|
-
function
|
|
729
|
-
return t &&
|
|
522
|
+
function qt(t) {
|
|
523
|
+
return t && m(t.next) && m(t.error) && m(t.complete);
|
|
730
524
|
}
|
|
731
|
-
function
|
|
732
|
-
return t && t instanceof
|
|
525
|
+
function Vt(t) {
|
|
526
|
+
return t && t instanceof X || qt(t) && it(t);
|
|
733
527
|
}
|
|
734
|
-
function
|
|
735
|
-
return
|
|
528
|
+
function Mt(t) {
|
|
529
|
+
return m(t == null ? void 0 : t.lift);
|
|
736
530
|
}
|
|
737
|
-
function
|
|
531
|
+
function J(t) {
|
|
738
532
|
return function(r) {
|
|
739
|
-
if (
|
|
533
|
+
if (Mt(r))
|
|
740
534
|
return r.lift(function(e) {
|
|
741
535
|
try {
|
|
742
536
|
return t(e, this);
|
|
@@ -747,24 +541,24 @@ function V(t) {
|
|
|
747
541
|
throw new TypeError("Unable to lift unknown Observable type");
|
|
748
542
|
};
|
|
749
543
|
}
|
|
750
|
-
function
|
|
751
|
-
return new
|
|
544
|
+
function Y(t, r, e, n, o) {
|
|
545
|
+
return new $t(t, r, e, n, o);
|
|
752
546
|
}
|
|
753
|
-
var
|
|
754
|
-
|
|
547
|
+
var $t = (function(t) {
|
|
548
|
+
I(r, t);
|
|
755
549
|
function r(e, n, o, i, a, u) {
|
|
756
550
|
var s = t.call(this, e) || this;
|
|
757
551
|
return s.onFinalize = a, s.shouldUnsubscribe = u, s._next = n ? function(c) {
|
|
758
552
|
try {
|
|
759
553
|
n(c);
|
|
760
|
-
} catch (
|
|
761
|
-
e.error(
|
|
554
|
+
} catch (f) {
|
|
555
|
+
e.error(f);
|
|
762
556
|
}
|
|
763
557
|
} : t.prototype._next, s._error = i ? function(c) {
|
|
764
558
|
try {
|
|
765
559
|
i(c);
|
|
766
|
-
} catch (
|
|
767
|
-
e.error(
|
|
560
|
+
} catch (f) {
|
|
561
|
+
e.error(f);
|
|
768
562
|
} finally {
|
|
769
563
|
this.unsubscribe();
|
|
770
564
|
}
|
|
@@ -785,30 +579,30 @@ var fe = (function(t) {
|
|
|
785
579
|
t.prototype.unsubscribe.call(this), !n && ((e = this.onFinalize) === null || e === void 0 || e.call(this));
|
|
786
580
|
}
|
|
787
581
|
}, r;
|
|
788
|
-
})(
|
|
582
|
+
})(X), Dt = nt(function(t) {
|
|
789
583
|
return function() {
|
|
790
584
|
t(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
|
791
585
|
};
|
|
792
|
-
}),
|
|
793
|
-
|
|
586
|
+
}), st = (function(t) {
|
|
587
|
+
I(r, t);
|
|
794
588
|
function r() {
|
|
795
589
|
var e = t.call(this) || this;
|
|
796
590
|
return e.closed = !1, e.currentObservers = null, e.observers = [], e.isStopped = !1, e.hasError = !1, e.thrownError = null, e;
|
|
797
591
|
}
|
|
798
592
|
return r.prototype.lift = function(e) {
|
|
799
|
-
var n = new
|
|
593
|
+
var n = new tt(this, this);
|
|
800
594
|
return n.operator = e, n;
|
|
801
595
|
}, r.prototype._throwIfClosed = function() {
|
|
802
596
|
if (this.closed)
|
|
803
|
-
throw new
|
|
597
|
+
throw new Dt();
|
|
804
598
|
}, r.prototype.next = function(e) {
|
|
805
599
|
var n = this;
|
|
806
|
-
|
|
600
|
+
T(function() {
|
|
807
601
|
var o, i;
|
|
808
602
|
if (n._throwIfClosed(), !n.isStopped) {
|
|
809
603
|
n.currentObservers || (n.currentObservers = Array.from(n.observers));
|
|
810
604
|
try {
|
|
811
|
-
for (var a =
|
|
605
|
+
for (var a = P(n.currentObservers), u = a.next(); !u.done; u = a.next()) {
|
|
812
606
|
var s = u.value;
|
|
813
607
|
s.next(e);
|
|
814
608
|
}
|
|
@@ -825,7 +619,7 @@ var fe = (function(t) {
|
|
|
825
619
|
});
|
|
826
620
|
}, r.prototype.error = function(e) {
|
|
827
621
|
var n = this;
|
|
828
|
-
|
|
622
|
+
T(function() {
|
|
829
623
|
if (n._throwIfClosed(), !n.isStopped) {
|
|
830
624
|
n.hasError = n.isStopped = !0, n.thrownError = e;
|
|
831
625
|
for (var o = n.observers; o.length; )
|
|
@@ -834,7 +628,7 @@ var fe = (function(t) {
|
|
|
834
628
|
});
|
|
835
629
|
}, r.prototype.complete = function() {
|
|
836
630
|
var e = this;
|
|
837
|
-
|
|
631
|
+
T(function() {
|
|
838
632
|
if (e._throwIfClosed(), !e.isStopped) {
|
|
839
633
|
e.isStopped = !0;
|
|
840
634
|
for (var n = e.observers; n.length; )
|
|
@@ -856,20 +650,20 @@ var fe = (function(t) {
|
|
|
856
650
|
return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
|
|
857
651
|
}, r.prototype._innerSubscribe = function(e) {
|
|
858
652
|
var n = this, o = this, i = o.hasError, a = o.isStopped, u = o.observers;
|
|
859
|
-
return i || a ?
|
|
860
|
-
n.currentObservers = null,
|
|
653
|
+
return i || a ? ot : (this.currentObservers = null, u.push(e), new L(function() {
|
|
654
|
+
n.currentObservers = null, H(u, e);
|
|
861
655
|
}));
|
|
862
656
|
}, r.prototype._checkFinalizedStatuses = function(e) {
|
|
863
657
|
var n = this, o = n.hasError, i = n.thrownError, a = n.isStopped;
|
|
864
658
|
o ? e.error(i) : a && e.complete();
|
|
865
659
|
}, r.prototype.asObservable = function() {
|
|
866
|
-
var e = new
|
|
660
|
+
var e = new S();
|
|
867
661
|
return e.source = this, e;
|
|
868
662
|
}, r.create = function(e, n) {
|
|
869
|
-
return new
|
|
663
|
+
return new tt(e, n);
|
|
870
664
|
}, r;
|
|
871
|
-
})(
|
|
872
|
-
|
|
665
|
+
})(S), tt = (function(t) {
|
|
666
|
+
I(r, t);
|
|
873
667
|
function r(e, n) {
|
|
874
668
|
var o = t.call(this) || this;
|
|
875
669
|
return o.destination = e, o.source = n, o;
|
|
@@ -885,47 +679,47 @@ var fe = (function(t) {
|
|
|
885
679
|
(n = (e = this.destination) === null || e === void 0 ? void 0 : e.complete) === null || n === void 0 || n.call(e);
|
|
886
680
|
}, r.prototype._subscribe = function(e) {
|
|
887
681
|
var n, o;
|
|
888
|
-
return (o = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(e)) !== null && o !== void 0 ? o :
|
|
682
|
+
return (o = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(e)) !== null && o !== void 0 ? o : ot;
|
|
889
683
|
}, r;
|
|
890
|
-
})(
|
|
684
|
+
})(st), ct = (function(t) {
|
|
891
685
|
return t && typeof t.length == "number" && typeof t != "function";
|
|
892
686
|
});
|
|
893
|
-
function
|
|
894
|
-
return
|
|
687
|
+
function ut(t) {
|
|
688
|
+
return m(t == null ? void 0 : t.then);
|
|
895
689
|
}
|
|
896
|
-
function
|
|
897
|
-
return
|
|
690
|
+
function lt(t) {
|
|
691
|
+
return m(t[B]);
|
|
898
692
|
}
|
|
899
|
-
function
|
|
900
|
-
return Symbol.asyncIterator &&
|
|
693
|
+
function ft(t) {
|
|
694
|
+
return Symbol.asyncIterator && m(t == null ? void 0 : t[Symbol.asyncIterator]);
|
|
901
695
|
}
|
|
902
|
-
function
|
|
696
|
+
function dt(t) {
|
|
903
697
|
return new TypeError("You provided " + (t !== null && typeof t == "object" ? "an invalid object" : "'" + t + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
|
|
904
698
|
}
|
|
905
|
-
function
|
|
699
|
+
function Wt() {
|
|
906
700
|
return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
|
|
907
701
|
}
|
|
908
|
-
var
|
|
909
|
-
function
|
|
910
|
-
return
|
|
702
|
+
var ht = Wt();
|
|
703
|
+
function pt(t) {
|
|
704
|
+
return m(t == null ? void 0 : t[ht]);
|
|
911
705
|
}
|
|
912
|
-
function
|
|
913
|
-
return
|
|
706
|
+
function vt(t) {
|
|
707
|
+
return Rt(this, arguments, function() {
|
|
914
708
|
var e, n, o, i;
|
|
915
|
-
return
|
|
709
|
+
return rt(this, function(a) {
|
|
916
710
|
switch (a.label) {
|
|
917
711
|
case 0:
|
|
918
712
|
e = t.getReader(), a.label = 1;
|
|
919
713
|
case 1:
|
|
920
714
|
a.trys.push([1, , 9, 10]), a.label = 2;
|
|
921
715
|
case 2:
|
|
922
|
-
return [4,
|
|
716
|
+
return [4, O(e.read())];
|
|
923
717
|
case 3:
|
|
924
|
-
return n = a.sent(), o = n.value, i = n.done, i ? [4,
|
|
718
|
+
return n = a.sent(), o = n.value, i = n.done, i ? [4, O(void 0)] : [3, 5];
|
|
925
719
|
case 4:
|
|
926
720
|
return [2, a.sent()];
|
|
927
721
|
case 5:
|
|
928
|
-
return [4,
|
|
722
|
+
return [4, O(o)];
|
|
929
723
|
case 6:
|
|
930
724
|
return [4, a.sent()];
|
|
931
725
|
case 7:
|
|
@@ -940,57 +734,57 @@ function Nt(t) {
|
|
|
940
734
|
});
|
|
941
735
|
});
|
|
942
736
|
}
|
|
943
|
-
function
|
|
944
|
-
return
|
|
737
|
+
function yt(t) {
|
|
738
|
+
return m(t == null ? void 0 : t.getReader);
|
|
945
739
|
}
|
|
946
|
-
function
|
|
947
|
-
if (t instanceof
|
|
740
|
+
function F(t) {
|
|
741
|
+
if (t instanceof S)
|
|
948
742
|
return t;
|
|
949
743
|
if (t != null) {
|
|
950
|
-
if (
|
|
951
|
-
return
|
|
952
|
-
if (
|
|
953
|
-
return
|
|
954
|
-
if (
|
|
955
|
-
return
|
|
956
|
-
if (
|
|
957
|
-
return
|
|
958
|
-
if (
|
|
959
|
-
return
|
|
960
|
-
if (
|
|
961
|
-
return
|
|
744
|
+
if (lt(t))
|
|
745
|
+
return Gt(t);
|
|
746
|
+
if (ct(t))
|
|
747
|
+
return Ht(t);
|
|
748
|
+
if (ut(t))
|
|
749
|
+
return zt(t);
|
|
750
|
+
if (ft(t))
|
|
751
|
+
return mt(t);
|
|
752
|
+
if (pt(t))
|
|
753
|
+
return Yt(t);
|
|
754
|
+
if (yt(t))
|
|
755
|
+
return Xt(t);
|
|
962
756
|
}
|
|
963
|
-
throw
|
|
757
|
+
throw dt(t);
|
|
964
758
|
}
|
|
965
|
-
function
|
|
966
|
-
return new
|
|
967
|
-
var e = t[
|
|
968
|
-
if (
|
|
759
|
+
function Gt(t) {
|
|
760
|
+
return new S(function(r) {
|
|
761
|
+
var e = t[B]();
|
|
762
|
+
if (m(e.subscribe))
|
|
969
763
|
return e.subscribe(r);
|
|
970
764
|
throw new TypeError("Provided object does not correctly implement Symbol.observable");
|
|
971
765
|
});
|
|
972
766
|
}
|
|
973
|
-
function
|
|
974
|
-
return new
|
|
767
|
+
function Ht(t) {
|
|
768
|
+
return new S(function(r) {
|
|
975
769
|
for (var e = 0; e < t.length && !r.closed; e++)
|
|
976
770
|
r.next(t[e]);
|
|
977
771
|
r.complete();
|
|
978
772
|
});
|
|
979
773
|
}
|
|
980
|
-
function
|
|
981
|
-
return new
|
|
774
|
+
function zt(t) {
|
|
775
|
+
return new S(function(r) {
|
|
982
776
|
t.then(function(e) {
|
|
983
777
|
r.closed || (r.next(e), r.complete());
|
|
984
778
|
}, function(e) {
|
|
985
779
|
return r.error(e);
|
|
986
|
-
}).then(null,
|
|
780
|
+
}).then(null, at);
|
|
987
781
|
});
|
|
988
782
|
}
|
|
989
|
-
function
|
|
990
|
-
return new
|
|
783
|
+
function Yt(t) {
|
|
784
|
+
return new S(function(r) {
|
|
991
785
|
var e, n;
|
|
992
786
|
try {
|
|
993
|
-
for (var o =
|
|
787
|
+
for (var o = P(t), i = o.next(); !i.done; i = o.next()) {
|
|
994
788
|
var a = i.value;
|
|
995
789
|
if (r.next(a), r.closed)
|
|
996
790
|
return;
|
|
@@ -1007,24 +801,24 @@ function we(t) {
|
|
|
1007
801
|
r.complete();
|
|
1008
802
|
});
|
|
1009
803
|
}
|
|
1010
|
-
function
|
|
1011
|
-
return new
|
|
1012
|
-
|
|
804
|
+
function mt(t) {
|
|
805
|
+
return new S(function(r) {
|
|
806
|
+
Bt(t, r).catch(function(e) {
|
|
1013
807
|
return r.error(e);
|
|
1014
808
|
});
|
|
1015
809
|
});
|
|
1016
810
|
}
|
|
1017
|
-
function
|
|
1018
|
-
return
|
|
811
|
+
function Xt(t) {
|
|
812
|
+
return mt(vt(t));
|
|
1019
813
|
}
|
|
1020
|
-
function
|
|
814
|
+
function Bt(t, r) {
|
|
1021
815
|
var e, n, o, i;
|
|
1022
|
-
return
|
|
816
|
+
return At(this, void 0, void 0, function() {
|
|
1023
817
|
var a, u;
|
|
1024
|
-
return
|
|
818
|
+
return rt(this, function(s) {
|
|
1025
819
|
switch (s.label) {
|
|
1026
820
|
case 0:
|
|
1027
|
-
s.trys.push([0, 5, 6, 11]), e =
|
|
821
|
+
s.trys.push([0, 5, 6, 11]), e = Tt(t), s.label = 1;
|
|
1028
822
|
case 1:
|
|
1029
823
|
return [4, e.next()];
|
|
1030
824
|
case 2:
|
|
@@ -1055,7 +849,7 @@ function be(t, r) {
|
|
|
1055
849
|
});
|
|
1056
850
|
});
|
|
1057
851
|
}
|
|
1058
|
-
function
|
|
852
|
+
function E(t, r, e, n, o) {
|
|
1059
853
|
n === void 0 && (n = 0), o === void 0 && (o = !1);
|
|
1060
854
|
var i = r.schedule(function() {
|
|
1061
855
|
e(), o ? t.add(this.schedule(null, n)) : this.unsubscribe();
|
|
@@ -1063,49 +857,49 @@ function x(t, r, e, n, o) {
|
|
|
1063
857
|
if (t.add(i), !o)
|
|
1064
858
|
return i;
|
|
1065
859
|
}
|
|
1066
|
-
function
|
|
1067
|
-
return r === void 0 && (r = 0),
|
|
1068
|
-
e.subscribe(
|
|
1069
|
-
return
|
|
860
|
+
function wt(t, r) {
|
|
861
|
+
return r === void 0 && (r = 0), J(function(e, n) {
|
|
862
|
+
e.subscribe(Y(n, function(o) {
|
|
863
|
+
return E(n, t, function() {
|
|
1070
864
|
return n.next(o);
|
|
1071
865
|
}, r);
|
|
1072
866
|
}, function() {
|
|
1073
|
-
return
|
|
867
|
+
return E(n, t, function() {
|
|
1074
868
|
return n.complete();
|
|
1075
869
|
}, r);
|
|
1076
870
|
}, function(o) {
|
|
1077
|
-
return
|
|
871
|
+
return E(n, t, function() {
|
|
1078
872
|
return n.error(o);
|
|
1079
873
|
}, r);
|
|
1080
874
|
}));
|
|
1081
875
|
});
|
|
1082
876
|
}
|
|
1083
|
-
function
|
|
1084
|
-
return r === void 0 && (r = 0),
|
|
877
|
+
function bt(t, r) {
|
|
878
|
+
return r === void 0 && (r = 0), J(function(e, n) {
|
|
1085
879
|
n.add(t.schedule(function() {
|
|
1086
880
|
return e.subscribe(n);
|
|
1087
881
|
}, r));
|
|
1088
882
|
});
|
|
1089
883
|
}
|
|
1090
|
-
function
|
|
1091
|
-
return
|
|
884
|
+
function Jt(t, r) {
|
|
885
|
+
return F(t).pipe(bt(r), wt(r));
|
|
1092
886
|
}
|
|
1093
|
-
function
|
|
1094
|
-
return
|
|
887
|
+
function Kt(t, r) {
|
|
888
|
+
return F(t).pipe(bt(r), wt(r));
|
|
1095
889
|
}
|
|
1096
|
-
function
|
|
1097
|
-
return new
|
|
890
|
+
function Qt(t, r) {
|
|
891
|
+
return new S(function(e) {
|
|
1098
892
|
var n = 0;
|
|
1099
893
|
return r.schedule(function() {
|
|
1100
894
|
n === t.length ? e.complete() : (e.next(t[n++]), e.closed || this.schedule());
|
|
1101
895
|
});
|
|
1102
896
|
});
|
|
1103
897
|
}
|
|
1104
|
-
function
|
|
1105
|
-
return new
|
|
898
|
+
function Zt(t, r) {
|
|
899
|
+
return new S(function(e) {
|
|
1106
900
|
var n;
|
|
1107
|
-
return
|
|
1108
|
-
n = t[
|
|
901
|
+
return E(e, r, function() {
|
|
902
|
+
n = t[ht](), E(e, r, function() {
|
|
1109
903
|
var o, i, a;
|
|
1110
904
|
try {
|
|
1111
905
|
o = n.next(), i = o.value, a = o.done;
|
|
@@ -1116,17 +910,17 @@ function Ee(t, r) {
|
|
|
1116
910
|
a ? e.complete() : e.next(i);
|
|
1117
911
|
}, 0, !0);
|
|
1118
912
|
}), function() {
|
|
1119
|
-
return
|
|
913
|
+
return m(n == null ? void 0 : n.return) && n.return();
|
|
1120
914
|
};
|
|
1121
915
|
});
|
|
1122
916
|
}
|
|
1123
|
-
function
|
|
917
|
+
function gt(t, r) {
|
|
1124
918
|
if (!t)
|
|
1125
919
|
throw new Error("Iterable cannot be null");
|
|
1126
|
-
return new
|
|
1127
|
-
|
|
920
|
+
return new S(function(e) {
|
|
921
|
+
E(e, r, function() {
|
|
1128
922
|
var n = t[Symbol.asyncIterator]();
|
|
1129
|
-
|
|
923
|
+
E(e, r, function() {
|
|
1130
924
|
n.next().then(function(o) {
|
|
1131
925
|
o.done ? e.complete() : e.next(o.value);
|
|
1132
926
|
});
|
|
@@ -1134,72 +928,49 @@ function Ft(t, r) {
|
|
|
1134
928
|
});
|
|
1135
929
|
});
|
|
1136
930
|
}
|
|
1137
|
-
function
|
|
1138
|
-
return
|
|
931
|
+
function te(t, r) {
|
|
932
|
+
return gt(vt(t), r);
|
|
1139
933
|
}
|
|
1140
|
-
function
|
|
934
|
+
function ee(t, r) {
|
|
1141
935
|
if (t != null) {
|
|
1142
|
-
if (
|
|
1143
|
-
return
|
|
1144
|
-
if (
|
|
1145
|
-
return
|
|
1146
|
-
if (
|
|
1147
|
-
return
|
|
1148
|
-
if (
|
|
1149
|
-
return
|
|
1150
|
-
if (
|
|
1151
|
-
return
|
|
1152
|
-
if (
|
|
1153
|
-
return
|
|
936
|
+
if (lt(t))
|
|
937
|
+
return Jt(t, r);
|
|
938
|
+
if (ct(t))
|
|
939
|
+
return Qt(t, r);
|
|
940
|
+
if (ut(t))
|
|
941
|
+
return Kt(t, r);
|
|
942
|
+
if (ft(t))
|
|
943
|
+
return gt(t, r);
|
|
944
|
+
if (pt(t))
|
|
945
|
+
return Zt(t, r);
|
|
946
|
+
if (yt(t))
|
|
947
|
+
return te(t, r);
|
|
1154
948
|
}
|
|
1155
|
-
throw
|
|
1156
|
-
}
|
|
1157
|
-
function Ie(t, r) {
|
|
1158
|
-
return r ? Pe(t, r) : B(t);
|
|
949
|
+
throw dt(t);
|
|
1159
950
|
}
|
|
1160
|
-
function
|
|
1161
|
-
return
|
|
1162
|
-
var o = 0;
|
|
1163
|
-
e.subscribe(C(n, function(i) {
|
|
1164
|
-
return t.call(r, i, o++) && n.next(i);
|
|
1165
|
-
}));
|
|
1166
|
-
});
|
|
951
|
+
function re(t, r) {
|
|
952
|
+
return r ? ee(t, r) : F(t);
|
|
1167
953
|
}
|
|
1168
|
-
function
|
|
1169
|
-
return
|
|
1170
|
-
var o =
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
954
|
+
function ne(t, r) {
|
|
955
|
+
return J(function(e, n) {
|
|
956
|
+
var o = null, i = 0, a = !1, u = function() {
|
|
957
|
+
return a && !o && n.complete();
|
|
958
|
+
};
|
|
959
|
+
e.subscribe(Y(n, function(s) {
|
|
960
|
+
o == null || o.unsubscribe();
|
|
961
|
+
var c = 0, f = i++;
|
|
962
|
+
F(t(s, f)).subscribe(o = Y(n, function(d) {
|
|
963
|
+
return n.next(r ? r(s, d, f, c++) : d);
|
|
964
|
+
}, function() {
|
|
965
|
+
o = null, u();
|
|
966
|
+
}));
|
|
1175
967
|
}, function() {
|
|
1176
|
-
a = !0,
|
|
968
|
+
a = !0, u();
|
|
1177
969
|
}));
|
|
1178
970
|
});
|
|
1179
971
|
}
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
return n ? V(function(o, i) {
|
|
1183
|
-
var a;
|
|
1184
|
-
(a = n.subscribe) === null || a === void 0 || a.call(n);
|
|
1185
|
-
var u = !0;
|
|
1186
|
-
o.subscribe(C(i, function(s) {
|
|
1187
|
-
var c;
|
|
1188
|
-
(c = n.next) === null || c === void 0 || c.call(n, s), i.next(s);
|
|
1189
|
-
}, function() {
|
|
1190
|
-
var s;
|
|
1191
|
-
u = !1, (s = n.complete) === null || s === void 0 || s.call(n), i.complete();
|
|
1192
|
-
}, function(s) {
|
|
1193
|
-
var c;
|
|
1194
|
-
u = !1, (c = n.error) === null || c === void 0 || c.call(n, s), i.error(s);
|
|
1195
|
-
}, function() {
|
|
1196
|
-
var s, c;
|
|
1197
|
-
u && ((s = n.unsubscribe) === null || s === void 0 || s.call(n)), (c = n.finalize) === null || c === void 0 || c.call(n);
|
|
1198
|
-
}));
|
|
1199
|
-
}) : Et;
|
|
1200
|
-
}
|
|
1201
|
-
const Re = Xt(), je = 1e4;
|
|
1202
|
-
function Ne(t, r, e) {
|
|
972
|
+
const oe = 1e4;
|
|
973
|
+
function ie(t, r, e) {
|
|
1203
974
|
return Promise.race([
|
|
1204
975
|
t,
|
|
1205
976
|
new Promise((n, o) => {
|
|
@@ -1212,84 +983,66 @@ function Ne(t, r, e) {
|
|
|
1212
983
|
})
|
|
1213
984
|
]);
|
|
1214
985
|
}
|
|
1215
|
-
const
|
|
1216
|
-
let
|
|
1217
|
-
function
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
(
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
}
|
|
1232
|
-
Vt.pipe(
|
|
1233
|
-
// Skip navigation if we just completed navigating to the same URL
|
|
1234
|
-
// (prevents double navigation from click handler + pushstate listener)
|
|
1235
|
-
Ae((t) => t.url === at && !t.update ? (console.log("[NAVIGATION] Skipping duplicate navigation to", t.url), !1) : !0),
|
|
1236
|
-
// Capture every event - if we're busy, this becomes the pending navigation
|
|
1237
|
-
Te((t) => {
|
|
1238
|
-
L && (console.log("[NAVIGATION] Queueing navigation to", t.url, "(current navigation in progress)"), D = t);
|
|
1239
|
-
}),
|
|
1240
|
-
// Use exhaustMap but wrap in try-catch with timeout to NEVER let the stream die or hang
|
|
1241
|
-
xe((t) => Ie(Ne(Le(t), je, () => {
|
|
1242
|
-
console.error("[NAVIGATION] Navigation timed out, resetting state"), L = !1;
|
|
1243
|
-
}).catch((r) => {
|
|
1244
|
-
console.error("[NAVIGATION] Navigation failed, recovering:", r);
|
|
1245
|
-
})))
|
|
1246
|
-
).subscribe({
|
|
1247
|
-
next: ke,
|
|
1248
|
-
// This should never fire now, but just in case
|
|
986
|
+
const St = new st();
|
|
987
|
+
let j = 0, U = null;
|
|
988
|
+
function ae(t) {
|
|
989
|
+
t && t.redirectPath && (console.log("[NAV] Handling redirect to", t.redirectPath), setTimeout(
|
|
990
|
+
() => {
|
|
991
|
+
window.dispatchEvent(new CustomEvent("forge-redirect", { detail: { path: t.redirectPath } }));
|
|
992
|
+
},
|
|
993
|
+
0
|
|
994
|
+
));
|
|
995
|
+
}
|
|
996
|
+
St.pipe(ne((t) => re(ie(ue(t), oe, () => {
|
|
997
|
+
console.error("[NAV] Navigation timed out"), j++, U && (U.abort(), U = null);
|
|
998
|
+
}).catch((r) => {
|
|
999
|
+
console.error("[NAV] Navigation failed:", r);
|
|
1000
|
+
})))).subscribe({
|
|
1001
|
+
next: ae,
|
|
1249
1002
|
error: (t) => {
|
|
1250
|
-
console.error("[
|
|
1003
|
+
console.error("[NAV] Stream error:", t);
|
|
1251
1004
|
}
|
|
1252
1005
|
});
|
|
1253
|
-
function
|
|
1254
|
-
|
|
1006
|
+
function se(t) {
|
|
1007
|
+
St.next(t);
|
|
1255
1008
|
}
|
|
1256
|
-
const
|
|
1009
|
+
const w = et.proxy({
|
|
1257
1010
|
layouts: [],
|
|
1258
1011
|
view: null,
|
|
1259
1012
|
data: null,
|
|
1260
1013
|
params: null,
|
|
1261
1014
|
urlParams: null,
|
|
1262
1015
|
query: null,
|
|
1263
|
-
page:
|
|
1016
|
+
page: b
|
|
1264
1017
|
});
|
|
1265
|
-
function
|
|
1018
|
+
function N(...t) {
|
|
1266
1019
|
let r = t.map((e, n) => n === 0 ? e.replace(/\/+$/, "") : e.replace(/^\/+|\/+$/g, "")).join("/");
|
|
1267
1020
|
return r.startsWith("/") || (r = "/" + r), r.split("?")[0];
|
|
1268
1021
|
}
|
|
1269
|
-
async function
|
|
1022
|
+
async function ce(t, r, e, n, o, i) {
|
|
1270
1023
|
try {
|
|
1271
|
-
const a = typeof r == "string" && r.indexOf("assets") !== -1, u = (e.layout || []).map((
|
|
1272
|
-
let
|
|
1273
|
-
return a && (
|
|
1024
|
+
const a = typeof r == "string" && r.indexOf("assets") !== -1, u = (e.layout || []).map((d) => {
|
|
1025
|
+
let h = N(r, d).toString();
|
|
1026
|
+
return a && (h = h.endsWith(".svelte") ? h.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(h) ? h : h + ".js"), h;
|
|
1274
1027
|
});
|
|
1275
|
-
let s =
|
|
1028
|
+
let s = N(r, e.view).toString();
|
|
1276
1029
|
a && (s = s.endsWith(".svelte") ? s.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(s) ? s : s + ".js");
|
|
1277
|
-
const c = await Promise.all(u.map((
|
|
1030
|
+
const c = await Promise.all(u.map((d) => import(
|
|
1278
1031
|
/* @vite-ignore */
|
|
1279
|
-
|
|
1280
|
-
).then((
|
|
1032
|
+
d
|
|
1033
|
+
).then((h) => h.default)));
|
|
1281
1034
|
s.startsWith("/") || (s = "/" + s);
|
|
1282
|
-
const
|
|
1035
|
+
const f = await import(
|
|
1283
1036
|
/* @vite-ignore */
|
|
1284
1037
|
s
|
|
1285
|
-
).then((
|
|
1286
|
-
|
|
1038
|
+
).then((d) => d.default);
|
|
1039
|
+
w.layouts = c, w.view = f, w.params = n, w.data = window.__INITIAL_DATA__, w.urlParams = o, w.query = i, Ot(Pt, { target: t, props: w });
|
|
1287
1040
|
} catch (a) {
|
|
1288
1041
|
console.error("Client-side route loading failed:", a);
|
|
1289
1042
|
}
|
|
1290
1043
|
}
|
|
1291
|
-
function
|
|
1292
|
-
|
|
1044
|
+
function V(t, r, e, n, o, i, a = !1, u = !0) {
|
|
1045
|
+
se({
|
|
1293
1046
|
url: t,
|
|
1294
1047
|
base_path: r,
|
|
1295
1048
|
route: e,
|
|
@@ -1297,10 +1050,10 @@ function $(t, r, e, n, o, i, a = !1, u = !0) {
|
|
|
1297
1050
|
urlParams: o,
|
|
1298
1051
|
query: i,
|
|
1299
1052
|
server_loading: a,
|
|
1300
|
-
|
|
1053
|
+
updateUrl: u
|
|
1301
1054
|
});
|
|
1302
1055
|
}
|
|
1303
|
-
async function
|
|
1056
|
+
async function ue(t) {
|
|
1304
1057
|
const {
|
|
1305
1058
|
url: r,
|
|
1306
1059
|
base_path: e,
|
|
@@ -1309,68 +1062,63 @@ async function Le(t) {
|
|
|
1309
1062
|
urlParams: i,
|
|
1310
1063
|
query: a,
|
|
1311
1064
|
server_loading: u,
|
|
1312
|
-
|
|
1313
|
-
} = t;
|
|
1314
|
-
|
|
1315
|
-
url: r,
|
|
1316
|
-
server_loading: u,
|
|
1317
|
-
route_path: n.path,
|
|
1318
|
-
route_middleware: n.middleware
|
|
1319
|
-
});
|
|
1065
|
+
updateUrl: s
|
|
1066
|
+
} = t, c = ++j, f = new AbortController();
|
|
1067
|
+
U = f, console.log("[NAV] Starting navigation", { navigationId: c, url: r, updateUrl: s });
|
|
1320
1068
|
try {
|
|
1321
|
-
let
|
|
1069
|
+
let d = null, h = !1, l = null;
|
|
1322
1070
|
if (u) {
|
|
1323
|
-
|
|
1324
|
-
const S = {
|
|
1071
|
+
const _ = {
|
|
1325
1072
|
method: n.method,
|
|
1326
1073
|
headers: {
|
|
1327
1074
|
"Content-Type": "application/json",
|
|
1328
1075
|
Accept: "application/json"
|
|
1329
|
-
}
|
|
1076
|
+
},
|
|
1077
|
+
signal: f.signal
|
|
1330
1078
|
};
|
|
1331
|
-
if (
|
|
1332
|
-
if (console.log("[
|
|
1079
|
+
if (_[_t] = !0, await fetch(r, _).then((y) => {
|
|
1080
|
+
if (console.log("[NAV] Fetch response", {
|
|
1333
1081
|
url: r,
|
|
1334
1082
|
ok: y.ok,
|
|
1335
1083
|
status: y.status,
|
|
1336
|
-
|
|
1337
|
-
redirected: y.redirected,
|
|
1338
|
-
finalUrl: y.url
|
|
1084
|
+
redirected: y.redirected
|
|
1339
1085
|
}), y.redirected || y.headers.get("X-Forge-Redirect") === "true")
|
|
1340
|
-
return console.log("[
|
|
1086
|
+
return console.log("[NAV] Redirect detected"), h = !0, l = y.headers.get("X-Forge-Redirect-Path"), null;
|
|
1341
1087
|
if (y.ok)
|
|
1342
1088
|
return y.json();
|
|
1343
1089
|
throw new Error("Network response was not ok");
|
|
1344
1090
|
}).then((y) => {
|
|
1345
|
-
|
|
1346
|
-
}),
|
|
1347
|
-
return
|
|
1091
|
+
d = y;
|
|
1092
|
+
}), h)
|
|
1093
|
+
return { redirectPath: l || void 0 };
|
|
1348
1094
|
}
|
|
1349
|
-
const
|
|
1350
|
-
let y =
|
|
1351
|
-
return
|
|
1095
|
+
const v = typeof e == "string" && e.indexOf("assets") !== -1, p = (n.layout || []).map((_) => {
|
|
1096
|
+
let y = N(e, _).toString();
|
|
1097
|
+
return v && (y = y.endsWith(".svelte") ? y.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(y) ? y : y + ".js"), y;
|
|
1352
1098
|
});
|
|
1353
|
-
let
|
|
1354
|
-
|
|
1355
|
-
const
|
|
1099
|
+
let g = N(e, n.view).toString();
|
|
1100
|
+
v && (g = g.endsWith(".svelte") ? g.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(g) ? g : g + ".js");
|
|
1101
|
+
const x = await Promise.all(p.map((_) => import(
|
|
1356
1102
|
/* @vite-ignore */
|
|
1357
|
-
|
|
1358
|
-
).then((y) => y.default))),
|
|
1103
|
+
_
|
|
1104
|
+
).then((y) => y.default))), A = await import(
|
|
1359
1105
|
/* @vite-ignore */
|
|
1360
|
-
|
|
1361
|
-
).then((
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1106
|
+
g
|
|
1107
|
+
).then((_) => _.default);
|
|
1108
|
+
if (c !== j) {
|
|
1109
|
+
console.log("[NAV] Stale navigation, skipping update", { navigationId: c, currentNavigationId: j });
|
|
1110
|
+
return;
|
|
1111
|
+
}
|
|
1112
|
+
u ? w.data = d : w.data = { layout: [], view: {} }, w.params = o, w.layouts = x, w.view = A, w.urlParams = i, w.query = a, window && window.scroll(0, 0), s && window.history.pushState({}, "", r), console.log("[NAV] Navigation complete", { url: r });
|
|
1113
|
+
} catch (d) {
|
|
1114
|
+
throw console.error("[NAV] Navigation failed for URL:", r, d), d;
|
|
1367
1115
|
}
|
|
1368
1116
|
}
|
|
1369
|
-
const
|
|
1370
|
-
async function
|
|
1371
|
-
Object.assign(
|
|
1117
|
+
const k = et.proxy({});
|
|
1118
|
+
async function le() {
|
|
1119
|
+
Object.assign(k, window.__MANIFEST__);
|
|
1372
1120
|
}
|
|
1373
|
-
function
|
|
1121
|
+
function fe(t, r, e) {
|
|
1374
1122
|
if (!document) {
|
|
1375
1123
|
console.error("Document not found");
|
|
1376
1124
|
return;
|
|
@@ -1385,67 +1133,40 @@ function Fe(t, r, e) {
|
|
|
1385
1133
|
return;
|
|
1386
1134
|
}
|
|
1387
1135
|
if (s && s.startsWith("/") || s.startsWith(".")) {
|
|
1388
|
-
const c = s.split("?")[0],
|
|
1389
|
-
if (
|
|
1136
|
+
const c = s.split("?")[0], f = i.getAttribute("method") || "get", d = r.find((h) => h.method.toLowerCase() === f && e.find((l) => l.parser(c) && l.pattern === h.path));
|
|
1137
|
+
if (d) {
|
|
1390
1138
|
n.preventDefault();
|
|
1391
|
-
const
|
|
1392
|
-
console.log("[EVENTS]
|
|
1393
|
-
pattern: d == null ? void 0 : d.pattern,
|
|
1394
|
-
requires_server_data: S,
|
|
1395
|
-
manifest_store: R,
|
|
1396
|
-
middleware: h.middleware
|
|
1397
|
-
}), $(s, t, h, I, f, w, S);
|
|
1139
|
+
const h = e.find((A) => A.parser(c) && A.pattern === d.path), l = (h == null ? void 0 : h.parser(c)) || {}, v = new URLSearchParams(s.split("?")[1] || ""), p = Object.fromEntries(v.entries()) || {}, g = { ...l, ...p }, x = k[h == null ? void 0 : h.pattern];
|
|
1140
|
+
b.url = s, b.pathname = c, b.params = l, b.query = p, console.log("[EVENTS] Click navigation to", s), V(s, t, d, g, l, p, x, !0);
|
|
1398
1141
|
} else
|
|
1399
1142
|
console.log("No matching route found for URL:", s, "- using fallback navigation");
|
|
1400
1143
|
}
|
|
1401
1144
|
}
|
|
1402
1145
|
}), window.addEventListener("popstate", (n) => {
|
|
1403
1146
|
const o = window.location.pathname, i = window.location.pathname + window.location.search;
|
|
1404
|
-
|
|
1147
|
+
b.url = i, b.pathname = window.location.pathname;
|
|
1405
1148
|
const a = "get", u = r.find((s) => s.method.toLowerCase() === a && e.find((c) => c.parser(o) && c.pattern === s.path));
|
|
1406
1149
|
if (u) {
|
|
1407
|
-
const s = e.find((v) => v.parser(o) && v.pattern === u.path), c = (s == null ? void 0 : s.parser(o)) || {},
|
|
1408
|
-
|
|
1409
|
-
const
|
|
1410
|
-
|
|
1150
|
+
const s = e.find((v) => v.parser(o) && v.pattern === u.path), c = (s == null ? void 0 : s.parser(o)) || {}, f = new URLSearchParams(window.location.search), d = Object.fromEntries(f.entries()) || {};
|
|
1151
|
+
b.params = c, b.query = d;
|
|
1152
|
+
const h = { ...c, ...d }, l = k[s == null ? void 0 : s.pattern];
|
|
1153
|
+
console.log("[EVENTS] Popstate navigation to", i), V(i, t, u, h, c, d, l, !1);
|
|
1411
1154
|
} else
|
|
1412
1155
|
console.log("No matching route found for popstate navigation to:", o, "- using fallback navigation"), window.location.href = o;
|
|
1413
|
-
}), (
|
|
1414
|
-
const
|
|
1415
|
-
|
|
1416
|
-
const a = n.apply(this, i), u = new Event("pushstate");
|
|
1417
|
-
return u.state = i[0], u.url = i[2], window.dispatchEvent(u), a;
|
|
1418
|
-
}, history.replaceState = function(...i) {
|
|
1419
|
-
const a = o.apply(this, i), u = i[2], s = window.location.pathname;
|
|
1420
|
-
if ((u ? new URL(u, window.location.origin).pathname : s) !== s) {
|
|
1421
|
-
const l = new Event("replacestate");
|
|
1422
|
-
l.state = i[0], l.url = i[2], window.dispatchEvent(l);
|
|
1423
|
-
}
|
|
1424
|
-
return a;
|
|
1425
|
-
};
|
|
1426
|
-
})(), window.addEventListener("pushstate", (n) => {
|
|
1427
|
-
const o = n.url || window.location.pathname + window.location.search, i = o.split("?")[0], a = "get", u = r.find((s) => s.method.toLowerCase() === a && e.find((c) => c.parser(i) && c.pattern === s.path));
|
|
1428
|
-
if (u) {
|
|
1429
|
-
const s = e.find((v) => v.parser(i) && v.pattern === u.path), c = s == null ? void 0 : s.parser(i), l = new URLSearchParams(o.split("?")[1] || ""), h = Object.fromEntries(l.entries());
|
|
1430
|
-
E.url = o, E.pathname = window.location.pathname, Object.assign(E.params, c), Object.assign(E.query, h);
|
|
1431
|
-
const d = { ...c, ...h }, f = R[s == null ? void 0 : s.pattern];
|
|
1432
|
-
$(o, t, u, d, c, h, f, !1);
|
|
1433
|
-
} else
|
|
1434
|
-
console.log("No matching route found for pushstate to:", i, "- using fallback navigation"), window.location.href = i;
|
|
1435
|
-
}), window.addEventListener("replacestate", (n) => {
|
|
1436
|
-
const o = n.url || window.location.pathname + window.location.search, i = o.split("?")[0];
|
|
1437
|
-
E.url = o, E.pathname = window.location.pathname, E.query = Object.fromEntries(new URLSearchParams(o.split("?")[1] || ""));
|
|
1156
|
+
}), window.addEventListener("forge-redirect", ((n) => {
|
|
1157
|
+
const o = n.detail.path, i = o.split("?")[0];
|
|
1158
|
+
console.log("[EVENTS] Handling forge-redirect to:", o);
|
|
1438
1159
|
const a = "get", u = r.find((s) => s.method.toLowerCase() === a && e.find((c) => c.parser(i) && c.pattern === s.path));
|
|
1439
1160
|
if (u) {
|
|
1440
|
-
const s = e.find((v) => v.parser(i) && v.pattern === u.path), c = (s == null ? void 0 : s.parser(i)) || {},
|
|
1441
|
-
|
|
1161
|
+
const s = e.find((v) => v.parser(i) && v.pattern === u.path), c = (s == null ? void 0 : s.parser(i)) || {}, f = new URLSearchParams(o.split("?")[1] || ""), d = Object.fromEntries(f.entries()) || {}, h = { ...c, ...d }, l = k[s == null ? void 0 : s.pattern];
|
|
1162
|
+
b.url = o, b.pathname = i, b.params = c, b.query = d, V(o, t, u, h, c, d, l, !0);
|
|
1442
1163
|
} else
|
|
1443
|
-
console.log("No matching route found for
|
|
1444
|
-
});
|
|
1164
|
+
console.log("No matching route found for redirect to:", i, "- using fallback navigation"), window.location.href = i;
|
|
1165
|
+
}));
|
|
1445
1166
|
}
|
|
1446
|
-
const
|
|
1447
|
-
let
|
|
1448
|
-
function
|
|
1167
|
+
const _t = Symbol("forge-load-function");
|
|
1168
|
+
let C = [], M = null;
|
|
1169
|
+
function de(t) {
|
|
1449
1170
|
try {
|
|
1450
1171
|
const r = new URL(t, window.location.origin);
|
|
1451
1172
|
return r.origin === window.location.origin && !r.pathname.startsWith("/api/");
|
|
@@ -1453,27 +1174,27 @@ function Ve(t) {
|
|
|
1453
1174
|
return !t.startsWith("/api/");
|
|
1454
1175
|
}
|
|
1455
1176
|
}
|
|
1456
|
-
function
|
|
1457
|
-
typeof window < "u" && !
|
|
1177
|
+
function he() {
|
|
1178
|
+
typeof window < "u" && !M && (M = window.fetch, window.fetch = async function(t, r = {}) {
|
|
1458
1179
|
let e = { ...r };
|
|
1459
|
-
for (const i of
|
|
1180
|
+
for (const i of C)
|
|
1460
1181
|
try {
|
|
1461
1182
|
if (i.length === 2) {
|
|
1462
1183
|
const a = new Headers(e.headers), u = Object.fromEntries(a.entries());
|
|
1463
1184
|
await new Promise((s, c) => {
|
|
1464
1185
|
try {
|
|
1465
|
-
i(u, (
|
|
1466
|
-
if (
|
|
1467
|
-
c(
|
|
1186
|
+
i(u, (f) => {
|
|
1187
|
+
if (f)
|
|
1188
|
+
c(f);
|
|
1468
1189
|
else {
|
|
1469
|
-
const
|
|
1470
|
-
Object.entries(u).forEach(([
|
|
1471
|
-
|
|
1472
|
-
}), e.headers =
|
|
1190
|
+
const d = new Headers();
|
|
1191
|
+
Object.entries(u).forEach(([h, l]) => {
|
|
1192
|
+
l !== void 0 && d.set(h, l);
|
|
1193
|
+
}), e.headers = d, s();
|
|
1473
1194
|
}
|
|
1474
1195
|
});
|
|
1475
|
-
} catch (
|
|
1476
|
-
c(
|
|
1196
|
+
} catch (f) {
|
|
1197
|
+
c(f);
|
|
1477
1198
|
}
|
|
1478
1199
|
});
|
|
1479
1200
|
} else {
|
|
@@ -1483,13 +1204,13 @@ function qe() {
|
|
|
1483
1204
|
} catch (a) {
|
|
1484
1205
|
throw console.error("🔴 Middleware error:", a), a;
|
|
1485
1206
|
}
|
|
1486
|
-
const n = e == null ? void 0 : e[
|
|
1207
|
+
const n = e == null ? void 0 : e[_t];
|
|
1487
1208
|
console.log("[FETCH OVERRIDE] Request", {
|
|
1488
1209
|
url: t,
|
|
1489
1210
|
hasForgeSymbol: n,
|
|
1490
1211
|
headers: e == null ? void 0 : e.headers
|
|
1491
1212
|
});
|
|
1492
|
-
const o = await
|
|
1213
|
+
const o = await M(t, e);
|
|
1493
1214
|
if (console.log("[FETCH OVERRIDE] Response", {
|
|
1494
1215
|
url: t,
|
|
1495
1216
|
responseUrl: o.url,
|
|
@@ -1503,9 +1224,9 @@ function qe() {
|
|
|
1503
1224
|
requested: i,
|
|
1504
1225
|
final: a,
|
|
1505
1226
|
redirected: o.redirected
|
|
1506
|
-
}),
|
|
1227
|
+
}), de(a)) {
|
|
1507
1228
|
const u = new URL(a), s = u.pathname + u.search;
|
|
1508
|
-
return console.log("[FORGE REDIRECT]
|
|
1229
|
+
return console.log("[FORGE REDIRECT] Detected redirect to:", s, "- will navigate after current request completes"), new Response(JSON.stringify({ layout: [], view: {} }), {
|
|
1509
1230
|
status: 200,
|
|
1510
1231
|
headers: {
|
|
1511
1232
|
"Content-Type": "application/json",
|
|
@@ -1518,54 +1239,54 @@ function qe() {
|
|
|
1518
1239
|
return o;
|
|
1519
1240
|
});
|
|
1520
1241
|
}
|
|
1521
|
-
|
|
1522
|
-
const
|
|
1242
|
+
he();
|
|
1243
|
+
const me = {
|
|
1523
1244
|
/**
|
|
1524
1245
|
* Add middleware to the fetch pipeline
|
|
1525
1246
|
*/
|
|
1526
1247
|
configUpdate(t) {
|
|
1527
1248
|
if (typeof t != "function")
|
|
1528
1249
|
throw new Error("Middleware must be a function");
|
|
1529
|
-
|
|
1250
|
+
C.push(t);
|
|
1530
1251
|
},
|
|
1531
1252
|
/**
|
|
1532
1253
|
* Reset all middleware
|
|
1533
1254
|
*/
|
|
1534
1255
|
reset() {
|
|
1535
|
-
|
|
1256
|
+
C.length = 0;
|
|
1536
1257
|
},
|
|
1537
1258
|
/**
|
|
1538
1259
|
* Get current middleware count (for debugging)
|
|
1539
1260
|
*/
|
|
1540
1261
|
getMiddlewareCount() {
|
|
1541
|
-
return
|
|
1262
|
+
return C.length;
|
|
1542
1263
|
}
|
|
1543
1264
|
};
|
|
1544
|
-
let
|
|
1545
|
-
async function
|
|
1265
|
+
let $;
|
|
1266
|
+
async function we(t, r) {
|
|
1546
1267
|
let e = window.__COMPONENT_DIR__ || r.component_dir;
|
|
1547
1268
|
if (!e && typeof e != "string")
|
|
1548
1269
|
throw new Error("No component directory provided");
|
|
1549
1270
|
let n = window.__ROUTING__;
|
|
1550
|
-
if (
|
|
1551
|
-
const o = (window.location.pathname || "/").split("?")[0], i =
|
|
1271
|
+
if ($ = It(n), window && window.location) {
|
|
1272
|
+
const o = (window.location.pathname || "/").split("?")[0], i = $.find((u) => u.parser(o));
|
|
1552
1273
|
let a = i ? n.find((u) => u.path === i.pattern) : null;
|
|
1553
1274
|
if (i && a) {
|
|
1554
|
-
const u = i.parser(o) || {}, s = new URLSearchParams(window.location.search), c = Object.fromEntries(s.entries()) || {},
|
|
1555
|
-
|
|
1275
|
+
const u = i.parser(o) || {}, s = new URLSearchParams(window.location.search), c = Object.fromEntries(s.entries()) || {}, f = { ...u, ...c };
|
|
1276
|
+
le(), ce(t, e, a, f, u, c), fe(e, n, $);
|
|
1556
1277
|
} else
|
|
1557
1278
|
console.warn("No matching route found for:", o);
|
|
1558
1279
|
}
|
|
1559
1280
|
}
|
|
1560
1281
|
export {
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1282
|
+
k as MANIFEST_STORE,
|
|
1283
|
+
fe as bootstrap_events,
|
|
1284
|
+
we as createApp,
|
|
1285
|
+
me as fetch,
|
|
1286
|
+
ce as loadRoute,
|
|
1287
|
+
b as page,
|
|
1288
|
+
Se as shadowUrl,
|
|
1289
|
+
le as updateManifestStore,
|
|
1290
|
+
V as updateRoute
|
|
1570
1291
|
};
|
|
1571
1292
|
//# sourceMappingURL=client.mjs.map
|