@telperion/elements 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +102 -0
- package/bundle.js +164 -0
- package/bundle.mjs +2630 -0
- package/drag-drop/drag-element.cjs +438 -0
- package/drag-drop/drag-element.d.ts +120 -0
- package/drag-drop/drag-element.js +437 -0
- package/drag-drop/drag-element.js.map +1 -0
- package/drag-drop/drag-handle-element.cjs +35 -0
- package/drag-drop/drag-handle-element.d.ts +12 -0
- package/drag-drop/drag-handle-element.js +34 -0
- package/drag-drop/drag-handle-element.js.map +1 -0
- package/drag-drop/dropzone-element.cjs +117 -0
- package/drag-drop/dropzone-element.d.ts +17 -0
- package/drag-drop/dropzone-element.js +116 -0
- package/drag-drop/dropzone-element.js.map +1 -0
- package/drag-drop/index.cjs +11 -0
- package/drag-drop/index.d.ts +22 -0
- package/drag-drop/index.js +6 -0
- package/drag-drop/index.js.map +1 -0
- package/drag-drop/private-props.cjs +6 -0
- package/drag-drop/private-props.d.ts +3 -0
- package/drag-drop/private-props.js +5 -0
- package/drag-drop/private-props.js.map +1 -0
- package/drag-drop/tha-drag-event.cjs +34 -0
- package/drag-drop/tha-drag-event.d.ts +19 -0
- package/drag-drop/tha-drag-event.js +32 -0
- package/drag-drop/tha-drag-event.js.map +1 -0
- package/icon/icon-element.cjs +114 -0
- package/icon/icon-element.d.ts +40 -0
- package/icon/icon-element.js +113 -0
- package/icon/icon-element.js.map +1 -0
- package/icon/index.cjs +5 -0
- package/icon/index.d.ts +1 -0
- package/icon/index.js +3 -0
- package/icon/index.js.map +1 -0
- package/icon/material-symbols.css +22 -0
- package/index.cjs +11 -0
- package/index.d.ts +6 -0
- package/index.js +10 -0
- package/index.js.map +1 -0
- package/package.json +127 -0
- package/router/history-managed.cjs +97 -0
- package/router/history-managed.d.ts +76 -0
- package/router/history-managed.js +95 -0
- package/router/history-managed.js.map +1 -0
- package/router/history.cjs +65 -0
- package/router/history.d.ts +48 -0
- package/router/history.js +63 -0
- package/router/history.js.map +1 -0
- package/router/index.cjs +15 -0
- package/router/index.d.ts +6 -0
- package/router/index.js +8 -0
- package/router/index.js.map +1 -0
- package/router/signal-watcher-lit-element.cjs +11 -0
- package/router/signal-watcher-lit-element.d.ts +25 -0
- package/router/signal-watcher-lit-element.js +10 -0
- package/router/signal-watcher-lit-element.js.map +1 -0
- package/router/tha-route.cjs +125 -0
- package/router/tha-route.d.ts +90 -0
- package/router/tha-route.js +124 -0
- package/router/tha-route.js.map +1 -0
- package/router/tha-router-config.cjs +241 -0
- package/router/tha-router-config.d.ts +223 -0
- package/router/tha-router-config.js +240 -0
- package/router/tha-router-config.js.map +1 -0
- package/router/tha-router-link.cjs +209 -0
- package/router/tha-router-link.d.ts +95 -0
- package/router/tha-router-link.js +208 -0
- package/router/tha-router-link.js.map +1 -0
- package/router/tha-router-outlet.cjs +215 -0
- package/router/tha-router-outlet.d.ts +112 -0
- package/router/tha-router-outlet.js +214 -0
- package/router/tha-router-outlet.js.map +1 -0
- package/router/tha-router-param.cjs +278 -0
- package/router/tha-router-param.d.ts +226 -0
- package/router/tha-router-param.js +277 -0
- package/router/tha-router-param.js.map +1 -0
- package/router/tha-router.cjs +163 -0
- package/router/tha-router.d.ts +69 -0
- package/router/tha-router.js +162 -0
- package/router/tha-router.js.map +1 -0
- package/tha-url-output.cjs +79 -0
- package/tha-url-output.d.ts +41 -0
- package/tha-url-output.js +78 -0
- package/tha-url-output.js.map +1 -0
package/bundle.mjs
ADDED
|
@@ -0,0 +1,2630 @@
|
|
|
1
|
+
var Lr = (t) => {
|
|
2
|
+
throw TypeError(t);
|
|
3
|
+
};
|
|
4
|
+
var Ir = (t, e, r) => e.has(t) || Lr("Cannot " + r);
|
|
5
|
+
var it = (t, e, r) => (Ir(t, e, "read from private field"), r ? r.call(t) : e.get(t)), gt = (t, e, r) => e.has(t) ? Lr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), je = (t, e, r, s) => (Ir(t, e, "write to private field"), s ? s.call(t, r) : e.set(t, r), r);
|
|
6
|
+
/**
|
|
7
|
+
* @license
|
|
8
|
+
* Copyright 2019 Google LLC
|
|
9
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
10
|
+
*/
|
|
11
|
+
const re = globalThis, Sr = re.ShadowRoot && (re.ShadyCSS === void 0 || re.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, br = Symbol(), Ur = /* @__PURE__ */ new WeakMap();
|
|
12
|
+
let vs = class {
|
|
13
|
+
constructor(e, r, s) {
|
|
14
|
+
if (this._$cssResult$ = !0, s !== br) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
15
|
+
this.cssText = e, this.t = r;
|
|
16
|
+
}
|
|
17
|
+
get styleSheet() {
|
|
18
|
+
let e = this.o;
|
|
19
|
+
const r = this.t;
|
|
20
|
+
if (Sr && e === void 0) {
|
|
21
|
+
const s = r !== void 0 && r.length === 1;
|
|
22
|
+
s && (e = Ur.get(r)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), s && Ur.set(r, e));
|
|
23
|
+
}
|
|
24
|
+
return e;
|
|
25
|
+
}
|
|
26
|
+
toString() {
|
|
27
|
+
return this.cssText;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const en = (t) => new vs(typeof t == "string" ? t : t + "", void 0, br), Fe = (t, ...e) => {
|
|
31
|
+
const r = t.length === 1 ? t[0] : e.reduce((s, n, i) => s + ((a) => {
|
|
32
|
+
if (a._$cssResult$ === !0) return a.cssText;
|
|
33
|
+
if (typeof a == "number") return a;
|
|
34
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
35
|
+
})(n) + t[i + 1], t[0]);
|
|
36
|
+
return new vs(r, t, br);
|
|
37
|
+
}, rn = (t, e) => {
|
|
38
|
+
if (Sr) t.adoptedStyleSheets = e.map((r) => r instanceof CSSStyleSheet ? r : r.styleSheet);
|
|
39
|
+
else for (const r of e) {
|
|
40
|
+
const s = document.createElement("style"), n = re.litNonce;
|
|
41
|
+
n !== void 0 && s.setAttribute("nonce", n), s.textContent = r.cssText, t.appendChild(s);
|
|
42
|
+
}
|
|
43
|
+
}, Hr = Sr ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((e) => {
|
|
44
|
+
let r = "";
|
|
45
|
+
for (const s of e.cssRules) r += s.cssText;
|
|
46
|
+
return en(r);
|
|
47
|
+
})(t) : t;
|
|
48
|
+
/**
|
|
49
|
+
* @license
|
|
50
|
+
* Copyright 2017 Google LLC
|
|
51
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
52
|
+
*/
|
|
53
|
+
const { is: sn, defineProperty: nn, getOwnPropertyDescriptor: an, getOwnPropertyNames: on, getOwnPropertySymbols: hn, getPrototypeOf: cn } = Object, rt = globalThis, zr = rt.trustedTypes, ln = zr ? zr.emptyScript : "", Xe = rt.reactiveElementPolyfillSupport, zt = (t, e) => t, De = { toAttribute(t, e) {
|
|
54
|
+
switch (e) {
|
|
55
|
+
case Boolean:
|
|
56
|
+
t = t ? ln : null;
|
|
57
|
+
break;
|
|
58
|
+
case Object:
|
|
59
|
+
case Array:
|
|
60
|
+
t = t == null ? t : JSON.stringify(t);
|
|
61
|
+
}
|
|
62
|
+
return t;
|
|
63
|
+
}, fromAttribute(t, e) {
|
|
64
|
+
let r = t;
|
|
65
|
+
switch (e) {
|
|
66
|
+
case Boolean:
|
|
67
|
+
r = t !== null;
|
|
68
|
+
break;
|
|
69
|
+
case Number:
|
|
70
|
+
r = t === null ? null : Number(t);
|
|
71
|
+
break;
|
|
72
|
+
case Object:
|
|
73
|
+
case Array:
|
|
74
|
+
try {
|
|
75
|
+
r = JSON.parse(t);
|
|
76
|
+
} catch {
|
|
77
|
+
r = null;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return r;
|
|
81
|
+
} }, Pr = (t, e) => !sn(t, e), Vr = { attribute: !0, type: String, converter: De, reflect: !1, useDefault: !1, hasChanged: Pr };
|
|
82
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), rt.litPropertyMetadata ?? (rt.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
83
|
+
let _t = class extends HTMLElement {
|
|
84
|
+
static addInitializer(e) {
|
|
85
|
+
this._$Ei(), (this.l ?? (this.l = [])).push(e);
|
|
86
|
+
}
|
|
87
|
+
static get observedAttributes() {
|
|
88
|
+
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
89
|
+
}
|
|
90
|
+
static createProperty(e, r = Vr) {
|
|
91
|
+
if (r.state && (r.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((r = Object.create(r)).wrapped = !0), this.elementProperties.set(e, r), !r.noAccessor) {
|
|
92
|
+
const s = Symbol(), n = this.getPropertyDescriptor(e, s, r);
|
|
93
|
+
n !== void 0 && nn(this.prototype, e, n);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
static getPropertyDescriptor(e, r, s) {
|
|
97
|
+
const { get: n, set: i } = an(this.prototype, e) ?? { get() {
|
|
98
|
+
return this[r];
|
|
99
|
+
}, set(a) {
|
|
100
|
+
this[r] = a;
|
|
101
|
+
} };
|
|
102
|
+
return { get: n, set(a) {
|
|
103
|
+
const h = n == null ? void 0 : n.call(this);
|
|
104
|
+
i == null || i.call(this, a), this.requestUpdate(e, h, s);
|
|
105
|
+
}, configurable: !0, enumerable: !0 };
|
|
106
|
+
}
|
|
107
|
+
static getPropertyOptions(e) {
|
|
108
|
+
return this.elementProperties.get(e) ?? Vr;
|
|
109
|
+
}
|
|
110
|
+
static _$Ei() {
|
|
111
|
+
if (this.hasOwnProperty(zt("elementProperties"))) return;
|
|
112
|
+
const e = cn(this);
|
|
113
|
+
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
|
|
114
|
+
}
|
|
115
|
+
static finalize() {
|
|
116
|
+
if (this.hasOwnProperty(zt("finalized"))) return;
|
|
117
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(zt("properties"))) {
|
|
118
|
+
const r = this.properties, s = [...on(r), ...hn(r)];
|
|
119
|
+
for (const n of s) this.createProperty(n, r[n]);
|
|
120
|
+
}
|
|
121
|
+
const e = this[Symbol.metadata];
|
|
122
|
+
if (e !== null) {
|
|
123
|
+
const r = litPropertyMetadata.get(e);
|
|
124
|
+
if (r !== void 0) for (const [s, n] of r) this.elementProperties.set(s, n);
|
|
125
|
+
}
|
|
126
|
+
this._$Eh = /* @__PURE__ */ new Map();
|
|
127
|
+
for (const [r, s] of this.elementProperties) {
|
|
128
|
+
const n = this._$Eu(r, s);
|
|
129
|
+
n !== void 0 && this._$Eh.set(n, r);
|
|
130
|
+
}
|
|
131
|
+
this.elementStyles = this.finalizeStyles(this.styles);
|
|
132
|
+
}
|
|
133
|
+
static finalizeStyles(e) {
|
|
134
|
+
const r = [];
|
|
135
|
+
if (Array.isArray(e)) {
|
|
136
|
+
const s = new Set(e.flat(1 / 0).reverse());
|
|
137
|
+
for (const n of s) r.unshift(Hr(n));
|
|
138
|
+
} else e !== void 0 && r.push(Hr(e));
|
|
139
|
+
return r;
|
|
140
|
+
}
|
|
141
|
+
static _$Eu(e, r) {
|
|
142
|
+
const s = r.attribute;
|
|
143
|
+
return s === !1 ? void 0 : typeof s == "string" ? s : typeof e == "string" ? e.toLowerCase() : void 0;
|
|
144
|
+
}
|
|
145
|
+
constructor() {
|
|
146
|
+
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
147
|
+
}
|
|
148
|
+
_$Ev() {
|
|
149
|
+
var e;
|
|
150
|
+
this._$ES = new Promise((r) => this.enableUpdating = r), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (e = this.constructor.l) == null || e.forEach((r) => r(this));
|
|
151
|
+
}
|
|
152
|
+
addController(e) {
|
|
153
|
+
var r;
|
|
154
|
+
(this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(e), this.renderRoot !== void 0 && this.isConnected && ((r = e.hostConnected) == null || r.call(e));
|
|
155
|
+
}
|
|
156
|
+
removeController(e) {
|
|
157
|
+
var r;
|
|
158
|
+
(r = this._$EO) == null || r.delete(e);
|
|
159
|
+
}
|
|
160
|
+
_$E_() {
|
|
161
|
+
const e = /* @__PURE__ */ new Map(), r = this.constructor.elementProperties;
|
|
162
|
+
for (const s of r.keys()) this.hasOwnProperty(s) && (e.set(s, this[s]), delete this[s]);
|
|
163
|
+
e.size > 0 && (this._$Ep = e);
|
|
164
|
+
}
|
|
165
|
+
createRenderRoot() {
|
|
166
|
+
const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
167
|
+
return rn(e, this.constructor.elementStyles), e;
|
|
168
|
+
}
|
|
169
|
+
connectedCallback() {
|
|
170
|
+
var e;
|
|
171
|
+
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$EO) == null || e.forEach((r) => {
|
|
172
|
+
var s;
|
|
173
|
+
return (s = r.hostConnected) == null ? void 0 : s.call(r);
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
enableUpdating(e) {
|
|
177
|
+
}
|
|
178
|
+
disconnectedCallback() {
|
|
179
|
+
var e;
|
|
180
|
+
(e = this._$EO) == null || e.forEach((r) => {
|
|
181
|
+
var s;
|
|
182
|
+
return (s = r.hostDisconnected) == null ? void 0 : s.call(r);
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
attributeChangedCallback(e, r, s) {
|
|
186
|
+
this._$AK(e, s);
|
|
187
|
+
}
|
|
188
|
+
_$ET(e, r) {
|
|
189
|
+
var i;
|
|
190
|
+
const s = this.constructor.elementProperties.get(e), n = this.constructor._$Eu(e, s);
|
|
191
|
+
if (n !== void 0 && s.reflect === !0) {
|
|
192
|
+
const a = (((i = s.converter) == null ? void 0 : i.toAttribute) !== void 0 ? s.converter : De).toAttribute(r, s.type);
|
|
193
|
+
this._$Em = e, a == null ? this.removeAttribute(n) : this.setAttribute(n, a), this._$Em = null;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
_$AK(e, r) {
|
|
197
|
+
var i, a;
|
|
198
|
+
const s = this.constructor, n = s._$Eh.get(e);
|
|
199
|
+
if (n !== void 0 && this._$Em !== n) {
|
|
200
|
+
const h = s.getPropertyOptions(n), o = typeof h.converter == "function" ? { fromAttribute: h.converter } : ((i = h.converter) == null ? void 0 : i.fromAttribute) !== void 0 ? h.converter : De;
|
|
201
|
+
this._$Em = n;
|
|
202
|
+
const f = o.fromAttribute(r, h.type);
|
|
203
|
+
this[n] = f ?? ((a = this._$Ej) == null ? void 0 : a.get(n)) ?? f, this._$Em = null;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
requestUpdate(e, r, s) {
|
|
207
|
+
var n;
|
|
208
|
+
if (e !== void 0) {
|
|
209
|
+
const i = this.constructor, a = this[e];
|
|
210
|
+
if (s ?? (s = i.getPropertyOptions(e)), !((s.hasChanged ?? Pr)(a, r) || s.useDefault && s.reflect && a === ((n = this._$Ej) == null ? void 0 : n.get(e)) && !this.hasAttribute(i._$Eu(e, s)))) return;
|
|
211
|
+
this.C(e, r, s);
|
|
212
|
+
}
|
|
213
|
+
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
214
|
+
}
|
|
215
|
+
C(e, r, { useDefault: s, reflect: n, wrapped: i }, a) {
|
|
216
|
+
s && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(e) && (this._$Ej.set(e, a ?? r ?? this[e]), i !== !0 || a !== void 0) || (this._$AL.has(e) || (this.hasUpdated || s || (r = void 0), this._$AL.set(e, r)), n === !0 && this._$Em !== e && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(e));
|
|
217
|
+
}
|
|
218
|
+
async _$EP() {
|
|
219
|
+
this.isUpdatePending = !0;
|
|
220
|
+
try {
|
|
221
|
+
await this._$ES;
|
|
222
|
+
} catch (r) {
|
|
223
|
+
Promise.reject(r);
|
|
224
|
+
}
|
|
225
|
+
const e = this.scheduleUpdate();
|
|
226
|
+
return e != null && await e, !this.isUpdatePending;
|
|
227
|
+
}
|
|
228
|
+
scheduleUpdate() {
|
|
229
|
+
return this.performUpdate();
|
|
230
|
+
}
|
|
231
|
+
performUpdate() {
|
|
232
|
+
var s;
|
|
233
|
+
if (!this.isUpdatePending) return;
|
|
234
|
+
if (!this.hasUpdated) {
|
|
235
|
+
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
|
236
|
+
for (const [i, a] of this._$Ep) this[i] = a;
|
|
237
|
+
this._$Ep = void 0;
|
|
238
|
+
}
|
|
239
|
+
const n = this.constructor.elementProperties;
|
|
240
|
+
if (n.size > 0) for (const [i, a] of n) {
|
|
241
|
+
const { wrapped: h } = a, o = this[i];
|
|
242
|
+
h !== !0 || this._$AL.has(i) || o === void 0 || this.C(i, void 0, a, o);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
let e = !1;
|
|
246
|
+
const r = this._$AL;
|
|
247
|
+
try {
|
|
248
|
+
e = this.shouldUpdate(r), e ? (this.willUpdate(r), (s = this._$EO) == null || s.forEach((n) => {
|
|
249
|
+
var i;
|
|
250
|
+
return (i = n.hostUpdate) == null ? void 0 : i.call(n);
|
|
251
|
+
}), this.update(r)) : this._$EM();
|
|
252
|
+
} catch (n) {
|
|
253
|
+
throw e = !1, this._$EM(), n;
|
|
254
|
+
}
|
|
255
|
+
e && this._$AE(r);
|
|
256
|
+
}
|
|
257
|
+
willUpdate(e) {
|
|
258
|
+
}
|
|
259
|
+
_$AE(e) {
|
|
260
|
+
var r;
|
|
261
|
+
(r = this._$EO) == null || r.forEach((s) => {
|
|
262
|
+
var n;
|
|
263
|
+
return (n = s.hostUpdated) == null ? void 0 : n.call(s);
|
|
264
|
+
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
|
|
265
|
+
}
|
|
266
|
+
_$EM() {
|
|
267
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
268
|
+
}
|
|
269
|
+
get updateComplete() {
|
|
270
|
+
return this.getUpdateComplete();
|
|
271
|
+
}
|
|
272
|
+
getUpdateComplete() {
|
|
273
|
+
return this._$ES;
|
|
274
|
+
}
|
|
275
|
+
shouldUpdate(e) {
|
|
276
|
+
return !0;
|
|
277
|
+
}
|
|
278
|
+
update(e) {
|
|
279
|
+
this._$Eq && (this._$Eq = this._$Eq.forEach((r) => this._$ET(r, this[r]))), this._$EM();
|
|
280
|
+
}
|
|
281
|
+
updated(e) {
|
|
282
|
+
}
|
|
283
|
+
firstUpdated(e) {
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
_t.elementStyles = [], _t.shadowRootOptions = { mode: "open" }, _t[zt("elementProperties")] = /* @__PURE__ */ new Map(), _t[zt("finalized")] = /* @__PURE__ */ new Map(), Xe == null || Xe({ ReactiveElement: _t }), (rt.reactiveElementVersions ?? (rt.reactiveElementVersions = [])).push("2.1.1");
|
|
287
|
+
/**
|
|
288
|
+
* @license
|
|
289
|
+
* Copyright 2017 Google LLC
|
|
290
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
291
|
+
*/
|
|
292
|
+
const Vt = globalThis, Me = Vt.trustedTypes, Br = Me ? Me.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, gs = "$lit$", et = `lit$${Math.random().toFixed(9).slice(2)}$`, _s = "?" + et, un = `<${_s}>`, ft = document, Yt = () => ft.createComment(""), Ft = (t) => t === null || typeof t != "object" && typeof t != "function", kr = Array.isArray, dn = (t) => kr(t) || typeof (t == null ? void 0 : t[Symbol.iterator]) == "function", tr = `[
|
|
293
|
+
\f\r]`, xt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Gr = /-->/g, qr = />/g, at = RegExp(`>|${tr}(?:([^\\s"'>=/]+)(${tr}*=${tr}*(?:[^
|
|
294
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Yr = /'/g, Fr = /"/g, ys = /^(?:script|style|textarea|title)$/i, pn = (t) => (e, ...r) => ({ _$litType$: t, strings: e, values: r }), Je = pn(1), St = Symbol.for("lit-noChange"), P = Symbol.for("lit-nothing"), Jr = /* @__PURE__ */ new WeakMap(), lt = ft.createTreeWalker(ft, 129);
|
|
295
|
+
function ms(t, e) {
|
|
296
|
+
if (!kr(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
297
|
+
return Br !== void 0 ? Br.createHTML(e) : e;
|
|
298
|
+
}
|
|
299
|
+
const fn = (t, e) => {
|
|
300
|
+
const r = t.length - 1, s = [];
|
|
301
|
+
let n, i = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", a = xt;
|
|
302
|
+
for (let h = 0; h < r; h++) {
|
|
303
|
+
const o = t[h];
|
|
304
|
+
let f, g, u = -1, E = 0;
|
|
305
|
+
for (; E < o.length && (a.lastIndex = E, g = a.exec(o), g !== null); ) E = a.lastIndex, a === xt ? g[1] === "!--" ? a = Gr : g[1] !== void 0 ? a = qr : g[2] !== void 0 ? (ys.test(g[2]) && (n = RegExp("</" + g[2], "g")), a = at) : g[3] !== void 0 && (a = at) : a === at ? g[0] === ">" ? (a = n ?? xt, u = -1) : g[1] === void 0 ? u = -2 : (u = a.lastIndex - g[2].length, f = g[1], a = g[3] === void 0 ? at : g[3] === '"' ? Fr : Yr) : a === Fr || a === Yr ? a = at : a === Gr || a === qr ? a = xt : (a = at, n = void 0);
|
|
306
|
+
const m = a === at && t[h + 1].startsWith("/>") ? " " : "";
|
|
307
|
+
i += a === xt ? o + un : u >= 0 ? (s.push(f), o.slice(0, u) + gs + o.slice(u) + et + m) : o + et + (u === -2 ? h : m);
|
|
308
|
+
}
|
|
309
|
+
return [ms(t, i + (t[r] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), s];
|
|
310
|
+
};
|
|
311
|
+
class Jt {
|
|
312
|
+
constructor({ strings: e, _$litType$: r }, s) {
|
|
313
|
+
let n;
|
|
314
|
+
this.parts = [];
|
|
315
|
+
let i = 0, a = 0;
|
|
316
|
+
const h = e.length - 1, o = this.parts, [f, g] = fn(e, r);
|
|
317
|
+
if (this.el = Jt.createElement(f, s), lt.currentNode = this.el.content, r === 2 || r === 3) {
|
|
318
|
+
const u = this.el.content.firstChild;
|
|
319
|
+
u.replaceWith(...u.childNodes);
|
|
320
|
+
}
|
|
321
|
+
for (; (n = lt.nextNode()) !== null && o.length < h; ) {
|
|
322
|
+
if (n.nodeType === 1) {
|
|
323
|
+
if (n.hasAttributes()) for (const u of n.getAttributeNames()) if (u.endsWith(gs)) {
|
|
324
|
+
const E = g[a++], m = n.getAttribute(u).split(et), N = /([.?@])?(.*)/.exec(E);
|
|
325
|
+
o.push({ type: 1, index: i, name: N[2], strings: m, ctor: N[1] === "." ? gn : N[1] === "?" ? _n : N[1] === "@" ? yn : Ze }), n.removeAttribute(u);
|
|
326
|
+
} else u.startsWith(et) && (o.push({ type: 6, index: i }), n.removeAttribute(u));
|
|
327
|
+
if (ys.test(n.tagName)) {
|
|
328
|
+
const u = n.textContent.split(et), E = u.length - 1;
|
|
329
|
+
if (E > 0) {
|
|
330
|
+
n.textContent = Me ? Me.emptyScript : "";
|
|
331
|
+
for (let m = 0; m < E; m++) n.append(u[m], Yt()), lt.nextNode(), o.push({ type: 2, index: ++i });
|
|
332
|
+
n.append(u[E], Yt());
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
} else if (n.nodeType === 8) if (n.data === _s) o.push({ type: 2, index: i });
|
|
336
|
+
else {
|
|
337
|
+
let u = -1;
|
|
338
|
+
for (; (u = n.data.indexOf(et, u + 1)) !== -1; ) o.push({ type: 7, index: i }), u += et.length - 1;
|
|
339
|
+
}
|
|
340
|
+
i++;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
static createElement(e, r) {
|
|
344
|
+
const s = ft.createElement("template");
|
|
345
|
+
return s.innerHTML = e, s;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
function bt(t, e, r = t, s) {
|
|
349
|
+
var a, h;
|
|
350
|
+
if (e === St) return e;
|
|
351
|
+
let n = s !== void 0 ? (a = r._$Co) == null ? void 0 : a[s] : r._$Cl;
|
|
352
|
+
const i = Ft(e) ? void 0 : e._$litDirective$;
|
|
353
|
+
return (n == null ? void 0 : n.constructor) !== i && ((h = n == null ? void 0 : n._$AO) == null || h.call(n, !1), i === void 0 ? n = void 0 : (n = new i(t), n._$AT(t, r, s)), s !== void 0 ? (r._$Co ?? (r._$Co = []))[s] = n : r._$Cl = n), n !== void 0 && (e = bt(t, n._$AS(t, e.values), n, s)), e;
|
|
354
|
+
}
|
|
355
|
+
class vn {
|
|
356
|
+
constructor(e, r) {
|
|
357
|
+
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = r;
|
|
358
|
+
}
|
|
359
|
+
get parentNode() {
|
|
360
|
+
return this._$AM.parentNode;
|
|
361
|
+
}
|
|
362
|
+
get _$AU() {
|
|
363
|
+
return this._$AM._$AU;
|
|
364
|
+
}
|
|
365
|
+
u(e) {
|
|
366
|
+
const { el: { content: r }, parts: s } = this._$AD, n = ((e == null ? void 0 : e.creationScope) ?? ft).importNode(r, !0);
|
|
367
|
+
lt.currentNode = n;
|
|
368
|
+
let i = lt.nextNode(), a = 0, h = 0, o = s[0];
|
|
369
|
+
for (; o !== void 0; ) {
|
|
370
|
+
if (a === o.index) {
|
|
371
|
+
let f;
|
|
372
|
+
o.type === 2 ? f = new Qt(i, i.nextSibling, this, e) : o.type === 1 ? f = new o.ctor(i, o.name, o.strings, this, e) : o.type === 6 && (f = new mn(i, this, e)), this._$AV.push(f), o = s[++h];
|
|
373
|
+
}
|
|
374
|
+
a !== (o == null ? void 0 : o.index) && (i = lt.nextNode(), a++);
|
|
375
|
+
}
|
|
376
|
+
return lt.currentNode = ft, n;
|
|
377
|
+
}
|
|
378
|
+
p(e) {
|
|
379
|
+
let r = 0;
|
|
380
|
+
for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(e, s, r), r += s.strings.length - 2) : s._$AI(e[r])), r++;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
class Qt {
|
|
384
|
+
get _$AU() {
|
|
385
|
+
var e;
|
|
386
|
+
return ((e = this._$AM) == null ? void 0 : e._$AU) ?? this._$Cv;
|
|
387
|
+
}
|
|
388
|
+
constructor(e, r, s, n) {
|
|
389
|
+
this.type = 2, this._$AH = P, this._$AN = void 0, this._$AA = e, this._$AB = r, this._$AM = s, this.options = n, this._$Cv = (n == null ? void 0 : n.isConnected) ?? !0;
|
|
390
|
+
}
|
|
391
|
+
get parentNode() {
|
|
392
|
+
let e = this._$AA.parentNode;
|
|
393
|
+
const r = this._$AM;
|
|
394
|
+
return r !== void 0 && (e == null ? void 0 : e.nodeType) === 11 && (e = r.parentNode), e;
|
|
395
|
+
}
|
|
396
|
+
get startNode() {
|
|
397
|
+
return this._$AA;
|
|
398
|
+
}
|
|
399
|
+
get endNode() {
|
|
400
|
+
return this._$AB;
|
|
401
|
+
}
|
|
402
|
+
_$AI(e, r = this) {
|
|
403
|
+
e = bt(this, e, r), Ft(e) ? e === P || e == null || e === "" ? (this._$AH !== P && this._$AR(), this._$AH = P) : e !== this._$AH && e !== St && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : dn(e) ? this.k(e) : this._(e);
|
|
404
|
+
}
|
|
405
|
+
O(e) {
|
|
406
|
+
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
407
|
+
}
|
|
408
|
+
T(e) {
|
|
409
|
+
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
|
|
410
|
+
}
|
|
411
|
+
_(e) {
|
|
412
|
+
this._$AH !== P && Ft(this._$AH) ? this._$AA.nextSibling.data = e : this.T(ft.createTextNode(e)), this._$AH = e;
|
|
413
|
+
}
|
|
414
|
+
$(e) {
|
|
415
|
+
var i;
|
|
416
|
+
const { values: r, _$litType$: s } = e, n = typeof s == "number" ? this._$AC(e) : (s.el === void 0 && (s.el = Jt.createElement(ms(s.h, s.h[0]), this.options)), s);
|
|
417
|
+
if (((i = this._$AH) == null ? void 0 : i._$AD) === n) this._$AH.p(r);
|
|
418
|
+
else {
|
|
419
|
+
const a = new vn(n, this), h = a.u(this.options);
|
|
420
|
+
a.p(r), this.T(h), this._$AH = a;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
_$AC(e) {
|
|
424
|
+
let r = Jr.get(e.strings);
|
|
425
|
+
return r === void 0 && Jr.set(e.strings, r = new Jt(e)), r;
|
|
426
|
+
}
|
|
427
|
+
k(e) {
|
|
428
|
+
kr(this._$AH) || (this._$AH = [], this._$AR());
|
|
429
|
+
const r = this._$AH;
|
|
430
|
+
let s, n = 0;
|
|
431
|
+
for (const i of e) n === r.length ? r.push(s = new Qt(this.O(Yt()), this.O(Yt()), this, this.options)) : s = r[n], s._$AI(i), n++;
|
|
432
|
+
n < r.length && (this._$AR(s && s._$AB.nextSibling, n), r.length = n);
|
|
433
|
+
}
|
|
434
|
+
_$AR(e = this._$AA.nextSibling, r) {
|
|
435
|
+
var s;
|
|
436
|
+
for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, r); e !== this._$AB; ) {
|
|
437
|
+
const n = e.nextSibling;
|
|
438
|
+
e.remove(), e = n;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
setConnected(e) {
|
|
442
|
+
var r;
|
|
443
|
+
this._$AM === void 0 && (this._$Cv = e, (r = this._$AP) == null || r.call(this, e));
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
class Ze {
|
|
447
|
+
get tagName() {
|
|
448
|
+
return this.element.tagName;
|
|
449
|
+
}
|
|
450
|
+
get _$AU() {
|
|
451
|
+
return this._$AM._$AU;
|
|
452
|
+
}
|
|
453
|
+
constructor(e, r, s, n, i) {
|
|
454
|
+
this.type = 1, this._$AH = P, this._$AN = void 0, this.element = e, this.name = r, this._$AM = n, this.options = i, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = P;
|
|
455
|
+
}
|
|
456
|
+
_$AI(e, r = this, s, n) {
|
|
457
|
+
const i = this.strings;
|
|
458
|
+
let a = !1;
|
|
459
|
+
if (i === void 0) e = bt(this, e, r, 0), a = !Ft(e) || e !== this._$AH && e !== St, a && (this._$AH = e);
|
|
460
|
+
else {
|
|
461
|
+
const h = e;
|
|
462
|
+
let o, f;
|
|
463
|
+
for (e = i[0], o = 0; o < i.length - 1; o++) f = bt(this, h[s + o], r, o), f === St && (f = this._$AH[o]), a || (a = !Ft(f) || f !== this._$AH[o]), f === P ? e = P : e !== P && (e += (f ?? "") + i[o + 1]), this._$AH[o] = f;
|
|
464
|
+
}
|
|
465
|
+
a && !n && this.j(e);
|
|
466
|
+
}
|
|
467
|
+
j(e) {
|
|
468
|
+
e === P ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
class gn extends Ze {
|
|
472
|
+
constructor() {
|
|
473
|
+
super(...arguments), this.type = 3;
|
|
474
|
+
}
|
|
475
|
+
j(e) {
|
|
476
|
+
this.element[this.name] = e === P ? void 0 : e;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
class _n extends Ze {
|
|
480
|
+
constructor() {
|
|
481
|
+
super(...arguments), this.type = 4;
|
|
482
|
+
}
|
|
483
|
+
j(e) {
|
|
484
|
+
this.element.toggleAttribute(this.name, !!e && e !== P);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
class yn extends Ze {
|
|
488
|
+
constructor(e, r, s, n, i) {
|
|
489
|
+
super(e, r, s, n, i), this.type = 5;
|
|
490
|
+
}
|
|
491
|
+
_$AI(e, r = this) {
|
|
492
|
+
if ((e = bt(this, e, r, 0) ?? P) === St) return;
|
|
493
|
+
const s = this._$AH, n = e === P && s !== P || e.capture !== s.capture || e.once !== s.once || e.passive !== s.passive, i = e !== P && (s === P || n);
|
|
494
|
+
n && this.element.removeEventListener(this.name, this, s), i && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
495
|
+
}
|
|
496
|
+
handleEvent(e) {
|
|
497
|
+
var r;
|
|
498
|
+
typeof this._$AH == "function" ? this._$AH.call(((r = this.options) == null ? void 0 : r.host) ?? this.element, e) : this._$AH.handleEvent(e);
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
class mn {
|
|
502
|
+
constructor(e, r, s) {
|
|
503
|
+
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = r, this.options = s;
|
|
504
|
+
}
|
|
505
|
+
get _$AU() {
|
|
506
|
+
return this._$AM._$AU;
|
|
507
|
+
}
|
|
508
|
+
_$AI(e) {
|
|
509
|
+
bt(this, e);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
const er = Vt.litHtmlPolyfillSupport;
|
|
513
|
+
er == null || er(Jt, Qt), (Vt.litHtmlVersions ?? (Vt.litHtmlVersions = [])).push("3.3.1");
|
|
514
|
+
const $n = (t, e, r) => {
|
|
515
|
+
const s = (r == null ? void 0 : r.renderBefore) ?? e;
|
|
516
|
+
let n = s._$litPart$;
|
|
517
|
+
if (n === void 0) {
|
|
518
|
+
const i = (r == null ? void 0 : r.renderBefore) ?? null;
|
|
519
|
+
s._$litPart$ = n = new Qt(e.insertBefore(Yt(), i), i, void 0, r ?? {});
|
|
520
|
+
}
|
|
521
|
+
return n._$AI(t), n;
|
|
522
|
+
};
|
|
523
|
+
/**
|
|
524
|
+
* @license
|
|
525
|
+
* Copyright 2017 Google LLC
|
|
526
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
527
|
+
*/
|
|
528
|
+
const ut = globalThis;
|
|
529
|
+
let Z = class extends _t {
|
|
530
|
+
constructor() {
|
|
531
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
532
|
+
}
|
|
533
|
+
createRenderRoot() {
|
|
534
|
+
var r;
|
|
535
|
+
const e = super.createRenderRoot();
|
|
536
|
+
return (r = this.renderOptions).renderBefore ?? (r.renderBefore = e.firstChild), e;
|
|
537
|
+
}
|
|
538
|
+
update(e) {
|
|
539
|
+
const r = this.render();
|
|
540
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = $n(r, this.renderRoot, this.renderOptions);
|
|
541
|
+
}
|
|
542
|
+
connectedCallback() {
|
|
543
|
+
var e;
|
|
544
|
+
super.connectedCallback(), (e = this._$Do) == null || e.setConnected(!0);
|
|
545
|
+
}
|
|
546
|
+
disconnectedCallback() {
|
|
547
|
+
var e;
|
|
548
|
+
super.disconnectedCallback(), (e = this._$Do) == null || e.setConnected(!1);
|
|
549
|
+
}
|
|
550
|
+
render() {
|
|
551
|
+
return St;
|
|
552
|
+
}
|
|
553
|
+
};
|
|
554
|
+
var fs;
|
|
555
|
+
Z._$litElement$ = !0, Z.finalized = !0, (fs = ut.litElementHydrateSupport) == null || fs.call(ut, { LitElement: Z });
|
|
556
|
+
const rr = ut.litElementPolyfillSupport;
|
|
557
|
+
rr == null || rr({ LitElement: Z });
|
|
558
|
+
(ut.litElementVersions ?? (ut.litElementVersions = [])).push("4.2.1");
|
|
559
|
+
/**
|
|
560
|
+
* @license
|
|
561
|
+
* Copyright 2017 Google LLC
|
|
562
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
563
|
+
*/
|
|
564
|
+
const Q = (t) => (e, r) => {
|
|
565
|
+
r !== void 0 ? r.addInitializer(() => {
|
|
566
|
+
customElements.define(t, e);
|
|
567
|
+
}) : customElements.define(t, e);
|
|
568
|
+
};
|
|
569
|
+
/**
|
|
570
|
+
* @license
|
|
571
|
+
* Copyright 2017 Google LLC
|
|
572
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
573
|
+
*/
|
|
574
|
+
const wn = { attribute: !0, type: String, converter: De, reflect: !1, hasChanged: Pr }, En = (t = wn, e, r) => {
|
|
575
|
+
const { kind: s, metadata: n } = r;
|
|
576
|
+
let i = globalThis.litPropertyMetadata.get(n);
|
|
577
|
+
if (i === void 0 && globalThis.litPropertyMetadata.set(n, i = /* @__PURE__ */ new Map()), s === "setter" && ((t = Object.create(t)).wrapped = !0), i.set(r.name, t), s === "accessor") {
|
|
578
|
+
const { name: a } = r;
|
|
579
|
+
return { set(h) {
|
|
580
|
+
const o = e.get.call(this);
|
|
581
|
+
e.set.call(this, h), this.requestUpdate(a, o, t);
|
|
582
|
+
}, init(h) {
|
|
583
|
+
return h !== void 0 && this.C(a, void 0, t, h), h;
|
|
584
|
+
} };
|
|
585
|
+
}
|
|
586
|
+
if (s === "setter") {
|
|
587
|
+
const { name: a } = r;
|
|
588
|
+
return function(h) {
|
|
589
|
+
const o = this[a];
|
|
590
|
+
e.call(this, h), this.requestUpdate(a, o, t);
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
throw Error("Unsupported decorator location: " + s);
|
|
594
|
+
};
|
|
595
|
+
function C(t) {
|
|
596
|
+
return (e, r) => typeof r == "object" ? En(t, e, r) : ((s, n, i) => {
|
|
597
|
+
const a = n.hasOwnProperty(i);
|
|
598
|
+
return n.constructor.createProperty(i, s), a ? Object.getOwnPropertyDescriptor(n, i) : void 0;
|
|
599
|
+
})(t, e, r);
|
|
600
|
+
}
|
|
601
|
+
/**
|
|
602
|
+
* @license
|
|
603
|
+
* Copyright 2017 Google LLC
|
|
604
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
605
|
+
*/
|
|
606
|
+
function An(t) {
|
|
607
|
+
return C({ ...t, state: !0, attribute: !1 });
|
|
608
|
+
}
|
|
609
|
+
var Cn = Object.defineProperty, Sn = (t, e, r) => e in t ? Cn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, sr = (t, e, r) => (Sn(t, typeof e != "symbol" ? e + "" : e, r), r), bn = (t, e, r) => {
|
|
610
|
+
if (!e.has(t))
|
|
611
|
+
throw TypeError("Cannot " + r);
|
|
612
|
+
}, nr = (t, e) => {
|
|
613
|
+
if (Object(e) !== e)
|
|
614
|
+
throw TypeError('Cannot use the "in" operator on this value');
|
|
615
|
+
return t.has(e);
|
|
616
|
+
}, ee = (t, e, r) => {
|
|
617
|
+
if (e.has(t))
|
|
618
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
619
|
+
e instanceof WeakSet ? e.add(t) : e.set(t, r);
|
|
620
|
+
}, Zr = (t, e, r) => (bn(t, e, "access private method"), r);
|
|
621
|
+
/**
|
|
622
|
+
* @license
|
|
623
|
+
* Copyright Google LLC All Rights Reserved.
|
|
624
|
+
*
|
|
625
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
626
|
+
* found in the LICENSE file at https://angular.io/license
|
|
627
|
+
*/
|
|
628
|
+
function $s(t, e) {
|
|
629
|
+
return Object.is(t, e);
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
* @license
|
|
633
|
+
* Copyright Google LLC All Rights Reserved.
|
|
634
|
+
*
|
|
635
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
636
|
+
* found in the LICENSE file at https://angular.io/license
|
|
637
|
+
*/
|
|
638
|
+
let S = null, Bt = !1, se = 1;
|
|
639
|
+
const We = /* @__PURE__ */ Symbol("SIGNAL");
|
|
640
|
+
function wt(t) {
|
|
641
|
+
const e = S;
|
|
642
|
+
return S = t, e;
|
|
643
|
+
}
|
|
644
|
+
function Pn() {
|
|
645
|
+
return S;
|
|
646
|
+
}
|
|
647
|
+
function kn() {
|
|
648
|
+
return Bt;
|
|
649
|
+
}
|
|
650
|
+
const Or = {
|
|
651
|
+
version: 0,
|
|
652
|
+
lastCleanEpoch: 0,
|
|
653
|
+
dirty: !1,
|
|
654
|
+
producerNode: void 0,
|
|
655
|
+
producerLastReadVersion: void 0,
|
|
656
|
+
producerIndexOfThis: void 0,
|
|
657
|
+
nextProducerIndex: 0,
|
|
658
|
+
liveConsumerNode: void 0,
|
|
659
|
+
liveConsumerIndexOfThis: void 0,
|
|
660
|
+
consumerAllowSignalWrites: !1,
|
|
661
|
+
consumerIsAlwaysLive: !1,
|
|
662
|
+
producerMustRecompute: () => !1,
|
|
663
|
+
producerRecomputeValue: () => {
|
|
664
|
+
},
|
|
665
|
+
consumerMarkedDirty: () => {
|
|
666
|
+
},
|
|
667
|
+
consumerOnSignalRead: () => {
|
|
668
|
+
}
|
|
669
|
+
};
|
|
670
|
+
function Ke(t) {
|
|
671
|
+
if (Bt)
|
|
672
|
+
throw new Error(
|
|
673
|
+
typeof ngDevMode < "u" && ngDevMode ? "Assertion error: signal read during notification phase" : ""
|
|
674
|
+
);
|
|
675
|
+
if (S === null)
|
|
676
|
+
return;
|
|
677
|
+
S.consumerOnSignalRead(t);
|
|
678
|
+
const e = S.nextProducerIndex++;
|
|
679
|
+
if (Pt(S), e < S.producerNode.length && S.producerNode[e] !== t && pr(S)) {
|
|
680
|
+
const r = S.producerNode[e];
|
|
681
|
+
Qe(r, S.producerIndexOfThis[e]);
|
|
682
|
+
}
|
|
683
|
+
S.producerNode[e] !== t && (S.producerNode[e] = t, S.producerIndexOfThis[e] = pr(S) ? As(t, S, e) : 0), S.producerLastReadVersion[e] = t.version;
|
|
684
|
+
}
|
|
685
|
+
function On() {
|
|
686
|
+
se++;
|
|
687
|
+
}
|
|
688
|
+
function ws(t) {
|
|
689
|
+
if (!(!t.dirty && t.lastCleanEpoch === se)) {
|
|
690
|
+
if (!t.producerMustRecompute(t) && !Dn(t)) {
|
|
691
|
+
t.dirty = !1, t.lastCleanEpoch = se;
|
|
692
|
+
return;
|
|
693
|
+
}
|
|
694
|
+
t.producerRecomputeValue(t), t.dirty = !1, t.lastCleanEpoch = se;
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
function Es(t) {
|
|
698
|
+
if (t.liveConsumerNode === void 0)
|
|
699
|
+
return;
|
|
700
|
+
const e = Bt;
|
|
701
|
+
Bt = !0;
|
|
702
|
+
try {
|
|
703
|
+
for (const r of t.liveConsumerNode)
|
|
704
|
+
r.dirty || xn(r);
|
|
705
|
+
} finally {
|
|
706
|
+
Bt = e;
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
function Tn() {
|
|
710
|
+
return (S == null ? void 0 : S.consumerAllowSignalWrites) !== !1;
|
|
711
|
+
}
|
|
712
|
+
function xn(t) {
|
|
713
|
+
var e;
|
|
714
|
+
t.dirty = !0, Es(t), (e = t.consumerMarkedDirty) == null || e.call(t.wrapper ?? t);
|
|
715
|
+
}
|
|
716
|
+
function Nn(t) {
|
|
717
|
+
return t && (t.nextProducerIndex = 0), wt(t);
|
|
718
|
+
}
|
|
719
|
+
function Rn(t, e) {
|
|
720
|
+
if (wt(e), !(!t || t.producerNode === void 0 || t.producerIndexOfThis === void 0 || t.producerLastReadVersion === void 0)) {
|
|
721
|
+
if (pr(t))
|
|
722
|
+
for (let r = t.nextProducerIndex; r < t.producerNode.length; r++)
|
|
723
|
+
Qe(t.producerNode[r], t.producerIndexOfThis[r]);
|
|
724
|
+
for (; t.producerNode.length > t.nextProducerIndex; )
|
|
725
|
+
t.producerNode.pop(), t.producerLastReadVersion.pop(), t.producerIndexOfThis.pop();
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
function Dn(t) {
|
|
729
|
+
Pt(t);
|
|
730
|
+
for (let e = 0; e < t.producerNode.length; e++) {
|
|
731
|
+
const r = t.producerNode[e], s = t.producerLastReadVersion[e];
|
|
732
|
+
if (s !== r.version || (ws(r), s !== r.version))
|
|
733
|
+
return !0;
|
|
734
|
+
}
|
|
735
|
+
return !1;
|
|
736
|
+
}
|
|
737
|
+
function As(t, e, r) {
|
|
738
|
+
var s;
|
|
739
|
+
if (Tr(t), Pt(t), t.liveConsumerNode.length === 0) {
|
|
740
|
+
(s = t.watched) == null || s.call(t.wrapper);
|
|
741
|
+
for (let n = 0; n < t.producerNode.length; n++)
|
|
742
|
+
t.producerIndexOfThis[n] = As(t.producerNode[n], t, n);
|
|
743
|
+
}
|
|
744
|
+
return t.liveConsumerIndexOfThis.push(r), t.liveConsumerNode.push(e) - 1;
|
|
745
|
+
}
|
|
746
|
+
function Qe(t, e) {
|
|
747
|
+
var r;
|
|
748
|
+
if (Tr(t), Pt(t), typeof ngDevMode < "u" && ngDevMode && e >= t.liveConsumerNode.length)
|
|
749
|
+
throw new Error(
|
|
750
|
+
`Assertion error: active consumer index ${e} is out of bounds of ${t.liveConsumerNode.length} consumers)`
|
|
751
|
+
);
|
|
752
|
+
if (t.liveConsumerNode.length === 1) {
|
|
753
|
+
(r = t.unwatched) == null || r.call(t.wrapper);
|
|
754
|
+
for (let n = 0; n < t.producerNode.length; n++)
|
|
755
|
+
Qe(t.producerNode[n], t.producerIndexOfThis[n]);
|
|
756
|
+
}
|
|
757
|
+
const s = t.liveConsumerNode.length - 1;
|
|
758
|
+
if (t.liveConsumerNode[e] = t.liveConsumerNode[s], t.liveConsumerIndexOfThis[e] = t.liveConsumerIndexOfThis[s], t.liveConsumerNode.length--, t.liveConsumerIndexOfThis.length--, e < t.liveConsumerNode.length) {
|
|
759
|
+
const n = t.liveConsumerIndexOfThis[e], i = t.liveConsumerNode[e];
|
|
760
|
+
Pt(i), i.producerIndexOfThis[n] = e;
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
function pr(t) {
|
|
764
|
+
var e;
|
|
765
|
+
return t.consumerIsAlwaysLive || (((e = t == null ? void 0 : t.liveConsumerNode) == null ? void 0 : e.length) ?? 0) > 0;
|
|
766
|
+
}
|
|
767
|
+
function Pt(t) {
|
|
768
|
+
t.producerNode ?? (t.producerNode = []), t.producerIndexOfThis ?? (t.producerIndexOfThis = []), t.producerLastReadVersion ?? (t.producerLastReadVersion = []);
|
|
769
|
+
}
|
|
770
|
+
function Tr(t) {
|
|
771
|
+
t.liveConsumerNode ?? (t.liveConsumerNode = []), t.liveConsumerIndexOfThis ?? (t.liveConsumerIndexOfThis = []);
|
|
772
|
+
}
|
|
773
|
+
/**
|
|
774
|
+
* @license
|
|
775
|
+
* Copyright Google LLC All Rights Reserved.
|
|
776
|
+
*
|
|
777
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
778
|
+
* found in the LICENSE file at https://angular.io/license
|
|
779
|
+
*/
|
|
780
|
+
function Cs(t) {
|
|
781
|
+
if (ws(t), Ke(t), t.value === fr)
|
|
782
|
+
throw t.error;
|
|
783
|
+
return t.value;
|
|
784
|
+
}
|
|
785
|
+
function Mn(t) {
|
|
786
|
+
const e = Object.create(Wn);
|
|
787
|
+
e.computation = t;
|
|
788
|
+
const r = () => Cs(e);
|
|
789
|
+
return r[We] = e, r;
|
|
790
|
+
}
|
|
791
|
+
const ir = /* @__PURE__ */ Symbol("UNSET"), ar = /* @__PURE__ */ Symbol("COMPUTING"), fr = /* @__PURE__ */ Symbol("ERRORED"), Wn = {
|
|
792
|
+
...Or,
|
|
793
|
+
value: ir,
|
|
794
|
+
dirty: !0,
|
|
795
|
+
error: null,
|
|
796
|
+
equal: $s,
|
|
797
|
+
producerMustRecompute(t) {
|
|
798
|
+
return t.value === ir || t.value === ar;
|
|
799
|
+
},
|
|
800
|
+
producerRecomputeValue(t) {
|
|
801
|
+
if (t.value === ar)
|
|
802
|
+
throw new Error("Detected cycle in computations.");
|
|
803
|
+
const e = t.value;
|
|
804
|
+
t.value = ar;
|
|
805
|
+
const r = Nn(t);
|
|
806
|
+
let s, n = !1;
|
|
807
|
+
try {
|
|
808
|
+
s = t.computation.call(t.wrapper), n = e !== ir && e !== fr && t.equal.call(t.wrapper, e, s);
|
|
809
|
+
} catch (i) {
|
|
810
|
+
s = fr, t.error = i;
|
|
811
|
+
} finally {
|
|
812
|
+
Rn(t, r);
|
|
813
|
+
}
|
|
814
|
+
if (n) {
|
|
815
|
+
t.value = e;
|
|
816
|
+
return;
|
|
817
|
+
}
|
|
818
|
+
t.value = s, t.version++;
|
|
819
|
+
}
|
|
820
|
+
};
|
|
821
|
+
/**
|
|
822
|
+
* @license
|
|
823
|
+
* Copyright Google LLC All Rights Reserved.
|
|
824
|
+
*
|
|
825
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
826
|
+
* found in the LICENSE file at https://angular.io/license
|
|
827
|
+
*/
|
|
828
|
+
function Ln() {
|
|
829
|
+
throw new Error();
|
|
830
|
+
}
|
|
831
|
+
let In = Ln;
|
|
832
|
+
function Un() {
|
|
833
|
+
In();
|
|
834
|
+
}
|
|
835
|
+
/**
|
|
836
|
+
* @license
|
|
837
|
+
* Copyright Google LLC All Rights Reserved.
|
|
838
|
+
*
|
|
839
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
840
|
+
* found in the LICENSE file at https://angular.io/license
|
|
841
|
+
*/
|
|
842
|
+
function Hn(t) {
|
|
843
|
+
const e = Object.create(Bn);
|
|
844
|
+
e.value = t;
|
|
845
|
+
const r = () => (Ke(e), e.value);
|
|
846
|
+
return r[We] = e, r;
|
|
847
|
+
}
|
|
848
|
+
function zn() {
|
|
849
|
+
return Ke(this), this.value;
|
|
850
|
+
}
|
|
851
|
+
function Vn(t, e) {
|
|
852
|
+
Tn() || Un(), t.equal.call(t.wrapper, t.value, e) || (t.value = e, Gn(t));
|
|
853
|
+
}
|
|
854
|
+
const Bn = {
|
|
855
|
+
...Or,
|
|
856
|
+
equal: $s,
|
|
857
|
+
value: void 0
|
|
858
|
+
};
|
|
859
|
+
function Gn(t) {
|
|
860
|
+
t.version++, On(), Es(t);
|
|
861
|
+
}
|
|
862
|
+
/**
|
|
863
|
+
* @license
|
|
864
|
+
* Copyright 2024 Bloomberg Finance L.P.
|
|
865
|
+
*
|
|
866
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
867
|
+
* you may not use this file except in compliance with the License.
|
|
868
|
+
* You may obtain a copy of the License at
|
|
869
|
+
*
|
|
870
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
871
|
+
*
|
|
872
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
873
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
874
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
875
|
+
* See the License for the specific language governing permissions and
|
|
876
|
+
* limitations under the License.
|
|
877
|
+
*/
|
|
878
|
+
const k = Symbol("node");
|
|
879
|
+
var A;
|
|
880
|
+
((t) => {
|
|
881
|
+
var e, r, s, n;
|
|
882
|
+
class i {
|
|
883
|
+
constructor(o, f = {}) {
|
|
884
|
+
ee(this, r), sr(this, e);
|
|
885
|
+
const u = Hn(o)[We];
|
|
886
|
+
if (this[k] = u, u.wrapper = this, f) {
|
|
887
|
+
const E = f.equals;
|
|
888
|
+
E && (u.equal = E), u.watched = f[t.subtle.watched], u.unwatched = f[t.subtle.unwatched];
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
get() {
|
|
892
|
+
if (!(0, t.isState)(this))
|
|
893
|
+
throw new TypeError("Wrong receiver type for Signal.State.prototype.get");
|
|
894
|
+
return zn.call(this[k]);
|
|
895
|
+
}
|
|
896
|
+
set(o) {
|
|
897
|
+
if (!(0, t.isState)(this))
|
|
898
|
+
throw new TypeError("Wrong receiver type for Signal.State.prototype.set");
|
|
899
|
+
if (kn())
|
|
900
|
+
throw new Error("Writes to signals not permitted during Watcher callback");
|
|
901
|
+
const f = this[k];
|
|
902
|
+
Vn(f, o);
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
e = k, r = /* @__PURE__ */ new WeakSet(), t.isState = (h) => typeof h == "object" && nr(r, h), t.State = i;
|
|
906
|
+
class a {
|
|
907
|
+
// Create a Signal which evaluates to the value returned by the callback.
|
|
908
|
+
// Callback is called with this signal as the parameter.
|
|
909
|
+
constructor(o, f) {
|
|
910
|
+
ee(this, n), sr(this, s);
|
|
911
|
+
const u = Mn(o)[We];
|
|
912
|
+
if (u.consumerAllowSignalWrites = !0, this[k] = u, u.wrapper = this, f) {
|
|
913
|
+
const E = f.equals;
|
|
914
|
+
E && (u.equal = E), u.watched = f[t.subtle.watched], u.unwatched = f[t.subtle.unwatched];
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
get() {
|
|
918
|
+
if (!(0, t.isComputed)(this))
|
|
919
|
+
throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");
|
|
920
|
+
return Cs(this[k]);
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
s = k, n = /* @__PURE__ */ new WeakSet(), t.isComputed = (h) => typeof h == "object" && nr(n, h), t.Computed = a, ((h) => {
|
|
924
|
+
var o, f, g, u;
|
|
925
|
+
function E(l) {
|
|
926
|
+
let p, d = null;
|
|
927
|
+
try {
|
|
928
|
+
d = wt(null), p = l();
|
|
929
|
+
} finally {
|
|
930
|
+
wt(d);
|
|
931
|
+
}
|
|
932
|
+
return p;
|
|
933
|
+
}
|
|
934
|
+
h.untrack = E;
|
|
935
|
+
function m(l) {
|
|
936
|
+
var p;
|
|
937
|
+
if (!(0, t.isComputed)(l) && !(0, t.isWatcher)(l))
|
|
938
|
+
throw new TypeError("Called introspectSources without a Computed or Watcher argument");
|
|
939
|
+
return ((p = l[k].producerNode) == null ? void 0 : p.map((d) => d.wrapper)) ?? [];
|
|
940
|
+
}
|
|
941
|
+
h.introspectSources = m;
|
|
942
|
+
function N(l) {
|
|
943
|
+
var p;
|
|
944
|
+
if (!(0, t.isComputed)(l) && !(0, t.isState)(l))
|
|
945
|
+
throw new TypeError("Called introspectSinks without a Signal argument");
|
|
946
|
+
return ((p = l[k].liveConsumerNode) == null ? void 0 : p.map((d) => d.wrapper)) ?? [];
|
|
947
|
+
}
|
|
948
|
+
h.introspectSinks = N;
|
|
949
|
+
function H(l) {
|
|
950
|
+
if (!(0, t.isComputed)(l) && !(0, t.isState)(l))
|
|
951
|
+
throw new TypeError("Called hasSinks without a Signal argument");
|
|
952
|
+
const p = l[k].liveConsumerNode;
|
|
953
|
+
return p ? p.length > 0 : !1;
|
|
954
|
+
}
|
|
955
|
+
h.hasSinks = H;
|
|
956
|
+
function z(l) {
|
|
957
|
+
if (!(0, t.isComputed)(l) && !(0, t.isWatcher)(l))
|
|
958
|
+
throw new TypeError("Called hasSources without a Computed or Watcher argument");
|
|
959
|
+
const p = l[k].producerNode;
|
|
960
|
+
return p ? p.length > 0 : !1;
|
|
961
|
+
}
|
|
962
|
+
h.hasSources = z;
|
|
963
|
+
class L {
|
|
964
|
+
// When a (recursive) source of Watcher is written to, call this callback,
|
|
965
|
+
// if it hasn't already been called since the last `watch` call.
|
|
966
|
+
// No signals may be read or written during the notify.
|
|
967
|
+
constructor(p) {
|
|
968
|
+
ee(this, f), ee(this, g), sr(this, o);
|
|
969
|
+
let d = Object.create(Or);
|
|
970
|
+
d.wrapper = this, d.consumerMarkedDirty = p, d.consumerIsAlwaysLive = !0, d.consumerAllowSignalWrites = !1, d.producerNode = [], this[k] = d;
|
|
971
|
+
}
|
|
972
|
+
// Add these signals to the Watcher's set, and set the watcher to run its
|
|
973
|
+
// notify callback next time any signal in the set (or one of its dependencies) changes.
|
|
974
|
+
// Can be called with no arguments just to reset the "notified" state, so that
|
|
975
|
+
// the notify callback will be invoked again.
|
|
976
|
+
watch(...p) {
|
|
977
|
+
if (!(0, t.isWatcher)(this))
|
|
978
|
+
throw new TypeError("Called unwatch without Watcher receiver");
|
|
979
|
+
Zr(this, g, u).call(this, p);
|
|
980
|
+
const d = this[k];
|
|
981
|
+
d.dirty = !1;
|
|
982
|
+
const y = wt(d);
|
|
983
|
+
for (const _ of p)
|
|
984
|
+
Ke(_[k]);
|
|
985
|
+
wt(y);
|
|
986
|
+
}
|
|
987
|
+
// Remove these signals from the watched set (e.g., for an effect which is disposed)
|
|
988
|
+
unwatch(...p) {
|
|
989
|
+
if (!(0, t.isWatcher)(this))
|
|
990
|
+
throw new TypeError("Called unwatch without Watcher receiver");
|
|
991
|
+
Zr(this, g, u).call(this, p);
|
|
992
|
+
const d = this[k];
|
|
993
|
+
Pt(d);
|
|
994
|
+
for (let y = d.producerNode.length - 1; y >= 0; y--)
|
|
995
|
+
if (p.includes(d.producerNode[y].wrapper)) {
|
|
996
|
+
Qe(d.producerNode[y], d.producerIndexOfThis[y]);
|
|
997
|
+
const _ = d.producerNode.length - 1;
|
|
998
|
+
if (d.producerNode[y] = d.producerNode[_], d.producerIndexOfThis[y] = d.producerIndexOfThis[_], d.producerNode.length--, d.producerIndexOfThis.length--, d.nextProducerIndex--, y < d.producerNode.length) {
|
|
999
|
+
const c = d.producerIndexOfThis[y], v = d.producerNode[y];
|
|
1000
|
+
Tr(v), v.liveConsumerIndexOfThis[c] = y;
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
// Returns the set of computeds in the Watcher's set which are still yet
|
|
1005
|
+
// to be re-evaluated
|
|
1006
|
+
getPending() {
|
|
1007
|
+
if (!(0, t.isWatcher)(this))
|
|
1008
|
+
throw new TypeError("Called getPending without Watcher receiver");
|
|
1009
|
+
return this[k].producerNode.filter((d) => d.dirty).map((d) => d.wrapper);
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
o = k, f = /* @__PURE__ */ new WeakSet(), g = /* @__PURE__ */ new WeakSet(), u = function(l) {
|
|
1013
|
+
for (const p of l)
|
|
1014
|
+
if (!(0, t.isComputed)(p) && !(0, t.isState)(p))
|
|
1015
|
+
throw new TypeError("Called watch/unwatch without a Computed or State argument");
|
|
1016
|
+
}, t.isWatcher = (l) => nr(f, l), h.Watcher = L;
|
|
1017
|
+
function V() {
|
|
1018
|
+
var l;
|
|
1019
|
+
return (l = Pn()) == null ? void 0 : l.wrapper;
|
|
1020
|
+
}
|
|
1021
|
+
h.currentComputed = V, h.watched = Symbol("watched"), h.unwatched = Symbol("unwatched");
|
|
1022
|
+
})(t.subtle || (t.subtle = {}));
|
|
1023
|
+
})(A || (A = {}));
|
|
1024
|
+
/**
|
|
1025
|
+
* @license
|
|
1026
|
+
* Copyright 2023 Google LLC
|
|
1027
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1028
|
+
*/
|
|
1029
|
+
let or = !1;
|
|
1030
|
+
const Kr = new A.subtle.Watcher(() => {
|
|
1031
|
+
or || (or = !0, queueMicrotask(() => {
|
|
1032
|
+
or = !1;
|
|
1033
|
+
for (const t of Kr.getPending()) t.get();
|
|
1034
|
+
Kr.watch();
|
|
1035
|
+
}));
|
|
1036
|
+
}), qn = Symbol("SignalWatcherBrand"), Yn = new FinalizationRegistry((t) => {
|
|
1037
|
+
t.unwatch(...A.subtle.introspectSources(t));
|
|
1038
|
+
}), Qr = /* @__PURE__ */ new WeakMap();
|
|
1039
|
+
function Fn(t) {
|
|
1040
|
+
return t[qn] === !0 ? (console.warn("SignalWatcher should not be applied to the same class more than once."), t) : class extends t {
|
|
1041
|
+
constructor() {
|
|
1042
|
+
super(...arguments), this._$St = /* @__PURE__ */ new Map(), this._$So = new A.State(0), this._$Si = !1;
|
|
1043
|
+
}
|
|
1044
|
+
_$Sl() {
|
|
1045
|
+
var e, r;
|
|
1046
|
+
const s = [], n = [];
|
|
1047
|
+
this._$St.forEach((a, h) => {
|
|
1048
|
+
(a != null && a.beforeUpdate ? s : n).push(h);
|
|
1049
|
+
});
|
|
1050
|
+
const i = (e = this.h) === null || e === void 0 ? void 0 : e.getPending().filter((a) => a !== this._$Su && !this._$St.has(a));
|
|
1051
|
+
s.forEach((a) => a.get()), (r = this._$Su) === null || r === void 0 || r.get(), i.forEach((a) => a.get()), n.forEach((a) => a.get());
|
|
1052
|
+
}
|
|
1053
|
+
_$Sv() {
|
|
1054
|
+
this.isUpdatePending || queueMicrotask(() => {
|
|
1055
|
+
this.isUpdatePending || this._$Sl();
|
|
1056
|
+
});
|
|
1057
|
+
}
|
|
1058
|
+
_$S_() {
|
|
1059
|
+
if (this.h !== void 0) return;
|
|
1060
|
+
this._$Su = new A.Computed(() => {
|
|
1061
|
+
this._$So.get(), super.performUpdate();
|
|
1062
|
+
});
|
|
1063
|
+
const e = this.h = new A.subtle.Watcher(function() {
|
|
1064
|
+
const r = Qr.get(this);
|
|
1065
|
+
r !== void 0 && (r._$Si === !1 && (new Set(this.getPending()).has(r._$Su) ? r.requestUpdate() : r._$Sv()), this.watch());
|
|
1066
|
+
});
|
|
1067
|
+
Qr.set(e, this), Yn.register(this, e), e.watch(this._$Su), e.watch(...Array.from(this._$St).map(([r]) => r));
|
|
1068
|
+
}
|
|
1069
|
+
_$Sp() {
|
|
1070
|
+
if (this.h === void 0) return;
|
|
1071
|
+
let e = !1;
|
|
1072
|
+
this.h.unwatch(...A.subtle.introspectSources(this.h).filter((r) => {
|
|
1073
|
+
var s;
|
|
1074
|
+
const n = ((s = this._$St.get(r)) === null || s === void 0 ? void 0 : s.manualDispose) !== !0;
|
|
1075
|
+
return n && this._$St.delete(r), e || (e = !n), n;
|
|
1076
|
+
})), e || (this._$Su = void 0, this.h = void 0, this._$St.clear());
|
|
1077
|
+
}
|
|
1078
|
+
updateEffect(e, r) {
|
|
1079
|
+
var s;
|
|
1080
|
+
this._$S_();
|
|
1081
|
+
const n = new A.Computed(() => {
|
|
1082
|
+
e();
|
|
1083
|
+
});
|
|
1084
|
+
return this.h.watch(n), this._$St.set(n, r), (s = r == null ? void 0 : r.beforeUpdate) !== null && s !== void 0 && s ? A.subtle.untrack(() => n.get()) : this.updateComplete.then(() => A.subtle.untrack(() => n.get())), () => {
|
|
1085
|
+
this._$St.delete(n), this.h.unwatch(n), this.isConnected === !1 && this._$Sp();
|
|
1086
|
+
};
|
|
1087
|
+
}
|
|
1088
|
+
performUpdate() {
|
|
1089
|
+
this.isUpdatePending && (this._$S_(), this._$Si = !0, this._$So.set(this._$So.get() + 1), this._$Si = !1, this._$Sl());
|
|
1090
|
+
}
|
|
1091
|
+
connectedCallback() {
|
|
1092
|
+
super.connectedCallback(), this.requestUpdate();
|
|
1093
|
+
}
|
|
1094
|
+
disconnectedCallback() {
|
|
1095
|
+
super.disconnectedCallback(), queueMicrotask(() => {
|
|
1096
|
+
this.isConnected === !1 && this._$Sp();
|
|
1097
|
+
});
|
|
1098
|
+
}
|
|
1099
|
+
};
|
|
1100
|
+
}
|
|
1101
|
+
/**
|
|
1102
|
+
* @license
|
|
1103
|
+
* Copyright 2017 Google LLC
|
|
1104
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1105
|
+
*/
|
|
1106
|
+
const Jn = { CHILD: 2 }, Zn = (t) => (...e) => ({ _$litDirective$: t, values: e });
|
|
1107
|
+
let Kn = class {
|
|
1108
|
+
constructor(e) {
|
|
1109
|
+
}
|
|
1110
|
+
get _$AU() {
|
|
1111
|
+
return this._$AM._$AU;
|
|
1112
|
+
}
|
|
1113
|
+
_$AT(e, r, s) {
|
|
1114
|
+
this._$Ct = e, this._$AM = r, this._$Ci = s;
|
|
1115
|
+
}
|
|
1116
|
+
_$AS(e, r) {
|
|
1117
|
+
return this.update(e, r);
|
|
1118
|
+
}
|
|
1119
|
+
update(e, r) {
|
|
1120
|
+
return this.render(...r);
|
|
1121
|
+
}
|
|
1122
|
+
};
|
|
1123
|
+
/**
|
|
1124
|
+
* @license
|
|
1125
|
+
* Copyright 2020 Google LLC
|
|
1126
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1127
|
+
*/
|
|
1128
|
+
const Qn = (t) => t.strings === void 0;
|
|
1129
|
+
/**
|
|
1130
|
+
* @license
|
|
1131
|
+
* Copyright 2017 Google LLC
|
|
1132
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1133
|
+
*/
|
|
1134
|
+
const Gt = (t, e) => {
|
|
1135
|
+
var s;
|
|
1136
|
+
const r = t._$AN;
|
|
1137
|
+
if (r === void 0) return !1;
|
|
1138
|
+
for (const n of r) (s = n._$AO) == null || s.call(n, e, !1), Gt(n, e);
|
|
1139
|
+
return !0;
|
|
1140
|
+
}, Le = (t) => {
|
|
1141
|
+
let e, r;
|
|
1142
|
+
do {
|
|
1143
|
+
if ((e = t._$AM) === void 0) break;
|
|
1144
|
+
r = e._$AN, r.delete(t), t = e;
|
|
1145
|
+
} while ((r == null ? void 0 : r.size) === 0);
|
|
1146
|
+
}, Ss = (t) => {
|
|
1147
|
+
for (let e; e = t._$AM; t = e) {
|
|
1148
|
+
let r = e._$AN;
|
|
1149
|
+
if (r === void 0) e._$AN = r = /* @__PURE__ */ new Set();
|
|
1150
|
+
else if (r.has(t)) break;
|
|
1151
|
+
r.add(t), ti(e);
|
|
1152
|
+
}
|
|
1153
|
+
};
|
|
1154
|
+
function jn(t) {
|
|
1155
|
+
this._$AN !== void 0 ? (Le(this), this._$AM = t, Ss(this)) : this._$AM = t;
|
|
1156
|
+
}
|
|
1157
|
+
function Xn(t, e = !1, r = 0) {
|
|
1158
|
+
const s = this._$AH, n = this._$AN;
|
|
1159
|
+
if (n !== void 0 && n.size !== 0) if (e) if (Array.isArray(s)) for (let i = r; i < s.length; i++) Gt(s[i], !1), Le(s[i]);
|
|
1160
|
+
else s != null && (Gt(s, !1), Le(s));
|
|
1161
|
+
else Gt(this, t);
|
|
1162
|
+
}
|
|
1163
|
+
const ti = (t) => {
|
|
1164
|
+
t.type == Jn.CHILD && (t._$AP ?? (t._$AP = Xn), t._$AQ ?? (t._$AQ = jn));
|
|
1165
|
+
};
|
|
1166
|
+
class ei extends Kn {
|
|
1167
|
+
constructor() {
|
|
1168
|
+
super(...arguments), this._$AN = void 0;
|
|
1169
|
+
}
|
|
1170
|
+
_$AT(e, r, s) {
|
|
1171
|
+
super._$AT(e, r, s), Ss(this), this.isConnected = e._$AU;
|
|
1172
|
+
}
|
|
1173
|
+
_$AO(e, r = !0) {
|
|
1174
|
+
var s, n;
|
|
1175
|
+
e !== this.isConnected && (this.isConnected = e, e ? (s = this.reconnected) == null || s.call(this) : (n = this.disconnected) == null || n.call(this)), r && (Gt(this, e), Le(this));
|
|
1176
|
+
}
|
|
1177
|
+
setValue(e) {
|
|
1178
|
+
if (Qn(this._$Ct)) this._$Ct._$AI(e, this);
|
|
1179
|
+
else {
|
|
1180
|
+
const r = [...this._$Ct._$AH];
|
|
1181
|
+
r[this._$Ci] = e, this._$Ct._$AI(r, this, 0);
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
disconnected() {
|
|
1185
|
+
}
|
|
1186
|
+
reconnected() {
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
/**
|
|
1190
|
+
* @license
|
|
1191
|
+
* Copyright 2023 Google LLC
|
|
1192
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1193
|
+
*/
|
|
1194
|
+
let hr = !1;
|
|
1195
|
+
const vr = new A.subtle.Watcher(async () => {
|
|
1196
|
+
hr || (hr = !0, queueMicrotask(() => {
|
|
1197
|
+
hr = !1;
|
|
1198
|
+
for (const t of vr.getPending()) t.get();
|
|
1199
|
+
vr.watch();
|
|
1200
|
+
}));
|
|
1201
|
+
});
|
|
1202
|
+
let ri = class extends ei {
|
|
1203
|
+
_$S_() {
|
|
1204
|
+
var e, r;
|
|
1205
|
+
this._$Sm === void 0 && (this._$Sj = new A.Computed(() => {
|
|
1206
|
+
var s;
|
|
1207
|
+
const n = (s = this._$SW) === null || s === void 0 ? void 0 : s.get();
|
|
1208
|
+
return this.setValue(n), n;
|
|
1209
|
+
}), this._$Sm = (r = (e = this._$Sk) === null || e === void 0 ? void 0 : e.h) !== null && r !== void 0 ? r : vr, this._$Sm.watch(this._$Sj), A.subtle.untrack(() => {
|
|
1210
|
+
var s;
|
|
1211
|
+
return (s = this._$Sj) === null || s === void 0 ? void 0 : s.get();
|
|
1212
|
+
}));
|
|
1213
|
+
}
|
|
1214
|
+
_$Sp() {
|
|
1215
|
+
this._$Sm !== void 0 && (this._$Sm.unwatch(this._$SW), this._$Sm = void 0);
|
|
1216
|
+
}
|
|
1217
|
+
render(e) {
|
|
1218
|
+
return A.subtle.untrack(() => e.get());
|
|
1219
|
+
}
|
|
1220
|
+
update(e, [r]) {
|
|
1221
|
+
var s, n;
|
|
1222
|
+
return (s = this._$Sk) !== null && s !== void 0 || (this._$Sk = (n = e.options) === null || n === void 0 ? void 0 : n.host), r !== this._$SW && this._$SW !== void 0 && this._$Sp(), this._$SW = r, this._$S_(), A.subtle.untrack(() => this._$SW.get());
|
|
1223
|
+
}
|
|
1224
|
+
disconnected() {
|
|
1225
|
+
this._$Sp();
|
|
1226
|
+
}
|
|
1227
|
+
reconnected() {
|
|
1228
|
+
this._$S_();
|
|
1229
|
+
}
|
|
1230
|
+
};
|
|
1231
|
+
const si = Zn(ri);
|
|
1232
|
+
/**
|
|
1233
|
+
* @license
|
|
1234
|
+
* Copyright 2023 Google LLC
|
|
1235
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1236
|
+
*/
|
|
1237
|
+
const ni = (t) => (e, ...r) => t(e, ...r.map((s) => s instanceof A.State || s instanceof A.Computed ? si(s) : s)), ii = ni(Je);
|
|
1238
|
+
/**
|
|
1239
|
+
* @license
|
|
1240
|
+
* Copyright 2023 Google LLC
|
|
1241
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1242
|
+
*/
|
|
1243
|
+
A.State;
|
|
1244
|
+
A.Computed;
|
|
1245
|
+
const U = (t, e) => new A.State(t, e), K = (t, e) => new A.Computed(t, e);
|
|
1246
|
+
var ai = Object.defineProperty, oi = Object.getOwnPropertyDescriptor, bs = (t) => {
|
|
1247
|
+
throw TypeError(t);
|
|
1248
|
+
}, Ps = (t, e, r, s) => {
|
|
1249
|
+
for (var n = s > 1 ? void 0 : s ? oi(e, r) : e, i = t.length - 1, a; i >= 0; i--)
|
|
1250
|
+
(a = t[i]) && (n = (s ? a(e, r, n) : a(n)) || n);
|
|
1251
|
+
return s && n && ai(e, r, n), n;
|
|
1252
|
+
}, ks = (t, e, r) => e.has(t) || bs("Cannot " + r), jr = (t, e, r) => (ks(t, e, "read from private field"), r ? r.call(t) : e.get(t)), Xr = (t, e, r) => e.has(t) ? bs("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), ts = (t, e, r) => (ks(t, e, "access private method"), r), es, rs, ss, ne, ie, gr;
|
|
1253
|
+
const _r = Symbol("ThaRoute:fragment"), Ie = Symbol("ThaRoute:path-pattern");
|
|
1254
|
+
let Ue = class extends (ss = Z, rs = _r, es = Ie, ss) {
|
|
1255
|
+
constructor() {
|
|
1256
|
+
super(...arguments), Xr(this, ie), this[rs] = U(ts(this, ie, gr).call(this)), this[es] = null, this.path = null, Xr(this, ne, new MutationObserver(() => {
|
|
1257
|
+
this[_r].set(ts(this, ie, gr).call(this));
|
|
1258
|
+
}));
|
|
1259
|
+
}
|
|
1260
|
+
/**
|
|
1261
|
+
* Lifecycle callback when the element is connected to the DOM.
|
|
1262
|
+
* Sets up observer to watch for template content changes.
|
|
1263
|
+
*/
|
|
1264
|
+
connectedCallback() {
|
|
1265
|
+
super.connectedCallback(), jr(this, ne).observe(this, { childList: !0 });
|
|
1266
|
+
}
|
|
1267
|
+
/**
|
|
1268
|
+
* Lifecycle callback when an attribute changes.
|
|
1269
|
+
* Updates the URLPattern when the path attribute changes.
|
|
1270
|
+
*
|
|
1271
|
+
* @param name - The attribute name that changed
|
|
1272
|
+
* @param _old - The old attribute value
|
|
1273
|
+
* @param value - The new attribute value
|
|
1274
|
+
*/
|
|
1275
|
+
attributeChangedCallback(t, e, r) {
|
|
1276
|
+
switch (super.attributeChangedCallback(t, e, r), t) {
|
|
1277
|
+
case "path":
|
|
1278
|
+
this[Ie] = r ? new URLPattern({ pathname: r }) : null;
|
|
1279
|
+
break;
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
/**
|
|
1283
|
+
* Lifecycle callback when the element is disconnected from the DOM.
|
|
1284
|
+
* Cleans up the template observer.
|
|
1285
|
+
*/
|
|
1286
|
+
disconnectedCallback() {
|
|
1287
|
+
super.disconnectedCallback(), jr(this, ne).disconnect();
|
|
1288
|
+
}
|
|
1289
|
+
};
|
|
1290
|
+
ne = /* @__PURE__ */ new WeakMap();
|
|
1291
|
+
ie = /* @__PURE__ */ new WeakSet();
|
|
1292
|
+
gr = function() {
|
|
1293
|
+
const t = this.querySelector("template");
|
|
1294
|
+
return t ? new WeakRef(t.content) : null;
|
|
1295
|
+
};
|
|
1296
|
+
Ps([
|
|
1297
|
+
C({ type: String })
|
|
1298
|
+
], Ue.prototype, "path", 2);
|
|
1299
|
+
Ue = Ps([
|
|
1300
|
+
Q("tha-route")
|
|
1301
|
+
], Ue);
|
|
1302
|
+
function I() {
|
|
1303
|
+
}
|
|
1304
|
+
const jt = Fn(Z);
|
|
1305
|
+
function nt() {
|
|
1306
|
+
return nt = Object.assign ? Object.assign.bind() : function(t) {
|
|
1307
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
1308
|
+
var r = arguments[e];
|
|
1309
|
+
for (var s in r) ({}).hasOwnProperty.call(r, s) && (t[s] = r[s]);
|
|
1310
|
+
}
|
|
1311
|
+
return t;
|
|
1312
|
+
}, nt.apply(null, arguments);
|
|
1313
|
+
}
|
|
1314
|
+
var D;
|
|
1315
|
+
(function(t) {
|
|
1316
|
+
t.Pop = "POP", t.Push = "PUSH", t.Replace = "REPLACE";
|
|
1317
|
+
})(D || (D = {}));
|
|
1318
|
+
var kt = process.env.NODE_ENV !== "production" ? function(t) {
|
|
1319
|
+
return Object.freeze(t);
|
|
1320
|
+
} : function(t) {
|
|
1321
|
+
return t;
|
|
1322
|
+
};
|
|
1323
|
+
function dt(t, e) {
|
|
1324
|
+
if (!t) {
|
|
1325
|
+
typeof console < "u" && console.warn(e);
|
|
1326
|
+
try {
|
|
1327
|
+
throw new Error(e);
|
|
1328
|
+
} catch {
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
var He = "beforeunload", hi = "hashchange", Os = "popstate";
|
|
1333
|
+
function ci(t) {
|
|
1334
|
+
t === void 0 && (t = {});
|
|
1335
|
+
var e = t, r = e.window, s = r === void 0 ? document.defaultView : r, n = s.history;
|
|
1336
|
+
function i() {
|
|
1337
|
+
var _ = s.location, c = _.pathname, v = _.search, $ = _.hash, w = n.state || {};
|
|
1338
|
+
return [w.idx, kt({
|
|
1339
|
+
pathname: c,
|
|
1340
|
+
search: v,
|
|
1341
|
+
hash: $,
|
|
1342
|
+
state: w.usr || null,
|
|
1343
|
+
key: w.key || "default"
|
|
1344
|
+
})];
|
|
1345
|
+
}
|
|
1346
|
+
var a = null;
|
|
1347
|
+
function h() {
|
|
1348
|
+
if (a)
|
|
1349
|
+
m.call(a), a = null;
|
|
1350
|
+
else {
|
|
1351
|
+
var _ = D.Pop, c = i(), v = c[0], $ = c[1];
|
|
1352
|
+
if (m.length)
|
|
1353
|
+
if (v != null) {
|
|
1354
|
+
var w = g - v;
|
|
1355
|
+
w && (a = {
|
|
1356
|
+
action: _,
|
|
1357
|
+
location: $,
|
|
1358
|
+
retry: function() {
|
|
1359
|
+
d(w * -1);
|
|
1360
|
+
}
|
|
1361
|
+
}, d(w));
|
|
1362
|
+
} else
|
|
1363
|
+
process.env.NODE_ENV !== "production" && dt(
|
|
1364
|
+
!1,
|
|
1365
|
+
// TODO: Write up a doc that explains our blocking strategy in
|
|
1366
|
+
// detail and link to it here so people can understand better what
|
|
1367
|
+
// is going on and how to avoid it.
|
|
1368
|
+
"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."
|
|
1369
|
+
);
|
|
1370
|
+
else
|
|
1371
|
+
V(_);
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
s.addEventListener(Os, h);
|
|
1375
|
+
var o = D.Pop, f = i(), g = f[0], u = f[1], E = Ot(), m = Ot();
|
|
1376
|
+
g == null && (g = 0, n.replaceState(nt({}, n.state, {
|
|
1377
|
+
idx: g
|
|
1378
|
+
}), ""));
|
|
1379
|
+
function N(_) {
|
|
1380
|
+
return typeof _ == "string" ? _ : qt(_);
|
|
1381
|
+
}
|
|
1382
|
+
function H(_, c) {
|
|
1383
|
+
return c === void 0 && (c = null), kt(nt({
|
|
1384
|
+
pathname: u.pathname,
|
|
1385
|
+
hash: "",
|
|
1386
|
+
search: ""
|
|
1387
|
+
}, typeof _ == "string" ? Zt(_) : _, {
|
|
1388
|
+
state: c,
|
|
1389
|
+
key: Ve()
|
|
1390
|
+
}));
|
|
1391
|
+
}
|
|
1392
|
+
function z(_, c) {
|
|
1393
|
+
return [{
|
|
1394
|
+
usr: _.state,
|
|
1395
|
+
key: _.key,
|
|
1396
|
+
idx: c
|
|
1397
|
+
}, N(_)];
|
|
1398
|
+
}
|
|
1399
|
+
function L(_, c, v) {
|
|
1400
|
+
return !m.length || (m.call({
|
|
1401
|
+
action: _,
|
|
1402
|
+
location: c,
|
|
1403
|
+
retry: v
|
|
1404
|
+
}), !1);
|
|
1405
|
+
}
|
|
1406
|
+
function V(_) {
|
|
1407
|
+
o = _;
|
|
1408
|
+
var c = i();
|
|
1409
|
+
g = c[0], u = c[1], E.call({
|
|
1410
|
+
action: o,
|
|
1411
|
+
location: u
|
|
1412
|
+
});
|
|
1413
|
+
}
|
|
1414
|
+
function l(_, c) {
|
|
1415
|
+
var v = D.Push, $ = H(_, c);
|
|
1416
|
+
function w() {
|
|
1417
|
+
l(_, c);
|
|
1418
|
+
}
|
|
1419
|
+
if (L(v, $, w)) {
|
|
1420
|
+
var O = z($, g + 1), M = O[0], B = O[1];
|
|
1421
|
+
try {
|
|
1422
|
+
n.pushState(M, "", B);
|
|
1423
|
+
} catch {
|
|
1424
|
+
s.location.assign(B);
|
|
1425
|
+
}
|
|
1426
|
+
V(v);
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
function p(_, c) {
|
|
1430
|
+
var v = D.Replace, $ = H(_, c);
|
|
1431
|
+
function w() {
|
|
1432
|
+
p(_, c);
|
|
1433
|
+
}
|
|
1434
|
+
if (L(v, $, w)) {
|
|
1435
|
+
var O = z($, g), M = O[0], B = O[1];
|
|
1436
|
+
n.replaceState(M, "", B), V(v);
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
function d(_) {
|
|
1440
|
+
n.go(_);
|
|
1441
|
+
}
|
|
1442
|
+
var y = {
|
|
1443
|
+
get action() {
|
|
1444
|
+
return o;
|
|
1445
|
+
},
|
|
1446
|
+
get location() {
|
|
1447
|
+
return u;
|
|
1448
|
+
},
|
|
1449
|
+
createHref: N,
|
|
1450
|
+
push: l,
|
|
1451
|
+
replace: p,
|
|
1452
|
+
go: d,
|
|
1453
|
+
back: function() {
|
|
1454
|
+
d(-1);
|
|
1455
|
+
},
|
|
1456
|
+
forward: function() {
|
|
1457
|
+
d(1);
|
|
1458
|
+
},
|
|
1459
|
+
listen: function(c) {
|
|
1460
|
+
return E.push(c);
|
|
1461
|
+
},
|
|
1462
|
+
block: function(c) {
|
|
1463
|
+
var v = m.push(c);
|
|
1464
|
+
return m.length === 1 && s.addEventListener(He, ze), function() {
|
|
1465
|
+
v(), m.length || s.removeEventListener(He, ze);
|
|
1466
|
+
};
|
|
1467
|
+
}
|
|
1468
|
+
};
|
|
1469
|
+
return y;
|
|
1470
|
+
}
|
|
1471
|
+
function li(t) {
|
|
1472
|
+
t === void 0 && (t = {});
|
|
1473
|
+
var e = t, r = e.window, s = r === void 0 ? document.defaultView : r, n = s.history;
|
|
1474
|
+
function i() {
|
|
1475
|
+
var c = Zt(s.location.hash.substr(1)), v = c.pathname, $ = v === void 0 ? "/" : v, w = c.search, O = w === void 0 ? "" : w, M = c.hash, B = M === void 0 ? "" : M, Y = n.state || {};
|
|
1476
|
+
return [Y.idx, kt({
|
|
1477
|
+
pathname: $,
|
|
1478
|
+
search: O,
|
|
1479
|
+
hash: B,
|
|
1480
|
+
state: Y.usr || null,
|
|
1481
|
+
key: Y.key || "default"
|
|
1482
|
+
})];
|
|
1483
|
+
}
|
|
1484
|
+
var a = null;
|
|
1485
|
+
function h() {
|
|
1486
|
+
if (a)
|
|
1487
|
+
m.call(a), a = null;
|
|
1488
|
+
else {
|
|
1489
|
+
var c = D.Pop, v = i(), $ = v[0], w = v[1];
|
|
1490
|
+
if (m.length)
|
|
1491
|
+
if ($ != null) {
|
|
1492
|
+
var O = g - $;
|
|
1493
|
+
O && (a = {
|
|
1494
|
+
action: c,
|
|
1495
|
+
location: w,
|
|
1496
|
+
retry: function() {
|
|
1497
|
+
y(O * -1);
|
|
1498
|
+
}
|
|
1499
|
+
}, y(O));
|
|
1500
|
+
} else
|
|
1501
|
+
process.env.NODE_ENV !== "production" && dt(
|
|
1502
|
+
!1,
|
|
1503
|
+
// TODO: Write up a doc that explains our blocking strategy in
|
|
1504
|
+
// detail and link to it here so people can understand better
|
|
1505
|
+
// what is going on and how to avoid it.
|
|
1506
|
+
"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."
|
|
1507
|
+
);
|
|
1508
|
+
else
|
|
1509
|
+
l(c);
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
s.addEventListener(Os, h), s.addEventListener(hi, function() {
|
|
1513
|
+
var c = i(), v = c[1];
|
|
1514
|
+
qt(v) !== qt(u) && h();
|
|
1515
|
+
});
|
|
1516
|
+
var o = D.Pop, f = i(), g = f[0], u = f[1], E = Ot(), m = Ot();
|
|
1517
|
+
g == null && (g = 0, n.replaceState(nt({}, n.state, {
|
|
1518
|
+
idx: g
|
|
1519
|
+
}), ""));
|
|
1520
|
+
function N() {
|
|
1521
|
+
var c = document.querySelector("base"), v = "";
|
|
1522
|
+
if (c && c.getAttribute("href")) {
|
|
1523
|
+
var $ = s.location.href, w = $.indexOf("#");
|
|
1524
|
+
v = w === -1 ? $ : $.slice(0, w);
|
|
1525
|
+
}
|
|
1526
|
+
return v;
|
|
1527
|
+
}
|
|
1528
|
+
function H(c) {
|
|
1529
|
+
return N() + "#" + (typeof c == "string" ? c : qt(c));
|
|
1530
|
+
}
|
|
1531
|
+
function z(c, v) {
|
|
1532
|
+
return v === void 0 && (v = null), kt(nt({
|
|
1533
|
+
pathname: u.pathname,
|
|
1534
|
+
hash: "",
|
|
1535
|
+
search: ""
|
|
1536
|
+
}, typeof c == "string" ? Zt(c) : c, {
|
|
1537
|
+
state: v,
|
|
1538
|
+
key: Ve()
|
|
1539
|
+
}));
|
|
1540
|
+
}
|
|
1541
|
+
function L(c, v) {
|
|
1542
|
+
return [{
|
|
1543
|
+
usr: c.state,
|
|
1544
|
+
key: c.key,
|
|
1545
|
+
idx: v
|
|
1546
|
+
}, H(c)];
|
|
1547
|
+
}
|
|
1548
|
+
function V(c, v, $) {
|
|
1549
|
+
return !m.length || (m.call({
|
|
1550
|
+
action: c,
|
|
1551
|
+
location: v,
|
|
1552
|
+
retry: $
|
|
1553
|
+
}), !1);
|
|
1554
|
+
}
|
|
1555
|
+
function l(c) {
|
|
1556
|
+
o = c;
|
|
1557
|
+
var v = i();
|
|
1558
|
+
g = v[0], u = v[1], E.call({
|
|
1559
|
+
action: o,
|
|
1560
|
+
location: u
|
|
1561
|
+
});
|
|
1562
|
+
}
|
|
1563
|
+
function p(c, v) {
|
|
1564
|
+
var $ = D.Push, w = z(c, v);
|
|
1565
|
+
function O() {
|
|
1566
|
+
p(c, v);
|
|
1567
|
+
}
|
|
1568
|
+
if (process.env.NODE_ENV !== "production" && dt(w.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.push(" + JSON.stringify(c) + ")"), V($, w, O)) {
|
|
1569
|
+
var M = L(w, g + 1), B = M[0], Y = M[1];
|
|
1570
|
+
try {
|
|
1571
|
+
n.pushState(B, "", Y);
|
|
1572
|
+
} catch {
|
|
1573
|
+
s.location.assign(Y);
|
|
1574
|
+
}
|
|
1575
|
+
l($);
|
|
1576
|
+
}
|
|
1577
|
+
}
|
|
1578
|
+
function d(c, v) {
|
|
1579
|
+
var $ = D.Replace, w = z(c, v);
|
|
1580
|
+
function O() {
|
|
1581
|
+
d(c, v);
|
|
1582
|
+
}
|
|
1583
|
+
if (process.env.NODE_ENV !== "production" && dt(w.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.replace(" + JSON.stringify(c) + ")"), V($, w, O)) {
|
|
1584
|
+
var M = L(w, g), B = M[0], Y = M[1];
|
|
1585
|
+
n.replaceState(B, "", Y), l($);
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
function y(c) {
|
|
1589
|
+
n.go(c);
|
|
1590
|
+
}
|
|
1591
|
+
var _ = {
|
|
1592
|
+
get action() {
|
|
1593
|
+
return o;
|
|
1594
|
+
},
|
|
1595
|
+
get location() {
|
|
1596
|
+
return u;
|
|
1597
|
+
},
|
|
1598
|
+
createHref: H,
|
|
1599
|
+
push: p,
|
|
1600
|
+
replace: d,
|
|
1601
|
+
go: y,
|
|
1602
|
+
back: function() {
|
|
1603
|
+
y(-1);
|
|
1604
|
+
},
|
|
1605
|
+
forward: function() {
|
|
1606
|
+
y(1);
|
|
1607
|
+
},
|
|
1608
|
+
listen: function(v) {
|
|
1609
|
+
return E.push(v);
|
|
1610
|
+
},
|
|
1611
|
+
block: function(v) {
|
|
1612
|
+
var $ = m.push(v);
|
|
1613
|
+
return m.length === 1 && s.addEventListener(He, ze), function() {
|
|
1614
|
+
$(), m.length || s.removeEventListener(He, ze);
|
|
1615
|
+
};
|
|
1616
|
+
}
|
|
1617
|
+
};
|
|
1618
|
+
return _;
|
|
1619
|
+
}
|
|
1620
|
+
function ui(t) {
|
|
1621
|
+
t === void 0 && (t = {});
|
|
1622
|
+
var e = t, r = e.initialEntries, s = r === void 0 ? ["/"] : r, n = e.initialIndex, i = s.map(function(l) {
|
|
1623
|
+
var p = kt(nt({
|
|
1624
|
+
pathname: "/",
|
|
1625
|
+
search: "",
|
|
1626
|
+
hash: "",
|
|
1627
|
+
state: null,
|
|
1628
|
+
key: Ve()
|
|
1629
|
+
}, typeof l == "string" ? Zt(l) : l));
|
|
1630
|
+
return process.env.NODE_ENV !== "production" && dt(p.pathname.charAt(0) === "/", "Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: " + JSON.stringify(l) + ")"), p;
|
|
1631
|
+
}), a = ns(n ?? i.length - 1, 0, i.length - 1), h = D.Pop, o = i[a], f = Ot(), g = Ot();
|
|
1632
|
+
function u(l) {
|
|
1633
|
+
return typeof l == "string" ? l : qt(l);
|
|
1634
|
+
}
|
|
1635
|
+
function E(l, p) {
|
|
1636
|
+
return p === void 0 && (p = null), kt(nt({
|
|
1637
|
+
pathname: o.pathname,
|
|
1638
|
+
search: "",
|
|
1639
|
+
hash: ""
|
|
1640
|
+
}, typeof l == "string" ? Zt(l) : l, {
|
|
1641
|
+
state: p,
|
|
1642
|
+
key: Ve()
|
|
1643
|
+
}));
|
|
1644
|
+
}
|
|
1645
|
+
function m(l, p, d) {
|
|
1646
|
+
return !g.length || (g.call({
|
|
1647
|
+
action: l,
|
|
1648
|
+
location: p,
|
|
1649
|
+
retry: d
|
|
1650
|
+
}), !1);
|
|
1651
|
+
}
|
|
1652
|
+
function N(l, p) {
|
|
1653
|
+
h = l, o = p, f.call({
|
|
1654
|
+
action: h,
|
|
1655
|
+
location: o
|
|
1656
|
+
});
|
|
1657
|
+
}
|
|
1658
|
+
function H(l, p) {
|
|
1659
|
+
var d = D.Push, y = E(l, p);
|
|
1660
|
+
function _() {
|
|
1661
|
+
H(l, p);
|
|
1662
|
+
}
|
|
1663
|
+
process.env.NODE_ENV !== "production" && dt(o.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.push(" + JSON.stringify(l) + ")"), m(d, y, _) && (a += 1, i.splice(a, i.length, y), N(d, y));
|
|
1664
|
+
}
|
|
1665
|
+
function z(l, p) {
|
|
1666
|
+
var d = D.Replace, y = E(l, p);
|
|
1667
|
+
function _() {
|
|
1668
|
+
z(l, p);
|
|
1669
|
+
}
|
|
1670
|
+
process.env.NODE_ENV !== "production" && dt(o.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.replace(" + JSON.stringify(l) + ")"), m(d, y, _) && (i[a] = y, N(d, y));
|
|
1671
|
+
}
|
|
1672
|
+
function L(l) {
|
|
1673
|
+
var p = ns(a + l, 0, i.length - 1), d = D.Pop, y = i[p];
|
|
1674
|
+
function _() {
|
|
1675
|
+
L(l);
|
|
1676
|
+
}
|
|
1677
|
+
m(d, y, _) && (a = p, N(d, y));
|
|
1678
|
+
}
|
|
1679
|
+
var V = {
|
|
1680
|
+
get index() {
|
|
1681
|
+
return a;
|
|
1682
|
+
},
|
|
1683
|
+
get action() {
|
|
1684
|
+
return h;
|
|
1685
|
+
},
|
|
1686
|
+
get location() {
|
|
1687
|
+
return o;
|
|
1688
|
+
},
|
|
1689
|
+
createHref: u,
|
|
1690
|
+
push: H,
|
|
1691
|
+
replace: z,
|
|
1692
|
+
go: L,
|
|
1693
|
+
back: function() {
|
|
1694
|
+
L(-1);
|
|
1695
|
+
},
|
|
1696
|
+
forward: function() {
|
|
1697
|
+
L(1);
|
|
1698
|
+
},
|
|
1699
|
+
listen: function(p) {
|
|
1700
|
+
return f.push(p);
|
|
1701
|
+
},
|
|
1702
|
+
block: function(p) {
|
|
1703
|
+
return g.push(p);
|
|
1704
|
+
}
|
|
1705
|
+
};
|
|
1706
|
+
return V;
|
|
1707
|
+
}
|
|
1708
|
+
function ns(t, e, r) {
|
|
1709
|
+
return Math.min(Math.max(t, e), r);
|
|
1710
|
+
}
|
|
1711
|
+
function ze(t) {
|
|
1712
|
+
t.preventDefault(), t.returnValue = "";
|
|
1713
|
+
}
|
|
1714
|
+
function Ot() {
|
|
1715
|
+
var t = [];
|
|
1716
|
+
return {
|
|
1717
|
+
get length() {
|
|
1718
|
+
return t.length;
|
|
1719
|
+
},
|
|
1720
|
+
push: function(r) {
|
|
1721
|
+
return t.push(r), function() {
|
|
1722
|
+
t = t.filter(function(s) {
|
|
1723
|
+
return s !== r;
|
|
1724
|
+
});
|
|
1725
|
+
};
|
|
1726
|
+
},
|
|
1727
|
+
call: function(r) {
|
|
1728
|
+
t.forEach(function(s) {
|
|
1729
|
+
return s && s(r);
|
|
1730
|
+
});
|
|
1731
|
+
}
|
|
1732
|
+
};
|
|
1733
|
+
}
|
|
1734
|
+
function Ve() {
|
|
1735
|
+
return Math.random().toString(36).substr(2, 8);
|
|
1736
|
+
}
|
|
1737
|
+
function qt(t) {
|
|
1738
|
+
var e = t.pathname, r = e === void 0 ? "/" : e, s = t.search, n = s === void 0 ? "" : s, i = t.hash, a = i === void 0 ? "" : i;
|
|
1739
|
+
return n && n !== "?" && (r += n.charAt(0) === "?" ? n : "?" + n), a && a !== "#" && (r += a.charAt(0) === "#" ? a : "#" + a), r;
|
|
1740
|
+
}
|
|
1741
|
+
function Zt(t) {
|
|
1742
|
+
var e = {};
|
|
1743
|
+
if (t) {
|
|
1744
|
+
var r = t.indexOf("#");
|
|
1745
|
+
r >= 0 && (e.hash = t.substr(r), t = t.substr(0, r));
|
|
1746
|
+
var s = t.indexOf("?");
|
|
1747
|
+
s >= 0 && (e.search = t.substr(s), t = t.substr(0, s)), t && (e.pathname = t);
|
|
1748
|
+
}
|
|
1749
|
+
return e;
|
|
1750
|
+
}
|
|
1751
|
+
const is = {}, di = "browser", xr = U(di);
|
|
1752
|
+
K(() => Ts(xr.get()));
|
|
1753
|
+
function Ts(t) {
|
|
1754
|
+
let e = is[t];
|
|
1755
|
+
if (!e) {
|
|
1756
|
+
switch (t) {
|
|
1757
|
+
case "browser":
|
|
1758
|
+
e = ci();
|
|
1759
|
+
break;
|
|
1760
|
+
case "hash":
|
|
1761
|
+
e = li();
|
|
1762
|
+
break;
|
|
1763
|
+
default:
|
|
1764
|
+
e = ui();
|
|
1765
|
+
}
|
|
1766
|
+
is[t] = e;
|
|
1767
|
+
}
|
|
1768
|
+
return e;
|
|
1769
|
+
}
|
|
1770
|
+
var pi = Object.defineProperty, fi = (t, e, r, s) => {
|
|
1771
|
+
for (var n = void 0, i = t.length - 1, a; i >= 0; i--)
|
|
1772
|
+
(a = t[i]) && (n = a(e, r, n) || n);
|
|
1773
|
+
return n && pi(e, r, n), n;
|
|
1774
|
+
};
|
|
1775
|
+
const st = Symbol("HistoryManaged:history"), At = Symbol("HistoryManaged:historyType"), Nr = (t) => {
|
|
1776
|
+
var i, a;
|
|
1777
|
+
var e, r, s;
|
|
1778
|
+
class n extends (s = t, r = At, e = st, s) {
|
|
1779
|
+
constructor() {
|
|
1780
|
+
super(...arguments);
|
|
1781
|
+
gt(this, i);
|
|
1782
|
+
gt(this, a);
|
|
1783
|
+
this.history = void 0, je(this, i, U(this.history)), je(this, a, K(() => {
|
|
1784
|
+
var g;
|
|
1785
|
+
const f = this.closest("tha-router-config, tha-router-outlet");
|
|
1786
|
+
return (g = f == null ? void 0 : f[At]) == null ? void 0 : g.get();
|
|
1787
|
+
})), this[r] = K(() => it(this, i).get() ?? it(this, a).get() ?? xr.get()), this[e] = K(() => Ts(this[At].get()));
|
|
1788
|
+
}
|
|
1789
|
+
/**
|
|
1790
|
+
* Handles attribute changes, updating history signals when needed.
|
|
1791
|
+
*/
|
|
1792
|
+
attributeChangedCallback(f, g, u) {
|
|
1793
|
+
switch (super.attributeChangedCallback(f, g, u), f) {
|
|
1794
|
+
case "history":
|
|
1795
|
+
it(this, i).set(u);
|
|
1796
|
+
break;
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1800
|
+
return i = new WeakMap(), a = new WeakMap(), fi([
|
|
1801
|
+
C({ type: String })
|
|
1802
|
+
], n.prototype, "history"), n;
|
|
1803
|
+
};
|
|
1804
|
+
function Rr(t = I) {
|
|
1805
|
+
return new Promise((e, r) => {
|
|
1806
|
+
setTimeout(() => {
|
|
1807
|
+
try {
|
|
1808
|
+
const s = t();
|
|
1809
|
+
e(s);
|
|
1810
|
+
} catch (s) {
|
|
1811
|
+
r(s);
|
|
1812
|
+
}
|
|
1813
|
+
}, 0);
|
|
1814
|
+
});
|
|
1815
|
+
}
|
|
1816
|
+
var vi = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, xs = (t) => {
|
|
1817
|
+
throw TypeError(t);
|
|
1818
|
+
}, Xt = (t, e, r, s) => {
|
|
1819
|
+
for (var n = s > 1 ? void 0 : s ? gi(e, r) : e, i = t.length - 1, a; i >= 0; i--)
|
|
1820
|
+
(a = t[i]) && (n = (s ? a(e, r, n) : a(n)) || n);
|
|
1821
|
+
return s && n && vi(e, r, n), n;
|
|
1822
|
+
}, Ns = (t, e, r) => e.has(t) || xs("Cannot " + r), W = (t, e, r) => (Ns(t, e, "read from private field"), r ? r.call(t) : e.get(t)), ot = (t, e, r) => e.has(t) ? xs("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), cr = (t, e, r, s) => (Ns(t, e, "write to private field"), e.set(t, r), r), as, yt, mt, yr, mr, ae, oe, he;
|
|
1823
|
+
const Rs = Symbol("ThaRouterOutlet:renderRoute"), ce = Symbol("ThaRouterOutlet:params");
|
|
1824
|
+
let Tt = class extends jt {
|
|
1825
|
+
constructor() {
|
|
1826
|
+
super(...arguments), ot(this, yt, U(void 0)), ot(this, mt, U(null)), ot(this, yr, K(() => {
|
|
1827
|
+
var t, e;
|
|
1828
|
+
return ((e = (t = W(this, mt).get()) == null ? void 0 : t.deref()) == null ? void 0 : e[_r].get()) ?? null;
|
|
1829
|
+
})), ot(this, mr, K(() => {
|
|
1830
|
+
var n, i, a;
|
|
1831
|
+
const t = (n = W(this, yt).get()) == null ? void 0 : n.deref(), e = (i = W(this, mt).get()) == null ? void 0 : i.deref(), r = e == null ? void 0 : e[Ie];
|
|
1832
|
+
if (!t || !r) return null;
|
|
1833
|
+
const { location: { pathname: s } } = t[st].get();
|
|
1834
|
+
return ((a = r.exec(s, "http://dummy.base")) == null ? void 0 : a.pathname.groups) ?? null;
|
|
1835
|
+
})), this[as] = K(() => {
|
|
1836
|
+
var s;
|
|
1837
|
+
const t = W(this, mr).get() ?? {}, e = (s = this.parentElement) == null ? void 0 : s.closest("tha-router-outlet"), r = (e == null ? void 0 : e[ce].get()) ?? {};
|
|
1838
|
+
return Object.freeze({ ...r, ...t });
|
|
1839
|
+
}), this.params = {}, ot(this, ae, I), ot(this, oe, I), ot(this, he, I), this.for = null, this.routePath = null, this.routeID = void 0;
|
|
1840
|
+
}
|
|
1841
|
+
/**
|
|
1842
|
+
* Lifecycle callback when the element is connected to the DOM.
|
|
1843
|
+
* Initializes the outlet and binds to a router.
|
|
1844
|
+
*/
|
|
1845
|
+
connectedCallback() {
|
|
1846
|
+
super.connectedCallback(), Rr(() => {
|
|
1847
|
+
this.bindToRouter();
|
|
1848
|
+
}), cr(this, ae, this.updateEffect(() => {
|
|
1849
|
+
var e;
|
|
1850
|
+
Array.from(this.renderRoot.children).forEach((r) => r.remove());
|
|
1851
|
+
const t = ((e = W(this, yr).get()) == null ? void 0 : e.deref()) ?? null;
|
|
1852
|
+
t && this.renderRoot.appendChild(t.cloneNode(!0));
|
|
1853
|
+
})), cr(this, oe, this.updateEffect(() => {
|
|
1854
|
+
var e;
|
|
1855
|
+
const t = ((e = W(this, mt).get()) == null ? void 0 : e.deref()) ?? null;
|
|
1856
|
+
this.routePath = (t == null ? void 0 : t.getAttribute("path")) ?? null, this.routeID = t != null && t.id ? t == null ? void 0 : t.id : void 0;
|
|
1857
|
+
})), cr(this, he, this.updateEffect(() => {
|
|
1858
|
+
const t = this[ce].get();
|
|
1859
|
+
Array.from(this.attributes).filter((e) => e.name.startsWith("param-")).filter((e) => !(e.name.slice(6) in t)).forEach((e) => {
|
|
1860
|
+
this.removeAttribute(e.name);
|
|
1861
|
+
});
|
|
1862
|
+
for (const [e, r] of Object.entries(t))
|
|
1863
|
+
this.setAttribute(`param-${e}`, r ?? "");
|
|
1864
|
+
this.params = t;
|
|
1865
|
+
}));
|
|
1866
|
+
}
|
|
1867
|
+
bindToRouter(t) {
|
|
1868
|
+
var r, s;
|
|
1869
|
+
t || (this.for ? t = this.getRootNode().querySelector(`tha-router#${this.for}`) ?? void 0 : t = this.closest("tha-router") ?? void 0);
|
|
1870
|
+
const e = ((s = (r = W(this, yt)) == null ? void 0 : r.get()) == null ? void 0 : s.deref()) ?? null;
|
|
1871
|
+
return e === t ? e : (e == null || e.assignOutlet(null), t == null || t.assignOutlet(this), W(this, yt).set(t ? new WeakRef(t) : void 0), t ?? null);
|
|
1872
|
+
}
|
|
1873
|
+
/**
|
|
1874
|
+
* Internal method called by the router to set the active route.
|
|
1875
|
+
* Updates the routeToRender signal which triggers re-rendering.
|
|
1876
|
+
*
|
|
1877
|
+
* @param route - The route to render, or null to clear
|
|
1878
|
+
* @internal
|
|
1879
|
+
*/
|
|
1880
|
+
[(as = ce, Rs)](t) {
|
|
1881
|
+
W(this, mt).set(t ? new WeakRef(t) : null);
|
|
1882
|
+
}
|
|
1883
|
+
/**
|
|
1884
|
+
* Lifecycle callback when the element is disconnected from the DOM.
|
|
1885
|
+
* Unbinds from the router and cleans up effects.
|
|
1886
|
+
*/
|
|
1887
|
+
disconnectedCallback() {
|
|
1888
|
+
var t, e, r;
|
|
1889
|
+
super.disconnectedCallback(), (r = (e = (t = W(this, yt)) == null ? void 0 : t.get()) == null ? void 0 : e.deref()) == null || r.assignOutlet(null);
|
|
1890
|
+
try {
|
|
1891
|
+
W(this, ae).call(this), W(this, oe).call(this), W(this, he).call(this);
|
|
1892
|
+
} catch {
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
/**
|
|
1896
|
+
* Creates the render root for the element.
|
|
1897
|
+
* Returns the element itself to render content in light DOM.
|
|
1898
|
+
*
|
|
1899
|
+
* @returns The element itself (not a shadow root)
|
|
1900
|
+
*/
|
|
1901
|
+
createRenderRoot() {
|
|
1902
|
+
return this;
|
|
1903
|
+
}
|
|
1904
|
+
};
|
|
1905
|
+
yt = /* @__PURE__ */ new WeakMap();
|
|
1906
|
+
mt = /* @__PURE__ */ new WeakMap();
|
|
1907
|
+
yr = /* @__PURE__ */ new WeakMap();
|
|
1908
|
+
mr = /* @__PURE__ */ new WeakMap();
|
|
1909
|
+
ae = /* @__PURE__ */ new WeakMap();
|
|
1910
|
+
oe = /* @__PURE__ */ new WeakMap();
|
|
1911
|
+
he = /* @__PURE__ */ new WeakMap();
|
|
1912
|
+
Xt([
|
|
1913
|
+
An()
|
|
1914
|
+
], Tt.prototype, "params", 2);
|
|
1915
|
+
Xt([
|
|
1916
|
+
C({ type: String })
|
|
1917
|
+
], Tt.prototype, "for", 2);
|
|
1918
|
+
Xt([
|
|
1919
|
+
C({ type: String, reflect: !0 })
|
|
1920
|
+
], Tt.prototype, "routePath", 2);
|
|
1921
|
+
Xt([
|
|
1922
|
+
C({ type: String, reflect: !0 })
|
|
1923
|
+
], Tt.prototype, "routeID", 2);
|
|
1924
|
+
Tt = Xt([
|
|
1925
|
+
Q("tha-router-outlet")
|
|
1926
|
+
], Tt);
|
|
1927
|
+
var _i = Object.getOwnPropertyDescriptor, Ds = (t) => {
|
|
1928
|
+
throw TypeError(t);
|
|
1929
|
+
}, yi = (t, e, r, s) => {
|
|
1930
|
+
for (var n = s > 1 ? void 0 : s ? _i(e, r) : e, i = t.length - 1, a; i >= 0; i--)
|
|
1931
|
+
(a = t[i]) && (n = a(n) || n);
|
|
1932
|
+
return n;
|
|
1933
|
+
}, Ms = (t, e, r) => e.has(t) || Ds("Cannot " + r), T = (t, e, r) => (Ms(t, e, "read from private field"), r ? r.call(t) : e.get(t)), j = (t, e, r) => e.has(t) ? Ds("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), lr = (t, e, r, s) => (Ms(t, e, "write to private field"), e.set(t, r), r), le, ue, de, Dt, pe, Mt, fe, Wt;
|
|
1934
|
+
let os = class extends Nr(jt) {
|
|
1935
|
+
constructor() {
|
|
1936
|
+
super(...arguments), j(this, le, new MutationObserver((t) => {
|
|
1937
|
+
t.filter((r) => r.type === "childList").length && T(this, pe).set(
|
|
1938
|
+
Array.from(this.children).filter((r) => r instanceof Ue).map((r) => new WeakRef(r))
|
|
1939
|
+
);
|
|
1940
|
+
})), j(this, ue, I), j(this, de, I), j(this, Dt, I), j(this, pe, U([])), j(this, Mt, U(null)), j(this, fe, U(null)), j(this, Wt, (t) => {
|
|
1941
|
+
const e = T(this, pe).get().map((r) => r.deref()).filter(Boolean);
|
|
1942
|
+
for (const r of e) {
|
|
1943
|
+
const s = r[Ie];
|
|
1944
|
+
if (s != null && s.test({ pathname: t.location.pathname })) {
|
|
1945
|
+
T(this, Mt).set(new WeakRef(r));
|
|
1946
|
+
return;
|
|
1947
|
+
}
|
|
1948
|
+
}
|
|
1949
|
+
T(this, Mt).set(null);
|
|
1950
|
+
});
|
|
1951
|
+
}
|
|
1952
|
+
/**
|
|
1953
|
+
* Lifecycle callback when the element is connected to the DOM.
|
|
1954
|
+
* Sets up observers, effects, and history listeners.
|
|
1955
|
+
*/
|
|
1956
|
+
connectedCallback() {
|
|
1957
|
+
super.connectedCallback(), T(this, le).observe(this, { childList: !0 }), lr(this, ue, this.updateEffect(() => {
|
|
1958
|
+
var r, s;
|
|
1959
|
+
const t = ((r = T(this, Mt).get()) == null ? void 0 : r.deref()) ?? null, e = ((s = T(this, fe).get()) == null ? void 0 : s.deref()) ?? null;
|
|
1960
|
+
e == null || e[Rs](t);
|
|
1961
|
+
})), lr(this, de, this.updateEffect(() => {
|
|
1962
|
+
const t = this[st].get();
|
|
1963
|
+
T(this, Dt).call(this), T(this, Wt).call(this, {
|
|
1964
|
+
location: this[st].get().location,
|
|
1965
|
+
action: "POP"
|
|
1966
|
+
}), lr(this, Dt, t ? t.listen(T(this, Wt)) : I);
|
|
1967
|
+
})), Rr(() => {
|
|
1968
|
+
T(this, Wt).call(this, {
|
|
1969
|
+
location: this[st].get().location,
|
|
1970
|
+
action: "POP"
|
|
1971
|
+
});
|
|
1972
|
+
});
|
|
1973
|
+
}
|
|
1974
|
+
/**
|
|
1975
|
+
* Assigns a router outlet to this router.
|
|
1976
|
+
* The outlet will be used to render the active route's content.
|
|
1977
|
+
*
|
|
1978
|
+
* @param outlet - The outlet element to assign, or null to unassign
|
|
1979
|
+
* @internal
|
|
1980
|
+
*/
|
|
1981
|
+
assignOutlet(t) {
|
|
1982
|
+
T(this, fe).set(t ? new WeakRef(t) : null);
|
|
1983
|
+
}
|
|
1984
|
+
/**
|
|
1985
|
+
* Lifecycle callback when the element is disconnected from the DOM.
|
|
1986
|
+
* Cleans up all observers, effects, and listeners.
|
|
1987
|
+
*/
|
|
1988
|
+
disconnectedCallback() {
|
|
1989
|
+
super.disconnectedCallback();
|
|
1990
|
+
try {
|
|
1991
|
+
T(this, ue).call(this), T(this, de).call(this);
|
|
1992
|
+
} catch {
|
|
1993
|
+
}
|
|
1994
|
+
T(this, le).disconnect(), T(this, Dt).call(this);
|
|
1995
|
+
}
|
|
1996
|
+
/**
|
|
1997
|
+
* Creates the render root for the element.
|
|
1998
|
+
* Returns the element itself to render children in light DOM.
|
|
1999
|
+
*
|
|
2000
|
+
* @returns The element itself (not a shadow root)
|
|
2001
|
+
*/
|
|
2002
|
+
createRenderRoot() {
|
|
2003
|
+
return this;
|
|
2004
|
+
}
|
|
2005
|
+
};
|
|
2006
|
+
le = /* @__PURE__ */ new WeakMap();
|
|
2007
|
+
ue = /* @__PURE__ */ new WeakMap();
|
|
2008
|
+
de = /* @__PURE__ */ new WeakMap();
|
|
2009
|
+
Dt = /* @__PURE__ */ new WeakMap();
|
|
2010
|
+
pe = /* @__PURE__ */ new WeakMap();
|
|
2011
|
+
Mt = /* @__PURE__ */ new WeakMap();
|
|
2012
|
+
fe = /* @__PURE__ */ new WeakMap();
|
|
2013
|
+
Wt = /* @__PURE__ */ new WeakMap();
|
|
2014
|
+
(() => {
|
|
2015
|
+
const t = document.createElement("style");
|
|
2016
|
+
t.setAttribute("type", "text/css"), t.setAttribute("data-id", "tha-router-styles"), t.textContent = Fe`
|
|
2017
|
+
tha-router {
|
|
2018
|
+
& > :not(tha-router-outlet) {
|
|
2019
|
+
display: none;
|
|
2020
|
+
}
|
|
2021
|
+
}
|
|
2022
|
+
`.toString(), document.head.appendChild(t);
|
|
2023
|
+
})();
|
|
2024
|
+
os = yi([
|
|
2025
|
+
Q("tha-router")
|
|
2026
|
+
], os);
|
|
2027
|
+
function mi(t) {
|
|
2028
|
+
return !!t;
|
|
2029
|
+
}
|
|
2030
|
+
function hs(t) {
|
|
2031
|
+
return t.filter(mi);
|
|
2032
|
+
}
|
|
2033
|
+
var $i = Object.defineProperty, wi = Object.getOwnPropertyDescriptor, Ws = (t) => {
|
|
2034
|
+
throw TypeError(t);
|
|
2035
|
+
}, Dr = (t, e, r, s) => {
|
|
2036
|
+
for (var n = s > 1 ? void 0 : s ? wi(e, r) : e, i = t.length - 1, a; i >= 0; i--)
|
|
2037
|
+
(a = t[i]) && (n = (s ? a(e, r, n) : a(n)) || n);
|
|
2038
|
+
return s && n && $i(e, r, n), n;
|
|
2039
|
+
}, Ls = (t, e, r) => e.has(t) || Ws("Cannot " + r), ht = (t, e, r) => (Ls(t, e, "read from private field"), r ? r.call(t) : e.get(t)), Nt = (t, e, r) => e.has(t) ? Ws("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), cs = (t, e, r, s) => (Ls(t, e, "write to private field"), e.set(t, r), r), ve, ge, _e, $r, ye;
|
|
2040
|
+
let Be = class extends Nr(jt) {
|
|
2041
|
+
constructor() {
|
|
2042
|
+
super(...arguments), this.to = null, this.active = !1, Nt(this, ve, I), Nt(this, ge, I), Nt(this, _e, U(null)), Nt(this, $r, K(() => {
|
|
2043
|
+
const t = ht(this, _e).get();
|
|
2044
|
+
if (!t || t === "back" || t === "forward") return null;
|
|
2045
|
+
try {
|
|
2046
|
+
return new URLPattern({ pathname: t });
|
|
2047
|
+
} catch {
|
|
2048
|
+
return null;
|
|
2049
|
+
}
|
|
2050
|
+
})), Nt(this, ye, (t) => {
|
|
2051
|
+
var n;
|
|
2052
|
+
const e = this[st].get();
|
|
2053
|
+
if (console.log(this[At].get()), this.to === "back") return e.back();
|
|
2054
|
+
if (this.to === "forward") return e.forward();
|
|
2055
|
+
const r = e.location.pathname + e.location.search + e.location.hash;
|
|
2056
|
+
let s = this.to;
|
|
2057
|
+
if (s != null && s.startsWith(".")) {
|
|
2058
|
+
const i = hs(r.split("/")), a = hs(s.split("/"));
|
|
2059
|
+
for (const h of a)
|
|
2060
|
+
h === ".." ? i.pop() : h !== "." && i.push(h);
|
|
2061
|
+
s = "/" + i.join("/");
|
|
2062
|
+
}
|
|
2063
|
+
s = s == null ? void 0 : s.replaceAll("//", "/"), (n = this[st].get()) == null || n.push(s || "/");
|
|
2064
|
+
});
|
|
2065
|
+
}
|
|
2066
|
+
/**
|
|
2067
|
+
* Lifecycle callback when the element is connected to the DOM.
|
|
2068
|
+
* Sets up click listener and active state tracking effect.
|
|
2069
|
+
*/
|
|
2070
|
+
connectedCallback() {
|
|
2071
|
+
super.connectedCallback(), this.addEventListener("click", ht(this, ye)), cs(this, ve, this.updateEffect(() => {
|
|
2072
|
+
const t = this[st].get(), e = ht(this, $r).get();
|
|
2073
|
+
this.active = (e == null ? void 0 : e.test({ pathname: (t == null ? void 0 : t.location.pathname) ?? "" })) ?? !1, cs(this, ge, (t == null ? void 0 : t.listen(() => {
|
|
2074
|
+
this.active = (e == null ? void 0 : e.test({ pathname: t.location.pathname })) ?? !1;
|
|
2075
|
+
})) ?? I);
|
|
2076
|
+
}));
|
|
2077
|
+
}
|
|
2078
|
+
/**
|
|
2079
|
+
* Lifecycle callback when an attribute changes.
|
|
2080
|
+
* Updates signals when history or to attributes change.
|
|
2081
|
+
*
|
|
2082
|
+
* @param name - The attribute name that changed
|
|
2083
|
+
* @param _old - The old attribute value
|
|
2084
|
+
* @param value - The new attribute value
|
|
2085
|
+
*/
|
|
2086
|
+
attributeChangedCallback(t, e, r) {
|
|
2087
|
+
switch (super.attributeChangedCallback(t, e, r), t) {
|
|
2088
|
+
case "to":
|
|
2089
|
+
ht(this, _e).set(r);
|
|
2090
|
+
break;
|
|
2091
|
+
}
|
|
2092
|
+
}
|
|
2093
|
+
/**
|
|
2094
|
+
* Lifecycle callback when the element is disconnected from the DOM.
|
|
2095
|
+
* Cleans up effects, listeners, and event handlers.
|
|
2096
|
+
*/
|
|
2097
|
+
disconnectedCallback() {
|
|
2098
|
+
super.disconnectedCallback();
|
|
2099
|
+
try {
|
|
2100
|
+
ht(this, ve).call(this);
|
|
2101
|
+
} catch {
|
|
2102
|
+
}
|
|
2103
|
+
ht(this, ge).call(this), this.removeEventListener("click", ht(this, ye));
|
|
2104
|
+
}
|
|
2105
|
+
/**
|
|
2106
|
+
* Creates the render root for the element.
|
|
2107
|
+
* Returns the element itself to render content in light DOM.
|
|
2108
|
+
*
|
|
2109
|
+
* @returns The element itself (not a shadow root)
|
|
2110
|
+
*/
|
|
2111
|
+
createRenderRoot() {
|
|
2112
|
+
return this;
|
|
2113
|
+
}
|
|
2114
|
+
};
|
|
2115
|
+
ve = /* @__PURE__ */ new WeakMap();
|
|
2116
|
+
ge = /* @__PURE__ */ new WeakMap();
|
|
2117
|
+
_e = /* @__PURE__ */ new WeakMap();
|
|
2118
|
+
$r = /* @__PURE__ */ new WeakMap();
|
|
2119
|
+
ye = /* @__PURE__ */ new WeakMap();
|
|
2120
|
+
(() => {
|
|
2121
|
+
const t = document.createElement("style");
|
|
2122
|
+
t.setAttribute("type", "text/css"), t.setAttribute("data-id", "tha-router-link-styles"), t.textContent = Fe`
|
|
2123
|
+
tha-router-link {
|
|
2124
|
+
cursor: pointer;
|
|
2125
|
+
}
|
|
2126
|
+
`.toString(), document.head.appendChild(t);
|
|
2127
|
+
})();
|
|
2128
|
+
Dr([
|
|
2129
|
+
C({ type: String })
|
|
2130
|
+
], Be.prototype, "to", 2);
|
|
2131
|
+
Dr([
|
|
2132
|
+
C({ type: Boolean, reflect: !0 })
|
|
2133
|
+
], Be.prototype, "active", 2);
|
|
2134
|
+
Be = Dr([
|
|
2135
|
+
Q("tha-router-link")
|
|
2136
|
+
], Be);
|
|
2137
|
+
var Ei = Object.getOwnPropertyDescriptor, Is = (t) => {
|
|
2138
|
+
throw TypeError(t);
|
|
2139
|
+
}, Ai = (t, e, r, s) => {
|
|
2140
|
+
for (var n = s > 1 ? void 0 : s ? Ei(e, r) : e, i = t.length - 1, a; i >= 0; i--)
|
|
2141
|
+
(a = t[i]) && (n = a(n) || n);
|
|
2142
|
+
return n;
|
|
2143
|
+
}, Us = (t, e, r) => e.has(t) || Is("Cannot " + r), Ci = (t, e, r) => (Us(t, e, "read from private field"), r ? r.call(t) : e.get(t)), Si = (t, e, r) => e.has(t) ? Is("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), bi = (t, e, r, s) => (Us(t, e, "write to private field"), e.set(t, r), r), me;
|
|
2144
|
+
let ls = class extends Nr(jt) {
|
|
2145
|
+
constructor() {
|
|
2146
|
+
super(...arguments), Si(this, me, I);
|
|
2147
|
+
}
|
|
2148
|
+
/**
|
|
2149
|
+
* Called when the element is connected to the DOM.
|
|
2150
|
+
*
|
|
2151
|
+
* - If in `<head>`: Sets up a reactive effect to update global history
|
|
2152
|
+
* - If in `<body>`: Only provides history to descendants (no special setup)
|
|
2153
|
+
*/
|
|
2154
|
+
connectedCallback() {
|
|
2155
|
+
super.connectedCallback(), document.head.contains(this) && (console.log("ThaRouterConfig: Setting global history type to", this[At].get()), bi(this, me, this.updateEffect(() => {
|
|
2156
|
+
xr.set(this[At].get());
|
|
2157
|
+
})));
|
|
2158
|
+
}
|
|
2159
|
+
/**
|
|
2160
|
+
* Called when the element is disconnected from the DOM.
|
|
2161
|
+
*
|
|
2162
|
+
* Cleans up the global history effect if it was set up.
|
|
2163
|
+
*/
|
|
2164
|
+
disconnectedCallback() {
|
|
2165
|
+
super.disconnectedCallback();
|
|
2166
|
+
try {
|
|
2167
|
+
Ci(this, me).call(this);
|
|
2168
|
+
} catch {
|
|
2169
|
+
}
|
|
2170
|
+
}
|
|
2171
|
+
/**
|
|
2172
|
+
* Creates the render root for the element.
|
|
2173
|
+
* Returns the element itself to render children in light DOM.
|
|
2174
|
+
*
|
|
2175
|
+
* @returns The element itself (not a shadow root)
|
|
2176
|
+
*/
|
|
2177
|
+
createRenderRoot() {
|
|
2178
|
+
return this;
|
|
2179
|
+
}
|
|
2180
|
+
};
|
|
2181
|
+
me = /* @__PURE__ */ new WeakMap();
|
|
2182
|
+
ls = Ai([
|
|
2183
|
+
Q("tha-router-config")
|
|
2184
|
+
], ls);
|
|
2185
|
+
var Pi = Object.defineProperty, ki = Object.getOwnPropertyDescriptor, Hs = (t) => {
|
|
2186
|
+
throw TypeError(t);
|
|
2187
|
+
}, zs = (t, e, r, s) => {
|
|
2188
|
+
for (var n = s > 1 ? void 0 : s ? ki(e, r) : e, i = t.length - 1, a; i >= 0; i--)
|
|
2189
|
+
(a = t[i]) && (n = (s ? a(e, r, n) : a(n)) || n);
|
|
2190
|
+
return s && n && Pi(e, r, n), n;
|
|
2191
|
+
}, Oi = (t, e, r) => e.has(t) || Hs("Cannot " + r), Rt = (t, e, r) => (Oi(t, e, "read from private field"), r ? r.call(t) : e.get(t)), ur = (t, e, r) => e.has(t) ? Hs("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), $e, we, wr;
|
|
2192
|
+
let Er = class extends jt {
|
|
2193
|
+
constructor() {
|
|
2194
|
+
super(...arguments), ur(this, $e, U(null)), ur(this, we, U("")), ur(this, wr, K(() => {
|
|
2195
|
+
var t, e;
|
|
2196
|
+
return (e = (t = Rt(this, $e).get()) == null ? void 0 : t[ce]) == null ? void 0 : e.get()[Rt(this, we).get()];
|
|
2197
|
+
})), this.name = "";
|
|
2198
|
+
}
|
|
2199
|
+
/**
|
|
2200
|
+
* Lifecycle callback when element is connected to the DOM.
|
|
2201
|
+
*
|
|
2202
|
+
* Finds the parent `<tha-router-outlet>` and stores a reference.
|
|
2203
|
+
* Throws an error if not used within an outlet.
|
|
2204
|
+
*
|
|
2205
|
+
* @throws {Error} If no parent tha-router-outlet is found
|
|
2206
|
+
*/
|
|
2207
|
+
connectedCallback() {
|
|
2208
|
+
super.connectedCallback();
|
|
2209
|
+
const t = this.closest("tha-router-outlet");
|
|
2210
|
+
if (!t)
|
|
2211
|
+
throw new Error("<tha-router-param> must be used within a <tha-router-outlet>.");
|
|
2212
|
+
Rt(this, $e).set(t);
|
|
2213
|
+
}
|
|
2214
|
+
/**
|
|
2215
|
+
* Lifecycle callback when observed attributes change.
|
|
2216
|
+
*
|
|
2217
|
+
* Updates the internal name signal when the 'name' attribute changes,
|
|
2218
|
+
* which triggers the computed value signal to recalculate and re-render.
|
|
2219
|
+
*
|
|
2220
|
+
* @param name - The attribute name that changed
|
|
2221
|
+
* @param _old - Previous attribute value (unused)
|
|
2222
|
+
* @param value - New attribute value
|
|
2223
|
+
*/
|
|
2224
|
+
attributeChangedCallback(t, e, r) {
|
|
2225
|
+
switch (super.attributeChangedCallback(t, e, r), t) {
|
|
2226
|
+
case "name":
|
|
2227
|
+
Rt(this, we).set(r ?? "");
|
|
2228
|
+
break;
|
|
2229
|
+
}
|
|
2230
|
+
}
|
|
2231
|
+
/**
|
|
2232
|
+
* Renders the parameter value.
|
|
2233
|
+
*
|
|
2234
|
+
* The value is extracted from the outlet's params signal and
|
|
2235
|
+
* displayed as text content. Automatically updates when the
|
|
2236
|
+
* route changes.
|
|
2237
|
+
*
|
|
2238
|
+
* @returns The parameter value as a template result
|
|
2239
|
+
*/
|
|
2240
|
+
render() {
|
|
2241
|
+
return ii`${Rt(this, wr)}`;
|
|
2242
|
+
}
|
|
2243
|
+
};
|
|
2244
|
+
$e = /* @__PURE__ */ new WeakMap();
|
|
2245
|
+
we = /* @__PURE__ */ new WeakMap();
|
|
2246
|
+
wr = /* @__PURE__ */ new WeakMap();
|
|
2247
|
+
zs([
|
|
2248
|
+
C({ type: String })
|
|
2249
|
+
], Er.prototype, "name", 2);
|
|
2250
|
+
Er = zs([
|
|
2251
|
+
Q("tha-router-param")
|
|
2252
|
+
], Er);
|
|
2253
|
+
const Vs = Symbol("Accept Drop"), Bs = Symbol("Register Handle"), Gs = Symbol("Unregister Handle");
|
|
2254
|
+
var Ge, qe, Ye, qs;
|
|
2255
|
+
const Et = class Et extends DragEvent {
|
|
2256
|
+
constructor(r, { dragTarget: s, dropzoneTarget: n }, i) {
|
|
2257
|
+
super(r, i);
|
|
2258
|
+
gt(this, Ye);
|
|
2259
|
+
this.dragTarget = s, this.dropzoneTarget = n;
|
|
2260
|
+
}
|
|
2261
|
+
get name() {
|
|
2262
|
+
var r;
|
|
2263
|
+
return (r = it(this, Ye, qs).deref()) == null ? void 0 : r.name;
|
|
2264
|
+
}
|
|
2265
|
+
get dragData() {
|
|
2266
|
+
var r;
|
|
2267
|
+
return (r = this.dragTarget.deref()) == null ? void 0 : r.dragData;
|
|
2268
|
+
}
|
|
2269
|
+
acceptDrop(r) {
|
|
2270
|
+
var s;
|
|
2271
|
+
(s = this.dragTarget.deref()) == null || s[Vs](this.dropzoneTarget, r);
|
|
2272
|
+
}
|
|
2273
|
+
};
|
|
2274
|
+
Ge = new WeakMap(), qe = new WeakMap(), Ye = new WeakSet(), qs = function() {
|
|
2275
|
+
return it(Et, qe).includes(this.type) ? this.dropzoneTarget : it(Et, Ge).includes(this.type) ? this.dragTarget : new WeakRef(this.target);
|
|
2276
|
+
}, gt(Et, Ge, ["thadrag", "thadragstart", "thadragend", "thadropzoneenter", "thadropzoneleave", "thadropzoneover", "thadropped"]), gt(Et, qe, ["thadrop", "thadropend", "thadragenter", "thadragleave", "thadragover"]);
|
|
2277
|
+
let pt = Et;
|
|
2278
|
+
var Ti = Object.defineProperty, xi = Object.getOwnPropertyDescriptor, Ys = (t) => {
|
|
2279
|
+
throw TypeError(t);
|
|
2280
|
+
}, q = (t, e, r, s) => {
|
|
2281
|
+
for (var n = s > 1 ? void 0 : s ? xi(e, r) : e, i = t.length - 1, a; i >= 0; i--)
|
|
2282
|
+
(a = t[i]) && (n = (s ? a(e, r, n) : a(n)) || n);
|
|
2283
|
+
return s && n && Ti(e, r, n), n;
|
|
2284
|
+
}, Mr = (t, e, r) => e.has(t) || Ys("Cannot " + r), x = (t, e, r) => (Mr(t, e, "read from private field"), r ? r.call(t) : e.get(t)), F = (t, e, r) => e.has(t) ? Ys("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), dr = (t, e, r, s) => (Mr(t, e, "write to private field"), e.set(t, r), r), ct = (t, e, r) => (Mr(t, e, "access private method"), r), Lt, Ee, Ct, J, Fs, Ae, Ce, Se, be, Pe, Js, Zs, Ks, Ar, Qs;
|
|
2285
|
+
let b = class extends Z {
|
|
2286
|
+
constructor() {
|
|
2287
|
+
super(...arguments), F(this, J), this.dragData = {}, this.preDragData = {
|
|
2288
|
+
boundingRect: null,
|
|
2289
|
+
dragStartEvent: null,
|
|
2290
|
+
styles: {
|
|
2291
|
+
pointerEvents: ""
|
|
2292
|
+
}
|
|
2293
|
+
}, F(this, Lt, null), F(this, Ee, null), F(this, Ct, /* @__PURE__ */ new Set()), this.draggingStrategy = "move", this.dragging = !1, this.dragend = !1, this.draggedOver = null, this.dropAccepted = !1, F(this, Ae, (t) => {
|
|
2294
|
+
var e;
|
|
2295
|
+
if (!ct(this, J, Qs).call(this, t)) return t.preventDefault();
|
|
2296
|
+
t.stopPropagation(), (e = t.dataTransfer) == null || e.setDragImage(b.TRANSPARENT_IMAGE, 0, 0), t.dataTransfer.effectAllowed = this.draggingStrategy, document.addEventListener("dragover", ct(this, J, Ar)), ct(this, J, Zs).call(this, t), ct(this, J, Ks).call(this), Rr().then(() => {
|
|
2297
|
+
if (this.style.pointerEvents = "none", this.dragging = !0, this.replaceClone) {
|
|
2298
|
+
const r = ct(this, J, Js).call(this);
|
|
2299
|
+
dr(this, Ee, new WeakRef(r)), this.parentElement.insertBefore(r, this.nextSibling);
|
|
2300
|
+
}
|
|
2301
|
+
this.dispatchEvent(new pt("thadragstart", { dragTarget: new WeakRef(this) }, t));
|
|
2302
|
+
});
|
|
2303
|
+
}), F(this, Ce, (t) => {
|
|
2304
|
+
var s;
|
|
2305
|
+
document.removeEventListener("dragover", ct(this, J, Ar)), this.dragend = !0;
|
|
2306
|
+
const e = (s = getComputedStyle(this).transitionDuration.match(/\d*\.?\d+/g)) == null ? void 0 : s.map(Number).some((n) => n > 0), r = () => {
|
|
2307
|
+
var a, h;
|
|
2308
|
+
this.replaceClone && ((a = this.clone) == null || a.remove()), this.style.pointerEvents = this.preDragData.styles.pointerEvents, ["--tha-width", "--tha-height", "--tha-left", "--tha-top", "--tha-x", "--tha-y", "--tha-cx", "--tha-cy"].forEach((o) => {
|
|
2309
|
+
this.style.removeProperty(o);
|
|
2310
|
+
}), ["width", "height", "left", "right", "top", "bottom"].forEach((o) => {
|
|
2311
|
+
this.style.removeProperty(`--tha-target-${o}`);
|
|
2312
|
+
});
|
|
2313
|
+
const n = x(this, Lt), i = this.dropAccepted;
|
|
2314
|
+
this.dragging = !1, this.dragend = !1, this.draggedOver = null, this.dropAccepted = !1, dr(this, Lt, null), i && n && ((h = n.deref()) == null || h.dispatchEvent(new pt(
|
|
2315
|
+
"thadropend",
|
|
2316
|
+
{ dragTarget: new WeakRef(this), dropzoneTarget: n },
|
|
2317
|
+
t
|
|
2318
|
+
))), this.dispatchEvent(new pt("thadragend", { dragTarget: new WeakRef(this) }, t));
|
|
2319
|
+
};
|
|
2320
|
+
e ? this.addEventListener("transitionend", r, { once: !0 }) : r();
|
|
2321
|
+
}), F(this, Se, (t) => {
|
|
2322
|
+
const { x: e, y: r } = t;
|
|
2323
|
+
this.style.setProperty("--tha-cx", `${e}px`), this.style.setProperty("--tha-cy", `${r}px`);
|
|
2324
|
+
}), F(this, be, (t) => {
|
|
2325
|
+
var e, r;
|
|
2326
|
+
this.draggedOver = ((r = (e = t.dropzoneTarget) == null ? void 0 : e.deref()) == null ? void 0 : r.name) ?? "";
|
|
2327
|
+
}), F(this, Pe, () => {
|
|
2328
|
+
this.draggedOver = null;
|
|
2329
|
+
});
|
|
2330
|
+
}
|
|
2331
|
+
/**
|
|
2332
|
+
* Returns the clone of the element if it exists.
|
|
2333
|
+
* This is used to access the clone during drag operations.
|
|
2334
|
+
*/
|
|
2335
|
+
get clone() {
|
|
2336
|
+
return x(this, Ee).deref();
|
|
2337
|
+
}
|
|
2338
|
+
connectedCallback() {
|
|
2339
|
+
super.connectedCallback(), this.draggable = !0, ct(this, J, Fs).call(this), this.addEventListener("dragstart", x(this, Ae)), this.addEventListener("dragend", x(this, Ce)), this.addEventListener("drag", x(this, Se)), this.addEventListener("thadropzoneenter", x(this, be)), this.addEventListener("thadropzoneleave", x(this, Pe));
|
|
2340
|
+
}
|
|
2341
|
+
disconnectedCallback() {
|
|
2342
|
+
super.disconnectedCallback(), this.removeEventListener("dragstart", x(this, Ae)), this.removeEventListener("dragend", x(this, Ce)), this.removeEventListener("drag", x(this, Se)), this.removeEventListener("thadropzoneenter", x(this, be)), this.removeEventListener("thadropzoneleave", x(this, Pe));
|
|
2343
|
+
}
|
|
2344
|
+
render() {
|
|
2345
|
+
return Je`<slot></slot>`;
|
|
2346
|
+
}
|
|
2347
|
+
/**
|
|
2348
|
+
* Accepts a drop zone and an optional rectangle for the drop area.
|
|
2349
|
+
* @param dropzone The drop zone element being accepted.
|
|
2350
|
+
* @param rect The bounding rectangle of the drop area.
|
|
2351
|
+
* @returns
|
|
2352
|
+
*/
|
|
2353
|
+
[Vs](t, e) {
|
|
2354
|
+
if (this.dropAccepted = !0, dr(this, Lt, t), !e) return;
|
|
2355
|
+
const { width: r, height: s, left: n, right: i, top: a, bottom: h } = e;
|
|
2356
|
+
for (const o in { width: r, height: s, left: n, right: i, top: a, bottom: h })
|
|
2357
|
+
this.style.setProperty(`--tha-target-${o}`, `${e[o]}px`);
|
|
2358
|
+
}
|
|
2359
|
+
/**
|
|
2360
|
+
* Registers a drag handle element.
|
|
2361
|
+
* @param handle The drag handle element to register.
|
|
2362
|
+
*/
|
|
2363
|
+
[Bs](t) {
|
|
2364
|
+
x(this, Ct).add(t);
|
|
2365
|
+
}
|
|
2366
|
+
/**
|
|
2367
|
+
* Unregisters a drag handle element.
|
|
2368
|
+
* @param handle The drag handle element to unregister.
|
|
2369
|
+
*/
|
|
2370
|
+
[Gs](t) {
|
|
2371
|
+
x(this, Ct).delete(t);
|
|
2372
|
+
}
|
|
2373
|
+
};
|
|
2374
|
+
Lt = /* @__PURE__ */ new WeakMap();
|
|
2375
|
+
Ee = /* @__PURE__ */ new WeakMap();
|
|
2376
|
+
Ct = /* @__PURE__ */ new WeakMap();
|
|
2377
|
+
J = /* @__PURE__ */ new WeakSet();
|
|
2378
|
+
Fs = function() {
|
|
2379
|
+
b.DRAG_DATA_OBSERVER.observe(this, { attributes: !0 });
|
|
2380
|
+
for (const { name: t, value: e } of Object.values(this.attributes).filter((r) => r.name.startsWith("data-drag-")))
|
|
2381
|
+
this.dragData[t.replace("data-drag-", "")] = e;
|
|
2382
|
+
};
|
|
2383
|
+
Ae = /* @__PURE__ */ new WeakMap();
|
|
2384
|
+
Ce = /* @__PURE__ */ new WeakMap();
|
|
2385
|
+
Se = /* @__PURE__ */ new WeakMap();
|
|
2386
|
+
be = /* @__PURE__ */ new WeakMap();
|
|
2387
|
+
Pe = /* @__PURE__ */ new WeakMap();
|
|
2388
|
+
Js = function() {
|
|
2389
|
+
const t = document.createElement("tha-drag-clone");
|
|
2390
|
+
return Object.values(this.attributes).filter((e) => !["dragging", "replaceclone", "draggable"].includes(e.name)).forEach((e) => {
|
|
2391
|
+
t.attributes.setNamedItem(e.cloneNode());
|
|
2392
|
+
}), this.childNodes.forEach((e) => {
|
|
2393
|
+
t.appendChild(e.cloneNode(!0));
|
|
2394
|
+
}), t;
|
|
2395
|
+
};
|
|
2396
|
+
Zs = function(t) {
|
|
2397
|
+
this.preDragData.boundingRect = this.getBoundingClientRect(), this.preDragData.dragStartEvent = t, this.preDragData.styles.pointerEvents = this.style.pointerEvents;
|
|
2398
|
+
};
|
|
2399
|
+
Ks = function() {
|
|
2400
|
+
const {
|
|
2401
|
+
boundingRect: { width: t, height: e, left: r, top: s },
|
|
2402
|
+
dragStartEvent: { x: n, y: i }
|
|
2403
|
+
} = this.preDragData, a = { width: t, height: e, left: r, top: s, x: n, y: i };
|
|
2404
|
+
for (const h in a)
|
|
2405
|
+
this.style.setProperty(`--tha-${h}`, `${a[h]}px`);
|
|
2406
|
+
};
|
|
2407
|
+
Ar = function(t) {
|
|
2408
|
+
t.preventDefault();
|
|
2409
|
+
};
|
|
2410
|
+
Qs = function(t) {
|
|
2411
|
+
return this.disabled ? !1 : !!(!x(this, Ct).size || x(this, Ct).has(t.target));
|
|
2412
|
+
};
|
|
2413
|
+
b.DRAG_DATA_OBSERVER = new MutationObserver((t) => {
|
|
2414
|
+
for (const { attributeName: e, target: r } of t) {
|
|
2415
|
+
if (!(e != null && e.startsWith("data-drag-"))) continue;
|
|
2416
|
+
const s = r;
|
|
2417
|
+
s.dragData[e.replace("data-drag-", "")] = s.getAttribute(e);
|
|
2418
|
+
}
|
|
2419
|
+
});
|
|
2420
|
+
b.styles = Fe`
|
|
2421
|
+
:host {
|
|
2422
|
+
--tha-diff-x: calc(var(--tha-cx) - var(--tha-x));
|
|
2423
|
+
--tha-diff-y: calc(var(--tha-cy) - var(--tha-y));
|
|
2424
|
+
}
|
|
2425
|
+
|
|
2426
|
+
:host([draggingstrategy="move"]),
|
|
2427
|
+
:host([draggingstrategy="copyMove"]) {
|
|
2428
|
+
transition-duration: .2s;
|
|
2429
|
+
transition-timing-function: ease-out;
|
|
2430
|
+
transition-property: none;
|
|
2431
|
+
}
|
|
2432
|
+
|
|
2433
|
+
:host([draggingstrategy="move"][dragging]),
|
|
2434
|
+
:host([draggingstrategy="copyMove"][dragging]) {
|
|
2435
|
+
position: fixed;
|
|
2436
|
+
width: var(--tha-width);
|
|
2437
|
+
height: var(--tha-height);
|
|
2438
|
+
left: calc(var(--tha-left) + var(--tha-diff-x) + var(--tha-offset-x));
|
|
2439
|
+
top: calc(var(--tha-top) + var(--tha-diff-y) + var(--tha-offset-y));
|
|
2440
|
+
transform-origin: calc(var(--tha-x) - var(--tha-left)) calc(var(--tha-y) - var(--tha-top));
|
|
2441
|
+
z-index: 100;
|
|
2442
|
+
}
|
|
2443
|
+
|
|
2444
|
+
:host([draggingstrategy="move"][dragend]),
|
|
2445
|
+
:host([draggingstrategy="copyMove"][dragend]) {
|
|
2446
|
+
left: var(--tha-left);
|
|
2447
|
+
top: var(--tha-top);
|
|
2448
|
+
transition-property: all;
|
|
2449
|
+
}
|
|
2450
|
+
|
|
2451
|
+
:host([draggingstrategy="move"][dragend][dropaccepted]),
|
|
2452
|
+
:host([draggingstrategy="copyMove"][dragend][dropaccepted]) {
|
|
2453
|
+
left: var(--tha-target-left);
|
|
2454
|
+
top: var(--tha-target-top);
|
|
2455
|
+
width: var(--tha-target-width);
|
|
2456
|
+
height: var(--tha-target-height);
|
|
2457
|
+
}
|
|
2458
|
+
`;
|
|
2459
|
+
(() => {
|
|
2460
|
+
b.TRANSPARENT_IMAGE = new Image(1, 1), b.TRANSPARENT_IMAGE.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z/C/HgAGgwJ/lK3Q6wAAAABJRU5ErkJggg==";
|
|
2461
|
+
const t = b.GLOBAL_STYLE = document.createElement("style");
|
|
2462
|
+
t.innerHTML = `
|
|
2463
|
+
@property --tha-offset-x {
|
|
2464
|
+
syntax: '<length>';
|
|
2465
|
+
initial-value: 0px;
|
|
2466
|
+
inherits: true;
|
|
2467
|
+
}
|
|
2468
|
+
|
|
2469
|
+
@property --tha-offset-y {
|
|
2470
|
+
syntax: '<length>';
|
|
2471
|
+
initial-value: 0px;
|
|
2472
|
+
inherits: true;
|
|
2473
|
+
}
|
|
2474
|
+
`, document.head.appendChild(t);
|
|
2475
|
+
})();
|
|
2476
|
+
q([
|
|
2477
|
+
C({ type: String })
|
|
2478
|
+
], b.prototype, "name", 2);
|
|
2479
|
+
q([
|
|
2480
|
+
C({ type: String, reflect: !0 })
|
|
2481
|
+
], b.prototype, "draggingStrategy", 2);
|
|
2482
|
+
q([
|
|
2483
|
+
C({ type: String })
|
|
2484
|
+
], b.prototype, "dragGroup", 2);
|
|
2485
|
+
q([
|
|
2486
|
+
C({ type: Boolean })
|
|
2487
|
+
], b.prototype, "replaceClone", 2);
|
|
2488
|
+
q([
|
|
2489
|
+
C({ type: Boolean, reflect: !0 })
|
|
2490
|
+
], b.prototype, "dragging", 2);
|
|
2491
|
+
q([
|
|
2492
|
+
C({ type: Boolean, reflect: !0 })
|
|
2493
|
+
], b.prototype, "dragend", 2);
|
|
2494
|
+
q([
|
|
2495
|
+
C({ type: String, reflect: !0 })
|
|
2496
|
+
], b.prototype, "draggedOver", 2);
|
|
2497
|
+
q([
|
|
2498
|
+
C({ type: Boolean, reflect: !0 })
|
|
2499
|
+
], b.prototype, "dropAccepted", 2);
|
|
2500
|
+
q([
|
|
2501
|
+
C({ type: Boolean, reflect: !0 })
|
|
2502
|
+
], b.prototype, "disabled", 2);
|
|
2503
|
+
b = q([
|
|
2504
|
+
Q("tha-drag")
|
|
2505
|
+
], b);
|
|
2506
|
+
var Ni = Object.defineProperty, Ri = Object.getOwnPropertyDescriptor, js = (t) => {
|
|
2507
|
+
throw TypeError(t);
|
|
2508
|
+
}, te = (t, e, r, s) => {
|
|
2509
|
+
for (var n = s > 1 ? void 0 : s ? Ri(e, r) : e, i = t.length - 1, a; i >= 0; i--)
|
|
2510
|
+
(a = t[i]) && (n = (s ? a(e, r, n) : a(n)) || n);
|
|
2511
|
+
return s && n && Ni(e, r, n), n;
|
|
2512
|
+
}, Wr = (t, e, r) => e.has(t) || js("Cannot " + r), R = (t, e, r) => (Wr(t, e, "read from private field"), r ? r.call(t) : e.get(t)), X = (t, e, r) => e.has(t) ? js("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), Xs = (t, e, r, s) => (Wr(t, e, "write to private field"), e.set(t, r), r), tt = (t, e, r) => (Wr(t, e, "access private method"), r), us = (t, e, r, s) => ({
|
|
2513
|
+
set _(n) {
|
|
2514
|
+
Xs(t, e, n);
|
|
2515
|
+
},
|
|
2516
|
+
get _() {
|
|
2517
|
+
return R(t, e, s);
|
|
2518
|
+
}
|
|
2519
|
+
}), It, ke, $t, Oe, Te, xe, Ne, G, Ut, Ht;
|
|
2520
|
+
let Kt;
|
|
2521
|
+
document.addEventListener("thadragstart", (t) => {
|
|
2522
|
+
Kt = t;
|
|
2523
|
+
});
|
|
2524
|
+
let vt = class extends Z {
|
|
2525
|
+
constructor() {
|
|
2526
|
+
super(...arguments), X(this, G), X(this, It, 0), this.accept = [], this.name = "", this.itemDragged = null, this.acceptableDrag = !1, X(this, ke, (t) => {
|
|
2527
|
+
(!this.accept.length || this.accept.includes(t.name)) && (this.acceptableDrag = !0);
|
|
2528
|
+
}), X(this, $t, () => {
|
|
2529
|
+
this.itemDragged = null, this.acceptableDrag = !1, Xs(this, It, 0);
|
|
2530
|
+
}), X(this, Oe, (t) => {
|
|
2531
|
+
tt(this, G, Ut).call(this) && (++us(this, It)._ > 1 || (this.itemDragged = Kt.name ?? "", tt(this, G, Ht).call(this, "thadragenter", "thadropzoneenter", t)));
|
|
2532
|
+
}), X(this, Te, (t) => {
|
|
2533
|
+
tt(this, G, Ut).call(this) && (--us(this, It)._ > 0 || (this.itemDragged = null, tt(this, G, Ht).call(this, "thadragleave", "thadropzoneleave", t)));
|
|
2534
|
+
}), X(this, xe, (t) => {
|
|
2535
|
+
tt(this, G, Ut).call(this) && tt(this, G, Ht).call(this, "thadragover", "thadropzoneover", t);
|
|
2536
|
+
}), X(this, Ne, (t) => {
|
|
2537
|
+
tt(this, G, Ut).call(this) && tt(this, G, Ht).call(this, "thadrop", "thadropped", t);
|
|
2538
|
+
});
|
|
2539
|
+
}
|
|
2540
|
+
render() {
|
|
2541
|
+
return Je`<slot></slot>`;
|
|
2542
|
+
}
|
|
2543
|
+
connectedCallback() {
|
|
2544
|
+
super.connectedCallback(), document.addEventListener("thadragstart", R(this, ke)), document.addEventListener("thadragend", R(this, $t)), document.addEventListener("thadropend", R(this, $t)), this.addEventListener("dragenter", R(this, Oe)), this.addEventListener("dragleave", R(this, Te)), this.addEventListener("dragover", R(this, xe)), this.addEventListener("drop", R(this, Ne));
|
|
2545
|
+
}
|
|
2546
|
+
disconnectedCallback() {
|
|
2547
|
+
super.disconnectedCallback(), document.removeEventListener("thadragstart", R(this, ke)), document.removeEventListener("thadragend", R(this, $t)), document.removeEventListener("thadropend", R(this, $t)), this.removeEventListener("dragenter", R(this, Oe)), this.removeEventListener("dragleave", R(this, Te)), this.removeEventListener("dragover", R(this, xe)), this.removeEventListener("drop", R(this, Ne));
|
|
2548
|
+
}
|
|
2549
|
+
};
|
|
2550
|
+
It = /* @__PURE__ */ new WeakMap();
|
|
2551
|
+
ke = /* @__PURE__ */ new WeakMap();
|
|
2552
|
+
$t = /* @__PURE__ */ new WeakMap();
|
|
2553
|
+
Oe = /* @__PURE__ */ new WeakMap();
|
|
2554
|
+
Te = /* @__PURE__ */ new WeakMap();
|
|
2555
|
+
xe = /* @__PURE__ */ new WeakMap();
|
|
2556
|
+
Ne = /* @__PURE__ */ new WeakMap();
|
|
2557
|
+
G = /* @__PURE__ */ new WeakSet();
|
|
2558
|
+
Ut = function() {
|
|
2559
|
+
return !Kt.name || !this.accept.length || this.accept.includes(Kt.name);
|
|
2560
|
+
};
|
|
2561
|
+
Ht = function(t, e, r) {
|
|
2562
|
+
var i;
|
|
2563
|
+
const { dragTarget: s } = Kt, n = new WeakRef(this);
|
|
2564
|
+
this.dispatchEvent(new pt(t, { dragTarget: s, dropzoneTarget: n }, r)), (i = s.deref()) == null || i.dispatchEvent(new pt(e, { dragTarget: s, dropzoneTarget: n }, r));
|
|
2565
|
+
};
|
|
2566
|
+
vt.styles = Fe``;
|
|
2567
|
+
te([
|
|
2568
|
+
C({ converter: (t) => (t ?? "").split(",").map((e) => e.trim()) })
|
|
2569
|
+
], vt.prototype, "accept", 2);
|
|
2570
|
+
te([
|
|
2571
|
+
C({ type: String })
|
|
2572
|
+
], vt.prototype, "name", 2);
|
|
2573
|
+
te([
|
|
2574
|
+
C({ type: String, reflect: !0 })
|
|
2575
|
+
], vt.prototype, "itemDragged", 2);
|
|
2576
|
+
te([
|
|
2577
|
+
C({ type: Boolean, reflect: !0 })
|
|
2578
|
+
], vt.prototype, "acceptableDrag", 2);
|
|
2579
|
+
vt = te([
|
|
2580
|
+
Q("tha-dropzone")
|
|
2581
|
+
], vt);
|
|
2582
|
+
function* Di(t) {
|
|
2583
|
+
for (; t.parentElement; )
|
|
2584
|
+
yield t = t.parentElement;
|
|
2585
|
+
}
|
|
2586
|
+
var Mi = Object.getOwnPropertyDescriptor, tn = (t) => {
|
|
2587
|
+
throw TypeError(t);
|
|
2588
|
+
}, Wi = (t, e, r, s) => {
|
|
2589
|
+
for (var n = s > 1 ? void 0 : s ? Mi(e, r) : e, i = t.length - 1, a; i >= 0; i--)
|
|
2590
|
+
(a = t[i]) && (n = a(n) || n);
|
|
2591
|
+
return n;
|
|
2592
|
+
}, Li = (t, e, r) => e.has(t) || tn("Cannot " + r), ds = (t, e, r) => (Li(t, e, "read from private field"), r ? r.call(t) : e.get(t)), Ii = (t, e, r) => e.has(t) ? tn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), Re, Cr;
|
|
2593
|
+
let ps = class extends Z {
|
|
2594
|
+
constructor() {
|
|
2595
|
+
super(...arguments), Ii(this, Re);
|
|
2596
|
+
}
|
|
2597
|
+
connectedCallback() {
|
|
2598
|
+
var t;
|
|
2599
|
+
super.connectedCallback(), this.draggable = !0, (t = ds(this, Re, Cr)) == null || t[Bs](this);
|
|
2600
|
+
}
|
|
2601
|
+
disconnectedCallback() {
|
|
2602
|
+
var t;
|
|
2603
|
+
super.disconnectedCallback(), (t = ds(this, Re, Cr)) == null || t[Gs](this);
|
|
2604
|
+
}
|
|
2605
|
+
render() {
|
|
2606
|
+
return Je`<slot></slot>`;
|
|
2607
|
+
}
|
|
2608
|
+
};
|
|
2609
|
+
Re = /* @__PURE__ */ new WeakSet();
|
|
2610
|
+
Cr = function() {
|
|
2611
|
+
for (const t of Di(this))
|
|
2612
|
+
if (t instanceof b)
|
|
2613
|
+
return t;
|
|
2614
|
+
return null;
|
|
2615
|
+
};
|
|
2616
|
+
ps = Wi([
|
|
2617
|
+
Q("tha-drag-handle")
|
|
2618
|
+
], ps);
|
|
2619
|
+
export {
|
|
2620
|
+
b as DragElement,
|
|
2621
|
+
ps as DragHandleElement,
|
|
2622
|
+
vt as DropZoneElement,
|
|
2623
|
+
pt as ThaDragEvent,
|
|
2624
|
+
Ue as ThaRoute,
|
|
2625
|
+
os as ThaRouter,
|
|
2626
|
+
ls as ThaRouterConfig,
|
|
2627
|
+
Be as ThaRouterLink,
|
|
2628
|
+
Tt as ThaRouterOutlet,
|
|
2629
|
+
Er as ThaRouterParam
|
|
2630
|
+
};
|