@startinblox/components-ds4go 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,200 +1,201 @@
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;
1
+ import { StoreType as ue, StoreService as pe } from "https://cdn.jsdelivr.net/npm/@startinblox/core@beta/+esm";
2
+ const it = globalThis, Ct = it.ShadowRoot && (it.ShadyCSS === void 0 || it.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, xt = /* @__PURE__ */ Symbol(), Ot = /* @__PURE__ */ new WeakMap();
3
+ let Qt = class {
4
+ constructor(t, r, i) {
5
+ if (this._$cssResult$ = !0, i !== xt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
6
+ this.cssText = t, this.t = r;
6
7
  }
7
8
  get styleSheet() {
8
- let e = this.o;
9
- const s = this.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));
9
+ let t = this.o;
10
+ const r = this.t;
11
+ if (Ct && t === void 0) {
12
+ const i = r !== void 0 && r.length === 1;
13
+ i && (t = Ot.get(r)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Ot.set(r, t));
13
14
  }
14
- return e;
15
+ return t;
15
16
  }
16
17
  toString() {
17
18
  return this.cssText;
18
19
  }
19
20
  };
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) => {
21
+ const St = (e) => new Qt(typeof e == "string" ? e : e + "", void 0, xt), Y = (e, ...t) => {
22
+ const r = e.length === 1 ? e[0] : t.reduce((i, s, o) => i + ((n) => {
22
23
  if (n._$cssResult$ === !0) return n.cssText;
23
24
  if (typeof n == "number") return n;
24
25
  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
- })(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
- let s = "";
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) {
26
+ })(s) + e[o + 1], e[0]);
27
+ return new Qt(r, e, xt);
28
+ }, fe = (e, t) => {
29
+ if (Ct) e.adoptedStyleSheets = t.map((r) => r instanceof CSSStyleSheet ? r : r.styleSheet);
30
+ else for (const r of t) {
31
+ const i = document.createElement("style"), s = it.litNonce;
32
+ s !== void 0 && i.setAttribute("nonce", s), i.textContent = r.cssText, e.appendChild(i);
33
+ }
34
+ }, kt = Ct ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
35
+ let r = "";
36
+ for (const i of t.cssRules) r += i.cssText;
37
+ return St(r);
38
+ })(e) : e;
39
+ const { is: me, defineProperty: ge, getOwnPropertyDescriptor: ye, getOwnPropertyNames: ve, getOwnPropertySymbols: be, getPrototypeOf: $e } = Object, dt = globalThis, Dt = dt.trustedTypes, _e = Dt ? Dt.emptyScript : "", we = dt.reactiveElementPolyfillSupport, K = (e, t) => e, ot = { toAttribute(e, t) {
40
+ switch (t) {
40
41
  case Boolean:
41
- t = t ? lt : null;
42
+ e = e ? _e : null;
42
43
  break;
43
44
  case Object:
44
45
  case Array:
45
- t = t == null ? t : JSON.stringify(t);
46
+ e = e == null ? e : JSON.stringify(e);
46
47
  }
47
- return t;
48
- }, fromAttribute(t, e) {
49
- let s = t;
50
- switch (e) {
48
+ return e;
49
+ }, fromAttribute(e, t) {
50
+ let r = e;
51
+ switch (t) {
51
52
  case Boolean:
52
- s = t !== null;
53
+ r = e !== null;
53
54
  break;
54
55
  case Number:
55
- s = t === null ? null : Number(t);
56
+ r = e === null ? null : Number(e);
56
57
  break;
57
58
  case Object:
58
59
  case Array:
59
60
  try {
60
- s = JSON.parse(t);
61
+ r = JSON.parse(e);
61
62
  } catch {
62
- s = null;
63
+ r = null;
63
64
  }
64
65
  }
65
- return s;
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);
66
+ return r;
67
+ } }, ht = (e, t) => !me(e, t), Lt = { attribute: !0, type: String, converter: ot, reflect: !1, useDefault: !1, hasChanged: ht };
68
+ Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), dt.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
69
+ let T = class extends HTMLElement {
70
+ static addInitializer(t) {
71
+ this._$Ei(), (this.l ??= []).push(t);
71
72
  }
72
73
  static get observedAttributes() {
73
74
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
74
75
  }
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);
76
+ static createProperty(t, r = Lt) {
77
+ if (r.state && (r.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((r = Object.create(r)).wrapped = !0), this.elementProperties.set(t, r), !r.noAccessor) {
78
+ const i = /* @__PURE__ */ Symbol(), s = this.getPropertyDescriptor(t, i, r);
79
+ s !== void 0 && ge(this.prototype, t, s);
79
80
  }
80
81
  }
81
- static getPropertyDescriptor(e, s, r) {
82
- const { get: i, set: o } = rt(this.prototype, e) ?? { get() {
83
- return this[s];
82
+ static getPropertyDescriptor(t, r, i) {
83
+ const { get: s, set: o } = ye(this.prototype, t) ?? { get() {
84
+ return this[r];
84
85
  }, set(n) {
85
- this[s] = n;
86
+ this[r] = n;
86
87
  } };
87
- return { get: i, set(n) {
88
- const a = i?.call(this);
89
- o?.call(this, n), this.requestUpdate(e, a, r);
88
+ return { get: s, set(n) {
89
+ const a = s?.call(this);
90
+ o?.call(this, n), this.requestUpdate(t, a, i);
90
91
  }, configurable: !0, enumerable: !0 };
91
92
  }
92
- static getPropertyOptions(e) {
93
- return this.elementProperties.get(e) ?? Se;
93
+ static getPropertyOptions(t) {
94
+ return this.elementProperties.get(t) ?? Lt;
94
95
  }
95
96
  static _$Ei() {
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);
97
+ if (this.hasOwnProperty(K("elementProperties"))) return;
98
+ const t = $e(this);
99
+ t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
99
100
  }
100
101
  static finalize() {
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]);
102
+ if (this.hasOwnProperty(K("finalized"))) return;
103
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(K("properties"))) {
104
+ const r = this.properties, i = [...ve(r), ...be(r)];
105
+ for (const s of i) this.createProperty(s, r[s]);
105
106
  }
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);
107
+ const t = this[Symbol.metadata];
108
+ if (t !== null) {
109
+ const r = litPropertyMetadata.get(t);
110
+ if (r !== void 0) for (const [i, s] of r) this.elementProperties.set(i, s);
110
111
  }
111
112
  this._$Eh = /* @__PURE__ */ new Map();
112
- for (const [s, r] of this.elementProperties) {
113
- const i = this._$Eu(s, r);
114
- i !== void 0 && this._$Eh.set(i, s);
113
+ for (const [r, i] of this.elementProperties) {
114
+ const s = this._$Eu(r, i);
115
+ s !== void 0 && this._$Eh.set(s, r);
115
116
  }
116
117
  this.elementStyles = this.finalizeStyles(this.styles);
117
118
  }
118
- static finalizeStyles(e) {
119
- const s = [];
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
- return s;
119
+ static finalizeStyles(t) {
120
+ const r = [];
121
+ if (Array.isArray(t)) {
122
+ const i = new Set(t.flat(1 / 0).reverse());
123
+ for (const s of i) r.unshift(kt(s));
124
+ } else t !== void 0 && r.push(kt(t));
125
+ return r;
125
126
  }
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;
127
+ static _$Eu(t, r) {
128
+ const i = r.attribute;
129
+ return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
129
130
  }
130
131
  constructor() {
131
132
  super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
132
133
  }
133
134
  _$Ev() {
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
+ this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t) => t(this));
135
136
  }
136
- addController(e) {
137
- (this._$EO ??= /* @__PURE__ */ new Set()).add(e), this.renderRoot !== void 0 && this.isConnected && e.hostConnected?.();
137
+ addController(t) {
138
+ (this._$EO ??= /* @__PURE__ */ new Set()).add(t), this.renderRoot !== void 0 && this.isConnected && t.hostConnected?.();
138
139
  }
139
- removeController(e) {
140
- this._$EO?.delete(e);
140
+ removeController(t) {
141
+ this._$EO?.delete(t);
141
142
  }
142
143
  _$E_() {
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);
144
+ const t = /* @__PURE__ */ new Map(), r = this.constructor.elementProperties;
145
+ for (const i of r.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
146
+ t.size > 0 && (this._$Ep = t);
146
147
  }
147
148
  createRenderRoot() {
148
- const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
149
- return tt(e, this.constructor.elementStyles), e;
149
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
150
+ return fe(t, this.constructor.elementStyles), t;
150
151
  }
151
152
  connectedCallback() {
152
- this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((e) => e.hostConnected?.());
153
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((t) => t.hostConnected?.());
153
154
  }
154
- enableUpdating(e) {
155
+ enableUpdating(t) {
155
156
  }
156
157
  disconnectedCallback() {
157
- this._$EO?.forEach((e) => e.hostDisconnected?.());
158
+ this._$EO?.forEach((t) => t.hostDisconnected?.());
158
159
  }
159
- attributeChangedCallback(e, s, r) {
160
- this._$AK(e, r);
160
+ attributeChangedCallback(t, r, i) {
161
+ this._$AK(t, i);
161
162
  }
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;
163
+ _$ET(t, r) {
164
+ const i = this.constructor.elementProperties.get(t), s = this.constructor._$Eu(t, i);
165
+ if (s !== void 0 && i.reflect === !0) {
166
+ const o = (i.converter?.toAttribute !== void 0 ? i.converter : ot).toAttribute(r, i.type);
167
+ this._$Em = t, o == null ? this.removeAttribute(s) : this.setAttribute(s, o), this._$Em = null;
167
168
  }
168
169
  }
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
- const a = n.fromAttribute(s, o.type);
175
- this[i] = a ?? this._$Ej?.get(i) ?? a, this._$Em = null;
170
+ _$AK(t, r) {
171
+ const i = this.constructor, s = i._$Eh.get(t);
172
+ if (s !== void 0 && this._$Em !== s) {
173
+ const o = i.getPropertyOptions(s), n = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : ot;
174
+ this._$Em = s;
175
+ const a = n.fromAttribute(r, o.type);
176
+ this[s] = a ?? this._$Ej?.get(s) ?? a, this._$Em = null;
176
177
  }
177
178
  }
178
- requestUpdate(e, s, r, i = !1, o) {
179
- if (e !== void 0) {
179
+ requestUpdate(t, r, i, s = !1, o) {
180
+ if (t !== void 0) {
180
181
  const n = this.constructor;
181
- if (i === !1 && (o = this[e]), r ??= n.getPropertyOptions(e), !((r.hasChanged ?? se)(o, s) || r.useDefault && r.reflect && o === this._$Ej?.get(e) && !this.hasAttribute(n._$Eu(e, r)))) return;
182
- this.C(e, s, r);
182
+ if (s === !1 && (o = this[t]), i ??= n.getPropertyOptions(t), !((i.hasChanged ?? ht)(o, r) || i.useDefault && i.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(n._$Eu(t, i)))) return;
183
+ this.C(t, r, i);
183
184
  }
184
185
  this.isUpdatePending === !1 && (this._$ES = this._$EP());
185
186
  }
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));
187
+ C(t, r, { useDefault: i, reflect: s, wrapped: o }, n) {
188
+ i && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, n ?? r ?? this[t]), o !== !0 || n !== void 0) || (this._$AL.has(t) || (this.hasUpdated || i || (r = void 0), this._$AL.set(t, r)), s === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
188
189
  }
189
190
  async _$EP() {
190
191
  this.isUpdatePending = !0;
191
192
  try {
192
193
  await this._$ES;
193
- } catch (s) {
194
- Promise.reject(s);
194
+ } catch (r) {
195
+ Promise.reject(r);
195
196
  }
196
- const e = this.scheduleUpdate();
197
- return e != null && await e, !this.isUpdatePending;
197
+ const t = this.scheduleUpdate();
198
+ return t != null && await t, !this.isUpdatePending;
198
199
  }
199
200
  scheduleUpdate() {
200
201
  return this.performUpdate();
@@ -203,28 +204,28 @@ let R = class extends HTMLElement {
203
204
  if (!this.isUpdatePending) return;
204
205
  if (!this.hasUpdated) {
205
206
  if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
206
- for (const [i, o] of this._$Ep) this[i] = o;
207
+ for (const [s, o] of this._$Ep) this[s] = o;
207
208
  this._$Ep = void 0;
208
209
  }
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);
210
+ const i = this.constructor.elementProperties;
211
+ if (i.size > 0) for (const [s, o] of i) {
212
+ const { wrapped: n } = o, a = this[s];
213
+ n !== !0 || this._$AL.has(s) || a === void 0 || this.C(s, void 0, o, a);
213
214
  }
214
215
  }
215
- let e = !1;
216
- const s = this._$AL;
216
+ let t = !1;
217
+ const r = this._$AL;
217
218
  try {
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;
219
+ t = this.shouldUpdate(r), t ? (this.willUpdate(r), this._$EO?.forEach((i) => i.hostUpdate?.()), this.update(r)) : this._$EM();
220
+ } catch (i) {
221
+ throw t = !1, this._$EM(), i;
221
222
  }
222
- e && this._$AE(s);
223
+ t && this._$AE(r);
223
224
  }
224
- willUpdate(e) {
225
+ willUpdate(t) {
225
226
  }
226
- _$AE(e) {
227
- this._$EO?.forEach((s) => s.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
227
+ _$AE(t) {
228
+ this._$EO?.forEach((r) => r.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
228
229
  }
229
230
  _$EM() {
230
231
  this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
@@ -235,83 +236,83 @@ let R = class extends HTMLElement {
235
236
  getUpdateComplete() {
236
237
  return this._$ES;
237
238
  }
238
- shouldUpdate(e) {
239
+ shouldUpdate(t) {
239
240
  return !0;
240
241
  }
241
- update(e) {
242
- this._$Eq &&= this._$Eq.forEach((s) => this._$ET(s, this[s])), this._$EM();
242
+ update(t) {
243
+ this._$Eq &&= this._$Eq.forEach((r) => this._$ET(r, this[r])), this._$EM();
243
244
  }
244
- updated(e) {
245
+ updated(t) {
245
246
  }
246
- firstUpdated(e) {
247
+ firstUpdated(t) {
247
248
  }
248
249
  };
249
- R.elementStyles = [], R.shadowRootOptions = { mode: "open" }, R[L("elementProperties")] = /* @__PURE__ */ new Map(), R[L("finalized")] = /* @__PURE__ */ new Map(), ct?.({ ReactiveElement: R }), (te.reactiveElementVersions ??= []).push("2.1.2");
250
- const ye = globalThis, Ce = (t) => t, Z = ye.trustedTypes, Ee = Z ? Z.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, qe = "$lit$", w = `lit$${Math.random().toFixed(9).slice(2)}$`, ze = "?" + w, dt = `<${ze}>`, P = document, F = () => P.createComment(""), B = (t) => t === null || typeof t != "object" && typeof t != "function", ve = Array.isArray, ht = (t) => ve(t) || typeof t?.[Symbol.iterator] == "function", oe = `[
251
- \f\r]`, M = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Pe = /-->/g, je = />/g, S = RegExp(`>|${oe}(?:([^\\s"'>=/]+)(${oe}*=${oe}*(?:[^
252
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Re = /'/g, Oe = /"/g, Ie = /^(?:script|style|textarea|title)$/i, ut = (t) => (e, ...s) => ({ _$litType$: t, strings: e, values: s }), p = ut(1), T = /* @__PURE__ */ Symbol.for("lit-noChange"), c = /* @__PURE__ */ Symbol.for("lit-nothing"), ke = /* @__PURE__ */ new WeakMap(), E = P.createTreeWalker(P, 129);
253
- function Ve(t, e) {
254
- if (!ve(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
255
- return Ee !== void 0 ? Ee.createHTML(e) : e;
250
+ T.elementStyles = [], T.shadowRootOptions = { mode: "open" }, T[K("elementProperties")] = /* @__PURE__ */ new Map(), T[K("finalized")] = /* @__PURE__ */ new Map(), we?.({ ReactiveElement: T }), (dt.reactiveElementVersions ??= []).push("2.1.2");
251
+ const Pt = globalThis, It = (e) => e, nt = Pt.trustedTypes, Tt = nt ? nt.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Yt = "$lit$", x = `lit$${Math.random().toFixed(9).slice(2)}$`, te = "?" + x, Ae = `<${te}>`, L = document, G = () => L.createComment(""), J = (e) => e === null || typeof e != "object" && typeof e != "function", jt = Array.isArray, Ce = (e) => jt(e) || typeof e?.[Symbol.iterator] == "function", mt = `[
252
+ \f\r]`, W = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ft = /-->/g, Nt = />/g, U = RegExp(`>|${mt}(?:([^\\s"'>=/]+)(${mt}*=${mt}*(?:[^
253
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Mt = /'/g, Bt = /"/g, ee = /^(?:script|style|textarea|title)$/i, xe = (e) => (t, ...r) => ({ _$litType$: e, strings: t, values: r }), d = xe(1), H = /* @__PURE__ */ Symbol.for("lit-noChange"), c = /* @__PURE__ */ Symbol.for("lit-nothing"), qt = /* @__PURE__ */ new WeakMap(), k = L.createTreeWalker(L, 129);
254
+ function re(e, t) {
255
+ if (!jt(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
256
+ return Tt !== void 0 ? Tt.createHTML(t) : t;
256
257
  }
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
- for (let a = 0; a < s; a++) {
261
- const l = t[a];
262
- let d, u, h = -1, $ = 0;
263
- for (; $ < l.length && (n.lastIndex = $, u = n.exec(l), u !== null); ) $ = n.lastIndex, n === M ? u[1] === "!--" ? n = Pe : u[1] !== void 0 ? n = je : u[2] !== void 0 ? (Ie.test(u[2]) && (i = RegExp("</" + u[2], "g")), n = S) : u[3] !== void 0 && (n = S) : n === S ? u[0] === ">" ? (n = i ?? M, h = -1) : u[1] === void 0 ? h = -2 : (h = n.lastIndex - u[2].length, d = u[1], n = u[3] === void 0 ? S : u[3] === '"' ? Oe : Re) : n === Oe || n === Re ? n = S : n === Pe || n === je ? n = M : (n = S, i = void 0);
264
- const _ = n === S && t[a + 1].startsWith("/>") ? " " : "";
265
- o += n === M ? l + dt : h >= 0 ? (r.push(d), l.slice(0, h) + qe + l.slice(h) + w + _) : l + w + (h === -2 ? a : _);
266
- }
267
- return [Ve(t, o + (t[s] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), r];
258
+ const Se = (e, t) => {
259
+ const r = e.length - 1, i = [];
260
+ let s, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = W;
261
+ for (let a = 0; a < r; a++) {
262
+ const l = e[a];
263
+ let h, f, u = -1, b = 0;
264
+ for (; b < l.length && (n.lastIndex = b, f = n.exec(l), f !== null); ) b = n.lastIndex, n === W ? f[1] === "!--" ? n = Ft : f[1] !== void 0 ? n = Nt : f[2] !== void 0 ? (ee.test(f[2]) && (s = RegExp("</" + f[2], "g")), n = U) : f[3] !== void 0 && (n = U) : n === U ? f[0] === ">" ? (n = s ?? W, u = -1) : f[1] === void 0 ? u = -2 : (u = n.lastIndex - f[2].length, h = f[1], n = f[3] === void 0 ? U : f[3] === '"' ? Bt : Mt) : n === Bt || n === Mt ? n = U : n === Ft || n === Nt ? n = W : (n = U, s = void 0);
265
+ const $ = n === U && e[a + 1].startsWith("/>") ? " " : "";
266
+ o += n === W ? l + Ae : u >= 0 ? (i.push(h), l.slice(0, u) + Yt + l.slice(u) + x + $) : l + x + (u === -2 ? a : $);
267
+ }
268
+ return [re(e, o + (e[r] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
268
269
  };
269
- class H {
270
- constructor({ strings: e, _$litType$: s }, r) {
271
- let i;
270
+ class Z {
271
+ constructor({ strings: t, _$litType$: r }, i) {
272
+ let s;
272
273
  this.parts = [];
273
274
  let o = 0, n = 0;
274
- const a = e.length - 1, l = this.parts, [d, u] = ft(e, s);
275
- if (this.el = H.createElement(d, r), E.currentNode = this.el.content, s === 2 || s === 3) {
276
- const h = this.el.content.firstChild;
277
- h.replaceWith(...h.childNodes);
275
+ const a = t.length - 1, l = this.parts, [h, f] = Se(t, r);
276
+ if (this.el = Z.createElement(h, i), k.currentNode = this.el.content, r === 2 || r === 3) {
277
+ const u = this.el.content.firstChild;
278
+ u.replaceWith(...u.childNodes);
278
279
  }
279
- for (; (i = E.nextNode()) !== null && l.length < a; ) {
280
- if (i.nodeType === 1) {
281
- if (i.hasAttributes()) for (const h of i.getAttributeNames()) if (h.endsWith(qe)) {
282
- const $ = u[n++], _ = i.getAttribute(h).split(w), V = /([.?@])?(.*)/.exec($);
283
- l.push({ type: 1, index: o, name: V[2], strings: _, ctor: V[1] === "." ? mt : V[1] === "?" ? gt : V[1] === "@" ? yt : ie }), i.removeAttribute(h);
284
- } else h.startsWith(w) && (l.push({ type: 6, index: o }), i.removeAttribute(h));
285
- if (Ie.test(i.tagName)) {
286
- const h = i.textContent.split(w), $ = h.length - 1;
287
- if ($ > 0) {
288
- i.textContent = Z ? Z.emptyScript : "";
289
- for (let _ = 0; _ < $; _++) i.append(h[_], F()), E.nextNode(), l.push({ type: 2, index: ++o });
290
- i.append(h[$], F());
280
+ for (; (s = k.nextNode()) !== null && l.length < a; ) {
281
+ if (s.nodeType === 1) {
282
+ if (s.hasAttributes()) for (const u of s.getAttributeNames()) if (u.endsWith(Yt)) {
283
+ const b = f[n++], $ = s.getAttribute(u).split(x), rt = /([.?@])?(.*)/.exec(b);
284
+ l.push({ type: 1, index: o, name: rt[2], strings: $, ctor: rt[1] === "." ? je : rt[1] === "?" ? Re : rt[1] === "@" ? Ee : ut }), s.removeAttribute(u);
285
+ } else u.startsWith(x) && (l.push({ type: 6, index: o }), s.removeAttribute(u));
286
+ if (ee.test(s.tagName)) {
287
+ const u = s.textContent.split(x), b = u.length - 1;
288
+ if (b > 0) {
289
+ s.textContent = nt ? nt.emptyScript : "";
290
+ for (let $ = 0; $ < b; $++) s.append(u[$], G()), k.nextNode(), l.push({ type: 2, index: ++o });
291
+ s.append(u[b], G());
291
292
  }
292
293
  }
293
- } else if (i.nodeType === 8) if (i.data === ze) l.push({ type: 2, index: o });
294
+ } else if (s.nodeType === 8) if (s.data === te) l.push({ type: 2, index: o });
294
295
  else {
295
- let h = -1;
296
- for (; (h = i.data.indexOf(w, h + 1)) !== -1; ) l.push({ type: 7, index: o }), h += w.length - 1;
296
+ let u = -1;
297
+ for (; (u = s.data.indexOf(x, u + 1)) !== -1; ) l.push({ type: 7, index: o }), u += x.length - 1;
297
298
  }
298
299
  o++;
299
300
  }
300
301
  }
301
- static createElement(e, s) {
302
- const r = P.createElement("template");
303
- return r.innerHTML = e, r;
302
+ static createElement(t, r) {
303
+ const i = L.createElement("template");
304
+ return i.innerHTML = t, i;
304
305
  }
305
306
  }
306
- function D(t, e, s = t, r) {
307
- if (e === T) return e;
308
- let i = r !== void 0 ? s._$Co?.[r] : s._$Cl;
309
- const o = B(e) ? void 0 : e._$litDirective$;
310
- return i?.constructor !== o && (i?._$AO?.(!1), o === void 0 ? i = void 0 : (i = new o(t), i._$AT(t, s, r)), r !== void 0 ? (s._$Co ??= [])[r] = i : s._$Cl = i), i !== void 0 && (e = D(t, i._$AS(t, e.values), i, r)), e;
307
+ function z(e, t, r = e, i) {
308
+ if (t === H) return t;
309
+ let s = i !== void 0 ? r._$Co?.[i] : r._$Cl;
310
+ const o = J(t) ? void 0 : t._$litDirective$;
311
+ return s?.constructor !== o && (s?._$AO?.(!1), o === void 0 ? s = void 0 : (s = new o(e), s._$AT(e, r, i)), i !== void 0 ? (r._$Co ??= [])[i] = s : r._$Cl = s), s !== void 0 && (t = z(e, s._$AS(e, t.values), s, i)), t;
311
312
  }
312
- class pt {
313
- constructor(e, s) {
314
- this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = s;
313
+ class Pe {
314
+ constructor(t, r) {
315
+ this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = r;
315
316
  }
316
317
  get parentNode() {
317
318
  return this._$AM.parentNode;
@@ -319,35 +320,35 @@ class pt {
319
320
  get _$AU() {
320
321
  return this._$AM._$AU;
321
322
  }
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];
323
+ u(t) {
324
+ const { el: { content: r }, parts: i } = this._$AD, s = (t?.creationScope ?? L).importNode(r, !0);
325
+ k.currentNode = s;
326
+ let o = k.nextNode(), n = 0, a = 0, l = i[0];
326
327
  for (; l !== void 0; ) {
327
328
  if (n === l.index) {
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];
329
+ let h;
330
+ l.type === 2 ? h = new tt(o, o.nextSibling, this, t) : l.type === 1 ? h = new l.ctor(o, l.name, l.strings, this, t) : l.type === 6 && (h = new Ue(o, this, t)), this._$AV.push(h), l = i[++a];
330
331
  }
331
- n !== l?.index && (o = E.nextNode(), n++);
332
+ n !== l?.index && (o = k.nextNode(), n++);
332
333
  }
333
- return E.currentNode = P, i;
334
+ return k.currentNode = L, s;
334
335
  }
335
- p(e) {
336
- let s = 0;
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++;
336
+ p(t) {
337
+ let r = 0;
338
+ for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, r), r += i.strings.length - 2) : i._$AI(t[r])), r++;
338
339
  }
339
340
  }
340
- class z {
341
+ class tt {
341
342
  get _$AU() {
342
343
  return this._$AM?._$AU ?? this._$Cv;
343
344
  }
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;
345
+ constructor(t, r, i, s) {
346
+ this.type = 2, this._$AH = c, this._$AN = void 0, this._$AA = t, this._$AB = r, this._$AM = i, this.options = s, this._$Cv = s?.isConnected ?? !0;
346
347
  }
347
348
  get parentNode() {
348
- let e = this._$AA.parentNode;
349
- const s = this._$AM;
350
- return s !== void 0 && e?.nodeType === 11 && (e = s.parentNode), e;
349
+ let t = this._$AA.parentNode;
350
+ const r = this._$AM;
351
+ return r !== void 0 && t?.nodeType === 11 && (t = r.parentNode), t;
351
352
  }
352
353
  get startNode() {
353
354
  return this._$AA;
@@ -355,135 +356,135 @@ class z {
355
356
  get endNode() {
356
357
  return this._$AB;
357
358
  }
358
- _$AI(e, s = this) {
359
- e = D(this, e, s), B(e) ? e === c || e == null || e === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : e !== this._$AH && e !== T && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : ht(e) ? this.k(e) : this._(e);
359
+ _$AI(t, r = this) {
360
+ t = z(this, t, r), J(t) ? t === c || t == null || t === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : t !== this._$AH && t !== H && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Ce(t) ? this.k(t) : this._(t);
360
361
  }
361
- O(e) {
362
- return this._$AA.parentNode.insertBefore(e, this._$AB);
362
+ O(t) {
363
+ return this._$AA.parentNode.insertBefore(t, this._$AB);
363
364
  }
364
- T(e) {
365
- this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
365
+ T(t) {
366
+ this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
366
367
  }
367
- _(e) {
368
- this._$AH !== c && B(this._$AH) ? this._$AA.nextSibling.data = e : this.T(P.createTextNode(e)), this._$AH = e;
368
+ _(t) {
369
+ this._$AH !== c && J(this._$AH) ? this._$AA.nextSibling.data = t : this.T(L.createTextNode(t)), this._$AH = t;
369
370
  }
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);
371
+ $(t) {
372
+ const { values: r, _$litType$: i } = t, s = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = Z.createElement(re(i.h, i.h[0]), this.options)), i);
373
+ if (this._$AH?._$AD === s) this._$AH.p(r);
373
374
  else {
374
- const o = new pt(i, this), n = o.u(this.options);
375
- o.p(s), this.T(n), this._$AH = o;
375
+ const o = new Pe(s, this), n = o.u(this.options);
376
+ o.p(r), this.T(n), this._$AH = o;
376
377
  }
377
378
  }
378
- _$AC(e) {
379
- let s = ke.get(e.strings);
380
- return s === void 0 && ke.set(e.strings, s = new H(e)), s;
381
- }
382
- k(e) {
383
- ve(this._$AH) || (this._$AH = [], this._$AR());
384
- const s = this._$AH;
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;
379
+ _$AC(t) {
380
+ let r = qt.get(t.strings);
381
+ return r === void 0 && qt.set(t.strings, r = new Z(t)), r;
382
+ }
383
+ k(t) {
384
+ jt(this._$AH) || (this._$AH = [], this._$AR());
385
+ const r = this._$AH;
386
+ let i, s = 0;
387
+ for (const o of t) s === r.length ? r.push(i = new tt(this.O(G()), this.O(G()), this, this.options)) : i = r[s], i._$AI(o), s++;
388
+ s < r.length && (this._$AR(i && i._$AB.nextSibling, s), r.length = s);
389
+ }
390
+ _$AR(t = this._$AA.nextSibling, r) {
391
+ for (this._$AP?.(!1, !0, r); t !== this._$AB; ) {
392
+ const i = It(t).nextSibling;
393
+ It(t).remove(), t = i;
393
394
  }
394
395
  }
395
- setConnected(e) {
396
- this._$AM === void 0 && (this._$Cv = e, this._$AP?.(e));
396
+ setConnected(t) {
397
+ this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
397
398
  }
398
399
  }
399
- class ie {
400
+ class ut {
400
401
  get tagName() {
401
402
  return this.element.tagName;
402
403
  }
403
404
  get _$AU() {
404
405
  return this._$AM._$AU;
405
406
  }
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;
407
+ constructor(t, r, i, s, o) {
408
+ this.type = 1, this._$AH = c, this._$AN = void 0, this.element = t, this.name = r, this._$AM = s, 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;
408
409
  }
409
- _$AI(e, s = this, r, i) {
410
+ _$AI(t, r = this, i, s) {
410
411
  const o = this.strings;
411
412
  let n = !1;
412
- if (o === void 0) e = D(this, e, s, 0), n = !B(e) || e !== this._$AH && e !== T, n && (this._$AH = e);
413
+ if (o === void 0) t = z(this, t, r, 0), n = !J(t) || t !== this._$AH && t !== H, n && (this._$AH = t);
413
414
  else {
414
- const a = e;
415
- let l, d;
416
- for (e = o[0], l = 0; l < o.length - 1; l++) d = D(this, a[r + l], s, l), d === T && (d = this._$AH[l]), n ||= !B(d) || d !== this._$AH[l], d === c ? e = c : e !== c && (e += (d ?? "") + o[l + 1]), this._$AH[l] = d;
415
+ const a = t;
416
+ let l, h;
417
+ for (t = o[0], l = 0; l < o.length - 1; l++) h = z(this, a[i + l], r, l), h === H && (h = this._$AH[l]), n ||= !J(h) || h !== this._$AH[l], h === c ? t = c : t !== c && (t += (h ?? "") + o[l + 1]), this._$AH[l] = h;
417
418
  }
418
- n && !i && this.j(e);
419
+ n && !s && this.j(t);
419
420
  }
420
- j(e) {
421
- e === c ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
421
+ j(t) {
422
+ t === c ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
422
423
  }
423
424
  }
424
- class mt extends ie {
425
+ class je extends ut {
425
426
  constructor() {
426
427
  super(...arguments), this.type = 3;
427
428
  }
428
- j(e) {
429
- this.element[this.name] = e === c ? void 0 : e;
429
+ j(t) {
430
+ this.element[this.name] = t === c ? void 0 : t;
430
431
  }
431
432
  }
432
- class gt extends ie {
433
+ class Re extends ut {
433
434
  constructor() {
434
435
  super(...arguments), this.type = 4;
435
436
  }
436
- j(e) {
437
- this.element.toggleAttribute(this.name, !!e && e !== c);
437
+ j(t) {
438
+ this.element.toggleAttribute(this.name, !!t && t !== c);
438
439
  }
439
440
  }
440
- class yt extends ie {
441
- constructor(e, s, r, i, o) {
442
- super(e, s, r, i, o), this.type = 5;
441
+ class Ee extends ut {
442
+ constructor(t, r, i, s, o) {
443
+ super(t, r, i, s, o), this.type = 5;
443
444
  }
444
- _$AI(e, s = this) {
445
- if ((e = D(this, e, s, 0) ?? c) === T) return;
446
- const r = this._$AH, i = e === c && r !== c || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, o = e !== c && (r === c || i);
447
- i && this.element.removeEventListener(this.name, this, r), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
445
+ _$AI(t, r = this) {
446
+ if ((t = z(this, t, r, 0) ?? c) === H) return;
447
+ const i = this._$AH, s = t === c && i !== c || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, o = t !== c && (i === c || s);
448
+ s && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
448
449
  }
449
- handleEvent(e) {
450
- typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
450
+ handleEvent(t) {
451
+ typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
451
452
  }
452
453
  }
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;
454
+ class Ue {
455
+ constructor(t, r, i) {
456
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = r, this.options = i;
456
457
  }
457
458
  get _$AU() {
458
459
  return this._$AM._$AU;
459
460
  }
460
- _$AI(e) {
461
- D(this, e);
461
+ _$AI(t) {
462
+ z(this, t);
462
463
  }
463
464
  }
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
- const o = s?.renderBefore ?? null;
471
- r._$litPart$ = i = new z(e.insertBefore(F(), o), o, void 0, s ?? {});
472
- }
473
- return i._$AI(t), i;
465
+ const Oe = Pt.litHtmlPolyfillSupport;
466
+ Oe?.(Z, tt), (Pt.litHtmlVersions ??= []).push("3.3.2");
467
+ const ke = (e, t, r) => {
468
+ const i = r?.renderBefore ?? t;
469
+ let s = i._$litPart$;
470
+ if (s === void 0) {
471
+ const o = r?.renderBefore ?? null;
472
+ i._$litPart$ = s = new tt(t.insertBefore(G(), o), o, void 0, r ?? {});
473
+ }
474
+ return s._$AI(e), s;
474
475
  };
475
- const $e = globalThis;
476
- let k = class extends R {
476
+ const Rt = globalThis;
477
+ let B = class extends T {
477
478
  constructor() {
478
479
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
479
480
  }
480
481
  createRenderRoot() {
481
- const e = super.createRenderRoot();
482
- return this.renderOptions.renderBefore ??= e.firstChild, e;
482
+ const t = super.createRenderRoot();
483
+ return this.renderOptions.renderBefore ??= t.firstChild, t;
483
484
  }
484
- update(e) {
485
- const s = this.render();
486
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = bt(s, this.renderRoot, this.renderOptions);
485
+ update(t) {
486
+ const r = this.render();
487
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = ke(r, this.renderRoot, this.renderOptions);
487
488
  }
488
489
  connectedCallback() {
489
490
  super.connectedCallback(), this._$Do?.setConnected(!0);
@@ -492,423 +493,964 @@ let k = class extends R {
492
493
  super.disconnectedCallback(), this._$Do?.setConnected(!1);
493
494
  }
494
495
  render() {
495
- return T;
496
+ return H;
496
497
  }
497
498
  };
498
- k._$litElement$ = !0, k.finalized = !0, $e.litElementHydrateSupport?.({ LitElement: k });
499
- const _t = $e.litElementPolyfillSupport;
500
- _t?.({ LitElement: k });
501
- ($e.litElementVersions ??= []).push("4.2.2");
502
- class wt extends k {
499
+ B._$litElement$ = !0, B.finalized = !0, Rt.litElementHydrateSupport?.({ LitElement: B });
500
+ const De = Rt.litElementPolyfillSupport;
501
+ De?.({ LitElement: B });
502
+ (Rt.litElementVersions ??= []).push("4.2.2");
503
+ class Le extends B {
503
504
  constructor() {
504
505
  super(...arguments), this.object = {
505
506
  "@id": ""
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;
507
+ }, this.isType = (t, r = this.object) => {
508
+ const i = r["@type"];
509
+ return Array.isArray(i) ? i.includes(t) : typeof i == "string" ? i === t : !1;
509
510
  };
510
511
  }
511
512
  }
512
- const re = (t) => (e, s) => {
513
- s !== void 0 ? s.addInitializer(() => {
514
- customElements.define(t, e);
515
- }) : customElements.define(t, e);
513
+ const V = (e) => (t, r) => {
514
+ r !== void 0 ? r.addInitializer(() => {
515
+ customElements.define(e, t);
516
+ }) : customElements.define(e, t);
516
517
  };
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
- const { name: n } = s;
518
+ const Ie = { attribute: !0, type: String, converter: ot, reflect: !1, hasChanged: ht }, Te = (e = Ie, t, r) => {
519
+ const { kind: i, metadata: s } = r;
520
+ let o = globalThis.litPropertyMetadata.get(s);
521
+ if (o === void 0 && globalThis.litPropertyMetadata.set(s, o = /* @__PURE__ */ new Map()), i === "setter" && ((e = Object.create(e)).wrapped = !0), o.set(r.name, e), i === "accessor") {
522
+ const { name: n } = r;
522
523
  return { set(a) {
523
- const l = e.get.call(this);
524
- e.set.call(this, a), this.requestUpdate(n, l, t, !0, a);
524
+ const l = t.get.call(this);
525
+ t.set.call(this, a), this.requestUpdate(n, l, e, !0, a);
525
526
  }, init(a) {
526
- return a !== void 0 && this.C(n, void 0, t, a), a;
527
+ return a !== void 0 && this.C(n, void 0, e, a), a;
527
528
  } };
528
529
  }
529
- if (r === "setter") {
530
- const { name: n } = s;
530
+ if (i === "setter") {
531
+ const { name: n } = r;
531
532
  return function(a) {
532
533
  const l = this[n];
533
- e.call(this, a), this.requestUpdate(n, l, t, !0, a);
534
+ t.call(this, a), this.requestUpdate(n, l, e, !0, a);
534
535
  };
535
536
  }
536
- throw Error("Unsupported decorator location: " + r);
537
+ throw Error("Unsupported decorator location: " + i);
537
538
  };
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);
539
+ function y(e) {
540
+ return (t, r) => typeof r == "object" ? Te(e, t, r) : ((i, s, o) => {
541
+ const n = s.hasOwnProperty(o);
542
+ return s.constructor.createProperty(o, i), n ? Object.getOwnPropertyDescriptor(s, o) : void 0;
543
+ })(e, t, r);
543
544
  }
544
- function g(t) {
545
- return m({ ...t, state: !0, attribute: !1 });
545
+ function m(e) {
546
+ return y({ ...e, state: !0, attribute: !1 });
546
547
  }
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;
548
+ var Fe = Object.defineProperty, Ne = (e, t, r, i) => {
549
+ for (var s = void 0, o = e.length - 1, n; o >= 0; o--)
550
+ (n = e[o]) && (s = n(t, r, s) || s);
551
+ return s && Fe(t, r, s), s;
551
552
  };
552
- class be extends k {
553
+ class Et extends B {
553
554
  constructor() {
554
- super(...arguments), this.objects = [], this.hasType = (e, s = this.objects) => new Set(s.flatMap((i) => i["@type"])).has(e);
555
+ super(...arguments), this.objects = [], this.hasType = (t, r = this.objects) => new Set(r.flatMap((s) => s["@type"])).has(t);
555
556
  }
556
557
  }
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;
558
+ Ne([
559
+ y({ attribute: !1 })
560
+ ], Et.prototype, "objects");
561
+ var Me = Object.defineProperty, P = (e, t, r, i) => {
562
+ for (var s = void 0, o = e.length - 1, n; o >= 0; o--)
563
+ (n = e[o]) && (s = n(t, r, s) || s);
564
+ return s && Me(t, r, s), s;
564
565
  };
565
- class v extends be {
566
+ class v extends Et {
566
567
  constructor({
567
- defaultRoute: e = !1,
568
- setupSubscriptions: s = !0,
569
- ignoreRouter: r = !1
568
+ defaultRoute: t = !1,
569
+ setupSubscriptions: r = !0,
570
+ ignoreRouter: i = !1
570
571
  } = {}) {
571
572
  super(), this.cherryPickedProperties = [], this.currentRoute = "";
572
- const i = () => {
573
- document.readyState === "complete" && this._attach(e, s, r).then(
573
+ const s = () => {
574
+ document.readyState === "complete" && this._attach(t, r, i).then(
574
575
  (o) => {
575
576
  o && this.requestUpdate();
576
577
  }
577
578
  );
578
579
  };
579
- document.readyState === "complete" ? i() : document.addEventListener("readystatechange", i);
580
+ document.readyState === "complete" ? s() : document.addEventListener("readystatechange", s);
580
581
  }
581
- async _attach(e, s, r) {
582
- return !this.orbit && window.orbit && (this.orbit = window.orbit, s) ? (jt({
582
+ async _attach(t, r, i) {
583
+ return !this.orbit && window.orbit && (this.orbit = window.orbit, r) ? (se({
583
584
  component: this,
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);
585
+ defaultRoute: t,
586
+ ignoreRouter: i
587
+ }), this.route && (this.component = this.orbit.getComponentFromRoute(this.route), this.component && this.orbit.components.map((s) => (s.uniq === this.component.uniq && (s.instance = this), s))), await this._afterAttach(), Promise.resolve(!0)) : Promise.resolve(!1);
587
588
  }
588
589
  async _afterAttach() {
589
590
  return Promise.resolve();
590
591
  }
591
- _navigate(e) {
592
+ _navigate(t) {
592
593
  window.sibRouter.previousRoute = this.currentRoute, window.sibRouter.previousResource = window.sibRouter.currentResource;
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");
594
+ const r = t.target?.closest("[navigation-target]");
595
+ let i = r.getAttribute("navigation-target");
596
+ const s = r.getAttribute("navigation-subrouter"), o = r.getAttribute("navigation-resource"), n = r.getAttribute("navigation-rdf-type");
596
597
  if (n) {
597
598
  const a = window.orbit?.components?.filter(
598
599
  (l) => l?.routeAttributes?.["rdf-type"] === n
599
600
  );
600
- a && (r = a[0]?.uniq);
601
+ a && (i = a[0]?.uniq);
601
602
  }
602
- r && O(
603
- (window.orbit ? window.orbit.getRoute(r, !0) : r) + (i ? `-${i}` : ""),
603
+ i && N(
604
+ (window.orbit ? window.orbit.getRoute(i, !0) : i) + (s ? `-${s}` : ""),
604
605
  o
605
- ), e.preventDefault();
606
+ ), t.preventDefault();
606
607
  }
607
- _normalizeLdpContains(e) {
608
- return !Array.isArray(e) && e !== null ? [e] : e;
608
+ _normalizeLdpContains(t) {
609
+ return !Array.isArray(t) && t !== null ? [t] : t;
609
610
  }
610
- async _expandContainer(e, s = !0, r = this.cherryPickedProperties) {
611
- const i = [];
612
- for (const o of e) {
611
+ async _expandContainer(t, r = !0, i = this.cherryPickedProperties) {
612
+ const s = [];
613
+ for (const o of t) {
613
614
  const n = await this._getProxyValue(
614
615
  await o,
615
- s,
616
- r
616
+ r,
617
+ i
617
618
  );
618
- n && i.push(n);
619
+ n && s.push(n);
619
620
  }
620
- return i;
621
+ return s;
621
622
  }
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
623
+ async _getProperties(t, r = !0, i = this.cherryPickedProperties) {
624
+ const s = await t.properties, o = {
625
+ "@id": t["@id"],
626
+ "@type": t["@type"],
627
+ "@context": t.serverContext,
628
+ _originalResource: t
628
629
  };
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(
630
+ for (const n of i)
631
+ s?.includes(n.key) && (o[n.value] = await t.get(n.key), n.expand && (o[n.value] = await this._getProxyValue(
631
632
  o[n.value],
632
- s,
633
- r
633
+ r,
634
+ i
634
635
  )), n.cast && (o[n.value] = await n.cast(o[n.value])));
635
636
  return await this._responseAdaptator(o);
636
637
  }
637
- async _hasCherryPickedProperties(e) {
638
- const s = await e.properties;
639
- for (const r of this.cherryPickedProperties)
640
- if (s?.includes(r.key))
638
+ async _hasCherryPickedProperties(t) {
639
+ const r = await t.properties;
640
+ for (const i of this.cherryPickedProperties)
641
+ if (r?.includes(i.key))
641
642
  return !0;
642
643
  return !1;
643
644
  }
644
- async _getProxyValue(e, s = !0, r = this.cherryPickedProperties) {
645
+ async _getProxyValue(t, r = !0, i = this.cherryPickedProperties) {
645
646
  try {
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))
647
+ if (t) {
648
+ let s = t;
649
+ if (typeof t == "string" && (s = await window.sibStore.getData(t, Wt)), typeof t != "string" && t.isFullResource && (t.isFullResource?.() || (s = await window.sibStore.getData(
650
+ t["@id"],
651
+ Wt
652
+ ))), typeof t != "string" && !t.isFullResource && (s.properties = Object.keys(s), s.get = (o) => s[o]), !s) return { _originalResource: s };
653
+ if (typeof s == "object" && s !== null) {
654
+ if (s.isContainer?.() && s["ldp:contains"]) {
655
+ if (await this._hasCherryPickedProperties(s))
655
656
  return await this._getProperties(
656
- i,
657
657
  s,
658
- r
658
+ r,
659
+ i
659
660
  );
660
661
  const o = this._normalizeLdpContains(
661
- await i["ldp:contains"]
662
+ await s["ldp:contains"]
662
663
  );
663
664
  return await this._expandContainer(
664
665
  o,
665
- s,
666
- r
666
+ r,
667
+ i
667
668
  );
668
669
  }
669
- return await this._getProperties(i, s, r);
670
+ return await this._getProperties(s, r, i);
670
671
  }
671
672
  }
672
673
  return;
673
674
  } catch {
674
675
  }
675
676
  }
676
- async _responseAdaptator(e) {
677
- return Promise.resolve(e);
677
+ async _responseAdaptator(t) {
678
+ return Promise.resolve(t);
678
679
  }
679
680
  gatekeeper() {
680
681
  if (!this.orbit || !this.noRouter && this.route && this.currentRoute && !this.route.startsWith(this.currentRoute) || !this.dataSrc)
681
682
  return c;
682
683
  }
683
684
  }
684
- x([
685
- m({ attribute: "default-data-src", reflect: !0 })
685
+ P([
686
+ y({ attribute: "default-data-src", reflect: !0 })
686
687
  ], v.prototype, "defaultDataSrc");
687
- x([
688
- m({ attribute: "data-src", reflect: !0 })
688
+ P([
689
+ y({ attribute: "data-src", reflect: !0 })
689
690
  ], v.prototype, "dataSrc");
690
- x([
691
- m({ attribute: "nested-field" })
691
+ P([
692
+ y({ attribute: "nested-field" })
692
693
  ], v.prototype, "nestedField");
693
- x([
694
- m({ attribute: "uniq" })
694
+ P([
695
+ y({ attribute: "uniq" })
695
696
  ], v.prototype, "uniq");
696
- x([
697
- m({ attribute: "route" })
697
+ P([
698
+ y({ attribute: "route" })
698
699
  ], v.prototype, "route");
699
- x([
700
- m({ attribute: !1 })
700
+ P([
701
+ y({ attribute: !1 })
701
702
  ], v.prototype, "cherryPickedProperties");
702
- x([
703
- g()
703
+ P([
704
+ m()
704
705
  ], v.prototype, "orbit");
705
- x([
706
- g()
706
+ P([
707
+ m()
707
708
  ], v.prototype, "currentRoute");
708
- function Pt() {
709
+ function M(e) {
710
+ return e ? e.replace(/^urn:uuid:/i, "").replace(/^urn:tems:/i, "") : "";
711
+ }
712
+ function Be(e, t, r) {
713
+ if (!e) return null;
714
+ const i = JSON.parse(JSON.stringify(e));
715
+ i["@id"] && (i["@id"] = M(i["@id"]));
716
+ const s = F(t, ["@id"]) || "";
717
+ return i.target = M(s), i;
718
+ }
719
+ function F(e, t) {
720
+ if (t.length === 0)
721
+ return;
722
+ let r = e;
723
+ for (const i of t) {
724
+ if (r == null)
725
+ return;
726
+ r = r[i];
727
+ }
728
+ return r;
729
+ }
730
+ class qe {
731
+ constructor(t) {
732
+ this.config = t;
733
+ }
734
+ /**
735
+ * Maps source data to TEMS-compatible resource
736
+ */
737
+ map(t, r = {}) {
738
+ const i = {};
739
+ for (const [s, o] of Object.entries(this.config.baseFields)) {
740
+ const n = this.mapField(t, o, r);
741
+ n !== void 0 && (i[s] = n);
742
+ }
743
+ if (this.config.containerFields)
744
+ for (const [s, o] of Object.entries(
745
+ this.config.containerFields
746
+ )) {
747
+ const n = this.mapContainerField(t, o, r);
748
+ n && (i[s] = n);
749
+ }
750
+ if (this.config.nestedObjects)
751
+ for (const [s, o] of Object.entries(
752
+ this.config.nestedObjects
753
+ )) {
754
+ const n = this.mapNestedObject(t, o, r);
755
+ n && (i[s] = n);
756
+ }
757
+ if (this.config.contractFields)
758
+ for (const [s, o] of Object.entries(
759
+ this.config.contractFields
760
+ )) {
761
+ const n = this.mapField(t, o, r);
762
+ n !== void 0 && (i[s] = n);
763
+ }
764
+ return this.config.postProcess ? this.config.postProcess(i, t, r) : i;
765
+ }
766
+ /**
767
+ * Maps a single field
768
+ */
769
+ mapField(t, r, i) {
770
+ let s = F(t, r.source);
771
+ return r.transform && (s = r.transform(s, t, i)), (s == null || s === "") && r.fallback && (typeof r.fallback == "function" ? s = r.fallback(t, i) : s = F(t, [r.fallback])), (s == null || s === "") && (s = r.defaultValue), s;
772
+ }
773
+ /**
774
+ * Maps a container field (array wrapped in LDP container)
775
+ */
776
+ mapContainerField(t, r, i) {
777
+ let s = F(t, r.source);
778
+ if (!s)
779
+ return null;
780
+ r.transform && (s = r.transform(s, t, i)), Array.isArray(s) || (s = [s]), r.filter && (s = s.filter(
781
+ (n, a) => r.filter(n, a, i)
782
+ ));
783
+ const o = s.map((n, a) => {
784
+ const l = {
785
+ "@type": r.itemType
786
+ };
787
+ for (const [h, f] of Object.entries(r.itemFields)) {
788
+ const u = f(n, a, i);
789
+ u !== void 0 && (l[h] = u);
790
+ }
791
+ return l;
792
+ });
793
+ return {
794
+ "@type": r.containerType,
795
+ "ldp:contains": o
796
+ };
797
+ }
798
+ /**
799
+ * Maps a nested object
800
+ */
801
+ mapNestedObject(t, r, i) {
802
+ const s = F(t, r.source);
803
+ if (!s)
804
+ return null;
805
+ const o = {};
806
+ r.type && (o["@type"] = r.type);
807
+ for (const [n, a] of Object.entries(r.fields)) {
808
+ let l;
809
+ Array.isArray(a) ? l = F(s, a) : l = this.mapField(s, a, i), l !== void 0 && (o[n] = l);
810
+ }
811
+ return Object.keys(o).length > (r.type ? 1 : 0) ? o : null;
812
+ }
813
+ /**
814
+ * Unwraps LDP containers (converts ldp:contains arrays to plain arrays)
815
+ *
816
+ * This is typically called by components after mapping to simplify data structure
817
+ * for rendering.
818
+ */
819
+ static unwrapLdpContainers(t) {
820
+ const r = { ...t };
821
+ for (const [i, s] of Object.entries(r))
822
+ s && typeof s == "object" && s["@type"] === "ldp:Container" && s["ldp:contains"] && (r[i] = s["ldp:contains"]);
823
+ return r;
824
+ }
825
+ }
826
+ function g(e) {
827
+ return e["dcat:distribution"]?.[0] || e.properties || e;
828
+ }
829
+ function Ht(e) {
830
+ const t = g(e);
831
+ return e["dcat:endpointUrl"] || e["dcat:endpointURL"] || e["http://www.w3.org/ns/dcat#endpointUrl"] || e.endpointUrl || e.endpointURL || // Then check distribution/props level
832
+ t["http://www.w3.org/ns/dcat#endpointUrl"] || t["dcat:endpointUrl"] || t["dcat:endpointURL"] || t["dcat:accessService"]?.["dcat:endpointURL"] || t.endpointURL || t.endpointUrl || "";
833
+ }
834
+ function He(e) {
835
+ const t = g(e);
836
+ return e.contenttype || e.contentType || e["http://www.w3.org/ns/dcat#mediaType"] || e["dcat:mediaType"] || // Then check distribution/props level
837
+ t.contenttype || t.contentType || t["http://www.w3.org/ns/dcat#mediaType"] || t["dcat:mediaType"] || "";
838
+ }
839
+ const ze = {
840
+ baseFields: {
841
+ "@id": {
842
+ source: ["@id"],
843
+ transform: (e, t, r) => {
844
+ const s = M(e || t.id || "") || e?.split("/").pop() || "unknown", o = r.providerParticipantId ? `${encodeURIComponent(r.providerParticipantId)}/` : "";
845
+ return `${r.temsServiceBase || "https://api.tems.example.com/services/"}${o}${encodeURIComponent(s)}/`;
846
+ }
847
+ },
848
+ "@type": {
849
+ source: [],
850
+ defaultValue: "tems:Service"
851
+ },
852
+ name: {
853
+ source: [],
854
+ transform: (e, t) => {
855
+ const r = g(t);
856
+ return (
857
+ // Source-level fields (EDC catalog returns these at top level)
858
+ t.name || t.title || t["dct:title"] || t["dcterms:title"] || // EDC namespace fields at source level
859
+ t["https://w3id.org/edc/v0.0.1/ns/name"] || t["edc:name"] || // Distribution/props level
860
+ r["dct:title"] || r["dcterms:title"] || r.title || r["https://w3id.org/edc/v0.0.1/ns/name"] || r["edc:name"] || r.name || // Fall back to ID but extract meaningful part
861
+ (t["@id"]?.startsWith("urn:uuid:") ? t["@id"] : t["@id"]?.split("/").pop() || t["@id"]) || t.id || ""
862
+ );
863
+ }
864
+ },
865
+ description: {
866
+ source: [],
867
+ transform: (e, t) => {
868
+ const r = g(t);
869
+ return (
870
+ // Source-level fields (EDC catalog returns these at top level)
871
+ t.description || t["dct:description"] || t["dcterms:description"] || t["https://w3id.org/edc/v0.0.1/ns/description"] || t["edc:description"] || // Distribution/props level
872
+ r["dct:description"] || r["dcterms:description"] || r.description || r["https://w3id.org/edc/v0.0.1/ns/description"] || r["edc:description"] || ""
873
+ );
874
+ }
875
+ },
876
+ long_description: {
877
+ source: [],
878
+ transform: (e, t) => {
879
+ const r = g(t), i = Array.isArray(r["dcat:keyword"]) ? r["dcat:keyword"] : r["dcat:keyword"] ? [r["dcat:keyword"]] : [], s = r["dct:description"] || r["dcterms:description"] || r.description || "";
880
+ return i.length > 0 ? `Keywords: ${i.join(", ")}` : s;
881
+ }
882
+ },
883
+ url: {
884
+ source: [],
885
+ transform: (e, t) => Ht(t)
886
+ },
887
+ endpointUrl: {
888
+ source: [],
889
+ transform: (e, t) => Ht(t)
890
+ },
891
+ contentType: {
892
+ source: [],
893
+ transform: (e, t) => He(t)
894
+ },
895
+ activation_status: {
896
+ source: [],
897
+ transform: (e, t) => {
898
+ const r = g(t);
899
+ return (r["dcat:endpointURL"] || r["dcat:accessService"]?.["dcat:endpointURL"] || r.endpointURL || "").trim().length > 0;
900
+ }
901
+ },
902
+ is_in_app: {
903
+ source: [],
904
+ transform: (e, t) => {
905
+ const r = g(t);
906
+ return (r["dcat:endpointURL"] || r["dcat:accessService"]?.["dcat:endpointURL"] || r.endpointURL || "").trim().length > 0;
907
+ }
908
+ },
909
+ is_external: {
910
+ source: [],
911
+ transform: (e, t) => {
912
+ const r = g(t);
913
+ return (r["dcat:endpointURL"] || r["dcat:accessService"]?.["dcat:endpointURL"] || r.endpointURL || "").trim().length > 0;
914
+ }
915
+ },
916
+ is_api: {
917
+ source: [],
918
+ transform: (e, t) => {
919
+ const r = g(t);
920
+ return (r["dcat:endpointURL"] || r["dcat:accessService"]?.["dcat:endpointURL"] || r.endpointURL || "").trim().length > 0;
921
+ }
922
+ },
923
+ contact_url: {
924
+ source: [],
925
+ transform: (e, t) => {
926
+ const r = g(t);
927
+ return r["dcat:endpointDescription"] || r["dct:conformsTo"] || "";
928
+ }
929
+ },
930
+ documentation_url: {
931
+ source: [],
932
+ transform: (e, t) => {
933
+ const r = g(t);
934
+ return r["dcat:endpointDescription"] || r["dct:conformsTo"] || "";
935
+ }
936
+ },
937
+ creation_date: {
938
+ source: [],
939
+ transform: (e, t) => {
940
+ const r = g(t);
941
+ return r["dct:issued"] || r["dcterms:issued"] || (/* @__PURE__ */ new Date()).toISOString();
942
+ }
943
+ },
944
+ update_date: {
945
+ source: [],
946
+ transform: (e, t) => {
947
+ const r = g(t), i = r["dct:issued"] || r["dcterms:issued"] || (/* @__PURE__ */ new Date()).toISOString();
948
+ return r["dct:modified"] || r["dcterms:modified"] || i;
949
+ }
950
+ },
951
+ release_date: {
952
+ source: [],
953
+ transform: (e, t) => {
954
+ const r = g(t);
955
+ return r["dct:issued"] || r["dcterms:issued"] || (/* @__PURE__ */ new Date()).toISOString();
956
+ }
957
+ },
958
+ last_update: {
959
+ source: [],
960
+ transform: (e, t) => {
961
+ const r = g(t), i = r["dct:issued"] || r["dcterms:issued"] || (/* @__PURE__ */ new Date()).toISOString();
962
+ return r["dct:modified"] || r["dcterms:modified"] || i;
963
+ }
964
+ },
965
+ activation_date: {
966
+ source: [],
967
+ defaultValue: null
968
+ },
969
+ licence: {
970
+ source: [],
971
+ defaultValue: null
972
+ },
973
+ developper: {
974
+ source: [],
975
+ defaultValue: null
976
+ },
977
+ data_offers: {
978
+ source: [],
979
+ defaultValue: []
980
+ }
981
+ },
982
+ containerFields: {
983
+ categories: {
984
+ source: [],
985
+ containerType: "ldp:Container",
986
+ itemType: "tems:Category",
987
+ transform: (e, t) => {
988
+ const i = g(t)["dcat:keyword"];
989
+ return i ? Array.isArray(i) ? i : [i] : [];
990
+ },
991
+ itemFields: {
992
+ "@id": (e, t, r) => `${r.temsCategoryBase || "https://api.tems.example.com/categories/"}${encodeURIComponent(e)}/`,
993
+ name: (e) => e
994
+ }
995
+ },
996
+ images: {
997
+ source: [],
998
+ containerType: "ldp:Container",
999
+ itemType: "tems:Image",
1000
+ transform: (e, t) => {
1001
+ const r = g(t), i = [];
1002
+ return r["foaf:thumbnail"]?.["rdf:resource"] && i.push(r["foaf:thumbnail"]["rdf:resource"]), r["dcterms:creator"]?.["foaf:thumbnail"]?.["rdf:resource"] && i.push(
1003
+ r["dcterms:creator"]["foaf:thumbnail"]["rdf:resource"]
1004
+ ), i;
1005
+ },
1006
+ itemFields: {
1007
+ "@id": (e, t, r) => {
1008
+ const i = e.split("/").pop() || `image-${t}`;
1009
+ return `${r.temsImageBase || "https://api.tems.example.com/images/"}${encodeURIComponent(i)}/`;
1010
+ },
1011
+ url: (e) => e,
1012
+ iframe: () => !1,
1013
+ name: (e) => e.split("/").pop() || "image"
1014
+ }
1015
+ }
1016
+ },
1017
+ nestedObjects: {
1018
+ provider: {
1019
+ source: [],
1020
+ type: "tems:Provider",
1021
+ fields: {
1022
+ "@id": {
1023
+ source: [],
1024
+ transform: (e, t, r) => {
1025
+ const i = r.providerParticipantId || r.providerName || "unknown";
1026
+ return `${r.temsProviderBase || "https://api.tems.example.com/providers/"}${encodeURIComponent(i)}/`;
1027
+ }
1028
+ },
1029
+ name: {
1030
+ source: [],
1031
+ transform: (e, t, r) => g(t)["dcterms:creator"]?.["foaf:name"] || r.providerName || ""
1032
+ },
1033
+ image: {
1034
+ source: [],
1035
+ transform: (e, t, r) => {
1036
+ const s = g(t)["dcterms:creator"]?.["foaf:thumbnail"]?.["rdf:resource"];
1037
+ if (!s) return;
1038
+ const o = s.split("/").pop() || "provider-logo";
1039
+ return {
1040
+ // FIXME: Avoid magic strings
1041
+ "@id": `${r.temsImageBase || "https://api.tems.example.com/images/"}${encodeURIComponent(o)}/`,
1042
+ "@type": "tems:Image",
1043
+ iframe: !1,
1044
+ url: s,
1045
+ name: o
1046
+ };
1047
+ }
1048
+ }
1049
+ }
1050
+ }
1051
+ },
1052
+ contractFields: {
1053
+ counterPartyAddress: {
1054
+ source: [],
1055
+ transform: (e, t, r) => r.providerAddress
1056
+ },
1057
+ counterPartyId: {
1058
+ source: [],
1059
+ transform: (e, t, r) => r.providerParticipantId || r.providerName
1060
+ },
1061
+ assetId: {
1062
+ source: ["@id"],
1063
+ transform: (e, t) => M(e || t.id || "")
1064
+ },
1065
+ datasetId: {
1066
+ source: ["@id"],
1067
+ transform: (e, t) => M(e || t.id || "")
1068
+ },
1069
+ // Index endpoint URL for index assets - try multiple property variations
1070
+ // Priority: source-level dcat:endpointUrl (index endpoint) over props-level dcat:endpointURL (protocol URL)
1071
+ indexEndpointUrl: {
1072
+ source: [],
1073
+ transform: (e, t, r) => {
1074
+ const i = g(t);
1075
+ console.log("[DSP Mapping] indexEndpointUrl extraction for:", {
1076
+ assetId: t["@id"] || t.id,
1077
+ assetName: t.name || i.name || i["dct:title"],
1078
+ provider: r.providerName,
1079
+ providerParticipantId: r.providerParticipantId,
1080
+ "source.dcat:endpointUrl": t["dcat:endpointUrl"],
1081
+ "props.dcat:endpointUrl": i["dcat:endpointUrl"],
1082
+ "source.dcat:endpointURL": t["dcat:endpointURL"],
1083
+ "props.dcat:accessService": i["dcat:accessService"]
1084
+ });
1085
+ const s = t["dcat:endpointUrl"] || i["dcat:endpointUrl"] || t["dcat:endpointURL"] || i["dcat:accessService"]?.["dcat:endpointUrl"] || i["dcat:accessService"]?.["dcat:endpointURL"] || i.endpointUrl || i.endpointURL || void 0;
1086
+ return console.log("[DSP Mapping] indexEndpointUrl result:", s), s;
1087
+ }
1088
+ },
1089
+ policy: {
1090
+ source: ["odrl:hasPolicy"],
1091
+ fallback: (e) => e.hasPolicy,
1092
+ transform: (e, t, r) => {
1093
+ if (!e) return;
1094
+ const i = Be(e, t);
1095
+ if (i) {
1096
+ const s = (o) => Array.isArray(o) ? o.map((n) => (n["@id"] && (n["@id"] = M(n["@id"])), n)) : o;
1097
+ i["odrl:permission"] && (i["odrl:permission"] = s(
1098
+ i["odrl:permission"]
1099
+ )), i["odrl:prohibition"] && (i["odrl:prohibition"] = s(
1100
+ i["odrl:prohibition"]
1101
+ )), i["odrl:obligation"] && (i["odrl:obligation"] = s(
1102
+ i["odrl:obligation"]
1103
+ ));
1104
+ }
1105
+ return i;
1106
+ }
1107
+ }
1108
+ },
1109
+ // Post-processing to add provider metadata fields
1110
+ postProcess: (e, t, r) => ({
1111
+ ...e,
1112
+ _provider: r.providerName,
1113
+ _providerAddress: r.providerAddress,
1114
+ _providerColor: r.providerColor || "#1976d2",
1115
+ _providerParticipantId: r.providerParticipantId
1116
+ })
1117
+ };
1118
+ var Ve = Object.defineProperty, j = (e, t, r, i) => {
1119
+ for (var s = void 0, o = e.length - 1, n; o >= 0; o--)
1120
+ (n = e[o]) && (s = n(t, r, s) || s);
1121
+ return s && Ve(t, r, s), s;
1122
+ };
1123
+ class C extends v {
1124
+ constructor() {
1125
+ super(...arguments), this.providers = [];
1126
+ }
1127
+ willUpdate(t) {
1128
+ (!this.providers || this.providers.length === 0) && this.component?.parameters?.providers && (this.providers = this.component.parameters.providers || []);
1129
+ }
1130
+ async _attach(t, r, i) {
1131
+ if (!this.orbit && window.orbit && (this.orbit = window.orbit, r)) {
1132
+ if (se({
1133
+ component: this,
1134
+ defaultRoute: t,
1135
+ ignoreRouter: i
1136
+ }), this.route && (this.component = this.orbit.getComponentFromRoute(this.route), this.component && this.orbit.components.map((o) => (o.uniq === this.component.uniq && (o.instance = this), o))), !this.participantConnectorUri) {
1137
+ const o = this.component?.parameters;
1138
+ o?.["participant-connector-uri"] && (this.participantConnectorUri = o["participant-connector-uri"]), o?.["participant-api-key"] && (this.participantApiKey = o["participant-api-key"]), o?.providers && (this.providers = o.providers), o?.["participant-id"] && (this.participantId = o["participant-id"]);
1139
+ }
1140
+ const s = this.component?.parameters;
1141
+ if (s?.["api-gateway-config"]) {
1142
+ this.apiGatewayConfig = s["api-gateway-config"];
1143
+ try {
1144
+ this._apiGatewayConfigParsed = typeof this.apiGatewayConfig == "string" ? JSON.parse(this.apiGatewayConfig) : this.apiGatewayConfig;
1145
+ } catch {
1146
+ this._apiGatewayConfigParsed = null;
1147
+ }
1148
+ }
1149
+ if (!this.storeService && this.participantConnectorUri)
1150
+ try {
1151
+ const o = `dsp-connector-${this.component.uniq}`, n = {
1152
+ type: ue.DataspaceConnector,
1153
+ endpoint: this.participantConnectorUri,
1154
+ catalogEndpoint: `${this.participantConnectorUri}/management/v3/catalog/request`,
1155
+ contractNegotiationEndpoint: `${this.participantConnectorUri}/management/v3/contractnegotiations`,
1156
+ transferProcessEndpoint: `${this.participantConnectorUri}/management/v3/transferprocesses`,
1157
+ edrsEndpoint: `${this.participantConnectorUri}/management/v3/edrs`,
1158
+ authMethod: "dsp-api-key",
1159
+ dspApiKey: this.participantApiKey || "password",
1160
+ participantId: this.participantId || "stbx-consumer",
1161
+ retryAttempts: 10,
1162
+ timeout: 3e4,
1163
+ // Include API Gateway configuration ONLY if available
1164
+ ...this._apiGatewayConfigParsed && {
1165
+ apiGatewayConfig: this._apiGatewayConfigParsed
1166
+ }
1167
+ };
1168
+ this.storeService = pe.addStore(o, n), this.dspStoreService = this.storeService, window.dspStore || (window.dspStore = this.storeService);
1169
+ } catch (o) {
1170
+ console.error("DSP Store initialization error:", o);
1171
+ }
1172
+ return await this._afterAttach(), Promise.resolve(!0);
1173
+ }
1174
+ return Promise.resolve(!1);
1175
+ }
1176
+ /**
1177
+ * Fetch catalog from multiple DSP providers
1178
+ */
1179
+ async fetchFederatedCatalog() {
1180
+ if (!this.storeService || !this.providers || this.providers.length === 0)
1181
+ return console.warn("DSP store or providers not configured"), [];
1182
+ try {
1183
+ const t = "https://api.tems.example.com/services/", r = new qe(ze), i = this.providers.map(async (n) => {
1184
+ try {
1185
+ const a = await this.storeService.getCatalog(n.address);
1186
+ if (a?.["dcat:dataset"]) {
1187
+ const l = a["dcat:dataset"], h = Array.isArray(l) ? l : [l], f = a.participantId || a["edc:participantId"] || a["https://w3id.org/edc/v0.0.1/ns/participantId"], u = n.participantId || f;
1188
+ return h.map((b) => {
1189
+ const $ = {
1190
+ temsServiceBase: t,
1191
+ temsCategoryBase: t.replace(
1192
+ "/services/",
1193
+ "/providers/categories/"
1194
+ ),
1195
+ temsImageBase: t.replace(
1196
+ "/services/",
1197
+ "/objects/images/"
1198
+ ),
1199
+ temsProviderBase: t.replace("/services/", "/providers/"),
1200
+ // Provider context for mapping - use config's participantId as authoritative
1201
+ providerName: n.name,
1202
+ providerAddress: n.address,
1203
+ providerColor: n.color,
1204
+ providerParticipantId: u
1205
+ };
1206
+ return r.map(b, $);
1207
+ });
1208
+ }
1209
+ return [];
1210
+ } catch {
1211
+ return [];
1212
+ }
1213
+ });
1214
+ return (await Promise.all(i)).flat();
1215
+ } catch {
1216
+ return [];
1217
+ }
1218
+ }
1219
+ /**
1220
+ * Get current DataspaceConnectorStore instance
1221
+ */
1222
+ getStoreService() {
1223
+ return this.storeService;
1224
+ }
1225
+ }
1226
+ j([
1227
+ y({ attribute: "participant-connector-uri", reflect: !0 })
1228
+ ], C.prototype, "participantConnectorUri");
1229
+ j([
1230
+ y({ attribute: "participant-id", reflect: !0 })
1231
+ ], C.prototype, "participantId");
1232
+ j([
1233
+ y({ attribute: "participant-api-key", reflect: !0 })
1234
+ ], C.prototype, "participantApiKey");
1235
+ j([
1236
+ y({ attribute: "api-gateway-config", reflect: !0 })
1237
+ ], C.prototype, "apiGatewayConfig");
1238
+ j([
1239
+ m()
1240
+ ], C.prototype, "storeService");
1241
+ j([
1242
+ m()
1243
+ ], C.prototype, "dspStoreService");
1244
+ j([
1245
+ m()
1246
+ ], C.prototype, "_apiGatewayConfigParsed");
1247
+ j([
1248
+ y({ type: Array })
1249
+ ], C.prototype, "providers");
1250
+ function We() {
709
1251
  return Math.random().toString(16).slice(2);
710
1252
  }
711
- const jt = ({
712
- component: t,
713
- defaultRoute: e = !1,
714
- ignoreRouter: s = !1
1253
+ const se = ({
1254
+ component: e,
1255
+ defaultRoute: t = !1,
1256
+ ignoreRouter: r = !1
715
1257
  }) => {
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`
1258
+ if (e.uniq || (e.uniq = We(), t && !e.route && !r && (e.route = t)), e._subscriptions = /* @__PURE__ */ new Set(), !r) {
1259
+ e.route || (e.route = e.uniq, window.orbit && (e.route = window.orbit.getRoute(e.uniq))), e.noRouter = !0;
1260
+ let i = document.querySelector("solid-router");
1261
+ for (; i; )
1262
+ e.noRouter = !1, e.currentRoute = i.currentRouteName, e.currentResource = window.sibRouter.currentResource, i = document.querySelector(
1263
+ `[data-view="${i.currentRouteName}"] solid-router`
722
1264
  );
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`
1265
+ e.navigationListener = () => {
1266
+ let s = document.querySelector("solid-router");
1267
+ for (; s; )
1268
+ e.noRouter = !1, e.currentRoute = s.currentRouteName, e.currentResource = window.sibRouter.currentResource, s = document.querySelector(
1269
+ `[data-view="${s.currentRouteName}"] solid-router`
728
1270
  );
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();
1271
+ e.requestUpdate();
1272
+ }, e._subscriptions.add(["navigate", e.navigationListener]);
1273
+ }
1274
+ e._subscribe = () => {
1275
+ e._unsubscribe();
1276
+ for (const i of e._subscriptions)
1277
+ document.addEventListener(i[0], i[1]);
1278
+ }, e._unsubscribe = () => {
1279
+ for (const i of e._subscriptions)
1280
+ document.removeEventListener(i[0], i[1]);
1281
+ }, e._subscribe();
740
1282
  };
741
- function Te(t) {
742
- return !Number.isNaN(new Date(t).getTime());
1283
+ function zt(e) {
1284
+ return !Number.isNaN(new Date(e).getTime());
743
1285
  }
744
- const le = (t, e, s) => {
745
- if (t == null)
1286
+ const vt = (e, t, r) => {
1287
+ if (e == null)
746
1288
  return !1;
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];
1289
+ const i = t.split(".");
1290
+ let s = e;
1291
+ for (const o of i)
1292
+ if (s && typeof s == "object" && o in s)
1293
+ s = s[o];
752
1294
  else
753
1295
  return !1;
754
- if (Te(i)) {
755
- if (new Date(i) > s)
1296
+ if (zt(s)) {
1297
+ if (new Date(s) > r)
756
1298
  return !0;
757
1299
  } else
758
1300
  return !1;
759
- return Array.isArray(t) ? t.some(
760
- (o) => le(o, e, s)
761
- ) : typeof t == "object" ? Object.entries(t).some(([o, n]) => o === e && Te(n) ? !1 : le(n, e, s)) : !1;
762
- }, Rt = (t, e, s) => {
763
- if (!e || !s || typeof s != "string")
764
- return t;
765
- const r = new Date(s);
766
- return Number.isNaN(r.getTime()) ? (console.warn(`Invalid threshold date provided: ${s}`), t) : t.filter(
767
- (i) => le(i, e, r)
1301
+ return Array.isArray(e) ? e.some(
1302
+ (o) => vt(o, t, r)
1303
+ ) : typeof e == "object" ? Object.entries(e).some(([o, n]) => o === t && zt(n) ? !1 : vt(n, t, r)) : !1;
1304
+ }, Ke = (e, t, r) => {
1305
+ if (!t || !r || typeof r != "string")
1306
+ return e;
1307
+ const i = new Date(r);
1308
+ return Number.isNaN(i.getTime()) ? (console.warn(`Invalid threshold date provided: ${r}`), e) : e.filter(
1309
+ (s) => vt(s, t, i)
768
1310
  );
769
- }, Ot = (t, e, s) => !e || !s ? t : t.filter((r) => {
770
- let i = r;
771
- const o = e.split(".");
1311
+ }, Ge = (e, t, r) => !t || !r ? e : e.filter((i) => {
1312
+ let s = i;
1313
+ const o = t.split(".");
772
1314
  for (const a of o)
773
- if (i && typeof i == "object" && a in i)
774
- i = i[a];
1315
+ if (s && typeof s == "object" && a in s)
1316
+ s = s[a];
775
1317
  else
776
1318
  return !1;
777
- const n = i;
778
- return n ? typeof n == "object" && !Array.isArray(n) && n !== null && "@id" in n && n["@id"] === s ? !0 : Array.isArray(n) ? n.some(
779
- (a) => typeof a == "object" && a !== null && "@id" in a && a["@id"] === s
1319
+ const n = s;
1320
+ return n ? typeof n == "object" && !Array.isArray(n) && n !== null && "@id" in n && n["@id"] === r ? !0 : Array.isArray(n) ? n.some(
1321
+ (a) => typeof a == "object" && a !== null && "@id" in a && a["@id"] === r
780
1322
  ) : !1 : !1;
781
1323
  });
782
- function kt(t) {
783
- return typeof t != "string" && typeof t != "number" && !(t instanceof Date) ? !1 : !Number.isNaN(new Date(t).getTime());
1324
+ function Je(e) {
1325
+ return typeof e != "string" && typeof e != "number" && !(e instanceof Date) ? !1 : !Number.isNaN(new Date(e).getTime());
784
1326
  }
785
- const ce = (t, e, s, r) => {
786
- if (t == null)
1327
+ const bt = (e, t, r, i) => {
1328
+ if (e == null)
787
1329
  return !1;
788
- const i = e.split(".");
789
- let o = t;
790
- for (const n of i)
1330
+ const s = t.split(".");
1331
+ let o = e;
1332
+ for (const n of s)
791
1333
  if (o && typeof o == "object" && n in o)
792
1334
  o = o[n];
793
1335
  else
794
1336
  return !1;
795
1337
  if (typeof o == "number") {
796
- if (typeof s == "number" && typeof r == "number" && s <= o && o <= r)
1338
+ if (typeof r == "number" && typeof i == "number" && r <= o && o <= i)
797
1339
  return !0;
798
- } else if (kt(o)) {
1340
+ } else if (Je(o)) {
799
1341
  const n = new Date(o);
800
- if (s instanceof Date && r instanceof Date && s <= n && n <= r)
1342
+ if (r instanceof Date && i instanceof Date && r <= n && n <= i)
801
1343
  return !0;
802
1344
  } else
803
1345
  return !1;
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)
1346
+ return Array.isArray(e) ? e.some(
1347
+ (n) => bt(n, t, r, i)
1348
+ ) : typeof e == "object" ? Object.entries(e).some(
1349
+ ([n, a]) => bt(a, t, r, i)
808
1350
  ) : !1;
809
- }, Tt = (t, e, s) => {
810
- if (!e || !s || typeof s != "string")
811
- return t;
812
- const [r, i] = s.split("/").map(Number);
813
- return Number.isNaN(r) || Number.isNaN(i) ? t : r > i ? (console.warn(`Start number is after end number in interval: ${s}`), t) : t.filter(
814
- (o) => ce(o, e, r, i)
1351
+ }, Ze = (e, t, r) => {
1352
+ if (!t || !r || typeof r != "string")
1353
+ return e;
1354
+ const [i, s] = r.split("/").map(Number);
1355
+ return Number.isNaN(i) || Number.isNaN(s) ? e : i > s ? (console.warn(`Start number is after end number in interval: ${r}`), e) : e.filter(
1356
+ (o) => bt(o, t, i, s)
815
1357
  );
816
- }, de = (t, e, s) => {
817
- if (t == null)
1358
+ }, $t = (e, t, r) => {
1359
+ if (e == null)
818
1360
  return 0;
819
- if (typeof t != "object") {
820
- const i = String(t).toLowerCase(), o = e.replace(
1361
+ if (typeof e != "object") {
1362
+ const s = String(e).toLowerCase(), o = t.replace(
821
1363
  /[.*+?^${}()|[\]\\]/g,
822
1364
  "\\$&"
823
1365
  ), n = new RegExp(`\\b${o}\\b`);
824
1366
  let a = 0;
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(
1367
+ return n.test(s) ? a = 2 : s.includes(t) && (a = 1), a;
1368
+ }
1369
+ if (Array.isArray(e)) {
1370
+ let s = 0;
1371
+ for (const o of e)
1372
+ if (s = Math.max(
1373
+ s,
1374
+ $t(
833
1375
  o,
834
- e
1376
+ t
835
1377
  )
836
- ), i === 2) break;
837
- return i;
1378
+ ), s === 2) break;
1379
+ return s;
838
1380
  }
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
1381
+ let i = 0;
1382
+ for (const s of Object.values(e))
1383
+ if (i = Math.max(
1384
+ i,
1385
+ $t(
1386
+ s,
1387
+ t
846
1388
  )
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) => {
1389
+ ), i === 2) break;
1390
+ return i;
1391
+ }, Xe = (e, t, r) => {
1392
+ if (!t || !r || r.trim() === "")
1393
+ return e;
1394
+ const i = r.toLowerCase(), o = e.map((n) => {
853
1395
  let a = n;
854
- const l = e.split(".");
855
- for (const u of l)
856
- if (a && typeof a == "object" && u in a)
857
- a = a[u];
1396
+ const l = t.split(".");
1397
+ for (const f of l)
1398
+ if (a && typeof a == "object" && f in a)
1399
+ a = a[f];
858
1400
  else {
859
1401
  a = null;
860
1402
  break;
861
1403
  }
862
- let d = 0;
863
- return a && (d = de(a, r)), { obj: n, score: d };
1404
+ let h = 0;
1405
+ return a && (h = $t(a, i)), { obj: n, score: h };
864
1406
  }).filter((n) => n.score > 0);
865
1407
  return o.sort((n, a) => a.score - n.score), o.map((n) => n.obj);
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)
1408
+ }, Qe = (e, t) => t ? e.filter((r) => {
1409
+ const i = r["@type"];
1410
+ return i ? typeof i == "string" ? i === t : Array.isArray(i) ? i.some((s) => s === t) : !1 : !1;
1411
+ }) : e, _t = (e, t, r) => {
1412
+ if (e == null)
871
1413
  return 0;
872
- if (typeof t != "object") {
873
- const i = String(t).toLowerCase(), o = e.replace(
1414
+ if (typeof e != "object") {
1415
+ const s = String(e).toLowerCase(), o = t.replace(
874
1416
  /[.*+?^${}()|[\]\\]/g,
875
1417
  "\\$&"
876
1418
  ), n = new RegExp(`\\b${o}\\b`);
877
1419
  let a = 0;
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;
1420
+ return n.test(s) ? r === "name" || r === "title" ? a = 4 : a = 3 : s.includes(t) && (r === "name" || r === "title" ? a = 2 : a = 1), a;
888
1421
  }
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) => ({
1422
+ if (Array.isArray(e)) {
1423
+ let s = 0;
1424
+ for (const o of e)
1425
+ if (s = Math.max(
1426
+ s,
1427
+ _t(o, t)
1428
+ ), s === 4) break;
1429
+ return s;
1430
+ }
1431
+ let i = 0;
1432
+ for (const [s, o] of Object.entries(e))
1433
+ if (i = Math.max(
1434
+ i,
1435
+ _t(o, t, s)
1436
+ ), i === 4) break;
1437
+ return i;
1438
+ }, ie = (e, t) => {
1439
+ if (!t || t.trim() === "")
1440
+ return e;
1441
+ const r = t.toLowerCase(), s = e.map((o) => ({
900
1442
  obj: o,
901
- score: he(o, s)
1443
+ score: _t(o, r)
902
1444
  })).filter((o) => o.score > 0);
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
- return s;
909
- }, U = (t, e, s = "asc") => t.sort((r, i) => {
910
- let o = r, n = i;
911
- Array.isArray(e) ? (o = De(r, e), n = De(i, e)) : (o = r[e], n = i[e]);
1445
+ return s.sort((o, n) => n.score - o.score), s.map((o) => o.obj);
1446
+ }, Vt = (e, t) => {
1447
+ let r = e;
1448
+ for (let i = 0; i < t.length && (r && t[i] in r); i++)
1449
+ r = r[t[i]];
1450
+ return r;
1451
+ }, S = (e, t, r = "asc") => e.sort((i, s) => {
1452
+ let o = i, n = s;
1453
+ Array.isArray(t) ? (o = Vt(i, t), n = Vt(s, t)) : (o = i[t], n = s[t]);
912
1454
  let a = 0;
913
1455
  if (typeof o == "number" && typeof n == "number")
914
1456
  a = o - n;
@@ -917,179 +1459,179 @@ const ce = (t, e, s, r) => {
917
1459
  else if (o instanceof Date && n instanceof Date)
918
1460
  a = o.getTime() - n.getTime();
919
1461
  else
920
- throw new TypeError(`Unsupported data type for key "${e}"`);
921
- return s === "asc" ? a : -a;
922
- }), N = (t, e = {
1462
+ throw new TypeError(`Unsupported data type for key "${t}"`);
1463
+ return r === "asc" ? a : -a;
1464
+ }), D = (e, t = {
923
1465
  day: "2-digit",
924
1466
  month: "2-digit",
925
1467
  year: "2-digit"
926
1468
  }) => {
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) => {
1469
+ if (!e) return "";
1470
+ const i = (typeof e == "string" ? new Date(e) : e).toLocaleString(void 0, t);
1471
+ return typeof e == "string" && i === "Invalid Date" ? e : i;
1472
+ }, N = (e, t = !1) => {
931
1473
  window.dispatchEvent(
932
1474
  new CustomEvent("requestNavigation", {
933
1475
  detail: {
934
- route: t,
935
- resource: typeof e == "string" ? { "@id": e } : e
1476
+ route: e,
1477
+ resource: typeof t == "string" ? { "@id": t } : t
936
1478
  }
937
1479
  })
938
1480
  );
939
- }, Lt = "https://cdn.startinblox.com/owl/ds4go.jsonld#", Ut = { "@id": "ds4go:link", "@type": "@id" }, Nt = { "@id": "ds4go:enclosure", "@type": "@id" }, Ft = { "@id": "ds4go:url", "@type": "@id" }, Me = {
940
- ds4go: Lt,
941
- link: Ut,
942
- enclosure: Nt,
943
- url: Ft
1481
+ }, Ye = "https://cdn.startinblox.com/owl/ds4go.jsonld#", tr = { "@id": "ds4go:link", "@type": "@id" }, er = { "@id": "ds4go:enclosure", "@type": "@id" }, rr = { "@id": "ds4go:url", "@type": "@id" }, Wt = {
1482
+ ds4go: Ye,
1483
+ link: tr,
1484
+ enclosure: er,
1485
+ url: rr
944
1486
  };
945
- const ue = "lit-localize-status";
946
- const Bt = (t, ...e) => ({
1487
+ const wt = "lit-localize-status";
1488
+ const sr = (e, ...t) => ({
947
1489
  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;
1490
+ strings: e,
1491
+ values: t
1492
+ }), q = sr, ir = (e) => typeof e != "string" && "strTag" in e, oe = (e, t, r) => {
1493
+ let i = e[0];
1494
+ for (let s = 1; s < e.length; s++)
1495
+ i += t[r ? r[s - 1] : s - 1], i += e[s];
1496
+ return i;
955
1497
  };
956
- const Ge = ((t) => Ht(t) ? Ke(t.strings, t.values) : t);
957
- let f = Ge, Le = !1;
958
- function qt(t) {
959
- if (Le)
1498
+ const ne = ((e) => ir(e) ? oe(e.strings, e.values) : e);
1499
+ let p = ne, Kt = !1;
1500
+ function or(e) {
1501
+ if (Kt)
960
1502
  throw new Error("lit-localize can only be configured once");
961
- f = t, Le = !0;
1503
+ p = e, Kt = !0;
962
1504
  }
963
- class zt {
964
- constructor(e) {
965
- this.__litLocalizeEventHandler = (s) => {
966
- s.detail.status === "ready" && this.host.requestUpdate();
967
- }, this.host = e;
1505
+ class nr {
1506
+ constructor(t) {
1507
+ this.__litLocalizeEventHandler = (r) => {
1508
+ r.detail.status === "ready" && this.host.requestUpdate();
1509
+ }, this.host = t;
968
1510
  }
969
1511
  hostConnected() {
970
- window.addEventListener(ue, this.__litLocalizeEventHandler);
1512
+ window.addEventListener(wt, this.__litLocalizeEventHandler);
971
1513
  }
972
1514
  hostDisconnected() {
973
- window.removeEventListener(ue, this.__litLocalizeEventHandler);
1515
+ window.removeEventListener(wt, this.__litLocalizeEventHandler);
974
1516
  }
975
1517
  }
976
- const It = (t) => t.addController(new zt(t)), Vt = It;
977
- const Wt = () => (t, e) => (t.addInitializer(Vt), t);
978
- class Ze {
1518
+ const ar = (e) => e.addController(new nr(e)), cr = ar;
1519
+ const lr = () => (e, t) => (e.addInitializer(cr), e);
1520
+ class ae {
979
1521
  constructor() {
980
- this.settled = !1, this.promise = new Promise((e, s) => {
981
- this._resolve = e, this._reject = s;
1522
+ this.settled = !1, this.promise = new Promise((t, r) => {
1523
+ this._resolve = t, this._reject = r;
982
1524
  });
983
1525
  }
984
- resolve(e) {
985
- this.settled = !0, this._resolve(e);
1526
+ resolve(t) {
1527
+ this.settled = !0, this._resolve(t);
986
1528
  }
987
- reject(e) {
988
- this.settled = !0, this._reject(e);
1529
+ reject(t) {
1530
+ this.settled = !0, this._reject(t);
989
1531
  }
990
1532
  }
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];
1533
+ const A = [];
1534
+ for (let e = 0; e < 256; e++)
1535
+ A[e] = (e >> 4 & 15).toString(16) + (e & 15).toString(16);
1536
+ function dr(e) {
1537
+ let t = 0, r = 8997, i = 0, s = 33826, o = 0, n = 40164, a = 0, l = 52210;
1538
+ for (let h = 0; h < e.length; h++)
1539
+ r ^= e.charCodeAt(h), t = r * 435, i = s * 435, o = n * 435, a = l * 435, o += r << 8, a += s << 8, i += t >>> 16, r = t & 65535, o += i >>> 16, s = i & 65535, l = a + (o >>> 16) & 65535, n = o & 65535;
1540
+ return A[l >> 8] + A[l & 255] + A[n >> 8] + A[n & 255] + A[s >> 8] + A[s & 255] + A[r >> 8] + A[r & 255];
999
1541
  }
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));
1542
+ const hr = "", ur = "h", pr = "s";
1543
+ function fr(e, t) {
1544
+ return (t ? ur : pr) + dr(typeof e == "string" ? e : e.join(hr));
1003
1545
  }
1004
- const Ue = /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ new Map();
1005
- function Qt(t, e, s) {
1006
- if (t) {
1007
- const r = s?.id ?? Yt(e), i = t[r];
1008
- if (i) {
1009
- if (typeof i == "string")
1010
- return i;
1011
- if ("strTag" in i)
1012
- return Ke(
1013
- i.strings,
1546
+ const Gt = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new Map();
1547
+ function mr(e, t, r) {
1548
+ if (e) {
1549
+ const i = r?.id ?? gr(t), s = e[i];
1550
+ if (s) {
1551
+ if (typeof s == "string")
1552
+ return s;
1553
+ if ("strTag" in s)
1554
+ return oe(
1555
+ s.strings,
1014
1556
  // Cast `template` because its type wasn't automatically narrowed (but
1015
1557
  // we know it must be the same type as `localized`).
1016
- e.values,
1017
- i.values
1558
+ t.values,
1559
+ s.values
1018
1560
  );
1019
1561
  {
1020
- let o = Ue.get(i);
1021
- return o === void 0 && (o = i.values, Ue.set(i, o)), {
1022
- ...i,
1023
- values: o.map((n) => e.values[n])
1562
+ let o = Gt.get(s);
1563
+ return o === void 0 && (o = s.values, Gt.set(s, o)), {
1564
+ ...s,
1565
+ values: o.map((n) => t.values[n])
1024
1566
  };
1025
1567
  }
1026
1568
  }
1027
1569
  }
1028
- return Ge(e);
1570
+ return ne(t);
1029
1571
  }
1030
- function Yt(t) {
1031
- const e = typeof t == "string" ? t : t.strings;
1032
- let s = Ne.get(e);
1033
- return s === void 0 && (s = Xt(e, typeof t != "string" && !("strTag" in t)), Ne.set(e, s)), s;
1572
+ function gr(e) {
1573
+ const t = typeof e == "string" ? e : e.strings;
1574
+ let r = Jt.get(t);
1575
+ return r === void 0 && (r = fr(t, typeof e != "string" && !("strTag" in e)), Jt.set(t, r)), r;
1034
1576
  }
1035
- function ne(t) {
1036
- window.dispatchEvent(new CustomEvent(ue, { detail: t }));
1577
+ function gt(e) {
1578
+ window.dispatchEvent(new CustomEvent(wt, { detail: e }));
1037
1579
  }
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)
1580
+ let at = "", yt, ce, ct, At, le, O = new ae();
1581
+ O.resolve();
1582
+ let st = 0;
1583
+ const yr = (e) => (or(((t, r) => mr(le, t, r))), at = ce = e.sourceLocale, ct = new Set(e.targetLocales), ct.add(e.sourceLocale), At = e.loadLocale, { getLocale: vr, setLocale: br }), vr = () => at, br = (e) => {
1584
+ if (e === (yt ?? at))
1585
+ return O.promise;
1586
+ if (!ct || !At)
1045
1587
  throw new Error("Internal error");
1046
- if (!Q.has(t))
1588
+ if (!ct.has(e))
1047
1589
  throw new Error("Invalid locale code");
1048
- W++;
1049
- const e = W;
1050
- return ae = t, C.settled && (C = new Ze()), ne({ status: "loading", loadingLocale: t }), (t === Je ? (
1590
+ st++;
1591
+ const t = st;
1592
+ return yt = e, O.settled && (O = new ae()), gt({ status: "loading", loadingLocale: e }), (e === ce ? (
1051
1593
  // We could switch to the source locale synchronously, but we prefer to
1052
1594
  // queue it on a microtask so that switching locales is consistently
1053
1595
  // asynchronous.
1054
1596
  Promise.resolve({ templates: void 0 })
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({
1597
+ ) : At(e)).then((i) => {
1598
+ st === t && (at = e, yt = void 0, le = i.templates, gt({ status: "ready", readyLocale: e }), O.resolve());
1599
+ }, (i) => {
1600
+ st === t && (gt({
1059
1601
  status: "error",
1060
- errorLocale: t,
1061
- errorMessage: r.toString()
1062
- }), C.reject(r));
1063
- }), C.promise;
1602
+ errorLocale: e,
1603
+ errorMessage: i.toString()
1604
+ }), O.reject(i));
1605
+ }), O.promise;
1064
1606
  };
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;
1607
+ var $r = Object.defineProperty, _r = Object.getOwnPropertyDescriptor, Ut = (e, t, r, i) => {
1608
+ for (var s = i > 1 ? void 0 : i ? _r(t, r) : t, o = e.length - 1, n; o >= 0; o--)
1609
+ (n = e[o]) && (s = (i ? n(t, r, s) : n(s)) || s);
1610
+ return i && s && $r(t, r, s), s;
1069
1611
  };
1070
- let q = class extends be {
1612
+ let X = class extends Et {
1071
1613
  constructor() {
1072
1614
  super(...arguments), this.search = [], this._displayObjects = [];
1073
1615
  }
1074
- filter(t, e = []) {
1075
- if (!e || e.length === 0 || !t || t.length === 0)
1076
- return t;
1077
- const s = /* @__PURE__ */ new Map();
1078
- for (const i of e) {
1079
- const o = i.name, n = s.get(o) || [];
1080
- n.push(i), s.set(o, n);
1616
+ filter(e, t = []) {
1617
+ if (!t || t.length === 0 || !e || e.length === 0)
1618
+ return e;
1619
+ const r = /* @__PURE__ */ new Map();
1620
+ for (const s of t) {
1621
+ const o = s.name, n = r.get(o) || [];
1622
+ n.push(s), r.set(o, n);
1081
1623
  }
1082
- let r = [...t];
1083
- for (const i of s.values()) {
1084
- if (r.length === 0)
1624
+ let i = [...e];
1625
+ for (const s of r.values()) {
1626
+ if (i.length === 0)
1085
1627
  break;
1086
1628
  const o = [];
1087
- for (const n of i)
1629
+ for (const n of s)
1088
1630
  switch (n.type) {
1089
1631
  case "interval":
1090
1632
  o.push(
1091
- Tt(
1092
- r,
1633
+ Ze(
1634
+ i,
1093
1635
  n.name,
1094
1636
  n.value
1095
1637
  )
@@ -1097,8 +1639,8 @@ let q = class extends be {
1097
1639
  break;
1098
1640
  case "dateAfter":
1099
1641
  o.push(
1100
- Rt(
1101
- r,
1642
+ Ke(
1643
+ i,
1102
1644
  n.name,
1103
1645
  n.value
1104
1646
  )
@@ -1106,8 +1648,8 @@ let q = class extends be {
1106
1648
  break;
1107
1649
  case "matchId":
1108
1650
  o.push(
1109
- Ot(
1110
- r,
1651
+ Ge(
1652
+ i,
1111
1653
  n.name,
1112
1654
  n.value
1113
1655
  )
@@ -1115,13 +1657,13 @@ let q = class extends be {
1115
1657
  break;
1116
1658
  case "matchType":
1117
1659
  o.push(
1118
- Mt(r, n.value)
1660
+ Qe(i, n.value)
1119
1661
  );
1120
1662
  break;
1121
1663
  case "exact":
1122
1664
  o.push(
1123
- Dt(
1124
- r,
1665
+ Xe(
1666
+ i,
1125
1667
  n.name,
1126
1668
  n.value
1127
1669
  )
@@ -1129,46 +1671,46 @@ let q = class extends be {
1129
1671
  break;
1130
1672
  default:
1131
1673
  o.push(
1132
- We(r, n.value)
1674
+ ie(i, n.value)
1133
1675
  );
1134
1676
  }
1135
- r = [...o.flat()];
1677
+ i = [...o.flat()];
1136
1678
  }
1137
- return r;
1679
+ return i;
1138
1680
  }
1139
- _handleClickEvent(t) {
1140
- this.dispatchEvent(new CustomEvent("clicked", { detail: t }));
1681
+ _handleClickEvent(e) {
1682
+ this.dispatchEvent(new CustomEvent("clicked", { detail: e }));
1141
1683
  }
1142
- willUpdate(t) {
1143
- (t.has("objects") || t.has("search")) && (this.objects ? this._displayObjects = this.filter(this.objects, this.search) : this._displayObjects = [], this.dispatchEvent(
1684
+ willUpdate(e) {
1685
+ (e.has("objects") || e.has("search")) && (this.objects ? this._displayObjects = this.filter(this.objects, this.search) : this._displayObjects = [], this.dispatchEvent(
1144
1686
  new CustomEvent("result-count", {
1145
1687
  detail: this._displayObjects.length
1146
1688
  })
1147
1689
  ));
1148
1690
  }
1149
1691
  render() {
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 = [
1692
+ return !this._displayObjects || this._displayObjects.length === 0 ? c : d`<div class="card-grid card-grid-vertical">
1693
+ ${this._displayObjects.map((e) => {
1694
+ const t = [
1153
1695
  {
1154
- name: `${t.facts.length} ${t.facts.length > 1 ? f("facts") : f("fact")}`,
1696
+ name: `${e.facts.length} ${e.facts.length > 1 ? p("facts") : p("fact")}`,
1155
1697
  type: "information"
1156
1698
  }
1157
1699
  ];
1158
- return p`<tems-card-catalog
1700
+ return d`<tems-card-catalog
1159
1701
  .object=${c}
1160
1702
  type=${"bill-image"}
1161
- .tags=${e}
1162
- .header=${t.name || c}
1163
- .content=${t.description || c}
1164
- date=${t.updated_at || c}
1165
- @click=${() => this._handleClickEvent(t)}
1703
+ .tags=${t}
1704
+ .header=${e.name || c}
1705
+ .content=${e.description || c}
1706
+ date=${e.updated_at || c}
1707
+ @click=${() => this._handleClickEvent(e)}
1166
1708
  ></tems-card-catalog>`;
1167
1709
  })}
1168
1710
  </div>`;
1169
1711
  }
1170
1712
  };
1171
- q.styles = ee`
1713
+ X.styles = Y`
1172
1714
  .card-grid {
1173
1715
  display: flex;
1174
1716
  flex-direction: row;
@@ -1186,22 +1728,22 @@ q.styles = ee`
1186
1728
  cursor: pointer;
1187
1729
  }
1188
1730
  `;
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;
1731
+ Ut([
1732
+ m()
1733
+ ], X.prototype, "search", 2);
1734
+ Ut([
1735
+ m()
1736
+ ], X.prototype, "_displayObjects", 2);
1737
+ X = Ut([
1738
+ V("ds4go-fact-bundle-holder")
1739
+ ], X);
1740
+ const wr = ".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}}";
1741
+ var Ar = Object.defineProperty, Cr = Object.getOwnPropertyDescriptor, de = (e, t, r, i) => {
1742
+ for (var s = i > 1 ? void 0 : i ? Cr(t, r) : t, o = e.length - 1, n; o >= 0; o--)
1743
+ (n = e[o]) && (s = (i ? n(t, r, s) : n(s)) || s);
1744
+ return i && s && Ar(t, r, s), s;
1203
1745
  };
1204
- let Y = class extends wt {
1746
+ let lt = class extends Le {
1205
1747
  constructor() {
1206
1748
  super(...arguments), this.object = { "@id": "" };
1207
1749
  }
@@ -1209,12 +1751,12 @@ let Y = class extends wt {
1209
1751
  this.dispatchEvent(new CustomEvent("close"));
1210
1752
  }
1211
1753
  render() {
1212
- return p`<div class="modal">
1754
+ return d`<div class="modal">
1213
1755
  <div class="topbar">
1214
1756
  <tems-button
1215
1757
  @click=${this._closeModal}
1216
1758
  type="outline-gray"
1217
- .iconLeft=${p`<icon-material-symbols-close-rounded></icon-material-symbols-close-rounded>`}
1759
+ .iconLeft=${d`<icon-material-symbols-close-rounded></icon-material-symbols-close-rounded>`}
1218
1760
  ></tems-button>
1219
1761
  </div>
1220
1762
  <div class="modal-content-wrapper">
@@ -1227,37 +1769,37 @@ let Y = class extends wt {
1227
1769
  ><div>${String(this.object.description)}</div></tems-division
1228
1770
  >
1229
1771
  <tems-division type="h4"
1230
- ><div>${f("All facts in this bundle")}</div></tems-division
1772
+ ><div>${p("All facts in this bundle")}</div></tems-division
1231
1773
  >
1232
1774
  <div class="card-grid card-grid-vertical">
1233
- ${this.object.facts.map((t) => {
1234
- const e = t.categories.map((s) => ({
1235
- name: s.name,
1775
+ ${this.object.facts.map((e) => {
1776
+ const t = e.categories.map((r) => ({
1777
+ name: r.name,
1236
1778
  type: "information"
1237
1779
  }));
1238
- if (e.length > 3) {
1239
- const s = e.length - 3;
1240
- e.splice(3, s), e.push({
1241
- name: `+${s} ${f("more")}`,
1780
+ if (t.length > 3) {
1781
+ const r = t.length - 3;
1782
+ t.splice(3, r), t.push({
1783
+ name: `+${r} ${p("more")}`,
1242
1784
  type: "information"
1243
1785
  });
1244
1786
  }
1245
- return p`<tems-card-catalog
1787
+ return d`<tems-card-catalog
1246
1788
  .object=${c}
1247
- .tags=${e}
1248
- .header=${t.name || c}
1249
- .content=${t.description || c}
1250
- date=${t.updated_at || c}
1789
+ .tags=${t}
1790
+ .header=${e.name || c}
1791
+ .content=${e.description || c}
1792
+ date=${e.updated_at || c}
1251
1793
  ></tems-card-catalog>`;
1252
1794
  })}
1253
1795
  </div>
1254
1796
  <tems-division type="body-sm"
1255
1797
  ><div>
1256
1798
  <div>
1257
- ${f("Bundle created on")} ${String(this.object.created_at)}
1799
+ ${p("Bundle created on")} ${String(this.object.created_at)}
1258
1800
  </div>
1259
1801
  <div>
1260
- ${f("Bundle updated on")} ${String(this.object.updated_at)}
1802
+ ${p("Bundle updated on")} ${String(this.object.updated_at)}
1261
1803
  </div>
1262
1804
  </div></tems-division
1263
1805
  >
@@ -1267,27 +1809,27 @@ let Y = class extends wt {
1267
1809
  </div>`;
1268
1810
  }
1269
1811
  };
1270
- Y.styles = ee`
1271
- ${ge(os)}
1812
+ lt.styles = Y`
1813
+ ${St(wr)}
1272
1814
  `;
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 {
1815
+ de([
1816
+ y({ attribute: !1, type: Object })
1817
+ ], lt.prototype, "object", 2);
1818
+ lt = de([
1819
+ V("ds4go-fact-bundle-modal"),
1820
+ lr()
1821
+ ], lt);
1822
+ const xr = /* @__PURE__ */ Symbol();
1823
+ class pt {
1282
1824
  get taskComplete() {
1283
- return this.t || (this.i === 1 ? this.t = new Promise(((e, s) => {
1284
- this.o = e, this.h = s;
1825
+ return this.t || (this.i === 1 ? this.t = new Promise(((t, r) => {
1826
+ this.o = t, this.h = r;
1285
1827
  })) : this.i === 3 ? this.t = Promise.reject(this.l) : this.t = Promise.resolve(this.u)), this.t;
1286
1828
  }
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?.());
1829
+ constructor(t, r, i) {
1830
+ this.p = 0, this.i = 0, (this._ = t).addController(this);
1831
+ const s = typeof r == "object" ? r : { task: r, args: i };
1832
+ this.v = s.task, this.j = s.args, this.m = s.argsEqual ?? Sr, this.k = s.onComplete, this.A = s.onError, this.autoRun = s.autoRun ?? !0, "initialValue" in s && (this.u = s.initialValue, this.i = 2, this.O = this.T?.());
1291
1833
  }
1292
1834
  hostUpdate() {
1293
1835
  this.autoRun === !0 && this.S();
@@ -1297,48 +1839,48 @@ class Ye {
1297
1839
  }
1298
1840
  T() {
1299
1841
  if (this.j === void 0) return;
1300
- const e = this.j();
1301
- if (!Array.isArray(e)) throw Error("The args function must return an array");
1302
- return e;
1842
+ const t = this.j();
1843
+ if (!Array.isArray(t)) throw Error("The args function must return an array");
1844
+ return t;
1303
1845
  }
1304
1846
  async S() {
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);
1847
+ const t = this.T(), r = this.O;
1848
+ this.O = t, t === r || t === void 0 || r !== void 0 && this.m(r, t) || await this.run(t);
1307
1849
  }
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;
1850
+ async run(t) {
1851
+ let r, i;
1852
+ 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();
1853
+ const s = ++this.p;
1312
1854
  this.q = new AbortController();
1313
1855
  let o = !1;
1314
1856
  try {
1315
- s = await this.v(e, { signal: this.q.signal });
1857
+ r = await this.v(t, { signal: this.q.signal });
1316
1858
  } catch (n) {
1317
- o = !0, r = n;
1859
+ o = !0, i = n;
1318
1860
  }
1319
- if (this.p === i) {
1320
- if (s === ls) this.i = 0;
1861
+ if (this.p === s) {
1862
+ if (r === xr) this.i = 0;
1321
1863
  else {
1322
1864
  if (o === !1) {
1323
1865
  try {
1324
- this.k?.(s);
1866
+ this.k?.(r);
1325
1867
  } catch {
1326
1868
  }
1327
- this.i = 2, this.o?.(s);
1869
+ this.i = 2, this.o?.(r);
1328
1870
  } else {
1329
1871
  try {
1330
- this.A?.(r);
1872
+ this.A?.(i);
1331
1873
  } catch {
1332
1874
  }
1333
- this.i = 3, this.h?.(r);
1875
+ this.i = 3, this.h?.(i);
1334
1876
  }
1335
- this.u = s, this.l = r;
1877
+ this.u = r, this.l = i;
1336
1878
  }
1337
1879
  this._.requestUpdate();
1338
1880
  }
1339
1881
  }
1340
- abort(e) {
1341
- this.i === 1 && this.q?.abort(e);
1882
+ abort(t) {
1883
+ this.i === 1 && this.q?.abort(t);
1342
1884
  }
1343
1885
  get value() {
1344
1886
  return this.u;
@@ -1349,32 +1891,374 @@ class Ye {
1349
1891
  get status() {
1350
1892
  return this.i;
1351
1893
  }
1352
- render(e) {
1894
+ render(t) {
1353
1895
  switch (this.i) {
1354
1896
  case 0:
1355
- return e.initial?.();
1897
+ return t.initial?.();
1356
1898
  case 1:
1357
- return e.pending?.();
1899
+ return t.pending?.();
1358
1900
  case 2:
1359
- return e.complete?.(this.value);
1901
+ return t.complete?.(this.value);
1360
1902
  case 3:
1361
- return e.error?.(this.error);
1903
+ return t.error?.(this.error);
1362
1904
  default:
1363
1905
  throw Error("Unexpected status: " + this.i);
1364
1906
  }
1365
1907
  }
1366
1908
  }
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;
1909
+ const Sr = (e, t) => e === t || e.length === t.length && e.every(((r, i) => !ht(r, t[i])));
1910
+ var Pr = Object.defineProperty, jr = Object.getOwnPropertyDescriptor, R = (e, t, r, i) => {
1911
+ for (var s = i > 1 ? void 0 : i ? jr(t, r) : t, o = e.length - 1, n; o >= 0; o--)
1912
+ (n = e[o]) && (s = (i ? n(t, r, s) : n(s)) || s);
1913
+ return i && s && Pr(t, r, s), s;
1914
+ };
1915
+ let _ = class extends v {
1916
+ constructor() {
1917
+ super(...arguments), this.search = [], this.resultCount = this.objects?.length || 0, this.cherryPickedProperties = [
1918
+ { key: "dct:title", value: "title" },
1919
+ { key: "dct:description", value: "description" },
1920
+ { key: "dcat:dataset", value: "dataset", expand: !0 },
1921
+ { key: "dct:creator", value: "creator" }
1922
+ ], this.sectors = [], this._getResource = new pt(this, {
1923
+ task: async ([e, t, r]) => {
1924
+ if (!(!e || !this.orbit || !this.noRouter && this.route && this.currentRoute && !this.route.startsWith(this.currentRoute))) {
1925
+ if (this.displayFiltering = !this.component.parameters.disableFiltering, !this.hasCachedDatas) {
1926
+ if (!e) return;
1927
+ this.sectors = [];
1928
+ try {
1929
+ const i = await fetch(e);
1930
+ this.sectors = await i.json(), this.hasCachedDatas = !0;
1931
+ } catch (i) {
1932
+ console.warn(`Failed to fetch sector authority ${e}`, i);
1933
+ return;
1934
+ }
1935
+ }
1936
+ if (t) {
1937
+ this.catalogs = [];
1938
+ const i = this.sectors.filter(
1939
+ (s) => s.id === t
1940
+ );
1941
+ if (i.length > 0 && (this.catalogs = (await Promise.all(
1942
+ i.map(async (s) => {
1943
+ try {
1944
+ return (await (await fetch(
1945
+ `${s.federatedCatalogEndpoint}/discovery`
1946
+ )).json()).catalogs;
1947
+ } catch (o) {
1948
+ return console.warn(
1949
+ `Failed to fetch sector authority ${s.federatedCatalogEndpoint}/discovery`,
1950
+ o
1951
+ ), [];
1952
+ }
1953
+ })
1954
+ )).flat()), r) {
1955
+ const s = this.catalogs.find(
1956
+ (o) => o.catalogId === r
1957
+ );
1958
+ if (s)
1959
+ try {
1960
+ return this.object = await (await fetch(s.endpoints.catalog)).json(), this.object["dcat:dataset"] = S(
1961
+ this.object["dcat:dataset"],
1962
+ "dct:title",
1963
+ "asc"
1964
+ ), this.object;
1965
+ } catch (o) {
1966
+ console.warn(
1967
+ `Failed to fetch catalog from ${s.endpoints.catalog}`,
1968
+ o
1969
+ );
1970
+ return;
1971
+ }
1972
+ }
1973
+ return S(this.catalogs, "catalogId", "asc");
1974
+ }
1975
+ return S(this.sectors, "id", "asc");
1976
+ }
1977
+ },
1978
+ args: () => [
1979
+ this.dataSrc,
1980
+ this.sectorId,
1981
+ this.catalogId,
1982
+ this.caching,
1983
+ this.currentRoute
1984
+ ]
1985
+ });
1986
+ }
1987
+ async _afterAttach() {
1988
+ return this.menuComponent = document.querySelector(
1989
+ `[uniq="${this.orbit?.getComponent("menu")?.uniq}"]`
1990
+ ), Promise.resolve();
1991
+ }
1992
+ _search(e) {
1993
+ e.preventDefault(), this.search = e.detail, this.filterCount = this.search.filter((t) => t.name !== "search").length;
1994
+ }
1995
+ _resultCountUpdate(e) {
1996
+ this.resultCount = e.detail ?? 0;
1997
+ }
1998
+ _back() {
1999
+ this.catalogId ? this.catalogId = "" : this.sectorId && (this.sectorId = "");
2000
+ }
2001
+ _selectSector(e) {
2002
+ this.sectors.find((t) => t.id === e) ? this.sectorId = e : this.sectorId = "";
2003
+ }
2004
+ _selectCatalog(e) {
2005
+ this.catalogs?.find((t) => t.catalogId === e) ? this.catalogId = e : this.catalogId = "";
2006
+ }
2007
+ render() {
2008
+ return this.gatekeeper() || this._getResource.render({
2009
+ pending: () => d`<solid-loader></solid-loader>`,
2010
+ error: (e) => (console.warn("[solid-dsif-explorer-poc] Task error:", e), c),
2011
+ complete: (e) => d`<tems-viewport>
2012
+ <tems-header
2013
+ slot="header"
2014
+ heading=${this.catalogId ? `${p("Datasets from")}
2015
+ ${e["dct:title"]} (From ${this.sectorId})` : this.sectorId ? `${p("Catalogs available in")} ${this.sectorId}` : `${p("Root Authority")}`}
2016
+ >${this.sectorId || this.catalogId ? d` <div slot="cta">
2017
+ <tems-button
2018
+ type="primary"
2019
+ label=${p(
2020
+ q`Back to ${this.catalogId ? this.sectorId : "Root Authority"}`
2021
+ )}
2022
+ @click=${this._back}
2023
+ ></tems-button>
2024
+ </div>` : c}</tems-header
2025
+ >
2026
+ <div slot="content">
2027
+ ${e ? d`<div>
2028
+ ${this.catalogId ? d`<tems-division type="body-m"
2029
+ >${e["dct:description"]}</tems-division
2030
+ >` : c}
2031
+ <div class="card-grid card-grid-vertical">
2032
+ ${this.catalogId ? d`${e["dcat:dataset"].map(
2033
+ (t) => d`<tems-card-catalog
2034
+ .object=${c}
2035
+ type=${"bill-image"}
2036
+ .header=${t["dct:title"] || c}
2037
+ .content=${t["dct:description"] || c}
2038
+ ></tems-card-catalog>`
2039
+ )}` : this.sectorId ? d`${e.map(
2040
+ (t) => d`<tems-card-catalog
2041
+ class="cursor-pointer"
2042
+ .object=${c}
2043
+ type=${"bill-image"}
2044
+ .header=${t.catalogId || c}
2045
+ .content=${t.description || c}
2046
+ date=${D(t.lastUpdated) || c}
2047
+ @click=${() => this._selectCatalog(t.catalogId)}
2048
+ ></tems-card-catalog>`
2049
+ )}` : d`${e.map(
2050
+ (t) => d`<tems-card-catalog
2051
+ class="cursor-pointer"
2052
+ .object=${c}
2053
+ type=${"bill-image"}
2054
+ .header=${t.id || c}
2055
+ .content=${t.description || c}
2056
+ date=${D(t.lastUpdated) || c}
2057
+ @click=${() => this._selectSector(t.id)}
2058
+ ></tems-card-catalog>`
2059
+ )}`}
2060
+ </div>
2061
+ </div>` : d`<p>
2062
+ ${p(
2063
+ "No data available, data source may be temporarily unavailable."
2064
+ )}
2065
+ </p>
2066
+ ${this.sectorId || this.catalogId ? d`<tems-button
2067
+ type="primary"
2068
+ label=${p("Back")}
2069
+ @click=${this._back}
2070
+ ></tems-button>` : d`<tems-button
2071
+ type="primary"
2072
+ label=${p("Retry")}
2073
+ @click=${this.requestUpdate}
2074
+ ></tems-button>`}`}
2075
+ </div>
2076
+ </tems-viewport>`
2077
+ });
2078
+ }
2079
+ };
2080
+ _.styles = Y`
2081
+ .card-grid {
2082
+ margin: var(--scale-900) 0;
2083
+ display: flex;
2084
+ flex-direction: row;
2085
+ flex-wrap: wrap;
2086
+ gap: 20px;
2087
+ }
2088
+ .card-grid-vertical {
2089
+ justify-content: stretch;
2090
+ }
2091
+ .card-grid-vertical tems-card-catalog {
2092
+ width: 354px;
2093
+ height: auto;
2094
+ }
2095
+ tems-card-catalog.cursor-pointer {
2096
+ cursor: pointer;
2097
+ }
2098
+ tems-division {
2099
+ margin-top: var(--scale-900);
2100
+ }
2101
+ `;
2102
+ R([
2103
+ y({ attribute: "sector-id", type: String })
2104
+ ], _.prototype, "sectorId", 2);
2105
+ R([
2106
+ y({ attribute: "catalog-id", type: String })
2107
+ ], _.prototype, "catalogId", 2);
2108
+ R([
2109
+ m()
2110
+ ], _.prototype, "search", 2);
2111
+ R([
2112
+ m()
2113
+ ], _.prototype, "resultCount", 2);
2114
+ R([
2115
+ m()
2116
+ ], _.prototype, "sectors", 2);
2117
+ R([
2118
+ m()
2119
+ ], _.prototype, "catalogs", 2);
2120
+ R([
2121
+ m()
2122
+ ], _.prototype, "object", 2);
2123
+ _ = R([
2124
+ V("solid-dsif-explorer-poc")
2125
+ ], _);
2126
+ var Rr = Object.defineProperty, Er = Object.getOwnPropertyDescriptor, ft = (e, t, r, i) => {
2127
+ for (var s = i > 1 ? void 0 : i ? Er(t, r) : t, o = e.length - 1, n; o >= 0; o--)
2128
+ (n = e[o]) && (s = (i ? n(t, r, s) : n(s)) || s);
2129
+ return i && s && Rr(t, r, s), s;
2130
+ };
2131
+ let Q = class extends C {
2132
+ constructor() {
2133
+ super(...arguments), this.assets = [], this.policies = [], this.contracts = [], this._getResource = new pt(this, {
2134
+ task: async () => {
2135
+ if (this.orbit) {
2136
+ if (!this.hasCachedDatas) {
2137
+ const e = await this.fetchFederatedCatalog();
2138
+ e !== void 0 && Array.isArray(e) && (this.datas = await Promise.all(
2139
+ e.map(
2140
+ async (t) => await this._responseAdaptator(t)
2141
+ )
2142
+ ), this.hasCachedDatas = !0);
2143
+ }
2144
+ return Array.isArray(this.datas) || (this.datas = []), this.datas;
2145
+ }
2146
+ },
2147
+ args: () => [this.caching, this.currentRoute]
2148
+ });
2149
+ }
2150
+ async _responseAdaptator(e) {
2151
+ return e.providers ? Array.isArray(e.providers) || (e.providers = [e.providers].filter((t) => t)) : e.provider && (e.providers = [e.provider].filter((t) => t)), e;
2152
+ }
2153
+ async loadAssets() {
2154
+ if (!this.storeService) {
2155
+ console.error("Store not initialized. Check connector configuration.");
2156
+ return;
2157
+ }
2158
+ try {
2159
+ const e = await this.storeService.getAllAssets();
2160
+ this.assets = Array.isArray(e) ? e : [];
2161
+ } catch (e) {
2162
+ console.error("Failed to load assets:", e);
2163
+ }
2164
+ }
2165
+ async createAsset(e) {
2166
+ if (!this.storeService) return !1;
2167
+ try {
2168
+ return await this.storeService.createAsset(e), await this.loadAssets(), this.dispatchEvent(
2169
+ new CustomEvent("asset-created", {
2170
+ detail: { asset: e },
2171
+ bubbles: !0,
2172
+ composed: !0
2173
+ })
2174
+ ), !0;
2175
+ } catch (t) {
2176
+ return console.error("Failed to create asset", t), !1;
2177
+ }
2178
+ }
2179
+ async loadPolicies() {
2180
+ if (!this.storeService) {
2181
+ console.error("Store not initialized. Check connector configuration.");
2182
+ return;
2183
+ }
2184
+ try {
2185
+ const e = await this.storeService.getAllPolicies();
2186
+ this.policies = Array.isArray(e) ? e : [];
2187
+ } catch (e) {
2188
+ console.error("Failed to load policies", e);
2189
+ }
2190
+ }
2191
+ async createPolicy(e) {
2192
+ if (!this.storeService) return !1;
2193
+ try {
2194
+ return await this.storeService.createPolicy(e), await this.loadPolicies(), this.dispatchEvent(
2195
+ new CustomEvent("policy-created", {
2196
+ detail: { policy: e },
2197
+ bubbles: !0,
2198
+ composed: !0
2199
+ })
2200
+ ), !0;
2201
+ } catch (t) {
2202
+ return console.error("Failed to create policy", t), !1;
2203
+ }
2204
+ }
2205
+ async loadContracts() {
2206
+ if (!this.storeService) {
2207
+ console.error("Store not initialized. Check connector configuration.");
2208
+ return;
2209
+ }
2210
+ try {
2211
+ const e = await this.storeService.getAllContractDefinitions();
2212
+ this.contracts = Array.isArray(e) ? e : [];
2213
+ } catch (e) {
2214
+ console.error("Failed to load contract definitions", e);
2215
+ }
2216
+ }
2217
+ async createContract(e) {
2218
+ if (!this.storeService) return !1;
2219
+ try {
2220
+ return await this.storeService.createContractDefinition(e), await this.loadContracts(), this.dispatchEvent(
2221
+ new CustomEvent("contract-created", {
2222
+ detail: { contract: e },
2223
+ bubbles: !0,
2224
+ composed: !0
2225
+ })
2226
+ ), !0;
2227
+ } catch (t) {
2228
+ return console.error("Failed to create contract definition", t), !1;
2229
+ }
2230
+ }
2231
+ render() {
2232
+ return this._getResource.render({
2233
+ pending: () => c,
2234
+ complete: () => c,
2235
+ error: (e) => c
2236
+ });
2237
+ }
2238
+ };
2239
+ ft([
2240
+ m()
2241
+ ], Q.prototype, "assets", 2);
2242
+ ft([
2243
+ m()
2244
+ ], Q.prototype, "policies", 2);
2245
+ ft([
2246
+ m()
2247
+ ], Q.prototype, "contracts", 2);
2248
+ Q = ft([
2249
+ V("solid-dsp-connector")
2250
+ ], Q);
2251
+ const Ur = ".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%}";
2252
+ var Or = Object.defineProperty, kr = Object.getOwnPropertyDescriptor, E = (e, t, r, i) => {
2253
+ for (var s = i > 1 ? void 0 : i ? kr(t, r) : t, o = e.length - 1, n; o >= 0; o--)
2254
+ (n = e[o]) && (s = (i ? n(t, r, s) : n(s)) || s);
2255
+ return i && s && Or(t, r, s), s;
1372
2256
  };
1373
- let y = class extends v {
2257
+ let w = class extends v {
1374
2258
  constructor() {
1375
2259
  super(...arguments), this.header = "DS4GO Fact Bundling Creation", this.selectedFacts = [], this.bundleName = "", this.bundleDescription = "", this.filterFactText = "", this.spliceLength = 0, this.cherryPickedProperties = [
1376
- { key: "created_at", value: "created_at", cast: N },
1377
- { key: "updated_at", value: "updated_at", cast: N },
2260
+ { key: "created_at", value: "created_at", cast: D },
2261
+ { key: "updated_at", value: "updated_at", cast: D },
1378
2262
  { key: "name", value: "name" },
1379
2263
  { key: "description", value: "description" },
1380
2264
  { key: "author", value: "author" },
@@ -1382,27 +2266,27 @@ let y = class extends v {
1382
2266
  key: "categories",
1383
2267
  value: "categories",
1384
2268
  expand: !0,
1385
- cast: (e) => U(e, "name")
2269
+ cast: (t) => S(t, "name")
1386
2270
  }
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;
2271
+ ], this._getResource = new pt(this, {
2272
+ task: async ([t, r, i]) => {
2273
+ if (!(!t || !this.orbit || !this.noRouter && this.route && this.currentRoute && !this.route.startsWith(this.currentRoute))) {
2274
+ if (!this.hasCachedDatas || this.oldDataSrc !== t) {
2275
+ if (!t) return;
2276
+ this.facts = await this._getProxyValue(t), this.hasCachedDatas = !0;
1393
2277
  }
1394
- return this.oldDataSrc !== e && (this.oldDataSrc = e), Array.isArray(this.facts) || (this.facts = []), s ? U(
1395
- We(
2278
+ return this.oldDataSrc !== t && (this.oldDataSrc = t), Array.isArray(this.facts) || (this.facts = []), r ? S(
2279
+ ie(
1396
2280
  this.facts.filter(
1397
- (i) => !r.includes(i)
2281
+ (s) => !i.includes(s)
1398
2282
  ),
1399
- s
2283
+ r
1400
2284
  ),
1401
2285
  "name",
1402
2286
  "asc"
1403
- ) : (r.length === 0 && (this.spliceLength = Math.floor((window.innerWidth - 800) / 354) * Math.floor((window.innerHeight - 255) / 500)), U(
2287
+ ) : (i.length === 0 && (this.spliceLength = Math.floor((window.innerWidth - 800) / 354) * Math.floor((window.innerHeight - 255) / 500)), S(
1404
2288
  this.facts.filter(
1405
- (i) => !this.selectedFacts.includes(i)
2289
+ (s) => !this.selectedFacts.includes(s)
1406
2290
  ),
1407
2291
  "name",
1408
2292
  "asc"
@@ -1427,7 +2311,7 @@ let y = class extends v {
1427
2311
  async _createFactBundle() {
1428
2312
  if (!this.bundleName || !(this.selectedFacts.length > 0))
1429
2313
  return;
1430
- const e = {
2314
+ const t = {
1431
2315
  "@context": [
1432
2316
  "https://cdn.startinblox.com/owl/context.jsonld",
1433
2317
  "https://cdn.startinblox.com/owl/ds4go.jsonld"
@@ -1435,14 +2319,14 @@ let y = class extends v {
1435
2319
  "@type": ["ldp:Container", "ds4go:FactBundle"],
1436
2320
  name: this.bundleName,
1437
2321
  description: this.bundleDescription,
1438
- facts: this.selectedFacts.map((r) => r.id)
1439
- }, s = await window.sibStore.post(
1440
- e,
2322
+ facts: this.selectedFacts.map((i) => i.id)
2323
+ }, r = await window.sibStore.post(
2324
+ t,
1441
2325
  this.dataSrc
1442
2326
  );
1443
2327
  document.dispatchEvent(
1444
2328
  new CustomEvent("save", {
1445
- detail: { resource: { "@id": s } },
2329
+ detail: { resource: { "@id": r } },
1446
2330
  bubbles: !0
1447
2331
  })
1448
2332
  ), document.dispatchEvent(
@@ -1452,32 +2336,32 @@ let y = class extends v {
1452
2336
  })
1453
2337
  );
1454
2338
  }
1455
- _updateBundleName(e) {
1456
- this.bundleName = e.detail.value;
2339
+ _updateBundleName(t) {
2340
+ this.bundleName = t.detail.value;
1457
2341
  }
1458
- _updateBundleDescription(e) {
1459
- this.bundleDescription = e.detail.value;
2342
+ _updateBundleDescription(t) {
2343
+ this.bundleDescription = t.detail.value;
1460
2344
  }
1461
- _toggleFactSelection(e) {
1462
- this.selectedFacts.includes(e) ? this.selectedFacts = this.selectedFacts.filter((s) => s !== e) : this.selectedFacts = [...this.selectedFacts, e];
2345
+ _toggleFactSelection(t) {
2346
+ this.selectedFacts.includes(t) ? this.selectedFacts = this.selectedFacts.filter((r) => r !== t) : this.selectedFacts = [...this.selectedFacts, t];
1463
2347
  }
1464
- _searchFacts(e) {
1465
- this.filterFactText = e.detail;
2348
+ _searchFacts(t) {
2349
+ this.filterFactText = t.detail;
1466
2350
  }
1467
2351
  render() {
1468
2352
  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>
2353
+ pending: () => d`<solid-loader></solid-loader>`,
2354
+ error: (t) => (console.warn("[solid-fact-bundle-creation] Task error:", t), c),
2355
+ complete: (t) => {
2356
+ if (!t) return c;
2357
+ const r = t.slice(0, this.spliceLength), i = this.selectedFacts.length, s = !!this.bundleName && i > 0;
2358
+ return d`<tems-viewport>
1475
2359
  <tems-header slot="header" heading=${this.header}>
1476
2360
  <div slot="cta">
1477
2361
  <tems-button
1478
2362
  type="primary"
1479
- disabled=${!i || c}
1480
- label=${f("Create bundle")}
2363
+ disabled=${!s || c}
2364
+ label=${p("Create bundle")}
1481
2365
  @click=${this._createFactBundle}
1482
2366
  ></tems-button>
1483
2367
  </div>
@@ -1488,8 +2372,8 @@ let y = class extends v {
1488
2372
  <div>
1489
2373
  <tems-input
1490
2374
  type="text"
1491
- label=${f("Bundle name")}
1492
- placeholder=${f("Bundle name")}
2375
+ label=${p("Bundle name")}
2376
+ placeholder=${p("Bundle name")}
1493
2377
  required=""
1494
2378
  .value=${this.bundleName}
1495
2379
  @change=${this._updateBundleName}
@@ -1498,16 +2382,16 @@ let y = class extends v {
1498
2382
  <div>
1499
2383
  <tems-textarea
1500
2384
  rows="4"
1501
- label=${f("Bundle description")}
1502
- placeholder=${f("Bundle description")}
2385
+ label=${p("Bundle description")}
2386
+ placeholder=${p("Bundle description")}
1503
2387
  .value=${this.bundleDescription}
1504
2388
  @change=${this._updateBundleDescription}
1505
2389
  ></tems-textarea>
1506
2390
  </div>
1507
- ${r > 0 ? p`<tems-division type="h4">
2391
+ ${i > 0 ? d`<tems-division type="h4">
1508
2392
  <div>
1509
- ${f(
1510
- J`${r} selected fact${r > 1 ? "s" : ""}`
2393
+ ${p(
2394
+ q`${i} selected fact${i > 1 ? "s" : ""}`
1511
2395
  )}
1512
2396
  </div></tems-division
1513
2397
  >
@@ -1520,11 +2404,11 @@ let y = class extends v {
1520
2404
  if (n.length > 3) {
1521
2405
  const a = n.length - 3;
1522
2406
  n.splice(3, a), n.push({
1523
- name: `+${a} ${f("more")}`,
2407
+ name: `+${a} ${p("more")}`,
1524
2408
  type: "information"
1525
2409
  });
1526
2410
  }
1527
- return p`<tems-card-catalog
2411
+ return d`<tems-card-catalog
1528
2412
  .object=${c}
1529
2413
  .header=${o.name || c}
1530
2414
  date=${o.updated_at || c}
@@ -1537,7 +2421,7 @@ let y = class extends v {
1537
2421
  })}
1538
2422
  </div>` : c}
1539
2423
  </div>
1540
- ̂${s.length > 0 ? p`<div>
2424
+ ${r.length > 0 || this.filterFactText ? d`<div>
1541
2425
  <div>
1542
2426
  <tems-search-bar
1543
2427
  .displayFilters=${!1}
@@ -1552,52 +2436,57 @@ let y = class extends v {
1552
2436
  @search=${this._searchFacts}
1553
2437
  ></tems-search-bar>
1554
2438
  </div>
1555
- <div class="card-grid card-grid-vertical">
1556
- ${s.map((o) => {
1557
- const n = o.categories.map((a) => ({
1558
- name: a.name,
1559
- type: "information"
1560
- }));
2439
+ ${r.length > 0 ? d` <div class="card-grid card-grid-vertical">
2440
+ ${r.map((o) => {
2441
+ const n = o.categories.map(
2442
+ (a) => ({
2443
+ name: a.name,
2444
+ type: "information"
2445
+ })
2446
+ );
1561
2447
  if (n.length > 3) {
1562
2448
  const a = n.length - 3;
1563
2449
  n.splice(3, a), n.push({
1564
- name: `+${a} ${f("more")}`,
2450
+ name: `+${a} ${p("more")}`,
1565
2451
  type: "information"
1566
2452
  });
1567
2453
  }
1568
- return p`<tems-card-catalog
1569
- .object=${c}
1570
- .tags=${n}
1571
- .header=${o.name || c}
1572
- .content=${o.description || c}
1573
- date=${o.updated_at || c}
1574
- @click=${this._toggleFactSelection.bind(this, o)}
1575
- ></tems-card-catalog>`;
2454
+ return d`<tems-card-catalog
2455
+ .object=${c}
2456
+ .tags=${n}
2457
+ .header=${o.name || c}
2458
+ .content=${o.description || c}
2459
+ date=${o.updated_at || c}
2460
+ @click=${this._toggleFactSelection.bind(
2461
+ this,
2462
+ o
2463
+ )}
2464
+ ></tems-card-catalog>`;
1576
2465
  })}
1577
- </div>
1578
- ${s.length < e.length ? p`<div
1579
- class="flex flex-row justify-content-space-between align-items-flex-end"
1580
- >
1581
- <div>
1582
- ${f(
1583
- J`Displaying ${s.length} of ${e.length} result${e.length > 1 ? "s" : ""}`
1584
- )}
1585
- </div>
1586
- <div class="flex flex-row gap-400">
1587
- <tems-button
1588
- @click=${this._showMoreResults}
1589
- type="primary"
1590
- size="sm"
1591
- label=${f("Show more results")}
1592
- ></tems-button>
1593
- <tems-button
1594
- @click=${this._showAllResults}
1595
- type="primary"
1596
- size="sm"
1597
- label=${f("Show all results")}
1598
- ></tems-button>
1599
2466
  </div>
1600
- </div>` : c}
2467
+ ${r.length < t.length ? d`<div
2468
+ class="flex flex-row justify-content-space-between align-items-flex-end"
2469
+ >
2470
+ <div>
2471
+ ${p(
2472
+ q`Displaying ${r.length} of ${t.length} result${t.length > 1 ? "s" : ""}`
2473
+ )}
2474
+ </div>
2475
+ <div class="flex flex-row gap-400">
2476
+ <tems-button
2477
+ @click=${this._showMoreResults}
2478
+ type="primary"
2479
+ size="sm"
2480
+ label=${p("Show more results")}
2481
+ ></tems-button>
2482
+ <tems-button
2483
+ @click=${this._showAllResults}
2484
+ type="primary"
2485
+ size="sm"
2486
+ label=${p("Show all results")}
2487
+ ></tems-button>
2488
+ </div>
2489
+ </div>` : c}` : d`${p("No results found")} ${this.filterFactText ? `for "${this.filterFactText}".` : ""}`}
1601
2490
  </div>` : c}
1602
2491
  </section>
1603
2492
  </div>
@@ -1606,9 +2495,9 @@ let y = class extends v {
1606
2495
  });
1607
2496
  }
1608
2497
  };
1609
- y.styles = [
1610
- ge(ds),
1611
- ee`
2498
+ w.styles = [
2499
+ St(Ur),
2500
+ Y`
1612
2501
  [slot="content"] {
1613
2502
  height: 100%;
1614
2503
  }
@@ -1657,54 +2546,54 @@ y.styles = [
1657
2546
  }
1658
2547
  `
1659
2548
  ];
1660
- A([
1661
- m({ attribute: "header", type: String })
1662
- ], y.prototype, "header", 2);
1663
- A([
1664
- m({ attribute: "facts-src", reflect: !0 })
1665
- ], y.prototype, "factsSrc", 2);
1666
- A([
1667
- g()
1668
- ], y.prototype, "selectedFacts", 2);
1669
- A([
1670
- g()
1671
- ], y.prototype, "bundleName", 2);
1672
- A([
1673
- g()
1674
- ], y.prototype, "bundleDescription", 2);
1675
- A([
1676
- g()
1677
- ], y.prototype, "filterFactText", 2);
1678
- A([
1679
- g()
1680
- ], y.prototype, "spliceLength", 2);
1681
- y = A([
1682
- re("solid-fact-bundle-creation")
1683
- ], y);
1684
- var fs = Object.defineProperty, ps = Object.getOwnPropertyDescriptor, I = (t, e, s, r) => {
1685
- for (var i = r > 1 ? void 0 : r ? ps(e, s) : e, o = t.length - 1, n; o >= 0; o--)
1686
- (n = t[o]) && (i = (r ? n(e, s, i) : n(i)) || i);
1687
- return r && i && fs(e, s, i), i;
2549
+ E([
2550
+ y({ attribute: "header", type: String })
2551
+ ], w.prototype, "header", 2);
2552
+ E([
2553
+ y({ attribute: "facts-src", reflect: !0 })
2554
+ ], w.prototype, "factsSrc", 2);
2555
+ E([
2556
+ m()
2557
+ ], w.prototype, "selectedFacts", 2);
2558
+ E([
2559
+ m()
2560
+ ], w.prototype, "bundleName", 2);
2561
+ E([
2562
+ m()
2563
+ ], w.prototype, "bundleDescription", 2);
2564
+ E([
2565
+ m()
2566
+ ], w.prototype, "filterFactText", 2);
2567
+ E([
2568
+ m()
2569
+ ], w.prototype, "spliceLength", 2);
2570
+ w = E([
2571
+ V("solid-fact-bundle-creation")
2572
+ ], w);
2573
+ var Dr = Object.defineProperty, Lr = Object.getOwnPropertyDescriptor, et = (e, t, r, i) => {
2574
+ for (var s = i > 1 ? void 0 : i ? Lr(t, r) : t, o = e.length - 1, n; o >= 0; o--)
2575
+ (n = e[o]) && (s = (i ? n(t, r, s) : n(s)) || s);
2576
+ return i && s && Dr(t, r, s), s;
1688
2577
  };
1689
- let j = class extends v {
2578
+ let I = class extends v {
1690
2579
  constructor() {
1691
2580
  super(...arguments), this.header = "DS4GO Fact Bundling", this.search = [], this.resultCount = this.objects?.length || 0, this.cherryPickedProperties = [
1692
- { key: "created_at", value: "created_at", cast: N },
1693
- { key: "updated_at", value: "updated_at", cast: N },
2581
+ { key: "created_at", value: "created_at", cast: D },
2582
+ { key: "updated_at", value: "updated_at", cast: D },
1694
2583
  { key: "name", value: "name" },
1695
2584
  { key: "description", value: "description" }
1696
- ], this._getResource = new Ye(this, {
1697
- task: async ([t, e]) => {
1698
- if (!(!t && !e || !this.orbit || !this.noRouter && this.route && this.currentRoute && !this.route.startsWith(this.currentRoute))) {
1699
- if (this.menuComponent.ready || await new Promise((s) => {
2585
+ ], this._getResource = new pt(this, {
2586
+ task: async ([e, t]) => {
2587
+ if (!(!e && !t || !this.orbit || !this.noRouter && this.route && this.currentRoute && !this.route.startsWith(this.currentRoute))) {
2588
+ if (this.menuComponent.ready || await new Promise((r) => {
1700
2589
  this.menuComponent.addEventListener("user-ready", () => {
1701
- s(!0);
2590
+ r(!0);
1702
2591
  });
1703
- }), this.displayFiltering = !this.component.parameters.disableFiltering, !this.hasCachedDatas || this.oldDataSrc !== t) {
1704
- if (!t) return;
1705
- this.objects = await this._getProxyValue(t), this.hasCachedDatas = !0;
2592
+ }), this.displayFiltering = !this.component.parameters.disableFiltering, !this.hasCachedDatas || this.oldDataSrc !== e) {
2593
+ if (!e) return;
2594
+ this.objects = await this._getProxyValue(e), this.hasCachedDatas = !0;
1706
2595
  }
1707
- return this.oldDataSrc !== t && (this.oldDataSrc = t), Array.isArray(this.objects) || (this.objects = []), this.object = this.objects.find((s) => s["@id"] === e), U(this.objects, "name", "asc");
2596
+ return this.oldDataSrc !== e && (this.oldDataSrc = e), Array.isArray(this.objects) || (this.objects = []), this.object = this.objects.find((r) => r["@id"] === t), S(this.objects, "name", "asc");
1708
2597
  }
1709
2598
  },
1710
2599
  args: () => [
@@ -1715,18 +2604,18 @@ let j = class extends v {
1715
2604
  ]
1716
2605
  });
1717
2606
  }
1718
- async _responseAdaptator(t) {
1719
- return t?._originalResource?.hasType("ds4go:FactBundle") && (t.facts = await Promise.all(
1720
- (await t._originalResource["ldp:contains"]).map(
1721
- (e) => this._getProxyValue(e["@id"], !1, [
1722
- { key: "updated_at", value: "updated_at", cast: N },
2607
+ async _responseAdaptator(e) {
2608
+ return e?._originalResource?.hasType("ds4go:FactBundle") && (e.facts = await Promise.all(
2609
+ (await e._originalResource["ldp:contains"]).map(
2610
+ (t) => this._getProxyValue(t["@id"], !1, [
2611
+ { key: "updated_at", value: "updated_at", cast: D },
1723
2612
  { key: "name", value: "name" },
1724
2613
  { key: "description", value: "description" },
1725
2614
  {
1726
2615
  key: "categories",
1727
2616
  value: "categories",
1728
2617
  expand: !0,
1729
- cast: (s) => U(s, "name")
2618
+ cast: (r) => S(r, "name")
1730
2619
  },
1731
2620
  { key: "author", value: "author" },
1732
2621
  { key: "link", value: "link" },
@@ -1741,7 +2630,7 @@ let j = class extends v {
1741
2630
  // { key: "review", value: "review" },
1742
2631
  ])
1743
2632
  )
1744
- )), Promise.resolve(t);
2633
+ )), Promise.resolve(e);
1745
2634
  }
1746
2635
  async _afterAttach() {
1747
2636
  return this.menuComponent = document.querySelector(
@@ -1750,46 +2639,46 @@ let j = class extends v {
1750
2639
  "fact-bundle-creation"
1751
2640
  ), Promise.resolve();
1752
2641
  }
1753
- _search(t) {
1754
- t.preventDefault(), this.search = t.detail, this.filterCount = this.search.filter((e) => e.name !== "search").length;
2642
+ _search(e) {
2643
+ e.preventDefault(), this.search = e.detail, this.filterCount = this.search.filter((t) => t.name !== "search").length;
1755
2644
  }
1756
- _openModal(t) {
1757
- if (t.preventDefault(), this.route)
2645
+ _openModal(e) {
2646
+ if (e.preventDefault(), this.route)
1758
2647
  if ("use-id" in (this.component.routeAttributes || {}))
1759
- O(this.route, t.detail["@id"]);
2648
+ N(this.route, e.detail["@id"]);
1760
2649
  else {
1761
- const e = t.detail["@type"]?.at(-1) ?? t.detail["@type"];
1762
- if (e) {
1763
- const s = window.orbit?.components?.filter(
1764
- (r) => r?.routeAttributes?.["rdf-type"] === e
2650
+ const t = e.detail["@type"]?.at(-1) ?? e.detail["@type"];
2651
+ if (t) {
2652
+ const r = window.orbit?.components?.filter(
2653
+ (i) => i?.routeAttributes?.["rdf-type"] === t
1765
2654
  );
1766
- s?.[0]?.route && O(s[0]?.route, t.detail["@id"]);
2655
+ r?.[0]?.route && N(r[0]?.route, e.detail["@id"]);
1767
2656
  }
1768
2657
  }
1769
2658
  }
1770
- _closeModal(t) {
1771
- t.preventDefault(), this.route && O(this.route, this.defaultDataSrc);
2659
+ _closeModal(e) {
2660
+ e.preventDefault(), this.route && N(this.route, this.defaultDataSrc);
1772
2661
  }
1773
- _closeModalFromBackground(t) {
1774
- t.preventDefault(), this.route && t.target?.classList.contains("modal") && O(this.route, this.defaultDataSrc);
2662
+ _closeModalFromBackground(e) {
2663
+ e.preventDefault(), this.route && e.target?.classList.contains("modal") && N(this.route, this.defaultDataSrc);
1775
2664
  }
1776
- _resultCountUpdate(t) {
1777
- this.resultCount = t.detail ?? 0;
2665
+ _resultCountUpdate(e) {
2666
+ this.resultCount = e.detail ?? 0;
1778
2667
  }
1779
- _goToBundleCreation(t) {
1780
- t.preventDefault(), this.bundleCreationComponent?.route && O(this.bundleCreationComponent.route);
2668
+ _goToBundleCreation(e) {
2669
+ e.preventDefault(), this.bundleCreationComponent?.route && N(this.bundleCreationComponent.route);
1781
2670
  }
1782
2671
  render() {
1783
2672
  return this.gatekeeper() || this._getResource.render({
1784
- pending: () => p`<solid-loader></solid-loader>`,
1785
- error: (t) => (console.warn("[solid-fact-bundle] Task error:", t), c),
1786
- complete: (t) => p`<tems-viewport>
2673
+ pending: () => d`<solid-loader></solid-loader>`,
2674
+ error: (e) => (console.warn("[solid-fact-bundle] Task error:", e), c),
2675
+ complete: (e) => d`<tems-viewport>
1787
2676
  <tems-header slot="header" heading=${this.header}>
1788
2677
  <div slot="cta">
1789
2678
  <tems-button
1790
2679
  type="primary"
1791
2680
  disabled=${!this.bundleCreationComponent?.route || c}
1792
- label=${f("Create a bundle")}
2681
+ label=${p("Create a bundle")}
1793
2682
  @click=${this._goToBundleCreation}
1794
2683
  ></tems-button>
1795
2684
  </div>
@@ -1799,17 +2688,17 @@ let j = class extends v {
1799
2688
  .displayFiltering=${this.displayFiltering}
1800
2689
  @search=${this._search}
1801
2690
  .search=${this.search}
1802
- .objects=${t}
2691
+ .objects=${e}
1803
2692
  .resultCount=${this.resultCount}
1804
2693
  .filterCount=${this.filterCount}
1805
2694
  ></tems-catalog-filter-holder>
1806
2695
  <ds4go-fact-bundle-holder
1807
- .objects=${t}
2696
+ .objects=${e}
1808
2697
  .search=${this.search}
1809
2698
  @clicked=${this._openModal}
1810
2699
  @result-count=${this._resultCountUpdate}
1811
2700
  ></ds4go-fact-bundle-holder>
1812
- ${this.object ? p`<div
2701
+ ${this.object ? d`<div
1813
2702
  class="modal"
1814
2703
  @click=${this._closeModalFromBackground}
1815
2704
  >
@@ -1823,7 +2712,7 @@ let j = class extends v {
1823
2712
  });
1824
2713
  }
1825
2714
  };
1826
- j.styles = ee`
2715
+ I.styles = Y`
1827
2716
  .modal {
1828
2717
  position: fixed;
1829
2718
  top: 0;
@@ -1837,50 +2726,58 @@ j.styles = ee`
1837
2726
  align-items: center;
1838
2727
  }
1839
2728
  `;
1840
- I([
1841
- m({ attribute: "header", type: String })
1842
- ], j.prototype, "header", 2);
1843
- I([
1844
- g()
1845
- ], j.prototype, "search", 2);
1846
- I([
1847
- g()
1848
- ], j.prototype, "resultCount", 2);
1849
- I([
1850
- g()
1851
- ], j.prototype, "bundleCreationComponent", 2);
1852
- j = I([
1853
- re("solid-fact-bundle")
1854
- ], j);
1855
- const ms = {
2729
+ et([
2730
+ y({ attribute: "header", type: String })
2731
+ ], I.prototype, "header", 2);
2732
+ et([
2733
+ m()
2734
+ ], I.prototype, "search", 2);
2735
+ et([
2736
+ m()
2737
+ ], I.prototype, "resultCount", 2);
2738
+ et([
2739
+ m()
2740
+ ], I.prototype, "bundleCreationComponent", 2);
2741
+ I = et([
2742
+ V("solid-fact-bundle")
2743
+ ], I);
2744
+ const Ir = {
2745
+ s541d9cd11a5bc840: "Datasets from",
2746
+ s4aaac20ff7887391: "Catalogs available in",
2747
+ sa89a60c3e1230cec: "Root Authority",
2748
+ se5784a16a6799dad: q`Back to ${0}`,
2749
+ s6665daa6d6147db0: "No data available, data source may be temporarily unavailable.",
2750
+ sc16e00a7a8b2fde2: "Back",
2751
+ s2c8189544e3ea679: "Retry",
1856
2752
  seb1a452f2df70baf: "Create bundle",
1857
2753
  sed5b6ae54e00125c: "Bundle name",
1858
2754
  s11099da36cbc3173: "Bundle description",
1859
- sac1b0231875ff056: J`${0} selected fact${1}`,
2755
+ sac1b0231875ff056: q`${0} selected fact${1}`,
1860
2756
  s0d1be7a2c400c080: "more",
1861
- s8272d3578b7c78d5: J`Displaying ${0} of ${1} result${2}`,
2757
+ s8272d3578b7c78d5: q`Displaying ${0} of ${1} result${2}`,
1862
2758
  sa40e7f4f2a43e2f7: "Show more results",
1863
2759
  sacf246e0fa11730d: "Show all results",
2760
+ s9094c0cde8fb5058: "No results found",
1864
2761
  sf5509a9f253b9836: "Create a bundle",
1865
2762
  sefa717c1620c4ae4: "facts",
1866
2763
  sef234a791696afff: "fact",
1867
2764
  s4979bd417e7c8052: "All facts in this bundle",
1868
2765
  s57a40de45f324b96: "Bundle created on",
1869
2766
  sd3682395cf86f913: "Bundle updated on"
1870
- }, gs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2767
+ }, Tr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1871
2768
  __proto__: null,
1872
- templates: ms
1873
- }, Symbol.toStringTag, { value: "Module" })), ys = "en", et = [
2769
+ templates: Ir
2770
+ }, Symbol.toStringTag, { value: "Module" })), Fr = "en", he = [
1874
2771
  "en"
1875
- ], vs = /* @__PURE__ */ Object.assign({ "../../generated/locales/en.ts": gs }), $s = new Map(
1876
- et.map((t) => [
1877
- t,
1878
- vs[`../../generated/locales/${t}.ts`]
2772
+ ], Nr = /* @__PURE__ */ Object.assign({ "../../generated/locales/en.ts": Tr }), Mr = new Map(
2773
+ he.map((e) => [
2774
+ e,
2775
+ Nr[`../../generated/locales/${e}.ts`]
1879
2776
  ])
1880
- ), { getLocale: Fe, setLocale: Be } = es({
1881
- sourceLocale: ys,
1882
- targetLocales: et,
1883
- loadLocale: async (t) => $s.get(t)
2777
+ ), { getLocale: Zt, setLocale: Xt } = yr({
2778
+ sourceLocale: Fr,
2779
+ targetLocales: he,
2780
+ loadLocale: async (e) => Mr.get(e)
1884
2781
  });
1885
- window.getLocale = window.getLocale ? window.getLocale.push(Fe) : [Fe];
1886
- window.setLocale = window.setLocale ? window.setLocale.push(Be) : [Be];
2782
+ window.getLocale = window.getLocale ? window.getLocale.push(Zt) : [Zt];
2783
+ window.setLocale = window.setLocale ? window.setLocale.push(Xt) : [Xt];