@noego/forge 0.1.19 → 0.1.21
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.mjs +932 -737
- package/dist/client.mjs.map +1 -1
- package/dist/plugins-cjs/routing/html_render/html_render.js +4 -2
- package/dist/plugins-cjs/routing/html_render/html_render.js.map +1 -1
- package/dist/plugins-es/routing/html_render/html_render.js +4 -2
- package/dist/plugins-es/routing/html_render/html_render.js.map +1 -1
- package/dist/routing/html_render/html_render.js +4 -2
- package/dist/routing/html_render/html_render.js.map +1 -1
- package/dist-ssr/server.cjs +51 -46
- package/dist-ssr/server.cjs.map +1 -1
- package/dist-ssr/server.js +51 -46
- package/dist-ssr/server.js.map +1 -1
- package/dist-ssr/static.cjs +1 -1
- package/dist-ssr/static.js +1 -1
- package/dist-ssr/{url_parser-CCrM2TRM.js → url_parser-BY7Z0l_n.js} +253 -19
- package/dist-ssr/url_parser-BY7Z0l_n.js.map +1 -0
- package/dist-ssr/{url_parser-BWBuKJkA.cjs → url_parser-C-aLYzi3.cjs} +253 -19
- package/dist-ssr/url_parser-C-aLYzi3.cjs.map +1 -0
- package/package.json +2 -1
- package/dist-ssr/url_parser-BWBuKJkA.cjs.map +0 -1
- package/dist-ssr/url_parser-CCrM2TRM.js.map +0 -1
package/dist/client.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { p as
|
|
2
|
-
import { s as
|
|
1
|
+
import { p as He, a as D } from "./page.svelte-4uv4nQ2i.js";
|
|
2
|
+
import { s as mr } from "./page.svelte-4uv4nQ2i.js";
|
|
3
3
|
import "svelte/internal/client";
|
|
4
|
-
import { hydrate as
|
|
5
|
-
import
|
|
6
|
-
import { writable as
|
|
7
|
-
function
|
|
8
|
-
const
|
|
9
|
-
return (
|
|
10
|
-
const n =
|
|
4
|
+
import { hydrate as Ve } from "svelte";
|
|
5
|
+
import Ke from "../src/components/RecursiveRender.svelte";
|
|
6
|
+
import { writable as xe, get as N } from "svelte/store";
|
|
7
|
+
function Je(e) {
|
|
8
|
+
const t = new He(e);
|
|
9
|
+
return (r) => {
|
|
10
|
+
const n = t.match(r);
|
|
11
11
|
if (!n) return null;
|
|
12
12
|
const o = {};
|
|
13
13
|
for (const [i, a] of Object.entries(n))
|
|
@@ -15,35 +15,35 @@ function We(e) {
|
|
|
15
15
|
return o;
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
return e.map((
|
|
20
|
-
const
|
|
21
|
-
return { pattern:
|
|
18
|
+
function Xe(e) {
|
|
19
|
+
return e.map((t) => {
|
|
20
|
+
const r = t.path, n = Je(r);
|
|
21
|
+
return { pattern: r, parser: n };
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
var
|
|
25
|
-
return
|
|
26
|
-
|
|
27
|
-
} || function(
|
|
28
|
-
for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (
|
|
29
|
-
},
|
|
24
|
+
var se = function(e, t) {
|
|
25
|
+
return se = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
|
|
26
|
+
r.__proto__ = n;
|
|
27
|
+
} || function(r, n) {
|
|
28
|
+
for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (r[o] = n[o]);
|
|
29
|
+
}, se(e, t);
|
|
30
30
|
};
|
|
31
|
-
function
|
|
32
|
-
if (typeof
|
|
33
|
-
throw new TypeError("Class extends value " + String(
|
|
34
|
-
|
|
35
|
-
function
|
|
31
|
+
function M(e, t) {
|
|
32
|
+
if (typeof t != "function" && t !== null)
|
|
33
|
+
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
34
|
+
se(e, t);
|
|
35
|
+
function r() {
|
|
36
36
|
this.constructor = e;
|
|
37
37
|
}
|
|
38
|
-
e.prototype =
|
|
38
|
+
e.prototype = t === null ? Object.create(t) : (r.prototype = t.prototype, new r());
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function Ze(e, t, r, n) {
|
|
41
41
|
function o(i) {
|
|
42
|
-
return i instanceof
|
|
42
|
+
return i instanceof r ? i : new r(function(a) {
|
|
43
43
|
a(i);
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
-
return new (
|
|
46
|
+
return new (r || (r = Promise))(function(i, a) {
|
|
47
47
|
function c(l) {
|
|
48
48
|
try {
|
|
49
49
|
u(n.next(l));
|
|
@@ -61,11 +61,11 @@ function qe(e, r, t, n) {
|
|
|
61
61
|
function u(l) {
|
|
62
62
|
l.done ? i(l.value) : o(l.value).then(c, s);
|
|
63
63
|
}
|
|
64
|
-
u((n = n.apply(e,
|
|
64
|
+
u((n = n.apply(e, t || [])).next());
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
var
|
|
67
|
+
function Ae(e, t) {
|
|
68
|
+
var r = { label: 0, sent: function() {
|
|
69
69
|
if (i[0] & 1) throw i[1];
|
|
70
70
|
return i[1];
|
|
71
71
|
}, trys: [], ops: [] }, n, o, i, a = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
@@ -79,7 +79,7 @@ function we(e, r) {
|
|
|
79
79
|
}
|
|
80
80
|
function s(u) {
|
|
81
81
|
if (n) throw new TypeError("Generator is already executing.");
|
|
82
|
-
for (; a && (a = 0, u[0] && (
|
|
82
|
+
for (; a && (a = 0, u[0] && (r = 0)), r; ) try {
|
|
83
83
|
if (n = 1, o && (i = u[0] & 2 ? o.return : u[0] ? o.throw || ((i = o.return) && i.call(o), 0) : o.next) && !(i = i.call(o, u[1])).done) return i;
|
|
84
84
|
switch (o = 0, i && (u = [u[0] & 2, i.value]), u[0]) {
|
|
85
85
|
case 0:
|
|
@@ -87,34 +87,34 @@ function we(e, r) {
|
|
|
87
87
|
i = u;
|
|
88
88
|
break;
|
|
89
89
|
case 4:
|
|
90
|
-
return
|
|
90
|
+
return r.label++, { value: u[1], done: !1 };
|
|
91
91
|
case 5:
|
|
92
|
-
|
|
92
|
+
r.label++, o = u[1], u = [0];
|
|
93
93
|
continue;
|
|
94
94
|
case 7:
|
|
95
|
-
u =
|
|
95
|
+
u = r.ops.pop(), r.trys.pop();
|
|
96
96
|
continue;
|
|
97
97
|
default:
|
|
98
|
-
if (i =
|
|
99
|
-
|
|
98
|
+
if (i = r.trys, !(i = i.length > 0 && i[i.length - 1]) && (u[0] === 6 || u[0] === 2)) {
|
|
99
|
+
r = 0;
|
|
100
100
|
continue;
|
|
101
101
|
}
|
|
102
102
|
if (u[0] === 3 && (!i || u[1] > i[0] && u[1] < i[3])) {
|
|
103
|
-
|
|
103
|
+
r.label = u[1];
|
|
104
104
|
break;
|
|
105
105
|
}
|
|
106
|
-
if (u[0] === 6 &&
|
|
107
|
-
|
|
106
|
+
if (u[0] === 6 && r.label < i[1]) {
|
|
107
|
+
r.label = i[1], i = u;
|
|
108
108
|
break;
|
|
109
109
|
}
|
|
110
|
-
if (i &&
|
|
111
|
-
|
|
110
|
+
if (i && r.label < i[2]) {
|
|
111
|
+
r.label = i[2], r.ops.push(u);
|
|
112
112
|
break;
|
|
113
113
|
}
|
|
114
|
-
i[2] &&
|
|
114
|
+
i[2] && r.ops.pop(), r.trys.pop();
|
|
115
115
|
continue;
|
|
116
116
|
}
|
|
117
|
-
u =
|
|
117
|
+
u = t.call(e, r);
|
|
118
118
|
} catch (l) {
|
|
119
119
|
u = [6, l], o = 0;
|
|
120
120
|
} finally {
|
|
@@ -124,44 +124,44 @@ function we(e, r) {
|
|
|
124
124
|
return { value: u[0] ? u[1] : void 0, done: !0 };
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
function
|
|
128
|
-
var
|
|
129
|
-
if (
|
|
127
|
+
function F(e) {
|
|
128
|
+
var t = typeof Symbol == "function" && Symbol.iterator, r = t && e[t], n = 0;
|
|
129
|
+
if (r) return r.call(e);
|
|
130
130
|
if (e && typeof e.length == "number") return {
|
|
131
131
|
next: function() {
|
|
132
132
|
return e && n >= e.length && (e = void 0), { value: e && e[n++], done: !e };
|
|
133
133
|
}
|
|
134
134
|
};
|
|
135
|
-
throw new TypeError(
|
|
135
|
+
throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
var
|
|
139
|
-
if (!
|
|
140
|
-
var n =
|
|
137
|
+
function k(e, t) {
|
|
138
|
+
var r = typeof Symbol == "function" && e[Symbol.iterator];
|
|
139
|
+
if (!r) return e;
|
|
140
|
+
var n = r.call(e), o, i = [], a;
|
|
141
141
|
try {
|
|
142
|
-
for (; (
|
|
142
|
+
for (; (t === void 0 || t-- > 0) && !(o = n.next()).done; ) i.push(o.value);
|
|
143
143
|
} catch (c) {
|
|
144
144
|
a = { error: c };
|
|
145
145
|
} finally {
|
|
146
146
|
try {
|
|
147
|
-
o && !o.done && (
|
|
147
|
+
o && !o.done && (r = n.return) && r.call(n);
|
|
148
148
|
} finally {
|
|
149
149
|
if (a) throw a.error;
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
return i;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
155
|
-
if (
|
|
156
|
-
(i || !(n in
|
|
157
|
-
return e.concat(i || Array.prototype.slice.call(
|
|
154
|
+
function G(e, t, r) {
|
|
155
|
+
if (r || arguments.length === 2) for (var n = 0, o = t.length, i; n < o; n++)
|
|
156
|
+
(i || !(n in t)) && (i || (i = Array.prototype.slice.call(t, 0, n)), i[n] = t[n]);
|
|
157
|
+
return e.concat(i || Array.prototype.slice.call(t));
|
|
158
158
|
}
|
|
159
|
-
function
|
|
160
|
-
return this instanceof
|
|
159
|
+
function U(e) {
|
|
160
|
+
return this instanceof U ? (this.v = e, this) : new U(e);
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function Qe(e, t, r) {
|
|
163
163
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
164
|
-
var n =
|
|
164
|
+
var n = r.apply(e, t || []), o, i = [];
|
|
165
165
|
return o = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), c("next"), c("throw"), c("return", a), o[Symbol.asyncIterator] = function() {
|
|
166
166
|
return this;
|
|
167
167
|
}, o;
|
|
@@ -172,8 +172,8 @@ function ze(e, r, t) {
|
|
|
172
172
|
}
|
|
173
173
|
function c(d, p) {
|
|
174
174
|
n[d] && (o[d] = function(h) {
|
|
175
|
-
return new Promise(function(
|
|
176
|
-
i.push([d, h,
|
|
175
|
+
return new Promise(function(S, g) {
|
|
176
|
+
i.push([d, h, S, g]) > 1 || s(d, h);
|
|
177
177
|
});
|
|
178
178
|
}, p && (o[d] = p(o[d])));
|
|
179
179
|
}
|
|
@@ -185,7 +185,7 @@ function ze(e, r, t) {
|
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
function u(d) {
|
|
188
|
-
d.value instanceof
|
|
188
|
+
d.value instanceof U ? Promise.resolve(d.value.v).then(l, f) : v(i[0][2], d);
|
|
189
189
|
}
|
|
190
190
|
function l(d) {
|
|
191
191
|
s("next", d);
|
|
@@ -197,14 +197,14 @@ function ze(e, r, t) {
|
|
|
197
197
|
d(p), i.shift(), i.length && s(i[0][0], i[0][1]);
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
-
function
|
|
200
|
+
function et(e) {
|
|
201
201
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
202
|
-
var
|
|
203
|
-
return
|
|
202
|
+
var t = e[Symbol.asyncIterator], r;
|
|
203
|
+
return t ? t.call(e) : (e = typeof F == "function" ? F(e) : e[Symbol.iterator](), r = {}, n("next"), n("throw"), n("return"), r[Symbol.asyncIterator] = function() {
|
|
204
204
|
return this;
|
|
205
|
-
},
|
|
205
|
+
}, r);
|
|
206
206
|
function n(i) {
|
|
207
|
-
|
|
207
|
+
r[i] = e[i] && function(a) {
|
|
208
208
|
return new Promise(function(c, s) {
|
|
209
209
|
a = e[i](a), o(c, s, a.done, a.value);
|
|
210
210
|
});
|
|
@@ -219,50 +219,50 @@ function Ge(e) {
|
|
|
219
219
|
function w(e) {
|
|
220
220
|
return typeof e == "function";
|
|
221
221
|
}
|
|
222
|
-
function
|
|
223
|
-
var
|
|
222
|
+
function de(e) {
|
|
223
|
+
var t = function(n) {
|
|
224
224
|
Error.call(n), n.stack = new Error().stack;
|
|
225
|
-
},
|
|
226
|
-
return
|
|
225
|
+
}, r = e(t);
|
|
226
|
+
return r.prototype = Object.create(Error.prototype), r.prototype.constructor = r, r;
|
|
227
227
|
}
|
|
228
|
-
var
|
|
229
|
-
return function(
|
|
230
|
-
e(this), this.message =
|
|
231
|
-
` +
|
|
228
|
+
var ee = de(function(e) {
|
|
229
|
+
return function(r) {
|
|
230
|
+
e(this), this.message = r ? r.length + ` errors occurred during unsubscription:
|
|
231
|
+
` + r.map(function(n, o) {
|
|
232
232
|
return o + 1 + ") " + n.toString();
|
|
233
233
|
}).join(`
|
|
234
|
-
`) : "", this.name = "UnsubscriptionError", this.errors =
|
|
234
|
+
`) : "", this.name = "UnsubscriptionError", this.errors = r;
|
|
235
235
|
};
|
|
236
236
|
});
|
|
237
|
-
function
|
|
237
|
+
function ue(e, t) {
|
|
238
238
|
if (e) {
|
|
239
|
-
var
|
|
240
|
-
0 <=
|
|
239
|
+
var r = e.indexOf(t);
|
|
240
|
+
0 <= r && e.splice(r, 1);
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
var
|
|
244
|
-
function e(
|
|
245
|
-
this.initialTeardown =
|
|
243
|
+
var X = (function() {
|
|
244
|
+
function e(t) {
|
|
245
|
+
this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
246
246
|
}
|
|
247
247
|
return e.prototype.unsubscribe = function() {
|
|
248
|
-
var
|
|
248
|
+
var t, r, n, o, i;
|
|
249
249
|
if (!this.closed) {
|
|
250
250
|
this.closed = !0;
|
|
251
251
|
var a = this._parentage;
|
|
252
252
|
if (a)
|
|
253
253
|
if (this._parentage = null, Array.isArray(a))
|
|
254
254
|
try {
|
|
255
|
-
for (var c =
|
|
255
|
+
for (var c = F(a), s = c.next(); !s.done; s = c.next()) {
|
|
256
256
|
var u = s.value;
|
|
257
257
|
u.remove(this);
|
|
258
258
|
}
|
|
259
259
|
} catch (h) {
|
|
260
|
-
|
|
260
|
+
t = { error: h };
|
|
261
261
|
} finally {
|
|
262
262
|
try {
|
|
263
|
-
s && !s.done && (
|
|
263
|
+
s && !s.done && (r = c.return) && r.call(c);
|
|
264
264
|
} finally {
|
|
265
|
-
if (
|
|
265
|
+
if (t) throw t.error;
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
else
|
|
@@ -272,18 +272,18 @@ var B = (function() {
|
|
|
272
272
|
try {
|
|
273
273
|
l();
|
|
274
274
|
} catch (h) {
|
|
275
|
-
i = h instanceof
|
|
275
|
+
i = h instanceof ee ? h.errors : [h];
|
|
276
276
|
}
|
|
277
277
|
var f = this._finalizers;
|
|
278
278
|
if (f) {
|
|
279
279
|
this._finalizers = null;
|
|
280
280
|
try {
|
|
281
|
-
for (var v =
|
|
281
|
+
for (var v = F(f), d = v.next(); !d.done; d = v.next()) {
|
|
282
282
|
var p = d.value;
|
|
283
283
|
try {
|
|
284
|
-
|
|
284
|
+
we(p);
|
|
285
285
|
} catch (h) {
|
|
286
|
-
i = i ?? [], h instanceof
|
|
286
|
+
i = i ?? [], h instanceof ee ? i = G(G([], k(i)), k(h.errors)) : i.push(h);
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
289
|
} catch (h) {
|
|
@@ -297,191 +297,191 @@ var B = (function() {
|
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
if (i)
|
|
300
|
-
throw new
|
|
300
|
+
throw new ee(i);
|
|
301
301
|
}
|
|
302
|
-
}, e.prototype.add = function(
|
|
303
|
-
var
|
|
304
|
-
if (
|
|
302
|
+
}, e.prototype.add = function(t) {
|
|
303
|
+
var r;
|
|
304
|
+
if (t && t !== this)
|
|
305
305
|
if (this.closed)
|
|
306
|
-
|
|
306
|
+
we(t);
|
|
307
307
|
else {
|
|
308
|
-
if (
|
|
309
|
-
if (
|
|
308
|
+
if (t instanceof e) {
|
|
309
|
+
if (t.closed || t._hasParent(this))
|
|
310
310
|
return;
|
|
311
|
-
|
|
311
|
+
t._addParent(this);
|
|
312
312
|
}
|
|
313
|
-
(this._finalizers = (
|
|
313
|
+
(this._finalizers = (r = this._finalizers) !== null && r !== void 0 ? r : []).push(t);
|
|
314
314
|
}
|
|
315
|
-
}, e.prototype._hasParent = function(
|
|
316
|
-
var
|
|
317
|
-
return
|
|
318
|
-
}, e.prototype._addParent = function(
|
|
319
|
-
var
|
|
320
|
-
this._parentage = Array.isArray(
|
|
321
|
-
}, e.prototype._removeParent = function(
|
|
322
|
-
var
|
|
323
|
-
|
|
324
|
-
}, e.prototype.remove = function(
|
|
325
|
-
var
|
|
326
|
-
|
|
315
|
+
}, e.prototype._hasParent = function(t) {
|
|
316
|
+
var r = this._parentage;
|
|
317
|
+
return r === t || Array.isArray(r) && r.includes(t);
|
|
318
|
+
}, e.prototype._addParent = function(t) {
|
|
319
|
+
var r = this._parentage;
|
|
320
|
+
this._parentage = Array.isArray(r) ? (r.push(t), r) : r ? [r, t] : t;
|
|
321
|
+
}, e.prototype._removeParent = function(t) {
|
|
322
|
+
var r = this._parentage;
|
|
323
|
+
r === t ? this._parentage = null : Array.isArray(r) && ue(r, t);
|
|
324
|
+
}, e.prototype.remove = function(t) {
|
|
325
|
+
var r = this._finalizers;
|
|
326
|
+
r && ue(r, t), t instanceof e && t._removeParent(this);
|
|
327
327
|
}, e.EMPTY = (function() {
|
|
328
|
-
var
|
|
329
|
-
return
|
|
328
|
+
var t = new e();
|
|
329
|
+
return t.closed = !0, t;
|
|
330
330
|
})(), e;
|
|
331
|
-
})(),
|
|
332
|
-
function
|
|
333
|
-
return e instanceof
|
|
331
|
+
})(), Pe = X.EMPTY;
|
|
332
|
+
function Ie(e) {
|
|
333
|
+
return e instanceof X || e && "closed" in e && w(e.remove) && w(e.add) && w(e.unsubscribe);
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function we(e) {
|
|
336
336
|
w(e) ? e() : e.unsubscribe();
|
|
337
337
|
}
|
|
338
|
-
var
|
|
338
|
+
var tt = {
|
|
339
339
|
Promise: void 0
|
|
340
|
-
},
|
|
341
|
-
setTimeout: function(e,
|
|
342
|
-
for (var
|
|
343
|
-
|
|
344
|
-
return setTimeout.apply(void 0,
|
|
340
|
+
}, rt = {
|
|
341
|
+
setTimeout: function(e, t) {
|
|
342
|
+
for (var r = [], n = 2; n < arguments.length; n++)
|
|
343
|
+
r[n - 2] = arguments[n];
|
|
344
|
+
return setTimeout.apply(void 0, G([e, t], k(r)));
|
|
345
345
|
},
|
|
346
346
|
clearTimeout: function(e) {
|
|
347
347
|
return clearTimeout(e);
|
|
348
348
|
},
|
|
349
349
|
delegate: void 0
|
|
350
350
|
};
|
|
351
|
-
function
|
|
352
|
-
|
|
351
|
+
function Te(e) {
|
|
352
|
+
rt.setTimeout(function() {
|
|
353
353
|
throw e;
|
|
354
354
|
});
|
|
355
355
|
}
|
|
356
|
-
function
|
|
356
|
+
function ge() {
|
|
357
357
|
}
|
|
358
|
-
function
|
|
358
|
+
function H(e) {
|
|
359
359
|
e();
|
|
360
360
|
}
|
|
361
|
-
var
|
|
362
|
-
|
|
363
|
-
function r
|
|
361
|
+
var he = (function(e) {
|
|
362
|
+
M(t, e);
|
|
363
|
+
function t(r) {
|
|
364
364
|
var n = e.call(this) || this;
|
|
365
|
-
return n.isStopped = !1,
|
|
365
|
+
return n.isStopped = !1, r ? (n.destination = r, Ie(r) && r.add(n)) : n.destination = it, n;
|
|
366
366
|
}
|
|
367
|
-
return
|
|
368
|
-
return new
|
|
369
|
-
},
|
|
370
|
-
this.isStopped || this._next(
|
|
371
|
-
},
|
|
372
|
-
this.isStopped || (this.isStopped = !0, this._error(
|
|
373
|
-
},
|
|
367
|
+
return t.create = function(r, n, o) {
|
|
368
|
+
return new $(r, n, o);
|
|
369
|
+
}, t.prototype.next = function(r) {
|
|
370
|
+
this.isStopped || this._next(r);
|
|
371
|
+
}, t.prototype.error = function(r) {
|
|
372
|
+
this.isStopped || (this.isStopped = !0, this._error(r));
|
|
373
|
+
}, t.prototype.complete = function() {
|
|
374
374
|
this.isStopped || (this.isStopped = !0, this._complete());
|
|
375
|
-
},
|
|
375
|
+
}, t.prototype.unsubscribe = function() {
|
|
376
376
|
this.closed || (this.isStopped = !0, e.prototype.unsubscribe.call(this), this.destination = null);
|
|
377
|
-
},
|
|
378
|
-
this.destination.next(
|
|
379
|
-
},
|
|
377
|
+
}, t.prototype._next = function(r) {
|
|
378
|
+
this.destination.next(r);
|
|
379
|
+
}, t.prototype._error = function(r) {
|
|
380
380
|
try {
|
|
381
|
-
this.destination.error(
|
|
381
|
+
this.destination.error(r);
|
|
382
382
|
} finally {
|
|
383
383
|
this.unsubscribe();
|
|
384
384
|
}
|
|
385
|
-
},
|
|
385
|
+
}, t.prototype._complete = function() {
|
|
386
386
|
try {
|
|
387
387
|
this.destination.complete();
|
|
388
388
|
} finally {
|
|
389
389
|
this.unsubscribe();
|
|
390
390
|
}
|
|
391
|
-
},
|
|
392
|
-
})(
|
|
393
|
-
function e(
|
|
394
|
-
this.partialObserver =
|
|
391
|
+
}, t;
|
|
392
|
+
})(X), nt = (function() {
|
|
393
|
+
function e(t) {
|
|
394
|
+
this.partialObserver = t;
|
|
395
395
|
}
|
|
396
|
-
return e.prototype.next = function(
|
|
397
|
-
var
|
|
398
|
-
if (
|
|
396
|
+
return e.prototype.next = function(t) {
|
|
397
|
+
var r = this.partialObserver;
|
|
398
|
+
if (r.next)
|
|
399
399
|
try {
|
|
400
|
-
|
|
400
|
+
r.next(t);
|
|
401
401
|
} catch (n) {
|
|
402
|
-
|
|
402
|
+
Y(n);
|
|
403
403
|
}
|
|
404
|
-
}, e.prototype.error = function(
|
|
405
|
-
var
|
|
406
|
-
if (
|
|
404
|
+
}, e.prototype.error = function(t) {
|
|
405
|
+
var r = this.partialObserver;
|
|
406
|
+
if (r.error)
|
|
407
407
|
try {
|
|
408
|
-
|
|
408
|
+
r.error(t);
|
|
409
409
|
} catch (n) {
|
|
410
|
-
|
|
410
|
+
Y(n);
|
|
411
411
|
}
|
|
412
412
|
else
|
|
413
|
-
|
|
413
|
+
Y(t);
|
|
414
414
|
}, e.prototype.complete = function() {
|
|
415
|
-
var
|
|
416
|
-
if (
|
|
415
|
+
var t = this.partialObserver;
|
|
416
|
+
if (t.complete)
|
|
417
417
|
try {
|
|
418
|
-
|
|
419
|
-
} catch (
|
|
420
|
-
|
|
418
|
+
t.complete();
|
|
419
|
+
} catch (r) {
|
|
420
|
+
Y(r);
|
|
421
421
|
}
|
|
422
422
|
}, e;
|
|
423
|
-
})(),
|
|
424
|
-
|
|
425
|
-
function r
|
|
423
|
+
})(), $ = (function(e) {
|
|
424
|
+
M(t, e);
|
|
425
|
+
function t(r, n, o) {
|
|
426
426
|
var i = e.call(this) || this, a;
|
|
427
|
-
return w(
|
|
428
|
-
next:
|
|
427
|
+
return w(r) || !r ? a = {
|
|
428
|
+
next: r ?? void 0,
|
|
429
429
|
error: n ?? void 0,
|
|
430
430
|
complete: o ?? void 0
|
|
431
|
-
} : a =
|
|
431
|
+
} : a = r, i.destination = new nt(a), i;
|
|
432
432
|
}
|
|
433
|
-
return
|
|
434
|
-
})(
|
|
435
|
-
function
|
|
436
|
-
|
|
433
|
+
return t;
|
|
434
|
+
})(he);
|
|
435
|
+
function Y(e) {
|
|
436
|
+
Te(e);
|
|
437
437
|
}
|
|
438
|
-
function
|
|
438
|
+
function ot(e) {
|
|
439
439
|
throw e;
|
|
440
440
|
}
|
|
441
|
-
var
|
|
441
|
+
var it = {
|
|
442
442
|
closed: !0,
|
|
443
|
-
next:
|
|
444
|
-
error:
|
|
445
|
-
complete:
|
|
446
|
-
},
|
|
443
|
+
next: ge,
|
|
444
|
+
error: ot,
|
|
445
|
+
complete: ge
|
|
446
|
+
}, pe = (function() {
|
|
447
447
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
448
448
|
})();
|
|
449
|
-
function
|
|
449
|
+
function ve(e) {
|
|
450
450
|
return e;
|
|
451
451
|
}
|
|
452
|
-
function
|
|
453
|
-
return e.length === 0 ?
|
|
452
|
+
function at(e) {
|
|
453
|
+
return e.length === 0 ? ve : e.length === 1 ? e[0] : function(r) {
|
|
454
454
|
return e.reduce(function(n, o) {
|
|
455
455
|
return o(n);
|
|
456
|
-
},
|
|
456
|
+
}, r);
|
|
457
457
|
};
|
|
458
458
|
}
|
|
459
|
-
var
|
|
460
|
-
function e(
|
|
461
|
-
|
|
459
|
+
var E = (function() {
|
|
460
|
+
function e(t) {
|
|
461
|
+
t && (this._subscribe = t);
|
|
462
462
|
}
|
|
463
|
-
return e.prototype.lift = function(
|
|
464
|
-
var
|
|
465
|
-
return
|
|
466
|
-
}, e.prototype.subscribe = function(
|
|
467
|
-
var o = this, i =
|
|
468
|
-
return
|
|
463
|
+
return e.prototype.lift = function(t) {
|
|
464
|
+
var r = new e();
|
|
465
|
+
return r.source = this, r.operator = t, r;
|
|
466
|
+
}, e.prototype.subscribe = function(t, r, n) {
|
|
467
|
+
var o = this, i = ut(t) ? t : new $(t, r, n);
|
|
468
|
+
return H(function() {
|
|
469
469
|
var a = o, c = a.operator, s = a.source;
|
|
470
470
|
i.add(c ? c.call(i, s) : s ? o._subscribe(i) : o._trySubscribe(i));
|
|
471
471
|
}), i;
|
|
472
|
-
}, e.prototype._trySubscribe = function(
|
|
472
|
+
}, e.prototype._trySubscribe = function(t) {
|
|
473
473
|
try {
|
|
474
|
-
return this._subscribe(
|
|
475
|
-
} catch (
|
|
476
|
-
|
|
474
|
+
return this._subscribe(t);
|
|
475
|
+
} catch (r) {
|
|
476
|
+
t.error(r);
|
|
477
477
|
}
|
|
478
|
-
}, e.prototype.forEach = function(
|
|
478
|
+
}, e.prototype.forEach = function(t, r) {
|
|
479
479
|
var n = this;
|
|
480
|
-
return
|
|
481
|
-
var a = new
|
|
480
|
+
return r = Se(r), new r(function(o, i) {
|
|
481
|
+
var a = new $({
|
|
482
482
|
next: function(c) {
|
|
483
483
|
try {
|
|
484
|
-
|
|
484
|
+
t(c);
|
|
485
485
|
} catch (s) {
|
|
486
486
|
i(s), a.unsubscribe();
|
|
487
487
|
}
|
|
@@ -491,20 +491,20 @@ var _ = (function() {
|
|
|
491
491
|
});
|
|
492
492
|
n.subscribe(a);
|
|
493
493
|
});
|
|
494
|
-
}, e.prototype._subscribe = function(
|
|
495
|
-
var
|
|
496
|
-
return (
|
|
497
|
-
}, e.prototype[
|
|
494
|
+
}, e.prototype._subscribe = function(t) {
|
|
495
|
+
var r;
|
|
496
|
+
return (r = this.source) === null || r === void 0 ? void 0 : r.subscribe(t);
|
|
497
|
+
}, e.prototype[pe] = function() {
|
|
498
498
|
return this;
|
|
499
499
|
}, e.prototype.pipe = function() {
|
|
500
|
-
for (var
|
|
501
|
-
r
|
|
502
|
-
return
|
|
503
|
-
}, e.prototype.toPromise = function(
|
|
504
|
-
var
|
|
505
|
-
return
|
|
500
|
+
for (var t = [], r = 0; r < arguments.length; r++)
|
|
501
|
+
t[r] = arguments[r];
|
|
502
|
+
return at(t)(this);
|
|
503
|
+
}, e.prototype.toPromise = function(t) {
|
|
504
|
+
var r = this;
|
|
505
|
+
return t = Se(t), new t(function(n, o) {
|
|
506
506
|
var i;
|
|
507
|
-
|
|
507
|
+
r.subscribe(function(a) {
|
|
508
508
|
return i = a;
|
|
509
509
|
}, function(a) {
|
|
510
510
|
return o(a);
|
|
@@ -512,29 +512,29 @@ var _ = (function() {
|
|
|
512
512
|
return n(i);
|
|
513
513
|
});
|
|
514
514
|
});
|
|
515
|
-
}, e.create = function(
|
|
516
|
-
return new e(
|
|
515
|
+
}, e.create = function(t) {
|
|
516
|
+
return new e(t);
|
|
517
517
|
}, e;
|
|
518
518
|
})();
|
|
519
|
-
function
|
|
520
|
-
var
|
|
521
|
-
return (
|
|
519
|
+
function Se(e) {
|
|
520
|
+
var t;
|
|
521
|
+
return (t = e ?? tt.Promise) !== null && t !== void 0 ? t : Promise;
|
|
522
522
|
}
|
|
523
|
-
function
|
|
523
|
+
function st(e) {
|
|
524
524
|
return e && w(e.next) && w(e.error) && w(e.complete);
|
|
525
525
|
}
|
|
526
|
-
function
|
|
527
|
-
return e && e instanceof
|
|
526
|
+
function ut(e) {
|
|
527
|
+
return e && e instanceof he || st(e) && Ie(e);
|
|
528
528
|
}
|
|
529
|
-
function
|
|
529
|
+
function ct(e) {
|
|
530
530
|
return w(e == null ? void 0 : e.lift);
|
|
531
531
|
}
|
|
532
532
|
function P(e) {
|
|
533
|
-
return function(
|
|
534
|
-
if (
|
|
535
|
-
return
|
|
533
|
+
return function(t) {
|
|
534
|
+
if (ct(t))
|
|
535
|
+
return t.lift(function(r) {
|
|
536
536
|
try {
|
|
537
|
-
return e(
|
|
537
|
+
return e(r, this);
|
|
538
538
|
} catch (n) {
|
|
539
539
|
this.error(n);
|
|
540
540
|
}
|
|
@@ -542,24 +542,24 @@ function P(e) {
|
|
|
542
542
|
throw new TypeError("Unable to lift unknown Observable type");
|
|
543
543
|
};
|
|
544
544
|
}
|
|
545
|
-
function A(e,
|
|
546
|
-
return new
|
|
545
|
+
function A(e, t, r, n, o) {
|
|
546
|
+
return new lt(e, t, r, n, o);
|
|
547
547
|
}
|
|
548
|
-
var
|
|
549
|
-
|
|
550
|
-
function r
|
|
551
|
-
var s = e.call(this,
|
|
548
|
+
var lt = (function(e) {
|
|
549
|
+
M(t, e);
|
|
550
|
+
function t(r, n, o, i, a, c) {
|
|
551
|
+
var s = e.call(this, r) || this;
|
|
552
552
|
return s.onFinalize = a, s.shouldUnsubscribe = c, s._next = n ? function(u) {
|
|
553
553
|
try {
|
|
554
554
|
n(u);
|
|
555
555
|
} catch (l) {
|
|
556
|
-
|
|
556
|
+
r.error(l);
|
|
557
557
|
}
|
|
558
558
|
} : e.prototype._next, s._error = i ? function(u) {
|
|
559
559
|
try {
|
|
560
560
|
i(u);
|
|
561
561
|
} catch (l) {
|
|
562
|
-
|
|
562
|
+
r.error(l);
|
|
563
563
|
} finally {
|
|
564
564
|
this.unsubscribe();
|
|
565
565
|
}
|
|
@@ -567,45 +567,45 @@ var tt = (function(e) {
|
|
|
567
567
|
try {
|
|
568
568
|
o();
|
|
569
569
|
} catch (u) {
|
|
570
|
-
|
|
570
|
+
r.error(u);
|
|
571
571
|
} finally {
|
|
572
572
|
this.unsubscribe();
|
|
573
573
|
}
|
|
574
574
|
} : e.prototype._complete, s;
|
|
575
575
|
}
|
|
576
|
-
return
|
|
577
|
-
var
|
|
576
|
+
return t.prototype.unsubscribe = function() {
|
|
577
|
+
var r;
|
|
578
578
|
if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
|
|
579
579
|
var n = this.closed;
|
|
580
|
-
e.prototype.unsubscribe.call(this), !n && ((
|
|
580
|
+
e.prototype.unsubscribe.call(this), !n && ((r = this.onFinalize) === null || r === void 0 || r.call(this));
|
|
581
581
|
}
|
|
582
|
-
},
|
|
583
|
-
})(
|
|
582
|
+
}, t;
|
|
583
|
+
})(he), ft = de(function(e) {
|
|
584
584
|
return function() {
|
|
585
585
|
e(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
|
586
586
|
};
|
|
587
|
-
}),
|
|
588
|
-
|
|
589
|
-
function
|
|
590
|
-
var
|
|
591
|
-
return
|
|
587
|
+
}), Z = (function(e) {
|
|
588
|
+
M(t, e);
|
|
589
|
+
function t() {
|
|
590
|
+
var r = e.call(this) || this;
|
|
591
|
+
return r.closed = !1, r.currentObservers = null, r.observers = [], r.isStopped = !1, r.hasError = !1, r.thrownError = null, r;
|
|
592
592
|
}
|
|
593
|
-
return
|
|
594
|
-
var n = new
|
|
595
|
-
return n.operator =
|
|
596
|
-
},
|
|
593
|
+
return t.prototype.lift = function(r) {
|
|
594
|
+
var n = new _e(this, this);
|
|
595
|
+
return n.operator = r, n;
|
|
596
|
+
}, t.prototype._throwIfClosed = function() {
|
|
597
597
|
if (this.closed)
|
|
598
|
-
throw new
|
|
599
|
-
},
|
|
598
|
+
throw new ft();
|
|
599
|
+
}, t.prototype.next = function(r) {
|
|
600
600
|
var n = this;
|
|
601
|
-
|
|
601
|
+
H(function() {
|
|
602
602
|
var o, i;
|
|
603
603
|
if (n._throwIfClosed(), !n.isStopped) {
|
|
604
604
|
n.currentObservers || (n.currentObservers = Array.from(n.observers));
|
|
605
605
|
try {
|
|
606
|
-
for (var a =
|
|
606
|
+
for (var a = F(n.currentObservers), c = a.next(); !c.done; c = a.next()) {
|
|
607
607
|
var s = c.value;
|
|
608
|
-
s.next(
|
|
608
|
+
s.next(r);
|
|
609
609
|
}
|
|
610
610
|
} catch (u) {
|
|
611
611
|
o = { error: u };
|
|
@@ -618,137 +618,137 @@ var tt = (function(e) {
|
|
|
618
618
|
}
|
|
619
619
|
}
|
|
620
620
|
});
|
|
621
|
-
},
|
|
621
|
+
}, t.prototype.error = function(r) {
|
|
622
622
|
var n = this;
|
|
623
|
-
|
|
623
|
+
H(function() {
|
|
624
624
|
if (n._throwIfClosed(), !n.isStopped) {
|
|
625
|
-
n.hasError = n.isStopped = !0, n.thrownError =
|
|
625
|
+
n.hasError = n.isStopped = !0, n.thrownError = r;
|
|
626
626
|
for (var o = n.observers; o.length; )
|
|
627
|
-
o.shift().error(
|
|
627
|
+
o.shift().error(r);
|
|
628
628
|
}
|
|
629
629
|
});
|
|
630
|
-
},
|
|
631
|
-
var
|
|
632
|
-
|
|
633
|
-
if (
|
|
634
|
-
|
|
635
|
-
for (var n =
|
|
630
|
+
}, t.prototype.complete = function() {
|
|
631
|
+
var r = this;
|
|
632
|
+
H(function() {
|
|
633
|
+
if (r._throwIfClosed(), !r.isStopped) {
|
|
634
|
+
r.isStopped = !0;
|
|
635
|
+
for (var n = r.observers; n.length; )
|
|
636
636
|
n.shift().complete();
|
|
637
637
|
}
|
|
638
638
|
});
|
|
639
|
-
},
|
|
639
|
+
}, t.prototype.unsubscribe = function() {
|
|
640
640
|
this.isStopped = this.closed = !0, this.observers = this.currentObservers = null;
|
|
641
|
-
}, Object.defineProperty(
|
|
641
|
+
}, Object.defineProperty(t.prototype, "observed", {
|
|
642
642
|
get: function() {
|
|
643
|
-
var
|
|
644
|
-
return ((
|
|
643
|
+
var r;
|
|
644
|
+
return ((r = this.observers) === null || r === void 0 ? void 0 : r.length) > 0;
|
|
645
645
|
},
|
|
646
646
|
enumerable: !1,
|
|
647
647
|
configurable: !0
|
|
648
|
-
}),
|
|
649
|
-
return this._throwIfClosed(), e.prototype._trySubscribe.call(this,
|
|
650
|
-
},
|
|
651
|
-
return this._throwIfClosed(), this._checkFinalizedStatuses(
|
|
652
|
-
},
|
|
648
|
+
}), t.prototype._trySubscribe = function(r) {
|
|
649
|
+
return this._throwIfClosed(), e.prototype._trySubscribe.call(this, r);
|
|
650
|
+
}, t.prototype._subscribe = function(r) {
|
|
651
|
+
return this._throwIfClosed(), this._checkFinalizedStatuses(r), this._innerSubscribe(r);
|
|
652
|
+
}, t.prototype._innerSubscribe = function(r) {
|
|
653
653
|
var n = this, o = this, i = o.hasError, a = o.isStopped, c = o.observers;
|
|
654
|
-
return i || a ?
|
|
655
|
-
n.currentObservers = null,
|
|
654
|
+
return i || a ? Pe : (this.currentObservers = null, c.push(r), new X(function() {
|
|
655
|
+
n.currentObservers = null, ue(c, r);
|
|
656
656
|
}));
|
|
657
|
-
},
|
|
657
|
+
}, t.prototype._checkFinalizedStatuses = function(r) {
|
|
658
658
|
var n = this, o = n.hasError, i = n.thrownError, a = n.isStopped;
|
|
659
|
-
o ?
|
|
660
|
-
},
|
|
661
|
-
var
|
|
662
|
-
return
|
|
663
|
-
},
|
|
664
|
-
return new
|
|
665
|
-
},
|
|
666
|
-
})(
|
|
667
|
-
|
|
668
|
-
function r
|
|
659
|
+
o ? r.error(i) : a && r.complete();
|
|
660
|
+
}, t.prototype.asObservable = function() {
|
|
661
|
+
var r = new E();
|
|
662
|
+
return r.source = this, r;
|
|
663
|
+
}, t.create = function(r, n) {
|
|
664
|
+
return new _e(r, n);
|
|
665
|
+
}, t;
|
|
666
|
+
})(E), _e = (function(e) {
|
|
667
|
+
M(t, e);
|
|
668
|
+
function t(r, n) {
|
|
669
669
|
var o = e.call(this) || this;
|
|
670
|
-
return o.destination =
|
|
670
|
+
return o.destination = r, o.source = n, o;
|
|
671
671
|
}
|
|
672
|
-
return
|
|
672
|
+
return t.prototype.next = function(r) {
|
|
673
673
|
var n, o;
|
|
674
|
-
(o = (n = this.destination) === null || n === void 0 ? void 0 : n.next) === null || o === void 0 || o.call(n,
|
|
675
|
-
},
|
|
674
|
+
(o = (n = this.destination) === null || n === void 0 ? void 0 : n.next) === null || o === void 0 || o.call(n, r);
|
|
675
|
+
}, t.prototype.error = function(r) {
|
|
676
676
|
var n, o;
|
|
677
|
-
(o = (n = this.destination) === null || n === void 0 ? void 0 : n.error) === null || o === void 0 || o.call(n,
|
|
678
|
-
},
|
|
679
|
-
var
|
|
680
|
-
(n = (
|
|
681
|
-
},
|
|
677
|
+
(o = (n = this.destination) === null || n === void 0 ? void 0 : n.error) === null || o === void 0 || o.call(n, r);
|
|
678
|
+
}, t.prototype.complete = function() {
|
|
679
|
+
var r, n;
|
|
680
|
+
(n = (r = this.destination) === null || r === void 0 ? void 0 : r.complete) === null || n === void 0 || n.call(r);
|
|
681
|
+
}, t.prototype._subscribe = function(r) {
|
|
682
682
|
var n, o;
|
|
683
|
-
return (o = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(
|
|
684
|
-
},
|
|
685
|
-
})(
|
|
683
|
+
return (o = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(r)) !== null && o !== void 0 ? o : Pe;
|
|
684
|
+
}, t;
|
|
685
|
+
})(Z), Re = {
|
|
686
686
|
now: function() {
|
|
687
|
-
return (
|
|
687
|
+
return (Re.delegate || Date).now();
|
|
688
688
|
},
|
|
689
689
|
delegate: void 0
|
|
690
|
-
},
|
|
691
|
-
|
|
692
|
-
function r
|
|
693
|
-
|
|
690
|
+
}, dt = (function(e) {
|
|
691
|
+
M(t, e);
|
|
692
|
+
function t(r, n, o) {
|
|
693
|
+
r === void 0 && (r = 1 / 0), n === void 0 && (n = 1 / 0), o === void 0 && (o = Re);
|
|
694
694
|
var i = e.call(this) || this;
|
|
695
|
-
return i._bufferSize =
|
|
695
|
+
return i._bufferSize = r, i._windowTime = n, i._timestampProvider = o, i._buffer = [], i._infiniteTimeWindow = !0, i._infiniteTimeWindow = n === 1 / 0, i._bufferSize = Math.max(1, r), i._windowTime = Math.max(1, n), i;
|
|
696
696
|
}
|
|
697
|
-
return
|
|
697
|
+
return t.prototype.next = function(r) {
|
|
698
698
|
var n = this, o = n.isStopped, i = n._buffer, a = n._infiniteTimeWindow, c = n._timestampProvider, s = n._windowTime;
|
|
699
|
-
o || (i.push(
|
|
700
|
-
},
|
|
699
|
+
o || (i.push(r), !a && i.push(c.now() + s)), this._trimBuffer(), e.prototype.next.call(this, r);
|
|
700
|
+
}, t.prototype._subscribe = function(r) {
|
|
701
701
|
this._throwIfClosed(), this._trimBuffer();
|
|
702
|
-
for (var n = this._innerSubscribe(
|
|
703
|
-
|
|
704
|
-
return this._checkFinalizedStatuses(
|
|
705
|
-
},
|
|
706
|
-
var
|
|
702
|
+
for (var n = this._innerSubscribe(r), o = this, i = o._infiniteTimeWindow, a = o._buffer, c = a.slice(), s = 0; s < c.length && !r.closed; s += i ? 1 : 2)
|
|
703
|
+
r.next(c[s]);
|
|
704
|
+
return this._checkFinalizedStatuses(r), n;
|
|
705
|
+
}, t.prototype._trimBuffer = function() {
|
|
706
|
+
var r = this, n = r._bufferSize, o = r._timestampProvider, i = r._buffer, a = r._infiniteTimeWindow, c = (a ? 1 : 2) * n;
|
|
707
707
|
if (n < 1 / 0 && c < i.length && i.splice(0, i.length - c), !a) {
|
|
708
708
|
for (var s = o.now(), u = 0, l = 1; l < i.length && i[l] <= s; l += 2)
|
|
709
709
|
u = l;
|
|
710
710
|
u && i.splice(0, u + 1);
|
|
711
711
|
}
|
|
712
|
-
},
|
|
713
|
-
})(
|
|
712
|
+
}, t;
|
|
713
|
+
})(Z), me = (function(e) {
|
|
714
714
|
return e && typeof e.length == "number" && typeof e != "function";
|
|
715
715
|
});
|
|
716
|
-
function
|
|
716
|
+
function Ce(e) {
|
|
717
717
|
return w(e == null ? void 0 : e.then);
|
|
718
718
|
}
|
|
719
|
-
function
|
|
720
|
-
return w(e[
|
|
719
|
+
function je(e) {
|
|
720
|
+
return w(e[pe]);
|
|
721
721
|
}
|
|
722
|
-
function
|
|
722
|
+
function Le(e) {
|
|
723
723
|
return Symbol.asyncIterator && w(e == null ? void 0 : e[Symbol.asyncIterator]);
|
|
724
724
|
}
|
|
725
|
-
function
|
|
725
|
+
function Ne(e) {
|
|
726
726
|
return new TypeError("You provided " + (e !== null && typeof e == "object" ? "an invalid object" : "'" + e + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
|
|
727
727
|
}
|
|
728
|
-
function
|
|
728
|
+
function ht() {
|
|
729
729
|
return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
|
|
730
730
|
}
|
|
731
|
-
var
|
|
732
|
-
function
|
|
733
|
-
return w(e == null ? void 0 : e[
|
|
731
|
+
var Ue = ht();
|
|
732
|
+
function Fe(e) {
|
|
733
|
+
return w(e == null ? void 0 : e[Ue]);
|
|
734
734
|
}
|
|
735
|
-
function
|
|
736
|
-
return
|
|
737
|
-
var
|
|
738
|
-
return
|
|
735
|
+
function ke(e) {
|
|
736
|
+
return Qe(this, arguments, function() {
|
|
737
|
+
var r, n, o, i;
|
|
738
|
+
return Ae(this, function(a) {
|
|
739
739
|
switch (a.label) {
|
|
740
740
|
case 0:
|
|
741
|
-
|
|
741
|
+
r = e.getReader(), a.label = 1;
|
|
742
742
|
case 1:
|
|
743
743
|
a.trys.push([1, , 9, 10]), a.label = 2;
|
|
744
744
|
case 2:
|
|
745
|
-
return [4,
|
|
745
|
+
return [4, U(r.read())];
|
|
746
746
|
case 3:
|
|
747
|
-
return n = a.sent(), o = n.value, i = n.done, i ? [4,
|
|
747
|
+
return n = a.sent(), o = n.value, i = n.done, i ? [4, U(void 0)] : [3, 5];
|
|
748
748
|
case 4:
|
|
749
749
|
return [2, a.sent()];
|
|
750
750
|
case 5:
|
|
751
|
-
return [4,
|
|
751
|
+
return [4, U(o)];
|
|
752
752
|
case 6:
|
|
753
753
|
return [4, a.sent()];
|
|
754
754
|
case 7:
|
|
@@ -756,103 +756,103 @@ function xe(e) {
|
|
|
756
756
|
case 8:
|
|
757
757
|
return [3, 10];
|
|
758
758
|
case 9:
|
|
759
|
-
return
|
|
759
|
+
return r.releaseLock(), [7];
|
|
760
760
|
case 10:
|
|
761
761
|
return [2];
|
|
762
762
|
}
|
|
763
763
|
});
|
|
764
764
|
});
|
|
765
765
|
}
|
|
766
|
-
function
|
|
766
|
+
function $e(e) {
|
|
767
767
|
return w(e == null ? void 0 : e.getReader);
|
|
768
768
|
}
|
|
769
769
|
function I(e) {
|
|
770
|
-
if (e instanceof
|
|
770
|
+
if (e instanceof E)
|
|
771
771
|
return e;
|
|
772
772
|
if (e != null) {
|
|
773
|
-
if (
|
|
774
|
-
return
|
|
775
|
-
if (
|
|
776
|
-
return
|
|
777
|
-
if (Ee(e))
|
|
778
|
-
return st(e);
|
|
779
|
-
if (Ae(e))
|
|
780
|
-
return Re(e);
|
|
781
|
-
if (Te(e))
|
|
782
|
-
return ut(e);
|
|
773
|
+
if (je(e))
|
|
774
|
+
return pt(e);
|
|
775
|
+
if (me(e))
|
|
776
|
+
return vt(e);
|
|
783
777
|
if (Ce(e))
|
|
784
|
-
return
|
|
778
|
+
return mt(e);
|
|
779
|
+
if (Le(e))
|
|
780
|
+
return Me(e);
|
|
781
|
+
if (Fe(e))
|
|
782
|
+
return yt(e);
|
|
783
|
+
if ($e(e))
|
|
784
|
+
return bt(e);
|
|
785
785
|
}
|
|
786
|
-
throw
|
|
786
|
+
throw Ne(e);
|
|
787
787
|
}
|
|
788
|
-
function
|
|
789
|
-
return new
|
|
790
|
-
var
|
|
791
|
-
if (w(
|
|
792
|
-
return
|
|
788
|
+
function pt(e) {
|
|
789
|
+
return new E(function(t) {
|
|
790
|
+
var r = e[pe]();
|
|
791
|
+
if (w(r.subscribe))
|
|
792
|
+
return r.subscribe(t);
|
|
793
793
|
throw new TypeError("Provided object does not correctly implement Symbol.observable");
|
|
794
794
|
});
|
|
795
795
|
}
|
|
796
|
-
function
|
|
797
|
-
return new
|
|
798
|
-
for (var
|
|
799
|
-
|
|
800
|
-
|
|
796
|
+
function vt(e) {
|
|
797
|
+
return new E(function(t) {
|
|
798
|
+
for (var r = 0; r < e.length && !t.closed; r++)
|
|
799
|
+
t.next(e[r]);
|
|
800
|
+
t.complete();
|
|
801
801
|
});
|
|
802
802
|
}
|
|
803
|
-
function
|
|
804
|
-
return new
|
|
805
|
-
e.then(function(
|
|
806
|
-
|
|
807
|
-
}, function(
|
|
808
|
-
return
|
|
809
|
-
}).then(null,
|
|
803
|
+
function mt(e) {
|
|
804
|
+
return new E(function(t) {
|
|
805
|
+
e.then(function(r) {
|
|
806
|
+
t.closed || (t.next(r), t.complete());
|
|
807
|
+
}, function(r) {
|
|
808
|
+
return t.error(r);
|
|
809
|
+
}).then(null, Te);
|
|
810
810
|
});
|
|
811
811
|
}
|
|
812
|
-
function
|
|
813
|
-
return new
|
|
814
|
-
var
|
|
812
|
+
function yt(e) {
|
|
813
|
+
return new E(function(t) {
|
|
814
|
+
var r, n;
|
|
815
815
|
try {
|
|
816
|
-
for (var o =
|
|
816
|
+
for (var o = F(e), i = o.next(); !i.done; i = o.next()) {
|
|
817
817
|
var a = i.value;
|
|
818
|
-
if (
|
|
818
|
+
if (t.next(a), t.closed)
|
|
819
819
|
return;
|
|
820
820
|
}
|
|
821
821
|
} catch (c) {
|
|
822
|
-
|
|
822
|
+
r = { error: c };
|
|
823
823
|
} finally {
|
|
824
824
|
try {
|
|
825
825
|
i && !i.done && (n = o.return) && n.call(o);
|
|
826
826
|
} finally {
|
|
827
|
-
if (
|
|
827
|
+
if (r) throw r.error;
|
|
828
828
|
}
|
|
829
829
|
}
|
|
830
|
-
|
|
830
|
+
t.complete();
|
|
831
831
|
});
|
|
832
832
|
}
|
|
833
|
-
function
|
|
834
|
-
return new
|
|
835
|
-
|
|
836
|
-
return
|
|
833
|
+
function Me(e) {
|
|
834
|
+
return new E(function(t) {
|
|
835
|
+
wt(e, t).catch(function(r) {
|
|
836
|
+
return t.error(r);
|
|
837
837
|
});
|
|
838
838
|
});
|
|
839
839
|
}
|
|
840
|
-
function
|
|
841
|
-
return
|
|
840
|
+
function bt(e) {
|
|
841
|
+
return Me(ke(e));
|
|
842
842
|
}
|
|
843
|
-
function
|
|
844
|
-
var
|
|
845
|
-
return
|
|
843
|
+
function wt(e, t) {
|
|
844
|
+
var r, n, o, i;
|
|
845
|
+
return Ze(this, void 0, void 0, function() {
|
|
846
846
|
var a, c;
|
|
847
|
-
return
|
|
847
|
+
return Ae(this, function(s) {
|
|
848
848
|
switch (s.label) {
|
|
849
849
|
case 0:
|
|
850
|
-
s.trys.push([0, 5, 6, 11]),
|
|
850
|
+
s.trys.push([0, 5, 6, 11]), r = et(e), s.label = 1;
|
|
851
851
|
case 1:
|
|
852
|
-
return [4,
|
|
852
|
+
return [4, r.next()];
|
|
853
853
|
case 2:
|
|
854
854
|
if (n = s.sent(), !!n.done) return [3, 4];
|
|
855
|
-
if (a = n.value,
|
|
855
|
+
if (a = n.value, t.next(a), t.closed)
|
|
856
856
|
return [2];
|
|
857
857
|
s.label = 3;
|
|
858
858
|
case 3:
|
|
@@ -862,7 +862,7 @@ function lt(e, r) {
|
|
|
862
862
|
case 5:
|
|
863
863
|
return c = s.sent(), o = { error: c }, [3, 11];
|
|
864
864
|
case 6:
|
|
865
|
-
return s.trys.push([6, , 9, 10]), n && !n.done && (i =
|
|
865
|
+
return s.trys.push([6, , 9, 10]), n && !n.done && (i = r.return) ? [4, i.call(r)] : [3, 8];
|
|
866
866
|
case 7:
|
|
867
867
|
s.sent(), s.label = 8;
|
|
868
868
|
case 8:
|
|
@@ -873,206 +873,206 @@ function lt(e, r) {
|
|
|
873
873
|
case 10:
|
|
874
874
|
return [7];
|
|
875
875
|
case 11:
|
|
876
|
-
return
|
|
876
|
+
return t.complete(), [2];
|
|
877
877
|
}
|
|
878
878
|
});
|
|
879
879
|
});
|
|
880
880
|
}
|
|
881
|
-
function
|
|
881
|
+
function j(e, t, r, n, o) {
|
|
882
882
|
n === void 0 && (n = 0), o === void 0 && (o = !1);
|
|
883
|
-
var i =
|
|
884
|
-
|
|
883
|
+
var i = t.schedule(function() {
|
|
884
|
+
r(), o ? e.add(this.schedule(null, n)) : this.unsubscribe();
|
|
885
885
|
}, n);
|
|
886
886
|
if (e.add(i), !o)
|
|
887
887
|
return i;
|
|
888
888
|
}
|
|
889
|
-
function
|
|
890
|
-
return
|
|
891
|
-
|
|
892
|
-
return
|
|
889
|
+
function De(e, t) {
|
|
890
|
+
return t === void 0 && (t = 0), P(function(r, n) {
|
|
891
|
+
r.subscribe(A(n, function(o) {
|
|
892
|
+
return j(n, e, function() {
|
|
893
893
|
return n.next(o);
|
|
894
|
-
},
|
|
894
|
+
}, t);
|
|
895
895
|
}, function() {
|
|
896
|
-
return
|
|
896
|
+
return j(n, e, function() {
|
|
897
897
|
return n.complete();
|
|
898
|
-
},
|
|
898
|
+
}, t);
|
|
899
899
|
}, function(o) {
|
|
900
|
-
return
|
|
900
|
+
return j(n, e, function() {
|
|
901
901
|
return n.error(o);
|
|
902
|
-
},
|
|
902
|
+
}, t);
|
|
903
903
|
}));
|
|
904
904
|
});
|
|
905
905
|
}
|
|
906
|
-
function
|
|
907
|
-
return
|
|
906
|
+
function We(e, t) {
|
|
907
|
+
return t === void 0 && (t = 0), P(function(r, n) {
|
|
908
908
|
n.add(e.schedule(function() {
|
|
909
|
-
return
|
|
910
|
-
},
|
|
909
|
+
return r.subscribe(n);
|
|
910
|
+
}, t));
|
|
911
911
|
});
|
|
912
912
|
}
|
|
913
|
-
function
|
|
914
|
-
return I(e).pipe(
|
|
913
|
+
function gt(e, t) {
|
|
914
|
+
return I(e).pipe(We(t), De(t));
|
|
915
915
|
}
|
|
916
|
-
function
|
|
917
|
-
return I(e).pipe(
|
|
916
|
+
function St(e, t) {
|
|
917
|
+
return I(e).pipe(We(t), De(t));
|
|
918
918
|
}
|
|
919
|
-
function
|
|
920
|
-
return new
|
|
919
|
+
function _t(e, t) {
|
|
920
|
+
return new E(function(r) {
|
|
921
921
|
var n = 0;
|
|
922
|
-
return
|
|
923
|
-
n === e.length ?
|
|
922
|
+
return t.schedule(function() {
|
|
923
|
+
n === e.length ? r.complete() : (r.next(e[n++]), r.closed || this.schedule());
|
|
924
924
|
});
|
|
925
925
|
});
|
|
926
926
|
}
|
|
927
|
-
function
|
|
928
|
-
return new
|
|
927
|
+
function Et(e, t) {
|
|
928
|
+
return new E(function(r) {
|
|
929
929
|
var n;
|
|
930
|
-
return
|
|
931
|
-
n = e[
|
|
930
|
+
return j(r, t, function() {
|
|
931
|
+
n = e[Ue](), j(r, t, function() {
|
|
932
932
|
var o, i, a;
|
|
933
933
|
try {
|
|
934
934
|
o = n.next(), i = o.value, a = o.done;
|
|
935
935
|
} catch (c) {
|
|
936
|
-
|
|
936
|
+
r.error(c);
|
|
937
937
|
return;
|
|
938
938
|
}
|
|
939
|
-
a ?
|
|
939
|
+
a ? r.complete() : r.next(i);
|
|
940
940
|
}, 0, !0);
|
|
941
941
|
}), function() {
|
|
942
942
|
return w(n == null ? void 0 : n.return) && n.return();
|
|
943
943
|
};
|
|
944
944
|
});
|
|
945
945
|
}
|
|
946
|
-
function
|
|
946
|
+
function qe(e, t) {
|
|
947
947
|
if (!e)
|
|
948
948
|
throw new Error("Iterable cannot be null");
|
|
949
|
-
return new
|
|
950
|
-
|
|
949
|
+
return new E(function(r) {
|
|
950
|
+
j(r, t, function() {
|
|
951
951
|
var n = e[Symbol.asyncIterator]();
|
|
952
|
-
|
|
952
|
+
j(r, t, function() {
|
|
953
953
|
n.next().then(function(o) {
|
|
954
|
-
o.done ?
|
|
954
|
+
o.done ? r.complete() : r.next(o.value);
|
|
955
955
|
});
|
|
956
956
|
}, 0, !0);
|
|
957
957
|
});
|
|
958
958
|
});
|
|
959
959
|
}
|
|
960
|
-
function
|
|
961
|
-
return
|
|
960
|
+
function Ot(e, t) {
|
|
961
|
+
return qe(ke(e), t);
|
|
962
962
|
}
|
|
963
|
-
function
|
|
963
|
+
function xt(e, t) {
|
|
964
964
|
if (e != null) {
|
|
965
|
-
if (
|
|
966
|
-
return
|
|
967
|
-
if (
|
|
968
|
-
return
|
|
969
|
-
if (Ee(e))
|
|
970
|
-
return dt(e, r);
|
|
971
|
-
if (Ae(e))
|
|
972
|
-
return Ue(e, r);
|
|
973
|
-
if (Te(e))
|
|
974
|
-
return pt(e, r);
|
|
965
|
+
if (je(e))
|
|
966
|
+
return gt(e, t);
|
|
967
|
+
if (me(e))
|
|
968
|
+
return _t(e, t);
|
|
975
969
|
if (Ce(e))
|
|
976
|
-
return
|
|
970
|
+
return St(e, t);
|
|
971
|
+
if (Le(e))
|
|
972
|
+
return qe(e, t);
|
|
973
|
+
if (Fe(e))
|
|
974
|
+
return Et(e, t);
|
|
975
|
+
if ($e(e))
|
|
976
|
+
return Ot(e, t);
|
|
977
977
|
}
|
|
978
|
-
throw
|
|
978
|
+
throw Ne(e);
|
|
979
979
|
}
|
|
980
|
-
function
|
|
981
|
-
return
|
|
980
|
+
function Ge(e, t) {
|
|
981
|
+
return t ? xt(e, t) : I(e);
|
|
982
982
|
}
|
|
983
|
-
var
|
|
983
|
+
var At = de(function(e) {
|
|
984
984
|
return function() {
|
|
985
985
|
e(this), this.name = "EmptyError", this.message = "no elements in sequence";
|
|
986
986
|
};
|
|
987
987
|
});
|
|
988
|
-
function
|
|
989
|
-
return new Promise(function(
|
|
990
|
-
var o = new
|
|
988
|
+
function Pt(e, t) {
|
|
989
|
+
return new Promise(function(r, n) {
|
|
990
|
+
var o = new $({
|
|
991
991
|
next: function(i) {
|
|
992
|
-
|
|
992
|
+
r(i), o.unsubscribe();
|
|
993
993
|
},
|
|
994
994
|
error: n,
|
|
995
995
|
complete: function() {
|
|
996
|
-
n(new
|
|
996
|
+
n(new At());
|
|
997
997
|
}
|
|
998
998
|
});
|
|
999
999
|
e.subscribe(o);
|
|
1000
1000
|
});
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1003
|
-
return P(function(
|
|
1002
|
+
function ye(e, t) {
|
|
1003
|
+
return P(function(r, n) {
|
|
1004
1004
|
var o = 0;
|
|
1005
|
-
|
|
1006
|
-
n.next(e.call(
|
|
1005
|
+
r.subscribe(A(n, function(i) {
|
|
1006
|
+
n.next(e.call(t, i, o++));
|
|
1007
1007
|
}));
|
|
1008
1008
|
});
|
|
1009
1009
|
}
|
|
1010
|
-
var
|
|
1011
|
-
function
|
|
1012
|
-
return
|
|
1010
|
+
var It = Array.isArray;
|
|
1011
|
+
function Tt(e, t) {
|
|
1012
|
+
return It(t) ? e.apply(void 0, G([], k(t))) : e(t);
|
|
1013
1013
|
}
|
|
1014
|
-
function
|
|
1015
|
-
return
|
|
1016
|
-
return
|
|
1014
|
+
function Rt(e) {
|
|
1015
|
+
return ye(function(t) {
|
|
1016
|
+
return Tt(e, t);
|
|
1017
1017
|
});
|
|
1018
1018
|
}
|
|
1019
|
-
function
|
|
1019
|
+
function Ct(e, t, r, n, o, i, a, c) {
|
|
1020
1020
|
var s = [], u = 0, l = 0, f = !1, v = function() {
|
|
1021
|
-
f && !s.length && !u &&
|
|
1021
|
+
f && !s.length && !u && t.complete();
|
|
1022
1022
|
}, d = function(h) {
|
|
1023
1023
|
return u < n ? p(h) : s.push(h);
|
|
1024
1024
|
}, p = function(h) {
|
|
1025
1025
|
u++;
|
|
1026
|
-
var
|
|
1027
|
-
I(
|
|
1028
|
-
|
|
1026
|
+
var S = !1;
|
|
1027
|
+
I(r(h, l++)).subscribe(A(t, function(g) {
|
|
1028
|
+
t.next(g);
|
|
1029
1029
|
}, function() {
|
|
1030
|
-
|
|
1030
|
+
S = !0;
|
|
1031
1031
|
}, void 0, function() {
|
|
1032
|
-
if (
|
|
1032
|
+
if (S)
|
|
1033
1033
|
try {
|
|
1034
1034
|
u--;
|
|
1035
|
-
for (var
|
|
1036
|
-
var
|
|
1037
|
-
a || p(
|
|
1035
|
+
for (var g = function() {
|
|
1036
|
+
var m = s.shift();
|
|
1037
|
+
a || p(m);
|
|
1038
1038
|
}; s.length && u < n; )
|
|
1039
|
-
|
|
1039
|
+
g();
|
|
1040
1040
|
v();
|
|
1041
|
-
} catch (
|
|
1042
|
-
|
|
1041
|
+
} catch (m) {
|
|
1042
|
+
t.error(m);
|
|
1043
1043
|
}
|
|
1044
1044
|
}));
|
|
1045
1045
|
};
|
|
1046
|
-
return e.subscribe(A(
|
|
1046
|
+
return e.subscribe(A(t, d, function() {
|
|
1047
1047
|
f = !0, v();
|
|
1048
1048
|
})), function() {
|
|
1049
1049
|
};
|
|
1050
1050
|
}
|
|
1051
|
-
function
|
|
1052
|
-
return
|
|
1053
|
-
return
|
|
1054
|
-
return
|
|
1051
|
+
function Be(e, t, r) {
|
|
1052
|
+
return r === void 0 && (r = 1 / 0), w(t) ? Be(function(n, o) {
|
|
1053
|
+
return ye(function(i, a) {
|
|
1054
|
+
return t(n, i, o, a);
|
|
1055
1055
|
})(I(e(n, o)));
|
|
1056
|
-
},
|
|
1057
|
-
return
|
|
1056
|
+
}, r) : (typeof t == "number" && (r = t), P(function(n, o) {
|
|
1057
|
+
return Ct(n, o, e, r);
|
|
1058
1058
|
}));
|
|
1059
1059
|
}
|
|
1060
|
-
var
|
|
1061
|
-
function
|
|
1062
|
-
if (w(
|
|
1063
|
-
return
|
|
1064
|
-
var o =
|
|
1060
|
+
var jt = ["addListener", "removeListener"], Lt = ["addEventListener", "removeEventListener"], Nt = ["on", "off"];
|
|
1061
|
+
function ce(e, t, r, n) {
|
|
1062
|
+
if (w(r) && (n = r, r = void 0), n)
|
|
1063
|
+
return ce(e, t, r).pipe(Rt(n));
|
|
1064
|
+
var o = k(kt(e) ? Lt.map(function(c) {
|
|
1065
1065
|
return function(s) {
|
|
1066
|
-
return e[c](
|
|
1066
|
+
return e[c](t, s, r);
|
|
1067
1067
|
};
|
|
1068
|
-
}) :
|
|
1069
|
-
if (!i &&
|
|
1070
|
-
return
|
|
1071
|
-
return
|
|
1068
|
+
}) : Ut(e) ? jt.map(Ee(e, t)) : Ft(e) ? Nt.map(Ee(e, t)) : [], 2), i = o[0], a = o[1];
|
|
1069
|
+
if (!i && me(e))
|
|
1070
|
+
return Be(function(c) {
|
|
1071
|
+
return ce(c, t, r);
|
|
1072
1072
|
})(I(e));
|
|
1073
1073
|
if (!i)
|
|
1074
1074
|
throw new TypeError("Invalid event target");
|
|
1075
|
-
return new
|
|
1075
|
+
return new E(function(c) {
|
|
1076
1076
|
var s = function() {
|
|
1077
1077
|
for (var u = [], l = 0; l < arguments.length; l++)
|
|
1078
1078
|
u[l] = arguments[l];
|
|
@@ -1083,101 +1083,101 @@ function oe(e, r, t, n) {
|
|
|
1083
1083
|
};
|
|
1084
1084
|
});
|
|
1085
1085
|
}
|
|
1086
|
-
function
|
|
1087
|
-
return function(
|
|
1086
|
+
function Ee(e, t) {
|
|
1087
|
+
return function(r) {
|
|
1088
1088
|
return function(n) {
|
|
1089
|
-
return e[
|
|
1089
|
+
return e[r](t, n);
|
|
1090
1090
|
};
|
|
1091
1091
|
};
|
|
1092
1092
|
}
|
|
1093
|
-
function
|
|
1093
|
+
function Ut(e) {
|
|
1094
1094
|
return w(e.addListener) && w(e.removeListener);
|
|
1095
1095
|
}
|
|
1096
|
-
function
|
|
1096
|
+
function Ft(e) {
|
|
1097
1097
|
return w(e.on) && w(e.off);
|
|
1098
1098
|
}
|
|
1099
|
-
function
|
|
1099
|
+
function kt(e) {
|
|
1100
1100
|
return w(e.addEventListener) && w(e.removeEventListener);
|
|
1101
1101
|
}
|
|
1102
|
-
function
|
|
1103
|
-
return P(function(
|
|
1102
|
+
function te(e, t) {
|
|
1103
|
+
return P(function(r, n) {
|
|
1104
1104
|
var o = 0;
|
|
1105
|
-
|
|
1106
|
-
return e.call(
|
|
1105
|
+
r.subscribe(A(n, function(i) {
|
|
1106
|
+
return e.call(t, i, o++) && n.next(i);
|
|
1107
1107
|
}));
|
|
1108
1108
|
});
|
|
1109
1109
|
}
|
|
1110
|
-
function
|
|
1111
|
-
return
|
|
1110
|
+
function $t(e, t) {
|
|
1111
|
+
return t === void 0 && (t = ve), e = e ?? Mt, P(function(r, n) {
|
|
1112
1112
|
var o, i = !0;
|
|
1113
|
-
|
|
1114
|
-
var c =
|
|
1113
|
+
r.subscribe(A(n, function(a) {
|
|
1114
|
+
var c = t(a);
|
|
1115
1115
|
(i || !e(o, c)) && (i = !1, o = c, n.next(a));
|
|
1116
1116
|
}));
|
|
1117
1117
|
});
|
|
1118
1118
|
}
|
|
1119
|
-
function
|
|
1120
|
-
return e ===
|
|
1119
|
+
function Mt(e, t) {
|
|
1120
|
+
return e === t;
|
|
1121
1121
|
}
|
|
1122
|
-
function
|
|
1122
|
+
function Dt(e) {
|
|
1123
1123
|
e === void 0 && (e = {});
|
|
1124
|
-
var
|
|
1125
|
-
return new
|
|
1126
|
-
} :
|
|
1124
|
+
var t = e.connector, r = t === void 0 ? function() {
|
|
1125
|
+
return new Z();
|
|
1126
|
+
} : t, n = e.resetOnError, o = n === void 0 ? !0 : n, i = e.resetOnComplete, a = i === void 0 ? !0 : i, c = e.resetOnRefCountZero, s = c === void 0 ? !0 : c;
|
|
1127
1127
|
return function(u) {
|
|
1128
|
-
var l, f, v, d = 0, p = !1, h = !1,
|
|
1128
|
+
var l, f, v, d = 0, p = !1, h = !1, S = function() {
|
|
1129
1129
|
f == null || f.unsubscribe(), f = void 0;
|
|
1130
|
-
},
|
|
1131
|
-
|
|
1132
|
-
},
|
|
1133
|
-
var
|
|
1134
|
-
|
|
1130
|
+
}, g = function() {
|
|
1131
|
+
S(), l = v = void 0, p = h = !1;
|
|
1132
|
+
}, m = function() {
|
|
1133
|
+
var b = l;
|
|
1134
|
+
g(), b == null || b.unsubscribe();
|
|
1135
1135
|
};
|
|
1136
|
-
return P(function(
|
|
1137
|
-
d++, !h && !p &&
|
|
1138
|
-
var
|
|
1139
|
-
|
|
1140
|
-
d--, d === 0 && !h && !p && (f =
|
|
1141
|
-
}),
|
|
1142
|
-
next: function(
|
|
1143
|
-
return
|
|
1136
|
+
return P(function(b, O) {
|
|
1137
|
+
d++, !h && !p && S();
|
|
1138
|
+
var B = v = v ?? r();
|
|
1139
|
+
O.add(function() {
|
|
1140
|
+
d--, d === 0 && !h && !p && (f = re(m, s));
|
|
1141
|
+
}), B.subscribe(O), !l && d > 0 && (l = new $({
|
|
1142
|
+
next: function(z) {
|
|
1143
|
+
return B.next(z);
|
|
1144
1144
|
},
|
|
1145
|
-
error: function(
|
|
1146
|
-
h = !0,
|
|
1145
|
+
error: function(z) {
|
|
1146
|
+
h = !0, S(), f = re(g, o, z), B.error(z);
|
|
1147
1147
|
},
|
|
1148
1148
|
complete: function() {
|
|
1149
|
-
p = !0,
|
|
1149
|
+
p = !0, S(), f = re(g, a), B.complete();
|
|
1150
1150
|
}
|
|
1151
|
-
}), I(
|
|
1151
|
+
}), I(b).subscribe(l));
|
|
1152
1152
|
})(u);
|
|
1153
1153
|
};
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1156
|
-
for (var
|
|
1157
|
-
|
|
1158
|
-
if (
|
|
1155
|
+
function re(e, t) {
|
|
1156
|
+
for (var r = [], n = 2; n < arguments.length; n++)
|
|
1157
|
+
r[n - 2] = arguments[n];
|
|
1158
|
+
if (t === !0) {
|
|
1159
1159
|
e();
|
|
1160
1160
|
return;
|
|
1161
1161
|
}
|
|
1162
|
-
if (
|
|
1163
|
-
var o = new
|
|
1162
|
+
if (t !== !1) {
|
|
1163
|
+
var o = new $({
|
|
1164
1164
|
next: function() {
|
|
1165
1165
|
o.unsubscribe(), e();
|
|
1166
1166
|
}
|
|
1167
1167
|
});
|
|
1168
|
-
return I(
|
|
1168
|
+
return I(t.apply(void 0, G([], k(r)))).subscribe(o);
|
|
1169
1169
|
}
|
|
1170
1170
|
}
|
|
1171
|
-
function
|
|
1172
|
-
return P(function(
|
|
1171
|
+
function ze(e, t) {
|
|
1172
|
+
return P(function(r, n) {
|
|
1173
1173
|
var o = null, i = 0, a = !1, c = function() {
|
|
1174
1174
|
return a && !o && n.complete();
|
|
1175
1175
|
};
|
|
1176
|
-
|
|
1176
|
+
r.subscribe(A(n, function(s) {
|
|
1177
1177
|
o == null || o.unsubscribe();
|
|
1178
1178
|
var u = 0, l = i++;
|
|
1179
1179
|
I(e(s, l)).subscribe(o = A(n, function(f) {
|
|
1180
|
-
return n.next(
|
|
1180
|
+
return n.next(t ? t(s, f, l, u++) : f);
|
|
1181
1181
|
}, function() {
|
|
1182
1182
|
o = null, c();
|
|
1183
1183
|
}));
|
|
@@ -1186,8 +1186,8 @@ function Ve(e, r) {
|
|
|
1186
1186
|
}));
|
|
1187
1187
|
});
|
|
1188
1188
|
}
|
|
1189
|
-
function
|
|
1190
|
-
var n = w(e) ||
|
|
1189
|
+
function Wt(e, t, r) {
|
|
1190
|
+
var n = w(e) || t || r ? { next: e, error: t, complete: r } : e;
|
|
1191
1191
|
return n ? P(function(o, i) {
|
|
1192
1192
|
var a;
|
|
1193
1193
|
(a = n.subscribe) === null || a === void 0 || a.call(n);
|
|
@@ -1205,47 +1205,47 @@ function jt(e, r, t) {
|
|
|
1205
1205
|
var s, u;
|
|
1206
1206
|
c && ((s = n.unsubscribe) === null || s === void 0 || s.call(n)), (u = n.finalize) === null || u === void 0 || u.call(n);
|
|
1207
1207
|
}));
|
|
1208
|
-
}) :
|
|
1208
|
+
}) : ve;
|
|
1209
1209
|
}
|
|
1210
|
-
const
|
|
1211
|
-
async function
|
|
1212
|
-
|
|
1210
|
+
const W = xe({});
|
|
1211
|
+
async function qt() {
|
|
1212
|
+
W.update((e) => (Object.assign(e, window.__MANIFEST__), e));
|
|
1213
1213
|
}
|
|
1214
|
-
const T = /* @__PURE__ */ new Map(),
|
|
1215
|
-
function
|
|
1216
|
-
const
|
|
1217
|
-
return
|
|
1214
|
+
const T = /* @__PURE__ */ new Map(), V = 5e3;
|
|
1215
|
+
function Gt(e) {
|
|
1216
|
+
const t = T.get(e);
|
|
1217
|
+
return t ? (T.delete(e), Date.now() - t.createdAt > V ? (t.abortController.abort(), null) : t.response$) : null;
|
|
1218
1218
|
}
|
|
1219
|
-
function
|
|
1220
|
-
|
|
1219
|
+
function Bt(e, t) {
|
|
1220
|
+
ce(document, "mouseover").pipe(Dt()).pipe(
|
|
1221
1221
|
// Extract <a> element from hover target
|
|
1222
|
-
|
|
1222
|
+
ye((o) => {
|
|
1223
1223
|
const i = o.target, a = (i == null ? void 0 : i.tagName) === "A" ? i : i == null ? void 0 : i.closest("A");
|
|
1224
1224
|
if (!a) return null;
|
|
1225
1225
|
const c = a.getAttribute("href");
|
|
1226
1226
|
return !c || !c.startsWith("/") && !c.startsWith(".") ? null : c;
|
|
1227
1227
|
}),
|
|
1228
1228
|
// Drop non-link hovers
|
|
1229
|
-
|
|
1229
|
+
te((o) => o !== null),
|
|
1230
1230
|
// Drop if same URL as current page
|
|
1231
|
-
|
|
1231
|
+
te((o) => o !== window.location.pathname),
|
|
1232
1232
|
// Deduplicate consecutive hovers to same URL
|
|
1233
|
-
|
|
1233
|
+
$t(),
|
|
1234
1234
|
// Check that route requires server data
|
|
1235
|
-
|
|
1235
|
+
te((o) => {
|
|
1236
1236
|
const i = o.split("?")[0], a = "get", c = e.find(
|
|
1237
|
-
(l) => l.method.toLowerCase() === a &&
|
|
1237
|
+
(l) => l.method.toLowerCase() === a && t.find((f) => f.parser(i) && f.pattern === l.path)
|
|
1238
1238
|
);
|
|
1239
1239
|
if (!c) return !1;
|
|
1240
|
-
const s =
|
|
1241
|
-
return !!
|
|
1240
|
+
const s = t.find((l) => l.parser(i) && l.pattern === c.path);
|
|
1241
|
+
return !!N(W)[s == null ? void 0 : s.pattern];
|
|
1242
1242
|
}),
|
|
1243
1243
|
// switchMap cancels prior prefetch when hovering a new link
|
|
1244
|
-
|
|
1244
|
+
ze((o) => {
|
|
1245
1245
|
const i = T.get(o);
|
|
1246
|
-
if (i && Date.now() - i.createdAt <
|
|
1246
|
+
if (i && Date.now() - i.createdAt < V)
|
|
1247
1247
|
return [];
|
|
1248
|
-
const a = new AbortController(), c = new
|
|
1248
|
+
const a = new AbortController(), c = new dt(1), s = {
|
|
1249
1249
|
response$: c,
|
|
1250
1250
|
createdAt: Date.now(),
|
|
1251
1251
|
abortController: a
|
|
@@ -1259,13 +1259,13 @@ function Lt(e, r) {
|
|
|
1259
1259
|
},
|
|
1260
1260
|
signal: a.signal
|
|
1261
1261
|
};
|
|
1262
|
-
return u[
|
|
1262
|
+
return u[Q] = !0, Ge(
|
|
1263
1263
|
fetch(o, u).then(
|
|
1264
1264
|
(l) => (c.next(l), c.complete(), o),
|
|
1265
1265
|
(l) => (c.error(l), T.delete(o), null)
|
|
1266
1266
|
)
|
|
1267
1267
|
).pipe(
|
|
1268
|
-
|
|
1268
|
+
Wt({
|
|
1269
1269
|
unsubscribe: () => {
|
|
1270
1270
|
a.abort(), T.delete(o);
|
|
1271
1271
|
}
|
|
@@ -1275,56 +1275,250 @@ function Lt(e, r) {
|
|
|
1275
1275
|
).subscribe(), setInterval(() => {
|
|
1276
1276
|
const o = Date.now();
|
|
1277
1277
|
for (const [i, a] of T)
|
|
1278
|
-
o - a.createdAt >
|
|
1279
|
-
},
|
|
1278
|
+
o - a.createdAt > V && (a.abortController.abort(), T.delete(i));
|
|
1279
|
+
}, V);
|
|
1280
|
+
}
|
|
1281
|
+
var C = /* @__PURE__ */ ((e) => (e[e.TRACE = 0] = "TRACE", e[e.DEBUG = 1] = "DEBUG", e[e.INFO = 2] = "INFO", e[e.WARN = 3] = "WARN", e[e.ERROR = 4] = "ERROR", e[e.FATAL = 5] = "FATAL", e))(C || {});
|
|
1282
|
+
const zt = {
|
|
1283
|
+
trace: 0,
|
|
1284
|
+
debug: 1,
|
|
1285
|
+
info: 2,
|
|
1286
|
+
warn: 3,
|
|
1287
|
+
error: 4,
|
|
1288
|
+
fatal: 5
|
|
1289
|
+
/* FATAL */
|
|
1290
|
+
};
|
|
1291
|
+
function Yt(e) {
|
|
1292
|
+
if (!e) return 2;
|
|
1293
|
+
const t = e.trim().toLowerCase(), r = zt[t];
|
|
1294
|
+
if (typeof r == "number") return r;
|
|
1295
|
+
const n = Number(t);
|
|
1296
|
+
return Number.isFinite(n) && n >= 0 && n <= 5 ? n : 2;
|
|
1297
|
+
}
|
|
1298
|
+
function Ye(e) {
|
|
1299
|
+
switch (e) {
|
|
1300
|
+
case 0:
|
|
1301
|
+
return "TRACE";
|
|
1302
|
+
case 1:
|
|
1303
|
+
return "DEBUG";
|
|
1304
|
+
case 2:
|
|
1305
|
+
return "INFO";
|
|
1306
|
+
case 3:
|
|
1307
|
+
return "WARN";
|
|
1308
|
+
case 4:
|
|
1309
|
+
return "ERROR";
|
|
1310
|
+
case 5:
|
|
1311
|
+
return "FATAL";
|
|
1312
|
+
default:
|
|
1313
|
+
return "INFO";
|
|
1314
|
+
}
|
|
1280
1315
|
}
|
|
1281
|
-
|
|
1282
|
-
|
|
1316
|
+
function Oe(e) {
|
|
1317
|
+
if (e === void 0) return "undefined";
|
|
1318
|
+
if (e === null) return null;
|
|
1319
|
+
if (e instanceof Error)
|
|
1320
|
+
return { name: e.name, message: e.message, stack: e.stack };
|
|
1321
|
+
switch (typeof e) {
|
|
1322
|
+
case "string":
|
|
1323
|
+
case "number":
|
|
1324
|
+
case "boolean":
|
|
1325
|
+
return e;
|
|
1326
|
+
case "bigint":
|
|
1327
|
+
return e.toString();
|
|
1328
|
+
case "symbol":
|
|
1329
|
+
return String(e);
|
|
1330
|
+
case "function":
|
|
1331
|
+
return `[Function${e.name ? `: ${e.name}` : ""}]`;
|
|
1332
|
+
default:
|
|
1333
|
+
return e;
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
class Ht {
|
|
1337
|
+
constructor(t, r, n) {
|
|
1338
|
+
this.name = t, this.manager = r, this.contextData = n;
|
|
1339
|
+
}
|
|
1340
|
+
/**
|
|
1341
|
+
* Creates a new logger with the specified name.
|
|
1342
|
+
* Replaces the current logger's name (not hierarchical).
|
|
1343
|
+
*/
|
|
1344
|
+
named(t) {
|
|
1345
|
+
return new le(t, this.manager, this.contextData);
|
|
1346
|
+
}
|
|
1347
|
+
/**
|
|
1348
|
+
* Creates a new logger with additional context.
|
|
1349
|
+
* Context is merged into every log entry's context field.
|
|
1350
|
+
* If this logger already has context, both contexts are merged.
|
|
1351
|
+
* Returns a new logger instance (immutable operation).
|
|
1352
|
+
*/
|
|
1353
|
+
withContext(t) {
|
|
1354
|
+
const r = this.contextData ? { ...this.contextData, ...t } : t;
|
|
1355
|
+
return new le(this.name, this.manager, r);
|
|
1356
|
+
}
|
|
1357
|
+
trace(t, ...r) {
|
|
1358
|
+
this.log(C.TRACE, t, r);
|
|
1359
|
+
}
|
|
1360
|
+
debug(t, ...r) {
|
|
1361
|
+
this.log(C.DEBUG, t, r);
|
|
1362
|
+
}
|
|
1363
|
+
info(t, ...r) {
|
|
1364
|
+
this.log(C.INFO, t, r);
|
|
1365
|
+
}
|
|
1366
|
+
warn(t, ...r) {
|
|
1367
|
+
this.log(C.WARN, t, r);
|
|
1368
|
+
}
|
|
1369
|
+
error(t, ...r) {
|
|
1370
|
+
this.log(C.ERROR, t, r);
|
|
1371
|
+
}
|
|
1372
|
+
fatal(t, ...r) {
|
|
1373
|
+
this.log(C.FATAL, t, r);
|
|
1374
|
+
}
|
|
1375
|
+
log(t, r, n) {
|
|
1376
|
+
if (!this.manager.shouldLog(t, this.name)) return;
|
|
1377
|
+
const o = (/* @__PURE__ */ new Date()).toISOString();
|
|
1378
|
+
let i = n.length > 0 ? n.length === 1 ? Oe(n[0]) : n.map(Oe) : void 0, a;
|
|
1379
|
+
this.contextData && i !== void 0 ? a = { ...this.contextData, args: i } : this.contextData ? a = this.contextData : a = i, this.manager.log({
|
|
1380
|
+
timestamp: o,
|
|
1381
|
+
level: Ye(t),
|
|
1382
|
+
logger: this.name,
|
|
1383
|
+
message: r,
|
|
1384
|
+
context: a
|
|
1385
|
+
});
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
class le extends Ht {
|
|
1389
|
+
constructor(t, r, n) {
|
|
1390
|
+
super(t, r, n);
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1393
|
+
class Vt {
|
|
1394
|
+
log(t) {
|
|
1395
|
+
const r = t.context !== void 0 ? ` ${JSON.stringify(t.context)}` : "", n = `[${t.timestamp}] [${t.logger}] [${t.level}] ${t.message}${r}`;
|
|
1396
|
+
switch (t.level) {
|
|
1397
|
+
case "ERROR":
|
|
1398
|
+
case "FATAL":
|
|
1399
|
+
console.error(n);
|
|
1400
|
+
break;
|
|
1401
|
+
case "WARN":
|
|
1402
|
+
console.warn(n);
|
|
1403
|
+
break;
|
|
1404
|
+
default:
|
|
1405
|
+
console.log(n);
|
|
1406
|
+
break;
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1410
|
+
const ne = /* @__PURE__ */ Symbol.for("@noego/logger");
|
|
1411
|
+
class Kt {
|
|
1412
|
+
constructor() {
|
|
1413
|
+
var o, i, a;
|
|
1414
|
+
this.transports = [], this.loggerLevels = /* @__PURE__ */ new Map();
|
|
1415
|
+
const t = typeof process < "u" ? (o = process.env) == null ? void 0 : o.LOG_LEVEL : void 0, r = typeof process < "u" ? (i = process.env) == null ? void 0 : i.SERVICE_NAME : void 0, n = typeof process < "u" ? (a = process.env) == null ? void 0 : a.NODE_ENV : void 0;
|
|
1416
|
+
this.level = Yt(t), this.service = r ?? "noego", this.environment = n ?? "development";
|
|
1417
|
+
}
|
|
1418
|
+
getLevel() {
|
|
1419
|
+
return this.level;
|
|
1420
|
+
}
|
|
1421
|
+
setLevel(t) {
|
|
1422
|
+
this.level = t;
|
|
1423
|
+
}
|
|
1424
|
+
setLoggerLevel(t, r) {
|
|
1425
|
+
this.loggerLevels.set(t, r);
|
|
1426
|
+
}
|
|
1427
|
+
shouldLog(t, r) {
|
|
1428
|
+
if (r) {
|
|
1429
|
+
const n = this.loggerLevels.get(r);
|
|
1430
|
+
if (n !== void 0)
|
|
1431
|
+
return t >= n;
|
|
1432
|
+
}
|
|
1433
|
+
return t >= this.level;
|
|
1434
|
+
}
|
|
1435
|
+
addTransport(t) {
|
|
1436
|
+
this.transports.push(t);
|
|
1437
|
+
}
|
|
1438
|
+
setTransports(t) {
|
|
1439
|
+
this.transports = [...t];
|
|
1440
|
+
}
|
|
1441
|
+
clearTransports() {
|
|
1442
|
+
this.transports = [];
|
|
1443
|
+
}
|
|
1444
|
+
setServiceName(t) {
|
|
1445
|
+
this.service = t;
|
|
1446
|
+
}
|
|
1447
|
+
log(t) {
|
|
1448
|
+
const r = {
|
|
1449
|
+
...t,
|
|
1450
|
+
environment: this.environment,
|
|
1451
|
+
service: this.service
|
|
1452
|
+
};
|
|
1453
|
+
for (const n of this.transports)
|
|
1454
|
+
n.log(r);
|
|
1455
|
+
}
|
|
1456
|
+
async closeAll() {
|
|
1457
|
+
for (const t of this.transports)
|
|
1458
|
+
t.close && await t.close();
|
|
1459
|
+
}
|
|
1460
|
+
formatMessage(t, r, n) {
|
|
1461
|
+
return `[${(/* @__PURE__ */ new Date()).toISOString()}] [${r}] [${Ye(t)}] ${n}`;
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
function Jt() {
|
|
1465
|
+
const e = globalThis;
|
|
1466
|
+
if (!e[ne]) {
|
|
1467
|
+
const t = new Kt();
|
|
1468
|
+
t.addTransport(new Vt()), e[ne] = t;
|
|
1469
|
+
}
|
|
1470
|
+
return e[ne];
|
|
1471
|
+
}
|
|
1472
|
+
function be(e) {
|
|
1473
|
+
return new le(e, Jt());
|
|
1474
|
+
}
|
|
1475
|
+
const y = be("forge:nav"), Xt = 1e4;
|
|
1476
|
+
function Zt(e, t, r) {
|
|
1283
1477
|
let n = null, o = !1;
|
|
1284
1478
|
const i = new Promise((a, c) => {
|
|
1285
1479
|
n = setTimeout(
|
|
1286
1480
|
() => {
|
|
1287
|
-
o = !0,
|
|
1481
|
+
o = !0, y.error("Timeout fired after", t, "ms"), r(), c(new Error(`Navigation timed out after ${t}ms`));
|
|
1288
1482
|
},
|
|
1289
|
-
|
|
1290
|
-
),
|
|
1483
|
+
t
|
|
1484
|
+
), y.debug("Timeout scheduled for", t, "ms, timeoutId:", n);
|
|
1291
1485
|
});
|
|
1292
1486
|
return Promise.race([
|
|
1293
1487
|
e.finally(() => {
|
|
1294
|
-
n !== null && (o ?
|
|
1488
|
+
n !== null && (o ? y.warn("Promise settled AFTER timeout already fired") : (y.debug("Clearing timeout", n, "- promise settled successfully"), clearTimeout(n)));
|
|
1295
1489
|
}),
|
|
1296
1490
|
i
|
|
1297
1491
|
]);
|
|
1298
1492
|
}
|
|
1299
|
-
const
|
|
1300
|
-
let
|
|
1301
|
-
function
|
|
1302
|
-
e && e.redirectPath && (
|
|
1493
|
+
const fe = new Z();
|
|
1494
|
+
let _ = 0, q = null;
|
|
1495
|
+
function Qt(e) {
|
|
1496
|
+
e && e.redirectPath && (y.debug("Handling redirect to", e.redirectPath), setTimeout(
|
|
1303
1497
|
() => {
|
|
1304
1498
|
window.dispatchEvent(new CustomEvent("forge-redirect", { detail: { path: e.redirectPath } }));
|
|
1305
1499
|
},
|
|
1306
1500
|
0
|
|
1307
1501
|
));
|
|
1308
1502
|
}
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
}).catch((
|
|
1312
|
-
|
|
1503
|
+
fe.pipe(ze((e) => Ge(Zt(nr(e), Xt, () => {
|
|
1504
|
+
y.error("Navigation timed out"), _++, q && (q.abort(), q = null);
|
|
1505
|
+
}).catch((t) => {
|
|
1506
|
+
y.error("Navigation failed:", t);
|
|
1313
1507
|
})))).subscribe({
|
|
1314
|
-
next:
|
|
1508
|
+
next: Qt,
|
|
1315
1509
|
error: (e) => {
|
|
1316
|
-
|
|
1510
|
+
y.error("Stream error:", e);
|
|
1317
1511
|
}
|
|
1318
1512
|
});
|
|
1319
|
-
function
|
|
1320
|
-
var
|
|
1321
|
-
|
|
1513
|
+
function er(e) {
|
|
1514
|
+
var t;
|
|
1515
|
+
y.debug("Pushing navigation event to stream", {
|
|
1322
1516
|
url: e.url,
|
|
1323
|
-
currentNavigationId:
|
|
1324
|
-
subscriberCount: ((
|
|
1325
|
-
}),
|
|
1517
|
+
currentNavigationId: _,
|
|
1518
|
+
subscriberCount: ((t = fe.observers) == null ? void 0 : t.length) || 0
|
|
1519
|
+
}), fe.next(e);
|
|
1326
1520
|
}
|
|
1327
|
-
const
|
|
1521
|
+
const x = xe({
|
|
1328
1522
|
active: {
|
|
1329
1523
|
layouts: [],
|
|
1330
1524
|
view: null,
|
|
@@ -1337,22 +1531,22 @@ const O = me({
|
|
|
1337
1531
|
},
|
|
1338
1532
|
phase: "idle",
|
|
1339
1533
|
navigationId: 0,
|
|
1340
|
-
page:
|
|
1341
|
-
}),
|
|
1342
|
-
const e =
|
|
1534
|
+
page: D
|
|
1535
|
+
}), tr = async () => {
|
|
1536
|
+
const e = N(x).navigationId;
|
|
1343
1537
|
try {
|
|
1344
|
-
const
|
|
1538
|
+
const t = window.location.pathname + window.location.search, r = {
|
|
1345
1539
|
method: "GET",
|
|
1346
1540
|
headers: {
|
|
1347
1541
|
"Content-Type": "application/json",
|
|
1348
1542
|
Accept: "application/json"
|
|
1349
1543
|
}
|
|
1350
1544
|
};
|
|
1351
|
-
|
|
1352
|
-
const n = await fetch(
|
|
1545
|
+
r[Q] = !0;
|
|
1546
|
+
const n = await fetch(t, r);
|
|
1353
1547
|
if (!n.ok) return !1;
|
|
1354
|
-
const o = await n.json(), i =
|
|
1355
|
-
return e !== i ? (
|
|
1548
|
+
const o = await n.json(), i = N(x).navigationId;
|
|
1549
|
+
return e !== i ? (y.debug("Discarding stale poll response", { pollNavigationId: e, currentNavigationId: i }), !1) : (x.update((a) => {
|
|
1356
1550
|
var c;
|
|
1357
1551
|
return a.active.data = { layout: ((c = a.active.data) == null ? void 0 : c.layout) || [], view: o.view }, a;
|
|
1358
1552
|
}), !0);
|
|
@@ -1360,18 +1554,18 @@ const O = me({
|
|
|
1360
1554
|
return !1;
|
|
1361
1555
|
}
|
|
1362
1556
|
};
|
|
1363
|
-
|
|
1364
|
-
function
|
|
1365
|
-
let
|
|
1366
|
-
return
|
|
1557
|
+
D.update((e) => (e.poll = tr, e));
|
|
1558
|
+
function J(...e) {
|
|
1559
|
+
let t = e.map((r, n) => n === 0 ? r.replace(/\/+$/, "") : r.replace(/^\/+|\/+$/g, "")).join("/");
|
|
1560
|
+
return t.startsWith("/") || (t = "/" + t), t.split("?")[0];
|
|
1367
1561
|
}
|
|
1368
|
-
async function
|
|
1562
|
+
async function rr(e, t, r, n, o, i) {
|
|
1369
1563
|
try {
|
|
1370
|
-
const a = typeof
|
|
1371
|
-
let p =
|
|
1564
|
+
const a = typeof t == "string" && t.indexOf("assets") !== -1, c = (r.layout || []).map((d) => {
|
|
1565
|
+
let p = J(t, d).toString();
|
|
1372
1566
|
return a && (p = p.endsWith(".svelte") ? p.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(p) ? p : p + ".js"), p;
|
|
1373
1567
|
});
|
|
1374
|
-
let s =
|
|
1568
|
+
let s = J(t, r.view).toString();
|
|
1375
1569
|
a && (s = s.endsWith(".svelte") ? s.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(s) ? s : s + ".js");
|
|
1376
1570
|
const u = await Promise.all(c.map((d) => import(
|
|
1377
1571
|
/* @vite-ignore */
|
|
@@ -1384,25 +1578,25 @@ async function Wt(e, r, t, n, o, i) {
|
|
|
1384
1578
|
).then((d) => d.default), f = window.__INITIAL_DATA__ || { layout: [], view: {} }, v = {
|
|
1385
1579
|
layouts: u,
|
|
1386
1580
|
view: l,
|
|
1387
|
-
viewPath:
|
|
1581
|
+
viewPath: r.view || null,
|
|
1388
1582
|
// Store original path for debugging
|
|
1389
|
-
layoutPaths:
|
|
1583
|
+
layoutPaths: r.layout || [],
|
|
1390
1584
|
// Store original paths for debugging
|
|
1391
1585
|
data: f,
|
|
1392
1586
|
params: n,
|
|
1393
1587
|
urlParams: o,
|
|
1394
1588
|
query: i
|
|
1395
1589
|
};
|
|
1396
|
-
|
|
1590
|
+
x.update((d) => (d.active = v, d.phase = "idle", d)), Ve(Ke, { target: e, props: { root: x } });
|
|
1397
1591
|
} catch (a) {
|
|
1398
|
-
|
|
1592
|
+
y.error("Client-side route loading failed:", a);
|
|
1399
1593
|
}
|
|
1400
1594
|
}
|
|
1401
|
-
function
|
|
1402
|
-
|
|
1595
|
+
function oe(e, t, r, n, o, i, a = !1, c = !0) {
|
|
1596
|
+
er({
|
|
1403
1597
|
url: e,
|
|
1404
|
-
base_path:
|
|
1405
|
-
route:
|
|
1598
|
+
base_path: t,
|
|
1599
|
+
route: r,
|
|
1406
1600
|
params: n,
|
|
1407
1601
|
urlParams: o,
|
|
1408
1602
|
query: i,
|
|
@@ -1410,39 +1604,39 @@ function Q(e, r, t, n, o, i, a = !1, c = !0) {
|
|
|
1410
1604
|
updateUrl: c
|
|
1411
1605
|
});
|
|
1412
1606
|
}
|
|
1413
|
-
async function
|
|
1607
|
+
async function nr(e) {
|
|
1414
1608
|
const {
|
|
1415
|
-
url:
|
|
1416
|
-
base_path:
|
|
1609
|
+
url: t,
|
|
1610
|
+
base_path: r,
|
|
1417
1611
|
route: n,
|
|
1418
1612
|
params: o,
|
|
1419
1613
|
urlParams: i,
|
|
1420
1614
|
query: a,
|
|
1421
1615
|
server_loading: c,
|
|
1422
1616
|
updateUrl: s
|
|
1423
|
-
} = e, u = ++
|
|
1424
|
-
|
|
1617
|
+
} = e, u = ++_, l = new AbortController();
|
|
1618
|
+
q = l, y.debug("Starting navigation", {
|
|
1425
1619
|
navigationId: u,
|
|
1426
|
-
url:
|
|
1620
|
+
url: t,
|
|
1427
1621
|
updateUrl: s,
|
|
1428
1622
|
server_loading: c,
|
|
1429
|
-
currentNavigationId:
|
|
1430
|
-
hasAbortController: !!
|
|
1431
|
-
}),
|
|
1623
|
+
currentNavigationId: _,
|
|
1624
|
+
hasAbortController: !!q
|
|
1625
|
+
}), x.update((f) => (f.phase = "loading", f.navigationId = u, f));
|
|
1432
1626
|
try {
|
|
1433
1627
|
let f = { layout: [], view: {} };
|
|
1434
1628
|
if (c) {
|
|
1435
|
-
|
|
1436
|
-
let
|
|
1437
|
-
const
|
|
1438
|
-
if (
|
|
1629
|
+
y.debug("Fetching server data", { navigationId: u, url: t });
|
|
1630
|
+
let m = null;
|
|
1631
|
+
const b = Gt(t);
|
|
1632
|
+
if (b)
|
|
1439
1633
|
try {
|
|
1440
|
-
|
|
1634
|
+
y.debug("Using prefetched response for", t), m = await Pt(b);
|
|
1441
1635
|
} catch {
|
|
1442
|
-
|
|
1636
|
+
y.debug("Prefetch failed, falling back to fetch", t), m = null;
|
|
1443
1637
|
}
|
|
1444
|
-
if (!
|
|
1445
|
-
const
|
|
1638
|
+
if (!m) {
|
|
1639
|
+
const O = {
|
|
1446
1640
|
method: n.method,
|
|
1447
1641
|
headers: {
|
|
1448
1642
|
"Content-Type": "application/json",
|
|
@@ -1450,53 +1644,53 @@ async function Dt(e) {
|
|
|
1450
1644
|
},
|
|
1451
1645
|
signal: l.signal
|
|
1452
1646
|
};
|
|
1453
|
-
|
|
1647
|
+
O[Q] = !0, m = await fetch(t, O);
|
|
1454
1648
|
}
|
|
1455
|
-
if (
|
|
1649
|
+
if (y.debug("Fetch response received", {
|
|
1456
1650
|
navigationId: u,
|
|
1457
|
-
url:
|
|
1458
|
-
ok:
|
|
1459
|
-
status:
|
|
1460
|
-
redirected:
|
|
1461
|
-
currentNavigationId:
|
|
1462
|
-
}),
|
|
1463
|
-
return
|
|
1464
|
-
redirectPath:
|
|
1651
|
+
url: t,
|
|
1652
|
+
ok: m.ok,
|
|
1653
|
+
status: m.status,
|
|
1654
|
+
redirected: m.redirected,
|
|
1655
|
+
currentNavigationId: _
|
|
1656
|
+
}), m.redirected || m.headers.get("X-Forge-Redirect") === "true")
|
|
1657
|
+
return y.debug("Redirect detected"), x.update((O) => (O.phase = "idle", O)), {
|
|
1658
|
+
redirectPath: m.headers.get("X-Forge-Redirect-Path") || void 0
|
|
1465
1659
|
};
|
|
1466
|
-
if (!
|
|
1467
|
-
throw new Error(`Network response was not ok: ${
|
|
1468
|
-
f = await
|
|
1660
|
+
if (!m.ok)
|
|
1661
|
+
throw new Error(`Network response was not ok: ${m.status}`);
|
|
1662
|
+
f = await m.json(), y.debug("Server data received:", f);
|
|
1469
1663
|
}
|
|
1470
|
-
if (u !==
|
|
1471
|
-
|
|
1664
|
+
if (u !== _) {
|
|
1665
|
+
y.debug("Stale navigation after fetch, aborting", { navigationId: u, currentNavigationId: _ });
|
|
1472
1666
|
return;
|
|
1473
1667
|
}
|
|
1474
|
-
|
|
1475
|
-
const v = typeof
|
|
1476
|
-
let
|
|
1477
|
-
return v && (
|
|
1668
|
+
y.debug("Loading components", { navigationId: u, view: n.view, layouts: n.layout });
|
|
1669
|
+
const v = typeof r == "string" && r.indexOf("assets") !== -1, d = (n.layout || []).map((m) => {
|
|
1670
|
+
let b = J(r, m).toString();
|
|
1671
|
+
return v && (b = b.endsWith(".svelte") ? b.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(b) ? b : b + ".js"), b;
|
|
1478
1672
|
});
|
|
1479
|
-
let p =
|
|
1673
|
+
let p = J(r, n.view).toString();
|
|
1480
1674
|
v && (p = p.endsWith(".svelte") ? p.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(p) ? p : p + ".js"), p.startsWith("/") || (p = "/" + p);
|
|
1481
|
-
const h = await Promise.all(d.map((
|
|
1675
|
+
const h = await Promise.all(d.map((m) => import(
|
|
1482
1676
|
/* @vite-ignore */
|
|
1483
|
-
|
|
1484
|
-
).then((
|
|
1677
|
+
m
|
|
1678
|
+
).then((b) => b.default))), S = await import(
|
|
1485
1679
|
/* @vite-ignore */
|
|
1486
1680
|
p
|
|
1487
|
-
).then((
|
|
1488
|
-
if (
|
|
1681
|
+
).then((m) => m.default);
|
|
1682
|
+
if (y.debug("Components loaded", {
|
|
1489
1683
|
navigationId: u,
|
|
1490
|
-
currentNavigationId:
|
|
1684
|
+
currentNavigationId: _,
|
|
1491
1685
|
layoutsCount: h.length,
|
|
1492
|
-
viewLoaded: !!
|
|
1493
|
-
}), u !==
|
|
1494
|
-
|
|
1686
|
+
viewLoaded: !!S
|
|
1687
|
+
}), u !== _) {
|
|
1688
|
+
y.debug("Stale navigation after component load, aborting", { navigationId: u, currentNavigationId: _ });
|
|
1495
1689
|
return;
|
|
1496
1690
|
}
|
|
1497
|
-
const
|
|
1691
|
+
const g = {
|
|
1498
1692
|
layouts: h,
|
|
1499
|
-
view:
|
|
1693
|
+
view: S,
|
|
1500
1694
|
viewPath: n.view || null,
|
|
1501
1695
|
// Store original path for debugging
|
|
1502
1696
|
layoutPaths: n.layout || [],
|
|
@@ -1506,35 +1700,36 @@ async function Dt(e) {
|
|
|
1506
1700
|
urlParams: i,
|
|
1507
1701
|
query: a
|
|
1508
1702
|
};
|
|
1509
|
-
|
|
1703
|
+
y.debug("Committing new state", {
|
|
1510
1704
|
navigationId: u,
|
|
1511
|
-
currentNavigationId:
|
|
1512
|
-
layoutsCount:
|
|
1513
|
-
viewSet: !!
|
|
1514
|
-
dataKeys: Object.keys(
|
|
1515
|
-
}),
|
|
1705
|
+
currentNavigationId: _,
|
|
1706
|
+
layoutsCount: g.layouts.length,
|
|
1707
|
+
viewSet: !!g.view,
|
|
1708
|
+
dataKeys: Object.keys(g.data || {})
|
|
1709
|
+
}), x.update((m) => (m.active = g, m.phase = "idle", y.debug("ROOT.active updated", {
|
|
1516
1710
|
navigationId: u,
|
|
1517
|
-
layoutsCount:
|
|
1518
|
-
viewSet: !!
|
|
1519
|
-
dataKeys: Object.keys(
|
|
1520
|
-
paramsKeys: Object.keys(
|
|
1521
|
-
}),
|
|
1711
|
+
layoutsCount: m.active.layouts.length,
|
|
1712
|
+
viewSet: !!m.active.view,
|
|
1713
|
+
dataKeys: Object.keys(m.active.data || {}),
|
|
1714
|
+
paramsKeys: Object.keys(m.active.params || {})
|
|
1715
|
+
}), m)), typeof window < "u" && window.scroll(0, 0), s && (y.debug("Updating browser URL", { url: t }), window.history.pushState({}, "", t)), y.debug("Navigation complete", { navigationId: u, url: t });
|
|
1522
1716
|
} catch (f) {
|
|
1523
|
-
if (
|
|
1717
|
+
if (y.error("Navigation failed", {
|
|
1524
1718
|
navigationId: u,
|
|
1525
|
-
currentNavigationId:
|
|
1526
|
-
url:
|
|
1719
|
+
currentNavigationId: _,
|
|
1720
|
+
url: t,
|
|
1527
1721
|
error: f instanceof Error ? f.message : String(f)
|
|
1528
|
-
}),
|
|
1529
|
-
|
|
1722
|
+
}), x.update((v) => (v.phase = "idle", v)), f.name === "AbortError") {
|
|
1723
|
+
y.debug("Navigation aborted");
|
|
1530
1724
|
return;
|
|
1531
1725
|
}
|
|
1532
1726
|
throw f;
|
|
1533
1727
|
}
|
|
1534
1728
|
}
|
|
1535
|
-
|
|
1729
|
+
const R = be("forge:events");
|
|
1730
|
+
function or(e, t, r) {
|
|
1536
1731
|
if (!document) {
|
|
1537
|
-
|
|
1732
|
+
R.error("Document not found");
|
|
1538
1733
|
return;
|
|
1539
1734
|
}
|
|
1540
1735
|
document.addEventListener("click", (n) => {
|
|
@@ -1547,52 +1742,52 @@ function qt(e, r, t) {
|
|
|
1547
1742
|
return;
|
|
1548
1743
|
}
|
|
1549
1744
|
if (s && s.startsWith("/") || s.startsWith(".")) {
|
|
1550
|
-
const u = s.split("?")[0], l = i.getAttribute("method") || "get", f =
|
|
1745
|
+
const u = s.split("?")[0], l = i.getAttribute("method") || "get", f = t.find((v) => v.method.toLowerCase() === l && r.find((d) => d.parser(u) && d.pattern === v.path));
|
|
1551
1746
|
if (f) {
|
|
1552
1747
|
n.preventDefault();
|
|
1553
|
-
const v =
|
|
1554
|
-
|
|
1748
|
+
const v = r.find((b) => b.parser(u) && b.pattern === f.path), d = (v == null ? void 0 : v.parser(u)) || {}, p = new URLSearchParams(s.split("?")[1] || ""), h = Object.fromEntries(p.entries()) || {}, S = { ...d, ...h }, m = N(W)[v == null ? void 0 : v.pattern];
|
|
1749
|
+
D.update((b) => (b.url = s, b.pathname = u, b.params = d, b.query = h, b)), R.debug("Click navigation to", s), oe(s, e, f, S, d, h, m, !0);
|
|
1555
1750
|
} else
|
|
1556
|
-
|
|
1751
|
+
R.warn("No matching route found", s, "- using fallback navigation");
|
|
1557
1752
|
}
|
|
1558
1753
|
}
|
|
1559
1754
|
}), window.addEventListener("popstate", (n) => {
|
|
1560
|
-
const o = window.location.pathname, i = window.location.pathname + window.location.search, a = "get", c =
|
|
1755
|
+
const o = window.location.pathname, i = window.location.pathname + window.location.search, a = "get", c = t.find((s) => s.method.toLowerCase() === a && r.find((u) => u.parser(o) && u.pattern === s.path));
|
|
1561
1756
|
if (c) {
|
|
1562
|
-
const s =
|
|
1563
|
-
|
|
1564
|
-
const v = { ...u, ...f }, p =
|
|
1565
|
-
|
|
1757
|
+
const s = r.find((h) => h.parser(o) && h.pattern === c.path), u = (s == null ? void 0 : s.parser(o)) || {}, l = new URLSearchParams(window.location.search), f = Object.fromEntries(l.entries()) || {};
|
|
1758
|
+
D.update((h) => (h.url = i, h.pathname = window.location.pathname, h.params = u, h.query = f, h));
|
|
1759
|
+
const v = { ...u, ...f }, p = N(W)[s == null ? void 0 : s.pattern];
|
|
1760
|
+
R.debug("Popstate navigation to", i), oe(i, e, c, v, u, f, p, !1);
|
|
1566
1761
|
} else
|
|
1567
|
-
|
|
1762
|
+
R.warn("No matching route found", o, "- using fallback navigation"), window.location.href = o;
|
|
1568
1763
|
}), window.addEventListener("forge-redirect", ((n) => {
|
|
1569
1764
|
const o = n.detail.path, i = o.split("?")[0];
|
|
1570
|
-
|
|
1571
|
-
const a = "get", c =
|
|
1765
|
+
R.debug("Handling forge-redirect to:", o);
|
|
1766
|
+
const a = "get", c = t.find((s) => s.method.toLowerCase() === a && r.find((u) => u.parser(i) && u.pattern === s.path));
|
|
1572
1767
|
if (c) {
|
|
1573
|
-
const s =
|
|
1574
|
-
|
|
1768
|
+
const s = r.find((h) => h.parser(i) && h.pattern === c.path), u = (s == null ? void 0 : s.parser(i)) || {}, l = new URLSearchParams(o.split("?")[1] || ""), f = Object.fromEntries(l.entries()) || {}, v = { ...u, ...f }, p = N(W)[s == null ? void 0 : s.pattern];
|
|
1769
|
+
D.update((h) => (h.url = o, h.pathname = i, h.params = u, h.query = f, h)), oe(o, e, c, v, u, f, p, !0);
|
|
1575
1770
|
} else
|
|
1576
|
-
|
|
1577
|
-
})),
|
|
1771
|
+
R.warn("No matching route found", i, "- using fallback navigation"), window.location.href = i;
|
|
1772
|
+
})), Bt(t, r);
|
|
1578
1773
|
}
|
|
1579
|
-
const
|
|
1580
|
-
let
|
|
1581
|
-
function
|
|
1774
|
+
const L = be("forge:client"), Q = Symbol("forge-load-function");
|
|
1775
|
+
let K = [], ie = null;
|
|
1776
|
+
function ir(e) {
|
|
1582
1777
|
try {
|
|
1583
|
-
const
|
|
1584
|
-
return
|
|
1778
|
+
const t = new URL(e, window.location.origin);
|
|
1779
|
+
return t.origin === window.location.origin && !t.pathname.startsWith("/api/");
|
|
1585
1780
|
} catch {
|
|
1586
1781
|
return !e.startsWith("/api/");
|
|
1587
1782
|
}
|
|
1588
1783
|
}
|
|
1589
|
-
function
|
|
1590
|
-
typeof window < "u" && !
|
|
1591
|
-
let
|
|
1592
|
-
for (const i of
|
|
1784
|
+
function ar() {
|
|
1785
|
+
typeof window < "u" && !ie && (ie = window.fetch, window.fetch = async function(e, t = {}) {
|
|
1786
|
+
let r = { ...t };
|
|
1787
|
+
for (const i of K)
|
|
1593
1788
|
try {
|
|
1594
1789
|
if (i.length === 2) {
|
|
1595
|
-
const a = new Headers(
|
|
1790
|
+
const a = new Headers(r.headers), c = Object.fromEntries(a.entries());
|
|
1596
1791
|
await new Promise((s, u) => {
|
|
1597
1792
|
try {
|
|
1598
1793
|
i(c, (l) => {
|
|
@@ -1602,7 +1797,7 @@ function Gt() {
|
|
|
1602
1797
|
const f = new Headers();
|
|
1603
1798
|
Object.entries(c).forEach(([v, d]) => {
|
|
1604
1799
|
d !== void 0 && f.set(v, d);
|
|
1605
|
-
}),
|
|
1800
|
+
}), r.headers = f, s();
|
|
1606
1801
|
}
|
|
1607
1802
|
});
|
|
1608
1803
|
} catch (l) {
|
|
@@ -1610,20 +1805,20 @@ function Gt() {
|
|
|
1610
1805
|
}
|
|
1611
1806
|
});
|
|
1612
1807
|
} else {
|
|
1613
|
-
const a = await i(
|
|
1614
|
-
a && typeof a == "object" && (
|
|
1808
|
+
const a = await i(r, e);
|
|
1809
|
+
a && typeof a == "object" && (r = a);
|
|
1615
1810
|
}
|
|
1616
1811
|
} catch (a) {
|
|
1617
|
-
throw
|
|
1812
|
+
throw L.error("Middleware error", a), a;
|
|
1618
1813
|
}
|
|
1619
|
-
const n =
|
|
1620
|
-
|
|
1814
|
+
const n = r == null ? void 0 : r[Q];
|
|
1815
|
+
L.debug("Fetch override request", {
|
|
1621
1816
|
url: e,
|
|
1622
1817
|
hasForgeSymbol: n,
|
|
1623
|
-
headers:
|
|
1818
|
+
headers: r == null ? void 0 : r.headers
|
|
1624
1819
|
});
|
|
1625
|
-
const o = await
|
|
1626
|
-
if (
|
|
1820
|
+
const o = await ie(e, r);
|
|
1821
|
+
if (L.debug("Fetch override response", {
|
|
1627
1822
|
url: e,
|
|
1628
1823
|
responseUrl: o.url,
|
|
1629
1824
|
redirected: o.redirected,
|
|
@@ -1632,13 +1827,13 @@ function Gt() {
|
|
|
1632
1827
|
hasForgeSymbol: n
|
|
1633
1828
|
}), n && o.redirected) {
|
|
1634
1829
|
const i = typeof e == "string" ? e : e.url, a = o.url;
|
|
1635
|
-
if (
|
|
1830
|
+
if (L.debug("Redirect detected", {
|
|
1636
1831
|
requested: i,
|
|
1637
1832
|
final: a,
|
|
1638
1833
|
redirected: o.redirected
|
|
1639
|
-
}),
|
|
1834
|
+
}), ir(a)) {
|
|
1640
1835
|
const c = new URL(a), s = c.pathname + c.search;
|
|
1641
|
-
return
|
|
1836
|
+
return L.debug("Redirect detected to:", s, "- will navigate after current request completes"), new Response(JSON.stringify({ layout: [], view: {} }), {
|
|
1642
1837
|
status: 200,
|
|
1643
1838
|
headers: {
|
|
1644
1839
|
"Content-Type": "application/json",
|
|
@@ -1651,54 +1846,54 @@ function Gt() {
|
|
|
1651
1846
|
return o;
|
|
1652
1847
|
});
|
|
1653
1848
|
}
|
|
1654
|
-
|
|
1655
|
-
const
|
|
1849
|
+
ar();
|
|
1850
|
+
const dr = {
|
|
1656
1851
|
/**
|
|
1657
1852
|
* Add middleware to the fetch pipeline
|
|
1658
1853
|
*/
|
|
1659
1854
|
configUpdate(e) {
|
|
1660
1855
|
if (typeof e != "function")
|
|
1661
1856
|
throw new Error("Middleware must be a function");
|
|
1662
|
-
|
|
1857
|
+
K.push(e);
|
|
1663
1858
|
},
|
|
1664
1859
|
/**
|
|
1665
1860
|
* Reset all middleware
|
|
1666
1861
|
*/
|
|
1667
1862
|
reset() {
|
|
1668
|
-
|
|
1863
|
+
K.length = 0;
|
|
1669
1864
|
},
|
|
1670
1865
|
/**
|
|
1671
1866
|
* Get current middleware count (for debugging)
|
|
1672
1867
|
*/
|
|
1673
1868
|
getMiddlewareCount() {
|
|
1674
|
-
return
|
|
1869
|
+
return K.length;
|
|
1675
1870
|
}
|
|
1676
1871
|
};
|
|
1677
|
-
let
|
|
1678
|
-
async function
|
|
1679
|
-
let
|
|
1680
|
-
if (!
|
|
1872
|
+
let ae;
|
|
1873
|
+
async function hr(e, t) {
|
|
1874
|
+
let r = window.__COMPONENT_DIR__ || t.component_dir;
|
|
1875
|
+
if (!r && typeof r != "string")
|
|
1681
1876
|
throw new Error("No component directory provided");
|
|
1682
1877
|
let n = window.__ROUTING__;
|
|
1683
|
-
if (
|
|
1684
|
-
const o = (window.location.pathname || "/").split("?")[0], i =
|
|
1878
|
+
if (ae = Xe(n), window && window.location) {
|
|
1879
|
+
const o = (window.location.pathname || "/").split("?")[0], i = ae.find((c) => c.parser(o));
|
|
1685
1880
|
let a = i ? n.find((c) => c.path === i.pattern) : null;
|
|
1686
1881
|
if (i && a) {
|
|
1687
1882
|
const c = i.parser(o) || {}, s = new URLSearchParams(window.location.search), u = Object.fromEntries(s.entries()) || {}, l = { ...c, ...u };
|
|
1688
|
-
|
|
1883
|
+
qt(), rr(e, r, a, l, c, u), or(r, n, ae);
|
|
1689
1884
|
} else
|
|
1690
|
-
|
|
1885
|
+
L.warn("No matching route", o);
|
|
1691
1886
|
}
|
|
1692
1887
|
}
|
|
1693
1888
|
export {
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1889
|
+
W as MANIFEST_STORE,
|
|
1890
|
+
or as bootstrap_events,
|
|
1891
|
+
hr as createApp,
|
|
1892
|
+
dr as fetch,
|
|
1893
|
+
rr as loadRoute,
|
|
1894
|
+
D as page,
|
|
1895
|
+
mr as shadowUrl,
|
|
1896
|
+
qt as updateManifestStore,
|
|
1897
|
+
oe as updateRoute
|
|
1703
1898
|
};
|
|
1704
1899
|
//# sourceMappingURL=client.mjs.map
|