@startinblox/components-ds4go 2.0.0 → 2.1.1

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