@startinblox/components-ds4go 1.0.0 → 2.1.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/dist/index.js CHANGED
@@ -1,200 +1,190 @@
1
- /**
2
- * @license
3
- * Copyright 2019 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */
6
- const z = globalThis, lt = z.ShadowRoot && (z.ShadyCSS === void 0 || z.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ct = Symbol(), yt = /* @__PURE__ */ new WeakMap();
7
- let Ut = class {
8
- constructor(t, s, i) {
9
- if (this._$cssResult$ = !0, i !== ct) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
10
- this.cssText = t, this.t = s;
1
+ const K = globalThis, pe = K.ShadowRoot && (K.ShadyCSS === void 0 || K.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, me = /* @__PURE__ */ Symbol(), we = /* @__PURE__ */ new WeakMap();
2
+ let He = class {
3
+ constructor(e, s, r) {
4
+ if (this._$cssResult$ = !0, r !== me) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
5
+ this.cssText = e, this.t = s;
11
6
  }
12
7
  get styleSheet() {
13
- let t = this.o;
8
+ let e = this.o;
14
9
  const s = this.t;
15
- if (lt && t === void 0) {
16
- const i = s !== void 0 && s.length === 1;
17
- i && (t = yt.get(s)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && yt.set(s, t));
10
+ if (pe && e === void 0) {
11
+ const r = s !== void 0 && s.length === 1;
12
+ r && (e = we.get(s)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), r && we.set(s, e));
18
13
  }
19
- return t;
14
+ return e;
20
15
  }
21
16
  toString() {
22
17
  return this.cssText;
23
18
  }
24
19
  };
25
- const Dt = (e) => new Ut(typeof e == "string" ? e : e + "", void 0, ct), ht = (e, ...t) => {
26
- const s = e.length === 1 ? e[0] : t.reduce(((i, r, o) => i + ((n) => {
20
+ const ge = (t) => new He(typeof t == "string" ? t : t + "", void 0, me), ee = (t, ...e) => {
21
+ const s = t.length === 1 ? t[0] : e.reduce((r, i, o) => r + ((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
- })(r) + e[o + 1]), e[0]);
31
- return new Ut(s, e, ct);
32
- }, Xt = (e, t) => {
33
- if (lt) e.adoptedStyleSheets = t.map(((s) => s instanceof CSSStyleSheet ? s : s.styleSheet));
34
- else for (const s of t) {
35
- const i = document.createElement("style"), r = z.litNonce;
36
- r !== void 0 && i.setAttribute("nonce", r), i.textContent = s.cssText, e.appendChild(i);
37
- }
38
- }, vt = lt ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
25
+ })(i) + t[o + 1], t[0]);
26
+ return new He(s, t, me);
27
+ }, tt = (t, e) => {
28
+ if (pe) t.adoptedStyleSheets = e.map((s) => s instanceof CSSStyleSheet ? s : s.styleSheet);
29
+ else for (const s of e) {
30
+ const r = document.createElement("style"), i = K.litNonce;
31
+ i !== void 0 && r.setAttribute("nonce", i), r.textContent = s.cssText, t.appendChild(r);
32
+ }
33
+ }, xe = pe ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((e) => {
39
34
  let s = "";
40
- for (const i of t.cssRules) s += i.cssText;
41
- return Dt(s);
42
- })(e) : e;
43
- /**
44
- * @license
45
- * Copyright 2017 Google LLC
46
- * SPDX-License-Identifier: BSD-3-Clause
47
- */
48
- const { is: Jt, defineProperty: Zt, getOwnPropertyDescriptor: Qt, getOwnPropertyNames: Yt, getOwnPropertySymbols: te, getPrototypeOf: ee } = Object, G = globalThis, _t = G.trustedTypes, se = _t ? _t.emptyScript : "", re = G.reactiveElementPolyfillSupport, M = (e, t) => e, B = { toAttribute(e, t) {
49
- switch (t) {
35
+ for (const r of e.cssRules) s += r.cssText;
36
+ return ge(s);
37
+ })(t) : t;
38
+ const { is: st, defineProperty: it, getOwnPropertyDescriptor: rt, getOwnPropertyNames: ot, getOwnPropertySymbols: nt, getPrototypeOf: at } = Object, te = globalThis, Ae = te.trustedTypes, lt = Ae ? Ae.emptyScript : "", ct = te.reactiveElementPolyfillSupport, L = (t, e) => t, G = { toAttribute(t, e) {
39
+ switch (e) {
50
40
  case Boolean:
51
- e = e ? se : null;
41
+ t = t ? lt : null;
52
42
  break;
53
43
  case Object:
54
44
  case Array:
55
- e = e == null ? e : JSON.stringify(e);
45
+ t = t == null ? t : JSON.stringify(t);
56
46
  }
57
- return e;
58
- }, fromAttribute(e, t) {
59
- let s = e;
60
- switch (t) {
47
+ return t;
48
+ }, fromAttribute(t, e) {
49
+ let s = t;
50
+ switch (e) {
61
51
  case Boolean:
62
- s = e !== null;
52
+ s = t !== null;
63
53
  break;
64
54
  case Number:
65
- s = e === null ? null : Number(e);
55
+ s = t === null ? null : Number(t);
66
56
  break;
67
57
  case Object:
68
58
  case Array:
69
59
  try {
70
- s = JSON.parse(e);
60
+ s = JSON.parse(t);
71
61
  } catch {
72
62
  s = null;
73
63
  }
74
64
  }
75
65
  return s;
76
- } }, X = (e, t) => !Jt(e, t), $t = { attribute: !0, type: String, converter: B, reflect: !1, useDefault: !1, hasChanged: X };
77
- Symbol.metadata ??= Symbol("metadata"), G.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
78
- let S = class extends HTMLElement {
79
- static addInitializer(t) {
80
- this._$Ei(), (this.l ??= []).push(t);
66
+ } }, se = (t, e) => !st(t, e), Se = { attribute: !0, type: String, converter: G, reflect: !1, useDefault: !1, hasChanged: se };
67
+ Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), te.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
68
+ let R = class extends HTMLElement {
69
+ static addInitializer(e) {
70
+ this._$Ei(), (this.l ??= []).push(e);
81
71
  }
82
72
  static get observedAttributes() {
83
73
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
84
74
  }
85
- static createProperty(t, s = $t) {
86
- if (s.state && (s.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((s = Object.create(s)).wrapped = !0), this.elementProperties.set(t, s), !s.noAccessor) {
87
- const i = Symbol(), r = this.getPropertyDescriptor(t, i, s);
88
- r !== void 0 && Zt(this.prototype, t, r);
75
+ static createProperty(e, s = Se) {
76
+ if (s.state && (s.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((s = Object.create(s)).wrapped = !0), this.elementProperties.set(e, s), !s.noAccessor) {
77
+ const r = /* @__PURE__ */ Symbol(), i = this.getPropertyDescriptor(e, r, s);
78
+ i !== void 0 && it(this.prototype, e, i);
89
79
  }
90
80
  }
91
- static getPropertyDescriptor(t, s, i) {
92
- const { get: r, set: o } = Qt(this.prototype, t) ?? { get() {
81
+ static getPropertyDescriptor(e, s, r) {
82
+ const { get: i, set: o } = rt(this.prototype, e) ?? { get() {
93
83
  return this[s];
94
84
  }, set(n) {
95
85
  this[s] = n;
96
86
  } };
97
- return { get: r, set(n) {
98
- const a = r?.call(this);
99
- o?.call(this, n), this.requestUpdate(t, a, i);
87
+ return { get: i, set(n) {
88
+ const a = i?.call(this);
89
+ o?.call(this, n), this.requestUpdate(e, a, r);
100
90
  }, configurable: !0, enumerable: !0 };
101
91
  }
102
- static getPropertyOptions(t) {
103
- return this.elementProperties.get(t) ?? $t;
92
+ static getPropertyOptions(e) {
93
+ return this.elementProperties.get(e) ?? Se;
104
94
  }
105
95
  static _$Ei() {
106
- if (this.hasOwnProperty(M("elementProperties"))) return;
107
- const t = ee(this);
108
- t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
96
+ if (this.hasOwnProperty(L("elementProperties"))) return;
97
+ const e = at(this);
98
+ e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
109
99
  }
110
100
  static finalize() {
111
- if (this.hasOwnProperty(M("finalized"))) return;
112
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(M("properties"))) {
113
- const s = this.properties, i = [...Yt(s), ...te(s)];
114
- for (const r of i) this.createProperty(r, s[r]);
101
+ if (this.hasOwnProperty(L("finalized"))) return;
102
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(L("properties"))) {
103
+ const s = this.properties, r = [...ot(s), ...nt(s)];
104
+ for (const i of r) this.createProperty(i, s[i]);
115
105
  }
116
- const t = this[Symbol.metadata];
117
- if (t !== null) {
118
- const s = litPropertyMetadata.get(t);
119
- if (s !== void 0) for (const [i, r] of s) this.elementProperties.set(i, r);
106
+ const e = this[Symbol.metadata];
107
+ if (e !== null) {
108
+ const s = litPropertyMetadata.get(e);
109
+ if (s !== void 0) for (const [r, i] of s) this.elementProperties.set(r, i);
120
110
  }
121
111
  this._$Eh = /* @__PURE__ */ new Map();
122
- for (const [s, i] of this.elementProperties) {
123
- const r = this._$Eu(s, i);
124
- r !== void 0 && this._$Eh.set(r, s);
112
+ for (const [s, r] of this.elementProperties) {
113
+ const i = this._$Eu(s, r);
114
+ i !== void 0 && this._$Eh.set(i, s);
125
115
  }
126
116
  this.elementStyles = this.finalizeStyles(this.styles);
127
117
  }
128
- static finalizeStyles(t) {
118
+ static finalizeStyles(e) {
129
119
  const s = [];
130
- if (Array.isArray(t)) {
131
- const i = new Set(t.flat(1 / 0).reverse());
132
- for (const r of i) s.unshift(vt(r));
133
- } else t !== void 0 && s.push(vt(t));
120
+ if (Array.isArray(e)) {
121
+ const r = new Set(e.flat(1 / 0).reverse());
122
+ for (const i of r) s.unshift(xe(i));
123
+ } else e !== void 0 && s.push(xe(e));
134
124
  return s;
135
125
  }
136
- static _$Eu(t, s) {
137
- const i = s.attribute;
138
- return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
126
+ static _$Eu(e, s) {
127
+ const r = s.attribute;
128
+ return r === !1 ? void 0 : typeof r == "string" ? r : typeof e == "string" ? e.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(((t) => this.enableUpdating = t)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(((t) => t(this)));
134
+ this._$ES = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((e) => e(this));
145
135
  }
146
- addController(t) {
147
- (this._$EO ??= /* @__PURE__ */ new Set()).add(t), this.renderRoot !== void 0 && this.isConnected && t.hostConnected?.();
136
+ addController(e) {
137
+ (this._$EO ??= /* @__PURE__ */ new Set()).add(e), this.renderRoot !== void 0 && this.isConnected && e.hostConnected?.();
148
138
  }
149
- removeController(t) {
150
- this._$EO?.delete(t);
139
+ removeController(e) {
140
+ this._$EO?.delete(e);
151
141
  }
152
142
  _$E_() {
153
- const t = /* @__PURE__ */ new Map(), s = this.constructor.elementProperties;
154
- for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
155
- t.size > 0 && (this._$Ep = t);
143
+ const e = /* @__PURE__ */ new Map(), s = this.constructor.elementProperties;
144
+ for (const r of s.keys()) this.hasOwnProperty(r) && (e.set(r, this[r]), delete this[r]);
145
+ e.size > 0 && (this._$Ep = e);
156
146
  }
157
147
  createRenderRoot() {
158
- const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
159
- return Xt(t, this.constructor.elementStyles), t;
148
+ const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
149
+ return tt(e, this.constructor.elementStyles), e;
160
150
  }
161
151
  connectedCallback() {
162
- this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((t) => t.hostConnected?.()));
152
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((e) => e.hostConnected?.());
163
153
  }
164
- enableUpdating(t) {
154
+ enableUpdating(e) {
165
155
  }
166
156
  disconnectedCallback() {
167
- this._$EO?.forEach(((t) => t.hostDisconnected?.()));
157
+ this._$EO?.forEach((e) => e.hostDisconnected?.());
168
158
  }
169
- attributeChangedCallback(t, s, i) {
170
- this._$AK(t, i);
159
+ attributeChangedCallback(e, s, r) {
160
+ this._$AK(e, r);
171
161
  }
172
- _$ET(t, s) {
173
- const i = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, i);
174
- if (r !== void 0 && i.reflect === !0) {
175
- const o = (i.converter?.toAttribute !== void 0 ? i.converter : B).toAttribute(s, i.type);
176
- this._$Em = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null;
162
+ _$ET(e, s) {
163
+ const r = this.constructor.elementProperties.get(e), i = this.constructor._$Eu(e, r);
164
+ if (i !== void 0 && r.reflect === !0) {
165
+ const o = (r.converter?.toAttribute !== void 0 ? r.converter : G).toAttribute(s, r.type);
166
+ this._$Em = e, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$Em = null;
177
167
  }
178
168
  }
179
- _$AK(t, s) {
180
- const i = this.constructor, r = i._$Eh.get(t);
181
- if (r !== void 0 && this._$Em !== r) {
182
- const o = i.getPropertyOptions(r), n = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : B;
183
- this._$Em = r;
169
+ _$AK(e, s) {
170
+ const r = this.constructor, i = r._$Eh.get(e);
171
+ if (i !== void 0 && this._$Em !== i) {
172
+ const o = r.getPropertyOptions(i), n = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : G;
173
+ this._$Em = i;
184
174
  const a = n.fromAttribute(s, o.type);
185
- this[r] = a ?? this._$Ej?.get(r) ?? a, this._$Em = null;
175
+ this[i] = a ?? this._$Ej?.get(i) ?? a, this._$Em = null;
186
176
  }
187
177
  }
188
- requestUpdate(t, s, i) {
189
- if (t !== void 0) {
190
- const r = this.constructor, o = this[t];
191
- if (i ??= r.getPropertyOptions(t), !((i.hasChanged ?? X)(o, s) || i.useDefault && i.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(r._$Eu(t, i)))) return;
192
- this.C(t, s, i);
178
+ requestUpdate(e, s, r, i = !1, o) {
179
+ if (e !== void 0) {
180
+ const n = this.constructor;
181
+ if (i === !1 && (o = this[e]), r ??= n.getPropertyOptions(e), !((r.hasChanged ?? se)(o, s) || r.useDefault && r.reflect && o === this._$Ej?.get(e) && !this.hasAttribute(n._$Eu(e, r)))) return;
182
+ this.C(e, s, r);
193
183
  }
194
184
  this.isUpdatePending === !1 && (this._$ES = this._$EP());
195
185
  }
196
- C(t, s, { useDefault: i, reflect: r, wrapped: o }, n) {
197
- i && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, n ?? s ?? this[t]), o !== !0 || n !== void 0) || (this._$AL.has(t) || (this.hasUpdated || i || (s = void 0), this._$AL.set(t, s)), r === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
186
+ C(e, s, { useDefault: r, reflect: i, wrapped: o }, n) {
187
+ r && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(e) && (this._$Ej.set(e, n ?? s ?? this[e]), o !== !0 || n !== void 0) || (this._$AL.has(e) || (this.hasUpdated || r || (s = void 0), this._$AL.set(e, s)), i === !0 && this._$Em !== e && (this._$Eq ??= /* @__PURE__ */ new Set()).add(e));
198
188
  }
199
189
  async _$EP() {
200
190
  this.isUpdatePending = !0;
@@ -203,8 +193,8 @@ let S = class extends HTMLElement {
203
193
  } catch (s) {
204
194
  Promise.reject(s);
205
195
  }
206
- const t = this.scheduleUpdate();
207
- return t != null && await t, !this.isUpdatePending;
196
+ const e = this.scheduleUpdate();
197
+ return e != null && await e, !this.isUpdatePending;
208
198
  }
209
199
  scheduleUpdate() {
210
200
  return this.performUpdate();
@@ -213,28 +203,28 @@ let S = 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 [r, o] of this._$Ep) this[r] = o;
206
+ for (const [i, o] of this._$Ep) this[i] = o;
217
207
  this._$Ep = void 0;
218
208
  }
219
- const i = this.constructor.elementProperties;
220
- if (i.size > 0) for (const [r, o] of i) {
221
- const { wrapped: n } = o, a = this[r];
222
- n !== !0 || this._$AL.has(r) || a === void 0 || this.C(r, void 0, o, a);
209
+ const r = this.constructor.elementProperties;
210
+ if (r.size > 0) for (const [i, o] of r) {
211
+ const { wrapped: n } = o, a = this[i];
212
+ n !== !0 || this._$AL.has(i) || a === void 0 || this.C(i, void 0, o, a);
223
213
  }
224
214
  }
225
- let t = !1;
215
+ let e = !1;
226
216
  const s = this._$AL;
227
217
  try {
228
- t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach(((i) => i.hostUpdate?.())), this.update(s)) : this._$EM();
229
- } catch (i) {
230
- throw t = !1, this._$EM(), i;
218
+ e = this.shouldUpdate(s), e ? (this.willUpdate(s), this._$EO?.forEach((r) => r.hostUpdate?.()), this.update(s)) : this._$EM();
219
+ } catch (r) {
220
+ throw e = !1, this._$EM(), r;
231
221
  }
232
- t && this._$AE(s);
222
+ e && this._$AE(s);
233
223
  }
234
- willUpdate(t) {
224
+ willUpdate(e) {
235
225
  }
236
- _$AE(t) {
237
- this._$EO?.forEach(((s) => s.hostUpdated?.())), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
226
+ _$AE(e) {
227
+ this._$EO?.forEach((s) => s.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
238
228
  }
239
229
  _$EM() {
240
230
  this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
@@ -245,88 +235,83 @@ let S = class extends HTMLElement {
245
235
  getUpdateComplete() {
246
236
  return this._$ES;
247
237
  }
248
- shouldUpdate(t) {
238
+ shouldUpdate(e) {
249
239
  return !0;
250
240
  }
251
- update(t) {
252
- this._$Eq &&= this._$Eq.forEach(((s) => this._$ET(s, this[s]))), this._$EM();
241
+ update(e) {
242
+ this._$Eq &&= this._$Eq.forEach((s) => this._$ET(s, this[s])), this._$EM();
253
243
  }
254
- updated(t) {
244
+ updated(e) {
255
245
  }
256
- firstUpdated(t) {
246
+ firstUpdated(e) {
257
247
  }
258
248
  };
259
- S.elementStyles = [], S.shadowRootOptions = { mode: "open" }, S[M("elementProperties")] = /* @__PURE__ */ new Map(), S[M("finalized")] = /* @__PURE__ */ new Map(), re?.({ ReactiveElement: S }), (G.reactiveElementVersions ??= []).push("2.1.1");
260
- /**
261
- * @license
262
- * Copyright 2017 Google LLC
263
- * SPDX-License-Identifier: BSD-3-Clause
264
- */
265
- const ut = globalThis, F = ut.trustedTypes, bt = F ? F.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Nt = "$lit$", v = `lit$${Math.random().toFixed(9).slice(2)}$`, Ht = "?" + v, ie = `<${Ht}>`, E = document, L = () => E.createComment(""), U = (e) => e === null || typeof e != "object" && typeof e != "function", dt = Array.isArray, oe = (e) => dt(e) || typeof e?.[Symbol.iterator] == "function", Q = `[
266
- \f\r]`, T = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, wt = /-->/g, At = />/g, w = RegExp(`>|${Q}(?:([^\\s"'>=/]+)(${Q}*=${Q}*(?:[^
267
- \f\r"'\`<>=]|("|')|))|$)`, "g"), xt = /'/g, Et = /"/g, qt = /^(?:script|style|textarea|title)$/i, ne = (e) => (t, ...s) => ({ _$litType$: e, strings: t, values: s }), $ = ne(1), P = Symbol.for("lit-noChange"), c = Symbol.for("lit-nothing"), St = /* @__PURE__ */ new WeakMap(), x = E.createTreeWalker(E, 129);
268
- function It(e, t) {
269
- if (!dt(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
270
- return bt !== void 0 ? bt.createHTML(t) : t;
249
+ R.elementStyles = [], R.shadowRootOptions = { mode: "open" }, R[L("elementProperties")] = /* @__PURE__ */ new Map(), R[L("finalized")] = /* @__PURE__ */ new Map(), ct?.({ ReactiveElement: R }), (te.reactiveElementVersions ??= []).push("2.1.2");
250
+ const ye = globalThis, Ce = (t) => t, Z = ye.trustedTypes, Ee = Z ? Z.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, qe = "$lit$", w = `lit$${Math.random().toFixed(9).slice(2)}$`, ze = "?" + w, dt = `<${ze}>`, P = document, F = () => P.createComment(""), B = (t) => t === null || typeof t != "object" && typeof t != "function", ve = Array.isArray, ht = (t) => ve(t) || typeof t?.[Symbol.iterator] == "function", oe = `[
251
+ \f\r]`, M = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Pe = /-->/g, je = />/g, S = RegExp(`>|${oe}(?:([^\\s"'>=/]+)(${oe}*=${oe}*(?:[^
252
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Re = /'/g, Oe = /"/g, Ie = /^(?:script|style|textarea|title)$/i, ut = (t) => (e, ...s) => ({ _$litType$: t, strings: e, values: s }), p = ut(1), T = /* @__PURE__ */ Symbol.for("lit-noChange"), c = /* @__PURE__ */ Symbol.for("lit-nothing"), ke = /* @__PURE__ */ new WeakMap(), E = P.createTreeWalker(P, 129);
253
+ function Ve(t, e) {
254
+ if (!ve(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
255
+ return Ee !== void 0 ? Ee.createHTML(e) : e;
271
256
  }
272
- const ae = (e, t) => {
273
- const s = e.length - 1, i = [];
274
- let r, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = T;
257
+ const ft = (t, e) => {
258
+ const s = t.length - 1, r = [];
259
+ let i, o = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", n = M;
275
260
  for (let a = 0; a < s; a++) {
276
- const l = e[a];
277
- let h, d, u = -1, p = 0;
278
- for (; p < l.length && (n.lastIndex = p, d = n.exec(l), d !== null); ) p = n.lastIndex, n === T ? d[1] === "!--" ? n = wt : d[1] !== void 0 ? n = At : d[2] !== void 0 ? (qt.test(d[2]) && (r = RegExp("</" + d[2], "g")), n = w) : d[3] !== void 0 && (n = w) : n === w ? d[0] === ">" ? (n = r ?? T, u = -1) : d[1] === void 0 ? u = -2 : (u = n.lastIndex - d[2].length, h = d[1], n = d[3] === void 0 ? w : d[3] === '"' ? Et : xt) : n === Et || n === xt ? n = w : n === wt || n === At ? n = T : (n = w, r = void 0);
279
- const y = n === w && e[a + 1].startsWith("/>") ? " " : "";
280
- o += n === T ? l + ie : u >= 0 ? (i.push(h), l.slice(0, u) + Nt + l.slice(u) + v + y) : l + v + (u === -2 ? a : y);
261
+ const l = t[a];
262
+ let d, u, h = -1, $ = 0;
263
+ for (; $ < l.length && (n.lastIndex = $, u = n.exec(l), u !== null); ) $ = n.lastIndex, n === M ? u[1] === "!--" ? n = Pe : u[1] !== void 0 ? n = je : u[2] !== void 0 ? (Ie.test(u[2]) && (i = RegExp("</" + u[2], "g")), n = S) : u[3] !== void 0 && (n = S) : n === S ? u[0] === ">" ? (n = i ?? M, h = -1) : u[1] === void 0 ? h = -2 : (h = n.lastIndex - u[2].length, d = u[1], n = u[3] === void 0 ? S : u[3] === '"' ? Oe : Re) : n === Oe || n === Re ? n = S : n === Pe || n === je ? n = M : (n = S, i = void 0);
264
+ const _ = n === S && t[a + 1].startsWith("/>") ? " " : "";
265
+ o += n === M ? l + dt : h >= 0 ? (r.push(d), l.slice(0, h) + qe + l.slice(h) + w + _) : l + w + (h === -2 ? a : _);
281
266
  }
282
- return [It(e, o + (e[s] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
267
+ return [Ve(t, o + (t[s] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), r];
283
268
  };
284
- class D {
285
- constructor({ strings: t, _$litType$: s }, i) {
286
- let r;
269
+ class H {
270
+ constructor({ strings: e, _$litType$: s }, r) {
271
+ let i;
287
272
  this.parts = [];
288
273
  let o = 0, n = 0;
289
- const a = t.length - 1, l = this.parts, [h, d] = ae(t, s);
290
- if (this.el = D.createElement(h, i), x.currentNode = this.el.content, s === 2 || s === 3) {
291
- const u = this.el.content.firstChild;
292
- u.replaceWith(...u.childNodes);
274
+ const a = e.length - 1, l = this.parts, [d, u] = ft(e, s);
275
+ if (this.el = H.createElement(d, r), E.currentNode = this.el.content, s === 2 || s === 3) {
276
+ const h = this.el.content.firstChild;
277
+ h.replaceWith(...h.childNodes);
293
278
  }
294
- for (; (r = x.nextNode()) !== null && l.length < a; ) {
295
- if (r.nodeType === 1) {
296
- if (r.hasAttributes()) for (const u of r.getAttributeNames()) if (u.endsWith(Nt)) {
297
- const p = d[n++], y = r.getAttribute(u).split(v), q = /([.?@])?(.*)/.exec(p);
298
- l.push({ type: 1, index: o, name: q[2], strings: y, ctor: q[1] === "." ? ce : q[1] === "?" ? he : q[1] === "@" ? ue : J }), r.removeAttribute(u);
299
- } else u.startsWith(v) && (l.push({ type: 6, index: o }), r.removeAttribute(u));
300
- if (qt.test(r.tagName)) {
301
- const u = r.textContent.split(v), p = u.length - 1;
302
- if (p > 0) {
303
- r.textContent = F ? F.emptyScript : "";
304
- for (let y = 0; y < p; y++) r.append(u[y], L()), x.nextNode(), l.push({ type: 2, index: ++o });
305
- r.append(u[p], L());
279
+ for (; (i = E.nextNode()) !== null && l.length < a; ) {
280
+ if (i.nodeType === 1) {
281
+ if (i.hasAttributes()) for (const h of i.getAttributeNames()) if (h.endsWith(qe)) {
282
+ const $ = u[n++], _ = i.getAttribute(h).split(w), V = /([.?@])?(.*)/.exec($);
283
+ l.push({ type: 1, index: o, name: V[2], strings: _, ctor: V[1] === "." ? mt : V[1] === "?" ? gt : V[1] === "@" ? yt : ie }), i.removeAttribute(h);
284
+ } else h.startsWith(w) && (l.push({ type: 6, index: o }), i.removeAttribute(h));
285
+ if (Ie.test(i.tagName)) {
286
+ const h = i.textContent.split(w), $ = h.length - 1;
287
+ if ($ > 0) {
288
+ i.textContent = Z ? Z.emptyScript : "";
289
+ for (let _ = 0; _ < $; _++) i.append(h[_], F()), E.nextNode(), l.push({ type: 2, index: ++o });
290
+ i.append(h[$], F());
306
291
  }
307
292
  }
308
- } else if (r.nodeType === 8) if (r.data === Ht) l.push({ type: 2, index: o });
293
+ } else if (i.nodeType === 8) if (i.data === ze) l.push({ type: 2, index: o });
309
294
  else {
310
- let u = -1;
311
- for (; (u = r.data.indexOf(v, u + 1)) !== -1; ) l.push({ type: 7, index: o }), u += v.length - 1;
295
+ let h = -1;
296
+ for (; (h = i.data.indexOf(w, h + 1)) !== -1; ) l.push({ type: 7, index: o }), h += w.length - 1;
312
297
  }
313
298
  o++;
314
299
  }
315
300
  }
316
- static createElement(t, s) {
317
- const i = E.createElement("template");
318
- return i.innerHTML = t, i;
301
+ static createElement(e, s) {
302
+ const r = P.createElement("template");
303
+ return r.innerHTML = e, r;
319
304
  }
320
305
  }
321
- function j(e, t, s = e, i) {
322
- if (t === P) return t;
323
- let r = i !== void 0 ? s._$Co?.[i] : s._$Cl;
324
- const o = U(t) ? void 0 : t._$litDirective$;
325
- return r?.constructor !== o && (r?._$AO?.(!1), o === void 0 ? r = void 0 : (r = new o(e), r._$AT(e, s, i)), i !== void 0 ? (s._$Co ??= [])[i] = r : s._$Cl = r), r !== void 0 && (t = j(e, r._$AS(e, t.values), r, i)), t;
306
+ function D(t, e, s = t, r) {
307
+ if (e === T) return e;
308
+ let i = r !== void 0 ? s._$Co?.[r] : s._$Cl;
309
+ const o = B(e) ? void 0 : e._$litDirective$;
310
+ return i?.constructor !== o && (i?._$AO?.(!1), o === void 0 ? i = void 0 : (i = new o(t), i._$AT(t, s, r)), r !== void 0 ? (s._$Co ??= [])[r] = i : s._$Cl = i), i !== void 0 && (e = D(t, i._$AS(t, e.values), i, r)), e;
326
311
  }
327
- class le {
328
- constructor(t, s) {
329
- this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = s;
312
+ class pt {
313
+ constructor(e, s) {
314
+ this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = s;
330
315
  }
331
316
  get parentNode() {
332
317
  return this._$AM.parentNode;
@@ -334,35 +319,35 @@ class le {
334
319
  get _$AU() {
335
320
  return this._$AM._$AU;
336
321
  }
337
- u(t) {
338
- const { el: { content: s }, parts: i } = this._$AD, r = (t?.creationScope ?? E).importNode(s, !0);
339
- x.currentNode = r;
340
- let o = x.nextNode(), n = 0, a = 0, l = i[0];
322
+ u(e) {
323
+ const { el: { content: s }, parts: r } = this._$AD, i = (e?.creationScope ?? P).importNode(s, !0);
324
+ E.currentNode = i;
325
+ let o = E.nextNode(), n = 0, a = 0, l = r[0];
341
326
  for (; l !== void 0; ) {
342
327
  if (n === l.index) {
343
- let h;
344
- l.type === 2 ? h = new H(o, o.nextSibling, this, t) : l.type === 1 ? h = new l.ctor(o, l.name, l.strings, this, t) : l.type === 6 && (h = new de(o, this, t)), this._$AV.push(h), l = i[++a];
328
+ let d;
329
+ l.type === 2 ? d = new z(o, o.nextSibling, this, e) : l.type === 1 ? d = new l.ctor(o, l.name, l.strings, this, e) : l.type === 6 && (d = new vt(o, this, e)), this._$AV.push(d), l = r[++a];
345
330
  }
346
- n !== l?.index && (o = x.nextNode(), n++);
331
+ n !== l?.index && (o = E.nextNode(), n++);
347
332
  }
348
- return x.currentNode = E, r;
333
+ return E.currentNode = P, i;
349
334
  }
350
- p(t) {
335
+ p(e) {
351
336
  let s = 0;
352
- for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, s), s += i.strings.length - 2) : i._$AI(t[s])), s++;
337
+ for (const r of this._$AV) r !== void 0 && (r.strings !== void 0 ? (r._$AI(e, r, s), s += r.strings.length - 2) : r._$AI(e[s])), s++;
353
338
  }
354
339
  }
355
- class H {
340
+ class z {
356
341
  get _$AU() {
357
342
  return this._$AM?._$AU ?? this._$Cv;
358
343
  }
359
- constructor(t, s, i, r) {
360
- this.type = 2, this._$AH = c, this._$AN = void 0, this._$AA = t, this._$AB = s, this._$AM = i, this.options = r, this._$Cv = r?.isConnected ?? !0;
344
+ constructor(e, s, r, i) {
345
+ this.type = 2, this._$AH = c, this._$AN = void 0, this._$AA = e, this._$AB = s, this._$AM = r, this.options = i, this._$Cv = i?.isConnected ?? !0;
361
346
  }
362
347
  get parentNode() {
363
- let t = this._$AA.parentNode;
348
+ let e = this._$AA.parentNode;
364
349
  const s = this._$AM;
365
- return s !== void 0 && t?.nodeType === 11 && (t = s.parentNode), t;
350
+ return s !== void 0 && e?.nodeType === 11 && (e = s.parentNode), e;
366
351
  }
367
352
  get startNode() {
368
353
  return this._$AA;
@@ -370,140 +355,135 @@ class H {
370
355
  get endNode() {
371
356
  return this._$AB;
372
357
  }
373
- _$AI(t, s = this) {
374
- t = j(this, t, s), U(t) ? t === c || t == null || t === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : t !== this._$AH && t !== P && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : oe(t) ? this.k(t) : this._(t);
358
+ _$AI(e, s = this) {
359
+ e = D(this, e, s), B(e) ? e === c || e == null || e === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : e !== this._$AH && e !== T && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : ht(e) ? this.k(e) : this._(e);
375
360
  }
376
- O(t) {
377
- return this._$AA.parentNode.insertBefore(t, this._$AB);
361
+ O(e) {
362
+ return this._$AA.parentNode.insertBefore(e, this._$AB);
378
363
  }
379
- T(t) {
380
- this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
364
+ T(e) {
365
+ this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
381
366
  }
382
- _(t) {
383
- this._$AH !== c && U(this._$AH) ? this._$AA.nextSibling.data = t : this.T(E.createTextNode(t)), this._$AH = t;
367
+ _(e) {
368
+ this._$AH !== c && B(this._$AH) ? this._$AA.nextSibling.data = e : this.T(P.createTextNode(e)), this._$AH = e;
384
369
  }
385
- $(t) {
386
- const { values: s, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = D.createElement(It(i.h, i.h[0]), this.options)), i);
387
- if (this._$AH?._$AD === r) this._$AH.p(s);
370
+ $(e) {
371
+ const { values: s, _$litType$: r } = e, i = typeof r == "number" ? this._$AC(e) : (r.el === void 0 && (r.el = H.createElement(Ve(r.h, r.h[0]), this.options)), r);
372
+ if (this._$AH?._$AD === i) this._$AH.p(s);
388
373
  else {
389
- const o = new le(r, this), n = o.u(this.options);
374
+ const o = new pt(i, this), n = o.u(this.options);
390
375
  o.p(s), this.T(n), this._$AH = o;
391
376
  }
392
377
  }
393
- _$AC(t) {
394
- let s = St.get(t.strings);
395
- return s === void 0 && St.set(t.strings, s = new D(t)), s;
378
+ _$AC(e) {
379
+ let s = ke.get(e.strings);
380
+ return s === void 0 && ke.set(e.strings, s = new H(e)), s;
396
381
  }
397
- k(t) {
398
- dt(this._$AH) || (this._$AH = [], this._$AR());
382
+ k(e) {
383
+ ve(this._$AH) || (this._$AH = [], this._$AR());
399
384
  const s = this._$AH;
400
- let i, r = 0;
401
- for (const o of t) r === s.length ? s.push(i = new H(this.O(L()), this.O(L()), this, this.options)) : i = s[r], i._$AI(o), r++;
402
- r < s.length && (this._$AR(i && i._$AB.nextSibling, r), s.length = r);
403
- }
404
- _$AR(t = this._$AA.nextSibling, s) {
405
- for (this._$AP?.(!1, !0, s); t !== this._$AB; ) {
406
- const i = t.nextSibling;
407
- t.remove(), t = i;
385
+ let r, i = 0;
386
+ for (const o of e) i === s.length ? s.push(r = new z(this.O(F()), this.O(F()), this, this.options)) : r = s[i], r._$AI(o), i++;
387
+ i < s.length && (this._$AR(r && r._$AB.nextSibling, i), s.length = i);
388
+ }
389
+ _$AR(e = this._$AA.nextSibling, s) {
390
+ for (this._$AP?.(!1, !0, s); e !== this._$AB; ) {
391
+ const r = Ce(e).nextSibling;
392
+ Ce(e).remove(), e = r;
408
393
  }
409
394
  }
410
- setConnected(t) {
411
- this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
395
+ setConnected(e) {
396
+ this._$AM === void 0 && (this._$Cv = e, this._$AP?.(e));
412
397
  }
413
398
  }
414
- class J {
399
+ class ie {
415
400
  get tagName() {
416
401
  return this.element.tagName;
417
402
  }
418
403
  get _$AU() {
419
404
  return this._$AM._$AU;
420
405
  }
421
- constructor(t, s, i, r, o) {
422
- this.type = 1, this._$AH = c, this._$AN = void 0, this.element = t, this.name = s, 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 = c;
406
+ constructor(e, s, r, i, o) {
407
+ this.type = 1, this._$AH = c, this._$AN = void 0, this.element = e, this.name = s, this._$AM = i, this.options = o, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = c;
423
408
  }
424
- _$AI(t, s = this, i, r) {
409
+ _$AI(e, s = this, r, i) {
425
410
  const o = this.strings;
426
411
  let n = !1;
427
- if (o === void 0) t = j(this, t, s, 0), n = !U(t) || t !== this._$AH && t !== P, n && (this._$AH = t);
412
+ if (o === void 0) e = D(this, e, s, 0), n = !B(e) || e !== this._$AH && e !== T, n && (this._$AH = e);
428
413
  else {
429
- const a = t;
430
- let l, h;
431
- for (t = o[0], l = 0; l < o.length - 1; l++) h = j(this, a[i + l], s, l), h === P && (h = this._$AH[l]), n ||= !U(h) || h !== this._$AH[l], h === c ? t = c : t !== c && (t += (h ?? "") + o[l + 1]), this._$AH[l] = h;
414
+ const a = e;
415
+ let l, d;
416
+ for (e = o[0], l = 0; l < o.length - 1; l++) d = D(this, a[r + l], s, l), d === T && (d = this._$AH[l]), n ||= !B(d) || d !== this._$AH[l], d === c ? e = c : e !== c && (e += (d ?? "") + o[l + 1]), this._$AH[l] = d;
432
417
  }
433
- n && !r && this.j(t);
418
+ n && !i && this.j(e);
434
419
  }
435
- j(t) {
436
- t === c ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
420
+ j(e) {
421
+ e === c ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
437
422
  }
438
423
  }
439
- class ce extends J {
424
+ class mt extends ie {
440
425
  constructor() {
441
426
  super(...arguments), this.type = 3;
442
427
  }
443
- j(t) {
444
- this.element[this.name] = t === c ? void 0 : t;
428
+ j(e) {
429
+ this.element[this.name] = e === c ? void 0 : e;
445
430
  }
446
431
  }
447
- class he extends J {
432
+ class gt extends ie {
448
433
  constructor() {
449
434
  super(...arguments), this.type = 4;
450
435
  }
451
- j(t) {
452
- this.element.toggleAttribute(this.name, !!t && t !== c);
436
+ j(e) {
437
+ this.element.toggleAttribute(this.name, !!e && e !== c);
453
438
  }
454
439
  }
455
- class ue extends J {
456
- constructor(t, s, i, r, o) {
457
- super(t, s, i, r, o), this.type = 5;
440
+ class yt extends ie {
441
+ constructor(e, s, r, i, o) {
442
+ super(e, s, r, i, o), this.type = 5;
458
443
  }
459
- _$AI(t, s = this) {
460
- if ((t = j(this, t, s, 0) ?? c) === P) return;
461
- const i = this._$AH, r = t === c && i !== c || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, o = t !== c && (i === c || r);
462
- r && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
444
+ _$AI(e, s = this) {
445
+ if ((e = D(this, e, s, 0) ?? c) === T) return;
446
+ const r = this._$AH, i = e === c && r !== c || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, o = e !== c && (r === c || i);
447
+ i && this.element.removeEventListener(this.name, this, r), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
463
448
  }
464
- handleEvent(t) {
465
- typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
449
+ handleEvent(e) {
450
+ typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
466
451
  }
467
452
  }
468
- class de {
469
- constructor(t, s, i) {
470
- this.element = t, this.type = 6, this._$AN = void 0, this._$AM = s, this.options = i;
453
+ class vt {
454
+ constructor(e, s, r) {
455
+ this.element = e, this.type = 6, this._$AN = void 0, this._$AM = s, this.options = r;
471
456
  }
472
457
  get _$AU() {
473
458
  return this._$AM._$AU;
474
459
  }
475
- _$AI(t) {
476
- j(this, t);
460
+ _$AI(e) {
461
+ D(this, e);
477
462
  }
478
463
  }
479
- const fe = ut.litHtmlPolyfillSupport;
480
- fe?.(D, H), (ut.litHtmlVersions ??= []).push("3.3.1");
481
- const pe = (e, t, s) => {
482
- const i = s?.renderBefore ?? t;
483
- let r = i._$litPart$;
484
- if (r === void 0) {
464
+ const $t = ye.litHtmlPolyfillSupport;
465
+ $t?.(H, z), (ye.litHtmlVersions ??= []).push("3.3.2");
466
+ const bt = (t, e, s) => {
467
+ const r = s?.renderBefore ?? e;
468
+ let i = r._$litPart$;
469
+ if (i === void 0) {
485
470
  const o = s?.renderBefore ?? null;
486
- i._$litPart$ = r = new H(t.insertBefore(L(), o), o, void 0, s ?? {});
471
+ r._$litPart$ = i = new z(e.insertBefore(F(), o), o, void 0, s ?? {});
487
472
  }
488
- return r._$AI(e), r;
473
+ return i._$AI(t), i;
489
474
  };
490
- /**
491
- * @license
492
- * Copyright 2017 Google LLC
493
- * SPDX-License-Identifier: BSD-3-Clause
494
- */
495
- const ft = globalThis;
496
- let C = class extends S {
475
+ const $e = globalThis;
476
+ let k = class extends R {
497
477
  constructor() {
498
478
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
499
479
  }
500
480
  createRenderRoot() {
501
- const t = super.createRenderRoot();
502
- return this.renderOptions.renderBefore ??= t.firstChild, t;
481
+ const e = super.createRenderRoot();
482
+ return this.renderOptions.renderBefore ??= e.firstChild, e;
503
483
  }
504
- update(t) {
484
+ update(e) {
505
485
  const s = this.render();
506
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = pe(s, this.renderRoot, this.renderOptions);
486
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = bt(s, this.renderRoot, this.renderOptions);
507
487
  }
508
488
  connectedCallback() {
509
489
  super.connectedCallback(), this._$Do?.setConnected(!0);
@@ -512,438 +492,423 @@ let C = class extends S {
512
492
  super.disconnectedCallback(), this._$Do?.setConnected(!1);
513
493
  }
514
494
  render() {
515
- return P;
495
+ return T;
516
496
  }
517
497
  };
518
- C._$litElement$ = !0, C.finalized = !0, ft.litElementHydrateSupport?.({ LitElement: C });
519
- const ge = ft.litElementPolyfillSupport;
520
- ge?.({ LitElement: C });
521
- (ft.litElementVersions ??= []).push("4.2.1");
522
- class me extends C {
498
+ k._$litElement$ = !0, k.finalized = !0, $e.litElementHydrateSupport?.({ LitElement: k });
499
+ const _t = $e.litElementPolyfillSupport;
500
+ _t?.({ LitElement: k });
501
+ ($e.litElementVersions ??= []).push("4.2.2");
502
+ class wt extends k {
523
503
  constructor() {
524
504
  super(...arguments), this.object = {
525
505
  "@id": ""
526
- }, this.isType = (t, s = this.object) => {
527
- const i = s["@type"];
528
- return Array.isArray(i) ? i.includes(t) : typeof i == "string" ? i === t : !1;
506
+ }, this.isType = (e, s = this.object) => {
507
+ const r = s["@type"];
508
+ return Array.isArray(r) ? r.includes(e) : typeof r == "string" ? r === e : !1;
529
509
  };
530
510
  }
531
511
  }
532
- /**
533
- * @license
534
- * Copyright 2017 Google LLC
535
- * SPDX-License-Identifier: BSD-3-Clause
536
- */
537
- const pt = (e) => (t, s) => {
538
- s !== void 0 ? s.addInitializer((() => {
539
- customElements.define(e, t);
540
- })) : customElements.define(e, t);
512
+ const re = (t) => (e, s) => {
513
+ s !== void 0 ? s.addInitializer(() => {
514
+ customElements.define(t, e);
515
+ }) : customElements.define(t, e);
541
516
  };
542
- /**
543
- * @license
544
- * Copyright 2017 Google LLC
545
- * SPDX-License-Identifier: BSD-3-Clause
546
- */
547
- const ye = { attribute: !0, type: String, converter: B, reflect: !1, hasChanged: X }, ve = (e = ye, t, s) => {
548
- const { kind: i, metadata: r } = s;
549
- let o = globalThis.litPropertyMetadata.get(r);
550
- if (o === void 0 && globalThis.litPropertyMetadata.set(r, o = /* @__PURE__ */ new Map()), i === "setter" && ((e = Object.create(e)).wrapped = !0), o.set(s.name, e), i === "accessor") {
517
+ const xt = { attribute: !0, type: String, converter: G, reflect: !1, hasChanged: se }, At = (t = xt, e, s) => {
518
+ const { kind: r, metadata: i } = s;
519
+ let o = globalThis.litPropertyMetadata.get(i);
520
+ if (o === void 0 && globalThis.litPropertyMetadata.set(i, o = /* @__PURE__ */ new Map()), r === "setter" && ((t = Object.create(t)).wrapped = !0), o.set(s.name, t), r === "accessor") {
551
521
  const { name: n } = s;
552
522
  return { set(a) {
553
- const l = t.get.call(this);
554
- t.set.call(this, a), this.requestUpdate(n, l, e);
523
+ const l = e.get.call(this);
524
+ e.set.call(this, a), this.requestUpdate(n, l, t, !0, a);
555
525
  }, init(a) {
556
- return a !== void 0 && this.C(n, void 0, e, a), a;
526
+ return a !== void 0 && this.C(n, void 0, t, a), a;
557
527
  } };
558
528
  }
559
- if (i === "setter") {
529
+ if (r === "setter") {
560
530
  const { name: n } = s;
561
531
  return function(a) {
562
532
  const l = this[n];
563
- t.call(this, a), this.requestUpdate(n, l, e);
533
+ e.call(this, a), this.requestUpdate(n, l, t, !0, a);
564
534
  };
565
535
  }
566
- throw Error("Unsupported decorator location: " + i);
536
+ throw Error("Unsupported decorator location: " + r);
567
537
  };
568
- function f(e) {
569
- return (t, s) => typeof s == "object" ? ve(e, t, s) : ((i, r, o) => {
570
- const n = r.hasOwnProperty(o);
571
- return r.constructor.createProperty(o, i), n ? Object.getOwnPropertyDescriptor(r, o) : void 0;
572
- })(e, t, s);
538
+ function m(t) {
539
+ return (e, s) => typeof s == "object" ? At(t, e, s) : ((r, i, o) => {
540
+ const n = i.hasOwnProperty(o);
541
+ return i.constructor.createProperty(o, r), n ? Object.getOwnPropertyDescriptor(i, o) : void 0;
542
+ })(t, e, s);
573
543
  }
574
- /**
575
- * @license
576
- * Copyright 2017 Google LLC
577
- * SPDX-License-Identifier: BSD-3-Clause
578
- */
579
- function R(e) {
580
- return f({ ...e, state: !0, attribute: !1 });
544
+ function g(t) {
545
+ return m({ ...t, state: !0, attribute: !1 });
581
546
  }
582
- var _e = Object.defineProperty, $e = (e, t, s, i) => {
583
- for (var r = void 0, o = e.length - 1, n; o >= 0; o--)
584
- (n = e[o]) && (r = n(t, s, r) || r);
585
- return r && _e(t, s, r), r;
547
+ var St = Object.defineProperty, Ct = (t, e, s, r) => {
548
+ for (var i = void 0, o = t.length - 1, n; o >= 0; o--)
549
+ (n = t[o]) && (i = n(e, s, i) || i);
550
+ return i && St(e, s, i), i;
586
551
  };
587
- class gt extends C {
552
+ class be extends k {
588
553
  constructor() {
589
- super(...arguments), this.objects = [], this.hasType = (t, s = this.objects) => new Set(s.flatMap((r) => r["@type"])).has(t);
554
+ super(...arguments), this.objects = [], this.hasType = (e, s = this.objects) => new Set(s.flatMap((i) => i["@type"])).has(e);
590
555
  }
591
556
  }
592
- $e([
593
- f({ attribute: !1 })
594
- ], gt.prototype, "objects");
595
- var be = Object.defineProperty, b = (e, t, s, i) => {
596
- for (var r = void 0, o = e.length - 1, n; o >= 0; o--)
597
- (n = e[o]) && (r = n(t, s, r) || r);
598
- return r && be(t, s, r), r;
557
+ Ct([
558
+ m({ attribute: !1 })
559
+ ], be.prototype, "objects");
560
+ var Et = Object.defineProperty, x = (t, e, s, r) => {
561
+ for (var i = void 0, o = t.length - 1, n; o >= 0; o--)
562
+ (n = t[o]) && (i = n(e, s, i) || i);
563
+ return i && Et(e, s, i), i;
599
564
  };
600
- class m extends gt {
565
+ class v extends be {
601
566
  constructor({
602
- defaultRoute: t = !1,
567
+ defaultRoute: e = !1,
603
568
  setupSubscriptions: s = !0,
604
- ignoreRouter: i = !1
569
+ ignoreRouter: r = !1
605
570
  } = {}) {
606
571
  super(), this.cherryPickedProperties = [], this.currentRoute = "";
607
- const r = () => {
608
- document.readyState === "complete" && this._attach(t, s, i).then(
572
+ const i = () => {
573
+ document.readyState === "complete" && this._attach(e, s, r).then(
609
574
  (o) => {
610
575
  o && this.requestUpdate();
611
576
  }
612
577
  );
613
578
  };
614
- document.readyState === "complete" ? r() : document.addEventListener("readystatechange", r);
579
+ document.readyState === "complete" ? i() : document.addEventListener("readystatechange", i);
615
580
  }
616
- async _attach(t, s, i) {
617
- return !this.orbit && window.orbit && (this.orbit = window.orbit, s) ? (Ae({
581
+ async _attach(e, s, r) {
582
+ return !this.orbit && window.orbit && (this.orbit = window.orbit, s) ? (jt({
618
583
  component: this,
619
- defaultRoute: t,
620
- ignoreRouter: i
621
- }), this.route && (this.component = this.orbit.getComponentFromRoute(this.route), this.component && this.orbit.components.map((r) => (r.uniq === this.component.uniq && (r.instance = this), r))), await this._afterAttach(), Promise.resolve(!0)) : Promise.resolve(!1);
584
+ defaultRoute: e,
585
+ ignoreRouter: r
586
+ }), this.route && (this.component = this.orbit.getComponentFromRoute(this.route), this.component && this.orbit.components.map((i) => (i.uniq === this.component.uniq && (i.instance = this), i))), await this._afterAttach(), Promise.resolve(!0)) : Promise.resolve(!1);
622
587
  }
623
588
  async _afterAttach() {
624
589
  return Promise.resolve();
625
590
  }
626
- _navigate(t) {
591
+ _navigate(e) {
627
592
  window.sibRouter.previousRoute = this.currentRoute, window.sibRouter.previousResource = window.sibRouter.currentResource;
628
- const s = t.target?.closest("[navigation-target]");
629
- let i = s.getAttribute("navigation-target");
630
- const r = s.getAttribute("navigation-subrouter"), o = s.getAttribute("navigation-resource"), n = s.getAttribute("navigation-rdf-type");
593
+ const s = e.target?.closest("[navigation-target]");
594
+ let r = s.getAttribute("navigation-target");
595
+ const i = s.getAttribute("navigation-subrouter"), o = s.getAttribute("navigation-resource"), n = s.getAttribute("navigation-rdf-type");
631
596
  if (n) {
632
597
  const a = window.orbit?.components?.filter(
633
598
  (l) => l?.routeAttributes?.["rdf-type"] === n
634
599
  );
635
- a && (i = a[0]?.uniq);
600
+ a && (r = a[0]?.uniq);
636
601
  }
637
- i && k(
638
- (window.orbit ? window.orbit.getRoute(i, !0) : i) + (r ? `-${r}` : ""),
602
+ r && O(
603
+ (window.orbit ? window.orbit.getRoute(r, !0) : r) + (i ? `-${i}` : ""),
639
604
  o
640
- ), t.preventDefault();
605
+ ), e.preventDefault();
641
606
  }
642
- _normalizeLdpContains(t) {
643
- return !Array.isArray(t) && t !== null ? [t] : t;
607
+ _normalizeLdpContains(e) {
608
+ return !Array.isArray(e) && e !== null ? [e] : e;
644
609
  }
645
- async _expandContainer(t, s = !0, i = this.cherryPickedProperties) {
646
- const r = [];
647
- for (const o of t) {
610
+ async _expandContainer(e, s = !0, r = this.cherryPickedProperties) {
611
+ const i = [];
612
+ for (const o of e) {
648
613
  const n = await this._getProxyValue(
649
614
  await o,
650
615
  s,
651
- i
616
+ r
652
617
  );
653
- n && r.push(n);
618
+ n && i.push(n);
654
619
  }
655
- return r;
620
+ return i;
656
621
  }
657
- async _getProperties(t, s = !0, i = this.cherryPickedProperties) {
658
- const r = await t.properties, o = {
659
- "@id": t["@id"],
660
- "@type": t["@type"],
661
- "@context": t.serverContext,
662
- _originalResource: t
622
+ async _getProperties(e, s = !0, r = this.cherryPickedProperties) {
623
+ const i = await e.properties, o = {
624
+ "@id": e["@id"],
625
+ "@type": e["@type"],
626
+ "@context": e.serverContext,
627
+ _originalResource: e
663
628
  };
664
- for (const n of i)
665
- r?.includes(n.key) && (o[n.value] = await t.get(n.key), n.expand && (o[n.value] = await this._getProxyValue(
629
+ for (const n of r)
630
+ i?.includes(n.key) && (o[n.value] = await e.get(n.key), n.expand && (o[n.value] = await this._getProxyValue(
666
631
  o[n.value],
667
632
  s,
668
- i
633
+ r
669
634
  )), n.cast && (o[n.value] = await n.cast(o[n.value])));
670
635
  return await this._responseAdaptator(o);
671
636
  }
672
- async _hasCherryPickedProperties(t) {
673
- const s = await t.properties;
674
- for (const i of this.cherryPickedProperties)
675
- if (s?.includes(i.key))
637
+ async _hasCherryPickedProperties(e) {
638
+ const s = await e.properties;
639
+ for (const r of this.cherryPickedProperties)
640
+ if (s?.includes(r.key))
676
641
  return !0;
677
642
  return !1;
678
643
  }
679
- async _getProxyValue(t, s = !0, i = this.cherryPickedProperties) {
644
+ async _getProxyValue(e, s = !0, r = this.cherryPickedProperties) {
680
645
  try {
681
- if (t) {
682
- let r = t;
683
- if (typeof t == "string" && (r = await window.sibStore.getData(t, Ot)), typeof t != "string" && t.isFullResource && (t.isFullResource?.() || (r = await window.sibStore.getData(
684
- t["@id"],
685
- Ot
686
- ))), typeof t != "string" && !t.isFullResource && (r.properties = Object.keys(r), r.get = (o) => r[o]), !r) return { _originalResource: r };
687
- if (typeof r == "object" && r !== null) {
688
- if (r.isContainer?.() && r["ldp:contains"]) {
689
- if (await this._hasCherryPickedProperties(r))
646
+ if (e) {
647
+ let i = e;
648
+ if (typeof e == "string" && (i = await window.sibStore.getData(e, Me)), typeof e != "string" && e.isFullResource && (e.isFullResource?.() || (i = await window.sibStore.getData(
649
+ e["@id"],
650
+ Me
651
+ ))), typeof e != "string" && !e.isFullResource && (i.properties = Object.keys(i), i.get = (o) => i[o]), !i) return { _originalResource: i };
652
+ if (typeof i == "object" && i !== null) {
653
+ if (i.isContainer?.() && i["ldp:contains"]) {
654
+ if (await this._hasCherryPickedProperties(i))
690
655
  return await this._getProperties(
691
- r,
656
+ i,
692
657
  s,
693
- i
658
+ r
694
659
  );
695
660
  const o = this._normalizeLdpContains(
696
- await r["ldp:contains"]
661
+ await i["ldp:contains"]
697
662
  );
698
663
  return await this._expandContainer(
699
664
  o,
700
665
  s,
701
- i
666
+ r
702
667
  );
703
668
  }
704
- return await this._getProperties(r, s, i);
669
+ return await this._getProperties(i, s, r);
705
670
  }
706
671
  }
707
672
  return;
708
673
  } catch {
709
674
  }
710
675
  }
711
- async _responseAdaptator(t) {
712
- return Promise.resolve(t);
676
+ async _responseAdaptator(e) {
677
+ return Promise.resolve(e);
713
678
  }
714
679
  gatekeeper() {
715
680
  if (!this.orbit || !this.noRouter && this.route && this.currentRoute && !this.route.startsWith(this.currentRoute) || !this.dataSrc)
716
681
  return c;
717
682
  }
718
683
  }
719
- b([
720
- f({ attribute: "default-data-src", reflect: !0 })
721
- ], m.prototype, "defaultDataSrc");
722
- b([
723
- f({ attribute: "data-src", reflect: !0 })
724
- ], m.prototype, "dataSrc");
725
- b([
726
- f({ attribute: "nested-field" })
727
- ], m.prototype, "nestedField");
728
- b([
729
- f({ attribute: "uniq" })
730
- ], m.prototype, "uniq");
731
- b([
732
- f({ attribute: "route" })
733
- ], m.prototype, "route");
734
- b([
735
- f({ attribute: !1 })
736
- ], m.prototype, "cherryPickedProperties");
737
- b([
738
- R()
739
- ], m.prototype, "orbit");
740
- b([
741
- R()
742
- ], m.prototype, "currentRoute");
743
- function we() {
684
+ x([
685
+ m({ attribute: "default-data-src", reflect: !0 })
686
+ ], v.prototype, "defaultDataSrc");
687
+ x([
688
+ m({ attribute: "data-src", reflect: !0 })
689
+ ], v.prototype, "dataSrc");
690
+ x([
691
+ m({ attribute: "nested-field" })
692
+ ], v.prototype, "nestedField");
693
+ x([
694
+ m({ attribute: "uniq" })
695
+ ], v.prototype, "uniq");
696
+ x([
697
+ m({ attribute: "route" })
698
+ ], v.prototype, "route");
699
+ x([
700
+ m({ attribute: !1 })
701
+ ], v.prototype, "cherryPickedProperties");
702
+ x([
703
+ g()
704
+ ], v.prototype, "orbit");
705
+ x([
706
+ g()
707
+ ], v.prototype, "currentRoute");
708
+ function Pt() {
744
709
  return Math.random().toString(16).slice(2);
745
710
  }
746
- const Ae = ({
747
- component: e,
748
- defaultRoute: t = !1,
711
+ const jt = ({
712
+ component: t,
713
+ defaultRoute: e = !1,
749
714
  ignoreRouter: s = !1
750
715
  }) => {
751
- if (e.uniq || (e.uniq = we(), t && !e.route && !s && (e.route = t)), e._subscriptions = /* @__PURE__ */ new Set(), !s) {
752
- e.route || (e.route = e.uniq, window.orbit && (e.route = window.orbit.getRoute(e.uniq))), e.noRouter = !0;
753
- let i = document.querySelector("solid-router");
754
- for (; i; )
755
- e.noRouter = !1, e.currentRoute = i.currentRouteName, e.currentResource = window.sibRouter.currentResource, i = document.querySelector(
756
- `[data-view="${i.currentRouteName}"] solid-router`
716
+ if (t.uniq || (t.uniq = Pt(), e && !t.route && !s && (t.route = e)), t._subscriptions = /* @__PURE__ */ new Set(), !s) {
717
+ t.route || (t.route = t.uniq, window.orbit && (t.route = window.orbit.getRoute(t.uniq))), t.noRouter = !0;
718
+ let r = document.querySelector("solid-router");
719
+ for (; r; )
720
+ t.noRouter = !1, t.currentRoute = r.currentRouteName, t.currentResource = window.sibRouter.currentResource, r = document.querySelector(
721
+ `[data-view="${r.currentRouteName}"] solid-router`
757
722
  );
758
- e.navigationListener = () => {
759
- let r = document.querySelector("solid-router");
760
- for (; r; )
761
- e.noRouter = !1, e.currentRoute = r.currentRouteName, e.currentResource = window.sibRouter.currentResource, r = document.querySelector(
762
- `[data-view="${r.currentRouteName}"] solid-router`
723
+ t.navigationListener = () => {
724
+ let i = document.querySelector("solid-router");
725
+ for (; i; )
726
+ t.noRouter = !1, t.currentRoute = i.currentRouteName, t.currentResource = window.sibRouter.currentResource, i = document.querySelector(
727
+ `[data-view="${i.currentRouteName}"] solid-router`
763
728
  );
764
- e.requestUpdate();
765
- }, e._subscriptions.add(["navigate", e.navigationListener]);
766
- }
767
- e._subscribe = () => {
768
- e._unsubscribe();
769
- for (const i of e._subscriptions)
770
- document.addEventListener(i[0], i[1]);
771
- }, e._unsubscribe = () => {
772
- for (const i of e._subscriptions)
773
- document.removeEventListener(i[0], i[1]);
774
- }, e._subscribe();
729
+ t.requestUpdate();
730
+ }, t._subscriptions.add(["navigate", t.navigationListener]);
731
+ }
732
+ t._subscribe = () => {
733
+ t._unsubscribe();
734
+ for (const r of t._subscriptions)
735
+ document.addEventListener(r[0], r[1]);
736
+ }, t._unsubscribe = () => {
737
+ for (const r of t._subscriptions)
738
+ document.removeEventListener(r[0], r[1]);
739
+ }, t._subscribe();
775
740
  };
776
- function Ct(e) {
777
- return !Number.isNaN(new Date(e).getTime());
741
+ function Te(t) {
742
+ return !Number.isNaN(new Date(t).getTime());
778
743
  }
779
- const st = (e, t, s) => {
780
- if (e == null)
744
+ const le = (t, e, s) => {
745
+ if (t == null)
781
746
  return !1;
782
- const i = t.split(".");
783
- let r = e;
784
- for (const o of i)
785
- if (r && typeof r == "object" && o in r)
786
- r = r[o];
747
+ const r = e.split(".");
748
+ let i = t;
749
+ for (const o of r)
750
+ if (i && typeof i == "object" && o in i)
751
+ i = i[o];
787
752
  else
788
753
  return !1;
789
- if (Ct(r)) {
790
- if (new Date(r) > s)
754
+ if (Te(i)) {
755
+ if (new Date(i) > s)
791
756
  return !0;
792
757
  } else
793
758
  return !1;
794
- return Array.isArray(e) ? e.some(
795
- (o) => st(o, t, s)
796
- ) : typeof e == "object" ? Object.entries(e).some(([o, n]) => o === t && Ct(n) ? !1 : st(n, t, s)) : !1;
797
- }, xe = (e, t, s) => {
798
- if (!t || !s || typeof s != "string")
799
- return e;
800
- const i = new Date(s);
801
- return Number.isNaN(i.getTime()) ? (console.warn(`Invalid threshold date provided: ${s}`), e) : e.filter(
802
- (r) => st(r, t, i)
759
+ return Array.isArray(t) ? t.some(
760
+ (o) => le(o, e, s)
761
+ ) : typeof t == "object" ? Object.entries(t).some(([o, n]) => o === e && Te(n) ? !1 : le(n, e, s)) : !1;
762
+ }, Rt = (t, e, s) => {
763
+ if (!e || !s || typeof s != "string")
764
+ return t;
765
+ const r = new Date(s);
766
+ return Number.isNaN(r.getTime()) ? (console.warn(`Invalid threshold date provided: ${s}`), t) : t.filter(
767
+ (i) => le(i, e, r)
803
768
  );
804
- }, Ee = (e, t, s) => !t || !s ? e : e.filter((i) => {
805
- let r = i;
806
- const o = t.split(".");
769
+ }, Ot = (t, e, s) => !e || !s ? t : t.filter((r) => {
770
+ let i = r;
771
+ const o = e.split(".");
807
772
  for (const a of o)
808
- if (r && typeof r == "object" && a in r)
809
- r = r[a];
773
+ if (i && typeof i == "object" && a in i)
774
+ i = i[a];
810
775
  else
811
776
  return !1;
812
- const n = r;
777
+ const n = i;
813
778
  return n ? typeof n == "object" && !Array.isArray(n) && n !== null && "@id" in n && n["@id"] === s ? !0 : Array.isArray(n) ? n.some(
814
779
  (a) => typeof a == "object" && a !== null && "@id" in a && a["@id"] === s
815
780
  ) : !1 : !1;
816
781
  });
817
- function Se(e) {
818
- return typeof e != "string" && typeof e != "number" && !(e instanceof Date) ? !1 : !Number.isNaN(new Date(e).getTime());
782
+ function kt(t) {
783
+ return typeof t != "string" && typeof t != "number" && !(t instanceof Date) ? !1 : !Number.isNaN(new Date(t).getTime());
819
784
  }
820
- const rt = (e, t, s, i) => {
821
- if (e == null)
785
+ const ce = (t, e, s, r) => {
786
+ if (t == null)
822
787
  return !1;
823
- const r = t.split(".");
824
- let o = e;
825
- for (const n of r)
788
+ const i = e.split(".");
789
+ let o = t;
790
+ for (const n of i)
826
791
  if (o && typeof o == "object" && n in o)
827
792
  o = o[n];
828
793
  else
829
794
  return !1;
830
795
  if (typeof o == "number") {
831
- if (typeof s == "number" && typeof i == "number" && s <= o && o <= i)
796
+ if (typeof s == "number" && typeof r == "number" && s <= o && o <= r)
832
797
  return !0;
833
- } else if (Se(o)) {
798
+ } else if (kt(o)) {
834
799
  const n = new Date(o);
835
- if (s instanceof Date && i instanceof Date && s <= n && n <= i)
800
+ if (s instanceof Date && r instanceof Date && s <= n && n <= r)
836
801
  return !0;
837
802
  } else
838
803
  return !1;
839
- return Array.isArray(e) ? e.some(
840
- (n) => rt(n, t, s, i)
841
- ) : typeof e == "object" ? Object.entries(e).some(
842
- ([n, a]) => rt(a, t, s, i)
804
+ return Array.isArray(t) ? t.some(
805
+ (n) => ce(n, e, s, r)
806
+ ) : typeof t == "object" ? Object.entries(t).some(
807
+ ([n, a]) => ce(a, e, s, r)
843
808
  ) : !1;
844
- }, Ce = (e, t, s) => {
845
- if (!t || !s || typeof s != "string")
846
- return e;
847
- const [i, r] = s.split("/").map(Number);
848
- return Number.isNaN(i) || Number.isNaN(r) ? e : i > r ? (console.warn(`Start number is after end number in interval: ${s}`), e) : e.filter(
849
- (o) => rt(o, t, i, r)
809
+ }, Tt = (t, e, s) => {
810
+ if (!e || !s || typeof s != "string")
811
+ return t;
812
+ const [r, i] = s.split("/").map(Number);
813
+ return Number.isNaN(r) || Number.isNaN(i) ? t : r > i ? (console.warn(`Start number is after end number in interval: ${s}`), t) : t.filter(
814
+ (o) => ce(o, e, r, i)
850
815
  );
851
- }, it = (e, t, s) => {
852
- if (e == null)
816
+ }, de = (t, e, s) => {
817
+ if (t == null)
853
818
  return 0;
854
- if (typeof e != "object") {
855
- const r = String(e).toLowerCase(), o = t.replace(
819
+ if (typeof t != "object") {
820
+ const i = String(t).toLowerCase(), o = e.replace(
856
821
  /[.*+?^${}()|[\]\\]/g,
857
822
  "\\$&"
858
823
  ), n = new RegExp(`\\b${o}\\b`);
859
824
  let a = 0;
860
- return n.test(r) ? a = 2 : r.includes(t) && (a = 1), a;
861
- }
862
- if (Array.isArray(e)) {
863
- let r = 0;
864
- for (const o of e)
865
- if (r = Math.max(
866
- r,
867
- it(
825
+ return n.test(i) ? a = 2 : i.includes(e) && (a = 1), a;
826
+ }
827
+ if (Array.isArray(t)) {
828
+ let i = 0;
829
+ for (const o of t)
830
+ if (i = Math.max(
831
+ i,
832
+ de(
868
833
  o,
869
- t
834
+ e
870
835
  )
871
- ), r === 2) break;
872
- return r;
836
+ ), i === 2) break;
837
+ return i;
873
838
  }
874
- let i = 0;
875
- for (const r of Object.values(e))
876
- if (i = Math.max(
877
- i,
878
- it(
879
- r,
880
- t
839
+ let r = 0;
840
+ for (const i of Object.values(t))
841
+ if (r = Math.max(
842
+ r,
843
+ de(
844
+ i,
845
+ e
881
846
  )
882
- ), i === 2) break;
883
- return i;
884
- }, Pe = (e, t, s) => {
885
- if (!t || !s || s.trim() === "")
886
- return e;
887
- const i = s.toLowerCase(), o = e.map((n) => {
847
+ ), r === 2) break;
848
+ return r;
849
+ }, Dt = (t, e, s) => {
850
+ if (!e || !s || s.trim() === "")
851
+ return t;
852
+ const r = s.toLowerCase(), o = t.map((n) => {
888
853
  let a = n;
889
- const l = t.split(".");
890
- for (const d of l)
891
- if (a && typeof a == "object" && d in a)
892
- a = a[d];
854
+ const l = e.split(".");
855
+ for (const u of l)
856
+ if (a && typeof a == "object" && u in a)
857
+ a = a[u];
893
858
  else {
894
859
  a = null;
895
860
  break;
896
861
  }
897
- let h = 0;
898
- return a && (h = it(a, i)), { obj: n, score: h };
862
+ let d = 0;
863
+ return a && (d = de(a, r)), { obj: n, score: d };
899
864
  }).filter((n) => n.score > 0);
900
865
  return o.sort((n, a) => a.score - n.score), o.map((n) => n.obj);
901
- }, je = (e, t) => t ? e.filter((s) => {
902
- const i = s["@type"];
903
- return i ? typeof i == "string" ? i === t : Array.isArray(i) ? i.some((r) => r === t) : !1 : !1;
904
- }) : e, ot = (e, t, s) => {
905
- if (e == null)
866
+ }, Mt = (t, e) => e ? t.filter((s) => {
867
+ const r = s["@type"];
868
+ return r ? typeof r == "string" ? r === e : Array.isArray(r) ? r.some((i) => i === e) : !1 : !1;
869
+ }) : t, he = (t, e, s) => {
870
+ if (t == null)
906
871
  return 0;
907
- if (typeof e != "object") {
908
- const r = String(e).toLowerCase(), o = t.replace(
872
+ if (typeof t != "object") {
873
+ const i = String(t).toLowerCase(), o = e.replace(
909
874
  /[.*+?^${}()|[\]\\]/g,
910
875
  "\\$&"
911
876
  ), n = new RegExp(`\\b${o}\\b`);
912
877
  let a = 0;
913
- return n.test(r) ? s === "name" || s === "title" ? a = 4 : a = 3 : r.includes(t) && (s === "name" || s === "title" ? a = 2 : a = 1), a;
914
- }
915
- if (Array.isArray(e)) {
916
- let r = 0;
917
- for (const o of e)
918
- if (r = Math.max(
919
- r,
920
- ot(o, t)
921
- ), r === 4) break;
922
- return r;
878
+ return n.test(i) ? s === "name" || s === "title" ? a = 4 : a = 3 : i.includes(e) && (s === "name" || s === "title" ? a = 2 : a = 1), a;
879
+ }
880
+ if (Array.isArray(t)) {
881
+ let i = 0;
882
+ for (const o of t)
883
+ if (i = Math.max(
884
+ i,
885
+ he(o, e)
886
+ ), i === 4) break;
887
+ return i;
923
888
  }
924
- let i = 0;
925
- for (const [r, o] of Object.entries(e))
926
- if (i = Math.max(
927
- i,
928
- ot(o, t, r)
929
- ), i === 4) break;
930
- return i;
931
- }, Oe = (e, t) => {
932
- if (!t || t.trim() === "")
933
- return e;
934
- const s = t.toLowerCase(), r = e.map((o) => ({
889
+ let r = 0;
890
+ for (const [i, o] of Object.entries(t))
891
+ if (r = Math.max(
892
+ r,
893
+ he(o, e, i)
894
+ ), r === 4) break;
895
+ return r;
896
+ }, We = (t, e) => {
897
+ if (!e || e.trim() === "")
898
+ return t;
899
+ const s = e.toLowerCase(), i = t.map((o) => ({
935
900
  obj: o,
936
- score: ot(o, s)
901
+ score: he(o, s)
937
902
  })).filter((o) => o.score > 0);
938
- return r.sort((o, n) => n.score - o.score), r.map((o) => o.obj);
939
- }, Pt = (e, t) => {
940
- let s = e;
941
- for (let i = 0; i < t.length && (s && t[i] in s); i++)
942
- s = s[t[i]];
903
+ return i.sort((o, n) => n.score - o.score), i.map((o) => o.obj);
904
+ }, De = (t, e) => {
905
+ let s = t;
906
+ for (let r = 0; r < e.length && (s && e[r] in s); r++)
907
+ s = s[e[r]];
943
908
  return s;
944
- }, jt = (e, t, s = "asc") => e.sort((i, r) => {
945
- let o = i, n = r;
946
- Array.isArray(t) ? (o = Pt(i, t), n = Pt(r, t)) : (o = i[t], n = r[t]);
909
+ }, U = (t, e, s = "asc") => t.sort((r, i) => {
910
+ let o = r, n = i;
911
+ Array.isArray(e) ? (o = De(r, e), n = De(i, e)) : (o = r[e], n = i[e]);
947
912
  let a = 0;
948
913
  if (typeof o == "number" && typeof n == "number")
949
914
  a = o - n;
@@ -952,220 +917,179 @@ const rt = (e, t, s, i) => {
952
917
  else if (o instanceof Date && n instanceof Date)
953
918
  a = o.getTime() - n.getTime();
954
919
  else
955
- throw new TypeError(`Unsupported data type for key "${t}"`);
920
+ throw new TypeError(`Unsupported data type for key "${e}"`);
956
921
  return s === "asc" ? a : -a;
957
- }), Y = (e, t = {
922
+ }), N = (t, e = {
958
923
  day: "2-digit",
959
924
  month: "2-digit",
960
925
  year: "2-digit"
961
926
  }) => {
962
- if (!e) return "";
963
- const i = (typeof e == "string" ? new Date(e) : e).toLocaleString(void 0, t);
964
- return typeof e == "string" && i === "Invalid Date" ? e : i;
965
- }, k = (e, t = !1) => {
927
+ if (!t) return "";
928
+ const r = (typeof t == "string" ? new Date(t) : t).toLocaleString(void 0, e);
929
+ return typeof t == "string" && r === "Invalid Date" ? t : r;
930
+ }, O = (t, e = !1) => {
966
931
  window.dispatchEvent(
967
932
  new CustomEvent("requestNavigation", {
968
933
  detail: {
969
- route: e,
970
- resource: typeof t == "string" ? { "@id": t } : t
934
+ route: t,
935
+ resource: typeof e == "string" ? { "@id": e } : e
971
936
  }
972
937
  })
973
938
  );
974
- }, Ot = {};
975
- /**
976
- * @license
977
- * Copyright 2021 Google LLC
978
- * SPDX-License-Identifier: BSD-3-Clause
979
- */
980
- const nt = "lit-localize-status";
981
- /**
982
- * @license
983
- * Copyright 2021 Google LLC
984
- * SPDX-License-Identifier: BSD-3-Clause
985
- */
986
- const Re = (e) => typeof e != "string" && "strTag" in e, zt = (e, t, s) => {
987
- let i = e[0];
988
- for (let r = 1; r < e.length; r++)
989
- i += t[s ? s[r - 1] : r - 1], i += e[r];
990
- return i;
939
+ }, Lt = "https://cdn.startinblox.com/owl/ds4go.jsonld#", Ut = { "@id": "ds4go:link", "@type": "@id" }, Nt = { "@id": "ds4go:enclosure", "@type": "@id" }, Ft = { "@id": "ds4go:url", "@type": "@id" }, Me = {
940
+ ds4go: Lt,
941
+ link: Ut,
942
+ enclosure: Nt,
943
+ url: Ft
944
+ };
945
+ const ue = "lit-localize-status";
946
+ const Bt = (t, ...e) => ({
947
+ strTag: !0,
948
+ strings: t,
949
+ values: e
950
+ }), J = Bt, Ht = (t) => typeof t != "string" && "strTag" in t, Ke = (t, e, s) => {
951
+ let r = t[0];
952
+ for (let i = 1; i < t.length; i++)
953
+ r += e[s ? s[i - 1] : i - 1], r += t[i];
954
+ return r;
991
955
  };
992
- /**
993
- * @license
994
- * Copyright 2021 Google LLC
995
- * SPDX-License-Identifier: BSD-3-Clause
996
- */
997
- const Bt = ((e) => Re(e) ? zt(e.strings, e.values) : e);
998
- let _ = Bt, Rt = !1;
999
- function Te(e) {
1000
- if (Rt)
956
+ const Ge = ((t) => Ht(t) ? Ke(t.strings, t.values) : t);
957
+ let f = Ge, Le = !1;
958
+ function qt(t) {
959
+ if (Le)
1001
960
  throw new Error("lit-localize can only be configured once");
1002
- _ = e, Rt = !0;
961
+ f = t, Le = !0;
1003
962
  }
1004
- /**
1005
- * @license
1006
- * Copyright 2021 Google LLC
1007
- * SPDX-License-Identifier: BSD-3-Clause
1008
- */
1009
- class ke {
1010
- constructor(t) {
963
+ class zt {
964
+ constructor(e) {
1011
965
  this.__litLocalizeEventHandler = (s) => {
1012
966
  s.detail.status === "ready" && this.host.requestUpdate();
1013
- }, this.host = t;
967
+ }, this.host = e;
1014
968
  }
1015
969
  hostConnected() {
1016
- window.addEventListener(nt, this.__litLocalizeEventHandler);
970
+ window.addEventListener(ue, this.__litLocalizeEventHandler);
1017
971
  }
1018
972
  hostDisconnected() {
1019
- window.removeEventListener(nt, this.__litLocalizeEventHandler);
973
+ window.removeEventListener(ue, this.__litLocalizeEventHandler);
1020
974
  }
1021
975
  }
1022
- const Me = (e) => e.addController(new ke(e)), Le = Me;
1023
- /**
1024
- * @license
1025
- * Copyright 2021 Google LLC
1026
- * SPDX-License-Identifier: BSD-3-Clause
1027
- */
1028
- const Ue = () => (e, t) => (e.addInitializer(Le), e);
1029
- /**
1030
- * @license
1031
- * Copyright 2020 Google LLC
1032
- * SPDX-License-Identifier: BSD-3-Clause
1033
- */
1034
- class Ft {
976
+ const It = (t) => t.addController(new zt(t)), Vt = It;
977
+ const Wt = () => (t, e) => (t.addInitializer(Vt), t);
978
+ class Ze {
1035
979
  constructor() {
1036
- this.settled = !1, this.promise = new Promise((t, s) => {
1037
- this._resolve = t, this._reject = s;
980
+ this.settled = !1, this.promise = new Promise((e, s) => {
981
+ this._resolve = e, this._reject = s;
1038
982
  });
1039
983
  }
1040
- resolve(t) {
1041
- this.settled = !0, this._resolve(t);
984
+ resolve(e) {
985
+ this.settled = !0, this._resolve(e);
1042
986
  }
1043
- reject(t) {
1044
- this.settled = !0, this._reject(t);
987
+ reject(e) {
988
+ this.settled = !0, this._reject(e);
1045
989
  }
1046
990
  }
1047
- /**
1048
- * @license
1049
- * Copyright 2014 Travis Webb
1050
- * SPDX-License-Identifier: MIT
1051
- */
1052
- const g = [];
1053
- for (let e = 0; e < 256; e++)
1054
- g[e] = (e >> 4 & 15).toString(16) + (e & 15).toString(16);
1055
- function De(e) {
1056
- let t = 0, s = 8997, i = 0, r = 33826, o = 0, n = 40164, a = 0, l = 52210;
1057
- for (let h = 0; h < e.length; h++)
1058
- s ^= e.charCodeAt(h), t = s * 435, i = r * 435, o = n * 435, a = l * 435, o += s << 8, a += r << 8, i += t >>> 16, s = t & 65535, o += i >>> 16, r = i & 65535, l = a + (o >>> 16) & 65535, n = o & 65535;
1059
- return g[l >> 8] + g[l & 255] + g[n >> 8] + g[n & 255] + g[r >> 8] + g[r & 255] + g[s >> 8] + g[s & 255];
991
+ const b = [];
992
+ for (let t = 0; t < 256; t++)
993
+ b[t] = (t >> 4 & 15).toString(16) + (t & 15).toString(16);
994
+ function Kt(t) {
995
+ let e = 0, s = 8997, r = 0, i = 33826, o = 0, n = 40164, a = 0, l = 52210;
996
+ for (let d = 0; d < t.length; d++)
997
+ s ^= t.charCodeAt(d), e = s * 435, r = i * 435, o = n * 435, a = l * 435, o += s << 8, a += i << 8, r += e >>> 16, s = e & 65535, o += r >>> 16, i = r & 65535, l = a + (o >>> 16) & 65535, n = o & 65535;
998
+ return b[l >> 8] + b[l & 255] + b[n >> 8] + b[n & 255] + b[i >> 8] + b[i & 255] + b[s >> 8] + b[s & 255];
1060
999
  }
1061
- /**
1062
- * @license
1063
- * Copyright 2020 Google LLC
1064
- * SPDX-License-Identifier: BSD-3-Clause
1065
- */
1066
- const Ne = "", He = "h", qe = "s";
1067
- function Ie(e, t) {
1068
- return (t ? He : qe) + De(typeof e == "string" ? e : e.join(Ne));
1000
+ const Gt = "", Zt = "h", Jt = "s";
1001
+ function Xt(t, e) {
1002
+ return (e ? Zt : Jt) + Kt(typeof t == "string" ? t : t.join(Gt));
1069
1003
  }
1070
- /**
1071
- * @license
1072
- * Copyright 2021 Google LLC
1073
- * SPDX-License-Identifier: BSD-3-Clause
1074
- */
1075
- const Tt = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new Map();
1076
- function ze(e, t, s) {
1077
- if (e) {
1078
- const i = s?.id ?? Be(t), r = e[i];
1079
- if (r) {
1080
- if (typeof r == "string")
1081
- return r;
1082
- if ("strTag" in r)
1083
- return zt(
1084
- r.strings,
1004
+ const Ue = /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ new Map();
1005
+ function Qt(t, e, s) {
1006
+ if (t) {
1007
+ const r = s?.id ?? Yt(e), i = t[r];
1008
+ if (i) {
1009
+ if (typeof i == "string")
1010
+ return i;
1011
+ if ("strTag" in i)
1012
+ return Ke(
1013
+ i.strings,
1085
1014
  // Cast `template` because its type wasn't automatically narrowed (but
1086
1015
  // we know it must be the same type as `localized`).
1087
- t.values,
1088
- r.values
1016
+ e.values,
1017
+ i.values
1089
1018
  );
1090
1019
  {
1091
- let o = Tt.get(r);
1092
- return o === void 0 && (o = r.values, Tt.set(r, o)), {
1093
- ...r,
1094
- values: o.map((n) => t.values[n])
1020
+ let o = Ue.get(i);
1021
+ return o === void 0 && (o = i.values, Ue.set(i, o)), {
1022
+ ...i,
1023
+ values: o.map((n) => e.values[n])
1095
1024
  };
1096
1025
  }
1097
1026
  }
1098
1027
  }
1099
- return Bt(t);
1028
+ return Ge(e);
1100
1029
  }
1101
- function Be(e) {
1102
- const t = typeof e == "string" ? e : e.strings;
1103
- let s = kt.get(t);
1104
- return s === void 0 && (s = Ie(t, typeof e != "string" && !("strTag" in e)), kt.set(t, s)), s;
1030
+ function Yt(t) {
1031
+ const e = typeof t == "string" ? t : t.strings;
1032
+ let s = Ne.get(e);
1033
+ return s === void 0 && (s = Xt(e, typeof t != "string" && !("strTag" in t)), Ne.set(e, s)), s;
1105
1034
  }
1106
- /**
1107
- * @license
1108
- * Copyright 2021 Google LLC
1109
- * SPDX-License-Identifier: BSD-3-Clause
1110
- */
1111
- function tt(e) {
1112
- window.dispatchEvent(new CustomEvent(nt, { detail: e }));
1035
+ function ne(t) {
1036
+ window.dispatchEvent(new CustomEvent(ue, { detail: t }));
1113
1037
  }
1114
- let V = "", et, Vt, W, at, Wt, A = new Ft();
1115
- A.resolve();
1116
- let I = 0;
1117
- const Fe = (e) => (Te(((t, s) => ze(Wt, t, s))), V = Vt = e.sourceLocale, W = new Set(e.targetLocales), W.add(e.sourceLocale), at = e.loadLocale, { getLocale: Ve, setLocale: We }), Ve = () => V, We = (e) => {
1118
- if (e === (et ?? V))
1119
- return A.promise;
1120
- if (!W || !at)
1038
+ let X = "", ae, Je, Q, fe, Xe, C = new Ze();
1039
+ C.resolve();
1040
+ let W = 0;
1041
+ const es = (t) => (qt(((e, s) => Qt(Xe, e, s))), X = Je = t.sourceLocale, Q = new Set(t.targetLocales), Q.add(t.sourceLocale), fe = t.loadLocale, { getLocale: ts, setLocale: ss }), ts = () => X, ss = (t) => {
1042
+ if (t === (ae ?? X))
1043
+ return C.promise;
1044
+ if (!Q || !fe)
1121
1045
  throw new Error("Internal error");
1122
- if (!W.has(e))
1046
+ if (!Q.has(t))
1123
1047
  throw new Error("Invalid locale code");
1124
- I++;
1125
- const t = I;
1126
- return et = e, A.settled && (A = new Ft()), tt({ status: "loading", loadingLocale: e }), (e === Vt ? (
1048
+ W++;
1049
+ const e = W;
1050
+ return ae = t, C.settled && (C = new Ze()), ne({ status: "loading", loadingLocale: t }), (t === Je ? (
1127
1051
  // We could switch to the source locale synchronously, but we prefer to
1128
1052
  // queue it on a microtask so that switching locales is consistently
1129
1053
  // asynchronous.
1130
1054
  Promise.resolve({ templates: void 0 })
1131
- ) : at(e)).then((i) => {
1132
- I === t && (V = e, et = void 0, Wt = i.templates, tt({ status: "ready", readyLocale: e }), A.resolve());
1133
- }, (i) => {
1134
- I === t && (tt({
1055
+ ) : fe(t)).then((r) => {
1056
+ W === e && (X = t, ae = void 0, Xe = r.templates, ne({ status: "ready", readyLocale: t }), C.resolve());
1057
+ }, (r) => {
1058
+ W === e && (ne({
1135
1059
  status: "error",
1136
- errorLocale: e,
1137
- errorMessage: i.toString()
1138
- }), A.reject(i));
1139
- }), A.promise;
1060
+ errorLocale: t,
1061
+ errorMessage: r.toString()
1062
+ }), C.reject(r));
1063
+ }), C.promise;
1140
1064
  };
1141
- var Ke = Object.defineProperty, Ge = Object.getOwnPropertyDescriptor, mt = (e, t, s, i) => {
1142
- for (var r = i > 1 ? void 0 : i ? Ge(t, s) : t, o = e.length - 1, n; o >= 0; o--)
1143
- (n = e[o]) && (r = (i ? n(t, s, r) : n(r)) || r);
1144
- return i && r && Ke(t, s, r), r;
1065
+ var is = Object.defineProperty, rs = Object.getOwnPropertyDescriptor, _e = (t, e, s, r) => {
1066
+ for (var i = r > 1 ? void 0 : r ? rs(e, s) : e, o = t.length - 1, n; o >= 0; o--)
1067
+ (n = t[o]) && (i = (r ? n(e, s, i) : n(i)) || i);
1068
+ return r && i && is(e, s, i), i;
1145
1069
  };
1146
- let N = class extends gt {
1070
+ let q = class extends be {
1147
1071
  constructor() {
1148
1072
  super(...arguments), this.search = [], this._displayObjects = [];
1149
1073
  }
1150
- filter(e, t = []) {
1151
- if (!t || t.length === 0 || !e || e.length === 0)
1152
- return e;
1074
+ filter(t, e = []) {
1075
+ if (!e || e.length === 0 || !t || t.length === 0)
1076
+ return t;
1153
1077
  const s = /* @__PURE__ */ new Map();
1154
- for (const r of t) {
1155
- const o = r.name, n = s.get(o) || [];
1156
- n.push(r), s.set(o, n);
1078
+ for (const i of e) {
1079
+ const o = i.name, n = s.get(o) || [];
1080
+ n.push(i), s.set(o, n);
1157
1081
  }
1158
- let i = [...e];
1159
- for (const r of s.values()) {
1160
- if (i.length === 0)
1082
+ let r = [...t];
1083
+ for (const i of s.values()) {
1084
+ if (r.length === 0)
1161
1085
  break;
1162
1086
  const o = [];
1163
- for (const n of r)
1087
+ for (const n of i)
1164
1088
  switch (n.type) {
1165
1089
  case "interval":
1166
1090
  o.push(
1167
- Ce(
1168
- i,
1091
+ Tt(
1092
+ r,
1169
1093
  n.name,
1170
1094
  n.value
1171
1095
  )
@@ -1173,8 +1097,8 @@ let N = class extends gt {
1173
1097
  break;
1174
1098
  case "dateAfter":
1175
1099
  o.push(
1176
- xe(
1177
- i,
1100
+ Rt(
1101
+ r,
1178
1102
  n.name,
1179
1103
  n.value
1180
1104
  )
@@ -1182,8 +1106,8 @@ let N = class extends gt {
1182
1106
  break;
1183
1107
  case "matchId":
1184
1108
  o.push(
1185
- Ee(
1186
- i,
1109
+ Ot(
1110
+ r,
1187
1111
  n.name,
1188
1112
  n.value
1189
1113
  )
@@ -1191,13 +1115,13 @@ let N = class extends gt {
1191
1115
  break;
1192
1116
  case "matchType":
1193
1117
  o.push(
1194
- je(i, n.value)
1118
+ Mt(r, n.value)
1195
1119
  );
1196
1120
  break;
1197
1121
  case "exact":
1198
1122
  o.push(
1199
- Pe(
1200
- i,
1123
+ Dt(
1124
+ r,
1201
1125
  n.name,
1202
1126
  n.value
1203
1127
  )
@@ -1205,46 +1129,46 @@ let N = class extends gt {
1205
1129
  break;
1206
1130
  default:
1207
1131
  o.push(
1208
- Oe(i, n.value)
1132
+ We(r, n.value)
1209
1133
  );
1210
1134
  }
1211
- i = [...o.flat()];
1135
+ r = [...o.flat()];
1212
1136
  }
1213
- return i;
1137
+ return r;
1214
1138
  }
1215
- _handleClickEvent(e) {
1216
- this.dispatchEvent(new CustomEvent("clicked", { detail: e }));
1139
+ _handleClickEvent(t) {
1140
+ this.dispatchEvent(new CustomEvent("clicked", { detail: t }));
1217
1141
  }
1218
- willUpdate(e) {
1219
- (e.has("objects") || e.has("search")) && (this.objects ? this._displayObjects = this.filter(this.objects, this.search) : this._displayObjects = [], this.dispatchEvent(
1142
+ willUpdate(t) {
1143
+ (t.has("objects") || t.has("search")) && (this.objects ? this._displayObjects = this.filter(this.objects, this.search) : this._displayObjects = [], this.dispatchEvent(
1220
1144
  new CustomEvent("result-count", {
1221
1145
  detail: this._displayObjects.length
1222
1146
  })
1223
1147
  ));
1224
1148
  }
1225
1149
  render() {
1226
- return !this._displayObjects || this._displayObjects.length === 0 ? c : $`<div class="card-grid card-grid-vertical">
1227
- ${this._displayObjects.map((e) => {
1228
- const t = [
1150
+ return !this._displayObjects || this._displayObjects.length === 0 ? c : p`<div class="card-grid card-grid-vertical">
1151
+ ${this._displayObjects.map((t) => {
1152
+ const e = [
1229
1153
  {
1230
- name: `${e.facts.length} ${e.facts.length > 1 ? _("facts") : _("fact")}`,
1154
+ name: `${t.facts.length} ${t.facts.length > 1 ? f("facts") : f("fact")}`,
1231
1155
  type: "information"
1232
1156
  }
1233
1157
  ];
1234
- return $`<tems-card-catalog
1158
+ return p`<tems-card-catalog
1235
1159
  .object=${c}
1236
1160
  type=${"bill-image"}
1237
- .tags=${t}
1238
- .header=${e.name || c}
1239
- .content=${e.description || c}
1240
- date=${e.updated_at || c}
1241
- @click=${() => this._handleClickEvent(e)}
1161
+ .tags=${e}
1162
+ .header=${t.name || c}
1163
+ .content=${t.description || c}
1164
+ date=${t.updated_at || c}
1165
+ @click=${() => this._handleClickEvent(t)}
1242
1166
  ></tems-card-catalog>`;
1243
1167
  })}
1244
1168
  </div>`;
1245
1169
  }
1246
1170
  };
1247
- N.styles = ht`
1171
+ q.styles = ee`
1248
1172
  .card-grid {
1249
1173
  display: flex;
1250
1174
  flex-direction: row;
@@ -1262,22 +1186,22 @@ N.styles = ht`
1262
1186
  cursor: pointer;
1263
1187
  }
1264
1188
  `;
1265
- mt([
1266
- R()
1267
- ], N.prototype, "search", 2);
1268
- mt([
1269
- R()
1270
- ], N.prototype, "_displayObjects", 2);
1271
- N = mt([
1272
- pt("ds4go-fact-bundle-holder")
1273
- ], N);
1274
- const Xe = ".flex{display:flex}.flex.flex-row{flex-direction:row}.flex.flex-column{flex-direction:column}.flex.wrap{flex-wrap:wrap}.flex.flex-1{flex:1}.flex .half,.flex.half{flex-basis:50%}.flex.justify-content-center{justify-content:center}.flex.justify-content-space-between{justify-content:space-between}.flex.align-items-center{align-items:center}.flex.align-items-flex-start{align-items:flex-start}.full-width{width:100%}.modal{background-color:var(--color-surface-primary);border:var(--border-width-sm) solid var(--color-border-primary);border-radius:var(--border-radius-lg);color:var(--color-text-body);display:flex;flex-direction:column;font-family:var(--font-family-body);font-size:var(--typography-size-body-md);font-style:normal;font-weight:var(--font-weight-regular);gap:var(--scale-600);height:90vh;letter-spacing:var(--font-letter-spacing-default);line-height:var(--line-height-body-md);padding:var(--scale-600) var(--scale-900);width:90vw}.modal .topbar{display:flex;flex-direction:row;gap:var(--scale-400);width:100%}.modal .topbar tems-button:nth-child(2){margin-left:auto}.modal .modal-content-wrapper{display:flex;flex:1;flex-direction:column;overflow:hidden}.modal .modal-content-wrapper .modal-box{display:flex;flex:1;overflow-x:hidden;overflow-y:scroll}.modal .modal-content-wrapper .modal-content{display:flex;flex-direction:column;gap:var(--scale-400);height:fit-content;width:100%}.modal .modal-content-wrapper tems-division{width:fit-content}.modal .modal-content-wrapper tems-division div{display:block;height:auto;overflow:hidden;text-overflow:ellipsis}.modal .modal-content-wrapper .card-grid{display:flex;flex-direction:row;flex-wrap:wrap;gap:20px}.modal .modal-content-wrapper .card-grid-vertical{justify-content:stretch}.modal .modal-content-wrapper .card-grid-vertical tems-card-catalog{height:auto;width:354px}@media screen and (min-width:1100px){div.modal{height:80vh;width:80vw}}";
1275
- var Je = Object.defineProperty, Ze = Object.getOwnPropertyDescriptor, Kt = (e, t, s, i) => {
1276
- for (var r = i > 1 ? void 0 : i ? Ze(t, s) : t, o = e.length - 1, n; o >= 0; o--)
1277
- (n = e[o]) && (r = (i ? n(t, s, r) : n(r)) || r);
1278
- return i && r && Je(t, s, r), r;
1189
+ _e([
1190
+ g()
1191
+ ], q.prototype, "search", 2);
1192
+ _e([
1193
+ g()
1194
+ ], q.prototype, "_displayObjects", 2);
1195
+ q = _e([
1196
+ re("ds4go-fact-bundle-holder")
1197
+ ], q);
1198
+ const os = ".flex{display:flex}.flex.flex-row{flex-direction:row}.flex.flex-column{flex-direction:column}.flex.wrap{flex-wrap:wrap}.flex.flex-1{flex:1}.flex .half,.flex.half{flex-basis:50%}.flex.justify-content-center{justify-content:center}.flex.justify-content-space-between{justify-content:space-between}.flex.align-items-center{align-items:center}.flex.align-items-flex-start{align-items:flex-start}.flex .align-items-flex-end{align-items:flex-end}.full-width{width:100%}.modal{background-color:var(--color-surface-primary);border:var(--border-width-sm) solid var(--color-border-primary);border-radius:var(--border-radius-lg);color:var(--color-text-body);display:flex;flex-direction:column;font-family:var(--font-family-body);font-size:var(--typography-size-body-md);font-style:normal;font-weight:var(--font-weight-regular);gap:var(--scale-600);height:90vh;letter-spacing:var(--font-letter-spacing-default);line-height:var(--line-height-body-md);padding:var(--scale-600) var(--scale-900);width:90vw}.modal .topbar{display:flex;flex-direction:row;gap:var(--scale-400);width:100%}.modal .topbar tems-button:nth-child(2){margin-left:auto}.modal .modal-content-wrapper{display:flex;flex:1;flex-direction:column;overflow:hidden}.modal .modal-content-wrapper .modal-box{display:flex;flex:1;overflow-x:hidden;overflow-y:scroll}.modal .modal-content-wrapper .modal-content{display:flex;flex-direction:column;gap:var(--scale-400);height:fit-content;width:100%}.modal .modal-content-wrapper tems-division{width:fit-content}.modal .modal-content-wrapper tems-division div{display:block;height:auto;overflow:hidden;text-overflow:ellipsis}.modal .modal-content-wrapper .card-grid{display:flex;flex-direction:row;flex-wrap:wrap;gap:20px}.modal .modal-content-wrapper .card-grid-vertical{justify-content:stretch}.modal .modal-content-wrapper .card-grid-vertical tems-card-catalog{height:auto;width:354px}@media screen and (min-width:1100px){div.modal{height:fit-content;max-height:80vw;max-width:80vw;width:fit-content}}";
1199
+ var ns = Object.defineProperty, as = Object.getOwnPropertyDescriptor, Qe = (t, e, s, r) => {
1200
+ for (var i = r > 1 ? void 0 : r ? as(e, s) : e, o = t.length - 1, n; o >= 0; o--)
1201
+ (n = t[o]) && (i = (r ? n(e, s, i) : n(i)) || i);
1202
+ return r && i && ns(e, s, i), i;
1279
1203
  };
1280
- let K = class extends me {
1204
+ let Y = class extends wt {
1281
1205
  constructor() {
1282
1206
  super(...arguments), this.object = { "@id": "" };
1283
1207
  }
@@ -1285,12 +1209,12 @@ let K = class extends me {
1285
1209
  this.dispatchEvent(new CustomEvent("close"));
1286
1210
  }
1287
1211
  render() {
1288
- return $`<div class="modal">
1212
+ return p`<div class="modal">
1289
1213
  <div class="topbar">
1290
1214
  <tems-button
1291
1215
  @click=${this._closeModal}
1292
1216
  type="outline-gray"
1293
- .iconLeft=${$`<icon-material-symbols-close-rounded></icon-material-symbols-close-rounded>`}
1217
+ .iconLeft=${p`<icon-material-symbols-close-rounded></icon-material-symbols-close-rounded>`}
1294
1218
  ></tems-button>
1295
1219
  </div>
1296
1220
  <div class="modal-content-wrapper">
@@ -1303,37 +1227,37 @@ let K = class extends me {
1303
1227
  ><div>${String(this.object.description)}</div></tems-division
1304
1228
  >
1305
1229
  <tems-division type="h4"
1306
- ><div>${_("All facts in this bundle")}</div></tems-division
1230
+ ><div>${f("All facts in this bundle")}</div></tems-division
1307
1231
  >
1308
1232
  <div class="card-grid card-grid-vertical">
1309
- ${this.object.facts.map((e) => {
1310
- const t = e.categories.map((s) => ({
1233
+ ${this.object.facts.map((t) => {
1234
+ const e = t.categories.map((s) => ({
1311
1235
  name: s.name,
1312
1236
  type: "information"
1313
1237
  }));
1314
- if (t.length > 3) {
1315
- const s = t.length - 3;
1316
- t.splice(3, s), t.push({
1317
- name: `+${s} ${_("more")}`,
1238
+ if (e.length > 3) {
1239
+ const s = e.length - 3;
1240
+ e.splice(3, s), e.push({
1241
+ name: `+${s} ${f("more")}`,
1318
1242
  type: "information"
1319
1243
  });
1320
1244
  }
1321
- return $`<tems-card-catalog
1245
+ return p`<tems-card-catalog
1322
1246
  .object=${c}
1323
- .tags=${t}
1324
- .header=${e.name || c}
1325
- .content=${e.description || c}
1326
- date=${e.updated_at || c}
1247
+ .tags=${e}
1248
+ .header=${t.name || c}
1249
+ .content=${t.description || c}
1250
+ date=${t.updated_at || c}
1327
1251
  ></tems-card-catalog>`;
1328
1252
  })}
1329
1253
  </div>
1330
1254
  <tems-division type="body-sm"
1331
1255
  ><div>
1332
1256
  <div>
1333
- ${_("Bundle created on")} ${String(this.object.created_at)}
1257
+ ${f("Bundle created on")} ${String(this.object.created_at)}
1334
1258
  </div>
1335
1259
  <div>
1336
- ${_("Bundle updated on")} ${String(this.object.updated_at)}
1260
+ ${f("Bundle updated on")} ${String(this.object.updated_at)}
1337
1261
  </div>
1338
1262
  </div></tems-division
1339
1263
  >
@@ -1343,32 +1267,27 @@ let K = class extends me {
1343
1267
  </div>`;
1344
1268
  }
1345
1269
  };
1346
- K.styles = ht`
1347
- ${Dt(Xe)}
1270
+ Y.styles = ee`
1271
+ ${ge(os)}
1348
1272
  `;
1349
- Kt([
1350
- f({ attribute: !1, type: Object })
1351
- ], K.prototype, "object", 2);
1352
- K = Kt([
1353
- pt("ds4go-fact-bundle-modal"),
1354
- Ue()
1355
- ], K);
1356
- /**
1357
- * @license
1358
- * Copyright 2017 Google LLC
1359
- * SPDX-License-Identifier: BSD-3-Clause
1360
- */
1361
- const Qe = Symbol();
1273
+ Qe([
1274
+ m({ attribute: !1, type: Object })
1275
+ ], Y.prototype, "object", 2);
1276
+ Y = Qe([
1277
+ re("ds4go-fact-bundle-modal"),
1278
+ Wt()
1279
+ ], Y);
1280
+ const ls = /* @__PURE__ */ Symbol();
1362
1281
  class Ye {
1363
1282
  get taskComplete() {
1364
- return this.t || (this.i === 1 ? this.t = new Promise(((t, s) => {
1365
- this.o = t, this.h = s;
1283
+ return this.t || (this.i === 1 ? this.t = new Promise(((e, s) => {
1284
+ this.o = e, this.h = s;
1366
1285
  })) : this.i === 3 ? this.t = Promise.reject(this.l) : this.t = Promise.resolve(this.u)), this.t;
1367
1286
  }
1368
- constructor(t, s, i) {
1369
- this.p = 0, this.i = 0, (this._ = t).addController(this);
1370
- const r = typeof s == "object" ? s : { task: s, args: i };
1371
- this.v = r.task, this.j = r.args, this.m = r.argsEqual ?? ts, 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?.());
1287
+ constructor(e, s, r) {
1288
+ this.p = 0, this.i = 0, (this._ = e).addController(this);
1289
+ const i = typeof s == "object" ? s : { task: s, args: r };
1290
+ this.v = i.task, this.j = i.args, this.m = i.argsEqual ?? cs, 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?.());
1372
1291
  }
1373
1292
  hostUpdate() {
1374
1293
  this.autoRun === !0 && this.S();
@@ -1378,27 +1297,27 @@ class Ye {
1378
1297
  }
1379
1298
  T() {
1380
1299
  if (this.j === void 0) return;
1381
- const t = this.j();
1382
- if (!Array.isArray(t)) throw Error("The args function must return an array");
1383
- return t;
1300
+ const e = this.j();
1301
+ if (!Array.isArray(e)) throw Error("The args function must return an array");
1302
+ return e;
1384
1303
  }
1385
1304
  async S() {
1386
- const t = this.T(), s = this.O;
1387
- this.O = t, t === s || t === void 0 || s !== void 0 && this.m(s, t) || await this.run(t);
1305
+ const e = this.T(), s = this.O;
1306
+ this.O = e, e === s || e === void 0 || s !== void 0 && this.m(s, e) || await this.run(e);
1388
1307
  }
1389
- async run(t) {
1390
- let s, i;
1391
- 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();
1392
- const r = ++this.p;
1308
+ async run(e) {
1309
+ let s, r;
1310
+ e ??= this.T(), this.O = e, 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();
1311
+ const i = ++this.p;
1393
1312
  this.q = new AbortController();
1394
1313
  let o = !1;
1395
1314
  try {
1396
- s = await this.v(t, { signal: this.q.signal });
1315
+ s = await this.v(e, { signal: this.q.signal });
1397
1316
  } catch (n) {
1398
- o = !0, i = n;
1317
+ o = !0, r = n;
1399
1318
  }
1400
- if (this.p === r) {
1401
- if (s === Qe) this.i = 0;
1319
+ if (this.p === i) {
1320
+ if (s === ls) this.i = 0;
1402
1321
  else {
1403
1322
  if (o === !1) {
1404
1323
  try {
@@ -1408,18 +1327,18 @@ class Ye {
1408
1327
  this.i = 2, this.o?.(s);
1409
1328
  } else {
1410
1329
  try {
1411
- this.A?.(i);
1330
+ this.A?.(r);
1412
1331
  } catch {
1413
1332
  }
1414
- this.i = 3, this.h?.(i);
1333
+ this.i = 3, this.h?.(r);
1415
1334
  }
1416
- this.u = s, this.l = i;
1335
+ this.u = s, this.l = r;
1417
1336
  }
1418
1337
  this._.requestUpdate();
1419
1338
  }
1420
1339
  }
1421
- abort(t) {
1422
- this.i === 1 && this.q?.abort(t);
1340
+ abort(e) {
1341
+ this.i === 1 && this.q?.abort(e);
1423
1342
  }
1424
1343
  get value() {
1425
1344
  return this.u;
@@ -1430,46 +1349,362 @@ class Ye {
1430
1349
  get status() {
1431
1350
  return this.i;
1432
1351
  }
1433
- render(t) {
1352
+ render(e) {
1434
1353
  switch (this.i) {
1435
1354
  case 0:
1436
- return t.initial?.();
1355
+ return e.initial?.();
1437
1356
  case 1:
1438
- return t.pending?.();
1357
+ return e.pending?.();
1439
1358
  case 2:
1440
- return t.complete?.(this.value);
1359
+ return e.complete?.(this.value);
1441
1360
  case 3:
1442
- return t.error?.(this.error);
1361
+ return e.error?.(this.error);
1443
1362
  default:
1444
1363
  throw Error("Unexpected status: " + this.i);
1445
1364
  }
1446
1365
  }
1447
1366
  }
1448
- const ts = (e, t) => e === t || e.length === t.length && e.every(((s, i) => !X(s, t[i])));
1449
- var es = Object.defineProperty, ss = Object.getOwnPropertyDescriptor, Z = (e, t, s, i) => {
1450
- for (var r = i > 1 ? void 0 : i ? ss(t, s) : t, o = e.length - 1, n; o >= 0; o--)
1451
- (n = e[o]) && (r = (i ? n(t, s, r) : n(r)) || r);
1452
- return i && r && es(t, s, r), r;
1367
+ const cs = (t, e) => t === e || t.length === e.length && t.every(((s, r) => !se(s, e[r]))), ds = ".flex{display:flex}.flex.flex-row{flex-direction:row}.flex.flex-column{flex-direction:column}.flex.wrap{flex-wrap:wrap}.flex.flex-1{flex:1}.flex .half,.flex.half{flex-basis:50%}.flex.justify-content-center{justify-content:center}.flex.justify-content-space-between{justify-content:space-between}.flex.align-items-center{align-items:center}.flex.align-items-flex-start{align-items:flex-start}.flex .align-items-flex-end{align-items:flex-end}.full-width{width:100%}";
1368
+ var hs = Object.defineProperty, us = Object.getOwnPropertyDescriptor, A = (t, e, s, r) => {
1369
+ for (var i = r > 1 ? void 0 : r ? us(e, s) : e, o = t.length - 1, n; o >= 0; o--)
1370
+ (n = t[o]) && (i = (r ? n(e, s, i) : n(i)) || i);
1371
+ return r && i && hs(e, s, i), i;
1453
1372
  };
1454
- let O = class extends m {
1373
+ let y = class extends v {
1374
+ constructor() {
1375
+ super(...arguments), this.header = "DS4GO Fact Bundling Creation", this.selectedFacts = [], this.bundleName = "", this.bundleDescription = "", this.filterFactText = "", this.spliceLength = 0, this.cherryPickedProperties = [
1376
+ { key: "created_at", value: "created_at", cast: N },
1377
+ { key: "updated_at", value: "updated_at", cast: N },
1378
+ { key: "name", value: "name" },
1379
+ { key: "description", value: "description" },
1380
+ { key: "author", value: "author" },
1381
+ {
1382
+ key: "categories",
1383
+ value: "categories",
1384
+ expand: !0,
1385
+ cast: (e) => U(e, "name")
1386
+ }
1387
+ ], this._getResource = new Ye(this, {
1388
+ task: async ([e, s, r]) => {
1389
+ if (!(!e || !this.orbit || !this.noRouter && this.route && this.currentRoute && !this.route.startsWith(this.currentRoute))) {
1390
+ if (!this.hasCachedDatas || this.oldDataSrc !== e) {
1391
+ if (!e) return;
1392
+ this.facts = await this._getProxyValue(e), this.hasCachedDatas = !0;
1393
+ }
1394
+ return this.oldDataSrc !== e && (this.oldDataSrc = e), Array.isArray(this.facts) || (this.facts = []), s ? U(
1395
+ We(
1396
+ this.facts.filter(
1397
+ (i) => !r.includes(i)
1398
+ ),
1399
+ s
1400
+ ),
1401
+ "name",
1402
+ "asc"
1403
+ ) : (r.length === 0 && (this.spliceLength = Math.floor((window.innerWidth - 800) / 354) * Math.floor((window.innerHeight - 255) / 500)), U(
1404
+ this.facts.filter(
1405
+ (i) => !this.selectedFacts.includes(i)
1406
+ ),
1407
+ "name",
1408
+ "asc"
1409
+ ));
1410
+ }
1411
+ },
1412
+ args: () => [
1413
+ this.factsSrc,
1414
+ this.filterFactText,
1415
+ this.selectedFacts,
1416
+ this.caching,
1417
+ this.currentRoute
1418
+ ]
1419
+ });
1420
+ }
1421
+ _showMoreResults() {
1422
+ this.spliceLength += Math.floor((window.innerWidth - 800) / 354);
1423
+ }
1424
+ _showAllResults() {
1425
+ this.spliceLength = this.facts.length;
1426
+ }
1427
+ async _createFactBundle() {
1428
+ if (!this.bundleName || !(this.selectedFacts.length > 0))
1429
+ return;
1430
+ const e = {
1431
+ "@context": [
1432
+ "https://cdn.startinblox.com/owl/context.jsonld",
1433
+ "https://cdn.startinblox.com/owl/ds4go.jsonld"
1434
+ ],
1435
+ "@type": ["ldp:Container", "ds4go:FactBundle"],
1436
+ name: this.bundleName,
1437
+ description: this.bundleDescription,
1438
+ facts: this.selectedFacts.map((r) => r.id)
1439
+ }, s = await window.sibStore.post(
1440
+ e,
1441
+ this.dataSrc
1442
+ );
1443
+ document.dispatchEvent(
1444
+ new CustomEvent("save", {
1445
+ detail: { resource: { "@id": s } },
1446
+ bubbles: !0
1447
+ })
1448
+ ), document.dispatchEvent(
1449
+ new CustomEvent("save", {
1450
+ detail: { resource: { "@id": this.dataSrc } },
1451
+ bubbles: !0
1452
+ })
1453
+ );
1454
+ }
1455
+ _updateBundleName(e) {
1456
+ this.bundleName = e.detail.value;
1457
+ }
1458
+ _updateBundleDescription(e) {
1459
+ this.bundleDescription = e.detail.value;
1460
+ }
1461
+ _toggleFactSelection(e) {
1462
+ this.selectedFacts.includes(e) ? this.selectedFacts = this.selectedFacts.filter((s) => s !== e) : this.selectedFacts = [...this.selectedFacts, e];
1463
+ }
1464
+ _searchFacts(e) {
1465
+ this.filterFactText = e.detail;
1466
+ }
1467
+ render() {
1468
+ return this.gatekeeper() || this._getResource.render({
1469
+ pending: () => p`<solid-loader></solid-loader>`,
1470
+ error: (e) => (console.warn("[solid-fact-bundle-creation] Task error:", e), c),
1471
+ complete: (e) => {
1472
+ if (!e) return c;
1473
+ const s = e.slice(0, this.spliceLength), r = this.selectedFacts.length, i = !!this.bundleName && r > 0;
1474
+ return p`<tems-viewport>
1475
+ <tems-header slot="header" heading=${this.header}>
1476
+ <div slot="cta">
1477
+ <tems-button
1478
+ type="primary"
1479
+ disabled=${!i || c}
1480
+ label=${f("Create bundle")}
1481
+ @click=${this._createFactBundle}
1482
+ ></tems-button>
1483
+ </div>
1484
+ </tems-header>
1485
+ <div slot="content">
1486
+ <section class="flex flex-1">
1487
+ <div>
1488
+ <div>
1489
+ <tems-input
1490
+ type="text"
1491
+ label=${f("Bundle name")}
1492
+ placeholder=${f("Bundle name")}
1493
+ required=""
1494
+ .value=${this.bundleName}
1495
+ @change=${this._updateBundleName}
1496
+ ></tems-input>
1497
+ </div>
1498
+ <div>
1499
+ <tems-textarea
1500
+ rows="4"
1501
+ label=${f("Bundle description")}
1502
+ placeholder=${f("Bundle description")}
1503
+ .value=${this.bundleDescription}
1504
+ @change=${this._updateBundleDescription}
1505
+ ></tems-textarea>
1506
+ </div>
1507
+ ${r > 0 ? p`<tems-division type="h4">
1508
+ <div>
1509
+ ${f(
1510
+ J`${r} selected fact${r > 1 ? "s" : ""}`
1511
+ )}
1512
+ </div></tems-division
1513
+ >
1514
+ <div class="card-grid card-grid-vertical">
1515
+ ${this.selectedFacts.map((o) => {
1516
+ const n = o.categories.map((a) => ({
1517
+ name: a.name,
1518
+ type: "information"
1519
+ }));
1520
+ if (n.length > 3) {
1521
+ const a = n.length - 3;
1522
+ n.splice(3, a), n.push({
1523
+ name: `+${a} ${f("more")}`,
1524
+ type: "information"
1525
+ });
1526
+ }
1527
+ return p`<tems-card-catalog
1528
+ .object=${c}
1529
+ .header=${o.name || c}
1530
+ date=${o.updated_at || c}
1531
+ @click=${this._toggleFactSelection.bind(
1532
+ this,
1533
+ o
1534
+ )}
1535
+ selected=${!0}
1536
+ ></tems-card-catalog>`;
1537
+ })}
1538
+ </div>` : c}
1539
+ </div>
1540
+ ̂${s.length > 0 ? p`<div>
1541
+ <div>
1542
+ <tems-search-bar
1543
+ .displayFilters=${!1}
1544
+ .displaySavedSearch=${!1}
1545
+ .displayViews=${!1}
1546
+ .dropdownCardElement=${!1}
1547
+ .dropdownListElement=${!1}
1548
+ .dropdownTableElement=${!1}
1549
+ .dropdownMapElement=${!1}
1550
+ .displayActiveTags=${!1}
1551
+ .value=${this.filterFactText}
1552
+ @search=${this._searchFacts}
1553
+ ></tems-search-bar>
1554
+ </div>
1555
+ <div class="card-grid card-grid-vertical">
1556
+ ${s.map((o) => {
1557
+ const n = o.categories.map((a) => ({
1558
+ name: a.name,
1559
+ type: "information"
1560
+ }));
1561
+ if (n.length > 3) {
1562
+ const a = n.length - 3;
1563
+ n.splice(3, a), n.push({
1564
+ name: `+${a} ${f("more")}`,
1565
+ type: "information"
1566
+ });
1567
+ }
1568
+ return p`<tems-card-catalog
1569
+ .object=${c}
1570
+ .tags=${n}
1571
+ .header=${o.name || c}
1572
+ .content=${o.description || c}
1573
+ date=${o.updated_at || c}
1574
+ @click=${this._toggleFactSelection.bind(this, o)}
1575
+ ></tems-card-catalog>`;
1576
+ })}
1577
+ </div>
1578
+ ${s.length < e.length ? p`<div
1579
+ class="flex flex-row justify-content-space-between align-items-flex-end"
1580
+ >
1581
+ <div>
1582
+ ${f(
1583
+ J`Displaying ${s.length} of ${e.length} result${e.length > 1 ? "s" : ""}`
1584
+ )}
1585
+ </div>
1586
+ <div class="flex flex-row gap-400">
1587
+ <tems-button
1588
+ @click=${this._showMoreResults}
1589
+ type="primary"
1590
+ size="sm"
1591
+ label=${f("Show more results")}
1592
+ ></tems-button>
1593
+ <tems-button
1594
+ @click=${this._showAllResults}
1595
+ type="primary"
1596
+ size="sm"
1597
+ label=${f("Show all results")}
1598
+ ></tems-button>
1599
+ </div>
1600
+ </div>` : c}
1601
+ </div>` : c}
1602
+ </section>
1603
+ </div>
1604
+ </tems-viewport>`;
1605
+ }
1606
+ });
1607
+ }
1608
+ };
1609
+ y.styles = [
1610
+ ge(ds),
1611
+ ee`
1612
+ [slot="content"] {
1613
+ height: 100%;
1614
+ }
1615
+ section {
1616
+ gap: var(--scale-400);
1617
+ padding: var(--scale-900) 0;
1618
+ height: calc(100% - var(--scale-900) * 2);
1619
+ }
1620
+ section > div {
1621
+ height: 100%;
1622
+ display: flex;
1623
+ flex-direction: column;
1624
+ gap: var(--scale-400);
1625
+ flex: 1;
1626
+ }
1627
+ section > div:first-child {
1628
+ max-width: 400px;
1629
+ }
1630
+ .card-grid {
1631
+ flex: 1;
1632
+ overflow-y: scroll;
1633
+ display: flex;
1634
+ flex-direction: row;
1635
+ flex-wrap: wrap;
1636
+ gap: 20px;
1637
+ align-content: flex-start;
1638
+ }
1639
+ .card-grid-vertical {
1640
+ justify-content: stretch;
1641
+ }
1642
+ .card-grid-vertical tems-card-catalog {
1643
+ width: 354px;
1644
+ height: fit-content;
1645
+ }
1646
+ tems-card-catalog {
1647
+ cursor: pointer;
1648
+ }
1649
+ tems-card-catalog[selected] {
1650
+ --color-border-primary: var(--color-surface-action-solid);
1651
+ }
1652
+ tems-search-bar {
1653
+ --scale-900: 0;
1654
+ }
1655
+ .gap-400 {
1656
+ gap: var(--scale-400);
1657
+ }
1658
+ `
1659
+ ];
1660
+ A([
1661
+ m({ attribute: "header", type: String })
1662
+ ], y.prototype, "header", 2);
1663
+ A([
1664
+ m({ attribute: "facts-src", reflect: !0 })
1665
+ ], y.prototype, "factsSrc", 2);
1666
+ A([
1667
+ g()
1668
+ ], y.prototype, "selectedFacts", 2);
1669
+ A([
1670
+ g()
1671
+ ], y.prototype, "bundleName", 2);
1672
+ A([
1673
+ g()
1674
+ ], y.prototype, "bundleDescription", 2);
1675
+ A([
1676
+ g()
1677
+ ], y.prototype, "filterFactText", 2);
1678
+ A([
1679
+ g()
1680
+ ], y.prototype, "spliceLength", 2);
1681
+ y = A([
1682
+ re("solid-fact-bundle-creation")
1683
+ ], y);
1684
+ var fs = Object.defineProperty, ps = Object.getOwnPropertyDescriptor, I = (t, e, s, r) => {
1685
+ for (var i = r > 1 ? void 0 : r ? ps(e, s) : e, o = t.length - 1, n; o >= 0; o--)
1686
+ (n = t[o]) && (i = (r ? n(e, s, i) : n(i)) || i);
1687
+ return r && i && fs(e, s, i), i;
1688
+ };
1689
+ let j = class extends v {
1455
1690
  constructor() {
1456
1691
  super(...arguments), this.header = "DS4GO Fact Bundling", this.search = [], this.resultCount = this.objects?.length || 0, this.cherryPickedProperties = [
1457
- { key: "created_at", value: "created_at", cast: Y },
1458
- { key: "updated_at", value: "updated_at", cast: Y },
1692
+ { key: "created_at", value: "created_at", cast: N },
1693
+ { key: "updated_at", value: "updated_at", cast: N },
1459
1694
  { key: "name", value: "name" },
1460
1695
  { key: "description", value: "description" }
1461
1696
  ], this._getResource = new Ye(this, {
1462
- task: async ([e, t]) => {
1463
- if (!(!e && !t || !this.orbit || !this.noRouter && this.route && this.currentRoute && !this.route.startsWith(this.currentRoute))) {
1697
+ task: async ([t, e]) => {
1698
+ if (!(!t && !e || !this.orbit || !this.noRouter && this.route && this.currentRoute && !this.route.startsWith(this.currentRoute))) {
1464
1699
  if (this.menuComponent.ready || await new Promise((s) => {
1465
1700
  this.menuComponent.addEventListener("user-ready", () => {
1466
1701
  s(!0);
1467
1702
  });
1468
- }), this.displayFiltering = !this.component.parameters.disableFiltering, !this.hasCachedDatas || this.oldDataSrc !== e) {
1469
- if (!e) return;
1470
- this.objects = await this._getProxyValue(e), this.hasCachedDatas = !0;
1703
+ }), this.displayFiltering = !this.component.parameters.disableFiltering, !this.hasCachedDatas || this.oldDataSrc !== t) {
1704
+ if (!t) return;
1705
+ this.objects = await this._getProxyValue(t), this.hasCachedDatas = !0;
1471
1706
  }
1472
- return this.oldDataSrc !== e && (this.oldDataSrc = e), Array.isArray(this.objects) || (this.objects = []), this.object = this.objects.find((s) => s["@id"] === t), jt(this.objects, "name", "asc");
1707
+ return this.oldDataSrc !== t && (this.oldDataSrc = t), Array.isArray(this.objects) || (this.objects = []), this.object = this.objects.find((s) => s["@id"] === e), U(this.objects, "name", "asc");
1473
1708
  }
1474
1709
  },
1475
1710
  args: () => [
@@ -1480,18 +1715,18 @@ let O = class extends m {
1480
1715
  ]
1481
1716
  });
1482
1717
  }
1483
- async _responseAdaptator(e) {
1484
- return e?._originalResource?.hasType("ds4go:FactBundle") && (e.facts = await Promise.all(
1485
- (await e._originalResource["ldp:contains"]).map(
1486
- (t) => this._getProxyValue(t["@id"], !1, [
1487
- { key: "updated_at", value: "updated_at", cast: Y },
1718
+ async _responseAdaptator(t) {
1719
+ return t?._originalResource?.hasType("ds4go:FactBundle") && (t.facts = await Promise.all(
1720
+ (await t._originalResource["ldp:contains"]).map(
1721
+ (e) => this._getProxyValue(e["@id"], !1, [
1722
+ { key: "updated_at", value: "updated_at", cast: N },
1488
1723
  { key: "name", value: "name" },
1489
1724
  { key: "description", value: "description" },
1490
1725
  {
1491
1726
  key: "categories",
1492
1727
  value: "categories",
1493
1728
  expand: !0,
1494
- cast: (s) => jt(s, "name")
1729
+ cast: (s) => U(s, "name")
1495
1730
  },
1496
1731
  { key: "author", value: "author" },
1497
1732
  { key: "link", value: "link" },
@@ -1506,49 +1741,56 @@ let O = class extends m {
1506
1741
  // { key: "review", value: "review" },
1507
1742
  ])
1508
1743
  )
1509
- ), console.log(e.facts)), Promise.resolve(e);
1744
+ )), Promise.resolve(t);
1510
1745
  }
1511
1746
  async _afterAttach() {
1512
1747
  return this.menuComponent = document.querySelector(
1513
1748
  `[uniq="${this.orbit?.getComponent("menu")?.uniq}"]`
1749
+ ), this.bundleCreationComponent = this.orbit?.getComponent(
1750
+ "fact-bundle-creation"
1514
1751
  ), Promise.resolve();
1515
1752
  }
1516
- _search(e) {
1517
- e.preventDefault(), this.search = e.detail, this.filterCount = this.search.filter((t) => t.name !== "search").length;
1753
+ _search(t) {
1754
+ t.preventDefault(), this.search = t.detail, this.filterCount = this.search.filter((e) => e.name !== "search").length;
1518
1755
  }
1519
- _openModal(e) {
1520
- if (e.preventDefault(), this.route)
1756
+ _openModal(t) {
1757
+ if (t.preventDefault(), this.route)
1521
1758
  if ("use-id" in (this.component.routeAttributes || {}))
1522
- k(this.route, e.detail["@id"]);
1759
+ O(this.route, t.detail["@id"]);
1523
1760
  else {
1524
- const t = e.detail["@type"]?.at(-1) ?? e.detail["@type"];
1525
- if (t) {
1761
+ const e = t.detail["@type"]?.at(-1) ?? t.detail["@type"];
1762
+ if (e) {
1526
1763
  const s = window.orbit?.components?.filter(
1527
- (i) => i?.routeAttributes?.["rdf-type"] === t
1764
+ (r) => r?.routeAttributes?.["rdf-type"] === e
1528
1765
  );
1529
- s?.[0]?.route && k(s[0]?.route, e.detail["@id"]);
1766
+ s?.[0]?.route && O(s[0]?.route, t.detail["@id"]);
1530
1767
  }
1531
1768
  }
1532
1769
  }
1533
- _closeModal(e) {
1534
- e.preventDefault(), this.route && k(this.route, this.defaultDataSrc);
1770
+ _closeModal(t) {
1771
+ t.preventDefault(), this.route && O(this.route, this.defaultDataSrc);
1535
1772
  }
1536
- _closeModalFromBackground(e) {
1537
- e.preventDefault(), this.route && e.target?.classList.contains("modal") && k(this.route, this.defaultDataSrc);
1773
+ _closeModalFromBackground(t) {
1774
+ t.preventDefault(), this.route && t.target?.classList.contains("modal") && O(this.route, this.defaultDataSrc);
1538
1775
  }
1539
- _resultCountUpdate(e) {
1540
- this.resultCount = e.detail ?? 0;
1776
+ _resultCountUpdate(t) {
1777
+ this.resultCount = t.detail ?? 0;
1778
+ }
1779
+ _goToBundleCreation(t) {
1780
+ t.preventDefault(), this.bundleCreationComponent?.route && O(this.bundleCreationComponent.route);
1541
1781
  }
1542
1782
  render() {
1543
1783
  return this.gatekeeper() || this._getResource.render({
1544
- pending: () => $`<solid-loader></solid-loader>`,
1545
- error: (e) => (console.warn("[solid-fact-bundle] Task error:", e), c),
1546
- complete: (e) => $`<tems-viewport>
1784
+ pending: () => p`<solid-loader></solid-loader>`,
1785
+ error: (t) => (console.warn("[solid-fact-bundle] Task error:", t), c),
1786
+ complete: (t) => p`<tems-viewport>
1547
1787
  <tems-header slot="header" heading=${this.header}>
1548
1788
  <div slot="cta">
1549
1789
  <tems-button
1550
1790
  type="primary"
1551
- label=${_("Create a bundle")}
1791
+ disabled=${!this.bundleCreationComponent?.route || c}
1792
+ label=${f("Create a bundle")}
1793
+ @click=${this._goToBundleCreation}
1552
1794
  ></tems-button>
1553
1795
  </div>
1554
1796
  </tems-header>
@@ -1557,17 +1799,17 @@ let O = class extends m {
1557
1799
  .displayFiltering=${this.displayFiltering}
1558
1800
  @search=${this._search}
1559
1801
  .search=${this.search}
1560
- .objects=${e}
1802
+ .objects=${t}
1561
1803
  .resultCount=${this.resultCount}
1562
1804
  .filterCount=${this.filterCount}
1563
1805
  ></tems-catalog-filter-holder>
1564
1806
  <ds4go-fact-bundle-holder
1565
- .objects=${e}
1807
+ .objects=${t}
1566
1808
  .search=${this.search}
1567
1809
  @clicked=${this._openModal}
1568
1810
  @result-count=${this._resultCountUpdate}
1569
1811
  ></ds4go-fact-bundle-holder>
1570
- ${this.object ? $`<div
1812
+ ${this.object ? p`<div
1571
1813
  class="modal"
1572
1814
  @click=${this._closeModalFromBackground}
1573
1815
  >
@@ -1581,7 +1823,7 @@ let O = class extends m {
1581
1823
  });
1582
1824
  }
1583
1825
  };
1584
- O.styles = ht`
1826
+ j.styles = ee`
1585
1827
  .modal {
1586
1828
  position: fixed;
1587
1829
  top: 0;
@@ -1595,40 +1837,50 @@ O.styles = ht`
1595
1837
  align-items: center;
1596
1838
  }
1597
1839
  `;
1598
- Z([
1599
- f({ attribute: "header", type: String })
1600
- ], O.prototype, "header", 2);
1601
- Z([
1602
- R()
1603
- ], O.prototype, "search", 2);
1604
- Z([
1605
- R()
1606
- ], O.prototype, "resultCount", 2);
1607
- O = Z([
1608
- pt("solid-fact-bundle")
1609
- ], O);
1610
- const rs = {
1840
+ I([
1841
+ m({ attribute: "header", type: String })
1842
+ ], j.prototype, "header", 2);
1843
+ I([
1844
+ g()
1845
+ ], j.prototype, "search", 2);
1846
+ I([
1847
+ g()
1848
+ ], j.prototype, "resultCount", 2);
1849
+ I([
1850
+ g()
1851
+ ], j.prototype, "bundleCreationComponent", 2);
1852
+ j = I([
1853
+ re("solid-fact-bundle")
1854
+ ], j);
1855
+ const ms = {
1856
+ seb1a452f2df70baf: "Create bundle",
1857
+ sed5b6ae54e00125c: "Bundle name",
1858
+ s11099da36cbc3173: "Bundle description",
1859
+ sac1b0231875ff056: J`${0} selected fact${1}`,
1860
+ s0d1be7a2c400c080: "more",
1861
+ s8272d3578b7c78d5: J`Displaying ${0} of ${1} result${2}`,
1862
+ sa40e7f4f2a43e2f7: "Show more results",
1863
+ sacf246e0fa11730d: "Show all results",
1611
1864
  sf5509a9f253b9836: "Create a bundle",
1612
1865
  sefa717c1620c4ae4: "facts",
1613
1866
  sef234a791696afff: "fact",
1614
1867
  s4979bd417e7c8052: "All facts in this bundle",
1615
- s0d1be7a2c400c080: "more",
1616
1868
  s57a40de45f324b96: "Bundle created on",
1617
1869
  sd3682395cf86f913: "Bundle updated on"
1618
- }, is = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1870
+ }, gs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1619
1871
  __proto__: null,
1620
- templates: rs
1621
- }, Symbol.toStringTag, { value: "Module" })), os = "en", Gt = [
1872
+ templates: ms
1873
+ }, Symbol.toStringTag, { value: "Module" })), ys = "en", et = [
1622
1874
  "en"
1623
- ], ns = /* @__PURE__ */ Object.assign({ "../../generated/locales/en.ts": is }), as = new Map(
1624
- Gt.map((e) => [
1625
- e,
1626
- ns[`../../generated/locales/${e}.ts`]
1875
+ ], vs = /* @__PURE__ */ Object.assign({ "../../generated/locales/en.ts": gs }), $s = new Map(
1876
+ et.map((t) => [
1877
+ t,
1878
+ vs[`../../generated/locales/${t}.ts`]
1627
1879
  ])
1628
- ), { getLocale: Mt, setLocale: Lt } = Fe({
1629
- sourceLocale: os,
1630
- targetLocales: Gt,
1631
- loadLocale: async (e) => as.get(e)
1880
+ ), { getLocale: Fe, setLocale: Be } = es({
1881
+ sourceLocale: ys,
1882
+ targetLocales: et,
1883
+ loadLocale: async (t) => $s.get(t)
1632
1884
  });
1633
- window.getLocale = window.getLocale ? window.getLocale.push(Mt) : [Mt];
1634
- window.setLocale = window.setLocale ? window.setLocale.push(Lt) : [Lt];
1885
+ window.getLocale = window.getLocale ? window.getLocale.push(Fe) : [Fe];
1886
+ window.setLocale = window.setLocale ? window.setLocale.push(Be) : [Be];