@startinblox/boilerplate 4.3.1 → 6.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/.gitlab-ci.yml +3 -3
- package/AGENTS.md +518 -0
- package/README.md +16 -19
- package/biome.json +1 -1
- package/cypress/component/sample-object.cy.ts +816 -0
- package/cypress/component/solid-boilerplate.cy.ts +894 -5
- package/cypress/e2e/helpers/components/setupCacheInvalidation.cy.ts +512 -0
- package/cypress/e2e/helpers/components/setupCacheOnResourceReady.cy.ts +497 -0
- package/cypress/e2e/helpers/components/setupComponentSubscriptions.cy.ts +239 -0
- package/cypress/e2e/helpers/components/setupOnSaveReset.cy.ts +393 -0
- package/cypress/e2e/helpers/datas/checkValueInIntervalRecursive.cy.ts +563 -0
- package/cypress/e2e/helpers/datas/dataBuilder.cy.ts +508 -0
- package/cypress/e2e/helpers/datas/filterGenerator.cy.ts +285 -0
- package/cypress/e2e/helpers/datas/filterObjectByDateAfter.cy.ts +389 -0
- package/cypress/e2e/helpers/datas/filterObjectByDateInterval.cy.ts +613 -0
- package/cypress/e2e/helpers/datas/filterObjectById.cy.ts +276 -0
- package/cypress/e2e/helpers/datas/filterObjectByInterval.cy.ts +237 -0
- package/cypress/e2e/helpers/datas/filterObjectByNamedValue.cy.ts +299 -0
- package/cypress/e2e/helpers/datas/filterObjectByType.cy.ts +307 -0
- package/cypress/e2e/helpers/datas/filterObjectByValue.cy.ts +375 -0
- package/cypress/e2e/helpers/datas/sort.cy.ts +293 -0
- package/cypress/e2e/helpers/ui/formatDate.cy.ts +233 -0
- package/cypress/e2e/helpers/utils/requestNavigation.cy.ts +257 -0
- package/cypress/e2e/helpers/utils/uniq.cy.ts +160 -0
- package/cypress/support/e2e.ts +1 -0
- package/cypress.config.ts +2 -0
- package/dist/index.js +614 -646
- package/package.json +17 -15
- package/scripts/init.js +355 -0
- package/src/components/solid-boilerplate.ts +3 -6
- package/src/helpers/components/componentObjectHandler.ts +5 -7
- package/src/helpers/components/componentObjectsHandler.ts +8 -3
- package/src/helpers/components/orbitComponent.ts +106 -57
- package/src/helpers/components/setupCacheInvalidation.ts +50 -23
- package/src/helpers/components/setupCacheOnResourceReady.ts +42 -23
- package/src/helpers/components/setupComponentSubscriptions.ts +10 -9
- package/src/helpers/components/setupOnSaveReset.ts +27 -5
- package/src/helpers/datas/checkValueInIntervalRecursive.ts +66 -0
- package/src/helpers/datas/dataBuilder.ts +4 -4
- package/src/helpers/datas/filterGenerator.ts +13 -10
- package/src/helpers/datas/filterObjectByDateAfter.ts +3 -3
- package/src/helpers/datas/filterObjectByDateInterval.ts +44 -0
- package/src/helpers/datas/filterObjectById.ts +7 -6
- package/src/helpers/datas/filterObjectByInterval.ts +6 -110
- package/src/helpers/datas/filterObjectByNamedValue.ts +35 -33
- package/src/helpers/datas/filterObjectByType.ts +3 -3
- package/src/helpers/datas/filterObjectByValue.ts +17 -16
- package/src/helpers/datas/sort.ts +50 -23
- package/src/helpers/index.ts +6 -4
- package/src/helpers/ui/formatDate.ts +14 -1
- package/src/helpers/utils/requestNavigation.ts +5 -2
- package/src/helpers/utils/uniq.ts +1 -1
- package/src/index.ts +2 -2
package/dist/index.js
CHANGED
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
const N = globalThis, et = N.ShadowRoot && (N.ShadyCSS === void 0 || N.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, st = Symbol(), ut = /* @__PURE__ */ new WeakMap();
|
|
7
|
-
let Ct = class {
|
|
8
|
-
constructor(t, e, r) {
|
|
9
|
-
if (this._$cssResult$ = !0, r !== st) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
1
|
+
const D = globalThis, tt = D.ShadowRoot && (D.ShadyCSS === void 0 || D.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, et = /* @__PURE__ */ Symbol(), ut = /* @__PURE__ */ new WeakMap();
|
|
2
|
+
let Rt = class {
|
|
3
|
+
constructor(t, e, i) {
|
|
4
|
+
if (this._$cssResult$ = !0, i !== et) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
10
5
|
this.cssText = t, this.t = e;
|
|
11
6
|
}
|
|
12
7
|
get styleSheet() {
|
|
13
8
|
let t = this.o;
|
|
14
9
|
const e = this.t;
|
|
15
|
-
if (
|
|
16
|
-
const
|
|
17
|
-
|
|
10
|
+
if (tt && t === void 0) {
|
|
11
|
+
const i = e !== void 0 && e.length === 1;
|
|
12
|
+
i && (t = ut.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && ut.set(e, t));
|
|
18
13
|
}
|
|
19
14
|
return t;
|
|
20
15
|
}
|
|
@@ -22,33 +17,28 @@ let Ct = class {
|
|
|
22
17
|
return this.cssText;
|
|
23
18
|
}
|
|
24
19
|
};
|
|
25
|
-
const
|
|
26
|
-
const e = s.length === 1 ? s[0] : t.reduce((
|
|
20
|
+
const st = (s) => new Rt(typeof s == "string" ? s : s + "", void 0, et), rt = (s, ...t) => {
|
|
21
|
+
const e = s.length === 1 ? s[0] : t.reduce((i, r, o) => i + ((n) => {
|
|
27
22
|
if (n._$cssResult$ === !0) return n.cssText;
|
|
28
23
|
if (typeof n == "number") return n;
|
|
29
24
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
30
|
-
})(
|
|
31
|
-
return new
|
|
32
|
-
},
|
|
33
|
-
if (
|
|
25
|
+
})(r) + s[o + 1], s[0]);
|
|
26
|
+
return new Rt(e, s, et);
|
|
27
|
+
}, Bt = (s, t) => {
|
|
28
|
+
if (tt) s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
34
29
|
else for (const e of t) {
|
|
35
|
-
const
|
|
36
|
-
|
|
30
|
+
const i = document.createElement("style"), r = D.litNonce;
|
|
31
|
+
r !== void 0 && i.setAttribute("nonce", r), i.textContent = e.cssText, s.appendChild(i);
|
|
37
32
|
}
|
|
38
|
-
}, dt =
|
|
33
|
+
}, dt = tt ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
|
|
39
34
|
let e = "";
|
|
40
|
-
for (const
|
|
41
|
-
return
|
|
35
|
+
for (const i of t.cssRules) e += i.cssText;
|
|
36
|
+
return st(e);
|
|
42
37
|
})(s) : s;
|
|
43
|
-
|
|
44
|
-
* @license
|
|
45
|
-
* Copyright 2017 Google LLC
|
|
46
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
|
-
*/
|
|
48
|
-
const { is: Bt, defineProperty: Wt, getOwnPropertyDescriptor: Ft, getOwnPropertyNames: Kt, getOwnPropertySymbols: Xt, getPrototypeOf: Jt } = Object, B = globalThis, pt = B.trustedTypes, Zt = pt ? pt.emptyScript : "", Gt = B.reactiveElementPolyfillSupport, O = (s, t) => s, D = { toAttribute(s, t) {
|
|
38
|
+
const { is: Wt, defineProperty: Ft, getOwnPropertyDescriptor: Kt, getOwnPropertyNames: Zt, getOwnPropertySymbols: Jt, getPrototypeOf: Xt } = Object, W = globalThis, pt = W.trustedTypes, Gt = pt ? pt.emptyScript : "", Qt = W.reactiveElementPolyfillSupport, O = (s, t) => s, q = { toAttribute(s, t) {
|
|
49
39
|
switch (t) {
|
|
50
40
|
case Boolean:
|
|
51
|
-
s = s ?
|
|
41
|
+
s = s ? Gt : null;
|
|
52
42
|
break;
|
|
53
43
|
case Object:
|
|
54
44
|
case Array:
|
|
@@ -73,8 +63,8 @@ const { is: Bt, defineProperty: Wt, getOwnPropertyDescriptor: Ft, getOwnProperty
|
|
|
73
63
|
}
|
|
74
64
|
}
|
|
75
65
|
return e;
|
|
76
|
-
} },
|
|
77
|
-
Symbol.metadata ??= Symbol("metadata"),
|
|
66
|
+
} }, F = (s, t) => !Wt(s, t), ft = { attribute: !0, type: String, converter: q, reflect: !1, useDefault: !1, hasChanged: F };
|
|
67
|
+
Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), W.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
78
68
|
let E = class extends HTMLElement {
|
|
79
69
|
static addInitializer(t) {
|
|
80
70
|
this._$Ei(), (this.l ??= []).push(t);
|
|
@@ -84,19 +74,19 @@ let E = class extends HTMLElement {
|
|
|
84
74
|
}
|
|
85
75
|
static createProperty(t, e = ft) {
|
|
86
76
|
if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
87
|
-
const
|
|
88
|
-
|
|
77
|
+
const i = /* @__PURE__ */ Symbol(), r = this.getPropertyDescriptor(t, i, e);
|
|
78
|
+
r !== void 0 && Ft(this.prototype, t, r);
|
|
89
79
|
}
|
|
90
80
|
}
|
|
91
|
-
static getPropertyDescriptor(t, e,
|
|
92
|
-
const { get:
|
|
81
|
+
static getPropertyDescriptor(t, e, i) {
|
|
82
|
+
const { get: r, set: o } = Kt(this.prototype, t) ?? { get() {
|
|
93
83
|
return this[e];
|
|
94
84
|
}, set(n) {
|
|
95
85
|
this[e] = n;
|
|
96
86
|
} };
|
|
97
|
-
return { get:
|
|
98
|
-
const
|
|
99
|
-
o?.call(this, n), this.requestUpdate(t,
|
|
87
|
+
return { get: r, set(n) {
|
|
88
|
+
const c = r?.call(this);
|
|
89
|
+
o?.call(this, n), this.requestUpdate(t, c, i);
|
|
100
90
|
}, configurable: !0, enumerable: !0 };
|
|
101
91
|
}
|
|
102
92
|
static getPropertyOptions(t) {
|
|
@@ -104,44 +94,44 @@ let E = class extends HTMLElement {
|
|
|
104
94
|
}
|
|
105
95
|
static _$Ei() {
|
|
106
96
|
if (this.hasOwnProperty(O("elementProperties"))) return;
|
|
107
|
-
const t =
|
|
97
|
+
const t = Xt(this);
|
|
108
98
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
109
99
|
}
|
|
110
100
|
static finalize() {
|
|
111
101
|
if (this.hasOwnProperty(O("finalized"))) return;
|
|
112
102
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(O("properties"))) {
|
|
113
|
-
const e = this.properties,
|
|
114
|
-
for (const
|
|
103
|
+
const e = this.properties, i = [...Zt(e), ...Jt(e)];
|
|
104
|
+
for (const r of i) this.createProperty(r, e[r]);
|
|
115
105
|
}
|
|
116
106
|
const t = this[Symbol.metadata];
|
|
117
107
|
if (t !== null) {
|
|
118
108
|
const e = litPropertyMetadata.get(t);
|
|
119
|
-
if (e !== void 0) for (const [
|
|
109
|
+
if (e !== void 0) for (const [i, r] of e) this.elementProperties.set(i, r);
|
|
120
110
|
}
|
|
121
111
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
122
|
-
for (const [e,
|
|
123
|
-
const
|
|
124
|
-
|
|
112
|
+
for (const [e, i] of this.elementProperties) {
|
|
113
|
+
const r = this._$Eu(e, i);
|
|
114
|
+
r !== void 0 && this._$Eh.set(r, e);
|
|
125
115
|
}
|
|
126
116
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
127
117
|
}
|
|
128
118
|
static finalizeStyles(t) {
|
|
129
119
|
const e = [];
|
|
130
120
|
if (Array.isArray(t)) {
|
|
131
|
-
const
|
|
132
|
-
for (const
|
|
121
|
+
const i = new Set(t.flat(1 / 0).reverse());
|
|
122
|
+
for (const r of i) e.unshift(dt(r));
|
|
133
123
|
} else t !== void 0 && e.push(dt(t));
|
|
134
124
|
return e;
|
|
135
125
|
}
|
|
136
126
|
static _$Eu(t, e) {
|
|
137
|
-
const
|
|
138
|
-
return
|
|
127
|
+
const i = e.attribute;
|
|
128
|
+
return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
139
129
|
}
|
|
140
130
|
constructor() {
|
|
141
131
|
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
142
132
|
}
|
|
143
133
|
_$Ev() {
|
|
144
|
-
this._$ES = new Promise((
|
|
134
|
+
this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t) => t(this));
|
|
145
135
|
}
|
|
146
136
|
addController(t) {
|
|
147
137
|
(this._$EO ??= /* @__PURE__ */ new Set()).add(t), this.renderRoot !== void 0 && this.isConnected && t.hostConnected?.();
|
|
@@ -151,50 +141,50 @@ let E = class extends HTMLElement {
|
|
|
151
141
|
}
|
|
152
142
|
_$E_() {
|
|
153
143
|
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
|
154
|
-
for (const
|
|
144
|
+
for (const i of e.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
|
|
155
145
|
t.size > 0 && (this._$Ep = t);
|
|
156
146
|
}
|
|
157
147
|
createRenderRoot() {
|
|
158
148
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
159
|
-
return
|
|
149
|
+
return Bt(t, this.constructor.elementStyles), t;
|
|
160
150
|
}
|
|
161
151
|
connectedCallback() {
|
|
162
|
-
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((
|
|
152
|
+
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((t) => t.hostConnected?.());
|
|
163
153
|
}
|
|
164
154
|
enableUpdating(t) {
|
|
165
155
|
}
|
|
166
156
|
disconnectedCallback() {
|
|
167
|
-
this._$EO?.forEach((
|
|
157
|
+
this._$EO?.forEach((t) => t.hostDisconnected?.());
|
|
168
158
|
}
|
|
169
|
-
attributeChangedCallback(t, e,
|
|
170
|
-
this._$AK(t,
|
|
159
|
+
attributeChangedCallback(t, e, i) {
|
|
160
|
+
this._$AK(t, i);
|
|
171
161
|
}
|
|
172
162
|
_$ET(t, e) {
|
|
173
|
-
const
|
|
174
|
-
if (
|
|
175
|
-
const o = (
|
|
176
|
-
this._$Em = t, o == null ? this.removeAttribute(
|
|
163
|
+
const i = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, i);
|
|
164
|
+
if (r !== void 0 && i.reflect === !0) {
|
|
165
|
+
const o = (i.converter?.toAttribute !== void 0 ? i.converter : q).toAttribute(e, i.type);
|
|
166
|
+
this._$Em = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null;
|
|
177
167
|
}
|
|
178
168
|
}
|
|
179
169
|
_$AK(t, e) {
|
|
180
|
-
const
|
|
181
|
-
if (
|
|
182
|
-
const o =
|
|
183
|
-
this._$Em =
|
|
184
|
-
const
|
|
185
|
-
this[
|
|
170
|
+
const i = this.constructor, r = i._$Eh.get(t);
|
|
171
|
+
if (r !== void 0 && this._$Em !== r) {
|
|
172
|
+
const o = i.getPropertyOptions(r), n = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : q;
|
|
173
|
+
this._$Em = r;
|
|
174
|
+
const c = n.fromAttribute(e, o.type);
|
|
175
|
+
this[r] = c ?? this._$Ej?.get(r) ?? c, this._$Em = null;
|
|
186
176
|
}
|
|
187
177
|
}
|
|
188
|
-
requestUpdate(t, e, r) {
|
|
178
|
+
requestUpdate(t, e, i, r = !1, o) {
|
|
189
179
|
if (t !== void 0) {
|
|
190
|
-
const
|
|
191
|
-
if (r ??=
|
|
192
|
-
this.C(t, e,
|
|
180
|
+
const n = this.constructor;
|
|
181
|
+
if (r === !1 && (o = this[t]), i ??= n.getPropertyOptions(t), !((i.hasChanged ?? F)(o, e) || i.useDefault && i.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(n._$Eu(t, i)))) return;
|
|
182
|
+
this.C(t, e, i);
|
|
193
183
|
}
|
|
194
184
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
195
185
|
}
|
|
196
|
-
C(t, e, { useDefault:
|
|
197
|
-
|
|
186
|
+
C(t, e, { useDefault: i, reflect: r, wrapped: o }, n) {
|
|
187
|
+
i && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, n ?? e ?? this[t]), o !== !0 || n !== void 0) || (this._$AL.has(t) || (this.hasUpdated || i || (e = void 0), this._$AL.set(t, e)), r === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
|
|
198
188
|
}
|
|
199
189
|
async _$EP() {
|
|
200
190
|
this.isUpdatePending = !0;
|
|
@@ -213,28 +203,28 @@ let E = class extends HTMLElement {
|
|
|
213
203
|
if (!this.isUpdatePending) return;
|
|
214
204
|
if (!this.hasUpdated) {
|
|
215
205
|
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
|
|
216
|
-
for (const [
|
|
206
|
+
for (const [r, o] of this._$Ep) this[r] = o;
|
|
217
207
|
this._$Ep = void 0;
|
|
218
208
|
}
|
|
219
|
-
const
|
|
220
|
-
if (
|
|
221
|
-
const { wrapped: n } = o,
|
|
222
|
-
n !== !0 || this._$AL.has(
|
|
209
|
+
const i = this.constructor.elementProperties;
|
|
210
|
+
if (i.size > 0) for (const [r, o] of i) {
|
|
211
|
+
const { wrapped: n } = o, c = this[r];
|
|
212
|
+
n !== !0 || this._$AL.has(r) || c === void 0 || this.C(r, void 0, o, c);
|
|
223
213
|
}
|
|
224
214
|
}
|
|
225
215
|
let t = !1;
|
|
226
216
|
const e = this._$AL;
|
|
227
217
|
try {
|
|
228
|
-
t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach((
|
|
229
|
-
} catch (
|
|
230
|
-
throw t = !1, this._$EM(),
|
|
218
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach((i) => i.hostUpdate?.()), this.update(e)) : this._$EM();
|
|
219
|
+
} catch (i) {
|
|
220
|
+
throw t = !1, this._$EM(), i;
|
|
231
221
|
}
|
|
232
222
|
t && this._$AE(e);
|
|
233
223
|
}
|
|
234
224
|
willUpdate(t) {
|
|
235
225
|
}
|
|
236
226
|
_$AE(t) {
|
|
237
|
-
this._$EO?.forEach((
|
|
227
|
+
this._$EO?.forEach((e) => e.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
238
228
|
}
|
|
239
229
|
_$EM() {
|
|
240
230
|
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
@@ -249,82 +239,165 @@ let E = class extends HTMLElement {
|
|
|
249
239
|
return !0;
|
|
250
240
|
}
|
|
251
241
|
update(t) {
|
|
252
|
-
this._$Eq &&= this._$Eq.forEach((
|
|
242
|
+
this._$Eq &&= this._$Eq.forEach((e) => this._$ET(e, this[e])), this._$EM();
|
|
253
243
|
}
|
|
254
244
|
updated(t) {
|
|
255
245
|
}
|
|
256
246
|
firstUpdated(t) {
|
|
257
247
|
}
|
|
258
248
|
};
|
|
259
|
-
E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[O("elementProperties")] = /* @__PURE__ */ new Map(), E[O("finalized")] = /* @__PURE__ */ new Map(),
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
249
|
+
E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[O("elementProperties")] = /* @__PURE__ */ new Map(), E[O("finalized")] = /* @__PURE__ */ new Map(), Qt?.({ ReactiveElement: E }), (W.reactiveElementVersions ??= []).push("2.1.2");
|
|
250
|
+
const Yt = /* @__PURE__ */ Symbol();
|
|
251
|
+
let te = class {
|
|
252
|
+
get taskComplete() {
|
|
253
|
+
return this.t || (this.i === 1 ? this.t = new Promise(((t, e) => {
|
|
254
|
+
this.o = t, this.h = e;
|
|
255
|
+
})) : this.i === 3 ? this.t = Promise.reject(this.l) : this.t = Promise.resolve(this.u)), this.t;
|
|
256
|
+
}
|
|
257
|
+
constructor(t, e, i) {
|
|
258
|
+
this.p = 0, this.i = 0, (this._ = t).addController(this);
|
|
259
|
+
const r = typeof e == "object" ? e : { task: e, args: i };
|
|
260
|
+
this.v = r.task, this.j = r.args, this.m = r.argsEqual ?? ee, this.k = r.onComplete, this.A = r.onError, this.autoRun = r.autoRun ?? !0, "initialValue" in r && (this.u = r.initialValue, this.i = 2, this.O = this.T?.());
|
|
261
|
+
}
|
|
262
|
+
hostUpdate() {
|
|
263
|
+
this.autoRun === !0 && this.S();
|
|
264
|
+
}
|
|
265
|
+
hostUpdated() {
|
|
266
|
+
this.autoRun === "afterUpdate" && this.S();
|
|
267
|
+
}
|
|
268
|
+
T() {
|
|
269
|
+
if (this.j === void 0) return;
|
|
270
|
+
const t = this.j();
|
|
271
|
+
if (!Array.isArray(t)) throw Error("The args function must return an array");
|
|
272
|
+
return t;
|
|
273
|
+
}
|
|
274
|
+
async S() {
|
|
275
|
+
const t = this.T(), e = this.O;
|
|
276
|
+
this.O = t, t === e || t === void 0 || e !== void 0 && this.m(e, t) || await this.run(t);
|
|
277
|
+
}
|
|
278
|
+
async run(t) {
|
|
279
|
+
let e, i;
|
|
280
|
+
t ??= this.T(), this.O = t, this.i === 1 ? this.q?.abort() : (this.t = void 0, this.o = void 0, this.h = void 0), this.i = 1, this.autoRun === "afterUpdate" ? queueMicrotask((() => this._.requestUpdate())) : this._.requestUpdate();
|
|
281
|
+
const r = ++this.p;
|
|
282
|
+
this.q = new AbortController();
|
|
283
|
+
let o = !1;
|
|
284
|
+
try {
|
|
285
|
+
e = await this.v(t, { signal: this.q.signal });
|
|
286
|
+
} catch (n) {
|
|
287
|
+
o = !0, i = n;
|
|
288
|
+
}
|
|
289
|
+
if (this.p === r) {
|
|
290
|
+
if (e === Yt) this.i = 0;
|
|
291
|
+
else {
|
|
292
|
+
if (o === !1) {
|
|
293
|
+
try {
|
|
294
|
+
this.k?.(e);
|
|
295
|
+
} catch {
|
|
296
|
+
}
|
|
297
|
+
this.i = 2, this.o?.(e);
|
|
298
|
+
} else {
|
|
299
|
+
try {
|
|
300
|
+
this.A?.(i);
|
|
301
|
+
} catch {
|
|
302
|
+
}
|
|
303
|
+
this.i = 3, this.h?.(i);
|
|
304
|
+
}
|
|
305
|
+
this.u = e, this.l = i;
|
|
306
|
+
}
|
|
307
|
+
this._.requestUpdate();
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
abort(t) {
|
|
311
|
+
this.i === 1 && this.q?.abort(t);
|
|
312
|
+
}
|
|
313
|
+
get value() {
|
|
314
|
+
return this.u;
|
|
315
|
+
}
|
|
316
|
+
get error() {
|
|
317
|
+
return this.l;
|
|
318
|
+
}
|
|
319
|
+
get status() {
|
|
320
|
+
return this.i;
|
|
321
|
+
}
|
|
322
|
+
render(t) {
|
|
323
|
+
switch (this.i) {
|
|
324
|
+
case 0:
|
|
325
|
+
return t.initial?.();
|
|
326
|
+
case 1:
|
|
327
|
+
return t.pending?.();
|
|
328
|
+
case 2:
|
|
329
|
+
return t.complete?.(this.value);
|
|
330
|
+
case 3:
|
|
331
|
+
return t.error?.(this.error);
|
|
332
|
+
default:
|
|
333
|
+
throw Error("Unexpected status: " + this.i);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
};
|
|
337
|
+
const ee = (s, t) => s === t || s.length === t.length && s.every(((e, i) => !F(e, t[i])));
|
|
338
|
+
const it = globalThis, _t = (s) => s, k = it.trustedTypes, $t = k ? k.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, xt = "$lit$", v = `lit$${Math.random().toFixed(9).slice(2)}$`, Ot = "?" + v, se = `<${Ot}>`, S = document, j = () => S.createComment(""), T = (s) => s === null || typeof s != "object" && typeof s != "function", ot = Array.isArray, re = (s) => ot(s) || typeof s?.[Symbol.iterator] == "function", Z = `[
|
|
339
|
+
\f\r]`, x = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, gt = /-->/g, yt = />/g, m = RegExp(`>|${Z}(?:([^\\s"'>=/]+)(${Z}*=${Z}*(?:[^
|
|
340
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), vt = /'/g, mt = /"/g, jt = /^(?:script|style|textarea|title)$/i, ie = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), L = ie(1), C = /* @__PURE__ */ Symbol.for("lit-noChange"), d = /* @__PURE__ */ Symbol.for("lit-nothing"), bt = /* @__PURE__ */ new WeakMap(), A = S.createTreeWalker(S, 129);
|
|
341
|
+
function Tt(s, t) {
|
|
342
|
+
if (!ot(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
343
|
+
return $t !== void 0 ? $t.createHTML(t) : t;
|
|
271
344
|
}
|
|
272
|
-
const
|
|
273
|
-
const e = s.length - 1,
|
|
274
|
-
let
|
|
275
|
-
for (let
|
|
276
|
-
const a = s[
|
|
277
|
-
let
|
|
278
|
-
for (;
|
|
279
|
-
const
|
|
280
|
-
o += n ===
|
|
281
|
-
}
|
|
282
|
-
return [
|
|
345
|
+
const oe = (s, t) => {
|
|
346
|
+
const e = s.length - 1, i = [];
|
|
347
|
+
let r, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = x;
|
|
348
|
+
for (let c = 0; c < e; c++) {
|
|
349
|
+
const a = s[c];
|
|
350
|
+
let l, u, h = -1, p = 0;
|
|
351
|
+
for (; p < a.length && (n.lastIndex = p, u = n.exec(a), u !== null); ) p = n.lastIndex, n === x ? u[1] === "!--" ? n = gt : u[1] !== void 0 ? n = yt : u[2] !== void 0 ? (jt.test(u[2]) && (r = RegExp("</" + u[2], "g")), n = m) : u[3] !== void 0 && (n = m) : n === m ? u[0] === ">" ? (n = r ?? x, h = -1) : u[1] === void 0 ? h = -2 : (h = n.lastIndex - u[2].length, l = u[1], n = u[3] === void 0 ? m : u[3] === '"' ? mt : vt) : n === mt || n === vt ? n = m : n === gt || n === yt ? n = x : (n = m, r = void 0);
|
|
352
|
+
const y = n === m && s[c + 1].startsWith("/>") ? " " : "";
|
|
353
|
+
o += n === x ? a + se : h >= 0 ? (i.push(l), a.slice(0, h) + xt + a.slice(h) + v + y) : a + v + (h === -2 ? c : y);
|
|
354
|
+
}
|
|
355
|
+
return [Tt(s, o + (s[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
|
|
283
356
|
};
|
|
284
|
-
class
|
|
285
|
-
constructor({ strings: t, _$litType$: e },
|
|
286
|
-
let
|
|
357
|
+
class U {
|
|
358
|
+
constructor({ strings: t, _$litType$: e }, i) {
|
|
359
|
+
let r;
|
|
287
360
|
this.parts = [];
|
|
288
361
|
let o = 0, n = 0;
|
|
289
|
-
const
|
|
290
|
-
if (this.el =
|
|
291
|
-
const
|
|
292
|
-
|
|
362
|
+
const c = t.length - 1, a = this.parts, [l, u] = oe(t, e);
|
|
363
|
+
if (this.el = U.createElement(l, i), A.currentNode = this.el.content, e === 2 || e === 3) {
|
|
364
|
+
const h = this.el.content.firstChild;
|
|
365
|
+
h.replaceWith(...h.childNodes);
|
|
293
366
|
}
|
|
294
|
-
for (; (
|
|
295
|
-
if (
|
|
296
|
-
if (
|
|
297
|
-
const
|
|
298
|
-
a.push({ type: 1, index: o, name:
|
|
299
|
-
} else
|
|
300
|
-
if (
|
|
301
|
-
const
|
|
302
|
-
if (
|
|
303
|
-
|
|
304
|
-
for (let
|
|
305
|
-
|
|
367
|
+
for (; (r = A.nextNode()) !== null && a.length < c; ) {
|
|
368
|
+
if (r.nodeType === 1) {
|
|
369
|
+
if (r.hasAttributes()) for (const h of r.getAttributeNames()) if (h.endsWith(xt)) {
|
|
370
|
+
const p = u[n++], y = r.getAttribute(h).split(v), N = /([.?@])?(.*)/.exec(p);
|
|
371
|
+
a.push({ type: 1, index: o, name: N[2], strings: y, ctor: N[1] === "." ? ae : N[1] === "?" ? ce : N[1] === "@" ? le : K }), r.removeAttribute(h);
|
|
372
|
+
} else h.startsWith(v) && (a.push({ type: 6, index: o }), r.removeAttribute(h));
|
|
373
|
+
if (jt.test(r.tagName)) {
|
|
374
|
+
const h = r.textContent.split(v), p = h.length - 1;
|
|
375
|
+
if (p > 0) {
|
|
376
|
+
r.textContent = k ? k.emptyScript : "";
|
|
377
|
+
for (let y = 0; y < p; y++) r.append(h[y], j()), A.nextNode(), a.push({ type: 2, index: ++o });
|
|
378
|
+
r.append(h[p], j());
|
|
306
379
|
}
|
|
307
380
|
}
|
|
308
|
-
} else if (
|
|
381
|
+
} else if (r.nodeType === 8) if (r.data === Ot) a.push({ type: 2, index: o });
|
|
309
382
|
else {
|
|
310
|
-
let
|
|
311
|
-
for (; (
|
|
383
|
+
let h = -1;
|
|
384
|
+
for (; (h = r.data.indexOf(v, h + 1)) !== -1; ) a.push({ type: 7, index: o }), h += v.length - 1;
|
|
312
385
|
}
|
|
313
386
|
o++;
|
|
314
387
|
}
|
|
315
388
|
}
|
|
316
389
|
static createElement(t, e) {
|
|
317
|
-
const
|
|
318
|
-
return
|
|
390
|
+
const i = S.createElement("template");
|
|
391
|
+
return i.innerHTML = t, i;
|
|
319
392
|
}
|
|
320
393
|
}
|
|
321
|
-
function
|
|
394
|
+
function R(s, t, e = s, i) {
|
|
322
395
|
if (t === C) return t;
|
|
323
|
-
let
|
|
324
|
-
const o =
|
|
325
|
-
return
|
|
396
|
+
let r = i !== void 0 ? e._$Co?.[i] : e._$Cl;
|
|
397
|
+
const o = T(t) ? void 0 : t._$litDirective$;
|
|
398
|
+
return r?.constructor !== o && (r?._$AO?.(!1), o === void 0 ? r = void 0 : (r = new o(s), r._$AT(s, e, i)), i !== void 0 ? (e._$Co ??= [])[i] = r : e._$Cl = r), r !== void 0 && (t = R(s, r._$AS(s, t.values), r, i)), t;
|
|
326
399
|
}
|
|
327
|
-
class
|
|
400
|
+
class ne {
|
|
328
401
|
constructor(t, e) {
|
|
329
402
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
330
403
|
}
|
|
@@ -335,29 +408,29 @@ class se {
|
|
|
335
408
|
return this._$AM._$AU;
|
|
336
409
|
}
|
|
337
410
|
u(t) {
|
|
338
|
-
const { el: { content: e }, parts:
|
|
339
|
-
|
|
340
|
-
let o =
|
|
411
|
+
const { el: { content: e }, parts: i } = this._$AD, r = (t?.creationScope ?? S).importNode(e, !0);
|
|
412
|
+
A.currentNode = r;
|
|
413
|
+
let o = A.nextNode(), n = 0, c = 0, a = i[0];
|
|
341
414
|
for (; a !== void 0; ) {
|
|
342
415
|
if (n === a.index) {
|
|
343
|
-
let
|
|
344
|
-
a.type === 2 ?
|
|
416
|
+
let l;
|
|
417
|
+
a.type === 2 ? l = new M(o, o.nextSibling, this, t) : a.type === 1 ? l = new a.ctor(o, a.name, a.strings, this, t) : a.type === 6 && (l = new he(o, this, t)), this._$AV.push(l), a = i[++c];
|
|
345
418
|
}
|
|
346
|
-
n !== a?.index && (o =
|
|
419
|
+
n !== a?.index && (o = A.nextNode(), n++);
|
|
347
420
|
}
|
|
348
|
-
return
|
|
421
|
+
return A.currentNode = S, r;
|
|
349
422
|
}
|
|
350
423
|
p(t) {
|
|
351
424
|
let e = 0;
|
|
352
|
-
for (const
|
|
425
|
+
for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
|
|
353
426
|
}
|
|
354
427
|
}
|
|
355
|
-
class
|
|
428
|
+
class M {
|
|
356
429
|
get _$AU() {
|
|
357
430
|
return this._$AM?._$AU ?? this._$Cv;
|
|
358
431
|
}
|
|
359
|
-
constructor(t, e,
|
|
360
|
-
this.type = 2, this._$AH =
|
|
432
|
+
constructor(t, e, i, r) {
|
|
433
|
+
this.type = 2, this._$AH = d, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = r, this._$Cv = r?.isConnected ?? !0;
|
|
361
434
|
}
|
|
362
435
|
get parentNode() {
|
|
363
436
|
let t = this._$AA.parentNode;
|
|
@@ -371,7 +444,7 @@ class U {
|
|
|
371
444
|
return this._$AB;
|
|
372
445
|
}
|
|
373
446
|
_$AI(t, e = this) {
|
|
374
|
-
t =
|
|
447
|
+
t = R(this, t, e), T(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== C && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : re(t) ? this.k(t) : this._(t);
|
|
375
448
|
}
|
|
376
449
|
O(t) {
|
|
377
450
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -380,120 +453,115 @@ class U {
|
|
|
380
453
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
381
454
|
}
|
|
382
455
|
_(t) {
|
|
383
|
-
this._$AH !==
|
|
456
|
+
this._$AH !== d && T(this._$AH) ? this._$AA.nextSibling.data = t : this.T(S.createTextNode(t)), this._$AH = t;
|
|
384
457
|
}
|
|
385
458
|
$(t) {
|
|
386
|
-
const { values: e, _$litType$:
|
|
387
|
-
if (this._$AH?._$AD ===
|
|
459
|
+
const { values: e, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = U.createElement(Tt(i.h, i.h[0]), this.options)), i);
|
|
460
|
+
if (this._$AH?._$AD === r) this._$AH.p(e);
|
|
388
461
|
else {
|
|
389
|
-
const o = new
|
|
462
|
+
const o = new ne(r, this), n = o.u(this.options);
|
|
390
463
|
o.p(e), this.T(n), this._$AH = o;
|
|
391
464
|
}
|
|
392
465
|
}
|
|
393
466
|
_$AC(t) {
|
|
394
467
|
let e = bt.get(t.strings);
|
|
395
|
-
return e === void 0 && bt.set(t.strings, e = new
|
|
468
|
+
return e === void 0 && bt.set(t.strings, e = new U(t)), e;
|
|
396
469
|
}
|
|
397
470
|
k(t) {
|
|
398
|
-
|
|
471
|
+
ot(this._$AH) || (this._$AH = [], this._$AR());
|
|
399
472
|
const e = this._$AH;
|
|
400
|
-
let
|
|
401
|
-
for (const o of t)
|
|
402
|
-
|
|
473
|
+
let i, r = 0;
|
|
474
|
+
for (const o of t) r === e.length ? e.push(i = new M(this.O(j()), this.O(j()), this, this.options)) : i = e[r], i._$AI(o), r++;
|
|
475
|
+
r < e.length && (this._$AR(i && i._$AB.nextSibling, r), e.length = r);
|
|
403
476
|
}
|
|
404
477
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
405
478
|
for (this._$AP?.(!1, !0, e); t !== this._$AB; ) {
|
|
406
|
-
const
|
|
407
|
-
t.remove(), t =
|
|
479
|
+
const i = _t(t).nextSibling;
|
|
480
|
+
_t(t).remove(), t = i;
|
|
408
481
|
}
|
|
409
482
|
}
|
|
410
483
|
setConnected(t) {
|
|
411
484
|
this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
|
|
412
485
|
}
|
|
413
486
|
}
|
|
414
|
-
class
|
|
487
|
+
class K {
|
|
415
488
|
get tagName() {
|
|
416
489
|
return this.element.tagName;
|
|
417
490
|
}
|
|
418
491
|
get _$AU() {
|
|
419
492
|
return this._$AM._$AU;
|
|
420
493
|
}
|
|
421
|
-
constructor(t, e,
|
|
422
|
-
this.type = 1, this._$AH =
|
|
494
|
+
constructor(t, e, i, r, o) {
|
|
495
|
+
this.type = 1, this._$AH = d, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = d;
|
|
423
496
|
}
|
|
424
|
-
_$AI(t, e = this,
|
|
497
|
+
_$AI(t, e = this, i, r) {
|
|
425
498
|
const o = this.strings;
|
|
426
499
|
let n = !1;
|
|
427
|
-
if (o === void 0) t =
|
|
500
|
+
if (o === void 0) t = R(this, t, e, 0), n = !T(t) || t !== this._$AH && t !== C, n && (this._$AH = t);
|
|
428
501
|
else {
|
|
429
|
-
const
|
|
430
|
-
let a,
|
|
431
|
-
for (t = o[0], a = 0; a < o.length - 1; a++)
|
|
502
|
+
const c = t;
|
|
503
|
+
let a, l;
|
|
504
|
+
for (t = o[0], a = 0; a < o.length - 1; a++) l = R(this, c[i + a], e, a), l === C && (l = this._$AH[a]), n ||= !T(l) || l !== this._$AH[a], l === d ? t = d : t !== d && (t += (l ?? "") + o[a + 1]), this._$AH[a] = l;
|
|
432
505
|
}
|
|
433
|
-
n && !
|
|
506
|
+
n && !r && this.j(t);
|
|
434
507
|
}
|
|
435
508
|
j(t) {
|
|
436
|
-
t ===
|
|
509
|
+
t === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
437
510
|
}
|
|
438
511
|
}
|
|
439
|
-
class
|
|
512
|
+
class ae extends K {
|
|
440
513
|
constructor() {
|
|
441
514
|
super(...arguments), this.type = 3;
|
|
442
515
|
}
|
|
443
516
|
j(t) {
|
|
444
|
-
this.element[this.name] = t ===
|
|
517
|
+
this.element[this.name] = t === d ? void 0 : t;
|
|
445
518
|
}
|
|
446
519
|
}
|
|
447
|
-
class
|
|
520
|
+
class ce extends K {
|
|
448
521
|
constructor() {
|
|
449
522
|
super(...arguments), this.type = 4;
|
|
450
523
|
}
|
|
451
524
|
j(t) {
|
|
452
|
-
this.element.toggleAttribute(this.name, !!t && t !==
|
|
525
|
+
this.element.toggleAttribute(this.name, !!t && t !== d);
|
|
453
526
|
}
|
|
454
527
|
}
|
|
455
|
-
class
|
|
456
|
-
constructor(t, e,
|
|
457
|
-
super(t, e,
|
|
528
|
+
class le extends K {
|
|
529
|
+
constructor(t, e, i, r, o) {
|
|
530
|
+
super(t, e, i, r, o), this.type = 5;
|
|
458
531
|
}
|
|
459
532
|
_$AI(t, e = this) {
|
|
460
|
-
if ((t =
|
|
461
|
-
const
|
|
462
|
-
|
|
533
|
+
if ((t = R(this, t, e, 0) ?? d) === C) return;
|
|
534
|
+
const i = this._$AH, r = t === d && i !== d || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, o = t !== d && (i === d || r);
|
|
535
|
+
r && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
463
536
|
}
|
|
464
537
|
handleEvent(t) {
|
|
465
538
|
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
|
|
466
539
|
}
|
|
467
540
|
}
|
|
468
|
-
class
|
|
469
|
-
constructor(t, e,
|
|
470
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options =
|
|
541
|
+
class he {
|
|
542
|
+
constructor(t, e, i) {
|
|
543
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
|
|
471
544
|
}
|
|
472
545
|
get _$AU() {
|
|
473
546
|
return this._$AM._$AU;
|
|
474
547
|
}
|
|
475
548
|
_$AI(t) {
|
|
476
|
-
|
|
549
|
+
R(this, t);
|
|
477
550
|
}
|
|
478
551
|
}
|
|
479
|
-
const
|
|
480
|
-
|
|
481
|
-
const
|
|
482
|
-
const
|
|
483
|
-
let
|
|
484
|
-
if (
|
|
552
|
+
const ue = it.litHtmlPolyfillSupport;
|
|
553
|
+
ue?.(U, M), (it.litHtmlVersions ??= []).push("3.3.2");
|
|
554
|
+
const de = (s, t, e) => {
|
|
555
|
+
const i = e?.renderBefore ?? t;
|
|
556
|
+
let r = i._$litPart$;
|
|
557
|
+
if (r === void 0) {
|
|
485
558
|
const o = e?.renderBefore ?? null;
|
|
486
|
-
|
|
559
|
+
i._$litPart$ = r = new M(t.insertBefore(j(), o), o, void 0, e ?? {});
|
|
487
560
|
}
|
|
488
|
-
return
|
|
561
|
+
return r._$AI(s), r;
|
|
489
562
|
};
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
* Copyright 2017 Google LLC
|
|
493
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
494
|
-
*/
|
|
495
|
-
const at = globalThis;
|
|
496
|
-
let S = class extends E {
|
|
563
|
+
const nt = globalThis;
|
|
564
|
+
class P extends E {
|
|
497
565
|
constructor() {
|
|
498
566
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
499
567
|
}
|
|
@@ -503,7 +571,7 @@ let S = class extends E {
|
|
|
503
571
|
}
|
|
504
572
|
update(t) {
|
|
505
573
|
const e = this.render();
|
|
506
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
|
574
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = de(e, this.renderRoot, this.renderOptions);
|
|
507
575
|
}
|
|
508
576
|
connectedCallback() {
|
|
509
577
|
super.connectedCallback(), this._$Do?.setConnected(!0);
|
|
@@ -514,199 +582,116 @@ let S = class extends E {
|
|
|
514
582
|
render() {
|
|
515
583
|
return C;
|
|
516
584
|
}
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
const
|
|
520
|
-
|
|
521
|
-
(
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
* Copyright 2017 Google LLC
|
|
525
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
526
|
-
*/
|
|
527
|
-
const ht = (s) => (t, e) => {
|
|
528
|
-
e !== void 0 ? e.addInitializer((() => {
|
|
585
|
+
}
|
|
586
|
+
P._$litElement$ = !0, P.finalized = !0, nt.litElementHydrateSupport?.({ LitElement: P });
|
|
587
|
+
const pe = nt.litElementPolyfillSupport;
|
|
588
|
+
pe?.({ LitElement: P });
|
|
589
|
+
(nt.litElementVersions ??= []).push("4.2.2");
|
|
590
|
+
const at = (s) => (t, e) => {
|
|
591
|
+
e !== void 0 ? e.addInitializer(() => {
|
|
529
592
|
customElements.define(s, t);
|
|
530
|
-
})
|
|
593
|
+
}) : customElements.define(s, t);
|
|
531
594
|
};
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
*/
|
|
537
|
-
const ce = { attribute: !0, type: String, converter: D, reflect: !1, hasChanged: W }, ue = (s = ce, t, e) => {
|
|
538
|
-
const { kind: r, metadata: i } = e;
|
|
539
|
-
let o = globalThis.litPropertyMetadata.get(i);
|
|
540
|
-
if (o === void 0 && globalThis.litPropertyMetadata.set(i, o = /* @__PURE__ */ new Map()), r === "setter" && ((s = Object.create(s)).wrapped = !0), o.set(e.name, s), r === "accessor") {
|
|
595
|
+
const fe = { attribute: !0, type: String, converter: q, reflect: !1, hasChanged: F }, _e = (s = fe, t, e) => {
|
|
596
|
+
const { kind: i, metadata: r } = e;
|
|
597
|
+
let o = globalThis.litPropertyMetadata.get(r);
|
|
598
|
+
if (o === void 0 && globalThis.litPropertyMetadata.set(r, o = /* @__PURE__ */ new Map()), i === "setter" && ((s = Object.create(s)).wrapped = !0), o.set(e.name, s), i === "accessor") {
|
|
541
599
|
const { name: n } = e;
|
|
542
|
-
return { set(
|
|
600
|
+
return { set(c) {
|
|
543
601
|
const a = t.get.call(this);
|
|
544
|
-
t.set.call(this,
|
|
545
|
-
}, init(
|
|
546
|
-
return
|
|
602
|
+
t.set.call(this, c), this.requestUpdate(n, a, s, !0, c);
|
|
603
|
+
}, init(c) {
|
|
604
|
+
return c !== void 0 && this.C(n, void 0, s, c), c;
|
|
547
605
|
} };
|
|
548
606
|
}
|
|
549
|
-
if (
|
|
607
|
+
if (i === "setter") {
|
|
550
608
|
const { name: n } = e;
|
|
551
|
-
return function(
|
|
609
|
+
return function(c) {
|
|
552
610
|
const a = this[n];
|
|
553
|
-
t.call(this,
|
|
611
|
+
t.call(this, c), this.requestUpdate(n, a, s, !0, c);
|
|
554
612
|
};
|
|
555
613
|
}
|
|
556
|
-
throw Error("Unsupported decorator location: " +
|
|
614
|
+
throw Error("Unsupported decorator location: " + i);
|
|
557
615
|
};
|
|
558
|
-
function
|
|
559
|
-
return (t, e) => typeof e == "object" ?
|
|
560
|
-
const n =
|
|
561
|
-
return
|
|
616
|
+
function f(s) {
|
|
617
|
+
return (t, e) => typeof e == "object" ? _e(s, t, e) : ((i, r, o) => {
|
|
618
|
+
const n = r.hasOwnProperty(o);
|
|
619
|
+
return r.constructor.createProperty(o, i), n ? Object.getOwnPropertyDescriptor(r, o) : void 0;
|
|
562
620
|
})(s, t, e);
|
|
563
621
|
}
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
* Copyright 2017 Google LLC
|
|
567
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
568
|
-
*/
|
|
569
|
-
function xt(s) {
|
|
570
|
-
return p({ ...s, state: !0, attribute: !1 });
|
|
622
|
+
function ct(s) {
|
|
623
|
+
return f({ ...s, state: !0, attribute: !1 });
|
|
571
624
|
}
|
|
572
|
-
/**
|
|
573
|
-
* @license
|
|
574
|
-
* Copyright 2017 Google LLC
|
|
575
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
576
|
-
*/
|
|
577
|
-
const de = Symbol();
|
|
578
|
-
class pe {
|
|
579
|
-
get taskComplete() {
|
|
580
|
-
return this.t || (this.i === 1 ? this.t = new Promise(((t, e) => {
|
|
581
|
-
this.o = t, this.h = e;
|
|
582
|
-
})) : this.i === 3 ? this.t = Promise.reject(this.l) : this.t = Promise.resolve(this.u)), this.t;
|
|
583
|
-
}
|
|
584
|
-
constructor(t, e, r) {
|
|
585
|
-
this.p = 0, this.i = 0, (this._ = t).addController(this);
|
|
586
|
-
const i = typeof e == "object" ? e : { task: e, args: r };
|
|
587
|
-
this.v = i.task, this.j = i.args, this.m = i.argsEqual ?? fe, this.k = i.onComplete, this.A = i.onError, this.autoRun = i.autoRun ?? !0, "initialValue" in i && (this.u = i.initialValue, this.i = 2, this.O = this.T?.());
|
|
588
|
-
}
|
|
589
|
-
hostUpdate() {
|
|
590
|
-
this.autoRun === !0 && this.S();
|
|
591
|
-
}
|
|
592
|
-
hostUpdated() {
|
|
593
|
-
this.autoRun === "afterUpdate" && this.S();
|
|
594
|
-
}
|
|
595
|
-
T() {
|
|
596
|
-
if (this.j === void 0) return;
|
|
597
|
-
const t = this.j();
|
|
598
|
-
if (!Array.isArray(t)) throw Error("The args function must return an array");
|
|
599
|
-
return t;
|
|
600
|
-
}
|
|
601
|
-
async S() {
|
|
602
|
-
const t = this.T(), e = this.O;
|
|
603
|
-
this.O = t, t === e || t === void 0 || e !== void 0 && this.m(e, t) || await this.run(t);
|
|
604
|
-
}
|
|
605
|
-
async run(t) {
|
|
606
|
-
let e, r;
|
|
607
|
-
t ??= this.T(), this.O = t, this.i === 1 ? this.q?.abort() : (this.t = void 0, this.o = void 0, this.h = void 0), this.i = 1, this.autoRun === "afterUpdate" ? queueMicrotask((() => this._.requestUpdate())) : this._.requestUpdate();
|
|
608
|
-
const i = ++this.p;
|
|
609
|
-
this.q = new AbortController();
|
|
610
|
-
let o = !1;
|
|
611
|
-
try {
|
|
612
|
-
e = await this.v(t, { signal: this.q.signal });
|
|
613
|
-
} catch (n) {
|
|
614
|
-
o = !0, r = n;
|
|
615
|
-
}
|
|
616
|
-
if (this.p === i) {
|
|
617
|
-
if (e === de) this.i = 0;
|
|
618
|
-
else {
|
|
619
|
-
if (o === !1) {
|
|
620
|
-
try {
|
|
621
|
-
this.k?.(e);
|
|
622
|
-
} catch {
|
|
623
|
-
}
|
|
624
|
-
this.i = 2, this.o?.(e);
|
|
625
|
-
} else {
|
|
626
|
-
try {
|
|
627
|
-
this.A?.(r);
|
|
628
|
-
} catch {
|
|
629
|
-
}
|
|
630
|
-
this.i = 3, this.h?.(r);
|
|
631
|
-
}
|
|
632
|
-
this.u = e, this.l = r;
|
|
633
|
-
}
|
|
634
|
-
this._.requestUpdate();
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
abort(t) {
|
|
638
|
-
this.i === 1 && this.q?.abort(t);
|
|
639
|
-
}
|
|
640
|
-
get value() {
|
|
641
|
-
return this.u;
|
|
642
|
-
}
|
|
643
|
-
get error() {
|
|
644
|
-
return this.l;
|
|
645
|
-
}
|
|
646
|
-
get status() {
|
|
647
|
-
return this.i;
|
|
648
|
-
}
|
|
649
|
-
render(t) {
|
|
650
|
-
switch (this.i) {
|
|
651
|
-
case 0:
|
|
652
|
-
return t.initial?.();
|
|
653
|
-
case 1:
|
|
654
|
-
return t.pending?.();
|
|
655
|
-
case 2:
|
|
656
|
-
return t.complete?.(this.value);
|
|
657
|
-
case 3:
|
|
658
|
-
return t.error?.(this.error);
|
|
659
|
-
default:
|
|
660
|
-
throw Error("Unexpected status: " + this.i);
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
const fe = (s, t) => s === t || s.length === t.length && s.every(((e, r) => !W(e, t[r])));
|
|
665
625
|
!window.orbit && !"/".includes("cypress") && await new Promise((s) => {
|
|
666
626
|
document.addEventListener("orbit-ready", () => {
|
|
667
627
|
s(!0);
|
|
668
628
|
});
|
|
669
629
|
});
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
(
|
|
673
|
-
|
|
630
|
+
class $e extends P {
|
|
631
|
+
constructor() {
|
|
632
|
+
super(...arguments), this.object = {
|
|
633
|
+
"@id": ""
|
|
634
|
+
}, this.isType = (t, e) => {
|
|
635
|
+
const r = (e ?? this.object)["@type"];
|
|
636
|
+
return Array.isArray(r) ? r.includes(t) : typeof r == "string" ? r === t : !1;
|
|
637
|
+
};
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
var ge = Object.defineProperty, ye = (s, t, e, i) => {
|
|
641
|
+
for (var r = void 0, o = s.length - 1, n; o >= 0; o--)
|
|
642
|
+
(n = s[o]) && (r = n(t, e, r) || r);
|
|
643
|
+
return r && ge(t, e, r), r;
|
|
674
644
|
};
|
|
675
|
-
class lt extends
|
|
645
|
+
class lt extends P {
|
|
676
646
|
constructor() {
|
|
677
|
-
super(...arguments), this.objects = [], this.hasType = (t, e
|
|
647
|
+
super(...arguments), this.objects = [], this.hasType = (t, e) => (e ?? this.objects ?? []).some((r) => {
|
|
648
|
+
const o = r["@type"];
|
|
649
|
+
return Array.isArray(o) ? o.includes(t) : typeof o == "string" ? o === t : !1;
|
|
650
|
+
});
|
|
678
651
|
}
|
|
679
652
|
}
|
|
680
|
-
|
|
681
|
-
|
|
653
|
+
ye([
|
|
654
|
+
f({ attribute: !1 })
|
|
682
655
|
], lt.prototype, "objects");
|
|
683
|
-
var
|
|
684
|
-
for (var
|
|
685
|
-
(n = s[o]) && (
|
|
686
|
-
return
|
|
656
|
+
var ve = Object.defineProperty, g = (s, t, e, i) => {
|
|
657
|
+
for (var r = void 0, o = s.length - 1, n; o >= 0; o--)
|
|
658
|
+
(n = s[o]) && (r = n(t, e, r) || r);
|
|
659
|
+
return r && ve(t, e, r), r;
|
|
687
660
|
};
|
|
688
|
-
class
|
|
661
|
+
class _ extends lt {
|
|
689
662
|
constructor({
|
|
690
663
|
defaultRoute: t = !1,
|
|
691
664
|
setupSubscriptions: e = !0,
|
|
692
|
-
ignoreRouter:
|
|
665
|
+
ignoreRouter: i = !1
|
|
693
666
|
} = {}) {
|
|
694
|
-
super(), this.cherryPickedProperties = [], this.currentRoute = "";
|
|
695
|
-
const
|
|
696
|
-
document.readyState === "complete" && this._attach(t, e,
|
|
667
|
+
super(), this.ready = !1, this.cherryPickedProperties = [], this.currentRoute = "";
|
|
668
|
+
const r = () => {
|
|
669
|
+
document.readyState === "complete" && this._attach(t, e, i).then(
|
|
697
670
|
(o) => {
|
|
698
671
|
o && this.requestUpdate();
|
|
699
672
|
}
|
|
700
673
|
);
|
|
701
674
|
};
|
|
702
|
-
document.readyState === "complete" ?
|
|
703
|
-
}
|
|
704
|
-
async _attach(t, e,
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
675
|
+
document.readyState === "complete" ? r() : document.addEventListener("readystatechange", r);
|
|
676
|
+
}
|
|
677
|
+
async _attach(t, e, i) {
|
|
678
|
+
if (!this.orbit && window.orbit && (this.orbit = window.orbit, e)) {
|
|
679
|
+
if (we({
|
|
680
|
+
component: this,
|
|
681
|
+
defaultRoute: t,
|
|
682
|
+
ignoreRouter: i
|
|
683
|
+
}), this.route && (this.component = this.orbit.getComponentFromRoute(this.route), this.component))
|
|
684
|
+
for (const r of this.orbit.components)
|
|
685
|
+
r.uniq === this.component.uniq && (r.instance = this);
|
|
686
|
+
return await this._afterAttach(), this.ready = !0, this.dispatchEvent(
|
|
687
|
+
new CustomEvent("component-ready", {
|
|
688
|
+
detail: {
|
|
689
|
+
component: this.component
|
|
690
|
+
}
|
|
691
|
+
})
|
|
692
|
+
), Promise.resolve(!0);
|
|
693
|
+
}
|
|
694
|
+
return Promise.resolve(!1);
|
|
710
695
|
}
|
|
711
696
|
async _afterAttach() {
|
|
712
697
|
return Promise.resolve();
|
|
@@ -714,62 +699,72 @@ class $ extends lt {
|
|
|
714
699
|
_navigate(t) {
|
|
715
700
|
window.sibRouter.previousRoute = this.currentRoute, window.sibRouter.previousResource = window.sibRouter.currentResource;
|
|
716
701
|
const e = t.target?.closest("[navigation-target]");
|
|
717
|
-
let
|
|
718
|
-
const
|
|
702
|
+
let i = e.getAttribute("navigation-target");
|
|
703
|
+
const r = e.getAttribute("navigation-subrouter"), o = e.getAttribute("navigation-resource"), n = e.getAttribute("navigation-rdf-type");
|
|
719
704
|
if (n) {
|
|
720
|
-
const
|
|
705
|
+
const c = window.orbit?.components?.filter(
|
|
721
706
|
(a) => a?.routeAttributes?.["rdf-type"] === n
|
|
722
707
|
);
|
|
723
|
-
|
|
708
|
+
c && (i = c[0]?.uniq);
|
|
724
709
|
}
|
|
725
|
-
|
|
726
|
-
(window.orbit ? window.orbit.getRoute(
|
|
710
|
+
i && Se(
|
|
711
|
+
(window.orbit ? window.orbit.getRoute(i, !0) : i) + (r ? `-${r}` : ""),
|
|
727
712
|
o
|
|
728
713
|
), t.preventDefault();
|
|
729
714
|
}
|
|
730
715
|
_normalizeLdpContains(t) {
|
|
731
|
-
return
|
|
716
|
+
return t === null ? [] : Array.isArray(t) ? t : [t];
|
|
732
717
|
}
|
|
733
|
-
async _expandContainer(t, e = !0) {
|
|
718
|
+
async _expandContainer(t, e = !0, i = this.cherryPickedProperties) {
|
|
734
719
|
const r = [];
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
720
|
+
return await Promise.all(
|
|
721
|
+
t.map(async (o) => {
|
|
722
|
+
const n = await this._getProxyValue(
|
|
723
|
+
await o,
|
|
724
|
+
e,
|
|
725
|
+
i
|
|
726
|
+
);
|
|
727
|
+
n && r.push(n);
|
|
728
|
+
})
|
|
729
|
+
), r;
|
|
740
730
|
}
|
|
741
|
-
async _getProperties(t, e = !0,
|
|
742
|
-
const
|
|
731
|
+
async _getProperties(t, e = !0, i = this.cherryPickedProperties) {
|
|
732
|
+
const r = await t.properties, o = {
|
|
743
733
|
"@id": t["@id"],
|
|
744
734
|
"@type": t["@type"],
|
|
745
735
|
"@context": t.serverContext,
|
|
746
736
|
_originalResource: t
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
737
|
+
}, n = i.map(async (a) => {
|
|
738
|
+
if (!r?.includes(a.key)) return;
|
|
739
|
+
let l = await t.get(a.key);
|
|
740
|
+
return a.expand && (l = await this._getProxyValue(l, e, i)), a.cast && (l = await a.cast(l)), { prop: a, value: l };
|
|
741
|
+
}), c = (await Promise.all(n)).filter(
|
|
742
|
+
(a) => a !== void 0
|
|
743
|
+
);
|
|
744
|
+
for (const { prop: a, value: l } of c)
|
|
745
|
+
l !== void 0 && (o[a.value] = l);
|
|
754
746
|
return await this._responseAdaptator(o);
|
|
755
747
|
}
|
|
756
|
-
async
|
|
748
|
+
async _hasCherryPickedProperties(t) {
|
|
749
|
+
const e = await t.properties;
|
|
750
|
+
for (const i of this.cherryPickedProperties)
|
|
751
|
+
if (e?.includes(i.key))
|
|
752
|
+
return !0;
|
|
753
|
+
return !1;
|
|
754
|
+
}
|
|
755
|
+
async _getProxyValue(t, e = !0, i = this.cherryPickedProperties) {
|
|
757
756
|
try {
|
|
758
|
-
if (t)
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
return await this._expandContainer(o, e);
|
|
768
|
-
}
|
|
769
|
-
return await this._getProperties(i, e, r);
|
|
770
|
-
}
|
|
757
|
+
if (!t) return;
|
|
758
|
+
let r = t;
|
|
759
|
+
if (typeof t == "string" ? r = await window.sibStore.getData(t, wt) : t.isFullResource && !t.isFullResource?.() && (r = await window.sibStore.getData(t["@id"], wt)), !r) return { _originalResource: r };
|
|
760
|
+
if (typeof r != "object" || r === null) return;
|
|
761
|
+
if (r.isContainer?.() && r["ldp:contains"]) {
|
|
762
|
+
if (await this._hasCherryPickedProperties(r))
|
|
763
|
+
return await this._getProperties(r, e, i);
|
|
764
|
+
const o = this._normalizeLdpContains(await r["ldp:contains"]);
|
|
765
|
+
return await this._expandContainer(o, e, i);
|
|
771
766
|
}
|
|
772
|
-
return;
|
|
767
|
+
return await this._getProperties(r, e, i);
|
|
773
768
|
} catch {
|
|
774
769
|
}
|
|
775
770
|
}
|
|
@@ -778,108 +773,133 @@ class $ extends lt {
|
|
|
778
773
|
}
|
|
779
774
|
gatekeeper() {
|
|
780
775
|
if (!this.orbit || !this.noRouter && this.route && this.currentRoute && !this.route.startsWith(this.currentRoute) || !this.dataSrc)
|
|
781
|
-
return
|
|
776
|
+
return d;
|
|
782
777
|
}
|
|
783
778
|
}
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
],
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
],
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
],
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
],
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
],
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
],
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
],
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
],
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
779
|
+
g([
|
|
780
|
+
ct()
|
|
781
|
+
], _.prototype, "ready");
|
|
782
|
+
g([
|
|
783
|
+
f({ attribute: "default-data-src", reflect: !0 })
|
|
784
|
+
], _.prototype, "defaultDataSrc");
|
|
785
|
+
g([
|
|
786
|
+
f({ attribute: "data-src", reflect: !0 })
|
|
787
|
+
], _.prototype, "dataSrc");
|
|
788
|
+
g([
|
|
789
|
+
f({ attribute: "nested-field" })
|
|
790
|
+
], _.prototype, "nestedField");
|
|
791
|
+
g([
|
|
792
|
+
f({ attribute: "uniq" })
|
|
793
|
+
], _.prototype, "uniq");
|
|
794
|
+
g([
|
|
795
|
+
f({ attribute: "route" })
|
|
796
|
+
], _.prototype, "route");
|
|
797
|
+
g([
|
|
798
|
+
f({ attribute: !1 })
|
|
799
|
+
], _.prototype, "cherryPickedProperties");
|
|
800
|
+
g([
|
|
801
|
+
ct()
|
|
802
|
+
], _.prototype, "orbit");
|
|
803
|
+
g([
|
|
804
|
+
ct()
|
|
805
|
+
], _.prototype, "currentRoute");
|
|
806
|
+
const me = (s, { keywords: t = [], attributes: e = ["dataSrc"] } = {}) => {
|
|
807
|
+
const i = () => {
|
|
808
|
+
if (!t.length || !e.length) return;
|
|
809
|
+
s.caching === void 0 && (s.caching = 0), s.hasCachedDatas === void 0 && (s.hasCachedDatas = !1);
|
|
810
|
+
let r = !1;
|
|
811
|
+
const o = new Set(t);
|
|
812
|
+
s.cacheListener = (n) => {
|
|
813
|
+
const c = n.detail.id || n.detail.resource?.["@id"];
|
|
814
|
+
if (!c || !Array.from(o).some((u) => {
|
|
815
|
+
const h = c.indexOf(u);
|
|
816
|
+
return h !== -1 && (h === 0 || c[h - 1] === "/");
|
|
817
|
+
})) return;
|
|
818
|
+
let l = !1;
|
|
819
|
+
for (const u of e)
|
|
820
|
+
s[u] && c !== s[u] && (window.sibStore.clearCache(s[u]), l = !0);
|
|
821
|
+
l && (s.caching++, s.hasCachedDatas = !1, r || (r = !0, requestAnimationFrame(() => {
|
|
822
|
+
s.requestUpdate(), r = !1;
|
|
823
|
+
})));
|
|
824
|
+
}, s._subscriptions.add(["save", s.cacheListener]), s._subscribe();
|
|
818
825
|
};
|
|
819
|
-
document.readyState !== "complete"
|
|
826
|
+
if (document.readyState !== "complete") {
|
|
827
|
+
const r = () => {
|
|
828
|
+
document.readyState === "complete" && (document.removeEventListener("readystatechange", r), i());
|
|
829
|
+
};
|
|
830
|
+
document.addEventListener("readystatechange", r);
|
|
831
|
+
} else
|
|
832
|
+
i();
|
|
820
833
|
};
|
|
821
|
-
function
|
|
822
|
-
return Math.random().toString(16).slice(2)
|
|
834
|
+
function be() {
|
|
835
|
+
return `${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
823
836
|
}
|
|
824
|
-
const
|
|
837
|
+
const we = ({
|
|
825
838
|
component: s,
|
|
826
839
|
defaultRoute: t = !1,
|
|
827
840
|
ignoreRouter: e = !1
|
|
828
841
|
}) => {
|
|
829
|
-
if (s.uniq || (s.uniq =
|
|
842
|
+
if (s.uniq || (s.uniq = be(), t && !s.route && !e && (s.route = t)), s._subscriptions = /* @__PURE__ */ new Set(), !e) {
|
|
830
843
|
s.route || (s.route = s.uniq, window.orbit && (s.route = window.orbit.getRoute(s.uniq))), s.noRouter = !0;
|
|
831
|
-
let
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
844
|
+
let i = document.querySelector("solid-router");
|
|
845
|
+
const r = window.sibRouter.currentResource;
|
|
846
|
+
for (; i; ) {
|
|
847
|
+
s.noRouter = !1, s.currentRoute = i.currentRouteName, s.currentResource = r;
|
|
848
|
+
const o = `[data-view="${i.currentRouteName}"] solid-router`;
|
|
849
|
+
i = document.querySelector(o);
|
|
850
|
+
}
|
|
836
851
|
s.navigationListener = () => {
|
|
837
|
-
let
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
852
|
+
let o = document.querySelector("solid-router");
|
|
853
|
+
const n = window.sibRouter.currentResource;
|
|
854
|
+
for (; o; ) {
|
|
855
|
+
s.noRouter = !1, s.currentRoute = o.currentRouteName, s.currentResource = n;
|
|
856
|
+
const c = `[data-view="${o.currentRouteName}"] solid-router`;
|
|
857
|
+
o = document.querySelector(c);
|
|
858
|
+
}
|
|
842
859
|
s.requestUpdate();
|
|
843
860
|
}, s._subscriptions.add(["navigate", s.navigationListener]);
|
|
844
861
|
}
|
|
845
862
|
s._subscribe = () => {
|
|
846
863
|
s._unsubscribe();
|
|
847
|
-
for (const
|
|
848
|
-
document.addEventListener(
|
|
864
|
+
for (const i of s._subscriptions)
|
|
865
|
+
document.addEventListener(i[0], i[1]);
|
|
849
866
|
}, s._unsubscribe = () => {
|
|
850
|
-
for (const
|
|
851
|
-
document.removeEventListener(
|
|
867
|
+
for (const i of s._subscriptions)
|
|
868
|
+
document.removeEventListener(i[0], i[1]);
|
|
852
869
|
}, s._subscribe();
|
|
853
|
-
}
|
|
854
|
-
class me extends S {
|
|
855
|
-
constructor() {
|
|
856
|
-
super(...arguments), this.object = {
|
|
857
|
-
"@id": ""
|
|
858
|
-
}, this.isType = (t, e = this.object) => {
|
|
859
|
-
const r = e["@type"];
|
|
860
|
-
return Array.isArray(r) ? r.includes(t) : typeof r == "string" ? r === t : !1;
|
|
861
|
-
};
|
|
862
|
-
}
|
|
863
|
-
}
|
|
864
|
-
const mt = (s, t) => {
|
|
870
|
+
}, b = (s, t) => {
|
|
865
871
|
let e = s;
|
|
866
|
-
for (
|
|
867
|
-
e
|
|
872
|
+
for (const i of t)
|
|
873
|
+
if (e && i in e)
|
|
874
|
+
e = e[i];
|
|
875
|
+
else
|
|
876
|
+
return;
|
|
868
877
|
return e;
|
|
869
|
-
},
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
878
|
+
}, Ae = (s, t, e = "asc") => {
|
|
879
|
+
const i = Array.isArray(t) ? t : [t], r = e !== "asc", o = [...s], c = (() => {
|
|
880
|
+
const a = b(o[0], i);
|
|
881
|
+
if (typeof a == "number")
|
|
882
|
+
return (l, u) => {
|
|
883
|
+
const h = b(l, i), p = b(u, i);
|
|
884
|
+
return h == null ? p == null ? 0 : 1 : p == null ? -1 : h - p;
|
|
885
|
+
};
|
|
886
|
+
if (typeof a == "string")
|
|
887
|
+
return (l, u) => {
|
|
888
|
+
const h = b(l, i), p = b(u, i);
|
|
889
|
+
return h == null ? p == null ? 0 : 1 : p == null ? -1 : h.localeCompare(p);
|
|
890
|
+
};
|
|
891
|
+
if (a instanceof Date)
|
|
892
|
+
return (l, u) => {
|
|
893
|
+
const h = b(l, i), p = b(u, i);
|
|
894
|
+
return h == null ? p == null ? 0 : 1 : p == null ? -1 : h.getTime() - p.getTime();
|
|
895
|
+
};
|
|
880
896
|
throw new TypeError(`Unsupported data type for key "${t}"`);
|
|
881
|
-
|
|
882
|
-
|
|
897
|
+
})();
|
|
898
|
+
return o.sort((a, l) => {
|
|
899
|
+
const u = c(a, l);
|
|
900
|
+
return r ? -u : u;
|
|
901
|
+
}), o;
|
|
902
|
+
}, Se = (s, t = !1) => {
|
|
883
903
|
window.dispatchEvent(
|
|
884
904
|
new CustomEvent("requestNavigation", {
|
|
885
905
|
detail: {
|
|
@@ -889,43 +909,41 @@ const mt = (s, t) => {
|
|
|
889
909
|
})
|
|
890
910
|
);
|
|
891
911
|
}, wt = {};
|
|
892
|
-
var Ee = Object.getOwnPropertyDescriptor,
|
|
893
|
-
for (var
|
|
894
|
-
(n = s[o]) && (
|
|
895
|
-
return
|
|
912
|
+
var Ee = Object.getOwnPropertyDescriptor, Pe = (s, t, e, i) => {
|
|
913
|
+
for (var r = i > 1 ? void 0 : i ? Ee(t, e) : t, o = s.length - 1, n; o >= 0; o--)
|
|
914
|
+
(n = s[o]) && (r = n(r) || r);
|
|
915
|
+
return r;
|
|
896
916
|
};
|
|
897
|
-
let
|
|
917
|
+
let G = class extends _ {
|
|
898
918
|
constructor() {
|
|
899
|
-
super(...arguments), this.cherryPickedProperties = [
|
|
900
|
-
{ key: "name", value: "name" }
|
|
901
|
-
], this._getResource = new pe(this, {
|
|
919
|
+
super(...arguments), this.cherryPickedProperties = [{ key: "name", value: "name" }], this._getResource = new te(this, {
|
|
902
920
|
task: async ([s]) => {
|
|
903
921
|
if (!(!s || !this.orbit || !this.noRouter && this.route && this.currentRoute && !this.route.startsWith(this.currentRoute))) {
|
|
904
922
|
if (!this.hasCachedDatas || this.oldDataSrc !== s) {
|
|
905
923
|
if (!s) return;
|
|
906
924
|
this.datas = await this._getProxyValue(s), this.hasCachedDatas = !0;
|
|
907
925
|
}
|
|
908
|
-
return this.oldDataSrc !== s && (this.oldDataSrc = s),
|
|
926
|
+
return this.oldDataSrc !== s && (this.oldDataSrc = s), Ae(this.datas, "name", "asc");
|
|
909
927
|
}
|
|
910
928
|
},
|
|
911
929
|
args: () => [this.dataSrc, this.caching, this.currentRoute]
|
|
912
930
|
});
|
|
913
931
|
}
|
|
914
932
|
async _afterAttach() {
|
|
915
|
-
return
|
|
933
|
+
return me(this, {
|
|
916
934
|
keywords: ["some-keyword", "for-invalidating", "cache"]
|
|
917
935
|
}), Promise.resolve();
|
|
918
936
|
}
|
|
919
937
|
render() {
|
|
920
938
|
return this.gatekeeper() || this._getResource.render({
|
|
921
|
-
pending: () =>
|
|
922
|
-
complete: (s) => s ?
|
|
939
|
+
pending: () => L`<solid-loader></solid-loader>`,
|
|
940
|
+
complete: (s) => s ? L`<div>
|
|
923
941
|
<sample-objects .objects=${s}></sample-objects>
|
|
924
|
-
</div>` :
|
|
942
|
+
</div>` : d
|
|
925
943
|
});
|
|
926
944
|
}
|
|
927
945
|
};
|
|
928
|
-
|
|
946
|
+
G.styles = rt`
|
|
929
947
|
div {
|
|
930
948
|
background-color: red;
|
|
931
949
|
position: absolute;
|
|
@@ -935,47 +953,27 @@ Q.styles = rt`
|
|
|
935
953
|
bottom: 0;
|
|
936
954
|
}
|
|
937
955
|
`;
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
],
|
|
941
|
-
|
|
942
|
-
* @license
|
|
943
|
-
* Copyright 2021 Google LLC
|
|
944
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
945
|
-
*/
|
|
946
|
-
const Y = "lit-localize-status";
|
|
947
|
-
/**
|
|
948
|
-
* @license
|
|
949
|
-
* Copyright 2021 Google LLC
|
|
950
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
951
|
-
*/
|
|
956
|
+
G = Pe([
|
|
957
|
+
at("solid-boilerplate")
|
|
958
|
+
], G);
|
|
959
|
+
const Q = "lit-localize-status";
|
|
952
960
|
const Ce = (s, ...t) => ({
|
|
953
961
|
strTag: !0,
|
|
954
962
|
strings: s,
|
|
955
963
|
values: t
|
|
956
|
-
}),
|
|
957
|
-
let
|
|
958
|
-
for (let
|
|
959
|
-
|
|
960
|
-
return
|
|
964
|
+
}), Lt = Ce, Re = (s) => typeof s != "string" && "strTag" in s, Ut = (s, t, e) => {
|
|
965
|
+
let i = s[0];
|
|
966
|
+
for (let r = 1; r < s.length; r++)
|
|
967
|
+
i += t[e ? e[r - 1] : r - 1], i += s[r];
|
|
968
|
+
return i;
|
|
961
969
|
};
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
966
|
-
*/
|
|
967
|
-
const Ut = ((s) => Pe(s) ? Lt(s.strings, s.values) : s);
|
|
968
|
-
let ct = Ut, At = !1;
|
|
969
|
-
function Re(s) {
|
|
970
|
+
const Mt = ((s) => Re(s) ? Ut(s.strings, s.values) : s);
|
|
971
|
+
let ht = Mt, At = !1;
|
|
972
|
+
function xe(s) {
|
|
970
973
|
if (At)
|
|
971
974
|
throw new Error("lit-localize can only be configured once");
|
|
972
|
-
|
|
975
|
+
ht = s, At = !0;
|
|
973
976
|
}
|
|
974
|
-
/**
|
|
975
|
-
* @license
|
|
976
|
-
* Copyright 2021 Google LLC
|
|
977
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
978
|
-
*/
|
|
979
977
|
class Oe {
|
|
980
978
|
constructor(t) {
|
|
981
979
|
this.__litLocalizeEventHandler = (e) => {
|
|
@@ -983,24 +981,14 @@ class Oe {
|
|
|
983
981
|
}, this.host = t;
|
|
984
982
|
}
|
|
985
983
|
hostConnected() {
|
|
986
|
-
window.addEventListener(
|
|
984
|
+
window.addEventListener(Q, this.__litLocalizeEventHandler);
|
|
987
985
|
}
|
|
988
986
|
hostDisconnected() {
|
|
989
|
-
window.removeEventListener(
|
|
987
|
+
window.removeEventListener(Q, this.__litLocalizeEventHandler);
|
|
990
988
|
}
|
|
991
989
|
}
|
|
992
|
-
const je = (s) => s.addController(new Oe(s)),
|
|
993
|
-
|
|
994
|
-
* @license
|
|
995
|
-
* Copyright 2021 Google LLC
|
|
996
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
997
|
-
*/
|
|
998
|
-
const Mt = () => (s, t) => (s.addInitializer(xe), s);
|
|
999
|
-
/**
|
|
1000
|
-
* @license
|
|
1001
|
-
* Copyright 2020 Google LLC
|
|
1002
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1003
|
-
*/
|
|
990
|
+
const je = (s) => s.addController(new Oe(s)), Te = je;
|
|
991
|
+
const Nt = () => (s, t) => (s.addInitializer(Te), s);
|
|
1004
992
|
class Ht {
|
|
1005
993
|
constructor() {
|
|
1006
994
|
this.settled = !1, this.promise = new Promise((t, e) => {
|
|
@@ -1014,170 +1002,150 @@ class Ht {
|
|
|
1014
1002
|
this.settled = !0, this._reject(t);
|
|
1015
1003
|
}
|
|
1016
1004
|
}
|
|
1017
|
-
|
|
1018
|
-
* @license
|
|
1019
|
-
* Copyright 2014 Travis Webb
|
|
1020
|
-
* SPDX-License-Identifier: MIT
|
|
1021
|
-
*/
|
|
1022
|
-
const _ = [];
|
|
1005
|
+
const $ = [];
|
|
1023
1006
|
for (let s = 0; s < 256; s++)
|
|
1024
|
-
|
|
1025
|
-
function
|
|
1026
|
-
let t = 0, e = 8997,
|
|
1027
|
-
for (let
|
|
1028
|
-
e ^= s.charCodeAt(
|
|
1029
|
-
return
|
|
1007
|
+
$[s] = (s >> 4 & 15).toString(16) + (s & 15).toString(16);
|
|
1008
|
+
function Le(s) {
|
|
1009
|
+
let t = 0, e = 8997, i = 0, r = 33826, o = 0, n = 40164, c = 0, a = 52210;
|
|
1010
|
+
for (let l = 0; l < s.length; l++)
|
|
1011
|
+
e ^= s.charCodeAt(l), t = e * 435, i = r * 435, o = n * 435, c = a * 435, o += e << 8, c += r << 8, i += t >>> 16, e = t & 65535, o += i >>> 16, r = i & 65535, a = c + (o >>> 16) & 65535, n = o & 65535;
|
|
1012
|
+
return $[a >> 8] + $[a & 255] + $[n >> 8] + $[n & 255] + $[r >> 8] + $[r & 255] + $[e >> 8] + $[e & 255];
|
|
1030
1013
|
}
|
|
1031
|
-
|
|
1032
|
-
* @license
|
|
1033
|
-
* Copyright 2020 Google LLC
|
|
1034
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1035
|
-
*/
|
|
1036
|
-
const Le = "", Ue = "h", Me = "s";
|
|
1014
|
+
const Ue = "", Me = "h", Ne = "s";
|
|
1037
1015
|
function He(s, t) {
|
|
1038
|
-
return (t ?
|
|
1016
|
+
return (t ? Me : Ne) + Le(typeof s == "string" ? s : s.join(Ue));
|
|
1039
1017
|
}
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
* Copyright 2021 Google LLC
|
|
1043
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1044
|
-
*/
|
|
1045
|
-
const Et = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new Map();
|
|
1046
|
-
function Ne(s, t, e) {
|
|
1018
|
+
const St = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new Map();
|
|
1019
|
+
function De(s, t, e) {
|
|
1047
1020
|
if (s) {
|
|
1048
|
-
const
|
|
1049
|
-
if (
|
|
1050
|
-
if (typeof
|
|
1051
|
-
return
|
|
1052
|
-
if ("strTag" in
|
|
1053
|
-
return
|
|
1054
|
-
|
|
1021
|
+
const i = e?.id ?? qe(t), r = s[i];
|
|
1022
|
+
if (r) {
|
|
1023
|
+
if (typeof r == "string")
|
|
1024
|
+
return r;
|
|
1025
|
+
if ("strTag" in r)
|
|
1026
|
+
return Ut(
|
|
1027
|
+
r.strings,
|
|
1055
1028
|
// Cast `template` because its type wasn't automatically narrowed (but
|
|
1056
1029
|
// we know it must be the same type as `localized`).
|
|
1057
1030
|
t.values,
|
|
1058
|
-
|
|
1031
|
+
r.values
|
|
1059
1032
|
);
|
|
1060
1033
|
{
|
|
1061
|
-
let o =
|
|
1062
|
-
return o === void 0 && (o =
|
|
1063
|
-
...
|
|
1034
|
+
let o = St.get(r);
|
|
1035
|
+
return o === void 0 && (o = r.values, St.set(r, o)), {
|
|
1036
|
+
...r,
|
|
1064
1037
|
values: o.map((n) => t.values[n])
|
|
1065
1038
|
};
|
|
1066
1039
|
}
|
|
1067
1040
|
}
|
|
1068
1041
|
}
|
|
1069
|
-
return
|
|
1042
|
+
return Mt(t);
|
|
1070
1043
|
}
|
|
1071
|
-
function
|
|
1044
|
+
function qe(s) {
|
|
1072
1045
|
const t = typeof s == "string" ? s : s.strings;
|
|
1073
|
-
let e =
|
|
1074
|
-
return e === void 0 && (e = He(t, typeof s != "string" && !("strTag" in s)),
|
|
1046
|
+
let e = Et.get(t);
|
|
1047
|
+
return e === void 0 && (e = He(t, typeof s != "string" && !("strTag" in s)), Et.set(t, e)), e;
|
|
1075
1048
|
}
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
* Copyright 2021 Google LLC
|
|
1079
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1080
|
-
*/
|
|
1081
|
-
function X(s) {
|
|
1082
|
-
window.dispatchEvent(new CustomEvent(Y, { detail: s }));
|
|
1049
|
+
function J(s) {
|
|
1050
|
+
window.dispatchEvent(new CustomEvent(Q, { detail: s }));
|
|
1083
1051
|
}
|
|
1084
|
-
let
|
|
1085
|
-
|
|
1052
|
+
let z = "", X, Dt, I, Y, qt, w = new Ht();
|
|
1053
|
+
w.resolve();
|
|
1086
1054
|
let H = 0;
|
|
1087
|
-
const
|
|
1088
|
-
if (s === (
|
|
1089
|
-
return
|
|
1090
|
-
if (!
|
|
1055
|
+
const ke = (s) => (xe(((t, e) => De(qt, t, e))), z = Dt = s.sourceLocale, I = new Set(s.targetLocales), I.add(s.sourceLocale), Y = s.loadLocale, { getLocale: ze, setLocale: Ie }), ze = () => z, Ie = (s) => {
|
|
1056
|
+
if (s === (X ?? z))
|
|
1057
|
+
return w.promise;
|
|
1058
|
+
if (!I || !Y)
|
|
1091
1059
|
throw new Error("Internal error");
|
|
1092
|
-
if (!
|
|
1060
|
+
if (!I.has(s))
|
|
1093
1061
|
throw new Error("Invalid locale code");
|
|
1094
1062
|
H++;
|
|
1095
1063
|
const t = H;
|
|
1096
|
-
return
|
|
1064
|
+
return X = s, w.settled && (w = new Ht()), J({ status: "loading", loadingLocale: s }), (s === Dt ? (
|
|
1097
1065
|
// We could switch to the source locale synchronously, but we prefer to
|
|
1098
1066
|
// queue it on a microtask so that switching locales is consistently
|
|
1099
1067
|
// asynchronous.
|
|
1100
1068
|
Promise.resolve({ templates: void 0 })
|
|
1101
|
-
) :
|
|
1102
|
-
H === t && (
|
|
1103
|
-
}, (
|
|
1104
|
-
H === t && (
|
|
1069
|
+
) : Y(s)).then((i) => {
|
|
1070
|
+
H === t && (z = s, X = void 0, qt = i.templates, J({ status: "ready", readyLocale: s }), w.resolve());
|
|
1071
|
+
}, (i) => {
|
|
1072
|
+
H === t && (J({
|
|
1105
1073
|
status: "error",
|
|
1106
1074
|
errorLocale: s,
|
|
1107
|
-
errorMessage:
|
|
1108
|
-
}),
|
|
1109
|
-
}),
|
|
1110
|
-
},
|
|
1111
|
-
var
|
|
1112
|
-
for (var
|
|
1113
|
-
(n = s[o]) && (
|
|
1114
|
-
return
|
|
1075
|
+
errorMessage: i.toString()
|
|
1076
|
+
}), w.reject(i));
|
|
1077
|
+
}), w.promise;
|
|
1078
|
+
}, kt = ":host{background-color:pink;user-select:none}";
|
|
1079
|
+
var Ve = Object.defineProperty, Be = Object.getOwnPropertyDescriptor, zt = (s, t, e, i) => {
|
|
1080
|
+
for (var r = i > 1 ? void 0 : i ? Be(t, e) : t, o = s.length - 1, n; o >= 0; o--)
|
|
1081
|
+
(n = s[o]) && (r = (i ? n(t, e, r) : n(r)) || r);
|
|
1082
|
+
return i && r && Ve(t, e, r), r;
|
|
1115
1083
|
};
|
|
1116
|
-
let
|
|
1084
|
+
let V = class extends $e {
|
|
1117
1085
|
constructor() {
|
|
1118
1086
|
super(...arguments), this.object = { "@id": "" };
|
|
1119
1087
|
}
|
|
1120
1088
|
render() {
|
|
1121
|
-
return this.isType("some:Type") ?
|
|
1122
|
-
${
|
|
1089
|
+
return this.isType("some:Type") ? d : L`<li>
|
|
1090
|
+
${ht(Lt`Sample object named: ${this.object.name}`)}
|
|
1123
1091
|
</li>`;
|
|
1124
1092
|
}
|
|
1125
1093
|
};
|
|
1126
|
-
|
|
1127
|
-
${
|
|
1094
|
+
V.styles = rt`
|
|
1095
|
+
${st(kt)}
|
|
1128
1096
|
`;
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
],
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
],
|
|
1136
|
-
var
|
|
1137
|
-
for (var
|
|
1138
|
-
(n = s[o]) && (
|
|
1139
|
-
return
|
|
1097
|
+
zt([
|
|
1098
|
+
f({ attribute: !1, type: Object })
|
|
1099
|
+
], V.prototype, "object", 2);
|
|
1100
|
+
V = zt([
|
|
1101
|
+
at("sample-object"),
|
|
1102
|
+
Nt()
|
|
1103
|
+
], V);
|
|
1104
|
+
var We = Object.defineProperty, Fe = Object.getOwnPropertyDescriptor, It = (s, t, e, i) => {
|
|
1105
|
+
for (var r = i > 1 ? void 0 : i ? Fe(t, e) : t, o = s.length - 1, n; o >= 0; o--)
|
|
1106
|
+
(n = s[o]) && (r = (i ? n(t, e, r) : n(r)) || r);
|
|
1107
|
+
return i && r && We(t, e, r), r;
|
|
1140
1108
|
};
|
|
1141
|
-
let
|
|
1109
|
+
let B = class extends lt {
|
|
1142
1110
|
constructor() {
|
|
1143
1111
|
super(...arguments), this.objects = [];
|
|
1144
1112
|
}
|
|
1145
1113
|
render() {
|
|
1146
|
-
return this.hasType("some:Type") ?
|
|
1114
|
+
return this.hasType("some:Type") ? d : L`${ht("Here are all of our objects:")}<br />
|
|
1147
1115
|
<ul>
|
|
1148
1116
|
${this.objects.map(
|
|
1149
|
-
(s) =>
|
|
1117
|
+
(s) => L`<sample-object .object=${s}></sample-object>`
|
|
1150
1118
|
)}
|
|
1151
1119
|
</ul>`;
|
|
1152
1120
|
}
|
|
1153
1121
|
};
|
|
1154
|
-
|
|
1155
|
-
${
|
|
1122
|
+
B.styles = rt`
|
|
1123
|
+
${st(kt)}
|
|
1156
1124
|
`;
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
],
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
],
|
|
1164
|
-
const
|
|
1165
|
-
s9cb0b52fd65ea225:
|
|
1125
|
+
It([
|
|
1126
|
+
f({ attribute: !1, type: Object })
|
|
1127
|
+
], B.prototype, "objects", 2);
|
|
1128
|
+
B = It([
|
|
1129
|
+
at("sample-objects"),
|
|
1130
|
+
Nt()
|
|
1131
|
+
], B);
|
|
1132
|
+
const Ke = {
|
|
1133
|
+
s9cb0b52fd65ea225: Lt`Sample object named: ${0}`,
|
|
1166
1134
|
se975788b1544119d: "Here are all of our objects:"
|
|
1167
|
-
},
|
|
1135
|
+
}, Ze = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1168
1136
|
__proto__: null,
|
|
1169
|
-
templates:
|
|
1170
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1137
|
+
templates: Ke
|
|
1138
|
+
}, Symbol.toStringTag, { value: "Module" })), Je = "en", Vt = [
|
|
1171
1139
|
"en"
|
|
1172
|
-
],
|
|
1173
|
-
|
|
1140
|
+
], Xe = /* @__PURE__ */ Object.assign({ "../../generated/locales/en.ts": Ze }), Ge = new Map(
|
|
1141
|
+
Vt.map((s) => [
|
|
1174
1142
|
s,
|
|
1175
|
-
|
|
1143
|
+
Xe[`../../generated/locales/${s}.ts`]
|
|
1176
1144
|
])
|
|
1177
|
-
), { getLocale:
|
|
1178
|
-
sourceLocale:
|
|
1179
|
-
targetLocales:
|
|
1180
|
-
loadLocale: async (s) =>
|
|
1145
|
+
), { getLocale: Pt, setLocale: Ct } = ke({
|
|
1146
|
+
sourceLocale: Je,
|
|
1147
|
+
targetLocales: Vt,
|
|
1148
|
+
loadLocale: async (s) => Ge.get(s)
|
|
1181
1149
|
});
|
|
1182
|
-
window.getLocale = window.
|
|
1183
|
-
window.setLocale = window.
|
|
1150
|
+
window.getLocale = window.getLocale ? window.getLocale.push(Pt) : [Pt];
|
|
1151
|
+
window.setLocale = window.setLocale ? window.setLocale.push(Ct) : [Ct];
|