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