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