@manyducks.co/dolla 2.0.0-alpha.1 → 2.0.0-alpha.2
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/README.md +90 -17
- package/dist/index.d.ts +6 -29
- package/dist/index.js +720 -685
- package/dist/index.js.map +1 -1
- package/dist/jsx-dev-runtime.d.ts +1 -1
- package/dist/jsx-dev-runtime.js +2 -2
- package/dist/jsx-dev-runtime.js.map +1 -1
- package/dist/jsx-runtime.d.ts +1 -1
- package/dist/jsx-runtime.js +2 -2
- package/dist/jsx-runtime.js.map +1 -1
- package/dist/markup.d.ts +19 -13
- package/dist/modules/dolla.d.ts +33 -9
- package/dist/modules/router.d.ts +3 -4
- package/dist/nodes/cond.d.ts +6 -7
- package/dist/nodes/html.d.ts +7 -8
- package/dist/nodes/observer.d.ts +6 -7
- package/dist/nodes/outlet.d.ts +9 -10
- package/dist/nodes/portal.d.ts +6 -7
- package/dist/nodes/repeat.d.ts +6 -7
- package/dist/nodes/text.d.ts +5 -6
- package/dist/{fragment-DHJiX0-a.js → passthrough-DrtCifRF.js} +461 -474
- package/dist/passthrough-DrtCifRF.js.map +1 -0
- package/dist/signals.d.ts +2 -2
- package/dist/types.d.ts +1 -1
- package/dist/view.d.ts +9 -3
- package/dist/views/default-crash-view.d.ts +18 -0
- package/dist/views/passthrough.d.ts +5 -0
- package/package.json +1 -1
- package/vite.config.js +1 -0
- package/dist/fragment-DHJiX0-a.js.map +0 -1
- package/dist/views/default-crash-page.d.ts +0 -8
- package/dist/views/default-view.d.ts +0 -2
- package/dist/views/fragment.d.ts +0 -2
package/dist/index.js
CHANGED
|
@@ -1,29 +1,73 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
throw TypeError(
|
|
1
|
+
var pt = Object.defineProperty;
|
|
2
|
+
var Ze = (n) => {
|
|
3
|
+
throw TypeError(n);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var k = (
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
set _(
|
|
10
|
-
|
|
5
|
+
var mt = (n, e, t) => e in n ? pt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
6
|
+
var k = (n, e, t) => mt(n, typeof e != "symbol" ? e + "" : e, t), Fe = (n, e, t) => e.has(n) || Ze("Cannot " + t);
|
|
7
|
+
var a = (n, e, t) => (Fe(n, e, "read from private field"), t ? t.call(n) : e.get(n)), u = (n, e, t) => e.has(n) ? Ze("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), m = (n, e, t, r) => (Fe(n, e, "write to private field"), r ? r.call(n, t) : e.set(n, t), t), P = (n, e, t) => (Fe(n, e, "access private method"), t);
|
|
8
|
+
var et = (n, e, t, r) => ({
|
|
9
|
+
set _(s) {
|
|
10
|
+
m(n, e, s, t);
|
|
11
11
|
},
|
|
12
12
|
get _() {
|
|
13
|
-
return
|
|
13
|
+
return a(n, e, r);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
function
|
|
19
|
-
return
|
|
16
|
+
import { h as tt, c as yt, i as Ie, s as Ge, a as wt, d as Be, b as bt, e as Xe, f as D, g as K, j as lt, k as vt, w as ht, P as ut, l as rt, m as $t, t as Et, n as kt, o as Lt, p as Pt, q as nt, r as at, u as St, v as Oe, x as Te, y as Rt, z as xt, A as Mt } from "./passthrough-DrtCifRF.js";
|
|
17
|
+
import { B as rr, C as nr, D as ar } from "./passthrough-DrtCifRF.js";
|
|
18
|
+
function Nt(n) {
|
|
19
|
+
return tt`
|
|
20
|
+
<div
|
|
21
|
+
style=${{
|
|
22
|
+
backgroundColor: "#880000",
|
|
23
|
+
color: "#fff",
|
|
24
|
+
padding: "2rem",
|
|
25
|
+
position: "fixed",
|
|
26
|
+
inset: 0,
|
|
27
|
+
fontSize: "20px"
|
|
28
|
+
}}
|
|
29
|
+
>
|
|
30
|
+
<h1 style=${{ marginBottom: "0.5rem" }}>The app has crashed</h1>
|
|
31
|
+
<p style=${{ marginBottom: "0.25rem" }}>
|
|
32
|
+
<span style=${{ fontFamily: "monospace" }}>${n.loggerName}</span>
|
|
33
|
+
${yt(n.uid, tt`<span style=${{ fontFamily: "monospace", opacity: 0.5 }}> [uid: ${n.uid}]</span>`)}
|
|
34
|
+
${" "}says:
|
|
35
|
+
</p>
|
|
36
|
+
<blockquote
|
|
37
|
+
style=${{
|
|
38
|
+
backgroundColor: "#991111",
|
|
39
|
+
padding: "0.25em",
|
|
40
|
+
borderRadius: "6px",
|
|
41
|
+
fontFamily: "monospace",
|
|
42
|
+
marginBottom: "1rem"
|
|
43
|
+
}}
|
|
44
|
+
>
|
|
45
|
+
<span
|
|
46
|
+
style=${{
|
|
47
|
+
display: "inline-block",
|
|
48
|
+
backgroundColor: "red",
|
|
49
|
+
padding: "0.1em 0.4em",
|
|
50
|
+
marginRight: "0.5em",
|
|
51
|
+
borderRadius: "4px",
|
|
52
|
+
fontSize: "0.9em",
|
|
53
|
+
fontWeight: "bold"
|
|
54
|
+
}}
|
|
55
|
+
>
|
|
56
|
+
${n.error.name}
|
|
57
|
+
</span>
|
|
58
|
+
${n.error.message}
|
|
59
|
+
</blockquote>
|
|
60
|
+
|
|
61
|
+
<p>Please see the browser console for details.</p>
|
|
62
|
+
</div>
|
|
63
|
+
`;
|
|
20
64
|
}
|
|
21
|
-
var
|
|
22
|
-
class
|
|
65
|
+
var J, _e, N, q;
|
|
66
|
+
class Ot {
|
|
23
67
|
constructor() {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
68
|
+
u(this, N);
|
|
69
|
+
u(this, J, []);
|
|
70
|
+
u(this, _e, Tt());
|
|
27
71
|
}
|
|
28
72
|
/**
|
|
29
73
|
* Adds a new middleware that will apply to subsequent requests.
|
|
@@ -32,127 +76,127 @@ class Tt {
|
|
|
32
76
|
* @param middleware - A middleware function that will intercept requests.
|
|
33
77
|
*/
|
|
34
78
|
use(e) {
|
|
35
|
-
return
|
|
36
|
-
|
|
79
|
+
return a(this, J).push(e), () => {
|
|
80
|
+
a(this, J).splice(a(this, J).indexOf(e), 1);
|
|
37
81
|
};
|
|
38
82
|
}
|
|
39
83
|
async get(e, t) {
|
|
40
|
-
return P(this,
|
|
84
|
+
return P(this, N, q).call(this, "get", e, t);
|
|
41
85
|
}
|
|
42
86
|
async put(e, t) {
|
|
43
|
-
return P(this,
|
|
87
|
+
return P(this, N, q).call(this, "put", e, t);
|
|
44
88
|
}
|
|
45
89
|
async patch(e, t) {
|
|
46
|
-
return P(this,
|
|
90
|
+
return P(this, N, q).call(this, "patch", e, t);
|
|
47
91
|
}
|
|
48
92
|
async post(e, t) {
|
|
49
|
-
return P(this,
|
|
93
|
+
return P(this, N, q).call(this, "post", e, t);
|
|
50
94
|
}
|
|
51
95
|
async delete(e, t) {
|
|
52
|
-
return P(this,
|
|
96
|
+
return P(this, N, q).call(this, "delete", e, t);
|
|
53
97
|
}
|
|
54
98
|
async head(e, t) {
|
|
55
|
-
return P(this,
|
|
99
|
+
return P(this, N, q).call(this, "head", e, t);
|
|
56
100
|
}
|
|
57
101
|
async options(e, t) {
|
|
58
|
-
return P(this,
|
|
102
|
+
return P(this, N, q).call(this, "options", e, t);
|
|
59
103
|
}
|
|
60
104
|
async trace(e, t) {
|
|
61
|
-
return P(this,
|
|
105
|
+
return P(this, N, q).call(this, "trace", e, t);
|
|
62
106
|
}
|
|
63
107
|
}
|
|
64
|
-
|
|
65
|
-
return
|
|
66
|
-
...
|
|
108
|
+
J = new WeakMap(), _e = new WeakMap(), N = new WeakSet(), q = async function(e, t, r) {
|
|
109
|
+
return jt({
|
|
110
|
+
...r,
|
|
67
111
|
method: e,
|
|
68
112
|
uri: t,
|
|
69
|
-
middleware:
|
|
70
|
-
fetch:
|
|
113
|
+
middleware: a(this, J),
|
|
114
|
+
fetch: a(this, _e)
|
|
71
115
|
});
|
|
72
116
|
};
|
|
73
|
-
function
|
|
117
|
+
function Tt() {
|
|
74
118
|
if (typeof window < "u" && window.fetch)
|
|
75
119
|
return window.fetch.bind(window);
|
|
76
120
|
if (typeof global < "u" && global.fetch)
|
|
77
121
|
return global.fetch.bind(global);
|
|
78
122
|
throw new Error("Running in neither browser nor node. Please run this app in one of the supported environments.");
|
|
79
123
|
}
|
|
80
|
-
class
|
|
124
|
+
class At extends Error {
|
|
81
125
|
constructor(t) {
|
|
82
|
-
const { status:
|
|
83
|
-
super(
|
|
126
|
+
const { status: r, statusText: s, method: i, uri: o } = t, f = `${r} ${s}: Request failed (${i.toUpperCase()} ${o})`;
|
|
127
|
+
super(f);
|
|
84
128
|
k(this, "response");
|
|
85
129
|
this.response = t;
|
|
86
130
|
}
|
|
87
131
|
}
|
|
88
|
-
async function
|
|
89
|
-
const { headers: e, query: t, fetch:
|
|
90
|
-
method:
|
|
91
|
-
uri:
|
|
132
|
+
async function jt(n) {
|
|
133
|
+
const { headers: e, query: t, fetch: r, middleware: s } = n, i = {
|
|
134
|
+
method: n.method,
|
|
135
|
+
uri: n.uri,
|
|
92
136
|
get sameOrigin() {
|
|
93
|
-
return !
|
|
137
|
+
return !i.uri.startsWith("http");
|
|
94
138
|
},
|
|
95
139
|
query: new URLSearchParams(),
|
|
96
140
|
headers: new Headers(),
|
|
97
|
-
body:
|
|
141
|
+
body: n.body
|
|
98
142
|
};
|
|
99
143
|
if (e)
|
|
100
144
|
if (e instanceof Map || e instanceof Headers)
|
|
101
|
-
e.forEach((c,
|
|
102
|
-
|
|
145
|
+
e.forEach((c, y) => {
|
|
146
|
+
i.headers.set(y, c);
|
|
103
147
|
});
|
|
104
148
|
else if (e != null && typeof e == "object" && !Array.isArray(e))
|
|
105
149
|
for (const c in e) {
|
|
106
|
-
const
|
|
107
|
-
|
|
150
|
+
const y = e[c];
|
|
151
|
+
y instanceof Date ? i.headers.set(c, y.toISOString()) : y != null && i.headers.set(c, String(y));
|
|
108
152
|
}
|
|
109
153
|
else
|
|
110
154
|
throw new TypeError(`Unknown headers type. Got: ${e}`);
|
|
111
155
|
if (t)
|
|
112
156
|
if (t instanceof Map || t instanceof URLSearchParams)
|
|
113
|
-
t.forEach((c,
|
|
114
|
-
|
|
157
|
+
t.forEach((c, y) => {
|
|
158
|
+
i.query.set(y, c);
|
|
115
159
|
});
|
|
116
160
|
else if (t != null && typeof t == "object" && !Array.isArray(t))
|
|
117
161
|
for (const c in t) {
|
|
118
|
-
const
|
|
119
|
-
|
|
162
|
+
const y = t[c];
|
|
163
|
+
y instanceof Date ? i.query.set(c, y.toISOString()) : y != null && i.query.set(c, String(y));
|
|
120
164
|
}
|
|
121
165
|
else
|
|
122
166
|
throw new TypeError(`Unknown query params type. Got: ${t}`);
|
|
123
|
-
let
|
|
124
|
-
const
|
|
125
|
-
const c =
|
|
126
|
-
let
|
|
127
|
-
!
|
|
128
|
-
const
|
|
129
|
-
method:
|
|
130
|
-
headers:
|
|
131
|
-
body:
|
|
132
|
-
}),
|
|
167
|
+
let o;
|
|
168
|
+
const f = async () => {
|
|
169
|
+
const c = i.query.toString(), y = c.length > 0 ? i.uri + "?" + c : i.uri;
|
|
170
|
+
let w;
|
|
171
|
+
!i.headers.has("content-type") && Ie(i.body) ? (i.headers.set("content-type", "application/json"), w = JSON.stringify(i.body)) : w = i.body;
|
|
172
|
+
const p = await r(y, {
|
|
173
|
+
method: i.method,
|
|
174
|
+
headers: i.headers,
|
|
175
|
+
body: w
|
|
176
|
+
}), d = Object.fromEntries(p.headers.entries()), b = d["content-type"];
|
|
133
177
|
let $;
|
|
134
|
-
|
|
135
|
-
method:
|
|
136
|
-
uri:
|
|
137
|
-
status:
|
|
138
|
-
statusText:
|
|
139
|
-
headers:
|
|
178
|
+
b != null && b.includes("application/json") ? $ = await p.json() : b != null && b.includes("application/x-www-form-urlencoded") ? $ = await p.formData() : $ = await p.text(), o = {
|
|
179
|
+
method: i.method,
|
|
180
|
+
uri: i.uri,
|
|
181
|
+
status: p.status,
|
|
182
|
+
statusText: p.statusText,
|
|
183
|
+
headers: d,
|
|
140
184
|
body: $
|
|
141
185
|
};
|
|
142
186
|
};
|
|
143
|
-
if (
|
|
144
|
-
const c = (
|
|
145
|
-
const
|
|
146
|
-
return async () =>
|
|
187
|
+
if (s.length > 0) {
|
|
188
|
+
const c = (y = 0) => {
|
|
189
|
+
const w = s[y], p = s[y + 1] ? c(y + 1) : f;
|
|
190
|
+
return async () => w(i, async () => (await p(), o));
|
|
147
191
|
};
|
|
148
192
|
await c()();
|
|
149
193
|
} else
|
|
150
|
-
await
|
|
151
|
-
if (
|
|
152
|
-
throw new
|
|
153
|
-
return
|
|
194
|
+
await f();
|
|
195
|
+
if (o.status < 200 || o.status >= 400)
|
|
196
|
+
throw new At(o);
|
|
197
|
+
return o;
|
|
154
198
|
}
|
|
155
|
-
class
|
|
199
|
+
class Ct {
|
|
156
200
|
constructor(e, t) {
|
|
157
201
|
k(this, "dolla");
|
|
158
202
|
k(this, "config");
|
|
@@ -161,16 +205,16 @@ class qt {
|
|
|
161
205
|
}
|
|
162
206
|
async load() {
|
|
163
207
|
if (this.strings == null) {
|
|
164
|
-
if (
|
|
208
|
+
if (Xe(this.config.fetch)) {
|
|
165
209
|
const e = await this.config.fetch();
|
|
166
|
-
if (
|
|
210
|
+
if (Ie(e))
|
|
167
211
|
this.strings = e;
|
|
168
212
|
else
|
|
169
213
|
throw new Error(`Fetch function did not return an object of language strings: ${e}`);
|
|
170
|
-
} else if (
|
|
214
|
+
} else if (D(this.config.path)) {
|
|
171
215
|
const e = await this.dolla.http.get(this.config.path);
|
|
172
216
|
if (e.status >= 200 && e.status < 300)
|
|
173
|
-
if (
|
|
217
|
+
if (Ie(e.body))
|
|
174
218
|
this.strings = e.body;
|
|
175
219
|
else
|
|
176
220
|
throw new Error(
|
|
@@ -185,65 +229,65 @@ class qt {
|
|
|
185
229
|
return this.strings;
|
|
186
230
|
}
|
|
187
231
|
}
|
|
188
|
-
var
|
|
189
|
-
class
|
|
232
|
+
var ye, Y, x, ie, we, be, se, ve, We, ft;
|
|
233
|
+
class qt {
|
|
190
234
|
constructor(e) {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
235
|
+
u(this, We);
|
|
236
|
+
u(this, ye);
|
|
237
|
+
u(this, Y);
|
|
238
|
+
u(this, x, /* @__PURE__ */ new Map());
|
|
239
|
+
u(this, ie, []);
|
|
240
|
+
u(this, we, "auto");
|
|
197
241
|
k(this, "$current");
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
const [t,
|
|
203
|
-
this.$current = t,
|
|
204
|
-
|
|
242
|
+
u(this, be);
|
|
243
|
+
u(this, se);
|
|
244
|
+
u(this, ve);
|
|
245
|
+
m(this, ye, e), m(this, Y, e.createLogger("dolla/language"));
|
|
246
|
+
const [t, r] = K(), [s, i] = K();
|
|
247
|
+
this.$current = t, m(this, be, r), m(this, se, s), m(this, ve, i), e.beforeMount(async () => {
|
|
248
|
+
a(this, x).size > 0 && await this.setLanguage(a(this, we));
|
|
205
249
|
});
|
|
206
250
|
}
|
|
207
251
|
get supportedLanguages() {
|
|
208
|
-
return [...
|
|
252
|
+
return [...a(this, x).keys()];
|
|
209
253
|
}
|
|
210
254
|
setup(e) {
|
|
211
255
|
if (e.languages.forEach((t) => {
|
|
212
|
-
|
|
256
|
+
a(this, x).set(t.name, new Ct(t, a(this, ye)));
|
|
213
257
|
}), e.initialLanguage && e.initialLanguage !== "auto") {
|
|
214
|
-
if (!e.languages.some((
|
|
258
|
+
if (!e.languages.some((r) => r.name === e.initialLanguage))
|
|
215
259
|
throw new Error(`Initial language '${e.initialLanguage}' has no registered translation.`);
|
|
216
|
-
|
|
260
|
+
m(this, we, e.initialLanguage);
|
|
217
261
|
}
|
|
218
|
-
|
|
219
|
-
`${
|
|
262
|
+
a(this, Y).info(
|
|
263
|
+
`${a(this, x).size} language${a(this, x).size === 1 ? "" : "s"} supported: '${[...a(this, x).keys()].join("', '")}'`
|
|
220
264
|
);
|
|
221
265
|
}
|
|
222
266
|
async setLanguage(e) {
|
|
223
|
-
var
|
|
267
|
+
var s;
|
|
224
268
|
let t;
|
|
225
269
|
if (e === "auto") {
|
|
226
|
-
let
|
|
270
|
+
let i = [];
|
|
227
271
|
if (typeof navigator == "object") {
|
|
228
|
-
const
|
|
229
|
-
((
|
|
272
|
+
const o = navigator;
|
|
273
|
+
((s = o.languages) == null ? void 0 : s.length) > 0 ? i.push(...o.languages) : o.language ? i.push(o.language) : o.browserLanguage ? i.push(o.browserLanguage) : o.userLanguage && i.push(o.userLanguage);
|
|
230
274
|
}
|
|
231
|
-
for (const
|
|
232
|
-
|
|
275
|
+
for (const o of i)
|
|
276
|
+
a(this, x).has(o) && (t = o);
|
|
233
277
|
} else
|
|
234
|
-
|
|
278
|
+
a(this, x).has(e) && (t = e);
|
|
235
279
|
if (t == null) {
|
|
236
|
-
const
|
|
237
|
-
|
|
280
|
+
const i = a(this, x).keys().next().value;
|
|
281
|
+
i && (t = i);
|
|
238
282
|
}
|
|
239
|
-
if (!t || !
|
|
283
|
+
if (!t || !a(this, x).has(t))
|
|
240
284
|
throw new Error(`Language '${e}' is not configured for this app.`);
|
|
241
|
-
const
|
|
285
|
+
const r = a(this, x).get(t);
|
|
242
286
|
try {
|
|
243
|
-
const
|
|
244
|
-
|
|
245
|
-
} catch (
|
|
246
|
-
|
|
287
|
+
const i = await r.load();
|
|
288
|
+
a(this, ve).call(this, i), a(this, be).call(this, t), a(this, Y).info("set language to " + t);
|
|
289
|
+
} catch (i) {
|
|
290
|
+
i instanceof Error && a(this, Y).crash(i);
|
|
247
291
|
}
|
|
248
292
|
}
|
|
249
293
|
/**
|
|
@@ -258,71 +302,71 @@ class Ct {
|
|
|
258
302
|
`The 't' function cannot be destructured. If you need a standalone version you can import it like so: 'import { t } from "@manyducks.co/dolla"'`
|
|
259
303
|
);
|
|
260
304
|
if (!this.$current.get())
|
|
261
|
-
return
|
|
262
|
-
const
|
|
263
|
-
if (
|
|
264
|
-
return
|
|
305
|
+
return Ut;
|
|
306
|
+
const r = P(this, We, ft).call(this, e, t);
|
|
307
|
+
if (r)
|
|
308
|
+
return r;
|
|
265
309
|
if (t) {
|
|
266
|
-
const
|
|
267
|
-
for (const [
|
|
268
|
-
|
|
269
|
-
const
|
|
270
|
-
if (
|
|
271
|
-
const
|
|
272
|
-
const
|
|
310
|
+
const i = {};
|
|
311
|
+
for (const [f, c] of Object.entries(t))
|
|
312
|
+
wt(c) && (i[f] = c);
|
|
313
|
+
const o = Object.entries(i);
|
|
314
|
+
if (o.length > 0) {
|
|
315
|
+
const f = o.map((y) => y[1]), c = Be([a(this, se), ...f], (y, ...w) => {
|
|
316
|
+
const p = w.map(($, j) => o[j]), d = {
|
|
273
317
|
...t
|
|
274
318
|
};
|
|
275
|
-
for (let $ = 0; $ <
|
|
276
|
-
const
|
|
277
|
-
|
|
319
|
+
for (let $ = 0; $ < p.length; $++) {
|
|
320
|
+
const j = p[$][0];
|
|
321
|
+
d[j] = w[$];
|
|
278
322
|
}
|
|
279
|
-
const
|
|
280
|
-
return it(
|
|
323
|
+
const b = st(y, e) || `[NO TRANSLATION: ${e}]`;
|
|
324
|
+
return it(b, d);
|
|
281
325
|
});
|
|
282
|
-
return
|
|
326
|
+
return a(this, ie).push([e, t, c]), c;
|
|
283
327
|
}
|
|
284
328
|
}
|
|
285
|
-
const
|
|
286
|
-
let
|
|
287
|
-
return t && (
|
|
329
|
+
const s = Be([a(this, se)], (i) => {
|
|
330
|
+
let o = st(i, e) || `[NO TRANSLATION: ${e}]`;
|
|
331
|
+
return t && (o = it(o, t)), o;
|
|
288
332
|
});
|
|
289
|
-
return
|
|
333
|
+
return a(this, ie).push([e, t, s]), s;
|
|
290
334
|
}
|
|
291
335
|
}
|
|
292
|
-
|
|
293
|
-
for (const
|
|
294
|
-
if (
|
|
295
|
-
return
|
|
336
|
+
ye = new WeakMap(), Y = new WeakMap(), x = new WeakMap(), ie = new WeakMap(), we = new WeakMap(), be = new WeakMap(), se = new WeakMap(), ve = new WeakMap(), We = new WeakSet(), ft = function(e, t) {
|
|
337
|
+
for (const r of a(this, ie))
|
|
338
|
+
if (r[0] === e && bt(r[1], t))
|
|
339
|
+
return r[2];
|
|
296
340
|
};
|
|
297
|
-
const
|
|
298
|
-
function it(
|
|
341
|
+
const Ut = Ge("[NO LANGUAGE SET]");
|
|
342
|
+
function it(n, e) {
|
|
299
343
|
for (const t in e)
|
|
300
|
-
|
|
301
|
-
return
|
|
344
|
+
n = n.replace(`{{${t}}}`, String(e[t]));
|
|
345
|
+
return n;
|
|
302
346
|
}
|
|
303
|
-
function st(
|
|
304
|
-
const t = String(e).split(/[\.\[\]]/).filter((
|
|
305
|
-
let
|
|
347
|
+
function st(n, e) {
|
|
348
|
+
const t = String(e).split(/[\.\[\]]/).filter((s) => s.trim() !== "");
|
|
349
|
+
let r = n;
|
|
306
350
|
for (; t.length > 0; ) {
|
|
307
|
-
const
|
|
308
|
-
|
|
351
|
+
const s = t.shift();
|
|
352
|
+
r != null ? r = r[s] : r = void 0;
|
|
309
353
|
}
|
|
310
|
-
return
|
|
354
|
+
return r;
|
|
311
355
|
}
|
|
312
|
-
var
|
|
313
|
-
class
|
|
356
|
+
var X, $e, H, _, oe, U, ce, Ae;
|
|
357
|
+
class Vt {
|
|
314
358
|
constructor(e) {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
359
|
+
u(this, ce);
|
|
360
|
+
u(this, X);
|
|
361
|
+
u(this, $e);
|
|
318
362
|
// Keyed updates ensure only the most recent callback queued with a certain key
|
|
319
363
|
// will be called, keeping DOM operations to a minimum.
|
|
320
|
-
|
|
364
|
+
u(this, H, /* @__PURE__ */ new Map());
|
|
321
365
|
// All unkeyed updates are run on every batch.
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
366
|
+
u(this, _, []);
|
|
367
|
+
u(this, oe, []);
|
|
368
|
+
u(this, U, !1);
|
|
369
|
+
m(this, X, e), m(this, $e, e.createLogger("dolla/render"));
|
|
326
370
|
}
|
|
327
371
|
/**
|
|
328
372
|
* Queues a callback to run in the next render batch.
|
|
@@ -330,12 +374,12 @@ class Dt {
|
|
|
330
374
|
* Returns a Promise that resolves once the callback has run.
|
|
331
375
|
*/
|
|
332
376
|
update(e, t) {
|
|
333
|
-
return new Promise((
|
|
334
|
-
t ?
|
|
335
|
-
e(),
|
|
336
|
-
}) :
|
|
337
|
-
e(),
|
|
338
|
-
}), !
|
|
377
|
+
return new Promise((r) => {
|
|
378
|
+
t ? a(this, H).set(t, () => {
|
|
379
|
+
e(), r();
|
|
380
|
+
}) : a(this, _).push(() => {
|
|
381
|
+
e(), r();
|
|
382
|
+
}), !a(this, U) && a(this, X).isMounted && (m(this, U, !0), P(this, ce, Ae).call(this));
|
|
339
383
|
});
|
|
340
384
|
}
|
|
341
385
|
/**
|
|
@@ -345,51 +389,51 @@ class Dt {
|
|
|
345
389
|
*/
|
|
346
390
|
async read(e) {
|
|
347
391
|
return new Promise((t) => {
|
|
348
|
-
|
|
392
|
+
a(this, oe).push(() => {
|
|
349
393
|
e(), t();
|
|
350
|
-
}), !
|
|
394
|
+
}), !a(this, U) && a(this, X).isMounted && (m(this, U, !0), P(this, ce, Ae).call(this));
|
|
351
395
|
});
|
|
352
396
|
}
|
|
353
397
|
}
|
|
354
|
-
|
|
355
|
-
const e =
|
|
356
|
-
if ((!
|
|
357
|
-
for (const t of
|
|
398
|
+
X = new WeakMap(), $e = new WeakMap(), H = new WeakMap(), _ = new WeakMap(), oe = new WeakMap(), U = new WeakMap(), ce = new WeakSet(), Ae = function() {
|
|
399
|
+
const e = a(this, H).size + a(this, _).length;
|
|
400
|
+
if ((!a(this, X).isMounted || e === 0) && m(this, U, !1), !a(this, U)) {
|
|
401
|
+
for (const t of a(this, oe))
|
|
358
402
|
t();
|
|
359
|
-
|
|
403
|
+
m(this, oe, []);
|
|
360
404
|
return;
|
|
361
405
|
}
|
|
362
406
|
requestAnimationFrame(() => {
|
|
363
|
-
|
|
364
|
-
for (const t of
|
|
407
|
+
a(this, $e).info(`Batching ${a(this, H).size + a(this, _).length} queued DOM update(s).`);
|
|
408
|
+
for (const t of a(this, H).values())
|
|
365
409
|
t();
|
|
366
|
-
|
|
367
|
-
for (const t of
|
|
410
|
+
a(this, H).clear();
|
|
411
|
+
for (const t of a(this, _))
|
|
368
412
|
t();
|
|
369
|
-
|
|
413
|
+
m(this, _, []), P(this, ce, Ae).call(this);
|
|
370
414
|
});
|
|
371
415
|
};
|
|
372
|
-
function
|
|
373
|
-
return
|
|
416
|
+
function fe() {
|
|
417
|
+
return fe = Object.assign || function(n) {
|
|
374
418
|
for (var e = 1; e < arguments.length; e++) {
|
|
375
419
|
var t = arguments[e];
|
|
376
|
-
for (var
|
|
377
|
-
Object.prototype.hasOwnProperty.call(t,
|
|
420
|
+
for (var r in t)
|
|
421
|
+
Object.prototype.hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
378
422
|
}
|
|
379
|
-
return
|
|
380
|
-
},
|
|
423
|
+
return n;
|
|
424
|
+
}, fe.apply(this, arguments);
|
|
381
425
|
}
|
|
382
|
-
var
|
|
383
|
-
(function(
|
|
384
|
-
|
|
385
|
-
})(
|
|
386
|
-
var
|
|
387
|
-
return Object.freeze(
|
|
388
|
-
} : function(
|
|
389
|
-
return
|
|
426
|
+
var A;
|
|
427
|
+
(function(n) {
|
|
428
|
+
n.Pop = "POP", n.Push = "PUSH", n.Replace = "REPLACE";
|
|
429
|
+
})(A || (A = {}));
|
|
430
|
+
var Ue = process.env.NODE_ENV !== "production" ? function(n) {
|
|
431
|
+
return Object.freeze(n);
|
|
432
|
+
} : function(n) {
|
|
433
|
+
return n;
|
|
390
434
|
};
|
|
391
|
-
function je(
|
|
392
|
-
if (!
|
|
435
|
+
function je(n, e) {
|
|
436
|
+
if (!n) {
|
|
393
437
|
typeof console < "u" && console.warn(e);
|
|
394
438
|
try {
|
|
395
439
|
throw new Error(e);
|
|
@@ -397,36 +441,36 @@ function je(a, e) {
|
|
|
397
441
|
}
|
|
398
442
|
}
|
|
399
443
|
}
|
|
400
|
-
var
|
|
401
|
-
function
|
|
402
|
-
|
|
403
|
-
var e =
|
|
404
|
-
function
|
|
405
|
-
var
|
|
406
|
-
return [E.idx,
|
|
444
|
+
var Ve = "beforeunload", Dt = "hashchange", dt = "popstate";
|
|
445
|
+
function Ht(n) {
|
|
446
|
+
n === void 0 && (n = {});
|
|
447
|
+
var e = n, t = e.window, r = t === void 0 ? document.defaultView : t, s = r.history;
|
|
448
|
+
function i() {
|
|
449
|
+
var g = r.location, l = g.pathname, h = g.search, v = g.hash, E = s.state || {};
|
|
450
|
+
return [E.idx, Ue({
|
|
407
451
|
pathname: l,
|
|
408
|
-
search:
|
|
452
|
+
search: h,
|
|
409
453
|
hash: v,
|
|
410
454
|
state: E.usr || null,
|
|
411
455
|
key: E.key || "default"
|
|
412
456
|
})];
|
|
413
457
|
}
|
|
414
|
-
var
|
|
415
|
-
function
|
|
416
|
-
if (
|
|
417
|
-
|
|
458
|
+
var o = null;
|
|
459
|
+
function f() {
|
|
460
|
+
if (o)
|
|
461
|
+
b.call(o), o = null;
|
|
418
462
|
else {
|
|
419
|
-
var
|
|
420
|
-
if (
|
|
421
|
-
if (
|
|
422
|
-
var E =
|
|
423
|
-
E && (
|
|
424
|
-
action:
|
|
463
|
+
var g = A.Pop, l = i(), h = l[0], v = l[1];
|
|
464
|
+
if (b.length)
|
|
465
|
+
if (h != null) {
|
|
466
|
+
var E = w - h;
|
|
467
|
+
E && (o = {
|
|
468
|
+
action: g,
|
|
425
469
|
location: v,
|
|
426
470
|
retry: function() {
|
|
427
|
-
|
|
471
|
+
V(E * -1);
|
|
428
472
|
}
|
|
429
|
-
},
|
|
473
|
+
}, V(E));
|
|
430
474
|
} else
|
|
431
475
|
process.env.NODE_ENV !== "production" && je(
|
|
432
476
|
!1,
|
|
@@ -436,135 +480,135 @@ function Vt(a) {
|
|
|
436
480
|
"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."
|
|
437
481
|
);
|
|
438
482
|
else
|
|
439
|
-
re(
|
|
483
|
+
re(g);
|
|
440
484
|
}
|
|
441
485
|
}
|
|
442
|
-
|
|
443
|
-
var c =
|
|
444
|
-
|
|
445
|
-
idx:
|
|
486
|
+
r.addEventListener(dt, f);
|
|
487
|
+
var c = A.Pop, y = i(), w = y[0], p = y[1], d = He(), b = He();
|
|
488
|
+
w == null && (w = 0, s.replaceState(fe({}, s.state, {
|
|
489
|
+
idx: w
|
|
446
490
|
}), ""));
|
|
447
|
-
function $(
|
|
448
|
-
return typeof
|
|
491
|
+
function $(g) {
|
|
492
|
+
return typeof g == "string" ? g : Ce(g);
|
|
449
493
|
}
|
|
450
|
-
function
|
|
451
|
-
return l === void 0 && (l = null),
|
|
452
|
-
pathname:
|
|
494
|
+
function j(g, l) {
|
|
495
|
+
return l === void 0 && (l = null), Ue(fe({
|
|
496
|
+
pathname: p.pathname,
|
|
453
497
|
hash: "",
|
|
454
498
|
search: ""
|
|
455
|
-
}, typeof
|
|
499
|
+
}, typeof g == "string" ? Qe(g) : g, {
|
|
456
500
|
state: l,
|
|
457
501
|
key: gt()
|
|
458
502
|
}));
|
|
459
503
|
}
|
|
460
|
-
function
|
|
504
|
+
function de(g, l) {
|
|
461
505
|
return [{
|
|
462
|
-
usr:
|
|
463
|
-
key:
|
|
506
|
+
usr: g.state,
|
|
507
|
+
key: g.key,
|
|
464
508
|
idx: l
|
|
465
|
-
}, $(
|
|
509
|
+
}, $(g)];
|
|
466
510
|
}
|
|
467
|
-
function
|
|
468
|
-
return !
|
|
469
|
-
action:
|
|
511
|
+
function ge(g, l, h) {
|
|
512
|
+
return !b.length || (b.call({
|
|
513
|
+
action: g,
|
|
470
514
|
location: l,
|
|
471
|
-
retry:
|
|
515
|
+
retry: h
|
|
472
516
|
}), !1);
|
|
473
517
|
}
|
|
474
|
-
function re(
|
|
475
|
-
c =
|
|
476
|
-
var l =
|
|
477
|
-
|
|
518
|
+
function re(g) {
|
|
519
|
+
c = g;
|
|
520
|
+
var l = i();
|
|
521
|
+
w = l[0], p = l[1], d.call({
|
|
478
522
|
action: c,
|
|
479
|
-
location:
|
|
523
|
+
location: p
|
|
480
524
|
});
|
|
481
525
|
}
|
|
482
|
-
function
|
|
483
|
-
var
|
|
526
|
+
function ne(g, l) {
|
|
527
|
+
var h = A.Push, v = j(g, l);
|
|
484
528
|
function E() {
|
|
485
|
-
|
|
529
|
+
ne(g, l);
|
|
486
530
|
}
|
|
487
|
-
if (
|
|
488
|
-
var
|
|
531
|
+
if (ge(h, v, E)) {
|
|
532
|
+
var S = de(v, w + 1), M = S[0], O = S[1];
|
|
489
533
|
try {
|
|
490
|
-
|
|
534
|
+
s.pushState(M, "", O);
|
|
491
535
|
} catch {
|
|
492
|
-
|
|
536
|
+
r.location.assign(O);
|
|
493
537
|
}
|
|
494
|
-
re(
|
|
538
|
+
re(h);
|
|
495
539
|
}
|
|
496
540
|
}
|
|
497
|
-
function
|
|
498
|
-
var
|
|
541
|
+
function pe(g, l) {
|
|
542
|
+
var h = A.Replace, v = j(g, l);
|
|
499
543
|
function E() {
|
|
500
|
-
|
|
544
|
+
pe(g, l);
|
|
501
545
|
}
|
|
502
|
-
if (
|
|
503
|
-
var
|
|
504
|
-
|
|
546
|
+
if (ge(h, v, E)) {
|
|
547
|
+
var S = de(v, w), M = S[0], O = S[1];
|
|
548
|
+
s.replaceState(M, "", O), re(h);
|
|
505
549
|
}
|
|
506
550
|
}
|
|
507
|
-
function
|
|
508
|
-
|
|
551
|
+
function V(g) {
|
|
552
|
+
s.go(g);
|
|
509
553
|
}
|
|
510
|
-
var
|
|
554
|
+
var Q = {
|
|
511
555
|
get action() {
|
|
512
556
|
return c;
|
|
513
557
|
},
|
|
514
558
|
get location() {
|
|
515
|
-
return
|
|
559
|
+
return p;
|
|
516
560
|
},
|
|
517
561
|
createHref: $,
|
|
518
|
-
push:
|
|
519
|
-
replace:
|
|
520
|
-
go:
|
|
562
|
+
push: ne,
|
|
563
|
+
replace: pe,
|
|
564
|
+
go: V,
|
|
521
565
|
back: function() {
|
|
522
|
-
|
|
566
|
+
V(-1);
|
|
523
567
|
},
|
|
524
568
|
forward: function() {
|
|
525
|
-
|
|
569
|
+
V(1);
|
|
526
570
|
},
|
|
527
571
|
listen: function(l) {
|
|
528
|
-
return
|
|
572
|
+
return d.push(l);
|
|
529
573
|
},
|
|
530
574
|
block: function(l) {
|
|
531
|
-
var
|
|
532
|
-
return
|
|
533
|
-
|
|
575
|
+
var h = b.push(l);
|
|
576
|
+
return b.length === 1 && r.addEventListener(Ve, De), function() {
|
|
577
|
+
h(), b.length || r.removeEventListener(Ve, De);
|
|
534
578
|
};
|
|
535
579
|
}
|
|
536
580
|
};
|
|
537
|
-
return
|
|
581
|
+
return Q;
|
|
538
582
|
}
|
|
539
|
-
function
|
|
540
|
-
|
|
541
|
-
var e =
|
|
542
|
-
function
|
|
543
|
-
var l =
|
|
544
|
-
return [
|
|
583
|
+
function _t(n) {
|
|
584
|
+
n === void 0 && (n = {});
|
|
585
|
+
var e = n, t = e.window, r = t === void 0 ? document.defaultView : t, s = r.history;
|
|
586
|
+
function i() {
|
|
587
|
+
var l = Qe(r.location.hash.substr(1)), h = l.pathname, v = h === void 0 ? "/" : h, E = l.search, S = E === void 0 ? "" : E, M = l.hash, O = M === void 0 ? "" : M, C = s.state || {};
|
|
588
|
+
return [C.idx, Ue({
|
|
545
589
|
pathname: v,
|
|
546
|
-
search:
|
|
547
|
-
hash:
|
|
548
|
-
state:
|
|
549
|
-
key:
|
|
590
|
+
search: S,
|
|
591
|
+
hash: O,
|
|
592
|
+
state: C.usr || null,
|
|
593
|
+
key: C.key || "default"
|
|
550
594
|
})];
|
|
551
595
|
}
|
|
552
|
-
var
|
|
553
|
-
function
|
|
554
|
-
if (
|
|
555
|
-
|
|
596
|
+
var o = null;
|
|
597
|
+
function f() {
|
|
598
|
+
if (o)
|
|
599
|
+
b.call(o), o = null;
|
|
556
600
|
else {
|
|
557
|
-
var l =
|
|
558
|
-
if (
|
|
601
|
+
var l = A.Pop, h = i(), v = h[0], E = h[1];
|
|
602
|
+
if (b.length)
|
|
559
603
|
if (v != null) {
|
|
560
|
-
var
|
|
561
|
-
|
|
604
|
+
var S = w - v;
|
|
605
|
+
S && (o = {
|
|
562
606
|
action: l,
|
|
563
607
|
location: E,
|
|
564
608
|
retry: function() {
|
|
565
|
-
|
|
609
|
+
Q(S * -1);
|
|
566
610
|
}
|
|
567
|
-
},
|
|
611
|
+
}, Q(S));
|
|
568
612
|
} else
|
|
569
613
|
process.env.NODE_ENV !== "production" && je(
|
|
570
614
|
!1,
|
|
@@ -574,136 +618,136 @@ function Ft(a) {
|
|
|
574
618
|
"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."
|
|
575
619
|
);
|
|
576
620
|
else
|
|
577
|
-
|
|
621
|
+
ne(l);
|
|
578
622
|
}
|
|
579
623
|
}
|
|
580
|
-
|
|
581
|
-
var l =
|
|
582
|
-
|
|
624
|
+
r.addEventListener(dt, f), r.addEventListener(Dt, function() {
|
|
625
|
+
var l = i(), h = l[1];
|
|
626
|
+
Ce(h) !== Ce(p) && f();
|
|
583
627
|
});
|
|
584
|
-
var c =
|
|
585
|
-
|
|
586
|
-
idx:
|
|
628
|
+
var c = A.Pop, y = i(), w = y[0], p = y[1], d = He(), b = He();
|
|
629
|
+
w == null && (w = 0, s.replaceState(fe({}, s.state, {
|
|
630
|
+
idx: w
|
|
587
631
|
}), ""));
|
|
588
632
|
function $() {
|
|
589
|
-
var l = document.querySelector("base"),
|
|
633
|
+
var l = document.querySelector("base"), h = "";
|
|
590
634
|
if (l && l.getAttribute("href")) {
|
|
591
|
-
var v =
|
|
592
|
-
|
|
635
|
+
var v = r.location.href, E = v.indexOf("#");
|
|
636
|
+
h = E === -1 ? v : v.slice(0, E);
|
|
593
637
|
}
|
|
594
|
-
return
|
|
638
|
+
return h;
|
|
595
639
|
}
|
|
596
|
-
function
|
|
597
|
-
return $() + "#" + (typeof l == "string" ? l :
|
|
640
|
+
function j(l) {
|
|
641
|
+
return $() + "#" + (typeof l == "string" ? l : Ce(l));
|
|
598
642
|
}
|
|
599
|
-
function
|
|
600
|
-
return
|
|
601
|
-
pathname:
|
|
643
|
+
function de(l, h) {
|
|
644
|
+
return h === void 0 && (h = null), Ue(fe({
|
|
645
|
+
pathname: p.pathname,
|
|
602
646
|
hash: "",
|
|
603
647
|
search: ""
|
|
604
|
-
}, typeof l == "string" ?
|
|
605
|
-
state:
|
|
648
|
+
}, typeof l == "string" ? Qe(l) : l, {
|
|
649
|
+
state: h,
|
|
606
650
|
key: gt()
|
|
607
651
|
}));
|
|
608
652
|
}
|
|
609
|
-
function
|
|
653
|
+
function ge(l, h) {
|
|
610
654
|
return [{
|
|
611
655
|
usr: l.state,
|
|
612
656
|
key: l.key,
|
|
613
|
-
idx:
|
|
614
|
-
},
|
|
657
|
+
idx: h
|
|
658
|
+
}, j(l)];
|
|
615
659
|
}
|
|
616
|
-
function re(l,
|
|
617
|
-
return !
|
|
660
|
+
function re(l, h, v) {
|
|
661
|
+
return !b.length || (b.call({
|
|
618
662
|
action: l,
|
|
619
|
-
location:
|
|
663
|
+
location: h,
|
|
620
664
|
retry: v
|
|
621
665
|
}), !1);
|
|
622
666
|
}
|
|
623
|
-
function
|
|
667
|
+
function ne(l) {
|
|
624
668
|
c = l;
|
|
625
|
-
var
|
|
626
|
-
|
|
669
|
+
var h = i();
|
|
670
|
+
w = h[0], p = h[1], d.call({
|
|
627
671
|
action: c,
|
|
628
|
-
location:
|
|
672
|
+
location: p
|
|
629
673
|
});
|
|
630
674
|
}
|
|
631
|
-
function
|
|
632
|
-
var v =
|
|
633
|
-
function
|
|
634
|
-
|
|
675
|
+
function pe(l, h) {
|
|
676
|
+
var v = A.Push, E = de(l, h);
|
|
677
|
+
function S() {
|
|
678
|
+
pe(l, h);
|
|
635
679
|
}
|
|
636
|
-
if (process.env.NODE_ENV !== "production" && je(E.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.push(" + JSON.stringify(l) + ")"), re(v, E,
|
|
637
|
-
var
|
|
680
|
+
if (process.env.NODE_ENV !== "production" && je(E.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.push(" + JSON.stringify(l) + ")"), re(v, E, S)) {
|
|
681
|
+
var M = ge(E, w + 1), O = M[0], C = M[1];
|
|
638
682
|
try {
|
|
639
|
-
|
|
683
|
+
s.pushState(O, "", C);
|
|
640
684
|
} catch {
|
|
641
|
-
|
|
685
|
+
r.location.assign(C);
|
|
642
686
|
}
|
|
643
|
-
|
|
687
|
+
ne(v);
|
|
644
688
|
}
|
|
645
689
|
}
|
|
646
|
-
function
|
|
647
|
-
var v =
|
|
648
|
-
function
|
|
649
|
-
|
|
690
|
+
function V(l, h) {
|
|
691
|
+
var v = A.Replace, E = de(l, h);
|
|
692
|
+
function S() {
|
|
693
|
+
V(l, h);
|
|
650
694
|
}
|
|
651
|
-
if (process.env.NODE_ENV !== "production" && je(E.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.replace(" + JSON.stringify(l) + ")"), re(v, E,
|
|
652
|
-
var
|
|
653
|
-
|
|
695
|
+
if (process.env.NODE_ENV !== "production" && je(E.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.replace(" + JSON.stringify(l) + ")"), re(v, E, S)) {
|
|
696
|
+
var M = ge(E, w), O = M[0], C = M[1];
|
|
697
|
+
s.replaceState(O, "", C), ne(v);
|
|
654
698
|
}
|
|
655
699
|
}
|
|
656
|
-
function
|
|
657
|
-
|
|
700
|
+
function Q(l) {
|
|
701
|
+
s.go(l);
|
|
658
702
|
}
|
|
659
|
-
var
|
|
703
|
+
var g = {
|
|
660
704
|
get action() {
|
|
661
705
|
return c;
|
|
662
706
|
},
|
|
663
707
|
get location() {
|
|
664
|
-
return
|
|
708
|
+
return p;
|
|
665
709
|
},
|
|
666
|
-
createHref:
|
|
667
|
-
push:
|
|
668
|
-
replace:
|
|
669
|
-
go:
|
|
710
|
+
createHref: j,
|
|
711
|
+
push: pe,
|
|
712
|
+
replace: V,
|
|
713
|
+
go: Q,
|
|
670
714
|
back: function() {
|
|
671
|
-
|
|
715
|
+
Q(-1);
|
|
672
716
|
},
|
|
673
717
|
forward: function() {
|
|
674
|
-
|
|
718
|
+
Q(1);
|
|
675
719
|
},
|
|
676
|
-
listen: function(
|
|
677
|
-
return
|
|
720
|
+
listen: function(h) {
|
|
721
|
+
return d.push(h);
|
|
678
722
|
},
|
|
679
|
-
block: function(
|
|
680
|
-
var v =
|
|
681
|
-
return
|
|
682
|
-
v(),
|
|
723
|
+
block: function(h) {
|
|
724
|
+
var v = b.push(h);
|
|
725
|
+
return b.length === 1 && r.addEventListener(Ve, De), function() {
|
|
726
|
+
v(), b.length || r.removeEventListener(Ve, De);
|
|
683
727
|
};
|
|
684
728
|
}
|
|
685
729
|
};
|
|
686
|
-
return
|
|
730
|
+
return g;
|
|
687
731
|
}
|
|
688
|
-
function
|
|
689
|
-
|
|
732
|
+
function De(n) {
|
|
733
|
+
n.preventDefault(), n.returnValue = "";
|
|
690
734
|
}
|
|
691
|
-
function
|
|
692
|
-
var
|
|
735
|
+
function He() {
|
|
736
|
+
var n = [];
|
|
693
737
|
return {
|
|
694
738
|
get length() {
|
|
695
|
-
return
|
|
739
|
+
return n.length;
|
|
696
740
|
},
|
|
697
741
|
push: function(t) {
|
|
698
|
-
return
|
|
699
|
-
|
|
700
|
-
return
|
|
742
|
+
return n.push(t), function() {
|
|
743
|
+
n = n.filter(function(r) {
|
|
744
|
+
return r !== t;
|
|
701
745
|
});
|
|
702
746
|
};
|
|
703
747
|
},
|
|
704
748
|
call: function(t) {
|
|
705
|
-
|
|
706
|
-
return
|
|
749
|
+
n.forEach(function(r) {
|
|
750
|
+
return r && r(t);
|
|
707
751
|
});
|
|
708
752
|
}
|
|
709
753
|
};
|
|
@@ -711,224 +755,226 @@ function Ve() {
|
|
|
711
755
|
function gt() {
|
|
712
756
|
return Math.random().toString(36).substr(2, 8);
|
|
713
757
|
}
|
|
714
|
-
function
|
|
715
|
-
var e =
|
|
716
|
-
return
|
|
758
|
+
function Ce(n) {
|
|
759
|
+
var e = n.pathname, t = e === void 0 ? "/" : e, r = n.search, s = r === void 0 ? "" : r, i = n.hash, o = i === void 0 ? "" : i;
|
|
760
|
+
return s && s !== "?" && (t += s.charAt(0) === "?" ? s : "?" + s), o && o !== "#" && (t += o.charAt(0) === "#" ? o : "#" + o), t;
|
|
717
761
|
}
|
|
718
|
-
function
|
|
762
|
+
function Qe(n) {
|
|
719
763
|
var e = {};
|
|
720
|
-
if (
|
|
721
|
-
var t =
|
|
722
|
-
t >= 0 && (e.hash =
|
|
723
|
-
var
|
|
724
|
-
|
|
764
|
+
if (n) {
|
|
765
|
+
var t = n.indexOf("#");
|
|
766
|
+
t >= 0 && (e.hash = n.substr(t), n = n.substr(0, t));
|
|
767
|
+
var r = n.indexOf("?");
|
|
768
|
+
r >= 0 && (e.search = n.substr(r), n = n.substr(0, r)), n && (e.pathname = n);
|
|
725
769
|
}
|
|
726
770
|
return e;
|
|
727
771
|
}
|
|
728
|
-
function
|
|
729
|
-
return lt(
|
|
772
|
+
function me(n) {
|
|
773
|
+
return lt(n, "Expected `path` to be a string. Got type: %t, value: %v"), n.split("/").map((e) => e.trim()).filter((e) => e !== "");
|
|
730
774
|
}
|
|
731
|
-
function
|
|
775
|
+
function ae(n) {
|
|
732
776
|
var t;
|
|
733
|
-
|
|
734
|
-
(
|
|
735
|
-
|
|
777
|
+
vt(
|
|
778
|
+
(r) => Xe(r == null ? void 0 : r.toString),
|
|
779
|
+
n,
|
|
736
780
|
"Expected `parts` to be an array of objects with a .toString() method. Got type: %t, value: %v"
|
|
737
|
-
),
|
|
738
|
-
let e = (t =
|
|
781
|
+
), n = n.filter((r) => r).flatMap(String);
|
|
782
|
+
let e = (t = n.shift()) == null ? void 0 : t.toString();
|
|
739
783
|
if (e) {
|
|
740
|
-
for (const
|
|
741
|
-
|
|
784
|
+
for (const r of n.map((s) => s.toString()))
|
|
785
|
+
r.startsWith(".") ? e = qe(e, r) : e[e.length - 1] !== "/" ? r[0] !== "/" ? e += "/" + r : e += r : r[0] === "/" ? e += r.slice(1) : e += r;
|
|
742
786
|
e && e !== "/" && e.endsWith("/") && (e = e.slice(0, e.length - 1));
|
|
743
787
|
}
|
|
744
788
|
return e ?? "";
|
|
745
789
|
}
|
|
746
|
-
function qe(
|
|
747
|
-
if (lt(
|
|
790
|
+
function qe(n, e) {
|
|
791
|
+
if (lt(n, "Expected `base` to be a string. Got type: %t, value: %v"), e == null && (e = n, n = ""), e.startsWith("/"))
|
|
748
792
|
return e;
|
|
749
|
-
let t =
|
|
793
|
+
let t = n;
|
|
750
794
|
for (; ; )
|
|
751
795
|
if (e.startsWith("..")) {
|
|
752
|
-
for (let
|
|
753
|
-
if (t[
|
|
754
|
-
t = t.slice(0,
|
|
796
|
+
for (let r = t.length; r > 0; --r)
|
|
797
|
+
if (t[r] === "/" || r === 0) {
|
|
798
|
+
t = t.slice(0, r), e = e.replace(/^\.\.\/?/, "");
|
|
755
799
|
break;
|
|
756
800
|
}
|
|
757
801
|
} else if (e.startsWith("."))
|
|
758
802
|
e = e.replace(/^\.\/?/, "");
|
|
759
803
|
else
|
|
760
804
|
break;
|
|
761
|
-
return
|
|
805
|
+
return ae([t, e]);
|
|
762
806
|
}
|
|
763
|
-
function
|
|
764
|
-
if (!
|
|
765
|
-
|
|
766
|
-
const e =
|
|
767
|
-
const [
|
|
768
|
-
return
|
|
807
|
+
function Ke(n) {
|
|
808
|
+
if (!n) return {};
|
|
809
|
+
n.startsWith("?") && (n = n.slice(1));
|
|
810
|
+
const e = n.split("&").filter((t) => t.trim() !== "").map((t) => {
|
|
811
|
+
const [r, s] = t.split("=").map((i) => i.trim());
|
|
812
|
+
return s.toLowerCase() === "true" ? [r, !0] : s.toLowerCase() === "false" ? [r, !1] : isNaN(Number(s)) ? [r, s] : [r, Number(s)];
|
|
769
813
|
});
|
|
770
814
|
return Object.fromEntries(e);
|
|
771
815
|
}
|
|
772
|
-
function ot(
|
|
773
|
-
var
|
|
774
|
-
const [
|
|
775
|
-
e: for (const
|
|
776
|
-
const { fragments: c } =
|
|
777
|
-
if (!(((
|
|
816
|
+
function ot(n, e, t = {}) {
|
|
817
|
+
var o;
|
|
818
|
+
const [r, s] = e.split("?"), i = me(r);
|
|
819
|
+
e: for (const f of n) {
|
|
820
|
+
const { fragments: c } = f;
|
|
821
|
+
if (!(((o = c[c.length - 1]) == null ? void 0 : o.type) === 3) && c.length !== i.length || t.willMatch && !t.willMatch(f))
|
|
778
822
|
continue e;
|
|
779
|
-
const
|
|
780
|
-
t: for (let
|
|
781
|
-
const
|
|
782
|
-
if (
|
|
823
|
+
const w = [];
|
|
824
|
+
t: for (let d = 0; d < c.length; d++) {
|
|
825
|
+
const b = i[d], $ = c[d];
|
|
826
|
+
if (b == null && $.type !== 3)
|
|
783
827
|
continue e;
|
|
784
828
|
switch ($.type) {
|
|
785
829
|
case 1:
|
|
786
|
-
if ($.name.toLowerCase() ===
|
|
787
|
-
|
|
830
|
+
if ($.name.toLowerCase() === b.toLowerCase()) {
|
|
831
|
+
w.push($);
|
|
788
832
|
break;
|
|
789
833
|
} else
|
|
790
834
|
continue e;
|
|
791
835
|
case 2:
|
|
792
|
-
|
|
836
|
+
w.push({ ...$, value: b });
|
|
793
837
|
break;
|
|
794
838
|
case 3:
|
|
795
|
-
|
|
839
|
+
w.push({ ...$, value: i.slice(d).join("/") });
|
|
796
840
|
break t;
|
|
797
841
|
case 4:
|
|
798
|
-
if (isNaN(Number(
|
|
842
|
+
if (isNaN(Number(b)))
|
|
799
843
|
continue e;
|
|
800
|
-
|
|
844
|
+
w.push({ ...$, value: Number(b) });
|
|
801
845
|
break;
|
|
802
846
|
default:
|
|
803
847
|
throw new Error(`Unknown fragment type: ${$.type}`);
|
|
804
848
|
}
|
|
805
849
|
}
|
|
806
|
-
const
|
|
807
|
-
for (const
|
|
808
|
-
|
|
850
|
+
const p = /* @__PURE__ */ Object.create(null);
|
|
851
|
+
for (const d of w)
|
|
852
|
+
d.type === 2 && (p[d.name] = decodeURIComponent(d.value)), d.type === 4 && (p[d.name] = d.value), d.type === 3 && (p.wildcard = "/" + decodeURIComponent(d.value));
|
|
809
853
|
return {
|
|
810
|
-
path: "/" +
|
|
811
|
-
pattern: "/" + c.map((
|
|
812
|
-
params:
|
|
813
|
-
query:
|
|
814
|
-
meta:
|
|
854
|
+
path: "/" + w.map((d) => d.value).join("/"),
|
|
855
|
+
pattern: "/" + c.map((d) => d.type === 2 ? `{${d.name}}` : d.type === 4 ? `{#${d.name}}` : d.name).join("/"),
|
|
856
|
+
params: p,
|
|
857
|
+
query: Ke(s),
|
|
858
|
+
meta: f.meta
|
|
815
859
|
};
|
|
816
860
|
}
|
|
817
861
|
}
|
|
818
|
-
function Wt(
|
|
819
|
-
const e = [], t = [],
|
|
820
|
-
for (const
|
|
821
|
-
const { fragments:
|
|
822
|
-
|
|
862
|
+
function Wt(n) {
|
|
863
|
+
const e = [], t = [], r = [], s = [];
|
|
864
|
+
for (const o of n) {
|
|
865
|
+
const { fragments: f } = o;
|
|
866
|
+
f.some(
|
|
823
867
|
(c) => c.type === 3
|
|
824
868
|
/* Wildcard */
|
|
825
|
-
) ?
|
|
869
|
+
) ? s.push(o) : f.some(
|
|
826
870
|
(c) => c.type === 4
|
|
827
871
|
/* NumericParam */
|
|
828
|
-
) ? t.push(
|
|
872
|
+
) ? t.push(o) : f.some(
|
|
829
873
|
(c) => c.type === 2
|
|
830
874
|
/* Param */
|
|
831
|
-
) ?
|
|
875
|
+
) ? r.push(o) : e.push(o);
|
|
832
876
|
}
|
|
833
|
-
const
|
|
834
|
-
return e.sort(
|
|
877
|
+
const i = (o, f) => o.fragments.length > f.fragments.length ? -1 : 1;
|
|
878
|
+
return e.sort(i), t.sort(i), r.sort(i), s.sort(i), [...e, ...t, ...r, ...s];
|
|
835
879
|
}
|
|
836
|
-
function
|
|
837
|
-
const e =
|
|
838
|
-
for (let
|
|
839
|
-
const
|
|
840
|
-
if (
|
|
841
|
-
if (
|
|
842
|
-
throw new Error(`Wildcard must be at the end of a pattern. Received: ${
|
|
880
|
+
function zt(n) {
|
|
881
|
+
const e = me(n), t = [];
|
|
882
|
+
for (let r = 0; r < e.length; r++) {
|
|
883
|
+
const s = e[r];
|
|
884
|
+
if (s === "*") {
|
|
885
|
+
if (r !== e.length - 1)
|
|
886
|
+
throw new Error(`Wildcard must be at the end of a pattern. Received: ${n}`);
|
|
843
887
|
t.push({
|
|
844
888
|
type: 3,
|
|
845
889
|
name: "*",
|
|
846
890
|
value: null
|
|
847
891
|
});
|
|
848
|
-
} else
|
|
849
|
-
type:
|
|
850
|
-
name:
|
|
892
|
+
} else s.at(0) === "{" && s.at(-1) === "}" ? t.push({
|
|
893
|
+
type: s[1] === "#" ? 4 : 2,
|
|
894
|
+
name: s[1] === "#" ? s.slice(2, -1) : s.slice(1, -1),
|
|
851
895
|
value: null
|
|
852
896
|
}) : t.push({
|
|
853
897
|
type: 1,
|
|
854
|
-
name:
|
|
855
|
-
value:
|
|
898
|
+
name: s,
|
|
899
|
+
value: s
|
|
856
900
|
});
|
|
857
901
|
}
|
|
858
902
|
return t;
|
|
859
903
|
}
|
|
860
|
-
var
|
|
861
|
-
class
|
|
904
|
+
var Ee, T, Z, L, ze, W, ke, ee, z, le, he, ue, Le, B, Je, Ye;
|
|
905
|
+
class Ft {
|
|
862
906
|
constructor(e, t) {
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
907
|
+
u(this, B);
|
|
908
|
+
u(this, Ee);
|
|
909
|
+
u(this, T);
|
|
910
|
+
u(this, Z);
|
|
911
|
+
u(this, L, Ht());
|
|
912
|
+
u(this, ze, 0);
|
|
913
|
+
u(this, W, []);
|
|
914
|
+
u(this, ke);
|
|
915
|
+
u(this, ee, []);
|
|
916
|
+
// Callbacks that need to be called on unmount.
|
|
917
|
+
u(this, z, []);
|
|
873
918
|
/**
|
|
874
919
|
* The currently matched route pattern, if any.
|
|
875
920
|
*/
|
|
876
921
|
k(this, "$pattern");
|
|
877
|
-
|
|
922
|
+
u(this, le);
|
|
878
923
|
/**
|
|
879
924
|
* The current URL path.
|
|
880
925
|
*/
|
|
881
926
|
k(this, "$path");
|
|
882
|
-
|
|
927
|
+
u(this, he);
|
|
883
928
|
/**
|
|
884
929
|
* The current named path params.
|
|
885
930
|
*/
|
|
886
931
|
k(this, "$params");
|
|
887
|
-
|
|
932
|
+
u(this, ue);
|
|
888
933
|
/**
|
|
889
934
|
* The current query params. Changes to this object will be reflected in the URL.
|
|
890
935
|
*/
|
|
891
936
|
k(this, "$query");
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
const [
|
|
895
|
-
this.$pattern =
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
937
|
+
u(this, Le);
|
|
938
|
+
m(this, Ee, e), m(this, T, e.createLogger("dolla/router")), m(this, Z, t);
|
|
939
|
+
const [r, s] = K(null), [i, o] = K(""), [f, c] = K({}), [y, w] = K(Ke(window.location.search));
|
|
940
|
+
this.$pattern = r, m(this, le, s), this.$path = i, m(this, he, o), this.$params = f, m(this, ue, c), this.$query = y, m(this, Le, w), e.beforeMount(() => {
|
|
941
|
+
a(this, z).push(
|
|
942
|
+
ht([y], (p) => {
|
|
943
|
+
const d = new URLSearchParams();
|
|
944
|
+
for (const $ in p)
|
|
945
|
+
d.set($, String(p[$]));
|
|
946
|
+
const b = "?" + d.toString();
|
|
947
|
+
b != a(this, L).location.search && a(this, L).replace({
|
|
948
|
+
pathname: a(this, L).location.pathname,
|
|
949
|
+
search: b
|
|
950
|
+
});
|
|
951
|
+
})
|
|
952
|
+
), a(this, z).push(a(this, L).listen(P(this, B, Ye))), P(this, B, Ye).call(this, a(this, L)), a(this, z).push(
|
|
953
|
+
Bt(a(this, Z).rootElement, (p) => {
|
|
954
|
+
let d = p.getAttribute("href");
|
|
955
|
+
a(this, T).info("Intercepted link click", p, d), /^https?:\/\/|^\//.test(d) || (d = ae([a(this, L).location.pathname, d])), a(this, L).push(d);
|
|
956
|
+
})
|
|
957
|
+
), a(this, T).info("Intercepting <a> clicks within root element:", a(this, Z).rootElement);
|
|
913
958
|
}), e.onUnmount(() => {
|
|
914
|
-
|
|
959
|
+
for (; a(this, z).length > 0; )
|
|
960
|
+
a(this, z).pop()();
|
|
915
961
|
});
|
|
916
962
|
}
|
|
917
963
|
setup(e) {
|
|
918
|
-
e.style === "hash" &&
|
|
919
|
-
e.routes.flatMap((t) => P(this,
|
|
964
|
+
e.style === "hash" && m(this, L, _t()), m(this, ee, Wt(
|
|
965
|
+
e.routes.flatMap((t) => P(this, B, Je).call(this, t)).map((t) => ({
|
|
920
966
|
pattern: t.pattern,
|
|
921
967
|
meta: t.meta,
|
|
922
|
-
fragments:
|
|
968
|
+
fragments: zt(t.pattern)
|
|
923
969
|
}))
|
|
924
970
|
));
|
|
925
|
-
for (const t of
|
|
971
|
+
for (const t of a(this, ee))
|
|
926
972
|
if (t.meta.redirect) {
|
|
927
|
-
let
|
|
928
|
-
if (!
|
|
929
|
-
if (
|
|
930
|
-
willMatch(
|
|
931
|
-
return
|
|
973
|
+
let r;
|
|
974
|
+
if (!Xe(t.meta.redirect)) if (D(t.meta.redirect)) {
|
|
975
|
+
if (r = t.meta.redirect, !ot(a(this, ee), r, {
|
|
976
|
+
willMatch(i) {
|
|
977
|
+
return i !== t;
|
|
932
978
|
}
|
|
933
979
|
}))
|
|
934
980
|
throw new Error(
|
|
@@ -946,29 +992,29 @@ class mt {
|
|
|
946
992
|
* navigate(["/users", 215], { replace: true }); // replace current history entry with `/users/215`
|
|
947
993
|
*/
|
|
948
994
|
go(e, t = {}) {
|
|
949
|
-
let
|
|
950
|
-
Array.isArray(e) ?
|
|
995
|
+
let r;
|
|
996
|
+
Array.isArray(e) ? r = ae(e) : r = e.toString(), r = qe(a(this, L).location.pathname, r), t.preserveQuery && (r += a(this, L).location.search), t.replace ? a(this, L).replace(r) : a(this, L).push(r);
|
|
951
997
|
}
|
|
952
998
|
/**
|
|
953
999
|
* Navigate backward. Pass a number of steps to hit the back button that many times.
|
|
954
1000
|
*/
|
|
955
1001
|
back(e = 1) {
|
|
956
|
-
|
|
1002
|
+
a(this, L).go(-e);
|
|
957
1003
|
}
|
|
958
1004
|
/**
|
|
959
1005
|
* Navigate forward. Pass a number of steps to hit the forward button that many times.
|
|
960
1006
|
*/
|
|
961
1007
|
forward(e = 1) {
|
|
962
|
-
|
|
1008
|
+
a(this, L).go(e);
|
|
963
1009
|
}
|
|
964
1010
|
}
|
|
965
|
-
|
|
1011
|
+
Ee = new WeakMap(), T = new WeakMap(), Z = new WeakMap(), L = new WeakMap(), ze = new WeakMap(), W = new WeakMap(), ke = new WeakMap(), ee = new WeakMap(), z = new WeakMap(), le = new WeakMap(), he = new WeakMap(), ue = new WeakMap(), Le = new WeakMap(), B = new WeakSet(), /**
|
|
966
1012
|
* Parses a route definition object into a set of matchable routes.
|
|
967
1013
|
*
|
|
968
1014
|
* @param route - Route config object.
|
|
969
1015
|
* @param layers - Array of parent layers. Passed when this function calls itself on nested routes.
|
|
970
1016
|
*/
|
|
971
|
-
|
|
1017
|
+
Je = function(e, t = [], r = []) {
|
|
972
1018
|
if (!(typeof e == "object" && !Array.isArray(e)) || typeof e.path != "string")
|
|
973
1019
|
throw new TypeError(`Route configs must be objects with a 'path' string property. Got: ${e}`);
|
|
974
1020
|
if (e.redirect && e.routes)
|
|
@@ -977,180 +1023,191 @@ Ye = function(e, t = [], n = []) {
|
|
|
977
1023
|
throw new Error("Route cannot have both a 'redirect' and a 'view'.");
|
|
978
1024
|
if (!e.view && !e.routes && !e.redirect)
|
|
979
1025
|
throw new Error("Route must have a 'view', a 'redirect', or a set of nested 'routes'.");
|
|
980
|
-
let
|
|
981
|
-
for (const
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
const
|
|
1026
|
+
let s = [];
|
|
1027
|
+
for (const c of t)
|
|
1028
|
+
s.push(...me(c.path));
|
|
1029
|
+
s.push(...me(e.path)), s[s.length - 1] === "*" && s.pop();
|
|
1030
|
+
const i = [];
|
|
985
1031
|
if (e.redirect) {
|
|
986
|
-
let
|
|
987
|
-
return
|
|
988
|
-
pattern: "/" +
|
|
1032
|
+
let c = e.redirect;
|
|
1033
|
+
return D(c) && (c = qe(ae(s), c), c.startsWith("/") || (c = "/" + c)), i.push({
|
|
1034
|
+
pattern: "/" + ae([...s, ...me(e.path)]),
|
|
989
1035
|
meta: {
|
|
990
|
-
redirect:
|
|
1036
|
+
redirect: c
|
|
991
1037
|
}
|
|
992
|
-
}),
|
|
1038
|
+
}), i;
|
|
993
1039
|
}
|
|
994
|
-
let
|
|
1040
|
+
let o = ut;
|
|
995
1041
|
if (typeof e.view == "function")
|
|
996
|
-
|
|
1042
|
+
o = e.view;
|
|
997
1043
|
else if (e.view)
|
|
998
1044
|
throw new TypeError(`Route '${e.path}' expected a view function or undefined. Got: ${e.view}`);
|
|
999
|
-
const
|
|
1045
|
+
const f = { id: et(this, ze)._++, view: o };
|
|
1000
1046
|
if (e.routes)
|
|
1001
|
-
for (const
|
|
1002
|
-
|
|
1047
|
+
for (const c of e.routes)
|
|
1048
|
+
i.push(...P(this, B, Je).call(this, c, [...t, e], [...r, f]));
|
|
1003
1049
|
else
|
|
1004
|
-
|
|
1005
|
-
pattern: parent ?
|
|
1050
|
+
i.push({
|
|
1051
|
+
pattern: parent ? ae([...t.map((c) => c.path), e.path]) : e.path,
|
|
1006
1052
|
meta: {
|
|
1007
1053
|
pattern: e.path,
|
|
1008
|
-
layers: [...
|
|
1054
|
+
layers: [...r, f],
|
|
1009
1055
|
beforeMatch: e.beforeMatch
|
|
1010
1056
|
}
|
|
1011
1057
|
});
|
|
1012
|
-
return
|
|
1013
|
-
},
|
|
1014
|
-
e.search !==
|
|
1015
|
-
const t = ot(
|
|
1058
|
+
return i;
|
|
1059
|
+
}, Ye = async function({ location: e }) {
|
|
1060
|
+
e.search !== a(this, ke) && (m(this, ke, e.search), a(this, Le).call(this, Ke(e.search)));
|
|
1061
|
+
const t = ot(a(this, ee), e.pathname);
|
|
1016
1062
|
if (!t) {
|
|
1017
|
-
|
|
1063
|
+
a(this, le).call(this, null), a(this, he).call(this, e.pathname), a(this, ue).call(this, {
|
|
1018
1064
|
wildcard: e.pathname
|
|
1019
1065
|
});
|
|
1020
1066
|
return;
|
|
1021
1067
|
}
|
|
1022
1068
|
if (t.meta.beforeMatch && await t.meta.beforeMatch({
|
|
1023
|
-
redirect: (
|
|
1069
|
+
redirect: (r) => {
|
|
1024
1070
|
throw new Error("Redirect not yet implemented.");
|
|
1025
1071
|
}
|
|
1026
|
-
}),
|
|
1072
|
+
}), a(this, T).info(`Matched route: '${t.pattern}' ('${t.path}')`), t.meta.redirect != null)
|
|
1027
1073
|
if (typeof t.meta.redirect == "string") {
|
|
1028
|
-
const
|
|
1029
|
-
|
|
1074
|
+
const r = Qt(t.meta.redirect, t.params);
|
|
1075
|
+
a(this, T).info(`Redirecting to: '${r}'`), a(this, L).replace(r);
|
|
1030
1076
|
} else if (typeof t.meta.redirect == "function") {
|
|
1031
|
-
const
|
|
1077
|
+
const r = {
|
|
1032
1078
|
path: t.path,
|
|
1033
1079
|
pattern: t.pattern,
|
|
1034
1080
|
params: t.params,
|
|
1035
1081
|
query: t.query
|
|
1036
1082
|
};
|
|
1037
|
-
let
|
|
1038
|
-
if (typeof
|
|
1083
|
+
let s = await t.meta.redirect(r);
|
|
1084
|
+
if (typeof s != "string")
|
|
1039
1085
|
throw new Error("Redirect function must return a path to redirect to.");
|
|
1040
|
-
|
|
1086
|
+
s.startsWith("/") || (s = qe(t.path, s)), a(this, T).info(`Redirecting to: '${s}'`), a(this, L).replace(s);
|
|
1041
1087
|
} else
|
|
1042
1088
|
throw new TypeError("Redirect must either be a path string or a function.");
|
|
1043
|
-
else if (
|
|
1044
|
-
|
|
1045
|
-
const
|
|
1046
|
-
for (let
|
|
1047
|
-
const
|
|
1048
|
-
if ((
|
|
1049
|
-
|
|
1050
|
-
const
|
|
1051
|
-
|
|
1052
|
-
}, u = kt(r.markup, c), p = St(u);
|
|
1053
|
-
s && s.handle.connected && s.handle.disconnect(), h ? h.handle.setChildren(u) : i(this, X).rootView.setChildren(u), i(this, W).push({ id: r.id, handle: p });
|
|
1089
|
+
else if (a(this, he).call(this, t.path), a(this, ue).call(this, t.params), t.pattern !== this.$pattern.get()) {
|
|
1090
|
+
a(this, le).call(this, t.pattern);
|
|
1091
|
+
const r = t.meta.layers;
|
|
1092
|
+
for (let s = 0; s < r.length; s++) {
|
|
1093
|
+
const i = r[s], o = a(this, W)[s];
|
|
1094
|
+
if ((o == null ? void 0 : o.id) !== i.id) {
|
|
1095
|
+
a(this, T).info(`Replacing layer @${s} (active ID: ${o == null ? void 0 : o.id}, matched ID: ${i.id})`), m(this, W, a(this, W).slice(0, s));
|
|
1096
|
+
const f = a(this, W).at(-1), c = a(this, Ee).constructView(i.view, {});
|
|
1097
|
+
o && o.node.isMounted && o.node.unmount(), f ? f.node.setChildren([c]) : a(this, Z).rootView.setChildren([c]), a(this, W).push({ id: i.id, node: c });
|
|
1054
1098
|
}
|
|
1055
1099
|
}
|
|
1056
1100
|
}
|
|
1057
1101
|
};
|
|
1058
|
-
const
|
|
1059
|
-
function
|
|
1060
|
-
function
|
|
1061
|
-
return !
|
|
1102
|
+
const It = /(noopener|noreferrer) (noopener|noreferrer)/, Gt = /^[\w-_]+:/;
|
|
1103
|
+
function Bt(n, e, t = window) {
|
|
1104
|
+
function r(i) {
|
|
1105
|
+
return !i || i === n ? null : i.localName !== "a" || i.href === void 0 ? r(i.parentNode) : i;
|
|
1062
1106
|
}
|
|
1063
|
-
function
|
|
1064
|
-
if (
|
|
1107
|
+
function s(i) {
|
|
1108
|
+
if (i.button && i.button !== 0 || i.ctrlKey || i.metaKey || i.altKey || i.shiftKey || i.defaultPrevented)
|
|
1065
1109
|
return;
|
|
1066
|
-
const
|
|
1067
|
-
|
|
1110
|
+
const o = r(i.target);
|
|
1111
|
+
o && (t.location.protocol !== o.protocol || t.location.hostname !== o.hostname || t.location.port !== o.port || o.hasAttribute("data-router-ignore") || o.hasAttribute("download") || o.getAttribute("target") === "_blank" && It.test(o.getAttribute("rel")) || Gt.test(o.getAttribute("href")) || (i.preventDefault(), e(o)));
|
|
1068
1112
|
}
|
|
1069
|
-
return
|
|
1070
|
-
|
|
1113
|
+
return n.addEventListener("click", s), function() {
|
|
1114
|
+
n.removeEventListener("click", s);
|
|
1071
1115
|
};
|
|
1072
1116
|
}
|
|
1073
|
-
function
|
|
1117
|
+
function Qt(n, e) {
|
|
1074
1118
|
for (const t in e) {
|
|
1075
|
-
const
|
|
1076
|
-
|
|
1119
|
+
const r = e[t].toString();
|
|
1120
|
+
n = n.replace(`{${t}}`, r).replace(`{#${t}}`, r);
|
|
1077
1121
|
}
|
|
1078
|
-
return
|
|
1122
|
+
return n;
|
|
1079
1123
|
}
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
Router: mt,
|
|
1083
|
-
RoutingStyle: pt,
|
|
1084
|
-
catchLinks: yt
|
|
1085
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
1086
|
-
var I, Pe, te, ne, Me, Re, Oe, xe, R, z;
|
|
1087
|
-
class Qt {
|
|
1124
|
+
var F, Pe, I, te, Se, Re, xe, Me, Ne, R, G;
|
|
1125
|
+
class Kt {
|
|
1088
1126
|
constructor() {
|
|
1089
|
-
g(this, I, !1);
|
|
1090
|
-
g(this, Pe, "production");
|
|
1091
|
-
g(this, te);
|
|
1092
|
-
g(this, ne);
|
|
1093
1127
|
k(this, "http");
|
|
1094
1128
|
k(this, "language");
|
|
1095
1129
|
k(this, "render");
|
|
1096
1130
|
k(this, "router");
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1131
|
+
u(this, F, !1);
|
|
1132
|
+
u(this, Pe, "production");
|
|
1133
|
+
u(this, I);
|
|
1134
|
+
u(this, te);
|
|
1135
|
+
u(this, Se, Nt);
|
|
1136
|
+
u(this, Re, []);
|
|
1137
|
+
u(this, xe, []);
|
|
1138
|
+
u(this, Me, []);
|
|
1139
|
+
u(this, Ne, []);
|
|
1140
|
+
u(this, R, {
|
|
1102
1141
|
info: "development",
|
|
1103
1142
|
log: "development",
|
|
1104
1143
|
warn: "development",
|
|
1105
1144
|
error: !0
|
|
1106
1145
|
});
|
|
1107
|
-
|
|
1108
|
-
k(this, "createSignal",
|
|
1109
|
-
k(this, "createSettableSignal",
|
|
1110
|
-
k(this, "toSettableSignal",
|
|
1111
|
-
k(this, "signalify",
|
|
1112
|
-
k(this, "designalify",
|
|
1113
|
-
k(this, "derive",
|
|
1114
|
-
k(this, "watch",
|
|
1115
|
-
k(this, "createRef",
|
|
1116
|
-
k(this, "isRef",
|
|
1146
|
+
u(this, G, rt("*,-dolla/*"));
|
|
1147
|
+
k(this, "createSignal", K);
|
|
1148
|
+
k(this, "createSettableSignal", $t);
|
|
1149
|
+
k(this, "toSettableSignal", Et);
|
|
1150
|
+
k(this, "signalify", Ge);
|
|
1151
|
+
k(this, "designalify", kt);
|
|
1152
|
+
k(this, "derive", Be);
|
|
1153
|
+
k(this, "watch", ht);
|
|
1154
|
+
k(this, "createRef", Lt);
|
|
1155
|
+
k(this, "isRef", Pt);
|
|
1117
1156
|
const e = this;
|
|
1118
|
-
this.http = new
|
|
1157
|
+
this.http = new Ot(), this.language = new qt(this), this.render = new Vt(this), this.router = new Ft(this, {
|
|
1119
1158
|
get rootElement() {
|
|
1120
|
-
return
|
|
1159
|
+
return a(e, I);
|
|
1121
1160
|
},
|
|
1122
1161
|
get rootView() {
|
|
1123
|
-
return
|
|
1162
|
+
return a(e, te);
|
|
1124
1163
|
}
|
|
1125
1164
|
});
|
|
1126
1165
|
}
|
|
1166
|
+
/**
|
|
1167
|
+
* True when the app is connected to a DOM node and displayed to the user.
|
|
1168
|
+
*/
|
|
1127
1169
|
get isMounted() {
|
|
1128
|
-
return
|
|
1170
|
+
return a(this, F);
|
|
1129
1171
|
}
|
|
1130
|
-
|
|
1131
|
-
|
|
1172
|
+
/**
|
|
1173
|
+
* Get the current environment that this app is running in.
|
|
1174
|
+
* Environment affects which log messages will print and how much debugging info is included in the DOM.
|
|
1175
|
+
*/
|
|
1176
|
+
getEnv() {
|
|
1177
|
+
return a(this, Pe);
|
|
1178
|
+
}
|
|
1179
|
+
/**
|
|
1180
|
+
* Sets the environment that this app is running in.
|
|
1181
|
+
* Environment affects which log messages will print and how much debugging info is included in the DOM.
|
|
1182
|
+
*/
|
|
1183
|
+
setEnv(e) {
|
|
1184
|
+
m(this, Pe, e);
|
|
1132
1185
|
}
|
|
1133
|
-
|
|
1134
|
-
|
|
1186
|
+
/**
|
|
1187
|
+
* Sets the view that will be shown when the `crash` method is called on any logger.
|
|
1188
|
+
* When a crash is reported the app will be unmounted and replaced with this crash page.
|
|
1189
|
+
*/
|
|
1190
|
+
setCrashView(e) {
|
|
1191
|
+
m(this, Se, e);
|
|
1135
1192
|
}
|
|
1136
1193
|
async mount(e, t) {
|
|
1137
|
-
if (
|
|
1194
|
+
if (a(this, F))
|
|
1138
1195
|
throw new Error("Dolla is already mounted.");
|
|
1139
|
-
if (
|
|
1140
|
-
const
|
|
1141
|
-
|
|
1196
|
+
if (D(e)) {
|
|
1197
|
+
const s = document.querySelector(e);
|
|
1198
|
+
nt(HTMLElement, s, `Selector '${e}' did not match any element.`), m(this, I, s);
|
|
1142
1199
|
} else
|
|
1143
|
-
|
|
1144
|
-
let
|
|
1145
|
-
t ?
|
|
1146
|
-
for (const
|
|
1147
|
-
|
|
1200
|
+
nt(HTMLElement, e, "Expected an HTML element or a selector string. Got type: %t, value: %v"), m(this, I, e);
|
|
1201
|
+
let r;
|
|
1202
|
+
t ? r = at(t) : r = at(ut), m(this, te, this.constructView(r.type, r.props)), await Promise.all(a(this, Re).map((s) => s())), a(this, te).mount(a(this, I)), m(this, F, !0);
|
|
1203
|
+
for (const s of a(this, xe))
|
|
1204
|
+
s();
|
|
1148
1205
|
}
|
|
1149
1206
|
async unmount() {
|
|
1150
1207
|
var e;
|
|
1151
|
-
if (
|
|
1152
|
-
await Promise.all(
|
|
1153
|
-
for (const t of
|
|
1208
|
+
if (a(this, F)) {
|
|
1209
|
+
await Promise.all(a(this, Me).map((t) => t())), (e = a(this, te)) == null || e.unmount(), m(this, F, !1);
|
|
1210
|
+
for (const t of a(this, Ne))
|
|
1154
1211
|
t();
|
|
1155
1212
|
}
|
|
1156
1213
|
}
|
|
@@ -1159,51 +1216,51 @@ class Qt {
|
|
|
1159
1216
|
* it will be awaited before mounting finishes. Use this to perform initial setup before the app is displayed to the user.
|
|
1160
1217
|
*/
|
|
1161
1218
|
beforeMount(e) {
|
|
1162
|
-
|
|
1219
|
+
a(this, Re).push(e);
|
|
1163
1220
|
}
|
|
1164
1221
|
/**
|
|
1165
1222
|
* Registers a `callback` to run after the app is mounted.
|
|
1166
1223
|
*/
|
|
1167
1224
|
onMount(e) {
|
|
1168
|
-
|
|
1225
|
+
a(this, xe).push(e);
|
|
1169
1226
|
}
|
|
1170
1227
|
/**
|
|
1171
1228
|
* Registers a `callback` to run after `Dolla.unmount` is called, before the app is unmounted. If `callback` returns a Promise,
|
|
1172
1229
|
* it will be awaited before unmounting finishes. Use this to perform cleanup.
|
|
1173
1230
|
*/
|
|
1174
1231
|
beforeUnmount(e) {
|
|
1175
|
-
|
|
1232
|
+
a(this, Me).push(e);
|
|
1176
1233
|
}
|
|
1177
1234
|
/**
|
|
1178
1235
|
* Registers a `callback` to run after the app is unmounted.
|
|
1179
1236
|
*/
|
|
1180
1237
|
onUnmount(e) {
|
|
1181
|
-
|
|
1238
|
+
a(this, Ne).push(e);
|
|
1182
1239
|
}
|
|
1183
1240
|
/**
|
|
1184
1241
|
* Update log type toggles. Values that are not passed will remain unchanged.
|
|
1185
1242
|
*/
|
|
1186
1243
|
setLoggles(e) {
|
|
1187
1244
|
for (const t in e) {
|
|
1188
|
-
const
|
|
1189
|
-
|
|
1245
|
+
const r = e[t];
|
|
1246
|
+
r && (a(this, R)[t] = r);
|
|
1190
1247
|
}
|
|
1191
1248
|
}
|
|
1192
1249
|
setLogFilter(e) {
|
|
1193
|
-
|
|
1250
|
+
m(this, G, rt(e));
|
|
1194
1251
|
}
|
|
1195
1252
|
createLogger(e, t) {
|
|
1196
|
-
const
|
|
1253
|
+
const r = Ge(e), s = (t == null ? void 0 : t.console) ?? St(), i = this;
|
|
1197
1254
|
return {
|
|
1198
1255
|
get info() {
|
|
1199
|
-
var
|
|
1200
|
-
const
|
|
1201
|
-
if (i
|
|
1202
|
-
return
|
|
1256
|
+
var f;
|
|
1257
|
+
const o = r.get();
|
|
1258
|
+
if (a(i, R).info === !1 || D(a(i, R).info) && a(i, R).info !== i.getEnv() || !a(f = i, G).call(f, o))
|
|
1259
|
+
return Oe;
|
|
1203
1260
|
{
|
|
1204
|
-
let c = `%c${
|
|
1205
|
-
return t != null && t.uid ? c += ` %c[uid: %c${t.uid}%c]` : c += "%c%c%c",
|
|
1206
|
-
|
|
1261
|
+
let c = `%c${o}`;
|
|
1262
|
+
return t != null && t.uid ? c += ` %c[uid: %c${t.uid}%c]` : c += "%c%c%c", s.info.bind(
|
|
1263
|
+
s,
|
|
1207
1264
|
c,
|
|
1208
1265
|
`color:${Te(c)};font-weight:bold`,
|
|
1209
1266
|
"color:#777",
|
|
@@ -1213,14 +1270,14 @@ class Qt {
|
|
|
1213
1270
|
}
|
|
1214
1271
|
},
|
|
1215
1272
|
get log() {
|
|
1216
|
-
var
|
|
1217
|
-
const
|
|
1218
|
-
if (i
|
|
1219
|
-
return
|
|
1273
|
+
var f;
|
|
1274
|
+
const o = r.get();
|
|
1275
|
+
if (a(i, R).log === !1 || D(a(i, R).log) && a(i, R).log !== i.getEnv() || !a(f = i, G).call(f, o))
|
|
1276
|
+
return Oe;
|
|
1220
1277
|
{
|
|
1221
|
-
let c = `%c${
|
|
1222
|
-
return t != null && t.uid ? c += ` %c[uid: %c${t.uid}%c]` : c += "%c%c%c",
|
|
1223
|
-
|
|
1278
|
+
let c = `%c${o}`;
|
|
1279
|
+
return t != null && t.uid ? c += ` %c[uid: %c${t.uid}%c]` : c += "%c%c%c", s.log.bind(
|
|
1280
|
+
s,
|
|
1224
1281
|
c,
|
|
1225
1282
|
`color:${Te(c)};font-weight:bold`,
|
|
1226
1283
|
"color:#777",
|
|
@@ -1230,14 +1287,14 @@ class Qt {
|
|
|
1230
1287
|
}
|
|
1231
1288
|
},
|
|
1232
1289
|
get warn() {
|
|
1233
|
-
var
|
|
1234
|
-
const
|
|
1235
|
-
if (i
|
|
1236
|
-
return
|
|
1290
|
+
var f;
|
|
1291
|
+
const o = r.get();
|
|
1292
|
+
if (a(i, R).warn === !1 || D(a(i, R).warn) && a(i, R).warn !== i.getEnv() || !a(f = i, G).call(f, o))
|
|
1293
|
+
return Oe;
|
|
1237
1294
|
{
|
|
1238
|
-
let c = `%c${
|
|
1239
|
-
return t != null && t.uid ? c += ` %c[uid: %c${t.uid}%c]` : c += "%c%c%c",
|
|
1240
|
-
|
|
1295
|
+
let c = `%c${o}`;
|
|
1296
|
+
return t != null && t.uid ? c += ` %c[uid: %c${t.uid}%c]` : c += "%c%c%c", s.warn.bind(
|
|
1297
|
+
s,
|
|
1241
1298
|
c,
|
|
1242
1299
|
`color:${Te(c)};font-weight:bold`,
|
|
1243
1300
|
"color:#777",
|
|
@@ -1247,14 +1304,14 @@ class Qt {
|
|
|
1247
1304
|
}
|
|
1248
1305
|
},
|
|
1249
1306
|
get error() {
|
|
1250
|
-
var
|
|
1251
|
-
const
|
|
1252
|
-
if (i
|
|
1253
|
-
return
|
|
1307
|
+
var f;
|
|
1308
|
+
const o = r.get();
|
|
1309
|
+
if (a(i, R).error === !1 || D(a(i, R).error) && a(i, R).error !== i.getEnv() || !a(f = i, G).call(f, o))
|
|
1310
|
+
return Oe;
|
|
1254
1311
|
{
|
|
1255
|
-
let c = `%c${
|
|
1256
|
-
return t != null && t.uid ? c += ` %c[uid: %c${t.uid}%c]` : c += "%c%c%c",
|
|
1257
|
-
|
|
1312
|
+
let c = `%c${o}`;
|
|
1313
|
+
return t != null && t.uid ? c += ` %c[uid: %c${t.uid}%c]` : c += "%c%c%c", s.error.bind(
|
|
1314
|
+
s,
|
|
1258
1315
|
c,
|
|
1259
1316
|
`color:${Te(c)};font-weight:bold`,
|
|
1260
1317
|
"color:#777",
|
|
@@ -1263,69 +1320,47 @@ class Qt {
|
|
|
1263
1320
|
);
|
|
1264
1321
|
}
|
|
1265
1322
|
},
|
|
1266
|
-
crash(
|
|
1323
|
+
crash(o) {
|
|
1324
|
+
throw i.isMounted && (i.unmount(), i.constructView(a(i, Se), {
|
|
1325
|
+
error: o,
|
|
1326
|
+
loggerName: r.get(),
|
|
1327
|
+
uid: t == null ? void 0 : t.uid
|
|
1328
|
+
}).mount(a(i, I))), o;
|
|
1267
1329
|
}
|
|
1268
1330
|
};
|
|
1269
1331
|
}
|
|
1270
|
-
|
|
1271
|
-
|
|
1332
|
+
/**
|
|
1333
|
+
*
|
|
1334
|
+
*/
|
|
1335
|
+
constructView(e, t, r = []) {
|
|
1336
|
+
return Rt({ root: this }, e, t, r);
|
|
1272
1337
|
}
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
for (var r = 1; r < e.length; r++) {
|
|
1279
|
-
var s = e[r++], h = e[r] ? (e[0] |= s ? 1 : 2, t[e[r++]]) : e[++r];
|
|
1280
|
-
s === 3 ? n[0] = h : s === 4 ? n[1] = Object.assign(n[1] || {}, h) : s === 5 ? (n[1] = n[1] || {})[e[++r]] = h : s === 6 ? n[1][e[++r]] += h + "" : s ? (o = a.apply(h, wt(a, h, t, ["", null])), n.push(o), h[0] ? e[0] |= 2 : (e[r - 2] = 0, e[r] = o)) : n.push(h);
|
|
1338
|
+
/**
|
|
1339
|
+
*
|
|
1340
|
+
*/
|
|
1341
|
+
constructMarkup(e) {
|
|
1342
|
+
return xt(Mt({ root: this }, e));
|
|
1281
1343
|
}
|
|
1282
|
-
return n;
|
|
1283
|
-
}, ct = /* @__PURE__ */ new Map();
|
|
1284
|
-
function Kt(a) {
|
|
1285
|
-
var e = ct.get(this);
|
|
1286
|
-
return e || (e = /* @__PURE__ */ new Map(), ct.set(this, e)), (e = wt(this, e.get(a) || (e.set(a, e = function(t) {
|
|
1287
|
-
for (var n, o, r = 1, s = "", h = "", c = [0], u = function(f) {
|
|
1288
|
-
r === 1 && (f || (s = s.replace(/^\s*\n\s*|\s*\n\s*$/g, ""))) ? c.push(0, f, s) : r === 3 && (f || s) ? (c.push(3, f, s), r = 2) : r === 2 && s === "..." && f ? c.push(4, f, 0) : r === 2 && s && !f ? c.push(5, 0, !0, s) : r >= 5 && ((s || !f && r === 5) && (c.push(r, 0, s, o), r = 6), f && (c.push(r, f, 0, o), r = 6)), s = "";
|
|
1289
|
-
}, p = 0; p < t.length; p++) {
|
|
1290
|
-
p && (r === 1 && u(), u(p));
|
|
1291
|
-
for (var b = 0; b < t[p].length; b++) n = t[p][b], r === 1 ? n === "<" ? (u(), c = [c], r = 3) : s += n : r === 4 ? s === "--" && n === ">" ? (r = 1, s = "") : s = n + s[0] : h ? n === h ? h = "" : s += n : n === '"' || n === "'" ? h = n : n === ">" ? (u(), r = 1) : r && (n === "=" ? (r = 5, o = s, s = "") : n === "/" && (r < 5 || t[p][b + 1] === ">") ? (u(), r === 3 && (c = c[0]), r = c, (c = c[0]).push(2, 0, r), r = 0) : n === " " || n === " " || n === `
|
|
1292
|
-
` || n === "\r" ? (u(), r = 2) : s += n), r === 3 && s === "!--" && (r = 4, c = c[0]);
|
|
1293
|
-
}
|
|
1294
|
-
return u(), c;
|
|
1295
|
-
}(a)), e), arguments, [])).length > 1 ? e : e[0];
|
|
1296
1344
|
}
|
|
1297
|
-
|
|
1345
|
+
F = new WeakMap(), Pe = new WeakMap(), I = new WeakMap(), te = new WeakMap(), Se = new WeakMap(), Re = new WeakMap(), xe = new WeakMap(), Me = new WeakMap(), Ne = new WeakMap(), R = new WeakMap(), G = new WeakMap();
|
|
1346
|
+
const ct = new Kt(), Zt = ct.language.t.bind(ct.language);
|
|
1298
1347
|
export {
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
an as mount,
|
|
1317
|
-
tn as onMount,
|
|
1318
|
-
rn as onUnmount,
|
|
1319
|
-
vn as portal,
|
|
1320
|
-
cn as render,
|
|
1321
|
-
$n as repeat,
|
|
1322
|
-
Zt as router,
|
|
1323
|
-
un as setLogFilter,
|
|
1324
|
-
hn as setLogges,
|
|
1325
|
-
Be as signalify,
|
|
1326
|
-
fn as t,
|
|
1327
|
-
Mt as toSettableSignal,
|
|
1328
|
-
sn as unmount,
|
|
1329
|
-
ut as watch
|
|
1348
|
+
yt as cond,
|
|
1349
|
+
at as createMarkup,
|
|
1350
|
+
Lt as createRef,
|
|
1351
|
+
$t as createSettableSignal,
|
|
1352
|
+
K as createSignal,
|
|
1353
|
+
rr as createSignalSetter,
|
|
1354
|
+
ct as default,
|
|
1355
|
+
Be as derive,
|
|
1356
|
+
kt as designalify,
|
|
1357
|
+
tt as html,
|
|
1358
|
+
Pt as isRef,
|
|
1359
|
+
nr as portal,
|
|
1360
|
+
ar as repeat,
|
|
1361
|
+
Ge as signalify,
|
|
1362
|
+
Zt as t,
|
|
1363
|
+
Et as toSettableSignal,
|
|
1364
|
+
ht as watch
|
|
1330
1365
|
};
|
|
1331
1366
|
//# sourceMappingURL=index.js.map
|